summaryrefslogtreecommitdiffstats
path: root/kio
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kio
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio')
-rw-r--r--kio/bookmarks/dptrtemplate.h6
-rw-r--r--kio/bookmarks/kbookmark.cc166
-rw-r--r--kio/bookmarks/kbookmark.h70
-rw-r--r--kio/bookmarks/kbookmarkbar.cc104
-rw-r--r--kio/bookmarks/kbookmarkbar.h22
-rw-r--r--kio/bookmarks/kbookmarkdombuilder.cc28
-rw-r--r--kio/bookmarks/kbookmarkdombuilder.h16
-rw-r--r--kio/bookmarks/kbookmarkdrag.cc58
-rw-r--r--kio/bookmarks/kbookmarkdrag.h24
-rw-r--r--kio/bookmarks/kbookmarkexporter.cc6
-rw-r--r--kio/bookmarks/kbookmarkexporter.h6
-rw-r--r--kio/bookmarks/kbookmarkimporter.cc22
-rw-r--r--kio/bookmarks/kbookmarkimporter.h22
-rw-r--r--kio/bookmarks/kbookmarkimporter_crash.cc74
-rw-r--r--kio/bookmarks/kbookmarkimporter_crash.h28
-rw-r--r--kio/bookmarks/kbookmarkimporter_ie.cc54
-rw-r--r--kio/bookmarks/kbookmarkimporter_ie.h24
-rw-r--r--kio/bookmarks/kbookmarkimporter_kde1.cc40
-rw-r--r--kio/bookmarks/kbookmarkimporter_kde1.h20
-rw-r--r--kio/bookmarks/kbookmarkimporter_ns.cc64
-rw-r--r--kio/bookmarks/kbookmarkimporter_ns.h30
-rw-r--r--kio/bookmarks/kbookmarkimporter_opera.cc42
-rw-r--r--kio/bookmarks/kbookmarkimporter_opera.h20
-rw-r--r--kio/bookmarks/kbookmarkmanager.cc194
-rw-r--r--kio/bookmarks/kbookmarkmanager.h64
-rw-r--r--kio/bookmarks/kbookmarkmenu.cc264
-rw-r--r--kio/bookmarks/kbookmarkmenu.h54
-rw-r--r--kio/bookmarks/kbookmarkmenu_p.h118
-rw-r--r--kio/bookmarks/kbookmarknotifier.h8
-rw-r--r--kio/httpfilter/httpfilter.cc34
-rw-r--r--kio/httpfilter/httpfilter.h18
-rw-r--r--kio/kfile/config-kfile.h30
-rw-r--r--kio/kfile/images.h16
-rw-r--r--kio/kfile/kacleditwidget.cpp202
-rw-r--r--kio/kfile/kacleditwidget.h8
-rw-r--r--kio/kfile/kacleditwidget_p.h62
-rw-r--r--kio/kfile/kcombiview.cpp38
-rw-r--r--kio/kfile/kcombiview.h18
-rw-r--r--kio/kfile/kcustommenueditor.cpp80
-rw-r--r--kio/kfile/kcustommenueditor.h2
-rw-r--r--kio/kfile/kdiroperator.cpp414
-rw-r--r--kio/kfile/kdiroperator.h92
-rw-r--r--kio/kfile/kdirselectdialog.cpp122
-rw-r--r--kio/kfile/kdirselectdialog.h32
-rw-r--r--kio/kfile/kdirsize.cpp16
-rw-r--r--kio/kfile/kdiskfreesp.cpp38
-rw-r--r--kio/kfile/kdiskfreesp.h18
-rw-r--r--kio/kfile/kencodingfiledialog.cpp72
-rw-r--r--kio/kfile/kencodingfiledialog.h94
-rw-r--r--kio/kfile/kfile.h26
-rw-r--r--kio/kfile/kfilebookmarkhandler.cpp10
-rw-r--r--kio/kfile/kfilebookmarkhandler.h12
-rw-r--r--kio/kfile/kfiledetailview.cpp176
-rw-r--r--kio/kfile/kfiledetailview.h68
-rw-r--r--kio/kfile/kfiledialog.cpp508
-rw-r--r--kio/kfile/kfiledialog.h184
-rw-r--r--kio/kfile/kfilefiltercombo.cpp46
-rw-r--r--kio/kfile/kfilefiltercombo.h22
-rw-r--r--kio/kfile/kfileiconview.cpp238
-rw-r--r--kio/kfile/kfileiconview.h64
-rw-r--r--kio/kfile/kfilemetainfowidget.cpp214
-rw-r--r--kio/kfile/kfilemetainfowidget.h54
-rw-r--r--kio/kfile/kfilemetapreview.cpp30
-rw-r--r--kio/kfile/kfilemetapreview.h16
-rw-r--r--kio/kfile/kfilepreview.cpp50
-rw-r--r--kio/kfile/kfilepreview.h26
-rw-r--r--kio/kfile/kfilesharedlg.cpp66
-rw-r--r--kio/kfile/kfilesharedlg.h12
-rw-r--r--kio/kfile/kfilespeedbar.cpp44
-rw-r--r--kio/kfile/kfilespeedbar.h4
-rw-r--r--kio/kfile/kfiletreebranch.cpp58
-rw-r--r--kio/kfile/kfiletreebranch.h30
-rw-r--r--kio/kfile/kfiletreeview.cpp150
-rw-r--r--kio/kfile/kfiletreeview.h94
-rw-r--r--kio/kfile/kfiletreeviewitem.cpp6
-rw-r--r--kio/kfile/kfiletreeviewitem.h8
-rw-r--r--kio/kfile/kfileview.cpp76
-rw-r--r--kio/kfile/kfileview.h68
-rw-r--r--kio/kfile/kicondialog.cpp198
-rw-r--r--kio/kfile/kicondialog.h72
-rw-r--r--kio/kfile/kimagefilepreview.cpp58
-rw-r--r--kio/kfile/kimagefilepreview.h20
-rw-r--r--kio/kfile/kmetaprops.cpp92
-rw-r--r--kio/kfile/kmetaprops.h14
-rw-r--r--kio/kfile/knotifydialog.cpp326
-rw-r--r--kio/kfile/knotifydialog.h76
-rw-r--r--kio/kfile/kopenwith.cpp254
-rw-r--r--kio/kfile/kopenwith.h38
-rw-r--r--kio/kfile/kopenwith_p.h32
-rw-r--r--kio/kfile/kpreviewprops.cpp14
-rw-r--r--kio/kfile/kpreviewprops.h2
-rw-r--r--kio/kfile/kpreviewwidgetbase.cpp16
-rw-r--r--kio/kfile/kpreviewwidgetbase.h12
-rw-r--r--kio/kfile/kpropertiesdialog.cpp1132
-rw-r--r--kio/kfile/kpropertiesdialog.h154
-rw-r--r--kio/kfile/krecentdirs.cpp22
-rw-r--r--kio/kfile/krecentdirs.h8
-rw-r--r--kio/kfile/krecentdocument.cpp90
-rw-r--r--kio/kfile/krecentdocument.h10
-rw-r--r--kio/kfile/kurlbar.cpp316
-rw-r--r--kio/kfile/kurlbar.h112
-rw-r--r--kio/kfile/kurlcombobox.cpp62
-rw-r--r--kio/kfile/kurlcombobox.h44
-rw-r--r--kio/kfile/kurlrequester.cpp100
-rw-r--r--kio/kfile/kurlrequester.h32
-rw-r--r--kio/kfile/kurlrequesterdlg.cpp36
-rw-r--r--kio/kfile/kurlrequesterdlg.h18
-rw-r--r--kio/kfile/tests/kdirselectdialogtest.cpp4
-rw-r--r--kio/kfile/tests/kfdtest.cpp16
-rw-r--r--kio/kfile/tests/kfdtest.h6
-rw-r--r--kio/kfile/tests/kfiletreeviewtest.cpp44
-rw-r--r--kio/kfile/tests/kfiletreeviewtest.h2
-rw-r--r--kio/kfile/tests/kfstest.cpp74
-rw-r--r--kio/kfile/tests/kopenwithtest.cpp8
-rw-r--r--kio/kfile/tests/kurlrequestertest.cpp2
-rw-r--r--kio/kio/authinfo.cpp40
-rw-r--r--kio/kio/authinfo.h48
-rw-r--r--kio/kio/chmodjob.cpp58
-rw-r--r--kio/kio/chmodjob.h6
-rw-r--r--kio/kio/connection.cpp24
-rw-r--r--kio/kio/connection.h20
-rw-r--r--kio/kio/dataprotocol.cpp70
-rw-r--r--kio/kio/dataprotocol.h2
-rw-r--r--kio/kio/dataslave.cpp26
-rw-r--r--kio/kio/dataslave.h18
-rw-r--r--kio/kio/davjob.cpp52
-rw-r--r--kio/kio/davjob.h30
-rw-r--r--kio/kio/defaultprogress.cpp92
-rw-r--r--kio/kio/defaultprogress.h22
-rw-r--r--kio/kio/forwardingslavebase.cpp74
-rw-r--r--kio/kio/forwardingslavebase.h22
-rw-r--r--kio/kio/global.cpp240
-rw-r--r--kio/kio/global.h88
-rw-r--r--kio/kio/job.cpp628
-rw-r--r--kio/kio/job.h16
-rw-r--r--kio/kio/jobclasses.h176
-rw-r--r--kio/kio/kacl.cpp82
-rw-r--r--kio/kio/kacl.h38
-rw-r--r--kio/kio/kar.cpp22
-rw-r--r--kio/kio/kar.h24
-rw-r--r--kio/kio/karchive.cpp170
-rw-r--r--kio/kio/karchive.h146
-rw-r--r--kio/kio/kautomount.cpp10
-rw-r--r--kio/kio/kautomount.h18
-rw-r--r--kio/kio/kdatatool.cpp84
-rw-r--r--kio/kio/kdatatool.h54
-rw-r--r--kio/kio/kdcopservicestarter.cpp24
-rw-r--r--kio/kio/kdcopservicestarter.h18
-rw-r--r--kio/kio/kdirlister.cpp300
-rw-r--r--kio/kio/kdirlister.h44
-rw-r--r--kio/kio/kdirlister_p.h54
-rw-r--r--kio/kio/kdirnotify.cpp2
-rw-r--r--kio/kio/kdirnotify_stub.cpp20
-rw-r--r--kio/kio/kdirnotify_stub.h4
-rw-r--r--kio/kio/kdirwatch.cpp180
-rw-r--r--kio/kio/kdirwatch.h40
-rw-r--r--kio/kio/kdirwatch_p.h28
-rw-r--r--kio/kio/kemailsettings.cpp42
-rw-r--r--kio/kio/kemailsettings.h24
-rw-r--r--kio/kio/kfilefilter.cpp26
-rw-r--r--kio/kio/kfilefilter.h18
-rw-r--r--kio/kio/kfileitem.cpp186
-rw-r--r--kio/kio/kfileitem.h76
-rw-r--r--kio/kio/kfilemetainfo.cpp406
-rw-r--r--kio/kio/kfilemetainfo.h338
-rw-r--r--kio/kio/kfileshare.cpp48
-rw-r--r--kio/kio/kfileshare.h16
-rw-r--r--kio/kio/kfilterbase.cpp8
-rw-r--r--kio/kio/kfilterbase.h18
-rw-r--r--kio/kio/kfilterdev.cpp38
-rw-r--r--kio/kio/kfilterdev.h48
-rw-r--r--kio/kio/kimageio.cpp96
-rw-r--r--kio/kio/kimageio.h38
-rw-r--r--kio/kio/kimageiofactory.h48
-rw-r--r--kio/kio/klimitediodevice.h6
-rw-r--r--kio/kio/kmessageboxwrapper.h12
-rw-r--r--kio/kio/kmimemagic.cpp88
-rw-r--r--kio/kio/kmimemagic.h26
-rw-r--r--kio/kio/kmimetype.cpp292
-rw-r--r--kio/kio/kmimetype.h148
-rw-r--r--kio/kio/kmimetypechooser.cpp140
-rw-r--r--kio/kio/kmimetypechooser.h46
-rw-r--r--kio/kio/kmimetyperesolver.h46
-rw-r--r--kio/kio/knfsshare.cpp46
-rw-r--r--kio/kio/knfsshare.h12
-rw-r--r--kio/kio/kprotocolinfo.cpp24
-rw-r--r--kio/kio/kprotocolinfo.h108
-rw-r--r--kio/kio/kprotocolmanager.cpp108
-rw-r--r--kio/kio/kprotocolmanager.h28
-rw-r--r--kio/kio/kremoteencoding.cpp24
-rw-r--r--kio/kio/kremoteencoding.h18
-rw-r--r--kio/kio/krun.cpp252
-rw-r--r--kio/kio/krun.h90
-rw-r--r--kio/kio/ksambashare.cpp60
-rw-r--r--kio/kio/ksambashare.h12
-rw-r--r--kio/kio/kscan.cpp42
-rw-r--r--kio/kio/kscan.h64
-rw-r--r--kio/kio/kservice.cpp236
-rw-r--r--kio/kio/kservice.h156
-rw-r--r--kio/kio/kservice_p.h8
-rw-r--r--kio/kio/kservicefactory.cpp16
-rw-r--r--kio/kio/kservicefactory.h12
-rw-r--r--kio/kio/kservicegroup.cpp98
-rw-r--r--kio/kio/kservicegroup.h68
-rw-r--r--kio/kio/kservicegroupfactory.cpp10
-rw-r--r--kio/kio/kservicegroupfactory.h8
-rw-r--r--kio/kio/kservicetype.cpp80
-rw-r--r--kio/kio/kservicetype.h74
-rw-r--r--kio/kio/kservicetypefactory.cpp38
-rw-r--r--kio/kio/kservicetypefactory.h18
-rw-r--r--kio/kio/kshellcompletion.cpp40
-rw-r--r--kio/kio/kshellcompletion.h30
-rw-r--r--kio/kio/kshred.cpp12
-rw-r--r--kio/kio/kshred.h16
-rw-r--r--kio/kio/ktar.cpp160
-rw-r--r--kio/kio/ktar.h62
-rw-r--r--kio/kio/ktrader.cpp22
-rw-r--r--kio/kio/ktrader.h28
-rw-r--r--kio/kio/ktraderparse.cpp8
-rw-r--r--kio/kio/ktraderparsetree.cpp64
-rw-r--r--kio/kio/ktraderparsetree.h36
-rw-r--r--kio/kio/kurifilter.cpp78
-rw-r--r--kio/kio/kurifilter.h84
-rw-r--r--kio/kio/kurlcompletion.cpp282
-rw-r--r--kio/kio/kurlcompletion.h62
-rw-r--r--kio/kio/kurlpixmapprovider.cpp2
-rw-r--r--kio/kio/kurlpixmapprovider.h2
-rw-r--r--kio/kio/kuserprofile.cpp54
-rw-r--r--kio/kio/kuserprofile.h42
-rw-r--r--kio/kio/kzip.cpp110
-rw-r--r--kio/kio/kzip.h68
-rw-r--r--kio/kio/metainfojob.cpp20
-rw-r--r--kio/kio/metainfojob.h8
-rw-r--r--kio/kio/netaccess.cpp158
-rw-r--r--kio/kio/netaccess.h96
-rw-r--r--kio/kio/observer.cpp60
-rw-r--r--kio/kio/observer.h32
-rw-r--r--kio/kio/passdlg.cpp132
-rw-r--r--kio/kio/passdlg.h30
-rw-r--r--kio/kio/paste.cpp98
-rw-r--r--kio/kio/paste.h20
-rw-r--r--kio/kio/pastedialog.cpp40
-rw-r--r--kio/kio/pastedialog.h12
-rw-r--r--kio/kio/posixacladdons.cpp8
-rw-r--r--kio/kio/posixacladdons.h2
-rw-r--r--kio/kio/previewjob.cpp110
-rw-r--r--kio/kio/previewjob.h18
-rw-r--r--kio/kio/progressbase.cpp134
-rw-r--r--kio/kio/progressbase.h8
-rw-r--r--kio/kio/renamedlg.cpp154
-rw-r--r--kio/kio/renamedlg.h18
-rw-r--r--kio/kio/renamedlgplugin.h14
-rw-r--r--kio/kio/scheduler.cpp156
-rw-r--r--kio/kio/scheduler.h64
-rw-r--r--kio/kio/sessiondata.cpp54
-rw-r--r--kio/kio/sessiondata.h10
-rw-r--r--kio/kio/skipdlg.cpp28
-rw-r--r--kio/kio/skipdlg.h10
-rw-r--r--kio/kio/slave.cpp114
-rw-r--r--kio/kio/slave.h50
-rw-r--r--kio/kio/slavebase.cpp178
-rw-r--r--kio/kio/slavebase.h94
-rw-r--r--kio/kio/slaveconfig.cpp38
-rw-r--r--kio/kio/slaveconfig.h12
-rw-r--r--kio/kio/slaveinterface.cpp84
-rw-r--r--kio/kio/slaveinterface.h50
-rw-r--r--kio/kio/statusbarprogress.cpp32
-rw-r--r--kio/kio/statusbarprogress.h12
-rw-r--r--kio/kio/tcpslavebase.cpp114
-rw-r--r--kio/kio/tcpslavebase.h16
-rw-r--r--kio/kio/thumbcreator.h4
-rw-r--r--kio/kioexec/main.cpp40
-rw-r--r--kio/kioexec/main.h16
-rw-r--r--kio/kpasswdserver/kpasswdserver.cpp122
-rw-r--r--kio/kpasswdserver/kpasswdserver.h50
-rw-r--r--kio/kssl/kopenssl.cc50
-rw-r--r--kio/kssl/ksmimecrypto.cc58
-rw-r--r--kio/kssl/ksmimecrypto.h32
-rw-r--r--kio/kssl/kssl.cc12
-rw-r--r--kio/kssl/kssl.h4
-rw-r--r--kio/kssl/kssl/caroot/ca-bundle.crt42
-rw-r--r--kio/kssl/ksslcertchain.cc18
-rw-r--r--kio/kssl/ksslcertchain.h12
-rw-r--r--kio/kssl/ksslcertdlg.cc56
-rw-r--r--kio/kssl/ksslcertdlg.h28
-rw-r--r--kio/kssl/ksslcertificate.cc138
-rw-r--r--kio/kssl/ksslcertificate.h58
-rw-r--r--kio/kssl/ksslcertificatecache.cc192
-rw-r--r--kio/kssl/ksslcertificatecache.h32
-rw-r--r--kio/kssl/ksslcertificatehome.cc68
-rw-r--r--kio/kssl/ksslcertificatehome.h34
-rw-r--r--kio/kssl/ksslconnectioninfo.cc6
-rw-r--r--kio/kssl/ksslconnectioninfo.h14
-rw-r--r--kio/kssl/ksslcsessioncache.cc28
-rw-r--r--kio/kssl/ksslcsessioncache.h8
-rw-r--r--kio/kssl/ksslinfodlg.cc208
-rw-r--r--kio/kssl/ksslinfodlg.h30
-rw-r--r--kio/kssl/ksslkeygen.cc22
-rw-r--r--kio/kssl/ksslkeygen.h10
-rw-r--r--kio/kssl/ksslpeerinfo.cc32
-rw-r--r--kio/kssl/ksslpeerinfo.h10
-rw-r--r--kio/kssl/ksslpemcallback.cc2
-rw-r--r--kio/kssl/ksslpkcs12.cc28
-rw-r--r--kio/kssl/ksslpkcs12.h16
-rw-r--r--kio/kssl/ksslpkcs7.cc26
-rw-r--r--kio/kssl/ksslpkcs7.h12
-rw-r--r--kio/kssl/ksslsession.cc12
-rw-r--r--kio/kssl/ksslsession.h6
-rw-r--r--kio/kssl/ksslsettings.cc26
-rw-r--r--kio/kssl/ksslsettings.h12
-rw-r--r--kio/kssl/ksslsigners.cc114
-rw-r--r--kio/kssl/ksslsigners.h18
-rw-r--r--kio/kssl/ksslutils.cc22
-rw-r--r--kio/kssl/ksslutils.h8
-rw-r--r--kio/kssl/ksslx509map.cc30
-rw-r--r--kio/kssl/ksslx509map.h16
-rw-r--r--kio/kssl/ksslx509v3.h2
-rw-r--r--kio/misc/kdesasl/kdesasl.cpp80
-rw-r--r--kio/misc/kdesasl/kdesasl.h28
-rw-r--r--kio/misc/kfile/fileprops.cpp112
-rw-r--r--kio/misc/kfile/fileprops.h46
-rw-r--r--kio/misc/kntlm/des.h2
-rw-r--r--kio/misc/kntlm/kntlm.cpp112
-rw-r--r--kio/misc/kntlm/kntlm.h56
-rw-r--r--kio/misc/kntlm/kswap.h2
-rw-r--r--kio/misc/kpac/discovery.cpp16
-rw-r--r--kio/misc/kpac/discovery.h6
-rw-r--r--kio/misc/kpac/downloader.cpp18
-rw-r--r--kio/misc/kpac/downloader.h18
-rw-r--r--kio/misc/kpac/proxyscout.cpp32
-rw-r--r--kio/misc/kpac/proxyscout.h14
-rw-r--r--kio/misc/kpac/script.cpp24
-rw-r--r--kio/misc/kpac/script.h12
-rw-r--r--kio/misc/ksendbugmail/main.cpp30
-rw-r--r--kio/misc/ksendbugmail/main.h6
-rw-r--r--kio/misc/ksendbugmail/smtp.cpp46
-rw-r--r--kio/misc/ksendbugmail/smtp.h44
-rw-r--r--kio/misc/kssld/kssld.cpp206
-rw-r--r--kio/misc/kssld/kssld.h74
-rw-r--r--kio/misc/ktelnetservice.cpp10
-rw-r--r--kio/misc/kwalletd/kbetterthankdialogbase.ui.h4
-rw-r--r--kio/misc/kwalletd/ktimeout.cpp14
-rw-r--r--kio/misc/kwalletd/ktimeout.h10
-rw-r--r--kio/misc/kwalletd/kwalletd.cpp392
-rw-r--r--kio/misc/kwalletd/kwalletd.h114
-rw-r--r--kio/misc/kwalletd/kwalletwizard.ui.h2
-rw-r--r--kio/misc/uiserver.cpp248
-rw-r--r--kio/misc/uiserver.h82
-rw-r--r--kio/tests/dataprotocoltest.cpp32
-rw-r--r--kio/tests/dummymeta.cpp4
-rw-r--r--kio/tests/dummymeta.h2
-rw-r--r--kio/tests/getalltest.cpp6
-rw-r--r--kio/tests/jobtest.cpp248
-rw-r--r--kio/tests/jobtest.h26
-rw-r--r--kio/tests/kacltest.cpp86
-rw-r--r--kio/tests/kacltest.h2
-rw-r--r--kio/tests/kdcopcheck.cpp28
-rw-r--r--kio/tests/kdcopcheck.h12
-rw-r--r--kio/tests/kdefaultprogresstest.cpp4
-rw-r--r--kio/tests/kdirlistertest.cpp102
-rw-r--r--kio/tests/kdirlistertest.h10
-rw-r--r--kio/tests/kdirwatchtest.cpp16
-rw-r--r--kio/tests/kdirwatchtest.h10
-rw-r--r--kio/tests/kdirwatchunittest.cpp32
-rw-r--r--kio/tests/kdirwatchunittest.h24
-rw-r--r--kio/tests/kfiltertest.cpp34
-rw-r--r--kio/tests/kionetrctest.cpp2
-rw-r--r--kio/tests/kiopassdlgtest.cpp10
-rw-r--r--kio/tests/kioslavetest.cpp138
-rw-r--r--kio/tests/kioslavetest.h70
-rw-r--r--kio/tests/kmfitest.cpp8
-rw-r--r--kio/tests/kmimefromext.cpp2
-rw-r--r--kio/tests/kmimemagictest.cpp2
-rw-r--r--kio/tests/kmimetypetest.cpp22
-rw-r--r--kio/tests/kprotocolinfotest.cpp6
-rw-r--r--kio/tests/kruntest.cpp38
-rw-r--r--kio/tests/kruntest.h8
-rw-r--r--kio/tests/kshredtest.cpp2
-rw-r--r--kio/tests/ksycocatest.cpp82
-rw-r--r--kio/tests/ktartest.cpp22
-rw-r--r--kio/tests/ktradertest.cpp24
-rw-r--r--kio/tests/kurifiltertest.cpp42
-rw-r--r--kio/tests/kurlcompletiontest.cpp30
-rw-r--r--kio/tests/kziptest.cpp60
-rw-r--r--kio/tests/metatest.cpp78
-rw-r--r--kio/tests/netaccesstest.cpp4
-rw-r--r--kio/tests/previewtest.cpp24
-rw-r--r--kio/tests/previewtest.h6
-rw-r--r--kio/tests/speed.cpp22
-rw-r--r--kio/tests/speed.h2
390 files changed, 12304 insertions, 12304 deletions
diff --git a/kio/bookmarks/dptrtemplate.h b/kio/bookmarks/dptrtemplate.h
index 26fd0b3a9..2a69d6a54 100644
--- a/kio/bookmarks/dptrtemplate.h
+++ b/kio/bookmarks/dptrtemplate.h
@@ -22,7 +22,7 @@
#ifndef __dptrtemplate_h__
#define __dptrtemplate_h__
-#include <qptrdict.h>
+#include <tqptrdict.h>
template<class Instance, class PrivateData>
class dPtrTemplate {
@@ -31,7 +31,7 @@ public:
{
if ( !d_ptr ) {
cleanup_d_ptr();
- d_ptr = new QPtrDict<PrivateData>;
+ d_ptr = new TQPtrDict<PrivateData>;
qAddPostRoutine( cleanup_d_ptr );
}
PrivateData* ret = d_ptr->find( (void*) instance );
@@ -51,7 +51,7 @@ private:
{
delete d_ptr;
}
- static QPtrDict<PrivateData>* d_ptr;
+ static TQPtrDict<PrivateData>* d_ptr;
};
#endif
diff --git a/kio/bookmarks/kbookmark.cc b/kio/bookmarks/kbookmark.cc
index 59cf10db3..44b8b496c 100644
--- a/kio/bookmarks/kbookmark.cc
+++ b/kio/bookmarks/kbookmark.cc
@@ -20,7 +20,7 @@
*/
#include "kbookmark.h"
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
#include <kdebug.h>
#include <kmimetype.h>
#include <kstringhandler.h>
@@ -33,16 +33,16 @@
#include <kbookmarkmanager.h>
KBookmarkGroup::KBookmarkGroup()
- : KBookmark( QDomElement() )
+ : KBookmark( TQDomElement() )
{
}
-KBookmarkGroup::KBookmarkGroup( QDomElement elem )
+KBookmarkGroup::KBookmarkGroup( TQDomElement elem )
: KBookmark(elem)
{
}
-QString KBookmarkGroup::groupAddress() const
+TQString KBookmarkGroup::groupAddress() const
{
if (m_address.isEmpty())
m_address = address();
@@ -55,7 +55,7 @@ bool KBookmarkGroup::isOpen() const
}
// Returns first element node equal to or after node n
-static QDomElement firstElement(QDomNode n)
+static TQDomElement firstElement(TQDomNode n)
{
while(!n.isNull() && !n.isElement())
n = n.nextSibling();
@@ -63,7 +63,7 @@ static QDomElement firstElement(QDomNode n)
}
// Returns first element node equal to or before node n
-static QDomElement lastElement(QDomNode n)
+static TQDomElement lastElement(TQDomNode n)
{
while(!n.isNull() && !n.isElement())
n = n.previousSibling();
@@ -85,18 +85,18 @@ KBookmark KBookmarkGroup::next( const KBookmark & current ) const
return KBookmark( nextKnownTag( firstElement(current.element.nextSibling()), true ) );
}
-// KDE4: Change QDomElement to QDomNode so that we can get rid of
+// KDE4: Change TQDomElement to TQDomNode so that we can get rid of
// firstElement() and lastElement()
-QDomElement KBookmarkGroup::nextKnownTag( QDomElement start, bool goNext ) const
+TQDomElement KBookmarkGroup::nextKnownTag( TQDomElement start, bool goNext ) const
{
- static const QString & bookmark = KGlobal::staticQString("bookmark");
- static const QString & folder = KGlobal::staticQString("folder");
- static const QString & separator = KGlobal::staticQString("separator");
+ static const TQString & bookmark = KGlobal::staticQString("bookmark");
+ static const TQString & folder = KGlobal::staticQString("folder");
+ static const TQString & separator = KGlobal::staticQString("separator");
- for( QDomNode n = start; !n.isNull(); )
+ for( TQDomNode n = start; !n.isNull(); )
{
- QDomElement elem = n.toElement();
- QString tag = elem.tagName();
+ TQDomElement elem = n.toElement();
+ TQString tag = elem.tagName();
if (tag == folder || tag == bookmark || tag == separator)
return elem;
if (goNext)
@@ -104,30 +104,30 @@ QDomElement KBookmarkGroup::nextKnownTag( QDomElement start, bool goNext ) const
else
n = n.previousSibling();
}
- return QDomElement();
+ return TQDomElement();
}
-KBookmarkGroup KBookmarkGroup::createNewFolder( KBookmarkManager* mgr, const QString & text, bool emitSignal )
+KBookmarkGroup KBookmarkGroup::createNewFolder( KBookmarkManager* mgr, const TQString & text, bool emitSignal )
{
- QString txt( text );
+ TQString txt( text );
if ( text.isEmpty() )
{
bool ok;
- QString caption = parentGroup().fullText().isEmpty() ?
+ TQString caption = parentGroup().fullText().isEmpty() ?
i18n( "Create New Bookmark Folder" ) :
i18n( "Create New Bookmark Folder in %1" )
.arg( parentGroup().text() );
txt = KInputDialog::getText( caption, i18n( "New folder:" ),
- QString::null, &ok );
+ TQString::null, &ok );
if ( !ok )
return KBookmarkGroup();
}
Q_ASSERT(!element.isNull());
- QDomDocument doc = element.ownerDocument();
- QDomElement groupElem = doc.createElement( "folder" );
+ TQDomDocument doc = element.ownerDocument();
+ TQDomElement groupElem = doc.createElement( "folder" );
element.appendChild( groupElem );
- QDomElement textElem = doc.createElement( "title" );
+ TQDomElement textElem = doc.createElement( "title" );
groupElem.appendChild( textElem );
textElem.appendChild( doc.createTextNode( txt ) );
@@ -145,25 +145,25 @@ KBookmarkGroup KBookmarkGroup::createNewFolder( KBookmarkManager* mgr, const QSt
KBookmark KBookmarkGroup::createNewSeparator()
{
Q_ASSERT(!element.isNull());
- QDomDocument doc = element.ownerDocument();
+ TQDomDocument doc = element.ownerDocument();
Q_ASSERT(!doc.isNull());
- QDomElement sepElem = doc.createElement( "separator" );
+ TQDomElement sepElem = doc.createElement( "separator" );
element.appendChild( sepElem );
return KBookmark(sepElem);
}
bool KBookmarkGroup::moveItem( const KBookmark & item, const KBookmark & after )
{
- QDomNode n;
+ TQDomNode n;
if ( !after.isNull() )
n = element.insertAfter( item.element, after.element );
else // first child
{
if ( element.firstChild().isNull() ) // Empty element -> set as real first child
- n = element.insertBefore( item.element, QDomElement() );
+ n = element.insertBefore( item.element, TQDomElement() );
// we have to skip everything up to the first valid child
- QDomElement firstChild = nextKnownTag(element.firstChild().toElement(), true);
+ TQDomElement firstChild = nextKnownTag(element.firstChild().toElement(), true);
if ( !firstChild.isNull() )
n = element.insertBefore( item.element, firstChild );
else
@@ -192,18 +192,18 @@ KBookmark KBookmarkGroup::addBookmark( KBookmarkManager* mgr, const KBookmark &b
return bm;
}
-KBookmark KBookmarkGroup::addBookmark( KBookmarkManager* mgr, const QString & text, const KURL & url, const QString & icon, bool emitSignal )
+KBookmark KBookmarkGroup::addBookmark( KBookmarkManager* mgr, const TQString & text, const KURL & url, const TQString & icon, bool emitSignal )
{
//kdDebug(7043) << "KBookmarkGroup::addBookmark " << text << " into " << m_address << endl;
- QDomDocument doc = element.ownerDocument();
- QDomElement elem = doc.createElement( "bookmark" );
+ TQDomDocument doc = element.ownerDocument();
+ TQDomElement elem = doc.createElement( "bookmark" );
elem.setAttribute( "href", url.url( 0, 106 ) ); // write utf8 URL (106 is mib enum for utf8)
- QString _icon = icon;
+ TQString _icon = icon;
if ( _icon.isEmpty() )
_icon = KMimeType::iconForURL( url );
elem.setAttribute( "icon", _icon );
- QDomElement textElem = doc.createElement( "title" );
+ TQDomElement textElem = doc.createElement( "title" );
elem.appendChild( textElem );
textElem.appendChild( doc.createTextNode( text ) );
@@ -220,13 +220,13 @@ bool KBookmarkGroup::isToolbarGroup() const
return ( element.attribute("toolbar") == "yes" );
}
-QDomElement KBookmarkGroup::findToolbar() const
+TQDomElement KBookmarkGroup::findToolbar() const
{
if ( element.attribute("toolbar") == "yes" )
return element;
- for (QDomNode n = element.firstChild(); !n.isNull() ; n = n.nextSibling() )
+ for (TQDomNode n = element.firstChild(); !n.isNull() ; n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
// Search among the "folder" children only
if ( e.tagName() == "folder" )
{
@@ -234,18 +234,18 @@ QDomElement KBookmarkGroup::findToolbar() const
return e;
else
{
- QDomElement result = KBookmarkGroup(e).findToolbar();
+ TQDomElement result = KBookmarkGroup(e).findToolbar();
if (!result.isNull())
return result;
}
}
}
- return QDomElement();
+ return TQDomElement();
}
-QValueList<KURL> KBookmarkGroup::groupUrlList() const
+TQValueList<KURL> KBookmarkGroup::groupUrlList() const
{
- QValueList<KURL> urlList;
+ TQValueList<KURL> urlList;
for ( KBookmark bm = first(); !bm.isNull(); bm = next(bm) )
{
if ( bm.isSeparator() || bm.isGroup() )
@@ -259,7 +259,7 @@ QValueList<KURL> KBookmarkGroup::groupUrlList() const
bool KBookmark::isGroup() const
{
- QString tag = element.tagName();
+ TQString tag = element.tagName();
return ( tag == "folder"
|| tag == "xbel" ); // don't forget the toplevel group
}
@@ -271,16 +271,16 @@ bool KBookmark::isSeparator() const
bool KBookmark::hasParent() const
{
- QDomElement parent = element.parentNode().toElement();
+ TQDomElement parent = element.parentNode().toElement();
return !parent.isNull();
}
-QString KBookmark::text() const
+TQString KBookmark::text() const
{
return KStringHandler::csqueeze( fullText() );
}
-QString KBookmark::fullText() const
+TQString KBookmark::fullText() const
{
if (isSeparator())
return i18n("--- separator ---");
@@ -293,9 +293,9 @@ KURL KBookmark::url() const
return KURL(element.attribute("href"), 106); // Decode it from utf8 (106 is mib enum for utf8)
}
-QString KBookmark::icon() const
+TQString KBookmark::icon() const
{
- QString icon = element.attribute("icon");
+ TQString icon = element.attribute("icon");
if ( icon.isEmpty() )
// Default icon depends on URL for bookmarks, and is default directory
// icon for groups.
@@ -320,10 +320,10 @@ KBookmarkGroup KBookmark::toGroup() const
return KBookmarkGroup(element);
}
-QString KBookmark::address() const
+TQString KBookmark::address() const
{
if ( element.tagName() == "xbel" )
- return ""; // not QString::null !
+ return ""; // not TQString::null !
else
{
// Use keditbookmarks's DEBUG_ADDRESSES flag to debug this code :)
@@ -333,44 +333,44 @@ QString KBookmark::address() const
return "ERROR"; // Avoid an infinite loop
}
KBookmarkGroup group = parentGroup();
- QString parentAddress = group.address();
+ TQString parentAddress = group.address();
uint counter = 0;
// Implementation note: we don't use QDomNode's childNode list because we
// would have to skip "TEXT", which KBookmarkGroup already does for us.
for ( KBookmark bk = group.first() ; !bk.isNull() ; bk = group.next(bk), ++counter )
{
if ( bk.element == element )
- return parentAddress + "/" + QString::number(counter);
+ return parentAddress + "/" + TQString::number(counter);
}
kdWarning() << "KBookmark::address : this can't happen! " << parentAddress << endl;
return "ERROR";
}
}
-KBookmark KBookmark::standaloneBookmark( const QString & text, const KURL & url, const QString & icon )
+KBookmark KBookmark::standaloneBookmark( const TQString & text, const KURL & url, const TQString & icon )
{
- QDomDocument doc("xbel");
- QDomElement elem = doc.createElement("xbel");
+ TQDomDocument doc("xbel");
+ TQDomElement elem = doc.createElement("xbel");
doc.appendChild( elem );
KBookmarkGroup grp( elem );
grp.addBookmark( 0L, text, url, icon, false );
return grp.first();
}
-// For some strange reason QString("").left(0) returns QString::null;
+// For some strange reason TQString("").left(0) returns TQString::null;
// That breaks commonParent()
-QString KBookmark::left(const QString & str, uint len)
+TQString KBookmark::left(const TQString & str, uint len)
{
- //kdDebug()<<"********"<<QString("").left(0).isNull()<<endl;
+ //kdDebug()<<"********"<<TQString("").left(0).isNull()<<endl;
if(len == 0)
- return QString("");
+ return TQString("");
else
return str.left(len);
}
-QString KBookmark::commonParent(QString A, QString B)
+TQString KBookmark::commonParent(TQString A, TQString B)
{
- QString error("ERROR");
+ TQString error("ERROR");
if(A == error || B == error)
return error;
@@ -389,9 +389,9 @@ QString KBookmark::commonParent(QString A, QString B)
return left(A, lastCommonSlash);
}
-static QDomNode cd_or_create(QDomNode node, QString name)
+static TQDomNode cd_or_create(TQDomNode node, TQString name)
{
- QDomNode subnode = node.namedItem(name);
+ TQDomNode subnode = node.namedItem(name);
if (subnode.isNull())
{
subnode = node.ownerDocument().createElement(name);
@@ -400,9 +400,9 @@ static QDomNode cd_or_create(QDomNode node, QString name)
return subnode;
}
-static QDomText get_or_create_text(QDomNode node)
+static TQDomText get_or_create_text(TQDomNode node)
{
- QDomNode subnode = node.firstChild();
+ TQDomNode subnode = node.firstChild();
if (subnode.isNull())
{
subnode = node.ownerDocument().createTextNode("");
@@ -412,14 +412,14 @@ static QDomText get_or_create_text(QDomNode node)
}
// Look for a metadata with owner="http://www.kde.org" or without any owner (for compatibility)
-static QDomNode findOrCreateMetadata( QDomNode& parent )
+static TQDomNode findOrCreateMetadata( TQDomNode& parent )
{
static const char kdeOwner[] = "http://www.kde.org";
- QDomElement metadataElement;
- for ( QDomNode _node = parent.firstChild(); !_node.isNull(); _node = _node.nextSibling() ) {
- QDomElement elem = _node.toElement();
+ TQDomElement metadataElement;
+ for ( TQDomNode _node = parent.firstChild(); !_node.isNull(); _node = _node.nextSibling() ) {
+ TQDomElement elem = _node.toElement();
if ( !elem.isNull() && elem.tagName() == "metadata" ) {
- const QString owner = elem.attribute( "owner" );
+ const TQString owner = elem.attribute( "owner" );
if ( owner == kdeOwner )
return elem;
if ( owner.isEmpty() )
@@ -439,7 +439,7 @@ bool KBookmark::hasMetaData() const
// ### NOTE: this code creates <info> and <metadata>, despite its name and the const.
// It doesn't matter much in practice since it's only called for newly-created bookmarks,
// which will get metadata soon after anyway.
- QDomNode n = cd_or_create( internalElement(), "info" );
+ TQDomNode n = cd_or_create( internalElement(), "info" );
return findOrCreateMetadata( n ).hasChildNodes();
}
@@ -447,44 +447,44 @@ void KBookmark::updateAccessMetadata()
{
kdDebug(7043) << "KBookmark::updateAccessMetadata " << address() << " " << url().prettyURL() << endl;
- const uint timet = QDateTime::currentDateTime().toTime_t();
- setMetaDataItem( "time_added", QString::number( timet ), DontOverwriteMetaData );
- setMetaDataItem( "time_visited", QString::number( timet ) );
+ const uint timet = TQDateTime::currentDateTime().toTime_t();
+ setMetaDataItem( "time_added", TQString::number( timet ), DontOverwriteMetaData );
+ setMetaDataItem( "time_visited", TQString::number( timet ) );
- QString countStr = metaDataItem( "visit_count" ); // TODO use spec'ed name
+ TQString countStr = metaDataItem( "visit_count" ); // TODO use spec'ed name
bool ok;
int currentCount = countStr.toInt(&ok);
if (!ok)
currentCount = 0;
currentCount++;
- setMetaDataItem( "visit_count", QString::number( currentCount ) );
+ setMetaDataItem( "visit_count", TQString::number( currentCount ) );
// TODO - for 4.0 - time_modified
}
-QString KBookmark::metaDataItem( const QString &key ) const
+TQString KBookmark::metaDataItem( const TQString &key ) const
{
- QDomNode infoNode = cd_or_create( internalElement(), "info" );
+ TQDomNode infoNode = cd_or_create( internalElement(), "info" );
infoNode = findOrCreateMetadata( infoNode );
- for ( QDomNode n = infoNode.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = infoNode.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( !n.isElement() ) {
continue;
}
- const QDomElement e = n.toElement();
+ const TQDomElement e = n.toElement();
if ( e.tagName() == key ) {
return e.text();
}
}
- return QString::null;
+ return TQString::null;
}
-void KBookmark::setMetaDataItem( const QString &key, const QString &value, MetaDataOverwriteMode mode )
+void KBookmark::setMetaDataItem( const TQString &key, const TQString &value, MetaDataOverwriteMode mode )
{
- QDomNode infoNode = cd_or_create( internalElement(), "info" );
+ TQDomNode infoNode = cd_or_create( internalElement(), "info" );
infoNode = findOrCreateMetadata( infoNode );
- QDomNode item = cd_or_create( infoNode, key );
- QDomText text = get_or_create_text( item );
+ TQDomNode item = cd_or_create( infoNode, key );
+ TQDomText text = get_or_create_text( item );
if ( mode == DontOverwriteMetaData && !text.data().isEmpty() ) {
return;
}
@@ -495,7 +495,7 @@ void KBookmark::setMetaDataItem( const QString &key, const QString &value, MetaD
void KBookmarkGroupTraverser::traverse(const KBookmarkGroup &root)
{
// non-recursive bookmark iterator
- QValueStack<KBookmarkGroup> stack;
+ TQValueStack<KBookmarkGroup> stack;
stack.push(root);
KBookmark bk = stack.top().first();
for (;;) {
diff --git a/kio/bookmarks/kbookmark.h b/kio/bookmarks/kbookmark.h
index 9cb9b1fdf..84f177522 100644
--- a/kio/bookmarks/kbookmark.h
+++ b/kio/bookmarks/kbookmark.h
@@ -20,9 +20,9 @@
#ifndef __kbookmark_h
#define __kbookmark_h
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
#include <kurl.h>
class KBookmarkManager;
@@ -37,9 +37,9 @@ public:
};
KBookmark( ) {}
- KBookmark( QDomElement elem ) : element(elem) {}
+ KBookmark( TQDomElement elem ) : element(elem) {}
- static KBookmark standaloneBookmark( const QString & text, const KURL & url, const QString & icon = QString::null );
+ static KBookmark standaloneBookmark( const TQString & text, const KURL & url, const TQString & icon = TQString::null );
/**
* Whether the bookmark is a group or a normal bookmark
@@ -59,7 +59,7 @@ public:
bool isNull() const {return element.isNull();}
/**
- * @return true if bookmark is contained by a QDomDocument,
+ * @return true if bookmark is contained by a TQDomDocument,
* if not it is most likely that it has become separated and
* is thus invalid and/or has been deleted from the bookmarks.
* @since 3.2
@@ -71,12 +71,12 @@ public:
* If bigger than 40, the text is shortened by
* replacing middle characters with "..." (see KStringHandler::csqueeze)
*/
- QString text() const;
+ TQString text() const;
/**
* Text shown for the bookmark, not truncated.
* You should not use this - this is mainly for keditbookmarks.
*/
- QString fullText() const;
+ TQString fullText() const;
/**
* URL contained by the bookmark
*/
@@ -85,7 +85,7 @@ public:
* @return the pixmap file for this bookmark
* (i.e. the name of the icon)
*/
- QString icon() const;
+ TQString icon() const;
/**
* @return the group containing this bookmark
@@ -104,7 +104,7 @@ public:
* in a given bookmark. The encoding of the address is "/4/2", for
* instance, to design the 2nd child inside the 4th child of the root bk.
*/
- QString address() const;
+ TQString address() const;
// Hard to decide. Good design would imply that each bookmark
// knows about its manager, so that there can be several managers.
@@ -115,7 +115,7 @@ public:
/**
* @internal for KEditBookmarks
*/
- QDomElement internalElement() const { return element; }
+ TQDomElement internalElement() const { return element; }
/**
* Updates the bookmarks access metadata
@@ -129,47 +129,47 @@ public:
/**
* @return address of parent
*/
- static QString parentAddress( const QString & address )
+ static TQString parentAddress( const TQString & address )
{ return address.left( address.findRev('/') ); }
/**
* @return position in parent (e.g. /4/5/2 -> 2)
*/
- static uint positionInParent( const QString & address )
+ static uint positionInParent( const TQString & address )
{ return address.mid( address.findRev('/') + 1 ).toInt(); }
/**
* @return address of previous sibling (e.g. /4/5/2 -> /4/5/1)
- * Returns QString::null for a first child
+ * Returns TQString::null for a first child
*/
- static QString previousAddress( const QString & address )
+ static TQString previousAddress( const TQString & address )
{
uint pp = positionInParent(address);
- return pp>0 ? parentAddress(address) + '/' + QString::number(pp-1) : QString::null;
+ return pp>0 ? parentAddress(address) + '/' + TQString::number(pp-1) : TQString::null;
}
/**
* @return address of next sibling (e.g. /4/5/2 -> /4/5/3)
* This doesn't check whether it actually exists
*/
- static QString nextAddress( const QString & address )
- { return parentAddress(address) + '/' + QString::number(positionInParent(address)+1); }
+ static TQString nextAddress( const TQString & address )
+ { return parentAddress(address) + '/' + TQString::number(positionInParent(address)+1); }
/**
* @return the common parent of both addresses which
* has the greatest depth
* @since 3.5
*/
- static QString commonParent(QString A, QString B);
+ static TQString commonParent(TQString A, TQString B);
/**
* Get the value of a specific metadata item.
* @param key Name of the metadata item
- * @return Value of the metadata item. QString::null is returned in case
+ * @return Value of the metadata item. TQString::null is returned in case
* the specified key does not exist.
* @since 3.4
*/
- QString metaDataItem( const QString &key ) const;
+ TQString metaDataItem( const TQString &key ) const;
/**
* Change the value of a specific metadata item, or create the given item
@@ -179,18 +179,18 @@ public:
* @param mode Whether to overwrite the item's value if it exists already or not.
* @since 3.4
*/
- void setMetaDataItem( const QString &key, const QString &value, MetaDataOverwriteMode mode = OverwriteMetaData );
+ void setMetaDataItem( const TQString &key, const TQString &value, MetaDataOverwriteMode mode = OverwriteMetaData );
protected:
- QDomElement element;
+ TQDomElement element;
// Note: you can't add new member variables here.
// The KBookmarks are created on the fly, as wrappers
// around internal QDomElements. Any additional information
- // has to be implemented as an attribute of the QDomElement.
+ // has to be implemented as an attribute of the TQDomElement.
private:
bool hasMetaData() const;
- static QString left(const QString & str, uint len);
+ static TQString left(const TQString & str, uint len);
};
/**
@@ -200,7 +200,7 @@ class KIO_EXPORT KBookmarkGroup : public KBookmark
{
public:
/**
- * Create an invalid group. This is mostly for use in QValueList,
+ * Create an invalid group. This is mostly for use in TQValueList,
* and other places where we need a null group.
* Also used as a parent for a bookmark that doesn't have one
* (e.g. Netscape bookmarks)
@@ -210,13 +210,13 @@ public:
/**
* Create a bookmark group as specified by the given element
*/
- KBookmarkGroup( QDomElement elem );
+ KBookmarkGroup( TQDomElement elem );
/**
* Much like KBookmark::address, but caches the
* address into m_address.
*/
- QString groupAddress() const;
+ TQString groupAddress() const;
/**
* @return true if the bookmark folder is opened in the bookmark editor
@@ -244,7 +244,7 @@ public:
* @param text for the folder. If empty, the user will be queried for it.
* @param emitSignal if true emit KBookmarkNotifier signal
*/
- KBookmarkGroup createNewFolder( KBookmarkManager* mgr, const QString & text = QString::null, bool emitSignal = true );
+ KBookmarkGroup createNewFolder( KBookmarkManager* mgr, const TQString & text = TQString::null, bool emitSignal = true );
/**
* Create a new bookmark separator
* Don't forget to use KBookmarkManager::self()->emitChanged( parentBookmark );
@@ -271,7 +271,7 @@ public:
* will be determined from the URL if not specified.
* @param emitSignal if true emit KBookmarkNotifier signal
*/
- KBookmark addBookmark( KBookmarkManager* mgr, const QString & text, const KURL & url, const QString & icon = QString::null, bool emitSignal = true );
+ KBookmark addBookmark( KBookmarkManager* mgr, const TQString & text, const KURL & url, const TQString & icon = TQString::null, bool emitSignal = true );
/**
* Moves @p item after @p after (which should be a child of ours).
@@ -293,23 +293,23 @@ public:
/**
* @internal
*/
- QDomElement findToolbar() const;
+ TQDomElement findToolbar() const;
/**
* @return the list of urls of bookmarks at top level of the group
* @since 3.2
*/
- QValueList<KURL> groupUrlList() const;
+ TQValueList<KURL> groupUrlList() const;
protected:
- QDomElement nextKnownTag( QDomElement start, bool goNext ) const;
+ TQDomElement nextKnownTag( TQDomElement start, bool goNext ) const;
private:
- mutable QString m_address;
+ mutable TQString m_address;
// Note: you can't add other member variables here, except for caching info.
// The KBookmarks are created on the fly, as wrappers
// around internal QDomElements. Any additional information
- // has to be implemented as an attribute of the QDomElement.
+ // has to be implemented as an attribute of the TQDomElement.
};
/**
diff --git a/kio/bookmarks/kbookmarkbar.cc b/kio/bookmarks/kbookmarkbar.cc
index d71069014..ec1e3e670 100644
--- a/kio/bookmarks/kbookmarkbar.cc
+++ b/kio/bookmarks/kbookmarkbar.cc
@@ -19,8 +19,8 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <kbookmarkbar.h>
#include <kbookmarkdrag.h>
@@ -40,19 +40,19 @@
#include "dptrtemplate.h"
-#include <qapplication.h>
+#include <tqapplication.h>
class KBookmarkBarPrivate : public dPtrTemplate<KBookmarkBar, KBookmarkBarPrivate>
{
public:
- QPtrList<KAction> m_actions;
+ TQPtrList<KAction> m_actions;
bool m_readOnly;
KBookmarkManager* m_filteredMgr;
KToolBar* m_sepToolBar;
int m_sepIndex;
bool m_atFirst;
- QString m_dropAddress;
- QString m_highlightedAddress;
+ TQString m_dropAddress;
+ TQString m_highlightedAddress;
public:
KBookmarkBarPrivate() {
m_readOnly = false;
@@ -62,7 +62,7 @@ public:
m_atFirst = false;
}
};
-template<> QPtrDict<KBookmarkBarPrivate>* dPtrTemplate<KBookmarkBar, KBookmarkBarPrivate>::d_ptr = 0;
+template<> TQPtrDict<KBookmarkBarPrivate>* dPtrTemplate<KBookmarkBar, KBookmarkBarPrivate>::d_ptr = 0;
KBookmarkBarPrivate* KBookmarkBar::dptr() const
{
@@ -87,8 +87,8 @@ private:
KBookmarkBar::KBookmarkBar( KBookmarkManager* mgr,
KBookmarkOwner *_owner, KToolBar *_toolBar,
KActionCollection *coll,
- QObject *parent, const char *name )
- : QObject( parent, name ), m_pOwner(_owner), m_toolBar(_toolBar),
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ), m_pOwner(_owner), m_toolBar(_toolBar),
m_actionCollection( coll ), m_pManager(mgr)
{
m_lstSubMenus.setAutoDelete( true );
@@ -98,16 +98,16 @@ KBookmarkBar::KBookmarkBar( KBookmarkManager* mgr,
dptr()->m_actions.setAutoDelete( true );
- connect( mgr, SIGNAL( changed(const QString &, const QString &) ),
- SLOT( slotBookmarksChanged(const QString &) ) );
+ connect( mgr, TQT_SIGNAL( changed(const TQString &, const TQString &) ),
+ TQT_SLOT( slotBookmarksChanged(const TQString &) ) );
KBookmarkGroup toolbar = getToolbar();
fillBookmarkBar( toolbar );
}
-QString KBookmarkBar::parentAddress()
+TQString KBookmarkBar::parentAddress()
{
- return dptr()->m_filteredMgr ? QString::null : m_pManager->toolbar().address();
+ return dptr()->m_filteredMgr ? TQString::null : m_pManager->toolbar().address();
}
#define CURRENT_TOOLBAR() ( \
@@ -126,10 +126,10 @@ KBookmarkGroup KBookmarkBar::getToolbar()
dptr()->m_filteredMgr = KBookmarkManager::createTempManager();
} else {
KBookmarkGroup bkRoot = dptr()->m_filteredMgr->root();
- QValueList<KBookmark> bks;
+ TQValueList<KBookmark> bks;
for (KBookmark bm = bkRoot.first(); !bm.isNull(); bm = bkRoot.next(bm))
bks << bm;
- for ( QValueListConstIterator<KBookmark> it = bks.begin(); it != bks.end(); ++it )
+ for ( TQValueListConstIterator<KBookmark> it = bks.begin(); it != bks.end(); ++it )
bkRoot.deleteBookmark( (*it) );
}
ToolbarFilter filter;
@@ -150,7 +150,7 @@ KBookmarkBar::~KBookmarkBar()
void KBookmarkBar::clear()
{
- QPtrListIterator<KAction> it( dptr()->m_actions );
+ TQPtrListIterator<KAction> it( dptr()->m_actions );
m_toolBar->clear();
for (; it.current(); ++it ) {
(*it)->unplugAll();
@@ -159,7 +159,7 @@ void KBookmarkBar::clear()
m_lstSubMenus.clear();
}
-void KBookmarkBar::slotBookmarksChanged( const QString & group )
+void KBookmarkBar::slotBookmarksChanged( const TQString & group )
{
KBookmarkGroup tb = getToolbar(); // heavy for non cached toolbar version
kdDebug(7043) << "slotBookmarksChanged( " << group << " )" << endl;
@@ -176,7 +176,7 @@ void KBookmarkBar::slotBookmarksChanged( const QString & group )
else
{
// Iterate recursively into child menus
- QPtrListIterator<KBookmarkMenu> it( m_lstSubMenus );
+ TQPtrListIterator<KBookmarkMenu> it( m_lstSubMenus );
for (; it.current(); ++it )
{
it.current()->slotBookmarksChanged( group );
@@ -191,7 +191,7 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent)
for (KBookmark bm = parent.first(); !bm.isNull(); bm = parent.next(bm))
{
- QString text = bm.text();
+ TQString text = bm.text();
text.replace( '&', "&&" );
if (!bm.isGroup())
{
@@ -200,8 +200,8 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent)
else
{
KAction *action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 );
- connect(action, SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
- this, SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
+ connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
+ this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
action->setProperty( "url", bm.url().url() );
action->setProperty( "address", bm.address() );
@@ -229,10 +229,10 @@ void KBookmarkBar::fillBookmarkBar(KBookmarkGroup & parent)
KBookmarkMenu *menu = new KBookmarkMenu(CURRENT_MANAGER(), m_pOwner, action->popupMenu(),
m_actionCollection, false, addEntriesBookmarkBar,
bm.address());
- connect(menu, SIGNAL( aboutToShowContextMenu(const KBookmark &, QPopupMenu * ) ),
- this, SIGNAL( aboutToShowContextMenu(const KBookmark &, QPopupMenu * ) ));
- connect(menu, SIGNAL( openBookmark( const QString &, Qt::ButtonState) ),
- this, SIGNAL( openBookmark( const QString &, Qt::ButtonState) ));
+ connect(menu, TQT_SIGNAL( aboutToShowContextMenu(const KBookmark &, TQPopupMenu * ) ),
+ this, TQT_SIGNAL( aboutToShowContextMenu(const KBookmark &, TQPopupMenu * ) ));
+ connect(menu, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState) ),
+ this, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState) ));
menu->fillBookmarkMenu();
action->plug(m_toolBar);
m_lstSubMenus.append( menu );
@@ -259,7 +259,7 @@ void KBookmarkBar::slotBookmarkSelected( KAction::ActivationReason /*reason*/, Q
const KAction* action = dynamic_cast<const KAction *>(sender());
if(action)
{
- const QString & url = sender()->property("url").toString();
+ const TQString & url = sender()->property("url").toString();
m_pOwner->openBookmarkURL(url);
emit openBookmark( url, state );
}
@@ -282,9 +282,9 @@ static void removeTempSep(KBookmarkBarPrivate* p)
}
}
-static KAction* findPluggedAction(QPtrList<KAction> actions, KToolBar *tb, int id)
+static KAction* findPluggedAction(TQPtrList<KAction> actions, KToolBar *tb, int id)
{
- QPtrListIterator<KAction> it( actions );
+ TQPtrListIterator<KAction> it( actions );
for (; (*it); ++it )
if ((*it)->isPlugged(tb, id))
return (*it);
@@ -292,17 +292,17 @@ static KAction* findPluggedAction(QPtrList<KAction> actions, KToolBar *tb, int i
}
/**
- * Handle a QDragMoveEvent event on a toolbar drop
+ * Handle a TQDragMoveEvent event on a toolbar drop
* @return the address of the bookmark to be dropped after/before
- * else a QString::null if event should be ignored
- * @param pos the current QDragMoveEvent position
+ * else a TQString::null if event should be ignored
+ * @param pos the current TQDragMoveEvent position
* @param the toolbar
* @param actions the list of actions plugged into the bar
* @param atFirst bool reference, when true the position before the
* returned action was dropped on
*/
-static QString handleToolbarDragMoveEvent(
- KBookmarkBarPrivate *p, KToolBar *tb, QPoint pos, QPtrList<KAction> actions,
+static TQString handleToolbarDragMoveEvent(
+ KBookmarkBarPrivate *p, KToolBar *tb, TQPoint pos, TQPtrList<KAction> actions,
bool &atFirst, KBookmarkManager *mgr
) {
Q_UNUSED( mgr );
@@ -315,13 +315,13 @@ static QString handleToolbarDragMoveEvent(
b = dynamic_cast<KToolBarButton*>(tb->childAt(pos));
KAction *a = 0;
- QString address;
+ TQString address;
atFirst = false;
if (b)
{
index = tb->itemIndex(b->id());
- QRect r = b->geometry();
+ TQRect r = b->geometry();
if (pos.x() < ((r.left() + r.right())/2))
{
// if in first half of button then
@@ -356,7 +356,7 @@ static QString handleToolbarDragMoveEvent(
}
if ( !b )
- return QString::null; // TODO Make it works for that case
+ return TQString::null; // TODO Make it works for that case
a = findPluggedAction(actions, tb, b->id());
Q_ASSERT(a);
@@ -382,8 +382,8 @@ skipact:
}
// TODO - document!!!!
-static KAction* handleToolbarMouseButton(QPoint pos, QPtrList<KAction> actions,
- KBookmarkManager * /*mgr*/, QPoint & pt)
+static KAction* handleToolbarMouseButton(TQPoint pos, TQPtrList<KAction> actions,
+ KBookmarkManager * /*mgr*/, TQPoint & pt)
{
KAction *act = actions.first();
if (!act) {
@@ -413,7 +413,7 @@ static KAction* handleToolbarMouseButton(QPoint pos, QPtrList<KAction> actions,
// don't *ever* show the rmb on press, always relase, possible???
class KBookmarkBarRMBAssoc : public dPtrTemplate<KBookmarkBar, RMB> { };
-template<> QPtrDict<RMB>* dPtrTemplate<KBookmarkBar, RMB>::d_ptr = 0;
+template<> TQPtrDict<RMB>* dPtrTemplate<KBookmarkBar, RMB>::d_ptr = 0;
static RMB* rmbSelf(KBookmarkBar *m) { return KBookmarkBarRMBAssoc::d(m); }
@@ -443,17 +443,17 @@ void KBookmarkBar::slotRMBActionRemove( int val )
void KBookmarkBar::slotRMBActionCopyLocation( int val )
{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionCopyLocation( val ); }
-bool KBookmarkBar::eventFilter( QObject *o, QEvent *e )
+bool KBookmarkBar::eventFilter( TQObject *o, TQEvent *e )
{
if (dptr()->m_readOnly || dptr()->m_filteredMgr) // note, we assume m_pManager in various places,
// this shouldn't really be the case
return false; // todo: make this limit the actions
- if ( (e->type() == QEvent::MouseButtonRelease) || (e->type() == QEvent::MouseButtonPress) ) // FIXME, which one?
+ if ( (e->type() == TQEvent::MouseButtonRelease) || (e->type() == TQEvent::MouseButtonPress) ) // FIXME, which one?
{
- QMouseEvent *mev = (QMouseEvent*)e;
+ TQMouseEvent *mev = (TQMouseEvent*)e;
- QPoint pt;
+ TQPoint pt;
KAction *_a;
// FIXME, see how this holds up on an empty toolbar
@@ -473,18 +473,18 @@ bool KBookmarkBar::eventFilter( QObject *o, QEvent *e )
return !!_a; // ignore the event if we didn't find the button
}
- else if ( e->type() == QEvent::DragLeave )
+ else if ( e->type() == TQEvent::DragLeave )
{
removeTempSep(dptr());
- dptr()->m_dropAddress = QString::null;
+ dptr()->m_dropAddress = TQString::null;
}
- else if ( e->type() == QEvent::Drop )
+ else if ( e->type() == TQEvent::Drop )
{
removeTempSep(dptr());
- QDropEvent *dev = (QDropEvent*)e;
+ TQDropEvent *dev = (TQDropEvent*)e;
if ( !KBookmarkDrag::canDecode( dev ) )
return false;
- QValueList<KBookmark> list = KBookmarkDrag::decode( dev );
+ TQValueList<KBookmark> list = KBookmarkDrag::decode( dev );
if (list.count() > 1)
kdWarning(7043) << "Sorry, currently you can only drop one address "
"onto the bookmark bar!" << endl;
@@ -492,7 +492,7 @@ bool KBookmarkBar::eventFilter( QObject *o, QEvent *e )
KBookmark bookmark = m_pManager->findByAddress( dptr()->m_dropAddress );
Q_ASSERT(!bookmark.isNull());
kdDebug(7043) << "inserting "
- << QString(dptr()->m_atFirst ? "before" : "after")
+ << TQString(dptr()->m_atFirst ? "before" : "after")
<< " dptr()->m_dropAddress == " << dptr()->m_dropAddress << endl;
KBookmarkGroup parentBookmark = bookmark.parentGroup();
Q_ASSERT(!parentBookmark.isNull());
@@ -503,13 +503,13 @@ bool KBookmarkBar::eventFilter( QObject *o, QEvent *e )
m_pManager->emitChanged( parentBookmark );
return true;
}
- else if ( e->type() == QEvent::DragMove )
+ else if ( e->type() == TQEvent::DragMove )
{
- QDragMoveEvent *dme = (QDragMoveEvent*)e;
+ TQDragMoveEvent *dme = (TQDragMoveEvent*)e;
if (!KBookmarkDrag::canDecode( dme ))
return false;
bool _atFirst;
- QString dropAddress;
+ TQString dropAddress;
KToolBar *tb = (KToolBar*)o;
dropAddress = handleToolbarDragMoveEvent(dptr(), tb, dme->pos(), dptr()->m_actions, _atFirst, m_pManager);
if (!dropAddress.isNull())
diff --git a/kio/bookmarks/kbookmarkbar.h b/kio/bookmarks/kbookmarkbar.h
index 162d045bb..f8d2f689e 100644
--- a/kio/bookmarks/kbookmarkbar.h
+++ b/kio/bookmarks/kbookmarkbar.h
@@ -21,9 +21,9 @@
#ifndef KBOOKMARKBAR_H
#define KBOOKMARKBAR_H
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
#include <kbookmark.h>
#include <kaction.h>
@@ -59,7 +59,7 @@ public:
KBookmarkBar( KBookmarkManager* manager,
KBookmarkOwner *owner, KToolBar *toolBar,
KActionCollection *,
- QObject *parent = 0L, const char *name = 0L);
+ TQObject *parent = 0L, const char *name = 0L);
virtual ~KBookmarkBar();
@@ -76,22 +76,22 @@ public:
/**
* @since 3.2
*/
- QString parentAddress();
+ TQString parentAddress();
signals:
/**
* @since 3.2
*/
- void aboutToShowContextMenu( const KBookmark &, QPopupMenu * );
+ void aboutToShowContextMenu( const KBookmark &, TQPopupMenu * );
/**
* @since 3.4
*/
- void openBookmark( const QString& url, Qt::ButtonState state );
+ void openBookmark( const TQString& url, Qt::ButtonState state );
public slots:
void clear();
- void slotBookmarksChanged( const QString & );
+ void slotBookmarksChanged( const TQString & );
void slotBookmarkSelected();
/**
@@ -112,16 +112,16 @@ public slots:
protected:
void fillBookmarkBar( KBookmarkGroup & parent );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
private:
KBookmarkGroup getToolbar();
KBookmarkOwner *m_pOwner;
- QGuardedPtr<KToolBar> m_toolBar;
+ TQGuardedPtr<KToolBar> m_toolBar;
KActionCollection *m_actionCollection;
KBookmarkManager *m_pManager;
- QPtrList<KBookmarkMenu> m_lstSubMenus;
+ TQPtrList<KBookmarkMenu> m_lstSubMenus;
private:
class KBookmarkBarPrivate* dptr() const;
diff --git a/kio/bookmarks/kbookmarkdombuilder.cc b/kio/bookmarks/kbookmarkdombuilder.cc
index 7b6bad4e6..5c0882d05 100644
--- a/kio/bookmarks/kbookmarkdombuilder.cc
+++ b/kio/bookmarks/kbookmarkdombuilder.cc
@@ -35,37 +35,37 @@ KBookmarkDomBuilder::~KBookmarkDomBuilder() {
m_stack.clear();
}
-void KBookmarkDomBuilder::connectImporter(const QObject *importer) {
- connect(importer, SIGNAL( newBookmark(const QString &, const QCString &, const QString &) ),
- SLOT( newBookmark(const QString &, const QCString &, const QString &) ));
- connect(importer, SIGNAL( newFolder(const QString &, bool, const QString &) ),
- SLOT( newFolder(const QString &, bool, const QString &) ));
- connect(importer, SIGNAL( newSeparator() ),
- SLOT( newSeparator() ) );
- connect(importer, SIGNAL( endFolder() ),
- SLOT( endFolder() ) );
+void KBookmarkDomBuilder::connectImporter(const TQObject *importer) {
+ connect(importer, TQT_SIGNAL( newBookmark(const TQString &, const TQCString &, const TQString &) ),
+ TQT_SLOT( newBookmark(const TQString &, const TQCString &, const TQString &) ));
+ connect(importer, TQT_SIGNAL( newFolder(const TQString &, bool, const TQString &) ),
+ TQT_SLOT( newFolder(const TQString &, bool, const TQString &) ));
+ connect(importer, TQT_SIGNAL( newSeparator() ),
+ TQT_SLOT( newSeparator() ) );
+ connect(importer, TQT_SIGNAL( endFolder() ),
+ TQT_SLOT( endFolder() ) );
}
void KBookmarkDomBuilder::newBookmark(
- const QString &text, const QCString &url, const QString &additionalInfo
+ const TQString &text, const TQCString &url, const TQString &additionalInfo
) {
KBookmark bk = m_stack.top().addBookmark(
m_manager, text,
- KURL( QString::fromUtf8(url), 106 /*utf8*/ ),
- QString::null, false);
+ KURL( TQString::fromUtf8(url), 106 /*utf8*/ ),
+ TQString::null, false);
// store additional info
bk.internalElement().setAttribute("netscapeinfo", additionalInfo);
}
void KBookmarkDomBuilder::newFolder(
- const QString & text, bool open, const QString & additionalInfo
+ const TQString & text, bool open, const TQString & additionalInfo
) {
// we use a qvaluelist so that we keep pointers to valid objects in the stack
KBookmarkGroup gp = m_stack.top().createNewFolder(m_manager, text, false);
m_list.append(gp);
m_stack.push(m_list.last());
// store additional info
- QDomElement element = m_list.last().internalElement();
+ TQDomElement element = m_list.last().internalElement();
element.setAttribute("netscapeinfo", additionalInfo);
element.setAttribute("folded", (open?"no":"yes"));
}
diff --git a/kio/bookmarks/kbookmarkdombuilder.h b/kio/bookmarks/kbookmarkdombuilder.h
index f570525f6..f1f712531 100644
--- a/kio/bookmarks/kbookmarkdombuilder.h
+++ b/kio/bookmarks/kbookmarkdombuilder.h
@@ -20,27 +20,27 @@
#ifndef __kbookmarkdombuilder_h
#define __kbookmarkdombuilder_h
-#include <qvaluestack.h>
-#include <qobject.h>
+#include <tqvaluestack.h>
+#include <tqobject.h>
#include <kbookmark.h>
/**
* @since 3.2
*/
-class KIO_EXPORT KBookmarkDomBuilder : public QObject {
+class KIO_EXPORT KBookmarkDomBuilder : public TQObject {
Q_OBJECT
public:
KBookmarkDomBuilder(const KBookmarkGroup &group, KBookmarkManager *);
virtual ~KBookmarkDomBuilder();
- void connectImporter(const QObject *);
+ void connectImporter(const TQObject *);
protected slots:
- void newBookmark(const QString &text, const QCString &url, const QString &additionalInfo);
- void newFolder(const QString &text, bool open, const QString &additionalInfo);
+ void newBookmark(const TQString &text, const TQCString &url, const TQString &additionalInfo);
+ void newFolder(const TQString &text, bool open, const TQString &additionalInfo);
void newSeparator();
void endFolder();
private:
- QValueStack<KBookmarkGroup> m_stack;
- QValueList<KBookmarkGroup> m_list;
+ TQValueStack<KBookmarkGroup> m_stack;
+ TQValueList<KBookmarkGroup> m_list;
KBookmarkManager *m_manager;
class KBookmarkDomBuilderPrivate *p;
};
diff --git a/kio/bookmarks/kbookmarkdrag.cc b/kio/bookmarks/kbookmarkdrag.cc
index 3e1db9c15..d13893eed 100644
--- a/kio/bookmarks/kbookmarkdrag.cc
+++ b/kio/bookmarks/kbookmarkdrag.cc
@@ -22,16 +22,16 @@
#include <kurldrag.h>
#include <kdebug.h>
-KBookmarkDrag * KBookmarkDrag::newDrag( const QValueList<KBookmark> & bookmarks, QWidget * dragSource, const char * name )
+KBookmarkDrag * KBookmarkDrag::newDrag( const TQValueList<KBookmark> & bookmarks, TQWidget * dragSource, const char * name )
{
KURL::List urls;
- for ( QValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
+ for ( TQValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
urls.append( (*it).url() );
}
// See KURLDrag::newDrag
- QStrList uris;
+ TQStrList uris;
KURL::List::ConstIterator uit = urls.begin();
KURL::List::ConstIterator uEnd = urls.end();
// Get each URL encoded in utf8 - and since we get it in escaped
@@ -42,24 +42,24 @@ KBookmarkDrag * KBookmarkDrag::newDrag( const QValueList<KBookmark> & bookmarks,
return new KBookmarkDrag( bookmarks, uris, dragSource, name );
}
-KBookmarkDrag * KBookmarkDrag::newDrag( const KBookmark & bookmark, QWidget * dragSource, const char * name )
+KBookmarkDrag * KBookmarkDrag::newDrag( const KBookmark & bookmark, TQWidget * dragSource, const char * name )
{
- QValueList<KBookmark> bookmarks;
+ TQValueList<KBookmark> bookmarks;
bookmarks.append( KBookmark(bookmark) );
return newDrag(bookmarks, dragSource, name);
}
-KBookmarkDrag::KBookmarkDrag( const QValueList<KBookmark> & bookmarks, const QStrList & urls,
- QWidget * dragSource, const char * name )
- : QUriDrag( urls, dragSource, name ), m_bookmarks( bookmarks ), m_doc("xbel")
+KBookmarkDrag::KBookmarkDrag( const TQValueList<KBookmark> & bookmarks, const TQStrList & urls,
+ TQWidget * dragSource, const char * name )
+ : TQUriDrag( urls, dragSource, name ), m_bookmarks( bookmarks ), m_doc("xbel")
{
// We need to create the XML for this drag right now and not
// in encodedData because when cutting a folder, the children
// wouldn't be part of the bookmarks anymore, when encodedData
// is requested.
- QDomElement elem = m_doc.createElement("xbel");
+ TQDomElement elem = m_doc.createElement("xbel");
m_doc.appendChild( elem );
- for ( QValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
+ for ( TQValueListConstIterator<KBookmark> it = bookmarks.begin(); it != bookmarks.end(); ++it ) {
elem.appendChild( (*it).internalElement().cloneNode( true /* deep */ ) );
}
//kdDebug(7043) << "KBookmarkDrag::KBookmarkDrag " << m_doc.toString() << endl;
@@ -76,12 +76,12 @@ const char* KBookmarkDrag::format( int i ) const
else return 0;
}
-QByteArray KBookmarkDrag::encodedData( const char* mime ) const
+TQByteArray KBookmarkDrag::encodedData( const char* mime ) const
{
- QByteArray a;
- QCString mimetype( mime );
+ TQByteArray a;
+ TQCString mimetype( mime );
if ( mimetype == "text/uri-list" )
- return QUriDrag::encodedData( mime );
+ return TQUriDrag::encodedData( mime );
else if ( mimetype == "application/x-xbel" )
{
a = m_doc.toCString();
@@ -92,13 +92,13 @@ QByteArray KBookmarkDrag::encodedData( const char* mime ) const
KURL::List m_lstDragURLs;
if ( KURLDrag::decode( this, m_lstDragURLs ) )
{
- QStringList uris;
+ TQStringList uris;
KURL::List::ConstIterator uit = m_lstDragURLs.begin();
KURL::List::ConstIterator uEnd = m_lstDragURLs.end();
for ( ; uit != uEnd ; ++uit )
uris.append( (*uit).prettyURL() );
- QCString s = uris.join( "\n" ).local8Bit();
+ TQCString s = uris.join( "\n" ).local8Bit();
a.resize( s.length() + 1 ); // trailing zero
memcpy( a.data(), s.data(), s.length() + 1 );
}
@@ -106,23 +106,23 @@ QByteArray KBookmarkDrag::encodedData( const char* mime ) const
return a;
}
-bool KBookmarkDrag::canDecode( const QMimeSource * e )
+bool KBookmarkDrag::canDecode( const TQMimeSource * e )
{
return e->provides("text/uri-list") || e->provides("application/x-xbel") ||
e->provides("text/plain");
}
-QValueList<KBookmark> KBookmarkDrag::decode( const QMimeSource * e )
+TQValueList<KBookmark> KBookmarkDrag::decode( const TQMimeSource * e )
{
- QValueList<KBookmark> bookmarks;
+ TQValueList<KBookmark> bookmarks;
if ( e->provides("application/x-xbel") )
{
- QByteArray s( e->encodedData("application/x-xbel") );
- //kdDebug(7043) << "KBookmarkDrag::decode s=" << QCString(s) << endl;
- QDomDocument doc;
+ TQByteArray s( e->encodedData("application/x-xbel") );
+ //kdDebug(7043) << "KBookmarkDrag::decode s=" << TQCString(s) << endl;
+ TQDomDocument doc;
doc.setContent( s );
- QDomElement elem = doc.documentElement();
- QDomNodeList children = elem.childNodes();
+ TQDomElement elem = doc.documentElement();
+ TQDomNodeList children = elem.childNodes();
for ( uint childno = 0; childno < children.count(); childno++)
{
bookmarks.append( KBookmark( children.item(childno).cloneNode(true).toElement() ));
@@ -149,13 +149,13 @@ QValueList<KBookmark> KBookmarkDrag::decode( const QMimeSource * e )
if( e->provides("text/plain") )
{
//kdDebug(7043) << "KBookmarkDrag::decode text/plain" << endl;
- QString s;
- if(QTextDrag::decode( e, s ))
+ TQString s;
+ if(TQTextDrag::decode( e, s ))
{
- QStringList listDragURLs = QStringList::split(QChar('\n'), s);
- QStringList::ConstIterator it = listDragURLs.begin();
- QStringList::ConstIterator end = listDragURLs.end();
+ TQStringList listDragURLs = TQStringList::split(TQChar('\n'), s);
+ TQStringList::ConstIterator it = listDragURLs.begin();
+ TQStringList::ConstIterator end = listDragURLs.end();
for( ; it!=end; ++it)
{
//kdDebug(7043)<<"KBookmarkDrag::decode string"<<(*it)<<endl;
diff --git a/kio/bookmarks/kbookmarkdrag.h b/kio/bookmarks/kbookmarkdrag.h
index fdaaf23f3..98aa3b881 100644
--- a/kio/bookmarks/kbookmarkdrag.h
+++ b/kio/bookmarks/kbookmarkdrag.h
@@ -21,36 +21,36 @@
#ifndef __kebdrag_h
#define __kebdrag_h
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <kbookmark.h>
// Clipboard/dnd data : URLs + XML for bookmarks
class KIO_EXPORT KBookmarkDrag : public QUriDrag
{
public:
- static KBookmarkDrag * newDrag( const QValueList<KBookmark> & bookmarks,
- QWidget * dragSource = 0,
+ static KBookmarkDrag * newDrag( const TQValueList<KBookmark> & bookmarks,
+ TQWidget * dragSource = 0,
const char * name = 0 );
static KBookmarkDrag * newDrag( const KBookmark & bookmark,
- QWidget * dragSource = 0,
+ TQWidget * dragSource = 0,
const char * name = 0 );
protected:
- KBookmarkDrag( const QValueList<KBookmark> & bookmarks,
- const QStrList & urls,
- QWidget * dragSource,
+ KBookmarkDrag( const TQValueList<KBookmark> & bookmarks,
+ const TQStrList & urls,
+ TQWidget * dragSource,
const char * name );
public:
virtual ~KBookmarkDrag() {}
virtual const char* format( int i ) const;
- virtual QByteArray encodedData( const char* mime ) const;
+ virtual TQByteArray encodedData( const char* mime ) const;
- static bool canDecode( const QMimeSource * e );
- static QValueList<KBookmark> decode( const QMimeSource * e );
+ static bool canDecode( const TQMimeSource * e );
+ static TQValueList<KBookmark> decode( const TQMimeSource * e );
protected:
- QValueList<KBookmark> m_bookmarks;
- QDomDocument m_doc;
+ TQValueList<KBookmark> m_bookmarks;
+ TQDomDocument m_doc;
class KBookmarkDragPrivate;
KBookmarkDragPrivate * d;
};
diff --git a/kio/bookmarks/kbookmarkexporter.cc b/kio/bookmarks/kbookmarkexporter.cc
index 8ed394ad1..30c52bdb8 100644
--- a/kio/bookmarks/kbookmarkexporter.cc
+++ b/kio/bookmarks/kbookmarkexporter.cc
@@ -19,9 +19,9 @@
*/
#include <stdio.h>
-#include <qfile.h>
-#include <qtextcodec.h>
-#include <qstylesheet.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
+#include <tqstylesheet.h>
#include <kdebug.h>
#include <klocale.h>
diff --git a/kio/bookmarks/kbookmarkexporter.h b/kio/bookmarks/kbookmarkexporter.h
index 19978b3dd..0943d6cbe 100644
--- a/kio/bookmarks/kbookmarkexporter.h
+++ b/kio/bookmarks/kbookmarkexporter.h
@@ -23,7 +23,7 @@
#ifndef __kbookmarkexporter_h
#define __kbookmarkexporter_h
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kbookmark.h>
/**
@@ -32,13 +32,13 @@
class KIO_EXPORT KBookmarkExporterBase
{
public:
- KBookmarkExporterBase(KBookmarkManager* mgr, const QString & fileName)
+ KBookmarkExporterBase(KBookmarkManager* mgr, const TQString & fileName)
: m_fileName(fileName), m_pManager(mgr)
{ ; }
virtual ~KBookmarkExporterBase() {}
virtual void write(KBookmarkGroup) = 0;
protected:
- QString m_fileName;
+ TQString m_fileName;
KBookmarkManager* m_pManager;
private:
class KBookmarkExporterBasePrivate *d;
diff --git a/kio/bookmarks/kbookmarkimporter.cc b/kio/bookmarks/kbookmarkimporter.cc
index b646b0626..8a31fa3d2 100644
--- a/kio/bookmarks/kbookmarkimporter.cc
+++ b/kio/bookmarks/kbookmarkimporter.cc
@@ -23,7 +23,7 @@
#include <klocale.h>
#include <kdebug.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <sys/types.h>
#include <stddef.h>
@@ -70,19 +70,19 @@ void KXBELBookmarkImporterImpl::visitLeave(const KBookmarkGroup &)
emit endFolder();
}
-void KBookmarkImporterBase::setupSignalForwards(QObject *src, QObject *dst)
+void KBookmarkImporterBase::setupSignalForwards(TQObject *src, TQObject *dst)
{
- connect(src, SIGNAL( newBookmark( const QString &, const QCString &, const QString & ) ),
- dst, SIGNAL( newBookmark( const QString &, const QCString &, const QString & ) ));
- connect(src, SIGNAL( newFolder( const QString &, bool, const QString & ) ),
- dst, SIGNAL( newFolder( const QString &, bool, const QString & ) ));
- connect(src, SIGNAL( newSeparator() ),
- dst, SIGNAL( newSeparator() ) );
- connect(src, SIGNAL( endFolder() ),
- dst, SIGNAL( endFolder() ) );
+ connect(src, TQT_SIGNAL( newBookmark( const TQString &, const TQCString &, const TQString & ) ),
+ dst, TQT_SIGNAL( newBookmark( const TQString &, const TQCString &, const TQString & ) ));
+ connect(src, TQT_SIGNAL( newFolder( const TQString &, bool, const TQString & ) ),
+ dst, TQT_SIGNAL( newFolder( const TQString &, bool, const TQString & ) ));
+ connect(src, TQT_SIGNAL( newSeparator() ),
+ dst, TQT_SIGNAL( newSeparator() ) );
+ connect(src, TQT_SIGNAL( endFolder() ),
+ dst, TQT_SIGNAL( endFolder() ) );
}
-KBookmarkImporterBase* KBookmarkImporterBase::factory( const QString &type )
+KBookmarkImporterBase* KBookmarkImporterBase::factory( const TQString &type )
{
if (type == "netscape")
return new KNSBookmarkImporterImpl;
diff --git a/kio/bookmarks/kbookmarkimporter.h b/kio/bookmarks/kbookmarkimporter.h
index f8f53ffa2..bf8d61137 100644
--- a/kio/bookmarks/kbookmarkimporter.h
+++ b/kio/bookmarks/kbookmarkimporter.h
@@ -21,9 +21,9 @@
#ifndef __kbookmarkimporter_h
#define __kbookmarkimporter_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ksimpleconfig.h>
#include "kbookmark.h"
@@ -41,27 +41,27 @@ public:
KBookmarkImporterBase() {}
virtual ~KBookmarkImporterBase() {}
- void setFilename(const QString &filename) { m_fileName = filename; }
+ void setFilename(const TQString &filename) { m_fileName = filename; }
virtual void parse() = 0;
- virtual QString findDefaultLocation(bool forSaving = false) const = 0;
+ virtual TQString findDefaultLocation(bool forSaving = false) const = 0;
// TODO - make this static?
- void setupSignalForwards(QObject *src, QObject *dst);
- static KBookmarkImporterBase *factory(const QString &type);
+ void setupSignalForwards(TQObject *src, TQObject *dst);
+ static KBookmarkImporterBase *factory(const TQString &type);
signals:
/**
* Notify about a new bookmark
* Use "html" for the icon
*/
- void newBookmark(const QString & text, const QCString & url, const QString & additionalInfo);
+ void newBookmark(const TQString & text, const TQCString & url, const TQString & additionalInfo);
/**
* Notify about a new folder
* Use "bookmark_folder" for the icon
*/
- void newFolder(const QString & text, bool open, const QString & additionalInfo);
+ void newFolder(const TQString & text, bool open, const TQString & additionalInfo);
/**
* Notify about a new separator
@@ -75,7 +75,7 @@ signals:
void endFolder();
protected:
- QString m_fileName;
+ TQString m_fileName;
private:
class KBookmarkImporterBasePrivate *d;
@@ -90,7 +90,7 @@ class KIO_EXPORT KXBELBookmarkImporterImpl : public KBookmarkImporterBase, prote
public:
KXBELBookmarkImporterImpl() {}
virtual void parse();
- virtual QString findDefaultLocation(bool = false) const { return QString::null; }
+ virtual TQString findDefaultLocation(bool = false) const { return TQString::null; }
protected:
virtual void visit(const KBookmark &);
virtual void visitEnter(const KBookmarkGroup &);
diff --git a/kio/bookmarks/kbookmarkimporter_crash.cc b/kio/bookmarks/kbookmarkimporter_crash.cc
index b585df4c7..594dc0239 100644
--- a/kio/bookmarks/kbookmarkimporter_crash.cc
+++ b/kio/bookmarks/kbookmarkimporter_crash.cc
@@ -26,10 +26,10 @@
#include <kdebug.h>
#include <kapplication.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qstring.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
#include <dcopclient.h>
#include <sys/types.h>
@@ -37,27 +37,27 @@
#include <dirent.h>
#include <sys/stat.h>
-typedef QMap<QString, QString> ViewMap;
+typedef TQMap<TQString, TQString> ViewMap;
// KDE 4.0: remove this BC keeping stub
-void KCrashBookmarkImporter::parseCrashLog( QString /*filename*/, bool /*del*/ )
+void KCrashBookmarkImporter::parseCrashLog( TQString /*filename*/, bool /*del*/ )
{
;
}
-ViewMap KCrashBookmarkImporterImpl::parseCrashLog_noemit( const QString & filename, bool del )
+ViewMap KCrashBookmarkImporterImpl::parseCrashLog_noemit( const TQString & filename, bool del )
{
static const int g_lineLimit = 16*1024;
- QFile f( filename );
+ TQFile f( filename );
ViewMap views;
if ( !f.open( IO_ReadOnly ) )
return views;
- QCString s( g_lineLimit );
+ TQCString s( g_lineLimit );
- QTextCodec * codec = QTextCodec::codecForName( "UTF-8" );
+ TQTextCodec * codec = TQTextCodec::codecForName( "UTF-8" );
Q_ASSERT( codec );
if ( !codec )
return views;
@@ -69,8 +69,8 @@ ViewMap KCrashBookmarkImporterImpl::parseCrashLog_noemit( const QString & filena
kdWarning() << "Crash bookmarks contain a line longer than " << g_lineLimit << ". Skipping." << endl;
continue;
}
- QString t = codec->toUnicode( s.stripWhiteSpace() );
- QRegExp rx( "(.*)\\((.*)\\):(.*)$" );
+ TQString t = codec->toUnicode( s.stripWhiteSpace() );
+ TQRegExp rx( "(.*)\\((.*)\\):(.*)$" );
rx.setMinimal( true );
if ( !rx.exactMatch( t ) )
continue;
@@ -88,28 +88,28 @@ ViewMap KCrashBookmarkImporterImpl::parseCrashLog_noemit( const QString & filena
return views;
}
-QStringList KCrashBookmarkImporter::getCrashLogs()
+TQStringList KCrashBookmarkImporter::getCrashLogs()
{
return KCrashBookmarkImporterImpl::getCrashLogs();
}
-QStringList KCrashBookmarkImporterImpl::getCrashLogs()
+TQStringList KCrashBookmarkImporterImpl::getCrashLogs()
{
- QMap<QString, bool> activeLogs;
+ TQMap<TQString, bool> activeLogs;
DCOPClient* dcop = kapp->dcopClient();
QCStringList apps = dcop->registeredApplications();
for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it )
{
- QCString &clientId = *it;
+ TQCString &clientId = *it;
if ( qstrncmp(clientId, "konqueror", 9) != 0 )
continue;
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
if ( !dcop->call( clientId.data(), "KonquerorIface",
"crashLogFile()", data, replyType, replyData) )
@@ -118,25 +118,25 @@ QStringList KCrashBookmarkImporterImpl::getCrashLogs()
continue;
}
- if ( replyType != "QString" )
+ if ( replyType != "TQString" )
continue;
- QDataStream reply( replyData, IO_ReadOnly );
- QString ret;
+ TQDataStream reply( replyData, IO_ReadOnly );
+ TQString ret;
reply >> ret;
activeLogs[ret] = true;
}
- QDir d( KCrashBookmarkImporterImpl().findDefaultLocation() );
- d.setSorting( QDir::Time );
- d.setFilter( QDir::Files );
+ TQDir d( KCrashBookmarkImporterImpl().findDefaultLocation() );
+ d.setSorting( TQDir::Time );
+ d.setFilter( TQDir::Files );
d.setNameFilter( "konqueror-crash-*.log" );
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
- QStringList crashFiles;
+ TQFileInfo *fi;
+ TQStringList crashFiles;
int count = 0;
for ( ; (( fi = it.current() ) != 0) && (count < 20); ++it, ++count )
@@ -148,7 +148,7 @@ QStringList KCrashBookmarkImporterImpl::getCrashLogs()
// Delete remaining ones
for ( ; ( fi = it.current() ) != 0; ++it )
{
- QFile::remove( fi->absFilePath() );
+ TQFile::remove( fi->absFilePath() );
}
return crashFiles;
@@ -156,20 +156,20 @@ QStringList KCrashBookmarkImporterImpl::getCrashLogs()
void KCrashBookmarkImporterImpl::parse()
{
- QDict<bool> signatureMap;
- QStringList crashFiles = KCrashBookmarkImporterImpl::getCrashLogs();
+ TQDict<bool> signatureMap;
+ TQStringList crashFiles = KCrashBookmarkImporterImpl::getCrashLogs();
int count = 1;
- for ( QStringList::Iterator it = crashFiles.begin(); it != crashFiles.end(); ++it )
+ for ( TQStringList::Iterator it = crashFiles.begin(); it != crashFiles.end(); ++it )
{
ViewMap views;
views = parseCrashLog_noemit( *it, m_shouldDelete );
- QString signature;
+ TQString signature;
for ( ViewMap::Iterator vit = views.begin(); vit != views.end(); ++vit )
signature += "|"+vit.data();
if (signatureMap[signature])
{
// Duplicate... throw away and skip
- QFile::remove(*it);
+ TQFile::remove(*it);
continue;
}
@@ -177,15 +177,15 @@ void KCrashBookmarkImporterImpl::parse()
int outerFolder = ( crashFiles.count() > 1 ) && (views.count() > 0);
if ( outerFolder )
- emit newFolder( QString("Konqueror Window %1").arg(count++), false, "" );
+ emit newFolder( TQString("Konqueror Window %1").arg(count++), false, "" );
for ( ViewMap::Iterator vit = views.begin(); vit != views.end(); ++vit )
- emit newBookmark( vit.data(), vit.data().latin1(), QString("") );
+ emit newBookmark( vit.data(), vit.data().latin1(), TQString("") );
if ( outerFolder )
emit endFolder();
}
}
-QString KCrashBookmarkImporter::crashBookmarksDir()
+TQString KCrashBookmarkImporter::crashBookmarksDir()
{
static KCrashBookmarkImporterImpl *p = 0;
if (!p)
@@ -207,7 +207,7 @@ void KCrashBookmarkImporter::parseCrashBookmarks( bool del )
importer.parse();
}
-QString KCrashBookmarkImporterImpl::findDefaultLocation( bool ) const
+TQString KCrashBookmarkImporterImpl::findDefaultLocation( bool ) const
{
return locateLocal( "tmp", "" );
}
diff --git a/kio/bookmarks/kbookmarkimporter_crash.h b/kio/bookmarks/kbookmarkimporter_crash.h
index 701387b4e..e22ef1b9e 100644
--- a/kio/bookmarks/kbookmarkimporter_crash.h
+++ b/kio/bookmarks/kbookmarkimporter_crash.h
@@ -21,10 +21,10 @@
#ifndef __kbookmarkimporter_crash_h
#define __kbookmarkimporter_crash_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
#include <ksimpleconfig.h>
#include <kdemacros.h>
@@ -38,19 +38,19 @@ class KIO_EXPORT_DEPRECATED KCrashBookmarkImporter : public QObject
{
Q_OBJECT
public:
- KCrashBookmarkImporter( const QString & fileName ) : m_fileName(fileName) {}
+ KCrashBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
~KCrashBookmarkImporter() {}
void parseCrashBookmarks( bool del = true );
- static QString crashBookmarksDir( );
- static QStringList getCrashLogs(); // EMPTY!
+ static TQString crashBookmarksDir( );
+ static TQStringList getCrashLogs(); // EMPTY!
signals:
- void newBookmark( const QString & text, const QCString & url, const QString & additionalInfo );
- void newFolder( const QString & text, bool open, const QString & additionalInfo );
+ void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo );
+ void newFolder( const TQString & text, bool open, const TQString & additionalInfo );
void newSeparator();
void endFolder();
protected:
- QString m_fileName;
- void parseCrashLog( QString filename, bool del ); // EMPTY!
+ TQString m_fileName;
+ void parseCrashLog( TQString filename, bool del ); // EMPTY!
};
/**
@@ -63,11 +63,11 @@ public:
KCrashBookmarkImporterImpl() : m_shouldDelete(false) { }
void setShouldDelete(bool);
virtual void parse();
- virtual QString findDefaultLocation(bool forSaving = false) const;
- static QStringList getCrashLogs();
+ virtual TQString findDefaultLocation(bool forSaving = false) const;
+ static TQStringList getCrashLogs();
private:
bool m_shouldDelete;
- QMap<QString, QString> parseCrashLog_noemit( const QString & filename, bool del );
+ TQMap<TQString, TQString> parseCrashLog_noemit( const TQString & filename, bool del );
class KCrashBookmarkImporterImplPrivate *d;
};
diff --git a/kio/bookmarks/kbookmarkimporter_ie.cc b/kio/bookmarks/kbookmarkimporter_ie.cc
index a2e863518..f37a6a4be 100644
--- a/kio/bookmarks/kbookmarkimporter_ie.cc
+++ b/kio/bookmarks/kbookmarkimporter_ie.cc
@@ -22,7 +22,7 @@
#include <kstringhandler.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <sys/types.h>
#include <stddef.h>
@@ -32,15 +32,15 @@
#include "kbookmarkimporter.h"
#include "kbookmarkimporter_ie.h"
-/* antlarr: KDE 4: Make them const QString & */
-void KIEBookmarkImporter::parseIEBookmarks_url_file( QString filename, QString name ) {
+/* antlarr: KDE 4: Make them const TQString & */
+void KIEBookmarkImporter::parseIEBookmarks_url_file( TQString filename, TQString name ) {
static const int g_lineLimit = 16*1024;
- QFile f(filename);
+ TQFile f(filename);
if(f.open(IO_ReadOnly)) {
- QCString s(g_lineLimit);
+ TQCString s(g_lineLimit);
while(f.readLine(s.data(), g_lineLimit)>=0) {
if ( s[s.length()-1] != '\n' ) // Gosh, this line is longer than g_lineLimit. Skipping.
@@ -48,10 +48,10 @@ void KIEBookmarkImporter::parseIEBookmarks_url_file( QString filename, QString n
kdWarning() << "IE bookmarks contain a line longer than " << g_lineLimit << ". Skipping." << endl;
continue;
}
- QCString t = s.stripWhiteSpace();
- QRegExp rx( "URL=(.*)" );
+ TQCString t = s.stripWhiteSpace();
+ TQRegExp rx( "URL=(.*)" );
if (rx.exactMatch(t)) {
- emit newBookmark( name, rx.cap(1).latin1(), QString("") );
+ emit newBookmark( name, rx.cap(1).latin1(), TQString("") );
}
}
@@ -59,13 +59,13 @@ void KIEBookmarkImporter::parseIEBookmarks_url_file( QString filename, QString n
}
}
-/* antlarr: KDE 4: Make them const QString & */
-void KIEBookmarkImporter::parseIEBookmarks_dir( QString dirname, QString foldername )
+/* antlarr: KDE 4: Make them const TQString & */
+void KIEBookmarkImporter::parseIEBookmarks_dir( TQString dirname, TQString foldername )
{
- QDir dir(dirname);
- dir.setFilter( QDir::Files | QDir::Dirs );
- dir.setSorting( QDir::Name | QDir::DirsFirst );
+ TQDir dir(dirname);
+ dir.setFilter( TQDir::Files | TQDir::Dirs );
+ dir.setSorting( TQDir::Name | TQDir::DirsFirst );
dir.setNameFilter("*.url"); // AK - possibly add ";index.ini" ?
dir.setMatchAllDirs(true);
@@ -76,7 +76,7 @@ void KIEBookmarkImporter::parseIEBookmarks_dir( QString dirname, QString foldern
emit newFolder( foldername, false, "" );
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( (fi = it.current()) != 0 ) {
++it;
@@ -88,7 +88,7 @@ void KIEBookmarkImporter::parseIEBookmarks_dir( QString dirname, QString foldern
} else if (fi->isFile()) {
if (fi->fileName().endsWith(".url")) {
- QString name = fi->fileName();
+ TQString name = fi->fileName();
name.truncate(name.length() - 4); // .url
parseIEBookmarks_url_file(fi->absFilePath(), name);
}
@@ -106,7 +106,7 @@ void KIEBookmarkImporter::parseIEBookmarks( )
parseIEBookmarks_dir( m_fileName );
}
-QString KIEBookmarkImporter::IEBookmarksDir()
+TQString KIEBookmarkImporter::IEBookmarksDir()
{
static KIEBookmarkImporterImpl* p = 0;
if (!p)
@@ -120,7 +120,7 @@ void KIEBookmarkImporterImpl::parse() {
importer.parseIEBookmarks();
}
-QString KIEBookmarkImporterImpl::findDefaultLocation(bool) const
+TQString KIEBookmarkImporterImpl::findDefaultLocation(bool) const
{
// notify user that they must give a new dir such
// as "Favourites" as otherwise it'll just place
@@ -135,38 +135,38 @@ QString KIEBookmarkImporterImpl::findDefaultLocation(bool) const
class IEExporter : private KBookmarkGroupTraverser {
public:
- IEExporter( const QString & );
+ IEExporter( const TQString & );
void write( const KBookmarkGroup &grp ) { traverse(grp); };
private:
virtual void visit( const KBookmark & );
virtual void visitEnter( const KBookmarkGroup & );
virtual void visitLeave( const KBookmarkGroup & );
private:
- QDir m_currentDir;
+ TQDir m_currentDir;
};
-static QString ieStyleQuote( const QString &str ) {
- QString s(str);
- s.replace(QRegExp("[/\\:*?\"<>|]"), "_");
+static TQString ieStyleQuote( const TQString &str ) {
+ TQString s(str);
+ s.replace(TQRegExp("[/\\:*?\"<>|]"), "_");
return s;
}
-IEExporter::IEExporter( const QString & dname ) {
+IEExporter::IEExporter( const TQString & dname ) {
m_currentDir.setPath( dname );
}
void IEExporter::visit( const KBookmark &bk ) {
- QString fname = m_currentDir.path() + "/" + ieStyleQuote( bk.fullText() ) + ".url";
+ TQString fname = m_currentDir.path() + "/" + ieStyleQuote( bk.fullText() ) + ".url";
// kdDebug() << "visit(" << bk.text() << "), fname == " << fname << endl;
- QFile file( fname );
+ TQFile file( fname );
file.open( IO_WriteOnly );
- QTextStream ts( &file );
+ TQTextStream ts( &file );
ts << "[InternetShortcut]\r\n";
ts << "URL=" << bk.url().url().utf8() << "\r\n";
}
void IEExporter::visitEnter( const KBookmarkGroup &grp ) {
- QString dname = m_currentDir.path() + "/" + ieStyleQuote( grp.fullText() );
+ TQString dname = m_currentDir.path() + "/" + ieStyleQuote( grp.fullText() );
// kdDebug() << "visitEnter(" << grp.text() << "), dname == " << dname << endl;
m_currentDir.mkdir( dname );
m_currentDir.cd( dname );
diff --git a/kio/bookmarks/kbookmarkimporter_ie.h b/kio/bookmarks/kbookmarkimporter_ie.h
index 86f41a4f6..2a9ddac6d 100644
--- a/kio/bookmarks/kbookmarkimporter_ie.h
+++ b/kio/bookmarks/kbookmarkimporter_ie.h
@@ -21,9 +21,9 @@
#ifndef __kbookmarkimporter_ie_h
#define __kbookmarkimporter_ie_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ksimpleconfig.h>
#include <kdemacros.h>
@@ -37,25 +37,25 @@ class KIO_EXPORT_DEPRECATED KIEBookmarkImporter : public QObject
{
Q_OBJECT
public:
- KIEBookmarkImporter( const QString & fileName ) : m_fileName(fileName) {}
+ KIEBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
~KIEBookmarkImporter() {}
void parseIEBookmarks();
// Usual place for IE bookmarks
- static QString IEBookmarksDir();
+ static TQString IEBookmarksDir();
signals:
- void newBookmark( const QString & text, const QCString & url, const QString & additionalInfo );
- void newFolder( const QString & text, bool open, const QString & additionalInfo );
+ void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo );
+ void newFolder( const TQString & text, bool open, const TQString & additionalInfo );
void newSeparator();
void endFolder();
protected:
- void parseIEBookmarks_dir( QString dirname, QString name = QString::null );
- void parseIEBookmarks_url_file( QString filename, QString name );
+ void parseIEBookmarks_dir( TQString dirname, TQString name = TQString::null );
+ void parseIEBookmarks_url_file( TQString filename, TQString name );
- QString m_fileName;
+ TQString m_fileName;
};
/**
@@ -67,7 +67,7 @@ class KIO_EXPORT KIEBookmarkImporterImpl : public KBookmarkImporterBase
public:
KIEBookmarkImporterImpl() { }
virtual void parse();
- virtual QString findDefaultLocation(bool forSaving = false) const;
+ virtual TQString findDefaultLocation(bool forSaving = false) const;
private:
class KIEBookmarkImporterImplPrivate *d;
};
@@ -78,7 +78,7 @@ private:
class KIO_EXPORT KIEBookmarkExporterImpl : public KBookmarkExporterBase
{
public:
- KIEBookmarkExporterImpl(KBookmarkManager* mgr, const QString & path)
+ KIEBookmarkExporterImpl(KBookmarkManager* mgr, const TQString & path)
: KBookmarkExporterBase(mgr, path)
{ ; }
virtual ~KIEBookmarkExporterImpl() {}
diff --git a/kio/bookmarks/kbookmarkimporter_kde1.cc b/kio/bookmarks/kbookmarkimporter_kde1.cc
index 72fe8dbb3..510787ab1 100644
--- a/kio/bookmarks/kbookmarkimporter_kde1.cc
+++ b/kio/bookmarks/kbookmarkimporter_kde1.cc
@@ -24,7 +24,7 @@
#include <klocale.h>
#include <kdebug.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <sys/types.h>
#include <stddef.h>
@@ -34,19 +34,19 @@
////////////////////
-void KBookmarkImporter::import( const QString & path )
+void KBookmarkImporter::import( const TQString & path )
{
- QDomElement elem = m_pDoc->documentElement();
+ TQDomElement elem = m_pDoc->documentElement();
Q_ASSERT(!elem.isNull());
scanIntern( elem, path );
}
-void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _path )
+void KBookmarkImporter::scanIntern( TQDomElement & parentElem, const TQString & _path )
{
kdDebug(7043) << "KBookmarkImporter::scanIntern " << _path << endl;
// Substitute all symbolic links in the path
- QDir dir( _path );
- QString canonical = dir.canonicalPath();
+ TQDir dir( _path );
+ TQString canonical = dir.canonicalPath();
if ( m_lstParsedDirs.contains(canonical) )
{
@@ -58,7 +58,7 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
DIR *dp;
struct dirent *ep;
- dp = opendir( QFile::encodeName(_path) );
+ dp = opendir( TQFile::encodeName(_path) );
if ( dp == 0L )
return;
@@ -68,7 +68,7 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
if ( strcmp( ep->d_name, "." ) != 0 && strcmp( ep->d_name, ".." ) != 0 )
{
KURL file;
- file.setPath( QString( _path ) + '/' + QFile::decodeName(ep->d_name) );
+ file.setPath( TQString( _path ) + '/' + TQFile::decodeName(ep->d_name) );
KMimeType::Ptr res = KMimeType::findByURL( file, 0, true );
//kdDebug(7043) << " - " << file.url() << " -> " << res->name() << endl;
@@ -77,9 +77,9 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
{
// We could use KBookmarkGroup::createNewFolder, but then it
// would notify about the change, so we'd need a flag, etc.
- QDomElement groupElem = m_pDoc->createElement( "folder" );
+ TQDomElement groupElem = m_pDoc->createElement( "folder" );
parentElem.appendChild( groupElem );
- QDomElement textElem = m_pDoc->createElement( "title" );
+ TQDomElement textElem = m_pDoc->createElement( "title" );
groupElem.appendChild( textElem );
textElem.appendChild( m_pDoc->createTextNode( KIO::decodeFileName( ep->d_name ) ) );
if ( KIO::decodeFileName( ep->d_name ) == "Toolbar" )
@@ -90,7 +90,7 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
{
KSimpleConfig cfg( file.path(), true );
cfg.setDesktopGroup();
- QString type = cfg.readEntry( "Type" );
+ TQString type = cfg.readEntry( "Type" );
// Is it really a bookmark file ?
if ( type == "Link" )
parseBookmark( parentElem, ep->d_name, cfg, 0 /* desktop group */ );
@@ -101,12 +101,12 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
{
// maybe its an IE Favourite..
KSimpleConfig cfg( file.path(), true );
- QStringList grp = cfg.groupList().grep( "internetshortcut", false );
+ TQStringList grp = cfg.groupList().grep( "internetshortcut", false );
if ( grp.count() == 0 )
continue;
cfg.setGroup( *grp.begin() );
- QString url = cfg.readPathEntry("URL");
+ TQString url = cfg.readPathEntry("URL");
if (!url.isEmpty() )
parseBookmark( parentElem, ep->d_name, cfg, *grp.begin() );
} else
@@ -117,33 +117,33 @@ void KBookmarkImporter::scanIntern( QDomElement & parentElem, const QString & _p
closedir( dp );
}
-void KBookmarkImporter::parseBookmark( QDomElement & parentElem, QCString _text,
- KSimpleConfig& _cfg, const QString &_group )
+void KBookmarkImporter::parseBookmark( TQDomElement & parentElem, TQCString _text,
+ KSimpleConfig& _cfg, const TQString &_group )
{
if ( !_group.isEmpty() )
_cfg.setGroup( _group );
else
_cfg.setDesktopGroup();
- QString url = _cfg.readPathEntry( "URL" );
- QString icon = _cfg.readEntry( "Icon" );
+ TQString url = _cfg.readPathEntry( "URL" );
+ TQString icon = _cfg.readEntry( "Icon" );
if (icon.right( 4 ) == ".xpm" ) // prevent warnings
icon.truncate( icon.length() - 4 );
- QString text = KIO::decodeFileName( QString::fromLocal8Bit(_text) );
+ TQString text = KIO::decodeFileName( TQString::fromLocal8Bit(_text) );
if ( text.length() > 8 && text.right( 8 ) == ".desktop" )
text.truncate( text.length() - 8 );
if ( text.length() > 7 && text.right( 7 ) == ".kdelnk" )
text.truncate( text.length() - 7 );
- QDomElement elem = m_pDoc->createElement( "bookmark" );
+ TQDomElement elem = m_pDoc->createElement( "bookmark" );
parentElem.appendChild( elem );
elem.setAttribute( "href", url );
//if ( icon != "www" ) // No need to save the default
// Hmm, after all, it makes KBookmark::pixmapFile faster,
// and it shows a nice feature to those reading the file
elem.setAttribute( "icon", icon );
- QDomElement textElem = m_pDoc->createElement( "title" );
+ TQDomElement textElem = m_pDoc->createElement( "title" );
elem.appendChild( textElem );
textElem.appendChild( m_pDoc->createTextNode( text ) );
kdDebug(7043) << "KBookmarkImporter::parseBookmark text=" << text << endl;
diff --git a/kio/bookmarks/kbookmarkimporter_kde1.h b/kio/bookmarks/kbookmarkimporter_kde1.h
index 9811cce55..7e6ad2395 100644
--- a/kio/bookmarks/kbookmarkimporter_kde1.h
+++ b/kio/bookmarks/kbookmarkimporter_kde1.h
@@ -21,9 +21,9 @@
#ifndef __kbookmarkimporter_kde1_h
#define __kbookmarkimporter_kde1_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ksimpleconfig.h>
/**
@@ -34,16 +34,16 @@
class KIO_EXPORT KBookmarkImporter
{
public:
- KBookmarkImporter( QDomDocument * doc ) : m_pDoc(doc) {}
+ KBookmarkImporter( TQDomDocument * doc ) : m_pDoc(doc) {}
- void import( const QString & path );
+ void import( const TQString & path );
private:
- void scanIntern( QDomElement & parentElem, const QString & _path );
- void parseBookmark( QDomElement & parentElem, QCString _text,
- KSimpleConfig& _cfg, const QString &_group );
- QDomDocument * m_pDoc;
- QStringList m_lstParsedDirs;
+ void scanIntern( TQDomElement & parentElem, const TQString & _path );
+ void parseBookmark( TQDomElement & parentElem, TQCString _text,
+ KSimpleConfig& _cfg, const TQString &_group );
+ TQDomDocument * m_pDoc;
+ TQStringList m_lstParsedDirs;
};
#endif
diff --git a/kio/bookmarks/kbookmarkimporter_ns.cc b/kio/bookmarks/kbookmarkimporter_ns.cc
index 23f37e4cb..5521bee7e 100644
--- a/kio/bookmarks/kbookmarkimporter_ns.cc
+++ b/kio/bookmarks/kbookmarkimporter_ns.cc
@@ -28,8 +28,8 @@
#include <klocale.h>
#include <kdebug.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
-#include <qstylesheet.h>
+#include <tqtextcodec.h>
+#include <tqstylesheet.h>
#include <sys/types.h>
#include <stddef.h>
@@ -39,8 +39,8 @@
void KNSBookmarkImporterImpl::parse()
{
- QFile f(m_fileName);
- QTextCodec * codec = m_utf8 ? QTextCodec::codecForName("UTF-8") : QTextCodec::codecForLocale();
+ TQFile f(m_fileName);
+ TQTextCodec * codec = m_utf8 ? TQTextCodec::codecForName("UTF-8") : TQTextCodec::codecForLocale();
Q_ASSERT(codec);
if (!codec)
return;
@@ -48,7 +48,7 @@ void KNSBookmarkImporterImpl::parse()
if(f.open(IO_ReadOnly)) {
static const int g_lineLimit = 16*1024;
- QCString s(g_lineLimit);
+ TQCString s(g_lineLimit);
// skip header
while(f.readLine(s.data(), g_lineLimit) >= 0 && !s.contains("<DL>"));
@@ -58,21 +58,21 @@ void KNSBookmarkImporterImpl::parse()
kdWarning() << "Netscape bookmarks contain a line longer than " << g_lineLimit << ". Skipping." << endl;
continue;
}
- QCString t = s.stripWhiteSpace();
+ TQCString t = s.stripWhiteSpace();
if(t.left(12).upper() == "<DT><A HREF=" ||
t.left(16).upper() == "<DT><H3><A HREF=") {
int firstQuotes = t.find('"')+1;
int secondQuotes = t.find('"', firstQuotes);
if (firstQuotes != -1 && secondQuotes != -1)
{
- QCString link = t.mid(firstQuotes, secondQuotes-firstQuotes);
+ TQCString link = t.mid(firstQuotes, secondQuotes-firstQuotes);
int endTag = t.find('>', secondQuotes+1);
- QCString name = t.mid(endTag+1);
+ TQCString name = t.mid(endTag+1);
name = name.left(name.findRev('<'));
if ( name.right(4) == "</A>" )
name = name.left( name.length() - 4 );
- QString qname = KCharsets::resolveEntities( codec->toUnicode( name ) );
- QCString additionalInfo = t.mid( secondQuotes+1, endTag-secondQuotes-1 );
+ TQString qname = KCharsets::resolveEntities( codec->toUnicode( name ) );
+ TQCString additionalInfo = t.mid( secondQuotes+1, endTag-secondQuotes-1 );
emit newBookmark( qname,
link, codec->toUnicode(additionalInfo) );
@@ -80,10 +80,10 @@ void KNSBookmarkImporterImpl::parse()
}
else if(t.left(7).upper() == "<DT><H3") {
int endTag = t.find('>', 7);
- QCString name = t.mid(endTag+1);
+ TQCString name = t.mid(endTag+1);
name = name.left(name.findRev('<'));
- QString qname = KCharsets::resolveEntities( codec->toUnicode( name ) );
- QCString additionalInfo = t.mid( 8, endTag-8 );
+ TQString qname = KCharsets::resolveEntities( codec->toUnicode( name ) );
+ TQCString additionalInfo = t.mid( 8, endTag-8 );
bool folded = (additionalInfo.left(6) == "FOLDED");
if (folded) additionalInfo.remove(0,7);
@@ -101,20 +101,20 @@ void KNSBookmarkImporterImpl::parse()
}
}
-QString KNSBookmarkImporterImpl::findDefaultLocation(bool forSaving) const
+TQString KNSBookmarkImporterImpl::findDefaultLocation(bool forSaving) const
{
if (m_utf8)
{
if ( forSaving )
- return KFileDialog::getSaveFileName( QDir::homeDirPath() + "/.mozilla",
+ return KFileDialog::getSaveFileName( TQDir::homeDirPath() + "/.mozilla",
i18n("*.html|HTML Files (*.html)") );
else
- return KFileDialog::getOpenFileName( QDir::homeDirPath() + "/.mozilla",
+ return KFileDialog::getOpenFileName( TQDir::homeDirPath() + "/.mozilla",
i18n("*.html|HTML Files (*.html)") );
}
else
{
- return QDir::homeDirPath() + "/.netscape/bookmarks.html";
+ return TQDir::homeDirPath() + "/.netscape/bookmarks.html";
}
}
@@ -130,7 +130,7 @@ void KNSBookmarkImporter::parseNSBookmarks( bool utf8 )
importer.parse();
}
-QString KNSBookmarkImporter::netscapeBookmarksFile( bool forSaving )
+TQString KNSBookmarkImporter::netscapeBookmarksFile( bool forSaving )
{
static KNSBookmarkImporterImpl *p = 0;
if (!p)
@@ -141,7 +141,7 @@ QString KNSBookmarkImporter::netscapeBookmarksFile( bool forSaving )
return p->findDefaultLocation(forSaving);
}
-QString KNSBookmarkImporter::mozillaBookmarksFile( bool forSaving )
+TQString KNSBookmarkImporter::mozillaBookmarksFile( bool forSaving )
{
static KNSBookmarkImporterImpl *p = 0;
if (!p)
@@ -163,7 +163,7 @@ void KNSBookmarkExporter::write(bool utf8) {
exporter.write(m_pManager->root());
}
-void KNSBookmarkExporter::writeFolder(QTextStream &/*stream*/, KBookmarkGroup /*gp*/) {
+void KNSBookmarkExporter::writeFolder(TQTextStream &/*stream*/, KBookmarkGroup /*gp*/) {
// TODO - requires a d pointer workaround hack?
}
@@ -174,24 +174,24 @@ void KNSBookmarkExporterImpl::setUtf8(bool utf8) {
}
void KNSBookmarkExporterImpl::write(KBookmarkGroup parent) {
- if (QFile::exists(m_fileName)) {
+ if (TQFile::exists(m_fileName)) {
::rename(
- QFile::encodeName(m_fileName),
- QFile::encodeName(m_fileName + ".beforekde"));
+ TQFile::encodeName(m_fileName),
+ TQFile::encodeName(m_fileName + ".beforekde"));
}
- QFile file(m_fileName);
+ TQFile file(m_fileName);
if (!file.open(IO_WriteOnly)) {
kdError(7043) << "Can't write to file " << m_fileName << endl;
return;
}
- QTextStream fstream(&file);
- fstream.setEncoding(m_utf8 ? QTextStream::UnicodeUTF8 : QTextStream::Locale);
+ TQTextStream fstream(&file);
+ fstream.setEncoding(m_utf8 ? TQTextStream::UnicodeUTF8 : TQTextStream::Locale);
- QString charset
- = m_utf8 ? "UTF-8" : QString::fromLatin1(QTextCodec::codecForLocale()->name()).upper();
+ TQString charset
+ = m_utf8 ? "UTF-8" : TQString::fromLatin1(TQTextCodec::codecForLocale()->name()).upper();
fstream << "<!DOCTYPE NETSCAPE-Bookmark-file-1>" << endl
<< i18n("<!-- This file was generated by Konqueror -->") << endl
@@ -204,9 +204,9 @@ void KNSBookmarkExporterImpl::write(KBookmarkGroup parent) {
<< "</DL><P>" << endl;
}
-QString KNSBookmarkExporterImpl::folderAsString(KBookmarkGroup parent) const {
- QString str;
- QTextStream fstream(&str, IO_WriteOnly);
+TQString KNSBookmarkExporterImpl::folderAsString(KBookmarkGroup parent) const {
+ TQString str;
+ TQTextStream fstream(&str, IO_WriteOnly);
for (KBookmark bk = parent.first(); !bk.isNull(); bk = parent.next(bk)) {
if (bk.isSeparator()) {
@@ -214,7 +214,7 @@ QString KNSBookmarkExporterImpl::folderAsString(KBookmarkGroup parent) const {
continue;
}
- QString text = QStyleSheet::escape(bk.fullText());
+ TQString text = TQStyleSheet::escape(bk.fullText());
if (bk.isGroup() ) {
fstream << "<DT><H3 "
diff --git a/kio/bookmarks/kbookmarkimporter_ns.h b/kio/bookmarks/kbookmarkimporter_ns.h
index 48f6705aa..8b5c76338 100644
--- a/kio/bookmarks/kbookmarkimporter_ns.h
+++ b/kio/bookmarks/kbookmarkimporter_ns.h
@@ -21,9 +21,9 @@
#ifndef __kbookmarkimporter_ns_h
#define __kbookmarkimporter_ns_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ksimpleconfig.h>
#include <kdemacros.h>
@@ -38,7 +38,7 @@ class KIO_EXPORT_DEPRECATED KNSBookmarkImporter : public QObject
{
Q_OBJECT
public:
- KNSBookmarkImporter( const QString & fileName ) : m_fileName(fileName) {}
+ KNSBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
~KNSBookmarkImporter() {}
// for compat reasons only
@@ -46,17 +46,17 @@ public:
// go for it. Set utf8 to true for Mozilla, false for Netscape.
void parseNSBookmarks( bool utf8 );
- static QString netscapeBookmarksFile( bool forSaving=false );
- static QString mozillaBookmarksFile( bool forSaving=false );
+ static TQString netscapeBookmarksFile( bool forSaving=false );
+ static TQString mozillaBookmarksFile( bool forSaving=false );
signals:
- void newBookmark( const QString & text, const QCString & url, const QString & additionalInfo );
- void newFolder( const QString & text, bool open, const QString & additionalInfo );
+ void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo );
+ void newFolder( const TQString & text, bool open, const TQString & additionalInfo );
void newSeparator();
void endFolder();
protected:
- QString m_fileName;
+ TQString m_fileName;
};
/**
@@ -70,7 +70,7 @@ public:
KNSBookmarkImporterImpl() : m_utf8(false) { }
void setUtf8(bool utf8) { m_utf8 = utf8; }
virtual void parse();
- virtual QString findDefaultLocation(bool forSaving = false) const;
+ virtual TQString findDefaultLocation(bool forSaving = false) const;
private:
bool m_utf8;
class KNSBookmarkImporterImplPrivate *d;
@@ -97,7 +97,7 @@ private:
class KIO_EXPORT_DEPRECATED KNSBookmarkExporter
{
public:
- KNSBookmarkExporter(KBookmarkManager* mgr, const QString & fileName)
+ KNSBookmarkExporter(KBookmarkManager* mgr, const TQString & fileName)
: m_fileName(fileName), m_pManager(mgr) { }
~KNSBookmarkExporter() {}
@@ -105,8 +105,8 @@ public:
void write( bool utf8 );
protected:
- void writeFolder(QTextStream &stream, KBookmarkGroup parent);
- QString m_fileName;
+ void writeFolder(TQTextStream &stream, KBookmarkGroup parent);
+ TQString m_fileName;
KBookmarkManager* m_pManager;
};
@@ -116,14 +116,14 @@ protected:
class KIO_EXPORT KNSBookmarkExporterImpl : public KBookmarkExporterBase
{
public:
- KNSBookmarkExporterImpl(KBookmarkManager* mgr, const QString & fileName)
+ KNSBookmarkExporterImpl(KBookmarkManager* mgr, const TQString & fileName)
: KBookmarkExporterBase(mgr, fileName)
{ ; }
virtual ~KNSBookmarkExporterImpl() {}
virtual void write(KBookmarkGroup);
void setUtf8(bool);
protected:
- QString folderAsString(KBookmarkGroup) const;
+ TQString folderAsString(KBookmarkGroup) const;
private:
bool m_utf8;
class KNSBookmarkExporterImplPrivate *d;
diff --git a/kio/bookmarks/kbookmarkimporter_opera.cc b/kio/bookmarks/kbookmarkimporter_opera.cc
index 6e2a90570..45ac1a7ca 100644
--- a/kio/bookmarks/kbookmarkimporter_opera.cc
+++ b/kio/bookmarks/kbookmarkimporter_opera.cc
@@ -22,7 +22,7 @@
#include <kstringhandler.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <sys/types.h>
#include <stddef.h>
@@ -34,20 +34,20 @@
void KOperaBookmarkImporter::parseOperaBookmarks( )
{
- QFile file(m_fileName);
+ TQFile file(m_fileName);
if(!file.open(IO_ReadOnly)) {
return;
}
- QTextCodec * codec = QTextCodec::codecForName("UTF-8");
+ TQTextCodec * codec = TQTextCodec::codecForName("UTF-8");
Q_ASSERT(codec);
if (!codec)
return;
int lineno = 0;
- QString url, name, type;
+ TQString url, name, type;
static const int g_lineLimit = 16*1024;
- QCString line(g_lineLimit);
+ TQCString line(g_lineLimit);
while ( file.readLine(line.data(), g_lineLimit) >=0 ) {
lineno++;
@@ -56,7 +56,7 @@ void KOperaBookmarkImporter::parseOperaBookmarks( )
if ( line[line.length()-1] != '\n' || lineno <= 2 )
continue;
- QString currentLine = codec->toUnicode(line).stripWhiteSpace();
+ TQString currentLine = codec->toUnicode(line).stripWhiteSpace();
if (currentLine.isEmpty()) {
// end of data block
@@ -67,9 +67,9 @@ void KOperaBookmarkImporter::parseOperaBookmarks( )
else if (type == "FOLDER" )
emit newFolder( name, false, "" );
- type = QString::null;
- name = QString::null;
- url = QString::null;
+ type = TQString::null;
+ name = TQString::null;
+ url = TQString::null;
} else if (currentLine == "-") {
// end of folder
@@ -77,7 +77,7 @@ void KOperaBookmarkImporter::parseOperaBookmarks( )
} else {
// data block line
- QString tag;
+ TQString tag;
if ( tag = "#", currentLine.startsWith( tag ) )
type = currentLine.remove( 0, tag.length() );
else if ( tag = "NAME=", currentLine.startsWith( tag ) )
@@ -89,7 +89,7 @@ void KOperaBookmarkImporter::parseOperaBookmarks( )
}
-QString KOperaBookmarkImporter::operaBookmarksFile()
+TQString KOperaBookmarkImporter::operaBookmarksFile()
{
static KOperaBookmarkImporterImpl *p = 0;
if (!p)
@@ -103,13 +103,13 @@ void KOperaBookmarkImporterImpl::parse() {
importer.parseOperaBookmarks();
}
-QString KOperaBookmarkImporterImpl::findDefaultLocation(bool saving) const
+TQString KOperaBookmarkImporterImpl::findDefaultLocation(bool saving) const
{
return saving ? KFileDialog::getSaveFileName(
- QDir::homeDirPath() + "/.opera",
+ TQDir::homeDirPath() + "/.opera",
i18n("*.adr|Opera Bookmark Files (*.adr)") )
: KFileDialog::getOpenFileName(
- QDir::homeDirPath() + "/.opera",
+ TQDir::homeDirPath() + "/.opera",
i18n("*.adr|Opera Bookmark Files (*.adr)") );
}
@@ -118,14 +118,14 @@ QString KOperaBookmarkImporterImpl::findDefaultLocation(bool saving) const
class OperaExporter : private KBookmarkGroupTraverser {
public:
OperaExporter();
- QString generate( const KBookmarkGroup &grp ) { traverse(grp); return m_string; };
+ TQString generate( const KBookmarkGroup &grp ) { traverse(grp); return m_string; };
private:
virtual void visit( const KBookmark & );
virtual void visitEnter( const KBookmarkGroup & );
virtual void visitLeave( const KBookmarkGroup & );
private:
- QString m_string;
- QTextStream m_out;
+ TQString m_string;
+ TQTextStream m_out;
};
OperaExporter::OperaExporter() : m_out(&m_string, IO_WriteOnly) {
@@ -156,14 +156,14 @@ void OperaExporter::visitLeave( const KBookmarkGroup & ) {
void KOperaBookmarkExporterImpl::write(KBookmarkGroup parent) {
OperaExporter exporter;
- QString content = exporter.generate( parent );
- QFile file(m_fileName);
+ TQString content = exporter.generate( parent );
+ TQFile file(m_fileName);
if (!file.open(IO_WriteOnly)) {
kdError(7043) << "Can't write to file " << m_fileName << endl;
return;
}
- QTextStream fstream(&file);
- fstream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream fstream(&file);
+ fstream.setEncoding(TQTextStream::UnicodeUTF8);
fstream << content;
}
diff --git a/kio/bookmarks/kbookmarkimporter_opera.h b/kio/bookmarks/kbookmarkimporter_opera.h
index b179f2f93..e87df2efe 100644
--- a/kio/bookmarks/kbookmarkimporter_opera.h
+++ b/kio/bookmarks/kbookmarkimporter_opera.h
@@ -21,9 +21,9 @@
#ifndef __kbookmarkimporter_opera_h
#define __kbookmarkimporter_opera_h
-#include <qdom.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <ksimpleconfig.h>
#include <kbookmarkimporter.h>
@@ -36,22 +36,22 @@ class KIO_EXPORT_DEPRECATED KOperaBookmarkImporter : public QObject
{
Q_OBJECT
public:
- KOperaBookmarkImporter( const QString & fileName ) : m_fileName(fileName) {}
+ KOperaBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
~KOperaBookmarkImporter() {}
void parseOperaBookmarks();
// Usual place for Opera bookmarks
- static QString operaBookmarksFile();
+ static TQString operaBookmarksFile();
signals:
- void newBookmark( const QString & text, const QCString & url, const QString & additionalInfo );
- void newFolder( const QString & text, bool open, const QString & additionalInfo );
+ void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo );
+ void newFolder( const TQString & text, bool open, const TQString & additionalInfo );
void newSeparator();
void endFolder();
protected:
- QString m_fileName;
+ TQString m_fileName;
};
/**
@@ -63,7 +63,7 @@ class KIO_EXPORT KOperaBookmarkImporterImpl : public KBookmarkImporterBase
public:
KOperaBookmarkImporterImpl() { }
virtual void parse();
- virtual QString findDefaultLocation(bool forSaving = false) const;
+ virtual TQString findDefaultLocation(bool forSaving = false) const;
private:
class KOperaBookmarkImporterImplPrivate *d;
};
@@ -74,7 +74,7 @@ private:
class KIO_EXPORT KOperaBookmarkExporterImpl : public KBookmarkExporterBase
{
public:
- KOperaBookmarkExporterImpl(KBookmarkManager* mgr, const QString & filename)
+ KOperaBookmarkExporterImpl(KBookmarkManager* mgr, const TQString & filename)
: KBookmarkExporterBase(mgr, filename)
{ ; }
virtual ~KOperaBookmarkExporterImpl() {}
diff --git a/kio/bookmarks/kbookmarkmanager.cc b/kio/bookmarks/kbookmarkmanager.cc
index d101c1f7f..1a9e5dc4e 100644
--- a/kio/bookmarks/kbookmarkmanager.cc
+++ b/kio/bookmarks/kbookmarkmanager.cc
@@ -28,17 +28,17 @@
#include <kstandarddirs.h>
#include <ksavefile.h>
#include <dcopref.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
#include <kprocess.h>
#include <klocale.h>
#include <kapplication.h>
#include <dcopclient.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
#include <kstaticdeleter.h>
-#include <qptrstack.h>
+#include <tqptrstack.h>
#include "dptrtemplate.h"
@@ -46,32 +46,32 @@ class KBookmarkManagerPrivate : public dPtrTemplate<KBookmarkManager, KBookmarkM
public:
KBookmarkManagerPrivate()
{ m_browserEditor = true; }
- QString m_editorCaption;
+ TQString m_editorCaption;
bool m_browserEditor;
};
-template<> QPtrDict<KBookmarkManagerPrivate>* dPtrTemplate<KBookmarkManager, KBookmarkManagerPrivate>::d_ptr = 0;
+template<> TQPtrDict<KBookmarkManagerPrivate>* dPtrTemplate<KBookmarkManager, KBookmarkManagerPrivate>::d_ptr = 0;
KBookmarkManagerPrivate* KBookmarkManager::dptr() const {
return KBookmarkManagerPrivate::d( this );
}
// TODO - clean this stuff up by just using the above dptrtemplate?
-QPtrList<KBookmarkManager>* KBookmarkManager::s_pSelf;
-static KStaticDeleter<QPtrList<KBookmarkManager> > sdbm;
+TQPtrList<KBookmarkManager>* KBookmarkManager::s_pSelf;
+static KStaticDeleter<TQPtrList<KBookmarkManager> > sdbm;
class KBookmarkMap : private KBookmarkGroupTraverser {
public:
KBookmarkMap( KBookmarkManager * );
void update();
- QValueList<KBookmark> find( const QString &url ) const
+ TQValueList<KBookmark> find( const TQString &url ) const
{ return m_bk_map[url]; }
private:
virtual void visit(const KBookmark &);
virtual void visitEnter(const KBookmarkGroup &) { ; }
virtual void visitLeave(const KBookmarkGroup &) { ; }
private:
- typedef QValueList<KBookmark> KBookmarkList;
- QMap<QString, KBookmarkList> m_bk_map;
+ typedef TQValueList<KBookmark> KBookmarkList;
+ TQMap<TQString, KBookmarkList> m_bk_map;
KBookmarkManager *m_manager;
};
@@ -97,13 +97,13 @@ void KBookmarkMap::visit(const KBookmark &bk)
}
-KBookmarkManager* KBookmarkManager::managerForFile( const QString& bookmarksFile, bool bImportDesktopFiles )
+KBookmarkManager* KBookmarkManager::managerForFile( const TQString& bookmarksFile, bool bImportDesktopFiles )
{
if ( !s_pSelf ) {
- sdbm.setObject( s_pSelf, new QPtrList<KBookmarkManager> );
+ sdbm.setObject( s_pSelf, new TQPtrList<KBookmarkManager> );
s_pSelf->setAutoDelete( true );
}
- QPtrListIterator<KBookmarkManager> it ( *s_pSelf );
+ TQPtrListIterator<KBookmarkManager> it ( *s_pSelf );
for ( ; it.current() ; ++it )
if ( it.current()->path() == bookmarksFile )
return it.current();
@@ -117,7 +117,7 @@ KBookmarkManager* KBookmarkManager::managerForFile( const QString& bookmarksFile
KBookmarkManager* KBookmarkManager::createTempManager()
{
if ( !s_pSelf ) {
- sdbm.setObject( s_pSelf, new QPtrList<KBookmarkManager> );
+ sdbm.setObject( s_pSelf, new TQPtrList<KBookmarkManager> );
s_pSelf->setAutoDelete( true );
}
KBookmarkManager* mgr = new KBookmarkManager();
@@ -127,8 +127,8 @@ KBookmarkManager* KBookmarkManager::createTempManager()
#define PI_DATA "version=\"1.0\" encoding=\"UTF-8\""
-KBookmarkManager::KBookmarkManager( const QString & bookmarksFile, bool bImportDesktopFiles )
- : DCOPObject(QCString("KBookmarkManager-")+bookmarksFile.utf8()), m_doc("xbel"), m_docIsLoaded(false)
+KBookmarkManager::KBookmarkManager( const TQString & bookmarksFile, bool bImportDesktopFiles )
+ : DCOPObject(TQCString("KBookmarkManager-")+bookmarksFile.utf8()), m_doc("xbel"), m_docIsLoaded(false)
{
m_toolbarDoc.clear();
@@ -138,9 +138,9 @@ KBookmarkManager::KBookmarkManager( const QString & bookmarksFile, bool bImportD
Q_ASSERT( !bookmarksFile.isEmpty() );
m_bookmarksFile = bookmarksFile;
- if ( !QFile::exists(m_bookmarksFile) )
+ if ( !TQFile::exists(m_bookmarksFile) )
{
- QDomElement topLevel = m_doc.createElement("xbel");
+ TQDomElement topLevel = m_doc.createElement("xbel");
m_doc.appendChild( topLevel );
m_doc.insertBefore( m_doc.createProcessingInstruction( "xml", PI_DATA), topLevel );
if ( bImportDesktopFiles )
@@ -148,27 +148,27 @@ KBookmarkManager::KBookmarkManager( const QString & bookmarksFile, bool bImportD
m_docIsLoaded = true;
}
- connectDCOPSignal(0, objId(), "bookmarksChanged(QString)", "notifyChanged(QString)", false);
+ connectDCOPSignal(0, objId(), "bookmarksChanged(TQString)", "notifyChanged(TQString)", false);
connectDCOPSignal(0, objId(), "bookmarkConfigChanged()", "notifyConfigChanged()", false);
}
KBookmarkManager::KBookmarkManager( )
- : DCOPObject(QCString("KBookmarkManager-generated")), m_doc("xbel"), m_docIsLoaded(true)
+ : DCOPObject(TQCString("KBookmarkManager-generated")), m_doc("xbel"), m_docIsLoaded(true)
{
m_toolbarDoc.clear(); // strange ;-)
m_update = false; // TODO - make it read/write
m_showNSBookmarks = true;
- m_bookmarksFile = QString::null; // AK - check all codepaths for this one
+ m_bookmarksFile = TQString::null; // AK - check all codepaths for this one
- QDomElement topLevel = m_doc.createElement("xbel");
+ TQDomElement topLevel = m_doc.createElement("xbel");
m_doc.appendChild( topLevel );
m_doc.insertBefore( m_doc.createProcessingInstruction( "xml", PI_DATA), topLevel );
// TODO - enable this via some sort of api and fix the above DCOPObject script somehow
#if 0
- connectDCOPSignal(0, objId(), "bookmarksChanged(QString)", "notifyChanged(QString)", false);
+ connectDCOPSignal(0, objId(), "bookmarksChanged(TQString)", "notifyChanged(TQString)", false);
connectDCOPSignal(0, objId(), "bookmarkConfigChanged()", "notifyConfigChanged()", false);
#endif
}
@@ -184,7 +184,7 @@ void KBookmarkManager::setUpdate( bool update )
m_update = update;
}
-const QDomDocument &KBookmarkManager::internalDocument() const
+const TQDomDocument &KBookmarkManager::internalDocument() const
{
if(!m_docIsLoaded)
{
@@ -199,21 +199,21 @@ void KBookmarkManager::parse() const
{
m_docIsLoaded = true;
//kdDebug(7043) << "KBookmarkManager::parse " << m_bookmarksFile << endl;
- QFile file( m_bookmarksFile );
+ TQFile file( m_bookmarksFile );
if ( !file.open( IO_ReadOnly ) )
{
kdWarning() << "Can't open " << m_bookmarksFile << endl;
return;
}
- m_doc = QDomDocument("xbel");
+ m_doc = TQDomDocument("xbel");
m_doc.setContent( &file );
- QDomElement docElem = m_doc.documentElement();
+ TQDomElement docElem = m_doc.documentElement();
if ( docElem.isNull() )
kdWarning() << "KBookmarkManager::parse : can't parse " << m_bookmarksFile << endl;
else
{
- QString mainTag = docElem.tagName();
+ TQString mainTag = docElem.tagName();
if ( mainTag == "BOOKMARKS" )
{
kdWarning() << "Old style bookmarks found. Calling convertToXBEL." << endl;
@@ -230,14 +230,14 @@ void KBookmarkManager::parse() const
else if ( mainTag != "xbel" )
kdWarning() << "KBookmarkManager::parse : unknown main tag " << mainTag << endl;
- QDomNode n = m_doc.documentElement().previousSibling();
+ TQDomNode n = m_doc.documentElement().previousSibling();
if ( n.isProcessingInstruction() )
{
- QDomProcessingInstruction pi = n.toProcessingInstruction();
+ TQDomProcessingInstruction pi = n.toProcessingInstruction();
pi.parentNode().removeChild(pi);
}
- QDomProcessingInstruction pi;
+ TQDomProcessingInstruction pi;
pi = m_doc.createProcessingInstruction( "xml", PI_DATA );
m_doc.insertBefore( pi, docElem );
}
@@ -248,12 +248,12 @@ void KBookmarkManager::parse() const
s_bk_map->update();
}
-void KBookmarkManager::convertToXBEL( QDomElement & group )
+void KBookmarkManager::convertToXBEL( TQDomElement & group )
{
- QDomNode n = group.firstChild();
+ TQDomNode n = group.firstChild();
while( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !e.isNull() )
if ( e.tagName() == "TEXT" )
{
@@ -286,10 +286,10 @@ void KBookmarkManager::convertToXBEL( QDomElement & group )
convertAttribute(e, "ICON","icon"); // non standard, but we need it
convertAttribute(e, "NETSCAPEINFO","netscapeinfo"); // idem
convertAttribute(e, "URL","href");
- QString text = e.text();
+ TQString text = e.text();
while ( !e.firstChild().isNull() ) // clean up the old contained text
e.removeChild(e.firstChild());
- QDomElement titleElem = e.ownerDocument().createElement("title");
+ TQDomElement titleElem = e.ownerDocument().createElement("title");
e.appendChild( titleElem ); // should be the only child anyway
titleElem.appendChild( e.ownerDocument().createTextNode( text ) );
}
@@ -299,7 +299,7 @@ void KBookmarkManager::convertToXBEL( QDomElement & group )
}
}
-void KBookmarkManager::convertAttribute( QDomElement elem, const QString & oldName, const QString & newName )
+void KBookmarkManager::convertAttribute( TQDomElement elem, const TQString & oldName, const TQString & newName )
{
if ( elem.hasAttribute( oldName ) )
{
@@ -310,8 +310,8 @@ void KBookmarkManager::convertAttribute( QDomElement elem, const QString & oldNa
void KBookmarkManager::importDesktopFiles()
{
- KBookmarkImporter importer( const_cast<QDomDocument *>(&internalDocument()) );
- QString path(KGlobal::dirs()->saveLocation("data", "kfm/bookmarks", true));
+ KBookmarkImporter importer( const_cast<TQDomDocument *>(&internalDocument()) );
+ TQString path(KGlobal::dirs()->saveLocation("data", "kfm/bookmarks", true));
importer.import( path );
//kdDebug(7043) << internalDocument().toCString() << endl;
@@ -323,36 +323,36 @@ bool KBookmarkManager::save( bool toolbarCache ) const
return saveAs( m_bookmarksFile, toolbarCache );
}
-bool KBookmarkManager::saveAs( const QString & filename, bool toolbarCache ) const
+bool KBookmarkManager::saveAs( const TQString & filename, bool toolbarCache ) const
{
kdDebug(7043) << "KBookmarkManager::save " << filename << endl;
// Save the bookmark toolbar folder for quick loading
// but only when it will actually make things quicker
- const QString cacheFilename = filename + QString::fromLatin1(".tbcache");
+ const TQString cacheFilename = filename + TQString::fromLatin1(".tbcache");
if(toolbarCache && !root().isToolbarGroup())
{
KSaveFile cacheFile( cacheFilename );
if ( cacheFile.status() == 0 )
{
- QString str;
- QTextStream stream(&str, IO_WriteOnly);
+ TQString str;
+ TQTextStream stream(&str, IO_WriteOnly);
stream << root().findToolbar();
- QCString cstr = str.utf8();
+ TQCString cstr = str.utf8();
cacheFile.file()->writeBlock( cstr.data(), cstr.length() );
cacheFile.close();
}
}
else // remove any (now) stale cache
{
- QFile::remove( cacheFilename );
+ TQFile::remove( cacheFilename );
}
KSaveFile file( filename );
if ( file.status() == 0 )
{
- file.backupFile( file.name(), QString::null, ".bak" );
- QCString cstr;
+ file.backupFile( file.name(), TQString::null, ".bak" );
+ TQCString cstr;
cstr = internalDocument().toCString(); // is in UTF8
file.file()->writeBlock( cstr.data(), cstr.length() );
if ( file.close() )
@@ -362,12 +362,12 @@ bool KBookmarkManager::saveAs( const QString & filename, bool toolbarCache ) con
static int hadSaveError = false;
file.abort();
if ( !hadSaveError ) {
- QString error = i18n("Unable to save bookmarks in %1. Reported error was: %2. "
+ TQString error = i18n("Unable to save bookmarks in %1. Reported error was: %2. "
"This error message will only be shown once. The cause "
"of the error needs to be fixed as quickly as possible, "
"which is most likely a full hard drive.")
- .arg(filename).arg(QString::fromLocal8Bit(strerror(file.status())));
- if (qApp->type() != QApplication::Tty)
+ .arg(filename).arg(TQString::fromLocal8Bit(strerror(file.status())));
+ if (qApp->type() != TQApplication::Tty)
KMessageBox::error( 0L, error );
else
kdError() << error << endl;
@@ -388,19 +388,19 @@ KBookmarkGroup KBookmarkManager::toolbar()
if(!m_docIsLoaded)
{
kdDebug(7043) << "KBookmarkManager::toolbar trying cache" << endl;
- const QString cacheFilename = m_bookmarksFile + QString::fromLatin1(".tbcache");
- QFileInfo bmInfo(m_bookmarksFile);
- QFileInfo cacheInfo(cacheFilename);
+ const TQString cacheFilename = m_bookmarksFile + TQString::fromLatin1(".tbcache");
+ TQFileInfo bmInfo(m_bookmarksFile);
+ TQFileInfo cacheInfo(cacheFilename);
if (m_toolbarDoc.isNull() &&
- QFile::exists(cacheFilename) &&
+ TQFile::exists(cacheFilename) &&
bmInfo.lastModified() < cacheInfo.lastModified())
{
kdDebug(7043) << "KBookmarkManager::toolbar reading file" << endl;
- QFile file( cacheFilename );
+ TQFile file( cacheFilename );
if ( file.open( IO_ReadOnly ) )
{
- m_toolbarDoc = QDomDocument("cache");
+ m_toolbarDoc = TQDomDocument("cache");
m_toolbarDoc.setContent( &file );
kdDebug(7043) << "KBookmarkManager::toolbar opened" << endl;
}
@@ -408,28 +408,28 @@ KBookmarkGroup KBookmarkManager::toolbar()
if (!m_toolbarDoc.isNull())
{
kdDebug(7043) << "KBookmarkManager::toolbar returning element" << endl;
- QDomElement elem = m_toolbarDoc.firstChild().toElement();
+ TQDomElement elem = m_toolbarDoc.firstChild().toElement();
return KBookmarkGroup(elem);
}
}
// Fallback to the normal way if there is no cache or if the bookmark file
// is already loaded
- QDomElement elem = root().findToolbar();
+ TQDomElement elem = root().findToolbar();
if (elem.isNull())
return root(); // Root is the bookmark toolbar if none has been set.
else
return KBookmarkGroup(root().findToolbar());
}
-KBookmark KBookmarkManager::findByAddress( const QString & address, bool tolerant )
+KBookmark KBookmarkManager::findByAddress( const TQString & address, bool tolerant )
{
//kdDebug(7043) << "KBookmarkManager::findByAddress " << address << endl;
KBookmark result = root();
// The address is something like /5/10/2+
- QStringList addresses = QStringList::split(QRegExp("[/+]"),address);
+ TQStringList addresses = TQStringList::split(TQRegExp("[/+]"),address);
// kdWarning() << addresses.join(",") << endl;
- for ( QStringList::Iterator it = addresses.begin() ; it != addresses.end() ; )
+ for ( TQStringList::Iterator it = addresses.begin() ; it != addresses.end() ; )
{
bool append = ((*it) == "+");
uint number = (*it).toUInt();
@@ -459,13 +459,13 @@ KBookmark KBookmarkManager::findByAddress( const QString & address, bool toleran
return result;
}
-static QString pickUnusedTitle( KBookmarkGroup parentBookmark,
- const QString &title, const QString &url
+static TQString pickUnusedTitle( KBookmarkGroup parentBookmark,
+ const TQString &title, const TQString &url
) {
// If this title is already used, we'll try to find something unused.
KBookmark ch = parentBookmark.first();
int count = 1;
- QString uniqueTitle = title;
+ TQString uniqueTitle = title;
do
{
while ( !ch.isNull() )
@@ -475,7 +475,7 @@ static QString pickUnusedTitle( KBookmarkGroup parentBookmark,
// Title already used !
if ( url != ch.url().url() )
{
- uniqueTitle = title + QString(" (%1)").arg(++count);
+ uniqueTitle = title + TQString(" (%1)").arg(++count);
// New title -> restart search from the beginning
ch = parentBookmark.first();
break;
@@ -483,7 +483,7 @@ static QString pickUnusedTitle( KBookmarkGroup parentBookmark,
else
{
// this exact URL already exists
- return QString::null;
+ return TQString::null;
}
}
ch = parentBookmark.next( ch );
@@ -494,12 +494,12 @@ static QString pickUnusedTitle( KBookmarkGroup parentBookmark,
}
KBookmarkGroup KBookmarkManager::addBookmarkDialog(
- const QString & _url, const QString & _title,
- const QString & _parentBookmarkAddress
+ const TQString & _url, const TQString & _title,
+ const TQString & _parentBookmarkAddress
) {
- QString url = _url;
- QString title = _title;
- QString parentBookmarkAddress = _parentBookmarkAddress;
+ TQString url = _url;
+ TQString title = _title;
+ TQString parentBookmarkAddress = _parentBookmarkAddress;
if ( url.isEmpty() )
{
@@ -524,7 +524,7 @@ KBookmarkGroup KBookmarkManager::addBookmarkDialog(
parentBookmark = findByAddress( parentBookmarkAddress ).toGroup();
Q_ASSERT( !parentBookmark.isNull() );
- QString uniqueTitle = pickUnusedTitle( parentBookmark, title, url );
+ TQString uniqueTitle = pickUnusedTitle( parentBookmark, title, url );
if ( !uniqueTitle.isNull() )
parentBookmark.addBookmark( this, uniqueTitle, KURL( url ));
@@ -539,11 +539,11 @@ void KBookmarkManager::emitChanged( /*KDE4 const*/ KBookmarkGroup & group )
// Tell the other processes too
// kdDebug(7043) << "KBookmarkManager::emitChanged : broadcasting change " << group.address() << endl;
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
ds << group.address();
- emitDCOPSignal("bookmarksChanged(QString)", data);
+ emitDCOPSignal("bookmarksChanged(TQString)", data);
// We do get our own broadcast, so no need for this anymore
//emit changed( group );
@@ -551,10 +551,10 @@ void KBookmarkManager::emitChanged( /*KDE4 const*/ KBookmarkGroup & group )
void KBookmarkManager::emitConfigChanged()
{
- emitDCOPSignal("bookmarkConfigChanged()", QByteArray());
+ emitDCOPSignal("bookmarkConfigChanged()", TQByteArray());
}
-void KBookmarkManager::notifyCompleteChange( QString caller ) // DCOP call
+void KBookmarkManager::notifyCompleteChange( TQString caller ) // DCOP call
{
if (!m_update) return;
@@ -574,7 +574,7 @@ void KBookmarkManager::notifyConfigChanged() // DCOP call
parse(); // reload, and thusly recreate the menus
}
-void KBookmarkManager::notifyChanged( QString groupAddress ) // DCOP call
+void KBookmarkManager::notifyChanged( TQString groupAddress ) // DCOP call
{
if (!m_update) return;
@@ -586,7 +586,7 @@ void KBookmarkManager::notifyChanged( QString groupAddress ) // DCOP call
//kdDebug(7043) << "KBookmarkManager::notifyChanged " << groupAddress << endl;
//KBookmarkGroup group = findByAddress( groupAddress ).toGroup();
//Q_ASSERT(!group.isNull());
- emit changed( groupAddress, QString::null );
+ emit changed( groupAddress, TQString::null );
}
bool KBookmarkManager::showNSBookmarks() const
@@ -605,7 +605,7 @@ void KBookmarkManager::setShowNSBookmarks( bool show )
KBookmarkMenu::setDynamicBookmarks("netscape", info);
}
-void KBookmarkManager::setEditorOptions( const QString& caption, bool browser )
+void KBookmarkManager::setEditorOptions( const TQString& caption, bool browser )
{
dptr()->m_editorCaption = caption;
dptr()->m_browserEditor = browser;
@@ -614,27 +614,27 @@ void KBookmarkManager::setEditorOptions( const QString& caption, bool browser )
void KBookmarkManager::slotEditBookmarks()
{
KProcess proc;
- proc << QString::fromLatin1("keditbookmarks");
+ proc << TQString::fromLatin1("keditbookmarks");
if (!dptr()->m_editorCaption.isNull())
- proc << QString::fromLatin1("--customcaption") << dptr()->m_editorCaption;
+ proc << TQString::fromLatin1("--customcaption") << dptr()->m_editorCaption;
if (!dptr()->m_browserEditor)
- proc << QString::fromLatin1("--nobrowser");
+ proc << TQString::fromLatin1("--nobrowser");
proc << m_bookmarksFile;
proc.start(KProcess::DontCare);
}
-void KBookmarkManager::slotEditBookmarksAtAddress( const QString& address )
+void KBookmarkManager::slotEditBookmarksAtAddress( const TQString& address )
{
KProcess proc;
- proc << QString::fromLatin1("keditbookmarks")
- << QString::fromLatin1("--address") << address
+ proc << TQString::fromLatin1("keditbookmarks")
+ << TQString::fromLatin1("--address") << address
<< m_bookmarksFile;
proc.start(KProcess::DontCare);
}
///////
-void KBookmarkOwner::openBookmarkURL( const QString& url )
+void KBookmarkOwner::openBookmarkURL( const TQString& url )
{
(void) new KRun(KURL( url ));
}
@@ -642,18 +642,18 @@ void KBookmarkOwner::openBookmarkURL( const QString& url )
void KBookmarkOwner::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-bool KBookmarkManager::updateAccessMetadata( const QString & url, bool emitSignal )
+bool KBookmarkManager::updateAccessMetadata( const TQString & url, bool emitSignal )
{
if (!s_bk_map) {
s_bk_map = new KBookmarkMap(this);
s_bk_map->update();
}
- QValueList<KBookmark> list = s_bk_map->find(url);
+ TQValueList<KBookmark> list = s_bk_map->find(url);
if ( list.count() == 0 )
return false;
- for ( QValueList<KBookmark>::iterator it = list.begin();
+ for ( TQValueList<KBookmark>::iterator it = list.begin();
it != list.end(); ++it )
(*it).updateAccessMetadata();
@@ -663,7 +663,7 @@ bool KBookmarkManager::updateAccessMetadata( const QString & url, bool emitSigna
return true;
}
-void KBookmarkManager::updateFavicon( const QString &url, const QString &faviconurl, bool emitSignal )
+void KBookmarkManager::updateFavicon( const TQString &url, const TQString &faviconurl, bool emitSignal )
{
Q_UNUSED(faviconurl);
@@ -672,8 +672,8 @@ void KBookmarkManager::updateFavicon( const QString &url, const QString &favicon
s_bk_map->update();
}
- QValueList<KBookmark> list = s_bk_map->find(url);
- for ( QValueList<KBookmark>::iterator it = list.begin();
+ TQValueList<KBookmark> list = s_bk_map->find(url);
+ for ( TQValueList<KBookmark>::iterator it = list.begin();
it != list.end(); ++it )
{
// TODO - update favicon data based on faviconurl
@@ -688,9 +688,9 @@ void KBookmarkManager::updateFavicon( const QString &url, const QString &favicon
}
}
-QString KBookmarkManager::userBookmarksFile()
+TQString KBookmarkManager::userBookmarksFile()
{
- return locateLocal("data", QString::fromLatin1("konqueror/bookmarks.xml"));
+ return locateLocal("data", TQString::fromLatin1("konqueror/bookmarks.xml"));
}
KBookmarkManager* KBookmarkManager::userBookmarksManager()
diff --git a/kio/bookmarks/kbookmarkmanager.h b/kio/bookmarks/kbookmarkmanager.h
index 03d0ac0c6..403a2e1b3 100644
--- a/kio/bookmarks/kbookmarkmanager.h
+++ b/kio/bookmarks/kbookmarkmanager.h
@@ -20,10 +20,10 @@
#ifndef __kbookmarkmanager_h
#define __kbookmarkmanager_h
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqdom.h>
#include <dcopobject.h>
#include "kbookmark.h"
#include "kbookmarknotifier.h"
@@ -50,7 +50,7 @@
* </xbel>
* \endcode
*/
-class KIO_EXPORT KBookmarkManager : public QObject, public DCOPObject
+class KIO_EXPORT KBookmarkManager : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -69,7 +69,7 @@ protected:
* @param bImportDesktopFiles if true, and if the bookmarksFile
* doesn't already exist, import bookmarks from desktop files
*/
- KBookmarkManager( const QString & bookmarksFile, bool bImportDesktopFiles = true );
+ KBookmarkManager( const TQString & bookmarksFile, bool bImportDesktopFiles = true );
/**
* @since 3.2
@@ -103,7 +103,7 @@ public:
* @param toolbarCache iff true save a cache of the toolbar folder, too
* @return true if saving was successful
*/
- bool saveAs( const QString & filename, bool toolbarCache = true ) const;
+ bool saveAs( const TQString & filename, bool toolbarCache = true ) const;
/**
* Update access time stamps for a given url.
@@ -112,7 +112,7 @@ public:
* @since 3.2
* @return true if any metadata was modified (bookmarks file is not saved automatically)
*/
- bool updateAccessMetadata( const QString &url, bool emitSignal = true );
+ bool updateAccessMetadata( const TQString &url, bool emitSignal = true );
/*
* NB. currently *unimplemented*
@@ -123,7 +123,7 @@ public:
* @emitSignal iff true emit KBookmarkNotifier signal
* @since 3.3
*/
- void updateFavicon( const QString &url, const QString &faviconurl, bool emitSignal = true );
+ void updateFavicon( const TQString &url, const TQString &faviconurl, bool emitSignal = true );
/**
* This will return the path that this manager is using to read
@@ -131,7 +131,7 @@ public:
* @internal
* @return the path containing the bookmarks
*/
- QString path() { return m_bookmarksFile; }
+ TQString path() { return m_bookmarksFile; }
/**
* This will return the root bookmark. It is used to iterate
@@ -155,7 +155,7 @@ public:
* @param tolerate when true tries to find the most tolerable bookmark position
* @see KBookmark::address
*/
- KBookmark findByAddress( const QString & address, bool tolerate = false );
+ KBookmark findByAddress( const TQString & address, bool tolerate = false );
/**
* Saves the bookmark file and notifies everyone.
@@ -188,7 +188,7 @@ public:
* menu items in keditbookmarks :: --nobrowser
* @since 3.2
*/
- void setEditorOptions( const QString& caption, bool browser );
+ void setEditorOptions( const TQString& caption, bool browser );
/**
* This static function will return an instance of the
@@ -206,7 +206,7 @@ public:
* doesn't already exist, import bookmarks from desktop files
* @return a pointer to an instance of the KBookmarkManager.
*/
- static KBookmarkManager* managerForFile( const QString& bookmarksFile,
+ static KBookmarkManager* managerForFile( const TQString& bookmarksFile,
bool bImportDesktopFiles = true );
@@ -222,12 +222,12 @@ public:
* Returns the path to the user's main bookmark collection file.
* @since 3.5.5
*/
- static QString userBookmarksFile();
+ static TQString userBookmarksFile();
/**
* @internal
*/
- const QDomDocument & internalDocument() const;
+ const TQDomDocument & internalDocument() const;
/**
* Access to bookmark notifier, for emitting signals.
@@ -239,12 +239,12 @@ public:
/**
* @since 3.2
*/
- KBookmarkGroup addBookmarkDialog( const QString & _url, const QString & _title,
- const QString & _parentBookmarkAddress = QString::null );
+ KBookmarkGroup addBookmarkDialog( const TQString & _url, const TQString & _title,
+ const TQString & _parentBookmarkAddress = TQString::null );
public slots:
void slotEditBookmarks();
- void slotEditBookmarksAtAddress( const QString& address );
+ void slotEditBookmarksAtAddress( const TQString& address );
public:
k_dcop:
@@ -252,7 +252,7 @@ k_dcop:
* Reparse the whole bookmarks file and notify about the change
* (Called by the bookmark editor)
*/
- ASYNC notifyCompleteChange( QString caller );
+ ASYNC notifyCompleteChange( TQString caller );
/**
* Emit the changed signal for the group whose address is given
@@ -260,7 +260,7 @@ k_dcop:
* Called by the instance of konqueror that saved the file after
* a small change (new bookmark or new folder).
*/
- ASYNC notifyChanged( QString groupAddress );
+ ASYNC notifyChanged( TQString groupAddress );
ASYNC notifyConfigChanged();
@@ -270,23 +270,23 @@ signals:
* @p groupAddress (e.g. "/4/5")
* has been modified by the caller @p caller.
*/
- void changed( const QString & groupAddress, const QString & caller );
+ void changed( const TQString & groupAddress, const TQString & caller );
protected:
// consts added to avoid a copy-and-paste of internalDocument
void parse() const;
void importDesktopFiles();
- static void convertToXBEL( QDomElement & group );
- static void convertAttribute( QDomElement elem, const QString & oldName, const QString & newName );
+ static void convertToXBEL( TQDomElement & group );
+ static void convertAttribute( TQDomElement elem, const TQString & oldName, const TQString & newName );
private:
KBookmarkNotifier m_notifier;
- QString m_bookmarksFile;
- mutable QDomDocument m_doc;
- mutable QDomDocument m_toolbarDoc;
+ TQString m_bookmarksFile;
+ mutable TQDomDocument m_doc;
+ mutable TQDomDocument m_toolbarDoc;
mutable bool m_docIsLoaded;
bool m_update;
- static QPtrList<KBookmarkManager>* s_pSelf;
+ static TQPtrList<KBookmarkManager>* s_pSelf;
bool m_showNSBookmarks;
private:
@@ -321,7 +321,7 @@ public:
* This function is called if the user selects a bookmark. It will
* open up the bookmark in a default fashion unless you override it.
*/
- virtual void openBookmarkURL(const QString& _url);
+ virtual void openBookmarkURL(const TQString& _url);
/**
* This function is called whenever the user wants to add the
@@ -331,7 +331,7 @@ public:
*
* @return the title of the current page.
*/
- virtual QString currentTitle() const { return QString::null; }
+ virtual TQString currentTitle() const { return TQString::null; }
/**
* This function is called whenever the user wants to add the
@@ -341,7 +341,7 @@ public:
*
* @return the URL of the current page.
*/
- virtual QString currentURL() const { return QString::null; }
+ virtual TQString currentURL() const { return TQString::null; }
protected:
virtual void virtual_hook( int id, void* data );
@@ -350,11 +350,11 @@ protected:
/**
* @since 3.2
*/
-class KIO_EXPORT KExtendedBookmarkOwner : public QObject, virtual public KBookmarkOwner
+class KIO_EXPORT KExtendedBookmarkOwner : public TQObject, virtual public KBookmarkOwner
{
Q_OBJECT
public:
- typedef QValueList<QPair<QString,QString> > QStringPairList;
+ typedef TQValueList<QPair<TQString,TQString> > QStringPairList;
public slots:
void fillBookmarksList( KExtendedBookmarkOwner::QStringPairList & list ) { emit signalFillBookmarksList( list ); };
signals:
diff --git a/kio/bookmarks/kbookmarkmenu.cc b/kio/bookmarks/kbookmarkmenu.cc
index 0e1dfe35c..69c9debd6 100644
--- a/kio/bookmarks/kbookmarkmenu.cc
+++ b/kio/bookmarks/kbookmarkmenu.cc
@@ -39,34 +39,34 @@
#include <kstdaction.h>
#include <kstringhandler.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
#include <dptrtemplate.h>
-template class QPtrList<KBookmarkMenu>;
+template class TQPtrList<KBookmarkMenu>;
-static QString makeTextNodeMod(KBookmark bk, const QString &m_nodename, const QString &m_newText) {
- QDomNode subnode = bk.internalElement().namedItem(m_nodename);
+static TQString makeTextNodeMod(KBookmark bk, const TQString &m_nodename, const TQString &m_newText) {
+ TQDomNode subnode = bk.internalElement().namedItem(m_nodename);
if (subnode.isNull()) {
subnode = bk.internalElement().ownerDocument().createElement(m_nodename);
bk.internalElement().appendChild(subnode);
}
if (subnode.firstChild().isNull()) {
- QDomText domtext = subnode.ownerDocument().createTextNode("");
+ TQDomText domtext = subnode.ownerDocument().createTextNode("");
subnode.appendChild(domtext);
}
- QDomText domtext = subnode.firstChild().toText();
+ TQDomText domtext = subnode.firstChild().toText();
- QString m_oldText = domtext.data();
+ TQString m_oldText = domtext.data();
domtext.setData(m_newText);
return m_oldText;
@@ -79,8 +79,8 @@ static QString makeTextNodeMod(KBookmark bk, const QString &m_nodename, const QS
KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr,
KBookmarkOwner * _owner, KPopupMenu * _parentMenu,
KActionCollection *collec, bool _isRoot, bool _add,
- const QString & parentAddress )
- : QObject(),
+ const TQString & parentAddress )
+ : TQObject(),
m_bIsRoot(_isRoot), m_bAddBookmark(_add),
m_bAddShortcuts(true),
m_pManager(mgr), m_pOwner(_owner),
@@ -96,9 +96,9 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr,
if (m_actionCollection)
{
m_actionCollection->setHighlightingEnabled(true);
- disconnect( m_actionCollection, SIGNAL( actionHighlighted( KAction * ) ), 0, 0 );
- connect( m_actionCollection, SIGNAL( actionHighlighted( KAction * ) ),
- this, SLOT( slotActionHighlighted( KAction * ) ) );
+ disconnect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ), 0, 0 );
+ connect( m_actionCollection, TQT_SIGNAL( actionHighlighted( KAction * ) ),
+ this, TQT_SLOT( slotActionHighlighted( KAction * ) ) );
}
m_bNSBookmark = m_parentAddress.isNull();
@@ -106,20 +106,20 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr,
{
//kdDebug(7043) << "KBookmarkMenu::KBookmarkMenu " << this << " address : " << m_parentAddress << endl;
- connect( _parentMenu, SIGNAL( aboutToShow() ),
- SLOT( slotAboutToShow() ) );
+ connect( _parentMenu, TQT_SIGNAL( aboutToShow() ),
+ TQT_SLOT( slotAboutToShow() ) );
if ( KBookmarkSettings::self()->m_contextmenu )
{
(void) _parentMenu->contextMenu();
- connect( _parentMenu, SIGNAL( aboutToShowContextMenu(KPopupMenu*, int, QPopupMenu*) ),
- this, SLOT( slotAboutToShowContextMenu(KPopupMenu*, int, QPopupMenu*) ));
+ connect( _parentMenu, TQT_SIGNAL( aboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) ),
+ this, TQT_SLOT( slotAboutToShowContextMenu(KPopupMenu*, int, TQPopupMenu*) ));
}
if ( m_bIsRoot )
{
- connect( m_pManager, SIGNAL( changed(const QString &, const QString &) ),
- SLOT( slotBookmarksChanged(const QString &) ) );
+ connect( m_pManager, TQT_SIGNAL( changed(const TQString &, const TQString &) ),
+ TQT_SLOT( slotBookmarksChanged(const TQString &) ) );
}
}
@@ -142,7 +142,7 @@ KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr,
KBookmarkMenu::~KBookmarkMenu()
{
//kdDebug(7043) << "KBookmarkMenu::~KBookmarkMenu() " << this << endl;
- QPtrListIterator<KAction> it( m_actions );
+ TQPtrListIterator<KAction> it( m_actions );
for (; it.current(); ++it )
it.current()->unplugAll();
@@ -165,9 +165,9 @@ void KBookmarkMenu::slotAboutToShow()
}
}
-QString KBookmarkMenu::s_highlightedAddress;
-QString KBookmarkMenu::s_highlightedImportType;
-QString KBookmarkMenu::s_highlightedImportLocation;
+TQString KBookmarkMenu::s_highlightedAddress;
+TQString KBookmarkMenu::s_highlightedImportType;
+TQString KBookmarkMenu::s_highlightedImportLocation;
void KBookmarkMenu::slotActionHighlighted( KAction* action )
{
@@ -183,9 +183,9 @@ void KBookmarkMenu::slotActionHighlighted( KAction* action )
}
else
{
- s_highlightedAddress = QString::null;
- s_highlightedImportType = QString::null;
- s_highlightedImportLocation = QString::null;
+ s_highlightedAddress = TQString::null;
+ s_highlightedImportType = TQString::null;
+ s_highlightedImportLocation = TQString::null;
}
}
@@ -194,7 +194,7 @@ void KBookmarkMenu::slotActionHighlighted( KAction* action )
/********************************************************************/
class KBookmarkMenuRMBAssoc : public dPtrTemplate<KBookmarkMenu, RMB> { };
-template<> QPtrDict<RMB>* dPtrTemplate<KBookmarkMenu, RMB>::d_ptr = 0;
+template<> TQPtrDict<RMB>* dPtrTemplate<KBookmarkMenu, RMB>::d_ptr = 0;
static RMB* rmbSelf(KBookmarkMenu *m) { return KBookmarkMenuRMBAssoc::d(m); }
@@ -224,14 +224,14 @@ bool RMB::invalid( int val )
return !valid;
}
-KBookmark RMB::atAddress(const QString & address)
+KBookmark RMB::atAddress(const TQString & address)
{
KBookmark bookmark = m_pManager->findByAddress( address );
Q_ASSERT(!bookmark.isNull());
return bookmark;
}
-void KBookmarkMenu::slotAboutToShowContextMenu( KPopupMenu*, int, QPopupMenu* contextMenu )
+void KBookmarkMenu::slotAboutToShowContextMenu( KPopupMenu*, int, TQPopupMenu* contextMenu )
{
//kdDebug(7043) << "KBookmarkMenu::slotAboutToShowContextMenu" << s_highlightedAddress << endl;
if (s_highlightedAddress.isNull())
@@ -243,7 +243,7 @@ void KBookmarkMenu::slotAboutToShowContextMenu( KPopupMenu*, int, QPopupMenu* co
fillContextMenu( contextMenu, s_highlightedAddress, 0 );
}
-void RMB::fillContextMenu( QPopupMenu* contextMenu, const QString & address, int val )
+void RMB::fillContextMenu( TQPopupMenu* contextMenu, const TQString & address, int val )
{
KBookmark bookmark = atAddress(address);
@@ -256,41 +256,41 @@ void RMB::fillContextMenu( QPopupMenu* contextMenu, const QString & address, int
// TODO rename these, but, message freeze... umm...
// if (bookmark.isGroup()) {
- id = contextMenu->insertItem( SmallIcon("bookmark_add"), i18n( "Add Bookmark Here" ), recv, SLOT(slotRMBActionInsert(int)) );
+ id = contextMenu->insertItem( SmallIcon("bookmark_add"), i18n( "Add Bookmark Here" ), recv, TQT_SLOT(slotRMBActionInsert(int)) );
contextMenu->setItemParameter( id, val );
/* }
else
{
- id = contextMenu->insertItem( SmallIcon("bookmark_add"), i18n( "Add Bookmark Here" ), recv, SLOT(slotRMBActionInsert(int)) );
+ id = contextMenu->insertItem( SmallIcon("bookmark_add"), i18n( "Add Bookmark Here" ), recv, TQT_SLOT(slotRMBActionInsert(int)) );
contextMenu->setItemParameter( id, val );
}*/
}
-void RMB::fillContextMenu2( QPopupMenu* contextMenu, const QString & address, int val )
+void RMB::fillContextMenu2( TQPopupMenu* contextMenu, const TQString & address, int val )
{
KBookmark bookmark = atAddress(address);
int id;
if (bookmark.isGroup()) {
- id = contextMenu->insertItem( i18n( "Open Folder in Bookmark Editor" ), recv, SLOT(slotRMBActionEditAt(int)) );
+ id = contextMenu->insertItem( i18n( "Open Folder in Bookmark Editor" ), recv, TQT_SLOT(slotRMBActionEditAt(int)) );
contextMenu->setItemParameter( id, val );
contextMenu->insertSeparator();
- id = contextMenu->insertItem( SmallIcon("editdelete"), i18n( "Delete Folder" ), recv, SLOT(slotRMBActionRemove(int)) );
+ id = contextMenu->insertItem( SmallIcon("editdelete"), i18n( "Delete Folder" ), recv, TQT_SLOT(slotRMBActionRemove(int)) );
contextMenu->setItemParameter( id, val );
contextMenu->insertSeparator();
- id = contextMenu->insertItem( i18n( "Properties" ), recv, SLOT(slotRMBActionProperties(int)) );
+ id = contextMenu->insertItem( i18n( "Properties" ), recv, TQT_SLOT(slotRMBActionProperties(int)) );
contextMenu->setItemParameter( id, val );
}
else
{
- id = contextMenu->insertItem( i18n( "Copy Link Address" ), recv, SLOT(slotRMBActionCopyLocation(int)) );
+ id = contextMenu->insertItem( i18n( "Copy Link Address" ), recv, TQT_SLOT(slotRMBActionCopyLocation(int)) );
contextMenu->setItemParameter( id, val );
contextMenu->insertSeparator();
- id = contextMenu->insertItem( SmallIcon("editdelete"), i18n( "Delete Bookmark" ), recv, SLOT(slotRMBActionRemove(int)) );
+ id = contextMenu->insertItem( SmallIcon("editdelete"), i18n( "Delete Bookmark" ), recv, TQT_SLOT(slotRMBActionRemove(int)) );
contextMenu->setItemParameter( id, val );
contextMenu->insertSeparator();
- id = contextMenu->insertItem( i18n( "Properties" ), recv, SLOT(slotRMBActionProperties(int)) );
+ id = contextMenu->insertItem( i18n( "Properties" ), recv, TQT_SLOT(slotRMBActionProperties(int)) );
contextMenu->setItemParameter( id, val );
}
}
@@ -312,7 +312,7 @@ void RMB::slotRMBActionProperties( int val )
KBookmark bookmark = atAddress(s_highlightedAddress);
- QString folder = bookmark.isGroup() ? QString::null : bookmark.url().pathOrURL();
+ TQString folder = bookmark.isGroup() ? TQString::null : bookmark.url().pathOrURL();
KBookmarkEditDialog dlg( bookmark.fullText(), folder,
m_pManager, KBookmarkEditDialog::ModifyMode, 0,
0, 0, i18n("Bookmark Properties") );
@@ -337,13 +337,13 @@ void RMB::slotRMBActionInsert( int val )
kdDebug(7043) << "KBookmarkMenu::slotRMBActionInsert" << s_highlightedAddress << endl;
if (invalid(val)) { hidePopup(); return; }
- QString url = m_pOwner->currentURL();
+ TQString url = m_pOwner->currentURL();
if (url.isEmpty())
{
KMessageBox::error( 0L, i18n("Cannot add bookmark with empty URL."));
return;
}
- QString title = m_pOwner->currentTitle();
+ TQString title = m_pOwner->currentTitle();
if (title.isEmpty())
title = url;
@@ -418,7 +418,7 @@ void RMB::hidePopup() {
/********************************************************************/
/********************************************************************/
-void KBookmarkMenu::fillContextMenu( QPopupMenu* contextMenu, const QString & address, int val )
+void KBookmarkMenu::fillContextMenu( TQPopupMenu* contextMenu, const TQString & address, int val )
{
RMB::begin_rmb_action(this);
rmbSelf(this)->fillContextMenu(contextMenu, address, val);
@@ -441,7 +441,7 @@ void KBookmarkMenu::slotRMBActionRemove( int val )
void KBookmarkMenu::slotRMBActionCopyLocation( int val )
{ RMB::begin_rmb_action(this); rmbSelf(this)->slotRMBActionCopyLocation( val ); }
-void KBookmarkMenu::slotBookmarksChanged( const QString & groupAddress )
+void KBookmarkMenu::slotBookmarksChanged( const TQString & groupAddress )
{
if (m_bNSBookmark)
return;
@@ -454,7 +454,7 @@ void KBookmarkMenu::slotBookmarksChanged( const QString & groupAddress )
else
{
// Iterate recursively into child menus
- QPtrListIterator<KBookmarkMenu> it( m_lstSubMenus );
+ TQPtrListIterator<KBookmarkMenu> it( m_lstSubMenus );
for (; it.current(); ++it )
{
it.current()->slotBookmarksChanged( groupAddress );
@@ -467,7 +467,7 @@ void KBookmarkMenu::refill()
//kdDebug(7043) << "KBookmarkMenu::refill()" << endl;
m_lstSubMenus.clear();
- QPtrListIterator<KAction> it( m_actions );
+ TQPtrListIterator<KAction> it( m_actions );
for (; it.current(); ++it )
it.current()->unplug( m_parentMenu );
@@ -483,13 +483,13 @@ void KBookmarkMenu::addAddBookmarksList()
if (!kapp->authorizeKAction("bookmarks"))
return;
- QString title = i18n( "Bookmark Tabs as Folder..." );
+ TQString title = i18n( "Bookmark Tabs as Folder..." );
KAction * paAddBookmarksList = new KAction( title,
"bookmarks_list_add",
0,
this,
- SLOT( slotAddBookmarksList() ),
+ TQT_SLOT( slotAddBookmarksList() ),
m_actionCollection, m_bIsRoot ? "add_bookmarks_list" : 0 );
paAddBookmarksList->setToolTip( i18n( "Add a folder of bookmarks for all open tabs." ) );
@@ -503,13 +503,13 @@ void KBookmarkMenu::addAddBookmark()
if (!kapp->authorizeKAction("bookmarks"))
return;
- QString title = i18n( "Add Bookmark" );
+ TQString title = i18n( "Add Bookmark" );
KAction * paAddBookmarks = new KAction( title,
"bookmark_add",
m_bIsRoot && m_bAddShortcuts ? KStdAccel::addBookmark() : KShortcut(),
this,
- SLOT( slotAddBookmark() ),
+ TQT_SLOT( slotAddBookmark() ),
m_actionCollection, m_bIsRoot ? "add_bookmark" : 0 );
paAddBookmarks->setToolTip( i18n( "Add a bookmark for the current document" ) );
@@ -523,7 +523,7 @@ void KBookmarkMenu::addEditBookmarks()
if (!kapp->authorizeKAction("bookmarks"))
return;
- KAction * m_paEditBookmarks = KStdAction::editBookmarks( m_pManager, SLOT( slotEditBookmarks() ),
+ KAction * m_paEditBookmarks = KStdAction::editBookmarks( m_pManager, TQT_SLOT( slotEditBookmarks() ),
m_actionCollection, "edit_bookmarks" );
m_paEditBookmarks->plug( m_parentMenu );
m_paEditBookmarks->setToolTip( i18n( "Edit your bookmark collection in a separate window" ) );
@@ -535,7 +535,7 @@ void KBookmarkMenu::addNewFolder()
if (!kapp->authorizeKAction("bookmarks"))
return;
- QString title = i18n( "&New Bookmark Folder..." );
+ TQString title = i18n( "&New Bookmark Folder..." );
int p;
while ( ( p = title.find( '&' ) ) >= 0 )
title.remove( p, 1 );
@@ -544,7 +544,7 @@ void KBookmarkMenu::addNewFolder()
"folder_new", //"folder",
0,
this,
- SLOT( slotNewFolder() ),
+ TQT_SLOT( slotNewFolder() ),
m_actionCollection );
paNewFolder->setToolTip( i18n( "Create a new bookmark folder in this menu" ) );
@@ -578,14 +578,14 @@ void KBookmarkMenu::fillBookmarkMenu()
{
bool haveSep = false;
- QValueList<QString> keys = KBookmarkMenu::dynamicBookmarksList();
- QValueList<QString>::const_iterator it;
+ TQValueList<TQString> keys = KBookmarkMenu::dynamicBookmarksList();
+ TQValueList<TQString>::const_iterator it;
for ( it = keys.begin(); it != keys.end(); ++it )
{
DynMenuInfo info;
info = showDynamicBookmarks((*it));
- if ( !info.show || !QFile::exists( info.location ) )
+ if ( !info.show || !TQFile::exists( info.location ) )
continue;
if (!haveSep)
@@ -608,12 +608,12 @@ void KBookmarkMenu::fillBookmarkMenu()
KBookmarkMenu *subMenu =
new KBookmarkMenu( m_pManager, m_pOwner, actionMenu->popupMenu(),
m_actionCollection, false,
- m_bAddBookmark, QString::null );
- connect( subMenu, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ),
- this, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ));
+ m_bAddBookmark, TQString::null );
+ connect( subMenu, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ),
+ this, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ));
m_lstSubMenus.append(subMenu);
- connect(actionMenu->popupMenu(), SIGNAL(aboutToShow()), subMenu, SLOT(slotNSLoad()));
+ connect(actionMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), subMenu, TQT_SLOT(slotNSLoad()));
}
}
@@ -622,7 +622,7 @@ void KBookmarkMenu::fillBookmarkMenu()
bool separatorInserted = false;
for ( KBookmark bm = parentBookmark.first(); !bm.isNull(); bm = parentBookmark.next(bm) )
{
- QString text = KStringHandler::csqueeze(bm.fullText(), 60);
+ TQString text = KStringHandler::csqueeze(bm.fullText(), 60);
text.replace( '&', "&&" );
if ( !separatorInserted && m_bIsRoot) {
// inserted before the first konq bookmark, to avoid the separator if no konq bookmark
@@ -639,8 +639,8 @@ void KBookmarkMenu::fillBookmarkMenu()
{
//kdDebug(7043) << "Creating URL bookmark menu item for " << bm.text() << endl;
KAction * action = new KBookmarkAction( text, bm.icon(), 0, m_actionCollection, 0 );
- connect(action, SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
- this, SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
+ connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
+ this, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
action->setProperty( "url", bm.url().url() );
action->setProperty( "address", bm.address() );
@@ -666,10 +666,10 @@ void KBookmarkMenu::fillBookmarkMenu()
m_bAddBookmark,
bm.address() );
- connect(subMenu, SIGNAL( aboutToShowContextMenu( const KBookmark &, QPopupMenu * ) ),
- this, SIGNAL( aboutToShowContextMenu( const KBookmark &, QPopupMenu * ) ));
- connect(subMenu, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ),
- this, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ));
+ connect(subMenu, TQT_SIGNAL( aboutToShowContextMenu( const KBookmark &, TQPopupMenu * ) ),
+ this, TQT_SIGNAL( aboutToShowContextMenu( const KBookmark &, TQPopupMenu * ) ));
+ connect(subMenu, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ),
+ this, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ));
m_lstSubMenus.append( subMenu );
}
}
@@ -750,7 +750,7 @@ void KBookmarkMenu::slotBookmarkSelected( KAction::ActivationReason /*reason*/,
const KAction* action = dynamic_cast<const KAction *>(sender());
if(action)
{
- const QString& url = sender()->property("url").toString();
+ const TQString& url = sender()->property("url").toString();
m_pOwner->openBookmarkURL( url );
emit openBookmark( url, state );
}
@@ -769,7 +769,7 @@ KExtendedBookmarkOwner* KBookmarkMenu::extOwner()
void KBookmarkMenu::slotNSLoad()
{
// only fill menu once
- m_parentMenu->disconnect(SIGNAL(aboutToShow()));
+ m_parentMenu->disconnect(TQT_SIGNAL(aboutToShow()));
// not NSImporter, but kept old name for BC reasons
KBookmarkMenuNSImporter importer( m_pManager, this, m_actionCollection );
@@ -780,21 +780,21 @@ void KBookmarkMenu::slotNSLoad()
/********************************************************************/
/********************************************************************/
-KBookmarkEditFields::KBookmarkEditFields(QWidget *main, QBoxLayout *vbox, FieldsSet fieldsSet)
+KBookmarkEditFields::KBookmarkEditFields(TQWidget *main, TQBoxLayout *vbox, FieldsSet fieldsSet)
{
bool isF = (fieldsSet != FolderFieldsSet);
- QGridLayout *grid = new QGridLayout( vbox, 2, isF ? 2 : 1 );
+ TQGridLayout *grid = new TQGridLayout( vbox, 2, isF ? 2 : 1 );
m_title = new KLineEdit( main );
grid->addWidget( m_title, 0, 1 );
- grid->addWidget( new QLabel( m_title, i18n( "Name:" ), main ), 0, 0 );
+ grid->addWidget( new TQLabel( m_title, i18n( "Name:" ), main ), 0, 0 );
m_title->setFocus();
if (isF)
{
m_url = new KLineEdit( main );
grid->addWidget( m_url, 1, 1 );
- grid->addWidget( new QLabel( m_url, i18n( "Location:" ), main ), 1, 0 );
+ grid->addWidget( new TQLabel( m_url, i18n( "Location:" ), main ), 1, 0 );
}
else
{
@@ -804,12 +804,12 @@ KBookmarkEditFields::KBookmarkEditFields(QWidget *main, QBoxLayout *vbox, Fields
main->setMinimumSize( 300, 0 );
}
-void KBookmarkEditFields::setName(const QString &str)
+void KBookmarkEditFields::setName(const TQString &str)
{
m_title->setText(str);
}
-void KBookmarkEditFields::setLocation(const QString &str)
+void KBookmarkEditFields::setLocation(const TQString &str)
{
m_url->setText(str);
}
@@ -819,8 +819,8 @@ void KBookmarkEditFields::setLocation(const QString &str)
/********************************************************************/
// TODO - make the dialog use Properties as a title when in Modify mode... (dirk noticed the bug...)
-KBookmarkEditDialog::KBookmarkEditDialog(const QString& title, const QString& url, KBookmarkManager * mgr, BookmarkEditType editType, const QString& address,
- QWidget * parent, const char * name, const QString& caption )
+KBookmarkEditDialog::KBookmarkEditDialog(const TQString& title, const TQString& url, KBookmarkManager * mgr, BookmarkEditType editType, const TQString& address,
+ TQWidget * parent, const char * name, const TQString& caption )
: KDialogBase(parent, name, true, caption,
(editType == InsertionMode) ? (User1|Ok|Cancel) : (Ok|Cancel),
Ok, false, KGuiItem()),
@@ -833,10 +833,10 @@ KBookmarkEditDialog::KBookmarkEditDialog(const QString& title, const QString& ur
bool folder = url.isNull();
- m_main = new QWidget( this );
+ m_main = new TQWidget( this );
setMainWidget( m_main );
- QBoxLayout *vbox = new QVBoxLayout( m_main, 0, spacingHint() );
+ TQBoxLayout *vbox = new TQVBoxLayout( m_main, 0, spacingHint() );
KBookmarkEditFields::FieldsSet fs =
folder ? KBookmarkEditFields::FolderFieldsSet
: KBookmarkEditFields::BookmarkFieldsSet;
@@ -848,14 +848,14 @@ KBookmarkEditDialog::KBookmarkEditDialog(const QString& title, const QString& ur
if ( editType == InsertionMode )
{
m_folderTree = KBookmarkFolderTree::createTree( m_mgr, m_main, name, m_address );
- connect( m_folderTree, SIGNAL( doubleClicked(QListViewItem*) ),
- this, SLOT( slotDoubleClicked(QListViewItem*) ) );
+ connect( m_folderTree, TQT_SIGNAL( doubleClicked(TQListViewItem*) ),
+ this, TQT_SLOT( slotDoubleClicked(TQListViewItem*) ) );
vbox->addWidget( m_folderTree );
- connect( this, SIGNAL( user1Clicked() ), SLOT( slotUser1() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotUser1() ) );
}
}
-void KBookmarkEditDialog::slotDoubleClicked( QListViewItem* item )
+void KBookmarkEditDialog::slotDoubleClicked( TQListViewItem* item )
{
Q_ASSERT( m_folderTree );
m_folderTree->setCurrentItem( item );
@@ -872,20 +872,20 @@ void KBookmarkEditDialog::slotCancel()
reject();
}
-QString KBookmarkEditDialog::finalAddress() const
+TQString KBookmarkEditDialog::finalAddress() const
{
Q_ASSERT( m_folderTree );
return KBookmarkFolderTree::selectedAddress( m_folderTree );
}
-QString KBookmarkEditDialog::finalUrl() const
+TQString KBookmarkEditDialog::finalUrl() const
{
- return m_fields->m_url ? m_fields->m_url->text() : QString::null;
+ return m_fields->m_url ? m_fields->m_url->text() : TQString::null;
}
-QString KBookmarkEditDialog::finalTitle() const
+TQString KBookmarkEditDialog::finalTitle() const
{
- return m_fields->m_title ? m_fields->m_title->text() : QString::null;
+ return m_fields->m_title ? m_fields->m_title->text() : TQString::null;
}
void KBookmarkEditDialog::slotUser1()
@@ -893,7 +893,7 @@ void KBookmarkEditDialog::slotUser1()
// kdDebug(7043) << "KBookmarkEditDialog::slotUser1" << endl;
Q_ASSERT( m_folderTree );
- QString address = KBookmarkFolderTree::selectedAddress( m_folderTree );
+ TQString address = KBookmarkFolderTree::selectedAddress( m_folderTree );
if ( address.isNull() ) return;
KBookmarkGroup bm = m_mgr->findByAddress( address ).toGroup();
Q_ASSERT(!bm.isNull());
@@ -912,7 +912,7 @@ void KBookmarkEditDialog::slotUser1()
/********************************************************************/
/********************************************************************/
-static void fillGroup( QListView* listview, KBookmarkFolderTreeItem * parentItem, KBookmarkGroup group, bool expandOpenGroups = true, const QString& address = QString::null )
+static void fillGroup( TQListView* listview, KBookmarkFolderTreeItem * parentItem, KBookmarkGroup group, bool expandOpenGroups = true, const TQString& address = TQString::null )
{
bool noSubGroups = true;
KBookmarkFolderTreeItem * lastItem = 0L;
@@ -939,17 +939,17 @@ static void fillGroup( QListView* listview, KBookmarkFolderTreeItem * parentItem
}
}
-QListView* KBookmarkFolderTree::createTree( KBookmarkManager* mgr, QWidget* parent, const char* name, const QString& address )
+TQListView* KBookmarkFolderTree::createTree( KBookmarkManager* mgr, TQWidget* parent, const char* name, const TQString& address )
{
- QListView *listview = new QListView( parent, name );
+ TQListView *listview = new TQListView( parent, name );
listview->setRootIsDecorated( false );
listview->header()->hide();
listview->addColumn( i18n("Bookmark"), 200 );
listview->setSorting( -1, false );
- listview->setSelectionMode( QListView::Single );
+ listview->setSelectionMode( TQListView::Single );
listview->setAllColumnsShowFocus( true );
- listview->setResizeMode( QListView::AllColumns );
+ listview->setResizeMode( TQListView::AllColumns );
listview->setMinimumSize( 60, 100 );
fillTree( listview, mgr, address );
@@ -957,7 +957,7 @@ QListView* KBookmarkFolderTree::createTree( KBookmarkManager* mgr, QWidget* pare
return listview;
}
-void KBookmarkFolderTree::fillTree( QListView *listview, KBookmarkManager* mgr, const QString& address )
+void KBookmarkFolderTree::fillTree( TQListView *listview, KBookmarkManager* mgr, const TQString& address )
{
listview->clear();
@@ -969,20 +969,20 @@ void KBookmarkFolderTree::fillTree( QListView *listview, KBookmarkManager* mgr,
rootItem->setOpen( true );
}
-static KBookmarkFolderTreeItem* ft_cast( QListViewItem *i )
+static KBookmarkFolderTreeItem* ft_cast( TQListViewItem *i )
{
return static_cast<KBookmarkFolderTreeItem*>( i );
}
-QString KBookmarkFolderTree::selectedAddress( QListView *listview )
+TQString KBookmarkFolderTree::selectedAddress( TQListView *listview )
{
if ( !listview)
- return QString::null;
+ return TQString::null;
KBookmarkFolderTreeItem *item = ft_cast( listview->currentItem() );
- return item ? item->m_bookmark.address() : QString::null;
+ return item ? item->m_bookmark.address() : TQString::null;
}
-void KBookmarkFolderTree::setAddress( QListView *listview, const QString & address )
+void KBookmarkFolderTree::setAddress( TQListView *listview, const TQString & address )
{
KBookmarkFolderTreeItem* it = ft_cast( listview->firstChild() );
while ( true ) {
@@ -1002,16 +1002,16 @@ void KBookmarkFolderTree::setAddress( QListView *listview, const QString & addre
/********************************************************************/
// toplevel item
-KBookmarkFolderTreeItem::KBookmarkFolderTreeItem( QListView *parent, const KBookmark & gp )
- : QListViewItem(parent, i18n("Bookmarks")), m_bookmark(gp)
+KBookmarkFolderTreeItem::KBookmarkFolderTreeItem( TQListView *parent, const KBookmark & gp )
+ : TQListViewItem(parent, i18n("Bookmarks")), m_bookmark(gp)
{
setPixmap(0, SmallIcon("bookmark"));
setExpandable(true);
}
// group
-KBookmarkFolderTreeItem::KBookmarkFolderTreeItem( KBookmarkFolderTreeItem *parent, QListViewItem *after, const KBookmarkGroup & gp )
- : QListViewItem(parent, after, gp.fullText()), m_bookmark(gp)
+KBookmarkFolderTreeItem::KBookmarkFolderTreeItem( KBookmarkFolderTreeItem *parent, TQListViewItem *after, const KBookmarkGroup & gp )
+ : TQListViewItem(parent, after, gp.fullText()), m_bookmark(gp)
{
setPixmap(0, SmallIcon( gp.icon() ) );
setExpandable(true);
@@ -1029,7 +1029,7 @@ void KBookmarkMenuNSImporter::openNSBookmarks()
openBookmarks( KNSBookmarkImporter::netscapeBookmarksFile(), "netscape" );
}
-void KBookmarkMenuNSImporter::openBookmarks( const QString &location, const QString &type )
+void KBookmarkMenuNSImporter::openBookmarks( const TQString &location, const TQString &type )
{
mstack.push(m_menu);
@@ -1043,41 +1043,41 @@ void KBookmarkMenuNSImporter::openBookmarks( const QString &location, const QStr
delete importer;
}
-void KBookmarkMenuNSImporter::connectToImporter(const QObject &importer)
+void KBookmarkMenuNSImporter::connectToImporter(const TQObject &importer)
{
- connect( &importer, SIGNAL( newBookmark( const QString &, const QCString &, const QString & ) ),
- SLOT( newBookmark( const QString &, const QCString &, const QString & ) ) );
- connect( &importer, SIGNAL( newFolder( const QString &, bool, const QString & ) ),
- SLOT( newFolder( const QString &, bool, const QString & ) ) );
- connect( &importer, SIGNAL( newSeparator() ), SLOT( newSeparator() ) );
- connect( &importer, SIGNAL( endFolder() ), SLOT( endFolder() ) );
+ connect( &importer, TQT_SIGNAL( newBookmark( const TQString &, const TQCString &, const TQString & ) ),
+ TQT_SLOT( newBookmark( const TQString &, const TQCString &, const TQString & ) ) );
+ connect( &importer, TQT_SIGNAL( newFolder( const TQString &, bool, const TQString & ) ),
+ TQT_SLOT( newFolder( const TQString &, bool, const TQString & ) ) );
+ connect( &importer, TQT_SIGNAL( newSeparator() ), TQT_SLOT( newSeparator() ) );
+ connect( &importer, TQT_SIGNAL( endFolder() ), TQT_SLOT( endFolder() ) );
}
-void KBookmarkMenuNSImporter::newBookmark( const QString & text, const QCString & url, const QString & )
+void KBookmarkMenuNSImporter::newBookmark( const TQString & text, const TQCString & url, const TQString & )
{
- QString _text = KStringHandler::csqueeze(text);
+ TQString _text = KStringHandler::csqueeze(text);
_text.replace( '&', "&&" );
KAction * action = new KBookmarkAction(_text, "html", 0, 0, "", m_actionCollection, 0);
- connect(action, SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
- m_menu, SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
+ connect(action, TQT_SIGNAL( activated ( KAction::ActivationReason, Qt::ButtonState )),
+ m_menu, TQT_SLOT( slotBookmarkSelected( KAction::ActivationReason, Qt::ButtonState ) ));
action->setProperty( "url", url );
action->setToolTip( url );
action->plug( mstack.top()->m_parentMenu );
mstack.top()->m_actions.append( action );
}
-void KBookmarkMenuNSImporter::newFolder( const QString & text, bool, const QString & )
+void KBookmarkMenuNSImporter::newFolder( const TQString & text, bool, const TQString & )
{
- QString _text = KStringHandler::csqueeze(text);
+ TQString _text = KStringHandler::csqueeze(text);
_text.replace( '&', "&&" );
KActionMenu * actionMenu = new KActionMenu( _text, "folder", m_actionCollection, 0L );
actionMenu->plug( mstack.top()->m_parentMenu );
mstack.top()->m_actions.append( actionMenu );
KBookmarkMenu *subMenu = new KBookmarkMenu( m_pManager, m_menu->m_pOwner, actionMenu->popupMenu(),
m_actionCollection, false,
- m_menu->m_bAddBookmark, QString::null );
- connect( subMenu, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ),
- m_menu, SIGNAL( openBookmark( const QString &, Qt::ButtonState ) ));
+ m_menu->m_bAddBookmark, TQString::null );
+ connect( subMenu, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ),
+ m_menu, TQT_SIGNAL( openBookmark( const TQString &, Qt::ButtonState ) ));
mstack.top()->m_lstSubMenus.append( subMenu );
mstack.push(subMenu);
@@ -1097,7 +1097,7 @@ void KBookmarkMenuNSImporter::endFolder()
/********************************************************************/
/********************************************************************/
-KBookmarkMenu::DynMenuInfo KBookmarkMenu::showDynamicBookmarks( const QString &id )
+KBookmarkMenu::DynMenuInfo KBookmarkMenu::showDynamicBookmarks( const TQString &id )
{
KConfig config("kbookmarkrc", false, false);
config.setGroup("Bookmarks");
@@ -1129,12 +1129,12 @@ KBookmarkMenu::DynMenuInfo KBookmarkMenu::showDynamicBookmarks( const QString &i
return info;
}
-QStringList KBookmarkMenu::dynamicBookmarksList()
+TQStringList KBookmarkMenu::dynamicBookmarksList()
{
KConfig config("kbookmarkrc", false, false);
config.setGroup("Bookmarks");
- QStringList mlist;
+ TQStringList mlist;
if (config.hasKey("DynamicMenus"))
mlist = config.readListEntry("DynamicMenus");
else
@@ -1143,7 +1143,7 @@ QStringList KBookmarkMenu::dynamicBookmarksList()
return mlist;
}
-void KBookmarkMenu::setDynamicBookmarks(const QString &id, const DynMenuInfo &newMenu)
+void KBookmarkMenu::setDynamicBookmarks(const TQString &id, const DynMenuInfo &newMenu)
{
KConfig config("kbookmarkrc", false, false);
@@ -1154,7 +1154,7 @@ void KBookmarkMenu::setDynamicBookmarks(const QString &id, const DynMenuInfo &ne
config.writeEntry("Type", newMenu.type);
config.writeEntry("Name", newMenu.name);
- QStringList elist;
+ TQStringList elist;
config.setGroup("Bookmarks");
if (!config.hasKey("DynamicMenus")) {
diff --git a/kio/bookmarks/kbookmarkmenu.h b/kio/bookmarks/kbookmarkmenu.h
index 0a1ca1f24..d97271879 100644
--- a/kio/bookmarks/kbookmarkmenu.h
+++ b/kio/bookmarks/kbookmarkmenu.h
@@ -24,10 +24,10 @@
#include <sys/types.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qobject.h>
-#include <qlistview.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqobject.h>
+#include <tqlistview.h>
#include <kdialogbase.h>
#include <klocale.h>
@@ -104,7 +104,7 @@ public:
KBookmarkMenu( KBookmarkManager* mgr,
KBookmarkOwner * owner, KPopupMenu * parentMenu,
KActionCollection * collec, bool root, bool add = true,
- const QString & parentAddress = "" );
+ const TQString & parentAddress = "" );
~KBookmarkMenu();
@@ -129,9 +129,9 @@ public:
// TODO - transform into class
struct DynMenuInfo {
bool show;
- QString location;
- QString type;
- QString name;
+ TQString location;
+ TQString type;
+ TQString name;
class DynMenuInfoPrivate *d;
};
@@ -139,7 +139,7 @@ public:
* @return dynmenu info block for the given dynmenu name
* @since 3.2
*/
- static DynMenuInfo showDynamicBookmarks( const QString &id );
+ static DynMenuInfo showDynamicBookmarks( const TQString &id );
/**
* Shows an extra menu for the given bookmarks file and type.
@@ -149,27 +149,27 @@ public:
* @param info a DynMenuInfo struct containing the to be added/modified data
* @since 3.2
*/
- static void setDynamicBookmarks( const QString &id, const DynMenuInfo &info );
+ static void setDynamicBookmarks( const TQString &id, const DynMenuInfo &info );
/**
* @return list of dynamic menu ids
* @since 3.2
*/
- static QStringList dynamicBookmarksList();
+ static TQStringList dynamicBookmarksList();
signals:
- void aboutToShowContextMenu( const KBookmark &, QPopupMenu * );
+ void aboutToShowContextMenu( const KBookmark &, TQPopupMenu * );
/**
* @since 3.4
*/
- void openBookmark( const QString& url, Qt::ButtonState state );
+ void openBookmark( const TQString& url, Qt::ButtonState state );
public slots: // public for bookmark bar
- void slotBookmarksChanged( const QString & );
+ void slotBookmarksChanged( const TQString & );
protected slots:
void slotAboutToShow();
- void slotAboutToShowContextMenu( KPopupMenu *, int, QPopupMenu * );
+ void slotAboutToShowContextMenu( KPopupMenu *, int, TQPopupMenu * );
void slotActionHighlighted( KAction * );
void slotRMBActionRemove( int );
@@ -200,7 +200,7 @@ protected:
void addEditBookmarks();
void addNewFolder();
- void fillContextMenu( QPopupMenu *, const QString &, int );
+ void fillContextMenu( TQPopupMenu *, const TQString &, int );
bool m_bIsRoot:1;
bool m_bAddBookmark:1;
@@ -218,21 +218,21 @@ protected:
/**
* List of our sub menus
*/
- QPtrList<KBookmarkMenu> m_lstSubMenus;
+ TQPtrList<KBookmarkMenu> m_lstSubMenus;
KActionCollection * m_actionCollection;
/**
* List of our actions.
*/
- QPtrList<KAction> m_actions;
+ TQPtrList<KAction> m_actions;
/**
* Parent bookmark for this menu.
*/
- QString m_parentAddress;
+ TQString m_parentAddress;
// TODO make non static!
- static QString s_highlightedAddress;
- static QString s_highlightedImportLocation;
- static QString s_highlightedImportType;
+ static TQString s_highlightedAddress;
+ static TQString s_highlightedImportLocation;
+ static TQString s_highlightedImportType;
};
/**
@@ -246,17 +246,17 @@ public:
m_menu(menu), m_actionCollection(act), m_pManager(mgr) {}
void openNSBookmarks();
- void openBookmarks( const QString &location, const QString &type );
- void connectToImporter( const QObject &importer );
+ void openBookmarks( const TQString &location, const TQString &type );
+ void connectToImporter( const TQObject &importer );
protected slots:
- void newBookmark( const QString & text, const QCString & url, const QString & );
- void newFolder( const QString & text, bool, const QString & );
+ void newBookmark( const TQString & text, const TQCString & url, const TQString & );
+ void newFolder( const TQString & text, bool, const TQString & );
void newSeparator();
void endFolder();
protected:
- QPtrStack<KBookmarkMenu> mstack;
+ TQPtrStack<KBookmarkMenu> mstack;
KBookmarkMenu * m_menu;
KActionCollection * m_actionCollection;
KBookmarkManager* m_pManager;
diff --git a/kio/bookmarks/kbookmarkmenu_p.h b/kio/bookmarks/kbookmarkmenu_p.h
index 1c3f15ba8..6409a5f3e 100644
--- a/kio/bookmarks/kbookmarkmenu_p.h
+++ b/kio/bookmarks/kbookmarkmenu_p.h
@@ -24,10 +24,10 @@
#include <sys/types.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qobject.h>
-#include <qlistview.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqobject.h>
+#include <tqlistview.h>
#include <kdialogbase.h>
#include <klocale.h>
@@ -54,19 +54,19 @@ class KPopupMenu;
class KImportedBookmarksActionMenu : public KActionMenu {
Q_OBJECT
- Q_PROPERTY( QString type READ type WRITE setType )
- Q_PROPERTY( QString location READ location WRITE setLocation )
+ Q_PROPERTY( TQString type READ type WRITE setType )
+ Q_PROPERTY( TQString location READ location WRITE setLocation )
public:
- const QString type() const { return m_type; }
- void setType(const QString &type) { m_type = type; }
- const QString location() const { return m_location; }
- void setLocation(const QString &location) { m_location = location; }
+ const TQString type() const { return m_type; }
+ void setType(const TQString &type) { m_type = type; }
+ const TQString location() const { return m_location; }
+ void setLocation(const TQString &location) { m_location = location; }
private:
- QString m_type;
- QString m_location;
+ TQString m_type;
+ TQString m_location;
public:
KImportedBookmarksActionMenu(
- const QString &text, const QString& sIconName,
+ const TQString &text, const TQString& sIconName,
KActionCollection* parent, const char* name)
: KActionMenu(text, sIconName, parent, name) {
;
@@ -75,23 +75,23 @@ public:
class KBookmarkActionMenu : public KActionMenu {
Q_OBJECT
- Q_PROPERTY( QString url READ url WRITE setUrl )
- Q_PROPERTY( QString address READ address WRITE setAddress )
+ Q_PROPERTY( TQString url READ url WRITE setUrl )
+ Q_PROPERTY( TQString address READ address WRITE setAddress )
Q_PROPERTY( bool readOnly READ readOnly WRITE setReadOnly )
public:
- const QString url() const { return m_url; }
- void setUrl(const QString &url) { m_url = url; }
- const QString address() const { return m_address; }
- void setAddress(const QString &address) { m_address = address; }
+ const TQString url() const { return m_url; }
+ void setUrl(const TQString &url) { m_url = url; }
+ const TQString address() const { return m_address; }
+ void setAddress(const TQString &address) { m_address = address; }
bool readOnly() const { return m_readOnly; }
void setReadOnly(bool readOnly) { m_readOnly = readOnly; }
private:
- QString m_url;
- QString m_address;
+ TQString m_url;
+ TQString m_address;
bool m_readOnly;
public:
KBookmarkActionMenu(
- const QString &text, const QString& sIconName,
+ const TQString &text, const TQString& sIconName,
KActionCollection* parent, const char* name)
: KActionMenu(text, sIconName, parent, name) {
;
@@ -100,26 +100,26 @@ public:
class KBookmarkAction : public KAction {
Q_OBJECT
- Q_PROPERTY( QString url READ url WRITE setUrl )
- Q_PROPERTY( QString address READ address WRITE setAddress )
+ Q_PROPERTY( TQString url READ url WRITE setUrl )
+ Q_PROPERTY( TQString address READ address WRITE setAddress )
public:
- const QString url() const { return m_url; }
- void setUrl(const QString &url) { m_url = url; }
- const QString address() const { return m_address; }
- void setAddress(const QString &address) { m_address = address; }
+ const TQString url() const { return m_url; }
+ void setUrl(const TQString &url) { m_url = url; }
+ const TQString address() const { return m_address; }
+ void setAddress(const TQString &address) { m_address = address; }
private:
- QString m_url;
- QString m_address;
+ TQString m_url;
+ TQString m_address;
public:
// KDE4: remove
KBookmarkAction(
- const QString& text, const QString& sIconName, const KShortcut& cut,
- const QObject* receiver, const char* slot,
+ const TQString& text, const TQString& sIconName, const KShortcut& cut,
+ const TQObject* receiver, const char* slot,
KActionCollection* parent, const char* name)
: KAction(text, sIconName, cut, receiver, slot, parent, name) {
}
KBookmarkAction(
- const QString& text, const QString& sIconName, const KShortcut& cut,
+ const TQString& text, const TQString& sIconName, const KShortcut& cut,
KActionCollection* parent, const char* name)
: KAction(text, sIconName, cut, parent, name) {
}
@@ -130,9 +130,9 @@ public:
typedef enum { FolderFieldsSet, BookmarkFieldsSet } FieldsSet;
KLineEdit * m_url;
KLineEdit * m_title;
- KBookmarkEditFields(QWidget *main, QBoxLayout *vbox, FieldsSet isFolder);
- void setName(const QString &str);
- void setLocation(const QString &str);
+ KBookmarkEditFields(TQWidget *main, TQBoxLayout *vbox, FieldsSet isFolder);
+ void setName(const TQString &str);
+ void setLocation(const TQString &str);
};
class KBookmarkEditDialog : public KDialogBase
@@ -142,27 +142,27 @@ class KBookmarkEditDialog : public KDialogBase
public:
typedef enum { ModifyMode, InsertionMode } BookmarkEditType;
- KBookmarkEditDialog( const QString& title, const QString& url, KBookmarkManager *, BookmarkEditType editType, const QString& address = QString::null,
- QWidget * = 0, const char * = 0, const QString& caption = i18n( "Add Bookmark" ) );
+ KBookmarkEditDialog( const TQString& title, const TQString& url, KBookmarkManager *, BookmarkEditType editType, const TQString& address = TQString::null,
+ TQWidget * = 0, const char * = 0, const TQString& caption = i18n( "Add Bookmark" ) );
- QString finalUrl() const;
- QString finalTitle() const;
- QString finalAddress() const;
+ TQString finalUrl() const;
+ TQString finalTitle() const;
+ TQString finalAddress() const;
protected slots:
void slotOk();
void slotCancel();
void slotUser1();
- void slotDoubleClicked(QListViewItem* item);
+ void slotDoubleClicked(TQListViewItem* item);
private:
- QWidget * m_main;
+ TQWidget * m_main;
KBookmarkEditFields * m_fields;
- QListView * m_folderTree;
- QPushButton * m_button;
+ TQListView * m_folderTree;
+ TQPushButton * m_button;
KBookmarkManager * m_mgr;
BookmarkEditType m_editType;
- QString m_address;
+ TQString m_address;
};
class KBookmarkFolderTreeItem : public QListViewItem
@@ -170,8 +170,8 @@ class KBookmarkFolderTreeItem : public QListViewItem
// make this an accessor
friend class KBookmarkFolderTree;
public:
- KBookmarkFolderTreeItem( QListView *, const KBookmark & );
- KBookmarkFolderTreeItem( KBookmarkFolderTreeItem *, QListViewItem *, const KBookmarkGroup & );
+ KBookmarkFolderTreeItem( TQListView *, const KBookmark & );
+ KBookmarkFolderTreeItem( KBookmarkFolderTreeItem *, TQListViewItem *, const KBookmarkGroup & );
private:
KBookmark m_bookmark;
};
@@ -179,10 +179,10 @@ private:
class KBookmarkFolderTree
{
public:
- static QListView* createTree( KBookmarkManager *, QWidget * = 0, const char * = 0, const QString& = QString::null );
- static void fillTree( QListView*, KBookmarkManager *, const QString& = QString::null );
- static QString selectedAddress( QListView* );
- static void setAddress( QListView *, const QString & );
+ static TQListView* createTree( KBookmarkManager *, TQWidget * = 0, const char * = 0, const TQString& = TQString::null );
+ static void fillTree( TQListView*, KBookmarkManager *, const TQString& = TQString::null );
+ static TQString selectedAddress( TQListView* );
+ static void setAddress( TQListView *, const TQString & );
};
class KBookmarkSettings
@@ -203,9 +203,9 @@ public:
static void begin_rmb_action(KBookmarkMenu *);
static void begin_rmb_action(KBookmarkBar *);
bool invalid( int val );
- KBookmark atAddress(const QString & address);
- void fillContextMenu( QPopupMenu* contextMenu, const QString & address, int val );
- void fillContextMenu2( QPopupMenu* contextMenu, const QString & address, int val );
+ KBookmark atAddress(const TQString & address);
+ void fillContextMenu( TQPopupMenu* contextMenu, const TQString & address, int val );
+ void fillContextMenu2( TQPopupMenu* contextMenu, const TQString & address, int val );
void slotRMBActionEditAt( int val );
void slotRMBActionProperties( int val );
void slotRMBActionInsert( int val );
@@ -213,12 +213,12 @@ public:
void slotRMBActionCopyLocation( int val );
void hidePopup();
public:
- QObject *recv;
+ TQObject *recv;
KBookmarkManager *m_pManager;
- QString s_highlightedAddress;
- QString m_parentAddress;
+ TQString s_highlightedAddress;
+ TQString m_parentAddress;
KBookmarkOwner *m_pOwner;
- QWidget *m_parentMenu;
+ TQWidget *m_parentMenu;
};
#endif
diff --git a/kio/bookmarks/kbookmarknotifier.h b/kio/bookmarks/kbookmarknotifier.h
index 6a16fa052..3982f984f 100644
--- a/kio/bookmarks/kbookmarknotifier.h
+++ b/kio/bookmarks/kbookmarknotifier.h
@@ -33,12 +33,12 @@ class KIO_EXPORT KBookmarkNotifier : virtual public DCOPObject
K_DCOP
public:
- KBookmarkNotifier(QCString objId = "KBookmarkNotifier") : DCOPObject(objId) {}
+ KBookmarkNotifier(TQCString objId = "KBookmarkNotifier") : DCOPObject(objId) {}
k_dcop_signals:
- void addedBookmark( QString filename, QString url, QString text, QString address, QString icon );
- void createdNewFolder( QString filename, QString text, QString address );
- void updatedAccessMetadata( QString filename, QString url );
+ void addedBookmark( TQString filename, TQString url, TQString text, TQString address, TQString icon );
+ void createdNewFolder( TQString filename, TQString text, TQString address );
+ void updatedAccessMetadata( TQString filename, TQString url );
};
#endif
diff --git a/kio/httpfilter/httpfilter.cc b/kio/httpfilter/httpfilter.cc
index d828064b7..6a5a1346c 100644
--- a/kio/httpfilter/httpfilter.cc
+++ b/kio/httpfilter/httpfilter.cc
@@ -37,8 +37,8 @@ void
HTTPFilterBase::chain(HTTPFilterBase *previous)
{
last = previous;
- connect(last, SIGNAL(output(const QByteArray &)),
- this, SLOT(slotInput(const QByteArray &)));
+ connect(last, TQT_SIGNAL(output(const TQByteArray &)),
+ this, TQT_SLOT(slotInput(const TQByteArray &)));
}
HTTPFilterChain::HTTPFilterChain()
@@ -55,18 +55,18 @@ HTTPFilterChain::addFilter(HTTPFilterBase *filter)
}
else
{
- disconnect(last, SIGNAL(output(const QByteArray &)), 0, 0);
+ disconnect(last, TQT_SIGNAL(output(const TQByteArray &)), 0, 0);
filter->chain(last);
}
last = filter;
- connect(filter, SIGNAL(output(const QByteArray &)),
- this, SIGNAL(output(const QByteArray &)));
- connect(filter, SIGNAL(error(int, const QString &)),
- this, SIGNAL(error(int, const QString &)));
+ connect(filter, TQT_SIGNAL(output(const TQByteArray &)),
+ this, TQT_SIGNAL(output(const TQByteArray &)));
+ connect(filter, TQT_SIGNAL(error(int, const TQString &)),
+ this, TQT_SIGNAL(error(int, const TQString &)));
}
void
-HTTPFilterChain::slotInput(const QByteArray &d)
+HTTPFilterChain::slotInput(const TQByteArray &d)
{
if (first)
first->slotInput(d);
@@ -78,14 +78,14 @@ HTTPFilterMD5::HTTPFilterMD5()
{
}
-QString
+TQString
HTTPFilterMD5::md5()
{
- return QString::fromLatin1(context.base64Digest());
+ return TQString::fromLatin1(context.base64Digest());
}
void
-HTTPFilterMD5::slotInput(const QByteArray &d)
+HTTPFilterMD5::slotInput(const TQByteArray &d)
{
context.update(d);
emit output(d);
@@ -246,7 +246,7 @@ HTTPFilterGZip::checkHeader()
}
void
-HTTPFilterGZip::slotInput(const QByteArray &d)
+HTTPFilterGZip::slotInput(const TQByteArray &d)
{
#ifdef DO_GZIP
if (bPlainText)
@@ -262,7 +262,7 @@ HTTPFilterGZip::slotInput(const QByteArray &d)
{
// Make sure we get the last bytes still in the pipe.
// Needed with "deflate".
- QByteArray flush(4);
+ TQByteArray flush(4);
flush.fill(0);
slotInput(flush);
if (!bHasFinished && !bHasHeader)
@@ -271,7 +271,7 @@ HTTPFilterGZip::slotInput(const QByteArray &d)
emit output(headerData);
bHasFinished = true;
// End of data
- emit output(QByteArray());
+ emit output(TQByteArray());
}
}
if (!bHasFinished)
@@ -288,7 +288,7 @@ HTTPFilterGZip::slotInput(const QByteArray &d)
{
bHasFinished = true;
// End of data
- emit output(QByteArray());
+ emit output(TQByteArray());
}
return;
}
@@ -338,7 +338,7 @@ HTTPFilterGZip::slotInput(const QByteArray &d)
int bytesOut = 8192 - zstr.avail_out;
if (bytesOut)
{
- QByteArray d;
+ TQByteArray d;
d.setRawData( buf, bytesOut );
emit output(d);
d.resetRawData( buf, bytesOut );
@@ -353,7 +353,7 @@ HTTPFilterGZip::slotInput(const QByteArray &d)
{
bHasFinished = true;
// End of data
- emit output(QByteArray());
+ emit output(TQByteArray());
}
return;
}
diff --git a/kio/httpfilter/httpfilter.h b/kio/httpfilter/httpfilter.h
index bc69f4a87..6d74a56ea 100644
--- a/kio/httpfilter/httpfilter.h
+++ b/kio/httpfilter/httpfilter.h
@@ -30,7 +30,7 @@
#include <zlib.h>
#endif
-#include <qobject.h>
+#include <tqobject.h>
#include <kmdcodec.h>
class HTTPFilterBase : public QObject
@@ -43,11 +43,11 @@ public:
void chain(HTTPFilterBase *previous);
public slots:
- virtual void slotInput(const QByteArray &d) = 0;
+ virtual void slotInput(const TQByteArray &d) = 0;
signals:
- void output(const QByteArray &d);
- void error(int, const QString &);
+ void output(const TQByteArray &d);
+ void error(int, const TQString &);
protected:
HTTPFilterBase *last;
@@ -62,7 +62,7 @@ public:
void addFilter(HTTPFilterBase *filter);
public slots:
- void slotInput(const QByteArray &d);
+ void slotInput(const TQByteArray &d);
private:
HTTPFilterBase *first;
@@ -74,10 +74,10 @@ class HTTPFilterMD5 : public HTTPFilterBase
public:
HTTPFilterMD5();
- QString md5();
+ TQString md5();
public slots:
- void slotInput(const QByteArray &d);
+ void slotInput(const TQByteArray &d);
private:
KMD5 context;
@@ -92,7 +92,7 @@ public:
~HTTPFilterGZip();
public slots:
- void slotInput(const QByteArray &d);
+ void slotInput(const TQByteArray &d);
protected:
int get_byte();
@@ -104,7 +104,7 @@ protected:
bool bHasFinished : 1;
bool bPlainText : 1;
bool bEatTrailer : 1;
- QByteArray headerData;
+ TQByteArray headerData;
int iTrailer;
#endif
};
diff --git a/kio/kfile/config-kfile.h b/kio/kfile/config-kfile.h
index 3666c571b..8715ed273 100644
--- a/kio/kfile/config-kfile.h
+++ b/kio/kfile/config-kfile.h
@@ -3,7 +3,7 @@
const int kfile_area = 250;
-#define DefaultViewStyle QString::fromLatin1("SimpleView")
+#define DefaultViewStyle TQString::fromLatin1("SimpleView")
#define DefaultPannerPosition 40
#define DefaultMixDirsAndFiles false
#define DefaultShowStatusLine false
@@ -14,19 +14,19 @@ const int kfile_area = 250;
#define DefaultRecentURLsNumber 15
#define DefaultDirectoryFollowing true
#define DefaultAutoSelectExtChecked true
-#define ConfigGroup QString::fromLatin1("KFileDialog Settings")
-#define RecentURLs QString::fromLatin1("Recent URLs")
-#define RecentFiles QString::fromLatin1("Recent Files")
-#define RecentURLsNumber QString::fromLatin1("Maximum of recent URLs")
-#define RecentFilesNumber QString::fromLatin1("Maximum of recent files")
-#define DialogWidth QString::fromLatin1("Width (%1)")
-#define DialogHeight QString::fromLatin1("Height (%1)")
-#define ConfigShowStatusLine QString::fromLatin1("ShowStatusLine")
-#define AutoDirectoryFollowing QString::fromLatin1("Automatic directory following")
-#define PathComboCompletionMode QString::fromLatin1("PathCombo Completionmode")
-#define LocationComboCompletionMode QString::fromLatin1("LocationCombo Completionmode")
-#define ShowSpeedbar QString::fromLatin1("Show Speedbar")
-#define ShowBookmarks QString::fromLatin1("Show Bookmarks")
-#define AutoSelectExtChecked QString::fromLatin1("Automatically select filename extension")
+#define ConfigGroup TQString::fromLatin1("KFileDialog Settings")
+#define RecentURLs TQString::fromLatin1("Recent URLs")
+#define RecentFiles TQString::fromLatin1("Recent Files")
+#define RecentURLsNumber TQString::fromLatin1("Maximum of recent URLs")
+#define RecentFilesNumber TQString::fromLatin1("Maximum of recent files")
+#define DialogWidth TQString::fromLatin1("Width (%1)")
+#define DialogHeight TQString::fromLatin1("Height (%1)")
+#define ConfigShowStatusLine TQString::fromLatin1("ShowStatusLine")
+#define AutoDirectoryFollowing TQString::fromLatin1("Automatic directory following")
+#define PathComboCompletionMode TQString::fromLatin1("PathCombo Completionmode")
+#define LocationComboCompletionMode TQString::fromLatin1("LocationCombo Completionmode")
+#define ShowSpeedbar TQString::fromLatin1("Show Speedbar")
+#define ShowBookmarks TQString::fromLatin1("Show Bookmarks")
+#define AutoSelectExtChecked TQString::fromLatin1("Automatically select filename extension")
#endif
diff --git a/kio/kfile/images.h b/kio/kfile/images.h
index 0c7bd1c37..f544e2f0a 100644
--- a/kio/kfile/images.h
+++ b/kio/kfile/images.h
@@ -1,8 +1,8 @@
#ifdef USE_POSIX_ACL
#ifndef _QEMBED_1804289383
#define _QEMBED_1804289383
-#include <qimage.h>
-#include <qdict.h>
+#include <tqimage.h>
+#include <tqdict.h>
static const QRgb group_grey_data[] = {
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x42484848,0xc39b9b9b,0xeab1b1b1,0xce9d9d9d,0x5a4d4d4d,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x563b3b3b,0xfdaeaeae,0xffcfcfcf,0xffcccccc,0xffcecece,
@@ -245,20 +245,20 @@ static struct EmbedImage {
{ 0, 0, 0, 0, 0, 0, 0, 0 }
};
-static const QImage& qembed_findImage( const QString& name )
+static const TQImage& qembed_findImage( const TQString& name )
{
- static QDict<QImage> dict;
- QImage* img = dict.find( name );
+ static TQDict<TQImage> dict;
+ TQImage* img = dict.find( name );
if ( !img ) {
for ( int i = 0; embed_image_vec[i].data; i++ ) {
if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) {
- img = new QImage((uchar*)embed_image_vec[i].data,
+ img = new TQImage((uchar*)embed_image_vec[i].data,
embed_image_vec[i].width,
embed_image_vec[i].height,
embed_image_vec[i].depth,
(QRgb*)embed_image_vec[i].colorTable,
embed_image_vec[i].numColors,
- QImage::BigEndian );
+ TQImage::BigEndian );
if ( embed_image_vec[i].alpha )
img->setAlphaBuffer( TRUE );
dict.insert( name, img );
@@ -266,7 +266,7 @@ static const QImage& qembed_findImage( const QString& name )
}
}
if ( !img ) {
- static QImage dummy;
+ static TQImage dummy;
return dummy;
}
}
diff --git a/kio/kfile/kacleditwidget.cpp b/kio/kfile/kacleditwidget.cpp
index 41a5af7bd..7f253f8c5 100644
--- a/kio/kfile/kacleditwidget.cpp
+++ b/kio/kfile/kacleditwidget.cpp
@@ -24,19 +24,19 @@
#ifdef USE_POSIX_ACL
-#include <qpainter.h>
-#include <qptrlist.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qheader.h>
+#include <tqpainter.h>
+#include <tqptrlist.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqheader.h>
#include <klocale.h>
#include <kfileitem.h>
@@ -58,7 +58,7 @@ extern "C" {
static struct {
const char* label;
const char* pixmapName;
- QPixmap* pixmap;
+ TQPixmap* pixmap;
} s_itemAttributes[] = {
{ I18N_NOOP( "Owner" ), "user-grey", 0 },
{ I18N_NOOP( "Owning Group" ), "group-grey", 0 },
@@ -68,24 +68,24 @@ static struct {
{ I18N_NOOP( "Named Group" ), "group", 0 },
};
-KACLEditWidget::KACLEditWidget( QWidget *parent, const char *name )
- :QWidget( parent, name )
+KACLEditWidget::KACLEditWidget( TQWidget *parent, const char *name )
+ :TQWidget( parent, name )
{
- QHBox *hbox = new QHBox( parent );
+ TQHBox *hbox = new TQHBox( parent );
hbox->setSpacing( KDialog::spacingHint() );
m_listView = new KACLListView( hbox, "acl_listview" );
- connect( m_listView, SIGNAL( selectionChanged() ),
- this, SLOT( slotUpdateButtons() ) );
- QVBox *vbox = new QVBox( hbox );
+ connect( m_listView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotUpdateButtons() ) );
+ TQVBox *vbox = new TQVBox( hbox );
vbox->setSpacing( KDialog::spacingHint() );
- m_AddBtn = new QPushButton( i18n( "Add Entry..." ), vbox, "add_entry_button" );
- connect( m_AddBtn, SIGNAL( clicked() ), m_listView, SLOT( slotAddEntry() ) );
- m_EditBtn = new QPushButton( i18n( "Edit Entry..." ), vbox, "edit_entry_button" );
- connect( m_EditBtn, SIGNAL( clicked() ), m_listView, SLOT( slotEditEntry() ) );
- m_DelBtn = new QPushButton( i18n( "Delete Entry" ), vbox, "delete_entry_button" );
- connect( m_DelBtn, SIGNAL( clicked() ), m_listView, SLOT( slotRemoveEntry() ) );
- QWidget *spacer = new QWidget( vbox );
- spacer->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding );
+ m_AddBtn = new TQPushButton( i18n( "Add Entry..." ), vbox, "add_entry_button" );
+ connect( m_AddBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotAddEntry() ) );
+ m_EditBtn = new TQPushButton( i18n( "Edit Entry..." ), vbox, "edit_entry_button" );
+ connect( m_EditBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotEditEntry() ) );
+ m_DelBtn = new TQPushButton( i18n( "Delete Entry" ), vbox, "delete_entry_button" );
+ connect( m_DelBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotRemoveEntry() ) );
+ TQWidget *spacer = new TQWidget( vbox );
+ spacer->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding );
slotUpdateButtons();
}
@@ -94,7 +94,7 @@ void KACLEditWidget::slotUpdateButtons()
bool atLeastOneIsNotDeletable = false;
bool atLeastOneIsNotAllowedToChangeType = false;
int selectedCount = 0;
- QListViewItemIterator it( m_listView, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( m_listView, TQListViewItemIterator::Selected );
while ( KACLListViewItem *item = dynamic_cast<KACLListViewItem*>( it.current() ) ) {
++it; ++selectedCount;
if ( !item->isDeletable() )
@@ -139,10 +139,10 @@ void KACLEditWidget::setReadOnly( bool on )
slotUpdateButtons();
}
-KACLListViewItem::KACLListViewItem( QListView* parent,
+KACLListViewItem::KACLListViewItem( TQListView* parent,
KACLListView::EntryType _type,
unsigned short _value, bool defaults,
- const QString& _qualifier )
+ const TQString& _qualifier )
: KListViewItem( parent, parent->lastItem() ), // we want to append
type( _type ), value( _value ), isDefault( defaults ),
qualifier( _qualifier ), isPartial( false )
@@ -157,9 +157,9 @@ KACLListViewItem::~ KACLListViewItem()
}
-QString KACLListViewItem::key( int, bool ) const
+TQString KACLListViewItem::key( int, bool ) const
{
- QString key;
+ TQString key;
if ( !isDefault )
key = "A";
else
@@ -191,17 +191,17 @@ QString KACLListViewItem::key( int, bool ) const
return key;
}
-void KACLListViewItem::paintCell( QPainter* p, const QColorGroup &cg,
+void KACLListViewItem::paintCell( TQPainter* p, const TQColorGroup &cg,
int column, int width, int alignment )
{
- QColorGroup mycg = cg;
+ TQColorGroup mycg = cg;
if ( isDefault ) {
- mycg.setColor( QColorGroup::Text, QColor( 0, 0, 255 ) );
+ mycg.setColor( TQColorGroup::Text, TQColor( 0, 0, 255 ) );
}
if ( isPartial ) {
- QFont font = p->font();
+ TQFont font = p->font();
font.setItalic( true );
- mycg.setColor( QColorGroup::Text, QColor( 100, 100, 100 ) );
+ mycg.setColor( TQColorGroup::Text, TQColor( 100, 100, 100 ) );
p->setFont( font );
}
KListViewItem::paintCell( p, mycg, column, width, alignment );
@@ -213,7 +213,7 @@ void KACLListViewItem::paintCell( QPainter* p, const QColorGroup &cg,
const bool lastNonDefault = !isDefault && below && below->isDefault;
if ( type == KACLListView::Mask || lastUser || lastNonDefault )
{
- p->setPen( QPen( Qt::gray, 0, QPen::DotLine ) );
+ p->setPen( TQPen( Qt::gray, 0, TQPen::DotLine ) );
if ( type == KACLListView::Mask )
p->drawLine( 0, 0, width - 1, 0 );
p->drawLine( 0, height() - 1, width - 1, height() - 1 );
@@ -230,21 +230,21 @@ void KACLListViewItem::updatePermPixmaps()
else if ( partialPerms & ACL_READ )
setPixmap( 2, m_pACLListView->getYesPartialPixmap() );
else
- setPixmap( 2, QPixmap() );
+ setPixmap( 2, TQPixmap() );
if ( value & ACL_WRITE )
setPixmap( 3, m_pACLListView->getYesPixmap() );
else if ( partialPerms & ACL_WRITE )
setPixmap( 3, m_pACLListView->getYesPartialPixmap() );
else
- setPixmap( 3, QPixmap() );
+ setPixmap( 3, TQPixmap() );
if ( value & ACL_EXECUTE )
setPixmap( 4, m_pACLListView->getYesPixmap() );
else if ( partialPerms & ACL_EXECUTE )
setPixmap( 4, m_pACLListView->getYesPartialPixmap() );
else
- setPixmap( 4, QPixmap() );
+ setPixmap( 4, TQPixmap() );
}
void KACLListViewItem::repaint()
@@ -285,7 +285,7 @@ void KACLListViewItem::repaint()
void KACLListViewItem::calcEffectiveRights()
{
- QString strEffective = QString( "---" );
+ TQString strEffective = TQString( "---" );
// Do we need to worry about the mask entry? It applies to named users,
// owning group, and named groups
@@ -387,10 +387,10 @@ void KACLListViewItem::togglePerm( acl_perm_t perm )
EditACLEntryDialog::EditACLEntryDialog( KACLListView *listView, KACLListViewItem *item,
- const QStringList &users,
- const QStringList &groups,
- const QStringList &defaultUsers,
- const QStringList &defaultGroups,
+ const TQStringList &users,
+ const TQStringList &groups,
+ const TQStringList &defaultUsers,
+ const TQStringList &defaultGroups,
int allowedTypes, int allowedDefaultTypes,
bool allowDefaults )
: KDialogBase( listView, "edit_entry_dialog", true,
@@ -401,54 +401,54 @@ EditACLEntryDialog::EditACLEntryDialog( KACLListView *listView, KACLListViewItem
m_allowedTypes( allowedTypes ), m_allowedDefaultTypes( allowedDefaultTypes ),
m_defaultCB( 0 )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget( page );
- QVBoxLayout *mainLayout = new QVBoxLayout( page, 0, spacingHint(), "mainLayout" );
- m_buttonGroup = new QVButtonGroup( i18n("Entry Type"), page, "bg" );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( page, 0, spacingHint(), "mainLayout" );
+ m_buttonGroup = new TQVButtonGroup( i18n("Entry Type"), page, "bg" );
if ( allowDefaults ) {
- m_defaultCB = new QCheckBox( i18n("Default for new files in this folder"), page, "defaultCB" );
+ m_defaultCB = new TQCheckBox( i18n("Default for new files in this folder"), page, "defaultCB" );
mainLayout->addWidget( m_defaultCB );
- connect( m_defaultCB, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUpdateAllowedUsersAndGroups() ) );
- connect( m_defaultCB, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUpdateAllowedTypes() ) );
+ connect( m_defaultCB, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUpdateAllowedUsersAndGroups() ) );
+ connect( m_defaultCB, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUpdateAllowedTypes() ) );
}
mainLayout->addWidget( m_buttonGroup );
- QRadioButton *ownerType = new QRadioButton( i18n("Owner"), m_buttonGroup, "ownerType" );
+ TQRadioButton *ownerType = new TQRadioButton( i18n("Owner"), m_buttonGroup, "ownerType" );
m_buttonGroup->insert( ownerType, KACLListView::User );
- QRadioButton *owningGroupType = new QRadioButton( i18n("Owning Group"), m_buttonGroup, "owningGroupType" );
+ TQRadioButton *owningGroupType = new TQRadioButton( i18n("Owning Group"), m_buttonGroup, "owningGroupType" );
m_buttonGroup->insert( owningGroupType, KACLListView::Group );
- QRadioButton *othersType = new QRadioButton( i18n("Others"), m_buttonGroup, "othersType" );
+ TQRadioButton *othersType = new TQRadioButton( i18n("Others"), m_buttonGroup, "othersType" );
m_buttonGroup->insert( othersType, KACLListView::Others );
- QRadioButton *maskType = new QRadioButton( i18n("Mask"), m_buttonGroup, "maskType" );
+ TQRadioButton *maskType = new TQRadioButton( i18n("Mask"), m_buttonGroup, "maskType" );
m_buttonGroup->insert( maskType, KACLListView::Mask );
- QRadioButton *namedUserType = new QRadioButton( i18n("Named User"), m_buttonGroup, "namesUserType" );
+ TQRadioButton *namedUserType = new TQRadioButton( i18n("Named User"), m_buttonGroup, "namesUserType" );
m_buttonGroup->insert( namedUserType, KACLListView::NamedUser );
- QRadioButton *namedGroupType = new QRadioButton( i18n("Named Group"), m_buttonGroup, "namedGroupType" );
+ TQRadioButton *namedGroupType = new TQRadioButton( i18n("Named Group"), m_buttonGroup, "namedGroupType" );
m_buttonGroup->insert( namedGroupType, KACLListView::NamedGroup );
- connect( m_buttonGroup, SIGNAL( clicked( int ) ),
- this, SLOT( slotSelectionChanged( int ) ) );
+ connect( m_buttonGroup, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotSelectionChanged( int ) ) );
- m_widgetStack = new QWidgetStack( page );
+ m_widgetStack = new TQWidgetStack( page );
mainLayout->addWidget( m_widgetStack );
- QHBox *usersBox = new QHBox( m_widgetStack );
+ TQHBox *usersBox = new TQHBox( m_widgetStack );
m_widgetStack->addWidget( usersBox, KACLListView::NamedUser );
- QHBox *groupsBox = new QHBox( m_widgetStack );
+ TQHBox *groupsBox = new TQHBox( m_widgetStack );
m_widgetStack->addWidget( groupsBox, KACLListView::NamedGroup );
- QLabel *usersLabel = new QLabel( i18n( "User: " ), usersBox );
- m_usersCombo = new QComboBox( false, usersBox, "users" );
+ TQLabel *usersLabel = new TQLabel( i18n( "User: " ), usersBox );
+ m_usersCombo = new TQComboBox( false, usersBox, "users" );
usersLabel->setBuddy( m_usersCombo );
- QLabel *groupsLabel = new QLabel( i18n( "Group: " ), groupsBox );
- m_groupsCombo = new QComboBox( false, groupsBox, "groups" );
+ TQLabel *groupsLabel = new TQLabel( i18n( "Group: " ), groupsBox );
+ m_groupsCombo = new TQComboBox( false, groupsBox, "groups" );
groupsLabel->setBuddy( m_groupsCombo );
if ( m_item ) {
@@ -470,7 +470,7 @@ EditACLEntryDialog::EditACLEntryDialog( KACLListView *listView, KACLListViewItem
slotSelectionChanged( KACLListView::NamedUser );
slotUpdateAllowedUsersAndGroups();
}
- incInitialSize( QSize( 100, 0 ) );
+ incInitialSize( TQSize( 100, 0 ) );
}
void EditACLEntryDialog::slotUpdateAllowedTypes()
@@ -489,8 +489,8 @@ void EditACLEntryDialog::slotUpdateAllowedTypes()
void EditACLEntryDialog::slotUpdateAllowedUsersAndGroups()
{
- const QString oldUser = m_usersCombo->currentText();
- const QString oldGroup = m_groupsCombo->currentText();
+ const TQString oldUser = m_usersCombo->currentText();
+ const TQString oldGroup = m_groupsCombo->currentText();
m_usersCombo->clear();
m_groupsCombo->clear();
if ( m_defaultCB && m_defaultCB->isChecked() ) {
@@ -513,7 +513,7 @@ void EditACLEntryDialog::slotOk()
{
KACLListView::EntryType type = static_cast<KACLListView::EntryType>( m_buttonGroup->selectedId() );
- QString qualifier;
+ TQString qualifier;
if ( type == KACLListView::NamedUser )
qualifier = m_usersCombo->currentText();
if ( type == KACLListView::NamedGroup )
@@ -555,7 +555,7 @@ void EditACLEntryDialog::slotSelectionChanged( int id )
}
-KACLListView::KACLListView( QWidget* parent, const char* name )
+KACLListView::KACLListView( TQWidget* parent, const char* name )
: KListView( parent, name ),
m_hasMask( false ), m_allowDefaults( false )
{
@@ -571,25 +571,25 @@ KACLListView::KACLListView( QWidget* parent, const char* name )
// Load the avatars
for ( int i=0; i < LAST_IDX; ++i ) {
- s_itemAttributes[i].pixmap = new QPixmap( qembed_findImage( s_itemAttributes[i].pixmapName ) );
+ s_itemAttributes[i].pixmap = new TQPixmap( qembed_findImage( s_itemAttributes[i].pixmapName ) );
}
- m_yesPixmap = new QPixmap( qembed_findImage( "yes" ) );
- m_yesPartialPixmap = new QPixmap( qembed_findImage( "yespartial" ) );
+ m_yesPixmap = new TQPixmap( qembed_findImage( "yes" ) );
+ m_yesPartialPixmap = new TQPixmap( qembed_findImage( "yespartial" ) );
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
// fill the lists of all legal users and groups
struct passwd *user = 0;
setpwent();
while ( ( user = getpwent() ) != 0 ) {
- m_allUsers << QString::fromLatin1( user->pw_name );
+ m_allUsers << TQString::fromLatin1( user->pw_name );
}
endpwent();
struct group *gr = 0;
setgrent();
while ( ( gr = getgrent() ) != 0 ) {
- m_allGroups << QString::fromLatin1( gr->gr_name );
+ m_allGroups << TQString::fromLatin1( gr->gr_name );
}
endgrent();
m_allUsers.sort();
@@ -606,10 +606,10 @@ KACLListView::~KACLListView()
delete m_yesPartialPixmap;
}
-QStringList KACLListView::allowedUsers( bool defaults, KACLListViewItem *allowedItem )
+TQStringList KACLListView::allowedUsers( bool defaults, KACLListViewItem *allowedItem )
{
- QStringList allowedUsers = m_allUsers;
- QListViewItemIterator it( this );
+ TQStringList allowedUsers = m_allUsers;
+ TQListViewItemIterator it( this );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( *it );
++it;
@@ -620,10 +620,10 @@ QStringList KACLListView::allowedUsers( bool defaults, KACLListViewItem *allowed
return allowedUsers;
}
-QStringList KACLListView::allowedGroups( bool defaults, KACLListViewItem *allowedItem )
+TQStringList KACLListView::allowedGroups( bool defaults, KACLListViewItem *allowedItem )
{
- QStringList allowedGroups = m_allGroups;
- QListViewItemIterator it( this );
+ TQStringList allowedGroups = m_allGroups;
+ TQListViewItemIterator it( this );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( *it );
++it;
@@ -637,7 +637,7 @@ QStringList KACLListView::allowedGroups( bool defaults, KACLListViewItem *allowe
void KACLListView::fillItemsFromACL( const KACL &pACL, bool defaults )
{
// clear out old entries of that ilk
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( KACLListViewItem *item = static_cast<KACLListViewItem*>( it.current() ) ) {
++it;
if ( item->isDefault == defaults )
@@ -698,8 +698,8 @@ KACL KACLListView::itemsToACL( bool defaults ) const
bool atLeastOneEntry = false;
ACLUserPermissionsList users;
ACLGroupPermissionsList groups;
- QListViewItemIterator it( const_cast<KACLListView*>( this ) );
- while ( QListViewItem* qlvi = it.current() ) {
+ TQListViewItemIterator it( const_cast<KACLListView*>( this ) );
+ while ( TQListViewItem* qlvi = it.current() ) {
++it;
const KACLListViewItem* item = static_cast<KACLListViewItem*>( qlvi );
if ( item->isDefault != defaults ) continue;
@@ -747,9 +747,9 @@ KACL KACLListView::getDefaultACL()
return itemsToACL( true );
}
-void KACLListView::contentsMousePressEvent( QMouseEvent * e )
+void KACLListView::contentsMousePressEvent( TQMouseEvent * e )
{
- QListViewItem *clickedItem = itemAt( contentsToViewport( e->pos() ) );
+ TQListViewItem *clickedItem = itemAt( contentsToViewport( e->pos() ) );
if ( !clickedItem ) return;
// if the click is on an as yet unselected item, select it first
if ( !clickedItem->isSelected() )
@@ -774,7 +774,7 @@ void KACLListView::contentsMousePressEvent( QMouseEvent * e )
}
KACLListViewItem* referenceItem = static_cast<KACLListViewItem*>( clickedItem );
unsigned short referenceHadItSet = referenceItem->value & perm;
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( KACLListViewItem* item = static_cast<KACLListViewItem*>( it.current() ) ) {
++it;
if ( !item->isSelected() ) continue;
@@ -784,11 +784,11 @@ void KACLListView::contentsMousePressEvent( QMouseEvent * e )
}
}
-void KACLListView::entryClicked( QListViewItem* pItem, const QPoint& /*pt*/, int col )
+void KACLListView::entryClicked( TQListViewItem* pItem, const TQPoint& /*pt*/, int col )
{
if ( !pItem ) return;
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( KACLListViewItem* item = static_cast<KACLListViewItem*>( it.current() ) ) {
++it;
if ( !item->isSelected() ) continue;
@@ -835,7 +835,7 @@ void KACLListView::entryClicked( QListViewItem* pItem, const QPoint& /*pt*/, int
void KACLListView::calculateEffectiveRights()
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
KACLListViewItem* pItem;
while ( ( pItem = dynamic_cast<KACLListViewItem*>( it.current() ) ) != 0 )
{
@@ -873,7 +873,7 @@ void KACLListView::setMaskPartialPermissions( acl_perm_t /*maskPartialPerms*/ )
bool KACLListView::hasDefaultEntries() const
{
- QListViewItemIterator it( const_cast<KACLListView*>( this ) );
+ TQListViewItemIterator it( const_cast<KACLListView*>( this ) );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( it.current() );
++it;
@@ -889,7 +889,7 @@ const KACLListViewItem* KACLListView::findDefaultItemByType( EntryType type ) co
const KACLListViewItem* KACLListView::findItemByType( EntryType type, bool defaults ) const
{
- QListViewItemIterator it( const_cast<KACLListView*>( this ) );
+ TQListViewItemIterator it( const_cast<KACLListView*>( this ) );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( it.current() );
++it;
@@ -962,7 +962,7 @@ void KACLListView::slotAddEntry()
calculateEffectiveRights();
sort();
setCurrentItem( item );
- // QListView doesn't seem to emit, in this case, and we need to update
+ // TQListView doesn't seem to emit, in this case, and we need to update
// the buttons...
if ( childCount() == 1 )
emit currentChanged( item );
@@ -970,7 +970,7 @@ void KACLListView::slotAddEntry()
void KACLListView::slotEditEntry()
{
- QListViewItem * current = currentItem();
+ TQListViewItem * current = currentItem();
if ( !current ) return;
KACLListViewItem *item = static_cast<KACLListViewItem*>( current );
int allowedTypes = item->type | NamedUser | NamedGroup;
@@ -1002,7 +1002,7 @@ void KACLListView::slotEditEntry()
void KACLListView::slotRemoveEntry()
{
- QListViewItemIterator it( this, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( this, TQListViewItemIterator::Selected );
while ( it.current() ) {
KACLListViewItem *item = static_cast<KACLListViewItem*>( it.current() );
++it;
diff --git a/kio/kfile/kacleditwidget.h b/kio/kfile/kacleditwidget.h
index 4fec2d7c3..39cdf89a1 100644
--- a/kio/kfile/kacleditwidget.h
+++ b/kio/kfile/kacleditwidget.h
@@ -38,7 +38,7 @@ class KACLEditWidget : QWidget
{
Q_OBJECT
public:
- KACLEditWidget( QWidget *parent = 0, const char *name = 0 );
+ KACLEditWidget( TQWidget *parent = 0, const char *name = 0 );
KACL getACL() const;
KACL getDefaultACL() const;
void setACL( const KACL & );
@@ -50,9 +50,9 @@ private slots:
private:
KACLListView* m_listView;
- QPushButton *m_AddBtn;
- QPushButton *m_EditBtn;
- QPushButton *m_DelBtn;
+ TQPushButton *m_AddBtn;
+ TQPushButton *m_EditBtn;
+ TQPushButton *m_DelBtn;
};
diff --git a/kio/kfile/kacleditwidget_p.h b/kio/kfile/kacleditwidget_p.h
index 6a5a7d074..3ad77930c 100644
--- a/kio/kfile/kacleditwidget_p.h
+++ b/kio/kfile/kacleditwidget_p.h
@@ -30,8 +30,8 @@
#include <kacl.h>
#include <kfileitem.h>
#include <kdialogbase.h>
-#include <qpixmap.h>
-#include <qcombobox.h>
+#include <tqpixmap.h>
+#include <tqcombobox.h>
class KACLListViewItem;
class QPushButton;
@@ -66,7 +66,7 @@ public:
NamedGroup = 32,
AllTypes = 63 };
- KACLListView( QWidget* parent = 0, const char* name = 0 );
+ KACLListView( TQWidget* parent = 0, const char* name = 0 );
~KACLListView();
bool hasMaskEntry() const { return m_hasMask; }
@@ -87,8 +87,8 @@ public:
unsigned short calculateMaskValue( bool defaults ) const;
void calculateEffectiveRights();
- QStringList allowedUsers( bool defaults, KACLListViewItem *allowedItem = 0 );
- QStringList allowedGroups( bool defaults, KACLListViewItem *allowedItem = 0 );
+ TQStringList allowedUsers( bool defaults, KACLListViewItem *allowedItem = 0 );
+ TQStringList allowedGroups( bool defaults, KACLListViewItem *allowedItem = 0 );
const KACL getACL() const { return getACL(); }
KACL getACL();
@@ -96,8 +96,8 @@ public:
const KACL getDefaultACL() const { return getDefaultACL(); }
KACL getDefaultACL();
- QPixmap getYesPixmap() const { return *m_yesPixmap; }
- QPixmap getYesPartialPixmap() const { return *m_yesPartialPixmap; }
+ TQPixmap getYesPixmap() const { return *m_yesPixmap; }
+ TQPixmap getYesPartialPixmap() const { return *m_yesPartialPixmap; }
public slots:
void slotAddEntry();
@@ -107,9 +107,9 @@ public slots:
void setDefaultACL( const KACL &anACL );
protected slots:
- void entryClicked( QListViewItem* pItem, const QPoint& pt, int col );
+ void entryClicked( TQListViewItem* pItem, const TQPoint& pt, int col );
protected:
- void contentsMousePressEvent( QMouseEvent * e );
+ void contentsMousePressEvent( TQMouseEvent * e );
private:
void fillItemsFromACL( const KACL &pACL, bool defaults = false );
@@ -120,10 +120,10 @@ private:
unsigned short m_mask;
bool m_hasMask;
bool m_allowDefaults;
- QStringList m_allUsers;
- QStringList m_allGroups;
- QPixmap* m_yesPixmap;
- QPixmap* m_yesPartialPixmap;
+ TQStringList m_allUsers;
+ TQStringList m_allGroups;
+ TQPixmap* m_yesPixmap;
+ TQPixmap* m_yesPartialPixmap;
};
class EditACLEntryDialog : public KDialogBase
@@ -131,10 +131,10 @@ class EditACLEntryDialog : public KDialogBase
Q_OBJECT
public:
EditACLEntryDialog( KACLListView *listView, KACLListViewItem *item,
- const QStringList &users,
- const QStringList &groups,
- const QStringList &defaultUsers,
- const QStringList &defaultGroups,
+ const TQStringList &users,
+ const TQStringList &groups,
+ const TQStringList &defaultUsers,
+ const TQStringList &defaultGroups,
int allowedTypes = KACLListView::AllTypes,
int allowedDefaultTypes = KACLListView::AllTypes,
bool allowDefault = false );
@@ -148,29 +148,29 @@ private slots:
private:
KACLListView *m_listView;
KACLListViewItem *m_item;
- QStringList m_users;
- QStringList m_groups;
- QStringList m_defaultUsers;
- QStringList m_defaultGroups;
+ TQStringList m_users;
+ TQStringList m_groups;
+ TQStringList m_defaultUsers;
+ TQStringList m_defaultGroups;
int m_allowedTypes;
int m_allowedDefaultTypes;
- QVButtonGroup *m_buttonGroup;
- QComboBox *m_usersCombo;
- QComboBox *m_groupsCombo;
- QWidgetStack *m_widgetStack;
- QCheckBox *m_defaultCB;
+ TQVButtonGroup *m_buttonGroup;
+ TQComboBox *m_usersCombo;
+ TQComboBox *m_groupsCombo;
+ TQWidgetStack *m_widgetStack;
+ TQCheckBox *m_defaultCB;
};
class KACLListViewItem : public KListViewItem
{
public:
- KACLListViewItem( QListView* parent, KACLListView::EntryType type,
+ KACLListViewItem( TQListView* parent, KACLListView::EntryType type,
unsigned short value,
bool defaultEntry,
- const QString& qualifier = QString::null );
+ const TQString& qualifier = TQString::null );
virtual ~KACLListViewItem();
- virtual QString key( int column, bool ascending ) const;
+ virtual TQString key( int column, bool ascending ) const;
void calcEffectiveRights();
@@ -179,7 +179,7 @@ public:
void togglePerm( acl_perm_t perm );
- virtual void paintCell( QPainter *p, const QColorGroup &cg,
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment );
void updatePermPixmaps();
@@ -188,7 +188,7 @@ public:
KACLListView::EntryType type;
unsigned short value;
bool isDefault;
- QString qualifier;
+ TQString qualifier;
bool isPartial;
private:
diff --git a/kio/kfile/kcombiview.cpp b/kio/kfile/kcombiview.cpp
index fc16054f1..6baf6d36f 100644
--- a/kio/kfile/kcombiview.cpp
+++ b/kio/kfile/kcombiview.cpp
@@ -28,19 +28,19 @@
#include "kfiledetailview.h"
#include "config-kfile.h"
-#include <qevent.h>
+#include <tqevent.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kglobal.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
-KCombiView::KCombiView( QWidget *parent, const char *name)
- : QSplitter( parent, name),
+KCombiView::KCombiView( TQWidget *parent, const char *name)
+ : TQSplitter( parent, name),
KFileView(),
right(0),
m_lastViewForNextItem(0),
@@ -51,13 +51,13 @@ KCombiView::KCombiView( QWidget *parent, const char *name)
left->viewport()->setAcceptDrops(false);
left->setGridX( 160 );
left->KFileView::setViewMode( Directories );
- left->setArrangement( QIconView::LeftToRight );
+ left->setArrangement( TQIconView::LeftToRight );
left->setParentView( this );
left->setAcceptDrops(false);
left->installEventFilter( this );
- connect( sig, SIGNAL( sortingChanged( QDir::SortSpec ) ),
- SLOT( slotSortingChanged( QDir::SortSpec ) ));
+ connect( sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ),
+ TQT_SLOT( slotSortingChanged( TQDir::SortSpec ) ));
}
KCombiView::~KCombiView()
@@ -72,10 +72,10 @@ void KCombiView::setRight(KFileView *view)
right->KFileView::setViewMode( Files );
setViewName( right->viewName() );
- QValueList<int> lst;
+ TQValueList<int> lst;
lst << left->gridX() + 2 * left->spacing();
setSizes( lst );
- setResizeMode( left, QSplitter::KeepSize );
+ setResizeMode( left, TQSplitter::KeepSize );
right->setParentView( this );
right->widget()->setAcceptDrops(acceptDrops());
@@ -98,7 +98,7 @@ void KCombiView::insertItem( KFileItem *item )
}
}
-void KCombiView::setSorting( QDir::SortSpec sort )
+void KCombiView::setSorting( TQDir::SortSpec sort )
{
if ( !right )
kdFatal() << "You need to call setRight( someview ) before!" << endl;
@@ -293,26 +293,26 @@ KFileItem * KCombiView::prevItem( const KFileItem *fileItem ) const
return item;
}
-void KCombiView::slotSortingChanged( QDir::SortSpec sorting )
+void KCombiView::slotSortingChanged( TQDir::SortSpec sorting )
{
KFileView::setSorting( sorting );
}
KFileView *KCombiView::focusView( KFileView *preferred ) const
{
- QWidget *w = focusWidget();
+ TQWidget *w = focusWidget();
KFileView *other = (right == preferred) ? left : right;
return (preferred && w == preferred->widget()) ? preferred : other;
}
-void KCombiView::readConfig( KConfig *config, const QString& group )
+void KCombiView::readConfig( KConfig *config, const TQString& group )
{
left->readConfig( config, group );
if ( right )
right->readConfig( config, group );
}
-void KCombiView::writeConfig( KConfig *config, const QString& group )
+void KCombiView::writeConfig( KConfig *config, const TQString& group )
{
left->writeConfig( config, group );
if ( right )
@@ -329,7 +329,7 @@ void KCombiView::setAcceptDrops(bool b)
left->setAcceptDrops(b);
if (right)
right->widget()->setAcceptDrops(b);
- QSplitter::setAcceptDrops(b);
+ TQSplitter::setAcceptDrops(b);
}
void KCombiView::setDropOptions_impl(int options)
@@ -351,12 +351,12 @@ void KCombiView::virtual_hook( int id, void* data )
}
}
-bool KCombiView::eventFilter( QObject *o, QEvent *e )
+bool KCombiView::eventFilter( TQObject *o, TQEvent *e )
{
int type = e->type();
// only the focused view may have a selection
- if ( type == QEvent::FocusIn )
+ if ( type == TQEvent::FocusIn )
{
if ( o == left )
right->clearSelection();
@@ -364,7 +364,7 @@ bool KCombiView::eventFilter( QObject *o, QEvent *e )
left->clearSelection();
}
- return QSplitter::eventFilter( o, e );
+ return TQSplitter::eventFilter( o, e );
}
#include "kcombiview.moc"
diff --git a/kio/kfile/kcombiview.h b/kio/kfile/kcombiview.h
index b38876d71..3597669ea 100644
--- a/kio/kfile/kcombiview.h
+++ b/kio/kfile/kcombiview.h
@@ -22,7 +22,7 @@
#ifndef _KCOMBIVIEW_H
#define _KCOMBIVIEW_H
-#include <qsplitter.h>
+#include <tqsplitter.h>
#include <klocale.h>
#include <kfile.h>
@@ -51,16 +51,16 @@ class QIconViewItem;
* @see KFileDetailView
* @see KDirOperator
*/
-class KIO_EXPORT KCombiView : public QSplitter,
+class KIO_EXPORT KCombiView : public TQSplitter,
public KFileView
{
Q_OBJECT
public:
- KCombiView( QWidget *parent, const char *name);
+ KCombiView( TQWidget *parent, const char *name);
virtual ~KCombiView();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
virtual void updateView( bool );
@@ -91,10 +91,10 @@ public:
virtual void insertItem( KFileItem *i );
virtual void clear();
- virtual void setSorting( QDir::SortSpec sort );
+ virtual void setSorting( TQDir::SortSpec sort );
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
void ensureItemVisible( const KFileItem * );
@@ -107,7 +107,7 @@ protected:
KFileView *right;
protected slots:
- void slotSortingChanged( QDir::SortSpec );
+ void slotSortingChanged( TQDir::SortSpec );
private:
KFileView *focusView( KFileView *preferred ) const;
@@ -120,7 +120,7 @@ private:
mutable KFileView *m_lastViewForPrevItem;
protected:
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
void setDropOptions_impl(int options);
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kfile/kcustommenueditor.cpp b/kio/kfile/kcustommenueditor.cpp
index edbca55e3..aec3c10f1 100644
--- a/kio/kfile/kcustommenueditor.cpp
+++ b/kio/kfile/kcustommenueditor.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qhbox.h>
-#include <qregexp.h>
-#include <qimage.h>
-#include <qpushbutton.h>
-#include <qdir.h>
+#include <tqhbox.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqpushbutton.h>
+#include <tqdir.h>
#include <kbuttonbox.h>
#include <klocale.h>
@@ -38,15 +38,15 @@
class KCustomMenuEditor::Item : public QListViewItem
{
public:
- Item(QListView *parent, KService::Ptr service)
- : QListViewItem(parent),
+ Item(TQListView *parent, KService::Ptr service)
+ : TQListViewItem(parent),
s(service)
{
init();
}
- Item(QListViewItem *parent, KService::Ptr service)
- : QListViewItem(parent),
+ Item(TQListViewItem *parent, KService::Ptr service)
+ : TQListViewItem(parent),
s(service)
{
init();
@@ -54,18 +54,18 @@ public:
void init()
{
- QString serviceName = s->name();
+ TQString serviceName = s->name();
// item names may contain ampersands. To avoid them being converted
// to accelators, replace them with two ampersands.
serviceName.replace("&", "&&");
- QPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small,
+ TQPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small,
0, KIcon::DefaultState, 0L, true);
// make sure they are not larger than 16x16
if (normal.width() > 16 || normal.height() > 16) {
- QImage tmp = normal.convertToImage();
+ TQImage tmp = normal.convertToImage();
tmp = tmp.smoothScale(16, 16);
normal.convertFromImage(tmp);
}
@@ -79,28 +79,28 @@ public:
class KCustomMenuEditor::KCustomMenuEditorPrivate
{
public:
- QPushButton * pbRemove;
- QPushButton * pbMoveUp;
- QPushButton * pbMoveDown;
+ TQPushButton * pbRemove;
+ TQPushButton * pbMoveUp;
+ TQPushButton * pbMoveDown;
};
-KCustomMenuEditor::KCustomMenuEditor(QWidget *parent)
+KCustomMenuEditor::KCustomMenuEditor(TQWidget *parent)
: KDialogBase(parent, "custommenueditor", true, i18n("Menu Editor"), Ok|Cancel, Ok, true),
m_listView(0)
{
d = new KCustomMenuEditorPrivate;
- QHBox *page = makeHBoxMainWidget();
+ TQHBox *page = makeHBoxMainWidget();
m_listView = new KListView(page);
m_listView->addColumn(i18n("Menu"));
m_listView->setFullWidth(true);
m_listView->setSorting(-1);
KButtonBox *buttonBox = new KButtonBox(page, Vertical);
- buttonBox->addButton(i18n("New..."), this, SLOT(slotNewItem()));
- d->pbRemove=buttonBox->addButton(i18n("Remove"), this, SLOT(slotRemoveItem()));
- d->pbMoveUp=buttonBox->addButton(i18n("Move Up"), this, SLOT(slotMoveUp()));
- d->pbMoveDown=buttonBox->addButton(i18n("Move Down"), this, SLOT(slotMoveDown()));
+ buttonBox->addButton(i18n("New..."), this, TQT_SLOT(slotNewItem()));
+ d->pbRemove=buttonBox->addButton(i18n("Remove"), this, TQT_SLOT(slotRemoveItem()));
+ d->pbMoveUp=buttonBox->addButton(i18n("Move Up"), this, TQT_SLOT(slotMoveUp()));
+ d->pbMoveDown=buttonBox->addButton(i18n("Move Down"), this, TQT_SLOT(slotMoveDown()));
buttonBox->layout();
- connect( m_listView, SIGNAL( selectionChanged () ), this, SLOT( refreshButton() ) );
+ connect( m_listView, TQT_SIGNAL( selectionChanged () ), this, TQT_SLOT( refreshButton() ) );
refreshButton();
}
@@ -112,7 +112,7 @@ KCustomMenuEditor::~KCustomMenuEditor()
void KCustomMenuEditor::refreshButton()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
d->pbRemove->setEnabled( item );
d->pbMoveUp->setEnabled( item && item->itemAbove() );
d->pbMoveDown->setEnabled( item && item->itemBelow() );
@@ -121,12 +121,12 @@ void KCustomMenuEditor::refreshButton()
void
KCustomMenuEditor::load(KConfigBase *cfg)
{
- cfg->setGroup(QString::null);
+ cfg->setGroup(TQString::null);
int count = cfg->readNumEntry("NrOfItems");
- QListViewItem *last = 0;
+ TQListViewItem *last = 0;
for(int i = 0; i < count; i++)
{
- QString entry = cfg->readPathEntry(QString("Item%1").arg(i+1));
+ TQString entry = cfg->readPathEntry(TQString("Item%1").arg(i+1));
if (entry.isEmpty())
continue;
@@ -140,7 +140,7 @@ KCustomMenuEditor::load(KConfigBase *cfg)
if (!menuItem->isValid())
continue;
- QListViewItem *item = new Item(m_listView, menuItem);
+ TQListViewItem *item = new Item(m_listView, menuItem);
item->moveItem(last);
last = item;
}
@@ -150,23 +150,23 @@ void
KCustomMenuEditor::save(KConfigBase *cfg)
{
// First clear the whole config file.
- QStringList groups = cfg->groupList();
- for(QStringList::ConstIterator it = groups.begin();
+ TQStringList groups = cfg->groupList();
+ for(TQStringList::ConstIterator it = groups.begin();
it != groups.end(); ++it)
{
cfg->deleteGroup(*it);
}
- cfg->setGroup(QString::null);
+ cfg->setGroup(TQString::null);
Item * item = (Item *) m_listView->firstChild();
int i = 0;
while(item)
{
i++;
- QString path = item->s->desktopEntryPath();
- if (QDir::isRelativePath(path) || QDir::isRelativePath(KGlobal::dirs()->relativeLocation("xdgdata-apps", path)))
+ TQString path = item->s->desktopEntryPath();
+ if (TQDir::isRelativePath(path) || TQDir::isRelativePath(KGlobal::dirs()->relativeLocation("xdgdata-apps", path)))
path = item->s->desktopEntryName();
- cfg->writePathEntry(QString("Item%1").arg(i), path);
+ cfg->writePathEntry(TQString("Item%1").arg(i), path);
item = (Item *) item->nextSibling();
}
cfg->writeEntry("NrOfItems", i);
@@ -175,7 +175,7 @@ KCustomMenuEditor::save(KConfigBase *cfg)
void
KCustomMenuEditor::slotNewItem()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
KOpenWithDlg dlg(this);
dlg.setSaveNewApplications(true);
@@ -195,7 +195,7 @@ KCustomMenuEditor::slotNewItem()
void
KCustomMenuEditor::slotRemoveItem()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
if (!item)
return;
@@ -206,14 +206,14 @@ KCustomMenuEditor::slotRemoveItem()
void
KCustomMenuEditor::slotMoveUp()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
if (!item)
return;
- QListViewItem *searchItem = m_listView->firstChild();
+ TQListViewItem *searchItem = m_listView->firstChild();
while(searchItem)
{
- QListViewItem *next = searchItem->nextSibling();
+ TQListViewItem *next = searchItem->nextSibling();
if (next == item)
{
searchItem->moveItem(item);
@@ -227,11 +227,11 @@ KCustomMenuEditor::slotMoveUp()
void
KCustomMenuEditor::slotMoveDown()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
if (!item)
return;
- QListViewItem *after = item->nextSibling();
+ TQListViewItem *after = item->nextSibling();
if (!after)
return;
diff --git a/kio/kfile/kcustommenueditor.h b/kio/kfile/kcustommenueditor.h
index 88151f5d4..cc20c6204 100644
--- a/kio/kfile/kcustommenueditor.h
+++ b/kio/kfile/kcustommenueditor.h
@@ -37,7 +37,7 @@ public:
/**
* Create a dialog for editing a custom menu
*/
- KCustomMenuEditor(QWidget *parent);
+ KCustomMenuEditor(TQWidget *parent);
~KCustomMenuEditor();
/**
* load the custom menu
diff --git a/kio/kfile/kdiroperator.cpp b/kio/kfile/kdiroperator.cpp
index b12e45153..6013b7c57 100644
--- a/kio/kfile/kdiroperator.cpp
+++ b/kio/kfile/kdiroperator.cpp
@@ -20,16 +20,16 @@
#include <unistd.h>
-#include <qdir.h>
-#include <qapplication.h>
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqdialog.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
#include <kaction.h>
#include <kapplication.h>
@@ -64,8 +64,8 @@
#include "kfilemetapreview.h"
-template class QPtrStack<KURL>;
-template class QDict<KFileItem>;
+template class TQPtrStack<KURL>;
+template class TQDict<KFileItem>;
class KDirOperator::KDirOperatorPrivate
@@ -84,19 +84,19 @@ public:
}
bool dirHighlighting;
- QString lastURL; // used for highlighting a directory on cdUp
+ TQString lastURL; // used for highlighting a directory on cdUp
bool onlyDoubleClickSelectsFiles;
- QTimer *progressDelayTimer;
+ TQTimer *progressDelayTimer;
KActionSeparator *viewActionSeparator;
int dropOptions;
KConfig *config;
- QString configGroup;
+ TQString configGroup;
};
KDirOperator::KDirOperator(const KURL& _url,
- QWidget *parent, const char* _name)
- : QWidget(parent, _name),
+ TQWidget *parent, const char* _name)
+ : TQWidget(parent, _name),
dir(0),
m_fileView(0),
progress(0)
@@ -104,36 +104,36 @@ KDirOperator::KDirOperator(const KURL& _url,
myPreview = 0L;
myMode = KFile::File;
m_viewKind = KFile::Simple;
- mySorting = static_cast<QDir::SortSpec>(QDir::Name | QDir::DirsFirst);
+ mySorting = static_cast<TQDir::SortSpec>(TQDir::Name | TQDir::DirsFirst);
d = new KDirOperatorPrivate;
if (_url.isEmpty()) { // no dir specified -> current dir
- QString strPath = QDir::currentDirPath();
+ TQString strPath = TQDir::currentDirPath();
strPath.append('/');
currUrl = KURL();
- currUrl.setProtocol(QString::fromLatin1("file"));
+ currUrl.setProtocol(TQString::fromLatin1("file"));
currUrl.setPath(strPath);
}
else {
currUrl = _url;
if ( currUrl.protocol().isEmpty() )
- currUrl.setProtocol(QString::fromLatin1("file"));
+ currUrl.setProtocol(TQString::fromLatin1("file"));
currUrl.addPath("/"); // make sure we have a trailing slash!
}
setDirLister( new KDirLister( true ) );
- connect(&myCompletion, SIGNAL(match(const QString&)),
- SLOT(slotCompletionMatch(const QString&)));
+ connect(&myCompletion, TQT_SIGNAL(match(const TQString&)),
+ TQT_SLOT(slotCompletionMatch(const TQString&)));
progress = new KProgress(this, "progress");
progress->adjustSize();
progress->move(2, height() - progress->height() -2);
- d->progressDelayTimer = new QTimer( this, "progress delay timer" );
- connect( d->progressDelayTimer, SIGNAL( timeout() ),
- SLOT( slotShowProgress() ));
+ d->progressDelayTimer = new TQTimer( this, "progress delay timer" );
+ connect( d->progressDelayTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotShowProgress() ));
myCompleteListDirty = false;
@@ -144,7 +144,7 @@ KDirOperator::KDirOperator(const KURL& _url,
setupActions();
setupMenu();
- setFocusPolicy(QWidget::WheelFocus);
+ setFocusPolicy(TQWidget::WheelFocus);
}
KDirOperator::~KDirOperator()
@@ -165,7 +165,7 @@ KDirOperator::~KDirOperator()
}
-void KDirOperator::setSorting( QDir::SortSpec spec )
+void KDirOperator::setSorting( TQDir::SortSpec spec )
{
if ( m_fileView )
m_fileView->setSorting( spec );
@@ -175,7 +175,7 @@ void KDirOperator::setSorting( QDir::SortSpec spec )
void KDirOperator::resetCursor()
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
progress->hide();
}
@@ -192,10 +192,10 @@ void KDirOperator::insertViewDependentActions()
{
if (viewActionCollection)
{
- disconnect( viewActionCollection, SIGNAL( inserted( KAction * )),
- this, SLOT( slotViewActionAdded( KAction * )));
- disconnect( viewActionCollection, SIGNAL( removed( KAction * )),
- this, SLOT( slotViewActionRemoved( KAction * )));
+ disconnect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )),
+ this, TQT_SLOT( slotViewActionAdded( KAction * )));
+ disconnect( viewActionCollection, TQT_SIGNAL( removed( KAction * )),
+ this, TQT_SLOT( slotViewActionRemoved( KAction * )));
}
viewActionMenu->popupMenu()->clear();
@@ -220,9 +220,9 @@ void KDirOperator::insertViewDependentActions()
viewActionMenu->insert( d->viewActionSeparator );
// first insert the normal actions, then the grouped ones
- QStringList groups = viewActionCollection->groups();
- groups.prepend( QString::null ); // actions without group
- QStringList::ConstIterator git = groups.begin();
+ TQStringList groups = viewActionCollection->groups();
+ groups.prepend( TQString::null ); // actions without group
+ TQStringList::ConstIterator git = groups.begin();
KActionPtrList list;
KAction *sep = actionCollection()->action("separator");
for ( ; git != groups.end(); ++git )
@@ -237,14 +237,14 @@ void KDirOperator::insertViewDependentActions()
}
}
- connect( viewActionCollection, SIGNAL( inserted( KAction * )),
- SLOT( slotViewActionAdded( KAction * )));
- connect( viewActionCollection, SIGNAL( removed( KAction * )),
- SLOT( slotViewActionRemoved( KAction * )));
+ connect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )),
+ TQT_SLOT( slotViewActionAdded( KAction * )));
+ connect( viewActionCollection, TQT_SIGNAL( removed( KAction * )),
+ TQT_SLOT( slotViewActionRemoved( KAction * )));
}
}
-void KDirOperator::activatedMenu( const KFileItem *, const QPoint& pos )
+void KDirOperator::activatedMenu( const KFileItem *, const TQPoint& pos )
{
setupMenu();
updateSelectionDependentActions();
@@ -261,7 +261,7 @@ void KDirOperator::updateSelectionDependentActions()
myActionCollection->action( "properties" )->setEnabled( hasSelection );
}
-void KDirOperator::setPreviewWidget(const QWidget *w)
+void KDirOperator::setPreviewWidget(const TQWidget *w)
{
if(w != 0L)
m_viewKind = (m_viewKind | KFile::PreviewContents);
@@ -334,24 +334,24 @@ void KDirOperator::slotDefaultPreview()
void KDirOperator::slotSortByName()
{
- int sorting = (m_fileView->sorting()) & ~QDir::SortByMask;
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::Name ));
+ int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask;
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::Name ));
mySorting = m_fileView->sorting();
caseInsensitiveAction->setEnabled( true );
}
void KDirOperator::slotSortBySize()
{
- int sorting = (m_fileView->sorting()) & ~QDir::SortByMask;
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::Size ));
+ int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask;
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::Size ));
mySorting = m_fileView->sorting();
caseInsensitiveAction->setEnabled( false );
}
void KDirOperator::slotSortByDate()
{
- int sorting = (m_fileView->sorting()) & ~QDir::SortByMask;
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::Time ));
+ int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask;
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::Time ));
mySorting = m_fileView->sorting();
caseInsensitiveAction->setEnabled( false );
}
@@ -364,40 +364,40 @@ void KDirOperator::slotSortReversed()
void KDirOperator::slotToggleDirsFirst()
{
- QDir::SortSpec sorting = m_fileView->sorting();
+ TQDir::SortSpec sorting = m_fileView->sorting();
if ( !KFile::isSortDirsFirst( sorting ) )
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::DirsFirst ));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::DirsFirst ));
else
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting & ~QDir::DirsFirst));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting & ~TQDir::DirsFirst));
mySorting = m_fileView->sorting();
}
void KDirOperator::slotToggleIgnoreCase()
{
- QDir::SortSpec sorting = m_fileView->sorting();
+ TQDir::SortSpec sorting = m_fileView->sorting();
if ( !KFile::isSortCaseInsensitive( sorting ) )
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::IgnoreCase ));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::IgnoreCase ));
else
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting & ~QDir::IgnoreCase));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting & ~TQDir::IgnoreCase));
mySorting = m_fileView->sorting();
}
void KDirOperator::mkdir()
{
bool ok;
- QString where = url().pathOrURL();
- QString name = i18n( "New Folder" );
- if ( url().isLocalFile() && QFileInfo( url().path(+1) + name ).exists() )
+ TQString where = url().pathOrURL();
+ TQString name = i18n( "New Folder" );
+ if ( url().isLocalFile() && TQFileInfo( url().path(+1) + name ).exists() )
name = KIO::RenameDlg::suggestName( url(), name );
- QString dir = KInputDialog::getText( i18n( "New Folder" ),
+ TQString dir = KInputDialog::getText( i18n( "New Folder" ),
i18n( "Create new folder in:\n%1" ).arg( where ),
name, &ok, this);
if (ok)
mkdir( KIO::encodeFileName( dir ), true );
}
-bool KDirOperator::mkdir( const QString& directory, bool enterDirectory )
+bool KDirOperator::mkdir( const TQString& directory, bool enterDirectory )
{
// Creates "directory", relative to the current directory (currUrl).
// The given path may contain any number directories, existant or not.
@@ -407,8 +407,8 @@ bool KDirOperator::mkdir( const QString& directory, bool enterDirectory )
bool exists = false;
KURL url( currUrl );
- QStringList dirs = QStringList::split( QDir::separator(), directory );
- QStringList::ConstIterator it = dirs.begin();
+ TQStringList dirs = TQStringList::split( TQDir::separator(), directory );
+ TQStringList::ConstIterator it = dirs.begin();
for ( ; it != dirs.end(); ++it )
{
@@ -440,7 +440,7 @@ KIO::DeleteJob * KDirOperator::del( const KFileItemList& items,
}
KIO::DeleteJob * KDirOperator::del( const KFileItemList& items,
- QWidget *parent,
+ TQWidget *parent,
bool ask, bool showProgress )
{
if ( items.isEmpty() ) {
@@ -451,7 +451,7 @@ KIO::DeleteJob * KDirOperator::del( const KFileItemList& items,
}
KURL::List urls;
- QStringList files;
+ TQStringList files;
KFileItemListIterator it( items );
for ( ; it.current(); ++it ) {
@@ -503,7 +503,7 @@ void KDirOperator::deleteSelected()
}
KIO::CopyJob * KDirOperator::trash( const KFileItemList& items,
- QWidget *parent,
+ TQWidget *parent,
bool ask, bool showProgress )
{
if ( items.isEmpty() ) {
@@ -514,7 +514,7 @@ KIO::CopyJob * KDirOperator::trash( const KFileItemList& items,
}
KURL::List urls;
- QStringList files;
+ TQStringList files;
KFileItemListIterator it( items );
for ( ; it.current(); ++it ) {
@@ -580,11 +580,11 @@ void KDirOperator::close()
dir->stop();
}
-void KDirOperator::checkPath(const QString &, bool /*takeFiles*/) // SLOT
+void KDirOperator::checkPath(const TQString &, bool /*takeFiles*/) // SLOT
{
#if 0
// copy the argument in a temporary string
- QString text = _txt;
+ TQString text = _txt;
// it's unlikely to happen, that at the beginning are spaces, but
// for the end, it happens quite often, I guess.
text = text.stripWhiteSpace();
@@ -598,9 +598,9 @@ void KDirOperator::checkPath(const QString &, bool /*takeFiles*/) // SLOT
if (!selection.isNull()) {
int position = text.findRev('/');
ASSERT(position >= 0); // we already inserted the current dir in case
- QString filename = text.mid(position + 1, text.length());
+ TQString filename = text.mid(position + 1, text.length());
if (filename != selection)
- selection = QString::null;
+ selection = TQString::null;
}
KURL u(text); // I have to take care of entered URLs
@@ -625,7 +625,7 @@ void KDirOperator::checkPath(const QString &, bool /*takeFiles*/) // SLOT
filename_ = u.url();
emit fileSelected(filename_);
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
accept();
}
@@ -638,11 +638,11 @@ void KDirOperator::setURL(const KURL& _newurl, bool clearforward)
KURL newurl;
if ( !_newurl.isValid() )
- newurl.setPath( QDir::homeDirPath() );
+ newurl.setPath( TQDir::homeDirPath() );
else
newurl = _newurl;
- QString pathstr = newurl.path(+1);
+ TQString pathstr = newurl.path(+1);
newurl.setPath(pathstr);
// already set
@@ -651,7 +651,7 @@ void KDirOperator::setURL(const KURL& _newurl, bool clearforward)
if ( !isReadable( newurl ) ) {
// maybe newurl is a file? check its parent directory
- newurl.cd(QString::fromLatin1(".."));
+ newurl.cd(TQString::fromLatin1(".."));
if ( !isReadable( newurl ) ) {
resetCursor();
KMessageBox::error(viewWidget(),
@@ -716,10 +716,10 @@ void KDirOperator::pathChanged()
myDirCompletion.clear();
// it may be, that we weren't ready at this time
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// when KIO::Job emits finished, the slot will restore the cursor
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
if ( !isReadable( currUrl )) {
KMessageBox::error(viewWidget(),
@@ -777,31 +777,31 @@ KURL KDirOperator::url() const
void KDirOperator::cdUp()
{
KURL tmp(currUrl);
- tmp.cd(QString::fromLatin1(".."));
+ tmp.cd(TQString::fromLatin1(".."));
setURL(tmp, true);
}
void KDirOperator::home()
{
KURL u;
- u.setPath( QDir::homeDirPath() );
+ u.setPath( TQDir::homeDirPath() );
setURL(u, true);
}
void KDirOperator::clearFilter()
{
- dir->setNameFilter( QString::null );
+ dir->setNameFilter( TQString::null );
dir->clearMimeFilter();
checkPreviewSupport();
}
-void KDirOperator::setNameFilter(const QString& filter)
+void KDirOperator::setNameFilter(const TQString& filter)
{
dir->setNameFilter(filter);
checkPreviewSupport();
}
-void KDirOperator::setMimeFilter( const QStringList& mimetypes )
+void KDirOperator::setMimeFilter( const TQStringList& mimetypes )
{
dir->setMimeFilter( mimetypes );
checkPreviewSupport();
@@ -823,27 +823,27 @@ bool KDirOperator::checkPreviewSupport()
bool KDirOperator::checkPreviewInternal() const
{
- QStringList supported = KIO::PreviewJob::supportedMimeTypes();
+ TQStringList supported = KIO::PreviewJob::supportedMimeTypes();
// no preview support for directories?
if ( dirOnlyMode() && supported.findIndex( "inode/directory" ) == -1 )
return false;
- QStringList mimeTypes = dir->mimeFilters();
- QStringList nameFilter = QStringList::split( " ", dir->nameFilter() );
+ TQStringList mimeTypes = dir->mimeFilters();
+ TQStringList nameFilter = TQStringList::split( " ", dir->nameFilter() );
if ( mimeTypes.isEmpty() && nameFilter.isEmpty() && !supported.isEmpty() )
return true;
else {
- QRegExp r;
+ TQRegExp r;
r.setWildcard( true ); // the "mimetype" can be "image/*"
if ( !mimeTypes.isEmpty() ) {
- QStringList::Iterator it = supported.begin();
+ TQStringList::Iterator it = supported.begin();
for ( ; it != supported.end(); ++it ) {
r.setPattern( *it );
- QStringList result = mimeTypes.grep( r );
+ TQStringList result = mimeTypes.grep( r );
if ( !result.isEmpty() ) { // matches! -> we want previews
return true;
}
@@ -853,7 +853,7 @@ bool KDirOperator::checkPreviewInternal() const
if ( !nameFilter.isEmpty() ) {
// find the mimetypes of all the filter-patterns and
KServiceTypeFactory *fac = KServiceTypeFactory::self();
- QStringList::Iterator it1 = nameFilter.begin();
+ TQStringList::Iterator it1 = nameFilter.begin();
for ( ; it1 != nameFilter.end(); ++it1 ) {
if ( (*it1) == "*" ) {
return true;
@@ -862,12 +862,12 @@ bool KDirOperator::checkPreviewInternal() const
KMimeType *mt = fac->findFromPattern( *it1 );
if ( !mt )
continue;
- QString mime = mt->name();
+ TQString mime = mt->name();
delete mt;
// the "mimetypes" we get from the PreviewJob can be "image/*"
// so we need to check in wildcard mode
- QStringList::Iterator it2 = supported.begin();
+ TQStringList::Iterator it2 = supported.begin();
for ( ; it2 != supported.end(); ++it2 ) {
r.setPattern( *it2 );
if ( r.search( mime ) != -1 ) {
@@ -881,7 +881,7 @@ bool KDirOperator::checkPreviewInternal() const
return false;
}
-KFileView* KDirOperator::createView( QWidget* parent, KFile::FileView view )
+KFileView* KDirOperator::createView( TQWidget* parent, KFile::FileView view )
{
KFileView* new_view = 0L;
bool separateDirs = KFile::isSeparateDirs( view );
@@ -933,7 +933,7 @@ void KDirOperator::setAcceptDrops(bool b)
{
if (m_fileView)
m_fileView->widget()->setAcceptDrops(b);
- QWidget::setAcceptDrops(b);
+ TQWidget::setAcceptDrops(b);
}
void KDirOperator::setDropOptions(int options)
@@ -1050,18 +1050,18 @@ void KDirOperator::connectView(KFileView *view)
viewActionCollection = 0L;
KFileViewSignaler *sig = view->signaler();
- connect(sig, SIGNAL( activatedMenu(const KFileItem *, const QPoint& ) ),
- this, SLOT( activatedMenu(const KFileItem *, const QPoint& )));
- connect(sig, SIGNAL( dirActivated(const KFileItem *) ),
- this, SLOT( selectDir(const KFileItem*) ) );
- connect(sig, SIGNAL( fileSelected(const KFileItem *) ),
- this, SLOT( selectFile(const KFileItem*) ) );
- connect(sig, SIGNAL( fileHighlighted(const KFileItem *) ),
- this, SLOT( highlightFile(const KFileItem*) ));
- connect(sig, SIGNAL( sortingChanged( QDir::SortSpec ) ),
- this, SLOT( slotViewSortingChanged( QDir::SortSpec )));
- connect(sig, SIGNAL( dropped(const KFileItem *, QDropEvent*, const KURL::List&) ),
- this, SIGNAL( dropped(const KFileItem *, QDropEvent*, const KURL::List&)) );
+ connect(sig, TQT_SIGNAL( activatedMenu(const KFileItem *, const TQPoint& ) ),
+ this, TQT_SLOT( activatedMenu(const KFileItem *, const TQPoint& )));
+ connect(sig, TQT_SIGNAL( dirActivated(const KFileItem *) ),
+ this, TQT_SLOT( selectDir(const KFileItem*) ) );
+ connect(sig, TQT_SIGNAL( fileSelected(const KFileItem *) ),
+ this, TQT_SLOT( selectFile(const KFileItem*) ) );
+ connect(sig, TQT_SIGNAL( fileHighlighted(const KFileItem *) ),
+ this, TQT_SLOT( highlightFile(const KFileItem*) ));
+ connect(sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ),
+ this, TQT_SLOT( slotViewSortingChanged( TQDir::SortSpec )));
+ connect(sig, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&) ),
+ this, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&)) );
if ( reverseAction->isChecked() != m_fileView->isReversed() )
slotSortReversed();
@@ -1071,7 +1071,7 @@ void KDirOperator::connectView(KFileView *view)
m_fileView->widget()->show();
if ( listDir ) {
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
openURL( currUrl );
}
else
@@ -1120,24 +1120,24 @@ void KDirOperator::setDirLister( KDirLister *lister )
dir->setAutoUpdate( true );
- QWidget* mainWidget = topLevelWidget();
+ TQWidget* mainWidget = topLevelWidget();
dir->setMainWindow (mainWidget);
kdDebug (kfile_area) << "mainWidget=" << mainWidget << endl;
- connect( dir, SIGNAL( percent( int )),
- SLOT( slotProgress( int ) ));
- connect( dir, SIGNAL(started( const KURL& )), SLOT(slotStarted()));
- connect( dir, SIGNAL(newItems(const KFileItemList &)),
- SLOT(insertNewFiles(const KFileItemList &)));
- connect( dir, SIGNAL(completed()), SLOT(slotIOFinished()));
- connect( dir, SIGNAL(canceled()), SLOT(slotCanceled()));
- connect( dir, SIGNAL(deleteItem(KFileItem *)),
- SLOT(itemDeleted(KFileItem *)));
- connect( dir, SIGNAL(redirection( const KURL& )),
- SLOT( slotRedirected( const KURL& )));
- connect( dir, SIGNAL( clear() ), SLOT( slotClearView() ));
- connect( dir, SIGNAL( refreshItems( const KFileItemList& ) ),
- SLOT( slotRefreshItems( const KFileItemList& ) ) );
+ connect( dir, TQT_SIGNAL( percent( int )),
+ TQT_SLOT( slotProgress( int ) ));
+ connect( dir, TQT_SIGNAL(started( const KURL& )), TQT_SLOT(slotStarted()));
+ connect( dir, TQT_SIGNAL(newItems(const KFileItemList &)),
+ TQT_SLOT(insertNewFiles(const KFileItemList &)));
+ connect( dir, TQT_SIGNAL(completed()), TQT_SLOT(slotIOFinished()));
+ connect( dir, TQT_SIGNAL(canceled()), TQT_SLOT(slotCanceled()));
+ connect( dir, TQT_SIGNAL(deleteItem(KFileItem *)),
+ TQT_SLOT(itemDeleted(KFileItem *)));
+ connect( dir, TQT_SIGNAL(redirection( const KURL& )),
+ TQT_SLOT( slotRedirected( const KURL& )));
+ connect( dir, TQT_SIGNAL( clear() ), TQT_SLOT( slotClearView() ));
+ connect( dir, TQT_SIGNAL( refreshItems( const KFileItemList& ) ),
+ TQT_SLOT( slotRefreshItems( const KFileItemList& ) ) );
}
void KDirOperator::insertNewFiles(const KFileItemList &newone)
@@ -1163,7 +1163,7 @@ void KDirOperator::insertNewFiles(const KFileItemList &newone)
++it;
}
- QTimer::singleShot(200, this, SLOT(resetCursor()));
+ TQTimer::singleShot(200, this, TQT_SLOT(resetCursor()));
}
void KDirOperator::selectDir(const KFileItem *item)
@@ -1183,12 +1183,12 @@ void KDirOperator::itemDeleted(KFileItem *item)
void KDirOperator::selectFile(const KFileItem *item)
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit fileSelected( item );
}
-void KDirOperator::setCurrentItem( const QString& filename )
+void KDirOperator::setCurrentItem( const TQString& filename )
{
if ( m_fileView ) {
const KFileItem *item = 0L;
@@ -1205,22 +1205,22 @@ void KDirOperator::setCurrentItem( const QString& filename )
}
}
-QString KDirOperator::makeCompletion(const QString& string)
+TQString KDirOperator::makeCompletion(const TQString& string)
{
if ( string.isEmpty() ) {
m_fileView->clearSelection();
- return QString::null;
+ return TQString::null;
}
prepareCompletionObjects();
return myCompletion.makeCompletion( string );
}
-QString KDirOperator::makeDirCompletion(const QString& string)
+TQString KDirOperator::makeDirCompletion(const TQString& string)
{
if ( string.isEmpty() ) {
m_fileView->clearSelection();
- return QString::null;
+ return TQString::null;
}
prepareCompletionObjects();
@@ -1245,7 +1245,7 @@ void KDirOperator::prepareCompletionObjects()
}
}
-void KDirOperator::slotCompletionMatch(const QString& match)
+void KDirOperator::slotCompletionMatch(const TQString& match)
{
setCurrentItem( match );
emit completion( match );
@@ -1256,24 +1256,24 @@ void KDirOperator::setupActions()
myActionCollection = new KActionCollection( topLevelWidget(), this, "KDirOperator::myActionCollection" );
actionMenu = new KActionMenu( i18n("Menu"), myActionCollection, "popupMenu" );
- upAction = KStdAction::up( this, SLOT( cdUp() ), myActionCollection, "up" );
+ upAction = KStdAction::up( this, TQT_SLOT( cdUp() ), myActionCollection, "up" );
upAction->setText( i18n("Parent Folder") );
- backAction = KStdAction::back( this, SLOT( back() ), myActionCollection, "back" );
- forwardAction = KStdAction::forward( this, SLOT(forward()), myActionCollection, "forward" );
- homeAction = KStdAction::home( this, SLOT( home() ), myActionCollection, "home" );
+ backAction = KStdAction::back( this, TQT_SLOT( back() ), myActionCollection, "back" );
+ forwardAction = KStdAction::forward( this, TQT_SLOT(forward()), myActionCollection, "forward" );
+ homeAction = KStdAction::home( this, TQT_SLOT( home() ), myActionCollection, "home" );
homeAction->setText(i18n("Home Folder"));
- reloadAction = KStdAction::redisplay( this, SLOT(rereadDir()), myActionCollection, "reload" );
+ reloadAction = KStdAction::redisplay( this, TQT_SLOT(rereadDir()), myActionCollection, "reload" );
actionSeparator = new KActionSeparator( myActionCollection, "separator" );
d->viewActionSeparator = new KActionSeparator( myActionCollection,
"viewActionSeparator" );
mkdirAction = new KAction( i18n("New Folder..."), 0,
- this, SLOT( mkdir() ), myActionCollection, "mkdir" );
+ this, TQT_SLOT( mkdir() ), myActionCollection, "mkdir" );
KAction* trash = new KAction( i18n( "Move to Trash" ), "edittrash", Key_Delete, myActionCollection, "trash" );
- connect( trash, SIGNAL( activated( KAction::ActivationReason, Qt::ButtonState ) ),
- this, SLOT( trashSelected( KAction::ActivationReason, Qt::ButtonState ) ) );
+ connect( trash, TQT_SIGNAL( activated( KAction::ActivationReason, Qt::ButtonState ) ),
+ this, TQT_SLOT( trashSelected( KAction::ActivationReason, Qt::ButtonState ) ) );
new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, this,
- SLOT( deleteSelected() ), myActionCollection, "delete" );
- mkdirAction->setIcon( QString::fromLatin1("folder_new") );
+ TQT_SLOT( deleteSelected() ), myActionCollection, "delete" );
+ mkdirAction->setIcon( TQString::fromLatin1("folder_new") );
reloadAction->setText( i18n("Reload") );
reloadAction->setShortcut( KStdAccel::shortcut( KStdAccel::Reload ));
@@ -1281,19 +1281,19 @@ void KDirOperator::setupActions()
// the sort menu actions
sortActionMenu = new KActionMenu( i18n("Sorting"), myActionCollection, "sorting menu");
byNameAction = new KRadioAction( i18n("By Name"), 0,
- this, SLOT( slotSortByName() ),
+ this, TQT_SLOT( slotSortByName() ),
myActionCollection, "by name" );
byDateAction = new KRadioAction( i18n("By Date"), 0,
- this, SLOT( slotSortByDate() ),
+ this, TQT_SLOT( slotSortByDate() ),
myActionCollection, "by date" );
bySizeAction = new KRadioAction( i18n("By Size"), 0,
- this, SLOT( slotSortBySize() ),
+ this, TQT_SLOT( slotSortBySize() ),
myActionCollection, "by size" );
reverseAction = new KToggleAction( i18n("Reverse"), 0,
- this, SLOT( slotSortReversed() ),
+ this, TQT_SLOT( slotSortReversed() ),
myActionCollection, "reversed" );
- QString sortGroup = QString::fromLatin1("sort");
+ TQString sortGroup = TQString::fromLatin1("sort");
byNameAction->setExclusiveGroup( sortGroup );
byDateAction->setExclusiveGroup( sortGroup );
bySizeAction->setExclusiveGroup( sortGroup );
@@ -1304,17 +1304,17 @@ void KDirOperator::setupActions()
caseInsensitiveAction = new KToggleAction(i18n("Case Insensitive"), 0,
myActionCollection, "case insensitive" );
- connect( dirsFirstAction, SIGNAL( toggled( bool ) ),
- SLOT( slotToggleDirsFirst() ));
- connect( caseInsensitiveAction, SIGNAL( toggled( bool ) ),
- SLOT( slotToggleIgnoreCase() ));
+ connect( dirsFirstAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotToggleDirsFirst() ));
+ connect( caseInsensitiveAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotToggleIgnoreCase() ));
// the view menu actions
viewActionMenu = new KActionMenu( i18n("&View"), myActionCollection, "view menu" );
- connect( viewActionMenu->popupMenu(), SIGNAL( aboutToShow() ),
- SLOT( insertViewDependentActions() ));
+ connect( viewActionMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ TQT_SLOT( insertViewDependentActions() ));
shortAction = new KRadioAction( i18n("Short View"), "view_multicolumn",
KShortcut(), myActionCollection, "short view" );
@@ -1326,30 +1326,30 @@ void KDirOperator::setupActions()
// showHiddenAction->setCheckedState( i18n("Hide Hidden Files") );
separateDirsAction = new KToggleAction( i18n("Separate Folders"), KShortcut(),
this,
- SLOT(slotSeparateDirs()),
+ TQT_SLOT(slotSeparateDirs()),
myActionCollection, "separate dirs" );
KToggleAction *previewAction = new KToggleAction(i18n("Show Preview"),
"thumbnail", KShortcut(),
myActionCollection,
"preview" );
previewAction->setCheckedState(i18n("Hide Preview"));
- connect( previewAction, SIGNAL( toggled( bool )),
- SLOT( togglePreview( bool )));
+ connect( previewAction, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( togglePreview( bool )));
- QString viewGroup = QString::fromLatin1("view");
+ TQString viewGroup = TQString::fromLatin1("view");
shortAction->setExclusiveGroup( viewGroup );
detailedAction->setExclusiveGroup( viewGroup );
- connect( shortAction, SIGNAL( activated() ),
- SLOT( slotSimpleView() ));
- connect( detailedAction, SIGNAL( activated() ),
- SLOT( slotDetailedView() ));
- connect( showHiddenAction, SIGNAL( toggled( bool ) ),
- SLOT( slotToggleHidden( bool ) ));
+ connect( shortAction, TQT_SIGNAL( activated() ),
+ TQT_SLOT( slotSimpleView() ));
+ connect( detailedAction, TQT_SIGNAL( activated() ),
+ TQT_SLOT( slotDetailedView() ));
+ connect( showHiddenAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotToggleHidden( bool ) ));
new KAction( i18n("Properties"), KShortcut(ALT+Key_Return), this,
- SLOT(slotProperties()), myActionCollection, "properties" );
+ TQT_SLOT(slotProperties()), myActionCollection, "properties" );
}
void KDirOperator::setupMenu()
@@ -1386,7 +1386,7 @@ void KDirOperator::setupMenu(int whichActions)
if (currUrl.isLocalFile() && !(KApplication::keyboardMouseState() & Qt::ShiftButton))
actionMenu->insert( myActionCollection->action( "trash" ) );
KConfig *globalconfig = KGlobal::config();
- KConfigGroupSaver cs( globalconfig, QString::fromLatin1("KDE") );
+ KConfigGroupSaver cs( globalconfig, TQString::fromLatin1("KDE") );
if (!currUrl.isLocalFile() || (KApplication::keyboardMouseState() & Qt::ShiftButton) ||
globalconfig->readBoolEntry("ShowDeleteCommand", false))
actionMenu->insert( myActionCollection->action( "delete" ) );
@@ -1439,123 +1439,123 @@ void KDirOperator::updateViewActions()
detailedAction->setChecked( KFile::isDetailView( fv ));
}
-void KDirOperator::readConfig( KConfig *kc, const QString& group )
+void KDirOperator::readConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
defaultView = 0;
int sorting = 0;
- QString viewStyle = kc->readEntry( QString::fromLatin1("View Style"),
- QString::fromLatin1("Simple") );
- if ( viewStyle == QString::fromLatin1("Detail") )
+ TQString viewStyle = kc->readEntry( TQString::fromLatin1("View Style"),
+ TQString::fromLatin1("Simple") );
+ if ( viewStyle == TQString::fromLatin1("Detail") )
defaultView |= KFile::Detail;
else
defaultView |= KFile::Simple;
- if ( kc->readBoolEntry( QString::fromLatin1("Separate Directories"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Separate Directories"),
DefaultMixDirsAndFiles ) )
defaultView |= KFile::SeparateDirs;
- if ( kc->readBoolEntry(QString::fromLatin1("Show Preview"), false))
+ if ( kc->readBoolEntry(TQString::fromLatin1("Show Preview"), false))
defaultView |= KFile::PreviewContents;
- if ( kc->readBoolEntry( QString::fromLatin1("Sort case insensitively"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Sort case insensitively"),
DefaultCaseInsensitive ) )
- sorting |= QDir::IgnoreCase;
- if ( kc->readBoolEntry( QString::fromLatin1("Sort directories first"),
+ sorting |= TQDir::IgnoreCase;
+ if ( kc->readBoolEntry( TQString::fromLatin1("Sort directories first"),
DefaultDirsFirst ) )
- sorting |= QDir::DirsFirst;
+ sorting |= TQDir::DirsFirst;
- QString name = QString::fromLatin1("Name");
- QString sortBy = kc->readEntry( QString::fromLatin1("Sort by"), name );
+ TQString name = TQString::fromLatin1("Name");
+ TQString sortBy = kc->readEntry( TQString::fromLatin1("Sort by"), name );
if ( sortBy == name )
- sorting |= QDir::Name;
- else if ( sortBy == QString::fromLatin1("Size") )
- sorting |= QDir::Size;
- else if ( sortBy == QString::fromLatin1("Date") )
- sorting |= QDir::Time;
+ sorting |= TQDir::Name;
+ else if ( sortBy == TQString::fromLatin1("Size") )
+ sorting |= TQDir::Size;
+ else if ( sortBy == TQString::fromLatin1("Date") )
+ sorting |= TQDir::Time;
- mySorting = static_cast<QDir::SortSpec>( sorting );
+ mySorting = static_cast<TQDir::SortSpec>( sorting );
setSorting( mySorting );
- if ( kc->readBoolEntry( QString::fromLatin1("Show hidden files"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Show hidden files"),
DefaultShowHidden ) ) {
showHiddenAction->setChecked( true );
dir->setShowingDotFiles( true );
}
- if ( kc->readBoolEntry( QString::fromLatin1("Sort reversed"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Sort reversed"),
DefaultSortReversed ) )
reverseAction->setChecked( true );
kc->setGroup( oldGroup );
}
-void KDirOperator::writeConfig( KConfig *kc, const QString& group )
+void KDirOperator::writeConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- const QString oldGroup = kc->group();
+ const TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
- QString sortBy = QString::fromLatin1("Name");
+ TQString sortBy = TQString::fromLatin1("Name");
if ( KFile::isSortBySize( mySorting ) )
- sortBy = QString::fromLatin1("Size");
+ sortBy = TQString::fromLatin1("Size");
else if ( KFile::isSortByDate( mySorting ) )
- sortBy = QString::fromLatin1("Date");
- kc->writeEntry( QString::fromLatin1("Sort by"), sortBy );
+ sortBy = TQString::fromLatin1("Date");
+ kc->writeEntry( TQString::fromLatin1("Sort by"), sortBy );
- kc->writeEntry( QString::fromLatin1("Sort reversed"),
+ kc->writeEntry( TQString::fromLatin1("Sort reversed"),
reverseAction->isChecked() );
- kc->writeEntry( QString::fromLatin1("Sort case insensitively"),
+ kc->writeEntry( TQString::fromLatin1("Sort case insensitively"),
caseInsensitiveAction->isChecked() );
- kc->writeEntry( QString::fromLatin1("Sort directories first"),
+ kc->writeEntry( TQString::fromLatin1("Sort directories first"),
dirsFirstAction->isChecked() );
// don't save the separate dirs or preview when an application specific
// preview is in use.
bool appSpecificPreview = false;
if ( myPreview ) {
- QWidget *preview = const_cast<QWidget*>( myPreview ); // grmbl
+ TQWidget *preview = const_cast<TQWidget*>( myPreview ); // grmbl
KFileMetaPreview *tmp = dynamic_cast<KFileMetaPreview*>( preview );
appSpecificPreview = (tmp == 0L);
}
if ( !appSpecificPreview ) {
if ( separateDirsAction->isEnabled() )
- kc->writeEntry( QString::fromLatin1("Separate Directories"),
+ kc->writeEntry( TQString::fromLatin1("Separate Directories"),
separateDirsAction->isChecked() );
KToggleAction *previewAction = static_cast<KToggleAction*>(myActionCollection->action("preview"));
if ( previewAction->isEnabled() ) {
bool hasPreview = previewAction->isChecked();
- kc->writeEntry( QString::fromLatin1("Show Preview"), hasPreview );
+ kc->writeEntry( TQString::fromLatin1("Show Preview"), hasPreview );
}
}
- kc->writeEntry( QString::fromLatin1("Show hidden files"),
+ kc->writeEntry( TQString::fromLatin1("Show hidden files"),
showHiddenAction->isChecked() );
KFile::FileView fv = static_cast<KFile::FileView>( m_viewKind );
- QString style;
+ TQString style;
if ( KFile::isDetailView( fv ) )
- style = QString::fromLatin1("Detail");
+ style = TQString::fromLatin1("Detail");
else if ( KFile::isSimpleView( fv ) )
- style = QString::fromLatin1("Simple");
- kc->writeEntry( QString::fromLatin1("View Style"), style );
+ style = TQString::fromLatin1("Simple");
+ kc->writeEntry( TQString::fromLatin1("View Style"), style );
kc->setGroup( oldGroup );
}
-void KDirOperator::resizeEvent( QResizeEvent * )
+void KDirOperator::resizeEvent( TQResizeEvent * )
{
if (m_fileView)
m_fileView->widget()->resize( size() );
@@ -1587,7 +1587,7 @@ void KDirOperator::slotShowProgress()
{
progress->raise();
progress->show();
- QApplication::flushX();
+ TQApplication::flushX();
}
void KDirOperator::slotProgress( int percent )
@@ -1595,7 +1595,7 @@ void KDirOperator::slotProgress( int percent )
progress->setProgress( percent );
// we have to redraw this as fast as possible
if ( progress->isVisible() )
- QApplication::flushX();
+ TQApplication::flushX();
}
@@ -1649,7 +1649,7 @@ void KDirOperator::slotViewActionRemoved( KAction *action )
viewActionMenu->remove( d->viewActionSeparator );
}
-void KDirOperator::slotViewSortingChanged( QDir::SortSpec sort )
+void KDirOperator::slotViewSortingChanged( TQDir::SortSpec sort )
{
mySorting = sort;
updateSortActions();
@@ -1688,11 +1688,11 @@ bool KDirOperator::isReadable( const KURL& url )
return true; // what else can we say?
KDE_struct_stat buf;
- QString ts = url.path(+1);
- bool readable = ( KDE_stat( QFile::encodeName( ts ), &buf) == 0 );
+ TQString ts = url.path(+1);
+ bool readable = ( KDE_stat( TQFile::encodeName( ts ), &buf) == 0 );
if (readable) { // further checks
DIR *test;
- test = opendir( QFile::encodeName( ts )); // we do it just to test here
+ test = opendir( TQFile::encodeName( ts )); // we do it just to test here
readable = (test != 0);
if (test)
closedir(test);
@@ -1718,7 +1718,7 @@ void KDirOperator::slotRefreshItems( const KFileItemList& items )
m_fileView->updateView( it.current() );
}
-void KDirOperator::setViewConfig( KConfig *config, const QString& group )
+void KDirOperator::setViewConfig( KConfig *config, const TQString& group )
{
d->config = config;
d->configGroup = group;
@@ -1729,7 +1729,7 @@ KConfig * KDirOperator::viewConfig()
return d->config;
}
-QString KDirOperator::viewConfigGroup() const
+TQString KDirOperator::viewConfigGroup() const
{
return d->configGroup;
}
diff --git a/kio/kfile/kdiroperator.h b/kio/kfile/kdiroperator.h
index a91c7ff1a..bcce49f67 100644
--- a/kio/kfile/kdiroperator.h
+++ b/kio/kfile/kdiroperator.h
@@ -21,8 +21,8 @@
#ifndef KDIROPERATOR_H_
#define KDIROPERATOR_H_
-#include <qwidget.h>
-#include <qptrstack.h>
+#include <tqwidget.h>
+#include <tqptrstack.h>
#include <kaction.h>
#include <kcompletion.h>
@@ -73,14 +73,14 @@ namespace KIO {
* \code
* KDirOperator *op = new KDirOperator( KURL( "file:/home/gis" ), this );
* // some signals you might be interested in
- * connect(op, SIGNAL(urlEntered(const KURL&)),
- * SLOT(urlEntered(const KURL&)));
- * connect(op, SIGNAL(fileHighlighted(const KFileItem *)),
- * SLOT(fileHighlighted(const KFileItem *)));
- * connect(op, SIGNAL(fileSelected(const KFileItem *)),
- * SLOT(fileSelected(const KFileItem *)));
- * connect(op, SIGNAL(finishedLoading()),
- * SLOT(slotLoadingFinished()));
+ * connect(op, TQT_SIGNAL(urlEntered(const KURL&)),
+ * TQT_SLOT(urlEntered(const KURL&)));
+ * connect(op, TQT_SIGNAL(fileHighlighted(const KFileItem *)),
+ * TQT_SLOT(fileHighlighted(const KFileItem *)));
+ * connect(op, TQT_SIGNAL(fileSelected(const KFileItem *)),
+ * TQT_SLOT(fileSelected(const KFileItem *)));
+ * connect(op, TQT_SIGNAL(finishedLoading()),
+ * TQT_SLOT(slotLoadingFinished()));
*
* op->readConfig( KGlobal::config(), "Your KDiroperator ConfigGroup" );
* op->setView(KFile::Default);
@@ -116,7 +116,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* This constructor doesn't start loading the url, setView will do it.
*/
KDirOperator(const KURL& urlName = KURL(),
- QWidget *parent = 0, const char* name = 0);
+ TQWidget *parent = 0, const char* name = 0);
/**
* Destroys the KDirOperator.
*/
@@ -138,7 +138,7 @@ class KIO_EXPORT KDirOperator : public QWidget
*/
void close();
/// Reimplemented to avoid "hidden virtual" warnings
- virtual bool close( bool alsoDelete ) { return QWidget::close( alsoDelete ); }
+ virtual bool close( bool alsoDelete ) { return TQWidget::close( alsoDelete ); }
/**
* Sets a filter like "*.cpp *.h *.o". Only files matching that filter
@@ -147,13 +147,13 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see KDirLister::setNameFilter
* @see nameFilter
*/
- void setNameFilter(const QString& filter);
+ void setNameFilter(const TQString& filter);
/**
* @returns the current namefilter.
* @see setNameFilter
*/
- const QString& nameFilter() const { return dir->nameFilter(); }
+ const TQString& nameFilter() const { return dir->nameFilter(); }
/**
* Sets a list of mimetypes as filter. Only files of those mimetypes
@@ -161,7 +161,7 @@ class KIO_EXPORT KDirOperator : public QWidget
*
* Example:
* \code
- * QStringList filter;
+ * TQStringList filter;
* filter << "text/html" << "image/png" << "inode/directory";
* dirOperator->setMimefilter( filter );
* \endcode
@@ -172,12 +172,12 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see KDirLister::setMimeFilter
* @see mimeFilter
*/
- void setMimeFilter( const QStringList& mimetypes );
+ void setMimeFilter( const TQStringList& mimetypes );
/**
* @returns the current mime filter.
*/
- QStringList mimeFilter() const { return dir->mimeFilters(); }
+ TQStringList mimeFilter() const { return dir->mimeFilters(); }
/**
* Clears both the namefilter and mimetype filter, so that all files and
@@ -205,7 +205,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* Clears the current selection and attempts to set @p filename
* the current file. filename is just the name, no path or url.
*/
- void setCurrentItem( const QString& filename );
+ void setCurrentItem( const TQString& filename );
/**
* Sets a new KFileView to be used for showing and browsing files.
@@ -230,7 +230,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* Returns the widget of the current view. 0L if there is no view/widget.
* (KFileView itself is not a widget.)
*/
- QWidget * viewWidget() const { return m_fileView ? m_fileView->widget() : 0L; }
+ TQWidget * viewWidget() const { return m_fileView ? m_fileView->widget() : 0L; }
/**
* Sets one of the predefined fileviews
@@ -242,17 +242,17 @@ class KIO_EXPORT KDirOperator : public QWidget
/**
* Sets the way to sort files and directories.
*/
- void setSorting( QDir::SortSpec );
+ void setSorting( TQDir::SortSpec );
/**
* @returns the current way of sorting files and directories
*/
- QDir::SortSpec sorting() const { return mySorting; }
+ TQDir::SortSpec sorting() const { return mySorting; }
/**
* @returns true if we are displaying the root directory of the current url
*/
- bool isRoot() const { return url().path() == QChar('/'); }
+ bool isRoot() const { return url().path() == TQChar('/'); }
/**
* @returns the object listing the directory
@@ -289,7 +289,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* delete it yourself!
*/
// ### KDE4: make virtual
- void setPreviewWidget(const QWidget *w);
+ void setPreviewWidget(const TQWidget *w);
/**
* @returns a list of all currently selected items. If there is no view,
@@ -407,7 +407,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @since 3.1
*/
// ### KDE4: make virtual
- void setViewConfig( KConfig *config, const QString& group );
+ void setViewConfig( KConfig *config, const TQString& group );
/**
* Returns the KConfig object used for saving and restoring view's
@@ -425,7 +425,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* configuration.
* @since 3.1
*/
- QString viewConfigGroup() const;
+ TQString viewConfigGroup() const;
/**
* Reads the default settings for a view, i.e. the default KFile::FileView.
@@ -440,7 +440,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see setViewConfig
* @see writeConfig
*/
- virtual void readConfig( KConfig *, const QString& group = QString::null );
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
/**
* Saves the current settings like sorting, simple or detailed view.
@@ -448,7 +448,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see readConfig
* @see setViewConfig
*/
- virtual void writeConfig( KConfig *, const QString& group = QString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null );
/**
@@ -478,8 +478,8 @@ class KIO_EXPORT KDirOperator : public QWidget
* to the user.
* @returns true if the directory could be created.
*/
- // ### KDE4: make virtual and turn QString into KURL
- bool mkdir( const QString& directory, bool enterDirectory = true );
+ // ### KDE4: make virtual and turn TQString into KURL
+ bool mkdir( const TQString& directory, bool enterDirectory = true );
/**
* Starts and returns a KIO::DeleteJob to delete the given @p items.
@@ -502,7 +502,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @since 3.1
*/
// ### KDE4: make virtual
- KIO::DeleteJob * del( const KFileItemList& items, QWidget *parent,
+ KIO::DeleteJob * del( const KFileItemList& items, TQWidget *parent,
bool ask = true, bool showProgress = true );
/**
@@ -572,14 +572,14 @@ class KIO_EXPORT KDirOperator : public QWidget
* @since 3.4
*/
// ### KDE4: make virtual
- KIO::CopyJob * trash( const KFileItemList& items, QWidget *parent,
+ KIO::CopyJob * trash( const KFileItemList& items, TQWidget *parent,
bool ask = true, bool showProgress = true );
protected:
/**
* A view factory for creating predefined fileviews. Called internally by setView
* , but you can also call it directly. Reimplement this if you depend on self defined fileviews.
- * @param parent is the QWidget to be set as parent
+ * @param parent is the TQWidget to be set as parent
* @param view is the predefined view to be set, note: this can be several ones OR:ed together.
* @returns the created KFileView
* @see KFileView
@@ -590,14 +590,14 @@ protected:
* @see KFile::FileView
* @see setView
*/
- virtual KFileView* createView( QWidget* parent, KFile::FileView view );
+ virtual KFileView* createView( TQWidget* parent, KFile::FileView view );
/**
* Sets a custom KDirLister to list directories.
*/
// ### KDE4: make virtual
void setDirLister( KDirLister *lister );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Sets up all the actions. Called from the constructor, you usually
@@ -698,12 +698,12 @@ public slots:
/**
* Tries to complete the given string (only completes files).
*/
- QString makeCompletion(const QString&);
+ TQString makeCompletion(const TQString&);
/**
* Tries to complete the given string (only completes directores).
*/
- QString makeDirCompletion(const QString&);
+ TQString makeDirCompletion(const TQString&);
/**
* Trashes the currently selected files/directories.
@@ -756,7 +756,7 @@ protected slots:
/**
* Called upon right-click to activate the popupmenu.
*/
- virtual void activatedMenu( const KFileItem *, const QPoint& pos );
+ virtual void activatedMenu( const KFileItem *, const TQPoint& pos );
/**
* Changes sorting to sort by name
@@ -792,12 +792,12 @@ protected slots:
* Tries to make the given @p match as current item in the view and emits
* completion( match )
*/
- void slotCompletionMatch(const QString& match);
+ void slotCompletionMatch(const TQString& match);
signals:
void urlEntered(const KURL& );
void updateInformation(int files, int dirs);
- void completion(const QString&);
+ void completion(const TQString&);
void finishedLoading();
/**
@@ -823,17 +823,17 @@ signals:
* @param urls the urls that where dropped.
* @since 3.2
*/
- void dropped(const KFileItem *item, QDropEvent*event, const KURL::List&urls);
+ void dropped(const KFileItem *item, TQDropEvent*event, const KURL::List&urls);
private:
/**
* Contains all URLs you can reach with the back button.
*/
- QPtrStack<KURL> backStack;
+ TQPtrStack<KURL> backStack;
/**
* Contains all URLs you can reach with the forward button.
*/
- QPtrStack<KURL> forwardStack;
+ TQPtrStack<KURL> forwardStack;
KDirLister *dir;
KURL currUrl;
@@ -841,7 +841,7 @@ private:
KCompletion myCompletion;
KCompletion myDirCompletion;
bool myCompleteListDirty;
- QDir::SortSpec mySorting;
+ TQDir::SortSpec mySorting;
/**
* Checks whether we preview support is available for the current
@@ -853,7 +853,7 @@ private:
* takes action on the new location. If it's a directory, change
* into it, if it's a file, correct the name, etc.
*/
- void checkPath(const QString& txt, bool takeFiles = false);
+ void checkPath(const TQString& txt, bool takeFiles = false);
void connectView(KFileView *);
@@ -869,7 +869,7 @@ private:
KFile::Mode myMode;
KProgress *progress;
- const QWidget *myPreview; // temporary pointer for the preview widget
+ const TQWidget *myPreview; // temporary pointer for the preview widget
// actions for the popupmenus
// ### clean up all those -- we have them all in the actionMenu!
@@ -928,7 +928,7 @@ private slots:
void slotViewActionAdded( KAction * );
void slotViewActionRemoved( KAction * );
- void slotViewSortingChanged( QDir::SortSpec );
+ void slotViewSortingChanged( TQDir::SortSpec );
void slotClearView();
void slotRefreshItems( const KFileItemList& items );
diff --git a/kio/kfile/kdirselectdialog.cpp b/kio/kfile/kdirselectdialog.cpp
index b8ea409e9..a361a8bde 100644
--- a/kio/kfile/kdirselectdialog.cpp
+++ b/kio/kfile/kdirselectdialog.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qstringlist.h>
-#include <qvaluestack.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqstringlist.h>
+#include <tqvaluestack.h>
#include <kactionclasses.h>
#include <kapplication.h>
@@ -61,9 +61,9 @@ public:
KFileSpeedBar *speedBar;
KHistoryCombo *urlCombo;
KFileTreeBranch *branch;
- QString recentDirClass;
+ TQString recentDirClass;
KURL startURL;
- QValueStack<KURL> dirsToList;
+ TQValueStack<KURL> dirsToList;
bool comboLocked : 1;
};
@@ -75,7 +75,7 @@ static KURL rootUrl(const KURL &url)
if (!kapp->authorizeURLAction("list", KURL(), root))
{
- root = KURL::fromPathOrURL( QDir::homeDirPath() );
+ root = KURL::fromPathOrURL( TQDir::homeDirPath() );
if (!kapp->authorizeURLAction("list", KURL(), root))
{
root = url;
@@ -84,8 +84,8 @@ static KURL rootUrl(const KURL &url)
return root;
}
-KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
- QWidget *parent, const char *name,
+KDirSelectDialog::KDirSelectDialog(const TQString &startDir, bool localOnly,
+ TQWidget *parent, const char *name,
bool modal)
: KDialogBase( parent, name, modal, i18n("Select Folder"),
Ok|Cancel|User1, Ok, false,
@@ -95,20 +95,20 @@ KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
d = new KDirSelectDialogPrivate;
d->branch = 0L;
- QFrame *page = makeMainWidget();
- QHBoxLayout *hlay = new QHBoxLayout( page, 0, spacingHint() );
- m_mainLayout = new QVBoxLayout();
+ TQFrame *page = makeMainWidget();
+ TQHBoxLayout *hlay = new TQHBoxLayout( page, 0, spacingHint() );
+ m_mainLayout = new TQVBoxLayout();
d->speedBar = new KFileSpeedBar( page, "speedbar" );
- connect( d->speedBar, SIGNAL( activated( const KURL& )),
- SLOT( setCurrentURL( const KURL& )) );
+ connect( d->speedBar, TQT_SIGNAL( activated( const KURL& )),
+ TQT_SLOT( setCurrentURL( const KURL& )) );
hlay->addWidget( d->speedBar, 0 );
hlay->addLayout( m_mainLayout, 1 );
// Create dir list
m_treeView = new KFileTreeView( page );
m_treeView->addColumn( i18n("Folders") );
- m_treeView->setColumnWidthMode( 0, QListView::Maximum );
- m_treeView->setResizeMode( QListView::AllColumns );
+ m_treeView->setColumnWidthMode( 0, TQListView::Maximum );
+ m_treeView->setResizeMode( TQListView::AllColumns );
d->urlCombo = new KHistoryCombo( page, "url combo" );
d->urlCombo->setTrapReturnKey( true );
@@ -118,26 +118,26 @@ KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
d->urlCombo->setCompletionObject( comp, true );
d->urlCombo->setAutoDeleteCompletionObject( true );
d->urlCombo->setDuplicatesEnabled( false );
- connect( d->urlCombo, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotComboTextChanged( const QString& ) ));
+ connect( d->urlCombo, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotComboTextChanged( const TQString& ) ));
- m_contextMenu = new QPopupMenu( this );
- KAction* newFolder = new KAction( i18n("New Folder..."), "folder_new", 0, this, SLOT( slotMkdir() ), this);
+ m_contextMenu = new TQPopupMenu( this );
+ KAction* newFolder = new KAction( i18n("New Folder..."), "folder_new", 0, this, TQT_SLOT( slotMkdir() ), this);
newFolder->plug(m_contextMenu);
m_contextMenu->insertSeparator();
m_showHiddenFolders = new KToggleAction ( i18n( "Show Hidden Folders" ), 0, this,
- SLOT( slotShowHiddenFoldersToggled() ), this);
+ TQT_SLOT( slotShowHiddenFoldersToggled() ), this);
m_showHiddenFolders->plug(m_contextMenu);
d->startURL = KFileDialog::getStartURL( startDir, d->recentDirClass );
if ( localOnly && !d->startURL.isLocalFile() )
{
d->startURL = KURL();
- QString docPath = KGlobalSettings::documentPath();
- if (QDir(docPath).exists())
+ TQString docPath = KGlobalSettings::documentPath();
+ if (TQDir(docPath).exists())
d->startURL.setPath( docPath );
else
- d->startURL.setPath( QDir::homeDirPath() );
+ d->startURL.setPath( TQDir::homeDirPath() );
}
KURL root = rootUrl(d->startURL);
@@ -151,15 +151,15 @@ KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
m_mainLayout->addWidget( m_treeView, 1 );
m_mainLayout->addWidget( d->urlCombo, 0 );
- connect( m_treeView, SIGNAL( currentChanged( QListViewItem * )),
- SLOT( slotCurrentChanged() ));
- connect( m_treeView, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & )),
- SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & )));
+ connect( m_treeView, TQT_SIGNAL( currentChanged( TQListViewItem * )),
+ TQT_SLOT( slotCurrentChanged() ));
+ connect( m_treeView, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & )),
+ TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & )));
- connect( d->urlCombo, SIGNAL( activated( const QString& )),
- SLOT( slotURLActivated( const QString& )));
- connect( d->urlCombo, SIGNAL( returnPressed( const QString& )),
- SLOT( slotURLActivated( const QString& )));
+ connect( d->urlCombo, TQT_SIGNAL( activated( const TQString& )),
+ TQT_SLOT( slotURLActivated( const TQString& )));
+ connect( d->urlCombo, TQT_SIGNAL( returnPressed( const TQString& )),
+ TQT_SLOT( slotURLActivated( const TQString& )));
setCurrentURL( d->startURL );
}
@@ -194,14 +194,14 @@ void KDirSelectDialog::setCurrentURL( const KURL& url )
d->branch = createBranch( root );
}
- d->branch->disconnect( SIGNAL( populateFinished( KFileTreeViewItem * )),
- this, SLOT( slotNextDirToList( KFileTreeViewItem *)));
- connect( d->branch, SIGNAL( populateFinished( KFileTreeViewItem * )),
- SLOT( slotNextDirToList( KFileTreeViewItem * ) ));
+ d->branch->disconnect( TQT_SIGNAL( populateFinished( KFileTreeViewItem * )),
+ this, TQT_SLOT( slotNextDirToList( KFileTreeViewItem *)));
+ connect( d->branch, TQT_SIGNAL( populateFinished( KFileTreeViewItem * )),
+ TQT_SLOT( slotNextDirToList( KFileTreeViewItem * ) ));
KURL dirToList = root;
d->dirsToList.clear();
- QString path = url.path(+1);
+ TQString path = url.path(+1);
int pos = path.length();
if ( path.isEmpty() ) // e.g. ftp://host.com/ -> just list the root dir
@@ -248,7 +248,7 @@ void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item )
{
// scroll to make item the topmost item
view()->ensureItemVisible( item );
- QRect r = view()->itemRect( item );
+ TQRect r = view()->itemRect( item );
if ( r.isValid() )
{
int x, y;
@@ -260,25 +260,25 @@ void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item )
openNextDir( item );
else
{
- d->branch->disconnect( SIGNAL( populateFinished( KFileTreeViewItem * )),
- this, SLOT( slotNextDirToList( KFileTreeViewItem *)));
+ d->branch->disconnect( TQT_SIGNAL( populateFinished( KFileTreeViewItem * )),
+ this, TQT_SLOT( slotNextDirToList( KFileTreeViewItem *)));
view()->setCurrentItem( item );
item->setSelected( true );
}
}
-void KDirSelectDialog::readConfig( KConfig *config, const QString& group )
+void KDirSelectDialog::readConfig( KConfig *config, const TQString& group )
{
d->urlCombo->clear();
KConfigGroup conf( config, group );
d->urlCombo->setHistoryItems( conf.readPathListEntry( "History Items" ));
- QSize defaultSize( 400, 450 );
+ TQSize defaultSize( 400, 450 );
resize( conf.readSizeEntry( "DirSelectDialog Size", &defaultSize ));
}
-void KDirSelectDialog::saveConfig( KConfig *config, const QString& group )
+void KDirSelectDialog::saveConfig( KConfig *config, const TQString& group )
{
KConfigGroup conf( config, group );
conf.writePathEntry( "History Items", d->urlCombo->historyItems(), ',',
@@ -340,10 +340,10 @@ void KDirSelectDialog::slotCurrentChanged()
d->urlCombo->setEditText( u.prettyURL() );
}
else
- d->urlCombo->setEditText( QString::null );
+ d->urlCombo->setEditText( TQString::null );
}
-void KDirSelectDialog::slotURLActivated( const QString& text )
+void KDirSelectDialog::slotURLActivated( const TQString& text )
{
if ( text.isEmpty() )
return;
@@ -363,7 +363,7 @@ void KDirSelectDialog::slotURLActivated( const QString& text )
KFileTreeBranch * KDirSelectDialog::createBranch( const KURL& url )
{
- QString title = url.isLocalFile() ? url.path() : url.prettyURL();
+ TQString title = url.isLocalFile() ? url.path() : url.prettyURL();
KFileTreeBranch *branch = view()->addBranch( url, title, m_showHiddenFolders->isChecked() );
branch->setChildRecurse( false );
view()->setDirOnlyMode( branch, true );
@@ -371,7 +371,7 @@ KFileTreeBranch * KDirSelectDialog::createBranch( const KURL& url )
return branch;
}
-void KDirSelectDialog::slotComboTextChanged( const QString& text )
+void KDirSelectDialog::slotComboTextChanged( const TQString& text )
{
if ( d->branch )
{
@@ -386,7 +386,7 @@ void KDirSelectDialog::slotComboTextChanged( const QString& text )
}
}
- QListViewItem *item = view()->currentItem();
+ TQListViewItem *item = view()->currentItem();
if ( item )
{
item->setSelected( false );
@@ -395,7 +395,7 @@ void KDirSelectDialog::slotComboTextChanged( const QString& text )
}
}
-void KDirSelectDialog::slotContextMenu( KListView *, QListViewItem *, const QPoint& pos )
+void KDirSelectDialog::slotContextMenu( KListView *, TQListViewItem *, const TQPoint& pos )
{
m_contextMenu->popup( pos );
}
@@ -403,12 +403,12 @@ void KDirSelectDialog::slotContextMenu( KListView *, QListViewItem *, const QPoi
void KDirSelectDialog::slotMkdir()
{
bool ok;
- QString where = url().pathOrURL();
- QString name = i18n( "New Folder" );
- if ( url().isLocalFile() && QFileInfo( url().path(+1) + name ).exists() )
+ TQString where = url().pathOrURL();
+ TQString name = i18n( "New Folder" );
+ if ( url().isLocalFile() && TQFileInfo( url().path(+1) + name ).exists() )
name = KIO::RenameDlg::suggestName( url(), name );
- QString directory = KIO::encodeFileName( KInputDialog::getText( i18n( "New Folder" ),
+ TQString directory = KIO::encodeFileName( KInputDialog::getText( i18n( "New Folder" ),
i18n( "Create new folder in:\n%1" ).arg( where ),
name, &ok, this));
if (!ok)
@@ -419,8 +419,8 @@ void KDirSelectDialog::slotMkdir()
bool exists = false;
KURL folderurl( url() );
- QStringList dirs = QStringList::split( QDir::separator(), directory );
- QStringList::ConstIterator it = dirs.begin();
+ TQStringList dirs = TQStringList::split( TQDir::separator(), directory );
+ TQStringList::ConstIterator it = dirs.begin();
for ( ; it != dirs.end(); ++it )
{
@@ -431,7 +431,7 @@ void KDirSelectDialog::slotMkdir()
if ( exists ) // url was already existant
{
- QString which = folderurl.isLocalFile() ? folderurl.path() : folderurl.prettyURL();
+ TQString which = folderurl.isLocalFile() ? folderurl.path() : folderurl.prettyURL();
KMessageBox::sorry(this, i18n("A file or folder named %1 already exists.").arg(which));
selectDirectory = false;
}
@@ -458,10 +458,10 @@ void KDirSelectDialog::slotShowHiddenFoldersToggled()
}
// static
-KURL KDirSelectDialog::selectDirectory( const QString& startDir,
+KURL KDirSelectDialog::selectDirectory( const TQString& startDir,
bool localOnly,
- QWidget *parent,
- const QString& caption)
+ TQWidget *parent,
+ const TQString& caption)
{
KDirSelectDialog myDialog( startDir, localOnly, parent,
"kdirselect dialog", true );
@@ -469,7 +469,7 @@ KURL KDirSelectDialog::selectDirectory( const QString& startDir,
if ( !caption.isNull() )
myDialog.setCaption( caption );
- if ( myDialog.exec() == QDialog::Accepted )
+ if ( myDialog.exec() == TQDialog::Accepted )
return KIO::NetAccess::mostLocalURL(myDialog.url(),parent);
else
return KURL();
diff --git a/kio/kfile/kdirselectdialog.h b/kio/kfile/kdirselectdialog.h
index 7f2bb13c5..4687d1b75 100644
--- a/kio/kfile/kdirselectdialog.h
+++ b/kio/kfile/kdirselectdialog.h
@@ -47,12 +47,12 @@ public:
* @param startDir the directory, initially shown
* @param localOnly unused. You can only select paths below the startDir
* @param parent the parent for the dialog, usually 0L
- * @param name the QObject::name
+ * @param name the TQObject::name
* @param modal if the dialog is modal or not
*/
- KDirSelectDialog(const QString& startDir = QString::null,
+ KDirSelectDialog(const TQString& startDir = TQString::null,
bool localOnly = false,
- QWidget *parent = 0L,
+ TQWidget *parent = 0L,
const char *name = 0, bool modal = false);
/**
@@ -75,18 +75,18 @@ public:
* The tree will display this directory and subdirectories of it.
* @param localOnly unused. You can only select paths below the startDir
* @param parent the parent widget to use for the dialog, or NULL to create a parent-less dialog
- * @param caption the caption to use for the dialog, or QString::null for the default caption
+ * @param caption the caption to use for the dialog, or TQString::null for the default caption
* @return The URL selected, or an empty URL if the user canceled
* or no URL was selected.
*/
- static KURL selectDirectory( const QString& startDir = QString::null,
- bool localOnly = false, QWidget *parent = 0L,
- const QString& caption = QString::null);
+ static KURL selectDirectory( const TQString& startDir = TQString::null,
+ bool localOnly = false, TQWidget *parent = 0L,
+ const TQString& caption = TQString::null);
/**
* @return The path for the root node
*/
- QString startDir() const { return m_startDir; }
+ TQString startDir() const { return m_startDir; }
public slots:
void setCurrentURL( const KURL& url );
@@ -98,26 +98,26 @@ protected:
virtual void accept();
// Layouts protected so that subclassing is easy
- QVBoxLayout *m_mainLayout;
- QString m_startDir;
+ TQVBoxLayout *m_mainLayout;
+ TQString m_startDir;
private slots:
void slotCurrentChanged();
- void slotURLActivated( const QString& );
+ void slotURLActivated( const TQString& );
void slotNextDirToList( KFileTreeViewItem *dirItem );
- void slotComboTextChanged( const QString& text );
- void slotContextMenu( KListView *, QListViewItem *, const QPoint & );
+ void slotComboTextChanged( const TQString& text );
+ void slotContextMenu( KListView *, TQListViewItem *, const TQPoint & );
void slotShowHiddenFoldersToggled();
void slotMkdir();
private:
- void readConfig( KConfig *config, const QString& group );
- void saveConfig( KConfig *config, const QString& group );
+ void readConfig( KConfig *config, const TQString& group );
+ void saveConfig( KConfig *config, const TQString& group );
void openNextDir( KFileTreeViewItem *parent );
KFileTreeBranch * createBranch( const KURL& url );
KFileTreeView *m_treeView;
- QPopupMenu *m_contextMenu;
+ TQPopupMenu *m_contextMenu;
KToggleAction *m_showHiddenFolders;
bool m_localOnly;
diff --git a/kio/kfile/kdirsize.cpp b/kio/kfile/kdirsize.cpp
index cebe42cbc..3c9bfbb8c 100644
--- a/kio/kfile/kdirsize.cpp
+++ b/kio/kfile/kdirsize.cpp
@@ -20,8 +20,8 @@
#include "kdirsize.h"
#include <kdebug.h>
#include <kglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include <config-kfile.h>
using namespace KIO;
@@ -35,7 +35,7 @@ KDirSize::KDirSize( const KURL & directory )
KDirSize::KDirSize( const KFileItemList & lstItems )
: KIO::Job(false /*No GUI*/), m_bAsync(true), m_totalSize(0L), m_totalFiles(0L), m_totalSubdirs(0L), m_lstItems(lstItems)
{
- QTimer::singleShot( 0, this, SLOT(processList()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(processList()) );
}
void KDirSize::processList()
@@ -70,17 +70,17 @@ void KDirSize::processList()
void KDirSize::startNextJob( const KURL & url )
{
KIO::ListJob * listJob = KIO::listRecursive( url, false /* no GUI */ );
- connect( listJob, SIGNAL(entries( KIO::Job *,
+ connect( listJob, TQT_SIGNAL(entries( KIO::Job *,
const KIO::UDSEntryList& )),
- SLOT( slotEntries( KIO::Job*,
+ TQT_SLOT( slotEntries( KIO::Job*,
const KIO::UDSEntryList& )));
addSubjob( listJob );
}
void KDirSize::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
{
- static const QString& dot = KGlobal::staticQString( "." );
- static const QString& dotdot = KGlobal::staticQString( ".." );
+ static const TQString& dot = KGlobal::staticQString( "." );
+ static const TQString& dotdot = KGlobal::staticQString( ".." );
KIO::UDSEntryListConstIterator it = list.begin();
KIO::UDSEntryListConstIterator end = list.end();
for (; it != end; ++it) {
@@ -88,7 +88,7 @@ void KDirSize::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
KIO::filesize_t size = 0;
bool isLink = false;
bool isDir = false;
- QString name;
+ TQString name;
for( ; it2 != (*it).end(); it2++ ) {
switch( (*it2).m_uds ) {
case KIO::UDS_NAME:
diff --git a/kio/kfile/kdiskfreesp.cpp b/kio/kfile/kdiskfreesp.cpp
index f748b2a66..179b69f72 100644
--- a/kio/kfile/kdiskfreesp.cpp
+++ b/kio/kfile/kdiskfreesp.cpp
@@ -23,8 +23,8 @@
*/
#include "kdiskfreesp.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kprocess.h>
@@ -43,15 +43,15 @@
/***************************************************************************
* constructor
**/
-KDiskFreeSp::KDiskFreeSp(QObject *parent, const char *name)
- : QObject(parent,name)
+KDiskFreeSp::KDiskFreeSp(TQObject *parent, const char *name)
+ : TQObject(parent,name)
{
dfProc = new KProcess(); Q_CHECK_PTR(dfProc);
dfProc->setEnvironment("LANGUAGE", "C");
- connect( dfProc, SIGNAL(receivedStdout(KProcess *, char *, int) ),
- this, SLOT (receivedDFStdErrOut(KProcess *, char *, int)) );
- connect(dfProc,SIGNAL(processExited(KProcess *) ),
- this, SLOT(dfDone() ) );
+ connect( dfProc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int) ),
+ this, TQT_SLOT (receivedDFStdErrOut(KProcess *, char *, int)) );
+ connect(dfProc,TQT_SIGNAL(processExited(KProcess *) ),
+ this, TQT_SLOT(dfDone() ) );
readingDFStdErrOut=false;
}
@@ -70,21 +70,21 @@ KDiskFreeSp::~KDiskFreeSp()
**/
void KDiskFreeSp::receivedDFStdErrOut(KProcess *, char *data, int len)
{
- QCString tmp(data,len+1); // adds a zero-byte
+ TQCString tmp(data,len+1); // adds a zero-byte
dfStringErrOut.append(tmp);
}
/***************************************************************************
* reads the df-commands results
**/
-int KDiskFreeSp::readDF( const QString & mountPoint )
+int KDiskFreeSp::readDF( const TQString & mountPoint )
{
if (readingDFStdErrOut || dfProc->isRunning())
return -1;
m_mountPoint = mountPoint;
dfStringErrOut=""; // yet no data received
dfProc->clearArguments();
- (*dfProc) << QString::fromLocal8Bit(DF_COMMAND) << QString::fromLocal8Bit(DF_ARGS);
+ (*dfProc) << TQString::fromLocal8Bit(DF_COMMAND) << TQString::fromLocal8Bit(DF_ARGS);
if (!dfProc->start( KProcess::NotifyOnExit, KProcess::AllOutput ))
kdError() << "could not execute ["<< DF_COMMAND << "]" << endl;
return 1;
@@ -98,12 +98,12 @@ void KDiskFreeSp::dfDone()
{
readingDFStdErrOut=true;
- QTextStream t (dfStringErrOut, IO_ReadOnly);
- QString s=t.readLine();
- if ( (s.isEmpty()) || ( s.left(10) != QString::fromLatin1("Filesystem") ) )
+ TQTextStream t (dfStringErrOut, IO_ReadOnly);
+ TQString s=t.readLine();
+ if ( (s.isEmpty()) || ( s.left(10) != TQString::fromLatin1("Filesystem") ) )
kdError() << "Error running df command... got [" << s << "]" << endl;
while ( !t.eof() ) {
- QString u,v;
+ TQString u,v;
s=t.readLine();
s=s.simplifyWhiteSpace();
if ( !s.isEmpty() ) {
@@ -119,7 +119,7 @@ void KDiskFreeSp::dfDone()
//kdDebug(kfile_area) << "[" << s << "]" << endl;
- //QString deviceName = s.left(s.find(BLANK));
+ //TQString deviceName = s.left(s.find(BLANK));
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug(kfile_area) << " DeviceName: [" << deviceName << "]" << endl;
@@ -143,7 +143,7 @@ void KDiskFreeSp::dfDone()
s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94%
- QString mountPoint = s.stripWhiteSpace();
+ TQString mountPoint = s.stripWhiteSpace();
//kdDebug(kfile_area) << " MountPoint: [" << mountPoint << "]" << endl;
if ( mountPoint == m_mountPoint )
@@ -160,10 +160,10 @@ void KDiskFreeSp::dfDone()
delete this;
}
-KDiskFreeSp * KDiskFreeSp::findUsageInfo( const QString & path )
+KDiskFreeSp * KDiskFreeSp::findUsageInfo( const TQString & path )
{
KDiskFreeSp * job = new KDiskFreeSp;
- QString mountPoint = KIO::findPathMountPoint( path );
+ TQString mountPoint = KIO::findPathMountPoint( path );
job->readDF( mountPoint );
return job;
}
diff --git a/kio/kfile/kdiskfreesp.h b/kio/kfile/kdiskfreesp.h
index 53b83ba40..6a0591d6f 100644
--- a/kio/kfile/kdiskfreesp.h
+++ b/kio/kfile/kdiskfreesp.h
@@ -26,8 +26,8 @@
#ifndef __KDISKFREESP_H__
#define __KDISKFREESP_H__
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -40,7 +40,7 @@ class KProcess;
class KIO_EXPORT KDiskFreeSp : public QObject
{ Q_OBJECT
public:
- KDiskFreeSp( QObject *parent=0, const char *name=0 );
+ KDiskFreeSp( TQObject *parent=0, const char *name=0 );
/**
* Destructor - this object autodeletes itself when it's done
*/
@@ -51,7 +51,7 @@ public:
* if this mount point is found, with the info requested.
* done is emitted in any case.
*/
- int readDF( const QString & mountPoint );
+ int readDF( const TQString & mountPoint );
/**
* Call this to fire a search on the disk usage information
@@ -60,15 +60,15 @@ public:
* if this mount point is found, with the info requested.
* done is emitted in any case.
*/
- static KDiskFreeSp * findUsageInfo( const QString & path );
+ static KDiskFreeSp * findUsageInfo( const TQString & path );
signals:
- void foundMountPoint( const QString & mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail );
+ void foundMountPoint( const TQString & mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail );
// This one is a hack around a weird (compiler?) bug. In the former signal,
// the slot in KPropsDlg would get 0L, 0L as the last two parameters.
// When using const ulong& instead, all is ok.
- void foundMountPoint( const unsigned long&, const unsigned long&, const unsigned long&, const QString& );
+ void foundMountPoint( const unsigned long&, const unsigned long&, const unsigned long&, const TQString& );
void done();
private slots:
@@ -77,8 +77,8 @@ private slots:
private:
KProcess *dfProc;
- QCString dfStringErrOut;
- QString m_mountPoint;
+ TQCString dfStringErrOut;
+ TQString m_mountPoint;
bool readingDFStdErrOut;
class KDiskFreeSpPrivate;
KDiskFreeSpPrivate * d;
diff --git a/kio/kfile/kencodingfiledialog.cpp b/kio/kfile/kencodingfiledialog.cpp
index 63ce8a5dc..396006504 100644
--- a/kio/kfile/kencodingfiledialog.cpp
+++ b/kio/kfile/kencodingfiledialog.cpp
@@ -27,7 +27,7 @@
#include <kglobal.h>
#include <klocale.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kdiroperator.h>
#include <krecentdocument.h>
@@ -36,8 +36,8 @@ struct KEncodingFileDialogPrivate
KComboBox *encoding;
};
-KEncodingFileDialog::KEncodingFileDialog(const QString& startDir, const QString& encoding , const QString& filter,
- const QString& caption, KFileDialog::OperationMode type, QWidget *parent, const char* name, bool modal)
+KEncodingFileDialog::KEncodingFileDialog(const TQString& startDir, const TQString& encoding , const TQString& filter,
+ const TQString& caption, KFileDialog::OperationMode type, TQWidget *parent, const char* name, bool modal)
: KFileDialog(startDir,filter,parent,name,modal), d(new KEncodingFileDialogPrivate)
{
setCaption(caption);
@@ -46,22 +46,22 @@ KEncodingFileDialog::KEncodingFileDialog(const QString& startDir, const QString&
KToolBar *tb = toolBar();
tb->insertSeparator();
- int index = tb->insertCombo(QStringList(), -1 /*id*/, false /*writable*/, 0 /*signal*/, 0 /*receiver*/, 0 /*slot*/ );
+ int index = tb->insertCombo(TQStringList(), -1 /*id*/, false /*writable*/, 0 /*signal*/, 0 /*receiver*/, 0 /*slot*/ );
d->encoding = tb->getCombo( tb->idAt( index ) );
if ( !d->encoding )
return;
d->encoding->clear ();
- QString sEncoding = encoding;
+ TQString sEncoding = encoding;
if (sEncoding.isEmpty())
- sEncoding = QString::fromLatin1(KGlobal::locale()->encoding());
+ sEncoding = TQString::fromLatin1(KGlobal::locale()->encoding());
- QStringList encodings (KGlobal::charsets()->availableEncodingNames());
+ TQStringList encodings (KGlobal::charsets()->availableEncodingNames());
int insert = 0;
for (uint i=0; i < encodings.count(); i++)
{
bool found = false;
- QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found);
+ TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found);
if (found)
{
@@ -84,19 +84,19 @@ KEncodingFileDialog::~KEncodingFileDialog()
}
-QString KEncodingFileDialog::selectedEncoding() const
+TQString KEncodingFileDialog::selectedEncoding() const
{
if (d->encoding)
return d->encoding->currentText();
else
- return QString::null;
+ return TQString::null;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding(const QString& encoding,
- const QString& startDir,
- const QString& filter,
- QWidget *parent, const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding(const TQString& encoding,
+ const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -111,11 +111,11 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding(cons
return res;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNamesAndEncoding(const QString& encoding,
- const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNamesAndEncoding(const TQString& encoding,
+ const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -129,8 +129,8 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNamesAndEncoding(con
return res;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLAndEncoding(const QString& encoding, const QString& startDir,
- const QString& filter, QWidget *parent, const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLAndEncoding(const TQString& encoding, const TQString& startDir,
+ const TQString& filter, TQWidget *parent, const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -145,10 +145,10 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLAndEncoding(const QSt
return res;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLsAndEncoding(const QString& encoding, const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLsAndEncoding(const TQString& encoding, const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -164,21 +164,21 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLsAndEncoding(const QS
}
-KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(const QString& encoding,
- const QString& dir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(const TQString& encoding,
+ const TQString& dir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KEncodingFileDialog dlg(specialDir?dir:QString::null, encoding,filter,caption.isNull() ? i18n("Save As") : caption,
+ KEncodingFileDialog dlg(specialDir?dir:TQString::null, encoding,filter,caption.isNull() ? i18n("Save As") : caption,
Saving,parent, "filedialog", true);
if ( !specialDir )
dlg.setSelection( dir ); // may also be a filename
dlg.exec();
- QString filename = dlg.selectedFile();
+ TQString filename = dlg.selectedFile();
if (!filename.isEmpty())
KRecentDocument::add(filename);
@@ -189,12 +189,12 @@ KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(cons
}
-KEncodingFileDialog::Result KEncodingFileDialog::getSaveURLAndEncoding(const QString& encoding,
- const QString& dir, const QString& filter,
- QWidget *parent, const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getSaveURLAndEncoding(const TQString& encoding,
+ const TQString& dir, const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KEncodingFileDialog dlg(specialDir?dir:QString::null, encoding,filter,caption.isNull() ? i18n("Save As") :
+ KEncodingFileDialog dlg(specialDir?dir:TQString::null, encoding,filter,caption.isNull() ? i18n("Save As") :
caption, Saving,parent, "filedialog", true);
if ( !specialDir )
diff --git a/kio/kfile/kencodingfiledialog.h b/kio/kfile/kencodingfiledialog.h
index fbf3b34e6..15b44f9c3 100644
--- a/kio/kfile/kencodingfiledialog.h
+++ b/kio/kfile/kencodingfiledialog.h
@@ -43,9 +43,9 @@ class KIO_EXPORT KEncodingFileDialog : public KFileDialog
public:
class Result {
public:
- QStringList fileNames;
+ TQStringList fileNames;
KURL::List URLs;
- QString encoding;
+ TQString encoding;
};
/**
@@ -53,7 +53,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -64,7 +64,7 @@ public:
* same keyword.
*
* @param encoding The encoding shown in the encoding combo. If it's
- * QString::null, the global default encoding will be shown.
+ * TQString::null, the global default encoding will be shown.
*
* @param filter This is a space separated list of shell globs.
* You can set the text to be displayed for the glob, and
@@ -82,11 +82,11 @@ public:
*
* @since 3.2
*/
- KEncodingFileDialog (const QString& startDir = QString::null,
- const QString& encoding = QString::null,
- const QString& filter = QString::null,
- const QString& caption = QString::null, KFileDialog::OperationMode type = KFileDialog::Opening,
- QWidget *parent= 0, const char *name="", bool modal = true);
+ KEncodingFileDialog (const TQString& startDir = TQString::null,
+ const TQString& encoding = TQString::null,
+ const TQString& filter = TQString::null,
+ const TQString& caption = TQString::null, KFileDialog::OperationMode type = KFileDialog::Opening,
+ TQWidget *parent= 0, const char *name="", bool modal = true);
/**
* Destructs the file dialog.
*/
@@ -94,9 +94,9 @@ public:
/**
- * @returns The selected encoding if the constructor with the encoding parameter was used, otherwise QString::null.
+ * @returns The selected encoding if the constructor with the encoding parameter was used, otherwise TQString::null.
*/
- QString selectedEncoding() const;
+ TQString selectedEncoding() const;
/**
@@ -109,7 +109,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -126,11 +126,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenFileNameAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getOpenFileNameAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
* Creates a modal file dialog and returns the selected encoding and the selected
@@ -141,7 +141,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -158,11 +158,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenFileNamesAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static Result getOpenFileNamesAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
/**
* Creates a modal file dialog and returns the selected encoding and
@@ -173,7 +173,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -190,11 +190,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenURLAndEncoding(const QString& encoding=QString::null,
- const QString& startDir = QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getOpenURLAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir = TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
@@ -208,7 +208,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -225,11 +225,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenURLsAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static Result getOpenURLsAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
@@ -244,7 +244,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -261,11 +261,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getSaveFileNameAndEncoding(const QString& encoding=QString::null,
- const QString& startDir=QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getSaveFileNameAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir=TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
@@ -279,7 +279,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -296,11 +296,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getSaveURLAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getSaveURLAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
diff --git a/kio/kfile/kfile.h b/kio/kfile/kfile.h
index 70253f9d8..91f4f4599 100644
--- a/kio/kfile/kfile.h
+++ b/kio/kfile/kfile.h
@@ -18,7 +18,7 @@
#ifndef KFILE_H
#define KFILE_H
-#include <qdir.h>
+#include <tqdir.h>
#include "kdelibs_export.h"
@@ -73,26 +73,26 @@ public:
// sorting specific
- // grr, who had the idea to set QDir::Name to 0x0?
- static bool isSortByName( const QDir::SortSpec& sort ) {
- return (sort & QDir::Time) != QDir::Time &&
- (sort & QDir::Size) != QDir::Size;
+ // grr, who had the idea to set TQDir::Name to 0x0?
+ static bool isSortByName( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::Time) != TQDir::Time &&
+ (sort & TQDir::Size) != TQDir::Size;
}
- static bool isSortBySize( const QDir::SortSpec& sort ) {
- return (sort & QDir::Size) == QDir::Size;
+ static bool isSortBySize( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::Size) == TQDir::Size;
}
- static bool isSortByDate( const QDir::SortSpec& sort ) {
- return (sort & QDir::Time) == QDir::Time;
+ static bool isSortByDate( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::Time) == TQDir::Time;
}
- static bool isSortDirsFirst( const QDir::SortSpec& sort ) {
- return (sort & QDir::DirsFirst) == QDir::DirsFirst;
+ static bool isSortDirsFirst( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::DirsFirst) == TQDir::DirsFirst;
}
- static bool isSortCaseInsensitive( const QDir::SortSpec& sort ) {
- return (sort & QDir::IgnoreCase) == QDir::IgnoreCase;
+ static bool isSortCaseInsensitive( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::IgnoreCase) == TQDir::IgnoreCase;
}
diff --git a/kio/kfile/kfilebookmarkhandler.cpp b/kio/kfile/kfilebookmarkhandler.cpp
index f69ae07a2..f78fe2547 100644
--- a/kio/kfile/kfilebookmarkhandler.cpp
+++ b/kio/kfile/kfilebookmarkhandler.cpp
@@ -28,13 +28,13 @@
#include "kfilebookmarkhandler.h"
KFileBookmarkHandler::KFileBookmarkHandler( KFileDialog *dialog )
- : QObject( dialog, "KFileBookmarkHandler" ),
+ : TQObject( dialog, "KFileBookmarkHandler" ),
KBookmarkOwner(),
m_dialog( dialog )
{
m_menu = new KPopupMenu( dialog, "bookmark menu" );
- QString file = locate( "data", "kfile/bookmarks.xml" );
+ TQString file = locate( "data", "kfile/bookmarks.xml" );
if ( file.isEmpty() )
file = locateLocal( "data", "kfile/bookmarks.xml" );
@@ -42,7 +42,7 @@ KFileBookmarkHandler::KFileBookmarkHandler( KFileDialog *dialog )
// import old bookmarks
if ( !KStandardDirs::exists( file ) ) {
- QString oldFile = locate( "data", "kfile/bookmarks.html" );
+ TQString oldFile = locate( "data", "kfile/bookmarks.html" );
if ( !oldFile.isEmpty() )
importOldBookmarks( oldFile, manager );
}
@@ -59,12 +59,12 @@ KFileBookmarkHandler::~KFileBookmarkHandler()
delete m_bookmarkMenu;
}
-QString KFileBookmarkHandler::currentURL() const
+TQString KFileBookmarkHandler::currentURL() const
{
return m_dialog->baseURL().url();
}
-void KFileBookmarkHandler::importOldBookmarks( const QString& path,
+void KFileBookmarkHandler::importOldBookmarks( const TQString& path,
KBookmarkManager *manager )
{
KBookmarkDomBuilder *builder = new KBookmarkDomBuilder( manager->root(), manager );
diff --git a/kio/kfile/kfilebookmarkhandler.h b/kio/kfile/kfilebookmarkhandler.h
index a6ad4fa2a..d03cb1da8 100644
--- a/kio/kfile/kfilebookmarkhandler.h
+++ b/kio/kfile/kfilebookmarkhandler.h
@@ -26,7 +26,7 @@ class QTextStream;
class KPopupMenu;
-class KIO_EXPORT KFileBookmarkHandler : public QObject, public KBookmarkOwner
+class KIO_EXPORT KFileBookmarkHandler : public TQObject, public KBookmarkOwner
{
Q_OBJECT
@@ -34,19 +34,19 @@ public:
KFileBookmarkHandler( KFileDialog *dialog );
~KFileBookmarkHandler();
- QPopupMenu * popupMenu();
+ TQPopupMenu * popupMenu();
// KBookmarkOwner interface:
- virtual void openBookmarkURL( const QString& url ) { emit openURL( url ); }
- virtual QString currentURL() const;
+ virtual void openBookmarkURL( const TQString& url ) { emit openURL( url ); }
+ virtual TQString currentURL() const;
KPopupMenu *menu() const { return m_menu; }
signals:
- void openURL( const QString& url );
+ void openURL( const TQString& url );
private:
- void importOldBookmarks( const QString& path, KBookmarkManager *manager );
+ void importOldBookmarks( const TQString& path, KBookmarkManager *manager );
KFileDialog *m_dialog;
KPopupMenu *m_menu;
diff --git a/kio/kfile/kfiledetailview.cpp b/kio/kfile/kfiledetailview.cpp
index 78aef5fb0..823714396 100644
--- a/kio/kfile/kfiledetailview.cpp
+++ b/kio/kfile/kfiledetailview.cpp
@@ -19,11 +19,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qevent.h>
-#include <qkeycode.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqevent.h>
+#include <tqkeycode.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kapplication.h>
#include <kfileitem.h>
@@ -52,10 +52,10 @@ public:
{ }
KFileListViewItem *dropItem;
- QTimer autoOpenTimer;
+ TQTimer autoOpenTimer;
};
-KFileDetailView::KFileDetailView(QWidget *parent, const char *name)
+KFileDetailView::KFileDetailView(TQWidget *parent, const char *name)
: KListView(parent, name), KFileView(), d(new KFileDetailViewPrivate())
{
// this is always the static section, not the index depending on column order
@@ -73,50 +73,50 @@ KFileDetailView::KFileDetailView(QWidget *parent, const char *name)
setAllColumnsShowFocus( true );
setDragEnabled(true);
- connect( header(), SIGNAL( clicked(int)),
- SLOT(slotSortingChanged(int) ));
+ connect( header(), TQT_SIGNAL( clicked(int)),
+ TQT_SLOT(slotSortingChanged(int) ));
- connect( this, SIGNAL( returnPressed(QListViewItem *) ),
- SLOT( slotActivate( QListViewItem *) ) );
+ connect( this, TQT_SIGNAL( returnPressed(TQListViewItem *) ),
+ TQT_SLOT( slotActivate( TQListViewItem *) ) );
- connect( this, SIGNAL( clicked(QListViewItem *, const QPoint&, int)),
- SLOT( selected( QListViewItem *) ) );
- connect( this, SIGNAL( doubleClicked(QListViewItem *, const QPoint&, int)),
- SLOT( slotActivate( QListViewItem *) ) );
+ connect( this, TQT_SIGNAL( clicked(TQListViewItem *, const TQPoint&, int)),
+ TQT_SLOT( selected( TQListViewItem *) ) );
+ connect( this, TQT_SIGNAL( doubleClicked(TQListViewItem *, const TQPoint&, int)),
+ TQT_SLOT( slotActivate( TQListViewItem *) ) );
- connect( this, SIGNAL(contextMenuRequested( QListViewItem *,
- const QPoint &, int )),
- this, SLOT( slotActivateMenu( QListViewItem *, const QPoint& )));
+ connect( this, TQT_SIGNAL(contextMenuRequested( TQListViewItem *,
+ const TQPoint &, int )),
+ this, TQT_SLOT( slotActivateMenu( TQListViewItem *, const TQPoint& )));
KFile::SelectionMode sm = KFileView::selectionMode();
switch ( sm ) {
case KFile::Multi:
- QListView::setSelectionMode( QListView::Multi );
+ TQListView::setSelectionMode( TQListView::Multi );
break;
case KFile::Extended:
- QListView::setSelectionMode( QListView::Extended );
+ TQListView::setSelectionMode( TQListView::Extended );
break;
case KFile::NoSelection:
- QListView::setSelectionMode( QListView::NoSelection );
+ TQListView::setSelectionMode( TQListView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QListView::setSelectionMode( QListView::Single );
+ TQListView::setSelectionMode( TQListView::Single );
break;
}
// for highlighting
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QListViewItem * ) ),
- SLOT( highlighted( QListViewItem * ) ));
+ connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ TQT_SLOT( highlighted( TQListViewItem * ) ));
// DND
- connect( &(d->autoOpenTimer), SIGNAL( timeout() ),
- this, SLOT( slotAutoOpen() ));
+ connect( &(d->autoOpenTimer), TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoOpen() ));
setSorting( sorting() );
@@ -130,12 +130,12 @@ KFileDetailView::~KFileDetailView()
delete d;
}
-void KFileDetailView::readConfig( KConfig *config, const QString& group )
+void KFileDetailView::readConfig( KConfig *config, const TQString& group )
{
restoreLayout( config, group );
}
-void KFileDetailView::writeConfig( KConfig *config, const QString& group )
+void KFileDetailView::writeConfig( KConfig *config, const TQString& group )
{
saveLayout( config, group );
}
@@ -189,7 +189,7 @@ void KFileDetailView::invertSelection()
KListView::invertSelection();
}
-void KFileDetailView::slotActivateMenu (QListViewItem *item,const QPoint& pos )
+void KFileDetailView::slotActivateMenu (TQListViewItem *item,const TQPoint& pos )
{
if ( !item ) {
sig->activateMenu( 0, pos );
@@ -209,7 +209,7 @@ void KFileDetailView::insertItem( KFileItem *i )
{
KFileView::insertItem( i );
- KFileListViewItem *item = new KFileListViewItem( (QListView*) this, i );
+ KFileListViewItem *item = new KFileListViewItem( (TQListView*) this, i );
setSortingKey( item, i );
@@ -219,7 +219,7 @@ void KFileDetailView::insertItem( KFileItem *i )
m_resolver->m_lstPendingMimeIconItems.append( item );
}
-void KFileDetailView::slotActivate( QListViewItem *item )
+void KFileDetailView::slotActivate( TQListViewItem *item )
{
if ( !item )
return;
@@ -229,7 +229,7 @@ void KFileDetailView::slotActivate( QListViewItem *item )
sig->activate( fi );
}
-void KFileDetailView::selected( QListViewItem *item )
+void KFileDetailView::selected( TQListViewItem *item )
{
if ( !item )
return;
@@ -241,7 +241,7 @@ void KFileDetailView::selected( QListViewItem *item )
}
}
-void KFileDetailView::highlighted( QListViewItem *item )
+void KFileDetailView::highlighted( TQListViewItem *item )
{
if ( !item )
return;
@@ -254,33 +254,33 @@ void KFileDetailView::highlighted( QListViewItem *item )
void KFileDetailView::setSelectionMode( KFile::SelectionMode sm )
{
- disconnect( this, SIGNAL( selectionChanged() ));
- disconnect( this, SIGNAL( selectionChanged( QListViewItem * ) ));
+ disconnect( this, TQT_SIGNAL( selectionChanged() ));
+ disconnect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ));
KFileView::setSelectionMode( sm );
switch ( KFileView::selectionMode() ) {
case KFile::Multi:
- QListView::setSelectionMode( QListView::Multi );
+ TQListView::setSelectionMode( TQListView::Multi );
break;
case KFile::Extended:
- QListView::setSelectionMode( QListView::Extended );
+ TQListView::setSelectionMode( TQListView::Extended );
break;
case KFile::NoSelection:
- QListView::setSelectionMode( QListView::NoSelection );
+ TQListView::setSelectionMode( TQListView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QListView::setSelectionMode( QListView::Single );
+ TQListView::setSelectionMode( TQListView::Single );
break;
}
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QListViewItem * )),
- SLOT( highlighted( QListViewItem * )));
+ connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * )),
+ TQT_SLOT( highlighted( TQListViewItem * )));
}
bool KFileDetailView::isSelected( const KFileItem *i ) const
@@ -298,7 +298,7 @@ void KFileDetailView::updateView( bool b )
if ( !b )
return;
- QListViewItemIterator it( (QListView*)this );
+ TQListViewItemIterator it( (TQListView*)this );
for ( ; it.current(); ++it ) {
KFileListViewItem *item=static_cast<KFileListViewItem *>(it.current());
item->setPixmap( 0, item->fileInfo()->pixmap(KIcon::SizeSmall) );
@@ -324,12 +324,12 @@ void KFileDetailView::setSortingKey( KFileListViewItem *item,
const KFileItem *i )
{
// see also setSorting()
- QDir::SortSpec spec = KFileView::sorting();
+ TQDir::SortSpec spec = KFileView::sorting();
- if ( spec & QDir::Time )
+ if ( spec & TQDir::Time )
item->setKey( sortingKey( i->time( KIO::UDS_MODIFICATION_TIME ),
i->isDir(), spec ));
- else if ( spec & QDir::Size )
+ else if ( spec & TQDir::Size )
item->setKey( sortingKey( i->size(), i->isDir(), spec ));
else // Name or Unsorted
@@ -353,56 +353,56 @@ void KFileDetailView::slotSortingChanged( int col )
{
// col is the section here, not the index!
- QDir::SortSpec sort = sorting();
+ TQDir::SortSpec sort = sorting();
int sortSpec = -1;
- bool reversed = (col == m_sortingCol) && (sort & QDir::Reversed) == 0;
+ bool reversed = (col == m_sortingCol) && (sort & TQDir::Reversed) == 0;
m_sortingCol = col;
switch( col ) {
case COL_NAME:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Name);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Name);
break;
case COL_SIZE:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Size);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Size);
break;
case COL_DATE:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Time);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Time);
break;
- // the following columns have no equivalent in QDir, so we set it
- // to QDir::Unsorted and remember the column (m_sortingCol)
+ // the following columns have no equivalent in TQDir, so we set it
+ // to TQDir::Unsorted and remember the column (m_sortingCol)
case COL_OWNER:
case COL_GROUP:
case COL_PERM:
- // grmbl, QDir::Unsorted == SortByMask.
- sortSpec = (sort & ~QDir::SortByMask);// | QDir::Unsorted;
+ // grmbl, TQDir::Unsorted == SortByMask.
+ sortSpec = (sort & ~TQDir::SortByMask);// | TQDir::Unsorted;
break;
default:
break;
}
if ( reversed )
- sortSpec |= QDir::Reversed;
+ sortSpec |= TQDir::Reversed;
else
- sortSpec &= ~QDir::Reversed;
+ sortSpec &= ~TQDir::Reversed;
- if ( sort & QDir::IgnoreCase )
- sortSpec |= QDir::IgnoreCase;
+ if ( sort & TQDir::IgnoreCase )
+ sortSpec |= TQDir::IgnoreCase;
else
- sortSpec &= ~QDir::IgnoreCase;
+ sortSpec &= ~TQDir::IgnoreCase;
- KFileView::setSorting( static_cast<QDir::SortSpec>( sortSpec ) );
+ KFileView::setSorting( static_cast<TQDir::SortSpec>( sortSpec ) );
KFileItem *item;
KFileItemListIterator it( *items() );
- if ( sortSpec & QDir::Time ) {
+ if ( sortSpec & TQDir::Time ) {
for ( ; (item = it.current()); ++it )
viewItem(item)->setKey( sortingKey( item->time( KIO::UDS_MODIFICATION_TIME ), item->isDir(), sortSpec ));
}
- else if ( sortSpec & QDir::Size ) {
+ else if ( sortSpec & TQDir::Size ) {
for ( ; (item = it.current()); ++it )
viewItem(item)->setKey( sortingKey( item->size(), item->isDir(),
sortSpec ));
@@ -419,30 +419,30 @@ void KFileDetailView::slotSortingChanged( int col )
KListView::sort();
if ( !m_blockSortingSignal )
- sig->changeSorting( static_cast<QDir::SortSpec>( sortSpec ) );
+ sig->changeSorting( static_cast<TQDir::SortSpec>( sortSpec ) );
}
-void KFileDetailView::setSorting( QDir::SortSpec spec )
+void KFileDetailView::setSorting( TQDir::SortSpec spec )
{
int col = 0;
- if ( spec & QDir::Time )
+ if ( spec & TQDir::Time )
col = COL_DATE;
- else if ( spec & QDir::Size )
+ else if ( spec & TQDir::Size )
col = COL_SIZE;
- else if ( spec & QDir::Unsorted )
+ else if ( spec & TQDir::Unsorted )
col = m_sortingCol;
else
col = COL_NAME;
// inversed, because slotSortingChanged will reverse it
- if ( spec & QDir::Reversed )
- spec = (QDir::SortSpec) (spec & ~QDir::Reversed);
+ if ( spec & TQDir::Reversed )
+ spec = (TQDir::SortSpec) (spec & ~TQDir::Reversed);
else
- spec = (QDir::SortSpec) (spec | QDir::Reversed);
+ spec = (TQDir::SortSpec) (spec | TQDir::Reversed);
m_sortingCol = col;
- KFileView::setSorting( (QDir::SortSpec) spec );
+ KFileView::setSorting( (TQDir::SortSpec) spec );
// don't emit sortingChanged() when called via setSorting()
@@ -502,7 +502,7 @@ KFileItem * KFileDetailView::prevItem( const KFileItem *fileItem ) const
return firstFileItem();
}
-void KFileDetailView::keyPressEvent( QKeyEvent *e )
+void KFileDetailView::keyPressEvent( TQKeyEvent *e )
{
KListView::keyPressEvent( e );
@@ -533,7 +533,7 @@ void KFileDetailView::listingCompleted()
m_resolver->start();
}
-QDragObject *KFileDetailView::dragObject()
+TQDragObject *KFileDetailView::dragObject()
{
// create a list of the URL:s that we want to drag
KURL::List urls;
@@ -541,16 +541,16 @@ QDragObject *KFileDetailView::dragObject()
for ( ; it.current(); ++it ){
urls.append( (*it)->url() );
}
- QPixmap pixmap;
+ TQPixmap pixmap;
if( urls.count() > 1 )
pixmap = DesktopIcon( "kmultiple", KIcon::SizeSmall );
if( pixmap.isNull() )
pixmap = currentFileItem()->pixmap( KIcon::SizeSmall );
- QPoint hotspot;
+ TQPoint hotspot;
hotspot.setX( pixmap.width() / 2 );
hotspot.setY( pixmap.height() / 2 );
- QDragObject* myDragObject = new KURLDrag( urls, widget() );
+ TQDragObject* myDragObject = new KURLDrag( urls, widget() );
myDragObject->setPixmap( pixmap, hotspot );
return myDragObject;
}
@@ -572,16 +572,16 @@ void KFileDetailView::slotAutoOpen()
sig->activate( fileItem );
}
-bool KFileDetailView::acceptDrag(QDropEvent* e) const
+bool KFileDetailView::acceptDrag(TQDropEvent* e) const
{
return KURLDrag::canDecode( e ) &&
(e->source()!= const_cast<KFileDetailView*>(this)) &&
- ( e->action() == QDropEvent::Copy
- || e->action() == QDropEvent::Move
- || e->action() == QDropEvent::Link );
+ ( e->action() == TQDropEvent::Copy
+ || e->action() == TQDropEvent::Move
+ || e->action() == TQDropEvent::Link );
}
-void KFileDetailView::contentsDragEnterEvent( QDragEnterEvent *e )
+void KFileDetailView::contentsDragEnterEvent( TQDragEnterEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -604,7 +604,7 @@ void KFileDetailView::contentsDragEnterEvent( QDragEnterEvent *e )
}
}
-void KFileDetailView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KFileDetailView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -630,13 +630,13 @@ void KFileDetailView::contentsDragMoveEvent( QDragMoveEvent *e )
}
}
-void KFileDetailView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KFileDetailView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
}
-void KFileDetailView::contentsDropEvent( QDropEvent *e )
+void KFileDetailView::contentsDropEvent( TQDropEvent *e )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
diff --git a/kio/kfile/kfiledetailview.h b/kio/kfile/kfiledetailview.h
index 174a2483d..61e2156f4 100644
--- a/kio/kfile/kfiledetailview.h
+++ b/kio/kfile/kfiledetailview.h
@@ -37,8 +37,8 @@ class QKeyEvent;
class KIO_EXPORT KFileListViewItem : public KListViewItem
{
public:
- KFileListViewItem( QListView *parent, const QString &text,
- const QPixmap &icon, KFileItem *fi )
+ KFileListViewItem( TQListView *parent, const TQString &text,
+ const TQPixmap &icon, KFileItem *fi )
: KListViewItem( parent, text ), inf( fi ) {
setPixmap( 0, icon );
setText( 0, text );
@@ -47,14 +47,14 @@ public:
/**
* @since 3.1
*/
- KFileListViewItem( QListView *parent, KFileItem *fi )
+ KFileListViewItem( TQListView *parent, KFileItem *fi )
: KListViewItem( parent ), inf( fi ) {
init();
}
- KFileListViewItem( QListView *parent, const QString &text,
- const QPixmap &icon, KFileItem *fi,
- QListViewItem *after)
+ KFileListViewItem( TQListView *parent, const TQString &text,
+ const TQPixmap &icon, KFileItem *fi,
+ TQListViewItem *after)
: KListViewItem( parent, after ), inf( fi ) {
setPixmap( 0, icon );
setText( 0, text );
@@ -70,17 +70,17 @@ public:
return inf;
}
- virtual QString key( int /*column*/, bool /*ascending*/ ) const {
+ virtual TQString key( int /*column*/, bool /*ascending*/ ) const {
return m_key;
}
- void setKey( const QString& key ) { m_key = key; }
+ void setKey( const TQString& key ) { m_key = key; }
- QRect rect() const
+ TQRect rect() const
{
- QRect r = listView()->itemRect(this);
- return QRect( listView()->viewportToContents( r.topLeft() ),
- QSize( r.width(), r.height() ) );
+ TQRect r = listView()->itemRect(this);
+ return TQRect( listView()->viewportToContents( r.topLeft() ),
+ TQSize( r.width(), r.height() ) );
}
/**
@@ -90,7 +90,7 @@ public:
private:
KFileItem *inf;
- QString m_key;
+ TQString m_key;
private:
class KFileListViewItemPrivate;
@@ -111,10 +111,10 @@ class KIO_EXPORT KFileDetailView : public KListView, public KFileView
Q_OBJECT
public:
- KFileDetailView(QWidget *parent, const char *name);
+ KFileDetailView(TQWidget *parent, const char *name);
virtual ~KFileDetailView();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
virtual void setAutoUpdate( bool ) {} // ### unused. remove in KDE4
@@ -140,17 +140,17 @@ public:
virtual void insertItem( KFileItem *i );
// implemented to get noticed about sorting changes (for sortingIndicator)
- virtual void setSorting( QDir::SortSpec );
+ virtual void setSorting( TQDir::SortSpec );
void ensureItemVisible( const KFileItem * );
// for KMimeTypeResolver
void mimeTypeDeterminationFinished();
void determineIcon( KFileListViewItem *item );
- QScrollView *scrollWidget() const { return (QScrollView*) this; }
+ TQScrollView *scrollWidget() const { return (TQScrollView*) this; }
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
signals:
/**
@@ -159,25 +159,25 @@ signals:
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, KFileItem *fileItem);
+ void dropped(TQDropEvent *event, KFileItem *fileItem);
/**
* The user dropped the URLs @p urls.
* @p url points to the item dropped on or can be empty if the
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, const KURL::List &urls, const KURL &url);
+ void dropped(TQDropEvent *event, const KURL::List &urls, const KURL &url);
protected:
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
// DND support
- virtual QDragObject *dragObject();
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDropEvent( QDropEvent *ev );
- virtual bool acceptDrag(QDropEvent* e ) const;
+ virtual TQDragObject *dragObject();
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *ev );
+ virtual bool acceptDrag(TQDropEvent* e ) const;
int m_sortingCol;
@@ -186,16 +186,16 @@ protected slots:
private slots:
void slotSortingChanged( int );
- void selected( QListViewItem *item );
- void slotActivate( QListViewItem *item );
- void highlighted( QListViewItem *item );
- void slotActivateMenu ( QListViewItem *item, const QPoint& pos );
+ void selected( TQListViewItem *item );
+ void slotActivate( TQListViewItem *item );
+ void highlighted( TQListViewItem *item );
+ void slotActivateMenu ( TQListViewItem *item, const TQPoint& pos );
void slotAutoOpen();
private:
- virtual void insertItem(QListViewItem *i) { KListView::insertItem(i); }
+ virtual void insertItem(TQListViewItem *i) { KListView::insertItem(i); }
virtual void setSorting(int i, bool b) { KListView::setSorting(i, b); }
- virtual void setSelected(QListViewItem *i, bool b) { KListView::setSelected(i, b); }
+ virtual void setSelected(TQListViewItem *i, bool b) { KListView::setSelected(i, b); }
inline KFileListViewItem * viewItem( const KFileItem *item ) const {
if ( item )
diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp
index 5668ec616..f206a4887 100644
--- a/kio/kfile/kfiledialog.cpp
+++ b/kio/kfile/kfiledialog.cpp
@@ -28,19 +28,19 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qptrcollection.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qtextcodec.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
-#include <qfiledialog.h>
+#include <tqptrcollection.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqtextcodec.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
+#include <tqfiledialog.h>
#include <kaccel.h>
#include <kaction.h>
@@ -97,7 +97,7 @@
enum Buttons { HOTLIST_BUTTON,
PATH_COMBO, CONFIGURE_BUTTON };
-template class QPtrList<KIO::StatJob>;
+template class TQPtrList<KIO::StatJob>;
namespace {
static void silenceQToolBar(QtMsgType, const char *)
@@ -111,36 +111,36 @@ struct KFileDialogPrivate
KURL url;
// the selected filenames in multiselection mode -- FIXME
- QString filenames;
+ TQString filenames;
// the name of the filename set by setSelection
- QString selection;
+ TQString selection;
// now following all kind of widgets, that I need to rebuild
// the geometry management
- QBoxLayout *boxLayout;
- QWidget *mainWidget;
+ TQBoxLayout *boxLayout;
+ TQWidget *mainWidget;
- QLabel *locationLabel;
+ TQLabel *locationLabel;
// @deprecated remove in KDE4
- QLabel *filterLabel;
+ TQLabel *filterLabel;
KURLComboBox *pathCombo;
KPushButton *okButton, *cancelButton;
KFileSpeedBar *urlBar;
- QHBoxLayout *urlBarLayout;
- QWidget *customWidget;
+ TQHBoxLayout *urlBarLayout;
+ TQWidget *customWidget;
// Automatically Select Extension stuff
- QCheckBox *autoSelectExtCheckBox;
+ TQCheckBox *autoSelectExtCheckBox;
bool autoSelectExtChecked; // whether or not the _user_ has checked the above box
- QString extension; // current extension for this filter
+ TQString extension; // current extension for this filter
- QPtrList<KIO::StatJob> statJobs;
+ TQPtrList<KIO::StatJob> statJobs;
KURL::List urlList; //the list of selected urls
- QStringList mimetypes; //the list of possible mimetypes to save as
+ TQStringList mimetypes; //the list of possible mimetypes to save as
// indicates if the location edit should be kept or cleared when changing
// directories
@@ -154,7 +154,7 @@ struct KFileDialogPrivate
KFileDialog::OperationMode operationMode;
// The file class used for KRecentDirs
- QString fileClass;
+ TQString fileClass;
KFileBookmarkHandler *bookmarkHandler;
@@ -166,16 +166,16 @@ KURL *KFileDialog::lastDirectory; // to set the start path
static KStaticDeleter<KURL> ldd;
-KFileDialog::KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char* name, bool modal)
- : KDialogBase( parent, name, modal, QString::null, 0 )
+KFileDialog::KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char* name, bool modal)
+ : KDialogBase( parent, name, modal, TQString::null, 0 )
{
init( startDir, filter, 0 );
}
-KFileDialog::KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char* name, bool modal, QWidget* widget)
- : KDialogBase( parent, name, modal, QString::null, 0 )
+KFileDialog::KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char* name, bool modal, TQWidget* widget)
+ : KDialogBase( parent, name, modal, TQString::null, 0 )
{
init( startDir, filter, widget );
}
@@ -197,12 +197,12 @@ KFileDialog::~KFileDialog()
delete d;
}
-void KFileDialog::setLocationLabel(const QString& text)
+void KFileDialog::setLocationLabel(const TQString& text)
{
d->locationLabel->setText(text);
}
-void KFileDialog::setFilter(const QString& filter)
+void KFileDialog::setFilter(const TQString& filter)
{
int pos = filter.find('/');
@@ -210,7 +210,7 @@ void KFileDialog::setFilter(const QString& filter)
// interpret as a MIME filter.
if (pos > 0 && filter[pos - 1] != '\\') {
- QStringList filters = QStringList::split( " ", filter );
+ TQStringList filters = TQStringList::split( " ", filter );
setMimeFilter( filters );
return;
}
@@ -218,7 +218,7 @@ void KFileDialog::setFilter(const QString& filter)
// Strip the escape characters from
// escaped '/' characters.
- QString copy (filter);
+ TQString copy (filter);
for (pos = 0; (pos = copy.find("\\/", pos)) != -1; ++pos)
copy.remove(pos, 1);
@@ -231,13 +231,13 @@ void KFileDialog::setFilter(const QString& filter)
updateAutoSelectExtension ();
}
-QString KFileDialog::currentFilter() const
+TQString KFileDialog::currentFilter() const
{
return filterWidget->currentFilter();
}
// deprecated
-void KFileDialog::setFilterMimeType(const QString &label,
+void KFileDialog::setFilterMimeType(const TQString &label,
const KMimeType::List &types,
const KMimeType::Ptr &defaultType)
{
@@ -251,14 +251,14 @@ void KFileDialog::setFilterMimeType(const QString &label,
setMimeFilter( d->mimetypes, defaultType->name() );
}
-void KFileDialog::setMimeFilter( const QStringList& mimeTypes,
- const QString& defaultType )
+void KFileDialog::setMimeFilter( const TQStringList& mimeTypes,
+ const TQString& defaultType )
{
d->mimetypes = mimeTypes;
filterWidget->setMimeFilter( mimeTypes, defaultType );
- QStringList types = QStringList::split(" ", filterWidget->currentFilter());
- types.append( QString::fromLatin1( "inode/directory" ));
+ TQStringList types = TQStringList::split(" ", filterWidget->currentFilter());
+ types.append( TQString::fromLatin1( "inode/directory" ));
ops->clearFilter();
ops->setMimeFilter( types );
d->hasDefaultFilter = !defaultType.isEmpty();
@@ -271,7 +271,7 @@ void KFileDialog::setMimeFilter( const QStringList& mimeTypes,
void KFileDialog::clearFilter()
{
d->mimetypes.clear();
- filterWidget->setFilter( QString::null );
+ filterWidget->setFilter( TQString::null );
ops->clearFilter();
d->hasDefaultFilter = false;
filterWidget->setEditable( true );
@@ -279,7 +279,7 @@ void KFileDialog::clearFilter()
updateAutoSelectExtension ();
}
-QString KFileDialog::currentMimeFilter() const
+TQString KFileDialog::currentMimeFilter() const
{
int i = filterWidget->currentItem();
if (filterWidget->showsAllTypes())
@@ -287,7 +287,7 @@ QString KFileDialog::currentMimeFilter() const
if ((i >= 0) && (i < (int) d->mimetypes.count()))
return d->mimetypes[i];
- return QString::null; // The "all types" item has no mimetype
+ return TQString::null; // The "all types" item has no mimetype
}
KMimeType::Ptr KFileDialog::currentFilterMimeType()
@@ -295,7 +295,7 @@ KMimeType::Ptr KFileDialog::currentFilterMimeType()
return KMimeType::mimeType( currentMimeFilter() );
}
-void KFileDialog::setPreviewWidget(const QWidget *w) {
+void KFileDialog::setPreviewWidget(const TQWidget *w) {
ops->setPreviewWidget(w);
ops->clearHistory();
d->hasView = true;
@@ -307,14 +307,14 @@ void KFileDialog::setPreviewWidget(const KPreviewWidgetBase *w) {
d->hasView = true;
}
-KURL KFileDialog::getCompleteURL(const QString &_url)
+KURL KFileDialog::getCompleteURL(const TQString &_url)
{
- QString url = KShell::tildeExpand(_url);
+ TQString url = KShell::tildeExpand(_url);
KURL u;
if ( KURL::isRelativeURL(url) ) // only a full URL isn't relative. Even /path is.
{
- if (!url.isEmpty() && !QDir::isRelativePath(url) ) // absolute path
+ if (!url.isEmpty() && !TQDir::isRelativePath(url) ) // absolute path
u.setPath( url );
else
{
@@ -342,7 +342,7 @@ void KFileDialog::slotOk()
if ( locationEdit->currentText().stripWhiteSpace().isEmpty() ) {
if ( !items || items->isEmpty() )
{
- QString msg;
+ TQString msg;
if ( d->operationMode == Saving )
msg = i18n("Please specify the filename to save to.");
else
@@ -357,8 +357,8 @@ void KFileDialog::slotOk()
bool multi = (mode() & KFile::Files) != 0;
KFileItemListIterator it( *items );
- QString endQuote = QString::fromLatin1("\" ");
- QString name, files;
+ TQString endQuote = TQString::fromLatin1("\" ");
+ TQString name, files;
while ( it.current() ) {
name = (*it)->name();
if ( multi ) {
@@ -382,7 +382,7 @@ void KFileDialog::slotOk()
!(items->isEmpty() && !dirOnly) ) {
d->urlList.clear();
- d->filenames = QString::null;
+ d->filenames = TQString::null;
if ( dirOnly ) {
d->url = ops->url();
@@ -421,7 +421,7 @@ void KFileDialog::slotOk()
KURL selectedURL;
if ( (mode() & KFile::Files) == KFile::Files ) {// multiselection mode
- QString locationText = locationEdit->currentText();
+ TQString locationText = locationEdit->currentText();
if ( locationText.contains( '/' )) {
// relative path? -> prepend the current directory
KURL u( ops->url(), KShell::tildeExpand(locationText));
@@ -464,9 +464,9 @@ void KFileDialog::slotOk()
bool done = true;
if ( d->url.isLocalFile() ) {
if ( locationEdit->currentText().stripWhiteSpace().isEmpty() ) {
- QFileInfo info( d->url.path() );
+ TQFileInfo info( d->url.path() );
if ( info.isDir() ) {
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
d->urlList.append( d->url );
accept();
@@ -492,10 +492,10 @@ void KFileDialog::slotOk()
if ( ops->dirOnlyMode() )
{
KURL fullURL(d->url, locationEdit->currentText());
- if ( QFile::exists( fullURL.path() ) )
+ if ( TQFile::exists( fullURL.path() ) )
{
d->url = fullURL;
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
accept();
return;
@@ -512,7 +512,7 @@ void KFileDialog::slotOk()
}
else { // FIXME: remote directory, should we allow that?
// qDebug( "**** Selected remote directory: %s", d->url.url().latin1());
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
d->urlList.append( d->url );
@@ -528,7 +528,7 @@ void KFileDialog::slotOk()
if (!kapp->authorizeURLAction("open", KURL(), d->url))
{
- QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, d->url.prettyURL());
+ TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, d->url.prettyURL());
KMessageBox::error( d->mainWidget, msg);
return;
}
@@ -546,7 +546,7 @@ void KFileDialog::slotOk()
{
if (!kapp->authorizeURLAction("open", KURL(), *it))
{
- QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, (*it).prettyURL());
+ TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, (*it).prettyURL());
KMessageBox::error( d->mainWidget, msg);
return;
}
@@ -558,8 +558,8 @@ void KFileDialog::slotOk()
job->setWindow (topLevelWidget());
KIO::Scheduler::scheduleJob( job );
d->statJobs.append( job );
- connect( job, SIGNAL( result(KIO::Job *) ),
- SLOT( slotStatResult( KIO::Job *) ));
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ TQT_SLOT( slotStatResult( KIO::Job *) ));
}
return;
}
@@ -567,7 +567,7 @@ void KFileDialog::slotOk()
job = KIO::stat(d->url,!d->url.isLocalFile());
job->setWindow (topLevelWidget());
d->statJobs.append( job );
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotStatResult(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotStatResult(KIO::Job*)));
}
@@ -616,7 +616,7 @@ void KFileDialog::slotStatResult(KIO::Job* job)
{
if ( ops->dirOnlyMode() )
{
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
accept();
}
@@ -644,23 +644,23 @@ void KFileDialog::slotStatResult(KIO::Job* job)
void KFileDialog::accept()
{
- setResult( QDialog::Accepted ); // parseSelectedURLs() checks that
+ setResult( TQDialog::Accepted ); // parseSelectedURLs() checks that
*lastDirectory = ops->url();
if (!d->fileClass.isEmpty())
KRecentDirs::add(d->fileClass, ops->url().url());
// clear the topmost item, we insert it as full path later on as item 1
- locationEdit->changeItem( QString::null, 0 );
+ locationEdit->changeItem( TQString::null, 0 );
KURL::List list = selectedURLs();
- QValueListConstIterator<KURL> it = list.begin();
+ TQValueListConstIterator<KURL> it = list.begin();
for ( ; it != list.end(); ++it ) {
const KURL& url = *it;
// we strip the last slash (-1) because KURLComboBox does that as well
// when operating in file-mode. If we wouldn't , dupe-finding wouldn't
// work.
- QString file = url.isLocalFile() ? url.path(-1) : url.prettyURL(-1);
+ TQString file = url.isLocalFile() ? url.path(-1) : url.prettyURL(-1);
// remove dupes
for ( int i = 1; i < locationEdit->count(); i++ ) {
@@ -751,9 +751,9 @@ void KFileDialog::multiSelectionChanged()
return;
}
- static const QString &begin = KGlobal::staticQString(" \"");
+ static const TQString &begin = KGlobal::staticQString(" \"");
KFileItemListIterator it ( *list );
- QString text;
+ TQString text;
while ( (item = it.current()) ) {
text.append( begin ).append( item->name() ).append( '\"' );
++it;
@@ -762,16 +762,16 @@ void KFileDialog::multiSelectionChanged()
setLocationText( text.stripWhiteSpace() );
}
-void KFileDialog::setLocationText( const QString& text )
+void KFileDialog::setLocationText( const TQString& text )
{
// setCurrentItem() will cause textChanged() being emitted,
// so slotLocationChanged() will be called. Make sure we don't clear
// the KDirOperator's view-selection in there
- disconnect( locationEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotLocationChanged( const QString& ) ) );
+ disconnect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotLocationChanged( const TQString& ) ) );
locationEdit->setCurrentItem( 0 );
- connect( locationEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotLocationChanged( const QString& )) );
+ connect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotLocationChanged( const TQString& )) );
locationEdit->setEditText( text );
// don't change selection when user has clicked on an item
@@ -785,7 +785,7 @@ static const char autocompletionWhatsThisText[] = I18N_NOOP("<p>While typing in
"and selecting a preferred mode from the <b>Text Completion</b> menu.") "</qt>";
void KFileDialog::updateLocationWhatsThis (void)
{
- QString whatsThisText;
+ TQString whatsThisText;
if (d->operationMode == KFileDialog::Saving)
{
whatsThisText = "<qt>" + i18n("This is the name to save the file as.") +
@@ -804,11 +804,11 @@ void KFileDialog::updateLocationWhatsThis (void)
i18n (autocompletionWhatsThisText);
}
- QWhatsThis::add(d->locationLabel, whatsThisText);
- QWhatsThis::add(locationEdit, whatsThisText);
+ TQWhatsThis::add(d->locationLabel, whatsThisText);
+ TQWhatsThis::add(locationEdit, whatsThisText);
}
-void KFileDialog::init(const QString& startDir, const QString& filter, QWidget* widget)
+void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidget* widget)
{
initStatic();
d = new KFileDialogPrivate();
@@ -819,13 +819,13 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
d->bookmarkHandler = 0;
d->hasDefaultFilter = false;
d->hasView = false;
- d->mainWidget = new QWidget( this, "KFileDialog::mainWidget");
+ d->mainWidget = new TQWidget( this, "KFileDialog::mainWidget");
setMainWidget( d->mainWidget );
d->okButton = new KPushButton( KStdGuiItem::ok(), d->mainWidget );
d->okButton->setDefault( true );
d->cancelButton = new KPushButton(KStdGuiItem::cancel(), d->mainWidget);
- connect( d->okButton, SIGNAL( clicked() ), SLOT( slotOk() ));
- connect( d->cancelButton, SIGNAL( clicked() ), SLOT( slotCancel() ));
+ connect( d->okButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOk() ));
+ connect( d->cancelButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCancel() ));
d->customWidget = widget;
d->autoSelectExtCheckBox = 0; // delayed loading
d->autoSelectExtChecked = false;
@@ -838,20 +838,20 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
d->pathCombo = new KURLComboBox( KURLComboBox::Directories, true,
toolbar, "path combo" );
- QToolTip::add( d->pathCombo, i18n("Current location") );
- QWhatsThis::add( d->pathCombo, "<qt>" + i18n("This is the currently listed location. "
+ TQToolTip::add( d->pathCombo, i18n("Current location") );
+ TQWhatsThis::add( d->pathCombo, "<qt>" + i18n("This is the currently listed location. "
"The drop-down list also lists commonly used locations. "
"This includes standard locations, such as your home folder, as well as "
"locations that have been visited recently.") + i18n (autocompletionWhatsThisText));
KURL u;
- u.setPath( QDir::rootDirPath() );
- QString text = i18n("Root Folder: %1").arg( u.path() );
+ u.setPath( TQDir::rootDirPath() );
+ TQString text = i18n("Root Folder: %1").arg( u.path() );
d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
- u.setPath( QDir::homeDirPath() );
+ u.setPath( TQDir::homeDirPath() );
text = i18n("Home Folder: %1").arg( u.path( +1 ) );
d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
@@ -859,7 +859,7 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
KURL docPath;
docPath.setPath( KGlobalSettings::documentPath() );
if ( (u.path(+1) != docPath.path(+1)) &&
- QDir(docPath.path(+1)).exists() )
+ TQDir(docPath.path(+1)).exists() )
{
text = i18n("Documents: %1").arg( docPath.path( +1 ) );
d->pathCombo->addDefaultURL( docPath,
@@ -879,10 +879,10 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
// If local, check it exists. If not, go up until it exists.
if ( d->url.isLocalFile() )
{
- if ( !QFile::exists( d->url.path() ) )
+ if ( !TQFile::exists( d->url.path() ) )
{
d->url = d->url.upURL();
- QDir dir( d->url.path() );
+ TQDir dir( d->url.path() );
while ( !dir.exists() )
{
d->url = d->url.upURL();
@@ -893,14 +893,14 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
ops = new KDirOperator(d->url, d->mainWidget, "KFileDialog::ops");
ops->setOnlyDoubleClickSelectsFiles( true );
- connect(ops, SIGNAL(urlEntered(const KURL&)),
- SLOT(urlEntered(const KURL&)));
- connect(ops, SIGNAL(fileHighlighted(const KFileItem *)),
- SLOT(fileHighlighted(const KFileItem *)));
- connect(ops, SIGNAL(fileSelected(const KFileItem *)),
- SLOT(fileSelected(const KFileItem *)));
- connect(ops, SIGNAL(finishedLoading()),
- SLOT(slotLoadingFinished()));
+ connect(ops, TQT_SIGNAL(urlEntered(const KURL&)),
+ TQT_SLOT(urlEntered(const KURL&)));
+ connect(ops, TQT_SIGNAL(fileHighlighted(const KFileItem *)),
+ TQT_SLOT(fileHighlighted(const KFileItem *)));
+ connect(ops, TQT_SIGNAL(fileSelected(const KFileItem *)),
+ TQT_SLOT(fileSelected(const KFileItem *)));
+ connect(ops, TQT_SIGNAL(finishedLoading()),
+ TQT_SLOT(slotLoadingFinished()));
ops->setupMenu(KDirOperator::SortActions |
KDirOperator::FileActions |
@@ -925,14 +925,14 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
KToggleAction *showSidebarAction =
new KToggleAction(i18n("Show Quick Access Navigation Panel"), Key_F9, coll,"toggleSpeedbar");
showSidebarAction->setCheckedState(i18n("Hide Quick Access Navigation Panel"));
- connect( showSidebarAction, SIGNAL( toggled( bool ) ),
- SLOT( toggleSpeedbar( bool )) );
+ connect( showSidebarAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( toggleSpeedbar( bool )) );
KToggleAction *showBookmarksAction =
new KToggleAction(i18n("Show Bookmarks"), 0, coll, "toggleBookmarks");
showBookmarksAction->setCheckedState(i18n("Hide Bookmarks"));
- connect( showBookmarksAction, SIGNAL( toggled( bool ) ),
- SLOT( toggleBookmarks( bool )) );
+ connect( showBookmarksAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( toggleBookmarks( bool )) );
KActionMenu *menu = new KActionMenu( i18n("Configure"), "configure", this, "extra menu" );
menu->setWhatsThis(i18n("<qt>This is the configuration menu for the file dialog. "
@@ -960,8 +960,8 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
menu->insert( coll->action( "separate dirs" ));
menu->setDelayed( false );
- connect( menu->popupMenu(), SIGNAL( aboutToShow() ),
- ops, SLOT( updateSelectionDependentActions() ));
+ connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ ops, TQT_SLOT( updateSelectionDependentActions() ));
menu->plug( toolbar );
//Insert a separator.
@@ -981,37 +981,37 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
d->pathCombo->setCompletionObject( pathCompletionObj );
d->pathCombo->setAutoDeleteCompletionObject( true );
- connect( d->pathCombo, SIGNAL( urlActivated( const KURL& )),
- this, SLOT( enterURL( const KURL& ) ));
- connect( d->pathCombo, SIGNAL( returnPressed( const QString& )),
- this, SLOT( enterURL( const QString& ) ));
+ connect( d->pathCombo, TQT_SIGNAL( urlActivated( const KURL& )),
+ this, TQT_SLOT( enterURL( const KURL& ) ));
+ connect( d->pathCombo, TQT_SIGNAL( returnPressed( const TQString& )),
+ this, TQT_SLOT( enterURL( const TQString& ) ));
- QString whatsThisText;
+ TQString whatsThisText;
// the Location label/edit
- d->locationLabel = new QLabel(i18n("&Location:"), d->mainWidget);
+ d->locationLabel = new TQLabel(i18n("&Location:"), d->mainWidget);
locationEdit = new KURLComboBox(KURLComboBox::Files, true,
d->mainWidget, "LocationEdit");
- connect( locationEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotLocationChanged( const QString& )) );
+ connect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotLocationChanged( const TQString& )) );
updateLocationWhatsThis ();
d->locationLabel->setBuddy(locationEdit);
locationEdit->setFocus();
KURLCompletion *fileCompletionObj = new KURLCompletion( KURLCompletion::FileCompletion );
- QString dir = d->url.url(+1);
+ TQString dir = d->url.url(+1);
pathCompletionObj->setDir( dir );
fileCompletionObj->setDir( dir );
locationEdit->setCompletionObject( fileCompletionObj );
locationEdit->setAutoDeleteCompletionObject( true );
- connect( fileCompletionObj, SIGNAL( match( const QString& ) ),
- SLOT( fileCompletion( const QString& )) );
+ connect( fileCompletionObj, TQT_SIGNAL( match( const TQString& ) ),
+ TQT_SLOT( fileCompletion( const TQString& )) );
- connect( locationEdit, SIGNAL( returnPressed() ),
- this, SLOT( slotOk()));
- connect(locationEdit, SIGNAL( activated( const QString& )),
- this, SLOT( locationActivated( const QString& ) ));
+ connect( locationEdit, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( slotOk()));
+ connect(locationEdit, TQT_SIGNAL( activated( const TQString& )),
+ this, TQT_SLOT( locationActivated( const TQString& ) ));
// the Filter label/edit
whatsThisText = i18n("<qt>This is the filter to apply to the file list. "
@@ -1020,19 +1020,19 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
"drop down menu, or you may enter a custom filter "
"directly into the text area.<p>"
"Wildcards such as * and ? are allowed.</qt>");
- d->filterLabel = new QLabel(i18n("&Filter:"), d->mainWidget);
- QWhatsThis::add(d->filterLabel, whatsThisText);
+ d->filterLabel = new TQLabel(i18n("&Filter:"), d->mainWidget);
+ TQWhatsThis::add(d->filterLabel, whatsThisText);
filterWidget = new KFileFilterCombo(d->mainWidget,
"KFileDialog::filterwidget");
- QWhatsThis::add(filterWidget, whatsThisText);
+ TQWhatsThis::add(filterWidget, whatsThisText);
setFilter(filter);
d->filterLabel->setBuddy(filterWidget);
- connect(filterWidget, SIGNAL(filterChanged()), SLOT(slotFilterChanged()));
+ connect(filterWidget, TQT_SIGNAL(filterChanged()), TQT_SLOT(slotFilterChanged()));
// the Automatically Select Extension checkbox
// (the text, visibility etc. is set in updateAutoSelectExtension(), which is called by readConfig())
- d->autoSelectExtCheckBox = new QCheckBox (d->mainWidget);
- connect(d->autoSelectExtCheckBox, SIGNAL(clicked()), SLOT(slotAutoSelectExtClicked()));
+ d->autoSelectExtCheckBox = new TQCheckBox (d->mainWidget);
+ connect(d->autoSelectExtCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotAutoSelectExtClicked()));
initGUI(); // activate GM
@@ -1049,8 +1049,8 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
void KFileDialog::initSpeedbar()
{
d->urlBar = new KFileSpeedBar( d->mainWidget, "url bar" );
- connect( d->urlBar, SIGNAL( activated( const KURL& )),
- SLOT( enterURL( const KURL& )) );
+ connect( d->urlBar, TQT_SIGNAL( activated( const KURL& )),
+ TQT_SLOT( enterURL( const KURL& )) );
// need to set the current url of the urlbar manually (not via urlEntered()
// here, because the initial url of KDirOperator might be the same as the
@@ -1065,16 +1065,16 @@ void KFileDialog::initGUI()
{
delete d->boxLayout; // deletes all sub layouts
- d->boxLayout = new QVBoxLayout( d->mainWidget, 0, KDialog::spacingHint());
+ d->boxLayout = new TQVBoxLayout( d->mainWidget, 0, KDialog::spacingHint());
d->boxLayout->addWidget(toolbar, AlignTop);
- d->urlBarLayout = new QHBoxLayout( d->boxLayout ); // needed for the urlBar that may appear
- QVBoxLayout *vbox = new QVBoxLayout( d->urlBarLayout );
+ d->urlBarLayout = new TQHBoxLayout( d->boxLayout ); // needed for the urlBar that may appear
+ TQVBoxLayout *vbox = new TQVBoxLayout( d->urlBarLayout );
vbox->addWidget(ops, 4);
vbox->addSpacing(3);
- QGridLayout* lafBox= new QGridLayout(2, 3, KDialog::spacingHint());
+ TQGridLayout* lafBox= new TQGridLayout(2, 3, KDialog::spacingHint());
lafBox->addWidget(d->locationLabel, 0, 0, AlignVCenter);
lafBox->addWidget(locationEdit, 0, 1, AlignVCenter);
@@ -1107,7 +1107,7 @@ void KFileDialog::initGUI()
// ...add it to the dialog, below the filter list box.
// Change the parent so that this widget is a child of the main widget
- d->customWidget->reparent( d->mainWidget, QPoint() );
+ d->customWidget->reparent( d->mainWidget, TQPoint() );
vbox->addWidget( d->customWidget );
vbox->addSpacing(3);
@@ -1130,11 +1130,11 @@ void KFileDialog::initGUI()
void KFileDialog::slotFilterChanged()
{
- QString filter = filterWidget->currentFilter();
+ TQString filter = filterWidget->currentFilter();
ops->clearFilter();
if ( filter.find( '/' ) > -1 ) {
- QStringList types = QStringList::split( " ", filter );
+ TQStringList types = TQStringList::split( " ", filter );
types.prepend( "inode/directory" );
ops->setMimeFilter( types );
}
@@ -1151,15 +1151,15 @@ void KFileDialog::slotFilterChanged()
void KFileDialog::setURL(const KURL& url, bool clearforward)
{
- d->selection = QString::null;
+ d->selection = TQString::null;
ops->setURL( url, clearforward);
}
// Protected
void KFileDialog::urlEntered(const KURL& url)
{
- QString filename = locationEdit->currentText();
- d->selection = QString::null;
+ TQString filename = locationEdit->currentText();
+ d->selection = TQString::null;
if ( d->pathCombo->count() != 0 ) { // little hack
d->pathCombo->setURL( url );
@@ -1172,7 +1172,7 @@ void KFileDialog::urlEntered(const KURL& url)
locationEdit->blockSignals( false );
- QString dir = url.url(+1);
+ TQString dir = url.url(+1);
static_cast<KURLCompletion*>( d->pathCombo->completionObject() )->setDir( dir );
static_cast<KURLCompletion*>( locationEdit->completionObject() )->setDir( dir );
@@ -1180,7 +1180,7 @@ void KFileDialog::urlEntered(const KURL& url)
d->urlBar->setCurrentItem( url );
}
-void KFileDialog::locationActivated( const QString& url )
+void KFileDialog::locationActivated( const TQString& url )
{
// This guard prevents any URL _typed_ by the user from being interpreted
// twice (by returnPressed/slotOk and here, activated/locationActivated)
@@ -1196,7 +1196,7 @@ void KFileDialog::enterURL( const KURL& url)
setURL( url );
}
-void KFileDialog::enterURL( const QString& url )
+void KFileDialog::enterURL( const TQString& url )
{
setURL( KURL::fromPathOrURL( KURLCompletion::replacedPath( url, true, true )) );
}
@@ -1210,12 +1210,12 @@ void KFileDialog::toolbarCallback(int) // SLOT
}
-void KFileDialog::setSelection(const QString& url)
+void KFileDialog::setSelection(const TQString& url)
{
kdDebug(kfile_area) << "setSelection " << url << endl;
if (url.isEmpty()) {
- d->selection = QString::null;
+ d->selection = TQString::null;
return;
}
@@ -1235,7 +1235,7 @@ void KFileDialog::setSelection(const QString& url)
*/
KFileItem i(KFileItem::Unknown, KFileItem::Unknown, u, true );
// KFileItem i(u.path());
- if ( i.isDir() && u.isLocalFile() && QFile::exists( u.path() ) ) {
+ if ( i.isDir() && u.isLocalFile() && TQFile::exists( u.path() ) ) {
// trust isDir() only if the file is
// local (we cannot stat non-local urls) and if it exists!
// (as KFileItem does not check if the file exists or not
@@ -1243,13 +1243,13 @@ void KFileDialog::setSelection(const QString& url)
setURL(u, true);
}
else {
- QString filename = u.url();
+ TQString filename = u.url();
int sep = filename.findRev('/');
if (sep >= 0) { // there is a / in it
if ( KProtocolInfo::supportsListing( u )) {
KURL dir(u);
- dir.setQuery( QString::null );
- dir.setFileName( QString::null );
+ dir.setQuery( TQString::null );
+ dir.setFileName( TQString::null );
setURL(dir, true );
}
@@ -1282,13 +1282,13 @@ void KFileDialog::slotLoadingFinished()
}
// ### remove in KDE4
-void KFileDialog::pathComboChanged( const QString& )
+void KFileDialog::pathComboChanged( const TQString& )
{
}
-void KFileDialog::dirCompletion( const QString& ) // SLOT
+void KFileDialog::dirCompletion( const TQString& ) // SLOT
{
}
-void KFileDialog::fileCompletion( const QString& match )
+void KFileDialog::fileCompletion( const TQString& match )
{
if ( match.isEmpty() && ops->view() )
ops->view()->clearSelection();
@@ -1296,7 +1296,7 @@ void KFileDialog::fileCompletion( const QString& match )
ops->setCurrentItem( match );
}
-void KFileDialog::slotLocationChanged( const QString& text )
+void KFileDialog::slotLocationChanged( const TQString& text )
{
if ( text.isEmpty() && ops->view() )
ops->view()->clearSelection();
@@ -1309,9 +1309,9 @@ void KFileDialog::updateStatusLine(int /* dirs */, int /* files */)
kdWarning() << "KFileDialog::updateStatusLine is deprecated! The status line no longer exists. Do not try and use it!" << endl;
}
-QString KFileDialog::getOpenFileName(const QString& startDir,
- const QString& filter,
- QWidget *parent, const QString& caption)
+TQString KFileDialog::getOpenFileName(const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1325,11 +1325,11 @@ QString KFileDialog::getOpenFileName(const QString& startDir,
return dlg.selectedFile();
}
-QString KFileDialog::getOpenFileNameWId(const QString& startDir,
- const QString& filter,
- WId parent_id, const QString& caption)
+TQString KFileDialog::getOpenFileNameWId(const TQString& startDir,
+ const TQString& filter,
+ WId parent_id, const TQString& caption)
{
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
#ifdef Q_WS_X11
if( parent == NULL && parent_id != 0 )
@@ -1349,10 +1349,10 @@ QString KFileDialog::getOpenFileNameWId(const QString& startDir,
return dlg.selectedFile();
}
-QStringList KFileDialog::getOpenFileNames(const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+TQStringList KFileDialog::getOpenFileNames(const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1365,8 +1365,8 @@ QStringList KFileDialog::getOpenFileNames(const QString& startDir,
return dlg.selectedFiles();
}
-KURL KFileDialog::getOpenURL(const QString& startDir, const QString& filter,
- QWidget *parent, const QString& caption)
+KURL KFileDialog::getOpenURL(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1379,10 +1379,10 @@ KURL KFileDialog::getOpenURL(const QString& startDir, const QString& filter,
return dlg.selectedURL();
}
-KURL::List KFileDialog::getOpenURLs(const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KURL::List KFileDialog::getOpenURLs(const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1395,19 +1395,19 @@ KURL::List KFileDialog::getOpenURLs(const QString& startDir,
return dlg.selectedURLs();
}
-KURL KFileDialog::getExistingURL(const QString& startDir,
- QWidget *parent,
- const QString& caption)
+KURL KFileDialog::getExistingURL(const TQString& startDir,
+ TQWidget *parent,
+ const TQString& caption)
{
return KDirSelectDialog::selectDirectory(startDir, false, parent, caption);
}
-QString KFileDialog::getExistingDirectory(const QString& startDir,
- QWidget *parent,
- const QString& caption)
+TQString KFileDialog::getExistingDirectory(const TQString& startDir,
+ TQWidget *parent,
+ const TQString& caption)
{
#ifdef Q_WS_WIN
- return QFileDialog::getExistingDirectory(startDir, parent, "getExistingDirectory",
+ return TQFileDialog::getExistingDirectory(startDir, parent, "getExistingDirectory",
caption, true, true);
#else
KURL url = KDirSelectDialog::selectDirectory(startDir, true, parent,
@@ -1415,14 +1415,14 @@ QString KFileDialog::getExistingDirectory(const QString& startDir,
if ( url.isValid() )
return url.path();
- return QString::null;
+ return TQString::null;
#endif
}
-KURL KFileDialog::getImageOpenURL( const QString& startDir, QWidget *parent,
- const QString& caption)
+KURL KFileDialog::getImageOpenURL( const TQString& startDir, TQWidget *parent,
+ const TQString& caption)
{
- QStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading );
+ TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading );
KFileDialog dlg(startDir,
mimetypes.join(" "),
parent, "filedialog", true);
@@ -1439,7 +1439,7 @@ KURL KFileDialog::getImageOpenURL( const QString& startDir, QWidget *parent,
KURL KFileDialog::selectedURL() const
{
- if ( result() == QDialog::Accepted )
+ if ( result() == TQDialog::Accepted )
return d->url;
else
return KURL();
@@ -1448,7 +1448,7 @@ KURL KFileDialog::selectedURL() const
KURL::List KFileDialog::selectedURLs() const
{
KURL::List list;
- if ( result() == QDialog::Accepted ) {
+ if ( result() == TQDialog::Accepted ) {
if ( (ops->mode() & KFile::Files) == KFile::Files )
list = parseSelectedURLs();
else
@@ -1466,7 +1466,7 @@ KURL::List& KFileDialog::parseSelectedURLs() const
d->urlList.clear();
if ( d->filenames.contains( '/' )) { // assume _one_ absolute filename
- static const QString &prot = KGlobal::staticQString(":/");
+ static const TQString &prot = KGlobal::staticQString(":/");
KURL u;
if ( d->filenames.find( prot ) != -1 )
u = d->filenames;
@@ -1485,18 +1485,18 @@ KURL::List& KFileDialog::parseSelectedURLs() const
else
d->urlList = tokenize( d->filenames );
- d->filenames = QString::null; // indicate that we parsed that one
+ d->filenames = TQString::null; // indicate that we parsed that one
return d->urlList;
}
// FIXME: current implementation drawback: a filename can't contain quotes
-KURL::List KFileDialog::tokenize( const QString& line ) const
+KURL::List KFileDialog::tokenize( const TQString& line ) const
{
KURL::List urls;
KURL u( ops->url() );
- QString name;
+ TQString name;
int count = line.contains( '"' );
if ( count == 0 ) { // no " " -> assume one single file
@@ -1508,7 +1508,7 @@ KURL::List KFileDialog::tokenize( const QString& line ) const
}
if ( (count % 2) == 1 ) { // odd number of " -> error
- QWidget *that = const_cast<KFileDialog *>(this);
+ TQWidget *that = const_cast<KFileDialog *>(this);
KMessageBox::sorry(that, i18n("The requested filenames\n"
"%1\n"
"do not appear to be valid;\n"
@@ -1538,9 +1538,9 @@ KURL::List KFileDialog::tokenize( const QString& line ) const
}
-QString KFileDialog::selectedFile() const
+TQString KFileDialog::selectedFile() const
{
- if ( result() == QDialog::Accepted )
+ if ( result() == TQDialog::Accepted )
{
KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget());
if (url.isLocalFile())
@@ -1551,18 +1551,18 @@ QString KFileDialog::selectedFile() const
i18n("Remote Files Not Accepted") );
}
}
- return QString::null;
+ return TQString::null;
}
-QStringList KFileDialog::selectedFiles() const
+TQStringList KFileDialog::selectedFiles() const
{
- QStringList list;
+ TQStringList list;
KURL url;
- if ( result() == QDialog::Accepted ) {
+ if ( result() == TQDialog::Accepted ) {
if ( (ops->mode() & KFile::Files) == KFile::Files ) {
KURL::List urls = parseSelectedURLs();
- QValueListConstIterator<KURL> it = urls.begin();
+ TQValueListConstIterator<KURL> it = urls.begin();
while ( it != urls.end() ) {
url = KIO::NetAccess::mostLocalURL(*it,topLevelWidget());
if ( url.isLocalFile() )
@@ -1585,12 +1585,12 @@ KURL KFileDialog::baseURL() const
return ops->url();
}
-QString KFileDialog::getSaveFileName(const QString& dir, const QString& filter,
- QWidget *parent,
- const QString& caption)
+TQString KFileDialog::getSaveFileName(const TQString& dir, const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KFileDialog dlg( specialDir ? dir : QString::null, filter, parent, "filedialog", true);
+ KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true);
if ( !specialDir )
dlg.setSelection( dir ); // may also be a filename
@@ -1599,20 +1599,20 @@ QString KFileDialog::getSaveFileName(const QString& dir, const QString& filter,
dlg.exec();
- QString filename = dlg.selectedFile();
+ TQString filename = dlg.selectedFile();
if (!filename.isEmpty())
KRecentDocument::add(filename);
return filename;
}
-QString KFileDialog::getSaveFileNameWId(const QString& dir, const QString& filter,
+TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& filter,
WId parent_id,
- const QString& caption)
+ const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- QWidget* parent = QWidget::find( parent_id );
- KFileDialog dlg( specialDir ? dir : QString::null, filter, parent, "filedialog", true);
+ TQWidget* parent = TQWidget::find( parent_id );
+ KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true);
#ifdef Q_WS_X11
if( parent == NULL && parent_id != 0 )
XSetTransientForHint(qt_xdisplay(), dlg.winId(), parent_id);
@@ -1628,18 +1628,18 @@ QString KFileDialog::getSaveFileNameWId(const QString& dir, const QString& filte
dlg.exec();
- QString filename = dlg.selectedFile();
+ TQString filename = dlg.selectedFile();
if (!filename.isEmpty())
KRecentDocument::add(filename);
return filename;
}
-KURL KFileDialog::getSaveURL(const QString& dir, const QString& filter,
- QWidget *parent, const QString& caption)
+KURL KFileDialog::getSaveURL(const TQString& dir, const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KFileDialog dlg(specialDir ? dir : QString::null, filter, parent, "filedialog", true);
+ KFileDialog dlg(specialDir ? dir : TQString::null, filter, parent, "filedialog", true);
if ( !specialDir )
dlg.setSelection( dir ); // may also be a filename
@@ -1690,12 +1690,12 @@ KFile::Mode KFileDialog::mode() const
}
-void KFileDialog::readConfig( KConfig *kc, const QString& group )
+void KFileDialog::readConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
@@ -1736,17 +1736,17 @@ void KFileDialog::readConfig( KConfig *kc, const QString& group )
if (w1 < w2)
setMinimumWidth(w2);
- QSize size = configDialogSize( group );
+ TQSize size = configDialogSize( group );
resize( size );
kc->setGroup( oldGroup );
}
-void KFileDialog::writeConfig( KConfig *kc, const QString& group )
+void KFileDialog::writeConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
@@ -1765,14 +1765,14 @@ void KFileDialog::writeConfig( KConfig *kc, const QString& group )
void KFileDialog::readRecentFiles( KConfig *kc )
{
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
kc->setGroup( ConfigGroup );
locationEdit->setMaxItems( kc->readNumEntry( RecentFilesNumber,
DefaultRecentURLsNumber ) );
locationEdit->setURLs( kc->readPathListEntry( RecentFiles ),
KURLComboBox::RemoveBottom );
- locationEdit->insertItem( QString::null, 0 ); // dummy item without pixmap
+ locationEdit->insertItem( TQString::null, 0 ); // dummy item without pixmap
locationEdit->setCurrentItem( 0 );
kc->setGroup( oldGroup );
@@ -1780,7 +1780,7 @@ void KFileDialog::readRecentFiles( KConfig *kc )
void KFileDialog::saveRecentFiles( KConfig *kc )
{
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
kc->setGroup( ConfigGroup );
kc->writePathEntry( RecentFiles, locationEdit->urls() );
@@ -1858,13 +1858,13 @@ void KFileDialog::slotAutoSelectExtClicked()
updateLocationEditExtension (d->extension /* extension hasn't changed */);
}
-static QString getExtensionFromPatternList (const QStringList &patternList)
+static TQString getExtensionFromPatternList (const TQStringList &patternList)
{
- QString ret;
+ TQString ret;
kdDebug (kfile_area) << "\tgetExtension " << patternList << endl;
- QStringList::ConstIterator patternListEnd = patternList.end ();
- for (QStringList::ConstIterator it = patternList.begin ();
+ TQStringList::ConstIterator patternListEnd = patternList.end ();
+ for (TQStringList::ConstIterator it = patternList.begin ();
it != patternListEnd;
it++)
{
@@ -1889,9 +1889,9 @@ static QString getExtensionFromPatternList (const QStringList &patternList)
return ret;
}
-static QString stripUndisplayable (const QString &string)
+static TQString stripUndisplayable (const TQString &string)
{
- QString ret = string;
+ TQString ret = string;
ret.remove (':');
ret.remove ('&');
@@ -1900,7 +1900,7 @@ static QString stripUndisplayable (const QString &string)
}
-QString KFileDialog::currentFilterExtension (void)
+TQString KFileDialog::currentFilterExtension (void)
{
return d->extension;
}
@@ -1917,8 +1917,8 @@ void KFileDialog::updateAutoSelectExtension (void)
//
kdDebug (kfile_area) << "Figure out an extension: " << endl;
- QString lastExtension = d->extension;
- d->extension = QString::null;
+ TQString lastExtension = d->extension;
+ d->extension = TQString::null;
// Automatically Select Extension is only valid if the user is _saving_ a _file_
if ((operationMode () == Saving) && (mode () & KFile::File))
@@ -1927,13 +1927,13 @@ void KFileDialog::updateAutoSelectExtension (void)
// Get an extension from the filter
//
- QString filter = currentFilter ();
+ TQString filter = currentFilter ();
if (!filter.isEmpty ())
{
// e.g. "*.cpp"
if (filter.find ('/') < 0)
{
- d->extension = getExtensionFromPatternList (QStringList::split (" ", filter)).lower ();
+ d->extension = getExtensionFromPatternList (TQStringList::split (" ", filter)).lower ();
kdDebug (kfile_area) << "\tsetFilter-style: pattern ext=\'"
<< d->extension << "\'" << endl;
}
@@ -1943,7 +1943,7 @@ void KFileDialog::updateAutoSelectExtension (void)
KMimeType::Ptr mime = KMimeType::mimeType (filter);
// first try X-KDE-NativeExtension
- QString nativeExtension = mime->property ("X-KDE-NativeExtension").toString ();
+ TQString nativeExtension = mime->property ("X-KDE-NativeExtension").toString ();
if (nativeExtension.at (0) == '.')
{
d->extension = nativeExtension.lower ();
@@ -1966,7 +1966,7 @@ void KFileDialog::updateAutoSelectExtension (void)
// GUI: checkbox
//
- QString whatsThisExtension;
+ TQString whatsThisExtension;
if (!d->extension.isEmpty ())
{
// remember: sync any changes to the string with below
@@ -1986,9 +1986,9 @@ void KFileDialog::updateAutoSelectExtension (void)
d->autoSelectExtCheckBox->setEnabled (false);
}
- const QString locationLabelText = stripUndisplayable (d->locationLabel->text ());
- const QString filterLabelText = stripUndisplayable (d->filterLabel->text ());
- QWhatsThis::add (d->autoSelectExtCheckBox,
+ const TQString locationLabelText = stripUndisplayable (d->locationLabel->text ());
+ const TQString filterLabelText = stripUndisplayable (d->filterLabel->text ());
+ TQWhatsThis::add (d->autoSelectExtCheckBox,
"<qt>" +
i18n (
"This option enables some convenient features for "
@@ -2038,12 +2038,12 @@ void KFileDialog::updateAutoSelectExtension (void)
// Updates the extension of the filename specified in locationEdit if the
// Automatically Select Extension feature is enabled.
// (this prevents you from accidently saving "file.kwd" as RTF, for example)
-void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
+void KFileDialog::updateLocationEditExtension (const TQString &lastExtension)
{
if (!d->autoSelectExtCheckBox->isChecked () || d->extension.isEmpty ())
return;
- QString urlStr = locationEdit->currentText ();
+ TQString urlStr = locationEdit->currentText ();
if (urlStr.isEmpty ())
return;
@@ -2051,7 +2051,7 @@ void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
kdDebug (kfile_area) << "updateLocationEditExtension (" << url << ")" << endl;
const int fileNameOffset = urlStr.findRev ('/') + 1;
- QString fileName = urlStr.mid (fileNameOffset);
+ TQString fileName = urlStr.mid (fileNameOffset);
const int dot = fileName.findRev ('.');
const int len = fileName.length ();
@@ -2088,7 +2088,7 @@ void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
fileName.truncate (dot);
// add extension
- const QString newText = urlStr.left (fileNameOffset) + fileName + d->extension;
+ const TQString newText = urlStr.left (fileNameOffset) + fileName + d->extension;
if ( newText != locationEdit->currentText() )
{
locationEdit->setCurrentText (urlStr.left (fileNameOffset) + fileName + d->extension);
@@ -2102,7 +2102,7 @@ void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
void KFileDialog::updateFilter ()
{
if ((operationMode() == Saving) && (mode() & KFile::File) ) {
- const QString urlStr = locationEdit->currentText ();
+ const TQString urlStr = locationEdit->currentText ();
if (urlStr.isEmpty ())
return;
@@ -2122,7 +2122,7 @@ void KFileDialog::appendExtension (KURL &url)
if (!d->autoSelectExtCheckBox->isChecked () || d->extension.isEmpty ())
return;
- QString fileName = url.fileName ();
+ TQString fileName = url.fileName ();
if (fileName.isEmpty ())
return;
@@ -2178,8 +2178,8 @@ void KFileDialog::addToRecentDocuments()
int m = ops->mode();
if ( m & KFile::LocalOnly ) {
- QStringList files = selectedFiles();
- QStringList::ConstIterator it = files.begin();
+ TQStringList files = selectedFiles();
+ TQStringList::ConstIterator it = files.begin();
for ( ; it != files.end(); ++it )
KRecentDocument::add( *it );
}
@@ -2199,7 +2199,7 @@ KActionCollection * KFileDialog::actionCollection() const
return ops->actionCollection();
}
-void KFileDialog::keyPressEvent( QKeyEvent *e )
+void KFileDialog::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Escape )
{
@@ -2222,7 +2222,7 @@ void KFileDialog::toggleSpeedbar( bool show )
// check to see if they have a home item defined, if not show the home button
KURLBarItem *urlItem = static_cast<KURLBarItem*>( d->urlBar->listBox()->firstItem() );
KURL homeURL;
- homeURL.setPath( QDir::homeDirPath() );
+ homeURL.setPath( TQDir::homeDirPath() );
while ( urlItem )
{
if ( homeURL.equals( urlItem->url(), true ) )
@@ -2256,15 +2256,15 @@ void KFileDialog::toggleBookmarks(bool show)
}
d->bookmarkHandler = new KFileBookmarkHandler( this );
- connect( d->bookmarkHandler, SIGNAL( openURL( const QString& )),
- SLOT( enterURL( const QString& )));
+ connect( d->bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )),
+ TQT_SLOT( enterURL( const TQString& )));
- toolbar->insertButton(QString::fromLatin1("bookmark"),
+ toolbar->insertButton(TQString::fromLatin1("bookmark"),
(int)HOTLIST_BUTTON, true,
i18n("Bookmarks"), 5);
toolbar->getButton(HOTLIST_BUTTON)->setPopup(d->bookmarkHandler->menu(),
true);
- QWhatsThis::add(toolbar->getButton(HOTLIST_BUTTON),
+ TQWhatsThis::add(toolbar->getButton(HOTLIST_BUTTON),
i18n("<qt>This button allows you to bookmark specific locations. "
"Click on this button to open the bookmark menu where you may add, "
"edit or select a bookmark.<p>"
@@ -2296,12 +2296,12 @@ void KFileDialog::initStatic()
}
// static
-KURL KFileDialog::getStartURL( const QString& startDir,
- QString& recentDirClass )
+KURL KFileDialog::getStartURL( const TQString& startDir,
+ TQString& recentDirClass )
{
initStatic();
- recentDirClass = QString::null;
+ recentDirClass = TQString::null;
KURL ret;
bool useDefaultStartDir = startDir.isEmpty();
@@ -2314,7 +2314,7 @@ KURL KFileDialog::getStartURL( const QString& startDir,
}
else
{
- ret = KCmdLineArgs::makeURL( QFile::encodeName(startDir) );
+ ret = KCmdLineArgs::makeURL( TQFile::encodeName(startDir) );
// If we won't be able to list it (e.g. http), then use default
if ( !KProtocolInfo::supportsListing( ret ) )
useDefaultStartDir = true;
@@ -2326,15 +2326,15 @@ KURL KFileDialog::getStartURL( const QString& startDir,
if (lastDirectory->isEmpty()) {
lastDirectory->setPath(KGlobalSettings::documentPath());
KURL home;
- home.setPath( QDir::homeDirPath() );
+ home.setPath( TQDir::homeDirPath() );
// if there is no docpath set (== home dir), we prefer the current
// directory over it. We also prefer the homedir when our CWD is
// different from our homedirectory or when the document dir
// does not exist
if ( lastDirectory->path(+1) == home.path(+1) ||
- QDir::currentDirPath() != QDir::homeDirPath() ||
- !QDir(lastDirectory->path(+1)).exists() )
- lastDirectory->setPath(QDir::currentDirPath());
+ TQDir::currentDirPath() != TQDir::homeDirPath() ||
+ !TQDir(lastDirectory->path(+1)).exists() )
+ lastDirectory->setPath(TQDir::currentDirPath());
}
ret = *lastDirectory;
}
@@ -2352,7 +2352,7 @@ void KFileDialog::setStartDir( const KURL& directory )
void KFileDialog::setNonExtSelection()
{
// Enhanced rename: Don't highlight the file extension.
- QString pattern, filename = locationEdit->currentText().stripWhiteSpace();
+ TQString pattern, filename = locationEdit->currentText().stripWhiteSpace();
KServiceTypeFactory::self()->findFromPattern( filename, &pattern );
if ( !pattern.isEmpty() && pattern.at( 0 ) == '*' && pattern.find( '*' , 1 ) == -1 )
diff --git a/kio/kfile/kfiledialog.h b/kio/kfile/kfiledialog.h
index e90338608..b2db9183a 100644
--- a/kio/kfile/kfiledialog.h
+++ b/kio/kfile/kfiledialog.h
@@ -25,7 +25,7 @@
#ifndef __KFILEDIALOG_H__
#define __KFILEDIALOG_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <kdialogbase.h>
#include <kfile.h>
@@ -58,7 +58,7 @@ struct KFileDialogPrivate;
* select files and directories.
*
* The widget can be used as a drop in replacement for the
- * QFileDialog widget, but has greater functionality and a nicer GUI.
+ * TQFileDialog widget, but has greater functionality and a nicer GUI.
*
* You will usually want to use one of the static methods
* getOpenFileName(), getSaveFileName(), getOpenURL()
@@ -98,7 +98,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -116,15 +116,15 @@ public:
* See setFilter() for details on how to use this argument.
*
*/
- KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char *name,
+ KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char *name,
bool modal);
/**
* Constructs a file dialog.
*
* The parameters here are identical to the first constructor except
- * for the addition of a QWidget parameter.
+ * for the addition of a TQWidget parameter.
*
* Historical note: The original version of KFileDialog did not have this extra
* parameter. It was added later, and, in order to maintain binary compatibility,
@@ -132,7 +132,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -156,9 +156,9 @@ public:
* @param modal Whether to create a modal dialog or not
* @since 3.1
*/
- KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char *name,
- bool modal, QWidget* widget);
+ KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char *name,
+ bool modal, TQWidget* widget);
/**
@@ -185,12 +185,12 @@ public:
* Returns the full path of the selected file in the local filesystem.
* (Local files only)
*/
- QString selectedFile() const;
+ TQString selectedFile() const;
/**
* Returns a list of all selected local files.
*/
- QStringList selectedFiles() const;
+ TQStringList selectedFiles() const;
/**
* Sets the directory to view.
@@ -206,7 +206,7 @@ public:
*
* This takes absolute URLs and relative file names.
*/
- void setSelection(const QString& name);
+ void setSelection(const TQString& name);
/**
* Sets the operational mode of the filedialog to @p Saving, @p Opening
@@ -289,7 +289,7 @@ public:
* @see filterChanged
* @see setMimeFilter
*/
- void setFilter(const QString& filter);
+ void setFilter(const TQString& filter);
/**
* Returns the current filter as entered by the user or one of the
@@ -298,7 +298,7 @@ public:
* @see setFilter()
* @see filterChanged()
*/
- QString currentFilter() const;
+ TQString currentFilter() const;
/**
* Sets the filter up to specify the output type.
@@ -310,7 +310,7 @@ public:
* Do not use in conjunction with setFilter()
* @deprecated
*/
- void setFilterMimeType(const QString &label, const KMimeType::List &types, const KMimeType::Ptr &defaultType) KDE_DEPRECATED;
+ void setFilterMimeType(const TQString &label, const KMimeType::List &types, const KMimeType::Ptr &defaultType) KDE_DEPRECATED;
/**
* Returns the mimetype for the desired output format.
@@ -333,8 +333,8 @@ public:
*
* Do not use in conjunction with setFilter()
*/
- void setMimeFilter( const QStringList& types,
- const QString& defaultType = QString::null );
+ void setMimeFilter( const TQStringList& types,
+ const TQString& defaultType = TQString::null );
/**
* The mimetype for the desired output format.
@@ -344,7 +344,7 @@ public:
*
* @see setMimeFilter()
*/
- QString currentMimeFilter() const;
+ TQString currentMimeFilter() const;
/**
* Clears any mime- or namefilter. Does not reload the directory.
@@ -357,7 +357,7 @@ public:
*
* In this mode
* the dialog is split and the right part contains your widget.
- * This widget has to inherit QWidget and it has to implement
+ * This widget has to inherit TQWidget and it has to implement
* a slot showPreview(const KURL &); which is called
* every time the file changes. You may want to look at
* koffice/lib/kofficecore/koFilterManager.cc for some hints :)
@@ -365,7 +365,7 @@ public:
* Ownership is transferred to KFileDialog. You need to create the
* preview-widget with "new", i.e. on the heap.
*/
- void setPreviewWidget(const QWidget *w) KDE_DEPRECATED;
+ void setPreviewWidget(const TQWidget *w) KDE_DEPRECATED;
/**
* Adds a preview widget and enters the preview mode.
@@ -389,7 +389,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -405,23 +405,23 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QString getOpenFileName(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static TQString getOpenFileName(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
- * Use this version only if you have no QWidget available as
+ * Use this version only if you have no TQWidget available as
* parent widget. This can be the case if the parent widget is
* a widget in another process or if the parent widget is a
* non-Qt widget. For example, in a GTK program.
*
* @since 3.4
*/
- static QString getOpenFileNameWId(const QString& startDir,
- const QString& filter,
- WId parent_id, const QString& caption);
+ static TQString getOpenFileNameWId(const TQString& startDir,
+ const TQString& filter,
+ WId parent_id, const TQString& caption);
/**
* Creates a modal file dialog and returns the selected
@@ -432,7 +432,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -448,10 +448,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QStringList getOpenFileNames(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static TQStringList getOpenFileNames(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
@@ -464,7 +464,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -480,10 +480,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL getOpenURL(const QString& startDir = QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static KURL getOpenURL(const TQString& startDir = TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
@@ -496,7 +496,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -512,10 +512,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL::List getOpenURLs(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static KURL::List getOpenURLs(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
@@ -530,7 +530,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -546,20 +546,20 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QString getSaveFileName(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static TQString getSaveFileName(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.4
*/
- static QString getSaveFileNameWId(const QString& dir, const QString& filter,
+ static TQString getSaveFileNameWId(const TQString& dir, const TQString& filter,
WId parent_id,
- const QString& caption);
+ const TQString& caption);
/**
* Creates a modal file dialog and returns the selected
@@ -572,7 +572,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -588,10 +588,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL getSaveURL(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static KURL getSaveURL(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
@@ -600,7 +600,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -612,9 +612,9 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QString getExistingDirectory(const QString & startDir = QString::null,
- QWidget * parent = 0,
- const QString& caption= QString::null);
+ static TQString getExistingDirectory(const TQString & startDir = TQString::null,
+ TQWidget * parent = 0,
+ const TQString& caption= TQString::null);
/**
* Creates a modal file dialog and returns the selected
@@ -625,7 +625,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -638,16 +638,16 @@ public:
* @param caption The name of the dialog widget.
* @since 3.1
*/
- static KURL getExistingURL(const QString & startDir = QString::null,
- QWidget * parent = 0,
- const QString& caption= QString::null);
+ static KURL getExistingURL(const TQString & startDir = TQString::null,
+ TQWidget * parent = 0,
+ const TQString& caption= TQString::null);
/**
* Creates a modal file dialog with an image previewer and returns the
* selected url or an empty string if none was chosen.
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -659,9 +659,9 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL getImageOpenURL( const QString& startDir = QString::null,
- QWidget *parent = 0,
- const QString& caption = QString::null );
+ static KURL getImageOpenURL( const TQString& startDir = TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption = TQString::null );
virtual void show();
/**
@@ -705,7 +705,7 @@ public:
* Most useful if you want to make clear what
* the location is used for.
*/
- void setLocationLabel(const QString& text);
+ void setLocationLabel(const TQString& text);
/**
* Returns a pointer to the toolbar.
@@ -714,7 +714,7 @@ public:
* items into it, e.g.:
* \code
* yourAction = new KAction( i18n("Your Action"), 0,
- * this, SLOT( yourSlot() ),
+ * this, TQT_SLOT( yourSlot() ),
* this, "action name" );
* yourAction->plug( kfileDialog->toolBar() );
* \endcode
@@ -774,7 +774,7 @@ public:
* KDirSelectDialog).
* @since 3.1
*/
- static KURL getStartURL( const QString& startDir, QString& recentDirClass );
+ static KURL getStartURL( const TQString& startDir, TQString& recentDirClass );
/**
* @internal
@@ -790,12 +790,12 @@ signals:
* and call selectedFile(), selectedFiles(),
* selectedURL() or selectedURLs().
*/
- void fileSelected(const QString&);
+ void fileSelected(const TQString&);
/**
* Emitted when the user highlights a file.
*/
- void fileHighlighted(const QString&);
+ void fileHighlighted(const TQString&);
/**
* Emitted when the user hilights one or more files in multiselection mode.
@@ -817,7 +817,7 @@ signals:
* @see setFilter()
* @see currentFilter()
*/
- void filterChanged( const QString& filter );
+ void filterChanged( const TQString& filter );
protected:
KToolBar *toolbar;
@@ -831,13 +831,13 @@ protected:
/**
* Reimplemented to animate the cancel button.
*/
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void keyPressEvent( TQKeyEvent *e );
/**
* Perform basic initialization tasks. Called by constructors.
* @since 3.1
*/
- void init(const QString& startDir, const QString& filter, QWidget* widget);
+ void init(const TQString& startDir, const TQString& filter, TQWidget* widget);
/**
* rebuild geometry management.
@@ -854,12 +854,12 @@ protected:
/**
* Reads configuration and applies it (size, recent directories, ...)
*/
- virtual void readConfig( KConfig *, const QString& group = QString::null );
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
/**
* Saves the current configuration
*/
- virtual void writeConfig( KConfig *, const QString& group = QString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null );
/**
* Reads the recent used files and inserts them into the location combobox
@@ -877,21 +877,21 @@ protected:
* an empty list will be returned. Otherwise, all items enclosed in " "
* will be returned as correct urls.
*/
- KURL::List tokenize(const QString& line) const;
+ KURL::List tokenize(const TQString& line) const;
/**
* Returns the absolute version of the URL specified in locationEdit.
* @since 3.2
*/
- KURL getCompleteURL(const QString&);
+ KURL getCompleteURL(const TQString&);
/**
* Returns the filename extension associated with the currentFilter().
- * QString::null is returned if an extension is not available or if
+ * TQString::null is returned if an extension is not available or if
* operationMode() != Saving.
* @since 3.2
*/
- QString currentFilterExtension();
+ TQString currentFilterExtension();
/**
* Updates the currentFilterExtension and the availability of the
@@ -907,8 +907,8 @@ protected:
protected slots:
void urlEntered( const KURL& );
void enterURL( const KURL& url );
- void enterURL( const QString& url );
- void locationActivated( const QString& url );
+ void enterURL( const TQString& url );
+ void locationActivated( const TQString& url );
/**
* @deprecated,
@@ -919,12 +919,12 @@ protected slots:
* @deprecated
*/
// ### remove in KDE4
- void pathComboChanged( const QString& );
+ void pathComboChanged( const TQString& );
/**
* @deprecated
*/
// ### remove in KDE4
- void dirCompletion( const QString& );
+ void dirCompletion( const TQString& );
void slotFilterChanged();
void fileHighlighted(const KFileItem *i);
@@ -932,7 +932,7 @@ protected slots:
void slotStatResult(KIO::Job* job);
void slotLoadingFinished();
- void fileCompletion( const QString& );
+ void fileCompletion( const TQString& );
/**
* @since 3.1
*/
@@ -957,17 +957,17 @@ protected slots:
void initSpeedbar();
private slots:
- void slotLocationChanged( const QString& text );
+ void slotLocationChanged( const TQString& text );
private:
KFileDialog(const KFileDialog&);
KFileDialog operator=(const KFileDialog&);
- void setLocationText( const QString& text );
+ void setLocationText( const TQString& text );
void updateLocationWhatsThis();
void appendExtension(KURL &url);
- void updateLocationEditExtension(const QString &);
+ void updateLocationEditExtension(const TQString &);
void updateFilter();
static void initStatic();
diff --git a/kio/kfile/kfilefiltercombo.cpp b/kio/kfile/kfilefiltercombo.cpp
index 747a738fe..c865cc0e1 100644
--- a/kio/kfile/kfilefiltercombo.cpp
+++ b/kio/kfile/kfilefiltercombo.cpp
@@ -40,18 +40,18 @@ public:
bool hasAllSupportedFiles;
// true when setMimeFilter was called
bool isMimeFilter;
- QString lastFilter;
- QString defaultFilter;
+ TQString lastFilter;
+ TQString defaultFilter;
};
-KFileFilterCombo::KFileFilterCombo( QWidget *parent, const char *name)
+KFileFilterCombo::KFileFilterCombo( TQWidget *parent, const char *name)
: KComboBox(true, parent, name), d( new KFileFilterComboPrivate )
{
setTrapReturnKey( true );
setInsertionPolicy(NoInsertion);
- connect( this, SIGNAL( activated( int )), this, SIGNAL( filterChanged() ));
- connect( this, SIGNAL( returnPressed() ), this, SIGNAL( filterChanged() ));
- connect( this, SIGNAL( filterChanged() ), SLOT( slotFilterChanged() ));
+ connect( this, TQT_SIGNAL( activated( int )), this, TQT_SIGNAL( filterChanged() ));
+ connect( this, TQT_SIGNAL( returnPressed() ), this, TQT_SIGNAL( filterChanged() ));
+ connect( this, TQT_SIGNAL( filterChanged() ), TQT_SLOT( slotFilterChanged() ));
m_allTypes = false;
}
@@ -60,14 +60,14 @@ KFileFilterCombo::~KFileFilterCombo()
delete d;
}
-void KFileFilterCombo::setFilter(const QString& filter)
+void KFileFilterCombo::setFilter(const TQString& filter)
{
clear();
filters.clear();
d->hasAllSupportedFiles = false;
if (!filter.isEmpty()) {
- QString tmp = filter;
+ TQString tmp = filter;
int index = tmp.find('\n');
while (index > 0) {
filters.append(tmp.left(index));
@@ -79,8 +79,8 @@ void KFileFilterCombo::setFilter(const QString& filter)
else
filters.append( d->defaultFilter );
- QStringList::ConstIterator it;
- QStringList::ConstIterator end(filters.end());
+ TQStringList::ConstIterator it;
+ TQStringList::ConstIterator end(filters.end());
for (it = filters.begin(); it != end; ++it) {
int tab = (*it).find('|');
insertItem((tab < 0) ? *it :
@@ -91,9 +91,9 @@ void KFileFilterCombo::setFilter(const QString& filter)
d->isMimeFilter = false;
}
-QString KFileFilterCombo::currentFilter() const
+TQString KFileFilterCombo::currentFilter() const
{
- QString f = currentText();
+ TQString f = currentText();
if (f == text(currentItem())) { // user didn't edit the text
f = *filters.at(currentItem());
if ( d->isMimeFilter || (currentItem() == 0 && d->hasAllSupportedFiles) ) {
@@ -108,10 +108,10 @@ QString KFileFilterCombo::currentFilter() const
return f.left(tab);
}
-void KFileFilterCombo::setCurrentFilter( const QString& filter )
+void KFileFilterCombo::setCurrentFilter( const TQString& filter )
{
int pos = 0;
- for( QStringList::ConstIterator it = filters.begin();
+ for( TQStringList::ConstIterator it = filters.begin();
it != filters.end();
++it, ++pos ) {
if( *it == filter ) {
@@ -124,19 +124,19 @@ void KFileFilterCombo::setCurrentFilter( const QString& filter )
filterChanged();
}
-void KFileFilterCombo::setMimeFilter( const QStringList& types,
- const QString& defaultType )
+void KFileFilterCombo::setMimeFilter( const TQStringList& types,
+ const TQString& defaultType )
{
clear();
filters.clear();
- QString delim = QString::fromLatin1(", ");
+ TQString delim = TQString::fromLatin1(", ");
d->hasAllSupportedFiles = false;
m_allTypes = defaultType.isEmpty() && (types.count() > 1);
- QString allComments, allTypes;
+ TQString allComments, allTypes;
int i = 0;
- for(QStringList::ConstIterator it = types.begin(); it != types.end(); ++it, ++i)
+ for(TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it, ++i)
{
if ( m_allTypes && it != types.begin() ) {
allComments += delim;
@@ -177,9 +177,9 @@ void KFileFilterCombo::slotFilterChanged()
d->lastFilter = currentText();
}
-bool KFileFilterCombo::eventFilter( QObject *o, QEvent *e )
+bool KFileFilterCombo::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o == lineEdit() && e->type() == QEvent::FocusOut ) {
+ if ( o == lineEdit() && e->type() == TQEvent::FocusOut ) {
if ( currentText() != d->lastFilter )
emit filterChanged();
}
@@ -187,12 +187,12 @@ bool KFileFilterCombo::eventFilter( QObject *o, QEvent *e )
return KComboBox::eventFilter( o, e );
}
-void KFileFilterCombo::setDefaultFilter( const QString& filter )
+void KFileFilterCombo::setDefaultFilter( const TQString& filter )
{
d->defaultFilter = filter;
}
-QString KFileFilterCombo::defaultFilter() const
+TQString KFileFilterCombo::defaultFilter() const
{
return d->defaultFilter;
}
diff --git a/kio/kfile/kfilefiltercombo.h b/kio/kfile/kfilefiltercombo.h
index 9b7c103bf..d1f9cbf62 100644
--- a/kio/kfile/kfilefiltercombo.h
+++ b/kio/kfile/kfilefiltercombo.h
@@ -20,8 +20,8 @@
#ifndef KFILEFILTERCOMBO_H
#define KFILEFILTERCOMBO_H
-#include <qstringlist.h>
-#include <qptrdict.h>
+#include <tqstringlist.h>
+#include <tqptrdict.h>
#include <kcombobox.h>
#include <kmimetype.h>
@@ -33,31 +33,31 @@ class KIO_EXPORT KFileFilterCombo : public KComboBox
Q_OBJECT
public:
- KFileFilterCombo(QWidget *parent= 0, const char *name= 0);
+ KFileFilterCombo(TQWidget *parent= 0, const char *name= 0);
~KFileFilterCombo();
- void setFilter(const QString& filter);
+ void setFilter(const TQString& filter);
/**
* @returns the current filter, either something like "*.cpp *.h"
* or the current mimetype, like "text/html", or a list of those, like
" "text/html text/plain image/png", all separated with one space.
*/
- QString currentFilter() const;
+ TQString currentFilter() const;
/**
* Sets the current filter. Filter must match one of the filter items
* passed before to this widget.
* @since 3.4
*/
- void setCurrentFilter( const QString& filter );
+ void setCurrentFilter( const TQString& filter );
/**
* Sets a list of mimetypes.
* If @p defaultType is set, it will be set as the current item.
* Otherwise, a first item showing all the mimetypes will be created.
*/
- void setMimeFilter( const QStringList& types, const QString& defaultType );
+ void setMimeFilter( const TQStringList& types, const TQString& defaultType );
/**
* @return true if the filter's first item is the list of all mimetypes
@@ -72,19 +72,19 @@ class KIO_EXPORT KFileFilterCombo : public KComboBox
* By default, this is set to i18n("*|All Files")
* @see defaultFilter
*/
- void setDefaultFilter( const QString& filter );
+ void setDefaultFilter( const TQString& filter );
/**
* @return the default filter, used when an empty filter is set.
* @see setDefaultFilter
*/
- QString defaultFilter() const;
+ TQString defaultFilter() const;
protected:
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
// KDE4: those variables are private. filters() was added
- QStringList filters;
+ TQStringList filters;
bool m_allTypes;
signals:
diff --git a/kio/kfile/kfileiconview.cpp b/kio/kfile/kfileiconview.cpp
index 0668e91e2..4f0dbf9e1 100644
--- a/kio/kfile/kfileiconview.cpp
+++ b/kio/kfile/kfileiconview.cpp
@@ -19,14 +19,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfontmetrics.h>
-#include <qkeycode.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqfontmetrics.h>
+#include <tqkeycode.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kaction.h>
#include <kapplication.h>
@@ -60,37 +60,37 @@ public:
noArrangement = false;
ignoreMaximumSize = false;
smallColumns = new KRadioAction( i18n("Small Icons"), 0, parent,
- SLOT( slotSmallColumns() ),
+ TQT_SLOT( slotSmallColumns() ),
parent->actionCollection(),
"small columns" );
largeRows = new KRadioAction( i18n("Large Icons"), 0, parent,
- SLOT( slotLargeRows() ),
+ TQT_SLOT( slotLargeRows() ),
parent->actionCollection(),
"large rows" );
- smallColumns->setExclusiveGroup(QString::fromLatin1("IconView mode"));
- largeRows->setExclusiveGroup(QString::fromLatin1("IconView mode"));
+ smallColumns->setExclusiveGroup(TQString::fromLatin1("IconView mode"));
+ largeRows->setExclusiveGroup(TQString::fromLatin1("IconView mode"));
previews = new KToggleAction( i18n("Thumbnail Previews"), 0,
parent->actionCollection(),
"show previews" );
- zoomIn = KStdAction::zoomIn( parent, SLOT( zoomIn() ),
+ zoomIn = KStdAction::zoomIn( parent, TQT_SLOT( zoomIn() ),
parent->actionCollection(), "zoomIn" );
- zoomOut = KStdAction::zoomOut( parent, SLOT( zoomOut() ),
+ zoomOut = KStdAction::zoomOut( parent, TQT_SLOT( zoomOut() ),
parent->actionCollection(), "zoomOut" );
previews->setGroup("previews");
zoomIn->setGroup("previews");
zoomOut->setGroup("previews");
- connect( previews, SIGNAL( toggled( bool )),
- parent, SLOT( slotPreviewsToggled( bool )));
+ connect( previews, TQT_SIGNAL( toggled( bool )),
+ parent, TQT_SLOT( slotPreviewsToggled( bool )));
- connect( &previewTimer, SIGNAL( timeout() ),
- parent, SLOT( showPreviews() ));
- connect( &autoOpenTimer, SIGNAL( timeout() ),
- parent, SLOT( slotAutoOpen() ));
+ connect( &previewTimer, TQT_SIGNAL( timeout() ),
+ parent, TQT_SLOT( showPreviews() ));
+ connect( &autoOpenTimer, TQT_SIGNAL( timeout() ),
+ parent, TQT_SLOT( slotAutoOpen() ));
}
~KFileIconViewPrivate() {
@@ -103,15 +103,15 @@ public:
KToggleAction *previews;
KIO::PreviewJob *job;
KFileIconViewItem *dropItem;
- QTimer previewTimer;
- QTimer autoOpenTimer;
- QStringList previewMimeTypes;
+ TQTimer previewTimer;
+ TQTimer autoOpenTimer;
+ TQStringList previewMimeTypes;
int previewIconSize;
bool noArrangement :1;
bool ignoreMaximumSize :1;
};
-KFileIconView::KFileIconView(QWidget *parent, const char *name)
+KFileIconView::KFileIconView(TQWidget *parent, const char *name)
: KIconView(parent, name), KFileView()
{
d = new KFileIconViewPrivate( this );
@@ -127,51 +127,51 @@ KFileIconView::KFileIconView(QWidget *parent, const char *name)
setItemsMovable( false );
setMode( KIconView::Select );
KIconView::setSorting( true );
- // as long as QIconView only shows tooltips when the cursor is over the
+ // as long as TQIconView only shows tooltips when the cursor is over the
// icon (and not the text), we have to create our own tooltips
setShowToolTips( false );
slotSmallColumns();
d->smallColumns->setChecked( true );
- connect( this, SIGNAL( returnPressed(QIconViewItem *) ),
- SLOT( slotActivate( QIconViewItem *) ) );
+ connect( this, TQT_SIGNAL( returnPressed(TQIconViewItem *) ),
+ TQT_SLOT( slotActivate( TQIconViewItem *) ) );
// we want single click _and_ double click (as convenience)
- connect( this, SIGNAL( clicked(QIconViewItem *, const QPoint&) ),
- SLOT( selected( QIconViewItem *) ) );
- connect( this, SIGNAL( doubleClicked(QIconViewItem *, const QPoint&) ),
- SLOT( slotActivate( QIconViewItem *) ) );
-
- connect( this, SIGNAL( onItem( QIconViewItem * ) ),
- SLOT( showToolTip( QIconViewItem * ) ) );
- connect( this, SIGNAL( onViewport() ),
- SLOT( removeToolTip() ) );
- connect( this, SIGNAL( contextMenuRequested(QIconViewItem*,const QPoint&)),
- SLOT( slotActivateMenu( QIconViewItem*, const QPoint& ) ) );
+ connect( this, TQT_SIGNAL( clicked(TQIconViewItem *, const TQPoint&) ),
+ TQT_SLOT( selected( TQIconViewItem *) ) );
+ connect( this, TQT_SIGNAL( doubleClicked(TQIconViewItem *, const TQPoint&) ),
+ TQT_SLOT( slotActivate( TQIconViewItem *) ) );
+
+ connect( this, TQT_SIGNAL( onItem( TQIconViewItem * ) ),
+ TQT_SLOT( showToolTip( TQIconViewItem * ) ) );
+ connect( this, TQT_SIGNAL( onViewport() ),
+ TQT_SLOT( removeToolTip() ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested(TQIconViewItem*,const TQPoint&)),
+ TQT_SLOT( slotActivateMenu( TQIconViewItem*, const TQPoint& ) ) );
KFile::SelectionMode sm = KFileView::selectionMode();
switch ( sm ) {
case KFile::Multi:
- QIconView::setSelectionMode( QIconView::Multi );
+ TQIconView::setSelectionMode( TQIconView::Multi );
break;
case KFile::Extended:
- QIconView::setSelectionMode( QIconView::Extended );
+ TQIconView::setSelectionMode( TQIconView::Extended );
break;
case KFile::NoSelection:
- QIconView::setSelectionMode( QIconView::NoSelection );
+ TQIconView::setSelectionMode( TQIconView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QIconView::setSelectionMode( QIconView::Single );
+ TQIconView::setSelectionMode( TQIconView::Single );
break;
}
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QIconViewItem * )),
- SLOT( highlighted( QIconViewItem * )));
+ connect( this, TQT_SIGNAL( selectionChanged( TQIconViewItem * )),
+ TQT_SLOT( highlighted( TQIconViewItem * )));
viewport()->installEventFilter( this );
@@ -186,11 +186,11 @@ KFileIconView::~KFileIconView()
delete d;
}
-void KFileIconView::readConfig( KConfig *kc, const QString& group )
+void KFileIconView::readConfig( KConfig *kc, const TQString& group )
{
- QString gr = group.isEmpty() ? QString("KFileIconView") : group;
+ TQString gr = group.isEmpty() ? TQString("KFileIconView") : group;
KConfigGroupSaver cs( kc, gr );
- QString small = QString::fromLatin1("SmallColumns");
+ TQString small = TQString::fromLatin1("SmallColumns");
d->previewIconSize = kc->readNumEntry( "Preview Size", DEFAULT_PREVIEW_SIZE );
d->previews->setChecked( kc->readBoolEntry( "ShowPreviews", DEFAULT_SHOW_PREVIEWS ) );
@@ -207,14 +207,14 @@ void KFileIconView::readConfig( KConfig *kc, const QString& group )
showPreviews();
}
-void KFileIconView::writeConfig( KConfig *kc, const QString& group )
+void KFileIconView::writeConfig( KConfig *kc, const TQString& group )
{
- QString gr = group.isEmpty() ? QString("KFileIconView") : group;
+ TQString gr = group.isEmpty() ? TQString("KFileIconView") : group;
KConfigGroupSaver cs( kc, gr );
- QString viewMode = d->smallColumns->isChecked() ?
- QString::fromLatin1("SmallColumns") :
- QString::fromLatin1("LargeRows");
+ TQString viewMode = d->smallColumns->isChecked() ?
+ TQString::fromLatin1("SmallColumns") :
+ TQString::fromLatin1("LargeRows");
if(!kc->hasDefault( "ViewMode" ) && viewMode == DEFAULT_VIEW_MODE )
kc->revertToDefault( "ViewMode" );
else
@@ -239,7 +239,7 @@ void KFileIconView::removeToolTip()
toolTip = 0;
}
-void KFileIconView::showToolTip( QIconViewItem *item )
+void KFileIconView::showToolTip( TQIconViewItem *item )
{
delete toolTip;
toolTip = 0;
@@ -247,32 +247,32 @@ void KFileIconView::showToolTip( QIconViewItem *item )
if ( !item )
return;
- int w = maxItemWidth() - ( itemTextPos() == QIconView::Bottom ? 0 :
+ int w = maxItemWidth() - ( itemTextPos() == TQIconView::Bottom ? 0 :
item->pixmapRect().width() ) - 4;
if ( fontMetrics().width( item->text() ) >= w ) {
- toolTip = new QLabel( QString::fromLatin1(" %1 ").arg(item->text()), 0,
+ toolTip = new TQLabel( TQString::fromLatin1(" %1 ").arg(item->text()), 0,
"myToolTip",
WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM );
- toolTip->setFrameStyle( QFrame::Plain | QFrame::Box );
+ toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box );
toolTip->setLineWidth( 1 );
toolTip->setAlignment( AlignLeft | AlignTop );
- toolTip->move( QCursor::pos() + QPoint( 14, 14 ) );
+ toolTip->move( TQCursor::pos() + TQPoint( 14, 14 ) );
toolTip->adjustSize();
- QRect screen = QApplication::desktop()->screenGeometry(
- QApplication::desktop()->screenNumber(QCursor::pos()));
+ TQRect screen = TQApplication::desktop()->screenGeometry(
+ TQApplication::desktop()->screenNumber(TQCursor::pos()));
if (toolTip->x()+toolTip->width() > screen.right()) {
toolTip->move(toolTip->x()+screen.right()-toolTip->x()-toolTip->width(), toolTip->y());
}
if (toolTip->y()+toolTip->height() > screen.bottom()) {
toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y());
}
- toolTip->setFont( QToolTip::font() );
- toolTip->setPalette( QToolTip::palette(), true );
+ toolTip->setFont( TQToolTip::font() );
+ toolTip->setPalette( TQToolTip::palette(), true );
toolTip->show();
}
}
-void KFileIconView::slotActivateMenu( QIconViewItem* item, const QPoint& pos )
+void KFileIconView::slotActivateMenu( TQIconViewItem* item, const TQPoint& pos )
{
if ( !item ) {
sig->activateMenu( 0, pos );
@@ -282,13 +282,13 @@ void KFileIconView::slotActivateMenu( QIconViewItem* item, const QPoint& pos )
sig->activateMenu( i->fileInfo(), pos );
}
-void KFileIconView::hideEvent( QHideEvent *e )
+void KFileIconView::hideEvent( TQHideEvent *e )
{
removeToolTip();
KIconView::hideEvent( e );
}
-void KFileIconView::keyPressEvent( QKeyEvent *e )
+void KFileIconView::keyPressEvent( TQKeyEvent *e )
{
KIconView::keyPressEvent( e );
@@ -336,7 +336,7 @@ void KFileIconView::insertItem( KFileItem *i )
{
KFileView::insertItem( i );
- QIconView* qview = static_cast<QIconView*>( this );
+ TQIconView* qview = static_cast<TQIconView*>( this );
// Since creating and initializing an item leads to a repaint,
// we disable updates on the IconView for a while.
qview->setUpdatesEnabled( false );
@@ -350,7 +350,7 @@ void KFileIconView::insertItem( KFileItem *i )
i->setExtraData( this, item );
}
-void KFileIconView::slotActivate( QIconViewItem *item )
+void KFileIconView::slotActivate( TQIconViewItem *item )
{
if ( !item )
return;
@@ -359,7 +359,7 @@ void KFileIconView::slotActivate( QIconViewItem *item )
sig->activate( fi );
}
-void KFileIconView::selected( QIconViewItem *item )
+void KFileIconView::selected( TQIconViewItem *item )
{
if ( !item || (KApplication::keyboardMouseState() & (ShiftButton | ControlButton)) != 0 )
return;
@@ -387,7 +387,7 @@ KFileItem * KFileIconView::currentFileItem() const
return 0L;
}
-void KFileIconView::highlighted( QIconViewItem *item )
+void KFileIconView::highlighted( TQIconViewItem *item )
{
if ( !item )
return;
@@ -398,32 +398,32 @@ void KFileIconView::highlighted( QIconViewItem *item )
void KFileIconView::setSelectionMode( KFile::SelectionMode sm )
{
- disconnect( SIGNAL( selectionChanged() ), this );
- disconnect( SIGNAL( selectionChanged( QIconViewItem * )), this );
+ disconnect( TQT_SIGNAL( selectionChanged() ), this );
+ disconnect( TQT_SIGNAL( selectionChanged( TQIconViewItem * )), this );
KFileView::setSelectionMode( sm );
switch ( KFileView::selectionMode() ) {
case KFile::Multi:
- QIconView::setSelectionMode( QIconView::Multi );
+ TQIconView::setSelectionMode( TQIconView::Multi );
break;
case KFile::Extended:
- QIconView::setSelectionMode( QIconView::Extended );
+ TQIconView::setSelectionMode( TQIconView::Extended );
break;
case KFile::NoSelection:
- QIconView::setSelectionMode( QIconView::NoSelection );
+ TQIconView::setSelectionMode( TQIconView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QIconView::setSelectionMode( QIconView::Single );
+ TQIconView::setSelectionMode( TQIconView::Single );
break;
}
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QIconViewItem * )),
- SLOT( highlighted( QIconViewItem * )));
+ connect( this, TQT_SIGNAL( selectionChanged( TQIconViewItem * )),
+ TQT_SLOT( highlighted( TQIconViewItem * )));
}
bool KFileIconView::isSelected( const KFileItem *i ) const
@@ -437,17 +437,17 @@ void KFileIconView::updateView( bool b )
if ( !b )
return; // eh?
- KFileIconViewItem *item = static_cast<KFileIconViewItem*>(QIconView::firstItem());
+ KFileIconViewItem *item = static_cast<KFileIconViewItem*>(TQIconView::firstItem());
if ( item ) {
do {
if ( d->previews->isChecked() ) {
if ( canPreview( item->fileInfo() ) )
- item->setPixmapSize( QSize( d->previewIconSize, d->previewIconSize ) );
+ item->setPixmapSize( TQSize( d->previewIconSize, d->previewIconSize ) );
}
else {
// unset pixmap size (used for previews)
if ( !item->pixmapSize().isNull() )
- item->setPixmapSize( QSize( 0, 0 ) );
+ item->setPixmapSize( TQSize( 0, 0 ) );
}
// recalculate item parameters but avoid an in-place repaint
item->setPixmap( (item->fileInfo())->pixmap( myIconSize ), true, false );
@@ -593,12 +593,12 @@ void KFileIconView::showPreviews()
d->job = KIO::filePreview(*items(), d->previewIconSize,d->previewIconSize);
d->job->setIgnoreMaximumSize(d->ignoreMaximumSize);
- connect( d->job, SIGNAL( result( KIO::Job * )),
- this, SLOT( slotPreviewResult( KIO::Job * )));
- connect( d->job, SIGNAL( gotPreview( const KFileItem*, const QPixmap& )),
- SLOT( gotPreview( const KFileItem*, const QPixmap& ) ));
-// connect( d->job, SIGNAL( failed( const KFileItem* )),
-// this, SLOT( slotFailed( const KFileItem* ) ));
+ connect( d->job, TQT_SIGNAL( result( KIO::Job * )),
+ this, TQT_SLOT( slotPreviewResult( KIO::Job * )));
+ connect( d->job, TQT_SIGNAL( gotPreview( const KFileItem*, const TQPixmap& )),
+ TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) ));
+// connect( d->job, TQT_SIGNAL( failed( const KFileItem* )),
+// this, TQT_SLOT( slotFailed( const KFileItem* ) ));
}
void KFileIconView::slotPreviewResult( KIO::Job *job )
@@ -607,13 +607,13 @@ void KFileIconView::slotPreviewResult( KIO::Job *job )
d->job = 0L;
}
-void KFileIconView::gotPreview( const KFileItem *item, const QPixmap& pix )
+void KFileIconView::gotPreview( const KFileItem *item, const TQPixmap& pix )
{
KFileIconViewItem *it = viewItem( item );
if ( it )
if( item->overlays() & KIcon::HiddenOverlay )
{
- QPixmap p( pix );
+ TQPixmap p( pix );
KIconEffect::semiTransparent( p );
it->setPixmap( p );
@@ -624,12 +624,12 @@ void KFileIconView::gotPreview( const KFileItem *item, const QPixmap& pix )
bool KFileIconView::canPreview( const KFileItem *item ) const
{
- QStringList::Iterator it = d->previewMimeTypes.begin();
- QRegExp r;
+ TQStringList::Iterator it = d->previewMimeTypes.begin();
+ TQRegExp r;
r.setWildcard( true );
for ( ; it != d->previewMimeTypes.end(); ++it ) {
- QString type = *it;
+ TQString type = *it;
// the "mimetype" can be "image/*"
if ( type.at( type.length() - 1 ) == '*' ) {
r.setPattern( type );
@@ -672,20 +672,20 @@ KFileItem * KFileIconView::prevItem( const KFileItem *fileItem ) const
return 0L;
}
-void KFileIconView::setSorting( QDir::SortSpec spec )
+void KFileIconView::setSorting( TQDir::SortSpec spec )
{
KFileView::setSorting( spec );
KFileItemListIterator it( *items() );
KFileItem *item;
- if ( spec & QDir::Time ) {
+ if ( spec & TQDir::Time ) {
for ( ; (item = it.current()); ++it )
// warning, time_t is often signed -> cast it
viewItem(item)->setKey( sortingKey( (unsigned long)item->time( KIO::UDS_MODIFICATION_TIME ), item->isDir(), spec ));
}
- else if ( spec & QDir::Size ) {
+ else if ( spec & TQDir::Size ) {
for ( ; (item = it.current()); ++it )
viewItem(item)->setKey( sortingKey( item->size(), item->isDir(),
spec ));
@@ -718,12 +718,12 @@ void KFileIconView::listingCompleted()
{
arrangeItemsInGrid();
- // QIconView doesn't set the current item automatically, so we have to do
+ // TQIconView doesn't set the current item automatically, so we have to do
// that. We don't want to emit selectionChanged() tho.
if ( !currentItem() ) {
bool block = signalsBlocked();
blockSignals( true );
- QIconViewItem *item = viewItem( firstFileItem() );
+ TQIconViewItem *item = viewItem( firstFileItem() );
KIconView::setCurrentItem( item );
KIconView::setSelected( item, false );
blockSignals( block );
@@ -733,12 +733,12 @@ void KFileIconView::listingCompleted()
}
// need to remove our tooltip, eventually
-bool KFileIconView::eventFilter( QObject *o, QEvent *e )
+bool KFileIconView::eventFilter( TQObject *o, TQEvent *e )
{
if ( o == viewport() || o == this ) {
int type = e->type();
- if ( type == QEvent::Leave ||
- type == QEvent::FocusOut )
+ if ( type == TQEvent::Leave ||
+ type == TQEvent::FocusOut )
removeToolTip();
}
@@ -748,7 +748,7 @@ bool KFileIconView::eventFilter( QObject *o, QEvent *e )
/////////////////////////////////////////////////////////////////
// ### workaround for Qt3 Bug
-void KFileIconView::showEvent( QShowEvent *e )
+void KFileIconView::showEvent( TQShowEvent *e )
{
KIconView::showEvent( e );
}
@@ -758,7 +758,7 @@ void KFileIconView::initItem( KFileIconViewItem *item, const KFileItem *i,
bool updateTextAndPixmap )
{
if ( d->previews->isChecked() && canPreview( i ) )
- item->setPixmapSize( QSize( d->previewIconSize, d->previewIconSize ) );
+ item->setPixmapSize( TQSize( d->previewIconSize, d->previewIconSize ) );
if ( updateTextAndPixmap )
{
@@ -770,13 +770,13 @@ void KFileIconView::initItem( KFileIconViewItem *item, const KFileItem *i,
}
// see also setSorting()
- QDir::SortSpec spec = KFileView::sorting();
+ TQDir::SortSpec spec = KFileView::sorting();
- if ( spec & QDir::Time )
+ if ( spec & TQDir::Time )
// warning, time_t is often signed -> cast it
item->setKey( sortingKey( (unsigned long) i->time( KIO::UDS_MODIFICATION_TIME ),
i->isDir(), spec ));
- else if ( spec & QDir::Size )
+ else if ( spec & TQDir::Size )
item->setKey( sortingKey( i->size(), i->isDir(), spec ));
else // Name or Unsorted
@@ -806,7 +806,7 @@ void KFileIconView::zoomOut()
setPreviewSize( d->previewIconSize - 30 );
}
-QDragObject *KFileIconView::dragObject()
+TQDragObject *KFileIconView::dragObject()
{
// create a list of the URL:s that we want to drag
KURL::List urls;
@@ -814,16 +814,16 @@ QDragObject *KFileIconView::dragObject()
for ( ; it.current(); ++it ){
urls.append( (*it)->url() );
}
- QPixmap pixmap;
+ TQPixmap pixmap;
if( urls.count() > 1 )
pixmap = DesktopIcon( "kmultiple", iconSize() );
if( pixmap.isNull() )
pixmap = currentFileItem()->pixmap( iconSize() );
- QPoint hotspot;
+ TQPoint hotspot;
hotspot.setX( pixmap.width() / 2 );
hotspot.setY( pixmap.height() / 2 );
- QDragObject* myDragObject = new KURLDrag( urls, widget() );
+ TQDragObject* myDragObject = new KURLDrag( urls, widget() );
myDragObject->setPixmap( pixmap, hotspot );
return myDragObject;
}
@@ -845,16 +845,16 @@ void KFileIconView::slotAutoOpen()
sig->activate( fileItem );
}
-bool KFileIconView::acceptDrag(QDropEvent* e) const
+bool KFileIconView::acceptDrag(TQDropEvent* e) const
{
return KURLDrag::canDecode( e ) &&
(e->source()!=const_cast<KFileIconView*>(this)) &&
- ( e->action() == QDropEvent::Copy
- || e->action() == QDropEvent::Move
- || e->action() == QDropEvent::Link );
+ ( e->action() == TQDropEvent::Copy
+ || e->action() == TQDropEvent::Move
+ || e->action() == TQDropEvent::Link );
}
-void KFileIconView::contentsDragEnterEvent( QDragEnterEvent *e )
+void KFileIconView::contentsDragEnterEvent( TQDragEnterEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -877,7 +877,7 @@ void KFileIconView::contentsDragEnterEvent( QDragEnterEvent *e )
}
}
-void KFileIconView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KFileIconView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -903,13 +903,13 @@ void KFileIconView::contentsDragMoveEvent( QDragMoveEvent *e )
}
}
-void KFileIconView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KFileIconView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
}
-void KFileIconView::contentsDropEvent( QDropEvent *e )
+void KFileIconView::contentsDropEvent( TQDropEvent *e )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
diff --git a/kio/kfile/kfileiconview.h b/kio/kfile/kfileiconview.h
index 63a841a8e..ea8fe7d89 100644
--- a/kio/kfile/kfileiconview.h
+++ b/kio/kfile/kfileiconview.h
@@ -38,14 +38,14 @@ class QLabel;
class KIO_EXPORT KFileIconViewItem : public KIconViewItem
{
public:
- KFileIconViewItem( QIconView *parent, const QString &text,
- const QPixmap &pixmap,
+ KFileIconViewItem( TQIconView *parent, const TQString &text,
+ const TQPixmap &pixmap,
KFileItem *fi )
: KIconViewItem( parent, text, pixmap ), inf( fi ) {}
/**
* @since 3.1
*/
- KFileIconViewItem( QIconView *parent, KFileItem *fi )
+ KFileIconViewItem( TQIconView *parent, KFileItem *fi )
: KIconViewItem( parent ), inf( fi ) {}
virtual ~KFileIconViewItem();
@@ -83,10 +83,10 @@ class KIO_EXPORT KFileIconView : public KIconView, public KFileView
Q_OBJECT
public:
- KFileIconView(QWidget *parent, const char *name);
+ KFileIconView(TQWidget *parent, const char *name);
virtual ~KFileIconView();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
virtual void setAutoUpdate( bool ) {} // ### unused. remove in KDE4
@@ -137,15 +137,15 @@ public:
void ensureItemVisible( const KFileItem * );
- virtual void setSorting(QDir::SortSpec sort);
+ virtual void setSorting(TQDir::SortSpec sort);
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
// for KMimeTypeResolver
void mimeTypeDeterminationFinished();
void determineIcon( KFileIconViewItem *item );
- QScrollView *scrollWidget() const { return (QScrollView*) this; }
+ TQScrollView *scrollWidget() const { return (TQScrollView*) this; }
void setAcceptDrops(bool b)
{
KIconView::setAcceptDrops(b);
@@ -173,37 +173,37 @@ public slots:
protected:
/**
- * Reimplemented to not let QIconView eat return-key events
+ * Reimplemented to not let TQIconView eat return-key events
*/
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
/**
* Reimplemented to remove an eventual tooltip
*/
- virtual void hideEvent( QHideEvent * );
+ virtual void hideEvent( TQHideEvent * );
// ### workaround for Qt3 bug (see #35080)
- virtual void showEvent( QShowEvent * );
+ virtual void showEvent( TQShowEvent * );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
// DND support
- virtual QDragObject *dragObject();
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDropEvent( QDropEvent *ev );
+ virtual TQDragObject *dragObject();
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *ev );
// KDE4: Make virtual
- bool acceptDrag(QDropEvent* e ) const;
+ bool acceptDrag(TQDropEvent* e ) const;
private slots:
- void selected( QIconViewItem *item );
- void slotActivate( QIconViewItem * );
- void highlighted( QIconViewItem *item );
- void showToolTip( QIconViewItem *item );
+ void selected( TQIconViewItem *item );
+ void slotActivate( TQIconViewItem * );
+ void highlighted( TQIconViewItem *item );
+ void showToolTip( TQIconViewItem *item );
void removeToolTip();
- void slotActivateMenu( QIconViewItem *, const QPoint& );
+ void slotActivateMenu( TQIconViewItem *, const TQPoint& );
void slotSelectionChanged();
void slotSmallColumns();
@@ -211,7 +211,7 @@ private slots:
void slotPreviewsToggled( bool );
void slotPreviewResult( KIO::Job * );
- void gotPreview( const KFileItem *item, const QPixmap& pix );
+ void gotPreview( const KFileItem *item, const TQPixmap& pix );
void slotAutoOpen();
signals:
@@ -221,25 +221,25 @@ signals:
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, KFileItem *fileItem);
+ void dropped(TQDropEvent *event, KFileItem *fileItem);
/**
* The user dropped the URLs @p urls.
* @p url points to the item dropped on or can be empty if the
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, const KURL::List &urls, const KURL &url);
+ void dropped(TQDropEvent *event, const KURL::List &urls, const KURL &url);
private:
KMimeTypeResolver<KFileIconViewItem,KFileIconView> *m_resolver;
- QLabel *toolTip;
+ TQLabel *toolTip;
int th;
int myIconSize;
- virtual void insertItem(QIconViewItem *a, QIconViewItem *b) { KIconView::insertItem(a, b); }
- virtual void setSelectionMode(QIconView::SelectionMode m) { KIconView::setSelectionMode(m); }
- virtual void setSelected(QIconViewItem *i, bool a, bool b) { KIconView::setSelected(i, a, b); }
+ virtual void insertItem(TQIconViewItem *a, TQIconViewItem *b) { KIconView::insertItem(a, b); }
+ virtual void setSelectionMode(TQIconView::SelectionMode m) { KIconView::setSelectionMode(m); }
+ virtual void setSelected(TQIconViewItem *i, bool a, bool b) { KIconView::setSelected(i, a, b); }
bool canPreview( const KFileItem * ) const;
void stopPreview();
diff --git a/kio/kfile/kfilemetainfowidget.cpp b/kio/kfile/kfilemetainfowidget.cpp
index ee76c82e2..5d54af8b9 100644
--- a/kio/kfile/kfilemetainfowidget.cpp
+++ b/kio/kfile/kfilemetainfowidget.cpp
@@ -28,29 +28,29 @@
#include <kstringvalidator.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qdatetimeedit.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qvalidator.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqdatetimeedit.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqvalidator.h>
/*
Widgets used for different types:
bool : QCheckBox
int : QSpinBox
- QString : KComboBox if the validator is a KStringListValidator, else lineedit
- QDateTime : QDateTimeEdit
+ TQString : KComboBox if the validator is a KStringListValidator, else lineedit
+ TQDateTime : QDateTimeEdit
*/
KFileMetaInfoWidget::KFileMetaInfoWidget(KFileMetaInfoItem item,
- QValidator* val,
- QWidget* parent, const char* name)
- : QWidget(parent, name),
+ TQValidator* val,
+ TQWidget* parent, const char* name)
+ : TQWidget(parent, name),
m_value(item.value()),
m_item(item),
m_validator(val)
@@ -60,9 +60,9 @@ KFileMetaInfoWidget::KFileMetaInfoWidget(KFileMetaInfoItem item,
KFileMetaInfoWidget::KFileMetaInfoWidget(KFileMetaInfoItem item,
Mode mode,
- QValidator* val,
- QWidget* parent, const char* name)
- : QWidget(parent, name),
+ TQValidator* val,
+ TQWidget* parent, const char* name)
+ : TQWidget(parent, name),
m_value(item.value()),
m_item(item),
m_validator(val)
@@ -80,88 +80,88 @@ void KFileMetaInfoWidget::init(KFileMetaInfoItem item, Mode mode)
else
switch (m_value.type())
{
- case QVariant::Image :
- m_widget = new QLabel(this, "info image");
- static_cast<QLabel*>(m_widget)->setPixmap(QPixmap(m_value.toImage()));
+ case TQVariant::Image :
+ m_widget = new TQLabel(this, "info image");
+ static_cast<TQLabel*>(m_widget)->setPixmap(TQPixmap(m_value.toImage()));
break;
- case QVariant::Pixmap :
- m_widget = new QLabel(this, "info pixmap");
- static_cast<QLabel*>(m_widget)->setPixmap(m_value.toPixmap());
+ case TQVariant::Pixmap :
+ m_widget = new TQLabel(this, "info pixmap");
+ static_cast<TQLabel*>(m_widget)->setPixmap(m_value.toPixmap());
break;
default:
- m_widget = new QLabel(item.string(true), this, "info label");
+ m_widget = new TQLabel(item.string(true), this, "info label");
}
- (new QHBoxLayout(this))->addWidget(m_widget);
+ (new TQHBoxLayout(this))->addWidget(m_widget);
}
KFileMetaInfoWidget::~KFileMetaInfoWidget()
{
}
-QWidget* KFileMetaInfoWidget::makeWidget()
+TQWidget* KFileMetaInfoWidget::makeWidget()
{
- QString valClass;
- QWidget* w;
+ TQString valClass;
+ TQWidget* w;
switch (m_value.type())
{
- case QVariant::Invalid: // no type
+ case TQVariant::Invalid: // no type
// just make a label
- w = new QLabel(i18n("<Error>"), this, "label");
+ w = new TQLabel(i18n("<Error>"), this, "label");
break;
- case QVariant::Int: // an int
- case QVariant::UInt: // an unsigned int
+ case TQVariant::Int: // an int
+ case TQVariant::UInt: // an unsigned int
w = makeIntWidget();
break;
- case QVariant::Bool: // a bool
+ case TQVariant::Bool: // a bool
w = makeBoolWidget();
break;
- case QVariant::Double: // a double
+ case TQVariant::Double: // a double
w = makeDoubleWidget();
break;
- case QVariant::Date: // a QDate
+ case TQVariant::Date: // a QDate
w = makeDateWidget();
break;
- case QVariant::Time: // a QTime
+ case TQVariant::Time: // a QTime
w = makeTimeWidget();
break;
- case QVariant::DateTime: // a QDateTime
+ case TQVariant::DateTime: // a QDateTime
w = makeDateTimeWidget();
break;
#if 0
- case QVariant::Size: // a QSize
- case QVariant::String: // a QString
- case QVariant::List: // a QValueList
- case QVariant::Map: // a QMap
- case QVariant::StringList: // a QStringList
- case QVariant::Font: // a QFont
- case QVariant::Pixmap: // a QPixmap
- case QVariant::Brush: // a QBrush
- case QVariant::Rect: // a QRect
- case QVariant::Color: // a QColor
- case QVariant::Palette: // a QPalette
- case QVariant::ColorGroup: // a QColorGroup
- case QVariant::IconSet: // a QIconSet
- case QVariant::Point: // a QPoint
- case QVariant::Image: // a QImage
- case QVariant::CString: // a QCString
- case QVariant::PointArray: // a QPointArray
- case QVariant::Region: // a QRegion
- case QVariant::Bitmap: // a QBitmap
- case QVariant::Cursor: // a QCursor
- case QVariant::ByteArray: // a QByteArray
- case QVariant::BitArray: // a QBitArray
- case QVariant::SizePolicy: // a QSizePolicy
- case QVariant::KeySequence: // a QKeySequence
+ case TQVariant::Size: // a QSize
+ case TQVariant::String: // a QString
+ case TQVariant::List: // a QValueList
+ case TQVariant::Map: // a QMap
+ case TQVariant::StringList: // a QStringList
+ case TQVariant::Font: // a QFont
+ case TQVariant::Pixmap: // a QPixmap
+ case TQVariant::Brush: // a QBrush
+ case TQVariant::Rect: // a QRect
+ case TQVariant::Color: // a QColor
+ case TQVariant::Palette: // a QPalette
+ case TQVariant::ColorGroup: // a QColorGroup
+ case TQVariant::IconSet: // a QIconSet
+ case TQVariant::Point: // a QPoint
+ case TQVariant::Image: // a QImage
+ case TQVariant::CString: // a QCString
+ case TQVariant::PointArray: // a QPointArray
+ case TQVariant::Region: // a QRegion
+ case TQVariant::Bitmap: // a QBitmap
+ case TQVariant::Cursor: // a QCursor
+ case TQVariant::ByteArray: // a QByteArray
+ case TQVariant::BitArray: // a QBitArray
+ case TQVariant::SizePolicy: // a QSizePolicy
+ case TQVariant::KeySequence: // a QKeySequence
#endif
default:
w = makeStringWidget();
@@ -181,39 +181,39 @@ QWidget* KFileMetaInfoWidget::makeWidget()
// now the different methods to make the widgets for specific types
// ****************************************************************
-QWidget* KFileMetaInfoWidget::makeBoolWidget()
+TQWidget* KFileMetaInfoWidget::makeBoolWidget()
{
- QCheckBox* cb = new QCheckBox(this, "metainfo bool widget");
+ TQCheckBox* cb = new TQCheckBox(this, "metainfo bool widget");
cb->setChecked(m_item.value().toBool());
- connect(cb, SIGNAL(toggled(bool)), this, SLOT(slotChanged(bool)));
+ connect(cb, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged(bool)));
return cb;
}
-QWidget* KFileMetaInfoWidget::makeIntWidget()
+TQWidget* KFileMetaInfoWidget::makeIntWidget()
{
- QSpinBox* sb = new QSpinBox(this, "metainfo integer widget");
+ TQSpinBox* sb = new TQSpinBox(this, "metainfo integer widget");
sb->setValue(m_item.value().toInt());
if (m_validator)
{
- if (m_validator->inherits("QIntValidator"))
+ if (m_validator->inherits("TQIntValidator"))
{
- sb->setMinValue(static_cast<QIntValidator*>(m_validator)->bottom());
- sb->setMaxValue(static_cast<QIntValidator*>(m_validator)->top());
+ sb->setMinValue(static_cast<TQIntValidator*>(m_validator)->bottom());
+ sb->setMaxValue(static_cast<TQIntValidator*>(m_validator)->top());
}
reparentValidator(sb, m_validator);
sb->setValidator(m_validator);
}
// make sure that an uint cannot be set to a value < 0
- if (m_item.type() == QVariant::UInt)
+ if (m_item.type() == TQVariant::UInt)
sb->setMinValue(QMAX(sb->minValue(), 0));
- connect(sb, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int)));
+ connect(sb, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int)));
return sb;
}
-QWidget* KFileMetaInfoWidget::makeDoubleWidget()
+TQWidget* KFileMetaInfoWidget::makeDoubleWidget()
{
KDoubleNumInput* dni = new KDoubleNumInput(m_item.value().toDouble(),
this, "metainfo double widget");
@@ -221,19 +221,19 @@ QWidget* KFileMetaInfoWidget::makeDoubleWidget()
if (m_validator)
{
- if (m_validator->inherits("QDoubleValidator"))
+ if (m_validator->inherits("TQDoubleValidator"))
{
- dni->setMinValue(static_cast<QDoubleValidator*>(m_validator)->bottom());
- dni->setMaxValue(static_cast<QDoubleValidator*>(m_validator)->top());
+ dni->setMinValue(static_cast<TQDoubleValidator*>(m_validator)->bottom());
+ dni->setMaxValue(static_cast<TQDoubleValidator*>(m_validator)->top());
}
reparentValidator(dni, m_validator);
}
- connect(dni, SIGNAL(valueChanged(double)), this, SLOT(slotChanged(double)));
+ connect(dni, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotChanged(double)));
return dni;
}
-QWidget* KFileMetaInfoWidget::makeStringWidget()
+TQWidget* KFileMetaInfoWidget::makeStringWidget()
{
if (m_validator && m_validator->inherits("KStringListValidator"))
{
@@ -242,7 +242,7 @@ QWidget* KFileMetaInfoWidget::makeStringWidget()
(m_validator);
b->insertStringList(val->stringList());
b->setCurrentText(m_item.value().toString());
- connect(b, SIGNAL(activated(const QString &)), this, SLOT(slotComboChanged(const QString &)));
+ connect(b, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotComboChanged(const TQString &)));
b->setValidator(val);
reparentValidator(b, val);
return b;
@@ -251,9 +251,9 @@ QWidget* KFileMetaInfoWidget::makeStringWidget()
if ( m_item.attributes() & KFileMimeTypeInfo::MultiLine ) {
KEdit *edit = new KEdit( this );
edit->setText( m_item.value().toString() );
- connect( edit, SIGNAL( textChanged() ),
- this, SLOT( slotMultiLineEditChanged() ));
- // can't use a validator with a QTextEdit, but we may need to delete it
+ connect( edit, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( slotMultiLineEditChanged() ));
+ // can't use a validator with a TQTextEdit, but we may need to delete it
if ( m_validator )
reparentValidator( edit, m_validator );
return edit;
@@ -265,31 +265,31 @@ QWidget* KFileMetaInfoWidget::makeStringWidget()
e->setValidator(m_validator);
reparentValidator(e, m_validator);
}
- connect(e, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotLineEditChanged(const QString&)));
+ connect(e, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotLineEditChanged(const TQString&)));
return e;
}
-QWidget* KFileMetaInfoWidget::makeDateWidget()
+TQWidget* KFileMetaInfoWidget::makeDateWidget()
{
- QWidget *e = new QDateEdit(m_item.value().toDate(), this);
- connect(e, SIGNAL(valueChanged(const QDate&)),
- this, SLOT(slotDateChanged(const QDate&)));
+ TQWidget *e = new QDateEdit(m_item.value().toDate(), this);
+ connect(e, TQT_SIGNAL(valueChanged(const TQDate&)),
+ this, TQT_SLOT(slotDateChanged(const TQDate&)));
return e;
}
-QWidget* KFileMetaInfoWidget::makeTimeWidget()
+TQWidget* KFileMetaInfoWidget::makeTimeWidget()
{
return new QTimeEdit(m_item.value().toTime(), this);
}
-QWidget* KFileMetaInfoWidget::makeDateTimeWidget()
+TQWidget* KFileMetaInfoWidget::makeDateTimeWidget()
{
return new QDateTimeEdit(m_item.value().toDateTime(), this);
}
-void KFileMetaInfoWidget::reparentValidator( QWidget *widget,
- QValidator *validator )
+void KFileMetaInfoWidget::reparentValidator( TQWidget *widget,
+ TQValidator *validator )
{
if ( !validator->parent() )
widget->insertChild( validator );
@@ -301,16 +301,16 @@ void KFileMetaInfoWidget::reparentValidator( QWidget *widget,
void KFileMetaInfoWidget::slotChanged(bool value)
{
- Q_ASSERT(m_widget->inherits("QComboBox"));
- m_value = QVariant(value);
+ Q_ASSERT(m_widget->inherits("TQComboBox"));
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
void KFileMetaInfoWidget::slotChanged(int value)
{
- Q_ASSERT(m_widget->inherits("QSpinBox"));
- m_value = QVariant(value);
+ Q_ASSERT(m_widget->inherits("TQSpinBox"));
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
@@ -318,23 +318,23 @@ void KFileMetaInfoWidget::slotChanged(int value)
void KFileMetaInfoWidget::slotChanged(double value)
{
Q_ASSERT(m_widget->inherits("KDoubleNumInput"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotComboChanged(const QString &value)
+void KFileMetaInfoWidget::slotComboChanged(const TQString &value)
{
Q_ASSERT(m_widget->inherits("KComboBox"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotLineEditChanged(const QString& value)
+void KFileMetaInfoWidget::slotLineEditChanged(const TQString& value)
{
Q_ASSERT(m_widget->inherits("KLineEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
@@ -342,32 +342,32 @@ void KFileMetaInfoWidget::slotLineEditChanged(const QString& value)
// that may be a little expensive for long texts, but what can we do?
void KFileMetaInfoWidget::slotMultiLineEditChanged()
{
- Q_ASSERT(m_widget->inherits("QTextEdit"));
- m_value = QVariant( static_cast<const QTextEdit*>( sender() )->text() );
+ Q_ASSERT(m_widget->inherits("TQTextEdit"));
+ m_value = TQVariant( static_cast<const TQTextEdit*>( sender() )->text() );
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotDateChanged(const QDate& value)
+void KFileMetaInfoWidget::slotDateChanged(const TQDate& value)
{
Q_ASSERT(m_widget->inherits("QDateEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotTimeChanged(const QTime& value)
+void KFileMetaInfoWidget::slotTimeChanged(const TQTime& value)
{
Q_ASSERT(m_widget->inherits("QTimeEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotDateTimeChanged(const QDateTime& value)
+void KFileMetaInfoWidget::slotDateTimeChanged(const TQDateTime& value)
{
Q_ASSERT(m_widget->inherits("QDateTimeEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
diff --git a/kio/kfile/kfilemetainfowidget.h b/kio/kfile/kfilemetainfowidget.h
index 4d0070949..c22936b5e 100644
--- a/kio/kfile/kfilemetainfowidget.h
+++ b/kio/kfile/kfilemetainfowidget.h
@@ -20,8 +20,8 @@
#ifndef __KFILEMETAINFOWIDGET_H__
#define __KFILEMETAINFOWIDGET_H__
-#include <qwidget.h>
-#include <qvariant.h>
+#include <tqwidget.h>
+#include <tqvariant.h>
#include <kfilemetainfo.h>
/*!
@@ -38,11 +38,11 @@ public:
Reserve = 0xff
};
- KFileMetaInfoWidget(KFileMetaInfoItem item, QValidator* val = 0,
- QWidget* parent = 0, const char* name = 0);
+ KFileMetaInfoWidget(KFileMetaInfoItem item, TQValidator* val = 0,
+ TQWidget* parent = 0, const char* name = 0);
- KFileMetaInfoWidget(KFileMetaInfoItem item, Mode mode, QValidator* val = 0,
- QWidget* parent = 0, const char* name = 0);
+ KFileMetaInfoWidget(KFileMetaInfoItem item, Mode mode, TQValidator* val = 0,
+ TQWidget* parent = 0, const char* name = 0);
virtual ~KFileMetaInfoWidget();
@@ -51,44 +51,44 @@ public:
return m_item.isEditable() && m_item.setValue(m_value);
}
- void setValue(const QVariant& value) { m_value = value; }
- QVariant value()const { return m_value; }
- QValidator* validator() const { return m_validator; }
+ void setValue(const TQVariant& value) { m_value = value; }
+ TQVariant value()const { return m_value; }
+ TQValidator* validator() const { return m_validator; }
KFileMetaInfoItem item()const { return m_item; }
signals:
- void valueChanged(const QVariant& value);
+ void valueChanged(const TQVariant& value);
protected:
- void reparentValidator(QWidget *widget, QValidator *validator);
- virtual QWidget* makeWidget();
+ void reparentValidator(TQWidget *widget, TQValidator *validator);
+ virtual TQWidget* makeWidget();
- QWidget* makeBoolWidget();
- QWidget* makeIntWidget();
- QWidget* makeDoubleWidget();
- QWidget* makeStringWidget();
- QWidget* makeDateWidget();
- QWidget* makeTimeWidget();
- QWidget* makeDateTimeWidget();
+ TQWidget* makeBoolWidget();
+ TQWidget* makeIntWidget();
+ TQWidget* makeDoubleWidget();
+ TQWidget* makeStringWidget();
+ TQWidget* makeDateWidget();
+ TQWidget* makeTimeWidget();
+ TQWidget* makeDateTimeWidget();
private slots:
void slotChanged(bool value);
void slotChanged(int value);
void slotChanged(double value);
- void slotComboChanged(const QString &value);
- void slotLineEditChanged(const QString& value);
+ void slotComboChanged(const TQString &value);
+ void slotLineEditChanged(const TQString& value);
void slotMultiLineEditChanged();
- void slotDateChanged(const QDate& value);
- void slotTimeChanged(const QTime& value);
- void slotDateTimeChanged(const QDateTime& value);
+ void slotDateChanged(const TQDate& value);
+ void slotTimeChanged(const TQTime& value);
+ void slotDateTimeChanged(const TQDateTime& value);
private:
void init(KFileMetaInfoItem item, Mode mode);
- QVariant m_value; // the value will be saved here until apply() is called
+ TQVariant m_value; // the value will be saved here until apply() is called
KFileMetaInfoItem m_item;
- QWidget* m_widget;
- QValidator* m_validator;
+ TQWidget* m_widget;
+ TQValidator* m_validator;
bool m_dirty : 1;
};
diff --git a/kio/kfile/kfilemetapreview.cpp b/kio/kfile/kfilemetapreview.cpp
index 4d5ec339b..1be7743a1 100644
--- a/kio/kfile/kfilemetapreview.cpp
+++ b/kio/kfile/kfilemetapreview.cpp
@@ -8,7 +8,7 @@
#include "kfilemetapreview.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kio/previewjob.h>
#include <klibloader.h>
@@ -17,12 +17,12 @@
bool KFileMetaPreview::s_tryAudioPreview = true;
-KFileMetaPreview::KFileMetaPreview( QWidget *parent, const char *name )
+KFileMetaPreview::KFileMetaPreview( TQWidget *parent, const char *name )
: KPreviewWidgetBase( parent, name ),
haveAudioPreview( false )
{
- QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 );
- m_stack = new QWidgetStack( this );
+ TQHBoxLayout *layout = new TQHBoxLayout( this, 0, 0 );
+ m_stack = new TQWidgetStack( this );
layout->addWidget( m_stack );
// ###
@@ -45,8 +45,8 @@ void KFileMetaPreview::initPreviewProviders()
m_stack->raiseWidget( imagePreview );
resize( imagePreview->sizeHint() );
- QStringList mimeTypes = imagePreview->supportedMimeTypes();
- QStringList::ConstIterator it = mimeTypes.begin();
+ TQStringList mimeTypes = imagePreview->supportedMimeTypes();
+ TQStringList::ConstIterator it = mimeTypes.begin();
for ( ; it != mimeTypes.end(); ++it )
{
// qDebug(".... %s", (*it).latin1());
@@ -54,7 +54,7 @@ void KFileMetaPreview::initPreviewProviders()
}
}
-KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeType )
+KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeType )
{
// qDebug("### looking for: %s", mimeType.latin1());
// often the first highlighted item, where we can be sure, there is no plugin
@@ -78,8 +78,8 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeTy
{
haveAudioPreview = true;
(void) m_stack->addWidget( audioPreview );
- QStringList mimeTypes = audioPreview->supportedMimeTypes();
- QStringList::ConstIterator it = mimeTypes.begin();
+ TQStringList mimeTypes = audioPreview->supportedMimeTypes();
+ TQStringList::ConstIterator it = mimeTypes.begin();
for ( ; it != mimeTypes.end(); ++it )
m_previewProviders.insert( *it, audioPreview );
}
@@ -104,7 +104,7 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeTy
if ( mimeInfo )
{
// check mime type inheritance
- QString parentMimeType = mimeInfo->parentMimeType();
+ TQString parentMimeType = mimeInfo->parentMimeType();
while ( !parentMimeType.isEmpty() )
{
provider = m_previewProviders.find( parentMimeType );
@@ -118,8 +118,8 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeTy
}
// check X-KDE-Text property
- QVariant textProperty = mimeInfo->property( "X-KDE-text" );
- if ( textProperty.isValid() && textProperty.type() == QVariant::Bool )
+ TQVariant textProperty = mimeInfo->property( "X-KDE-text" );
+ if ( textProperty.isValid() && textProperty.type() == TQVariant::Bool )
{
if ( textProperty.toBool() )
{
@@ -163,7 +163,7 @@ void KFileMetaPreview::clearPreview()
static_cast<KPreviewWidgetBase*>( m_stack->visibleWidget() )->clearPreview();
}
-void KFileMetaPreview::addPreviewProvider( const QString& mimeType,
+void KFileMetaPreview::addPreviewProvider( const TQString& mimeType,
KPreviewWidgetBase *provider )
{
m_previewProviders.insert( mimeType, provider );
@@ -171,7 +171,7 @@ void KFileMetaPreview::addPreviewProvider( const QString& mimeType,
void KFileMetaPreview::clearPreviewProviders()
{
- QDictIterator<KPreviewWidgetBase> it( m_previewProviders );
+ TQDictIterator<KPreviewWidgetBase> it( m_previewProviders );
for ( ; it.current(); ++it )
m_stack->removeWidget( it.current() );
@@ -179,7 +179,7 @@ void KFileMetaPreview::clearPreviewProviders()
}
// static
-KPreviewWidgetBase * KFileMetaPreview::createAudioPreview( QWidget *parent )
+KPreviewWidgetBase * KFileMetaPreview::createAudioPreview( TQWidget *parent )
{
KLibFactory *factory = KLibLoader::self()->factory( "kfileaudiopreview" );
if ( !factory )
diff --git a/kio/kfile/kfilemetapreview.h b/kio/kfile/kfilemetapreview.h
index ae0650ea1..19b7901a1 100644
--- a/kio/kfile/kfilemetapreview.h
+++ b/kio/kfile/kfilemetapreview.h
@@ -9,8 +9,8 @@
#ifndef KFILEMETAPREVIEW_H
#define KFILEMETAPREVIEW_H
-#include <qdict.h>
-#include <qwidgetstack.h>
+#include <tqdict.h>
+#include <tqwidgetstack.h>
#include <kpreviewwidgetbase.h>
#include <kurl.h>
@@ -20,10 +20,10 @@ class KIO_EXPORT KFileMetaPreview : public KPreviewWidgetBase
Q_OBJECT
public:
- KFileMetaPreview(QWidget *parent, const char *name = 0);
+ KFileMetaPreview(TQWidget *parent, const char *name = 0);
~KFileMetaPreview();
- virtual void addPreviewProvider( const QString& mimeType,
+ virtual void addPreviewProvider( const TQString& mimeType,
KPreviewWidgetBase *provider );
virtual void clearPreviewProviders();
@@ -32,7 +32,7 @@ public slots:
virtual void clearPreview();
protected:
- virtual KPreviewWidgetBase *previewProviderFor( const QString& mimeType );
+ virtual KPreviewWidgetBase *previewProviderFor( const TQString& mimeType );
protected:
virtual void virtual_hook( int id, void* data );
@@ -40,12 +40,12 @@ protected:
private:
void initPreviewProviders();
- QWidgetStack *m_stack;
- QDict<KPreviewWidgetBase> m_previewProviders;
+ TQWidgetStack *m_stack;
+ TQDict<KPreviewWidgetBase> m_previewProviders;
bool haveAudioPreview;
// may return 0L
- static KPreviewWidgetBase * createAudioPreview( QWidget *parent );
+ static KPreviewWidgetBase * createAudioPreview( TQWidget *parent );
static bool s_tryAudioPreview;
private:
diff --git a/kio/kfile/kfilepreview.cpp b/kio/kfile/kfilepreview.cpp
index 14065c3cb..b221a1ebb 100644
--- a/kio/kfile/kfilepreview.cpp
+++ b/kio/kfile/kfilepreview.cpp
@@ -24,24 +24,24 @@
#include <kfilepreview.moc>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include "config-kfile.h"
-KFilePreview::KFilePreview(KFileView *view, QWidget *parent, const char *name)
- : QSplitter(parent, name), KFileView()
+KFilePreview::KFilePreview(KFileView *view, TQWidget *parent, const char *name)
+ : TQSplitter(parent, name), KFileView()
{
if ( view )
init( view );
else
- init( new KFileIconView( (QSplitter*) this, "left" ));
+ init( new KFileIconView( (TQSplitter*) this, "left" ));
}
-KFilePreview::KFilePreview(QWidget *parent, const char *name) :
- QSplitter(parent, name), KFileView()
+KFilePreview::KFilePreview(TQWidget *parent, const char *name) :
+ TQSplitter(parent, name), KFileView()
{
- init( new KFileIconView((QSplitter*)this, "left") );
+ init( new KFileIconView((TQSplitter*)this, "left") );
}
KFilePreview::~KFilePreview()
@@ -54,7 +54,7 @@ KFilePreview::~KFilePreview()
// don't delete the preview, we can reuse it
// (it will get deleted by ~KDirOperator)
if ( preview && preview->parentWidget() == this ) {
- preview->reparent(0L, 0, QPoint(0, 0), false);
+ preview->reparent(0L, 0, TQPoint(0, 0), false);
}
}
@@ -65,13 +65,13 @@ void KFilePreview::init( KFileView *view )
left = 0L;
setFileView( view );
- preview = new QWidget((QSplitter*)this, "preview");
- QString tmp = i18n("No preview available.");
- QLabel *l = new QLabel(tmp, preview);
+ preview = new TQWidget((TQSplitter*)this, "preview");
+ TQString tmp = i18n("No preview available.");
+ TQLabel *l = new TQLabel(tmp, preview);
l->setMinimumSize(l->sizeHint());
l->move(10, 5);
preview->setMinimumWidth(l->sizeHint().width()+20);
- setResizeMode(preview, QSplitter::KeepSize);
+ setResizeMode(preview, TQSplitter::KeepSize);
// Why copy the actions? --ellis, 13 Jan 02.
//for ( uint i = 0; i < view->actionCollection()->count(); i++ )
@@ -89,14 +89,14 @@ void KFilePreview::setFileView( KFileView *view )
//}
delete left;
- view->widget()->reparent( this, QPoint(0,0) );
+ view->widget()->reparent( this, TQPoint(0,0) );
view->KFileView::setViewMode(All);
view->setParentView(this);
view->setSorting( sorting() );
left = view;
- connect( left->signaler(), SIGNAL( fileHighlighted(const KFileItem*) ),
- SLOT( slotHighlighted( const KFileItem * )));
+ connect( left->signaler(), TQT_SIGNAL( fileHighlighted(const KFileItem*) ),
+ TQT_SLOT( slotHighlighted( const KFileItem * )));
// Why copy the actions? --ellis, 13 Jan 02.
//for ( uint i = 0; i < view->actionCollection()->count(); i++ )
@@ -105,15 +105,15 @@ void KFilePreview::setFileView( KFileView *view )
// this url parameter is useless... it's the url of the current directory.
// what for?
-void KFilePreview::setPreviewWidget(const QWidget *w, const KURL &)
+void KFilePreview::setPreviewWidget(const TQWidget *w, const KURL &)
{
left->setOnlyDoubleClickSelectsFiles( onlyDoubleClickSelectsFiles() );
if (w) {
- connect(this, SIGNAL( showPreview(const KURL &) ),
- w, SLOT( showPreview(const KURL &) ));
- connect( this, SIGNAL( clearPreview() ),
- w, SLOT( clearPreview() ));
+ connect(this, TQT_SIGNAL( showPreview(const KURL &) ),
+ w, TQT_SLOT( showPreview(const KURL &) ));
+ connect( this, TQT_SIGNAL( clearPreview() ),
+ w, TQT_SLOT( clearPreview() ));
}
else {
preview->hide();
@@ -121,8 +121,8 @@ void KFilePreview::setPreviewWidget(const QWidget *w, const KURL &)
}
delete preview;
- preview = const_cast<QWidget*>(w);
- preview->reparent((QSplitter*)this, 0, QPoint(0, 0), true);
+ preview = const_cast<TQWidget*>(w);
+ preview->reparent((TQSplitter*)this, 0, TQPoint(0, 0), true);
preview->resize(preview->sizeHint());
preview->show();
}
@@ -133,7 +133,7 @@ void KFilePreview::insertItem(KFileItem *item)
left->insertItem(item);
}
-void KFilePreview::setSorting( QDir::SortSpec sort )
+void KFilePreview::setSorting( TQDir::SortSpec sort )
{
left->setSorting( sort );
KFileView::setSorting( left->sorting() );
@@ -264,12 +264,12 @@ KActionCollection * KFilePreview::actionCollection() const
}
}
-void KFilePreview::readConfig( KConfig *config, const QString& group )
+void KFilePreview::readConfig( KConfig *config, const TQString& group )
{
left->readConfig( config, group );
}
-void KFilePreview::writeConfig( KConfig *config, const QString& group )
+void KFilePreview::writeConfig( KConfig *config, const TQString& group )
{
left->writeConfig( config, group );
}
diff --git a/kio/kfile/kfilepreview.h b/kio/kfile/kfilepreview.h
index d6ee487f7..123d221f1 100644
--- a/kio/kfile/kfilepreview.h
+++ b/kio/kfile/kfilepreview.h
@@ -23,9 +23,9 @@
#ifndef _KFILEPREVIEW_H
#define _KFILEPREVIEW_H
-#include <qsplitter.h>
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqsplitter.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kfileitem.h>
@@ -36,16 +36,16 @@
/*!
* This KFileView is an empbedded preview for some file types.
*/
-class KIO_EXPORT KFilePreview : public QSplitter, public KFileView
+class KIO_EXPORT KFilePreview : public TQSplitter, public KFileView
{
Q_OBJECT
public:
- KFilePreview(QWidget *parent, const char *name);
- KFilePreview(KFileView *view, QWidget *parent, const char *name);
+ KFilePreview(TQWidget *parent, const char *name);
+ KFilePreview(KFileView *view, TQWidget *parent, const char *name);
virtual ~KFilePreview();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
/**
@@ -81,10 +81,10 @@ public:
virtual KFileItem * nextItem( const KFileItem * ) const;
virtual KFileItem * prevItem( const KFileItem * ) const;
- virtual void setSorting( QDir::SortSpec sort );
+ virtual void setSorting( TQDir::SortSpec sort );
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
/**
* This overrides KFileView::actionCollection() by returning
@@ -96,7 +96,7 @@ public:
void ensureItemVisible(const KFileItem *);
- void setPreviewWidget(const QWidget *w, const KURL &u);
+ void setPreviewWidget(const TQWidget *w, const KURL &u);
protected slots:
virtual void slotHighlighted( const KFileItem * );
@@ -109,8 +109,8 @@ private:
void init( KFileView *view );
KFileView *left;
- QWidget *preview;
- QString viewname;
+ TQWidget *preview;
+ TQString viewname;
protected:
/** \internal */
diff --git a/kio/kfile/kfilesharedlg.cpp b/kio/kfile/kfilesharedlg.cpp
index 9be183728..788edee51 100644
--- a/kio/kfile/kfilesharedlg.cpp
+++ b/kio/kfile/kfilesharedlg.cpp
@@ -18,12 +18,12 @@
*/
#include "kfilesharedlg.h"
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
#include <kprocess.h>
#include <kprocio.h>
#include <klocale.h>
@@ -35,7 +35,7 @@
#include <errno.h>
#include <kio/kfileshare.h>
#include <kseparator.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <ksimpleconfig.h>
#include <kmessagebox.h>
@@ -43,7 +43,7 @@
class KFileSharePropsPlugin::Private
{
public:
- QVBox *m_vBox;
+ TQVBox *m_vBox;
KProcess *m_configProc;
bool m_bAllShared;
bool m_bAllUnshared;
@@ -98,14 +98,14 @@ void KFileSharePropsPlugin::init()
delete m_widget;
m_rbShare = 0L;
m_rbUnShare = 0L;
- m_widget = new QWidget( d->m_vBox );
- QVBoxLayout * vbox = new QVBoxLayout( m_widget );
+ m_widget = new TQWidget( d->m_vBox );
+ TQVBoxLayout * vbox = new TQVBoxLayout( m_widget );
switch ( KFileShare::authorization() ) {
case KFileShare::Authorized:
{
// Check if all selected dirs are in $HOME
- QString home = QDir::homeDirPath();
+ TQString home = TQDir::homeDirPath();
if ( home[home.length()-1] != '/' )
home += '/';
bool ok = true;
@@ -115,7 +115,7 @@ void KFileSharePropsPlugin::init()
d->m_bAllUnshared = true;
KFileItemListIterator it( items );
for ( ; it.current() && ok; ++it ) {
- QString path = (*it)->url().path();
+ TQString path = (*it)->url().path();
if ( !path.startsWith( home ) )
ok = false;
if ( KFileShare::isDirectoryShared( path ) )
@@ -125,7 +125,7 @@ void KFileSharePropsPlugin::init()
}
if ( !ok )
{
- vbox->addWidget( new QLabel( i18n( "Only folders in your home folder can be shared."),
+ vbox->addWidget( new TQLabel( i18n( "Only folders in your home folder can be shared."),
m_widget ), 0 );
}
else
@@ -134,15 +134,15 @@ void KFileSharePropsPlugin::init()
vbox->setSpacing( KDialog::spacingHint() );
vbox->setMargin( KDialog::marginHint() );
- QButtonGroup *rbGroup = new QButtonGroup( m_widget );
+ TQButtonGroup *rbGroup = new TQButtonGroup( m_widget );
rbGroup->hide();
- m_rbUnShare = new QRadioButton( i18n("Not shared"), m_widget );
- connect( m_rbUnShare, SIGNAL( toggled(bool) ), SIGNAL( changed() ) );
+ m_rbUnShare = new TQRadioButton( i18n("Not shared"), m_widget );
+ connect( m_rbUnShare, TQT_SIGNAL( toggled(bool) ), TQT_SIGNAL( changed() ) );
vbox->addWidget( m_rbUnShare, 0 );
rbGroup->insert( m_rbUnShare );
- m_rbShare = new QRadioButton( i18n("Shared"), m_widget );
- connect( m_rbShare, SIGNAL( toggled(bool) ), SIGNAL( changed() ) );
+ m_rbShare = new TQRadioButton( i18n("Shared"), m_widget );
+ connect( m_rbShare, TQT_SIGNAL( toggled(bool) ), TQT_SIGNAL( changed() ) );
vbox->addWidget( m_rbShare, 0 );
rbGroup->insert( m_rbShare );
@@ -153,17 +153,17 @@ void KFileSharePropsPlugin::init()
m_rbUnShare->setChecked(true);
// Some help text
- QLabel *label = new QLabel( i18n("Sharing this folder makes it available under Linux/UNIX (NFS) and Windows (Samba).") , m_widget );
+ TQLabel *label = new TQLabel( i18n("Sharing this folder makes it available under Linux/UNIX (NFS) and Windows (Samba).") , m_widget );
label->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::WordBreak );
vbox->addWidget( label, 0 );
KSeparator* sep=new KSeparator(m_widget);
vbox->addWidget( sep, 0 );
- label = new QLabel( i18n("You can also reconfigure file sharing authorization.") , m_widget );
+ label = new TQLabel( i18n("You can also reconfigure file sharing authorization.") , m_widget );
label->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::WordBreak );
vbox->addWidget( label, 0 );
- m_pbConfig = new QPushButton( i18n("Configure File Sharing..."), m_widget );
- connect( m_pbConfig, SIGNAL( clicked() ), SLOT( slotConfigureFileSharing() ) );
+ m_pbConfig = new TQPushButton( i18n("Configure File Sharing..."), m_widget );
+ connect( m_pbConfig, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) );
vbox->addWidget( m_pbConfig, 0, Qt::AlignHCenter );
vbox->addStretch( 10 );
@@ -171,23 +171,23 @@ void KFileSharePropsPlugin::init()
}
break;
case KFileShare::ErrorNotFound:
- vbox->addWidget( new QLabel( i18n("Error running 'filesharelist'. Check if installed and in $PATH or /usr/sbin."),
+ vbox->addWidget( new TQLabel( i18n("Error running 'filesharelist'. Check if installed and in $PATH or /usr/sbin."),
m_widget ), 0 );
break;
case KFileShare::UserNotAllowed:
{
vbox->setSpacing( 10 );
if (KFileShare::sharingEnabled()) {
- vbox->addWidget( new QLabel( i18n("You need to be authorized to share folders."),
+ vbox->addWidget( new TQLabel( i18n("You need to be authorized to share folders."),
m_widget ), 0 );
} else {
- vbox->addWidget( new QLabel( i18n("File sharing is disabled."),
+ vbox->addWidget( new TQLabel( i18n("File sharing is disabled."),
m_widget ), 0 );
}
- QHBoxLayout* hBox = new QHBoxLayout( (QWidget *)0L );
+ TQHBoxLayout* hBox = new TQHBoxLayout( (TQWidget *)0L );
vbox->addLayout( hBox, 0 );
- m_pbConfig = new QPushButton( i18n("Configure File Sharing..."), m_widget );
- connect( m_pbConfig, SIGNAL( clicked() ), SLOT( slotConfigureFileSharing() ) );
+ m_pbConfig = new TQPushButton( i18n("Configure File Sharing..."), m_widget );
+ connect( m_pbConfig, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) );
hBox->addWidget( m_pbConfig, 0, Qt::AlignHCenter );
vbox->addStretch( 10 ); // align items on top
break;
@@ -211,8 +211,8 @@ void KFileSharePropsPlugin::slotConfigureFileSharing()
d->m_configProc = 0;
return;
}
- connect(d->m_configProc, SIGNAL(processExited(KProcess *)),
- this, SLOT(slotConfigureFileSharingDone()));
+ connect(d->m_configProc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(slotConfigureFileSharingDone()));
m_pbConfig->setEnabled(false);
}
@@ -241,7 +241,7 @@ void KFileSharePropsPlugin::applyChanges()
KFileItemListIterator it( items );
bool ok = true;
for ( ; it.current() && ok; ++it ) {
- QString path = (*it)->url().path();
+ TQString path = (*it)->url().path();
ok = setShared( path, share );
if (!ok) {
if (share)
@@ -267,13 +267,13 @@ void KFileSharePropsPlugin::applyChanges()
}
}
-bool KFileSharePropsPlugin::setShared( const QString& path, bool shared )
+bool KFileSharePropsPlugin::setShared( const TQString& path, bool shared )
{
kdDebug() << "KFileSharePropsPlugin::setShared " << path << "," << shared << endl;
return KFileShare::setShared( path, shared );
}
-QWidget* KFileSharePropsPlugin::page() const
+TQWidget* KFileSharePropsPlugin::page() const
{
return d->m_vBox;
}
diff --git a/kio/kfile/kfilesharedlg.h b/kio/kfile/kfilesharedlg.h
index c95de779b..a314d0d06 100644
--- a/kio/kfile/kfilesharedlg.h
+++ b/kio/kfile/kfilesharedlg.h
@@ -46,7 +46,7 @@ public:
static bool supports( const KFileItemList& items );
- QWidget* page() const;
+ TQWidget* page() const;
protected slots:
void slotConfigureFileSharing();
@@ -54,12 +54,12 @@ protected slots:
private:
void init();
- bool setShared( const QString&path, bool shared );
+ bool setShared( const TQString&path, bool shared );
- QWidget *m_widget;
- QRadioButton *m_rbShare;
- QRadioButton *m_rbUnShare;
- QPushButton *m_pbConfig;
+ TQWidget *m_widget;
+ TQRadioButton *m_rbShare;
+ TQRadioButton *m_rbUnShare;
+ TQPushButton *m_pbConfig;
class Private;
Private *d;
};
diff --git a/kio/kfile/kfilespeedbar.cpp b/kio/kfile/kfilespeedbar.cpp
index 350423d35..154009625 100644
--- a/kio/kfile/kfilespeedbar.cpp
+++ b/kio/kfile/kfilespeedbar.cpp
@@ -19,10 +19,10 @@
#include "kfilespeedbar.h"
#include "config-kfile.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
#include <kconfig.h>
#include <kglobal.h>
@@ -32,7 +32,7 @@
#include <kstandarddirs.h>
#include <kurl.h>
-KFileSpeedBar::KFileSpeedBar( QWidget *parent, const char *name )
+KFileSpeedBar::KFileSpeedBar( TQWidget *parent, const char *name )
: KURLBar( true, parent, name )
{
KConfig *config = KGlobal::config();
@@ -49,14 +49,14 @@ KFileSpeedBar::KFileSpeedBar( QWidget *parent, const char *name )
insertItem( u, i18n("Desktop"), false );
//TODO: win32
- if ((KGlobalSettings::documentPath() != (QDir::homeDirPath()+"/")) &&
- QDir(KGlobalSettings::documentPath()).exists())
+ if ((KGlobalSettings::documentPath() != (TQDir::homeDirPath()+"/")) &&
+ TQDir(KGlobalSettings::documentPath()).exists())
{
u.setPath( KGlobalSettings::documentPath() );
insertItem( u, i18n("Documents"), false, "folder_txt" );
}
- u.setPath( QDir::homeDirPath() );
+ u.setPath( TQDir::homeDirPath() );
insertItem( u, i18n("Home Folder"), false,
"folder_home" );
@@ -65,33 +65,33 @@ KFileSpeedBar::KFileSpeedBar( QWidget *parent, const char *name )
insertItem( u, i18n("Storage Media"), false,
KProtocolInfo::icon( "media" ) );
- if ( QFile::exists( QDir::homeDirPath()+"/.config/user-dirs.dirs" ) )
+ if ( TQFile::exists( TQDir::homeDirPath()+"/.config/user-dirs.dirs" ) )
{
- QString download, music, pictures, videos, templates, publicShares;
+ TQString download, music, pictures, videos, templates, publicShares;
- QFile f( QDir::homeDirPath()+"/.config/user-dirs.dirs" );
+ TQFile f( TQDir::homeDirPath()+"/.config/user-dirs.dirs" );
if (!f.open(IO_ReadOnly))
return;
- QTextStream s( &f );
- s.setCodec( QTextCodec::codecForLocale() );
+ TQTextStream s( &f );
+ s.setCodec( TQTextCodec::codecForLocale() );
// read the xdg user dirs
- QString line = s.readLine();
+ TQString line = s.readLine();
while (!line.isNull())
{
if (line.startsWith("XDG_DOWNLOAD_DIR="))
- download = line.remove("XDG_DOWNLOAD_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ download = line.remove("XDG_DOWNLOAD_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_MUSIC_DIR="))
- music = line.remove("XDG_MUSIC_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ music = line.remove("XDG_MUSIC_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_PICTURES_DIR="))
- pictures = line.remove("XDG_PICTURES_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ pictures = line.remove("XDG_PICTURES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_VIDEOS_DIR="))
- videos = line.remove("XDG_VIDEOS_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ videos = line.remove("XDG_VIDEOS_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_TEMPLATES_DIR="))
- templates = line.remove("XDG_TEMPLATES_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ templates = line.remove("XDG_TEMPLATES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_PUBLICSHARES_DIR="))
- publicShares = line.remove("XDG_PUBLICSHARES_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ publicShares = line.remove("XDG_PUBLICSHARES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
line = s.readLine();
}
@@ -133,9 +133,9 @@ void KFileSpeedBar::save( KConfig *config )
writeConfig( config, "KFileDialog Speedbar" );
}
-QSize KFileSpeedBar::sizeHint() const
+TQSize KFileSpeedBar::sizeHint() const
{
- QSize sizeHint = KURLBar::sizeHint();
+ TQSize sizeHint = KURLBar::sizeHint();
int ems = fontMetrics().width("mmmmmmmmmmmm");
if (sizeHint.width() < ems)
{
diff --git a/kio/kfile/kfilespeedbar.h b/kio/kfile/kfilespeedbar.h
index c941a2398..28c621651 100644
--- a/kio/kfile/kfilespeedbar.h
+++ b/kio/kfile/kfilespeedbar.h
@@ -27,11 +27,11 @@ class KIO_EXPORT KFileSpeedBar : public KURLBar
{
Q_OBJECT
public:
- KFileSpeedBar( QWidget *parent = 0, const char *name = 0 );
+ KFileSpeedBar( TQWidget *parent = 0, const char *name = 0 );
~KFileSpeedBar();
virtual void save( KConfig *config );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
private:
bool m_initializeSpeedbar : 1;
diff --git a/kio/kfile/kfiletreebranch.cpp b/kio/kfile/kfiletreebranch.cpp
index b37662f89..352bd875e 100644
--- a/kio/kfile/kfiletreebranch.cpp
+++ b/kio/kfile/kfiletreebranch.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kfileitem.h>
#include <kdebug.h>
@@ -34,8 +34,8 @@
/* --- KFileTreeViewToplevelItem --- */
KFileTreeBranch::KFileTreeBranch( KFileTreeView *parent, const KURL& url,
- const QString& name,
- const QPixmap& pix, bool showHidden,
+ const TQString& name,
+ const TQPixmap& pix, bool showHidden,
KFileTreeViewItem *branchRoot )
: KDirLister( false ),
@@ -64,37 +64,37 @@ KFileTreeBranch::KFileTreeBranch( KFileTreeView *parent, const KURL& url,
setShowingDotFiles( showHidden );
- connect( this, SIGNAL( refreshItems(const KFileItemList&)),
- this, SLOT ( slotRefreshItems( const KFileItemList& )));
+ connect( this, TQT_SIGNAL( refreshItems(const KFileItemList&)),
+ this, TQT_SLOT ( slotRefreshItems( const KFileItemList& )));
- connect( this, SIGNAL( newItems(const KFileItemList&)),
- this, SLOT ( addItems( const KFileItemList& )));
+ connect( this, TQT_SIGNAL( newItems(const KFileItemList&)),
+ this, TQT_SLOT ( addItems( const KFileItemList& )));
- connect( this, SIGNAL( completed(const KURL& )),
- this, SLOT(slCompleted(const KURL&)));
+ connect( this, TQT_SIGNAL( completed(const KURL& )),
+ this, TQT_SLOT(slCompleted(const KURL&)));
- connect( this, SIGNAL( started( const KURL& )),
- this, SLOT( slotListerStarted( const KURL& )));
+ connect( this, TQT_SIGNAL( started( const KURL& )),
+ this, TQT_SLOT( slotListerStarted( const KURL& )));
- connect( this, SIGNAL( deleteItem( KFileItem* )),
- this, SLOT( slotDeleteItem( KFileItem* )));
+ connect( this, TQT_SIGNAL( deleteItem( KFileItem* )),
+ this, TQT_SLOT( slotDeleteItem( KFileItem* )));
- connect( this, SIGNAL( canceled(const KURL&) ),
- this, SLOT( slotCanceled(const KURL&) ));
+ connect( this, TQT_SIGNAL( canceled(const KURL&) ),
+ this, TQT_SLOT( slotCanceled(const KURL&) ));
- connect( this, SIGNAL( clear()),
- this, SLOT( slotDirlisterClear()));
+ connect( this, TQT_SIGNAL( clear()),
+ this, TQT_SLOT( slotDirlisterClear()));
- connect( this, SIGNAL( clear(const KURL&)),
- this, SLOT( slotDirlisterClearURL(const KURL&)));
+ connect( this, TQT_SIGNAL( clear(const KURL&)),
+ this, TQT_SLOT( slotDirlisterClearURL(const KURL&)));
- connect( this, SIGNAL( redirection( const KURL& , const KURL& ) ),
- this, SLOT( slotRedirect( const KURL&, const KURL& )));
+ connect( this, TQT_SIGNAL( redirection( const KURL& , const KURL& ) ),
+ this, TQT_SLOT( slotRedirect( const KURL&, const KURL& )));
m_openChildrenURLs.append( url );
}
-void KFileTreeBranch::setOpenPixmap( const QPixmap& pix )
+void KFileTreeBranch::setOpenPixmap( const TQPixmap& pix )
{
m_openRootIcon = pix;
@@ -123,7 +123,7 @@ KFileTreeViewItem *KFileTreeBranch::parentKFTVItem( KFileItem *item )
KURL url = item->url();
// kdDebug(250) << "Item's url is " << url.prettyURL() << endl;
KURL dirUrl( url );
- dirUrl.setFileName( QString::null );
+ dirUrl.setFileName( TQString::null );
// kdDebug(250) << "Directory url is " << dirUrl.prettyURL() << endl;
parent = findTVIByURL( dirUrl );
@@ -181,7 +181,7 @@ void KFileTreeBranch::addItems( const KFileItemList& list )
/* Cut off the file extension in case it is not a directory */
if( !m_showExtensions && !currItem->isDir() ) /* Need to cut the extension */
{
- QString name = currItem->text();
+ TQString name = currItem->text();
int mPoint = name.findRev( '.' );
if( mPoint > 0 )
name = name.left( mPoint );
@@ -195,13 +195,13 @@ void KFileTreeBranch::addItems( const KFileItemList& list )
if( dirOnlyMode() && !m_recurseChildren && currItem->isLocalFile( ) && currItem->isDir() )
{
KURL url = currItem->url();
- QString filename = url.directory( false, true ) + url.fileName();
+ TQString filename = url.directory( false, true ) + url.fileName();
/* do the stat trick of Carsten. The problem is, that the hardlink
* count only contains directory links. Thus, this method only seem
* to work in dir-only mode */
kdDebug(250) << "Doing stat on " << filename << endl;
KDE_struct_stat statBuf;
- if( KDE_stat( QFile::encodeName( filename ), &statBuf ) == 0 )
+ if( KDE_stat( TQFile::encodeName( filename ), &statBuf ) == 0 )
{
int hardLinks = statBuf.st_nlink; /* Count of dirs */
kdDebug(250) << "stat succeeded, hardlinks: " << hardLinks << endl;
@@ -346,7 +346,7 @@ void KFileTreeBranch::slotDirlisterClearURL( const KURL& url )
}
}
-void KFileTreeBranch::deleteChildrenOf( QListViewItem *parent )
+void KFileTreeBranch::deleteChildrenOf( TQListViewItem *parent )
{
// for some strange reason, slotDirlisterClearURL() sometimes calls us
// with a 0L parent.
@@ -446,7 +446,7 @@ void KFileTreeBranch::slCompleted( const KURL& url )
/* This is the starting point. The visible folder has finished,
processing the children has not yet started */
nextChild = static_cast<KFileTreeViewItem*>
- (static_cast<QListViewItem*>(currParent)->firstChild());
+ (static_cast<TQListViewItem*>(currParent)->firstChild());
if( ! nextChild )
{
@@ -480,7 +480,7 @@ void KFileTreeBranch::slCompleted( const KURL& url )
openURL( recurseUrl, true );
}
}
- nextChild = static_cast<KFileTreeViewItem*>(static_cast<QListViewItem*>(nextChild->nextSibling()));
+ nextChild = static_cast<KFileTreeViewItem*>(static_cast<TQListViewItem*>(nextChild->nextSibling()));
// kdDebug(250) << "Next child " << m_nextChild << endl;
}
}
diff --git a/kio/kfile/kfiletreebranch.h b/kio/kfile/kfiletreebranch.h
index 97d41d9c3..30f5cf47c 100644
--- a/kio/kfile/kfiletreebranch.h
+++ b/kio/kfile/kfiletreebranch.h
@@ -22,8 +22,8 @@
#ifndef kfile_tree_branch_h
#define kfile_tree_branch_h
-#include <qdict.h>
-#include <qlistview.h>
+#include <tqdict.h>
+#include <tqlistview.h>
#include <kfileitem.h>
#include <kio/global.h>
@@ -59,8 +59,8 @@ public:
* branch, with the default 0 meaning to let KFileTreeBranch create
* it for you.
*/
- KFileTreeBranch( KFileTreeView*, const KURL& url, const QString& name,
- const QPixmap& pix, bool showHidden = false,
+ KFileTreeBranch( KFileTreeView*, const KURL& url, const TQString& name,
+ const TQPixmap& pix, bool showHidden = false,
KFileTreeViewItem *branchRoot = 0 );
/**
@@ -84,19 +84,19 @@ public:
/**
* @returns the name of the branch.
*/
- QString name() const { return( m_name ); }
+ TQString name() const { return( m_name ); }
/**
* sets the name of the branch.
*/
- virtual void setName( const QString n ) { m_name = n; };
+ virtual void setName( const TQString n ) { m_name = n; };
/*
* returns the current root item pixmap set in the constructor. The root
* item pixmap defaults to the icon for directories.
* @see openPixmap()
*/
- const QPixmap& pixmap(){ return(m_rootIcon); }
+ const TQPixmap& pixmap(){ return(m_rootIcon); }
/*
* returns the current root item pixmap set by setOpenPixmap()
@@ -106,7 +106,7 @@ public:
* Note that it depends on KFileTreeView::showFolderOpenPximap weather
* open pixmap are displayed or not.
*/
- const QPixmap& openPixmap() { return(m_openRootIcon); }
+ const TQPixmap& openPixmap() { return(m_openRootIcon); }
/**
* @returns whether the items in the branch show their file extensions in the
@@ -154,7 +154,7 @@ public slots:
*/
virtual void setShowExtensions( bool visible = true );
- void setOpenPixmap( const QPixmap& pix );
+ void setOpenPixmap( const TQPixmap& pix );
protected:
/**
@@ -201,13 +201,13 @@ private slots:
private:
KFileTreeViewItem *parentKFTVItem( KFileItem *item );
- static void deleteChildrenOf( QListViewItem *parent );
+ static void deleteChildrenOf( TQListViewItem *parent );
KFileTreeViewItem *m_root;
KURL m_startURL;
- QString m_name;
- QPixmap m_rootIcon;
- QPixmap m_openRootIcon;
+ TQString m_name;
+ TQPixmap m_rootIcon;
+ TQPixmap m_openRootIcon;
/* this list holds the url's which children are opened. */
KURL::List m_openChildrenURLs;
@@ -231,12 +231,12 @@ private:
/**
* List of KFileTreeBranches
*/
-typedef QPtrList<KFileTreeBranch> KFileTreeBranchList;
+typedef TQPtrList<KFileTreeBranch> KFileTreeBranchList;
/**
* Iterator for KFileTreeBranchLists
*/
-typedef QPtrListIterator<KFileTreeBranch> KFileTreeBranchIterator;
+typedef TQPtrListIterator<KFileTreeBranch> KFileTreeBranchIterator;
#endif
diff --git a/kio/kfile/kfiletreeview.cpp b/kio/kfile/kfiletreeview.cpp
index 542e80d5b..e8451077d 100644
--- a/kio/kfile/kfiletreeview.cpp
+++ b/kio/kfile/kfiletreeview.cpp
@@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qheader.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqheader.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kdirnotify_stub.h>
#include <kglobalsettings.h>
@@ -39,7 +39,7 @@
#include "kfiletreebranch.h"
#include "kfiletreeviewitem.h"
-KFileTreeView::KFileTreeView( QWidget *parent, const char *name )
+KFileTreeView::KFileTreeView( TQWidget *parent, const char *name )
: KListView( parent, name ),
m_wantOpenFolderPixmaps( true ),
m_toolTip( this )
@@ -47,33 +47,33 @@ KFileTreeView::KFileTreeView( QWidget *parent, const char *name )
setDragEnabled(true);
setSelectionModeExt( KListView::Single );
- m_animationTimer = new QTimer( this );
- connect( m_animationTimer, SIGNAL( timeout() ),
- this, SLOT( slotAnimation() ) );
+ m_animationTimer = new TQTimer( this );
+ connect( m_animationTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAnimation() ) );
m_currentBeforeDropItem = 0;
m_dropItem = 0;
- m_autoOpenTimer = new QTimer( this );
- connect( m_autoOpenTimer, SIGNAL( timeout() ),
- this, SLOT( slotAutoOpenFolder() ) );
+ m_autoOpenTimer = new TQTimer( this );
+ connect( m_autoOpenTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoOpenFolder() ) );
/* The executed-Slot only opens a path, while the expanded-Slot populates it */
- connect( this, SIGNAL( executed( QListViewItem * ) ),
- this, SLOT( slotExecuted( QListViewItem * ) ) );
- connect( this, SIGNAL( expanded ( QListViewItem *) ),
- this, SLOT( slotExpanded( QListViewItem *) ));
- connect( this, SIGNAL( collapsed( QListViewItem *) ),
- this, SLOT( slotCollapsed( QListViewItem* )));
+ connect( this, TQT_SIGNAL( executed( TQListViewItem * ) ),
+ this, TQT_SLOT( slotExecuted( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( expanded ( TQListViewItem *) ),
+ this, TQT_SLOT( slotExpanded( TQListViewItem *) ));
+ connect( this, TQT_SIGNAL( collapsed( TQListViewItem *) ),
+ this, TQT_SLOT( slotCollapsed( TQListViewItem* )));
/* connections from the konqtree widget */
- connect( this, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
- connect( this, SIGNAL( onItem( QListViewItem * )),
- this, SLOT( slotOnItem( QListViewItem * ) ) );
- connect( this, SIGNAL(itemRenamed(QListViewItem*, const QString &, int)),
- this, SLOT(slotItemRenamed(QListViewItem*, const QString &, int)));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
+ connect( this, TQT_SIGNAL( onItem( TQListViewItem * )),
+ this, TQT_SLOT( slotOnItem( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString &, int)),
+ this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString &, int)));
m_bDrag = false;
@@ -93,12 +93,12 @@ KFileTreeView::~KFileTreeView()
}
-bool KFileTreeView::isValidItem( QListViewItem *item)
+bool KFileTreeView::isValidItem( TQListViewItem *item)
{
if (!item)
return false;
- QPtrList<QListViewItem> lst;
- QListViewItemIterator it( this );
+ TQPtrList<TQListViewItem> lst;
+ TQListViewItemIterator it( this );
while ( it.current() )
{
if ( it.current() == item )
@@ -108,7 +108,7 @@ bool KFileTreeView::isValidItem( QListViewItem *item)
return false;
}
-void KFileTreeView::contentsDragEnterEvent( QDragEnterEvent *ev )
+void KFileTreeView::contentsDragEnterEvent( TQDragEnterEvent *ev )
{
if ( ! acceptDrag( ev ) )
{
@@ -118,7 +118,7 @@ void KFileTreeView::contentsDragEnterEvent( QDragEnterEvent *ev )
ev->acceptAction();
m_currentBeforeDropItem = selectedItem();
- QListViewItem *item = itemAt( contentsToViewport( ev->pos() ) );
+ TQListViewItem *item = itemAt( contentsToViewport( ev->pos() ) );
if( item )
{
m_dropItem = item;
@@ -130,7 +130,7 @@ void KFileTreeView::contentsDragEnterEvent( QDragEnterEvent *ev )
}
}
-void KFileTreeView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KFileTreeView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if( ! acceptDrag( e ) )
{
@@ -140,13 +140,13 @@ void KFileTreeView::contentsDragMoveEvent( QDragMoveEvent *e )
e->acceptAction();
- QListViewItem *afterme;
- QListViewItem *parent;
+ TQListViewItem *afterme;
+ TQListViewItem *parent;
findDrop( e->pos(), parent, afterme );
// "afterme" is 0 when aiming at a directory itself
- QListViewItem *item = afterme ? afterme : parent;
+ TQListViewItem *item = afterme ? afterme : parent;
if( item && item->isSelectable() )
{
@@ -164,7 +164,7 @@ void KFileTreeView::contentsDragMoveEvent( QDragMoveEvent *e )
}
}
-void KFileTreeView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KFileTreeView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
// Restore the current item to what it was before the dragging (#17070)
if ( isValidItem(m_currentBeforeDropItem) )
@@ -179,7 +179,7 @@ void KFileTreeView::contentsDragLeaveEvent( QDragLeaveEvent * )
}
-void KFileTreeView::contentsDropEvent( QDropEvent *e )
+void KFileTreeView::contentsDropEvent( TQDropEvent *e )
{
m_autoOpenTimer->stop();
@@ -192,12 +192,12 @@ void KFileTreeView::contentsDropEvent( QDropEvent *e )
}
e->acceptAction();
- QListViewItem *afterme;
- QListViewItem *parent;
+ TQListViewItem *afterme;
+ TQListViewItem *parent;
findDrop(e->pos(), parent, afterme);
- //kdDebug(250) << " parent=" << (parent?parent->text(0):QString::null)
- // << " afterme=" << (afterme?afterme->text(0):QString::null) << endl;
+ //kdDebug(250) << " parent=" << (parent?parent->text(0):TQString::null)
+ // << " afterme=" << (afterme?afterme->text(0):TQString::null) << endl;
if (e->source() == viewport() && itemsMovable())
movableDropEvent(parent, afterme);
@@ -225,7 +225,7 @@ void KFileTreeView::contentsDropEvent( QDropEvent *e )
}
}
-bool KFileTreeView::acceptDrag(QDropEvent* e ) const
+bool KFileTreeView::acceptDrag(TQDropEvent* e ) const
{
bool ancestOK= acceptDrops();
@@ -242,25 +242,25 @@ bool KFileTreeView::acceptDrag(QDropEvent* e ) const
*/
return ancestOK && KURLDrag::canDecode( e ) &&
// Why this test? All DnDs are one of those AFAIK (DF)
- ( e->action() == QDropEvent::Copy
- || e->action() == QDropEvent::Move
- || e->action() == QDropEvent::Link );
+ ( e->action() == TQDropEvent::Copy
+ || e->action() == TQDropEvent::Move
+ || e->action() == TQDropEvent::Link );
}
-QDragObject * KFileTreeView::dragObject()
+TQDragObject * KFileTreeView::dragObject()
{
KURL::List urls;
- const QPtrList<QListViewItem> fileList = selectedItems();
- QPtrListIterator<QListViewItem> it( fileList );
+ const TQPtrList<TQListViewItem> fileList = selectedItems();
+ TQPtrListIterator<TQListViewItem> it( fileList );
for ( ; it.current(); ++it )
{
urls.append( static_cast<KFileTreeViewItem*>(it.current())->url() );
}
- QPoint hotspot;
- QPixmap pixmap;
+ TQPoint hotspot;
+ TQPixmap pixmap;
if( urls.count() > 1 ){
pixmap = DesktopIcon( "kmultiple", 16 );
}
@@ -268,7 +268,7 @@ QDragObject * KFileTreeView::dragObject()
pixmap = currentKFileTreeViewItem()->fileItem()->pixmap( 16 );
hotspot.setX( pixmap.width() / 2 );
hotspot.setY( pixmap.height() / 2 );
- QDragObject* dragObject = new KURLDrag( urls, this );
+ TQDragObject* dragObject = new KURLDrag( urls, this );
if( dragObject )
dragObject->setPixmap( pixmap, hotspot );
return dragObject;
@@ -276,7 +276,7 @@ QDragObject * KFileTreeView::dragObject()
-void KFileTreeView::slotCollapsed( QListViewItem *item )
+void KFileTreeView::slotCollapsed( TQListViewItem *item )
{
KFileTreeViewItem *kftvi = static_cast<KFileTreeViewItem*>(item);
kdDebug(250) << "hit slotCollapsed" << endl;
@@ -286,7 +286,7 @@ void KFileTreeView::slotCollapsed( QListViewItem *item )
}
}
-void KFileTreeView::slotExpanded( QListViewItem *item )
+void KFileTreeView::slotExpanded( TQListViewItem *item )
{
kdDebug(250) << "slotExpanded here !" << endl;
@@ -320,7 +320,7 @@ void KFileTreeView::slotExpanded( QListViewItem *item )
-void KFileTreeView::slotExecuted( QListViewItem *item )
+void KFileTreeView::slotExecuted( TQListViewItem *item )
{
if ( !item )
return;
@@ -354,16 +354,16 @@ void KFileTreeView::slotSelectionChanged()
}
-KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const QString& name,
+KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const TQString& name,
bool showHidden )
{
- const QPixmap& folderPix = KMimeType::mimeType("inode/directory")->pixmap( KIcon::Desktop,KIcon::SizeSmall );
+ const TQPixmap& folderPix = KMimeType::mimeType("inode/directory")->pixmap( KIcon::Desktop,KIcon::SizeSmall );
return addBranch( path, name, folderPix, showHidden);
}
-KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const QString& name,
- const QPixmap& pix, bool showHidden )
+KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const TQString& name,
+ const TQPixmap& pix, bool showHidden )
{
kdDebug(250) << "adding another root " << path.prettyURL() << endl;
@@ -375,26 +375,26 @@ KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const QString& name
KFileTreeBranch *KFileTreeView::addBranch(KFileTreeBranch *newBranch)
{
- connect( newBranch, SIGNAL(populateFinished( KFileTreeViewItem* )),
- this, SLOT( slotPopulateFinished( KFileTreeViewItem* )));
+ connect( newBranch, TQT_SIGNAL(populateFinished( KFileTreeViewItem* )),
+ this, TQT_SLOT( slotPopulateFinished( KFileTreeViewItem* )));
- connect( newBranch, SIGNAL( newTreeViewItems( KFileTreeBranch*,
+ connect( newBranch, TQT_SIGNAL( newTreeViewItems( KFileTreeBranch*,
const KFileTreeViewItemList& )),
- this, SLOT( slotNewTreeViewItems( KFileTreeBranch*,
+ this, TQT_SLOT( slotNewTreeViewItems( KFileTreeBranch*,
const KFileTreeViewItemList& )));
m_branches.append( newBranch );
return( newBranch );
}
-KFileTreeBranch *KFileTreeView::branch( const QString& searchName )
+KFileTreeBranch *KFileTreeView::branch( const TQString& searchName )
{
KFileTreeBranch *branch = 0;
- QPtrListIterator<KFileTreeBranch> it( m_branches );
+ TQPtrListIterator<KFileTreeBranch> it( m_branches );
while ( (branch = it.current()) != 0 ) {
++it;
- QString bname = branch->name();
+ TQString bname = branch->name();
kdDebug(250) << "This is the branches name: " << bname << endl;
if( bname == searchName )
{
@@ -463,7 +463,7 @@ void KFileTreeView::slotNewTreeViewItems( KFileTreeBranch* branch, const KFileTr
if( m_nextUrlToSelect.equals(url, true )) // ignore trailing / on dirs
{
- setCurrentItem( static_cast<QListViewItem*>(*it) );
+ setCurrentItem( static_cast<TQListViewItem*>(*it) );
m_nextUrlToSelect = KURL();
end = true;
}
@@ -471,9 +471,9 @@ void KFileTreeView::slotNewTreeViewItems( KFileTreeBranch* branch, const KFileTr
}
}
-QPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const
+TQPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const
{
- QPixmap pix;
+ TQPixmap pix;
kdDebug(250) << "Setting icon for column " << gap << endl;
if( item )
@@ -497,7 +497,7 @@ QPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const
* change the fileitem's pixmap to the open folder pixmap. */
if( item->isDir() && m_wantOpenFolderPixmaps )
{
- if( isOpen( static_cast<QListViewItem*>(item)))
+ if( isOpen( static_cast<TQListViewItem*>(item)))
pix = m_openFolderPixmap;
}
}
@@ -522,7 +522,7 @@ void KFileTreeView::slotAnimation()
}
uint & iconNumber = it.data().iconNumber;
- QString icon = QString::fromLatin1( it.data().iconBaseName ).append( QString::number( iconNumber ) );
+ TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) );
// kdDebug(250) << "Loading icon " << icon << endl;
item->setPixmap( 0, DesktopIcon( icon,KIcon::SizeSmall,KIcon::ActiveState )); // KFileTreeViewFactory::instance() ) );
@@ -597,7 +597,7 @@ KURL KFileTreeView::currentURL() const
return KURL();
}
-void KFileTreeView::slotOnItem( QListViewItem *item )
+void KFileTreeView::slotOnItem( TQListViewItem *item )
{
KFileTreeViewItem *i = static_cast<KFileTreeViewItem *>( item );
if( i )
@@ -610,28 +610,28 @@ void KFileTreeView::slotOnItem( QListViewItem *item )
}
}
-void KFileTreeView::slotItemRenamed(QListViewItem* item, const QString &name, int col)
+void KFileTreeView::slotItemRenamed(TQListViewItem* item, const TQString &name, int col)
{
(void) item;
kdDebug(250) << "Do not bother: " << name << col << endl;
}
-KFileTreeViewItem *KFileTreeView::findItem( const QString& branchName, const QString& relUrl )
+KFileTreeViewItem *KFileTreeView::findItem( const TQString& branchName, const TQString& relUrl )
{
KFileTreeBranch *br = branch( branchName );
return( findItem( br, relUrl ));
}
-KFileTreeViewItem *KFileTreeView::findItem( KFileTreeBranch* brnch, const QString& relUrl )
+KFileTreeViewItem *KFileTreeView::findItem( KFileTreeBranch* brnch, const TQString& relUrl )
{
KFileTreeViewItem *ret = 0;
if( brnch )
{
KURL url = brnch->rootUrl();
- if( ! relUrl.isEmpty() && QDir::isRelativePath(relUrl) )
+ if( ! relUrl.isEmpty() && TQDir::isRelativePath(relUrl) )
{
- QString partUrl( relUrl );
+ TQString partUrl( relUrl );
if( partUrl.endsWith("/"))
partUrl.truncate( relUrl.length()-1 );
@@ -659,12 +659,12 @@ KFileTreeViewItem *KFileTreeView::findItem( KFileTreeBranch* brnch, const QStrin
///////////////////////////////////////////////////////////////////
-void KFileTreeViewToolTip::maybeTip( const QPoint & )
+void KFileTreeViewToolTip::maybeTip( const TQPoint & )
{
#if 0
- QListViewItem *item = m_view->itemAt( point );
+ TQListViewItem *item = m_view->itemAt( point );
if ( item ) {
- QString text = static_cast<KFileViewItem*>( item )->toolTipText();
+ TQString text = static_cast<KFileViewItem*>( item )->toolTipText();
if ( !text.isEmpty() )
tip ( m_view->itemRect( item ), text );
}
diff --git a/kio/kfile/kfiletreeview.h b/kio/kfile/kfiletreeview.h
index 93af623a6..d534fb4fb 100644
--- a/kio/kfile/kfiletreeview.h
+++ b/kio/kfile/kfiletreeview.h
@@ -21,11 +21,11 @@
#ifndef kfile_tree_view_h
#define kfile_tree_view_h
-#include <qmap.h>
-#include <qpoint.h>
-#include <qpixmap.h>
-#include <qstrlist.h>
-#include <qtooltip.h>
+#include <tqmap.h>
+#include <tqpoint.h>
+#include <tqpixmap.h>
+#include <tqstrlist.h>
+#include <tqtooltip.h>
#include <klistview.h>
#include <kdirnotify.h>
@@ -40,13 +40,13 @@ class QTimer;
class KIO_EXPORT KFileTreeViewToolTip : public QToolTip
{
public:
- KFileTreeViewToolTip( QListView *view ) : QToolTip( view ), m_view( view ) {}
+ KFileTreeViewToolTip( TQListView *view ) : TQToolTip( view ), m_view( view ) {}
protected:
- virtual void maybeTip( const QPoint & );
+ virtual void maybeTip( const TQPoint & );
private:
- QListView *m_view;
+ TQListView *m_view;
};
@@ -67,7 +67,7 @@ class KIO_EXPORT KFileTreeView : public KListView
{
Q_OBJECT
public:
- KFileTreeView( QWidget *parent, const char *name = 0 );
+ KFileTreeView( TQWidget *parent, const char *name = 0 );
virtual ~KFileTreeView();
/**
@@ -93,13 +93,13 @@ public:
* @param name is the name of the branch, which will be the text for column 0
* @param showHidden says if hidden files and directories should be visible
*/
- KFileTreeBranch* addBranch( const KURL &path, const QString& name, bool showHidden = false );
+ KFileTreeBranch* addBranch( const KURL &path, const TQString& name, bool showHidden = false );
/**
* same as the function above but with a pixmap to set for the branch.
*/
- virtual KFileTreeBranch* addBranch( const KURL &path, const QString& name ,
- const QPixmap& pix, bool showHidden = false );
+ virtual KFileTreeBranch* addBranch( const KURL &path, const TQString& name ,
+ const TQPixmap& pix, bool showHidden = false );
/**
* same as the function above but letting the user create the branch.
@@ -117,7 +117,7 @@ public:
* @returns a pointer to the KFileTreeBranch in the KFileTreeView or zero on failure.
* @param searchName is the name of a branch
*/
- KFileTreeBranch *branch( const QString& searchName );
+ KFileTreeBranch *branch( const TQString& searchName );
/**
@@ -139,12 +139,12 @@ public:
* @param brnch is a pointer to the branch to search in
* @param relUrl is the branch relativ url
*/
- KFileTreeViewItem *findItem( KFileTreeBranch* brnch, const QString& relUrl );
+ KFileTreeViewItem *findItem( KFileTreeBranch* brnch, const TQString& relUrl );
/**
* see method above, differs only in the first parameter. Finds the branch by its name.
*/
- KFileTreeViewItem *findItem( const QString& branchName, const QString& relUrl );
+ KFileTreeViewItem *findItem( const TQString& branchName, const TQString& relUrl );
/**
* @returns a flag indicating if extended folder pixmaps are displayed or not.
@@ -168,15 +168,15 @@ protected:
* @returns true if we can decode the drag and support the action
*/
- virtual bool acceptDrag(QDropEvent* event) const;
- virtual QDragObject * dragObject();
+ virtual bool acceptDrag(TQDropEvent* event) const;
+ virtual TQDragObject * dragObject();
virtual void startAnimation( KFileTreeViewItem* item, const char * iconBaseName = "kde", uint iconCount = 6 );
virtual void stopAnimation( KFileTreeViewItem* item );
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDropEvent( QDropEvent *ev );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *ev );
protected slots:
virtual void slotNewTreeViewItems( KFileTreeBranch*,
@@ -185,12 +185,12 @@ protected slots:
virtual void slotSetNextUrlToSelect( const KURL &url )
{ m_nextUrlToSelect = url; }
- virtual QPixmap itemIcon( KFileTreeViewItem*, int gap = 0 ) const;
+ virtual TQPixmap itemIcon( KFileTreeViewItem*, int gap = 0 ) const;
private slots:
- void slotExecuted( QListViewItem * );
- void slotExpanded( QListViewItem * );
- void slotCollapsed( QListViewItem *item );
+ void slotExecuted( TQListViewItem * );
+ void slotExpanded( TQListViewItem * );
+ void slotCollapsed( TQListViewItem *item );
void slotSelectionChanged();
@@ -198,26 +198,26 @@ private slots:
void slotAutoOpenFolder();
- void slotOnItem( QListViewItem * );
- void slotItemRenamed(QListViewItem*, const QString &, int);
+ void slotOnItem( TQListViewItem * );
+ void slotItemRenamed(TQListViewItem*, const TQString &, int);
void slotPopulateFinished( KFileTreeViewItem* );
signals:
- void onItem( const QString& );
+ void onItem( const TQString& );
/* New signals if you like it ? */
- void dropped( QWidget*, QDropEvent* );
- void dropped( QWidget*, QDropEvent*, KURL::List& );
+ void dropped( TQWidget*, TQDropEvent* );
+ void dropped( TQWidget*, TQDropEvent*, KURL::List& );
void dropped( KURL::List&, KURL& );
// The drop event allows to differentiate between move and copy
- void dropped( QWidget*, QDropEvent*, KURL::List&, KURL& );
+ void dropped( TQWidget*, TQDropEvent*, KURL::List&, KURL& );
- void dropped( QDropEvent *e, QListViewItem * after);
- void dropped(KFileTreeView *, QDropEvent *, QListViewItem *);
- void dropped(QDropEvent *e, QListViewItem * parent, QListViewItem * after);
- void dropped(KFileTreeView *, QDropEvent *, QListViewItem *, QListViewItem *);
+ void dropped( TQDropEvent *e, TQListViewItem * after);
+ void dropped(KFileTreeView *, TQDropEvent *, TQListViewItem *);
+ void dropped(TQDropEvent *e, TQListViewItem * parent, TQListViewItem * after);
+ void dropped(KFileTreeView *, TQDropEvent *, TQListViewItem *, TQListViewItem *);
protected:
KURL m_nextUrlToSelect;
@@ -225,7 +225,7 @@ protected:
private:
// Returns whether item is still a valid item in the tree
- bool isValidItem( QListViewItem *item);
+ bool isValidItem( TQListViewItem *item);
void clearTree();
@@ -235,30 +235,30 @@ private:
struct AnimationInfo
{
- AnimationInfo( const char * _iconBaseName, uint _iconCount, const QPixmap & _originalPixmap )
+ AnimationInfo( const char * _iconBaseName, uint _iconCount, const TQPixmap & _originalPixmap )
: iconBaseName(_iconBaseName), iconCount(_iconCount), iconNumber(1), originalPixmap(_originalPixmap) {}
AnimationInfo() : iconCount(0) {}
- QCString iconBaseName;
+ TQCString iconBaseName;
uint iconCount;
uint iconNumber;
- QPixmap originalPixmap;
+ TQPixmap originalPixmap;
};
- typedef QMap<KFileTreeViewItem *, AnimationInfo> MapCurrentOpeningFolders;
+ typedef TQMap<KFileTreeViewItem *, AnimationInfo> MapCurrentOpeningFolders;
MapCurrentOpeningFolders m_mapCurrentOpeningFolders;
- QTimer *m_animationTimer;
+ TQTimer *m_animationTimer;
- QPoint m_dragPos;
+ TQPoint m_dragPos;
bool m_bDrag;
bool m_wantOpenFolderPixmaps; // Flag weather the folder should have open-folder pixmaps
- QListViewItem *m_currentBeforeDropItem; // The item that was current before the drag-enter event happened
- QListViewItem *m_dropItem; // The item we are moving the mouse over (during a drag)
- QStrList m_lstDropFormats;
- QPixmap m_openFolderPixmap;
- QTimer *m_autoOpenTimer;
+ TQListViewItem *m_currentBeforeDropItem; // The item that was current before the drag-enter event happened
+ TQListViewItem *m_dropItem; // The item we are moving the mouse over (during a drag)
+ TQStrList m_lstDropFormats;
+ TQPixmap m_openFolderPixmap;
+ TQTimer *m_autoOpenTimer;
KFileTreeViewToolTip m_toolTip;
diff --git a/kio/kfile/kfiletreeviewitem.cpp b/kio/kfile/kfiletreeviewitem.cpp
index 96c100521..17e2d9abe 100644
--- a/kio/kfile/kfiletreeviewitem.cpp
+++ b/kio/kfile/kfiletreeviewitem.cpp
@@ -42,7 +42,7 @@ KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent,
KFileTreeViewItem::KFileTreeViewItem( KFileTreeView* parent,
KFileItem* item,
KFileTreeBranch *brnch )
- :KListViewItem( (QListView*)parent ),
+ :KListViewItem( (TQListView*)parent ),
m_kfileitem(item ),
m_branch( brnch ),
m_wasListed(false)
@@ -72,9 +72,9 @@ KURL KFileTreeViewItem::url() const
return m_kfileitem ? m_kfileitem->url() : KURL();
}
-QString KFileTreeViewItem::path() const
+TQString KFileTreeViewItem::path() const
{
- return m_kfileitem ? m_kfileitem->url().path() : QString::null;
+ return m_kfileitem ? m_kfileitem->url().path() : TQString::null;
}
bool KFileTreeViewItem::isDir() const
diff --git a/kio/kfile/kfiletreeviewitem.h b/kio/kfile/kfiletreeviewitem.h
index 69e4a2d90..fe338df3b 100644
--- a/kio/kfile/kfiletreeviewitem.h
+++ b/kio/kfile/kfiletreeviewitem.h
@@ -20,7 +20,7 @@
#ifndef kfile_tree_view_item_h
#define kfile_tree_view_item_h
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <klistview.h>
#include <kfileitem.h>
@@ -57,7 +57,7 @@ public:
/**
* @return the path of the item.
*/
- QString path() const;
+ TQString path() const;
/**
* @return the items KURL
@@ -94,12 +94,12 @@ private:
/**
* List of KFileTreeViewItems
*/
-typedef QPtrList<KFileTreeViewItem> KFileTreeViewItemList;
+typedef TQPtrList<KFileTreeViewItem> KFileTreeViewItemList;
/**
* Iterator for KFileTreeViewItemList
*/
-typedef QPtrListIterator<KFileTreeViewItem> KFileTreeViewItemListIterator;
+typedef TQPtrListIterator<KFileTreeViewItem> KFileTreeViewItemListIterator;
#endif
diff --git a/kio/kfile/kfileview.cpp b/kio/kfile/kfileview.cpp
index 976d3b815..165801652 100644
--- a/kio/kfile/kfileview.cpp
+++ b/kio/kfile/kfileview.cpp
@@ -36,7 +36,7 @@
#undef Unsorted
#endif
-QDir::SortSpec KFileView::defaultSortSpec = static_cast<QDir::SortSpec>(QDir::Name | QDir::IgnoreCase | QDir::DirsFirst);
+TQDir::SortSpec KFileView::defaultSortSpec = static_cast<TQDir::SortSpec>(TQDir::Name | TQDir::IgnoreCase | TQDir::DirsFirst);
class KFileView::KFileViewPrivate
{
@@ -55,7 +55,7 @@ public:
}
}
- QGuardedPtr<KActionCollection> actions;
+ TQGuardedPtr<KActionCollection> actions;
int dropOptions;
};
@@ -90,20 +90,20 @@ KFileView::~KFileView()
void KFileView::setParentView(KFileView *parent)
{
if ( parent ) { // pass all signals right to our parent
- QObject::connect(sig, SIGNAL( activatedMenu(const KFileItem *,
- const QPoint& ) ),
- parent->sig, SIGNAL( activatedMenu(const KFileItem *,
- const QPoint& )));
- QObject::connect(sig, SIGNAL( dirActivated(const KFileItem *)),
- parent->sig, SIGNAL( dirActivated(const KFileItem*)));
- QObject::connect(sig, SIGNAL( fileSelected(const KFileItem *)),
- parent->sig, SIGNAL( fileSelected(const KFileItem*)));
- QObject::connect(sig, SIGNAL( fileHighlighted(const KFileItem *) ),
- parent->sig,SIGNAL(fileHighlighted(const KFileItem*)));
- QObject::connect(sig, SIGNAL( sortingChanged( QDir::SortSpec ) ),
- parent->sig, SIGNAL(sortingChanged( QDir::SortSpec)));
- QObject::connect(sig, SIGNAL( dropped(const KFileItem *, QDropEvent*, const KURL::List&) ),
- parent->sig, SIGNAL(dropped(const KFileItem *, QDropEvent*, const KURL::List&)));
+ TQObject::connect(sig, TQT_SIGNAL( activatedMenu(const KFileItem *,
+ const TQPoint& ) ),
+ parent->sig, TQT_SIGNAL( activatedMenu(const KFileItem *,
+ const TQPoint& )));
+ TQObject::connect(sig, TQT_SIGNAL( dirActivated(const KFileItem *)),
+ parent->sig, TQT_SIGNAL( dirActivated(const KFileItem*)));
+ TQObject::connect(sig, TQT_SIGNAL( fileSelected(const KFileItem *)),
+ parent->sig, TQT_SIGNAL( fileSelected(const KFileItem*)));
+ TQObject::connect(sig, TQT_SIGNAL( fileHighlighted(const KFileItem *) ),
+ parent->sig,TQT_SIGNAL(fileHighlighted(const KFileItem*)));
+ TQObject::connect(sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ),
+ parent->sig, TQT_SIGNAL(sortingChanged( TQDir::SortSpec)));
+ TQObject::connect(sig, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&) ),
+ parent->sig, TQT_SIGNAL(dropped(const KFileItem *, TQDropEvent*, const KURL::List&)));
}
}
@@ -148,7 +148,7 @@ void KFileView::insertItem( KFileItem * )
{
}
-void KFileView::setSorting(QDir::SortSpec new_sort)
+void KFileView::setSorting(TQDir::SortSpec new_sort)
{
m_sorting = new_sort;
}
@@ -165,16 +165,16 @@ void KFileView::sortReversed()
{
int spec = sorting();
- setSorting( static_cast<QDir::SortSpec>( spec ^ QDir::Reversed ) );
+ setSorting( static_cast<TQDir::SortSpec>( spec ^ TQDir::Reversed ) );
}
#if 0
int KFileView::compareItems(const KFileItem *fi1, const KFileItem *fi2) const
{
- static const QString &dirup = KGlobal::staticQString("..");
+ static const TQString &dirup = KGlobal::staticQString("..");
bool bigger = true;
bool keepFirst = false;
- bool dirsFirst = ((m_sorting & QDir::DirsFirst) == QDir::DirsFirst);
+ bool dirsFirst = ((m_sorting & TQDir::DirsFirst) == TQDir::DirsFirst);
if (fi1 == fi2)
return 0;
@@ -196,21 +196,21 @@ int KFileView::compareItems(const KFileItem *fi1, const KFileItem *fi2) const
}
else {
- QDir::SortSpec sort = static_cast<QDir::SortSpec>(m_sorting & QDir::SortByMask);
+ TQDir::SortSpec sort = static_cast<TQDir::SortSpec>(m_sorting & TQDir::SortByMask);
//if (fi1->isDir() || fi2->isDir())
- // sort = static_cast<QDir::SortSpec>(KFileView::defaultSortSpec & QDir::SortByMask);
+ // sort = static_cast<TQDir::SortSpec>(KFileView::defaultSortSpec & TQDir::SortByMask);
switch (sort) {
- case QDir::Name:
+ case TQDir::Name:
default:
sort_by_name:
- if ( (m_sorting & QDir::IgnoreCase) == QDir::IgnoreCase )
+ if ( (m_sorting & TQDir::IgnoreCase) == TQDir::IgnoreCase )
bigger = (fi1->name( true ) > fi2->name( true ));
else
bigger = (fi1->name() > fi2->name());
break;
- case QDir::Time:
+ case TQDir::Time:
{
time_t t1 = fi1->time( KIO::UDS_MODIFICATION_TIME );
time_t t2 = fi2->time( KIO::UDS_MODIFICATION_TIME );
@@ -226,7 +226,7 @@ sort_by_name:
goto sort_by_name;
}
}
- case QDir::Size:
+ case TQDir::Size:
{
KIO::filesize_t s1 = fi1->size();
KIO::filesize_t s2 = fi2->size();
@@ -242,7 +242,7 @@ sort_by_name:
goto sort_by_name;
}
}
- case QDir::Unsorted:
+ case TQDir::Unsorted:
bigger = true; // nothing
break;
}
@@ -265,7 +265,7 @@ void KFileView::updateView(const KFileItem *)
{
}
-void KFileView::setCurrentItem(const QString &filename )
+void KFileView::setCurrentItem(const TQString &filename )
{
if (!filename.isNull()) {
KFileItem *item;
@@ -369,27 +369,27 @@ KActionCollection * KFileView::actionCollection() const
return d->actions;
}
-void KFileView::readConfig( KConfig *, const QString& )
+void KFileView::readConfig( KConfig *, const TQString& )
{
}
-void KFileView::writeConfig( KConfig *, const QString& )
+void KFileView::writeConfig( KConfig *, const TQString& )
{
}
-QString KFileView::sortingKey( const QString& value, bool isDir, int sortSpec )
+TQString KFileView::sortingKey( const TQString& value, bool isDir, int sortSpec )
{
- bool reverse = sortSpec & QDir::Reversed;
- bool dirsFirst = sortSpec & QDir::DirsFirst;
+ bool reverse = sortSpec & TQDir::Reversed;
+ bool dirsFirst = sortSpec & TQDir::DirsFirst;
char start = (isDir && dirsFirst) ? (reverse ? '2' : '0') : '1';
- QString result = (sortSpec & QDir::IgnoreCase) ? value.lower() : value;
+ TQString result = (sortSpec & TQDir::IgnoreCase) ? value.lower() : value;
return result.prepend( start );
}
-QString KFileView::sortingKey( KIO::filesize_t value, bool isDir, int sortSpec)
+TQString KFileView::sortingKey( KIO::filesize_t value, bool isDir, int sortSpec)
{
- bool reverse = sortSpec & QDir::Reversed;
- bool dirsFirst = sortSpec & QDir::DirsFirst;
+ bool reverse = sortSpec & TQDir::Reversed;
+ bool dirsFirst = sortSpec & TQDir::DirsFirst;
char start = (isDir && dirsFirst) ? (reverse ? '2' : '0') : '1';
return KIO::number( value ).rightJustify( 24, '0' ).prepend( start );
}
@@ -411,7 +411,7 @@ int KFileView::dropOptions()
int KFileView::autoOpenDelay()
{
- return (QApplication::startDragTime() * 3) / 2;
+ return (TQApplication::startDragTime() * 3) / 2;
}
void KFileView::virtual_hook( int id, void* data)
diff --git a/kio/kfile/kfileview.h b/kio/kfile/kfileview.h
index 0b2002e3b..a42927f1b 100644
--- a/kio/kfile/kfileview.h
+++ b/kio/kfile/kfileview.h
@@ -25,7 +25,7 @@
class QPoint;
class KActionCollection;
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kfileitem.h"
#include "kfile.h"
@@ -55,22 +55,22 @@ public:
*/
void highlightFile(const KFileItem *i) { emit fileHighlighted(i); }
- void activateMenu( const KFileItem *i, const QPoint& pos ) {
+ void activateMenu( const KFileItem *i, const TQPoint& pos ) {
emit activatedMenu( i, pos );
}
- void changeSorting( QDir::SortSpec sorting ) {
+ void changeSorting( TQDir::SortSpec sorting ) {
emit sortingChanged( sorting );
}
- void dropURLs(const KFileItem *i, QDropEvent*e, const KURL::List&urls) {
+ void dropURLs(const KFileItem *i, TQDropEvent*e, const KURL::List&urls) {
emit dropped(i, e, urls);
}
signals:
void dirActivated(const KFileItem*);
- void sortingChanged( QDir::SortSpec );
+ void sortingChanged( TQDir::SortSpec );
/**
* the item maybe be 0L, indicating that we're in multiselection mode and
@@ -78,8 +78,8 @@ signals:
*/
void fileHighlighted(const KFileItem*);
void fileSelected(const KFileItem*);
- void activatedMenu( const KFileItem *i, const QPoint& );
- void dropped(const KFileItem *, QDropEvent*, const KURL::List&);
+ void activatedMenu( const KFileItem *i, const TQPoint& );
+ void dropped(const KFileItem *, TQDropEvent*, const KURL::List&);
};
/**
@@ -111,21 +111,21 @@ public:
void addItemList(const KFileItemList &list);
/**
- * a pure virtual function to get a QWidget, that can be added to
+ * a pure virtual function to get a TQWidget, that can be added to
* other widgets. This function is needed to make it possible for
* derived classes to derive from other widgets.
**/
- virtual QWidget *widget() = 0;
+ virtual TQWidget *widget() = 0;
/**
* ### As const-method, to be fixed in 3.0
*/
- QWidget *widget() const { return const_cast<KFileView*>(this)->widget(); }
+ TQWidget *widget() const { return const_cast<KFileView*>(this)->widget(); }
/**
* Sets @p filename the current item in the view, if available.
*/
- void setCurrentItem( const QString &filename );
+ void setCurrentItem( const TQString &filename );
/**
* Reimplement this to set @p item the current item in the view, e.g.
@@ -174,29 +174,29 @@ public:
* Returns the sorting order of the internal list. Newly added files
* are added through this sorting.
*/
- QDir::SortSpec sorting() const { return m_sorting; }
+ TQDir::SortSpec sorting() const { return m_sorting; }
/**
* Sets the sorting order of the view.
*
- * Default is QDir::Name | QDir::IgnoreCase | QDir::DirsFirst
+ * Default is TQDir::Name | TQDir::IgnoreCase | TQDir::DirsFirst
* Override this in your subclass and sort accordingly (usually by
* setting the sorting-key for every item and telling QIconView
- * or QListView to sort.
+ * or TQListView to sort.
*
- * A view may choose to use a different sorting than QDir::Name, Time
+ * A view may choose to use a different sorting than TQDir::Name, Time
* or Size. E.g. to sort by mimetype or any possible string. Set the
- * sorting to QDir::Unsorted for that and do the rest internally.
+ * sorting to TQDir::Unsorted for that and do the rest internally.
*
* @see sortingKey
*/
- virtual void setSorting(QDir::SortSpec sort);
+ virtual void setSorting(TQDir::SortSpec sort);
/**
* Tells whether the current items are in reversed order (shortcut to
- * sorting() & QDir::Reversed).
+ * sorting() & TQDir::Reversed).
*/
- bool isReversed() const { return (m_sorting & QDir::Reversed); }
+ bool isReversed() const { return (m_sorting & TQDir::Reversed); }
void sortReversed();
@@ -231,13 +231,13 @@ public:
* somewhere, e.g. in a menu, where the user can choose between views.
* @see setViewName
*/
- QString viewName() const { return m_viewName; }
+ TQString viewName() const { return m_viewName; }
/**
* Sets the name of the view, which could be displayed somewhere.
* E.g. "Image Preview".
*/
- void setViewName( const QString& name ) { m_viewName = name; }
+ void setViewName( const TQString& name ) { m_viewName = name; }
virtual void setParentView(KFileView *parent);
@@ -346,8 +346,8 @@ public:
KFileViewSignaler * signaler() const { return sig; }
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
/**
* Various options for drag and drop support.
@@ -375,27 +375,27 @@ public:
int dropOptions();
/**
- * This method calculates a QString from the given parameters, that is
- * suitable for sorting with e.g. QIconView or QListView. Their
- * Item-classes usually have a setKey( const QString& ) method or a virtual
- * method QString key() that is used for sorting.
+ * This method calculates a TQString from the given parameters, that is
+ * suitable for sorting with e.g. TQIconView or TQListView. Their
+ * Item-classes usually have a setKey( const TQString& ) method or a virtual
+ * method TQString key() that is used for sorting.
*
* @param value Any string that should be used as sort criterion
* @param isDir Tells whether the key is computed for an item representing
* a directory (directories are usually sorted before files)
- * @param sortSpec An ORed combination of QDir::SortSpec flags.
+ * @param sortSpec An ORed combination of TQDir::SortSpec flags.
* Currently, the values IgnoreCase, Reversed and
* DirsFirst are taken into account.
*/
- static QString sortingKey( const QString& value, bool isDir, int sortSpec);
+ static TQString sortingKey( const TQString& value, bool isDir, int sortSpec);
/**
- * An overloaded method that takes not a QString, but a number as sort
+ * An overloaded method that takes not a TQString, but a number as sort
* criterion. You can use this for file-sizes or dates/times for example.
* If you use a time_t, you need to cast that to KIO::filesize_t because
* of ambiguity problems.
*/
- static QString sortingKey( KIO::filesize_t value, bool isDir,int sortSpec);
+ static TQString sortingKey( KIO::filesize_t value, bool isDir,int sortSpec);
/**
* @internal
@@ -411,9 +411,9 @@ protected:
KFileViewSignaler *sig;
private:
- static QDir::SortSpec defaultSortSpec;
- QDir::SortSpec m_sorting;
- QString m_viewName;
+ static TQDir::SortSpec defaultSortSpec;
+ TQDir::SortSpec m_sorting;
+ TQString m_viewName;
/**
* counters
diff --git a/kio/kfile/kicondialog.cpp b/kio/kfile/kicondialog.cpp
index 21a6ff6cd..164abd35a 100644
--- a/kio/kfile/kicondialog.cpp
+++ b/kio/kfile/kicondialog.cpp
@@ -29,20 +29,20 @@
#include <kfiledialog.h>
#include <kimagefilepreview.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qsortedlist.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qtimer.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qfileinfo.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqsortedlist.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqtimer.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqfileinfo.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
#ifdef HAVE_LIBART
#include <svgicons/ksvgiconengine.h>
@@ -63,17 +63,17 @@ class KIconCanvas::KIconCanvasPrivate
class IconPath : public QString
{
protected:
- QString m_iconName;
+ TQString m_iconName;
public:
- IconPath(const QString &ip) : QString (ip)
+ IconPath(const TQString &ip) : TQString (ip)
{
int n = findRev('/');
- m_iconName = (n==-1) ? static_cast<QString>(*this) : mid(n+1);
+ m_iconName = (n==-1) ? static_cast<TQString>(*this) : mid(n+1);
}
- IconPath() : QString ()
+ IconPath() : TQString ()
{ }
bool operator== (const IconPath &ip) const
@@ -88,14 +88,14 @@ public:
* KIconCanvas: Iconview for the iconloader dialog.
*/
-KIconCanvas::KIconCanvas(QWidget *parent, const char *name)
+KIconCanvas::KIconCanvas(TQWidget *parent, const char *name)
: KIconView(parent, name)
{
d = new KIconCanvasPrivate;
- mpTimer = new QTimer(this);
- connect(mpTimer, SIGNAL(timeout()), SLOT(slotLoadFiles()));
- connect(this, SIGNAL(currentChanged(QIconViewItem *)),
- SLOT(slotCurrentChanged(QIconViewItem *)));
+ mpTimer = new TQTimer(this);
+ connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles()));
+ connect(this, TQT_SIGNAL(currentChanged(TQIconViewItem *)),
+ TQT_SLOT(slotCurrentChanged(TQIconViewItem *)));
setGridX(80);
setWordWrapIconText(false);
setShowToolTips(true);
@@ -107,7 +107,7 @@ KIconCanvas::~KIconCanvas()
delete d;
}
-void KIconCanvas::loadFiles(const QStringList& files)
+void KIconCanvas::loadFiles(const TQStringList& files)
{
clear();
mFiles = files;
@@ -119,7 +119,7 @@ void KIconCanvas::loadFiles(const QStringList& files)
void KIconCanvas::slotLoadFiles()
{
setResizeMode(Fixed);
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
// disable updates to not trigger paint events when adding child items
setUpdatesEnabled( false );
@@ -130,9 +130,9 @@ void KIconCanvas::slotLoadFiles()
d->m_bLoading = true;
int i;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
uint emitProgress = 10; // so we will emit it once in the beginning
- QStringList::ConstIterator end(mFiles.end());
+ TQStringList::ConstIterator end(mFiles.end());
for (it=mFiles.begin(), i=0; it!=end; ++it, i++)
{
// Calling kapp->processEvents() makes the iconview flicker like hell
@@ -149,11 +149,11 @@ void KIconCanvas::slotLoadFiles()
// kapp->processEvents();
if ( !d->m_bLoading ) // user clicked on a button that will load another set of icons
break;
- QImage img;
+ TQImage img;
// Use the extension as the format. Works for XPM and PNG, but not for SVG
- QString path= *it;
- QString ext = path.right(3).upper();
+ TQString path= *it;
+ TQString ext = path.right(3).upper();
if (ext != "SVG" && ext != "VGZ")
img.load(*it);
@@ -177,10 +177,10 @@ void KIconCanvas::slotLoadFiles()
img = img.smoothScale(width, 60);
}
}
- QPixmap pm;
+ TQPixmap pm;
pm.convertFromImage(img);
- QFileInfo fi(*it);
- QIconViewItem *item = new QIconViewItem(this, fi.baseName(), pm);
+ TQFileInfo fi(*it);
+ TQIconViewItem *item = new TQIconViewItem(this, fi.baseName(), pm);
item->setKey(*it);
item->setDragEnabled(false);
item->setDropEnabled(false);
@@ -193,16 +193,16 @@ void KIconCanvas::slotLoadFiles()
// enable updates since we have to draw the whole view now
setUpdatesEnabled( true );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
d->m_bLoading = false;
emit finished();
setResizeMode(Adjust);
}
-QString KIconCanvas::getCurrent() const
+TQString KIconCanvas::getCurrent() const
{
if (!currentItem())
- return QString::null;
+ return TQString::null;
return currentItem()->key();
}
@@ -211,9 +211,9 @@ void KIconCanvas::stopLoading()
d->m_bLoading = false;
}
-void KIconCanvas::slotCurrentChanged(QIconViewItem *item)
+void KIconCanvas::slotCurrentChanged(TQIconViewItem *item)
{
- emit nameChanged((item != 0L) ? item->text() : QString::null);
+ emit nameChanged((item != 0L) ? item->text() : TQString::null);
}
class KIconDialog::KIconDialogPrivate
@@ -227,8 +227,8 @@ class KIconDialog::KIconDialogPrivate
}
~KIconDialogPrivate() {}
bool m_bStrictIconSize, m_bLockUser, m_bLockCustomDir;
- QString custom;
- QString customLocation;
+ TQString custom;
+ TQString customLocation;
KIconViewSearchLine *searchLine;
};
@@ -237,7 +237,7 @@ class KIconDialog::KIconDialogPrivate
* specified icons can be chosen.
*/
-KIconDialog::KIconDialog(QWidget *parent, const char *name)
+KIconDialog::KIconDialog(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok)
{
d = new KIconDialogPrivate;
@@ -245,7 +245,7 @@ KIconDialog::KIconDialog(QWidget *parent, const char *name)
init();
}
-KIconDialog::KIconDialog(KIconLoader *loader, QWidget *parent,
+KIconDialog::KIconDialog(KIconLoader *loader, TQWidget *parent,
const char *name)
: KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok)
{
@@ -259,42 +259,42 @@ void KIconDialog::init()
mGroupOrSize = KIcon::Desktop;
mContext = KIcon::Any;
mType = 0;
- mFileList = KGlobal::dirs()->findAllResources("appicon", QString::fromLatin1("*.png"));
+ mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png"));
- QWidget *main = new QWidget( this );
+ TQWidget *main = new TQWidget( this );
setMainWidget(main);
- QVBoxLayout *top = new QVBoxLayout(main);
+ TQVBoxLayout *top = new TQVBoxLayout(main);
top->setSpacing( spacingHint() );
- QButtonGroup *bgroup = new QButtonGroup(0, Qt::Vertical, i18n("Icon Source"), main);
+ TQButtonGroup *bgroup = new TQButtonGroup(0, Qt::Vertical, i18n("Icon Source"), main);
bgroup->layout()->setSpacing(KDialog::spacingHint());
bgroup->layout()->setMargin(KDialog::marginHint());
top->addWidget(bgroup);
- connect(bgroup, SIGNAL(clicked(int)), SLOT(slotButtonClicked(int)));
- QGridLayout *grid = new QGridLayout(bgroup->layout(), 3, 2);
- mpRb1 = new QRadioButton(i18n("S&ystem icons:"), bgroup);
+ connect(bgroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotButtonClicked(int)));
+ TQGridLayout *grid = new TQGridLayout(bgroup->layout(), 3, 2);
+ mpRb1 = new TQRadioButton(i18n("S&ystem icons:"), bgroup);
grid->addWidget(mpRb1, 1, 0);
- mpCombo = new QComboBox(bgroup);
- connect(mpCombo, SIGNAL(activated(int)), SLOT(slotContext(int)));
+ mpCombo = new TQComboBox(bgroup);
+ connect(mpCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotContext(int)));
grid->addWidget(mpCombo, 1, 1);
- mpRb2 = new QRadioButton(i18n("O&ther icons:"), bgroup);
+ mpRb2 = new TQRadioButton(i18n("O&ther icons:"), bgroup);
grid->addWidget(mpRb2, 2, 0);
- mpBrowseBut = new QPushButton(i18n("&Browse..."), bgroup);
+ mpBrowseBut = new TQPushButton(i18n("&Browse..."), bgroup);
grid->addWidget(mpBrowseBut, 2, 1);
//
// ADD SEARCHLINE
//
- QHBoxLayout *searchLayout = new QHBoxLayout(0, 0, KDialog::spacingHint());
+ TQHBoxLayout *searchLayout = new TQHBoxLayout(0, 0, KDialog::spacingHint());
top->addLayout(searchLayout);
- QToolButton *clearSearch = new QToolButton(main);
+ TQToolButton *clearSearch = new TQToolButton(main);
clearSearch->setTextLabel(i18n("Clear Search"), true);
- clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" :"locationbar_erase"));
+ clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" :"locationbar_erase"));
searchLayout->addWidget(clearSearch);
- QLabel *searchLabel = new QLabel(i18n("&Search:"), main);
+ TQLabel *searchLabel = new TQLabel(i18n("&Search:"), main);
searchLayout->addWidget(searchLabel);
d->searchLine = new KIconViewSearchLine(main, "searchLine");
@@ -303,28 +303,28 @@ void KIconDialog::init()
// signals and slots connections
- connect(clearSearch, SIGNAL(clicked()), d->searchLine, SLOT(clear()));
+ connect(clearSearch, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear()));
- QString wtstr = i18n("Search interactively for icon names (e.g. folder).");
- QWhatsThis::add(searchLabel, wtstr);
- QWhatsThis::add(d->searchLine, wtstr);
+ TQString wtstr = i18n("Search interactively for icon names (e.g. folder).");
+ TQWhatsThis::add(searchLabel, wtstr);
+ TQWhatsThis::add(d->searchLine, wtstr);
mpCanvas = new KIconCanvas(main);
- connect(mpCanvas, SIGNAL(executed(QIconViewItem *)), SLOT(slotAcceptIcons()));
- connect(mpCanvas, SIGNAL(returnPressed(QIconViewItem *)), SLOT(slotAcceptIcons()));
+ connect(mpCanvas, TQT_SIGNAL(executed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons()));
+ connect(mpCanvas, TQT_SIGNAL(returnPressed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons()));
mpCanvas->setMinimumSize(400, 125);
top->addWidget(mpCanvas);
d->searchLine->setIconView(mpCanvas);
mpProgress = new KProgress(main);
top->addWidget(mpProgress);
- connect(mpCanvas, SIGNAL(startLoading(int)), SLOT(slotStartLoading(int)));
- connect(mpCanvas, SIGNAL(progress(int)), SLOT(slotProgress(int)));
- connect(mpCanvas, SIGNAL(finished()), SLOT(slotFinished()));
+ connect(mpCanvas, TQT_SIGNAL(startLoading(int)), TQT_SLOT(slotStartLoading(int)));
+ connect(mpCanvas, TQT_SIGNAL(progress(int)), TQT_SLOT(slotProgress(int)));
+ connect(mpCanvas, TQT_SIGNAL(finished()), TQT_SLOT(slotFinished()));
// When pressing Ok or Cancel, stop loading icons
- connect(this, SIGNAL(hidden()), mpCanvas, SLOT(stopLoading()));
+ connect(this, TQT_SIGNAL(hidden()), mpCanvas, TQT_SLOT(stopLoading()));
static const char* const context_text[] = {
I18N_NOOP( "Actions" ),
@@ -372,7 +372,7 @@ void KIconDialog::init()
mpBrowseBut->setFixedWidth(mpCombo->width());
// Make the dialog a little taller
- incInitialSize(QSize(0,100));
+ incInitialSize(TQSize(0,100));
}
@@ -383,14 +383,14 @@ KIconDialog::~KIconDialog()
void KIconDialog::slotAcceptIcons()
{
- d->custom=QString::null;
+ d->custom=TQString::null;
slotOk();
}
void KIconDialog::showIcons()
{
mpCanvas->clear();
- QStringList filelist;
+ TQStringList filelist;
if (mType == 0)
if (d->m_bStrictIconSize)
filelist=mpLoader->queryIcons(mGroupOrSize, mContext);
@@ -401,9 +401,9 @@ void KIconDialog::showIcons()
else
filelist=mFileList;
- QSortedList <IconPath>iconlist;
+ TQSortedList <IconPath>iconlist;
iconlist.setAutoDelete(true);
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = filelist.begin(); it != filelist.end(); ++it )
iconlist.append(new IconPath(*it));
@@ -443,7 +443,7 @@ int KIconDialog::iconSize() const
}
#ifndef KDE_NO_COMPAT
-QString KIconDialog::selectIcon(KIcon::Group group, KIcon::Context context, bool user)
+TQString KIconDialog::selectIcon(KIcon::Group group, KIcon::Context context, bool user)
{
setup( group, context, false, 0, user );
return openDialog();
@@ -494,12 +494,12 @@ void KIconDialog::setContext( KIcon::Context context )
}
}
-void KIconDialog::setCustomLocation( const QString& location )
+void KIconDialog::setCustomLocation( const TQString& location )
{
d->customLocation = location;
}
-QString KIconDialog::openDialog()
+TQString KIconDialog::openDialog()
{
showIcons();
@@ -507,13 +507,13 @@ QString KIconDialog::openDialog()
{
if (!d->custom.isNull())
return d->custom;
- QString name = mpCanvas->getCurrent();
+ TQString name = mpCanvas->getCurrent();
if (name.isEmpty() || (mType == 1))
return name;
- QFileInfo fi(name);
+ TQFileInfo fi(name);
return fi.baseName();
}
- return QString::null;
+ return TQString::null;
}
void KIconDialog::showDialog()
@@ -525,7 +525,7 @@ void KIconDialog::showDialog()
void KIconDialog::slotOk()
{
- QString name;
+ TQString name;
if (!d->custom.isNull())
{
name = d->custom;
@@ -535,7 +535,7 @@ void KIconDialog::slotOk()
name = mpCanvas->getCurrent();
if (!name.isEmpty() && (mType != 1))
{
- QFileInfo fi(name);
+ TQFileInfo fi(name);
name = fi.baseName();
}
}
@@ -544,9 +544,9 @@ void KIconDialog::slotOk()
KDialogBase::slotOk();
}
-QString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
+TQString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
bool strictIconSize, int iconSize, bool user,
- QWidget *parent, const QString &caption)
+ TQWidget *parent, const TQString &caption)
{
KIconDialog dlg(parent, "icon dialog");
dlg.setup( group, context, strictIconSize, iconSize, user );
@@ -558,7 +558,7 @@ QString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
void KIconDialog::slotButtonClicked(int id)
{
- QString file;
+ TQString file;
switch (id)
{
@@ -586,7 +586,7 @@ void KIconDialog::slotButtonClicked(int id)
// Create a file dialog to select a PNG, XPM or SVG file,
// with the image previewer shown.
// KFileDialog::getImageOpenURL doesn't allow svg.
- KFileDialog dlg(QString::null, i18n("*.png *.xpm *.svg *.svgz|Icon Files (*.png *.xpm *.svg *.svgz)"),
+ KFileDialog dlg(TQString::null, i18n("*.png *.xpm *.svg *.svgz|Icon Files (*.png *.xpm *.svg *.svgz)"),
this, "filedialog", true);
dlg.setOperationMode( KFileDialog::Opening );
dlg.setCaption( i18n("Open") );
@@ -601,7 +601,7 @@ void KIconDialog::slotButtonClicked(int id)
{
d->custom = file;
if ( mType == 1 )
- d->customLocation = QFileInfo( file ).dirPath( true );
+ d->customLocation = TQFileInfo( file ).dirPath( true );
slotOk();
}
}
@@ -657,15 +657,15 @@ class KIconButton::KIconButtonPrivate
* KIconButton: A "choose icon" pushbutton.
*/
-KIconButton::KIconButton(QWidget *parent, const char *name)
- : QPushButton(parent, name)
+KIconButton::KIconButton(TQWidget *parent, const char *name)
+ : TQPushButton(parent, name)
{
init( KGlobal::iconLoader() );
}
KIconButton::KIconButton(KIconLoader *loader,
- QWidget *parent, const char *name)
- : QPushButton(parent, name)
+ TQWidget *parent, const char *name)
+ : TQPushButton(parent, name)
{
init( loader );
}
@@ -679,7 +679,7 @@ void KIconButton::init( KIconLoader *loader )
mpLoader = loader;
mpDialog = 0L;
- connect(this, SIGNAL(clicked()), SLOT(slotChangeIcon()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotChangeIcon()));
}
KIconButton::~KIconButton()
@@ -715,7 +715,7 @@ void KIconButton::setIconType(KIcon::Group group, KIcon::Context context, bool u
mbUser = user;
}
-void KIconButton::setIcon(const QString& icon)
+void KIconButton::setIcon(const TQString& icon)
{
mIcon = icon;
setIconSet(mpLoader->loadIconSet(mIcon, mGroup, d->iconSize));
@@ -723,17 +723,17 @@ void KIconButton::setIcon(const QString& icon)
if (!mpDialog)
{
mpDialog = new KIconDialog(mpLoader, this);
- connect(mpDialog, SIGNAL(newIconName(const QString&)), SLOT(newIconName(const QString&)));
+ connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&)));
}
if ( mbUser )
- mpDialog->setCustomLocation( QFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
+ mpDialog->setCustomLocation( TQFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
}
void KIconButton::resetIcon()
{
- mIcon = QString::null;
- setIconSet(QIconSet());
+ mIcon = TQString::null;
+ setIconSet(TQIconSet());
}
void KIconButton::slotChangeIcon()
@@ -741,24 +741,24 @@ void KIconButton::slotChangeIcon()
if (!mpDialog)
{
mpDialog = new KIconDialog(mpLoader, this);
- connect(mpDialog, SIGNAL(newIconName(const QString&)), SLOT(newIconName(const QString&)));
+ connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&)));
}
mpDialog->setup( mGroup, mContext, d->m_bStrictIconSize, d->iconSize, mbUser );
mpDialog->showDialog();
}
-void KIconButton::newIconName(const QString& name)
+void KIconButton::newIconName(const TQString& name)
{
if (name.isEmpty())
return;
- QIconSet iconset = mpLoader->loadIconSet(name, mGroup, d->iconSize);
+ TQIconSet iconset = mpLoader->loadIconSet(name, mGroup, d->iconSize);
setIconSet(iconset);
mIcon = name;
if ( mbUser )
- mpDialog->setCustomLocation( QFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
+ mpDialog->setCustomLocation( TQFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
emit iconChanged(name);
}
diff --git a/kio/kfile/kicondialog.h b/kio/kfile/kicondialog.h
index e6cf4e2fe..de447bc34 100644
--- a/kio/kfile/kicondialog.h
+++ b/kio/kfile/kicondialog.h
@@ -14,9 +14,9 @@
#ifndef __KIconDialog_h__
#define __KIconDialog_h__
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qpushbutton.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqpushbutton.h>
#include <kicontheme.h>
#include <kdialogbase.h>
@@ -37,18 +37,18 @@ class KIO_EXPORT KIconCanvas: public KIconView
Q_OBJECT
public:
- KIconCanvas(QWidget *parent=0L, const char *name=0L);
+ KIconCanvas(TQWidget *parent=0L, const char *name=0L);
~KIconCanvas();
/**
* Load icons into the canvas.
*/
- void loadFiles(const QStringList& files);
+ void loadFiles(const TQStringList& files);
/**
* Returns the current icon.
*/
- QString getCurrent() const;
+ TQString getCurrent() const;
public slots:
void stopLoading();
@@ -57,8 +57,8 @@ signals:
/**
* Emitted when the current icon has changed.
*/
- void nameChanged(QString);
- /* KDE 4: Make it const QString & */
+ void nameChanged(TQString);
+ /* KDE 4: Make it const TQString & */
void startLoading(int);
void progress(int);
@@ -66,11 +66,11 @@ signals:
private slots:
void slotLoadFiles();
- void slotCurrentChanged(QIconViewItem *item);
+ void slotCurrentChanged(TQIconViewItem *item);
private:
- QStringList mFiles;
- QTimer *mpTimer;
+ TQStringList mFiles;
+ TQTimer *mpTimer;
KIconLoader *mpLoader; // unused
protected:
@@ -96,11 +96,11 @@ public:
/**
* Constructs an icon selection dialog using the global iconloader.
*/
- KIconDialog(QWidget *parent=0L, const char *name=0L);
+ KIconDialog(TQWidget *parent=0L, const char *name=0L);
/**
* Constructs an icon selection dialog using a specific iconloader.
*/
- KIconDialog(KIconLoader *loader, QWidget *parent=0,
+ KIconDialog(KIconLoader *loader, TQWidget *parent=0,
const char *name=0);
/**
* Destructs the dialog.
@@ -122,7 +122,7 @@ public:
* sets a custom icon directory
* @since 3.1
*/
- void setCustomLocation( const QString& location );
+ void setCustomLocation( const TQString& location );
/**
* Sets the size of the icons to be shown / selected.
@@ -141,7 +141,7 @@ public:
/**
* @deprecated in KDE 3.0, use the static method getIcon instead.
*/
- QString selectIcon(KIcon::Group group=KIcon::Desktop, KIcon::Context
+ TQString selectIcon(KIcon::Group group=KIcon::Desktop, KIcon::Context
context=KIcon::Application, bool user=false);
#endif
@@ -169,15 +169,15 @@ public:
/**
* exec()utes this modal dialog and returns the name of the selected icon,
- * or QString::null if the dialog was aborted.
+ * or TQString::null if the dialog was aborted.
* @returns the name of the icon, suitable for loading with KIconLoader.
* @see getIcon
*/
- QString openDialog();
+ TQString openDialog();
/**
- * show()es this dialog and emits a newIcon(const QString&) signal when
- * successful. QString::null will be emitted if the dialog was aborted.
+ * show()es this dialog and emits a newIcon(const TQString&) signal when
+ * successful. TQString::null will be emitted if the dialog was aborted.
*/
void showDialog();
@@ -200,14 +200,14 @@ public:
* @return The name of the icon, suitable for loading with KIconLoader.
* @version New in 3.0
*/
- static QString getIcon(KIcon::Group group=KIcon::Desktop,
+ static TQString getIcon(KIcon::Group group=KIcon::Desktop,
KIcon::Context context=KIcon::Application,
bool strictIconSize=false, int iconSize = 0,
- bool user=false, QWidget *parent=0,
- const QString &caption=QString::null);
+ bool user=false, TQWidget *parent=0,
+ const TQString &caption=TQString::null);
signals:
- void newIconName(const QString&);
+ void newIconName(const TQString&);
protected slots:
void slotOk();
@@ -228,10 +228,10 @@ private:
KIcon::Context mContext;
int mType;
- QStringList mFileList;
- QComboBox *mpCombo;
- QPushButton *mpBrowseBut;
- QRadioButton *mpRb1, *mpRb2;
+ TQStringList mFileList;
+ TQComboBox *mpCombo;
+ TQPushButton *mpBrowseBut;
+ TQRadioButton *mpRb1, *mpRb2;
KProgress *mpProgress;
KIconLoader *mpLoader;
KIconCanvas *mpCanvas;
@@ -257,7 +257,7 @@ private:
class KIO_EXPORT KIconButton: public QPushButton
{
Q_OBJECT
- Q_PROPERTY( QString icon READ icon WRITE setIcon RESET resetIcon )
+ Q_PROPERTY( TQString icon READ icon WRITE setIcon RESET resetIcon )
Q_PROPERTY( int iconSize READ iconSize WRITE setIconSize)
Q_PROPERTY( bool strictIconSize READ strictIconSize WRITE setStrictIconSize )
@@ -265,12 +265,12 @@ public:
/**
* Constructs a KIconButton using the global iconloader.
*/
- KIconButton(QWidget *parent=0L, const char *name=0L);
+ KIconButton(TQWidget *parent=0L, const char *name=0L);
/**
* Constructs a KIconButton using a specific KIconLoader.
*/
- KIconButton(KIconLoader *loader, QWidget *parent, const char *name=0L);
+ KIconButton(KIconLoader *loader, TQWidget *parent, const char *name=0L);
/**
* Destructs the button.
*/
@@ -296,7 +296,7 @@ public:
/**
* Sets the button's initial icon.
*/
- void setIcon(const QString& icon);
+ void setIcon(const TQString& icon);
/**
* Resets the icon (reverts to an empty button).
@@ -306,7 +306,7 @@ public:
/**
* Returns the name of the selected icon.
*/
- QString icon() const { return mIcon; }
+ TQString icon() const { return mIcon; }
/**
* Sets the size of the icon to be shown / selected.
@@ -325,12 +325,12 @@ signals:
/**
* Emitted when the icon has changed.
*/
- void iconChanged(QString icon);
- /* KDE 4: Make it const QString & */
+ void iconChanged(TQString icon);
+ /* KDE 4: Make it const TQString & */
private slots:
void slotChangeIcon();
- void newIconName(const QString& name);
+ void newIconName(const TQString& name);
private:
void init( KIconLoader *loader );
@@ -339,7 +339,7 @@ private:
KIcon::Group mGroup;
KIcon::Context mContext;
- QString mIcon;
+ TQString mIcon;
KIconDialog *mpDialog;
KIconLoader *mpLoader;
class KIconButtonPrivate;
diff --git a/kio/kfile/kimagefilepreview.cpp b/kio/kfile/kimagefilepreview.cpp
index d973c6e1b..2d9f7881a 100644
--- a/kio/kfile/kimagefilepreview.cpp
+++ b/kio/kfile/kimagefilepreview.cpp
@@ -7,12 +7,12 @@
* License. See the file "COPYING" for the exact licensing terms.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -31,7 +31,7 @@
/**** KImageFilePreview ****/
-KImageFilePreview::KImageFilePreview( QWidget *parent )
+KImageFilePreview::KImageFilePreview( TQWidget *parent )
: KPreviewWidgetBase( parent ),
m_job( 0L )
{
@@ -39,28 +39,28 @@ KImageFilePreview::KImageFilePreview( QWidget *parent )
KConfigGroupSaver cs( config, ConfigGroup );
autoMode = config->readBoolEntry( "Automatic Preview", true );
- QVBoxLayout *vb = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *vb = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- imageLabel = new QLabel( this );
- imageLabel->setFrameStyle( QFrame::NoFrame );
+ imageLabel = new TQLabel( this );
+ imageLabel->setFrameStyle( TQFrame::NoFrame );
imageLabel->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
- imageLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding) );
+ imageLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding) );
vb->addWidget( imageLabel );
- QHBoxLayout *hb = new QHBoxLayout( 0 );
+ TQHBoxLayout *hb = new TQHBoxLayout( 0 );
vb->addLayout( hb );
- autoPreview = new QCheckBox( i18n("&Automatic preview"), this );
+ autoPreview = new TQCheckBox( i18n("&Automatic preview"), this );
autoPreview->setChecked( autoMode );
hb->addWidget( autoPreview );
- connect( autoPreview, SIGNAL(toggled(bool)), SLOT(toggleAuto(bool)) );
+ connect( autoPreview, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleAuto(bool)) );
previewButton = new KPushButton( SmallIconSet("thumbnail"), i18n("&Preview"), this );
hb->addWidget( previewButton );
- connect( previewButton, SIGNAL(clicked()), SLOT(showPreview()) );
+ connect( previewButton, TQT_SIGNAL(clicked()), TQT_SLOT(showPreview()) );
- timer = new QTimer( this );
- connect( timer, SIGNAL(timeout()), SLOT(showPreview()) );
+ timer = new TQTimer( this );
+ connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(showPreview()) );
setSupportedMimeTypes( KIO::PreviewJob::supportedMimeTypes() );
}
@@ -109,14 +109,14 @@ void KImageFilePreview::showPreview( const KURL &url, bool force )
if ( force ) // explicitly requested previews shall always be generated!
m_job->setIgnoreMaximumSize( true );
- connect( m_job, SIGNAL( result( KIO::Job * )),
- this, SLOT( slotResult( KIO::Job * )));
- connect( m_job, SIGNAL( gotPreview( const KFileItem*,
- const QPixmap& )),
- SLOT( gotPreview( const KFileItem*, const QPixmap& ) ));
-
- connect( m_job, SIGNAL( failed( const KFileItem* )),
- this, SLOT( slotFailed( const KFileItem* ) ));
+ connect( m_job, TQT_SIGNAL( result( KIO::Job * )),
+ this, TQT_SLOT( slotResult( KIO::Job * )));
+ connect( m_job, TQT_SIGNAL( gotPreview( const KFileItem*,
+ const TQPixmap& )),
+ TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) ));
+
+ connect( m_job, TQT_SIGNAL( failed( const KFileItem* )),
+ this, TQT_SLOT( slotFailed( const KFileItem* ) ));
}
}
}
@@ -132,14 +132,14 @@ void KImageFilePreview::toggleAuto( bool a )
}
}
-void KImageFilePreview::resizeEvent( QResizeEvent * )
+void KImageFilePreview::resizeEvent( TQResizeEvent * )
{
timer->start( 100, true ); // forces a new preview
}
-QSize KImageFilePreview::sizeHint() const
+TQSize KImageFilePreview::sizeHint() const
{
- return QSize( 20, 200 ); // otherwise it ends up huge???
+ return TQSize( 20, 200 ); // otherwise it ends up huge???
}
KIO::PreviewJob * KImageFilePreview::createJob( const KURL& url, int w, int h )
@@ -149,7 +149,7 @@ KIO::PreviewJob * KImageFilePreview::createJob( const KURL& url, int w, int h )
return KIO::filePreview( urls, w, h, 0, 0, true, false );
}
-void KImageFilePreview::gotPreview( const KFileItem* item, const QPixmap& pm )
+void KImageFilePreview::gotPreview( const KFileItem* item, const TQPixmap& pm )
{
if ( item->url() == currentURL ) // should always be the case
imageLabel->setPixmap( pm );
diff --git a/kio/kfile/kimagefilepreview.h b/kio/kfile/kimagefilepreview.h
index cb034265a..849585428 100644
--- a/kio/kfile/kimagefilepreview.h
+++ b/kio/kfile/kimagefilepreview.h
@@ -11,7 +11,7 @@
#ifndef KIMAGEFILEPREVIEW_H
#define KIMAGEFILEPREVIEW_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kurl.h>
#include <kpreviewwidgetbase.h>
@@ -33,10 +33,10 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase
Q_OBJECT
public:
- KImageFilePreview(QWidget *parent);
+ KImageFilePreview(TQWidget *parent);
~KImageFilePreview();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
public slots:
virtual void showPreview(const KURL &url);
@@ -47,10 +47,10 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase
void showPreview( const KURL& url, bool force );
void toggleAuto(bool);
- virtual void gotPreview( const KFileItem*, const QPixmap& );
+ virtual void gotPreview( const KFileItem*, const TQPixmap& );
protected:
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void resizeEvent(TQResizeEvent *e);
virtual KIO::PreviewJob * createJob( const KURL& url,
int w, int h );
@@ -61,11 +61,11 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase
private:
bool autoMode;
KURL currentURL;
- QTimer *timer;
- QLabel *imageLabel;
- QLabel *infoLabel;
- QCheckBox *autoPreview;
- QPushButton *previewButton;
+ TQTimer *timer;
+ TQLabel *imageLabel;
+ TQLabel *infoLabel;
+ TQCheckBox *autoPreview;
+ TQPushButton *previewButton;
KIO::PreviewJob *m_job;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kfile/kmetaprops.cpp b/kio/kfile/kmetaprops.cpp
index b3ff504fc..281fbc622 100644
--- a/kio/kfile/kmetaprops.cpp
+++ b/kio/kfile/kmetaprops.cpp
@@ -28,40 +28,40 @@
#include <klocale.h>
#include <kprotocolinfo.h>
-#include <qvalidator.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qdatetime.h>
-#include <qstylesheet.h>
-#include <qvgroupbox.h>
+#include <tqvalidator.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqdatetime.h>
+#include <tqstylesheet.h>
+#include <tqvgroupbox.h>
#undef Bool
class MetaPropsScrollView : public QScrollView
{
public:
- MetaPropsScrollView(QWidget* parent = 0, const char* name = 0)
- : QScrollView(parent, name)
+ MetaPropsScrollView(TQWidget* parent = 0, const char* name = 0)
+ : TQScrollView(parent, name)
{
- setFrameStyle(QFrame::NoFrame);
- m_frame = new QFrame(viewport(), "MetaPropsScrollView::m_frame");
- m_frame->setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
+ m_frame = new TQFrame(viewport(), "MetaPropsScrollView::m_frame");
+ m_frame->setFrameStyle(TQFrame::NoFrame);
addChild(m_frame, 0, 0);
};
- QFrame* frame() {return m_frame;};
+ TQFrame* frame() {return m_frame;};
protected:
- virtual void viewportResizeEvent(QResizeEvent* ev)
+ virtual void viewportResizeEvent(TQResizeEvent* ev)
{
- QScrollView::viewportResizeEvent(ev);
+ TQScrollView::viewportResizeEvent(ev);
m_frame->resize( kMax(m_frame->sizeHint().width(), ev->size().width()),
kMax(m_frame->sizeHint().height(), ev->size().height()));
};
private:
- QFrame* m_frame;
+ TQFrame* m_frame;
};
class KFileMetaPropsPlugin::KFileMetaPropsPluginPrivate
@@ -70,11 +70,11 @@ public:
KFileMetaPropsPluginPrivate() {}
~KFileMetaPropsPluginPrivate() {}
- QFrame* m_frame;
- QGridLayout* m_framelayout;
+ TQFrame* m_frame;
+ TQGridLayout* m_framelayout;
KFileMetaInfo m_info;
-// QPushButton* m_add;
- QPtrList<KFileMetaInfoWidget> m_editWidgets;
+// TQPushButton* m_add;
+ TQPtrList<KFileMetaInfoWidget> m_editWidgets;
};
KFileMetaPropsPlugin::KFileMetaPropsPlugin(KPropertiesDialog* props)
@@ -107,7 +107,7 @@ KFileMetaPropsPlugin::KFileMetaPropsPlugin(KPropertiesDialog* props)
void KFileMetaPropsPlugin::createLayout()
{
- QFileInfo file_info(properties->item()->url().path());
+ TQFileInfo file_info(properties->item()->url().path());
kdDebug(250) << "KFileMetaPropsPlugin::createLayout" << endl;
@@ -117,7 +117,7 @@ void KFileMetaPropsPlugin::createLayout()
// now get a list of groups
KFileMetaInfoProvider* prov = KFileMetaInfoProvider::self();
- QStringList groupList = d->m_info.preferredGroups();
+ TQStringList groupList = d->m_info.preferredGroups();
const KFileMimeTypeInfo* mtinfo = prov->mimeTypeInfo(d->m_info.mimeType());
if (!mtinfo)
@@ -127,9 +127,9 @@ void KFileMetaPropsPlugin::createLayout()
}
// let the dialog create the page frame
- QFrame* topframe = properties->addPage(i18n("&Meta Info"));
- topframe->setFrameStyle(QFrame::NoFrame);
- QVBoxLayout* tmp = new QVBoxLayout(topframe);
+ TQFrame* topframe = properties->addPage(i18n("&Meta Info"));
+ topframe->setFrameStyle(TQFrame::NoFrame);
+ TQVBoxLayout* tmp = new TQVBoxLayout(topframe);
// create a scroll view in the page
MetaPropsScrollView* view = new MetaPropsScrollView(topframe);
@@ -138,28 +138,28 @@ void KFileMetaPropsPlugin::createLayout()
d->m_frame = view->frame();
- QVBoxLayout *toplayout = new QVBoxLayout(d->m_frame);
+ TQVBoxLayout *toplayout = new TQVBoxLayout(d->m_frame);
toplayout->setSpacing(KDialog::spacingHint());
- for (QStringList::Iterator git=groupList.begin();
+ for (TQStringList::Iterator git=groupList.begin();
git!=groupList.end(); ++git)
{
kdDebug(7033) << *git << endl;
- QStringList itemList = d->m_info.group(*git).preferredKeys();
+ TQStringList itemList = d->m_info.group(*git).preferredKeys();
if (itemList.isEmpty())
continue;
- QGroupBox *groupBox = new QGroupBox(2, Qt::Horizontal,
- QStyleSheet::escape(mtinfo->groupInfo(*git)->translatedName()),
+ TQGroupBox *groupBox = new TQGroupBox(2, Qt::Horizontal,
+ TQStyleSheet::escape(mtinfo->groupInfo(*git)->translatedName()),
d->m_frame);
toplayout->addWidget(groupBox);
- QValueList<KFileMetaInfoItem> readItems;
- QValueList<KFileMetaInfoItem> editItems;
+ TQValueList<KFileMetaInfoItem> readItems;
+ TQValueList<KFileMetaInfoItem> editItems;
- for (QStringList::Iterator iit = itemList.begin();
+ for (TQStringList::Iterator iit = itemList.begin();
iit!=itemList.end(); ++iit)
{
KFileMetaInfoItem item = d->m_info[*git][*iit];
@@ -175,23 +175,23 @@ void KFileMetaPropsPlugin::createLayout()
KFileMetaInfoWidget* w = 0L;
// then first add the editable items to the layout
- for (QValueList<KFileMetaInfoItem>::Iterator iit= editItems.begin();
+ for (TQValueList<KFileMetaInfoItem>::Iterator iit= editItems.begin();
iit!=editItems.end(); ++iit)
{
- QLabel* l = new QLabel((*iit).translatedKey() + ":", groupBox);
+ TQLabel* l = new TQLabel((*iit).translatedKey() + ":", groupBox);
l->setAlignment( AlignAuto | AlignTop | ExpandTabs );
- QValidator* val = mtinfo->createValidator(*git, (*iit).key());
+ TQValidator* val = mtinfo->createValidator(*git, (*iit).key());
if (!val) kdDebug(7033) << "didn't get a validator for " << *git << "/" << (*iit).key() << endl;
w = new KFileMetaInfoWidget(*iit, val, groupBox);
d->m_editWidgets.append( w );
- connect(w, SIGNAL(valueChanged(const QVariant&)), this, SIGNAL(changed()));
+ connect(w, TQT_SIGNAL(valueChanged(const TQVariant&)), this, TQT_SIGNAL(changed()));
}
// and then the read only items
- for (QValueList<KFileMetaInfoItem>::Iterator iit= readItems.begin();
+ for (TQValueList<KFileMetaInfoItem>::Iterator iit= readItems.begin();
iit!=readItems.end(); ++iit)
{
- QLabel* l = new QLabel((*iit).translatedKey() + ":", groupBox);
+ TQLabel* l = new TQLabel((*iit).translatedKey() + ":", groupBox);
l->setAlignment( AlignAuto | AlignTop | ExpandTabs );
(new KFileMetaInfoWidget(*iit, KFileMetaInfoWidget::ReadOnly, 0L, groupBox));
}
@@ -200,10 +200,10 @@ void KFileMetaPropsPlugin::createLayout()
toplayout->addStretch(1);
// the add key (disabled until fully implemented)
-/* d->m_add = new QPushButton(i18n("&Add"), topframe);
- d->m_add->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
- QSizePolicy::Fixed));
- connect(d->m_add, SIGNAL(clicked()), this, SLOT(slotAdd()));
+/* d->m_add = new TQPushButton(i18n("&Add"), topframe);
+ d->m_add->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
+ TQSizePolicy::Fixed));
+ connect(d->m_add, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdd()));
tmp->addWidget(d->m_add);
// if nothing can be added, deactivate it
@@ -212,9 +212,9 @@ void KFileMetaPropsPlugin::createLayout()
// if supportedKeys() does contain anything not in preferredKeys,
// we have something addable
- QStringList sk = d->m_info.supportedKeys();
+ TQStringList sk = d->m_info.supportedKeys();
d->m_add->setEnabled(false);
- for (QStringList::Iterator it = sk.begin(); it!=sk.end(); ++it)
+ for (TQStringList::Iterator it = sk.begin(); it!=sk.end(); ++it)
{
if ( l.find(*it)==l.end() )
{
@@ -259,7 +259,7 @@ void KFileMetaPropsPlugin::applyChanges()
kdDebug(250) << "applying changes" << endl;
// insert the fields that changed into the info object
- QPtrListIterator<KFileMetaInfoWidget> it( d->m_editWidgets );
+ TQPtrListIterator<KFileMetaInfoWidget> it( d->m_editWidgets );
KFileMetaInfoWidget* w;
for (; (w = it.current()); ++it) w->apply();
d->m_info.applyChanges(properties->kurl().path());
diff --git a/kio/kfile/kmetaprops.h b/kio/kfile/kmetaprops.h
index dfa9b6e33..8bd83a3b3 100644
--- a/kio/kfile/kmetaprops.h
+++ b/kio/kfile/kmetaprops.h
@@ -48,13 +48,13 @@ public:
private:
void createLayout();
- QWidget* makeBoolWidget(const KFileMetaInfoItem& item, QWidget* parent);
- QWidget* makeIntWidget(const KFileMetaInfoItem& item, QWidget* parent,
- QString& valClass);
- QWidget* makeStringWidget(const KFileMetaInfoItem& item, QWidget* parent,
- QString& valClass);
- QWidget* makeDateTimeWidget(const KFileMetaInfoItem& item, QWidget* parent,
- QString& valClass);
+ TQWidget* makeBoolWidget(const KFileMetaInfoItem& item, TQWidget* parent);
+ TQWidget* makeIntWidget(const KFileMetaInfoItem& item, TQWidget* parent,
+ TQString& valClass);
+ TQWidget* makeStringWidget(const KFileMetaInfoItem& item, TQWidget* parent,
+ TQString& valClass);
+ TQWidget* makeDateTimeWidget(const KFileMetaInfoItem& item, TQWidget* parent,
+ TQString& valClass);
private slots:
// Code disabled until the "Add" button is implemented
diff --git a/kio/kfile/knotifydialog.cpp b/kio/kfile/knotifydialog.cpp
index 6543344e2..9e370643f 100644
--- a/kio/kfile/knotifydialog.cpp
+++ b/kio/kfile/knotifydialog.cpp
@@ -37,19 +37,19 @@
#include <kurlrequester.h>
#include <kio/netaccess.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
using namespace KNotify;
@@ -115,8 +115,8 @@ namespace KNotify
class KNotifyToolTip : public QToolTip
{
public:
- KNotifyToolTip( QHeader *header )
- : QToolTip( header )
+ KNotifyToolTip( TQHeader *header )
+ : TQToolTip( header )
{
m_tips[COL_EXECUTE] = i18n("Execute a program");
m_tips[COL_STDERR] = i18n("Print to Standard error output");
@@ -128,9 +128,9 @@ namespace KNotify
virtual ~KNotifyToolTip() {}
protected:
- virtual void maybeTip ( const QPoint& p )
+ virtual void maybeTip ( const TQPoint& p )
{
- QHeader *header = static_cast<QHeader*>( parentWidget() );
+ TQHeader *header = static_cast<TQHeader*>( parentWidget() );
int section = 0;
if ( header->orientation() == Horizontal )
@@ -138,40 +138,40 @@ namespace KNotify
else
section= header->sectionAt( p.y() );
- if ( ( section < 0 ) || ( static_cast<uint>( section ) >= (sizeof(m_tips) / sizeof(QString)) ) )
+ if ( ( section < 0 ) || ( static_cast<uint>( section ) >= (sizeof(m_tips) / sizeof(TQString)) ) )
return;
tip( header->sectionRect( section ), m_tips[section] );
}
private:
- QString m_tips[6];
+ TQString m_tips[6];
};
}
-int KNotifyDialog::configure( QWidget *parent, const char *name,
+int KNotifyDialog::configure( TQWidget *parent, const char *name,
const KAboutData *aboutData )
{
KNotifyDialog dialog( parent, name, true, aboutData );
return dialog.exec();
}
-KNotifyDialog::KNotifyDialog( QWidget *parent, const char *name, bool modal,
+KNotifyDialog::KNotifyDialog( TQWidget *parent, const char *name, bool modal,
const KAboutData *aboutData )
: KDialogBase(parent, name, modal, i18n("Notification Settings"),
Ok | Apply | Cancel | Default, Ok, true )
{
- QVBox *box = makeVBoxMainWidget();
+ TQVBox *box = makeVBoxMainWidget();
m_notifyWidget = new KNotifyWidget( box, "knotify widget" );
if ( aboutData )
addApplicationEvents( aboutData->appName() );
- connect( this, SIGNAL( okClicked() ), m_notifyWidget, SLOT( save() ));
- connect( this, SIGNAL( applyClicked() ), m_notifyWidget, SLOT( save() ));
+ connect( this, TQT_SIGNAL( okClicked() ), m_notifyWidget, TQT_SLOT( save() ));
+ connect( this, TQT_SIGNAL( applyClicked() ), m_notifyWidget, TQT_SLOT( save() ));
}
KNotifyDialog::~KNotifyDialog()
@@ -180,11 +180,11 @@ KNotifyDialog::~KNotifyDialog()
void KNotifyDialog::addApplicationEvents( const char *appName )
{
- addApplicationEvents( QString::fromUtf8( appName ) +
- QString::fromLatin1( "/eventsrc" ) );
+ addApplicationEvents( TQString::fromUtf8( appName ) +
+ TQString::fromLatin1( "/eventsrc" ) );
}
-void KNotifyDialog::addApplicationEvents( const QString& path )
+void KNotifyDialog::addApplicationEvents( const TQString& path )
{
Application *app = m_notifyWidget->addApplicationEvents( path );
if ( app )
@@ -212,12 +212,12 @@ void KNotifyDialog::slotDefault()
class KNotifyWidget::Private
{
public:
- QPixmap pixmaps[6];
+ TQPixmap pixmaps[6];
KNotifyToolTip *toolTip;
};
// simple access to all knotify-handled applications
-KNotifyWidget::KNotifyWidget( QWidget *parent, const char *name,
+KNotifyWidget::KNotifyWidget( TQWidget *parent, const char *name,
bool handleAllApps )
: KNotifyWidgetBase( parent, name ? name : "KNotifyWidget" )
{
@@ -237,12 +237,12 @@ KNotifyWidget::KNotifyWidget( QWidget *parent, const char *name,
m_listview->setFullWidth( true );
m_listview->setAllColumnsShowFocus( true );
- QPixmap pexec = SmallIcon("exec");
- QPixmap pstderr = SmallIcon("terminal");
- QPixmap pmessage = SmallIcon("info");
- QPixmap plogfile = SmallIcon("log");
- QPixmap psound = SmallIcon("sound");
- QPixmap ptaskbar = SmallIcon("kicker");
+ TQPixmap pexec = SmallIcon("exec");
+ TQPixmap pstderr = SmallIcon("terminal");
+ TQPixmap pmessage = SmallIcon("info");
+ TQPixmap plogfile = SmallIcon("log");
+ TQPixmap psound = SmallIcon("sound");
+ TQPixmap ptaskbar = SmallIcon("kicker");
d->pixmaps[COL_EXECUTE] = pexec;
d->pixmaps[COL_STDERR] = pstderr;
@@ -253,68 +253,68 @@ KNotifyWidget::KNotifyWidget( QWidget *parent, const char *name,
int w = KIcon::SizeSmall + 6;
- QHeader *header = m_listview->header();
- header->setLabel( COL_EXECUTE, pexec, QString::null, w );
- header->setLabel( COL_STDERR, pstderr, QString::null, w );
- header->setLabel( COL_MESSAGE, pmessage, QString::null, w );
- header->setLabel( COL_LOGFILE, plogfile, QString::null, w );
- header->setLabel( COL_SOUND, psound, QString::null, w );
- header->setLabel( COL_TASKBAR, ptaskbar, QString::null, w );
+ TQHeader *header = m_listview->header();
+ header->setLabel( COL_EXECUTE, pexec, TQString::null, w );
+ header->setLabel( COL_STDERR, pstderr, TQString::null, w );
+ header->setLabel( COL_MESSAGE, pmessage, TQString::null, w );
+ header->setLabel( COL_LOGFILE, plogfile, TQString::null, w );
+ header->setLabel( COL_SOUND, psound, TQString::null, w );
+ header->setLabel( COL_TASKBAR, ptaskbar, TQString::null, w );
d->toolTip = new KNotifyToolTip( header );
m_playButton->setIconSet( SmallIconSet( "player_play" ) );
- connect( m_playButton, SIGNAL( clicked() ), SLOT( playSound() ));
-
- connect( m_listview, SIGNAL( currentChanged( QListViewItem * ) ),
- SLOT( slotEventChanged( QListViewItem * ) ));
- connect( m_listview, SIGNAL(clicked( QListViewItem *, const QPoint&, int)),
- SLOT( slotItemClicked( QListViewItem *, const QPoint&, int )));
-
- connect( m_playSound, SIGNAL( toggled( bool )),
- SLOT( soundToggled( bool )) );
- connect( m_logToFile, SIGNAL( toggled( bool )),
- SLOT( loggingToggled( bool )) );
- connect( m_execute, SIGNAL( toggled( bool )),
- SLOT( executeToggled( bool )) );
- connect( m_messageBox, SIGNAL( toggled( bool )),
- SLOT( messageBoxChanged() ) );
- connect( m_passivePopup, SIGNAL( toggled( bool )),
- SLOT( messageBoxChanged() ) );
- connect( m_stderr, SIGNAL( toggled( bool )),
- SLOT( stderrToggled( bool ) ) );
- connect( m_taskbar, SIGNAL( toggled( bool )),
- SLOT( taskbarToggled( bool ) ) );
-
- connect( m_soundPath, SIGNAL( textChanged( const QString& )),
- SLOT( soundFileChanged( const QString& )));
- connect( m_logfilePath, SIGNAL( textChanged( const QString& )),
- SLOT( logfileChanged( const QString& ) ));
- connect( m_executePath, SIGNAL( textChanged( const QString& )),
- SLOT( commandlineChanged( const QString& ) ));
-
- connect( m_soundPath, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( openSoundDialog( KURLRequester * )));
- connect( m_logfilePath, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( openLogDialog( KURLRequester * )));
- connect( m_executePath, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( openExecDialog( KURLRequester * )));
-
- connect( m_extension, SIGNAL( clicked() ),
- SLOT( toggleAdvanced()) );
-
- connect( m_buttonEnable, SIGNAL( clicked() ), SLOT( enableAll() ));
- connect( m_buttonDisable, SIGNAL( clicked() ), SLOT( enableAll() ));
-
- QString whatsThis = i18n("<qt>You may use the following macros<br>"
+ connect( m_playButton, TQT_SIGNAL( clicked() ), TQT_SLOT( playSound() ));
+
+ connect( m_listview, TQT_SIGNAL( currentChanged( TQListViewItem * ) ),
+ TQT_SLOT( slotEventChanged( TQListViewItem * ) ));
+ connect( m_listview, TQT_SIGNAL(clicked( TQListViewItem *, const TQPoint&, int)),
+ TQT_SLOT( slotItemClicked( TQListViewItem *, const TQPoint&, int )));
+
+ connect( m_playSound, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( soundToggled( bool )) );
+ connect( m_logToFile, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( loggingToggled( bool )) );
+ connect( m_execute, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( executeToggled( bool )) );
+ connect( m_messageBox, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( messageBoxChanged() ) );
+ connect( m_passivePopup, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( messageBoxChanged() ) );
+ connect( m_stderr, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( stderrToggled( bool ) ) );
+ connect( m_taskbar, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( taskbarToggled( bool ) ) );
+
+ connect( m_soundPath, TQT_SIGNAL( textChanged( const TQString& )),
+ TQT_SLOT( soundFileChanged( const TQString& )));
+ connect( m_logfilePath, TQT_SIGNAL( textChanged( const TQString& )),
+ TQT_SLOT( logfileChanged( const TQString& ) ));
+ connect( m_executePath, TQT_SIGNAL( textChanged( const TQString& )),
+ TQT_SLOT( commandlineChanged( const TQString& ) ));
+
+ connect( m_soundPath, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( openSoundDialog( KURLRequester * )));
+ connect( m_logfilePath, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( openLogDialog( KURLRequester * )));
+ connect( m_executePath, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( openExecDialog( KURLRequester * )));
+
+ connect( m_extension, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( toggleAdvanced()) );
+
+ connect( m_buttonEnable, TQT_SIGNAL( clicked() ), TQT_SLOT( enableAll() ));
+ connect( m_buttonDisable, TQT_SIGNAL( clicked() ), TQT_SLOT( enableAll() ));
+
+ TQString whatsThis = i18n("<qt>You may use the following macros<br>"
"in the commandline:<br>"
"<b>%e</b>: for the event name,<br>"
"<b>%a</b>: for the name of the application that sent the event,<br>"
"<b>%s</b>: for the notification message,<br>"
"<b>%w</b>: for the numeric window ID where the event originated,<br>"
"<b>%i</b>: for the numeric event ID.");
- QWhatsThis::add( m_execute, whatsThis );
- QWhatsThis::add( m_executePath, whatsThis );
+ TQWhatsThis::add( m_execute, whatsThis );
+ TQWhatsThis::add( m_executePath, whatsThis );
showAdvanced( false );
@@ -337,7 +337,7 @@ void KNotifyWidget::showAdvanced( bool show )
if ( show )
{
m_extension->setText( i18n("Advanced <<") );
- QToolTip::add( m_extension, i18n("Hide advanced options") );
+ TQToolTip::add( m_extension, i18n("Hide advanced options") );
m_logToFile->show();
m_logfilePath->show();
@@ -354,7 +354,7 @@ void KNotifyWidget::showAdvanced( bool show )
else
{
m_extension->setText( i18n("Advanced >>") );
- QToolTip::add( m_extension, i18n("Show advanced options") );
+ TQToolTip::add( m_extension, i18n("Show advanced options") );
m_logToFile->hide();
m_logfilePath->hide();
@@ -369,10 +369,10 @@ void KNotifyWidget::showAdvanced( bool show )
}
}
-Application * KNotifyWidget::addApplicationEvents( const QString& path )
+Application * KNotifyWidget::addApplicationEvents( const TQString& path )
{
kdDebug() << "**** knotify: adding path: " << path << endl;
- QString relativePath = path;
+ TQString relativePath = path;
if ( path.at(0) == '/' && KStandardDirs::exists( path ) )
relativePath = makeRelative( path );
@@ -400,13 +400,13 @@ void KNotifyWidget::clearVisible()
slotEventChanged( 0L ); // disable widgets
}
-void KNotifyWidget::showEvent( QShowEvent *e )
+void KNotifyWidget::showEvent( TQShowEvent *e )
{
selectItem( m_listview->firstChild() );
KNotifyWidgetBase::showEvent( e );
}
-void KNotifyWidget::slotEventChanged( QListViewItem *item )
+void KNotifyWidget::slotEventChanged( TQListViewItem *item )
{
bool on = (item != 0L);
@@ -484,7 +484,7 @@ void KNotifyWidget::updateWidgets( ListViewItem *item )
void KNotifyWidget::updatePixmaps( ListViewItem *item )
{
- QPixmap emptyPix;
+ TQPixmap emptyPix;
Event &event = item->event();
bool doIt = (event.presentation & KNotifyClient::Execute) &&
@@ -520,7 +520,7 @@ void KNotifyWidget::addVisibleApp( Application *app )
m_visibleApps.append( app );
addToView( app->eventList() );
- QListViewItem *item = m_listview->selectedItem();
+ TQListViewItem *item = m_listview->selectedItem();
if ( !item )
item = m_listview->firstChild();
@@ -556,8 +556,8 @@ void KNotifyWidget::addToView( const EventList& events )
}
}
-void KNotifyWidget::widgetChanged( QListViewItem *item,
- int what, bool on, QWidget *buddy )
+void KNotifyWidget::widgetChanged( TQListViewItem *item,
+ int what, bool on, TQWidget *buddy )
{
if ( signalsBlocked() )
return;
@@ -580,31 +580,31 @@ void KNotifyWidget::widgetChanged( QListViewItem *item,
void KNotifyWidget::soundToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool doIcon = on && !m_soundPath->url().isEmpty();
- item->setPixmap( COL_SOUND, doIcon ? d->pixmaps[COL_SOUND] : QPixmap() );
+ item->setPixmap( COL_SOUND, doIcon ? d->pixmaps[COL_SOUND] : TQPixmap() );
widgetChanged( item, KNotifyClient::Sound, on, m_soundPath );
}
void KNotifyWidget::loggingToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool doIcon = on && !m_logfilePath->url().isEmpty();
- item->setPixmap(COL_LOGFILE, doIcon ? d->pixmaps[COL_LOGFILE] : QPixmap());
+ item->setPixmap(COL_LOGFILE, doIcon ? d->pixmaps[COL_LOGFILE] : TQPixmap());
widgetChanged( item, KNotifyClient::Logfile, on, m_logfilePath );
}
void KNotifyWidget::executeToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool doIcon = on && !m_executePath->url().isEmpty();
- item->setPixmap(COL_EXECUTE, doIcon ? d->pixmaps[COL_EXECUTE] : QPixmap());
+ item->setPixmap(COL_EXECUTE, doIcon ? d->pixmaps[COL_EXECUTE] : TQPixmap());
widgetChanged( item, KNotifyClient::Execute, on, m_executePath );
}
@@ -615,12 +615,12 @@ void KNotifyWidget::messageBoxChanged()
m_passivePopup->setEnabled( m_messageBox->isChecked() );
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool on = m_passivePopup->isEnabled();
- item->setPixmap( COL_MESSAGE, on ? d->pixmaps[COL_MESSAGE] : QPixmap() );
+ item->setPixmap( COL_MESSAGE, on ? d->pixmaps[COL_MESSAGE] : TQPixmap() );
Event &e = static_cast<ListViewItem*>( item )->event();
@@ -644,28 +644,28 @@ void KNotifyWidget::messageBoxChanged()
void KNotifyWidget::stderrToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
- item->setPixmap( COL_STDERR, on ? d->pixmaps[COL_STDERR] : QPixmap() );
+ item->setPixmap( COL_STDERR, on ? d->pixmaps[COL_STDERR] : TQPixmap() );
widgetChanged( item, KNotifyClient::Stderr, on );
}
void KNotifyWidget::taskbarToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
- item->setPixmap( COL_TASKBAR, on ? d->pixmaps[COL_TASKBAR] : QPixmap() );
+ item->setPixmap( COL_TASKBAR, on ? d->pixmaps[COL_TASKBAR] : TQPixmap() );
widgetChanged( item, KNotifyClient::Taskbar, on );
}
-void KNotifyWidget::soundFileChanged( const QString& text )
+void KNotifyWidget::soundFileChanged( const TQString& text )
{
if ( signalsBlocked() )
return;
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
@@ -673,44 +673,44 @@ void KNotifyWidget::soundFileChanged( const QString& text )
currentEvent()->soundfile = text;
bool ok = !text.isEmpty() && m_playSound->isChecked();
- item->setPixmap( COL_SOUND, ok ? d->pixmaps[COL_SOUND] : QPixmap() );
+ item->setPixmap( COL_SOUND, ok ? d->pixmaps[COL_SOUND] : TQPixmap() );
emit changed( true );
}
-void KNotifyWidget::logfileChanged( const QString& text )
+void KNotifyWidget::logfileChanged( const TQString& text )
{
if ( signalsBlocked() )
return;
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
currentEvent()->logfile = text;
bool ok = !text.isEmpty() && m_logToFile->isChecked();
- item->setPixmap( COL_LOGFILE, ok ? d->pixmaps[COL_LOGFILE] : QPixmap() );
+ item->setPixmap( COL_LOGFILE, ok ? d->pixmaps[COL_LOGFILE] : TQPixmap() );
emit changed( true );
}
-void KNotifyWidget::commandlineChanged( const QString& text )
+void KNotifyWidget::commandlineChanged( const TQString& text )
{
if ( signalsBlocked() )
return;
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
currentEvent()->commandline = text;
bool ok = !text.isEmpty() && m_execute->isChecked();
- item->setPixmap( COL_EXECUTE, ok ? d->pixmaps[COL_EXECUTE] : QPixmap() );
+ item->setPixmap( COL_EXECUTE, ok ? d->pixmaps[COL_EXECUTE] : TQPixmap() );
emit changed( true );
}
-void KNotifyWidget::slotItemClicked( QListViewItem *item, const QPoint&,
+void KNotifyWidget::slotItemClicked( TQListViewItem *item, const TQPoint&,
int col )
{
if ( !item || !item->isSelected() )
@@ -764,7 +764,7 @@ void KNotifyWidget::sort( bool ascending )
m_listview->sort();
}
-void KNotifyWidget::selectItem( QListViewItem *item )
+void KNotifyWidget::selectItem( TQListViewItem *item )
{
if ( item )
{
@@ -828,20 +828,20 @@ void KNotifyWidget::save()
// returns e.g. "kwin/eventsrc" from a given path
// "/opt/kde3/share/apps/kwin/eventsrc"
-QString KNotifyWidget::makeRelative( const QString& fullPath )
+TQString KNotifyWidget::makeRelative( const TQString& fullPath )
{
int slash = fullPath.findRev( '/' ) - 1;
slash = fullPath.findRev( '/', slash );
if ( slash < 0 )
- return QString::null;
+ return TQString::null;
return fullPath.mid( slash+1 );
}
Event * KNotifyWidget::currentEvent()
{
- QListViewItem *current = m_listview->currentItem();
+ TQListViewItem *current = m_listview->currentItem();
if ( !current )
return 0L;
@@ -851,27 +851,27 @@ Event * KNotifyWidget::currentEvent()
void KNotifyWidget::openSoundDialog( KURLRequester *requester )
{
// only need to init this once
- requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )),
- this, SLOT( openSoundDialog( KURLRequester * )));
+ requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ this, TQT_SLOT( openSoundDialog( 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
const Application *app = currentEvent()->application();
- QStringList soundDirs =
+ TQStringList soundDirs =
KGlobal::dirs()->findDirs("data", app->appName() + "/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 ) {
@@ -887,12 +887,12 @@ void KNotifyWidget::openSoundDialog( KURLRequester *requester )
void KNotifyWidget::openLogDialog( KURLRequester *requester )
{
// only need to init this once
- requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )),
- this, SLOT( openLogDialog( KURLRequester * )));
+ requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ this, TQT_SLOT( openLogDialog( KURLRequester * )));
KFileDialog *fileDialog = requester->fileDialog();
fileDialog->setCaption( i18n("Select Log File") );
- QStringList filters;
+ TQStringList filters;
filters << "text/x-log" << "text/plain";
fileDialog->setMimeFilter( filters );
}
@@ -900,13 +900,13 @@ void KNotifyWidget::openLogDialog( KURLRequester *requester )
void KNotifyWidget::openExecDialog( KURLRequester *requester )
{
// only need to init this once
- requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )),
- this, SLOT( openExecDialog( KURLRequester * )));
+ requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ this, TQT_SLOT( openExecDialog( KURLRequester * )));
KFileDialog *fileDialog = requester->fileDialog();
fileDialog->setCaption( i18n("Select File to Execute") );
- QStringList filters;
+ TQStringList filters;
filters << "application/x-executable" << "application/x-shellscript"
<< "application/x-perl" << "application/x-python";
fileDialog->setMimeFilter( filters );
@@ -914,19 +914,19 @@ void KNotifyWidget::openExecDialog( KURLRequester *requester )
void KNotifyWidget::playSound()
{
- QString soundPath = m_soundPath->url();
+ TQString soundPath = m_soundPath->url();
if (!KIO::NetAccess::exists( m_soundPath->url(), true, 0 )) {
bool foundSound=false;
// find the first "sound"-resource that contains files
const Application *app = currentEvent()->application();
- QStringList soundDirs = KGlobal::dirs()->findDirs("data", app->appName() + "/sounds");
+ TQStringList soundDirs = KGlobal::dirs()->findDirs("data", app->appName() + "/sounds");
soundDirs += KGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) {
- 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 &&
@@ -975,14 +975,14 @@ void KNotifyWidget::enableAll( int what, bool enable )
}
// now make the listview reflect the changes
- QListViewItemIterator it( m_listview->firstChild() );
+ TQListViewItemIterator it( m_listview->firstChild() );
for ( ; it.current(); ++it )
{
ListViewItem *item = static_cast<ListViewItem*>( it.current() );
updatePixmaps( item );
}
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
item = m_listview->firstChild();
selectItem( item );
@@ -998,17 +998,17 @@ void KNotifyWidget::enableAll( int what, bool enable )
//
// path must be "appname/eventsrc", i.e. a relative path
//
-Application::Application( const QString &path )
+Application::Application( const TQString &path )
{
- QString config_file = path;
+ TQString config_file = path;
config_file[config_file.find('/')] = '.';
m_events = 0L;
config = new KConfig(config_file, false, false);
kc = new KConfig(path, true, false, "data");
- kc->setGroup( QString::fromLatin1("!Global!") );
- m_icon = kc->readEntry(QString::fromLatin1("IconName"),
- QString::fromLatin1("misc"));
- m_description = kc->readEntry( QString::fromLatin1("Comment"),
+ kc->setGroup( TQString::fromLatin1("!Global!") );
+ m_icon = kc->readEntry(TQString::fromLatin1("IconName"),
+ TQString::fromLatin1("misc"));
+ m_description = kc->readEntry( TQString::fromLatin1("Comment"),
i18n("No description available") );
int index = path.find( '/' );
@@ -1070,13 +1070,13 @@ void Application::reloadEvents( bool revertToDefaults )
Event *e = 0L;
- QString global = QString::fromLatin1("!Global!");
- QString default_group = QString::fromLatin1("<default>");
- QString name = QString::fromLatin1("Name");
- QString comment = QString::fromLatin1("Comment");
+ TQString global = TQString::fromLatin1("!Global!");
+ TQString default_group = TQString::fromLatin1("<default>");
+ TQString name = TQString::fromLatin1("Name");
+ TQString comment = TQString::fromLatin1("Comment");
- QStringList conflist = kc->groupList();
- QStringList::ConstIterator it = conflist.begin();
+ TQStringList conflist = kc->groupList();
+ TQStringList::ConstIterator it = conflist.begin();
while ( it != conflist.end() ) {
if ( (*it) != global && (*it) != default_group ) { // event group
@@ -1095,9 +1095,9 @@ void Application::reloadEvents( bool revertToDefaults )
// default to passive popups over plain messageboxes
int default_rep = kc->readNumEntry("default_presentation",
0 | KNotifyClient::PassivePopup);
- QString default_logfile = kc->readPathEntry("default_logfile");
- QString default_soundfile = kc->readPathEntry("default_sound");
- QString default_commandline = kc->readPathEntry("default_commandline");
+ TQString default_logfile = kc->readPathEntry("default_logfile");
+ TQString default_soundfile = kc->readPathEntry("default_sound");
+ TQString default_commandline = kc->readPathEntry("default_commandline");
config->setGroup(*it);
@@ -1134,14 +1134,14 @@ void Application::reloadEvents( bool revertToDefaults )
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-ListViewItem::ListViewItem( QListView *view, Event *event )
- : QListViewItem( view ),
+ListViewItem::ListViewItem( TQListView *view, Event *event )
+ : TQListViewItem( view ),
m_event( event )
{
setText( COL_EVENT, event->text() );
}
-int ListViewItem::compare ( QListViewItem * i, int col, bool ascending ) const
+int ListViewItem::compare ( TQListViewItem * i, int col, bool ascending ) const
{
ListViewItem *item = static_cast<ListViewItem*>( i );
int myPres = m_event->presentation;
@@ -1152,7 +1152,7 @@ int ListViewItem::compare ( QListViewItem * i, int col, bool ascending ) const
switch ( col )
{
case COL_EVENT: // use default sorting
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
case COL_EXECUTE:
action = KNotifyClient::Execute;
@@ -1177,7 +1177,7 @@ int ListViewItem::compare ( QListViewItem * i, int col, bool ascending ) const
if ( (myPres & action) == (otherPres & action) )
{
// default sorting by event
- return QListViewItem::compare( i, COL_EVENT, true );
+ return TQListViewItem::compare( i, COL_EVENT, true );
}
if ( myPres & action )
diff --git a/kio/kfile/knotifydialog.h b/kio/kfile/knotifydialog.h
index 3d4074fd0..a1c4ef52f 100644
--- a/kio/kfile/knotifydialog.h
+++ b/kio/kfile/knotifydialog.h
@@ -68,7 +68,7 @@ public:
* Set this to 0L if you want to add all events yourself with
* addApplicationEvents().
*/
- KNotifyDialog( QWidget *parent = 0, const char *name = 0,
+ KNotifyDialog( TQWidget *parent = 0, const char *name = 0,
bool modal = true,
const KAboutData *aboutData =
KGlobal::instance()->aboutData() );
@@ -85,9 +85,9 @@ public:
* @param aboutData A pointer to a KAboutData object. KAboutData::appName()
* will be used to find the KNotify events (in the eventsrc file).
* @see exec for the return values.
- * @return The value of QDialog::exec()
+ * @return The value of TQDialog::exec()
*/
- static int configure( QWidget *parent = 0, const char *name = 0,
+ static int configure( TQWidget *parent = 0, const char *name = 0,
const KAboutData *aboutData = KGlobal::instance()->aboutData() );
/**
@@ -110,7 +110,7 @@ public:
* A relative path would be e.g. "kwin/eventsrc".
* @see clearApplicationEvents()
*/
- virtual void addApplicationEvents( const QString& path );
+ virtual void addApplicationEvents( const TQString& path );
/**
* Removes all the events added with addApplicationEvents()
@@ -141,9 +141,9 @@ namespace KNotify
class Application;
class Event;
class ListViewItem;
- typedef QPtrList<Event> EventList;
- typedef QPtrListIterator<Application> ApplicationListIterator;
- typedef QPtrListIterator<Event> EventListIterator;
+ typedef TQPtrList<Event> EventList;
+ typedef TQPtrListIterator<Application> ApplicationListIterator;
+ typedef TQPtrListIterator<Event> EventListIterator;
/**
* @internal
@@ -151,21 +151,21 @@ namespace KNotify
class KIO_EXPORT Application
{
public:
- Application( const QString &path );
+ Application( const TQString &path );
~Application();
- QString text() const { return m_description; }
- QString icon() const { return m_icon; }
+ TQString text() const { return m_description; }
+ TQString icon() const { return m_icon; }
const EventList& eventList();
void reloadEvents( bool revertToDefaults = false );
void save();
- QString appName() const { return m_appname; }
+ TQString appName() const { return m_appname; }
private:
- QString m_icon;
- QString m_description;
- QString m_appname;
+ TQString m_icon;
+ TQString m_description;
+ TQString m_appname;
EventList *m_events;
KConfig *kc; // The file that defines the events.
@@ -173,10 +173,10 @@ namespace KNotify
};
- class KIO_EXPORT ApplicationList : public QPtrList<Application>
+ class KIO_EXPORT ApplicationList : public TQPtrList<Application>
{
- virtual int compareItems ( QPtrCollection::Item item1,
- QPtrCollection::Item item2 )
+ virtual int compareItems ( TQPtrCollection::Item item1,
+ TQPtrCollection::Item item2 )
{
return (static_cast<Application*>( item1 )->text() >=
static_cast<Application*>( item2 )->text()) ? 1 : -1;
@@ -191,7 +191,7 @@ namespace KNotify
Q_OBJECT
public:
- KNotifyWidget( QWidget* parent = 0, const char* name = 0,
+ KNotifyWidget( TQWidget* parent = 0, const char* name = 0,
bool handleAllApps = false );
~KNotifyWidget();
@@ -208,7 +208,7 @@ namespace KNotify
* The returned pointer must be freed by the caller (easiest done
* by putting it into an ApplicationList with setAutoDelete( true )).
*/
- Application * addApplicationEvents( const QString& path );
+ Application * addApplicationEvents( const TQString& path );
void resetDefaults( bool ask );
void sort( bool ascending = true );
@@ -237,7 +237,7 @@ namespace KNotify
* May return 0L, if there is no current event selected.
*/
Event * currentEvent();
- virtual void showEvent( QShowEvent * );
+ virtual void showEvent( TQShowEvent * );
virtual void enableAll( int what, bool enable );
void reload( bool revertToDefaults = false );
@@ -246,9 +246,9 @@ namespace KNotify
void playSound();
private slots:
- void slotItemClicked( QListViewItem *item, const QPoint& point,
+ void slotItemClicked( TQListViewItem *item, const TQPoint& point,
int col );
- void slotEventChanged( QListViewItem * );
+ void slotEventChanged( TQListViewItem * );
void soundToggled( bool on );
void loggingToggled( bool on );
void executeToggled( bool on );
@@ -256,9 +256,9 @@ namespace KNotify
void stderrToggled( bool on );
void taskbarToggled( bool on );
- void soundFileChanged( const QString& text );
- void logfileChanged( const QString& text );
- void commandlineChanged( const QString& text );
+ void soundFileChanged( const TQString& text );
+ void logfileChanged( const TQString& text );
+ void commandlineChanged( const TQString& text );
void openSoundDialog( KURLRequester * );
void openLogDialog( KURLRequester * );
@@ -270,11 +270,11 @@ namespace KNotify
void updateWidgets( ListViewItem *item );
void updatePixmaps( ListViewItem *item );
- static QString makeRelative( const QString& );
+ static TQString makeRelative( const TQString& );
void addToView( const EventList& events );
- void widgetChanged( QListViewItem *item,
- int what, bool on, QWidget *buddy = 0L );
- void selectItem( QListViewItem *item );
+ void widgetChanged( TQListViewItem *item,
+ int what, bool on, TQWidget *buddy = 0L );
+ void selectItem( TQListViewItem *item );
ApplicationList m_visibleApps;
ApplicationList m_allApps;
@@ -297,13 +297,13 @@ namespace KNotify
friend class Application;
public:
- QString text() const { return description; }
+ TQString text() const { return description; }
int presentation;
int dontShow;
- QString logfile;
- QString soundfile;
- QString commandline;
+ TQString logfile;
+ TQString soundfile;
+ TQString commandline;
const Application *application() const { return m_app; }
@@ -313,9 +313,9 @@ namespace KNotify
dontShow = 0;
m_app = app;
}
- QString name;
- QString description;
- QString configGroup;
+ TQString name;
+ TQString description;
+ TQString configGroup;
const Application *m_app;
};
@@ -326,10 +326,10 @@ namespace KNotify
class ListViewItem : public QListViewItem
{
public:
- ListViewItem( QListView *view, Event *event );
+ ListViewItem( TQListView *view, Event *event );
Event& event() { return *m_event; }
- virtual int compare (QListViewItem * i, int col, bool ascending) const;
+ virtual int compare (TQListViewItem * i, int col, bool ascending) const;
private:
Event * m_event;
diff --git a/kio/kfile/kopenwith.cpp b/kio/kfile/kopenwith.cpp
index f1a71341b..2a3e7e690 100644
--- a/kio/kfile/kopenwith.cpp
+++ b/kio/kfile/kopenwith.cpp
@@ -20,19 +20,19 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qdir.h>
-#include <qdialog.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qstyle.h>
-#include <qwhatsthis.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqdialog.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -64,14 +64,14 @@
#include <assert.h>
#include <stdlib.h>
-#define SORT_SPEC (QDir::DirsFirst | QDir::Name | QDir::IgnoreCase)
+#define SORT_SPEC (TQDir::DirsFirst | TQDir::Name | TQDir::IgnoreCase)
// ----------------------------------------------------------------------
-KAppTreeListItem::KAppTreeListItem( KListView* parent, const QString & name,
- const QPixmap& pixmap, bool parse, bool dir, const QString &p, const QString &c )
- : QListViewItem( parent, name )
+KAppTreeListItem::KAppTreeListItem( KListView* parent, const TQString & name,
+ const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c )
+ : TQListViewItem( parent, name )
{
init(pixmap, parse, dir, p, c);
}
@@ -79,9 +79,9 @@ KAppTreeListItem::KAppTreeListItem( KListView* parent, const QString & name,
// ----------------------------------------------------------------------
-KAppTreeListItem::KAppTreeListItem( QListViewItem* parent, const QString & name,
- const QPixmap& pixmap, bool parse, bool dir, const QString &p, const QString &c )
- : QListViewItem( parent, name )
+KAppTreeListItem::KAppTreeListItem( TQListViewItem* parent, const TQString & name,
+ const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c )
+ : TQListViewItem( parent, name )
{
init(pixmap, parse, dir, p, c);
}
@@ -89,7 +89,7 @@ KAppTreeListItem::KAppTreeListItem( QListViewItem* parent, const QString & name,
// ----------------------------------------------------------------------
-void KAppTreeListItem::init(const QPixmap& pixmap, bool parse, bool dir, const QString &_path, const QString &_exec)
+void KAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString &_path, const TQString &_exec)
{
setPixmap(0, pixmap);
parsed = parse;
@@ -100,7 +100,7 @@ void KAppTreeListItem::init(const QPixmap& pixmap, bool parse, bool dir, const Q
/* Ensures that directories sort before non-directories */
-int KAppTreeListItem::compare(QListViewItem *i, int col, bool ascending) const
+int KAppTreeListItem::compare(TQListViewItem *i, int col, bool ascending) const
{
KAppTreeListItem *other = dynamic_cast<KAppTreeListItem *>(i);
@@ -112,12 +112,12 @@ int KAppTreeListItem::compare(QListViewItem *i, int col, bool ascending) const
return 1;
else // both directories or both not
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
// ----------------------------------------------------------------------
// Ensure that case is ignored
-QString KAppTreeListItem::key(int column, bool /*ascending*/) const
+TQString KAppTreeListItem::key(int column, bool /*ascending*/) const
{
return text(column).upper();
}
@@ -134,7 +134,7 @@ void KAppTreeListItem::setOpen( bool o )
((KApplicationTree *) parent())->addDesktopGroup( path, this );
parsed = true;
}
- QListViewItem::setOpen( o );
+ TQListViewItem::setOpen( o );
}
bool KAppTreeListItem::isDirectory()
@@ -144,19 +144,19 @@ bool KAppTreeListItem::isDirectory()
// ----------------------------------------------------------------------
-KApplicationTree::KApplicationTree( QWidget *parent )
+KApplicationTree::KApplicationTree( TQWidget *parent )
: KListView( parent ), currentitem(0)
{
addColumn( i18n("Known Applications") );
setRootIsDecorated( true );
- addDesktopGroup( QString::null );
+ addDesktopGroup( TQString::null );
cleanupTree();
- connect( this, SIGNAL( currentChanged(QListViewItem*) ),
- SLOT( slotItemHighlighted(QListViewItem*) ) );
- connect( this, SIGNAL( selectionChanged(QListViewItem*) ),
- SLOT( slotSelectionChanged(QListViewItem*) ) );
+ connect( this, TQT_SIGNAL( currentChanged(TQListViewItem*) ),
+ TQT_SLOT( slotItemHighlighted(TQListViewItem*) ) );
+ connect( this, TQT_SIGNAL( selectionChanged(TQListViewItem*) ),
+ TQT_SLOT( slotSelectionChanged(TQListViewItem*) ) );
}
// ----------------------------------------------------------------------
@@ -169,20 +169,20 @@ bool KApplicationTree::isDirSel()
// ----------------------------------------------------------------------
-static QPixmap appIcon(const QString &iconName)
+static TQPixmap appIcon(const TQString &iconName)
{
- QPixmap normal = KGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, 0L, true);
+ TQPixmap normal = KGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, 0L, true);
// make sure they are not larger than 20x20
if (normal.width() > 20 || normal.height() > 20)
{
- QImage tmp = normal.convertToImage();
+ TQImage tmp = normal.convertToImage();
tmp = tmp.smoothScale(20, 20);
normal.convertFromImage(tmp);
}
return normal;
}
-void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem *item)
+void KApplicationTree::addDesktopGroup( const TQString &relPath, KAppTreeListItem *item)
{
KServiceGroup::Ptr root = KServiceGroup::group(relPath);
if (!root || !root->isValid()) return;
@@ -193,10 +193,10 @@ void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem
for( KServiceGroup::List::ConstIterator it = list.begin();
it != list.end(); it++)
{
- QString icon;
- QString text;
- QString relPath;
- QString exec;
+ TQString icon;
+ TQString text;
+ TQString relPath;
+ TQString exec;
bool isDir = false;
KSycocaEntry *p = (*it);
if (p->isType(KST_KService))
@@ -228,7 +228,7 @@ void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem
continue;
}
- QPixmap pixmap = appIcon( icon );
+ TQPixmap pixmap = appIcon( icon );
if (item)
newItem = new KAppTreeListItem( item, text, pixmap, false, isDir,
@@ -244,7 +244,7 @@ void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem
// ----------------------------------------------------------------------
-void KApplicationTree::slotItemHighlighted(QListViewItem* i)
+void KApplicationTree::slotItemHighlighted(TQListViewItem* i)
{
// i may be 0 (see documentation)
if(!i)
@@ -261,7 +261,7 @@ void KApplicationTree::slotItemHighlighted(QListViewItem* i)
// ----------------------------------------------------------------------
-void KApplicationTree::slotSelectionChanged(QListViewItem* i)
+void KApplicationTree::slotSelectionChanged(TQListViewItem* i)
{
// i may be 0 (see documentation)
if(!i)
@@ -277,22 +277,22 @@ void KApplicationTree::slotSelectionChanged(QListViewItem* i)
// ----------------------------------------------------------------------
-void KApplicationTree::resizeEvent( QResizeEvent * e)
+void KApplicationTree::resizeEvent( TQResizeEvent * e)
{
- setColumnWidth(0, width()-QApplication::style().pixelMetric(QStyle::PM_ScrollBarExtent)
- -2*QApplication::style().pixelMetric(QStyle::PM_DefaultFrameWidth));
+ setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent)
+ -2*TQApplication::style().pixelMetric(TQStyle::PM_DefaultFrameWidth));
KListView::resizeEvent(e);
}
// Prune empty directories from the tree
void KApplicationTree::cleanupTree()
{
- QListViewItem *item=firstChild();
+ TQListViewItem *item=firstChild();
while(item!=0)
{
if(item->isExpandable())
{
- QListViewItem *temp=item->itemBelow();
+ TQListViewItem *temp=item->itemBelow();
if(item->text(0)!=i18n("Applications"))
item->setOpen(false);
item=temp;
@@ -311,16 +311,16 @@ class KOpenWithDlgPrivate
{
public:
KOpenWithDlgPrivate() : saveNewApps(false) { };
- QPushButton* ok;
+ TQPushButton* ok;
bool saveNewApps;
KService::Ptr curService;
};
-KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, QWidget* parent )
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, TQWidget* parent )
+ :TQDialog( parent, "openwith", true )
{
setCaption( i18n( "Open With" ) );
- QString text;
+ TQString text;
if( _urls.count() == 1 )
{
text = i18n("<qt>Select the program that should be used to open <b>%1</b>. "
@@ -331,27 +331,27 @@ KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, QWidget* parent )
// Should never happen ??
text = i18n( "Choose the name of the program with which to open the selected files." );
setServiceType( _urls );
- init( text, QString() );
+ init( text, TQString() );
}
-KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, const QString&_text,
- const QString& _value, QWidget *parent)
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, const TQString&_text,
+ const TQString& _value, TQWidget *parent)
+ :TQDialog( parent, "openwith", true )
{
- QString caption = KStringHandler::csqueeze( _urls.first().prettyURL() );
+ TQString caption = KStringHandler::csqueeze( _urls.first().prettyURL() );
if (_urls.count() > 1)
- caption += QString::fromLatin1("...");
+ caption += TQString::fromLatin1("...");
setCaption(caption);
setServiceType( _urls );
init( _text, _value );
}
-KOpenWithDlg::KOpenWithDlg( const QString &serviceType, const QString& value,
- QWidget *parent)
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( const TQString &serviceType, const TQString& value,
+ TQWidget *parent)
+ :TQDialog( parent, "openwith", true )
{
setCaption(i18n("Choose Application for %1").arg(serviceType));
- QString text = i18n("<qt>Select the program for the file type: <b>%1</b>. "
+ TQString text = i18n("<qt>Select the program for the file type: <b>%1</b>. "
"If the program is not listed, enter the name or click "
"the browse button.</qt>").arg(serviceType);
qServiceType = serviceType;
@@ -360,15 +360,15 @@ KOpenWithDlg::KOpenWithDlg( const QString &serviceType, const QString& value,
remember->hide();
}
-KOpenWithDlg::KOpenWithDlg( QWidget *parent)
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( TQWidget *parent)
+ :TQDialog( parent, "openwith", true )
{
setCaption(i18n("Choose Application"));
- QString text = i18n("<qt>Select a program. "
+ TQString text = i18n("<qt>Select a program. "
"If the program is not listed, enter the name or click "
"the browse button.</qt>");
- qServiceType = QString::null;
- init( text, QString::null );
+ qServiceType = TQString::null;
+ init( text, TQString::null );
}
void KOpenWithDlg::setServiceType( const KURL::List& _urls )
@@ -376,14 +376,14 @@ void KOpenWithDlg::setServiceType( const KURL::List& _urls )
if ( _urls.count() == 1 )
{
qServiceType = KMimeType::findByURL( _urls.first())->name();
- if (qServiceType == QString::fromLatin1("application/octet-stream"))
- qServiceType = QString::null;
+ if (qServiceType == TQString::fromLatin1("application/octet-stream"))
+ qServiceType = TQString::null;
}
else
- qServiceType = QString::null;
+ qServiceType = TQString::null;
}
-void KOpenWithDlg::init( const QString& _text, const QString& _value )
+void KOpenWithDlg::init( const TQString& _text, const TQString& _value )
{
d = new KOpenWithDlgPrivate;
bool bReadOnly = kapp && !kapp->authorize("shell_access");
@@ -392,18 +392,18 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
m_pService = 0L;
d->curService = 0L;
- QBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- label = new QLabel( _text, this );
+ label = new TQLabel( _text, this );
topLayout->addWidget(label);
- QHBoxLayout* hbox = new QHBoxLayout(topLayout);
+ TQHBoxLayout* hbox = new TQHBoxLayout(topLayout);
- QToolButton *clearButton = new QToolButton( this );
+ TQToolButton *clearButton = new TQToolButton( this );
clearButton->setIconSet( BarIcon( "locationbar_erase" ) );
clearButton->setFixedSize( clearButton->sizeHint() );
- connect( clearButton, SIGNAL( clicked() ), SLOT( slotClear() ) );
- QToolTip::add( clearButton, i18n( "Clear input field" ) );
+ connect( clearButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotClear() ) );
+ TQToolTip::add( clearButton, i18n( "Clear input field" ) );
hbox->addWidget( clearButton );
@@ -413,13 +413,13 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
KHistoryCombo *combo = new KHistoryCombo();
combo->setDuplicatesEnabled( false );
KConfig *kc = KGlobal::config();
- KConfigGroupSaver ks( kc, QString::fromLatin1("Open-with settings") );
- int max = kc->readNumEntry( QString::fromLatin1("Maximum history"), 15 );
+ KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") );
+ int max = kc->readNumEntry( TQString::fromLatin1("Maximum history"), 15 );
combo->setMaxCount( max );
- int mode = kc->readNumEntry(QString::fromLatin1("CompletionMode"),
+ int mode = kc->readNumEntry(TQString::fromLatin1("CompletionMode"),
KGlobalSettings::completionMode());
combo->setCompletionMode((KGlobalSettings::Completion)mode);
- QStringList list = kc->readListEntry( QString::fromLatin1("History") );
+ TQStringList list = kc->readListEntry( TQString::fromLatin1("History") );
combo->setHistoryItems( list, true );
edit = new KURLRequester( combo, this );
}
@@ -432,7 +432,7 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
}
edit->setURL( _value );
- QWhatsThis::add(edit,i18n(
+ TQWhatsThis::add(edit,i18n(
"Following the command, you can have several place holders which will be replaced "
"with the actual values when the actual program is run:\n"
"%f - a single file name\n"
@@ -453,38 +453,38 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
edit->comboBox()->setAutoDeleteCompletionObject( true );
}
- connect ( edit, SIGNAL(returnPressed()), SLOT(slotOK()) );
- connect ( edit, SIGNAL(textChanged(const QString&)), SLOT(slotTextChanged()) );
+ connect ( edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotOK()) );
+ connect ( edit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotTextChanged()) );
m_pTree = new KApplicationTree( this );
topLayout->addWidget(m_pTree);
- connect( m_pTree, SIGNAL( selected( const QString&, const QString& ) ),
- SLOT( slotSelected( const QString&, const QString& ) ) );
- connect( m_pTree, SIGNAL( highlighted( const QString&, const QString& ) ),
- SLOT( slotHighlighted( const QString&, const QString& ) ) );
- connect( m_pTree, SIGNAL( doubleClicked(QListViewItem*) ),
- SLOT( slotDbClick() ) );
+ connect( m_pTree, TQT_SIGNAL( selected( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotSelected( const TQString&, const TQString& ) ) );
+ connect( m_pTree, TQT_SIGNAL( highlighted( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotHighlighted( const TQString&, const TQString& ) ) );
+ connect( m_pTree, TQT_SIGNAL( doubleClicked(TQListViewItem*) ),
+ TQT_SLOT( slotDbClick() ) );
- terminal = new QCheckBox( i18n("Run in &terminal"), this );
+ terminal = new TQCheckBox( i18n("Run in &terminal"), this );
if (bReadOnly)
terminal->hide();
- connect(terminal, SIGNAL(toggled(bool)), SLOT(slotTerminalToggled(bool)));
+ connect(terminal, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTerminalToggled(bool)));
topLayout->addWidget(terminal);
- QBoxLayout* nocloseonexitLayout = new QHBoxLayout( 0, 0, KDialog::spacingHint() );
- QSpacerItem* spacer = new QSpacerItem( 20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ TQBoxLayout* nocloseonexitLayout = new TQHBoxLayout( 0, 0, KDialog::spacingHint() );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
nocloseonexitLayout->addItem( spacer );
- nocloseonexit = new QCheckBox( i18n("&Do not close when command exits"), this );
+ nocloseonexit = new TQCheckBox( i18n("&Do not close when command exits"), this );
nocloseonexit->setChecked( false );
nocloseonexit->setDisabled( true );
// check to see if we use konsole if not disable the nocloseonexit
// because we don't know how to do this on other terminal applications
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- QString preferredTerminal = confGroup.readPathEntry("TerminalApplication", QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole"));
if (bReadOnly || preferredTerminal != "konsole")
nocloseonexit->hide();
@@ -494,7 +494,7 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
if (!qServiceType.isNull())
{
- remember = new QCheckBox(i18n("&Remember application association for this type of file"), this);
+ remember = new TQCheckBox(i18n("&Remember application association for this type of file"), this);
// remember->setChecked(true);
topLayout->addWidget(remember);
}
@@ -507,10 +507,10 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
d->ok = b->addButton( KStdGuiItem::ok() );
d->ok->setDefault( true );
- connect( d->ok, SIGNAL( clicked() ), SLOT( slotOK() ) );
+ connect( d->ok, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOK() ) );
- QPushButton* cancel = b->addButton( KStdGuiItem::cancel() );
- connect( cancel, SIGNAL( clicked() ), SLOT( reject() ) );
+ TQPushButton* cancel = b->addButton( KStdGuiItem::cancel() );
+ connect( cancel, TQT_SIGNAL( clicked() ), TQT_SLOT( reject() ) );
b->layout();
topLayout->addWidget( b );
@@ -536,14 +536,14 @@ KOpenWithDlg::~KOpenWithDlg()
void KOpenWithDlg::slotClear()
{
- edit->setURL(QString::null);
+ edit->setURL(TQString::null);
edit->setFocus();
}
// ----------------------------------------------------------------------
-void KOpenWithDlg::slotSelected( const QString& /*_name*/, const QString& _exec )
+void KOpenWithDlg::slotSelected( const TQString& /*_name*/, const TQString& _exec )
{
kdDebug(250)<<"KOpenWithDlg::slotSelected"<<endl;
KService::Ptr pService = d->curService;
@@ -554,7 +554,7 @@ void KOpenWithDlg::slotSelected( const QString& /*_name*/, const QString& _exec
// ----------------------------------------------------------------------
-void KOpenWithDlg::slotHighlighted( const QString& _name, const QString& )
+void KOpenWithDlg::slotHighlighted( const TQString& _name, const TQString& )
{
kdDebug(250)<<"KOpenWithDlg::slotHighlighted"<<endl;
qName = _name;
@@ -563,7 +563,7 @@ void KOpenWithDlg::slotHighlighted( const QString& _name, const QString& )
{
// ### indicate that default value was restored
terminal->setChecked(d->curService->terminal());
- QString terminalOptions = d->curService->terminalOptions();
+ TQString terminalOptions = d->curService->terminalOptions();
nocloseonexit->setChecked( (terminalOptions.contains( "--noclose" ) > 0) );
m_terminaldirty = false; // slotTerminalToggled changed it
}
@@ -603,12 +603,12 @@ void KOpenWithDlg::setSaveNewApplications(bool b)
void KOpenWithDlg::slotOK()
{
- QString typedExec(edit->url());
- QString fullExec(typedExec);
+ TQString typedExec(edit->url());
+ TQString fullExec(typedExec);
- QString serviceName;
- QString initialServiceName;
- QString preferredTerminal;
+ TQString serviceName;
+ TQString initialServiceName;
+ TQString preferredTerminal;
m_pService = d->curService;
if (!m_pService) {
// No service selected - check the command line
@@ -632,7 +632,7 @@ void KOpenWithDlg::slotOK()
// also ok if we find the exact same service (well, "kwrite" == "kwrite %U"
if ( serv && serv->type() == "Application")
{
- QString exec = serv->exec();
+ TQString exec = serv->exec();
fullExec = exec;
exec.replace("%u", "", false);
exec.replace("%f", "", false);
@@ -651,7 +651,7 @@ void KOpenWithDlg::slotOK()
if (!ok) // service was found, but it was different -> keep looking
{
++i;
- serviceName = initialServiceName + "-" + QString::number(i);
+ serviceName = initialServiceName + "-" + TQString::number(i);
}
}
while (!ok);
@@ -666,13 +666,13 @@ void KOpenWithDlg::slotOK()
if (terminal->isChecked())
{
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- preferredTerminal = confGroup.readPathEntry("TerminalApplication", QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole"));
m_command = preferredTerminal;
// only add --noclose when we are sure it is konsole we're using
if (preferredTerminal == "konsole" && nocloseonexit->isChecked())
- m_command += QString::fromLatin1(" --noclose");
- m_command += QString::fromLatin1(" -e ");
+ m_command += TQString::fromLatin1(" --noclose");
+ m_command += TQString::fromLatin1(" -e ");
m_command += edit->url();
kdDebug(250) << "Setting m_command to " << m_command << endl;
}
@@ -690,7 +690,7 @@ void KOpenWithDlg::slotOK()
if (!bRemember && !d->saveNewApps)
{
// Create temp service
- m_pService = new KService(initialServiceName, fullExec, QString::null);
+ m_pService = new KService(initialServiceName, fullExec, TQString::null);
if (terminal->isChecked())
{
m_pService->setTerminal(true);
@@ -706,9 +706,9 @@ void KOpenWithDlg::slotOK()
// wanted. The other possibility is that they have asked for the
// association to be remembered. Create/update service.
- QString newPath;
- QString oldPath;
- QString menuId;
+ TQString newPath;
+ TQString oldPath;
+ TQString menuId;
if (m_pService)
{
oldPath = m_pService->desktopEntryPath();
@@ -740,7 +740,7 @@ void KOpenWithDlg::slotOK()
{
desktop = new KDesktopFile(newPath);
}
- desktop->writeEntry("Type", QString::fromLatin1("Application"));
+ desktop->writeEntry("Type", TQString::fromLatin1("Application"));
desktop->writeEntry("Name", initialServiceName);
desktop->writePathEntry("Exec", fullExec);
if (terminal->isChecked())
@@ -759,7 +759,7 @@ void KOpenWithDlg::slotOK()
if (bRemember || d->saveNewApps)
{
- QStringList mimeList = desktop->readListEntry("MimeType", ';');
+ TQStringList mimeList = desktop->readListEntry("MimeType", ';');
if (!qServiceType.isEmpty() && !mimeList.contains(qServiceType))
mimeList.append(qServiceType);
desktop->writeEntry("MimeType", mimeList, ';');
@@ -786,7 +786,7 @@ void KOpenWithDlg::slotOK()
accept();
}
-QString KOpenWithDlg::text() const
+TQString KOpenWithDlg::text() const
{
if (!m_command.isEmpty())
return m_command;
@@ -814,16 +814,16 @@ void KOpenWithDlg::accept()
combo->addToHistory( edit->url() );
KConfig *kc = KGlobal::config();
- KConfigGroupSaver ks( kc, QString::fromLatin1("Open-with settings") );
- kc->writeEntry( QString::fromLatin1("History"), combo->historyItems() );
- kc->writeEntry(QString::fromLatin1("CompletionMode"),
+ KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") );
+ kc->writeEntry( TQString::fromLatin1("History"), combo->historyItems() );
+ kc->writeEntry(TQString::fromLatin1("CompletionMode"),
combo->completionMode());
// don't store the completion-list, as it contains all of KURLCompletion's
// executables
kc->sync();
}
- QDialog::accept();
+ TQDialog::accept();
}
@@ -832,7 +832,7 @@ void KOpenWithDlg::accept()
#ifndef KDE_NO_COMPAT
bool KFileOpenWithHandler::displayOpenWithDialog( const KURL::List& urls )
{
- KOpenWithDlg l( urls, i18n("Open with:"), QString::null, 0L );
+ KOpenWithDlg l( urls, i18n("Open with:"), TQString::null, 0L );
if ( l.exec() )
{
KService::Ptr service = l.service();
diff --git a/kio/kfile/kopenwith.h b/kio/kfile/kopenwith.h
index c343816aa..8d34e22b7 100644
--- a/kio/kfile/kopenwith.h
+++ b/kio/kfile/kopenwith.h
@@ -20,7 +20,7 @@
#ifndef __open_with_h__
#define __open_with_h__
-#include <qdialog.h>
+#include <tqdialog.h>
#include <kurl.h>
#include <krun.h>
@@ -43,7 +43,7 @@ class KOpenWithDlgPrivate;
*
* @author David Faure <faure@kde.org>
*/
-class KIO_EXPORT KOpenWithDlg : public QDialog //#TODO: Use KDialogBase for KDE4
+class KIO_EXPORT KOpenWithDlg : public TQDialog //#TODO: Use KDialogBase for KDE4
{
Q_OBJECT
public:
@@ -56,7 +56,7 @@ public:
* if the dialog is used to choose an application but not for some particular URLs.
* @param parent parent widget
*/
- KOpenWithDlg( const KURL::List& urls, QWidget *parent = 0L );
+ KOpenWithDlg( const KURL::List& urls, TQWidget *parent = 0L );
/**
* Create a dialog that asks for a application to open a given
@@ -67,8 +67,8 @@ public:
* @param value is the initial value of the line
* @param parent parent widget
*/
- KOpenWithDlg( const KURL::List& urls, const QString& text, const QString& value,
- QWidget *parent = 0L );
+ KOpenWithDlg( const KURL::List& urls, const TQString& text, const TQString& value,
+ TQWidget *parent = 0L );
/**
* Create a dialog to select a service for a given service type.
@@ -78,8 +78,8 @@ public:
* @param value is the initial value of the line
* @param parent parent widget
*/
- KOpenWithDlg( const QString& serviceType, const QString& value,
- QWidget *parent = 0L );
+ KOpenWithDlg( const TQString& serviceType, const TQString& value,
+ TQWidget *parent = 0L );
/**
* Create a dialog to select an application
@@ -88,7 +88,7 @@ public:
* @param parent parent widget
* @since 3.1
*/
- KOpenWithDlg( QWidget *parent = 0L );
+ KOpenWithDlg( TQWidget *parent = 0L );
/**
* Destructor
@@ -98,7 +98,7 @@ public:
/**
* @return the text the user entered
*/
- QString text() const;
+ TQString text() const;
/**
* Hide the "Do not &close when command exits" Checkbox
*/
@@ -129,8 +129,8 @@ public slots:
* The slot for clearing the edit widget
*/
void slotClear();
- void slotSelected( const QString&_name, const QString& _exec );
- void slotHighlighted( const QString& _name, const QString& _exec );
+ void slotSelected( const TQString&_name, const TQString& _exec );
+ void slotHighlighted( const TQString& _name, const TQString& _exec );
void slotTextChanged();
void slotTerminalToggled(bool);
void slotDbClick();
@@ -138,7 +138,7 @@ public slots:
protected slots:
/**
- * Reimplemented from QDialog::accept() to save history of the combobox
+ * Reimplemented from TQDialog::accept() to save history of the combobox
*/
virtual void accept();
@@ -156,19 +156,19 @@ protected:
* @param text appears as a label on top of the entry box.
* @param value is the initial value of the line
*/
- void init( const QString& text, const QString& value );
+ void init( const TQString& text, const TQString& value );
KURLRequester * edit;
- QString m_command;
+ TQString m_command;
KApplicationTree* m_pTree;
- QLabel *label;
+ TQLabel *label;
- QString qName, qServiceType;
+ TQString qName, qServiceType;
bool m_terminaldirty;
- QCheckBox *terminal, *remember, *nocloseonexit;
- QPushButton *UNUSED;
- QPushButton *UNUSED2;
+ TQCheckBox *terminal, *remember, *nocloseonexit;
+ TQPushButton *UNUSED;
+ TQPushButton *UNUSED2;
KService::Ptr m_pService;
diff --git a/kio/kfile/kopenwith_p.h b/kio/kfile/kopenwith_p.h
index ccee6bd22..1b73cdaa0 100644
--- a/kio/kfile/kopenwith_p.h
+++ b/kio/kfile/kopenwith_p.h
@@ -41,20 +41,20 @@ class KAppTreeListItem : public QListViewItem
{
bool parsed;
bool directory;
- QString path;
- QString exec;
+ TQString path;
+ TQString exec;
protected:
- int compare(QListViewItem *i, int col, bool ascending ) const;
- QString key(int column, bool ascending) const;
+ int compare(TQListViewItem *i, int col, bool ascending ) const;
+ TQString key(int column, bool ascending) const;
- void init(const QPixmap& pixmap, bool parse, bool dir, const QString &_path, const QString &exec);
+ void init(const TQPixmap& pixmap, bool parse, bool dir, const TQString &_path, const TQString &exec);
public:
- KAppTreeListItem( KListView* parent, const QString & name, const QPixmap& pixmap,
- bool parse, bool dir, const QString &p, const QString &c );
- KAppTreeListItem( QListViewItem* parent, const QString & name, const QPixmap& pixmap,
- bool parse, bool dir, const QString &p, const QString &c );
+ KAppTreeListItem( KListView* parent, const TQString & name, const TQPixmap& pixmap,
+ bool parse, bool dir, const TQString &p, const TQString &c );
+ KAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap,
+ bool parse, bool dir, const TQString &p, const TQString &c );
bool isDirectory();
protected:
@@ -73,27 +73,27 @@ class KApplicationTree : public KListView
{
Q_OBJECT
public:
- KApplicationTree( QWidget *parent );
+ KApplicationTree( TQWidget *parent );
/**
* Add a group of .desktop/.kdelnk entries
*/
- void addDesktopGroup( const QString &relPath, KAppTreeListItem *item = 0 );
+ void addDesktopGroup( const TQString &relPath, KAppTreeListItem *item = 0 );
bool isDirSel();
protected:
- void resizeEvent( QResizeEvent *_ev );
+ void resizeEvent( TQResizeEvent *_ev );
KAppTreeListItem* currentitem;
void cleanupTree();
public slots:
- void slotItemHighlighted(QListViewItem* i);
- void slotSelectionChanged(QListViewItem* i);
+ void slotItemHighlighted(TQListViewItem* i);
+ void slotSelectionChanged(TQListViewItem* i);
signals:
- void selected( const QString& _name, const QString& _exec );
- void highlighted( const QString& _name, const QString& _exec );
+ void selected( const TQString& _name, const TQString& _exec );
+ void highlighted( const TQString& _name, const TQString& _exec );
};
/* ------------------------------------------------------------------------- */
diff --git a/kio/kfile/kpreviewprops.cpp b/kio/kfile/kpreviewprops.cpp
index 986e46597..7458fb244 100644
--- a/kio/kfile/kpreviewprops.cpp
+++ b/kio/kfile/kpreviewprops.cpp
@@ -19,7 +19,7 @@
#include "kpreviewprops.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kfilemetapreview.h>
#include <kglobalsettings.h>
@@ -46,15 +46,15 @@ KPreviewPropsPlugin::KPreviewPropsPlugin(KPropertiesDialog* props)
void KPreviewPropsPlugin::createLayout()
{
// let the dialog create the page frame
- QFrame* topframe = properties->addPage(i18n("P&review"));
- topframe->setFrameStyle(QFrame::NoFrame);
+ TQFrame* topframe = properties->addPage(i18n("P&review"));
+ topframe->setFrameStyle(TQFrame::NoFrame);
- QVBoxLayout* tmp = new QVBoxLayout(topframe, 0, 0);
+ TQVBoxLayout* tmp = new TQVBoxLayout(topframe, 0, 0);
preview = new KFileMetaPreview(topframe);
tmp->addWidget(preview) ;
- connect( properties, SIGNAL( aboutToShowPage( QWidget * ) ), SLOT( aboutToShowPage( QWidget* ) ) );
+ connect( properties, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ), TQT_SLOT( aboutToShowPage( TQWidget* ) ) );
}
KPreviewPropsPlugin::~KPreviewPropsPlugin()
@@ -77,12 +77,12 @@ bool KPreviewPropsPlugin::supports( KFileItemList _items )
return true;
}
-void KPreviewPropsPlugin::aboutToShowPage( QWidget* widget )
+void KPreviewPropsPlugin::aboutToShowPage( TQWidget* widget )
{
if ( widget != preview->parent() )
return;
- disconnect( properties, SIGNAL( aboutToShowPage( QWidget * ) ), this, SLOT( aboutToShowPage( QWidget* ) ) );
+ disconnect( properties, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ), this, TQT_SLOT( aboutToShowPage( TQWidget* ) ) );
preview->showPreview(properties->item()->url());
}
diff --git a/kio/kfile/kpreviewprops.h b/kio/kfile/kpreviewprops.h
index be3019083..c34e70763 100644
--- a/kio/kfile/kpreviewprops.h
+++ b/kio/kfile/kpreviewprops.h
@@ -44,7 +44,7 @@ public:
static bool supports( KFileItemList _items );
private slots:
- void aboutToShowPage( QWidget* );
+ void aboutToShowPage( TQWidget* );
private:
KFileMetaPreview* preview;
diff --git a/kio/kfile/kpreviewwidgetbase.cpp b/kio/kfile/kpreviewwidgetbase.cpp
index 43b2b5fdc..979da919e 100644
--- a/kio/kfile/kpreviewwidgetbase.cpp
+++ b/kio/kfile/kpreviewwidgetbase.cpp
@@ -7,21 +7,21 @@
*/
#include "kpreviewwidgetbase.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KPreviewWidgetBase::KPreviewWidgetBasePrivate
{
public:
- QStringList supportedMimeTypes;
+ TQStringList supportedMimeTypes;
};
-QPtrDict<KPreviewWidgetBase::KPreviewWidgetBasePrivate> * KPreviewWidgetBase::s_private;
+TQPtrDict<KPreviewWidgetBase::KPreviewWidgetBasePrivate> * KPreviewWidgetBase::s_private;
-KPreviewWidgetBase::KPreviewWidgetBase( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KPreviewWidgetBase::KPreviewWidgetBase( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
if ( !s_private )
- s_private = new QPtrDict<KPreviewWidgetBasePrivate>();
+ s_private = new TQPtrDict<KPreviewWidgetBasePrivate>();
s_private->insert( this, new KPreviewWidgetBasePrivate() );
}
@@ -36,12 +36,12 @@ KPreviewWidgetBase::~KPreviewWidgetBase()
}
}
-void KPreviewWidgetBase::setSupportedMimeTypes( const QStringList& mimeTypes )
+void KPreviewWidgetBase::setSupportedMimeTypes( const TQStringList& mimeTypes )
{
d()->supportedMimeTypes = mimeTypes;
}
-QStringList KPreviewWidgetBase::supportedMimeTypes() const
+TQStringList KPreviewWidgetBase::supportedMimeTypes() const
{
return d()->supportedMimeTypes;
}
diff --git a/kio/kfile/kpreviewwidgetbase.h b/kio/kfile/kpreviewwidgetbase.h
index 80f3f4ff4..3a2a49b31 100644
--- a/kio/kfile/kpreviewwidgetbase.h
+++ b/kio/kfile/kpreviewwidgetbase.h
@@ -21,8 +21,8 @@
#ifndef __KPREVIEWWIDGETBASE_H__
#define __KPREVIEWWIDGETBASE_H__
-#include <qptrdict.h>
-#include <qwidget.h>
+#include <tqptrdict.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -54,7 +54,7 @@ public:
* @param parent The KFileDialog this preview widget is going to be used in
* @param name The internal name of this object
*/
- KPreviewWidgetBase(QWidget *parent, const char *name=0);
+ KPreviewWidgetBase(TQWidget *parent, const char *name=0);
~KPreviewWidgetBase();
public slots:
@@ -73,10 +73,10 @@ public slots:
*/
virtual void clearPreview() = 0;
- QStringList supportedMimeTypes() const;
+ TQStringList supportedMimeTypes() const;
protected:
- void setSupportedMimeTypes( const QStringList& mimeTypes );
+ void setSupportedMimeTypes( const TQStringList& mimeTypes );
protected:
virtual void virtual_hook( int, void* ) {};
@@ -86,7 +86,7 @@ private:
KPreviewWidgetBasePrivate * d() const {
return s_private->find( const_cast<KPreviewWidgetBase*>( this ) );
}
- static QPtrDict<KPreviewWidgetBasePrivate> * s_private;
+ static TQPtrDict<KPreviewWidgetBasePrivate> * s_private;
};
#endif
diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp
index f02e80eaf..9e26f12bb 100644
--- a/kio/kfile/kpropertiesdialog.cpp
+++ b/kio/kfile/kpropertiesdialog.cpp
@@ -54,24 +54,24 @@ extern "C" {
#include <algorithm>
#include <functional>
-#include <qfile.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qstyle.h>
-#include <qprogressbar.h>
-#include <qvbox.h>
-#include <qvaluevector.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
+#include <tqprogressbar.h>
+#include <tqvbox.h>
+#include <tqvaluevector.h>
#ifdef USE_POSIX_ACL
extern "C" {
@@ -139,7 +139,7 @@ extern "C" {
# include <win32_utils.h>
#endif
-static QString nameFromFileName(QString nameStr)
+static TQString nameFromFileName(TQString nameStr)
{
if ( nameStr.endsWith(".desktop") )
nameStr.truncate( nameStr.length() - 8 );
@@ -168,11 +168,11 @@ public:
{
}
bool m_aborted:1;
- QWidget* fileSharePage;
+ TQWidget* fileSharePage;
};
KPropertiesDialog::KPropertiesDialog (KFileItem* item,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed, i18n( "Properties for %1" ).arg(KIO::decodeFileName(item->url().fileName())),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok,
@@ -188,8 +188,8 @@ KPropertiesDialog::KPropertiesDialog (KFileItem* item,
init (modal, autoShow);
}
-KPropertiesDialog::KPropertiesDialog (const QString& title,
- QWidget* parent, const char* name, bool modal)
+KPropertiesDialog::KPropertiesDialog (const TQString& title,
+ TQWidget* parent, const char* name, bool modal)
: KDialogBase (KDialogBase::Tabbed, i18n ("Properties for %1").arg(title),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok,
parent, name, modal)
@@ -200,7 +200,7 @@ KPropertiesDialog::KPropertiesDialog (const QString& title,
}
KPropertiesDialog::KPropertiesDialog (KFileItemList _items,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
// TODO: replace <never used> with "Properties for 1 item". It's very confusing how it has to be translated otherwise
@@ -226,7 +226,7 @@ KPropertiesDialog::KPropertiesDialog (KFileItemList _items,
#ifndef KDE_NO_COMPAT
KPropertiesDialog::KPropertiesDialog (const KURL& _url, mode_t /* _mode is now unused */,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
i18n( "Properties for %1" ).arg(KIO::decodeFileName(_url.fileName())),
@@ -246,7 +246,7 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _url, mode_t /* _mode is now u
#endif
KPropertiesDialog::KPropertiesDialog (const KURL& _url,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
i18n( "Properties for %1" ).arg(KIO::decodeFileName(_url.fileName())),
@@ -265,8 +265,8 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _url,
}
KPropertiesDialog::KPropertiesDialog (const KURL& _tempUrl, const KURL& _currentDir,
- const QString& _defaultName,
- QWidget* parent, const char* name,
+ const TQString& _defaultName,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
i18n( "Properties for %1" ).arg(KIO::decodeFileName(_tempUrl.fileName())),
@@ -286,11 +286,11 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _tempUrl, const KURL& _current
init (modal, autoShow);
}
-bool KPropertiesDialog::showDialog(KFileItem* item, QWidget* parent,
+bool KPropertiesDialog::showDialog(KFileItem* item, TQWidget* parent,
const char* name, bool modal)
{
#ifdef Q_WS_WIN
- QString localPath = item->localPath();
+ TQString localPath = item->localPath();
if (!localPath.isEmpty())
return showWin32FilePropertyDialog(localPath);
#endif
@@ -298,7 +298,7 @@ bool KPropertiesDialog::showDialog(KFileItem* item, QWidget* parent,
return true;
}
-bool KPropertiesDialog::showDialog(const KURL& _url, QWidget* parent,
+bool KPropertiesDialog::showDialog(const KURL& _url, TQWidget* parent,
const char* name, bool modal)
{
#ifdef Q_WS_WIN
@@ -309,7 +309,7 @@ bool KPropertiesDialog::showDialog(const KURL& _url, QWidget* parent,
return true;
}
-bool KPropertiesDialog::showDialog(const KFileItemList& _items, QWidget* parent,
+bool KPropertiesDialog::showDialog(const KFileItemList& _items, TQWidget* parent,
const char* name, bool modal)
{
if (_items.count()==1)
@@ -341,7 +341,7 @@ void KPropertiesDialog::showFileSharingPage()
}
}
-void KPropertiesDialog::setFileSharingPage(QWidget* page) {
+void KPropertiesDialog::setFileSharingPage(TQWidget* page) {
d->fileSharePage = page;
}
@@ -372,8 +372,8 @@ KPropertiesDialog::~KPropertiesDialog()
void KPropertiesDialog::insertPlugin (KPropsDlgPlugin* plugin)
{
- connect (plugin, SIGNAL (changed ()),
- plugin, SLOT (setDirty ()));
+ connect (plugin, TQT_SIGNAL (changed ()),
+ plugin, TQT_SLOT (setDirty ()));
m_pageList.append (plugin);
}
@@ -511,12 +511,12 @@ void KPropertiesDialog::insertPages()
return;
KFileItem *item = m_items.first();
- QString mimetype = item->mimetype();
+ TQString mimetype = item->mimetype();
if ( mimetype.isEmpty() )
return;
- QString query = QString::fromLatin1(
+ TQString query = TQString::fromLatin1(
"('KPropsDlg/Plugin' in ServiceTypes) and "
"((not exist [X-KDE-Protocol]) or "
" ([X-KDE-Protocol] == '%1' ) )" ).arg(item->url().protocol());
@@ -551,7 +551,7 @@ void KPropertiesDialog::updateUrl( const KURL& _newUrl )
assert(!m_singleUrl.isEmpty());
// If we have an Desktop page, set it dirty, so that a full file is saved locally
// Same for a URL page (because of the Name= hack)
- for ( QPtrListIterator<KPropsDlgPlugin> it(m_pageList); it.current(); ++it )
+ for ( TQPtrListIterator<KPropsDlgPlugin> it(m_pageList); it.current(); ++it )
if ( it.current()->isA("KExecPropsPlugin") || // KDE4 remove me
it.current()->isA("KURLPropsPlugin") ||
it.current()->isA("KDesktopPropsPlugin"))
@@ -562,7 +562,7 @@ void KPropertiesDialog::updateUrl( const KURL& _newUrl )
}
}
-void KPropertiesDialog::rename( const QString& _name )
+void KPropertiesDialog::rename( const TQString& _name )
{
Q_ASSERT( m_items.count() == 1 );
kdDebug(250) << "KPropertiesDialog::rename " << _name << endl;
@@ -575,7 +575,7 @@ void KPropertiesDialog::rename( const QString& _name )
}
else
{
- QString tmpurl = m_singleUrl.url();
+ TQString tmpurl = m_singleUrl.url();
if ( tmpurl.at(tmpurl.length() - 1) == '/')
// It's a directory, so strip the trailing slash first
tmpurl.truncate( tmpurl.length() - 1);
@@ -604,7 +604,7 @@ public:
};
KPropsDlgPlugin::KPropsDlgPlugin( KPropertiesDialog *_props )
-: QObject( _props, 0L )
+: TQObject( _props, 0L )
{
d = new KPropsDlgPluginPrivate;
properties = _props;
@@ -629,10 +629,10 @@ bool KPropsDlgPlugin::isDesktopFile( KFileItem * _item )
if ( !S_ISREG( _item->mode() ) )
return false;
- QString t( url.path() );
+ TQString t( url.path() );
// only if readable
- FILE *f = fopen( QFile::encodeName(t), "r" );
+ FILE *f = fopen( TQFile::encodeName(t), "r" );
if ( f == 0L )
return false;
fclose(f);
@@ -680,15 +680,15 @@ public:
}
KDirSize * dirSizeJob;
- QTimer *dirSizeUpdateTimer;
- QFrame *m_frame;
+ TQTimer *dirSizeUpdateTimer;
+ TQFrame *m_frame;
bool bMultiple;
bool bIconChanged;
bool bKDesktopMode;
bool bDesktopFile;
- QLabel *m_freeSpaceLabel;
- QString mimeType;
- QString oldFileName;
+ TQLabel *m_freeSpaceLabel;
+ TQString mimeType;
+ TQString oldFileName;
KLineEdit* m_lined;
};
@@ -698,7 +698,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d = new KFilePropsPluginPrivate;
d->bMultiple = (properties->items().count() > 1);
d->bIconChanged = false;
- d->bKDesktopMode = (QCString(qApp->name()) == "kdesktop"); // nasty heh?
+ d->bKDesktopMode = (TQCString(qApp->name()) == "kdesktop"); // nasty heh?
d->bDesktopFile = KDesktopPropsPlugin::supports(properties->items());
kdDebug(250) << "KFilePropsPlugin::KFilePropsPlugin bMultiple=" << d->bMultiple << endl;
@@ -712,15 +712,15 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
kdDebug() << "url=" << url << " bDesktopFile=" << bDesktopFile << " isLocal=" << isLocal << " isReallyLocal=" << isReallyLocal << endl;
mode_t mode = item->mode();
bool hasDirs = item->isDir() && !item->isLink();
- bool hasRoot = url.path() == QString::fromLatin1("/");
- QString iconStr = KMimeType::iconForURL(url, mode);
- QString directory = properties->kurl().directory();
- QString protocol = properties->kurl().protocol();
- QString mimeComment = item->mimeComment();
+ bool hasRoot = url.path() == TQString::fromLatin1("/");
+ TQString iconStr = KMimeType::iconForURL(url, mode);
+ TQString directory = properties->kurl().directory();
+ TQString protocol = properties->kurl().protocol();
+ TQString mimeComment = item->mimeComment();
d->mimeType = item->mimetype();
bool hasTotalSize;
KIO::filesize_t totalSize = item->size(hasTotalSize);
- QString magicMimeComment;
+ TQString magicMimeComment;
if ( isLocal ) {
KMimeType::Ptr magicMimeType = KMimeType::findByFileContent( url.path() );
if ( magicMimeType->name() != KMimeType::defaultMimeType() )
@@ -728,7 +728,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
// Those things only apply to 'single file' mode
- QString filename = QString::null;
+ TQString filename = TQString::null;
bool isTrash = false;
bool isDevice = false;
m_bFromTemplate = false;
@@ -739,9 +739,9 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d->m_frame = properties->addPage (i18n("&General"));
- QVBoxLayout *vbl = new QVBoxLayout( d->m_frame, 0,
+ TQVBoxLayout *vbl = new TQVBoxLayout( d->m_frame, 0,
KDialog::spacingHint(), "vbl");
- QGridLayout *grid = new QGridLayout(0, 3); // unknown rows
+ TQGridLayout *grid = new TQGridLayout(0, 3); // unknown rows
grid->setColStretch(0, 0);
grid->setColStretch(1, 0);
grid->setColStretch(2, 1);
@@ -751,7 +751,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !d->bMultiple )
{
- QString path;
+ TQString path;
if ( !m_bFromTemplate ) {
isTrash = ( properties->kurl().protocol().find( "trash", 0, false)==0 );
if ( properties->kurl().protocol().find("device", 0, false)==0)
@@ -814,18 +814,18 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( KMimeType::iconForURL(url, mode) != iconStr )
iconStr = "kmultiple";
if ( url.directory() != directory )
- directory = QString::null;
+ directory = TQString::null;
if ( url.protocol() != protocol )
- protocol = QString::null;
+ protocol = TQString::null;
if ( !mimeComment.isNull() && (*it)->mimeComment() != mimeComment )
- mimeComment = QString::null;
+ mimeComment = TQString::null;
if ( isLocal && !magicMimeComment.isNull() ) {
KMimeType::Ptr magicMimeType = KMimeType::findByFileContent( url.path() );
if ( magicMimeType->comment() != magicMimeComment )
- magicMimeComment = QString::null;
+ magicMimeComment = TQString::null;
}
- if ( url.path() == QString::fromLatin1("/") )
+ if ( url.path() == TQString::fromLatin1("/") )
hasRoot = true;
if ( (*it)->isDir() && !(*it)->isLink() )
{
@@ -853,13 +853,13 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ )
{
KIconButton *iconButton = new KIconButton( d->m_frame );
- int bsize = 66 + 2 * iconButton->style().pixelMetric(QStyle::PM_ButtonMargin);
+ int bsize = 66 + 2 * iconButton->style().pixelMetric(TQStyle::PM_ButtonMargin);
iconButton->setFixedSize(bsize, bsize);
iconButton->setIconSize(48);
iconButton->setStrictIconSize(false);
// This works for everything except Device icons on unmounted devices
// So we have to really open .desktop files
- QString iconStr = KMimeType::findByURL( url, mode )->icon( url, isLocal );
+ TQString iconStr = KMimeType::findByURL( url, mode )->icon( url, isLocal );
if ( bDesktopFile && isLocal )
{
KDesktopFile config( url.path(), true );
@@ -873,11 +873,11 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
iconButton->setIconType( KIcon::Desktop, KIcon::FileSystem );
iconButton->setIcon(iconStr);
iconArea = iconButton;
- connect( iconButton, SIGNAL( iconChanged(QString) ),
- this, SLOT( slotIconChanged() ) );
+ connect( iconButton, TQT_SIGNAL( iconChanged(TQString) ),
+ this, TQT_SLOT( slotIconChanged() ) );
} else {
- QLabel *iconLabel = new QLabel( d->m_frame );
- int bsize = 66 + 2 * iconLabel->style().pixelMetric(QStyle::PM_ButtonMargin);
+ TQLabel *iconLabel = new TQLabel( d->m_frame );
+ int bsize = 66 + 2 * iconLabel->style().pixelMetric(TQStyle::PM_ButtonMargin);
iconLabel->setFixedSize(bsize, bsize);
iconLabel->setPixmap( KGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) );
iconArea = iconLabel;
@@ -886,7 +886,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if (d->bMultiple || isTrash || isDevice || hasRoot)
{
- QLabel *lab = new QLabel(d->m_frame );
+ TQLabel *lab = new TQLabel(d->m_frame );
if ( d->bMultiple )
lab->setText( KIO::itemsSummaryString( iFileCount + iDirCount, iFileCount, iDirCount, 0, false ) );
else
@@ -900,7 +900,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d->m_lined->setFocus();
// Enhanced rename: Don't highlight the file extension.
- QString pattern;
+ TQString pattern;
KServiceTypeFactory::self()->findFromPattern( filename, &pattern );
if (!pattern.isEmpty() && pattern.at(0)=='*' && pattern.find('*',1)==-1)
d->m_lined->setSelection(0, filename.length()-pattern.stripWhiteSpace().length()+1);
@@ -911,8 +911,8 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d->m_lined->setSelection(0, lastDot);
}
- connect( d->m_lined, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( nameFileChanged(const QString & ) ) );
+ connect( d->m_lined, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( nameFileChanged(const TQString & ) ) );
}
grid->addWidget(nameArea, curRow++, 2);
@@ -921,31 +921,31 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
grid->addMultiCellWidget(sep, curRow, curRow, 0, 2);
++curRow;
- QLabel *l;
+ TQLabel *l;
if ( !mimeComment.isEmpty() && !isDevice && !isTrash)
{
- l = new QLabel(i18n("Type:"), d->m_frame );
+ l = new TQLabel(i18n("Type:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- QHBox *box = new QHBox(d->m_frame);
+ TQHBox *box = new TQHBox(d->m_frame);
box->setSpacing(20);
- l = new QLabel(mimeComment, box );
+ l = new TQLabel(mimeComment, box );
#ifdef Q_WS_X11
//TODO: wrap for win32 or mac?
- QPushButton *button = new QPushButton(box);
+ TQPushButton *button = new TQPushButton(box);
- QIconSet iconSet = SmallIconSet(QString::fromLatin1("configure"));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("configure"));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
button->setIconSet( iconSet );
button->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
if ( d->mimeType == KMimeType::defaultMimeType() )
- QToolTip::add(button, i18n("Create new file type"));
+ TQToolTip::add(button, i18n("Create new file type"));
else
- QToolTip::add(button, i18n("Edit file type"));
+ TQToolTip::add(button, i18n("Edit file type"));
- connect( button, SIGNAL( clicked() ), SLOT( slotEditFileType() ));
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEditFileType() ));
if (!kapp->authorizeKAction("editfiletype"))
button->hide();
@@ -956,16 +956,16 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !magicMimeComment.isEmpty() && magicMimeComment != mimeComment )
{
- l = new QLabel(i18n("Contents:"), d->m_frame );
+ l = new TQLabel(i18n("Contents:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- l = new QLabel(magicMimeComment, d->m_frame );
+ l = new TQLabel(magicMimeComment, d->m_frame );
grid->addWidget(l, curRow++, 2);
}
if ( !directory.isEmpty() )
{
- l = new QLabel( i18n("Location:"), d->m_frame );
+ l = new TQLabel( i18n("Location:"), d->m_frame );
grid->addWidget(l, curRow, 0);
l = new KSqueezedTextLabel( d->m_frame );
@@ -974,10 +974,10 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
if( hasDirs || hasTotalSize ) {
- l = new QLabel(i18n("Size:"), d->m_frame );
+ l = new TQLabel(i18n("Size:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- m_sizeLabel = new QLabel( d->m_frame );
+ m_sizeLabel = new TQLabel( d->m_frame );
grid->addWidget( m_sizeLabel, curRow++, 2 );
} else {
m_sizeLabel = 0;
@@ -994,14 +994,14 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
else // Directory
{
- QHBoxLayout * sizelay = new QHBoxLayout(KDialog::spacingHint());
+ TQHBoxLayout * sizelay = new TQHBoxLayout(KDialog::spacingHint());
grid->addLayout( sizelay, curRow++, 2 );
// buttons
- m_sizeDetermineButton = new QPushButton( i18n("Calculate"), d->m_frame );
- m_sizeStopButton = new QPushButton( i18n("Stop"), d->m_frame );
- connect( m_sizeDetermineButton, SIGNAL( clicked() ), this, SLOT( slotSizeDetermine() ) );
- connect( m_sizeStopButton, SIGNAL( clicked() ), this, SLOT( slotSizeStop() ) );
+ m_sizeDetermineButton = new TQPushButton( i18n("Calculate"), d->m_frame );
+ m_sizeStopButton = new TQPushButton( i18n("Stop"), d->m_frame );
+ connect( m_sizeDetermineButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSizeDetermine() ) );
+ connect( m_sizeStopButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSizeStop() ) );
sizelay->addWidget(m_sizeDetermineButton, 0);
sizelay->addWidget(m_sizeStopButton, 0);
sizelay->addStretch(10); // so that the buttons don't grow horizontally
@@ -1017,7 +1017,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
if (!d->bMultiple && item->isLink()) {
- l = new QLabel(i18n("Points to:"), d->m_frame );
+ l = new TQLabel(i18n("Points to:"), d->m_frame );
grid->addWidget(l, curRow, 0);
l = new KSqueezedTextLabel(item->linkDest(), d->m_frame );
@@ -1026,38 +1026,38 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if (!d->bMultiple) // Dates for multiple don't make much sense...
{
- QDateTime dt;
+ TQDateTime dt;
bool hasTime;
time_t tim = item->time(KIO::UDS_CREATION_TIME, hasTime);
if ( hasTime )
{
- l = new QLabel(i18n("Created:"), d->m_frame );
+ l = new TQLabel(i18n("Created:"), d->m_frame );
grid->addWidget(l, curRow, 0);
dt.setTime_t( tim );
- l = new QLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
+ l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
grid->addWidget(l, curRow++, 2);
}
tim = item->time(KIO::UDS_MODIFICATION_TIME, hasTime);
if ( hasTime )
{
- l = new QLabel(i18n("Modified:"), d->m_frame );
+ l = new TQLabel(i18n("Modified:"), d->m_frame );
grid->addWidget(l, curRow, 0);
dt.setTime_t( tim );
- l = new QLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
+ l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
grid->addWidget(l, curRow++, 2);
}
tim = item->time(KIO::UDS_ACCESS_TIME, hasTime);
if ( hasTime )
{
- l = new QLabel(i18n("Accessed:"), d->m_frame );
+ l = new TQLabel(i18n("Accessed:"), d->m_frame );
grid->addWidget(l, curRow, 0);
dt.setTime_t( tim );
- l = new QLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
+ l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
grid->addWidget(l, curRow++, 2);
}
}
@@ -1068,35 +1068,35 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
grid->addMultiCellWidget(sep, curRow, curRow, 0, 2);
++curRow;
- QString mountPoint = KIO::findPathMountPoint( url.path() );
+ TQString mountPoint = KIO::findPathMountPoint( url.path() );
if (mountPoint != "/")
{
- l = new QLabel(i18n("Mounted on:"), d->m_frame );
+ l = new TQLabel(i18n("Mounted on:"), d->m_frame );
grid->addWidget(l, curRow, 0);
l = new KSqueezedTextLabel( mountPoint, d->m_frame );
grid->addWidget( l, curRow++, 2 );
}
- l = new QLabel(i18n("Free disk space:"), d->m_frame );
+ l = new TQLabel(i18n("Free disk space:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- d->m_freeSpaceLabel = new QLabel( d->m_frame );
+ d->m_freeSpaceLabel = new TQLabel( d->m_frame );
grid->addWidget( d->m_freeSpaceLabel, curRow++, 2 );
KDiskFreeSp * job = new KDiskFreeSp;
- connect( job, SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ),
- this, SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ) );
+ connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ),
+ this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ) );
job->readDF( mountPoint );
}
vbl->addStretch(1);
}
-// QString KFilePropsPlugin::tabName () const
+// TQString KFilePropsPlugin::tabName () const
// {
// return i18n ("&General");
// }
@@ -1109,7 +1109,7 @@ void KFilePropsPlugin::setFileNameReadOnly( bool ro )
if (ro)
{
// Don't put the initial focus on the line edit when it is ro
- QPushButton *button = properties->actionButton(KDialogBase::Ok);
+ TQPushButton *button = properties->actionButton(KDialogBase::Ok);
if (button)
button->setFocus();
}
@@ -1119,7 +1119,7 @@ void KFilePropsPlugin::setFileNameReadOnly( bool ro )
void KFilePropsPlugin::slotEditFileType()
{
#ifdef Q_WS_X11
- QString mime;
+ TQString mime;
if ( d->mimeType == KMimeType::defaultMimeType() ) {
int pos = d->oldFileName.findRev( '.' );
if ( pos != -1 )
@@ -1130,9 +1130,9 @@ void KFilePropsPlugin::slotEditFileType()
else
mime = d->mimeType;
//TODO: wrap for win32 or mac?
- QString keditfiletype = QString::fromLatin1("keditfiletype");
+ TQString keditfiletype = TQString::fromLatin1("keditfiletype");
KRun::runCommand( keditfiletype
- + " --parent " + QString::number( (ulong)properties->topLevelWidget()->winId())
+ + " --parent " + TQString::number( (ulong)properties->topLevelWidget()->winId())
+ " " + KProcess::quote(mime),
keditfiletype, keditfiletype /*unused*/);
#endif
@@ -1144,21 +1144,21 @@ void KFilePropsPlugin::slotIconChanged()
emit changed();
}
-void KFilePropsPlugin::nameFileChanged(const QString &text )
+void KFilePropsPlugin::nameFileChanged(const TQString &text )
{
properties->enableButtonOK(!text.isEmpty());
emit changed();
}
-void KFilePropsPlugin::determineRelativePath( const QString & path )
+void KFilePropsPlugin::determineRelativePath( const TQString & path )
{
// now let's make it relative
- QStringList dirs;
+ TQStringList dirs;
if (KBindingPropsPlugin::supports(properties->items()))
{
m_sRelativePath =KGlobal::dirs()->relativeLocation("mime", path);
if (m_sRelativePath.startsWith("/"))
- m_sRelativePath = QString::null;
+ m_sRelativePath = TQString::null;
}
else
{
@@ -1167,7 +1167,7 @@ void KFilePropsPlugin::determineRelativePath( const QString & path )
{
m_sRelativePath =KGlobal::dirs()->relativeLocation("xdgdata-apps", path);
if (m_sRelativePath.startsWith("/"))
- m_sRelativePath = QString::null;
+ m_sRelativePath = TQString::null;
else
m_sRelativePath = path;
}
@@ -1179,7 +1179,7 @@ void KFilePropsPlugin::determineRelativePath( const QString & path )
}
}
-void KFilePropsPlugin::slotFoundMountPoint( const QString&,
+void KFilePropsPlugin::slotFoundMountPoint( const TQString&,
unsigned long kBSize,
unsigned long /*kBUsed*/,
unsigned long kBAvail )
@@ -1197,7 +1197,7 @@ void KFilePropsPlugin::slotFoundMountPoint( const QString&,
void KFilePropsPlugin::slotFoundMountPoint( const unsigned long& kBSize,
const unsigned long& /*kBUsed*/,
const unsigned long& kBAvail,
- const QString& )
+ const TQString& )
{
d->m_freeSpaceLabel->setText(
// xgettext:no-c-format -- Don't warn about translating the %1 out of %2 part.
@@ -1228,7 +1228,7 @@ void KFilePropsPlugin::slotDirSizeFinished( KIO::Job * job )
KIO::filesize_t totalSize = static_cast<KDirSize*>(job)->totalSize();
KIO::filesize_t totalFiles = static_cast<KDirSize*>(job)->totalFiles();
KIO::filesize_t totalSubdirs = static_cast<KDirSize*>(job)->totalSubdirs();
- m_sizeLabel->setText( QString::fromLatin1("%1 (%2)\n%3, %4")
+ m_sizeLabel->setText( TQString::fromLatin1("%1 (%2)\n%3, %4")
.arg(KIO::convertSize(totalSize))
.arg(KGlobal::locale()->formatNumber(totalSize, 0))
.arg(i18n("1 file","%n files",totalFiles))
@@ -1249,12 +1249,12 @@ void KFilePropsPlugin::slotSizeDetermine()
kdDebug(250) << " KFilePropsPlugin::slotSizeDetermine() properties->item()=" << properties->item() << endl;
kdDebug(250) << " URL=" << properties->item()->url().url() << endl;
d->dirSizeJob = KDirSize::dirSizeJob( properties->items() );
- d->dirSizeUpdateTimer = new QTimer(this);
- connect( d->dirSizeUpdateTimer, SIGNAL( timeout() ),
- SLOT( slotDirSizeUpdate() ) );
+ d->dirSizeUpdateTimer = new TQTimer(this);
+ connect( d->dirSizeUpdateTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotDirSizeUpdate() ) );
d->dirSizeUpdateTimer->start(500);
- connect( d->dirSizeJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotDirSizeFinished( KIO::Job * ) ) );
+ connect( d->dirSizeJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotDirSizeFinished( KIO::Job * ) ) );
m_sizeStopButton->setEnabled(true);
m_sizeDetermineButton->setEnabled(false);
@@ -1264,13 +1264,13 @@ void KFilePropsPlugin::slotSizeDetermine()
bool isLocal;
KFileItem * item = properties->item();
KURL url = item->mostLocalURL( isLocal );
- QString mountPoint = KIO::findPathMountPoint( url.path() );
+ TQString mountPoint = KIO::findPathMountPoint( url.path() );
KDiskFreeSp * job = new KDiskFreeSp;
- connect( job, SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ),
- this, SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ) );
+ connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ),
+ this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ) );
job->readDF( mountPoint );
}
}
@@ -1301,8 +1301,8 @@ bool KFilePropsPlugin::supports( KFileItemList /*_items*/ )
}
// Don't do this at home
-void qt_enter_modal( QWidget *widget );
-void qt_leave_modal( QWidget *widget );
+void qt_enter_modal( TQWidget *widget );
+void qt_leave_modal( TQWidget *widget );
void KFilePropsPlugin::applyChanges()
{
@@ -1311,9 +1311,9 @@ void KFilePropsPlugin::applyChanges()
kdDebug(250) << "KFilePropsPlugin::applyChanges" << endl;
- if (nameArea->inherits("QLineEdit"))
+ if (nameArea->inherits("TQLineEdit"))
{
- QString n = ((QLineEdit *) nameArea)->text();
+ TQString n = ((TQLineEdit *) nameArea)->text();
// Remove trailing spaces (#4345)
while ( n[n.length()-1].isSpace() )
n.truncate( n.length() - 1 );
@@ -1331,7 +1331,7 @@ void KFilePropsPlugin::applyChanges()
KIO::Job * job = 0L;
KURL oldurl = properties->kurl();
- QString newFileName = KIO::encodeFileName(n);
+ TQString newFileName = KIO::encodeFileName(n);
if (d->bDesktopFile && !newFileName.endsWith(".desktop") && !newFileName.endsWith(".kdelnk"))
newFileName += ".desktop";
@@ -1351,12 +1351,12 @@ void KFilePropsPlugin::applyChanges()
else // Copying a template
job = KIO::copy( oldurl, properties->kurl() );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotCopyFinished( KIO::Job * ) ) );
- connect( job, SIGNAL( renamed( KIO::Job *, const KURL &, const KURL & ) ),
- SLOT( slotFileRenamed( KIO::Job *, const KURL &, const KURL & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotCopyFinished( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( renamed( KIO::Job *, const KURL &, const KURL & ) ),
+ TQT_SLOT( slotFileRenamed( KIO::Job *, const KURL &, const KURL & ) ) );
// wait for job
- QWidget dummy(0,0,WType_Dialog|WShowModal);
+ TQWidget dummy(0,0,WType_Dialog|WShowModal);
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -1412,7 +1412,7 @@ void KFilePropsPlugin::slotCopyFinished( KIO::Job * job )
// Renamed? Update Name field
if ( d->oldFileName != properties->kurl().fileName() || m_bFromTemplate ) {
KDesktopFile config( properties->kurl().path() );
- QString nameStr = nameFromFileName(properties->kurl().fileName());
+ TQString nameStr = nameFromFileName(properties->kurl().fileName());
config.writeEntry( "Name", nameStr );
config.writeEntry( "Name", nameStr, true, false, true );
}
@@ -1429,11 +1429,11 @@ void KFilePropsPlugin::applyIconChanges()
KURL url = properties->kurl();
url = KIO::NetAccess::mostLocalURL( url, properties );
if (url.isLocalFile()) {
- QString path;
+ TQString path;
if (S_ISDIR(properties->item()->mode()))
{
- path = url.path(1) + QString::fromLatin1(".directory");
+ path = url.path(1) + TQString::fromLatin1(".directory");
// don't call updateUrl because the other tabs (i.e. permissions)
// apply to the directory, not the .directory file.
}
@@ -1441,17 +1441,17 @@ void KFilePropsPlugin::applyIconChanges()
path = url.path();
// Get the default image
- QString str = KMimeType::findByURL( url,
+ TQString str = KMimeType::findByURL( url,
properties->item()->mode(),
true )->KServiceType::icon();
// Is it another one than the default ?
- QString sIcon;
+ TQString sIcon;
if ( str != iconButton->icon() )
sIcon = iconButton->icon();
// (otherwise write empty value)
kdDebug(250) << "**" << path << "**" << endl;
- QFile f( path );
+ TQFile f( path );
// If default icon and no .directory file -> don't create one
if ( !sIcon.isEmpty() || f.exists() )
@@ -1502,11 +1502,11 @@ public:
{
}
- QFrame *m_frame;
- QCheckBox *cbRecursive;
- QLabel *explanationLabel;
- QComboBox *ownerPermCombo, *groupPermCombo, *othersPermCombo;
- QCheckBox *extraCheckbox;
+ TQFrame *m_frame;
+ TQCheckBox *cbRecursive;
+ TQLabel *explanationLabel;
+ TQComboBox *ownerPermCombo, *groupPermCombo, *othersPermCombo;
+ TQCheckBox *extraCheckbox;
mode_t partialPermissions;
KFilePermissionsPropsPlugin::PermissionsMode pmode;
bool canChangePermissions;
@@ -1554,8 +1554,8 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->cbRecursive = 0L;
grpCombo = 0L; grpEdit = 0;
usrEdit = 0L;
- QString path = properties->kurl().path(-1);
- QString fname = properties->kurl().fileName();
+ TQString path = properties->kurl().path(-1);
+ TQString fname = properties->kurl().fileName();
bool isLocal = properties->kurl().isLocalFile();
bool isTrash = ( properties->kurl().protocol().find("trash", 0, false)==0 );
bool IamRoot = (geteuid() == 0);
@@ -1597,9 +1597,9 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->partialPermissions |= (*it)->permissions();
}
if ( (*it)->user() != strOwner )
- strOwner = QString::null;
+ strOwner = TQString::null;
if ( (*it)->group() != strGroup )
- strGroup = QString::null;
+ strGroup = TQString::null;
}
}
@@ -1621,7 +1621,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
struct passwd *myself = getpwuid( geteuid() );
if ( myself != 0L )
{
- isMyFile = (strOwner == QString::fromLocal8Bit(myself->pw_name));
+ isMyFile = (strOwner == TQString::fromLocal8Bit(myself->pw_name));
} else
kdWarning() << "I don't exist ?! geteuid=" << geteuid() << endl;
} else {
@@ -1638,24 +1638,24 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->m_frame = properties->addPage(i18n("&Permissions"));
- QBoxLayout *box = new QVBoxLayout( d->m_frame, 0, KDialog::spacingHint() );
+ TQBoxLayout *box = new TQVBoxLayout( d->m_frame, 0, KDialog::spacingHint() );
- QWidget *l;
- QLabel *lbl;
- QGroupBox *gb;
- QGridLayout *gl;
- QPushButton* pbAdvancedPerm = 0;
+ TQWidget *l;
+ TQLabel *lbl;
+ TQGroupBox *gb;
+ TQGridLayout *gl;
+ TQPushButton* pbAdvancedPerm = 0;
/* Group: Access Permissions */
- gb = new QGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), d->m_frame );
+ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), d->m_frame );
gb->layout()->setSpacing(KDialog::spacingHint());
gb->layout()->setMargin(KDialog::marginHint());
box->addWidget (gb);
- gl = new QGridLayout (gb->layout(), 7, 2);
+ gl = new TQGridLayout (gb->layout(), 7, 2);
gl->setColStretch(1, 1);
- l = d->explanationLabel = new QLabel( "", gb );
+ l = d->explanationLabel = new TQLabel( "", gb );
if (isLink)
d->explanationLabel->setText(i18n("This file is a link and does not have permissions.",
"All files are links and do not have permissions.",
@@ -1664,39 +1664,39 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->explanationLabel->setText(i18n("Only the owner can change permissions."));
gl->addMultiCellWidget(l, 0, 0, 0, 1);
- lbl = new QLabel( i18n("O&wner:"), gb);
+ lbl = new TQLabel( i18n("O&wner:"), gb);
gl->addWidget(lbl, 1, 0);
- l = d->ownerPermCombo = new QComboBox(gb);
+ l = d->ownerPermCombo = new TQComboBox(gb);
lbl->setBuddy(l);
gl->addWidget(l, 1, 1);
- connect(l, SIGNAL( highlighted(int) ), this, SIGNAL( changed() ));
- QWhatsThis::add(l, i18n("Specifies the actions that the owner is allowed to do."));
+ connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() ));
+ TQWhatsThis::add(l, i18n("Specifies the actions that the owner is allowed to do."));
- lbl = new QLabel( i18n("Gro&up:"), gb);
+ lbl = new TQLabel( i18n("Gro&up:"), gb);
gl->addWidget(lbl, 2, 0);
- l = d->groupPermCombo = new QComboBox(gb);
+ l = d->groupPermCombo = new TQComboBox(gb);
lbl->setBuddy(l);
gl->addWidget(l, 2, 1);
- connect(l, SIGNAL( highlighted(int) ), this, SIGNAL( changed() ));
- QWhatsThis::add(l, i18n("Specifies the actions that the members of the group are allowed to do."));
+ connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() ));
+ TQWhatsThis::add(l, i18n("Specifies the actions that the members of the group are allowed to do."));
- lbl = new QLabel( i18n("O&thers:"), gb);
+ lbl = new TQLabel( i18n("O&thers:"), gb);
gl->addWidget(lbl, 3, 0);
- l = d->othersPermCombo = new QComboBox(gb);
+ l = d->othersPermCombo = new TQComboBox(gb);
lbl->setBuddy(l);
gl->addWidget(l, 3, 1);
- connect(l, SIGNAL( highlighted(int) ), this, SIGNAL( changed() ));
- QWhatsThis::add(l, i18n("Specifies the actions that all users, who are neither "
+ connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() ));
+ TQWhatsThis::add(l, i18n("Specifies the actions that all users, who are neither "
"owner nor in the group, are allowed to do."));
if (!isLink) {
- l = d->extraCheckbox = new QCheckBox(hasDir ?
+ l = d->extraCheckbox = new TQCheckBox(hasDir ?
i18n("Only own&er can rename and delete folder content") :
i18n("Is &executable"),
gb );
- connect( d->extraCheckbox, SIGNAL( clicked() ), this, SIGNAL( changed() ) );
+ connect( d->extraCheckbox, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( changed() ) );
gl->addWidget(l, 4, 1);
- QWhatsThis::add(l, hasDir ? i18n("Enable this option to allow only the folder's owner to "
+ TQWhatsThis::add(l, hasDir ? i18n("Enable this option to allow only the folder's owner to "
"delete or rename the contained files and folders. Other "
"users can only add new files, which requires the 'Modify "
"Content' permission.")
@@ -1704,28 +1704,28 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
"sense for programs and scripts. It is required when you want to "
"execute them."));
- QLayoutItem *spacer = new QSpacerItem(0, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQLayoutItem *spacer = new TQSpacerItem(0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding);
gl->addMultiCell(spacer, 5, 5, 0, 1);
- pbAdvancedPerm = new QPushButton(i18n("A&dvanced Permissions"), gb);
+ pbAdvancedPerm = new TQPushButton(i18n("A&dvanced Permissions"), gb);
gl->addMultiCellWidget(pbAdvancedPerm, 6, 6, 0, 1, AlignRight);
- connect(pbAdvancedPerm, SIGNAL( clicked() ), this, SLOT( slotShowAdvancedPermissions() ));
+ connect(pbAdvancedPerm, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowAdvancedPermissions() ));
}
else
d->extraCheckbox = 0;
/**** Group: Ownership ****/
- gb = new QGroupBox ( 0, Qt::Vertical, i18n("Ownership"), d->m_frame );
+ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Ownership"), d->m_frame );
gb->layout()->setSpacing(KDialog::spacingHint());
gb->layout()->setMargin(KDialog::marginHint());
box->addWidget (gb);
- gl = new QGridLayout (gb->layout(), 4, 3);
+ gl = new TQGridLayout (gb->layout(), 4, 3);
gl->addRowSpacing(0, 10);
/*** Set Owner ***/
- l = new QLabel( i18n("User:"), gb );
+ l = new TQLabel( i18n("User:"), gb );
gl->addWidget (l, 1, 0);
/* GJ: Don't autocomplete more than 1000 users. This is a kind of random
@@ -1738,7 +1738,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
struct group *ge;
/* File owner: For root, offer a KLineEdit with autocompletion.
- * For a user, who can never chown() a file, offer a QLabel.
+ * For a user, who can never chown() a file, offer a TQLabel.
*/
if (IamRoot && isLocal)
{
@@ -1747,25 +1747,25 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
kcom->setOrder(KCompletion::Sorted);
setpwent();
for (i=0; ((user = getpwent()) != 0L) && (i < maxEntries); i++)
- kcom->addItem(QString::fromLatin1(user->pw_name));
+ kcom->addItem(TQString::fromLatin1(user->pw_name));
endpwent();
usrEdit->setCompletionMode((i < maxEntries) ? KGlobalSettings::CompletionAuto :
KGlobalSettings::CompletionNone);
usrEdit->setText(strOwner);
gl->addWidget(usrEdit, 1, 1);
- connect( usrEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( usrEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
}
else
{
- l = new QLabel(strOwner, gb);
+ l = new TQLabel(strOwner, gb);
gl->addWidget(l, 1, 1);
}
/*** Set Group ***/
- QStringList groupList;
- QCString strUser;
+ TQStringList groupList;
+ TQCString strUser;
user = getpwuid(geteuid());
if (user != 0L)
strUser = user->pw_name;
@@ -1775,7 +1775,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
for (i=0; ((ge = getgrent()) != 0L) && (i < maxEntries); i++)
{
if (IamRoot)
- groupList += QString::fromLatin1(ge->gr_name);
+ groupList += TQString::fromLatin1(ge->gr_name);
else
{
/* pick the groups to which the user belongs */
@@ -1783,7 +1783,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
char * member;
while ((member = *members) != 0L) {
if (strUser == member) {
- groupList += QString::fromLocal8Bit(ge->gr_name);
+ groupList += TQString::fromLocal8Bit(ge->gr_name);
break;
}
++members;
@@ -1796,7 +1796,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
/* add the effective Group to the list .. */
ge = getgrgid (getegid());
if (ge) {
- QString name = QString::fromLatin1(ge->gr_name);
+ TQString name = TQString::fromLatin1(ge->gr_name);
if (name.isEmpty())
name.setNum(ge->gr_gid);
if (groupList.find(name) == groupList.end())
@@ -1811,14 +1811,14 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
if (!isMyGroup)
groupList += strGroup;
- l = new QLabel( i18n("Group:"), gb );
+ l = new TQLabel( i18n("Group:"), gb );
gl->addWidget (l, 2, 0);
/* Set group: if possible to change:
* - Offer a KLineEdit for root, since he can change to any group.
- * - Offer a QComboBox for a normal user, since he can change to a fixed
+ * - Offer a TQComboBox for a normal user, since he can change to a fixed
* (small) set of groups only.
- * If not changeable: offer a QLabel.
+ * If not changeable: offer a TQLabel.
*/
if (IamRoot && isLocal)
{
@@ -1830,21 +1830,21 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
grpEdit->setCompletionMode(KGlobalSettings::CompletionAuto);
grpEdit->setText(strGroup);
gl->addWidget(grpEdit, 2, 1);
- connect( grpEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( grpEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
}
else if ((groupList.count() > 1) && isMyFile && isLocal)
{
- grpCombo = new QComboBox(gb, "combogrouplist");
+ grpCombo = new TQComboBox(gb, "combogrouplist");
grpCombo->insertStringList(groupList);
grpCombo->setCurrentItem(groupList.findIndex(strGroup));
gl->addWidget(grpCombo, 2, 1);
- connect( grpCombo, SIGNAL( activated( int ) ),
- this, SIGNAL( changed() ) );
+ connect( grpCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SIGNAL( changed() ) );
}
else
{
- l = new QLabel(strGroup, gb);
+ l = new TQLabel(strGroup, gb);
gl->addWidget(l, 2, 1);
}
@@ -1853,8 +1853,8 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
// "Apply recursive" checkbox
if ( hasDir && !isLink && !isTrash )
{
- d->cbRecursive = new QCheckBox( i18n("Apply changes to all subfolders and their contents"), d->m_frame );
- connect( d->cbRecursive, SIGNAL( clicked() ), this, SIGNAL( changed() ) );
+ d->cbRecursive = new TQCheckBox( i18n("Apply changes to all subfolders and their contents"), d->m_frame );
+ connect( d->cbRecursive, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( changed() ) );
box->addWidget( d->cbRecursive );
}
@@ -1873,7 +1873,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
}
#ifdef USE_POSIX_ACL
-static bool fileSystemSupportsACL( const QCString& pathCString )
+static bool fileSystemSupportsACL( const TQCString& pathCString )
{
bool fileSystemSupportsACLs = false;
#ifdef Q_OS_FREEBSD
@@ -1901,118 +1901,118 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
KDialogBase dlg(properties, 0, true, i18n("Advanced Permissions"),
KDialogBase::Ok|KDialogBase::Cancel);
- QLabel *l, *cl[3];
- QGroupBox *gb;
- QGridLayout *gl;
+ TQLabel *l, *cl[3];
+ TQGroupBox *gb;
+ TQGridLayout *gl;
- QVBox *mainVBox = dlg.makeVBoxMainWidget();
+ TQVBox *mainVBox = dlg.makeVBoxMainWidget();
// Group: Access Permissions
- gb = new QGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), mainVBox );
+ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), mainVBox );
gb->layout()->setSpacing(KDialog::spacingHint());
gb->layout()->setMargin(KDialog::marginHint());
- gl = new QGridLayout (gb->layout(), 6, 6);
+ gl = new TQGridLayout (gb->layout(), 6, 6);
gl->addRowSpacing(0, 10);
- QValueVector<QWidget*> theNotSpecials;
+ TQValueVector<TQWidget*> theNotSpecials;
- l = new QLabel(i18n("Class"), gb );
+ l = new TQLabel(i18n("Class"), gb );
gl->addWidget(l, 1, 0);
theNotSpecials.append( l );
if (isDir)
- l = new QLabel( i18n("Show\nEntries"), gb );
+ l = new TQLabel( i18n("Show\nEntries"), gb );
else
- l = new QLabel( i18n("Read"), gb );
+ l = new TQLabel( i18n("Read"), gb );
gl->addWidget (l, 1, 1);
theNotSpecials.append( l );
- QString readWhatsThis;
+ TQString readWhatsThis;
if (isDir)
readWhatsThis = i18n("This flag allows viewing the content of the folder.");
else
readWhatsThis = i18n("The Read flag allows viewing the content of the file.");
- QWhatsThis::add(l, readWhatsThis);
+ TQWhatsThis::add(l, readWhatsThis);
if (isDir)
- l = new QLabel( i18n("Write\nEntries"), gb );
+ l = new TQLabel( i18n("Write\nEntries"), gb );
else
- l = new QLabel( i18n("Write"), gb );
+ l = new TQLabel( i18n("Write"), gb );
gl->addWidget (l, 1, 2);
theNotSpecials.append( l );
- QString writeWhatsThis;
+ TQString writeWhatsThis;
if (isDir)
writeWhatsThis = i18n("This flag allows adding, renaming and deleting of files. "
"Note that deleting and renaming can be limited using the Sticky flag.");
else
writeWhatsThis = i18n("The Write flag allows modifying the content of the file.");
- QWhatsThis::add(l, writeWhatsThis);
+ TQWhatsThis::add(l, writeWhatsThis);
- QString execWhatsThis;
+ TQString execWhatsThis;
if (isDir) {
- l = new QLabel( i18n("Enter folder", "Enter"), gb );
+ l = new TQLabel( i18n("Enter folder", "Enter"), gb );
execWhatsThis = i18n("Enable this flag to allow entering the folder.");
}
else {
- l = new QLabel( i18n("Exec"), gb );
+ l = new TQLabel( i18n("Exec"), gb );
execWhatsThis = i18n("Enable this flag to allow executing the file as a program.");
}
- QWhatsThis::add(l, execWhatsThis);
+ TQWhatsThis::add(l, execWhatsThis);
theNotSpecials.append( l );
// GJ: Add space between normal and special modes
- QSize size = l->sizeHint();
+ TQSize size = l->sizeHint();
size.setWidth(size.width() + 15);
l->setFixedSize(size);
gl->addWidget (l, 1, 3);
- l = new QLabel( i18n("Special"), gb );
+ l = new TQLabel( i18n("Special"), gb );
gl->addMultiCellWidget(l, 1, 1, 4, 5);
- QString specialWhatsThis;
+ TQString specialWhatsThis;
if (isDir)
specialWhatsThis = i18n("Special flag. Valid for the whole folder, the exact "
"meaning of the flag can be seen in the right hand column.");
else
specialWhatsThis = i18n("Special flag. The exact meaning of the flag can be seen "
"in the right hand column.");
- QWhatsThis::add(l, specialWhatsThis);
+ TQWhatsThis::add(l, specialWhatsThis);
- cl[0] = new QLabel( i18n("User"), gb );
+ cl[0] = new TQLabel( i18n("User"), gb );
gl->addWidget (cl[0], 2, 0);
theNotSpecials.append( cl[0] );
- cl[1] = new QLabel( i18n("Group"), gb );
+ cl[1] = new TQLabel( i18n("Group"), gb );
gl->addWidget (cl[1], 3, 0);
theNotSpecials.append( cl[1] );
- cl[2] = new QLabel( i18n("Others"), gb );
+ cl[2] = new TQLabel( i18n("Others"), gb );
gl->addWidget (cl[2], 4, 0);
theNotSpecials.append( cl[2] );
- l = new QLabel(i18n("Set UID"), gb);
+ l = new TQLabel(i18n("Set UID"), gb);
gl->addWidget(l, 2, 5);
- QString setUidWhatsThis;
+ TQString setUidWhatsThis;
if (isDir)
setUidWhatsThis = i18n("If this flag is set, the owner of this folder will be "
"the owner of all new files.");
else
setUidWhatsThis = i18n("If this file is an executable and the flag is set, it will "
"be executed with the permissions of the owner.");
- QWhatsThis::add(l, setUidWhatsThis);
+ TQWhatsThis::add(l, setUidWhatsThis);
- l = new QLabel(i18n("Set GID"), gb);
+ l = new TQLabel(i18n("Set GID"), gb);
gl->addWidget(l, 3, 5);
- QString setGidWhatsThis;
+ TQString setGidWhatsThis;
if (isDir)
setGidWhatsThis = i18n("If this flag is set, the group of this folder will be "
"set for all new files.");
else
setGidWhatsThis = i18n("If this file is an executable and the flag is set, it will "
"be executed with the permissions of the group.");
- QWhatsThis::add(l, setGidWhatsThis);
+ TQWhatsThis::add(l, setGidWhatsThis);
- l = new QLabel(i18n("File permission", "Sticky"), gb);
+ l = new TQLabel(i18n("File permission", "Sticky"), gb);
gl->addWidget(l, 4, 5);
- QString stickyWhatsThis;
+ TQString stickyWhatsThis;
if (isDir)
stickyWhatsThis = i18n("If the Sticky flag is set on a folder, only the owner "
"and root can delete or rename files. Otherwise everybody "
@@ -2020,7 +2020,7 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
else
stickyWhatsThis = i18n("The Sticky flag on a file is ignored on Linux, but may "
"be used on some systems");
- QWhatsThis::add(l, stickyWhatsThis);
+ TQWhatsThis::add(l, stickyWhatsThis);
mode_t aPermissions, aPartialPermissions;
mode_t dummy1, dummy2;
@@ -2052,10 +2052,10 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
}
// Draw Checkboxes
- QCheckBox *cba[3][4];
+ TQCheckBox *cba[3][4];
for (int row = 0; row < 3 ; ++row) {
for (int col = 0; col < 4; ++col) {
- QCheckBox *cb = new QCheckBox( gb );
+ TQCheckBox *cb = new TQCheckBox( gb );
if ( col != 3 ) theNotSpecials.append( cb );
cba[row][col] = cb;
cb->setChecked(aPermissions & fperm[row][col]);
@@ -2071,24 +2071,24 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
gl->addWidget (cb, row+2, col+1);
switch(col) {
case 0:
- QWhatsThis::add(cb, readWhatsThis);
+ TQWhatsThis::add(cb, readWhatsThis);
break;
case 1:
- QWhatsThis::add(cb, writeWhatsThis);
+ TQWhatsThis::add(cb, writeWhatsThis);
break;
case 2:
- QWhatsThis::add(cb, execWhatsThis);
+ TQWhatsThis::add(cb, execWhatsThis);
break;
case 3:
switch(row) {
case 0:
- QWhatsThis::add(cb, setUidWhatsThis);
+ TQWhatsThis::add(cb, setUidWhatsThis);
break;
case 1:
- QWhatsThis::add(cb, setGidWhatsThis);
+ TQWhatsThis::add(cb, setGidWhatsThis);
break;
case 2:
- QWhatsThis::add(cb, stickyWhatsThis);
+ TQWhatsThis::add(cb, stickyWhatsThis);
break;
}
break;
@@ -2102,11 +2102,11 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
// FIXME make it work with partial entries
if ( properties->items().count() == 1 ) {
- QCString pathCString = QFile::encodeName( properties->item()->url().path() );
+ TQCString pathCString = TQFile::encodeName( properties->item()->url().path() );
d->fileSystemSupportsACLs = fileSystemSupportsACL( pathCString );
}
if ( d->fileSystemSupportsACLs ) {
- std::for_each( theNotSpecials.begin(), theNotSpecials.end(), std::mem_fun( &QWidget::hide ) );
+ std::for_each( theNotSpecials.begin(), theNotSpecials.end(), std::mem_fun( &TQWidget::hide ) );
extendedACLs = new KACLEditWidget( mainVBox );
if ( d->extendedACL.isValid() && d->extendedACL.isExtended() )
extendedACLs->setACL( d->extendedACL );
@@ -2132,10 +2132,10 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
for (int col = 0; col < 4; ++col) {
switch (cba[row][col]->state())
{
- case QCheckBox::On:
+ case TQCheckBox::On:
orPermissions |= fperm[row][col];
//fall through
- case QCheckBox::Off:
+ case TQCheckBox::Off:
andPermissions &= ~fperm[row][col];
break;
default: // NoChange
@@ -2171,7 +2171,7 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
emit changed();
}
-// QString KFilePermissionsPropsPlugin::tabName () const
+// TQString KFilePermissionsPropsPlugin::tabName () const
// {
// return i18n ("&Permissions");
// }
@@ -2193,7 +2193,7 @@ bool KFilePermissionsPropsPlugin::supports( KFileItemList _items )
}
// sets a combo box in the Access Control frame
-void KFilePermissionsPropsPlugin::setComboContent(QComboBox *combo, PermissionsTarget target,
+void KFilePermissionsPropsPlugin::setComboContent(TQComboBox *combo, PermissionsTarget target,
mode_t permissions, mode_t partial) {
combo->clear();
if (d->pmode == PermissionsOnlyLinks) {
@@ -2379,11 +2379,11 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
orFilePermissions |= m & UniOwner;
if ((m & UniOwner) &&
((d->pmode == PermissionsMixed) ||
- ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == QButton::NoChange))))
+ ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange))))
andFilePermissions &= ~(S_IRUSR | S_IWUSR);
else {
andFilePermissions &= ~(S_IRUSR | S_IWUSR | S_IXUSR);
- if ((m & S_IRUSR) && (d->extraCheckbox->state() == QButton::On))
+ if ((m & S_IRUSR) && (d->extraCheckbox->state() == TQButton::On))
orFilePermissions |= S_IXUSR;
}
@@ -2398,11 +2398,11 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
orFilePermissions |= m & UniGroup;
if ((m & UniGroup) &&
((d->pmode == PermissionsMixed) ||
- ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == QButton::NoChange))))
+ ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange))))
andFilePermissions &= ~(S_IRGRP | S_IWGRP);
else {
andFilePermissions &= ~(S_IRGRP | S_IWGRP | S_IXGRP);
- if ((m & S_IRGRP) && (d->extraCheckbox->state() == QButton::On))
+ if ((m & S_IRGRP) && (d->extraCheckbox->state() == TQButton::On))
orFilePermissions |= S_IXGRP;
}
@@ -2417,11 +2417,11 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
orFilePermissions |= m & UniOthers;
if ((m & UniOthers) &&
((d->pmode == PermissionsMixed) ||
- ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == QButton::NoChange))))
+ ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange))))
andFilePermissions &= ~(S_IROTH | S_IWOTH);
else {
andFilePermissions &= ~(S_IROTH | S_IWOTH | S_IXOTH);
- if ((m & S_IROTH) && (d->extraCheckbox->state() == QButton::On))
+ if ((m & S_IROTH) && (d->extraCheckbox->state() == TQButton::On))
orFilePermissions |= S_IXOTH;
}
@@ -2432,9 +2432,9 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
}
if (((d->pmode == PermissionsMixed) || (d->pmode == PermissionsOnlyDirs)) &&
- (d->extraCheckbox->state() != QButton::NoChange)) {
+ (d->extraCheckbox->state() != TQButton::NoChange)) {
andDirPermissions &= ~S_ISVTX;
- if (d->extraCheckbox->state() == QButton::On)
+ if (d->extraCheckbox->state() == TQButton::On)
orDirPermissions |= S_ISVTX;
}
}
@@ -2461,7 +2461,7 @@ void KFilePermissionsPropsPlugin::applyChanges()
andDirPermissions = d->partialPermissions;
}
- QString owner, group;
+ TQString owner, group;
if (usrEdit)
owner = usrEdit->text();
if (grpEdit)
@@ -2470,10 +2470,10 @@ void KFilePermissionsPropsPlugin::applyChanges()
group = grpCombo->currentText();
if (owner == strOwner)
- owner = QString::null; // no change
+ owner = TQString::null; // no change
if (group == strGroup)
- group = QString::null;
+ group = TQString::null;
bool recursive = d->cbRecursive && d->cbRecursive->isChecked();
bool permissionChange = false;
@@ -2509,10 +2509,10 @@ void KFilePermissionsPropsPlugin::applyChanges()
if ( defaultACLChange && d->fileSystemSupportsACLs )
job->addMetaData( "DEFAULT_ACL_STRING", d->defaultACL.isValid()?d->defaultACL.asString():"ACL_DELETE" );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotChmodResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotChmodResult( KIO::Job * ) ) );
// Wait for job
- QWidget dummy(0,0,WType_Dialog|WShowModal);
+ TQWidget dummy(0,0,WType_Dialog|WShowModal);
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -2525,10 +2525,10 @@ void KFilePermissionsPropsPlugin::applyChanges()
if ( defaultACLChange && d->fileSystemSupportsACLs )
job->addMetaData( "DEFAULT_ACL_STRING", d->defaultACL.isValid()?d->defaultACL.asString():"ACL_DELETE" );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotChmodResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotChmodResult( KIO::Job * ) ) );
// Wait for job
- QWidget dummy(0,0,WType_Dialog|WShowModal);
+ TQWidget dummy(0,0,WType_Dialog|WShowModal);
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -2557,7 +2557,7 @@ public:
{
}
- QFrame *m_frame;
+ TQFrame *m_frame;
};
KURLPropsPlugin::KURLPropsPlugin( KPropertiesDialog *_props )
@@ -2565,19 +2565,19 @@ KURLPropsPlugin::KURLPropsPlugin( KPropertiesDialog *_props )
{
d = new KURLPropsPluginPrivate;
d->m_frame = properties->addPage(i18n("U&RL"));
- QVBoxLayout *layout = new QVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
- QLabel *l;
- l = new QLabel( d->m_frame, "Label_1" );
+ TQLabel *l;
+ l = new TQLabel( d->m_frame, "Label_1" );
l->setText( i18n("URL:") );
layout->addWidget(l);
URLEdit = new KURLRequester( d->m_frame, "URL Requester" );
layout->addWidget(URLEdit);
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
@@ -2589,8 +2589,8 @@ KURLPropsPlugin::KURLPropsPlugin( KPropertiesDialog *_props )
if ( !URLStr.isNull() )
URLEdit->setURL( URLStr );
- connect( URLEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( URLEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
layout->addStretch (1);
}
@@ -2600,7 +2600,7 @@ KURLPropsPlugin::~KURLPropsPlugin()
delete d;
}
-// QString KURLPropsPlugin::tabName () const
+// TQString KURLPropsPlugin::tabName () const
// {
// return i18n ("U&RL");
// }
@@ -2621,9 +2621,9 @@ bool KURLPropsPlugin::supports( KFileItemList _items )
void KURLPropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have "
"sufficient access to write to <b>%1</b>.</qt>").arg(path));
@@ -2633,13 +2633,13 @@ void KURLPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Link"));
+ config.writeEntry( "Type", TQString::fromLatin1("Link"));
config.writePathEntry( "URL", URLEdit->url() );
// Users can't create a Link .desktop file with a Name field,
// but distributions can. Update the Name field in that case.
if ( config.hasKey("Name") )
{
- QString nameStr = nameFromFileName(properties->kurl().fileName());
+ TQString nameStr = nameFromFileName(properties->kurl().fileName());
config.writeEntry( "Name", nameStr );
config.writeEntry( "Name", nameStr, true, false, true );
@@ -2663,7 +2663,7 @@ public:
{
}
- QFrame *m_frame;
+ TQFrame *m_frame;
};
KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDlgPlugin( _props )
@@ -2674,10 +2674,10 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
commentEdit = new KLineEdit( d->m_frame, "LineEdit_2" );
mimeEdit = new KLineEdit( d->m_frame, "LineEdit_3" );
- QBoxLayout *mainlayout = new QVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
- QLabel* tmpQLabel;
+ TQBoxLayout *mainlayout = new TQVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
+ TQLabel* tmpQLabel;
- tmpQLabel = new QLabel( d->m_frame, "Label_1" );
+ tmpQLabel = new TQLabel( d->m_frame, "Label_1" );
tmpQLabel->setText( i18n("Pattern ( example: *.html;*.htm )") );
tmpQLabel->setMinimumSize(tmpQLabel->sizeHint());
mainlayout->addWidget(tmpQLabel, 1);
@@ -2689,7 +2689,7 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
patternEdit->setFixedHeight( fontHeight );
mainlayout->addWidget(patternEdit, 1);
- tmpQLabel = new QLabel( d->m_frame, "Label_2" );
+ tmpQLabel = new TQLabel( d->m_frame, "Label_2" );
tmpQLabel->setText( i18n("Mime Type") );
tmpQLabel->setMinimumSize(tmpQLabel->sizeHint());
mainlayout->addWidget(tmpQLabel, 1);
@@ -2700,7 +2700,7 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
mimeEdit->setFixedHeight( fontHeight );
mainlayout->addWidget(mimeEdit, 1);
- tmpQLabel = new QLabel( d->m_frame, "Label_3" );
+ tmpQLabel = new TQLabel( d->m_frame, "Label_3" );
tmpQLabel->setText( i18n("Comment") );
tmpQLabel->setMinimumSize(tmpQLabel->sizeHint());
mainlayout->addWidget(tmpQLabel, 1);
@@ -2711,22 +2711,22 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
commentEdit->setFixedHeight( fontHeight );
mainlayout->addWidget(commentEdit, 1);
- cbAutoEmbed = new QCheckBox( i18n("Left click previews"), d->m_frame, "cbAutoEmbed" );
+ cbAutoEmbed = new TQCheckBox( i18n("Left click previews"), d->m_frame, "cbAutoEmbed" );
mainlayout->addWidget(cbAutoEmbed, 1);
mainlayout->addStretch (10);
mainlayout->activate();
- QFile f( _props->kurl().path() );
+ TQFile f( _props->kurl().path() );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KSimpleConfig config( _props->kurl().path() );
config.setDesktopGroup();
- QString patternStr = config.readEntry( "Patterns" );
- QString iconStr = config.readEntry( "Icon" );
- QString commentStr = config.readEntry( "Comment" );
+ TQString patternStr = config.readEntry( "Patterns" );
+ TQString iconStr = config.readEntry( "Icon" );
+ TQString commentStr = config.readEntry( "Comment" );
m_sMimeStr = config.readEntry( "MimeType" );
if ( !patternStr.isEmpty() )
@@ -2741,14 +2741,14 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
else
cbAutoEmbed->setNoChange();
- connect( patternEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( commentEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( mimeEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( cbAutoEmbed, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
+ connect( patternEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( mimeEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( cbAutoEmbed, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
}
KBindingPropsPlugin::~KBindingPropsPlugin()
@@ -2756,7 +2756,7 @@ KBindingPropsPlugin::~KBindingPropsPlugin()
delete d;
}
-// QString KBindingPropsPlugin::tabName () const
+// TQString KBindingPropsPlugin::tabName () const
// {
// return i18n ("A&ssociation");
// }
@@ -2777,8 +2777,8 @@ bool KBindingPropsPlugin::supports( KFileItemList _items )
void KBindingPropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
- QFile f( path );
+ TQString path = properties->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) )
{
@@ -2790,14 +2790,14 @@ void KBindingPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("MimeType") );
+ config.writeEntry( "Type", TQString::fromLatin1("MimeType") );
config.writeEntry( "Patterns", patternEdit->text() );
config.writeEntry( "Comment", commentEdit->text() );
config.writeEntry( "Comment",
commentEdit->text(), true, false, true ); // for compat
config.writeEntry( "MimeType", mimeEdit->text() );
- if ( cbAutoEmbed->state() == QButton::NoChange )
+ if ( cbAutoEmbed->state() == TQButton::NoChange )
config.deleteEntry( "X-KDE-AutoEmbed", false );
else
config.writeEntry( "X-KDE-AutoEmbed", cbAutoEmbed->isChecked() );
@@ -2820,11 +2820,11 @@ public:
{
}
- QFrame *m_frame;
- QStringList mountpointlist;
- QLabel *m_freeSpaceText;
- QLabel *m_freeSpaceLabel;
- QProgressBar *m_freeSpaceBar;
+ TQFrame *m_frame;
+ TQStringList mountpointlist;
+ TQLabel *m_freeSpaceText;
+ TQLabel *m_freeSpaceLabel;
+ TQProgressBar *m_freeSpaceBar;
};
KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgPlugin( _props )
@@ -2832,73 +2832,73 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
d = new KDevicePropsPluginPrivate;
d->m_frame = properties->addPage(i18n("De&vice"));
- QStringList devices;
+ TQStringList devices;
KMountPoint::List mountPoints = KMountPoint::possibleMountPoints();
for(KMountPoint::List::ConstIterator it = mountPoints.begin();
it != mountPoints.end(); ++it)
{
KMountPoint *mp = *it;
- QString mountPoint = mp->mountPoint();
- QString device = mp->mountedFrom();
+ TQString mountPoint = mp->mountPoint();
+ TQString device = mp->mountedFrom();
kdDebug()<<"mountPoint :"<<mountPoint<<" device :"<<device<<" mp->mountType() :"<<mp->mountType()<<endl;
if ((mountPoint != "-") && (mountPoint != "none") && !mountPoint.isEmpty()
&& device != "none")
{
- devices.append( device + QString::fromLatin1(" (")
- + mountPoint + QString::fromLatin1(")") );
+ devices.append( device + TQString::fromLatin1(" (")
+ + mountPoint + TQString::fromLatin1(")") );
m_devicelist.append(device);
d->mountpointlist.append(mountPoint);
}
}
- QGridLayout *layout = new QGridLayout( d->m_frame, 0, 2, 0,
+ TQGridLayout *layout = new TQGridLayout( d->m_frame, 0, 2, 0,
KDialog::spacingHint());
layout->setColStretch(1, 1);
- QLabel* label;
- label = new QLabel( d->m_frame );
+ TQLabel* label;
+ label = new TQLabel( d->m_frame );
label->setText( devices.count() == 0 ?
i18n("Device (/dev/fd0):") : // old style
i18n("Device:") ); // new style (combobox)
layout->addWidget(label, 0, 0);
- device = new QComboBox( true, d->m_frame, "ComboBox_device" );
+ device = new TQComboBox( true, d->m_frame, "ComboBox_device" );
device->insertStringList( devices );
layout->addWidget(device, 0, 1);
- connect( device, SIGNAL( activated( int ) ),
- this, SLOT( slotActivated( int ) ) );
+ connect( device, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotActivated( int ) ) );
- readonly = new QCheckBox( d->m_frame, "CheckBox_readonly" );
+ readonly = new TQCheckBox( d->m_frame, "CheckBox_readonly" );
readonly->setText( i18n("Read only") );
layout->addWidget(readonly, 1, 1);
- label = new QLabel( d->m_frame );
+ label = new TQLabel( d->m_frame );
label->setText( i18n("File system:") );
layout->addWidget(label, 2, 0);
- QLabel *fileSystem = new QLabel( d->m_frame );
+ TQLabel *fileSystem = new TQLabel( d->m_frame );
layout->addWidget(fileSystem, 2, 1);
- label = new QLabel( d->m_frame );
+ label = new TQLabel( d->m_frame );
label->setText( devices.count()==0 ?
i18n("Mount point (/mnt/floppy):") : // old style
i18n("Mount point:")); // new style (combobox)
layout->addWidget(label, 3, 0);
- mountpoint = new QLabel( d->m_frame, "LineEdit_mountpoint" );
+ mountpoint = new TQLabel( d->m_frame, "LineEdit_mountpoint" );
layout->addWidget(mountpoint, 3, 1);
// show disk free
- d->m_freeSpaceText = new QLabel(i18n("Free disk space:"), d->m_frame );
+ d->m_freeSpaceText = new TQLabel(i18n("Free disk space:"), d->m_frame );
layout->addWidget(d->m_freeSpaceText, 4, 0);
- d->m_freeSpaceLabel = new QLabel( d->m_frame );
+ d->m_freeSpaceLabel = new TQLabel( d->m_frame );
layout->addWidget( d->m_freeSpaceLabel, 4, 1 );
- d->m_freeSpaceBar = new QProgressBar( d->m_frame, "freeSpaceBar" );
+ d->m_freeSpaceBar = new TQProgressBar( d->m_frame, "freeSpaceBar" );
layout->addMultiCellWidget(d->m_freeSpaceBar, 5, 5, 0, 1);
// we show it in the slot when we know the values
@@ -2910,29 +2910,29 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
layout->addMultiCellWidget(sep, 6, 6, 0, 1);
unmounted = new KIconButton( d->m_frame );
- int bsize = 66 + 2 * unmounted->style().pixelMetric(QStyle::PM_ButtonMargin);
+ int bsize = 66 + 2 * unmounted->style().pixelMetric(TQStyle::PM_ButtonMargin);
unmounted->setFixedSize(bsize, bsize);
unmounted->setIconType(KIcon::Desktop, KIcon::Device);
layout->addWidget(unmounted, 7, 0);
- label = new QLabel( i18n("Unmounted Icon"), d->m_frame );
+ label = new TQLabel( i18n("Unmounted Icon"), d->m_frame );
layout->addWidget(label, 7, 1);
layout->setRowStretch(8, 1);
- QString path( _props->kurl().path() );
+ TQString path( _props->kurl().path() );
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KSimpleConfig config( path );
config.setDesktopGroup();
- QString deviceStr = config.readEntry( "Dev" );
- QString mountPointStr = config.readEntry( "MountPoint" );
+ TQString deviceStr = config.readEntry( "Dev" );
+ TQString mountPointStr = config.readEntry( "MountPoint" );
bool ro = config.readBoolEntry( "ReadOnly", false );
- QString unmountedStr = config.readEntry( "UnmountIcon" );
+ TQString unmountedStr = config.readEntry( "UnmountIcon" );
fileSystem->setText( i18n(config.readEntry("FSType").local8Bit()) );
@@ -2960,17 +2960,17 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
unmounted->setIcon( unmountedStr );
- connect( device, SIGNAL( activated( int ) ),
- this, SIGNAL( changed() ) );
- connect( device, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( readonly, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( unmounted, SIGNAL( iconChanged( QString ) ),
- this, SIGNAL( changed() ) );
-
- connect( device, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( slotDeviceChanged() ) );
+ connect( device, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( device, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( readonly, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( unmounted, TQT_SIGNAL( iconChanged( TQString ) ),
+ this, TQT_SIGNAL( changed() ) );
+
+ connect( device, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( slotDeviceChanged() ) );
}
KDevicePropsPlugin::~KDevicePropsPlugin()
@@ -2978,7 +2978,7 @@ KDevicePropsPlugin::~KDevicePropsPlugin()
delete d;
}
-// QString KDevicePropsPlugin::tabName () const
+// TQString KDevicePropsPlugin::tabName () const
// {
// return i18n ("De&vice");
// }
@@ -2993,10 +2993,10 @@ void KDevicePropsPlugin::updateInfo()
if ( !mountpoint->text().isEmpty() )
{
KDiskFreeSp * job = new KDiskFreeSp;
- connect( job, SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ),
- this, SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ) );
+ connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ),
+ this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ) );
job->readDF( mountpoint->text() );
}
@@ -3018,7 +3018,7 @@ void KDevicePropsPlugin::slotDeviceChanged()
if ( index != -1 )
mountpoint->setText( d->mountpointlist[index] );
else
- mountpoint->setText( QString::null );
+ mountpoint->setText( TQString::null );
updateInfo();
}
@@ -3026,7 +3026,7 @@ void KDevicePropsPlugin::slotDeviceChanged()
void KDevicePropsPlugin::slotFoundMountPoint( const unsigned long& kBSize,
const unsigned long& /*kBUsed*/,
const unsigned long& kBAvail,
- const QString& )
+ const TQString& )
{
d->m_freeSpaceText->show();
d->m_freeSpaceLabel->show();
@@ -3059,8 +3059,8 @@ bool KDevicePropsPlugin::supports( KFileItemList _items )
void KDevicePropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
- QFile f( path );
+ TQString path = properties->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) )
{
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have sufficient "
@@ -3071,7 +3071,7 @@ void KDevicePropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("FSDevice") );
+ config.writeEntry( "Type", TQString::fromLatin1("FSDevice") );
config.writeEntry( "Dev", device->currentText() );
config.writeEntry( "MountPoint", mountpoint->text() );
@@ -3095,13 +3095,13 @@ void KDevicePropsPlugin::applyChanges()
KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
: KPropsDlgPlugin( _props )
{
- QFrame *frame = properties->addPage(i18n("&Application"));
- QVBoxLayout *mainlayout = new QVBoxLayout( frame, 0, KDialog::spacingHint() );
+ TQFrame *frame = properties->addPage(i18n("&Application"));
+ TQVBoxLayout *mainlayout = new TQVBoxLayout( frame, 0, KDialog::spacingHint() );
w = new KPropertiesDesktopBase(frame);
mainlayout->addWidget(w);
- bool bKDesktopMode = (QCString(qApp->name()) == "kdesktop"); // nasty heh?
+ bool bKDesktopMode = (TQCString(qApp->name()) == "kdesktop"); // nasty heh?
if (bKDesktopMode)
{
@@ -3113,29 +3113,29 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
w->pathEdit->setMode(KFile::Directory | KFile::LocalOnly);
w->pathEdit->lineEdit()->setAcceptDrops(false);
- connect( w->nameEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->genNameEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->commentEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->commandEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->pathEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
+ connect( w->nameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->genNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->commandEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->pathEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
- connect( w->browseButton, SIGNAL( clicked() ), this, SLOT( slotBrowseExec() ) );
- connect( w->addFiletypeButton, SIGNAL( clicked() ), this, SLOT( slotAddFiletype() ) );
- connect( w->delFiletypeButton, SIGNAL( clicked() ), this, SLOT( slotDelFiletype() ) );
- connect( w->advancedButton, SIGNAL( clicked() ), this, SLOT( slotAdvanced() ) );
+ connect( w->browseButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowseExec() ) );
+ connect( w->addFiletypeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddFiletype() ) );
+ connect( w->delFiletypeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDelFiletype() ) );
+ connect( w->advancedButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAdvanced() ) );
// now populate the page
- QString path = _props->kurl().path();
- QFile f( path );
+ TQString path = _props->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KDesktopFile config( path );
- QString nameStr = config.readName();
- QString genNameStr = config.readGenericName();
- QString commentStr = config.readComment();
- QString commandStr = config.readPathEntry( "Exec" );
+ TQString nameStr = config.readName();
+ TQString genNameStr = config.readGenericName();
+ TQString commentStr = config.readComment();
+ TQString commandStr = config.readPathEntry( "Exec" );
if (commandStr.left(12) == "ksystraycmd ")
{
commandStr.remove(0, 12);
@@ -3145,7 +3145,7 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
m_systrayBool = false;
m_origCommandStr = commandStr;
- QString pathStr = config.readPathEntry( "Path" );
+ TQString pathStr = config.readPathEntry( "Path" );
m_terminalBool = config.readBoolEntry( "Terminal" );
m_terminalOptionStr = config.readEntry( "TerminalOptions" );
m_suidBool = config.readBoolEntry( "X-KDE-SubstituteUID" );
@@ -3156,7 +3156,7 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
m_startupBool = config.readBoolEntry( "X-KDE-StartupNotify", true );
m_dcopServiceType = config.readEntry("X-DCOP-ServiceType").lower();
- QStringList mimeTypes = config.readListEntry( "MimeType", ';' );
+ TQStringList mimeTypes = config.readListEntry( "MimeType", ';' );
if ( nameStr.isEmpty() || bKDesktopMode ) {
// We'll use the file name if no name is specified
@@ -3174,12 +3174,12 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
w->filetypeList->setAllColumnsShowFocus(true);
KMimeType::Ptr defaultMimetype = KMimeType::defaultMimeTypePtr();
- for(QStringList::ConstIterator it = mimeTypes.begin();
+ for(TQStringList::ConstIterator it = mimeTypes.begin();
it != mimeTypes.end(); )
{
KMimeType::Ptr p = KMimeType::mimeType(*it);
++it;
- QString preference;
+ TQString preference;
if (it != mimeTypes.end())
{
bool numeric;
@@ -3192,7 +3192,7 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
}
if (p && (p != defaultMimetype))
{
- new QListViewItem(w->filetypeList, p->name(), p->comment(), preference);
+ new TQListViewItem(w->filetypeList, p->name(), p->comment(), preference);
}
}
@@ -3204,8 +3204,8 @@ KDesktopPropsPlugin::~KDesktopPropsPlugin()
void KDesktopPropsPlugin::slotSelectMimetype()
{
- QListView *w = (QListView*)sender();
- QListViewItem *item = w->firstChild();
+ TQListView *w = (TQListView*)sender();
+ TQListViewItem *item = w->firstChild();
while(item)
{
if (item->isSelected())
@@ -3220,7 +3220,7 @@ void KDesktopPropsPlugin::slotAddFiletype()
i18n("Add File Type for %1").arg(properties->kurl().fileName()),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok);
- KGuiItem okItem(i18n("&Add"), QString::null /* no icon */,
+ KGuiItem okItem(i18n("&Add"), TQString::null /* no icon */,
i18n("Add the selected file types to\nthe list of supported file types."),
i18n("Add the selected file types to\nthe list of supported file types."));
dlg.setButtonOK(okItem);
@@ -3231,31 +3231,31 @@ void KDesktopPropsPlugin::slotAddFiletype()
{
mw->listView->setRootIsDecorated(true);
- mw->listView->setSelectionMode(QListView::Extended);
+ mw->listView->setSelectionMode(TQListView::Extended);
mw->listView->setAllColumnsShowFocus(true);
mw->listView->setFullWidth(true);
mw->listView->setMinimumSize(500,400);
- connect(mw->listView, SIGNAL(selectionChanged()),
- this, SLOT(slotSelectMimetype()));
- connect(mw->listView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )),
- &dlg, SLOT( slotOk()));
+ connect(mw->listView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotSelectMimetype()));
+ connect(mw->listView, TQT_SIGNAL(doubleClicked( TQListViewItem *, const TQPoint &, int )),
+ &dlg, TQT_SLOT( slotOk()));
- QMap<QString,QListViewItem*> majorMap;
- QListViewItem *majorGroup;
+ TQMap<TQString,TQListViewItem*> majorMap;
+ TQListViewItem *majorGroup;
KMimeType::List mimetypes = KMimeType::allMimeTypes();
- QValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
+ TQValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
for (; it != mimetypes.end(); ++it) {
- QString mimetype = (*it)->name();
+ TQString mimetype = (*it)->name();
if (mimetype == KMimeType::defaultMimeType())
continue;
int index = mimetype.find("/");
- QString maj = mimetype.left(index);
- QString min = mimetype.mid(index+1);
+ TQString maj = mimetype.left(index);
+ TQString min = mimetype.mid(index+1);
- QMapIterator<QString,QListViewItem*> mit = majorMap.find( maj );
+ TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( maj );
if ( mit == majorMap.end() ) {
- majorGroup = new QListViewItem( mw->listView, maj );
+ majorGroup = new TQListViewItem( mw->listView, maj );
majorGroup->setExpandable(true);
mw->listView->setOpen(majorGroup, true);
majorMap.insert( maj, majorGroup );
@@ -3265,10 +3265,10 @@ void KDesktopPropsPlugin::slotAddFiletype()
majorGroup = mit.data();
}
- QListViewItem *item = new QListViewItem(majorGroup, min, (*it)->comment());
+ TQListViewItem *item = new TQListViewItem(majorGroup, min, (*it)->comment());
item->setPixmap(0, (*it)->pixmap(KIcon::Small, IconSize(KIcon::Small)));
}
- QMapIterator<QString,QListViewItem*> mit = majorMap.find( "all" );
+ TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( "all" );
if ( mit != majorMap.end())
{
mw->listView->setCurrentItem(mit.data());
@@ -3279,23 +3279,23 @@ void KDesktopPropsPlugin::slotAddFiletype()
if (dlg.exec() == KDialogBase::Accepted)
{
KMimeType::Ptr defaultMimetype = KMimeType::defaultMimeTypePtr();
- QListViewItem *majorItem = mw->listView->firstChild();
+ TQListViewItem *majorItem = mw->listView->firstChild();
while(majorItem)
{
- QString major = majorItem->text(0);
+ TQString major = majorItem->text(0);
- QListViewItem *minorItem = majorItem->firstChild();
+ TQListViewItem *minorItem = majorItem->firstChild();
while(minorItem)
{
if (minorItem->isSelected())
{
- QString mimetype = major + "/" + minorItem->text(0);
+ TQString mimetype = major + "/" + minorItem->text(0);
KMimeType::Ptr p = KMimeType::mimeType(mimetype);
if (p && (p != defaultMimetype))
{
mimetype = p->name();
bool found = false;
- QListViewItem *item = w->filetypeList->firstChild();
+ TQListViewItem *item = w->filetypeList->firstChild();
while (item)
{
if (mimetype == item->text(0))
@@ -3306,7 +3306,7 @@ void KDesktopPropsPlugin::slotAddFiletype()
item = item->nextSibling();
}
if (!found) {
- new QListViewItem(w->filetypeList, p->name(), p->comment());
+ new TQListViewItem(w->filetypeList, p->name(), p->comment());
emit changed();
}
}
@@ -3331,17 +3331,17 @@ void KDesktopPropsPlugin::checkCommandChanged()
if (KRun::binaryName(w->commandEdit->text(), true) !=
KRun::binaryName(m_origCommandStr, true))
{
- QString m_origCommandStr = w->commandEdit->text();
- m_dcopServiceType= QString::null; // Reset
+ TQString m_origCommandStr = w->commandEdit->text();
+ m_dcopServiceType= TQString::null; // Reset
}
}
void KDesktopPropsPlugin::applyChanges()
{
kdDebug(250) << "KDesktopPropsPlugin::applyChanges" << endl;
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have "
@@ -3356,7 +3356,7 @@ void KDesktopPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Application"));
+ config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writeEntry( "Comment", w->commentEdit->text() );
config.writeEntry( "Comment", w->commentEdit->text(), true, false, true ); // for compat
config.writeEntry( "GenericName", w->genNameEdit->text() );
@@ -3369,11 +3369,11 @@ void KDesktopPropsPlugin::applyChanges()
config.writePathEntry( "Path", w->pathEdit->lineEdit()->text() );
// Write mimeTypes
- QStringList mimeTypes;
- for( QListViewItem *item = w->filetypeList->firstChild();
+ TQStringList mimeTypes;
+ for( TQListViewItem *item = w->filetypeList->firstChild();
item; item = item->nextSibling() )
{
- QString preference = item->text(2);
+ TQString preference = item->text(2);
mimeTypes.append(item->text(0));
if (!preference.isEmpty())
mimeTypes.append(preference);
@@ -3382,7 +3382,7 @@ void KDesktopPropsPlugin::applyChanges()
config.writeEntry( "MimeType", mimeTypes, ';' );
if ( !w->nameEdit->isHidden() ) {
- QString nameStr = w->nameEdit->text();
+ TQString nameStr = w->nameEdit->text();
config.writeEntry( "Name", nameStr );
config.writeEntry( "Name", nameStr, true, false, true );
}
@@ -3396,7 +3396,7 @@ void KDesktopPropsPlugin::applyChanges()
config.sync();
// KSycoca update needed?
- QString sycocaPath = KGlobal::dirs()->relativeLocation("apps", path);
+ TQString sycocaPath = KGlobal::dirs()->relativeLocation("apps", path);
bool updateNeeded = !sycocaPath.startsWith("/");
if (!updateNeeded)
{
@@ -3410,8 +3410,8 @@ void KDesktopPropsPlugin::applyChanges()
void KDesktopPropsPlugin::slotBrowseExec()
{
- KURL f = KFileDialog::getOpenURL( QString::null,
- QString::null, w );
+ KURL f = KFileDialog::getOpenURL( TQString::null,
+ TQString::null, w );
if ( f.isEmpty() )
return;
@@ -3420,7 +3420,7 @@ void KDesktopPropsPlugin::slotBrowseExec()
return;
}
- QString path = f.path();
+ TQString path = f.path();
KRun::shellQuote( path );
w->commandEdit->setText( path );
}
@@ -3440,9 +3440,9 @@ void KDesktopPropsPlugin::slotAdvanced()
// check to see if we use konsole if not do not add the nocloseonexit
// because we don't know how to do this on other terminal applications
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- QString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
- QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
+ TQString::fromLatin1("konsole"));
bool terminalCloseBool = false;
@@ -3487,7 +3487,7 @@ void KDesktopPropsPlugin::slotAdvanced()
int i, maxEntries = 1000;
setpwent();
for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++)
- kcom->addItem(QString::fromLatin1(pw->pw_name));
+ kcom->addItem(TQString::fromLatin1(pw->pw_name));
endpwent();
if (i < maxEntries)
{
@@ -3500,24 +3500,24 @@ void KDesktopPropsPlugin::slotAdvanced()
delete kcom;
}
- connect( w->terminalEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( w->terminalCloseCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->terminalCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->suidCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->suidEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( w->startupInfoCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->systrayCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->dcopCombo, SIGNAL( highlighted( int ) ),
- this, SIGNAL( changed() ) );
-
- if ( dlg.exec() == QDialog::Accepted )
+ connect( w->terminalEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->terminalCloseCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->terminalCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->suidCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->suidEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->startupInfoCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->systrayCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->dcopCombo, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SIGNAL( changed() ) );
+
+ if ( dlg.exec() == TQDialog::Accepted )
{
m_terminalOptionStr = w->terminalEdit->text().stripWhiteSpace();
m_terminalBool = w->terminalCheck->isChecked();
@@ -3579,8 +3579,8 @@ public:
{
}
- QFrame *m_frame;
- QCheckBox *nocloseonexitCheck;
+ TQFrame *m_frame;
+ TQCheckBox *nocloseonexitCheck;
};
KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
@@ -3588,21 +3588,21 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
{
d = new KExecPropsPluginPrivate;
d->m_frame = properties->addPage(i18n("E&xecute"));
- QVBoxLayout * mainlayout = new QVBoxLayout( d->m_frame, 0,
+ TQVBoxLayout * mainlayout = new TQVBoxLayout( d->m_frame, 0,
KDialog::spacingHint());
// Now the widgets in the top layout
- QLabel* l;
- l = new QLabel( i18n( "Comman&d:" ), d->m_frame );
+ TQLabel* l;
+ l = new TQLabel( i18n( "Comman&d:" ), d->m_frame );
mainlayout->addWidget(l);
- QHBoxLayout * hlayout;
- hlayout = new QHBoxLayout(KDialog::spacingHint());
+ TQHBoxLayout * hlayout;
+ hlayout = new TQHBoxLayout(KDialog::spacingHint());
mainlayout->addLayout(hlayout);
execEdit = new KLineEdit( d->m_frame );
- QWhatsThis::add(execEdit,i18n(
+ TQWhatsThis::add(execEdit,i18n(
"Following the command, you can have several place holders which will be replaced "
"with the actual values when the actual program is run:\n"
"%f - a single file name\n"
@@ -3618,22 +3618,22 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
l->setBuddy( execEdit );
- execBrowse = new QPushButton( d->m_frame );
+ execBrowse = new TQPushButton( d->m_frame );
execBrowse->setText( i18n("&Browse...") );
hlayout->addWidget(execBrowse);
// The groupbox about swallowing
- QGroupBox* tmpQGroupBox;
- tmpQGroupBox = new QGroupBox( i18n("Panel Embedding"), d->m_frame );
+ TQGroupBox* tmpQGroupBox;
+ tmpQGroupBox = new TQGroupBox( i18n("Panel Embedding"), d->m_frame );
tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal );
mainlayout->addWidget(tmpQGroupBox);
- QGridLayout *grid = new QGridLayout(tmpQGroupBox->layout(), 2, 2);
+ TQGridLayout *grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2);
grid->setSpacing( KDialog::spacingHint() );
grid->setColStretch(1, 1);
- l = new QLabel( i18n( "&Execute on click:" ), tmpQGroupBox );
+ l = new TQLabel( i18n( "&Execute on click:" ), tmpQGroupBox );
grid->addWidget(l, 0, 0);
swallowExecEdit = new KLineEdit( tmpQGroupBox );
@@ -3641,7 +3641,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
l->setBuddy( swallowExecEdit );
- l = new QLabel( i18n( "&Window title:" ), tmpQGroupBox );
+ l = new TQLabel( i18n( "&Window title:" ), tmpQGroupBox );
grid->addWidget(l, 1, 0);
swallowTitleEdit = new KLineEdit( tmpQGroupBox );
@@ -3651,36 +3651,36 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
// The groupbox about run in terminal
- tmpQGroupBox = new QGroupBox( d->m_frame );
+ tmpQGroupBox = new TQGroupBox( d->m_frame );
tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal );
mainlayout->addWidget(tmpQGroupBox);
- grid = new QGridLayout(tmpQGroupBox->layout(), 3, 2);
+ grid = new TQGridLayout(tmpQGroupBox->layout(), 3, 2);
grid->setSpacing( KDialog::spacingHint() );
grid->setColStretch(1, 1);
- terminalCheck = new QCheckBox( tmpQGroupBox );
+ terminalCheck = new TQCheckBox( tmpQGroupBox );
terminalCheck->setText( i18n("&Run in terminal") );
grid->addMultiCellWidget(terminalCheck, 0, 0, 0, 1);
// check to see if we use konsole if not do not add the nocloseonexit
// because we don't know how to do this on other terminal applications
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- QString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
- QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
+ TQString::fromLatin1("konsole"));
int posOptions = 1;
d->nocloseonexitCheck = 0L;
if (preferredTerminal == "konsole")
{
posOptions = 2;
- d->nocloseonexitCheck = new QCheckBox( tmpQGroupBox );
+ d->nocloseonexitCheck = new TQCheckBox( tmpQGroupBox );
d->nocloseonexitCheck->setText( i18n("Do not &close when command exits") );
grid->addMultiCellWidget(d->nocloseonexitCheck, 1, 1, 0, 1);
}
- terminalLabel = new QLabel( i18n( "&Terminal options:" ), tmpQGroupBox );
+ terminalLabel = new TQLabel( i18n( "&Terminal options:" ), tmpQGroupBox );
grid->addWidget(terminalLabel, posOptions, 0);
terminalEdit = new KLineEdit( tmpQGroupBox );
@@ -3690,20 +3690,20 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
// The groupbox about run with substituted uid.
- tmpQGroupBox = new QGroupBox( d->m_frame );
+ tmpQGroupBox = new TQGroupBox( d->m_frame );
tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal );
mainlayout->addWidget(tmpQGroupBox);
- grid = new QGridLayout(tmpQGroupBox->layout(), 2, 2);
+ grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2);
grid->setSpacing(KDialog::spacingHint());
grid->setColStretch(1, 1);
- suidCheck = new QCheckBox(tmpQGroupBox);
+ suidCheck = new TQCheckBox(tmpQGroupBox);
suidCheck->setText(i18n("Ru&n as a different user"));
grid->addMultiCellWidget(suidCheck, 0, 0, 0, 1);
- suidLabel = new QLabel(i18n( "&Username:" ), tmpQGroupBox);
+ suidLabel = new TQLabel(i18n( "&Username:" ), tmpQGroupBox);
grid->addWidget(suidLabel, 1, 0);
suidEdit = new KLineEdit(tmpQGroupBox);
@@ -3714,8 +3714,8 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
mainlayout->addStretch(1);
// now populate the page
- QString path = _props->kurl().path();
- QFile f( path );
+ TQString path = _props->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
@@ -3761,7 +3761,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
int i, maxEntries = 1000;
setpwent();
for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++)
- kcom->addItem(QString::fromLatin1(pw->pw_name));
+ kcom->addItem(TQString::fromLatin1(pw->pw_name));
endpwent();
if (i < maxEntries)
{
@@ -3774,27 +3774,27 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
delete kcom;
}
- connect( swallowExecEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( swallowTitleEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( execEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( terminalEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( swallowExecEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( swallowTitleEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( execEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( terminalEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
if (d->nocloseonexitCheck)
- connect( d->nocloseonexitCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( terminalCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( suidCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( suidEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
-
- connect( execBrowse, SIGNAL( clicked() ), this, SLOT( slotBrowseExec() ) );
- connect( terminalCheck, SIGNAL( clicked() ), this, SLOT( enableCheckedEdit() ) );
- connect( suidCheck, SIGNAL( clicked() ), this, SLOT( enableSuidEdit() ) );
+ connect( d->nocloseonexitCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( terminalCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( suidCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( suidEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+
+ connect( execBrowse, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowseExec() ) );
+ connect( terminalCheck, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableCheckedEdit() ) );
+ connect( suidCheck, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableSuidEdit() ) );
}
@@ -3835,9 +3835,9 @@ bool KExecPropsPlugin::supports( KFileItemList _items )
void KExecPropsPlugin::applyChanges()
{
kdDebug(250) << "KExecPropsPlugin::applyChanges" << endl;
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have "
@@ -3848,15 +3848,15 @@ void KExecPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Application"));
+ config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writePathEntry( "Exec", execEdit->text() );
config.writePathEntry( "SwallowExec", swallowExecEdit->text() );
config.writeEntry( "SwallowTitle", swallowTitleEdit->text() );
config.writeEntry( "Terminal", terminalCheck->isChecked() );
- QString temp = terminalEdit->text();
+ TQString temp = terminalEdit->text();
if (d->nocloseonexitCheck )
if ( d->nocloseonexitCheck->isChecked() )
- temp += QString::fromLatin1("--noclose ");
+ temp += TQString::fromLatin1("--noclose ");
temp = temp.stripWhiteSpace();
config.writeEntry( "TerminalOptions", temp );
config.writeEntry( "X-KDE-SubstituteUID", suidCheck->isChecked() );
@@ -3866,8 +3866,8 @@ void KExecPropsPlugin::applyChanges()
void KExecPropsPlugin::slotBrowseExec()
{
- KURL f = KFileDialog::getOpenURL( QString::null,
- QString::null, d->m_frame );
+ KURL f = KFileDialog::getOpenURL( TQString::null,
+ TQString::null, d->m_frame );
if ( f.isEmpty() )
return;
@@ -3876,7 +3876,7 @@ void KExecPropsPlugin::slotBrowseExec()
return;
}
- QString path = f.path();
+ TQString path = f.path();
KRun::shellQuote( path );
execEdit->setText( path );
}
@@ -3886,13 +3886,13 @@ class KApplicationPropsPlugin::KApplicationPropsPluginPrivate
public:
KApplicationPropsPluginPrivate()
{
- m_kdesktopMode = QCString(qApp->name()) == "kdesktop"; // nasty heh?
+ m_kdesktopMode = TQCString(qApp->name()) == "kdesktop"; // nasty heh?
}
~KApplicationPropsPluginPrivate()
{
}
- QFrame *m_frame;
+ TQFrame *m_frame;
bool m_kdesktopMode;
};
@@ -3901,29 +3901,29 @@ KApplicationPropsPlugin::KApplicationPropsPlugin( KPropertiesDialog *_props )
{
d = new KApplicationPropsPluginPrivate;
d->m_frame = properties->addPage(i18n("&Application"));
- QVBoxLayout *toplayout = new QVBoxLayout( d->m_frame, 0, KDialog::spacingHint());
+ TQVBoxLayout *toplayout = new TQVBoxLayout( d->m_frame, 0, KDialog::spacingHint());
- QIconSet iconSet;
- QPixmap pixMap;
+ TQIconSet iconSet;
+ TQPixmap pixMap;
- addExtensionButton = new QPushButton( QString::null, d->m_frame );
+ addExtensionButton = new TQPushButton( TQString::null, d->m_frame );
iconSet = SmallIconSet( "back" );
addExtensionButton->setIconSet( iconSet );
- pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
addExtensionButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- connect( addExtensionButton, SIGNAL( clicked() ),
- SLOT( slotAddExtension() ) );
+ connect( addExtensionButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotAddExtension() ) );
- delExtensionButton = new QPushButton( QString::null, d->m_frame );
+ delExtensionButton = new TQPushButton( TQString::null, d->m_frame );
iconSet = SmallIconSet( "forward" );
delExtensionButton->setIconSet( iconSet );
delExtensionButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- connect( delExtensionButton, SIGNAL( clicked() ),
- SLOT( slotDelExtension() ) );
+ connect( delExtensionButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotDelExtension() ) );
- QLabel *l;
+ TQLabel *l;
- QGridLayout *grid = new QGridLayout(2, 2);
+ TQGridLayout *grid = new TQGridLayout(2, 2);
grid->setColStretch(1, 1);
toplayout->addLayout(grid);
@@ -3934,61 +3934,61 @@ KApplicationPropsPlugin::KApplicationPropsPlugin( KPropertiesDialog *_props )
}
else
{
- l = new QLabel(i18n("Name:"), d->m_frame, "Label_4" );
+ l = new TQLabel(i18n("Name:"), d->m_frame, "Label_4" );
grid->addWidget(l, 0, 0);
nameEdit = new KLineEdit( d->m_frame, "LineEdit_3" );
grid->addWidget(nameEdit, 0, 1);
}
- l = new QLabel(i18n("Description:"), d->m_frame, "Label_5" );
+ l = new TQLabel(i18n("Description:"), d->m_frame, "Label_5" );
grid->addWidget(l, 1, 0);
genNameEdit = new KLineEdit( d->m_frame, "LineEdit_4" );
grid->addWidget(genNameEdit, 1, 1);
- l = new QLabel(i18n("Comment:"), d->m_frame, "Label_3" );
+ l = new TQLabel(i18n("Comment:"), d->m_frame, "Label_3" );
grid->addWidget(l, 2, 0);
commentEdit = new KLineEdit( d->m_frame, "LineEdit_2" );
grid->addWidget(commentEdit, 2, 1);
- l = new QLabel(i18n("File types:"), d->m_frame);
+ l = new TQLabel(i18n("File types:"), d->m_frame);
toplayout->addWidget(l, 0, AlignLeft);
- grid = new QGridLayout(4, 3);
+ grid = new TQGridLayout(4, 3);
grid->setColStretch(0, 1);
grid->setColStretch(2, 1);
grid->setRowStretch( 0, 1 );
grid->setRowStretch( 3, 1 );
toplayout->addLayout(grid, 2);
- extensionsList = new QListBox( d->m_frame );
- extensionsList->setSelectionMode( QListBox::Extended );
+ extensionsList = new TQListBox( d->m_frame );
+ extensionsList->setSelectionMode( TQListBox::Extended );
grid->addMultiCellWidget(extensionsList, 0, 3, 0, 0);
grid->addWidget(addExtensionButton, 1, 1);
grid->addWidget(delExtensionButton, 2, 1);
- availableExtensionsList = new QListBox( d->m_frame );
- availableExtensionsList->setSelectionMode( QListBox::Extended );
+ availableExtensionsList = new TQListBox( d->m_frame );
+ availableExtensionsList->setSelectionMode( TQListBox::Extended );
grid->addMultiCellWidget(availableExtensionsList, 0, 3, 2, 2);
- QString path = properties->kurl().path() ;
- QFile f( path );
+ TQString path = properties->kurl().path() ;
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KDesktopFile config( path );
- QString commentStr = config.readComment();
- QString genNameStr = config.readGenericName();
+ TQString commentStr = config.readComment();
+ TQString genNameStr = config.readGenericName();
- QStringList selectedTypes = config.readListEntry( "ServiceTypes" );
+ TQStringList selectedTypes = config.readListEntry( "ServiceTypes" );
// For compatibility with KDE 1.x
selectedTypes += config.readListEntry( "MimeType", ';' );
- QString nameStr = config.readName();
+ TQString nameStr = config.readName();
if ( nameStr.isEmpty() || d->m_kdesktopMode ) {
// We'll use the file name if no name is specified
// because we _need_ a Name for a valid file.
@@ -4002,39 +4002,39 @@ KApplicationPropsPlugin::KApplicationPropsPlugin( KPropertiesDialog *_props )
nameEdit->setText( nameStr );
selectedTypes.sort();
- QStringList::Iterator sit = selectedTypes.begin();
+ TQStringList::Iterator sit = selectedTypes.begin();
for( ; sit != selectedTypes.end(); ++sit ) {
if ( !((*sit).isEmpty()) )
extensionsList->insertItem( *sit );
}
KMimeType::List mimeTypes = KMimeType::allMimeTypes();
- QValueListIterator<KMimeType::Ptr> it2 = mimeTypes.begin();
+ TQValueListIterator<KMimeType::Ptr> it2 = mimeTypes.begin();
for ( ; it2 != mimeTypes.end(); ++it2 )
addMimeType ( (*it2)->name() );
updateButton();
- connect( extensionsList, SIGNAL( highlighted( int ) ),
- this, SLOT( updateButton() ) );
- connect( availableExtensionsList, SIGNAL( highlighted( int ) ),
- this, SLOT( updateButton() ) );
+ connect( extensionsList, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SLOT( updateButton() ) );
+ connect( availableExtensionsList, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SLOT( updateButton() ) );
- connect( addExtensionButton, SIGNAL( clicked() ),
- this, SIGNAL( changed() ) );
- connect( delExtensionButton, SIGNAL( clicked() ),
- this, SIGNAL( changed() ) );
+ connect( addExtensionButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( delExtensionButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SIGNAL( changed() ) );
if ( nameEdit )
- connect( nameEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( commentEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( genNameEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( availableExtensionsList, SIGNAL( selected( int ) ),
- this, SIGNAL( changed() ) );
- connect( extensionsList, SIGNAL( selected( int ) ),
- this, SIGNAL( changed() ) );
+ connect( nameEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( genNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( availableExtensionsList, TQT_SIGNAL( selected( int ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( extensionsList, TQT_SIGNAL( selected( int ) ),
+ this, TQT_SIGNAL( changed() ) );
}
KApplicationPropsPlugin::~KApplicationPropsPlugin()
@@ -4042,7 +4042,7 @@ KApplicationPropsPlugin::~KApplicationPropsPlugin()
delete d;
}
-// QString KApplicationPropsPlugin::tabName () const
+// TQString KApplicationPropsPlugin::tabName () const
// {
// return i18n ("&Application");
// }
@@ -4053,7 +4053,7 @@ void KApplicationPropsPlugin::updateButton()
delExtensionButton->setEnabled(extensionsList->currentItem()>-1);
}
-void KApplicationPropsPlugin::addMimeType( const QString & name )
+void KApplicationPropsPlugin::addMimeType( const TQString & name )
{
// Add a mimetype to the list of available mime types if not in the extensionsList
@@ -4078,9 +4078,9 @@ bool KApplicationPropsPlugin::supports( KFileItemList _items )
void KApplicationPropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not "
@@ -4091,13 +4091,13 @@ void KApplicationPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Application"));
+ config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writeEntry( "Comment", commentEdit->text() );
config.writeEntry( "Comment", commentEdit->text(), true, false, true ); // for compat
config.writeEntry( "GenericName", genNameEdit->text() );
config.writeEntry( "GenericName", genNameEdit->text(), true, false, true ); // for compat
- QStringList selectedTypes;
+ TQStringList selectedTypes;
for ( uint i = 0; i < extensionsList->count(); i++ )
selectedTypes.append( extensionsList->text( i ) );
@@ -4105,7 +4105,7 @@ void KApplicationPropsPlugin::applyChanges()
config.writeEntry( "ServiceTypes", "" );
// hmm, actually it should probably be the contrary (but see also typeslistitem.cpp)
- QString nameStr = nameEdit ? nameEdit->text() : QString::null;
+ TQString nameStr = nameEdit ? nameEdit->text() : TQString::null;
if ( nameStr.isEmpty() ) // nothing entered, or widget not existing at all (kdesktop mode)
nameStr = nameFromFileName(properties->kurl().fileName());
@@ -4117,8 +4117,8 @@ void KApplicationPropsPlugin::applyChanges()
void KApplicationPropsPlugin::slotAddExtension()
{
- QListBoxItem *item = availableExtensionsList->firstItem();
- QListBoxItem *nextItem;
+ TQListBoxItem *item = availableExtensionsList->firstItem();
+ TQListBoxItem *nextItem;
while ( item )
{
@@ -4139,8 +4139,8 @@ void KApplicationPropsPlugin::slotAddExtension()
void KApplicationPropsPlugin::slotDelExtension()
{
- QListBoxItem *item = extensionsList->firstItem();
- QListBoxItem *nextItem;
+ TQListBoxItem *item = extensionsList->firstItem();
+ TQListBoxItem *nextItem;
while ( item )
{
diff --git a/kio/kfile/kpropertiesdialog.h b/kio/kfile/kpropertiesdialog.h
index b71ad7948..a83480c1c 100644
--- a/kio/kfile/kpropertiesdialog.h
+++ b/kio/kfile/kpropertiesdialog.h
@@ -28,8 +28,8 @@
#ifndef __propsdlg_h
#define __propsdlg_h
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdemacros.h>
#include <kurl.h>
@@ -95,7 +95,7 @@ public:
* @param autoShow tells the dialog whether it should show itself automatically.
*/
KPropertiesDialog( KFileItem * item,
- QWidget* parent = 0L, const char* name = 0L,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
/**
@@ -113,7 +113,7 @@ public:
* @param autoShow tells the dialog whether it should show itself automatically.
*/
KPropertiesDialog( KFileItemList _items,
- QWidget *parent = 0L, const char* name = 0L,
+ TQWidget *parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
#ifndef KDE_NO_COMPAT
@@ -128,7 +128,7 @@ public:
* @param modal tells the dialog whether it should be modal.
* @param autoShow tells the dialog whether it should show itself automatically. */
KPropertiesDialog( const KURL& _url, mode_t _mode,
- QWidget* parent = 0L, const char* name = 0L,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true) KDE_DEPRECATED;
#endif
@@ -150,7 +150,7 @@ public:
* @param autoShow tells the dialog whethr it should show itself automatically.
*/
KPropertiesDialog( const KURL& _url,
- QWidget* parent = 0L, const char* name = 0L,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
/**
@@ -168,8 +168,8 @@ public:
* @param autoShow tells the dialog whethr it should show itself automatically.
*/
KPropertiesDialog( const KURL& _tempUrl, const KURL& _currentDir,
- const QString& _defaultName,
- QWidget* parent = 0L, const char* name = 0L,
+ const TQString& _defaultName,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
/**
@@ -181,8 +181,8 @@ public:
* @param name is the internal name.
* @param modal tells the dialog whether it should be modal.
*/
- KPropertiesDialog (const QString& title,
- QWidget* parent = 0L, const char* name = 0L, bool modal = false);
+ KPropertiesDialog (const TQString& title,
+ TQWidget* parent = 0L, const char* name = 0L, bool modal = false);
/**
* Cleans up the properties dialog and frees any associated resources,
@@ -200,7 +200,7 @@ public:
* @return true on succesfull dialog displaying (can be false on win32).
* @since 3.4
*/
- static bool showDialog(KFileItem* item, QWidget* parent = 0,
+ static bool showDialog(KFileItem* item, TQWidget* parent = 0,
const char* name = 0, bool modal = false);
/**
@@ -212,7 +212,7 @@ public:
* @return true on succesfull dialog displaying (can be false on win32).
* @since 3.4
*/
- static bool showDialog(const KURL& _url, QWidget* parent = 0,
+ static bool showDialog(const KURL& _url, TQWidget* parent = 0,
const char* name = 0, bool modal = false);
/**
@@ -225,7 +225,7 @@ public:
* @return true on succesfull dialog displaying (can be false on win32).
* @since 3.4
*/
- static bool showDialog(const KFileItemList& _items, QWidget* parent = 0,
+ static bool showDialog(const KFileItemList& _items, TQWidget* parent = 0,
const char* name = 0, bool modal = false);
/**
@@ -279,20 +279,20 @@ public:
/**
* If the dialog is being built from a template, this method
- * returns the current directory. If no template, it returns QString::null.
+ * returns the current directory. If no template, it returns TQString::null.
* See the template form of the constructor.
*
- * @return the current directory or QString::null
+ * @return the current directory or TQString::null
*/
const KURL& currentDir() const { return m_currentDir; }
/**
* If the dialog is being built from a template, this method
- * returns the default name. If no template, it returns QString::null.
+ * returns the default name. If no template, it returns TQString::null.
* See the template form of the constructor.
- * @return the default name or QString::null
+ * @return the default name or TQString::null
*/
- const QString& defaultName() const { return m_defaultName; }
+ const TQString& defaultName() const { return m_defaultName; }
/**
* Updates the item URL (either called by rename or because
@@ -308,7 +308,7 @@ public:
* @param _name new filename, encoded.
* \see FilePropsDlgPlugin::applyChanges
*/
- void rename( const QString& _name );
+ void rename( const TQString& _name );
/**
* To abort applying changes.
@@ -332,7 +332,7 @@ public:
* \see showFileSharingPage
* @since 3.3
*/
- void setFileSharingPage(QWidget* page);
+ void setFileSharingPage(TQWidget* page);
/**
* Call this to make the filename lineedit readonly, to prevent the user
@@ -403,13 +403,13 @@ private:
/**
* For templates
*/
- QString m_defaultName;
+ TQString m_defaultName;
KURL m_currentDir;
/**
* List of all plugins inserted ( first one first )
*/
- QPtrList<KPropsDlgPlugin> m_pageList;
+ TQPtrList<KPropsDlgPlugin> m_pageList;
private slots:
void slotStatResult( KIO::Job * ); // No longer used
@@ -527,7 +527,7 @@ protected slots:
void slotFileRenamed( KIO::Job *, const KURL &, const KURL & );
void slotDirSizeUpdate();
void slotDirSizeFinished( KIO::Job * );
- void slotFoundMountPoint( const QString& mp, unsigned long kBSize,
+ void slotFoundMountPoint( const TQString& mp, unsigned long kBSize,
unsigned long kBUsed, unsigned long kBAvail );
void slotSizeStop();
void slotSizeDetermine();
@@ -535,28 +535,28 @@ protected slots:
private slots:
// workaround for compiler bug
void slotFoundMountPoint( const unsigned long& kBSize, const unsigned long&
- kBUsed, const unsigned long& kBAvail, const QString& mp );
- void nameFileChanged(const QString &text );
+ kBUsed, const unsigned long& kBAvail, const TQString& mp );
+ void nameFileChanged(const TQString &text );
void slotIconChanged();
private:
- void determineRelativePath( const QString & path );
+ void determineRelativePath( const TQString & path );
void applyIconChanges();
- QWidget *iconArea;
- QWidget *nameArea;
+ TQWidget *iconArea;
+ TQWidget *nameArea;
- QLabel *m_sizeLabel;
- QPushButton *m_sizeDetermineButton;
- QPushButton *m_sizeStopButton;
+ TQLabel *m_sizeLabel;
+ TQPushButton *m_sizeDetermineButton;
+ TQPushButton *m_sizeStopButton;
- QString m_sRelativePath;
+ TQString m_sRelativePath;
bool m_bFromTemplate;
/**
* The initial filename
*/
- QString oldName;
+ TQString oldName;
class KFilePropsPluginPrivate;
KFilePropsPluginPrivate *d;
@@ -604,7 +604,7 @@ private slots:
void slotShowAdvancedPermissions();
private:
- void setComboContent(QComboBox *combo, PermissionsTarget target,
+ void setComboContent(TQComboBox *combo, PermissionsTarget target,
mode_t permissions, mode_t partial);
bool isIrregular(mode_t permissions, bool isDir, bool isLink);
void enableAccessControls(bool enable);
@@ -619,9 +619,9 @@ private:
static const char *permissionsTexts[4][4];
// unused, for binary compatibility!
- QCheckBox *permBox[3][4];
+ TQCheckBox *permBox[3][4];
- QComboBox *grpCombo;
+ TQComboBox *grpCombo;
KLineEdit *usrEdit, *grpEdit;
@@ -632,11 +632,11 @@ private:
/**
* Old group
*/
- QString strGroup;
+ TQString strGroup;
/**
* Old owner
*/
- QString strOwner;
+ TQString strOwner;
// unused, for compatibility
static mode_t fperm[3][4];
@@ -672,11 +672,11 @@ private:
KURLRequester *URLEdit;
KIconButton *iconBox;
- QString URLStr;
- QString iconStr;
+ TQString URLStr;
+ TQString iconStr;
- QPixmap pixmap;
- QString pixmapFile;
+ TQPixmap pixmap;
+ TQString pixmapFile;
private:
class KURLPropsPluginPrivate;
KURLPropsPluginPrivate *d;
@@ -704,12 +704,12 @@ public:
private:
- QLineEdit *commentEdit;
- QLineEdit *patternEdit;
- QLineEdit *mimeEdit;
- QString m_sMimeStr;
+ TQLineEdit *commentEdit;
+ TQLineEdit *patternEdit;
+ TQLineEdit *mimeEdit;
+ TQString m_sMimeStr;
- QCheckBox * cbAutoEmbed;
+ TQCheckBox * cbAutoEmbed;
class KBindingPropsPluginPrivate;
KBindingPropsPluginPrivate *d;
@@ -736,26 +736,26 @@ private slots:
void slotFoundMountPoint( const unsigned long& kBSize,
const unsigned long& /*kBUsed*/,
const unsigned long& kBAvail,
- const QString& );
+ const TQString& );
private:
void updateInfo();
private:
- QComboBox* device;
- QLabel* mountpoint;
- QCheckBox* readonly;
+ TQComboBox* device;
+ TQLabel* mountpoint;
+ TQCheckBox* readonly;
void* unused;
//KIconButton* mounted;
KIconButton* unmounted;
- QStringList m_devicelist;
+ TQStringList m_devicelist;
int indexDevice;
int indexMountPoint;
int indexFSType;
- QPixmap pixmap;
- QString pixmapFile;
+ TQPixmap pixmap;
+ TQString pixmapFile;
class KDevicePropsPluginPrivate;
KDevicePropsPluginPrivate *d;
@@ -798,10 +798,10 @@ private:
private:
KPropertiesDesktopBase* w;
- QString m_origCommandStr;
- QString m_terminalOptionStr;
- QString m_suidUserStr;
- QString m_dcopServiceType;
+ TQString m_origCommandStr;
+ TQString m_terminalOptionStr;
+ TQString m_suidUserStr;
+ TQString m_dcopServiceType;
bool m_terminalBool;
bool m_terminalCloseBool;
bool m_suidBool;
@@ -845,24 +845,24 @@ private slots:
private:
- QLabel *terminalLabel;
- QLabel *suidLabel;
+ TQLabel *terminalLabel;
+ TQLabel *suidLabel;
KLineEdit *execEdit;
- QCheckBox *terminalCheck;
- QCheckBox *suidCheck;
+ TQCheckBox *terminalCheck;
+ TQCheckBox *suidCheck;
KLineEdit *terminalEdit;
KLineEdit *suidEdit;
KLineEdit *swallowExecEdit;
KLineEdit *swallowTitleEdit;
- QButton *execBrowse;
+ TQButton *execBrowse;
- QString execStr;
- QString swallowExecStr;
- QString swallowTitleStr;
- QString termOptionsStr;
+ TQString execStr;
+ TQString swallowExecStr;
+ TQString swallowTitleStr;
+ TQString termOptionsStr;
bool termBool;
bool suidBool;
- QString suidUserStr;
+ TQString suidUserStr;
class KExecPropsPluginPrivate;
KExecPropsPluginPrivate *d;
@@ -900,15 +900,15 @@ private slots:
void updateButton();
private:
- void addMimeType( const QString & name );
-
- QLineEdit *commentEdit;
- QLineEdit *genNameEdit;
- QLineEdit *nameEdit;
- QListBox *extensionsList;
- QListBox *availableExtensionsList;
- QPushButton *addExtensionButton;
- QPushButton *delExtensionButton;
+ void addMimeType( const TQString & name );
+
+ TQLineEdit *commentEdit;
+ TQLineEdit *genNameEdit;
+ TQLineEdit *nameEdit;
+ TQListBox *extensionsList;
+ TQListBox *availableExtensionsList;
+ TQPushButton *addExtensionButton;
+ TQPushButton *delExtensionButton;
class KApplicationPropsPluginPrivate;
KApplicationPropsPluginPrivate *d;
diff --git a/kio/kfile/krecentdirs.cpp b/kio/kfile/krecentdirs.cpp
index b32dd0481..22b4cd477 100644
--- a/kio/kfile/krecentdirs.cpp
+++ b/kio/kfile/krecentdirs.cpp
@@ -44,7 +44,7 @@ static void recentdirs_done(KConfig *config)
}
}
-static KConfig *recentdirs_readList(QString &key, QStringList &result, bool readOnly)
+static KConfig *recentdirs_readList(TQString &key, TQStringList &result, bool readOnly)
{
KConfig *config;
if ((key.length() < 2) || (key[0] != ':'))
@@ -52,13 +52,13 @@ static KConfig *recentdirs_readList(QString &key, QStringList &result, bool read
if (key[1] == ':')
{
key = key.mid(2);
- config = new KSimpleConfig(QString::fromLatin1("krecentdirsrc"), readOnly);
+ config = new KSimpleConfig(TQString::fromLatin1("krecentdirsrc"), readOnly);
}
else
{
key = key.mid(1);
config = KGlobal::config();
- config->setGroup(QString::fromLatin1("Recent Dirs"));
+ config->setGroup(TQString::fromLatin1("Recent Dirs"));
}
result=config->readPathListEntry(key);
@@ -69,24 +69,24 @@ static KConfig *recentdirs_readList(QString &key, QStringList &result, bool read
return config;
}
-QStringList KRecentDirs::list(const QString &fileClass)
+TQStringList KRecentDirs::list(const TQString &fileClass)
{
- QString key = fileClass;
- QStringList result;
+ TQString key = fileClass;
+ TQStringList result;
recentdirs_done(recentdirs_readList(key, result, true));
return result;
}
-QString KRecentDirs::dir(const QString &fileClass)
+TQString KRecentDirs::dir(const TQString &fileClass)
{
- QStringList result = list(fileClass);
+ TQStringList result = list(fileClass);
return result[0];
}
-void KRecentDirs::add(const QString &fileClass, const QString &directory)
+void KRecentDirs::add(const TQString &fileClass, const TQString &directory)
{
- QString key = fileClass;
- QStringList result;
+ TQString key = fileClass;
+ TQStringList result;
KConfig *config = recentdirs_readList(key, result, false);
// make sure the dir is first in history
result.remove(directory);
diff --git a/kio/kfile/krecentdirs.h b/kio/kfile/krecentdirs.h
index 078efcc50..439fb6fe0 100644
--- a/kio/kfile/krecentdirs.h
+++ b/kio/kfile/krecentdirs.h
@@ -28,7 +28,7 @@
#ifndef __KRECENTDIRS_H
#define __KRECENTDIRS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -54,17 +54,17 @@ public:
* Returns a list of directories associated with this file-class.
* The most recently used directory is at the front of the list.
*/
- static QStringList list(const QString &fileClass);
+ static TQStringList list(const TQString &fileClass);
/**
* Returns the most recently used directory accociated with this file-class.
*/
- static QString dir(const QString &fileClass);
+ static TQString dir(const TQString &fileClass);
/**
* Associates @p directory with @p fileClass
*/
- static void add(const QString &fileClass, const QString &directory);
+ static void add(const TQString &fileClass, const TQString &directory);
};
#endif
diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp
index 9b3d4f75f..69fd63df5 100644
--- a/kio/kfile/krecentdocument.cpp
+++ b/kio/kfile/krecentdocument.cpp
@@ -33,37 +33,37 @@
#include <kdebug.h>
#include <kmimetype.h>
#include <kdesktopfile.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <sys/types.h>
#include <utime.h>
-QString KRecentDocument::recentDocumentDirectory()
+TQString KRecentDocument::recentDocumentDirectory()
{
// need to change this path, not sure where
- return locateLocal("data", QString::fromLatin1("RecentDocuments/"));
+ return locateLocal("data", TQString::fromLatin1("RecentDocuments/"));
}
-QStringList KRecentDocument::recentDocuments()
+TQStringList KRecentDocument::recentDocuments()
{
- QDir d(recentDocumentDirectory(), "*.desktop", QDir::Time,
- QDir::Files | QDir::Readable | QDir::Hidden);
+ TQDir d(recentDocumentDirectory(), "*.desktop", TQDir::Time,
+ TQDir::Files | TQDir::Readable | TQDir::Hidden);
if (!d.exists())
d.mkdir(recentDocumentDirectory());
- QStringList list = d.entryList();
- QStringList fullList;
+ TQStringList list = d.entryList();
+ TQStringList fullList;
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- QString pathDesktop = d.absFilePath( *it );
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ TQString pathDesktop = d.absFilePath( *it );
KDesktopFile tmpDesktopFile( pathDesktop, false);
KURL urlDesktopFile(tmpDesktopFile.readURL());
- if( urlDesktopFile.isLocalFile() && !QFile(urlDesktopFile.path()).exists())
+ if( urlDesktopFile.isLocalFile() && !TQFile(urlDesktopFile.path()).exists())
d.remove(pathDesktop);
else
fullList.append( pathDesktop );
@@ -77,59 +77,59 @@ void KRecentDocument::add(const KURL& url)
KRecentDocument::add(url, qApp->argv()[0]); // ### argv[0] might not match the service filename!
}
-void KRecentDocument::add(const KURL& url, const QString& desktopEntryName)
+void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName)
{
if ( url.isLocalFile() && !KGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/"))
return;
- QString openStr = url.url();
- openStr.replace( QRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded
+ TQString openStr = url.url();
+ openStr.replace( TQRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded
kdDebug(250) << "KRecentDocument::add for " << openStr << endl;
KConfig *config = KGlobal::config();
- QString oldGrp = config->group();
- config->setGroup(QString::fromLatin1("RecentDocuments"));
- bool useRecent = config->readBoolEntry(QString::fromLatin1("UseRecent"), true);
- int maxEntries = config->readNumEntry(QString::fromLatin1("MaxEntries"), 10);
+ TQString oldGrp = config->group();
+ config->setGroup(TQString::fromLatin1("RecentDocuments"));
+ bool useRecent = config->readBoolEntry(TQString::fromLatin1("UseRecent"), true);
+ int maxEntries = config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10);
config->setGroup(oldGrp);
if(!useRecent)
return;
- QString path = recentDocumentDirectory();
+ TQString path = recentDocumentDirectory();
- QString dStr = path + url.fileName();
+ TQString dStr = path + url.fileName();
- QString ddesktop = dStr + QString::fromLatin1(".desktop");
+ TQString ddesktop = dStr + TQString::fromLatin1(".desktop");
int i=1;
// check for duplicates
- while(QFile::exists(ddesktop)){
+ while(TQFile::exists(ddesktop)){
// see if it points to the same file and application
KSimpleConfig tmp(ddesktop);
tmp.setDesktopGroup();
- if(tmp.readEntry(QString::fromLatin1("X-KDE-LastOpenedWith"))
+ if(tmp.readEntry(TQString::fromLatin1("X-KDE-LastOpenedWith"))
== desktopEntryName)
{
- utime(QFile::encodeName(ddesktop), NULL);
+ utime(TQFile::encodeName(ddesktop), NULL);
return;
}
// if not append a (num) to it
++i;
if ( i > maxEntries )
break;
- ddesktop = dStr + QString::fromLatin1("[%1].desktop").arg(i);
+ ddesktop = dStr + TQString::fromLatin1("[%1].desktop").arg(i);
}
- QDir dir(path);
+ TQDir dir(path);
// check for max entries, delete oldest files if exceeded
- QStringList list = dir.entryList(QDir::Files | QDir::Hidden, QDir::Time | QDir::Reversed);
+ TQStringList list = dir.entryList(TQDir::Files | TQDir::Hidden, TQDir::Time | TQDir::Reversed);
i = list.count();
if(i > maxEntries-1){
- QStringList::Iterator it;
+ TQStringList::Iterator it;
it = list.begin();
while(i > maxEntries-1){
- QFile::remove(dir.absPath() + QString::fromLatin1("/") + (*it));
+ TQFile::remove(dir.absPath() + TQString::fromLatin1("/") + (*it));
--i, ++it;
}
}
@@ -137,18 +137,18 @@ void KRecentDocument::add(const KURL& url, const QString& desktopEntryName)
// create the applnk
KSimpleConfig conf(ddesktop);
conf.setDesktopGroup();
- conf.writeEntry( QString::fromLatin1("Type"), QString::fromLatin1("Link") );
- conf.writePathEntry( QString::fromLatin1("URL"), openStr );
+ conf.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") );
+ conf.writePathEntry( TQString::fromLatin1("URL"), openStr );
// If you change the line below, change the test in the above loop
- conf.writeEntry( QString::fromLatin1("X-KDE-LastOpenedWith"), desktopEntryName );
- QString name = url.fileName();
+ conf.writeEntry( TQString::fromLatin1("X-KDE-LastOpenedWith"), desktopEntryName );
+ TQString name = url.fileName();
if (name.isEmpty())
name = openStr;
- conf.writeEntry( QString::fromLatin1("Name"), name );
- conf.writeEntry( QString::fromLatin1("Icon"), KMimeType::iconForURL( url ) );
+ conf.writeEntry( TQString::fromLatin1("Name"), name );
+ conf.writeEntry( TQString::fromLatin1("Icon"), KMimeType::iconForURL( url ) );
}
-void KRecentDocument::add(const QString &openStr, bool isUrl)
+void KRecentDocument::add(const TQString &openStr, bool isUrl)
{
if( isUrl ) {
add( KURL( openStr ) );
@@ -161,17 +161,17 @@ void KRecentDocument::add(const QString &openStr, bool isUrl)
void KRecentDocument::clear()
{
- QStringList list = recentDocuments();
- QDir dir;
- for(QStringList::Iterator it = list.begin(); it != list.end() ; ++it)
+ TQStringList list = recentDocuments();
+ TQDir dir;
+ for(TQStringList::Iterator it = list.begin(); it != list.end() ; ++it)
dir.remove(*it);
}
int KRecentDocument::maximumItems()
{
KConfig *config = KGlobal::config();
- KConfigGroupSaver sa(config, QString::fromLatin1("RecentDocuments"));
- return config->readNumEntry(QString::fromLatin1("MaxEntries"), 10);
+ KConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments"));
+ return config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10);
}
diff --git a/kio/kfile/krecentdocument.h b/kio/kfile/krecentdocument.h
index 5ec06c162..6bbd3f654 100644
--- a/kio/kfile/krecentdocument.h
+++ b/kio/kfile/krecentdocument.h
@@ -28,7 +28,7 @@
#ifndef __KRECENTDOCUMENT_H
#define __KRECENTDOCUMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kurl.h>
/**
@@ -57,7 +57,7 @@ public:
* sorted by date.
*
*/
- static QStringList recentDocuments();
+ static TQStringList recentDocuments();
/**
* Add a new item to the Recent Document menu.
@@ -74,7 +74,7 @@ public:
* @param url The url to add.
* @param desktopEntryName The desktopEntryName of the service to use for opening this document.
*/
- static void add(const KURL& url, const QString& desktopEntryName);
+ static void add(const KURL& url, const TQString& desktopEntryName);
/**
*
@@ -83,7 +83,7 @@ public:
* @param documentStr The full path to the document or URL to add.
* @param isURL Set to @p true if @p documentStr is an URL and not a local file path.
*/
- static void add(const QString &documentStr, bool isURL = false);
+ static void add(const TQString &documentStr, bool isURL = false);
/**
* Clear the recent document menu of all entries.
@@ -99,7 +99,7 @@ public:
* Returns the path to the directory where recent document .desktop files
* are stored.
*/
- static QString recentDocumentDirectory();
+ static TQString recentDocumentDirectory();
};
#endif
diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp
index 446087522..5c2b167c0 100644
--- a/kio/kfile/kurlbar.cpp
+++ b/kio/kfile/kurlbar.cpp
@@ -18,17 +18,17 @@
#include <unistd.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qdrawutil.h>
-#include <qfontmetrics.h>
-#include <qlabel.h>
-#include <qgrid.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qstyle.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqdrawutil.h>
+#include <tqfontmetrics.h>
+#include <tqlabel.h>
+#include <tqgrid.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqstyle.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
#include <kaboutdata.h>
#include <kconfig.h>
@@ -54,20 +54,20 @@
class KURLBarToolTip : public QToolTip
{
public:
- KURLBarToolTip( QListBox *view ) : QToolTip( view ), m_view( view ) {}
+ KURLBarToolTip( TQListBox *view ) : TQToolTip( view ), m_view( view ) {}
protected:
- virtual void maybeTip( const QPoint& point ) {
- QListBoxItem *item = m_view->itemAt( point );
+ virtual void maybeTip( const TQPoint& point ) {
+ TQListBoxItem *item = m_view->itemAt( point );
if ( item ) {
- QString text = static_cast<KURLBarItem*>( item )->toolTip();
+ TQString text = static_cast<KURLBarItem*>( item )->toolTip();
if ( !text.isEmpty() )
tip( m_view->itemRect( item ), text );
}
}
private:
- QListBox *m_view;
+ TQListBox *m_view;
};
@@ -86,9 +86,9 @@ public:
};
KURLBarItem::KURLBarItem( KURLBar *parent,
- const KURL& url, bool persistent, const QString& description,
- const QString& icon, KIcon::Group group )
- : QListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
+ const KURL& url, bool persistent, const TQString& description,
+ const TQString& icon, KIcon::Group group )
+ : TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
m_url( url ),
m_pixmap( 0L ),
m_parent( parent ),
@@ -98,9 +98,9 @@ KURLBarItem::KURLBarItem( KURLBar *parent,
}
KURLBarItem::KURLBarItem( KURLBar *parent,
- const KURL& url, const QString& description,
- const QString& icon, KIcon::Group group )
- : QListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
+ const KURL& url, const TQString& description,
+ const TQString& icon, KIcon::Group group )
+ : TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
m_url( url ),
m_pixmap( 0L ),
m_parent( parent ),
@@ -109,8 +109,8 @@ KURLBarItem::KURLBarItem( KURLBar *parent,
init( icon, group, description, true /*persistent*/ );
}
-void KURLBarItem::init( const QString& icon, KIcon::Group group,
- const QString& description, bool persistent )
+void KURLBarItem::init( const TQString& icon, KIcon::Group group,
+ const TQString& description, bool persistent )
{
d = new KURLBarItemPrivate;
d->isPersistent = persistent;
@@ -132,7 +132,7 @@ void KURLBarItem::setURL( const KURL& url )
setText( url.fileName() );
}
-void KURLBarItem::setIcon( const QString& icon, KIcon::Group group )
+void KURLBarItem::setIcon( const TQString& icon, KIcon::Group group )
{
m_icon = icon;
m_group = group;
@@ -144,7 +144,7 @@ void KURLBarItem::setIcon( const QString& icon, KIcon::Group group )
KIcon::DefaultState );
}
-void KURLBarItem::setDescription( const QString& desc )
+void KURLBarItem::setDescription( const TQString& desc )
{
m_description = desc;
setText( desc.isEmpty() ? m_url.fileName() : desc );
@@ -161,12 +161,12 @@ void KURLBarItem::setApplicationLocal( bool local )
m_appLocal = local;
}
-void KURLBarItem::setToolTip( const QString& tip )
+void KURLBarItem::setToolTip( const TQString& tip )
{
m_toolTip = tip;
}
-QString KURLBarItem::toolTip() const
+TQString KURLBarItem::toolTip() const
{
return m_toolTip.isEmpty() ? m_url.prettyURL() : m_toolTip;
}
@@ -176,9 +176,9 @@ int KURLBarItem::iconSize() const
return m_parent->iconSize();
}
-void KURLBarItem::paint( QPainter *p )
+void KURLBarItem::paint( TQPainter *p )
{
- QListBox *box = listBox();
+ TQListBox *box = listBox();
int w = width( box );
static const int margin = KDialog::spacingHint();
@@ -186,10 +186,10 @@ void KURLBarItem::paint( QPainter *p )
if ( isCurrent() || isSelected() ) {
int h = height( box );
- QBrush brush = box->colorGroup().brush( QColorGroup::Highlight );
+ TQBrush brush = box->colorGroup().brush( TQColorGroup::Highlight );
p->fillRect( 0, 0, w, h, brush );
- QPen pen = p->pen();
- QPen oldPen = pen;
+ TQPen pen = p->pen();
+ TQPen oldPen = pen;
pen.setColor( box->colorGroup().mid() );
p->setPen( pen );
@@ -204,14 +204,14 @@ void KURLBarItem::paint( QPainter *p )
if ( m_parent->iconSize() < KIcon::SizeMedium ) {
// small icon -> draw icon next to text
- // ### mostly cut & paste of QListBoxPixmap::paint() until Qt 3.1
+ // ### mostly cut & paste of TQListBoxPixmap::paint() until Qt 3.1
// (where it will properly use pixmap() instead of the internal pixmap)
- const QPixmap *pm = pixmap();
+ const TQPixmap *pm = pixmap();
int yPos = QMAX( 0, (height(box) - pm->height())/2 );
p->drawPixmap( margin, yPos, *pm );
if ( !text().isEmpty() ) {
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
if ( pm->height() < fm.height() )
yPos = fm.ascent() + fm.leading()/2;
else
@@ -219,12 +219,12 @@ void KURLBarItem::paint( QPainter *p )
yPos += margin;
int stringWidth = box->width() - pm->width() - 2 - (margin * 2);
- QString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
+ TQString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
int xPos = pm->width() + margin + 2;
if ( isCurrent() || isSelected() ) {
p->setPen( box->colorGroup().highlight().dark(115) );
- p->drawText( xPos + ( QApplication::reverseLayout() ? -1 : 1),
+ p->drawText( xPos + ( TQApplication::reverseLayout() ? -1 : 1),
yPos + 1, visibleText );
p->setPen( box->colorGroup().highlightedText() );
}
@@ -237,7 +237,7 @@ void KURLBarItem::paint( QPainter *p )
else {
// big icons -> draw text below icon
int y = margin;
- const QPixmap *pm = pixmap();
+ const TQPixmap *pm = pixmap();
if ( !pm->isNull() ) {
int x = (w - pm->width()) / 2;
@@ -246,17 +246,17 @@ void KURLBarItem::paint( QPainter *p )
}
if ( !text().isEmpty() ) {
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
y += pm->height() + fm.height() - fm.descent();
int stringWidth = box->width() - (margin * 2);
- QString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
+ TQString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
int x = (w - fm.width( visibleText )) / 2;
x = QMAX( x, margin );
if ( isCurrent() || isSelected() ) {
p->setPen( box->colorGroup().highlight().dark(115) );
- p->drawText( x + ( QApplication::reverseLayout() ? -1 : 1),
+ p->drawText( x + ( TQApplication::reverseLayout() ? -1 : 1),
y + 1, visibleText );
p->setPen( box->colorGroup().highlightedText() );
}
@@ -266,15 +266,15 @@ void KURLBarItem::paint( QPainter *p )
}
}
-QSize KURLBarItem::sizeHint() const
+TQSize KURLBarItem::sizeHint() const
{
int wmin = 0;
int hmin = 0;
const KURLBarListBox *lb =static_cast<const KURLBarListBox*>(listBox());
if ( m_parent->iconSize() < KIcon::SizeMedium ) {
- wmin = QListBoxPixmap::width( lb ) + KDialog::spacingHint() * 2;
- hmin = QListBoxPixmap::height( lb ) + KDialog::spacingHint() * 2;
+ wmin = TQListBoxPixmap::width( lb ) + KDialog::spacingHint() * 2;
+ hmin = TQListBoxPixmap::height( lb ) + KDialog::spacingHint() * 2;
}
else {
wmin = QMAX(lb->fontMetrics().width(text()), pixmap()->width()) + KDialog::spacingHint() * 2;
@@ -286,10 +286,10 @@ QSize KURLBarItem::sizeHint() const
else
hmin = QMIN( hmin, lb->viewport()->sizeHint().height() );
- return QSize( wmin, hmin );
+ return TQSize( wmin, hmin );
}
-int KURLBarItem::width( const QListBox *lb ) const
+int KURLBarItem::width( const TQListBox *lb ) const
{
if ( static_cast<const KURLBarListBox *>( lb )->isVertical() )
return QMAX( sizeHint().width(), lb->viewport()->width() );
@@ -297,7 +297,7 @@ int KURLBarItem::width( const QListBox *lb ) const
return sizeHint().width();
}
-int KURLBarItem::height( const QListBox *lb ) const
+int KURLBarItem::height( const TQListBox *lb ) const
{
if ( static_cast<const KURLBarListBox *>( lb )->isVertical() )
return sizeHint().height();
@@ -318,7 +318,7 @@ class KURLBar::KURLBarPrivate
public:
KURLBarPrivate()
{
- currentURL.setPath( QDir::homeDirPath() );
+ currentURL.setPath( TQDir::homeDirPath() );
defaultIconSize = 0;
}
@@ -327,8 +327,8 @@ public:
};
-KURLBar::KURLBar( bool useGlobalItems, QWidget *parent, const char *name, WFlags f )
- : QFrame( parent, name, f ),
+KURLBar::KURLBar( bool useGlobalItems, TQWidget *parent, const char *name, WFlags f )
+ : TQFrame( parent, name, f ),
m_activeItem( 0L ),
m_useGlobal( useGlobalItems ),
m_isModified( false ),
@@ -339,13 +339,13 @@ KURLBar::KURLBar( bool useGlobalItems, QWidget *parent, const char *name, WFlags
d = new KURLBarPrivate();
setListBox( 0L );
- setSizePolicy( QSizePolicy( isVertical() ?
- QSizePolicy::Maximum :
- QSizePolicy::Preferred,
+ setSizePolicy( TQSizePolicy( isVertical() ?
+ TQSizePolicy::Maximum :
+ TQSizePolicy::Preferred,
isVertical() ?
- QSizePolicy::Preferred :
- QSizePolicy::Maximum ));
- QWhatsThis::add(this, i18n("<qt>The <b>Quick Access</b> panel provides easy access to commonly used file locations.<p>"
+ TQSizePolicy::Preferred :
+ TQSizePolicy::Maximum ));
+ TQWhatsThis::add(this, i18n("<qt>The <b>Quick Access</b> panel provides easy access to commonly used file locations.<p>"
"Clicking on one of the shortcut entries will take you to that location.<p>"
"By right clicking on an entry you can add, edit and remove shortcuts.</qt>"));
}
@@ -355,9 +355,9 @@ KURLBar::~KURLBar()
delete d;
}
-KURLBarItem * KURLBar::insertItem(const KURL& url, const QString& description,
+KURLBarItem * KURLBar::insertItem(const KURL& url, const TQString& description,
bool applicationLocal,
- const QString& icon, KIcon::Group group )
+ const TQString& icon, KIcon::Group group )
{
KURLBarItem *item = new KURLBarItem(this, url, description, icon, group);
item->setApplicationLocal( applicationLocal );
@@ -365,8 +365,8 @@ KURLBarItem * KURLBar::insertItem(const KURL& url, const QString& description,
return item;
}
-KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const QString& description,
- const QString& icon, KIcon::Group group )
+KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const TQString& description,
+ const TQString& icon, KIcon::Group group )
{
KURLBarItem *item = new KURLBarItem(this, url, false, description, icon, group);
m_listBox->insertItem( item );
@@ -376,12 +376,12 @@ KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const QString& descrip
void KURLBar::setOrientation( Qt::Orientation orient )
{
m_listBox->setOrientation( orient );
- setSizePolicy( QSizePolicy( isVertical() ?
- QSizePolicy::Maximum :
- QSizePolicy::Preferred,
+ setSizePolicy( TQSizePolicy( isVertical() ?
+ TQSizePolicy::Maximum :
+ TQSizePolicy::Preferred,
isVertical() ?
- QSizePolicy::Preferred :
- QSizePolicy::Maximum ));
+ TQSizePolicy::Preferred :
+ TQSizePolicy::Maximum ));
}
Qt::Orientation KURLBar::orientation() const
@@ -400,7 +400,7 @@ void KURLBar::setListBox( KURLBarListBox *view )
else {
m_listBox = view;
if ( m_listBox->parentWidget() != this )
- m_listBox->reparent( this, QPoint(0,0) );
+ m_listBox->reparent( this, TQPoint(0,0) );
m_listBox->resize( width(), height() );
}
@@ -408,15 +408,15 @@ void KURLBar::setListBox( KURLBarListBox *view )
paletteChange( palette() );
m_listBox->setFocusPolicy( TabFocus );
- connect( m_listBox, SIGNAL( mouseButtonClicked( int, QListBoxItem *, const QPoint & ) ),
- SLOT( slotSelected( int, QListBoxItem * )));
- connect( m_listBox, SIGNAL( dropped( QDropEvent * )),
- this, SLOT( slotDropped( QDropEvent * )));
- connect( m_listBox, SIGNAL( contextMenuRequested( QListBoxItem *,
- const QPoint& )),
- SLOT( slotContextMenuRequested( QListBoxItem *, const QPoint& )));
- connect( m_listBox, SIGNAL( returnPressed( QListBoxItem * ) ),
- SLOT( slotSelected( QListBoxItem * ) ));
+ connect( m_listBox, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ),
+ TQT_SLOT( slotSelected( int, TQListBoxItem * )));
+ connect( m_listBox, TQT_SIGNAL( dropped( TQDropEvent * )),
+ this, TQT_SLOT( slotDropped( TQDropEvent * )));
+ connect( m_listBox, TQT_SIGNAL( contextMenuRequested( TQListBoxItem *,
+ const TQPoint& )),
+ TQT_SLOT( slotContextMenuRequested( TQListBoxItem *, const TQPoint& )));
+ connect( m_listBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ),
+ TQT_SLOT( slotSelected( TQListBoxItem * ) ));
}
void KURLBar::setIconSize( int size )
@@ -442,29 +442,29 @@ void KURLBar::clear()
m_listBox->clear();
}
-void KURLBar::resizeEvent( QResizeEvent *e )
+void KURLBar::resizeEvent( TQResizeEvent *e )
{
- QFrame::resizeEvent( e );
+ TQFrame::resizeEvent( e );
m_listBox->resize( width(), height() );
}
-void KURLBar::paletteChange( const QPalette & )
+void KURLBar::paletteChange( const TQPalette & )
{
- QPalette pal = palette();
- QColor gray = pal.color( QPalette::Normal, QColorGroup::Background );
- QColor selectedTextColor = pal.color( QPalette::Normal, QColorGroup::BrightText );
- QColor foreground = pal.color( QPalette::Normal, QColorGroup::Foreground );
- pal.setColor( QPalette::Normal, QColorGroup::Base, gray );
- pal.setColor( QPalette::Normal, QColorGroup::HighlightedText, selectedTextColor );
- pal.setColor( QPalette::Normal, QColorGroup::Text, foreground );
- pal.setColor( QPalette::Inactive, QColorGroup::Base, gray );
- pal.setColor( QPalette::Inactive, QColorGroup::HighlightedText, selectedTextColor );
- pal.setColor( QPalette::Inactive, QColorGroup::Text, foreground );
+ TQPalette pal = palette();
+ TQColor gray = pal.color( TQPalette::Normal, TQColorGroup::Background );
+ TQColor selectedTextColor = pal.color( TQPalette::Normal, TQColorGroup::BrightText );
+ TQColor foreground = pal.color( TQPalette::Normal, TQColorGroup::Foreground );
+ pal.setColor( TQPalette::Normal, TQColorGroup::Base, gray );
+ pal.setColor( TQPalette::Normal, TQColorGroup::HighlightedText, selectedTextColor );
+ pal.setColor( TQPalette::Normal, TQColorGroup::Text, foreground );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::Base, gray );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, selectedTextColor );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::Text, foreground );
setPalette( pal );
}
-QSize KURLBar::sizeHint() const
+TQSize KURLBar::sizeHint() const
{
return m_listBox->sizeHint();
@@ -482,7 +482,7 @@ QSize KURLBar::sizeHint() const
item;
item = static_cast<KURLBarItem*>( item->next() ) ) {
- QSize sh = item->sizeHint();
+ TQSize sh = item->sizeHint();
if ( vertical ) {
w = QMAX( w, sh.width() );
@@ -500,21 +500,21 @@ QSize KURLBar::sizeHint() const
// h += m_listBox->horizontalScrollBar()->height();
if ( w == 0 && h == 0 )
- return QSize( 100, 200 );
+ return TQSize( 100, 200 );
else
- return QSize( 6 + w, h );
+ return TQSize( 6 + w, h );
#endif
}
-QSize KURLBar::minimumSizeHint() const
+TQSize KURLBar::minimumSizeHint() const
{
- QSize s = sizeHint(); // ###
+ TQSize s = sizeHint(); // ###
int w = s.width() + m_listBox->verticalScrollBar()->width();
int h = s.height() + m_listBox->horizontalScrollBar()->height();
- return QSize( w, h );
+ return TQSize( w, h );
}
-void KURLBar::slotSelected( int button, QListBoxItem *item )
+void KURLBar::slotSelected( int button, TQListBoxItem *item )
{
if ( button != Qt::LeftButton )
return;
@@ -522,7 +522,7 @@ void KURLBar::slotSelected( int button, QListBoxItem *item )
slotSelected( item );
}
-void KURLBar::slotSelected( QListBoxItem *item )
+void KURLBar::slotSelected( TQListBoxItem *item )
{
if ( item && item != m_activeItem )
m_activeItem = static_cast<KURLBarItem*>( item );
@@ -537,13 +537,13 @@ void KURLBar::setCurrentItem( const KURL& url )
{
d->currentURL = url;
- QString u = url.url(-1);
+ TQString u = url.url(-1);
if ( m_activeItem && m_activeItem->url().url(-1) == u )
return;
bool hasURL = false;
- QListBoxItem *item = m_listBox->firstItem();
+ TQListBoxItem *item = m_listBox->firstItem();
while ( item ) {
if ( static_cast<KURLBarItem*>( item )->url().url(-1) == u ) {
m_activeItem = static_cast<KURLBarItem*>( item );
@@ -563,7 +563,7 @@ void KURLBar::setCurrentItem( const KURL& url )
KURLBarItem * KURLBar::currentItem() const
{
- QListBoxItem *item = m_listBox->item( m_listBox->currentItem() );
+ TQListBoxItem *item = m_listBox->item( m_listBox->currentItem() );
if ( item )
return static_cast<KURLBarItem *>( item );
return 0L;
@@ -575,7 +575,7 @@ KURL KURLBar::currentURL() const
return item ? item->url() : KURL();
}
-void KURLBar::readConfig( KConfig *appConfig, const QString& itemGroup )
+void KURLBar::readConfig( KConfig *appConfig, const TQString& itemGroup )
{
m_isImmutable = appConfig->groupIsImmutable( itemGroup );
KConfigGroupSaver cs( appConfig, itemGroup );
@@ -584,7 +584,7 @@ void KURLBar::readConfig( KConfig *appConfig, const QString& itemGroup )
if ( m_useGlobal ) { // read global items
KConfig *globalConfig = KGlobal::config();
- KConfigGroupSaver cs( globalConfig, (QString)(itemGroup +" (Global)"));
+ KConfigGroupSaver cs( globalConfig, (TQString)(itemGroup +" (Global)"));
int num = globalConfig->readNumEntry( "Number of Entries" );
for ( int i = 0; i < num; i++ ) {
readItem( i, globalConfig, false );
@@ -600,20 +600,20 @@ void KURLBar::readConfig( KConfig *appConfig, const QString& itemGroup )
void KURLBar::readItem( int i, KConfig *config, bool applicationLocal )
{
- QString number = QString::number( i );
- KURL url = KURL::fromPathOrURL( config->readPathEntry( QString("URL_") + number ));
+ TQString number = TQString::number( i );
+ KURL url = KURL::fromPathOrURL( config->readPathEntry( TQString("URL_") + number ));
if ( !url.isValid() || !KProtocolInfo::isKnownProtocol( url ))
return; // nothing we could do.
insertItem( url,
- config->readEntry( QString("Description_") + number ),
+ config->readEntry( TQString("Description_") + number ),
applicationLocal,
- config->readEntry( QString("Icon_") + number ),
+ config->readEntry( TQString("Icon_") + number ),
static_cast<KIcon::Group>(
- config->readNumEntry( QString("IconGroup_") + number )) );
+ config->readNumEntry( TQString("IconGroup_") + number )) );
}
-void KURLBar::writeConfig( KConfig *config, const QString& itemGroup )
+void KURLBar::writeConfig( KConfig *config, const TQString& itemGroup )
{
KConfigGroupSaver cs1( config, itemGroup );
if(!config->hasDefault("Speedbar IconSize") && m_iconSize == d->defaultIconSize )
@@ -678,12 +678,12 @@ void KURLBar::writeItem( KURLBarItem *item, int i, KConfig *config,
if ( !item->isPersistent() )
return;
- QString Description = "Description_";
- QString URL = "URL_";
- QString Icon = "Icon_";
- QString IconGroup = "IconGroup_";
+ TQString Description = "Description_";
+ TQString URL = "URL_";
+ TQString Icon = "Icon_";
+ TQString IconGroup = "IconGroup_";
- QString number = QString::number( i );
+ TQString number = TQString::number( i );
config->writePathEntry( URL + number, item->url().prettyURL(), true, global );
config->writeEntry( Description + number, item->description(),true,global);
@@ -692,13 +692,13 @@ void KURLBar::writeItem( KURLBarItem *item, int i, KConfig *config,
}
-void KURLBar::slotDropped( QDropEvent *e )
+void KURLBar::slotDropped( TQDropEvent *e )
{
KURL::List urls;
if ( KURLDrag::decode( e, urls ) ) {
KURL url;
- QString description;
- QString icon;
+ TQString description;
+ TQString icon;
bool appLocal = false;
KURL::List::Iterator it = urls.begin();
@@ -710,7 +710,7 @@ void KURLBar::slotDropped( QDropEvent *e )
}
}
-void KURLBar::slotContextMenuRequested( QListBoxItem *_item, const QPoint& pos )
+void KURLBar::slotContextMenuRequested( TQListBoxItem *_item, const TQPoint& pos )
{
if (m_isImmutable)
return;
@@ -725,7 +725,7 @@ void KURLBar::slotContextMenuRequested( QListBoxItem *_item, const QPoint& pos )
KURL lastURL = m_activeItem ? m_activeItem->url() : KURL();
bool smallIcons = m_iconSize < KIcon::SizeMedium;
- QPopupMenu *popup = new QPopupMenu();
+ TQPopupMenu *popup = new TQPopupMenu();
popup->insertItem( smallIcons ?
i18n("&Large Icons") : i18n("&Small Icons"),
IconSize );
@@ -789,8 +789,8 @@ bool KURLBar::editItem( KURLBarItem *item )
return false;
KURL url = item->url();
- QString description = item->description();
- QString icon = item->icon();
+ TQString description = item->description();
+ TQString icon = item->icon();
bool appLocal = item->applicationLocal();
if ( KURLBarItemDialog::getInformation( m_useGlobal,
@@ -815,7 +815,7 @@ bool KURLBar::editItem( KURLBarItem *item )
///////////////////////////////////////////////////////////////////
-KURLBarListBox::KURLBarListBox( QWidget *parent, const char *name )
+KURLBarListBox::KURLBarListBox( TQWidget *parent, const char *name )
: KListBox( parent, name )
{
m_toolTip = new KURLBarToolTip( this );
@@ -828,14 +828,14 @@ KURLBarListBox::~KURLBarListBox()
delete m_toolTip;
}
-void KURLBarListBox::paintEvent( QPaintEvent* )
+void KURLBarListBox::paintEvent( TQPaintEvent* )
{
- QPainter p(this);
+ TQPainter p(this);
p.setPen( colorGroup().mid() );
p.drawRect( 0, 0, width(), height() );
}
-QDragObject * KURLBarListBox::dragObject()
+TQDragObject * KURLBarListBox::dragObject()
{
KURL::List urls;
KURLBarItem *item = static_cast<KURLBarItem*>( firstItem() );
@@ -852,17 +852,17 @@ QDragObject * KURLBarListBox::dragObject()
return 0L;
}
-void KURLBarListBox::contentsDragEnterEvent( QDragEnterEvent *e )
+void KURLBarListBox::contentsDragEnterEvent( TQDragEnterEvent *e )
{
e->accept( KURLDrag::canDecode( e ));
}
-void KURLBarListBox::contentsDropEvent( QDropEvent *e )
+void KURLBarListBox::contentsDropEvent( TQDropEvent *e )
{
emit dropped( e );
}
-void KURLBarListBox::contextMenuEvent( QContextMenuEvent *e )
+void KURLBarListBox::contextMenuEvent( TQContextMenuEvent *e )
{
if (e)
{
@@ -890,15 +890,15 @@ void KURLBarListBox::setOrientation( Qt::Orientation orient )
bool KURLBarItemDialog::getInformation( bool allowGlobal, KURL& url,
- QString& description, QString& icon,
+ TQString& description, TQString& icon,
bool& appLocal, int iconSize,
- QWidget *parent )
+ TQWidget *parent )
{
KURLBarItemDialog *dialog = new KURLBarItemDialog( allowGlobal, url,
description, icon,
appLocal,
iconSize, parent );
- if ( dialog->exec() == QDialog::Accepted ) {
+ if ( dialog->exec() == TQDialog::Accepted ) {
// set the return parameters
url = dialog->url();
description = dialog->description();
@@ -914,63 +914,63 @@ bool KURLBarItemDialog::getInformation( bool allowGlobal, KURL& url,
}
KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url,
- const QString& description,
- QString icon, bool appLocal,
+ const TQString& description,
+ TQString icon, bool appLocal,
int iconSize,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true,
i18n("Edit Quick Access Entry"), Ok | Cancel, Ok, true )
{
- QVBox *box = new QVBox( this );
- QString text = i18n("<qt><b>Please provide a description, URL and icon for this Quick Access entry.</b></br></qt>");
- QLabel *label = new QLabel( text, box );
+ TQVBox *box = new TQVBox( this );
+ TQString text = i18n("<qt><b>Please provide a description, URL and icon for this Quick Access entry.</b></br></qt>");
+ TQLabel *label = new TQLabel( text, box );
box->setSpacing( spacingHint() );
- QGrid *grid = new QGrid( 2, box );
+ TQGrid *grid = new TQGrid( 2, box );
grid->setSpacing( spacingHint() );
- QString whatsThisText = i18n("<qt>This is the text that will appear in the Quick Access panel.<p>"
+ TQString whatsThisText = i18n("<qt>This is the text that will appear in the Quick Access panel.<p>"
"The description should consist of one or two words "
"that will help you remember what this entry refers to.</qt>");
- label = new QLabel( i18n("&Description:"), grid );
+ label = new TQLabel( i18n("&Description:"), grid );
m_edit = new KLineEdit( grid, "description edit" );
m_edit->setText( description.isEmpty() ? url.fileName() : description );
label->setBuddy( m_edit );
- QWhatsThis::add( label, whatsThisText );
- QWhatsThis::add( m_edit, whatsThisText );
+ TQWhatsThis::add( label, whatsThisText );
+ TQWhatsThis::add( m_edit, whatsThisText );
whatsThisText = i18n("<qt>This is the location associated with the entry. Any valid URL may be used. For example:<p>"
"%1<br>http://www.kde.org<br>ftp://ftp.kde.org/pub/kde/stable<p>"
"By clicking on the button next to the text edit box you can browse to an "
- "appropriate URL.</qt>").arg(QDir::homeDirPath());
- label = new QLabel( i18n("&URL:"), grid );
+ "appropriate URL.</qt>").arg(TQDir::homeDirPath());
+ label = new TQLabel( i18n("&URL:"), grid );
m_urlEdit = new KURLRequester( url.prettyURL(), grid );
m_urlEdit->setMode( KFile::Directory );
label->setBuddy( m_urlEdit );
- QWhatsThis::add( label, whatsThisText );
- QWhatsThis::add( m_urlEdit, whatsThisText );
+ TQWhatsThis::add( label, whatsThisText );
+ TQWhatsThis::add( m_urlEdit, whatsThisText );
whatsThisText = i18n("<qt>This is the icon that will appear in the Quick Access panel.<p>"
"Click on the button to select a different icon.</qt>");
- label = new QLabel( i18n("Choose an &icon:"), grid );
+ label = new TQLabel( i18n("Choose an &icon:"), grid );
m_iconButton = new KIconButton( grid, "icon button" );
m_iconButton->setIconSize( iconSize );
if ( icon.isEmpty() )
icon = KMimeType::iconForURL( url );
m_iconButton->setIcon( icon );
label->setBuddy( m_iconButton );
- QWhatsThis::add( label, whatsThisText );
- QWhatsThis::add( m_iconButton, whatsThisText );
+ TQWhatsThis::add( label, whatsThisText );
+ TQWhatsThis::add( m_iconButton, whatsThisText );
if ( allowGlobal ) {
- QString appName;
+ TQString appName;
if ( KGlobal::instance()->aboutData() )
appName = KGlobal::instance()->aboutData()->programName();
if ( appName.isEmpty() )
- appName = QString::fromLatin1( KGlobal::instance()->instanceName() );
- m_appLocal = new QCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box );
+ appName = TQString::fromLatin1( KGlobal::instance()->instanceName() );
+ m_appLocal = new TQCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box );
m_appLocal->setChecked( appLocal );
- QWhatsThis::add( m_appLocal,
+ TQWhatsThis::add( m_appLocal,
i18n("<qt>Select this setting if you want this "
"entry to show only when using the current application (%1).<p>"
"If this setting is not selected, the entry will be available in all "
@@ -979,7 +979,7 @@ KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url,
}
else
m_appLocal = 0L;
- connect(m_urlEdit->lineEdit(),SIGNAL(textChanged ( const QString & )),this,SLOT(urlChanged(const QString & )));
+ connect(m_urlEdit->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(urlChanged(const TQString & )));
m_edit->setFocus();
setMainWidget( box );
}
@@ -988,14 +988,14 @@ KURLBarItemDialog::~KURLBarItemDialog()
{
}
-void KURLBarItemDialog::urlChanged(const QString & text )
+void KURLBarItemDialog::urlChanged(const TQString & text )
{
enableButtonOK( !text.isEmpty() );
}
KURL KURLBarItemDialog::url() const
{
- QString text = m_urlEdit->url();
+ TQString text = m_urlEdit->url();
KURL u;
if ( text.at(0) == '/' )
u.setPath( text );
@@ -1005,12 +1005,12 @@ KURL KURLBarItemDialog::url() const
return u;
}
-QString KURLBarItemDialog::description() const
+TQString KURLBarItemDialog::description() const
{
return m_edit->text();
}
-QString KURLBarItemDialog::icon() const
+TQString KURLBarItemDialog::icon() const
{
return m_iconButton->icon();
}
diff --git a/kio/kfile/kurlbar.h b/kio/kfile/kurlbar.h
index 6bc5de6d5..fc29d4fd2 100644
--- a/kio/kfile/kurlbar.h
+++ b/kio/kfile/kurlbar.h
@@ -19,9 +19,9 @@
#ifndef KURLBAR_H
#define KURLBAR_H
-#include <qevent.h>
-#include <qframe.h>
-#include <qtooltip.h>
+#include <tqevent.h>
+#include <tqframe.h>
+#include <tqtooltip.h>
#include <kdialogbase.h>
#include <kicontheme.h>
@@ -56,8 +56,8 @@ public:
* @since 3.2
*/
KURLBarItem( KURLBar *parent, const KURL& url, bool persistent,
- const QString& description = QString::null,
- const QString& icon = QString::null,
+ const TQString& description = TQString::null,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
@@ -73,8 +73,8 @@ public:
* dynamic item, that is not saved with KURLBar::writeConfig().
*/
KURLBarItem( KURLBar *parent, const KURL& url,
- const QString& description = QString::null,
- const QString& icon = QString::null,
+ const TQString& description = TQString::null,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
@@ -93,32 +93,32 @@ public:
* of the icon groups.
* @see icon
*/
- void setIcon( const QString& icon, KIcon::Group group = KIcon::Panel );
+ void setIcon( const TQString& icon, KIcon::Group group = KIcon::Panel );
/**
* Sets the description of this item that will be shown as item-text.
* @see description
*/
- void setDescription( const QString& desc );
+ void setDescription( const TQString& desc );
/**
* Sets a tooltip to be used for this item.
* @see toolTip
*/
- void setToolTip( const QString& tip );
+ void setToolTip( const TQString& tip );
/**
* returns the preferred size of this item
* @since 3.1
*/
- QSize sizeHint() const;
+ TQSize sizeHint() const;
/**
* returns the width of this item.
*/
- virtual int width( const QListBox * ) const;
+ virtual int width( const TQListBox * ) const;
/**
* returns the height of this item.
*/
- virtual int height( const QListBox * ) const;
+ virtual int height( const TQListBox * ) const;
/**
* returns the url of this item.
@@ -129,17 +129,17 @@ public:
* returns the description of this item.
* @see setDescription
*/
- const QString& description() const { return m_description; }
+ const TQString& description() const { return m_description; }
/**
* returns the icon of this item.
* @see setIcon
*/
- const QString& icon() const { return m_icon; }
+ const TQString& icon() const { return m_icon; }
/**
* returns the tooltip of this item.
* @see setToolTip
*/
- QString toolTip() const;
+ TQString toolTip() const;
/**
* returns the icon-group of this item (determines icon-effects).
* @see setIcon
@@ -148,7 +148,7 @@ public:
/**
* returns the pixmap of this item.
*/
- virtual const QPixmap * pixmap() const { return &m_pixmap; }
+ virtual const TQPixmap * pixmap() const { return &m_pixmap; }
/**
* Makes this item a local or global one. This has only an effect
@@ -174,18 +174,18 @@ public:
bool isPersistent() const;
protected:
- virtual void paint( QPainter *p );
+ virtual void paint( TQPainter *p );
private:
int iconSize() const;
- void init( const QString& icon, KIcon::Group group,
- const QString& description, bool persistent );
+ void init( const TQString& icon, KIcon::Group group,
+ const TQString& description, bool persistent );
KURL m_url;
- QString m_description;
- QString m_icon;
- QString m_toolTip;
- QPixmap m_pixmap;
+ TQString m_description;
+ TQString m_icon;
+ TQString m_toolTip;
+ TQPixmap m_pixmap;
KIcon::Group m_group;
KURLBar *m_parent;
bool m_appLocal :1;
@@ -237,7 +237,7 @@ public:
* allow global/local item separation.
*/
KURLBar( bool useGlobalItems,
- QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
/**
* Destroys the KURLBar.
*/
@@ -254,9 +254,9 @@ public:
* @p group the icon-group for using icon-effects
*/
virtual KURLBarItem * insertItem( const KURL& url,
- const QString& description,
+ const TQString& description,
bool applicationLocal = true,
- const QString& icon = QString::null,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
* Inserts a new dynamic item into the KURLBar and returns the created
@@ -269,8 +269,8 @@ public:
* @since 3.2
*/
virtual KURLBarItem * insertDynamicItem( const KURL& url,
- const QString& description,
- const QString& icon = QString::null,
+ const TQString& description,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
* The items can be arranged either vertically in one column or
@@ -319,25 +319,25 @@ public:
* @returns a proper sizehint, depending on the orientation and the number
* of items available.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* @returns a proper minimum size (reimplemented)
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/**
* Call this method to read a saved configuration from @p config,
* inside the group @p itemGroup. All items in there will be restored.
* The reading of every item is delegated to the readItem() method.
*/
- virtual void readConfig( KConfig *config, const QString& itemGroup );
+ virtual void readConfig( KConfig *config, const TQString& itemGroup );
/**
* Call this method to save the current configuration into @p config,
* inside the group @p iconGroup. The writeItem() method is used
* to save each item.
*/
- virtual void writeConfig( KConfig *config, const QString& itemGroup );
+ virtual void writeConfig( KConfig *config, const TQString& itemGroup );
/**
* Called from readConfig() to read the i'th from @p config.
@@ -416,9 +416,9 @@ protected:
*/
virtual bool editItem( KURLBarItem *item );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
- virtual void paletteChange( const QPalette & );
+ virtual void paletteChange( const TQPalette & );
/**
* The currently active item.
@@ -446,21 +446,21 @@ protected slots:
* Reimplemented to show a contextmenu, allowing the user to add, edit
* or remove items, or change the iconsize.
*/
- virtual void slotContextMenuRequested( QListBoxItem *, const QPoint& pos );
+ virtual void slotContextMenuRequested( TQListBoxItem *, const TQPoint& pos );
/**
* Called when an item has been selected. Emits the activated()
* signal.
*/
- virtual void slotSelected( QListBoxItem * );
+ virtual void slotSelected( TQListBoxItem * );
/**
* Called when a url was dropped onto the bar to show a
* KURLBarItemDialog.
*/
- virtual void slotDropped( QDropEvent * );
+ virtual void slotDropped( TQDropEvent * );
private slots:
- void slotSelected( int button, QListBoxItem * );
+ void slotSelected( int button, TQListBoxItem * );
private:
KURLBarListBox *m_listBox;
@@ -498,7 +498,7 @@ public:
/**
* Constructs a KURLBarListBox.
*/
- KURLBarListBox( QWidget *parent = 0, const char *name = 0 );
+ KURLBarListBox( TQWidget *parent = 0, const char *name = 0 );
/**
* Destroys the box.
*/
@@ -523,18 +523,18 @@ signals:
/**
* Emitted when a drop-event happened.
*/
- void dropped( QDropEvent *e );
+ void dropped( TQDropEvent *e );
protected:
/**
- * @returns a suitable QDragObject when an item is dragged.
+ * @returns a suitable TQDragObject when an item is dragged.
*/
- virtual QDragObject * dragObject();
+ virtual TQDragObject * dragObject();
- virtual void contentsDragEnterEvent( QDragEnterEvent * );
- virtual void contentsDropEvent( QDropEvent * );
- virtual void contextMenuEvent( QContextMenuEvent * );
- virtual void paintEvent( QPaintEvent* );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent * );
+ virtual void contentsDropEvent( TQDropEvent * );
+ virtual void contextMenuEvent( TQContextMenuEvent * );
+ virtual void paintEvent( TQPaintEvent* );
private:
Qt::Orientation m_orientation;
@@ -577,9 +577,9 @@ public:
* See the KURLBarItem constructor for the parameter description.
*/
static bool getInformation( bool allowGlobal, KURL& url,
- QString& description, QString& icon,
+ TQString& description, TQString& icon,
bool& appLocal, int iconSize,
- QWidget *parent = 0 );
+ TQWidget *parent = 0 );
/**
* Constructs a KURLBarItemDialog.
@@ -599,10 +599,10 @@ public:
* used (KMimeType::pixmapForURL()).
*/
KURLBarItemDialog( bool allowGlobal, const KURL& url,
- const QString& description, QString icon,
+ const TQString& description, TQString icon,
bool appLocal = true,
int iconSize = KIcon::SizeMedium,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *parent = 0, const char *name = 0 );
/**
* Destroys the dialog.
*/
@@ -616,12 +616,12 @@ public:
/**
* @returns the configured description
*/
- QString description() const;
+ TQString description() const;
/**
* @returns the configured icon
*/
- QString icon() const;
+ TQString icon() const;
/**
* @returns whether the item should be local to the application or global.
@@ -644,12 +644,12 @@ protected:
*/
KIconButton * m_iconButton;
/**
- * The QCheckBox to modify the local/global setting
+ * The TQCheckBox to modify the local/global setting
*/
- QCheckBox * m_appLocal;
+ TQCheckBox * m_appLocal;
public slots:
- void urlChanged(const QString & );
+ void urlChanged(const TQString & );
private:
class KURLBarItemDialogPrivate;
diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp
index 128e8a22c..72c7cbd07 100644
--- a/kio/kfile/kurlcombobox.cpp
+++ b/kio/kfile/kurlcombobox.cpp
@@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qlistbox.h>
+#include <tqdir.h>
+#include <tqlistbox.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -31,21 +31,21 @@ class KURLComboBox::KURLComboBoxPrivate
{
public:
KURLComboBoxPrivate() {
- dirpix = SmallIcon(QString::fromLatin1("folder"));
+ dirpix = SmallIcon(TQString::fromLatin1("folder"));
}
- QPixmap dirpix;
+ TQPixmap dirpix;
};
-KURLComboBox::KURLComboBox( Mode mode, QWidget *parent, const char *name )
+KURLComboBox::KURLComboBox( Mode mode, TQWidget *parent, const char *name )
: KComboBox( parent, name )
{
init( mode );
}
-KURLComboBox::KURLComboBox( Mode mode, bool rw, QWidget *parent,
+KURLComboBox::KURLComboBox( Mode mode, bool rw, TQWidget *parent,
const char *name )
: KComboBox( rw, parent, name )
{
@@ -70,20 +70,20 @@ void KURLComboBox::init( Mode mode )
defaultList.setAutoDelete( true );
setInsertionPolicy( NoInsertion );
setTrapReturnKey( true );
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
- opendirPix = SmallIcon(QString::fromLatin1("folder_open"));
+ opendirPix = SmallIcon(TQString::fromLatin1("folder_open"));
- connect( this, SIGNAL( activated( int )), SLOT( slotActivated( int )));
+ connect( this, TQT_SIGNAL( activated( int )), TQT_SLOT( slotActivated( int )));
}
-QStringList KURLComboBox::urls() const
+TQStringList KURLComboBox::urls() const
{
kdDebug(250) << "::urls()" << endl;
- //static const QString &fileProt = KGlobal::staticQString("file:");
- QStringList list;
- QString url;
+ //static const TQString &fileProt = KGlobal::staticQString("file:");
+ TQStringList list;
+ TQString url;
for ( int i = defaultList.count(); i < count(); i++ ) {
url = text( i );
if ( !url.isEmpty() ) {
@@ -98,14 +98,14 @@ QStringList KURLComboBox::urls() const
}
-void KURLComboBox::addDefaultURL( const KURL& url, const QString& text )
+void KURLComboBox::addDefaultURL( const KURL& url, const TQString& text )
{
addDefaultURL( url, getPixmap( url ), text );
}
-void KURLComboBox::addDefaultURL( const KURL& url, const QPixmap& pix,
- const QString& text )
+void KURLComboBox::addDefaultURL( const KURL& url, const TQPixmap& pix,
+ const TQString& text )
{
KURLComboItem *item = new KURLComboItem;
item->url = url;
@@ -134,12 +134,12 @@ void KURLComboBox::setDefaults()
}
}
-void KURLComboBox::setURLs( QStringList urls )
+void KURLComboBox::setURLs( TQStringList urls )
{
setURLs( urls, RemoveBottom );
}
-void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove )
+void KURLComboBox::setURLs( TQStringList urls, OverLoadResolving remove )
{
setDefaults();
itemList.clear();
@@ -147,10 +147,10 @@ void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove )
if ( urls.isEmpty() )
return;
- QStringList::Iterator it = urls.begin();
+ TQStringList::Iterator it = urls.begin();
// kill duplicates
- QString text;
+ TQString text;
while ( it != urls.end() ) {
while ( urls.contains( *it ) > 1 ) {
it = urls.remove( it );
@@ -181,7 +181,7 @@ void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove )
u = KURL::fromPathOrURL( *it );
// Don't restore if file doesn't exist anymore
- if (u.isLocalFile() && !QFile::exists(u.path())) {
+ if (u.isLocalFile() && !TQFile::exists(u.path())) {
++it;
continue;
}
@@ -210,8 +210,8 @@ void KURLComboBox::setURL( const KURL& url )
blockSignals( true );
// check for duplicates
- QMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
- QString urlToInsert = url.url(-1);
+ TQMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
+ TQString urlToInsert = url.url(-1);
while ( mit != itemMapper.end() ) {
if ( urlToInsert == mit.data()->url.url(-1) ) {
setCurrentItem( mit.key() );
@@ -235,7 +235,7 @@ void KURLComboBox::setURL( const KURL& url )
setDefaults();
- QPtrListIterator<KURLComboItem> it( itemList );
+ TQPtrListIterator<KURLComboItem> it( itemList );
for( ; it.current(); ++it )
insertURLItem( it.current() );
@@ -249,7 +249,7 @@ void KURLComboBox::setURL( const KURL& url )
kdDebug(250) << "setURL: text=" << item->text << endl;
int id = count();
- QString text = /*isEditable() ? item->url.prettyURL( myMode ) : */ item->text;
+ TQString text = /*isEditable() ? item->url.prettyURL( myMode ) : */ item->text;
if ( myMode == Directories )
KComboBox::insertItem( opendirPix, text, id );
@@ -293,7 +293,7 @@ void KURLComboBox::setMaxItems( int max )
setDefaults();
- QPtrListIterator<KURLComboItem> it( itemList );
+ TQPtrListIterator<KURLComboItem> it( itemList );
int Overload = itemList.count() - myMaximum + defaultList.count();
for ( int i = 0; i <= Overload; i++ )
++it;
@@ -312,7 +312,7 @@ void KURLComboBox::setMaxItems( int max )
void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs )
{
- QMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
+ TQMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
while ( mit != itemMapper.end() ) {
if ( url.url(-1) == mit.data()->url.url(-1) ) {
if ( !itemList.remove( mit.data() ) && checkDefaultURLs )
@@ -323,7 +323,7 @@ void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs )
blockSignals( true );
setDefaults();
- QPtrListIterator<KURLComboItem> it( itemList );
+ TQPtrListIterator<KURLComboItem> it( itemList );
while ( it.current() ) {
insertURLItem( *it );
++it;
@@ -332,7 +332,7 @@ void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs )
}
-QPixmap KURLComboBox::getPixmap( const KURL& url ) const
+TQPixmap KURLComboBox::getPixmap( const KURL& url ) const
{
if ( myMode == Directories )
return d->dirpix;
@@ -344,9 +344,9 @@ QPixmap KURLComboBox::getPixmap( const KURL& url ) const
// updates "item" with pixmap "pixmap" and sets the URL instead of text
// works around a Qt bug.
void KURLComboBox::updateItem( const KURLComboItem *item,
- int index, const QPixmap& pixmap )
+ int index, const TQPixmap& pixmap )
{
- // QComboBox::changeItem() doesn't honor the pixmap when
+ // TQComboBox::changeItem() doesn't honor the pixmap when
// using an editable combobox, so we just remove and insert
if ( editable() ) {
removeItem( index );
diff --git a/kio/kfile/kurlcombobox.h b/kio/kfile/kurlcombobox.h
index 7485bfed9..d65cd91f5 100644
--- a/kio/kfile/kurlcombobox.h
+++ b/kio/kfile/kurlcombobox.h
@@ -19,11 +19,11 @@
#ifndef KURLCOMBOBOX_H
#define KURLCOMBOBOX_H
-#include <qevent.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
+#include <tqevent.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
#include <kcombobox.h>
#include <kurl.h>
@@ -41,7 +41,7 @@
class KIO_EXPORT KURLComboBox : public KComboBox
{
Q_OBJECT
- Q_PROPERTY(QStringList urls READ urls WRITE setURLs DESIGNABLE true)
+ Q_PROPERTY(TQStringList urls READ urls WRITE setURLs DESIGNABLE true)
Q_PROPERTY(int maxItems READ maxItems WRITE setMaxItems DESIGNABLE true)
public:
@@ -73,8 +73,8 @@ public:
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- KURLComboBox( Mode mode, QWidget *parent=0, const char *name=0 );
- KURLComboBox( Mode mode, bool rw, QWidget *parent=0, const char *name=0 );
+ KURLComboBox( Mode mode, TQWidget *parent=0, const char *name=0 );
+ KURLComboBox( Mode mode, bool rw, TQWidget *parent=0, const char *name=0 );
/**
* Destructs the combo box.
*/
@@ -101,7 +101,7 @@ public:
* If the list of urls contains more items than maxItems, the first items
* will be stripped.
*/
- void setURLs( QStringList urls );
+ void setURLs( TQStringList urls );
/**
* Inserts @p urls into the combobox below the "default urls" (see
@@ -110,7 +110,7 @@ public:
* If the list of urls contains more items than maxItems, the @p remove
* parameter determines whether the first or last items will be stripped.
*/
- void setURLs( QStringList urls, OverLoadResolving remove );
+ void setURLs( TQStringList urls, OverLoadResolving remove );
/**
* @returns a list of all urls currently handled. The list contains at most
@@ -122,7 +122,7 @@ public:
* You will always get fully qualified urls, i.e. with protocol like
* file:/
*/
- QStringList urls() const;
+ TQStringList urls() const;
/**
* Sets how many items should be handled and displayed by the combobox.
@@ -144,7 +144,7 @@ public:
* the pixmap parameter.
* Default URLs will be inserted into the combobox by setDefaults()
*/
- void addDefaultURL( const KURL& url, const QString& text = QString::null );
+ void addDefaultURL( const KURL& url, const TQString& text = TQString::null );
/**
* Adds a url that will always be shown in the combobox, it can't be
@@ -154,8 +154,8 @@ public:
* the pixmap parameter.
* Default URLs will be inserted into the combobox by setDefaults()
*/
- void addDefaultURL( const KURL& url, const QPixmap& pix,
- const QString& text = QString::null );
+ void addDefaultURL( const KURL& url, const TQPixmap& pix,
+ const TQString& text = TQString::null );
/**
* Clears all items and inserts the default urls into the combo. Will be
@@ -185,14 +185,14 @@ protected slots:
protected:
struct _KURLComboItem {
- QString text;
+ TQString text;
KURL url;
- QPixmap pixmap;
+ TQPixmap pixmap;
};
typedef _KURLComboItem KURLComboItem;
- QPtrList<KURLComboItem> itemList;
- QPtrList<KURLComboItem> defaultList;
- QMap<int,const KURLComboItem*> itemMapper;
+ TQPtrList<KURLComboItem> itemList;
+ TQPtrList<KURLComboItem> defaultList;
+ TQMap<int,const KURLComboItem*> itemMapper;
void init( Mode mode );
void insertURLItem( const KURLComboItem * );
@@ -201,16 +201,16 @@ protected:
* Uses KMimeType::pixmapForURL() to return a proper pixmap for @p url.
* In directory mode, a folder icon is always returned.
*/
- QPixmap getPixmap( const KURL& url ) const;
+ TQPixmap getPixmap( const KURL& url ) const;
/**
* Updates @p item with @p pixmap and sets the url instead of the text
* of the KURLComboItem.
* Also works around a Qt bug.
*/
- void updateItem( const KURLComboItem *item, int index, const QPixmap& pix);
+ void updateItem( const KURLComboItem *item, int index, const TQPixmap& pix);
- QPixmap opendirPix;
+ TQPixmap opendirPix;
int firstItemIndex;
diff --git a/kio/kfile/kurlrequester.cpp b/kio/kfile/kurlrequester.cpp
index 0f4619fd8..ae8f5b623 100644
--- a/kio/kfile/kurlrequester.cpp
+++ b/kio/kfile/kurlrequester.cpp
@@ -20,9 +20,9 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qapplication.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
#include <kaccel.h>
#include <kcombobox.h>
@@ -44,7 +44,7 @@
class KURLDragPushButton : public KPushButton
{
public:
- KURLDragPushButton( QWidget *parent, const char *name=0 )
+ KURLDragPushButton( TQWidget *parent, const char *name=0 )
: KPushButton( parent, name ) {
setDragEnabled( true );
}
@@ -63,11 +63,11 @@ public:
*/
protected:
- virtual QDragObject *dragObject() {
+ virtual TQDragObject *dragObject() {
if ( m_urls.isEmpty() )
return 0L;
- QDragObject *drag = new KURLDrag( m_urls, this, "url drag" );
+ TQDragObject *drag = new KURLDrag( m_urls, this, "url drag" );
return drag;
}
@@ -90,7 +90,7 @@ public:
fileDialogMode = KFile::File | KFile::ExistingOnly | KFile::LocalOnly;
}
- void setText( const QString& text ) {
+ void setText( const TQString& text ) {
if ( combo )
{
if (combo->editable())
@@ -109,19 +109,19 @@ public:
}
}
- void connectSignals( QObject *receiver ) {
- QObject *sender;
+ void connectSignals( TQObject *receiver ) {
+ TQObject *sender;
if ( combo )
sender = combo;
else
sender = edit;
- connect( sender, SIGNAL( textChanged( const QString& )),
- receiver, SIGNAL( textChanged( const QString& )));
- connect( sender, SIGNAL( returnPressed() ),
- receiver, SIGNAL( returnPressed() ));
- connect( sender, SIGNAL( returnPressed( const QString& ) ),
- receiver, SIGNAL( returnPressed( const QString& ) ));
+ connect( sender, TQT_SIGNAL( textChanged( const TQString& )),
+ receiver, TQT_SIGNAL( textChanged( const TQString& )));
+ connect( sender, TQT_SIGNAL( returnPressed() ),
+ receiver, TQT_SIGNAL( returnPressed() ));
+ connect( sender, TQT_SIGNAL( returnPressed( const TQString& ) ),
+ receiver, TQT_SIGNAL( returnPressed( const TQString& ) ));
}
void setCompletionObject( KCompletion *comp ) {
@@ -134,8 +134,8 @@ public:
/**
* replaces ~user or $FOO, if necessary
*/
- QString url() {
- QString txt = combo ? combo->currentText() : edit->text();
+ TQString url() {
+ TQString txt = combo ? combo->currentText() : edit->text();
KURLCompletion *comp;
if ( combo )
comp = dynamic_cast<KURLCompletion*>(combo->completionObject());
@@ -151,19 +151,19 @@ public:
KLineEdit *edit;
KComboBox *combo;
int fileDialogMode;
- QString fileDialogFilter;
+ TQString fileDialogFilter;
};
-KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent,
+KURLRequester::KURLRequester( TQWidget *editWidget, TQWidget *parent,
const char *name )
- : QHBox( parent, name )
+ : TQHBox( parent, name )
{
d = new KURLRequesterPrivate;
// must have this as parent
- editWidget->reparent( this, 0, QPoint(0,0) );
+ editWidget->reparent( this, 0, TQPoint(0,0) );
d->edit = dynamic_cast<KLineEdit*>( editWidget );
d->combo = dynamic_cast<KComboBox*>( editWidget );
@@ -171,17 +171,17 @@ KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent,
}
-KURLRequester::KURLRequester( QWidget *parent, const char *name )
- : QHBox( parent, name )
+KURLRequester::KURLRequester( TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
d = new KURLRequesterPrivate;
init();
}
-KURLRequester::KURLRequester( const QString& url, QWidget *parent,
+KURLRequester::KURLRequester( const TQString& url, TQWidget *parent,
const char *name )
- : QHBox( parent, name )
+ : TQHBox( parent, name )
{
d = new KURLRequesterPrivate;
init();
@@ -206,33 +206,33 @@ void KURLRequester::init()
d->edit = new KLineEdit( this, "line edit" );
myButton = new KURLDragPushButton( this, "kfile button");
- QIconSet iconSet = SmallIconSet(QString::fromLatin1("fileopen"));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("fileopen"));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
myButton->setIconSet( iconSet );
myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- QToolTip::add(myButton, i18n("Open file dialog"));
+ TQToolTip::add(myButton, i18n("Open file dialog"));
- connect( myButton, SIGNAL( pressed() ), SLOT( slotUpdateURL() ));
+ connect( myButton, TQT_SIGNAL( pressed() ), TQT_SLOT( slotUpdateURL() ));
setSpacing( KDialog::spacingHint() );
- QWidget *widget = d->combo ? (QWidget*) d->combo : (QWidget*) d->edit;
+ TQWidget *widget = d->combo ? (TQWidget*) d->combo : (TQWidget*) d->edit;
widget->installEventFilter( this );
setFocusProxy( widget );
d->connectSignals( this );
- connect( myButton, SIGNAL( clicked() ), this, SLOT( slotOpenDialog() ));
+ connect( myButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpenDialog() ));
myCompletion = new KURLCompletion();
d->setCompletionObject( myCompletion );
KAccel *accel = new KAccel( this );
- accel->insert( KStdAccel::Open, this, SLOT( slotOpenDialog() ));
+ accel->insert( KStdAccel::Open, this, TQT_SLOT( slotOpenDialog() ));
accel->readSettings();
}
-void KURLRequester::setURL( const QString& url )
+void KURLRequester::setURL( const TQString& url )
{
if ( myShowLocalProt )
{
@@ -258,14 +258,14 @@ void KURLRequester::setKURL( const KURL& url )
d->setText( url.pathOrURL() );
}
-void KURLRequester::setCaption( const QString& caption )
+void KURLRequester::setCaption( const TQString& caption )
{
- QWidget::setCaption( caption );
+ TQWidget::setCaption( caption );
if (myFileDialog)
myFileDialog->setCaption( caption );
}
-QString KURLRequester::url() const
+TQString KURLRequester::url() const
{
return d->url();
}
@@ -296,7 +296,7 @@ void KURLRequester::slotOpenDialog()
dlg->setSelection( u.url() );
}
- if ( dlg->exec() != QDialog::Accepted )
+ if ( dlg->exec() != TQDialog::Accepted )
{
return;
}
@@ -324,14 +324,14 @@ unsigned int KURLRequester::mode() const
return d->fileDialogMode;
}
-void KURLRequester::setFilter(const QString &filter)
+void KURLRequester::setFilter(const TQString &filter)
{
d->fileDialogFilter = filter;
if (myFileDialog)
myFileDialog->setFilter( d->fileDialogFilter );
}
-QString KURLRequester::filter( ) const
+TQString KURLRequester::filter( ) const
{
return d->fileDialogFilter;
}
@@ -340,8 +340,8 @@ QString KURLRequester::filter( ) const
KFileDialog * KURLRequester::fileDialog() const
{
if ( !myFileDialog ) {
- QWidget *p = parentWidget();
- myFileDialog = new KFileDialog( QString::null, d->fileDialogFilter, p,
+ TQWidget *p = parentWidget();
+ myFileDialog = new KFileDialog( TQString::null, d->fileDialogFilter, p,
"file dialog", true );
myFileDialog->setMode( d->fileDialogMode );
@@ -363,7 +363,7 @@ void KURLRequester::setShowLocalProtocol( bool b )
void KURLRequester::clear()
{
- d->setText( QString::null );
+ d->setText( TQString::null );
}
KLineEdit * KURLRequester::lineEdit() const
@@ -380,19 +380,19 @@ void KURLRequester::slotUpdateURL()
{
// bin compat, myButton is declared as QPushButton
KURL u;
- u = KURL( KURL( QDir::currentDirPath() + '/' ), url() );
+ u = KURL( KURL( TQDir::currentDirPath() + '/' ), url() );
(static_cast<KURLDragPushButton *>( myButton ))->setURL( u );
}
-bool KURLRequester::eventFilter( QObject *obj, QEvent *ev )
+bool KURLRequester::eventFilter( TQObject *obj, TQEvent *ev )
{
if ( ( d->edit == obj ) || ( d->combo == obj ) )
{
- if (( ev->type() == QEvent::FocusIn ) || ( ev->type() == QEvent::FocusOut ))
+ if (( ev->type() == TQEvent::FocusIn ) || ( ev->type() == TQEvent::FocusOut ))
// Forward focusin/focusout events to the urlrequester; needed by file form element in khtml
- QApplication::sendEvent( this, ev );
+ TQApplication::sendEvent( this, ev );
}
- return QWidget::eventFilter( obj, ev );
+ return TQWidget::eventFilter( obj, ev );
}
KPushButton * KURLRequester::button() const
@@ -402,8 +402,8 @@ KPushButton * KURLRequester::button() const
KEditListBox::CustomEditor KURLRequester::customEditor()
{
- setSizePolicy(QSizePolicy( QSizePolicy::Preferred,
- QSizePolicy::Fixed));
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Preferred,
+ TQSizePolicy::Fixed));
KLineEdit *edit = d->edit;
if ( !edit && d->combo )
@@ -421,7 +421,7 @@ KEditListBox::CustomEditor KURLRequester::customEditor()
void KURLRequester::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-KURLComboRequester::KURLComboRequester( QWidget *parent,
+KURLComboRequester::KURLComboRequester( TQWidget *parent,
const char *name )
: KURLRequester( new KComboBox(false), parent, name)
{
diff --git a/kio/kfile/kurlrequester.h b/kio/kfile/kurlrequester.h
index 1a7016b24..b22e353dd 100644
--- a/kio/kfile/kurlrequester.h
+++ b/kio/kfile/kurlrequester.h
@@ -20,7 +20,7 @@
#ifndef KURLREQUESTER_H
#define KURLREQUESTER_H
-#include <qhbox.h>
+#include <tqhbox.h>
#include <keditlistbox.h>
#include <kfile.h>
@@ -56,22 +56,22 @@ class QTimer;
class KIO_EXPORT KURLRequester : public QHBox
{
Q_OBJECT
- Q_PROPERTY( QString url READ url WRITE setURL )
+ Q_PROPERTY( TQString url READ url WRITE setURL )
Q_PROPERTY( bool showLocalProtocol READ showLocalProtocol WRITE setShowLocalProtocol )
- Q_PROPERTY( QString filter READ filter WRITE setFilter )
+ Q_PROPERTY( TQString filter READ filter WRITE setFilter )
Q_PROPERTY( uint mode READ mode WRITE setMode )
public:
/**
* Constructs a KURLRequester widget.
*/
- KURLRequester( QWidget *parent=0, const char *name=0 );
+ KURLRequester( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a KURLRequester widget with the initial URL @p url.
* // TODO KDE4: Use KURL instead
*/
- KURLRequester( const QString& url, QWidget *parent=0, const char *name=0 );
+ KURLRequester( const TQString& url, TQWidget *parent=0, const char *name=0 );
/**
* Special constructor, which creates a KURLRequester widget with a custom
@@ -79,7 +79,7 @@ public:
* (or inherited thereof). Note: for geometry management reasons, the
* edit-widget is reparented to have the KURLRequester as parent.
*/
- KURLRequester( QWidget *editWidget, QWidget *parent, const char *name=0 );
+ KURLRequester( TQWidget *editWidget, TQWidget *parent, const char *name=0 );
/**
* Destructs the KURLRequester.
*/
@@ -91,7 +91,7 @@ public:
* for local files.
* // TODO KDE4: Use KURL so that the result is properly defined
*/
- QString url() const;
+ TQString url() const;
/**
* Enables/disables showing file:/ in the lineedit, when a local file has
@@ -121,14 +121,14 @@ public:
* Sets the filter for the file dialog.
* @see KFileDialog::setFilter()
*/
- void setFilter( const QString& filter );
+ void setFilter( const TQString& filter );
/**
* Returns the current filter for the file dialog.
* @see KFileDialog::filter()
* @since 3.3
*/
- QString filter() const;
+ TQString filter() const;
/**
* @returns whether local files will be prefixed with file:/ in the
@@ -194,7 +194,7 @@ public slots:
* @since 3.1
* // TODO KDE4: Use KURL instead
*/
- void setURL( const QString& url );
+ void setURL( const TQString& url );
/**
* Sets the url in the lineedit to @p url.
@@ -207,7 +207,7 @@ public slots:
* Sets the caption of the file dialog.
* @since 3.1
*/
- virtual void setCaption( const QString& caption );
+ virtual void setCaption( const TQString& caption );
/**
* Clears the lineedit/combobox.
@@ -221,7 +221,7 @@ signals:
* The parameter contains the contents of the lineedit.
* @since 3.1
*/
- void textChanged( const QString& );
+ void textChanged( const TQString& );
/**
* Emitted when return or enter was pressed in the lineedit.
@@ -232,7 +232,7 @@ signals:
* Emitted when return or enter was pressed in the lineedit.
* The parameter contains the contents of the lineedit.
*/
- void returnPressed( const QString& );
+ void returnPressed( const TQString& );
/**
* Emitted before the filedialog is going to open. Connect
@@ -252,7 +252,7 @@ signals:
* The parameter contains the contents of the lineedit.
* // TODO KDE4: Use KURL instead
*/
- void urlSelected( const QString& );
+ void urlSelected( const TQString& );
protected:
void init();
@@ -278,7 +278,7 @@ private slots:
protected:
virtual void virtual_hook( int id, void* data );
- bool eventFilter( QObject *obj, QEvent *ev );
+ bool eventFilter( TQObject *obj, TQEvent *ev );
private:
class KURLRequesterPrivate;
KURLRequesterPrivate *d;
@@ -294,7 +294,7 @@ public:
/**
* Constructs a KURLRequester widget with a combobox.
*/
- KURLComboRequester( QWidget *parent=0, const char *name=0 );
+ KURLComboRequester( TQWidget *parent=0, const char *name=0 );
};
diff --git a/kio/kfile/kurlrequesterdlg.cpp b/kio/kfile/kurlrequesterdlg.cpp
index ed89f599b..19409afdc 100644
--- a/kio/kfile/kurlrequesterdlg.cpp
+++ b/kio/kfile/kurlrequesterdlg.cpp
@@ -21,10 +21,10 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqtoolbutton.h>
#include <kaccel.h>
#include <kfiledialog.h>
@@ -39,16 +39,16 @@
#include "kurlrequesterdlg.h"
-KURLRequesterDlg::KURLRequesterDlg( const QString& urlName, QWidget *parent,
+KURLRequesterDlg::KURLRequesterDlg( const TQString& urlName, TQWidget *parent,
const char *name, bool modal )
- : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, parent, name,
+ : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, parent, name,
modal, true, KStdGuiItem::clear() )
{
initDialog(i18n( "Location:" ), urlName);
}
-KURLRequesterDlg::KURLRequesterDlg( const QString& urlName, const QString& _text, QWidget *parent, const char *name, bool modal )
- : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, parent, name,
+KURLRequesterDlg::KURLRequesterDlg( const TQString& urlName, const TQString& _text, TQWidget *parent, const char *name, bool modal )
+ : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, parent, name,
modal, true, KStdGuiItem::clear() )
{
initDialog(_text, urlName);
@@ -58,20 +58,20 @@ KURLRequesterDlg::~KURLRequesterDlg()
{
}
-void KURLRequesterDlg::initDialog(const QString &text,const QString &urlName)
+void KURLRequesterDlg::initDialog(const TQString &text,const TQString &urlName)
{
- QVBoxLayout * topLayout = new QVBoxLayout( plainPage(), 0,
+ TQVBoxLayout * topLayout = new TQVBoxLayout( plainPage(), 0,
spacingHint() );
- QLabel * label = new QLabel( text , plainPage() );
+ TQLabel * label = new TQLabel( text , plainPage() );
topLayout->addWidget( label );
urlRequester_ = new KURLRequester( urlName, plainPage(), "urlRequester" );
urlRequester_->setMinimumWidth( urlRequester_->sizeHint().width() * 3 );
topLayout->addWidget( urlRequester_ );
urlRequester_->setFocus();
- connect( urlRequester_->lineEdit(), SIGNAL(textChanged(const QString&)),
- SLOT(slotTextChanged(const QString&)) );
+ connect( urlRequester_->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotTextChanged(const TQString&)) );
bool state = !urlName.isEmpty();
enableButtonOK( state );
enableButton( KDialogBase::User1, state );
@@ -80,10 +80,10 @@ void KURLRequesterDlg::initDialog(const QString &text,const QString &urlName)
KFile::ExistingOnly );
urlRequester_->setMode( mode );
*/
- connect( this, SIGNAL( user1Clicked() ), SLOT( slotClear() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotClear() ) );
}
-void KURLRequesterDlg::slotTextChanged(const QString & text)
+void KURLRequesterDlg::slotTextChanged(const TQString & text)
{
bool state = !text.stripWhiteSpace().isEmpty();
enableButtonOK( state );
@@ -97,15 +97,15 @@ void KURLRequesterDlg::slotClear()
KURL KURLRequesterDlg::selectedURL() const
{
- if ( result() == QDialog::Accepted )
+ if ( result() == TQDialog::Accepted )
return KURL::fromPathOrURL( urlRequester_->url() );
else
return KURL();
}
-KURL KURLRequesterDlg::getURL(const QString& dir, QWidget *parent,
- const QString& caption)
+KURL KURLRequesterDlg::getURL(const TQString& dir, TQWidget *parent,
+ const TQString& caption)
{
KURLRequesterDlg dlg(dir, parent, "filedialog", true);
diff --git a/kio/kfile/kurlrequesterdlg.h b/kio/kfile/kurlrequesterdlg.h
index a4f2cf0f3..3f13a844d 100644
--- a/kio/kfile/kurlrequesterdlg.h
+++ b/kio/kfile/kurlrequesterdlg.h
@@ -43,7 +43,7 @@ public:
/**
* Constructs a KURLRequesterDlg.
*
- * @param url The url of the directory to start in. Use QString::null
+ * @param url The url of the directory to start in. Use TQString::null
* to start in the current working directory, or the last
* directory where a file has been selected.
* @param parent The parent object of this widget.
@@ -51,13 +51,13 @@ public:
* @param modal Specifies whether the dialog should be opened as modal
* or not.
*/
- KURLRequesterDlg( const QString& url, QWidget *parent,
+ KURLRequesterDlg( const TQString& url, TQWidget *parent,
const char *name, bool modal = true );
/**
* Constructs a KURLRequesterDlg.
*
- * @param url The url of the directory to start in. Use QString::null
+ * @param url The url of the directory to start in. Use TQString::null
* to start in the current working directory, or the last
* directory where a file has been selected.
* @param text Text of the label
@@ -66,8 +66,8 @@ public:
* @param modal Specifies whether the dialog should be opened as modal
* or not.
*/
- KURLRequesterDlg( const QString& url, const QString& text,
- QWidget *parent, const char *name, bool modal=true );
+ KURLRequesterDlg( const TQString& url, const TQString& text,
+ TQWidget *parent, const char *name, bool modal=true );
/**
* Destructs the dialog.
*/
@@ -85,8 +85,8 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The caption to use for the dialog.
*/
- static KURL getURL(const QString& url = QString::null,
- QWidget *parent= 0, const QString& caption = QString::null);
+ static KURL getURL(const TQString& url = TQString::null,
+ TQWidget *parent= 0, const TQString& caption = TQString::null);
/**
* Returns a pointer to the file dialog used by the KURLRequester.
@@ -99,9 +99,9 @@ public:
private slots:
void slotClear();
- void slotTextChanged(const QString &);
+ void slotTextChanged(const TQString &);
private:
- void initDialog(const QString &text, const QString &url);
+ void initDialog(const TQString &text, const TQString &url);
KURLRequester *urlRequester_;
class KURLRequesterDlgPrivate;
diff --git a/kio/kfile/tests/kdirselectdialogtest.cpp b/kio/kfile/tests/kdirselectdialogtest.cpp
index e2eb52f1b..47fcd02ca 100644
--- a/kio/kfile/tests/kdirselectdialogtest.cpp
+++ b/kio/kfile/tests/kdirselectdialogtest.cpp
@@ -7,10 +7,10 @@ int main( int argc, char **argv )
{
KApplication app(argc, argv, "kdirselectdialogtest");
- KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : QString::null );
+ KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : TQString::null );
if ( u.isValid() )
KMessageBox::information( 0L,
- QString::fromLatin1("You selected the url: %1")
+ TQString::fromLatin1("You selected the url: %1")
.arg( u.prettyURL() ), "Selected URL" );
return 0;
diff --git a/kio/kfile/tests/kfdtest.cpp b/kio/kfile/tests/kfdtest.cpp
index d9341a7ae..25e2da949 100644
--- a/kio/kfile/tests/kfdtest.cpp
+++ b/kio/kfile/tests/kfdtest.cpp
@@ -1,31 +1,31 @@
#include "kfdtest.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kfiledialog.h>
#include <kapplication.h>
#include <kmessagebox.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-KFDTest::KFDTest( const QString& startDir, QObject *parent, const char *name )
- : QObject( parent, name ),
+KFDTest::KFDTest( const TQString& startDir, TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_startDir( startDir )
{
- QTimer::singleShot( 1000, this, SLOT( doit() ));
+ TQTimer::singleShot( 1000, this, TQT_SLOT( doit() ));
}
void KFDTest::doit()
{
- KFileDialog *dlg = new KFileDialog( m_startDir, QString::null, 0L,
+ KFileDialog *dlg = new KFileDialog( m_startDir, TQString::null, 0L,
"file dialog", true );
dlg->setMode( KFile::File);
dlg->setOperationMode( KFileDialog::Saving );
- QStringList filter;
+ TQStringList filter;
filter << "all/allfiles" << "text/plain";
dlg->setMimeFilter( filter, "all/allfiles" );
if ( dlg->exec() == KDialog::Accepted )
{
- KMessageBox::information(0, QString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() ));
+ KMessageBox::information(0, TQString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() ));
}
// qApp->quit();
diff --git a/kio/kfile/tests/kfdtest.h b/kio/kfile/tests/kfdtest.h
index 0743bb96c..3f980bc94 100644
--- a/kio/kfile/tests/kfdtest.h
+++ b/kio/kfile/tests/kfdtest.h
@@ -8,20 +8,20 @@
#ifndef KFDTEST_H
#define KFDTEST_H
-#include <qobject.h>
+#include <tqobject.h>
class KFDTest : public QObject
{
Q_OBJECT
public:
- KFDTest( const QString& startDir, QObject *parent = 0, const char *name = 0);
+ KFDTest( const TQString& startDir, TQObject *parent = 0, const char *name = 0);
public slots:
void doit();
private:
- QString m_startDir;
+ TQString m_startDir;
};
diff --git a/kio/kfile/tests/kfiletreeviewtest.cpp b/kio/kfile/tests/kfiletreeviewtest.cpp
index 6a4ea719f..5c520dd5d 100644
--- a/kio/kfile/tests/kfiletreeviewtest.cpp
+++ b/kio/kfile/tests/kfiletreeviewtest.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <kglobal.h>
#include <kiconloader.h>
@@ -45,30 +45,30 @@ testFrame::testFrame():KMainWindow(0,"Test FileTreeView"),
/* Connect to see the status bar */
KStatusBar* sta = statusBar();
- connect( treeView, SIGNAL( onItem( const QString& )),
- sta, SLOT( message( const QString& )));
+ connect( treeView, TQT_SIGNAL( onItem( const TQString& )),
+ sta, TQT_SLOT( message( const TQString& )));
- connect( treeView, SIGNAL( dropped( QWidget*, QDropEvent*, KURL::List& )),
- this, SLOT( urlsDropped( QWidget*, QDropEvent*, KURL::List& )));
+ connect( treeView, TQT_SIGNAL( dropped( TQWidget*, TQDropEvent*, KURL::List& )),
+ this, TQT_SLOT( urlsDropped( TQWidget*, TQDropEvent*, KURL::List& )));
- connect( treeView, SIGNAL( dropped( KURL::List&, KURL& )), this,
- SLOT( copyURLs( KURL::List&, KURL& )));
+ connect( treeView, TQT_SIGNAL( dropped( KURL::List&, KURL& )), this,
+ TQT_SLOT( copyURLs( KURL::List&, KURL& )));
treeView->addColumn( "File" );
treeView->addColumn( "ChildCount" );
setCentralWidget( treeView );
resize( 600, 400 );
- showPath( KURL::fromPathOrURL( QDir::homeDirPath() ));
+ showPath( KURL::fromPathOrURL( TQDir::homeDirPath() ));
}
void testFrame::showPath( const KURL &url )
{
- QString fname = "TestBranch"; // url.fileName ();
+ TQString fname = "TestBranch"; // url.fileName ();
/* try a user icon */
KIconLoader *loader = KGlobal::iconLoader();
- QPixmap pix = loader->loadIcon( "contents2", KIcon::Small );
- QPixmap pixOpen = loader->loadIcon( "contents", KIcon::Small );
+ TQPixmap pix = loader->loadIcon( "contents2", KIcon::Small );
+ TQPixmap pixOpen = loader->loadIcon( "contents", KIcon::Small );
KFileTreeBranch *nb = treeView->addBranch( url, fname, pix );
@@ -77,10 +77,10 @@ void testFrame::showPath( const KURL &url )
if( dirOnlyMode ) treeView->setDirOnlyMode( nb, true );
nb->setOpenPixmap( pixOpen );
- connect( nb, SIGNAL(populateFinished(KFileTreeViewItem*)),
- this, SLOT(slotPopulateFinished(KFileTreeViewItem*)));
- connect( nb, SIGNAL( directoryChildCount( KFileTreeViewItem *, int )),
- this, SLOT( slotSetChildCount( KFileTreeViewItem*, int )));
+ connect( nb, TQT_SIGNAL(populateFinished(KFileTreeViewItem*)),
+ this, TQT_SLOT(slotPopulateFinished(KFileTreeViewItem*)));
+ connect( nb, TQT_SIGNAL( directoryChildCount( KFileTreeViewItem *, int )),
+ this, TQT_SLOT( slotSetChildCount( KFileTreeViewItem*, int )));
// nb->setChildRecurse(false );
nb->setOpen(true);
@@ -89,7 +89,7 @@ void testFrame::showPath( const KURL &url )
}
-void testFrame::urlsDropped( QWidget* , QDropEvent* , KURL::List& list )
+void testFrame::urlsDropped( TQWidget* , TQDropEvent* , KURL::List& list )
{
KURL::List::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it ) {
@@ -117,7 +117,7 @@ void testFrame::slotPopulateFinished(KFileTreeViewItem *item )
kdDebug() << "setting column 2 of treeview with count " << cc << endl;
- item->setText( 1, QString::number( cc ));
+ item->setText( 1, TQString::number( cc ));
#endif
}
else
@@ -129,16 +129,16 @@ void testFrame::slotPopulateFinished(KFileTreeViewItem *item )
void testFrame::slotSetChildCount( KFileTreeViewItem *item, int c )
{
if( item )
- item->setText(1, QString::number( c ));
+ item->setText(1, TQString::number( c ));
}
int main(int argc, char **argv)
{
KApplication a(argc, argv, "kfiletreeviewtest");
- QString name1;
- QStringList names;
+ TQString name1;
+ TQStringList names;
- QString argv1;
+ TQString argv1;
testFrame *tf;
tf = new testFrame();
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
{
for( int i = 1; i < argc; i++ )
{
- argv1 = QString::fromLatin1(argv[i]);
+ argv1 = TQString::fromLatin1(argv[i]);
kdDebug() << "Opening " << argv1 << endl;
if( argv1 == "-d" )
tf->setDirOnly();
diff --git a/kio/kfile/tests/kfiletreeviewtest.h b/kio/kfile/tests/kfiletreeviewtest.h
index 1286e1be2..4ae791ce5 100644
--- a/kio/kfile/tests/kfiletreeviewtest.h
+++ b/kio/kfile/tests/kfiletreeviewtest.h
@@ -31,7 +31,7 @@ public slots:
void slotPopulateFinished(KFileTreeViewItem *);
void slotSetChildCount( KFileTreeViewItem *item, int c );
- void urlsDropped( QWidget*, QDropEvent*, KURL::List& );
+ void urlsDropped( TQWidget*, TQDropEvent*, KURL::List& );
void copyURLs( KURL::List& list, KURL& to );
private:
KFileTreeView *treeView;
diff --git a/kio/kfile/tests/kfstest.cpp b/kio/kfile/tests/kfstest.cpp
index 16d74cb0c..b84cbc967 100644
--- a/kio/kfile/tests/kfstest.cpp
+++ b/kio/kfile/tests/kfstest.cpp
@@ -23,10 +23,10 @@
#include <unistd.h>
#include <stdlib.h>
#include <sys/stat.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include <kfiledialog.h>
#include <kfileiconview.h>
@@ -45,17 +45,17 @@
int main(int argc, char **argv)
{
KApplication a(argc, argv, "kfstest");
- QString name1;
- QStringList names;
+ TQString name1;
+ TQStringList names;
- QString argv1;
- QString startDir;
+ TQString argv1;
+ TQString startDir;
if (argc > 1)
- argv1 = QString::fromLatin1(argv[1]);
+ argv1 = TQString::fromLatin1(argv[1]);
if ( argc > 2 )
- startDir = QString::fromLatin1( argv[2]);
+ startDir = TQString::fromLatin1( argv[2]);
- if (argv1 == QString::fromLatin1("diroperator")) {
+ if (argv1 == TQString::fromLatin1("diroperator")) {
KDirOperator *op = new KDirOperator(startDir, 0, "operator");
op->setViewConfig( KGlobal::config(), "TestGroup" );
op->setView(KFile::Simple);
@@ -64,73 +64,73 @@ int main(int argc, char **argv)
a.exec();
}
- else if (argv1 == QString::fromLatin1("justone")) {
- QString name = KFileDialog::getOpenFileName(startDir);
+ else if (argv1 == TQString::fromLatin1("justone")) {
+ TQString name = KFileDialog::getOpenFileName(startDir);
qDebug("filename=%s",name.latin1());
}
- else if (argv1 == QString::fromLatin1("existingURL")) {
+ else if (argv1 == TQString::fromLatin1("existingURL")) {
KURL url = KFileDialog::getExistingURL();
qDebug("URL=%s",url.url().latin1());
name1 = url.url();
}
- else if (argv1 == QString::fromLatin1("preview")) {
+ else if (argv1 == TQString::fromLatin1("preview")) {
KURL u = KFileDialog::getImageOpenURL();
qDebug("filename=%s", u.url().latin1());
}
- else if (argv1 == QString::fromLatin1("preselect")) {
- names = KFileDialog::getOpenFileNames(QString::fromLatin1("/etc/passwd"));
- QStringList::Iterator it = names.begin();
+ else if (argv1 == TQString::fromLatin1("preselect")) {
+ names = KFileDialog::getOpenFileNames(TQString::fromLatin1("/etc/passwd"));
+ TQStringList::Iterator it = names.begin();
while ( it != names.end() ) {
qDebug("selected file: %s", (*it).latin1());
++it;
}
}
- else if (argv1 == QString::fromLatin1("dirs"))
+ else if (argv1 == TQString::fromLatin1("dirs"))
name1 = KFileDialog::getExistingDirectory();
- else if (argv1 == QString::fromLatin1("heap")) {
- KFileDialog *dlg = new KFileDialog( startDir, QString::null, 0L,
+ else if (argv1 == TQString::fromLatin1("heap")) {
+ KFileDialog *dlg = new KFileDialog( startDir, TQString::null, 0L,
"file dialog", true );
dlg->setMode( KFile::File);
dlg->setOperationMode( KFileDialog::Saving );
- QStringList filter;
+ TQStringList filter;
filter << "all/allfiles" << "text/plain";
dlg->setMimeFilter( filter, "all/allfiles" );
KURLBar *urlBar = dlg->speedBar();
if ( urlBar )
{
urlBar->insertDynamicItem( KURL("ftp://ftp.kde.org"),
- QString::fromLatin1("KDE FTP Server") );
+ TQString::fromLatin1("KDE FTP Server") );
}
if ( dlg->exec() == KDialog::Accepted )
name1 = dlg->selectedURL().url();
}
- else if ( argv1 == QString::fromLatin1("eventloop") )
+ else if ( argv1 == TQString::fromLatin1("eventloop") )
{
KFDTest *test = new KFDTest( startDir );
return a.exec();
}
- else if (argv1 == QString::fromLatin1("save")) {
+ else if (argv1 == TQString::fromLatin1("save")) {
KURL u = KFileDialog::getSaveURL();
-// QString(QDir::homeDirPath() + QString::fromLatin1("/testfile")),
-// QString::null, 0L);
+// TQString(TQDir::homeDirPath() + TQString::fromLatin1("/testfile")),
+// TQString::null, 0L);
name1 = u.url();
}
- else if (argv1 == QString::fromLatin1("icon")) {
+ else if (argv1 == TQString::fromLatin1("icon")) {
KIconDialog dlg;
- QString icon = dlg.selectIcon();
+ TQString icon = dlg.selectIcon();
kdDebug() << icon << endl;
}
-// else if ( argv1 == QString::fromLatin1("dirselect") ) {
+// else if ( argv1 == TQString::fromLatin1("dirselect") ) {
// KURL url;
// url.setPath( "/" );
// KURL selected = KDirSelectDialog::selectDirectory( url );
@@ -140,7 +140,7 @@ int main(int argc, char **argv)
else {
KFileDialog dlg(startDir,
- QString::fromLatin1("*|All Files\n"
+ TQString::fromLatin1("*|All Files\n"
"*.lo *.o *.la|All libtool Files"),
0, 0, true);
// dlg.setFilter( "*.kdevelop" );
@@ -148,14 +148,14 @@ int main(int argc, char **argv)
KFile::Directory |
KFile::ExistingOnly |
KFile::LocalOnly) );
-// QStringList filter;
+// TQStringList filter;
// filter << "text/plain" << "text/html" << "image/png";
// dlg.setMimeFilter( filter );
// KMimeType::List types;
// types.append( KMimeType::mimeType( "text/plain" ) );
// types.append( KMimeType::mimeType( "text/html" ) );
// dlg.setFilterMimeType( "Filetypes:", types, types.first() );
- if ( dlg.exec() == QDialog::Accepted ) {
+ if ( dlg.exec() == TQDialog::Accepted ) {
KURL::List list = dlg.selectedURLs();
KURL::List::ConstIterator it = list.begin();
qDebug("*** selectedURLs(): ");
@@ -167,8 +167,8 @@ int main(int argc, char **argv)
qDebug("*** selectedFile: %s", dlg.selectedFile().latin1());
qDebug("*** selectedURL: %s", dlg.selectedURL().url().latin1());
qDebug("*** selectedFiles: ");
- QStringList l = dlg.selectedFiles();
- QStringList::Iterator it2 = l.begin();
+ TQStringList l = dlg.selectedFiles();
+ TQStringList::Iterator it2 = l.begin();
while ( it2 != l.end() ) {
qDebug(" -> %s", (*it2).latin1());
++it2;
@@ -177,7 +177,7 @@ int main(int argc, char **argv)
}
if (!(name1.isNull()))
- KMessageBox::information(0, QString::fromLatin1("You selected the file " ) + name1,
- QString::fromLatin1("Your Choice"));
+ KMessageBox::information(0, TQString::fromLatin1("You selected the file " ) + name1,
+ TQString::fromLatin1("Your Choice"));
return 0;
}
diff --git a/kio/kfile/tests/kopenwithtest.cpp b/kio/kfile/tests/kopenwithtest.cpp
index 96e18bcc2..ea348a94c 100644
--- a/kio/kfile/tests/kopenwithtest.cpp
+++ b/kio/kfile/tests/kopenwithtest.cpp
@@ -19,9 +19,9 @@
*/
#include <kapplication.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qdir.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
#include <kopenwith.h>
#include <kurl.h>
#include <kdebug.h>
@@ -53,7 +53,7 @@ int main(int argc, char **argv)
delete dlg;
// Test with a mimetype
- QString mimetype = "text/plain";
+ TQString mimetype = "text/plain";
dlg = new KOpenWithDlg( mimetype, "kedit", 0);
if(dlg->exec()) {
kdDebug() << "Dialog ended successfully\ntext: " << dlg->text() << endl;
diff --git a/kio/kfile/tests/kurlrequestertest.cpp b/kio/kfile/tests/kurlrequestertest.cpp
index 5601f4922..9248eec5d 100644
--- a/kio/kfile/tests/kurlrequestertest.cpp
+++ b/kio/kfile/tests/kurlrequestertest.cpp
@@ -10,7 +10,7 @@ int main( int argc, char **argv )
qDebug( "Selected url: %s", url.url().latin1());
KURLRequester *req = new KURLRequester();
- KEditListBox *el = new KEditListBox( QString::fromLatin1("Test"), req->customEditor() );
+ KEditListBox *el = new KEditListBox( TQString::fromLatin1("Test"), req->customEditor() );
el->show();
return app.exec();
}
diff --git a/kio/kio/authinfo.cpp b/kio/kio/authinfo.cpp
index 1415c14ae..d4aa27353 100644
--- a/kio/kio/authinfo.cpp
+++ b/kio/kio/authinfo.cpp
@@ -26,8 +26,8 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -72,7 +72,7 @@ AuthInfo& AuthInfo::operator= ( const AuthInfo& info )
return *this;
}
-QDataStream& KIO::operator<< (QDataStream& s, const AuthInfo& a)
+TQDataStream& KIO::operator<< (TQDataStream& s, const AuthInfo& a)
{
s << a.url << a.username << a.password << a.prompt << a.caption
<< a.comment << a.commentLabel << a.realmValue << a.digestInfo
@@ -81,7 +81,7 @@ QDataStream& KIO::operator<< (QDataStream& s, const AuthInfo& a)
return s;
}
-QDataStream& KIO::operator>> (QDataStream& s, AuthInfo& a)
+TQDataStream& KIO::operator>> (TQDataStream& s, AuthInfo& a)
{
Q_UINT8 verify = 0;
Q_UINT8 ro = 0;
@@ -120,7 +120,7 @@ NetRC* NetRC::self()
}
bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
- QString type, int mode )
+ TQString type, int mode )
{
// kdDebug() << "AutoLogin lookup for: " << url.host() << endl;
if ( !url.isValid() )
@@ -133,12 +133,12 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
{
loginMap.clear();
- QString filename = locateLocal("config", "kionetrc");
+ TQString filename = locateLocal("config", "kionetrc");
bool status = parse (openf (filename));
if ( userealnetrc )
{
- filename = QDir::homeDirPath()+ QDir::separator() + ".netrc";
+ filename = TQDir::homeDirPath()+ TQDir::separator() + ".netrc";
status |= parse (openf(filename));
}
@@ -158,7 +158,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
AutoLogin &log = *it;
if ( (mode & defaultOnly) == defaultOnly &&
- log.machine == QString::fromLatin1("default") &&
+ log.machine == TQString::fromLatin1("default") &&
(login.login.isEmpty() || login.login == log.login) )
{
login.type = log.type;
@@ -169,7 +169,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
}
if ( (mode & presetOnly) == presetOnly &&
- log.machine == QString::fromLatin1("preset") &&
+ log.machine == TQString::fromLatin1("preset") &&
(login.login.isEmpty() || login.login == log.login) )
{
login.type = log.type;
@@ -195,10 +195,10 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc,
return true;
}
-int NetRC::openf( const QString& f )
+int NetRC::openf( const TQString& f )
{
KDE_struct_stat sbuff;
- QCString ef = QFile::encodeName(f);
+ TQCString ef = TQFile::encodeName(f);
if ( KDE_stat(ef, &sbuff) != 0 )
return -1;
@@ -210,7 +210,7 @@ int NetRC::openf( const QString& f )
return KDE_open( ef, O_RDONLY );
}
-QString NetRC::extract( const char* buf, const char* key, int& pos )
+TQString NetRC::extract( const char* buf, const char* key, int& pos )
{
int idx = pos;
int m_len = strlen(key);
@@ -237,12 +237,12 @@ QString NetRC::extract( const char* buf, const char* key, int& pos )
if ( idx > start )
{
pos = idx;
- return QString::fromLatin1( buf+start, idx-start);
+ return TQString::fromLatin1( buf+start, idx-start);
}
}
}
- return QString::null;
+ return TQString::null;
}
bool NetRC::parse( int fd )
@@ -250,8 +250,8 @@ bool NetRC::parse( int fd )
if (fd == -1)
return false;
- QString type;
- QString macro;
+ TQString type;
+ TQString macro;
uint index = 0;
bool isMacro = false;
@@ -280,7 +280,7 @@ bool NetRC::parse( int fd )
while( buf[tail-1] == '\n' || buf[tail-1] =='\r' )
tail--;
- QString mac = QString::fromLatin1(buf, tail).stripWhiteSpace();
+ TQString mac = TQString::fromLatin1(buf, tail).stripWhiteSpace();
if ( !mac.isEmpty() )
loginMap[type][index].macdef[macro].append( mac );
@@ -294,12 +294,12 @@ bool NetRC::parse( int fd )
if (strncasecmp(buf+pos, "default", 7) == 0 )
{
pos += 7;
- l.machine = QString::fromLatin1("default");
+ l.machine = TQString::fromLatin1("default");
}
else if (strncasecmp(buf+pos, "preset", 6) == 0 )
{
pos += 6;
- l.machine = QString::fromLatin1("preset");
+ l.machine = TQString::fromLatin1("preset");
}
}
// kdDebug() << "Machine: " << l.machine << endl;
@@ -314,7 +314,7 @@ bool NetRC::parse( int fd )
type = l.type = extract( buf, "type", pos );
if ( l.type.isEmpty() && !l.machine.isEmpty() )
- type = l.type = QString::fromLatin1("ftp");
+ type = l.type = TQString::fromLatin1("ftp");
// kdDebug() << "Type: " << l.type << endl;
macro = extract( buf, "macdef", pos );
diff --git a/kio/kio/authinfo.h b/kio/kio/authinfo.h
index 2beb4f7bf..3f92e58d1 100644
--- a/kio/kio/authinfo.h
+++ b/kio/kio/authinfo.h
@@ -21,8 +21,8 @@
#ifndef __KIO_AUTHINFO_H
#define __KIO_AUTHINFO_H
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <kurl.h>
@@ -50,8 +50,8 @@ namespace KIO {
*/
class KIO_EXPORT AuthInfo
{
- KIO_EXPORT friend QDataStream& operator<< (QDataStream& s, const AuthInfo& a);
- KIO_EXPORT friend QDataStream& operator>> (QDataStream& s, AuthInfo& a);
+ KIO_EXPORT friend TQDataStream& operator<< (TQDataStream& s, const AuthInfo& a);
+ KIO_EXPORT friend TQDataStream& operator>> (TQDataStream& s, AuthInfo& a);
public:
/**
@@ -96,12 +96,12 @@ public:
/**
* This is @em required for caching.
*/
- QString username;
+ TQString username;
/**
* This is @em required for caching.
*/
- QString password;
+ TQString password;
/**
* Information to be displayed when prompting
@@ -112,7 +112,7 @@ public:
*
* This setting is @em optional and empty by default.
*/
- QString prompt;
+ TQString prompt;
/**
* The text to displayed in the title bar of
@@ -123,7 +123,7 @@ public:
*
* This setting is @em optional and empty by default.
*/
- QString caption;
+ TQString caption;
/**
* Additional comment to be displayed when prompting
@@ -147,7 +147,7 @@ public:
*
* This setting is @em optional and empty by default.
*/
- QString comment;
+ TQString comment;
/**
* Descriptive label to be displayed in front of the
@@ -156,7 +156,7 @@ public:
* This setting is @em optional and only applicable when
* the comment field is also set.
*/
- QString commentLabel;
+ TQString commentLabel;
/**
* A unique identifier that allows caching of multiple
@@ -174,7 +174,7 @@ public:
*
* This setting is @em optional and not set by default.
*/
- QString realmValue;
+ TQString realmValue;
/**
* Field to store any extra authentication information for
@@ -184,7 +184,7 @@ public:
* protocol. However, any protocol can make use of it to
* store extra info.
*/
- QString digestInfo;
+ TQString digestInfo;
/**
* Flag that, if set, indicates whether a path match should be
@@ -225,8 +225,8 @@ private:
class AuthInfoPrivate* d;
};
-KIO_EXPORT QDataStream& operator<< (QDataStream& s, const AuthInfo& a);
-KIO_EXPORT QDataStream& operator>> (QDataStream& s, AuthInfo& a);
+KIO_EXPORT TQDataStream& operator<< (TQDataStream& s, const AuthInfo& a);
+KIO_EXPORT TQDataStream& operator>> (TQDataStream& s, AuthInfo& a);
/**
* A Singleton class that provides access to passwords
@@ -264,11 +264,11 @@ public:
*/
struct AutoLogin
{
- QString type;
- QString machine;
- QString login;
- QString password;
- QMap<QString, QStringList> macdef;
+ TQString type;
+ TQString machine;
+ TQString login;
+ TQString password;
+ TQMap<TQString, TQStringList> macdef;
};
/**
@@ -289,7 +289,7 @@ public:
*/
bool lookup( const KURL& url, AutoLogin& login,
bool userealnetrc = false,
- QString type = QString::null,
+ TQString type = TQString::null,
int mode = (exactOnly|defaultOnly) );
/**
* Reloads the auto login information.
@@ -297,8 +297,8 @@ public:
void reload() { isDirty = true; }
protected:
- QString extract( const char*, const char*, int& );
- int openf( const QString& );
+ TQString extract( const char*, const char*, int& );
+ int openf( const TQString& );
bool parse( int );
private:
@@ -308,8 +308,8 @@ private:
private:
bool isDirty;
- typedef QValueList<AutoLogin> LoginList;
- typedef QMap<QString, LoginList> LoginMap;
+ typedef TQValueList<AutoLogin> LoginList;
+ typedef TQMap<TQString, LoginList> LoginMap;
LoginMap loginMap;
static NetRC* instance;
diff --git a/kio/kio/chmodjob.cpp b/kio/kio/chmodjob.cpp
index 5f00aa30c..e1d343c10 100644
--- a/kio/kio/chmodjob.cpp
+++ b/kio/kio/chmodjob.cpp
@@ -27,8 +27,8 @@
#include <unistd.h>
#include <assert.h>
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -48,7 +48,7 @@ ChmodJob::ChmodJob( const KFileItemList& lstItems, int permissions, int mask,
m_newOwner( newOwner ), m_newGroup( newGroup ),
m_recursive( recursive ), m_lstItems( lstItems )
{
- QTimer::singleShot( 0, this, SLOT(processList()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(processList()) );
}
void ChmodJob::processList()
@@ -63,12 +63,12 @@ void ChmodJob::processList()
info.url = item->url();
// This is a toplevel file, we apply changes directly (no +X emulation here)
info.permissions = ( m_permissions & m_mask ) | ( item->permissions() & ~m_mask );
- /*kdDebug(7007) << "\n current permissions=" << QString::number(item->permissions(),8)
- << "\n wanted permission=" << QString::number(m_permissions,8)
- << "\n with mask=" << QString::number(m_mask,8)
- << "\n with ~mask (mask bits we keep) =" << QString::number((uint)~m_mask,8)
- << "\n bits we keep =" << QString::number(item->permissions() & ~m_mask,8)
- << "\n new permissions = " << QString::number(info.permissions,8)
+ /*kdDebug(7007) << "\n current permissions=" << TQString::number(item->permissions(),8)
+ << "\n wanted permission=" << TQString::number(m_permissions,8)
+ << "\n with mask=" << TQString::number(m_mask,8)
+ << "\n with ~mask (mask bits we keep) =" << TQString::number((uint)~m_mask,8)
+ << "\n bits we keep =" << TQString::number(item->permissions() & ~m_mask,8)
+ << "\n new permissions = " << TQString::number(info.permissions,8)
<< endl;*/
m_infos.prepend( info );
//kdDebug(7007) << "processList : Adding info for " << info.url.prettyURL() << endl;
@@ -77,9 +77,9 @@ void ChmodJob::processList()
{
//kdDebug(7007) << "ChmodJob::processList dir -> listing" << endl;
KIO::ListJob * listJob = KIO::listRecursive( item->url(), false /* no GUI */ );
- connect( listJob, SIGNAL(entries( KIO::Job *,
+ connect( listJob, TQT_SIGNAL(entries( KIO::Job *,
const KIO::UDSEntryList& )),
- SLOT( slotEntries( KIO::Job*,
+ TQT_SLOT( slotEntries( KIO::Job*,
const KIO::UDSEntryList& )));
addSubjob( listJob );
return; // we'll come back later, when this one's finished
@@ -102,7 +102,7 @@ void ChmodJob::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
mode_t permissions = 0;
bool isDir = false;
bool isLink = false;
- QString relativePath;
+ TQString relativePath;
for( ; it2 != (*it).end(); it2++ ) {
switch( (*it2).m_uds ) {
case KIO::UDS_NAME:
@@ -121,7 +121,7 @@ void ChmodJob::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
break;
}
}
- if ( !isLink && relativePath != QString::fromLatin1("..") )
+ if ( !isLink && relativePath != TQString::fromLatin1("..") )
{
ChmodInfo info;
info.url = m_lstItems.first()->url(); // base directory
@@ -143,12 +143,12 @@ void ChmodJob::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
}
}
info.permissions = ( m_permissions & mask ) | ( permissions & ~mask );
- /*kdDebug(7007) << "\n current permissions=" << QString::number(permissions,8)
- << "\n wanted permission=" << QString::number(m_permissions,8)
- << "\n with mask=" << QString::number(mask,8)
- << "\n with ~mask (mask bits we keep) =" << QString::number((uint)~mask,8)
- << "\n bits we keep =" << QString::number(permissions & ~mask,8)
- << "\n new permissions = " << QString::number(info.permissions,8)
+ /*kdDebug(7007) << "\n current permissions=" << TQString::number(permissions,8)
+ << "\n wanted permission=" << TQString::number(m_permissions,8)
+ << "\n with mask=" << TQString::number(mask,8)
+ << "\n with ~mask (mask bits we keep) =" << TQString::number((uint)~mask,8)
+ << "\n bits we keep =" << TQString::number(permissions & ~mask,8)
+ << "\n new permissions = " << TQString::number(info.permissions,8)
<< endl;*/
// Prepend this info in our todo list.
// This way, the toplevel dirs are done last.
@@ -167,10 +167,10 @@ void ChmodJob::chmodNextFile()
// (permissions have to set after, in case of suid and sgid)
if ( info.url.isLocalFile() && ( m_newOwner != -1 || m_newGroup != -1 ) )
{
- QString path = info.url.path();
- if ( chown( QFile::encodeName(path), m_newOwner, m_newGroup ) != 0 )
+ TQString path = info.url.path();
+ if ( chown( TQFile::encodeName(path), m_newOwner, m_newGroup ) != 0 )
{
- int answer = KMessageBox::warningContinueCancel( 0, i18n( "<qt>Could not modify the ownership of file <b>%1</b>. You have insufficient access to the file to perform the change.</qt>" ).arg(path), QString::null, i18n("&Skip File") );
+ int answer = KMessageBox::warningContinueCancel( 0, i18n( "<qt>Could not modify the ownership of file <b>%1</b>. You have insufficient access to the file to perform the change.</qt>" ).arg(path), TQString::null, i18n("&Skip File") );
if (answer == KMessageBox::Cancel)
{
m_error = ERR_USER_CANCELED;
@@ -181,11 +181,11 @@ void ChmodJob::chmodNextFile()
}
kdDebug(7007) << "ChmodJob::chmodNextFile chmod'ing " << info.url.prettyURL()
- << " to " << QString::number(info.permissions,8) << endl;
+ << " to " << TQString::number(info.permissions,8) << endl;
KIO::SimpleJob * job = KIO::chmod( info.url, info.permissions );
// copy the metadata for acl and default acl
- const QString aclString = queryMetaData( "ACL_STRING" );
- const QString defaultAclString = queryMetaData( "DEFAULT_ACL_STRING" );
+ const TQString aclString = queryMetaData( "ACL_STRING" );
+ const TQString defaultAclString = queryMetaData( "DEFAULT_ACL_STRING" );
if ( !aclString.isEmpty() )
job->addMetaData( "ACL_STRING", aclString );
if ( !defaultAclString.isEmpty() )
@@ -226,15 +226,15 @@ void ChmodJob::slotResult( KIO::Job * job )
}
}
-// antlarr: KDE 4: Make owner and group be const QString &
+// antlarr: KDE 4: Make owner and group be const TQString &
KIO_EXPORT ChmodJob *KIO::chmod( const KFileItemList& lstItems, int permissions, int mask,
- QString owner, QString group,
+ TQString owner, TQString group,
bool recursive, bool showProgressInfo )
{
uid_t newOwnerID = (uid_t)-1; // chown(2) : -1 means no change
if ( !owner.isEmpty() )
{
- struct passwd* pw = getpwnam(QFile::encodeName(owner));
+ struct passwd* pw = getpwnam(TQFile::encodeName(owner));
if ( pw == 0L )
kdError(250) << " ERROR: No user " << owner << endl;
else
@@ -243,7 +243,7 @@ KIO_EXPORT ChmodJob *KIO::chmod( const KFileItemList& lstItems, int permissions,
gid_t newGroupID = (gid_t)-1; // chown(2) : -1 means no change
if ( !group.isEmpty() )
{
- struct group* g = getgrnam(QFile::encodeName(group));
+ struct group* g = getgrnam(TQFile::encodeName(group));
if ( g == 0L )
kdError(250) << " ERROR: No group " << group << endl;
else
diff --git a/kio/kio/chmodjob.h b/kio/kio/chmodjob.h
index 4b5d6f85e..fdb873b17 100644
--- a/kio/kio/chmodjob.h
+++ b/kio/kio/chmodjob.h
@@ -22,7 +22,7 @@
#define __kio_chmodjob_h__
#include <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kio/global.h>
#include <kio/job.h>
@@ -68,7 +68,7 @@ namespace KIO {
int m_newGroup;
bool m_recursive;
KFileItemList m_lstItems;
- QValueList<ChmodInfo> m_infos;
+ TQValueList<ChmodInfo> m_infos;
protected:
virtual void virtual_hook( int id, void* data );
private:
@@ -101,7 +101,7 @@ namespace KIO {
* @return The job handling the operation.
*/
KIO_EXPORT ChmodJob * chmod( const KFileItemList& lstItems, int permissions, int mask,
- QString newOwner, QString newGroup,
+ TQString newOwner, TQString newGroup,
bool recursive, bool showProgressInfo = true );
}
diff --git a/kio/kio/connection.cpp b/kio/kio/connection.cpp
index f8b2e69ed..b2a84a798 100644
--- a/kio/kio/connection.cpp
+++ b/kio/kio/connection.cpp
@@ -24,7 +24,7 @@
#include <kde_file.h>
#include <ksock.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <sys/types.h>
#include <sys/signal.h>
@@ -41,7 +41,7 @@
#include "kio/connection.h"
#include <kdebug.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
using namespace KIO;
@@ -95,7 +95,7 @@ void Connection::close()
tasks.clear();
}
-void Connection::send(int cmd, const QByteArray& data)
+void Connection::send(int cmd, const TQByteArray& data)
{
if (!inited() || tasks.count() > 0) {
Task *task = new Task();
@@ -132,11 +132,11 @@ void Connection::init(KSocket *sock)
f_out = KDE_fdopen( socket->socket(), "wb" );
#endif
if (receiver && ( fd_in != -1 )) {
- notifier = new QSocketNotifier(fd_in, QSocketNotifier::Read);
+ notifier = new TQSocketNotifier(fd_in, TQSocketNotifier::Read);
if ( m_suspended ) {
suspend();
}
- QObject::connect(notifier, SIGNAL(activated(int)), receiver, member);
+ TQObject::connect(notifier, TQT_SIGNAL(activated(int)), receiver, member);
}
dequeue();
}
@@ -148,31 +148,31 @@ void Connection::init(int _fd_in, int fd_out)
fd_in = _fd_in;
f_out = KDE_fdopen( fd_out, "wb" );
if (receiver && ( fd_in != -1 )) {
- notifier = new QSocketNotifier(fd_in, QSocketNotifier::Read);
+ notifier = new TQSocketNotifier(fd_in, TQSocketNotifier::Read);
if ( m_suspended ) {
suspend();
}
- QObject::connect(notifier, SIGNAL(activated(int)), receiver, member);
+ TQObject::connect(notifier, TQT_SIGNAL(activated(int)), receiver, member);
}
dequeue();
}
-void Connection::connect(QObject *_receiver, const char *_member)
+void Connection::connect(TQObject *_receiver, const char *_member)
{
receiver = _receiver;
member = _member;
delete notifier;
notifier = 0;
if (receiver && (fd_in != -1 )) {
- notifier = new QSocketNotifier(fd_in, QSocketNotifier::Read);
+ notifier = new TQSocketNotifier(fd_in, TQSocketNotifier::Read);
if ( m_suspended )
suspend();
- QObject::connect(notifier, SIGNAL(activated(int)), receiver, member);
+ TQObject::connect(notifier, TQT_SIGNAL(activated(int)), receiver, member);
}
}
-bool Connection::sendnow( int _cmd, const QByteArray &data )
+bool Connection::sendnow( int _cmd, const TQByteArray &data )
{
if (f_out == 0) {
return false;
@@ -206,7 +206,7 @@ bool Connection::sendnow( int _cmd, const QByteArray &data )
return true;
}
-int Connection::read( int* _cmd, QByteArray &data )
+int Connection::read( int* _cmd, TQByteArray &data )
{
if (fd_in == -1 ) {
kdError(7017) << "read: not yet inited" << endl;
diff --git a/kio/kio/connection.h b/kio/kio/connection.h
index 140a7cc28..2adc6e018 100644
--- a/kio/kio/connection.h
+++ b/kio/kio/connection.h
@@ -27,8 +27,8 @@
#include <sys/types.h>
#include <stdio.h>
-#include <qptrlist.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
class KSocket;
class QSocketNotifier;
@@ -37,7 +37,7 @@ namespace KIO {
struct KIO_EXPORT Task {
int cmd;
- QByteArray data;
+ TQByteArray data;
};
/**
@@ -71,7 +71,7 @@ namespace KIO {
* @see inited()
*/
void init(int fd_in, int fd_out); // Used by KDENOX
- void connect(QObject *receiver = 0, const char *member = 0);
+ void connect(TQObject *receiver = 0, const char *member = 0);
/// Closes the connection.
void close();
@@ -98,7 +98,7 @@ namespace KIO {
* @param cmd the command to set
* @param arr the bytes to send
*/
- void send(int cmd, const QByteArray &arr = QByteArray());
+ void send(int cmd, const TQByteArray &arr = TQByteArray());
/**
* Sends the given command immediately.
@@ -106,7 +106,7 @@ namespace KIO {
* @param data the bytes to send
* @return true if successful, false otherwise
*/
- bool sendnow( int _cmd, const QByteArray &data );
+ bool sendnow( int _cmd, const TQByteArray &data );
/**
* Receive data.
@@ -116,7 +116,7 @@ namespace KIO {
* @return >=0 indicates the received data size upon success
* -1 indicates error
*/
- int read( int* _cmd, QByteArray &data );
+ int read( int* _cmd, TQByteArray &data );
/**
* Don't handle incoming data until resumed.
@@ -144,10 +144,10 @@ namespace KIO {
int fd_in;
FILE *f_out;
KSocket *socket;
- QSocketNotifier *notifier;
- QObject *receiver;
+ TQSocketNotifier *notifier;
+ TQObject *receiver;
const char *member;
- QPtrList<Task> tasks;
+ TQPtrList<Task> tasks;
bool m_suspended;
private:
class ConnectionPrivate* d;
diff --git a/kio/kio/dataprotocol.cpp b/kio/kio/dataprotocol.cpp
index 86ebe23cf..161c82296 100644
--- a/kio/kio/dataprotocol.cpp
+++ b/kio/kio/dataprotocol.cpp
@@ -23,10 +23,10 @@
#include <kurl.h>
#include <kio/global.h>
-#include <qcstring.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
#ifdef DATAKIOSLAVE
# include <kinstance.h>
@@ -67,22 +67,22 @@ extern "C" {
/** structure containing header information */
struct DataHeader {
- QString mime_type; // mime type of content (lowercase)
+ TQString mime_type; // mime type of content (lowercase)
MetaData attributes; // attribute/value pairs (attribute lowercase,
// value unchanged)
bool is_base64; // true if data is base64 encoded
- QString url; // reference to decoded url
+ TQString url; // reference to decoded url
int data_offset; // zero-indexed position within url
// where the real data begins. May point beyond
// the end to indicate that there is no data
- QString *charset; // shortcut to charset (it always exists)
+ TQString *charset; // shortcut to charset (it always exists)
};
// constant string data
-const QChar text_plain_str[] = { 't','e','x','t','/','p','l','a','i','n' };
-const QChar charset_str[] = { 'c','h','a','r','s','e','t' };
-const QChar us_ascii_str[] = { 'u','s','-','a','s','c','i','i' };
-const QChar base64_str[] = { 'b','a','s','e','6','4' };
+const TQChar text_plain_str[] = { 't','e','x','t','/','p','l','a','i','n' };
+const TQChar charset_str[] = { 'c','h','a','r','s','e','t' };
+const TQChar us_ascii_str[] = { 'u','s','-','a','s','c','i','i' };
+const TQChar base64_str[] = { 'b','a','s','e','6','4' };
/** returns the position of the first occurrence of any of the given characters
* @p c1 to @p c3 or buf.length() if none is contained.
@@ -92,12 +92,12 @@ const QChar base64_str[] = { 'b','a','s','e','6','4' };
* @param c2 alternative character to find or '\0' to ignore
* @param c3 alternative character to find or '\0' to ignore
*/
-static int find(const QString &buf, int begin, QChar c1, QChar c2 = '\0',
- QChar c3 = '\0') {
+static int find(const TQString &buf, int begin, TQChar c1, TQChar c2 = '\0',
+ TQChar c3 = '\0') {
int pos = begin;
int size = (int)buf.length();
while (pos < size) {
- QChar ch = buf[pos];
+ TQChar ch = buf[pos];
if (ch == c1
|| (c2 != '\0' && ch == c2)
|| (c3 != '\0' && ch == c3))
@@ -117,11 +117,11 @@ static int find(const QString &buf, int begin, QChar c1, QChar c2 = '\0',
* @param c2 alternative character to find or 0 to ignore
* @param c3 alternative character to find or 0 to ignore
*/
-inline QString extract(const QString &buf, int &pos, QChar c1,
- QChar c2 = '\0', QChar c3 = '\0') {
+inline TQString extract(const TQString &buf, int &pos, TQChar c1,
+ TQChar c2 = '\0', TQChar c3 = '\0') {
int oldpos = pos;
pos = find(buf,oldpos,c1,c2,c3);
- return QString(buf.unicode() + oldpos, pos - oldpos);
+ return TQString(buf.unicode() + oldpos, pos - oldpos);
}
/** ignores all whitespaces
@@ -130,9 +130,9 @@ inline QString extract(const QString &buf, int &pos, QChar c1,
* Upon return @p pos will either point to the first non-whitespace
* character or to the end of the buffer.
*/
-inline void ignoreWS(const QString &buf, int &pos) {
+inline void ignoreWS(const TQString &buf, int &pos) {
int size = (int)buf.length();
- QChar ch = buf[pos];
+ TQChar ch = buf[pos];
while (pos < size && (ch == ' ' || ch == '\t' || ch == '\n'
|| ch == '\r'))
ch = buf[++pos];
@@ -146,14 +146,14 @@ inline void ignoreWS(const QString &buf, int &pos) {
* @return the extracted string. @p pos will be updated to point to the
* character following the trailing quote.
*/
-static QString parseQuotedString(const QString &buf, int &pos) {
+static TQString parseQuotedString(const TQString &buf, int &pos) {
int size = (int)buf.length();
- QString res;
+ TQString res;
pos++; // jump over leading quote
bool escaped = false; // if true means next character is literal
bool parsing = true; // true as long as end quote not found
while (parsing && pos < size) {
- QChar ch = buf[pos++];
+ TQChar ch = buf[pos++];
if (escaped) {
res += ch;
escaped = false;
@@ -174,10 +174,10 @@ static QString parseQuotedString(const QString &buf, int &pos) {
* information
*/
static void parseDataHeader(const KURL &url, DataHeader &header_info) {
- QConstString text_plain(text_plain_str,sizeof text_plain_str/sizeof text_plain_str[0]);
- QConstString charset(charset_str,sizeof charset_str/sizeof charset_str[0]);
- QConstString us_ascii(us_ascii_str,sizeof us_ascii_str/sizeof us_ascii_str[0]);
- QConstString base64(base64_str,sizeof base64_str/sizeof base64_str[0]);
+ TQConstString text_plain(text_plain_str,sizeof text_plain_str/sizeof text_plain_str[0]);
+ TQConstString charset(charset_str,sizeof charset_str/sizeof charset_str[0]);
+ TQConstString us_ascii(us_ascii_str,sizeof us_ascii_str/sizeof us_ascii_str[0]);
+ TQConstString base64(base64_str,sizeof base64_str/sizeof base64_str[0]);
// initialize header info members
header_info.mime_type = text_plain.string();
header_info.charset = &header_info.attributes.insert(
@@ -186,7 +186,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) {
header_info.is_base64 = false;
// decode url and save it
- QString &raw_url = header_info.url = QString::fromLatin1("data:") + url.path();
+ TQString &raw_url = header_info.url = TQString::fromLatin1("data:") + url.path();
int raw_url_len = (int)raw_url.length();
// jump over scheme part (must be "data:", we don't even check that)
@@ -195,7 +195,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) {
// read mime type
if (header_info.data_offset >= raw_url_len) return;
- QString mime_type = extract(raw_url,header_info.data_offset,';',',')
+ TQString mime_type = extract(raw_url,header_info.data_offset,';',',')
.stripWhiteSpace();
if (!mime_type.isEmpty()) header_info.mime_type = mime_type;
@@ -207,7 +207,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) {
bool data_begin_reached = false;
while (!data_begin_reached && header_info.data_offset < raw_url_len) {
// read attribute
- QString attribute = extract(raw_url,header_info.data_offset,'=',';',',')
+ TQString attribute = extract(raw_url,header_info.data_offset,'=',';',',')
.stripWhiteSpace();
if (header_info.data_offset >= raw_url_len
|| raw_url[header_info.data_offset] != '=') {
@@ -221,7 +221,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) {
ignoreWS(raw_url,header_info.data_offset);
if (header_info.data_offset >= raw_url_len) return;
- QString value;
+ TQString value;
if (raw_url[header_info.data_offset] == '"') {
value = parseQuotedString(raw_url,header_info.data_offset);
ignoreWS(raw_url,header_info.data_offset);
@@ -241,7 +241,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) {
}
#ifdef DATAKIOSLAVE
-DataProtocol::DataProtocol(const QCString &pool_socket, const QCString &app_socket)
+DataProtocol::DataProtocol(const TQCString &pool_socket, const TQCString &app_socket)
: SlaveBase("kio_data", pool_socket, app_socket) {
#else
DataProtocol::DataProtocol() {
@@ -268,8 +268,8 @@ void DataProtocol::get(const KURL& url) {
int size = (int)hdr.url.length();
int data_ofs = QMIN(hdr.data_offset,size);
// FIXME: string is copied, would be nice if we could have a reference only
- QString url_data = hdr.url.mid(data_ofs);
- QCString outData;
+ TQString url_data = hdr.url.mid(data_ofs);
+ TQCString outData;
#ifdef TESTKIO
// cout << "current charset: \"" << *hdr.charset << "\"" << endl;
@@ -281,7 +281,7 @@ void DataProtocol::get(const KURL& url) {
} else {
// FIXME: This is all flawed, must be reworked thoroughly
// non encoded data must be converted to the given charset
- QTextCodec *codec = QTextCodec::codecForName(hdr.charset->latin1());
+ TQTextCodec *codec = TQTextCodec::codecForName(hdr.charset->latin1());
if (codec != 0) {
outData = codec->fromUnicode(url_data);
} else {
@@ -317,7 +317,7 @@ void DataProtocol::get(const KURL& url) {
// empiric studies have shown that this shouldn't be queued & dispatched
/*DISPATCH*/(data(outData));
// kdDebug() << "(2) queue size " << dispatchQueue.size() << endl;
- DISPATCH(data(QByteArray()));
+ DISPATCH(data(TQByteArray()));
// kdDebug() << "(3) queue size " << dispatchQueue.size() << endl;
DISPATCH(finished());
// kdDebug() << "(4) queue size " << dispatchQueue.size() << endl;
diff --git a/kio/kio/dataprotocol.h b/kio/kio/dataprotocol.h
index b59e36c5b..d33a86a32 100644
--- a/kio/kio/dataprotocol.h
+++ b/kio/kio/dataprotocol.h
@@ -53,7 +53,7 @@ class DataProtocol : public DataSlave {
public:
#if defined(DATAKIOSLAVE)
- DataProtocol(const QCString &pool_socket, const QCString &app_socket);
+ DataProtocol(const TQCString &pool_socket, const TQCString &app_socket);
#else
DataProtocol();
#endif
diff --git a/kio/kio/dataslave.cpp b/kio/kio/dataslave.cpp
index 5b81d3d2f..d16ecc0d4 100644
--- a/kio/kio/dataslave.cpp
+++ b/kio/kio/dataslave.cpp
@@ -26,7 +26,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qtimer.h>
+#include <tqtimer.h>
using namespace KIO;
@@ -57,12 +57,12 @@ using namespace KIO;
DataSlave::DataSlave() :
- Slave(true, 0, "data", QString::null)
+ Slave(true, 0, "data", TQString::null)
{
//kdDebug() << this << k_funcinfo << endl;
_suspended = false;
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), SLOT(dispatchNext()));
+ timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(dispatchNext()));
}
DataSlave::~DataSlave() {
@@ -115,8 +115,8 @@ void DataSlave::dispatchNext() {
dispatchQueue.pop_front();
}
-void DataSlave::send(int cmd, const QByteArray &arr) {
- QDataStream stream(arr, IO_ReadOnly);
+void DataSlave::send(int cmd, const TQByteArray &arr) {
+ TQDataStream stream(arr, IO_ReadOnly);
KURL url;
@@ -137,7 +137,7 @@ void DataSlave::send(int cmd, const QByteArray &arr) {
break;
default:
error(ERR_UNSUPPORTED_ACTION,
- unsupportedActionErrorString(QString::fromLatin1("data"),cmd));
+ unsupportedActionErrorString(TQString::fromLatin1("data"),cmd));
}/*end switch*/
}
@@ -145,16 +145,16 @@ bool DataSlave::suspended() {
return _suspended;
}
-void DataSlave::setHost(const QString &/*host*/, int /*port*/,
- const QString &/*user*/, const QString &/*passwd*/) {
+void DataSlave::setHost(const TQString &/*host*/, int /*port*/,
+ const TQString &/*user*/, const TQString &/*passwd*/) {
// irrelevant -> will be ignored
}
void DataSlave::setConfig(const MetaData &/*config*/) {
// FIXME: decide to handle this directly or not at all
#if 0
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << config;
slaveconn.send( CMD_CONFIG, data );
#endif
@@ -202,10 +202,10 @@ void DataSlave::virtual_hook( int id, void* data ) {
}
}
-DISPATCH_IMPL1(mimeType, const QString &, s)
+DISPATCH_IMPL1(mimeType, const TQString &, s)
DISPATCH_IMPL1(totalSize, KIO::filesize_t, size)
DISPATCH_IMPL(sendMetaData)
-DISPATCH_IMPL1(data, const QByteArray &, ba)
+DISPATCH_IMPL1(data, const TQByteArray &, ba)
#undef DISPATCH_IMPL
#undef DISPATCH_IMPL1
diff --git a/kio/kio/dataslave.h b/kio/kio/dataslave.h
index 7ca24610c..1c6ebfad5 100644
--- a/kio/kio/dataslave.h
+++ b/kio/kio/dataslave.h
@@ -53,14 +53,14 @@ namespace KIO {
virtual ~DataSlave();
- virtual void setHost(const QString &host, int port,
- const QString &user, const QString &passwd);
+ virtual void setHost(const TQString &host, int port,
+ const TQString &user, const TQString &passwd);
virtual void setConfig(const MetaData &config);
virtual void suspend();
virtual void resume();
virtual bool suspended();
- virtual void send(int cmd, const QByteArray &data = QByteArray());
+ virtual void send(int cmd, const TQByteArray &data = TQByteArray());
virtual void hold(const KURL &url);
@@ -89,20 +89,20 @@ namespace KIO {
*/
struct QueueStruct {
QueueType type;
- QString s;
+ TQString s;
KIO::filesize_t size;
- QByteArray ba;
+ TQByteArray ba;
QueueStruct() {}
QueueStruct(QueueType type) : type(type) {}
};
- typedef QValueList<QueueStruct> DispatchQueue;
+ typedef TQValueList<QueueStruct> DispatchQueue;
DispatchQueue dispatchQueue;
- DISPATCH_DECL1(mimeType, const QString &, s)
+ DISPATCH_DECL1(mimeType, const TQString &, s)
DISPATCH_DECL1(totalSize, KIO::filesize_t, size)
DISPATCH_DECL(sendMetaData)
- DISPATCH_DECL1(data, const QByteArray &, ba)
+ DISPATCH_DECL1(data, const TQByteArray &, ba)
DISPATCH_DECL(finished)
protected slots:
@@ -115,7 +115,7 @@ namespace KIO {
private:
MetaData meta_data;
bool _suspended;
- QTimer *timer;
+ TQTimer *timer;
};
}
diff --git a/kio/kio/davjob.cpp b/kio/kio/davjob.cpp
index 57f00045c..1f3b208a6 100644
--- a/kio/kio/davjob.cpp
+++ b/kio/kio/davjob.cpp
@@ -20,12 +20,12 @@
#include <kurl.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
+#include <tqdom.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -38,24 +38,24 @@
#include <kio/job.h>
#include <kio/slaveinterface.h>
-#define KIO_ARGS QByteArray packedArgs; QDataStream stream( packedArgs, IO_WriteOnly ); stream
+#define KIO_ARGS TQByteArray packedArgs; TQDataStream stream( packedArgs, IO_WriteOnly ); stream
using namespace KIO;
class DavJob::DavJobPrivate
{
public:
- QByteArray savedStaticData;
- QByteArray str_response; // replaces the QString previously used in DavJob itself
+ TQByteArray savedStaticData;
+ TQByteArray str_response; // replaces the TQString previously used in DavJob itself
};
-DavJob::DavJob( const KURL& url, int method, const QString& request, bool showProgressInfo )
- : TransferJob( url, KIO::CMD_SPECIAL, QByteArray(), QByteArray(), showProgressInfo )
+DavJob::DavJob( const KURL& url, int method, const TQString& request, bool showProgressInfo )
+ : TransferJob( url, KIO::CMD_SPECIAL, TQByteArray(), TQByteArray(), showProgressInfo )
{
d = new DavJobPrivate;
// We couldn't set the args when calling the parent constructor,
// so do it now.
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << (int) 7 << url << method;
// Same for static data
if ( ! request.isEmpty() && ! request.isNull() ) {
@@ -65,7 +65,7 @@ DavJob::DavJob( const KURL& url, int method, const QString& request, bool showPr
}
}
-void DavJob::slotData( const QByteArray& data )
+void DavJob::slotData( const TQByteArray& data )
{
if(m_redirectionURL.isEmpty() || !m_redirectionURL.isValid() || m_error) {
unsigned int oldSize = d->str_response.size();
@@ -79,7 +79,7 @@ void DavJob::slotFinished()
// kdDebug(7113) << "DavJob::slotFinished()" << endl;
// kdDebug(7113) << d->str_response << endl;
if (!m_redirectionURL.isEmpty() && m_redirectionURL.isValid() && (m_command == CMD_SPECIAL)) {
- QDataStream istream( m_packedArgs, IO_ReadOnly );
+ TQDataStream istream( m_packedArgs, IO_ReadOnly );
int s_cmd, s_method;
KURL s_url;
istream >> s_cmd;
@@ -88,16 +88,16 @@ void DavJob::slotFinished()
// PROPFIND
if ( (s_cmd == 7) && (s_method == (int)KIO::DAV_PROPFIND) ) {
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << (int)7 << m_redirectionURL << (int)KIO::DAV_PROPFIND;
}
} else if ( ! m_response.setContent( d->str_response, true ) ) {
// An error occurred parsing the XML response
- QDomElement root = m_response.createElementNS( "DAV:", "error-report" );
+ TQDomElement root = m_response.createElementNS( "DAV:", "error-report" );
m_response.appendChild( root );
- QDomElement el = m_response.createElementNS( "DAV:", "offending-response" );
- QDomText textnode = m_response.createTextNode( d->str_response );
+ TQDomElement el = m_response.createElementNS( "DAV:", "offending-response" );
+ TQDomText textnode = m_response.createTextNode( d->str_response );
el.appendChild( textnode );
root.appendChild( el );
delete d; // Should be in virtual destructor
@@ -113,8 +113,8 @@ void DavJob::slotFinished()
/* Convenience methods */
-// KDE 4: Make it const QString &
-DavJob* KIO::davPropFind( const KURL& url, const QDomDocument& properties, QString depth, bool showProgressInfo )
+// KDE 4: Make it const TQString &
+DavJob* KIO::davPropFind( const KURL& url, const TQDomDocument& properties, TQString depth, bool showProgressInfo )
{
DavJob *job = new DavJob( url, (int) KIO::DAV_PROPFIND, properties.toString(), showProgressInfo );
job->addMetaData( "davDepth", depth );
@@ -122,17 +122,17 @@ DavJob* KIO::davPropFind( const KURL& url, const QDomDocument& properties, QStri
}
-DavJob* KIO::davPropPatch( const KURL& url, const QDomDocument& properties, bool showProgressInfo )
+DavJob* KIO::davPropPatch( const KURL& url, const TQDomDocument& properties, bool showProgressInfo )
{
return new DavJob( url, (int) KIO::DAV_PROPPATCH, properties.toString(), showProgressInfo );
}
-DavJob* KIO::davSearch( const KURL& url, const QString& nsURI, const QString& qName, const QString& query, bool showProgressInfo )
+DavJob* KIO::davSearch( const KURL& url, const TQString& nsURI, const TQString& qName, const TQString& query, bool showProgressInfo )
{
- QDomDocument doc;
- QDomElement searchrequest = doc.createElementNS( "DAV:", "searchrequest" );
- QDomElement searchelement = doc.createElementNS( nsURI, qName );
- QDomText text = doc.createTextNode( query );
+ TQDomDocument doc;
+ TQDomElement searchrequest = doc.createElementNS( "DAV:", "searchrequest" );
+ TQDomElement searchelement = doc.createElementNS( nsURI, qName );
+ TQDomText text = doc.createTextNode( query );
searchelement.appendChild( text );
searchrequest.appendChild( searchelement );
doc.appendChild( searchrequest );
diff --git a/kio/kio/davjob.h b/kio/kio/davjob.h
index 400ca9f8e..b6a951190 100644
--- a/kio/kio/davjob.h
+++ b/kio/kio/davjob.h
@@ -23,12 +23,12 @@
#include <kurl.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
+#include <tqdom.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -63,16 +63,16 @@ namespace KIO {
* KIO::davSearch() to create a new DavJob.
*/
DavJob(const KURL& url, int method,
- const QString& request, bool showProgressInfo);
+ const TQString& request, bool showProgressInfo);
/**
- * Returns the response as a QDomDocument.
+ * Returns the response as a TQDomDocument.
* @return the response document
*/
- QDomDocument& response() { return m_response; }
+ TQDomDocument& response() { return m_response; }
protected slots:
virtual void slotFinished();
- virtual void slotData( const QByteArray &data);
+ virtual void slotData( const TQByteArray &data);
protected:
bool m_suspended;
@@ -80,8 +80,8 @@ namespace KIO {
private:
class DavJobPrivate;
DavJobPrivate *d;
- QString dummy; // kept around for BC reasons
- QDomDocument m_response;
+ TQString dummy; // kept around for BC reasons
+ TQDomDocument m_response;
};
/**
@@ -95,7 +95,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the new DavJob
*/
- KIO_EXPORT DavJob* davPropFind( const KURL& url, const QDomDocument& properties, QString depth, bool showProgressInfo=true );
+ KIO_EXPORT DavJob* davPropFind( const KURL& url, const TQDomDocument& properties, TQString depth, bool showProgressInfo=true );
/**
* Creates a new DavJob that issues a PROPPATCH command. PROPPATCH sets
@@ -107,7 +107,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the new DavJob
*/
- KIO_EXPORT DavJob* davPropPatch( const KURL& url, const QDomDocument& properties, bool showProgressInfo=true );
+ KIO_EXPORT DavJob* davPropPatch( const KURL& url, const TQDomDocument& properties, bool showProgressInfo=true );
/**
* Creates a new DavJob that issues a SEARCH command.
@@ -119,7 +119,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the new DavJob
*/
- KIO_EXPORT DavJob* davSearch( const KURL &url, const QString& nsURI, const QString& qName, const QString& query, bool showProgressInfo=true );
+ KIO_EXPORT DavJob* davSearch( const KURL &url, const TQString& nsURI, const TQString& qName, const TQString& query, bool showProgressInfo=true );
}
diff --git a/kio/kio/defaultprogress.cpp b/kio/kio/defaultprogress.cpp
index 7073da04f..8293901ae 100644
--- a/kio/kio/defaultprogress.cpp
+++ b/kio/kio/defaultprogress.cpp
@@ -16,11 +16,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qdatetime.h>
-#include <qcheckbox.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqdatetime.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -52,9 +52,9 @@ public:
KPushButton *cancelClose;
KPushButton *openFile;
KPushButton *openLocation;
- QCheckBox *keepOpen;
+ TQCheckBox *keepOpen;
KURL location;
- QTime startTime;
+ TQTime startTime;
};
DefaultProgress::DefaultProgress( bool showNow )
@@ -69,7 +69,7 @@ DefaultProgress::DefaultProgress( bool showNow )
}
}
-DefaultProgress::DefaultProgress( QWidget* parent, const char* /*name*/ )
+DefaultProgress::DefaultProgress( TQWidget* parent, const char* /*name*/ )
: ProgressBase( parent ),
m_iTotalSize(0), m_iTotalFiles(0), m_iTotalDirs(0),
m_iProcessedSize(0), m_iProcessedDirs(0), m_iProcessedFiles(0)
@@ -93,22 +93,22 @@ void DefaultProgress::init()
KGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 16 ) );
#endif
- QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(),
+ 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());
// filenames or action name
- grid->addWidget(new QLabel(i18n("Source:"), this), 0, 0);
+ grid->addWidget(new TQLabel(i18n("Source:"), this), 0, 0);
sourceEdit = new KLineEdit(this);
sourceEdit->setReadOnly(true);
sourceEdit->setEnableSqueezedText(true);
grid->addWidget(sourceEdit, 0, 2);
- destInvite = new QLabel(i18n("Destination:"), this);
+ destInvite = new TQLabel(i18n("Destination:"), this);
grid->addWidget(destInvite, 1, 0);
destEdit = new KLineEdit(this);
@@ -120,55 +120,55 @@ void DefaultProgress::init()
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);
- progressLabel = new QLabel( this );
-/* progressLabel->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Preferred ) );*/
- progressLabel->setAlignment( QLabel::AlignRight );
+ progressLabel = new TQLabel( this );
+/* progressLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Preferred ) );*/
+ progressLabel->setAlignment( TQLabel::AlignRight );
hBox->addWidget( progressLabel );
- hBox = new QHBoxLayout();
+ hBox = new TQHBoxLayout();
topLayout->addLayout(hBox);
- speedLabel = new QLabel(this);
+ speedLabel = new TQLabel(this);
hBox->addWidget(speedLabel, 1);
- QFrame *line = new QFrame( this );
- line->setFrameShape( QFrame::HLine );
- line->setFrameShadow( QFrame::Sunken );
+ TQFrame *line = new TQFrame( this );
+ line->setFrameShape( TQFrame::HLine );
+ line->setFrameShadow( TQFrame::Sunken );
topLayout->addWidget( line );
- d->keepOpen = new QCheckBox( i18n("&Keep this window open after transfer is complete"), this);
- connect( d->keepOpen, SIGNAL( toggled(bool) ), SLOT( slotKeepOpenToggled(bool) ) );
+ d->keepOpen = new TQCheckBox( i18n("&Keep this window open after transfer is complete"), this);
+ connect( d->keepOpen, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotKeepOpenToggled(bool) ) );
topLayout->addWidget(d->keepOpen);
d->keepOpen->hide();
- hBox = new QHBoxLayout();
+ hBox = new TQHBoxLayout();
topLayout->addLayout(hBox);
d->openFile = new KPushButton( i18n("Open &File"), this );
- connect( d->openFile, SIGNAL( clicked() ), SLOT( slotOpenFile() ) );
+ connect( d->openFile, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenFile() ) );
hBox->addWidget( d->openFile );
d->openFile->setEnabled(false);
d->openFile->hide();
d->openLocation = new KPushButton( i18n("Open &Destination"), this );
- connect( d->openLocation, SIGNAL( clicked() ), SLOT( slotOpenLocation() ) );
+ connect( d->openLocation, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenLocation() ) );
hBox->addWidget( d->openLocation );
d->openLocation->hide();
hBox->addStretch(1);
d->cancelClose = new KPushButton( KStdGuiItem::cancel(), this );
- connect( d->cancelClose, SIGNAL( clicked() ), SLOT( slotStop() ) );
+ connect( d->cancelClose, TQT_SIGNAL( clicked() ), TQT_SLOT( slotStop() ) );
hBox->addWidget( d->cancelClose );
resize( sizeHint() );
@@ -219,7 +219,7 @@ void DefaultProgress::showTotals()
// of CopyJob takes a long time (e.g. over networks).
if ( m_iProcessedFiles == 0 && m_iProcessedDirs == 0 )
{
- QString tmps;
+ TQString tmps;
if ( m_iTotalDirs > 1 )
// that we have a singular to translate looks weired but is only logical
// xgettext: no-c-format
@@ -231,12 +231,12 @@ void DefaultProgress::showTotals()
}
//static
-QString DefaultProgress::makePercentString( unsigned long percent,
+TQString DefaultProgress::makePercentString( unsigned long percent,
KIO::filesize_t totalSize,
unsigned long totalFiles )
{
if ( totalSize )
- return i18n( "%1 % of %2 " ).arg( QString::number(percent) , KIO::convertSize( totalSize ) );
+ return i18n( "%1 % of %2 " ).arg( TQString::number(percent) , KIO::convertSize( totalSize ) );
else if ( totalFiles )
return i18n( "%1 % of 1 file", "%1 % of %n files", totalFiles ).arg( percent );
else
@@ -245,7 +245,7 @@ QString DefaultProgress::makePercentString( unsigned long percent,
void DefaultProgress::slotPercent( KIO::Job*, unsigned long percent )
{
- QString caption = makePercentString( percent, m_iTotalSize, m_iTotalFiles );
+ TQString caption = makePercentString( percent, m_iTotalSize, m_iTotalFiles );
m_pProgressBar->setValue( percent );
switch(mode) {
case Copy:
@@ -270,7 +270,7 @@ void DefaultProgress::slotPercent( KIO::Job*, unsigned long percent )
}
-void DefaultProgress::slotInfoMessage( KIO::Job*, const QString & msg )
+void DefaultProgress::slotInfoMessage( KIO::Job*, const TQString & msg )
{
speedLabel->setText( msg );
speedLabel->setAlignment( speedLabel->alignment() & ~Qt::WordBreak );
@@ -282,7 +282,7 @@ void DefaultProgress::slotProcessedSize( KIO::Job*, KIO::filesize_t bytes ) {
return;
m_iProcessedSize = bytes;
- QString tmp = i18n( "%1 of %2 complete")
+ TQString tmp = i18n( "%1 of %2 complete")
.arg( KIO::convertSize(bytes) )
.arg( KIO::convertSize(m_iTotalSize));
sizeLabel->setText( tmp );
@@ -295,7 +295,7 @@ void DefaultProgress::slotProcessedDirs( KIO::Job*, unsigned long dirs )
return;
m_iProcessedDirs = dirs;
- QString tmps;
+ TQString tmps;
tmps = i18n("%1 / %n folder", "%1 / %n folders", m_iTotalDirs).arg( m_iProcessedDirs );
tmps += " ";
tmps += i18n("%1 / %n file", "%1 / %n files", m_iTotalFiles).arg( m_iProcessedFiles );
@@ -309,7 +309,7 @@ void DefaultProgress::slotProcessedFiles( KIO::Job*, unsigned long files )
return;
m_iProcessedFiles = files;
- QString tmps;
+ TQString tmps;
if ( m_iTotalDirs > 1 ) {
tmps = i18n("%1 / %n folder", "%1 / %n folders", m_iTotalDirs).arg( m_iProcessedDirs );
tmps += " ";
@@ -398,14 +398,14 @@ void DefaultProgress::slotStating( KIO::Job*, const KURL& url )
setDestVisible( false );
}
-void DefaultProgress::slotMounting( KIO::Job*, const QString & dev, const QString & point )
+void DefaultProgress::slotMounting( KIO::Job*, const TQString & dev, const TQString & point )
{
setCaption(i18n("Mounting %1").arg(dev));
sourceEdit->setText(point);
setDestVisible( false );
}
-void DefaultProgress::slotUnmounting( KIO::Job*, const QString & point )
+void DefaultProgress::slotUnmounting( KIO::Job*, const TQString & point )
{
setCaption(i18n("Unmounting"));
sourceEdit->setText(point);
@@ -424,7 +424,7 @@ void DefaultProgress::slotCanResume( KIO::Job*, KIO::filesize_t resume )
void DefaultProgress::setDestVisible( bool visible )
{
// We can't hide the destInvite/destEdit labels,
- // because it screws up the QGridLayout.
+ // because it screws up the TQGridLayout.
if (visible)
{
destInvite->show();
@@ -436,8 +436,8 @@ void DefaultProgress::setDestVisible( bool visible )
{
destInvite->hide();
destEdit->hide();
- destInvite->setText( QString::null );
- destEdit->setText( QString::null );
+ destInvite->setText( TQString::null );
+ destEdit->setText( TQString::null );
}
}
@@ -469,9 +469,9 @@ void DefaultProgress::slotKeepOpenToggled(bool keepopen)
void DefaultProgress::checkDestination(const KURL& dest) {
bool ok = true;
if ( dest.isLocalFile() ) {
- QString path = dest.path( -1 );
- QStringList tmpDirs = KGlobal::dirs()->resourceDirs( "tmp" );
- for ( QStringList::Iterator it = tmpDirs.begin() ; ok && it != tmpDirs.end() ; ++it )
+ TQString path = dest.path( -1 );
+ TQStringList tmpDirs = KGlobal::dirs()->resourceDirs( "tmp" );
+ for ( TQStringList::Iterator it = tmpDirs.begin() ; ok && it != tmpDirs.end() ; ++it )
if ( path.contains( *it ) )
ok = false; // it's in the tmp resource
}
diff --git a/kio/kio/defaultprogress.h b/kio/kio/defaultprogress.h
index 9f57622d7..8dca499bd 100644
--- a/kio/kio/defaultprogress.h
+++ b/kio/kio/defaultprogress.h
@@ -18,7 +18,7 @@
#ifndef __defaultprogress_h__
#define __defaultprogress_h__
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kio/global.h>
@@ -51,13 +51,13 @@ public:
* @param name the name of the dialog, can be 0
* @since 3.1
*/
- DefaultProgress( QWidget* parent, const char* name = 0 );
+ DefaultProgress( TQWidget* parent, const char* name = 0 );
~DefaultProgress();
bool keepOpen() const;
/// Shared with uiserver.cpp
- static QString makePercentString( unsigned long percent,
+ static TQString makePercentString( unsigned long percent,
KIO::filesize_t totalSize,
unsigned long totalFiles );
@@ -77,7 +77,7 @@ public slots:
* @param job the KIO::Job
* @param msg the message to set
*/
- virtual void slotInfoMessage( KIO::Job *job, const QString & msg );
+ virtual void slotInfoMessage( KIO::Job *job, const TQString & msg );
virtual void slotCopying( KIO::Job* job, const KURL& src, const KURL& dest );
virtual void slotMoving( KIO::Job* job, const KURL& src, const KURL& dest );
@@ -103,13 +103,13 @@ public slots:
* @param dev the device to mount
* @param point the mount point
*/
- virtual void slotMounting( KIO::Job* job, const QString & dev, const QString & point );
+ virtual void slotMounting( KIO::Job* job, const TQString & dev, const TQString & point );
/**
* Called when the job is unmounting.
* @param job the KIO::Job
* @param point the mount point
*/
- virtual void slotUnmounting( KIO::Job* job, const QString & point );
+ virtual void slotUnmounting( KIO::Job* job, const TQString & point );
virtual void slotCanResume( KIO::Job* job, KIO::filesize_t from);
/**
@@ -128,11 +128,11 @@ protected:
KLineEdit* sourceEdit;
KLineEdit* destEdit;
- QLabel* progressLabel;
- QLabel* destInvite;
- QLabel* speedLabel;
- QLabel* sizeLabel;
- QLabel* resumeLabel;
+ TQLabel* progressLabel;
+ TQLabel* destInvite;
+ TQLabel* speedLabel;
+ TQLabel* sizeLabel;
+ TQLabel* resumeLabel;
KProgress* m_pProgressBar;
diff --git a/kio/kio/forwardingslavebase.cpp b/kio/kio/forwardingslavebase.cpp
index a1e505a87..5caa08465 100644
--- a/kio/kio/forwardingslavebase.cpp
+++ b/kio/kio/forwardingslavebase.cpp
@@ -22,8 +22,8 @@
#include <kmimetype.h>
#include <kprotocolinfo.h>
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include "forwardingslavebase.h"
@@ -34,10 +34,10 @@ class ForwardingSlaveBasePrivate
{
};
-ForwardingSlaveBase::ForwardingSlaveBase(const QCString &protocol,
- const QCString &poolSocket,
- const QCString &appSocket)
- : QObject(), SlaveBase(protocol, poolSocket, appSocket)
+ForwardingSlaveBase::ForwardingSlaveBase(const TQCString &protocol,
+ const TQCString &poolSocket,
+ const TQCString &appSocket)
+ : TQObject(), SlaveBase(protocol, poolSocket, appSocket)
{
}
@@ -70,7 +70,7 @@ void ForwardingSlaveBase::prepareUDSEntry(KIO::UDSEntry &entry,
<< listing << endl;
bool url_found = false;
- QString name;
+ TQString name;
KURL url;
KIO::UDSEntry::iterator it = entry.begin();
@@ -217,7 +217,7 @@ void ForwardingSlaveBase::rename(const KURL &src, const KURL &dest,
}
}
-void ForwardingSlaveBase::symlink(const QString &target, const KURL &dest,
+void ForwardingSlaveBase::symlink(const TQString &target, const KURL &dest,
bool overwrite)
{
kdDebug() << "ForwardingSlaveBase::symlink: " << target << ", " << dest << endl;
@@ -302,45 +302,45 @@ void ForwardingSlaveBase::connectJob(KIO::Job *job)
kdDebug() << it.key() << " = " << it.data() << endl;
#endif
- connect( job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( slotResult(KIO::Job *) ) );
- connect( job, SIGNAL( warning(KIO::Job *, const QString &) ),
- this, SLOT( slotWarning(KIO::Job *, const QString &) ) );
- connect( job, SIGNAL( infoMessage(KIO::Job *, const QString &) ),
- this, SLOT( slotInfoMessage(KIO::Job *, const QString &) ) );
- connect( job, SIGNAL( totalSize(KIO::Job *, KIO::filesize_t) ),
- this, SLOT( slotTotalSize(KIO::Job *, KIO::filesize_t) ) );
- connect( job, SIGNAL( processedSize(KIO::Job *, KIO::filesize_t) ),
- this, SLOT( slotProcessedSize(KIO::Job *, KIO::filesize_t) ) );
- connect( job, SIGNAL( speed(KIO::Job *, unsigned long) ),
- this, SLOT( slotSpeed(KIO::Job *, unsigned long) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( slotResult(KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( warning(KIO::Job *, const TQString &) ),
+ this, TQT_SLOT( slotWarning(KIO::Job *, const TQString &) ) );
+ connect( job, TQT_SIGNAL( infoMessage(KIO::Job *, const TQString &) ),
+ this, TQT_SLOT( slotInfoMessage(KIO::Job *, const TQString &) ) );
+ connect( job, TQT_SIGNAL( totalSize(KIO::Job *, KIO::filesize_t) ),
+ this, TQT_SLOT( slotTotalSize(KIO::Job *, KIO::filesize_t) ) );
+ connect( job, TQT_SIGNAL( processedSize(KIO::Job *, KIO::filesize_t) ),
+ this, TQT_SLOT( slotProcessedSize(KIO::Job *, KIO::filesize_t) ) );
+ connect( job, TQT_SIGNAL( speed(KIO::Job *, unsigned long) ),
+ this, TQT_SLOT( slotSpeed(KIO::Job *, unsigned long) ) );
}
void ForwardingSlaveBase::connectSimpleJob(KIO::SimpleJob *job)
{
connectJob(job);
- connect( job, SIGNAL( redirection(KIO::Job *, const KURL &) ),
- this, SLOT( slotRedirection(KIO::Job *, const KURL &) ) );
+ connect( job, TQT_SIGNAL( redirection(KIO::Job *, const KURL &) ),
+ this, TQT_SLOT( slotRedirection(KIO::Job *, const KURL &) ) );
}
void ForwardingSlaveBase::connectListJob(KIO::ListJob *job)
{
connectSimpleJob(job);
- connect( job, SIGNAL( entries(KIO::Job *, const KIO::UDSEntryList &) ),
- this, SLOT( slotEntries(KIO::Job *, const KIO::UDSEntryList &) ) );
+ connect( job, TQT_SIGNAL( entries(KIO::Job *, const KIO::UDSEntryList &) ),
+ this, TQT_SLOT( slotEntries(KIO::Job *, const KIO::UDSEntryList &) ) );
}
void ForwardingSlaveBase::connectTransferJob(KIO::TransferJob *job)
{
connectSimpleJob(job);
- connect( job, SIGNAL( data(KIO::Job *, const QByteArray &) ),
- this, SLOT( slotData(KIO::Job *, const QByteArray &) ) );
- connect( job, SIGNAL( dataReq(KIO::Job *, QByteArray &) ),
- this, SLOT( slotDataReq(KIO::Job *, QByteArray &) ) );
- connect( job, SIGNAL( mimetype(KIO::Job *, const QString &) ),
- this, SLOT( slotMimetype(KIO::Job *, const QString &) ) );
- connect( job, SIGNAL( canResume(KIO::Job *, KIO::filesize_t) ),
- this, SLOT( slotCanResume(KIO::Job *, KIO::filesize_t) ) );
+ connect( job, TQT_SIGNAL( data(KIO::Job *, const TQByteArray &) ),
+ this, TQT_SLOT( slotData(KIO::Job *, const TQByteArray &) ) );
+ connect( job, TQT_SIGNAL( dataReq(KIO::Job *, TQByteArray &) ),
+ this, TQT_SLOT( slotDataReq(KIO::Job *, TQByteArray &) ) );
+ connect( job, TQT_SIGNAL( mimetype(KIO::Job *, const TQString &) ),
+ this, TQT_SLOT( slotMimetype(KIO::Job *, const TQString &) ) );
+ connect( job, TQT_SIGNAL( canResume(KIO::Job *, KIO::filesize_t) ),
+ this, TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t) ) );
}
//////////////////////////////////////////////////////////////////////////////
@@ -366,12 +366,12 @@ void ForwardingSlaveBase::slotResult(KIO::Job *job)
qApp->eventLoop()->exitLoop();
}
-void ForwardingSlaveBase::slotWarning(KIO::Job* /*job*/, const QString &msg)
+void ForwardingSlaveBase::slotWarning(KIO::Job* /*job*/, const TQString &msg)
{
warning(msg);
}
-void ForwardingSlaveBase::slotInfoMessage(KIO::Job* /*job*/, const QString &msg)
+void ForwardingSlaveBase::slotInfoMessage(KIO::Job* /*job*/, const TQString &msg)
{
infoMessage(msg);
}
@@ -418,18 +418,18 @@ void ForwardingSlaveBase::slotEntries(KIO::Job* /*job*/,
listEntries( final_entries );
}
-void ForwardingSlaveBase::slotData(KIO::Job* /*job*/, const QByteArray &d)
+void ForwardingSlaveBase::slotData(KIO::Job* /*job*/, const TQByteArray &d)
{
data(d);
}
-void ForwardingSlaveBase::slotDataReq(KIO::Job* /*job*/, QByteArray &data)
+void ForwardingSlaveBase::slotDataReq(KIO::Job* /*job*/, TQByteArray &data)
{
dataReq();
readData(data);
}
-void ForwardingSlaveBase::slotMimetype (KIO::Job* /*job*/, const QString &type)
+void ForwardingSlaveBase::slotMimetype (KIO::Job* /*job*/, const TQString &type)
{
mimeType(type);
}
diff --git a/kio/kio/forwardingslavebase.h b/kio/kio/forwardingslavebase.h
index ff7003463..a536a9f02 100644
--- a/kio/kio/forwardingslavebase.h
+++ b/kio/kio/forwardingslavebase.h
@@ -23,7 +23,7 @@
#include <kio/slavebase.h>
#include <kio/jobclasses.h>
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO
{
@@ -85,13 +85,13 @@ class ForwardingSlaveBasePrivate;
* @since 3.4
* @author Kevin Ottens <ervin@ipsquad.net>
*/
-class KIO_EXPORT ForwardingSlaveBase : public QObject, public SlaveBase
+class KIO_EXPORT ForwardingSlaveBase : public TQObject, public SlaveBase
{
Q_OBJECT
public:
- ForwardingSlaveBase(const QCString &protocol,
- const QCString &poolSocket,
- const QCString &appSocket);
+ ForwardingSlaveBase(const TQCString &protocol,
+ const TQCString &poolSocket,
+ const TQCString &appSocket);
virtual ~ForwardingSlaveBase();
virtual void get(const KURL &url);
@@ -109,7 +109,7 @@ public:
virtual void rename(const KURL &src, const KURL &dest, bool overwrite);
- virtual void symlink(const QString &target, const KURL &dest,
+ virtual void symlink(const TQString &target, const KURL &dest,
bool overwrite);
virtual void chmod(const KURL &url, int permissions);
@@ -174,8 +174,8 @@ private:
private slots:
// KIO::Job
void slotResult(KIO::Job *job);
- void slotWarning(KIO::Job *job, const QString &msg);
- void slotInfoMessage(KIO::Job *job, const QString &msg);
+ void slotWarning(KIO::Job *job, const TQString &msg);
+ void slotInfoMessage(KIO::Job *job, const TQString &msg);
void slotTotalSize(KIO::Job *job, KIO::filesize_t size);
void slotProcessedSize(KIO::Job *job, KIO::filesize_t size);
void slotSpeed(KIO::Job *job, unsigned long bytesPerSecond);
@@ -187,9 +187,9 @@ private slots:
void slotEntries(KIO::Job *job, const KIO::UDSEntryList &entries);
// KIO::TransferJob
- void slotData(KIO::Job *job, const QByteArray &data);
- void slotDataReq(KIO::Job *job, QByteArray &data);
- void slotMimetype (KIO::Job *job, const QString &type);
+ void slotData(KIO::Job *job, const TQByteArray &data);
+ void slotDataReq(KIO::Job *job, TQByteArray &data);
+ void slotMimetype (KIO::Job *job, const TQString &type);
void slotCanResume (KIO::Job *job, KIO::filesize_t offset);
};
diff --git a/kio/kio/global.cpp b/kio/kio/global.cpp
index e36368dad..f67c09ed9 100644
--- a/kio/kio/global.cpp
+++ b/kio/kio/global.cpp
@@ -42,7 +42,7 @@
#include <volmgt.h>
#endif
-KIO_EXPORT QString KIO::convertSizeWithBytes( KIO::filesize_t size )
+KIO_EXPORT TQString KIO::convertSizeWithBytes( KIO::filesize_t size )
{
if ( size >= 1024 )
return convertSize( size ) + " (" + i18n( "%1 B" ).arg( KGlobal::locale()->formatNumber(size, 0) ) + ")";
@@ -50,10 +50,10 @@ KIO_EXPORT QString KIO::convertSizeWithBytes( KIO::filesize_t size )
return convertSize( size );
}
-KIO_EXPORT QString KIO::convertSize( KIO::filesize_t size )
+KIO_EXPORT TQString KIO::convertSize( KIO::filesize_t size )
{
double fsize = size;
- QString s;
+ TQString s;
// Giga-byte
if ( size >= 1073741824 )
{
@@ -88,16 +88,16 @@ KIO_EXPORT QString KIO::convertSize( KIO::filesize_t size )
return s;
}
-KIO_EXPORT QString KIO::convertSizeFromKB( KIO::filesize_t kbSize )
+KIO_EXPORT TQString KIO::convertSizeFromKB( KIO::filesize_t kbSize )
{
return convertSize(kbSize * 1024);
}
-KIO_EXPORT QString KIO::number( KIO::filesize_t size )
+KIO_EXPORT TQString KIO::number( KIO::filesize_t size )
{
char charbuf[256];
sprintf(charbuf, "%lld", size);
- return QString::fromLatin1(charbuf);
+ return TQString::fromLatin1(charbuf);
}
KIO_EXPORT unsigned int KIO::calculateRemainingSeconds( KIO::filesize_t totalSize,
@@ -109,24 +109,24 @@ KIO_EXPORT unsigned int KIO::calculateRemainingSeconds( KIO::filesize_t totalSiz
return 0;
}
-KIO_EXPORT QString KIO::convertSeconds( unsigned int seconds )
+KIO_EXPORT TQString KIO::convertSeconds( unsigned int seconds )
{
unsigned int days = seconds / 86400;
unsigned int hours = (seconds - (days * 86400)) / 3600;
unsigned int mins = (seconds - (days * 86400) - (hours * 3600)) / 60;
seconds = (seconds - (days * 86400) - (hours * 3600) - (mins * 60));
- const QTime time(hours, mins, seconds);
- const QString timeStr( KGlobal::locale()->formatTime(time, true /*with seconds*/, true /*duration*/) );
+ const TQTime time(hours, mins, seconds);
+ const TQString timeStr( KGlobal::locale()->formatTime(time, true /*with seconds*/, true /*duration*/) );
if ( days > 0 )
return i18n("1 day %1", "%n days %1", days).arg(timeStr);
else
return timeStr;
}
-KIO_EXPORT QTime KIO::calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed )
+KIO_EXPORT TQTime KIO::calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed )
{
- QTime remainingTime;
+ TQTime remainingTime;
if ( speed != 0 ) {
KIO::filesize_t secs;
@@ -147,9 +147,9 @@ KIO_EXPORT QTime KIO::calculateRemaining( KIO::filesize_t totalSize, KIO::filesi
return remainingTime;
}
-KIO_EXPORT QString KIO::itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize)
+KIO_EXPORT TQString KIO::itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize)
{
- QString text = items == 0 ? i18n( "No Items" ) : i18n( "One Item", "%n Items", items );
+ TQString text = items == 0 ? i18n( "No Items" ) : i18n( "One Item", "%n Items", items );
text += " - ";
text += files == 0 ? i18n( "No Files" ) : i18n( "One File", "%n Files", files );
if ( showSize && files > 0 )
@@ -162,9 +162,9 @@ KIO_EXPORT QString KIO::itemsSummaryString(uint items, uint files, uint dirs, KI
return text;
}
-KIO_EXPORT QString KIO::encodeFileName( const QString & _str )
+KIO_EXPORT TQString KIO::encodeFileName( const TQString & _str )
{
- QString str( _str );
+ TQString str( _str );
int i = 0;
while ( ( i = str.find( "%", i ) ) != -1 )
@@ -177,9 +177,9 @@ KIO_EXPORT QString KIO::encodeFileName( const QString & _str )
return str;
}
-KIO_EXPORT QString KIO::decodeFileName( const QString & _str )
+KIO_EXPORT TQString KIO::decodeFileName( const TQString & _str )
{
- QString str;
+ TQString str;
unsigned int i = 0;
for ( ; i < _str.length() ; ++i )
@@ -205,14 +205,14 @@ KIO_EXPORT QString KIO::decodeFileName( const QString & _str )
return str;
}
-KIO_EXPORT QString KIO::Job::errorString() const
+KIO_EXPORT TQString KIO::Job::errorString() const
{
return KIO::buildErrorString(m_error, m_errorText);
}
-KIO_EXPORT QString KIO::buildErrorString(int errorCode, const QString &errorText)
+KIO_EXPORT TQString KIO::buildErrorString(int errorCode, const TQString &errorText)
{
- QString result;
+ TQString result;
switch( errorCode )
{
@@ -284,7 +284,7 @@ KIO_EXPORT QString KIO::buildErrorString(int errorCode, const QString &errorText
result = i18n( "Could not create socket for accessing %1." ).arg( errorText );
break;
case KIO::ERR_COULD_NOT_CONNECT:
- result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? QString::fromLatin1("localhost") : errorText );
+ result = i18n( "Could not connect to host %1." ).arg( errorText.isEmpty() ? TQString::fromLatin1("localhost") : errorText );
break;
case KIO::ERR_CONNECTION_BROKEN:
result = i18n( "Connection to host %1 is broken." ).arg( errorText );
@@ -416,7 +416,7 @@ KIO_EXPORT QString KIO::buildErrorString(int errorCode, const QString &errorText
return result;
}
-KIO_EXPORT QString KIO::unsupportedActionErrorString(const QString &protocol, int cmd) {
+KIO_EXPORT TQString KIO::unsupportedActionErrorString(const TQString &protocol, int cmd) {
switch (cmd) {
case CMD_CONNECT:
return i18n("Opening connections is not supported with the protocol %1." ).arg(protocol);
@@ -455,18 +455,18 @@ KIO_EXPORT QString KIO::unsupportedActionErrorString(const QString &protocol, in
}/*end switch*/
}
-KIO_EXPORT QStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0L*/,
+KIO_EXPORT TQStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0L*/,
int method /*= -1*/ ) const
{
- QString errorName, techName, description, ret2;
- QStringList causes, solutions, ret;
+ TQString errorName, techName, description, ret2;
+ TQStringList causes, solutions, ret;
- QByteArray raw = rawErrorDetail( m_error, m_errorText, reqUrl, method );
- QDataStream stream(raw, IO_ReadOnly);
+ TQByteArray raw = rawErrorDetail( m_error, m_errorText, reqUrl, method );
+ TQDataStream stream(raw, IO_ReadOnly);
stream >> errorName >> techName >> description >> causes >> solutions;
- QString url, protocol, datetime;
+ TQString url, protocol, datetime;
if ( reqUrl ) {
url = reqUrl->htmlURL();
protocol = reqUrl->protocol();
@@ -474,16 +474,16 @@ KIO_EXPORT QStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0L
url = i18n( "(unknown)" );
}
- datetime = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(),
+ datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(),
false );
ret << errorName;
- ret << QString::fromLatin1( "<qt><p><b>" ) + errorName +
- QString::fromLatin1( "</b></p><p>" ) + description +
- QString::fromLatin1( "</p>" );
- ret2 = QString::fromLatin1( "<qt><p>" );
+ ret << TQString::fromLatin1( "<qt><p><b>" ) + errorName +
+ TQString::fromLatin1( "</b></p><p>" ) + description +
+ TQString::fromLatin1( "</p>" );
+ ret2 = TQString::fromLatin1( "<qt><p>" );
if ( !techName.isEmpty() )
- ret2 += i18n( "<b>Technical reason</b>: " ) + techName + QString::fromLatin1( "</p>" );
+ ret2 += i18n( "<b>Technical reason</b>: " ) + techName + TQString::fromLatin1( "</p>" );
ret2 += i18n( "</p><p><b>Details of the request</b>:" );
ret2 += i18n( "</p><ul><li>URL: %1</li>" ).arg( url );
if ( !protocol.isEmpty() ) {
@@ -494,21 +494,21 @@ KIO_EXPORT QStringList KIO::Job::detailedErrorStrings( const KURL *reqUrl /*= 0L
if ( !causes.isEmpty() ) {
ret2 += i18n( "<p><b>Possible causes</b>:</p><ul><li>" );
ret2 += causes.join( "</li><li>" );
- ret2 += QString::fromLatin1( "</li></ul>" );
+ ret2 += TQString::fromLatin1( "</li></ul>" );
}
if ( !solutions.isEmpty() ) {
ret2 += i18n( "<p><b>Possible solutions</b>:</p><ul><li>" );
ret2 += solutions.join( "</li><li>" );
- ret2 += QString::fromLatin1( "</li></ul>" );
+ ret2 += TQString::fromLatin1( "</li></ul>" );
}
ret << ret2;
return ret;
}
-KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorText,
+KIO_EXPORT TQByteArray KIO::rawErrorDetail(int errorCode, const TQString &errorText,
const KURL *reqUrl /*= 0L*/, int /*method = -1*/ )
{
- QString url, host, protocol, datetime, domain, path, dir, filename;
+ TQString url, host, protocol, datetime, domain, path, dir, filename;
bool isSlaveNetwork = false;
if ( reqUrl ) {
url = reqUrl->prettyURL();
@@ -556,34 +556,34 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
protocol = i18n( "(unknown)" );
}
- datetime = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(),
+ datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(),
false );
- QString errorName, techName, description;
- QStringList causes, solutions;
+ TQString errorName, techName, description;
+ TQStringList causes, solutions;
// c == cause, s == solution
- QString sSysadmin = i18n( "Contact your appropriate computer support system, "
+ TQString sSysadmin = i18n( "Contact your appropriate computer support system, "
"whether the system administrator, or technical support group for further "
"assistance." );
- QString sServeradmin = i18n( "Contact the administrator of the server "
+ TQString sServeradmin = i18n( "Contact the administrator of the server "
"for further assistance." );
// FIXME active link to permissions dialog
- QString sAccess = i18n( "Check your access permissions on this resource." );
- QString cAccess = i18n( "Your access permissions may be inadequate to "
+ TQString sAccess = i18n( "Check your access permissions on this resource." );
+ TQString cAccess = i18n( "Your access permissions may be inadequate to "
"perform the requested operation on this resource." );
- QString cLocked = i18n( "The file may be in use (and thus locked) by "
+ TQString cLocked = i18n( "The file may be in use (and thus locked) by "
"another user or application." );
- QString sQuerylock = i18n( "Check to make sure that no other "
+ TQString sQuerylock = i18n( "Check to make sure that no other "
"application or user is using the file or has locked the file." );
- QString cHardware = i18n( "Although unlikely, a hardware error may have "
+ TQString cHardware = i18n( "Although unlikely, a hardware error may have "
"occurred." );
- QString cBug = i18n( "You may have encountered a bug in the program." );
- QString cBuglikely = i18n( "This is most likely to be caused by a bug in the "
+ TQString cBug = i18n( "You may have encountered a bug in the program." );
+ TQString cBuglikely = i18n( "This is most likely to be caused by a bug in the "
"program. Please consider submitting a full bug report as detailed below." );
- QString sUpdate = i18n( "Update your software to the latest version. "
+ TQString sUpdate = i18n( "Update your software to the latest version. "
"Your distribution should provide tools to update your software." );
- QString sBugreport = i18n( "When all else fails, please consider helping the "
+ TQString sBugreport = i18n( "When all else fails, please consider helping the "
"KDE team or the third party maintainer of this software by submitting a "
"high quality bug report. If the software is provided by a third party, "
"please contact them directly. Otherwise, first look to see if "
@@ -591,22 +591,22 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
"<a href=\"http://bugs.kde.org/\">KDE bug reporting website</a>. If not, take "
"note of the details given above, and include them in your bug report, along "
"with as many other details as you think might help." );
- QString cNetwork = i18n( "There may have been a problem with your network "
+ TQString cNetwork = i18n( "There may have been a problem with your network "
"connection." );
// FIXME netconf kcontrol link
- QString cNetconf = i18n( "There may have been a problem with your network "
+ TQString cNetconf = i18n( "There may have been a problem with your network "
"configuration. If you have been accessing the Internet with no problems "
"recently, this is unlikely." );
- QString cNetpath = i18n( "There may have been a problem at some point along "
+ TQString cNetpath = i18n( "There may have been a problem at some point along "
"the network path between the server and this computer." );
- QString sTryagain = i18n( "Try again, either now or at a later time." );
- QString cProtocol = i18n( "A protocol error or incompatibility may have occurred." );
- QString sExists = i18n( "Ensure that the resource exists, and try again." );
- QString cExists = i18n( "The specified resource may not exist." );
- QString cTypo = i18n( "You may have incorrectly typed the location." );
- QString sTypo = i18n( "Double-check that you have entered the correct location "
+ TQString sTryagain = i18n( "Try again, either now or at a later time." );
+ TQString cProtocol = i18n( "A protocol error or incompatibility may have occurred." );
+ TQString sExists = i18n( "Ensure that the resource exists, and try again." );
+ TQString cExists = i18n( "The specified resource may not exist." );
+ TQString cTypo = i18n( "You may have incorrectly typed the location." );
+ TQString sTypo = i18n( "Double-check that you have entered the correct location "
"and try again." );
- QString sNetwork = i18n( "Check your network connection status." );
+ TQString sNetwork = i18n( "Check your network connection status." );
switch( errorCode ) {
case KIO::ERR_CANNOT_OPEN_FOR_READING:
@@ -869,7 +869,7 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
"<strong>L</strong>ocator (URL) that you entered did not refer to "
"a valid mechanism of accessing the specific resource, "
"<strong>%1%2</strong>." )
- .arg( !host.isNull() ? host + '/' : QString::null ).arg( dir );
+ .arg( !host.isNull() ? host + '/' : TQString::null ).arg( dir );
causes << i18n( "KDE is able to communicate through a protocol within a "
"protocol. This request specified a protocol be used as such, however "
"this protocol is not capable of such an action. This is a rare event, "
@@ -1231,7 +1231,7 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
// We assume that the slave has all the details
case KIO::ERR_SLAVE_DEFINED:
- errorName = QString::null;
+ errorName = TQString::null;
description = errorText;
break;
@@ -1241,8 +1241,8 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
description = buildErrorString( errorCode, errorText );
}
- QByteArray ret;
- QDataStream stream(ret, IO_WriteOnly);
+ TQByteArray ret;
+ TQDataStream stream(ret, IO_WriteOnly);
stream << errorName << techName << description << causes << solutions;
return ret;
}
@@ -1252,7 +1252,7 @@ KIO_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorTex
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <config.h>
@@ -1365,9 +1365,9 @@ extern "C" void endvfsent( );
#endif /* HAVE_GETMNTINFO */
-QString KIO::findDeviceMountPoint( const QString& filename )
+TQString KIO::findDeviceMountPoint( const TQString& filename )
{
- QString result;
+ TQString result;
#ifdef HAVE_VOLMGT
/*
@@ -1377,22 +1377,22 @@ QString KIO::findDeviceMountPoint( const QString& filename )
FILE *mnttab;
struct mnttab mnt;
int len;
- QCString devname;
+ TQCString devname;
if( (volpath = volmgt_root()) == NULL ) {
kdDebug( 7007 ) << "findDeviceMountPoint: "
<< "VOLMGT: can't find volmgt root dir" << endl;
- return QString::null;
+ return TQString::null;
}
if( (mnttab = fopen( MNTTAB, "r" )) == NULL ) {
kdDebug( 7007 ) << "findDeviceMountPoint: "
<< "VOLMGT: can't open mnttab" << endl;
- return QString::null;
+ return TQString::null;
}
devname = volpath;
- devname += QFile::encodeName( filename );
+ devname += TQFile::encodeName( filename );
devname += '/';
len = devname.length();
// kdDebug( 7007 ) << "findDeviceMountPoint: "
@@ -1407,7 +1407,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
* /dev/dsk/cXtYdZs2 => <volpath>/dev/dsk/cXtYdZ (without slice#)
*/
rewind( mnttab );
- result = QString::null;
+ result = TQString::null;
while( getmntent( mnttab, &mnt ) == 0 ) {
/*
* either match the exact device name (floppies),
@@ -1416,7 +1416,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
if( strncmp( devname.data(), mnt.mnt_special, len ) == 0
|| (strncmp( devname.data(), mnt.mnt_special, len - 3 ) == 0
&& mnt.mnt_special[len - 3] == '/' )
- || (strcmp(QFile::encodeName(filename).data()
+ || (strcmp(TQFile::encodeName(filename).data()
, mnt.mnt_special)==0)) {
result = mnt.mnt_mountp;
break;
@@ -1426,9 +1426,9 @@ QString KIO::findDeviceMountPoint( const QString& filename )
#else
char realpath_buffer[MAXPATHLEN];
- QCString realname;
+ TQCString realname;
- realname = QFile::encodeName(filename);
+ realname = TQFile::encodeName(filename);
/* If the path contains symlinks, get the real name */
if (realpath(realname, realpath_buffer) != 0)
// succes, use result from realpath
@@ -1448,7 +1448,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
for (int i=0;i<num_fs;i++) {
- QCString device_name = mounted[i].f_mntfromname;
+ TQCString device_name = mounted[i].f_mntfromname;
// If the path contains symlinks, get
// the real name
@@ -1509,7 +1509,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
mountedfrom[fsname_len] = '\0';
strncpy(mountedfrom, (char *)vmt2dataptr(vm, VMT_OBJECT), fsname_len);
- QCString device_name = mountedfrom;
+ TQCString device_name = mountedfrom;
if (realpath(device_name, realpath_buffer) != 0)
// success, use result from realpath
@@ -1540,7 +1540,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
if ((mtab = SETMNTENT(MNTTAB, "r")) == 0) {
perror("setmntent");
- return QString::null;
+ return TQString::null;
}
/* Loop over all file systems and see if we can find our
@@ -1559,7 +1559,7 @@ QString KIO::findDeviceMountPoint( const QString& filename )
{
// There may be symbolic links into the /etc/mnttab
// So we have to find the real device name here as well!
- QCString device_name = FSNAME(me);
+ TQCString device_name = FSNAME(me);
if (device_name.isEmpty() || (device_name == "none"))
continue;
@@ -1630,9 +1630,9 @@ static void check_mount_point(const char *mounttype,
// returns the mount point, checks the mount state.
// if ismanual == Wrong this function does not check the manual mount state
-static QString get_mount_info(const QString& filename,
+static TQString get_mount_info(const TQString& filename,
MountState& isautofs, MountState& isslow, MountState& ismanual,
- QString& fstype)
+ TQString& fstype)
{
static bool gotRoot = false;
static dev_t rootDevice;
@@ -1640,11 +1640,11 @@ static QString get_mount_info(const QString& filename,
struct cachedDevice_t
{
dev_t device;
- QString mountPoint;
+ TQString mountPoint;
MountState isautofs;
MountState isslow;
MountState ismanual;
- QString fstype;
+ TQString fstype;
};
static struct cachedDevice_t *cachedDevice = 0;
@@ -1658,16 +1658,16 @@ static QString get_mount_info(const QString& filename,
bool gotDevice = false;
KDE_struct_stat stat_buf;
- if (KDE_stat(QFile::encodeName(filename), &stat_buf) == 0)
+ if (KDE_stat(TQFile::encodeName(filename), &stat_buf) == 0)
{
gotDevice = true;
if (stat_buf.st_dev == rootDevice)
{
- static const QString &root = KGlobal::staticQString("/");
+ static const TQString &root = KGlobal::staticQString("/");
isautofs = Wrong;
isslow = Wrong;
ismanual = Wrong;
- fstype = QString::null; // ### do we need it?
+ fstype = TQString::null; // ### do we need it?
return root;
}
if (cachedDevice && (stat_buf.st_dev == cachedDevice->device))
@@ -1688,13 +1688,13 @@ static QString get_mount_info(const QString& filename,
memset(realname, 0, MAXPATHLEN);
/* If the path contains symlinks, get the real name */
- if (realpath(QFile::encodeName(filename), realname) == 0) {
- if( strlcpy(realname, QFile::encodeName(filename), MAXPATHLEN)>=MAXPATHLEN)
- return QString::null;
+ if (realpath(TQFile::encodeName(filename), realname) == 0) {
+ if( strlcpy(realname, TQFile::encodeName(filename), MAXPATHLEN)>=MAXPATHLEN)
+ return TQString::null;
}
int max = 0;
- QString mountPoint;
+ TQString mountPoint;
/* Loop over all file systems and see if we can find our
* mount point.
@@ -1720,7 +1720,7 @@ static QString get_mount_info(const QString& filename,
for (int i=0;i<num_fs;i++) {
- QCString device_name = mounted[i].f_mntfromname;
+ TQCString device_name = mounted[i].f_mntfromname;
// If the path contains symlinks, get
// the real name
@@ -1734,8 +1734,8 @@ static QString get_mount_info(const QString& filename,
#endif
if ( is_my_mountpoint( mounted[i].f_mntonname, realname, max ) )
{
- mountPoint = QFile::decodeName(mounted[i].f_mntonname);
- fstype = QString::fromLatin1(mounttype);
+ mountPoint = TQFile::decodeName(mounted[i].f_mntonname);
+ fstype = TQString::fromLatin1(mounttype);
check_mount_point( mounttype, mounted[i].f_mntfromname,
isautofs, isslow );
// keep going, looking for a potentially better one
@@ -1787,7 +1787,7 @@ static QString get_mount_info(const QString& filename,
strncpy(mountedfrom, (char *)vmt2dataptr(vm, VMT_OBJECT), fsname_len);
/* get the mount-from information: */
- QCString device_name = mountedfrom;
+ TQCString device_name = mountedfrom;
if (realpath(device_name, realpath_buffer) != 0)
// success, use result from realpath
@@ -1801,8 +1801,8 @@ static QString get_mount_info(const QString& filename,
if ( is_my_mountpoint( mountedto, realname, max ) )
{
- mountPoint = QFile::decodeName(mountedto);
- fstype = QString::fromLatin1(ent->vfsent_name);
+ mountPoint = TQFile::decodeName(mountedto);
+ fstype = TQString::fromLatin1(ent->vfsent_name);
check_mount_point(ent->vfsent_name, device_name, isautofs, isslow);
if (ismanual == Unseen)
@@ -1832,7 +1832,7 @@ static QString get_mount_info(const QString& filename,
if ((mtab = SETMNTENT(MNTTAB, "r")) == 0) {
perror("setmntent");
- return QString::null;
+ return TQString::null;
}
STRUCT_MNTENT me;
@@ -1843,7 +1843,7 @@ static QString get_mount_info(const QString& filename,
if ( is_my_mountpoint( MOUNTPOINT(me), realname, max ) )
{
- mountPoint = QFile::decodeName( MOUNTPOINT(me) );
+ mountPoint = TQFile::decodeName( MOUNTPOINT(me) );
fstype = MOUNTTYPE(me);
check_mount_point(MOUNTTYPE(me), FSNAME(me), isautofs, isslow);
// we don't check if ismanual is Right, if /a/b is manually
@@ -1852,8 +1852,8 @@ static QString get_mount_info(const QString& filename,
{
// The next GETMNTENT call may destroy 'me'
// Copy out the info that we need
- QCString fsname_me = FSNAME(me);
- QCString mounttype_me = MOUNTTYPE(me);
+ TQCString fsname_me = FSNAME(me);
+ TQCString mounttype_me = MOUNTTYPE(me);
STRUCT_SETMNTENT fstab;
if ((fstab = SETMNTENT(FSTAB, "r")) == 0) {
@@ -1906,53 +1906,53 @@ static QString get_mount_info(const QString& filename,
#else //!Q_OS_UNIX
//dummy
-QString KIO::findDeviceMountPoint( const QString& filename )
+TQString KIO::findDeviceMountPoint( const TQString& filename )
{
- return QString::null;
+ return TQString::null;
}
#endif
-QString KIO::findPathMountPoint(const QString& filename)
+TQString KIO::findPathMountPoint(const TQString& filename)
{
#ifdef Q_OS_UNIX
MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong;
- QString fstype;
+ TQString fstype;
return get_mount_info(filename, isautofs, isslow, ismanual, fstype);
#else //!Q_OS_UNIX
- return QString::null;
+ return TQString::null;
#endif
}
-bool KIO::manually_mounted(const QString& filename)
+bool KIO::manually_mounted(const TQString& filename)
{
#ifdef Q_OS_UNIX
MountState isautofs = Unseen, isslow = Unseen, ismanual = Unseen;
- QString fstype;
- QString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
+ TQString fstype;
+ TQString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
return !mountPoint.isNull() && (ismanual == Right);
#else //!Q_OS_UNIX
return false;
#endif
}
-bool KIO::probably_slow_mounted(const QString& filename)
+bool KIO::probably_slow_mounted(const TQString& filename)
{
#ifdef Q_OS_UNIX
MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong;
- QString fstype;
- QString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
+ TQString fstype;
+ TQString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
return !mountPoint.isNull() && (isslow == Right);
#else //!Q_OS_UNIX
return false;
#endif
}
-bool KIO::testFileSystemFlag(const QString& filename, FileSystemFlag flag)
+bool KIO::testFileSystemFlag(const TQString& filename, FileSystemFlag flag)
{
#ifdef Q_OS_UNIX
MountState isautofs = Unseen, isslow = Unseen, ismanual = Wrong;
- QString fstype;
- QString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
+ TQString fstype;
+ TQString mountPoint = get_mount_info(filename, isautofs, isslow, ismanual, fstype);
kdDebug() << "testFileSystemFlag: fstype=" << fstype << endl;
if (mountPoint.isNull())
return false;
@@ -1970,9 +1970,9 @@ bool KIO::testFileSystemFlag(const QString& filename, FileSystemFlag flag)
return false;
}
-KIO::CacheControl KIO::parseCacheControl(const QString &cacheControl)
+KIO::CacheControl KIO::parseCacheControl(const TQString &cacheControl)
{
- QString tmp = cacheControl.lower();
+ TQString tmp = cacheControl.lower();
if (tmp == "cacheonly")
return KIO::CC_CacheOnly;
@@ -1989,7 +1989,7 @@ KIO::CacheControl KIO::parseCacheControl(const QString &cacheControl)
return KIO::CC_Verify;
}
-QString KIO::getCacheControlString(KIO::CacheControl cacheControl)
+TQString KIO::getCacheControlString(KIO::CacheControl cacheControl)
{
if (cacheControl == KIO::CC_CacheOnly)
return "CacheOnly";
@@ -2002,5 +2002,5 @@ QString KIO::getCacheControlString(KIO::CacheControl cacheControl)
if (cacheControl == KIO::CC_Reload)
return "Reload";
kdDebug() << "unrecognized Cache control enum value:"<<cacheControl<<endl;
- return QString::null;
+ return TQString::null;
}
diff --git a/kio/kio/global.h b/kio/kio/global.h
index 4ff622d6e..cea9dc5f4 100644
--- a/kio/kio/global.h
+++ b/kio/kio/global.h
@@ -18,12 +18,12 @@
#ifndef __kio_global_h__
#define __kio_global_h__
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qdatastream.h>
-#include <qdatetime.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
#include <kurl.h>
@@ -44,7 +44,7 @@ namespace KIO
* @param size size in bytes
* @return converted size as a string - e.g. 123.4 kB , 12.0 MB
*/
- KIO_EXPORT QString convertSize( KIO::filesize_t size );
+ KIO_EXPORT TQString convertSize( KIO::filesize_t size );
/**
* Converts @p size from bytes to a string representation with includes
@@ -53,15 +53,15 @@ namespace KIO
* @param size size in bytes
* @return converted size as a string - e.g. 1.4 KB (1495 B), 45 B
*/
- KIO_EXPORT QString convertSizeWithBytes( KIO::filesize_t size );
+ KIO_EXPORT TQString convertSizeWithBytes( KIO::filesize_t size );
/**
* Converts a size to a string representation
- * Not unlike QString::number(...)
+ * Not unlike TQString::number(...)
*
* @param size size in bytes
* @return converted size as a string - e.g. 123456789
*/
- KIO_EXPORT QString number( KIO::filesize_t size );
+ KIO_EXPORT TQString number( KIO::filesize_t size );
/**
* Converts size from kilo-bytes to the string representation.
@@ -69,7 +69,7 @@ namespace KIO
* @param kbSize size in kilo-bytes
* @return converted size as a string - e.g. 123.4 kB , 12.0 MB
*/
- KIO_EXPORT QString convertSizeFromKB( KIO::filesize_t kbSize );
+ KIO_EXPORT TQString convertSizeFromKB( KIO::filesize_t kbSize );
/**
* Calculates remaining time in seconds from total size, processed size and speed.
@@ -92,18 +92,18 @@ namespace KIO
*
* @since 3.4
*/
- KIO_EXPORT QString convertSeconds( unsigned int seconds );
+ KIO_EXPORT TQString convertSeconds( unsigned int seconds );
/**
* Calculates remaining time from total size, processed size and speed.
- * Warning: As QTime is limited to 23:59:59, use calculateRemainingSeconds() instead
+ * Warning: As TQTime is limited to 23:59:59, use calculateRemainingSeconds() instead
*
* @param totalSize total size in bytes
* @param processedSize processed size in bytes
* @param speed speed in bytes per second
* @return calculated remaining time
*/
- KIO_EXPORT QTime calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed ) KDE_DEPRECATED;
+ KIO_EXPORT TQTime calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed ) KDE_DEPRECATED;
/**
* Helper for showing information about a set of files and directories
@@ -114,7 +114,7 @@ namespace KIO
* @param showSize whether to show the size in the result
* @return the summary string
*/
- KIO_EXPORT QString itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize);
+ KIO_EXPORT TQString itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize);
/**
* Encodes (from the text displayed to the real filename)
@@ -123,14 +123,14 @@ namespace KIO
* @param str the file name to encode
* @return the encoded file name
*/
- KIO_EXPORT QString encodeFileName( const QString & str );
+ KIO_EXPORT TQString encodeFileName( const TQString & str );
/**
* Decodes (from the filename to the text displayed)
* This translates %2[fF] into / and %% into %
* @param str the file name to decode
* @return the decoded file name
*/
- KIO_EXPORT QString decodeFileName( const QString & str );
+ KIO_EXPORT TQString decodeFileName( const TQString & str );
/**
* Commands that can be invoked by a job.
@@ -255,7 +255,7 @@ namespace KIO
* @param errorText the additional error text
* @return the created error string
*/
- KIO_EXPORT QString buildErrorString(int errorCode, const QString &errorText);
+ KIO_EXPORT TQString buildErrorString(int errorCode, const TQString &errorText);
/**
* Returns a translated html error message for @p errorCode using the
@@ -267,7 +267,7 @@ namespace KIO
* @param method the ioslave method
* @return the created error string
*/
- KIO_EXPORT QString buildHTMLErrorString(int errorCode, const QString &errorText,
+ KIO_EXPORT TQString buildHTMLErrorString(int errorCode, const TQString &errorText,
const KURL *reqUrl = 0L, int method = -1 );
/**
@@ -280,13 +280,13 @@ namespace KIO
* @param reqUrl the request URL
* @param method the ioslave method
* @return the following data:
- * @li QString errorName - the name of the error
- * @li QString techName - if not null, the more technical name of the error
- * @li QString description - a description of the error
- * @li QStringList causes - a list of possible causes of the error
- * @li QStringList solutions - a liso of solutions for the error
+ * @li TQString errorName - the name of the error
+ * @li TQString techName - if not null, the more technical name of the error
+ * @li TQString description - a description of the error
+ * @li TQStringList causes - a list of possible causes of the error
+ * @li TQStringList solutions - a liso of solutions for the error
*/
- KIO_EXPORT QByteArray rawErrorDetail(int errorCode, const QString &errorText,
+ KIO_EXPORT TQByteArray rawErrorDetail(int errorCode, const TQString &errorText,
const KURL *reqUrl = 0L, int method = -1 );
/**
@@ -297,7 +297,7 @@ namespace KIO
* @see enum Command
* @since 3.2
*/
- KIO_EXPORT QString unsupportedActionErrorString(const QString &protocol, int cmd);
+ KIO_EXPORT TQString unsupportedActionErrorString(const TQString &protocol, int cmd);
/**
* Constants used to specify the type of a KUDSAtom.
@@ -398,7 +398,7 @@ namespace KIO
* @return the cache control value
* @see getCacheControlString()
*/
- KIO_EXPORT KIO::CacheControl parseCacheControl(const QString &cacheControl);
+ KIO_EXPORT KIO::CacheControl parseCacheControl(const TQString &cacheControl);
/**
* Returns a string representation of the given cache control method.
@@ -407,14 +407,14 @@ namespace KIO
* @return the string representation
* @see parseCacheControl()
*/
- KIO_EXPORT QString getCacheControlString(KIO::CacheControl cacheControl);
+ KIO_EXPORT TQString getCacheControlString(KIO::CacheControl cacheControl);
/**
* Returns the mount point where @p device is mounted
* right now. This means, it has to be mounted, not just
* defined in fstab.
*/
- KIO_EXPORT QString findDeviceMountPoint( const QString& device );
+ KIO_EXPORT TQString findDeviceMountPoint( const TQString& device );
/**
* Returns the mount point on which resides @p filename.
@@ -423,7 +423,7 @@ namespace KIO
* @param filename the file name to check
* @return the mount point of the given @p filename
*/
- KIO_EXPORT QString findPathMountPoint( const QString & filename );
+ KIO_EXPORT TQString findPathMountPoint( const TQString & filename );
/**
* Checks if the path belongs to a filesystem that is probably
@@ -432,7 +432,7 @@ namespace KIO
* @param filename the file name to check
* @return true if the filesystem is probably slow
*/
- KIO_EXPORT bool probably_slow_mounted(const QString& filename);
+ KIO_EXPORT bool probably_slow_mounted(const TQString& filename);
/**
* Checks if the path belongs to a filesystem that is manually
@@ -440,7 +440,7 @@ namespace KIO
* @param filename the file name to check
* @return true if the filesystem is manually mounted
*/
- KIO_EXPORT bool manually_mounted(const QString& filename);
+ KIO_EXPORT bool manually_mounted(const TQString& filename);
enum FileSystemFlag { SupportsChmod, SupportsChown, SupportsUTime,
SupportsSymlinks, CaseInsensitive };
@@ -464,7 +464,7 @@ namespace KIO
* "foo" and "FOO" as being the same file (true for msdos systems)
*
*/
- KIO_EXPORT bool testFileSystemFlag(const QString& filename, FileSystemFlag flag);
+ KIO_EXPORT bool testFileSystemFlag(const TQString& filename, FileSystemFlag flag);
/************
@@ -486,7 +486,7 @@ public:
/**
* Whether 'm_str' or 'm_long' is used depends on the value of 'm_uds'.
*/
- QString m_str;
+ TQString m_str;
/**
* Whether 'm_str' or 'm_long' is used depends on the value of 'm_uds'.
*/
@@ -501,35 +501,35 @@ public:
/**
* An entry is the list of atoms containing all the informations for a file or URL
*/
-typedef QValueList<UDSAtom> UDSEntry;
-typedef QValueList<UDSEntry> UDSEntryList;
-typedef QValueListIterator<UDSEntry> UDSEntryListIterator;
-typedef QValueListConstIterator<UDSEntry> UDSEntryListConstIterator;
+typedef TQValueList<UDSAtom> UDSEntry;
+typedef TQValueList<UDSEntry> UDSEntryList;
+typedef TQValueListIterator<UDSEntry> UDSEntryListIterator;
+typedef TQValueListConstIterator<UDSEntry> UDSEntryListConstIterator;
/**
* MetaData is a simple map of key/value strings.
*/
-class KIO_EXPORT MetaData : public QMap<QString, QString>
+class KIO_EXPORT MetaData : public TQMap<TQString, TQString>
{
public:
/**
* Creates an empty meta data map.
*/
- MetaData() : QMap<QString, QString>() { };
+ MetaData() : TQMap<TQString, TQString>() { };
/**
* Copy constructor.
*/
- MetaData(const QMap<QString, QString>&metaData) :
- QMap<QString, QString>(metaData) { };
+ MetaData(const TQMap<TQString, TQString>&metaData) :
+ TQMap<TQString, TQString>(metaData) { };
/**
* Adds the given meta data map to this map.
* @param metaData the map to add
* @return this map
*/
- MetaData & operator+= ( const QMap<QString,QString> &metaData )
+ MetaData & operator+= ( const TQMap<TQString,TQString> &metaData )
{
- QMap<QString,QString>::ConstIterator it;
+ TQMap<TQString,TQString>::ConstIterator it;
for( it = metaData.begin();
it != metaData.end();
++it)
diff --git a/kio/kio/job.cpp b/kio/kio/job.cpp
index 96e2e1647..b20c09c10 100644
--- a/kio/kio/job.cpp
+++ b/kio/kio/job.cpp
@@ -38,8 +38,8 @@ extern "C" {
#include <pwd.h>
#include <grp.h>
}
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -79,12 +79,12 @@ extern "C" {
#endif
using namespace KIO;
-template class QPtrList<KIO::Job>;
+template class TQPtrList<KIO::Job>;
//this will update the report dialog with 5 Hz, I think this is fast enough, aleXXX
#define REPORT_TIMEOUT 200
-#define KIO_ARGS QByteArray packedArgs; QDataStream stream( packedArgs, IO_WriteOnly ); stream
+#define KIO_ARGS TQByteArray packedArgs; TQDataStream stream( packedArgs, IO_WriteOnly ); stream
class Job::JobPrivate
{
@@ -97,8 +97,8 @@ public:
bool m_autoErrorHandling;
bool m_autoWarningHandling;
bool m_interactive;
- QGuardedPtr<QWidget> m_errorParentWidget;
- // Maybe we could use the QObject parent/child mechanism instead
+ TQGuardedPtr<TQWidget> m_errorParentWidget;
+ // Maybe we could use the TQObject parent/child mechanism instead
// (requires a new ctor, and moving the ctor code to some init()).
Job* m_parentJob;
int m_extraFlags;
@@ -106,7 +106,7 @@ public:
unsigned long m_userTimestamp;
};
-Job::Job(bool showProgressInfo) : QObject(0, "job"), m_error(0), m_percent(0)
+Job::Job(bool showProgressInfo) : TQObject(0, "job"), m_error(0), m_percent(0)
, m_progressId(0), m_speedTimer(0), d( new JobPrivate )
{
// All jobs delete themselves after emiting 'result'.
@@ -115,19 +115,19 @@ Job::Job(bool showProgressInfo) : QObject(0, "job"), m_error(0), m_percent(0)
if ( showProgressInfo )
{
m_progressId = Observer::self()->newJob( this, true );
- addMetaData("progress-id", QString::number(m_progressId));
+ addMetaData("progress-id", TQString::number(m_progressId));
//kdDebug(7007) << "Created job " << this << " with progress info -- m_progressId=" << m_progressId << endl;
// Connect global progress info signals
- connect( this, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( infoMessage( KIO::Job*, const QString & ) ),
- Observer::self(), SLOT( slotInfoMessage( KIO::Job*, const QString & ) ) );
- connect( this, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
- Observer::self(), SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( this, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
- Observer::self(), SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( this, SIGNAL( speed( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString & ) ),
+ Observer::self(), TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString & ) ) );
+ connect( this, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
+ Observer::self(), TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( this, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
+ Observer::self(), TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( this, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
}
// Don't exit while this job is running
if (kapp)
@@ -164,15 +164,15 @@ void Job::addSubjob(Job *job, bool inheritMetaData)
//kdDebug(7007) << "addSubjob(" << job << ") this = " << this << endl;
subjobs.append(job);
- connect( job, SIGNAL(result(KIO::Job*)),
- SLOT(slotResult(KIO::Job*)) );
+ connect( job, TQT_SIGNAL(result(KIO::Job*)),
+ TQT_SLOT(slotResult(KIO::Job*)) );
// Forward information from that subjob.
- connect( job, SIGNAL(speed( KIO::Job*, unsigned long )),
- SLOT(slotSpeed(KIO::Job*, unsigned long)) );
+ connect( job, TQT_SIGNAL(speed( KIO::Job*, unsigned long )),
+ TQT_SLOT(slotSpeed(KIO::Job*, unsigned long)) );
- connect( job, SIGNAL(infoMessage( KIO::Job*, const QString & )),
- SLOT(slotInfoMessage(KIO::Job*, const QString &)) );
+ connect( job, TQT_SIGNAL(infoMessage( KIO::Job*, const TQString & )),
+ TQT_SLOT(slotInfoMessage(KIO::Job*, const TQString &)) );
if (inheritMetaData)
job->mergeMetaData(m_outgoingMetaData);
@@ -218,8 +218,8 @@ void Job::emitSpeed( unsigned long bytes_per_second )
//kdDebug(7007) << "Job " << this << " emitSpeed " << bytes_per_second << endl;
if ( !m_speedTimer )
{
- m_speedTimer = new QTimer();
- connect( m_speedTimer, SIGNAL( timeout() ), SLOT( slotSpeedTimeout() ) );
+ m_speedTimer = new TQTimer();
+ connect( m_speedTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotSpeedTimeout() ) );
}
emit speed( this, bytes_per_second );
m_speedTimer->start( 5000 ); // 5 seconds interval should be enough
@@ -240,7 +240,7 @@ void Job::kill( bool quietly )
{
kdDebug(7007) << "Job::kill this=" << this << " " << className() << " m_progressId=" << m_progressId << " quietly=" << quietly << endl;
// kill all subjobs, without triggering their result slot
- QPtrListIterator<Job> it( subjobs );
+ TQPtrListIterator<Job> it( subjobs );
for ( ; it.current() ; ++it )
(*it)->kill( true );
subjobs.clear();
@@ -275,7 +275,7 @@ void Job::slotSpeed( KIO::Job*, unsigned long speed )
emitSpeed( speed );
}
-void Job::slotInfoMessage( KIO::Job*, const QString & msg )
+void Job::slotInfoMessage( KIO::Job*, const TQString & msg )
{
emit infoMessage( this, msg );
}
@@ -291,7 +291,7 @@ void Job::slotSpeedTimeout()
//Job::errorString is implemented in global.cpp
-void Job::showErrorDialog( QWidget * parent )
+void Job::showErrorDialog( TQWidget * parent )
{
//kdDebug(7007) << "Job::showErrorDialog parent=" << parent << endl;
kapp->enableStyles();
@@ -303,9 +303,9 @@ void Job::showErrorDialog( QWidget * parent )
KMessageBox::queuedMessageBox( parent, KMessageBox::Error, errorString() );
#if 0
} else {
- QStringList errors = detailedErrorStrings();
- QString caption, err, detail;
- QStringList::const_iterator it = errors.begin();
+ TQStringList errors = detailedErrorStrings();
+ TQString caption, err, detail;
+ TQStringList::const_iterator it = errors.begin();
if ( it != errors.end() )
caption = *(it++);
if ( it != errors.end() )
@@ -318,7 +318,7 @@ void Job::showErrorDialog( QWidget * parent )
}
}
-void Job::setAutoErrorHandlingEnabled( bool enable, QWidget *parentWidget )
+void Job::setAutoErrorHandlingEnabled( bool enable, TQWidget *parentWidget )
{
d->m_autoErrorHandling = enable;
d->m_errorParentWidget = parentWidget;
@@ -349,13 +349,13 @@ bool Job::isInteractive() const
return d->m_interactive;
}
-void Job::setWindow(QWidget *window)
+void Job::setWindow(TQWidget *window)
{
m_window = window;
KIO::Scheduler::registerWindow(window);
}
-QWidget *Job::window() const
+TQWidget *Job::window() const
{
return m_window;
}
@@ -390,10 +390,10 @@ MetaData Job::metaData() const
return m_incomingMetaData;
}
-QString Job::queryMetaData(const QString &key)
+TQString Job::queryMetaData(const TQString &key)
{
if (!m_incomingMetaData.contains(key))
- return QString::null;
+ return TQString::null;
return m_incomingMetaData[key];
}
@@ -402,21 +402,21 @@ void Job::setMetaData( const KIO::MetaData &_metaData)
m_outgoingMetaData = _metaData;
}
-void Job::addMetaData( const QString &key, const QString &value)
+void Job::addMetaData( const TQString &key, const TQString &value)
{
m_outgoingMetaData.insert(key, value);
}
-void Job::addMetaData( const QMap<QString,QString> &values)
+void Job::addMetaData( const TQMap<TQString,TQString> &values)
{
- QMapConstIterator<QString,QString> it = values.begin();
+ TQMapConstIterator<TQString,TQString> it = values.begin();
for(;it != values.end(); ++it)
m_outgoingMetaData.insert(it.key(), it.data());
}
-void Job::mergeMetaData( const QMap<QString,QString> &values)
+void Job::mergeMetaData( const TQMap<TQString,TQString> &values)
{
- QMapConstIterator<QString,QString> it = values.begin();
+ TQMapConstIterator<TQString,TQString> it = values.begin();
for(;it != values.end(); ++it)
m_outgoingMetaData.insert(it.key(), it.data(), false);
}
@@ -427,7 +427,7 @@ MetaData Job::outgoingMetaData() const
}
-SimpleJob::SimpleJob(const KURL& url, int command, const QByteArray &packedArgs,
+SimpleJob::SimpleJob(const KURL& url, int command, const TQByteArray &packedArgs,
bool showProgressInfo )
: Job(showProgressInfo), m_slave(0), m_packedArgs(packedArgs),
m_url(url), m_command(command), m_totalSize(0)
@@ -449,7 +449,7 @@ SimpleJob::SimpleJob(const KURL& url, int command, const QByteArray &packedArgs,
kdDebug() << "ERR_MALFORMED_URL" << endl;
m_error = ERR_MALFORMED_URL;
m_errorText = m_url.url();
- QTimer::singleShot(0, this, SLOT(slotFinished()) );
+ TQTimer::singleShot(0, this, TQT_SLOT(slotFinished()) );
return;
}
}
@@ -495,51 +495,51 @@ void SimpleJob::start(Slave *slave)
{
m_slave = slave;
- connect( m_slave, SIGNAL( error( int , const QString & ) ),
- SLOT( slotError( int , const QString & ) ) );
+ connect( m_slave, TQT_SIGNAL( error( int , const TQString & ) ),
+ TQT_SLOT( slotError( int , const TQString & ) ) );
- connect( m_slave, SIGNAL( warning( const QString & ) ),
- SLOT( slotWarning( const QString & ) ) );
+ connect( m_slave, TQT_SIGNAL( warning( const TQString & ) ),
+ TQT_SLOT( slotWarning( const TQString & ) ) );
- connect( m_slave, SIGNAL( infoMessage( const QString & ) ),
- SLOT( slotInfoMessage( const QString & ) ) );
+ connect( m_slave, TQT_SIGNAL( infoMessage( const TQString & ) ),
+ TQT_SLOT( slotInfoMessage( const TQString & ) ) );
- connect( m_slave, SIGNAL( connected() ),
- SLOT( slotConnected() ) );
+ connect( m_slave, TQT_SIGNAL( connected() ),
+ TQT_SLOT( slotConnected() ) );
- connect( m_slave, SIGNAL( finished() ),
- SLOT( slotFinished() ) );
+ connect( m_slave, TQT_SIGNAL( finished() ),
+ TQT_SLOT( slotFinished() ) );
if ((extraFlags() & EF_TransferJobDataSent) == 0)
{
- connect( m_slave, SIGNAL( totalSize( KIO::filesize_t ) ),
- SLOT( slotTotalSize( KIO::filesize_t ) ) );
+ connect( m_slave, TQT_SIGNAL( totalSize( KIO::filesize_t ) ),
+ TQT_SLOT( slotTotalSize( KIO::filesize_t ) ) );
- connect( m_slave, SIGNAL( processedSize( KIO::filesize_t ) ),
- SLOT( slotProcessedSize( KIO::filesize_t ) ) );
+ connect( m_slave, TQT_SIGNAL( processedSize( KIO::filesize_t ) ),
+ TQT_SLOT( slotProcessedSize( KIO::filesize_t ) ) );
- connect( m_slave, SIGNAL( speed( unsigned long ) ),
- SLOT( slotSpeed( unsigned long ) ) );
+ connect( m_slave, TQT_SIGNAL( speed( unsigned long ) ),
+ TQT_SLOT( slotSpeed( unsigned long ) ) );
}
- connect( slave, SIGNAL( needProgressId() ),
- SLOT( slotNeedProgressId() ) );
+ connect( slave, TQT_SIGNAL( needProgressId() ),
+ TQT_SLOT( slotNeedProgressId() ) );
- connect( slave, SIGNAL(metaData( const KIO::MetaData& ) ),
- SLOT( slotMetaData( const KIO::MetaData& ) ) );
+ connect( slave, TQT_SIGNAL(metaData( const KIO::MetaData& ) ),
+ TQT_SLOT( slotMetaData( const KIO::MetaData& ) ) );
if (m_window)
{
- QString id;
+ TQString id;
addMetaData("window-id", id.setNum((ulong)m_window->winId()));
}
if (userTimestamp())
{
- QString id;
+ TQString id;
addMetaData("user-timestamp", id.setNum(userTimestamp()));
}
- QString sslSession = KSSLCSessionCache::getSessionForURL(m_url);
+ TQString sslSession = KSSLCSessionCache::getSessionForURL(m_url);
if ( !sslSession.isNull() )
{
addMetaData("ssl_session_id", sslSession);
@@ -592,7 +592,7 @@ void SimpleJob::slotFinished( )
else /*if ( m_command == CMD_RENAME )*/
{
KURL src, dst;
- QDataStream str( m_packedArgs, IO_ReadOnly );
+ TQDataStream str( m_packedArgs, IO_ReadOnly );
str >> src >> dst;
if ( src.directory() == dst.directory() ) // For the user, moving isn't renaming. Only renaming is.
allDirNotify.FileRenamed( src, dst );
@@ -602,19 +602,19 @@ void SimpleJob::slotFinished( )
}
}
-void SimpleJob::slotError( int error, const QString & errorText )
+void SimpleJob::slotError( int error, const TQString & errorText )
{
m_error = error;
m_errorText = errorText;
if ((m_error == ERR_UNKNOWN_HOST) && m_url.host().isEmpty())
- m_errorText = QString::null;
+ m_errorText = TQString::null;
// error terminates the job
slotFinished();
}
-void SimpleJob::slotWarning( const QString & errorText )
+void SimpleJob::slotWarning( const TQString & errorText )
{
- QGuardedPtr<SimpleJob> guard( this );
+ TQGuardedPtr<SimpleJob> guard( this );
if (isInteractive() && isAutoWarningHandlingEnabled())
{
static uint msgBoxDisplayed = 0;
@@ -631,7 +631,7 @@ void SimpleJob::slotWarning( const QString & errorText )
emit warning( this, errorText );
}
-void SimpleJob::slotInfoMessage( const QString & msg )
+void SimpleJob::slotInfoMessage( const TQString & msg )
{
emit infoMessage( this, msg );
}
@@ -680,7 +680,7 @@ void SimpleJob::slotMetaData( const KIO::MetaData &_metaData)
}
void SimpleJob::storeSSLSessionFromJob(const KURL &m_redirectionURL) {
- QString sslSession = queryMetaData("ssl_session_id");
+ TQString sslSession = queryMetaData("ssl_session_id");
if ( !sslSession.isNull() ) {
const KURL &queryURL = m_redirectionURL.isEmpty()?m_url:m_redirectionURL;
@@ -690,15 +690,15 @@ void SimpleJob::storeSSLSessionFromJob(const KURL &m_redirectionURL) {
//////////
MkdirJob::MkdirJob( const KURL& url, int command,
- const QByteArray &packedArgs, bool showProgressInfo )
+ const TQByteArray &packedArgs, bool showProgressInfo )
: SimpleJob(url, command, packedArgs, showProgressInfo)
{
}
void MkdirJob::start(Slave *slave)
{
- connect( slave, SIGNAL( redirection(const KURL &) ),
- SLOT( slotRedirection(const KURL &) ) );
+ connect( slave, TQT_SIGNAL( redirection(const KURL &) ),
+ TQT_SLOT( slotRedirection(const KURL &) ) );
SimpleJob::start(slave);
}
@@ -733,13 +733,13 @@ void MkdirJob::slotFinished()
emit permanentRedirection(this, m_url, m_redirectionURL);
KURL dummyUrl;
int permissions;
- QDataStream istream( m_packedArgs, IO_ReadOnly );
+ TQDataStream istream( m_packedArgs, IO_ReadOnly );
istream >> dummyUrl >> permissions;
m_url = m_redirectionURL;
m_redirectionURL = KURL();
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url << permissions;
// Return slave to the scheduler
@@ -776,30 +776,30 @@ SimpleJob *KIO::rename( const KURL& src, const KURL & dest, bool overwrite )
return new SimpleJob(src, CMD_RENAME, packedArgs, false);
}
-SimpleJob *KIO::symlink( const QString& target, const KURL & dest, bool overwrite, bool showProgressInfo )
+SimpleJob *KIO::symlink( const TQString& target, const KURL & dest, bool overwrite, bool showProgressInfo )
{
//kdDebug(7007) << "symlink target=" << target << " " << dest << endl;
KIO_ARGS << target << dest << (Q_INT8) overwrite;
return new SimpleJob(dest, CMD_SYMLINK, packedArgs, showProgressInfo);
}
-SimpleJob *KIO::special(const KURL& url, const QByteArray & data, bool showProgressInfo)
+SimpleJob *KIO::special(const KURL& url, const TQByteArray & data, bool showProgressInfo)
{
//kdDebug(7007) << "special " << url << endl;
return new SimpleJob(url, CMD_SPECIAL, data, showProgressInfo);
}
-SimpleJob *KIO::mount( bool ro, const char *fstype, const QString& dev, const QString& point, bool showProgressInfo )
+SimpleJob *KIO::mount( bool ro, const char *fstype, const TQString& dev, const TQString& point, bool showProgressInfo )
{
KIO_ARGS << int(1) << Q_INT8( ro ? 1 : 0 )
- << QString::fromLatin1(fstype) << dev << point;
+ << TQString::fromLatin1(fstype) << dev << point;
SimpleJob *job = special( KURL("file:/"), packedArgs, showProgressInfo );
if ( showProgressInfo )
Observer::self()->mounting( job, dev, point );
return job;
}
-SimpleJob *KIO::unmount( const QString& point, bool showProgressInfo )
+SimpleJob *KIO::unmount( const TQString& point, bool showProgressInfo )
{
KIO_ARGS << int(2) << point;
SimpleJob *job = special( KURL("file:/"), packedArgs, showProgressInfo );
@@ -813,7 +813,7 @@ SimpleJob *KIO::unmount( const QString& point, bool showProgressInfo )
//////////
StatJob::StatJob( const KURL& url, int command,
- const QByteArray &packedArgs, bool showProgressInfo )
+ const TQByteArray &packedArgs, bool showProgressInfo )
: SimpleJob(url, command, packedArgs, showProgressInfo),
m_bSource(true), m_details(2)
{
@@ -822,12 +822,12 @@ StatJob::StatJob( const KURL& url, int command,
void StatJob::start(Slave *slave)
{
m_outgoingMetaData.replace( "statSide", m_bSource ? "source" : "dest" );
- m_outgoingMetaData.replace( "details", QString::number(m_details) );
+ m_outgoingMetaData.replace( "details", TQString::number(m_details) );
- connect( slave, SIGNAL( statEntry( const KIO::UDSEntry& ) ),
- SLOT( slotStatEntry( const KIO::UDSEntry & ) ) );
- connect( slave, SIGNAL( redirection(const KURL &) ),
- SLOT( slotRedirection(const KURL &) ) );
+ connect( slave, TQT_SIGNAL( statEntry( const KIO::UDSEntry& ) ),
+ TQT_SLOT( slotStatEntry( const KIO::UDSEntry & ) ) );
+ connect( slave, TQT_SIGNAL( redirection(const KURL &) ),
+ TQT_SLOT( slotRedirection(const KURL &) ) );
SimpleJob::start(slave);
}
@@ -869,7 +869,7 @@ void StatJob::slotFinished()
m_url = m_redirectionURL;
m_redirectionURL = KURL();
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url;
// Return slave to the scheduler
@@ -914,8 +914,8 @@ SimpleJob *KIO::http_update_cache( const KURL& url, bool no_cache, time_t expire
//////////
TransferJob::TransferJob( const KURL& url, int command,
- const QByteArray &packedArgs,
- const QByteArray &_staticData,
+ const TQByteArray &packedArgs,
+ const TQByteArray &_staticData,
bool showProgressInfo)
: SimpleJob(url, command, packedArgs, showProgressInfo), staticData( _staticData)
{
@@ -927,7 +927,7 @@ TransferJob::TransferJob( const KURL& url, int command,
}
// Slave sends data
-void TransferJob::slotData( const QByteArray &_data)
+void TransferJob::slotData( const TQByteArray &_data)
{
if(m_redirectionURL.isEmpty() || !m_redirectionURL.isValid() || m_error)
emit data( this, _data);
@@ -985,13 +985,13 @@ void TransferJob::slotFinished()
m_url = m_redirectionURL;
m_redirectionURL = KURL();
// The very tricky part is the packed arguments business
- QString dummyStr;
+ TQString dummyStr;
KURL dummyUrl;
- QDataStream istream( m_packedArgs, IO_ReadOnly );
+ TQDataStream istream( m_packedArgs, IO_ReadOnly );
switch( m_command ) {
case CMD_GET: {
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url;
break;
}
@@ -1000,7 +1000,7 @@ void TransferJob::slotFinished()
Q_INT8 iOverwrite, iResume;
istream >> dummyUrl >> iOverwrite >> iResume >> permissions;
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url << iOverwrite << iResume << permissions;
break;
}
@@ -1011,7 +1011,7 @@ void TransferJob::slotFinished()
{
addMetaData("cache","reload");
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url;
m_command = CMD_GET;
}
@@ -1033,7 +1033,7 @@ void TransferJob::setAsyncDataEnabled(bool enabled)
extraFlags() &= ~EF_TransferJobAsync;
}
-void TransferJob::sendAsyncData(const QByteArray &dataForSlave)
+void TransferJob::sendAsyncData(const TQByteArray &dataForSlave)
{
if (extraFlags() & EF_TransferJobNeedData)
{
@@ -1070,14 +1070,14 @@ bool TransferJob::reportDataSent()
// Slave requests data
void TransferJob::slotDataReq()
{
- QByteArray dataForSlave;
+ TQByteArray dataForSlave;
extraFlags() |= EF_TransferJobNeedData;
if (!staticData.isEmpty())
{
dataForSlave = staticData;
- staticData = QByteArray();
+ staticData = TQByteArray();
}
else
{
@@ -1105,7 +1105,7 @@ void TransferJob::slotDataReq()
}
}
-void TransferJob::slotMimetype( const QString& type )
+void TransferJob::slotMimetype( const TQString& type )
{
m_mimetype = type;
emit mimetype( this, m_mimetype);
@@ -1129,26 +1129,26 @@ void TransferJob::resume()
void TransferJob::start(Slave *slave)
{
assert(slave);
- connect( slave, SIGNAL( data( const QByteArray & ) ),
- SLOT( slotData( const QByteArray & ) ) );
+ connect( slave, TQT_SIGNAL( data( const TQByteArray & ) ),
+ TQT_SLOT( slotData( const TQByteArray & ) ) );
- connect( slave, SIGNAL( dataReq() ),
- SLOT( slotDataReq() ) );
+ connect( slave, TQT_SIGNAL( dataReq() ),
+ TQT_SLOT( slotDataReq() ) );
- connect( slave, SIGNAL( redirection(const KURL &) ),
- SLOT( slotRedirection(const KURL &) ) );
+ connect( slave, TQT_SIGNAL( redirection(const KURL &) ),
+ TQT_SLOT( slotRedirection(const KURL &) ) );
- connect( slave, SIGNAL(mimeType( const QString& ) ),
- SLOT( slotMimetype( const QString& ) ) );
+ connect( slave, TQT_SIGNAL(mimeType( const TQString& ) ),
+ TQT_SLOT( slotMimetype( const TQString& ) ) );
- connect( slave, SIGNAL(errorPage() ),
- SLOT( slotErrorPage() ) );
+ connect( slave, TQT_SIGNAL(errorPage() ),
+ TQT_SLOT( slotErrorPage() ) );
- connect( slave, SIGNAL( needSubURLData() ),
- SLOT( slotNeedSubURLData() ) );
+ connect( slave, TQT_SIGNAL( needSubURLData() ),
+ TQT_SLOT( slotNeedSubURLData() ) );
- connect( slave, SIGNAL(canResume( KIO::filesize_t ) ),
- SLOT( slotCanResume( KIO::filesize_t ) ) );
+ connect( slave, TQT_SIGNAL(canResume( KIO::filesize_t ) ),
+ TQT_SLOT( slotCanResume( KIO::filesize_t ) ) );
if (slave->suspended())
{
@@ -1167,12 +1167,12 @@ void TransferJob::slotNeedSubURLData()
// Job needs data from subURL.
m_subJob = KIO::get( m_subUrl, false, false);
suspend(); // Put job on hold until we have some data.
- connect(m_subJob, SIGNAL( data(KIO::Job*,const QByteArray &)),
- SLOT( slotSubURLData(KIO::Job*,const QByteArray &)));
+ connect(m_subJob, TQT_SIGNAL( data(KIO::Job*,const TQByteArray &)),
+ TQT_SLOT( slotSubURLData(KIO::Job*,const TQByteArray &)));
addSubjob(m_subJob);
}
-void TransferJob::slotSubURLData(KIO::Job*, const QByteArray &data)
+void TransferJob::slotSubURLData(KIO::Job*, const TQByteArray &data)
{
// The Alternating Bitburg protocol in action again.
staticData = data;
@@ -1221,7 +1221,7 @@ TransferJob *KIO::get( const KURL& url, bool reload, bool showProgressInfo )
{
// Send decoded path and encoded query
KIO_ARGS << url;
- TransferJob * job = new TransferJob( url, CMD_GET, packedArgs, QByteArray(), showProgressInfo );
+ TransferJob * job = new TransferJob( url, CMD_GET, packedArgs, TQByteArray(), showProgressInfo );
if (reload)
job->addMetaData("cache", "reload");
return job;
@@ -1231,7 +1231,7 @@ class PostErrorJob : public TransferJob
{
public:
- PostErrorJob(int _error, const QString& url, const QByteArray &packedArgs, const QByteArray &postData, bool showProgressInfo)
+ PostErrorJob(int _error, const TQString& url, const TQByteArray &packedArgs, const TQByteArray &postData, bool showProgressInfo)
: TransferJob(KURL(), CMD_SPECIAL, packedArgs, postData, showProgressInfo)
{
m_error = _error;
@@ -1240,7 +1240,7 @@ public:
};
-TransferJob *KIO::http_post( const KURL& url, const QByteArray &postData, bool showProgressInfo )
+TransferJob *KIO::http_post( const KURL& url, const TQByteArray &postData, bool showProgressInfo )
{
int _error = 0;
@@ -1317,15 +1317,15 @@ TransferJob *KIO::http_post( const KURL& url, const QByteArray &postData, bool s
if( _error )
{
static bool override_loaded = false;
- static QValueList< int >* overriden_ports = NULL;
+ static TQValueList< int >* overriden_ports = NULL;
if( !override_loaded )
{
KConfig cfg( "kio_httprc", true );
- overriden_ports = new QValueList< int >;
+ overriden_ports = new TQValueList< int >;
*overriden_ports = cfg.readIntListEntry( "OverriddenPorts" );
override_loaded = true;
}
- for( QValueList< int >::ConstIterator it = overriden_ports->begin();
+ for( TQValueList< int >::ConstIterator it = overriden_ports->begin();
it != overriden_ports->end();
++it )
if( overriden_ports->contains( url.port()))
@@ -1361,7 +1361,7 @@ TransferJob *KIO::http_post( const KURL& url, const QByteArray &postData, bool s
packedArgs, postData, showProgressInfo );
if (redirection)
- QTimer::singleShot(0, job, SLOT(slotPostRedirection()) );
+ TQTimer::singleShot(0, job, TQT_SLOT(slotPostRedirection()) );
return job;
}
@@ -1381,43 +1381,43 @@ TransferJob *KIO::put( const KURL& url, int permissions,
bool overwrite, bool resume, bool showProgressInfo )
{
KIO_ARGS << url << Q_INT8( overwrite ? 1 : 0 ) << Q_INT8( resume ? 1 : 0 ) << permissions;
- TransferJob * job = new TransferJob( url, CMD_PUT, packedArgs, QByteArray(), showProgressInfo );
+ TransferJob * job = new TransferJob( url, CMD_PUT, packedArgs, TQByteArray(), showProgressInfo );
return job;
}
//////////
StoredTransferJob::StoredTransferJob(const KURL& url, int command,
- const QByteArray &packedArgs,
- const QByteArray &_staticData,
+ const TQByteArray &packedArgs,
+ const TQByteArray &_staticData,
bool showProgressInfo)
: TransferJob( url, command, packedArgs, _staticData, showProgressInfo ),
m_uploadOffset( 0 )
{
- connect( this, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- SLOT( slotStoredData( KIO::Job *, const QByteArray & ) ) );
- connect( this, SIGNAL( dataReq( KIO::Job *, QByteArray & ) ),
- SLOT( slotStoredDataReq( KIO::Job *, QByteArray & ) ) );
+ connect( this, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ TQT_SLOT( slotStoredData( KIO::Job *, const TQByteArray & ) ) );
+ connect( this, TQT_SIGNAL( dataReq( KIO::Job *, TQByteArray & ) ),
+ TQT_SLOT( slotStoredDataReq( KIO::Job *, TQByteArray & ) ) );
}
-void StoredTransferJob::setData( const QByteArray& arr )
+void StoredTransferJob::setData( const TQByteArray& arr )
{
Q_ASSERT( m_data.isNull() ); // check that we're only called once
Q_ASSERT( m_uploadOffset == 0 ); // no upload started yet
m_data = arr;
}
-void StoredTransferJob::slotStoredData( KIO::Job *, const QByteArray &data )
+void StoredTransferJob::slotStoredData( KIO::Job *, const TQByteArray &data )
{
// check for end-of-data marker:
if ( data.size() == 0 )
return;
unsigned int oldSize = m_data.size();
- m_data.resize( oldSize + data.size(), QGArray::SpeedOptim );
+ m_data.resize( oldSize + data.size(), TQGArray::SpeedOptim );
memcpy( m_data.data() + oldSize, data.data(), data.size() );
}
-void StoredTransferJob::slotStoredDataReq( KIO::Job *, QByteArray &data )
+void StoredTransferJob::slotStoredDataReq( KIO::Job *, TQByteArray &data )
{
// Inspired from kmail's KMKernel::byteArrayToRemoteFile
// send the data in 64 KB chunks
@@ -1432,7 +1432,7 @@ void StoredTransferJob::slotStoredDataReq( KIO::Job *, QByteArray &data )
} else {
// send the remaining bytes to the receiver (deep copy)
data.duplicate( m_data.data() + m_uploadOffset, remainingBytes );
- m_data = QByteArray();
+ m_data = TQByteArray();
m_uploadOffset = 0;
//kdDebug() << "Sending " << remainingBytes << " bytes\n";
}
@@ -1442,17 +1442,17 @@ StoredTransferJob *KIO::storedGet( const KURL& url, bool reload, bool showProgre
{
// Send decoded path and encoded query
KIO_ARGS << url;
- StoredTransferJob * job = new StoredTransferJob( url, CMD_GET, packedArgs, QByteArray(), showProgressInfo );
+ StoredTransferJob * job = new StoredTransferJob( url, CMD_GET, packedArgs, TQByteArray(), showProgressInfo );
if (reload)
job->addMetaData("cache", "reload");
return job;
}
-StoredTransferJob *KIO::storedPut( const QByteArray& arr, const KURL& url, int permissions,
+StoredTransferJob *KIO::storedPut( const TQByteArray& arr, const KURL& url, int permissions,
bool overwrite, bool resume, bool showProgressInfo )
{
KIO_ARGS << url << Q_INT8( overwrite ? 1 : 0 ) << Q_INT8( resume ? 1 : 0 ) << permissions;
- StoredTransferJob * job = new StoredTransferJob( url, CMD_PUT, packedArgs, QByteArray(), showProgressInfo );
+ StoredTransferJob * job = new StoredTransferJob( url, CMD_PUT, packedArgs, TQByteArray(), showProgressInfo );
job->setData( arr );
return job;
}
@@ -1460,8 +1460,8 @@ StoredTransferJob *KIO::storedPut( const QByteArray& arr, const KURL& url, int p
//////////
MimetypeJob::MimetypeJob( const KURL& url, int command,
- const QByteArray &packedArgs, bool showProgressInfo )
- : TransferJob(url, command, packedArgs, QByteArray(), showProgressInfo)
+ const TQByteArray &packedArgs, bool showProgressInfo )
+ : TransferJob(url, command, packedArgs, TQByteArray(), showProgressInfo)
{
}
@@ -1480,7 +1480,7 @@ void MimetypeJob::slotFinished( )
// Due to the "protocol doesn't support listing" code in KRun, we
// assumed it was a file.
kdDebug(7007) << "It is in fact a directory!" << endl;
- m_mimetype = QString::fromLatin1("inode/directory");
+ m_mimetype = TQString::fromLatin1("inode/directory");
emit TransferJob::mimetype( this, m_mimetype );
m_error = 0;
}
@@ -1497,7 +1497,7 @@ void MimetypeJob::slotFinished( )
m_url = m_redirectionURL;
m_redirectionURL = KURL();
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url;
// Return slave to the scheduler
@@ -1518,15 +1518,15 @@ MimetypeJob *KIO::mimetype(const KURL& url, bool showProgressInfo )
//////////////////////////
DirectCopyJob::DirectCopyJob( const KURL& url, int command,
- const QByteArray &packedArgs, bool showProgressInfo )
+ const TQByteArray &packedArgs, bool showProgressInfo )
: SimpleJob(url, command, packedArgs, showProgressInfo)
{
}
void DirectCopyJob::start( Slave* slave )
{
- connect( slave, SIGNAL(canResume( KIO::filesize_t ) ),
- SLOT( slotCanResume( KIO::filesize_t ) ) );
+ connect( slave, TQT_SIGNAL(canResume( KIO::filesize_t ) ),
+ TQT_SLOT( slotCanResume( KIO::filesize_t ) ) );
SimpleJob::start(slave);
}
@@ -1573,7 +1573,7 @@ FileCopyJob::FileCopyJob( const KURL& src, const KURL& dest, int permissions,
d->m_delJob = 0;
d->m_sourceSize = (KIO::filesize_t) -1;
d->m_modificationTime = static_cast<time_t>( -1 );
- QTimer::singleShot(0, this, SLOT(slotStart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStart()));
}
void FileCopyJob::slotStart()
@@ -1667,8 +1667,8 @@ void FileCopyJob::startCopyJob(const KURL &slave_url)
m_copyJob = new DirectCopyJob(slave_url, CMD_COPY, packedArgs, false);
addSubjob( m_copyJob );
connectSubjob( m_copyJob );
- connect( m_copyJob, SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
- SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
+ connect( m_copyJob, TQT_SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
+ TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
}
void FileCopyJob::startRenameJob(const KURL &slave_url)
@@ -1681,14 +1681,14 @@ void FileCopyJob::startRenameJob(const KURL &slave_url)
void FileCopyJob::connectSubjob( SimpleJob * job )
{
- connect( job, SIGNAL(totalSize( KIO::Job*, KIO::filesize_t )),
- this, SLOT( slotTotalSize(KIO::Job*, KIO::filesize_t)) );
+ connect( job, TQT_SIGNAL(totalSize( KIO::Job*, KIO::filesize_t )),
+ this, TQT_SLOT( slotTotalSize(KIO::Job*, KIO::filesize_t)) );
- connect( job, SIGNAL(processedSize( KIO::Job*, KIO::filesize_t )),
- this, SLOT( slotProcessedSize(KIO::Job*, KIO::filesize_t)) );
+ connect( job, TQT_SIGNAL(processedSize( KIO::Job*, KIO::filesize_t )),
+ this, TQT_SLOT( slotProcessedSize(KIO::Job*, KIO::filesize_t)) );
- connect( job, SIGNAL(percent( KIO::Job*, unsigned long )),
- this, SLOT( slotPercent(KIO::Job*, unsigned long)) );
+ connect( job, TQT_SIGNAL(percent( KIO::Job*, unsigned long )),
+ this, TQT_SLOT( slotPercent(KIO::Job*, unsigned long)) );
}
@@ -1729,17 +1729,17 @@ void FileCopyJob::startDataPump()
m_getJob = 0L; // for now
m_putJob = put( m_dest, m_permissions, m_overwrite, m_resume, false /* no GUI */);
if ( d->m_modificationTime != static_cast<time_t>( -1 ) ) {
- QDateTime dt; dt.setTime_t( d->m_modificationTime );
+ TQDateTime dt; dt.setTime_t( d->m_modificationTime );
m_putJob->addMetaData( "modified", dt.toString( Qt::ISODate ) );
}
//kdDebug(7007) << "FileCopyJob: m_putJob = " << m_putJob << " m_dest=" << m_dest << endl;
// The first thing the put job will tell us is whether we can
// resume or not (this is always emitted)
- connect( m_putJob, SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
- SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
- connect( m_putJob, SIGNAL(dataReq(KIO::Job *, QByteArray&)),
- SLOT( slotDataReq(KIO::Job *, QByteArray&)));
+ connect( m_putJob, TQT_SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
+ TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
+ connect( m_putJob, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray&)),
+ TQT_SLOT( slotDataReq(KIO::Job *, TQByteArray&)));
addSubjob( m_putJob );
}
@@ -1754,7 +1754,7 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset )
if (!KProtocolManager::autoResume() && !m_overwrite)
{
- QString newPath;
+ TQString newPath;
KIO::Job* job = ( !m_progressId && parentJob() ) ? parentJob() : this;
// Ask confirmation about resuming previous transfer
res = Observer::self()->open_RenameDlg(
@@ -1798,8 +1798,8 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset )
m_getJob->addMetaData( "resume", KIO::number(offset) );
// Might or might not get emitted
- connect( m_getJob, SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
- SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
+ connect( m_getJob, TQT_SIGNAL(canResume(KIO::Job *, KIO::filesize_t)),
+ TQT_SLOT( slotCanResume(KIO::Job *, KIO::filesize_t)));
}
m_putJob->slave()->setOffset( offset );
@@ -1808,10 +1808,10 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset )
connectSubjob( m_getJob ); // Progress info depends on get
m_getJob->resume(); // Order a beer
- connect( m_getJob, SIGNAL(data(KIO::Job*,const QByteArray&)),
- SLOT( slotData(KIO::Job*,const QByteArray&)) );
- connect( m_getJob, SIGNAL(mimetype(KIO::Job*,const QString&) ),
- SLOT(slotMimetype(KIO::Job*,const QString&)) );
+ connect( m_getJob, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)),
+ TQT_SLOT( slotData(KIO::Job*,const TQByteArray&)) );
+ connect( m_getJob, TQT_SIGNAL(mimetype(KIO::Job*,const TQString&) ),
+ TQT_SLOT(slotMimetype(KIO::Job*,const TQString&)) );
}
else // copyjob
{
@@ -1831,7 +1831,7 @@ void FileCopyJob::slotCanResume( KIO::Job* job, KIO::filesize_t offset )
<< " m_getJob=" << m_getJob << " m_putJob=" << m_putJob << endl;
}
-void FileCopyJob::slotData( KIO::Job * , const QByteArray &data)
+void FileCopyJob::slotData( KIO::Job * , const TQByteArray &data)
{
//kdDebug(7007) << "FileCopyJob::slotData" << endl;
//kdDebug(7007) << " data size : " << data.size() << endl;
@@ -1851,7 +1851,7 @@ void FileCopyJob::slotData( KIO::Job * , const QByteArray &data)
}
}
-void FileCopyJob::slotDataReq( KIO::Job * , QByteArray &data)
+void FileCopyJob::slotDataReq( KIO::Job * , TQByteArray &data)
{
//kdDebug(7007) << "FileCopyJob::slotDataReq" << endl;
if (!m_resumeAnswerSent && !m_getJob)
@@ -1869,10 +1869,10 @@ void FileCopyJob::slotDataReq( KIO::Job * , QByteArray &data)
m_putJob->suspend();
}
data = m_buffer;
- m_buffer = QByteArray();
+ m_buffer = TQByteArray();
}
-void FileCopyJob::slotMimetype( KIO::Job*, const QString& type )
+void FileCopyJob::slotMimetype( KIO::Job*, const TQString& type )
{
emit mimetype( this, type );
}
@@ -1980,14 +1980,14 @@ SimpleJob *KIO::file_delete( const KURL& src, bool showProgressInfo)
//////////
-// KDE 4: Make it const QString & _prefix
-ListJob::ListJob(const KURL& u, bool showProgressInfo, bool _recursive, QString _prefix, bool _includeHidden) :
- SimpleJob(u, CMD_LISTDIR, QByteArray(), showProgressInfo),
+// KDE 4: Make it const TQString & _prefix
+ListJob::ListJob(const KURL& u, bool showProgressInfo, bool _recursive, TQString _prefix, bool _includeHidden) :
+ SimpleJob(u, CMD_LISTDIR, TQByteArray(), showProgressInfo),
recursive(_recursive), includeHidden(_includeHidden), prefix(_prefix), m_processedEntries(0)
{
// We couldn't set the args when calling the parent constructor,
// so do it now.
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << u;
}
@@ -2031,7 +2031,7 @@ void ListJob::slotListEntries( const KIO::UDSEntryList& list )
}
}
if (isDir && !isLink) {
- const QString filename = itemURL.fileName();
+ const TQString filename = itemURL.fileName();
// skip hidden dirs when listing if requested
if (filename != ".." && filename != "." && (includeHidden || filename[0] != '.')) {
ListJob *job = new ListJob(itemURL,
@@ -2040,9 +2040,9 @@ void ListJob::slotListEntries( const KIO::UDSEntryList& list )
prefix + filename + "/",
includeHidden);
Scheduler::scheduleJob(job);
- connect(job, SIGNAL(entries( KIO::Job *,
+ connect(job, TQT_SIGNAL(entries( KIO::Job *,
const KIO::UDSEntryList& )),
- SLOT( gotEntries( KIO::Job*,
+ TQT_SLOT( gotEntries( KIO::Job*,
const KIO::UDSEntryList& )));
addSubjob(job);
}
@@ -2065,7 +2065,7 @@ void ListJob::slotListEntries( const KIO::UDSEntryList& list )
UDSEntry newone = *it;
UDSEntry::Iterator it2 = newone.begin();
- QString filename;
+ TQString filename;
for( ; it2 != newone.end(); it2++ ) {
if ((*it2).m_uds == UDS_NAME) {
filename = (*it2).m_str;
@@ -2115,7 +2115,7 @@ void ListJob::slotFinished()
if ( m_error == KIO::ERR_IS_FILE && m_url.isLocalFile() ) {
KMimeType::Ptr ptr = KMimeType::findByURL( m_url, 0, true, true );
if ( ptr ) {
- QString proto = ptr->property("X-KDE-LocalProtocol").toString();
+ TQString proto = ptr->property("X-KDE-LocalProtocol").toString();
if ( !proto.isEmpty() && KProtocolInfo::isKnownProtocol(proto) ) {
m_redirectionURL = m_url;
m_redirectionURL.setProtocol( proto );
@@ -2135,7 +2135,7 @@ void ListJob::slotFinished()
m_url = m_redirectionURL;
m_redirectionURL = KURL();
m_packedArgs.truncate(0);
- QDataStream stream( m_packedArgs, IO_WriteOnly );
+ TQDataStream stream( m_packedArgs, IO_WriteOnly );
stream << m_url;
// Return slave to the scheduler
@@ -2151,13 +2151,13 @@ void ListJob::slotMetaData( const KIO::MetaData &_metaData) {
ListJob *KIO::listDir( const KURL& url, bool showProgressInfo, bool includeHidden )
{
- ListJob * job = new ListJob(url, showProgressInfo,false,QString::null,includeHidden);
+ ListJob * job = new ListJob(url, showProgressInfo,false,TQString::null,includeHidden);
return job;
}
ListJob *KIO::listRecursive( const KURL& url, bool showProgressInfo, bool includeHidden )
{
- ListJob * job = new ListJob(url, showProgressInfo, true,QString::null,includeHidden);
+ ListJob * job = new ListJob(url, showProgressInfo, true,TQString::null,includeHidden);
return job;
}
@@ -2175,15 +2175,15 @@ void ListJob::start(Slave *slave)
{
m_error = ERR_ACCESS_DENIED;
m_errorText = m_url.url();
- QTimer::singleShot(0, this, SLOT(slotFinished()) );
+ TQTimer::singleShot(0, this, TQT_SLOT(slotFinished()) );
return;
}
- connect( slave, SIGNAL( listEntries( const KIO::UDSEntryList& )),
- SLOT( slotListEntries( const KIO::UDSEntryList& )));
- connect( slave, SIGNAL( totalSize( KIO::filesize_t ) ),
- SLOT( slotTotalSize( KIO::filesize_t ) ) );
- connect( slave, SIGNAL( redirection(const KURL &) ),
- SLOT( slotRedirection(const KURL &) ) );
+ connect( slave, TQT_SIGNAL( listEntries( const KIO::UDSEntryList& )),
+ TQT_SLOT( slotListEntries( const KIO::UDSEntryList& )));
+ connect( slave, TQT_SIGNAL( totalSize( KIO::filesize_t ) ),
+ TQT_SLOT( slotTotalSize( KIO::filesize_t ) ) );
+ connect( slave, TQT_SIGNAL( redirection(const KURL &) ),
+ TQT_SLOT( slotRedirection(const KURL &) ) );
SimpleJob::start(slave);
}
@@ -2208,7 +2208,7 @@ public:
bool m_bURLDirty;
// Used after copying all the files into the dirs, to set mtime (TODO: and permissions?)
// after the copy is done
- QValueList<CopyInfo> m_directoriesCopied;
+ TQValueList<CopyInfo> m_directoriesCopied;
};
CopyJob::CopyJob( const KURL::List& src, const KURL& dest, CopyMode mode, bool asMethod, bool showProgressInfo )
@@ -2226,13 +2226,13 @@ CopyJob::CopyJob( const KURL::List& src, const KURL& dest, CopyMode mode, bool a
d->m_globalDestinationState = destinationState;
if ( showProgressInfo ) {
- connect( this, SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
}
- QTimer::singleShot(0, this, SLOT(slotStart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStart()));
/**
States:
STATE_STATING for the dest
@@ -2261,9 +2261,9 @@ void CopyJob::slotStart()
Calling a function via a signal takes approx. 65 times the time
compared to calling it directly (at least on my machine). aleXXX
*/
- m_reportTimer = new QTimer(this);
+ m_reportTimer = new TQTimer(this);
- connect(m_reportTimer,SIGNAL(timeout()),this,SLOT(slotReport()));
+ connect(m_reportTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotReport()));
m_reportTimer->start(REPORT_TIMEOUT,false);
// Stat the dest
@@ -2314,8 +2314,8 @@ void CopyJob::slotResultStating( Job *job )
UDSEntry entry = ((StatJob*)job)->statResult();
bool bDir = false;
bool bLink = false;
- QString sName;
- QString sLocalPath;
+ TQString sName;
+ TQString sLocalPath;
UDSEntry::ConstIterator it2 = entry.begin();
for( ; it2 != entry.end(); it2++ ) {
if ( ((*it2).m_uds) == UDS_FILE_TYPE )
@@ -2398,7 +2398,7 @@ void CopyJob::slotResultStating( Job *job )
if ( !m_asMethod )
{
// Use <desturl>/<directory_copied> as destination, from now on
- QString directory = srcurl.fileName();
+ TQString directory = srcurl.fileName();
if ( !sName.isEmpty() && KProtocolInfo::fileNameUsedForCopying( srcurl ) == KProtocolInfo::Name )
{
directory = sName;
@@ -2502,9 +2502,9 @@ void CopyJob::slotEntries(KIO::Job* job, const UDSEntryList& list)
info.mtime = (time_t) -1;
info.ctime = (time_t) -1;
info.size = (KIO::filesize_t)-1;
- QString displayName;
+ TQString displayName;
KURL url;
- QString localPath;
+ TQString localPath;
bool isDir = false;
for( ; it2 != (*it).end(); it2++ ) {
switch ((*it2).m_uds) {
@@ -2566,13 +2566,13 @@ void CopyJob::slotEntries(KIO::Job* job, const UDSEntryList& list)
// (passed here during stating) but not its children (during listing)
( ! ( m_asMethod && state == STATE_STATING ) ) )
{
- QString destFileName;
+ TQString destFileName;
if ( hasCustomURL &&
KProtocolInfo::fileNameUsedForCopying( url ) == KProtocolInfo::FromURL ) {
//destFileName = url.fileName(); // Doesn't work for recursive listing
// Count the number of prefixes used by the recursive listjob
int numberOfSlashes = displayName.contains( '/' ); // don't make this a find()!
- QString path = url.path();
+ TQString path = url.path();
int pos = 0;
for ( int n = 0; n < numberOfSlashes + 1; ++n ) {
pos = path.findRev( '/', pos - 1 );
@@ -2707,7 +2707,7 @@ void CopyJob::statCurrentSrc()
// if the file system doesn't support deleting, we do not even stat
if (m_mode == Move && !KProtocolInfo::supportsDeleting(m_currentSrcURL)) {
- QGuardedPtr<CopyJob> that = this;
+ TQGuardedPtr<CopyJob> that = this;
if (isInteractive())
KMessageBox::information( 0, buildErrorString(ERR_CANNOT_DELETE, m_currentSrcURL.prettyURL()));
if (that)
@@ -2759,7 +2759,7 @@ void CopyJob::startRenameJob( const KURL& slave_url )
info.size = (KIO::filesize_t)-1;
info.uSource = m_currentSrcURL;
info.uDest = dest;
- QValueList<CopyInfo> files;
+ TQValueList<CopyInfo> files;
files.append(info);
emit aboutToCreate( this, files );
@@ -2777,9 +2777,9 @@ void CopyJob::startListing( const KURL & src )
d->m_bURLDirty = true;
ListJob * newjob = listRecursive( src, false );
newjob->setUnrestricted(true);
- connect(newjob, SIGNAL(entries( KIO::Job *,
+ connect(newjob, TQT_SIGNAL(entries( KIO::Job *,
const KIO::UDSEntryList& )),
- SLOT( slotEntries( KIO::Job*,
+ TQT_SLOT( slotEntries( KIO::Job*,
const KIO::UDSEntryList& )));
addSubjob( newjob );
}
@@ -2798,20 +2798,20 @@ void CopyJob::skip( const KURL & sourceUrl )
dirsToRemove.remove( sourceUrl );
}
-bool CopyJob::shouldOverwrite( const QString& path ) const
+bool CopyJob::shouldOverwrite( const TQString& path ) const
{
if ( m_bOverwriteAll )
return true;
- QStringList::ConstIterator sit = m_overwriteList.begin();
+ TQStringList::ConstIterator sit = m_overwriteList.begin();
for( ; sit != m_overwriteList.end(); ++sit )
if ( path.startsWith( *sit ) )
return true;
return false;
}
-bool CopyJob::shouldSkip( const QString& path ) const
+bool CopyJob::shouldSkip( const TQString& path ) const
{
- QStringList::ConstIterator sit = m_skipList.begin();
+ TQStringList::ConstIterator sit = m_skipList.begin();
for( ; sit != m_skipList.end(); ++sit )
if ( path.startsWith( *sit ) )
return true;
@@ -2821,7 +2821,7 @@ bool CopyJob::shouldSkip( const QString& path ) const
void CopyJob::slotResultCreatingDirs( Job * job )
{
// The dir we are trying to create:
- QValueList<CopyInfo>::Iterator it = dirs.begin();
+ TQValueList<CopyInfo>::Iterator it = dirs.begin();
// Was there an error creating a dir ?
if ( job->error() )
{
@@ -2838,7 +2838,7 @@ void CopyJob::slotResultCreatingDirs( Job * job )
dirs.remove( it ); // Move on to next dir
} else {
// Did the user choose to overwrite already?
- const QString destFile = (*it).uDest.path();
+ const TQString destFile = (*it).uDest.path();
if ( shouldOverwrite( destFile ) ) { // overwrite => just skip
emit copyingDone( this, ( *it ).uSource, ( *it ).uDest, true /* directory */, false /* renamed */ );
dirs.remove( it ); // Move on to next dir
@@ -2890,12 +2890,12 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
// We come here after a conflict has been detected and we've stated the existing dir
// The dir we were trying to create:
- QValueList<CopyInfo>::Iterator it = dirs.begin();
+ TQValueList<CopyInfo>::Iterator it = dirs.begin();
// Its modification time:
time_t destmtime = (time_t)-1;
time_t destctime = (time_t)-1;
KIO::filesize_t destsize = 0;
- QString linkDest;
+ TQString linkDest;
UDSEntry entry = ((KIO::StatJob*)job)->statResult();
KIO::UDSEntry::ConstIterator it2 = entry.begin();
@@ -2931,8 +2931,8 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
mode = (RenameDlg_Mode)( mode | M_OVERWRITE );
}
- QString existingDest = (*it).uDest.path();
- QString newPath;
+ TQString existingDest = (*it).uDest.path();
+ TQString newPath;
if (m_reportTimer)
m_reportTimer->stop();
RenameDlg_Result r = Observer::self()->open_RenameDlg( this, i18n("Folder Already Exists"),
@@ -2951,7 +2951,7 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
return;
case R_RENAME:
{
- QString oldPath = (*it).uDest.path( 1 );
+ TQString oldPath = (*it).uDest.path( 1 );
KURL newUrl( (*it).uDest );
newUrl.setPath( newPath );
emit renamed( this, (*it).uDest, newUrl ); // for e.g. kpropsdlg
@@ -2959,14 +2959,14 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
// Change the current one and strip the trailing '/'
(*it).uDest.setPath( newUrl.path( -1 ) );
newPath = newUrl.path( 1 ); // With trailing slash
- QValueList<CopyInfo>::Iterator renamedirit = it;
+ TQValueList<CopyInfo>::Iterator renamedirit = it;
++renamedirit;
// Change the name of subdirectories inside the directory
for( ; renamedirit != dirs.end() ; ++renamedirit )
{
- QString path = (*renamedirit).uDest.path();
+ TQString path = (*renamedirit).uDest.path();
if ( path.left(oldPath.length()) == oldPath ) {
- QString n = path;
+ TQString n = path;
n.replace( 0, oldPath.length(), newPath );
kdDebug(7007) << "dirs list: " << (*renamedirit).uSource.path()
<< " was going to be " << path
@@ -2975,12 +2975,12 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job )
}
}
// Change filenames inside the directory
- QValueList<CopyInfo>::Iterator renamefileit = files.begin();
+ TQValueList<CopyInfo>::Iterator renamefileit = files.begin();
for( ; renamefileit != files.end() ; ++renamefileit )
{
- QString path = (*renamefileit).uDest.path();
+ TQString path = (*renamefileit).uDest.path();
if ( path.left(oldPath.length()) == oldPath ) {
- QString n = path;
+ TQString n = path;
n.replace( 0, oldPath.length(), newPath );
kdDebug(7007) << "files list: " << (*renamefileit).uSource.path()
<< " was going to be " << path
@@ -3032,11 +3032,11 @@ void CopyJob::createNextDir()
if ( !dirs.isEmpty() )
{
// Take first dir to create out of list
- QValueList<CopyInfo>::Iterator it = dirs.begin();
+ TQValueList<CopyInfo>::Iterator it = dirs.begin();
// Is this URL on the skip list or the overwrite list ?
while( it != dirs.end() && udir.isEmpty() )
{
- const QString dir = (*it).uDest.path();
+ const TQString dir = (*it).uDest.path();
if ( shouldSkip( dir ) ) {
dirs.remove( it );
it = dirs.begin();
@@ -3071,7 +3071,7 @@ void CopyJob::createNextDir()
void CopyJob::slotResultCopyingFiles( Job * job )
{
// The file we were trying to copy:
- QValueList<CopyInfo>::Iterator it = files.begin();
+ TQValueList<CopyInfo>::Iterator it = files.begin();
if ( job->error() )
{
// Should we skip automatically ?
@@ -3138,7 +3138,7 @@ void CopyJob::slotResultCopyingFiles( Job * job )
if ( m_bCurrentOperationIsLink )
{
- QString target = ( m_mode == Link ? (*it).uSource.path() : (*it).linkDest );
+ TQString target = ( m_mode == Link ? (*it).uSource.path() : (*it).linkDest );
//required for the undo feature
emit copyingLinkDone( this, (*it).uSource, target, (*it).uDest );
}
@@ -3165,10 +3165,10 @@ void CopyJob::slotResultConflictCopyingFiles( KIO::Job * job )
{
// We come here after a conflict has been detected and we've stated the existing file
// The file we were trying to create:
- QValueList<CopyInfo>::Iterator it = files.begin();
+ TQValueList<CopyInfo>::Iterator it = files.begin();
RenameDlg_Result res;
- QString newPath;
+ TQString newPath;
if (m_reportTimer)
m_reportTimer->stop();
@@ -3181,7 +3181,7 @@ void CopyJob::slotResultConflictCopyingFiles( KIO::Job * job )
time_t destmtime = (time_t)-1;
time_t destctime = (time_t)-1;
KIO::filesize_t destsize = 0;
- QString linkDest;
+ TQString linkDest;
UDSEntry entry = ((KIO::StatJob*)job)->statResult();
KIO::UDSEntry::ConstIterator it2 = entry.begin();
for( ; it2 != entry.end(); it2++ ) {
@@ -3271,7 +3271,7 @@ void CopyJob::slotResultConflictCopyingFiles( KIO::Job * job )
emit renamed( this, (*it).uDest, newUrl ); // for e.g. kpropsdlg
(*it).uDest = newUrl;
- QValueList<CopyInfo> files;
+ TQValueList<CopyInfo> files;
files.append(*it);
emit aboutToCreate( this, files );
}
@@ -3306,11 +3306,11 @@ void CopyJob::copyNextFile()
bool bCopyFile = false;
//kdDebug(7007) << "CopyJob::copyNextFile()" << endl;
// Take the first file in the list
- QValueList<CopyInfo>::Iterator it = files.begin();
+ TQValueList<CopyInfo>::Iterator it = files.begin();
// Is this URL on the skip list ?
while (it != files.end() && !bCopyFile)
{
- const QString destFile = (*it).uDest.path();
+ const TQString destFile = (*it).uDest.path();
bCopyFile = !shouldSkip( destFile );
if ( !bCopyFile ) {
files.remove( it );
@@ -3322,7 +3322,7 @@ void CopyJob::copyNextFile()
{
// Do we set overwrite ?
bool bOverwrite;
- const QString destFile = (*it).uDest.path();
+ const TQString destFile = (*it).uDest.path();
kdDebug(7007) << "copying " << destFile << endl;
if ( (*it).uDest == (*it).uSource )
bOverwrite = false;
@@ -3359,18 +3359,18 @@ void CopyJob::copyNextFile()
bool devicesOk=false;
// if the source is a devices url, handle it a littlebit special
- if ((*it).uSource.protocol()==QString::fromLatin1("devices"))
+ if ((*it).uSource.protocol()==TQString::fromLatin1("devices"))
{
- QByteArray data;
- QByteArray param;
- QCString retType;
- QDataStream streamout(param,IO_WriteOnly);
+ TQByteArray data;
+ TQByteArray param;
+ TQCString retType;
+ TQDataStream streamout(param,IO_WriteOnly);
streamout<<(*it).uSource;
streamout<<(*it).uDest;
if ( kapp && kapp->dcopClient()->call( "kded",
"mountwatcher", "createLink(KURL, KURL)", param,retType,data,false ) )
{
- QDataStream streamin(data,IO_ReadOnly);
+ TQDataStream streamin(data,IO_ReadOnly);
streamin>>devicesOk;
}
if (devicesOk)
@@ -3385,9 +3385,9 @@ void CopyJob::copyNextFile()
if (!devicesOk)
{
- QString path = (*it).uDest.path();
+ TQString path = (*it).uDest.path();
//kdDebug(7007) << "CopyJob::copyNextFile path=" << path << endl;
- QFile f( path );
+ TQFile f( path );
if ( f.open( IO_ReadWrite ) )
{
f.close();
@@ -3395,20 +3395,20 @@ void CopyJob::copyNextFile()
config.setDesktopGroup();
KURL url = (*it).uSource;
url.setPass( "" );
- config.writePathEntry( QString::fromLatin1("URL"), url.url() );
- config.writeEntry( QString::fromLatin1("Name"), url.url() );
- config.writeEntry( QString::fromLatin1("Type"), QString::fromLatin1("Link") );
- QString protocol = (*it).uSource.protocol();
- if ( protocol == QString::fromLatin1("ftp") )
- config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("ftp") );
- else if ( protocol == QString::fromLatin1("http") )
- config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("www") );
- else if ( protocol == QString::fromLatin1("info") )
- config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("info") );
- else if ( protocol == QString::fromLatin1("mailto") ) // sven:
- config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("kmail") ); // added mailto: support
+ config.writePathEntry( TQString::fromLatin1("URL"), url.url() );
+ config.writeEntry( TQString::fromLatin1("Name"), url.url() );
+ config.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") );
+ TQString protocol = (*it).uSource.protocol();
+ if ( protocol == TQString::fromLatin1("ftp") )
+ config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("ftp") );
+ else if ( protocol == TQString::fromLatin1("http") )
+ config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("www") );
+ else if ( protocol == TQString::fromLatin1("info") )
+ config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("info") );
+ else if ( protocol == TQString::fromLatin1("mailto") ) // sven:
+ config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("kmail") ); // added mailto: support
else
- config.writeEntry( QString::fromLatin1("Icon"), QString::fromLatin1("unknown") );
+ config.writeEntry( TQString::fromLatin1("Icon"), TQString::fromLatin1("unknown") );
config.sync();
files.remove( it );
m_processedFiles++;
@@ -3484,10 +3484,10 @@ void CopyJob::copyNextFile()
d->m_bURLDirty = true;
}
addSubjob(newjob);
- connect( newjob, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
- this, SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( newjob, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
- this, SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( newjob, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
+ this, TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( newjob, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
+ this, TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
}
else
{
@@ -3524,11 +3524,11 @@ void CopyJob::setNextDirAttribute()
state = STATE_SETTING_DIR_ATTRIBUTES;
#ifdef Q_OS_UNIX
// TODO KDE4: this should use a SlaveBase method, but we have none yet in KDE3.
- QValueList<CopyInfo>::Iterator it = d->m_directoriesCopied.begin();
+ TQValueList<CopyInfo>::Iterator it = d->m_directoriesCopied.begin();
for ( ; it != d->m_directoriesCopied.end() ; ++it ) {
const KURL& url = (*it).uDest;
if ( url.isLocalFile() && (*it).mtime != (time_t)-1 ) {
- const QCString path = QFile::encodeName( url.path() );
+ const TQCString path = TQFile::encodeName( url.path() );
KDE_struct_stat statbuf;
if (KDE_lstat(path, &statbuf) == 0) {
struct utimbuf utbuf;
@@ -3633,7 +3633,7 @@ void CopyJob::slotResultSettingDirAttributes( Job * job )
void CopyJob::slotResultRenaming( Job* job )
{
int err = job->error();
- const QString errText = job->errorText();
+ const TQString errText = job->errorText();
removeSubjob( job, true, false ); // merge metadata
assert ( subjobs.isEmpty() );
// Determine dest again
@@ -3652,15 +3652,15 @@ void CopyJob::slotResultRenaming( Job* job )
err == ERR_IDENTICAL_FILES ) )
{
kdDebug(7007) << "Couldn't rename directly, dest already exists. Detected special case of lower/uppercase renaming in same dir, try with 2 rename calls" << endl;
- QCString _src( QFile::encodeName(m_currentSrcURL.path()) );
- QCString _dest( QFile::encodeName(dest.path()) );
+ TQCString _src( TQFile::encodeName(m_currentSrcURL.path()) );
+ TQCString _dest( TQFile::encodeName(dest.path()) );
KTempFile tmpFile( m_currentSrcURL.directory(false) );
- QCString _tmp( QFile::encodeName(tmpFile.name()) );
+ TQCString _tmp( TQFile::encodeName(tmpFile.name()) );
kdDebug(7007) << "CopyJob::slotResult KTempFile status:" << tmpFile.status() << " using " << _tmp << " as intermediary" << endl;
tmpFile.unlink();
if ( ::rename( _src, _tmp ) == 0 )
{
- if ( !QFile::exists( _dest ) && ::rename( _tmp, _dest ) == 0 )
+ if ( !TQFile::exists( _dest ) && ::rename( _tmp, _dest ) == 0 )
{
kdDebug(7007) << "Success." << endl;
err = 0;
@@ -3706,7 +3706,7 @@ void CopyJob::slotResultRenaming( Job* job )
} else if ( m_bOverwriteAll ) {
; // nothing to do, stat+copy+del will overwrite
} else {
- QString newPath;
+ TQString newPath;
// If src==dest, use "overwrite-itself"
RenameDlg_Mode mode = (RenameDlg_Mode)
( ( m_currentSrcURL == dest ) ? M_OVERWRITE_ITSELF : M_OVERWRITE );
@@ -3728,13 +3728,13 @@ void CopyJob::slotResultRenaming( Job* job )
KDE_struct_stat stat_buf;
if ( m_currentSrcURL.isLocalFile() &&
- KDE_stat(QFile::encodeName(m_currentSrcURL.path()), &stat_buf) == 0 ) {
+ KDE_stat(TQFile::encodeName(m_currentSrcURL.path()), &stat_buf) == 0 ) {
sizeSrc = stat_buf.st_size;
ctimeSrc = stat_buf.st_ctime;
mtimeSrc = stat_buf.st_mtime;
}
if ( dest.isLocalFile() &&
- KDE_stat(QFile::encodeName(dest.path()), &stat_buf) == 0 ) {
+ KDE_stat(TQFile::encodeName(dest.path()), &stat_buf) == 0 ) {
sizeDest = stat_buf.st_size;
ctimeDest = stat_buf.st_ctime;
mtimeDest = stat_buf.st_mtime;
@@ -3967,29 +3967,29 @@ DeleteJob::DeleteJob( const KURL::List& src, bool /*shred*/, bool showProgressIn
{
if ( showProgressInfo ) {
- connect( this, SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
// See slotReport
- /*connect( this, SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
- m_observer, SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
+ /*connect( this, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
+ m_observer, TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
- m_observer, SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
+ m_observer, TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( deleting( KIO::Job*, const KURL& ) ),
- m_observer, SLOT( slotDeleting( KIO::Job*, const KURL& ) ) );*/
+ connect( this, TQT_SIGNAL( deleting( KIO::Job*, const KURL& ) ),
+ m_observer, TQT_SLOT( slotDeleting( KIO::Job*, const KURL& ) ) );*/
- m_reportTimer=new QTimer(this);
- connect(m_reportTimer,SIGNAL(timeout()),this,SLOT(slotReport()));
+ m_reportTimer=new TQTimer(this);
+ connect(m_reportTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotReport()));
//this will update the report dialog with 5 Hz, I think this is fast enough, aleXXX
m_reportTimer->start(REPORT_TIMEOUT,false);
}
- QTimer::singleShot(0, this, SLOT(slotStart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStart()));
}
void DeleteJob::slotStart()
@@ -4040,7 +4040,7 @@ void DeleteJob::slotEntries(KIO::Job* job, const UDSEntryList& list)
UDSEntry::ConstIterator it2 = (*it).begin();
bool bDir = false;
bool bLink = false;
- QString displayName;
+ TQString displayName;
KURL url;
int atomsFound(0);
for( ; it2 != (*it).end(); it2++ )
@@ -4100,7 +4100,7 @@ void DeleteJob::statNextSrc()
// if the file system doesn't support deleting, we do not even stat
if (!KProtocolInfo::supportsDeleting(m_currentURL)) {
- QGuardedPtr<DeleteJob> that = this;
+ TQGuardedPtr<DeleteJob> that = this;
++m_currentStat;
if (isInteractive())
KMessageBox::information( 0, buildErrorString(ERR_CANNOT_DELETE, m_currentURL.prettyURL()));
@@ -4124,7 +4124,7 @@ void DeleteJob::statNextSrc()
// To speed things up and prevent double-notification, we disable KDirWatch
// on those dirs temporarily (using KDirWatch::self, that's the instanced
// used by e.g. kdirlister).
- for ( QStringList::Iterator it = m_parentDirs.begin() ; it != m_parentDirs.end() ; ++it )
+ for ( TQStringList::Iterator it = m_parentDirs.begin() ; it != m_parentDirs.end() ; ++it )
KDirWatch::self()->stopDirScan( *it );
state = STATE_DELETING_FILES;
deleteNextFile();
@@ -4148,7 +4148,7 @@ void DeleteJob::deleteNextFile()
}
// Normal deletion
// If local file, try do it directly
- if ( (*it).isLocalFile() && unlink( QFile::encodeName((*it).path()) ) == 0 ) {
+ if ( (*it).isLocalFile() && unlink( TQFile::encodeName((*it).path()) ) == 0 ) {
//kdDebug(7007) << "DeleteJob deleted " << (*it).path() << endl;
job = 0;
m_processedFiles++;
@@ -4185,7 +4185,7 @@ void DeleteJob::deleteNextDir()
// Take first dir to delete out of list - last ones first !
KURL::List::Iterator it = dirs.fromLast();
// If local dir, try to rmdir it directly
- if ( (*it).isLocalFile() && ::rmdir( QFile::encodeName((*it).path()) ) == 0 ) {
+ if ( (*it).isLocalFile() && ::rmdir( TQFile::encodeName((*it).path()) ) == 0 ) {
m_processedDirs++;
if ( m_processedDirs % 100 == 0 ) { // update progress info every 100 dirs
@@ -4211,7 +4211,7 @@ void DeleteJob::deleteNextDir()
}
// Re-enable watching on the dirs that held the deleted files
- for ( QStringList::Iterator it = m_parentDirs.begin() ; it != m_parentDirs.end() ; ++it )
+ for ( TQStringList::Iterator it = m_parentDirs.begin() ; it != m_parentDirs.end() ; ++it )
KDirWatch::self()->restartDirScan( *it );
// Finished - tell the world
@@ -4315,9 +4315,9 @@ void DeleteJob::slotResult( Job *job )
ListJob *newjob = listRecursive( url, false );
newjob->setUnrestricted(true); // No KIOSK restrictions
Scheduler::scheduleJob(newjob);
- connect(newjob, SIGNAL(entries( KIO::Job *,
+ connect(newjob, TQT_SIGNAL(entries( KIO::Job *,
const KIO::UDSEntryList& )),
- SLOT( slotEntries( KIO::Job*,
+ TQT_SLOT( slotEntries( KIO::Job*,
const KIO::UDSEntryList& )));
addSubjob(newjob);
} else {
@@ -4399,7 +4399,7 @@ DeleteJob *KIO::del( const KURL::List& src, bool shred, bool showProgressInfo )
MultiGetJob::MultiGetJob(const KURL& url,
bool showProgressInfo)
- : TransferJob(url, 0, QByteArray(), QByteArray(), showProgressInfo)
+ : TransferJob(url, 0, TQByteArray(), TQByteArray(), showProgressInfo)
{
m_waitQueue.setAutoDelete(true);
m_activeQueue.setAutoDelete(true);
@@ -4409,11 +4409,11 @@ MultiGetJob::MultiGetJob(const KURL& url,
void MultiGetJob::get(long id, const KURL &url, const MetaData &metaData)
{
GetRequest *entry = new GetRequest(id, url, metaData);
- entry->metaData["request-id"] = QString("%1").arg(id);
+ entry->metaData["request-id"] = TQString("%1").arg(id);
m_waitQueue.append(entry);
}
-void MultiGetJob::flushQueue(QPtrList<GetRequest> &queue)
+void MultiGetJob::flushQueue(TQPtrList<GetRequest> &queue)
{
GetRequest *entry;
// Use multi-get
@@ -4541,18 +4541,18 @@ void MultiGetJob::slotFinished()
}
}
-void MultiGetJob::slotData( const QByteArray &_data)
+void MultiGetJob::slotData( const TQByteArray &_data)
{
if(!m_currentEntry) return;// Error, unknown request!
if(m_redirectionURL.isEmpty() || !m_redirectionURL.isValid() || m_error)
emit data(m_currentEntry->id, _data);
}
-void MultiGetJob::slotMimetype( const QString &_mimetype )
+void MultiGetJob::slotMimetype( const TQString &_mimetype )
{
if (b_multiGetActive)
{
- QPtrList<GetRequest> newQueue;
+ TQPtrList<GetRequest> newQueue;
flushQueue(newQueue);
if (!newQueue.isEmpty())
{
@@ -4579,11 +4579,11 @@ CacheInfo::CacheInfo(const KURL &url)
m_url = url;
}
-QString CacheInfo::cachedFileName()
+TQString CacheInfo::cachedFileName()
{
- const QChar separator = '_';
+ const TQChar separator = '_';
- QString CEF = m_url.path();
+ TQString CEF = m_url.path();
int p = CEF.find('/');
@@ -4593,10 +4593,10 @@ QString CacheInfo::cachedFileName()
p = CEF.find('/', p);
}
- QString host = m_url.host().lower();
+ TQString host = m_url.host().lower();
CEF = host + CEF + '_';
- QString dir = KProtocolManager::cacheDir();
+ TQString dir = KProtocolManager::cacheDir();
if (dir[dir.length()-1] != '/')
dir += "/";
@@ -4613,13 +4613,13 @@ QString CacheInfo::cachedFileName()
dir += "0";
unsigned long hash = 0x00000000;
- QCString u = m_url.url().latin1();
+ TQCString u = m_url.url().latin1();
for(int i = u.length(); i--;)
{
hash = (hash * 12211 + u[i]) % 2147483563;
}
- QString hashString;
+ TQString hashString;
hashString.sprintf("%08lx", hash);
CEF = CEF + hashString;
@@ -4629,7 +4629,7 @@ QString CacheInfo::cachedFileName()
return CEF;
}
-QFile *CacheInfo::cachedFile()
+TQFile *CacheInfo::cachedFile()
{
#ifdef Q_WS_WIN
const char *mode = (readWrite ? "rb+" : "rb");
@@ -4637,7 +4637,7 @@ QFile *CacheInfo::cachedFile()
const char *mode = (readWrite ? "r+" : "r");
#endif
- FILE *fs = fopen(QFile::encodeName(CEF), mode); // Open for reading and writing
+ FILE *fs = fopen(TQFile::encodeName(CEF), mode); // Open for reading and writing
if (!fs)
return 0;
@@ -4701,7 +4701,7 @@ QFile *CacheInfo::cachedFile()
ok = false;
if (ok)
{
- m_etag = QString(buffer).stripWhiteSpace();
+ m_etag = TQString(buffer).stripWhiteSpace();
}
// Last-Modified
@@ -4709,7 +4709,7 @@ QFile *CacheInfo::cachedFile()
ok = false;
if (ok)
{
- m_lastModified = QString(buffer).stripWhiteSpace();
+ m_lastModified = TQString(buffer).stripWhiteSpace();
}
fclose(fs);
@@ -4717,7 +4717,7 @@ QFile *CacheInfo::cachedFile()
if (ok)
return fs;
- unlink( QFile::encodeName(CEF) );
+ unlink( TQFile::encodeName(CEF) );
return 0;
}
diff --git a/kio/kio/job.h b/kio/kio/job.h
index 5a10d8577..03edb5024 100644
--- a/kio/kio/job.h
+++ b/kio/kio/job.h
@@ -87,7 +87,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the job handling the operation.
*/
- KIO_EXPORT SimpleJob * symlink( const QString & target, const KURL& dest, bool overwrite, bool showProgressInfo = true );
+ KIO_EXPORT SimpleJob * symlink( const TQString & target, const KURL& dest, bool overwrite, bool showProgressInfo = true );
/**
* Execute any command that is specific to one slave (protocol).
@@ -101,7 +101,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the job handling the operation.
*/
- KIO_EXPORT SimpleJob * special( const KURL& url, const QByteArray & data, bool showProgressInfo = true );
+ KIO_EXPORT SimpleJob * special( const KURL& url, const TQByteArray & data, bool showProgressInfo = true );
/**
* Mount filesystem.
@@ -115,7 +115,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the job handling the operation.
*/
- KIO_EXPORT SimpleJob *mount( bool ro, const char *fstype, const QString& dev, const QString& point, bool showProgressInfo = true );
+ KIO_EXPORT SimpleJob *mount( bool ro, const char *fstype, const TQString& dev, const TQString& point, bool showProgressInfo = true );
/**
* Unmount filesystem.
@@ -126,7 +126,7 @@ namespace KIO {
* @param showProgressInfo true to show progress information
* @return the job handling the operation.
*/
- KIO_EXPORT SimpleJob *unmount( const QString & point, bool showProgressInfo = true );
+ KIO_EXPORT SimpleJob *unmount( const TQString & point, bool showProgressInfo = true );
/**
* HTTP cache update
@@ -230,11 +230,11 @@ namespace KIO {
* @param showProgressInfo true to display
* @return the job handling the operation.
*/
- KIO_EXPORT TransferJob *http_post( const KURL& url, const QByteArray &postData,
+ KIO_EXPORT TransferJob *http_post( const KURL& url, const TQByteArray &postData,
bool showProgressInfo = true );
/**
- * Get (a.k.a. read), into a single QByteArray.
+ * Get (a.k.a. read), into a single TQByteArray.
* @see StoredTransferJob
*
* @param url the URL of the file
@@ -246,7 +246,7 @@ namespace KIO {
KIO_EXPORT StoredTransferJob *storedGet( const KURL& url, bool reload=false, bool showProgressInfo = true );
/**
- * Put (a.k.a. write) data from a single QByteArray.
+ * Put (a.k.a. write) data from a single TQByteArray.
* @see StoredTransferJob
*
* @param arr The data to write
@@ -259,7 +259,7 @@ namespace KIO {
* @return the job handling the operation.
* @since 3.3
*/
- KIO_EXPORT StoredTransferJob *storedPut( const QByteArray& arr, const KURL& url, int permissions,
+ KIO_EXPORT StoredTransferJob *storedPut( const TQByteArray& arr, const KURL& url, int permissions,
bool overwrite, bool resume, bool showProgressInfo = true );
/**
diff --git a/kio/kio/jobclasses.h b/kio/kio/jobclasses.h
index 7f5058661..a6ccd8484 100644
--- a/kio/kio/jobclasses.h
+++ b/kio/kio/jobclasses.h
@@ -22,11 +22,11 @@
#ifndef __kio_jobclasses_h__
#define __kio_jobclasses_h__
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -51,8 +51,8 @@ namespace KIO {
*
* \code
* KIO::Job * job = KIO::someoperation( some parameters );
- * connect( job, SIGNAL( result( KIO::Job * ) ),
- * this, SLOT( slotResult( KIO::Job * ) ) );
+ * connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ * this, TQT_SLOT( slotResult( KIO::Job * ) ) );
* \endcode
* (other connects, specific to the job)
*
@@ -65,7 +65,7 @@ namespace KIO {
* @see KIO::Scheduler
* @see KIO::Slave
*/
- class KIO_EXPORT Job : public QObject {
+ class KIO_EXPORT Job : public TQObject {
Q_OBJECT
protected:
@@ -108,7 +108,7 @@ namespace KIO {
* @return a string to help understand the error, usually the url
* related to the error. Only valid if error() is not 0.
*/
- const QString & errorText() const { return m_errorText; }
+ const TQString & errorText() const { return m_errorText; }
/**
* Converts an error code and a non-i18n error message into an
@@ -127,7 +127,7 @@ namespace KIO {
* telling the user that the app is broken, so check with
* error() whether there is an error
*/
- QString errorString() const;
+ TQString errorString() const;
/**
* Converts an error code and a non-i18n error message into i18n
@@ -139,7 +139,7 @@ namespace KIO {
* @return the following strings: caption, error + description,
* causes+solutions
*/
- QStringList detailedErrorStrings(const KURL *reqUrl = 0L,
+ TQStringList detailedErrorStrings(const KURL *reqUrl = 0L,
int method = -1) const;
/**
@@ -150,7 +150,7 @@ namespace KIO {
* @param parent the parent widget for the dialog box, can be 0 for
* top-level
*/
- void showErrorDialog( QWidget * parent = 0L );
+ void showErrorDialog( TQWidget * parent = 0L );
/**
* Enable or disable the automatic error handling. When automatic
@@ -165,7 +165,7 @@ namespace KIO {
* Can be 0 for top-level
* @see isAutoErrorHandlingEnabled(), showErrorDialog()
*/
- void setAutoErrorHandlingEnabled( bool enable, QWidget *parentWidget = 0 );
+ void setAutoErrorHandlingEnabled( bool enable, TQWidget *parentWidget = 0 );
/**
* Returns whether automatic error handling is enabled or disabled.
@@ -219,14 +219,14 @@ namespace KIO {
* @param window the window to associate to
* @see window()
*/
- void setWindow(QWidget *window);
+ void setWindow(TQWidget *window);
/**
* Returns the window this job is associated with.
* @return the associated window
* @see setWindow()
*/
- QWidget *window() const;
+ TQWidget *window() const;
/**
* Updates the last user action timestamp to the given time.
@@ -271,7 +271,7 @@ namespace KIO {
* @see setMetaData()
* @see mergeMetaData()
*/
- void addMetaData(const QString &key, const QString &value);
+ void addMetaData(const TQString &key, const TQString &value);
/**
* Add key/value pairs to the meta data that is sent to the slave.
@@ -280,7 +280,7 @@ namespace KIO {
* @see setMetaData()
* @see mergeMetaData()
*/
- void addMetaData(const QMap<QString,QString> &values);
+ void addMetaData(const TQMap<TQString,TQString> &values);
/**
* Add key/value pairs to the meta data that is sent to the slave.
@@ -289,7 +289,7 @@ namespace KIO {
* @see setMetaData()
* @see addMetaData()
*/
- void mergeMetaData(const QMap<QString,QString> &values);
+ void mergeMetaData(const TQMap<TQString,TQString> &values);
/**
* @internal. For the scheduler. Do not use.
@@ -307,10 +307,10 @@ namespace KIO {
* Query meta data received from the slave.
* (Valid when first data is received and/or slave is finished)
* @param key the key of the meta data to retrieve
- * @return the value of the meta data, or QString::null if the
+ * @return the value of the meta data, or TQString::null if the
* @p key does not exist
*/
- QString queryMetaData(const QString &key);
+ TQString queryMetaData(const TQString &key);
/**
* Returns the processed size for this job.
@@ -342,7 +342,7 @@ namespace KIO {
* @param job the job that emitted this signal
* @param msg the info message
*/
- void infoMessage( KIO::Job *job, const QString & msg );
+ void infoMessage( KIO::Job *job, const TQString & msg );
// KDE4: Separate rich-text string from plain-text string, for different widgets.
/**
@@ -351,7 +351,7 @@ namespace KIO {
* @param msg the info message
* @since 3.5
*/
- void warning( KIO::Job *job, const QString & msg );
+ void warning( KIO::Job *job, const TQString & msg );
// KDE4: Separate rich-text string from plain-text string, for different widgets.
/**
@@ -419,7 +419,7 @@ namespace KIO {
* @param msg the info message
* @see infoMessage()
*/
- void slotInfoMessage( KIO::Job *job, const QString &msg );
+ void slotInfoMessage( KIO::Job *job, const TQString &msg );
/**
* Remove speed information.
@@ -503,13 +503,13 @@ namespace KIO {
EF_ListJobUnrestricted = (1 << 3) };
int &extraFlags();
- QPtrList<Job> subjobs;
+ TQPtrList<Job> subjobs;
int m_error;
- QString m_errorText;
+ TQString m_errorText;
unsigned long m_percent;
int m_progressId; // for uiserver
- QTimer *m_speedTimer;
- QGuardedPtr<QWidget> m_window;
+ TQTimer *m_speedTimer;
+ TQGuardedPtr<TQWidget> m_window;
MetaData m_outgoingMetaData;
MetaData m_incomingMetaData;
protected:
@@ -537,7 +537,7 @@ namespace KIO {
* @param packedArgs the arguments
* @param showProgressInfo true to show progress information to the user
*/
- SimpleJob(const KURL& url, int command, const QByteArray &packedArgs,
+ SimpleJob(const KURL& url, int command, const TQByteArray &packedArgs,
bool showProgressInfo);
~SimpleJob();
@@ -611,14 +611,14 @@ namespace KIO {
* @internal
* Called on a slave's warning.
*/
- void slotWarning( const QString & ); // KDE4: make virtual
+ void slotWarning( const TQString & ); // KDE4: make virtual
/**
* Called on a slave's info message.
* @param s the info message
* @see infoMessage()
*/
- void slotInfoMessage( const QString &s ); // KDE4: make virtual
+ void slotInfoMessage( const TQString &s ); // KDE4: make virtual
/**
* Called on a slave's connected signal.
@@ -652,7 +652,7 @@ namespace KIO {
* Called on a slave's error.
* Made public for the scheduler.
*/
- virtual void slotError( int , const QString & );
+ virtual void slotError( int , const TQString & );
protected slots:
/**
@@ -662,7 +662,7 @@ namespace KIO {
protected:
Slave * m_slave;
- QByteArray m_packedArgs;
+ TQByteArray m_packedArgs;
KURL m_url;
KURL m_subUrl;
int m_command;
@@ -697,7 +697,7 @@ namespace KIO {
* @param packedArgs the arguments
* @param showProgressInfo true to show progress information to the user
*/
- StatJob(const KURL& url, int command, const QByteArray &packedArgs, bool showProgressInfo);
+ StatJob(const KURL& url, int command, const TQByteArray &packedArgs, bool showProgressInfo);
/**
* A stat() can have two meanings. Either we want to read from this URL,
@@ -789,7 +789,7 @@ namespace KIO {
* @param packedArgs the arguments
* @param showProgressInfo true to show progress information to the user
*/
- MkdirJob(const KURL& url, int command, const QByteArray &packedArgs, bool showProgressInfo);
+ MkdirJob(const KURL& url, int command, const TQByteArray &packedArgs, bool showProgressInfo);
/**
* @internal
@@ -843,7 +843,7 @@ namespace KIO {
/**
* Do not create a DirectCopyJob. Use KIO::copy() or KIO::file_copy() instead.
*/
- DirectCopyJob(const KURL& url, int command, const QByteArray &packedArgs,
+ DirectCopyJob(const KURL& url, int command, const TQByteArray &packedArgs,
bool showProgressInfo);
/**
* @internal
@@ -886,8 +886,8 @@ namespace KIO {
* @param showProgressInfo true to show progress information to the user
*/
TransferJob(const KURL& url, int command,
- const QByteArray &packedArgs,
- const QByteArray &_staticData,
+ const TQByteArray &packedArgs,
+ const TQByteArray &_staticData,
bool showProgressInfo);
/**
@@ -945,7 +945,7 @@ namespace KIO {
* Sending an empty block indicates end of data.
* @since 3.2
*/
- void sendAsyncData(const QByteArray &data);
+ void sendAsyncData(const TQByteArray &data);
/**
* When enabled, the job reports the amount of data that has been sent,
@@ -974,7 +974,7 @@ namespace KIO {
* should not be certain of data.size() == 0 ever happening (e.g. in case
* of an error), so you should rely on result() instead.
*/
- void data( KIO::Job *job, const QByteArray &data );
+ void data( KIO::Job *job, const TQByteArray &data );
/**
* Request for data.
@@ -987,7 +987,7 @@ namespace KIO {
* @param data buffer to fill with data to send to the
* slave. An empty buffer indicates end of data. (EOD)
*/
- void dataReq( KIO::Job *job, QByteArray &data );
+ void dataReq( KIO::Job *job, TQByteArray &data );
/**
* Signals a redirection.
@@ -1013,7 +1013,7 @@ namespace KIO {
* @param job the job that emitted this signal
* @param type the mime type
*/
- void mimetype( KIO::Job *job, const QString &type );
+ void mimetype( KIO::Job *job, const TQString &type );
/**
* @internal
@@ -1028,11 +1028,11 @@ namespace KIO {
protected slots:
virtual void slotRedirection( const KURL &url);
virtual void slotFinished();
- virtual void slotData( const QByteArray &data);
+ virtual void slotData( const TQByteArray &data);
virtual void slotDataReq();
- virtual void slotMimetype( const QString &mimetype );
+ virtual void slotMimetype( const TQString &mimetype );
virtual void slotNeedSubURLData();
- virtual void slotSubURLData(KIO::Job*, const QByteArray &);
+ virtual void slotSubURLData(KIO::Job*, const TQByteArray &);
virtual void slotMetaData( const KIO::MetaData &_metaData);
void slotErrorPage();
void slotCanResume( KIO::filesize_t offset );
@@ -1041,10 +1041,10 @@ namespace KIO {
protected:
bool m_suspended;
bool m_errorPage;
- QByteArray staticData;
+ TQByteArray staticData;
KURL m_redirectionURL;
KURL::List m_redirectionList;
- QString m_mimetype;
+ TQString m_mimetype;
TransferJob *m_subJob;
protected:
virtual void virtual_hook( int id, void* data );
@@ -1054,21 +1054,21 @@ namespace KIO {
/**
* StoredTransferJob is a TransferJob (for downloading or uploading data) that
- * also stores a QByteArray with the data, making it simpler to use than the
+ * also stores a TQByteArray with the data, making it simpler to use than the
* standard TransferJob.
*
- * For KIO::storedGet it puts the data into the member QByteArray, so the user
+ * For KIO::storedGet it puts the data into the member TQByteArray, so the user
* of this class can get hold of the whole data at once by calling data()
* when the result signal is emitted.
* You should only use StoredTransferJob to download data if you cannot
* process the data by chunks while it's being downloaded, since storing
- * everything in a QByteArray can potentially require a lot of memory.
+ * everything in a TQByteArray can potentially require a lot of memory.
*
* For KIO::storedPut the user of this class simply provides the bytearray from
* the start, and the job takes care of uploading it.
* You should only use StoredTransferJob to upload data if you cannot
* provide the in chunks while it's being uploaded, since storing
- * everything in a QByteArray can potentially require a lot of memory.
+ * everything in a TQByteArray can potentially require a lot of memory.
*
* @since 3.3
*/
@@ -1086,28 +1086,28 @@ namespace KIO {
* @param showProgressInfo true to show progress information to the user
*/
StoredTransferJob(const KURL& url, int command,
- const QByteArray &packedArgs,
- const QByteArray &_staticData,
+ const TQByteArray &packedArgs,
+ const TQByteArray &_staticData,
bool showProgressInfo);
/**
* Set data to be uploaded. This is for put jobs.
- * Automatically called by KIO::storedPut(const QByteArray &, ...),
+ * Automatically called by KIO::storedPut(const TQByteArray &, ...),
* do not call this yourself.
*/
- void setData( const QByteArray& arr );
+ void setData( const TQByteArray& arr );
/**
* Get hold of the downloaded data. This is for get jobs.
* You're supposed to call this only from the slot connected to the result() signal.
*/
- QByteArray data() const { return m_data; }
+ TQByteArray data() const { return m_data; }
private slots:
- void slotStoredData( KIO::Job *job, const QByteArray &data );
- void slotStoredDataReq( KIO::Job *job, QByteArray &data );
+ void slotStoredData( KIO::Job *job, const TQByteArray &data );
+ void slotStoredDataReq( KIO::Job *job, TQByteArray &data );
private:
- QByteArray m_data;
+ TQByteArray m_data;
int m_uploadOffset;
};
@@ -1154,14 +1154,14 @@ namespace KIO {
* @param data data received from the slave.
* End of data (EOD) has been reached if data.size() == 0
*/
- void data( long id, const QByteArray &data);
+ void data( long id, const TQByteArray &data);
/**
* Mimetype determined
* @param id the id of the request
* @param type the mime type
*/
- void mimetype( long id, const QString &type );
+ void mimetype( long id, const TQString &type );
/**
* File transfer completed.
@@ -1175,8 +1175,8 @@ namespace KIO {
protected slots:
virtual void slotRedirection( const KURL &url);
virtual void slotFinished();
- virtual void slotData( const QByteArray &data);
- virtual void slotMimetype( const QString &mimetype );
+ virtual void slotData( const TQByteArray &data);
+ virtual void slotMimetype( const TQString &mimetype );
private:
struct GetRequest {
public:
@@ -1187,10 +1187,10 @@ namespace KIO {
MetaData metaData;
};
bool findCurrentEntry();
- void flushQueue(QPtrList<GetRequest> &queue);
+ void flushQueue(TQPtrList<GetRequest> &queue);
- QPtrList<GetRequest> m_waitQueue;
- QPtrList<GetRequest> m_activeQueue;
+ TQPtrList<GetRequest> m_waitQueue;
+ TQPtrList<GetRequest> m_activeQueue;
bool b_multiGetActive;
GetRequest *m_currentEntry;
protected:
@@ -1217,14 +1217,14 @@ namespace KIO {
* @param packedArgs the arguments
* @param showProgressInfo true to show progress information to the user
*/
- MimetypeJob(const KURL& url, int command, const QByteArray &packedArgs, bool showProgressInfo);
+ MimetypeJob(const KURL& url, int command, const TQByteArray &packedArgs, bool showProgressInfo);
/**
* Call this in the slot connected to result,
* and only after making sure no error happened.
* @return the mimetype of the URL
*/
- QString mimetype() const { return m_mimetype; }
+ TQString mimetype() const { return m_mimetype; }
/**
* @internal
@@ -1310,13 +1310,13 @@ namespace KIO {
*
* @since 3.5.7
*/
- void mimetype( KIO::Job *job, const QString &type );
+ void mimetype( KIO::Job *job, const TQString &type );
public slots:
void slotStart();
- void slotData( KIO::Job *, const QByteArray &data);
- void slotDataReq( KIO::Job *, QByteArray &data);
- void slotMimetype( KIO::Job *, const QString& type );
+ void slotData( KIO::Job *, const TQByteArray &data);
+ void slotDataReq( KIO::Job *, TQByteArray &data);
+ void slotMimetype( KIO::Job *, const TQString& type );
protected slots:
/**
@@ -1369,7 +1369,7 @@ namespace KIO {
bool m_resume:1;
bool m_canResume:1;
bool m_resumeAnswerSent:1;
- QByteArray m_buffer;
+ TQByteArray m_buffer;
SimpleJob *m_moveJob;
SimpleJob *m_copyJob;
TransferJob *m_getJob;
@@ -1400,11 +1400,11 @@ namespace KIO {
* @param showProgressInfo true to show progress information to the user
* @param recursive true to get the data recursively from child directories,
* false to get only the content of the specified dir
- * @param prefix the prefix of the files, or QString::null for no prefix
+ * @param prefix the prefix of the files, or TQString::null for no prefix
* @param includeHidden true to include hidden files (those starting with '.')
*/
ListJob(const KURL& url, bool showProgressInfo,
- bool recursive = false, QString prefix = QString::null,
+ bool recursive = false, TQString prefix = TQString::null,
bool includeHidden = true);
/**
@@ -1471,7 +1471,7 @@ namespace KIO {
private:
bool recursive;
bool includeHidden;
- QString prefix;
+ TQString prefix;
unsigned long m_processedEntries;
KURL m_redirectionURL;
protected:
@@ -1485,7 +1485,7 @@ namespace KIO {
{
KURL uSource;
KURL uDest;
- QString linkDest; // for symlinks only
+ TQString linkDest; // for symlinks only
int permissions;
//mode_t type;
time_t ctime;
@@ -1594,7 +1594,7 @@ namespace KIO {
* @param job the job that emitted this signal
* @param files a list of items that are about to be created.
*/
- void aboutToCreate( KIO::Job *job, const QValueList<KIO::CopyInfo> &files);
+ void aboutToCreate( KIO::Job *job, const TQValueList<KIO::CopyInfo> &files);
/**
* Sends the number of processed files.
@@ -1624,7 +1624,7 @@ namespace KIO {
* being linked
* @param to the destination of the current operation
*/
- void linking( KIO::Job *job, const QString& target, const KURL& to );
+ void linking( KIO::Job *job, const TQString& target, const KURL& to );
/**
* The job is moving a file or directory.
* @param job the job that emitted this signal
@@ -1669,7 +1669,7 @@ namespace KIO {
* @param target the target
* @param to the destination URL
*/
- void copyingLinkDone( KIO::Job *job, const KURL &from, const QString& target, const KURL& to );
+ void copyingLinkDone( KIO::Job *job, const KURL &from, const TQString& target, const KURL& to );
protected:
void statCurrentSrc();
@@ -1692,8 +1692,8 @@ namespace KIO {
void setNextDirAttribute();
private:
void startRenameJob(const KURL &slave_url);
- bool shouldOverwrite( const QString& path ) const;
- bool shouldSkip( const QString& path ) const;
+ bool shouldOverwrite( const TQString& path ) const;
+ bool shouldSkip( const TQString& path ) const;
void skipSrc();
protected slots:
@@ -1724,8 +1724,8 @@ namespace KIO {
KIO::filesize_t m_fileProcessedSize;
int m_processedFiles;
int m_processedDirs;
- QValueList<CopyInfo> files;
- QValueList<CopyInfo> dirs;
+ TQValueList<CopyInfo> files;
+ TQValueList<CopyInfo> dirs;
KURL::List dirsToRemove;
KURL::List m_srcList;
KURL::List::Iterator m_currentStatSrc;
@@ -1736,13 +1736,13 @@ namespace KIO {
KURL m_dest;
KURL m_currentDest;
//
- QStringList m_skipList;
- QStringList m_overwriteList;
+ TQStringList m_skipList;
+ TQStringList m_overwriteList;
bool m_bAutoSkip;
bool m_bOverwriteAll;
int m_conflictError;
- QTimer *m_reportTimer;
+ TQTimer *m_reportTimer;
//these both are used for progress dialog reporting
KURL m_currentSrcURL;
KURL m_currentDestURL;
@@ -1848,9 +1848,9 @@ namespace KIO {
KURL::List dirs;
KURL::List m_srcList;
KURL::List::Iterator m_currentStat;
- QStringList m_parentDirs;
+ TQStringList m_parentDirs;
bool m_shred; // BIC: remove in KDE4
- QTimer *m_reportTimer;
+ TQTimer *m_reportTimer;
protected:
/** \internal */
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/kacl.cpp b/kio/kio/kacl.cpp
index 0812c1f14..432a50d31 100644
--- a/kio/kio/kacl.cpp
+++ b/kio/kio/kacl.cpp
@@ -33,7 +33,7 @@
#include <posixacladdons.h>
#endif
#endif
-#include <qintdict.h>
+#include <tqintdict.h>
#include <kdebug.h>
@@ -41,8 +41,8 @@
#ifdef USE_POSIX_ACL
-static void printACL( acl_t acl, const QString &comment );
-static QString aclAsString(const acl_t acl);
+static void printACL( acl_t acl, const TQString &comment );
+static TQString aclAsString(const acl_t acl);
#endif
class KACL::KACLPrivate {
@@ -60,20 +60,20 @@ public:
// helpers
#ifdef USE_POSIX_ACL
bool setMaskPermissions( unsigned short v );
- QString getUserName( uid_t uid ) const;
- QString getGroupName( gid_t gid ) const;
- bool setAllUsersOrGroups( const QValueList< QPair<QString, unsigned short> > &list, acl_tag_t type );
- bool setNamedUserOrGroupPermissions( const QString& name, unsigned short permissions, acl_tag_t type );
+ TQString getUserName( uid_t uid ) const;
+ TQString getGroupName( gid_t gid ) const;
+ bool setAllUsersOrGroups( const TQValueList< QPair<TQString, unsigned short> > &list, acl_tag_t type );
+ bool setNamedUserOrGroupPermissions( const TQString& name, unsigned short permissions, acl_tag_t type );
acl_t m_acl;
#else
int m_acl;
#endif
- mutable QIntDict<QString> m_usercache;
- mutable QIntDict<QString> m_groupcache;
+ mutable TQIntDict<TQString> m_usercache;
+ mutable TQIntDict<TQString> m_groupcache;
};
-KACL::KACL( const QString &aclString )
+KACL::KACL( const TQString &aclString )
: d( new KACLPrivate )
{
setACL( aclString );
@@ -172,12 +172,12 @@ static void permissionsToEntry( acl_entry_t entry, unsigned short v )
if ( v & 1 ) acl_add_perm( permset, ACL_EXECUTE );
}
-static void printACL( acl_t acl, const QString &comment )
+static void printACL( acl_t acl, const TQString &comment )
{
kdDebug() << comment << aclAsString( acl ) << endl;
}
-static int getUidForName( const QString& name )
+static int getUidForName( const TQString& name )
{
struct passwd *user = getpwnam( name.latin1() );
if ( user )
@@ -186,7 +186,7 @@ static int getUidForName( const QString& name )
return -1;
}
-static int getGidForName( const QString& name )
+static int getGidForName( const TQString& name )
{
struct group *group = getgrnam( name.latin1() );
if ( group )
@@ -312,7 +312,7 @@ bool KACL::setMaskPermissions( unsigned short v )
/**************************
* Deal with named users *
**************************/
-unsigned short KACL::namedUserPermissions( const QString& name, bool *exists ) const
+unsigned short KACL::namedUserPermissions( const TQString& name, bool *exists ) const
{
#ifdef USE_POSIX_ACL
acl_entry_t entry;
@@ -339,7 +339,7 @@ unsigned short KACL::namedUserPermissions( const QString& name, bool *exists ) c
}
#ifdef USE_POSIX_ACL
-bool KACL::KACLPrivate::setNamedUserOrGroupPermissions( const QString& name, unsigned short permissions, acl_tag_t type )
+bool KACL::KACLPrivate::setNamedUserOrGroupPermissions( const TQString& name, unsigned short permissions, acl_tag_t type )
{
bool allIsWell = true;
acl_t newACL = acl_dup( m_acl );
@@ -352,7 +352,7 @@ bool KACL::KACLPrivate::setNamedUserOrGroupPermissions( const QString& name, uns
acl_get_tag_type( entry, &currentTag );
if ( currentTag == type ) {
int id = * (int*)acl_get_qualifier( entry );
- const QString entryName = type == ACL_USER? getUserName( id ): getGroupName( id );
+ const TQString entryName = type == ACL_USER? getUserName( id ): getGroupName( id );
if ( entryName == name ) {
// found him, update
permissionsToEntry( entry, permissions );
@@ -394,7 +394,7 @@ bool KACL::KACLPrivate::setNamedUserOrGroupPermissions( const QString& name, uns
}
#endif
-bool KACL::setNamedUserPermissions( const QString& name, unsigned short permissions )
+bool KACL::setNamedUserPermissions( const TQString& name, unsigned short permissions )
{
#ifdef USE_POSIX_ACL
return d->setNamedUserOrGroupPermissions( name, permissions, ACL_USER );
@@ -417,7 +417,7 @@ ACLUserPermissionsList KACL::allUserPermissions() const
acl_get_tag_type( entry, &currentTag );
if ( currentTag == ACL_USER ) {
id = *( (uid_t*) acl_get_qualifier( entry ) );
- QString name = d->getUserName( id );
+ TQString name = d->getUserName( id );
unsigned short permissions = entryToPermissions( entry );
ACLUserPermissions pair = qMakePair( name, permissions );
list.append( pair );
@@ -429,7 +429,7 @@ ACLUserPermissionsList KACL::allUserPermissions() const
}
#ifdef USE_POSIX_ACL
-bool KACL::KACLPrivate::setAllUsersOrGroups( const QValueList< QPair<QString, unsigned short> > &list, acl_tag_t type )
+bool KACL::KACLPrivate::setAllUsersOrGroups( const TQValueList< QPair<TQString, unsigned short> > &list, acl_tag_t type )
{
bool allIsWell = true;
bool atLeastOneUserOrGroup = false;
@@ -456,7 +456,7 @@ bool KACL::KACLPrivate::setAllUsersOrGroups( const QValueList< QPair<QString, un
//printACL( newACL, "After cleaning out entries: " );
// now add the entries from the list
- QValueList< QPair<QString, unsigned short> >::const_iterator it = list.constBegin();
+ TQValueList< QPair<TQString, unsigned short> >::const_iterator it = list.constBegin();
while ( it != list.constEnd() ) {
acl_create_entry( &newACL, &entry );
acl_set_tag_type( entry, type );
@@ -506,7 +506,7 @@ bool KACL::setAllUserPermissions( const ACLUserPermissionsList &users )
* Deal with named groups *
**************************/
-unsigned short KACL::namedGroupPermissions( const QString& name, bool *exists ) const
+unsigned short KACL::namedGroupPermissions( const TQString& name, bool *exists ) const
{
*exists = false;
#ifdef USE_POSIX_ACL
@@ -531,7 +531,7 @@ unsigned short KACL::namedGroupPermissions( const QString& name, bool *exists )
return 0;
}
-bool KACL::setNamedGroupPermissions( const QString& name, unsigned short permissions )
+bool KACL::setNamedGroupPermissions( const TQString& name, unsigned short permissions )
{
#ifdef USE_POSIX_ACL
return d->setNamedUserOrGroupPermissions( name, permissions, ACL_GROUP );
@@ -555,7 +555,7 @@ ACLGroupPermissionsList KACL::allGroupPermissions() const
acl_get_tag_type( entry, &currentTag );
if ( currentTag == ACL_GROUP ) {
id = *( (gid_t*) acl_get_qualifier( entry ) );
- QString name = d->getGroupName( id );
+ TQString name = d->getGroupName( id );
unsigned short permissions = entryToPermissions( entry );
ACLGroupPermissions pair = qMakePair( name, permissions );
list.append( pair );
@@ -580,7 +580,7 @@ bool KACL::setAllGroupPermissions( const ACLGroupPermissionsList &groups )
* from and to string *
**************************/
-bool KACL::setACL( const QString &aclStr )
+bool KACL::setACL( const TQString &aclStr )
{
bool ret = false;
#ifdef USE_POSIX_ACL
@@ -603,12 +603,12 @@ bool KACL::setACL( const QString &aclStr )
return ret;
}
-QString KACL::asString() const
+TQString KACL::asString() const
{
#ifdef USE_POSIX_ACL
return aclAsString( d->m_acl );
#else
- return QString::null;
+ return TQString::null;
#endif
}
@@ -616,45 +616,45 @@ QString KACL::asString() const
// helpers
#ifdef USE_POSIX_ACL
-QString KACL::KACLPrivate::getUserName( uid_t uid ) const
+TQString KACL::KACLPrivate::getUserName( uid_t uid ) const
{
- QString *temp;
+ TQString *temp;
temp = m_usercache.find( uid );
if ( !temp ) {
struct passwd *user = getpwuid( uid );
if ( user ) {
- m_usercache.insert( uid, new QString(QString::fromLatin1(user->pw_name)) );
- return QString::fromLatin1( user->pw_name );
+ m_usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) );
+ return TQString::fromLatin1( user->pw_name );
}
else
- return QString::number( uid );
+ return TQString::number( uid );
}
else
return *temp;
}
-QString KACL::KACLPrivate::getGroupName( gid_t gid ) const
+TQString KACL::KACLPrivate::getGroupName( gid_t gid ) const
{
- QString *temp;
+ TQString *temp;
temp = m_groupcache.find( gid );
if ( !temp ) {
struct group *grp = getgrgid( gid );
if ( grp ) {
- m_groupcache.insert( gid, new QString(QString::fromLatin1(grp->gr_name)) );
- return QString::fromLatin1( grp->gr_name );
+ m_groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) );
+ return TQString::fromLatin1( grp->gr_name );
}
else
- return QString::number( gid );
+ return TQString::number( gid );
}
else
return *temp;
}
-static QString aclAsString(const acl_t acl)
+static TQString aclAsString(const acl_t acl)
{
char *aclString = acl_to_text( acl, 0 );
- QString ret = QString::fromLatin1( aclString );
+ TQString ret = TQString::fromLatin1( aclString );
acl_free( (void*)aclString );
return ret;
}
@@ -665,15 +665,15 @@ static QString aclAsString(const acl_t acl)
void KACL::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-QDataStream & operator<< ( QDataStream & s, const KACL & a )
+TQDataStream & operator<< ( TQDataStream & s, const KACL & a )
{
s << a.asString();
return s;
}
-QDataStream & operator>> ( QDataStream & s, KACL & a )
+TQDataStream & operator>> ( TQDataStream & s, KACL & a )
{
- QString str;
+ TQString str;
s >> str;
a.setACL( str );
return s;
diff --git a/kio/kio/kacl.h b/kio/kio/kacl.h
index c5254f054..53bc762b0 100644
--- a/kio/kio/kacl.h
+++ b/kio/kio/kacl.h
@@ -23,15 +23,15 @@
#include <sys/types.h>
#include <kio/global.h>
-typedef QPair<QString, unsigned short> ACLUserPermissions;
-typedef QValueList<ACLUserPermissions> ACLUserPermissionsList;
-typedef QValueListIterator<ACLUserPermissions> ACLUserPermissionsIterator;
-typedef QValueListConstIterator<ACLUserPermissions> ACLUserPermissionsConstIterator;
+typedef QPair<TQString, unsigned short> ACLUserPermissions;
+typedef TQValueList<ACLUserPermissions> ACLUserPermissionsList;
+typedef TQValueListIterator<ACLUserPermissions> ACLUserPermissionsIterator;
+typedef TQValueListConstIterator<ACLUserPermissions> ACLUserPermissionsConstIterator;
-typedef QPair<QString, unsigned short> ACLGroupPermissions;
-typedef QValueList<ACLGroupPermissions> ACLGroupPermissionsList;
-typedef QValueListIterator<ACLGroupPermissions> ACLGroupPermissionsIterator;
-typedef QValueListConstIterator<ACLGroupPermissions> ACLGroupPermissionsConstIterator;
+typedef QPair<TQString, unsigned short> ACLGroupPermissions;
+typedef TQValueList<ACLGroupPermissions> ACLGroupPermissionsList;
+typedef TQValueListIterator<ACLGroupPermissions> ACLGroupPermissionsIterator;
+typedef TQValueListConstIterator<ACLGroupPermissions> ACLGroupPermissionsConstIterator;
/**
* The KCAL class encapsulates a POSIX Access Control List. It follows the
@@ -46,7 +46,7 @@ public:
* Creates a new KACL from @p aclString. If the string is a valid acl
* string, isValid() will afterwards return true.
*/
- KACL( const QString & aclString );
+ KACL( const TQString & aclString );
/** Copy ctor */
KACL( const KACL& rhs );
@@ -137,13 +137,13 @@ public:
* exists. @p exists is set to true if a matching entry exists and
* to false otherwise.
* @return the permissions for a user entry with the name in @p name */
- unsigned short namedUserPermissions( const QString& name, bool *exists ) const;
+ unsigned short namedUserPermissions( const TQString& name, bool *exists ) const;
/** Set the permissions for a user with the name @p name. Will fail
* if the user doesn't exist, in which case the ACL will be unchanged.
* @return success or failure. */
- bool setNamedUserPermissions( const QString& name, unsigned short );
+ bool setNamedUserPermissions( const TQString& name, unsigned short );
/** Returns the list of all group permission entries. Each entry consists
* of a name/permissions pair. This is a QPair, therefore access is provided
@@ -162,12 +162,12 @@ public:
* exists. @p exists is set to true if a matching entry exists and
* to false otherwise.
* @return the permissions for a group with the name in @p name */
- unsigned short namedGroupPermissions( const QString& name, bool *exists ) const;
+ unsigned short namedGroupPermissions( const TQString& name, bool *exists ) const;
/** Set the permissions for a group with the name @p name. Will fail
* if the group doesn't exist, in which case the ACL be unchanged.
* @return success or failure. */
- bool setNamedGroupPermissions( const QString& name, unsigned short );
+ bool setNamedGroupPermissions( const TQString& name, unsigned short );
/** Returns the list of all group permission entries. Each entry consists
* of a name/permissions pair. This is a QPair, therefor access is provided
@@ -184,24 +184,24 @@ public:
/** Sets the whole list from a string. If the string in @p aclStr represents
* a valid ACL, it will be set, otherwise the ACL remains unchanged.
* @return whether setting the ACL was successful. */
- bool setACL( const QString &aclStr );
+ bool setACL( const TQString &aclStr );
/** Return a string representation of the ACL.
* @return a string version of the ACL in the format compatible with libacl and
* POSIX 1003.1e. Implementations conforming to that standard should be able
* to take such strings as input. */
- QString asString() const;
+ TQString asString() const;
protected:
virtual void virtual_hook( int id, void* data );
private:
class KACLPrivate;
KACLPrivate * d;
- KIO_EXPORT friend QDataStream & operator<< ( QDataStream & s, const KACL & a );
- KIO_EXPORT friend QDataStream & operator>> ( QDataStream & s, KACL & a );
+ KIO_EXPORT friend TQDataStream & operator<< ( TQDataStream & s, const KACL & a );
+ KIO_EXPORT friend TQDataStream & operator>> ( TQDataStream & s, KACL & a );
};
-KIO_EXPORT QDataStream & operator<< ( QDataStream & s, const KACL & a );
-KIO_EXPORT QDataStream & operator>> ( QDataStream & s, KACL & a );
+KIO_EXPORT TQDataStream & operator<< ( TQDataStream & s, const KACL & a );
+KIO_EXPORT TQDataStream & operator>> ( TQDataStream & s, KACL & a );
#endif
diff --git a/kio/kio/kar.cpp b/kio/kio/kar.cpp
index 557512529..9f9435294 100644
--- a/kio/kio/kar.cpp
+++ b/kio/kio/kar.cpp
@@ -17,13 +17,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <time.h>
#include <kdebug.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kmimetype.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "kfilterdev.h"
#include "kar.h"
@@ -39,19 +39,19 @@ public:
KArPrivate() {}
};
-KAr::KAr( const QString& filename )
+KAr::KAr( const TQString& filename )
: KArchive( 0L )
{
//kdDebug(7042) << "KAr(filename) reached." << endl;
m_filename = filename;
d = new KArPrivate;
- setDevice( new QFile( filename ) );
+ setDevice( new TQFile( filename ) );
}
-KAr::KAr( QIODevice * dev )
+KAr::KAr( TQIODevice * dev )
: KArchive( dev )
{
- //kdDebug(7042) << "KAr::KAr( QIODevice * dev) reached." << endl;
+ //kdDebug(7042) << "KAr::KAr( TQIODevice * dev) reached." << endl;
d = new KArPrivate;
}
@@ -80,7 +80,7 @@ bool KAr::openArchive( int mode )
return false;
}
- QIODevice* dev = device();
+ TQIODevice* dev = device();
if ( !dev )
return false;
@@ -93,9 +93,9 @@ bool KAr::openArchive( int mode )
char *ar_longnames = 0;
while (! dev->atEnd()) {
- QCString ar_header;
+ TQCString ar_header;
ar_header.resize(61);
- QCString name;
+ TQCString name;
int date, uid, gid, mode, size;
dev->at( dev->at() + (2 - (dev->at() % 2)) % 2 ); // Ar headers are padded to byte boundary
diff --git a/kio/kio/kar.h b/kio/kio/kar.h
index d91972cee..1b8f2cef2 100644
--- a/kio/kio/kar.h
+++ b/kio/kio/kar.h
@@ -21,10 +21,10 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include <karchive.h>
@@ -43,14 +43,14 @@ public:
*
* @param filename is a local path (e.g. "/home/holger/myfile.ar")
*/
- KAr( const QString& filename );
+ KAr( const TQString& filename );
/**
* Creates an instance that operates on the given device.
- * The device can be compressed (KFilterDev) or not (QFile, etc.).
+ * The device can be compressed (KFilterDev) or not (TQFile, etc.).
* @param dev the device to read from
*/
- KAr( QIODevice * dev );
+ KAr( TQIODevice * dev );
/**
* If the ar file is still opened, then it will be
@@ -60,15 +60,15 @@ public:
/**
* The name of the ar file, as passed to the constructor.
- * @return the filename. Null if you used the QIODevice constructor
+ * @return the filename. Null if you used the TQIODevice constructor
*/
- QString fileName() { return m_filename; }
+ TQString fileName() { return m_filename; }
/*
* Writing not supported by this class, will always fail.
* @return always false
*/
- virtual bool prepareWriting( const QString& name, const QString& user, const QString& group, uint size ) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); Q_UNUSED(size); return false; }
+ virtual bool prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size ) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); Q_UNUSED(size); return false; }
/*
* Writing not supported by this class, will always fail.
@@ -80,7 +80,7 @@ public:
* Writing not supported by this class, will always fail.
* @return always false
*/
- virtual bool writeDir( const QString& name, const QString& user, const QString& group ) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); return false; }
+ virtual bool writeDir( const TQString& name, const TQString& user, const TQString& group ) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); return false; }
protected:
/**
@@ -95,7 +95,7 @@ protected:
protected:
virtual void virtual_hook( int id, void* data );
private:
- QString m_filename;
+ TQString m_filename;
class KArPrivate;
KArPrivate * d;
};
diff --git a/kio/kio/karchive.cpp b/kio/kio/karchive.cpp
index ef50e289f..592e513d4 100644
--- a/kio/kio/karchive.cpp
+++ b/kio/kio/karchive.cpp
@@ -30,13 +30,13 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qvaluestack.h>
-#include <qmap.h>
-#include <qcstring.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqvaluestack.h>
+#include <tqmap.h>
+#include <tqcstring.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kfilterdev.h>
@@ -46,7 +46,7 @@
#include "karchive.h"
#include "klimitediodevice.h"
-template class QDict<KArchiveEntry>;
+template class TQDict<KArchiveEntry>;
class KArchive::KArchivePrivate
@@ -56,10 +56,10 @@ public:
bool closeSucceeded;
};
-class PosSortedPtrList : public QPtrList<KArchiveFile> {
+class PosSortedPtrList : public TQPtrList<KArchiveFile> {
protected:
- int compareItems( QPtrCollection::Item i1,
- QPtrCollection::Item i2 )
+ int compareItems( TQPtrCollection::Item i1,
+ TQPtrCollection::Item i2 )
{
int pos1 = static_cast<KArchiveFile*>( i1 )->position();
int pos2 = static_cast<KArchiveFile*>( i2 )->position();
@@ -72,7 +72,7 @@ protected:
/////////////////////////// KArchive ///////////////////////////////////
////////////////////////////////////////////////////////////////////////
-KArchive::KArchive( QIODevice * dev )
+KArchive::KArchive( TQIODevice * dev )
{
d = new KArchivePrivate;
d->rootDir = 0;
@@ -133,9 +133,9 @@ const KArchiveDirectory* KArchive::directory() const
}
-bool KArchive::addLocalFile( const QString& fileName, const QString& destName )
+bool KArchive::addLocalFile( const TQString& fileName, const TQString& destName )
{
- QFileInfo fileInfo( fileName );
+ TQFileInfo fileInfo( fileName );
if ( !fileInfo.isFile() && !fileInfo.isSymLink() )
{
kdWarning() << "KArchive::addLocalFile " << fileName << " doesn't exist or is not a regular file." << endl;
@@ -143,7 +143,7 @@ bool KArchive::addLocalFile( const QString& fileName, const QString& destName )
}
KDE_struct_stat fi;
- if (KDE_lstat(QFile::encodeName(fileName),&fi) == -1) {
+ if (KDE_lstat(TQFile::encodeName(fileName),&fi) == -1) {
kdWarning() << "KArchive::addLocalFile stating " << fileName
<< " failed: " << strerror(errno) << endl;
return false;
@@ -160,7 +160,7 @@ bool KArchive::addLocalFile( const QString& fileName, const QString& destName )
// the file must be opened before prepareWriting is called, otherwise
// if the opening fails, no content will follow the already written
// header and the tar file is effectively f*cked up
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) )
{
kdWarning() << "KArchive::addLocalFile couldn't open file " << fileName << endl;
@@ -175,7 +175,7 @@ bool KArchive::addLocalFile( const QString& fileName, const QString& destName )
}
// Read and write data in chunks to minimize memory usage
- QByteArray array(8*1024);
+ TQByteArray array(8*1024);
int n;
uint total = 0;
while ( ( n = file.readBlock( array.data(), array.size() ) ) > 0 )
@@ -197,23 +197,23 @@ bool KArchive::addLocalFile( const QString& fileName, const QString& destName )
return true;
}
-bool KArchive::addLocalDirectory( const QString& path, const QString& destName )
+bool KArchive::addLocalDirectory( const TQString& path, const TQString& destName )
{
- QString dot = ".";
- QString dotdot = "..";
- QDir dir( path );
+ TQString dot = ".";
+ TQString dotdot = "..";
+ TQDir dir( path );
if ( !dir.exists() )
return false;
- dir.setFilter(dir.filter() | QDir::Hidden);
- QStringList files = dir.entryList();
- for ( QStringList::Iterator it = files.begin(); it != files.end(); ++it )
+ dir.setFilter(dir.filter() | TQDir::Hidden);
+ TQStringList files = dir.entryList();
+ for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it )
{
if ( *it != dot && *it != dotdot )
{
- QString fileName = path + "/" + *it;
+ TQString fileName = path + "/" + *it;
// kdDebug() << "storing " << fileName << endl;
- QString dest = destName.isEmpty() ? *it : (destName + "/" + *it);
- QFileInfo fileInfo( fileName );
+ TQString dest = destName.isEmpty() ? *it : (destName + "/" + *it);
+ TQFileInfo fileInfo( fileName );
if ( fileInfo.isFile() || fileInfo.isSymLink() )
addLocalFile( fileName, dest );
@@ -225,15 +225,15 @@ bool KArchive::addLocalDirectory( const QString& path, const QString& destName )
return true;
}
-bool KArchive::writeFile( const QString& name, const QString& user, const QString& group, uint size, const char* data )
+bool KArchive::writeFile( const TQString& name, const TQString& user, const TQString& group, uint size, const char* data )
{
mode_t perm = 0100644;
time_t the_time = time(0);
return writeFile(name,user,group,size,perm,the_time,the_time,the_time,data);
}
-bool KArchive::prepareWriting( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KArchive::prepareWriting( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime ) {
PrepareWritingParams params;
params.name = &name;
@@ -248,16 +248,16 @@ bool KArchive::prepareWriting( const QString& name, const QString& user,
return params.retval;
}
-bool KArchive::prepareWriting_impl(const QString &name, const QString &user,
- const QString &group, uint size, mode_t /*perm*/,
+bool KArchive::prepareWriting_impl(const TQString &name, const TQString &user,
+ const TQString &group, uint size, mode_t /*perm*/,
time_t /*atime*/, time_t /*mtime*/, time_t /*ctime*/ ) {
kdWarning(7040) << "New prepareWriting API not implemented in this class." << endl
<< "Falling back to old API (metadata information will be lost)" << endl;
return prepareWriting(name,user,group,size);
}
-bool KArchive::writeFile( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KArchive::writeFile( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime,
const char* data ) {
WriteFileParams params;
@@ -274,8 +274,8 @@ bool KArchive::writeFile( const QString& name, const QString& user,
return params.retval;
}
-bool KArchive::writeFile_impl( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KArchive::writeFile_impl( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime,
const char* data ) {
@@ -301,8 +301,8 @@ bool KArchive::writeFile_impl( const QString& name, const QString& user,
return true;
}
-bool KArchive::writeDir(const QString& name, const QString& user,
- const QString& group, mode_t perm,
+bool KArchive::writeDir(const TQString& name, const TQString& user,
+ const TQString& group, mode_t perm,
time_t atime, time_t mtime, time_t ctime) {
WriteDirParams params;
params.name = &name;
@@ -316,16 +316,16 @@ bool KArchive::writeDir(const QString& name, const QString& user,
return params.retval;
}
-bool KArchive::writeDir_impl(const QString &name, const QString &user,
- const QString &group, mode_t /*perm*/,
+bool KArchive::writeDir_impl(const TQString &name, const TQString &user,
+ const TQString &group, mode_t /*perm*/,
time_t /*atime*/, time_t /*mtime*/, time_t /*ctime*/ ) {
kdWarning(7040) << "New writeDir API not implemented in this class." << endl
<< "Falling back to old API (metadata information will be lost)" << endl;
return writeDir(name,user,group);
}
-bool KArchive::writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+bool KArchive::writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime) {
WriteSymlinkParams params;
params.name = &name;
@@ -340,8 +340,8 @@ bool KArchive::writeSymLink(const QString &name, const QString &target,
return params.retval;
}
-bool KArchive::writeSymLink_impl(const QString &/*name*/,const QString &/*target*/,
- const QString &/*user*/, const QString &/*group*/,
+bool KArchive::writeSymLink_impl(const TQString &/*name*/,const TQString &/*target*/,
+ const TQString &/*user*/, const TQString &/*group*/,
mode_t /*perm*/, time_t /*atime*/, time_t /*mtime*/,
time_t /*ctime*/) {
kdWarning(7040) << "writeSymLink not implemented in this class." << endl
@@ -372,15 +372,15 @@ KArchiveDirectory * KArchive::rootDir()
//kdDebug() << "Making root dir " << endl;
struct passwd* pw = getpwuid( getuid() );
struct group* grp = getgrgid( getgid() );
- QString username = pw ? QFile::decodeName(pw->pw_name) : QString::number( getuid() );
- QString groupname = grp ? QFile::decodeName(grp->gr_name) : QString::number( getgid() );
+ TQString username = pw ? TQFile::decodeName(pw->pw_name) : TQString::number( getuid() );
+ TQString groupname = grp ? TQFile::decodeName(grp->gr_name) : TQString::number( getgid() );
- d->rootDir = new KArchiveDirectory( this, QString::fromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, QString::null );
+ d->rootDir = new KArchiveDirectory( this, TQString::fromLatin1("/"), (int)(0777 + S_IFDIR), 0, username, groupname, TQString::null );
}
return d->rootDir;
}
-KArchiveDirectory * KArchive::findOrCreate( const QString & path )
+KArchiveDirectory * KArchive::findOrCreate( const TQString & path )
{
//kdDebug() << "KArchive::findOrCreate " << path << endl;
if ( path.isEmpty() || path == "/" || path == "." ) // root dir => found
@@ -408,7 +408,7 @@ KArchiveDirectory * KArchive::findOrCreate( const QString & path )
// Otherwise go up and try again
int pos = path.findRev( '/' );
KArchiveDirectory * parent;
- QString dirname;
+ TQString dirname;
if ( pos == -1 ) // no more slash => create in root dir
{
parent = rootDir();
@@ -416,7 +416,7 @@ KArchiveDirectory * KArchive::findOrCreate( const QString & path )
}
else
{
- QString left = path.left( pos );
+ TQString left = path.left( pos );
dirname = path.mid( pos + 1 );
parent = findOrCreate( left ); // recursive call... until we find an existing dir.
}
@@ -425,12 +425,12 @@ KArchiveDirectory * KArchive::findOrCreate( const QString & path )
// Found -> add the missing piece
KArchiveDirectory * e = new KArchiveDirectory( this, dirname, d->rootDir->permissions(),
d->rootDir->date(), d->rootDir->user(),
- d->rootDir->group(), QString::null );
+ d->rootDir->group(), TQString::null );
parent->addEntry( e );
return e; // now a directory to <path> exists
}
-void KArchive::setDevice( QIODevice * dev )
+void KArchive::setDevice( TQIODevice * dev )
{
m_dev = dev;
}
@@ -444,9 +444,9 @@ void KArchive::setRootDir( KArchiveDirectory *rootDir )
////////////////////////////////////////////////////////////////////////
/////////////////////// KArchiveEntry //////////////////////////////////
////////////////////////////////////////////////////////////////////////
-KArchiveEntry::KArchiveEntry( KArchive* t, const QString& name, int access, int date,
- const QString& user, const QString& group, const
- QString& symlink)
+KArchiveEntry::KArchiveEntry( KArchive* t, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group, const
+ TQString& symlink)
{
m_name = name;
m_access = access;
@@ -458,9 +458,9 @@ KArchiveEntry::KArchiveEntry( KArchive* t, const QString& name, int access, int
}
-QDateTime KArchiveEntry::datetime() const
+TQDateTime KArchiveEntry::datetime() const
{
- QDateTime d;
+ TQDateTime d;
d.setTime_t( m_date );
return d;
}
@@ -469,9 +469,9 @@ QDateTime KArchiveEntry::datetime() const
/////////////////////// KArchiveFile ///////////////////////////////////
////////////////////////////////////////////////////////////////////////
-KArchiveFile::KArchiveFile( KArchive* t, const QString& name, int access, int date,
- const QString& user, const QString& group,
- const QString & symlink,
+KArchiveFile::KArchiveFile( KArchive* t, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group,
+ const TQString & symlink,
int pos, int size )
: KArchiveEntry( t, name, access, date, user, group, symlink )
{
@@ -489,12 +489,12 @@ int KArchiveFile::size() const
return m_size;
}
-QByteArray KArchiveFile::data() const
+TQByteArray KArchiveFile::data() const
{
archive()->device()->at( m_pos );
// Read content
- QByteArray arr( m_size );
+ TQByteArray arr( m_size );
if ( m_size )
{
assert( arr.data() );
@@ -506,14 +506,14 @@ QByteArray KArchiveFile::data() const
}
// ** This should be a virtual method, and this code should be in ktar.cpp
-QIODevice *KArchiveFile::device() const
+TQIODevice *KArchiveFile::device() const
{
return new KLimitedIODevice( archive()->device(), m_pos, m_size );
}
-void KArchiveFile::copyTo(const QString& dest) const
+void KArchiveFile::copyTo(const TQString& dest) const
{
- QFile f( dest + "/" + name() );
+ TQFile f( dest + "/" + name() );
f.open( IO_ReadWrite | IO_Truncate );
f.writeBlock( data() );
f.close();
@@ -524,28 +524,28 @@ void KArchiveFile::copyTo(const QString& dest) const
////////////////////////////////////////////////////////////////////////
-KArchiveDirectory::KArchiveDirectory( KArchive* t, const QString& name, int access,
+KArchiveDirectory::KArchiveDirectory( KArchive* t, const TQString& name, int access,
int date,
- const QString& user, const QString& group,
- const QString &symlink)
+ const TQString& user, const TQString& group,
+ const TQString &symlink)
: KArchiveEntry( t, name, access, date, user, group, symlink )
{
m_entries.setAutoDelete( true );
}
-QStringList KArchiveDirectory::entries() const
+TQStringList KArchiveDirectory::entries() const
{
- QStringList l;
+ TQStringList l;
- QDictIterator<KArchiveEntry> it( m_entries );
+ TQDictIterator<KArchiveEntry> it( m_entries );
for( ; it.current(); ++it )
l.append( it.currentKey() );
return l;
}
-KArchiveEntry* KArchiveDirectory::entry( QString name )
- // not "const QString & name" since we want a local copy
+KArchiveEntry* KArchiveDirectory::entry( TQString name )
+ // not "const TQString & name" since we want a local copy
// (to remove leading slash if any)
{
int pos = name.find( '/' );
@@ -567,8 +567,8 @@ KArchiveEntry* KArchiveDirectory::entry( QString name )
}
if ( pos != -1 )
{
- QString left = name.left( pos );
- QString right = name.mid( pos + 1 );
+ TQString left = name.left( pos );
+ TQString right = name.mid( pos + 1 );
//kdDebug() << "KArchiveDirectory::entry left=" << left << " right=" << right << endl;
@@ -581,7 +581,7 @@ KArchiveEntry* KArchiveDirectory::entry( QString name )
return m_entries[ name ];
}
-const KArchiveEntry* KArchiveDirectory::entry( QString name ) const
+const KArchiveEntry* KArchiveDirectory::entry( TQString name ) const
{
return ((KArchiveDirectory*)this)->entry( name );
}
@@ -596,26 +596,26 @@ void KArchiveDirectory::addEntry( KArchiveEntry* entry )
m_entries.insert( entry->name(), entry );
}
-void KArchiveDirectory::copyTo(const QString& dest, bool recursiveCopy ) const
+void KArchiveDirectory::copyTo(const TQString& dest, bool recursiveCopy ) const
{
- QDir root;
+ TQDir root;
PosSortedPtrList fileList;
- QMap<int, QString> fileToDir;
+ TQMap<int, TQString> fileToDir;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
// placeholders for iterated items
KArchiveDirectory* curDir;
- QString curDirName;
+ TQString curDirName;
- QStringList dirEntries;
+ TQStringList dirEntries;
KArchiveEntry* curEntry;
KArchiveFile* curFile;
- QPtrStack<KArchiveDirectory> dirStack;
- QValueStack<QString> dirNameStack;
+ TQPtrStack<KArchiveDirectory> dirStack;
+ TQValueStack<TQString> dirNameStack;
dirStack.push( this ); // init stack at current directory
dirNameStack.push( dest ); // ... with given path
@@ -628,7 +628,7 @@ void KArchiveDirectory::copyTo(const QString& dest, bool recursiveCopy ) const
for ( it = dirEntries.begin(); it != dirEntries.end(); ++it ) {
curEntry = curDir->entry(*it);
if (!curEntry->symlink().isEmpty()) {
- const QString linkName = curDirName+'/'+curEntry->name();
+ const TQString linkName = curDirName+'/'+curEntry->name();
kdDebug() << "symlink(" << curEntry->symlink() << ',' << linkName << ')';
#ifdef Q_OS_UNIX
if (!::symlink(curEntry->symlink().local8Bit(), linkName.local8Bit())) {
diff --git a/kio/kio/karchive.h b/kio/kio/karchive.h
index 0011e5ebb..dbfe02bff 100644
--- a/kio/kio/karchive.h
+++ b/kio/kio/karchive.h
@@ -24,10 +24,10 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include <kdelibs_export.h>
@@ -47,7 +47,7 @@ protected:
* @param dev the I/O device where the archive reads its data
* Note that this can be a file, but also a data buffer, a compression filter, etc.
*/
- KArchive( QIODevice * dev );
+ KArchive( TQIODevice * dev );
public:
virtual ~KArchive();
@@ -93,7 +93,7 @@ public:
* The underlying device.
* @return the underlying device.
*/
- QIODevice * device() const { return m_dev; }
+ TQIODevice * device() const { return m_dev; }
/**
* If an archive is opened for reading, then the contents
@@ -112,7 +112,7 @@ public:
* @param fileName full path to an existing local file, to be added to the archive.
* @param destName the resulting name (or relative path) of the file in the archive.
*/
- bool addLocalFile( const QString& fileName, const QString& destName );
+ bool addLocalFile( const TQString& fileName, const TQString& destName );
/**
* Writes a local directory into the archive, including all its contents, recursively.
@@ -125,7 +125,7 @@ public:
* @param path full path to an existing local directory, to be added to the archive.
* @param destName the resulting name (or relative path) of the file in the archive.
*/
- bool addLocalDirectory( const QString& path, const QString& destName );
+ bool addLocalDirectory( const TQString& path, const TQString& destName );
/**
* If an archive is opened for writing then you can add new directories
@@ -139,7 +139,7 @@ public:
* writeDir(name,user,group,perm,atime,mtime,ctime)
* or eliminate it
*/
- virtual bool writeDir( const QString& name, const QString& user, const QString& group ) = 0;
+ virtual bool writeDir( const TQString& name, const TQString& user, const TQString& group ) = 0;
/**
* If an archive is opened for writing then you can add new directories
@@ -158,7 +158,7 @@ public:
* @since 3.2
* @todo TODO(BIC): make this virtual. For now use virtual hook
*/
- bool writeDir( const QString& name, const QString& user, const QString& group,
+ bool writeDir( const TQString& name, const TQString& user, const TQString& group,
mode_t perm, time_t atime, time_t mtime, time_t ctime );
/**
@@ -175,8 +175,8 @@ public:
* @since 3.2
* @todo TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
*/
- bool writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
/**
@@ -192,7 +192,7 @@ public:
* @todo TODO(BIC): make this a thin non-virtual wrapper around
* writeFile(name,user,group,size,perm,atime,mtime,ctime,data)
*/
- virtual bool writeFile( const QString& name, const QString& user, const QString& group, uint size, const char* data );
+ virtual bool writeFile( const TQString& name, const TQString& user, const TQString& group, uint size, const char* data );
/**
* If an archive is opened for writing then you can add a new file
@@ -215,7 +215,7 @@ public:
* @since 3.2
* @todo TODO(BIC): make virtual. For now use virtual hook
*/
- bool writeFile( const QString& name, const QString& user, const QString& group,
+ bool writeFile( const TQString& name, const TQString& user, const TQString& group,
uint size, mode_t perm, time_t atime, time_t mtime,
time_t ctime, const char* data );
@@ -235,7 +235,7 @@ public:
* prepareWriting(name,user,group,size,perm,atime,mtime,ctime)
* or eliminate it.
*/
- virtual bool prepareWriting( const QString& name, const QString& user, const QString& group, uint size ) = 0;
+ virtual bool prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size ) = 0;
/**
* Here's another way of writing a file into an archive:
@@ -258,8 +258,8 @@ public:
* @since 3.2
* @todo TODO(BIC): make this virtual. For now use virtual hook.
*/
- bool prepareWriting( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime );
/**
@@ -304,12 +304,12 @@ protected:
* @param path the path of the directory
* @return the directory with the given @p path
*/
- KArchiveDirectory * findOrCreate( const QString & path );
+ KArchiveDirectory * findOrCreate( const TQString & path );
/**
* @internal for inherited constructors
*/
- void setDevice( QIODevice *dev );
+ void setDevice( TQIODevice *dev );
/**
* @internal for inherited classes
@@ -317,7 +317,7 @@ protected:
void setRootDir( KArchiveDirectory *rootDir );
private:
- QIODevice * m_dev;
+ TQIODevice * m_dev;
bool m_open;
char m_mode;
protected:
@@ -325,51 +325,51 @@ protected:
/* @internal for virtual_hook */
enum { VIRTUAL_WRITE_DATA = 1, VIRTUAL_WRITE_SYMLINK, VIRTUAL_WRITE_DIR,
VIRTUAL_WRITE_FILE, VIRTUAL_PREPARE_WRITING };
- bool prepareWriting_impl( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting_impl( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime );
struct PrepareWritingParams {
- const QString *name;
- const QString *user;
- const QString *group;
+ const TQString *name;
+ const TQString *user;
+ const TQString *group;
uint size;
mode_t perm;
time_t atime, mtime, ctime;
bool retval;
};
- bool writeFile_impl( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool writeFile_impl( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime,
const char* data );
struct WriteFileParams {
- const QString *name;
- const QString *user;
- const QString *group;
+ const TQString *name;
+ const TQString *user;
+ const TQString *group;
uint size;
mode_t perm;
time_t atime, mtime, ctime;
const char *data;
bool retval;
};
- bool writeDir_impl(const QString& name, const QString& user,
- const QString& group, mode_t perm,
+ bool writeDir_impl(const TQString& name, const TQString& user,
+ const TQString& group, mode_t perm,
time_t atime, time_t mtime, time_t ctime);
struct WriteDirParams {
- const QString *name;
- const QString *user;
- const QString *group;
+ const TQString *name;
+ const TQString *user;
+ const TQString *group;
mode_t perm;
time_t atime, mtime, ctime;
bool retval;
};
- bool writeSymLink_impl(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink_impl(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
struct WriteSymlinkParams {
- const QString *name;
- const QString *target;
- const QString *user;
- const QString *group;
+ const TQString *name;
+ const TQString *target;
+ const TQString *user;
+ const TQString *group;
mode_t perm;
time_t atime, mtime, ctime;
bool retval;
@@ -403,11 +403,11 @@ public:
* @param date the date (in seconds since 1970)
* @param user the user that owns the entry
* @param group the group that owns the entry
- * @param symlink the symlink, or QString::null
+ * @param symlink the symlink, or TQString::null
*/
- KArchiveEntry( KArchive* archive, const QString& name, int access, int date,
- const QString& user, const QString& group,
- const QString &symlink );
+ KArchiveEntry( KArchive* archive, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group,
+ const TQString &symlink );
virtual ~KArchiveEntry() { }
@@ -415,7 +415,7 @@ public:
* Creation date of the file.
* @return the creation date
*/
- QDateTime datetime() const;
+ TQDateTime datetime() const;
/**
* Creation date of the file.
@@ -427,7 +427,7 @@ public:
* Name of the file without path.
* @return the file name without path
*/
- QString name() const { return m_name; }
+ TQString name() const { return m_name; }
/**
* The permissions and mode flags as returned by the stat() function
* in st_mode.
@@ -438,18 +438,18 @@ public:
* User who created the file.
* @return the owner of the file
*/
- QString user() const { return m_user; }
+ TQString user() const { return m_user; }
/**
* Group of the user who created the file.
* @return the group of the file
*/
- QString group() const { return m_group; }
+ TQString group() const { return m_group; }
/**
* Symlink if there is one.
- * @return the symlink, or QString::null
+ * @return the symlink, or TQString::null
*/
- QString symlink() const { return m_symlink; }
+ TQString symlink() const { return m_symlink; }
/**
* Checks whether the entry is a file.
@@ -467,12 +467,12 @@ protected:
KArchive* archive() const { return m_archive; }
private:
- QString m_name;
+ TQString m_name;
int m_date;
mode_t m_access;
- QString m_user;
- QString m_group;
- QString m_symlink;
+ TQString m_user;
+ TQString m_group;
+ TQString m_symlink;
KArchive* m_archive;
protected:
virtual void virtual_hook( int id, void* data );
@@ -498,12 +498,12 @@ public:
* @param date the date (in seconds since 1970)
* @param user the user that owns the entry
* @param group the group that owns the entry
- * @param symlink the symlink, or QString::null
+ * @param symlink the symlink, or TQString::null
* @param pos the position of the file in the directory
* @param size the size of the file
*/
- KArchiveFile( KArchive* archive, const QString& name, int access, int date,
- const QString& user, const QString& group, const QString &symlink,
+ KArchiveFile( KArchive* archive, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group, const TQString &symlink,
int pos, int size );
virtual ~KArchiveFile() { }
@@ -529,17 +529,17 @@ public:
* Call data() with care (only once per file), this data isn't cached.
* @return the content of this file.
*/
- virtual QByteArray data() const;
+ virtual TQByteArray data() const;
/**
- * This method returns QIODevice (internal class: KLimitedIODevice)
- * on top of the underlying QIODevice. This is obviously for reading only.
+ * This method returns TQIODevice (internal class: KLimitedIODevice)
+ * on top of the underlying TQIODevice. This is obviously for reading only.
* Note that the ownership of the device is being transferred to the caller,
* who will have to delete it.
* The returned device auto-opens (in readonly mode), no need to open it.
- * @return the QIODevice of the file
+ * @return the TQIODevice of the file
*/
- QIODevice *device() const; // TODO make virtual
+ TQIODevice *device() const; // TODO make virtual
/**
* Checks whether this entry is a file.
@@ -552,7 +552,7 @@ public:
* @param dest the directory to extract to
* @since 3.1
*/
- void copyTo(const QString& dest) const;
+ void copyTo(const TQString& dest) const;
private:
int m_pos; // TODO use Q_LONG in KDE-4.0
@@ -581,11 +581,11 @@ public:
* @param date the date (in seconds since 1970)
* @param user the user that owns the entry
* @param group the group that owns the entry
- * @param symlink the symlink, or QString::null
+ * @param symlink the symlink, or TQString::null
*/
- KArchiveDirectory( KArchive* archive, const QString& name, int access, int date,
- const QString& user, const QString& group,
- const QString& symlink);
+ KArchiveDirectory( KArchive* archive, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group,
+ const TQString& symlink);
virtual ~KArchiveDirectory() { }
@@ -593,19 +593,19 @@ public:
* Returns a list of sub-entries.
* @return the names of all entries in this directory (filenames, no path).
*/
- QStringList entries() const;
+ TQStringList entries() const;
/**
* Returns the entry with the given name.
* @param name may be "test1", "mydir/test3", "mydir/mysubdir/test3", etc.
* @return a pointer to the entry in the directory.
*/
- KArchiveEntry* entry( QString name );
+ KArchiveEntry* entry( TQString name );
/**
* Returns the entry with the given name.
* @param name may be "test1", "mydir/test3", "mydir/mysubdir/test3", etc.
* @return a pointer to the entry in the directory.
*/
- const KArchiveEntry* entry( QString name ) const;
+ const KArchiveEntry* entry( TQString name ) const;
/**
* @internal
@@ -626,10 +626,10 @@ public:
* @param recursive if set to true, subdirectories are extracted as well
* @since 3.1
*/
- void copyTo(const QString& dest, bool recursive = true) const;
+ void copyTo(const TQString& dest, bool recursive = true) const;
private:
- QDict<KArchiveEntry> m_entries;
+ TQDict<KArchiveEntry> m_entries;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/kautomount.cpp b/kio/kio/kautomount.cpp
index 23d3c970c..a4782c313 100644
--- a/kio/kio/kautomount.cpp
+++ b/kio/kio/kautomount.cpp
@@ -29,8 +29,8 @@
*
***********************************************************************/
-KAutoMount::KAutoMount( bool _readonly, const QString& _format, const QString& _device,
- const QString& _mountpoint, const QString & _desktopFile,
+KAutoMount::KAutoMount( bool _readonly, const TQString& _format, const TQString& _device,
+ const TQString& _mountpoint, const TQString & _desktopFile,
bool _show_filemanager_window )
: m_strDevice( _device ),
m_desktopFile( _desktopFile )
@@ -39,7 +39,7 @@ KAutoMount::KAutoMount( bool _readonly, const QString& _format, const QString& _
m_bShowFilemanagerWindow = _show_filemanager_window;
KIO::Job* job = KIO::mount( _readonly, _format.ascii(), _device, _mountpoint );
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
}
void KAutoMount::slotResult( KIO::Job * job )
@@ -77,11 +77,11 @@ void KAutoMount::slotResult( KIO::Job * job )
delete this;
}
-KAutoUnmount::KAutoUnmount( const QString & _mountpoint, const QString & _desktopFile )
+KAutoUnmount::KAutoUnmount( const TQString & _mountpoint, const TQString & _desktopFile )
: m_desktopFile( _desktopFile ), m_mountpoint( _mountpoint )
{
KIO::Job * job = KIO::unmount( m_mountpoint );
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
}
void KAutoUnmount::slotResult( KIO::Job * job )
diff --git a/kio/kio/kautomount.h b/kio/kio/kautomount.h
index 07f37c1c1..1d8662590 100644
--- a/kio/kio/kautomount.h
+++ b/kio/kio/kautomount.h
@@ -19,8 +19,8 @@
#ifndef __auto_mount_h__
#define __auto_mount_h__
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -54,8 +54,8 @@ public:
* @param show_filemanager_window if true, a file-manager window for that mountpoint is shown after
* the mount, if successful.
*/
- KAutoMount( bool readonly, const QString& format, const QString& device, const QString& mountpoint,
- const QString & desktopFile, bool show_filemanager_window = true );
+ KAutoMount( bool readonly, const TQString& format, const TQString& device, const TQString& mountpoint,
+ const TQString & desktopFile, bool show_filemanager_window = true );
signals:
/** Emitted when the directory has been mounted */
@@ -67,9 +67,9 @@ protected slots:
void slotResult( KIO::Job * );
protected:
- QString m_strDevice;
+ TQString m_strDevice;
bool m_bShowFilemanagerWindow;
- QString m_desktopFile;
+ TQString m_desktopFile;
private:
/** KAutoMount deletes itself. Don't delete it manually. */
~KAutoMount() {}
@@ -94,7 +94,7 @@ public:
* @param desktopFile the file the user clicked on - to notify KDirWatch of the fact that
* it should emit fileDirty for it (to have the icon change)
*/
- KAutoUnmount( const QString & mountpoint, const QString & desktopFile );
+ KAutoUnmount( const TQString & mountpoint, const TQString & desktopFile );
signals:
/** Emitted when the directory has been unmounted */
@@ -105,8 +105,8 @@ signals:
protected slots:
void slotResult( KIO::Job * );
private:
- QString m_desktopFile;
- QString m_mountpoint;
+ TQString m_desktopFile;
+ TQString m_mountpoint;
private:
/** KAutoUnmount deletes itself. Don't delete it manually. */
~KAutoUnmount() {}
diff --git a/kio/kio/kdatatool.cpp b/kio/kio/kdatatool.cpp
index 2b7c58665..bb6462006 100644
--- a/kio/kio/kdatatool.cpp
+++ b/kio/kio/kdatatool.cpp
@@ -28,8 +28,8 @@
#include <ktrader.h>
#include <kparts/componentfactory.h>
-#include <qpixmap.h>
-#include <qfile.h>
+#include <tqpixmap.h>
+#include <tqfile.h>
/*************************************************
*
@@ -68,18 +68,18 @@ KDataToolInfo& KDataToolInfo::operator= ( const KDataToolInfo& info )
return *this;
}
-QString KDataToolInfo::dataType() const
+TQString KDataToolInfo::dataType() const
{
if ( !m_service )
- return QString::null;
+ return TQString::null;
return m_service->property( "DataType" ).toString();
}
-QStringList KDataToolInfo::mimeTypes() const
+TQStringList KDataToolInfo::mimeTypes() const
{
if ( !m_service )
- return QStringList();
+ return TQStringList();
return m_service->property( "DataMimeTypes" ).toStringList();
}
@@ -92,58 +92,58 @@ bool KDataToolInfo::isReadOnly() const
return m_service->property( "ReadOnly" ).toBool();
}
-QPixmap KDataToolInfo::icon() const
+TQPixmap KDataToolInfo::icon() const
{
if ( !m_service )
- return QPixmap();
+ return TQPixmap();
- QPixmap pix;
- QStringList lst = KGlobal::dirs()->resourceDirs("icon");
- QStringList::ConstIterator it = lst.begin();
+ TQPixmap pix;
+ TQStringList lst = KGlobal::dirs()->resourceDirs("icon");
+ TQStringList::ConstIterator it = lst.begin();
while (!pix.load( *it + "/" + m_service->icon() ) && it != lst.end() )
it++;
return pix;
}
-QPixmap KDataToolInfo::miniIcon() const
+TQPixmap KDataToolInfo::miniIcon() const
{
if ( !m_service )
- return QPixmap();
+ return TQPixmap();
- QPixmap pix;
- QStringList lst = KGlobal::dirs()->resourceDirs("mini");
- QStringList::ConstIterator it = lst.begin();
+ TQPixmap pix;
+ TQStringList lst = KGlobal::dirs()->resourceDirs("mini");
+ TQStringList::ConstIterator it = lst.begin();
while (!pix.load( *it + "/" + m_service->icon() ) && it != lst.end() )
it++;
return pix;
}
-QString KDataToolInfo::iconName() const
+TQString KDataToolInfo::iconName() const
{
if ( !m_service )
- return QString::null;
+ return TQString::null;
return m_service->icon();
}
-QStringList KDataToolInfo::commands() const
+TQStringList KDataToolInfo::commands() const
{
if ( !m_service )
- return QString::null;
+ return TQString::null;
return m_service->property( "Commands" ).toStringList();
}
-QStringList KDataToolInfo::userCommands() const
+TQStringList KDataToolInfo::userCommands() const
{
if ( !m_service )
- return QString::null;
+ return TQString::null;
- return QStringList::split( ',', m_service->comment() );
+ return TQStringList::split( ',', m_service->comment() );
}
-KDataTool* KDataToolInfo::createTool( QObject* parent, const char* name ) const
+KDataTool* KDataToolInfo::createTool( TQObject* parent, const char* name ) const
{
if ( !m_service )
return 0;
@@ -159,19 +159,19 @@ KService::Ptr KDataToolInfo::service() const
return m_service;
}
-QValueList<KDataToolInfo> KDataToolInfo::query( const QString& datatype, const QString& mimetype, KInstance* instance )
+TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const TQString& mimetype, KInstance* instance )
{
- QValueList<KDataToolInfo> lst;
+ TQValueList<KDataToolInfo> lst;
- QString constr;
+ TQString constr;
if ( !datatype.isEmpty() )
{
- constr = QString::fromLatin1( "DataType == '%1'" ).arg( datatype );
+ constr = TQString::fromLatin1( "DataType == '%1'" ).arg( datatype );
}
if ( !mimetype.isEmpty() )
{
- QString tmp = QString::fromLatin1( "'%1' in DataMimeTypes" ).arg( mimetype );
+ TQString tmp = TQString::fromLatin1( "'%1' in DataMimeTypes" ).arg( mimetype );
if ( constr.isEmpty() )
constr = tmp;
else
@@ -180,7 +180,7 @@ QValueList<KDataToolInfo> KDataToolInfo::query( const QString& datatype, const Q
/* Bug in KTrader ? Test with HEAD-kdelibs!
if ( instance )
{
- QString tmp = QString::fromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() );
+ TQString tmp = TQString::fromLatin1( "not ('%1' in ExcludeFrom)" ).arg( instance->instanceName() );
if ( constr.isEmpty() )
constr = tmp;
else
@@ -215,8 +215,8 @@ bool KDataToolInfo::isValid() const
* KDataToolAction
*
*************************************************/
-KDataToolAction::KDataToolAction( const QString & text, const KDataToolInfo & info, const QString & command,
- QObject * parent, const char * name )
+KDataToolAction::KDataToolAction( const TQString & text, const KDataToolInfo & info, const TQString & command,
+ TQObject * parent, const char * name )
: KAction( text, info.iconName(), 0, parent, name ),
m_command( command ),
m_info( info )
@@ -228,30 +228,30 @@ void KDataToolAction::slotActivated()
emit toolActivated( m_info, m_command );
}
-QPtrList<KAction> KDataToolAction::dataToolActionList( const QValueList<KDataToolInfo> & tools, const QObject *receiver, const char* slot )
+TQPtrList<KAction> KDataToolAction::dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot )
{
- QPtrList<KAction> actionList;
+ TQPtrList<KAction> actionList;
if ( tools.isEmpty() )
return actionList;
actionList.append( new KActionSeparator() );
- QValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
for( ; entry != tools.end(); ++entry )
{
- QStringList userCommands = (*entry).userCommands();
- QStringList commands = (*entry).commands();
+ TQStringList userCommands = (*entry).userCommands();
+ TQStringList commands = (*entry).commands();
Q_ASSERT(!commands.isEmpty());
if ( commands.count() != userCommands.count() )
kdWarning() << "KDataTool desktop file error (" << (*entry).service()->entryPath()
<< "). " << commands.count() << " commands and "
<< userCommands.count() << " descriptions." << endl;
- QStringList::ConstIterator uit = userCommands.begin();
- QStringList::ConstIterator cit = commands.begin();
+ TQStringList::ConstIterator uit = userCommands.begin();
+ TQStringList::ConstIterator cit = commands.begin();
for (; uit != userCommands.end() && cit != commands.end(); ++uit, ++cit )
{
//kdDebug() << "creating action " << *uit << " " << *cit << endl;
KDataToolAction * action = new KDataToolAction( *uit, *entry, *cit );
- connect( action, SIGNAL( toolActivated( const KDataToolInfo &, const QString & ) ),
+ connect( action, TQT_SIGNAL( toolActivated( const KDataToolInfo &, const TQString & ) ),
receiver, slot );
actionList.append( action );
}
@@ -266,8 +266,8 @@ QPtrList<KAction> KDataToolAction::dataToolActionList( const QValueList<KDataToo
*
*************************************************/
-KDataTool::KDataTool( QObject* parent, const char* name )
- : QObject( parent, name ), m_instance( 0L )
+KDataTool::KDataTool( TQObject* parent, const char* name )
+ : TQObject( parent, name ), m_instance( 0L )
{
}
diff --git a/kio/kio/kdatatool.h b/kio/kio/kdatatool.h
index 4871f08db..c27b8fbe5 100644
--- a/kio/kio/kdatatool.h
+++ b/kio/kio/kdatatool.h
@@ -21,8 +21,8 @@
#ifndef KDATATOOL_H
#define KDATATOOL_H
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#include <kaction.h>
#include <kservice.h>
@@ -69,14 +69,14 @@ public:
/**
* Returns the data type that the DataTool can accept.
* @return the C++ data type that this DataTool accepts.
- * For example "QString" or "QImage" or something more
+ * For example "TQString" or "TQImage" or something more
* complicated.
*/
- QString dataType() const;
+ TQString dataType() const;
/**
* Returns a list of mime type that will be accepted by the DataTool.
* The mimetypes are only used if the dataType can be used to store
- * different mimetypes. For example in a "QString" you could save "text/plain"
+ * different mimetypes. For example in a "TQString" you could save "text/plain"
* or "text/html" or "text/xml".
*
* @return the mime types accepted by this DataTool. For example
@@ -84,7 +84,7 @@ public:
* determines the accepted type of data perfectly. In this cases
* this list may be empty.
*/
- QStringList mimeTypes() const;
+ TQStringList mimeTypes() const;
/**
* Checks whether the DataTool is read-only.
@@ -97,20 +97,20 @@ public:
* @return a large pixmap for the DataTool.
* @deprecated, use iconName()
*/
- QPixmap icon() const KDE_DEPRECATED;
+ TQPixmap icon() const KDE_DEPRECATED;
/**
* Returns the mini icon of this data tool.
* @return a mini pixmap for the DataTool.
* @deprecated, use iconName()
*/
- QPixmap miniIcon() const KDE_DEPRECATED;
+ TQPixmap miniIcon() const KDE_DEPRECATED;
/**
* Returns the icon name for this DataTool.
* @return the name of the icon for the DataTool
*/
- QString iconName() const;
+ TQString iconName() const;
/**
- * Returns a list of strings that you can put in a QPopupMenu item, for example to
+ * Returns a list of strings that you can put in a TQPopupMenu item, for example to
* offer the DataTools services to the user. The returned value
* is usually something like "Spell checking", "Shrink Image", "Rotate Image"
* or something like that.
@@ -120,9 +120,9 @@ public:
* Each of the strings returned corresponds to a string in the list returned by
* commands.
*
- * @return a list of strings that you can put in a QPopupMenu item
+ * @return a list of strings that you can put in a TQPopupMenu item
*/
- QStringList userCommands() const;
+ TQStringList userCommands() const;
/**
* Returns the list of commands the DataTool can execute. The application
* passes the command to the KDataTool::run method.
@@ -134,15 +134,15 @@ public:
* @return the list of commands the DataTool can execute, suitable for
* the KDataTool::run method.
*/
- QStringList commands() const;
+ TQStringList commands() const;
/**
* Creates the data tool described by this KDataToolInfo.
- * @param parent the parent of the QObject (or 0 for parent-less KDataTools)
- * @param name the name of the QObject, can be 0
+ * @param parent the parent of the TQObject (or 0 for parent-less KDataTools)
+ * @param name the name of the TQObject, can be 0
* @return a pointer to the created data tool or 0 on error.
*/
- KDataTool* createTool( QObject* parent = 0, const char* name = 0 ) const;
+ KDataTool* createTool( TQObject* parent = 0, const char* name = 0 ) const;
/**
* The KDataToolInfo's service that is represented by this class.
@@ -165,13 +165,13 @@ public:
/**
* Queries the KTrader about installed KDataTool implementations.
- * @param datatype a type that the application can 'export' to the tools (e.g. QString)
+ * @param datatype a type that the application can 'export' to the tools (e.g. TQString)
* @param mimetype the mimetype of the data (e.g. text/plain)
* @param instance the application (or the part)'s instance (to check if a tool is excluded from this part,
* and also used if the tool wants to read its configuration in the app's config file).
* @return the list of results
*/
- static QValueList<KDataToolInfo> query( const QString& datatype, const QString& mimetype, KInstance * instance );
+ static TQValueList<KDataToolInfo> query( const TQString& datatype, const TQString& mimetype, KInstance * instance );
private:
KService::Ptr m_service;
@@ -204,7 +204,7 @@ public:
* @param parent This action's parent.
* @param name An internal name for this action.
*/
- KDataToolAction( const QString & text, const KDataToolInfo & info, const QString & command, QObject * parent = 0, const char * name = 0);
+ KDataToolAction( const TQString & text, const KDataToolInfo & info, const TQString & command, TQObject * parent = 0, const char * name = 0);
/**
* Creates a list of actions from a list of information about data-tools.
@@ -216,7 +216,7 @@ public:
* @param slot the slot that will receive the toolActivated() signals
* @return the KActions
*/
- static QPtrList<KAction> dataToolActionList( const QValueList<KDataToolInfo> & tools, const QObject *receiver, const char* slot );
+ static TQPtrList<KAction> dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot );
signals:
/**
@@ -224,13 +224,13 @@ signals:
* @param info a description of the activated tools
* @param command the command for the tool
*/
- void toolActivated( const KDataToolInfo & info, const QString & command );
+ void toolActivated( const KDataToolInfo & info, const TQString & command );
protected:
virtual void slotActivated();
private:
- QString m_command;
+ TQString m_command;
KDataToolInfo m_info;
protected:
virtual void virtual_hook( int id, void* data );
@@ -257,10 +257,10 @@ public:
/**
* Constructor
* The data-tool is only created when a menu-item, that relates to it, is activated.
- * @param parent the parent of the QObject (or 0 for parent-less KDataTools)
- * @param name the name of the QObject, can be 0
+ * @param parent the parent of the TQObject (or 0 for parent-less KDataTools)
+ * @param name the name of the TQObject, can be 0
*/
- KDataTool( QObject* parent = 0, const char* name = 0 );
+ KDataTool( TQObject* parent = 0, const char* name = 0 );
/**
* @internal. Do not use under any circumstance (including bad weather).
@@ -284,10 +284,10 @@ public:
* and for getting it back and updating itself with it, after the tool ran.
* @param datatype defines the type of @p data.
* @param mimetype defines the mimetype of the data (for instance datatype may be
- * QString, but the mimetype can be text/plain, text/html etc.)
+ * TQString, but the mimetype can be text/plain, text/html etc.)
* @return true if successful, false otherwise
*/
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype) = 0;
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype) = 0;
private:
KInstance * m_instance;
diff --git a/kio/kio/kdcopservicestarter.cpp b/kio/kio/kdcopservicestarter.cpp
index 023789ab8..3c9b55501 100644
--- a/kio/kio/kdcopservicestarter.cpp
+++ b/kio/kio/kdcopservicestarter.cpp
@@ -46,15 +46,15 @@ KDCOPServiceStarter::~KDCOPServiceStarter()
{
}
-int KDCOPServiceStarter::findServiceFor( const QString& serviceType,
- const QString& _constraint,
- const QString& preferences,
- QString *error, QCString* pDcopService,
+int KDCOPServiceStarter::findServiceFor( const TQString& serviceType,
+ const TQString& _constraint,
+ const TQString& preferences,
+ TQString *error, TQCString* pDcopService,
int flags )
{
// Ask the trader which service is preferred for this servicetype
// We want one that provides a DCOP interface
- QString constraint = _constraint;
+ TQString constraint = _constraint;
if ( !constraint.isEmpty() )
constraint += " and ";
constraint += "exist [X-DCOP-ServiceName]";
@@ -66,11 +66,11 @@ int KDCOPServiceStarter::findServiceFor( const QString& serviceType,
return -1;
}
KService::Ptr ptr = offers.first();
- QCString dcopService = ptr->property("X-DCOP-ServiceName").toString().latin1();
+ TQCString dcopService = ptr->property("X-DCOP-ServiceName").toString().latin1();
if ( !kapp->dcopClient()->isApplicationRegistered( dcopService ) )
{
- QString error;
+ TQString error;
if ( startServiceFor( serviceType, constraint, preferences, &error, &dcopService, flags ) != 0 )
{
kdDebug() << "KDCOPServiceStarter: Couldn't start service: " << error << endl;
@@ -83,15 +83,15 @@ int KDCOPServiceStarter::findServiceFor( const QString& serviceType,
return 0;
}
-int KDCOPServiceStarter::startServiceFor( const QString& serviceType,
- const QString& constraint,
- const QString& preferences,
- QString *error, QCString* dcopService, int /*flags*/ )
+int KDCOPServiceStarter::startServiceFor( const TQString& serviceType,
+ const TQString& constraint,
+ const TQString& preferences,
+ TQString *error, TQCString* dcopService, int /*flags*/ )
{
KTrader::OfferList offers = KTrader::self()->query(serviceType, "Application", constraint, preferences);
if ( offers.isEmpty() )
return -1;
KService::Ptr ptr = offers.first();
kdDebug() << "KDCOPServiceStarter: starting " << ptr->desktopEntryPath() << endl;
- return kapp->startServiceByDesktopPath( ptr->desktopEntryPath(), QStringList(), error, dcopService );
+ return kapp->startServiceByDesktopPath( ptr->desktopEntryPath(), TQStringList(), error, dcopService );
}
diff --git a/kio/kio/kdcopservicestarter.h b/kio/kio/kdcopservicestarter.h
index 1318c431a..c6b6b4e0e 100644
--- a/kio/kio/kdcopservicestarter.h
+++ b/kio/kio/kdcopservicestarter.h
@@ -19,7 +19,7 @@
#ifndef KDCOPSERVICESTARTER_H
#define KDCOPSERVICESTARTER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kstaticdeleter.h>
class KDCOPServiceStarter;
@@ -58,10 +58,10 @@ public:
*
* @return an error code indicating success (== 0) or failure (> 0).
*/
- int findServiceFor( const QString& serviceType,
- const QString& constraint = QString::null,
- const QString& preferences = QString::null,
- QString *error=0, QCString* dcopService=0,
+ int findServiceFor( const TQString& serviceType,
+ const TQString& constraint = TQString::null,
+ const TQString& preferences = TQString::null,
+ TQString *error=0, TQCString* dcopService=0,
int flags=0 );
/**
@@ -86,10 +86,10 @@ public:
*
* @return an error code indicating success (== 0) or failure (> 0).
*/
- virtual int startServiceFor( const QString& serviceType,
- const QString& constraint = QString::null,
- const QString& preferences = QString::null,
- QString *error=0, QCString* dcopService=0,
+ virtual int startServiceFor( const TQString& serviceType,
+ const TQString& constraint = TQString::null,
+ const TQString& preferences = TQString::null,
+ TQString *error=0, TQCString* dcopService=0,
int flags=0 );
protected:
KDCOPServiceStarter();
diff --git a/kio/kio/kdirlister.cpp b/kio/kio/kdirlister.cpp
index 4c16a5d36..7be6da985 100644
--- a/kio/kio/kdirlister.cpp
+++ b/kio/kio/kdirlister.cpp
@@ -21,9 +21,9 @@
#include "kdirlister.h"
-#include <qregexp.h>
-#include <qptrlist.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -61,12 +61,12 @@ KDirListerCache::KDirListerCache( int maxCount )
urlsCurrentlyHeld.setAutoDelete( true );
pendingUpdates.setAutoDelete( true );
- connect( kdirwatch, SIGNAL( dirty( const QString& ) ),
- this, SLOT( slotFileDirty( const QString& ) ) );
- connect( kdirwatch, SIGNAL( created( const QString& ) ),
- this, SLOT( slotFileCreated( const QString& ) ) );
- connect( kdirwatch, SIGNAL( deleted( const QString& ) ),
- this, SLOT( slotFileDeleted( const QString& ) ) );
+ connect( kdirwatch, TQT_SIGNAL( dirty( const TQString& ) ),
+ this, TQT_SLOT( slotFileDirty( const TQString& ) ) );
+ connect( kdirwatch, TQT_SIGNAL( created( const TQString& ) ),
+ this, TQT_SLOT( slotFileCreated( const TQString& ) ) );
+ connect( kdirwatch, TQT_SIGNAL( deleted( const TQString& ) ),
+ this, TQT_SLOT( slotFileDeleted( const TQString& ) ) );
}
KDirListerCache::~KDirListerCache()
@@ -92,7 +92,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
KURL _url = _u;
_url.cleanPath(); // kill consecutive slashes
_url.adjustPath(-1);
- QString urlStr = _url.url();
+ TQString urlStr = _url.url();
if ( !lister->validURL( _url ) )
return false;
@@ -186,7 +186,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
lister->emitItems();
Q_ASSERT( !urlsCurrentlyHeld[urlStr] );
- QPtrList<KDirLister> *list = new QPtrList<KDirLister>;
+ TQPtrList<KDirLister> *list = new TQPtrList<KDirLister>;
list->append( lister );
urlsCurrentlyHeld.insert( urlStr, list );
@@ -203,7 +203,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
{
kdDebug(7004) << "listDir: Entry not in cache or reloaded: " << _url << endl;
- QPtrList<KDirLister> *list = new QPtrList<KDirLister>;
+ TQPtrList<KDirLister> *list = new TQPtrList<KDirLister>;
list->append( lister );
urlsCurrentlyListed.insert( urlStr, list );
@@ -223,7 +223,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
lister->d->rootFileItem = 0;
KIO::ListJob* job = KIO::listDir( _url, false /* no default GUI */ );
- jobs.insert( job, QValueList<KIO::UDSEntry>() );
+ jobs.insert( job, TQValueList<KIO::UDSEntry>() );
lister->jobStarted( job );
lister->connectJob( job );
@@ -231,12 +231,12 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u,
if ( lister->d->window )
job->setWindow( lister->d->window );
- connect( job, SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList & ) ),
- this, SLOT( slotEntries( KIO::Job *, const KIO::UDSEntryList & ) ) );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotResult( KIO::Job * ) ) );
- connect( job, SIGNAL( redirection( KIO::Job *, const KURL & ) ),
- this, SLOT( slotRedirection( KIO::Job *, const KURL & ) ) );
+ connect( job, TQT_SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList & ) ),
+ this, TQT_SLOT( slotEntries( KIO::Job *, const KIO::UDSEntryList & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( redirection( KIO::Job *, const KURL & ) ),
+ this, TQT_SLOT( slotRedirection( KIO::Job *, const KURL & ) ) );
emit lister->started( _url );
@@ -279,7 +279,7 @@ bool KDirListerCache::validURL( const KDirLister *lister, const KURL& url ) cons
{
if ( lister->d->autoErrorHandling )
{
- QString tmp = i18n("Malformed URL\n%1").arg( url.prettyURL() );
+ TQString tmp = i18n("Malformed URL\n%1").arg( url.prettyURL() );
KMessageBox::error( lister->d->errorParent, tmp );
}
return false;
@@ -290,7 +290,7 @@ bool KDirListerCache::validURL( const KDirLister *lister, const KURL& url ) cons
if ( lister->d->autoErrorHandling )
{
// TODO: this message should be changed during next string unfreeze!
- QString tmp = i18n("Malformed URL\n%1").arg( url.prettyURL() );
+ TQString tmp = i18n("Malformed URL\n%1").arg( url.prettyURL() );
KMessageBox::error( lister->d->errorParent, tmp );
}
return false;
@@ -307,14 +307,14 @@ void KDirListerCache::stop( KDirLister *lister )
kdDebug(7004) << k_funcinfo << "lister: " << lister << endl;
bool stopped = false;
- QDictIterator< QPtrList<KDirLister> > it( urlsCurrentlyListed );
- QPtrList<KDirLister> *listers;
+ TQDictIterator< TQPtrList<KDirLister> > it( urlsCurrentlyListed );
+ TQPtrList<KDirLister> *listers;
while ( (listers = it.current()) )
{
if ( listers->findRef( lister ) > -1 )
{
// lister is listing url
- QString url = it.currentKey();
+ TQString url = it.currentKey();
//kdDebug(7004) << k_funcinfo << " found lister in list - for " << url << endl;
bool ret = listers->removeRef( lister );
@@ -325,10 +325,10 @@ void KDirListerCache::stop( KDirLister *lister )
lister->jobDone( job );
// move lister to urlsCurrentlyHeld
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld[url];
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld[url];
if ( !holders )
{
- holders = new QPtrList<KDirLister>;
+ holders = new TQPtrList<KDirLister>;
urlsCurrentlyHeld.insert( url, holders );
}
@@ -365,21 +365,21 @@ void KDirListerCache::stop( KDirLister *lister )
void KDirListerCache::stop( KDirLister *lister, const KURL& _u )
{
- QString urlStr( _u.url(-1) );
+ TQString urlStr( _u.url(-1) );
KURL _url( urlStr );
// TODO: consider to stop all the "child jobs" of _url as well
kdDebug(7004) << k_funcinfo << lister << " url=" << _url << endl;
- QPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
if ( !listers || !listers->removeRef( lister ) )
return;
// move lister to urlsCurrentlyHeld
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
if ( !holders )
{
- holders = new QPtrList<KDirLister>;
+ holders = new TQPtrList<KDirLister>;
urlsCurrentlyHeld.insert( urlStr, holders );
}
@@ -445,8 +445,8 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not
KURL url( _url );
url.adjustPath( -1 );
- QString urlStr = url.url();
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
+ TQString urlStr = url.url();
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
Q_ASSERT( holders );
holders->removeRef( lister );
@@ -534,7 +534,7 @@ void KDirListerCache::updateDirectory( const KURL& _dir )
{
kdDebug(7004) << k_funcinfo << _dir << endl;
- QString urlStr = _dir.url(-1);
+ TQString urlStr = _dir.url(-1);
if ( !checkUpdate( urlStr ) )
return;
@@ -544,12 +544,12 @@ void KDirListerCache::updateDirectory( const KURL& _dir )
// - update a currently running listing: the listers are in urlsCurrentlyListed
// and urlsCurrentlyHeld
- QPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
// restart the job for _dir if it is running already
bool killed = false;
- QWidget *window = 0;
+ TQWidget *window = 0;
KIO::ListJob *job = jobForUrl( urlStr );
if ( job )
{
@@ -574,12 +574,12 @@ void KDirListerCache::updateDirectory( const KURL& _dir )
Q_ASSERT( !listers || (listers && killed) );
job = KIO::listDir( _dir, false /* no default GUI */ );
- jobs.insert( job, QValueList<KIO::UDSEntry>() );
+ jobs.insert( job, TQValueList<KIO::UDSEntry>() );
- connect( job, SIGNAL(entries( KIO::Job *, const KIO::UDSEntryList & )),
- this, SLOT(slotUpdateEntries( KIO::Job *, const KIO::UDSEntryList & )) );
- connect( job, SIGNAL(result( KIO::Job * )),
- this, SLOT(slotUpdateResult( KIO::Job * )) );
+ connect( job, TQT_SIGNAL(entries( KIO::Job *, const KIO::UDSEntryList & )),
+ this, TQT_SLOT(slotUpdateEntries( KIO::Job *, const KIO::UDSEntryList & )) );
+ connect( job, TQT_SIGNAL(result( KIO::Job * )),
+ this, TQT_SLOT(slotUpdateResult( KIO::Job * )) );
kdDebug(7004) << k_funcinfo << "update started in " << _dir << endl;
@@ -613,7 +613,7 @@ void KDirListerCache::updateDirectory( const KURL& _dir )
}
}
-bool KDirListerCache::checkUpdate( const QString& _dir )
+bool KDirListerCache::checkUpdate( const TQString& _dir )
{
if ( !itemsInUse[_dir] )
{
@@ -636,14 +636,14 @@ bool KDirListerCache::checkUpdate( const QString& _dir )
KFileItemList *KDirListerCache::itemsForDir( const KURL &_dir ) const
{
- QString urlStr = _dir.url(-1);
+ TQString urlStr = _dir.url(-1);
DirItem *item = itemsInUse[ urlStr ];
if ( !item )
item = itemsCached[ urlStr ];
return item ? item->lstItems : 0;
}
-KFileItem *KDirListerCache::findByName( const KDirLister *lister, const QString& _name ) const
+KFileItem *KDirListerCache::findByName( const KDirLister *lister, const TQString& _name ) const
{
Q_ASSERT( lister );
@@ -714,7 +714,7 @@ void KDirListerCache::FilesRemoved( const KURL::List &fileList )
// file items (see the dirtree).
if ( fileitem )
{
- QPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDir.url()];
+ TQPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDir.url()];
if ( listers )
for ( KDirLister *kdl = listers->first(); kdl; kdl = listers->next() )
kdl->emitDeleteItem( fileitem );
@@ -807,8 +807,8 @@ void KDirListerCache::aboutToRefreshItem( KFileItem *fileitem )
// Look whether this item was shown in any view, i.e. held by any dirlister
KURL parentDir( fileitem->url() );
parentDir.setPath( parentDir.directory() );
- QString parentDirURL = parentDir.url();
- QPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDirURL];
+ TQString parentDirURL = parentDir.url();
+ TQPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDirURL];
if ( listers )
for ( KDirLister *kdl = listers->first(); kdl; kdl = listers->next() )
kdl->aboutToRefreshItem( fileitem );
@@ -825,8 +825,8 @@ void KDirListerCache::emitRefreshItem( KFileItem *fileitem )
// Look whether this item was shown in any view, i.e. held by any dirlister
KURL parentDir( fileitem->url() );
parentDir.setPath( parentDir.directory() );
- QString parentDirURL = parentDir.url();
- QPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDirURL];
+ TQString parentDirURL = parentDir.url();
+ TQPtrList<KDirLister> *listers = urlsCurrentlyHeld[parentDirURL];
if ( listers )
for ( KDirLister *kdl = listers->first(); kdl; kdl = listers->next() )
{
@@ -861,7 +861,7 @@ bool KDirListerCache::exists()
// private slots
// _file can also be a directory being currently held!
-void KDirListerCache::slotFileDirty( const QString& _file )
+void KDirListerCache::slotFileDirty( const TQString& _file )
{
kdDebug(7004) << k_funcinfo << _file << endl;
@@ -877,8 +877,8 @@ void KDirListerCache::slotFileDirty( const QString& _file )
if ( checkUpdate( dir.url() ) )
{
// Nice hack to save memory: use the qt object name to store the filename
- QTimer *timer = new QTimer( this, _file.utf8() );
- connect( timer, SIGNAL(timeout()), this, SLOT(slotFileDirtyDelayed()) );
+ TQTimer *timer = new TQTimer( this, _file.utf8() );
+ connect( timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotFileDirtyDelayed()) );
pendingUpdates.insert( _file, timer );
timer->start( 500, true );
}
@@ -888,11 +888,11 @@ void KDirListerCache::slotFileDirty( const QString& _file )
// delayed updating of files, FAM is flooding us with events
void KDirListerCache::slotFileDirtyDelayed()
{
- QString file = QString::fromUtf8( sender()->name() );
+ TQString file = TQString::fromUtf8( sender()->name() );
kdDebug(7004) << k_funcinfo << file << endl;
- // TODO: do it better: don't always create/delete the QTimer but reuse it.
+ // TODO: do it better: don't always create/delete the TQTimer but reuse it.
// Delete the timer after the parent directory is removed from the cache.
pendingUpdates.remove( file );
@@ -908,7 +908,7 @@ void KDirListerCache::slotFileDirtyDelayed()
}
}
-void KDirListerCache::slotFileCreated( const QString& _file )
+void KDirListerCache::slotFileCreated( const TQString& _file )
{
kdDebug(7004) << k_funcinfo << _file << endl;
// XXX: how to avoid a complete rescan here?
@@ -918,7 +918,7 @@ void KDirListerCache::slotFileCreated( const QString& _file )
FilesAdded( u );
}
-void KDirListerCache::slotFileDeleted( const QString& _file )
+void KDirListerCache::slotFileDeleted( const TQString& _file )
{
kdDebug(7004) << k_funcinfo << _file << endl;
KURL u;
@@ -930,14 +930,14 @@ void KDirListerCache::slotEntries( KIO::Job *job, const KIO::UDSEntryList &entri
{
KURL url = joburl( static_cast<KIO::ListJob *>(job) );
url.adjustPath(-1);
- QString urlStr = url.url();
+ TQString urlStr = url.url();
kdDebug(7004) << k_funcinfo << "new entries for " << url << endl;
DirItem *dir = itemsInUse[urlStr];
Q_ASSERT( dir );
- QPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed[urlStr];
Q_ASSERT( listers );
Q_ASSERT( !listers->isEmpty() );
@@ -947,15 +947,15 @@ void KDirListerCache::slotEntries( KIO::Job *job, const KIO::UDSEntryList &entri
delayedMimeTypes = delayedMimeTypes && kdl->d->delayedMimeTypes;
// avoid creating these QStrings again and again
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dot = KGlobal::staticQString(".");
+ static const TQString& dotdot = KGlobal::staticQString("..");
KIO::UDSEntryListConstIterator it = entries.begin();
KIO::UDSEntryListConstIterator end = entries.end();
for ( ; it != end; ++it )
{
- QString name;
+ TQString name;
// find out about the name
KIO::UDSEntry::ConstIterator entit = (*it).begin();
@@ -1004,14 +1004,14 @@ void KDirListerCache::slotResult( KIO::Job *j )
KURL jobUrl = joburl( job );
jobUrl.adjustPath(-1); // need remove trailing slashes again, in case of redirections
- QString jobUrlStr = jobUrl.url();
+ TQString jobUrlStr = jobUrl.url();
kdDebug(7004) << k_funcinfo << "finished listing " << jobUrl << endl;
#ifdef DEBUG_CACHE
printDebug();
#endif
- QPtrList<KDirLister> *listers = urlsCurrentlyListed.take( jobUrlStr );
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed.take( jobUrlStr );
Q_ASSERT( listers );
// move the directory to the held directories, do it before emitting
@@ -1095,7 +1095,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
DirItem *dir = itemsInUse.take( oldUrl.url() );
Q_ASSERT( dir );
- QPtrList<KDirLister> *listers = urlsCurrentlyListed.take( oldUrl.url() );
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed.take( oldUrl.url() );
Q_ASSERT( listers );
Q_ASSERT( !listers->isEmpty() );
@@ -1125,7 +1125,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
// when a lister was stopped before the job emits the redirection signal, the old url will
// also be in urlsCurrentlyHeld
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld.take( oldUrl.url() );
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld.take( oldUrl.url() );
if ( holders )
{
Q_ASSERT( !holders->isEmpty() );
@@ -1175,7 +1175,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
// listers of newUrl with oldJob: forget about the oldJob and use the already running one
// which will be converted to an updateJob
- QPtrList<KDirLister> *curListers = urlsCurrentlyListed[newUrl.url()];
+ TQPtrList<KDirLister> *curListers = urlsCurrentlyListed[newUrl.url()];
if ( curListers )
{
kdDebug(7004) << "slotRedirection: and it is currently listed" << endl;
@@ -1201,7 +1201,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
killJob( oldJob );
// holders of newUrl: use the already running job which will be converted to an updateJob
- QPtrList<KDirLister> *curHolders = urlsCurrentlyHeld[newUrl.url()];
+ TQPtrList<KDirLister> *curHolders = urlsCurrentlyHeld[newUrl.url()];
if ( curHolders )
{
kdDebug(7004) << "slotRedirection: and it is currently held." << endl;
@@ -1301,10 +1301,10 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
// make the job an update job
job->disconnect( this );
- connect( job, SIGNAL(entries( KIO::Job *, const KIO::UDSEntryList & )),
- this, SLOT(slotUpdateEntries( KIO::Job *, const KIO::UDSEntryList & )) );
- connect( job, SIGNAL(result( KIO::Job * )),
- this, SLOT(slotUpdateResult( KIO::Job * )) );
+ connect( job, TQT_SIGNAL(entries( KIO::Job *, const KIO::UDSEntryList & )),
+ this, TQT_SLOT(slotUpdateEntries( KIO::Job *, const KIO::UDSEntryList & )) );
+ connect( job, TQT_SIGNAL(result( KIO::Job * )),
+ this, TQT_SLOT(slotUpdateResult( KIO::Job * )) );
// FIXME: autoUpdate-Counts!!
@@ -1316,15 +1316,15 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url )
void KDirListerCache::renameDir( const KURL &oldUrl, const KURL &newUrl )
{
kdDebug(7004) << k_funcinfo << oldUrl.prettyURL() << " -> " << newUrl.prettyURL() << endl;
- QString oldUrlStr = oldUrl.url(-1);
- QString newUrlStr = newUrl.url(-1);
+ TQString oldUrlStr = oldUrl.url(-1);
+ TQString newUrlStr = newUrl.url(-1);
// Not enough. Also need to look at any child dir, even sub-sub-sub-dir.
//DirItem *dir = itemsInUse.take( oldUrlStr );
//emitRedirections( oldUrl, url );
// Look at all dirs being listed/shown
- QDictIterator<DirItem> itu( itemsInUse );
+ TQDictIterator<DirItem> itu( itemsInUse );
bool goNext;
while ( itu.current() )
{
@@ -1336,7 +1336,7 @@ void KDirListerCache::renameDir( const KURL &oldUrl, const KURL &newUrl )
if ( oldUrl.isParentOf( oldDirUrl ) )
{
// TODO should use KURL::cleanpath like isParentOf does
- QString relPath = oldDirUrl.path().mid( oldUrl.path().length() );
+ TQString relPath = oldDirUrl.path().mid( oldUrl.path().length() );
KURL newDirUrl( newUrl ); // take new base
if ( !relPath.isEmpty() )
@@ -1355,7 +1355,7 @@ void KDirListerCache::renameDir( const KURL &oldUrl, const KURL &newUrl )
for ( ; kit.current(); ++kit )
{
KURL oldItemUrl = (*kit)->url();
- QString oldItemUrlStr( oldItemUrl.url(-1) );
+ TQString oldItemUrlStr( oldItemUrl.url(-1) );
KURL newItemUrl( oldItemUrl );
newItemUrl.setPath( newDirUrl.path() );
newItemUrl.addPath( oldItemUrl.fileName() );
@@ -1378,15 +1378,15 @@ void KDirListerCache::renameDir( const KURL &oldUrl, const KURL &newUrl )
void KDirListerCache::emitRedirections( const KURL &oldUrl, const KURL &url )
{
kdDebug(7004) << k_funcinfo << oldUrl.prettyURL() << " -> " << url.prettyURL() << endl;
- QString oldUrlStr = oldUrl.url(-1);
- QString urlStr = url.url(-1);
+ TQString oldUrlStr = oldUrl.url(-1);
+ TQString urlStr = url.url(-1);
KIO::ListJob *job = jobForUrl( oldUrlStr );
if ( job )
killJob( job );
// Check if we were listing this dir. Need to abort and restart with new name in that case.
- QPtrList<KDirLister> *listers = urlsCurrentlyListed.take( oldUrlStr );
+ TQPtrList<KDirLister> *listers = urlsCurrentlyListed.take( oldUrlStr );
if ( listers )
{
// Tell the world that the job listing the old url is dead.
@@ -1403,7 +1403,7 @@ void KDirListerCache::emitRedirections( const KURL &oldUrl, const KURL &url )
// Check if we are currently displaying this directory (odds opposite wrt above)
// Update urlsCurrentlyHeld dict with new URL
- QPtrList<KDirLister> *holders = urlsCurrentlyHeld.take( oldUrlStr );
+ TQPtrList<KDirLister> *holders = urlsCurrentlyHeld.take( oldUrlStr );
if ( holders )
{
if ( job )
@@ -1440,7 +1440,7 @@ void KDirListerCache::emitRedirections( const KURL &oldUrl, const KURL &url )
void KDirListerCache::removeDirFromCache( const KURL& dir )
{
kdDebug(7004) << "KDirListerCache::removeDirFromCache " << dir.prettyURL() << endl;
- QCacheIterator<DirItem> itc( itemsCached );
+ TQCacheIterator<DirItem> itc( itemsCached );
while ( itc.current() )
{
if ( dir.isParentOf( KURL( itc.currentKey() ) ) )
@@ -1462,14 +1462,14 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j )
KURL jobUrl = joburl( job );
jobUrl.adjustPath(-1); // need remove trailing slashes again, in case of redirections
- QString jobUrlStr = jobUrl.url();
+ TQString jobUrlStr = jobUrl.url();
kdDebug(7004) << k_funcinfo << "finished update " << jobUrl << endl;
KDirLister *kdl;
- QPtrList<KDirLister> *listers = urlsCurrentlyHeld[jobUrlStr];
- QPtrList<KDirLister> *tmpLst = urlsCurrentlyListed.take( jobUrlStr );
+ TQPtrList<KDirLister> *listers = urlsCurrentlyHeld[jobUrlStr];
+ TQPtrList<KDirLister> *tmpLst = urlsCurrentlyListed.take( jobUrlStr );
if ( tmpLst )
{
@@ -1524,7 +1524,7 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j )
delayedMimeTypes = delayedMimeTypes && kdl->d->delayedMimeTypes;
// should be enough to get reasonable speed in most cases
- QDict<KFileItem> fileItems( 9973 );
+ TQDict<KFileItem> fileItems( 9973 );
KFileItemListIterator kit ( *(dir->lstItems) );
@@ -1535,13 +1535,13 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j )
fileItems.insert( (*kit)->url().url(), *kit );
}
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dot = KGlobal::staticQString(".");
+ static const TQString& dotdot = KGlobal::staticQString("..");
KFileItem *item = 0, *tmp;
- QValueList<KIO::UDSEntry> buf = jobs[job];
- QValueListIterator<KIO::UDSEntry> it = buf.begin();
+ TQValueList<KIO::UDSEntry> buf = jobs[job];
+ TQValueListIterator<KIO::UDSEntry> it = buf.begin();
for ( ; it != buf.end(); ++it )
{
// Form the complete url
@@ -1551,7 +1551,7 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j )
item->setUDSEntry( *it, jobUrl, delayedMimeTypes, true );
// Find out about the name
- QString name = item->name();
+ TQString name = item->name();
Q_ASSERT( !name.isEmpty() );
// we duplicate the check for dotdot here, to avoid iterating over
@@ -1637,10 +1637,10 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j )
// private
-KIO::ListJob *KDirListerCache::jobForUrl( const QString& url, KIO::ListJob *not_job )
+KIO::ListJob *KDirListerCache::jobForUrl( const TQString& url, KIO::ListJob *not_job )
{
KIO::ListJob *job;
- QMap< KIO::ListJob *, QValueList<KIO::UDSEntry> >::Iterator it = jobs.begin();
+ TQMap< KIO::ListJob *, TQValueList<KIO::UDSEntry> >::Iterator it = jobs.begin();
while ( it != jobs.end() )
{
job = it.key();
@@ -1666,7 +1666,7 @@ void KDirListerCache::killJob( KIO::ListJob *job )
job->kill();
}
-void KDirListerCache::deleteUnmarkedItems( QPtrList<KDirLister> *listers, KFileItemList *lstItems )
+void KDirListerCache::deleteUnmarkedItems( TQPtrList<KDirLister> *listers, KFileItemList *lstItems )
{
// Find all unmarked items and delete them
KFileItem* item;
@@ -1696,7 +1696,7 @@ void KDirListerCache::deleteDir( const KURL& dirUrl )
// Idea: tell all the KDirListers that they should forget the dir
// and then remove it from the cache.
- QDictIterator<DirItem> itu( itemsInUse );
+ TQDictIterator<DirItem> itu( itemsInUse );
while ( itu.current() )
{
KURL deletedUrl( itu.currentKey() );
@@ -1704,11 +1704,11 @@ void KDirListerCache::deleteDir( const KURL& dirUrl )
{
// stop all jobs for deletedUrl
- QPtrList<KDirLister> *kdls = urlsCurrentlyListed[deletedUrl.url()];
+ TQPtrList<KDirLister> *kdls = urlsCurrentlyListed[deletedUrl.url()];
if ( kdls ) // yeah, I lack good names
{
// we need a copy because stop modifies the list
- kdls = new QPtrList<KDirLister>( *kdls );
+ kdls = new TQPtrList<KDirLister>( *kdls );
for ( KDirLister *kdl = kdls->first(); kdl; kdl = kdls->next() )
stop( kdl, deletedUrl );
@@ -1722,7 +1722,7 @@ void KDirListerCache::deleteDir( const KURL& dirUrl )
if ( kdls )
{
// we need a copy because forgetDirs modifies the list
- kdls = new QPtrList<KDirLister>( *kdls );
+ kdls = new TQPtrList<KDirLister>( *kdls );
for ( KDirLister *kdl = kdls->first(); kdl; kdl = kdls->next() )
{
@@ -1773,46 +1773,46 @@ void KDirListerCache::processPendingUpdates()
void KDirListerCache::printDebug()
{
kdDebug(7004) << "Items in use: " << endl;
- QDictIterator<DirItem> itu( itemsInUse );
+ TQDictIterator<DirItem> itu( itemsInUse );
for ( ; itu.current() ; ++itu ) {
kdDebug(7004) << " " << itu.currentKey() << " URL: " << itu.current()->url
<< " rootItem: " << ( itu.current()->rootItem ? itu.current()->rootItem->url() : KURL() )
<< " autoUpdates refcount: " << itu.current()->autoUpdates
<< " complete: " << itu.current()->complete
- << ( itu.current()->lstItems ? QString(" with %1 items.").arg(itu.current()->lstItems->count()) : QString(" lstItems=NULL") ) << endl;
+ << ( itu.current()->lstItems ? TQString(" with %1 items.").arg(itu.current()->lstItems->count()) : TQString(" lstItems=NULL") ) << endl;
}
kdDebug(7004) << "urlsCurrentlyHeld: " << endl;
- QDictIterator< QPtrList<KDirLister> > it( urlsCurrentlyHeld );
+ TQDictIterator< TQPtrList<KDirLister> > it( urlsCurrentlyHeld );
for ( ; it.current() ; ++it )
{
- QString list;
- for ( QPtrListIterator<KDirLister> listit( *it.current() ); listit.current(); ++listit )
- list += " 0x" + QString::number( (long)listit.current(), 16 );
+ TQString list;
+ for ( TQPtrListIterator<KDirLister> listit( *it.current() ); listit.current(); ++listit )
+ list += " 0x" + TQString::number( (long)listit.current(), 16 );
kdDebug(7004) << " " << it.currentKey() << " " << it.current()->count() << " listers: " << list << endl;
}
kdDebug(7004) << "urlsCurrentlyListed: " << endl;
- QDictIterator< QPtrList<KDirLister> > it2( urlsCurrentlyListed );
+ TQDictIterator< TQPtrList<KDirLister> > it2( urlsCurrentlyListed );
for ( ; it2.current() ; ++it2 )
{
- QString list;
- for ( QPtrListIterator<KDirLister> listit( *it2.current() ); listit.current(); ++listit )
- list += " 0x" + QString::number( (long)listit.current(), 16 );
+ TQString list;
+ for ( TQPtrListIterator<KDirLister> listit( *it2.current() ); listit.current(); ++listit )
+ list += " 0x" + TQString::number( (long)listit.current(), 16 );
kdDebug(7004) << " " << it2.currentKey() << " " << it2.current()->count() << " listers: " << list << endl;
}
- QMap< KIO::ListJob *, QValueList<KIO::UDSEntry> >::Iterator jit = jobs.begin();
+ TQMap< KIO::ListJob *, TQValueList<KIO::UDSEntry> >::Iterator jit = jobs.begin();
kdDebug(7004) << "Jobs: " << endl;
for ( ; jit != jobs.end() ; ++jit )
kdDebug(7004) << " " << jit.key() << " listing " << joburl( jit.key() ).prettyURL() << ": " << (*jit).count() << " entries." << endl;
kdDebug(7004) << "Items in cache: " << endl;
- QCacheIterator<DirItem> itc( itemsCached );
+ TQCacheIterator<DirItem> itc( itemsCached );
for ( ; itc.current() ; ++itc )
kdDebug(7004) << " " << itc.currentKey() << " rootItem: "
- << ( itc.current()->rootItem ? itc.current()->rootItem->url().prettyURL() : QString("NULL") )
- << ( itc.current()->lstItems ? QString(" with %1 items.").arg(itc.current()->lstItems->count()) : QString(" lstItems=NULL") ) << endl;
+ << ( itc.current()->rootItem ? itc.current()->rootItem->url().prettyURL() : TQString("NULL") )
+ << ( itc.current()->lstItems ? TQString(" with %1 items.").arg(itc.current()->lstItems->count()) : TQString(" lstItems=NULL") ) << endl;
}
#endif
@@ -1922,7 +1922,7 @@ bool KDirLister::autoErrorHandlingEnabled() const
return d->autoErrorHandling;
}
-void KDirLister::setAutoErrorHandlingEnabled( bool enable, QWidget* parent )
+void KDirLister::setAutoErrorHandlingEnabled( bool enable, TQWidget* parent )
{
d->autoErrorHandling = enable;
d->errorParent = parent;
@@ -1943,8 +1943,8 @@ void KDirLister::emitChanges()
if ( d->changes == NONE )
return;
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dot = KGlobal::staticQString(".");
+ static const TQString& dotdot = KGlobal::staticQString("..");
for ( KURL::List::Iterator it = d->lstDirs.begin();
it != d->lstDirs.end(); ++it )
@@ -2047,7 +2047,7 @@ KFileItem *KDirLister::findByURL( const KURL& _url ) const
return s_pCache->findByURL( this, _url );
}
-KFileItem *KDirLister::findByName( const QString& _name ) const
+KFileItem *KDirLister::findByName( const TQString& _name ) const
{
return s_pCache->findByName( this, _name );
}
@@ -2062,7 +2062,7 @@ KFileItem *KDirLister::find( const KURL& _url ) const
// ================ public filter methods ================ //
-void KDirLister::setNameFilter( const QString& nameFilter )
+void KDirLister::setNameFilter( const TQString& nameFilter )
{
if ( !(d->changes & NAME_FILTER) )
{
@@ -2076,19 +2076,19 @@ void KDirLister::setNameFilter( const QString& nameFilter )
d->nameFilter = nameFilter;
// Split on white space
- QStringList list = QStringList::split( ' ', nameFilter );
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
- d->lstFilters.append( new QRegExp(*it, false, true ) );
+ TQStringList list = TQStringList::split( ' ', nameFilter );
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ d->lstFilters.append( new TQRegExp(*it, false, true ) );
d->changes |= NAME_FILTER;
}
-const QString& KDirLister::nameFilter() const
+const TQString& KDirLister::nameFilter() const
{
return d->nameFilter;
}
-void KDirLister::setMimeFilter( const QStringList& mimeFilter )
+void KDirLister::setMimeFilter( const TQStringList& mimeFilter )
{
if ( !(d->changes & MIME_FILTER) )
d->oldMimeFilter = d->mimeFilter;
@@ -2102,7 +2102,7 @@ void KDirLister::setMimeFilter( const QStringList& mimeFilter )
d->changes |= MIME_FILTER;
}
-void KDirLister::setMimeExcludeFilter( const QStringList& mimeExcludeFilter )
+void KDirLister::setMimeExcludeFilter( const TQStringList& mimeExcludeFilter )
{
if ( !(d->changes & MIME_FILTER) )
d->oldMimeExcludeFilter = d->mimeExcludeFilter;
@@ -2124,17 +2124,17 @@ void KDirLister::clearMimeFilter()
d->changes |= MIME_FILTER;
}
-const QStringList& KDirLister::mimeFilters() const
+const TQStringList& KDirLister::mimeFilters() const
{
return d->mimeFilter;
}
-bool KDirLister::matchesFilter( const QString& name ) const
+bool KDirLister::matchesFilter( const TQString& name ) const
{
return doNameFilter( name, d->lstFilters );
}
-bool KDirLister::matchesMimeFilter( const QString& mime ) const
+bool KDirLister::matchesMimeFilter( const TQString& mime ) const
{
return doMimeFilter( mime, d->mimeFilter ) && doMimeExcludeFilter(mime,d->mimeExcludeFilter);
}
@@ -2144,7 +2144,7 @@ bool KDirLister::matchesMimeFilter( const QString& mime ) const
bool KDirLister::matchesFilter( const KFileItem *item ) const
{
Q_ASSERT( item );
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dotdot = KGlobal::staticQString("..");
if ( item->text() == dotdot )
return false;
@@ -2167,23 +2167,23 @@ bool KDirLister::matchesMimeFilter( const KFileItem *item ) const
return matchesMimeFilter( item->mimetype() );
}
-bool KDirLister::doNameFilter( const QString& name, const QPtrList<QRegExp>& filters ) const
+bool KDirLister::doNameFilter( const TQString& name, const TQPtrList<TQRegExp>& filters ) const
{
- for ( QPtrListIterator<QRegExp> it( filters ); it.current(); ++it )
+ for ( TQPtrListIterator<TQRegExp> it( filters ); it.current(); ++it )
if ( it.current()->exactMatch( name ) )
return true;
return false;
}
-bool KDirLister::doMimeFilter( const QString& mime, const QStringList& filters ) const
+bool KDirLister::doMimeFilter( const TQString& mime, const TQStringList& filters ) const
{
if ( filters.isEmpty() )
return true;
KMimeType::Ptr mimeptr = KMimeType::mimeType(mime);
//kdDebug(7004) << "doMimeFilter: investigating: "<<mimeptr->name()<<endl;
- QStringList::ConstIterator it = filters.begin();
+ TQStringList::ConstIterator it = filters.begin();
for ( ; it != filters.end(); ++it )
if ( mimeptr->is(*it) )
return true;
@@ -2193,12 +2193,12 @@ bool KDirLister::doMimeFilter( const QString& mime, const QStringList& filters )
return false;
}
-bool KDirLister::doMimeExcludeFilter( const QString& mime, const QStringList& filters ) const
+bool KDirLister::doMimeExcludeFilter( const TQString& mime, const TQStringList& filters ) const
{
if ( filters.isEmpty() )
return true;
- QStringList::ConstIterator it = filters.begin();
+ TQStringList::ConstIterator it = filters.begin();
for ( ; it != filters.end(); ++it )
if ( (*it) == mime )
return false;
@@ -2247,7 +2247,7 @@ void KDirLister::addNewItems( const KFileItemList& items )
// TODO: make this faster - test if we have a filter at all first
// DF: was this profiled? The matchesFoo() functions should be fast, w/o filters...
// Of course if there is no filter and we can do a range-insertion instead of a loop, that might be good.
- // But that's for Qt4, not possible with QPtrList.
+ // But that's for Qt4, not possible with TQPtrList.
for ( KFileItemListIterator kit( items ); kit.current(); ++kit )
addNewItem( *kit );
}
@@ -2346,7 +2346,7 @@ void KDirLister::emitDeleteItem( KFileItem *item )
// ================ private slots ================ //
-void KDirLister::slotInfoMessage( KIO::Job *, const QString& message )
+void KDirLister::slotInfoMessage( KIO::Job *, const TQString& message )
{
emit infoMessage( message );
}
@@ -2359,7 +2359,7 @@ void KDirLister::slotPercent( KIO::Job *job, unsigned long pcnt )
KIO::filesize_t size = 0;
- QMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
+ TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
while ( dataIt != d->jobData.end() )
{
result += (*dataIt).percent * (*dataIt).totalSize;
@@ -2379,7 +2379,7 @@ void KDirLister::slotTotalSize( KIO::Job *job, KIO::filesize_t size )
d->jobData[static_cast<KIO::ListJob *>(job)].totalSize = size;
KIO::filesize_t result = 0;
- QMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
+ TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
while ( dataIt != d->jobData.end() )
{
result += (*dataIt).totalSize;
@@ -2394,7 +2394,7 @@ void KDirLister::slotProcessedSize( KIO::Job *job, KIO::filesize_t size )
d->jobData[static_cast<KIO::ListJob *>(job)].processedSize = size;
KIO::filesize_t result = 0;
- QMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
+ TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
while ( dataIt != d->jobData.end() )
{
result += (*dataIt).processedSize;
@@ -2409,7 +2409,7 @@ void KDirLister::slotSpeed( KIO::Job *job, unsigned long spd )
d->jobData[static_cast<KIO::ListJob *>(job)].speed = spd;
int result = 0;
- QMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
+ TQMap< KIO::ListJob *, KDirListerPrivate::JobData >::Iterator dataIt = d->jobData.begin();
while ( dataIt != d->jobData.end() )
{
result += (*dataIt).speed;
@@ -2443,24 +2443,24 @@ void KDirLister::jobStarted( KIO::ListJob *job )
void KDirLister::connectJob( KIO::ListJob *job )
{
- connect( job, SIGNAL(infoMessage( KIO::Job *, const QString& )),
- this, SLOT(slotInfoMessage( KIO::Job *, const QString& )) );
- connect( job, SIGNAL(percent( KIO::Job *, unsigned long )),
- this, SLOT(slotPercent( KIO::Job *, unsigned long )) );
- connect( job, SIGNAL(totalSize( KIO::Job *, KIO::filesize_t )),
- this, SLOT(slotTotalSize( KIO::Job *, KIO::filesize_t )) );
- connect( job, SIGNAL(processedSize( KIO::Job *, KIO::filesize_t )),
- this, SLOT(slotProcessedSize( KIO::Job *, KIO::filesize_t )) );
- connect( job, SIGNAL(speed( KIO::Job *, unsigned long )),
- this, SLOT(slotSpeed( KIO::Job *, unsigned long )) );
+ connect( job, TQT_SIGNAL(infoMessage( KIO::Job *, const TQString& )),
+ this, TQT_SLOT(slotInfoMessage( KIO::Job *, const TQString& )) );
+ connect( job, TQT_SIGNAL(percent( KIO::Job *, unsigned long )),
+ this, TQT_SLOT(slotPercent( KIO::Job *, unsigned long )) );
+ connect( job, TQT_SIGNAL(totalSize( KIO::Job *, KIO::filesize_t )),
+ this, TQT_SLOT(slotTotalSize( KIO::Job *, KIO::filesize_t )) );
+ connect( job, TQT_SIGNAL(processedSize( KIO::Job *, KIO::filesize_t )),
+ this, TQT_SLOT(slotProcessedSize( KIO::Job *, KIO::filesize_t )) );
+ connect( job, TQT_SIGNAL(speed( KIO::Job *, unsigned long )),
+ this, TQT_SLOT(slotSpeed( KIO::Job *, unsigned long )) );
}
-void KDirLister::setMainWindow( QWidget *window )
+void KDirLister::setMainWindow( TQWidget *window )
{
d->window = window;
}
-QWidget *KDirLister::mainWindow()
+TQWidget *KDirLister::mainWindow()
{
return d->window;
}
diff --git a/kio/kio/kdirlister.h b/kio/kio/kdirlister.h
index 8806cc718..8a0109e89 100644
--- a/kio/kio/kdirlister.h
+++ b/kio/kio/kdirlister.h
@@ -24,8 +24,8 @@
#include "kfileitem.h"
#include "kdirnotify.h"
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
@@ -63,8 +63,8 @@ class KIO_EXPORT KDirLister : public QObject
Q_PROPERTY( bool showingDotFiles READ showingDotFiles WRITE setShowingDotFiles )
Q_PROPERTY( bool dirOnlyMode READ dirOnlyMode WRITE setDirOnlyMode )
Q_PROPERTY( bool autoErrorHandlingEnabled READ autoErrorHandlingEnabled )
- Q_PROPERTY( QString nameFilter READ nameFilter WRITE setNameFilter )
- Q_PROPERTY( QStringList mimeFilter READ mimeFilters WRITE setMimeFilter RESET clearMimeFilter )
+ Q_PROPERTY( TQString nameFilter READ nameFilter WRITE setNameFilter )
+ Q_PROPERTY( TQStringList mimeFilter READ mimeFilters WRITE setMimeFilter RESET clearMimeFilter )
public:
/**
@@ -156,7 +156,7 @@ public:
* top-level
* @see autoErrorHandlingEnabled()
*/
- void setAutoErrorHandlingEnabled( bool enable, QWidget *parent );
+ void setAutoErrorHandlingEnabled( bool enable, TQWidget *parent );
/**
* Checks whether hidden files (files beginning with a dot) will be
@@ -259,7 +259,7 @@ public:
* @param name the item name
* @return the pointer to the KFileItem
*/
- virtual KFileItem *findByName( const QString& name ) const;
+ virtual KFileItem *findByName( const TQString& name ) const;
/**
* Set a name filter to only list items matching this name, e.g. "*.cpp".
@@ -268,17 +268,17 @@ public:
* "*.cpp *.h".
* Note: the direcory is not automatically reloaded.
*
- * @param filter the new filter, QString::null to disable filtering
+ * @param filter the new filter, TQString::null to disable filtering
* @see matchesFilter
*/
- virtual void setNameFilter( const QString &filter );
+ virtual void setNameFilter( const TQString &filter );
/**
* Returns the current name filter, as set via setNameFilter()
- * @return the current name filter, can be QString::null if filtering
+ * @return the current name filter, can be TQString::null if filtering
* is turned off
*/
- const QString& nameFilter() const;
+ const TQString& nameFilter() const;
/**
* Set mime-based filter to only list items matching the given mimetypes.
@@ -291,7 +291,7 @@ public:
* @see clearMimeFilter
* @see matchesMimeFilter
*/
- virtual void setMimeFilter( const QStringList &mimeList );
+ virtual void setMimeFilter( const TQStringList &mimeList );
/**
* Filtering should be done with KFileFilter. This will be implemented in a later
@@ -308,7 +308,7 @@ public:
* @since 3.1
* @internal
*/
- void setMimeExcludeFilter(const QStringList &mimeList );
+ void setMimeExcludeFilter(const TQStringList &mimeList );
/**
@@ -322,7 +322,7 @@ public:
* Returns the list of mime based filters, as set via setMimeFilter().
* @return the list of mime based filters. Empty, when no mime filter is set.
*/
- const QStringList& mimeFilters() const;
+ const TQStringList& mimeFilters() const;
/**
* Checks whether @p name matches a filter in the list of name filters.
@@ -330,7 +330,7 @@ public:
* otherwise false.
* @see setNameFilter
*/
- bool matchesFilter( const QString& name ) const;
+ bool matchesFilter( const TQString& name ) const;
/**
* Checks whether @p mime matches a filter in the list of mime types
@@ -339,7 +339,7 @@ public:
* otherwise false.
* @see setMimeFilter.
*/
- bool matchesMimeFilter( const QString& mime ) const;
+ bool matchesMimeFilter( const TQString& mime ) const;
/**
* Pass the main window this object is associated with
@@ -347,14 +347,14 @@ public:
* @param window the window to associate with, 0 to disassociate
* @since 3.1
*/
- void setMainWindow( QWidget *window );
+ void setMainWindow( TQWidget *window );
/**
* Returns the main window associated with this object.
* @return the associated main window, or 0 if there is none
* @since 3.1
*/
- QWidget *mainWindow();
+ TQWidget *mainWindow();
/**
* Used by items() and itemsForDir() to specify whether you want
@@ -507,7 +507,7 @@ signals:
* Examples of message are "Resolving host", "Connecting to host...", etc.
* @param msg the info message
*/
- void infoMessage( const QString& msg );
+ void infoMessage( const TQString& msg );
/**
* Progress signal showing the overall progress of the KDirLister.
@@ -574,7 +574,7 @@ protected:
* @param name the name to filter
* @param filters a list of regular expressions for filtering
*/
- virtual bool doNameFilter( const QString& name, const QPtrList<QRegExp>& filters ) const;
+ virtual bool doNameFilter( const TQString& name, const TQPtrList<TQRegExp>& filters ) const;
/**
* Called by the public matchesMimeFilter() to do the
@@ -583,12 +583,12 @@ protected:
* @param mime the mime type to filter
* @param filters the list of mime types to filter
*/
- virtual bool doMimeFilter( const QString& mime, const QStringList& filters ) const;
+ virtual bool doMimeFilter( const TQString& mime, const TQStringList& filters ) const;
/**
* @internal
*/
- bool doMimeExcludeFilter( const QString& mimeExclude, const QStringList& filters ) const;
+ bool doMimeExcludeFilter( const TQString& mimeExclude, const TQStringList& filters ) const;
/**
* Checks if an url is malformed or not and displays an error message
@@ -604,7 +604,7 @@ protected:
virtual void virtual_hook( int id, void *data );
private slots:
- void slotInfoMessage( KIO::Job *, const QString& );
+ void slotInfoMessage( KIO::Job *, const TQString& );
void slotPercent( KIO::Job *, unsigned long );
void slotTotalSize( KIO::Job *, KIO::filesize_t );
void slotProcessedSize( KIO::Job *, KIO::filesize_t );
diff --git a/kio/kio/kdirlister_p.h b/kio/kio/kdirlister_p.h
index 1a157e2bf..5d70ce084 100644
--- a/kio/kio/kdirlister_p.h
+++ b/kio/kio/kdirlister_p.h
@@ -22,10 +22,10 @@
#include "kfileitem.h"
-#include <qmap.h>
-#include <qdict.h>
-#include <qcache.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqcache.h>
+#include <tqwidget.h>
#include <kurl.h>
#include <kio/global.h>
@@ -84,7 +84,7 @@ public:
bool dirOnlyMode;
bool autoErrorHandling;
- QWidget *errorParent;
+ TQWidget *errorParent;
bool delayedMimeTypes;
@@ -93,7 +93,7 @@ public:
KIO::filesize_t processedSize, totalSize;
};
- QMap<KIO::ListJob *, JobData> jobData;
+ TQMap<KIO::ListJob *, JobData> jobData;
// file item for the root itself (".")
KFileItem *rootFileItem;
@@ -105,12 +105,12 @@ public:
int changes;
- QWidget *window; // Main window ths lister is associated with
+ TQWidget *window; // Main window ths lister is associated with
- QString nameFilter;
- QPtrList<QRegExp> lstFilters, oldFilters;
- QStringList mimeFilter, oldMimeFilter;
- QStringList mimeExcludeFilter, oldMimeExcludeFilter;
+ TQString nameFilter;
+ TQPtrList<TQRegExp> lstFilters, oldFilters;
+ TQStringList mimeFilter, oldMimeFilter;
+ TQStringList mimeExcludeFilter, oldMimeExcludeFilter;
};
/**
@@ -126,7 +126,7 @@ public:
* a URL -> dirlister holding that URL (urlsCurrentlyHeld)
* a URL -> dirlister currently listing that URL (urlsCurrentlyListed)
*/
-class KDirListerCache : public QObject, KDirNotify
+class KDirListerCache : public TQObject, KDirNotify
{
Q_OBJECT
public:
@@ -150,7 +150,7 @@ public:
KFileItemList *itemsForDir( const KURL &_dir ) const;
- KFileItem *findByName( const KDirLister *lister, const QString &_name ) const;
+ KFileItem *findByName( const KDirLister *lister, const TQString &_name ) const;
// if lister is set, it is checked that the url is held by the lister
KFileItem *findByURL( const KDirLister *lister, const KURL &_url ) const;
@@ -185,9 +185,9 @@ public:
static bool exists();
private slots:
- void slotFileDirty( const QString &_file );
- void slotFileCreated( const QString &_file );
- void slotFileDeleted( const QString &_file );
+ void slotFileDirty( const TQString &_file );
+ void slotFileCreated( const TQString &_file );
+ void slotFileDeleted( const TQString &_file );
void slotFileDirtyDelayed();
@@ -199,18 +199,18 @@ private slots:
void slotUpdateResult( KIO::Job *job );
private:
- KIO::ListJob *jobForUrl( const QString& url, KIO::ListJob *not_job = 0 );
+ KIO::ListJob *jobForUrl( const TQString& url, KIO::ListJob *not_job = 0 );
const KURL& joburl( KIO::ListJob *job );
void killJob( KIO::ListJob *job );
// check if _url is held by some lister and return true,
// otherwise schedule a delayed update and return false
- bool checkUpdate( const QString& _url );
+ bool checkUpdate( const TQString& _url );
// when there were items deleted from the filesystem all the listers holding
// the parent directory need to be notified, the unmarked items have to be deleted
// and removed from the cache including all the childs.
- void deleteUnmarkedItems( QPtrList<KDirLister> *, KFileItemList * );
+ void deleteUnmarkedItems( TQPtrList<KDirLister> *, KFileItemList * );
void processPendingUpdates();
// common for slotRedirection and FileRenamed
void renameDir( const KURL &oldUrl, const KURL &url );
@@ -255,8 +255,8 @@ private:
DCOPClient *client = DCOPClient::mainClient();
if ( !client )
return;
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << url;
client->emitDCOPSignal( "KDirNotify", entering ? "enteredDirectory(KURL)" : "leftDirectory(KURL)", data );
}
@@ -320,11 +320,11 @@ private:
};
static const unsigned short MAX_JOBS_PER_LISTER;
- QMap<KIO::ListJob *, KIO::UDSEntryList> jobs;
+ TQMap<KIO::ListJob *, KIO::UDSEntryList> jobs;
// an item is a complete directory
- QDict<DirItem> itemsInUse;
- QCache<DirItem> itemsCached;
+ TQDict<DirItem> itemsInUse;
+ TQCache<DirItem> itemsCached;
// A lister can be EITHER in urlsCurrentlyListed OR urlsCurrentlyHeld but NOT
// in both at the same time.
@@ -336,13 +336,13 @@ private:
// saves all urls that are currently being listed and maps them
// to their KDirListers
- QDict< QPtrList<KDirLister> > urlsCurrentlyListed;
+ TQDict< TQPtrList<KDirLister> > urlsCurrentlyListed;
// saves all KDirListers that are just holding url
- QDict< QPtrList<KDirLister> > urlsCurrentlyHeld;
+ TQDict< TQPtrList<KDirLister> > urlsCurrentlyHeld;
// running timers for the delayed update
- QDict<QTimer> pendingUpdates;
+ TQDict<TQTimer> pendingUpdates;
static KDirListerCache *s_pSelf;
};
diff --git a/kio/kio/kdirnotify.cpp b/kio/kio/kdirnotify.cpp
index 69b9e11af..fb98196f5 100644
--- a/kio/kio/kdirnotify.cpp
+++ b/kio/kio/kdirnotify.cpp
@@ -23,7 +23,7 @@
int KDirNotify::s_serial = 0;
KDirNotify::KDirNotify()
- : DCOPObject( QCString().sprintf("KDirNotify-%d", ++s_serial) )
+ : DCOPObject( TQCString().sprintf("KDirNotify-%d", ++s_serial) )
{
connectDCOPSignal(0, "KDirNotify", "FilesAdded(KURL)", "FilesAdded(KURL)", false);
connectDCOPSignal(0, "KDirNotify", "FilesRemoved(KURL::List)", "FilesRemoved(KURL::List)", false);
diff --git a/kio/kio/kdirnotify_stub.cpp b/kio/kio/kdirnotify_stub.cpp
index fe160d821..66988d6c9 100644
--- a/kio/kio/kdirnotify_stub.cpp
+++ b/kio/kio/kdirnotify_stub.cpp
@@ -30,12 +30,12 @@
#include <kdatastream.h>
-KDirNotify_stub::KDirNotify_stub( const QCString& app, const QCString& obj )
+KDirNotify_stub::KDirNotify_stub( const TQCString& app, const TQCString& obj )
: DCOPStub( app, obj )
{
}
-KDirNotify_stub::KDirNotify_stub( DCOPClient* client, const QCString& app, const QCString& obj )
+KDirNotify_stub::KDirNotify_stub( DCOPClient* client, const TQCString& app, const TQCString& obj )
: DCOPStub( client, app, obj )
{
}
@@ -51,8 +51,8 @@ void KDirNotify_stub::FilesAdded( const KURL& arg0 )
setStatus( CallFailed );
return;
}
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
dcopClient()->emitDCOPSignal( "KDirNotify", "FilesAdded(KURL)", data );
setStatus( CallSucceeded );
@@ -64,8 +64,8 @@ void KDirNotify_stub::FilesRemoved( const KURL::List& arg0 )
setStatus( CallFailed );
return;
}
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
dcopClient()->emitDCOPSignal( "KDirNotify", "FilesRemoved(KURL::List)", data );
setStatus( CallSucceeded );
@@ -77,8 +77,8 @@ void KDirNotify_stub::FilesChanged( const KURL::List& arg0 )
setStatus( CallFailed );
return;
}
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
dcopClient()->emitDCOPSignal( "KDirNotify", "FilesChanged(KURL::List)", data );
setStatus( CallSucceeded );
@@ -90,8 +90,8 @@ void KDirNotify_stub::FileRenamed( const KURL& arg0, const KURL& arg1 )
setStatus( CallFailed );
return;
}
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
arg << arg1;
dcopClient()->emitDCOPSignal( "KDirNotify", "FileRenamed(KURL,KURL)", data );
diff --git a/kio/kio/kdirnotify_stub.h b/kio/kio/kdirnotify_stub.h
index d73a4134a..a807ecf82 100644
--- a/kio/kio/kdirnotify_stub.h
+++ b/kio/kio/kdirnotify_stub.h
@@ -17,8 +17,8 @@
class KIO_EXPORT KDirNotify_stub : virtual public DCOPStub
{
public:
- KDirNotify_stub( const QCString& app, const QCString& id );
- KDirNotify_stub( DCOPClient* client, const QCString& app, const QCString& id );
+ KDirNotify_stub( const TQCString& app, const TQCString& id );
+ KDirNotify_stub( DCOPClient* client, const TQCString& app, const TQCString& id );
explicit KDirNotify_stub( const DCOPRef& ref );
virtual ASYNC FilesAdded( const KURL& directory );
virtual ASYNC FilesRemoved( const KURL::List& fileList );
diff --git a/kio/kio/kdirwatch.cpp b/kio/kio/kdirwatch.cpp
index aaa807ed6..08ab25b89 100644
--- a/kio/kio/kdirwatch.cpp
+++ b/kio/kio/kdirwatch.cpp
@@ -46,13 +46,13 @@
#include <sys/stat.h>
#include <assert.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qintdict.h>
-#include <qptrlist.h>
-#include <qsocketnotifier.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqintdict.h>
+#include <tqptrlist.h>
+#include <tqsocketnotifier.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -120,7 +120,7 @@ void KDirWatchPrivate::dnotify_handler(int, siginfo_t *si, void *)
Entry* e = dwp_self->fd_Entry.find(si->si_fd);
// kdDebug(7001) << "DNOTIFY Handler: fd " << si->si_fd << " path "
-// << QString(e ? e->path:"unknown") << endl;
+// << TQString(e ? e->path:"unknown") << endl;
if(e && e->dn_fd == si->si_fd)
e->dirty = true;
@@ -177,7 +177,7 @@ void KDirWatchPrivate::dnotify_sigio_handler(int sig, siginfo_t *si, void *p)
* At the moment, the following methods for file watching
* are supported:
* - Polling: All files to be watched are polled regularly
- * using stat (more precise: QFileInfo.lastModified()).
+ * using stat (more precise: TQFileInfo.lastModified()).
* The polling frequency is determined from global kconfig
* settings, defaulting to 500 ms for local directories
* and 5000 ms for remote mounts
@@ -201,32 +201,32 @@ void KDirWatchPrivate::dnotify_sigio_handler(int sig, siginfo_t *si, void *p)
KDirWatchPrivate::KDirWatchPrivate()
: rescan_timer(0, "KDirWatchPrivate::rescan_timer")
{
- timer = new QTimer(this, "KDirWatchPrivate::timer");
- connect (timer, SIGNAL(timeout()), this, SLOT(slotRescan()));
+ timer = new TQTimer(this, "KDirWatchPrivate::timer");
+ connect (timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotRescan()));
freq = 3600000; // 1 hour as upper bound
statEntries = 0;
delayRemove = false;
m_ref = 0;
- KConfigGroup config(KGlobal::config(), QCString("DirWatch"));
+ KConfigGroup config(KGlobal::config(), TQCString("DirWatch"));
m_nfsPollInterval = config.readNumEntry("NFSPollInterval", 5000);
m_PollInterval = config.readNumEntry("PollInterval", 500);
- QString available("Stat");
+ TQString available("Stat");
// used for FAM and DNOTIFY
rescan_all = false;
- connect(&rescan_timer, SIGNAL(timeout()), this, SLOT(slotRescan()));
+ connect(&rescan_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotRescan()));
#ifdef HAVE_FAM
// It's possible that FAM server can't be started
if (FAMOpen(&fc) ==0) {
available += ", FAM";
use_fam=true;
- sn = new QSocketNotifier( FAMCONNECTION_GETFD(&fc),
- QSocketNotifier::Read, this);
- connect( sn, SIGNAL(activated(int)),
- this, SLOT(famEventReceived()) );
+ sn = new TQSocketNotifier( FAMCONNECTION_GETFD(&fc),
+ TQSocketNotifier::Read, this);
+ connect( sn, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(famEventReceived()) );
}
else {
kdDebug(7001) << "Can't use FAM (fam daemon not running?)" << endl;
@@ -261,8 +261,8 @@ KDirWatchPrivate::KDirWatchPrivate()
available += ", Inotify";
fcntl(m_inotify_fd, F_SETFD, FD_CLOEXEC);
- mSn = new QSocketNotifier( m_inotify_fd, QSocketNotifier::Read, this );
- connect( mSn, SIGNAL(activated( int )), this, SLOT( slotActivated() ) );
+ mSn = new TQSocketNotifier( m_inotify_fd, TQSocketNotifier::Read, this );
+ connect( mSn, TQT_SIGNAL(activated( int )), this, TQT_SLOT( slotActivated() ) );
}
#endif
@@ -295,8 +295,8 @@ KDirWatchPrivate::KDirWatchPrivate()
fcntl(mPipe[1], F_SETFD, FD_CLOEXEC);
fcntl(mPipe[0], F_SETFL, O_NONBLOCK | fcntl(mPipe[0], F_GETFL));
fcntl(mPipe[1], F_SETFL, O_NONBLOCK | fcntl(mPipe[1], F_GETFL));
- mSn = new QSocketNotifier( mPipe[0], QSocketNotifier::Read, this);
- connect(mSn, SIGNAL(activated(int)), this, SLOT(slotActivated()));
+ mSn = new TQSocketNotifier( mPipe[0], TQSocketNotifier::Read, this);
+ connect(mSn, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated()));
// Install the signal handler only once
if ( dnotify_signal == 0 )
{
@@ -388,9 +388,9 @@ void KDirWatchPrivate::slotActivated()
pending -= sizeof( struct inotify_event ) + event->len;
offset += sizeof( struct inotify_event ) + event->len;
- QString path;
+ TQString path;
if ( event->len )
- path = QFile::decodeName( QCString( event->name, event->len ) );
+ path = TQFile::decodeName( TQCString( event->name, event->len ) );
if ( path.length() && isNoisyFile( path.latin1() ) )
continue;
@@ -411,9 +411,9 @@ void KDirWatchPrivate::slotActivated()
kdDebug(7001) << "-->got deleteself signal for " << e->path << endl;
e->m_status = NonExistent;
if (e->isDir)
- addEntry(0, QDir::cleanDirPath(e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath(e->path+"/.."), e, true);
else
- addEntry(0, QFileInfo(e->path).dirPath(true), e, true);
+ addEntry(0, TQFileInfo(e->path).dirPath(true), e, true);
}
if ( event->mask & IN_IGNORED ) {
e->wd = 0;
@@ -426,7 +426,7 @@ void KDirWatchPrivate::slotActivated()
if (sub_entry /*&& sub_entry->isDir*/) {
removeEntry(0,e->path, sub_entry);
KDE_struct_stat stat_buf;
- QCString tpath = QFile::encodeName(path);
+ TQCString tpath = TQFile::encodeName(path);
KDE_stat(tpath, &stat_buf);
//sub_entry->isDir = S_ISDIR(stat_buf.st_mode);
@@ -459,7 +459,7 @@ void KDirWatchPrivate::slotActivated()
*/
void KDirWatchPrivate::Entry::propagate_dirty()
{
- for (QPtrListIterator<Entry> sub_entry (m_entries);
+ for (TQPtrListIterator<Entry> sub_entry (m_entries);
sub_entry.current(); ++sub_entry)
{
if (!sub_entry.current()->dirty)
@@ -521,14 +521,14 @@ int KDirWatchPrivate::Entry::clients()
}
-KDirWatchPrivate::Entry* KDirWatchPrivate::entry(const QString& _path)
+KDirWatchPrivate::Entry* KDirWatchPrivate::entry(const TQString& _path)
{
// we only support absolute paths
- if (QDir::isRelativePath(_path)) {
+ if (TQDir::isRelativePath(_path)) {
return 0;
}
- QString path = _path;
+ TQString path = _path;
if ( path.length() > 1 && path.right(1) == "/" )
path.truncate( path.length() - 1 );
@@ -570,10 +570,10 @@ bool KDirWatchPrivate::useFAM(Entry* e)
if (e->isDir) {
if (e->m_status == NonExistent) {
// If the directory does not exist we watch the parent directory
- addEntry(0, QDir::cleanDirPath(e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath(e->path+"/.."), e, true);
}
else {
- int res =FAMMonitorDirectory(&fc, QFile::encodeName(e->path),
+ int res =FAMMonitorDirectory(&fc, TQFile::encodeName(e->path),
&(e->fr), e);
if (res<0) {
e->m_mode = UnknownMode;
@@ -588,10 +588,10 @@ bool KDirWatchPrivate::useFAM(Entry* e)
else {
if (e->m_status == NonExistent) {
// If the file does not exist we watch the directory
- addEntry(0, QFileInfo(e->path).dirPath(true), e, true);
+ addEntry(0, TQFileInfo(e->path).dirPath(true), e, true);
}
else {
- int res = FAMMonitorFile(&fc, QFile::encodeName(e->path),
+ int res = FAMMonitorFile(&fc, TQFile::encodeName(e->path),
&(e->fr), e);
if (res<0) {
e->m_mode = UnknownMode;
@@ -626,7 +626,7 @@ bool KDirWatchPrivate::useDNotify(Entry* e)
if (e->isDir) {
if (e->m_status == Normal) {
- int fd = KDE_open(QFile::encodeName(e->path).data(), O_RDONLY);
+ int fd = KDE_open(TQFile::encodeName(e->path).data(), O_RDONLY);
// Migrate fd to somewhere above 128. Some libraries have
// constructs like:
// fd = socket(...)
@@ -673,13 +673,13 @@ bool KDirWatchPrivate::useDNotify(Entry* e)
<< ") for " << e->path << endl;
}
else { // NotExisting
- addEntry(0, QDir::cleanDirPath(e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath(e->path+"/.."), e, true);
}
}
else { // File
// we always watch the directory (DNOTIFY can't watch files alone)
// this notifies us about changes of files therein
- addEntry(0, QFileInfo(e->path).dirPath(true), e, true);
+ addEntry(0, TQFileInfo(e->path).dirPath(true), e, true);
}
return true;
@@ -708,14 +708,14 @@ bool KDirWatchPrivate::useINotify( Entry* e )
}
if ( ( e->wd = inotify_add_watch( m_inotify_fd,
- QFile::encodeName( e->path ), mask) ) > 0 )
+ TQFile::encodeName( e->path ), mask) ) > 0 )
return true;
if ( e->m_status == NonExistent ) {
if (e->isDir)
- addEntry(0, QDir::cleanDirPath(e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath(e->path+"/.."), e, true);
else
- addEntry(0, QFileInfo(e->path).dirPath(true), e, true);
+ addEntry(0, TQFileInfo(e->path).dirPath(true), e, true);
return true;
}
@@ -753,10 +753,10 @@ bool KDirWatchPrivate::useStat(Entry* e)
* Sometimes, entries are dependant on each other: if <sub_entry> !=0,
* this entry needs another entry to watch himself (when notExistent).
*/
-void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
+void KDirWatchPrivate::addEntry(KDirWatch* instance, const TQString& _path,
Entry* sub_entry, bool isDir)
{
- QString path = _path;
+ TQString path = _path;
if (path.startsWith("/dev/") || (path == "/dev"))
return; // Don't even go there.
@@ -801,7 +801,7 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
mask |= IN_ONLYDIR;
inotify_rm_watch (m_inotify_fd, e->wd);
- e->wd = inotify_add_watch( m_inotify_fd, QFile::encodeName( e->path ), mask);
+ e->wd = inotify_add_watch( m_inotify_fd, TQFile::encodeName( e->path ), mask);
}
}
#endif
@@ -811,7 +811,7 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
(*it).addClient(instance);
kdDebug(7001) << "Added already watched Entry " << path
<< " (now " << (*it).clients() << " clients)"
- << QString(" [%1]").arg(instance->name()) << endl;
+ << TQString(" [%1]").arg(instance->name()) << endl;
}
return;
}
@@ -819,7 +819,7 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
// we have a new path to watch
KDE_struct_stat stat_buf;
- QCString tpath = QFile::encodeName(path);
+ TQCString tpath = TQFile::encodeName(path);
bool exists = (KDE_stat(tpath, &stat_buf) == 0);
Entry newEntry;
@@ -854,8 +854,8 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
kdDebug(7001) << "Added " << (e->isDir ? "Dir ":"File ") << path
<< (e->m_status == NonExistent ? " NotExisting" : "")
- << (sub_entry ? QString(" for %1").arg(sub_entry->path) : QString(""))
- << (instance ? QString(" [%1]").arg(instance->name()) : QString(""))
+ << (sub_entry ? TQString(" for %1").arg(sub_entry->path) : TQString(""))
+ << (instance ? TQString(" [%1]").arg(instance->name()) : TQString(""))
<< endl;
@@ -883,7 +883,7 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const QString& _path,
void KDirWatchPrivate::removeEntry( KDirWatch* instance,
- const QString& _path, Entry* sub_entry )
+ const TQString& _path, Entry* sub_entry )
{
kdDebug(7001) << "KDirWatchPrivate::removeEntry for '" << _path << "' sub_entry: " << sub_entry << endl;
Entry* e = entry(_path);
@@ -920,9 +920,9 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
}
else {
if (e->isDir)
- removeEntry(0, QDir::cleanDirPath(e->path+"/.."), e);
+ removeEntry(0, TQDir::cleanDirPath(e->path+"/.."), e);
else
- removeEntry(0, QFileInfo(e->path).dirPath(true), e);
+ removeEntry(0, TQFileInfo(e->path).dirPath(true), e);
}
}
#endif
@@ -938,9 +938,9 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
}
else {
if (e->isDir)
- removeEntry(0, QDir::cleanDirPath(e->path+"/.."), e);
+ removeEntry(0, TQDir::cleanDirPath(e->path+"/.."), e);
else
- removeEntry(0, QFileInfo(e->path).dirPath(true), e);
+ removeEntry(0, TQFileInfo(e->path).dirPath(true), e);
}
}
#endif
@@ -948,7 +948,7 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
#ifdef HAVE_DNOTIFY
if (e->m_mode == DNotifyMode) {
if (!e->isDir) {
- removeEntry(0, QFileInfo(e->path).dirPath(true), e);
+ removeEntry(0, TQFileInfo(e->path).dirPath(true), e);
}
else { // isDir
// must close the FD.
@@ -964,7 +964,7 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
}
}
else {
- removeEntry(0, QDir::cleanDirPath(e->path+"/.."), e);
+ removeEntry(0, TQDir::cleanDirPath(e->path+"/.."), e);
}
}
}
@@ -979,8 +979,8 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
}
kdDebug(7001) << "Removed " << (e->isDir ? "Dir ":"File ") << e->path
- << (sub_entry ? QString(" for %1").arg(sub_entry->path) : QString(""))
- << (instance ? QString(" [%1]").arg(instance->name()) : QString(""))
+ << (sub_entry ? TQString(" for %1").arg(sub_entry->path) : TQString(""))
+ << (instance ? TQString(" [%1]").arg(instance->name()) : TQString(""))
<< endl;
m_mapEntries.remove( e->path ); // <e> not valid any more
}
@@ -991,7 +991,7 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
*/
void KDirWatchPrivate::removeEntries( KDirWatch* instance )
{
- QPtrList<Entry> list;
+ TQPtrList<Entry> list;
int minfreq = 3600000;
// put all entries where instance is a client in list
@@ -1069,7 +1069,7 @@ bool KDirWatchPrivate::restartEntryScan( KDirWatch* instance, Entry* e,
if (wasWatching == 0) {
if (!notify) {
KDE_struct_stat stat_buf;
- bool exists = (KDE_stat(QFile::encodeName(e->path), &stat_buf) == 0);
+ bool exists = (KDE_stat(TQFile::encodeName(e->path), &stat_buf) == 0);
if (exists) {
e->m_ctime = stat_buf.st_ctime;
e->m_status = Normal;
@@ -1161,7 +1161,7 @@ int KDirWatchPrivate::scanEntry(Entry* e)
}
KDE_struct_stat stat_buf;
- bool exists = (KDE_stat(QFile::encodeName(e->path), &stat_buf) == 0);
+ bool exists = (KDE_stat(TQFile::encodeName(e->path), &stat_buf) == 0);
if (exists) {
if (e->m_status == NonExistent) {
@@ -1201,22 +1201,22 @@ int KDirWatchPrivate::scanEntry(Entry* e)
* and stored pending events. When watching is stopped, the event is
* added to the pending events.
*/
-void KDirWatchPrivate::emitEvent(Entry* e, int event, const QString &fileName)
+void KDirWatchPrivate::emitEvent(Entry* e, int event, const TQString &fileName)
{
- QString path = e->path;
+ TQString path = e->path;
if (!fileName.isEmpty()) {
- if (!QDir::isRelativePath(fileName))
+ if (!TQDir::isRelativePath(fileName))
path = fileName;
else
#ifdef Q_OS_UNIX
path += "/" + fileName;
#elif defined(Q_WS_WIN)
//current drive is passed instead of /
- path += QDir::currentDirPath().left(2) + "/" + fileName;
+ path += TQDir::currentDirPath().left(2) + "/" + fileName;
#endif
}
- QPtrListIterator<Client> cit( e->m_clients );
+ TQPtrListIterator<Client> cit( e->m_clients );
for ( ; cit.current(); ++cit )
{
Client* c = cit.current();
@@ -1282,7 +1282,7 @@ void KDirWatchPrivate::slotRescan()
delayRemove = true;
#if defined(HAVE_DNOTIFY) || defined(HAVE_INOTIFY)
- QPtrList<Entry> dList, cList;
+ TQPtrList<Entry> dList, cList;
#endif
if (rescan_all)
@@ -1354,17 +1354,17 @@ void KDirWatchPrivate::slotRescan()
// Scan parent of deleted directories for new creation
Entry* e;
for(e=dList.first();e;e=dList.next())
- addEntry(0, QDir::cleanDirPath( e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath( e->path+"/.."), e, true);
// Remove watch of parent of new created directories
for(e=cList.first();e;e=cList.next())
- removeEntry(0, QDir::cleanDirPath( e->path+"/.."), e);
+ removeEntry(0, TQDir::cleanDirPath( e->path+"/.."), e);
#endif
if ( timerRunning )
timer->start(freq);
- QTimer::singleShot(0, this, SLOT(slotRemoveDelayed()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotRemoveDelayed()));
}
bool KDirWatchPrivate::isNoisyFile( const char * filename )
@@ -1413,7 +1413,7 @@ void KDirWatchPrivate::famEventReceived()
checkFAMEvent(&fe);
}
- QTimer::singleShot(0, this, SLOT(slotRemoveDelayed()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotRemoveDelayed()));
}
void KDirWatchPrivate::checkFAMEvent(FAMEvent* fe)
@@ -1475,7 +1475,7 @@ void KDirWatchPrivate::checkFAMEvent(FAMEvent* fe)
{
case FAMDeleted:
// file absolute: watched dir
- if (!QDir::isRelativePath(fe->filename))
+ if (!TQDir::isRelativePath(fe->filename))
{
// a watched directory was deleted
@@ -1485,7 +1485,7 @@ void KDirWatchPrivate::checkFAMEvent(FAMEvent* fe)
<< FAMREQUEST_GETREQNUM(&(e->fr))
<< " for " << e->path << endl;
// Scan parent for a new creation
- addEntry(0, QDir::cleanDirPath( e->path+"/.."), e, true);
+ addEntry(0, TQDir::cleanDirPath( e->path+"/.."), e, true);
}
break;
@@ -1495,7 +1495,7 @@ void KDirWatchPrivate::checkFAMEvent(FAMEvent* fe)
for(;sub_entry; sub_entry = e->m_entries.next())
if (sub_entry->path == e->path + "/" + fe->filename) break;
if (sub_entry && sub_entry->isDir) {
- QString path = e->path;
+ TQString path = e->path;
removeEntry(0,e->path,sub_entry); // <e> can be invalid here!!
sub_entry->m_status = Normal;
if (!useFAM(sub_entry))
@@ -1539,7 +1539,7 @@ void KDirWatchPrivate::statistics()
Client* c = e->m_clients.first();
for(;c; c = e->m_clients.next()) {
- QString pending;
+ TQString pending;
if (c->watchingStopped) {
if (c->pending & Deleted) pending += "deleted ";
if (c->pending & Created) pending += "created ";
@@ -1585,14 +1585,14 @@ bool KDirWatch::exists()
return s_pSelf != 0;
}
-KDirWatch::KDirWatch (QObject* parent, const char* name)
- : QObject(parent,name)
+KDirWatch::KDirWatch (TQObject* parent, const char* name)
+ : TQObject(parent,name)
{
if (!name) {
static int nameCounter = 0;
nameCounter++;
- setName(QString("KDirWatch-%1").arg(nameCounter).ascii());
+ setName(TQString("KDirWatch-%1").arg(nameCounter).ascii());
}
if (!dwp_self)
@@ -1616,7 +1616,7 @@ KDirWatch::~KDirWatch()
// TODO: add watchFiles/recursive support
-void KDirWatch::addDir( const QString& _path,
+void KDirWatch::addDir( const TQString& _path,
bool watchFiles, bool recursive)
{
if (watchFiles || recursive) {
@@ -1625,34 +1625,34 @@ void KDirWatch::addDir( const QString& _path,
if (d) d->addEntry(this, _path, 0, true);
}
-void KDirWatch::addFile( const QString& _path )
+void KDirWatch::addFile( const TQString& _path )
{
if (d) d->addEntry(this, _path, 0, false);
}
-QDateTime KDirWatch::ctime( const QString &_path )
+TQDateTime KDirWatch::ctime( const TQString &_path )
{
KDirWatchPrivate::Entry* e = d->entry(_path);
if (!e)
- return QDateTime();
+ return TQDateTime();
- QDateTime result;
+ TQDateTime result;
result.setTime_t(e->m_ctime);
return result;
}
-void KDirWatch::removeDir( const QString& _path )
+void KDirWatch::removeDir( const TQString& _path )
{
if (d) d->removeEntry(this, _path, 0);
}
-void KDirWatch::removeFile( const QString& _path )
+void KDirWatch::removeFile( const TQString& _path )
{
if (d) d->removeEntry(this, _path, 0);
}
-bool KDirWatch::stopDirScan( const QString& _path )
+bool KDirWatch::stopDirScan( const TQString& _path )
{
if (d) {
KDirWatchPrivate::Entry *e = d->entry(_path);
@@ -1661,7 +1661,7 @@ bool KDirWatch::stopDirScan( const QString& _path )
return false;
}
-bool KDirWatch::restartDirScan( const QString& _path )
+bool KDirWatch::restartDirScan( const TQString& _path )
{
if (d) {
KDirWatchPrivate::Entry *e = d->entry(_path);
@@ -1685,7 +1685,7 @@ void KDirWatch::startScan( bool notify, bool skippedToo )
}
-bool KDirWatch::contains( const QString& _path ) const
+bool KDirWatch::contains( const TQString& _path ) const
{
KDirWatchPrivate::Entry* e = d->entry(_path);
if (!e)
@@ -1708,19 +1708,19 @@ void KDirWatch::statistics()
}
-void KDirWatch::setCreated( const QString & _file )
+void KDirWatch::setCreated( const TQString & _file )
{
kdDebug(7001) << name() << " emitting created " << _file << endl;
emit created( _file );
}
-void KDirWatch::setDirty( const QString & _file )
+void KDirWatch::setDirty( const TQString & _file )
{
kdDebug(7001) << name() << " emitting dirty " << _file << endl;
emit dirty( _file );
}
-void KDirWatch::setDeleted( const QString & _file )
+void KDirWatch::setDeleted( const TQString & _file )
{
kdDebug(7001) << name() << " emitting deleted " << _file << endl;
emit deleted( _file );
diff --git a/kio/kio/kdirwatch.h b/kio/kio/kdirwatch.h
index af25ee2e6..36f2737b3 100644
--- a/kio/kio/kdirwatch.h
+++ b/kio/kio/kdirwatch.h
@@ -18,9 +18,9 @@
#ifndef _KDIRWATCH_H
#define _KDIRWATCH_H
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qmap.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
@@ -70,10 +70,10 @@ class KIO_EXPORT KDirWatch : public QObject
*
* Scanning begins immediately when a dir/file watch
* is added.
- * @param parent the parent of the QObject (or 0 for parent-less KDataTools)
- * @param name the name of the QObject, can be 0
+ * @param parent the parent of the TQObject (or 0 for parent-less KDataTools)
+ * @param name the name of the TQObject, can be 0
*/
- KDirWatch (QObject* parent = 0, const char* name = 0);
+ KDirWatch (TQObject* parent = 0, const char* name = 0);
/**
* Destructor.
@@ -96,21 +96,21 @@ class KIO_EXPORT KDirWatch : public QObject
* @param watchFiles if true, the KDirWatch will also watch files - NOT IMPLEMENTED YET
* @param recursive if true, all sub directories are also watched - NOT IMPLEMENTED YET
*/
- void addDir(const QString& path,
+ void addDir(const TQString& path,
bool watchFiles = false, bool recursive = false);
/**
* Adds a file to be watched.
* @param file the file to watch
*/
- void addFile(const QString& file);
+ void addFile(const TQString& file);
/**
* Returns the time the directory/file was last changed.
* @param path the file to check
* @return the date of the last modification
*/
- QDateTime ctime(const QString& path);
+ TQDateTime ctime(const TQString& path);
/**
* Removes a directory from the list of scanned directories.
@@ -118,7 +118,7 @@ class KIO_EXPORT KDirWatch : public QObject
* If specified path is not in the list this does nothing.
* @param path the path of the dir to be removed from the list
*/
- void removeDir(const QString& path);
+ void removeDir(const TQString& path);
/**
* Removes a file from the list of watched files.
@@ -126,7 +126,7 @@ class KIO_EXPORT KDirWatch : public QObject
* If specified path is not in the list this does nothing.
* @param file the file to be removed from the list
*/
- void removeFile(const QString& file);
+ void removeFile(const TQString& file);
/**
* Stops scanning the specified path.
@@ -140,7 +140,7 @@ class KIO_EXPORT KDirWatch : public QObject
* @return true if the @p path is being watched, otherwise false
* @see restartDirScanning()
*/
- bool stopDirScan(const QString& path);
+ bool stopDirScan(const TQString& path);
/**
* Restarts scanning for specified path.
@@ -155,7 +155,7 @@ class KIO_EXPORT KDirWatch : public QObject
* @return true if the @p path is being watched, otherwise false
* @see stopDirScanning()
*/
- bool restartDirScan(const QString& path);
+ bool restartDirScan(const TQString& path);
/**
* Starts scanning of all dirs in list.
@@ -194,7 +194,7 @@ class KIO_EXPORT KDirWatch : public QObject
* @param path the directory to check
* @return true if the directory is being watched
*/
- bool contains( const QString& path ) const;
+ bool contains( const TQString& path ) const;
/**
* Dump statistic information about all KDirWatch instances.
@@ -206,17 +206,17 @@ class KIO_EXPORT KDirWatch : public QObject
* Emits created().
* @param path the path of the file or directory
*/
- void setCreated( const QString &path );
+ void setCreated( const TQString &path );
/**
* Emits dirty().
* @param path the path of the file or directory
*/
- void setDirty( const QString &path );
+ void setDirty( const TQString &path );
/**
* Emits deleted().
* @param path the path of the file or directory
*/
- void setDeleted( const QString &path );
+ void setDeleted( const TQString &path );
enum Method { FAM, DNotify, Stat, INotify };
/**
@@ -262,13 +262,13 @@ class KIO_EXPORT KDirWatch : public QObject
* The new ctime is set before the signal is emitted.
* @param path the path of the file or directory
*/
- void dirty (const QString &path);
+ void dirty (const TQString &path);
/**
* Emitted when a file or directory is created.
* @param path the path of the file or directory
*/
- void created (const QString &path );
+ void created (const TQString &path );
/**
* Emitted when a file or directory is deleted.
@@ -276,7 +276,7 @@ class KIO_EXPORT KDirWatch : public QObject
* The object is still watched for new creation.
* @param path the path of the file or directory
*/
- void deleted (const QString &path );
+ void deleted (const TQString &path );
private:
bool _isStopped;
diff --git a/kio/kio/kdirwatch_p.h b/kio/kio/kdirwatch_p.h
index ec3a4a610..9920b866d 100644
--- a/kio/kio/kdirwatch_p.h
+++ b/kio/kio/kdirwatch_p.h
@@ -47,10 +47,10 @@ public:
entryMode m_mode;
bool isDir;
// instances interested in events
- QPtrList<Client> m_clients;
+ TQPtrList<Client> m_clients;
// nonexistent entries of this directory
- QPtrList<Entry> m_entries;
- QString path;
+ TQPtrList<Entry> m_entries;
+ TQString path;
int msecLeft, freq;
@@ -74,15 +74,15 @@ public:
#endif
};
- typedef QMap<QString,Entry> EntryMap;
+ typedef TQMap<TQString,Entry> EntryMap;
KDirWatchPrivate();
~KDirWatchPrivate();
void resetList (KDirWatch*,bool);
void useFreq(Entry* e, int newFreq);
- void addEntry(KDirWatch*,const QString&, Entry*, bool);
- void removeEntry(KDirWatch*,const QString&, Entry*);
+ void addEntry(KDirWatch*,const TQString&, Entry*, bool);
+ void removeEntry(KDirWatch*,const TQString&, Entry*);
bool stopEntryScan(KDirWatch*, Entry*);
bool restartEntryScan(KDirWatch*, Entry*, bool );
void stopScan(KDirWatch*);
@@ -91,9 +91,9 @@ public:
void removeEntries(KDirWatch*);
void statistics();
- Entry* entry(const QString&);
+ Entry* entry(const TQString&);
int scanEntry(Entry* e);
- void emitEvent(Entry* e, int event, const QString &fileName = QString::null);
+ void emitEvent(Entry* e, int event, const TQString &fileName = TQString::null);
// Memory management - delete when last KDirWatch gets deleted
void ref() { m_ref++; }
@@ -108,7 +108,7 @@ public slots:
void slotRemoveDelayed();
public:
- QTimer *timer;
+ TQTimer *timer;
EntryMap m_mapEntries;
int freq;
@@ -118,13 +118,13 @@ public:
bool useStat(Entry*);
bool delayRemove;
- QPtrList<Entry> removeList;
+ TQPtrList<Entry> removeList;
bool rescan_all;
- QTimer rescan_timer;
+ TQTimer rescan_timer;
#ifdef HAVE_FAM
- QSocketNotifier *sn;
+ TQSocketNotifier *sn;
FAMConnection fc;
bool use_fam;
@@ -133,13 +133,13 @@ public:
#endif
#if defined(HAVE_DNOTIFY) || defined(HAVE_INOTIFY)
- QSocketNotifier *mSn;
+ TQSocketNotifier *mSn;
#endif
#ifdef HAVE_DNOTIFY
bool supports_dnotify;
int mPipe[2];
- QIntDict<Entry> fd_Entry;
+ TQIntDict<Entry> fd_Entry;
static void dnotify_handler(int, siginfo_t *si, void *);
static void dnotify_sigio_handler(int, siginfo_t *si, void *);
diff --git a/kio/kio/kemailsettings.cpp b/kio/kio/kemailsettings.cpp
index 244e4043f..2f1ffe7a0 100644
--- a/kio/kio/kemailsettings.cpp
+++ b/kio/kio/kemailsettings.cpp
@@ -37,25 +37,25 @@ public:
KEMailSettingsPrivate() : m_pConfig( 0 ) {}
~KEMailSettingsPrivate() { delete m_pConfig; }
KConfig *m_pConfig;
- QStringList profiles;
- QString m_sDefaultProfile, m_sCurrentProfile;
+ TQStringList profiles;
+ TQString m_sDefaultProfile, m_sCurrentProfile;
};
-QString KEMailSettings::defaultProfileName() const
+TQString KEMailSettings::defaultProfileName() const
{
return p->m_sDefaultProfile;
}
-QString KEMailSettings::getSetting(KEMailSettings::Setting s)
+TQString KEMailSettings::getSetting(KEMailSettings::Setting s)
{
- p->m_pConfig->setGroup(QString("PROFILE_")+p->m_sCurrentProfile);
+ p->m_pConfig->setGroup(TQString("PROFILE_")+p->m_sCurrentProfile);
switch (s) {
case ClientProgram: {
return p->m_pConfig->readEntry("EmailClient");
break;
}
case ClientTerminal: {
- return ((p->m_pConfig->readBoolEntry("TerminalClient")) ? QString("true") : QString("false") );
+ return ((p->m_pConfig->readBoolEntry("TerminalClient")) ? TQString("true") : TQString("false") );
break;
}
case RealName: {
@@ -95,7 +95,7 @@ QString KEMailSettings::getSetting(KEMailSettings::Setting s)
break;
}
case OutServerTLS: {
- return ((p->m_pConfig->readBoolEntry("OutgoingServerTLS")) ? QString("true") : QString("false") );
+ return ((p->m_pConfig->readBoolEntry("OutgoingServerTLS")) ? TQString("true") : TQString("false") );
break;
}
case InServer: {
@@ -119,15 +119,15 @@ QString KEMailSettings::getSetting(KEMailSettings::Setting s)
break;
}
case InServerTLS: {
- return ((p->m_pConfig->readBoolEntry("IncomingServerTLS")) ? QString("true") : QString("false") );
+ return ((p->m_pConfig->readBoolEntry("IncomingServerTLS")) ? TQString("true") : TQString("false") );
break;
}
};
- return QString::null;
+ return TQString::null;
}
-void KEMailSettings::setSetting(KEMailSettings::Setting s, const QString &v)
+void KEMailSettings::setSetting(KEMailSettings::Setting s, const TQString &v)
{
- p->m_pConfig->setGroup(QString("PROFILE_")+p->m_sCurrentProfile);
+ p->m_pConfig->setGroup(TQString("PROFILE_")+p->m_sCurrentProfile);
switch (s) {
case ClientProgram: {
p->m_pConfig->writePathEntry("EmailClient", v);
@@ -205,7 +205,7 @@ void KEMailSettings::setSetting(KEMailSettings::Setting s, const QString &v)
p->m_pConfig->sync();
}
-void KEMailSettings::setDefault(const QString &s)
+void KEMailSettings::setDefault(const TQString &s)
{
p->m_pConfig->setGroup("Defaults");
p->m_pConfig->writeEntry("Profile", s);
@@ -214,25 +214,25 @@ void KEMailSettings::setDefault(const QString &s)
}
-void KEMailSettings::setProfile (const QString &s)
+void KEMailSettings::setProfile (const TQString &s)
{
- QString groupname="PROFILE_";
+ TQString groupname="PROFILE_";
groupname.append(s);
p->m_sCurrentProfile=s;
if (!p->m_pConfig->hasGroup(groupname)) { // Create a group if it doesn't exist
p->m_pConfig->setGroup(groupname);
- p->m_pConfig->writeEntry("ServerType", QString::null);
+ p->m_pConfig->writeEntry("ServerType", TQString::null);
p->m_pConfig->sync();
p->profiles+=s;
}
}
-QString KEMailSettings::currentProfileName() const
+TQString KEMailSettings::currentProfileName() const
{
return p->m_sCurrentProfile;
}
-QStringList KEMailSettings::profiles() const
+TQStringList KEMailSettings::profiles() const
{
return p->profiles;
}
@@ -240,12 +240,12 @@ QStringList KEMailSettings::profiles() const
KEMailSettings::KEMailSettings()
{
p = new KEMailSettingsPrivate();
- p->m_sCurrentProfile=QString::null;
+ p->m_sCurrentProfile=TQString::null;
p->m_pConfig = new KConfig("emaildefaults");
- QStringList groups = p->m_pConfig->groupList();
- for (QStringList::Iterator it = groups.begin(); it != groups.end(); ++it) {
+ TQStringList groups = p->m_pConfig->groupList();
+ for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it) {
if ( (*it).left(8) == "PROFILE_" )
p->profiles+= (*it).mid(8, (*it).length());
}
@@ -253,7 +253,7 @@ KEMailSettings::KEMailSettings()
p->m_pConfig->setGroup("Defaults");
p->m_sDefaultProfile=p->m_pConfig->readEntry("Profile", i18n("Default"));
if (!p->m_sDefaultProfile.isNull()) {
- if (!p->m_pConfig->hasGroup(QString("PROFILE_")+p->m_sDefaultProfile))
+ if (!p->m_pConfig->hasGroup(TQString("PROFILE_")+p->m_sDefaultProfile))
setDefault(i18n("Default"));
else
setDefault(p->m_sDefaultProfile);
diff --git a/kio/kio/kemailsettings.h b/kio/kio/kemailsettings.h
index a2c53c145..f072fa7f9 100644
--- a/kio/kio/kemailsettings.h
+++ b/kio/kio/kemailsettings.h
@@ -28,8 +28,8 @@
#ifndef _KEMAILSETTINGS_H
#define _KEMAILSETTINGS_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -98,47 +98,47 @@ public:
* List of profiles available.
* @return the list of profiles
**/
- QStringList profiles() const;
+ TQStringList profiles() const;
/**
* Returns the name of the current profile.
* @returns what profile we're currently using
**/
- QString currentProfileName() const;
+ TQString currentProfileName() const;
/**
* Change the current profile.
* @param s the name of the new profile
**/
- void setProfile (const QString &s);
+ void setProfile (const TQString &s);
/**
* Returns the name of the default profile.
- * @returns the name of the one that's currently default QString::null if none
+ * @returns the name of the one that's currently default TQString::null if none
**/
- QString defaultProfileName() const;
+ TQString defaultProfileName() const;
/**
* Sets a new default.
* @param def the new default
**/
- void setDefault(const QString &def);
+ void setDefault(const TQString &def);
/**
* Get one of the predefined "basic" settings.
* @param s the setting to get
- * @return the value of the setting, or QString::null if not
+ * @return the value of the setting, or TQString::null if not
* set
**/
- QString getSetting(KEMailSettings::Setting s);
+ TQString getSetting(KEMailSettings::Setting s);
/**
* Set one of the predefined "basic" settings.
* @param s the setting to set
- * @param v the new value of the setting, or QString::null to
+ * @param v the new value of the setting, or TQString::null to
* unset
**/
- void setSetting(KEMailSettings::Setting s, const QString &v);
+ void setSetting(KEMailSettings::Setting s, const TQString &v);
private:
KEMailSettingsPrivate *p;
diff --git a/kio/kio/kfilefilter.cpp b/kio/kio/kfilefilter.cpp
index e8d01ad2f..05c53c02c 100644
--- a/kio/kio/kfilefilter.cpp
+++ b/kio/kio/kfilefilter.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kfileitem.h>
#include <kglobal.h>
@@ -47,27 +47,27 @@ void KSimpleFileFilter::setFilterSpecials( bool filter )
m_filterSpecials = filter;
}
-void KSimpleFileFilter::setNameFilters( const QString& nameFilters )
+void KSimpleFileFilter::setNameFilters( const TQString& nameFilters )
{
// KDE 3.0 defaults
setNameFilters( nameFilters, false, ' ' );
}
-void KSimpleFileFilter::setNameFilters( const QString& nameFilters,
+void KSimpleFileFilter::setNameFilters( const TQString& nameFilters,
bool caseSensitive,
- const QChar& separator )
+ const TQChar& separator )
{
m_nameFilters.clear();
// Split on white space
- QStringList list = QStringList::split(separator, nameFilters);
+ TQStringList list = TQStringList::split(separator, nameFilters);
- QStringList::ConstIterator it = list.begin();
+ TQStringList::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it )
- m_nameFilters.append(new QRegExp(*it, caseSensitive, true ));
+ m_nameFilters.append(new TQRegExp(*it, caseSensitive, true ));
}
-void KSimpleFileFilter::setMimeFilters( const QStringList& mimeFilters )
+void KSimpleFileFilter::setMimeFilters( const TQStringList& mimeFilters )
{
m_mimeFilters = mimeFilters;
}
@@ -79,10 +79,10 @@ void KSimpleFileFilter::setModeFilter( mode_t mode )
bool KSimpleFileFilter::passesFilter( const KFileItem *item ) const
{
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dot = KGlobal::staticQString(".");
+ static const TQString& dotdot = KGlobal::staticQString("..");
- const QString& name = item->name();
+ const TQString& name = item->name();
if ( m_filterDotFiles && item->isHidden() )
return false;
@@ -98,7 +98,7 @@ bool KSimpleFileFilter::passesFilter( const KFileItem *item ) const
KMimeType::Ptr mime = item->mimeTypePtr();
bool ok = false;
- QStringList::ConstIterator it = m_mimeFilters.begin();
+ TQStringList::ConstIterator it = m_mimeFilters.begin();
for ( ; it != m_mimeFilters.end(); ++it ) {
if ( mime->is(*it) ) { // match!
ok = true;
@@ -112,7 +112,7 @@ bool KSimpleFileFilter::passesFilter( const KFileItem *item ) const
if ( !m_nameFilters.isEmpty() ) {
bool ok = false;
- QPtrListIterator<QRegExp> it( m_nameFilters );
+ TQPtrListIterator<TQRegExp> it( m_nameFilters );
for ( ; it.current(); ++it ) {
if ( it.current()->exactMatch( name ) ) { // match!
ok = true;
diff --git a/kio/kio/kfilefilter.h b/kio/kio/kfilefilter.h
index 5146618cd..a6384fbad 100644
--- a/kio/kio/kfilefilter.h
+++ b/kio/kio/kfilefilter.h
@@ -21,8 +21,8 @@
#ifndef KFILEFILTER_H
#define KFILEFILTER_H
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -105,8 +105,8 @@ public:
* @param separator the separator in the @p nameFilter
* @since 3.1
*/
- void setNameFilters( const QString& nameFilters, bool caseSensitive,
- const QChar& separator = ' ' );
+ void setNameFilters( const TQString& nameFilters, bool caseSensitive,
+ const TQChar& separator = ' ' );
/**
* Sets a list of regular expressions to filter by name.
* The file will only pass if its name matches one of the regular
@@ -114,7 +114,7 @@ public:
* @param nameFilters a list of regular expressions, separated by
* space (' ')
*/
- virtual void setNameFilters( const QString& nameFilters );
+ virtual void setNameFilters( const TQString& nameFilters );
/**
* Sets a list of mime filters. A file can only pass if its
@@ -122,13 +122,13 @@ public:
* @param mimeFilters the list of mime types
* @see setMimeFilter
*/
- virtual void setMimeFilters( const QStringList& mimeFilters );
+ virtual void setMimeFilters( const TQStringList& mimeFilters );
/**
* Returns the list of mime types.
* @return the list of mime types
* @see mimeFilter
*/
- QStringList mimeFilters() const { return m_mimeFilters; }
+ TQStringList mimeFilters() const { return m_mimeFilters; }
/**
* Sets the mode filter. If the @p mode is 0, the filter is
@@ -154,10 +154,10 @@ public:
virtual bool passesFilter( const KFileItem *item ) const;
protected:
- QPtrList<QRegExp> m_nameFilters;
+ TQPtrList<TQRegExp> m_nameFilters;
private:
- QStringList m_mimeFilters;
+ TQStringList m_mimeFilters;
bool m_filterDotFiles :1;
bool m_filterSpecials :1;
mode_t m_modeFilter;
diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp
index d06b9b083..9f89765d2 100644
--- a/kio/kio/kfileitem.cpp
+++ b/kio/kio/kfileitem.cpp
@@ -29,10 +29,10 @@
#include "kfileitem.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qmap.h>
-#include <qstylesheet.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqmap.h>
+#include <tqstylesheet.h>
#include <kdebug.h>
#include <kfilemetainfo.h>
@@ -48,7 +48,7 @@
class KFileItem::KFileItemPrivate {
public:
- QString iconName;
+ TQString iconName;
};
KFileItem::KFileItem( const KIO::UDSEntry& _entry, const KURL& _url,
@@ -87,7 +87,7 @@ KFileItem::KFileItem( mode_t _mode, mode_t _permissions, const KURL& _url, bool
init( _determineMimeTypeOnDemand );
}
-KFileItem::KFileItem( const KURL &url, const QString &mimeType, mode_t mode )
+KFileItem::KFileItem( const KURL &url, const TQString &mimeType, mode_t mode )
: m_url( url ),
m_strName( url.fileName() ),
m_strText( KIO::decodeFileName( m_strName ) ),
@@ -126,7 +126,7 @@ KFileItem::~KFileItem()
void KFileItem::init( bool _determineMimeTypeOnDemand )
{
- m_access = QString::null;
+ m_access = TQString::null;
m_size = (KIO::filesize_t) -1;
// metaInfo = KFileMetaInfo();
for ( int i = 0; i < NumFlags; i++ )
@@ -146,7 +146,7 @@ void KFileItem::init( bool _determineMimeTypeOnDemand )
* This is the reason for the -1
*/
KDE_struct_stat buf;
- QCString path = QFile::encodeName(m_url.path( -1 ));
+ TQCString path = TQFile::encodeName(m_url.path( -1 ));
if ( KDE_lstat( path.data(), &buf ) == 0 )
{
mode = buf.st_mode;
@@ -254,7 +254,7 @@ void KFileItem::readUDSEntry( bool _urlIsDirectory )
}
// avoid creating these QStrings again and again
- static const QString& dot = KGlobal::staticQString(".");
+ static const TQString& dot = KGlobal::staticQString(".");
if ( _urlIsDirectory && !UDS_URL_seen && !m_strName.isEmpty() && m_strName != dot )
m_url.addPath( m_strName );
}
@@ -264,8 +264,8 @@ void KFileItem::refresh()
m_fileMode = KFileItem::Unknown;
m_permissions = KFileItem::Unknown;
m_pMimeType = 0L;
- m_user = QString::null;
- m_group = QString::null;
+ m_user = TQString::null;
+ m_group = TQString::null;
m_metaInfo = KFileMetaInfo();
m_hidden = Auto;
@@ -289,15 +289,15 @@ void KFileItem::setURL( const KURL &url )
setName( url.fileName() );
}
-void KFileItem::setName( const QString& name )
+void KFileItem::setName( const TQString& name )
{
m_strName = name;
m_strText = KIO::decodeFileName( m_strName );
}
-QString KFileItem::linkDest() const
+TQString KFileItem::linkDest() const
{
- if (&m_entry == NULL) return QString::null;
+ if (&m_entry == NULL) return TQString::null;
// Extract it from the KIO::UDSEntry
KIO::UDSEntry::ConstIterator it = m_entry.begin();
@@ -308,17 +308,17 @@ QString KFileItem::linkDest() const
if ( m_bIsLocalURL )
{
char buf[1000];
- int n = readlink( QFile::encodeName(m_url.path( -1 )), buf, sizeof(buf)-1 );
+ int n = readlink( TQFile::encodeName(m_url.path( -1 )), buf, sizeof(buf)-1 );
if ( n != -1 )
{
buf[ n ] = 0;
- return QFile::decodeName( buf );
+ return TQFile::decodeName( buf );
}
}
- return QString::null;
+ return TQString::null;
}
-QString KFileItem::localPath() const
+TQString KFileItem::localPath() const
{
if ( m_bIsLocalURL )
{
@@ -326,7 +326,7 @@ QString KFileItem::localPath() const
}
else
{
- if (&m_entry == NULL) return QString::null;
+ if (&m_entry == NULL) return TQString::null;
// Extract the local path from the KIO::UDSEntry
KIO::UDSEntry::ConstIterator it = m_entry.begin();
@@ -336,7 +336,7 @@ QString KFileItem::localPath() const
return (*it).m_str;
}
- return QString::null;
+ return TQString::null;
}
KIO::filesize_t KFileItem::size(bool &exists) const
@@ -358,7 +358,7 @@ KIO::filesize_t KFileItem::size(bool &exists) const
if ( m_bIsLocalURL )
{
KDE_struct_stat buf;
- if ( KDE_stat( QFile::encodeName(m_url.path( -1 )), &buf ) == 0 )
+ if ( KDE_stat( TQFile::encodeName(m_url.path( -1 )), &buf ) == 0 )
return buf.st_size;
}
exists = false;
@@ -448,7 +448,7 @@ time_t KFileItem::time( unsigned int which, bool &hasTime ) const
if ( m_bIsLocalURL )
{
KDE_struct_stat buf;
- if ( KDE_stat( QFile::encodeName(m_url.path(-1)), &buf ) == 0 )
+ if ( KDE_stat( TQFile::encodeName(m_url.path(-1)), &buf ) == 0 )
{
if(which == KIO::UDS_CREATION_TIME) {
// We can't determine creation time for local files
@@ -468,32 +468,32 @@ time_t KFileItem::time( unsigned int which, bool &hasTime ) const
}
-QString KFileItem::user() const
+TQString KFileItem::user() const
{
if ( m_user.isEmpty() && m_bIsLocalURL )
{
KDE_struct_stat buff;
- if ( KDE_lstat( QFile::encodeName(m_url.path( -1 )), &buff ) == 0) // get uid/gid of the link, if it's a link
+ if ( KDE_lstat( TQFile::encodeName(m_url.path( -1 )), &buff ) == 0) // get uid/gid of the link, if it's a link
{
struct passwd *user = getpwuid( buff.st_uid );
if ( user != 0L )
- m_user = QString::fromLocal8Bit(user->pw_name);
+ m_user = TQString::fromLocal8Bit(user->pw_name);
}
}
return m_user;
}
-QString KFileItem::group() const
+TQString KFileItem::group() const
{
#ifdef Q_OS_UNIX
if (m_group.isEmpty() && m_bIsLocalURL )
{
KDE_struct_stat buff;
- if ( KDE_lstat( QFile::encodeName(m_url.path( -1 )), &buff ) == 0) // get uid/gid of the link, if it's a link
+ if ( KDE_lstat( TQFile::encodeName(m_url.path( -1 )), &buff ) == 0) // get uid/gid of the link, if it's a link
{
struct group *ge = getgrgid( buff.st_gid );
if ( ge != 0L ) {
- m_group = QString::fromLocal8Bit(ge->gr_name);
+ m_group = TQString::fromLocal8Bit(ge->gr_name);
if (m_group.isEmpty())
m_group.sprintf("%d",ge->gr_gid);
} else
@@ -504,7 +504,7 @@ QString KFileItem::group() const
return m_group;
}
-QString KFileItem::mimetype() const
+TQString KFileItem::mimetype() const
{
KFileItem * that = const_cast<KFileItem *>(this);
return that->determineMimeType()->name();
@@ -533,14 +533,14 @@ bool KFileItem::isMimeTypeKnown() const
return m_bMimeTypeKnown && m_guessedMimeType.isEmpty();
}
-QString KFileItem::mimeComment()
+TQString KFileItem::mimeComment()
{
KMimeType::Ptr mType = determineMimeType();
bool isLocalURL;
KURL url = mostLocalURL(isLocalURL);
- QString comment = mType->comment( url, isLocalURL );
+ TQString comment = mType->comment( url, isLocalURL );
//kdDebug() << "finding comment for " << url.url() << " : " << m_pMimeType->name() << endl;
if (!comment.isEmpty())
return comment;
@@ -548,7 +548,7 @@ QString KFileItem::mimeComment()
return mType->name();
}
-QString KFileItem::iconName()
+TQString KFileItem::iconName()
{
if (d && (!d->iconName.isEmpty())) return d->iconName;
@@ -587,14 +587,14 @@ int KFileItem::overlays() const
return _state;
}
-QPixmap KFileItem::pixmap( int _size, int _state ) const
+TQPixmap KFileItem::pixmap( int _size, int _state ) const
{
if (d && (!d->iconName.isEmpty()))
return DesktopIcon(d->iconName,_size,_state);
if ( !m_pMimeType )
{
- static const QString & defaultFolderIcon =
+ static const TQString & defaultFolderIcon =
KGlobal::staticQString(KMimeType::mimeType( "inode/directory" )->KServiceType::icon());
if ( S_ISDIR( m_fileMode ) )
@@ -625,7 +625,7 @@ QPixmap KFileItem::pixmap( int _size, int _state ) const
bool isLocalURL;
KURL url = mostLocalURL(isLocalURL);
- QPixmap p = mime->pixmap( url, KIcon::Desktop, _size, _state );
+ TQPixmap p = mime->pixmap( url, KIcon::Desktop, _size, _state );
//kdDebug() << "finding pixmap for " << url.url() << " : " << mime->name() << endl;
if (p.isNull())
kdWarning() << "Pixmap not found for mimetype " << m_pMimeType->name() << endl;
@@ -637,9 +637,9 @@ bool KFileItem::isReadable() const
{
/*
struct passwd * user = getpwuid( geteuid() );
- bool isMyFile = (QString::fromLocal8Bit(user->pw_name) == m_user);
+ bool isMyFile = (TQString::fromLocal8Bit(user->pw_name) == m_user);
// This gets ugly for the group....
- // Maybe we want a static QString for the user and a static QStringList
+ // Maybe we want a static TQString for the user and a static QStringList
// for the groups... then we need to handle the deletion properly...
*/
@@ -654,7 +654,7 @@ bool KFileItem::isReadable() const
}
// Or if we can't read it [using ::access()] - not network transparent
- if ( m_bIsLocalURL && ::access( QFile::encodeName(m_url.path()), R_OK ) == -1 )
+ if ( m_bIsLocalURL && ::access( TQFile::encodeName(m_url.path()), R_OK ) == -1 )
return false;
return true;
@@ -664,9 +664,9 @@ bool KFileItem::isWritable() const
{
/*
struct passwd * user = getpwuid( geteuid() );
- bool isMyFile = (QString::fromLocal8Bit(user->pw_name) == m_user);
+ bool isMyFile = (TQString::fromLocal8Bit(user->pw_name) == m_user);
// This gets ugly for the group....
- // Maybe we want a static QString for the user and a static QStringList
+ // Maybe we want a static TQString for the user and a static QStringList
// for the groups... then we need to handle the deletion properly...
*/
@@ -677,7 +677,7 @@ bool KFileItem::isWritable() const
}
// Or if we can't read it [using ::access()] - not network transparent
- if ( m_bIsLocalURL && ::access( QFile::encodeName(m_url.path()), W_OK ) == -1 )
+ if ( m_bIsLocalURL && ::access( TQFile::encodeName(m_url.path()), W_OK ) == -1 )
return false;
return true;
@@ -727,20 +727,20 @@ bool KFileItem::acceptsDrops()
return true;
// Executable, shell script ... ?
- if ( ::access( QFile::encodeName(m_url.path()), X_OK ) == 0 )
+ if ( ::access( TQFile::encodeName(m_url.path()), X_OK ) == 0 )
return true;
return false;
}
-QString KFileItem::getStatusBarInfo()
+TQString KFileItem::getStatusBarInfo()
{
- QString text = m_strText;
+ TQString text = m_strText;
if ( m_bLink )
{
- QString comment = determineMimeType()->comment( m_url, m_bIsLocalURL );
- QString tmp;
+ TQString comment = determineMimeType()->comment( m_url, m_bIsLocalURL );
+ TQString tmp;
if ( comment.isEmpty() )
tmp = i18n ( "Symbolic Link" );
else
@@ -755,7 +755,7 @@ QString KFileItem::getStatusBarInfo()
bool hasSize;
KIO::filesize_t sizeValue = size(hasSize);
if(hasSize)
- text += QString(" (%1) ").arg( KIO::convertSize( sizeValue ) );
+ text += TQString(" (%1) ").arg( KIO::convertSize( sizeValue ) );
text += mimeComment();
}
else if ( S_ISDIR ( m_fileMode ) )
@@ -772,10 +772,10 @@ QString KFileItem::getStatusBarInfo()
return text;
}
-QString KFileItem::getToolTipText(int maxcount)
+TQString KFileItem::getToolTipText(int maxcount)
{
- // we can return QString::null if no tool tip should be shown
- QString tip;
+ // we can return TQString::null if no tool tip should be shown
+ TQString tip;
KFileMetaInfo info = metaInfo();
// the font tags are a workaround for the fact that the tool tip gets
@@ -789,7 +789,7 @@ QString KFileItem::getToolTipText(int maxcount)
tip += start + i18n("Name:") + mid + text() + end;
tip += start + i18n("Type:") + mid;
- QString type = QStyleSheet::escape(mimeComment());
+ TQString type = TQStyleSheet::escape(mimeComment());
if ( m_bLink ) {
tip += i18n("Link to %1 (%2)").arg(linkDest(), type) + end;
} else
@@ -802,13 +802,13 @@ QString KFileItem::getToolTipText(int maxcount)
tip += start + i18n("Size:") + mid +
KIO::convertSizeWithBytes(sizeValue) + end;
}
- QString timeStr = timeString( KIO::UDS_MODIFICATION_TIME);
+ TQString timeStr = timeString( KIO::UDS_MODIFICATION_TIME);
if(!timeStr.isEmpty())
tip += start + i18n("Modified:") + mid +
timeStr + end;
#ifndef Q_WS_WIN //TODO: show win32-specific permissions
- QString userStr = user();
- QString groupStr = group();
+ TQString userStr = user();
+ TQString groupStr = group();
if(!userStr.isEmpty() || !groupStr.isEmpty())
tip += start + i18n("Owner:") + mid + userStr + " - " + groupStr + end +
start + i18n("Permissions:") + mid +
@@ -818,16 +818,16 @@ QString KFileItem::getToolTipText(int maxcount)
if (info.isValid() && !info.isEmpty() )
{
tip += "<tr><td colspan=2><center><s>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</s></center></td></tr>";
- QStringList keys = info.preferredKeys();
+ TQStringList keys = info.preferredKeys();
// now the rest
- QStringList::Iterator it = keys.begin();
+ TQStringList::Iterator it = keys.begin();
for (int count = 0; count<maxcount && it!=keys.end() ; ++it)
{
KFileMetaInfoItem item = info.item( *it );
if ( item.isValid() )
{
- QString s = item.string();
+ TQString s = item.string();
if ( ( item.attributes() & KFileMimeTypeInfo::SqueezeText )
&& s.length() > 50) {
s.truncate(47);
@@ -837,9 +837,9 @@ QString KFileItem::getToolTipText(int maxcount)
{
count++;
tip += start +
- QStyleSheet::escape( item.translatedKey() ) + ":" +
+ TQStyleSheet::escape( item.translatedKey() ) + ":" +
mid +
- QStyleSheet::escape( s ) +
+ TQStyleSheet::escape( s ) +
end;
}
@@ -929,11 +929,11 @@ void KFileItem::setUDSEntry( const KIO::UDSEntry& _entry, const KURL& _url,
{
m_entry = _entry;
m_url = _url;
- m_strName = QString::null;
- m_strText = QString::null;
- m_user = QString::null;
- m_group = QString::null;
- m_strLowerCaseName = QString::null;
+ m_strName = TQString::null;
+ m_strText = TQString::null;
+ m_user = TQString::null;
+ m_group = TQString::null;
+ m_strLowerCaseName = TQString::null;
m_pMimeType = 0;
m_fileMode = KFileItem::Unknown;
m_permissions = KFileItem::Unknown;
@@ -942,11 +942,11 @@ void KFileItem::setUDSEntry( const KIO::UDSEntry& _entry, const KURL& _url,
m_bIsLocalURL = _url.isLocalFile();
m_bMimeTypeKnown = false;
m_hidden = Auto;
- m_guessedMimeType = QString::null;
+ m_guessedMimeType = TQString::null;
m_metaInfo = KFileMetaInfo();
if ( d )
- d->iconName = QString::null;
+ d->iconName = TQString::null;
readUDSEntry( _urlIsDirectory );
init( _determineMimeTypeOnDemand );
@@ -957,7 +957,7 @@ void KFileItem::setFileMode( mode_t m )
m_fileMode = m;
}
-void KFileItem::setMimeType( const QString& mimetype )
+void KFileItem::setMimeType( const TQString& mimetype )
{
m_pMimeType = KMimeType::mimeType( mimetype );
}
@@ -972,7 +972,7 @@ void KFileItem::setExtraData( const void *key, void *value )
const void * KFileItem::extraData( const void *key ) const
{
- QMapConstIterator<const void*,void*> it = m_extra.find( key );
+ TQMapConstIterator<const void*,void*> it = m_extra.find( key );
if ( it != m_extra.end() )
return it.data();
return 0L;
@@ -980,7 +980,7 @@ const void * KFileItem::extraData( const void *key ) const
void * KFileItem::extraData( const void *key )
{
- QMapIterator<const void*,void*> it = m_extra.find( key );
+ TQMapIterator<const void*,void*> it = m_extra.find( key );
if ( it != m_extra.end() )
return it.data();
return 0L;
@@ -991,7 +991,7 @@ void KFileItem::removeExtraData( const void *key )
m_extra.remove( key );
}
-QString KFileItem::permissionsString() const
+TQString KFileItem::permissionsString() const
{
if (m_access.isNull())
m_access = parsePermissions( m_permissions );
@@ -999,7 +999,7 @@ QString KFileItem::permissionsString() const
return m_access;
}
-QString KFileItem::parsePermissions(mode_t perm) const
+TQString KFileItem::parsePermissions(mode_t perm) const
{
char p[] = "---------- ";
@@ -1008,44 +1008,44 @@ QString KFileItem::parsePermissions(mode_t perm) const
else if (isLink())
p[0]='l';
- if (perm & QFileInfo::ReadUser)
+ if (perm & TQFileInfo::ReadUser)
p[1]='r';
- if (perm & QFileInfo::WriteUser)
+ if (perm & TQFileInfo::WriteUser)
p[2]='w';
- if ((perm & QFileInfo::ExeUser) && !(perm & S_ISUID)) p[3]='x';
- else if ((perm & QFileInfo::ExeUser) && (perm & S_ISUID)) p[3]='s';
- else if (!(perm & QFileInfo::ExeUser) && (perm & S_ISUID)) p[3]='S';
+ if ((perm & TQFileInfo::ExeUser) && !(perm & S_ISUID)) p[3]='x';
+ else if ((perm & TQFileInfo::ExeUser) && (perm & S_ISUID)) p[3]='s';
+ else if (!(perm & TQFileInfo::ExeUser) && (perm & S_ISUID)) p[3]='S';
- if (perm & QFileInfo::ReadGroup)
+ if (perm & TQFileInfo::ReadGroup)
p[4]='r';
- if (perm & QFileInfo::WriteGroup)
+ if (perm & TQFileInfo::WriteGroup)
p[5]='w';
- if ((perm & QFileInfo::ExeGroup) && !(perm & S_ISGID)) p[6]='x';
- else if ((perm & QFileInfo::ExeGroup) && (perm & S_ISGID)) p[6]='s';
- else if (!(perm & QFileInfo::ExeGroup) && (perm & S_ISGID)) p[6]='S';
+ if ((perm & TQFileInfo::ExeGroup) && !(perm & S_ISGID)) p[6]='x';
+ else if ((perm & TQFileInfo::ExeGroup) && (perm & S_ISGID)) p[6]='s';
+ else if (!(perm & TQFileInfo::ExeGroup) && (perm & S_ISGID)) p[6]='S';
- if (perm & QFileInfo::ReadOther)
+ if (perm & TQFileInfo::ReadOther)
p[7]='r';
- if (perm & QFileInfo::WriteOther)
+ if (perm & TQFileInfo::WriteOther)
p[8]='w';
- if ((perm & QFileInfo::ExeOther) && !(perm & S_ISVTX)) p[9]='x';
- else if ((perm & QFileInfo::ExeOther) && (perm & S_ISVTX)) p[9]='t';
- else if (!(perm & QFileInfo::ExeOther) && (perm & S_ISVTX)) p[9]='T';
+ if ((perm & TQFileInfo::ExeOther) && !(perm & S_ISVTX)) p[9]='x';
+ else if ((perm & TQFileInfo::ExeOther) && (perm & S_ISVTX)) p[9]='t';
+ else if (!(perm & TQFileInfo::ExeOther) && (perm & S_ISVTX)) p[9]='T';
if (hasExtendedACL())
p[10]='+';
- return QString::fromLatin1(p);
+ return TQString::fromLatin1(p);
}
// check if we need to cache this
-QString KFileItem::timeString( unsigned int which ) const
+TQString KFileItem::timeString( unsigned int which ) const
{
bool hasTime;
time_t time_ = time(which, hasTime);
- if(!hasTime) return QString::null;
+ if(!hasTime) return TQString::null;
- QDateTime t;
+ TQDateTime t;
t.setTime_t( time_);
return KGlobal::locale()->formatDateTime( t );
}
@@ -1071,7 +1071,7 @@ const KFileMetaInfo & KFileItem::metaInfo(bool autoget, int) const
KURL KFileItem::mostLocalURL(bool &local) const
{
- QString local_path = localPath();
+ TQString local_path = localPath();
if ( !local_path.isEmpty() )
{
@@ -1090,7 +1090,7 @@ KURL KFileItem::mostLocalURL(bool &local) const
void KFileItem::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-QDataStream & operator<< ( QDataStream & s, const KFileItem & a )
+TQDataStream & operator<< ( TQDataStream & s, const KFileItem & a )
{
// We don't need to save/restore anything that refresh() invalidates,
// since that means we can re-determine those by ourselves.
@@ -1100,7 +1100,7 @@ QDataStream & operator<< ( QDataStream & s, const KFileItem & a )
return s;
}
-QDataStream & operator>> ( QDataStream & s, KFileItem & a )
+TQDataStream & operator>> ( TQDataStream & s, KFileItem & a )
{
s >> a.m_url;
s >> a.m_strName;
diff --git a/kio/kio/kfileitem.h b/kio/kio/kfileitem.h
index dcb674e7e..cf6344669 100644
--- a/kio/kio/kfileitem.h
+++ b/kio/kio/kfileitem.h
@@ -20,10 +20,10 @@
#ifndef __kfileitem_h__
#define __kfileitem_h__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <sys/stat.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kio/global.h>
#include <kurl.h>
#include <kacl.h>
@@ -80,7 +80,7 @@ public:
* @param mimeType the name of the file's mimetype
* @param mode the mode (S_IFDIR...)
*/
- KFileItem( const KURL &url, const QString &mimeType, mode_t mode );
+ KFileItem( const KURL &url, const TQString &mimeType, mode_t mode );
/**
* Copy constructor. Note that extra-data set via setExtraData() is not
@@ -125,7 +125,7 @@ public:
* This method is provided for some special cases like relative paths as names (KFindPart)
* @param name the item's name
*/
- void setName( const QString &name );
+ void setName( const TQString &name );
/**
* Returns the permissions of the file (stat.st_mode containing only permissions).
@@ -137,7 +137,7 @@ public:
* Returns the access permissions for the file as a string.
* @return the access persmission as string
*/
- QString permissionsString() const;
+ TQString permissionsString() const;
/**
* Tells if the file has extended access level information ( Posix ACL )
@@ -170,13 +170,13 @@ public:
* Returns the owner of the file.
* @return the file's owner
*/
- QString user() const;
+ TQString user() const;
/**
* Returns the group of the file.
* @return the file's group
*/
- QString group() const;
+ TQString group() const;
/**
* Returns true if this item represents a link in the UNIX sense of
@@ -222,17 +222,17 @@ public:
/**
* Returns the link destination if isLink() == true.
- * @return the link destination. QString::null if the item is not a link
+ * @return the link destination. TQString::null if the item is not a link
*/
- QString linkDest() const;
+ TQString linkDest() const;
/**
* Returns the local path if isLocalFile() == true or the KIO item has
* a UDS_LOCAL_PATH atom.
- * @return the item local path, or QString::null if not known
+ * @return the item local path, or TQString::null if not known
* @since 3.4
*/
- QString localPath() const;
+ TQString localPath() const;
//FIXME KDE4 deprecate this in favor of size(bool &hasSize)
/**
@@ -270,10 +270,10 @@ public:
* Requests the modification, access or creation time as a string, depending
* on @p which.
* @param which UDS_MODIFICATION_TIME, UDS_ACCESS_TIME or UDS_CREATION_TIME
- * @returns a formatted string of the requested time, QString::null if time is not known
+ * @returns a formatted string of the requested time, TQString::null if time is not known
* @see time
*/
- QString timeString( unsigned int which = KIO::UDS_MODIFICATION_TIME ) const;
+ TQString timeString( unsigned int which = KIO::UDS_MODIFICATION_TIME ) const;
/**
* Returns true if the file is a local file.
@@ -286,7 +286,7 @@ public:
* It's not exactly the filename since some decoding happens ('%2F'->'/').
* @return the text of the file item
*/
- const QString& text() const { return m_strText; }
+ const TQString& text() const { return m_strText; }
/**
* Return the name of the file item (without a path).
@@ -295,7 +295,7 @@ public:
* which is useful to speed up sorting by name, case insensitively.
* @return the file's name
*/
- const QString& name( bool lowerCase = false ) const {
+ const TQString& name( bool lowerCase = false ) const {
if ( !lowerCase )
return m_strName;
else
@@ -310,7 +310,7 @@ public:
* the mimetype first. Equivalent to determineMimeType()->name()
* @return the mime type of the file
*/
- QString mimetype() const;
+ TQString mimetype() const;
/**
* Returns the mimetype of the file item.
@@ -333,14 +333,14 @@ public:
* the mime type itself if none is present.
* @return the mime type description, or the mime type itself
*/
- QString mimeComment();
+ TQString mimeComment();
/**
* Returns the full path name to the icon that represents
* this mime type.
* @return iconName the name of the file's icon
*/
- QString iconName();
+ TQString iconName();
/**
* Returns a pixmap representing the file.
@@ -350,7 +350,7 @@ public:
* KIcon::ActiveState or KIcon::DisabledState.
* @return the pixmap
*/
- QPixmap pixmap( int _size, int _state=0 ) const;
+ TQPixmap pixmap( int _size, int _state=0 ) const;
/**
* Returns the overlays (bitfield of KIcon::*Overlay flags) that are used
@@ -365,7 +365,7 @@ public:
* e.g. when the mouse is over this item
* @return the status bar information
*/
- QString getStatusBarInfo();
+ TQString getStatusBarInfo();
/**
* Returns the string to be displayed in the tool tip when the mouse
@@ -375,7 +375,7 @@ public:
* @param maxcount the maximum number of entries shown
* @return the tool tip string
*/
- QString getToolTipText(int maxcount = 6);
+ TQString getToolTipText(int maxcount = 6);
/**
* Returns true if files can be dropped over this item.
@@ -431,7 +431,7 @@ public:
* separately.
*
* I.e. a KFileIconView that associates a KFileIconViewItem (an item suitable
- * for use with QIconView) does
+ * for use with TQIconView) does
*
* \code
* kfileItem->setExtraData( this, iconViewItem );
@@ -444,7 +444,7 @@ public:
* \endcode
*
* This is usually more efficient then having every view associate data to
- * items by using a separate QDict or QMap.
+ * items by using a separate TQDict or TQMap.
*
* Note: you have to remove and destroy the data you associated yourself
* when you don't need it anymore!
@@ -500,7 +500,7 @@ public:
* @param mimetype the new mimetype
* @since 3.5.0
*/
- void setMimeType( const QString& mimetype );
+ void setMimeType( const TQString& mimetype );
/**
* Returns the metainfo of this item.
@@ -570,7 +570,7 @@ protected:
/**
* Parses the given permission set and provides it for access()
*/
- QString parsePermissions( mode_t perm ) const;
+ TQString parsePermissions( mode_t perm ) const;
private:
/**
@@ -585,23 +585,23 @@ private:
/**
* The text for this item, i.e. the file name without path,
*/
- QString m_strName;
+ TQString m_strName;
/**
* The text for this item, i.e. the file name without path, decoded
* ('%%' becomes '%', '%2F' becomes '/')
*/
- QString m_strText;
+ TQString m_strText;
/**
* the user and group assigned to the file.
*/
- mutable QString m_user, m_group;
+ mutable TQString m_user, m_group;
/**
* The filename in lower case (to speed up sorting)
*/
- mutable QString m_strLowerCaseName;
+ mutable TQString m_strLowerCaseName;
/**
* The mimetype of the file
@@ -636,9 +636,9 @@ private:
enum { Auto, Hidden, Shown } m_hidden:3;
// For special case like link to dirs over FTP
- QString m_guessedMimeType;
- mutable QString m_access;
- QMap<const void*, void*> m_extra;
+ TQString m_guessedMimeType;
+ mutable TQString m_access;
+ TQMap<const void*, void*> m_extra;
mutable KFileMetaInfo m_metaInfo;
enum { Modification = 0, Access = 1, Creation = 2, NumFlags = 3 };
@@ -650,22 +650,22 @@ protected:
private:
class KFileItemPrivate;
KFileItemPrivate * d;
- KIO_EXPORT friend QDataStream & operator<< ( QDataStream & s, const KFileItem & a );
- KIO_EXPORT friend QDataStream & operator>> ( QDataStream & s, KFileItem & a );
+ KIO_EXPORT friend TQDataStream & operator<< ( TQDataStream & s, const KFileItem & a );
+ KIO_EXPORT friend TQDataStream & operator>> ( TQDataStream & s, KFileItem & a );
};
/**
* List of KFileItems
*/
-typedef QPtrList<KFileItem> KFileItemList;
+typedef TQPtrList<KFileItem> KFileItemList;
/**
* Iterator for KFileItemList
*/
-typedef QPtrListIterator<KFileItem> KFileItemListIterator;
+typedef TQPtrListIterator<KFileItem> KFileItemListIterator;
-KIO_EXPORT QDataStream & operator<< ( QDataStream & s, const KFileItem & a );
-KIO_EXPORT QDataStream & operator>> ( QDataStream & s, KFileItem & a );
+KIO_EXPORT TQDataStream & operator<< ( TQDataStream & s, const KFileItem & a );
+KIO_EXPORT TQDataStream & operator>> ( TQDataStream & s, KFileItem & a );
#endif
diff --git a/kio/kio/kfilemetainfo.cpp b/kio/kio/kfilemetainfo.cpp
index b47b06e99..fcab35f19 100644
--- a/kio/kio/kfilemetainfo.cpp
+++ b/kio/kio/kfilemetainfo.cpp
@@ -22,8 +22,8 @@
#include <assert.h>
-#include <qshared.h>
-#include <qdict.h>
+#include <tqshared.h>
+#include <tqdict.h>
#include <ktrader.h>
#include <kstaticdeleter.h>
@@ -41,8 +41,8 @@
class KFileMetaInfoItem::Data : public QShared
{
public:
- Data( const KFileMimeTypeInfo::ItemInfo* mti, const QString& _key,
- const QVariant& _value )
+ Data( const KFileMimeTypeInfo::ItemInfo* mti, const TQString& _key,
+ const TQVariant& _value )
: QShared(),
mimeTypeInfo( mti ),
key( _key ),
@@ -64,8 +64,8 @@ public:
const KFileMimeTypeInfo::ItemInfo* mimeTypeInfo;
// mimeTypeInfo has the key, too, but only for non-variable ones
- QString key;
- QVariant value;
+ TQString key;
+ TQVariant value;
bool dirty :1;
bool added :1;
bool removed :1;
@@ -87,14 +87,14 @@ KFileMetaInfoItem::Data* KFileMetaInfoItem::Data::makeNull()
// where the d-pointer is compared against null.
KFileMimeTypeInfo::ItemInfo* info = new KFileMimeTypeInfo::ItemInfo();
- null = new Data(info, QString::null, QVariant());
+ null = new Data(info, TQString::null, TQVariant());
sd_KFileMetaInfoItemData.setObject( null );
}
return null;
}
KFileMetaInfoItem::KFileMetaInfoItem( const KFileMimeTypeInfo::ItemInfo* mti,
- const QString& key, const QVariant& value )
+ const TQString& key, const TQVariant& value )
: d( new Data( mti, key, value ) )
{
}
@@ -131,7 +131,7 @@ const KFileMetaInfoItem& KFileMetaInfoItem::operator=
return *this;
}
-bool KFileMetaInfoItem::setValue( const QVariant& value )
+bool KFileMetaInfoItem::setValue( const TQVariant& value )
{
// We don't call makeNull here since it isn't necassery, see deref()
if ( d == Data::null ) return false;
@@ -150,8 +150,8 @@ bool KFileMetaInfoItem::setValue( const QVariant& value )
d->dirty = true;
d->value = value;
- // If we don't cast (and test for canCast in the above if), QVariant is
- // very picky about types (e.g. QString vs. QCString or int vs. uint)
+ // If we don't cast (and test for canCast in the above if), TQVariant is
+ // very picky about types (e.g. TQString vs. TQCString or int vs. uint)
d->value.cast(d->mimeTypeInfo->type());
return true;
@@ -162,12 +162,12 @@ bool KFileMetaInfoItem::isRemoved() const
return d->removed;
}
-QString KFileMetaInfoItem::key() const
+TQString KFileMetaInfoItem::key() const
{
return d->key;
}
-QString KFileMetaInfoItem::translatedKey() const
+TQString KFileMetaInfoItem::translatedKey() const
{
// are we a variable key?
if (d->mimeTypeInfo->key().isNull())
@@ -179,17 +179,17 @@ QString KFileMetaInfoItem::translatedKey() const
return d->mimeTypeInfo->translatedKey();
}
-const QVariant& KFileMetaInfoItem::value() const
+const TQVariant& KFileMetaInfoItem::value() const
{
return d->value;
}
-QString KFileMetaInfoItem::string( bool mangle ) const
+TQString KFileMetaInfoItem::string( bool mangle ) const
{
return d->mimeTypeInfo->string(d->value, mangle);
}
-QVariant::Type KFileMetaInfoItem::type() const
+TQVariant::Type KFileMetaInfoItem::type() const
{
return d->mimeTypeInfo->type();
}
@@ -204,12 +204,12 @@ bool KFileMetaInfoItem::isModified() const
return d->dirty;
}
-QString KFileMetaInfoItem::prefix() const
+TQString KFileMetaInfoItem::prefix() const
{
return d->mimeTypeInfo->prefix();
}
-QString KFileMetaInfoItem::suffix() const
+TQString KFileMetaInfoItem::suffix() const
{
return d->mimeTypeInfo->suffix();
}
@@ -285,16 +285,16 @@ public:
KURL url;
uint what;
- QMap<QString, KFileMetaInfoGroup> groups;
+ TQMap<TQString, KFileMetaInfoGroup> groups;
const KFileMimeTypeInfo* mimeTypeInfo;
- QStringList removedGroups;
+ TQStringList removedGroups;
static Data* null;
static Data* makeNull();
};
-KFileMetaInfo::KFileMetaInfo( const QString& path, const QString& mimeType,
+KFileMetaInfo::KFileMetaInfo( const TQString& path, const TQString& mimeType,
uint what )
{
KURL u;
@@ -303,18 +303,18 @@ KFileMetaInfo::KFileMetaInfo( const QString& path, const QString& mimeType,
init(u, mimeType, what);
}
-KFileMetaInfo::KFileMetaInfo( const KURL& url, const QString& mimeType,
+KFileMetaInfo::KFileMetaInfo( const KURL& url, const TQString& mimeType,
uint what )
{
init(url, mimeType, what);
}
-void KFileMetaInfo::init( const KURL& url, const QString& mimeType,
+void KFileMetaInfo::init( const KURL& url, const TQString& mimeType,
uint what )
{
d = new Data( url, what );
- QString mT;
+ TQString mT;
if (mimeType.isEmpty())
mT = KMimeType::findByURL(url)->name();
else
@@ -362,33 +362,33 @@ KFileMetaInfo::~KFileMetaInfo()
deref();
}
-QStringList KFileMetaInfo::supportedGroups() const
+TQStringList KFileMetaInfo::supportedGroups() const
{
assert(isValid());
return d->mimeTypeInfo->supportedGroups();
}
-QStringList KFileMetaInfo::supportedKeys() const
+TQStringList KFileMetaInfo::supportedKeys() const
{
assert(isValid());
return d->mimeTypeInfo->supportedKeys();
}
-QStringList KFileMetaInfo::groups() const
+TQStringList KFileMetaInfo::groups() const
{
- QStringList list;
- QMapConstIterator<QString, KFileMetaInfoGroup> it = d->groups.begin();
+ TQStringList list;
+ TQMapConstIterator<TQString, KFileMetaInfoGroup> it = d->groups.begin();
for ( ; it != d->groups.end(); ++it )
list += (*it).name();
return list;
}
-QStringList KFileMetaInfo::editableGroups() const
+TQStringList KFileMetaInfo::editableGroups() const
{
- QStringList list;
- QStringList supported = supportedGroups();
- QStringList::ConstIterator it = supported.begin();
+ TQStringList list;
+ TQStringList supported = supportedGroups();
+ TQStringList::ConstIterator it = supported.begin();
for ( ; it != supported.end(); ++it ) {
const KFileMimeTypeInfo::GroupInfo * groupInfo = d->mimeTypeInfo->groupInfo( *it );
if ( groupInfo && groupInfo->attributes() &
@@ -399,18 +399,18 @@ QStringList KFileMetaInfo::editableGroups() const
return list;
}
-QStringList KFileMetaInfo::preferredGroups() const
+TQStringList KFileMetaInfo::preferredGroups() const
{
assert(isValid());
- QStringList list = groups();
- QStringList newlist;
- QStringList preferred = d->mimeTypeInfo->preferredGroups();
- QStringList::Iterator pref;
+ TQStringList list = groups();
+ TQStringList newlist;
+ TQStringList preferred = d->mimeTypeInfo->preferredGroups();
+ TQStringList::Iterator pref;
// move all keys from the preferred groups that are in our list to a new list
for ( pref = preferred.begin(); pref != preferred.end(); ++pref )
{
- QStringList::Iterator group = list.find(*pref);
+ TQStringList::Iterator group = list.find(*pref);
if ( group != list.end() )
{
newlist.append( *group );
@@ -425,12 +425,12 @@ QStringList KFileMetaInfo::preferredGroups() const
return newlist;
}
-QStringList KFileMetaInfo::preferredKeys() const
+TQStringList KFileMetaInfo::preferredKeys() const
{
- QStringList newlist;
+ TQStringList newlist;
- QStringList list = preferredGroups();
- for (QStringList::Iterator git = list.begin(); git != list.end(); ++git)
+ TQStringList list = preferredGroups();
+ for (TQStringList::Iterator git = list.begin(); git != list.end(); ++git)
{
newlist += d->groups[*git].preferredKeys();
}
@@ -438,16 +438,16 @@ QStringList KFileMetaInfo::preferredKeys() const
return newlist;
}
-KFileMetaInfoGroup KFileMetaInfo::group(const QString& key) const
+KFileMetaInfoGroup KFileMetaInfo::group(const TQString& key) const
{
- QMapIterator<QString,KFileMetaInfoGroup> it = d->groups.find( key );
+ TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.find( key );
if ( it != d->groups.end() )
return it.data();
else
return KFileMetaInfoGroup();
}
-bool KFileMetaInfo::addGroup( const QString& name )
+bool KFileMetaInfo::addGroup( const TQString& name )
{
assert(isValid());
if ( d->mimeTypeInfo->supportedGroups().contains(name) &&
@@ -460,8 +460,8 @@ bool KFileMetaInfo::addGroup( const QString& name )
Q_ASSERT(ginfo);
if (!ginfo) return false;
- QStringList keys = ginfo->supportedKeys();
- for (QStringList::Iterator it = keys.begin(); it != keys.end(); ++it)
+ TQStringList keys = ginfo->supportedKeys();
+ for (TQStringList::Iterator it = keys.begin(); it != keys.end(); ++it)
{
const KFileMimeTypeInfo::ItemInfo* iteminfo = ginfo->itemInfo(*it);
Q_ASSERT(ginfo);
@@ -471,7 +471,7 @@ bool KFileMetaInfo::addGroup( const QString& name )
(iteminfo->attributes() & KFileMimeTypeInfo::Modifiable))
{
// append it now or never
- group.appendItem(iteminfo->key(), QVariant());
+ group.appendItem(iteminfo->key(), TQVariant());
}
}
@@ -484,9 +484,9 @@ bool KFileMetaInfo::addGroup( const QString& name )
return false;
}
-bool KFileMetaInfo::removeGroup( const QString& name )
+bool KFileMetaInfo::removeGroup( const TQString& name )
{
- QMapIterator<QString, KFileMetaInfoGroup> it = d->groups.find(name);
+ TQMapIterator<TQString, KFileMetaInfoGroup> it = d->groups.find(name);
if ( (it==d->groups.end()) ||
!((*it).attributes() & KFileMimeTypeInfo::Removable))
return false;
@@ -496,7 +496,7 @@ bool KFileMetaInfo::removeGroup( const QString& name )
return true;
}
-QStringList KFileMetaInfo::removedGroups()
+TQStringList KFileMetaInfo::removedGroups()
{
return d->removedGroups;
}
@@ -522,7 +522,7 @@ bool KFileMetaInfo::isValid() const
bool KFileMetaInfo::isEmpty() const
{
- for (QMapIterator<QString, KFileMetaInfoGroup> it = d->groups.begin();
+ for (TQMapIterator<TQString, KFileMetaInfoGroup> it = d->groups.begin();
it!=d->groups.end(); ++it)
if (!(*it).isEmpty())
return false;
@@ -534,14 +534,14 @@ bool KFileMetaInfo::applyChanges()
return applyChanges( path() );
}
-bool KFileMetaInfo::applyChanges( const QString& path )
+bool KFileMetaInfo::applyChanges( const TQString& path )
{
bool doit = false;
// kdDebug(7033) << "KFileMetaInfo::applyChanges()\n";
// look up if we need to write to the file
- QMapConstIterator<QString, KFileMetaInfoGroup> it;
+ TQMapConstIterator<TQString, KFileMetaInfoGroup> it;
for (it = d->groups.begin(); it!=d->groups.end() && !doit; ++it)
{
if ( (*it).isModified() )
@@ -549,8 +549,8 @@ bool KFileMetaInfo::applyChanges( const QString& path )
else
{
- QStringList keys = it.data().keys();
- for (QStringList::Iterator it2 = keys.begin(); it2!=keys.end(); ++it2)
+ TQStringList keys = it.data().keys();
+ for (TQStringList::Iterator it2 = keys.begin(); it2!=keys.end(); ++it2)
{
if ( (*it)[*it2].isModified() )
{
@@ -589,16 +589,16 @@ KFilePlugin * const KFileMetaInfo::plugin() const
return prov->plugin( d->mimeTypeInfo->mimeType(), d->url.protocol() );
}
-QString KFileMetaInfo::mimeType() const
+TQString KFileMetaInfo::mimeType() const
{
assert(isValid());
return d->mimeTypeInfo->mimeType();
}
-bool KFileMetaInfo::contains(const QString& key) const
+bool KFileMetaInfo::contains(const TQString& key) const
{
- QStringList glist = groups();
- for (QStringList::Iterator it = glist.begin(); it != glist.end(); ++it)
+ TQStringList glist = groups();
+ for (TQStringList::Iterator it = glist.begin(); it != glist.end(); ++it)
{
KFileMetaInfoGroup g = d->groups[*it];
if (g.contains(key)) return true;
@@ -606,15 +606,15 @@ bool KFileMetaInfo::contains(const QString& key) const
return false;
}
-bool KFileMetaInfo::containsGroup(const QString& key) const
+bool KFileMetaInfo::containsGroup(const TQString& key) const
{
return groups().contains(key);
}
-KFileMetaInfoItem KFileMetaInfo::item( const QString& key) const
+KFileMetaInfoItem KFileMetaInfo::item( const TQString& key) const
{
- QStringList groups = preferredGroups();
- for (QStringList::Iterator it = groups.begin(); it != groups.end(); ++it)
+ TQStringList groups = preferredGroups();
+ for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it)
{
KFileMetaInfoItem i = d->groups[*it][key];
if (i.isValid()) return i;
@@ -624,8 +624,8 @@ KFileMetaInfoItem KFileMetaInfo::item( const QString& key) const
KFileMetaInfoItem KFileMetaInfo::item(const KFileMetaInfoItem::Hint hint) const
{
- QStringList groups = preferredGroups();
- QStringList::ConstIterator it;
+ TQStringList groups = preferredGroups();
+ TQStringList::ConstIterator it;
for (it = groups.begin(); it != groups.end(); ++it)
{
KFileMetaInfoItem i = d->groups[*it].item(hint);
@@ -634,14 +634,14 @@ KFileMetaInfoItem KFileMetaInfo::item(const KFileMetaInfoItem::Hint hint) const
return KFileMetaInfoItem();
}
-KFileMetaInfoItem KFileMetaInfo::saveItem( const QString& key,
- const QString& preferredGroup,
+KFileMetaInfoItem KFileMetaInfo::saveItem( const TQString& key,
+ const TQString& preferredGroup,
bool createGroup )
{
assert(isValid());
// try the preferred groups first
if ( !preferredGroup.isEmpty() ) {
- QMapIterator<QString,KFileMetaInfoGroup> it =
+ TQMapIterator<TQString,KFileMetaInfoGroup> it =
d->groups.find( preferredGroup );
// try to create the preferred group, if necessary
@@ -661,14 +661,14 @@ KFileMetaInfoItem KFileMetaInfo::saveItem( const QString& key,
}
}
- QStringList groups = preferredGroups();
+ TQStringList groups = preferredGroups();
KFileMetaInfoItem item;
- QStringList::ConstIterator groupIt = groups.begin();
+ TQStringList::ConstIterator groupIt = groups.begin();
for ( ; groupIt != groups.end(); ++groupIt )
{
- QMapIterator<QString,KFileMetaInfoGroup> it = d->groups.find( *groupIt );
+ TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.find( *groupIt );
if ( it != d->groups.end() )
{
KFileMetaInfoGroup group = it.data();
@@ -701,7 +701,7 @@ KFileMetaInfoItem KFileMetaInfo::saveItem( const QString& key,
}
KFileMetaInfoItem KFileMetaInfo::findEditableItem( KFileMetaInfoGroup& group,
- const QString& key )
+ const TQString& key )
{
assert(isValid());
KFileMetaInfoItem item = group.addItem( key );
@@ -714,7 +714,7 @@ KFileMetaInfoItem KFileMetaInfo::findEditableItem( KFileMetaInfoGroup& group,
return KFileMetaInfoItem();
}
-KFileMetaInfoGroup KFileMetaInfo::appendGroup(const QString& name)
+KFileMetaInfoGroup KFileMetaInfo::appendGroup(const TQString& name)
{
assert(isValid());
if ( d->mimeTypeInfo->supportedGroups().contains(name) &&
@@ -731,9 +731,9 @@ KFileMetaInfoGroup KFileMetaInfo::appendGroup(const QString& name)
}
}
-QString KFileMetaInfo::path() const
+TQString KFileMetaInfo::path() const
{
- return d->url.isLocalFile() ? d->url.path() : QString::null;
+ return d->url.isLocalFile() ? d->url.path() : TQString::null;
}
KURL KFileMetaInfo::url() const
@@ -778,9 +778,9 @@ KFileMetaInfo::Data* KFileMetaInfo::Data::makeNull()
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-KFilePlugin::KFilePlugin( QObject *parent, const char *name,
- const QStringList& /*args*/)
- : QObject( parent, name )
+KFilePlugin::KFilePlugin( TQObject *parent, const char *name,
+ const TQStringList& /*args*/)
+ : TQObject( parent, name )
{
// kdDebug(7033) << "loaded a plugin for " << name << endl;
}
@@ -790,7 +790,7 @@ KFilePlugin::~KFilePlugin()
// kdDebug(7033) << "unloaded a plugin for " << name() << endl;
}
-KFileMimeTypeInfo * KFilePlugin::addMimeTypeInfo( const QString& mimeType )
+KFileMimeTypeInfo * KFilePlugin::addMimeTypeInfo( const TQString& mimeType )
{
return KFileMetaInfoProvider::self()->addMimeTypeInfo( mimeType );
}
@@ -800,7 +800,7 @@ void KFilePlugin::virtual_hook( int, void* )
KFileMimeTypeInfo::GroupInfo* KFilePlugin::addGroupInfo(KFileMimeTypeInfo* info,
- const QString& key, const QString& translatedKey) const
+ const TQString& key, const TQString& translatedKey) const
{
return info->addGroupInfo(key, translatedKey);
}
@@ -811,15 +811,15 @@ void KFilePlugin::setAttributes(KFileMimeTypeInfo::GroupInfo* gi, uint attr) con
}
void KFilePlugin::addVariableInfo(KFileMimeTypeInfo::GroupInfo* gi,
- QVariant::Type type, uint attr) const
+ TQVariant::Type type, uint attr) const
{
gi->addVariableInfo(type, attr);
}
KFileMimeTypeInfo::ItemInfo* KFilePlugin::addItemInfo(KFileMimeTypeInfo::GroupInfo* gi,
- const QString& key,
- const QString& translatedKey,
- QVariant::Type type)
+ const TQString& key,
+ const TQString& translatedKey,
+ TQVariant::Type type)
{
return gi->addItemInfo(key, translatedKey, type);
}
@@ -881,22 +881,22 @@ void KFilePlugin::setUnit(KFileMimeTypeInfo::ItemInfo* item, uint unit)
}
}
-void KFilePlugin::setPrefix(KFileMimeTypeInfo::ItemInfo* item, const QString& prefix)
+void KFilePlugin::setPrefix(KFileMimeTypeInfo::ItemInfo* item, const TQString& prefix)
{
item->m_prefix = prefix;
}
-void KFilePlugin::setSuffix(KFileMimeTypeInfo::ItemInfo* item, const QString& suffix)
+void KFilePlugin::setSuffix(KFileMimeTypeInfo::ItemInfo* item, const TQString& suffix)
{
item->m_suffix = suffix;
}
-KFileMetaInfoGroup KFilePlugin::appendGroup(KFileMetaInfo& info, const QString& key)
+KFileMetaInfoGroup KFilePlugin::appendGroup(KFileMetaInfo& info, const TQString& key)
{
return info.appendGroup(key);
}
-void KFilePlugin::appendItem(KFileMetaInfoGroup& group, const QString& key, QVariant value)
+void KFilePlugin::appendItem(KFileMetaInfoGroup& group, const TQString& key, TQVariant value)
{
group.appendItem(key, value);
}
@@ -927,22 +927,22 @@ KFileMetaInfoProvider::~KFileMetaInfoProvider()
sd.setObject( 0 );
}
-KFilePlugin* KFileMetaInfoProvider::loadPlugin( const QString& mimeType, const QString& protocol )
+KFilePlugin* KFileMetaInfoProvider::loadPlugin( const TQString& mimeType, const TQString& protocol )
{
//kdDebug() << "loadPlugin: mimeType=" << mimeType << " protocol=" << protocol << endl;
// Currently the idea is: either the mimetype is set or the protocol, but not both.
// We need PNG fileinfo, and trash: fileinfo, but not "PNG in the trash".
- QString queryMimeType, query;
+ TQString queryMimeType, query;
if ( !mimeType.isEmpty() ) {
query = "(not exist [X-KDE-Protocol])";
queryMimeType = mimeType;
} else {
- query = QString::fromLatin1( "[X-KDE-Protocol] == '%1'" ).arg(protocol);
+ query = TQString::fromLatin1( "[X-KDE-Protocol] == '%1'" ).arg(protocol);
// querying for a protocol: we have no mimetype, so we need to use KFilePlugin as one
queryMimeType = "KFilePlugin";
// hopefully using KFilePlugin as genericMimeType too isn't a problem
}
- const KTrader::OfferList offers = KTrader::self()->query( queryMimeType, "KFilePlugin", query, QString::null );
+ const KTrader::OfferList offers = KTrader::self()->query( queryMimeType, "KFilePlugin", query, TQString::null );
if ( offers.isEmpty() )
return 0;
KService::Ptr service = *(offers.begin());
@@ -958,7 +958,7 @@ KFilePlugin* KFileMetaInfoProvider::loadPlugin( const QString& mimeType, const Q
return plugin;
}
-KFilePlugin* KFileMetaInfoProvider::loadAndRegisterPlugin( const QString& mimeType, const QString& protocol )
+KFilePlugin* KFileMetaInfoProvider::loadAndRegisterPlugin( const TQString& mimeType, const TQString& protocol )
{
Q_ASSERT( m_pendingMimetypeInfos.isEmpty() );
m_pendingMimetypeInfos.clear();
@@ -979,7 +979,7 @@ KFilePlugin* KFileMetaInfoProvider::loadAndRegisterPlugin( const QString& mimeTy
} else {
// Mimetype-metainfo: the plugin can register itself for multiple mimetypes, remember them all
bool first = true;
- QDictIterator<KFileMimeTypeInfo> it( m_pendingMimetypeInfos );
+ TQDictIterator<KFileMimeTypeInfo> it( m_pendingMimetypeInfos );
for( ; it.current(); ++it ) {
KFileMimeTypeInfo* info = it.current();
m_plugins.insert( it.currentKey(), new CachedPluginInfo( plugin, info, first ) );
@@ -993,12 +993,12 @@ KFilePlugin* KFileMetaInfoProvider::loadAndRegisterPlugin( const QString& mimeTy
return plugin;
}
-KFilePlugin * KFileMetaInfoProvider::plugin(const QString& mimeType)
+KFilePlugin * KFileMetaInfoProvider::plugin(const TQString& mimeType)
{
- return plugin( mimeType, QString::null );
+ return plugin( mimeType, TQString::null );
}
-KFilePlugin * KFileMetaInfoProvider::plugin(const QString& mimeType, const QString& protocol)
+KFilePlugin * KFileMetaInfoProvider::plugin(const TQString& mimeType, const TQString& protocol)
{
//kdDebug(7033) << "plugin() : looking for plugin for protocol=" << protocol << " mimeType=" << mimeType << endl;
@@ -1008,7 +1008,7 @@ KFilePlugin * KFileMetaInfoProvider::plugin(const QString& mimeType, const QStri
return cache->plugin;
}
if ( !cache ) {
- KFilePlugin* plugin = loadAndRegisterPlugin( QString::null, protocol );
+ KFilePlugin* plugin = loadAndRegisterPlugin( TQString::null, protocol );
if ( plugin )
return plugin;
}
@@ -1019,12 +1019,12 @@ KFilePlugin * KFileMetaInfoProvider::plugin(const QString& mimeType, const QStri
return cache->plugin;
}
- KFilePlugin* plugin = loadAndRegisterPlugin( mimeType, QString::null );
+ KFilePlugin* plugin = loadAndRegisterPlugin( mimeType, TQString::null );
#if 0
kdDebug(7033) << "currently loaded plugins:\n";
- QDictIterator<CachedPluginInfo> it( m_plugins );
+ TQDictIterator<CachedPluginInfo> it( m_plugins );
for( ; it.current(); ++it ) {
CachedPluginInfo* cache = it.current();
kdDebug(7033)
@@ -1037,7 +1037,7 @@ KFilePlugin * KFileMetaInfoProvider::plugin(const QString& mimeType, const QStri
return plugin;
}
-QStringList KFileMetaInfoProvider::preferredKeys( const QString& mimeType ) const
+TQStringList KFileMetaInfoProvider::preferredKeys( const TQString& mimeType ) const
{
KService::Ptr service =
KServiceTypeProfile::preferredService( mimeType, "KFilePlugin");
@@ -1045,12 +1045,12 @@ QStringList KFileMetaInfoProvider::preferredKeys( const QString& mimeType ) cons
if ( !service || !service->isValid() )
{
// kdDebug(7033) << "no valid service found\n";
- return QStringList();
+ return TQStringList();
}
return service->property("PreferredItems").toStringList();
}
-QStringList KFileMetaInfoProvider::preferredGroups( const QString& mimeType ) const
+TQStringList KFileMetaInfoProvider::preferredGroups( const TQString& mimeType ) const
{
KService::Ptr service =
KServiceTypeProfile::preferredService( mimeType, "KFilePlugin");
@@ -1058,17 +1058,17 @@ QStringList KFileMetaInfoProvider::preferredGroups( const QString& mimeType ) co
if ( !service || !service->isValid() )
{
// kdDebug(7033) << "no valid service found\n";
- return QStringList();
+ return TQStringList();
}
return service->property("PreferredGroups").toStringList();
}
-const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const QString& mimeType )
+const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const TQString& mimeType )
{
- return mimeTypeInfo( mimeType, QString::null );
+ return mimeTypeInfo( mimeType, TQString::null );
}
-const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const QString& mimeType, const QString& protocol )
+const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const TQString& mimeType, const TQString& protocol )
{
//kdDebug(7033) << "mimeTypeInfo() : looking for plugin for protocol=" << protocol << " mimeType=" << mimeType << endl;
if ( !protocol.isEmpty() ) {
@@ -1078,7 +1078,7 @@ const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const QString& mi
}
if ( !cache ) {
- loadAndRegisterPlugin( QString::null, protocol );
+ loadAndRegisterPlugin( TQString::null, protocol );
cache = m_plugins.find( protocol );
if ( cache && cache->mimeTypeInfo ) {
return cache->mimeTypeInfo;
@@ -1091,7 +1091,7 @@ const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const QString& mi
return cache->mimeTypeInfo;
}
- loadAndRegisterPlugin( mimeType, QString::null );
+ loadAndRegisterPlugin( mimeType, TQString::null );
cache = m_plugins.find( mimeType );
if ( cache ) {
return cache->mimeTypeInfo;
@@ -1100,7 +1100,7 @@ const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const QString& mi
}
KFileMimeTypeInfo * KFileMetaInfoProvider::addMimeTypeInfo(
- const QString& mimeType )
+ const TQString& mimeType )
{
KFileMimeTypeInfo *info = m_pendingMimetypeInfos.find( mimeType );
@@ -1117,17 +1117,17 @@ KFileMimeTypeInfo * KFileMetaInfoProvider::addMimeTypeInfo(
return info;
}
-QStringList KFileMetaInfoProvider::supportedMimeTypes() const
+TQStringList KFileMetaInfoProvider::supportedMimeTypes() const
{
- QStringList allMimeTypes;
- QString kfilePlugin = "KFilePlugin";
+ TQStringList allMimeTypes;
+ TQString kfilePlugin = "KFilePlugin";
KTrader::OfferList offers = KTrader::self()->query( "KFilePlugin" );
KTrader::OfferListIterator it = offers.begin();
for ( ; it != offers.end(); ++it )
{
- const QStringList mimeTypes = (*it)->serviceTypes();
- QStringList::ConstIterator it2 = mimeTypes.begin();
+ const TQStringList mimeTypes = (*it)->serviceTypes();
+ TQStringList::ConstIterator it2 = mimeTypes.begin();
for ( ; it2 != mimeTypes.end(); ++it2 )
if ( allMimeTypes.find( *it2 ) == allMimeTypes.end() &&
*it2 != kfilePlugin ) // also in serviceTypes()
@@ -1147,7 +1147,7 @@ QStringList KFileMetaInfoProvider::supportedMimeTypes() const
class KFileMetaInfoGroup::Data : public QShared
{
public:
- Data(const QString& _name)
+ Data(const TQString& _name)
: QShared(),
name(_name),
mimeTypeInfo(0L),
@@ -1162,10 +1162,10 @@ public:
delete mimeTypeInfo;
};
- QString name;
- QMap<QString, KFileMetaInfoItem> items;
+ TQString name;
+ TQMap<TQString, KFileMetaInfoItem> items;
const KFileMimeTypeInfo* mimeTypeInfo;
- QStringList removedItems;
+ TQStringList removedItems;
bool dirty :1;
bool added :1;
@@ -1174,7 +1174,7 @@ public:
};
-KFileMetaInfoGroup::KFileMetaInfoGroup( const QString& name,
+KFileMetaInfoGroup::KFileMetaInfoGroup( const TQString& name,
const KFileMimeTypeInfo* info )
: d(new Data( name ) )
{
@@ -1222,20 +1222,20 @@ bool KFileMetaInfoGroup::isEmpty() const
return d->items.isEmpty();
}
-QStringList KFileMetaInfoGroup::preferredKeys() const
+TQStringList KFileMetaInfoGroup::preferredKeys() const
{
assert(isValid());
- QStringList list = keys();
- QStringList newlist;
- QStringList preferredKeys = d->mimeTypeInfo->preferredKeys();
- QStringList::Iterator pref;
- QStringList::Iterator begin = preferredKeys.begin();
- QStringList::Iterator end = preferredKeys.end();
+ TQStringList list = keys();
+ TQStringList newlist;
+ TQStringList preferredKeys = d->mimeTypeInfo->preferredKeys();
+ TQStringList::Iterator pref;
+ TQStringList::Iterator begin = preferredKeys.begin();
+ TQStringList::Iterator end = preferredKeys.end();
// move all keys from the preferred keys that are in our list to a new list
for ( pref = begin; pref!=end; ++pref )
{
- QStringList::Iterator item = list.find(*pref);
+ TQStringList::Iterator item = list.find(*pref);
if ( item != list.end() )
{
newlist.append( *item );
@@ -1250,16 +1250,16 @@ QStringList KFileMetaInfoGroup::preferredKeys() const
return newlist;
}
-QStringList KFileMetaInfoGroup::keys() const
+TQStringList KFileMetaInfoGroup::keys() const
{
if (d == Data::makeNull())
kdWarning(7033) << "attempt to get the keys of "
"an invalid metainfo group";
- QStringList list;
+ TQStringList list;
- // make a QStringList with all available keys
- QMapConstIterator<QString, KFileMetaInfoItem> it;
+ // make a TQStringList with all available keys
+ TQMapConstIterator<TQString, KFileMetaInfoItem> it;
for (it = d->items.begin(); it!=d->items.end(); ++it)
{
list.append(it.data().key());
@@ -1268,13 +1268,13 @@ QStringList KFileMetaInfoGroup::keys() const
return list;
}
-QString KFileMetaInfoGroup::translatedName() const
+TQString KFileMetaInfoGroup::translatedName() const
{
assert(isValid());
return d->mimeTypeInfo->groupInfo(d->name)->translatedName();
}
-QStringList KFileMetaInfoGroup::supportedKeys() const
+TQStringList KFileMetaInfoGroup::supportedKeys() const
{
assert(isValid());
return d->mimeTypeInfo->groupInfo(d->name)->supportedKeys();
@@ -1286,14 +1286,14 @@ bool KFileMetaInfoGroup::supportsVariableKeys() const
return d->mimeTypeInfo->groupInfo(d->name)->supportsVariableKeys();
}
-bool KFileMetaInfoGroup::contains( const QString& key ) const
+bool KFileMetaInfoGroup::contains( const TQString& key ) const
{
return d->items.contains(key);
}
-KFileMetaInfoItem KFileMetaInfoGroup::item( const QString& key) const
+KFileMetaInfoItem KFileMetaInfoGroup::item( const TQString& key) const
{
- QMapIterator<QString,KFileMetaInfoItem> it = d->items.find( key );
+ TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.find( key );
if ( it != d->items.end() )
return it.data();
@@ -1302,7 +1302,7 @@ KFileMetaInfoItem KFileMetaInfoGroup::item( const QString& key) const
KFileMetaInfoItem KFileMetaInfoGroup::item(uint hint) const
{
- QMapIterator<QString, KFileMetaInfoItem> it;
+ TQMapIterator<TQString, KFileMetaInfoItem> it;
for (it = d->items.begin(); it!=d->items.end(); ++it)
if (it.data().hint() == hint)
@@ -1311,7 +1311,7 @@ KFileMetaInfoItem KFileMetaInfoGroup::item(uint hint) const
return KFileMetaInfoItem();
}
-QString KFileMetaInfoGroup::name() const
+TQString KFileMetaInfoGroup::name() const
{
return d->name;
}
@@ -1353,10 +1353,10 @@ void KFileMetaInfoGroup::deref()
}
-KFileMetaInfoItem KFileMetaInfoGroup::addItem( const QString& key )
+KFileMetaInfoItem KFileMetaInfoGroup::addItem( const TQString& key )
{
assert(isValid());
- QMapIterator<QString,KFileMetaInfoItem> it = d->items.find( key );
+ TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.find( key );
if ( it != d->items.end() )
return it.data();
@@ -1377,9 +1377,9 @@ KFileMetaInfoItem KFileMetaInfoGroup::addItem( const QString& key )
KFileMetaInfoItem item;
if (info->isVariableItem())
- item = KFileMetaInfoItem(ginfo->variableItemInfo(), key, QVariant());
+ item = KFileMetaInfoItem(ginfo->variableItemInfo(), key, TQVariant());
else
- item = KFileMetaInfoItem(info, key, QVariant());
+ item = KFileMetaInfoItem(info, key, TQVariant());
d->items.insert(key, item);
item.setAdded(); // mark as added
@@ -1387,7 +1387,7 @@ KFileMetaInfoItem KFileMetaInfoGroup::addItem( const QString& key )
return item;
}
-bool KFileMetaInfoGroup::removeItem( const QString& key )
+bool KFileMetaInfoGroup::removeItem( const TQString& key )
{
if (!isValid())
{
@@ -1395,7 +1395,7 @@ bool KFileMetaInfoGroup::removeItem( const QString& key )
return false;
}
- QMapIterator<QString, KFileMetaInfoItem> it = d->items.find(key);
+ TQMapIterator<TQString, KFileMetaInfoItem> it = d->items.find(key);
if ( it==d->items.end() )
{
kdDebug(7033) << "trying to remove the non existant item " << key << "\n";
@@ -1415,13 +1415,13 @@ bool KFileMetaInfoGroup::removeItem( const QString& key )
return true;
}
-QStringList KFileMetaInfoGroup::removedItems()
+TQStringList KFileMetaInfoGroup::removedItems()
{
return d->removedItems;
}
-KFileMetaInfoItem KFileMetaInfoGroup::appendItem(const QString& key,
- const QVariant& value)
+KFileMetaInfoItem KFileMetaInfoGroup::appendItem(const TQString& key,
+ const TQVariant& value)
{
//KDE4 enforce (value.type() == d->mimeTypeInfo->type())
assert(isValid());
@@ -1459,7 +1459,7 @@ KFileMetaInfoGroup::Data* KFileMetaInfoGroup::Data::makeNull()
// We deliberately do not reset "null" after it has been destroyed!
// Otherwise we will run into problems later in ~KFileMetaInfoItem
// where the d-pointer is compared against null.
- null = new Data(QString::null);
+ null = new Data(TQString::null);
null->mimeTypeInfo = new KFileMimeTypeInfo();
sd_KFileMetaInfoGroupData.setObject( null );
}
@@ -1470,7 +1470,7 @@ KFileMetaInfoGroup::Data* KFileMetaInfoGroup::Data::makeNull()
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-KFileMimeTypeInfo::KFileMimeTypeInfo( const QString& mimeType )
+KFileMimeTypeInfo::KFileMimeTypeInfo( const TQString& mimeType )
: m_mimeType( mimeType )
{
m_groups.setAutoDelete( true );
@@ -1480,48 +1480,48 @@ KFileMimeTypeInfo::~KFileMimeTypeInfo()
{
}
-const KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::groupInfo( const QString& group ) const
+const KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::groupInfo( const TQString& group ) const
{
return m_groups.find( group );
}
KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::addGroupInfo(
- const QString& name, const QString& translatedName )
+ const TQString& name, const TQString& translatedName )
{
GroupInfo* group = new GroupInfo( name, translatedName );
m_groups.insert(name, group);
return group;
}
-QStringList KFileMimeTypeInfo::supportedGroups() const
+TQStringList KFileMimeTypeInfo::supportedGroups() const
{
- QStringList list;
- QDictIterator<GroupInfo> it( m_groups );
+ TQStringList list;
+ TQDictIterator<GroupInfo> it( m_groups );
for ( ; it.current(); ++it )
list.append( it.current()->name() );
return list;
}
-QStringList KFileMimeTypeInfo::translatedGroups() const
+TQStringList KFileMimeTypeInfo::translatedGroups() const
{
- QStringList list;
- QDictIterator<GroupInfo> it( m_groups );
+ TQStringList list;
+ TQDictIterator<GroupInfo> it( m_groups );
for ( ; it.current(); ++it )
list.append( it.current()->translatedName() );
return list;
}
-QStringList KFileMimeTypeInfo::supportedKeys() const
+TQStringList KFileMimeTypeInfo::supportedKeys() const
{
// not really efficient, but not those are not large lists, probably.
// maybe cache the result?
- QStringList keys;
- QStringList::ConstIterator lit;
- QDictIterator<GroupInfo> it( m_groups );
+ TQStringList keys;
+ TQStringList::ConstIterator lit;
+ TQDictIterator<GroupInfo> it( m_groups );
for ( ; it.current(); ++it ) { // need to nuke dupes
- QStringList list = it.current()->supportedKeys();
+ TQStringList list = it.current()->supportedKeys();
for ( lit = list.begin(); lit != list.end(); ++lit ) {
if ( keys.find( *lit ) == keys.end() )
keys.append( *lit );
@@ -1531,9 +1531,9 @@ QStringList KFileMimeTypeInfo::supportedKeys() const
return keys;
}
-QValidator * KFileMimeTypeInfo::createValidator(const QString& group,
- const QString& key,
- QObject *parent,
+TQValidator * KFileMimeTypeInfo::createValidator(const TQString& group,
+ const TQString& key,
+ TQObject *parent,
const char *name) const
{
KFilePlugin* plugin = KFileMetaInfoProvider::self()->plugin(m_mimeType);
@@ -1546,8 +1546,8 @@ QValidator * KFileMimeTypeInfo::createValidator(const QString& group,
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-KFileMimeTypeInfo::GroupInfo::GroupInfo( const QString& name,
- const QString& translatedName )
+KFileMimeTypeInfo::GroupInfo::GroupInfo( const TQString& name,
+ const TQString& translatedName )
: m_name( name ),
m_translatedName( translatedName ),
m_attr( 0 ),
@@ -1562,7 +1562,7 @@ KFileMimeTypeInfo::GroupInfo::~GroupInfo()
delete m_variableItemInfo;
}
-const KFileMimeTypeInfo::ItemInfo * KFileMimeTypeInfo::GroupInfo::itemInfo( const QString& key ) const
+const KFileMimeTypeInfo::ItemInfo * KFileMimeTypeInfo::GroupInfo::itemInfo( const TQString& key ) const
{
ItemInfo* item = m_itemDict.find( key );
@@ -1576,10 +1576,10 @@ const KFileMimeTypeInfo::ItemInfo * KFileMimeTypeInfo::GroupInfo::itemInfo( cons
}
KFileMimeTypeInfo::ItemInfo* KFileMimeTypeInfo::GroupInfo::addItemInfo(
- const QString& key, const QString& translatedKey,
- QVariant::Type type)
+ const TQString& key, const TQString& translatedKey,
+ TQVariant::Type type)
{
-// kdDebug(7034) << key << "(" << translatedKey << ") -> " << QVariant::typeToName(type) << endl;
+// kdDebug(7034) << key << "(" << translatedKey << ") -> " << TQVariant::typeToName(type) << endl;
ItemInfo* item = new ItemInfo(key, translatedKey, type);
m_supportedKeys.append(key);
@@ -1588,39 +1588,39 @@ KFileMimeTypeInfo::ItemInfo* KFileMimeTypeInfo::GroupInfo::addItemInfo(
}
-void KFileMimeTypeInfo::GroupInfo::addVariableInfo( QVariant::Type type,
+void KFileMimeTypeInfo::GroupInfo::addVariableInfo( TQVariant::Type type,
uint attr )
{
// just make sure that it's not already there
delete m_variableItemInfo;
- m_variableItemInfo = new ItemInfo(QString::null, QString::null, type);
+ m_variableItemInfo = new ItemInfo(TQString::null, TQString::null, type);
m_variableItemInfo->m_attr = attr;
}
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-QString KFileMimeTypeInfo::ItemInfo::string(const QVariant& value, bool mangle) const
+TQString KFileMimeTypeInfo::ItemInfo::string(const TQVariant& value, bool mangle) const
{
- QString s;
+ TQString s;
switch (value.type())
{
- case QVariant::Invalid :
+ case TQVariant::Invalid :
return "---";
- case QVariant::Bool :
+ case TQVariant::Bool :
s = value.toBool() ? i18n("Yes") : i18n("No");
break;
- case QVariant::Int :
+ case TQVariant::Int :
if (unit() == KFileMimeTypeInfo::Seconds)
{
int seconds = value.toInt() % 60;
int minutes = value.toInt() / 60 % 60;
int hours = value.toInt() / 3600;
- s = hours ? QString().sprintf("%d:%02d:%02d",hours, minutes, seconds)
- : QString().sprintf("%02d:%02d", minutes, seconds);
+ s = hours ? TQString().sprintf("%d:%02d:%02d",hours, minutes, seconds)
+ : TQString().sprintf("%02d:%02d", minutes, seconds);
return s; // no suffix wanted
}
else if (unit() == KFileMimeTypeInfo::Bytes)
@@ -1637,11 +1637,11 @@ QString KFileMimeTypeInfo::ItemInfo::string(const QVariant& value, bool mangle)
s = KGlobal::locale()->formatNumber( value.toInt() , 0);
break;
- case QVariant::LongLong :
+ case TQVariant::LongLong :
s = KGlobal::locale()->formatNumber( value.toLongLong(), 0 );
break;
- case QVariant::ULongLong :
+ case TQVariant::ULongLong :
if ( unit() == KFileMimeTypeInfo::Bytes )
return KIO::convertSize( value.toULongLong() );
else if ( unit() == KFileMimeTypeInfo::KiloBytes )
@@ -1650,34 +1650,34 @@ QString KFileMimeTypeInfo::ItemInfo::string(const QVariant& value, bool mangle)
s = KGlobal::locale()->formatNumber( value.toULongLong(), 0 );
break;
- case QVariant::UInt :
+ case TQVariant::UInt :
s = KGlobal::locale()->formatNumber( value.toUInt() , 0);
break;
- case QVariant::Double :
+ case TQVariant::Double :
s = KGlobal::locale()->formatNumber( value.toDouble(), 3);
break;
- case QVariant::Date :
+ case TQVariant::Date :
s = KGlobal::locale()->formatDate( value.toDate(), true );
break;
- case QVariant::Time :
+ case TQVariant::Time :
s = KGlobal::locale()->formatTime( value.toTime(), true );
break;
- case QVariant::DateTime :
+ case TQVariant::DateTime :
s = KGlobal::locale()->formatDateTime( value.toDateTime(),
true, true );
break;
- case QVariant::Size :
- s = QString("%1 x %2").arg(value.toSize().width())
+ case TQVariant::Size :
+ s = TQString("%1 x %2").arg(value.toSize().width())
.arg(value.toSize().height());
break;
- case QVariant::Point :
- s = QString("%1/%2").arg(value.toSize().width())
+ case TQVariant::Point :
+ s = TQString("%1/%2").arg(value.toSize().width())
.arg(value.toSize().height());
break;
@@ -1705,7 +1705,7 @@ QString KFileMimeTypeInfo::ItemInfo::string(const QVariant& value, bool mangle)
first a bool that says if the items is valid, and if yes,
all the elements of the Data
*/
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoItem& item )
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoItem& item )
{
KFileMetaInfoItem::Data* d = item.d;
@@ -1725,7 +1725,7 @@ KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoItem& ite
}
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoItem& item )
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoItem& item )
{
bool isValid;
s >> isValid;
@@ -1758,7 +1758,7 @@ KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoItem& item )
// serialization of a KFileMetaInfoGroup
// we serialize the name of the mimetype here instead of the mimetype info
// on the other side, we can simply use this to ask the provider for the info
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoGroup& group )
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoGroup& group )
{
KFileMetaInfoGroup::Data* d = group.d;
@@ -1775,9 +1775,9 @@ KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoGroup& gr
return s;
}
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& group )
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& group )
{
- QString mimeType;
+ TQString mimeType;
bool isValid;
s >> isValid;
@@ -1799,7 +1799,7 @@ KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& group )
group.d->mimeTypeInfo = KFileMetaInfoProvider::self()->mimeTypeInfo(mimeType);
// we need to set the item info for the items here
- QMapIterator<QString, KFileMetaInfoItem> it = group.d->items.begin();
+ TQMapIterator<TQString, KFileMetaInfoItem> it = group.d->items.begin();
for ( ; it != group.d->items.end(); ++it)
{
(*it).d->mimeTypeInfo = group.d->mimeTypeInfo->groupInfo(group.d->name)
@@ -1812,7 +1812,7 @@ KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& group )
// serialization of a KFileMetaInfo object
// we serialize the name of the mimetype here instead of the mimetype info
// on the other side, we can simply use this to ask the provider for the info
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfo& info )
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfo& info )
{
KFileMetaInfo::Data* d = info.d;
@@ -1830,9 +1830,9 @@ KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfo& info )
return s;
}
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfo& info )
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfo& info )
{
- QString mimeType;
+ TQString mimeType;
bool isValid;
s >> isValid;
diff --git a/kio/kio/kfilemetainfo.h b/kio/kio/kfilemetainfo.h
index 911ada26f..0bc97df70 100644
--- a/kio/kio/kfilemetainfo.h
+++ b/kio/kio/kfilemetainfo.h
@@ -24,10 +24,10 @@
m_unit is a define in <sys/sysmacros.h> */
#define m_unit outouftheway_m_unit
-#include <qdict.h>
-#include <qvariant.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqdict.h>
+#include <tqvariant.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kurl.h>
#undef m_unit
@@ -151,7 +151,7 @@ public:
*
* @return the list of keys supported for this mimetype
**/
- QStringList supportedKeys() const
+ TQStringList supportedKeys() const
{
return m_supportedKeys;
}
@@ -162,7 +162,7 @@ public:
*
* @return the group name
*/
- const QString& name() const
+ const TQString& name() const
{
return m_name;
}
@@ -174,7 +174,7 @@ public:
*
* @return the translated group name
*/
- const QString& translatedName() const
+ const TQString& translatedName() const
{
return m_translatedName;
}
@@ -186,7 +186,7 @@ public:
*
* @return a pointer to the item info. Don't delete this object!
*/
- const ItemInfo * itemInfo( const QString& key ) const;
+ const ItemInfo * itemInfo( const TQString& key ) const;
/**
* Get the attributes of this group (see Attributes)
@@ -223,22 +223,22 @@ public:
~GroupInfo();
private:
/** @internal */
- GroupInfo( const QString& name, const QString& translatedName);
+ GroupInfo( const TQString& name, const TQString& translatedName);
/** @internal */
- KFileMimeTypeInfo::ItemInfo* addItemInfo( const QString& key,
- const QString& translatedKey,
- QVariant::Type type);
+ KFileMimeTypeInfo::ItemInfo* addItemInfo( const TQString& key,
+ const TQString& translatedKey,
+ TQVariant::Type type);
/** @internal */
- void addVariableInfo( QVariant::Type type, uint attr );
+ void addVariableInfo( TQVariant::Type type, uint attr );
- QString m_name;
- QString m_translatedName;
- QStringList m_supportedKeys;
+ TQString m_name;
+ TQString m_translatedName;
+ TQStringList m_supportedKeys;
uint m_attr;
ItemInfo* m_variableItemInfo;
- QDict<ItemInfo> m_itemDict;
+ TQDict<ItemInfo> m_itemDict;
};
@@ -262,7 +262,7 @@ public:
*
* @return the prefix
*/
- const QString& prefix() const
+ const TQString& prefix() const
{
return m_prefix;
}
@@ -273,18 +273,18 @@ public:
*
* @return the prefix
*/
- const QString& suffix() const
+ const TQString& suffix() const
{
return m_suffix;
}
/**
- * The items for a file are stored as a QVariant and this method
+ * The items for a file are stored as a TQVariant and this method
* can be used to get the data type of this item.
*
- * @return the QVariant type
+ * @return the TQVariant type
*/
- QVariant::Type type() const
+ TQVariant::Type type() const
{
return m_type;
}
@@ -293,23 +293,23 @@ public:
* Returns the name of the item.
* @return the name of the item
*/
- const QString& key() const
+ const TQString& key() const
{
return m_key;
}
/**
* Returns a string for the specified @p value, if possible. If not,
- * QString::null is returned. This can be used by programs if they want
+ * TQString::null is returned. This can be used by programs if they want
* to display a sum or an average of some item for a list of files.
*
* @param value the value to convert
* @param mangle if true, the string will already contain prefix and
* suffix
- * @return the converted string, or QString::null if not possible
+ * @return the converted string, or TQString::null if not possible
* @since 3.1
*/
- QString string( const QVariant& value, bool mangle = true ) const;
+ TQString string( const TQVariant& value, bool mangle = true ) const;
/**
* Is this item the variable item?
@@ -328,7 +328,7 @@ public:
* language.
* @return the translated key
*/
- const QString& translatedKey() const
+ const TQString& translatedKey() const
{
return m_translatedKey;
}
@@ -365,22 +365,22 @@ public:
private:
/** @internal */
- ItemInfo(const QString& key, const QString& translatedKey,
- QVariant::Type type)
+ ItemInfo(const TQString& key, const TQString& translatedKey,
+ TQVariant::Type type)
: m_key(key), m_translatedKey(translatedKey),
m_type(type),
m_attr(0), m_unit(NoUnit), m_hint(NoHint),
- m_prefix(QString::null), m_suffix(QString::null)
+ m_prefix(TQString::null), m_suffix(TQString::null)
{}
- QString m_key;
- QString m_translatedKey;
- QVariant::Type m_type;
+ TQString m_key;
+ TQString m_translatedKey;
+ TQVariant::Type m_type;
uint m_attr;
uint m_unit;
uint m_hint;
- QString m_prefix;
- QString m_suffix;
+ TQString m_prefix;
+ TQString m_suffix;
};
// ### could it be made private? Would this be BC?
@@ -392,13 +392,13 @@ public:
*
* @param group the group of the item
* @param key the key of the item
- * @param parent the parent of the QObject, or 0 for a parent-less object
- * @param name the name of the QObject, can be 0
+ * @param parent the parent of the TQObject, or 0 for a parent-less object
+ * @param name the name of the TQObject, can be 0
* @return the validator. You are responsible for deleting it. 0 if
* creation failed
*/
- QValidator * createValidator(const QString& group, const QString& key,
- QObject *parent = 0, const char *name = 0) const;
+ TQValidator * createValidator(const TQString& group, const TQString& key,
+ TQObject *parent = 0, const char *name = 0) const;
/**
* Returns the list of all groups that the plugin for this mimetype
@@ -406,7 +406,7 @@ public:
*
* @return the list of groups
*/
- QStringList supportedGroups() const;
+ TQStringList supportedGroups() const;
/**
* Same as the above function, but returns the strings to display to the
@@ -414,7 +414,7 @@ public:
*
* @return the list of groups
*/
- QStringList translatedGroups() const;
+ TQStringList translatedGroups() const;
/**
* This returns the list of groups in the preferred order that's specified
@@ -422,7 +422,7 @@ public:
*
* @return the list of groups
*/
- QStringList preferredGroups() const
+ TQStringList preferredGroups() const
{
return m_preferredGroups;
}
@@ -432,7 +432,7 @@ public:
*
* @return the mimetype of this info
*/
- QString mimeType() const {return m_mimeType;}
+ TQString mimeType() const {return m_mimeType;}
/**
* Get the group info for a specific group.
@@ -441,7 +441,7 @@ public:
* @return a pointer to the info. 0 if it does not
* exist. Don't delete this object!
*/
- const GroupInfo * groupInfo( const QString& group ) const;
+ const GroupInfo * groupInfo( const TQString& group ) const;
// always returning stringlists which the user has to iterate and use them
// to look up the real items sounds strange to me. I think we should add
@@ -453,37 +453,37 @@ public:
*
* @return the list of keys
*/
- QStringList supportedKeys() const;
+ TQStringList supportedKeys() const;
/**
* Return a list of all supported keys in preference order
*
* @return the list of keys
*/
- QStringList preferredKeys() const
+ TQStringList preferredKeys() const
{
return m_preferredKeys;
}
// ### shouldn't this be private? BC?
- GroupInfo * addGroupInfo( const QString& name,
- const QString& translatedName);
+ GroupInfo * addGroupInfo( const TQString& name,
+ const TQString& translatedName);
- QString m_translatedName;
- QStringList m_supportedKeys;
+ TQString m_translatedName;
+ TQStringList m_supportedKeys;
uint m_attr;
// bool m_supportsVariableKeys : 1;
- QDict<ItemInfo> m_itemDict;
+ TQDict<ItemInfo> m_itemDict;
// ### this should be made private instead, but this would be BIC
protected:
/** @internal */
- KFileMimeTypeInfo( const QString& mimeType );
+ KFileMimeTypeInfo( const TQString& mimeType );
- QDict<GroupInfo> m_groups;
- QString m_mimeType;
- QStringList m_preferredKeys; // same as KFileMetaInfoProvider::preferredKeys()
- QStringList m_preferredGroups; // same as KFileMetaInfoProvider::preferredKeys()
+ TQDict<GroupInfo> m_groups;
+ TQString m_mimeType;
+ TQStringList m_preferredKeys; // same as KFileMetaInfoProvider::preferredKeys()
+ TQStringList m_preferredGroups; // same as KFileMetaInfoProvider::preferredKeys()
};
@@ -508,7 +508,7 @@ public:
**/
// ### hmm, then it should be private
KFileMetaInfoItem( const KFileMimeTypeInfo::ItemInfo* mti,
- const QString& key, const QVariant& value);
+ const TQString& key, const TQVariant& value);
/**
* Copy constructor
@@ -538,7 +538,7 @@ public:
*
* @return the key of this item
*/
- QString key() const;
+ TQString key() const;
/**
* Returns a translation of the key for displaying to the user. If the
@@ -546,24 +546,24 @@ public:
*
* @return the translated key
*/
- QString translatedKey() const;
+ TQString translatedKey() const;
/**
* Returns the value of the item.
*
* @return the value of the item.
*/
- const QVariant& value() const;
+ const TQVariant& value() const;
/**
* Returns a string containing the value, if possible. If not,
- * QString::null is returned.
+ * TQString::null is returned.
*
* @param mangle if true, the string will already contain prefix and
* suffix
- * @return the value string, or QString::null if not possible
+ * @return the value string, or TQString::null if not possible
*/
- QString string( bool mangle = true ) const;
+ TQString string( bool mangle = true ) const;
/**
* Changes the value of the item.
@@ -571,14 +571,14 @@ public:
* @param value the new value
* @return true if successful, false otherwise
*/
- bool setValue( const QVariant& value );
+ bool setValue( const TQVariant& value );
/**
* Return the type of the item.
*
* @return the type of the item
*/
- QVariant::Type type() const;
+ TQVariant::Type type() const;
/**
* You can query if the application can edit the item and write it back to
@@ -617,7 +617,7 @@ public:
*
* @return the prefix
*/
- QString prefix() const;
+ TQString prefix() const;
/**
* This method returns a translated suffix to be displayed after the
@@ -625,7 +625,7 @@ public:
*
* @return the suffix
*/
- QString suffix() const;
+ TQString suffix() const;
/**
* Returns the hint for this item. See KFileMimeTypeInfo::Hint.
@@ -660,9 +660,9 @@ public:
*/
bool isValid() const;
- KIO_EXPORT friend QDataStream& operator >>(QDataStream& s, KFileMetaInfoItem& );
- KIO_EXPORT friend QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& );
- KIO_EXPORT friend QDataStream& operator <<(QDataStream& s, const KFileMetaInfoItem& );
+ KIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoItem& );
+ KIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
+ KIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoItem& );
friend class KFileMetaInfoGroup;
protected:
@@ -685,8 +685,8 @@ class KIO_EXPORT KFileMetaInfoGroup
{
friend class KFilePlugin;
friend class KFileMetaInfo;
- KIO_EXPORT friend QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& );
- KIO_EXPORT friend QDataStream& operator <<(QDataStream& s, const KFileMetaInfoGroup& );
+ KIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
+ KIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoGroup& );
public:
class Data;
@@ -696,7 +696,7 @@ public:
* KFileMetaInfo do it for you.
**/
// ### hmm, then it should be private
- KFileMetaInfoGroup( const QString& name, const KFileMimeTypeInfo* info );
+ KFileMetaInfoGroup( const TQString& name, const KFileMimeTypeInfo* info );
/**
* Copy constructor
@@ -755,7 +755,7 @@ public:
* Operator for convenience. It does the same as item(),
* but you cannot specify a group to search in
*/
- KFileMetaInfoItem operator[]( const QString& key ) const
+ KFileMetaInfoItem operator[]( const TQString& key ) const
{ return item( key ); }
/**
@@ -764,7 +764,7 @@ public:
* @param key the key of the item to search
* @return the specified item if found, an invalid item, if not
**/
- KFileMetaInfoItem item( const QString& key ) const;
+ KFileMetaInfoItem item( const TQString& key ) const;
/**
* Returns the item with the given @p hint.
@@ -781,7 +781,7 @@ public:
* @param key the key of the item to search
* @return the value with the given key
*/
- const QVariant value( const QString& key ) const
+ const TQVariant value( const TQString& key ) const
{
const KFileMetaInfoItem &i = item( key );
return i.value();
@@ -797,7 +797,7 @@ public:
*
* @return the list of keys supported for this mimetype
**/
- QStringList supportedKeys() const;
+ TQStringList supportedKeys() const;
/**
* Returns true if this group supports adding or removing arbitrary
@@ -812,21 +812,21 @@ public:
*
* @return true if an item for this @p key exists.
*/
- bool contains( const QString& key ) const;
+ bool contains( const TQString& key ) const;
/**
* Returns a list of all keys.
*
* @return a list of all keys in the order they were inserted.
**/
- QStringList keys() const;
+ TQStringList keys() const;
/**
* Returns a list of all keys in preference order.
*
* @return a list of all keys in preference order.
**/
- QStringList preferredKeys() const;
+ TQStringList preferredKeys() const;
/**
* @return the list of possible types that the value for the specified key
@@ -837,7 +837,7 @@ public:
// ### do we really want to support that?
// let's not waste time on thinking about it. Let's just kick it for now
// and add it in 4.0 if needed ;)
-// const QMemArray<QVariant::Type>& types( const QString& key ) const;
+// const TQMemArray<TQVariant::Type>& types( const TQString& key ) const;
/**
* Add an item to the info. This is only possible if the specified @p key
@@ -847,7 +847,7 @@ public:
* @param key the key of the item
* @return the KFileMetaInfoItem for the given @p key
**/
- KFileMetaInfoItem addItem( const QString& key );
+ KFileMetaInfoItem addItem( const TQString& key );
/**
* Remove this item from the meta info of the file. You cannot query
@@ -858,21 +858,21 @@ public:
* @param key the key of the removed item
* @return true if successful, false otherwise
*/
- bool removeItem(const QString& key);
+ bool removeItem(const TQString& key);
/**
* Returns a list of all removed items.
*
* @return a list of all removed items
*/
- QStringList removedItems();
+ TQStringList removedItems();
/**
* The name of this group.
*
* @return the name of this group
*/
- QString name() const;
+ TQString name() const;
/**
* The translated name of this group.
@@ -881,7 +881,7 @@ public:
*
* @since 3.2
*/
- QString translatedName() const;
+ TQString translatedName() const;
/**
* Returns the attributes of this item.
@@ -892,7 +892,7 @@ public:
protected:
void setAdded();
- KFileMetaInfoItem appendItem( const QString& key, const QVariant& value);
+ KFileMetaInfoItem appendItem( const TQString& key, const TQVariant& value);
Data* d;
void ref();
@@ -976,8 +976,8 @@ public:
* @note This version will @b only work for @b local (file:/) files.
*
**/
- KFileMetaInfo( const QString& path,
- const QString& mimeType = QString::null,
+ KFileMetaInfo( const TQString& path,
+ const TQString& mimeType = TQString::null,
uint what = Fastest);
/**
@@ -988,7 +988,7 @@ public:
*
**/
KFileMetaInfo( const KURL& url,
- const QString& mimeType = QString::null,
+ const TQString& mimeType = TQString::null,
uint what = Fastest);
/**
@@ -1025,42 +1025,42 @@ public:
*
* @return the keys of the groups that the file has.
*/
- QStringList groups() const;
+ TQStringList groups() const;
/**
* Returns a list of all supported groups.
*
* @return the supported keys of the groups that the file has.
*/
- QStringList supportedGroups() const;
+ TQStringList supportedGroups() const;
/**
* Returns a list of the preferred groups.
*
* @return the keys of the preferred groups that the file has.
*/
- QStringList preferredGroups() const;
+ TQStringList preferredGroups() const;
/**
* Returns a list of all preferred keys.
*
* @return a list of all preferred keys.
*/
- QStringList preferredKeys() const;
+ TQStringList preferredKeys() const;
/**
* Returns a list of supported keys.
*
* @return a list of supported keys
*/
- QStringList supportedKeys() const;
+ TQStringList supportedKeys() const;
/**
* Returns the list of groups that you can add or remove from the file.
*
* @return the groups can be added or removed
*/
- QStringList editableGroups() const;
+ TQStringList editableGroups() const;
// I'd like to keep those for lookup without group, at least the hint
// version
@@ -1070,7 +1070,7 @@ public:
* @param key the key of the item
* @return the item. Invalid if there is no item with the given @p key.
*/
- KFileMetaInfoItem item(const QString& key) const;
+ KFileMetaInfoItem item(const TQString& key) const;
/**
* Returns the KFileMetaInfoItem with the given @p hint.
*
@@ -1083,12 +1083,12 @@ public:
* Saves the item with the given @p key.
*
* @param key the key of the item
- * @param preferredGroup the preferred group, or QString::null
+ * @param preferredGroup the preferred group, or TQString::null
* @param createGroup true to create the group if necessary
* @return the saved item
*/
- KFileMetaInfoItem saveItem( const QString& key,
- const QString& preferredGroup = QString::null,
+ KFileMetaInfoItem saveItem( const TQString& key,
+ const TQString& preferredGroup = TQString::null,
bool createGroup = true );
/**
@@ -1097,7 +1097,7 @@ public:
* @param key the key of the item
* @return the group. Invalid if there is no group with the given @p key.
*/
- KFileMetaInfoGroup group(const QString& key) const;
+ KFileMetaInfoGroup group(const TQString& key) const;
/**
* Returns the KFileMetaInfoGroup with the given @p key.
@@ -1105,7 +1105,7 @@ public:
* @param key the key of the item
* @return the group. Invalid if there is no group with the given @p key.
*/
- KFileMetaInfoGroup operator[] (const QString& key) const
+ KFileMetaInfoGroup operator[] (const TQString& key) const
{
return group(key);
}
@@ -1120,7 +1120,7 @@ public:
* @param name the name of the group to add
* @return true if successful, false if not
*/
- bool addGroup( const QString& name );
+ bool addGroup( const TQString& name );
/**
* Remove the specified group. This will only succeed if it is
@@ -1131,14 +1131,14 @@ public:
* @param name the name of the group to remove
* @return true if successful, false if not
*/
- bool removeGroup( const QString& name );
+ bool removeGroup( const TQString& name );
/**
* Returns a list of removed groups.
*
* @return a list of removed groups.
*/
- QStringList removedGroups();
+ TQStringList removedGroups();
/**
* This method writes all pending changes of the meta info back to the file.
@@ -1156,7 +1156,7 @@ public:
*
* @return true if successful, false if not
*/
- bool applyChanges(const QString& path);
+ bool applyChanges(const TQString& path);
/**
* Checks whether an item with the given @p key exists.
@@ -1164,7 +1164,7 @@ public:
* @param key the key to check
* @return whether an item for this @p key exists.
*/
- bool contains( const QString& key ) const;
+ bool contains( const TQString& key ) const;
/**
* Checks whether a group with the given @p key exists.
@@ -1172,7 +1172,7 @@ public:
* @param key the key to check
* @return whether a group with this name exists.
*/
- bool containsGroup( const QString& key ) const;
+ bool containsGroup( const TQString& key ) const;
/**
* Returns the value with the given @p key.
@@ -1180,7 +1180,7 @@ public:
* @param key the key to retrieve
* @return the value. Invalid if it does not exist
*/
- const QVariant value( const QString& key ) const
+ const TQVariant value( const TQString& key ) const
{
return item(key).value();
}
@@ -1207,14 +1207,14 @@ public:
*
* @return the file's mime type
*/
- QString mimeType() const;
+ TQString mimeType() const;
/**
- * Returns the path of file - or QString::null if file is non-local
+ * Returns the path of file - or TQString::null if file is non-local
*
- * @return the file's path - or QString::null if file is non-local
+ * @return the file's path - or TQString::null if file is non-local
*/
- QString path() const;
+ TQString path() const;
/**
* Returns the url of file
@@ -1223,12 +1223,12 @@ public:
*/
KURL url() const;
- KIO_EXPORT friend QDataStream& operator >>(QDataStream& s, KFileMetaInfo& );
- KIO_EXPORT friend QDataStream& operator <<(QDataStream& s, const KFileMetaInfo& );
+ KIO_EXPORT friend TQDataStream& operator >>(TQDataStream& s, KFileMetaInfo& );
+ KIO_EXPORT friend TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfo& );
friend class KFilePlugin;
protected:
- KFileMetaInfoGroup appendGroup(const QString& name);
+ KFileMetaInfoGroup appendGroup(const TQString& name);
/**
* @return a pointer to the plugin that belogs to this object's mimetype.
@@ -1243,10 +1243,10 @@ protected:
private:
KFileMetaInfoItem findEditableItem( KFileMetaInfoGroup& group,
- const QString& key );
+ const TQString& key );
void init( const KURL& url,
- const QString& mimeType = QString::null,
+ const TQString& mimeType = TQString::null,
uint what = Fastest);
};
@@ -1276,8 +1276,8 @@ private:
*
* Example:
* @code
- * FooPlugin::FooPlugin(QObject *parent, const char *name,
- * const QStringList &args)
+ * FooPlugin::FooPlugin(TQObject *parent, const char *name,
+ * const TQStringList &args)
* : KFilePlugin(parent, name, args)
* {
* KFileMimeTypeInfo* info = addMimeTypeInfo( "application/x-foo" );
@@ -1289,12 +1289,12 @@ private:
* KFileMimeTypeInfo::ItemInfo* item;
*
* // our new items in the group
- * item = addItemInfo(group, "Items", i18n("Items"), QVariant::Int);
- * item = addItemInfo(group, "Size", i18n("Size"), QVariant::Int);
+ * item = addItemInfo(group, "Items", i18n("Items"), TQVariant::Int);
+ * item = addItemInfo(group, "Size", i18n("Size"), TQVariant::Int);
* setUnit(item, KFileMimeTypeInfo::KiloBytes);
*
* // strings are possible, too:
- * //addItemInfo(group, "Document Type", i18n("Document type"), QVariant::String);
+ * //addItemInfo(group, "Document Type", i18n("Document type"), TQVariant::String);
* }
* @endcode
*
@@ -1311,7 +1311,7 @@ private:
* achieve this task. This might be the best way for binary files, since a
* change in the file format is likely to be supported by subsequent releases
* of that library. Alternatively, for text-based file formats, you can use
- * QTextStream to parse the file. For simple file formats, QRegExp can be of
+ * TQTextStream to parse the file. For simple file formats, TQRegExp can be of
* great help, too.
*
* After you extracted the relevant information, use appendGroup() and
@@ -1343,8 +1343,8 @@ private:
*
* If you want to define mutable meta information items, you need to overwrite
* the writeInfo() method. In this method, you can use third-party library
- * (appropriate mostly for binary files, see above) or QTextStream to write the
- * information back to the file. If you use QTextStream, be sure to write all
+ * (appropriate mostly for binary files, see above) or TQTextStream to write the
+ * information back to the file. If you use TQTextStream, be sure to write all
* file contents back.
*
* For some items, it might be that not all possible values are allowed. You
@@ -1400,17 +1400,17 @@ public:
* Creates a new KFilePlugin instance. You need to implement a constructor
* with the same argument list as this is required by KGenericFactory
*
- * @param parent the parent of the QObject, can be @c 0
- * @param name the name of the QObject, can be @c 0
+ * @param parent the parent of the TQObject, can be @c 0
+ * @param name the name of the TQObject, can be @c 0
* @param args currently ignored
*
* @see addMimeTypeInfo()
* @see addGroupInfo()
* @see addItemInfo()
- * @see QObject()
+ * @see TQObject()
**/
- KFilePlugin( QObject *parent, const char *name,
- const QStringList& args );
+ KFilePlugin( TQObject *parent, const char *name,
+ const TQStringList& args );
/**
* Destructor
@@ -1456,13 +1456,13 @@ public:
* @param mimeType the mime type
* @param group the group name of the validator item
* @param key the key name of the validator item
- * @param parent the QObject parent, can be @c 0
- * @param name the name of the QObject, can be @c 0
+ * @param parent the TQObject parent, can be @c 0
+ * @param name the name of the TQObject, can be @c 0
**/
- virtual QValidator* createValidator( const QString& mimeType,
- const QString& group,
- const QString& key,
- QObject* parent,
+ virtual TQValidator* createValidator( const TQString& mimeType,
+ const TQString& group,
+ const TQString& key,
+ TQObject* parent,
const char* name) const
{
Q_UNUSED(mimeType); Q_UNUSED(group);Q_UNUSED(key);
@@ -1479,7 +1479,7 @@ protected:
* @param mimeType a string containing the mimetype, e.g. @c "text/html"
* @return a KFileMimeTypeInfo object, to be used with addGroupInfo()
**/
- KFileMimeTypeInfo * addMimeTypeInfo( const QString& mimeType );
+ KFileMimeTypeInfo * addMimeTypeInfo( const TQString& mimeType );
// ### do we need this, if it only calls the provider?
// IMHO the Plugin shouldn't call its provider.
// DF: yes we need this. A plugin can create more than one mimetypeinfo.
@@ -1504,7 +1504,7 @@ protected:
* @see addItemInfo()
**/
KFileMimeTypeInfo::GroupInfo* addGroupInfo(KFileMimeTypeInfo* info,
- const QString& key, const QString& translatedKey) const;
+ const TQString& key, const TQString& translatedKey) const;
/**
* Sets attributes of the GroupInfo object returned by addGroupInfo().
@@ -1515,7 +1515,7 @@ protected:
**/
void setAttributes(KFileMimeTypeInfo::GroupInfo* gi, uint attr) const;
- void addVariableInfo(KFileMimeTypeInfo::GroupInfo* gi, QVariant::Type type,
+ void addVariableInfo(KFileMimeTypeInfo::GroupInfo* gi, TQVariant::Type type,
uint attr) const;
/**
@@ -1528,14 +1528,14 @@ protected:
* parameter
* @param translatedKey the translated version of the key string for
* displaying in user interfaces. Use i18n() to translate the string
- * @param type the type of the meta information item, e.g. QVariant::Int
- * or QVariant::String.
+ * @param type the type of the meta information item, e.g. TQVariant::Int
+ * or TQVariant::String.
* @return an ItemInfo object. Pass this object to setAttributes()
**/
KFileMimeTypeInfo::ItemInfo* addItemInfo(KFileMimeTypeInfo::GroupInfo* gi,
- const QString& key,
- const QString& translatedKey,
- QVariant::Type type);
+ const TQString& key,
+ const TQString& translatedKey,
+ TQVariant::Type type);
/**
* Sets some attributes for a meta information item. The attributes
@@ -1579,7 +1579,7 @@ protected:
* @param item the ItemInfo object as returned by addItemInfo()
* @param prefix the prefix string to display
**/
- void setPrefix(KFileMimeTypeInfo::ItemInfo* item, const QString& prefix);
+ void setPrefix(KFileMimeTypeInfo::ItemInfo* item, const TQString& prefix);
/**
* Sets a suffix string which is displayed before the item's value. Use
@@ -1589,7 +1589,7 @@ protected:
* @param item the ItemInfo object as returned by addItemInfo()
* @param suffix the suffix string to display
**/
- void setSuffix(KFileMimeTypeInfo::ItemInfo* item, const QString& suffix);
+ void setSuffix(KFileMimeTypeInfo::ItemInfo* item, const TQString& suffix);
/**
* Call this method from within readInfo() to indicate that you wish to
@@ -1602,7 +1602,7 @@ protected:
* defined in your class' constructor
* @return a KFileMetaInfoGroup object, to be used in appendItem()
**/
- KFileMetaInfoGroup appendGroup(KFileMetaInfo& info, const QString& key);
+ KFileMetaInfoGroup appendGroup(KFileMetaInfo& info, const TQString& key);
/**
* Call this method from within readInfo() to fill the meta information item
@@ -1612,10 +1612,10 @@ protected:
* @param key the key string to identify the item.
* @param value the value of the meta information item
**/
- void appendItem(KFileMetaInfoGroup& group, const QString& key, QVariant value);
+ void appendItem(KFileMetaInfoGroup& group, const TQString& key, TQVariant value);
- QStringList m_preferredKeys;
- QStringList m_preferredGroups;
+ TQStringList m_preferredKeys;
+ TQStringList m_preferredGroups;
protected:
/**
@@ -1657,23 +1657,23 @@ public:
* @return a pointer to the plugin that belongs to the specified mimetype,
* which means also load the plugin if it's not in memory
*/
- KFilePlugin * plugin( const QString& mimeType ); // KDE4: merge with method below
+ KFilePlugin * plugin( const TQString& mimeType ); // KDE4: merge with method below
/**
* @return a pointer to the plugin that belongs to the specified mimetype,
* for the given protocol.
* This loads the plugin if it's not in memory yet.
*/
- KFilePlugin * plugin( const QString& mimeType, const QString& protocol );
+ KFilePlugin * plugin( const TQString& mimeType, const TQString& protocol );
- const KFileMimeTypeInfo * mimeTypeInfo( const QString& mimeType ); // KDE4: merge with below
- const KFileMimeTypeInfo * mimeTypeInfo( const QString& mimeType, const QString& protocol );
+ const KFileMimeTypeInfo * mimeTypeInfo( const TQString& mimeType ); // KDE4: merge with below
+ const KFileMimeTypeInfo * mimeTypeInfo( const TQString& mimeType, const TQString& protocol );
- QStringList preferredKeys( const QString& mimeType ) const;
- QStringList preferredGroups( const QString& mimeType ) const;
+ TQStringList preferredKeys( const TQString& mimeType ) const;
+ TQStringList preferredGroups( const TQString& mimeType ) const;
/// @since 3.1
- QStringList supportedMimeTypes() const;
+ TQStringList supportedMimeTypes() const;
protected: // ## should be private, right?
KFileMetaInfoProvider();
@@ -1705,34 +1705,34 @@ private:
// The key is either a mimetype or a protocol. Those things don't look the same
// so there's no need for two QDicts.
- QDict<CachedPluginInfo> m_plugins;
+ TQDict<CachedPluginInfo> m_plugins;
// This data is aggregated during the creation of a plugin,
// before being moved to the appropriate CachedPluginInfo(s)
// At any other time than during the loading of a plugin, this dict is EMPTY.
// Same key as in m_plugins: mimetype or protocol
- QDict<KFileMimeTypeInfo> m_pendingMimetypeInfos;
+ TQDict<KFileMimeTypeInfo> m_pendingMimetypeInfos;
private:
static KFileMetaInfoProvider * s_self;
- KFilePlugin* loadPlugin( const QString& mimeType, const QString& protocol );
- KFilePlugin* loadAndRegisterPlugin( const QString& mimeType, const QString& protocol );
- KFileMimeTypeInfo * addMimeTypeInfo( const QString& mimeType );
+ KFilePlugin* loadPlugin( const TQString& mimeType, const TQString& protocol );
+ KFilePlugin* loadAndRegisterPlugin( const TQString& mimeType, const TQString& protocol );
+ KFileMimeTypeInfo * addMimeTypeInfo( const TQString& mimeType );
class KFileMetaInfoProviderPrivate;
KFileMetaInfoProviderPrivate *d;
};
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoItem& );
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoItem& );
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoItem& );
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoItem& );
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfoGroup& );
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfoGroup& );
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfoGroup& );
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfoGroup& );
-KIO_EXPORT QDataStream& operator <<(QDataStream& s, const KFileMetaInfo& );
-KIO_EXPORT QDataStream& operator >>(QDataStream& s, KFileMetaInfo& );
+KIO_EXPORT TQDataStream& operator <<(TQDataStream& s, const KFileMetaInfo& );
+KIO_EXPORT TQDataStream& operator >>(TQDataStream& s, KFileMetaInfo& );
#endif // KILEMETAINFO_H
diff --git a/kio/kio/kfileshare.cpp b/kio/kio/kfileshare.cpp
index f381f7be6..6b9bf361d 100644
--- a/kio/kio/kfileshare.cpp
+++ b/kio/kio/kfileshare.cpp
@@ -18,8 +18,8 @@
*/
#include "kfileshare.h"
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kprocess.h>
#include <kprocio.h>
#include <klocale.h>
@@ -35,14 +35,14 @@
#include <kuser.h>
KFileShare::Authorization KFileShare::s_authorization = NotInitialized;
-QStringList* KFileShare::s_shareList = 0L;
-static KStaticDeleter<QStringList> sdShareList;
+TQStringList* KFileShare::s_shareList = 0L;
+static KStaticDeleter<TQStringList> sdShareList;
KFileShare::ShareMode KFileShare::s_shareMode;
bool KFileShare::s_sambaEnabled;
bool KFileShare::s_nfsEnabled;
bool KFileShare::s_restricted;
-QString KFileShare::s_fileShareGroup;
+TQString KFileShare::s_fileShareGroup;
bool KFileShare::s_sharingEnabled;
@@ -51,12 +51,12 @@ bool KFileShare::s_sharingEnabled;
KFileSharePrivate::KFileSharePrivate()
{
KDirWatch::self()->addFile(FILESHARECONF);
- connect(KDirWatch::self(), SIGNAL(dirty (const QString&)),this,
- SLOT(slotFileChange(const QString &)));
- connect(KDirWatch::self(), SIGNAL(created(const QString&)),this,
- SLOT(slotFileChange(const QString &)));
- connect(KDirWatch::self(), SIGNAL(deleted(const QString&)),this,
- SLOT(slotFileChange(const QString &)));
+ connect(KDirWatch::self(), TQT_SIGNAL(dirty (const TQString&)),this,
+ TQT_SLOT(slotFileChange(const TQString &)));
+ connect(KDirWatch::self(), TQT_SIGNAL(created(const TQString&)),this,
+ TQT_SLOT(slotFileChange(const TQString &)));
+ connect(KDirWatch::self(), TQT_SIGNAL(deleted(const TQString&)),this,
+ TQT_SLOT(slotFileChange(const TQString &)));
}
KFileSharePrivate::~KFileSharePrivate()
@@ -75,7 +75,7 @@ KFileSharePrivate* KFileSharePrivate::self()
return _self;
}
-void KFileSharePrivate::slotFileChange(const QString &file)
+void KFileSharePrivate::slotFileChange(const TQString &file)
{
if(file==FILESHARECONF) {
KFileShare::readConfig();
@@ -87,7 +87,7 @@ void KFileShare::readConfig() // static
{
// Create KFileSharePrivate instance
KFileSharePrivate::self();
- KSimpleConfig config(QString::fromLatin1(FILESHARECONF),true);
+ KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
s_sharingEnabled = config.readEntry("FILESHARING", "yes") == "yes";
s_restricted = config.readEntry("RESTRICT", "yes") == "yes";
@@ -139,7 +139,7 @@ bool KFileShare::isRestricted() {
return s_restricted;
}
-QString KFileShare::fileShareGroup() {
+TQString KFileShare::fileShareGroup() {
if ( s_authorization == NotInitialized )
readConfig();
@@ -166,12 +166,12 @@ void KFileShare::readShareList()
{
KFileSharePrivate::self();
if ( !s_shareList )
- sdShareList.setObject( s_shareList, new QStringList );
+ sdShareList.setObject( s_shareList, new TQStringList );
else
s_shareList->clear();
// /usr/sbin on Mandrake, $PATH allows flexibility for other distributions
- QString exe = findExe( "filesharelist" );
+ TQString exe = findExe( "filesharelist" );
if (exe.isEmpty()) {
s_authorization = ErrorNotFound;
return;
@@ -185,7 +185,7 @@ void KFileShare::readShareList()
}
// Reading code shamelessly stolen from khostname.cpp ;)
- QString line;
+ TQString line;
int length;
do {
length = proc.readln(line, true);
@@ -200,12 +200,12 @@ void KFileShare::readShareList()
}
-bool KFileShare::isDirectoryShared( const QString& _path )
+bool KFileShare::isDirectoryShared( const TQString& _path )
{
if ( ! s_shareList )
readShareList();
- QString path( _path );
+ TQString path( _path );
if ( path[path.length()-1] != '/' )
path += '/';
return s_shareList && s_shareList->contains( path );
@@ -219,24 +219,24 @@ KFileShare::Authorization KFileShare::authorization()
return s_authorization;
}
-QString KFileShare::findExe( const char* exeName )
+TQString KFileShare::findExe( const char* exeName )
{
// /usr/sbin on Mandrake, $PATH allows flexibility for other distributions
- QString path = QString::fromLocal8Bit(getenv("PATH")) + QString::fromLatin1(":/usr/sbin");
- QString exe = KStandardDirs::findExe( exeName, path );
+ TQString path = TQString::fromLocal8Bit(getenv("PATH")) + TQString::fromLatin1(":/usr/sbin");
+ TQString exe = KStandardDirs::findExe( exeName, path );
if (exe.isEmpty())
kdError() << exeName << " not found in " << path << endl;
return exe;
}
-bool KFileShare::setShared( const QString& path, bool shared )
+bool KFileShare::setShared( const TQString& path, bool shared )
{
if (! KFileShare::sharingEnabled() ||
KFileShare::shareMode() == Advanced)
return false;
kdDebug(7000) << "KFileShare::setShared " << path << "," << shared << endl;
- QString exe = KFileShare::findExe( "fileshareset" );
+ TQString exe = KFileShare::findExe( "fileshareset" );
if (exe.isEmpty())
return false;
diff --git a/kio/kio/kfileshare.h b/kio/kio/kfileshare.h
index d95e9764f..6753e055a 100644
--- a/kio/kio/kfileshare.h
+++ b/kio/kio/kfileshare.h
@@ -19,7 +19,7 @@
#ifndef kfileshare_h
#define kfileshare_h
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -40,7 +40,7 @@ public:
static KFileSharePrivate *self();
static KFileSharePrivate *_self;
protected slots: // this is why this class needs to be in the .h
- void slotFileChange(const QString &);
+ void slotFileChange(const TQString &);
};
/**
@@ -67,7 +67,7 @@ public:
/**
* Call this to know if a directory is currently shared
*/
- static bool isDirectoryShared( const QString& path );
+ static bool isDirectoryShared( const TQString& path );
enum Authorization { NotInitialized, ErrorNotFound, Authorized, UserNotAllowed };
/**
@@ -75,7 +75,7 @@ public:
*/
static Authorization authorization();
- static QString findExe( const char* exeName );
+ static TQString findExe( const char* exeName );
/**
* Uses a suid perl script to share the given path
@@ -84,7 +84,7 @@ public:
* @param shared whether the path should be shared or not
* @returns whether the perl script was successful
*/
- static bool setShared( const QString& path, bool shared );
+ static bool setShared( const TQString& path, bool shared );
/**
* The used share mode.
@@ -115,7 +115,7 @@ public:
* That is, all users in that group are allowed to
* share files if file sharing is restricted.
*/
- static QString fileShareGroup();
+ static TQString fileShareGroup();
/**
* Returns the configured share mode
@@ -134,12 +134,12 @@ public:
private:
static Authorization s_authorization;
- static QStringList* s_shareList;
+ static TQStringList* s_shareList;
static ShareMode s_shareMode;
static bool s_sambaEnabled;
static bool s_nfsEnabled;
static bool s_restricted;
- static QString s_fileShareGroup;
+ static TQString s_fileShareGroup;
static bool s_sharingEnabled;
};
diff --git a/kio/kio/kfilterbase.cpp b/kio/kio/kfilterbase.cpp
index ae973c57f..50ff5498a 100644
--- a/kio/kio/kfilterbase.cpp
+++ b/kio/kio/kfilterbase.cpp
@@ -33,23 +33,23 @@ KFilterBase::~KFilterBase()
delete m_dev;
}
-void KFilterBase::setDevice( QIODevice * dev, bool autodelete )
+void KFilterBase::setDevice( TQIODevice * dev, bool autodelete )
{
m_dev = dev;
m_bAutoDel = autodelete;
}
-KFilterBase * KFilterBase::findFilterByFileName( const QString & fileName )
+KFilterBase * KFilterBase::findFilterByFileName( const TQString & fileName )
{
KMimeType::Ptr mime = KMimeType::findByPath( fileName );
kdDebug(7005) << "KFilterBase::findFilterByFileName mime=" << mime->name() << endl;
return findFilterByMimeType(mime->name());
}
-KFilterBase * KFilterBase::findFilterByMimeType( const QString & mimeType )
+KFilterBase * KFilterBase::findFilterByMimeType( const TQString & mimeType )
{
KTrader::OfferList offers = KTrader::self()->query( "KDECompressionFilter",
- QString("'") + mimeType + "' in ServiceTypes" );
+ TQString("'") + mimeType + "' in ServiceTypes" );
KTrader::OfferList::ConstIterator it = offers.begin();
KTrader::OfferList::ConstIterator end = offers.end();
diff --git a/kio/kio/kfilterbase.h b/kio/kio/kfilterbase.h
index fb2451f27..cfc037fe5 100644
--- a/kio/kio/kfilterbase.h
+++ b/kio/kio/kfilterbase.h
@@ -19,8 +19,8 @@
#ifndef __kfilterbase__h
#define __kfilterbase__h
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -35,7 +35,7 @@ class QIODevice;
* such as gzip and bzip2. It's pretty much internal.
* Don't use directly, use KFilterDev instead.
*/
-class KIO_EXPORT KFilterBase : public QObject // needs to inherit QObject for KLibFactory::create
+class KIO_EXPORT KFilterBase : public TQObject // needs to inherit TQObject for KLibFactory::create
{
Q_OBJECT
public:
@@ -47,7 +47,7 @@ public:
* @param dev the device on which the filter will work
* @param autodelete if true, @p dev is deleted when the filter is deleted
*/
- void setDevice( QIODevice * dev, bool autodelete = false );
+ void setDevice( TQIODevice * dev, bool autodelete = false );
// Note that this isn't in the constructor, because of KLibFactory::create,
// but it should be called before using the filterbase !
@@ -55,7 +55,7 @@ public:
* Returns the device on which the filter will work.
* @returns the device on which the filter will work
*/
- QIODevice * device() { return m_dev; }
+ TQIODevice * device() { return m_dev; }
/** \internal */
virtual void init( int mode ) = 0;
/** \internal */
@@ -67,7 +67,7 @@ public:
/** \internal */
virtual bool readHeader() = 0;
/** \internal */
- virtual bool writeHeader( const QCString & filename ) = 0;
+ virtual bool writeHeader( const TQCString & filename ) = 0;
/** \internal */
virtual void setOutBuffer( char * data, uint maxlen ) = 0;
/** \internal */
@@ -94,7 +94,7 @@ public:
* @param fileName the name of the file to filter
* @return the filter for the @p fileName, or 0 if not found
*/
- static KFilterBase * findFilterByFileName( const QString & fileName );
+ static KFilterBase * findFilterByFileName( const TQString & fileName );
/**
* Call this to create the appropriate filter for the mimetype
@@ -102,10 +102,10 @@ public:
* @param mimeType the mime type of the file to filter
* @return the filter for the @p mimeType, or 0 if not found
*/
- static KFilterBase * findFilterByMimeType( const QString & mimeType );
+ static KFilterBase * findFilterByMimeType( const TQString & mimeType );
protected:
- QIODevice * m_dev;
+ TQIODevice * m_dev;
bool m_bAutoDel;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/kfilterdev.cpp b/kio/kio/kfilterdev.cpp
index d1f361d58..224d68761 100644
--- a/kio/kio/kfilterdev.cpp
+++ b/kio/kio/kfilterdev.cpp
@@ -22,7 +22,7 @@
#include <stdio.h> // for EOF
#include <stdlib.h>
#include <assert.h>
-#include <qfile.h>
+#include <tqfile.h>
#define BUFFER_SIZE 8*1024
@@ -37,9 +37,9 @@ public:
bool autoDeleteFilterBase;
bool bOpenedUnderlyingDevice;
bool bIgnoreData;
- QByteArray buffer; // Used as 'input buffer' when reading, as 'output buffer' when writing
- QCString ungetchBuffer;
- QCString origFileName;
+ TQByteArray buffer; // Used as 'input buffer' when reading, as 'output buffer' when writing
+ TQCString ungetchBuffer;
+ TQCString origFileName;
KFilterBase::Result result;
};
@@ -63,14 +63,14 @@ KFilterDev::~KFilterDev()
#ifndef KDE_NO_COMPAT
//this one is static
// Cumbersome API. To be removed in KDE 3.0.
-QIODevice* KFilterDev::createFilterDevice(KFilterBase* base, QFile* file)
+TQIODevice* KFilterDev::createFilterDevice(KFilterBase* base, TQFile* file)
{
if (file==0)
return 0;
//we don't need a filter
if (base==0)
- return new QFile(file->name()); // A bit strange IMHO. We ask for a QFile but we create another one !?! (DF)
+ return new TQFile(file->name()); // A bit strange IMHO. We ask for a TQFile but we create another one !?! (DF)
base->setDevice(file);
return new KFilterDev(base);
@@ -78,10 +78,10 @@ QIODevice* KFilterDev::createFilterDevice(KFilterBase* base, QFile* file)
#endif
//static
-QIODevice * KFilterDev::deviceForFile( const QString & fileName, const QString & mimetype,
+TQIODevice * KFilterDev::deviceForFile( const TQString & fileName, const TQString & mimetype,
bool forceFilter )
{
- QFile * f = new QFile( fileName );
+ TQFile * f = new TQFile( fileName );
KFilterBase * base = mimetype.isEmpty() ? KFilterBase::findFilterByFileName( fileName )
: KFilterBase::findFilterByMimeType( mimetype );
if ( base )
@@ -98,12 +98,12 @@ QIODevice * KFilterDev::deviceForFile( const QString & fileName, const QString &
}
}
-QIODevice * KFilterDev::device( QIODevice* inDevice, const QString & mimetype)
+TQIODevice * KFilterDev::device( TQIODevice* inDevice, const TQString & mimetype)
{
return device( inDevice, mimetype, true );
}
-QIODevice * KFilterDev::device( QIODevice* inDevice, const QString & mimetype, bool autoDeleteInDevice )
+TQIODevice * KFilterDev::device( TQIODevice* inDevice, const TQString & mimetype, bool autoDeleteInDevice )
{
if (inDevice==0)
return 0;
@@ -169,7 +169,7 @@ void KFilterDev::flush()
// Hmm, might not be enough...
}
-QIODevice::Offset KFilterDev::size() const
+TQIODevice::Offset KFilterDev::size() const
{
// Well, hmm, Houston, we have a problem.
// We can't know the size of the uncompressed data
@@ -182,12 +182,12 @@ QIODevice::Offset KFilterDev::size() const
return (uint)-1;
}
-QIODevice::Offset KFilterDev::at() const
+TQIODevice::Offset KFilterDev::at() const
{
return ioIndex;
}
-bool KFilterDev::at( QIODevice::Offset pos )
+bool KFilterDev::at( TQIODevice::Offset pos )
{
//kdDebug(7005) << "KFilterDev::at " << pos << " currently at " << ioIndex << endl;
@@ -219,9 +219,9 @@ bool KFilterDev::at( QIODevice::Offset pos )
}
//kdDebug(7005) << "KFilterDev::at : reading " << pos << " dummy bytes" << endl;
- QByteArray dummy( QMIN( pos, 3*BUFFER_SIZE ) );
+ TQByteArray dummy( QMIN( pos, 3*BUFFER_SIZE ) );
d->bIgnoreData = true;
- bool result = ( (QIODevice::Offset)readBlock( dummy.data(), pos ) == pos );
+ bool result = ( (TQIODevice::Offset)readBlock( dummy.data(), pos ) == pos );
d->bIgnoreData = false;
return result;
}
@@ -440,12 +440,12 @@ int KFilterDev::getch()
int ch = d->ungetchBuffer[ len-1 ];
d->ungetchBuffer.truncate( len - 1 );
ioIndex++;
- //kdDebug(7005) << "KFilterDev::getch from ungetch: " << QString(QChar(ch)) << endl;
+ //kdDebug(7005) << "KFilterDev::getch from ungetch: " << TQString(TQChar(ch)) << endl;
return ch;
}
char buf[1];
int ret = readBlock( buf, 1 ) == 1 ? buf[0] : EOF;
- //kdDebug(7005) << "KFilterDev::getch ret=" << QString(QChar(ret)) << endl;
+ //kdDebug(7005) << "KFilterDev::getch ret=" << TQString(TQChar(ret)) << endl;
return ret;
}
@@ -459,7 +459,7 @@ int KFilterDev::putch( int c )
int KFilterDev::ungetch( int ch )
{
- //kdDebug(7005) << "KFilterDev::ungetch " << QString(QChar(ch)) << endl;
+ //kdDebug(7005) << "KFilterDev::ungetch " << TQString(TQChar(ch)) << endl;
if ( ch == EOF ) // cannot unget EOF
return ch;
@@ -469,7 +469,7 @@ int KFilterDev::ungetch( int ch )
return ch;
}
-void KFilterDev::setOrigFileName( const QCString & fileName )
+void KFilterDev::setOrigFileName( const TQCString & fileName )
{
d->origFileName = fileName;
}
diff --git a/kio/kio/kfilterdev.h b/kio/kio/kfilterdev.h
index d1a2d0315..9e3bf508c 100644
--- a/kio/kio/kfilterdev.h
+++ b/kio/kio/kfilterdev.h
@@ -18,8 +18,8 @@
#ifndef __kfilterdev_h
#define __kfilterdev_h
-#include <qiodevice.h>
-#include <qstring.h>
+#include <tqiodevice.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class QFile;
@@ -66,7 +66,7 @@ public:
* set the name of the original file, to be used in the gzip header.
* @param fileName the name of the original file
*/
- void setOrigFileName( const QCString & fileName );
+ void setOrigFileName( const TQCString & fileName );
/**
* Call this let this device skip the gzip headers when reading/writing.
@@ -77,13 +77,13 @@ public:
void setSkipHeaders();
// Not implemented
- virtual QIODevice::Offset size() const;
+ virtual TQIODevice::Offset size() const;
- virtual QIODevice::Offset at() const;
+ virtual TQIODevice::Offset at() const;
/**
* That one can be quite slow, when going back. Use with care.
*/
- virtual bool at( QIODevice::Offset );
+ virtual bool at( TQIODevice::Offset );
virtual bool atEnd() const;
@@ -100,12 +100,12 @@ private:
#endif
/**
* Call this to create the appropriate filter device for @p base
- * working on @p file . The returned QIODevice has to be deleted
+ * working on @p file . The returned TQIODevice has to be deleted
* after using.
* @deprecated. Use deviceForFile instead.
* To be removed in KDE 3.0
*/
- static QIODevice* createFilterDevice(KFilterBase* base, QFile* file) KDE_DEPRECATED;
+ static TQIODevice* createFilterDevice(KFilterBase* base, TQFile* file) KDE_DEPRECATED;
public:
/**
@@ -118,27 +118,27 @@ public:
* to force the corresponding decompression filter, if available.
*
* Warning: application/x-bzip2 may not be available.
- * In that case a QFile opened on the compressed data will be returned !
+ * In that case a TQFile opened on the compressed data will be returned !
* Use KFilterBase::findFilterByMimeType and code similar to what
* deviceForFile is doing, to better control what's happening.
*
- * The returned QIODevice has to be deleted after using.
+ * The returned TQIODevice has to be deleted after using.
*
* @param fileName the name of the file to filter
- * @param mimetype the mime type of the file to filter, or QString::null if unknown
+ * @param mimetype the mime type of the file to filter, or TQString::null if unknown
* @param forceFilter if true, the function will either find a compression filter, or return 0.
- * If false, it will always return a QIODevice. If no
- * filter is available it will return a simple QFile.
+ * If false, it will always return a TQIODevice. If no
+ * filter is available it will return a simple TQFile.
* This can be useful if the file is usable without a filter.
- * @return if a filter has been found, the QIODevice for the filter. If the
+ * @return if a filter has been found, the TQIODevice for the filter. If the
* filter does not exist, the return value depends on @p forceFilter.
- * The returned QIODevice has to be deleted after using.
+ * The returned TQIODevice has to be deleted after using.
*/
- static QIODevice * deviceForFile( const QString & fileName, const QString & mimetype = QString::null,
+ static TQIODevice * deviceForFile( const TQString & fileName, const TQString & mimetype = TQString::null,
bool forceFilter = false );
/**
- * Creates an i/o device that is able to read from the QIODevice @p inDevice,
+ * Creates an i/o device that is able to read from the TQIODevice @p inDevice,
* whether the data is compressed or not. Available compression filters
* (gzip/bzip2 etc.) will automatically be used.
*
@@ -149,17 +149,17 @@ public:
* Warning: application/x-bzip2 may not be available.
* In that case 0 will be returned !
*
- * The returned QIODevice has to be deleted after using.
+ * The returned TQIODevice has to be deleted after using.
* @param inDevice input device, becomes owned by this device! Automatically deleted!
* @param mimetype the mime type for the filter
- * @return a QIODevice that filters the original stream. Must be deleted after
+ * @return a TQIODevice that filters the original stream. Must be deleted after
* using
*/
- static QIODevice * device( QIODevice* inDevice, const QString & mimetype);
+ static TQIODevice * device( TQIODevice* inDevice, const TQString & mimetype);
// BIC: merge with device() method below, using default value for autoDeleteInDevice
/**
- * Creates an i/o device that is able to read from the QIODevice @p inDevice,
+ * Creates an i/o device that is able to read from the TQIODevice @p inDevice,
* whether the data is compressed or not. Available compression filters
* (gzip/bzip2 etc.) will automatically be used.
*
@@ -170,15 +170,15 @@ public:
* Warning: application/x-bzip2 may not be available.
* In that case 0 will be returned !
*
- * The returned QIODevice has to be deleted after using.
+ * The returned TQIODevice has to be deleted after using.
* @param inDevice input device. Won't be deleted if @p autoDeleteInDevice = false
* @param mimetype the mime type for the filter
* @param autoDeleteInDevice if true, @p inDevice will be deleted automatically
- * @return a QIODevice that filters the original stream. Must be deleted after
+ * @return a TQIODevice that filters the original stream. Must be deleted after
* using
* @since 3.1
*/
- static QIODevice * device( QIODevice* inDevice, const QString & mimetype, bool autoDeleteInDevice );
+ static TQIODevice * device( TQIODevice* inDevice, const TQString & mimetype, bool autoDeleteInDevice );
private:
KFilterBase *filter;
diff --git a/kio/kio/kimageio.cpp b/kio/kio/kimageio.cpp
index 342b2554d..8d4a45db4 100644
--- a/kio/kio/kimageio.cpp
+++ b/kio/kio/kimageio.cpp
@@ -10,12 +10,12 @@
#include"config.h"
-#include <qdir.h>
+#include <tqdir.h>
#include <kapplication.h>
#include <kstandarddirs.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqvaluelist.h>
#include <ltdl.h>
#include "kimageio.h"
@@ -29,9 +29,9 @@
#include <kdebug.h>
#include <kstaticdeleter.h>
-#include <qimage.h>
+#include <tqimage.h>
-KImageIOFormat::KImageIOFormat( const QString &path)
+KImageIOFormat::KImageIOFormat( const TQString &path)
: KSycocaEntry(path)
{
bLibLoaded = false;
@@ -52,7 +52,7 @@ KImageIOFormat::KImageIOFormat( const QString &path)
rPaths = config.readPathListEntry("rPaths");
}
-KImageIOFormat::KImageIOFormat( QDataStream& _str, int offset) :
+KImageIOFormat::KImageIOFormat( TQDataStream& _str, int offset) :
KSycocaEntry( _str, offset)
{
bLibLoaded = false;
@@ -66,7 +66,7 @@ KImageIOFormat::~KImageIOFormat()
}
void
-KImageIOFormat::load( QDataStream& _str)
+KImageIOFormat::load( TQDataStream& _str)
{
Q_INT8 iRead, iWrite;
KSycocaEntry::read(_str, mType);
@@ -83,7 +83,7 @@ KImageIOFormat::load( QDataStream& _str)
}
void
-KImageIOFormat::save( QDataStream& _str)
+KImageIOFormat::save( TQDataStream& _str)
{
KSycocaEntry::save( _str );
Q_INT8 iRead = bRead ? 1 : 0;
@@ -94,7 +94,7 @@ KImageIOFormat::save( QDataStream& _str)
}
void
-KImageIOFormat::callLibFunc( bool read, QImageIO *iio)
+KImageIOFormat::callLibFunc( bool read, TQImageIO *iio)
{
if (!bLibLoaded)
{
@@ -103,20 +103,20 @@ KImageIOFormat::callLibFunc( bool read, QImageIO *iio)
iio->setStatus(1); // Error
return;
}
- QString libpath = KLibLoader::findLibrary(mLib.ascii());
+ TQString libpath = KLibLoader::findLibrary(mLib.ascii());
if ( libpath.isEmpty())
{
iio->setStatus(1); // Error
return;
}
- lt_dlhandle libhandle = lt_dlopen( QFile::encodeName(libpath) );
+ lt_dlhandle libhandle = lt_dlopen( TQFile::encodeName(libpath) );
if (libhandle == 0) {
iio->setStatus(1); // error
kdWarning() << "KImageIOFormat::callLibFunc: couldn't dlopen " << mLib << "(" << lt_dlerror() << ")" << endl;
return;
}
bLibLoaded = true;
- QString funcName;
+ TQString funcName;
if (bRead)
{
funcName = "kimgio_"+mType.lower()+"_read";
@@ -126,7 +126,7 @@ KImageIOFormat::callLibFunc( bool read, QImageIO *iio)
iio->setStatus(1); // error
kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl;
}
- mReadFunc = (void (*)(QImageIO *))func;
+ mReadFunc = (void (*)(TQImageIO *))func;
}
if (bWrite)
{
@@ -137,7 +137,7 @@ KImageIOFormat::callLibFunc( bool read, QImageIO *iio)
iio->setStatus(1); // error
kdWarning() << "couln't find " << funcName << " (" << lt_dlerror() << ")" << endl;
}
- mWriteFunc = (void (*)(QImageIO *))func;
+ mWriteFunc = (void (*)(TQImageIO *))func;
}
}
@@ -173,9 +173,9 @@ KImageIOFactory::KImageIOFactory() : KSycocaFactory( KST_KImageIO )
kiioflsd.setObject( formatList, new KImageIOFormatList());
lt_dlinit(); // Do this only once!
// Add rPaths.
- for(QStringList::Iterator it = rPath.begin();
+ for(TQStringList::Iterator it = rPath.begin();
it != rPath.end(); ++it)
- lt_dladdsearchdir( QFile::encodeName(*it) );
+ lt_dladdsearchdir( TQFile::encodeName(*it) );
}
load();
}
@@ -196,10 +196,10 @@ KImageIOFactory::KImageIOFactory() : KSycocaFactory( KST_KImageIO )
QString
KImageIOFactory::createPattern( KImageIO::Mode _mode)
{
- QStringList patterns;
- QString allPatterns;
- QString wildCard("*.");
- QString separator("|");
+ TQStringList patterns;
+ TQString allPatterns;
+ TQString wildCard("*.");
+ TQString separator("|");
for( KImageIOFormatList::ConstIterator it = formatList->begin();
it != formatList->end();
++it )
@@ -208,9 +208,9 @@ KImageIOFactory::createPattern( KImageIO::Mode _mode)
if (((_mode == KImageIO::Reading) && format->bRead) ||
((_mode == KImageIO::Writing) && format->bWrite))
{
- QString pattern;
- QStringList suffices = format->mSuffices;
- for( QStringList::ConstIterator it = suffices.begin();
+ TQString pattern;
+ TQStringList suffices = format->mSuffices;
+ for( TQStringList::ConstIterator it = suffices.begin();
it != suffices.end();
++it)
{
@@ -232,17 +232,17 @@ KImageIOFactory::createPattern( KImageIO::Mode _mode)
patterns.sort();
patterns.prepend(allPatterns);
- QString pattern = patterns.join(QString::fromLatin1("\n"));
+ TQString pattern = patterns.join(TQString::fromLatin1("\n"));
return pattern;
}
void
-KImageIOFactory::readImage( QImageIO *iio)
+KImageIOFactory::readImage( TQImageIO *iio)
{
(void) self(); // Make sure we exist
const char *fm = iio->format();
if (!fm)
- fm = QImageIO::imageFormat( iio->ioDevice());
+ fm = TQImageIO::imageFormat( iio->ioDevice());
kdDebug() << "KImageIO: readImage() format = " << fm << endl;
KImageIOFormat *format = 0;
@@ -264,12 +264,12 @@ KImageIOFactory::readImage( QImageIO *iio)
}
void
-KImageIOFactory::writeImage( QImageIO *iio)
+KImageIOFactory::writeImage( TQImageIO *iio)
{
(void) self(); // Make sure we exist
const char *fm = iio->format();
if (!fm)
- fm = QImageIO::imageFormat( iio->ioDevice());
+ fm = TQImageIO::imageFormat( iio->ioDevice());
kdDebug () << "KImageIO: writeImage() format = "<< fm << endl;
KImageIOFormat *format = 0;
@@ -321,8 +321,8 @@ KImageIOFactory::load()
continue;
if (!format->mHeader.isEmpty() && !format->mLib.isEmpty())
{
- void (*readFunc)(QImageIO *);
- void (*writeFunc)(QImageIO *);
+ void (*readFunc)(TQImageIO *);
+ void (*writeFunc)(TQImageIO *);
if (format->bRead)
readFunc = readImage;
else
@@ -331,7 +331,7 @@ KImageIOFactory::load()
writeFunc = writeImage;
else
writeFunc = 0;
- QImageIO::defineIOHandler( format->mType.ascii(),
+ TQImageIO::defineIOHandler( format->mType.ascii(),
format->mHeader.ascii(),
format->mFlags.ascii(),
readFunc, writeFunc);
@@ -358,7 +358,7 @@ KImageIOFactory::createEntry(int offset)
{
KImageIOFormat *format = 0;
KSycocaType type;
- QDataStream *str = KSycoca::self()->findEntry(offset, type);
+ TQDataStream *str = KSycoca::self()->findEntry(offset, type);
switch (type)
{
case KST_KImageIOFormat:
@@ -389,7 +389,7 @@ KImageIO::pattern(Mode _mode)
return KImageIOFactory::self()->mWritePattern;
}
-bool KImageIO::canWrite(const QString& type)
+bool KImageIO::canWrite(const TQString& type)
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
@@ -408,7 +408,7 @@ bool KImageIO::canWrite(const QString& type)
return false;
}
-bool KImageIO::canRead(const QString& type)
+bool KImageIO::canRead(const TQString& type)
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
@@ -427,9 +427,9 @@ bool KImageIO::canRead(const QString& type)
return false;
}
-QStringList KImageIO::types(Mode _mode ) {
+TQStringList KImageIO::types(Mode _mode ) {
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
- QStringList types;
+ TQStringList types;
if(formatList)
{
@@ -447,7 +447,7 @@ QStringList KImageIO::types(Mode _mode ) {
return types;
}
-QString KImageIO::suffix(const QString& type)
+TQString KImageIO::suffix(const TQString& type)
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
@@ -463,10 +463,10 @@ QString KImageIO::suffix(const QString& type)
}
}
- return QString::null;
+ return TQString::null;
}
-QString KImageIO::typeForMime(const QString& mimeType)
+TQString KImageIO::typeForMime(const TQString& mimeType)
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
@@ -482,13 +482,13 @@ QString KImageIO::typeForMime(const QString& mimeType)
}
}
- return QString::null;
+ return TQString::null;
}
-QString KImageIO::type(const QString& filename)
+TQString KImageIO::type(const TQString& filename)
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
- QString suffix = filename;
+ TQString suffix = filename;
int dot = suffix.findRev('.');
if (dot >= 0)
suffix = suffix.mid(dot + 1);
@@ -505,13 +505,13 @@ QString KImageIO::type(const QString& filename)
}
}
- return QString::null;
+ return TQString::null;
}
-QStringList KImageIO::mimeTypes( Mode _mode )
+TQStringList KImageIO::mimeTypes( Mode _mode )
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
- QStringList mimeList;
+ TQStringList mimeList;
if(formatList)
{
@@ -530,7 +530,7 @@ QStringList KImageIO::mimeTypes( Mode _mode )
return mimeList;
}
-bool KImageIO::isSupported( const QString& _mimeType, Mode _mode )
+bool KImageIO::isSupported( const TQString& _mimeType, Mode _mode )
{
KImageIOFormatList *formatList = KImageIOFactory::self()->formatList;
@@ -553,7 +553,7 @@ bool KImageIO::isSupported( const QString& _mimeType, Mode _mode )
return false;
}
-QString KImageIO::mimeType( const QString& _filename )
+TQString KImageIO::mimeType( const TQString& _filename )
{
return KMimeType::findByURL( KURL( _filename ) )->name();
}
diff --git a/kio/kio/kimageio.h b/kio/kio/kimageio.h
index 882ad9172..dba18c8fd 100644
--- a/kio/kio/kimageio.h
+++ b/kio/kio/kimageio.h
@@ -8,7 +8,7 @@
#ifndef SSK_KIMGIO_H
#define SSK_KIMGIO_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -16,11 +16,11 @@
* Interface to the KDE Image IO plugin architecture.
*
* This library allows KDE applications to read and write images in a
- * variety of formats, transparently via the QImage and QPixmap load
+ * variety of formats, transparently via the TQImage and TQPixmap load
* and save methods.
*
* The image processing backends are written as image handlers compatible
- * with the QImageIO handler format. The backends are loaded on demand
+ * with the TQImageIO handler format. The backends are loaded on demand
* when a particular format is requested. Each format can be identified
* by a unique type id string.
*
@@ -52,7 +52,7 @@
* \b Example:
*
* \code
- * #include<qpixmap.h>
+ * #include<tqpixmap.h>
* #include<kimageio.h>
*
* int main( int argc, char **argv )
@@ -63,7 +63,7 @@
* }
* \endcode
*
- * @see KImageIO, QPixmap, QImage, QImageIO
+ * @see KImageIO, TQPixmap, TQImage, QImageIO
* @author Sirtaj Singh Kang
*/
class KIO_EXPORT KImageIO
@@ -86,14 +86,14 @@ public:
* @param type the type id of the image type
* @return true if the image format can be written
*/
- static bool canWrite(const QString& type);
+ static bool canWrite(const TQString& type);
/**
* Checks if a special type is supported for reading.
* @param type the type id of the image type
* @return true if the image format can be read
*/
- static bool canRead(const QString& type);
+ static bool canRead(const TQString& type);
/**
* Returns a list of all KImageIO supported formats.
@@ -101,7 +101,7 @@ public:
* @param mode Tells whether to retrieve modes that can be read or written.
* @return a list of the type ids
*/
- static QStringList types(Mode mode = Writing);
+ static TQStringList types(Mode mode = Writing);
/**
@@ -114,32 +114,32 @@ public:
* @return a space-separated list of file globs that describe the
* supported formats
*/
- static QString pattern(Mode mode = Reading);
+ static TQString pattern(Mode mode = Reading);
/**
* Returns the suffix of an image type.
* @param type the type id of the file format
- * @return the suffix of the file format or QString::null if it does not
+ * @return the suffix of the file format or TQString::null if it does not
* exist
*/
- static QString suffix(const QString& type);
+ static TQString suffix(const TQString& type);
/**
* Returns the type of a MIME type.
* @param mimeType the MIME type to search
- * @return type id of the MIME type or QString::null if the MIME type
+ * @return type id of the MIME type or TQString::null if the MIME type
* is not supported
* @since 3.1
*/
- static QString typeForMime(const QString& mimeType);
+ static TQString typeForMime(const TQString& mimeType);
/**
* Returns the type of given filename.
* @param filename the filename to check
* @return if the file name's suffix is known the type id of the
- * file type, otherwise QString::null
+ * file type, otherwise TQString::null
*/
- static QString type(const QString& filename);
+ static TQString type(const TQString& filename);
/**
* Returns a list of MIME types for all KImageIO supported formats.
@@ -147,7 +147,7 @@ public:
* @param mode Tells whether to retrieve modes that can be read or written.
* @return a list if MIME types of the supported formats
*/
- static QStringList mimeTypes( Mode mode = Writing );
+ static TQStringList mimeTypes( Mode mode = Writing );
/**
* Test to see whether a MIME type is supported to reading/writing.
@@ -155,14 +155,14 @@ public:
* @param _mode Tells whether to check for reading or writing capabilities
* @return true if the type is supported
**/
- static bool isSupported( const QString& _mimeType, Mode _mode = Writing );
+ static bool isSupported( const TQString& _mimeType, Mode _mode = Writing );
/**
* Returns the MIME type of @p _filename.
* @param _filename the filename to check
- * @return the MIME type of the file, or QString::null
+ * @return the MIME type of the file, or TQString::null
**/
- static QString mimeType( const QString& _filename );
+ static TQString mimeType( const TQString& _filename );
};
diff --git a/kio/kio/kimageiofactory.h b/kio/kio/kimageiofactory.h
index 1154ee586..2ffe58e60 100644
--- a/kio/kio/kimageiofactory.h
+++ b/kio/kio/kimageiofactory.h
@@ -21,21 +21,21 @@ class KIO_EXPORT KImageIOFormat : public KSycocaEntry
public:
typedef KSharedPtr<KImageIOFormat> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public: // KDoc seems to barf on those typedefs and generates no docs after them
/**
* Read a KImageIOFormat description file
*/
- KImageIOFormat( const QString & path);
+ KImageIOFormat( const TQString & path);
/**
* @internal construct a ImageIOFormat from a stream
*/
- KImageIOFormat( QDataStream& _str, int offset);
+ KImageIOFormat( TQDataStream& _str, int offset);
virtual ~KImageIOFormat();
- virtual QString name() const { return mType; }
+ virtual TQString name() const { return mType; }
virtual bool isValid() const { return true; }
@@ -43,34 +43,34 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them
* @internal
* Load the image format from a stream.
*/
- virtual void load(QDataStream& );
+ virtual void load(TQDataStream& );
/**
* @internal
* Save the image format to a stream.
*/
- virtual void save(QDataStream& );
+ virtual void save(TQDataStream& );
/**
* @internal
* Calls image IO function
*/
- void callLibFunc( bool read, QImageIO *);
+ void callLibFunc( bool read, TQImageIO *);
public:
- QString mType;
- QString mHeader;
- QString mFlags;
+ TQString mType;
+ TQString mHeader;
+ TQString mFlags;
bool bRead;
bool bWrite;
- QStringList mSuffices;
- QString mPattern;
- QString mMimetype;
- QString mLib;
- QStringList rPaths;
+ TQStringList mSuffices;
+ TQString mPattern;
+ TQString mMimetype;
+ TQString mLib;
+ TQStringList rPaths;
bool bLibLoaded;
- void (*mReadFunc)(QImageIO *);
- void (*mWriteFunc)(QImageIO *);
+ void (*mReadFunc)(TQImageIO *);
+ void (*mWriteFunc)(TQImageIO *);
protected:
virtual void virtual_hook( int id, void* data );
};
@@ -105,12 +105,12 @@ protected: // Internal stuff
/**
* @internal Create pattern string
**/
- QString createPattern( KImageIO::Mode _mode);
+ TQString createPattern( KImageIO::Mode _mode);
/**
* @internal Not used.
*/
- virtual KSycocaEntry *createEntry(const QString &, const char *)
+ virtual KSycocaEntry *createEntry(const TQString &, const char *)
{ return 0; }
/**
@@ -121,19 +121,19 @@ protected: // Internal stuff
/**
* @internal Read an image
**/
- static void readImage( QImageIO *iio);
+ static void readImage( TQImageIO *iio);
/**
* @internal Write an image
**/
- static void writeImage( QImageIO *iio);
+ static void writeImage( TQImageIO *iio);
protected:
static KImageIOFactory *_self;
static KImageIOFormatList *formatList;
- QString mReadPattern;
- QString mWritePattern;
- QStringList rPath;
+ TQString mReadPattern;
+ TQString mWritePattern;
+ TQStringList rPath;
protected:
virtual void virtual_hook( int id, void* data );
};
diff --git a/kio/kio/klimitediodevice.h b/kio/kio/klimitediodevice.h
index f2bc1b908..035a3cd15 100644
--- a/kio/kio/klimitediodevice.h
+++ b/kio/kio/klimitediodevice.h
@@ -20,7 +20,7 @@
#define klimitediodevice_h
#include <kdebug.h>
-#include <qiodevice.h>
+#include <tqiodevice.h>
/**
* A readonly device that reads from an underlying device
* from a given point to another (e.g. to give access to a single
@@ -38,7 +38,7 @@ public:
* @param start where to start reading (position in bytes)
* @param length the length of the data to read (in bytes)
*/
- KLimitedIODevice( QIODevice *dev, int start, int length )
+ KLimitedIODevice( TQIODevice *dev, int start, int length )
: m_dev( dev ), m_start( start ), m_length( length )
{
//kdDebug(7005) << "KLimitedIODevice::KLimitedIODevice start=" << start << " length=" << length << endl;
@@ -93,7 +93,7 @@ public:
}
virtual bool atEnd() const { return m_dev->atEnd() || m_dev->at() >= m_start + m_length; }
private:
- QIODevice* m_dev;
+ TQIODevice* m_dev;
Q_ULONG m_start;
Q_ULONG m_length;
};
diff --git a/kio/kio/kmessageboxwrapper.h b/kio/kio/kmessageboxwrapper.h
index 4a9dc2d76..94a960135 100644
--- a/kio/kio/kmessageboxwrapper.h
+++ b/kio/kio/kmessageboxwrapper.h
@@ -30,9 +30,9 @@
class KIO_EXPORT KMessageBoxWrapper : public KMessageBox
{
public:
- static void error(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null)
+ static void error(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null)
{
if (KApplication::guiEnabled()) {
kapp->enableStyles();
@@ -41,9 +41,9 @@ public:
kdWarning() << text << endl;
}
- static void sorry(QWidget *parent,
- const QString &text,
- const QString &caption = QString::null)
+ static void sorry(TQWidget *parent,
+ const TQString &text,
+ const TQString &caption = TQString::null)
{
if (KApplication::guiEnabled()) {
kapp->enableStyles();
diff --git a/kio/kio/kmimemagic.cpp b/kio/kio/kmimemagic.cpp
index 971dfd251..72b249249 100644
--- a/kio/kio/kmimemagic.cpp
+++ b/kio/kio/kmimemagic.cpp
@@ -19,7 +19,7 @@
#include "kmimemagic.h"
#include <kdebug.h>
#include <kapplication.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <kstaticdeleter.h>
@@ -27,7 +27,7 @@
#include <assert.h>
static int fsmagic(struct config_rec* conf, const char *fn, KDE_struct_stat *sb);
-static void process(struct config_rec* conf, const QString &);
+static void process(struct config_rec* conf, const TQString &);
static int ascmagic(struct config_rec* conf, unsigned char *buf, int nbytes);
static int tagmagic(unsigned char *buf, int nbytes);
static int textmagic(struct config_rec* conf, unsigned char *, int);
@@ -63,8 +63,8 @@ void KMimeMagic::initStatic()
#include <time.h>
#include <utime.h>
#include <stdarg.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqregexp.h>
+#include <tqstring.h>
//#define MIME_MAGIC_DEBUG_TABLE // untested
@@ -525,15 +525,15 @@ class KMimeMagicUtimeConf
public:
KMimeMagicUtimeConf()
{
- tmpDirs << QString::fromLatin1("/tmp"); // default value
+ tmpDirs << TQString::fromLatin1("/tmp"); // default value
// The trick is that we also don't want the user to override globally set
// directories. So we have to misuse KStandardDirs :}
- QStringList confDirs = KGlobal::dirs()->resourceDirs( "config" );
+ TQStringList confDirs = KGlobal::dirs()->resourceDirs( "config" );
if ( !confDirs.isEmpty() )
{
- QString globalConf = confDirs.last() + "kmimemagicrc";
- if ( QFile::exists( globalConf ) )
+ TQString globalConf = confDirs.last() + "kmimemagicrc";
+ if ( TQFile::exists( globalConf ) )
{
KSimpleConfig cfg( globalConf );
cfg.setGroup( "Settings" );
@@ -541,42 +541,42 @@ public:
}
if ( confDirs.count() > 1 )
{
- QString localConf = confDirs.first() + "kmimemagicrc";
- if ( QFile::exists( localConf ) )
+ TQString localConf = confDirs.first() + "kmimemagicrc";
+ if ( TQFile::exists( localConf ) )
{
KSimpleConfig cfg( localConf );
cfg.setGroup( "Settings" );
tmpDirs += cfg.readListEntry( "atimeDirs" );
}
}
- for ( QStringList::Iterator it = tmpDirs.begin() ; it != tmpDirs.end() ; ++it )
+ for ( TQStringList::Iterator it = tmpDirs.begin() ; it != tmpDirs.end() ; ++it )
{
- QString dir = *it;
+ TQString dir = *it;
if ( !dir.isEmpty() && dir[ dir.length()-1 ] != '/' )
(*it) += '/';
}
}
#if 0
// debug code
- for ( QStringList::Iterator it = tmpDirs.begin() ; it != tmpDirs.end() ; ++it )
+ for ( TQStringList::Iterator it = tmpDirs.begin() ; it != tmpDirs.end() ; ++it )
kdDebug(7018) << " atimeDir: " << *it << endl;
#endif
}
- bool restoreAccessTime( const QString & file ) const
+ bool restoreAccessTime( const TQString & file ) const
{
- QString dir = file.left( file.findRev( '/' ) );
+ TQString dir = file.left( file.findRev( '/' ) );
bool res = tmpDirs.contains( dir );
//kdDebug(7018) << "restoreAccessTime " << file << " dir=" << dir << " result=" << res << endl;
return res;
}
- QStringList tmpDirs;
+ TQStringList tmpDirs;
};
/* current config */
struct config_rec {
bool followLinks;
- QString resultBuf;
+ TQString resultBuf;
int accuracy;
struct magic *magic, /* head of magic config list */
@@ -646,18 +646,18 @@ int KMimeMagic::parse_line(char *line, int *rule, int lineno)
/*
* apprentice - load configuration from the magic file.
*/
-int KMimeMagic::apprentice( const QString& magicfile )
+int KMimeMagic::apprentice( const TQString& magicfile )
{
FILE *f;
char line[BUFSIZ + 1];
int errs = 0;
int lineno;
int rule = 0;
- QCString fname;
+ TQCString fname;
if (magicfile.isEmpty())
return -1;
- fname = QFile::encodeName(magicfile);
+ fname = TQFile::encodeName(magicfile);
f = fopen(fname, "r");
if (f == NULL) {
kdError(7018) << "can't read magic file " << fname.data() << ": " << strerror(errno) << endl;
@@ -1351,14 +1351,14 @@ mcheck(union VALUETYPE *p, struct magic *m)
* fixed-size buffer to begin processing the contents.
*/
-void process(struct config_rec* conf, const QString & fn)
+void process(struct config_rec* conf, const TQString & fn)
{
int fd = 0;
unsigned char buf[HOWMANY + 1]; /* one extra for terminating '\0' */
KDE_struct_stat sb;
int nbytes = 0; /* number of bytes read from a datafile */
int tagbytes = 0; /* size of prefixed tag */
- QCString fileName = QFile::encodeName( fn );
+ TQCString fileName = TQFile::encodeName( fn );
/*
* first try judging the file based on its filesystem status
@@ -1518,7 +1518,7 @@ fsmagic(struct config_rec* conf, const char *fn, KDE_struct_stat *sb)
strcpy(buf, tmp);
}
if (conf->followLinks)
- process( conf, QFile::decodeName( buf ) );
+ process( conf, TQFile::decodeName( buf ) );
else
conf->resultBuf = MIME_INODE_LINK;
return 1;
@@ -1898,27 +1898,27 @@ static int ascmagic(struct config_rec* conf, unsigned char *buf, int nbytes)
#endif
if (jonly > 1 && foundClass) {
// At least two java-only tokens have matched, including "class"
- conf->resultBuf = QString(types[P_JAVA].type);
+ conf->resultBuf = TQString(types[P_JAVA].type);
return 1;
}
if (jconly > 1) {
// At least two non-C (only C++ or Java) token have matched.
if (typecount[P_JAVA] < typecount[P_CPP])
- conf->resultBuf = QString(types[P_CPP].type);
+ conf->resultBuf = TQString(types[P_CPP].type);
else
- conf->resultBuf = QString(types[P_JAVA].type);
+ conf->resultBuf = TQString(types[P_JAVA].type);
return 1;
}
if (conly + cpponly > 1) {
// Either C or C++.
if (cpponly > 0)
- conf->resultBuf = QString(types[P_CPP].type);
+ conf->resultBuf = TQString(types[P_CPP].type);
else
- conf->resultBuf = QString(types[P_C].type);
+ conf->resultBuf = TQString(types[P_C].type);
return 1;
}
if (objconly > 0) {
- conf->resultBuf = QString(types[P_OBJC].type);
+ conf->resultBuf = TQString(types[P_OBJC].type);
return 1;
}
}
@@ -1952,7 +1952,7 @@ static int ascmagic(struct config_rec* conf, unsigned char *buf, int nbytes)
#ifdef DEBUG_MIMEMAGIC
kdDebug(7018) << "mostaccurate=" << mostaccurate << " pcts=" << pcts[mostaccurate] << " pctsum=" << pctsum << " accuracy=" << conf->accuracy << endl;
#endif
- conf->resultBuf = QString(types[mostaccurate].type);
+ conf->resultBuf = TQString(types[mostaccurate].type);
return 1;
}
}
@@ -2118,21 +2118,21 @@ from_oct(int digs, char *where)
KMimeMagic::KMimeMagic()
{
// Magic file detection init
- QString mimefile = locate( "mime", "magic" );
+ TQString mimefile = locate( "mime", "magic" );
init( mimefile );
// Add snippets from share/config/magic/*
- QStringList snippets = KGlobal::dirs()->findAllResources( "config", "magic/*.magic", true );
- for ( QStringList::Iterator it = snippets.begin() ; it != snippets.end() ; ++it )
+ TQStringList snippets = KGlobal::dirs()->findAllResources( "config", "magic/*.magic", true );
+ for ( TQStringList::Iterator it = snippets.begin() ; it != snippets.end() ; ++it )
if ( !mergeConfig( *it ) )
kdWarning() << k_funcinfo << "Failed to parse " << *it << endl;
}
-KMimeMagic::KMimeMagic(const QString & _configfile)
+KMimeMagic::KMimeMagic(const TQString & _configfile)
{
init( _configfile );
}
-void KMimeMagic::init( const QString& _configfile )
+void KMimeMagic::init( const TQString& _configfile )
{
int result;
conf = new config_rec;
@@ -2173,7 +2173,7 @@ KMimeMagic::~KMimeMagic()
}
bool
-KMimeMagic::mergeConfig(const QString & _configfile)
+KMimeMagic::mergeConfig(const TQString & _configfile)
{
kdDebug(7018) << k_funcinfo << _configfile << endl;
int result;
@@ -2214,11 +2214,11 @@ KMimeMagic::setFollowLinks( bool _enable )
}
KMimeMagicResult *
-KMimeMagic::findBufferType(const QByteArray &array)
+KMimeMagic::findBufferType(const TQByteArray &array)
{
unsigned char buf[HOWMANY + 1]; /* one extra for terminating '\0' */
- conf->resultBuf = QString::null;
+ conf->resultBuf = TQString::null;
if ( !magicResult )
magicResult = new KMimeMagicResult();
magicResult->setInvalid();
@@ -2242,9 +2242,9 @@ KMimeMagic::findBufferType(const QByteArray &array)
}
static void
-refineResult(KMimeMagicResult *r, const QString & _filename)
+refineResult(KMimeMagicResult *r, const TQString & _filename)
{
- QString tmp = r->mimeType();
+ TQString tmp = r->mimeType();
if (tmp.isEmpty())
return;
if ( tmp == "text/x-c" || tmp == "text/x-objc" )
@@ -2279,8 +2279,8 @@ refineResult(KMimeMagicResult *r, const QString & _filename)
}
KMimeMagicResult *
-KMimeMagic::findBufferFileType( const QByteArray &data,
- const QString &fn)
+KMimeMagic::findBufferFileType( const TQByteArray &data,
+ const TQString &fn)
{
KMimeMagicResult * r = findBufferType( data );
refineResult(r, fn);
@@ -2290,12 +2290,12 @@ KMimeMagic::findBufferFileType( const QByteArray &data,
/*
* Find the content-type of the given file.
*/
-KMimeMagicResult* KMimeMagic::findFileType(const QString & fn)
+KMimeMagicResult* KMimeMagic::findFileType(const TQString & fn)
{
#ifdef DEBUG_MIMEMAGIC
kdDebug(7018) << "KMimeMagic::findFileType " << fn << endl;
#endif
- conf->resultBuf = QString::null;
+ conf->resultBuf = TQString::null;
if ( !magicResult )
magicResult = new KMimeMagicResult();
diff --git a/kio/kio/kmimemagic.h b/kio/kio/kmimemagic.h
index 377594043..d73dd306a 100644
--- a/kio/kio/kmimemagic.h
+++ b/kio/kio/kmimemagic.h
@@ -30,7 +30,7 @@
#ifndef KMIMEMAGIC_H
#define KMIMEMAGIC_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class KMimeMagic; // see below (read this one first)
@@ -52,7 +52,7 @@ public:
/**
* Retrieve the mimetype (e.g. "text/html") of the file or buffer parsed.
*/
- QString mimeType() const { return m_strMimeType; }
+ TQString mimeType() const { return m_strMimeType; }
/**
* Retrieve the accuracy of the matching.
*/
@@ -65,12 +65,12 @@ public:
/////////////////
// Internal functions only
/////////////////
- void setMimeType( const QString& _mime ) { m_strMimeType = _mime; }
+ void setMimeType( const TQString& _mime ) { m_strMimeType = _mime; }
void setAccuracy( int _accuracy ) { m_iAccuracy = _accuracy; }
- void setInvalid() { m_strMimeType = QString::null; }
+ void setInvalid() { m_strMimeType = TQString::null; }
protected:
- QString m_strMimeType;
+ TQString m_strMimeType;
int m_iAccuracy;
};
@@ -111,7 +111,7 @@ public:
/**
* Create a parser and initialize it with the given config file.
*/
- KMimeMagic( const QString & configFile );
+ KMimeMagic( const TQString & configFile );
/**
* Destroy the parser.
@@ -124,7 +124,7 @@ public:
*
* @return @p true on success.
*/
- bool mergeConfig( const QString & configFile );
+ bool mergeConfig( const TQString & configFile );
/**
* Merge an existing parse table with the data from the
@@ -153,7 +153,7 @@ public:
* the returned result object changes its value
* since it is reused by KMimeMagic.
*/
- KMimeMagicResult* findFileType( const QString & _filename );
+ KMimeMagicResult* findFileType( const TQString & _filename );
/**
* Same functionality as above, except data is not
@@ -167,7 +167,7 @@ public:
* the returned result object changes its value
* since it is reused by KMimeMagic.
*/
- KMimeMagicResult* findBufferType( const QByteArray &p );
+ KMimeMagicResult* findBufferType( const TQByteArray &p );
/**
* Same functionality as findBufferType() but with
@@ -183,7 +183,7 @@ public:
* the returned result object changes its value
* since it is reused by KMimeMagic.
*/
- KMimeMagicResult * findBufferFileType( const QByteArray &, const QString & filename );
+ KMimeMagicResult * findBufferFileType( const TQByteArray &, const TQString & filename );
/**
* Returns a pointer to the unique KMimeMagic instance in this process.
@@ -200,15 +200,15 @@ protected:
static KMimeMagic* s_pSelf;
private:
- void init( const QString& configFile );
+ void init( const TQString& configFile );
bool bunused;
- QString sunused;
+ TQString sunused;
int parse_line(char *line, int *rule, int lineno);
int parse(char *, int);
int buff_apprentice(char*buff);
- int apprentice(const QString &configFile);
+ int apprentice(const TQString &configFile);
struct config_rec *conf; // this is also our "d pointer"
int iunused;
diff --git a/kio/kio/kmimetype.cpp b/kio/kio/kmimetype.cpp
index c6f0aaea9..af4243a53 100644
--- a/kio/kio/kmimetype.cpp
+++ b/kio/kio/kmimetype.cpp
@@ -40,8 +40,8 @@
#include "kautomount.h"
#include <kdirnotify_stub.h>
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <kmessageboxwrapper.h>
#include <dcopclient.h>
@@ -60,7 +60,7 @@
#include <kde_file.h>
template class KSharedPtr<KMimeType>;
-template class QValueList<KMimeType::Ptr>;
+template class TQValueList<KMimeType::Ptr>;
KMimeType::Ptr KMimeType::s_pDefaultType = 0L;
bool KMimeType::s_bChecked = false;
@@ -80,9 +80,9 @@ void KMimeType::buildDefaultType()
{
errorMissingMimeType( defaultMimeType() );
KStandardDirs stdDirs;
- QString sDefaultMimeType = stdDirs.resourceDirs("mime").first()+defaultMimeType()+".desktop";
+ TQString sDefaultMimeType = stdDirs.resourceDirs("mime").first()+defaultMimeType()+".desktop";
s_pDefaultType = new KMimeType( sDefaultMimeType, defaultMimeType(),
- "unknown", "mime", QStringList() );
+ "unknown", "mime", TQStringList() );
}
}
@@ -131,14 +131,14 @@ void KMimeType::checkEssentialMimeTypes()
errorMissingMimeType( "application/x-desktop" );
}
-void KMimeType::errorMissingMimeType( const QString& _type )
+void KMimeType::errorMissingMimeType( const TQString& _type )
{
- QString tmp = i18n( "Could not find mime type\n%1" ).arg( _type );
+ TQString tmp = i18n( "Could not find mime type\n%1" ).arg( _type );
KMessageBoxWrapper::sorry( 0, tmp );
}
-KMimeType::Ptr KMimeType::mimeType( const QString& _name )
+KMimeType::Ptr KMimeType::mimeType( const TQString& _name )
{
KServiceType * mime = KServiceTypeFactory::self()->findServiceTypeByName( _name );
@@ -166,7 +166,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
bool _is_local_file, bool _fast_mode )
{
checkEssentialMimeTypes();
- QString path = _url.path();
+ TQString path = _url.path();
if ( !_fast_mode && !_is_local_file && _url.isLocalFile() )
_is_local_file = true;
@@ -174,7 +174,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
if ( !_fast_mode && _is_local_file && (_mode == 0 || _mode == (mode_t)-1) )
{
KDE_struct_stat buff;
- if ( KDE_stat( QFile::encodeName(path), &buff ) != -1 )
+ if ( KDE_stat( TQFile::encodeName(path), &buff ) != -1 )
_mode = buff.st_mode;
}
@@ -185,7 +185,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
// are allowed to enter the directory
if ( _is_local_file )
{
- if ( access( QFile::encodeName(path), R_OK ) == -1 )
+ if ( access( TQFile::encodeName(path), R_OK ) == -1 )
return mimeType( "inode/directory-locked" );
}
return mimeType( "inode/directory" );
@@ -202,9 +202,9 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
if ( !_is_local_file && S_ISREG( _mode ) && ( _mode & ( S_IXUSR | S_IXGRP | S_IXOTH ) ) )
return mimeType( "application/x-executable" );
- QString fileName ( _url.fileName() );
+ TQString fileName ( _url.fileName() );
- static const QString& slash = KGlobal::staticQString("/");
+ static const TQString& slash = KGlobal::staticQString("/");
if ( ! fileName.isNull() && !path.endsWith( slash ) )
{
// Try to find it out by looking at the filename
@@ -230,9 +230,9 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
}
}
- static const QString& dotdesktop = KGlobal::staticQString(".desktop");
- static const QString& dotkdelnk = KGlobal::staticQString(".kdelnk");
- static const QString& dotdirectory = KGlobal::staticQString(".directory");
+ static const TQString& dotdesktop = KGlobal::staticQString(".desktop");
+ static const TQString& dotkdelnk = KGlobal::staticQString(".kdelnk");
+ static const TQString& dotdirectory = KGlobal::staticQString(".directory");
// Another filename binding, hardcoded, is .desktop:
if ( fileName.endsWith( dotdesktop ) )
@@ -249,7 +249,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
if ( !_is_local_file || _fast_mode )
{
- QString def = KProtocolInfo::defaultMimetype( _url );
+ TQString def = KProtocolInfo::defaultMimetype( _url );
if ( !def.isEmpty() && def != defaultMimeType() )
{
// The protocol says it always returns a given mimetype (e.g. text/html for "man:")
@@ -265,7 +265,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
{
// Assume inode/directory, if the protocol supports listing.
if ( KProtocolInfo::supportsListing( _url ) )
- return mimeType( QString::fromLatin1("inode/directory") );
+ return mimeType( TQString::fromLatin1("inode/directory") );
else
return defaultMimeTypePtr(); // == 'no idea', e.g. for "data:,foo/"
}
@@ -276,7 +276,7 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
}
// Do some magic for local files
- //kdDebug(7009) << QString("Mime Type finding for '%1'").arg(path) << endl;
+ //kdDebug(7009) << TQString("Mime Type finding for '%1'").arg(path) << endl;
KMimeMagicResult* result = KMimeMagic::self()->findFileType( path );
// If we still did not find it, we must assume the default mime type
@@ -296,19 +296,19 @@ KMimeType::Ptr KMimeType::findByURL( const KURL& _url, mode_t _mode,
return mime;
}
-KMimeType::Ptr KMimeType::diagnoseFileName(const QString &fileName, QString &pattern)
+KMimeType::Ptr KMimeType::diagnoseFileName(const TQString &fileName, TQString &pattern)
{
return KServiceTypeFactory::self()->findFromPattern( fileName, &pattern );
}
-KMimeType::Ptr KMimeType::findByPath( const QString& path, mode_t mode, bool fast_mode )
+KMimeType::Ptr KMimeType::findByPath( const TQString& path, mode_t mode, bool fast_mode )
{
KURL u;
u.setPath(path);
return findByURL( u, mode, true, fast_mode );
}
-KMimeType::Ptr KMimeType::findByContent( const QByteArray &data, int *accuracy )
+KMimeType::Ptr KMimeType::findByContent( const TQByteArray &data, int *accuracy )
{
KMimeMagicResult *result = KMimeMagic::self()->findBufferType(data);
if (accuracy)
@@ -316,7 +316,7 @@ KMimeType::Ptr KMimeType::findByContent( const QByteArray &data, int *accuracy )
return mimeType( result->mimeType() );
}
-KMimeType::Ptr KMimeType::findByFileContent( const QString &fileName, int *accuracy )
+KMimeType::Ptr KMimeType::findByFileContent( const TQString &fileName, int *accuracy )
{
KMimeMagicResult *result = KMimeMagic::self()->findFileType(fileName);
if (accuracy)
@@ -327,21 +327,21 @@ KMimeType::Ptr KMimeType::findByFileContent( const QString &fileName, int *accur
#define GZIP_MAGIC1 0x1f
#define GZIP_MAGIC2 0x8b
-KMimeType::Format KMimeType::findFormatByFileContent( const QString &fileName )
+KMimeType::Format KMimeType::findFormatByFileContent( const TQString &fileName )
{
KMimeType::Format result;
result.compression = Format::NoCompression;
KMimeType::Ptr mime = findByPath(fileName);
result.text = mime->name().startsWith("text/");
- QVariant v = mime->property("X-KDE-text");
+ TQVariant v = mime->property("X-KDE-text");
if (v.isValid())
result.text = v.toBool();
if (mime->name().startsWith("inode/"))
return result;
- QFile f(fileName);
+ TQFile f(fileName);
if (f.open(IO_ReadOnly))
{
unsigned char buf[10+1];
@@ -352,14 +352,14 @@ KMimeType::Format KMimeType::findFormatByFileContent( const QString &fileName )
return result;
}
-KMimeType::KMimeType( const QString & _fullpath, const QString& _type, const QString& _icon,
- const QString& _comment, const QStringList& _patterns )
+KMimeType::KMimeType( const TQString & _fullpath, const TQString& _type, const TQString& _icon,
+ const TQString& _comment, const TQStringList& _patterns )
: KServiceType( _fullpath, _type, _icon, _comment )
{
m_lstPatterns = _patterns;
}
-KMimeType::KMimeType( const QString & _fullpath ) : KServiceType( _fullpath )
+KMimeType::KMimeType( const TQString & _fullpath ) : KServiceType( _fullpath )
{
KDesktopFile _cfg( _fullpath, true );
init ( &_cfg );
@@ -382,47 +382,47 @@ void KMimeType::init( KDesktopFile * config )
m_lstPatterns = config->readListEntry( "Patterns", ';' );
// Read the X-KDE-AutoEmbed setting and store it in the properties map
- QString XKDEAutoEmbed = QString::fromLatin1("X-KDE-AutoEmbed");
+ TQString XKDEAutoEmbed = TQString::fromLatin1("X-KDE-AutoEmbed");
if ( config->hasKey( XKDEAutoEmbed ) )
- m_mapProps.insert( XKDEAutoEmbed, QVariant( config->readBoolEntry( XKDEAutoEmbed ), 0 ) );
+ m_mapProps.insert( XKDEAutoEmbed, TQVariant( config->readBoolEntry( XKDEAutoEmbed ), 0 ) );
- QString XKDEText = QString::fromLatin1("X-KDE-text");
+ TQString XKDEText = TQString::fromLatin1("X-KDE-text");
if ( config->hasKey( XKDEText ) )
m_mapProps.insert( XKDEText, config->readBoolEntry( XKDEText ) );
- QString XKDEIsAlso = QString::fromLatin1("X-KDE-IsAlso");
+ TQString XKDEIsAlso = TQString::fromLatin1("X-KDE-IsAlso");
if ( config->hasKey( XKDEIsAlso ) ) {
- QString inherits = config->readEntry( XKDEIsAlso );
+ TQString inherits = config->readEntry( XKDEIsAlso );
if ( inherits != name() )
m_mapProps.insert( XKDEIsAlso, inherits );
else
kdWarning(7009) << "Error: " << inherits << " inherits from itself!!!!" << endl;
}
- QString XKDEPatternsAccuracy = QString::fromLatin1("X-KDE-PatternsAccuracy");
+ TQString XKDEPatternsAccuracy = TQString::fromLatin1("X-KDE-PatternsAccuracy");
if ( config->hasKey( XKDEPatternsAccuracy ) )
m_mapProps.insert( XKDEPatternsAccuracy, config->readEntry( XKDEPatternsAccuracy ) );
}
-KMimeType::KMimeType( QDataStream& _str, int offset ) : KServiceType( _str, offset )
+KMimeType::KMimeType( TQDataStream& _str, int offset ) : KServiceType( _str, offset )
{
loadInternal( _str ); // load our specific stuff
}
-void KMimeType::load( QDataStream& _str )
+void KMimeType::load( TQDataStream& _str )
{
KServiceType::load( _str );
loadInternal( _str );
}
-void KMimeType::loadInternal( QDataStream& _str )
+void KMimeType::loadInternal( TQDataStream& _str )
{
- // kdDebug(7009) << "KMimeType::load( QDataStream& ) : loading list of patterns" << endl;
+ // kdDebug(7009) << "KMimeType::load( TQDataStream& ) : loading list of patterns" << endl;
_str >> m_lstPatterns;
}
-void KMimeType::save( QDataStream& _str )
+void KMimeType::save( TQDataStream& _str )
{
KServiceType::save( _str );
// Warning adding/removing fields here involves a binary incompatible change - update version
@@ -430,17 +430,17 @@ void KMimeType::save( QDataStream& _str )
_str << m_lstPatterns;
}
-QVariant KMimeType::property( const QString& _name ) const
+TQVariant KMimeType::property( const TQString& _name ) const
{
if ( _name == "Patterns" )
- return QVariant( m_lstPatterns );
+ return TQVariant( m_lstPatterns );
return KServiceType::property( _name );
}
-QStringList KMimeType::propertyNames() const
+TQStringList KMimeType::propertyNames() const
{
- QStringList res = KServiceType::propertyNames();
+ TQStringList res = KServiceType::propertyNames();
res.append( "Patterns" );
return res;
@@ -450,14 +450,14 @@ KMimeType::~KMimeType()
{
}
-QPixmap KMimeType::pixmap( KIcon::Group _group, int _force_size, int _state,
- QString * _path ) const
+TQPixmap KMimeType::pixmap( KIcon::Group _group, int _force_size, int _state,
+ TQString * _path ) const
{
KIconLoader *iconLoader=KGlobal::iconLoader();
- QString iconName=icon( QString::null, false );
+ TQString iconName=icon( TQString::null, false );
if (!iconLoader->extraDesktopThemesAdded())
{
- QPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
+ TQPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
if (!pixmap.isNull() ) return pixmap;
iconLoader->addExtraDesktopThemes();
@@ -466,14 +466,14 @@ QPixmap KMimeType::pixmap( KIcon::Group _group, int _force_size, int _state,
return iconLoader->loadIcon( iconName , _group, _force_size, _state, _path, false );
}
-QPixmap KMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_size,
- int _state, QString * _path ) const
+TQPixmap KMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_size,
+ int _state, TQString * _path ) const
{
KIconLoader *iconLoader=KGlobal::iconLoader();
- QString iconName=icon( _url, _url.isLocalFile() );
+ TQString iconName=icon( _url, _url.isLocalFile() );
if (!iconLoader->extraDesktopThemesAdded())
{
- QPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
+ TQPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
if (!pixmap.isNull() ) return pixmap;
iconLoader->addExtraDesktopThemes();
@@ -482,15 +482,15 @@ QPixmap KMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_siz
return iconLoader->loadIcon( iconName , _group, _force_size, _state, _path, false );
}
-QPixmap KMimeType::pixmapForURL( const KURL & _url, mode_t _mode, KIcon::Group _group,
- int _force_size, int _state, QString * _path )
+TQPixmap KMimeType::pixmapForURL( const KURL & _url, mode_t _mode, KIcon::Group _group,
+ int _force_size, int _state, TQString * _path )
{
KIconLoader *iconLoader=KGlobal::iconLoader();
- QString iconName = iconForURL( _url, _mode );
+ TQString iconName = iconForURL( _url, _mode );
if (!iconLoader->extraDesktopThemesAdded())
{
- QPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
+ TQPixmap pixmap=iconLoader->loadIcon( iconName, _group, _force_size, _state, _path, true );
if (!pixmap.isNull() ) return pixmap;
iconLoader->addExtraDesktopThemes();
@@ -500,13 +500,13 @@ QPixmap KMimeType::pixmapForURL( const KURL & _url, mode_t _mode, KIcon::Group _
}
-QString KMimeType::iconForURL( const KURL & _url, mode_t _mode )
+TQString KMimeType::iconForURL( const KURL & _url, mode_t _mode )
{
const KMimeType::Ptr mt = findByURL( _url, _mode, _url.isLocalFile(),
false /*HACK*/);
- static const QString& unknown = KGlobal::staticQString("unknown");
- const QString mimeTypeIcon = mt->icon( _url, _url.isLocalFile() );
- QString i = mimeTypeIcon;
+ static const TQString& unknown = KGlobal::staticQString("unknown");
+ const TQString mimeTypeIcon = mt->icon( _url, _url.isLocalFile() );
+ TQString i = mimeTypeIcon;
// if we don't find an icon, maybe we can use the one for the protocol
if ( i == unknown || i.isEmpty() || mt == defaultMimeTypePtr()
@@ -525,7 +525,7 @@ QString KMimeType::iconForURL( const KURL & _url, mode_t _mode )
return i;
}
-QString KMimeType::favIconForURL( const KURL& url )
+TQString KMimeType::favIconForURL( const KURL& url )
{
// this method will be called quite often, so better not read the config
// again and again.
@@ -540,27 +540,27 @@ QString KMimeType::favIconForURL( const KURL& url )
if ( url.isLocalFile() || !url.protocol().startsWith("http")
|| !useFavIcons )
- return QString::null;
+ return TQString::null;
DCOPRef kded( "kded", "favicons" );
DCOPReply result = kded.call( "iconForURL(KURL)", url );
if ( result.isValid() )
return result;
- return QString::null;
+ return TQString::null;
}
-QString KMimeType::parentMimeType() const
+TQString KMimeType::parentMimeType() const
{
- QVariant v = property("X-KDE-IsAlso");
+ TQVariant v = property("X-KDE-IsAlso");
return v.toString();
}
-bool KMimeType::is( const QString& mimeTypeName ) const
+bool KMimeType::is( const TQString& mimeTypeName ) const
{
if ( name() == mimeTypeName )
return true;
- QString st = parentMimeType();
+ TQString st = parentMimeType();
//if (st.isEmpty()) kdDebug(7009)<<"Parent mimetype is empty"<<endl;
while ( !st.isEmpty() )
{
@@ -575,7 +575,7 @@ bool KMimeType::is( const QString& mimeTypeName ) const
}
int KMimeType::patternsAccuracy() const {
- QVariant v = property("X-KDE-PatternsAccuracy");
+ TQVariant v = property("X-KDE-PatternsAccuracy");
if (!v.isValid()) return 100;
else
return v.toInt();
@@ -588,7 +588,7 @@ int KMimeType::patternsAccuracy() const {
*
******************************************************/
-QString KFolderType::icon( const QString& _url, bool _is_local ) const
+TQString KFolderType::icon( const TQString& _url, bool _is_local ) const
{
if ( !_is_local || _url.isEmpty() )
return KMimeType::icon( _url, _is_local );
@@ -596,7 +596,7 @@ QString KFolderType::icon( const QString& _url, bool _is_local ) const
return KFolderType::icon( KURL(_url), _is_local );
}
-QString KFolderType::icon( const KURL& _url, bool _is_local ) const
+TQString KFolderType::icon( const KURL& _url, bool _is_local ) const
{
if ( !_is_local )
return KMimeType::icon( _url, _is_local );
@@ -604,7 +604,7 @@ QString KFolderType::icon( const KURL& _url, bool _is_local ) const
KURL u( _url );
u.addPath( ".directory" );
- QString icon;
+ TQString icon;
// using KStandardDirs as this one checks for path being
// a file instead of a directory
if ( KStandardDirs::exists( u.path() ) )
@@ -612,17 +612,17 @@ QString KFolderType::icon( const KURL& _url, bool _is_local ) const
KSimpleConfig cfg( u.path(), true );
cfg.setDesktopGroup();
icon = cfg.readEntry( "Icon" );
- QString empty_icon = cfg.readEntry( "EmptyIcon" );
+ TQString empty_icon = cfg.readEntry( "EmptyIcon" );
if ( !empty_icon.isEmpty() )
{
bool isempty = false;
DIR *dp = 0L;
struct dirent *ep;
- dp = opendir( QFile::encodeName(_url.path()) );
+ dp = opendir( TQFile::encodeName(_url.path()) );
if ( dp )
{
- QValueList<QCString> entries;
+ TQValueList<TQCString> entries;
// Note that readdir isn't guaranteed to return "." and ".." first (#79826)
ep=readdir( dp ); if ( ep ) entries.append( ep->d_name );
ep=readdir( dp ); if ( ep ) entries.append( ep->d_name );
@@ -661,7 +661,7 @@ QString KFolderType::icon( const KURL& _url, bool _is_local ) const
return icon;
}
-QString KFolderType::comment( const QString& _url, bool _is_local ) const
+TQString KFolderType::comment( const TQString& _url, bool _is_local ) const
{
if ( !_is_local || _url.isEmpty() )
return KMimeType::comment( _url, _is_local );
@@ -669,7 +669,7 @@ QString KFolderType::comment( const QString& _url, bool _is_local ) const
return KFolderType::comment( KURL(_url), _is_local );
}
-QString KFolderType::comment( const KURL& _url, bool _is_local ) const
+TQString KFolderType::comment( const KURL& _url, bool _is_local ) const
{
if ( !_is_local )
return KMimeType::comment( _url, _is_local );
@@ -679,7 +679,7 @@ QString KFolderType::comment( const KURL& _url, bool _is_local ) const
KSimpleConfig cfg( u.path(), true );
cfg.setDesktopGroup();
- QString comment = cfg.readEntry( "Comment" );
+ TQString comment = cfg.readEntry( "Comment" );
if ( comment.isEmpty() )
return KMimeType::comment( _url, _is_local );
@@ -692,7 +692,7 @@ QString KFolderType::comment( const KURL& _url, bool _is_local ) const
*
******************************************************/
-QString KDEDesktopMimeType::icon( const QString& _url, bool _is_local ) const
+TQString KDEDesktopMimeType::icon( const TQString& _url, bool _is_local ) const
{
if ( !_is_local || _url.isEmpty() )
return KMimeType::icon( _url, _is_local );
@@ -701,32 +701,32 @@ QString KDEDesktopMimeType::icon( const QString& _url, bool _is_local ) const
return icon( u, _is_local );
}
-QString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const
+TQString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const
{
if ( !_is_local )
return KMimeType::icon( _url, _is_local );
KSimpleConfig cfg( _url.path(), true );
cfg.setDesktopGroup();
- QString icon = cfg.readEntry( "Icon" );
- QString type = cfg.readEntry( "Type" );
+ TQString icon = cfg.readEntry( "Icon" );
+ TQString type = cfg.readEntry( "Type" );
if ( type == "FSDevice" || type == "FSDev") // need to provide FSDev for
// backwards compatibility
{
- QString unmount_icon = cfg.readEntry( "UnmountIcon" );
- QString dev = cfg.readEntry( "Dev" );
+ TQString unmount_icon = cfg.readEntry( "UnmountIcon" );
+ TQString dev = cfg.readEntry( "Dev" );
if ( !icon.isEmpty() && !unmount_icon.isEmpty() && !dev.isEmpty() )
{
- QString mp = KIO::findDeviceMountPoint( dev );
+ TQString mp = KIO::findDeviceMountPoint( dev );
// Is the device not mounted ?
if ( mp.isNull() )
return unmount_icon;
}
} else if ( type == "Link" ) {
- const QString emptyIcon = cfg.readEntry( "EmptyIcon" );
+ const TQString emptyIcon = cfg.readEntry( "EmptyIcon" );
if ( !emptyIcon.isEmpty() ) {
- const QString u = cfg.readPathEntry( "URL" );
+ const TQString u = cfg.readPathEntry( "URL" );
const KURL url( u );
if ( url.protocol() == "trash" ) {
// We need to find if the trash is empty, preferrably without using a KIO job.
@@ -746,11 +746,11 @@ QString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const
return icon;
}
-QPixmap KDEDesktopMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_size,
- int _state, QString * _path ) const
+TQPixmap KDEDesktopMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_size,
+ int _state, TQString * _path ) const
{
- QString _icon = icon( _url, _url.isLocalFile() );
- QPixmap pix = KGlobal::iconLoader()->loadIcon( _icon, _group,
+ TQString _icon = icon( _url, _url.isLocalFile() );
+ TQPixmap pix = KGlobal::iconLoader()->loadIcon( _icon, _group,
_force_size, _state, _path, false );
if ( pix.isNull() )
pix = KGlobal::iconLoader()->loadIcon( "unknown", _group,
@@ -758,7 +758,7 @@ QPixmap KDEDesktopMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _
return pix;
}
-QString KDEDesktopMimeType::comment( const QString& _url, bool _is_local ) const
+TQString KDEDesktopMimeType::comment( const TQString& _url, bool _is_local ) const
{
if ( !_is_local || _url.isEmpty() )
return KMimeType::comment( _url, _is_local );
@@ -767,14 +767,14 @@ QString KDEDesktopMimeType::comment( const QString& _url, bool _is_local ) const
return comment( u, _is_local );
}
-QString KDEDesktopMimeType::comment( const KURL& _url, bool _is_local ) const
+TQString KDEDesktopMimeType::comment( const KURL& _url, bool _is_local ) const
{
if ( !_is_local )
return KMimeType::comment( _url, _is_local );
KSimpleConfig cfg( _url.path(), true );
cfg.setDesktopGroup();
- QString comment = cfg.readEntry( "Comment" );
+ TQString comment = cfg.readEntry( "Comment" );
if ( comment.isEmpty() )
return KMimeType::comment( _url, _is_local );
@@ -790,10 +790,10 @@ pid_t KDEDesktopMimeType::run( const KURL& u, bool _is_local )
KSimpleConfig cfg( u.path(), true );
cfg.setDesktopGroup();
- QString type = cfg.readEntry( "Type" );
+ TQString type = cfg.readEntry( "Type" );
if ( type.isEmpty() )
{
- QString tmp = i18n("The desktop entry file %1 "
+ TQString tmp = i18n("The desktop entry file %1 "
"has no Type=... entry.").arg(u.path() );
KMessageBoxWrapper::error( 0, tmp);
return 0;
@@ -814,7 +814,7 @@ pid_t KDEDesktopMimeType::run( const KURL& u, bool _is_local )
return runMimeType( u, cfg );
- QString tmp = i18n("The desktop entry of type\n%1\nis unknown.").arg( type );
+ TQString tmp = i18n("The desktop entry of type\n%1\nis unknown.").arg( type );
KMessageBoxWrapper::error( 0, tmp);
return 0;
@@ -824,31 +824,31 @@ pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cf
{
pid_t retval = 0;
- QString dev = cfg.readEntry( "Dev" );
+ TQString dev = cfg.readEntry( "Dev" );
if ( dev.isEmpty() )
{
- QString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( _url.path() );
+ TQString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( _url.path() );
KMessageBoxWrapper::error( 0, tmp);
return retval;
}
- QString mp = KIO::findDeviceMountPoint( dev );
+ TQString mp = KIO::findDeviceMountPoint( dev );
// Is the device already mounted ?
if ( !mp.isNull() )
{
KURL mpURL;
mpURL.setPath( mp );
// Open a new window
- retval = KRun::runURL( mpURL, QString::fromLatin1("inode/directory") );
+ retval = KRun::runURL( mpURL, TQString::fromLatin1("inode/directory") );
}
else
{
bool ro = cfg.readBoolEntry( "ReadOnly", false );
- QString fstype = cfg.readEntry( "FSType" );
+ TQString fstype = cfg.readEntry( "FSType" );
if ( fstype == "Default" ) // KDE-1 thing
- fstype = QString::null;
- QString point = cfg.readEntry( "MountPoint" );
+ fstype = TQString::null;
+ TQString point = cfg.readEntry( "MountPoint" );
#ifndef Q_WS_WIN
(void) new KAutoMount( ro, fstype, dev, point, _url.path() );
#endif
@@ -858,7 +858,7 @@ pid_t KDEDesktopMimeType::runFSDevice( const KURL& _url, const KSimpleConfig &cf
return retval;
}
-pid_t KDEDesktopMimeType::runApplication( const KURL& , const QString & _serviceFile )
+pid_t KDEDesktopMimeType::runApplication( const KURL& , const TQString & _serviceFile )
{
KService s( _serviceFile );
if ( !s.isValid() )
@@ -871,10 +871,10 @@ pid_t KDEDesktopMimeType::runApplication( const KURL& , const QString & _service
pid_t KDEDesktopMimeType::runLink( const KURL& _url, const KSimpleConfig &cfg )
{
- QString u = cfg.readPathEntry( "URL" );
+ TQString u = cfg.readPathEntry( "URL" );
if ( u.isEmpty() )
{
- QString tmp = i18n("The desktop entry file\n%1\nis of type Link but has no URL=... entry.").arg( _url.prettyURL() );
+ TQString tmp = i18n("The desktop entry file\n%1\nis of type Link but has no URL=... entry.").arg( _url.prettyURL() );
KMessageBoxWrapper::error( 0, tmp );
return 0;
}
@@ -885,7 +885,7 @@ pid_t KDEDesktopMimeType::runLink( const KURL& _url, const KSimpleConfig &cfg )
// X-KDE-LastOpenedWith holds the service desktop entry name that
// was should be preferred for opening this URL if possible.
// This is used by the Recent Documents menu for instance.
- QString lastOpenedWidth = cfg.readEntry( "X-KDE-LastOpenedWith" );
+ TQString lastOpenedWidth = cfg.readEntry( "X-KDE-LastOpenedWith" );
if ( !lastOpenedWidth.isEmpty() )
run->setPreferredService( lastOpenedWidth );
@@ -897,7 +897,7 @@ pid_t KDEDesktopMimeType::runMimeType( const KURL& url , const KSimpleConfig & )
// Hmm, can't really use keditfiletype since we might be looking
// at the global file, or at a file not in share/mimelnk...
- QStringList args;
+ TQStringList args;
args << "openProperties";
args << url.path();
@@ -911,31 +911,31 @@ pid_t KDEDesktopMimeType::runMimeType( const KURL& url , const KSimpleConfig & )
return p.pid();
}
-QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::builtinServices( const KURL& _url )
+TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::builtinServices( const KURL& _url )
{
- QValueList<Service> result;
+ TQValueList<Service> result;
if ( !_url.isLocalFile() )
return result;
KSimpleConfig cfg( _url.path(), true );
cfg.setDesktopGroup();
- QString type = cfg.readEntry( "Type" );
+ TQString type = cfg.readEntry( "Type" );
if ( type.isEmpty() )
return result;
if ( type == "FSDevice" )
{
- QString dev = cfg.readEntry( "Dev" );
+ TQString dev = cfg.readEntry( "Dev" );
if ( dev.isEmpty() )
{
- QString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( _url.path() );
+ TQString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( _url.path() );
KMessageBoxWrapper::error( 0, tmp);
}
else
{
- QString mp = KIO::findDeviceMountPoint( dev );
+ TQString mp = KIO::findDeviceMountPoint( dev );
// not mounted ?
if ( mp.isEmpty() )
{
@@ -964,20 +964,20 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::builtinServices( con
return result;
}
-QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const QString& path, bool bLocalFiles )
+TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, bool bLocalFiles )
{
KSimpleConfig cfg( path, true );
return userDefinedServices( path, cfg, bLocalFiles );
}
-QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const QString& path, KConfig& cfg, bool bLocalFiles )
+TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, KConfig& cfg, bool bLocalFiles )
{
return userDefinedServices( path, cfg, bLocalFiles, KURL::List() );
}
-QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const QString& path, KConfig& cfg, bool bLocalFiles, const KURL::List & file_list )
+TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, KConfig& cfg, bool bLocalFiles, const KURL::List & file_list )
{
- QValueList<Service> result;
+ TQValueList<Service> result;
cfg.setDesktopGroup();
@@ -986,35 +986,35 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices(
if ( cfg.hasKey( "TryExec" ) )
{
- QString tryexec = cfg.readPathEntry( "TryExec" );
- QString exe = KStandardDirs::findExe( tryexec );
+ TQString tryexec = cfg.readPathEntry( "TryExec" );
+ TQString exe = KStandardDirs::findExe( tryexec );
if (exe.isEmpty()) {
return result;
}
}
- QStringList keys;
+ TQStringList keys;
if( cfg.hasKey( "X-KDE-GetActionMenu" )) {
- QString dcopcall = cfg.readEntry( "X-KDE-GetActionMenu" );
- const QCString app = dcopcall.section(' ', 0,0).utf8();
+ TQString dcopcall = cfg.readEntry( "X-KDE-GetActionMenu" );
+ const TQCString app = dcopcall.section(' ', 0,0).utf8();
- QByteArray dataToSend;
- QDataStream dataStream(dataToSend, IO_WriteOnly);
+ TQByteArray dataToSend;
+ TQDataStream dataStream(dataToSend, IO_WriteOnly);
dataStream << file_list;
- QCString replyType;
- QByteArray replyData;
- QCString object = dcopcall.section(' ', 1,-2).utf8();
- QString function = dcopcall.section(' ', -1);
+ TQCString replyType;
+ TQByteArray replyData;
+ TQCString object = dcopcall.section(' ', 1,-2).utf8();
+ TQString function = dcopcall.section(' ', -1);
if(!function.endsWith("(KURL::List)")) {
kdWarning() << "Desktop file " << path << " contains an invalid X-KDE-ShowIfDcopCall - the function must take the exact parameter (KURL::List) and must be specified." << endl;
} else {
if(kapp->dcopClient()->call( app, object,
function.utf8(),
dataToSend, replyType, replyData, true, -1)
- && replyType == "QStringList" ) {
+ && replyType == "TQStringList" ) {
- QDataStream dataStreamIn(replyData, IO_ReadOnly);
+ TQDataStream dataStreamIn(replyData, IO_ReadOnly);
dataStreamIn >> keys;
}
}
@@ -1025,13 +1025,13 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices(
if ( keys.count() == 0 )
return result;
- QStringList::ConstIterator it = keys.begin();
- QStringList::ConstIterator end = keys.end();
+ TQStringList::ConstIterator it = keys.begin();
+ TQStringList::ConstIterator end = keys.end();
for ( ; it != end; ++it )
{
//kdDebug(7009) << "CURRENT KEY = " << (*it) << endl;
- QString group = *it;
+ TQString group = *it;
if (group == "_SEPARATOR_")
{
@@ -1052,7 +1052,7 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices(
bInvalidMenu = true;
else
{
- QString exec = cfg.readPathEntry( "Exec" );
+ TQString exec = cfg.readPathEntry( "Exec" );
if ( bLocalFiles || exec.contains("%U") || exec.contains("%u") )
{
Service s;
@@ -1070,7 +1070,7 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices(
if ( bInvalidMenu )
{
- QString tmp = i18n("The desktop entry file\n%1\n has an invalid menu entry\n%2.").arg( path ).arg( *it );
+ TQString tmp = i18n("The desktop entry file\n%1\n has an invalid menu entry\n%2.").arg( path ).arg( *it );
KMessageBoxWrapper::error( 0, tmp );
}
}
@@ -1078,7 +1078,7 @@ QValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices(
return result;
}
-void KDEDesktopMimeType::executeService( const QString& _url, KDEDesktopMimeType::Service& _service )
+void KDEDesktopMimeType::executeService( const TQString& _url, KDEDesktopMimeType::Service& _service )
{
KURL u;
u.setPath(_url);
@@ -1104,19 +1104,19 @@ void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeT
else if ( _service.m_type == ST_MOUNT || _service.m_type == ST_UNMOUNT )
{
Q_ASSERT( urls.count() == 1 );
- QString path = urls.first().path();
+ TQString path = urls.first().path();
//kdDebug(7009) << "MOUNT&UNMOUNT" << endl;
KSimpleConfig cfg( path, true );
cfg.setDesktopGroup();
- QString dev = cfg.readEntry( "Dev" );
+ TQString dev = cfg.readEntry( "Dev" );
if ( dev.isEmpty() )
{
- QString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( path );
+ TQString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( path );
KMessageBoxWrapper::error( 0, tmp );
return;
}
- QString mp = KIO::findDeviceMountPoint( dev );
+ TQString mp = KIO::findDeviceMountPoint( dev );
if ( _service.m_type == ST_MOUNT )
{
@@ -1128,10 +1128,10 @@ void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeT
}
bool ro = cfg.readBoolEntry( "ReadOnly", false );
- QString fstype = cfg.readEntry( "FSType" );
+ TQString fstype = cfg.readEntry( "FSType" );
if ( fstype == "Default" ) // KDE-1 thing
- fstype = QString::null;
- QString point = cfg.readEntry( "MountPoint" );
+ fstype = TQString::null;
+ TQString point = cfg.readEntry( "MountPoint" );
#ifndef Q_WS_WIN
(void)new KAutoMount( ro, fstype, dev, point, path, false );
#endif
@@ -1151,9 +1151,9 @@ void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeT
assert( 0 );
}
-const QString & KMimeType::defaultMimeType()
+const TQString & KMimeType::defaultMimeType()
{
- static const QString & s_strDefaultMimeType =
+ static const TQString & s_strDefaultMimeType =
KGlobal::staticQString( "application/octet-stream" );
return s_strDefaultMimeType;
}
diff --git a/kio/kio/kmimetype.h b/kio/kio/kmimetype.h
index 0e1477c64..22f9b72ef 100644
--- a/kio/kio/kmimetype.h
+++ b/kio/kio/kmimetype.h
@@ -23,9 +23,9 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qpixmap.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqpixmap.h>
#include <kicontheme.h>
#include <kurl.h>
@@ -50,7 +50,7 @@ class KIO_EXPORT KMimeType : public KServiceType
public:
typedef KSharedPtr<KMimeType> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public:
/**
* Constructor.
@@ -65,14 +65,14 @@ public:
* @param _patterns a list of file globs that describes the names (or
* extensions) of the files with this mime type
*/
- KMimeType( const QString & _fullpath, const QString& _type, const QString& _icon,
- const QString& _comment, const QStringList& _patterns );
+ KMimeType( const TQString & _fullpath, const TQString& _type, const TQString& _icon,
+ const TQString& _comment, const TQStringList& _patterns );
/**
* Construct a mimetype and take all information from a config file.
* @param _fullpath the path to the configuration file (.desktop)
*/
- KMimeType( const QString & _fullpath );
+ KMimeType( const TQString & _fullpath );
/**
* Construct a mimetype and take all information from a desktop file.
@@ -85,7 +85,7 @@ public:
*
* The stream must already be positionned at the correct offset
*/
- KMimeType( QDataStream& _str, int offset );
+ KMimeType( TQDataStream& _str, int offset );
virtual ~KMimeType();
@@ -97,7 +97,7 @@ public:
*
* @return The path to the icon associated with this MIME type.
*/
- virtual QString icon( const QString& , bool ) const { return m_strIcon; }
+ virtual TQString icon( const TQString& , bool ) const { return m_strIcon; }
/**
* Return the filename of the icon associated with the mimetype.
@@ -107,7 +107,7 @@ public:
*
* @return The path to the icon associated with this MIME type.
*/
- virtual QString icon( const KURL& , bool ) const { return m_strIcon; }
+ virtual TQString icon( const KURL& , bool ) const { return m_strIcon; }
/**
* Use this function only if you don't have a special URL
@@ -126,8 +126,8 @@ public:
* Ignored if 0
* @return the pixmap of the mime type, can be a default icon if not found
*/
- virtual QPixmap pixmap( KIcon::Group group, int force_size = 0, int state = 0,
- QString * path = 0L ) const;
+ virtual TQPixmap pixmap( KIcon::Group group, int force_size = 0, int state = 0,
+ TQString * path = 0L ) const;
/**
* Find the pixmap for a given file of this mimetype.
@@ -145,8 +145,8 @@ public:
* Ignored if 0
* @return the pixmap of the URL, can be a default icon if not found
*/
- virtual QPixmap pixmap( const KURL& _url, KIcon::Group _group, int _force_size = 0,
- int _state = 0, QString * _path = 0L ) const;
+ virtual TQPixmap pixmap( const KURL& _url, KIcon::Group _group, int _force_size = 0,
+ int _state = 0, TQString * _path = 0L ) const;
/**
* Convenience method to find the pixmap for a URL.
@@ -166,8 +166,8 @@ public:
* Ignored if 0
* @return the pixmap of the URL, can be a default icon if not found
*/
- static QPixmap pixmapForURL( const KURL & _url, mode_t _mode = 0, KIcon::Group _group = KIcon::Desktop,
- int _force_size = 0, int _state = 0, QString * _path = 0L );
+ static TQPixmap pixmapForURL( const KURL & _url, mode_t _mode = 0, KIcon::Group _group = KIcon::Desktop,
+ int _force_size = 0, int _state = 0, TQString * _path = 0L );
/**
@@ -182,24 +182,24 @@ public:
* @return the name of the icon. The name of a default icon if there is no icon
* for the mime type
*/
- static QString iconForURL( const KURL & _url, mode_t _mode = 0 );
+ static TQString iconForURL( const KURL & _url, mode_t _mode = 0 );
/**
* Return the "favicon" (see http://www.favicon.com) for the given @p url,
* if available. Does NOT attempt to download the favicon, it only returns
* one that is already available.
*
- * If unavailable, returns QString::null.
+ * If unavailable, returns TQString::null.
* @param url the URL of the favicon
- * @return the name of the favicon, or QString::null
+ * @return the name of the favicon, or TQString::null
*/
- static QString favIconForURL( const KURL& url );
+ static TQString favIconForURL( const KURL& url );
/**
* Returns the descriptive comment associated with the MIME type.
* @return the descriptive comment associated with the MIME type
*/
- QString comment() const { return m_strComment; }
+ TQString comment() const { return m_strComment; }
/**
* Returns the descriptive comment associated with the MIME type.
@@ -208,7 +208,7 @@ public:
*
* @return The descriptive comment associated with the MIME type, if any.
*/
- virtual QString comment( const QString&, bool ) const { return m_strComment; }
+ virtual TQString comment( const TQString&, bool ) const { return m_strComment; }
/**
* Returns the descriptive comment associated with the MIME type.
@@ -217,26 +217,26 @@ public:
*
* @return The descriptive comment associated with the MIME type, if any.
*/
- virtual QString comment( const KURL&, bool ) const { return m_strComment; }
+ virtual TQString comment( const KURL&, bool ) const { return m_strComment; }
/**
* Retrieve the list of patterns associated with the MIME Type.
* @return a list of file globs that describe the file names
* (or, usually, the extensions) of files with this mime type
*/
- const QStringList& patterns() const { return m_lstPatterns; }
+ const TQStringList& patterns() const { return m_lstPatterns; }
/**
* Load the mimetype from a stream.
* @param qs the stream to load from
*/
- virtual void load( QDataStream &qs );
+ virtual void load( TQDataStream &qs );
/**
* Save the mimetype to a stream.
* @param qs the stream to save to
*/
- virtual void save( QDataStream &qs );
+ virtual void save( TQDataStream &qs );
/**
* Returns the property with the given @p _name.
@@ -244,7 +244,7 @@ public:
* @return the value of the property
* @see propertyNames()
*/
- virtual QVariant property( const QString& _name ) const;
+ virtual TQVariant property( const TQString& _name ) const;
/**
* Retrieves a list of all properties associated with this
@@ -252,7 +252,7 @@ public:
* @return a list of all property names
* @see property()
*/
- virtual QStringList propertyNames() const;
+ virtual TQStringList propertyNames() const;
/**
* Retrieve a pointer to the mime type @p _name or a pointer to the default
@@ -268,7 +268,7 @@ public:
* not found
* @see KServiceType::serviceType
*/
- static Ptr mimeType( const QString& _name );
+ static Ptr mimeType( const TQString& _name );
/**
* Finds a KMimeType with the given @p _url.
@@ -330,7 +330,7 @@ public:
* it is @em fast.
* @return A pointer to the matching mimetype. 0L is never returned.
*/
- static Ptr findByPath( const QString& path, mode_t mode = 0, bool fast_mode = false );
+ static Ptr findByPath( const TQString& path, mode_t mode = 0, bool fast_mode = false );
/**
* Tries to find out the MIME type of a data chunk by looking for
@@ -342,7 +342,7 @@ public:
* @return a pointer to the KMimeType. application/octet-stream's KMimeType of the
* type can not be found this way.
*/
- static Ptr findByContent( const QByteArray &data, int *accuracy=0 );
+ static Ptr findByContent( const TQByteArray &data, int *accuracy=0 );
/**
* Tries to find out the MIME type of a file by looking for
@@ -357,7 +357,7 @@ public:
* @return a pointer to the KMimeType. application/octet-stream's KMimeType of the
* type can not be found this way.
*/
- static Ptr findByFileContent( const QString &fileName, int *accuracy=0 );
+ static Ptr findByFileContent( const TQString &fileName, int *accuracy=0 );
struct Format{
bool text : 1;
@@ -370,7 +370,7 @@ public:
* or that would be human readable after decompression.
* @since 3.2
*/
- static Format findFormatByFileContent( const QString &fileName );
+ static Format findFormatByFileContent( const TQString &fileName );
/**
* Get all the mimetypes.
@@ -390,7 +390,7 @@ public:
* @return the name of the default mime type, always
* "application/octet-stream"
*/
- static const QString & defaultMimeType();
+ static const TQString & defaultMimeType();
/**
* Returns the default mimetype.
@@ -414,10 +414,10 @@ public:
* since an application that handles the specific type doesn't necessarily handle
* the base type. The opposite is true though.
*
- * @return the parent mime type, or QString::null if not set
+ * @return the parent mime type, or TQString::null if not set
* @since 3.2
*/
- QString parentMimeType() const;
+ TQString parentMimeType() const;
/**
* Do not use name()=="somename" anymore, to check for a given mimetype.
@@ -425,24 +425,24 @@ public:
* Warning, do not use inherits(), that's the servicetype inheritance concept!
* @since 3.2
*/
- bool is( const QString& mimeTypeName ) const;
+ bool is( const TQString& mimeTypeName ) const;
/**
* @internal
* Determines the mimetype of file based on it's name and returns the
* matching pattern if any.
*/
- static KMimeType::Ptr diagnoseFileName(const QString &file, QString &pattern);
+ static KMimeType::Ptr diagnoseFileName(const TQString &file, TQString &pattern);
protected:
- void loadInternal( QDataStream& );
+ void loadInternal( TQDataStream& );
void init( KDesktopFile * );
/**
* Signal a missing mime type.
* @param _type the missinf mime type
*/
- static void errorMissingMimeType( const QString& _type );
+ static void errorMissingMimeType( const TQString& _type );
/**
* This function makes sure that the default mime type exists.
@@ -458,7 +458,7 @@ protected:
*/
static bool s_bChecked;
- QStringList m_lstPatterns;
+ TQStringList m_lstPatterns;
static Ptr s_pDefaultType;
@@ -479,21 +479,21 @@ class KIO_EXPORT KFolderType : public KMimeType
K_SYCOCATYPE( KST_KFolderType, KMimeType )
public:
-// KFolderType( const QString & _fullpath, const QString& _type, const QString& _icon, const QString& _comment,
-// const QStringList& _patterns );
-// KFolderType( const QString & _fullpath ) : KMimeType( _fullpath ) { }
+// KFolderType( const TQString & _fullpath, const TQString& _type, const TQString& _icon, const TQString& _comment,
+// const TQStringList& _patterns );
+// KFolderType( const TQString & _fullpath ) : KMimeType( _fullpath ) { }
/**
* Construct a folder mimetype and take all information from a desktop file.
* @param config the desktop configuration file that describes the mime type
*/
KFolderType( KDesktopFile *config) : KMimeType( config ) { }
/** \internal */
- KFolderType( QDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
+ KFolderType( TQDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
- virtual QString icon( const QString& _url, bool _is_local ) const;
- virtual QString icon( const KURL& _url, bool _is_local ) const;
- virtual QString comment( const QString& _url, bool _is_local ) const;
- virtual QString comment( const KURL& _url, bool _is_local ) const;
+ virtual TQString icon( const TQString& _url, bool _is_local ) const;
+ virtual TQString icon( const KURL& _url, bool _is_local ) const;
+ virtual TQString comment( const TQString& _url, bool _is_local ) const;
+ virtual TQString comment( const KURL& _url, bool _is_local ) const;
protected:
virtual void virtual_hook( int id, void* data );
};
@@ -518,36 +518,36 @@ public:
{
Service() { m_display = true; }
bool isEmpty() const { return m_strName.isEmpty(); }
- QString m_strName;
- QString m_strIcon;
- QString m_strExec;
+ TQString m_strName;
+ TQString m_strIcon;
+ TQString m_strExec;
ServiceType m_type;
bool m_display;
};
- // KDEDesktopMimeType( const QString & _fullpath, const QString& _type, const QString& _icon,
- // const QString& _comment, const QStringList& _patterns );
- // KDEDesktopMimeType( const QString & _fullpath ) : KMimeType( _fullpath ) { }
+ // KDEDesktopMimeType( const TQString & _fullpath, const TQString& _type, const TQString& _icon,
+ // const TQString& _comment, const TQStringList& _patterns );
+ // KDEDesktopMimeType( const TQString & _fullpath ) : KMimeType( _fullpath ) { }
/**
* Construct a desktop mimetype and take all information from a desktop file.
* @param config the desktop configuration file that describes the mime type
*/
KDEDesktopMimeType( KDesktopFile *config) : KMimeType( config ) { }
/** \internal */
- KDEDesktopMimeType( QDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
+ KDEDesktopMimeType( TQDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
- virtual QString icon( const QString& _url, bool _is_local ) const;
- virtual QString icon( const KURL& _url, bool _is_local ) const;
- virtual QPixmap pixmap( const KURL& _url, KIcon::Group _group, int _force_size = 0,
- int _state = 0, QString * _path = 0L ) const;
- virtual QString comment( const QString& _url, bool _is_local ) const;
- virtual QString comment( const KURL& _url, bool _is_local ) const;
+ virtual TQString icon( const TQString& _url, bool _is_local ) const;
+ virtual TQString icon( const KURL& _url, bool _is_local ) const;
+ virtual TQPixmap pixmap( const KURL& _url, KIcon::Group _group, int _force_size = 0,
+ int _state = 0, TQString * _path = 0L ) const;
+ virtual TQString comment( const TQString& _url, bool _is_local ) const;
+ virtual TQString comment( const KURL& _url, bool _is_local ) const;
/**
* Returns a list of services for the given .desktop file that are handled
* by kio itself. Namely mount/unmount for FSDevice files.
* @return the list of services
*/
- static QValueList<Service> builtinServices( const KURL& _url );
+ static TQValueList<Service> builtinServices( const KURL& _url );
/**
* Returns a list of services defined by the user as possible actions
* on the given .desktop file. May include empty actions which represent where
@@ -558,14 +558,14 @@ public:
* (if false, services that don't have %u or %U in the Exec line won't be taken into account).
* @return the list of user deviced actions
*/
- static QValueList<Service> userDefinedServices( const QString& path, bool bLocalFiles );
+ static TQValueList<Service> userDefinedServices( const TQString& path, bool bLocalFiles );
/**
* Overload of userDefinedServices for speed purposes: it takes a KConfig* so that
* the caller can check things in the file without having it parsed twice.
* @since 3.4
*/
- static QValueList<Service> userDefinedServices( const QString& path, KConfig& config, bool bLocalFiles );
+ static TQValueList<Service> userDefinedServices( const TQString& path, KConfig& config, bool bLocalFiles );
/**
* Overload of userDefinedServices but also allows you to pass a list of urls for this file.
@@ -573,14 +573,14 @@ public:
* the X-KDE-GetActionMenu extension.
* @since 3.5
*/
- static QValueList<Service> userDefinedServices( const QString& path, KConfig& config, bool bLocalFiles, const KURL::List & file_list);
+ static TQValueList<Service> userDefinedServices( const TQString& path, KConfig& config, bool bLocalFiles, const KURL::List & file_list);
/**
* @param path is the path of the desktop entry.
* @param service the service to execute
* @deprecated, see the other executeService
*/
- static void executeService( const QString& path, KDEDesktopMimeType::Service& service ) KDE_DEPRECATED;
+ static void executeService( const TQString& path, KDEDesktopMimeType::Service& service ) KDE_DEPRECATED;
/**
* Execute @p service on the list of @p urls.
@@ -603,12 +603,12 @@ public:
static pid_t run( const KURL& _url, bool _is_local );
protected:
- virtual QPixmap pixmap( KIcon::Group group, int force_size = 0, int state = 0,
- QString * path = 0L ) const
+ virtual TQPixmap pixmap( KIcon::Group group, int force_size = 0, int state = 0,
+ TQString * path = 0L ) const
{ return KMimeType::pixmap( group, force_size, state, path ); }
static pid_t runFSDevice( const KURL& _url, const KSimpleConfig &cfg );
- static pid_t runApplication( const KURL& _url, const QString & _serviceFile );
+ static pid_t runApplication( const KURL& _url, const TQString & _serviceFile );
static pid_t runLink( const KURL& _url, const KSimpleConfig &cfg );
static pid_t runMimeType( const KURL& _url, const KSimpleConfig &cfg );
protected:
@@ -624,16 +624,16 @@ class KIO_EXPORT KExecMimeType : public KMimeType
K_SYCOCATYPE( KST_KExecMimeType, KMimeType )
public:
- // KExecMimeType( const QString & _fullpath, const QString& _type, const QString& _icon,
- // const QString& _comment, const QStringList& _patterns );
- // KExecMimeType( const QString & _fullpath ) : KMimeType( _fullpath ) { }
+ // KExecMimeType( const TQString & _fullpath, const TQString& _type, const TQString& _icon,
+ // const TQString& _comment, const TQStringList& _patterns );
+ // KExecMimeType( const TQString & _fullpath ) : KMimeType( _fullpath ) { }
/**
* Construct a executable mimetype and take all information from a desktop file.
* @param config the desktop configuration file that describes the mime type
*/
KExecMimeType( KDesktopFile *config) : KMimeType( config ) { }
/** \internal */
- KExecMimeType( QDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
+ KExecMimeType( TQDataStream& _str, int offset ) : KMimeType( _str, offset ) { }
protected:
virtual void virtual_hook( int id, void* data );
};
diff --git a/kio/kio/kmimetypechooser.cpp b/kio/kio/kmimetypechooser.cpp
index d06861e1f..d8ceb930b 100644
--- a/kio/kio/kmimetypechooser.cpp
+++ b/kio/kio/kmimetypechooser.cpp
@@ -27,34 +27,34 @@
#include <krun.h>
#include <ksycoca.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
//BEGIN KMimeTypeChooserPrivate
class KMimeTypeChooserPrivate
{
public:
KListView *lvMimeTypes;
- QPushButton *btnEditMimeType;
+ TQPushButton *btnEditMimeType;
- QString defaultgroup;
- QStringList groups;
+ TQString defaultgroup;
+ TQStringList groups;
int visuals;
};
//END
//BEGIN KMimeTypeChooser
-KMimeTypeChooser::KMimeTypeChooser( const QString &text,
- const QStringList &selMimeTypes,
- const QString &defaultGroup,
- const QStringList &groupsToShow,
+KMimeTypeChooser::KMimeTypeChooser( const TQString &text,
+ const TQStringList &selMimeTypes,
+ const TQString &defaultGroup,
+ const TQStringList &groupsToShow,
int visuals,
- QWidget *parent,
+ TQWidget *parent,
const char *name )
- : QVBox( parent, name )
+ : TQVBox( parent, name )
{
d = new KMimeTypeChooserPrivate();
d->lvMimeTypes = 0;
@@ -67,18 +67,18 @@ KMimeTypeChooser::KMimeTypeChooser( const QString &text,
if ( !text.isEmpty() )
{
- new QLabel( text, this );
+ new TQLabel( text, this );
}
d->lvMimeTypes = new KListView( this );
d->lvMimeTypes->addColumn( i18n("Mime Type") );
-// d->lvMimeTypes->setColumnWidthMode( 0, QListView::Manual );
+// d->lvMimeTypes->setColumnWidthMode( 0, TQListView::Manual );
if ( visuals & Comments )
{
d->lvMimeTypes->addColumn( i18n("Comment") );
- d->lvMimeTypes->setColumnWidthMode( 1, QListView::Manual );
+ d->lvMimeTypes->setColumnWidthMode( 1, TQListView::Manual );
}
if ( visuals & Patterns )
d->lvMimeTypes->addColumn( i18n("Patterns") );
@@ -89,18 +89,18 @@ KMimeTypeChooser::KMimeTypeChooser( const QString &text,
if (visuals & KMimeTypeChooser::EditButton)
{
- QHBox *btns = new QHBox( this );
- ((QBoxLayout*)btns->layout())->addStretch(1);
- d->btnEditMimeType = new QPushButton( i18n("&Edit..."), btns );
+ TQHBox *btns = new TQHBox( this );
+ ((TQBoxLayout*)btns->layout())->addStretch(1);
+ d->btnEditMimeType = new TQPushButton( i18n("&Edit..."), btns );
- connect( d->btnEditMimeType, SIGNAL(clicked()), this, SLOT(editMimeType()) );
+ connect( d->btnEditMimeType, TQT_SIGNAL(clicked()), this, TQT_SLOT(editMimeType()) );
d->btnEditMimeType->setEnabled( false );
- connect( d->lvMimeTypes, SIGNAL( doubleClicked ( QListViewItem * )),
- this, SLOT( editMimeType()));
- connect( d->lvMimeTypes, SIGNAL(currentChanged(QListViewItem*)),
- this, SLOT(slotCurrentChanged(QListViewItem*)) );
+ connect( d->lvMimeTypes, TQT_SIGNAL( doubleClicked ( TQListViewItem * )),
+ this, TQT_SLOT( editMimeType()));
+ connect( d->lvMimeTypes, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListViewItem*)) );
- QWhatsThis::add( d->btnEditMimeType, i18n(
+ TQWhatsThis::add( d->btnEditMimeType, i18n(
"Click this button to display the familiar KDE mime type editor.") );
}
}
@@ -110,9 +110,9 @@ KMimeTypeChooser::~KMimeTypeChooser()
delete d;
}
-void KMimeTypeChooser::loadMimeTypes( const QStringList &_selectedMimeTypes )
+void KMimeTypeChooser::loadMimeTypes( const TQStringList &_selectedMimeTypes )
{
- QStringList selMimeTypes;
+ TQStringList selMimeTypes;
if ( !_selectedMimeTypes.isEmpty() )
selMimeTypes = _selectedMimeTypes;
@@ -121,31 +121,31 @@ void KMimeTypeChooser::loadMimeTypes( const QStringList &_selectedMimeTypes )
d->lvMimeTypes->clear();
- QMap<QString,QListViewItem*> groups;
+ TQMap<TQString,TQListViewItem*> groups;
// thanks to kdebase/kcontrol/filetypes/filetypesview
KMimeType::List mimetypes = KMimeType::allMimeTypes();
- QValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
+ TQValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
- QListViewItem *groupItem;
+ TQListViewItem *groupItem;
bool agroupisopen = false;
- QListViewItem *idefault = 0; //open this, if all other fails
- QListViewItem *firstChecked = 0; // make this one visible after the loop
+ TQListViewItem *idefault = 0; //open this, if all other fails
+ TQListViewItem *firstChecked = 0; // make this one visible after the loop
for (; it != mimetypes.end(); ++it)
{
- QString mimetype = (*it)->name();
+ TQString mimetype = (*it)->name();
int index = mimetype.find("/");
- QString maj = mimetype.left(index);
+ TQString maj = mimetype.left(index);
if ( d->groups.count() && !d->groups.contains( maj ) )
continue;
- QString min = mimetype.right(mimetype.length() - (index+1));
+ TQString min = mimetype.right(mimetype.length() - (index+1));
- QMapIterator<QString,QListViewItem*> mit = groups.find( maj );
+ TQMapIterator<TQString,TQListViewItem*> mit = groups.find( maj );
if ( mit == groups.end() )
{
- groupItem = new QListViewItem( d->lvMimeTypes, maj );
+ groupItem = new TQListViewItem( d->lvMimeTypes, maj );
groups.insert( maj, groupItem );
if ( maj == d->defaultgroup )
idefault = groupItem;
@@ -153,14 +153,14 @@ void KMimeTypeChooser::loadMimeTypes( const QStringList &_selectedMimeTypes )
else
groupItem = mit.data();
- QCheckListItem *item = new QCheckListItem( groupItem, min, QCheckListItem::CheckBox );
- item->setPixmap( 0, SmallIcon( (*it)->icon(QString::null,false) ) );
+ TQCheckListItem *item = new TQCheckListItem( groupItem, min, TQCheckListItem::CheckBox );
+ item->setPixmap( 0, SmallIcon( (*it)->icon(TQString::null,false) ) );
int cl = 1;
if ( d->visuals & Comments )
{
- item->setText( cl, (*it)->comment(QString::null, false) );
+ item->setText( cl, (*it)->comment(TQString::null, false) );
cl++;
}
@@ -191,18 +191,18 @@ void KMimeTypeChooser::editMimeType()
{
if ( !(d->lvMimeTypes->currentItem() && (d->lvMimeTypes->currentItem())->parent()) )
return;
- QString mt = (d->lvMimeTypes->currentItem()->parent())->text( 0 ) + "/" + (d->lvMimeTypes->currentItem())->text( 0 );
+ TQString mt = (d->lvMimeTypes->currentItem()->parent())->text( 0 ) + "/" + (d->lvMimeTypes->currentItem())->text( 0 );
// thanks to libkonq/konq_operations.cc
- connect( KSycoca::self(), SIGNAL(databaseChanged()),
- this, SLOT(slotSycocaDatabaseChanged()) );
- QString keditfiletype = QString::fromLatin1("keditfiletype");
+ connect( KSycoca::self(), TQT_SIGNAL(databaseChanged()),
+ this, TQT_SLOT(slotSycocaDatabaseChanged()) );
+ TQString keditfiletype = TQString::fromLatin1("keditfiletype");
KRun::runCommand( keditfiletype
- + " --parent " + QString::number( (ulong)topLevelWidget()->winId())
+ + " --parent " + TQString::number( (ulong)topLevelWidget()->winId())
+ " " + KProcess::quote(mt),
keditfiletype, keditfiletype /*unused*/);
}
-void KMimeTypeChooser::slotCurrentChanged(QListViewItem* i)
+void KMimeTypeChooser::slotCurrentChanged(TQListViewItem* i)
{
if ( d->btnEditMimeType )
d->btnEditMimeType->setEnabled( i->parent() );
@@ -214,27 +214,27 @@ void KMimeTypeChooser::slotSycocaDatabaseChanged()
loadMimeTypes();
}
-QStringList KMimeTypeChooser::mimeTypes() const
+TQStringList KMimeTypeChooser::mimeTypes() const
{
- QStringList l;
- QListViewItemIterator it( d->lvMimeTypes );
+ TQStringList l;
+ TQListViewItemIterator it( d->lvMimeTypes );
for (; it.current(); ++it)
{
- if ( it.current()->parent() && ((QCheckListItem*)it.current())->isOn() )
+ if ( it.current()->parent() && ((TQCheckListItem*)it.current())->isOn() )
l << it.current()->parent()->text(0) + "/" + it.current()->text(0); // FIXME uncecked, should be Ok unless someone changes mimetypes during this!
}
return l;
}
-QStringList KMimeTypeChooser::patterns() const
+TQStringList KMimeTypeChooser::patterns() const
{
- QStringList l;
+ TQStringList l;
KMimeType::Ptr p;
- QString defMT = KMimeType::defaultMimeType();
- QListViewItemIterator it( d->lvMimeTypes );
+ TQString defMT = KMimeType::defaultMimeType();
+ TQListViewItemIterator it( d->lvMimeTypes );
for (; it.current(); ++it)
{
- if ( it.current()->parent() && ((QCheckListItem*)it.current())->isOn() )
+ if ( it.current()->parent() && ((TQCheckListItem*)it.current())->isOn() )
{
p = KMimeType::mimeType( it.current()->parent()->text(0) + "/" + it.current()->text(0) );
if ( p->name() != defMT )
@@ -247,13 +247,13 @@ QStringList KMimeTypeChooser::patterns() const
//BEGIN KMimeTypeChooserDialog
KMimeTypeChooserDialog::KMimeTypeChooserDialog(
- const QString &caption,
- const QString& text,
- const QStringList &selMimeTypes,
- const QString &defaultGroup,
- const QStringList &groupsToShow,
+ const TQString &caption,
+ const TQString& text,
+ const TQStringList &selMimeTypes,
+ const TQString &defaultGroup,
+ const TQStringList &groupsToShow,
int visuals,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase(parent, name, true, caption, Cancel|Ok, Ok)
{
m_chooser = new KMimeTypeChooser( text, selMimeTypes,
@@ -262,26 +262,26 @@ KMimeTypeChooserDialog::KMimeTypeChooserDialog(
setMainWidget(m_chooser);
KConfigGroup group( KGlobal::config(), "KMimeTypeChooserDialog");
- QSize defaultSize( 400, 300 );
+ TQSize defaultSize( 400, 300 );
resize( group.readSizeEntry("size", &defaultSize) );
}
KMimeTypeChooserDialog::KMimeTypeChooserDialog(
- const QString &caption,
- const QString& text,
- const QStringList &selMimeTypes,
- const QString &defaultGroup,
- QWidget *parent, const char *name )
+ const TQString &caption,
+ const TQString& text,
+ const TQStringList &selMimeTypes,
+ const TQString &defaultGroup,
+ TQWidget *parent, const char *name )
: KDialogBase(parent, name, true, caption, Cancel|Ok, Ok)
{
m_chooser = new KMimeTypeChooser( text, selMimeTypes,
- defaultGroup, QStringList(),
+ defaultGroup, TQStringList(),
KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton,
this, "chooser" );
setMainWidget(m_chooser);
KConfigGroup group( KGlobal::config(), "KMimeTypeChooserDialog");
- QSize defaultSize( 400, 300 );
+ TQSize defaultSize( 400, 300 );
resize( group.readSizeEntry("size", &defaultSize) );
}
diff --git a/kio/kio/kmimetypechooser.h b/kio/kio/kmimetypechooser.h
index 6fe7b3190..0827d5b30 100644
--- a/kio/kio/kmimetypechooser.h
+++ b/kio/kio/kmimetypechooser.h
@@ -19,7 +19,7 @@
#ifndef _KMIMETYPE_CHOOSER_H_
#define _KMIMETYPE_CHOOSER_H_
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kdialogbase.h>
@@ -59,22 +59,22 @@ class KIO_EXPORT KMimeTypeChooser : public QVBox
* @param parent The parent widget to use
* @param name The internal name of this object
*/
- KMimeTypeChooser( const QString& text=QString::null,
- const QStringList &selectedMimeTypes=0,
- const QString &defaultGroup=QString::null,
- const QStringList &groupsToShow=QStringList(),
+ KMimeTypeChooser( const TQString& text=TQString::null,
+ const TQStringList &selectedMimeTypes=0,
+ const TQString &defaultGroup=TQString::null,
+ const TQStringList &groupsToShow=TQStringList(),
int visuals=Comments|Patterns|EditButton,
- QWidget *parent=0, const char *name=0 );
+ TQWidget *parent=0, const char *name=0 );
~KMimeTypeChooser();
/**
* @return a list of all selected selected mimetypes represented by their name.
*/
- QStringList mimeTypes() const;
+ TQStringList mimeTypes() const;
/**
* @return a list of the fileame patterns associated with all selected mimetypes.
*/
- QStringList patterns() const;
+ TQStringList patterns() const;
public slots:
/**
@@ -88,7 +88,7 @@ class KIO_EXPORT KMimeTypeChooser : public QVBox
/**
* @internal disables the "edit" button for groups
*/
- void slotCurrentChanged(QListViewItem* i);
+ void slotCurrentChanged(TQListViewItem* i);
/**
* @internal called when the sycoca database has changed after
@@ -102,7 +102,7 @@ class KIO_EXPORT KMimeTypeChooser : public QVBox
* If @p selected is empty, selectedMimeTypesStringList() is called
* to fill it in.
*/
- void loadMimeTypes( const QStringList &selected=QStringList() );
+ void loadMimeTypes( const TQStringList &selected=TQStringList() );
class KMimeTypeChooserPrivate *d;
};
@@ -116,8 +116,8 @@ class KIO_EXPORT KMimeTypeChooser : public QVBox
* Here is an example, using the dialog to set the text of two lineedits:
*
* @code
- * QString text = i18n("Select the MimeTypes you want for this file type.");
- * QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), leMimetypes->text() );
+ * TQString text = i18n("Select the MimeTypes you want for this file type.");
+ * TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), leMimetypes->text() );
* KMimeTypeChooserDialog *d = new KMimeTypeChooserDialog( this, 0,
* i18n("Select Mime Types"), text, list, "text" );
* if ( d->exec() == KDialogBase::Accepted ) {
@@ -149,22 +149,22 @@ class KIO_EXPORT KMimeTypeChooserDialog : public KDialogBase
* @param parent The parent widget to use
* @param name The internal name of this object
*/
- KMimeTypeChooserDialog( const QString &caption=QString::null,
- const QString& text=QString::null,
- const QStringList &selectedMimeTypes=QStringList(),
- const QString &defaultGroup=QString::null,
- const QStringList &groupsToShow=QStringList(),
+ KMimeTypeChooserDialog( const TQString &caption=TQString::null,
+ const TQString& text=TQString::null,
+ const TQStringList &selectedMimeTypes=TQStringList(),
+ const TQString &defaultGroup=TQString::null,
+ const TQStringList &groupsToShow=TQStringList(),
int visuals=KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton,
- QWidget *parent=0, const char *name=0 );
+ TQWidget *parent=0, const char *name=0 );
/**
* @overload
*/
- KMimeTypeChooserDialog( const QString &caption,
- const QString& text,
- const QStringList &selectedMimeTypes,
- const QString &defaultGroup,
- QWidget *parent=0, const char *name=0 );
+ KMimeTypeChooserDialog( const TQString &caption,
+ const TQString& text,
+ const TQStringList &selectedMimeTypes,
+ const TQString &defaultGroup,
+ TQWidget *parent=0, const char *name=0 );
~KMimeTypeChooserDialog();
diff --git a/kio/kio/kmimetyperesolver.h b/kio/kio/kmimetyperesolver.h
index 8f9e2dcc0..4ac6347f2 100644
--- a/kio/kio/kmimetyperesolver.h
+++ b/kio/kio/kmimetyperesolver.h
@@ -21,9 +21,9 @@
#ifndef __kmimetyperesolver_h
#define __kmimetyperesolver_h
-#include <qscrollview.h>
-#include <qptrlist.h>
-#include <qtimer.h>
+#include <tqscrollview.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
#include <kdebug.h>
/**
@@ -52,16 +52,16 @@ class KIO_EXPORT KMimeTypeResolverHelper : public QObject
public:
KMimeTypeResolverHelper( KMimeTypeResolverBase *resolver,
- QScrollView *view )
+ TQScrollView *view )
: m_resolver( resolver ),
- m_timer( new QTimer( this ) )
+ m_timer( new TQTimer( this ) )
{
- connect( m_timer, SIGNAL( timeout() ), SLOT( slotProcessMimeIcons() ));
+ connect( m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotProcessMimeIcons() ));
- connect( view->horizontalScrollBar(), SIGNAL( sliderMoved(int) ),
- SLOT( slotAdjust() ) );
- connect( view->verticalScrollBar(), SIGNAL( sliderMoved(int) ),
- SLOT( slotAdjust() ) );
+ connect( view->horizontalScrollBar(), TQT_SIGNAL( sliderMoved(int) ),
+ TQT_SLOT( slotAdjust() ) );
+ connect( view->verticalScrollBar(), TQT_SIGNAL( sliderMoved(int) ),
+ TQT_SLOT( slotAdjust() ) );
view->viewport()->installEventFilter( this );
}
@@ -72,11 +72,11 @@ public:
}
protected:
- virtual bool eventFilter( QObject *o, QEvent *e )
+ virtual bool eventFilter( TQObject *o, TQEvent *e )
{
- bool ret = QObject::eventFilter( o, e );
+ bool ret = TQObject::eventFilter( o, e );
- if ( e->type() == QEvent::Resize )
+ if ( e->type() == TQEvent::Resize )
m_resolver->slotViewportAdjusted();
return ret;
@@ -95,7 +95,7 @@ private slots:
private:
KMimeTypeResolverBase *m_resolver;
- QTimer *m_timer;
+ TQTimer *m_timer;
};
/**
@@ -106,16 +106,16 @@ private:
* preferrence to the visible icons.
*
* It is implemented as a template, so that it can work with both QPtrListViewItem
- * and QIconViewItem, without requiring hacks such as void * or QPtrDict lookups.
+ * and TQIconViewItem, without requiring hacks such as void * or TQPtrDict lookups.
*
* Here's what the parent must implement :
* @li void mimeTypeDeterminationFinished();
- * @li QScrollView * scrollWidget();
+ * @li TQScrollView * scrollWidget();
* @li void determineIcon( IconItem * item ), which should call
* @li KFileItem::determineMimeType on the fileItem, and update the icon, etc.
*/
template<class IconItem, class Parent>
-class KMimeTypeResolver : public KMimeTypeResolverBase // if only this could be a QObject....
+class KMimeTypeResolver : public KMimeTypeResolverBase // if only this could be a TQObject....
{
public:
/**
@@ -149,7 +149,7 @@ public:
* clear it, insert new items into it, remove items, etc.
* @return the list of items to process
*/
- QPtrList<IconItem> m_lstPendingMimeIconItems;
+ TQPtrList<IconItem> m_lstPendingMimeIconItems;
/**
* "Connected" to the viewportAdjusted signal of the scrollview
@@ -231,17 +231,17 @@ inline IconItem * KMimeTypeResolver<IconItem, Parent>::findVisibleIcon()
{
// Find an icon that's visible and whose mimetype we don't know.
- QPtrListIterator<IconItem> it(m_lstPendingMimeIconItems);
+ TQPtrListIterator<IconItem> it(m_lstPendingMimeIconItems);
if ( m_lstPendingMimeIconItems.count()<20) // for few items, it's faster to not bother
return m_lstPendingMimeIconItems.first();
- QScrollView * view = m_parent->scrollWidget();
- QRect visibleContentsRect
+ TQScrollView * view = m_parent->scrollWidget();
+ TQRect visibleContentsRect
(
- view->viewportToContents(QPoint(0, 0)),
+ view->viewportToContents(TQPoint(0, 0)),
view->viewportToContents
(
- QPoint(view->visibleWidth(), view->visibleHeight())
+ TQPoint(view->visibleWidth(), view->visibleHeight())
)
);
diff --git a/kio/kio/knfsshare.cpp b/kio/kio/knfsshare.cpp
index eaadae603..f0fdfce6d 100644
--- a/kio/kio/knfsshare.cpp
+++ b/kio/kio/knfsshare.cpp
@@ -16,9 +16,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdict.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdirwatch.h>
#include <kstaticdeleter.h>
@@ -35,8 +35,8 @@ public:
bool readExportsFile();
bool findExportsFile();
- QDict<bool> sharedPaths;
- QString exportsFile;
+ TQDict<bool> sharedPaths;
+ TQString exportsFile;
};
KNFSSharePrivate::KNFSSharePrivate()
@@ -56,10 +56,10 @@ bool KNFSSharePrivate::findExportsFile() {
config.setGroup("General");
exportsFile = config.readPathEntry("exportsFile");
- if ( QFile::exists(exportsFile) )
+ if ( TQFile::exists(exportsFile) )
return true;
- if ( QFile::exists("/etc/exports") )
+ if ( TQFile::exists("/etc/exports") )
exportsFile = "/etc/exports";
else {
kdDebug(7000) << "KNFSShare: Could not found exports file!" << endl;
@@ -75,7 +75,7 @@ bool KNFSSharePrivate::findExportsFile() {
* and fills the sharedPaths dict with the values
*/
bool KNFSSharePrivate::readExportsFile() {
- QFile f(exportsFile);
+ TQFile f(exportsFile);
kdDebug(7000) << "KNFSShare::readExportsFile " << exportsFile << endl;
@@ -87,14 +87,14 @@ bool KNFSSharePrivate::readExportsFile() {
sharedPaths.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;
@@ -119,7 +119,7 @@ bool KNFSSharePrivate::readExportsFile() {
continue;
}
- QString path;
+ TQString path;
// Handle quotation marks
if ( completeLine[0] == '"' ) {
@@ -160,45 +160,45 @@ bool KNFSSharePrivate::readExportsFile() {
KNFSShare::KNFSShare() {
d = new KNFSSharePrivate();
- if (QFile::exists(d->exportsFile)) {
+ if (TQFile::exists(d->exportsFile)) {
KDirWatch::self()->addFile(d->exportsFile);
- connect(KDirWatch::self(), SIGNAL(dirty (const QString&)),this,
- SLOT(slotFileChange(const QString&)));
+ connect(KDirWatch::self(), TQT_SIGNAL(dirty (const TQString&)),this,
+ TQT_SLOT(slotFileChange(const TQString&)));
}
}
KNFSShare::~KNFSShare() {
- if (QFile::exists(d->exportsFile)) {
+ if (TQFile::exists(d->exportsFile)) {
KDirWatch::self()->removeFile(d->exportsFile);
}
delete d;
}
-bool KNFSShare::isDirectoryShared( const QString & path ) const {
- QString fixedPath = path;
+bool KNFSShare::isDirectoryShared( const TQString & path ) const {
+ TQString fixedPath = path;
if ( path[path.length()-1] != '/' )
fixedPath += '/';
return d->sharedPaths.find(fixedPath) != 0;
}
-QStringList KNFSShare::sharedDirectories() const {
- QStringList result;
- QDictIterator<bool> it(d->sharedPaths);
+TQStringList KNFSShare::sharedDirectories() const {
+ TQStringList result;
+ TQDictIterator<bool> it(d->sharedPaths);
for( ; it.current(); ++it )
result << it.currentKey();
return result;
}
-QString KNFSShare::exportsPath() const {
+TQString KNFSShare::exportsPath() const {
return d->exportsFile;
}
-void KNFSShare::slotFileChange( const QString & path ) {
+void KNFSShare::slotFileChange( const TQString & path ) {
if (path == d->exportsFile)
d->readExportsFile();
diff --git a/kio/kio/knfsshare.h b/kio/kio/knfsshare.h
index 228cedffd..d1852d0f2 100644
--- a/kio/kio/knfsshare.h
+++ b/kio/kio/knfsshare.h
@@ -19,7 +19,7 @@
#ifndef knfsshare_h
#define knfsshare_h
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -32,7 +32,7 @@ class KNFSSharePrivate;
* It parses the /etc/exports file to get its information.
* Singleton class, call instance() to get an instance.
*/
-class KIO_EXPORT KNFSShare : public QObject
+class KIO_EXPORT KNFSShare : public TQObject
{
Q_OBJECT
public:
@@ -46,14 +46,14 @@ public:
* @param path the path to check if it is shared by NFS.
* @return wether the given path is shared by NFS.
*/
- bool isDirectoryShared( const QString & path ) const;
+ bool isDirectoryShared( const TQString & path ) const;
/**
* Returns a list of all directories shared by NFS.
* The resulting list is not sorted.
* @return a list of all directories shared by NFS.
*/
- QStringList sharedDirectories() const;
+ TQStringList sharedDirectories() const;
/**
* KNFSShare destructor.
@@ -66,7 +66,7 @@ public:
* Returns the path to the used exports file,
* or null if no exports file was found
*/
- QString exportsPath() const;
+ TQString exportsPath() const;
signals:
/**
@@ -80,7 +80,7 @@ private:
KNFSSharePrivate* d;
private slots:
- void slotFileChange(const QString&);
+ void slotFileChange(const TQString&);
};
#endif
diff --git a/kio/kio/kprotocolinfo.cpp b/kio/kio/kprotocolinfo.cpp
index ce854a3a9..01e3e6c18 100644
--- a/kio/kio/kprotocolinfo.cpp
+++ b/kio/kio/kprotocolinfo.cpp
@@ -35,11 +35,11 @@ KProtocolInfo* KProtocolInfo::findProtocol(const KURL &url)
#ifdef MAKE_KDECORE_LIB
return 0;
#else
- QString protocol = url.protocol();
+ TQString protocol = url.protocol();
if ( !KProtocolInfo::proxiedBy( protocol ).isEmpty() )
{
- QString dummy;
+ TQString dummy;
protocol = KProtocolManager::slaveProtocol(url, dummy);
}
@@ -81,9 +81,9 @@ bool KProtocolInfo::isFilterProtocol( const KURL &url )
return isFilterProtocol (url.protocol());
}
-bool KProtocolInfo::isFilterProtocol( const QString &protocol )
+bool KProtocolInfo::isFilterProtocol( const TQString &protocol )
{
- // We call the findProtocol (const QString&) to bypass any proxy settings.
+ // We call the findProtocol (const TQString&) to bypass any proxy settings.
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(protocol);
if ( !prot )
return false;
@@ -96,9 +96,9 @@ bool KProtocolInfo::isHelperProtocol( const KURL &url )
return isHelperProtocol (url.protocol());
}
-bool KProtocolInfo::isHelperProtocol( const QString &protocol )
+bool KProtocolInfo::isHelperProtocol( const TQString &protocol )
{
- // We call the findProtocol (const QString&) to bypass any proxy settings.
+ // We call the findProtocol (const TQString&) to bypass any proxy settings.
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(protocol);
if ( !prot )
return false;
@@ -111,9 +111,9 @@ bool KProtocolInfo::isKnownProtocol( const KURL &url )
return isKnownProtocol (url.protocol());
}
-bool KProtocolInfo::isKnownProtocol( const QString &protocol )
+bool KProtocolInfo::isKnownProtocol( const TQString &protocol )
{
- // We call the findProtocol (const QString&) to bypass any proxy settings.
+ // We call the findProtocol (const TQString&) to bypass any proxy settings.
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(protocol);
return ( prot != 0);
}
@@ -127,11 +127,11 @@ bool KProtocolInfo::supportsListing( const KURL &url )
return prot->m_supportsListing;
}
-QStringList KProtocolInfo::listing( const KURL &url )
+TQStringList KProtocolInfo::listing( const KURL &url )
{
KProtocolInfo::Ptr prot = findProtocol(url);
if ( !prot )
- return QStringList();
+ return TQStringList();
return prot->m_listing;
}
@@ -246,11 +246,11 @@ KProtocolInfo::FileNameUsedForCopying KProtocolInfo::fileNameUsedForCopying( con
return prot->fileNameUsedForCopying();
}
-QString KProtocolInfo::defaultMimetype( const KURL &url )
+TQString KProtocolInfo::defaultMimetype( const KURL &url )
{
KProtocolInfo::Ptr prot = findProtocol(url);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->m_defaultMimetype;
}
diff --git a/kio/kio/kprotocolinfo.h b/kio/kio/kprotocolinfo.h
index 3a0f05272..dba4694db 100644
--- a/kio/kio/kprotocolinfo.h
+++ b/kio/kio/kprotocolinfo.h
@@ -19,9 +19,9 @@
#ifndef __kprotocolinfo_h__
#define __kprotocolinfo_h__
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdatastream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdatastream.h>
#include <kurl.h>
#include <ksycocaentry.h>
@@ -54,7 +54,7 @@ public:
* Read a protocol description file
* @param path the path of the description file
*/
- KProtocolInfo( const QString & path); // KDE4: make private and add friend class KProtocolInfoBuildFactory
+ KProtocolInfo( const TQString & path); // KDE4: make private and add friend class KProtocolInfoBuildFactory
// Then we can get rid of the d pointer
/**
@@ -71,7 +71,7 @@ public:
* @return the name of the protocol
* @see KURL::protocol()
*/
- virtual QString name() const { return m_name; }
+ virtual TQString name() const { return m_name; }
//
// Static functions:
@@ -81,7 +81,7 @@ public:
* Returns list of all known protocols.
* @return a list of all known protocols
*/
- static QStringList protocols();
+ static TQStringList protocols();
/**
* Returns whether a protocol is installed that is able to handle @p url.
@@ -96,7 +96,7 @@ public:
* Same as above except you can supply just the protocol instead of
* the whole URL.
*/
- static bool isKnownProtocol( const QString& protocol )
+ static bool isKnownProtocol( const TQString& protocol )
#ifdef KPROTOCOLINFO_KDECORE
KDE_WEAK_SYMBOL
#endif
@@ -109,11 +109,11 @@ public:
*
* This corresponds to the "exec=" field in the protocol description file.
* @param protocol the protocol to check
- * @return the executable of library to open, or QString::null for
+ * @return the executable of library to open, or TQString::null for
* unsupported protocols
* @see KURL::protocol()
*/
- static QString exec( const QString& protocol );
+ static TQString exec( const TQString& protocol );
/**
* Describes the type of a protocol.
@@ -160,27 +160,27 @@ public:
* @param url the url to check
* @return a list of field names
*/
- static QStringList listing( const KURL &url );
+ static TQStringList listing( const KURL &url );
/**
* Definition of an extra field in the UDS entries, returned by a listDir operation.
*
* The name is the name of the column, translated.
*
- * The type name comes from QVariant::typeName()
- * Currently supported types: "QString", "QDateTime" (ISO-8601 format)
+ * The type name comes from TQVariant::typeName()
+ * Currently supported types: "TQString", "TQDateTime" (ISO-8601 format)
*
* @since 3.2
*/
struct ExtraField {
ExtraField() {} // for QValueList
- ExtraField(const QString& _name, const QString& _type )
+ ExtraField(const TQString& _name, const TQString& _type )
: name(_name), type(_type) {
}
- QString name;
- QString type; // KDE4: make it QVariant::Type
+ TQString name;
+ TQString type; // KDE4: make it TQVariant::Type
};
- typedef QValueList<ExtraField > ExtraFieldList;
+ typedef TQValueList<ExtraField > ExtraFieldList;
/**
* Definition of extra fields in the UDS entries, returned by a listDir operation.
*
@@ -225,7 +225,7 @@ public:
* Same as above except you can supply just the protocol instead of
* the whole URL.
*/
- static bool isHelperProtocol( const QString& protocol )
+ static bool isHelperProtocol( const TQString& protocol )
#ifdef KPROTOCOLINFO_KDECORE
KDE_WEAK_SYMBOL
#endif
@@ -253,7 +253,7 @@ public:
* Same as above except you can supply just the protocol instead of
* the whole URL.
*/
- static bool isFilterProtocol( const QString& protocol )
+ static bool isFilterProtocol( const TQString& protocol )
#ifdef KPROTOCOLINFO_KDECORE
KDE_WEAK_SYMBOL
#endif
@@ -443,7 +443,7 @@ public:
* @param url the url to check
* @return the default mime type of the protocol, or null if unknown
*/
- static QString defaultMimetype( const KURL& url );
+ static TQString defaultMimetype( const KURL& url );
/**
* Returns the name of the icon, associated with the specified protocol.
@@ -453,7 +453,7 @@ public:
* @param protocol the protocol to check
* @return the icon of the protocol, or null if unknown
*/
- static QString icon( const QString& protocol );
+ static TQString icon( const TQString& protocol );
/**
* Returns the name of the config file associated with the
@@ -466,7 +466,7 @@ public:
* @param protocol the protocol to check
* @return the config file, or null if unknown
*/
- static QString config( const QString& protocol );
+ static TQString config( const TQString& protocol );
/**
* Returns the soft limit on the number of slaves for this protocol.
@@ -480,7 +480,7 @@ public:
* @param protocol the protocol to check
* @return the maximum number of slaves, or 1 if unknown
*/
- static int maxSlaves( const QString& protocol );
+ static int maxSlaves( const TQString& protocol );
/**
* Returns whether mimetypes can be determined based on extension for this
@@ -493,7 +493,7 @@ public:
* @param protocol the protocol to check
* @return true if the mime types can be determined by extension
*/
- static bool determineMimetypeFromExtension( const QString &protocol );
+ static bool determineMimetypeFromExtension( const TQString &protocol );
/**
* Returns the documentation path for the specified protocol.
@@ -504,7 +504,7 @@ public:
* @return the docpath of the protocol, or null if unknown
* @since 3.2
*/
- static QString docPath( const QString& protocol );
+ static TQString docPath( const TQString& protocol );
/**
* Returns the protocol class for the specified protocol.
@@ -522,7 +522,7 @@ public:
* @return the class of the protocol, or null if unknown
* @since 3.2
*/
- static QString protocolClass( const QString& protocol );
+ static TQString protocolClass( const TQString& protocol );
/**
* Returns whether file previews should be shown for the specified protocol.
@@ -535,7 +535,7 @@ public:
* @return true if previews should be shown by default, false otherwise
* @since 3.2
*/
- static bool showFilePreview( const QString& protocol );
+ static bool showFilePreview( const TQString& protocol );
/**
* Returns the suggested URI parsing mode for the KURL parser.
@@ -552,7 +552,7 @@ public:
*
* @since 3.2
*/
- static KURL::URIMode uriParseMode( const QString& protocol );
+ static KURL::URIMode uriParseMode( const TQString& protocol );
/**
* Returns the list of capabilities provided by the kioslave implementing
@@ -572,7 +572,7 @@ public:
*
* @since 3.3
*/
- static QStringList capabilities( const QString& protocol );
+ static TQStringList capabilities( const TQString& protocol );
/**
* Returns the name of the protocol through which the request
@@ -585,14 +585,14 @@ public:
*
* @since 3.3
*/
- static QString proxiedBy( const QString& protocol );
+ static TQString proxiedBy( const TQString& protocol );
public:
// Internal functions:
/**
* @internal construct a KProtocolInfo from a stream
*/
- KProtocolInfo( QDataStream& _str, int offset);
+ KProtocolInfo( TQDataStream& _str, int offset);
virtual ~KProtocolInfo();
@@ -600,58 +600,58 @@ public:
* @internal
* Load the protocol info from a stream.
*/
- virtual void load(QDataStream& );
+ virtual void load(TQDataStream& );
/**
* @internal
* Save the protocol info to a stream.
*/
- virtual void save(QDataStream& );
+ virtual void save(TQDataStream& );
////////////////////////// DEPRECATED /////////////////////////
// The following methods are deprecated:
/// @deprecated
- static Type inputType( const QString& protocol ) KDE_DEPRECATED;
+ static Type inputType( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static Type outputType( const QString& protocol ) KDE_DEPRECATED;
+ static Type outputType( const TQString& protocol ) KDE_DEPRECATED;
/**
* @deprecated
* Returns the list of fields this protocol returns when listing
* The current possibilities are
* Name, Type, Size, Date, AccessDate, Access, Owner, Group, Link, URL, MimeType
*/
- static QStringList listing( const QString& protocol ) KDE_DEPRECATED;
+ static TQStringList listing( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool isSourceProtocol( const QString& protocol ) KDE_DEPRECATED;
+ static bool isSourceProtocol( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsListing( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsListing( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsReading( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsReading( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsWriting( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsWriting( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsMakeDir( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsMakeDir( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsDeleting( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsDeleting( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsLinking( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsLinking( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool supportsMoving( const QString& protocol ) KDE_DEPRECATED;
+ static bool supportsMoving( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool canCopyFromFile( const QString& protocol ) KDE_DEPRECATED;
+ static bool canCopyFromFile( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static bool canCopyToFile( const QString& protocol ) KDE_DEPRECATED;
+ static bool canCopyToFile( const TQString& protocol ) KDE_DEPRECATED;
/// @deprecated
- static QString defaultMimetype( const QString& protocol) KDE_DEPRECATED;
+ static TQString defaultMimetype( const TQString& protocol) KDE_DEPRECATED;
//////////////////////// END DEPRECATED ///////////////////////
protected:
- QString m_name;
- QString m_exec;
+ TQString m_name;
+ TQString m_exec;
Type m_inputType;
Type m_outputType;
- QStringList m_listing;
+ TQStringList m_listing;
bool m_isSourceProtocol;
bool m_isHelperProtocol;
bool m_supportsListing;
@@ -661,12 +661,12 @@ protected:
bool m_supportsDeleting;
bool m_supportsLinking;
bool m_supportsMoving;
- QString m_defaultMimetype;
+ TQString m_defaultMimetype;
bool m_determineMimetypeFromExtension;
- QString m_icon;
+ TQString m_icon;
bool m_canCopyFromFile;
bool m_canCopyToFile;
- QString m_config;
+ TQString m_config;
int m_maxSlaves;
bool canRenameFromFile() const; // for kprotocolinfo_kdecore
@@ -682,7 +682,7 @@ private:
KProtocolInfoPrivate* d;
};
-KIO_EXPORT QDataStream& operator>>( QDataStream& s, KProtocolInfo::ExtraField& field );
-KIO_EXPORT QDataStream& operator<<( QDataStream& s, const KProtocolInfo::ExtraField& field );
+KIO_EXPORT TQDataStream& operator>>( TQDataStream& s, KProtocolInfo::ExtraField& field );
+KIO_EXPORT TQDataStream& operator<<( TQDataStream& s, const KProtocolInfo::ExtraField& field );
#endif
diff --git a/kio/kio/kprotocolmanager.cpp b/kio/kio/kprotocolmanager.cpp
index 840ebacb4..8fb8b3227 100644
--- a/kio/kio/kprotocolmanager.cpp
+++ b/kio/kio/kprotocolmanager.cpp
@@ -48,10 +48,10 @@ public:
KConfig *http_config;
bool init_busy;
KURL url;
- QString protocol;
- QString proxy;
- QString modifiers;
- QString useragent;
+ TQString protocol;
+ TQString proxy;
+ TQString modifiers;
+ TQString useragent;
};
static KProtocolManagerPrivate* d = 0;
@@ -72,7 +72,7 @@ KProtocolManagerPrivate::~KProtocolManagerPrivate()
// DEFAULT USERAGENT STRING
#define CFG_DEFAULT_UAGENT(X) \
-QString("Mozilla/5.0 (compatible; Konqueror/%1.%2%3) KHTML/%4.%5.%6 (like Gecko)") \
+TQString("Mozilla/5.0 (compatible; Konqueror/%1.%2%3) KHTML/%4.%5.%6 (like Gecko)") \
.arg(KDE_VERSION_MAJOR).arg(KDE_VERSION_MINOR).arg(X).arg(KDE_VERSION_MAJOR).arg(KDE_VERSION_MINOR).arg(KDE_VERSION_RELEASE)
void KProtocolManager::reparseConfiguration()
@@ -112,7 +112,7 @@ KConfig *KProtocolManager::http_config()
int KProtocolManager::readTimeout()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
int val = cfg->readNumEntry( "ReadTimeout", DEFAULT_READ_TIMEOUT );
return QMAX(MIN_TIMEOUT_VALUE, val);
}
@@ -120,7 +120,7 @@ int KProtocolManager::readTimeout()
int KProtocolManager::connectTimeout()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
int val = cfg->readNumEntry( "ConnectTimeout", DEFAULT_CONNECT_TIMEOUT );
return QMAX(MIN_TIMEOUT_VALUE, val);
}
@@ -128,7 +128,7 @@ int KProtocolManager::connectTimeout()
int KProtocolManager::proxyConnectTimeout()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
int val = cfg->readNumEntry( "ProxyConnectTimeout", DEFAULT_PROXY_CONNECT_TIMEOUT );
return QMAX(MIN_TIMEOUT_VALUE, val);
}
@@ -136,7 +136,7 @@ int KProtocolManager::proxyConnectTimeout()
int KProtocolManager::responseTimeout()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
int val = cfg->readNumEntry( "ResponseTimeout", DEFAULT_RESPONSE_TIMEOUT );
return QMAX(MIN_TIMEOUT_VALUE, val);
}
@@ -180,13 +180,13 @@ bool KProtocolManager::useCache()
KIO::CacheControl KProtocolManager::cacheControl()
{
KConfig *cfg = http_config();
- QString tmp = cfg->readEntry("cache");
+ TQString tmp = cfg->readEntry("cache");
if (tmp.isEmpty())
return DEFAULT_CACHE_CONTROL;
return KIO::parseCacheControl(tmp);
}
-QString KProtocolManager::cacheDir()
+TQString KProtocolManager::cacheDir()
{
KConfig *cfg = http_config();
return cfg->readPathEntry("CacheDir", KGlobal::dirs()->saveLocation("cache","http"));
@@ -204,7 +204,7 @@ int KProtocolManager::maxCacheSize()
return cfg->readNumEntry( "MaxCacheSize", DEFAULT_MAX_CACHE_SIZE ); // 5 MB
}
-QString KProtocolManager::noProxyForRaw()
+TQString KProtocolManager::noProxyForRaw()
{
KConfig *cfg = config();
cfg->setGroup( "Proxy Settings" );
@@ -212,18 +212,18 @@ QString KProtocolManager::noProxyForRaw()
return cfg->readEntry( "NoProxyFor" );
}
-QString KProtocolManager::noProxyFor()
+TQString KProtocolManager::noProxyFor()
{
- QString noProxy = noProxyForRaw();
+ TQString noProxy = noProxyForRaw();
if (proxyType() == EnvVarProxy)
- noProxy = QString::fromLocal8Bit(getenv(noProxy.local8Bit()));
+ noProxy = TQString::fromLocal8Bit(getenv(noProxy.local8Bit()));
return noProxy;
}
-QString KProtocolManager::proxyFor( const QString& protocol )
+TQString KProtocolManager::proxyFor( const TQString& protocol )
{
- QString scheme = protocol.lower();
+ TQString scheme = protocol.lower();
if (scheme == "webdav")
scheme = "http";
@@ -235,9 +235,9 @@ QString KProtocolManager::proxyFor( const QString& protocol )
return cfg->readEntry( scheme + "Proxy" );
}
-QString KProtocolManager::proxyForURL( const KURL &url )
+TQString KProtocolManager::proxyForURL( const KURL &url )
{
- QString proxy;
+ TQString proxy;
ProxyType pt = proxyType();
switch (pt)
@@ -247,7 +247,7 @@ QString KProtocolManager::proxyForURL( const KURL &url )
if (!url.host().isEmpty())
{
KURL u (url);
- QString p = u.protocol().lower();
+ TQString p = u.protocol().lower();
// webdav is a KDE specific protocol. Look up proxy
// information using HTTP instead...
@@ -267,7 +267,7 @@ QString KProtocolManager::proxyForURL( const KURL &url )
}
break;
case EnvVarProxy:
- proxy = QString::fromLocal8Bit(getenv(proxyFor(url.protocol()).local8Bit())).stripWhiteSpace();
+ proxy = TQString::fromLocal8Bit(getenv(proxyFor(url.protocol()).local8Bit())).stripWhiteSpace();
break;
case ManualProxy:
proxy = proxyFor( url.protocol() );
@@ -277,10 +277,10 @@ QString KProtocolManager::proxyForURL( const KURL &url )
break;
}
- return (proxy.isEmpty() ? QString::fromLatin1("DIRECT") : proxy);
+ return (proxy.isEmpty() ? TQString::fromLatin1("DIRECT") : proxy);
}
-void KProtocolManager::badProxy( const QString &proxy )
+void KProtocolManager::badProxy( const TQString &proxy )
{
DCOPRef( "kded", "proxyscout" ).send( "blackListProxy", proxy );
}
@@ -326,7 +326,7 @@ static bool revmatch(const char *host, const char *nplist)
return false;
}
-QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
+TQString KProtocolManager::slaveProtocol(const KURL &url, TQString &proxy)
{
if (url.hasSubURL()) // We don't want the suburl's protocol
{
@@ -353,7 +353,7 @@ QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
KProtocolManager::ProxyType type = proxyType();
bool useRevProxy = ((type == ManualProxy) && useReverseProxy());
- QString noProxy;
+ TQString noProxy;
// Check no proxy information iff the proxy type is either
// ManualProxy or EnvVarProxy
if ( (type == ManualProxy) || (type == EnvVarProxy) )
@@ -361,9 +361,9 @@ QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
if (!noProxy.isEmpty())
{
- QString qhost = url.host().lower();
+ TQString qhost = url.host().lower();
const char *host = qhost.latin1();
- QString qno_proxy = noProxy.stripWhiteSpace().lower();
+ TQString qno_proxy = noProxy.stripWhiteSpace().lower();
const char *no_proxy = qno_proxy.latin1();
isRevMatch = revmatch(host, no_proxy);
@@ -372,7 +372,7 @@ QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
// users to enter host:port in the No-proxy-For list.
if (!isRevMatch && url.port() > 0)
{
- qhost += ':' + QString::number (url.port());
+ qhost += ':' + TQString::number (url.port());
host = qhost.latin1();
isRevMatch = revmatch (host, no_proxy);
}
@@ -390,7 +390,7 @@ QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
{
// The idea behind slave protocols is not applicable to http
// and webdav protocols.
- QString protocol = url.protocol().lower();
+ TQString protocol = url.protocol().lower();
if (protocol.startsWith("http") || protocol.startsWith("webdav"))
d->protocol = protocol;
else
@@ -408,20 +408,20 @@ QString KProtocolManager::slaveProtocol(const KURL &url, QString &proxy)
}
d->url = url;
- d->proxy = proxy = QString::null;
+ d->proxy = proxy = TQString::null;
d->protocol = url.protocol();
return d->protocol;
}
/*================================= USER-AGENT SETTINGS =====================*/
-QString KProtocolManager::userAgentForHost( const QString& hostname )
+TQString KProtocolManager::userAgentForHost( const TQString& hostname )
{
- QString sendUserAgent = KIO::SlaveConfig::self()->configData("http", hostname.lower(), "SendUserAgent").lower();
+ TQString sendUserAgent = KIO::SlaveConfig::self()->configData("http", hostname.lower(), "SendUserAgent").lower();
if (sendUserAgent == "false")
- return QString::null;
+ return TQString::null;
- QString useragent = KIO::SlaveConfig::self()->configData("http", hostname.lower(), "UserAgent");
+ TQString useragent = KIO::SlaveConfig::self()->configData("http", hostname.lower(), "UserAgent");
// Return the default user-agent if none is specified
// for the requested host.
@@ -431,56 +431,56 @@ QString KProtocolManager::userAgentForHost( const QString& hostname )
return useragent;
}
-QString KProtocolManager::defaultUserAgent( )
+TQString KProtocolManager::defaultUserAgent( )
{
- QString modifiers = KIO::SlaveConfig::self()->configData("http", QString::null, "UserAgentKeys");
+ TQString modifiers = KIO::SlaveConfig::self()->configData("http", TQString::null, "UserAgentKeys");
return defaultUserAgent(modifiers);
}
-QString KProtocolManager::defaultUserAgent( const QString &_modifiers )
+TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers )
{
if (!d)
d = new KProtocolManagerPrivate;
- QString modifiers = _modifiers.lower();
+ TQString modifiers = _modifiers.lower();
if (modifiers.isEmpty())
modifiers = DEFAULT_USER_AGENT_KEYS;
if (d->modifiers == modifiers)
return d->useragent;
- QString supp;
+ TQString supp;
struct utsname nam;
if( uname(&nam) >= 0 )
{
if( modifiers.contains('o') )
{
- supp += QString("; %1").arg(nam.sysname);
+ supp += TQString("; %1").arg(nam.sysname);
if ( modifiers.contains('v') )
- supp += QString(" %1").arg(nam.release);
+ supp += TQString(" %1").arg(nam.release);
}
if( modifiers.contains('p') )
{
// TODO: determine this value instead of hardcoding it...
- supp += QString::fromLatin1("; X11");
+ supp += TQString::fromLatin1("; X11");
}
if( modifiers.contains('m') )
{
- supp += QString("; %1").arg(nam.machine);
+ supp += TQString("; %1").arg(nam.machine);
}
if( modifiers.contains('l') )
{
- QStringList languageList = KGlobal::locale()->languageList();
- QStringList::Iterator it = languageList.find( QString::fromLatin1("C") );
+ TQStringList languageList = KGlobal::locale()->languageList();
+ TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") );
if( it != languageList.end() )
{
- if( languageList.contains( QString::fromLatin1("en") ) > 0 )
+ if( languageList.contains( TQString::fromLatin1("en") ) > 0 )
languageList.remove( it );
else
- (*it) = QString::fromLatin1("en");
+ (*it) = TQString::fromLatin1("en");
}
if( languageList.count() )
- supp += QString("; %1").arg(languageList.join(", "));
+ supp += TQString("; %1").arg(languageList.join(", "));
}
}
d->modifiers = modifiers;
@@ -493,14 +493,14 @@ QString KProtocolManager::defaultUserAgent( const QString &_modifiers )
bool KProtocolManager::markPartial()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
return cfg->readBoolEntry( "MarkPartial", true );
}
int KProtocolManager::minimumKeepSize()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
return cfg->readNumEntry( "MinimumKeepSize",
DEFAULT_MINIMUM_KEEP_SIZE ); // 5000 byte
}
@@ -508,25 +508,25 @@ int KProtocolManager::minimumKeepSize()
bool KProtocolManager::autoResume()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
return cfg->readBoolEntry( "AutoResume", false );
}
bool KProtocolManager::persistentConnections()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
return cfg->readBoolEntry( "PersistentConnections", true );
}
bool KProtocolManager::persistentProxyConnection()
{
KConfig *cfg = config();
- cfg->setGroup( QString::null );
+ cfg->setGroup( TQString::null );
return cfg->readBoolEntry( "PersistentProxyConnection", false );
}
-QString KProtocolManager::proxyConfigScript()
+TQString KProtocolManager::proxyConfigScript()
{
KConfig *cfg = config();
cfg->setGroup( "Proxy Settings" );
diff --git a/kio/kio/kprotocolmanager.h b/kio/kio/kprotocolmanager.h
index 7529bcdc4..ec59342af 100644
--- a/kio/kio/kprotocolmanager.h
+++ b/kio/kio/kprotocolmanager.h
@@ -20,7 +20,7 @@
#ifndef __kprotocolmanager_h__
#define __kprotocolmanager_h__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kio/global.h>
@@ -64,7 +64,7 @@ public:
*
* @return the default user-agent string
*/
- static QString defaultUserAgent();
+ static TQString defaultUserAgent();
/**
* Returns the default user-agent value.
@@ -77,20 +77,20 @@ public:
* @li 'l' Show language
* @return the default user-agent value with the given @p keys
*/
- static QString defaultUserAgent(const QString &keys);
+ static TQString defaultUserAgent(const TQString &keys);
/**
* Returns the userAgent string configured for the
* specified host.
*
* If hostname is not found or is empty (i.e. "" or
- * QString::null) this function will return the default
+ * TQString::null) this function will return the default
* user agent.
*
* @param hostname name of the host
* @return specified userAgent string
*/
- static QString userAgentForHost( const QString &hostname );
+ static TQString userAgentForHost( const TQString &hostname );
/*=========================== TIMEOUT CONFIG ================================*/
@@ -213,7 +213,7 @@ public:
*
* @see useReverseProxy, proxyFor, proxyForURL, slaveProtocol
*/
- static QString noProxyFor();
+ static TQString noProxyFor();
/**
* Same as above except the environment variable name
@@ -223,7 +223,7 @@ public:
* @see noProxyFor
* @since 3.5.x
*/
- static QString noProxyForRaw();
+ static TQString noProxyForRaw();
/**
* Returns the proxy server address for a given protocol.
@@ -234,9 +234,9 @@ public:
* @see useReverseProxy, slaveProtocol
* @param protocol the protocol whose proxy info is needed
* @returns the proxy server address if one is available,
- * or QString::null if not available
+ * or TQString::null if not available
*/
- static QString proxyFor( const QString& protocol );
+ static TQString proxyFor( const TQString& protocol );
/**
* Returns the proxy server address for a given URL.
@@ -254,20 +254,20 @@ public:
* @returns the proxy server address or the text "DIRECT"
* if no proxying is needed for the given address.
*/
- static QString proxyForURL( const KURL& url );
+ static TQString proxyForURL( const KURL& url );
/**
* Marks this proxy as bad (down). It will not be used for the
* next 30 minutes. (The script may supply an alternate proxy)
* @param proxy the proxy to mark as bad (as URL)
*/
- static void badProxy( const QString & proxy );
+ static void badProxy( const TQString & proxy );
/**
* Returns the URL of the script for automatic proxy configuration.
* @return the proxy configuration script
*/
- static QString proxyConfigScript();
+ static TQString proxyConfigScript();
/*========================== CACHE CONFIG ===================================*/
@@ -305,7 +305,7 @@ public:
* The directory which contains the cache files.
* @return the directory that contains the cache files
*/
- static QString cacheDir();
+ static TQString cacheDir();
/**
* Returns the Cache control directive to be used.
@@ -376,7 +376,7 @@ public:
* @param proxy the URL of the proxy to use
* @return the slave protocol (e.g. 'http'), can be null if unknown
*/
- static QString slaveProtocol(const KURL &url, QString &proxy);
+ static TQString slaveProtocol(const KURL &url, TQString &proxy);
/**
* @internal
diff --git a/kio/kio/kremoteencoding.cpp b/kio/kio/kremoteencoding.cpp
index 449af8945..ebd7fda74 100644
--- a/kio/kio/kremoteencoding.cpp
+++ b/kio/kio/kremoteencoding.cpp
@@ -33,43 +33,43 @@ KRemoteEncoding::~KRemoteEncoding()
// delete d; // not necessary yet
}
-QString KRemoteEncoding::decode(const QCString& name) const
+TQString KRemoteEncoding::decode(const TQCString& name) const
{
#ifdef CHECK_UTF8
if (codec->mibEnum() == 106 && !KStringHandler::isUtf8(name))
- return QString::fromLatin1(name);
+ return TQString::fromLatin1(name);
#endif
- QString result = codec->toUnicode(name);
+ TQString result = codec->toUnicode(name);
if (codec->fromUnicode(result) != name)
// fallback in case of decoding failure
- return QString::fromLatin1(name);
+ return TQString::fromLatin1(name);
return result;
}
-QCString KRemoteEncoding::encode(const QString& name) const
+TQCString KRemoteEncoding::encode(const TQString& name) const
{
- QCString result = codec->fromUnicode(name);
+ TQCString result = codec->fromUnicode(name);
if (codec->toUnicode(result) != name)
return name.latin1();
return result;
}
-QCString KRemoteEncoding::encode(const KURL& url) const
+TQCString KRemoteEncoding::encode(const KURL& url) const
{
return encode(url.path());
}
-QCString KRemoteEncoding::directory(const KURL& url, bool ignore_trailing_slash) const
+TQCString KRemoteEncoding::directory(const KURL& url, bool ignore_trailing_slash) const
{
- QString dir = url.directory(true, ignore_trailing_slash);
+ TQString dir = url.directory(true, ignore_trailing_slash);
return encode(dir);
}
-QCString KRemoteEncoding::fileName(const KURL& url) const
+TQCString KRemoteEncoding::fileName(const KURL& url) const
{
return encode(url.fileName());
}
@@ -79,10 +79,10 @@ void KRemoteEncoding::setEncoding(const char *name)
// don't delete codecs
if (name)
- codec = QTextCodec::codecForName(name);
+ codec = TQTextCodec::codecForName(name);
if (codec == 0L)
- codec = QTextCodec::codecForMib(1);
+ codec = TQTextCodec::codecForMib(1);
kdDebug() << k_funcinfo << "setting encoding " << codec->name()
<< " for name=" << name << endl;
diff --git a/kio/kio/kremoteencoding.h b/kio/kio/kremoteencoding.h
index 4440091ba..35191d8e5 100644
--- a/kio/kio/kremoteencoding.h
+++ b/kio/kio/kremoteencoding.h
@@ -20,9 +20,9 @@
#define KREMOTEENCODING_H
#include <kurl.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqtextcodec.h>
class KRemoteEncodingPrivate;
/**
@@ -62,19 +62,19 @@ public:
* This function is supposed to work for dirnames, filenames
* or a full pathname.
*/
- QString decode(const QCString& name) const;
+ TQString decode(const TQCString& name) const;
/**
* Converts the given name from Unicode.
* This function is supposed to work for dirnames, filenames
* or a full pathname.
*/
- QCString encode(const QString& name) const;
+ TQCString encode(const TQString& name) const;
/**
* Converts the given URL into its 8-bit components
*/
- QCString encode(const KURL& url) const;
+ TQCString encode(const KURL& url) const;
/**
* Converts the given URL into 8-bit form and separate the
@@ -83,12 +83,12 @@ public:
*
* The dirname is returned with the final slash always stripped
*/
- QCString directory(const KURL& url, bool ignore_trailing_slash = true) const;
+ TQCString directory(const KURL& url, bool ignore_trailing_slash = true) const;
/**
* Converts the given URL into 8-bit form and retrieve the filename.
*/
- QCString fileName(const KURL& url) const;
+ TQCString fileName(const KURL& url) const;
/**
* Returns the encoding being used.
@@ -112,7 +112,7 @@ public:
void setEncoding(const char* name);
protected:
- QTextCodec *codec;
+ TQTextCodec *codec;
virtual void virtual_hook(int id, void* data);
diff --git a/kio/kio/krun.cpp b/kio/kio/krun.cpp
index 8da71c8a0..199a6b5b9 100644
--- a/kio/kio/krun.cpp
+++ b/kio/kio/krun.cpp
@@ -26,8 +26,8 @@
#include <unistd.h>
#include <typeinfo>
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
#include "kuserprofile.h"
#include "kmimetype.h"
@@ -49,11 +49,11 @@
#include <kstandarddirs.h>
#include <kprocess.h>
#include <dcopclient.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <kdesktopfile.h>
#include <kstartupinfo.h>
#include <kmacroexpander.h>
@@ -72,34 +72,34 @@ public:
bool m_showingError;
bool m_runExecutables;
- QString m_preferredService;
- QString m_externalBrowser;
- QString m_localPath;
- QString m_suggestedFileName;
- QGuardedPtr <QWidget> m_window;
- QCString m_asn;
+ TQString m_preferredService;
+ TQString m_externalBrowser;
+ TQString m_localPath;
+ TQString m_suggestedFileName;
+ TQGuardedPtr <TQWidget> m_window;
+ TQCString m_asn;
};
-pid_t KRun::runURL( const KURL& u, const QString& _mimetype )
+pid_t KRun::runURL( const KURL& u, const TQString& _mimetype )
{
- return runURL( u, _mimetype, false, true, QString::null );
+ return runURL( u, _mimetype, false, true, TQString::null );
}
-pid_t KRun::runURL( const KURL& u, const QString& _mimetype, bool tempFile )
+pid_t KRun::runURL( const KURL& u, const TQString& _mimetype, bool tempFile )
{
- return runURL( u, _mimetype, tempFile, true, QString::null );
+ return runURL( u, _mimetype, tempFile, true, TQString::null );
}
-pid_t KRun::runURL( const KURL& u, const QString& _mimetype, bool tempFile, bool runExecutables )
+pid_t KRun::runURL( const KURL& u, const TQString& _mimetype, bool tempFile, bool runExecutables )
{
- return runURL( u, _mimetype, tempFile, runExecutables, QString::null );
+ return runURL( u, _mimetype, tempFile, runExecutables, TQString::null );
}
-bool KRun::isExecutableFile( const KURL& url, const QString &mimetype )
+bool KRun::isExecutableFile( const KURL& url, const TQString &mimetype )
{
if ( !url.isLocalFile() )
return false;
- QFileInfo file( url.path() );
+ TQFileInfo file( url.path() );
if ( file.isExecutable() ) // Got a prospective file to run
{
KMimeType::Ptr mimeType = KMimeType::mimeType( mimetype );
@@ -110,14 +110,14 @@ bool KRun::isExecutableFile( const KURL& url, const QString &mimetype )
return false;
}
-pid_t KRun::runURL( const KURL& u, const QString& _mimetype, bool tempFile, bool runExecutables, const QString& suggestedFileName )
+pid_t KRun::runURL( const KURL& u, const TQString& _mimetype, bool tempFile, bool runExecutables, const TQString& suggestedFileName )
{
return runURL( u, _mimetype, NULL, "", tempFile, runExecutables, suggestedFileName );
}
// This is called by foundMimeType, since it knows the mimetype of the URL
-pid_t KRun::runURL( const KURL& u, const QString& _mimetype, QWidget* window, const QCString& asn,
- bool tempFile, bool runExecutables, const QString& suggestedFileName )
+pid_t KRun::runURL( const KURL& u, const TQString& _mimetype, TQWidget* window, const TQCString& asn,
+ bool tempFile, bool runExecutables, const TQString& suggestedFileName )
{
bool noRun = false;
bool noAuth = false;
@@ -138,9 +138,9 @@ pid_t KRun::runURL( const KURL& u, const QString& _mimetype, QWidget* window, co
{
if (kapp->authorize("shell_access"))
{
- QString path = u.path();
+ TQString path = u.path();
shellQuote( path );
- return (KRun::runCommand(path, QString::null, QString::null, window, asn)); // just execute the url as a command
+ return (KRun::runCommand(path, TQString::null, TQString::null, window, asn)); // just execute the url as a command
// ## TODO implement deleting the file if tempFile==true
}
else
@@ -177,7 +177,7 @@ pid_t KRun::runURL( const KURL& u, const QString& _mimetype, QWidget* window, co
KURL::List lst;
lst.append( u );
- static const QString& app_str = KGlobal::staticQString("Application");
+ static const TQString& app_str = KGlobal::staticQString("Application");
KService::Ptr offer = KServiceTypeProfile::preferredService( _mimetype, app_str );
@@ -194,15 +194,15 @@ pid_t KRun::runURL( const KURL& u, const QString& _mimetype, QWidget* window, co
bool KRun::displayOpenWithDialog( const KURL::List& lst )
{
- return displayOpenWithDialog( lst, false, QString::null );
+ return displayOpenWithDialog( lst, false, TQString::null );
}
bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles )
{
- return displayOpenWithDialog( lst, tempFiles, QString::null );
+ return displayOpenWithDialog( lst, tempFiles, TQString::null );
}
-bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const QString& suggestedFileName )
+bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const TQString& suggestedFileName )
{
if (kapp && !kapp->authorizeKAction("openwith"))
{
@@ -211,7 +211,7 @@ bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const Q
return false;
}
- KOpenWithDlg l( lst, i18n("Open with:"), QString::null, 0L );
+ KOpenWithDlg l( lst, i18n("Open with:"), TQString::null, 0L );
if ( l.exec() )
{
KService::Ptr service = l.service();
@@ -224,12 +224,12 @@ bool KRun::displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const Q
return false;
}
-void KRun::shellQuote( QString &_str )
+void KRun::shellQuote( TQString &_str )
{
// Credits to Walter, says Bernd G. :)
if (_str.isEmpty()) // Don't create an explicit empty parameter
return;
- QChar q('\'');
+ TQChar q('\'');
_str.replace(q, "'\\''").prepend(q).append(q);
}
@@ -241,14 +241,14 @@ public:
bool hasUrls:1, hasSpec:1;
protected:
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
const KService &service;
};
int
-KRunMX1::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KRunMX1::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
uint option = str[pos + 1];
switch( option ) {
@@ -290,16 +290,16 @@ public:
bool ignFile:1;
protected:
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
- void subst( int option, const KURL &url, QStringList &ret );
+ void subst( int option, const KURL &url, TQStringList &ret );
const KURL::List &urls;
};
void
-KRunMX2::subst( int option, const KURL &url, QStringList &ret )
+KRunMX2::subst( int option, const KURL &url, TQStringList &ret )
{
switch( option ) {
case 'u':
@@ -315,7 +315,7 @@ KRunMX2::subst( int option, const KURL &url, QStringList &ret )
ret << url.fileName();
break;
case 'v':
- if (url.isLocalFile() && QFile::exists( url.path() ) )
+ if (url.isLocalFile() && TQFile::exists( url.path() ) )
ret << KDesktopFile( url.path(), true ).readEntry( "Dev" );
break;
}
@@ -323,7 +323,7 @@ KRunMX2::subst( int option, const KURL &url, QStringList &ret )
}
int
-KRunMX2::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KRunMX2::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
uint option = str[pos + 1];
switch( option ) {
@@ -358,36 +358,36 @@ KRunMX2::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
}
// BIC: merge methods below
-QStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell) {
- return processDesktopExec( _service, _urls, has_shell, false, QString::null );
+TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell) {
+ return processDesktopExec( _service, _urls, has_shell, false, TQString::null );
}
-QStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell /* KDE4: remove */, bool tempFiles)
+TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell /* KDE4: remove */, bool tempFiles)
{
- return processDesktopExec( _service, _urls, has_shell, tempFiles, QString::null );
+ return processDesktopExec( _service, _urls, has_shell, tempFiles, TQString::null );
}
-QStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell /* KDE4: remove */, bool tempFiles, const QString& suggestedFileName)
+TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List& _urls, bool has_shell /* KDE4: remove */, bool tempFiles, const TQString& suggestedFileName)
{
- QString exec = _service.exec();
- QStringList result;
+ TQString exec = _service.exec();
+ TQStringList result;
bool appHasTempFileOption;
KRunMX1 mx1( _service );
KRunMX2 mx2( _urls );
/// compatibility hack -- KDE 4: remove
- QRegExp re("^\\s*(?:/bin/)?sh\\s+-c\\s+(.*)$");
+ TQRegExp re("^\\s*(?:/bin/)?sh\\s+-c\\s+(.*)$");
if (!re.search( exec )) {
exec = re.cap( 1 ).stripWhiteSpace();
for (uint pos = 0; pos < exec.length(); ) {
- QChar c = exec.unicode()[pos];
+ TQChar c = exec.unicode()[pos];
if (c != '\'' && c != '"')
goto synerr; // what else can we do? after normal parsing the substs would be insecure
int pos2 = exec.find( c, pos + 1 ) - 1;
if (pos2 < 0)
goto synerr; // quoting error
- memcpy( (void *)(exec.unicode() + pos), exec.unicode() + pos + 1, (pos2 - pos) * sizeof(QChar));
+ memcpy( (void *)(exec.unicode() + pos), exec.unicode() + pos + 1, (pos2 - pos) * sizeof(TQChar));
pos = pos2;
exec.remove( pos, 2 );
}
@@ -470,14 +470,14 @@ QStringList KRun::processDesktopExec(const KService &_service, const KURL::List&
if (_service.terminal()) {
KConfigGroupSaver gs(KGlobal::config(), "General");
- QString terminal = KGlobal::config()->readPathEntry("TerminalApplication", "konsole");
+ TQString terminal = KGlobal::config()->readPathEntry("TerminalApplication", "konsole");
if (terminal == "konsole")
terminal += " -caption=%c %i %m";
terminal += " ";
terminal += _service.terminalOptions();
if( !mx1.expandMacrosShellQuote( terminal ) ) {
kdWarning() << "KRun: syntax error in command `" << terminal << "', service `" << _service.name() << "'" << endl;
- return QStringList();
+ return TQStringList();
}
mx2.expandMacrosShellQuote( terminal );
if (has_shell)
@@ -527,23 +527,23 @@ QStringList KRun::processDesktopExec(const KService &_service, const KURL::List&
synerr:
kdWarning() << "KRun: syntax error in command `" << _service.exec() << "', service `" << _service.name() << "'" << endl;
- return QStringList();
+ return TQStringList();
}
//static
-QString KRun::binaryName( const QString & execLine, bool removePath )
+TQString KRun::binaryName( const TQString & execLine, bool removePath )
{
// Remove parameters and/or trailing spaces.
- QStringList args = KShell::splitArgs( execLine );
- for (QStringList::ConstIterator it = args.begin(); it != args.end(); ++it)
+ TQStringList args = KShell::splitArgs( execLine );
+ for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it)
if (!(*it).contains('='))
// Remove path if wanted
return removePath ? (*it).mid((*it).findRev('/') + 1) : *it;
- return QString::null;
+ return TQString::null;
}
-static pid_t runCommandInternal( KProcess* proc, const KService* service, const QString& binName,
- const QString &execName, const QString & iconName, QWidget* window, QCString asn )
+static pid_t runCommandInternal( KProcess* proc, const KService* service, const TQString& binName,
+ const TQString &execName, const TQString & iconName, TQWidget* window, TQCString asn )
{
if (service && !service->desktopEntryPath().isEmpty()
&& !KDesktopFile::isAuthorizedDesktopFile( service->desktopEntryPath() ))
@@ -552,10 +552,10 @@ static pid_t runCommandInternal( KProcess* proc, const KService* service, const
KMessageBox::sorry(window, i18n("You are not authorized to execute this file."));
return 0;
}
- QString bin = KRun::binaryName( binName, true );
+ TQString bin = KRun::binaryName( binName, true );
#ifdef Q_WS_X11 // Startup notification doesn't work with QT/E, service isn't needed without Startup notification
bool silent;
- QCString wmclass;
+ TQCString wmclass;
KStartupInfoId id;
bool startup_notify = ( asn != "0" && KRun::checkStartupNotify( binName, service, &silent, &wmclass ));
if( startup_notify )
@@ -600,10 +600,10 @@ static pid_t runCommandInternal( KProcess* proc, const KService* service, const
}
// This code is also used in klauncher.
-bool KRun::checkStartupNotify( const QString& /*binName*/, const KService* service, bool* silent_arg, QCString* wmclass_arg )
+bool KRun::checkStartupNotify( const TQString& /*binName*/, const KService* service, bool* silent_arg, TQCString* wmclass_arg )
{
bool silent = false;
- QCString wmclass;
+ TQCString wmclass;
if( service && service->property( "StartupNotify" ).isValid())
{
silent = !service->property( "StartupNotify" ).toBool();
@@ -644,14 +644,14 @@ bool KRun::checkStartupNotify( const QString& /*binName*/, const KService* servi
return true;
}
-static pid_t runTempService( const KService& _service, const KURL::List& _urls, QWidget* window,
- const QCString& asn, bool tempFiles, const QString& suggestedFileName )
+static pid_t runTempService( const KService& _service, const KURL::List& _urls, TQWidget* window,
+ const TQCString& asn, bool tempFiles, const TQString& suggestedFileName )
{
if (!_urls.isEmpty()) {
kdDebug(7010) << "runTempService: first url " << _urls.first().url() << endl;
}
- QStringList args;
+ TQStringList args;
if ((_urls.count() > 1) && !_service.allowMultipleFiles())
{
// We need to launch the application N times. That sucks.
@@ -691,16 +691,16 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service
{
// Check which protocols the application supports.
// This can be a list of actual protocol names, or just KIO for KDE apps.
- QStringList supportedProtocols = _service.property("X-KDE-Protocols").toStringList();
+ TQStringList supportedProtocols = _service.property("X-KDE-Protocols").toStringList();
KRunMX1 mx1( _service );
- QString exec = _service.exec();
+ TQString exec = _service.exec();
if ( mx1.expandMacrosShellQuote( exec ) && !mx1.hasUrls ) {
Q_ASSERT( supportedProtocols.isEmpty() ); // huh? If you support protocols you need %u or %U...
} else {
if ( supportedProtocols.isEmpty() )
{
// compat mode: assume KIO if not set and it's a KDE app
- QStringList categories = _service.property("Categories").toStringList();
+ TQStringList categories = _service.property("Categories").toStringList();
if ( categories.find("KDE") != categories.end() )
supportedProtocols.append( "KIO" );
else { // if no KDE app, be a bit over-generic
@@ -734,31 +734,31 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service
// BIC merge methods below
pid_t KRun::run( const KService& _service, const KURL::List& _urls )
{
- return run( _service, _urls, 0, false, QString::null );
+ return run( _service, _urls, 0, false, TQString::null );
}
pid_t KRun::run( const KService& _service, const KURL::List& _urls, bool tempFiles )
{
- return run( _service, _urls, 0, tempFiles, QString::null );
+ return run( _service, _urls, 0, tempFiles, TQString::null );
}
-pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles )
+pid_t KRun::run( const KService& _service, const KURL::List& _urls, TQWidget* window, bool tempFiles )
{
- return run( _service, _urls, window, "", tempFiles, QString::null );
+ return run( _service, _urls, window, "", tempFiles, TQString::null );
}
-pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, const QCString& asn, bool tempFiles )
+pid_t KRun::run( const KService& _service, const KURL::List& _urls, TQWidget* window, const TQCString& asn, bool tempFiles )
{
- return run( _service, _urls, window, asn, tempFiles, QString::null );
+ return run( _service, _urls, window, asn, tempFiles, TQString::null );
}
-pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles, const QString& suggestedFileName )
+pid_t KRun::run( const KService& _service, const KURL::List& _urls, TQWidget* window, bool tempFiles, const TQString& suggestedFileName )
{
return run( _service, _urls, window, "", tempFiles, suggestedFileName );
}
-pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* window, const QCString& asn,
- bool tempFiles, const QString& suggestedFileName )
+pid_t KRun::run( const KService& _service, const KURL::List& _urls, TQWidget* window, const TQCString& asn,
+ bool tempFiles, const TQString& suggestedFileName )
{
if (!_service.desktopEntryPath().isEmpty() &&
!KDesktopFile::isAuthorizedDesktopFile( _service.desktopEntryPath()))
@@ -792,11 +792,11 @@ pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* win
// Resolve urls if needed, depending on what the app supports
const KURL::List urls = resolveURLs( _urls, _service );
- QString error;
+ TQString error;
int pid = 0;
- QCString myasn = asn;
- // startServiceByDesktopPath() doesn't take QWidget*, add it to the startup info now
+ TQCString myasn = asn;
+ // startServiceByDesktopPath() doesn't take TQWidget*, add it to the startup info now
if( window != NULL )
{
if( myasn.isEmpty())
@@ -827,33 +827,33 @@ pid_t KRun::run( const KService& _service, const KURL::List& _urls, QWidget* win
}
-pid_t KRun::run( const QString& _exec, const KURL::List& _urls, const QString& _name,
- const QString& _icon, const QString&, const QString&)
+pid_t KRun::run( const TQString& _exec, const KURL::List& _urls, const TQString& _name,
+ const TQString& _icon, const TQString&, const TQString&)
{
KService::Ptr service = new KService(_name, _exec, _icon);
return run(*service, _urls);
}
-pid_t KRun::runCommand( QString cmd )
+pid_t KRun::runCommand( TQString cmd )
{
- return KRun::runCommand( cmd, QString::null, QString::null, NULL, "" );
+ return KRun::runCommand( cmd, TQString::null, TQString::null, NULL, "" );
}
-pid_t KRun::runCommand( const QString& cmd, const QString &execName, const QString & iconName )
+pid_t KRun::runCommand( const TQString& cmd, const TQString &execName, const TQString & iconName )
{
return KRun::runCommand( cmd, execName, iconName, NULL, "" );
}
-pid_t KRun::runCommand( const QString& cmd, const QString &execName, const QString & iconName,
- QWidget* window, const QCString& asn )
+pid_t KRun::runCommand( const TQString& cmd, const TQString &execName, const TQString & iconName,
+ TQWidget* window, const TQCString& asn )
{
kdDebug(7010) << "runCommand " << cmd << "," << execName << endl;
KProcess * proc = new KProcess;
proc->setUseShell(true);
*proc << cmd;
KService::Ptr service = KService::serviceByDesktopName( binaryName( execName, true ) );
- QString bin = binaryName( cmd, false );
+ TQString bin = binaryName( cmd, false );
int pos = bin.findRev( '/' );
if (pos != -1) {
proc->setWorkingDirectory( bin.mid(0, pos) );
@@ -867,21 +867,21 @@ KRun::KRun( const KURL& url, mode_t mode, bool isLocalFile, bool showProgressInf
init (url, 0, "", mode, isLocalFile, showProgressInfo);
}
-KRun::KRun( const KURL& url, QWidget* window, mode_t mode, bool isLocalFile,
+KRun::KRun( const KURL& url, TQWidget* window, mode_t mode, bool isLocalFile,
bool showProgressInfo )
:m_timer(0,"KRun::timer")
{
init (url, window, "", mode, isLocalFile, showProgressInfo);
}
-KRun::KRun( const KURL& url, QWidget* window, const QCString& asn, mode_t mode, bool isLocalFile,
+KRun::KRun( const KURL& url, TQWidget* window, const TQCString& asn, mode_t mode, bool isLocalFile,
bool showProgressInfo )
:m_timer(0,"KRun::timer")
{
init (url, window, asn, mode, isLocalFile, showProgressInfo);
}
-void KRun::init ( const KURL& url, QWidget* window, const QCString& asn, mode_t mode, bool isLocalFile,
+void KRun::init ( const KURL& url, TQWidget* window, const TQCString& asn, mode_t mode, bool isLocalFile,
bool showProgressInfo )
{
m_bFault = false;
@@ -904,7 +904,7 @@ void KRun::init ( const KURL& url, QWidget* window, const QCString& asn, mode_t
// loop and do initialization afterwards.
// Reason: We must complete the constructor before we do anything else.
m_bInit = true;
- connect( &m_timer, SIGNAL( timeout() ), this, SLOT( slotTimeout() ) );
+ connect( &m_timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimeout() ) );
m_timer.start( 0, true );
kdDebug(7010) << " new KRun " << this << " " << url.prettyURL() << " timer=" << &m_timer << endl;
@@ -926,7 +926,7 @@ void KRun::init()
}
if ( !kapp->authorizeURLAction( "open", KURL(), m_strURL))
{
- QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, m_strURL.prettyURL());
+ TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, m_strURL.prettyURL());
d->m_showingError = true;
KMessageBoxWrapper::error( d->m_window, msg );
d->m_showingError = false;
@@ -939,7 +939,7 @@ void KRun::init()
if ( !m_bIsLocalFile && m_strURL.isLocalFile() )
m_bIsLocalFile = true;
- QString exec;
+ TQString exec;
if (m_strURL.protocol().startsWith("http"))
{
exec = d->m_externalBrowser;
@@ -950,7 +950,7 @@ void KRun::init()
if ( m_mode == 0 )
{
KDE_struct_stat buff;
- if ( KDE_stat( QFile::encodeName(m_strURL.path()), &buff ) == -1 )
+ if ( KDE_stat( TQFile::encodeName(m_strURL.path()), &buff ) == -1 )
{
d->m_showingError = true;
KMessageBoxWrapper::error( d->m_window, i18n( "<qt>Unable to run the command specified. The file or folder <b>%1</b> does not exist.</qt>" ).arg( m_strURL.htmlURL() ) );
@@ -1034,8 +1034,8 @@ void KRun::init()
// It may be a directory or a file, let's stat
KIO::StatJob *job = KIO::stat( m_strURL, true, 0 /* no details */, m_bProgressInfo );
job->setWindow (d->m_window);
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotStatResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotStatResult( KIO::Job * ) ) );
m_job = job;
kdDebug(7010) << " Job " << job << " is about stating " << m_strURL.url() << endl;
}
@@ -1083,10 +1083,10 @@ void KRun::scanFile()
KIO::TransferJob *job = KIO::get( m_strURL, false /*reload*/, m_bProgressInfo );
job->setWindow (d->m_window);
- connect(job, SIGNAL( result(KIO::Job *)),
- this, SLOT( slotScanFinished(KIO::Job *)));
- connect(job, SIGNAL( mimetype(KIO::Job *, const QString &)),
- this, SLOT( slotScanMimeType(KIO::Job *, const QString &)));
+ connect(job, TQT_SIGNAL( result(KIO::Job *)),
+ this, TQT_SLOT( slotScanFinished(KIO::Job *)));
+ connect(job, TQT_SIGNAL( mimetype(KIO::Job *, const TQString &)),
+ this, TQT_SLOT( slotScanMimeType(KIO::Job *, const TQString &)));
m_job = job;
kdDebug(7010) << " Job " << job << " is about getting from " << m_strURL.url() << endl;
}
@@ -1153,7 +1153,7 @@ void KRun::slotStatResult( KIO::Job * job )
if(!dynamic_cast<KIO::StatJob*>(job))
kdFatal() << "job is a " << typeid(*job).name() << " should be a StatJob" << endl;
- QString knownMimeType;
+ TQString knownMimeType;
KIO::UDSEntry entry = ((KIO::StatJob*)job)->statResult();
KIO::UDSEntry::ConstIterator it = entry.begin();
for( ; it != entry.end(); it++ ) {
@@ -1190,7 +1190,7 @@ void KRun::slotStatResult( KIO::Job * job )
}
}
-void KRun::slotScanMimeType( KIO::Job *, const QString &mimetype )
+void KRun::slotScanMimeType( KIO::Job *, const TQString &mimetype )
{
if ( mimetype.isEmpty() )
kdWarning(7010) << "KRun::slotScanFinished : MimetypeJob didn't find a mimetype! Probably a kioslave bug." << endl;
@@ -1217,7 +1217,7 @@ void KRun::slotScanFinished( KIO::Job *job )
}
}
-void KRun::foundMimeType( const QString& type )
+void KRun::foundMimeType( const TQString& type )
{
kdDebug(7010) << "Resulting mime type is " << type << endl;
@@ -1233,7 +1233,7 @@ void KRun::foundMimeType( const QString& type )
KURL::List lst = KURL::split( m_strURL );
if ( lst.isEmpty() )
{
- QString tmp = i18n( "Malformed URL" );
+ TQString tmp = i18n( "Malformed URL" );
tmp += "\n";
tmp += m_strURL.url();
KMessageBoxWrapper::error( 0L, tmp );
@@ -1253,7 +1253,7 @@ void KRun::foundMimeType( const QString& type )
KURL::List::Iterator it = lst.begin();
++it;
(*lst.begin()).setRef( (*it).ref() );
- (*it).setRef( QString::null );
+ (*it).setRef( TQString::null );
// Create the new URL
m_strURL = KURL::join( lst );
@@ -1266,8 +1266,8 @@ void KRun::foundMimeType( const QString& type )
// (For instance a tar.gz is a directory contained inside a file)
// It may be a directory or a file, let's stat
KIO::StatJob *job = KIO::stat( m_strURL, m_bProgressInfo );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotStatResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotStatResult( KIO::Job * ) ) );
m_job = job;
return;
@@ -1349,10 +1349,10 @@ void KRun::setEnableExternalBrowser(bool b)
if (b)
d->m_externalBrowser = KConfigGroup(KGlobal::config(), "General").readEntry("BrowserApplication");
else
- d->m_externalBrowser = QString::null;
+ d->m_externalBrowser = TQString::null;
}
-void KRun::setPreferredService( const QString& desktopEntryName )
+void KRun::setPreferredService( const TQString& desktopEntryName )
{
d->m_preferredService = desktopEntryName;
}
@@ -1362,12 +1362,12 @@ void KRun::setRunExecutables(bool b)
d->m_runExecutables = b;
}
-void KRun::setSuggestedFileName( const QString& fileName )
+void KRun::setSuggestedFileName( const TQString& fileName )
{
d->m_suggestedFileName = fileName;
}
-bool KRun::isExecutable( const QString& serviceType )
+bool KRun::isExecutable( const TQString& serviceType )
{
return ( serviceType == "application/x-desktop" ||
serviceType == "application/x-executable" ||
@@ -1378,27 +1378,27 @@ bool KRun::isExecutable( const QString& serviceType )
/****************/
pid_t
-KProcessRunner::run(KProcess * p, const QString & binName)
+KProcessRunner::run(KProcess * p, const TQString & binName)
{
return (new KProcessRunner(p, binName))->pid();
}
#ifdef Q_WS_X11
pid_t
-KProcessRunner::run(KProcess * p, const QString & binName, const KStartupInfoId& id )
+KProcessRunner::run(KProcess * p, const TQString & binName, const KStartupInfoId& id )
{
return (new KProcessRunner(p, binName, id))->pid();
}
#endif
-KProcessRunner::KProcessRunner(KProcess * p, const QString & _binName )
- : QObject(),
+KProcessRunner::KProcessRunner(KProcess * p, const TQString & _binName )
+ : TQObject(),
process_(p),
binName( _binName )
{
- QObject::connect(
- process_, SIGNAL(processExited(KProcess *)),
- this, SLOT(slotProcessExited(KProcess *)));
+ TQObject::connect(
+ process_, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(slotProcessExited(KProcess *)));
process_->start();
if ( !process_->pid() )
@@ -1406,15 +1406,15 @@ KProcessRunner::KProcessRunner(KProcess * p, const QString & _binName )
}
#ifdef Q_WS_X11
-KProcessRunner::KProcessRunner(KProcess * p, const QString & _binName, const KStartupInfoId& id )
- : QObject(),
+KProcessRunner::KProcessRunner(KProcess * p, const TQString & _binName, const KStartupInfoId& id )
+ : TQObject(),
process_(p),
binName( _binName ),
id_( id )
{
- QObject::connect(
- process_, SIGNAL(processExited(KProcess *)),
- this, SLOT(slotProcessExited(KProcess *)));
+ TQObject::connect(
+ process_, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(slotProcessExited(KProcess *)));
process_->start();
if ( !process_->pid() )
@@ -1450,7 +1450,7 @@ KProcessRunner::slotProcessExited(KProcess * p)
// We can't just rely on that, but it's a good hint.
// Before assuming its really so, we'll try to find the binName
// relatively to current directory, and then in the PATH.
- if ( !QFile( binName ).exists() && KStandardDirs::findExe( binName ).isEmpty() )
+ if ( !TQFile( binName ).exists() && KStandardDirs::findExe( binName ).isEmpty() )
{
kapp->ref();
KMessageBox::sorry( 0L, i18n("Could not find the program '%1'").arg( binName ) );
diff --git a/kio/kio/krun.h b/kio/kio/krun.h
index 385b227af..17fa434e3 100644
--- a/kio/kio/krun.h
+++ b/kio/kio/krun.h
@@ -24,9 +24,9 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kstartupinfo.h>
@@ -109,9 +109,9 @@ public:
* a very slow FTP server...
* It is always better to provide progress info in such cases.
*/
- KRun( const KURL& url, QWidget* window, mode_t mode = 0,
+ KRun( const KURL& url, TQWidget* window, mode_t mode = 0,
bool isLocalFile = false, bool showProgressInfo = true );
- KRun( const KURL& url, QWidget* window, const QCString& asn, mode_t mode = 0,
+ KRun( const KURL& url, TQWidget* window, const TQCString& asn, mode_t mode = 0,
bool isLocalFile = false, bool showProgressInfo = true );
/**
@@ -169,7 +169,7 @@ public:
* the recent documents list.
* @param desktopEntryName the desktopEntryName of the service, e.g. "kate".
*/
- void setPreferredService( const QString& desktopEntryName );
+ void setPreferredService( const TQString& desktopEntryName );
/**
* Sets whether executables, .desktop files or shell scripts should
@@ -197,7 +197,7 @@ public:
* file name.
* @since 3.5.3
*/
- void setSuggestedFileName( const QString& fileName );
+ void setSuggestedFileName( const TQString& fileName );
/**
* Open a list of URLs with a certain service (application).
@@ -211,9 +211,9 @@ public:
* @return the process id, or 0 on error
* @since 3.5.2
*/
- static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles = false );
- static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window,
- const QCString& asn, bool tempFiles = false );
+ static pid_t run( const KService& _service, const KURL::List& _urls, TQWidget* window, bool tempFiles = false );
+ static pid_t run( const KService& _service, const KURL::List& _urls, TQWidget* window,
+ const TQCString& asn, bool tempFiles = false );
/**
* Open a list of URLs with a certain service (application).
*
@@ -229,9 +229,9 @@ public:
static pid_t run( const KService& _service, const KURL::List& _urls );
/// @since 3.5.3
/// @internal
- static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window, bool tempFiles, const QString& suggestedFileName );
- static pid_t run( const KService& _service, const KURL::List& _urls, QWidget* window,
- const QCString& asn, bool tempFiles, const QString& suggestedFileName );
+ static pid_t run( const KService& _service, const KURL::List& _urls, TQWidget* window, bool tempFiles, const TQString& suggestedFileName );
+ static pid_t run( const KService& _service, const KURL::List& _urls, TQWidget* window,
+ const TQCString& asn, bool tempFiles, const TQString& suggestedFileName );
/**
* Open a list of URLs with.
@@ -246,11 +246,11 @@ public:
* @param _obsolete2 Do not use!
* @return the process id, or 0 on error
*/
- static pid_t run( const QString& _exec, const KURL::List& _urls,
- const QString& _name = QString::null,
- const QString& _icon = QString::null,
- const QString& _obsolete1 = QString::null,
- const QString& _obsolete2 = QString::null );
+ static pid_t run( const TQString& _exec, const KURL::List& _urls,
+ const TQString& _name = TQString::null,
+ const TQString& _icon = TQString::null,
+ const TQString& _obsolete1 = TQString::null,
+ const TQString& _obsolete2 = TQString::null );
/**
* Open the given URL.
@@ -270,13 +270,13 @@ public:
// BIC Merge second overload with first one using runExecutables=true, and
// merge third overload with first one as well using tempFiles=false and
// runExecutables=true
- static pid_t runURL( const KURL& _url, const QString& _mimetype, bool tempFile, bool runExecutables);
- static pid_t runURL( const KURL& _url, const QString& _mimetype, bool tempFile);
- static pid_t runURL( const KURL& _url, const QString& _mimetype );
+ static pid_t runURL( const KURL& _url, const TQString& _mimetype, bool tempFile, bool runExecutables);
+ static pid_t runURL( const KURL& _url, const TQString& _mimetype, bool tempFile);
+ static pid_t runURL( const KURL& _url, const TQString& _mimetype );
/// @since 3.5.3
/// @internal
- static pid_t runURL( const KURL& _url, const QString& _mimetype, QWidget* window, const QCString& asn, bool tempFile, bool runExecutables, const QString& suggestedFileName );
- static pid_t runURL( const KURL& _url, const QString& _mimetype, bool tempFile, bool runExecutables, const QString& suggestedFileName );
+ static pid_t runURL( const KURL& _url, const TQString& _mimetype, TQWidget* window, const TQCString& asn, bool tempFile, bool runExecutables, const TQString& suggestedFileName );
+ static pid_t runURL( const KURL& _url, const TQString& _mimetype, bool tempFile, bool runExecutables, const TQString& suggestedFileName );
/**
* Run the given shell command and notifies kicker of the starting
@@ -292,7 +292,7 @@ public:
* @return PID of running command, 0 if it could not be started, 0 - (PID
* of running command) if command was unsafe for map notification.
*/
- static pid_t runCommand( QString cmd );
+ static pid_t runCommand( TQString cmd );
/**
* Same as the other runCommand(), but it also takes the name of the
@@ -305,9 +305,9 @@ public:
* @return PID of running command, 0 if it could not be started, 0 - (PID
* of running command) if command was unsafe for map notification.
*/
- static pid_t runCommand( const QString& cmd, const QString & execName, const QString & icon );
- static pid_t runCommand( const QString& cmd, const QString & execName, const QString & icon,
- QWidget* window, const QCString& asn );
+ static pid_t runCommand( const TQString& cmd, const TQString & execName, const TQString & icon );
+ static pid_t runCommand( const TQString& cmd, const TQString & execName, const TQString & icon,
+ TQWidget* window, const TQCString& asn );
/**
* Display the Open-With dialog for those URLs, and run the chosen application.
@@ -321,13 +321,13 @@ public:
static bool displayOpenWithDialog( const KURL::List& lst );
/// @since 3.5.3
/// @internal
- static bool displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const QString& suggestedFileName );
+ static bool displayOpenWithDialog( const KURL::List& lst, bool tempFiles, const TQString& suggestedFileName );
/**
* Quotes a string for the shell.
* @param _str the string to quote. The quoted string will be written here
*/
- static void shellQuote( QString &_str );
+ static void shellQuote( TQString &_str );
/**
* Processes a Exec= line as found in .desktop files.
@@ -343,11 +343,11 @@ public:
* when the application exits.
* @return a list of arguments suitable for either system() or exec().
*/
- static QStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell, bool tempFiles);
- static QStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell);
+ static TQStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell, bool tempFiles);
+ static TQStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell);
/// @since 3.5.3
/// @internal
- static QStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell, bool tempFiles, const QString& suggestedFileName);
+ static TQStringList processDesktopExec(const KService &_service, const KURL::List &_urls, bool has_shell, bool tempFiles, const TQString& suggestedFileName);
/**
* Given a full command line (e.g. the Exec= line from a .desktop file),
@@ -357,14 +357,14 @@ public:
* @return the name of the binary to run
* @since 3.1
*/
- static QString binaryName( const QString & execLine, bool removePath );
+ static TQString binaryName( const TQString & execLine, bool removePath );
/**
* Returns whether @p serviceType refers to an executable program instead
* of a data file.
* @since 3.2
*/
- static bool isExecutable( const QString& serviceType );
+ static bool isExecutable( const TQString& serviceType );
/**
* Returns wether the @p url of @p mimetype is executable.
@@ -379,13 +379,13 @@ public:
* to the mimetype's desktop file.
* @since 3.3
*/
- static bool isExecutableFile( const KURL& url, const QString &mimetype );
+ static bool isExecutableFile( const KURL& url, const TQString &mimetype );
/**
* @internal
* @since 3.4
*/
- static bool checkStartupNotify( const QString& binName, const KService* service, bool* silent_arg, QCString* wmclass_arg );
+ static bool checkStartupNotify( const TQString& binName, const KService* service, bool* silent_arg, TQCString* wmclass_arg );
signals:
/**
@@ -402,7 +402,7 @@ signals:
protected slots:
void slotTimeout();
void slotScanFinished( KIO::Job * );
- void slotScanMimeType( KIO::Job *, const QString &type );
+ void slotScanMimeType( KIO::Job *, const TQString &type );
virtual void slotStatResult( KIO::Job * );
protected:
@@ -415,7 +415,7 @@ protected:
* whether the document and appends the gzip protocol to the
* URL. Otherwise runURL is called to finish the job.
*/
- virtual void foundMimeType( const QString& _type );
+ virtual void foundMimeType( const TQString& _type );
virtual void killJob();
@@ -425,7 +425,7 @@ protected:
bool m_bProgressInfo;
bool m_bFinished;
KIO::Job * m_job;
- QTimer m_timer;
+ TQTimer m_timer;
/**
* Used to indicate that the next action is to scan the file.
@@ -447,7 +447,7 @@ protected:
virtual void virtual_hook( int id, void* data );
private:
- void init (const KURL& url, QWidget* window, const QCString& asn, mode_t mode,
+ void init (const KURL& url, TQWidget* window, const TQCString& asn, mode_t mode,
bool isLocalFile, bool showProgressInfo);
private:
class KRunPrivate;
@@ -481,9 +481,9 @@ class KIO_EXPORT KProcessRunner : public QObject
public:
- static pid_t run(KProcess *, const QString & binName);
+ static pid_t run(KProcess *, const TQString & binName);
#ifdef Q_WS_X11 // We don't have KStartupInfo in Qt/Embedded
- static pid_t run(KProcess *, const QString & binName, const KStartupInfoId& id );
+ static pid_t run(KProcess *, const TQString & binName, const KStartupInfoId& id );
#endif
virtual ~KProcessRunner();
@@ -496,14 +496,14 @@ class KIO_EXPORT KProcessRunner : public QObject
private:
- KProcessRunner(KProcess *, const QString & binName);
+ KProcessRunner(KProcess *, const TQString & binName);
#ifdef Q_WS_X11 // We don't have KStartupInfo in Qt/Embedded
- KProcessRunner(KProcess *, const QString & binName, const KStartupInfoId& id );
+ KProcessRunner(KProcess *, const TQString & binName, const KStartupInfoId& id );
#endif
KProcessRunner();
KProcess * process_;
- QString binName;
+ TQString binName;
#ifdef Q_WS_X11 // We don't have KStartupInfo in Qt/Embedded
KStartupInfoId id_;
#endif
diff --git a/kio/kio/ksambashare.cpp b/kio/kio/ksambashare.cpp
index 11a1b4fde..defeae4a7 100644
--- a/kio/kio/ksambashare.cpp
+++ b/kio/kio/ksambashare.cpp
@@ -16,9 +16,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdict.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdirwatch.h>
#include <kstaticdeleter.h>
@@ -36,8 +36,8 @@ public:
bool findSmbConf();
bool load();
- QDict<bool> sharedPaths;
- QString smbConf;
+ TQDict<bool> sharedPaths;
+ TQString smbConf;
};
KSambaSharePrivate::KSambaSharePrivate()
@@ -62,28 +62,28 @@ bool KSambaSharePrivate::load() {
* @return wether a smb.conf was found.
**/
bool KSambaSharePrivate::findSmbConf() {
- KSimpleConfig config(QString::fromLatin1(FILESHARECONF),true);
+ KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
smbConf = config.readEntry("SMBCONF");
- if ( QFile::exists(smbConf) )
+ if ( TQFile::exists(smbConf) )
return true;
- if ( QFile::exists("/etc/samba/smb.conf") )
+ if ( TQFile::exists("/etc/samba/smb.conf") )
smbConf = "/etc/samba/smb.conf";
else
- if ( QFile::exists("/etc/smb.conf") )
+ if ( TQFile::exists("/etc/smb.conf") )
smbConf = "/etc/smb.conf";
else
- if ( QFile::exists("/usr/local/samba/lib/smb.conf") )
+ if ( TQFile::exists("/usr/local/samba/lib/smb.conf") )
smbConf = "/usr/local/samba/lib/smb.conf";
else
- if ( QFile::exists("/usr/samba/lib/smb.conf") )
+ if ( TQFile::exists("/usr/samba/lib/smb.conf") )
smbConf = "/usr/samba/lib/smb.conf";
else
- if ( QFile::exists("/usr/lib/smb.conf") )
+ if ( TQFile::exists("/usr/lib/smb.conf") )
smbConf = "/usr/lib/smb.conf";
else
- if ( QFile::exists("/usr/local/lib/smb.conf") )
+ if ( TQFile::exists("/usr/local/lib/smb.conf") )
smbConf = "/usr/local/lib/smb.conf";
else {
kdDebug(7000) << "KSambaShare: Could not found smb.conf!" << endl;
@@ -99,7 +99,7 @@ bool KSambaSharePrivate::findSmbConf() {
* and fills the sharedPaths dict with the values
*/
bool KSambaSharePrivate::readSmbConf() {
- QFile f(smbConf);
+ TQFile f(smbConf);
kdDebug(7000) << "KSambaShare::readSmbConf " << smbConf << endl;
@@ -110,14 +110,14 @@ bool KSambaSharePrivate::readSmbConf() {
sharedPaths.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;
@@ -148,8 +148,8 @@ bool KSambaSharePrivate::readSmbConf() {
if (i>-1)
{
- QString name = completeLine.left(i).stripWhiteSpace().lower();
- QString value = completeLine.mid(i+1).stripWhiteSpace();
+ TQString name = completeLine.left(i).stripWhiteSpace().lower();
+ TQString value = completeLine.mid(i+1).stripWhiteSpace();
if (name == KGlobal::staticQString("path")) {
// Handle quotation marks
@@ -178,44 +178,44 @@ bool KSambaSharePrivate::readSmbConf() {
KSambaShare::KSambaShare() {
d = new KSambaSharePrivate();
- if (QFile::exists(d->smbConf)) {
+ if (TQFile::exists(d->smbConf)) {
KDirWatch::self()->addFile(d->smbConf);
KDirWatch::self()->addFile(FILESHARECONF);
- connect(KDirWatch::self(), SIGNAL(dirty (const QString&)),this,
- SLOT(slotFileChange(const QString&)));
+ connect(KDirWatch::self(), TQT_SIGNAL(dirty (const TQString&)),this,
+ TQT_SLOT(slotFileChange(const TQString&)));
}
}
KSambaShare::~KSambaShare() {
- if (QFile::exists(d->smbConf)) {
+ if (TQFile::exists(d->smbConf)) {
KDirWatch::self()->removeFile(d->smbConf);
KDirWatch::self()->removeFile(FILESHARECONF);
}
delete d;
}
-QString KSambaShare::smbConfPath() const {
+TQString KSambaShare::smbConfPath() const {
return d->smbConf;
}
-bool KSambaShare::isDirectoryShared( const QString & path ) const {
- QString fixedPath = path;
+bool KSambaShare::isDirectoryShared( const TQString & path ) const {
+ TQString fixedPath = path;
if ( path[path.length()-1] != '/' )
fixedPath += '/';
return d->sharedPaths.find(fixedPath) != 0;
}
-QStringList KSambaShare::sharedDirectories() const {
- QStringList result;
- QDictIterator<bool> it(d->sharedPaths);
+TQStringList KSambaShare::sharedDirectories() const {
+ TQStringList result;
+ TQDictIterator<bool> it(d->sharedPaths);
for( ; it.current(); ++it )
result << it.currentKey();
return result;
}
-void KSambaShare::slotFileChange( const QString & path ) {
+void KSambaShare::slotFileChange( const TQString & path ) {
if (path == d->smbConf)
d->readSmbConf();
else
diff --git a/kio/kio/ksambashare.h b/kio/kio/ksambashare.h
index 714353d76..383bd702f 100644
--- a/kio/kio/ksambashare.h
+++ b/kio/kio/ksambashare.h
@@ -19,7 +19,7 @@
#ifndef ksambashare_h
#define ksambashare_h
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
@@ -31,7 +31,7 @@ class KSambaSharePrivate;
* any suid script.
* Singleton class, call instance() to get an instance.
*/
-class KIO_EXPORT KSambaShare : public QObject
+class KIO_EXPORT KSambaShare : public TQObject
{
Q_OBJECT
public:
@@ -45,14 +45,14 @@ public:
* @param path the path to check if it is shared by Samba.
* @return whether the given path is shared by Samba.
*/
- bool isDirectoryShared( const QString & path ) const;
+ bool isDirectoryShared( const TQString & path ) const;
/**
* Returns a list of all directories shared by Samba.
* The resulting list is not sorted.
* @return a list of all directories shared by Samba.
*/
- QStringList sharedDirectories() const;
+ TQStringList sharedDirectories() const;
/**
* KSambaShare destructor.
@@ -65,7 +65,7 @@ public:
* Returns the path to the used smb.conf file
* or null if no file was found
*/
- QString smbConfPath() const;
+ TQString smbConfPath() const;
signals:
/**
@@ -79,7 +79,7 @@ private:
KSambaSharePrivate* d;
private slots:
- void slotFileChange(const QString&);
+ void slotFileChange(const TQString&);
};
#endif
diff --git a/kio/kio/kscan.cpp b/kio/kio/kscan.cpp
index be49e5c14..21e8086b8 100644
--- a/kio/kio/kscan.cpp
+++ b/kio/kio/kscan.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
#include <ktrader.h>
@@ -25,7 +25,7 @@
#include "kscan.h"
// static factory method
-KScanDialog * KScanDialog::getScanDialog( QWidget *parent, const char *name,
+KScanDialog * KScanDialog::getScanDialog( TQWidget *parent, const char *name,
bool modal )
{
KTrader::OfferList offers = KTrader::self()->query("KScan/KScanDialog");
@@ -33,22 +33,22 @@ KScanDialog * KScanDialog::getScanDialog( QWidget *parent, const char *name,
return 0L;
KService::Ptr ptr = *(offers.begin());
- KLibFactory *factory = KLibLoader::self()->factory( QFile::encodeName(ptr->library()) );
+ KLibFactory *factory = KLibLoader::self()->factory( TQFile::encodeName(ptr->library()) );
if ( !factory )
return 0;
- QStringList args;
- args << QString::number( (int)modal );
+ TQStringList args;
+ args << TQString::number( (int)modal );
- QObject *res = factory->create( parent, name, "KScanDialog", args );
+ TQObject *res = factory->create( parent, name, "KScanDialog", args );
return dynamic_cast<KScanDialog *>( res );
}
KScanDialog::KScanDialog( int dialogFace, int buttonMask,
- QWidget *parent, const char *name, bool modal )
+ TQWidget *parent, const char *name, bool modal )
: KDialogBase( dialogFace, i18n("Acquire Image"), buttonMask, Close,
parent, name, modal, true ),
m_currentId( 1 )
@@ -68,7 +68,7 @@ bool KScanDialog::setup()
// static factory method
-KOCRDialog * KOCRDialog::getOCRDialog( QWidget *parent, const char *name,
+KOCRDialog * KOCRDialog::getOCRDialog( TQWidget *parent, const char *name,
bool modal )
{
KTrader::OfferList offers = KTrader::self()->query("KScan/KOCRDialog");
@@ -76,22 +76,22 @@ KOCRDialog * KOCRDialog::getOCRDialog( QWidget *parent, const char *name,
return 0L;
KService::Ptr ptr = *(offers.begin());
- KLibFactory *factory = KLibLoader::self()->factory( QFile::encodeName(ptr->library()) );
+ KLibFactory *factory = KLibLoader::self()->factory( TQFile::encodeName(ptr->library()) );
if ( !factory )
return 0;
- QStringList args;
- args << QString::number( (int)modal );
+ TQStringList args;
+ args << TQString::number( (int)modal );
- QObject *res = factory->create( parent, name, "KOCRDialog", args );
+ TQObject *res = factory->create( parent, name, "KOCRDialog", args );
return dynamic_cast<KOCRDialog *>( res );
}
KOCRDialog::KOCRDialog( int dialogFace, int buttonMask,
- QWidget *parent, const char *name, bool modal )
+ TQWidget *parent, const char *name, bool modal )
: KDialogBase( dialogFace, i18n("OCR Image"), buttonMask, Close,
parent, name, modal, true ),
m_currentId( 1 )
@@ -107,7 +107,7 @@ KOCRDialog::~KOCRDialog()
///////////////////////////////////////////////////////////////////
-KScanDialogFactory::KScanDialogFactory( QObject *parent, const char *name )
+KScanDialogFactory::KScanDialogFactory( TQObject *parent, const char *name )
: KLibFactory( parent, name ),
m_instance( 0L )
{
@@ -118,9 +118,9 @@ KScanDialogFactory::~KScanDialogFactory()
delete m_instance;
}
-QObject *KScanDialogFactory::createObject( QObject *parent, const char *name,
+TQObject *KScanDialogFactory::createObject( TQObject *parent, const char *name,
const char *classname,
- const QStringList &args )
+ const TQStringList &args )
{
if ( strcmp( classname, "KScanDialog" ) != 0 )
return 0;
@@ -133,14 +133,14 @@ QObject *KScanDialogFactory::createObject( QObject *parent, const char *name,
if ( args.count() == 1 )
modal = (bool)args[ 0 ].toInt();
- return createDialog( static_cast<QWidget *>( parent ), name, modal );
+ return createDialog( static_cast<TQWidget *>( parent ), name, modal );
}
///////////////////////////////////////////////////////////////////
-KOCRDialogFactory::KOCRDialogFactory( QObject *parent, const char *name )
+KOCRDialogFactory::KOCRDialogFactory( TQObject *parent, const char *name )
: KLibFactory( parent, name ),
m_instance( 0L )
{
@@ -151,9 +151,9 @@ KOCRDialogFactory::~KOCRDialogFactory()
delete m_instance;
}
-QObject *KOCRDialogFactory::createObject( QObject *parent, const char *name,
+TQObject *KOCRDialogFactory::createObject( TQObject *parent, const char *name,
const char *classname,
- const QStringList &args )
+ const TQStringList &args )
{
if ( strcmp( classname, "KOCRDialog" ) != 0 )
return 0;
@@ -166,7 +166,7 @@ QObject *KOCRDialogFactory::createObject( QObject *parent, const char *name,
if ( args.count() == 1 )
modal = (bool)args[ 0 ].toInt();
- return createDialog( static_cast<QWidget *>( parent ), name, modal );
+ return createDialog( static_cast<TQWidget *>( parent ), name, modal );
}
void KScanDialog::virtual_hook( int id, void* data )
diff --git a/kio/kio/kscan.h b/kio/kio/kscan.h
index 97311a557..6ed5df667 100644
--- a/kio/kio/kscan.h
+++ b/kio/kio/kscan.h
@@ -43,8 +43,8 @@ class QImage;
* if ( !m_scanDialog ) // no scanning support installed?
* return;
*
- * connect( m_scanDialog, SIGNAL( finalImage( const QImage&, int )),
- * SLOT( slotScanned( const QImage&, int ) ));
+ * connect( m_scanDialog, TQT_SIGNAL( finalImage( const TQImage&, int )),
+ * TQT_SLOT( slotScanned( const TQImage&, int ) ));
* }
*
* if ( m_scanDialog->setup() ) // only if scanner configured/available
@@ -71,11 +71,11 @@ public:
* is available. Pass a suitable @p parent widget, if you like. If you
* don't you have to 'delete' the returned pointer yourself.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
* @return the KScanDialog, or 0 if the function failed
*/
- static KScanDialog * getScanDialog( QWidget *parent=0L,
+ static KScanDialog * getScanDialog( TQWidget *parent=0L,
const char *name=0, bool modal=false );
/**
* Destructs the scan dialog.
@@ -101,12 +101,12 @@ protected:
* @param buttonMask a ORed mask of all buttons (see
* KDialogBase::ButtonCode)
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
* @see KDialogBase
*/
KScanDialog( int dialogFace=Tabbed, int buttonMask = Close|Help,
- QWidget *parent=0L, const char *name=0, bool modal=false );
+ TQWidget *parent=0L, const char *name=0, bool modal=false );
/**
* Returns the current id for an image. You can use that in your subclass
@@ -140,7 +140,7 @@ signals:
* @param img the image
* @param id the image's id
*/
- void preview( const QImage &img, int id );
+ void preview( const TQImage &img, int id );
/**
* Informs you that an image has scanned. @p id is the same as in the
@@ -151,17 +151,17 @@ signals:
* @param img the image
* @param id the image's id
*/
- void finalImage( const QImage &img, int id );
+ void finalImage( const TQImage &img, int id );
/**
* Informs you that the image with the id @p id has been run through
- * text-recognition. The text is in the QString parameter. In the future,
+ * text-recognition. The text is in the TQString parameter. In the future,
* a compound document, using rich text will be used instead.
*
* @param text the text that has been recognized
* @param id the id of the image
*/
- void textRecognized( const QString &text, int id );
+ void textRecognized( const TQString &text, int id );
private:
int m_currentId;
@@ -188,30 +188,30 @@ public:
* Your library should reimplement this method to return your KScanDialog
* derived dialog.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
*/
- virtual KScanDialog * createDialog( QWidget *parent=0, const char *name=0,
+ virtual KScanDialog * createDialog( TQWidget *parent=0, const char *name=0,
bool modal=false ) = 0;
protected:
/**
* Creates a new KScanDialogFactory.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
*/
- KScanDialogFactory( QObject *parent=0, const char *name=0 );
+ KScanDialogFactory( TQObject *parent=0, const char *name=0 );
- virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
- const char* classname = "QObject",
- const QStringList &args = QStringList() );
+ virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0,
+ const char* classname = "TQObject",
+ const TQStringList &args = TQStringList() );
/**
* Creates a new instance with the given name.
* @param instanceName the name of the instance
*/
- void setName( const QCString& instanceName ) {
+ void setName( const TQCString& instanceName ) {
delete m_instance;
m_instance = new KInstance( instanceName );
}
@@ -244,11 +244,11 @@ public:
* is available. Pass a suitable @p parent widget, if you like. If you
* don't you have to 'delete' the returned pointer yourself.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
* @return the KOCRDialog, or 0 if the function failed
*/
- static KOCRDialog * getOCRDialog( QWidget *parent=0L,
+ static KOCRDialog * getOCRDialog( TQWidget *parent=0L,
const char *name=0, bool modal=false );
~KOCRDialog();
@@ -261,11 +261,11 @@ protected:
* @param buttonMask a ORed mask of all buttons (see
* KDialogBase::ButtonCode)
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
*/
KOCRDialog( int dialogFace=Tabbed, int buttonMask = Close|Help,
- QWidget *parent=0L, const char *name=0, bool modal=false );
+ TQWidget *parent=0L, const char *name=0, bool modal=false );
/**
* Returns the current id for an image. You can use that in your subclass
@@ -291,13 +291,13 @@ protected:
signals:
/**
* Informs you that the image with the id @p id has been run through
- * text-recognition. The text is in the QString parameter. In the future,
+ * text-recognition. The text is in the TQString parameter. In the future,
* a compound document, using rich text will be used instead.
*
* @param text the text that has been recognized
* @param id the id of the image
*/
- void textRecognized( const QString &text, int id );
+ void textRecognized( const TQString &text, int id );
private:
int m_currentId;
@@ -324,30 +324,30 @@ public:
* Your library should reimplement this method to return your KOCRDialog
* derived dialog.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
* @param modal if true the dialog is model
*/
- virtual KOCRDialog * createDialog( QWidget *parent=0, const char *name=0,
+ virtual KOCRDialog * createDialog( TQWidget *parent=0, const char *name=0,
bool modal=false ) = 0;
protected:
/**
* Creates a new KScanDialogFactory.
* @param parent the QWidget's parent, or 0
- * @param name the name of the QObject, can be 0
+ * @param name the name of the TQObject, can be 0
*/
- KOCRDialogFactory( QObject *parent=0, const char *name=0 );
+ KOCRDialogFactory( TQObject *parent=0, const char *name=0 );
- virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
- const char* className = "QObject",
- const QStringList &args = QStringList() );
+ virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0,
+ const char* className = "TQObject",
+ const TQStringList &args = TQStringList() );
/**
* Creates a new instance with the given name.
* @param instanceName the name of the instance
*/
- void setName( const QCString& instanceName ) {
+ void setName( const TQCString& instanceName ) {
delete m_instance;
m_instance = new KInstance( instanceName );
}
diff --git a/kio/kio/kservice.cpp b/kio/kio/kservice.cpp
index d33e33530..2122010b2 100644
--- a/kio/kio/kservice.cpp
+++ b/kio/kio/kservice.cpp
@@ -31,10 +31,10 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtl.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtl.h>
#include <ksimpleconfig.h>
#include <kapplication.h>
@@ -56,12 +56,12 @@
class KService::KServicePrivate
{
public:
- QStringList categories;
- QString menuId;
+ TQStringList categories;
+ TQString menuId;
};
-KService::KService( const QString & _name, const QString &_exec, const QString &_icon)
- : KSycocaEntry( QString::null)
+KService::KService( const TQString & _name, const TQString &_exec, const TQString &_icon)
+ : KSycocaEntry( TQString::null)
{
d = new KServicePrivate;
m_bValid = true;
@@ -76,7 +76,7 @@ KService::KService( const QString & _name, const QString &_exec, const QString &
}
-KService::KService( const QString & _fullpath )
+KService::KService( const TQString & _fullpath )
: KSycocaEntry( _fullpath)
{
KDesktopFile config( _fullpath );
@@ -96,12 +96,12 @@ KService::init( KDesktopFile *config )
d = new KServicePrivate;
m_bValid = true;
- bool absPath = !QDir::isRelativePath(entryPath());
+ bool absPath = !TQDir::isRelativePath(entryPath());
bool kde4application = config->fileName().startsWith("/usr/share/applications/kde4/");
config->setDesktopGroup();
- QMap<QString, QString> entryMap = config->entryMap(config->group());
+ TQMap<TQString, TQString> entryMap = config->entryMap(config->group());
entryMap.remove("Encoding"); // reserved as part of Desktop Entry Standard
entryMap.remove("Version"); // reserved as part of Desktop Entry Standard
@@ -162,7 +162,7 @@ KService::init( KDesktopFile *config )
return;
}
- QString resource = config->resource();
+ TQString resource = config->resource();
if ( (m_strType == "Application") &&
(!resource.isEmpty()) &&
@@ -188,7 +188,7 @@ KService::init( KDesktopFile *config )
return;
}
- QString name = entryPath();
+ TQString name = entryPath();
int pos = name.findRev('/');
if (pos != -1)
name = name.mid(pos+1);
@@ -204,7 +204,7 @@ KService::init( KDesktopFile *config )
if (space==-1)
m_strExec = KStandardDirs::findExe(m_strExec);
else {
- const QString command = m_strExec.left(space);
+ const TQString command = m_strExec.left(space);
m_strExec.replace(command,KStandardDirs::findExe(command));
}
}
@@ -213,9 +213,9 @@ KService::init( KDesktopFile *config )
m_strIcon = config->readEntry( "Icon", "unknown" );
if (kde4application) {
- if (QFile::exists("/usr/share/icons/oxygen/22x22/apps/" + m_strIcon + ".png")) {
+ if (TQFile::exists("/usr/share/icons/oxygen/22x22/apps/" + m_strIcon + ".png")) {
m_strIcon = "/usr/share/icons/oxygen/22x22/apps/" + m_strIcon + ".png";
- } else if (QFile::exists("/usr/share/icons/hicolor/22x22/apps/" + m_strIcon + ".png")) {
+ } else if (TQFile::exists("/usr/share/icons/hicolor/22x22/apps/" + m_strIcon + ".png")) {
m_strIcon = "/usr/share/icons/hicolor/22x22/apps/" + m_strIcon + ".png";
}
}
@@ -233,7 +233,7 @@ KService::init( KDesktopFile *config )
m_strGenName += " [KDE4]";
}
entryMap.remove("GenericName");
- QString untranslatedGenericName = config->readEntryUntranslated( "GenericName" );
+ TQString untranslatedGenericName = config->readEntryUntranslated( "GenericName" );
if (!untranslatedGenericName.isEmpty())
entryMap.insert("UntranslatedGenericName", untranslatedGenericName);
@@ -257,7 +257,7 @@ KService::init( KDesktopFile *config )
// Applications implement the service type "Application" ;-)
m_lstServiceTypes += "Application";
- QString dcopServiceType = config->readEntry("X-DCOP-ServiceType").lower();
+ TQString dcopServiceType = config->readEntry("X-DCOP-ServiceType").lower();
entryMap.remove("X-DCOP-ServiceType");
if (dcopServiceType == "unique")
m_DCOPServiceType = DCOP_Unique;
@@ -279,21 +279,21 @@ KService::init( KDesktopFile *config )
entryMap.remove("InitialPreference");
// Store all additional entries in the property map.
- // A QMap<QString,QString> would be easier for this but we can't
+ // A TQMap<TQString,TQString> would be easier for this but we can't
// brake BC, so we have to store it in m_mapProps.
// qWarning("Path = %s", entryPath().latin1());
- QMap<QString,QString>::ConstIterator it = entryMap.begin();
+ TQMap<TQString,TQString>::ConstIterator it = entryMap.begin();
for( ; it != entryMap.end();++it)
{
//qDebug(" Key = %s Data = %s", it.key().latin1(), it.data().latin1());
- QString key = it.key();
+ TQString key = it.key();
if (kde4application && key=="OnlyShowIn" && it.data()=="KDE;")
key = "NotShowIn";
- m_mapProps.insert( key, QVariant( it.data()));
+ m_mapProps.insert( key, TQVariant( it.data()));
}
}
-KService::KService( QDataStream& _str, int offset ) : KSycocaEntry( _str, offset )
+KService::KService( TQDataStream& _str, int offset ) : KSycocaEntry( _str, offset )
{
d = new KServicePrivate;
load( _str );
@@ -305,12 +305,12 @@ KService::~KService()
delete d;
}
-QPixmap KService::pixmap( KIcon::Group _group, int _force_size, int _state, QString * _path ) const
+TQPixmap KService::pixmap( KIcon::Group _group, int _force_size, int _state, TQString * _path ) const
{
KIconLoader *iconLoader=KGlobal::iconLoader();
if (!iconLoader->extraDesktopThemesAdded())
{
- QPixmap pixmap=iconLoader->loadIcon( m_strIcon, _group, _force_size, _state, _path, true );
+ TQPixmap pixmap=iconLoader->loadIcon( m_strIcon, _group, _force_size, _state, _path, true );
if (!pixmap.isNull() ) return pixmap;
iconLoader->addExtraDesktopThemes();
@@ -319,14 +319,14 @@ QPixmap KService::pixmap( KIcon::Group _group, int _force_size, int _state, QStr
return iconLoader->loadIcon( m_strIcon, _group, _force_size, _state, _path );
}
-void KService::load( QDataStream& s )
+void KService::load( TQDataStream& s )
{
// dummies are here because of fields that were removed, to keep bin compat.
// Feel free to re-use, but fields for Applications only (not generic services)
// should rather be added to application.desktop
Q_INT8 def, term, dummy1, dummy2;
Q_INT8 dst, initpref;
- QString dummyStr1, dummyStr2;
+ TQString dummyStr1, dummyStr2;
int dummyI1, dummyI2;
Q_UINT32 dummyUI32;
@@ -352,14 +352,14 @@ void KService::load( QDataStream& s )
m_bValid = true;
}
-void KService::save( QDataStream& s )
+void KService::save( TQDataStream& s )
{
KSycocaEntry::save( s );
Q_INT8 def = m_bAllowAsDefault, initpref = m_initialPreference;
Q_INT8 term = m_bTerminal;
Q_INT8 dst = (Q_INT8) m_DCOPServiceType;
Q_INT8 dummy1 = 0, dummy2 = 0; // see ::load
- QString dummyStr1, dummyStr2;
+ TQString dummyStr1, dummyStr2;
int dummyI1 = 0, dummyI2 = 0;
Q_UINT32 dummyUI32 = 0;
@@ -378,7 +378,7 @@ void KService::save( QDataStream& s )
<< d->categories << d->menuId;
}
-bool KService::hasServiceType( const QString& _servicetype ) const
+bool KService::hasServiceType( const TQString& _servicetype ) const
{
if (!m_bValid) return false; // safety test
@@ -391,7 +391,7 @@ bool KService::hasServiceType( const QString& _servicetype ) const
bool isNumber;
// For each service type we are associated with, if it doesn't
// match then we try its parent service types.
- QStringList::ConstIterator it = m_lstServiceTypes.begin();
+ TQStringList::ConstIterator it = m_lstServiceTypes.begin();
for( ; it != m_lstServiceTypes.end(); ++it )
{
(*it).toInt(&isNumber);
@@ -411,14 +411,14 @@ bool KService::hasServiceType( const QString& _servicetype ) const
return false;
}
-int KService::initialPreferenceForMimeType( const QString& mimeType ) const
+int KService::initialPreferenceForMimeType( const TQString& mimeType ) const
{
if (!m_bValid) return 0; // safety test
bool isNumber;
// For each service type we are associated with
- QStringList::ConstIterator it = m_lstServiceTypes.begin();
+ TQStringList::ConstIterator it = m_lstServiceTypes.begin();
for( ; it != m_lstServiceTypes.end(); ++it )
{
(*it).toInt(&isNumber);
@@ -474,19 +474,19 @@ int KService::initialPreferenceForMimeType( const QString& mimeType ) const
class KServiceReadProperty : public KConfigBase
{
public:
- KServiceReadProperty(const QString &_key, const QCString &_value)
+ KServiceReadProperty(const TQString &_key, const TQCString &_value)
: key(_key), value(_value) { }
- bool internalHasGroup(const QCString &) const { /*qDebug("hasGroup(const QCString &)");*/ return false; }
+ bool internalHasGroup(const TQCString &) const { /*qDebug("hasGroup(const TQCString &)");*/ return false; }
- QStringList groupList() const { return QStringList(); }
+ TQStringList groupList() const { return TQStringList(); }
- QMap<QString,QString> entryMap(const QString &group) const
- { Q_UNUSED(group); return QMap<QString,QString>(); }
+ TQMap<TQString,TQString> entryMap(const TQString &group) const
+ { Q_UNUSED(group); return TQMap<TQString,TQString>(); }
void reparseConfiguration() { }
- KEntryMap internalEntryMap( const QString &pGroup) const
+ KEntryMap internalEntryMap( const TQString &pGroup) const
{ Q_UNUSED(pGroup); return KEntryMap(); }
KEntryMap internalEntryMap() const { return KEntryMap(); }
@@ -497,37 +497,37 @@ public:
KEntry lookupData(const KEntryKey &_key) const
{ Q_UNUSED(_key); KEntry entry; entry.mValue = value; return entry; }
protected:
- QString key;
- QCString value;
+ TQString key;
+ TQCString value;
};
-QVariant KService::property( const QString& _name) const
+TQVariant KService::property( const TQString& _name) const
{
- return property( _name, QVariant::Invalid);
+ return property( _name, TQVariant::Invalid);
}
-// Return a string QVariant if string isn't null, and invalid variant otherwise
+// Return a string TQVariant if string isn't null, and invalid variant otherwise
// (the variant must be invalid if the field isn't in the .desktop file)
// This allows trader queries like "exist Library" to work.
-static QVariant makeStringVariant( const QString& string )
+static TQVariant makeStringVariant( const TQString& string )
{
// Using isEmpty here would be wrong.
// Empty is "specified but empty", null is "not specified" (in the .desktop file)
- return string.isNull() ? QVariant() : QVariant( string );
+ return string.isNull() ? TQVariant() : TQVariant( string );
}
-QVariant KService::property( const QString& _name, QVariant::Type t ) const
+TQVariant KService::property( const TQString& _name, TQVariant::Type t ) const
{
if ( _name == "Type" )
- return QVariant( m_strType ); // can't be null
+ return TQVariant( m_strType ); // can't be null
else if ( _name == "Name" )
- return QVariant( m_strName ); // can't be null
+ return TQVariant( m_strName ); // can't be null
else if ( _name == "Exec" )
return makeStringVariant( m_strExec );
else if ( _name == "Icon" )
return makeStringVariant( m_strIcon );
else if ( _name == "Terminal" )
- return QVariant( static_cast<int>(m_bTerminal) );
+ return TQVariant( static_cast<int>(m_bTerminal) );
else if ( _name == "TerminalOptions" )
return makeStringVariant( m_strTerminalOptions );
else if ( _name == "Path" )
@@ -537,53 +537,53 @@ QVariant KService::property( const QString& _name, QVariant::Type t ) const
else if ( _name == "GenericName" )
return makeStringVariant( m_strGenName );
else if ( _name == "ServiceTypes" )
- return QVariant( m_lstServiceTypes );
+ return TQVariant( m_lstServiceTypes );
else if ( _name == "AllowAsDefault" )
- return QVariant( static_cast<int>(m_bAllowAsDefault) );
+ return TQVariant( static_cast<int>(m_bAllowAsDefault) );
else if ( _name == "InitialPreference" )
- return QVariant( m_initialPreference );
+ return TQVariant( m_initialPreference );
else if ( _name == "Library" )
return makeStringVariant( m_strLibrary );
else if ( _name == "DesktopEntryPath" ) // can't be null
- return QVariant( entryPath() );
+ return TQVariant( entryPath() );
else if ( _name == "DesktopEntryName")
- return QVariant( m_strDesktopEntryName ); // can't be null
+ return TQVariant( m_strDesktopEntryName ); // can't be null
else if ( _name == "Categories")
- return QVariant( d->categories );
+ return TQVariant( d->categories );
else if ( _name == "Keywords")
- return QVariant( m_lstKeywords );
+ return TQVariant( m_lstKeywords );
- // Ok we need to convert the property from a QString to its real type.
+ // Ok we need to convert the property from a TQString to its real type.
// Maybe the caller helped us.
- if (t == QVariant::Invalid)
+ if (t == TQVariant::Invalid)
{
// No luck, let's ask KServiceTypeFactory what the type of this property
// is supposed to be.
t = KServiceTypeFactory::self()->findPropertyTypeByName(_name);
- if (t == QVariant::Invalid)
+ if (t == TQVariant::Invalid)
{
kdDebug(7012) << "Request for unknown property '" << _name << "'\n";
- return QVariant(); // Unknown property: Invalid variant.
+ return TQVariant(); // Unknown property: Invalid variant.
}
}
- // Then we use a homebuild class based on KConfigBase to convert the QString.
+ // Then we use a homebuild class based on KConfigBase to convert the TQString.
// For some often used property types we do the conversion ourselves.
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.find( _name );
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( _name );
if ( (it == m_mapProps.end()) || (!it.data().isValid()))
{
//kdDebug(7012) << "Property not found " << _name << endl;
- return QVariant(); // No property set.
+ return TQVariant(); // No property set.
}
switch(t)
{
- case QVariant::String:
+ case TQVariant::String:
return it.data();
- case QVariant::Bool:
- case QVariant::Int:
+ case TQVariant::Bool:
+ case TQVariant::Int:
{
- QString aValue = it.data().toString();
+ TQString aValue = it.data().toString();
int val = 0;
if (aValue == "true" || aValue == "on" || aValue == "yes")
val = 1;
@@ -594,11 +594,11 @@ QVariant KService::property( const QString& _name, QVariant::Type t ) const
if( !bOK )
val = 0;
}
- if (t == QVariant::Bool)
+ if (t == TQVariant::Bool)
{
- return QVariant((bool)val, 1);
+ return TQVariant((bool)val, 1);
}
- return QVariant(val);
+ return TQVariant(val);
}
default:
// All others
@@ -607,11 +607,11 @@ QVariant KService::property( const QString& _name, QVariant::Type t ) const
}
}
-QStringList KService::propertyNames() const
+TQStringList KService::propertyNames() const
{
- QStringList res;
+ TQStringList res;
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.begin();
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.begin();
for( ; it != m_mapProps.end(); ++it )
res.append( it.key() );
@@ -641,19 +641,19 @@ KService::List KService::allServices()
return KServiceFactory::self()->allServices();
}
-KService::Ptr KService::serviceByName( const QString& _name )
+KService::Ptr KService::serviceByName( const TQString& _name )
{
KService * s = KServiceFactory::self()->findServiceByName( _name );
return KService::Ptr( s );
}
-KService::Ptr KService::serviceByDesktopPath( const QString& _name )
+KService::Ptr KService::serviceByDesktopPath( const TQString& _name )
{
KService * s = KServiceFactory::self()->findServiceByDesktopPath( _name );
return KService::Ptr( s );
}
-KService::Ptr KService::serviceByDesktopName( const QString& _name )
+KService::Ptr KService::serviceByDesktopName( const TQString& _name )
{
KService * s = KServiceFactory::self()->findServiceByDesktopName( _name.lower() );
if (!s && !_name.startsWith("kde-"))
@@ -661,13 +661,13 @@ KService::Ptr KService::serviceByDesktopName( const QString& _name )
return KService::Ptr( s );
}
-KService::Ptr KService::serviceByMenuId( const QString& _name )
+KService::Ptr KService::serviceByMenuId( const TQString& _name )
{
KService * s = KServiceFactory::self()->findServiceByMenuId( _name );
return KService::Ptr( s );
}
-KService::Ptr KService::serviceByStorageId( const QString& _storageId )
+KService::Ptr KService::serviceByStorageId( const TQString& _storageId )
{
KService::Ptr service = KService::serviceByMenuId( _storageId );
if (service)
@@ -677,10 +677,10 @@ KService::Ptr KService::serviceByStorageId( const QString& _storageId )
if (service)
return service;
- if (!QDir::isRelativePath(_storageId) && QFile::exists(_storageId))
+ if (!TQDir::isRelativePath(_storageId) && TQFile::exists(_storageId))
return new KService(_storageId);
- QString tmp = _storageId;
+ TQString tmp = _storageId;
tmp = tmp.mid(tmp.findRev('/')+1); // Strip dir
if (tmp.endsWith(".desktop"))
@@ -700,15 +700,15 @@ KService::List KService::allInitServices()
}
bool KService::substituteUid() const {
- QVariant v = property("X-KDE-SubstituteUID", QVariant::Bool);
+ TQVariant v = property("X-KDE-SubstituteUID", TQVariant::Bool);
return v.isValid() && v.toBool();
}
-QString KService::username() const {
+TQString KService::username() const {
// See also KDesktopFile::tryExec()
- QString user;
- QVariant v = property("X-KDE-Username", QVariant::String);
- user = v.isValid() ? v.toString() : QString::null;
+ TQString user;
+ TQVariant v = property("X-KDE-Username", TQVariant::String);
+ user = v.isValid() ? v.toString() : TQString::null;
if (user.isEmpty())
user = ::getenv("ADMIN_ACCOUNT");
if (user.isEmpty())
@@ -717,10 +717,10 @@ QString KService::username() const {
}
bool KService::noDisplay() const {
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.find( "NoDisplay" );
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "NoDisplay" );
if ( (it != m_mapProps.end()) && (it.data().isValid()))
{
- QString aValue = it.data().toString().lower();
+ TQString aValue = it.data().toString().lower();
if (aValue == "true" || aValue == "on" || aValue == "yes")
return true;
}
@@ -728,8 +728,8 @@ bool KService::noDisplay() const {
it = m_mapProps.find( "OnlyShowIn" );
if ( (it != m_mapProps.end()) && (it.data().isValid()))
{
- QString aValue = it.data().toString();
- QStringList aList = QStringList::split(';', aValue);
+ TQString aValue = it.data().toString();
+ TQStringList aList = TQStringList::split(';', aValue);
if (!aList.contains("KDE"))
return true;
}
@@ -737,8 +737,8 @@ bool KService::noDisplay() const {
it = m_mapProps.find( "NotShowIn" );
if ( (it != m_mapProps.end()) && (it.data().isValid()))
{
- QString aValue = it.data().toString();
- QStringList aList = QStringList::split(';', aValue);
+ TQString aValue = it.data().toString();
+ TQStringList aList = TQStringList::split(';', aValue);
if (aList.contains("KDE"))
return true;
}
@@ -749,16 +749,16 @@ bool KService::noDisplay() const {
return false;
}
-QString KService::untranslatedGenericName() const {
- QVariant v = property("UntranslatedGenericName", QVariant::String);
- return v.isValid() ? v.toString() : QString::null;
+TQString KService::untranslatedGenericName() const {
+ TQVariant v = property("UntranslatedGenericName", TQVariant::String);
+ return v.isValid() ? v.toString() : TQString::null;
}
-QString KService::parentApp() const {
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.find( "X-KDE-ParentApp" );
+TQString KService::parentApp() const {
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "X-KDE-ParentApp" );
if ( (it == m_mapProps.end()) || (!it.data().isValid()))
{
- return QString::null;
+ return TQString::null;
}
return it.data().toString();
@@ -773,51 +773,51 @@ bool KService::allowMultipleFiles() const {
return false;
}
-QStringList KService::categories() const
+TQStringList KService::categories() const
{
return d->categories;
}
-QString KService::menuId() const
+TQString KService::menuId() const
{
return d->menuId;
}
-void KService::setMenuId(const QString &menuId)
+void KService::setMenuId(const TQString &menuId)
{
d->menuId = menuId;
}
-QString KService::storageId() const
+TQString KService::storageId() const
{
if (!d->menuId.isEmpty())
return d->menuId;
return entryPath();
}
-QString KService::locateLocal()
+TQString KService::locateLocal()
{
if (d->menuId.isEmpty() || desktopEntryPath().startsWith(".hidden") ||
- (QDir::isRelativePath(desktopEntryPath()) && d->categories.isEmpty()))
+ (TQDir::isRelativePath(desktopEntryPath()) && d->categories.isEmpty()))
return KDesktopFile::locateLocal(desktopEntryPath());
return ::locateLocal("xdgdata-apps", d->menuId);
}
-QString KService::newServicePath(bool showInMenu, const QString &suggestedName,
- QString *menuId, const QStringList *reservedMenuIds)
+TQString KService::newServicePath(bool showInMenu, const TQString &suggestedName,
+ TQString *menuId, const TQStringList *reservedMenuIds)
{
- QString base = suggestedName;
+ TQString base = suggestedName;
if (!showInMenu)
base.prepend("kde-");
- QString result;
+ TQString result;
for(int i = 1; true; i++)
{
if (i == 1)
result = base + ".desktop";
else
- result = base + QString("-%1.desktop").arg(i);
+ result = base + TQString("-%1.desktop").arg(i);
if (reservedMenuIds && reservedMenuIds->contains(result))
continue;
@@ -834,7 +834,7 @@ QString KService::newServicePath(bool showInMenu, const QString &suggestedName,
}
else
{
- QString file = result.mid(4); // Strip "kde-"
+ TQString file = result.mid(4); // Strip "kde-"
if (!locate("apps", ".hidden/"+file).isEmpty())
continue;
}
@@ -850,7 +850,7 @@ QString KService::newServicePath(bool showInMenu, const QString &suggestedName,
}
else
{
- QString file = result.mid(4); // Strip "kde-"
+ TQString file = result.mid(4); // Strip "kde-"
return ::locateLocal("apps", ".hidden/"+file);
}
}
@@ -860,17 +860,17 @@ void KService::virtual_hook( int id, void* data )
{ KSycocaEntry::virtual_hook( id, data ); }
-void KService::rebuildKSycoca(QWidget *parent)
+void KService::rebuildKSycoca(TQWidget *parent)
{
KServiceProgressDialog dlg(parent, "ksycoca_progress",
i18n("Updating System Configuration"),
i18n("Updating system configuration."));
- QByteArray data;
+ TQByteArray data;
DCOPClient *client = kapp->dcopClient();
int result = client->callAsync("kded", "kbuildsycoca", "recreate()",
- data, &dlg, SLOT(slotFinished()));
+ data, &dlg, TQT_SLOT(slotFinished()));
if (result)
{
@@ -878,11 +878,11 @@ void KService::rebuildKSycoca(QWidget *parent)
}
}
-KServiceProgressDialog::KServiceProgressDialog(QWidget *parent, const char *name,
- const QString &caption, const QString &text)
+KServiceProgressDialog::KServiceProgressDialog(TQWidget *parent, const char *name,
+ const TQString &caption, const TQString &text)
: KProgressDialog(parent, name, caption, text, true)
{
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotProgress()));
+ connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotProgress()));
progressBar()->setTotalSteps(20);
m_timeStep = 700;
m_timer.start(m_timeStep);
@@ -911,7 +911,7 @@ KServiceProgressDialog::slotFinished()
{
progressBar()->setProgress(20);
m_timer.stop();
- QTimer::singleShot(1000, this, SLOT(close()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(close()));
}
#include "kservice_p.moc"
diff --git a/kio/kio/kservice.h b/kio/kio/kservice.h
index 6798fa4bf..dd207b304 100644
--- a/kio/kio/kservice.h
+++ b/kio/kio/kservice.h
@@ -20,9 +20,9 @@
#ifndef __kservices_h__
#define __kservices_h__
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qvariant.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqvariant.h>
#include <kicontheme.h>
#include "ksycocaentry.h"
@@ -53,7 +53,7 @@ class KIO_EXPORT KService : public KSycocaEntry
public:
typedef KSharedPtr<KService> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public:
/**
* Construct a temporary service with a given name, exec-line and icon.
@@ -61,14 +61,14 @@ public:
* @param _exec the executable
* @param _icon the name of the icon
*/
- KService( const QString & _name, const QString &_exec, const QString &_icon);
+ KService( const TQString & _name, const TQString &_exec, const TQString &_icon);
/**
* Construct a service and take all information from a config file.
*
* @param _fullpath Full path to the config file.
*/
- explicit KService( const QString & _fullpath );
+ explicit KService( const TQString & _fullpath );
/**
* Construct a service and take all information from a desktop file.
@@ -81,7 +81,7 @@ public:
* Construct a service from a stream.
* The stream must already be positionned at the correct offset.
*/
- KService( QDataStream& _str, int offset );
+ KService( TQDataStream& _str, int offset );
virtual ~KService();
@@ -89,48 +89,48 @@ public:
* Returns the type of the service.
* @return the type of the service ("Application" or "Service")
*/
- virtual QString type() const { return m_strType; }
+ virtual TQString type() const { return m_strType; }
/**
* Returns the name of the service.
* @return the name of the service,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- virtual QString name() const { return m_strName; }
+ virtual TQString name() const { return m_strName; }
/**
* Returns the executable.
* @return the command that the service executes,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString exec() const { return m_strExec; }
+ TQString exec() const { return m_strExec; }
/**
* Returns the name of the service's library.
* @return the name of the library that contains the services
* implementation,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString library() const { return m_strLibrary; }
+ TQString library() const { return m_strLibrary; }
/**
* Returns the name of the init function to call (KControl modules).
* @return the name of the init function to call in this service
* during startup of KDE. (KControl modules only),
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString init() const { return m_strInit; }
+ TQString init() const { return m_strInit; }
/**
* Returns the name of the icon.
* @return the icon associated with the service,
* or "unknown" if not set
*/
- QString icon() const { return m_strIcon; }
+ TQString icon() const { return m_strIcon; }
/**
* Returns the pixmap that represents the icon.
* @return a pixmap for this service (finds and loads icon()),
* null if not set
* @see icon()
*/
- QPixmap pixmap( KIcon::Group _group, int _force_size = 0, int _state = 0,
- QString * _path = 0L ) const;
+ TQPixmap pixmap( KIcon::Group _group, int _force_size = 0, int _state = 0,
+ TQString * _path = 0L ) const;
/**
* Checks whethe the service should be run in a terminal.
* @return true if the service is to be run in a terminal.
@@ -142,9 +142,9 @@ public:
*
* The service must be a tty-oriented program.
* @return the terminal options,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString terminalOptions() const { return m_strTerminalOptions; }
+ TQString terminalOptions() const { return m_strTerminalOptions; }
/**
* Checks whether the service runs with a different user id.
* @return true if the service has to be run under a different uid.
@@ -155,10 +155,10 @@ public:
* Returns the user name, if the service runs with a
* different user id.
* @return the username under which the service has to be run,
- * or QString::null if not set
+ * or TQString::null if not set
* @see substututeUid()a
*/
- QString username() const;
+ TQString username() const;
/**
* Returns the path to the location where the service desktop entry
@@ -169,17 +169,17 @@ public:
* It is a full path if the desktop entry originates from another
* location.
* @return the path of the service's desktop file,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString desktopEntryPath() const { return entryPath(); }
+ TQString desktopEntryPath() const { return entryPath(); }
/**
* Returns the filename of the service desktop entry without any
* extension. E.g. "kppp"
* @return the name of the desktop entry without path or extension,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString desktopEntryName() const { return m_strDesktopEntryName; }
+ TQString desktopEntryName() const { return m_strDesktopEntryName; }
/**
* Returns the menu ID of the service desktop entry.
@@ -187,7 +187,7 @@ public:
* @return the menu ID
* @since 3.2
*/
- QString menuId() const;
+ TQString menuId() const;
/**
* Returns a normalized ID suitable for storing in configuration files.
@@ -196,7 +196,7 @@ public:
* @return the storage ID
* @since 3.2
*/
- QString storageId() const;
+ TQString storageId() const;
/**
* Describes the DCOP type of the service.
@@ -221,53 +221,53 @@ public:
/**
* Returns the working directory to run the program in.
* @return the working directory to run the program in,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString path() const { return m_strPath; }
+ TQString path() const { return m_strPath; }
/**
* Returns the descriptive comment for the service, if there is one.
- * @return the descriptive comment for the service, or QString::null
+ * @return the descriptive comment for the service, or TQString::null
* if not set
*/
- QString comment() const { return m_strComment; }
+ TQString comment() const { return m_strComment; }
/**
* Returns the generic name for the service, if there is one
* (e.g. "Mail Client").
* @return the generic name,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString genericName() const { return m_strGenName; }
+ TQString genericName() const { return m_strGenName; }
/**
* Returns the untranslated (US English) generic name
* for the service, if there is one
* (e.g. "Mail Client").
* @return the generic name,
- * or QString::null if not set
+ * or TQString::null if not set
* @since 3.2
*/
- QString untranslatedGenericName() const;
+ TQString untranslatedGenericName() const;
/**
* Returns a list of descriptive keywords the service, if there are any.
* @return the list of keywords
*/
- QStringList keywords() const { return m_lstKeywords; }
+ TQStringList keywords() const { return m_lstKeywords; }
/**
* Returns a list of VFolder categories.
* @return the list of VFolder categories
* @since 3.1
*/
- QStringList categories() const;
+ TQStringList categories() const;
/**
* Returns the service types that this service supports.
* @return the list of service types that are supported
*/
- QStringList serviceTypes() const { return m_lstServiceTypes; }
+ TQStringList serviceTypes() const { return m_lstServiceTypes; }
/**
* Checks whether the service supports this service type
@@ -277,7 +277,7 @@ public:
* @return true if the service you specified is supported,
* otherwise false.
*/
- bool hasServiceType( const QString& _service ) const;
+ bool hasServiceType( const TQString& _service ) const;
/**
* Set to true if it is allowed to use this service as the default (main)
@@ -315,7 +315,7 @@ public:
* @return the service preference level of the service for
* this mimetype
*/
- int initialPreferenceForMimeType( const QString& mimeType ) const;
+ int initialPreferenceForMimeType( const TQString& mimeType ) const;
/**
* @internal. Allows KServiceType::offers to tweak the initial preference.
@@ -331,10 +331,10 @@ public:
/**
* Name of the application this service belongs to.
* (Useful for e.g. plugins)
- * @return the parent application, or QString::null if not set
+ * @return the parent application, or TQString::null if not set
* @since 3.1
*/
- QString parentApp() const;
+ TQString parentApp() const;
/**
* Returns the requested property. Some often used properties
@@ -348,7 +348,7 @@ public:
* @return the property, or invalid if not found
* @see KServiceType
*/
- virtual QVariant property( const QString& _name ) const;
+ virtual TQVariant property( const TQString& _name ) const;
/**
* Returns the requested property.
@@ -359,14 +359,14 @@ public:
* @see KServiceType
* @since 3.2
*/
- QVariant property( const QString& _name, QVariant::Type t ) const;
+ TQVariant property( const TQString& _name, TQVariant::Type t ) const;
/**
* Returns the list of all properties that this service can have.
* That means, that some of these properties may be empty.
* @return the list of supported properties
*/
- virtual QStringList propertyNames() const;
+ virtual TQStringList propertyNames() const;
/**
* Checks whether the service is valid.
@@ -380,23 +380,23 @@ public:
* @return path that can be used for saving changes to this service
* @since 3.2
*/
- QString locateLocal();
+ TQString locateLocal();
/**
* @internal
* Load the service from a stream.
*/
- virtual void load( QDataStream& );
+ virtual void load( TQDataStream& );
/**
* @internal
* Save the service to a stream.
*/
- virtual void save( QDataStream& );
+ virtual void save( TQDataStream& );
/**
* @internal
* Set the menu id
*/
- void setMenuId(const QString &menuId);
+ void setMenuId(const TQString &menuId);
/**
* @internal
* Sets whether to use a terminal or not
@@ -406,7 +406,7 @@ public:
* @internal
* Sets the terminal options to use
*/
- void setTerminalOptions(const QString &options) { m_strTerminalOptions = options; }
+ void setTerminalOptions(const TQString &options) { m_strTerminalOptions = options; }
/**
* Find a service by name, i.e. the translated Name field. You should
@@ -417,7 +417,7 @@ public:
* unknown.
* @em Very @em important: Don't store the result in a KService* !
*/
- static Ptr serviceByName( const QString& _name );
+ static Ptr serviceByName( const TQString& _name );
/**
* Find a service based on its path as returned by desktopEntryPath().
@@ -428,7 +428,7 @@ public:
* unknown.
* @em Very @em important: Don't store the result in a KService* !
*/
- static Ptr serviceByDesktopPath( const QString& _path );
+ static Ptr serviceByDesktopPath( const TQString& _path );
/**
* Find a service by the name of its desktop file, not depending on
@@ -444,7 +444,7 @@ public:
* unknown.
* @em Very @em important: Don't store the result in a KService* !
*/
- static Ptr serviceByDesktopName( const QString& _name );
+ static Ptr serviceByDesktopName( const TQString& _name );
/**
* Find a service by its menu-id
@@ -455,7 +455,7 @@ public:
* @em Very @em important: Don't store the result in a KService* !
* @since 3.2
*/
- static Ptr serviceByMenuId( const QString& _menuId );
+ static Ptr serviceByMenuId( const TQString& _menuId );
/**
* Find a service by its storage-id or desktop-file path. This
@@ -467,7 +467,7 @@ public:
* @em Very @em important: Don't store the result in a KService* !
* @since 3.2
*/
- static Ptr serviceByStorageId( const QString& _storageId );
+ static Ptr serviceByStorageId( const TQString& _storageId );
/**
* Returns the whole list of services.
@@ -503,9 +503,9 @@ public:
* @return The path to use for the new KService.
* @since 3.2
*/
- static QString newServicePath(bool showInMenu, const QString &suggestedName,
- QString *menuId = 0,
- const QStringList *reservedMenuIds = 0);
+ static TQString newServicePath(bool showInMenu, const TQString &suggestedName,
+ TQString *menuId = 0,
+ const TQStringList *reservedMenuIds = 0);
/**
@@ -513,42 +513,42 @@ public:
* @param parent Parent widget for the progress dialog
* @since 3.2
*/
- static void rebuildKSycoca(QWidget *parent);
+ static void rebuildKSycoca(TQWidget *parent);
protected:
void init(KDesktopFile *config);
- QStringList &accessServiceTypes() { return m_lstServiceTypes; }
+ TQStringList &accessServiceTypes() { return m_lstServiceTypes; }
private:
KService( const KService& ); // forbidden
KService& operator=(const KService&);
- QString m_strType;
- QString m_strName;
- QString m_strExec;
- QString m_strIcon;
- QString m_strTerminalOptions;
- QString m_strPath;
- QString m_strComment;
- QString m_strLibrary;
- QStringList m_lstServiceTypes;
+ TQString m_strType;
+ TQString m_strName;
+ TQString m_strExec;
+ TQString m_strIcon;
+ TQString m_strTerminalOptions;
+ TQString m_strPath;
+ TQString m_strComment;
+ TQString m_strLibrary;
+ TQStringList m_lstServiceTypes;
bool m_bAllowAsDefault;
int m_initialPreference;
bool m_bTerminal;
//bool m_bSuid;
- //QString m_strUsername;
- QString m_strDesktopEntryName;
- //QString m_docPath;
+ //TQString m_strUsername;
+ TQString m_strDesktopEntryName;
+ //TQString m_docPath;
//bool m_bHideFromPanel;
DCOPServiceType_t m_DCOPServiceType;
- QMap<QString,QVariant> m_mapProps;
+ TQMap<TQString,TQVariant> m_mapProps;
bool m_bValid;
- QStringList m_lstKeywords;
- QString m_strInit;
- QString m_strGenName;
+ TQStringList m_lstKeywords;
+ TQString m_strInit;
+ TQString m_strGenName;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/kservice_p.h b/kio/kio/kservice_p.h
index fb2b565a5..180ab8fc3 100644
--- a/kio/kio/kservice_p.h
+++ b/kio/kio/kservice_p.h
@@ -19,7 +19,7 @@
#ifndef __kservices_p_h__
#define __kservices_p_h__
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kprogress.h>
@@ -27,14 +27,14 @@ class KServiceProgressDialog : public KProgressDialog
{
Q_OBJECT
public:
- KServiceProgressDialog(QWidget *parent, const char *name,
- const QString &caption, const QString &text);
+ KServiceProgressDialog(TQWidget *parent, const char *name,
+ const TQString &caption, const TQString &text);
public slots:
void slotProgress();
void slotFinished();
private:
- QTimer m_timer;
+ TQTimer m_timer;
int m_timeStep;
};
diff --git a/kio/kio/kservicefactory.cpp b/kio/kio/kservicefactory.cpp
index e13547876..1f79deb19 100644
--- a/kio/kio/kservicefactory.cpp
+++ b/kio/kio/kservicefactory.cpp
@@ -22,7 +22,7 @@
#include "ksycocadict.h"
#include "kservice.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kdebug.h>
@@ -87,7 +87,7 @@ KServiceFactory * KServiceFactory::self()
return _self;
}
-KService * KServiceFactory::findServiceByName(const QString &_name)
+KService * KServiceFactory::findServiceByName(const TQString &_name)
{
if (!m_sycocaDict) return 0; // Error!
@@ -110,7 +110,7 @@ KService * KServiceFactory::findServiceByName(const QString &_name)
return newService;
}
-KService * KServiceFactory::findServiceByDesktopName(const QString &_name)
+KService * KServiceFactory::findServiceByDesktopName(const TQString &_name)
{
if (!m_nameDict) return 0; // Error!
@@ -133,7 +133,7 @@ KService * KServiceFactory::findServiceByDesktopName(const QString &_name)
return newService;
}
-KService * KServiceFactory::findServiceByDesktopPath(const QString &_name)
+KService * KServiceFactory::findServiceByDesktopPath(const TQString &_name)
{
if (!m_relNameDict) return 0; // Error!
@@ -156,7 +156,7 @@ KService * KServiceFactory::findServiceByDesktopPath(const QString &_name)
return newService;
}
-KService * KServiceFactory::findServiceByMenuId(const QString &_menuId)
+KService * KServiceFactory::findServiceByMenuId(const TQString &_menuId)
{
if (!m_menuIdDict) return 0; // Error!
@@ -183,7 +183,7 @@ KService* KServiceFactory::createEntry(int offset)
{
KService * newEntry = 0L;
KSycocaType type;
- QDataStream *str = KSycoca::self()->findEntry(offset, type);
+ TQDataStream *str = KSycoca::self()->findEntry(offset, type);
switch(type)
{
case KST_KService:
@@ -191,7 +191,7 @@ KService* KServiceFactory::createEntry(int offset)
break;
default:
- kdError(7011) << QString("KServiceFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
+ kdError(7011) << TQString("KServiceFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
return 0;
}
if (!newEntry->isValid())
@@ -251,7 +251,7 @@ KService::List KServiceFactory::offers( int serviceTypeOffset )
{
KService::List list;
- QDataStream *str = m_str;
+ TQDataStream *str = m_str;
// Jump to the offer list
str->device()->at( m_offerListOffset );
diff --git a/kio/kio/kservicefactory.h b/kio/kio/kservicefactory.h
index d266c4b87..1a828364e 100644
--- a/kio/kio/kservicefactory.h
+++ b/kio/kio/kservicefactory.h
@@ -20,7 +20,7 @@
#ifndef __kservicefactory_h__
#define __kservicefactory_h__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "kservice.h"
#include "ksycocafactory.h"
@@ -48,28 +48,28 @@ public:
/**
* Construct a KService from a config file.
*/
- virtual KSycocaEntry *createEntry(const QString &, const char *)
+ virtual KSycocaEntry *createEntry(const TQString &, const char *)
{ assert(0); return 0; }
/**
* Find a service (by name, e.g. "Terminal")
*/
- KService * findServiceByName( const QString &_name );
+ KService * findServiceByName( const TQString &_name );
/**
* Find a service (by desktop file name, e.g. "konsole")
*/
- KService * findServiceByDesktopName( const QString &_name );
+ KService * findServiceByDesktopName( const TQString &_name );
/**
* Find a service ( by desktop path, e.g. "System/konsole.desktop")
*/
- KService * findServiceByDesktopPath( const QString &_name );
+ KService * findServiceByDesktopPath( const TQString &_name );
/**
* Find a service ( by menu id, e.g. "kde-konsole.desktop")
*/
- KService * findServiceByMenuId( const QString &_menuId );
+ KService * findServiceByMenuId( const TQString &_menuId );
/**
* @return the services supporting the given service type
diff --git a/kio/kio/kservicegroup.cpp b/kio/kio/kservicegroup.cpp
index c754fac0f..1531dc796 100644
--- a/kio/kio/kservicegroup.cpp
+++ b/kio/kio/kservicegroup.cpp
@@ -38,12 +38,12 @@ public:
bool m_bInlineAlias;
bool m_bAllowInline;
int m_inlineValue;
- QStringList suppressGenericNames;
- QString directoryEntryPath;
- QStringList sortOrder;
+ TQStringList suppressGenericNames;
+ TQString directoryEntryPath;
+ TQStringList sortOrder;
};
-KServiceGroup::KServiceGroup( const QString & name )
+KServiceGroup::KServiceGroup( const TQString & name )
: KSycocaEntry(name), m_childCount(-1)
{
d = new KServiceGroup::Private;
@@ -51,14 +51,14 @@ KServiceGroup::KServiceGroup( const QString & name )
m_bDeep = false;
}
-KServiceGroup::KServiceGroup( const QString &configFile, const QString & _relpath )
+KServiceGroup::KServiceGroup( const TQString &configFile, const TQString & _relpath )
: KSycocaEntry(_relpath), m_childCount(-1)
{
d = new KServiceGroup::Private;
m_bDeleted = false;
m_bDeep = false;
- QString cfg = configFile;
+ TQString cfg = configFile;
if (cfg.isEmpty())
cfg = _relpath+".directory";
@@ -73,7 +73,7 @@ KServiceGroup::KServiceGroup( const QString &configFile, const QString & _relpat
m_strComment = config.readEntry( "Comment" );
m_bDeleted = config.readBoolEntry( "Hidden", false );
d->m_bNoDisplay = config.readBoolEntry( "NoDisplay", false );
- QStringList tmpList;
+ TQStringList tmpList;
if (config.hasKey("OnlyShowIn"))
{
if (!config.readListEntry("OnlyShowIn", ';').contains("KDE"))
@@ -103,7 +103,7 @@ KServiceGroup::KServiceGroup( const QString &configFile, const QString & _relpat
m_strIcon = "folder";
}
-KServiceGroup::KServiceGroup( QDataStream& _str, int offset, bool deep ) :
+KServiceGroup::KServiceGroup( TQDataStream& _str, int offset, bool deep ) :
KSycocaEntry( _str, offset )
{
d = new KServiceGroup::Private;
@@ -198,14 +198,14 @@ bool KServiceGroup::noDisplay() const
return d->m_bNoDisplay || m_strCaption.startsWith(".");
}
-QStringList KServiceGroup::suppressGenericNames() const
+TQStringList KServiceGroup::suppressGenericNames() const
{
return d->suppressGenericNames;
}
-void KServiceGroup::load( QDataStream& s )
+void KServiceGroup::load( TQDataStream& s )
{
- QStringList groupList;
+ TQStringList groupList;
Q_INT8 noDisplay;
Q_INT8 _showEmptyMenu;
Q_INT8 inlineHeader;
@@ -224,10 +224,10 @@ void KServiceGroup::load( QDataStream& s )
if (m_bDeep)
{
- for(QStringList::ConstIterator it = groupList.begin();
+ for(TQStringList::ConstIterator it = groupList.begin();
it != groupList.end(); it++)
{
- QString path = *it;
+ TQString path = *it;
if (path[path.length()-1] == '/')
{
KServiceGroup *serviceGroup;
@@ -251,11 +251,11 @@ void KServiceGroup::addEntry( KSycocaEntry *entry)
m_serviceList.append(entry);
}
-void KServiceGroup::save( QDataStream& s )
+void KServiceGroup::save( TQDataStream& s )
{
KSycocaEntry::save( s );
- QStringList groupList;
+ TQStringList groupList;
for( List::ConstIterator it = m_serviceList.begin();
it != m_serviceList.end(); it++)
{
@@ -333,8 +333,8 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
// Sort the list alphabetically, according to locale.
// Groups come first, then services.
- KSortableValueList<SPtr,QCString> slist;
- KSortableValueList<SPtr,QCString> glist;
+ KSortableValueList<SPtr,TQCString> slist;
+ KSortableValueList<SPtr,TQCString> glist;
for (List::ConstIterator it(group->m_serviceList.begin()); it != group->m_serviceList.end(); ++it)
{
KSycocaEntry *p = (*it);
@@ -344,8 +344,8 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
if (excludeNoDisplay && noDisplay)
continue;
// Choose the right list
- KSortableValueList<SPtr,QCString> & list = p->isType(KST_KServiceGroup) ? glist : slist;
- QString name;
+ KSortableValueList<SPtr,TQCString> & list = p->isType(KST_KServiceGroup) ? glist : slist;
+ TQString name;
if (p->isType(KST_KServiceGroup))
name = static_cast<KServiceGroup *>(p)->caption();
else if (sortByGenericName)
@@ -353,7 +353,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
else
name = p->name() + " " + static_cast<KService *>(p)->genericName();
- QCString key( name.length() * 4 + 1 );
+ TQCString key( name.length() * 4 + 1 );
// strxfrm() crashes on Solaris
#ifndef USE_SOLARIS
// maybe it'd be better to use wcsxfrm() where available
@@ -385,20 +385,20 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
d->sortOrder << ":OIH IL[4]"; //just inline header
}
- QString rp = relPath();
- if(rp == "/") rp = QString::null;
+ TQString rp = relPath();
+ if(rp == "/") rp = TQString::null;
// Iterate through the sort spec list.
// If an entry gets mentioned explicitly, we remove it from the sorted list
- for (QStringList::ConstIterator it(d->sortOrder.begin()); it != d->sortOrder.end(); ++it)
+ for (TQStringList::ConstIterator it(d->sortOrder.begin()); it != d->sortOrder.end(); ++it)
{
- const QString &item = *it;
+ const TQString &item = *it;
if (item.isEmpty()) continue;
if (item[0] == '/')
{
- QString groupPath = rp + item.mid(1) + "/";
+ TQString groupPath = rp + item.mid(1) + "/";
// Remove entry from sorted list of services.
- for(KSortableValueList<SPtr,QCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
+ for(KSortableValueList<SPtr,TQCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
{
KServiceGroup *group = (KServiceGroup *)((KSycocaEntry *)((*it2).value()));
if (group->relPath() == groupPath)
@@ -413,7 +413,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
// Remove entry from sorted list of services.
// TODO: Remove item from sortOrder-list if not found
// TODO: This prevents duplicates
- for(KSortableValueList<SPtr,QCString>::Iterator it2 = slist.begin(); it2 != slist.end(); ++it2)
+ for(KSortableValueList<SPtr,TQCString>::Iterator it2 = slist.begin(); it2 != slist.end(); ++it2)
{
KService *service = (KService *)((KSycocaEntry *)((*it2).value()));
if (service->menuId() == item)
@@ -430,9 +430,9 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
bool needSeparator = false;
// Iterate through the sort spec list.
// Add the entries to the list according to the sort spec.
- for (QStringList::ConstIterator it(d->sortOrder.begin()); it != d->sortOrder.end(); ++it)
+ for (TQStringList::ConstIterator it(d->sortOrder.begin()); it != d->sortOrder.end(); ++it)
{
- const QString &item = *it;
+ const TQString &item = *it;
if (item.isEmpty()) continue;
if (item[0] == ':')
{
@@ -445,9 +445,9 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
else if ( item.contains( ":O" ) )
{
//todo parse attribute:
- QString tmp( item );
+ TQString tmp( item );
tmp = tmp.remove(":O");
- QStringList optionAttribute = QStringList::split(" ",tmp);
+ TQStringList optionAttribute = TQStringList::split(" ",tmp);
if( optionAttribute.count()==0)
optionAttribute.append(tmp);
bool showEmptyMenu = false;
@@ -456,11 +456,11 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
bool showInlineAlias = false;
int inlineValue = -1;
- for ( QStringList::Iterator it3 = optionAttribute.begin(); it3 != optionAttribute.end(); ++it3 )
+ for ( TQStringList::Iterator it3 = optionAttribute.begin(); it3 != optionAttribute.end(); ++it3 )
{
parseAttribute( *it3, showEmptyMenu, showInline, showInlineHeader, showInlineAlias, inlineValue );
}
- for(KSortableValueList<SPtr,QCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
+ for(KSortableValueList<SPtr,TQCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
{
KServiceGroup *group = (KServiceGroup *)((KSycocaEntry *)(*it2).value());
group->setShowEmptyMenu( showEmptyMenu );
@@ -474,7 +474,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
else if (item == ":M")
{
// Add sorted list of sub-menus
- for(KSortableValueList<SPtr,QCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
+ for(KSortableValueList<SPtr,TQCString>::Iterator it2 = glist.begin(); it2 != glist.end(); ++it2)
{
addItem(sorted, (*it2).value(), needSeparator);
}
@@ -482,7 +482,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
else if (item == ":F")
{
// Add sorted list of services
- for(KSortableValueList<SPtr,QCString>::Iterator it2 = slist.begin(); it2 != slist.end(); ++it2)
+ for(KSortableValueList<SPtr,TQCString>::Iterator it2 = slist.begin(); it2 != slist.end(); ++it2)
{
addItem(sorted, (*it2).value(), needSeparator);
}
@@ -490,8 +490,8 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
else if (item == ":A")
{
// Add sorted lists of services and submenus
- KSortableValueList<SPtr,QCString>::Iterator it_s = slist.begin();
- KSortableValueList<SPtr,QCString>::Iterator it_g = glist.begin();
+ KSortableValueList<SPtr,TQCString>::Iterator it_s = slist.begin();
+ KSortableValueList<SPtr,TQCString>::Iterator it_g = glist.begin();
while(true)
{
@@ -527,7 +527,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
}
else if (item[0] == '/')
{
- QString groupPath = rp + item.mid(1) + "/";
+ TQString groupPath = rp + item.mid(1) + "/";
for (List::ConstIterator it2(group->m_serviceList.begin()); it2 != group->m_serviceList.end(); ++it2)
{
@@ -538,12 +538,12 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
{
if (!excludeNoDisplay || !group->noDisplay())
{
- const QString &nextItem = *( ++it );
+ const TQString &nextItem = *( ++it );
if ( nextItem.startsWith( ":O" ) )
{
- QString tmp( nextItem );
+ TQString tmp( nextItem );
tmp = tmp.remove(":O");
- QStringList optionAttribute = QStringList::split(" ",tmp);
+ TQStringList optionAttribute = TQStringList::split(" ",tmp);
if( optionAttribute.count()==0)
optionAttribute.append(tmp);
bool bShowEmptyMenu = false;
@@ -551,7 +551,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
bool bShowInlineHeader = false;
bool bShowInlineAlias = false;
int inlineValue = -1;
- for ( QStringList::Iterator it3 = optionAttribute.begin(); it3 != optionAttribute.end(); ++it3 )
+ for ( TQStringList::Iterator it3 = optionAttribute.begin(); it3 != optionAttribute.end(); ++it3 )
{
parseAttribute( *it3 , bShowEmptyMenu, bShowInline, bShowInlineHeader, bShowInlineAlias , inlineValue );
group->setShowEmptyMenu( bShowEmptyMenu );
@@ -590,7 +590,7 @@ KServiceGroup::entries(bool sort, bool excludeNoDisplay, bool allowSeparators, b
return sorted;
}
-void KServiceGroup::parseAttribute( const QString &item , bool &showEmptyMenu, bool &showInline, bool &showInlineHeader, bool & showInlineAlias , int &inlineValue )
+void KServiceGroup::parseAttribute( const TQString &item , bool &showEmptyMenu, bool &showInline, bool &showInlineHeader, bool & showInlineAlias , int &inlineValue )
{
if( item == "ME") //menu empty
showEmptyMenu=true;
@@ -610,7 +610,7 @@ void KServiceGroup::parseAttribute( const QString &item , bool &showEmptyMenu,
showInlineAlias = false;
else if( ( item ).contains( "IL" )) //inline limite!
{
- QString tmp( item );
+ TQString tmp( item );
tmp = tmp.remove( "IL[" );
tmp = tmp.remove( "]" );
bool ok;
@@ -623,18 +623,18 @@ void KServiceGroup::parseAttribute( const QString &item , bool &showEmptyMenu,
kdDebug()<<" This attribute is not supported :"<<item<<endl;
}
-void KServiceGroup::setLayoutInfo(const QStringList &layout)
+void KServiceGroup::setLayoutInfo(const TQStringList &layout)
{
d->sortOrder = layout;
}
-QStringList KServiceGroup::layoutInfo() const
+TQStringList KServiceGroup::layoutInfo() const
{
return d->sortOrder;
}
KServiceGroup::Ptr
-KServiceGroup::baseGroup( const QString & _baseGroupName )
+KServiceGroup::baseGroup( const TQString & _baseGroupName )
{
return KServiceGroupFactory::self()->findBaseGroup(_baseGroupName, true);
}
@@ -646,14 +646,14 @@ KServiceGroup::root()
}
KServiceGroup::Ptr
-KServiceGroup::group(const QString &relPath)
+KServiceGroup::group(const TQString &relPath)
{
if (relPath.isEmpty()) return root();
return KServiceGroupFactory::self()->findGroupByDesktopPath(relPath, true);
}
KServiceGroup::Ptr
-KServiceGroup::childGroup(const QString &parent)
+KServiceGroup::childGroup(const TQString &parent)
{
return KServiceGroupFactory::self()->findGroupByDesktopPath("#parent#"+parent, true);
}
diff --git a/kio/kio/kservicegroup.h b/kio/kio/kservicegroup.h
index e9457b394..de26a3ffb 100644
--- a/kio/kio/kservicegroup.h
+++ b/kio/kio/kservicegroup.h
@@ -19,11 +19,11 @@
#ifndef __kservicegroup_h__
#define __kservicegroup_h__
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qshared.h>
-#include <qdatastream.h>
-#include <qvariant.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqshared.h>
+#include <tqdatastream.h>
+#include <tqvariant.h>
#include <kdesktopfile.h>
@@ -72,27 +72,27 @@ class KIO_EXPORT KServiceGroup : public KSycocaEntry
public:
typedef KSharedPtr<KServiceGroup> Ptr;
typedef KSharedPtr<KSycocaEntry> SPtr;
- typedef QValueList<SPtr> List;
+ typedef TQValueList<SPtr> List;
public:
/**
* Construct a dummy servicegroup indexed with @p name.
* @param name the name of the service group
* @since 3.1
*/
- KServiceGroup( const QString & name );
+ KServiceGroup( const TQString & name );
/**
* Construct a service and take all informations from a config file
* @param _fullpath full path to the config file
* @param _relpath relative path to the config file
*/
- KServiceGroup( const QString & _fullpath, const QString & _relpath );
+ KServiceGroup( const TQString & _fullpath, const TQString & _relpath );
/**
* @internal construct a service from a stream.
* The stream must already be positionned at the correct offset
*/
- KServiceGroup( QDataStream& _str, int offset, bool deep );
+ KServiceGroup( TQDataStream& _str, int offset, bool deep );
virtual ~KServiceGroup();
@@ -106,33 +106,33 @@ public:
* Name used for indexing.
* @return the service group's name
*/
- virtual QString name() const { return entryPath(); }
+ virtual TQString name() const { return entryPath(); }
/**
* Returns the relative path of the service group.
* @return the service group's relative path
*/
- virtual QString relPath() const { return entryPath(); }
+ virtual TQString relPath() const { return entryPath(); }
/**
* Returns the caption of this group.
* @return the caption of this group
*/
- QString caption() const { return m_strCaption; }
+ TQString caption() const { return m_strCaption; }
/**
* Returns the name of the icon associated with the group.
* @return the name of the icon associated with the group,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString icon() const { return m_strIcon; }
+ TQString icon() const { return m_strIcon; }
/**
* Returns the comment about this service group.
* @return the descriptive comment for the group, if there is one,
- * or QString::null if not set
+ * or TQString::null if not set
*/
- QString comment() const { return m_strComment; }
+ TQString comment() const { return m_strComment; }
/**
* Returns the total number of displayable services in this group and
@@ -192,30 +192,30 @@ public:
* "Arcade Game" since it's redundant in this particular context.
* @since 3.2
*/
- QStringList suppressGenericNames() const;
+ TQStringList suppressGenericNames() const;
/**
* @internal
* Sets information related to the layout of services in this group.
*/
- void setLayoutInfo(const QStringList &layout);
+ void setLayoutInfo(const TQStringList &layout);
/**
* @internal
* Returns information related to the layout of services in this group.
*/
- QStringList layoutInfo() const;
+ TQStringList layoutInfo() const;
/**
* @internal
* Load the service from a stream.
*/
- virtual void load( QDataStream& );
+ virtual void load( TQDataStream& );
/**
* @internal
* Save the service to a stream.
*/
- virtual void save( QDataStream& );
+ virtual void save( TQDataStream& );
/**
* List of all Services and ServiceGroups within this
@@ -248,21 +248,21 @@ public:
* in the .directory file.
* @return the base group name, or null if no base group
*/
- QString baseGroupName() const { return m_strBaseGroupName; }
+ TQString baseGroupName() const { return m_strBaseGroupName; }
/**
* Returns a path to the .directory file describing this service group.
* The path is either absolute or relative to the "apps" resource.
* @since 3.2
*/
- QString directoryEntryPath() const;
+ TQString directoryEntryPath() const;
/**
* Returns the group for the given baseGroupName.
* Can return 0L if the directory (or the .directory file) was deleted.
* @return the base group with the given name, or 0 if not available.
*/
- static Ptr baseGroup( const QString &baseGroupName );
+ static Ptr baseGroup( const TQString &baseGroupName );
/**
* Returns the root service group.
@@ -275,7 +275,7 @@ public:
* @param relPath the path of the service group
* @return the group with the given relative path name.
*/
- static Ptr group(const QString &relPath);
+ static Ptr group(const TQString &relPath);
/**
* Returns the group of services that have X-KDE-ParentApp equal
@@ -284,13 +284,13 @@ public:
* @return the services group
* @since 3.1
*/
- static Ptr childGroup(const QString &parent);
+ static Ptr childGroup(const TQString &parent);
/**
* This function parse attributes into menu
* @since 3.5
*/
- void parseAttribute( const QString &item , bool &showEmptyMenu, bool &showInline, bool &showInlineHeader, bool & showInlineAlias ,int &inlineValue );
+ void parseAttribute( const TQString &item , bool &showEmptyMenu, bool &showInline, bool &showInlineHeader, bool & showInlineAlias ,int &inlineValue );
protected:
/**
@@ -299,13 +299,13 @@ protected:
*/
void addEntry( KSycocaEntry *entry);
- QString m_strCaption;
- QString m_strIcon;
- QString m_strComment;
+ TQString m_strCaption;
+ TQString m_strIcon;
+ TQString m_strComment;
List m_serviceList;
bool m_bDeep;
- QString m_strBaseGroupName;
+ TQString m_strBaseGroupName;
int m_childCount;
protected:
virtual void virtual_hook( int id, void* data );
@@ -330,11 +330,11 @@ public:
bool isValid() const { return true; }
// Dummy
- virtual QString name() const { return "separator"; }
+ virtual TQString name() const { return "separator"; }
// Dummy
- virtual void load( QDataStream& ) { };
+ virtual void load( TQDataStream& ) { };
// Dummy
- virtual void save( QDataStream& ) { };
+ virtual void save( TQDataStream& ) { };
};
#endif
diff --git a/kio/kio/kservicegroupfactory.cpp b/kio/kio/kservicegroupfactory.cpp
index 105cf23d7..9bca4dc63 100644
--- a/kio/kio/kservicegroupfactory.cpp
+++ b/kio/kio/kservicegroupfactory.cpp
@@ -22,7 +22,7 @@
#include "ksycocadict.h"
#include "kservice.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kdebug.h>
@@ -66,7 +66,7 @@ KServiceGroupFactory * KServiceGroupFactory::self()
return _self;
}
-KServiceGroup * KServiceGroupFactory::findGroupByDesktopPath(const QString &_name, bool deep)
+KServiceGroup * KServiceGroupFactory::findGroupByDesktopPath(const TQString &_name, bool deep)
{
if (!m_sycocaDict) return 0; // Error!
@@ -89,7 +89,7 @@ KServiceGroup * KServiceGroupFactory::findGroupByDesktopPath(const QString &_nam
return newGroup;
}
-KServiceGroup * KServiceGroupFactory::findBaseGroup(const QString &_baseGroupName, bool deep)
+KServiceGroup * KServiceGroupFactory::findBaseGroup(const TQString &_baseGroupName, bool deep)
{
if (!m_baseGroupDict) return 0; // Error!
@@ -116,7 +116,7 @@ KServiceGroup* KServiceGroupFactory::createGroup(int offset, bool deep)
{
KServiceGroup * newEntry = 0L;
KSycocaType type;
- QDataStream *str = KSycoca::self()->findEntry(offset, type);
+ TQDataStream *str = KSycoca::self()->findEntry(offset, type);
switch(type)
{
case KST_KServiceGroup:
@@ -124,7 +124,7 @@ KServiceGroup* KServiceGroupFactory::createGroup(int offset, bool deep)
break;
default:
- kdError(7011) << QString("KServiceGroupFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
+ kdError(7011) << TQString("KServiceGroupFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
return 0;
}
if (!newEntry->isValid())
diff --git a/kio/kio/kservicegroupfactory.h b/kio/kio/kservicegroupfactory.h
index 429748857..b1131b398 100644
--- a/kio/kio/kservicegroupfactory.h
+++ b/kio/kio/kservicegroupfactory.h
@@ -19,7 +19,7 @@
#ifndef __kservicegroupfactory_h__
#define __kservicegroupfactory_h__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "kservicegroup.h"
#include "ksycocafactory.h"
@@ -46,18 +46,18 @@ public:
/**
* Construct a KServiceGroup from a config file.
*/
- virtual KSycocaEntry *createEntry(const QString &, const char *)
+ virtual KSycocaEntry *createEntry(const TQString &, const char *)
{ assert(0); return 0; }
/**
* Find a group ( by desktop path, e.g. "Applications/Editors")
*/
- KServiceGroup * findGroupByDesktopPath( const QString &_name, bool deep = true );
+ KServiceGroup * findGroupByDesktopPath( const TQString &_name, bool deep = true );
/**
* Find a base group by name, e.g. "settings"
*/
- KServiceGroup * findBaseGroup( const QString &_baseGroupName, bool deep = true );
+ KServiceGroup * findBaseGroup( const TQString &_baseGroupName, bool deep = true );
/**
* @return the unique service group factory, creating it if necessary
diff --git a/kio/kio/kservicetype.cpp b/kio/kio/kservicetype.cpp
index 1e0067661..48693aceb 100644
--- a/kio/kio/kservicetype.cpp
+++ b/kio/kio/kservicetype.cpp
@@ -27,8 +27,8 @@
#include <kdebug.h>
#include <kdesktopfile.h>
-template QDataStream& operator>> <QString, QVariant>(QDataStream&, QMap<QString, QVariant>&);
-template QDataStream& operator<< <QString, QVariant>(QDataStream&, const QMap<QString, QVariant>&);
+template TQDataStream& operator>> <TQString, TQVariant>(TQDataStream&, TQMap<TQString, TQVariant>&);
+template TQDataStream& operator<< <TQString, TQVariant>(TQDataStream&, const TQMap<TQString, TQVariant>&);
class KServiceType::KServiceTypePrivate
{
@@ -40,7 +40,7 @@ public:
bool parentTypeLoaded;
};
-KServiceType::KServiceType( const QString & _fullpath)
+KServiceType::KServiceType( const TQString & _fullpath)
: KSycocaEntry(_fullpath), d(0)
{
KDesktopFile config( _fullpath );
@@ -72,21 +72,21 @@ KServiceType::init( KDesktopFile *config)
// We store this as property to preserve BC, we can't change that
// because KSycoca needs to remain BC between KDE 2.x and KDE 3.x
- QString sDerived = config->readEntry( "X-KDE-Derived" );
+ TQString sDerived = config->readEntry( "X-KDE-Derived" );
m_bDerived = !sDerived.isEmpty();
if ( m_bDerived )
m_mapProps.insert( "X-KDE-Derived", sDerived );
- QStringList tmpList = config->groupList();
- QStringList::Iterator gIt = tmpList.begin();
+ TQStringList tmpList = config->groupList();
+ TQStringList::Iterator gIt = tmpList.begin();
for( ; gIt != tmpList.end(); ++gIt )
{
if ( (*gIt).find( "Property::" ) == 0 )
{
config->setGroup( *gIt );
- QVariant v = config->readPropertyEntry( "Value",
- QVariant::nameToType( config->readEntry( "Type" ).ascii() ) );
+ TQVariant v = config->readPropertyEntry( "Value",
+ TQVariant::nameToType( config->readEntry( "Type" ).ascii() ) );
if ( v.isValid() )
m_mapProps.insert( (*gIt).mid( 10 ), v );
}
@@ -99,15 +99,15 @@ KServiceType::init( KDesktopFile *config)
{
config->setGroup( *gIt );
m_mapPropDefs.insert( (*gIt).mid( 13 ),
- QVariant::nameToType( config->readEntry( "Type" ).ascii() ) );
+ TQVariant::nameToType( config->readEntry( "Type" ).ascii() ) );
}
}
m_bValid = !m_strName.isEmpty();
}
-KServiceType::KServiceType( const QString & _fullpath, const QString& _type,
- const QString& _icon, const QString& _comment )
+KServiceType::KServiceType( const TQString & _fullpath, const TQString& _type,
+ const TQString& _icon, const TQString& _comment )
: KSycocaEntry(_fullpath), d(0)
{
m_strName = _type;
@@ -116,14 +116,14 @@ KServiceType::KServiceType( const QString & _fullpath, const QString& _type,
m_bValid = !m_strName.isEmpty();
}
-KServiceType::KServiceType( QDataStream& _str, int offset )
+KServiceType::KServiceType( TQDataStream& _str, int offset )
: KSycocaEntry( _str, offset ), d(0)
{
load( _str);
}
void
-KServiceType::load( QDataStream& _str )
+KServiceType::load( TQDataStream& _str )
{
Q_INT8 b;
_str >> m_strName >> m_strIcon >> m_strComment >> m_mapProps >> m_mapPropDefs
@@ -133,7 +133,7 @@ KServiceType::load( QDataStream& _str )
}
void
-KServiceType::save( QDataStream& _str )
+KServiceType::save( TQDataStream& _str )
{
KSycocaEntry::save( _str );
// !! This data structure should remain binary compatible at all times !!
@@ -148,17 +148,17 @@ KServiceType::~KServiceType()
delete d;
}
-QString KServiceType::parentServiceType() const
+TQString KServiceType::parentServiceType() const
{
- QVariant v = property("X-KDE-Derived");
+ TQVariant v = property("X-KDE-Derived");
return v.toString();
}
-bool KServiceType::inherits( const QString& servTypeName ) const
+bool KServiceType::inherits( const TQString& servTypeName ) const
{
if ( name() == servTypeName )
return true;
- QString st = parentServiceType();
+ TQString st = parentServiceType();
while ( !st.isEmpty() )
{
KServiceType::Ptr ptr = KServiceType::serviceType( st );
@@ -171,18 +171,18 @@ bool KServiceType::inherits( const QString& servTypeName ) const
}
QVariant
-KServiceType::property( const QString& _name ) const
+KServiceType::property( const TQString& _name ) const
{
- QVariant v;
+ TQVariant v;
if ( _name == "Name" )
- v = QVariant( m_strName );
+ v = TQVariant( m_strName );
else if ( _name == "Icon" )
- v = QVariant( m_strIcon );
+ v = TQVariant( m_strIcon );
else if ( _name == "Comment" )
- v = QVariant( m_strComment );
+ v = TQVariant( m_strComment );
else {
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.find( _name );
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( _name );
if ( it != m_mapProps.end() )
v = it.data();
}
@@ -193,9 +193,9 @@ KServiceType::property( const QString& _name ) const
QStringList
KServiceType::propertyNames() const
{
- QStringList res;
+ TQStringList res;
- QMap<QString,QVariant>::ConstIterator it = m_mapProps.begin();
+ TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.begin();
for( ; it != m_mapProps.end(); ++it )
res.append( it.key() );
@@ -206,36 +206,36 @@ KServiceType::propertyNames() const
return res;
}
-QVariant::Type
-KServiceType::propertyDef( const QString& _name ) const
+TQVariant::Type
+KServiceType::propertyDef( const TQString& _name ) const
{
- QMap<QString,QVariant::Type>::ConstIterator it = m_mapPropDefs.find( _name );
+ TQMap<TQString,TQVariant::Type>::ConstIterator it = m_mapPropDefs.find( _name );
if ( it == m_mapPropDefs.end() )
- return QVariant::Invalid;
+ return TQVariant::Invalid;
return it.data();
}
QStringList
KServiceType::propertyDefNames() const
{
- QStringList l;
+ TQStringList l;
- QMap<QString,QVariant::Type>::ConstIterator it = m_mapPropDefs.begin();
+ TQMap<TQString,TQVariant::Type>::ConstIterator it = m_mapPropDefs.begin();
for( ; it != m_mapPropDefs.end(); ++it )
l.append( it.key() );
return l;
}
-KServiceType::Ptr KServiceType::serviceType( const QString& _name )
+KServiceType::Ptr KServiceType::serviceType( const TQString& _name )
{
KServiceType * p = KServiceTypeFactory::self()->findServiceTypeByName( _name );
return KServiceType::Ptr( p );
}
-static void addUnique(KService::List &lst, QDict<KService> &dict, const KService::List &newLst, bool lowPrio)
+static void addUnique(KService::List &lst, TQDict<KService> &dict, const KService::List &newLst, bool lowPrio)
{
- QValueListConstIterator<KService::Ptr> it = newLst.begin();
+ TQValueListConstIterator<KService::Ptr> it = newLst.begin();
for( ; it != newLst.end(); ++it )
{
KService *service = static_cast<KService*>(*it);
@@ -248,9 +248,9 @@ static void addUnique(KService::List &lst, QDict<KService> &dict, const KService
}
}
-KService::List KServiceType::offers( const QString& _servicetype )
+KService::List KServiceType::offers( const TQString& _servicetype )
{
- QDict<KService> dict(53);
+ TQDict<KService> dict(53);
KService::List lst;
// Services associated directly with this servicetype (the normal case)
@@ -267,7 +267,7 @@ KService::List KServiceType::offers( const QString& _servicetype )
{
while(true)
{
- QString parent = mime->parentMimeType();
+ TQString parent = mime->parentMimeType();
if (parent.isEmpty())
break;
mime = dynamic_cast<KMimeType *>(KServiceTypeFactory::self()->findServiceTypeByName( parent ));
@@ -279,7 +279,7 @@ KService::List KServiceType::offers( const QString& _servicetype )
}
serv = mime = 0;
- //QValueListIterator<KService::Ptr> it = lst.begin();
+ //TQValueListIterator<KService::Ptr> it = lst.begin();
//for( ; it != lst.end(); ++it )
// kdDebug() << (*it).data() << " " << (*it)->name() << endl;
@@ -330,7 +330,7 @@ KServiceType::Ptr KServiceType::parentType()
if (!d)
d = new KServiceTypePrivate;
- QString parentSt = parentServiceType();
+ TQString parentSt = parentServiceType();
if (!parentSt.isEmpty())
{
d->parentType = KServiceTypeFactory::self()->findServiceTypeByName( parentSt );
diff --git a/kio/kio/kservicetype.h b/kio/kio/kservicetype.h
index 368b9c540..27624e50b 100644
--- a/kio/kio/kservicetype.h
+++ b/kio/kio/kservicetype.h
@@ -24,13 +24,13 @@
#include "ksycocaentry.h"
#include "kservice.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qshared.h>
-#include <qdatastream.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqshared.h>
+#include <tqdatastream.h>
+#include <tqvariant.h>
#include <ksimpleconfig.h>
@@ -48,7 +48,7 @@ class KIO_EXPORT KServiceType : public KSycocaEntry
public:
typedef KSharedPtr<KServiceType> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public:
/**
@@ -59,15 +59,15 @@ public:
* @param _icon the icon name of the service type (can be null)
* @param _comment a comment (can be null)
*/
- KServiceType( const QString & _fullpath, const QString& _name,
- const QString& _icon, const QString& _comment);
+ KServiceType( const TQString & _fullpath, const TQString& _name,
+ const TQString& _icon, const TQString& _comment);
/**
* Construct a service type and take all informations from a config file.
* @param _fullpath path of the desktop file, set to "" if calling from
* a inherited constructor.
*/
- KServiceType( const QString & _fullpath );
+ KServiceType( const TQString & _fullpath );
/**
* Construct a service type and take all informations from a deskop file.
@@ -79,7 +79,7 @@ public:
* @internal construct a service from a stream.
* The stream must already be positionned at the correct offset
*/
- KServiceType( QDataStream& _str, int offset );
+ KServiceType( TQDataStream& _str, int offset );
virtual ~KServiceType();
@@ -89,21 +89,21 @@ public:
* example an URL and returns a special icon for this
* URL. An example is KMimeType, KFolderType and
* others.
- * @return the name of the icon, can be QString::null.
+ * @return the name of the icon, can be TQString::null.
*/
- QString icon() const { return m_strIcon; }
+ TQString icon() const { return m_strIcon; }
/**
* Returns the descriptive comment associated, if any.
- * @return the comment, or QString::null
+ * @return the comment, or TQString::null
*/
- QString comment() const { return m_strComment; }
+ TQString comment() const { return m_strComment; }
/**
* Returns the name of this service type.
* @return the name of the service type
*/
- QString name() const { return m_strName; }
+ TQString name() const { return m_strName; }
/**
* Returns the relative path to the desktop entry file responsible for
@@ -111,7 +111,7 @@ public:
* For instance inode/directory.desktop, or kpart.desktop
* @return the path of the desktop file
*/
- QString desktopEntryPath() const { return entryPath(); }
+ TQString desktopEntryPath() const { return entryPath(); }
/**
* Checks whether this service type inherits another one.
@@ -123,17 +123,17 @@ public:
/**
* If this service type inherits from another service type,
* return the name of the parent.
- * @return the parent service type, or QString:: null if not set
+ * @return the parent service type, or TQString:: null if not set
* @see isDerived()
*/
- QString parentServiceType() const;
+ TQString parentServiceType() const;
/**
* Checks whether this service type is or inherits from @p servTypeName.
* @return true if this servicetype is or inherits from @p servTypeName
* @since 3.1
*/
- bool inherits( const QString& servTypeName ) const;
+ bool inherits( const TQString& servTypeName ) const;
/**
* Returns the requested property. Some often used properties
@@ -143,13 +143,13 @@ public:
* @param _name the name of the property
* @return the property, or invalid if not found
*/
- virtual QVariant property( const QString& _name ) const;
+ virtual TQVariant property( const TQString& _name ) const;
/**
* Returns the list of all properties of this service type.
* @return the list of properties
*/
- virtual QStringList propertyNames() const;
+ virtual TQStringList propertyNames() const;
/**
* Checks whether the service type is valid.
@@ -163,22 +163,22 @@ public:
* @param _name the name of the property
* @return the property type, or null if not found
*/
- virtual QVariant::Type propertyDef( const QString& _name ) const;
+ virtual TQVariant::Type propertyDef( const TQString& _name ) const;
- virtual QStringList propertyDefNames() const;
- virtual const QMap<QString,QVariant::Type>& propertyDefs() const { return m_mapPropDefs; }
+ virtual TQStringList propertyDefNames() const;
+ virtual const TQMap<TQString,TQVariant::Type>& propertyDefs() const { return m_mapPropDefs; }
/**
* @internal
* Save ourselves to the data stream.
*/
- virtual void save( QDataStream& );
+ virtual void save( TQDataStream& );
/**
* @internal
* Load ourselves from the data stream.
*/
- virtual void load( QDataStream& );
+ virtual void load( TQDataStream& );
/**
* @internal
@@ -204,7 +204,7 @@ public:
* @param _name the name of the service type to search
* @return the pointer to the service type, or 0
*/
- static Ptr serviceType( const QString& _name );
+ static Ptr serviceType( const TQString& _name );
/**
* Returns all services supporting the given servicetype name.
@@ -214,7 +214,7 @@ public:
* @param _servicetype the name of the service type to search
* @return the list of all services of the given type
*/
- static KService::List offers( const QString& _servicetype );
+ static KService::List offers( const TQString& _servicetype );
/**
* Returns a list of all the supported servicetypes. Useful for
@@ -230,11 +230,11 @@ protected:
void init( KDesktopFile *config );
protected:
- QString m_strName;
- QString m_strIcon;
- QString m_strComment;
- QMap<QString,QVariant> m_mapProps;
- QMap<QString,QVariant::Type> m_mapPropDefs;
+ TQString m_strName;
+ TQString m_strIcon;
+ TQString m_strComment;
+ TQMap<TQString,TQVariant> m_mapProps;
+ TQMap<TQString,TQVariant::Type> m_mapPropDefs;
bool m_bValid:1;
bool m_bDerived:1;
@@ -245,7 +245,7 @@ private:
KServiceTypePrivate* d;
};
-//QDataStream& operator>>( QDataStream& _str, KServiceType& s );
-//QDataStream& operator<<( QDataStream& _str, KServiceType& s );
+//TQDataStream& operator>>( TQDataStream& _str, KServiceType& s );
+//TQDataStream& operator<<( TQDataStream& _str, KServiceType& s );
#endif
diff --git a/kio/kio/kservicetypefactory.cpp b/kio/kio/kservicetypefactory.cpp
index bfe3121ca..8287bca44 100644
--- a/kio/kio/kservicetypefactory.cpp
+++ b/kio/kio/kservicetypefactory.cpp
@@ -28,7 +28,7 @@
#include <kdebug.h>
#include <assert.h>
#include <kstringhandler.h>
-#include <qfile.h>
+#include <tqfile.h>
KServiceTypeFactory::KServiceTypeFactory()
: KSycocaFactory( KST_KServiceTypeFactory )
@@ -52,7 +52,7 @@ KServiceTypeFactory::KServiceTypeFactory()
}
else
{
- QString str;
+ TQString str;
for(;n;n--)
{
KSycocaEntry::read(*m_str, str);
@@ -77,7 +77,7 @@ KServiceTypeFactory * KServiceTypeFactory::self()
return _self;
}
-KServiceType * KServiceTypeFactory::findServiceTypeByName(const QString &_name)
+KServiceType * KServiceTypeFactory::findServiceTypeByName(const TQString &_name)
{
if (!m_sycocaDict) return 0L; // Error!
assert (!KSycoca::self()->isBuilding());
@@ -95,28 +95,28 @@ KServiceType * KServiceTypeFactory::findServiceTypeByName(const QString &_name)
return newServiceType;
}
-QVariant::Type KServiceTypeFactory::findPropertyTypeByName(const QString &_name)
+TQVariant::Type KServiceTypeFactory::findPropertyTypeByName(const TQString &_name)
{
if (!m_sycocaDict)
- return QVariant::Invalid; // Error!
+ return TQVariant::Invalid; // Error!
assert (!KSycoca::self()->isBuilding());
- QMapConstIterator<QString,int> it = m_propertyTypeDict.find(_name);
+ TQMapConstIterator<TQString,int> it = m_propertyTypeDict.find(_name);
if (it != m_propertyTypeDict.end()) {
- return (QVariant::Type)it.data();
+ return (TQVariant::Type)it.data();
}
- return QVariant::Invalid;
+ return TQVariant::Invalid;
}
-KMimeType * KServiceTypeFactory::findFromPattern(const QString &_filename, QString *match)
+KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQString *match)
{
// Assume we're NOT building a database
if (!m_str) return 0;
// Get stream to the header
- QDataStream *str = m_str;
+ TQDataStream *str = m_str;
str->device()->at( m_fastPatternOffset );
@@ -138,10 +138,10 @@ KMimeType * KServiceTypeFactory::findFromPattern(const QString &_filename, QStri
int ext_len = _filename.length() - lastDot - 1;
if (lastDot != -1 && ext_len <= 4) // if no '.', skip the extension lookup
{
- QString extension = _filename.right( ext_len );
+ TQString extension = _filename.right( ext_len );
extension = extension.leftJustify(4);
- QString pattern;
+ TQString pattern;
while (left <= right) {
middle = (left + right) / 2;
// read pattern at position "middle"
@@ -168,7 +168,7 @@ KMimeType * KServiceTypeFactory::findFromPattern(const QString &_filename, QStri
if ( m_patterns.isEmpty() ) {
str->device()->at( m_otherPatternOffset );
- QString pattern;
+ TQString pattern;
Q_INT32 mimetypeOffset;
while (true)
@@ -184,9 +184,9 @@ KMimeType * KServiceTypeFactory::findFromPattern(const QString &_filename, QStri
assert( m_patterns.size() == m_pattern_offsets.size() );
- QStringList::const_iterator it = m_patterns.begin();
- QStringList::const_iterator end = m_patterns.end();
- QValueVector<Q_INT32>::const_iterator it_offset = m_pattern_offsets.begin();
+ TQStringList::const_iterator it = m_patterns.begin();
+ TQStringList::const_iterator end = m_patterns.end();
+ TQValueVector<Q_INT32>::const_iterator it_offset = m_pattern_offsets.begin();
for ( ; it != end; ++it, ++it_offset )
{
@@ -247,7 +247,7 @@ KServiceType::List KServiceTypeFactory::allServiceTypes()
bool KServiceTypeFactory::checkMimeTypes()
{
- QDataStream *str = KSycoca::self()->findFactory( factoryId() );
+ TQDataStream *str = KSycoca::self()->findFactory( factoryId() );
if (!str) return false;
// check if there are mimetypes/servicetypes
@@ -258,7 +258,7 @@ KServiceType * KServiceTypeFactory::createEntry(int offset)
{
KServiceType *newEntry = 0;
KSycocaType type;
- QDataStream *str = KSycoca::self()->findEntry(offset, type);
+ TQDataStream *str = KSycoca::self()->findEntry(offset, type);
if (!str) return 0;
switch(type)
@@ -280,7 +280,7 @@ KServiceType * KServiceTypeFactory::createEntry(int offset)
break;
default:
- kdError(7011) << QString("KServiceTypeFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
+ kdError(7011) << TQString("KServiceTypeFactory: unexpected object entry in KSycoca database (type = %1)").arg((int)type) << endl;
break;
}
if (newEntry && !newEntry->isValid())
diff --git a/kio/kio/kservicetypefactory.h b/kio/kio/kservicetypefactory.h
index 7c5fdf96e..db64aa115 100644
--- a/kio/kio/kservicetypefactory.h
+++ b/kio/kio/kservicetypefactory.h
@@ -22,8 +22,8 @@
#include <assert.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
#include "ksycocafactory.h"
#include "kmimetype.h"
@@ -56,26 +56,26 @@ public:
/**
* Not meant to be called at this level
*/
- virtual KSycocaEntry *createEntry(const QString &, const char *)
+ virtual KSycocaEntry *createEntry(const TQString &, const char *)
{ assert(0); return 0; }
/**
* Find a service type in the database file (allocates it)
* Overloaded by KBuildServiceTypeFactory to return a memory one.
*/
- virtual KServiceType * findServiceTypeByName(const QString &_name);
+ virtual KServiceType * findServiceTypeByName(const TQString &_name);
/**
* Find a the property type of a named property.
*/
- QVariant::Type findPropertyTypeByName(const QString &_name);
+ TQVariant::Type findPropertyTypeByName(const TQString &_name);
/**
* Find a mimetype from a filename (using the pattern list)
* @param _filename filename to check.
* @param match if provided, returns the pattern that matched.
*/
- KMimeType * findFromPattern(const QString &_filename, QString *match = 0);
+ KMimeType * findFromPattern(const TQString &_filename, TQString *match = 0);
/**
* @return all mimetypes
@@ -109,11 +109,11 @@ private:
protected:
int m_fastPatternOffset;
int m_otherPatternOffset;
- QMap<QString,int> m_propertyTypeDict;
+ TQMap<TQString,int> m_propertyTypeDict;
private:
- QStringList m_patterns;
- QValueVector<Q_INT32> m_pattern_offsets;
+ TQStringList m_patterns;
+ TQValueVector<Q_INT32> m_pattern_offsets;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/kshellcompletion.cpp b/kio/kio/kshellcompletion.cpp
index 321eebabf..2fb67a31f 100644
--- a/kio/kio/kshellcompletion.cpp
+++ b/kio/kio/kshellcompletion.cpp
@@ -19,9 +19,9 @@
#include <stdlib.h>
#include <kdebug.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kcompletion.h>
#include "kshellcompletion.h"
@@ -43,7 +43,7 @@ KShellCompletion::KShellCompletion() : KURLCompletion()
*
* Entry point for file name completion
*/
-QString KShellCompletion::makeCompletion(const QString &text)
+TQString KShellCompletion::makeCompletion(const TQString &text)
{
// Split text at the last unquoted space
//
@@ -51,7 +51,7 @@ QString KShellCompletion::makeCompletion(const QString &text)
// Remove quotes from the text to be completed
//
- QString tmp = unquote(m_text_compl);
+ TQString tmp = unquote(m_text_compl);
m_text_compl = tmp;
// Do exe-completion if there was no unquoted space
@@ -82,7 +82,7 @@ QString KShellCompletion::makeCompletion(const QString &text)
* Add add the part of the text that was not completed
* Add quotes when needed
*/
-void KShellCompletion::postProcessMatch( QString *match ) const
+void KShellCompletion::postProcessMatch( TQString *match ) const
{
//kDebugInfo("KShellCompletion::postProcessMatch() in: '%s'",
// match->latin1());
@@ -92,7 +92,7 @@ void KShellCompletion::postProcessMatch( QString *match ) const
if ( match->isNull() )
return;
- if ( match->right(1) == QChar('/') )
+ if ( match->right(1) == TQChar('/') )
quoteText( match, false, true ); // don't quote the trailing '/'
else
quoteText( match, false, false ); // quote the whole text
@@ -103,15 +103,15 @@ void KShellCompletion::postProcessMatch( QString *match ) const
// match->latin1());
}
-void KShellCompletion::postProcessMatches( QStringList *matches ) const
+void KShellCompletion::postProcessMatches( TQStringList *matches ) const
{
KURLCompletion::postProcessMatches( matches );
- for ( QStringList::Iterator it = matches->begin();
+ for ( TQStringList::Iterator it = matches->begin();
it != matches->end(); it++ )
{
if ( !(*it).isNull() ) {
- if ( (*it).right(1) == QChar('/') )
+ if ( (*it).right(1) == TQChar('/') )
quoteText( &(*it), false, true ); // don't quote trailing '/'
else
quoteText( &(*it), false, false ); // quote the whole text
@@ -129,7 +129,7 @@ void KShellCompletion::postProcessMatches( KCompletionMatches *matches ) const
it != matches->end(); it++ )
{
if ( !(*it).value().isNull() ) {
- if ( (*it).value().right(1) == QChar('/') )
+ if ( (*it).value().right(1) == TQChar('/') )
quoteText( &(*it).value(), false, true ); // don't quote trailing '/'
else
quoteText( &(*it).value(), false, false ); // quote the whole text
@@ -147,12 +147,12 @@ void KShellCompletion::postProcessMatches( KCompletionMatches *matches ) const
* text_start = [out] text at the left, including the space
* text_compl = [out] text at the right
*/
-void KShellCompletion::splitText(const QString &text, QString &text_start,
- QString &text_compl) const
+void KShellCompletion::splitText(const TQString &text, TQString &text_start,
+ TQString &text_compl) const
{
bool in_quote = false;
bool escaped = false;
- QChar p_last_quote_char;
+ TQChar p_last_quote_char;
int last_unquoted_space = -1;
int end_space_len = 0;
@@ -212,7 +212,7 @@ void KShellCompletion::splitText(const QString &text, QString &text_start,
*
* skip_last => ignore the last charachter (we add a space or '/' to all filenames)
*/
-bool KShellCompletion::quoteText(QString *text, bool force, bool skip_last) const
+bool KShellCompletion::quoteText(TQString *text, bool force, bool skip_last) const
{
int pos = 0;
@@ -240,11 +240,11 @@ bool KShellCompletion::quoteText(QString *text, bool force, bool skip_last) cons
// Escape \ in the string
text->replace( m_escape_char,
- QString( m_escape_char ) + m_escape_char );
+ TQString( m_escape_char ) + m_escape_char );
// Escape " in the string
text->replace( m_quote_char1,
- QString( m_escape_char ) + m_quote_char1 );
+ TQString( m_escape_char ) + m_quote_char1 );
// " at the beginning
text->insert( 0, m_quote_char1 );
@@ -267,12 +267,12 @@ bool KShellCompletion::quoteText(QString *text, bool force, bool skip_last) cons
* Remove quotes and return the result in a new string
*
*/
-QString KShellCompletion::unquote(const QString &text) const
+TQString KShellCompletion::unquote(const TQString &text) const
{
bool in_quote = false;
bool escaped = false;
- QChar p_last_quote_char;
- QString result;
+ TQChar p_last_quote_char;
+ TQString result;
for (uint pos = 0; pos < text.length(); pos++) {
diff --git a/kio/kio/kshellcompletion.h b/kio/kio/kshellcompletion.h
index 797f275ac..acfa638cf 100644
--- a/kio/kio/kshellcompletion.h
+++ b/kio/kio/kshellcompletion.h
@@ -20,8 +20,8 @@
#ifndef KSHELLCOMPLETION_H
#define KSHELLCOMPLETION_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kurlcompletion.h"
@@ -51,30 +51,30 @@ public:
* Finds completions to the given text.
* The first match is returned and emitted in the signal match().
* @param text the text to complete
- * @return the first match, or QString::null if not found
+ * @return the first match, or TQString::null if not found
*/
- QString makeCompletion(const QString &text);
+ TQString makeCompletion(const TQString &text);
protected:
// Called by KCompletion
- void postProcessMatch( QString *match ) const;
- void postProcessMatches( QStringList *matches ) const;
+ void postProcessMatch( TQString *match ) const;
+ void postProcessMatches( TQStringList *matches ) const;
void postProcessMatches( KCompletionMatches *matches ) const;
private:
// Find the part of text that should be completed
- void splitText(const QString &text, QString &text_start, QString &text_compl) const;
+ void splitText(const TQString &text, TQString &text_start, TQString &text_compl) const;
// Insert quotes and neseccary escapes
- bool quoteText(QString *text, bool force, bool skip_last) const;
- QString unquote(const QString &text) const;
+ bool quoteText(TQString *text, bool force, bool skip_last) const;
+ TQString unquote(const TQString &text) const;
- QString m_text_start; // part of the text that was not completed
- QString m_text_compl; // part of the text that was completed (unchanged)
+ TQString m_text_start; // part of the text that was not completed
+ TQString m_text_compl; // part of the text that was completed (unchanged)
- QChar m_word_break_char;
- QChar m_quote_char1;
- QChar m_quote_char2;
- QChar m_escape_char;
+ TQChar m_word_break_char;
+ TQChar m_quote_char1;
+ TQChar m_quote_char2;
+ TQChar m_escape_char;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/kshred.cpp b/kio/kio/kshred.cpp
index a4ac54b89..f3997bf58 100644
--- a/kio/kio/kshred.cpp
+++ b/kio/kio/kshred.cpp
@@ -27,8 +27,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdlib.h>
#include <kapplication.h>
-// antlarr: KDE 4: Make it const QString &
-KShred::KShred(QString fileName)
+// antlarr: KDE 4: Make it const TQString &
+KShred::KShred(TQString fileName)
{
if (fileName.isEmpty())
{
@@ -37,7 +37,7 @@ KShred::KShred(QString fileName)
}
else
{
- file = new QFile();
+ file = new TQFile();
file->setName(fileName);
if (!file->open(IO_ReadWrite))
{
@@ -144,9 +144,9 @@ KShred::fillrandom()
}
-// antlarr: KDE 4: Make it const QString &
+// antlarr: KDE 4: Make it const TQString &
bool
-KShred::shred(QString fileName)
+KShred::shred(TQString fileName)
{
if (fileName.isEmpty())
return false;
@@ -209,7 +209,7 @@ KShred::shred()
unsigned char p[6][3] = {{'\222', '\111', '\044'}, {'\111', '\044', '\222'},
{'\044', '\222', '\111'}, {'\155', '\266', '\333'},
{'\266', '\333', '\155'}, {'\333', '\155', '\266'}};
- QString msg = i18n("Shredding: pass %1 of 35");
+ TQString msg = i18n("Shredding: pass %1 of 35");
emit processedSize(0);
diff --git a/kio/kio/kshred.h b/kio/kio/kshred.h
index 320216998..c38c610ed 100644
--- a/kio/kio/kshred.h
+++ b/kio/kio/kshred.h
@@ -27,9 +27,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqobject.h>
#include <kio/global.h>
@@ -42,7 +42,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* @author Andreas F. Pour <bugs@mieterra.com>
* @author David Faure <faure@kde.org> (integration into KDE and progress signal)
*/
-class KIO_EXPORT_DEPRECATED KShred : public QObject { // KDE4: remove
+class KIO_EXPORT_DEPRECATED KShred : public TQObject { // KDE4: remove
Q_OBJECT
@@ -52,7 +52,7 @@ class KIO_EXPORT_DEPRECATED KShred : public QObject { // KDE4: remove
* Initialize the class using the name of the file to 'shred'.
* @param fileName fully qualified name of the file to shred.
*/
- KShred(QString fileName);
+ KShred(TQString fileName);
/*
* Destructor for the class.
@@ -105,7 +105,7 @@ class KIO_EXPORT_DEPRECATED KShred : public QObject { // KDE4: remove
* No need to create an instance of the class.
* @param fileName fully qualified name of the file to shred.
*/
- static bool shred(QString fileName);
+ static bool shred(TQString fileName);
signals:
/**
@@ -118,7 +118,7 @@ class KIO_EXPORT_DEPRECATED KShred : public QObject { // KDE4: remove
* Shows a message in the progress dialog
* @param message the message to display
*/
- void infoMessage(const QString & message);
+ void infoMessage(const TQString & message);
private:
/**
@@ -134,7 +134,7 @@ class KIO_EXPORT_DEPRECATED KShred : public QObject { // KDE4: remove
/**
* @internal structure for the file information
*/
- QFile *file;
+ TQFile *file;
/**
* @internal for the size of the file
diff --git a/kio/kio/ktar.cpp b/kio/kio/ktar.cpp
index 52c10c0b1..cf4bade20 100644
--- a/kio/kio/ktar.cpp
+++ b/kio/kio/ktar.cpp
@@ -25,9 +25,9 @@
#include <pwd.h>*/
#include <assert.h>
-#include <qcstring.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kmimetype.h>
#include <ktempfile.h>
@@ -46,26 +46,26 @@ class KTar::KTarPrivate
{
public:
KTarPrivate() : tarEnd( 0 ), tmpFile( 0 ) {}
- QStringList dirList;
+ TQStringList dirList;
int tarEnd;
KTempFile* tmpFile;
- QString mimetype;
- QCString origFileName;
+ TQString mimetype;
+ TQCString origFileName;
- bool fillTempFile(const QString & filename);
- bool writeBackTempFile( const QString & filename );
+ bool fillTempFile(const TQString & filename);
+ bool writeBackTempFile( const TQString & filename );
};
-KTar::KTar( const QString& filename, const QString & _mimetype )
+KTar::KTar( const TQString& filename, const TQString & _mimetype )
: KArchive( 0 )
{
m_filename = filename;
d = new KTarPrivate;
- QString mimetype( _mimetype );
+ TQString mimetype( _mimetype );
bool forced = true;
if ( mimetype.isEmpty() ) // Find out mimetype manually
{
- if ( QFile::exists( filename ) )
+ if ( TQFile::exists( filename ) )
mimetype = KMimeType::findByFileContent( filename )->name();
else
mimetype = KMimeType::findByPath( filename, 0, true )->name();
@@ -85,7 +85,7 @@ KTar::KTar( const QString& filename, const QString & _mimetype )
else
{
// Something else. Check if it's not really gzip though (e.g. for KOffice docs)
- QFile file( filename );
+ TQFile file( filename );
if ( file.open( IO_ReadOnly ) )
{
unsigned char firstByte = file.getch();
@@ -111,11 +111,11 @@ KTar::KTar( const QString& filename, const QString & _mimetype )
prepareDevice( filename, mimetype, forced );
}
-void KTar::prepareDevice( const QString & filename,
- const QString & mimetype, bool /*forced*/ )
+void KTar::prepareDevice( const TQString & filename,
+ const TQString & mimetype, bool /*forced*/ )
{
if( "application/x-tar" == mimetype )
- setDevice( new QFile( filename ) );
+ setDevice( new TQFile( filename ) );
else
{
// The compression filters are very slow with random access.
@@ -133,13 +133,13 @@ void KTar::prepareDevice( const QString & filename,
// KTempFile opens the file automatically,
// the device must be closed, however, for KArchive.setDevice()
- QFile* file = d->tmpFile->file();
+ TQFile* file = d->tmpFile->file();
file->close();
setDevice(file);
}
}
-KTar::KTar( QIODevice * dev )
+KTar::KTar( TQIODevice * dev )
: KArchive( dev )
{
Q_ASSERT( dev );
@@ -161,7 +161,7 @@ KTar::~KTar()
delete d;
}
-void KTar::setOrigFileName( const QCString & fileName )
+void KTar::setOrigFileName( const TQCString & fileName )
{
if ( !isOpened() || !(mode() & IO_WriteOnly) )
{
@@ -178,7 +178,7 @@ Q_LONG KTar::readRawHeader(char *buffer) {
// Make sure this is actually a tar header
if (strncmp(buffer + 257, "ustar", 5)) {
// The magic isn't there (broken/old tars), but maybe a correct checksum?
- QCString s;
+ TQCString s;
int check = 0;
for( uint j = 0; j < 0x200; ++j )
@@ -197,7 +197,7 @@ Q_LONG KTar::readRawHeader(char *buffer) {
if( strncmp( buffer + 148 + 6 - s.length(), s.data(), s.length() )
&& strncmp( buffer + 148 + 7 - s.length(), s.data(), s.length() )
&& strncmp( buffer + 148 + 8 - s.length(), s.data(), s.length() ) ) {
- kdWarning(7041) << "KTar: invalid TAR file. Header is: " << QCString( buffer+257, 5 ) << endl;
+ kdWarning(7041) << "KTar: invalid TAR file. Header is: " << TQCString( buffer+257, 5 ) << endl;
return -1;
}
}/*end if*/
@@ -208,9 +208,9 @@ Q_LONG KTar::readRawHeader(char *buffer) {
return n;
}
-bool KTar::readLonglink(char *buffer,QCString &longlink) {
+bool KTar::readLonglink(char *buffer,TQCString &longlink) {
Q_LONG n = 0;
- QIODevice *dev = device();
+ TQIODevice *dev = device();
// read size of longlink from size field in header
// size is in bytes including the trailing null (which we ignore)
buffer[ 0x88 ] = 0; // was 0x87, but 0x88 fixes BR #26437
@@ -238,7 +238,7 @@ bool KTar::readLonglink(char *buffer,QCString &longlink) {
return true;
}
-Q_LONG KTar::readHeader(char *buffer,QString &name,QString &symlink) {
+Q_LONG KTar::readHeader(char *buffer,TQString &name,TQString &symlink) {
name.truncate(0);
symlink.truncate(0);
while (true) {
@@ -248,11 +248,11 @@ Q_LONG KTar::readHeader(char *buffer,QString &name,QString &symlink) {
// is it a longlink?
if (strcmp(buffer,"././@LongLink") == 0) {
char typeflag = buffer[0x9c];
- QCString longlink;
+ TQCString longlink;
readLonglink(buffer,longlink);
switch (typeflag) {
- case 'L': name = QFile::decodeName(longlink); break;
- case 'K': symlink = QFile::decodeName(longlink); break;
+ case 'L': name = TQFile::decodeName(longlink); break;
+ case 'K': symlink = TQFile::decodeName(longlink); break;
}/*end switch*/
} else {
break;
@@ -263,9 +263,9 @@ Q_LONG KTar::readHeader(char *buffer,QString &name,QString &symlink) {
if (name.isEmpty())
// there are names that are exactly 100 bytes long
// and neither longlink nor \0 terminated (bug:101472)
- name = QFile::decodeName(QCString(buffer, 101));
+ name = TQFile::decodeName(TQCString(buffer, 101));
if (symlink.isEmpty())
- symlink = QFile::decodeName(QCString(buffer + 0x9d, 101));
+ symlink = TQFile::decodeName(TQCString(buffer + 0x9d, 101));
return 0x200;
}
@@ -275,7 +275,7 @@ Q_LONG KTar::readHeader(char *buffer,QString &name,QString &symlink) {
* to decompress the original file now and write
* the contents to the temporary file.
*/
-bool KTar::KTarPrivate::fillTempFile( const QString & filename) {
+bool KTar::KTarPrivate::fillTempFile( const TQString & filename) {
if ( ! tmpFile )
return true;
@@ -288,17 +288,17 @@ bool KTar::KTarPrivate::fillTempFile( const QString & filename) {
|| "application/x-bzip2" == mimetype)
forced = true;
- QIODevice *filterDev = KFilterDev::deviceForFile( filename, mimetype, forced );
+ TQIODevice *filterDev = KFilterDev::deviceForFile( filename, mimetype, forced );
if( filterDev ) {
- QFile* file = tmpFile->file();
+ TQFile* file = tmpFile->file();
file->close();
if ( ! file->open( IO_WriteOnly ) )
{
delete filterDev;
return false;
}
- QByteArray buffer(8*1024);
+ TQByteArray buffer(8*1024);
if ( ! filterDev->open( IO_ReadOnly ) )
{
delete filterDev;
@@ -342,7 +342,7 @@ bool KTar::openArchive( int mode )
//stat( m_filename, &buf );
d->dirList.clear();
- QIODevice* dev = device();
+ TQIODevice* dev = device();
if ( !dev )
return false;
@@ -352,8 +352,8 @@ bool KTar::openArchive( int mode )
bool ende = false;
do
{
- QString name;
- QString symlink;
+ TQString name;
+ TQString symlink;
// Read header
Q_LONG n = readHeader(buffer,name,symlink);
@@ -361,7 +361,7 @@ bool KTar::openArchive( int mode )
if (n == 0x200)
{
bool isdir = false;
- QString nm;
+ TQString nm;
if ( name.right(1) == "/" )
{
@@ -383,8 +383,8 @@ bool KTar::openArchive( int mode )
int access = (int)strtol( p, &dummy, 8 );
// read user and group
- QString user( buffer + 0x109 );
- QString group( buffer + 0x129 );
+ TQString user( buffer + 0x109 );
+ TQString group( buffer + 0x129 );
// read time
buffer[ 0x93 ] = 0;
@@ -470,7 +470,7 @@ bool KTar::openArchive( int mode )
else
{
// In some tar files we can find dir/./file => call cleanDirPath
- QString path = QDir::cleanDirPath( name.left( pos ) );
+ TQString path = TQDir::cleanDirPath( name.left( pos ) );
// Ensure container directory exists, create otherwise
KArchiveDirectory * d = findOrCreate( path );
d->addEntry( e );
@@ -491,7 +491,7 @@ bool KTar::openArchive( int mode )
* to the original file.
* Must only be called if in IO_WriteOnly mode
*/
-bool KTar::KTarPrivate::writeBackTempFile( const QString & filename ) {
+bool KTar::KTarPrivate::writeBackTempFile( const TQString & filename ) {
if ( ! tmpFile )
return true;
@@ -504,9 +504,9 @@ bool KTar::KTarPrivate::writeBackTempFile( const QString & filename ) {
forced = true;
- QIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced );
+ TQIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced );
if( dev ) {
- QFile* file = tmpFile->file();
+ TQFile* file = tmpFile->file();
file->close();
if ( ! file->open(IO_ReadOnly) || ! dev->open(IO_WriteOnly) )
{
@@ -516,7 +516,7 @@ bool KTar::KTarPrivate::writeBackTempFile( const QString & filename ) {
}
if ( forced )
static_cast<KFilterDev *>(dev)->setOrigFileName( origFileName );
- QByteArray buffer(8*1024);
+ TQByteArray buffer(8*1024);
Q_LONG len;
while ( ! file->atEnd()) {
len = file->readBlock(buffer.data(),buffer.size());
@@ -544,7 +544,7 @@ bool KTar::closeArchive()
return true;
}
-bool KTar::writeDir( const QString& name, const QString& user, const QString& group )
+bool KTar::writeDir( const TQString& name, const TQString& user, const TQString& group )
{
mode_t perm = 040755;
time_t the_time = time(0);
@@ -563,7 +563,7 @@ bool KTar::writeDir( const QString& name, const QString& user, const QString& gr
}
// In some tar files we can find dir/./ => call cleanDirPath
- QString dirName ( QDir::cleanDirPath( name ) );
+ TQString dirName ( TQDir::cleanDirPath( name ) );
// Need trailing '/'
if ( dirName.right(1) != "/" )
@@ -582,7 +582,7 @@ bool KTar::writeDir( const QString& name, const QString& user, const QString& gr
strcpy( buffer, "././@LongLink" );
fillBuffer( buffer, " 0", dirName.length()+1, 'L', user.local8Bit(), group.local8Bit() );
device()->writeBlock( buffer, 0x200 );
- strncpy( buffer, QFile::encodeName(dirName), 0x200 );
+ strncpy( buffer, TQFile::encodeName(dirName), 0x200 );
buffer[0x200] = 0;
// write long name
device()->writeBlock( buffer, 0x200 );
@@ -591,7 +591,7 @@ bool KTar::writeDir( const QString& name, const QString& user, const QString& gr
else
{
// Write name
- strncpy( buffer, QFile::encodeName(dirName), 0x200 );
+ strncpy( buffer, TQFile::encodeName(dirName), 0x200 );
buffer[0x200] = 0;
}
@@ -606,7 +606,7 @@ bool KTar::writeDir( const QString& name, const QString& user, const QString& gr
#endif
}
-bool KTar::prepareWriting( const QString& name, const QString& user, const QString& group, uint size )
+bool KTar::prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size )
{
mode_t dflt_perm = 0100644;
time_t the_time = time(0);
@@ -670,7 +670,7 @@ void KTar::fillBuffer( char * buffer,
strcpy( buffer + 0x74, " 144 ");
// size
- QCString s;
+ TQCString s;
s.sprintf("%o", size); // OCT
s = s.rightJustify( 11, ' ' );
strcpy( buffer + 0x7c, s.data() );
@@ -719,7 +719,7 @@ void KTar::fillBuffer( char * buffer,
strcpy( buffer + 0x94, s.data() );
}
-void KTar::writeLonglink(char *buffer, const QCString &name, char typeflag,
+void KTar::writeLonglink(char *buffer, const TQCString &name, char typeflag,
const char *uname, const char *gname) {
strcpy( buffer, "././@LongLink" );
int namelen = name.length() + 1;
@@ -737,14 +737,14 @@ void KTar::writeLonglink(char *buffer, const QCString &name, char typeflag,
}/*wend*/
}
-bool KTar::prepareWriting(const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KTar::prepareWriting(const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime) {
return KArchive::prepareWriting(name,user,group,size,perm,atime,mtime,ctime);
}
-bool KTar::prepareWriting_impl(const QString &name, const QString &user,
- const QString &group, uint size, mode_t perm,
+bool KTar::prepareWriting_impl(const TQString &name, const TQString &user,
+ const TQString &group, uint size, mode_t perm,
time_t /*atime*/, time_t mtime, time_t /*ctime*/) {
if ( !isOpened() )
{
@@ -759,7 +759,7 @@ bool KTar::prepareWriting_impl(const QString &name, const QString &user,
}
// In some tar files we can find dir/./file => call cleanDirPath
- QString fileName ( QDir::cleanDirPath( name ) );
+ TQString fileName ( TQDir::cleanDirPath( name ) );
/*
// Create toplevel dirs
@@ -767,11 +767,11 @@ bool KTar::prepareWriting_impl(const QString &name, const QString &user,
// he needs to implement a findOrCreate equivalent in writeDir.
// But as KTar and the "tar" program both handle tar files without
// dir entries, there's really no need for that
- QString tmp ( fileName );
+ TQString tmp ( fileName );
int i = tmp.findRev( '/' );
if ( i != -1 )
{
- QString d = tmp.left( i + 1 ); // contains trailing slash
+ TQString d = tmp.left( i + 1 ); // contains trailing slash
if ( !m_dirList.contains( d ) )
{
tmp = tmp.mid( i + 1 );
@@ -785,9 +785,9 @@ bool KTar::prepareWriting_impl(const QString &name, const QString &user,
if ( mode() & IO_ReadWrite ) device()->at(d->tarEnd); // Go to end of archive as might have moved with a read
// provide converted stuff we need lateron
- QCString encodedFilename = QFile::encodeName(fileName);
- QCString uname = user.local8Bit();
- QCString gname = group.local8Bit();
+ TQCString encodedFilename = TQFile::encodeName(fileName);
+ TQCString uname = user.local8Bit();
+ TQCString gname = group.local8Bit();
// If more than 100 chars, we need to use the LongLink trick
if ( fileName.length() > 99 )
@@ -799,7 +799,7 @@ bool KTar::prepareWriting_impl(const QString &name, const QString &user,
// zero out the rest (except for what gets filled anyways)
memset(buffer+0x9d, 0, 0x200 - 0x9d);
- QCString permstr;
+ TQCString permstr;
permstr.sprintf("%o",perm);
permstr = permstr.rightJustify(6, ' ');
fillBuffer(buffer, permstr, size, mtime, 0x30, uname, gname);
@@ -808,14 +808,14 @@ bool KTar::prepareWriting_impl(const QString &name, const QString &user,
return device()->writeBlock( buffer, 0x200 ) == 0x200;
}
-bool KTar::writeDir(const QString& name, const QString& user,
- const QString& group, mode_t perm,
+bool KTar::writeDir(const TQString& name, const TQString& user,
+ const TQString& group, mode_t perm,
time_t atime, time_t mtime, time_t ctime) {
return KArchive::writeDir(name,user,group,perm,atime,mtime,ctime);
}
-bool KTar::writeDir_impl(const QString &name, const QString &user,
- const QString &group, mode_t perm,
+bool KTar::writeDir_impl(const TQString &name, const TQString &user,
+ const TQString &group, mode_t perm,
time_t /*atime*/, time_t mtime, time_t /*ctime*/) {
if ( !isOpened() )
{
@@ -830,7 +830,7 @@ bool KTar::writeDir_impl(const QString &name, const QString &user,
}
// In some tar files we can find dir/./ => call cleanDirPath
- QString dirName ( QDir::cleanDirPath( name ) );
+ TQString dirName ( TQDir::cleanDirPath( name ) );
// Need trailing '/'
if ( dirName.right(1) != "/" )
@@ -844,9 +844,9 @@ bool KTar::writeDir_impl(const QString &name, const QString &user,
if ( mode() & IO_ReadWrite ) device()->at(d->tarEnd); // Go to end of archive as might have moved with a read
// provide converted stuff we need lateron
- QCString encodedDirname = QFile::encodeName(dirName);
- QCString uname = user.local8Bit();
- QCString gname = group.local8Bit();
+ TQCString encodedDirname = TQFile::encodeName(dirName);
+ TQCString uname = user.local8Bit();
+ TQCString gname = group.local8Bit();
// If more than 100 chars, we need to use the LongLink trick
if ( dirName.length() > 99 )
@@ -858,7 +858,7 @@ bool KTar::writeDir_impl(const QString &name, const QString &user,
// zero out the rest (except for what gets filled anyways)
memset(buffer+0x9d, 0, 0x200 - 0x9d);
- QCString permstr;
+ TQCString permstr;
permstr.sprintf("%o",perm);
permstr = permstr.rightJustify(6, ' ');
fillBuffer( buffer, permstr, 0, mtime, 0x35, uname, gname);
@@ -871,14 +871,14 @@ bool KTar::writeDir_impl(const QString &name, const QString &user,
return true; // TODO if wanted, better error control
}
-bool KTar::writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+bool KTar::writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime) {
return KArchive::writeSymLink(name,target,user,group,perm,atime,mtime,ctime);
}
-bool KTar::writeSymLink_impl(const QString &name, const QString &target,
- const QString &user, const QString &group,
+bool KTar::writeSymLink_impl(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t /*atime*/, time_t mtime, time_t /*ctime*/) {
if ( !isOpened() )
{
@@ -895,17 +895,17 @@ bool KTar::writeSymLink_impl(const QString &name, const QString &target,
device()->flush();
// In some tar files we can find dir/./file => call cleanDirPath
- QString fileName ( QDir::cleanDirPath( name ) );
+ TQString fileName ( TQDir::cleanDirPath( name ) );
char buffer[ 0x201 ];
memset( buffer, 0, 0x200 );
if ( mode() & IO_ReadWrite ) device()->at(d->tarEnd); // Go to end of archive as might have moved with a read
// provide converted stuff we need lateron
- QCString encodedFilename = QFile::encodeName(fileName);
- QCString encodedTarget = QFile::encodeName(target);
- QCString uname = user.local8Bit();
- QCString gname = group.local8Bit();
+ TQCString encodedFilename = TQFile::encodeName(fileName);
+ TQCString encodedTarget = TQFile::encodeName(target);
+ TQCString uname = user.local8Bit();
+ TQCString gname = group.local8Bit();
// If more than 100 chars, we need to use the LongLink trick
if (target.length() > 99)
@@ -922,7 +922,7 @@ bool KTar::writeSymLink_impl(const QString &name, const QString &target,
// zero out the rest
memset(buffer+0x9d+100, 0, 0x200 - 100 - 0x9d);
- QCString permstr;
+ TQCString permstr;
permstr.sprintf("%o",perm);
permstr = permstr.rightJustify(6, ' ');
fillBuffer(buffer, permstr, 0, mtime, 0x32, uname, gname);
diff --git a/kio/kio/ktar.h b/kio/kio/ktar.h
index 174117215..915cfed3a 100644
--- a/kio/kio/ktar.h
+++ b/kio/kio/ktar.h
@@ -22,10 +22,10 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include <karchive.h>
@@ -50,17 +50,17 @@ public:
* specify the compression layer ! If the mimetype is omitted, it
* will be determined from the filename.
*/
- KTar( const QString& filename, const QString & mimetype = QString::null );
+ KTar( const TQString& filename, const TQString & mimetype = TQString::null );
/**
* Creates an instance that operates on the given device.
- * The device can be compressed (KFilterDev) or not (QFile, etc.).
- * @warning Do not assume that giving a QFile here will decompress the file,
+ * The device can be compressed (KFilterDev) or not (TQFile, etc.).
+ * @warning Do not assume that giving a TQFile here will decompress the file,
* in case it's compressed!
* @param dev the device to read from. If the source is compressed, the
- * QIODevice must take care of decompression
+ * TQIODevice must take care of decompression
*/
- KTar( QIODevice * dev );
+ KTar( TQIODevice * dev );
/**
* If the tar ball is still opened, then it will be
@@ -70,10 +70,10 @@ public:
/**
* The name of the tar file, as passed to the constructor
- * Null if you used the QIODevice constructor.
- * @return the name of the file, or QString::null if unknown
+ * Null if you used the TQIODevice constructor.
+ * @return the name of the file, or TQString::null if unknown
*/
- QString fileName() { return m_filename; } // TODO KDE4 const
+ TQString fileName() { return m_filename; } // TODO KDE4 const
/**
* Special function for setting the "original file name" in the gzip header,
@@ -81,20 +81,20 @@ public:
* for instance. Should only be called if the underlying device is a KFilterDev!
* @param fileName the original file name
*/
- void setOrigFileName( const QCString & fileName );
+ void setOrigFileName( const TQCString & fileName );
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
- virtual bool writeDir( const QString& name, const QString& user, const QString& group );
+ virtual bool writeDir( const TQString& name, const TQString& user, const TQString& group );
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool writeDir( const QString& name, const QString& user, const QString& group,
+ bool writeDir( const TQString& name, const TQString& user, const TQString& group,
mode_t perm, time_t atime, time_t mtime, time_t ctime );
- virtual bool prepareWriting( const QString& name, const QString& user, const QString& group, uint size );
+ virtual bool prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size );
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool prepareWriting( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime );
virtual bool doneWriting( uint size );
@@ -112,7 +112,7 @@ private:
/**
* @internal
*/
- void prepareDevice( const QString & filename, const QString & mimetype, bool forced = false );
+ void prepareDevice( const TQString & filename, const TQString & mimetype, bool forced = false );
/**
* @internal
@@ -135,24 +135,24 @@ private:
* @p uname user name
* @p gname group name
*/
- void writeLonglink(char *buffer, const QCString &name, char typeflag,
+ void writeLonglink(char *buffer, const TQCString &name, char typeflag,
const char *uname, const char *gname);
Q_LONG readRawHeader(char *buffer);
- bool readLonglink(char *buffer,QCString &longlink);
- Q_LONG readHeader(char *buffer,QString &name,QString &symlink);
+ bool readLonglink(char *buffer,TQCString &longlink);
+ Q_LONG readHeader(char *buffer,TQString &name,TQString &symlink);
- QString m_filename;
+ TQString m_filename;
protected:
virtual void virtual_hook( int id, void* data );
- bool prepareWriting_impl(const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting_impl(const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime);
- bool writeDir_impl(const QString& name, const QString& user,
- const QString& group, mode_t perm,
+ bool writeDir_impl(const TQString& name, const TQString& user,
+ const TQString& group, mode_t perm,
time_t atime, time_t mtime, time_t ctime );
- bool writeSymLink_impl(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink_impl(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
private:
class KTarPrivate;
diff --git a/kio/kio/ktrader.cpp b/kio/kio/ktrader.cpp
index 6349e0cad..dbe096075 100644
--- a/kio/kio/ktrader.cpp
+++ b/kio/kio/ktrader.cpp
@@ -19,8 +19,8 @@
#include "ktrader.h"
#include "ktraderparsetree.h"
-#include <qtl.h>
-#include <qbuffer.h>
+#include <tqtl.h>
+#include <tqbuffer.h>
#include <kuserprofile.h>
#include <kstandarddirs.h>
@@ -103,15 +103,15 @@ KTrader::~KTrader()
{
}
-KTrader::OfferList KTrader::query( const QString& _servicetype, const QString& _constraint,
- const QString& _preferences ) const
+KTrader::OfferList KTrader::query( const TQString& _servicetype, const TQString& _constraint,
+ const TQString& _preferences ) const
{
- return query( _servicetype, QString::null, _constraint, _preferences );
+ return query( _servicetype, TQString::null, _constraint, _preferences );
}
-KTrader::OfferList KTrader::query( const QString& _servicetype, const QString& _genericServiceType,
- const QString& _constraint,
- const QString& _preferences ) const
+KTrader::OfferList KTrader::query( const TQString& _servicetype, const TQString& _genericServiceType,
+ const TQString& _constraint,
+ const TQString& _preferences ) const
{
// TODO: catch errors here
ParseTreeBase::Ptr constr;
@@ -147,7 +147,7 @@ KTrader::OfferList KTrader::query( const QString& _servicetype, const QString& _
if ( !!prefs )
{
- QValueList<KTraderSorter> sorter;
+ TQValueList<KTraderSorter> sorter;
KServiceTypeProfile::OfferList::Iterator it = lst.begin();
for( ; it != lst.end(); ++it )
{
@@ -157,7 +157,7 @@ KTrader::OfferList KTrader::query( const QString& _servicetype, const QString& _
}
qBubbleSort( sorter );
- QValueList<KTraderSorter>::Iterator it2 = sorter.begin();
+ TQValueList<KTraderSorter>::Iterator it2 = sorter.begin();
for( ; it2 != sorter.end(); ++it2 )
ret.prepend( (*it2).service() );
}
@@ -169,7 +169,7 @@ KTrader::OfferList KTrader::query( const QString& _servicetype, const QString& _
}
#ifndef NDEBUG
- QString query = _servicetype;
+ TQString query = _servicetype;
if ( !_genericServiceType.isEmpty() ) {
query += ", ";
query += _genericServiceType;
diff --git a/kio/kio/ktrader.h b/kio/kio/ktrader.h
index 3bf90ce84..e5bb734e6 100644
--- a/kio/kio/ktrader.h
+++ b/kio/kio/ktrader.h
@@ -18,8 +18,8 @@
#ifndef __ktrader_h__
#define __ktrader_h__
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <kservice.h>
/**
@@ -89,8 +89,8 @@ public:
/**
* A list of services.
*/
- typedef QValueList<KService::Ptr> OfferList;
- typedef QValueListIterator<KService::Ptr> OfferListIterator;
+ typedef TQValueList<KService::Ptr> OfferList;
+ typedef TQValueListIterator<KService::Ptr> OfferListIterator;
/**
* Standard destructor
@@ -117,18 +117,18 @@ public:
* fields found in the .desktop files.
*
* @param servicetype A service type like 'text/plain', 'text/html', or 'KOfficePlugin'.
- * @param constraint A constraint to limit the choices returned, QString::null to
+ * @param constraint A constraint to limit the choices returned, TQString::null to
* get all services of the given @p servicetype
- * @param preferences Indicates a particular preference to return, QString::null to ignore.
+ * @param preferences Indicates a particular preference to return, TQString::null to ignore.
* Uses an expression in the constraint language that must return
* a number
*
* @return A list of services that satisfy the query
* @see http://developer.kde.org/documentation/library/3.5-api/kdelibs-apidocs/kio/kio/html/tradersyntax.html
*/
- virtual OfferList query( const QString& servicetype,
- const QString& constraint = QString::null,
- const QString& preferences = QString::null) const;
+ virtual OfferList query( const TQString& servicetype,
+ const TQString& constraint = TQString::null,
+ const TQString& preferences = TQString::null) const;
/**
* A variant of query(), that takes two service types as an input.
@@ -144,18 +144,18 @@ public:
*
* @param servicetype A service type like 'text/plain', 'text/html', or 'KOfficePlugin'.
* @param genericServiceType a basic service type, like 'KParts/ReadOnlyPart' or 'Application'
- * @param constraint A constraint to limit the choices returned, QString::null to
+ * @param constraint A constraint to limit the choices returned, TQString::null to
* get all services of the given @p servicetype
- * @param preferences Indicates a particular preference to return, QString::null to ignore.
+ * @param preferences Indicates a particular preference to return, TQString::null to ignore.
* Uses an expression in the constraint language that must return
* a number
*
* @return A list of services that satisfy the query
* @see http://developer.kde.org/documentation/library/kdeqt/tradersyntax.html
*/
- OfferList query( const QString& servicetype, const QString& genericServiceType,
- const QString& constraint /*= QString::null*/,
- const QString& preferences /*= QString::null*/) const;
+ OfferList query( const TQString& servicetype, const TQString& genericServiceType,
+ const TQString& constraint /*= TQString::null*/,
+ const TQString& preferences /*= TQString::null*/) const;
/**
* This is a static pointer to a KTrader instance.
diff --git a/kio/kio/ktraderparse.cpp b/kio/kio/ktraderparse.cpp
index aa4b799c4..64d9e449f 100644
--- a/kio/kio/ktraderparse.cpp
+++ b/kio/kio/ktraderparse.cpp
@@ -35,9 +35,9 @@ using namespace KIO;
static ParseTreeBase::Ptr *pTree = 0;
static const char* sCode = 0;
-ParseTreeBase::Ptr KIO::parseConstraints( const QString& _constr )
+ParseTreeBase::Ptr KIO::parseConstraints( const TQString& _constr )
{
- QCString str = _constr.utf8();
+ TQCString str = _constr.utf8();
sCode = str.data();
KTraderParse_mainParse( sCode );
sCode = 0;
@@ -45,9 +45,9 @@ ParseTreeBase::Ptr KIO::parseConstraints( const QString& _constr )
return *pTree;
}
-ParseTreeBase::Ptr KIO::parsePreferences( const QString& _prefs )
+ParseTreeBase::Ptr KIO::parsePreferences( const TQString& _prefs )
{
- QCString str = _prefs.utf8();
+ TQCString str = _prefs.utf8();
sCode = str.data();
KTraderParse_mainParse( sCode );
sCode = 0;
diff --git a/kio/kio/ktraderparsetree.cpp b/kio/kio/ktraderparsetree.cpp
index 74366b990..711ec5356 100644
--- a/kio/kio/ktraderparsetree.cpp
+++ b/kio/kio/ktraderparsetree.cpp
@@ -396,7 +396,7 @@ bool ParseTreeEXIST::eval( ParseContext *_context ) const
{
_context->type = ParseContext::T_BOOL;
- QVariant prop = _context->service->property( m_id );
+ TQVariant prop = _context->service->property( m_id );
_context->b = prop.isValid();
return true;
@@ -433,13 +433,13 @@ bool ParseTreeIN::eval( ParseContext *_context ) const
if ( (c1.type == ParseContext::T_NUM) &&
(c2.type == ParseContext::T_SEQ) &&
- ((*(c2.seq.begin())).type() == QVariant::Int)) {
+ ((*(c2.seq.begin())).type() == TQVariant::Int)) {
- QValueList<QVariant>::ConstIterator it = c2.seq.begin();
- QValueList<QVariant>::ConstIterator end = c2.seq.end();
+ TQValueList<TQVariant>::ConstIterator it = c2.seq.begin();
+ TQValueList<TQVariant>::ConstIterator end = c2.seq.end();
_context->b = false;
for (; it != end; it++)
- if ((*it).type() == QVariant::Int &&
+ if ((*it).type() == TQVariant::Int &&
(*it).toInt() == c1.i) {
_context->b = true;
break;
@@ -449,13 +449,13 @@ bool ParseTreeIN::eval( ParseContext *_context ) const
if ( c1.type == ParseContext::T_DOUBLE &&
c2.type == ParseContext::T_SEQ &&
- (*(c2.seq.begin())).type() == QVariant::Double) {
+ (*(c2.seq.begin())).type() == TQVariant::Double) {
- QValueList<QVariant>::ConstIterator it = c2.seq.begin();
- QValueList<QVariant>::ConstIterator end = c2.seq.end();
+ TQValueList<TQVariant>::ConstIterator it = c2.seq.begin();
+ TQValueList<TQVariant>::ConstIterator end = c2.seq.end();
_context->b = false;
for (; it != end; it++)
- if ((*it).type() == QVariant::Double &&
+ if ((*it).type() == TQVariant::Double &&
(*it).toDouble() == c1.i) {
_context->b = true;
break;
@@ -474,46 +474,46 @@ bool ParseTreeIN::eval( ParseContext *_context ) const
bool ParseTreeID::eval( ParseContext *_context ) const
{
- QVariant prop = _context->service->property( m_str );
+ TQVariant prop = _context->service->property( m_str );
if ( !prop.isValid() )
return false;
- if ( prop.type() == QVariant::String )
+ if ( prop.type() == TQVariant::String )
{
_context->str = prop.toString();
_context->type = ParseContext::T_STRING;
return true;
}
- if ( prop.type() == QVariant::Int )
+ if ( prop.type() == TQVariant::Int )
{
_context->i = prop.toInt();
_context->type = ParseContext::T_NUM;
return true;
}
- if ( prop.type() == QVariant::Bool )
+ if ( prop.type() == TQVariant::Bool )
{
_context->b = prop.toBool();
_context->type = ParseContext::T_BOOL;
return true;
}
- if ( prop.type() == QVariant::Double )
+ if ( prop.type() == TQVariant::Double )
{
_context->f = prop.toDouble();
_context->type = ParseContext::T_DOUBLE;
return true;
}
- if ( prop.type() == QVariant::List )
+ if ( prop.type() == TQVariant::List )
{
_context->seq = prop.toList();
_context->type = ParseContext::T_SEQ;
return true;
}
- if ( prop.type() == QVariant::StringList )
+ if ( prop.type() == TQVariant::StringList )
{
_context->strSeq = prop.toStringList();
_context->type = ParseContext::T_STR_SEQ;
@@ -528,24 +528,24 @@ bool ParseTreeMIN2::eval( ParseContext *_context ) const
{
_context->type = ParseContext::T_DOUBLE;
- QVariant prop = _context->service->property( m_strId );
+ TQVariant prop = _context->service->property( m_strId );
if ( !prop.isValid() )
return false;
if ( !_context->initMaxima( m_strId ) )
return false;
- QMap<QString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
+ TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
if ( it == _context->maxima.end() )
return false;
- if ( prop.type() == QVariant::Int && it.data().type == PreferencesMaxima::PM_INT )
+ if ( prop.type() == TQVariant::Int && it.data().type == PreferencesMaxima::PM_INT )
{
_context->f = (double)( prop.toInt() - it.data().iMin ) /
(double)(it.data().iMax - it.data().iMin ) * (-2.0) + 1.0;
return true;
}
- else if ( prop.type() == QVariant::Double && it.data().type == PreferencesMaxima::PM_DOUBLE )
+ else if ( prop.type() == TQVariant::Double && it.data().type == PreferencesMaxima::PM_DOUBLE )
{
_context->f = ( prop.toDouble() - it.data().fMin ) / (it.data().fMax - it.data().fMin )
* (-2.0) + 1.0;
@@ -559,7 +559,7 @@ bool ParseTreeMAX2::eval( ParseContext *_context ) const
{
_context->type = ParseContext::T_DOUBLE;
- QVariant prop = _context->service->property( m_strId );
+ TQVariant prop = _context->service->property( m_strId );
if ( !prop.isValid() )
return false;
@@ -568,17 +568,17 @@ bool ParseTreeMAX2::eval( ParseContext *_context ) const
return false;
// Find extrema
- QMap<QString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
+ TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId );
if ( it == _context->maxima.end() )
return false;
- if ( prop.type() == QVariant::Int && it.data().type == PreferencesMaxima::PM_INT )
+ if ( prop.type() == TQVariant::Int && it.data().type == PreferencesMaxima::PM_INT )
{
_context->f = (double)( prop.toInt() - it.data().iMin ) /
(double)(it.data().iMax - it.data().iMin ) * 2.0 - 1.0;
return true;
}
- else if ( prop.type() == QVariant::Double && it.data().type == PreferencesMaxima::PM_DOUBLE )
+ else if ( prop.type() == TQVariant::Double && it.data().type == PreferencesMaxima::PM_DOUBLE )
{
_context->f = ( prop.toDouble() - it.data().fMin ) /
(it.data().fMax - it.data().fMin ) * 2.0 - 1.0;
@@ -595,7 +595,7 @@ int matchConstraint( const ParseTreeBase *_tree, const KService::Ptr &_service,
if ( !_tree )
return 1;
- QMap<QString,PreferencesMaxima> maxima;
+ TQMap<TQString,PreferencesMaxima> maxima;
ParseContext c( _service, _list, maxima );
// Error during evaluation ?
@@ -618,7 +618,7 @@ PreferencesReturn matchPreferences( const ParseTreeBase *_tree, const KService::
if ( !_tree )
return ret;
- QMap<QString,PreferencesMaxima> maxima;
+ TQMap<TQString,PreferencesMaxima> maxima;
ParseContext c( _service, _list, maxima );
if ( !_tree->eval( &c ) )
@@ -639,26 +639,26 @@ PreferencesReturn matchPreferences( const ParseTreeBase *_tree, const KService::
return ret;
}
-bool ParseContext::initMaxima( const QString& _prop )
+bool ParseContext::initMaxima( const TQString& _prop )
{
// Is the property known ?
- QVariant prop = service->property( _prop );
+ TQVariant prop = service->property( _prop );
if ( !prop.isValid() )
return false;
// Numeric ?
- if ( prop.type() != QVariant::Int && prop.type() != QVariant::Double )
+ if ( prop.type() != TQVariant::Int && prop.type() != TQVariant::Double )
return false;
// Did we cache the result ?
- QMap<QString,PreferencesMaxima>::Iterator it = maxima.find( _prop );
+ TQMap<TQString,PreferencesMaxima>::Iterator it = maxima.find( _prop );
if ( it != maxima.end() )
return ( it.data().type == PreferencesMaxima::PM_DOUBLE ||
it.data().type == PreferencesMaxima::PM_INT );
// Double or Int ?
PreferencesMaxima extrema;
- if ( prop.type() == QVariant::Int )
+ if ( prop.type() == TQVariant::Int )
extrema.type = PreferencesMaxima::PM_INVALID_INT;
else
extrema.type = PreferencesMaxima::PM_INVALID_DOUBLE;
@@ -667,7 +667,7 @@ bool ParseContext::initMaxima( const QString& _prop )
KServiceTypeProfile::OfferList::ConstIterator oit = offers.begin();
for( ; oit != offers.end(); ++oit )
{
- QVariant p = (*oit).service()->property( _prop );
+ TQVariant p = (*oit).service()->property( _prop );
if ( p.isValid() )
{
// Determine new maximum/minimum
diff --git a/kio/kio/ktraderparsetree.h b/kio/kio/ktraderparsetree.h
index 8dfeed36b..3af4273d0 100644
--- a/kio/kio/ktraderparsetree.h
+++ b/kio/kio/ktraderparsetree.h
@@ -20,11 +20,11 @@
#ifndef __parse_tree_h__
#define __parse_tree_h__
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qshared.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
+#include <tqshared.h>
#include <kservice.h>
#include <kuserprofile.h>
@@ -95,25 +95,25 @@ public:
ParseContext( const ParseContext* _ctx ) : service( _ctx->service ), maxima( _ctx->maxima ),
offers( _ctx->offers ) {}
ParseContext( const KService::Ptr & _service, const KServiceTypeProfile::OfferList& _offers,
- QMap<QString,PreferencesMaxima>& _m )
+ TQMap<TQString,PreferencesMaxima>& _m )
: service( _service ), maxima( _m ), offers( _offers ) {}
- bool initMaxima( const QString& _prop);
+ bool initMaxima( const TQString& _prop);
enum Type { T_STRING = 1, T_DOUBLE = 2, T_NUM = 3, T_BOOL = 4,
T_STR_SEQ = 5, T_SEQ = 6 };
- QString str;
+ TQString str;
int i;
double f;
bool b;
- QValueList<QVariant> seq;
- QStringList strSeq;
+ TQValueList<TQVariant> seq;
+ TQStringList strSeq;
Type type;
KService::Ptr service;
- QMap<QString,PreferencesMaxima>& maxima;
+ TQMap<TQString,PreferencesMaxima>& maxima;
const KServiceTypeProfile::OfferList& offers;
};
@@ -131,8 +131,8 @@ protected:
virtual ~ParseTreeBase() { };
};
-KIO_EXPORT ParseTreeBase::Ptr parseConstraints( const QString& _constr );
-KIO_EXPORT ParseTreeBase::Ptr parsePreferences( const QString& _prefs );
+KIO_EXPORT ParseTreeBase::Ptr parseConstraints( const TQString& _constr );
+KIO_EXPORT ParseTreeBase::Ptr parsePreferences( const TQString& _prefs );
/**
* @internal
@@ -265,7 +265,7 @@ public:
bool eval( ParseContext *_context ) const;
protected:
- QString m_id;
+ TQString m_id;
};
/**
@@ -279,7 +279,7 @@ public:
bool eval( ParseContext *_context ) const;
protected:
- QString m_str;
+ TQString m_str;
};
/**
@@ -293,7 +293,7 @@ public:
bool eval( ParseContext *_context ) const { _context->type = ParseContext::T_STRING; _context->str = m_str; return true; }
protected:
- QString m_str;
+ TQString m_str;
};
/**
@@ -349,7 +349,7 @@ public:
bool eval( ParseContext *_context ) const;
protected:
- QString m_strId;
+ TQString m_strId;
};
/**
@@ -363,7 +363,7 @@ public:
bool eval( ParseContext *_context ) const;
protected:
- QString m_strId;
+ TQString m_strId;
};
}
diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp
index 7188ba62b..2c4c5b12e 100644
--- a/kio/kio/kurifilter.cpp
+++ b/kio/kio/kurifilter.cpp
@@ -30,12 +30,12 @@
#include "kurifilter.h"
-template class QPtrList<KURIFilterPlugin>;
+template class TQPtrList<KURIFilterPlugin>;
-KURIFilterPlugin::KURIFilterPlugin( QObject *parent, const char *name, double pri )
- :QObject( parent, name )
+KURIFilterPlugin::KURIFilterPlugin( TQObject *parent, const char *name, double pri )
+ :TQObject( parent, name )
{
- m_strName = QString::fromLatin1( name );
+ m_strName = TQString::fromLatin1( name );
m_dblPriority = pri;
}
@@ -52,9 +52,9 @@ class KURIFilterDataPrivate
{
public:
KURIFilterDataPrivate() {};
- QString abs_path;
- QString args;
- QString typedString;
+ TQString abs_path;
+ TQString args;
+ TQString typedString;
};
KURIFilterData::KURIFilterData( const KURIFilterData& data )
@@ -81,20 +81,20 @@ void KURIFilterData::init( const KURL& url )
{
m_iType = KURIFilterData::UNKNOWN;
m_pURI = url;
- m_strErrMsg = QString::null;
- m_strIconName = QString::null;
+ m_strErrMsg = TQString::null;
+ m_strIconName = TQString::null;
m_bCheckForExecutables = true;
m_bChanged = true;
d = new KURIFilterDataPrivate;
d->typedString = url.url();
}
-void KURIFilterData::init( const QString& url )
+void KURIFilterData::init( const TQString& url )
{
m_iType = KURIFilterData::UNKNOWN;
m_pURI = url;
- m_strErrMsg = QString::null;
- m_strIconName = QString::null;
+ m_strErrMsg = TQString::null;
+ m_strIconName = TQString::null;
m_bCheckForExecutables = true;
m_bChanged = true;
d = new KURIFilterDataPrivate;
@@ -107,13 +107,13 @@ void KURIFilterData::reinit(const KURL &url)
init(url);
}
-void KURIFilterData::reinit(const QString &url)
+void KURIFilterData::reinit(const TQString &url)
{
delete d;
init(url);
}
-QString KURIFilterData::typedString() const
+TQString KURIFilterData::typedString() const
{
return d->typedString;
}
@@ -133,7 +133,7 @@ bool KURIFilterData::hasAbsolutePath() const
return !d->abs_path.isEmpty();
}
-bool KURIFilterData::setAbsolutePath( const QString& absPath )
+bool KURIFilterData::setAbsolutePath( const TQString& absPath )
{
// Since a malformed URL could possibly be a relative
// URL we tag it as a possible local resource...
@@ -145,17 +145,17 @@ bool KURIFilterData::setAbsolutePath( const QString& absPath )
return false;
}
-QString KURIFilterData::absolutePath() const
+TQString KURIFilterData::absolutePath() const
{
return d->abs_path;
}
-QString KURIFilterData::argsAndOptions() const
+TQString KURIFilterData::argsAndOptions() const
{
return d->args;
}
-QString KURIFilterData::iconName()
+TQString KURIFilterData::iconName()
{
if( m_bChanged )
{
@@ -170,37 +170,37 @@ QString KURIFilterData::iconName()
}
case KURIFilterData::EXECUTABLE:
{
- QString exeName = m_pURI.url();
+ TQString exeName = m_pURI.url();
exeName = exeName.mid( exeName.findRev( '/' ) + 1 ); // strip path if given
KService::Ptr service = KService::serviceByDesktopName( exeName );
- if (service && service->icon() != QString::fromLatin1( "unknown" ))
+ if (service && service->icon() != TQString::fromLatin1( "unknown" ))
m_strIconName = service->icon();
// Try to find an icon with the same name as the binary (useful for non-kde apps)
else if ( !KGlobal::iconLoader()->loadIcon( exeName, KIcon::NoGroup, 16, KIcon::DefaultState, 0, true ).isNull() )
m_strIconName = exeName;
else
// not found, use default
- m_strIconName = QString::fromLatin1("exec");
+ m_strIconName = TQString::fromLatin1("exec");
break;
}
case KURIFilterData::HELP:
{
- m_strIconName = QString::fromLatin1("khelpcenter");
+ m_strIconName = TQString::fromLatin1("khelpcenter");
break;
}
case KURIFilterData::SHELL:
{
- m_strIconName = QString::fromLatin1("konsole");
+ m_strIconName = TQString::fromLatin1("konsole");
break;
}
case KURIFilterData::ERROR:
case KURIFilterData::BLOCKED:
{
- m_strIconName = QString::fromLatin1("error");
+ m_strIconName = TQString::fromLatin1("error");
break;
}
default:
- m_strIconName = QString::null;
+ m_strIconName = TQString::null;
break;
}
m_bChanged = false;
@@ -209,7 +209,7 @@ QString KURIFilterData::iconName()
}
//******************************************** KURIFilterPlugin **********************************************
-void KURIFilterPlugin::setArguments( KURIFilterData& data, const QString& args ) const
+void KURIFilterPlugin::setArguments( KURIFilterData& data, const TQString& args ) const
{
data.d->args = args;
}
@@ -235,7 +235,7 @@ KURIFilter::~KURIFilter()
{
}
-bool KURIFilter::filterURI( KURIFilterData& data, const QStringList& filters )
+bool KURIFilter::filterURI( KURIFilterData& data, const TQStringList& filters )
{
bool filtered = false;
KURIFilterPluginList use_plugins;
@@ -247,9 +247,9 @@ bool KURIFilter::filterURI( KURIFilterData& data, const QStringList& filters )
else
{
//kdDebug() << "Named plugins requested..." << endl;
- for( QStringList::ConstIterator lst = filters.begin(); lst != filters.end(); ++lst )
+ for( TQStringList::ConstIterator lst = filters.begin(); lst != filters.end(); ++lst )
{
- QPtrListIterator<KURIFilterPlugin> it( m_lstPlugins );
+ TQPtrListIterator<KURIFilterPlugin> it( m_lstPlugins );
for( ; it.current() ; ++it )
{
if( (*lst) == it.current()->name() )
@@ -262,7 +262,7 @@ bool KURIFilter::filterURI( KURIFilterData& data, const QStringList& filters )
}
}
- QPtrListIterator<KURIFilterPlugin> it( use_plugins );
+ TQPtrListIterator<KURIFilterPlugin> it( use_plugins );
//kdDebug() << "Using " << use_plugins.count() << " out of the "
// << m_lstPlugins.count() << " available plugins" << endl;
for (; it.current() && !filtered; ++it)
@@ -273,7 +273,7 @@ bool KURIFilter::filterURI( KURIFilterData& data, const QStringList& filters )
return filtered;
}
-bool KURIFilter::filterURI( KURL& uri, const QStringList& filters )
+bool KURIFilter::filterURI( KURL& uri, const TQStringList& filters )
{
KURIFilterData data = uri;
bool filtered = filterURI( data, filters );
@@ -281,7 +281,7 @@ bool KURIFilter::filterURI( KURL& uri, const QStringList& filters )
return filtered;
}
-bool KURIFilter::filterURI( QString& uri, const QStringList& filters )
+bool KURIFilter::filterURI( TQString& uri, const TQStringList& filters )
{
KURIFilterData data = uri;
bool filtered = filterURI( data, filters );
@@ -290,29 +290,29 @@ bool KURIFilter::filterURI( QString& uri, const QStringList& filters )
}
-KURL KURIFilter::filteredURI( const KURL &uri, const QStringList& filters )
+KURL KURIFilter::filteredURI( const KURL &uri, const TQStringList& filters )
{
KURIFilterData data = uri;
filterURI( data, filters );
return data.uri();
}
-QString KURIFilter::filteredURI( const QString &uri, const QStringList& filters )
+TQString KURIFilter::filteredURI( const TQString &uri, const TQStringList& filters )
{
KURIFilterData data = uri;
filterURI( data, filters );
return data.uri().url();
}
-QPtrListIterator<KURIFilterPlugin> KURIFilter::pluginsIterator() const
+TQPtrListIterator<KURIFilterPlugin> KURIFilter::pluginsIterator() const
{
- return QPtrListIterator<KURIFilterPlugin>(m_lstPlugins);
+ return TQPtrListIterator<KURIFilterPlugin>(m_lstPlugins);
}
-QStringList KURIFilter::pluginNames() const
+TQStringList KURIFilter::pluginNames() const
{
- QStringList list;
- for(QPtrListIterator<KURIFilterPlugin> i = pluginsIterator(); *i; ++i)
+ TQStringList list;
+ for(TQPtrListIterator<KURIFilterPlugin> i = pluginsIterator(); *i; ++i)
list.append((*i)->name());
return list;
}
diff --git a/kio/kio/kurifilter.h b/kio/kio/kurifilter.h
index 309eae889..0960c1419 100644
--- a/kio/kio/kurifilter.h
+++ b/kio/kio/kurifilter.h
@@ -25,9 +25,9 @@
#ifndef __kurifilter_h__
#define __kurifilter_h__
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kurl.h>
@@ -54,7 +54,7 @@ class KCModule;
* \b Example
*
* \code
-* QString text = "kde.org";
+* TQString text = "kde.org";
* KURIFilterData d = text;
* bool filtered = KURIFilter::self()->filter( d );
* cout << "URL: " << text.latin1() << endl
@@ -117,7 +117,7 @@ public:
*
* @param url is the string to be filtered.
*/
- KURIFilterData( const QString& url ) { init( url ); }
+ KURIFilterData( const TQString& url ) { init( url ); }
/**
* Copy constructor.
@@ -161,11 +161,11 @@ public:
* This functions returns the error message set
* by the plugin whenever the uri type is set to
* KURIFilterData::ERROR. Otherwise, it returns
- * a QString::null.
+ * a TQString::null.
*
* @return the error message or a NULL when there is none.
*/
- QString errorMsg() const { return m_strErrMsg; }
+ TQString errorMsg() const { return m_strErrMsg; }
/**
* Returns the URI type.
@@ -185,7 +185,7 @@ public:
*
* @param url the string to be filtered.
*/
- void setData( const QString& url ) { reinit( url ); }
+ void setData( const TQString& url ) { reinit( url ); }
/**
* Same as above except the argument is a URL.
@@ -212,14 +212,14 @@ public:
* @param abs_path the abolute path to the local resource.
* @return true if absolute path is successfully set. Otherwise, false.
*/
- bool setAbsolutePath( const QString& abs_path );
+ bool setAbsolutePath( const TQString& abs_path );
/**
* Returns the absolute path if one has already been set.
- * @return the absolute path, or QString::null
+ * @return the absolute path, or TQString::null
* @see hasAbsolutePath()
*/
- QString absolutePath() const;
+ TQString absolutePath() const;
/**
* Checks whether the supplied data had an absolute path.
@@ -232,9 +232,9 @@ public:
* Returns the command line options and arguments for a
* local resource when present.
*
- * @return options and arguments when present, otherwise QString::null
+ * @return options and arguments when present, otherwise TQString::null
*/
- QString argsAndOptions() const;
+ TQString argsAndOptions() const;
/**
* Checks whether the current data is a local resource with
@@ -252,9 +252,9 @@ public:
* is found.
*
* @return the name of the icon associated with the resource,
- * or QString::null if not found
+ * or TQString::null if not found
*/
- QString iconName();
+ TQString iconName();
/**
* Check whether the provided uri is executable or not.
@@ -280,7 +280,7 @@ public:
* @return the string as typed by the user, before any URL processing is done
* @since 3.2
*/
- QString typedString() const;
+ TQString typedString() const;
/**
* Overloaded assigenment operator.
@@ -300,7 +300,7 @@ public:
*
* @return an instance of a KURIFilterData object.
*/
- KURIFilterData& operator=( const QString& url ) { reinit( url ); return *this; }
+ KURIFilterData& operator=( const TQString& url ) { reinit( url ); return *this; }
protected:
@@ -314,20 +314,20 @@ protected:
* Initializes the KURIFilterData on construction.
* @param url the URL to initialize the object with
*/
- void init( const QString& url = QString::null );
+ void init( const TQString& url = TQString::null );
private:
// BC hack to avoid leaking KURIFilterDataPrivate objects.
// setData() and operator= used to call init() without deleting `d'
void reinit(const KURL& url);
- void reinit(const QString& url = QString::null);
+ void reinit(const TQString& url = TQString::null);
bool m_bCheckForExecutables;
bool m_bChanged;
- QString m_strErrMsg;
- QString m_strIconName;
+ TQString m_strErrMsg;
+ TQString m_strIconName;
KURL m_pURI;
URITypes m_iType;
@@ -361,14 +361,14 @@ public:
* @param name the name of the plugin, or 0 for no name
* @param pri the priority of the plugin.
*/
- KURIFilterPlugin( QObject *parent = 0, const char *name = 0, double pri = 1.0 );
+ KURIFilterPlugin( TQObject *parent = 0, const char *name = 0, double pri = 1.0 );
/**
* Returns the filter's name.
*
* @return A string naming the filter.
*/
- virtual QString name() const { return m_strName; }
+ virtual TQString name() const { return m_strName; }
/**
* Returns the filter's priority.
@@ -396,14 +396,14 @@ public:
*
* @return A configuration module, 0 if the filter isn't configurable.
*/
- virtual KCModule *configModule( QWidget*, const char* ) const { return 0; }
+ virtual KCModule *configModule( TQWidget*, const char* ) const { return 0; }
/**
* Returns the name of the configuration module for the filter.
*
- * @return the name of a configuration module or QString::null if none.
+ * @return the name of a configuration module or TQString::null if none.
*/
- virtual QString configName() const { return name(); }
+ virtual TQString configName() const { return name(); }
protected:
@@ -415,7 +415,7 @@ protected:
/**
* Sets the error message in @p data to @p errormsg.
*/
- void setErrorMsg ( KURIFilterData& data, const QString& errmsg ) const {
+ void setErrorMsg ( KURIFilterData& data, const TQString& errmsg ) const {
data.m_strErrMsg = errmsg;
}
@@ -431,9 +431,9 @@ protected:
* Sets the arguments and options string in @p data
* to @p args if any were found during filterting.
*/
- void setArguments( KURIFilterData& data, const QString& args ) const;
+ void setArguments( KURIFilterData& data, const TQString& args ) const;
- QString m_strName;
+ TQString m_strName;
double m_dblPriority;
protected:
@@ -446,7 +446,7 @@ private:
/**
* A list of filter plugins.
*/
-class KIO_EXPORT KURIFilterPluginList : public QPtrList<KURIFilterPlugin>
+class KIO_EXPORT KURIFilterPluginList : public TQPtrList<KURIFilterPlugin>
{
public:
virtual int compareItems(Item a, Item b)
@@ -500,25 +500,25 @@ private:
* of a boolean flag:
*
* \code
- * QString u = KURIFilter::self()->filteredURI( "kde.org" );
+ * TQString u = KURIFilter::self()->filteredURI( "kde.org" );
* \endcode
*
* You can also restrict the filter(s) to be used by supplying
* the name of the filter(s) to use. By defualt all available
* filters will be used. To use specific filters, add the names
- * of the filters you want to use to a QStringList and invoke
+ * of the filters you want to use to a TQStringList and invoke
* the appropriate filtering function. The examples below show
* the use of specific filters. The first one uses a single
* filter called kshorturifilter while the second example uses
* multiple filters:
*
* \code
- * QString text = "kde.org";
+ * TQString text = "kde.org";
* bool filtered = KURIFilter::self()->filterURI( text, "kshorturifilter" );
* \endcode
*
* \code
- * QStringList list;
+ * TQStringList list;
* list << "kshorturifilter" << "localdomainfilter";
* bool filtered = KURIFilter::self()->filterURI( text, list );
* \endcode
@@ -555,7 +555,7 @@ public:
*
* @return a boolean indicating whether the URI has been changed
*/
- bool filterURI( KURIFilterData& data, const QStringList& filters = QStringList() );
+ bool filterURI( KURIFilterData& data, const TQStringList& filters = TQStringList() );
/**
* Filters the URI given by the URL.
@@ -568,7 +568,7 @@ public:
*
* @return a boolean indicating whether the URI has been changed
*/
- bool filterURI( KURL &uri, const QStringList& filters = QStringList() );
+ bool filterURI( KURL &uri, const TQStringList& filters = TQStringList() );
/**
* Filters a string representing a URI.
@@ -581,7 +581,7 @@ public:
*
* @return a boolean indicating whether the URI has been changed
*/
- bool filterURI( QString &uri, const QStringList& filters = QStringList() );
+ bool filterURI( TQString &uri, const TQStringList& filters = TQStringList() );
/**
* Returns the filtered URI.
@@ -594,7 +594,7 @@ public:
*
* @return the filtered URI or null if it cannot be filtered
*/
- KURL filteredURI( const KURL &uri, const QStringList& filters = QStringList() );
+ KURL filteredURI( const KURL &uri, const TQStringList& filters = TQStringList() );
/**
* Return a filtered string representation of a URI.
@@ -607,7 +607,7 @@ public:
*
* @return the filtered URI or null if it cannot be filtered
*/
- QString filteredURI( const QString &uri, const QStringList& filters = QStringList() );
+ TQString filteredURI( const TQString &uri, const TQStringList& filters = TQStringList() );
/**
* Return an iterator to iterate over all loaded
@@ -615,15 +615,15 @@ public:
*
* @return a plugin iterator.
*/
- QPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
+ TQPtrListIterator<KURIFilterPlugin> pluginsIterator() const;
/**
* Return a list of the names of all loaded plugins.
*
- * @return a QStringList of plugin names
+ * @return a TQStringList of plugin names
* @since 3.1
*/
- QStringList pluginNames() const;
+ TQStringList pluginNames() const;
protected:
diff --git a/kio/kio/kurlcompletion.cpp b/kio/kio/kurlcompletion.cpp
index cddd9fa79..88a566b5f 100644
--- a/kio/kio/kurlcompletion.cpp
+++ b/kio/kio/kurlcompletion.cpp
@@ -28,16 +28,16 @@
#include <assert.h>
#include <limits.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdeepcopy.h>
-#include <qthread.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdeepcopy.h>
+#include <tqthread.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -61,10 +61,10 @@
#include "kurlcompletion.h"
-static bool expandTilde(QString &);
-static bool expandEnv(QString &);
+static bool expandTilde(TQString &);
+static bool expandEnv(TQString &);
-static QString unescape(const QString &text);
+static TQString unescape(const TQString &text);
// Permission mask for files that are executable by
// user, group or other
@@ -84,7 +84,7 @@ class CompletionMatchEvent : public QCustomEvent
{
public:
CompletionMatchEvent( CompletionThread *thread ) :
- QCustomEvent( uniqueType() ),
+ TQCustomEvent( uniqueType() ),
m_completionThread( thread )
{}
@@ -99,17 +99,17 @@ class CompletionThread : public QThread
{
protected:
CompletionThread( KURLCompletion *receiver ) :
- QThread(),
+ TQThread(),
m_receiver( receiver ),
m_terminationRequested( false )
{}
public:
void requestTermination() { m_terminationRequested = true; }
- QDeepCopy<QStringList> matches() const { return m_matches; }
+ TQDeepCopy<TQStringList> matches() const { return m_matches; }
protected:
- void addMatch( const QString &match ) { m_matches.append( match ); }
+ void addMatch( const TQString &match ) { m_matches.append( match ); }
bool terminationRequested() const { return m_terminationRequested; }
void done()
{
@@ -121,7 +121,7 @@ protected:
private:
KURLCompletion *m_receiver;
- QStringList m_matches;
+ TQStringList m_matches;
bool m_terminationRequested;
};
@@ -140,11 +140,11 @@ public:
protected:
virtual void run()
{
- static const QChar tilde = '~';
+ static const TQChar tilde = '~';
struct passwd *pw;
while ( ( pw = ::getpwent() ) && !terminationRequested() )
- addMatch( tilde + QString::fromLocal8Bit( pw->pw_name ) );
+ addMatch( tilde + TQString::fromLocal8Bit( pw->pw_name ) );
::endpwent();
@@ -158,15 +158,15 @@ class DirectoryListThread : public CompletionThread
{
public:
DirectoryListThread( KURLCompletion *receiver,
- const QStringList &dirList,
- const QString &filter,
+ const TQStringList &dirList,
+ const TQString &filter,
bool onlyExe,
bool onlyDir,
bool noHidden,
bool appendSlashToDir ) :
CompletionThread( receiver ),
- m_dirList( QDeepCopy<QStringList>( dirList ) ),
- m_filter( QDeepCopy<QString>( filter ) ),
+ m_dirList( TQDeepCopy<TQStringList>( dirList ) ),
+ m_filter( TQDeepCopy<TQString>( filter ) ),
m_onlyExe( onlyExe ),
m_onlyDir( onlyDir ),
m_noHidden( noHidden ),
@@ -176,8 +176,8 @@ public:
virtual void run();
private:
- QStringList m_dirList;
- QString m_filter;
+ TQStringList m_dirList;
+ TQString m_filter;
bool m_onlyExe;
bool m_onlyDir;
bool m_noHidden;
@@ -192,22 +192,22 @@ void DirectoryListThread::run()
// of all of the things that would seem to be problematic. Here are a few
// things that I have checked to be safe here (some used indirectly):
//
- // QDir::currentDirPath(), QDir::setCurrent(), QFile::decodeName(), QFile::encodeName()
- // QString::fromLocal8Bit(), QString::local8Bit(), QTextCodec::codecForLocale()
+ // TQDir::currentDirPath(), TQDir::setCurrent(), TQFile::decodeName(), TQFile::encodeName()
+ // TQString::fromLocal8Bit(), TQString::local8Bit(), TQTextCodec::codecForLocale()
//
// Also see (for POSIX functions):
// http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html
DIR *dir = 0;
- for ( QStringList::ConstIterator it = m_dirList.begin();
+ for ( TQStringList::ConstIterator it = m_dirList.begin();
it != m_dirList.end() && !terminationRequested();
++it )
{
// Open the next directory
if ( !dir ) {
- dir = ::opendir( QFile::encodeName( *it ) );
+ dir = ::opendir( TQFile::encodeName( *it ) );
if ( ! dir ) {
kdDebug() << "Failed to open dir: " << *it << endl;
done();
@@ -219,8 +219,8 @@ void DirectoryListThread::run()
// chdir to the directroy so we won't have to deal with full paths
// with stat()
- QString path = QDir::currentDirPath();
- QDir::setCurrent( *it );
+ TQString path = TQDir::currentDirPath();
+ TQDir::setCurrent( *it );
// Loop through all directory entries
// Solaris and IRIX dirent structures do not allocate space for d_name. On
@@ -256,7 +256,7 @@ void DirectoryListThread::run()
if ( dirEntry->d_name[0] == '.' && dirEntry->d_name[1] == '.' && dirEntry->d_name[2] == '\0' )
continue;
- QString file = QFile::decodeName( dirEntry->d_name );
+ TQString file = TQFile::decodeName( dirEntry->d_name );
if ( m_filter.isEmpty() || file.startsWith( m_filter ) ) {
@@ -293,7 +293,7 @@ void DirectoryListThread::run()
// chdir to the original directory
- QDir::setCurrent( path );
+ TQDir::setCurrent( path );
::closedir( dir );
dir = 0;
@@ -313,19 +313,19 @@ void DirectoryListThread::run()
class KURLCompletion::MyURL
{
public:
- MyURL(const QString &url, const QString &cwd);
+ MyURL(const TQString &url, const TQString &cwd);
MyURL(const MyURL &url);
~MyURL();
KURL *kurl() const { return m_kurl; }
- QString protocol() const { return m_kurl->protocol(); }
+ TQString protocol() const { return m_kurl->protocol(); }
// The directory with a trailing '/'
- QString dir() const { return m_kurl->directory(false, false); }
- QString file() const { return m_kurl->fileName(false); }
+ TQString dir() const { return m_kurl->directory(false, false); }
+ TQString file() const { return m_kurl->fileName(false); }
// The initial, unparsed, url, as a string.
- QString url() const { return m_url; }
+ TQString url() const { return m_url; }
// Is the initial string a URL, or just a path (whether absolute or relative)
bool isURL() const { return m_isURL; }
@@ -333,14 +333,14 @@ public:
void filter( bool replace_user_dir, bool replace_env );
private:
- void init(const QString &url, const QString &cwd);
+ void init(const TQString &url, const TQString &cwd);
KURL *m_kurl;
- QString m_url;
+ TQString m_url;
bool m_isURL;
};
-KURLCompletion::MyURL::MyURL(const QString &url, const QString &cwd)
+KURLCompletion::MyURL::MyURL(const TQString &url, const TQString &cwd)
{
init(url, cwd);
}
@@ -352,24 +352,24 @@ KURLCompletion::MyURL::MyURL(const MyURL &url)
m_isURL = url.m_isURL;
}
-void KURLCompletion::MyURL::init(const QString &url, const QString &cwd)
+void KURLCompletion::MyURL::init(const TQString &url, const TQString &cwd)
{
// Save the original text
m_url = url;
// Non-const copy
- QString url_copy = url;
+ TQString url_copy = url;
// Special shortcuts for "man:" and "info:"
if ( url_copy[0] == '#' ) {
if ( url_copy[1] == '#' )
- url_copy.replace( 0, 2, QString("info:") );
+ url_copy.replace( 0, 2, TQString("info:") );
else
- url_copy.replace( 0, 1, QString("man:") );
+ url_copy.replace( 0, 1, TQString("man:") );
}
// Look for a protocol in 'url'
- QRegExp protocol_regex = QRegExp( "^[^/\\s\\\\]*:" );
+ TQRegExp protocol_regex = TQRegExp( "^[^/\\s\\\\]*:" );
// Assume "file:" or whatever is given by 'cwd' if there is
// no protocol. (KURL does this only for absoute paths)
@@ -384,7 +384,7 @@ void KURLCompletion::MyURL::init(const QString &url, const QString &cwd)
if ( cwd.isEmpty() )
{
m_kurl = new KURL();
- if ( !QDir::isRelativePath(url_copy) || url_copy[0] == '$' || url_copy[0] == '~' )
+ if ( !TQDir::isRelativePath(url_copy) || url_copy[0] == '$' || url_copy[0] == '~' )
m_kurl->setPath( url_copy );
else
*m_kurl = url_copy;
@@ -394,7 +394,7 @@ void KURLCompletion::MyURL::init(const QString &url, const QString &cwd)
KURL base = KURL::fromPathOrURL( cwd );
base.adjustPath(+1);
- if ( !QDir::isRelativePath(url_copy) || url_copy[0] == '~' || url_copy[0] == '$' )
+ if ( !TQDir::isRelativePath(url_copy) || url_copy[0] == '~' || url_copy[0] == '$' )
{
m_kurl = new KURL();
m_kurl->setPath( url_copy );
@@ -416,7 +416,7 @@ KURLCompletion::MyURL::~MyURL()
void KURLCompletion::MyURL::filter( bool replace_user_dir, bool replace_env )
{
- QString d = dir() + file();
+ TQString d = dir() + file();
if ( replace_user_dir ) expandTilde( d );
if ( replace_env ) expandEnv( d );
m_kurl->setPath( d );
@@ -434,7 +434,7 @@ public:
dirListThread(0) {}
~KURLCompletionPrivate();
- QValueList<KURL*> list_urls;
+ TQValueList<KURL*> list_urls;
bool onlyLocalProto;
@@ -446,13 +446,13 @@ public:
bool popup_append_slash;
// Keep track of currently listed files to avoid reading them again
- QString last_path_listed;
- QString last_file_listed;
- QString last_prepend;
+ TQString last_path_listed;
+ TQString last_file_listed;
+ TQString last_prepend;
int last_compl_type;
int last_no_hidden;
- QString cwd; // "current directory" = base dir for completion
+ TQString cwd; // "current directory" = base dir for completion
KURLCompletion::Mode mode; // ExeCompletion, FileCompletion, DirCompletion
bool replace_env;
@@ -461,13 +461,13 @@ public:
KIO::ListJob *list_job; // kio job to list directories
- QString prepend; // text to prepend to listed items
- QString compl_text; // text to pass on to KCompletion
+ TQString prepend; // text to prepend to listed items
+ TQString compl_text; // text to pass on to KCompletion
// Filters for files read with kio
bool list_urls_only_exe; // true = only list executables
bool list_urls_no_hidden;
- QString list_urls_filter; // filter for listed files
+ TQString list_urls_filter; // filter for listed files
CompletionThread *userListThread;
CompletionThread *dirListThread;
@@ -509,7 +509,7 @@ void KURLCompletion::init()
{
d = new KURLCompletionPrivate;
- d->cwd = QDir::homeDirPath();
+ d->cwd = TQDir::homeDirPath();
d->replace_home = true;
d->replace_env = true;
@@ -527,12 +527,12 @@ void KURLCompletion::init()
d->onlyLocalProto = c->readBoolEntry("LocalProtocolsOnly", false);
}
-void KURLCompletion::setDir(const QString &dir)
+void KURLCompletion::setDir(const TQString &dir)
{
d->cwd = dir;
}
-QString KURLCompletion::dir() const
+TQString KURLCompletion::dir() const
{
return d->cwd;
}
@@ -572,7 +572,7 @@ void KURLCompletion::setReplaceHome( bool replace )
*
* Entry point for file name completion
*/
-QString KURLCompletion::makeCompletion(const QString &text)
+TQString KURLCompletion::makeCompletion(const TQString &text)
{
//kdDebug() << "KURLCompletion::makeCompletion: " << text << " d->cwd=" << d->cwd << endl;
@@ -588,7 +588,7 @@ QString KURLCompletion::makeCompletion(const QString &text)
d->prepend = text.left( text.length() - toRemove );
d->complete_url = url.isURL();
- QString match;
+ TQString match;
// Environment variables
//
@@ -635,7 +635,7 @@ QString KURLCompletion::makeCompletion(const QString &text)
setListedURL( CTNone );
stop();
- return QString::null;
+ return TQString::null;
}
/*
@@ -644,7 +644,7 @@ QString KURLCompletion::makeCompletion(const QString &text)
* Go on and call KCompletion.
* Called when all matches have been added
*/
-QString KURLCompletion::finished()
+TQString KURLCompletion::finished()
{
if ( d->last_compl_type == CTInfo )
return KCompletion::makeCompletion( d->compl_text.lower() );
@@ -676,7 +676,7 @@ void KURLCompletion::stop()
}
if ( !d->list_urls.isEmpty() ) {
- QValueList<KURL*>::Iterator it = d->list_urls.begin();
+ TQValueList<KURL*>::Iterator it = d->list_urls.begin();
for ( ; it != d->list_urls.end(); it++ )
delete (*it);
d->list_urls.clear();
@@ -692,8 +692,8 @@ void KURLCompletion::stop()
* Keep track of the last listed directory
*/
void KURLCompletion::setListedURL( int complType,
- const QString& dir,
- const QString& filter,
+ const TQString& dir,
+ const TQString& filter,
bool no_hidden )
{
d->last_compl_type = complType;
@@ -704,8 +704,8 @@ void KURLCompletion::setListedURL( int complType,
}
bool KURLCompletion::isListedURL( int complType,
- const QString& dir,
- const QString& filter,
+ const TQString& dir,
+ const TQString& filter,
bool no_hidden )
{
return d->last_compl_type == complType
@@ -734,7 +734,7 @@ bool KURLCompletion::isAutoCompletion()
// User directories
//
-bool KURLCompletion::userCompletion(const MyURL &url, QString *match)
+bool KURLCompletion::userCompletion(const MyURL &url, TQString *match)
{
if ( url.protocol() != "file"
|| !url.dir().isEmpty()
@@ -753,7 +753,7 @@ bool KURLCompletion::userCompletion(const MyURL &url, QString *match)
// are added to the first matching case.
d->userListThread->wait( 200 );
- QStringList l = d->userListThread->matches();
+ TQStringList l = d->userListThread->matches();
addMatches( l );
}
}
@@ -768,7 +768,7 @@ bool KURLCompletion::userCompletion(const MyURL &url, QString *match)
extern char **environ; // Array of environment variables
-bool KURLCompletion::envCompletion(const MyURL &url, QString *match)
+bool KURLCompletion::envCompletion(const MyURL &url, TQString *match)
{
if ( url.file().at(0) != '$' )
return false;
@@ -779,12 +779,12 @@ bool KURLCompletion::envCompletion(const MyURL &url, QString *match)
char **env = environ;
- QString dollar = QString("$");
+ TQString dollar = TQString("$");
- QStringList l;
+ TQStringList l;
while ( *env ) {
- QString s = QString::fromLocal8Bit( *env );
+ TQString s = TQString::fromLocal8Bit( *env );
int pos = s.find('=');
@@ -811,12 +811,12 @@ bool KURLCompletion::envCompletion(const MyURL &url, QString *match)
// Executables
//
-bool KURLCompletion::exeCompletion(const MyURL &url, QString *match)
+bool KURLCompletion::exeCompletion(const MyURL &url, TQString *match)
{
if ( url.protocol() != "file" )
return false;
- QString dir = url.dir();
+ TQString dir = url.dir();
dir = unescape( dir ); // remove escapes
@@ -827,9 +827,9 @@ bool KURLCompletion::exeCompletion(const MyURL &url, QString *match)
// 3. $PATH
// 4. no directory at all
- QStringList dirList;
+ TQStringList dirList;
- if ( !QDir::isRelativePath(dir) ) {
+ if ( !TQDir::isRelativePath(dir) ) {
// complete path in url
dirList.append( dir );
}
@@ -839,10 +839,10 @@ bool KURLCompletion::exeCompletion(const MyURL &url, QString *match)
}
else if ( !url.file().isEmpty() ) {
// $PATH
- dirList = QStringList::split(KPATH_SEPARATOR,
- QString::fromLocal8Bit(::getenv("PATH")));
+ dirList = TQStringList::split(KPATH_SEPARATOR,
+ TQString::fromLocal8Bit(::getenv("PATH")));
- QStringList::Iterator it = dirList.begin();
+ TQStringList::Iterator it = dirList.begin();
for ( ; it != dirList.end(); it++ )
(*it).append('/');
@@ -868,7 +868,7 @@ bool KURLCompletion::exeCompletion(const MyURL &url, QString *match)
else {
if ( d->dirListThread )
setListedURL( CTExe, dir, url.file(), no_hidden_files );
- *match = QString::null;
+ *match = TQString::null;
}
return true;
@@ -879,12 +879,12 @@ bool KURLCompletion::exeCompletion(const MyURL &url, QString *match)
// Local files
//
-bool KURLCompletion::fileCompletion(const MyURL &url, QString *match)
+bool KURLCompletion::fileCompletion(const MyURL &url, TQString *match)
{
if ( url.protocol() != "file" )
return false;
- QString dir = url.dir();
+ TQString dir = url.dir();
if (url.url()[0] == '.')
{
@@ -911,9 +911,9 @@ bool KURLCompletion::fileCompletion(const MyURL &url, QString *match)
// 2. current directory (d->cwd)
// 3. no directory at all
- QStringList dirList;
+ TQStringList dirList;
- if ( !QDir::isRelativePath(dir) ) {
+ if ( !TQDir::isRelativePath(dir) ) {
// complete path in url
dirList.append( dir );
}
@@ -948,7 +948,7 @@ bool KURLCompletion::fileCompletion(const MyURL &url, QString *match)
*match = finished();
}
else {
- *match = QString::null;
+ *match = TQString::null;
}
return true;
@@ -959,7 +959,7 @@ bool KURLCompletion::fileCompletion(const MyURL &url, QString *match)
// URLs not handled elsewhere...
//
-bool KURLCompletion::urlCompletion(const MyURL &url, QString *match)
+bool KURLCompletion::urlCompletion(const MyURL &url, TQString *match)
{
//kdDebug() << "urlCompletion: url = " << *url.kurl() << endl;
if (d->onlyLocalProto && KProtocolInfo::protocolClass(url.protocol()) != ":local")
@@ -977,8 +977,8 @@ bool KURLCompletion::urlCompletion(const MyURL &url, QString *match)
// 3. there is no directory (e.g. "ftp://ftp.kd" shouldn't do anything)
// 4. auto or popup completion mode depending on settings
- bool man_or_info = ( url_dir.protocol() == QString("man")
- || url_dir.protocol() == QString("info") );
+ bool man_or_info = ( url_dir.protocol() == TQString("man")
+ || url_dir.protocol() == TQString("info") );
if ( !url_dir.isValid()
|| !KProtocolInfo::supportsListing( url_dir )
@@ -992,7 +992,7 @@ bool KURLCompletion::urlCompletion(const MyURL &url, QString *match)
url_dir.setFileName(""); // not really nesseccary, but clear the filename anyway...
// Remove escapes
- QString dir = url_dir.directory( false, false );
+ TQString dir = url_dir.directory( false, false );
dir = unescape( dir );
@@ -1007,18 +1007,18 @@ bool KURLCompletion::urlCompletion(const MyURL &url, QString *match)
setListedURL( CTUrl, url_dir.prettyURL(), "" );
- QValueList<KURL*> url_list;
+ TQValueList<KURL*> url_list;
url_list.append( new KURL( url_dir ) );
listURLs( url_list, "", false );
- *match = QString::null;
+ *match = TQString::null;
}
else if ( !isRunning() ) {
*match = finished();
}
else {
- *match = QString::null;
+ *match = TQString::null;
}
return true;
@@ -1034,10 +1034,10 @@ bool KURLCompletion::urlCompletion(const MyURL &url, QString *match)
*
* Called to add matches to KCompletion
*/
-void KURLCompletion::addMatches( const QStringList &matches )
+void KURLCompletion::addMatches( const TQStringList &matches )
{
- QStringList::ConstIterator it = matches.begin();
- QStringList::ConstIterator end = matches.end();
+ TQStringList::ConstIterator it = matches.begin();
+ TQStringList::ConstIterator end = matches.end();
if ( d->complete_url )
for ( ; it != end; it++ )
@@ -1056,12 +1056,12 @@ void KURLCompletion::addMatches( const QStringList &matches )
* In either case, addMatches() is called with the listed
* files, and eventually finished() when the listing is done
*
- * Returns the match if available, or QString::null if
+ * Returns the match if available, or TQString::null if
* DirLister timed out or using kio
*/
-QString KURLCompletion::listDirectories(
- const QStringList &dirList,
- const QString &filter,
+TQString KURLCompletion::listDirectories(
+ const TQStringList &dirList,
+ const TQString &filter,
bool only_exe,
bool only_dir,
bool no_hidden,
@@ -1078,9 +1078,9 @@ QString KURLCompletion::listDirectories(
if ( d->dirListThread )
d->dirListThread->requestTermination();
- QStringList dirs;
+ TQStringList dirs;
- for ( QStringList::ConstIterator it = dirList.begin();
+ for ( TQStringList::ConstIterator it = dirList.begin();
it != dirList.end();
++it )
{
@@ -1103,9 +1103,9 @@ QString KURLCompletion::listDirectories(
// Use KIO
//kdDebug() << "Listing (listDirectories): " << dirList << " with KIO" << endl;
- QValueList<KURL*> url_list;
+ TQValueList<KURL*> url_list;
- QStringList::ConstIterator it = dirList.begin();
+ TQStringList::ConstIterator it = dirList.begin();
for ( ; it != dirList.end(); it++ )
url_list.append( new KURL(*it) );
@@ -1113,7 +1113,7 @@ QString KURLCompletion::listDirectories(
listURLs( url_list, filter, only_exe, no_hidden );
// Will call addMatches() and finished()
- return QString::null;
+ return TQString::null;
}
}
@@ -1126,8 +1126,8 @@ QString KURLCompletion::listDirectories(
* finished() is called when the listing is done
*/
void KURLCompletion::listURLs(
- const QValueList<KURL *> &urls,
- const QString &filter,
+ const TQValueList<KURL *> &urls,
+ const TQString &filter,
bool only_exe,
bool no_hidden )
{
@@ -1156,20 +1156,20 @@ void KURLCompletion::listURLs(
*/
void KURLCompletion::slotEntries(KIO::Job*, const KIO::UDSEntryList& entries)
{
- QStringList matches;
+ TQStringList matches;
KIO::UDSEntryListConstIterator it = entries.begin();
KIO::UDSEntryListConstIterator end = entries.end();
- QString filter = d->list_urls_filter;
+ TQString filter = d->list_urls_filter;
int filter_len = filter.length();
// Iterate over all files
//
for (; it != end; ++it) {
- QString name;
- QString url;
+ TQString name;
+ TQString url;
bool is_exe = false;
bool is_dir = false;
@@ -1256,12 +1256,12 @@ void KURLCompletion::slotIOFinished( KIO::Job * job )
assert( d->list_job );
connect( d->list_job,
- SIGNAL(result(KIO::Job*)),
- SLOT(slotIOFinished(KIO::Job*)) );
+ TQT_SIGNAL(result(KIO::Job*)),
+ TQT_SLOT(slotIOFinished(KIO::Job*)) );
connect( d->list_job,
- SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
- SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)) );
+ TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
+ TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)) );
delete kurl;
}
@@ -1278,7 +1278,7 @@ void KURLCompletion::slotIOFinished( KIO::Job * job )
* Append '/' to directories for file completion. This is
* done here to avoid stat()'ing a lot of files
*/
-void KURLCompletion::postProcessMatch( QString *match ) const
+void KURLCompletion::postProcessMatch( TQString *match ) const
{
// kdDebug() << "KURLCompletion::postProcess: " << *match << endl;
@@ -1291,27 +1291,27 @@ void KURLCompletion::postProcessMatch( QString *match ) const
}
}
-void KURLCompletion::adjustMatch( QString& match ) const
+void KURLCompletion::adjustMatch( TQString& match ) const
{
if ( match.at( match.length()-1 ) != '/' )
{
- QString copy;
+ TQString copy;
- if ( match.startsWith( QString("file:") ) )
+ if ( match.startsWith( TQString("file:") ) )
copy = KURL(match).path();
else
copy = match;
expandTilde( copy );
expandEnv( copy );
- if ( QDir::isRelativePath(copy) )
+ if ( TQDir::isRelativePath(copy) )
copy.prepend( d->cwd + '/' );
// kdDebug() << "postProcess: stating " << copy << endl;
KDE_struct_stat sbuff;
- QCString file = QFile::encodeName( copy );
+ TQCString file = TQFile::encodeName( copy );
if ( KDE_stat( (const char*)file, &sbuff ) == 0 ) {
if ( S_ISDIR ( sbuff.st_mode ) )
@@ -1323,10 +1323,10 @@ void KURLCompletion::adjustMatch( QString& match ) const
}
}
-void KURLCompletion::postProcessMatches( QStringList * matches ) const
+void KURLCompletion::postProcessMatches( TQStringList * matches ) const
{
if ( !matches->isEmpty() && d->last_compl_type == CTFile ) {
- QStringList::Iterator it = matches->begin();
+ TQStringList::Iterator it = matches->begin();
for (; it != matches->end(); ++it ) {
adjustMatch( (*it) );
}
@@ -1343,7 +1343,7 @@ void KURLCompletion::postProcessMatches( KCompletionMatches * matches ) const
}
}
-void KURLCompletion::customEvent(QCustomEvent *e)
+void KURLCompletion::customEvent(TQCustomEvent *e)
{
if ( e->type() == CompletionMatchEvent::uniqueType() ) {
@@ -1370,12 +1370,12 @@ void KURLCompletion::customEvent(QCustomEvent *e)
}
// static
-QString KURLCompletion::replacedPath( const QString& text, bool replaceHome, bool replaceEnv )
+TQString KURLCompletion::replacedPath( const TQString& text, bool replaceHome, bool replaceEnv )
{
if ( text.isEmpty() )
return text;
- MyURL url( text, QString::null ); // no need to replace something of our current cwd
+ MyURL url( text, TQString::null ); // no need to replace something of our current cwd
if ( !url.kurl()->isLocalFile() )
return text;
@@ -1384,7 +1384,7 @@ QString KURLCompletion::replacedPath( const QString& text, bool replaceHome, boo
}
-QString KURLCompletion::replacedPath( const QString& text )
+TQString KURLCompletion::replacedPath( const TQString& text )
{
return replacedPath( text, d->replace_home, d->replace_env );
}
@@ -1399,7 +1399,7 @@ QString KURLCompletion::replacedPath( const QString& text )
* Expand environment variables in text. Escaped '$' are ignored.
* Return true if expansion was made.
*/
-static bool expandEnv( QString &text )
+static bool expandEnv( TQString &text )
{
// Find all environment variables beginning with '$'
//
@@ -1433,9 +1433,9 @@ static bool expandEnv( QString &text )
//
if ( pos2 >= 0 ) {
int len = pos2 - pos;
- QString key = text.mid( pos+1, len-1);
- QString value =
- QString::fromLocal8Bit( ::getenv(key.local8Bit()) );
+ TQString key = text.mid( pos+1, len-1);
+ TQString value =
+ TQString::fromLocal8Bit( ::getenv(key.local8Bit()) );
if ( !value.isEmpty() ) {
expanded = true;
@@ -1458,7 +1458,7 @@ static bool expandEnv( QString &text )
* Replace "~user" with the users home directory
* Return true if expansion was made.
*/
-static bool expandTilde(QString &text)
+static bool expandTilde(TQString &text)
{
if ( text[0] != '~' )
return false;
@@ -1480,13 +1480,13 @@ static bool expandTilde(QString &text)
//
if ( pos2 >= 0 ) {
- QString user = text.mid( 1, pos2-1 );
- QString dir;
+ TQString user = text.mid( 1, pos2-1 );
+ TQString dir;
// A single ~ is replaced with $HOME
//
if ( user.isEmpty() ) {
- dir = QDir::homeDirPath();
+ dir = TQDir::homeDirPath();
}
// ~user is replaced with the dir from passwd
//
@@ -1494,7 +1494,7 @@ static bool expandTilde(QString &text)
struct passwd *pw = ::getpwnam( user.local8Bit() );
if ( pw )
- dir = QFile::decodeName( pw->pw_dir );
+ dir = TQFile::decodeName( pw->pw_dir );
::endpwent();
}
@@ -1514,9 +1514,9 @@ static bool expandTilde(QString &text)
* Remove escapes and return the result in a new string
*
*/
-static QString unescape(const QString &text)
+static TQString unescape(const TQString &text)
{
- QString result;
+ TQString result;
for (uint pos = 0; pos < text.length(); pos++)
if ( text[pos] != '\\' )
diff --git a/kio/kio/kurlcompletion.h b/kio/kio/kurlcompletion.h
index 85e9b027f..a06d7dc4b 100644
--- a/kio/kio/kurlcompletion.h
+++ b/kio/kio/kurlcompletion.h
@@ -25,8 +25,8 @@
#include <kcompletion.h>
#include <kio/jobclasses.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class KURL;
class KURLCompletionPrivate;
@@ -74,25 +74,25 @@ public:
* The completion is done asyncronously if KIO is used.
*
* Returns the first match for user, environment, and local dir completion
- * and QString::null for asynchronous completion (KIO or threaded).
+ * and TQString::null for asynchronous completion (KIO or threaded).
*
* @param text the text to complete
- * @return the first match, or QString::null if not found
+ * @return the first match, or TQString::null if not found
*/
- virtual QString makeCompletion(const QString &text); // KDE4: remove return value, it's often null due to threading
+ virtual TQString makeCompletion(const TQString &text); // KDE4: remove return value, it's often null due to threading
/**
* Sets the current directory (used as base for completion).
* Default = $HOME.
* @param dir the current directory, either as a path or URL
*/
- virtual void setDir(const QString &dir);
+ virtual void setDir(const TQString &dir);
/**
* Returns the current directory, as it was given in setDir
* @return the current directory (path or URL)
*/
- virtual QString dir() const;
+ virtual TQString dir() const;
/**
* Check whether asynchronous completion is in progress.
@@ -157,23 +157,23 @@ public:
* @return the path or URL resulting from this operation. If you
* want to convert it to a KURL, use KURL::fromPathOrURL.
*/
- QString replacedPath( const QString& text );
+ TQString replacedPath( const TQString& text );
/**
* @internal I'll let ossi add a real one to KShell :)
* @since 3.2
*/
- static QString replacedPath( const QString& text,
+ static TQString replacedPath( const TQString& text,
bool replaceHome, bool replaceEnv = true );
class MyURL;
protected:
// Called by KCompletion, adds '/' to directories
- void postProcessMatch( QString *match ) const;
- void postProcessMatches( QStringList *matches ) const;
+ void postProcessMatch( TQString *match ) const;
+ void postProcessMatches( TQStringList *matches ) const;
void postProcessMatches( KCompletionMatches* matches ) const;
- virtual void customEvent( QCustomEvent *e );
+ virtual void customEvent( TQCustomEvent *e );
protected slots:
void slotEntries( KIO::Job *, const KIO::UDSEntryList& );
@@ -183,48 +183,48 @@ private:
bool isAutoCompletion();
- bool userCompletion(const MyURL &url, QString *match);
- bool envCompletion(const MyURL &url, QString *match);
- bool exeCompletion(const MyURL &url, QString *match);
- bool fileCompletion(const MyURL &url, QString *match);
- bool urlCompletion(const MyURL &url, QString *match);
+ bool userCompletion(const MyURL &url, TQString *match);
+ bool envCompletion(const MyURL &url, TQString *match);
+ bool exeCompletion(const MyURL &url, TQString *match);
+ bool fileCompletion(const MyURL &url, TQString *match);
+ bool urlCompletion(const MyURL &url, TQString *match);
// List a directory using readdir()
- void listDir( const QString& dir,
- QStringList *matches,
- const QString& filter,
+ void listDir( const TQString& dir,
+ TQStringList *matches,
+ const TQString& filter,
bool only_exe,
bool no_hidden );
// List the next dir in m_dirs
- QString listDirectories(const QStringList &,
- const QString &,
+ TQString listDirectories(const TQStringList &,
+ const TQString &,
bool only_exe = false,
bool only_dir = false,
bool no_hidden = false,
bool stat_files = true);
- void listURLs( const QValueList<KURL *> &urls,
- const QString &filter = QString::null,
+ void listURLs( const TQValueList<KURL *> &urls,
+ const TQString &filter = TQString::null,
bool only_exe = false,
bool no_hidden = false );
- void addMatches( const QStringList & );
- QString finished();
+ void addMatches( const TQStringList & );
+ TQString finished();
void init();
void setListedURL(int compl_type /* enum ComplType */,
- const QString& dir = QString::null,
- const QString& filter = QString::null,
+ const TQString& dir = TQString::null,
+ const TQString& filter = TQString::null,
bool no_hidden = false );
bool isListedURL( int compl_type /* enum ComplType */,
- const QString& dir = QString::null,
- const QString& filter = QString::null,
+ const TQString& dir = TQString::null,
+ const TQString& filter = TQString::null,
bool no_hidden = false );
- void adjustMatch( QString& match ) const;
+ void adjustMatch( TQString& match ) const;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/kurlpixmapprovider.cpp b/kio/kio/kurlpixmapprovider.cpp
index e20c3b6ec..caeedf066 100644
--- a/kio/kio/kurlpixmapprovider.cpp
+++ b/kio/kio/kurlpixmapprovider.cpp
@@ -20,7 +20,7 @@
#include "kurlpixmapprovider.h"
-QPixmap KURLPixmapProvider::pixmapFor( const QString& url, int size ) {
+TQPixmap KURLPixmapProvider::pixmapFor( const TQString& url, int size ) {
KURL u;
if ( url.at(0) == '/' )
u.setPath( url );
diff --git a/kio/kio/kurlpixmapprovider.h b/kio/kio/kurlpixmapprovider.h
index 7edd37d5b..1fa400c1e 100644
--- a/kio/kio/kurlpixmapprovider.h
+++ b/kio/kio/kurlpixmapprovider.h
@@ -50,7 +50,7 @@ public:
* @return the resulting pixmap
* @see KIcon::StdSizes
*/
- virtual QPixmap pixmapFor( const QString& url, int size = 0 );
+ virtual TQPixmap pixmapFor( const TQString& url, int size = 0 );
protected:
virtual void virtual_hook( int id, void* data );
};
diff --git a/kio/kio/kuserprofile.cpp b/kio/kio/kuserprofile.cpp
index 1895ebb98..b7ef68c76 100644
--- a/kio/kio/kuserprofile.cpp
+++ b/kio/kio/kuserprofile.cpp
@@ -27,10 +27,10 @@
#include <kdebug.h>
#include <kstaticdeleter.h>
-#include <qtl.h>
+#include <tqtl.h>
-template class QPtrList<KServiceTypeProfile>;
-typedef QPtrList<KServiceTypeProfile> KServiceTypeProfileList;
+template class TQPtrList<KServiceTypeProfile>;
+typedef TQPtrList<KServiceTypeProfile> KServiceTypeProfileList;
/*********************************************
*
@@ -55,24 +55,24 @@ void KServiceTypeProfile::initStatic()
KConfig config( "profilerc", true, false);
- static const QString & defaultGroup = KGlobal::staticQString("<default>");
+ static const TQString & defaultGroup = KGlobal::staticQString("<default>");
- QStringList tmpList = config.groupList();
- for (QStringList::Iterator aIt = tmpList.begin();
+ TQStringList tmpList = config.groupList();
+ for (TQStringList::Iterator aIt = tmpList.begin();
aIt != tmpList.end(); ++aIt) {
if ( *aIt == defaultGroup )
continue;
config.setGroup( *aIt );
- QString appId = config.readEntry( "Application" );
+ TQString appId = config.readEntry( "Application" );
KService::Ptr pService = KService::serviceByStorageId(appId);
if ( pService ) {
- QString application = pService->storageId();
- QString type = config.readEntry( "ServiceType" );
- QString type2 = config.readEntry( "GenericServiceType" );
+ TQString application = pService->storageId();
+ TQString type = config.readEntry( "ServiceType" );
+ TQString type2 = config.readEntry( "GenericServiceType" );
if (type2.isEmpty()) // compat code
type2 = (pService->type() == "Application") ? "Application" : "KParts/ReadOnlyPart";
int pref = config.readNumEntry( "Preference" );
@@ -107,10 +107,10 @@ void KServiceTypeProfile::clear()
}
//static
-KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const QString& _servicetype, const QString& _genericServiceType )
+KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const TQString& _servicetype, const TQString& _genericServiceType )
{
OfferList offers;
- QStringList serviceList;
+ TQStringList serviceList;
//kdDebug(7014) << "KServiceTypeProfile::offers( " << _servicetype << "," << _genericServiceType << " )" << endl;
// Note that KServiceTypeProfile::offers() calls KServiceType::offers(),
@@ -120,7 +120,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const QString& _serv
initStatic();
// We want all profiles for servicetype, if we have profiles.
// ## Slow loop, if profilerc is big. We should use a map instead?
- QPtrListIterator<KServiceTypeProfile> it( *s_lstProfiles );
+ TQPtrListIterator<KServiceTypeProfile> it( *s_lstProfiles );
for( ; it.current(); ++it )
if ( it.current()->m_strServiceType == _servicetype )
{
@@ -159,7 +159,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const QString& _serv
// but it's also the case for any service that's neither App nor ReadOnlyPart, e.g. RenameDlg/Plugin
KService::List list = KServiceType::offers( _servicetype );
//kdDebug(7014) << "Using KServiceType::offers, result: " << list.count() << " offers" << endl;
- QValueListIterator<KService::Ptr> it = list.begin();
+ TQValueListIterator<KService::Ptr> it = list.begin();
for( ; it != list.end(); ++it )
{
if (_genericServiceType.isEmpty() /*no constraint*/ || (*it)->hasServiceType( _genericServiceType ))
@@ -191,7 +191,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const QString& _serv
return offers;
}
-KServiceTypeProfile::KServiceTypeProfile( const QString& _servicetype, const QString& _genericServiceType )
+KServiceTypeProfile::KServiceTypeProfile( const TQString& _servicetype, const TQString& _genericServiceType )
{
initStatic();
@@ -203,26 +203,26 @@ KServiceTypeProfile::~KServiceTypeProfile()
{
}
-void KServiceTypeProfile::addService( const QString& _service,
+void KServiceTypeProfile::addService( const TQString& _service,
int _preference, bool _allow_as_default )
{
m_mapServices[ _service ].m_iPreference = _preference;
m_mapServices[ _service ].m_bAllowAsDefault = _allow_as_default;
}
-int KServiceTypeProfile::preference( const QString& _service ) const
+int KServiceTypeProfile::preference( const TQString& _service ) const
{
KService::Ptr service = KService::serviceByName( _service );
if (!service)
return 0;
- QMap<QString,Service>::ConstIterator it = m_mapServices.find( service->storageId() );
+ TQMap<TQString,Service>::ConstIterator it = m_mapServices.find( service->storageId() );
if ( it == m_mapServices.end() )
return 0;
return it.data().m_iPreference;
}
-bool KServiceTypeProfile::allowAsDefault( const QString& _service ) const
+bool KServiceTypeProfile::allowAsDefault( const TQString& _service ) const
{
KService::Ptr service = KService::serviceByName( _service );
if (!service)
@@ -233,21 +233,21 @@ bool KServiceTypeProfile::allowAsDefault( const QString& _service ) const
return false;
// Look what the user says ...
- QMap<QString,Service>::ConstIterator it = m_mapServices.find( service->storageId() );
+ TQMap<TQString,Service>::ConstIterator it = m_mapServices.find( service->storageId() );
if ( it == m_mapServices.end() )
return 0;
return it.data().m_bAllowAsDefault;
}
-KServiceTypeProfile* KServiceTypeProfile::serviceTypeProfile( const QString& _servicetype, const QString& _genericServiceType )
+KServiceTypeProfile* KServiceTypeProfile::serviceTypeProfile( const TQString& _servicetype, const TQString& _genericServiceType )
{
initStatic();
- static const QString& app_str = KGlobal::staticQString("Application");
+ static const TQString& app_str = KGlobal::staticQString("Application");
- const QString &_genservicetype = ((!_genericServiceType.isEmpty()) ? _genericServiceType : app_str);
+ const TQString &_genservicetype = ((!_genericServiceType.isEmpty()) ? _genericServiceType : app_str);
- QPtrListIterator<KServiceTypeProfile> it( *s_lstProfiles );
+ TQPtrListIterator<KServiceTypeProfile> it( *s_lstProfiles );
for( ; it.current(); ++it )
if (( it.current()->m_strServiceType == _servicetype ) &&
( it.current()->m_strGenericServiceType == _genservicetype))
@@ -263,14 +263,14 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers() const
kdDebug(7014) << "KServiceTypeProfile::offers serviceType=" << m_strServiceType << " genericServiceType=" << m_strGenericServiceType << endl;
KService::List list = KServiceType::offers( m_strServiceType );
- QValueListIterator<KService::Ptr> it = list.begin();
+ TQValueListIterator<KService::Ptr> it = list.begin();
for( ; it != list.end(); ++it )
{
//kdDebug(7014) << "KServiceTypeProfile::offers considering " << (*it)->name() << endl;
if ( m_strGenericServiceType.isEmpty() || (*it)->hasServiceType( m_strGenericServiceType ) )
{
// Now look into the profile, to find this service's preference.
- QMap<QString,Service>::ConstIterator it2 = m_mapServices.find( (*it)->storageId() );
+ TQMap<TQString,Service>::ConstIterator it2 = m_mapServices.find( (*it)->storageId() );
if( it2 != m_mapServices.end() )
{
@@ -300,7 +300,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers() const
return offers;
}
-KService::Ptr KServiceTypeProfile::preferredService( const QString & _serviceType, const QString & _genericServiceType )
+KService::Ptr KServiceTypeProfile::preferredService( const TQString & _serviceType, const TQString & _genericServiceType )
{
OfferList lst = offers( _serviceType, _genericServiceType );
diff --git a/kio/kio/kuserprofile.h b/kio/kio/kuserprofile.h
index 4591771f0..061657625 100644
--- a/kio/kio/kuserprofile.h
+++ b/kio/kio/kuserprofile.h
@@ -20,10 +20,10 @@
#ifndef __kuserprofile_h__
#define __kuserprofile_h__
-#include <qmap.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <kservice.h>
@@ -117,7 +117,7 @@ private:
class KIO_EXPORT KServiceTypeProfile
{
public:
- typedef QValueList<KServiceOffer> OfferList;
+ typedef TQValueList<KServiceOffer> OfferList;
~KServiceTypeProfile();
@@ -128,7 +128,7 @@ public:
* @return the user's preference number of the given
* @p _service, or 0 the service is unknown.
*/
- int preference( const QString& _service ) const;
+ int preference( const TQString& _service ) const;
/**
* @deprecated Remove in KDE 4, unused.
@@ -136,7 +136,7 @@ public:
* @param _service the name of the service to check
* @return true if allowed as default
*/
- bool allowAsDefault( const QString& _service ) const;
+ bool allowAsDefault( const TQString& _service ) const;
/**
* Returns the list of all service offers for the service types
@@ -154,17 +154,17 @@ public:
* "KParts/ReadOnlyPart")
* @return the preferred service, or 0 if no service is available
*/
- static KService::Ptr preferredService( const QString & serviceType, const QString & genericServiceType );
+ static KService::Ptr preferredService( const TQString & serviceType, const TQString & genericServiceType );
/**
* Returns the profile for the requested service type.
* @param servicetype the service type (e.g. a MIME type)
* @param genericServiceType the generic service type (e.g. "Application"
- * or "KParts/ReadOnlyPart"). Can be QString::null,
+ * or "KParts/ReadOnlyPart"). Can be TQString::null,
* then the "Application" generic type will be used
* @return the KServiceTypeProfile with the given arguments, or 0 if not found
*/
- static KServiceTypeProfile* serviceTypeProfile( const QString& servicetype, const QString & genericServiceType = QString::null );
+ static KServiceTypeProfile* serviceTypeProfile( const TQString& servicetype, const TQString & genericServiceType = TQString::null );
/**
* Returns the offers associated with a given servicetype, sorted by preference.
@@ -181,17 +181,17 @@ public:
*
* @param servicetype the service type (e.g. a MIME type)
* @param genericServiceType the generic service type (e.g. "Application"
- * or "KParts/ReadOnlyPart"). Can be QString::null,
+ * or "KParts/ReadOnlyPart"). Can be TQString::null,
* then all generic types will be included
* @return the list of offers witht he given parameters
*/
- static OfferList offers( const QString& servicetype, const QString& genericServiceType = QString::null );
+ static OfferList offers( const TQString& servicetype, const TQString& genericServiceType = TQString::null );
/**
* Returns a list of all KServiceTypeProfiles.
* @return a list of all KServiceTypeProfiles
*/
- static const QPtrList<KServiceTypeProfile>& serviceTypeProfiles() { return *s_lstProfiles; }
+ static const TQPtrList<KServiceTypeProfile>& serviceTypeProfiles() { return *s_lstProfiles; }
/**
* Clear all cached information
@@ -225,11 +225,11 @@ protected:
* first time.
* @param serviceType the service type (e.g. a MIME type)
* @param genericServiceType the generic service type (e.g. "Application"
- * or "KParts/ReadOnlyPart"). Can be QString::null,
+ * or "KParts/ReadOnlyPart"). Can be TQString::null,
* then the "Application" generic type will be used
*/
- KServiceTypeProfile( const QString& serviceType,
- const QString& genericServiceType = QString::null );
+ KServiceTypeProfile( const TQString& serviceType,
+ const TQString& genericServiceType = TQString::null );
/**
* Add a service to this profile.
@@ -239,7 +239,7 @@ protected:
* @param _allow_as_default true if the service should be used as
* default
*/
- void addService( const QString& _service, int _preference = 1, bool _allow_as_default = true );
+ void addService( const TQString& _service, int _preference = 1, bool _allow_as_default = true );
private:
/**
@@ -260,20 +260,20 @@ private:
/**
* Map of all services for which we have assessments.
*/
- QMap<QString,Service> m_mapServices;
+ TQMap<TQString,Service> m_mapServices;
/**
* ServiceType of this profile.
*/
- QString m_strServiceType;
+ TQString m_strServiceType;
/**
* Secondary ServiceType of this profile.
*/
- QString m_strGenericServiceType;
+ TQString m_strGenericServiceType;
static void initStatic();
- static QPtrList<KServiceTypeProfile>* s_lstProfiles;
+ static TQPtrList<KServiceTypeProfile>* s_lstProfiles;
static bool s_configurationMode;
private:
class KServiceTypeProfilePrivate* d;
diff --git a/kio/kio/kzip.cpp b/kio/kio/kzip.cpp
index 7943a0ae7..6f29bb264 100644
--- a/kio/kio/kzip.cpp
+++ b/kio/kio/kzip.cpp
@@ -44,11 +44,11 @@
#include <ksavefile.h>
#include <kdebug.h>
-#include <qasciidict.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
+#include <tqasciidict.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
#include <zlib.h>
#include <time.h>
@@ -56,7 +56,7 @@
const int max_path_len = 4095; // maximum number of character a path may contain
-static void transformToMsDos(const QDateTime& dt, char* buffer)
+static void transformToMsDos(const TQDateTime& dt, char* buffer)
{
if ( dt.isValid() )
{
@@ -91,15 +91,15 @@ static time_t transformFromMsDos(const char* buffer)
int h = time >> 11;
int m = ( time & 0x7ff ) >> 5;
int s = ( time & 0x1f ) * 2 ;
- QTime qt(h, m, s);
+ TQTime qt(h, m, s);
Q_UINT16 date = (uchar)buffer[2] | ( (uchar)buffer[3] << 8 );
int y = ( date >> 9 ) + 1980;
int o = ( date & 0x1ff ) >> 5;
int d = ( date & 0x1f );
- QDate qd(y, o, d);
+ TQDate qd(y, o, d);
- QDateTime dt( qd, qt );
+ TQDateTime dt( qd, qt );
return dt.toTime_t();
}
@@ -108,14 +108,14 @@ static time_t transformFromMsDos(const char* buffer)
/** all relevant information about parsing file information */
struct ParseFileInfo {
// file related info
-// QCString name; // filename
+// TQCString name; // filename
mode_t perm; // permissions of this file
time_t atime; // last access time (UNIX format)
time_t mtime; // modification time (UNIX format)
time_t ctime; // creation time (UNIX format)
int uid; // user id (-1 if not specified)
int gid; // group id (-1 if not specified)
- QCString guessed_symlink; // guessed symlink target
+ TQCString guessed_symlink; // guessed symlink target
int extralen; // length of extra field
// parsing related info
@@ -321,8 +321,8 @@ public:
unsigned long m_crc; // checksum
KZipFileEntry* m_currentFile; // file currently being written
- QIODevice* m_currentDev; // filterdev used to write to the above file
- QPtrList<KZipFileEntry> m_fileList; // flat list of all files, for the index (saves a recursive method ;)
+ TQIODevice* m_currentDev; // filterdev used to write to the above file
+ TQPtrList<KZipFileEntry> m_fileList; // flat list of all files, for the index (saves a recursive method ;)
int m_compression;
KZip::ExtraField m_extraField;
unsigned int m_offset; // holds the offset of the place in the zip,
@@ -332,7 +332,7 @@ public:
KSaveFile* m_saveFile;
};
-KZip::KZip( const QString& filename )
+KZip::KZip( const TQString& filename )
: KArchive( 0L )
{
//kdDebug(7040) << "KZip(filename) reached." << endl;
@@ -344,10 +344,10 @@ KZip::KZip( const QString& filename )
// KDE4: move KSaveFile support to base class, KArchive.
}
-KZip::KZip( QIODevice * dev )
+KZip::KZip( TQIODevice * dev )
: KArchive( dev )
{
- //kdDebug(7040) << "KZip::KZip( QIODevice * dev) reached." << endl;
+ //kdDebug(7040) << "KZip::KZip( TQIODevice * dev) reached." << endl;
d = new KZipPrivate;
}
@@ -361,7 +361,7 @@ KZip::~KZip()
if ( d->m_saveFile ) // writing mode
delete d->m_saveFile;
else // reading mode
- delete device(); // (the QFile)
+ delete device(); // (the TQFile)
}
delete d;
}
@@ -391,9 +391,9 @@ bool KZip::openArchive( int mode )
case IO_ReadOnly:
case IO_ReadWrite:
{
- // ReadWrite mode still uses QFile for now; we'd need to copy to the tempfile, in fact.
+ // ReadWrite mode still uses TQFile for now; we'd need to copy to the tempfile, in fact.
if ( !m_filename.isEmpty() ) {
- setDevice( new QFile( m_filename ) );
+ setDevice( new TQFile( m_filename ) );
if ( !device()->open( mode ) )
return false;
}
@@ -408,7 +408,7 @@ bool KZip::openArchive( int mode )
// Check that it's a valid ZIP file
// the above code opened the underlying device already.
- QIODevice* dev = device();
+ TQIODevice* dev = device();
if (!dev) {
return false;
@@ -418,7 +418,7 @@ bool KZip::openArchive( int mode )
int n;
// contains information gathered from the local file headers
- QAsciiDict<ParseFileInfo> pfi_map(1009, true /*case sensitive */, true /*copy keys*/);
+ TQAsciiDict<ParseFileInfo> pfi_map(1009, true /*case sensitive */, true /*copy keys*/);
pfi_map.setAutoDelete(true);
// We set a bool for knowing if we are allowed to skip the start of the file
@@ -477,7 +477,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
kdDebug(7040) << "archive size: " << dev->size() << endl;
// read filename
- QCString filename(namelen + 1);
+ TQCString filename(namelen + 1);
n = dev->readBlock(filename.data(), namelen);
if ( n < namelen ) {
kdWarning(7040) << "Invalid ZIP file. Name not completely read (#2)" << endl;
@@ -668,7 +668,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
//kdDebug() << "general purpose flag=" << gpf << endl;
// length of the filename (well, pathname indeed)
int namelen = (uchar)buffer[29] << 8 | (uchar)buffer[28];
- QCString bufferName( namelen + 1 );
+ TQCString bufferName( namelen + 1 );
n = dev->readBlock( bufferName.data(), namelen );
if ( n < namelen )
kdWarning(7040) << "Invalid ZIP file. Name not completely read" << endl;
@@ -677,7 +677,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
if (!pfi) { // can that happen?
pfi_map.insert(bufferName.data(), pfi = new ParseFileInfo());
}
- QString name( QFile::decodeName(bufferName) );
+ TQString name( TQFile::decodeName(bufferName) );
//kdDebug(7040) << "name: " << name << endl;
// only in central header ! see below.
@@ -726,7 +726,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
access = (uchar)buffer[40] | (uchar)buffer[41] << 8;
}
- QString entryName;
+ TQString entryName;
if ( name.endsWith( "/" ) ) // Entries with a trailing slash are directories
{
@@ -746,7 +746,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
KArchiveEntry* entry;
if ( isdir )
{
- QString path = QDir::cleanDirPath( name );
+ TQString path = TQDir::cleanDirPath( name );
KArchiveEntry* ent = rootDir()->entry( path );
if ( ent && ent->isDirectory() )
{
@@ -755,15 +755,15 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
}
else
{
- entry = new KArchiveDirectory( this, entryName, access, (int)pfi->mtime, rootDir()->user(), rootDir()->group(), QString::null );
+ entry = new KArchiveDirectory( this, entryName, access, (int)pfi->mtime, rootDir()->user(), rootDir()->group(), TQString::null );
//kdDebug(7040) << "KArchiveDirectory created, entryName= " << entryName << ", name=" << name << endl;
}
}
else
{
- QString symlink;
+ TQString symlink;
if (S_ISLNK(access)) {
- symlink = QFile::decodeName(pfi->guessed_symlink);
+ symlink = TQFile::decodeName(pfi->guessed_symlink);
}
entry = new KZipFileEntry( this, entryName, access, pfi->mtime,
rootDir()->user(), rootDir()->group(),
@@ -783,7 +783,7 @@ kdDebug(7040) << "dev->at() now : " << dev->at() << endl;
else
{
// In some tar files we can find dir/./file => call cleanDirPath
- QString path = QDir::cleanDirPath( name.left( pos ) );
+ TQString path = TQDir::cleanDirPath( name.left( pos ) );
// Ensure container directory exists, create otherwise
KArchiveDirectory * tdir = findOrCreate( path );
tdir->addEntry(entry);
@@ -874,7 +874,7 @@ bool KZip::closeArchive()
Q_LONG centraldiroffset = device()->at();
//kdDebug(7040) << "closearchive: centraldiroffset: " << centraldiroffset << endl;
Q_LONG atbackup = centraldiroffset;
- QPtrListIterator<KZipFileEntry> it( d->m_fileList );
+ TQPtrListIterator<KZipFileEntry> it( d->m_fileList );
for ( ; it.current() ; ++it )
{ //set crc and compressed size in each local file header
@@ -912,7 +912,7 @@ bool KZip::closeArchive()
//kdDebug(7040) << "closearchive: filename: " << it.current()->path()
// << " encoding: "<< it.current()->encoding() << endl;
- QCString path = QFile::encodeName(it.current()->path());
+ TQCString path = TQFile::encodeName(it.current()->path());
const int extra_field_len = 9;
int bufferSize = extra_field_len + path.length() + 46;
@@ -1052,7 +1052,7 @@ bool KZip::closeArchive()
}
// Doesn't need to be reimplemented anymore. Remove for KDE-4.0
-bool KZip::writeFile( const QString& name, const QString& user, const QString& group, uint size, const char* data )
+bool KZip::writeFile( const TQString& name, const TQString& user, const TQString& group, uint size, const char* data )
{
mode_t mode = 0100644;
time_t the_time = time(0);
@@ -1061,8 +1061,8 @@ bool KZip::writeFile( const QString& name, const QString& user, const QString& g
}
// Doesn't need to be reimplemented anymore. Remove for KDE-4.0
-bool KZip::writeFile( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KZip::writeFile( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime,
const char* data ) {
return KArchive::writeFile(name, user, group, size, perm, atime, mtime,
@@ -1070,7 +1070,7 @@ bool KZip::writeFile( const QString& name, const QString& user,
}
// Doesn't need to be reimplemented anymore. Remove for KDE-4.0
-bool KZip::prepareWriting( const QString& name, const QString& user, const QString& group, uint size )
+bool KZip::prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size )
{
mode_t dflt_perm = 0100644;
time_t the_time = time(0);
@@ -1079,14 +1079,14 @@ bool KZip::prepareWriting( const QString& name, const QString& user, const QStri
}
// Doesn't need to be reimplemented anymore. Remove for KDE-4.0
-bool KZip::prepareWriting(const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+bool KZip::prepareWriting(const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime) {
return KArchive::prepareWriting(name,user,group,size,perm,atime,mtime,ctime);
}
-bool KZip::prepareWriting_impl(const QString &name, const QString &user,
- const QString &group, uint /*size*/, mode_t perm,
+bool KZip::prepareWriting_impl(const TQString &name, const TQString &user,
+ const TQString &group, uint /*size*/, mode_t perm,
time_t atime, time_t mtime, time_t ctime) {
//kdDebug(7040) << "prepareWriting reached." << endl;
if ( !isOpened() )
@@ -1117,7 +1117,7 @@ bool KZip::prepareWriting_impl(const QString &name, const QString &user,
// to save, so that we don´t have duplicate file entries when viewing the zip
// with konqi...
// CAUTION: the old file itself is still in the zip and won't be removed !!!
- QPtrListIterator<KZipFileEntry> it( d->m_fileList );
+ TQPtrListIterator<KZipFileEntry> it( d->m_fileList );
//kdDebug(7040) << "filename to write: " << name <<endl;
for ( ; it.current() ; ++it )
@@ -1132,18 +1132,18 @@ bool KZip::prepareWriting_impl(const QString &name, const QString &user,
}
// Find or create parent dir
KArchiveDirectory* parentDir = rootDir();
- QString fileName( name );
+ TQString fileName( name );
int i = name.findRev( '/' );
if ( i != -1 )
{
- QString dir = name.left( i );
+ TQString dir = name.left( i );
fileName = name.mid( i + 1 );
//kdDebug(7040) << "KZip::prepareWriting ensuring " << dir << " exists. fileName=" << fileName << endl;
parentDir = findOrCreate( dir );
}
// construct a KZipFileEntry and add it to list
- KZipFileEntry * e = new KZipFileEntry( this, fileName, perm, mtime, user, group, QString::null,
+ KZipFileEntry * e = new KZipFileEntry( this, fileName, perm, mtime, user, group, TQString::null,
name, device()->at() + 30 + name.length(), // start
0 /*size unknown yet*/, d->m_compression, 0 /*csize unknown yet*/ );
e->setHeaderStart( device()->at() );
@@ -1158,7 +1158,7 @@ bool KZip::prepareWriting_impl(const QString &name, const QString &user,
extra_field_len = 17; // value also used in doneWriting()
// write out zip header
- QCString encodedName = QFile::encodeName(name);
+ TQCString encodedName = TQFile::encodeName(name);
int bufferSize = extra_field_len + encodedName.length() + 30;
//kdDebug(7040) << "KZip::prepareWriting bufferSize=" << bufferSize << endl;
char* buffer = new char[ bufferSize ];
@@ -1298,14 +1298,14 @@ bool KZip::doneWriting( uint size )
return true;
}
-bool KZip::writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+bool KZip::writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime) {
return KArchive::writeSymLink(name,target,user,group,perm,atime,mtime,ctime);
}
-bool KZip::writeSymLink_impl(const QString &name, const QString &target,
- const QString &user, const QString &group,
+bool KZip::writeSymLink_impl(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime) {
// reassure that symlink flag is set, otherwise strange things happen on
@@ -1320,7 +1320,7 @@ bool KZip::writeSymLink_impl(const QString &name, const QString &target,
return false;
}
- QCString symlink_target = QFile::encodeName(target);
+ TQCString symlink_target = TQFile::encodeName(target);
if (!writeData(symlink_target, symlink_target.length())) {
kdWarning() << "KZip::writeFile writeData failed" << endl;
setCompression(c);
@@ -1422,10 +1422,10 @@ void KZip::abort()
///////////////
-QByteArray KZipFileEntry::data() const
+TQByteArray KZipFileEntry::data() const
{
- QIODevice* dev = device();
- QByteArray arr;
+ TQIODevice* dev = device();
+ TQByteArray arr;
if ( dev ) {
arr = dev->readAll();
delete dev;
@@ -1433,7 +1433,7 @@ QByteArray KZipFileEntry::data() const
return arr;
}
-QIODevice* KZipFileEntry::device() const
+TQIODevice* KZipFileEntry::device() const
{
//kdDebug(7040) << "KZipFileEntry::device creating iodevice limited to pos=" << position() << ", csize=" << compressedSize() << endl;
// Limit the reading to the appropriate part of the underlying device (e.g. file)
@@ -1444,7 +1444,7 @@ QIODevice* KZipFileEntry::device() const
if ( encoding() == 8 )
{
// On top of that, create a device that uncompresses the zlib data
- QIODevice* filterDev = KFilterDev::device( limitedDev, "application/x-gzip" );
+ TQIODevice* filterDev = KFilterDev::device( limitedDev, "application/x-gzip" );
if ( !filterDev )
return 0L; // ouch
static_cast<KFilterDev *>(filterDev)->setSkipHeaders(); // Just zlib, not gzip
diff --git a/kio/kio/kzip.h b/kio/kio/kzip.h
index 5e0971cd8..291f827f8 100644
--- a/kio/kio/kzip.h
+++ b/kio/kio/kzip.h
@@ -21,11 +21,11 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
#include <karchive.h>
class KZipFileEntry;
@@ -59,16 +59,16 @@ public:
*
* @param filename is a local path (e.g. "/home/holger/myfile.zip")
*/
- KZip( const QString& filename );
+ KZip( const TQString& filename );
/**
* Creates an instance that operates on the given device.
- * The device can be compressed (KFilterDev) or not (QFile, etc.).
- * @warning Do not assume that giving a QFile here will decompress the file,
+ * The device can be compressed (KFilterDev) or not (TQFile, etc.).
+ * @warning Do not assume that giving a TQFile here will decompress the file,
* in case it's compressed!
* @param dev the device to access
*/
- KZip( QIODevice * dev );
+ KZip( TQIODevice * dev );
/**
* If the zip file is still opened, then it will be
@@ -78,10 +78,10 @@ public:
/**
* The name of the zip file, as passed to the constructor.
- * Null if you used the QIODevice constructor.
- * @return the zip's file name, or null if a QIODevice is used
+ * Null if you used the TQIODevice constructor.
+ * @return the zip's file name, or null if a TQIODevice is used
*/
- QString fileName() { return m_filename; }
+ TQString fileName() { return m_filename; }
/**
* Describes the contents of the "extra field" for a given file in the Zip archive.
@@ -140,7 +140,7 @@ public:
* @param data a pointer to the data
* @return true if successful, false otherwise
*/
- virtual bool writeFile( const QString& name, const QString& user, const QString& group, uint size, const char* data ); // BC: remove reimplementation for KDE-4.0
+ virtual bool writeFile( const TQString& name, const TQString& user, const TQString& group, uint size, const char* data ); // BC: remove reimplementation for KDE-4.0
/**
* Alternative method for writing: call prepareWriting(), then feed the data
@@ -151,18 +151,18 @@ public:
* @param size unused argument
* @return true if successful, false otherwise
*/
- virtual bool prepareWriting( const QString& name, const QString& user, const QString& group, uint size );
+ virtual bool prepareWriting( const TQString& name, const TQString& user, const TQString& group, uint size );
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool writeSymLink(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool prepareWriting( const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting( const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime );
// TODO(BIC) make virtual. For now it must be implemented by virtual_hook.
- bool writeFile( const QString& name, const QString& user, const QString& group,
+ bool writeFile( const TQString& name, const TQString& user, const TQString& group,
uint size, mode_t perm, time_t atime, time_t mtime,
time_t ctime, const char* data );
/**
@@ -194,9 +194,9 @@ protected:
/**
* @internal Not needed for zip
*/
- virtual bool writeDir( const QString& name, const QString& user, const QString& group) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); return true; }
+ virtual bool writeDir( const TQString& name, const TQString& user, const TQString& group) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); return true; }
// TODO(BIC) uncomment and make virtual for KDE 4.
-// bool writeDir( const QString& name, const QString& user, const QString& group,
+// bool writeDir( const TQString& name, const TQString& user, const TQString& group,
// mode_t perm, time_t atime, time_t mtime, time_t ctime );
protected:
@@ -204,17 +204,17 @@ protected:
/** @internal for virtual_hook */
// from KArchive
bool writeData_impl( const char* data, uint size );
- bool prepareWriting_impl(const QString& name, const QString& user,
- const QString& group, uint size, mode_t perm,
+ bool prepareWriting_impl(const TQString& name, const TQString& user,
+ const TQString& group, uint size, mode_t perm,
time_t atime, time_t mtime, time_t ctime);
- bool writeSymLink_impl(const QString &name, const QString &target,
- const QString &user, const QString &group,
+ bool writeSymLink_impl(const TQString &name, const TQString &target,
+ const TQString &user, const TQString &group,
mode_t perm, time_t atime, time_t mtime, time_t ctime);
private:
void abort();
private:
- QString m_filename;
+ TQString m_filename;
class KZipPrivate;
KZipPrivate * d;
};
@@ -228,9 +228,9 @@ class KIO_EXPORT KZipFileEntry : public KArchiveFile
public:
/*KZipFileEntry() : st(-1)
{}*/
- KZipFileEntry( KZip* zip, const QString& name, int access, int date,
- const QString& user, const QString& group, const QString& symlink,
- const QString& path, Q_LONG start, Q_LONG uncompressedSize,
+ KZipFileEntry( KZip* zip, const TQString& name, int access, int date,
+ const TQString& user, const TQString& group, const TQString& symlink,
+ const TQString& path, Q_LONG start, Q_LONG uncompressedSize,
int encoding, Q_LONG compressedSize) :
KArchiveFile( zip, name, access, date, user, group, symlink,
start, uncompressedSize ),
@@ -255,29 +255,29 @@ public:
void setCRC32(unsigned long crc32) { m_crc=crc32; }
/// Name with complete path - KArchiveFile::name() is the filename only (no path)
- QString path() const { return m_path; }
+ TQString path() const { return m_path; }
/**
* @return the content of this file.
* Call data() with care (only once per file), this data isn't cached.
*/
- virtual QByteArray data() const;
+ virtual TQByteArray data() const;
/**
- * This method returns a QIODevice to read the file contents.
+ * This method returns a TQIODevice to read the file contents.
* This is obviously for reading only.
* Note that the ownership of the device is being transferred to the caller,
* who will have to delete it.
* The returned device auto-opens (in readonly mode), no need to open it.
*/
- QIODevice* device() const; // WARNING, not virtual!
+ TQIODevice* device() const; // WARNING, not virtual!
private:
unsigned long m_crc;
Q_LONG m_compressedSize;
Q_LONG m_headerStart;
int m_encoding;
- QString m_path;
+ TQString m_path;
// KDE4: d pointer or at least some int for future extensions
};
diff --git a/kio/kio/metainfojob.cpp b/kio/kio/metainfojob.cpp
index 32a20a135..3998584e3 100644
--- a/kio/kio/metainfojob.cpp
+++ b/kio/kio/metainfojob.cpp
@@ -27,7 +27,7 @@
#include <kio/kservice.h>
#include <kparts/componentfactory.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "metainfojob.moc"
@@ -63,7 +63,7 @@ MetaInfoJob::MetaInfoJob(const KFileItemList &items, bool deleteItems)
// Return to event loop first, determineNextFile() might delete this;
// (no idea what that means, it comes from previewjob)
- QTimer::singleShot(0, this, SLOT(start()));
+ TQTimer::singleShot(0, this, TQT_SLOT(start()));
}
MetaInfoJob::~MetaInfoJob()
@@ -132,17 +132,17 @@ void MetaInfoJob::getMetaInfo()
KIO::TransferJob* job = KIO::get(URL, false, false);
addSubjob(job);
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotMetaInfo(KIO::Job *, const QByteArray &)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotMetaInfo(KIO::Job *, const TQByteArray &)));
job->addMetaData("mimeType", d->currentItem->current()->mimetype());
}
-void MetaInfoJob::slotMetaInfo(KIO::Job*, const QByteArray &data)
+void MetaInfoJob::slotMetaInfo(KIO::Job*, const TQByteArray &data)
{
KFileMetaInfo info;
- QDataStream s(data, IO_ReadOnly);
+ TQDataStream s(data, IO_ReadOnly);
s >> info;
@@ -151,18 +151,18 @@ void MetaInfoJob::slotMetaInfo(KIO::Job*, const QByteArray &data)
d->succeeded = true;
}
-QStringList MetaInfoJob::availablePlugins()
+TQStringList MetaInfoJob::availablePlugins()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList plugins = KTrader::self()->query("KFilePlugin");
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
result.append((*it)->desktopEntryName());
return result;
}
-QStringList MetaInfoJob::supportedMimeTypes()
+TQStringList MetaInfoJob::supportedMimeTypes()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList plugins = KTrader::self()->query("KFilePlugin");
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
result += (*it)->property("MimeTypes").toStringList();
diff --git a/kio/kio/metainfojob.h b/kio/kio/metainfojob.h
index 0a3c84590..3b96713fb 100644
--- a/kio/kio/metainfojob.h
+++ b/kio/kio/metainfojob.h
@@ -57,14 +57,14 @@ namespace KIO {
* no .desktop).
* @return the list of available meta info plugins
*/
- static QStringList availablePlugins();
+ static TQStringList availablePlugins();
/**
* Returns a list of all supported MIME types. The list can
* contain entries like text/ * (without the space).
* @return the list of MIME types that are supported
*/
- static QStringList supportedMimeTypes();
+ static TQStringList supportedMimeTypes();
signals:
/**
@@ -89,11 +89,11 @@ namespace KIO {
private slots:
void start();
- void slotMetaInfo(KIO::Job *, const QByteArray &);
+ void slotMetaInfo(KIO::Job *, const TQByteArray &);
private:
void determineNextFile();
-// void saveMetaInfo(const QByteArray info);
+// void saveMetaInfo(const TQByteArray info);
private:
struct MetaInfoJobPrivate *d;
diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp
index 9efbb5259..68ce8ae1d 100644
--- a/kio/kio/netaccess.cpp
+++ b/kio/kio/netaccess.cpp
@@ -28,10 +28,10 @@
#include <cstring>
-#include <qstring.h>
-#include <qapplication.h>
-#include <qfile.h>
-#include <qmetaobject.h>
+#include <tqstring.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqmetaobject.h>
#include <kapplication.h>
#include <klocale.h>
@@ -45,16 +45,16 @@
using namespace KIO;
-QString * NetAccess::lastErrorMsg;
+TQString * NetAccess::lastErrorMsg;
int NetAccess::lastErrorCode = 0;
-QStringList* NetAccess::tmpfiles;
+TQStringList* NetAccess::tmpfiles;
-bool NetAccess::download(const KURL& u, QString & target)
+bool NetAccess::download(const KURL& u, TQString & target)
{
return NetAccess::download (u, target, 0);
}
-bool NetAccess::download(const KURL& u, QString & target, QWidget* window)
+bool NetAccess::download(const KURL& u, TQString & target, TQWidget* window)
{
if (u.isLocalFile()) {
// file protocol. We do not need the network
@@ -86,12 +86,12 @@ bool NetAccess::download(const KURL& u, QString & target, QWidget* window)
false, window, false /*copy*/);
}
-bool NetAccess::upload(const QString& src, const KURL& target)
+bool NetAccess::upload(const TQString& src, const KURL& target)
{
return NetAccess::upload(src, target, 0);
}
-bool NetAccess::upload(const QString& src, const KURL& target, QWidget* window)
+bool NetAccess::upload(const TQString& src, const KURL& target, TQWidget* window)
{
if (target.isEmpty())
return false;
@@ -114,13 +114,13 @@ bool NetAccess::copy( const KURL & src, const KURL & target )
return NetAccess::file_copy( src, target, -1, false /*not overwrite*/, false, 0L );
}
-bool NetAccess::copy( const KURL & src, const KURL & target, QWidget* window )
+bool NetAccess::copy( const KURL & src, const KURL & target, TQWidget* window )
{
return NetAccess::file_copy( src, target, -1, false /*not overwrite*/, false, window );
}
bool NetAccess::file_copy( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window )
+ bool overwrite, bool resume, TQWidget* window )
{
NetAccess kioNet;
return kioNet.filecopyInternal( src, target, permissions, overwrite, resume,
@@ -129,7 +129,7 @@ bool NetAccess::file_copy( const KURL& src, const KURL& target, int permissions,
bool NetAccess::file_move( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window )
+ bool overwrite, bool resume, TQWidget* window )
{
NetAccess kioNet;
return kioNet.filecopyInternal( src, target, permissions, overwrite, resume,
@@ -141,27 +141,27 @@ bool NetAccess::dircopy( const KURL & src, const KURL & target )
return NetAccess::dircopy( src, target, 0 );
}
-bool NetAccess::dircopy( const KURL & src, const KURL & target, QWidget* window )
+bool NetAccess::dircopy( const KURL & src, const KURL & target, TQWidget* window )
{
KURL::List srcList;
srcList.append( src );
return NetAccess::dircopy( srcList, target, window );
}
-bool NetAccess::dircopy( const KURL::List & srcList, const KURL & target, QWidget* window )
+bool NetAccess::dircopy( const KURL::List & srcList, const KURL & target, TQWidget* window )
{
NetAccess kioNet;
return kioNet.dircopyInternal( srcList, target, window, false /*copy*/ );
}
-bool NetAccess::move( const KURL& src, const KURL& target, QWidget* window )
+bool NetAccess::move( const KURL& src, const KURL& target, TQWidget* window )
{
KURL::List srcList;
srcList.append( src );
return NetAccess::move( srcList, target, window );
}
-bool NetAccess::move( const KURL::List& srcList, const KURL& target, QWidget* window )
+bool NetAccess::move( const KURL::List& srcList, const KURL& target, TQWidget* window )
{
NetAccess kioNet;
return kioNet.dircopyInternal( srcList, target, window, true /*move*/ );
@@ -172,7 +172,7 @@ bool NetAccess::exists( const KURL & url )
return NetAccess::exists( url, false, 0 );
}
-bool NetAccess::exists( const KURL & url, QWidget* window )
+bool NetAccess::exists( const KURL & url, TQWidget* window )
{
return NetAccess::exists( url, false, window );
}
@@ -182,10 +182,10 @@ bool NetAccess::exists( const KURL & url, bool source )
return NetAccess::exists( url, source, 0 );
}
-bool NetAccess::exists( const KURL & url, bool source, QWidget* window )
+bool NetAccess::exists( const KURL & url, bool source, TQWidget* window )
{
if ( url.isLocalFile() )
- return QFile::exists( url.path() );
+ return TQFile::exists( url.path() );
NetAccess kioNet;
return kioNet.statInternal( url, 0 /*no details*/, source, window );
}
@@ -195,7 +195,7 @@ bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry )
return NetAccess::stat( url, entry, 0 );
}
-bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry, QWidget* window )
+bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry, TQWidget* window )
{
NetAccess kioNet;
bool ret = kioNet.statInternal( url, 2 /*all details*/, true /*source*/, window );
@@ -204,7 +204,7 @@ bool NetAccess::stat( const KURL & url, KIO::UDSEntry & entry, QWidget* window )
return ret;
}
-KURL NetAccess::mostLocalURL(const KURL & url, QWidget* window)
+KURL NetAccess::mostLocalURL(const KURL & url, TQWidget* window)
{
if ( url.isLocalFile() )
{
@@ -217,7 +217,7 @@ KURL NetAccess::mostLocalURL(const KURL & url, QWidget* window)
return url;
}
- QString path;
+ TQString path;
// Extract the local path from the KIO::UDSEntry
KIO::UDSEntry::ConstIterator it = entry.begin();
@@ -247,7 +247,7 @@ bool NetAccess::del( const KURL & url )
return NetAccess::del( url, 0 );
}
-bool NetAccess::del( const KURL & url, QWidget* window )
+bool NetAccess::del( const KURL & url, TQWidget* window )
{
NetAccess kioNet;
return kioNet.delInternal( url, window );
@@ -258,50 +258,50 @@ bool NetAccess::mkdir( const KURL & url, int permissions )
return NetAccess::mkdir( url, 0, permissions );
}
-bool NetAccess::mkdir( const KURL & url, QWidget* window, int permissions )
+bool NetAccess::mkdir( const KURL & url, TQWidget* window, int permissions )
{
NetAccess kioNet;
return kioNet.mkdirInternal( url, permissions, window );
}
-QString NetAccess::fish_execute( const KURL & url, const QString command, QWidget* window )
+TQString NetAccess::fish_execute( const KURL & url, const TQString command, TQWidget* window )
{
NetAccess kioNet;
return kioNet.fish_executeInternal( url, command, window );
}
-bool NetAccess::synchronousRun( Job* job, QWidget* window, QByteArray* data,
- KURL* finalURL, QMap<QString, QString>* metaData )
+bool NetAccess::synchronousRun( Job* job, TQWidget* window, TQByteArray* data,
+ KURL* finalURL, TQMap<TQString, TQString>* metaData )
{
NetAccess kioNet;
return kioNet.synchronousRunInternal( job, window, data, finalURL, metaData );
}
-QString NetAccess::mimetype( const KURL& url )
+TQString NetAccess::mimetype( const KURL& url )
{
NetAccess kioNet;
return kioNet.mimetypeInternal( url, 0 );
}
-QString NetAccess::mimetype( const KURL& url, QWidget* window )
+TQString NetAccess::mimetype( const KURL& url, TQWidget* window )
{
NetAccess kioNet;
return kioNet.mimetypeInternal( url, window );
}
-void NetAccess::removeTempFile(const QString& name)
+void NetAccess::removeTempFile(const TQString& name)
{
if (!tmpfiles)
return;
if (tmpfiles->contains(name))
{
- unlink(QFile::encodeName(name));
+ unlink(TQFile::encodeName(name));
tmpfiles->remove(name);
}
}
bool NetAccess::filecopyInternal(const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool move)
+ bool overwrite, bool resume, TQWidget* window, bool move)
{
bJobOK = true; // success unless further error occurs
@@ -310,15 +310,15 @@ bool NetAccess::filecopyInternal(const KURL& src, const KURL& target, int permis
? KIO::file_move( src, target, permissions, overwrite, resume )
: KIO::file_copy( src, target, permissions, overwrite, resume );
job->setWindow (window);
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
enter_loop();
return bJobOK;
}
bool NetAccess::dircopyInternal(const KURL::List& src, const KURL& target,
- QWidget* window, bool move)
+ TQWidget* window, bool move)
{
bJobOK = true; // success unless further error occurs
@@ -326,72 +326,72 @@ bool NetAccess::dircopyInternal(const KURL::List& src, const KURL& target,
? KIO::move( src, target )
: KIO::copy( src, target );
job->setWindow (window);
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
enter_loop();
return bJobOK;
}
bool NetAccess::statInternal( const KURL & url, int details, bool source,
- QWidget* window )
+ TQWidget* window )
{
bJobOK = true; // success unless further error occurs
KIO::StatJob * job = KIO::stat( url, !url.isLocalFile() );
job->setWindow (window);
job->setDetails( details );
job->setSide( source );
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
enter_loop();
return bJobOK;
}
-bool NetAccess::delInternal( const KURL & url, QWidget* window )
+bool NetAccess::delInternal( const KURL & url, TQWidget* window )
{
bJobOK = true; // success unless further error occurs
KIO::Job * job = KIO::del( url );
job->setWindow (window);
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
enter_loop();
return bJobOK;
}
bool NetAccess::mkdirInternal( const KURL & url, int permissions,
- QWidget* window )
+ TQWidget* window )
{
bJobOK = true; // success unless further error occurs
KIO::Job * job = KIO::mkdir( url, permissions );
job->setWindow (window);
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
enter_loop();
return bJobOK;
}
-QString NetAccess::mimetypeInternal( const KURL & url, QWidget* window )
+TQString NetAccess::mimetypeInternal( const KURL & url, TQWidget* window )
{
bJobOK = true; // success unless further error occurs
- m_mimetype = QString::fromLatin1("unknown");
+ m_mimetype = TQString::fromLatin1("unknown");
KIO::Job * job = KIO::mimetype( url );
job->setWindow (window);
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
- connect( job, SIGNAL( mimetype (KIO::Job *, const QString &) ),
- this, SLOT( slotMimetype (KIO::Job *, const QString &) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( mimetype (KIO::Job *, const TQString &) ),
+ this, TQT_SLOT( slotMimetype (KIO::Job *, const TQString &) ) );
enter_loop();
return m_mimetype;
}
-void NetAccess::slotMimetype( KIO::Job *, const QString & type )
+void NetAccess::slotMimetype( KIO::Job *, const TQString & type )
{
m_mimetype = type;
}
-QString NetAccess::fish_executeInternal(const KURL & url, const QString command, QWidget* window)
+TQString NetAccess::fish_executeInternal(const KURL & url, const TQString command, TQWidget* window)
{
- QString target, remoteTempFileName, resultData;
+ TQString target, remoteTempFileName, resultData;
KURL tempPathUrl;
KTempFile tmpFile;
tmpFile.setAutoDelete( true );
@@ -407,26 +407,26 @@ QString NetAccess::fish_executeInternal(const KURL & url, const QString command,
remoteTempFileName = "/tmp/fishexec_" + remoteTempFileName.mid(pos + 1);
tempPathUrl.setPath( remoteTempFileName );
bJobOK = true; // success unless further error occurs
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << int('X') << tempPathUrl << command;
KIO::Job * job = KIO::special( tempPathUrl, packedArgs, true );
job->setWindow( window );
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
enter_loop();
// since the KIO::special does not provide feedback we need to download the result
if( NetAccess::download( tempPathUrl, target, window ) )
{
- QFile resultFile( target );
+ TQFile resultFile( target );
if (resultFile.open( IO_ReadOnly ))
{
- QTextStream ts( &resultFile );
- ts.setEncoding( QTextStream::Locale ); // Locale??
+ TQTextStream ts( &resultFile );
+ ts.setEncoding( TQTextStream::Locale ); // Locale??
resultData = ts.read();
resultFile.close();
NetAccess::del( tempPathUrl, window );
@@ -440,14 +440,14 @@ QString NetAccess::fish_executeInternal(const KURL & url, const QString command,
return resultData;
}
-bool NetAccess::synchronousRunInternal( Job* job, QWidget* window, QByteArray* data,
- KURL* finalURL, QMap<QString,QString>* metaData )
+bool NetAccess::synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* data,
+ KURL* finalURL, TQMap<TQString,TQString>* metaData )
{
job->setWindow( window );
m_metaData = metaData;
if ( m_metaData ) {
- for ( QMap<QString, QString>::iterator it = m_metaData->begin(); it != m_metaData->end(); ++it ) {
+ for ( TQMap<TQString, TQString>::iterator it = m_metaData->begin(); it != m_metaData->end(); ++it ) {
job->addMetaData( it.key(), it.data() );
}
}
@@ -459,21 +459,21 @@ bool NetAccess::synchronousRunInternal( Job* job, QWidget* window, QByteArray* d
}
}
- connect( job, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotResult (KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotResult (KIO::Job *) ) );
- QMetaObject *meta = job->metaObject();
+ TQMetaObject *meta = job->metaObject();
- static const char dataSignal[] = "data(KIO::Job*,const QByteArray&)";
+ static const char dataSignal[] = "data(KIO::Job*,const TQByteArray&)";
if ( meta->findSignal( dataSignal ) != -1 ) {
- connect( job, SIGNAL(data(KIO::Job*,const QByteArray&)),
- this, SLOT(slotData(KIO::Job*,const QByteArray&)) );
+ connect( job, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)),
+ this, TQT_SLOT(slotData(KIO::Job*,const TQByteArray&)) );
}
static const char redirSignal[] = "redirection(KIO::Job*,const KURL&)";
if ( meta->findSignal( redirSignal ) != -1 ) {
- connect( job, SIGNAL(redirection(KIO::Job*,const KURL&)),
- this, SLOT(slotRedirection(KIO::Job*, const KURL&)) );
+ connect( job, TQT_SIGNAL(redirection(KIO::Job*,const KURL&)),
+ this, TQT_SLOT(slotRedirection(KIO::Job*, const KURL&)) );
}
enter_loop();
@@ -487,13 +487,13 @@ bool NetAccess::synchronousRunInternal( Job* job, QWidget* window, QByteArray* d
}
// If a troll sees this, he kills me
-void qt_enter_modal( QWidget *widget );
-void qt_leave_modal( QWidget *widget );
+void qt_enter_modal( TQWidget *widget );
+void qt_leave_modal( TQWidget *widget );
void NetAccess::enter_loop()
{
- QWidget dummy(0,0,WType_Dialog | WShowModal);
- dummy.setFocusPolicy( QWidget::NoFocus );
+ TQWidget dummy(0,0,WType_Dialog | WShowModal);
+ dummy.setFocusPolicy( TQWidget::NoFocus );
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -518,7 +518,7 @@ void NetAccess::slotResult( KIO::Job * job )
qApp->exit_loop();
}
-void NetAccess::slotData( KIO::Job*, const QByteArray& data )
+void NetAccess::slotData( KIO::Job*, const TQByteArray& data )
{
if ( data.isEmpty() )
return;
diff --git a/kio/kio/netaccess.h b/kio/kio/netaccess.h
index 089a93cfd..0bbb383de 100644
--- a/kio/kio/netaccess.h
+++ b/kio/kio/netaccess.h
@@ -23,8 +23,8 @@
#ifndef __kio_netaccess_h
#define __kio_netaccess_h
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kio/global.h>
class QStringList;
@@ -68,7 +68,7 @@ public:
* If the argument
* for @p target is an empty string, download will generate a
* unique temporary filename in /tmp. Since @p target is a reference
- * to QString you can access this filename easily. Download will
+ * to TQString you can access this filename easily. Download will
* return true if the download was successful, otherwise false.
*
* Special case:
@@ -82,7 +82,7 @@ public:
* application has a loadFile() function):
*
* \code
- * QString tmpFile;
+ * TQString tmpFile;
* if( KIO::NetAccess::download( u, tmpFile, window ) )
* {
* loadFile( tmpFile );
@@ -114,12 +114,12 @@ public:
* @see lastErrorString()
* @since 3.2
*/
- static bool download(const KURL& src, QString & target, QWidget* window);
+ static bool download(const KURL& src, TQString & target, TQWidget* window);
/**
* @deprecated. Use the function above instead.
*/
- static bool download(const KURL& src, QString & target) KDE_DEPRECATED;
+ static bool download(const KURL& src, TQString & target) KDE_DEPRECATED;
/**
* Removes the specified file if and only if it was created
@@ -132,7 +132,7 @@ public:
* @param name Path to temporary file to remove. May not be
* empty.
*/
- static void removeTempFile(const QString& name);
+ static void removeTempFile(const TQString& name);
/**
* Uploads file @p src to URL @p target.
@@ -153,12 +153,12 @@ public:
* @return true if successful, false for failure
* @since 3.2
*/
- static bool upload(const QString& src, const KURL& target, QWidget* window);
+ static bool upload(const TQString& src, const KURL& target, TQWidget* window);
/**
* @deprecated. Use the function above instead.
*/
- static bool upload(const QString& src, const KURL& target) KDE_DEPRECATED;
+ static bool upload(const TQString& src, const KURL& target) KDE_DEPRECATED;
/**
* Alternative to upload for copying over the network.
@@ -178,7 +178,7 @@ public:
*
* @return true if successful, false for failure
*/
- static bool copy( const KURL& src, const KURL& target, QWidget* window );
+ static bool copy( const KURL& src, const KURL& target, TQWidget* window );
// KDE4: rename to file_copy
/**
@@ -191,7 +191,7 @@ public:
* Full-fledged equivalent of KIO::file_copy
*/
static bool file_copy( const KURL& src, const KURL& dest, int permissions=-1,
- bool overwrite=false, bool resume=false, QWidget* window = 0L );
+ bool overwrite=false, bool resume=false, TQWidget* window = 0L );
/**
* Full-fledged equivalent of KIO::file_move.
@@ -199,7 +199,7 @@ public:
* @since 3.2
*/
static bool file_move( const KURL& src, const KURL& target, int permissions=-1,
- bool overwrite=false, bool resume=false, QWidget* window = 0L );
+ bool overwrite=false, bool resume=false, TQWidget* window = 0L );
/**
@@ -221,7 +221,7 @@ public:
* prompted for passwords as needed.
* @return true if successful, false for failure
*/
- static bool dircopy( const KURL& src, const KURL& target, QWidget* window );
+ static bool dircopy( const KURL& src, const KURL& target, TQWidget* window );
/**
* @deprecated. Use the function above instead.
@@ -231,21 +231,21 @@ public:
/**
* Overloaded method, which takes a list of source URLs
*/
- static bool dircopy( const KURL::List& src, const KURL& target, QWidget* window = 0L );
+ static bool dircopy( const KURL::List& src, const KURL& target, TQWidget* window = 0L );
/**
* Full-fledged equivalent of KIO::move.
* Moves or renames one file or directory.
* @since 3.2
*/
- static bool move( const KURL& src, const KURL& target, QWidget* window = 0L );
+ static bool move( const KURL& src, const KURL& target, TQWidget* window = 0L );
/**
* Full-fledged equivalent of KIO::move.
* Moves or renames a list of files or directories.
* @since 3.2
*/
- static bool move( const KURL::List& src, const KURL& target, QWidget* window = 0L );
+ static bool move( const KURL::List& src, const KURL& target, TQWidget* window = 0L );
/**
* Tests whether a URL exists.
@@ -263,13 +263,13 @@ public:
* @p source, false otherwise
* @since 3.2
*/
- static bool exists(const KURL& url, bool source, QWidget* window);
+ static bool exists(const KURL& url, bool source, TQWidget* window);
/**
* @deprecated. Use the function above instead.
* @since 3.2
*/
- static bool exists(const KURL& url, QWidget* window) KDE_DEPRECATED;
+ static bool exists(const KURL& url, TQWidget* window) KDE_DEPRECATED;
/**
* @deprecated. Use the function above instead.
@@ -297,7 +297,7 @@ public:
* again be prompted for passwords as needed.
* @return true if successful, false for failure
*/
- static bool stat(const KURL& url, KIO::UDSEntry & entry, QWidget* window);
+ static bool stat(const KURL& url, KIO::UDSEntry & entry, TQWidget* window);
/**
* @deprecated. Use the function above instead.
@@ -320,7 +320,7 @@ public:
* original URL, or the original URL if no local URL can be mapped
* @since 3.5
*/
- static KURL mostLocalURL(const KURL& url, QWidget* window);
+ static KURL mostLocalURL(const KURL& url, TQWidget* window);
/**
* Deletes a file or a directory in a synchronous way.
@@ -336,7 +336,7 @@ public:
* again be prompted for passwords as needed.
* @return true on success, false on failure.
*/
- static bool del( const KURL & url, QWidget* window );
+ static bool del( const KURL & url, TQWidget* window );
/**
* @deprecated. Use the function above instead. Passing NULL as the
@@ -361,7 +361,7 @@ public:
* @param permissions directory permissions.
* @return true on success, false on failure.
*/
- static bool mkdir( const KURL & url, QWidget* window, int permissions = -1 );
+ static bool mkdir( const KURL & url, TQWidget* window, int permissions = -1 );
/**
* @deprecated. Use the function above instead. Passing NULL as the
@@ -389,19 +389,19 @@ public:
* again be prompted for passwords as needed.
* @return The resulting output of the @p command that is executed.
*/
- static QString fish_execute( const KURL & url, const QString command, QWidget* window );
+ static TQString fish_execute( const KURL & url, const TQString command, TQWidget* window );
/**
* This function executes a job in a synchronous way.
- * If a job fetches some data, pass a QByteArray pointer as data parameter to this function
+ * If a job fetches some data, pass a TQByteArray pointer as data parameter to this function
* and after the function returns it will contain all the data fetched by this job.
*
* <code>
* KIO::Job *job = KIO::get( url, false, false );
- * QMap<QString, QString> metaData;
+ * TQMap<TQString, TQString> metaData;
* metaData.insert( "PropagateHttpHeader", "true" );
* if ( NetAccess::synchronousRun( job, 0, &data, &url, &metaData ) ) {
- * QString responseHeaders = metaData[ "HTTP-Headers" ];
+ * TQString responseHeaders = metaData[ "HTTP-Headers" ];
* kdDebug()<<"Response header = "<< responseHeaders << endl;
* }
* </code>
@@ -425,8 +425,8 @@ public:
*
* @since 3.4
*/
- static bool synchronousRun( Job* job, QWidget* window, QByteArray* data=0,
- KURL* finalURL=0, QMap<QString,QString>* metaData=0 );
+ static bool synchronousRun( Job* job, TQWidget* window, TQByteArray* data=0,
+ KURL* finalURL=0, TQMap<TQString,TQString>* metaData=0 );
/**
* @internal
@@ -450,7 +450,7 @@ public:
* again be prompted for passwords as needed.
* @return The mimetype name.
*/
- static QString mimetype( const KURL & url, QWidget* window );
+ static TQString mimetype( const KURL & url, TQWidget* window );
/**
* @deprecated. Use the function above instead. Passing NULL as the
@@ -458,14 +458,14 @@ public:
* you should try to identify a suitable parent widget
* if at all possible.
*/
- static QString mimetype( const KURL & url ) KDE_DEPRECATED;
+ static TQString mimetype( const KURL & url ) KDE_DEPRECATED;
/**
* Returns the error string for the last job, in case it failed.
* Note that this is already translated.
- * @return the last error string, or QString::null
+ * @return the last error string, or TQString::null
*/
- static QString lastErrorString() { return lastErrorMsg ? *lastErrorMsg : QString::null; }
+ static TQString lastErrorString() { return lastErrorMsg ? *lastErrorMsg : TQString::null; }
/**
* Returns the error code for the last job, in case it failed.
@@ -489,42 +489,42 @@ private:
* Internal methods
*/
bool filecopyInternal(const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool move);
+ bool overwrite, bool resume, TQWidget* window, bool move);
bool dircopyInternal(const KURL::List& src, const KURL& target,
- QWidget* window, bool move);
- bool statInternal(const KURL & url, int details, bool source, QWidget* window = 0);
+ TQWidget* window, bool move);
+ bool statInternal(const KURL & url, int details, bool source, TQWidget* window = 0);
- bool delInternal(const KURL & url, QWidget* window = 0);
- bool mkdirInternal(const KURL & url, int permissions, QWidget* window = 0);
- QString fish_executeInternal(const KURL & url, const QString command, QWidget* window = 0);
- bool synchronousRunInternal( Job* job, QWidget* window, QByteArray* data,
- KURL* finalURL, QMap<QString,QString>* metaData );
+ bool delInternal(const KURL & url, TQWidget* window = 0);
+ bool mkdirInternal(const KURL & url, int permissions, TQWidget* window = 0);
+ TQString fish_executeInternal(const KURL & url, const TQString command, TQWidget* window = 0);
+ bool synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* data,
+ KURL* finalURL, TQMap<TQString,TQString>* metaData );
- QString mimetypeInternal(const KURL & url, QWidget* window = 0);
+ TQString mimetypeInternal(const KURL & url, TQWidget* window = 0);
void enter_loop();
/**
* List of temporary files
*/
- static QStringList* tmpfiles;
+ static TQStringList* tmpfiles;
- static QString* lastErrorMsg;
+ static TQString* lastErrorMsg;
static int lastErrorCode;
friend class I_like_this_class;
private slots:
void slotResult( KIO::Job * job );
- void slotMimetype( KIO::Job * job, const QString & type );
- void slotData( KIO::Job*, const QByteArray& );
+ void slotMimetype( KIO::Job * job, const TQString & type );
+ void slotData( KIO::Job*, const TQByteArray& );
void slotRedirection( KIO::Job*, const KURL& );
private:
UDSEntry m_entry;
- QString m_mimetype;
- QByteArray m_data;
+ TQString m_mimetype;
+ TQByteArray m_data;
KURL m_url;
- QMap<QString, QString> *m_metaData;
+ TQMap<TQString, TQString> *m_metaData;
/**
* Whether the download succeeded or not
diff --git a/kio/kio/observer.cpp b/kio/kio/observer.cpp
index df69ddf93..2a468b1e6 100644
--- a/kio/kio/observer.cpp
+++ b/kio/kio/observer.cpp
@@ -43,7 +43,7 @@
using namespace KIO;
-template class QIntDict<KIO::Job>;
+template class TQIntDict<KIO::Job>;
Observer * Observer::s_pObserver = 0L;
@@ -60,9 +60,9 @@ Observer::Observer() : DCOPObject("KIO::Observer")
if ( !kapp->dcopClient()->isApplicationRegistered( "kio_uiserver" ) )
{
kdDebug(KDEBUG_OBSERVER) << "Starting kio_uiserver" << endl;
- QString error;
+ TQString error;
int ret = KApplication::startServiceByDesktopPath( "kio_uiserver.desktop",
- QStringList(), &error );
+ TQStringList(), &error );
if ( ret > 0 )
{
kdError() << "Couldn't start kio_uiserver from kio_uiserver.desktop: " << error << endl;
@@ -162,7 +162,7 @@ void Observer::slotPercent( KIO::Job* job, unsigned long percent )
m_uiserver->percent( job->progressId(), percent );
}
-void Observer::slotInfoMessage( KIO::Job* job, const QString & msg )
+void Observer::slotInfoMessage( KIO::Job* job, const TQString & msg )
{
m_uiserver->infoMessage( job->progressId(), msg );
}
@@ -208,18 +208,18 @@ void Observer::stating( KIO::Job* job, const KURL& url )
m_uiserver->stating( job->progressId(), url );
}
-void Observer::mounting( KIO::Job* job, const QString & dev, const QString & point )
+void Observer::mounting( KIO::Job* job, const TQString & dev, const TQString & point )
{
m_uiserver->mounting( job->progressId(), dev, point );
}
-void Observer::unmounting( KIO::Job* job, const QString & point )
+void Observer::unmounting( KIO::Job* job, const TQString & point )
{
m_uiserver->unmounting( job->progressId(), point );
}
-bool Observer::openPassDlg( const QString& prompt, QString& user,
- QString& pass, bool readOnly )
+bool Observer::openPassDlg( const TQString& prompt, TQString& user,
+ TQString& pass, bool readOnly )
{
AuthInfo info;
info.prompt = prompt;
@@ -243,7 +243,7 @@ bool Observer::openPassDlg( KIO::AuthInfo& info )
&info.keepPassword, info.prompt,
info.readOnly, info.caption,
info.comment, info.commentLabel );
- if ( result == QDialog::Accepted )
+ if ( result == TQDialog::Accepted )
{
info.setModified( true );
return true;
@@ -251,16 +251,16 @@ bool Observer::openPassDlg( KIO::AuthInfo& info )
return false;
}
-int Observer::messageBox( int progressId, int type, const QString &text,
- const QString &caption, const QString &buttonYes,
- const QString &buttonNo )
+int Observer::messageBox( int progressId, int type, const TQString &text,
+ const TQString &caption, const TQString &buttonYes,
+ const TQString &buttonNo )
{
- return messageBox( progressId, type, text, caption, buttonYes, buttonNo, QString::null );
+ return messageBox( progressId, type, text, caption, buttonYes, buttonNo, TQString::null );
}
-int Observer::messageBox( int progressId, int type, const QString &text,
- const QString &caption, const QString &buttonYes,
- const QString &buttonNo, const QString &dontAskAgainName )
+int Observer::messageBox( int progressId, int type, const TQString &text,
+ const TQString &caption, const TQString &buttonYes,
+ const TQString &buttonNo, const TQString &dontAskAgainName )
{
kdDebug() << "Observer::messageBox " << type << " " << text << " - " << caption << endl;
int result = -1;
@@ -291,7 +291,7 @@ int Observer::messageBox( int progressId, int type, const QString &text,
break;
case KIO::SlaveBase::SSLMessageBox:
{
- QCString observerAppId = caption.utf8(); // hack, see slaveinterface.cpp
+ TQCString observerAppId = caption.utf8(); // hack, see slaveinterface.cpp
// Contact the object "KIO::Observer" in the application <appId>
// Yes, this could be the same application we are, but not necessarily.
Observer_stub observer( observerAppId, "KIO::Observer" );
@@ -301,12 +301,12 @@ int Observer::messageBox( int progressId, int type, const QString &text,
KSSLCertificate *x = KSSLCertificate::fromString(meta["ssl_peer_certificate"].local8Bit());
if (x) {
// Set the chain back onto the certificate
- QStringList cl =
- QStringList::split(QString("\n"), meta["ssl_peer_chain"]);
- QPtrList<KSSLCertificate> ncl;
+ TQStringList cl =
+ TQStringList::split(TQString("\n"), meta["ssl_peer_chain"]);
+ TQPtrList<KSSLCertificate> ncl;
ncl.setAutoDelete(true);
- for (QStringList::Iterator it = cl.begin(); it != cl.end(); ++it) {
+ for (TQStringList::Iterator it = cl.begin(); it != cl.end(); ++it) {
KSSLCertificate *y = KSSLCertificate::fromString((*it).local8Bit());
if (y) ncl.append(y);
}
@@ -344,20 +344,20 @@ int Observer::messageBox( int progressId, int type, const QString &text,
delete config;
return result;
#if 0
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
arg << progressId;
arg << type;
arg << text;
arg << caption;
arg << buttonYes;
arg << buttonNo;
- if ( kapp->dcopClient()->call( "kio_uiserver", "UIServer", "messageBox(int,int,QString,QString,QString,QString)", data, replyType, replyData, true )
+ if ( kapp->dcopClient()->call( "kio_uiserver", "UIServer", "messageBox(int,int,TQString,TQString,TQString,TQString)", data, replyType, replyData, true )
&& replyType == "int" )
{
int result;
- QDataStream _reply_stream( replyData, IO_ReadOnly );
+ TQDataStream _reply_stream( replyData, IO_ReadOnly );
_reply_stream >> result;
kdDebug(KDEBUG_OBSERVER) << "Observer::messageBox got result " << result << endl;
return result;
@@ -368,9 +368,9 @@ int Observer::messageBox( int progressId, int type, const QString &text,
}
RenameDlg_Result Observer::open_RenameDlg( KIO::Job* job,
- const QString & caption,
- const QString& src, const QString & dest,
- RenameDlg_Mode mode, QString& newDest,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
+ RenameDlg_Mode mode, TQString& newDest,
KIO::filesize_t sizeSrc,
KIO::filesize_t sizeDest,
time_t ctimeSrc,
@@ -398,7 +398,7 @@ RenameDlg_Result Observer::open_RenameDlg( KIO::Job* job,
SkipDlg_Result Observer::open_SkipDlg( KIO::Job* job,
bool _multi,
- const QString& _error_text )
+ const TQString& _error_text )
{
kdDebug(KDEBUG_OBSERVER) << "Observer::open_SkipDlg job=" << job << " progressId=" << job->progressId() << endl;
// Hide existing dialog box if any
diff --git a/kio/kio/observer.h b/kio/kio/observer.h
index beadd1dcd..94b8cede9 100644
--- a/kio/kio/observer.h
+++ b/kio/kio/observer.h
@@ -19,9 +19,9 @@
#ifndef __kio_observer_h__
#define __kio_observer_h__
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
-#include <qintdict.h>
+#include <tqintdict.h>
#include <kio/global.h>
#include <kio/authinfo.h>
@@ -52,7 +52,7 @@ namespace KIO {
* @short Observer for KIO::Job progress information
* @author David Faure <faure@kde.org>
*/
-class KIO_EXPORT Observer : public QObject, public DCOPObject {
+class KIO_EXPORT Observer : public TQObject, public DCOPObject {
K_DCOP
Q_OBJECT
@@ -87,7 +87,7 @@ public:
/**
* @deprecated use KIO::AutoInfo
*/
- bool openPassDlg( const QString& prompt, QString& user, QString& pass,
+ bool openPassDlg( const TQString& prompt, TQString& user, TQString& pass,
bool readOnly );
/**
@@ -108,8 +108,8 @@ public:
* @param buttonYes the text of the "Yes" button
* @param buttonNo the text of the "No button
*/
- static int messageBox( int progressId, int type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo );
+ static int messageBox( int progressId, int type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo );
/**
* Popup a message box. See KIO::SlaveBase.
@@ -125,18 +125,18 @@ public:
* The string is used to lookup and store the setting in kioslaverc.
* @since 3.3
*/
- static int messageBox( int progressId, int type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo, const QString &dontAskAgainName );
+ static int messageBox( int progressId, int type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName );
/**
* @internal
* See renamedlg.h
*/
KIO::RenameDlg_Result open_RenameDlg( KIO::Job * job,
- const QString & caption,
- const QString& src, const QString & dest,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
KIO::RenameDlg_Mode mode,
- QString& newDest,
+ TQString& newDest,
KIO::filesize_t sizeSrc = (KIO::filesize_t) -1,
KIO::filesize_t sizeDest = (KIO::filesize_t) -1,
time_t ctimeSrc = (time_t) -1,
@@ -151,7 +151,7 @@ public:
*/
KIO::SkipDlg_Result open_SkipDlg( KIO::Job * job,
bool multi,
- const QString & error_text );
+ const TQString & error_text );
k_dcop:
/**
@@ -174,7 +174,7 @@ protected:
UIServer_stub * m_uiserver;
- QIntDict< KIO::Job > m_dctJobs;
+ TQIntDict< KIO::Job > m_dctJobs;
public slots:
@@ -188,7 +188,7 @@ public slots:
void slotSpeed( KIO::Job*, unsigned long speed );
void slotPercent( KIO::Job*, unsigned long percent );
- void slotInfoMessage( KIO::Job*, const QString & msg );
+ void slotInfoMessage( KIO::Job*, const TQString & msg );
void slotCopying( KIO::Job*, const KURL& from, const KURL& to );
void slotMoving( KIO::Job*, const KURL& from, const KURL& to );
@@ -201,8 +201,8 @@ public slots:
public:
void stating( KIO::Job*, const KURL& url );
- void mounting( KIO::Job*, const QString & dev, const QString & point );
- void unmounting( KIO::Job*, const QString & point );
+ void mounting( KIO::Job*, const TQString & dev, const TQString & point );
+ void unmounting( KIO::Job*, const TQString & point );
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/passdlg.cpp b/kio/kio/passdlg.cpp
index e8d606104..83434906b 100644
--- a/kio/kio/passdlg.cpp
+++ b/kio/kio/passdlg.cpp
@@ -18,13 +18,13 @@
#include "passdlg.h"
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsimplerichtext.h>
-#include <qstylesheet.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsimplerichtext.h>
+#include <tqstylesheet.h>
#include <kcombobox.h>
#include <kconfig.h>
@@ -37,22 +37,22 @@ using namespace KIO;
struct PasswordDialog::PasswordDialogPrivate
{
- QGridLayout *layout;
- QLineEdit* userEdit;
+ TQGridLayout *layout;
+ TQLineEdit* userEdit;
KLineEdit* passEdit;
- QLabel* userNameLabel;
- QLabel* prompt;
- QCheckBox* keepCheckBox;
- QMap<QString,QString> knownLogins;
+ TQLabel* userNameLabel;
+ TQLabel* prompt;
+ TQCheckBox* keepCheckBox;
+ TQMap<TQString,TQString> knownLogins;
KComboBox* userEditCombo;
- QHBox* userNameHBox;
+ TQHBox* userNameHBox;
bool keep;
short unsigned int nRow;
};
-PasswordDialog::PasswordDialog( const QString& prompt, const QString& user,
- bool enableKeep, bool modal, QWidget* parent,
+PasswordDialog::PasswordDialog( const TQString& prompt, const TQString& user,
+ bool enableKeep, bool modal, TQWidget* parent,
const char* name )
:KDialogBase( parent, name, modal, i18n("Password"), Ok|Cancel, Ok, true)
{
@@ -64,10 +64,10 @@ PasswordDialog::~PasswordDialog()
delete d;
}
-void PasswordDialog::init( const QString& prompt, const QString& user,
+void PasswordDialog::init( const TQString& prompt, const TQString& user,
bool enableKeep )
{
- QWidget *main = makeMainWidget();
+ TQWidget *main = makeMainWidget();
d = new PasswordDialogPrivate;
d->keep = false;
@@ -77,21 +77,21 @@ void PasswordDialog::init( const QString& prompt, const QString& user,
KConfig* cfg = KGlobal::config();
KConfigGroupSaver saver( cfg, "Passwords" );
- d->layout = new QGridLayout( main, 9, 3, spacingHint(), marginHint());
+ d->layout = new TQGridLayout( main, 9, 3, spacingHint(), marginHint());
d->layout->addColSpacing(1, 5);
// Row 0: pixmap prompt
- QLabel* lbl;
- QPixmap pix( KGlobal::iconLoader()->loadIcon( "password", KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true));
+ TQLabel* lbl;
+ TQPixmap pix( KGlobal::iconLoader()->loadIcon( "password", KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true));
if ( !pix.isNull() )
{
- lbl = new QLabel( main );
+ lbl = new TQLabel( main );
lbl->setPixmap( pix );
lbl->setAlignment( Qt::AlignLeft|Qt::AlignVCenter );
lbl->setFixedSize( lbl->sizeHint() );
d->layout->addWidget( lbl, 0, 0, Qt::AlignLeft );
}
- d->prompt = new QLabel( main );
+ d->prompt = new TQLabel( main );
d->prompt->setAlignment( Qt::AlignLeft|Qt::AlignVCenter|Qt::WordBreak );
d->layout->addWidget( d->prompt, 0, 2, Qt::AlignLeft );
if ( prompt.isEmpty() )
@@ -105,13 +105,13 @@ void PasswordDialog::init( const QString& prompt, const QString& user,
// Row 2-3: Reserved for an additional comment
// Row 4: Username field
- d->userNameLabel = new QLabel( i18n("&Username:"), main );
+ d->userNameLabel = new TQLabel( i18n("&Username:"), main );
d->userNameLabel->setAlignment( Qt::AlignVCenter | Qt::AlignLeft );
d->userNameLabel->setFixedSize( d->userNameLabel->sizeHint() );
- d->userNameHBox = new QHBox( main );
+ d->userNameHBox = new TQHBox( main );
d->userEdit = new KLineEdit( d->userNameHBox );
- QSize s = d->userEdit->sizeHint();
+ TQSize s = d->userEdit->sizeHint();
d->userEdit->setFixedHeight( s.height() );
d->userEdit->setMinimumWidth( s.width() );
d->userNameLabel->setBuddy( d->userEdit );
@@ -122,15 +122,15 @@ void PasswordDialog::init( const QString& prompt, const QString& user,
d->layout->addRowSpacing( 5, 4 );
// Row 6: Password field
- lbl = new QLabel( i18n("&Password:"), main );
+ lbl = new TQLabel( i18n("&Password:"), main );
lbl->setAlignment( Qt::AlignVCenter | Qt::AlignLeft );
lbl->setFixedSize( lbl->sizeHint() );
- QHBox* hbox = new QHBox( main );
+ TQHBox* hbox = new TQHBox( main );
d->passEdit = new KLineEdit( hbox );
if ( cfg->readEntry("EchoMode", "OneStar") == "NoEcho" )
- d->passEdit->setEchoMode( QLineEdit::NoEcho );
+ d->passEdit->setEchoMode( TQLineEdit::NoEcho );
else
- d->passEdit->setEchoMode( QLineEdit::Password );
+ d->passEdit->setEchoMode( TQLineEdit::Password );
s = d->passEdit->sizeHint();
d->passEdit->setFixedHeight( s.height() );
d->passEdit->setMinimumWidth( s.width() );
@@ -143,18 +143,18 @@ void PasswordDialog::init( const QString& prompt, const QString& user,
// Row 7: Add spacer
d->layout->addRowSpacing( 7, 4 );
// Row 8: Keep Password
- hbox = new QHBox( main );
- d->keepCheckBox = new QCheckBox( i18n("&Keep password"), hbox );
+ hbox = new TQHBox( main );
+ d->keepCheckBox = new TQCheckBox( i18n("&Keep password"), hbox );
d->keepCheckBox->setFixedSize( d->keepCheckBox->sizeHint() );
d->keep = cfg->readBoolEntry("Keep", false );
d->keepCheckBox->setChecked( d->keep );
- connect(d->keepCheckBox, SIGNAL(toggled( bool )), SLOT(slotKeep( bool )));
+ connect(d->keepCheckBox, TQT_SIGNAL(toggled( bool )), TQT_SLOT(slotKeep( bool )));
d->layout->addWidget( hbox, 8, 2 );
}
// Configure necessary key-bindings and connect necessar slots and signals
- connect( d->userEdit, SIGNAL(returnPressed()), d->passEdit, SLOT(setFocus()) );
- connect( d->passEdit, SIGNAL(returnPressed()), SLOT(slotOk()) );
+ connect( d->userEdit, TQT_SIGNAL(returnPressed()), d->passEdit, TQT_SLOT(setFocus()) );
+ connect( d->passEdit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotOk()) );
if ( !user.isEmpty() )
{
@@ -168,12 +168,12 @@ void PasswordDialog::init( const QString& prompt, const QString& user,
// setFixedSize( sizeHint() );
}
-QString PasswordDialog::username() const
+TQString PasswordDialog::username() const
{
return d->userEdit->text();
}
-QString PasswordDialog::password() const
+TQString PasswordDialog::password() const
{
return d->passEdit->text();
}
@@ -189,16 +189,16 @@ bool PasswordDialog::keepPassword() const
return d->keep;
}
-static void calculateLabelSize(QLabel *label)
+static void calculateLabelSize(TQLabel *label)
{
- QString qt_text = label->text();
+ TQString qt_text = label->text();
int pref_width = 0;
int pref_height = 0;
// Calculate a proper size for the text.
{
- QSimpleRichText rt(qt_text, label->font());
- QRect d = KGlobalSettings::desktopGeometry(label->topLevelWidget());
+ TQSimpleRichText rt(qt_text, label->font());
+ TQRect d = KGlobalSettings::desktopGeometry(label->topLevelWidget());
pref_width = d.width() / 4;
rt.setWidth(pref_width-10);
@@ -227,22 +227,22 @@ static void calculateLabelSize(QLabel *label)
pref_width = used_width;
}
}
- label->setFixedSize(QSize(pref_width+10, pref_height));
+ label->setFixedSize(TQSize(pref_width+10, pref_height));
}
-void PasswordDialog::addCommentLine( const QString& label,
- const QString comment )
+void PasswordDialog::addCommentLine( const TQString& label,
+ const TQString comment )
{
if (d->nRow > 0)
return;
- QWidget *main = mainWidget();
+ TQWidget *main = mainWidget();
- QLabel* lbl = new QLabel( label, main);
+ TQLabel* lbl = new TQLabel( label, main);
lbl->setAlignment( Qt::AlignVCenter|Qt::AlignRight );
lbl->setFixedSize( lbl->sizeHint() );
d->layout->addWidget( lbl, d->nRow+2, 0, Qt::AlignLeft );
- lbl = new QLabel( comment, main);
+ lbl = new TQLabel( comment, main);
lbl->setAlignment( Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak );
calculateLabelSize(lbl);
d->layout->addWidget( lbl, d->nRow+2, 2, Qt::AlignLeft );
@@ -255,28 +255,28 @@ void PasswordDialog::slotKeep( bool keep )
d->keep = keep;
}
-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);
}
-void PasswordDialog::setPrompt(const QString& prompt)
+void PasswordDialog::setPrompt(const TQString& prompt)
{
- QString text = qrichtextify(prompt);
+ TQString text = qrichtextify(prompt);
d->prompt->setText(text);
calculateLabelSize(d->prompt);
}
-void PasswordDialog::setPassword(const QString &p)
+void PasswordDialog::setPassword(const TQString &p)
{
d->passEdit->setText(p);
}
@@ -288,7 +288,7 @@ void PasswordDialog::setUserReadOnly( bool readOnly )
d->passEdit->setFocus();
}
-void PasswordDialog::setKnownLogins( const QMap<QString, QString>& knownLogins )
+void PasswordDialog::setKnownLogins( const TQMap<TQString, TQString>& knownLogins )
{
const int nr = knownLogins.count();
if ( nr == 0 )
@@ -304,7 +304,7 @@ void PasswordDialog::setKnownLogins( const QMap<QString, QString>& knownLogins )
delete d->userEdit;
d->userEditCombo = new KComboBox( true, d->userNameHBox );
d->userEdit = d->userEditCombo->lineEdit();
- QSize s = d->userEditCombo->sizeHint();
+ TQSize s = d->userEditCombo->sizeHint();
d->userEditCombo->setFixedHeight( s.height() );
d->userEditCombo->setMinimumWidth( s.width() );
d->userNameLabel->setBuddy( d->userEditCombo );
@@ -315,23 +315,23 @@ void PasswordDialog::setKnownLogins( const QMap<QString, QString>& knownLogins )
d->userEditCombo->insertStringList( knownLogins.keys() );
d->userEditCombo->setFocus();
- connect( d->userEditCombo, SIGNAL( activated( const QString& ) ),
- this, SLOT( slotActivated( const QString& ) ) );
+ connect( d->userEditCombo, TQT_SIGNAL( activated( const TQString& ) ),
+ this, TQT_SLOT( slotActivated( const TQString& ) ) );
}
-void PasswordDialog::slotActivated( const QString& userName )
+void PasswordDialog::slotActivated( const TQString& userName )
{
- QMap<QString, QString>::ConstIterator it = d->knownLogins.find( userName );
+ TQMap<TQString, TQString>::ConstIterator it = d->knownLogins.find( userName );
if ( it != d->knownLogins.end() )
setPassword( it.data() );
}
-int PasswordDialog::getNameAndPassword( QString& user, QString& pass, bool* keep,
- const QString& prompt, bool readOnly,
- const QString& caption,
- const QString& comment,
- const QString& label )
+int PasswordDialog::getNameAndPassword( TQString& user, TQString& pass, bool* keep,
+ const TQString& prompt, bool readOnly,
+ const TQString& caption,
+ const TQString& comment,
+ const TQString& label )
{
PasswordDialog* dlg;
if( keep )
diff --git a/kio/kio/passdlg.h b/kio/kio/passdlg.h
index 948ffc7f7..dbc4b294e 100644
--- a/kio/kio/passdlg.h
+++ b/kio/kio/passdlg.h
@@ -48,9 +48,9 @@ public:
* @param parent the parent widget (default:NULL).
* @param name the dialog name (default:NULL).
*/
- PasswordDialog( const QString& prompt, const QString& user,
+ PasswordDialog( const TQString& prompt, const TQString& user,
bool enableKeep = false, bool modal=true,
- QWidget* parent=0, const char* name=0 );
+ TQWidget* parent=0, const char* name=0 );
/**
* Destructor
@@ -61,7 +61,7 @@ public:
* Sets the prompt to show to the user.
* @param prompt instructional text to be shown.
*/
- void setPrompt( const QString& prompt );
+ void setPrompt( const TQString& prompt );
/**
* Adds a comment line to the dialog.
@@ -73,19 +73,19 @@ public:
* @param label label for comment (ex:"Command:")
* @param comment the actual comment text.
*/
- void addCommentLine( const QString& label, const QString comment );
+ void addCommentLine( const TQString& label, const TQString comment );
/**
* Returns the password entered by the user.
* @return the password
*/
- QString password() const;
+ TQString password() const;
/**
* Returns the username entered by the user.
* @return the user name
*/
- QString username() const;
+ TQString username() const;
/**
* Determines whether supplied authorization should
@@ -122,7 +122,7 @@ public:
* @param password the password to set
* @since 3.1
*/
- void setPassword( const QString& password );
+ void setPassword( const TQString& password );
/**
* Presets a number of login+password pairs that the user can choose from.
@@ -131,7 +131,7 @@ public:
* @param knownLogins map of known logins: the keys are usernames, the values are passwords.
* @since 3.4
*/
- void setKnownLogins( const QMap<QString, QString>& knownLogins );
+ void setKnownLogins( const TQMap<TQString, TQString>& knownLogins );
/**
* A convienence static method for obtaining authorization
@@ -149,19 +149,19 @@ public:
*
* @return Accepted/Rejected based on the user choice.
*/
- static int getNameAndPassword( QString& user, QString& pass, bool* keep,
- const QString& prompt = QString::null,
+ static int getNameAndPassword( TQString& user, TQString& pass, bool* keep,
+ const TQString& prompt = TQString::null,
bool readOnly = false,
- const QString& caption = QString::null,
- const QString& comment = QString::null,
- const QString& label = QString::null );
+ const TQString& caption = TQString::null,
+ const TQString& comment = TQString::null,
+ const TQString& label = TQString::null );
private slots:
void slotKeep( bool );
- void slotActivated( const QString& userName );
+ void slotActivated( const TQString& userName );
private:
- void init( const QString&, const QString&, bool );
+ void init( const TQString&, const TQString&, bool );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/paste.cpp b/kio/kio/paste.cpp
index 7f66e4c05..399350236 100644
--- a/kio/kio/paste.cpp
+++ b/kio/kio/paste.cpp
@@ -35,19 +35,19 @@
#include <kmimetype.h>
#include <ktempfile.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qdragobject.h>
-#include <qtextstream.h>
-#include <qvaluevector.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqdragobject.h>
+#include <tqtextstream.h>
+#include <tqvaluevector.h>
-static KURL getNewFileName( const KURL &u, const QString& text )
+static KURL getNewFileName( const KURL &u, const TQString& text )
{
bool ok;
- QString dialogText( text );
+ TQString dialogText( text );
if ( dialogText.isEmpty() )
dialogText = i18n( "Filename for clipboard content:" );
- QString file = KInputDialog::getText( QString::null, dialogText, QString::null, &ok );
+ TQString file = KInputDialog::getText( TQString::null, dialogText, TQString::null, &ok );
if ( !ok )
return KURL();
@@ -59,7 +59,7 @@ static KURL getNewFileName( const KURL &u, const QString& text )
kdDebug(7007) << "Paste will overwrite file. Prompting..." << endl;
KIO::RenameDlg_Result res = KIO::R_OVERWRITE;
- QString newPath;
+ TQString newPath;
// Ask confirmation about resuming previous transfer
res = Observer::self()->open_RenameDlg(
0L, i18n("File Already Exists"),
@@ -81,7 +81,7 @@ static KURL getNewFileName( const KURL &u, const QString& text )
}
// The finaly step: write _data to tempfile and move it to neW_url
-static KIO::CopyJob* pasteDataAsyncTo( const KURL& new_url, const QByteArray& _data )
+static KIO::CopyJob* pasteDataAsyncTo( const KURL& new_url, const TQByteArray& _data )
{
KTempFile tempFile;
tempFile.dataStream()->writeRawBytes( _data.data(), _data.size() );
@@ -94,15 +94,15 @@ static KIO::CopyJob* pasteDataAsyncTo( const KURL& new_url, const QByteArray& _d
}
#ifndef QT_NO_MIMECLIPBOARD
-static KIO::CopyJob* chooseAndPaste( const KURL& u, QMimeSource* data,
- const QValueVector<QCString>& formats,
- const QString& text,
- QWidget* widget,
+static KIO::CopyJob* chooseAndPaste( const KURL& u, TQMimeSource* data,
+ const TQValueVector<TQCString>& formats,
+ const TQString& text,
+ TQWidget* widget,
bool clipboard )
{
- QStringList formatLabels;
+ TQStringList formatLabels;
for ( uint i = 0; i < formats.size(); ++i ) {
- const QCString& fmt = formats[i];
+ const TQCString& fmt = formats[i];
KMimeType::Ptr mime = KMimeType::mimeType( fmt );
if ( mime != KMimeType::defaultMimeTypePtr() )
formatLabels.append( i18n( "%1 (%2)" ).arg( mime->comment() ).arg( fmt ) );
@@ -110,10 +110,10 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, QMimeSource* data,
formatLabels.append( fmt );
}
- QString dialogText( text );
+ TQString dialogText( text );
if ( dialogText.isEmpty() )
dialogText = i18n( "Filename for clipboard content:" );
- KIO::PasteDialog dlg( QString::null, dialogText, QString::null, formatLabels, widget, clipboard );
+ KIO::PasteDialog dlg( TQString::null, dialogText, TQString::null, formatLabels, widget, clipboard );
if ( dlg.exec() != KDialogBase::Accepted )
return 0;
@@ -126,8 +126,8 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, QMimeSource* data,
return 0;
}
- const QString result = dlg.lineEditText();
- const QCString chosenFormat = formats[ dlg.comboItem() ];
+ const TQString result = dlg.lineEditText();
+ const TQCString chosenFormat = formats[ dlg.comboItem() ];
kdDebug() << " result=" << result << " chosenFormat=" << chosenFormat << endl;
KURL new_url( u );
@@ -135,9 +135,9 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, QMimeSource* data,
// if "data" came from QClipboard, then it was deleted already - by a nice 0-seconds timer
// In that case, get it again. Let's hope the user didn't copy something else meanwhile :/
if ( clipboard ) {
- data = QApplication::clipboard()->data();
+ data = TQApplication::clipboard()->data();
}
- const QByteArray ba = data->encodedData( chosenFormat );
+ const TQByteArray ba = data->encodedData( chosenFormat );
return pasteDataAsyncTo( new_url, ba );
}
#endif
@@ -146,13 +146,13 @@ static KIO::CopyJob* chooseAndPaste( const KURL& u, QMimeSource* data,
KIO_EXPORT bool KIO::isClipboardEmpty()
{
#ifndef QT_NO_MIMECLIPBOARD
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::clipboard()->data();
if ( data->provides( "text/uri-list" ) && data->encodedData( "text/uri-list" ).size() > 0 )
return false;
#else
// Happens with some versions of Qt Embedded... :/
// Guess.
- QString data = QApplication::clipboard()->text();
+ TQString data = TQApplication::clipboard()->text();
if(data.contains("://"))
return false;
#endif
@@ -161,22 +161,22 @@ KIO_EXPORT bool KIO::isClipboardEmpty()
#ifndef QT_NO_MIMECLIPBOARD
// The main method for dropping
-KIO::CopyJob* KIO::pasteMimeSource( QMimeSource* data, const KURL& dest_url,
- const QString& dialogText, QWidget* widget, bool clipboard )
+KIO::CopyJob* KIO::pasteMimeSource( TQMimeSource* data, const KURL& dest_url,
+ const TQString& dialogText, TQWidget* widget, bool clipboard )
{
- QByteArray ba;
+ TQByteArray ba;
// Now check for plain text
- // We don't want to display a mimetype choice for a QTextDrag, those mimetypes look ugly.
- QString text;
- if ( QTextDrag::canDecode( data ) && QTextDrag::decode( data, text ) )
+ // We don't want to display a mimetype choice for a TQTextDrag, those mimetypes look ugly.
+ TQString text;
+ if ( TQTextDrag::canDecode( data ) && TQTextDrag::decode( data, text ) )
{
- QTextStream txtStream( ba, IO_WriteOnly );
+ TQTextStream txtStream( ba, IO_WriteOnly );
txtStream << text;
}
else
{
- QValueVector<QCString> formats;
+ TQValueVector<TQCString> formats;
const char* fmt;
for ( int i = 0; ( fmt = data->format( i ) ); ++i ) {
if ( qstrcmp( fmt, "application/x-qiconlist" ) == 0 ) // see QIconDrag
@@ -215,7 +215,7 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move )
}
#ifndef QT_NO_MIMECLIPBOARD
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::clipboard()->data();
// First check for URLs.
KURL::List urls;
@@ -233,18 +233,18 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move )
// If moving, erase the clipboard contents, the original files don't exist anymore
if ( move )
- QApplication::clipboard()->clear();
+ TQApplication::clipboard()->clear();
return res;
}
- return pasteMimeSource( data, dest_url, QString::null, 0 /*TODO parent widget*/, true /*clipboard*/ );
+ return pasteMimeSource( data, dest_url, TQString::null, 0 /*TODO parent widget*/, true /*clipboard*/ );
#else
- QByteArray ba;
- QTextStream txtStream( ba, IO_WriteOnly );
- QStringList data = QStringList::split("\n", QApplication::clipboard()->text());
+ TQByteArray ba;
+ TQTextStream txtStream( ba, IO_WriteOnly );
+ TQStringList data = TQStringList::split("\n", TQApplication::clipboard()->text());
KURL::List urls;
KURLDrag::decode(data, urls);
- QStringList::Iterator end(data.end());
- for(QStringList::Iterator it=data.begin(); it!=end; ++it)
+ TQStringList::Iterator end(data.end());
+ for(TQStringList::Iterator it=data.begin(); it!=end; ++it)
txtStream << *it;
if ( ba.size() == 0 )
{
@@ -256,9 +256,9 @@ KIO_EXPORT KIO::Job *KIO::pasteClipboard( const KURL& dest_url, bool move )
}
-KIO_EXPORT void KIO::pasteData( const KURL& u, const QByteArray& _data )
+KIO_EXPORT void KIO::pasteData( const KURL& u, const TQByteArray& _data )
{
- KURL new_url = getNewFileName( u, QString::null );
+ KURL new_url = getNewFileName( u, TQString::null );
// We could use KIO::put here, but that would require a class
// for the slotData call. With NetAccess, we can do a synchronous call.
@@ -273,12 +273,12 @@ KIO_EXPORT void KIO::pasteData( const KURL& u, const QByteArray& _data )
(void) KIO::NetAccess::upload( tempFile.name(), new_url, 0 );
}
-KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const QByteArray& _data )
+KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const TQByteArray& _data )
{
- return pasteDataAsync( u, _data, QString::null );
+ return pasteDataAsync( u, _data, TQString::null );
}
-KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const QByteArray& _data, const QString& text )
+KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const TQByteArray& _data, const TQString& text )
{
KURL new_url = getNewFileName( u, text );
@@ -288,13 +288,13 @@ KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KURL& u, const QByteArray& _
return pasteDataAsyncTo( new_url, _data );
}
-KIO_EXPORT QString KIO::pasteActionText()
+KIO_EXPORT TQString KIO::pasteActionText()
{
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::clipboard()->data();
KURL::List urls;
if ( KURLDrag::canDecode( data ) && KURLDrag::decode( data, urls ) ) {
if ( urls.isEmpty() )
- return QString::null; // nothing to paste
+ return TQString::null; // nothing to paste
else if ( urls.first().isLocalFile() )
return i18n( "&Paste File", "&Paste %n Files", urls.count() );
else
@@ -302,7 +302,7 @@ KIO_EXPORT QString KIO::pasteActionText()
} else if ( data->format(0) != 0 ) {
return i18n( "&Paste Clipboard Contents" );
} else {
- return QString::null;
+ return TQString::null;
}
}
diff --git a/kio/kio/paste.h b/kio/kio/paste.h
index eb5822ee3..66975d772 100644
--- a/kio/kio/paste.h
+++ b/kio/kio/paste.h
@@ -19,8 +19,8 @@
#ifndef __kio_paste_h__
#define __kio_paste_h__
-#include <qstring.h>
-#include <qmemarray.h>
+#include <tqstring.h>
+#include <tqmemarray.h>
#include <kurl.h>
class QWidget;
class QMimeSource;
@@ -54,7 +54,7 @@ namespace KIO {
* @param data the data to copy
* @see pasteClipboard()
*/
- KIO_EXPORT void pasteData( const KURL& destURL, const QByteArray& data );
+ KIO_EXPORT void pasteData( const KURL& destURL, const TQByteArray& data );
/**
* Pastes the given @p data to the given destination URL.
@@ -66,7 +66,7 @@ namespace KIO {
* @param data the data to copy
* @see pasteClipboard()
*/
- KIO_EXPORT CopyJob *pasteDataAsync( const KURL& destURL, const QByteArray& data );
+ KIO_EXPORT CopyJob *pasteDataAsync( const KURL& destURL, const TQByteArray& data );
/**
* Pastes the given @p data to the given destination URL.
@@ -79,7 +79,7 @@ namespace KIO {
* @param dialogText the text to show in the dialog
* @see pasteClipboard()
*/
- KIO_EXPORT CopyJob *pasteDataAsync( const KURL& destURL, const QByteArray& data, const QString& dialogText ); // KDE4: merge with above
+ KIO_EXPORT CopyJob *pasteDataAsync( const KURL& destURL, const TQByteArray& data, const TQString& dialogText ); // KDE4: merge with above
/**
@@ -88,20 +88,20 @@ namespace KIO {
* This is the method used when handling drops (of anything else than URLs)
* onto kdesktop and konqueror.
*
- * @param data the QMimeSource (e.g. a QDropEvent)
+ * @param data the TQMimeSource (e.g. a TQDropEvent)
* @param destURL the URL of the directory where the data will be pasted.
* The filename to use in that directory is prompted by this method.
* @param dialogText the text to show in the dialog
* @param widget parent widget to use for dialogs
- * @param clipboard whether the QMimeSource comes from QClipboard. If you
+ * @param clipboard whether the TQMimeSource comes from QClipboard. If you
* use pasteClipboard for that case, you never have to worry about this parameter.
*
* @see pasteClipboard()
*
* @since 3.5
*/
- KIO_EXPORT CopyJob* pasteMimeSource( QMimeSource* data, const KURL& destURL,
- const QString& dialogText, QWidget* widget,
+ KIO_EXPORT CopyJob* pasteMimeSource( TQMimeSource* data, const KURL& destURL,
+ const TQString& dialogText, TQWidget* widget,
bool clipboard = false );
/**
@@ -119,7 +119,7 @@ namespace KIO {
*
* @since 3.5
*/
- KIO_EXPORT QString pasteActionText();
+ KIO_EXPORT TQString pasteActionText();
}
#endif
diff --git a/kio/kio/pastedialog.cpp b/kio/kio/pastedialog.cpp
index cf9995cb1..480eaaba8 100644
--- a/kio/kio/pastedialog.cpp
+++ b/kio/kio/pastedialog.cpp
@@ -22,22 +22,22 @@
#include <kmimetype.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-
-KIO::PasteDialog::PasteDialog( const QString &caption, const QString &label,
- const QString &value, const QStringList& items,
- QWidget *parent,
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+
+KIO::PasteDialog::PasteDialog( const TQString &caption, const TQString &label,
+ const TQString &value, const TQStringList& items,
+ TQWidget *parent,
bool clipboard )
: KDialogBase( parent, 0 /*name*/, true, caption, Ok|Cancel, Ok, true )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *layout = new QVBoxLayout( frame, 0, spacingHint() );
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
- m_label = new QLabel( label, frame );
+ m_label = new TQLabel( label, frame );
layout->addWidget( m_label );
m_lineEdit = new KLineEdit( value, frame );
@@ -46,24 +46,24 @@ KIO::PasteDialog::PasteDialog( const QString &caption, const QString &label,
m_lineEdit->setFocus();
m_label->setBuddy( m_lineEdit );
- layout->addWidget( new QLabel( i18n( "Data format:" ), frame ) );
- m_comboBox = new QComboBox( frame );
+ layout->addWidget( new TQLabel( i18n( "Data format:" ), frame ) );
+ m_comboBox = new TQComboBox( frame );
m_comboBox->insertStringList( items );
layout->addWidget( m_comboBox );
layout->addStretch();
- //connect( m_lineEdit, SIGNAL( textChanged( const QString & ) ),
- // SLOT( slotEditTextChanged( const QString & ) ) );
- //connect( this, SIGNAL( user1Clicked() ), m_lineEdit, SLOT( clear() ) );
+ //connect( m_lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ // TQT_SLOT( slotEditTextChanged( const TQString & ) ) );
+ //connect( this, TQT_SIGNAL( user1Clicked() ), m_lineEdit, TQT_SLOT( clear() ) );
//slotEditTextChanged( value );
setMinimumWidth( 350 );
m_clipboardChanged = false;
if ( clipboard )
- connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
- this, SLOT( slotClipboardDataChanged() ) );
+ connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
+ this, TQT_SLOT( slotClipboardDataChanged() ) );
}
void KIO::PasteDialog::slotClipboardDataChanged()
@@ -71,7 +71,7 @@ void KIO::PasteDialog::slotClipboardDataChanged()
m_clipboardChanged = true;
}
-QString KIO::PasteDialog::lineEditText() const
+TQString KIO::PasteDialog::lineEditText() const
{
return m_lineEdit->text();
}
diff --git a/kio/kio/pastedialog.h b/kio/kio/pastedialog.h
index 0cf141d50..a025d532d 100644
--- a/kio/kio/pastedialog.h
+++ b/kio/kio/pastedialog.h
@@ -36,11 +36,11 @@ class PasteDialog : public KDialogBase
{
Q_OBJECT
public:
- PasteDialog( const QString &caption, const QString &label,
- const QString &value, const QStringList& items,
- QWidget *parent, bool clipboard );
+ PasteDialog( const TQString &caption, const TQString &label,
+ const TQString &value, const TQStringList& items,
+ TQWidget *parent, bool clipboard );
- QString lineEditText() const;
+ TQString lineEditText() const;
int comboItem() const;
bool clipboardChanged() const { return m_clipboardChanged; }
@@ -48,9 +48,9 @@ private slots:
void slotClipboardDataChanged();
private:
- QLabel* m_label;
+ TQLabel* m_label;
KLineEdit* m_lineEdit;
- QComboBox* m_comboBox;
+ TQComboBox* m_comboBox;
bool m_clipboardChanged;
class Private;
diff --git a/kio/kio/posixacladdons.cpp b/kio/kio/posixacladdons.cpp
index 7a7ebe2f7..bae51592b 100644
--- a/kio/kio/posixacladdons.cpp
+++ b/kio/kio/posixacladdons.cpp
@@ -24,13 +24,13 @@
#include <errno.h>
#include <sys/stat.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
-class SortedEntryList : public QPtrList<acl_entry_t>
+class SortedEntryList : public TQPtrList<acl_entry_t>
{
protected:
- int compareItems( QPtrCollection::Item i1,
- QPtrCollection::Item i2 )
+ int compareItems( TQPtrCollection::Item i1,
+ TQPtrCollection::Item i2 )
{
acl_entry_t *e1 = static_cast<acl_entry_t*>( i1 );
acl_entry_t *e2 = static_cast<acl_entry_t*>( i2 );
diff --git a/kio/kio/posixacladdons.h b/kio/kio/posixacladdons.h
index f77831f21..45c4af245 100644
--- a/kio/kio/posixacladdons.h
+++ b/kio/kio/posixacladdons.h
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-#include <qglobal.h>
+#include <tqglobal.h>
#if defined(USE_POSIX_ACL) && !defined(HAVE_NON_POSIX_ACL_EXTENSIIONS)
diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp
index ede141003..2a2ad91cc 100644
--- a/kio/kio/previewjob.cpp
+++ b/kio/kio/previewjob.cpp
@@ -34,11 +34,11 @@
#include <sys/shm.h>
#endif
-#include <qdir.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <kdatastream.h> // Do not remove, needed for correct bool serialization
#include <kfileitem.h>
@@ -69,20 +69,20 @@ struct KIO::PreviewJobPrivate
STATE_CREATETHUMB // thumbnail:/ slave
} state;
KFileItemList initialItems;
- const QStringList *enabledPlugins;
+ const TQStringList *enabledPlugins;
// Our todo list :)
- QValueList<PreviewItem> items;
+ TQValueList<PreviewItem> items;
// The current item
PreviewItem currentItem;
// The modification time of that URL
time_t tOrig;
// Path to thumbnail cache for the current size
- QString thumbPath;
+ TQString thumbPath;
// Original URL of current item in TMS format
// (file:///path/to/file instead of file:/path/to/file)
- QString origName;
+ TQString origName;
// Thumbnail file name for current item
- QString thumbName;
+ TQString thumbName;
// Size of thumbnail
int width;
int height;
@@ -94,7 +94,7 @@ struct KIO::PreviewJobPrivate
// Whether we should save the thumbnail
bool bSave;
// If the file to create a thumb for was a temp file, this is its name
- QString tempName;
+ TQString tempName;
// Over that, it's too much
unsigned long maximumSize;
// the size for the icon overlay
@@ -110,14 +110,14 @@ struct KIO::PreviewJobPrivate
bool deleteItems;
bool succeeded;
// Root of thumbnail cache
- QString thumbRoot;
+ TQString thumbRoot;
bool ignoreMaximumSize;
- QTimer startPreviewTimer;
+ TQTimer startPreviewTimer;
};
PreviewJob::PreviewJob( const KFileItemList &items, int width, int height,
int iconSize, int iconAlpha, bool scale, bool save,
- const QStringList *enabledPlugins, bool deleteItems )
+ const TQStringList *enabledPlugins, bool deleteItems )
: KIO::Job( false /* no GUI */ )
{
d = new PreviewJobPrivate;
@@ -137,11 +137,11 @@ PreviewJob::PreviewJob( const KFileItemList &items, int width, int height,
d->bSave = save && scale;
d->succeeded = false;
d->currentItem.item = 0;
- d->thumbRoot = QDir::homeDirPath() + "/.thumbnails/";
+ d->thumbRoot = TQDir::homeDirPath() + "/.thumbnails/";
d->ignoreMaximumSize = false;
// Return to event loop first, determineNextFile() might delete this;
- connect(&d->startPreviewTimer, SIGNAL(timeout()), SLOT(startPreview()) );
+ connect(&d->startPreviewTimer, TQT_SIGNAL(timeout()), TQT_SLOT(startPreview()) );
d->startPreviewTimer.start(0, true);
}
@@ -160,13 +160,13 @@ void PreviewJob::startPreview()
{
// Load the list of plugins to determine which mimetypes are supported
KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator");
- QMap<QString, KService::Ptr> mimeMap;
+ TQMap<TQString, KService::Ptr> mimeMap;
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
if (!d->enabledPlugins || d->enabledPlugins->contains((*it)->desktopEntryName()))
{
- QStringList mimeTypes = (*it)->property("MimeTypes").toStringList();
- for (QStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt)
+ TQStringList mimeTypes = (*it)->property("MimeTypes").toStringList();
+ for (TQStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt)
mimeMap.insert(*mt, *it);
}
@@ -176,17 +176,17 @@ void PreviewJob::startPreview()
{
PreviewItem item;
item.item = it.current();
- QMap<QString, KService::Ptr>::ConstIterator plugin = mimeMap.find(it.current()->mimetype());
+ TQMap<TQString, KService::Ptr>::ConstIterator plugin = mimeMap.find(it.current()->mimetype());
if (plugin == mimeMap.end() && it.current()->mimetype() != "application/x-desktop")
{
- QString mimeType = it.current()->mimetype();
- plugin = mimeMap.find(mimeType.replace(QRegExp("/.*"), "/*"));
+ TQString mimeType = it.current()->mimetype();
+ plugin = mimeMap.find(mimeType.replace(TQRegExp("/.*"), "/*"));
if (plugin == mimeMap.end())
{
// check mime type inheritance
KMimeType::Ptr mimeInfo = KMimeType::mimeType(it.current()->mimetype());
- QString parentMimeType = mimeInfo->parentMimeType();
+ TQString parentMimeType = mimeInfo->parentMimeType();
while (!parentMimeType.isEmpty())
{
plugin = mimeMap.find(parentMimeType);
@@ -203,8 +203,8 @@ void PreviewJob::startPreview()
{
// check X-KDE-Text property
KMimeType::Ptr mimeInfo = KMimeType::mimeType(it.current()->mimetype());
- QVariant textProperty = mimeInfo->property("X-KDE-text");
- if (textProperty.isValid() && textProperty.type() == QVariant::Bool)
+ TQVariant textProperty = mimeInfo->property("X-KDE-text");
+ if (textProperty.isValid() && textProperty.type() == TQVariant::Bool)
{
if (textProperty.toBool())
{
@@ -255,7 +255,7 @@ void PreviewJob::startPreview()
void PreviewJob::removeItem( const KFileItem *item )
{
- for (QValueList<PreviewItem>::Iterator it = d->items.begin(); it != d->items.end(); ++it)
+ for (TQValueList<PreviewItem>::Iterator it = d->items.begin(); it != d->items.end(); ++it)
if ((*it).item == item)
{
d->items.remove(it);
@@ -372,8 +372,8 @@ void PreviewJob::slotResult( KIO::Job *job )
{
if (!d->tempName.isEmpty())
{
- QFile::remove(d->tempName);
- d->tempName = QString::null;
+ TQFile::remove(d->tempName);
+ d->tempName = TQString::null;
}
determineNextFile();
return;
@@ -388,7 +388,7 @@ bool PreviewJob::statResultThumbnail()
KURL url = d->currentItem.item->url();
// Don't include the password if any
- url.setPass(QString::null);
+ url.setPass(TQString::null);
// The TMS defines local files as file:///path/to/file instead of KDE's
// way (file:/path/to/file)
#ifdef KURL_TRIPLE_SLASH_FILE_PROT
@@ -398,10 +398,10 @@ bool PreviewJob::statResultThumbnail()
else d->origName = url.url();
#endif
- KMD5 md5( QFile::encodeName( d->origName ) );
- d->thumbName = QFile::encodeName( md5.hexDigest() ) + ".png";
+ KMD5 md5( TQFile::encodeName( d->origName ) );
+ d->thumbName = TQFile::encodeName( md5.hexDigest() ) + ".png";
- QImage thumb;
+ TQImage thumb;
if ( !thumb.load( d->thumbPath + d->thumbName ) ) return false;
if ( thumb.text( "Thumb::URI", 0 ) != d->origName ||
@@ -419,7 +419,7 @@ void PreviewJob::getOrCreateThumbnail()
{
// We still need to load the orig file ! (This is getting tedious) :)
const KFileItem* item = d->currentItem.item;
- const QString localPath = item->localPath();
+ const TQString localPath = item->localPath();
if ( !localPath.isEmpty() )
createThumbnail( localPath );
else
@@ -436,8 +436,8 @@ void PreviewJob::getOrCreateThumbnail()
}
}
-// KDE 4: Make it const QString &
-void PreviewJob::createThumbnail( QString pixPath )
+// KDE 4: Make it const TQString &
+void PreviewJob::createThumbnail( TQString pixPath )
{
d->state = PreviewJobPrivate::STATE_CREATETHUMB;
KURL thumbURL;
@@ -445,13 +445,13 @@ void PreviewJob::createThumbnail( QString pixPath )
thumbURL.setPath(pixPath);
KIO::TransferJob *job = KIO::get(thumbURL, false, false);
addSubjob(job);
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), SLOT(slotThumbData(KIO::Job *, const QByteArray &)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), TQT_SLOT(slotThumbData(KIO::Job *, const TQByteArray &)));
bool save = d->bSave && d->currentItem.plugin->property("CacheThumbnail").toBool();
job->addMetaData("mimeType", d->currentItem.item->mimetype());
- job->addMetaData("width", QString().setNum(save ? d->cacheWidth : d->width));
- job->addMetaData("height", QString().setNum(save ? d->cacheHeight : d->height));
- job->addMetaData("iconSize", QString().setNum(save ? 64 : d->iconSize));
- job->addMetaData("iconAlpha", QString().setNum(d->iconAlpha));
+ job->addMetaData("width", TQString().setNum(save ? d->cacheWidth : d->width));
+ job->addMetaData("height", TQString().setNum(save ? d->cacheHeight : d->height));
+ job->addMetaData("iconSize", TQString().setNum(save ? 64 : d->iconSize));
+ job->addMetaData("iconAlpha", TQString().setNum(d->iconAlpha));
job->addMetaData("plugin", d->currentItem.plugin->library());
#ifdef Q_OS_UNIX
if (d->shmid == -1)
@@ -475,25 +475,25 @@ void PreviewJob::createThumbnail( QString pixPath )
d->shmaddr = 0;
}
if (d->shmid != -1)
- job->addMetaData("shmid", QString().setNum(d->shmid));
+ job->addMetaData("shmid", TQString().setNum(d->shmid));
#endif
}
-void PreviewJob::slotThumbData(KIO::Job *, const QByteArray &data)
+void PreviewJob::slotThumbData(KIO::Job *, const TQByteArray &data)
{
bool save = d->bSave &&
d->currentItem.plugin->property("CacheThumbnail").toBool() &&
(d->currentItem.item->url().protocol() != "file" ||
!d->currentItem.item->url().directory( false ).startsWith(d->thumbRoot));
- QImage thumb;
+ TQImage thumb;
#ifdef Q_OS_UNIX
if (d->shmaddr)
{
- QDataStream str(data, IO_ReadOnly);
+ TQDataStream str(data, IO_ReadOnly);
int width, height, depth;
bool alpha;
str >> width >> height >> depth >> alpha;
- thumb = QImage(d->shmaddr, width, height, depth, 0, 0, QImage::IgnoreEndian);
+ thumb = TQImage(d->shmaddr, width, height, depth, 0, 0, TQImage::IgnoreEndian);
thumb.setAlphaBuffer(alpha);
}
else
@@ -503,7 +503,7 @@ void PreviewJob::slotThumbData(KIO::Job *, const QByteArray &data)
if (save)
{
thumb.setText("Thumb::URI", 0, d->origName);
- thumb.setText("Thumb::MTime", 0, QString::number(d->tOrig));
+ thumb.setText("Thumb::MTime", 0, TQString::number(d->tOrig));
thumb.setText("Thumb::Size", 0, number(d->currentItem.item->size()));
thumb.setText("Thumb::Mimetype", 0, d->currentItem.item->mimetype());
thumb.setText("Software", 0, "KDE Thumbnail Generator");
@@ -511,16 +511,16 @@ void PreviewJob::slotThumbData(KIO::Job *, const QByteArray &data)
if (temp.status() == 0) //Only try to write out the thumbnail if we
{ //actually created the temp file.
thumb.save(temp.name(), "PNG");
- rename(QFile::encodeName(temp.name()), QFile::encodeName(d->thumbPath + d->thumbName));
+ rename(TQFile::encodeName(temp.name()), TQFile::encodeName(d->thumbPath + d->thumbName));
}
}
emitPreview( thumb );
d->succeeded = true;
}
-void PreviewJob::emitPreview(const QImage &thumb)
+void PreviewJob::emitPreview(const TQImage &thumb)
{
- QPixmap pix;
+ TQPixmap pix;
if (thumb.width() > d->width || thumb.height() > d->height)
{
double imgRatio = (double)thumb.height() / (double)thumb.width();
@@ -541,9 +541,9 @@ void PreviewJob::emitFailed(const KFileItem *item)
emit failed(item);
}
-QStringList PreviewJob::availablePlugins()
+TQStringList PreviewJob::availablePlugins()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator");
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
if (!result.contains((*it)->desktopEntryName()))
@@ -551,9 +551,9 @@ QStringList PreviewJob::availablePlugins()
return result;
}
-QStringList PreviewJob::supportedMimeTypes()
+TQStringList PreviewJob::supportedMimeTypes()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator");
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
result += (*it)->property("MimeTypes").toStringList();
@@ -568,7 +568,7 @@ void PreviewJob::kill( bool quietly )
PreviewJob *KIO::filePreview( const KFileItemList &items, int width, int height,
int iconSize, int iconAlpha, bool scale, bool save,
- const QStringList *enabledPlugins )
+ const TQStringList *enabledPlugins )
{
return new PreviewJob(items, width, height, iconSize, iconAlpha,
scale, save, enabledPlugins);
@@ -576,7 +576,7 @@ PreviewJob *KIO::filePreview( const KFileItemList &items, int width, int height,
PreviewJob *KIO::filePreview( const KURL::List &items, int width, int height,
int iconSize, int iconAlpha, bool scale, bool save,
- const QStringList *enabledPlugins )
+ const TQStringList *enabledPlugins )
{
KFileItemList fileItems;
for (KURL::List::ConstIterator it = items.begin(); it != items.end(); ++it)
diff --git a/kio/kio/previewjob.h b/kio/kio/previewjob.h
index d2e976b0f..2a59083c4 100644
--- a/kio/kio/previewjob.h
+++ b/kio/kio/previewjob.h
@@ -56,7 +56,7 @@ namespace KIO {
*/
PreviewJob( const KFileItemList &items, int width, int height,
int iconSize, int iconAlpha, bool scale, bool save,
- const QStringList *enabledPlugins, bool deleteItems = false );
+ const TQStringList *enabledPlugins, bool deleteItems = false );
virtual ~PreviewJob();
/**
@@ -81,14 +81,14 @@ namespace KIO {
* no .desktop).
* @return the list of plugins
*/
- static QStringList availablePlugins();
+ static TQStringList availablePlugins();
/**
* Returns a list of all supported MIME types. The list can
* contain entries like text/ * (without the space).
* @return the list of mime types
*/
- static QStringList supportedMimeTypes();
+ static TQStringList supportedMimeTypes();
/**
* Reimplemented for internal reasons
@@ -102,7 +102,7 @@ namespace KIO {
* @param item the file of the preview
* @param preview the preview image
*/
- void gotPreview( const KFileItem *item, const QPixmap &preview );
+ void gotPreview( const KFileItem *item, const TQPixmap &preview );
/**
* Emitted when a thumbnail for @p item could not be created,
* either because a ThumbCreator for its MIME type does not
@@ -114,18 +114,18 @@ namespace KIO {
protected:
void getOrCreateThumbnail();
bool statResultThumbnail();
- void createThumbnail( QString );
+ void createThumbnail( TQString );
protected slots:
virtual void slotResult( KIO::Job *job );
private slots:
void startPreview();
- void slotThumbData(KIO::Job *, const QByteArray &);
+ void slotThumbData(KIO::Job *, const TQByteArray &);
private:
void determineNextFile();
- void emitPreview(const QImage &thumb);
+ void emitPreview(const TQImage &thumb);
void emitFailed(const KFileItem *item = 0);
protected:
@@ -154,7 +154,7 @@ namespace KIO {
* @return the new PreviewJob
* @see PreviewJob::availablePlugins()
*/
- KIO_EXPORT PreviewJob *filePreview( const KFileItemList &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const QStringList *enabledPlugins = 0 );
+ KIO_EXPORT PreviewJob *filePreview( const KFileItemList &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const TQStringList *enabledPlugins = 0 );
/**
* Creates a PreviewJob to generate or retrieve a preview image
@@ -176,7 +176,7 @@ namespace KIO {
* @return the new PreviewJob
* @see PreviewJob::availablePlugins()
*/
- KIO_EXPORT PreviewJob *filePreview( const KURL::List &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const QStringList *enabledPlugins = 0 );
+ KIO_EXPORT PreviewJob *filePreview( const KURL::List &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const TQStringList *enabledPlugins = 0 );
}
#endif
diff --git a/kio/kio/progressbase.cpp b/kio/kio/progressbase.cpp
index 6d49ac69a..f01c00a7a 100644
--- a/kio/kio/progressbase.cpp
+++ b/kio/kio/progressbase.cpp
@@ -21,8 +21,8 @@
namespace KIO {
-ProgressBase::ProgressBase( QWidget *parent )
- : QWidget( parent )
+ProgressBase::ProgressBase( TQWidget *parent )
+ : TQWidget( parent )
{
m_pJob = 0;
@@ -37,14 +37,14 @@ ProgressBase::ProgressBase( QWidget *parent )
void ProgressBase::setJob( KIO::Job *job )
{
// first connect all slots
- connect( job, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
- connect( job, SIGNAL( canceled( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( canceled( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
// then assign job
m_pJob = job;
@@ -54,37 +54,37 @@ void ProgressBase::setJob( KIO::Job *job )
void ProgressBase::setJob( KIO::CopyJob *job )
{
// first connect all slots
- connect( job, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
- SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( job, SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
- SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
- SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
- SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( job, SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
- SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
- SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( speed( KIO::Job*, unsigned long ) ),
- SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( copying( KIO::Job*, const KURL& , const KURL& ) ),
- SLOT( slotCopying( KIO::Job*, const KURL&, const KURL& ) ) );
- connect( job, SIGNAL( moving( KIO::Job*, const KURL& , const KURL& ) ),
- SLOT( slotMoving( KIO::Job*, const KURL&, const KURL& ) ) );
- connect( job, SIGNAL( creatingDir( KIO::Job*, const KURL& ) ),
- SLOT( slotCreatingDir( KIO::Job*, const KURL& ) ) );
-
- connect( job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
-
- connect( job, SIGNAL( canceled( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
+ TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( job, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
+ TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( job, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( copying( KIO::Job*, const KURL& , const KURL& ) ),
+ TQT_SLOT( slotCopying( KIO::Job*, const KURL&, const KURL& ) ) );
+ connect( job, TQT_SIGNAL( moving( KIO::Job*, const KURL& , const KURL& ) ),
+ TQT_SLOT( slotMoving( KIO::Job*, const KURL&, const KURL& ) ) );
+ connect( job, TQT_SIGNAL( creatingDir( KIO::Job*, const KURL& ) ),
+ TQT_SLOT( slotCreatingDir( KIO::Job*, const KURL& ) ) );
+
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
+
+ connect( job, TQT_SIGNAL( canceled( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
// then assign job
m_pJob = job;
@@ -94,40 +94,40 @@ void ProgressBase::setJob( KIO::CopyJob *job )
void ProgressBase::setJob( KIO::DeleteJob *job )
{
// first connect all slots
- connect( job, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
- SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( job, SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
- SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
- SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
- SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( job, SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
- SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
- SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( speed( KIO::Job*, unsigned long ) ),
- SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
-
- connect( job, SIGNAL( deleting( KIO::Job*, const KURL& ) ),
- SLOT( slotDeleting( KIO::Job*, const KURL& ) ) );
-
- connect( job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
-
- connect( job, SIGNAL( canceled( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
+ TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( job, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
+ TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( job, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
+
+ connect( job, TQT_SIGNAL( deleting( KIO::Job*, const KURL& ) ),
+ TQT_SLOT( slotDeleting( KIO::Job*, const KURL& ) ) );
+
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
+
+ connect( job, TQT_SIGNAL( canceled( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
// then assign job
m_pJob = job;
}
-void ProgressBase::closeEvent( QCloseEvent* ) {
+void ProgressBase::closeEvent( TQCloseEvent* ) {
// kill job when desired
if ( m_bStopOnClose ) {
slotStop();
diff --git a/kio/kio/progressbase.h b/kio/kio/progressbase.h
index d46b1d1ba..d9e3d8f96 100644
--- a/kio/kio/progressbase.h
+++ b/kio/kio/progressbase.h
@@ -19,7 +19,7 @@
#define __progressbase_h__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kio/global.h>
@@ -67,7 +67,7 @@ namespace KIO
* @short Base class for IO progress dialogs.
* @author Matej Koss <koss@miesto.sk>
*/
-class KIO_EXPORT ProgressBase : public QWidget {
+class KIO_EXPORT ProgressBase : public TQWidget {
Q_OBJECT
@@ -77,7 +77,7 @@ public:
* Creates a new progress dialog.
* @param parent the parent of this dialog window, or 0
*/
- ProgressBase( QWidget *parent );
+ ProgressBase( TQWidget *parent );
~ProgressBase() {}
/**
@@ -251,7 +251,7 @@ protected slots:
protected:
- virtual void closeEvent( QCloseEvent * );
+ virtual void closeEvent( TQCloseEvent * );
KIO::Job* m_pJob;
diff --git a/kio/kio/renamedlg.cpp b/kio/kio/renamedlg.cpp
index 0c9cf8a18..fe830b2e3 100644
--- a/kio/kio/renamedlg.cpp
+++ b/kio/kio/renamedlg.cpp
@@ -24,11 +24,11 @@
#include <stdio.h>
#include <assert.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qdir.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqdir.h>
#include <kmessagebox.h>
#include <kpushbutton.h>
@@ -64,25 +64,25 @@ class RenameDlg::RenameDlgPrivate
m_pLineEdit = 0;
}
KPushButton *bCancel;
- QPushButton *bRename;
- QPushButton *bSkip;
- QPushButton *bAutoSkip;
- QPushButton *bOverwrite;
- QPushButton *bOverwriteAll;
- QPushButton *bResume;
- QPushButton *bResumeAll;
- QPushButton *bSuggestNewName;
- QLineEdit* m_pLineEdit;
+ TQPushButton *bRename;
+ TQPushButton *bSkip;
+ TQPushButton *bAutoSkip;
+ TQPushButton *bOverwrite;
+ TQPushButton *bOverwriteAll;
+ TQPushButton *bResume;
+ TQPushButton *bResumeAll;
+ TQPushButton *bSuggestNewName;
+ TQLineEdit* m_pLineEdit;
KURL src;
KURL dest;
- QString mimeSrc;
- QString mimeDest;
+ TQString mimeSrc;
+ TQString mimeDest;
bool modal;
bool plugin;
};
-RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
- const QString &_src, const QString &_dest,
+RenameDlg::RenameDlg(TQWidget *parent, const TQString & _caption,
+ const TQString &_src, const TQString &_dest,
RenameDlg_Mode _mode,
KIO::filesize_t sizeSrc,
KIO::filesize_t sizeDest,
@@ -91,7 +91,7 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
time_t mtimeSrc,
time_t mtimeDest,
bool _modal)
- : QDialog ( parent, "KIO::RenameDialog" , _modal )
+ : TQDialog ( parent, "KIO::RenameDialog" , _modal )
{
d = new RenameDlgPrivate( );
d->modal = _modal;
@@ -113,52 +113,52 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
setCaption( _caption );
d->bCancel = new KPushButton( KStdGuiItem::cancel(), this );
- connect(d->bCancel, SIGNAL(clicked()), this, SLOT(b0Pressed()));
+ connect(d->bCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(b0Pressed()));
if ( ! (_mode & M_NORENAME ) ) {
- d->bRename = new QPushButton( i18n( "&Rename" ), this );
+ d->bRename = new TQPushButton( i18n( "&Rename" ), this );
d->bRename->setEnabled(false);
- d->bSuggestNewName = new QPushButton( i18n( "Suggest New &Name" ), this );
- connect(d->bSuggestNewName, SIGNAL(clicked()), this, SLOT(b8Pressed()));
- connect(d->bRename, SIGNAL(clicked()), this, SLOT(b1Pressed()));
+ d->bSuggestNewName = new TQPushButton( i18n( "Suggest New &Name" ), this );
+ connect(d->bSuggestNewName, TQT_SIGNAL(clicked()), this, TQT_SLOT(b8Pressed()));
+ connect(d->bRename, TQT_SIGNAL(clicked()), this, TQT_SLOT(b1Pressed()));
}
if ( ( _mode & M_MULTI ) && ( _mode & M_SKIP ) ) {
- d->bSkip = new QPushButton( i18n( "&Skip" ), this );
- connect(d->bSkip, SIGNAL(clicked()), this, SLOT(b2Pressed()));
+ d->bSkip = new TQPushButton( i18n( "&Skip" ), this );
+ connect(d->bSkip, TQT_SIGNAL(clicked()), this, TQT_SLOT(b2Pressed()));
- d->bAutoSkip = new QPushButton( i18n( "&Auto Skip" ), this );
- connect(d->bAutoSkip, SIGNAL(clicked()), this, SLOT(b3Pressed()));
+ d->bAutoSkip = new TQPushButton( i18n( "&Auto Skip" ), this );
+ connect(d->bAutoSkip, TQT_SIGNAL(clicked()), this, TQT_SLOT(b3Pressed()));
}
if ( _mode & M_OVERWRITE ) {
- d->bOverwrite = new QPushButton( i18n( "&Overwrite" ), this );
- connect(d->bOverwrite, SIGNAL(clicked()), this, SLOT(b4Pressed()));
+ d->bOverwrite = new TQPushButton( i18n( "&Overwrite" ), this );
+ connect(d->bOverwrite, TQT_SIGNAL(clicked()), this, TQT_SLOT(b4Pressed()));
if ( _mode & M_MULTI ) {
- d->bOverwriteAll = new QPushButton( i18n( "O&verwrite All" ), this );
- connect(d->bOverwriteAll, SIGNAL(clicked()), this, SLOT(b5Pressed()));
+ d->bOverwriteAll = new TQPushButton( i18n( "O&verwrite All" ), this );
+ connect(d->bOverwriteAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(b5Pressed()));
}
}
if ( _mode & M_RESUME ) {
- d->bResume = new QPushButton( i18n( "&Resume" ), this );
- connect(d->bResume, SIGNAL(clicked()), this, SLOT(b6Pressed()));
+ d->bResume = new TQPushButton( i18n( "&Resume" ), this );
+ connect(d->bResume, TQT_SIGNAL(clicked()), this, TQT_SLOT(b6Pressed()));
if ( _mode & M_MULTI )
{
- d->bResumeAll = new QPushButton( i18n( "R&esume All" ), this );
- connect(d->bResumeAll, SIGNAL(clicked()), this, SLOT(b7Pressed()));
+ d->bResumeAll = new TQPushButton( i18n( "R&esume All" ), this );
+ connect(d->bResumeAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(b7Pressed()));
}
}
- QVBoxLayout* pLayout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout* pLayout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
pLayout->addStrut( 360 ); // makes dlg at least that wide
// User tries to overwrite a file with itself ?
if ( _mode & M_OVERWRITE_ITSELF ) {
- QLabel *lb = new QLabel( i18n( "This action would overwrite '%1' with itself.\n"
+ TQLabel *lb = new TQLabel( i18n( "This action would overwrite '%1' with itself.\n"
"Please enter a new file name:" ).arg( KStringHandler::csqueeze( d->src.pathOrURL(),100 ) ), this );
d->bRename->setText(i18n("C&ontinue"));
pLayout->addWidget( lb );
@@ -180,7 +180,7 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
KTrader::OfferList::ConstIterator it = plugin_offers.begin();
KTrader::OfferList::ConstIterator end = plugin_offers.end();
for( ; it != end; ++it ){
- QString libName = (*it)->library();
+ TQString libName = (*it)->library();
if( libName.isEmpty() ){
kdDebug(7024) << "lib is empty" << endl;
continue;
@@ -194,7 +194,7 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
lib->unload();
continue;
}
- QObject *obj = factory->create( this, (*it)->name().latin1() );
+ TQObject *obj = factory->create( this, (*it)->name().latin1() );
if(!obj) {
lib->unload();
continue;
@@ -221,13 +221,13 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
if( !d->plugin ){
// No plugin found, build default dialog
- QGridLayout * gridLayout = new QGridLayout( 0L, 9, 2, KDialog::marginHint(),
+ TQGridLayout * gridLayout = new TQGridLayout( 0L, 9, 2, KDialog::marginHint(),
KDialog::spacingHint() );
pLayout->addLayout(gridLayout);
gridLayout->setColStretch(0,0);
gridLayout->setColStretch(1,10);
- QString sentence1;
+ TQString sentence1;
if (mtimeDest < mtimeSrc)
sentence1 = i18n("An older item named '%1' already exists.");
else if (mtimeDest == mtimeSrc)
@@ -235,32 +235,32 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
else
sentence1 = i18n("A newer item named '%1' already exists.");
- QLabel * lb1 = new KSqueezedTextLabel( sentence1.arg(d->dest.pathOrURL() ), this );
+ TQLabel * lb1 = new KSqueezedTextLabel( sentence1.arg(d->dest.pathOrURL() ), this );
gridLayout->addMultiCellWidget( lb1, 0, 0, 0, 1 ); // takes the complete first line
- lb1 = new QLabel( this );
+ lb1 = new TQLabel( this );
lb1->setPixmap( KMimeType::pixmapForURL( d->dest ) );
gridLayout->addMultiCellWidget( lb1, 1, 3, 0, 0 ); // takes the first column on rows 1-3
int row = 1;
if ( sizeDest != (KIO::filesize_t)-1 )
{
- QLabel * lb = new QLabel( i18n("size %1").arg( KIO::convertSize(sizeDest) ), this );
+ TQLabel * lb = new TQLabel( i18n("size %1").arg( KIO::convertSize(sizeDest) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
if ( ctimeDest != (time_t)-1 )
{
- QDateTime dctime; dctime.setTime_t( ctimeDest );
- QLabel * lb = new QLabel( i18n("created on %1").arg( KGlobal::locale()->formatDateTime(dctime) ), this );
+ TQDateTime dctime; dctime.setTime_t( ctimeDest );
+ TQLabel * lb = new TQLabel( i18n("created on %1").arg( KGlobal::locale()->formatDateTime(dctime) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
if ( mtimeDest != (time_t)-1 )
{
- QDateTime dmtime; dmtime.setTime_t( mtimeDest );
- QLabel * lb = new QLabel( i18n("modified on %1").arg( KGlobal::locale()->formatDateTime(dmtime) ), this );
+ TQDateTime dmtime; dmtime.setTime_t( mtimeDest );
+ TQLabel * lb = new TQLabel( i18n("modified on %1").arg( KGlobal::locale()->formatDateTime(dmtime) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
@@ -270,10 +270,10 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
// rows 1 to 3 are the details (size/ctime/mtime), row 4 is empty
gridLayout->addRowSpacing( 4, 20 );
- QLabel * lb2 = new KSqueezedTextLabel( i18n("The source file is '%1'").arg(d->src.pathOrURL()), this );
+ TQLabel * lb2 = new KSqueezedTextLabel( i18n("The source file is '%1'").arg(d->src.pathOrURL()), this );
gridLayout->addMultiCellWidget( lb2, 5, 5, 0, 1 ); // takes the complete first line
- lb2 = new QLabel( this );
+ lb2 = new TQLabel( this );
lb2->setPixmap( KMimeType::pixmapForURL( d->src ) );
gridLayout->addMultiCellWidget( lb2, 6, 8, 0, 0 ); // takes the first column on rows 6-8
@@ -281,21 +281,21 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
if ( sizeSrc != (KIO::filesize_t)-1 )
{
- QLabel * lb = new QLabel( i18n("size %1").arg( KIO::convertSize(sizeSrc) ), this );
+ TQLabel * lb = new TQLabel( i18n("size %1").arg( KIO::convertSize(sizeSrc) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
if ( ctimeSrc != (time_t)-1 )
{
- QDateTime dctime; dctime.setTime_t( ctimeSrc );
- QLabel * lb = new QLabel( i18n("created on %1").arg( KGlobal::locale()->formatDateTime(dctime) ), this );
+ TQDateTime dctime; dctime.setTime_t( ctimeSrc );
+ TQLabel * lb = new TQLabel( i18n("created on %1").arg( KGlobal::locale()->formatDateTime(dctime) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
if ( mtimeSrc != (time_t)-1 )
{
- QDateTime dmtime; dmtime.setTime_t( mtimeSrc );
- QLabel * lb = new QLabel( i18n("modified on %1").arg( KGlobal::locale()->formatDateTime(dmtime) ), this );
+ TQDateTime dmtime; dmtime.setTime_t( mtimeSrc );
+ TQLabel * lb = new TQLabel( i18n("modified on %1").arg( KGlobal::locale()->formatDateTime(dmtime) ), this );
gridLayout->addWidget( lb, row, 1 );
row++;
}
@@ -306,7 +306,7 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
{
// This is the case where we don't want to allow overwriting, the existing
// file must be preserved (e.g. when renaming).
- QString sentence1;
+ TQString sentence1;
if (mtimeDest < mtimeSrc)
sentence1 = i18n("An older item named '%1' already exists.");
else if (mtimeDest == mtimeSrc)
@@ -314,19 +314,19 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
else
sentence1 = i18n("A newer item named '%1' already exists.");
- QLabel *lb = new KSqueezedTextLabel( sentence1.arg(d->dest.pathOrURL()), this );
+ TQLabel *lb = new KSqueezedTextLabel( sentence1.arg(d->dest.pathOrURL()), this );
pLayout->addWidget(lb);
}
- QHBoxLayout* layout2 = new QHBoxLayout();
+ TQHBoxLayout* layout2 = new TQHBoxLayout();
pLayout->addLayout( layout2 );
- d->m_pLineEdit = new QLineEdit( this );
+ d->m_pLineEdit = new TQLineEdit( this );
layout2->addWidget( d->m_pLineEdit );
- QString fileName = d->dest.fileName();
+ TQString fileName = d->dest.fileName();
d->m_pLineEdit->setText( KIO::decodeFileName( fileName ) );
if ( d->bRename || d->bOverwrite )
- connect(d->m_pLineEdit, SIGNAL(textChanged(const QString &)),
- SLOT(enableRenameButton(const QString &)));
+ connect(d->m_pLineEdit, TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(enableRenameButton(const TQString &)));
if ( d->bSuggestNewName )
{
layout2->addWidget( d->bSuggestNewName );
@@ -336,7 +336,7 @@ RenameDlg::RenameDlg(QWidget *parent, const QString & _caption,
KSeparator* separator = new KSeparator( this );
pLayout->addWidget( separator );
- QHBoxLayout* layout = new QHBoxLayout();
+ TQHBoxLayout* layout = new TQHBoxLayout();
pLayout->addLayout( layout );
layout->addStretch(1);
@@ -389,7 +389,7 @@ RenameDlg::~RenameDlg()
// no need to delete Pushbuttons,... qt will do this
}
-void RenameDlg::enableRenameButton(const QString &newDest)
+void RenameDlg::enableRenameButton(const TQString &newDest)
{
if ( newDest != KIO::decodeFileName( d->dest.fileName() ) && !newDest.isEmpty() )
{
@@ -409,7 +409,7 @@ void RenameDlg::enableRenameButton(const QString &newDest)
KURL RenameDlg::newDestURL()
{
KURL newDest( d->dest );
- QString fileName = d->m_pLineEdit->text();
+ TQString fileName = d->m_pLineEdit->text();
newDest.setFileName( KIO::encodeFileName( fileName ) );
return newDest;
}
@@ -435,10 +435,10 @@ void RenameDlg::b1Pressed()
done( 1 );
}
-QString RenameDlg::suggestName(const KURL& baseURL, const QString& oldName)
+TQString RenameDlg::suggestName(const KURL& baseURL, const TQString& oldName)
{
- QString dotSuffix, suggestedName;
- QString basename = oldName;
+ TQString dotSuffix, suggestedName;
+ TQString basename = oldName;
int index = basename.find( '.' );
if ( index != -1 ) {
@@ -448,7 +448,7 @@ QString RenameDlg::suggestName(const KURL& baseURL, const QString& oldName)
int pos = basename.findRev( '_' );
if(pos != -1 ){
- QString tmp = basename.mid( pos+1 );
+ TQString tmp = basename.mid( pos+1 );
bool ok;
int number = tmp.toInt( &ok );
if ( !ok ) {// ok there is no number
@@ -456,7 +456,7 @@ QString RenameDlg::suggestName(const KURL& baseURL, const QString& oldName)
}
else {
// yes there's already a number behind the _ so increment it by one
- basename.replace( pos+1, tmp.length(), QString::number(number+1) );
+ basename.replace( pos+1, tmp.length(), TQString::number(number+1) );
suggestedName = basename + dotSuffix;
}
}
@@ -468,7 +468,7 @@ QString RenameDlg::suggestName(const KURL& baseURL, const QString& oldName)
// TODO: network transparency. However, using NetAccess from a modal dialog
// could be a problem, no? (given that it uses a modal widget itself....)
if ( baseURL.isLocalFile() )
- exists = QFileInfo( baseURL.path(+1) + suggestedName ).exists();
+ exists = TQFileInfo( baseURL.path(+1) + suggestedName ).exists();
if ( !exists )
return suggestedName;
@@ -519,11 +519,11 @@ void RenameDlg::b7Pressed()
done( 7 );
}
-static QString mime( const KURL& src )
+static TQString mime( const KURL& src )
{
KMimeType::Ptr type = KMimeType::findByURL( src );
//if( type->name() == KMimeType::defaultMimeType() ){ // ok no mimetype
- // QString ty = KIO::NetAccess::mimetype(d->src );
+ // TQString ty = KIO::NetAccess::mimetype(d->src );
// return ty;
return type->name();
}
@@ -544,10 +544,10 @@ void RenameDlg::pluginHandling()
}
-RenameDlg_Result KIO::open_RenameDlg( const QString & _caption,
- const QString & _src, const QString & _dest,
+RenameDlg_Result KIO::open_RenameDlg( const TQString & _caption,
+ const TQString & _src, const TQString & _dest,
RenameDlg_Mode _mode,
- QString& _new,
+ TQString& _new,
KIO::filesize_t sizeSrc,
KIO::filesize_t sizeDest,
time_t ctimeSrc,
diff --git a/kio/kio/renamedlg.h b/kio/kio/renamedlg.h
index 513090cc4..a1b5d6bb2 100644
--- a/kio/kio/renamedlg.h
+++ b/kio/kio/renamedlg.h
@@ -23,8 +23,8 @@
#define __kio_rename_dlg__
#include <kurl.h>
-#include <qdialog.h>
-#include <qstring.h>
+#include <tqdialog.h>
+#include <tqstring.h>
#include <sys/types.h>
#include <kio/global.h>
@@ -65,9 +65,9 @@ public:
* @param modal set to true for a modal dialog
* @see RenameDlg_Mode
*/
- RenameDlg( QWidget *parent, const QString & caption,
+ RenameDlg( TQWidget *parent, const TQString & caption,
// KDE4: make those KURLs, and use pathOrURL() internally.
- const QString & src, const QString & dest,
+ const TQString & src, const TQString & dest,
RenameDlg_Mode mode,
KIO::filesize_t sizeSrc = (KIO::filesize_t) -1,
KIO::filesize_t sizeDest = (KIO::filesize_t) -1,
@@ -91,7 +91,7 @@ public:
* The suggested file name is of the form foo_1 foo_2 etc.
* @since 3.4
*/
- static QString suggestName(const KURL& baseURL, const QString& oldName);
+ static TQString suggestName(const KURL& baseURL, const TQString& oldName);
public slots:
/// KDE4: rename to cancelPressed(), renamePressed() etc.
@@ -106,7 +106,7 @@ public slots:
void b8Pressed();
protected slots:
- void enableRenameButton(const QString &);
+ void enableRenameButton(const TQString &);
private:
class RenameDlgPrivate;
RenameDlgPrivate *d;
@@ -135,10 +135,10 @@ private:
* @param mtimeDest modification time of destination file
* @return the result
*/
-KIO_EXPORT RenameDlg_Result open_RenameDlg( const QString & caption,
+KIO_EXPORT RenameDlg_Result open_RenameDlg( const TQString & caption,
// KDE4: make those KURLs
- const QString& src, const QString & dest,
- RenameDlg_Mode mode, QString& newDestPath,
+ const TQString& src, const TQString & dest,
+ RenameDlg_Mode mode, TQString& newDestPath,
KIO::filesize_t sizeSrc = (KIO::filesize_t) -1,
KIO::filesize_t sizeDest = (KIO::filesize_t) -1,
time_t ctimeSrc = (time_t) -1,
diff --git a/kio/kio/renamedlgplugin.h b/kio/kio/renamedlgplugin.h
index e7bda98f2..39319fdb8 100644
--- a/kio/kio/renamedlgplugin.h
+++ b/kio/kio/renamedlgplugin.h
@@ -21,10 +21,10 @@
#define renamedlgplugin_h
#include <kio/renamedlg.h>
-#include <qdialog.h>
+#include <tqdialog.h>
#include <sys/types.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
/**
* This is the base class for all RenameDlg plugins.
@@ -37,15 +37,15 @@ public:
/**
* This is the c'tor.
*/
- RenameDlgPlugin(QDialog *dialog, const char *name, const QStringList &/*list*/ = QStringList() ): QWidget(dialog, name ) {};
+ RenameDlgPlugin(TQDialog *dialog, const char *name, const TQStringList &/*list*/ = TQStringList() ): TQWidget(dialog, name ) {};
/**
* This function will be called by RenameDlg. The params are infos about the files.
* @return If the plugin want's to display it return true, if not return false
*/
- virtual bool initialize(KIO::RenameDlg_Mode /*mod*/ , const QString &/*_src*/, const QString &/*_dest*/,
- const QString &/*mimeSrc*/,
- const QString &/*mimeDest*/,
+ virtual bool initialize(KIO::RenameDlg_Mode /*mod*/ , const TQString &/*_src*/, const TQString &/*_dest*/,
+ const TQString &/*mimeSrc*/,
+ const TQString &/*mimeDest*/,
KIO::filesize_t /*sizeSrc*/,
KIO::filesize_t /*sizeDest*/,
time_t /*ctimeSrc*/,
diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp
index 49b710df6..8ab080486 100644
--- a/kio/kio/scheduler.cpp
+++ b/kio/kio/scheduler.cpp
@@ -22,8 +22,8 @@
#include "kio/scheduler.h"
#include "kio/authinfo.h"
#include "kio/slave.h"
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include <dcopclient.h>
@@ -42,11 +42,11 @@
using namespace KIO;
-template class QDict<KIO::Scheduler::ProtocolInfo>;
+template class TQDict<KIO::Scheduler::ProtocolInfo>;
Scheduler *Scheduler::instance = 0;
-class KIO::SlaveList: public QPtrList<Slave>
+class KIO::SlaveList: public TQPtrList<Slave>
{
public:
SlaveList() { }
@@ -73,12 +73,12 @@ public:
JobData() : checkOnHold(false) { }
public:
- QString protocol;
- QString proxy;
+ TQString protocol;
+ TQString proxy;
bool checkOnHold;
};
-class KIO::Scheduler::ExtraJobData: public QPtrDict<KIO::Scheduler::JobData>
+class KIO::Scheduler::ExtraJobData: public TQPtrDict<KIO::Scheduler::JobData>
{
public:
ExtraJobData() { setAutoDelete(true); }
@@ -92,23 +92,23 @@ public:
joblist.setAutoDelete(false);
}
- QPtrList<SimpleJob> joblist;
+ TQPtrList<SimpleJob> joblist;
SlaveList activeSlaves;
int maxSlaves;
int skipCount;
- QString protocol;
+ TQString protocol;
};
-class KIO::Scheduler::ProtocolInfoDict : public QDict<KIO::Scheduler::ProtocolInfo>
+class KIO::Scheduler::ProtocolInfoDict : public TQDict<KIO::Scheduler::ProtocolInfo>
{
public:
ProtocolInfoDict() { }
- KIO::Scheduler::ProtocolInfo *get( const QString &protocol);
+ KIO::Scheduler::ProtocolInfo *get( const TQString &protocol);
};
KIO::Scheduler::ProtocolInfo *
-KIO::Scheduler::ProtocolInfoDict::get(const QString &protocol)
+KIO::Scheduler::ProtocolInfoDict::get(const TQString &protocol)
{
ProtocolInfo *info = find(protocol);
if (!info)
@@ -125,7 +125,7 @@ KIO::Scheduler::ProtocolInfoDict::get(const QString &protocol)
Scheduler::Scheduler()
: DCOPObject( "KIO::Scheduler" ),
- QObject(kapp, "scheduler"),
+ TQObject(kapp, "scheduler"),
slaveTimer(0, "Scheduler::slaveTimer"),
coSlaveTimer(0, "Scheduler::coSlaveTimer"),
cleanupTimer(0, "Scheduler::cleanupTimer")
@@ -139,9 +139,9 @@ Scheduler::Scheduler()
extraJobData = new ExtraJobData;
sessionData = new SessionData;
slaveConfig = SlaveConfig::self();
- connect(&slaveTimer, SIGNAL(timeout()), SLOT(startStep()));
- connect(&coSlaveTimer, SIGNAL(timeout()), SLOT(slotScheduleCoSlave()));
- connect(&cleanupTimer, SIGNAL(timeout()), SLOT(slotCleanIdleSlaves()));
+ connect(&slaveTimer, TQT_SIGNAL(timeout()), TQT_SLOT(startStep()));
+ connect(&coSlaveTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotScheduleCoSlave()));
+ connect(&cleanupTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCleanIdleSlaves()));
busy = false;
}
@@ -163,15 +163,15 @@ Scheduler::debug_info()
{
}
-bool Scheduler::process(const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData )
+bool Scheduler::process(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData )
{
- if ( fun != "reparseSlaveConfiguration(QString)" )
+ if ( fun != "reparseSlaveConfiguration(TQString)" )
return DCOPObject::process( fun, data, replyType, replyData );
slaveConfig = SlaveConfig::self();
replyType = "void";
- QDataStream stream( data, IO_ReadOnly );
- QString proto;
+ TQDataStream stream( data, IO_ReadOnly );
+ TQString proto;
stream >> proto;
kdDebug( 7006 ) << "reparseConfiguration( " << proto << " )" << endl;
@@ -193,7 +193,7 @@ bool Scheduler::process(const QCString &fun, const QByteArray &data, QCString &r
QCStringList Scheduler::functions()
{
QCStringList funcs = DCOPObject::functions();
- funcs << "void reparseSlaveConfiguration(QString)";
+ funcs << "void reparseSlaveConfiguration(TQString)";
return funcs;
}
@@ -211,7 +211,7 @@ void Scheduler::_doJob(SimpleJob *job) {
slaveTimer.start(0, true);
#ifndef NDEBUG
if (newJobs.count() > 150)
- kdDebug() << "WARNING - KIO::Scheduler got more than 150 jobs! This shows a misuse in your app (yes, a job is a QObject)." << endl;
+ kdDebug() << "WARNING - KIO::Scheduler got more than 150 jobs! This shows a misuse in your app (yes, a job is a TQObject)." << endl;
#endif
}
@@ -223,7 +223,7 @@ void Scheduler::_scheduleJob(SimpleJob *job) {
kdFatal(7006) << "BUG! _ScheduleJob(): No extraJobData for job!" << endl;
return;
}
- QString protocol = jobData->protocol;
+ TQString protocol = jobData->protocol;
// kdDebug(7006) << "Scheduler::_scheduleJob protocol=" << protocol << endl;
ProtocolInfo *protInfo = protInfoDict->get(protocol);
protInfo->joblist.append(job);
@@ -272,7 +272,7 @@ void Scheduler::startStep()
{
(void) startJobDirect();
}
- QDictIterator<KIO::Scheduler::ProtocolInfo> it(*protInfoDict);
+ TQDictIterator<KIO::Scheduler::ProtocolInfo> it(*protInfoDict);
while(it.current())
{
if (startJobScheduled(it.current())) return;
@@ -280,12 +280,12 @@ void Scheduler::startStep()
}
}
-void Scheduler::setupSlave(KIO::Slave *slave, const KURL &url, const QString &protocol, const QString &proxy , bool newSlave, const KIO::MetaData *config)
+void Scheduler::setupSlave(KIO::Slave *slave, const KURL &url, const TQString &protocol, const TQString &proxy , bool newSlave, const KIO::MetaData *config)
{
- QString host = url.host();
+ TQString host = url.host();
int port = url.port();
- QString user = url.user();
- QString passwd = url.pass();
+ TQString user = url.user();
+ TQString passwd = url.pass();
if ((newSlave) ||
(slave->host() != host) ||
@@ -300,7 +300,7 @@ void Scheduler::setupSlave(KIO::Slave *slave, const KURL &url, const QString &pr
configData["UseProxy"] = proxy;
- QString autoLogin = configData["EnableAutoLogin"].lower();
+ TQString autoLogin = configData["EnableAutoLogin"].lower();
if ( autoLogin == "true" )
{
NetRC::AutoLogin l;
@@ -312,8 +312,8 @@ void Scheduler::setupSlave(KIO::Slave *slave, const KURL &url, const QString &pr
configData["autoLoginPass"] = l.password;
if ( usern )
{
- QString macdef;
- QMap<QString, QStringList>::ConstIterator it = l.macdef.begin();
+ TQString macdef;
+ TQMap<TQString, TQStringList>::ConstIterator it = l.macdef.begin();
for ( ; it != l.macdef.end(); ++it )
macdef += it.key() + '\\' + it.data().join( "\\" ) + '\n';
configData["autoLoginMacro"] = macdef;
@@ -421,7 +421,7 @@ bool Scheduler::startJobDirect()
<< endl;
return false;
}
- QString protocol = jobData->protocol;
+ TQString protocol = jobData->protocol;
ProtocolInfo *protInfo = protInfoDict->get(protocol);
bool newSlave = false;
@@ -447,11 +447,11 @@ bool Scheduler::startJobDirect()
return true;
}
-static Slave *searchIdleList(SlaveList *idleSlaves, const KURL &url, const QString &protocol, bool &exact)
+static Slave *searchIdleList(SlaveList *idleSlaves, const KURL &url, const TQString &protocol, bool &exact)
{
- QString host = url.host();
+ TQString host = url.host();
int port = url.port();
- QString user = url.user();
+ TQString user = url.user();
exact = true;
for( Slave *slave = idleSlaves->first();
@@ -504,7 +504,7 @@ Slave *Scheduler::findIdleSlave(ProtocolInfo *, SimpleJob *job, bool &exact)
if ( bCanReuse )
{
KIO::MetaData outgoing = tJob->outgoingMetaData();
- QString resume = (!outgoing.contains("resume")) ? QString::null : outgoing["resume"];
+ TQString resume = (!outgoing.contains("resume")) ? TQString::null : outgoing["resume"];
kdDebug(7006) << "Resume metadata is '" << resume << "'" << endl;
bCanReuse = (resume.isEmpty() || resume == "0");
}
@@ -535,21 +535,21 @@ Slave *Scheduler::findIdleSlave(ProtocolInfo *, SimpleJob *job, bool &exact)
Slave *Scheduler::createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL &url)
{
int error;
- QString errortext;
+ TQString errortext;
Slave *slave = Slave::createSlave(protInfo->protocol, url, error, errortext);
if (slave)
{
slaveList->append(slave);
idleSlaves->append(slave);
- connect(slave, SIGNAL(slaveDied(KIO::Slave *)),
- SLOT(slotSlaveDied(KIO::Slave *)));
- connect(slave, SIGNAL(slaveStatus(pid_t,const QCString &,const QString &, bool)),
- SLOT(slotSlaveStatus(pid_t,const QCString &, const QString &, bool)));
-
- connect(slave,SIGNAL(authorizationKey(const QCString&, const QCString&, bool)),
- sessionData,SLOT(slotAuthData(const QCString&, const QCString&, bool)));
- connect(slave,SIGNAL(delAuthorization(const QCString&)), sessionData,
- SLOT(slotDelAuthData(const QCString&)));
+ connect(slave, TQT_SIGNAL(slaveDied(KIO::Slave *)),
+ TQT_SLOT(slotSlaveDied(KIO::Slave *)));
+ connect(slave, TQT_SIGNAL(slaveStatus(pid_t,const TQCString &,const TQString &, bool)),
+ TQT_SLOT(slotSlaveStatus(pid_t,const TQCString &, const TQString &, bool)));
+
+ connect(slave,TQT_SIGNAL(authorizationKey(const TQCString&, const TQCString&, bool)),
+ sessionData,TQT_SLOT(slotAuthData(const TQCString&, const TQCString&, bool)));
+ connect(slave,TQT_SIGNAL(delAuthorization(const TQCString&)), sessionData,
+ TQT_SLOT(slotDelAuthData(const TQCString&)));
}
else
{
@@ -564,7 +564,7 @@ Slave *Scheduler::createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL
return slave;
}
-void Scheduler::slotSlaveStatus(pid_t, const QCString &, const QString &, bool)
+void Scheduler::slotSlaveStatus(pid_t, const TQCString &, const TQString &, bool)
{
}
@@ -697,8 +697,8 @@ void Scheduler::_removeSlaveOnHold()
Slave *
Scheduler::_getConnectedSlave(const KURL &url, const KIO::MetaData &config )
{
- QString proxy;
- QString protocol = KProtocolManager::slaveProtocol(url, proxy);
+ TQString proxy;
+ TQString protocol = KProtocolManager::slaveProtocol(url, proxy);
bool dummy;
Slave *slave = searchIdleList(idleSlaves, url, protocol, dummy);
if (!slave)
@@ -713,12 +713,12 @@ Scheduler::_getConnectedSlave(const KURL &url, const KIO::MetaData &config )
setupSlave(slave, url, protocol, proxy, true, &config);
slave->send( CMD_CONNECT );
- connect(slave, SIGNAL(connected()),
- SLOT(slotSlaveConnected()));
- connect(slave, SIGNAL(error(int, const QString &)),
- SLOT(slotSlaveError(int, const QString &)));
+ connect(slave, TQT_SIGNAL(connected()),
+ TQT_SLOT(slotSlaveConnected()));
+ connect(slave, TQT_SIGNAL(error(int, const TQString &)),
+ TQT_SLOT(slotSlaveError(int, const TQString &)));
- coSlaves.insert(slave, new QPtrList<SimpleJob>());
+ coSlaves.insert(slave, new TQPtrList<SimpleJob>());
// kdDebug(7006) << "_getConnectedSlave( " << slave << ")" << endl;
return slave;
}
@@ -744,13 +744,13 @@ Scheduler::slotScheduleCoSlave()
assert(!coIdleSlaves->contains(slave));
KURL url =job->url();
- QString host = url.host();
+ TQString host = url.host();
int port = url.port();
if (slave->host() == "<reset>")
{
- QString user = url.user();
- QString passwd = url.pass();
+ TQString user = url.user();
+ TQString passwd = url.pass();
MetaData configData = slaveConfig->configData(url.protocol(), url.host());
slave->setConfig(configData);
@@ -772,8 +772,8 @@ Scheduler::slotSlaveConnected()
Slave *slave = (Slave *)sender();
// kdDebug(7006) << "slotSlaveConnected( " << slave << ")" << endl;
slave->setConnected(true);
- disconnect(slave, SIGNAL(connected()),
- this, SLOT(slotSlaveConnected()));
+ disconnect(slave, TQT_SIGNAL(connected()),
+ this, TQT_SLOT(slotSlaveConnected()));
emit slaveConnected(slave);
assert(!coIdleSlaves->contains(slave));
coIdleSlaves->append(slave);
@@ -781,7 +781,7 @@ Scheduler::slotSlaveConnected()
}
void
-Scheduler::slotSlaveError(int errorNr, const QString &errorMsg)
+Scheduler::slotSlaveError(int errorNr, const TQString &errorMsg)
{
Slave *slave = (Slave *)sender();
if (!slave->isConnected() || (coIdleSlaves->find(slave) != -1))
@@ -795,7 +795,7 @@ bool
Scheduler::_assignJobToSlave(KIO::Slave *slave, SimpleJob *job)
{
// kdDebug(7006) << "_assignJobToSlave( " << job << ", " << slave << ")" << endl;
- QString dummy;
+ TQString dummy;
if ((slave->slaveProtocol() != KProtocolManager::slaveProtocol( job->url(), dummy ))
||
(!newJobs.removeRef(job)))
@@ -838,10 +838,10 @@ Scheduler::_disconnectSlave(KIO::Slave *slave)
delete list;
coIdleSlaves->removeRef(slave);
assert(!coIdleSlaves->contains(slave));
- disconnect(slave, SIGNAL(connected()),
- this, SLOT(slotSlaveConnected()));
- disconnect(slave, SIGNAL(error(int, const QString &)),
- this, SLOT(slotSlaveError(int, const QString &)));
+ disconnect(slave, TQT_SIGNAL(connected()),
+ this, TQT_SLOT(slotSlaveConnected()));
+ disconnect(slave, TQT_SIGNAL(error(int, const TQString &)),
+ this, TQT_SLOT(slotSlaveError(int, const TQString &)));
if (slave->isAlive())
{
idleSlaves->append(slave);
@@ -860,23 +860,23 @@ Scheduler::_checkSlaveOnHold(bool b)
}
void
-Scheduler::_registerWindow(QWidget *wid)
+Scheduler::_registerWindow(TQWidget *wid)
{
if (!wid)
return;
- QObject *obj = static_cast<QObject *>(wid);
+ TQObject *obj = static_cast<TQObject *>(wid);
if (!m_windowList.contains(obj))
{
// We must store the window Id because by the time
// the destroyed signal is emitted we can no longer
- // access QWidget::winId() (already destructed)
+ // access TQWidget::winId() (already destructed)
WId windowId = wid->winId();
m_windowList.insert(obj, windowId);
- connect(wid, SIGNAL(destroyed(QObject *)),
- this, SLOT(slotUnregisterWindow(QObject*)));
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ connect(wid, TQT_SIGNAL(destroyed(TQObject *)),
+ this, TQT_SLOT(slotUnregisterWindow(TQObject*)));
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << windowId;
if( !kapp->dcopClient()->send( "kded", "kded",
"registerWindowId(long int)", params ) )
@@ -885,22 +885,22 @@ Scheduler::_registerWindow(QWidget *wid)
}
void
-Scheduler::slotUnregisterWindow(QObject *obj)
+Scheduler::slotUnregisterWindow(TQObject *obj)
{
if (!obj)
return;
- QMap<QObject *, WId>::Iterator it = m_windowList.find(obj);
+ TQMap<TQObject *, WId>::Iterator it = m_windowList.find(obj);
if (it == m_windowList.end())
return;
WId windowId = it.data();
- disconnect( it.key(), SIGNAL(destroyed(QObject *)),
- this, SLOT(slotUnregisterWindow(QObject*)));
+ disconnect( it.key(), TQT_SIGNAL(destroyed(TQObject *)),
+ this, TQT_SLOT(slotUnregisterWindow(TQObject*)));
m_windowList.remove( it );
if (kapp)
{
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << windowId;
kapp->dcopClient()->send( "kded", "kded",
"unregisterWindowId(long int)", params );
diff --git a/kio/kio/scheduler.h b/kio/kio/scheduler.h
index 071dcb7d4..4a4f104ba 100644
--- a/kio/kio/scheduler.h
+++ b/kio/kio/scheduler.h
@@ -24,9 +24,9 @@
#include "kio/job.h"
#include "kio/jobclasses.h"
-#include <qtimer.h>
-#include <qptrdict.h>
-#include <qmap.h>
+#include <tqtimer.h>
+#include <tqptrdict.h>
+#include <tqmap.h>
#include <dcopobject.h>
@@ -108,11 +108,11 @@ namespace KIO {
* @see KIO::Job
**/
- class KIO_EXPORT Scheduler : public QObject, virtual public DCOPObject {
+ class KIO_EXPORT Scheduler : public TQObject, virtual public DCOPObject {
Q_OBJECT
public:
- typedef QPtrList<SimpleJob> JobList;
+ typedef TQPtrList<SimpleJob> JobList;
// InfoDict needs Info, so we can't declare it private
class ProtocolInfo;
@@ -236,18 +236,18 @@ namespace KIO {
* the that was started.
* Register the mainwindow @p wid with the KIO subsystem
* Do not call this, it is called automatically from
- * void KIO::Job::setWindow(QWidget*).
+ * void KIO::Job::setWindow(TQWidget*).
* @param wid the window to register
* @since 3.1
*/
- static void registerWindow(QWidget *wid)
+ static void registerWindow(TQWidget *wid)
{ self()->_registerWindow(wid); }
/**
* @internal
* Unregisters the window registered by registerWindow().
*/
- static void unregisterWindow(QObject *wid)
+ static void unregisterWindow(TQObject *wid)
{ self()->slotUnregisterWindow(wid); }
/**
@@ -256,21 +256,21 @@ namespace KIO {
* @see slaveConnected()
* @see slaveError()
*/
- static bool connect( const char *signal, const QObject *receiver,
+ static bool connect( const char *signal, const TQObject *receiver,
const char *member)
- { return QObject::connect(self(), signal, receiver, member); }
+ { return TQObject::connect(self(), signal, receiver, member); }
- static bool connect( const QObject* sender, const char* signal,
- const QObject* receiver, const char* member )
- { return QObject::connect(sender, signal, receiver, member); }
+ static bool connect( const TQObject* sender, const char* signal,
+ const TQObject* receiver, const char* member )
+ { return TQObject::connect(sender, signal, receiver, member); }
- static bool disconnect( const QObject* sender, const char* signal,
- const QObject* receiver, const char* member )
- { return QObject::disconnect(sender, signal, receiver, member); }
+ static bool disconnect( const TQObject* sender, const char* signal,
+ const TQObject* receiver, const char* member )
+ { return TQObject::disconnect(sender, signal, receiver, member); }
- bool connect( const QObject *sender, const char *signal,
+ bool connect( const TQObject *sender, const char *signal,
const char *member )
- { return QObject::connect(sender, signal, member); }
+ { return TQObject::connect(sender, signal, member); }
/**
* When true, the next job will check whether KLauncher has a slave
@@ -281,21 +281,21 @@ namespace KIO {
void debug_info();
- virtual bool process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
+ virtual bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
virtual QCStringList functions();
public slots:
void slotSlaveDied(KIO::Slave *slave);
- void slotSlaveStatus(pid_t pid, const QCString &protocol,
- const QString &host, bool connected);
+ void slotSlaveStatus(pid_t pid, const TQCString &protocol,
+ const TQString &host, bool connected);
signals:
void slaveConnected(KIO::Slave *slave);
- void slaveError(KIO::Slave *slave, int error, const QString &errorMsg);
+ void slaveError(KIO::Slave *slave, int error, const TQString &errorMsg);
protected:
- void setupSlave(KIO::Slave *slave, const KURL &url, const QString &protocol, const QString &proxy , bool newSlave, const KIO::MetaData *config=0);
+ void setupSlave(KIO::Slave *slave, const KURL &url, const TQString &protocol, const TQString &proxy , bool newSlave, const KIO::MetaData *config=0);
bool startJobScheduled(ProtocolInfo *protInfo);
bool startJobDirect();
Scheduler();
@@ -304,10 +304,10 @@ namespace KIO {
void startStep();
void slotCleanIdleSlaves();
void slotSlaveConnected();
- void slotSlaveError(int error, const QString &errorMsg);
+ void slotSlaveError(int error, const TQString &errorMsg);
void slotScheduleCoSlave();
/// @since 3.1
- void slotUnregisterWindow(QObject *);
+ void slotUnregisterWindow(TQObject *);
private:
class ProtocolInfoDict;
@@ -328,15 +328,15 @@ namespace KIO {
bool _disconnectSlave(KIO::Slave *slave);
void _checkSlaveOnHold(bool b);
void _publishSlaveOnHold();
- void _registerWindow(QWidget *wid);
+ void _registerWindow(TQWidget *wid);
Slave *findIdleSlave(ProtocolInfo *protInfo, SimpleJob *job, bool &exact);
Slave *createSlave(ProtocolInfo *protInfo, SimpleJob *job, const KURL &url);
- QTimer slaveTimer;
- QTimer coSlaveTimer;
- QTimer cleanupTimer;
+ TQTimer slaveTimer;
+ TQTimer coSlaveTimer;
+ TQTimer cleanupTimer;
bool busy;
SlaveList *slaveList;
@@ -348,12 +348,12 @@ namespace KIO {
KURL urlOnHold;
JobList newJobs;
- QPtrDict<JobList> coSlaves;
+ TQPtrDict<JobList> coSlaves;
ExtraJobData *extraJobData;
SlaveConfig *slaveConfig;
SessionData *sessionData;
bool checkOnHold;
- QMap<QObject *,WId> m_windowList;
+ TQMap<TQObject *,WId> m_windowList;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/sessiondata.cpp b/kio/kio/sessiondata.cpp
index 8148584c5..258f03e2a 100644
--- a/kio/kio/sessiondata.cpp
+++ b/kio/kio/sessiondata.cpp
@@ -18,8 +18,8 @@
Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qptrlist.h>
-#include <qtextcodec.h>
+#include <tqptrlist.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -46,34 +46,34 @@ struct SessionData::AuthData
public:
AuthData() {}
- AuthData(const QCString& k, const QCString& g, bool p) {
+ AuthData(const TQCString& k, const TQCString& g, bool p) {
key = k;
group = g;
persist = p;
}
- bool isKeyMatch( const QCString& val ) const {
+ bool isKeyMatch( const TQCString& val ) const {
return (val==key);
}
- bool isGroupMatch( const QCString& val ) const {
+ bool isGroupMatch( const TQCString& val ) const {
return (val==group);
}
- QCString key;
- QCString group;
+ TQCString key;
+ TQCString group;
bool persist;
};
/************************* SessionData::AuthDataList ****************************/
-class SessionData::AuthDataList : public QPtrList<SessionData::AuthData>
+class SessionData::AuthDataList : public TQPtrList<SessionData::AuthData>
{
public:
AuthDataList();
~AuthDataList();
void addData( SessionData::AuthData* );
- void removeData( const QCString& );
+ void removeData( const TQCString& );
bool pingCacheDaemon();
void registerAuthData( SessionData::AuthData* );
@@ -105,7 +105,7 @@ SessionData::AuthDataList::~AuthDataList()
void SessionData::AuthDataList::addData( SessionData::AuthData* d )
{
- QPtrListIterator<SessionData::AuthData> it ( *this );
+ TQPtrListIterator<SessionData::AuthData> it ( *this );
for ( ; it.current(); ++it )
{
if ( it.current()->isKeyMatch( d->key ) )
@@ -115,9 +115,9 @@ void SessionData::AuthDataList::addData( SessionData::AuthData* d )
append( d );
}
-void SessionData::AuthDataList::removeData( const QCString& gkey )
+void SessionData::AuthDataList::removeData( const TQCString& gkey )
{
- QPtrListIterator<SessionData::AuthData> it( *this );
+ TQPtrListIterator<SessionData::AuthData> it( *this );
for( ; it.current(); ++it )
{
if ( it.current()->isGroupMatch(gkey) && pingCacheDaemon() )
@@ -153,11 +153,11 @@ void SessionData::AuthDataList::registerAuthData( SessionData::AuthData* d )
#ifdef Q_OS_UNIX
bool ok;
- QCString ref_key = d->key + "-refcount";
+ TQCString ref_key = d->key + "-refcount";
int count = m_kdesuClient->getVar(ref_key).toInt( &ok );
if( ok )
{
- QCString val;
+ TQCString val;
val.setNum( count+1 );
m_kdesuClient->setVar( ref_key, val, 0, d->group );
}
@@ -173,7 +173,7 @@ void SessionData::AuthDataList::unregisterAuthData( SessionData::AuthData* d )
bool ok;
int count;
- QCString ref_key = d->key + "-refcount";
+ TQCString ref_key = d->key + "-refcount";
#ifdef Q_OS_UNIX
count = m_kdesuClient->getVar( ref_key ).toInt( &ok );
@@ -181,7 +181,7 @@ void SessionData::AuthDataList::unregisterAuthData( SessionData::AuthData* d )
{
if ( count > 1 )
{
- QCString val;
+ TQCString val;
val.setNum(count-1);
m_kdesuClient->setVar( ref_key, val, 0, d->group );
}
@@ -197,7 +197,7 @@ void SessionData::AuthDataList::purgeCachedData()
{
if ( !isEmpty() && pingCacheDaemon() )
{
- QPtrListIterator<SessionData::AuthData> it( *this );
+ TQPtrListIterator<SessionData::AuthData> it( *this );
for ( ; it.current(); ++it )
unregisterAuthData( it.current() );
}
@@ -215,8 +215,8 @@ public:
bool initDone;
bool useCookie;
- QString charsets;
- QString language;
+ TQString charsets;
+ TQString language;
};
SessionData::SessionData()
@@ -233,8 +233,8 @@ SessionData::~SessionData()
authData = 0L;
}
-void SessionData::configDataFor( MetaData &configData, const QString &proto,
- const QString & )
+void SessionData::configDataFor( MetaData &configData, const TQString &proto,
+ const TQString & )
{
if ( (proto.find("http", 0, false) == 0 ) ||
(proto.find("webdav", 0, false) == 0) )
@@ -269,11 +269,11 @@ void SessionData::reset()
d->useCookie = cfg->readBoolEntry( "Cookies", true );
delete cfg;
- static const QString & english = KGlobal::staticQString( "en" );
+ static const TQString & english = KGlobal::staticQString( "en" );
// Get language settings...
- QStringList languageList = KGlobal::locale()->languagesTwoAlpha();
- QStringList::Iterator it = languageList.find( QString::fromLatin1("C") );
+ TQStringList languageList = KGlobal::locale()->languagesTwoAlpha();
+ TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") );
if ( it != languageList.end() )
{
if ( languageList.contains( english ) > 0 )
@@ -286,11 +286,11 @@ void SessionData::reset()
d->language = languageList.join( ", " );
- d->charsets = QString::fromLatin1(QTextCodec::codecForLocale()->mimeName()).lower();
+ d->charsets = TQString::fromLatin1(TQTextCodec::codecForLocale()->mimeName()).lower();
KProtocolManager::reparseConfiguration();
}
-void SessionData::slotAuthData( const QCString& key, const QCString& gkey,
+void SessionData::slotAuthData( const TQCString& key, const TQCString& gkey,
bool keep )
{
if (!authData)
@@ -298,7 +298,7 @@ void SessionData::slotAuthData( const QCString& key, const QCString& gkey,
authData->addData( new SessionData::AuthData(key, gkey, keep) );
}
-void SessionData::slotDelAuthData( const QCString& gkey )
+void SessionData::slotDelAuthData( const TQCString& gkey )
{
if (!authData)
return;
diff --git a/kio/kio/sessiondata.h b/kio/kio/sessiondata.h
index 3b7838e13..408045260 100644
--- a/kio/kio/sessiondata.h
+++ b/kio/kio/sessiondata.h
@@ -21,7 +21,7 @@
#ifndef __KIO_SESSIONDATA_H
#define __KIO_SESSIONDATA_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/global.h>
namespace KIO {
@@ -40,15 +40,15 @@ public:
SessionData();
~SessionData();
- virtual void configDataFor( KIO::MetaData &configData, const QString &proto,
- const QString &host );
+ virtual void configDataFor( KIO::MetaData &configData, const TQString &proto,
+ const TQString &host );
virtual void reset();
/// @since 3.1
struct AuthData;
public slots:
- void slotAuthData( const QCString&, const QCString&, bool );
- void slotDelAuthData( const QCString& );
+ void slotAuthData( const TQCString&, const TQCString&, bool );
+ void slotDelAuthData( const TQCString& );
private:
class AuthDataList;
diff --git a/kio/kio/skipdlg.cpp b/kio/kio/skipdlg.cpp
index 28cbde6eb..f014b10d9 100644
--- a/kio/kio/skipdlg.cpp
+++ b/kio/kio/skipdlg.cpp
@@ -21,10 +21,10 @@
#include <stdio.h>
#include <assert.h>
-#include <qmessagebox.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqmessagebox.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <klocale.h>
@@ -38,7 +38,7 @@
using namespace KIO;
-SkipDlg::SkipDlg(QWidget *parent, bool _multi, const QString& _error_text, bool _modal ) :
+SkipDlg::SkipDlg(TQWidget *parent, bool _multi, const TQString& _error_text, bool _modal ) :
KDialog ( parent, "" , _modal )
{
// TODO : port to KDialogBase
@@ -56,28 +56,28 @@ SkipDlg::SkipDlg(QWidget *parent, bool _multi, const QString& _error_text, bool
setCaption( i18n( "Information" ) );
b0 = new KPushButton( KStdGuiItem::cancel(), this );
- connect(b0, SIGNAL(clicked()), this, SLOT(b0Pressed()));
+ connect(b0, TQT_SIGNAL(clicked()), this, TQT_SLOT(b0Pressed()));
if ( _multi )
{
- b1 = new QPushButton( i18n( "Skip" ), this );
- connect(b1, SIGNAL(clicked()), this, SLOT(b1Pressed()));
+ b1 = new TQPushButton( i18n( "Skip" ), this );
+ connect(b1, TQT_SIGNAL(clicked()), this, TQT_SLOT(b1Pressed()));
- b2 = new QPushButton( i18n( "Auto Skip" ), this );
- connect(b2, SIGNAL(clicked()), this, SLOT(b2Pressed()));
+ b2 = new TQPushButton( i18n( "Auto Skip" ), this );
+ connect(b2, TQT_SIGNAL(clicked()), this, TQT_SLOT(b2Pressed()));
}
- QVBoxLayout *vlayout = new QVBoxLayout( this, 10, 0 );
+ TQVBoxLayout *vlayout = new TQVBoxLayout( this, 10, 0 );
// vlayout->addStrut( 360 ); makes dlg at least that wide
- QLabel * lb = new QLabel( _error_text, this );
+ TQLabel * lb = new TQLabel( _error_text, this );
lb->setFixedHeight( lb->sizeHint().height() );
lb->setMinimumWidth( lb->sizeHint().width() );
vlayout->addWidget( lb );
vlayout->addSpacing( 10 );
- QHBoxLayout* layout = new QHBoxLayout();
+ TQHBoxLayout* layout = new TQHBoxLayout();
vlayout->addLayout( layout );
if ( b0 )
{
@@ -132,7 +132,7 @@ void SkipDlg::b2Pressed()
emit result( this, 2 );
}
-SkipDlg_Result KIO::open_SkipDlg( bool _multi, const QString& _error_text )
+SkipDlg_Result KIO::open_SkipDlg( bool _multi, const TQString& _error_text )
{
Q_ASSERT(kapp);
diff --git a/kio/kio/skipdlg.h b/kio/kio/skipdlg.h
index 1f6a7b8ab..fcb03fdae 100644
--- a/kio/kio/skipdlg.h
+++ b/kio/kio/skipdlg.h
@@ -29,7 +29,7 @@ namespace KIO {
enum SkipDlg_Result { S_SKIP = 1, S_AUTO_SKIP = 2, S_CANCEL = 0 };
- KIO_EXPORT SkipDlg_Result open_SkipDlg( bool _multi, const QString& _error_text = QString::null );
+ KIO_EXPORT SkipDlg_Result open_SkipDlg( bool _multi, const TQString& _error_text = TQString::null );
/**
* @internal
@@ -38,13 +38,13 @@ class KIO_EXPORT SkipDlg : public KDialog
{
Q_OBJECT
public:
- SkipDlg( QWidget *parent, bool _multi, const QString& _error_text, bool _modal = false );
+ SkipDlg( TQWidget *parent, bool _multi, const TQString& _error_text, bool _modal = false );
~SkipDlg();
protected:
- QPushButton *b0;
- QPushButton *b1;
- QPushButton *b2;
+ TQPushButton *b0;
+ TQPushButton *b1;
+ TQPushButton *b2;
bool modal;
diff --git a/kio/kio/slave.cpp b/kio/kio/slave.cpp
index a512e2ba7..c1a701711 100644
--- a/kio/kio/slave.cpp
+++ b/kio/kio/slave.cpp
@@ -30,8 +30,8 @@
#include <signal.h>
#include <sys/types.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kdebug.h>
@@ -94,16 +94,16 @@ void Slave::accept(KSocket *socket)
#endif
delete serv;
serv = 0;
- slaveconn.connect(this, SLOT(gotInput()));
+ slaveconn.connect(this, TQT_SLOT(gotInput()));
unlinkSocket();
}
void Slave::unlinkSocket()
{
if (m_socket.isEmpty()) return;
- QCString filename = QFile::encodeName(m_socket);
+ TQCString filename = TQFile::encodeName(m_socket);
unlink(filename.data());
- m_socket = QString::null;
+ m_socket = TQString::null;
}
void Slave::timeout()
@@ -116,7 +116,7 @@ void Slave::timeout()
kdDebug(7002) << "slave is slow... pid=" << m_pid << " t=" << delta_t << endl;
if (delta_t < SLAVE_CONNECTION_TIMEOUT_MAX)
{
- QTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, this, SLOT(timeout()));
+ TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, this, TQT_SLOT(timeout()));
return;
}
}
@@ -125,7 +125,7 @@ void Slave::timeout()
serv = 0;
unlinkSocket();
dead = true;
- QString arg = m_protocol;
+ TQString arg = m_protocol;
if (!m_host.isEmpty())
arg += "://"+m_host;
kdDebug(7002) << "slave died pid = " << m_pid << endl;
@@ -138,7 +138,7 @@ void Slave::timeout()
deref();
}
-Slave::Slave(KServerSocket *socket, const QString &protocol, const QString &socketname)
+Slave::Slave(KServerSocket *socket, const TQString &protocol, const TQString &socketname)
: SlaveInterface(&slaveconn), serv(socket), contacted(false),
d(new SlavePrivate(false))
{
@@ -152,13 +152,13 @@ Slave::Slave(KServerSocket *socket, const QString &protocol, const QString &sock
m_pid = 0;
m_port = 0;
#ifndef Q_WS_WIN
- connect(serv, SIGNAL(accepted( KSocket* )),
- SLOT(accept(KSocket*) ) );
+ connect(serv, TQT_SIGNAL(accepted( KSocket* )),
+ TQT_SLOT(accept(KSocket*) ) );
#endif
}
-Slave::Slave(bool /*derived*/, KServerSocket *socket, const QString &protocol,
- const QString &socketname)
+Slave::Slave(bool /*derived*/, KServerSocket *socket, const TQString &protocol,
+ const TQString &socketname)
: SlaveInterface(&slaveconn), serv(socket), contacted(false),
d(new SlavePrivate(true))
{
@@ -174,8 +174,8 @@ Slave::Slave(bool /*derived*/, KServerSocket *socket, const QString &protocol,
m_port = 0;
if (serv != 0) {
#ifndef Q_WS_WIN
- connect(serv, SIGNAL(accepted( KSocket* )),
- SLOT(accept(KSocket*) ) );
+ connect(serv, TQT_SIGNAL(accepted( KSocket* )),
+ TQT_SLOT(accept(KSocket*) ) );
#endif
}
}
@@ -193,7 +193,7 @@ Slave::~Slave()
d = 0;
}
-void Slave::setProtocol(const QString & protocol)
+void Slave::setProtocol(const TQString & protocol)
{
m_protocol = protocol;
}
@@ -224,8 +224,8 @@ void Slave::hold(const KURL &url)
ref();
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << url;
slaveconn.send( CMD_SLAVE_HOLD, data );
slaveconn.close();
@@ -239,13 +239,13 @@ void Slave::hold(const KURL &url)
if (!client->isAttached())
client->attach();
- QByteArray params, reply;
- QCString replyType;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params, reply;
+ TQCString replyType;
+ TQDataStream stream(params, IO_WriteOnly);
pid_t pid = m_pid;
stream << pid;
- QCString launcher = KApplication::launcher();
+ TQCString launcher = KApplication::launcher();
client->call(launcher, launcher, "waitForSlave(pid_t)",
params, replyType, reply);
}
@@ -282,7 +282,7 @@ bool Slave::suspended()
return slaveconn.suspended();
}
-void Slave::send(int cmd, const QByteArray &arr) {
+void Slave::send(int cmd, const TQByteArray &arr) {
if (d->derived) { // TODO: clean up before KDE 4
SendParams params;
params.cmd = cmd;
@@ -301,7 +301,7 @@ void Slave::gotInput()
{
slaveconn.close();
dead = true;
- QString arg = m_protocol;
+ TQString arg = m_protocol;
if (!m_host.isEmpty())
arg += "://"+m_host;
kdDebug(7002) << "slave died pid = " << m_pid << endl;
@@ -325,16 +325,16 @@ void Slave::kill()
}
}
-void Slave::setHost( const QString &host, int port,
- const QString &user, const QString &passwd)
+void Slave::setHost( const TQString &host, int port,
+ const TQString &user, const TQString &passwd)
{
m_host = host;
m_port = port;
m_user = user;
m_passwd = passwd;
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << m_host << m_port << m_user << m_passwd;
slaveconn.send( CMD_HOST, data );
}
@@ -346,13 +346,13 @@ void Slave::resetHost()
void Slave::setConfig(const MetaData &config)
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << config;
slaveconn.send( CMD_CONFIG, data );
}
-Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error, QString& error_text )
+Slave* Slave::createSlave( const TQString &protocol, const KURL& url, int& error, TQString& error_text )
{
//kdDebug(7002) << "createSlave '" << protocol << "' for " << url.prettyURL() << endl;
// Firstly take into account all special slaves
@@ -363,8 +363,8 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
if (!client->isAttached())
client->attach();
- QString prefix = locateLocal("socket", KGlobal::instance()->instanceName());
- KTempFile socketfile(prefix, QString::fromLatin1(".slave-socket"));
+ TQString prefix = locateLocal("socket", KGlobal::instance()->instanceName());
+ KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket"));
if ( socketfile.status() != 0 )
{
error_text = i18n("Unable to create io-slave: %1").arg(strerror(errno));
@@ -377,7 +377,7 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
#endif
#ifndef Q_WS_WIN
- KServerSocket *kss = new KServerSocket(QFile::encodeName(socketfile.name()));
+ KServerSocket *kss = new KServerSocket(TQFile::encodeName(socketfile.name()));
Slave *slave = new Slave(kss, protocol, socketfile.name());
#else
@@ -391,11 +391,11 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
// In such case we start the slave via KProcess.
// It's possible to force this by setting the env. variable
// KDE_FORK_SLAVES, Clearcase seems to require this.
- static bool bForkSlaves = !QCString(getenv("KDE_FORK_SLAVES")).isEmpty();
+ static bool bForkSlaves = !TQCString(getenv("KDE_FORK_SLAVES")).isEmpty();
if (bForkSlaves || !client->isAttached() || client->isAttachedToForeignServer())
{
- QString _name = KProtocolInfo::exec(protocol);
+ TQString _name = KProtocolInfo::exec(protocol);
if (_name.isEmpty())
{
error_text = i18n("Unknown protocol '%1'.").arg(protocol);
@@ -403,7 +403,7 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
delete slave;
return 0;
}
- QString lib_path = KLibLoader::findLibrary(_name.latin1());
+ TQString lib_path = KLibLoader::findLibrary(_name.latin1());
if (lib_path.isEmpty())
{
error_text = i18n("Can not find io-slave for protocol '%1'.").arg(protocol);
@@ -414,33 +414,33 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
KProcess proc;
proc << locate("exe", "kioslave") << lib_path << protocol << "" << socketfile.name();
- kdDebug(7002) << "kioslave" << ", " << lib_path << ", " << protocol << ", " << QString::null << ", " << socketfile.name() << endl;
+ kdDebug(7002) << "kioslave" << ", " << lib_path << ", " << protocol << ", " << TQString::null << ", " << socketfile.name() << endl;
proc.start(KProcess::DontCare);
#ifndef Q_WS_WIN
slave->setPID(proc.pid());
- QTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, SLOT(timeout()));
+ TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQT_SLOT(timeout()));
#endif
return slave;
}
- QByteArray params, reply;
- QCString replyType;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params, reply;
+ TQCString replyType;
+ TQDataStream stream(params, IO_WriteOnly);
stream << protocol << url.host() << socketfile.name();
- QCString launcher = KApplication::launcher();
- if (!client->call(launcher, launcher, "requestSlave(QString,QString,QString)",
+ TQCString launcher = KApplication::launcher();
+ if (!client->call(launcher, launcher, "requestSlave(TQString,TQString,TQString)",
params, replyType, reply)) {
error_text = i18n("Cannot talk to klauncher");
error = KIO::ERR_SLAVE_DEFINED;
delete slave;
return 0;
}
- QDataStream stream2(reply, IO_ReadOnly);
- QString errorStr;
+ TQDataStream stream2(reply, IO_ReadOnly);
+ TQString errorStr;
pid_t pid;
stream2 >> pid >> errorStr;
if (!pid)
@@ -452,12 +452,12 @@ Slave* Slave::createSlave( const QString &protocol, const KURL& url, int& error,
}
#ifndef Q_WS_WIN
slave->setPID(pid);
- QTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, SLOT(timeout()));
+ TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQT_SLOT(timeout()));
#endif
return slave;
}
-Slave* Slave::holdSlave( const QString &protocol, const KURL& url )
+Slave* Slave::holdSlave( const TQString &protocol, const KURL& url )
{
//kdDebug(7002) << "holdSlave '" << protocol << "' for " << url.prettyURL() << endl;
// Firstly take into account all special slaves
@@ -468,8 +468,8 @@ Slave* Slave::holdSlave( const QString &protocol, const KURL& url )
if (!client->isAttached())
client->attach();
- QString prefix = locateLocal("socket", KGlobal::instance()->instanceName());
- KTempFile socketfile(prefix, QString::fromLatin1(".slave-socket"));
+ TQString prefix = locateLocal("socket", KGlobal::instance()->instanceName());
+ KTempFile socketfile(prefix, TQString::fromLatin1(".slave-socket"));
if ( socketfile.status() != 0 )
return 0;
@@ -479,25 +479,25 @@ Slave* Slave::holdSlave( const QString &protocol, const KURL& url )
#endif
#ifndef Q_WS_WIN
- KServerSocket *kss = new KServerSocket(QFile::encodeName(socketfile.name()));
+ KServerSocket *kss = new KServerSocket(TQFile::encodeName(socketfile.name()));
Slave *slave = new Slave(kss, protocol, socketfile.name());
#else
Slave *slave = 0;
#endif
- QByteArray params, reply;
- QCString replyType;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params, reply;
+ TQCString replyType;
+ TQDataStream stream(params, IO_WriteOnly);
stream << url << socketfile.name();
- QCString launcher = KApplication::launcher();
- if (!client->call(launcher, launcher, "requestHoldSlave(KURL,QString)",
+ TQCString launcher = KApplication::launcher();
+ if (!client->call(launcher, launcher, "requestHoldSlave(KURL,TQString)",
params, replyType, reply)) {
delete slave;
return 0;
}
- QDataStream stream2(reply, IO_ReadOnly);
+ TQDataStream stream2(reply, IO_ReadOnly);
pid_t pid;
stream2 >> pid;
if (!pid)
@@ -507,7 +507,7 @@ Slave* Slave::holdSlave( const QString &protocol, const KURL& url )
}
#ifndef Q_WS_WIN
slave->setPID(pid);
- QTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, SLOT(timeout()));
+ TQTimer::singleShot(1000*SLAVE_CONNECTION_TIMEOUT_MIN, slave, TQT_SLOT(timeout()));
#endif
return slave;
}
diff --git a/kio/kio/slave.h b/kio/kio/slave.h
index 8d6b24e36..790f7eab1 100644
--- a/kio/kio/slave.h
+++ b/kio/kio/slave.h
@@ -25,7 +25,7 @@
#include <time.h>
#include <unistd.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
@@ -52,12 +52,12 @@ namespace KIO {
* @internal
* @since 3.2
*/
- Slave(bool derived, KServerSocket *unixdomain, const QString &protocol,
- const QString &socketname); // TODO(BIC): Remove in KDE 4
+ Slave(bool derived, KServerSocket *unixdomain, const TQString &protocol,
+ const TQString &socketname); // TODO(BIC): Remove in KDE 4
public:
Slave(KServerSocket *unixdomain,
- const QString &protocol, const QString &socketname);
+ const TQString &protocol, const TQString &socketname);
virtual ~Slave();
@@ -82,8 +82,8 @@ namespace KIO {
* @param user to login as
* @param passwd to login with
*/
- void setHost( const QString &host, int port,
- const QString &user, const QString &passwd); // TODO(BIC): make virtual
+ void setHost( const TQString &host, int port,
+ const TQString &user, const TQString &passwd); // TODO(BIC): make virtual
/**
* Clear host info.
@@ -100,9 +100,9 @@ namespace KIO {
*
* @return name of protocol handled by this slave, as seen by the user
*/
- QString protocol() { return m_protocol; }
+ TQString protocol() { return m_protocol; }
- void setProtocol(const QString & protocol);
+ void setProtocol(const TQString & protocol);
/**
* The actual protocol used to handle the request.
*
@@ -115,12 +115,12 @@ namespace KIO {
*
* @return the actual protocol (io-slave) that handled the request
*/
- QString slaveProtocol() { return m_slaveProtocol; }
+ TQString slaveProtocol() { return m_slaveProtocol; }
/**
* @return Host this slave is (was?) connected to
*/
- QString host() { return m_host; }
+ TQString host() { return m_host; }
/**
* @return port this slave is (was?) connected to
@@ -130,12 +130,12 @@ namespace KIO {
/**
* @return User this slave is (was?) logged in as
*/
- QString user() { return m_user; }
+ TQString user() { return m_user; }
/**
* @return Passwd used to log in
*/
- QString passwd() { return m_passwd; }
+ TQString passwd() { return m_passwd; }
/**
* Creates a new slave.
@@ -148,9 +148,9 @@ namespace KIO {
* @return 0 on failure, or a pointer to a slave otherwise.
* @todo What are legal @p protocol values?
*/
- static Slave* createSlave( const QString &protocol, const KURL& url, int& error, QString& error_text );
+ static Slave* createSlave( const TQString &protocol, const KURL& url, int& error, TQString& error_text );
- static Slave* holdSlave( const QString &protocol, const KURL& url );
+ static Slave* holdSlave( const TQString &protocol, const KURL& url );
// == communication with connected kioslave ==
// whenever possible prefer these methods over the respective
@@ -175,7 +175,7 @@ namespace KIO {
* @param data byte array containing data
* @since 3.2
*/
- void send(int cmd, const QByteArray &data = QByteArray());// TODO(BIC): make virtual
+ void send(int cmd, const TQByteArray &data = TQByteArray());// TODO(BIC): make virtual
// == end communication with connected kioslave ==
/**
@@ -220,14 +220,14 @@ namespace KIO {
void unlinkSocket();
private:
- QString m_protocol;
- QString m_slaveProtocol;
- QString m_host;
+ TQString m_protocol;
+ TQString m_slaveProtocol;
+ TQString m_host;
int m_port;
- QString m_user;
- QString m_passwd;
+ TQString m_user;
+ TQString m_passwd;
KServerSocket *serv;
- QString m_socket;
+ TQString m_socket;
pid_t m_pid;
bool contacted;
bool dead;
@@ -243,7 +243,7 @@ namespace KIO {
VIRTUAL_SET_HOST, VIRTUAL_SET_CONFIG };
struct SendParams {
int cmd;
- const QByteArray *arr;
+ const TQByteArray *arr;
};
struct HoldParams {
const KURL *url;
@@ -252,10 +252,10 @@ namespace KIO {
bool retval;
};
struct SetHostParams {
- const QString *host;
+ const TQString *host;
int port;
- const QString *user;
- const QString *passwd;
+ const TQString *user;
+ const TQString *passwd;
};
struct SetConfigParams {
const MetaData *config;
diff --git a/kio/kio/slavebase.cpp b/kio/kio/slavebase.cpp
index c52234f6d..ad683a009 100644
--- a/kio/kio/slavebase.cpp
+++ b/kio/kio/slavebase.cpp
@@ -40,7 +40,7 @@
#include <signal.h>
#include <time.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <dcopclient.h>
@@ -68,10 +68,10 @@
using namespace KIO;
-template class QPtrList<QValueList<UDSAtom> >;
-typedef QValueList<QCString> AuthKeysList;
-typedef QMap<QString,QCString> AuthKeysMap;
-#define KIO_DATA QByteArray data; QDataStream stream( data, IO_WriteOnly ); stream
+template class TQPtrList<TQValueList<UDSAtom> >;
+typedef TQValueList<TQCString> AuthKeysList;
+typedef TQMap<TQString,TQCString> AuthKeysMap;
+#define KIO_DATA TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream
#define KIO_FILESIZE_T(x) (unsigned long)(x & 0xffffffff) << (unsigned long)(x >> 32)
namespace KIO {
@@ -82,17 +82,17 @@ public:
SlaveBaseConfig(SlaveBase *_slave)
: slave(_slave) { }
- bool internalHasGroup(const QCString &) const { qWarning("hasGroup(const QCString &)");
+ bool internalHasGroup(const TQCString &) const { qWarning("hasGroup(const TQCString &)");
return false; }
- QStringList groupList() const { return QStringList(); }
+ TQStringList groupList() const { return TQStringList(); }
- QMap<QString,QString> entryMap(const QString &group) const
- { Q_UNUSED(group); return QMap<QString,QString>(); }
+ TQMap<TQString,TQString> entryMap(const TQString &group) const
+ { Q_UNUSED(group); return TQMap<TQString,TQString>(); }
void reparseConfiguration() { }
- KEntryMap internalEntryMap( const QString &pGroup) const { Q_UNUSED(pGroup); return KEntryMap(); }
+ KEntryMap internalEntryMap( const TQString &pGroup) const { Q_UNUSED(pGroup); return KEntryMap(); }
KEntryMap internalEntryMap() const { return KEntryMap(); }
@@ -102,7 +102,7 @@ return false; }
KEntry lookupData(const KEntryKey &_key) const
{
KEntry entry;
- QString value = slave->metaData(_key.c_key);
+ TQString value = slave->metaData(_key.c_key);
if (!value.isNull())
entry.mValue = value.utf8();
return entry;
@@ -114,7 +114,7 @@ protected:
class SlaveBasePrivate {
public:
- QString slaveid;
+ TQString slaveid;
bool resume:1;
bool needSendCanResume:1;
bool onHold:1;
@@ -129,7 +129,7 @@ public:
DCOPClient *dcopClient;
KRemoteEncoding *remotefile;
time_t timeout;
- QByteArray timeoutData;
+ TQByteArray timeoutData;
};
}
@@ -159,12 +159,12 @@ static void genericsig_handler(int sigNumber)
//////////////
-SlaveBase::SlaveBase( const QCString &protocol,
- const QCString &pool_socket,
- const QCString &app_socket )
+SlaveBase::SlaveBase( const TQCString &protocol,
+ const TQCString &pool_socket,
+ const TQCString &app_socket )
: mProtocol(protocol), m_pConnection(0),
- mPoolSocket( QFile::decodeName(pool_socket)),
- mAppSocket( QFile::decodeName(app_socket))
+ mPoolSocket( TQFile::decodeName(pool_socket)),
+ mAppSocket( TQFile::decodeName(app_socket))
{
s_protocol = protocol.data();
#ifdef Q_OS_UNIX
@@ -218,7 +218,7 @@ SlaveBase::SlaveBase( const QCString &protocol,
d = new SlaveBasePrivate;
// by kahl for netmgr (need a way to identify slaves)
d->slaveid = protocol;
- d->slaveid += QString::number(getpid());
+ d->slaveid += TQString::number(getpid());
d->resume = false;
d->needSendCanResume = false;
d->config = new SlaveBaseConfig(this);
@@ -264,9 +264,9 @@ void SlaveBase::dispatchLoop()
{
if (d->timeout && (d->timeout < time(0)))
{
- QByteArray data = d->timeoutData;
+ TQByteArray data = d->timeoutData;
d->timeout = 0;
- d->timeoutData = QByteArray();
+ d->timeoutData = TQByteArray();
special(data);
}
FD_ZERO(&rfds);
@@ -295,7 +295,7 @@ void SlaveBase::dispatchLoop()
if ((retval>0) && FD_ISSET(appconn->fd_from(), &rfds))
{ // dispatch application messages
int cmd;
- QByteArray data;
+ TQByteArray data;
if ( appconn->read(&cmd, data) != -1 )
{
dispatch(cmd, data);
@@ -337,10 +337,10 @@ void SlaveBase::dispatchLoop()
#endif
}
-void SlaveBase::connectSlave(const QString& path)
+void SlaveBase::connectSlave(const TQString& path)
{
#ifdef Q_OS_UNIX //TODO: KSocket not yet available on WIN32
- appconn->init(new KSocket(QFile::encodeName(path)));
+ appconn->init(new KSocket(TQFile::encodeName(path)));
if (!appconn->inited())
{
kdDebug(7019) << "SlaveBase: failed to connect to " << path << endl;
@@ -356,21 +356,21 @@ void SlaveBase::disconnectSlave()
appconn->close();
}
-void SlaveBase::setMetaData(const QString &key, const QString &value)
+void SlaveBase::setMetaData(const TQString &key, const TQString &value)
{
mOutgoingMetaData.replace(key, value);
}
-QString SlaveBase::metaData(const QString &key) const
+TQString SlaveBase::metaData(const TQString &key) const
{
if (mIncomingMetaData.contains(key))
return mIncomingMetaData[key];
if (d->configData.contains(key))
return d->configData[key];
- return QString::null;
+ return TQString::null;
}
-bool SlaveBase::hasMetaData(const QString &key) const
+bool SlaveBase::hasMetaData(const TQString &key) const
{
if (mIncomingMetaData.contains(key))
return true;
@@ -380,10 +380,10 @@ bool SlaveBase::hasMetaData(const QString &key) const
}
// ### remove the next two methods for KDE4 (they miss the const)
-QString SlaveBase::metaData(const QString &key) {
+TQString SlaveBase::metaData(const TQString &key) {
return const_cast<const SlaveBase*>(this)->metaData( key );
}
-bool SlaveBase::hasMetaData(const QString &key) {
+bool SlaveBase::hasMetaData(const TQString &key) {
return const_cast<const SlaveBase*>(this)->hasMetaData( key );
}
@@ -410,7 +410,7 @@ KRemoteEncoding *SlaveBase::remoteEncoding()
return d->remotefile = new KRemoteEncoding(metaData("Charset").latin1());
}
-void SlaveBase::data( const QByteArray &data )
+void SlaveBase::data( const TQByteArray &data )
{
if (!mOutgoingMetaData.isEmpty())
sendMetaData();
@@ -430,7 +430,7 @@ void SlaveBase::dataReq( )
m_pConnection->send( MSG_DATA_REQ );
}
-void SlaveBase::error( int _errid, const QString &_text )
+void SlaveBase::error( int _errid, const TQString &_text )
{
mIncomingMetaData.clear(); // Clear meta data
mOutgoingMetaData.clear();
@@ -468,7 +468,7 @@ void SlaveBase::needSubURLData()
m_pConnection->send( MSG_NEED_SUBURL_DATA );
}
-void SlaveBase::slaveStatus( const QString &host, bool connected )
+void SlaveBase::slaveStatus( const TQString &host, bool connected )
{
pid_t pid = getpid();
Q_INT8 b = connected ? 1 : 0;
@@ -572,7 +572,7 @@ static bool isSubCommand(int cmd)
(cmd == CMD_MULTI_GET));
}
-void SlaveBase::mimeType( const QString &_type)
+void SlaveBase::mimeType( const TQString &_type)
{
// kdDebug(7019) << "(" << getpid() << ") SlaveBase::mimeType '" << _type << "'" << endl;
int cmd;
@@ -615,19 +615,19 @@ void SlaveBase::exit()
::exit(255);
}
-void SlaveBase::warning( const QString &_msg)
+void SlaveBase::warning( const TQString &_msg)
{
KIO_DATA << _msg;
m_pConnection->send( INF_WARNING, data );
}
-void SlaveBase::infoMessage( const QString &_msg)
+void SlaveBase::infoMessage( const TQString &_msg)
{
KIO_DATA << _msg;
m_pConnection->send( INF_INFOMESSAGE, data );
}
-bool SlaveBase::requestNetwork(const QString& host)
+bool SlaveBase::requestNetwork(const TQString& host)
{
KIO_DATA << host << d->slaveid;
m_pConnection->send( MSG_NET_REQUEST, data );
@@ -635,14 +635,14 @@ bool SlaveBase::requestNetwork(const QString& host)
if ( waitForAnswer( INF_NETWORK_STATUS, 0, data ) != -1 )
{
bool status;
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
stream >> status;
return status;
} else
return false;
}
-void SlaveBase::dropNetwork(const QString& host)
+void SlaveBase::dropNetwork(const TQString& host)
{
KIO_DATA << host << d->slaveid;
m_pConnection->send( MSG_NET_DROP, data );
@@ -711,15 +711,15 @@ void SlaveBase::listEntries( const UDSEntryList& list )
d->sentListEntries+=(uint)list.count();
}
-void SlaveBase::sendAuthenticationKey( const QCString& key,
- const QCString& group,
+void SlaveBase::sendAuthenticationKey( const TQCString& key,
+ const TQCString& group,
bool keepPass )
{
KIO_DATA << key << group << keepPass;
m_pConnection->send( MSG_AUTH_KEY, data );
}
-void SlaveBase::delCachedAuthentication( const QString& key )
+void SlaveBase::delCachedAuthentication( const TQString& key )
{
KIO_DATA << key.utf8() ;
m_pConnection->send( MSG_DEL_AUTH_KEY, data );
@@ -762,7 +762,7 @@ void SlaveBase::sigpipe_handler (int)
// Don't add anything else here, especially no debug output
}
-void SlaveBase::setHost(QString const &, int, QString const &, QString const &)
+void SlaveBase::setHost(TQString const &, int, TQString const &, TQString const &)
{
}
@@ -774,7 +774,7 @@ void SlaveBase::stat(KURL const &)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_STAT)); }
void SlaveBase::put(KURL const &, int, bool, bool)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_PUT)); }
-void SlaveBase::special(const QByteArray &)
+void SlaveBase::special(const TQByteArray &)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_SPECIAL)); }
void SlaveBase::listDir(KURL const &)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_LISTDIR)); }
@@ -784,7 +784,7 @@ void SlaveBase::mimetype(KURL const &url)
{ get(url); }
void SlaveBase::rename(KURL const &, KURL const &, bool)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_RENAME)); }
-void SlaveBase::symlink(QString const &, KURL const &, bool)
+void SlaveBase::symlink(TQString const &, KURL const &, bool)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_SYMLINK)); }
void SlaveBase::copy(KURL const &, KURL const &, int, bool)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_COPY)); }
@@ -796,12 +796,12 @@ void SlaveBase::chmod(KURL const &, int)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_CHMOD)); }
void SlaveBase::setSubURL(KURL const &)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_SUBURL)); }
-void SlaveBase::multiGet(const QByteArray &)
+void SlaveBase::multiGet(const TQByteArray &)
{ error( ERR_UNSUPPORTED_ACTION, unsupportedActionErrorString(mProtocol, CMD_MULTI_GET)); }
void SlaveBase::slave_status()
-{ slaveStatus( QString::null, false ); }
+{ slaveStatus( TQString::null, false ); }
void SlaveBase::reparseConfiguration()
{
@@ -812,7 +812,7 @@ bool SlaveBase::dispatch()
assert( m_pConnection );
int cmd;
- QByteArray data;
+ TQByteArray data;
if ( m_pConnection->read( &cmd, data ) == -1 )
{
kdDebug(7019) << "SlaveBase::dispatch() has read error." << endl;
@@ -825,14 +825,14 @@ bool SlaveBase::dispatch()
bool SlaveBase::openPassDlg( AuthInfo& info )
{
- return openPassDlg(info, QString::null);
+ return openPassDlg(info, TQString::null);
}
-bool SlaveBase::openPassDlg( AuthInfo& info, const QString &errorMsg )
+bool SlaveBase::openPassDlg( AuthInfo& info, const TQString &errorMsg )
{
- QCString replyType;
- QByteArray params;
- QByteArray reply;
+ TQCString replyType;
+ TQByteArray params;
+ TQByteArray reply;
AuthInfo authResult;
long windowId = metaData("window-id").toLong();
long progressId = metaData("progress-id").toLong();
@@ -846,14 +846,14 @@ bool SlaveBase::openPassDlg( AuthInfo& info, const QString &errorMsg )
if (progressId)
uiserver.setJobVisible( progressId, false );
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
if (metaData("no-auth-prompt").lower() == "true")
- stream << info << QString("<NoAuthPrompt>") << windowId << s_seqNr << userTimestamp;
+ stream << info << TQString("<NoAuthPrompt>") << windowId << s_seqNr << userTimestamp;
else
stream << info << errorMsg << windowId << s_seqNr << userTimestamp;
- bool callOK = d->dcopClient->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo, QString, long int, long int, unsigned long int)",
+ bool callOK = d->dcopClient->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo, TQString, long int, long int, unsigned long int)",
params, replyType, reply );
if (progressId)
@@ -867,7 +867,7 @@ bool SlaveBase::openPassDlg( AuthInfo& info, const QString &errorMsg )
if ( replyType == "KIO::AuthInfo" )
{
- QDataStream stream2( reply, IO_ReadOnly );
+ TQDataStream stream2( reply, IO_ReadOnly );
stream2 >> authResult >> s_seqNr;
}
else
@@ -888,21 +888,21 @@ bool SlaveBase::openPassDlg( AuthInfo& info, const QString &errorMsg )
return true;
}
-int SlaveBase::messageBox( MessageBoxType type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo )
+int SlaveBase::messageBox( MessageBoxType type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo )
{
- return messageBox( text, type, caption, buttonYes, buttonNo, QString::null );
+ return messageBox( text, type, caption, buttonYes, buttonNo, TQString::null );
}
-int SlaveBase::messageBox( const QString &text, MessageBoxType type, const QString &caption,
- const QString &buttonYes, const QString &buttonNo, const QString &dontAskAgainName )
+int SlaveBase::messageBox( const TQString &text, MessageBoxType type, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName )
{
kdDebug(7019) << "messageBox " << type << " " << text << " - " << caption << buttonYes << buttonNo << endl;
KIO_DATA << (Q_INT32)type << text << caption << buttonYes << buttonNo << dontAskAgainName;
m_pConnection->send( INF_MESSAGEBOX, data );
if ( waitForAnswer( CMD_MESSAGEBOXANSWER, 0, data ) != -1 )
{
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
int answer;
stream >> answer;
kdDebug(7019) << "got messagebox answer" << answer << endl;
@@ -933,7 +933,7 @@ bool SlaveBase::canResume( KIO::filesize_t offset )
-int SlaveBase::waitForAnswer( int expected1, int expected2, QByteArray & data, int *pCmd )
+int SlaveBase::waitForAnswer( int expected1, int expected2, TQByteArray & data, int *pCmd )
{
int cmd, result;
for (;;)
@@ -961,14 +961,14 @@ int SlaveBase::waitForAnswer( int expected1, int expected2, QByteArray & data, i
}
-int SlaveBase::readData( QByteArray &buffer)
+int SlaveBase::readData( TQByteArray &buffer)
{
int result = waitForAnswer( MSG_DATA, 0, buffer );
//kdDebug(7019) << "readData: length = " << result << " " << endl;
return result;
}
-void SlaveBase::setTimeoutSpecialCommand(int timeout, const QByteArray &data)
+void SlaveBase::setTimeoutSpecialCommand(int timeout, const TQByteArray &data)
{
if (timeout > 0)
d->timeout = time(0)+(time_t)timeout;
@@ -980,9 +980,9 @@ void SlaveBase::setTimeoutSpecialCommand(int timeout, const QByteArray &data)
d->timeoutData = data;
}
-void SlaveBase::dispatch( int command, const QByteArray &data )
+void SlaveBase::dispatch( int command, const TQByteArray &data )
{
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
KURL url;
int i;
@@ -991,8 +991,8 @@ void SlaveBase::dispatch( int command, const QByteArray &data )
case CMD_HOST: {
// Reset s_seqNr, see kpasswdserver/DESIGN
s_seqNr = 0;
- QString passwd;
- QString host, user;
+ TQString passwd;
+ TQString host, user;
stream >> host >> i >> user >> passwd;
setHost( host, i, user, passwd );
}
@@ -1009,8 +1009,8 @@ void SlaveBase::dispatch( int command, const QByteArray &data )
case CMD_SLAVE_CONNECT:
{
d->onHold = false;
- QString app_socket;
- QDataStream stream( data, IO_ReadOnly);
+ TQString app_socket;
+ TQDataStream stream( data, IO_ReadOnly);
stream >> app_socket;
appconn->send( MSG_SLAVE_ACK );
disconnectSlave();
@@ -1020,7 +1020,7 @@ void SlaveBase::dispatch( int command, const QByteArray &data )
case CMD_SLAVE_HOLD:
{
KURL url;
- QDataStream stream( data, IO_ReadOnly);
+ TQDataStream stream( data, IO_ReadOnly);
stream >> url;
d->onHoldUrl = url;
d->onHold = true;
@@ -1087,7 +1087,7 @@ void SlaveBase::dispatch( int command, const QByteArray &data )
case CMD_SYMLINK:
{
Q_INT8 iOverwrite;
- QString target;
+ TQString target;
stream >> target >> url >> iOverwrite;
bool overwrite = (iOverwrite != 0);
symlink( target, url, overwrite );
@@ -1135,20 +1135,20 @@ void SlaveBase::dispatch( int command, const QByteArray &data )
}
}
-QString SlaveBase::createAuthCacheKey( const KURL& url )
+TQString SlaveBase::createAuthCacheKey( const KURL& url )
{
if( !url.isValid() )
- return QString::null;
+ return TQString::null;
// Generate the basic key sequence.
- QString key = url.protocol();
+ TQString key = url.protocol();
key += '-';
key += url.host();
int port = url.port();
if( port )
{
key += ':';
- key += QString::number(port);
+ key += TQString::number(port);
}
return key;
@@ -1178,9 +1178,9 @@ bool SlaveBase::pingCacheDaemon() const
bool SlaveBase::checkCachedAuthentication( AuthInfo& info )
{
- QCString replyType;
- QByteArray params;
- QByteArray reply;
+ TQCString replyType;
+ TQByteArray params;
+ TQByteArray reply;
AuthInfo authResult;
long windowId = metaData("window-id").toLong();
unsigned long userTimestamp = metaData("user-timestamp").toULong();
@@ -1189,7 +1189,7 @@ bool SlaveBase::checkCachedAuthentication( AuthInfo& info )
(void) dcopClient(); // Make sure to have a dcop client.
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << info << windowId << userTimestamp;
if ( !d->dcopClient->call( "kded", "kpasswdserver", "checkAuthInfo(KIO::AuthInfo, long int, unsigned long int)",
@@ -1201,7 +1201,7 @@ bool SlaveBase::checkCachedAuthentication( AuthInfo& info )
if ( replyType == "KIO::AuthInfo" )
{
- QDataStream stream2( reply, IO_ReadOnly );
+ TQDataStream stream2( reply, IO_ReadOnly );
stream2 >> authResult;
}
else
@@ -1221,12 +1221,12 @@ bool SlaveBase::checkCachedAuthentication( AuthInfo& info )
bool SlaveBase::cacheAuthentication( const AuthInfo& info )
{
- QByteArray params;
+ TQByteArray params;
long windowId = metaData("window-id").toLong();
(void) dcopClient(); // Make sure to have a dcop client.
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << info << windowId;
d->dcopClient->send( "kded", "kpasswdserver", "addAuthInfo(KIO::AuthInfo, long int)", params );
@@ -1237,7 +1237,7 @@ bool SlaveBase::cacheAuthentication( const AuthInfo& info )
int SlaveBase::connectTimeout()
{
bool ok;
- QString tmp = metaData("ConnectTimeout");
+ TQString tmp = metaData("ConnectTimeout");
int result = tmp.toInt(&ok);
if (ok)
return result;
@@ -1247,7 +1247,7 @@ int SlaveBase::connectTimeout()
int SlaveBase::proxyConnectTimeout()
{
bool ok;
- QString tmp = metaData("ProxyConnectTimeout");
+ TQString tmp = metaData("ProxyConnectTimeout");
int result = tmp.toInt(&ok);
if (ok)
return result;
@@ -1258,7 +1258,7 @@ int SlaveBase::proxyConnectTimeout()
int SlaveBase::responseTimeout()
{
bool ok;
- QString tmp = metaData("ResponseTimeout");
+ TQString tmp = metaData("ResponseTimeout");
int result = tmp.toInt(&ok);
if (ok)
return result;
@@ -1269,7 +1269,7 @@ int SlaveBase::responseTimeout()
int SlaveBase::readTimeout()
{
bool ok;
- QString tmp = metaData("ReadTimeout");
+ TQString tmp = metaData("ReadTimeout");
int result = tmp.toInt(&ok);
if (ok)
return result;
diff --git a/kio/kio/slavebase.h b/kio/kio/slavebase.h
index f10ac3553..82370ce56 100644
--- a/kio/kio/slavebase.h
+++ b/kio/kio/slavebase.h
@@ -45,7 +45,7 @@ class SlaveBasePrivate;
class KIO_EXPORT SlaveBase
{
public:
- SlaveBase( const QCString &protocol, const QCString &pool_socket, const QCString &app_socket);
+ SlaveBase( const TQCString &protocol, const TQCString &pool_socket, const TQCString &app_socket);
virtual ~SlaveBase();
/**
@@ -77,11 +77,11 @@ public:
* Sends data in the slave to the job (i.e. in get).
*
* To signal end of data, simply send an empty
- * QByteArray().
+ * TQByteArray().
*
* @param data the data read by the slave
*/
- void data( const QByteArray &data );
+ void data( const TQByteArray &data );
/**
* Asks for data from the job.
@@ -106,7 +106,7 @@ public:
* @param _errid the error code from KIO::Error
* @param _text the rich text error message
*/
- void error( int _errid, const QString &_text );
+ void error( int _errid, const TQString &_text );
/**
* Call in openConnection, if you reimplement it, when you're done.
@@ -130,7 +130,7 @@ public:
* empty if not connected)
* @param connected Whether an actual network connection exists.
**/
- void slaveStatus(const QString &host, bool connected);
+ void slaveStatus(const TQString &host, bool connected);
/**
* Call this from stat() to express details about an object, the
@@ -216,18 +216,18 @@ public:
* Call this in mimetype() and in get(), when you know the mimetype.
* See mimetype about other ways to implement it.
*/
- void mimeType( const QString &_type );
+ void mimeType( const TQString &_type );
/**
* Call to signal a warning, to be displayed in a dialog box.
*/
- void warning( const QString &msg );
+ void warning( const TQString &msg );
/**
* Call to signal a message, to be displayed if the application wants to,
* for instance in a status bar. Usual examples are "connecting to host xyz", etc.
*/
- void infoMessage( const QString &msg );
+ void infoMessage( const TQString &msg );
enum MessageBoxType { QuestionYesNo = 1, WarningYesNo = 2, WarningContinueCancel = 3, WarningYesNoCancel = 4, Information = 5, SSLMessageBox = 6 };
@@ -244,10 +244,10 @@ public:
* and for Information, none is used.
* @return a button code, as defined in KMessageBox, or 0 on communication error.
*/
- int messageBox( MessageBoxType type, const QString &text,
- const QString &caption = QString::null,
- const QString &buttonYes = QString::null,
- const QString &buttonNo = QString::null );
+ int messageBox( MessageBoxType type, const TQString &text,
+ const TQString &caption = TQString::null,
+ const TQString &buttonYes = TQString::null,
+ const TQString &buttonNo = TQString::null );
/**
* Call this to show a message box from the slave
@@ -265,43 +265,43 @@ public:
* @return a button code, as defined in KMessageBox, or 0 on communication error.
* @since 3.3
*/
- int messageBox( const QString &text, MessageBoxType type,
- const QString &caption = QString::null,
- const QString &buttonYes = QString::null,
- const QString &buttonNo = QString::null,
- const QString &dontAskAgainName = QString::null );
+ int messageBox( const TQString &text, MessageBoxType type,
+ const TQString &caption = TQString::null,
+ const TQString &buttonYes = TQString::null,
+ const TQString &buttonNo = TQString::null,
+ const TQString &dontAskAgainName = TQString::null );
/**
* Sets meta-data to be send to the application before the first
* data() or finished() signal.
*/
- void setMetaData(const QString &key, const QString &value);
+ void setMetaData(const TQString &key, const TQString &value);
/**
* Queries for the existence of a certain config/meta-data entry
* send by the application to the slave.
* @since 3.2
*/
- bool hasMetaData(const QString &key) const;
+ bool hasMetaData(const TQString &key) const;
/**
* Queries for config/meta-data send by the application to the slave.
* @since 3.2
*/
- QString metaData(const QString &key) const;
+ TQString metaData(const TQString &key) const;
/**
* @obsolete kept for binary compatibility
* Queries for the existence of a certain config/meta-data entry
* send by the application to the slave.
*/
- bool hasMetaData(const QString &key);
+ bool hasMetaData(const TQString &key);
/**
* @obsolete kept for binary compatibility
* Queries for config/meta-data sent by the application to the slave.
*/
- QString metaData(const QString &key);
+ TQString metaData(const TQString &key);
/**
* @internal for ForwardingSlaveBase
@@ -344,7 +344,7 @@ public:
*
* This method is called whenever a change in host, port or user occurs.
*/
- 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);
/**
* Prepare slave for streaming operation
@@ -453,7 +453,7 @@ public:
* @param dest The symlink to create.
* @param overwrite whether to automatically overwrite if the dest exists
*/
- virtual void symlink( const QString& target, const KURL& dest, bool overwrite );
+ virtual void symlink( const TQString& target, const KURL& dest, bool overwrite );
/**
* Change permissions on @p path
@@ -492,7 +492,7 @@ public:
* slave, but usually starts with an int for the command number.
* Document your slave's commands, at least in its header file.
*/
- virtual void special( const QByteArray & data );
+ virtual void special( const TQByteArray & data );
/**
* Used for multiple get. Currently only used foir HTTP pielining
@@ -501,7 +501,7 @@ public:
* @param data packed data; Contains number of URLs to fetch, and for
* each URL the URL itself and its associated MetaData.
*/
- virtual void multiGet( const QByteArray & data );
+ virtual void multiGet( const TQByteArray & data );
/**
* Called to get the status of the slave. Slave should respond
@@ -552,7 +552,7 @@ public:
* cancels any pending timeout.
* @since 3.1
*/
- void setTimeoutSpecialCommand(int timeout, const QByteArray &data=QByteArray());
+ void setTimeoutSpecialCommand(int timeout, const TQByteArray &data=TQByteArray());
/**
* @internal
@@ -574,7 +574,7 @@ public:
/**
* @internal
*/
- virtual void dispatch( int command, const QByteArray &data );
+ virtual void dispatch( int command, const TQByteArray &data );
/**
* Read data send by the job, after a dataReq
@@ -584,7 +584,7 @@ public:
* > 0 bytes read
* < 0 error
**/
- int readData( QByteArray &buffer );
+ int readData( TQByteArray &buffer );
/**
* internal function to be called by the slave.
@@ -603,7 +603,7 @@ public:
* internal function to connect a slave to/ disconnect from
* either the slave pool or the application
*/
- void connectSlave(const QString& path);
+ void connectSlave(const TQString& path);
void disconnectSlave();
/**
@@ -618,10 +618,10 @@ public:
* KIO::AuthInfo authInfo;
* if ( openPassDlg( authInfo ) )
* {
- * kdDebug() << QString::fromLatin1("User: ")
+ * kdDebug() << TQString::fromLatin1("User: ")
* << authInfo.username << endl;
- * kdDebug() << QString::fromLatin1("Password: ")
- * << QString::fromLatin1("Not displayed here!") << endl;
+ * kdDebug() << TQString::fromLatin1("Password: ")
+ * << TQString::fromLatin1("Not displayed here!") << endl;
* }
* \endcode
*
@@ -632,13 +632,13 @@ public:
* KIO::AuthInfo authInfo;
* authInfo.caption= "Acme Password Dialog";
* authInfo.username= "Wile E. Coyote";
- * QString errorMsg = "You entered an incorrect password.";
+ * TQString errorMsg = "You entered an incorrect password.";
* if ( openPassDlg( authInfo, errorMsg ) )
* {
- * kdDebug() << QString::fromLatin1("User: ")
+ * kdDebug() << TQString::fromLatin1("User: ")
* << authInfo.username << endl;
- * kdDebug() << QString::fromLatin1("Password: ")
- * << QString::fromLatin1("Not displayed here!") << endl;
+ * kdDebug() << TQString::fromLatin1("Password: ")
+ * << TQString::fromLatin1("Not displayed here!") << endl;
* }
* \endcode
*
@@ -655,7 +655,7 @@ public:
* @return @p true if user clicks on "OK", @p false otherwsie.
* @since 3.1
*/
- bool openPassDlg( KIO::AuthInfo& info, const QString &errorMsg );
+ bool openPassDlg( KIO::AuthInfo& info, const TQString &errorMsg );
/**
* Same as above function except it does not need error message.
@@ -712,7 +712,7 @@ public:
* Creates a basic key to be used to cache the password.
* @param url the url from which the key is supposed to be generated
*/
- QString createAuthCacheKey( const KURL& url );
+ TQString createAuthCacheKey( const KURL& url );
/**
* @obsolete as of 3.1. Use openPassDlg instead.
@@ -721,7 +721,7 @@ public:
* Cache authentication information is now stored automatically
* by openPassDlg.
*/
- void sendAuthenticationKey( const QCString& gKey, const QCString& key, bool keep );
+ void sendAuthenticationKey( const TQCString& gKey, const TQCString& key, bool keep );
/**
* @obsolete as of 3.1. Use openPassDlg instead.
@@ -731,7 +731,7 @@ public:
* removed automatically when a given session ends, i.e. the
* application is closed.
*/
- void delCachedAuthentication( const QString& key );
+ void delCachedAuthentication( const TQString& key );
/**
* @obsolete as of 3.1. Use openPassDlg instead.
@@ -763,7 +763,7 @@ public:
* @return true in theorie, the host is reachable
* false the system is offline and the host is in a remote network.
*/
- bool requestNetwork(const QString& host = QString::null);
+ bool requestNetwork(const TQString& host = TQString::null);
/**
* Used by the slave to withdraw a connection requested by
@@ -778,7 +778,7 @@ public:
*
* A slave should call this function every time it disconnect from a host.
* */
- void dropNetwork(const QString& host = QString::null);
+ void dropNetwork(const TQString& host = TQString::null);
/**
* Return the dcop client used by this slave.
@@ -790,7 +790,7 @@ public:
* Wait for an answer to our request, until we get @p expected1 or @p expected2
* @return the result from readData, as well as the cmd in *pCmd if set, and the data in @p data
*/
- int waitForAnswer( int expected1, int expected2, QByteArray & data, int * pCmd = 0 );
+ int waitForAnswer( int expected1, int expected2, TQByteArray & data, int * pCmd = 0 );
/**
* Internal function to transmit meta data to the application.
@@ -800,7 +800,7 @@ public:
/**
* Name of the protocol supported by this slave
*/
- QCString mProtocol;
+ TQCString mProtocol;
Connection * m_pConnection;
@@ -826,8 +826,8 @@ protected:
uint listEntryCurrentSize;
long listEntry_sec, listEntry_usec;
Connection *appconn;
- QString mPoolSocket;
- QString mAppSocket;
+ TQString mPoolSocket;
+ TQString mAppSocket;
bool mConnectedToApp;
static long s_seqNr;
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kio/slaveconfig.cpp b/kio/kio/slaveconfig.cpp
index e0a56b243..fe888c99c 100644
--- a/kio/kio/slaveconfig.cpp
+++ b/kio/kio/slaveconfig.cpp
@@ -22,7 +22,7 @@
#include <assert.h>
-#include <qdict.h>
+#include <tqdict.h>
#include <kconfig.h>
#include <kstaticdeleter.h>
@@ -46,11 +46,11 @@ public:
public:
MetaData global;
- QDict<MetaData> host;
+ TQDict<MetaData> host;
KConfig *configFile;
};
-static void readConfig(KConfig *config, const QString & group, MetaData *metaData)
+static void readConfig(KConfig *config, const TQString & group, MetaData *metaData)
{
*metaData += config->entryMap(group);
}
@@ -59,12 +59,12 @@ class SlaveConfigPrivate
{
public:
void readGlobalConfig();
- SlaveConfigProtocol *readProtocolConfig(const QString &_protocol);
- SlaveConfigProtocol *findProtocolConfig(const QString &_protocol);
- void readConfigProtocolHost(const QString &_protocol, SlaveConfigProtocol *scp, const QString &host);
+ SlaveConfigProtocol *readProtocolConfig(const TQString &_protocol);
+ SlaveConfigProtocol *findProtocolConfig(const TQString &_protocol);
+ void readConfigProtocolHost(const TQString &_protocol, SlaveConfigProtocol *scp, const TQString &host);
public:
MetaData global;
- QDict<SlaveConfigProtocol> protocol;
+ TQDict<SlaveConfigProtocol> protocol;
};
void SlaveConfigPrivate::readGlobalConfig()
@@ -77,12 +77,12 @@ void SlaveConfigPrivate::readGlobalConfig()
readConfig(config, "<default>", &global);
}
-SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const QString &_protocol)
+SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const TQString &_protocol)
{
SlaveConfigProtocol *scp = protocol.find(_protocol);
if (!scp)
{
- QString filename = KProtocolInfo::config(_protocol);
+ TQString filename = KProtocolInfo::config(_protocol);
scp = new SlaveConfigProtocol;
scp->configFile = new KConfig(filename, true, false);
protocol.insert(_protocol, scp);
@@ -92,7 +92,7 @@ SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const QString &_prot
return scp;
}
-SlaveConfigProtocol* SlaveConfigPrivate::findProtocolConfig(const QString &_protocol)
+SlaveConfigProtocol* SlaveConfigPrivate::findProtocolConfig(const TQString &_protocol)
{
SlaveConfigProtocol *scp = protocol.find(_protocol);
if (!scp)
@@ -100,14 +100,14 @@ SlaveConfigProtocol* SlaveConfigPrivate::findProtocolConfig(const QString &_prot
return scp;
}
-void SlaveConfigPrivate::readConfigProtocolHost(const QString &, SlaveConfigProtocol *scp, const QString &host)
+void SlaveConfigPrivate::readConfigProtocolHost(const TQString &, SlaveConfigProtocol *scp, const TQString &host)
{
MetaData *metaData = new MetaData;
scp->host.replace(host, metaData);
// Read stuff
// Break host into domains
- QString domain = host;
+ TQString domain = host;
if (!domain.contains('.'))
{
@@ -156,17 +156,17 @@ SlaveConfig::~SlaveConfig()
_self = 0;
}
-void SlaveConfig::setConfigData(const QString &protocol,
- const QString &host,
- const QString &key,
- const QString &value )
+void SlaveConfig::setConfigData(const TQString &protocol,
+ const TQString &host,
+ const TQString &key,
+ const TQString &value )
{
MetaData config;
config.insert(key, value);
setConfigData(protocol, host, config);
}
-void SlaveConfig::setConfigData(const QString &protocol, const QString &host, const MetaData &config )
+void SlaveConfig::setConfigData(const TQString &protocol, const TQString &host, const MetaData &config )
{
if (protocol.isEmpty())
d->global += config;
@@ -190,7 +190,7 @@ void SlaveConfig::setConfigData(const QString &protocol, const QString &host, co
}
}
-MetaData SlaveConfig::configData(const QString &protocol, const QString &host)
+MetaData SlaveConfig::configData(const TQString &protocol, const TQString &host)
{
MetaData config = d->global;
SlaveConfigProtocol *scp = d->findProtocolConfig(protocol);
@@ -209,7 +209,7 @@ MetaData SlaveConfig::configData(const QString &protocol, const QString &host)
return config;
}
-QString SlaveConfig::configData(const QString &protocol, const QString &host, const QString &key)
+TQString SlaveConfig::configData(const TQString &protocol, const TQString &host, const TQString &key)
{
return configData(protocol, host)[key];
}
diff --git a/kio/kio/slaveconfig.h b/kio/kio/slaveconfig.h
index 5b912db2f..1eaaa55e4 100644
--- a/kio/kio/slaveconfig.h
+++ b/kio/kio/slaveconfig.h
@@ -21,7 +21,7 @@
#ifndef KIO_SLAVE_CONFIG_H
#define KIO_SLAVE_CONFIG_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/global.h>
namespace KIO {
@@ -58,7 +58,7 @@ namespace KIO {
* Changes made to the slave configuration only apply to slaves
* used by the current process.
*/
- void setConfigData(const QString &protocol, const QString &host, const QString &key, const QString &value );
+ void setConfigData(const TQString &protocol, const TQString &host, const TQString &key, const TQString &value );
/**
* Configure slaves of type @p protocol with @p config.
@@ -68,19 +68,19 @@ namespace KIO {
* Changes made to the slave configuration only apply to slaves
* used by the current process.
*/
- void setConfigData(const QString &protocol, const QString &host, const MetaData &config );
+ void setConfigData(const TQString &protocol, const TQString &host, const MetaData &config );
/**
* Query slave configuration for slaves of type @p protocol when
* dealing with @p host.
*/
- MetaData configData(const QString &protocol, const QString &host);
+ MetaData configData(const TQString &protocol, const TQString &host);
/**
* Query a specific configuration key for slaves of type @p protocol when
* dealing with @p host.
*/
- QString configData(const QString &protocol, const QString &host, const QString &key);
+ TQString configData(const TQString &protocol, const TQString &host, const TQString &key);
/**
* Undo any changes made by calls to setConfigData.
@@ -95,7 +95,7 @@ namespace KIO {
* configuration changes with setConfigData based on the
* host.
*/
- void configNeeded(const QString &protocol, const QString &host);
+ void configNeeded(const TQString &protocol, const TQString &host);
protected:
SlaveConfig();
static SlaveConfig *_self;
diff --git a/kio/kio/slaveinterface.cpp b/kio/kio/slaveinterface.cpp
index c468187ec..563aad17e 100644
--- a/kio/kio/slaveinterface.cpp
+++ b/kio/kio/slaveinterface.cpp
@@ -30,12 +30,12 @@
#include <kapplication.h>
#include <dcopclient.h>
#include <time.h>
-#include <qtimer.h>
+#include <tqtimer.h>
using namespace KIO;
-QDataStream &operator <<(QDataStream &s, const KIO::UDSEntry &e )
+TQDataStream &operator <<(TQDataStream &s, const KIO::UDSEntry &e )
{
// On 32-bit platforms we send UDS_SIZE with UDS_SIZE_LARGE in front
// of it to carry the 32 msb. We can't send a 64 bit UDS_SIZE because
@@ -67,7 +67,7 @@ QDataStream &operator <<(QDataStream &s, const KIO::UDSEntry &e )
return s;
}
-QDataStream &operator >>(QDataStream &s, KIO::UDSEntry &e )
+TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e )
{
e.clear();
Q_UINT32 size;
@@ -124,7 +124,7 @@ public:
size_t last_time;
KIO::filesize_t filesize, offset;
- QTimer speed_timer;
+ TQTimer speed_timer;
};
//////////////
@@ -135,18 +135,18 @@ SlaveInterface::SlaveInterface( Connection * connection )
m_progressId = 0;
d = new SlaveInterfacePrivate;
- connect(&d->speed_timer, SIGNAL(timeout()), SLOT(calcSpeed()));
+ connect(&d->speed_timer, TQT_SIGNAL(timeout()), TQT_SLOT(calcSpeed()));
}
SlaveInterface::~SlaveInterface()
{
// Note: no kdDebug() here (scheduler is deleted very late)
- m_pConnection = 0; // a bit like the "wasDeleted" of QObject...
+ m_pConnection = 0; // a bit like the "wasDeleted" of TQObject...
delete d;
}
-static KIO::filesize_t readFilesize_t(QDataStream &stream)
+static KIO::filesize_t readFilesize_t(TQDataStream &stream)
{
KIO::filesize_t result;
unsigned long ul;
@@ -165,7 +165,7 @@ bool SlaveInterface::dispatch()
assert( m_pConnection );
int cmd;
- QByteArray data;
+ TQByteArray data;
if (m_pConnection->read( &cmd, data ) == -1)
return false;
@@ -218,13 +218,13 @@ void SlaveInterface::calcSpeed()
}
}
-bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
+bool SlaveInterface::dispatch( int _cmd, const TQByteArray &rawdata )
{
//kdDebug(7007) << "dispatch " << _cmd << endl;
- QDataStream stream( rawdata, IO_ReadOnly );
+ TQDataStream stream( rawdata, IO_ReadOnly );
- QString str1;
+ TQString str1;
Q_INT32 i;
Q_INT8 b;
Q_UINT32 ul;
@@ -282,7 +282,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
case MSG_SLAVE_STATUS:
{
pid_t pid;
- QCString protocol;
+ TQCString protocol;
stream >> pid >> protocol >> str1 >> b;
emit slaveStatus(pid, protocol, str1, (b != 0));
}
@@ -337,7 +337,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
emit mimeType( str1 );
if (!m_pConnection->suspended())
- m_pConnection->sendnow( CMD_NONE, QByteArray() );
+ m_pConnection->sendnow( CMD_NONE, TQByteArray() );
break;
case INF_WARNING:
stream >> str1;
@@ -352,7 +352,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
}
case INF_MESSAGEBOX: {
kdDebug(7007) << "needs a msg box" << endl;
- QString text, caption, buttonYes, buttonNo, dontAskAgainName;
+ TQString text, caption, buttonYes, buttonNo, dontAskAgainName;
int type;
stream >> type >> text >> caption >> buttonYes >> buttonNo;
if (stream.atEnd())
@@ -364,7 +364,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
break;
}
case INF_INFOMESSAGE: {
- QString msg;
+ TQString msg;
stream >> msg;
infoMessage(msg);
break;
@@ -376,15 +376,15 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
break;
}
case MSG_NET_REQUEST: {
- QString host;
- QString slaveid;
+ TQString host;
+ TQString slaveid;
stream >> host >> slaveid;
requestNetwork(host, slaveid);
break;
}
case MSG_NET_DROP: {
- QString host;
- QString slaveid;
+ TQString host;
+ TQString slaveid;
stream >> host >> slaveid;
dropNetwork(host, slaveid);
break;
@@ -395,7 +395,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
}
case MSG_AUTH_KEY: {
bool keep;
- QCString key, group;
+ TQCString key, group;
stream >> key >> group >> keep;
kdDebug(7007) << "Got auth-key: " << key << endl
<< " group-key: " << group << endl
@@ -404,7 +404,7 @@ bool SlaveInterface::dispatch( int _cmd, const QByteArray &rawdata )
break;
}
case MSG_DEL_AUTH_KEY: {
- QCString key;
+ TQCString key;
stream >> key;
kdDebug(7007) << "Delete auth-key: " << key << endl;
emit delAuthorization( key );
@@ -423,16 +423,16 @@ void SlaveInterface::setOffset( KIO::filesize_t o)
KIO::filesize_t SlaveInterface::offset() const { return d->offset; }
-void SlaveInterface::requestNetwork(const QString &host, const QString &slaveid)
+void SlaveInterface::requestNetwork(const TQString &host, const TQString &slaveid)
{
kdDebug(7007) << "requestNetwork " << host << slaveid << endl;
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << true;
m_pConnection->sendnow( INF_NETWORK_STATUS, packedArgs );
}
-void SlaveInterface::dropNetwork(const QString &host, const QString &slaveid)
+void SlaveInterface::dropNetwork(const TQString &host, const TQString &slaveid)
{
kdDebug(7007) << "dropNetwork " << host << slaveid << endl;
}
@@ -440,10 +440,10 @@ void SlaveInterface::dropNetwork(const QString &host, const QString &slaveid)
void SlaveInterface::sendResumeAnswer( bool resume )
{
kdDebug(7007) << "SlaveInterface::sendResumeAnswer ok for resuming :" << resume << endl;
- m_pConnection->sendnow( resume ? CMD_RESUMEANSWER : CMD_NONE, QByteArray() );
+ m_pConnection->sendnow( resume ? CMD_RESUMEANSWER : CMD_NONE, TQByteArray() );
}
-void SlaveInterface::openPassDlg( const QString& prompt, const QString& user, bool readOnly )
+void SlaveInterface::openPassDlg( const TQString& prompt, const TQString& user, bool readOnly )
{
AuthInfo info;
info.prompt = prompt;
@@ -452,9 +452,9 @@ void SlaveInterface::openPassDlg( const QString& prompt, const QString& user, bo
openPassDlg( info );
}
-void SlaveInterface::openPassDlg( const QString& prompt, const QString& user,
- const QString& caption, const QString& comment,
- const QString& label, bool readOnly )
+void SlaveInterface::openPassDlg( const TQString& prompt, const TQString& user,
+ const TQString& caption, const TQString& comment,
+ const TQString& label, bool readOnly )
{
AuthInfo info;
info.prompt = prompt;
@@ -474,8 +474,8 @@ void SlaveInterface::openPassDlg( AuthInfo& info )
bool result = Observer::self()->openPassDlg( info );
if ( m_pConnection )
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
if ( result )
{
stream << info;
@@ -489,26 +489,26 @@ void SlaveInterface::openPassDlg( AuthInfo& info )
}
}
-void SlaveInterface::messageBox( int type, const QString &text, const QString &_caption,
- const QString &buttonYes, const QString &buttonNo )
+void SlaveInterface::messageBox( int type, const TQString &text, const TQString &_caption,
+ const TQString &buttonYes, const TQString &buttonNo )
{
- messageBox( type, text, _caption, buttonYes, buttonNo, QString::null );
+ messageBox( type, text, _caption, buttonYes, buttonNo, TQString::null );
}
-void SlaveInterface::messageBox( int type, const QString &text, const QString &_caption,
- const QString &buttonYes, const QString &buttonNo, const QString &dontAskAgainName )
+void SlaveInterface::messageBox( int type, const TQString &text, const TQString &_caption,
+ const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName )
{
kdDebug(7007) << "messageBox " << type << " " << text << " - " << _caption << " " << dontAskAgainName << endl;
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
- QString caption( _caption );
+ TQString caption( _caption );
if ( type == KIO::SlaveBase::SSLMessageBox )
- caption = QString::fromUtf8(kapp->dcopClient()->appId()); // hack, see observer.cpp
+ caption = TQString::fromUtf8(kapp->dcopClient()->appId()); // hack, see observer.cpp
emit needProgressId();
kdDebug(7007) << "SlaveInterface::messageBox m_progressId=" << m_progressId << endl;
- QGuardedPtr<SlaveInterface> me = this;
+ TQGuardedPtr<SlaveInterface> me = this;
m_pConnection->suspend();
int result = Observer::/*self()->*/messageBox( m_progressId, type, text, caption, buttonYes, buttonNo, dontAskAgainName );
if ( me && m_pConnection ) // Don't do anything if deleted meanwhile
diff --git a/kio/kio/slaveinterface.h b/kio/kio/slaveinterface.h
index 46483d9a1..5cca5dd77 100644
--- a/kio/kio/slaveinterface.h
+++ b/kio/kio/slaveinterface.h
@@ -23,7 +23,7 @@
#include <unistd.h>
#include <sys/types.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
#include <kio/global.h>
@@ -116,12 +116,12 @@ signals:
// Messages sent by the slave
///////////
- void data( const QByteArray & );
+ void data( const TQByteArray & );
void dataReq( );
- void error( int , const QString & );
+ void error( int , const TQString & );
void connected();
void finished();
- void slaveStatus(pid_t, const QCString &, const QString &, bool);
+ void slaveStatus(pid_t, const TQCString &, const TQString &, bool);
void listEntries( const KIO::UDSEntryList& );
void statEntry( const KIO::UDSEntry& );
void needSubURLData();
@@ -139,20 +139,20 @@ signals:
void speed( unsigned long ) ;
void errorPage() ;
- void mimeType( const QString & ) ;
- void warning( const QString & ) ;
- void infoMessage( const QString & ) ;
+ void mimeType( const TQString & ) ;
+ void warning( const TQString & ) ;
+ void infoMessage( const TQString & ) ;
void connectFinished();
/**
* @deprecated. Obsolete as of 3.1. Replaced by kpassword, a kded module.
*/
- void authorizationKey( const QCString&, const QCString&, bool );
+ void authorizationKey( const TQCString&, const TQCString&, bool );
/**
* @deprecated. Obsolete as of 3.1. Replaced by kpassword, a kded module.
*/
- void delAuthorization( const QCString& grpkey );
+ void delAuthorization( const TQCString& grpkey );
protected:
/////////////////
@@ -160,7 +160,7 @@ protected:
////////////////
virtual bool dispatch();
- virtual bool dispatch( int _cmd, const QByteArray &data );
+ virtual bool dispatch( int _cmd, const TQByteArray &data );
/**
* Prompt the user for authrization info (login & password).
@@ -206,27 +206,27 @@ protected:
/**
* @deprecated. Use openPassDlg( AuthInfo& ) instead.
*/
- void openPassDlg( const QString& prompt, const QString& user,
- const QString& caption, const QString& comment,
- const QString& label, bool readOnly ) KDE_DEPRECATED;
+ void openPassDlg( const TQString& prompt, const TQString& user,
+ const TQString& caption, const TQString& comment,
+ const TQString& label, bool readOnly ) KDE_DEPRECATED;
/**
* @deprecated. Use openPassDlg( AuthInfo& ) instead.
*/
- void openPassDlg( const QString& prompt, const QString& user, bool readOnly ) KDE_DEPRECATED;
+ void openPassDlg( const TQString& prompt, const TQString& user, bool readOnly ) KDE_DEPRECATED;
- void messageBox( int type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo );
+ void messageBox( int type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo );
/**
* @since 3.3
*/
- void messageBox( int type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo, const QString &dontAskAgainName );
+ void messageBox( int type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo, const TQString &dontAskAgainName );
// I need to identify the slaves
- void requestNetwork( const QString &, const QString &);
- void dropNetwork( const QString &, const QString &);
+ void requestNetwork( const TQString &, const TQString &);
+ void dropNetwork( const TQString &, const TQString &);
/**
* @internal
@@ -250,7 +250,7 @@ private:
}
-inline QDataStream &operator >>(QDataStream &s, KIO::UDSAtom &a )
+inline TQDataStream &operator >>(TQDataStream &s, KIO::UDSAtom &a )
{
Q_INT32 l;
s >> a.m_uds;
@@ -258,7 +258,7 @@ inline QDataStream &operator >>(QDataStream &s, KIO::UDSAtom &a )
if ( a.m_uds & KIO::UDS_LONG ) {
s >> l;
a.m_long = l;
- a.m_str = QString::null;
+ a.m_str = TQString::null;
} else if ( a.m_uds & KIO::UDS_STRING ) {
s >> a.m_str;
a.m_long = 0;
@@ -268,7 +268,7 @@ inline QDataStream &operator >>(QDataStream &s, KIO::UDSAtom &a )
return s;
}
-inline QDataStream &operator <<(QDataStream &s, const KIO::UDSAtom &a )
+inline TQDataStream &operator <<(TQDataStream &s, const KIO::UDSAtom &a )
{
s << a.m_uds;
@@ -282,7 +282,7 @@ inline QDataStream &operator <<(QDataStream &s, const KIO::UDSAtom &a )
return s;
}
-KIO_EXPORT QDataStream &operator <<(QDataStream &s, const KIO::UDSEntry &e );
-KIO_EXPORT QDataStream &operator >>(QDataStream &s, KIO::UDSEntry &e );
+KIO_EXPORT TQDataStream &operator <<(TQDataStream &s, const KIO::UDSEntry &e );
+KIO_EXPORT TQDataStream &operator >>(TQDataStream &s, KIO::UDSEntry &e );
#endif
diff --git a/kio/kio/statusbarprogress.cpp b/kio/kio/statusbarprogress.cpp
index f71ca9630..910155799 100644
--- a/kio/kio/statusbarprogress.cpp
+++ b/kio/kio/statusbarprogress.cpp
@@ -16,11 +16,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <klocale.h>
@@ -32,7 +32,7 @@
namespace KIO {
-StatusbarProgress::StatusbarProgress( QWidget* parent, bool button )
+StatusbarProgress::StatusbarProgress( TQWidget* parent, bool button )
: ProgressBase( parent ) {
m_bShowButton = button;
@@ -43,23 +43,23 @@ StatusbarProgress::StatusbarProgress( QWidget* parent, bool button )
setStopOnClose(false);
int w = fontMetrics().width( " 999.9 kB/s 00:00:01 " ) + 8;
- box = new QHBoxLayout( this, 0, 0 );
+ box = new TQHBoxLayout( this, 0, 0 );
- m_pButton = new QPushButton( "X", this );
+ m_pButton = new TQPushButton( "X", this );
box->addWidget( m_pButton );
- stack = new QWidgetStack( this );
+ stack = new TQWidgetStack( this );
box->addWidget( stack );
- connect( m_pButton, SIGNAL( clicked() ), this, SLOT( slotStop() ) );
+ connect( m_pButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotStop() ) );
m_pProgressBar = new KProgress( this );
- m_pProgressBar->setFrameStyle( QFrame::Box | QFrame::Raised );
+ m_pProgressBar->setFrameStyle( TQFrame::Box | TQFrame::Raised );
m_pProgressBar->setLineWidth( 1 );
- m_pProgressBar->setBackgroundMode( QWidget::PaletteBackground );
+ m_pProgressBar->setBackgroundMode( TQWidget::PaletteBackground );
m_pProgressBar->installEventFilter( this );
m_pProgressBar->setMinimumWidth( w );
stack->addWidget( m_pProgressBar, 1 );
- m_pLabel = new QLabel( "", this );
+ m_pLabel = new TQLabel( "", this );
m_pLabel->setAlignment( AlignHCenter | AlignVCenter );
m_pLabel->installEventFilter( this );
m_pLabel->setMinimumWidth( w );
@@ -136,13 +136,13 @@ void StatusbarProgress::slotSpeed( KIO::Job*, unsigned long speed ) {
}
-bool StatusbarProgress::eventFilter( QObject *, QEvent *ev ) {
+bool StatusbarProgress::eventFilter( TQObject *, TQEvent *ev ) {
if ( ! m_pJob ) { // don't react when there isn't any job doing IO
return true;
}
- if ( ev->type() == QEvent::MouseButtonPress ) {
- QMouseEvent *e = (QMouseEvent*)ev;
+ if ( ev->type() == TQEvent::MouseButtonPress ) {
+ TQMouseEvent *e = (TQMouseEvent*)ev;
if ( e->button() == LeftButton ) { // toggle view on left mouse button
if ( mode == Label ) {
diff --git a/kio/kio/statusbarprogress.h b/kio/kio/statusbarprogress.h
index a8a0678ce..1cb4caf04 100644
--- a/kio/kio/statusbarprogress.h
+++ b/kio/kio/statusbarprogress.h
@@ -69,7 +69,7 @@ public:
* @param button true to add an abort button. The button will be
* connected to ProgressBase::slotStop()
*/
- StatusbarProgress( QWidget* parent, bool button = true );
+ StatusbarProgress( TQWidget* parent, bool button = true );
~StatusbarProgress() {}
/**
@@ -86,8 +86,8 @@ public slots:
protected:
KProgress* m_pProgressBar;
- QLabel* m_pLabel;
- QPushButton* m_pButton;
+ TQLabel* m_pLabel;
+ TQPushButton* m_pButton;
KIO::filesize_t m_iTotalSize;
@@ -98,9 +98,9 @@ protected:
void setMode();
- virtual bool eventFilter( QObject *, QEvent * );
- QBoxLayout *box;
- QWidgetStack *stack;
+ virtual bool eventFilter( TQObject *, TQEvent * );
+ TQBoxLayout *box;
+ TQWidgetStack *stack;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kio/kio/tcpslavebase.cpp b/kio/kio/tcpslavebase.cpp
index db85483f3..78093577d 100644
--- a/kio/kio/tcpslavebase.cpp
+++ b/kio/kio/tcpslavebase.cpp
@@ -50,8 +50,8 @@
#include <klocale.h>
#include <dcopclient.h>
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <kapplication.h>
@@ -72,9 +72,9 @@ public:
KSSL *kssl;
bool usingTLS;
KSSLCertificateCache *cc;
- QString host;
- QString realHost;
- QString ip;
+ TQString host;
+ TQString realHost;
+ TQString ip;
DCOPClient *dcc;
KSSLPKCS12 *pkcs;
@@ -92,9 +92,9 @@ public:
TCPSlaveBase::TCPSlaveBase(unsigned short int defaultPort,
- const QCString &protocol,
- const QCString &poolSocket,
- const QCString &appSocket)
+ const TQCString &protocol,
+ const TQCString &poolSocket,
+ const TQCString &appSocket)
:SlaveBase (protocol, poolSocket, appSocket),
m_iSock(-1),
m_iDefaultPort(defaultPort),
@@ -108,9 +108,9 @@ TCPSlaveBase::TCPSlaveBase(unsigned short int defaultPort,
}
TCPSlaveBase::TCPSlaveBase(unsigned short int defaultPort,
- const QCString &protocol,
- const QCString &poolSocket,
- const QCString &appSocket,
+ const TQCString &protocol,
+ const TQCString &poolSocket,
+ const TQCString &appSocket,
bool useSSL)
:SlaveBase (protocol, poolSocket, appSocket),
m_iSock(-1),
@@ -299,7 +299,7 @@ unsigned short int TCPSlaveBase::port(unsigned short int _p)
// a port, and if so use it, otherwise we check to see if there
// is a port specified in /etc/services, and if so use that
// otherwise as a last resort use the supplied default port.
-bool TCPSlaveBase::connectToHost( const QString &host,
+bool TCPSlaveBase::connectToHost( const TQString &host,
unsigned int _port,
bool sendError )
{
@@ -323,7 +323,7 @@ bool TCPSlaveBase::connectToHost( const QString &host,
"observe your data in transit."),
WarningContinueCancel,
i18n("Security Information"),
- i18n("C&ontinue Loading"), QString::null,
+ i18n("C&ontinue Loading"), TQString::null,
"WarnOnLeaveSSLMode" );
// Move this setting into KSSL instead
@@ -533,7 +533,7 @@ bool TCPSlaveBase::canUseTLS()
void TCPSlaveBase::certificatePrompt()
{
-QString certname; // the cert to use this session
+TQString certname; // the cert to use this session
bool send = false, prompt = false, save = false, forcePrompt = false;
KSSLCertificateHome::KSSLAuthAction aa;
@@ -559,7 +559,7 @@ KSSLCertificateHome::KSSLAuthAction aa;
break;
case KSSLCertificateHome::AuthDont:
send = false; prompt = false;
- certname = QString::null;
+ certname = TQString::null;
break;
case KSSLCertificateHome::AuthPrompt:
send = false; prompt = true;
@@ -569,7 +569,7 @@ KSSLCertificateHome::KSSLAuthAction aa;
}
}
- QString ourHost;
+ TQString ourHost;
if (!d->realHost.isEmpty()) {
ourHost = d->realHost;
} else {
@@ -577,7 +577,7 @@ KSSLCertificateHome::KSSLAuthAction aa;
}
// Look for a certificate on a per-host basis as an override
- QString tmpcn = KSSLCertificateHome::getDefaultCertificateName(ourHost, &aa);
+ TQString tmpcn = KSSLCertificateHome::getDefaultCertificateName(ourHost, &aa);
if (aa != KSSLCertificateHome::AuthNone) { // we must override
switch (aa) {
case KSSLCertificateHome::AuthSend:
@@ -588,7 +588,7 @@ KSSLCertificateHome::KSSLAuthAction aa;
case KSSLCertificateHome::AuthDont:
send = false;
prompt = false;
- certname = QString::null;
+ certname = TQString::null;
break;
case KSSLCertificateHome::AuthPrompt:
send = false;
@@ -614,9 +614,9 @@ KSSLCertificateHome::KSSLAuthAction aa;
// Ok, we're supposed to prompt the user....
if (prompt || forcePrompt) {
- QStringList certs = KSSLCertificateHome::getCertificateList();
+ TQStringList certs = KSSLCertificateHome::getCertificateList();
- for (QStringList::Iterator it = certs.begin(); it != certs.end(); ++it) {
+ for (TQStringList::Iterator it = certs.begin(); it != certs.end(); ++it) {
KSSLPKCS12 *pkcs = KSSLCertificateHome::getCertificateByName(*it);
if (pkcs && (!pkcs->getCertificate() ||
!pkcs->getCertificate()->x509V3Extensions().certTypeSSLClient())) {
@@ -632,22 +632,22 @@ KSSLCertificateHome::KSSLAuthAction aa;
d->dcc->attach();
if (!d->dcc->isApplicationRegistered("kio_uiserver")) {
KApplication::startServiceByDesktopPath("kio_uiserver.desktop",
- QStringList() );
+ TQStringList() );
}
}
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << ourHost;
arg << certs;
arg << metaData("window-id").toInt();
bool rc = d->dcc->call("kio_uiserver", "UIServer",
- "showSSLCertDialog(QString, QStringList,int)",
+ "showSSLCertDialog(TQString, TQStringList,int)",
data, rettype, retval);
if (rc && rettype == "KSSLCertDlgRet") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
KSSLCertDlgRet drc;
retStream >> drc;
if (drc.ok) {
@@ -687,7 +687,7 @@ KSSLCertificateHome::KSSLAuthAction aa;
else
showprompt = true;
if (showprompt) {
- if (!openPassDlg(ai, first ? QString::null :
+ if (!openPassDlg(ai, first ? TQString::null :
i18n("Unable to open the certificate. Try a new password?")))
break;
}
@@ -741,13 +741,13 @@ int TCPSlaveBase::verifyCertificate()
bool _IPmatchesCN = false;
int result;
bool doAddHost = false;
- QString ourHost;
+ TQString ourHost;
if (!d->realHost.isEmpty())
ourHost = d->realHost;
else ourHost = d->host;
- QString theurl = QString(m_sServiceName)+"://"+ourHost+":"+QString::number(m_iPort);
+ TQString theurl = TQString(m_sServiceName)+"://"+ourHost+":"+TQString::number(m_iPort);
if (!hasMetaData("ssl_militant") || metaData("ssl_militant") == "FALSE")
d->militantSSL = false;
@@ -765,7 +765,7 @@ int TCPSlaveBase::verifyCertificate()
#ifndef Q_WS_WIN //temporary
KNetwork::KResolverResults res = KNetwork::KResolver::resolve(d->kssl->peerInfo().peerHost(), "80", KNetwork::KResolver::CanonName);
if (!res.isEmpty()) {
- QString old = d->kssl->peerInfo().peerHost();
+ TQString old = d->kssl->peerInfo().peerHost();
d->kssl->peerInfo().setPeerHost(res[0].canonicalName());
_IPmatchesCN = d->kssl->peerInfo().certMatchesAddress();
if (!_IPmatchesCN) {
@@ -795,26 +795,26 @@ int TCPSlaveBase::verifyCertificate()
setMetaData("ssl_cipher_version",
d->kssl->connectionInfo().getCipherVersion());
setMetaData("ssl_cipher_used_bits",
- QString::number(d->kssl->connectionInfo().getCipherUsedBits()));
+ TQString::number(d->kssl->connectionInfo().getCipherUsedBits()));
setMetaData("ssl_cipher_bits",
- QString::number(d->kssl->connectionInfo().getCipherBits()));
+ TQString::number(d->kssl->connectionInfo().getCipherBits()));
setMetaData("ssl_peer_ip", d->ip);
if (!d->realHost.isEmpty()) {
setMetaData("ssl_proxied", "true");
}
- 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);
setMetaData("ssl_peer_certificate", pc.toString());
if (pc.chain().isValid() && pc.chain().depth() > 1) {
- QString theChain;
- QPtrList<KSSLCertificate> chain = pc.chain().getChain();
+ TQString theChain;
+ TQPtrList<KSSLCertificate> chain = pc.chain().getChain();
chain.setAutoDelete(true);
for (KSSLCertificate *c = chain.first(); c; c = chain.next()) {
theChain += c->toString();
@@ -823,7 +823,7 @@ int TCPSlaveBase::verifyCertificate()
setMetaData("ssl_peer_chain", theChain);
} else setMetaData("ssl_peer_chain", "");
- setMetaData("ssl_cert_state", QString::number(ksv));
+ setMetaData("ssl_cert_state", TQString::number(ksv));
if (ksv == KSSLCertificate::Ok) {
rc = 1;
@@ -872,7 +872,7 @@ int TCPSlaveBase::verifyCertificate()
{
do {
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( WarningYesNoCancel,
@@ -881,7 +881,7 @@ int TCPSlaveBase::verifyCertificate()
i18n("&Details"),
i18n("Co&ntinue") );
} else {
- QString msg = i18n("The server certificate failed the "
+ TQString msg = i18n("The server certificate failed the "
"authenticity test (%1).");
result = messageBox( WarningYesNoCancel,
msg.arg(ourHost),
@@ -896,17 +896,17 @@ int TCPSlaveBase::verifyCertificate()
d->dcc->attach();
if (!d->dcc->isApplicationRegistered("kio_uiserver")) {
KApplication::startServiceByDesktopPath("kio_uiserver.desktop",
- QStringList() );
+ TQStringList() );
}
}
- QByteArray data, ignore;
- QCString ignoretype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, ignore;
+ TQCString ignoretype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << theurl << mOutgoingMetaData;
arg << metaData("window-id").toInt();
d->dcc->call("kio_uiserver", "UIServer",
- "showSSLInfoDialog(QString,KIO::MetaData,int)",
+ "showSSLInfoDialog(TQString,KIO::MetaData,int)",
data, ignoretype, ignore);
}
} while (result == KMessageBox::Yes);
@@ -1011,7 +1011,7 @@ int TCPSlaveBase::verifyCertificate()
setMetaData("ssl_action", "reject");
} else {
do {
- QString msg = i18n("The server certificate failed the "
+ TQString msg = i18n("The server certificate failed the "
"authenticity test (%1).");
result = messageBox(WarningYesNoCancel,
msg.arg(ourHost),
@@ -1024,16 +1024,16 @@ int TCPSlaveBase::verifyCertificate()
d->dcc->attach();
if (!d->dcc->isApplicationRegistered("kio_uiserver")) {
KApplication::startServiceByDesktopPath("kio_uiserver.desktop",
- QStringList() );
+ TQStringList() );
}
}
- QByteArray data, ignore;
- QCString ignoretype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, ignore;
+ TQCString ignoretype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << theurl << mOutgoingMetaData;
arg << metaData("window-id").toInt();
d->dcc->call("kio_uiserver", "UIServer",
- "showSSLInfoDialog(QString,KIO::MetaData,int)",
+ "showSSLInfoDialog(TQString,KIO::MetaData,int)",
data, ignoretype, ignore);
}
} while (result == KMessageBox::Yes);
@@ -1108,16 +1108,16 @@ int TCPSlaveBase::verifyCertificate()
d->dcc->attach();
if (!d->dcc->isApplicationRegistered("kio_uiserver")) {
KApplication::startServiceByDesktopPath("kio_uiserver.desktop",
- QStringList() );
+ TQStringList() );
}
}
- QByteArray data, ignore;
- QCString ignoretype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, ignore;
+ TQCString ignoretype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << theurl << mOutgoingMetaData;
arg << metaData("window-id").toInt();
d->dcc->call("kio_uiserver", "UIServer",
- "showSSLInfoDialog(QString,KIO::MetaData,int)",
+ "showSSLInfoDialog(TQString,KIO::MetaData,int)",
data, ignoretype, ignore);
}
} while (result != KMessageBox::No);
@@ -1274,7 +1274,7 @@ void TCPSlaveBase::setEnableSSLTunnel( bool enable )
d->useSSLTunneling = enable;
}
-void TCPSlaveBase::setRealHost( const QString& realHost )
+void TCPSlaveBase::setRealHost( const TQString& realHost )
{
d->realHost = realHost;
}
@@ -1282,7 +1282,7 @@ void TCPSlaveBase::setRealHost( const QString& realHost )
bool TCPSlaveBase::doSSLHandShake( bool sendError )
{
kdDebug(7029) << "TCPSlaveBase::doSSLHandShake: " << endl;
- QString msgHost = d->host;
+ TQString msgHost = d->host;
d->kssl->reInitialize();
diff --git a/kio/kio/tcpslavebase.h b/kio/kio/tcpslavebase.h
index 21b391dac..bbf2bb95f 100644
--- a/kio/kio/tcpslavebase.h
+++ b/kio/kio/tcpslavebase.h
@@ -45,11 +45,11 @@ namespace KIO {
class KIO_EXPORT TCPSlaveBase : public SlaveBase
{
public:
- TCPSlaveBase(unsigned short int defaultPort, const QCString &protocol,
- const QCString &poolSocket, const QCString &appSocket);
+ TCPSlaveBase(unsigned short int defaultPort, const TQCString &protocol,
+ const TQCString &poolSocket, const TQCString &appSocket);
- TCPSlaveBase(unsigned short int defaultPort, const QCString &protocol,
- const QCString &poolSocket, const QCString &appSocket,
+ TCPSlaveBase(unsigned short int defaultPort, const TQCString &protocol,
+ const TQCString &poolSocket, const TQCString &appSocket,
bool useSSL);
virtual ~TCPSlaveBase();
@@ -80,7 +80,7 @@ protected:
/**
* @deprecated Due to inconsistency with KDE naming convention.
*/
- KDE_DEPRECATED bool ConnectToHost( const QString &host, unsigned int port,
+ KDE_DEPRECATED bool ConnectToHost( const TQString &host, unsigned int port,
bool sendError ) { return connectToHost( host, port, sendError ); }
/**
@@ -170,7 +170,7 @@ protected:
* on failure, false is returned and an appropriate
* error message is send to the application.
*/
- bool connectToHost( const QString &host, unsigned int port,
+ bool connectToHost( const TQString &host, unsigned int port,
bool sendError = true );
/**
@@ -352,7 +352,7 @@ protected:
*
* @param realHost the actual host name we are connecting to
*/
- void setRealHost( const QString& realHost );
+ void setRealHost( const TQString& realHost );
// don't use me!
void doConstructorStuff();
@@ -371,7 +371,7 @@ protected:
bool m_bIsSSL;
unsigned short int m_iPort;
unsigned short int m_iDefaultPort;
- QCString m_sServiceName;
+ TQCString m_sServiceName;
FILE *fp;
private:
diff --git a/kio/kio/thumbcreator.h b/kio/kio/thumbcreator.h
index 4612a0916..f16132b3a 100644
--- a/kio/kio/thumbcreator.h
+++ b/kio/kio/thumbcreator.h
@@ -20,7 +20,7 @@
#ifndef _THUMBCREATOR_H_
#define _THUMBCREATOR_H_
-#include <qstring.h>
+#include <tqstring.h>
class QString;
class QImage;
@@ -106,7 +106,7 @@ public:
*
* @return true if preview generation succeeded
*/
- virtual bool create(const QString &path, int width, int height, QImage &img) = 0;
+ virtual bool create(const TQString &path, int width, int height, TQImage &img) = 0;
/**
* The flags of this plugin:
diff --git a/kio/kioexec/main.cpp b/kio/kioexec/main.cpp
index 12a2d64bf..e444ebd46 100644
--- a/kio/kioexec/main.cpp
+++ b/kio/kioexec/main.cpp
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <sys/stat.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -61,11 +61,11 @@ static KCmdLineOptions options[] =
int jobCounter = 0;
-QPtrList<KIO::Job>* jobList = 0L;
+TQPtrList<KIO::Job>* jobList = 0L;
KIOExec::KIOExec()
{
- jobList = new QPtrList<KIO::Job>;
+ jobList = new TQPtrList<KIO::Job>;
jobList->setAutoDelete( false ); // jobs autodelete themselves
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
@@ -74,7 +74,7 @@ KIOExec::KIOExec()
tempfiles = args->isSet("tempfiles");
if ( args->isSet( "suggestedfilename" ) )
- suggestedFileName = QString::fromLocal8Bit( args->getOption( "suggestedfilename" ) );
+ suggestedFileName = TQString::fromLocal8Bit( args->getOption( "suggestedfilename" ) );
expectedCounter = 0;
command = args->arg(0);
kdDebug() << "command=" << command << endl;
@@ -105,14 +105,14 @@ KIOExec::KIOExec()
else
// We must fetch the file
{
- QString fileName = KIO::encodeFileName( url.fileName() );
+ TQString fileName = KIO::encodeFileName( url.fileName() );
if ( !suggestedFileName.isEmpty() )
fileName = suggestedFileName;
// Build the destination filename, in ~/.kde/cache-*/krun/
// Unlike KDE-1.1, we put the filename at the end so that the extension is kept
// (Some programs rely on it)
- QString tmp = KGlobal::dirs()->saveLocation( "cache", "krun/" ) +
- QString("%1.%2.%3").arg(getpid()).arg(jobCounter++).arg(fileName);
+ TQString tmp = KGlobal::dirs()->saveLocation( "cache", "krun/" ) +
+ TQString("%1.%2.%3").arg(getpid()).arg(jobCounter++).arg(fileName);
fileInfo file;
file.path = tmp;
file.url = url;
@@ -125,7 +125,7 @@ KIOExec::KIOExec()
KIO::Job *job = KIO::file_copy( url, dest );
jobList->append( job );
- connect( job, SIGNAL( result( KIO::Job * ) ), SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), TQT_SLOT( slotResult( KIO::Job * ) ) );
}
}
}
@@ -133,7 +133,7 @@ KIOExec::KIOExec()
if ( tempfiles ) {
// #113991
- QTimer::singleShot( 0, this, SLOT( slotRunApp() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotRunApp() ) );
//slotRunApp(); // does not return
return;
}
@@ -152,9 +152,9 @@ void KIOExec::slotResult( KIO::Job * job )
if ( (job->error() != KIO::ERR_USER_CANCELED) )
KMessageBox::error( 0L, job->errorString() );
- QString path = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
+ TQString path = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
- QValueList<fileInfo>::Iterator it = fileList.begin();
+ TQValueList<fileInfo>::Iterator it = fileList.begin();
for(;it != fileList.end(); ++it)
{
if ((*it).path == path)
@@ -174,7 +174,7 @@ void KIOExec::slotResult( KIO::Job * job )
kdDebug() << "All files downloaded, will call slotRunApp shortly" << endl;
// We know we can run the app now - but let's finish the job properly first.
- QTimer::singleShot( 0, this, SLOT( slotRunApp() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotRunApp() ) );
jobList->clear();
}
@@ -186,21 +186,21 @@ void KIOExec::slotRunApp()
exit(1);
}
- KService service("dummy", command, QString::null);
+ KService service("dummy", command, TQString::null);
KURL::List list;
// Store modification times
- QValueList<fileInfo>::Iterator it = fileList.begin();
+ TQValueList<fileInfo>::Iterator it = fileList.begin();
for ( ; it != fileList.end() ; ++it )
{
KDE_struct_stat buff;
- (*it).time = KDE_stat( QFile::encodeName((*it).path), &buff ) ? 0 : buff.st_mtime;
+ (*it).time = KDE_stat( TQFile::encodeName((*it).path), &buff ) ? 0 : buff.st_mtime;
KURL url;
url.setPath((*it).path);
list << url;
}
- QStringList params = KRun::processDesktopExec(service, list, false /*no shell*/);
+ TQStringList params = KRun::processDesktopExec(service, list, false /*no shell*/);
kdDebug() << "EXEC " << KShell::joinArgs( params ) << endl;
@@ -226,9 +226,9 @@ void KIOExec::slotRunApp()
for( ;it != fileList.end(); ++it )
{
KDE_struct_stat buff;
- QString src = (*it).path;
+ TQString src = (*it).path;
KURL dest = (*it).url;
- if ( (KDE_stat( QFile::encodeName(src), &buff ) == 0) &&
+ if ( (KDE_stat( TQFile::encodeName(src), &buff ) == 0) &&
((*it).time != buff.st_mtime) )
{
if ( tempfiles )
@@ -244,7 +244,7 @@ void KIOExec::slotRunApp()
i18n( "The file\n%1\nhas been modified.\nDo you want to upload the changes?" ).arg(dest.prettyURL()),
i18n( "File Changed" ), i18n("Upload"), i18n("Do Not Upload") ) == KMessageBox::Yes )
{
- kdDebug() << QString("src='%1' dest='%2'").arg(src).arg(dest.url()).ascii() << endl;
+ kdDebug() << TQString("src='%1' dest='%2'").arg(src).arg(dest.url()).ascii() << endl;
// Do it the synchronous way.
if ( !KIO::NetAccess::upload( src, dest, 0 ) )
{
@@ -261,7 +261,7 @@ void KIOExec::slotRunApp()
kdDebug() << "sleeping..." << endl;
sleep(180); // 3 mn
kdDebug() << "about to delete " << src << endl;
- unlink( QFile::encodeName(src) );
+ unlink( TQFile::encodeName(src) );
}
}
diff --git a/kio/kioexec/main.h b/kio/kioexec/main.h
index 8fb98130f..59f1cdac2 100644
--- a/kio/kioexec/main.h
+++ b/kio/kioexec/main.h
@@ -1,10 +1,10 @@
#ifndef _main_h
#define _main_h
-#include <qobject.h>
-#include <qstring.h>
-#include <qstrlist.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstrlist.h>
+#include <tqtimer.h>
namespace KIO { class Job; }
@@ -20,16 +20,16 @@ public slots:
protected:
bool tempfiles;
- QString suggestedFileName;
+ TQString suggestedFileName;
int counter;
int expectedCounter;
- QString command;
+ TQString command;
struct fileInfo {
- QString path;
+ TQString path;
KURL url;
int time;
};
- QValueList<fileInfo> fileList;
+ TQValueList<fileInfo> fileList;
};
#endif
diff --git a/kio/kpasswdserver/kpasswdserver.cpp b/kio/kpasswdserver/kpasswdserver.cpp
index c1ca8751f..de4e0d147 100644
--- a/kio/kpasswdserver/kpasswdserver.cpp
+++ b/kio/kpasswdserver/kpasswdserver.cpp
@@ -27,7 +27,7 @@
#include <time.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <klocale.h>
@@ -43,14 +43,14 @@
#endif
extern "C" {
- KDE_EXPORT KDEDModule *create_kpasswdserver(const QCString &name)
+ KDE_EXPORT KDEDModule *create_kpasswdserver(const TQCString &name)
{
return new KPasswdServer(name);
}
}
int
-KPasswdServer::AuthInfoList::compareItems(QPtrCollection::Item n1, QPtrCollection::Item n2)
+KPasswdServer::AuthInfoList::compareItems(TQPtrCollection::Item n1, TQPtrCollection::Item n2)
{
if (!n1 || !n2)
return 0;
@@ -69,15 +69,15 @@ KPasswdServer::AuthInfoList::compareItems(QPtrCollection::Item n1, QPtrCollectio
}
-KPasswdServer::KPasswdServer(const QCString &name)
+KPasswdServer::KPasswdServer(const TQCString &name)
: KDEDModule(name)
{
m_authDict.setAutoDelete(true);
m_authPending.setAutoDelete(true);
m_seqNr = 0;
m_wallet = 0;
- connect(this, SIGNAL(windowUnregistered(long)),
- this, SLOT(removeAuthForWindowId(long)));
+ connect(this, TQT_SIGNAL(windowUnregistered(long)),
+ this, TQT_SLOT(removeAuthForWindowId(long)));
}
KPasswdServer::~KPasswdServer()
@@ -86,21 +86,21 @@ KPasswdServer::~KPasswdServer()
}
// Helper - returns the wallet key to use for read/store/checking for existence.
-static QString makeWalletKey( const QString& key, const QString& realm )
+static TQString makeWalletKey( const TQString& key, const TQString& realm )
{
return realm.isEmpty() ? key : key + '-' + realm;
}
// Helper for storeInWallet/readFromWallet
-static QString makeMapKey( const char* key, int entryNumber )
+static TQString makeMapKey( const char* key, int entryNumber )
{
- QString str = QString::fromLatin1( key );
+ TQString str = TQString::fromLatin1( key );
if ( entryNumber > 1 )
- str += "-" + QString::number( entryNumber );
+ str += "-" + TQString::number( entryNumber );
return str;
}
-static bool storeInWallet( KWallet::Wallet* wallet, const QString& key, const KIO::AuthInfo &info )
+static bool storeInWallet( KWallet::Wallet* wallet, const TQString& key, const KIO::AuthInfo &info )
{
if ( !wallet->hasFolder( KWallet::Wallet::PasswordFolder() ) )
if ( !wallet->createFolder( KWallet::Wallet::PasswordFolder() ) )
@@ -108,10 +108,10 @@ static bool storeInWallet( KWallet::Wallet* wallet, const QString& key, const KI
wallet->setFolder( KWallet::Wallet::PasswordFolder() );
// Before saving, check if there's already an entry with this login.
// If so, replace it (with the new password). Otherwise, add a new entry.
- typedef QMap<QString,QString> Map;
+ typedef TQMap<TQString,TQString> Map;
int entryNumber = 1;
Map map;
- QString walletKey = makeWalletKey( key, info.realmValue );
+ TQString walletKey = makeWalletKey( key, info.realmValue );
kdDebug(130) << "storeInWallet: walletKey=" << walletKey << " reading existing map" << endl;
if ( wallet->readMap( walletKey, map ) == 0 ) {
Map::ConstIterator end = map.end();
@@ -120,12 +120,12 @@ static bool storeInWallet( KWallet::Wallet* wallet, const QString& key, const KI
if ( it.data() == info.username ) {
break; // OK, overwrite this entry
}
- it = map.find( QString( "login-" ) + QString::number( ++entryNumber ) );
+ it = map.find( TQString( "login-" ) + TQString::number( ++entryNumber ) );
}
// If no entry was found, create a new entry - entryNumber is set already.
}
- const QString loginKey = makeMapKey( "login", entryNumber );
- const QString passwordKey = makeMapKey( "password", entryNumber );
+ const TQString loginKey = makeMapKey( "login", entryNumber );
+ const TQString passwordKey = makeMapKey( "password", entryNumber );
kdDebug(130) << "storeInWallet: writing to " << loginKey << "," << passwordKey << endl;
// note the overwrite=true by default
map.insert( loginKey, info.username );
@@ -135,17 +135,17 @@ static bool storeInWallet( KWallet::Wallet* wallet, const QString& key, const KI
}
-static bool readFromWallet( KWallet::Wallet* wallet, const QString& key, const QString& realm, QString& username, QString& password, bool userReadOnly, QMap<QString,QString>& knownLogins )
+static bool readFromWallet( KWallet::Wallet* wallet, const TQString& key, const TQString& realm, TQString& username, TQString& password, bool userReadOnly, TQMap<TQString,TQString>& knownLogins )
{
//kdDebug(130) << "readFromWallet: key=" << key << " username=" << username << " password=" /*<< password*/ << " userReadOnly=" << userReadOnly << " realm=" << realm << endl;
if ( wallet->hasFolder( KWallet::Wallet::PasswordFolder() ) )
{
wallet->setFolder( KWallet::Wallet::PasswordFolder() );
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
if ( wallet->readMap( makeWalletKey( key, realm ), map ) == 0 )
{
- typedef QMap<QString,QString> Map;
+ typedef TQMap<TQString,TQString> Map;
int entryNumber = 1;
Map::ConstIterator end = map.end();
Map::ConstIterator it = map.find( "login" );
@@ -158,7 +158,7 @@ static bool readFromWallet( KWallet::Wallet* wallet, const QString& key, const Q
knownLogins.insert( it.data(), pwdIter.data() );
}
- it = map.find( QString( "login-" ) + QString::number( ++entryNumber ) );
+ it = map.find( TQString( "login-" ) + TQString::number( ++entryNumber ) );
}
//kdDebug(130) << knownLogins.count() << " known logins" << endl;
@@ -189,10 +189,10 @@ KPasswdServer::checkAuthInfo(KIO::AuthInfo info, long windowId, unsigned long us
if( usertime != 0 )
kapp->updateUserTimestamp( usertime );
- QString key = createCacheKey(info);
+ TQString key = createCacheKey(info);
Request *request = m_authPending.first();
- QString path2 = info.url.directory(false, false);
+ TQString path2 = info.url.directory(false, false);
for(; request; request = m_authPending.next())
{
if (request->key != key)
@@ -200,7 +200,7 @@ KPasswdServer::checkAuthInfo(KIO::AuthInfo info, long windowId, unsigned long us
if (info.verifyPath)
{
- QString path1 = request->info.url.directory(false, false);
+ TQString path1 = request->info.url.directory(false, false);
if (!path2.startsWith(path1))
continue;
}
@@ -222,7 +222,7 @@ KPasswdServer::checkAuthInfo(KIO::AuthInfo info, long windowId, unsigned long us
!KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(),
KWallet::Wallet::PasswordFolder(), makeWalletKey(key, info.realmValue)))
{
- QMap<QString, QString> knownLogins;
+ TQMap<TQString, TQString> knownLogins;
if (openWallet(windowId)) {
if (readFromWallet(m_wallet, key, info.realmValue, info.username, info.password,
info.readOnly, knownLogins))
@@ -243,13 +243,13 @@ KPasswdServer::checkAuthInfo(KIO::AuthInfo info, long windowId, unsigned long us
}
KIO::AuthInfo
-KPasswdServer::queryAuthInfo(KIO::AuthInfo info, QString errorMsg, long windowId, long seqNr)
+KPasswdServer::queryAuthInfo(KIO::AuthInfo info, TQString errorMsg, long windowId, long seqNr)
{
return queryAuthInfo(info, errorMsg, windowId, seqNr, 0 );
}
KIO::AuthInfo
-KPasswdServer::queryAuthInfo(KIO::AuthInfo info, QString errorMsg, long windowId, long seqNr, unsigned long usertime)
+KPasswdServer::queryAuthInfo(KIO::AuthInfo info, TQString errorMsg, long windowId, long seqNr, unsigned long usertime)
{
kdDebug(130) << "KPasswdServer::queryAuthInfo: User= " << info.username
<< ", Message= " << info.prompt << ", WindowId = " << windowId << endl;
@@ -258,7 +258,7 @@ KPasswdServer::queryAuthInfo(KIO::AuthInfo info, QString errorMsg, long windowId
if( usertime != 0 )
kapp->updateUserTimestamp( usertime );
- QString key = createCacheKey(info);
+ TQString key = createCacheKey(info);
Request *request = new Request;
request->client = callingDcopClient();
request->transaction = request->client->beginTransaction();
@@ -268,7 +268,7 @@ KPasswdServer::queryAuthInfo(KIO::AuthInfo info, QString errorMsg, long windowId
request->seqNr = seqNr;
if (errorMsg == "<NoAuthPrompt>")
{
- request->errorMsg = QString::null;
+ request->errorMsg = TQString::null;
request->prompt = false;
}
else
@@ -279,7 +279,7 @@ KPasswdServer::queryAuthInfo(KIO::AuthInfo info, QString errorMsg, long windowId
m_authPending.append(request);
if (m_authPending.count() == 1)
- QTimer::singleShot(0, this, SLOT(processRequest()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processRequest()));
return info;
}
@@ -289,7 +289,7 @@ KPasswdServer::addAuthInfo(KIO::AuthInfo info, long windowId)
{
kdDebug(130) << "KPasswdServer::addAuthInfo: User= " << info.username
<< ", RealmValue= " << info.realmValue << ", WindowId = " << windowId << endl;
- QString key = createCacheKey(info);
+ TQString key = createCacheKey(info);
m_seqNr++;
@@ -342,7 +342,7 @@ KPasswdServer::processRequest()
if (result && !info.username.isEmpty() &&
!request->errorMsg.isEmpty())
{
- QString prompt = request->errorMsg;
+ TQString prompt = request->errorMsg;
prompt += i18n(" Do you want to retry?");
int dlgResult = KMessageBox::warningContinueCancelWId(request->windowId, prompt,
i18n("Authentication"), i18n("Retry"));
@@ -350,13 +350,13 @@ KPasswdServer::processRequest()
askPw = false;
}
- int dlgResult = QDialog::Rejected;
+ int dlgResult = TQDialog::Rejected;
if (askPw)
{
- QString username = info.username;
- QString password = info.password;
+ TQString username = info.username;
+ TQString password = info.password;
bool hasWalletData = false;
- QMap<QString, QString> knownLogins;
+ TQMap<TQString, TQString> knownLogins;
if ( ( username.isEmpty() || password.isEmpty() )
&& !KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(), KWallet::Wallet::PasswordFolder(), makeWalletKey( request->key, info.realmValue )) )
@@ -392,7 +392,7 @@ KPasswdServer::processRequest()
dlgResult = dlg.exec();
- if (dlgResult == QDialog::Accepted)
+ if (dlgResult == TQDialog::Accepted)
{
info.username = dlg.username();
info.password = dlg.password();
@@ -411,7 +411,7 @@ KPasswdServer::processRequest()
}
}
}
- if ( dlgResult != QDialog::Accepted )
+ if ( dlgResult != TQDialog::Accepted )
{
addAuthInfoItem(request->key, info, 0, m_seqNr, true);
info.setModified( false );
@@ -423,10 +423,10 @@ KPasswdServer::processRequest()
}
}
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
stream2 << info << m_seqNr;
replyType = "KIO::AuthInfo";
request->client->endTransaction( request->transaction,
@@ -439,10 +439,10 @@ KPasswdServer::processRequest()
waitRequest; )
{
bool keepQueued = false;
- QString key = waitRequest->key;
+ TQString key = waitRequest->key;
request = m_authPending.first();
- QString path2 = waitRequest->info.url.directory(false, false);
+ TQString path2 = waitRequest->info.url.directory(false, false);
for(; request; request = m_authPending.next())
{
if (request->key != key)
@@ -450,7 +450,7 @@ KPasswdServer::processRequest()
if (info.verifyPath)
{
- QString path1 = request->info.url.directory(false, false);
+ TQString path1 = request->info.url.directory(false, false);
if (!path2.startsWith(path1))
continue;
}
@@ -466,10 +466,10 @@ KPasswdServer::processRequest()
{
const AuthInfo *result = findAuthInfoItem(waitRequest->key, waitRequest->info);
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
if (!result || result->isCanceled)
{
@@ -493,20 +493,20 @@ KPasswdServer::processRequest()
}
if (m_authPending.count())
- QTimer::singleShot(0, this, SLOT(processRequest()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processRequest()));
}
-QString KPasswdServer::createCacheKey( const KIO::AuthInfo &info )
+TQString KPasswdServer::createCacheKey( const KIO::AuthInfo &info )
{
if( !info.url.isValid() ) {
// Note that a null key will break findAuthInfoItem later on...
kdWarning(130) << "createCacheKey: invalid URL " << info.url << endl;
- return QString::null;
+ return TQString::null;
}
// Generate the basic key sequence.
- QString key = info.url.protocol();
+ TQString key = info.url.protocol();
key += '-';
if (!info.url.user().isEmpty())
{
@@ -518,7 +518,7 @@ QString KPasswdServer::createCacheKey( const KIO::AuthInfo &info )
if( port )
{
key += ':';
- key += QString::number(port);
+ key += TQString::number(port);
}
return key;
@@ -539,13 +539,13 @@ KPasswdServer::copyAuthInfo(const AuthInfo *i)
}
const KPasswdServer::AuthInfo *
-KPasswdServer::findAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
+KPasswdServer::findAuthInfoItem(const TQString &key, const KIO::AuthInfo &info)
{
AuthInfoList *authList = m_authDict.find(key);
if (!authList)
return 0;
- QString path2 = info.url.directory(false, false);
+ TQString path2 = info.url.directory(false, false);
for(AuthInfo *current = authList->first();
current; )
{
@@ -559,7 +559,7 @@ KPasswdServer::findAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
if (info.verifyPath)
{
- QString path1 = current->directory;
+ TQString path1 = current->directory;
if (path2.startsWith(path1) &&
(info.username.isEmpty() || info.username == current->username))
return current;
@@ -577,7 +577,7 @@ KPasswdServer::findAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
}
void
-KPasswdServer::removeAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
+KPasswdServer::removeAuthInfoItem(const TQString &key, const KIO::AuthInfo &info)
{
AuthInfoList *authList = m_authDict.find(key);
if (!authList)
@@ -604,7 +604,7 @@ KPasswdServer::removeAuthInfoItem(const QString &key, const KIO::AuthInfo &info)
void
-KPasswdServer::addAuthInfoItem(const QString &key, const KIO::AuthInfo &info, long windowId, long seqNr, bool canceled)
+KPasswdServer::addAuthInfoItem(const TQString &key, const KIO::AuthInfo &info, long windowId, long seqNr, bool canceled)
{
AuthInfoList *authList = m_authDict.find(key);
if (!authList)
@@ -649,7 +649,7 @@ KPasswdServer::addAuthInfoItem(const QString &key, const KIO::AuthInfo &info, lo
}
void
-KPasswdServer::updateAuthExpire(const QString &key, const AuthInfo *auth, long windowId, bool keep)
+KPasswdServer::updateAuthExpire(const TQString &key, const AuthInfo *auth, long windowId, bool keep)
{
AuthInfo *current = const_cast<AuthInfo *>(auth);
if (keep)
@@ -670,7 +670,7 @@ KPasswdServer::updateAuthExpire(const QString &key, const AuthInfo *auth, long w
// Update mWindowIdList
if (windowId)
{
- QStringList *keysChanged = mWindowIdList.find(windowId);
+ TQStringList *keysChanged = mWindowIdList.find(windowId);
if (!keysChanged)
{
keysChanged = new QStringList;
@@ -684,13 +684,13 @@ KPasswdServer::updateAuthExpire(const QString &key, const AuthInfo *auth, long w
void
KPasswdServer::removeAuthForWindowId(long windowId)
{
- QStringList *keysChanged = mWindowIdList.find(windowId);
+ TQStringList *keysChanged = mWindowIdList.find(windowId);
if (!keysChanged) return;
- for(QStringList::ConstIterator it = keysChanged->begin();
+ for(TQStringList::ConstIterator it = keysChanged->begin();
it != keysChanged->end(); ++it)
{
- QString key = *it;
+ TQString key = *it;
AuthInfoList *authList = m_authDict.find(key);
if (!authList)
continue;
diff --git a/kio/kpasswdserver/kpasswdserver.h b/kio/kpasswdserver/kpasswdserver.h
index 31e8b9a2d..cf44681bf 100644
--- a/kio/kpasswdserver/kpasswdserver.h
+++ b/kio/kpasswdserver/kpasswdserver.h
@@ -25,8 +25,8 @@
#ifndef KPASSWDSERVER_H
#define KPASSWDSERVER_H
-#include <qdict.h>
-#include <qintdict.h>
+#include <tqdict.h>
+#include <tqintdict.h>
#include <dcopclient.h>
#include <kio/authinfo.h>
@@ -41,15 +41,15 @@ class KPasswdServer : public KDEDModule
Q_OBJECT
K_DCOP
public:
- KPasswdServer(const QCString &);
+ KPasswdServer(const TQCString &);
~KPasswdServer();
k_dcop:
// KDE4 merge
KIO::AuthInfo checkAuthInfo(KIO::AuthInfo, long, unsigned long);
KIO::AuthInfo checkAuthInfo(KIO::AuthInfo, long);
- KIO::AuthInfo queryAuthInfo(KIO::AuthInfo, QString, long, long, unsigned long);
- KIO::AuthInfo queryAuthInfo(KIO::AuthInfo, QString, long, long);
+ KIO::AuthInfo queryAuthInfo(KIO::AuthInfo, TQString, long, long, unsigned long);
+ KIO::AuthInfo queryAuthInfo(KIO::AuthInfo, TQString, long, long);
void addAuthInfo(KIO::AuthInfo, long);
public slots:
@@ -60,56 +60,56 @@ public slots:
protected:
struct AuthInfo;
- QString createCacheKey( const KIO::AuthInfo &info );
- const AuthInfo *findAuthInfoItem(const QString &key, const KIO::AuthInfo &info);
- void removeAuthInfoItem(const QString &key, const KIO::AuthInfo &info);
- void addAuthInfoItem(const QString &key, const KIO::AuthInfo &info, long windowId, long seqNr, bool canceled);
+ TQString createCacheKey( const KIO::AuthInfo &info );
+ const AuthInfo *findAuthInfoItem(const TQString &key, const KIO::AuthInfo &info);
+ void removeAuthInfoItem(const TQString &key, const KIO::AuthInfo &info);
+ void addAuthInfoItem(const TQString &key, const KIO::AuthInfo &info, long windowId, long seqNr, bool canceled);
KIO::AuthInfo copyAuthInfo(const AuthInfo *);
- void updateAuthExpire(const QString &key, const AuthInfo *, long windowId, bool keep);
- int findWalletEntry( const QMap<QString,QString>& map, const QString& username );
+ void updateAuthExpire(const TQString &key, const AuthInfo *, long windowId, bool keep);
+ int findWalletEntry( const TQMap<TQString,TQString>& map, const TQString& username );
bool openWallet( WId windowId );
struct AuthInfo {
AuthInfo() { expire = expNever; isCanceled = false; seqNr = 0; }
KURL url;
- QString directory;
- QString username;
- QString password;
- QString realmValue;
- QString digestInfo;
+ TQString directory;
+ TQString username;
+ TQString password;
+ TQString realmValue;
+ TQString digestInfo;
enum { expNever, expWindowClose, expTime } expire;
- QValueList<long> windowList;
+ TQValueList<long> windowList;
unsigned long expireTime;
long seqNr;
bool isCanceled;
};
- class AuthInfoList : public QPtrList<AuthInfo>
+ class AuthInfoList : public TQPtrList<AuthInfo>
{
public:
AuthInfoList() { setAutoDelete(true); }
- int compareItems(QPtrCollection::Item n1, QPtrCollection::Item n2);
+ int compareItems(TQPtrCollection::Item n1, TQPtrCollection::Item n2);
};
- QDict< AuthInfoList > m_authDict;
+ TQDict< AuthInfoList > m_authDict;
struct Request {
DCOPClient *client;
DCOPClientTransaction *transaction;
- QString key;
+ TQString key;
KIO::AuthInfo info;
- QString errorMsg;
+ TQString errorMsg;
long windowId;
long seqNr;
bool prompt;
};
- QPtrList< Request > m_authPending;
- QPtrList< Request > m_authWait;
- QIntDict<QStringList> mWindowIdList;
+ TQPtrList< Request > m_authPending;
+ TQPtrList< Request > m_authWait;
+ TQIntDict<TQStringList> mWindowIdList;
DCOPClient *m_dcopClient;
KWallet::Wallet* m_wallet;
long m_seqNr;
diff --git a/kio/kssl/kopenssl.cc b/kio/kssl/kopenssl.cc
index f336e9c55..9252bd223 100644
--- a/kio/kssl/kopenssl.cc
+++ b/kio/kssl/kopenssl.cc
@@ -27,7 +27,7 @@
#include <kdebug.h>
#include <kconfig.h>
#include <kstaticdeleter.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <stdio.h>
@@ -218,27 +218,27 @@ void KOpenSSLProxy::destroy() {
}
#ifdef __OpenBSD__
-#include <qdir.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
-static QString findMostRecentLib(QString dir, QString name)
+static TQString findMostRecentLib(TQString dir, TQString name)
{
// Grab all shared libraries in the directory
- QString filter = "lib"+name+".so.*";
- QDir d(dir, filter);
+ TQString filter = "lib"+name+".so.*";
+ TQDir d(dir, filter);
if (!d.exists())
return 0L;
- QStringList l = d.entryList();
+ TQStringList l = d.entryList();
// Find the best one
int bestmaj = -1;
int bestmin = -1;
- QString best = 0L;
+ TQString best = 0L;
// where do we start
uint s = filter.length()-1;
- for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
- QString numberpart = (*it).mid(s);
+ for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it) {
+ TQString numberpart = (*it).mid(s);
uint endmaj = numberpart.find('.');
if (endmaj == -1)
continue;
@@ -266,7 +266,7 @@ static QString findMostRecentLib(QString dir, QString name)
KOpenSSLProxy::KOpenSSLProxy() {
KLibLoader *ll = KLibLoader::self();
_ok = false;
-QStringList libpaths, libnamesc, libnamess;
+TQStringList libpaths, libnamesc, libnamess;
KConfig *cfg;
_cryptoLib = 0L;
@@ -274,7 +274,7 @@ KConfig *cfg;
cfg = new KConfig("cryptodefaults", false, false);
cfg->setGroup("OpenSSL");
- QString upath = cfg->readPathEntry("Path");
+ TQString upath = cfg->readPathEntry("Path");
if (!upath.isEmpty())
libpaths << upath;
@@ -282,7 +282,7 @@ KConfig *cfg;
#ifdef __OpenBSD__
{
- QString libname = findMostRecentLib("/usr/lib" KDELIBSUFF, "crypto");
+ TQString libname = findMostRecentLib("/usr/lib" KDELIBSUFF, "crypto");
if (!libname.isNull())
_cryptoLib = ll->globalLibrary(libname.latin1());
}
@@ -352,18 +352,18 @@ KConfig *cfg;
;
#endif
- for (QStringList::Iterator it = libpaths.begin();
+ for (TQStringList::Iterator it = libpaths.begin();
it != libpaths.end();
++it) {
- for (QStringList::Iterator shit = libnamesc.begin();
+ for (TQStringList::Iterator shit = libnamesc.begin();
shit != libnamesc.end();
++shit) {
- QString alib = *it;
+ TQString alib = *it;
if (!alib.isEmpty() && !alib.endsWith("/"))
alib += "/";
alib += *shit;
- QString tmpStr(alib.latin1());
- tmpStr.replace(QRegExp("\\(.*\\)"), "");
+ TQString tmpStr(alib.latin1());
+ tmpStr.replace(TQRegExp("\\(.*\\)"), "");
if (!access(tmpStr.latin1(), R_OK))
_cryptoLib = ll->globalLibrary(alib.latin1());
if (_cryptoLib) break;
@@ -499,23 +499,23 @@ KConfig *cfg;
#ifdef __OpenBSD__
{
- QString libname = findMostRecentLib("/usr/lib", "ssl");
+ TQString libname = findMostRecentLib("/usr/lib", "ssl");
if (!libname.isNull())
_sslLib = ll->globalLibrary(libname.latin1());
}
#else
- for (QStringList::Iterator it = libpaths.begin();
+ for (TQStringList::Iterator it = libpaths.begin();
it != libpaths.end();
++it) {
- for (QStringList::Iterator shit = libnamess.begin();
+ for (TQStringList::Iterator shit = libnamess.begin();
shit != libnamess.end();
++shit) {
- QString alib = *it;
+ TQString alib = *it;
if (!alib.isEmpty() && !alib.endsWith("/"))
alib += "/";
alib += *shit;
- QString tmpStr(alib.latin1());
- tmpStr.replace(QRegExp("\\(.*\\)"), "");
+ TQString tmpStr(alib.latin1());
+ tmpStr.replace(TQRegExp("\\(.*\\)"), "");
if (!access(tmpStr.latin1(), R_OK))
_sslLib = ll->globalLibrary(alib.latin1());
if (_sslLib) break;
diff --git a/kio/kssl/ksmimecrypto.cc b/kio/kssl/ksmimecrypto.cc
index 8b171ddb4..c96f9ec6d 100644
--- a/kio/kssl/ksmimecrypto.cc
+++ b/kio/kssl/ksmimecrypto.cc
@@ -19,9 +19,9 @@
*/
-#include <qptrlist.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include "kopenssl.h"
@@ -57,26 +57,26 @@ public:
KSMIMECryptoPrivate(KOpenSSLProxy *kossl);
- STACK_OF(X509) *certsToX509(QPtrList<KSSLCertificate> &certs);
+ STACK_OF(X509) *certsToX509(TQPtrList<KSSLCertificate> &certs);
KSMIMECrypto::rc signMessage(BIO *clearText,
BIO *cipherText,
- KSSLPKCS12 &privKey, QPtrList<KSSLCertificate> &certs,
+ KSSLPKCS12 &privKey, TQPtrList<KSSLCertificate> &certs,
bool detached);
KSMIMECrypto::rc encryptMessage(BIO *clearText,
BIO *cipherText, KSMIMECrypto::algo algorithm,
- QPtrList<KSSLCertificate> &recip);
+ TQPtrList<KSSLCertificate> &recip);
KSMIMECrypto::rc checkSignature(BIO *clearText,
BIO *signature, bool detached,
- QPtrList<KSSLCertificate> &recip);
+ TQPtrList<KSSLCertificate> &recip);
KSMIMECrypto::rc decryptMessage(BIO *cipherText,
BIO *clearText,
KSSLPKCS12 &privKey);
- void MemBIOToQByteArray(BIO *src, QByteArray &dest);
+ void MemBIOToQByteArray(BIO *src, TQByteArray &dest);
KSMIMECrypto::rc sslErrToRc(void);
};
@@ -86,7 +86,7 @@ KSMIMECryptoPrivate::KSMIMECryptoPrivate(KOpenSSLProxy *kossl): kossl(kossl) {
}
-STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(QPtrList<KSSLCertificate> &certs) {
+STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(TQPtrList<KSSLCertificate> &certs) {
STACK_OF(X509) *x509 = sk_new(NULL);
KSSLCertificate *cert = certs.first();
while(cert) {
@@ -99,7 +99,7 @@ STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(QPtrList<KSSLCertificate> &cert
KSMIMECrypto::rc KSMIMECryptoPrivate::signMessage(BIO *clearText,
BIO *cipherText,
- KSSLPKCS12 &privKey, QPtrList<KSSLCertificate> &certs,
+ KSSLPKCS12 &privKey, TQPtrList<KSSLCertificate> &certs,
bool detached) {
STACK_OF(X509) *other = NULL;
@@ -128,7 +128,7 @@ KSMIMECrypto::rc KSMIMECryptoPrivate::signMessage(BIO *clearText,
KSMIMECrypto::rc KSMIMECryptoPrivate::encryptMessage(BIO *clearText,
BIO *cipherText, KSMIMECrypto::algo algorithm,
- QPtrList<KSSLCertificate> &recip) {
+ TQPtrList<KSSLCertificate> &recip) {
EVP_CIPHER *cipher = NULL;
KSMIMECrypto::rc rc;
switch(algorithm) {
@@ -172,7 +172,7 @@ KSMIMECrypto::rc KSMIMECryptoPrivate::encryptMessage(BIO *clearText,
KSMIMECrypto::rc KSMIMECryptoPrivate::checkSignature(BIO *clearText,
BIO *signature, bool detached,
- QPtrList<KSSLCertificate> &recip) {
+ TQPtrList<KSSLCertificate> &recip) {
PKCS7 *p7 = kossl->d2i_PKCS7_bio(signature, NULL);
KSMIMECrypto::rc rc = KSMIMECrypto::KSC_R_OTHER;
@@ -234,7 +234,7 @@ KSMIMECrypto::rc KSMIMECryptoPrivate::decryptMessage(BIO *cipherText,
}
-void KSMIMECryptoPrivate::MemBIOToQByteArray(BIO *src, QByteArray &dest) {
+void KSMIMECryptoPrivate::MemBIOToQByteArray(BIO *src, TQByteArray &dest) {
char *buf;
long len = BIO_get_mem_data(src, &buf);
dest.assign(buf, len);
@@ -303,10 +303,10 @@ KSMIMECrypto::~KSMIMECrypto() {
}
-KSMIMECrypto::rc KSMIMECrypto::signMessage(const QCString &clearText,
- QByteArray &cipherText,
+KSMIMECrypto::rc KSMIMECrypto::signMessage(const TQCString &clearText,
+ TQByteArray &cipherText,
const KSSLPKCS12 &privKey,
- const QPtrList<KSSLCertificate> &certs,
+ const TQPtrList<KSSLCertificate> &certs,
bool detached) {
#ifdef KSSL_HAVE_SSL
if (!kossl) return KSC_R_NO_SSL;
@@ -315,7 +315,7 @@ KSMIMECrypto::rc KSMIMECrypto::signMessage(const QCString &clearText,
rc rc = priv->signMessage(in, out,
const_cast<KSSLPKCS12 &>(privKey),
- const_cast<QPtrList<KSSLCertificate> &>(certs),
+ const_cast<TQPtrList<KSSLCertificate> &>(certs),
detached);
if (!rc) priv->MemBIOToQByteArray(out, cipherText);
@@ -330,9 +330,9 @@ KSMIMECrypto::rc KSMIMECrypto::signMessage(const QCString &clearText,
}
-KSMIMECrypto::rc KSMIMECrypto::checkDetachedSignature(const QCString &clearText,
- const QByteArray &signature,
- QPtrList<KSSLCertificate> &foundCerts) {
+KSMIMECrypto::rc KSMIMECrypto::checkDetachedSignature(const TQCString &clearText,
+ const TQByteArray &signature,
+ TQPtrList<KSSLCertificate> &foundCerts) {
#ifdef KSSL_HAVE_SSL
if (!kossl) return KSC_R_NO_SSL;
BIO *txt = kossl->BIO_new_mem_buf((char *)clearText.data(), clearText.length());
@@ -350,9 +350,9 @@ KSMIMECrypto::rc KSMIMECrypto::checkDetachedSignature(const QCString &clearText,
}
-KSMIMECrypto::rc KSMIMECrypto::checkOpaqueSignature(const QByteArray &signedText,
- QCString &clearText,
- QPtrList<KSSLCertificate> &foundCerts) {
+KSMIMECrypto::rc KSMIMECrypto::checkOpaqueSignature(const TQByteArray &signedText,
+ TQCString &clearText,
+ TQPtrList<KSSLCertificate> &foundCerts) {
#ifdef KSSL_HAVE_SSL
if (!kossl) return KSC_R_NO_SSL;
@@ -374,10 +374,10 @@ KSMIMECrypto::rc KSMIMECrypto::checkOpaqueSignature(const QByteArray &signedText
}
-KSMIMECrypto::rc KSMIMECrypto::encryptMessage(const QCString &clearText,
- QByteArray &cipherText,
+KSMIMECrypto::rc KSMIMECrypto::encryptMessage(const TQCString &clearText,
+ TQByteArray &cipherText,
algo algorithm,
- const QPtrList<KSSLCertificate> &recip) {
+ const TQPtrList<KSSLCertificate> &recip) {
#ifdef KSSL_HAVE_SSL
if (!kossl) return KSC_R_NO_SSL;
@@ -385,7 +385,7 @@ KSMIMECrypto::rc KSMIMECrypto::encryptMessage(const QCString &clearText,
BIO *out = kossl->BIO_new(kossl->BIO_s_mem());
rc rc = priv->encryptMessage(in,out,algorithm,
- const_cast< QPtrList<KSSLCertificate> &>(recip));
+ const_cast< TQPtrList<KSSLCertificate> &>(recip));
if (!rc) priv->MemBIOToQByteArray(out, cipherText);
@@ -399,8 +399,8 @@ KSMIMECrypto::rc KSMIMECrypto::encryptMessage(const QCString &clearText,
}
-KSMIMECrypto::rc KSMIMECrypto::decryptMessage(const QByteArray &cipherText,
- QCString &clearText,
+KSMIMECrypto::rc KSMIMECrypto::decryptMessage(const TQByteArray &cipherText,
+ TQCString &clearText,
const KSSLPKCS12 &privKey) {
#ifdef KSSL_HAVE_SSL
if (!kossl) return KSC_R_NO_SSL;
diff --git a/kio/kssl/ksmimecrypto.h b/kio/kssl/ksmimecrypto.h
index e49028422..95d17a8a8 100644
--- a/kio/kssl/ksmimecrypto.h
+++ b/kio/kssl/ksmimecrypto.h
@@ -22,8 +22,8 @@
#define __KSMIMECRYPTO_H
-#include <qcstring.h>
-#include <qptrlist.h>
+#include <tqcstring.h>
+#include <tqptrlist.h>
#include "ksslpkcs12.h"
#include "ksslcertificate.h"
@@ -60,10 +60,10 @@ class KIO_EXPORT KSMIMECrypto {
* @param detached create detached or opaque signature
* @return 0 on success
*/
- rc signMessage(const QCString &clearText,
- QByteArray &cipherText,
+ rc signMessage(const TQCString &clearText,
+ TQByteArray &cipherText,
const KSSLPKCS12 &privKey,
- const QPtrList<KSSLCertificate> &certs,
+ const TQPtrList<KSSLCertificate> &certs,
bool detached);
/**
@@ -75,9 +75,9 @@ class KIO_EXPORT KSMIMECrypto {
* @param foundCerts certificates found in this message
* @return 0 on success
*/
- rc checkDetachedSignature(const QCString &clearText,
- const QByteArray &signature,
- QPtrList<KSSLCertificate> &foundCerts);
+ rc checkDetachedSignature(const TQCString &clearText,
+ const TQByteArray &signature,
+ TQPtrList<KSSLCertificate> &foundCerts);
/**
* Check an opaque signed message
@@ -88,9 +88,9 @@ class KIO_EXPORT KSMIMECrypto {
* @param foundCerts certificates found in this mesasge
* @return 0 on success
*/
- rc checkOpaqueSignature(const QByteArray &signedText,
- QCString &clearText,
- QPtrList<KSSLCertificate> &foundCerts);
+ rc checkOpaqueSignature(const TQByteArray &signedText,
+ TQCString &clearText,
+ TQPtrList<KSSLCertificate> &foundCerts);
/**
* Encrypt a message
@@ -104,10 +104,10 @@ class KIO_EXPORT KSMIMECrypto {
* @param recip recipient certificates
* @return 0 on success
*/
- rc encryptMessage(const QCString &clearText,
- QByteArray &cipherText,
+ rc encryptMessage(const TQCString &clearText,
+ TQByteArray &cipherText,
algo algorithm,
- const QPtrList<KSSLCertificate> &recip);
+ const TQPtrList<KSSLCertificate> &recip);
/**
* Decrypt a message
@@ -116,8 +116,8 @@ class KIO_EXPORT KSMIMECrypto {
* @param privKey private key to use
* @return 0 on success
*/
- rc decryptMessage(const QByteArray &cipherText,
- QCString &clearText,
+ rc decryptMessage(const TQByteArray &cipherText,
+ TQCString &clearText,
const KSSLPKCS12 &privKey);
private:
diff --git a/kio/kssl/kssl.cc b/kio/kssl/kssl.cc
index 3996aae20..66cc503d5 100644
--- a/kio/kssl/kssl.cc
+++ b/kio/kssl/kssl.cc
@@ -68,7 +68,7 @@ public:
bool lastInitTLS;
KSSLCertificate::KSSLValidation m_cert_vfy_res;
- QString proxyPeer;
+ TQString proxyPeer;
#ifdef KSSL_HAVE_SSL
SSL *m_ssl;
@@ -146,7 +146,7 @@ bool KSSL::TLSInit() {
}
// set cipher list
- QString clist = m_cfg->getCipherList();
+ TQString clist = m_cfg->getCipherList();
//kdDebug(7029) << "Cipher list: " << clist << endl;
if (!clist.isEmpty())
d->kossl->SSL_CTX_set_cipher_list(d->m_ctx, const_cast<char *>(clist.ascii()));
@@ -194,7 +194,7 @@ else if (m_cfg->sslv3()) kdDebug(7029) << "SSL3 method" << endl;
}
// set cipher list
- QString clist = m_cfg->getCipherList();
+ TQString clist = m_cfg->getCipherList();
kdDebug(7029) << "Cipher list: " << clist << endl;
if (!clist.isEmpty())
d->kossl->SSL_CTX_set_cipher_list(d->m_ctx, const_cast<char *>(clist.ascii()));
@@ -624,13 +624,13 @@ KSSLConnectionInfo& KSSL::connectionInfo() {
}
-// KDE 4: Make it const QString &
-void KSSL::setPeerHost(QString realHost) {
+// KDE 4: Make it const TQString &
+void KSSL::setPeerHost(TQString realHost) {
d->proxyPeer = realHost;
}
// deprecated
-void KSSL::setProxyUse(bool, QString, int, QString) {
+void KSSL::setProxyUse(bool, TQString, int, TQString) {
}
diff --git a/kio/kssl/kssl.h b/kio/kssl/kssl.h
index 414e426a8..ffb217980 100644
--- a/kio/kssl/kssl.h
+++ b/kio/kssl/kssl.h
@@ -178,7 +178,7 @@ public:
* @param proxy is the IP or hostname of the proxy server
* @deprecated
*/
- void setProxyUse(bool active, QString realIP = QString::null, int realPort = 0, QString proxy = QString::null) KDE_DEPRECATED;
+ void setProxyUse(bool active, TQString realIP = TQString::null, int realPort = 0, TQString proxy = TQString::null) KDE_DEPRECATED;
/**
* Set the peer hostname to be used for certificate verification.
@@ -186,7 +186,7 @@ public:
* @param realHost the remote hostname as the user believes to be
* connecting to
*/
- void setPeerHost(QString realHost = QString::null);
+ void setPeerHost(TQString realHost = TQString::null);
/**
* Connect the SSL session to the remote host using the provided
diff --git a/kio/kssl/kssl/caroot/ca-bundle.crt b/kio/kssl/kssl/caroot/ca-bundle.crt
index 31409b62f..ca5d292c9 100644
--- a/kio/kssl/kssl/caroot/ca-bundle.crt
+++ b/kio/kssl/kssl/caroot/ca-bundle.crt
@@ -99,7 +99,7 @@ MAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRU
cnVzdCBUVFAgTmV0d29yazEgMB4GA1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJv
b3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4JNojVhaTdt02KLmuG7jD8WS6
IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL+YPoRNWyQSW/
-iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
+iHVv/xD8SlQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh
4SINhwBk/ox9Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQm
XiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
@@ -116,7 +116,7 @@ AQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwq
xBb/4Oxx64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G
87B4pfYOQnrjfxvM0PC3KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i
2O+tCBGaKZnhqkRFmhJePp1tUvznoD1oL/BLcHwTOK28FSXx1s6rosAx1i+f4P8U
-WfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GRwVY18BTcZTYJbqukB8c1
+WfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffQO2kBhLEO+GRwVY18BTcZTYJbqukB8c1
0cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HUMIHRMB0G
A1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0T
AQH/BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6Fr
@@ -238,7 +238,7 @@ FRclR9qMM8aBnBZmf+Uv3K3uhT+UBzzY654U9Yi1JYnA
-----BEGIN CERTIFICATE-----
MIIC8zCCAlygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBszELMAkGA1UEBhMCQkUx
-ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMTQwMgYDVQQL
+ETAPBgNVBAcTCEJydXNzZWxzMRMwEQYDVQQKEwpCZWxTaWduIE5WMQwMgYDVQQL
EytCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSEw
HwYDVQQDExhCZWxTaWduIFNlY3VyZSBTZXJ2ZXIgQ0ExIzAhBgkqhkiG9w0BCQEW
FHdlYm1hc3RlckBiZWxzaWduLmJlMB4XDTk3MDcxNjIyMDA1NFoXDTA3MDcxNjIy
@@ -252,7 +252,7 @@ SoQOjRax1swIZBIM4ChLyKWEkBf7EUYu1qeFGMsYrmOasFgG9ADP+MQJGjUMofnu
Sv1t3v4mpTsCAwEAAaMVMBMwEQYJYIZIAYb4QgEBBAQDAgCgMA0GCSqGSIb3DQEB
BAUAA4GBAGw9mcMF4h3K5S2qaIWLQDEgZhNo5lg6idCNdbLFYth9go/32TKBd/Y1
W4UpzmeyubwrGXjP84f9RvGVdbIJVwMwwXrNckdxgMp9ncllPEcRIn36BwsoeKGT
-6AVFSOIyMko96FMcELfHc4wHUOH5yStTQfWDjeUJOUqOA2KqQGOL
+6AVFSOIyMko96FMcELfHc4wHUOH5yStQfWDjeUJOUqOA2KqQGOL
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
@@ -343,7 +343,7 @@ Ytdo+o56T9II2pPc8JIRetDccpMMc5NihWjQ9A==
-----BEGIN CERTIFICATE-----
MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
-EwhEU1RDQSBFMjAeFw05ODEyMDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJ
+EwhEU1RDQSBFMjAeFw05ODEyMDkxOTE3MjZaFw0xODEyMDkxOQ3MjZaMEYxCzAJ
BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
ETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC/
k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGODVvso
@@ -435,7 +435,7 @@ dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk
MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp
b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0
-MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
+MFqBDzIwMTkwNTI1MTYwOQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa
MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI
hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN
@@ -520,7 +520,7 @@ WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN
-----BEGIN CERTIFICATE-----
MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
UzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2Vj
-dXJlIGVCdXNpbmVzcyBDQS0yMB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0
+dXJlIGVCdXNpbmVzcyBDQS0yMB4XDTk5MDYyMzEyMQ0NVoXDTE5MDYyMzEyMQ0
NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkVxdWlmYXggU2VjdXJlMSYwJAYD
VQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCBnzANBgkqhkiG9w0B
AQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn2Z0G
@@ -580,7 +580,7 @@ b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
-iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
+iM3dFw4usJQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
@@ -622,7 +622,7 @@ X8NKp7b9t12QSfiasq1mpoIAk65g/yA=
MIIDtjCCAp6gAwIBAgICAbYwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVVMx
GDAWBgNVBAoTD0dURSBDb3Jwb3JhdGlvbjEnMCUGA1UECxMeR1RFIEN5YmVyVHJ1
c3QgU29sdXRpb25zLCBJbmMuMR4wHAYDVQQDExVHVEUgQ3liZXJUcnVzdCBSb290
-IDUwHhcNOTgwODE0MTQ1MDAwWhcNMTMwODE0MjM1OTAwWjBwMQswCQYDVQQGEwJV
+IDUwHhcNOTgwODE0MQ1MDAwWhcNMTMwODE0MjM1OTAwWjBwMQswCQYDVQQGEwJV
UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
cnVzdCBTb2x1dGlvbnMsIEluYy4xHjAcBgNVBAMTFUdURSBDeWJlclRydXN0IFJv
b3QgNTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALwSbj+KfHqXAewe
@@ -744,7 +744,7 @@ r3cNWT6UHWn6idMMvRoB9D/o4Hcagiha5mLXt+M2yQ6feuPC08xZiQzvFovwNnci
yqS2t8FCZwFAY8znOGSHWxSWZnstFO69SW3/d9DiTlvTgMJND8q4nYGXpzRux+Oc
SOW0qkX19mVMSPISwtKTjMIVJPMrUv/jCK64btYsEs85yxIq56l7X5g9o+HMpmOJ
XH0xdfnV1l3y0NQ9355xqA7c5CCXeOZ/U6QNUU+OOwOuow1aTcN55zVYcELJXqFe
-tNkio0RTNaTQz3OAxc+fVph2+RRMd4eCydx+XTTVNnU=
+tNkio0RTNaQz3OAxc+fVph2+RRMd4eCydx+XTTVNnU=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
@@ -980,7 +980,7 @@ cB390LcwkDrGSG1n5TLaj9vjqOMdICWiHOFMuaT2xj9cWA27xrJ3ARaRnxcGDbdA
PsyPjpxL4J1+mx4Fq4gi+tMoG1cUZEo+JCw4TSFpAHMu0FUtdPIV6JRDPkAqxsa5
alveoswYUFRdTiqFbPaSiykZfufqSuAiKyW892bPd5pBdPI8FA10afVQg83NLyHb
IkaK0PdRGpVX8gWLGhntO0XoNsJufvtXIgAfBlOprpPGj3EqMUWS545t5pkiwIP8
-79xXZndPojYx+6ETjeXKo5V9AQxkcDtTQmiAx7udqAA1aZgMqGfYQ+Wqz5XgUZWk
+79xXZndPojYx+6ETjeXKo5V9AQxkcDtQmiAx7udqAA1aZgMqGfYQ+Wqz5XgUZWk
Fz9CnbgEztN5ecjTihYykuDXou7XN0wvrLh7vkX28RgznHs3piTZvECrAOnDN4ur
2LbzXoFOsBRrBz4f7ML2RCKVu7Pmb9b5cGW6CoNlqg4TL4MTI1OLQBb6zi/8TQT4
69isxTbCFVdIOOxVs7Qeuq3SQgYXDXPIV6a+lk2p8sD7eiEc9clwqYKQtfEM1HkQ
@@ -1367,7 +1367,7 @@ Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05
OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT
ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u
IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o
-975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/
+975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNQvAayUTNfxMK/
touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE
7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j
9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI
@@ -1377,10 +1377,10 @@ MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU=
-----BEGIN CERTIFICATE-----
MIICNDCCAaECEAKtZn5ORf5eV288mBle3cAwDQYJKoZIhvcNAQECBQAwXzELMAkG
-A1UEBhMCVVMxIDAeBgNVBAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD
+A1UEBhMCVVMxIDAeBgNVBAoTF1JQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYD
VQQLEyVTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk0
MTEwOTAwMDAwMFoXDTEwMDEwNzIzNTk1OVowXzELMAkGA1UEBhMCVVMxIDAeBgNV
-BAoTF1JTQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy
+BAoTF1JQSBEYXRhIFNlY3VyaXR5LCBJbmMuMS4wLAYDVQQLEyVTZWN1cmUgU2Vy
dmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGbMA0GCSqGSIb3DQEBAQUAA4GJ
ADCBhQJ+AJLOesGugz5aqomDV6wlAXYMra6OLDfO6zV4ZFQD5YRAUcm/jwjiioII
0haGN1XpsSECrXZogZoFokvJSyVmIlZsiAeP94FZbYQHZXATcXY+m3dM41CJVphI
@@ -1494,7 +1494,7 @@ MIID+DCCAuCgAwIBAgIRANAeQJAAACdLAAAAAQAAAAQwDQYJKoZIhvcNAQEFBQAw
gYwxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIEwRVdGFoMRcwFQYDVQQHEw5TYWx0IExh
a2UgQ2l0eTEYMBYGA1UEChMPWGNlcnQgRVogYnkgRFNUMRgwFgYDVQQDEw9YY2Vy
dCBFWiBieSBEU1QxITAfBgkqhkiG9w0BCQEWEmNhQGRpZ3NpZ3RydXN0LmNvbTAe
-Fw05OTA3MTQxNjE0MThaFw0wOTA3MTExNjE0MThaMIGMMQswCQYDVQQGEwJVUzEN
+Fw05OTA3MQxNjE0MThaFw0wOTA3MTExNjE0MThaMIGMMQswCQYDVQQGEwJVUzEN
MAsGA1UECBMEVXRhaDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxGDAWBgNVBAoT
D1hjZXJ0IEVaIGJ5IERTVDEYMBYGA1UEAxMPWGNlcnQgRVogYnkgRFNUMSEwHwYJ
KoZIhvcNAQkBFhJjYUBkaWdzaWd0cnVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUA
@@ -1982,7 +1982,7 @@ A1UdDgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYD
VR0TAQH/BAUwAwEB/zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21v
ZG9jYS5jb20vVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRo
dHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMu
-Y3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8NtwuleGFTQQuS9/
+Y3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8NtwuleGFQQuS9/
HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32
pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxIS
jBc/lDb+XbDABHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+
@@ -2142,7 +2142,7 @@ Uh+U3xeUc8OzwcFxBSAAeL0TUh2oPs0AH8g=
-----BEGIN CERTIFICATE-----
MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUx
ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
-b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQD
+b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMQwMgYDVQQD
EytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBDKSBUYW51c2l0dmFueWtpYWRvMB4X
DTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJBgNVBAYTAkhVMREw
DwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9u
@@ -2176,7 +2176,7 @@ MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhV
MRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMe
TmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0
dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFzcyBB
-KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oXDTE5MDIxOTIzMTQ0
+KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMQ0N1oXDTE5MDIxOTIzMQ0
N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhC
dWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQu
MRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBL
@@ -2322,7 +2322,7 @@ Um9vdCBDQTAeFw0wMTA0MDUxNjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNV
BAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJuZXQxHTAbBgNVBAsTFFREQyBJbnRl
cm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxLhA
vJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20jxsNu
-Zp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a
+Zp+Jpd/gQlBn+h9sHvQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a
0vnRrEvLznWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2PeAG3WiAfAzc1
4izbSysseLlJ28TQx5yc5IogCSEWVmb/Bexb4/DPqyQkXsN/cHoSxNK1EKC2IeGN
eGlVRGn1ypYcNIUXJXfi9i8nmHj9eQY6otZaQ8H/7AQ77hPv01ha/5Lr7K7a8jcD
@@ -2347,7 +2347,7 @@ ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMUIwQAYDVQQD
EzlOZXRMb2NrIE1pbm9zaXRldHQgS296amVneXpvaSAoQ2xhc3MgUUEpIFRhbnVz
aXR2YW55a2lhZG8xHjAcBgkqhkiG9w0BCQEWD2luZm9AbmV0bG9jay5odTAeFw0w
-MzAzMzAwMTQ3MTFaFw0yMjEyMTUwMTQ3MTFaMIHJMQswCQYDVQQGEwJIVTERMA8G
+MzAzMzAwMQ3MTFaFw0yMjEyMTUwMQ3MTFaMIHJMQswCQYDVQQGEwJIVTERMA8G
A1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRvbnNh
Z2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxQjBABgNVBAMTOU5l
dExvY2sgTWlub3NpdGV0dCBLb3pqZWd5em9pIChDbGFzcyBRQSkgVGFudXNpdHZh
@@ -2810,7 +2810,7 @@ U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
-OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C
+OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TQEceWzVI9ujPW3U3eCztKS5/C
Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT
Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi
HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM
diff --git a/kio/kssl/ksslcertchain.cc b/kio/kssl/ksslcertchain.cc
index aa531c067..a401aec3d 100644
--- a/kio/kssl/ksslcertchain.cc
+++ b/kio/kssl/ksslcertchain.cc
@@ -41,7 +41,7 @@
#include <kopenssl.h>
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
@@ -97,7 +97,7 @@ bool KSSLCertChain::isValid() {
KSSLCertChain *KSSLCertChain::replicate() {
KSSLCertChain *x = new KSSLCertChain;
-QPtrList<KSSLCertificate> ch = getChain();
+TQPtrList<KSSLCertificate> ch = getChain();
x->setChain(ch); // this will do a deep copy for us
ch.setAutoDelete(true);
@@ -113,8 +113,8 @@ return 0;
}
-QPtrList<KSSLCertificate> KSSLCertChain::getChain() {
-QPtrList<KSSLCertificate> cl;
+TQPtrList<KSSLCertificate> KSSLCertChain::getChain() {
+TQPtrList<KSSLCertificate> cl;
if (!_chain) return cl;
#ifdef KSSL_HAVE_SSL
STACK_OF(X509) *x = (STACK_OF(X509) *)_chain;
@@ -132,7 +132,7 @@ return cl;
}
-void KSSLCertChain::setChain(QPtrList<KSSLCertificate>& chain) {
+void KSSLCertChain::setChain(TQPtrList<KSSLCertificate>& chain) {
#ifdef KSSL_HAVE_SSL
if (_chain) {
STACK_OF(X509) *x = (STACK_OF(X509) *)_chain;
@@ -187,14 +187,14 @@ _chain = NULL;
}
-void KSSLCertChain::setChain(QStringList chain) {
+void KSSLCertChain::setChain(TQStringList chain) {
setCertChain(chain);
}
-void KSSLCertChain::setCertChain(const QStringList& chain) {
- QPtrList<KSSLCertificate> cl;
+void KSSLCertChain::setCertChain(const TQStringList& chain) {
+ TQPtrList<KSSLCertificate> cl;
cl.setAutoDelete(true);
- for (QStringList::ConstIterator s = chain.begin(); s != chain.end(); ++s) {
+ for (TQStringList::ConstIterator s = chain.begin(); s != chain.end(); ++s) {
KSSLCertificate *c = KSSLCertificate::fromString((*s).local8Bit());
if (c) {
cl.append(c);
diff --git a/kio/kssl/ksslcertchain.h b/kio/kssl/ksslcertchain.h
index 3e48db67d..618c7d6a3 100644
--- a/kio/kssl/ksslcertchain.h
+++ b/kio/kssl/ksslcertchain.h
@@ -21,8 +21,8 @@
#ifndef _KSSLCERTCHAIN_H
#define _KSSLCERTCHAIN_H
-#include <qglobal.h>
-#include <qptrlist.h>
+#include <tqglobal.h>
+#include <tqptrlist.h>
#include <kdemacros.h>
class QString;
@@ -86,7 +86,7 @@ public:
* @param chain the certificate chain
* @see KSSLCertificate
*/
- void setChain(QPtrList<KSSLCertificate>& chain);
+ void setChain(TQPtrList<KSSLCertificate>& chain);
/**
* Set the certificate chain as a list of base64 encoded X.509
@@ -95,7 +95,7 @@ public:
* @param chain the certificate chain
* @deprecated
*/
- void setChain(QStringList chain) KDE_DEPRECATED;
+ void setChain(TQStringList chain) KDE_DEPRECATED;
/**
* Set the certificate chain as a list of base64 encoded X.509
@@ -103,7 +103,7 @@ public:
*
* @param chain the certificate chain
*/
- void setCertChain(const QStringList& chain);
+ void setCertChain(const TQStringList& chain);
/**
* Obtain a copy of the certificate chain.
@@ -111,7 +111,7 @@ public:
* @return a deep copy of the certificate chain.
* @see KSSLCertificate
*/
- QPtrList<KSSLCertificate> getChain();
+ TQPtrList<KSSLCertificate> getChain();
/**
* Determine the number of entries (depth) of the chain.
diff --git a/kio/kssl/ksslcertdlg.cc b/kio/kssl/ksslcertdlg.cc
index a61285d87..21bff52b1 100644
--- a/kio/kssl/ksslcertdlg.cc
+++ b/kio/kssl/ksslcertdlg.cc
@@ -22,12 +22,12 @@
#include <kssl.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qlistview.h>
-#include <qframe.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlistview.h>
+#include <tqframe.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -42,43 +42,43 @@
class KSSLCertDlg::KSSLCertDlgPrivate {
private:
friend class KSSLCertDlg;
- QLabel *p_message;
- QPushButton *p_pb_dontsend;
+ TQLabel *p_message;
+ TQPushButton *p_pb_dontsend;
bool p_send_flag;
};
-KSSLCertDlg::KSSLCertDlg(QWidget *parent, const char *name, bool modal)
+KSSLCertDlg::KSSLCertDlg(TQWidget *parent, const char *name, bool modal)
: KDialog(parent, name, modal), d(new KSSLCertDlgPrivate) {
- QBoxLayout * grid = new QVBoxLayout( this, KDialog::marginHint(),
+ TQBoxLayout * grid = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- d->p_message = new QLabel(QString::null, this);
+ d->p_message = new TQLabel(TQString::null, this);
grid->addWidget(d->p_message);
setHost(_host);
- _certs = new QListView(this);
+ _certs = new TQListView(this);
_certs->addColumn(i18n("Certificate"));
- _certs->setResizeMode(QListView::LastColumn);
- QFontMetrics fm( KGlobalSettings::generalFont() );
+ _certs->setResizeMode(TQListView::LastColumn);
+ TQFontMetrics fm( KGlobalSettings::generalFont() );
_certs->setMinimumHeight(4*fm.height());
grid->addWidget(_certs);
- _save = new QCheckBox(i18n("Save selection for this host."), this);
+ _save = new TQCheckBox(i18n("Save selection for this host."), this);
grid->addWidget(_save);
grid->addWidget(new KSeparator(KSeparator::HLine, this));
- QBoxLayout * h = new QHBoxLayout( grid );
+ TQBoxLayout * h = new TQHBoxLayout( grid );
h->insertStretch(0);
_ok = new KPushButton(i18n("Send certificate"), this);
h->addWidget(_ok);
- connect(_ok, SIGNAL(clicked()), SLOT(slotSend()));
+ connect(_ok, TQT_SIGNAL(clicked()), TQT_SLOT(slotSend()));
d->p_pb_dontsend = new KPushButton(i18n("Do not send a certificate"), this);
h->addWidget(d->p_pb_dontsend);
- connect(d->p_pb_dontsend, SIGNAL(clicked()), SLOT(slotDont()));
+ connect(d->p_pb_dontsend, TQT_SIGNAL(clicked()), TQT_SLOT(slotDont()));
#ifndef QT_NO_WIDGET_TOPEXTRA
setCaption(i18n("KDE SSL Certificate Dialog"));
@@ -91,11 +91,11 @@ KSSLCertDlg::~KSSLCertDlg() {
}
-void KSSLCertDlg::setup(QStringList certs, bool saveChecked, bool sendChecked) {
+void KSSLCertDlg::setup(TQStringList certs, bool saveChecked, bool sendChecked) {
setupDialog(certs, saveChecked, sendChecked);
}
-void KSSLCertDlg::setupDialog(const QStringList& certs, bool saveChecked, bool sendChecked) {
+void KSSLCertDlg::setupDialog(const TQStringList& certs, bool saveChecked, bool sendChecked) {
_save->setChecked(saveChecked);
d->p_send_flag = sendChecked;
@@ -104,11 +104,11 @@ void KSSLCertDlg::setupDialog(const QStringList& certs, bool saveChecked, bool s
else
d->p_pb_dontsend->setDefault(true); // "do not send" is the "default action".
- for (QStringList::ConstIterator i = certs.begin(); i != certs.end(); ++i) {
+ for (TQStringList::ConstIterator i = certs.begin(); i != certs.end(); ++i) {
if ((*i).isEmpty())
continue;
- new QListViewItem(_certs, *i);
+ new TQListViewItem(_certs, *i);
}
_certs->setSelected(_certs->firstChild(), true);
@@ -125,16 +125,16 @@ bool KSSLCertDlg::wantsToSend() {
}
-QString KSSLCertDlg::getChoice() {
- QListViewItem *selected = _certs->selectedItem();
+TQString KSSLCertDlg::getChoice() {
+ TQListViewItem *selected = _certs->selectedItem();
if (selected && d->p_send_flag)
return selected->text(0);
else
- return QString::null;
+ return TQString::null;
}
-void KSSLCertDlg::setHost(const QString& host) {
+void KSSLCertDlg::setHost(const TQString& host) {
_host = host;
d->p_message->setText(i18n("The server <b>%1</b> requests a certificate.<p>"
"Select a certificate to use from the list below:")
@@ -154,13 +154,13 @@ void KSSLCertDlg::slotDont() {
}
-QDataStream& operator<<(QDataStream& s, const KSSLCertDlgRet& r) {
+TQDataStream& operator<<(TQDataStream& s, const KSSLCertDlgRet& r) {
s << Q_INT8(r.ok?1:0) << r.choice << Q_INT8(r.save?1:0) << Q_INT8(r.send?1:0);
return s;
}
-QDataStream& operator>>(QDataStream& s, KSSLCertDlgRet& r) {
+TQDataStream& operator>>(TQDataStream& s, KSSLCertDlgRet& r) {
Q_INT8 tmp;
s >> tmp; r.ok = (tmp == 1);
s >> r.choice;
diff --git a/kio/kssl/ksslcertdlg.h b/kio/kssl/ksslcertdlg.h
index a52d0dec3..5bd720832 100644
--- a/kio/kssl/ksslcertdlg.h
+++ b/kio/kssl/ksslcertdlg.h
@@ -21,7 +21,7 @@
#ifndef _KSSLCERTDLG_H
#define _KSSLCERTDLG_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdialog.h>
class QWidget;
@@ -50,7 +50,7 @@ public:
* @param name the internal name of this instance
* @param modal create a modal dialog if set to true
*/
- KSSLCertDlg(QWidget *parent=0L, const char *name=0L, bool modal=false);
+ KSSLCertDlg(TQWidget *parent=0L, const char *name=0L, bool modal=false);
/**
* Destroy this object and close the dialog
@@ -65,7 +65,7 @@ public:
* @param sendChecked send the checked item to the remote host
* @deprecated
*/
- void setup(QStringList certs, bool saveChecked = false, bool sendChecked = true) KDE_DEPRECATED;
+ void setup(TQStringList certs, bool saveChecked = false, bool sendChecked = true) KDE_DEPRECATED;
/**
* Setup the dialog. Call this before you display the dialog.
@@ -74,14 +74,14 @@ public:
* @param saveChecked save the checked item for the future
* @param sendChecked send the checked item to the remote host
*/
- void setupDialog(const QStringList& certs, bool saveChecked = false, bool sendChecked = true);
+ void setupDialog(const TQStringList& certs, bool saveChecked = false, bool sendChecked = true);
/**
* Obtain the name of the certificate the user wants to send
*
* @return the name of the certificate
*/
- QString getChoice();
+ TQString getChoice();
/**
* Determine if the user wants to send a certificate.
@@ -102,7 +102,7 @@ public:
*
* @param host the hostname
*/
- void setHost(const QString& host);
+ void setHost(const TQString& host);
private slots:
void slotSend();
@@ -111,18 +111,18 @@ private slots:
private:
class KSSLCertDlgPrivate;
KSSLCertDlgPrivate *d;
- QCheckBox *_save;
- QRadioButton *_send, *_dont;
- QListView *_certs;
- QPushButton *_ok;
- QString _host;
+ TQCheckBox *_save;
+ TQRadioButton *_send, *_dont;
+ TQListView *_certs;
+ TQPushButton *_ok;
+ TQString _host;
};
class KIO_EXPORT KSSLCertDlgRet {
public:
bool ok;
- QString choice;
+ TQString choice;
bool send;
bool save;
@@ -131,8 +131,8 @@ protected:
KSSLCertDlgRetPrivate *d;
};
-KIO_EXPORT QDataStream& operator<<(QDataStream& s, const KSSLCertDlgRet& r);
-KIO_EXPORT QDataStream& operator>>(QDataStream& s, KSSLCertDlgRet& r);
+KIO_EXPORT TQDataStream& operator<<(TQDataStream& s, const KSSLCertDlgRet& r);
+KIO_EXPORT TQDataStream& operator>>(TQDataStream& s, KSSLCertDlgRet& r);
#endif
diff --git a/kio/kssl/ksslcertificate.cc b/kio/kssl/ksslcertificate.cc
index aca7a7ea7..a76b235d7 100644
--- a/kio/kssl/ksslcertificate.cc
+++ b/kio/kssl/ksslcertificate.cc
@@ -26,9 +26,9 @@
#include <unistd.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
#include "kssldefs.h"
#include "ksslcertificate.h"
@@ -38,7 +38,7 @@
#include <kstandarddirs.h>
#include <kmdcodec.h>
#include <klocale.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <ktempfile.h>
#include <sys/types.h>
@@ -60,7 +60,7 @@
#endif
#include <kopenssl.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include "ksslx509v3.h"
@@ -141,13 +141,13 @@ return n;
}
-KSSLCertificate *KSSLCertificate::fromString(QCString cert) {
+KSSLCertificate *KSSLCertificate::fromString(TQCString cert) {
KSSLCertificate *n = NULL;
#ifdef KSSL_HAVE_SSL
if (cert.length() == 0)
return NULL;
- QByteArray qba, qbb = cert.copy();
+ TQByteArray qba, qbb = cert.copy();
KCodecs::base64Decode(qbb, qba);
unsigned char *qbap = reinterpret_cast<unsigned char *>(qba.data());
X509 *x5c = KOSSL::self()->d2i_X509(NULL, &qbap, qba.size());
@@ -163,8 +163,8 @@ return n;
-QString KSSLCertificate::getSubject() const {
-QString rc = "";
+TQString KSSLCertificate::getSubject() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
char *t = d->kossl->X509_NAME_oneline(d->kossl->X509_get_subject_name(d->m_cert), 0, 0);
@@ -177,8 +177,8 @@ return rc;
}
-QString KSSLCertificate::getSerialNumber() const {
-QString rc = "";
+TQString KSSLCertificate::getSerialNumber() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
ASN1_INTEGER *aint = d->kossl->X509_get_serialNumber(d->m_cert);
@@ -191,8 +191,8 @@ return rc;
}
-QString KSSLCertificate::getSignatureText() const {
-QString rc = "";
+TQString KSSLCertificate::getSignatureText() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
char *s;
@@ -200,7 +200,7 @@ int n, i;
i = d->kossl->OBJ_obj2nid(d->m_cert->sig_alg->algorithm);
rc = i18n("Signature Algorithm: ");
- rc += (i == NID_undef)?i18n("Unknown"):QString(d->kossl->OBJ_nid2ln(i));
+ rc += (i == NID_undef)?i18n("Unknown"):TQString(d->kossl->OBJ_nid2ln(i));
rc += "\n";
rc += i18n("Signature Contents:");
@@ -219,7 +219,7 @@ return rc;
}
-void KSSLCertificate::getEmails(QStringList &to) const {
+void KSSLCertificate::getEmails(TQStringList &to) const {
to.clear();
#ifdef KSSL_HAVE_SSL
if (!d->m_cert)
@@ -236,13 +236,13 @@ void KSSLCertificate::getEmails(QStringList &to) const {
}
-QString KSSLCertificate::getKDEKey() const {
+TQString KSSLCertificate::getKDEKey() const {
return getSubject() + " (" + getMD5DigestText() + ")";
}
-QString KSSLCertificate::getMD5DigestFromKDEKey(const QString &k) {
- QString rc;
+TQString KSSLCertificate::getMD5DigestFromKDEKey(const TQString &k) {
+ TQString rc;
int pos = k.findRev('(');
if (pos != -1) {
unsigned int len = k.length();
@@ -254,8 +254,8 @@ QString KSSLCertificate::getMD5DigestFromKDEKey(const QString &k) {
}
-QString KSSLCertificate::getMD5DigestText() const {
-QString rc = "";
+TQString KSSLCertificate::getMD5DigestText() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
unsigned int n;
@@ -279,8 +279,8 @@ return rc;
-QString KSSLCertificate::getMD5Digest() const {
-QString rc = "";
+TQString KSSLCertificate::getMD5Digest() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
unsigned int n;
@@ -302,8 +302,8 @@ return rc;
-QString KSSLCertificate::getKeyType() const {
-QString rc = "";
+TQString KSSLCertificate::getKeyType() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
EVP_PKEY *pkey = d->kossl->X509_get_pubkey(d->m_cert);
@@ -328,8 +328,8 @@ return rc;
-QString KSSLCertificate::getPublicKeyText() const {
-QString rc = "";
+TQString KSSLCertificate::getPublicKeyText() const {
+TQString rc = "";
char *x = NULL;
#ifdef KSSL_HAVE_SSL
@@ -389,7 +389,7 @@ char *x = NULL;
d->kossl->OPENSSL_free(x);
x = d->kossl->BN_bn2hex(pkey->pkey.dsa->g);
- rc += QString("g: ");
+ rc += TQString("g: ");
for (unsigned int i = 0; i < strlen(x); i++) {
if (i%40 != 0 && i%2 == 0)
rc += ":";
@@ -422,8 +422,8 @@ return rc;
-QString KSSLCertificate::getIssuer() const {
-QString rc = "";
+TQString KSSLCertificate::getIssuer() const {
+TQString rc = "";
#ifdef KSSL_HAVE_SSL
char *t = d->kossl->X509_NAME_oneline(d->kossl->X509_get_issuer_name(d->m_cert), 0, 0);
@@ -478,10 +478,10 @@ if (c) {
}
#if 0
- kdDebug(7029) << "flags: " << QString::number(c->ex_flags, 2)
- << "\nkeyusage: " << QString::number(c->ex_kusage, 2)
- << "\nxkeyusage: " << QString::number(c->ex_xkusage, 2)
- << "\nnscert: " << QString::number(c->ex_nscert, 2)
+ kdDebug(7029) << "flags: " << TQString::number(c->ex_flags, 2)
+ << "\nkeyusage: " << TQString::number(c->ex_kusage, 2)
+ << "\nxkeyusage: " << TQString::number(c->ex_xkusage, 2)
+ << "\nnscert: " << TQString::number(c->ex_nscert, 2)
<< endl;
if (c->ex_flags & EXFLAG_KUSAGE)
kdDebug(7029) << " --- Key Usage extensions found" << endl;
@@ -637,7 +637,7 @@ KSSLCertificate::KSSLValidationList KSSLCertificate::validateVerbose(KSSLCertifi
return errors;
}
- QStringList qsl = KGlobal::dirs()->resourceDirs("kssl");
+ TQStringList qsl = KGlobal::dirs()->resourceDirs("kssl");
if (qsl.isEmpty()) {
errors << KSSLCertificate::NoCARoot;
@@ -646,9 +646,9 @@ KSSLCertificate::KSSLValidationList KSSLCertificate::validateVerbose(KSSLCertifi
KSSLCertificate::KSSLValidation ksslv = Unknown;
- for (QStringList::Iterator j = qsl.begin(); j != qsl.end(); ++j) {
+ for (TQStringList::Iterator j = qsl.begin(); j != qsl.end(); ++j) {
struct stat sb;
- QString _j = (*j) + "ca-bundle.crt";
+ TQString _j = (*j) + "ca-bundle.crt";
if (-1 == stat(_j.ascii(), &sb)) {
continue;
}
@@ -849,38 +849,38 @@ return rc;
}
-QString KSSLCertificate::getNotBefore() const {
+TQString KSSLCertificate::getNotBefore() const {
#ifdef KSSL_HAVE_SSL
return ASN1_UTCTIME_QString(X509_get_notBefore(d->m_cert));
#else
-return QString::null;
+return TQString::null;
#endif
}
-QString KSSLCertificate::getNotAfter() const {
+TQString KSSLCertificate::getNotAfter() const {
#ifdef KSSL_HAVE_SSL
return ASN1_UTCTIME_QString(X509_get_notAfter(d->m_cert));
#else
-return QString::null;
+return TQString::null;
#endif
}
-QDateTime KSSLCertificate::getQDTNotBefore() const {
+TQDateTime KSSLCertificate::getQDTNotBefore() const {
#ifdef KSSL_HAVE_SSL
return ASN1_UTCTIME_QDateTime(X509_get_notBefore(d->m_cert), NULL);
#else
-return QDateTime::currentDateTime();
+return TQDateTime::currentDateTime();
#endif
}
-QDateTime KSSLCertificate::getQDTNotAfter() const {
+TQDateTime KSSLCertificate::getQDTNotAfter() const {
#ifdef KSSL_HAVE_SSL
return ASN1_UTCTIME_QDateTime(X509_get_notAfter(d->m_cert), NULL);
#else
-return QDateTime::currentDateTime();
+return TQDateTime::currentDateTime();
#endif
}
@@ -909,12 +909,12 @@ return newOne;
}
-QString KSSLCertificate::toString() {
+TQString KSSLCertificate::toString() {
return KCodecs::base64Encode(toDer());
}
-QString KSSLCertificate::verifyText(KSSLValidation x) {
+TQString KSSLCertificate::verifyText(KSSLValidation x) {
switch (x) {
case KSSLCertificate::Ok:
return i18n("The certificate is valid.");
@@ -954,8 +954,8 @@ return i18n("The certificate is invalid.");
}
-QByteArray KSSLCertificate::toDer() {
-QByteArray qba;
+TQByteArray KSSLCertificate::toDer() {
+TQByteArray qba;
#ifdef KSSL_HAVE_SSL
unsigned int certlen = d->kossl->i2d_X509(getCert(), NULL);
unsigned char *cert = new unsigned char[certlen];
@@ -972,9 +972,9 @@ return qba;
-QByteArray KSSLCertificate::toPem() {
-QByteArray qba;
-QString thecert = toString();
+TQByteArray KSSLCertificate::toPem() {
+TQByteArray qba;
+TQString thecert = toString();
const char *header = "-----BEGIN CERTIFICATE-----\n";
const char *footer = "-----END CERTIFICATE-----\n";
@@ -1000,8 +1000,8 @@ return qba;
#define NETSCAPE_CERT_HDR "certificate"
// what a piece of crap this is
-QByteArray KSSLCertificate::toNetscape() {
-QByteArray qba;
+TQByteArray KSSLCertificate::toNetscape() {
+TQByteArray qba;
#ifdef KSSL_HAVE_SSL
ASN1_HEADER ah;
ASN1_OCTET_STRING os;
@@ -1017,7 +1017,7 @@ KTempFile ktf;
ktf.close();
- QFile qf(ktf.name());
+ TQFile qf(ktf.name());
qf.open(IO_ReadOnly);
char *buf = new char[qf.size()];
qf.readBlock(buf, qf.size());
@@ -1033,15 +1033,15 @@ return qba;
-QString KSSLCertificate::toText() {
-QString text;
+TQString KSSLCertificate::toText() {
+TQString text;
#ifdef KSSL_HAVE_SSL
KTempFile ktf;
d->kossl->X509_print(ktf.fstream(), getCert());
ktf.close();
- QFile qf(ktf.name());
+ TQFile qf(ktf.name());
qf.open(IO_ReadOnly);
char *buf = new char[qf.size()+1];
qf.readBlock(buf, qf.size());
@@ -1054,10 +1054,10 @@ KTempFile ktf;
return text;
}
-// KDE 4: Make it const QString &
-bool KSSLCertificate::setCert(QString& cert) {
+// KDE 4: Make it const TQString &
+bool KSSLCertificate::setCert(TQString& cert) {
#ifdef KSSL_HAVE_SSL
-QByteArray qba, qbb = cert.local8Bit().copy();
+TQByteArray qba, qbb = cert.local8Bit().copy();
KCodecs::base64Decode(qbb, qba);
unsigned char *qbap = reinterpret_cast<unsigned char *>(qba.data());
X509 *x5c = KOSSL::self()->d2i_X509(NULL, &qbap, qba.size());
@@ -1080,8 +1080,8 @@ return d->_extensions.certTypeCA();
}
-QStringList KSSLCertificate::subjAltNames() const {
- QStringList rc;
+TQStringList KSSLCertificate::subjAltNames() const {
+ TQStringList rc;
#ifdef KSSL_HAVE_SSL
STACK_OF(GENERAL_NAME) *names;
names = (STACK_OF(GENERAL_NAME)*)d->kossl->X509_get_ext_d2i(d->m_cert, NID_subject_alt_name, 0, 0);
@@ -1098,7 +1098,7 @@ QStringList KSSLCertificate::subjAltNames() const {
continue;
}
- QString s = (const char *)d->kossl->ASN1_STRING_data(val->d.ia5);
+ TQString s = (const char *)d->kossl->ASN1_STRING_data(val->d.ia5);
if (!s.isEmpty()) {
rc += s;
}
@@ -1109,9 +1109,9 @@ QStringList KSSLCertificate::subjAltNames() const {
}
-QDataStream& operator<<(QDataStream& s, const KSSLCertificate& r) {
-QStringList qsl;
-QPtrList<KSSLCertificate> cl = const_cast<KSSLCertificate&>(r).chain().getChain();
+TQDataStream& operator<<(TQDataStream& s, const KSSLCertificate& r) {
+TQStringList qsl;
+TQPtrList<KSSLCertificate> cl = const_cast<KSSLCertificate&>(r).chain().getChain();
for (KSSLCertificate *c = cl.first(); c != 0; c = cl.next()) {
qsl << c->toString();
@@ -1125,9 +1125,9 @@ return s;
}
-QDataStream& operator>>(QDataStream& s, KSSLCertificate& r) {
-QStringList qsl;
-QString cert;
+TQDataStream& operator>>(TQDataStream& s, KSSLCertificate& r) {
+TQStringList qsl;
+TQString cert;
s >> cert >> qsl;
diff --git a/kio/kssl/ksslcertificate.h b/kio/kssl/ksslcertificate.h
index 0024b87eb..5b13279ea 100644
--- a/kio/kssl/ksslcertificate.h
+++ b/kio/kssl/ksslcertificate.h
@@ -35,8 +35,8 @@
// There should be no reason to touch the X509 stuff directly.
//
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
class QString;
class QStringList;
@@ -95,7 +95,7 @@ public:
* @param cert the certificate in base64 form
* @return the X.509 certificate, or NULL
*/
- static KSSLCertificate *fromString(QCString cert);
+ static KSSLCertificate *fromString(TQCString cert);
/**
* Create an X.509 certificate from the internal representation.
@@ -121,110 +121,110 @@ public:
enum KSSLPurpose { None=0, SSLServer=1, SSLClient=2,
SMIMESign=3, SMIMEEncrypt=4, Any=5 };
- typedef QValueList<KSSLValidation> KSSLValidationList;
+ typedef TQValueList<KSSLValidation> KSSLValidationList;
/**
* Convert this certificate to a string.
* @return the certificate in base64 format
*/
- QString toString();
+ TQString toString();
/**
* Get the subject of the certificate (X.509 map).
* @return the subject
*/
- QString getSubject() const;
+ TQString getSubject() const;
/**
* Get the issuer of the certificate (X.509 map).
* @return the issuer
*/
- QString getIssuer() const;
+ TQString getIssuer() const;
/**
* Get the date that the certificate becomes valid on.
* @return the date as a string, localised
*/
- QString getNotBefore() const;
+ TQString getNotBefore() const;
/**
* Get the date that the certificate is valid until.
* @return the date as a string, localised
*/
- QString getNotAfter() const;
+ TQString getNotAfter() const;
/**
* Get the date that the certificate becomes valid on.
* @return the date
*/
- QDateTime getQDTNotBefore() const;
+ TQDateTime getQDTNotBefore() const;
/**
* Get the date that the certificate is valid until.
* @return the date
*/
- QDateTime getQDTNotAfter() const;
+ TQDateTime getQDTNotAfter() const;
/**
* Convert the certificate to DER (ASN.1) format.
* @return the binary data of the DER encoding
*/
- QByteArray toDer();
+ TQByteArray toDer();
/**
* Convert the certificate to PEM (base64) format.
* @return the binary data of the PEM encoding
*/
- QByteArray toPem();
+ TQByteArray toPem();
/**
* Convert the certificate to Netscape format.
* @return the binary data of the Netscape encoding
*/
- QByteArray toNetscape();
+ TQByteArray toNetscape();
/**
* Convert the certificate to OpenSSL plain text format.
* @return the OpenSSL text encoding
*/
- QString toText();
+ TQString toText();
/**
* Get the serial number of the certificate.
* @return the serial number as a string
*/
- QString getSerialNumber() const;
+ TQString getSerialNumber() const;
/**
* Get the key type (RSA, DSA, etc).
* @return the key type as a string
*/
- QString getKeyType() const;
+ TQString getKeyType() const;
/**
* Get the public key.
* @return the public key as a hexidecimal string
*/
- QString getPublicKeyText() const;
+ TQString getPublicKeyText() const;
/**
* Get the MD5 digest of the certificate.
* Result is padded with : to separate bytes - it's a text version!
* @return the MD5 digest in a hexidecimal string
*/
- QString getMD5DigestText() const;
+ TQString getMD5DigestText() const;
/**
* Get the MD5 digest of the certificate.
* @return the MD5 digest in a hexidecimal string
*/
- QString getMD5Digest() const;
+ TQString getMD5Digest() const;
/**
* Get the signature.
* @return the signature in text format
*/
- QString getSignatureText() const;
+ TQString getSignatureText() const;
/**
* Check if this is a valid certificate. Will use cached data.
@@ -243,7 +243,7 @@ public:
* The alternate subject name.
* @return string list with subjectAltName
*/
- QStringList subjAltNames() const;
+ TQStringList subjAltNames() const;
/**
* Check if this is a valid certificate. Will use cached data.
@@ -298,7 +298,7 @@ public:
* @param x the code to look up
* @return the message text corresponding to the validation code
*/
- static QString verifyText(KSSLValidation x);
+ static TQString verifyText(KSSLValidation x);
/**
* Explicitly make a copy of this certificate.
@@ -317,7 +317,7 @@ public:
* @param cert the certificate to set to
* @return true on success
*/
- bool setCert(QString& cert);
+ bool setCert(TQString& cert);
/**
* Access the X.509v3 parameters.
@@ -335,19 +335,19 @@ public:
/**
* FIXME: document
*/
- void getEmails(QStringList& to) const;
+ void getEmails(TQStringList& to) const;
/**
* KDEKey is a concatenation "Subject (MD5)", mostly needed for SMIME.
* The result of getKDEKey might change and should not be used for
* persistant storage.
*/
- QString getKDEKey() const;
+ TQString getKDEKey() const;
/**
* Aegypten semantics force us to search by MD5Digest only.
*/
- static QString getMD5DigestFromKDEKey(const QString& k);
+ static TQString getMD5DigestFromKDEKey(const TQString& k);
private:
KIO_EXPORT friend int operator!=(KSSLCertificate& x, KSSLCertificate& y);
@@ -365,8 +365,8 @@ protected:
KSSLValidation processError(int ec);
};
-KIO_EXPORT QDataStream& operator<<(QDataStream& s, const KSSLCertificate& r);
-KIO_EXPORT QDataStream& operator>>(QDataStream& s, KSSLCertificate& r);
+KIO_EXPORT TQDataStream& operator<<(TQDataStream& s, const KSSLCertificate& r);
+KIO_EXPORT TQDataStream& operator>>(TQDataStream& s, KSSLCertificate& r);
KIO_EXPORT int operator==(KSSLCertificate& x, KSSLCertificate& y);
KIO_EXPORT inline int operator!=(KSSLCertificate& x, KSSLCertificate& y)
diff --git a/kio/kssl/ksslcertificatecache.cc b/kio/kssl/ksslcertificatecache.cc
index 3a784ed14..eb4ff2d86 100644
--- a/kio/kssl/ksslcertificatecache.cc
+++ b/kio/kssl/ksslcertificatecache.cc
@@ -66,9 +66,9 @@ void KSSLCertificateCache::loadDefaultPolicies() {
void KSSLCertificateCache::reload() {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
d->dcc->call("kded", "kssld",
"cacheReload()",
data, rettype, retval);
@@ -77,9 +77,9 @@ void KSSLCertificateCache::reload() {
void KSSLCertificateCache::addCertificate(KSSLCertificate& cert,
KSSLCertificatePolicy policy, bool permanent) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
arg << policy;
arg << permanent;
@@ -89,18 +89,18 @@ void KSSLCertificateCache::addCertificate(KSSLCertificate& cert,
}
-// KDE 4: Make it const QString &
-KSSLCertificateCache::KSSLCertificatePolicy KSSLCertificateCache::getPolicyByCN(QString& cn) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+// KDE 4: Make it const TQString &
+KSSLCertificateCache::KSSLCertificatePolicy KSSLCertificateCache::getPolicyByCN(TQString& cn) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cn;
bool rc = d->dcc->call("kded", "kssld",
- "cacheGetPolicyByCN(QString)",
+ "cacheGetPolicyByCN(TQString)",
data, rettype, retval);
if (rc && rettype == "KSSLCertificateCache::KSSLCertificatePolicy") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
KSSLCertificateCache::KSSLCertificatePolicy drc;
retStream >> drc;
return drc;
@@ -110,16 +110,16 @@ return KSSLCertificateCache::Ambiguous;
KSSLCertificateCache::KSSLCertificatePolicy KSSLCertificateCache::getPolicyByCertificate(KSSLCertificate& cert) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
bool rc = d->dcc->call("kded", "kssld",
"cacheGetPolicyByCertificate(KSSLCertificate)",
data, rettype, retval);
if (rc && rettype == "KSSLCertificateCache::KSSLCertificatePolicy") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
KSSLCertificateCache::KSSLCertificatePolicy drc;
retStream >> drc;
return drc;
@@ -128,18 +128,18 @@ return KSSLCertificateCache::Ambiguous;
}
-// KDE 4: Make it const QString &
-bool KSSLCertificateCache::seenCN(QString& cn) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+// KDE 4: Make it const TQString &
+bool KSSLCertificateCache::seenCN(TQString& cn) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cn;
bool rc = d->dcc->call("kded", "kssld",
- "cacheSeenCN(QString)",
+ "cacheSeenCN(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -150,16 +150,16 @@ return false;
bool KSSLCertificateCache::seenCertificate(KSSLCertificate& cert) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
bool rc = d->dcc->call("kded", "kssld",
"cacheSeenCertificate(KSSLCertificate)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -170,16 +170,16 @@ return false;
bool KSSLCertificateCache::isPermanent(KSSLCertificate& cert) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
bool rc = d->dcc->call("kded", "kssld",
"cacheIsPermanent(KSSLCertificate)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -189,18 +189,18 @@ return false;
}
-// KDE 4: Make it const QString &
-bool KSSLCertificateCache::removeByCN(QString& cn) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+// KDE 4: Make it const TQString &
+bool KSSLCertificateCache::removeByCN(TQString& cn) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cn;
bool rc = d->dcc->call("kded", "kssld",
- "cacheRemoveByCN(QString)",
+ "cacheRemoveByCN(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -211,16 +211,16 @@ return false;
bool KSSLCertificateCache::removeByCertificate(KSSLCertificate& cert) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
bool rc = d->dcc->call("kded", "kssld",
"cacheRemoveByCertificate(KSSLCertificate)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -230,21 +230,21 @@ return false;
}
-// KDE 4: Make it const QString &
-bool KSSLCertificateCache::modifyByCN(QString& cn,
+// KDE 4: Make it const TQString &
+bool KSSLCertificateCache::modifyByCN(TQString& cn,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime& expires) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQDateTime& expires) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cn << policy << permanent << expires;
bool rc = d->dcc->call("kded", "kssld",
- "cacheModifyByCN(QString,KSSLCertificateCache::KSSLCertificatePolicy,bool,QDateTime)",
+ "cacheModifyByCN(TQString,KSSLCertificateCache::KSSLCertificatePolicy,bool,TQDateTime)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -257,17 +257,17 @@ return false;
bool KSSLCertificateCache::modifyByCertificate(KSSLCertificate& cert,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime& expires) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQDateTime& expires) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert << policy << permanent << expires;
bool rc = d->dcc->call("kded", "kssld",
- "cacheModifyByCertificate(KSSLCertificate,KSSLCertificateCache::KSSLCertificatePolicy,bool,QDateTime)",
+ "cacheModifyByCertificate(KSSLCertificate,KSSLCertificateCache::KSSLCertificatePolicy,bool,TQDateTime)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -277,37 +277,37 @@ return false;
}
-QStringList KSSLCertificateCache::getHostList(KSSLCertificate& cert) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+TQStringList KSSLCertificateCache::getHostList(KSSLCertificate& cert) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
bool rc = d->dcc->call("kded", "kssld",
"cacheGetHostList(KSSLCertificate)",
data, rettype, retval);
- if (rc && rettype == "QStringList") {
- QDataStream retStream(retval, IO_ReadOnly);
- QStringList drc;
+ if (rc && rettype == "TQStringList") {
+ TQDataStream retStream(retval, IO_ReadOnly);
+ TQStringList drc;
retStream >> drc;
return drc;
}
-return QStringList();
+return TQStringList();
}
-// KDE 4: Make it const QString &
-bool KSSLCertificateCache::addHost(KSSLCertificate& cert, QString& host) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+// KDE 4: Make it const TQString &
+bool KSSLCertificateCache::addHost(KSSLCertificate& cert, TQString& host) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert << host;
bool rc = d->dcc->call("kded", "kssld",
- "cacheAddHost(KSSLCertificate,QString)",
+ "cacheAddHost(KSSLCertificate,TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -317,18 +317,18 @@ return false;
}
-// KDE 4: Make it const QString &
-bool KSSLCertificateCache::removeHost(KSSLCertificate& cert, QString& host) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+// KDE 4: Make it const TQString &
+bool KSSLCertificateCache::removeHost(KSSLCertificate& cert, TQString& host) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert << host;
bool rc = d->dcc->call("kded", "kssld",
- "cacheRemoveHost(KSSLCertificate,QString)",
+ "cacheRemoveHost(KSSLCertificate,TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -338,37 +338,37 @@ return false;
}
-QStringList KSSLCertificateCache::getKDEKeyByEmail(const QString &email) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+TQStringList KSSLCertificateCache::getKDEKeyByEmail(const TQString &email) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << email;
bool rc = d->dcc->call("kded", "kssld",
- "getKDEKeyByEmail(QString)",
+ "getKDEKeyByEmail(TQString)",
data, rettype, retval);
- if (rc && rettype == "QStringList") {
- QDataStream retStream(retval, IO_ReadOnly);
- QStringList drc;
+ if (rc && rettype == "TQStringList") {
+ TQDataStream retStream(retval, IO_ReadOnly);
+ TQStringList drc;
retStream >> drc;
return drc;
}
- return QStringList();
+ return TQStringList();
}
-KSSLCertificate *KSSLCertificateCache::getCertByMD5Digest(const QString &key) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+KSSLCertificate *KSSLCertificateCache::getCertByMD5Digest(const TQString &key) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << key;
bool rc = d->dcc->call("kded", "kssld",
- "getCertByMD5Digest(QString)",
+ "getCertByMD5Digest(TQString)",
data, rettype, retval);
if (rc && rettype == "KSSLCertificate") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
KSSLCertificate *drc = new KSSLCertificate;
retStream >> *drc;
if (drc->getCert())
@@ -380,13 +380,13 @@ KSSLCertificate *KSSLCertificateCache::getCertByMD5Digest(const QString &key) {
}
-QDataStream& operator<<(QDataStream& s, const KSSLCertificateCache::KSSLCertificatePolicy& p) {
+TQDataStream& operator<<(TQDataStream& s, const KSSLCertificateCache::KSSLCertificatePolicy& p) {
s << (Q_UINT32)p;
return s;
}
-QDataStream& operator>>(QDataStream& s, KSSLCertificateCache::KSSLCertificatePolicy& p) {
+TQDataStream& operator>>(TQDataStream& s, KSSLCertificateCache::KSSLCertificatePolicy& p) {
Q_UINT32 pd;
s >> pd;
p = (KSSLCertificateCache::KSSLCertificatePolicy) pd;
diff --git a/kio/kssl/ksslcertificatecache.h b/kio/kssl/ksslcertificatecache.h
index 5c640a2a2..03ee1edbc 100644
--- a/kio/kssl/ksslcertificatecache.h
+++ b/kio/kssl/ksslcertificatecache.h
@@ -22,9 +22,9 @@
#define _INCLUDE_KSSLCCACHE_H
class KSSLCertificate;
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#include <kdelibs_export.h>
@@ -55,35 +55,35 @@ enum KSSLCertificatePolicy { Unknown, Reject, Accept, Prompt, Ambiguous };
// the exact FQDN of the site presenting it)
// If you're just doing an OpenSSL connection, I believe it
// tests this for you, but don't take my word for it.
- KSSLCertificatePolicy getPolicyByCN(QString& cn);
+ KSSLCertificatePolicy getPolicyByCN(TQString& cn);
KSSLCertificatePolicy getPolicyByCertificate(KSSLCertificate& cert);
- bool seenCN(QString& cn);
+ bool seenCN(TQString& cn);
bool seenCertificate(KSSLCertificate& cert);
- bool removeByCN(QString& cn);
+ bool removeByCN(TQString& cn);
bool removeByCertificate(KSSLCertificate& cert);
bool isPermanent(KSSLCertificate& cert);
- bool modifyByCN(QString& cn,
+ bool modifyByCN(TQString& cn,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime& expires);
+ TQDateTime& expires);
bool modifyByCertificate(KSSLCertificate& cert,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime& expires);
+ TQDateTime& expires);
- QStringList getHostList(KSSLCertificate& cert);
- bool addHost(KSSLCertificate& cert, QString& host);
- bool removeHost(KSSLCertificate& cert, QString& host);
+ TQStringList getHostList(KSSLCertificate& cert);
+ bool addHost(KSSLCertificate& cert, TQString& host);
+ bool removeHost(KSSLCertificate& cert, TQString& host);
// SMIME
- QStringList getKDEKeyByEmail(const QString &email);
- KSSLCertificate *getCertByMD5Digest(const QString &key);
+ TQStringList getKDEKeyByEmail(const TQString &email);
+ KSSLCertificate *getCertByMD5Digest(const TQString &key);
void reload();
@@ -101,7 +101,7 @@ private:
};
-KIO_EXPORT QDataStream& operator<<(QDataStream& s, const KSSLCertificateCache::KSSLCertificatePolicy& p);
-KIO_EXPORT QDataStream& operator>>(QDataStream& s, KSSLCertificateCache::KSSLCertificatePolicy& p);
+KIO_EXPORT TQDataStream& operator<<(TQDataStream& s, const KSSLCertificateCache::KSSLCertificatePolicy& p);
+KIO_EXPORT TQDataStream& operator>>(TQDataStream& s, KSSLCertificateCache::KSSLCertificatePolicy& p);
#endif
diff --git a/kio/kssl/ksslcertificatehome.cc b/kio/kssl/ksslcertificatehome.cc
index 48f0b3e3b..c722e2c6b 100644
--- a/kio/kssl/ksslcertificatehome.cc
+++ b/kio/kssl/ksslcertificatehome.cc
@@ -27,11 +27,11 @@
using namespace KNetwork;
-QStringList KSSLCertificateHome::getCertificateList() {
+TQStringList KSSLCertificateHome::getCertificateList() {
KSimpleConfig cfg("ksslcertificates", false);
-QStringList list = cfg.groupList();
-QString defaultstr("<default>");
-QString blankstr("");
+TQStringList list = cfg.groupList();
+TQString defaultstr("<default>");
+TQString blankstr("");
list.remove(defaultstr);
list.remove(blankstr);
@@ -40,8 +40,8 @@ return list;
}
-// KDE 4: make it const QString &
-void KSSLCertificateHome::setDefaultCertificate(QString name, QString host, bool send, bool prompt) {
+// KDE 4: make it const TQString &
+void KSSLCertificateHome::setDefaultCertificate(TQString name, TQString host, bool send, bool prompt) {
KSimpleConfig cfg("ksslauthmap", false);
#ifdef Q_WS_WIN //temporary
@@ -56,28 +56,28 @@ KSimpleConfig cfg("ksslauthmap", false);
}
-// KDE 4: make it const QString &
-void KSSLCertificateHome::setDefaultCertificate(KSSLPKCS12 *cert, QString host, bool send, bool prompt) {
+// KDE 4: make it const TQString &
+void KSSLCertificateHome::setDefaultCertificate(KSSLPKCS12 *cert, TQString host, bool send, bool prompt) {
if (cert)
KSSLCertificateHome::setDefaultCertificate(cert->name(), host, send, prompt);
}
-// KDE 4: make it const QString &
-bool KSSLCertificateHome::addCertificate(QString filename, QString password, bool storePass) {
+// KDE 4: make it const TQString &
+bool KSSLCertificateHome::addCertificate(TQString filename, TQString password, bool storePass) {
KSSLPKCS12 *pkcs = KSSLPKCS12::loadCertFile(filename, password);
if (!pkcs) return false;
- KSSLCertificateHome::addCertificate(pkcs, storePass?password:QString(""));
+ KSSLCertificateHome::addCertificate(pkcs, storePass?password:TQString(""));
delete pkcs;
return true;
}
-// KDE 4: make it const QString &
-bool KSSLCertificateHome::addCertificate(KSSLPKCS12 *cert, QString passToStore) {
+// KDE 4: make it const TQString &
+bool KSSLCertificateHome::addCertificate(KSSLPKCS12 *cert, TQString passToStore) {
if (!cert) return false;
KSimpleConfig cfg("ksslcertificates", false);
@@ -89,7 +89,7 @@ KSimpleConfig cfg("ksslcertificates", false);
return true;
}
-bool KSSLCertificateHome::deleteCertificate(const QString &filename, const QString &password) {
+bool KSSLCertificateHome::deleteCertificate(const TQString &filename, const TQString &password) {
KSSLPKCS12 *pkcs = KSSLPKCS12::loadCertFile(filename, password);
if (!pkcs) return false;
@@ -106,7 +106,7 @@ bool KSSLCertificateHome::deleteCertificate(KSSLPKCS12 *cert) {
return deleteCertificateByName(cert->name());
}
-bool KSSLCertificateHome::deleteCertificateByName(const QString &name) {
+bool KSSLCertificateHome::deleteCertificateByName(const TQString &name) {
if (name.isEmpty()) return false;
KSimpleConfig cfg("ksslcertificates", false);
@@ -117,8 +117,8 @@ KSimpleConfig cfg("ksslcertificates", false);
return ok;
}
-// KDE 4: make it const QString &
-KSSLPKCS12* KSSLCertificateHome::getCertificateByName(QString name, QString password) {
+// KDE 4: make it const TQString &
+KSSLPKCS12* KSSLCertificateHome::getCertificateByName(TQString name, TQString password) {
KSimpleConfig cfg("ksslcertificates", false);
if (!cfg.hasGroup(name)) return NULL;
@@ -128,8 +128,8 @@ KSimpleConfig cfg("ksslcertificates", false);
}
-// KDE 4: make it const QString &
-KSSLPKCS12* KSSLCertificateHome::getCertificateByName(QString name) {
+// KDE 4: make it const TQString &
+KSSLPKCS12* KSSLCertificateHome::getCertificateByName(TQString name) {
KSimpleConfig cfg("ksslcertificates", false);
if (!cfg.hasGroup(name)) return NULL;
@@ -139,21 +139,21 @@ KSimpleConfig cfg("ksslcertificates", false);
}
-// KDE 4: make it const QString &
-bool KSSLCertificateHome::hasCertificateByName(QString name) {
+// KDE 4: make it const TQString &
+bool KSSLCertificateHome::hasCertificateByName(TQString name) {
KSimpleConfig cfg("ksslcertificates", false);
if (!cfg.hasGroup(name)) return false;
return true;
}
-// KDE 4: make it const QString &
-KSSLPKCS12* KSSLCertificateHome::getCertificateByHost(QString host, QString password, KSSLAuthAction *aa) {
+// KDE 4: make it const TQString &
+KSSLPKCS12* KSSLCertificateHome::getCertificateByHost(TQString host, TQString password, KSSLAuthAction *aa) {
return KSSLCertificateHome::getCertificateByName(KSSLCertificateHome::getDefaultCertificateName(host, aa), password);
}
-// KDE 4: make it const QString &
-QString KSSLCertificateHome::getDefaultCertificateName(QString host, KSSLAuthAction *aa) {
+// KDE 4: make it const TQString &
+TQString KSSLCertificateHome::getDefaultCertificateName(TQString host, KSSLAuthAction *aa) {
KSimpleConfig cfg("ksslauthmap", false);
#ifdef Q_WS_WIN //temporary
@@ -162,7 +162,7 @@ KSimpleConfig cfg("ksslauthmap", false);
if (!cfg.hasGroup(KResolver::domainToAscii(host))) {
#endif
if (aa) *aa = AuthNone;
- return QString::null;
+ return TQString::null;
} else {
#ifdef Q_WS_WIN //temporary
cfg.setGroup(host);
@@ -185,12 +185,12 @@ KSimpleConfig cfg("ksslauthmap", false);
}
-QString KSSLCertificateHome::getDefaultCertificateName(KSSLAuthAction *aa) {
+TQString KSSLCertificateHome::getDefaultCertificateName(KSSLAuthAction *aa) {
KConfig cfg("cryptodefaults", false);
cfg.setGroup("Auth");
if (aa) {
- QString am = cfg.readEntry("AuthMethod", "");
+ TQString am = cfg.readEntry("AuthMethod", "");
if (am == "send")
*aa = AuthSend;
else if (am == "prompt")
@@ -203,9 +203,9 @@ return cfg.readEntry("DefaultCert", "");
}
-// KDE 4: make it const QString &
-KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(QString password, KSSLAuthAction *aa) {
-QString name = KSSLCertificateHome::getDefaultCertificateName(aa);
+// KDE 4: make it const TQString &
+KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(TQString password, KSSLAuthAction *aa) {
+TQString name = KSSLCertificateHome::getDefaultCertificateName(aa);
KSimpleConfig cfg("ksslcertificates", false);
if (name.isEmpty()) return NULL;
@@ -217,7 +217,7 @@ KSimpleConfig cfg("ksslcertificates", false);
KSSLPKCS12* KSSLCertificateHome::getDefaultCertificate(KSSLAuthAction *aa) {
-QString name = KSSLCertificateHome::getDefaultCertificateName(aa);
+TQString name = KSSLCertificateHome::getDefaultCertificateName(aa);
KSimpleConfig cfg("ksslcertificates", false);
if (name.isEmpty()) return NULL;
@@ -228,8 +228,8 @@ KSimpleConfig cfg("ksslcertificates", false);
}
-// KDE 4: make it const QString &
-void KSSLCertificateHome::setDefaultCertificate(QString name, bool send, bool prompt) {
+// KDE 4: make it const TQString &
+void KSSLCertificateHome::setDefaultCertificate(TQString name, bool send, bool prompt) {
KSimpleConfig cfg("ksslauthmap", false);
cfg.setGroup("<default>");
diff --git a/kio/kssl/ksslcertificatehome.h b/kio/kssl/ksslcertificatehome.h
index 9dd26331c..1a77c1d26 100644
--- a/kio/kssl/ksslcertificatehome.h
+++ b/kio/kssl/ksslcertificatehome.h
@@ -23,8 +23,8 @@
class KSSLCertificate;
class KSSLPKCS12;
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -38,48 +38,48 @@ public:
* These methods might dynamically allocate an object for you. Be sure
* to delete them when you are done.
*/
- static KSSLPKCS12* getCertificateByHost(QString host, QString password, KSSLAuthAction* aa);
- static KSSLPKCS12* getCertificateByName(QString name, QString password);
- static KSSLPKCS12* getCertificateByName(QString name);
- static QString getDefaultCertificateName(QString host, KSSLAuthAction *aa = NULL);
- static QString getDefaultCertificateName(KSSLAuthAction *aa = NULL);
- static KSSLPKCS12* getDefaultCertificate(QString password, KSSLAuthAction *aa = NULL);
+ static KSSLPKCS12* getCertificateByHost(TQString host, TQString password, KSSLAuthAction* aa);
+ static KSSLPKCS12* getCertificateByName(TQString name, TQString password);
+ static KSSLPKCS12* getCertificateByName(TQString name);
+ static TQString getDefaultCertificateName(TQString host, KSSLAuthAction *aa = NULL);
+ static TQString getDefaultCertificateName(KSSLAuthAction *aa = NULL);
+ static KSSLPKCS12* getDefaultCertificate(TQString password, KSSLAuthAction *aa = NULL);
static KSSLPKCS12* getDefaultCertificate(KSSLAuthAction *aa = NULL);
- static bool hasCertificateByName(QString name);
+ static bool hasCertificateByName(TQString name);
/*
* These set the default certificate for hosts without a policy.
*/
- static void setDefaultCertificate(QString name, bool send = true, bool prompt = false);
+ static void setDefaultCertificate(TQString name, bool send = true, bool prompt = false);
static void setDefaultCertificate(KSSLPKCS12 *cert, bool send = true, bool prompt = false);
/*
* These set the default certificate for a host.
*/
- static void setDefaultCertificate(QString name, QString host, bool send = true, bool prompt = false);
- static void setDefaultCertificate(KSSLPKCS12 *cert, QString host, bool send = true, bool prompt = false);
+ static void setDefaultCertificate(TQString name, TQString host, bool send = true, bool prompt = false);
+ static void setDefaultCertificate(KSSLPKCS12 *cert, TQString host, bool send = true, bool prompt = false);
/*
* These add a certificate to the repository.
* Returns: true on success, false error
*/
- static bool addCertificate(QString filename, QString password, bool storePass = false);
- static bool addCertificate(KSSLPKCS12 *cert, QString passToStore = QString::null);
+ static bool addCertificate(TQString filename, TQString password, bool storePass = false);
+ static bool addCertificate(KSSLPKCS12 *cert, TQString passToStore = TQString::null);
/*
* These deletes a certificate from the repository.
* Returns: true on success, false error
*/
- static bool deleteCertificate(const QString &filename, const QString &password);
+ static bool deleteCertificate(const TQString &filename, const TQString &password);
static bool deleteCertificate(KSSLPKCS12 *cert);
- static bool deleteCertificateByName(const QString &name);
+ static bool deleteCertificateByName(const TQString &name);
/*
* Returns the list of certificates available
*/
- static QStringList getCertificateList();
+ static TQStringList getCertificateList();
private:
class KSSLCertificateHomePrivate;
diff --git a/kio/kssl/ksslconnectioninfo.cc b/kio/kssl/ksslconnectioninfo.cc
index 5fb58cb75..ccc7fc780 100644
--- a/kio/kssl/ksslconnectioninfo.cc
+++ b/kio/kssl/ksslconnectioninfo.cc
@@ -38,17 +38,17 @@ void KSSLConnectionInfo::clean() {
}
-const QString& KSSLConnectionInfo::getCipherVersion() const {
+const TQString& KSSLConnectionInfo::getCipherVersion() const {
return m_cipherVersion;
}
-const QString& KSSLConnectionInfo::getCipherDescription() const {
+const TQString& KSSLConnectionInfo::getCipherDescription() const {
return m_cipherDescription;
}
-const QString& KSSLConnectionInfo::getCipher() const {
+const TQString& KSSLConnectionInfo::getCipher() const {
return m_cipherName;
}
diff --git a/kio/kssl/ksslconnectioninfo.h b/kio/kssl/ksslconnectioninfo.h
index 17a6af9bf..4d82c6ce2 100644
--- a/kio/kssl/ksslconnectioninfo.h
+++ b/kio/kssl/ksslconnectioninfo.h
@@ -21,7 +21,7 @@
#ifndef _KSSLCONNECTIONINFO_H
#define _KSSLCONNECTIONINFO_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -49,19 +49,19 @@ public:
* Get the cipher in use.
* @return the cipher in use
*/
- const QString& getCipher() const;
+ const TQString& getCipher() const;
/**
* Describe the cipher in use.
* @return the cipher description (from OpenSSL)
*/
- const QString& getCipherDescription() const;
+ const TQString& getCipherDescription() const;
/**
* Get the version of the cipher in use.
* @return the version of the cipher
*/
- const QString& getCipherVersion() const;
+ const TQString& getCipherVersion() const;
/**
* Get the number of bits of the cipher that are actually used.
@@ -82,9 +82,9 @@ protected:
// These are here so KSSL can access them directly
// It's just as easy as making accessors - they're friends afterall!
int m_iCipherUsedBits, m_iCipherBits;
- QString m_cipherName;
- QString m_cipherDescription;
- QString m_cipherVersion;
+ TQString m_cipherName;
+ TQString m_cipherDescription;
+ TQString m_cipherVersion;
private:
class KSSLConnectionInfoPrivate;
diff --git a/kio/kssl/ksslcsessioncache.cc b/kio/kssl/ksslcsessioncache.cc
index 7dd1c956b..d39638717 100644
--- a/kio/kssl/ksslcsessioncache.cc
+++ b/kio/kssl/ksslcsessioncache.cc
@@ -18,9 +18,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpair.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqpair.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <kstaticdeleter.h>
@@ -54,15 +54,15 @@
#ifdef KSSL_HAVE_SSL
-typedef QPair<QString,QString> KSSLCSession;
-typedef QPtrList<KSSLCSession> KSSLCSessions;
+typedef QPair<TQString,TQString> KSSLCSession;
+typedef TQPtrList<KSSLCSession> KSSLCSessions;
static KSSLCSessions *sessions = 0L;
static KStaticDeleter<KSSLCSessions> med;
-static QString URLtoKey(const KURL &kurl) {
- return kurl.host() + ":" + kurl.protocol() + ":" + QString::number(kurl.port());
+static TQString URLtoKey(const KURL &kurl) {
+ return kurl.host() + ":" + kurl.protocol() + ":" + TQString::number(kurl.port());
}
@@ -74,10 +74,10 @@ static void setup() {
#endif
-QString KSSLCSessionCache::getSessionForURL(const KURL &kurl) {
+TQString KSSLCSessionCache::getSessionForURL(const KURL &kurl) {
#ifdef KSSL_HAVE_SSL
- if (!sessions) return QString::null;
- QString key = URLtoKey(kurl);
+ if (!sessions) return TQString::null;
+ TQString key = URLtoKey(kurl);
for(KSSLCSession *it = sessions->first(); it; it=sessions->next()) {
if (it->first == key) {
@@ -91,18 +91,18 @@ QString KSSLCSessionCache::getSessionForURL(const KURL &kurl) {
#if 0
kdDebug(7029) <<"Negative caching " <<key <<endl;
if (sessions->count() >= MAX_ENTRIES) sessions->removeLast();
- sessions->prepend(new KSSLCSession(key, QString::null));
+ sessions->prepend(new KSSLCSession(key, TQString::null));
#endif
#endif
- return QString::null;
+ return TQString::null;
}
-void KSSLCSessionCache::putSessionForURL(const KURL &kurl, const QString &session) {
+void KSSLCSessionCache::putSessionForURL(const KURL &kurl, const TQString &session) {
#ifdef KSSL_HAVE_SSL
if (!sessions) setup();
- QString key = URLtoKey(kurl);
+ TQString key = URLtoKey(kurl);
KSSLCSession *it;
for(it = sessions->first(); it && it->first != key; it=sessions->next());
diff --git a/kio/kssl/ksslcsessioncache.h b/kio/kssl/ksslcsessioncache.h
index 839d85e06..c7a6b9a16 100644
--- a/kio/kssl/ksslcsessioncache.h
+++ b/kio/kssl/ksslcsessioncache.h
@@ -32,16 +32,16 @@ class KIO_EXPORT KSSLCSessionCache {
/**
* Store a SSL session (client side only)
* @param kurl URL the key belongs to. Method, host and port are used
- * @param session QString representing session to store
+ * @param session TQString representing session to store
*/
- static void putSessionForURL(const KURL &kurl, const QString &session);
+ static void putSessionForURL(const KURL &kurl, const TQString &session);
/**
* Retrieve a SSL session (client side only)
* @param kurl URL the key belongs to
- * @return if a key can be found, QString::null otherwise
+ * @return if a key can be found, TQString::null otherwise
*/
- static QString getSessionForURL(const KURL &kurl);
+ static TQString getSessionForURL(const KURL &kurl);
};
#endif
diff --git a/kio/kssl/ksslinfodlg.cc b/kio/kssl/ksslinfodlg.cc
index c3d80d4bb..70e8a094c 100644
--- a/kio/kssl/ksslinfodlg.cc
+++ b/kio/kssl/ksslinfodlg.cc
@@ -23,12 +23,12 @@
#include <kssl.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qscrollview.h>
-#include <qfile.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqscrollview.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -51,39 +51,39 @@ class KSSLInfoDlg::KSSLInfoDlgPrivate {
private:
friend class KSSLInfoDlg;
bool m_secCon;
- QGridLayout *m_layout;
+ TQGridLayout *m_layout;
KComboBox *_chain;
KSSLCertificate *_cert;
KSSLCertificate::KSSLValidationList _cert_ksvl;
bool inQuestion;
- QLabel *_serialNum;
- QLabel *_csl;
- QLabel *_validFrom;
- QLabel *_validUntil;
- QLabel *_digest;
+ TQLabel *_serialNum;
+ TQLabel *_csl;
+ TQLabel *_validFrom;
+ TQLabel *_validUntil;
+ TQLabel *_digest;
- QLabel *pixmap;
- QLabel *info;
+ TQLabel *pixmap;
+ TQLabel *info;
KSSLCertBox *_subject, *_issuer;
};
-KSSLInfoDlg::KSSLInfoDlg(bool secureConnection, QWidget *parent, const char *name, bool modal)
+KSSLInfoDlg::KSSLInfoDlg(bool secureConnection, TQWidget *parent, const char *name, bool modal)
: KDialog(parent, name, modal, Qt::WDestructiveClose), d(new KSSLInfoDlgPrivate) {
- QVBoxLayout *topLayout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout *topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
d->m_secCon = secureConnection;
- d->m_layout = new QGridLayout(topLayout, 3, 3, KDialog::spacingHint());
+ d->m_layout = new TQGridLayout(topLayout, 3, 3, KDialog::spacingHint());
d->m_layout->setColStretch(1, 1);
d->m_layout->setColStretch(2, 1);
- d->pixmap = new QLabel(this);
+ d->pixmap = new TQLabel(this);
d->m_layout->addWidget(d->pixmap, 0, 0);
- d->info = new QLabel(this);
+ d->info = new TQLabel(this);
d->m_layout->addWidget(d->info, 0, 1);
if (KSSL::doesSSLWork()) {
@@ -100,19 +100,19 @@ KSSLInfoDlg::KSSLInfoDlg(bool secureConnection, QWidget *parent, const char *nam
}
d->m_layout->addRowSpacing( 0, 50 ); // give minimum height to look better
- QHBoxLayout *buttonLayout = new QHBoxLayout(topLayout, KDialog::spacingHint());
+ TQHBoxLayout *buttonLayout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
buttonLayout->addStretch( 1 );
KPushButton *button;
if (KSSL::doesSSLWork()) {
button = new KPushButton(KGuiItem(i18n("C&ryptography Configuration..."),"configure"), this);
- connect(button, SIGNAL(clicked()), SLOT(launchConfig()));
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(launchConfig()));
buttonLayout->addWidget( button );
}
button = new KPushButton(KStdGuiItem::close(), this);
- connect(button, SIGNAL(clicked()), SLOT(close()));
+ connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(close()));
buttonLayout->addWidget( button );
button->setFocus();
@@ -155,7 +155,7 @@ void KSSLInfoDlg::setSecurityInQuestion(bool isIt) {
}
-void KSSLInfoDlg::setup( KSSL & ssl, const QString & ip, const QString & url )
+void KSSLInfoDlg::setup( KSSL & ssl, const TQString & ip, const TQString & url )
{
setup(
&ssl.peerInfo().getPeerCertificate(),
@@ -171,20 +171,20 @@ void KSSLInfoDlg::setup( KSSL & ssl, const QString & ip, const QString & url )
}
void KSSLInfoDlg::setup(KSSLCertificate *cert,
- const QString& ip, const QString& url,
- const QString& cipher, const QString& cipherdesc,
- const QString& sslversion, int usedbits, int bits,
+ const TQString& ip, const TQString& url,
+ const TQString& cipher, const TQString& cipherdesc,
+ const TQString& sslversion, int usedbits, int bits,
KSSLCertificate::KSSLValidation /*certState*/) {
// Needed to put the GUI stuff here to get the layouting right
d->_cert = cert;
- QGridLayout *layout = new QGridLayout(4, 2, KDialog::spacingHint());
+ TQGridLayout *layout = new TQGridLayout(4, 2, KDialog::spacingHint());
- layout->addWidget(new QLabel(i18n("Chain:"), this), 0, 0);
+ layout->addWidget(new TQLabel(i18n("Chain:"), this), 0, 0);
d->_chain = new KComboBox(this);
layout->addMultiCellWidget(d->_chain, 1, 1, 0, 1);
- connect(d->_chain, SIGNAL(activated(int)), this, SLOT(slotChain(int)));
+ connect(d->_chain, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChain(int)));
d->_chain->clear();
@@ -192,75 +192,75 @@ void KSSLInfoDlg::setup(KSSLCertificate *cert,
d->_chain->setEnabled(true);
d->_chain->insertItem(i18n("0 - Site Certificate"));
int cnt = 0;
- QPtrList<KSSLCertificate> cl = cert->chain().getChain();
+ TQPtrList<KSSLCertificate> cl = cert->chain().getChain();
cl.setAutoDelete(true);
for (KSSLCertificate *c = cl.first(); c != 0; c = cl.next()) {
KSSLX509Map map(c->getSubject());
- QString id;
+ TQString id;
id = map.getValue("CN");
if (id.length() == 0)
id = map.getValue("O");
if (id.length() == 0)
id = map.getValue("OU");
- d->_chain->insertItem(QString::number(++cnt)+" - "+id);
+ d->_chain->insertItem(TQString::number(++cnt)+" - "+id);
}
d->_chain->setCurrentItem(0);
} else d->_chain->setEnabled(false);
- layout->addWidget(new QLabel(i18n("Peer certificate:"), this), 2, 0);
+ layout->addWidget(new TQLabel(i18n("Peer certificate:"), this), 2, 0);
layout->addWidget(d->_subject = static_cast<KSSLCertBox*>(buildCertInfo(cert->getSubject())), 3, 0);
- layout->addWidget(new QLabel(i18n("Issuer:"), this), 2, 1);
+ layout->addWidget(new TQLabel(i18n("Issuer:"), this), 2, 1);
layout->addWidget(d->_issuer = static_cast<KSSLCertBox*>(buildCertInfo(cert->getIssuer())), 3, 1);
d->m_layout->addMultiCell(layout, 1, 1, 0, 2);
- layout = new QGridLayout(11, 2, KDialog::spacingHint());
+ layout = new TQGridLayout(11, 2, KDialog::spacingHint());
layout->setColStretch(1, 1);
- QLabel *ipl = new QLabel(i18n("IP address:"), this);
+ TQLabel *ipl = new TQLabel(i18n("IP address:"), this);
layout->addWidget(ipl, 0, 0);
if (ip.isEmpty()) {
ipl->hide();
}
- layout->addWidget(ipl = new QLabel(ip, this), 0, 1);
+ layout->addWidget(ipl = new TQLabel(ip, this), 0, 1);
if (ip.isEmpty()) {
ipl->hide();
}
- layout->addWidget(new QLabel(i18n("URL:"), this), 1, 0);
+ layout->addWidget(new TQLabel(i18n("URL:"), this), 1, 0);
KSqueezedTextLabel *urlLabel = new KSqueezedTextLabel(url, this);
layout->addWidget(urlLabel, 1, 1);
- layout->addWidget(new QLabel(i18n("Certificate state:"), this), 2, 0);
+ layout->addWidget(new TQLabel(i18n("Certificate state:"), this), 2, 0);
- layout->addWidget(d->_csl = new QLabel("", this), 2, 1);
+ layout->addWidget(d->_csl = new TQLabel("", this), 2, 1);
update();
- layout->addWidget(new QLabel(i18n("Valid from:"), this), 3, 0);
- layout->addWidget(d->_validFrom = new QLabel("", this), 3, 1);
- layout->addWidget(new QLabel(i18n("Valid until:"), this), 4, 0);
- layout->addWidget(d->_validUntil = new QLabel("", this), 4, 1);
-
- layout->addWidget(new QLabel(i18n("Serial number:"), this), 5, 0);
- layout->addWidget(d->_serialNum = new QLabel("", this), 5, 1);
- layout->addWidget(new QLabel(i18n("MD5 digest:"), this), 6, 0);
- layout->addWidget(d->_digest = new QLabel("", this), 6, 1);
-
- layout->addWidget(new QLabel(i18n("Cipher in use:"), this), 7, 0);
- layout->addWidget(new QLabel(cipher, this), 7, 1);
- layout->addWidget(new QLabel(i18n("Details:"), this), 8, 0);
- layout->addWidget(new QLabel(cipherdesc.simplifyWhiteSpace(), this), 8, 1);
- layout->addWidget(new QLabel(i18n("SSL version:"), this), 9, 0);
- layout->addWidget(new QLabel(sslversion, this), 9, 1);
- layout->addWidget(new QLabel(i18n("Cipher strength:"), this), 10, 0);
- layout->addWidget(new QLabel(i18n("%1 bits used of a %2 bit cipher").arg(usedbits).arg(bits), this), 10, 1);
+ layout->addWidget(new TQLabel(i18n("Valid from:"), this), 3, 0);
+ layout->addWidget(d->_validFrom = new TQLabel("", this), 3, 1);
+ layout->addWidget(new TQLabel(i18n("Valid until:"), this), 4, 0);
+ layout->addWidget(d->_validUntil = new TQLabel("", this), 4, 1);
+
+ layout->addWidget(new TQLabel(i18n("Serial number:"), this), 5, 0);
+ layout->addWidget(d->_serialNum = new TQLabel("", this), 5, 1);
+ layout->addWidget(new TQLabel(i18n("MD5 digest:"), this), 6, 0);
+ layout->addWidget(d->_digest = new TQLabel("", this), 6, 1);
+
+ layout->addWidget(new TQLabel(i18n("Cipher in use:"), this), 7, 0);
+ layout->addWidget(new TQLabel(cipher, this), 7, 1);
+ layout->addWidget(new TQLabel(i18n("Details:"), this), 8, 0);
+ layout->addWidget(new TQLabel(cipherdesc.simplifyWhiteSpace(), this), 8, 1);
+ layout->addWidget(new TQLabel(i18n("SSL version:"), this), 9, 0);
+ layout->addWidget(new TQLabel(sslversion, this), 9, 1);
+ layout->addWidget(new TQLabel(i18n("Cipher strength:"), this), 10, 0);
+ layout->addWidget(new TQLabel(i18n("%1 bits used of a %2 bit cipher").arg(usedbits).arg(bits), this), 10, 1);
d->m_layout->addMultiCell(layout, 2, 2, 0, 2);
displayCert(cert);
}
-void KSSLInfoDlg::setCertState(const QString &errorNrs)
+void KSSLInfoDlg::setCertState(const TQString &errorNrs)
{
d->_cert_ksvl.clear();
- QStringList errors = QStringList::split(':', errorNrs);
- for(QStringList::ConstIterator it = errors.begin();
+ TQStringList errors = TQStringList::split(':', errorNrs);
+ for(TQStringList::ConstIterator it = errors.begin();
it != errors.end(); ++it)
{
d->_cert_ksvl << (KSSLCertificate::KSSLValidation) (*it).toInt();
@@ -268,21 +268,21 @@ void KSSLInfoDlg::setCertState(const QString &errorNrs)
}
void KSSLInfoDlg::displayCert(KSSLCertificate *x) {
- QPalette cspl;
+ TQPalette cspl;
d->_serialNum->setText(x->getSerialNumber());
cspl = d->_validFrom->palette();
- if (x->getQDTNotBefore() > QDateTime::currentDateTime(Qt::UTC))
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
- else cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ if (x->getQDTNotBefore() > TQDateTime::currentDateTime(Qt::UTC))
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
+ else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
d->_validFrom->setPalette(cspl);
d->_validFrom->setText(x->getNotBefore());
cspl = d->_validUntil->palette();
- if (x->getQDTNotAfter() < QDateTime::currentDateTime(Qt::UTC))
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
- else cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ if (x->getQDTNotAfter() < TQDateTime::currentDateTime(Qt::UTC))
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
+ else cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
d->_validUntil->setPalette(cspl);
d->_validUntil->setText(x->getNotAfter());
@@ -305,8 +305,8 @@ void KSSLInfoDlg::displayCert(KSSLCertificate *x) {
ksv = ksvl.first();
if (ksv == KSSLCertificate::SelfSigned) {
- if (x->getQDTNotAfter() > QDateTime::currentDateTime(Qt::UTC) &&
- x->getQDTNotBefore() < QDateTime::currentDateTime(Qt::UTC)) {
+ if (x->getQDTNotAfter() > TQDateTime::currentDateTime(Qt::UTC) &&
+ x->getQDTNotBefore() < TQDateTime::currentDateTime(Qt::UTC)) {
if (KSSLSigners().useForSSL(*x))
ksv = KSSLCertificate::Ok;
} else {
@@ -316,13 +316,13 @@ void KSSLInfoDlg::displayCert(KSSLCertificate *x) {
}
if (ksv == KSSLCertificate::Ok) {
- cspl.setColor(QColorGroup::Foreground, QColor(42,153,59));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(42,153,59));
} else if (ksv != KSSLCertificate::Irrelevant) {
- cspl.setColor(QColorGroup::Foreground, QColor(196,33,21));
+ cspl.setColor(TQColorGroup::Foreground, TQColor(196,33,21));
}
d->_csl->setPalette(cspl);
- QString errorStr;
+ TQString errorStr;
for(KSSLCertificate::KSSLValidationList::ConstIterator it = ksvl.begin();
it != ksvl.end(); ++it) {
if (!errorStr.isEmpty())
@@ -344,7 +344,7 @@ void KSSLInfoDlg::slotChain(int x) {
if (x == 0) {
displayCert(d->_cert);
} else {
- QPtrList<KSSLCertificate> cl = d->_cert->chain().getChain();
+ TQPtrList<KSSLCertificate> cl = d->_cert->chain().getChain();
cl.setAutoDelete(true);
for (int i = 0; i < x-1; i++)
cl.remove((unsigned int)0);
@@ -356,7 +356,7 @@ void KSSLInfoDlg::slotChain(int x) {
}
-KSSLCertBox *KSSLInfoDlg::certInfoWidget(QWidget *parent, const QString &certName, QWidget *mailCatcher) {
+KSSLCertBox *KSSLInfoDlg::certInfoWidget(TQWidget *parent, const TQString &certName, TQWidget *mailCatcher) {
KSSLCertBox *result = new KSSLCertBox(parent);
if (!certName.isEmpty()) {
result->setValues(certName, mailCatcher);
@@ -365,23 +365,23 @@ KSSLCertBox *KSSLInfoDlg::certInfoWidget(QWidget *parent, const QString &certNam
}
-KSSLCertBox::KSSLCertBox(QWidget *parent, const char *name, WFlags f)
-: QScrollView(parent, name, f)
+KSSLCertBox::KSSLCertBox(TQWidget *parent, const char *name, WFlags f)
+: TQScrollView(parent, name, f)
{
_frame = 0L;
- setBackgroundMode(QWidget::PaletteButton);
- setValues(QString::null, 0L);
+ setBackgroundMode(TQWidget::PaletteButton);
+ setValues(TQString::null, 0L);
}
-void KSSLCertBox::setValues(QString certName, QWidget *mailCatcher) {
+void KSSLCertBox::setValues(TQString certName, TQWidget *mailCatcher) {
if (_frame) {
removeChild(_frame);
delete _frame;
}
if (certName.isEmpty()) {
- _frame = new QFrame(this);
+ _frame = new TQFrame(this);
addChild(_frame);
viewport()->setBackgroundMode(_frame->backgroundMode());
_frame->show();
@@ -391,50 +391,50 @@ void KSSLCertBox::setValues(QString certName, QWidget *mailCatcher) {
}
KSSLX509Map cert(certName);
- QString tmp;
- viewport()->setBackgroundMode(QWidget::PaletteButton);
- _frame = new QFrame(this);
- QGridLayout *grid = new QGridLayout(_frame, 1, 2, KDialog::marginHint(), KDialog::spacingHint());
+ TQString tmp;
+ viewport()->setBackgroundMode(TQWidget::PaletteButton);
+ _frame = new TQFrame(this);
+ TQGridLayout *grid = new TQGridLayout(_frame, 1, 2, KDialog::marginHint(), KDialog::spacingHint());
grid->setAutoAdd(true);
- QLabel *label = 0L;
+ TQLabel *label = 0L;
if (!(tmp = cert.getValue("O")).isEmpty()) {
- label = new QLabel(i18n("Organization:"), _frame);
+ label = new TQLabel(i18n("Organization:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("OU")).isEmpty()) {
- label = new QLabel(i18n("Organizational unit:"), _frame);
+ label = new TQLabel(i18n("Organizational unit:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("L")).isEmpty()) {
- label = new QLabel(i18n("Locality:"), _frame);
+ label = new TQLabel(i18n("Locality:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("ST")).isEmpty()) {
- label = new QLabel(i18n("Federal State","State:"), _frame);
+ label = new TQLabel(i18n("Federal State","State:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("C")).isEmpty()) {
- label = new QLabel(i18n("Country:"), _frame);
+ label = new TQLabel(i18n("Country:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("CN")).isEmpty()) {
- label = new QLabel(i18n("Common name:"), _frame);
+ label = new TQLabel(i18n("Common name:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ new TQLabel(tmp, _frame);
}
if (!(tmp = cert.getValue("Email")).isEmpty()) {
- label = new QLabel(i18n("Email:"), _frame);
+ label = new TQLabel(i18n("Email:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
if (mailCatcher) {
KURLLabel *mail = new KURLLabel(tmp, tmp, _frame);
- connect(mail, SIGNAL(leftClickedURL(const QString &)), mailCatcher, SLOT(mailClicked(const QString &)));
+ connect(mail, TQT_SIGNAL(leftClickedURL(const TQString &)), mailCatcher, TQT_SLOT(mailClicked(const TQString &)));
} else {
- label = new QLabel(tmp, _frame);
+ label = new TQLabel(tmp, _frame);
}
}
if (label && viewport()) {
@@ -447,16 +447,16 @@ void KSSLCertBox::setValues(QString certName, QWidget *mailCatcher) {
}
-QScrollView *KSSLInfoDlg::buildCertInfo(const QString &certName) {
+TQScrollView *KSSLInfoDlg::buildCertInfo(const TQString &certName) {
return KSSLInfoDlg::certInfoWidget(this, certName, this);
}
-void KSSLInfoDlg::urlClicked(const QString &url) {
+void KSSLInfoDlg::urlClicked(const TQString &url) {
kapp->invokeBrowser(url);
}
-void KSSLInfoDlg::mailClicked(const QString &url) {
- kapp->invokeMailer(url, QString::null);
+void KSSLInfoDlg::mailClicked(const TQString &url) {
+ kapp->invokeMailer(url, TQString::null);
}
#include "ksslinfodlg.moc"
diff --git a/kio/kssl/ksslinfodlg.h b/kio/kssl/ksslinfodlg.h
index b7ff3d2eb..c1591f07d 100644
--- a/kio/kssl/ksslinfodlg.h
+++ b/kio/kssl/ksslinfodlg.h
@@ -27,7 +27,7 @@
#include "ksslx509map.h"
#include "ksslcertificate.h"
#include "kssl.h"
-#include <qscrollview.h>
+#include <tqscrollview.h>
class QWidget;
class KSSLCertBox;
@@ -58,7 +58,7 @@ public:
* @param name the internal name of this instance
* @param modal true if the dialog should be modal
*/
- KSSLInfoDlg(bool secureConnection, QWidget *parent=0L, const char *name=0L, bool modal=false);
+ KSSLInfoDlg(bool secureConnection, TQWidget *parent=0L, const char *name=0L, bool modal=false);
/**
* Destroy this dialog
@@ -87,9 +87,9 @@ public:
* @param certState the certificate state (valid, invalid, etc)
*/
void setup(KSSLCertificate *cert,
- const QString& ip, const QString& url,
- const QString& cipher, const QString& cipherdesc,
- const QString& sslversion, int usedbits, int bits,
+ const TQString& ip, const TQString& url,
+ const TQString& cipher, const TQString& cipherdesc,
+ const TQString& sslversion, int usedbits, int bits,
KSSLCertificate::KSSLValidation certState);
/**
@@ -101,13 +101,13 @@ public:
* @param ip the ip of the remote host
* @param url the url being accessed
*/
- void setup( KSSL & ssl, const QString & ip, const QString & url );
+ void setup( KSSL & ssl, const TQString & ip, const TQString & url );
/**
* Set the errors that were encountered while validating the site
* certificate.
*/
- void setCertState(const QString &errorNrs);
+ void setCertState(const TQString &errorNrs);
/**
* Utility function to generate the widget which displays the detailed
@@ -118,10 +118,10 @@ public:
* @param mailCatcher the class which catches click events on e-mail
* addresses
*/
- static KSSLCertBox *certInfoWidget(QWidget *parent, const QString &certName, QWidget *mailCatcher=0);
+ static KSSLCertBox *certInfoWidget(TQWidget *parent, const TQString &certName, TQWidget *mailCatcher=0);
private:
- QScrollView *buildCertInfo(const QString &certName);
+ TQScrollView *buildCertInfo(const TQString &certName);
void displayCert(KSSLCertificate *x);
class KSSLInfoDlgPrivate;
@@ -129,8 +129,8 @@ private:
private slots:
void launchConfig();
- void urlClicked(const QString &url);
- void mailClicked(const QString &url);
+ void urlClicked(const TQString &url);
+ void mailClicked(const TQString &url);
void slotChain(int x);
};
@@ -146,7 +146,7 @@ private slots:
* @see KSSLInfoDlg
* @short KDE SSL Certificate Box
*/
-class KIO_EXPORT KSSLCertBox : public QScrollView {
+class KIO_EXPORT KSSLCertBox : public TQScrollView {
public:
/**
* Construct a certificate box
@@ -155,7 +155,7 @@ public:
* @param name the internal name of this instance
* @param f widget flags for the object
*/
- KSSLCertBox(QWidget *parent=0L, const char *name=0L, WFlags f=0);
+ KSSLCertBox(TQWidget *parent=0L, const char *name=0L, WFlags f=0);
/**
* Change the contents of the widget
@@ -163,10 +163,10 @@ public:
* @param certName the name ("subject") of the certificate
* @param mailCatcher the widget which catches the url open events
*/
- void setValues(QString certName, QWidget *mailCatcher=0L);
+ void setValues(TQString certName, TQWidget *mailCatcher=0L);
private:
- QFrame *_frame;
+ TQFrame *_frame;
};
#endif
diff --git a/kio/kssl/ksslkeygen.cc b/kio/kssl/ksslkeygen.cc
index 7c231cefc..bbe13e32f 100644
--- a/kio/kssl/ksslkeygen.cc
+++ b/kio/kssl/ksslkeygen.cc
@@ -33,13 +33,13 @@
#include <ktempfile.h>
#include <kwallet.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <assert.h>
-KSSLKeyGen::KSSLKeyGen(QWidget *parent, const char *name, bool modal)
+KSSLKeyGen::KSSLKeyGen(TQWidget *parent, const char *name, bool modal)
:KWizard(parent,name,modal) {
_idx = -1;
@@ -51,9 +51,9 @@ KSSLKeyGen::KSSLKeyGen(QWidget *parent, const char *name, bool modal)
setHelpEnabled(page1, false);
setHelpEnabled(page2, false);
setFinishEnabled(page2, false);
- connect(page2->_password1, SIGNAL(textChanged(const QString&)), this, SLOT(slotPassChanged()));
- connect(page2->_password2, SIGNAL(textChanged(const QString&)), this, SLOT(slotPassChanged()));
- connect(finishButton(), SIGNAL(clicked()), SLOT(slotGenerate()));
+ connect(page2->_password1, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPassChanged()));
+ connect(page2->_password2, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPassChanged()));
+ connect(finishButton(), TQT_SIGNAL(clicked()), TQT_SLOT(slotGenerate()));
#else
// tell him he doesn't have SSL
#endif
@@ -104,7 +104,7 @@ void KSSLKeyGen::slotGenerate() {
#ifndef Q_OS_WIN //TODO: reenable for WIN32
if (rc == 0 && KWallet::Wallet::isEnabled()) {
- rc = KMessageBox::questionYesNo(this, i18n("Do you wish to store the passphrase in your wallet file?"), QString::null, i18n("Store"), i18n("Do Not Store"));
+ rc = KMessageBox::questionYesNo(this, i18n("Do you wish to store the passphrase in your wallet file?"), TQString::null, i18n("Store"), i18n("Do Not Store"));
if (rc == KMessageBox::Yes) {
KWallet::Wallet *w = KWallet::Wallet::openWallet(KWallet::Wallet::LocalWallet(), winId());
if (w) {
@@ -119,7 +119,7 @@ void KSSLKeyGen::slotGenerate() {
}
-int KSSLKeyGen::generateCSR(const QString& name, const QString& pass, int bits, int e) {
+int KSSLKeyGen::generateCSR(const TQString& name, const TQString& pass, int bits, int e) {
#ifdef KSSL_HAVE_SSL
KOSSL *kossl = KOSSL::self();
int rc;
@@ -168,7 +168,7 @@ int KSSLKeyGen::generateCSR(const QString& name, const QString& pass, int bits,
KGlobal::dirs()->addResourceType("kssl", KStandardDirs::kde_default("data") + "kssl");
- QString path = KGlobal::dirs()->saveLocation("kssl");
+ TQString path = KGlobal::dirs()->saveLocation("kssl");
KTempFile csrFile(path + "csr_", ".der");
if (!csrFile.fstream()) {
@@ -203,8 +203,8 @@ int KSSLKeyGen::generateCSR(const QString& name, const QString& pass, int bits,
}
-QStringList KSSLKeyGen::supportedKeySizes() {
- QStringList x;
+TQStringList KSSLKeyGen::supportedKeySizes() {
+ TQStringList x;
#ifdef KSSL_HAVE_SSL
x << i18n("2048 (High Grade)")
diff --git a/kio/kssl/ksslkeygen.h b/kio/kssl/ksslkeygen.h
index d3deb8501..cd1d8e7ab 100644
--- a/kio/kssl/ksslkeygen.h
+++ b/kio/kssl/ksslkeygen.h
@@ -22,8 +22,8 @@
#ifndef _KSSLKEYGEN_H
#define _KSSLKEYGEN_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kwizard.h>
@@ -50,7 +50,7 @@ public:
* @param name the internal name of this instance
* @param modal true if the dialog should be modal
*/
- KSSLKeyGen(QWidget *parent=0L, const char *name=0L, bool modal=false);
+ KSSLKeyGen(TQWidget *parent=0L, const char *name=0L, bool modal=false);
/**
* Destroy this dialog.
@@ -61,7 +61,7 @@ public:
* List the supported key sizes.
* @return the supported key sizes
*/
- static QStringList supportedKeySizes();
+ static TQStringList supportedKeySizes();
/**
* Generate the certificate signing request.
@@ -71,7 +71,7 @@ public:
* @param e the value of the "e" parameter in RSA
* @return 0 on success, non-zero on error
*/
- int generateCSR(const QString& name, const QString& pass, int bits, int e = 0x10001);
+ int generateCSR(const TQString& name, const TQString& pass, int bits, int e = 0x10001);
/**
* Set the key size.
diff --git a/kio/kssl/ksslpeerinfo.cc b/kio/kssl/ksslpeerinfo.cc
index 8be542425..d1c2d00fc 100644
--- a/kio/kssl/ksslpeerinfo.cc
+++ b/kio/kssl/ksslpeerinfo.cc
@@ -22,7 +22,7 @@
#include <config.h>
#endif
-#include <qregexp.h>
+#include <tqregexp.h>
#include "ksslpeerinfo.h"
#include <kdebug.h>
@@ -40,7 +40,7 @@ class KSSLPeerInfoPrivate {
public:
KSSLPeerInfoPrivate() {}
~KSSLPeerInfoPrivate() { }
- QString peerHost;
+ TQString peerHost;
};
@@ -57,7 +57,7 @@ KSSLCertificate& KSSLPeerInfo::getPeerCertificate() {
return m_cert;
}
-void KSSLPeerInfo::setPeerHost(QString realHost) {
+void KSSLPeerInfo::setPeerHost(TQString realHost) {
d->peerHost = realHost.stripWhiteSpace();
while(d->peerHost.endsWith("."))
d->peerHost.truncate(d->peerHost.length()-1);
@@ -65,17 +65,17 @@ void KSSLPeerInfo::setPeerHost(QString realHost) {
#ifdef Q_WS_WIN //TODO kresolver not ported
d->peerHost = d->peerHost.lower();
#else
- d->peerHost = QString::fromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost));
+ d->peerHost = TQString::fromLatin1(KNetwork::KResolver::domainToAscii(d->peerHost));
#endif
}
bool KSSLPeerInfo::certMatchesAddress() {
#ifdef KSSL_HAVE_SSL
KSSLX509Map certinfo(m_cert.getSubject());
- QStringList cns = QStringList::split(QRegExp("[ \n\r]"), certinfo.getValue("CN"));
+ TQStringList cns = TQStringList::split(TQRegExp("[ \n\r]"), certinfo.getValue("CN"));
cns += m_cert.subjAltNames();
- for (QStringList::Iterator cn = cns.begin(); cn != cns.end(); ++cn) {
+ for (TQStringList::Iterator cn = cns.begin(); cn != cns.end(); ++cn) {
if (cnMatchesAddress((*cn).stripWhiteSpace().lower()))
return true;
}
@@ -86,15 +86,15 @@ bool KSSLPeerInfo::certMatchesAddress() {
}
-bool KSSLPeerInfo::cnMatchesAddress(QString cn) {
+bool KSSLPeerInfo::cnMatchesAddress(TQString cn) {
#ifdef KSSL_HAVE_SSL
- QRegExp rx;
+ TQRegExp rx;
kdDebug(7029) << "Matching CN=[" << cn << "] to ["
<< d->peerHost << "]" << endl;
// Check for invalid characters
- if (QRegExp("[^a-zA-Z0-9\\.\\*\\-]").search(cn) >= 0) {
+ if (TQRegExp("[^a-zA-Z0-9\\.\\*\\-]").search(cn) >= 0) {
kdDebug(7029) << "CN contains invalid characters! Failing." << endl;
return false;
}
@@ -120,7 +120,7 @@ bool KSSLPeerInfo::cnMatchesAddress(QString cn) {
if (cn.contains('*')) {
// First make sure that there are at least two valid parts
// after the wildcard (*).
- QStringList parts = QStringList::split('.', cn, false);
+ TQStringList parts = TQStringList::split('.', cn, false);
while (parts.count() > 2)
parts.remove(parts.begin());
@@ -136,14 +136,14 @@ bool KSSLPeerInfo::cnMatchesAddress(QString cn) {
// RFC2818 says that *.example.com should match against
// foo.example.com but not bar.foo.example.com
// (ie. they must have the same number of parts)
- if (QRegExp(cn, false, true).exactMatch(d->peerHost) &&
- QStringList::split('.', cn, false).count() ==
- QStringList::split('.', d->peerHost, false).count())
+ if (TQRegExp(cn, false, true).exactMatch(d->peerHost) &&
+ TQStringList::split('.', cn, false).count() ==
+ TQStringList::split('.', d->peerHost, false).count())
return true;
// *.example.com must match example.com also. Sigh..
if (cn.startsWith("*.")) {
- QString chopped = cn.mid(2);
+ TQString chopped = cn.mid(2);
if (chopped == d->peerHost) {
return true;
}
@@ -161,11 +161,11 @@ bool KSSLPeerInfo::cnMatchesAddress(QString cn) {
void KSSLPeerInfo::reset() {
- d->peerHost = QString::null;
+ d->peerHost = TQString::null;
}
-const QString& KSSLPeerInfo::peerHost() const {
+const TQString& KSSLPeerInfo::peerHost() const {
return d->peerHost;
}
diff --git a/kio/kssl/ksslpeerinfo.h b/kio/kssl/ksslpeerinfo.h
index deacbe830..bdcf91231 100644
--- a/kio/kssl/ksslpeerinfo.h
+++ b/kio/kssl/ksslpeerinfo.h
@@ -23,8 +23,8 @@
class KSSL;
-#include <qglobal.h>
-#include <qstringlist.h>
+#include <tqglobal.h>
+#include <tqstringlist.h>
#include <ksslcertificate.h>
class KSSLPeerInfoPrivate;
@@ -73,7 +73,7 @@ public:
* @return true if it matches
* @see setPeerHost
*/
- bool cnMatchesAddress(QString cn);
+ bool cnMatchesAddress(TQString cn);
/**
* Set the host that we are connected to. This is generally set by
@@ -82,12 +82,12 @@ public:
*
* @param host the hostname
*/
- void setPeerHost(QString host = QString::null);
+ void setPeerHost(TQString host = TQString::null);
/**
* Returns the host we are connected to.
*/
- const QString& peerHost() const;
+ const TQString& peerHost() const;
/**
* Clear out the host name.
diff --git a/kio/kssl/ksslpemcallback.cc b/kio/kssl/ksslpemcallback.cc
index babcb96da..bc314673c 100644
--- a/kio/kssl/ksslpemcallback.cc
+++ b/kio/kssl/ksslpemcallback.cc
@@ -28,7 +28,7 @@
int KSSLPemCallback(char *buf, int size, int rwflag, void *userdata) {
#ifdef KSSL_HAVE_SSL
- QCString pass;
+ TQCString pass;
Q_UNUSED(userdata);
Q_UNUSED(rwflag);
diff --git a/kio/kssl/ksslpkcs12.cc b/kio/kssl/ksslpkcs12.cc
index d890df8eb..b8b23cf1c 100644
--- a/kio/kssl/ksslpkcs12.cc
+++ b/kio/kssl/ksslpkcs12.cc
@@ -25,8 +25,8 @@
#include <kopenssl.h>
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <ksslall.h>
#include <kdebug.h>
#include <ktempfile.h>
@@ -72,12 +72,12 @@ KSSLPKCS12::~KSSLPKCS12() {
}
-KSSLPKCS12* KSSLPKCS12::fromString(QString base64, QString password) {
+KSSLPKCS12* KSSLPKCS12::fromString(TQString base64, TQString password) {
#ifdef KSSL_HAVE_SSL
KTempFile ktf;
if (base64.isEmpty()) return NULL;
- QByteArray qba, qbb = QCString(base64.latin1()).copy();
+ TQByteArray qba, qbb = TQCString(base64.latin1()).copy();
KCodecs::base64Decode(qbb, qba);
ktf.file()->writeBlock(qba);
ktf.close();
@@ -90,9 +90,9 @@ return NULL;
-KSSLPKCS12* KSSLPKCS12::loadCertFile(QString filename, QString password) {
+KSSLPKCS12* KSSLPKCS12::loadCertFile(TQString filename, TQString password) {
#ifdef KSSL_HAVE_SSL
-QFile qf(filename);
+TQFile qf(filename);
PKCS12 *newpkcs = NULL;
if (!qf.open(IO_ReadOnly))
@@ -130,7 +130,7 @@ void KSSLPKCS12::setCert(PKCS12 *c) {
}
-bool KSSLPKCS12::changePassword(QString pold, QString pnew) {
+bool KSSLPKCS12::changePassword(TQString pold, TQString pnew) {
#ifdef KSSL_HAVE_SSL
// OpenSSL makes me cast away the const here. argh
return (0 == kossl->PKCS12_newpass(_pkcs,
@@ -141,7 +141,7 @@ return false;
}
-bool KSSLPKCS12::parse(QString pass) {
+bool KSSLPKCS12::parse(TQString pass) {
#ifdef KSSL_HAVE_SSL
X509 *x = NULL;
@@ -193,8 +193,8 @@ KSSLCertificate *KSSLPKCS12::getCertificate() {
}
-QString KSSLPKCS12::toString() {
-QString base64;
+TQString KSSLPKCS12::toString() {
+TQString base64;
#ifdef KSSL_HAVE_SSL
unsigned char *p;
int len;
@@ -204,7 +204,7 @@ int len;
char *buf = new char[len];
p = (unsigned char *)buf;
kossl->i2d_PKCS12(_pkcs, &p);
- QByteArray qba;
+ TQByteArray qba;
qba.setRawData(buf, len);
base64 = KCodecs::base64Encode(qba);
qba.resetRawData(buf, len);
@@ -216,9 +216,9 @@ return base64;
-bool KSSLPKCS12::toFile(QString filename) {
+bool KSSLPKCS12::toFile(TQString filename) {
#ifdef KSSL_HAVE_SSL
-QFile out(filename);
+TQFile out(filename);
if (!out.open(IO_WriteOnly)) return false;
@@ -278,7 +278,7 @@ return (validate(p) == KSSLCertificate::Ok);
}
-QString KSSLPKCS12::name() {
+TQString KSSLPKCS12::name() {
return _cert->getSubject();
}
diff --git a/kio/kssl/ksslpkcs12.h b/kio/kssl/ksslpkcs12.h
index 74d6139ca..bfbd78d3e 100644
--- a/kio/kssl/ksslpkcs12.h
+++ b/kio/kssl/ksslpkcs12.h
@@ -72,15 +72,15 @@ public:
* certificate instead of passing the object itself.
* @return the name of the certificate
*/
- QString name();
+ TQString name();
/**
- * Create a KSSLPKCS12 object from a Base64 in a QString.
+ * Create a KSSLPKCS12 object from a Base64 in a TQString.
* @param base64 the base64 encoded certificate
* @param password a password for the certificate if encrypted
* @return the PKCS#12 object, or NULL on failure.
*/
- static KSSLPKCS12* fromString(QString base64, QString password = "");
+ static KSSLPKCS12* fromString(TQString base64, TQString password = "");
/**
* Create a KSSLPKCS12 object by reading a PKCS#12 file.
@@ -88,13 +88,13 @@ public:
* @param password a password for the certificate if encrypted
* @return the PKCS#12 object, or NULL on failure.
*/
- static KSSLPKCS12* loadCertFile(QString filename, QString password = "");
+ static KSSLPKCS12* loadCertFile(TQString filename, TQString password = "");
/**
* Convert to a Base64 string.
* @return the certificate in base64 form
*/
- QString toString();
+ TQString toString();
/**
* Raw set the PKCS12 object.
@@ -109,7 +109,7 @@ public:
* @param pnew the new password
* @return true on success
*/
- bool changePassword(QString pold, QString pnew);
+ bool changePassword(TQString pold, TQString pnew);
/**
* Get the private key.
@@ -129,7 +129,7 @@ public:
* @param filename the file to write to
* @return true on success
*/
- bool toFile(QString filename);
+ bool toFile(TQString filename);
/**
* Check the X.509 and private key to make sure they're valid.
@@ -178,7 +178,7 @@ public:
protected:
KSSLPKCS12();
- bool parse(QString pass);
+ bool parse(TQString pass);
private:
KSSLPKCS12Private *d;
diff --git a/kio/kssl/ksslpkcs7.cc b/kio/kssl/ksslpkcs7.cc
index 14210b1bd..8db0000f0 100644
--- a/kio/kssl/ksslpkcs7.cc
+++ b/kio/kssl/ksslpkcs7.cc
@@ -25,8 +25,8 @@
#include <kopenssl.h>
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <ksslall.h>
#include <kdebug.h>
#include <ktempfile.h>
@@ -60,12 +60,12 @@ KSSLPKCS7::~KSSLPKCS7() {
}
-KSSLPKCS7* KSSLPKCS7::fromString(QString base64) {
+KSSLPKCS7* KSSLPKCS7::fromString(TQString base64) {
#ifdef KSSL_HAVE_SSL
KTempFile ktf;
if (base64.isEmpty()) return NULL;
- QByteArray qba, qbb = QCString(base64.latin1()).copy();
+ TQByteArray qba, qbb = TQCString(base64.latin1()).copy();
KCodecs::base64Decode(qbb, qba);
ktf.file()->writeBlock(qba);
ktf.close();
@@ -78,9 +78,9 @@ return NULL;
-KSSLPKCS7* KSSLPKCS7::loadCertFile(QString filename) {
+KSSLPKCS7* KSSLPKCS7::loadCertFile(TQString filename) {
#ifdef KSSL_HAVE_SSL
-QFile qf(filename);
+TQFile qf(filename);
PKCS7 *newpkcs = NULL;
if (!qf.open(IO_ReadOnly))
@@ -122,8 +122,8 @@ KSSLCertChain *KSSLPKCS7::getChain() {
}
-QString KSSLPKCS7::toString() {
-QString base64;
+TQString KSSLPKCS7::toString() {
+TQString base64;
#ifdef KSSL_HAVE_SSL
unsigned char *p;
int len;
@@ -133,7 +133,7 @@ int len;
char *buf = new char[len];
p = (unsigned char *)buf;
kossl->i2d_PKCS7(_pkcs, &p);
- QByteArray qba;
+ TQByteArray qba;
qba.setRawData(buf, len);
base64 = KCodecs::base64Encode(qba);
qba.resetRawData(buf, len);
@@ -145,9 +145,9 @@ return base64;
-bool KSSLPKCS7::toFile(QString filename) {
+bool KSSLPKCS7::toFile(TQString filename) {
#ifdef KSSL_HAVE_SSL
-QFile out(filename);
+TQFile out(filename);
if (!out.open(IO_WriteOnly)) return false;
@@ -190,10 +190,10 @@ return (validate() == KSSLCertificate::Ok);
}
-QString KSSLPKCS7::name() {
+TQString KSSLPKCS7::name() {
if (_cert)
return _cert->getSubject();
- return QString();
+ return TQString();
}
diff --git a/kio/kssl/ksslpkcs7.h b/kio/kssl/ksslpkcs7.h
index 3ac481345..07c221464 100644
--- a/kio/kssl/ksslpkcs7.h
+++ b/kio/kssl/ksslpkcs7.h
@@ -71,27 +71,27 @@ public:
* certificate instead of passing the object itself.
* @return the name of the certificate
*/
- QString name();
+ TQString name();
/**
- * Create a KSSLPKCS7 object from a Base64 in a QString.
+ * Create a KSSLPKCS7 object from a Base64 in a TQString.
* @param base64 the base64 representation of the certificate
* @return a PKCS#7 object, or NULL on failure
*/
- static KSSLPKCS7* fromString(QString base64);
+ static KSSLPKCS7* fromString(TQString base64);
/**
* Create a KSSLPKCS7 object by reading a PKCS#7 file.
* @param filename the filename to read the certificate from
* @return a PKCS#7 object, or NULL on failure
*/
- static KSSLPKCS7* loadCertFile(QString filename);
+ static KSSLPKCS7* loadCertFile(TQString filename);
/**
* Convert to a Base64 string.
* @return the PKCS#7 object in base64 form
*/
- QString toString();
+ TQString toString();
/**
* Raw set the PKCS7 object.
@@ -119,7 +119,7 @@ public:
* @param filename the filename to write
* @return true on success
*/
- bool toFile(QString filename);
+ bool toFile(TQString filename);
/**
* Check the chain to make sure it's valid.
diff --git a/kio/kssl/ksslsession.cc b/kio/kssl/ksslsession.cc
index 28cfe0202..3c80233f1 100644
--- a/kio/kssl/ksslsession.cc
+++ b/kio/kssl/ksslsession.cc
@@ -41,10 +41,10 @@ KSSLSession::~KSSLSession() {
}
-QString KSSLSession::toString() const {
-QString rc;
+TQString KSSLSession::toString() const {
+TQString rc;
#ifdef KSSL_HAVE_SSL
-QByteArray qba;
+TQByteArray qba;
SSL_SESSION *session = static_cast<SSL_SESSION*>(_session);
unsigned int slen = KOpenSSLProxy::self()->i2d_SSL_SESSION(session, 0L);
unsigned char *csess = new unsigned char[slen];
@@ -52,7 +52,7 @@ unsigned char *p = csess;
if (!KOpenSSLProxy::self()->i2d_SSL_SESSION(session, &p)) {
delete[] csess;
- return QString::null;
+ return TQString::null;
}
// encode it into a QString
@@ -64,10 +64,10 @@ return rc;
}
-KSSLSession *KSSLSession::fromString(const QString& s) {
+KSSLSession *KSSLSession::fromString(const TQString& s) {
KSSLSession *session = 0L;
#ifdef KSSL_HAVE_SSL
-QByteArray qba, qbb = s.local8Bit().copy();
+TQByteArray qba, qbb = s.local8Bit().copy();
KCodecs::base64Decode(qbb, qba);
unsigned char *qbap = reinterpret_cast<unsigned char *>(qba.data());
SSL_SESSION *ss = KOSSL::self()->d2i_SSL_SESSION(0L, &qbap, qba.size());
diff --git a/kio/kssl/ksslsession.h b/kio/kssl/ksslsession.h
index 35f6c11a5..202781418 100644
--- a/kio/kssl/ksslsession.h
+++ b/kio/kssl/ksslsession.h
@@ -21,7 +21,7 @@
#ifndef _KSSLSESSION_H
#define _KSSLSESSION_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -50,14 +50,14 @@ public:
/**
* Convert to a base64 encoded string (so it can be copied safely)
*/
- QString toString() const;
+ TQString toString() const;
/**
* Create as session ID object from a base64 encoded string.
* @param s the session id in base64 encoded ASN.1 format
* @return a KSSLSession object, or 0L on error
*/
- static KSSLSession* fromString(const QString& s);
+ static KSSLSession* fromString(const TQString& s);
protected:
KSSLSession();
diff --git a/kio/kssl/ksslsettings.cc b/kio/kssl/ksslsettings.cc
index 3bbc3ad74..5a77b12bf 100644
--- a/kio/kssl/ksslsettings.cc
+++ b/kio/kssl/ksslsettings.cc
@@ -29,8 +29,8 @@
#include <pwd.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qsortedlist.h>
+#include <tqfile.h>
+#include <tqsortedlist.h>
#include "ksslsettings.h"
#include <kglobal.h>
@@ -60,7 +60,7 @@
public:
CipherNode(const char *_name, int _keylen) :
name(_name), keylen(_keylen) {}
- QString name;
+ TQString name;
int keylen;
inline int operator==(CipherNode &x)
{ return ((x.keylen == keylen) && (x.name == name)); }
@@ -83,7 +83,7 @@ public:
KOSSL *kossl;
bool m_bUseEGD;
bool m_bUseEFile;
- QString m_EGDPath;
+ TQString m_EGDPath;
bool m_bSendX509;
bool m_bPromptX509;
};
@@ -131,13 +131,13 @@ bool KSSLSettings::tlsv1() const {
// FIXME: we should make a default list available if this fails
// since OpenSSL seems to just choose any old thing if it's given an
// empty list. This behavior is not confirmed though.
-QString KSSLSettings::getCipherList() {
- QString clist;
+TQString KSSLSettings::getCipherList() {
+ TQString clist;
#ifdef KSSL_HAVE_SSL
- QString tcipher;
+ TQString tcipher;
bool firstcipher = true;
SSL_METHOD *meth = 0L;
- QPtrList<CipherNode> cipherList;
+ TQPtrList<CipherNode> cipherList;
cipherList.setAutoDelete(true);
@@ -296,7 +296,7 @@ void KSSLSettings::save() {
#ifdef KSSL_HAVE_SSL
m_cfg->setGroup("SSLv2");
for (unsigned int i = 0; i < v2ciphers.count(); i++) {
- QString ciphername;
+ TQString ciphername;
ciphername.sprintf("cipher_%s", v2ciphers[i].ascii());
if (v2selectedciphers.contains(v2ciphers[i])) {
m_cfg->writeEntry(ciphername, true);
@@ -305,7 +305,7 @@ void KSSLSettings::save() {
m_cfg->setGroup("SSLv3");
for (unsigned int i = 0; i < v3ciphers.count(); i++) {
- QString ciphername;
+ TQString ciphername;
ciphername.sprintf("cipher_%s", v3ciphers[i].ascii());
if (v3selectedciphers.contains(v3ciphers[i])) {
m_cfg->writeEntry(ciphername, true);
@@ -316,9 +316,9 @@ void KSSLSettings::save() {
m_cfg->sync();
// insure proper permissions -- contains sensitive data
- QString cfgName(KGlobal::dirs()->findResource("config", "cryptodefaults"));
+ TQString cfgName(KGlobal::dirs()->findResource("config", "cryptodefaults"));
if (!cfgName.isEmpty())
- ::chmod(QFile::encodeName(cfgName), 0600);
+ ::chmod(TQFile::encodeName(cfgName), 0600);
#endif
}
@@ -342,7 +342,7 @@ void KSSLSettings::setTLSv1(bool enabled) { m_bUseTLSv1 = enabled; }
void KSSLSettings::setSSLv2(bool enabled) { m_bUseSSLv2 = enabled; }
void KSSLSettings::setSSLv3(bool enabled) { m_bUseSSLv3 = enabled; }
-QString& KSSLSettings::getEGDPath() { return d->m_EGDPath; }
+TQString& KSSLSettings::getEGDPath() { return d->m_EGDPath; }
#ifdef KSSL_HAVE_SSL
#undef sk_new
diff --git a/kio/kssl/ksslsettings.h b/kio/kssl/ksslsettings.h
index e348d36c9..44345937b 100644
--- a/kio/kssl/ksslsettings.h
+++ b/kio/kssl/ksslsettings.h
@@ -21,8 +21,8 @@
#ifndef _KSSLSETTINGS_H
#define _KSSLSETTINGS_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kconfig.h>
class KSSLSettingsPrivate;
@@ -183,14 +183,14 @@ public:
* use in a connection.
* @return the cipher list
*/
- QString getCipherList();
+ TQString getCipherList();
/**
* Get the configured path to the entropy gathering daemon or entropy
* file.
* @return the path
*/
- QString& getEGDPath();
+ TQString& getEGDPath();
/**
* Load the user's settings.
@@ -213,8 +213,8 @@ private:
bool m_bWarnOnEnter, m_bWarnOnUnencrypted, m_bWarnOnLeave, m_bWarnOnMixed;
bool m_bWarnSelfSigned, m_bWarnRevoked, m_bWarnExpired;
- QValueList<QString> v2ciphers, v2selectedciphers, v3ciphers, v3selectedciphers;
- QValueList<int> v2bits, v3bits;
+ TQValueList<TQString> v2ciphers, v2selectedciphers, v3ciphers, v3selectedciphers;
+ TQValueList<int> v2bits, v3bits;
KSSLSettingsPrivate *d;
};
diff --git a/kio/kssl/ksslsigners.cc b/kio/kssl/ksslsigners.cc
index 91e9f1755..2392f4a36 100644
--- a/kio/kssl/ksslsigners.cc
+++ b/kio/kssl/ksslsigners.cc
@@ -19,8 +19,8 @@
*/
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "ksslcertificate.h"
#include "ksslsigners.h"
#include <stdlib.h>
@@ -47,21 +47,21 @@ bool KSSLSigners::addCA(KSSLCertificate& cert,
}
-bool KSSLSigners::addCA(QString cert,
+bool KSSLSigners::addCA(TQString cert,
bool ssl,
bool email,
bool code) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << cert;
arg << ssl << email << code;
bool rc = dcc->call("kded", "kssld",
- "caAdd(QString,bool,bool,bool)",
+ "caAdd(TQString,bool,bool,bool)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -72,15 +72,15 @@ return false;
bool KSSLSigners::regenerate() {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
bool rc = dcc->call("kded", "kssld",
"caRegenerate()",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -95,17 +95,17 @@ bool KSSLSigners::useForSSL(KSSLCertificate& cert) {
}
-bool KSSLSigners::useForSSL(QString subject) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+bool KSSLSigners::useForSSL(TQString subject) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject;
bool rc = dcc->call("kded", "kssld",
- "caUseForSSL(QString)",
+ "caUseForSSL(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -120,17 +120,17 @@ bool KSSLSigners::useForEmail(KSSLCertificate& cert) {
}
-bool KSSLSigners::useForEmail(QString subject) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+bool KSSLSigners::useForEmail(TQString subject) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject;
bool rc = dcc->call("kded", "kssld",
- "caUseForEmail(QString)",
+ "caUseForEmail(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -145,17 +145,17 @@ bool KSSLSigners::useForCode(KSSLCertificate& cert) {
}
-bool KSSLSigners::useForCode(QString subject) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+bool KSSLSigners::useForCode(TQString subject) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject;
bool rc = dcc->call("kded", "kssld",
- "caUseForCode(QString)",
+ "caUseForCode(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -170,17 +170,17 @@ bool KSSLSigners::remove(KSSLCertificate& cert) {
}
-bool KSSLSigners::remove(QString subject) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+bool KSSLSigners::remove(TQString subject) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject;
bool rc = dcc->call("kded", "kssld",
- "caRemove(QString)",
+ "caRemove(TQString)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
@@ -190,17 +190,17 @@ return false;
}
-QStringList KSSLSigners::list() {
- QStringList drc;
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+TQStringList KSSLSigners::list() {
+ TQStringList drc;
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
bool rc = dcc->call("kded", "kssld",
"caList()",
data, rettype, retval);
- if (rc && rettype == "QStringList") {
- QDataStream retStream(retval, IO_ReadOnly);
+ if (rc && rettype == "TQStringList") {
+ TQDataStream retStream(retval, IO_ReadOnly);
retStream >> drc;
}
@@ -208,18 +208,18 @@ return drc;
}
-QString KSSLSigners::getCert(QString subject) {
- QString drc;
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+TQString KSSLSigners::getCert(TQString subject) {
+ TQString drc;
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject;
bool rc = dcc->call("kded", "kssld",
- "caGetCert(QString)",
+ "caGetCert(TQString)",
data, rettype, retval);
- if (rc && rettype == "QString") {
- QDataStream retStream(retval, IO_ReadOnly);
+ if (rc && rettype == "TQString") {
+ TQDataStream retStream(retval, IO_ReadOnly);
retStream >> drc;
}
@@ -227,17 +227,17 @@ return drc;
}
-bool KSSLSigners::setUse(QString subject, bool ssl, bool email, bool code) {
- QByteArray data, retval;
- QCString rettype;
- QDataStream arg(data, IO_WriteOnly);
+bool KSSLSigners::setUse(TQString subject, bool ssl, bool email, bool code) {
+ TQByteArray data, retval;
+ TQCString rettype;
+ TQDataStream arg(data, IO_WriteOnly);
arg << subject << ssl << email << code;
bool rc = dcc->call("kded", "kssld",
- "caSetUse(QString,bool,bool,bool)",
+ "caSetUse(TQString,bool,bool,bool)",
data, rettype, retval);
if (rc && rettype == "bool") {
- QDataStream retStream(retval, IO_ReadOnly);
+ TQDataStream retStream(retval, IO_ReadOnly);
bool drc;
retStream >> drc;
return drc;
diff --git a/kio/kssl/ksslsigners.h b/kio/kssl/ksslsigners.h
index 3cabf639c..476c76530 100644
--- a/kio/kssl/ksslsigners.h
+++ b/kio/kssl/ksslsigners.h
@@ -25,7 +25,7 @@
class KSSLCertificate;
class DCOPClient;
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -72,7 +72,7 @@ public:
* @param code allow it to sign for code signing
* @return true on success
*/
- bool addCA(QString cert, bool ssl, bool email, bool code);
+ bool addCA(TQString cert, bool ssl, bool email, bool code);
/**
* Regenerate the signer-root file from the user's settings.
@@ -92,7 +92,7 @@ public:
* @param subject the certificate subject
* @return true if it can be used for SSL
*/
- bool useForSSL(QString subject);
+ bool useForSSL(TQString subject);
/**
* Determine if a certificate can be used for S/MIME certificate signing
@@ -106,7 +106,7 @@ public:
* @param subject the certificate subject
* @return true if it can be used for S/MIME
*/
- bool useForEmail(QString subject);
+ bool useForEmail(TQString subject);
/**
* Determine if a certificate can be used for code certificate signing
@@ -120,7 +120,7 @@ public:
* @param subject the certificate subject
* @return true if it can be used for code
*/
- bool useForCode(QString subject);
+ bool useForCode(TQString subject);
/**
* Remove a certificate signer from the database
@@ -134,14 +134,14 @@ public:
* @param subject the subject of the certificate to remove
* @return true on success
*/
- bool remove(QString subject);
+ bool remove(TQString subject);
/**
* List the signers in the database.
* @return the list of subjects in the database
* @see getCert
*/
- QStringList list();
+ TQStringList list();
/**
* Get a signer certificate from the database.
@@ -149,7 +149,7 @@ public:
* @param subject the subject of the certificate desired
* @return the base64 encoded certificate
*/
- QString getCert(QString subject);
+ TQString getCert(TQString subject);
/**
* Set the use of a particular entry in the certificate signer database.
@@ -159,7 +159,7 @@ public:
* @param code allow this for code certificate signing
* @return true on success
*/
- bool setUse(QString subject, bool ssl, bool email, bool code);
+ bool setUse(TQString subject, bool ssl, bool email, bool code);
private:
class KSSLSignersPrivate;
diff --git a/kio/kssl/ksslutils.cc b/kio/kssl/ksslutils.cc
index d5186b852..cf024347c 100644
--- a/kio/kssl/ksslutils.cc
+++ b/kio/kssl/ksslutils.cc
@@ -21,24 +21,24 @@
#include "ksslutils.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "kopenssl.h"
#ifdef KSSL_HAVE_SSL
// This code is mostly taken from OpenSSL v0.9.5a
// by Eric Young
-QDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt) {
-QDateTime qdt;
+TQDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt) {
+TQDateTime qdt;
char *v;
int gmt=0;
int i;
int y=0,M=0,d=0,h=0,m=0,s=0;
-QDate qdate;
-QTime qtime;
+TQDate qdate;
+TQTime qtime;
i = tm->length;
v = (char *)tm->data;
@@ -68,10 +68,10 @@ return qdt;
}
-QString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm) {
- QString qstr;
+TQString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm) {
+ TQString qstr;
int gmt;
- QDateTime qdt = ASN1_UTCTIME_QDateTime(tm, &gmt);
+ TQDateTime qdt = ASN1_UTCTIME_QDateTime(tm, &gmt);
qstr = KGlobal::locale()->formatDateTime(qdt, false, true);
if (gmt) {
@@ -82,9 +82,9 @@ QString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm) {
}
-QString ASN1_INTEGER_QString(ASN1_INTEGER *aint) {
+TQString ASN1_INTEGER_QString(ASN1_INTEGER *aint) {
char *rep = KOSSL::self()->i2s_ASN1_INTEGER(NULL, aint);
-QString yy = rep;
+TQString yy = rep;
KOSSL::self()->OPENSSL_free(rep);
return yy;
}
diff --git a/kio/kssl/ksslutils.h b/kio/kssl/ksslutils.h
index cdbfa1648..2035b2de4 100644
--- a/kio/kssl/ksslutils.h
+++ b/kio/kssl/ksslutils.h
@@ -48,17 +48,17 @@ class QDateTime;
* @return the date formatted in a QString
* @see ASN1_UTCTIME_QDateTime
*/
-KDE_EXPORT QString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm);
+KDE_EXPORT TQString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm);
/**
- * Convert an ASN1 UTCTIME value to a QDateTime. Uses KLocale settings.
+ * Convert an ASN1 UTCTIME value to a TQDateTime. Uses KLocale settings.
*
* @param tm the OpenSSL ASN1_UTCTIME pointer
* @param isGmt set to 1 if the date is set to GMT
*
* @return the date formatted in a QDateTime
*/
-KDE_EXPORT QDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt);
+KDE_EXPORT TQDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt);
/**
@@ -68,7 +68,7 @@ KDE_EXPORT QDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm, int *isGmt);
*
* @return the number formatted in a QString
*/
-KDE_EXPORT QString ASN1_INTEGER_QString(ASN1_INTEGER *aint);
+KDE_EXPORT TQString ASN1_INTEGER_QString(ASN1_INTEGER *aint);
#endif
diff --git a/kio/kssl/ksslx509map.cc b/kio/kssl/ksslx509map.cc
index 1db98cc2d..7896fdfcf 100644
--- a/kio/kssl/ksslx509map.cc
+++ b/kio/kssl/ksslx509map.cc
@@ -19,10 +19,10 @@
*/
#include "ksslx509map.h"
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
-KSSLX509Map::KSSLX509Map(const QString& name) {
+KSSLX509Map::KSSLX509Map(const TQString& name) {
parse(name);
}
@@ -32,21 +32,21 @@ KSSLX509Map::~KSSLX509Map() {
}
-void KSSLX509Map::setValue(const QString& key, const QString& value) {
+void KSSLX509Map::setValue(const TQString& key, const TQString& value) {
m_pairs.replace(key, value);
}
-QString KSSLX509Map::getValue(const QString& key) const {
+TQString KSSLX509Map::getValue(const TQString& key) const {
if (!m_pairs.contains(key)) {
- return QString::null;
+ return TQString::null;
}
return m_pairs[key];
}
-static QStringList tokenizeBy(const QString& str, const QRegExp& tok, bool keepEmpties = false) {
-QStringList tokens;
+static TQStringList tokenizeBy(const TQString& str, const TQRegExp& tok, bool keepEmpties = false) {
+TQStringList tokens;
unsigned int head, tail;
const char *chstr = str.ascii();
unsigned int length = str.length();
@@ -61,7 +61,7 @@ unsigned int length = str.length();
}
for(head = 0, tail = 0; tail < length-1; head = tail+1) {
- QString thisline;
+ TQString thisline;
tail = str.find(tok, head);
@@ -78,15 +78,15 @@ unsigned int length = str.length();
}
-void KSSLX509Map::parse(const QString& name) {
-QStringList vl = tokenizeBy(name, QRegExp("/[A-Za-z]+="), false);
+void KSSLX509Map::parse(const TQString& name) {
+TQStringList vl = tokenizeBy(name, TQRegExp("/[A-Za-z]+="), false);
m_pairs.clear();
- for (QStringList::Iterator j = vl.begin(); j != vl.end(); ++j) {
- QStringList apair = tokenizeBy(*j, QRegExp("="), false);
+ for (TQStringList::Iterator j = vl.begin(); j != vl.end(); ++j) {
+ TQStringList apair = tokenizeBy(*j, TQRegExp("="), false);
if (m_pairs.contains(apair[0])) {
- QString oldValue = m_pairs[apair[0]];
+ TQString oldValue = m_pairs[apair[0]];
oldValue += "\n";
oldValue += apair[1];
m_pairs.replace(apair[0], oldValue);
@@ -97,7 +97,7 @@ QStringList vl = tokenizeBy(name, QRegExp("/[A-Za-z]+="), false);
}
-void KSSLX509Map::reset(const QString& name) {
+void KSSLX509Map::reset(const TQString& name) {
parse(name);
}
diff --git a/kio/kssl/ksslx509map.h b/kio/kssl/ksslx509map.h
index 9cd841119..e0b37fb26 100644
--- a/kio/kssl/ksslx509map.h
+++ b/kio/kssl/ksslx509map.h
@@ -21,8 +21,8 @@
#ifndef _KSSLX509MAP_H
#define _KSSLX509MAP_H
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -43,7 +43,7 @@ public:
*
* @param name the map to parse
*/
- KSSLX509Map(const QString& name);
+ KSSLX509Map(const TQString& name);
/**
* Destroy this map
@@ -56,7 +56,7 @@ public:
* @param key the key
* @param value the value
*/
- void setValue(const QString& key, const QString& value);
+ void setValue(const TQString& key, const TQString& value);
/**
* Get the value of an entry in the map
@@ -65,7 +65,7 @@ public:
*
* @return the value
*/
- QString getValue(const QString& key) const;
+ TQString getValue(const TQString& key) const;
/**
* Reset (clear) the internal storage.
@@ -73,14 +73,14 @@ public:
* @param name if this is not empty, it will be parsed and used as
* the new map internally
*/
- void reset(const QString& name = "");
+ void reset(const TQString& name = "");
private:
class KSSLX509MapPrivate;
KSSLX509MapPrivate *d;
- QMap<QString, QString> m_pairs;
+ TQMap<TQString, TQString> m_pairs;
- void parse(const QString& name);
+ void parse(const TQString& name);
};
#endif
diff --git a/kio/kssl/ksslx509v3.h b/kio/kssl/ksslx509v3.h
index f197e6586..fb163de34 100644
--- a/kio/kssl/ksslx509v3.h
+++ b/kio/kssl/ksslx509v3.h
@@ -21,7 +21,7 @@
#ifndef _KSSLX509V3_H
#define _KSSLX509V3_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
diff --git a/kio/misc/kdesasl/kdesasl.cpp b/kio/misc/kdesasl/kdesasl.cpp
index c59d157b8..b547f7e6b 100644
--- a/kio/misc/kdesasl/kdesasl.cpp
+++ b/kio/misc/kdesasl/kdesasl.cpp
@@ -22,7 +22,7 @@
#include <kmdcodec.h>
#include <kurl.h>
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <stdlib.h>
#include <string.h>
@@ -35,8 +35,8 @@ KDESasl::KDESasl(const KURL &aUrl)
mFirst = true;
}
-KDESasl::KDESasl(const QString &aUser, const QString &aPass,
- const QString &aProtocol)
+KDESasl::KDESasl(const TQString &aUser, const TQString &aPass,
+ const TQString &aProtocol)
{
mProtocol = aProtocol;
mUser = aUser;
@@ -47,29 +47,29 @@ KDESasl::KDESasl(const QString &aUser, const QString &aPass,
KDESasl::~KDESasl() {
}
-QCString KDESasl::chooseMethod(const QStrIList aMethods)
+TQCString KDESasl::chooseMethod(const TQStrIList aMethods)
{
if (aMethods.contains("DIGEST-MD5")) mMethod = "DIGEST-MD5";
else if (aMethods.contains("CRAM-MD5")) mMethod = "CRAM-MD5";
else if (aMethods.contains("PLAIN")) mMethod = "PLAIN";
else if (aMethods.contains("LOGIN")) mMethod = "LOGIN";
- else mMethod = QCString();
+ else mMethod = TQCString();
return mMethod;
}
-void KDESasl::setMethod(const QCString &aMethod)
+void KDESasl::setMethod(const TQCString &aMethod)
{
mMethod = aMethod.upper();
}
-QByteArray KDESasl::getPlainResponse()
+TQByteArray KDESasl::getPlainResponse()
{
- QCString user = mUser.utf8();
- QCString pass = mPass.utf8();
+ TQCString user = mUser.utf8();
+ TQCString pass = mPass.utf8();
int userlen = user.length();
int passlen = pass.length();
// result = $user\0$user\0$pass (no trailing \0)
- QByteArray result(2 * userlen + passlen + 2);
+ TQByteArray result(2 * userlen + passlen + 2);
if ( userlen ) {
memcpy( result.data(), user.data(), userlen );
memcpy( result.data() + userlen + 1, user.data(), userlen );
@@ -80,18 +80,18 @@ QByteArray KDESasl::getPlainResponse()
return result;
}
-QByteArray KDESasl::getLoginResponse()
+TQByteArray KDESasl::getLoginResponse()
{
- QByteArray result = (mFirst) ? mUser.utf8() : mPass.utf8();
+ TQByteArray result = (mFirst) ? mUser.utf8() : mPass.utf8();
mFirst = !mFirst;
if (result.size()) result.resize(result.size() - 1);
return result;
}
-QByteArray KDESasl::getCramMd5Response(const QByteArray &aChallenge)
+TQByteArray KDESasl::getCramMd5Response(const TQByteArray &aChallenge)
{
uint i;
- QByteArray secret = mPass.utf8();
+ TQByteArray secret = mPass.utf8();
int len = mPass.utf8().length();
secret.resize(len);
if (secret.size() > 64)
@@ -102,9 +102,9 @@ QByteArray KDESasl::getCramMd5Response(const QByteArray &aChallenge)
}
secret.resize(64);
for (i = len; i < 64; i++) secret[i] = 0;
- QByteArray XorOpad(64);
+ TQByteArray XorOpad(64);
for (i = 0; i < 64; i++) XorOpad[i] = secret[i] ^ 0x5C;
- QByteArray XorIpad(64);
+ TQByteArray XorIpad(64);
for (i = 0; i < 64; i++) XorIpad[i] = secret[i] ^ 0x36;
KMD5 md5;
md5.update(XorIpad);
@@ -112,21 +112,21 @@ QByteArray KDESasl::getCramMd5Response(const QByteArray &aChallenge)
KMD5 md5a;
md5a.update(XorOpad);
md5a.update(md5.rawDigest(), 16);
- QByteArray result = mUser.utf8();
+ TQByteArray result = mUser.utf8();
len = mUser.utf8().length();
result.resize(len + 33);
result[len] = ' ';
- QCString ch = md5a.hexDigest();
+ TQCString ch = md5a.hexDigest();
for (i = 0; i < 32; i++) result[i+len+1] = *(ch.data() + i);
return result;
}
-QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge)
+TQByteArray KDESasl::getDigestMd5Response(const TQByteArray &aChallenge)
{
mFirst = !mFirst;
- if (mFirst) return QByteArray();
- QCString str, realm, nonce, qop, algorithm, charset;
- QCString nc = "00000001";
+ if (mFirst) return TQByteArray();
+ TQCString str, realm, nonce, qop, algorithm, charset;
+ TQCString nc = "00000001";
unsigned int a, b, c, d;
a = 0;
while (a < aChallenge.size())
@@ -143,7 +143,7 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge)
d = c;
while (d < aChallenge.size() && aChallenge[d] != ',') d++;
}
- str = QCString(aChallenge.data() + c, d - c + 1);
+ str = TQCString(aChallenge.data() + c, d - c + 1);
if (qstrnicmp(aChallenge.data() + a, "realm=", 6) == 0) realm = str;
else if (qstrnicmp(aChallenge.data() + a, "nonce=", 6) == 0) nonce = str;
else if (qstrnicmp(aChallenge.data() + a, "qop=", 4) == 0) qop = str;
@@ -156,7 +156,7 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge)
if (qop.isEmpty()) qop = "auth";
qop = "auth";
bool utf8 = qstricmp(charset, "utf-8") == 0;
- QCString digestUri = QCString(mProtocol.latin1()) + "/" + realm;
+ TQCString digestUri = TQCString(mProtocol.latin1()) + "/" + realm;
/* Calculate the response */
/* Code based on code from the http io-slave
@@ -164,17 +164,17 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge)
Copyright (C) 2000,2001 Waldo Bastian <bastian@kde.org>
Copyright (C) 2000,2001 George Staikos <staikos@kde.org> */
KMD5 md, md2;
- QCString HA1, HA2;
- QCString cnonce;
+ TQCString HA1, HA2;
+ TQCString cnonce;
cnonce.setNum((1 + static_cast<int>(100000.0*rand()/(RAND_MAX+1.0))));
cnonce = KCodecs::base64Encode( cnonce );
// Calculate H(A1)
- QCString authStr = (utf8) ? mUser.utf8() : QCString(mUser.latin1());
+ TQCString authStr = (utf8) ? mUser.utf8() : TQCString(mUser.latin1());
authStr += ':';
authStr += realm;
authStr += ':';
- authStr += (utf8) ? mPass.utf8() : QCString(mPass.latin1());
+ authStr += (utf8) ? mPass.utf8() : TQCString(mPass.latin1());
md.update( authStr );
authStr = "";
@@ -220,30 +220,30 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge)
authStr += HA2;
md.reset();
md.update( authStr );
- QCString response = md.hexDigest();
+ TQCString response = md.hexDigest();
/* End of response calculation */
- QCString result;
+ TQCString result;
if (utf8)
{
result = "charset=utf-8,username=\"" + mUser.utf8();
} else {
- result = "charset=iso-8859-1,username=\"" + QCString(mUser.latin1());
+ result = "charset=iso-8859-1,username=\"" + TQCString(mUser.latin1());
}
result += "\",realm=\"" + realm + "\",nonce=\"" + nonce;
result += "\",nc=" + nc + ",cnonce=\"" + cnonce;
result += "\",digest-uri=\"" + digestUri;
result += "\",response=" + response + ",qop=" + qop;
- QByteArray ba;
+ TQByteArray ba;
ba.duplicate(result.data(), result.length());
return ba;
}
-QByteArray KDESasl::getBinaryResponse(const QByteArray &aChallenge, bool aBase64)
+TQByteArray KDESasl::getBinaryResponse(const TQByteArray &aChallenge, bool aBase64)
{
if (aBase64)
{
- QByteArray ba;
+ TQByteArray ba;
KCodecs::base64Decode(aChallenge, ba);
KCodecs::base64Encode(getBinaryResponse(ba, false), ba);
return ba;
@@ -254,17 +254,17 @@ QByteArray KDESasl::getBinaryResponse(const QByteArray &aChallenge, bool aBase64
return getCramMd5Response(aChallenge);
if (qstricmp(mMethod, "DIGEST-MD5") == 0)
return getDigestMd5Response(aChallenge);
-// return getDigestMd5Response(QCString("realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8"));
- return QByteArray();
+// return getDigestMd5Response(TQCString("realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8"));
+ return TQByteArray();
}
-QCString KDESasl::getResponse(const QByteArray &aChallenge, bool aBase64)
+TQCString KDESasl::getResponse(const TQByteArray &aChallenge, bool aBase64)
{
- QByteArray ba = getBinaryResponse(aChallenge, aBase64);
- return QCString(ba.data(), ba.size() + 1);
+ TQByteArray ba = getBinaryResponse(aChallenge, aBase64);
+ return TQCString(ba.data(), ba.size() + 1);
}
-QCString KDESasl::method() const {
+TQCString KDESasl::method() const {
return mMethod;
}
diff --git a/kio/misc/kdesasl/kdesasl.h b/kio/misc/kdesasl/kdesasl.h
index 834c83913..4049b96eb 100644
--- a/kio/misc/kdesasl/kdesasl.h
+++ b/kio/misc/kdesasl/kdesasl.h
@@ -20,7 +20,7 @@
#ifndef KDESASL_H
#define KDESASL_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -59,7 +59,7 @@ class QStrIList;
* mySendAuthCommand( sasl.method() );
* }
* for ( ; !sasl.dialogComplete( numResponses ) ; ++numResponses ) {
- * QByteArray challenge = myRecvChallenge();
+ * TQByteArray challenge = myRecvChallenge();
* mySendResponse( sasl.getResponse( challenge ) );
* }
* return myCheckSuccess();
@@ -82,7 +82,7 @@ public:
* This is a conveniece function and differs from the above function only by
* what arguments it accepts.
*/
- KDESasl(const QString &aUser, const QString &aPass, const QString &aProtocol);
+ KDESasl(const TQString &aUser, const TQString &aPass, const TQString &aProtocol);
/*
* You need to have a virtual destructor!
*/
@@ -91,16 +91,16 @@ public:
* @returns the most secure method from the given methods and use it for
* further operations.
*/
- virtual QCString chooseMethod(const QStrIList aMethods);
+ virtual TQCString chooseMethod(const TQStrIList aMethods);
/**
* Explicitely set the SASL method used.
*/
- virtual void setMethod(const QCString &aMethod);
+ virtual void setMethod(const TQCString &aMethod);
/**
* @return the SASL method used.
* @since 3.2
*/
- QCString method() const;
+ TQCString method() const;
/**
* @param numCalls number of times getResponse() has been called.
* @return whether the challenge/response dialog has completed
@@ -126,11 +126,11 @@ public:
* encoding. The challenge is decoded from base64 and the response is
* encoded base64 if set to true.
*/
- QCString getResponse(const QByteArray &aChallenge=QByteArray(), bool aBase64 = true);
+ TQCString getResponse(const TQByteArray &aChallenge=TQByteArray(), bool aBase64 = true);
/**
* Create a response as above but place it in a QByteArray
*/
- QByteArray getBinaryResponse(const QByteArray &aChallenge=QByteArray(), bool aBase64=true);
+ TQByteArray getBinaryResponse(const TQByteArray &aChallenge=TQByteArray(), bool aBase64=true);
/**
* Returns true if the client is supposed to initiate the
* challenge-respinse dialog with an initial response (which most
@@ -146,23 +146,23 @@ protected:
/**
* PLAIN authentication as described in RFC 2595
*/
- virtual QByteArray getPlainResponse();
+ virtual TQByteArray getPlainResponse();
/**
* LOGIN authentication
*/
- virtual QByteArray getLoginResponse();
+ virtual TQByteArray getLoginResponse();
/**
* CRAM-MD5 authentication as described in RFC 2195
*/
- virtual QByteArray getCramMd5Response(const QByteArray &aChallenge);
+ virtual TQByteArray getCramMd5Response(const TQByteArray &aChallenge);
/**
* DIGEST-MD5 authentication as described in RFC 2831
*/
- virtual QByteArray getDigestMd5Response(const QByteArray &aChallenge);
+ virtual TQByteArray getDigestMd5Response(const TQByteArray &aChallenge);
private:
- QString mProtocol, mUser, mPass;
- QCString mMethod;
+ TQString mProtocol, mUser, mPass;
+ TQCString mMethod;
bool mFirst;
};
diff --git a/kio/misc/kfile/fileprops.cpp b/kio/misc/kfile/fileprops.cpp
index 9b7f75380..096fc1f03 100644
--- a/kio/misc/kfile/fileprops.cpp
+++ b/kio/misc/kfile/fileprops.cpp
@@ -18,8 +18,8 @@
#include <iostream>
-#include <qfile.h>
-#include <qptrlist.h>
+#include <tqfile.h>
+#include <tqptrlist.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -35,20 +35,20 @@
using namespace std;
-static QString beatifyValue( const QString& value )
+static TQString beatifyValue( const TQString& value )
{
if ( value.isNull() )
- return QString("(no value for key available)");
+ return TQString("(no value for key available)");
else if ( value.isEmpty() )
- return QString("(empty)");
+ return TQString("(empty)");
return value;
}
-FileProps::FileProps( const QString& path, const QStringList& suppliedGroups )
+FileProps::FileProps( const TQString& path, const TQStringList& suppliedGroups )
: m_dirty( false )
{
- m_info = new KFileMetaInfo(path, QString::null, KFileMetaInfo::Everything);
+ m_info = new KFileMetaInfo(path, TQString::null, KFileMetaInfo::Everything);
m_userSuppliedGroups = !suppliedGroups.isEmpty();
m_groupsToUse = m_userSuppliedGroups ? suppliedGroups : m_info->groups();
}
@@ -72,28 +72,28 @@ bool FileProps::isValid() const
return m_info->isValid();
}
-QStringList FileProps::supportedGroups() const
+TQStringList FileProps::supportedGroups() const
{
return m_info->supportedGroups();
}
-QStringList FileProps::availableGroups() const
+TQStringList FileProps::availableGroups() const
{
return m_info->groups();
}
-QStringList FileProps::supportedKeys( const QString& group ) const
+TQStringList FileProps::supportedKeys( const TQString& group ) const
{
KFileMetaInfoGroup g = m_info->group( group );
return g.supportedKeys();
}
-QStringList FileProps::availableKeys( const QString& group ) const
+TQStringList FileProps::availableKeys( const TQString& group ) const
{
KFileMetaInfoGroup g = m_info->group( group );
- QStringList allKeys = g.keys();
- QStringList ret;
- QStringList::ConstIterator it = allKeys.begin();
+ TQStringList allKeys = g.keys();
+ TQStringList ret;
+ TQStringList::ConstIterator it = allKeys.begin();
for ( ; it != allKeys.end(); ++it )
{
if ( g.item( *it ).isValid() )
@@ -103,21 +103,21 @@ QStringList FileProps::availableKeys( const QString& group ) const
return ret;
}
-QStringList FileProps::preferredKeys( const QString& group ) const
+TQStringList FileProps::preferredKeys( const TQString& group ) const
{
KFileMetaInfoGroup g = m_info->group( group );
return g.preferredKeys();
}
-QString FileProps::getValue( const QString& group,
- const QString& key ) const
+TQString FileProps::getValue( const TQString& group,
+ const TQString& key ) const
{
KFileMetaInfoGroup g = m_info->group( group );
return FileProps::createKeyValue( g, key );
}
-bool FileProps::setValue( const QString& group,
- const QString& key, const QString &value )
+bool FileProps::setValue( const TQString& group,
+ const TQString& key, const TQString &value )
{
KFileMetaInfoGroup g = m_info->group( group );
bool wasAdded = false;
@@ -141,13 +141,13 @@ bool FileProps::setValue( const QString& group,
return ok;
}
-QStringList FileProps::allValues( const QString& group ) const
+TQStringList FileProps::allValues( const TQString& group ) const
{
KFileMetaInfoGroup g = m_info->group( group );
return FileProps::createKeyValueList( g, g.keys() );
}
-QStringList FileProps::preferredValues( const QString& group ) const
+TQStringList FileProps::preferredValues( const TQString& group ) const
{
KFileMetaInfoGroup g = m_info->group( group );
return FileProps::createKeyValueList( g, g.preferredKeys() );
@@ -156,18 +156,18 @@ QStringList FileProps::preferredValues( const QString& group ) const
// static helper:
// creates strings like
// "group: translatedKey: value"
-QString FileProps::createKeyValue( const KFileMetaInfoGroup& g,
- const QString& key )
+TQString FileProps::createKeyValue( const KFileMetaInfoGroup& g,
+ const TQString& key )
{
static const int MAX_SPACE = 25;
KFileMetaInfoItem item = g.item( key );
- QString result("%1");
+ TQString result("%1");
result = result.arg( (item.isValid() ? item.translatedKey() : key) + ":",
-MAX_SPACE );
result.append( beatifyValue( item.string() ) );
- QString group("%1");
+ TQString group("%1");
group = group.arg( g.translatedName() + ":", -MAX_SPACE );
result.prepend( group );
@@ -175,11 +175,11 @@ QString FileProps::createKeyValue( const KFileMetaInfoGroup& g,
}
// static
-QStringList FileProps::createKeyValueList( const KFileMetaInfoGroup& g,
- const QStringList& keys )
+TQStringList FileProps::createKeyValueList( const KFileMetaInfoGroup& g,
+ const TQStringList& keys )
{
- QStringList result;
- QStringList::ConstIterator it = keys.begin();
+ TQStringList result;
+ TQStringList::ConstIterator it = keys.begin();
for ( ; it != keys.end(); ++it )
result.append( FileProps::createKeyValue( g, *it ) );
@@ -263,7 +263,7 @@ static KCmdLineOptions options[] =
static void printSupportedMimeTypes()
{
- QStringList allMimeTypes = KFileMetaInfoProvider::self()->supportedMimeTypes();
+ TQStringList allMimeTypes = KFileMetaInfoProvider::self()->supportedMimeTypes();
if ( allMimeTypes.isEmpty() )
{
cout <<
@@ -274,7 +274,7 @@ static void printSupportedMimeTypes()
cout << i18n("Supported MimeTypes:").local8Bit() << endl;
- QStringList::ConstIterator it = allMimeTypes.begin();
+ TQStringList::ConstIterator it = allMimeTypes.begin();
for ( ; it != allMimeTypes.end(); it++ )
cout << (*it).local8Bit() << endl;
}
@@ -309,28 +309,28 @@ static void printMimeTypes( const KCmdLineArgs *args )
}
}
-static void printList( const QStringList& list )
+static void printList( const TQStringList& list )
{
- QStringList::ConstIterator it = list.begin();
+ TQStringList::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it )
cout << (*it).local8Bit() << endl;
cout << endl;
}
-static void processMetaDataOptions( const QPtrList<FileProps> propList,
+static void processMetaDataOptions( const TQPtrList<FileProps> propList,
KCmdLineArgs *args )
{
// kfile --mimetype --supportedMimetypes --listsupported --listavailable --listpreferred --listwritable --getValue "key" --setValue "key=value" --allValues --preferredValues --dialog --quiet file [file...]
// "key" may be a list of keys, separated by commas
- QString line("-- -------------------------------------------------------");
+ TQString line("-- -------------------------------------------------------");
FileProps *props;
- QPtrListIterator<FileProps> it( propList );
+ TQPtrListIterator<FileProps> it( propList );
for ( ; (props = it.current()); ++it )
{
- QString file = props->fileName() + " ";
- QString fileString = line.replace( 3, file.length(), file );
- cout << QFile::encodeName( fileString ) << endl;
+ TQString file = props->fileName() + " ";
+ TQString fileString = line.replace( 3, file.length(), file );
+ cout << TQFile::encodeName( fileString ) << endl;
if ( args->isSet( "listsupported" ) )
{
@@ -345,8 +345,8 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList,
if ( args->isSet( "listavailable" ) )
{
cout << "=Available Keys=" << endl;
- QStringList groups = props->availableGroups();
- QStringList::ConstIterator git = groups.begin();
+ TQStringList groups = props->availableGroups();
+ TQStringList::ConstIterator git = groups.begin();
for ( ; git != groups.end(); ++git )
{
cout << "Group: " << (*git).local8Bit() << endl;
@@ -360,8 +360,8 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList,
if ( args->isSet( "getValue" ) )
{
cout << "=Value=" << endl;
- QString key = QString::fromLocal8Bit( args->getOption("getValue"));
- QStringList::ConstIterator git = props->groupsToUse().begin();
+ TQString key = TQString::fromLocal8Bit( args->getOption("getValue"));
+ TQStringList::ConstIterator git = props->groupsToUse().begin();
for ( ; git != props->groupsToUse().end(); ++git )
cout << props->getValue( *git, key ).local8Bit() << endl;
}
@@ -369,17 +369,17 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList,
if ( args->isSet( "setValue" ) )
{
// separate key and value from the line "key=value"
- QString cmd = QString::fromLocal8Bit( args->getOption("setValue"));
- QString key = cmd.section( '=', 0, 0 );
- QString value = cmd.section( '=', 1 );
+ TQString cmd = TQString::fromLocal8Bit( args->getOption("setValue"));
+ TQString key = cmd.section( '=', 0, 0 );
+ TQString value = cmd.section( '=', 1 );
// either use supplied groups or all supported groups
// (not only the available!)
- QStringList groups = props->userSuppliedGroups() ?
+ TQStringList groups = props->userSuppliedGroups() ?
props->groupsToUse() :
props->supportedGroups();
- QStringList::ConstIterator git = groups.begin();
+ TQStringList::ConstIterator git = groups.begin();
for ( ; git != groups.end(); ++git )
props->setValue( *git, key, value );
}
@@ -387,16 +387,16 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList,
if ( args->isSet( "allValues" ) )
{
cout << "=All Values=" << endl;
- QStringList groups = props->availableGroups();
- QStringList::ConstIterator group = groups.begin();
+ TQStringList groups = props->availableGroups();
+ TQStringList::ConstIterator group = groups.begin();
for ( ; group != groups.end(); ++group )
printList( props->allValues( *group ) );
}
if ( args->isSet( "preferredValues" ) && !args->isSet("allValues") )
{
cout << "=Preferred Values=" << endl;
- QStringList groups = props->availableGroups();
- QStringList::ConstIterator group = groups.begin();
+ TQStringList groups = props->availableGroups();
+ TQStringList::ConstIterator group = groups.begin();
for ( ; group != groups.end(); ++group )
printList( props->preferredValues( *group ) );
}
@@ -425,7 +425,7 @@ int main( int argc, char **argv )
KApplication app( useGUI, useGUI );
- QPtrList<FileProps> m_props;
+ TQPtrList<FileProps> m_props;
m_props.setAutoDelete( true );
bool quiet = args->isSet( "quiet" );
@@ -443,13 +443,13 @@ int main( int argc, char **argv )
return true;
}
- QStringList groupsToUse;
+ TQStringList groupsToUse;
QCStringList suppliedGroups = args->getOptionList( "groups" );
QCStringList::ConstIterator it = suppliedGroups.begin();
for ( ; it != suppliedGroups.end(); ++it )
- groupsToUse.append( QString::fromLocal8Bit( (*it) ) );
+ groupsToUse.append( TQString::fromLocal8Bit( (*it) ) );
- QString mimeType;
+ TQString mimeType;
for ( int i = 0; i < files; i++ )
{
diff --git a/kio/misc/kfile/fileprops.h b/kio/misc/kfile/fileprops.h
index a26c1d3bb..41d4f7c86 100644
--- a/kio/misc/kfile/fileprops.h
+++ b/kio/misc/kfile/fileprops.h
@@ -19,55 +19,55 @@
#ifndef KFILEPROPS_H
#define KFILEPROPS_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kfilemetainfo.h>
class FileProps
{
public:
- FileProps( const QString& path, const QStringList& suppliedGroups );
+ FileProps( const TQString& path, const TQStringList& suppliedGroups );
virtual ~FileProps();
bool isValid() const;
- QString fileName() const { return m_info->path(); }
+ TQString fileName() const { return m_info->path(); }
- QStringList supportedGroups() const;
- QStringList availableGroups() const;
- QStringList translatedGroups();
+ TQStringList supportedGroups() const;
+ TQStringList availableGroups() const;
+ TQStringList translatedGroups();
- const QStringList& groupsToUse() const { return m_groupsToUse; }
+ const TQStringList& groupsToUse() const { return m_groupsToUse; }
bool userSuppliedGroups() const { return m_userSuppliedGroups; }
- QStringList supportedKeys( const QString& group ) const;
- QStringList availableKeys( const QString& group ) const;
- QStringList preferredKeys( const QString& group ) const;
+ TQStringList supportedKeys( const TQString& group ) const;
+ TQStringList availableKeys( const TQString& group ) const;
+ TQStringList preferredKeys( const TQString& group ) const;
- QStringList supportedKeys() const { return m_info->supportedKeys(); }
- QStringList preferredKeys() const { return m_info->preferredKeys(); }
+ TQStringList supportedKeys() const { return m_info->supportedKeys(); }
+ TQStringList preferredKeys() const { return m_info->preferredKeys(); }
- QString getValue( const QString& group, const QString& key ) const;
- bool setValue( const QString& group,
- const QString& key, const QString &value );
+ TQString getValue( const TQString& group, const TQString& key ) const;
+ bool setValue( const TQString& group,
+ const TQString& key, const TQString &value );
- QStringList allValues( const QString& group ) const;
- QStringList preferredValues( const QString& group ) const;
+ TQStringList allValues( const TQString& group ) const;
+ TQStringList preferredValues( const TQString& group ) const;
- bool isReadOnly( const QString& group, const QString& key );
+ bool isReadOnly( const TQString& group, const TQString& key );
private:
- static QString createKeyValue( const KFileMetaInfoGroup& g,
- const QString& key );
- static QStringList createKeyValueList( const KFileMetaInfoGroup&,
- const QStringList& );
+ static TQString createKeyValue( const KFileMetaInfoGroup& g,
+ const TQString& key );
+ static TQStringList createKeyValueList( const KFileMetaInfoGroup&,
+ const TQStringList& );
bool sync();
KFileMetaInfo *m_info;
bool m_dirty;
bool m_userSuppliedGroups;
- QStringList m_groupsToUse;
+ TQStringList m_groupsToUse;
};
diff --git a/kio/misc/kntlm/des.h b/kio/misc/kntlm/des.h
index 4125791b3..1cb2f27e5 100644
--- a/kio/misc/kntlm/des.h
+++ b/kio/misc/kntlm/des.h
@@ -1,7 +1,7 @@
#ifndef KNTLM_DES_H
#define KNTLM_DES_H
-#include <qglobal.h>
+#include <tqglobal.h>
typedef struct des_key
{
diff --git a/kio/misc/kntlm/kntlm.cpp b/kio/misc/kntlm/kntlm.cpp
index 20c9f2a0c..a3eca3bdd 100644
--- a/kio/misc/kntlm/kntlm.cpp
+++ b/kio/misc/kntlm/kntlm.cpp
@@ -23,7 +23,7 @@
#include <string.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <kswap.h>
#include <kmdcodec.h>
@@ -32,7 +32,7 @@
#include "des.h"
#include "kntlm.h"
-QString KNTLM::getString( const QByteArray &buf, const SecBuf &secbuf, bool unicode )
+TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode )
{
//watch for buffer overflows
Q_UINT32 offset;
@@ -40,22 +40,22 @@ QString KNTLM::getString( const QByteArray &buf, const SecBuf &secbuf, bool unic
offset = KFromToLittleEndian((Q_UINT32)secbuf.offset);
len = KFromToLittleEndian(secbuf.len);
if ( offset > buf.size() ||
- offset + len > buf.size() ) return QString::null;
+ offset + len > buf.size() ) return TQString::null;
- QString str;
+ TQString str;
const char *c = buf.data() + offset;
if ( unicode ) {
- str = UnicodeLE2QString( (QChar*) c, len >> 1 );
+ str = UnicodeLE2TQString( (TQChar*) c, len >> 1 );
} else {
- str = QString::fromLatin1( c, len );
+ str = TQString::fromLatin1( c, len );
}
return str;
}
-QByteArray KNTLM::getBuf( const QByteArray &buf, const SecBuf &secbuf )
+TQByteArray KNTLM::getBuf( const TQByteArray &buf, const SecBuf &secbuf )
{
- QByteArray ret;
+ TQByteArray ret;
Q_UINT32 offset;
Q_UINT16 len;
offset = KFromToLittleEndian((Q_UINT32)secbuf.offset);
@@ -67,9 +67,9 @@ QByteArray KNTLM::getBuf( const QByteArray &buf, const SecBuf &secbuf )
return ret;
}
-void KNTLM::addString( QByteArray &buf, SecBuf &secbuf, const QString &str, bool unicode )
+void KNTLM::addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode )
{
- QByteArray tmp;
+ TQByteArray tmp;
if ( unicode ) {
tmp = QString2UnicodeLE( str );
@@ -83,7 +83,7 @@ void KNTLM::addString( QByteArray &buf, SecBuf &secbuf, const QString &str, bool
}
}
-void KNTLM::addBuf( QByteArray &buf, SecBuf &secbuf, QByteArray &data )
+void KNTLM::addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data )
{
Q_UINT32 offset;
Q_UINT16 len, maxlen;
@@ -98,9 +98,9 @@ void KNTLM::addBuf( QByteArray &buf, SecBuf &secbuf, QByteArray &data )
memcpy( buf.data() + offset, data.data(), data.size() );
}
-bool KNTLM::getNegotiate( QByteArray &negotiate, const QString &domain, const QString &workstation, Q_UINT32 flags )
+bool KNTLM::getNegotiate( TQByteArray &negotiate, const TQString &domain, const TQString &workstation, Q_UINT32 flags )
{
- QByteArray rbuf( sizeof(Negotiate) );
+ TQByteArray rbuf( sizeof(Negotiate) );
rbuf.fill( 0 );
memcpy( rbuf.data(), "NTLMSSP", 8 );
@@ -118,16 +118,16 @@ bool KNTLM::getNegotiate( QByteArray &negotiate, const QString &domain, const QS
return true;
}
-bool KNTLM::getAuth( QByteArray &auth, const QByteArray &challenge, const QString &user,
- const QString &password, const QString &domain, const QString &workstation,
+bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQString &user,
+ const TQString &password, const TQString &domain, const TQString &workstation,
bool forceNTLM, bool forceNTLMv2 )
{
- QByteArray rbuf( sizeof(Auth) );
+ TQByteArray rbuf( sizeof(Auth) );
Challenge *ch = (Challenge *) challenge.data();
- QByteArray response;
+ TQByteArray response;
uint chsize = challenge.size();
bool unicode = false;
- QString dom;
+ TQString dom;
//challenge structure too small
if ( chsize < 32 ) return false;
@@ -142,7 +142,7 @@ bool KNTLM::getAuth( QByteArray &auth, const QByteArray &challenge, const QStrin
memcpy( rbuf.data(), "NTLMSSP", 8 );
((Auth*) rbuf.data())->msgType = KFromToLittleEndian( (Q_UINT32)3 );
((Auth*) rbuf.data())->flags = ch->flags;
- QByteArray targetInfo = getBuf( challenge, ch->targetInfo );
+ TQByteArray targetInfo = getBuf( challenge, ch->targetInfo );
// if ( forceNTLMv2 || (!targetInfo.isEmpty() && (KFromToLittleEndian(ch->flags) & Negotiate_Target_Info)) /* may support NTLMv2 */ ) {
// if ( KFromToLittleEndian(ch->flags) & Negotiate_NTLM ) {
@@ -174,9 +174,9 @@ bool KNTLM::getAuth( QByteArray &auth, const QByteArray &challenge, const QStrin
return true;
}
-QByteArray KNTLM::getLMResponse( const QString &password, const unsigned char *challenge )
+TQByteArray KNTLM::getLMResponse( const TQString &password, const unsigned char *challenge )
{
- QByteArray hash, answer;
+ TQByteArray hash, answer;
hash = lmHash( password );
hash.resize( 21 );
@@ -186,10 +186,10 @@ QByteArray KNTLM::getLMResponse( const QString &password, const unsigned char *c
return answer;
}
-QByteArray KNTLM::lmHash( const QString &password )
+TQByteArray KNTLM::lmHash( const TQString &password )
{
- QByteArray keyBytes( 14 );
- QByteArray hash( 16 );
+ TQByteArray keyBytes( 14 );
+ TQByteArray hash( 16 );
DES_KEY ks;
const char *magic = "KGS!@#$%";
@@ -208,10 +208,10 @@ QByteArray KNTLM::lmHash( const QString &password )
return hash;
}
-QByteArray KNTLM::lmResponse( const QByteArray &hash, const unsigned char *challenge )
+TQByteArray KNTLM::lmResponse( const TQByteArray &hash, const unsigned char *challenge )
{
DES_KEY ks;
- QByteArray answer( 24 );
+ TQByteArray answer( 24 );
convertKey( (unsigned char*) hash.data(), &ks );
ntlm_des_ecb_encrypt( challenge, 8, &ks, (unsigned char*) answer.data() );
@@ -226,9 +226,9 @@ QByteArray KNTLM::lmResponse( const QByteArray &hash, const unsigned char *chall
return answer;
}
-QByteArray KNTLM::getNTLMResponse( const QString &password, const unsigned char *challenge )
+TQByteArray KNTLM::getNTLMResponse( const TQString &password, const unsigned char *challenge )
{
- QByteArray hash, answer;
+ TQByteArray hash, answer;
hash = ntlmHash( password );
hash.resize( 21 );
@@ -238,10 +238,10 @@ QByteArray KNTLM::getNTLMResponse( const QString &password, const unsigned char
return answer;
}
-QByteArray KNTLM::ntlmHash( const QString &password )
+TQByteArray KNTLM::ntlmHash( const TQString &password )
{
KMD4::Digest digest;
- QByteArray ret, unicode;
+ TQByteArray ret, unicode;
unicode = QString2UnicodeLE( password );
KMD4 md4( unicode );
@@ -250,56 +250,56 @@ QByteArray KNTLM::ntlmHash( const QString &password )
return ret;
}
-QByteArray KNTLM::getNTLMv2Response( const QString &target, const QString &user,
- const QString &password, const QByteArray &targetInformation,
+TQByteArray KNTLM::getNTLMv2Response( const TQString &target, const TQString &user,
+ const TQString &password, const TQByteArray &targetInformation,
const unsigned char *challenge )
{
- QByteArray hash = ntlmv2Hash( target, user, password );
- QByteArray blob = createBlob( targetInformation );
+ TQByteArray hash = ntlmv2Hash( target, user, password );
+ TQByteArray blob = createBlob( targetInformation );
return lmv2Response( hash, blob, challenge );
}
-QByteArray KNTLM::getLMv2Response( const QString &target, const QString &user,
- const QString &password, const unsigned char *challenge )
+TQByteArray KNTLM::getLMv2Response( const TQString &target, const TQString &user,
+ const TQString &password, const unsigned char *challenge )
{
- QByteArray hash = ntlmv2Hash( target, user, password );
- QByteArray clientChallenge( 8 );
+ TQByteArray hash = ntlmv2Hash( target, user, password );
+ TQByteArray clientChallenge( 8 );
for ( uint i = 0; i<8; i++ ) {
clientChallenge.data()[i] = KApplication::random() % 0xff;
}
return lmv2Response( hash, clientChallenge, challenge );
}
-QByteArray KNTLM::ntlmv2Hash( const QString &target, const QString &user, const QString &password )
+TQByteArray KNTLM::ntlmv2Hash( const TQString &target, const TQString &user, const TQString &password )
{
- QByteArray hash1 = ntlmHash( password );
- QByteArray key, ret;
- QString id = user.upper() + target.upper();
+ TQByteArray hash1 = ntlmHash( password );
+ TQByteArray key, ret;
+ TQString id = user.upper() + target.upper();
key = QString2UnicodeLE( id );
ret = hmacMD5( key, hash1 );
return ret;
}
-QByteArray KNTLM::lmv2Response( const QByteArray &hash,
- const QByteArray &clientData, const unsigned char *challenge )
+TQByteArray KNTLM::lmv2Response( const TQByteArray &hash,
+ const TQByteArray &clientData, const unsigned char *challenge )
{
- QByteArray data( 8 + clientData.size() );
+ TQByteArray data( 8 + clientData.size() );
memcpy( data.data(), challenge, 8 );
memcpy( data.data() + 8, clientData.data(), clientData.size() );
- QByteArray mac = hmacMD5( data, hash );
+ TQByteArray mac = hmacMD5( data, hash );
mac.resize( 16 + clientData.size() );
memcpy( mac.data() + 16, clientData.data(), clientData.size() );
return mac;
}
-QByteArray KNTLM::createBlob( const QByteArray &targetinfo )
+TQByteArray KNTLM::createBlob( const TQByteArray &targetinfo )
{
- QByteArray blob( sizeof(Blob) + 4 + targetinfo.size() );
+ TQByteArray blob( sizeof(Blob) + 4 + targetinfo.size() );
blob.fill( 0 );
Blob *bl = (Blob *) blob.data();
bl->signature = KFromToBigEndian( (Q_UINT32) 0x01010000 );
- Q_UINT64 now = QDateTime::currentDateTime().toTime_t();
+ Q_UINT64 now = TQDateTime::currentDateTime().toTime_t();
now += (Q_UINT64)3600*(Q_UINT64)24*(Q_UINT64)134774;
now *= (Q_UINT64)10000000;
bl->timestamp = KFromToLittleEndian( now );
@@ -310,11 +310,11 @@ QByteArray KNTLM::createBlob( const QByteArray &targetinfo )
return blob;
}
-QByteArray KNTLM::hmacMD5( const QByteArray &data, const QByteArray &key )
+TQByteArray KNTLM::hmacMD5( const TQByteArray &data, const TQByteArray &key )
{
Q_UINT8 ipad[64], opad[64];
KMD5::Digest digest;
- QByteArray ret;
+ TQByteArray ret;
memset( ipad, 0x36, sizeof(ipad) );
memset( opad, 0x5c, sizeof(opad) );
@@ -323,7 +323,7 @@ QByteArray KNTLM::hmacMD5( const QByteArray &data, const QByteArray &key )
opad[i] ^= key[i];
}
- QByteArray content( data.size()+64 );
+ TQByteArray content( data.size()+64 );
memcpy( content.data(), ipad, 64 );
memcpy( content.data() + 64, data.data(), data.size() );
KMD5 md5( content );
@@ -370,18 +370,18 @@ void KNTLM::convertKey( unsigned char *key_56, void* ks )
memset (&key, 0, sizeof (key));
}
-QByteArray KNTLM::QString2UnicodeLE( const QString &target )
+TQByteArray KNTLM::QString2UnicodeLE( const TQString &target )
{
- QByteArray unicode( target.length() * 2 );
+ TQByteArray unicode( target.length() * 2 );
for ( uint i = 0; i < target.length(); i++ ) {
((Q_UINT16*)unicode.data())[ i ] = KFromToLittleEndian( target[i].unicode() );
}
return unicode;
}
-QString KNTLM::UnicodeLE2QString( const QChar* data, uint len )
+TQString KNTLM::UnicodeLE2TQString( const TQChar* data, uint len )
{
- QString ret;
+ TQString ret;
for ( uint i = 0; i < len; i++ ) {
ret += KFromToLittleEndian( data[ i ].unicode() );
}
diff --git a/kio/misc/kntlm/kntlm.h b/kio/misc/kntlm/kntlm.h
index 6dbb62139..9be4ea357 100644
--- a/kio/misc/kntlm/kntlm.h
+++ b/kio/misc/kntlm/kntlm.h
@@ -20,9 +20,9 @@
#ifndef KNTLM_H
#define KNTLM_H
-#include <qglobal.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqglobal.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -137,8 +137,8 @@ public:
*
* @return true if creating the structure succeeds, false otherwise.
*/
- static bool getNegotiate( QByteArray &negotiate, const QString &domain = QString::null,
- const QString &workstation = QString::null,
+ static bool getNegotiate( TQByteArray &negotiate, const TQString &domain = TQString::null,
+ const TQString &workstation = TQString::null,
Q_UINT32 flags = Negotiate_Unicode | Request_Target | Negotiate_NTLM );
/**
* Creates the type 3 message which should be sent to the server after
@@ -159,74 +159,74 @@ public:
* (challenge data invalid, or NTLM authentication forced, but the challenge data says
* no NTLM supported).
*/
- static bool getAuth( QByteArray &auth, const QByteArray &challenge, const QString &user,
- const QString &password, const QString &domain = QString::null,
- const QString &workstation = QString::null, bool forceNTLM = false, bool forceNTLMv2 = false );
+ static bool getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQString &user,
+ const TQString &password, const TQString &domain = TQString::null,
+ const TQString &workstation = TQString::null, bool forceNTLM = false, bool forceNTLMv2 = false );
/**
* Returns the LanManager response from the password and the server challenge.
*/
- static QByteArray getLMResponse( const QString &password, const unsigned char *challenge );
+ static TQByteArray getLMResponse( const TQString &password, const unsigned char *challenge );
/**
* Calculates the LanManager hash of the specified password.
*/
- static QByteArray lmHash( const QString &password );
+ static TQByteArray lmHash( const TQString &password );
/**
* Calculates the LanManager response from the LanManager hash and the server challenge.
*/
- static QByteArray lmResponse( const QByteArray &hash, const unsigned char *challenge );
+ static TQByteArray lmResponse( const TQByteArray &hash, const unsigned char *challenge );
/**
* Returns the NTLM response from the password and the server challenge.
*/
- static QByteArray getNTLMResponse( const QString &password, const unsigned char *challenge );
+ static TQByteArray getNTLMResponse( const TQString &password, const unsigned char *challenge );
/**
* Returns the NTLM hash (MD4) from the password.
*/
- static QByteArray ntlmHash( const QString &password );
+ static TQByteArray ntlmHash( const TQString &password );
/**
* Calculates the NTLMv2 response.
*/
- static QByteArray getNTLMv2Response( const QString &target, const QString &user,
- const QString &password, const QByteArray &targetInformation,
+ static TQByteArray getNTLMv2Response( const TQString &target, const TQString &user,
+ const TQString &password, const TQByteArray &targetInformation,
const unsigned char *challenge );
/**
* Calculates the LMv2 response.
*/
- static QByteArray getLMv2Response( const QString &target, const QString &user,
- const QString &password, const unsigned char *challenge );
+ static TQByteArray getLMv2Response( const TQString &target, const TQString &user,
+ const TQString &password, const unsigned char *challenge );
/**
* Returns the NTLMv2 hash.
*/
- static QByteArray ntlmv2Hash( const QString &target, const QString &user, const QString &password );
+ static TQByteArray ntlmv2Hash( const TQString &target, const TQString &user, const TQString &password );
/**
* Calculates the LMv2 response.
*/
- static QByteArray lmv2Response( const QByteArray &hash,
- const QByteArray &clientData, const unsigned char *challenge );
+ static TQByteArray lmv2Response( const TQByteArray &hash,
+ const TQByteArray &clientData, const unsigned char *challenge );
/**
* Extracts a string field from an NTLM structure.
*/
- static QString getString( const QByteArray &buf, const SecBuf &secbuf, bool unicode );
+ static TQString getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode );
/**
* Extracts a byte array from an NTLM structure.
*/
- static QByteArray getBuf( const QByteArray &buf, const SecBuf &secbuf );
+ static TQByteArray getBuf( const TQByteArray &buf, const SecBuf &secbuf );
- static QByteArray createBlob( const QByteArray &targetinfo );
+ static TQByteArray createBlob( const TQByteArray &targetinfo );
- static QByteArray hmacMD5( const QByteArray &data, const QByteArray &key );
+ static TQByteArray hmacMD5( const TQByteArray &data, const TQByteArray &key );
private:
- static QByteArray QString2UnicodeLE( const QString &target );
- static QString UnicodeLE2QString( const QChar* data, uint len );
+ static TQByteArray QString2UnicodeLE( const TQString &target );
+ static TQString UnicodeLE2TQString( const TQChar* data, uint len );
- static void addBuf( QByteArray &buf, SecBuf &secbuf, QByteArray &data );
- static void addString( QByteArray &buf, SecBuf &secbuf, const QString &str, bool unicode = false );
+ static void addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data );
+ static void addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode = false );
static void convertKey( unsigned char *key_56, void* ks );
};
diff --git a/kio/misc/kntlm/kswap.h b/kio/misc/kntlm/kswap.h
index e9db968ed..336321fd4 100644
--- a/kio/misc/kntlm/kswap.h
+++ b/kio/misc/kntlm/kswap.h
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-#include <qglobal.h>
+#include <tqglobal.h>
/**
* \defgroup KSWAP Byte-swapping functions
diff --git a/kio/misc/kpac/discovery.cpp b/kio/misc/kpac/discovery.cpp
index 06709241b..7a84958f7 100644
--- a/kio/misc/kpac/discovery.cpp
+++ b/kio/misc/kpac/discovery.cpp
@@ -39,7 +39,7 @@
#include <resolv.h>
#include <sys/utsname.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kprocio.h>
@@ -49,16 +49,16 @@
namespace KPAC
{
- Discovery::Discovery( QObject* parent )
+ Discovery::Discovery( TQObject* parent )
: Downloader( parent ),
m_helper( new KProcIO )
{
- connect( m_helper, SIGNAL( readReady( KProcIO* ) ), SLOT( helperOutput() ) );
- connect( m_helper, SIGNAL( processExited( KProcess* ) ), SLOT( failed() ) );
+ connect( m_helper, TQT_SIGNAL( readReady( KProcIO* ) ), TQT_SLOT( helperOutput() ) );
+ connect( m_helper, TQT_SIGNAL( processExited( KProcess* ) ), TQT_SLOT( failed() ) );
*m_helper << "kpac_dhcp_helper";
if ( !m_helper->start() )
- QTimer::singleShot( 0, this, SLOT( failed() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( failed() ) );
}
bool Discovery::initHostName()
@@ -69,7 +69,7 @@ namespace KPAC
{
struct hostent *hent = gethostbyname (uts.nodename);
if (hent != 0)
- m_hostname = QString::fromLocal8Bit( hent->h_name );
+ m_hostname = TQString::fromLocal8Bit( hent->h_name );
}
// If no hostname, try gethostname as a last resort.
@@ -79,7 +79,7 @@ namespace KPAC
if (gethostname (buf, sizeof(buf)) == 0)
{
buf[255] = '\0';
- m_hostname = QString::fromLocal8Bit( buf );
+ m_hostname = TQString::fromLocal8Bit( buf );
}
}
return !m_hostname.isEmpty();
@@ -138,7 +138,7 @@ namespace KPAC
void Discovery::helperOutput()
{
m_helper->disconnect( this );
- QString line;
+ TQString line;
m_helper->readln( line );
download( KURL( line.stripWhiteSpace() ) );
}
diff --git a/kio/misc/kpac/discovery.h b/kio/misc/kpac/discovery.h
index b9c657924..a1443ad8c 100644
--- a/kio/misc/kpac/discovery.h
+++ b/kio/misc/kpac/discovery.h
@@ -21,7 +21,7 @@
#ifndef KPAC_DISCOVERY_H
#define KPAC_DISCOVERY_H
-#include <qobject.h>
+#include <tqobject.h>
#include "downloader.h"
@@ -33,7 +33,7 @@ namespace KPAC
{
Q_OBJECT
public:
- Discovery( QObject* );
+ Discovery( TQObject* );
protected slots:
virtual void failed();
@@ -46,7 +46,7 @@ namespace KPAC
bool checkDomain() const;
KProcIO* m_helper;
- QString m_hostname;
+ TQString m_hostname;
};
}
diff --git a/kio/misc/kpac/downloader.cpp b/kio/misc/kpac/downloader.cpp
index 6d4e62409..6f419f5f5 100644
--- a/kio/misc/kpac/downloader.cpp
+++ b/kio/misc/kpac/downloader.cpp
@@ -21,7 +21,7 @@
#include <cstdlib>
#include <cstring>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kcharsets.h>
#include <kglobal.h>
@@ -32,21 +32,21 @@
namespace KPAC
{
- Downloader::Downloader( QObject* parent )
- : QObject( parent )
+ Downloader::Downloader( TQObject* parent )
+ : TQObject( parent )
{
}
void Downloader::download( const KURL& url )
{
m_data.resize( 0 );
- m_script = QString::null;
+ m_script = TQString::null;
m_scriptURL = url;
KIO::TransferJob* job = KIO::get( url, false, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- SLOT( data( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( result( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( result( KIO::Job* ) ) );
}
void Downloader::failed()
@@ -54,12 +54,12 @@ namespace KPAC
emit result( false );
}
- void Downloader::setError( const QString& error )
+ void Downloader::setError( const TQString& error )
{
m_error = error;
}
- void Downloader::data( KIO::Job*, const QByteArray& data )
+ void Downloader::data( KIO::Job*, const TQByteArray& data )
{
unsigned offset = m_data.size();
m_data.resize( offset + data.size() );
diff --git a/kio/misc/kpac/downloader.h b/kio/misc/kpac/downloader.h
index 7869d7102..05d8569cc 100644
--- a/kio/misc/kpac/downloader.h
+++ b/kio/misc/kpac/downloader.h
@@ -21,7 +21,7 @@
#ifndef KPAC_DOWNLOADER_H
#define KPAC_DOWNLOADER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
@@ -33,29 +33,29 @@ namespace KPAC
{
Q_OBJECT
public:
- Downloader( QObject* );
+ Downloader( TQObject* );
void download( const KURL& );
const KURL& scriptURL() { return m_scriptURL; }
- const QString& script() { return m_script; }
- const QString& error() { return m_error; }
+ const TQString& script() { return m_script; }
+ const TQString& error() { return m_error; }
signals:
void result( bool );
protected:
virtual void failed();
- void setError( const QString& );
+ void setError( const TQString& );
private slots:
- void data( KIO::Job*, const QByteArray& );
+ void data( KIO::Job*, const TQByteArray& );
void result( KIO::Job* );
private:
- QByteArray m_data;
+ TQByteArray m_data;
KURL m_scriptURL;
- QString m_script;
- QString m_error;
+ TQString m_script;
+ TQString m_error;
};
}
diff --git a/kio/misc/kpac/proxyscout.cpp b/kio/misc/kpac/proxyscout.cpp
index 06d860615..6cba79db6 100644
--- a/kio/misc/kpac/proxyscout.cpp
+++ b/kio/misc/kpac/proxyscout.cpp
@@ -39,7 +39,7 @@ namespace KPAC
{
}
- ProxyScout::ProxyScout( const QCString& name )
+ ProxyScout::ProxyScout( const TQCString& name )
: KDEDModule( name ),
m_instance( new KInstance( "proxyscout" ) ),
m_downloader( 0 ),
@@ -54,7 +54,7 @@ namespace KPAC
delete m_instance;
}
- QString ProxyScout::proxyForURL( const KURL& url )
+ TQString ProxyScout::proxyForURL( const KURL& url )
{
if ( m_suspendTime )
{
@@ -70,12 +70,12 @@ namespace KPAC
if ( m_downloader || startDownload() )
{
m_requestQueue.append( url );
- return QString::null;
+ return TQString::null;
}
else return "DIRECT";
}
- ASYNC ProxyScout::blackListProxy( const QString& proxy )
+ ASYNC ProxyScout::blackListProxy( const TQString& proxy )
{
m_blackList[ proxy ] = std::time( 0 );
}
@@ -105,8 +105,8 @@ namespace KPAC
default:
return false;
}
- connect( m_downloader, SIGNAL( result( bool ) ),
- SLOT( downloadResult( bool ) ) );
+ connect( m_downloader, TQT_SIGNAL( result( bool ) ),
+ TQT_SLOT( downloadResult( bool ) ) );
return true;
}
@@ -130,11 +130,11 @@ namespace KPAC
for ( RequestQueue::ConstIterator it = m_requestQueue.begin();
it != m_requestQueue.end(); ++it )
{
- QCString type = "QString";
- QByteArray data;
- QDataStream ds( data, IO_WriteOnly );
+ TQCString type = "TQString";
+ TQByteArray data;
+ TQDataStream ds( data, IO_WriteOnly );
if ( success ) ds << handleRequest( ( *it ).url );
- else ds << QString( "DIRECT" );
+ else ds << TQString( "DIRECT" );
kapp->dcopClient()->endTransaction( ( *it ).transaction, type, data );
}
m_requestQueue.clear();
@@ -144,16 +144,16 @@ namespace KPAC
if ( !success ) m_suspendTime = std::time( 0 );
}
- QString ProxyScout::handleRequest( const KURL& url )
+ TQString ProxyScout::handleRequest( const KURL& url )
{
try
{
- QString result = m_script->evaluate( url );
- QStringList proxies = QStringList::split( ';', result );
- for ( QStringList::ConstIterator it = proxies.begin();
+ TQString result = m_script->evaluate( url );
+ TQStringList proxies = TQStringList::split( ';', result );
+ for ( TQStringList::ConstIterator it = proxies.begin();
it != proxies.end(); ++it )
{
- QString proxy = ( *it ).stripWhiteSpace();
+ TQString proxy = ( *it ).stripWhiteSpace();
if ( proxy.left( 5 ) == "PROXY" )
{
KURL proxyURL( proxy = proxy.mid( 5 ).stripWhiteSpace() );
@@ -187,7 +187,7 @@ namespace KPAC
return "DIRECT";
}
- extern "C" KDE_EXPORT KDEDModule* create_proxyscout( const QCString& name )
+ extern "C" KDE_EXPORT KDEDModule* create_proxyscout( const TQCString& name )
{
return new ProxyScout( name );
}
diff --git a/kio/misc/kpac/proxyscout.h b/kio/misc/kpac/proxyscout.h
index afd7968ab..c18e5173d 100644
--- a/kio/misc/kpac/proxyscout.h
+++ b/kio/misc/kpac/proxyscout.h
@@ -21,7 +21,7 @@
#ifndef KPAC_PROXYSCOUT_H
#define KPAC_PROXYSCOUT_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kdedmodule.h>
#include <kurl.h>
@@ -41,12 +41,12 @@ namespace KPAC
Q_OBJECT
K_DCOP
public:
- ProxyScout( const QCString& );
+ ProxyScout( const TQCString& );
virtual ~ProxyScout();
k_dcop:
- QString proxyForURL( const KURL& url );
- ASYNC blackListProxy( const QString& proxy );
+ TQString proxyForURL( const KURL& url );
+ ASYNC blackListProxy( const TQString& proxy );
ASYNC reset();
private slots:
@@ -54,7 +54,7 @@ namespace KPAC
private:
bool startDownload();
- QString handleRequest( const KURL& url );
+ TQString handleRequest( const KURL& url );
KInstance* m_instance;
Downloader* m_downloader;
@@ -68,10 +68,10 @@ namespace KPAC
DCOPClientTransaction* transaction;
KURL url;
};
- typedef QValueList< QueuedRequest > RequestQueue;
+ typedef TQValueList< QueuedRequest > RequestQueue;
RequestQueue m_requestQueue;
- typedef QMap< QString, time_t > BlackList;
+ typedef TQMap< TQString, time_t > BlackList;
BlackList m_blackList;
time_t m_suspendTime;
};
diff --git a/kio/misc/kpac/script.cpp b/kio/misc/kpac/script.cpp
index 39d6d3f8e..55faef8a1 100644
--- a/kio/misc/kpac/script.cpp
+++ b/kio/misc/kpac/script.cpp
@@ -30,8 +30,8 @@
#include <arpa/inet.h>
#include <unistd.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqregexp.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kjs/object.h>
@@ -41,12 +41,12 @@
using namespace KJS;
-QString UString::qstring() const
+TQString UString::qstring() const
{
- return QString( reinterpret_cast< const QChar* >( data() ), size() );
+ return TQString( reinterpret_cast< const TQChar* >( data() ), size() );
}
-UString::UString( const QString &s )
+UString::UString( const TQString &s )
{
UChar* data = new UChar[ s.length() ];
std::memcpy( data, s.unicode(), s.length() * sizeof( UChar ) );
@@ -72,7 +72,7 @@ namespace
operator String() const { return String( m_address.ipAddress().toString() ); }
private:
- Address( const QString& host, bool numeric )
+ Address( const TQString& host, bool numeric )
{
int flags = 0;
@@ -80,7 +80,7 @@ namespace
flags = KNetwork::KResolver::NoResolve;
KNetwork::KResolverResults addresses =
- KNetwork::KResolver::resolve( host, QString::null, flags,
+ KNetwork::KResolver::resolve( host, TQString::null, flags,
KNetwork::KResolver::IPv4Family );
if ( addresses.isEmpty() )
@@ -140,8 +140,8 @@ namespace
virtual Value call( ExecState* exec, Object&, const List& args )
{
if ( args.size() != 2 ) return Undefined();
- QString host = args[ 0 ].toString( exec ).qstring().lower();
- QString domain = args[ 1 ].toString( exec ).qstring().lower();
+ TQString host = args[ 0 ].toString( exec ).qstring().lower();
+ TQString domain = args[ 1 ].toString( exec ).qstring().lower();
return Boolean( host.endsWith( domain ) );
}
};
@@ -243,7 +243,7 @@ namespace
virtual Value call( ExecState* exec, Object&, const List& args )
{
if ( args.size() != 2 ) return Undefined();
- QRegExp pattern( args[ 1 ].toString( exec ).qstring(), true, true );
+ TQRegExp pattern( args[ 1 ].toString( exec ).qstring(), true, true );
return Boolean( pattern.exactMatch(args[ 0 ].toString( exec ).qstring()) );
}
};
@@ -427,7 +427,7 @@ namespace
namespace KPAC
{
- Script::Script( const QString& code )
+ Script::Script( const TQString& code )
{
ExecState* exec = m_interpreter.globalExec();
Object global = m_interpreter.globalObject();
@@ -438,7 +438,7 @@ namespace KPAC
throw Error( result.value().toString( exec ).qstring() );
}
- QString Script::evaluate( const KURL& url )
+ TQString Script::evaluate( const KURL& url )
{
ExecState *exec = m_interpreter.globalExec();
Value findFunc = m_interpreter.globalObject().get( exec, "FindProxyForURL" );
diff --git a/kio/misc/kpac/script.h b/kio/misc/kpac/script.h
index 2f5314e9a..49ba0b6a3 100644
--- a/kio/misc/kpac/script.h
+++ b/kio/misc/kpac/script.h
@@ -21,7 +21,7 @@
#ifndef KPAC_SCRIPT_H
#define KPAC_SCRIPT_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kjs/interpreter.h>
@@ -35,16 +35,16 @@ namespace KPAC
class Error
{
public:
- Error( const QString& message )
+ Error( const TQString& message )
: m_message( message ) {}
- const QString& message() const { return m_message; }
+ const TQString& message() const { return m_message; }
private:
- QString m_message;
+ TQString m_message;
};
- Script( const QString& code );
- QString evaluate( const KURL& );
+ Script( const TQString& code );
+ TQString evaluate( const KURL& );
private:
KJS::Interpreter m_interpreter;
diff --git a/kio/misc/ksendbugmail/main.cpp b/kio/misc/ksendbugmail/main.cpp
index 0d12f9e93..d84e4c297 100644
--- a/kio/misc/ksendbugmail/main.cpp
+++ b/kio/misc/ksendbugmail/main.cpp
@@ -6,7 +6,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kapplication.h>
#include <kemailsettings.h>
@@ -26,7 +26,7 @@ static KCmdLineOptions options[] = {
void BugMailer::slotError(int errornum) {
kdDebug() << "slotError\n";
- QString str, lstr;
+ TQString str, lstr;
switch(errornum) {
case SMTP::CONNECTERROR:
@@ -70,7 +70,7 @@ int main(int argc, char **argv) {
KApplication a(false, false);
- QCString recipient = args->getOption("recipient");
+ TQCString recipient = args->getOption("recipient");
if (recipient.isEmpty())
recipient = "submit@bugs.kde.org";
else {
@@ -80,15 +80,15 @@ int main(int argc, char **argv) {
}
kdDebug() << "recp \"" << recipient << "\"\n";
- QCString subject = args->getOption("subject");
+ TQCString subject = args->getOption("subject");
if (subject.isEmpty())
subject = "(no subject)";
else {
if (subject.at(0) == '\'')
subject = subject.mid(1).left(subject.length() - 2);
}
- QTextIStream input(stdin);
- QString text, line;
+ TQTextIStream input(stdin);
+ TQString text, line;
while (!input.eof()) {
line = input.readLine();
text += line + "\r\n";
@@ -97,15 +97,15 @@ int main(int argc, char **argv) {
KEMailSettings emailConfig;
emailConfig.setProfile(emailConfig.defaultProfileName());
- QString fromaddr = emailConfig.getSetting(KEMailSettings::EmailAddress);
+ TQString fromaddr = emailConfig.getSetting(KEMailSettings::EmailAddress);
if (!fromaddr.isEmpty()) {
- QString name = emailConfig.getSetting(KEMailSettings::RealName);
+ TQString name = emailConfig.getSetting(KEMailSettings::RealName);
if (!name.isEmpty())
- fromaddr = name + QString::fromLatin1(" <") + fromaddr + QString::fromLatin1(">");
+ fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">");
} else {
struct passwd *p;
p = getpwuid(getuid());
- fromaddr = QString::fromLatin1(p->pw_name);
+ fromaddr = TQString::fromLatin1(p->pw_name);
fromaddr += "@";
char buffer[256];
buffer[0] = '\0';
@@ -115,21 +115,21 @@ int main(int argc, char **argv) {
}
kdDebug() << "fromaddr \"" << fromaddr << "\"" << endl;
- QString server = emailConfig.getSetting(KEMailSettings::OutServer);
+ TQString server = emailConfig.getSetting(KEMailSettings::OutServer);
if (server.isEmpty())
- server=QString::fromLatin1("bugs.kde.org");
+ server=TQString::fromLatin1("bugs.kde.org");
SMTP *sm = new SMTP;
BugMailer bm(sm);
- QObject::connect(sm, SIGNAL(messageSent()), &bm, SLOT(slotSend()));
- QObject::connect(sm, SIGNAL(error(int)), &bm, SLOT(slotError(int)));
+ TQObject::connect(sm, TQT_SIGNAL(messageSent()), &bm, TQT_SLOT(slotSend()));
+ TQObject::connect(sm, TQT_SIGNAL(error(int)), &bm, TQT_SLOT(slotError(int)));
sm->setServerHost(server);
sm->setPort(25);
sm->setSenderAddress(fromaddr);
sm->setRecipientAddress(recipient);
sm->setMessageSubject(subject);
- sm->setMessageHeader(QString::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient));
+ sm->setMessageHeader(TQString::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient));
sm->setMessageBody(text);
sm->sendMessage();
diff --git a/kio/misc/ksendbugmail/main.h b/kio/misc/ksendbugmail/main.h
index cd7de398d..39d424bef 100644
--- a/kio/misc/ksendbugmail/main.h
+++ b/kio/misc/ksendbugmail/main.h
@@ -1,14 +1,14 @@
#ifndef BUG_MAILER_H
#define BUG_MAILER_H "$Id$"
-#include <qobject.h>
+#include <tqobject.h>
class SMTP;
-class BugMailer : public QObject {
+class BugMailer : public TQObject {
Q_OBJECT
public:
- BugMailer(SMTP* s) : QObject(0, "mailer"), sm(s) {}
+ BugMailer(SMTP* s) : TQObject(0, "mailer"), sm(s) {}
public slots:
void slotError(int);
diff --git a/kio/misc/ksendbugmail/smtp.cpp b/kio/misc/ksendbugmail/smtp.cpp
index fd8211281..36a417b88 100644
--- a/kio/misc/ksendbugmail/smtp.cpp
+++ b/kio/misc/ksendbugmail/smtp.cpp
@@ -38,12 +38,12 @@ SMTP::SMTP(char *serverhost, unsigned short int port, int timeout)
kdDebug() << "SMTP object created" << endl;
- connect(&connectTimer, SIGNAL(timeout()), this, SLOT(connectTimerTick()));
- connect(&timeOutTimer, SIGNAL(timeout()), this, SLOT(connectTimedOut()));
- connect(&interactTimer, SIGNAL(timeout()), this, SLOT(interactTimedOut()));
+ connect(&connectTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(connectTimerTick()));
+ connect(&timeOutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(connectTimedOut()));
+ connect(&interactTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(interactTimedOut()));
// some sendmail will give 'duplicate helo' error, quick fix for now
- connect(this, SIGNAL(messageSent()), SLOT(closeConnection()));
+ connect(this, TQT_SIGNAL(messageSent()), TQT_SLOT(closeConnection()));
}
SMTP::~SMTP()
@@ -56,7 +56,7 @@ SMTP::~SMTP()
timeOutTimer.stop();
}
-void SMTP::setServerHost(const QString& serverhost)
+void SMTP::setServerHost(const TQString& serverhost)
{
serverHost = serverhost;
}
@@ -71,7 +71,7 @@ void SMTP::setTimeOut(int timeout)
timeOut = timeout;
}
-void SMTP::setSenderAddress(const QString& sender)
+void SMTP::setSenderAddress(const TQString& sender)
{
senderAddress = sender;
int index = senderAddress.find('<');
@@ -95,22 +95,22 @@ void SMTP::setSenderAddress(const QString& sender)
}
-void SMTP::setRecipientAddress(const QString& recipient)
+void SMTP::setRecipientAddress(const TQString& recipient)
{
recipientAddress = recipient;
}
-void SMTP::setMessageSubject(const QString& subject)
+void SMTP::setMessageSubject(const TQString& subject)
{
messageSubject = subject;
}
-void SMTP::setMessageBody(const QString& message)
+void SMTP::setMessageBody(const TQString& message)
{
messageBody = message;
}
-void SMTP::setMessageHeader(const QString &header)
+void SMTP::setMessageHeader(const TQString &header)
{
messageHeader = header;
}
@@ -134,7 +134,7 @@ void SMTP::sendMessage(void)
kdDebug() << "state was == FINISHED\n" << endl;
finished = false;
state = IN;
- writeString = QString::fromLatin1("helo %1\r\n").arg(domainName);
+ writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName);
write(sock->socket(), writeString.ascii(), writeString.length());
}
if(connected){
@@ -173,8 +173,8 @@ void SMTP::connectTimerTick(void)
state = INIT;
serverState = NONE;
- connect(sock, SIGNAL(readEvent(KSocket *)), this, SLOT(socketRead(KSocket *)));
- connect(sock, SIGNAL(closeEvent(KSocket *)), this, SLOT(socketClose(KSocket *)));
+ connect(sock, TQT_SIGNAL(readEvent(KSocket *)), this, TQT_SLOT(socketRead(KSocket *)));
+ connect(sock, TQT_SIGNAL(closeEvent(KSocket *)), this, TQT_SLOT(socketClose(KSocket *)));
// sock->enableRead(true);
timeOutTimer.stop();
kdDebug() << "connected" << endl;
@@ -231,8 +231,8 @@ void SMTP::socketRead(KSocket *socket)
void SMTP::socketClose(KSocket *socket)
{
timeOutTimer.stop();
- disconnect(sock, SIGNAL(readEvent(KSocket *)), this, SLOT(socketRead(KSocket *)));
- disconnect(sock, SIGNAL(closeEvent(KSocket *)), this, SLOT(socketClose(KSocket *)));
+ disconnect(sock, TQT_SIGNAL(readEvent(KSocket *)), this, TQT_SLOT(socketRead(KSocket *)));
+ disconnect(sock, TQT_SIGNAL(closeEvent(KSocket *)), this, TQT_SLOT(socketClose(KSocket *)));
socket->enableRead(false);
kdDebug() << "connection terminated" << endl;
connected = false;
@@ -244,10 +244,10 @@ void SMTP::socketClose(KSocket *socket)
emit connectionClosed();
}
-void SMTP::processLine(QString *line)
+void SMTP::processLine(TQString *line)
{
int i, stat;
- QString tmpstr;
+ TQString tmpstr;
i = line->find(' ');
tmpstr = line->left(i);
@@ -262,7 +262,7 @@ void SMTP::processLine(QString *line)
switch(stat){
case GREET: //220
state = IN;
- writeString = QString::fromLatin1("helo %1\r\n").arg(domainName);
+ writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
@@ -273,19 +273,19 @@ void SMTP::processLine(QString *line)
switch(state){
case IN:
state = READY;
- writeString = QString::fromLatin1("mail from: %1\r\n").arg(senderAddress);
+ writeString = TQString::fromLatin1("mail from: %1\r\n").arg(senderAddress);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
case READY:
state = SENTFROM;
- writeString = QString::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress);
+ writeString = TQString::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
case SENTFROM:
state = SENTTO;
- writeString = QString::fromLatin1("data\r\n");
+ writeString = TQString::fromLatin1("data\r\n");
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
@@ -305,11 +305,11 @@ void SMTP::processLine(QString *line)
break;
case READYDATA: //354
state = DATA;
- writeString = QString::fromLatin1("Subject: %1\r\n").arg(messageSubject);
+ writeString = TQString::fromLatin1("Subject: %1\r\n").arg(messageSubject);
writeString += messageHeader;
writeString += "\r\n";
writeString += messageBody;
- writeString += QString::fromLatin1(".\r\n");
+ writeString += TQString::fromLatin1(".\r\n");
kdDebug() << "out: " << writeString;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
diff --git a/kio/misc/ksendbugmail/smtp.h b/kio/misc/ksendbugmail/smtp.h
index 71a464e98..707d20ae4 100644
--- a/kio/misc/ksendbugmail/smtp.h
+++ b/kio/misc/ksendbugmail/smtp.h
@@ -3,8 +3,8 @@
#ifndef SMTP_H
#define SMTP_H
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqtimer.h>
#include <ksock.h>
/*int SMTPServerStatus[] = {
@@ -44,19 +44,19 @@ public:
SMTP(char *serverhost = 0, unsigned short int port = 0, int timeout = DEFAULT_SMTP_TIMEOUT);
~SMTP();
- void setServerHost(const QString& serverhost);
+ void setServerHost(const TQString& serverhost);
void setPort(unsigned short int port);
void setTimeOut(int timeout);
bool isConnected(){return connected;};
bool isFinished(){return finished;};
- QString getLastLine(){return lastLine;};
+ TQString getLastLine(){return lastLine;};
- void setSenderAddress(const QString& sender);
- void setRecipientAddress(const QString& recipient);
- void setMessageSubject(const QString& subject);
- void setMessageBody(const QString& message);
- void setMessageHeader(const QString &header);
+ void setSenderAddress(const TQString& sender);
+ void setRecipientAddress(const TQString& recipient);
+ void setMessageSubject(const TQString& subject);
+ void setMessageBody(const TQString& message);
+ void setMessageHeader(const TQString &header);
typedef enum {
NONE = 0, // null
@@ -93,7 +93,7 @@ public:
}SMTPError;
protected:
- void processLine(QString *line);
+ void processLine(TQString *line);
public slots:
void openConnection();
@@ -113,32 +113,32 @@ signals:
void error(int);
private:
- QString serverHost;
+ TQString serverHost;
unsigned short int hostPort;
int timeOut;
bool connected;
bool finished;
- QString senderAddress;
- QString recipientAddress;
- QString messageSubject;
- QString messageBody, messageHeader;
+ TQString senderAddress;
+ TQString recipientAddress;
+ TQString messageSubject;
+ TQString messageBody, messageHeader;
SMTPClientStatus state;
SMTPClientStatus lastState;
SMTPServerStatus serverState;
- QString domainName;
+ TQString domainName;
KSocket *sock;
- QTimer connectTimer;
- QTimer timeOutTimer;
- QTimer interactTimer;
+ TQTimer connectTimer;
+ TQTimer timeOutTimer;
+ TQTimer interactTimer;
char readBuffer[SMTP_READ_BUFFER_SIZE];
- QString lineBuffer;
- QString lastLine;
- QString writeString;
+ TQString lineBuffer;
+ TQString lastLine;
+ TQString writeString;
};
#endif
diff --git a/kio/misc/kssld/kssld.cpp b/kio/misc/kssld/kssld.cpp
index ff96681e2..9e8b85574 100644
--- a/kio/misc/kssld/kssld.cpp
+++ b/kio/misc/kssld/kssld.cpp
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-#include <qtimer.h>
+#include <tqtimer.h>
#include "kssld.h"
#include <kconfig.h>
@@ -34,18 +34,18 @@
#include <ksslcertificatehome.h>
#include <ksslpkcs12.h>
#include <ksslx509map.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <pwd.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qsortedlist.h>
+#include <tqfile.h>
+#include <tqsortedlist.h>
#include <kglobal.h>
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kmdcodec.h>
#include <kopenssl.h>
@@ -53,7 +53,7 @@
// See design notes at end
extern "C" {
- KDE_EXPORT KDEDModule *create_kssld(const QCString &name) {
+ KDE_EXPORT KDEDModule *create_kssld(const TQCString &name) {
return new KSSLD(name);
}
@@ -62,9 +62,9 @@ extern "C" {
static void updatePoliciesConfig(KConfig *cfg) {
- QStringList groups = cfg->groupList();
+ TQStringList groups = cfg->groupList();
- for (QStringList::Iterator i = groups.begin(); i != groups.end(); ++i) {
+ for (TQStringList::Iterator i = groups.begin(); i != groups.end(); ++i) {
if ((*i).isEmpty() || *i == "General") {
continue;
}
@@ -72,13 +72,13 @@ static void updatePoliciesConfig(KConfig *cfg) {
cfg->setGroup(*i);
// remove it if it has expired
- if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < QDateTime::currentDateTime()) {
+ if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < TQDateTime::currentDateTime()) {
cfg->deleteGroup(*i);
continue;
}
- QString encodedCertStr = cfg->readEntry("Certificate");
- QCString encodedCert = encodedCertStr.local8Bit();
+ TQString encodedCertStr = cfg->readEntry("Certificate");
+ TQCString encodedCert = encodedCertStr.local8Bit();
KSSLCertificate *newCert = KSSLCertificate::fromString(encodedCert);
if (!newCert) {
cfg->deleteGroup(*i);
@@ -87,9 +87,9 @@ static void updatePoliciesConfig(KConfig *cfg) {
KSSLCertificateCache::KSSLCertificatePolicy policy = (KSSLCertificateCache::KSSLCertificatePolicy) cfg->readNumEntry("Policy");
bool permanent = cfg->readBoolEntry("Permanent");
- QDateTime expires = cfg->readDateTimeEntry("Expires");
- QStringList hosts = cfg->readListEntry("Hosts");
- QStringList chain = cfg->readListEntry("Chain");
+ TQDateTime expires = cfg->readDateTimeEntry("Expires");
+ TQStringList hosts = cfg->readListEntry("Hosts");
+ TQStringList chain = cfg->readListEntry("Chain");
cfg->deleteGroup(*i);
cfg->setGroup(newCert->getMD5Digest());
@@ -109,7 +109,7 @@ static void updatePoliciesConfig(KConfig *cfg) {
}
-KSSLD::KSSLD(const QCString &name) : KDEDModule(name)
+KSSLD::KSSLD(const TQCString &name) : KDEDModule(name)
{
// ----------------------- FOR THE CACHE ------------------------------------
cfg = new KSimpleConfig("ksslpolicies", false);
@@ -145,8 +145,8 @@ class KSSLCNode {
KSSLCertificate *cert;
KSSLCertificateCache::KSSLCertificatePolicy policy;
bool permanent;
- QDateTime expires;
- QStringList hosts;
+ TQDateTime expires;
+ TQStringList hosts;
KSSLCNode() { cert = 0L;
policy = KSSLCertificateCache::Unknown;
permanent = true;
@@ -164,7 +164,7 @@ KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (node->permanent ||
- node->expires > QDateTime::currentDateTime()) {
+ node->expires > TQDateTime::currentDateTime()) {
// First convert to a binary format and then write the
// kconfig entry write the (CN, policy, cert) to
// KSimpleConfig
@@ -176,8 +176,8 @@ KSSLCNode *node;
cfg->writeEntry("Hosts", node->hosts);
// Also write the chain
- QStringList qsl;
- QPtrList<KSSLCertificate> cl =
+ TQStringList qsl;
+ TQPtrList<KSSLCertificate> cl =
node->cert->chain().getChain();
for (KSSLCertificate *c = cl.first();
c != 0;
@@ -195,10 +195,10 @@ KSSLCNode *node;
cfg->sync();
// insure proper permissions -- contains sensitive data
- QString cfgName(KGlobal::dirs()->findResource("config", "ksslpolicies"));
+ TQString cfgName(KGlobal::dirs()->findResource("config", "ksslpolicies"));
if (!cfgName.isEmpty()) {
- ::chmod(QFile::encodeName(cfgName), 0600);
+ ::chmod(TQFile::encodeName(cfgName), 0600);
}
}
@@ -225,9 +225,9 @@ KSSLCNode *node;
void KSSLD::cacheLoadDefaultPolicies() {
-QStringList groups = cfg->groupList();
+TQStringList groups = cfg->groupList();
- for (QStringList::Iterator i = groups.begin();
+ for (TQStringList::Iterator i = groups.begin();
i != groups.end();
++i) {
if ((*i).isEmpty() || *i == "General") {
@@ -239,12 +239,12 @@ QStringList groups = cfg->groupList();
// remove it if it has expired
if (!cfg->readBoolEntry("Permanent") &&
cfg->readDateTimeEntry("Expires") <
- QDateTime::currentDateTime()) {
+ TQDateTime::currentDateTime()) {
cfg->deleteGroup(*i);
continue;
}
- QCString encodedCert;
+ TQCString encodedCert;
KSSLCertificate *newCert;
encodedCert = cfg->readEntry("Certificate").local8Bit();
@@ -278,7 +278,7 @@ KSSLCNode *node;
node->permanent = permanent;
if (!permanent) {
- node->expires = QDateTime::currentDateTime();
+ node->expires = TQDateTime::currentDateTime();
// FIXME: make this configurable
node->expires = node->expires.addSecs(3600);
}
@@ -297,7 +297,7 @@ KSSLCNode *node;
certList.prepend(n);
if (!permanent) {
- n->expires = QDateTime::currentDateTime();
+ n->expires = TQDateTime::currentDateTime();
n->expires = n->expires.addSecs(3600);
}
@@ -306,13 +306,13 @@ KSSLCNode *node;
}
-KSSLCertificateCache::KSSLCertificatePolicy KSSLD::cacheGetPolicyByCN(QString cn) {
+KSSLCertificateCache::KSSLCertificatePolicy KSSLD::cacheGetPolicyByCN(TQString cn) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) {
if (!node->permanent &&
- node->expires < QDateTime::currentDateTime()) {
+ node->expires < TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
delete node;
@@ -338,7 +338,7 @@ KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent &&
- node->expires < QDateTime::currentDateTime()) {
+ node->expires < TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
delete node;
@@ -356,13 +356,13 @@ return KSSLCertificateCache::Unknown;
}
-bool KSSLD::cacheSeenCN(QString cn) {
+bool KSSLD::cacheSeenCN(TQString cn) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) {
if (!node->permanent &&
- node->expires < QDateTime::currentDateTime()) {
+ node->expires < TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
delete node;
@@ -386,7 +386,7 @@ KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent &&
- node->expires < QDateTime::currentDateTime()) {
+ node->expires < TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
delete node;
@@ -410,7 +410,7 @@ KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent && node->expires <
- QDateTime::currentDateTime()) {
+ TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
delete node;
@@ -428,7 +428,7 @@ return false;
}
-bool KSSLD::cacheRemoveBySubject(QString subject) {
+bool KSSLD::cacheRemoveBySubject(TQString subject) {
KSSLCNode *node;
bool gotOne = false;
@@ -448,7 +448,7 @@ return gotOne;
}
-bool KSSLD::cacheRemoveByCN(QString cn) {
+bool KSSLD::cacheRemoveByCN(TQString cn) {
KSSLCNode *node;
bool gotOne = false;
@@ -486,9 +486,9 @@ return false;
}
-bool KSSLD::cacheModifyByCN(QString cn,
+bool KSSLD::cacheModifyByCN(TQString cn,
KSSLCertificateCache::KSSLCertificatePolicy policy, bool permanent,
- QDateTime expires) {
+ TQDateTime expires) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
@@ -510,7 +510,7 @@ return false;
bool KSSLD::cacheModifyByCertificate(KSSLCertificate cert,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime expires) {
+ TQDateTime expires) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
@@ -529,19 +529,19 @@ return false;
}
-QStringList KSSLD::cacheGetHostList(KSSLCertificate cert) {
+TQStringList KSSLD::cacheGetHostList(KSSLCertificate cert) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent && node->expires <
- QDateTime::currentDateTime()) {
+ TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
searchRemoveCert(node->cert);
delete node;
cacheSaveToDisk();
- return QStringList();
+ return TQStringList();
}
certList.remove(node);
@@ -550,11 +550,11 @@ KSSLCNode *node;
}
}
-return QStringList();
+return TQStringList();
}
-bool KSSLD::cacheAddHost(KSSLCertificate cert, QString host) {
+bool KSSLD::cacheAddHost(KSSLCertificate cert, TQString host) {
KSSLCNode *node;
if (host.isEmpty())
@@ -563,7 +563,7 @@ KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent && node->expires <
- QDateTime::currentDateTime()) {
+ TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
searchRemoveCert(node->cert);
@@ -587,13 +587,13 @@ return false;
}
-bool KSSLD::cacheRemoveHost(KSSLCertificate cert, QString host) {
+bool KSSLD::cacheRemoveHost(KSSLCertificate cert, TQString host) {
KSSLCNode *node;
for (node = certList.first(); node; node = certList.next()) {
if (cert == *(node->cert)) {
if (!node->permanent && node->expires <
- QDateTime::currentDateTime()) {
+ TQDateTime::currentDateTime()) {
certList.remove(node);
cfg->deleteGroup(node->cert->getMD5Digest());
searchRemoveCert(node->cert);
@@ -618,11 +618,11 @@ return false;
///////////////////////////////////////////////////////////////////////////
void KSSLD::caVerifyUpdate() {
- QString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt";
- if (!QFile::exists(path))
+ TQString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt";
+ if (!TQFile::exists(path))
return;
- cfg->setGroup(QString::null);
+ cfg->setGroup(TQString::null);
Q_UINT32 newStamp = KGlobal::dirs()->calcResourceHash("config", "ksslcalist", true);
Q_UINT32 oldStamp = cfg->readUnsignedNumEntry("ksslcalistStamp");
if (oldStamp != newStamp)
@@ -634,18 +634,18 @@ void KSSLD::caVerifyUpdate() {
}
bool KSSLD::caRegenerate() {
-QString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt";
+TQString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt";
-QFile out(path);
+TQFile out(path);
if (!out.open(IO_WriteOnly))
return false;
KConfig cfg("ksslcalist", true, false);
-QStringList x = cfg.groupList();
+TQStringList x = cfg.groupList();
- for (QStringList::Iterator i = x.begin();
+ for (TQStringList::Iterator i = x.begin();
i != x.end();
++i) {
if ((*i).isEmpty() || *i == "<default>") continue;
@@ -654,7 +654,7 @@ QStringList x = cfg.groupList();
if (!cfg.readBoolEntry("site", false)) continue;
- QString cert = cfg.readEntry("x509", "");
+ TQString cert = cfg.readEntry("x509", "");
if (cert.length() <= 0) continue;
unsigned int xx = cert.length() - 1;
@@ -672,7 +672,7 @@ return true;
-bool KSSLD::caAdd(QString certificate, bool ssl, bool email, bool code) {
+bool KSSLD::caAdd(TQString certificate, bool ssl, bool email, bool code) {
KSSLCertificate *x = KSSLCertificate::fromString(certificate.local8Bit());
if (!x) return false;
@@ -696,11 +696,11 @@ return true;
* @internal
* Returns a list of certificates as QStrings read from the given file
*/
-static QStringList caReadCerticatesFromFile(QString filename) {
+static TQStringList caReadCerticatesFromFile(TQString filename) {
- QStringList certificates;
- QString certificate, temp;
- QFile file(filename);
+ TQStringList certificates;
+ TQString certificate, temp;
+ TQFile file(filename);
if (!file.open(IO_ReadOnly))
return certificates;
@@ -708,13 +708,13 @@ static QStringList caReadCerticatesFromFile(QString filename) {
while (!file.atEnd()) {
file.readLine(temp, 999);
if (temp.startsWith("-----BEGIN CERTIFICATE-----")) {
- certificate = QString::null;
+ certificate = TQString::null;
continue;
}
if (temp.startsWith("-----END CERTIFICATE-----")) {
certificates.append(certificate);
- certificate = QString::null;
+ certificate = TQString::null;
continue;
}
@@ -726,16 +726,16 @@ static QStringList caReadCerticatesFromFile(QString filename) {
return certificates;
}
-bool KSSLD::caAddFromFile(QString filename, bool ssl, bool email, bool code) {
+bool KSSLD::caAddFromFile(TQString filename, bool ssl, bool email, bool code) {
- QStringList certificates;
+ TQStringList certificates;
certificates = caReadCerticatesFromFile(filename);
if (certificates.isEmpty())
return false;
bool ok = true;
- for (QStringList::Iterator it = certificates.begin();
+ for (TQStringList::Iterator it = certificates.begin();
it != certificates.end(); ++it ) {
ok &= caAdd(*it, ssl, email, code);
}
@@ -743,18 +743,18 @@ bool KSSLD::caAddFromFile(QString filename, bool ssl, bool email, bool code) {
return ok;
}
-bool KSSLD::caRemoveFromFile(QString filename) {
+bool KSSLD::caRemoveFromFile(TQString filename) {
- QStringList certificates;
+ TQStringList certificates;
certificates = caReadCerticatesFromFile(filename);
if (certificates.isEmpty())
return false;
bool ok = true;
- for (QStringList::Iterator it = certificates.begin();
+ for (TQStringList::Iterator it = certificates.begin();
it != certificates.end(); ++it ) {
- QString certificate = *it;
+ TQString certificate = *it;
KSSLCertificate *x = KSSLCertificate::fromString(certificate.local8Bit());
ok &= x && caRemove(x->getSubject());
delete x;
@@ -764,8 +764,8 @@ bool KSSLD::caRemoveFromFile(QString filename) {
}
-QStringList KSSLD::caList() {
-QStringList x;
+TQStringList KSSLD::caList() {
+TQStringList x;
KConfig cfg("ksslcalist", true, false);
x = cfg.groupList();
@@ -775,7 +775,7 @@ return x;
}
-bool KSSLD::caUseForSSL(QString subject) {
+bool KSSLD::caUseForSSL(TQString subject) {
KConfig cfg("ksslcalist", true, false);
if (!cfg.hasGroup(subject))
@@ -787,7 +787,7 @@ return cfg.readBoolEntry("site", false);
-bool KSSLD::caUseForEmail(QString subject) {
+bool KSSLD::caUseForEmail(TQString subject) {
KConfig cfg("ksslcalist", true, false);
if (!cfg.hasGroup(subject))
@@ -799,7 +799,7 @@ return cfg.readBoolEntry("email", false);
-bool KSSLD::caUseForCode(QString subject) {
+bool KSSLD::caUseForCode(TQString subject) {
KConfig cfg("ksslcalist", true, false);
if (!cfg.hasGroup(subject))
@@ -810,7 +810,7 @@ return cfg.readBoolEntry("code", false);
}
-bool KSSLD::caRemove(QString subject) {
+bool KSSLD::caRemove(TQString subject) {
KConfig cfg("ksslcalist", false, false);
if (!cfg.hasGroup(subject))
return false;
@@ -822,18 +822,18 @@ return true;
}
-QString KSSLD::caGetCert(QString subject) {
+TQString KSSLD::caGetCert(TQString subject) {
KConfig cfg("ksslcalist", true, false);
if (!cfg.hasGroup(subject))
- return QString::null;
+ return TQString::null;
cfg.setGroup(subject);
-return cfg.readEntry("x509", QString::null);
+return cfg.readEntry("x509", TQString::null);
}
-bool KSSLD::caSetUse(QString subject, bool ssl, bool email, bool code) {
+bool KSSLD::caSetUse(TQString subject, bool ssl, bool email, bool code) {
KConfig cfg("ksslcalist", false, false);
if (!cfg.hasGroup(subject))
return false;
@@ -853,16 +853,16 @@ return true;
void KSSLD::searchAddCert(KSSLCertificate *cert) {
skMD5Digest.insert(cert->getMD5Digest(), cert, true);
- QStringList mails;
+ TQStringList mails;
cert->getEmails(mails);
- for(QStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) {
- QString email = static_cast<const QString &>(*iter).lower();
- QMap<QString, QPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email);
+ for(TQStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) {
+ TQString email = static_cast<const TQString &>(*iter).lower();
+ TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email);
if (it == skEmail.end())
- it = skEmail.insert(email, QPtrVector<KSSLCertificate>());
+ it = skEmail.insert(email, TQPtrVector<KSSLCertificate>());
- QPtrVector<KSSLCertificate> &elem = *it;
+ TQPtrVector<KSSLCertificate> &elem = *it;
if (elem.findRef(cert) == -1) {
unsigned int n = 0;
@@ -884,15 +884,15 @@ void KSSLD::searchAddCert(KSSLCertificate *cert) {
void KSSLD::searchRemoveCert(KSSLCertificate *cert) {
skMD5Digest.remove(cert->getMD5Digest());
- QStringList mails;
+ TQStringList mails;
cert->getEmails(mails);
- for(QStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) {
- QMap<QString, QPtrVector<KSSLCertificate> >::iterator it = skEmail.find(static_cast<const QString &>(*iter).lower());
+ for(TQStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) {
+ TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(static_cast<const TQString &>(*iter).lower());
if (it == skEmail.end())
break;
- QPtrVector<KSSLCertificate> &elem = *it;
+ TQPtrVector<KSSLCertificate> &elem = *it;
int n = elem.findRef(cert);
if (n != -1)
@@ -901,16 +901,16 @@ void KSSLD::searchRemoveCert(KSSLCertificate *cert) {
}
-QStringList KSSLD::getKDEKeyByEmail(const QString &email) {
- QStringList rc;
- QMap<QString, QPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email.lower());
+TQStringList KSSLD::getKDEKeyByEmail(const TQString &email) {
+ TQStringList rc;
+ TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email.lower());
kdDebug() << "GETKDEKey " << email.latin1() << endl;
if (it == skEmail.end())
return rc;
- QPtrVector<KSSLCertificate> &elem = *it;
+ TQPtrVector<KSSLCertificate> &elem = *it;
for (unsigned int n = 0; n < elem.size(); n++) {
KSSLCertificate *cert = elem.at(n);
if (cert) {
@@ -923,8 +923,8 @@ QStringList KSSLD::getKDEKeyByEmail(const QString &email) {
}
-KSSLCertificate KSSLD::getCertByMD5Digest(const QString &key) {
- QMap<QString, KSSLCertificate *>::iterator iter = skMD5Digest.find(key);
+KSSLCertificate KSSLD::getCertByMD5Digest(const TQString &key) {
+ TQMap<TQString, KSSLCertificate *>::iterator iter = skMD5Digest.find(key);
kdDebug() << "Searching cert for " << key.latin1() << endl;
@@ -943,15 +943,15 @@ KSSLCertificate KSSLD::getCertByMD5Digest(const QString &key) {
// Certificate Home methods
//
-QStringList KSSLD::getHomeCertificateList() {
+TQStringList KSSLD::getHomeCertificateList() {
return KSSLCertificateHome::getCertificateList();
}
-bool KSSLD::addHomeCertificateFile(QString filename, QString password, bool storePass) {
+bool KSSLD::addHomeCertificateFile(TQString filename, TQString password, bool storePass) {
return KSSLCertificateHome::addCertificate(filename, password, storePass);
}
-bool KSSLD::addHomeCertificatePKCS12(QString base64cert, QString passToStore) {
+bool KSSLD::addHomeCertificatePKCS12(TQString base64cert, TQString passToStore) {
bool ok;
KSSLPKCS12 *pkcs12 = KSSLPKCS12::fromString(base64cert, passToStore);
ok = KSSLCertificateHome::addCertificate(pkcs12, passToStore);
@@ -959,11 +959,11 @@ bool KSSLD::addHomeCertificatePKCS12(QString base64cert, QString passToStore) {
return ok;
}
-bool KSSLD::deleteHomeCertificateByFile(QString filename, QString password) {
+bool KSSLD::deleteHomeCertificateByFile(TQString filename, TQString password) {
return KSSLCertificateHome::deleteCertificate(filename, password);
}
-bool KSSLD::deleteHomeCertificateByPKCS12(QString base64cert, QString password) {
+bool KSSLD::deleteHomeCertificateByPKCS12(TQString base64cert, TQString password) {
bool ok;
KSSLPKCS12 *pkcs12 = KSSLPKCS12::fromString(base64cert, password);
ok = KSSLCertificateHome::deleteCertificate(pkcs12);
@@ -971,7 +971,7 @@ bool KSSLD::deleteHomeCertificateByPKCS12(QString base64cert, QString password)
return ok;
}
-bool KSSLD::deleteHomeCertificateByName(QString name) {
+bool KSSLD::deleteHomeCertificateByName(TQString name) {
return KSSLCertificateHome::deleteCertificateByName(name);
}
@@ -991,7 +991,7 @@ bool KSSLD::deleteHomeCertificateByName(QString name) {
experimentation to determine which implementation works best. My current
options are:
- (1) Store copies of the X509 certificates in a QPtrList using a self
+ (1) Store copies of the X509 certificates in a TQPtrList using a self
organizing heuristic as described by Munro and Suwanda.
(2) Store copies of the X509 certificates in a tree structure, perhaps
a redblack tree, avl tree, or even just a simple binary tree.
diff --git a/kio/misc/kssld/kssld.h b/kio/misc/kssld/kssld.h
index 94cbe3972..028a30809 100644
--- a/kio/misc/kssld/kssld.h
+++ b/kio/misc/kssld/kssld.h
@@ -25,11 +25,11 @@
#include <kded/kdedmodule.h>
#include <ksslcertificate.h>
#include <ksslcertificatecache.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qptrvector.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
class KSimpleConfig;
@@ -43,7 +43,7 @@ class KSSLD : public KDEDModule
public:
- KSSLD(const QCString &name);
+ KSSLD(const TQCString &name);
virtual ~KSSLD();
@@ -54,80 +54,80 @@ k_dcop:
void cacheAddCertificate(KSSLCertificate cert,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent = true);
- KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCN(QString cn);
+ KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCN(TQString cn);
KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCertificate(KSSLCertificate cert);
- bool cacheSeenCN(QString cn);
+ bool cacheSeenCN(TQString cn);
bool cacheSeenCertificate(KSSLCertificate cert);
- bool cacheRemoveByCN(QString cn);
- bool cacheRemoveBySubject(QString subject);
+ bool cacheRemoveByCN(TQString cn);
+ bool cacheRemoveBySubject(TQString subject);
bool cacheRemoveByCertificate(KSSLCertificate cert);
bool cacheIsPermanent(KSSLCertificate cert);
void cacheReload();
- bool cacheModifyByCN(QString cn,
+ bool cacheModifyByCN(TQString cn,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime expires);
+ TQDateTime expires);
bool cacheModifyByCertificate(KSSLCertificate cert,
KSSLCertificateCache::KSSLCertificatePolicy policy,
bool permanent,
- QDateTime expires);
+ TQDateTime expires);
- QStringList cacheGetHostList(KSSLCertificate cert);
+ TQStringList cacheGetHostList(KSSLCertificate cert);
- bool cacheAddHost(KSSLCertificate cert, QString host);
+ bool cacheAddHost(KSSLCertificate cert, TQString host);
- bool cacheRemoveHost(KSSLCertificate cert, QString host);
+ bool cacheRemoveHost(KSSLCertificate cert, TQString host);
/* Certificate Authorities */
void caVerifyUpdate();
bool caRegenerate();
- QStringList caList();
+ TQStringList caList();
- bool caUseForSSL(QString subject);
+ bool caUseForSSL(TQString subject);
- bool caUseForEmail(QString subject);
+ bool caUseForEmail(TQString subject);
- bool caUseForCode(QString subject);
+ bool caUseForCode(TQString subject);
- bool caAdd(QString certificate, bool ssl, bool email, bool code);
+ bool caAdd(TQString certificate, bool ssl, bool email, bool code);
- bool caAddFromFile(QString filename, bool ssl, bool email, bool code);
+ bool caAddFromFile(TQString filename, bool ssl, bool email, bool code);
- bool caRemove(QString subject);
+ bool caRemove(TQString subject);
- bool caRemoveFromFile(QString filename);
+ bool caRemoveFromFile(TQString filename);
- QString caGetCert(QString subject);
+ TQString caGetCert(TQString subject);
- bool caSetUse(QString subject, bool ssl, bool email, bool code);
+ bool caSetUse(TQString subject, bool ssl, bool email, bool code);
- QStringList getKDEKeyByEmail(const QString &email);
+ TQStringList getKDEKeyByEmail(const TQString &email);
- KSSLCertificate getCertByMD5Digest(const QString &key);
+ KSSLCertificate getCertByMD5Digest(const TQString &key);
//
// Certificate Home methods
//
- QStringList getHomeCertificateList();
+ TQStringList getHomeCertificateList();
- bool addHomeCertificateFile(QString filename, QString password, bool storePass /*=false*/);
+ bool addHomeCertificateFile(TQString filename, TQString password, bool storePass /*=false*/);
- bool addHomeCertificatePKCS12(QString base64cert, QString passToStore);
+ bool addHomeCertificatePKCS12(TQString base64cert, TQString passToStore);
- bool deleteHomeCertificateByFile(QString filename, QString password);
+ bool deleteHomeCertificateByFile(TQString filename, TQString password);
- bool deleteHomeCertificateByPKCS12(QString base64cert, QString password);
+ bool deleteHomeCertificateByPKCS12(TQString base64cert, TQString password);
- bool deleteHomeCertificateByName(QString name);
+ bool deleteHomeCertificateByName(TQString name);
private:
@@ -137,7 +137,7 @@ private:
// for the cache portion:
KSimpleConfig *cfg;
- QPtrList<KSSLCNode> certList;
+ TQPtrList<KSSLCNode> certList;
// Our pointer to OpenSSL
KOpenSSLProxy *kossl;
@@ -146,8 +146,8 @@ private:
void searchAddCert(KSSLCertificate *cert);
void searchRemoveCert(KSSLCertificate *cert);
- QMap<QString, QPtrVector<KSSLCertificate> > skEmail;
- QMap<QString, KSSLCertificate *> skMD5Digest;
+ TQMap<TQString, TQPtrVector<KSSLCertificate> > skEmail;
+ TQMap<TQString, KSSLCertificate *> skMD5Digest;
};
diff --git a/kio/misc/ktelnetservice.cpp b/kio/misc/ktelnetservice.cpp
index 41635b053..9c8238f74 100644
--- a/kio/misc/ktelnetservice.cpp
+++ b/kio/misc/ktelnetservice.cpp
@@ -51,10 +51,10 @@ int main(int argc, char **argv)
KConfig *config = new KConfig("kdeglobals", true);
config->setGroup("General");
- QString terminal = config->readPathEntry("TerminalApplication", "konsole");
+ TQString terminal = config->readPathEntry("TerminalApplication", "konsole");
KURL url(args->arg(0));
- QStringList cmd;
+ TQStringList cmd;
if (terminal == "konsole")
cmd << "--noclose";
@@ -83,7 +83,7 @@ int main(int argc, char **argv)
cmd << url.user();
}
- QString host;
+ TQString host;
if (!url.host().isEmpty())
host = url.host(); // telnet://host
else if (!url.path().isEmpty())
@@ -99,9 +99,9 @@ int main(int argc, char **argv)
if (url.port()){
if ( url.protocol() == "ssh" )
- cmd << "-p" << QString::number(url.port());
+ cmd << "-p" << TQString::number(url.port());
else
- cmd << QString::number(url.port());
+ cmd << TQString::number(url.port());
}
app.kdeinitExec(terminal, cmd);
diff --git a/kio/misc/kwalletd/kbetterthankdialogbase.ui.h b/kio/misc/kwalletd/kbetterthankdialogbase.ui.h
index 565e0880e..2b3e16b0d 100644
--- a/kio/misc/kwalletd/kbetterthankdialogbase.ui.h
+++ b/kio/misc/kwalletd/kbetterthankdialogbase.ui.h
@@ -25,7 +25,7 @@ void KBetterThanKDialogBase::clicked()
}
-void KBetterThanKDialogBase::setLabel( const QString & label )
+void KBetterThanKDialogBase::setLabel( const TQString & label )
{
_label->setText(label);
}
@@ -45,6 +45,6 @@ void KBetterThanKDialogBase::accept()
void KBetterThanKDialogBase::reject()
{
- QDialog::reject();
+ TQDialog::reject();
setResult(2);
}
diff --git a/kio/misc/kwalletd/ktimeout.cpp b/kio/misc/kwalletd/ktimeout.cpp
index 1827b8bba..e13a32d20 100644
--- a/kio/misc/kwalletd/ktimeout.cpp
+++ b/kio/misc/kwalletd/ktimeout.cpp
@@ -23,7 +23,7 @@
#include "ktimeout.h"
KTimeout::KTimeout(int size)
-: QObject(), _timers(size) {
+: TQObject(), _timers(size) {
_timers.setAutoDelete(true);
}
@@ -39,7 +39,7 @@ void KTimeout::clear() {
void KTimeout::removeTimer(int id) {
- QTimer *t = _timers.find(id);
+ TQTimer *t = _timers.find(id);
if (t != 0L) {
_timers.remove(id); // autodeletes
}
@@ -51,15 +51,15 @@ void KTimeout::addTimer(int id, int timeout) {
return;
}
- QTimer *t = new QTimer;
- connect(t, SIGNAL(timeout()), this, SLOT(timeout()));
+ TQTimer *t = new QTimer;
+ connect(t, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()));
t->start(timeout);
_timers.insert(id, t);
}
void KTimeout::resetTimer(int id, int timeout) {
- QTimer *t = _timers.find(id);
+ TQTimer *t = _timers.find(id);
if (t) {
t->changeInterval(timeout);
}
@@ -67,9 +67,9 @@ void KTimeout::resetTimer(int id, int timeout) {
void KTimeout::timeout() {
- const QTimer *t = static_cast<const QTimer*>(sender());
+ const TQTimer *t = static_cast<const TQTimer*>(sender());
if (t) {
- QIntDictIterator<QTimer> it(_timers);
+ TQIntDictIterator<TQTimer> it(_timers);
for (; it.current(); ++it) {
if (it.current() == t) {
emit timedOut(it.currentKey());
diff --git a/kio/misc/kwalletd/ktimeout.h b/kio/misc/kwalletd/ktimeout.h
index 287de44cb..441e4ed77 100644
--- a/kio/misc/kwalletd/ktimeout.h
+++ b/kio/misc/kwalletd/ktimeout.h
@@ -22,12 +22,12 @@
#ifndef _KTIMEOUT_H_
#define _KTIMEOUT_H_
-#include <qintdict.h>
-#include <qobject.h>
-#include <qtimer.h>
+#include <tqintdict.h>
+#include <tqobject.h>
+#include <tqtimer.h>
// @internal
-class KTimeout : public QObject {
+class KTimeout : public TQObject {
Q_OBJECT
public:
KTimeout(int size = 29);
@@ -46,7 +46,7 @@ class KTimeout : public QObject {
void timeout();
private:
- QIntDict<QTimer> _timers;
+ TQIntDict<TQTimer> _timers;
};
#endif
diff --git a/kio/misc/kwalletd/kwalletd.cpp b/kio/misc/kwalletd/kwalletd.cpp
index 3fa32ff71..fd39f8487 100644
--- a/kio/misc/kwalletd/kwalletd.cpp
+++ b/kio/misc/kwalletd/kwalletd.cpp
@@ -40,18 +40,18 @@
#include <kwalletentry.h>
#include <kwin.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qstylesheet.h>
-#include <qvbox.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
+#include <tqvbox.h>
#include <assert.h>
extern "C" {
- KDE_EXPORT KDEDModule *create_kwalletd(const QCString &name) {
+ KDE_EXPORT KDEDModule *create_kwalletd(const TQCString &name) {
return new KWalletD(name);
}
}
@@ -76,15 +76,15 @@ class KWalletTransaction {
DCOPClient *client;
DCOPClientTransaction *transaction;
Type tType;
- QCString rawappid, returnObject;
- QCString appid;
+ TQCString rawappid, returnObject;
+ TQCString appid;
uint wId;
- QString wallet;
+ TQString wallet;
bool modal;
};
-KWalletD::KWalletD(const QCString &name)
+KWalletD::KWalletD(const TQCString &name)
: KDEDModule(name), _failed(0) {
srand(time(0));
_showingFailureNotify = false;
@@ -92,17 +92,17 @@ KWalletD::KWalletD(const QCString &name)
_timeouts = new KTimeout(17);
_closeIdle = false;
_idleTime = 0;
- connect(_timeouts, SIGNAL(timedOut(int)), this, SLOT(timedOut(int)));
+ connect(_timeouts, TQT_SIGNAL(timedOut(int)), this, TQT_SLOT(timedOut(int)));
reconfigure();
KGlobal::dirs()->addResourceType("kwallet", "share/apps/kwallet");
connect(KApplication::dcopClient(),
- SIGNAL(applicationRemoved(const QCString&)),
+ TQT_SIGNAL(applicationRemoved(const TQCString&)),
this,
- SLOT(slotAppUnregistered(const QCString&)));
+ TQT_SLOT(slotAppUnregistered(const TQCString&)));
_dw = new KDirWatch(this, "KWallet Directory Watcher");
_dw->addDir(KGlobal::dirs()->saveLocation("kwallet"));
_dw->startScan(true);
- connect(_dw, SIGNAL(dirty(const QString&)), this, SLOT(emitWalletListDirty()));
+ connect(_dw, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(emitWalletListDirty()));
}
@@ -140,7 +140,7 @@ void KWalletD::processTransactions() {
KWalletTransaction *xact;
while (!_transactions.isEmpty()) {
xact = _transactions.first();
- QCString replyType;
+ TQCString replyType;
int res;
assert(xact->tType != KWalletTransaction::Unknown);
@@ -157,7 +157,7 @@ void KWalletD::processTransactions() {
// should not produce multiple password
// dialogs on a failure
if (res < 0) {
- QPtrListIterator<KWalletTransaction> it(_transactions);
+ TQPtrListIterator<KWalletTransaction> it(_transactions);
KWalletTransaction *x;
while ((x = it.current()) && x != xact) {
++it;
@@ -189,8 +189,8 @@ void KWalletD::processTransactions() {
}
if (xact->returnObject.isEmpty() && xact->tType != KWalletTransaction::ChangePassword) {
- QByteArray replyData;
- QDataStream stream(replyData, IO_WriteOnly);
+ TQByteArray replyData;
+ TQDataStream stream(replyData, IO_WriteOnly);
stream << res;
xact->client->endTransaction(xact->transaction, replyType, replyData);
}
@@ -201,20 +201,20 @@ void KWalletD::processTransactions() {
}
-void KWalletD::openAsynchronous(const QString& wallet, const QCString& returnObject, uint wId) {
+void KWalletD::openAsynchronous(const TQString& wallet, const TQCString& returnObject, uint wId) {
DCOPClient *dc = callingDcopClient();
if (!dc) {
return;
}
- QCString appid = dc->senderId();
+ TQCString appid = dc->senderId();
if (!_enabled ||
- !QRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) {
+ !TQRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) {
DCOPRef(appid, returnObject).send("walletOpenResult", -1);
return;
}
- QCString peerName = friendlyDCOPPeerName();
+ TQCString peerName = friendlyDCOPPeerName();
KWalletTransaction *xact = new KWalletTransaction;
@@ -229,12 +229,12 @@ void KWalletD::openAsynchronous(const QString& wallet, const QCString& returnObj
DCOPRef(appid, returnObject).send("walletOpenResult", 0);
- QTimer::singleShot(0, this, SLOT(processTransactions()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processTransactions()));
checkActiveDialog();
}
-int KWalletD::openPath(const QString& path, uint wId) {
+int KWalletD::openPath(const TQString& path, uint wId) {
if (!_enabled) { // guard
return -1;
}
@@ -245,16 +245,16 @@ int KWalletD::openPath(const QString& path, uint wId) {
}
-int KWalletD::open(const QString& wallet, uint wId) {
+int KWalletD::open(const TQString& wallet, uint wId) {
if (!_enabled) { // guard
return -1;
}
- if (!QRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) {
+ if (!TQRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) {
return -1;
}
- QCString appid = friendlyDCOPPeerName();
+ TQCString appid = friendlyDCOPPeerName();
KWalletTransaction *xact = new KWalletTransaction;
_transactions.append(xact);
@@ -266,14 +266,14 @@ int KWalletD::open(const QString& wallet, uint wId) {
xact->wId = wId;
xact->tType = KWalletTransaction::Open;
xact->modal = true; // mark dialogs as modal, the app has blocking wait
- QTimer::singleShot(0, this, SLOT(processTransactions()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processTransactions()));
checkActiveDialog();
return 0; // process later
}
// Sets up a dialog that will be shown by kwallet.
-void KWalletD::setupDialog( QWidget* dialog, WId wId, const QCString& appid, bool modal ) {
+void KWalletD::setupDialog( TQWidget* dialog, WId wId, const TQCString& appid, bool modal ) {
if( wId != 0 )
KWin::setMainWindow( dialog, wId ); // correct, set dialog parent
else {
@@ -307,13 +307,13 @@ void KWalletD::checkActiveDialog() {
KWin::forceActiveWindow( activeDialog->winId());
}
-int KWalletD::doTransactionOpen(const QCString& appid, const QString& wallet, uint wId, bool modal) {
+int KWalletD::doTransactionOpen(const TQCString& appid, const TQString& wallet, uint wId, bool modal) {
if (_firstUse && !wallets().contains(KWallet::Wallet::LocalWallet())) {
// First use wizard
KWalletWizard *wiz = new KWalletWizard(0);
setupDialog( wiz, wId, appid, modal );
int rc = wiz->exec();
- if (rc == QDialog::Accepted) {
+ if (rc == TQDialog::Accepted) {
KConfig cfg("kwalletrc");
cfg.setGroup("Wallet");
cfg.writeEntry("First Use", false);
@@ -330,7 +330,7 @@ int KWalletD::doTransactionOpen(const QCString& appid, const QString& wallet, ui
// Create the wallet
KWallet::Backend *b = new KWallet::Backend(KWallet::Wallet::LocalWallet());
- QByteArray p;
+ TQByteArray p;
p.duplicate(wiz->_pass1->text().utf8(), wiz->_pass1->text().length());
b->open(p);
b->createFolder(KWallet::Wallet::PasswordFolder());
@@ -356,11 +356,11 @@ int KWalletD::doTransactionOpen(const QCString& appid, const QString& wallet, ui
}
-int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool isPath, WId w, bool modal) {
+int KWalletD::internalOpen(const TQCString& appid, const TQString& wallet, bool isPath, WId w, bool modal) {
int rc = -1;
bool brandNew = false;
- QCString thisApp;
+ TQCString thisApp;
if (appid.isEmpty()) {
thisApp = "KDE System";
} else {
@@ -371,7 +371,7 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
return -1;
}
- for (QIntDictIterator<KWallet::Backend> i(_wallets); i.current(); ++i) {
+ for (TQIntDictIterator<KWallet::Backend> i(_wallets); i.current(); ++i) {
if (i.current()->walletName() == wallet) {
rc = i.currentKey();
break;
@@ -387,8 +387,8 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
KWallet::Backend *b = new KWallet::Backend(wallet, isPath);
KPasswordDialog *kpd = 0L;
bool emptyPass = false;
- if ((isPath && QFile::exists(wallet)) || (!isPath && KWallet::Backend::exists(wallet))) {
- int pwless = b->open(QByteArray());
+ if ((isPath && TQFile::exists(wallet)) || (!isPath && KWallet::Backend::exists(wallet))) {
+ int pwless = b->open(TQByteArray());
if (0 != pwless || !b->isOpen()) {
if (pwless == 0) {
// release, start anew
@@ -397,9 +397,9 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
}
kpd = new KPasswordDialog(KPasswordDialog::Password, false, 0);
if (appid.isEmpty()) {
- kpd->setPrompt(i18n("<qt>KDE has requested to open the wallet '<b>%1</b>'. Please enter the password for this wallet below.").arg(QStyleSheet::escape(wallet)));
+ kpd->setPrompt(i18n("<qt>KDE has requested to open the wallet '<b>%1</b>'. Please enter the password for this wallet below.").arg(TQStyleSheet::escape(wallet)));
} else {
- kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the wallet '<b>%2</b>'. Please enter the password for this wallet below.").arg(QStyleSheet::escape(appid)).arg(QStyleSheet::escape(wallet)));
+ kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the wallet '<b>%2</b>'. Please enter the password for this wallet below.").arg(TQStyleSheet::escape(appid)).arg(TQStyleSheet::escape(wallet)));
}
brandNew = false;
kpd->setButtonOK(KGuiItem(i18n("&Open"),"fileopen"));
@@ -413,16 +413,16 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
if (appid.isEmpty()) {
kpd->setPrompt(i18n("KDE has requested to open the wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request."));
} else {
- kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the KDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.").arg(QStyleSheet::escape(appid)));
+ kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the KDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.").arg(TQStyleSheet::escape(appid)));
}
brandNew = true;
kpd->setButtonOK(KGuiItem(i18n("&Open"),"fileopen"));
} else {
kpd = new KPasswordDialog(KPasswordDialog::NewPassword, false, 0);
if (appid.length() == 0) {
- kpd->setPrompt(i18n("<qt>KDE has requested to create a new wallet named '<b>%1</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(QStyleSheet::escape(wallet)));
+ kpd->setPrompt(i18n("<qt>KDE has requested to create a new wallet named '<b>%1</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(TQStyleSheet::escape(wallet)));
} else {
- kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to create a new wallet named '<b>%2</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(QStyleSheet::escape(appid)).arg(QStyleSheet::escape(wallet)));
+ kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to create a new wallet named '<b>%2</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(TQStyleSheet::escape(appid)).arg(TQStyleSheet::escape(wallet)));
}
brandNew = true;
kpd->setButtonOK(KGuiItem(i18n("C&reate"),"filenew"));
@@ -439,9 +439,9 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
setupDialog( kpd, w, appid, modal );
if (kpd->exec() == KDialog::Accepted) {
p = kpd->password();
- int rc = b->open(QByteArray().duplicate(p, strlen(p)));
+ int rc = b->open(TQByteArray().duplicate(p, strlen(p)));
if (!b->isOpen()) {
- kpd->setPrompt(i18n("<qt>Error opening the wallet '<b>%1</b>'. Please try again.<br>(Error code %2: %3)").arg(QStyleSheet::escape(wallet)).arg(rc).arg(KWallet::Backend::openRCToString(rc)));
+ kpd->setPrompt(i18n("<qt>Error opening the wallet '<b>%1</b>'. Please try again.<br>(Error code %2: %3)").arg(TQStyleSheet::escape(wallet)).arg(rc).arg(KWallet::Backend::openRCToString(rc)));
kpd->clearPassword();
}
} else {
@@ -480,13 +480,13 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
if (_closeIdle && _timeouts) {
_timeouts->addTimer(rc, _idleTime);
}
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << wallet;
if (brandNew) {
- emitDCOPSignal("walletCreated(QString)", data);
+ emitDCOPSignal("walletCreated(TQString)", data);
}
- emitDCOPSignal("walletOpened(QString)", data);
+ emitDCOPSignal("walletOpened(TQString)", data);
if (_wallets.count() == 1 && _launchManager) {
KApplication::startServiceByDesktopName("kwalletmanager-kwalletd");
}
@@ -502,10 +502,10 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is
}
-bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId w) {
+bool KWalletD::isAuthorizedApp(const TQCString& appid, const TQString& wallet, WId w) {
int response = 0;
- QCString thisApp;
+ TQCString thisApp;
if (appid.isEmpty()) {
thisApp = "KDE System";
} else {
@@ -515,9 +515,9 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId
if (!implicitAllow(wallet, thisApp)) {
KBetterThanKDialogBase *dialog = new KBetterThanKDialogBase;
if (appid.isEmpty()) {
- dialog->setLabel(i18n("<qt>KDE has requested access to the open wallet '<b>%1</b>'.").arg(QStyleSheet::escape(wallet)));
+ dialog->setLabel(i18n("<qt>KDE has requested access to the open wallet '<b>%1</b>'.").arg(TQStyleSheet::escape(wallet)));
} else {
- dialog->setLabel(i18n("<qt>The application '<b>%1</b>' has requested access to the open wallet '<b>%2</b>'.").arg(QStyleSheet::escape(QString(appid))).arg(QStyleSheet::escape(wallet)));
+ dialog->setLabel(i18n("<qt>The application '<b>%1</b>' has requested access to the open wallet '<b>%2</b>'.").arg(TQStyleSheet::escape(TQString(appid))).arg(TQStyleSheet::escape(wallet)));
}
setupDialog( dialog, w, appid, false );
response = dialog->exec();
@@ -528,7 +528,7 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId
if (response == 1) {
KConfig cfg("kwalletrc");
cfg.setGroup("Auto Allow");
- QStringList apps = cfg.readListEntry(wallet);
+ TQStringList apps = cfg.readListEntry(wallet);
if (!apps.contains(thisApp)) {
apps += thisApp;
_implicitAllowMap[wallet] += thisApp;
@@ -539,7 +539,7 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId
} else if (response == 3) {
KConfig cfg("kwalletrc");
cfg.setGroup("Auto Deny");
- QStringList apps = cfg.readListEntry(wallet);
+ TQStringList apps = cfg.readListEntry(wallet);
if (!apps.contains(thisApp)) {
apps += thisApp;
_implicitDenyMap[wallet] += thisApp;
@@ -554,16 +554,16 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId
}
-int KWalletD::deleteWallet(const QString& wallet) {
- QString path = KGlobal::dirs()->saveLocation("kwallet") + QDir::separator() + wallet + ".kwl";
+int KWalletD::deleteWallet(const TQString& wallet) {
+ TQString path = KGlobal::dirs()->saveLocation("kwallet") + TQDir::separator() + wallet + ".kwl";
- if (QFile::exists(path)) {
+ if (TQFile::exists(path)) {
close(wallet, true);
- QFile::remove(path);
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQFile::remove(path);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << wallet;
- emitDCOPSignal("walletDeleted(QString)", data);
+ emitDCOPSignal("walletDeleted(TQString)", data);
return 0;
}
@@ -571,8 +571,8 @@ int KWalletD::deleteWallet(const QString& wallet) {
}
-void KWalletD::changePassword(const QString& wallet, uint wId) {
- QCString appid = friendlyDCOPPeerName();
+void KWalletD::changePassword(const TQString& wallet, uint wId) {
+ TQCString appid = friendlyDCOPPeerName();
KWalletTransaction *xact = new KWalletTransaction;
@@ -584,13 +584,13 @@ void KWalletD::changePassword(const QString& wallet, uint wId) {
_transactions.append(xact);
- QTimer::singleShot(0, this, SLOT(processTransactions()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processTransactions()));
checkActiveDialog();
}
-void KWalletD::doTransactionChangePassword(const QCString& appid, const QString& wallet, uint wId) {
- QIntDictIterator<KWallet::Backend> it(_wallets);
+void KWalletD::doTransactionChangePassword(const TQCString& appid, const TQString& wallet, uint wId) {
+ TQIntDictIterator<KWallet::Backend> it(_wallets);
KWallet::Backend *w = 0L;
int handle = -1;
bool reclose = false;
@@ -619,7 +619,7 @@ void KWalletD::doTransactionChangePassword(const QCString& appid, const QString&
KPasswordDialog *kpd;
kpd = new KPasswordDialog(KPasswordDialog::NewPassword, false, 0);
- kpd->setPrompt(i18n("<qt>Please choose a new password for the wallet '<b>%1</b>'.").arg(QStyleSheet::escape(wallet)));
+ kpd->setPrompt(i18n("<qt>Please choose a new password for the wallet '<b>%1</b>'.").arg(TQStyleSheet::escape(wallet)));
kpd->setCaption(i18n("KDE Wallet Service"));
kpd->setAllowEmptyPasswords(true);
setupDialog( kpd, wId, appid, false );
@@ -627,7 +627,7 @@ void KWalletD::doTransactionChangePassword(const QCString& appid, const QString&
const char *p = kpd->password();
if (p) {
_passwords[wallet] = p;
- QByteArray pa;
+ TQByteArray pa;
pa.duplicate(p, strlen(p));
int rc = w->close(pa);
if (rc < 0) {
@@ -651,11 +651,11 @@ void KWalletD::doTransactionChangePassword(const QCString& appid, const QString&
}
-int KWalletD::close(const QString& wallet, bool force) {
+int KWalletD::close(const TQString& wallet, bool force) {
int handle = -1;
KWallet::Backend *w = 0L;
- for (QIntDictIterator<KWallet::Backend> it(_wallets);
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets);
it.current();
++it) {
if (it.current()->walletName() == wallet) {
@@ -671,7 +671,7 @@ int KWalletD::close(const QString& wallet, bool force) {
int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) {
if (w) {
- const QString& wallet = w->walletName();
+ const TQString& wallet = w->walletName();
assert(_passwords.contains(wallet));
if (w->refCount() == 0 || force) {
invalidateHandle(handle);
@@ -680,7 +680,7 @@ int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) {
}
_wallets.remove(handle);
if (_passwords.contains(wallet)) {
- w->close(QByteArray().duplicate(_passwords[wallet].data(), _passwords[wallet].length()));
+ w->close(TQByteArray().duplicate(_passwords[wallet].data(), _passwords[wallet].length()));
_passwords[wallet].fill(0);
_passwords.remove(wallet);
}
@@ -696,7 +696,7 @@ int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) {
int KWalletD::close(int handle, bool force) {
- QCString appid = friendlyDCOPPeerName();
+ TQCString appid = friendlyDCOPPeerName();
KWallet::Backend *w = _wallets.find(handle);
bool contains = false;
@@ -722,7 +722,7 @@ int KWalletD::close(int handle, bool force) {
invalidateHandle(handle);
}
if (_passwords.contains(w->walletName())) {
- w->close(QByteArray().duplicate(_passwords[w->walletName()].data(), _passwords[w->walletName()].length()));
+ w->close(TQByteArray().duplicate(_passwords[w->walletName()].data(), _passwords[w->walletName()].length()));
_passwords[w->walletName()].fill(0);
_passwords.remove(w->walletName());
}
@@ -737,8 +737,8 @@ int KWalletD::close(int handle, bool force) {
}
-bool KWalletD::isOpen(const QString& wallet) const {
- for (QIntDictIterator<KWallet::Backend> it(_wallets);
+bool KWalletD::isOpen(const TQString& wallet) const {
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets);
it.current();
++it) {
if (it.current()->walletName() == wallet) {
@@ -758,7 +758,7 @@ bool KWalletD::isOpen(int handle) {
if (rc == 0 && ++_failed > 5) {
_failed = 0;
- QTimer::singleShot(0, this, SLOT(notifyFailures()));
+ TQTimer::singleShot(0, this, TQT_SLOT(notifyFailures()));
} else if (rc != 0) {
_failed = 0;
}
@@ -767,18 +767,18 @@ bool KWalletD::isOpen(int handle) {
}
-QStringList KWalletD::wallets() const {
- QString path = KGlobal::dirs()->saveLocation("kwallet");
- QDir dir(path, "*.kwl");
- QStringList rc;
+TQStringList KWalletD::wallets() const {
+ TQString path = KGlobal::dirs()->saveLocation("kwallet");
+ TQDir dir(path, "*.kwl");
+ TQStringList rc;
- dir.setFilter(QDir::Files | QDir::NoSymLinks);
+ dir.setFilter(TQDir::Files | TQDir::NoSymLinks);
const QFileInfoList *list = dir.entryInfoList();
QFileInfoListIterator it(*list);
- QFileInfo *fi;
+ TQFileInfo *fi;
while ((fi = it.current()) != 0L) {
- QString fn = fi->fileName();
+ TQString fn = fi->fileName();
if (fn.endsWith(".kwl")) {
fn.truncate(fn.length()-4);
}
@@ -793,8 +793,8 @@ void KWalletD::sync(int handle) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -802,18 +802,18 @@ void KWalletD::sync(int handle) {
}
-QStringList KWalletD::folderList(int handle) {
+TQStringList KWalletD::folderList(int handle) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
return b->folderList();
}
- return QStringList();
+ return TQStringList();
}
-bool KWalletD::hasFolder(int handle, const QString& f) {
+bool KWalletD::hasFolder(int handle, const TQString& f) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -824,21 +824,21 @@ bool KWalletD::hasFolder(int handle, const QString& f) {
}
-bool KWalletD::removeFolder(int handle, const QString& f) {
+bool KWalletD::removeFolder(int handle, const TQString& f) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
bool rc = b->removeFolder(f);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << b->walletName();
- emitDCOPSignal("folderListUpdated(QString)", data);
+ emitDCOPSignal("folderListUpdated(TQString)", data);
return rc;
}
@@ -846,21 +846,21 @@ bool KWalletD::removeFolder(int handle, const QString& f) {
}
-bool KWalletD::createFolder(int handle, const QString& f) {
+bool KWalletD::createFolder(int handle, const TQString& f) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
bool rc = b->createFolder(f);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << b->walletName();
- emitDCOPSignal("folderListUpdated(QString)", data);
+ emitDCOPSignal("folderListUpdated(TQString)", data);
return rc;
}
@@ -868,7 +868,7 @@ bool KWalletD::createFolder(int handle, const QString& f) {
}
-QByteArray KWalletD::readMap(int handle, const QString& folder, const QString& key) {
+TQByteArray KWalletD::readMap(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -879,18 +879,18 @@ QByteArray KWalletD::readMap(int handle, const QString& folder, const QString& k
}
}
- return QByteArray();
+ return TQByteArray();
}
-QMap<QString,QByteArray> KWalletD::readMapList(int handle, const QString& folder, const QString& key) {
+TQMap<TQString,TQByteArray> KWalletD::readMapList(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
b->setFolder(folder);
- QPtrList<KWallet::Entry> e = b->readEntryList(key);
- QMap<QString, QByteArray> rc;
- QPtrListIterator<KWallet::Entry> it(e);
+ TQPtrList<KWallet::Entry> e = b->readEntryList(key);
+ TQMap<TQString, TQByteArray> rc;
+ TQPtrListIterator<KWallet::Entry> it(e);
KWallet::Entry *entry;
while ((entry = it.current())) {
if (entry->type() == KWallet::Wallet::Map) {
@@ -901,11 +901,11 @@ QMap<QString,QByteArray> KWalletD::readMapList(int handle, const QString& folder
return rc;
}
- return QMap<QString, QByteArray>();
+ return TQMap<TQString, TQByteArray>();
}
-QByteArray KWalletD::readEntry(int handle, const QString& folder, const QString& key) {
+TQByteArray KWalletD::readEntry(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -916,18 +916,18 @@ QByteArray KWalletD::readEntry(int handle, const QString& folder, const QString&
}
}
- return QByteArray();
+ return TQByteArray();
}
-QMap<QString, QByteArray> KWalletD::readEntryList(int handle, const QString& folder, const QString& key) {
+TQMap<TQString, TQByteArray> KWalletD::readEntryList(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
b->setFolder(folder);
- QPtrList<KWallet::Entry> e = b->readEntryList(key);
- QMap<QString, QByteArray> rc;
- QPtrListIterator<KWallet::Entry> it(e);
+ TQPtrList<KWallet::Entry> e = b->readEntryList(key);
+ TQMap<TQString, TQByteArray> rc;
+ TQPtrListIterator<KWallet::Entry> it(e);
KWallet::Entry *entry;
while ((entry = it.current())) {
rc.insert(entry->key(), entry->value());
@@ -936,11 +936,11 @@ QMap<QString, QByteArray> KWalletD::readEntryList(int handle, const QString& fol
return rc;
}
- return QMap<QString, QByteArray>();
+ return TQMap<TQString, TQByteArray>();
}
-QStringList KWalletD::entryList(int handle, const QString& folder) {
+TQStringList KWalletD::entryList(int handle, const TQString& folder) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -948,11 +948,11 @@ QStringList KWalletD::entryList(int handle, const QString& folder) {
return b->entryList();
}
- return QStringList();
+ return TQStringList();
}
-QString KWalletD::readPassword(int handle, const QString& folder, const QString& key) {
+TQString KWalletD::readPassword(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -963,18 +963,18 @@ QString KWalletD::readPassword(int handle, const QString& folder, const QString&
}
}
- return QString::null;
+ return TQString::null;
}
-QMap<QString, QString> KWalletD::readPasswordList(int handle, const QString& folder, const QString& key) {
+TQMap<TQString, TQString> KWalletD::readPasswordList(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
b->setFolder(folder);
- QPtrList<KWallet::Entry> e = b->readEntryList(key);
- QMap<QString, QString> rc;
- QPtrListIterator<KWallet::Entry> it(e);
+ TQPtrList<KWallet::Entry> e = b->readEntryList(key);
+ TQMap<TQString, TQString> rc;
+ TQPtrListIterator<KWallet::Entry> it(e);
KWallet::Entry *entry;
while ((entry = it.current())) {
if (entry->type() == KWallet::Wallet::Password) {
@@ -985,11 +985,11 @@ QMap<QString, QString> KWalletD::readPasswordList(int handle, const QString& fol
return rc;
}
- return QMap<QString, QString>();
+ return TQMap<TQString, TQString>();
}
-int KWalletD::writeMap(int handle, const QString& folder, const QString& key, const QByteArray& value) {
+int KWalletD::writeMap(int handle, const TQString& folder, const TQString& key, const TQByteArray& value) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1000,8 +1000,8 @@ int KWalletD::writeMap(int handle, const QString& folder, const QString& key, co
e.setType(KWallet::Wallet::Map);
b->writeEntry(&e);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1013,7 +1013,7 @@ int KWalletD::writeMap(int handle, const QString& folder, const QString& key, co
}
-int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value, int entryType) {
+int KWalletD::writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value, int entryType) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1024,8 +1024,8 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key,
e.setType(KWallet::Wallet::EntryType(entryType));
b->writeEntry(&e);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1037,7 +1037,7 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key,
}
-int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value) {
+int KWalletD::writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1048,8 +1048,8 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key,
e.setType(KWallet::Wallet::Stream);
b->writeEntry(&e);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1061,7 +1061,7 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key,
}
-int KWalletD::writePassword(int handle, const QString& folder, const QString& key, const QString& value) {
+int KWalletD::writePassword(int handle, const TQString& folder, const TQString& key, const TQString& value) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1072,8 +1072,8 @@ int KWalletD::writePassword(int handle, const QString& folder, const QString& ke
e.setType(KWallet::Wallet::Password);
b->writeEntry(&e);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1085,7 +1085,7 @@ int KWalletD::writePassword(int handle, const QString& folder, const QString& ke
}
-int KWalletD::entryType(int handle, const QString& folder, const QString& key) {
+int KWalletD::entryType(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1102,7 +1102,7 @@ int KWalletD::entryType(int handle, const QString& folder, const QString& key) {
}
-bool KWalletD::hasEntry(int handle, const QString& folder, const QString& key) {
+bool KWalletD::hasEntry(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1117,7 +1117,7 @@ bool KWalletD::hasEntry(int handle, const QString& folder, const QString& key) {
}
-int KWalletD::removeEntry(int handle, const QString& folder, const QString& key) {
+int KWalletD::removeEntry(int handle, const TQString& folder, const TQString& key) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
@@ -1127,8 +1127,8 @@ int KWalletD::removeEntry(int handle, const QString& folder, const QString& key)
b->setFolder(folder);
bool rc = b->removeEntry(key);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1140,10 +1140,10 @@ int KWalletD::removeEntry(int handle, const QString& folder, const QString& key)
}
-void KWalletD::slotAppUnregistered(const QCString& app) {
+void KWalletD::slotAppUnregistered(const TQCString& app) {
if (_handles.contains(app)) {
- QValueList<int> l = _handles[app];
- for (QValueList<int>::Iterator i = l.begin(); i != l.end(); ++i) {
+ TQValueList<int> l = _handles[app];
+ for (TQValueList<int>::Iterator i = l.begin(); i != l.end(); ++i) {
_handles[app].remove(*i);
KWallet::Backend *w = _wallets.find(*i);
if (w && !_leaveOpen && 0 == w->deref()) {
@@ -1156,7 +1156,7 @@ void KWalletD::slotAppUnregistered(const QCString& app) {
void KWalletD::invalidateHandle(int handle) {
- for (QMap<QCString,QValueList<int> >::Iterator i = _handles.begin();
+ for (TQMap<TQCString,TQValueList<int> >::Iterator i = _handles.begin();
i != _handles.end();
++i) {
i.data().remove(handle);
@@ -1164,7 +1164,7 @@ void KWalletD::invalidateHandle(int handle) {
}
-KWallet::Backend *KWalletD::getWallet(const QCString& appid, int handle) {
+KWallet::Backend *KWalletD::getWallet(const TQCString& appid, int handle) {
if (handle == 0) {
return 0L;
}
@@ -1186,7 +1186,7 @@ KWallet::Backend *KWalletD::getWallet(const QCString& appid, int handle) {
if (++_failed > 5) {
_failed = 0;
- QTimer::singleShot(0, this, SLOT(notifyFailures()));
+ TQTimer::singleShot(0, this, TQT_SLOT(notifyFailures()));
}
return 0L;
@@ -1202,32 +1202,32 @@ void KWalletD::notifyFailures() {
}
-void KWalletD::doCloseSignals(int handle, const QString& wallet) {
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+void KWalletD::doCloseSignals(int handle, const TQString& wallet) {
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << handle;
emitDCOPSignal("walletClosed(int)", data);
- QByteArray data2;
- QDataStream ds2(data2, IO_WriteOnly);
+ TQByteArray data2;
+ TQDataStream ds2(data2, IO_WriteOnly);
ds2 << wallet;
- emitDCOPSignal("walletClosed(QString)", data2);
+ emitDCOPSignal("walletClosed(TQString)", data2);
if (_wallets.isEmpty()) {
- emitDCOPSignal("allWalletsClosed()", QByteArray());
+ emitDCOPSignal("allWalletsClosed()", TQByteArray());
}
}
-int KWalletD::renameEntry(int handle, const QString& folder, const QString& oldName, const QString& newName) {
+int KWalletD::renameEntry(int handle, const TQString& folder, const TQString& oldName, const TQString& newName) {
KWallet::Backend *b;
if ((b = getWallet(friendlyDCOPPeerName(), handle))) {
b->setFolder(folder);
int rc = b->renameEntry(oldName, newName);
// write changes to disk immediately
- QByteArray p;
- QString wallet = b->walletName();
+ TQByteArray p;
+ TQString wallet = b->walletName();
p.duplicate(_passwords[wallet].data(), _passwords[wallet].length());
b->sync(p);
p.fill(0);
@@ -1239,14 +1239,14 @@ int KWalletD::renameEntry(int handle, const QString& folder, const QString& oldN
}
-QStringList KWalletD::users(const QString& wallet) const {
- QStringList rc;
+TQStringList KWalletD::users(const TQString& wallet) const {
+ TQStringList rc;
- for (QIntDictIterator<KWallet::Backend> it(_wallets);
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets);
it.current();
++it) {
if (it.current()->walletName() == wallet) {
- for (QMap<QCString,QValueList<int> >::ConstIterator hit = _handles.begin(); hit != _handles.end(); ++hit) {
+ for (TQMap<TQCString,TQValueList<int> >::ConstIterator hit = _handles.begin(); hit != _handles.end(); ++hit) {
if (hit.data().contains(it.currentKey())) {
rc += hit.key();
}
@@ -1259,8 +1259,8 @@ QStringList KWalletD::users(const QString& wallet) const {
}
-bool KWalletD::disconnectApplication(const QString& wallet, const QCString& application) {
- for (QIntDictIterator<KWallet::Backend> it(_wallets);
+bool KWalletD::disconnectApplication(const TQString& wallet, const TQCString& application) {
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets);
it.current();
++it) {
if (it.current()->walletName() == wallet) {
@@ -1275,11 +1275,11 @@ bool KWalletD::disconnectApplication(const QString& wallet, const QCString& appl
close(it.current()->walletName(), true);
}
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << wallet;
ds << application;
- emitDCOPSignal("applicationDisconnected(QString,QCString)", data);
+ emitDCOPSignal("applicationDisconnected(TQString,TQCString)", data);
return true;
}
@@ -1290,17 +1290,17 @@ bool KWalletD::disconnectApplication(const QString& wallet, const QCString& appl
}
-void KWalletD::emitFolderUpdated(const QString& wallet, const QString& folder) {
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+void KWalletD::emitFolderUpdated(const TQString& wallet, const TQString& folder) {
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << wallet;
ds << folder;
- emitDCOPSignal("folderUpdated(QString,QString)", data);
+ emitDCOPSignal("folderUpdated(TQString,TQString)", data);
}
void KWalletD::emitWalletListDirty() {
- emitDCOPSignal("walletListDirty()", QByteArray());
+ emitDCOPSignal("walletListDirty()", TQByteArray());
}
@@ -1327,14 +1327,14 @@ void KWalletD::reconfigure() {
// Handle idle changes
if (_closeIdle) {
if (_idleTime != timeSave) { // Timer length changed
- QIntDictIterator<KWallet::Backend> it(_wallets);
+ TQIntDictIterator<KWallet::Backend> it(_wallets);
for (; it.current(); ++it) {
_timeouts->resetTimer(it.currentKey(), _idleTime);
}
}
if (!idleSave) { // add timers for all the wallets
- QIntDictIterator<KWallet::Backend> it(_wallets);
+ TQIntDictIterator<KWallet::Backend> it(_wallets);
for (; it.current(); ++it) {
_timeouts->addTimer(it.currentKey(), _idleTime);
}
@@ -1346,8 +1346,8 @@ void KWalletD::reconfigure() {
// Update the implicit allow stuff
_implicitAllowMap.clear();
cfg.setGroup("Auto Allow");
- QStringList entries = cfg.entryMap("Auto Allow").keys();
- for (QStringList::Iterator i = entries.begin(); i != entries.end(); ++i) {
+ TQStringList entries = cfg.entryMap("Auto Allow").keys();
+ for (TQStringList::Iterator i = entries.begin(); i != entries.end(); ++i) {
_implicitAllowMap[*i] = cfg.readListEntry(*i);
}
@@ -1355,14 +1355,14 @@ void KWalletD::reconfigure() {
_implicitDenyMap.clear();
cfg.setGroup("Auto Deny");
entries = cfg.entryMap("Auto Deny").keys();
- for (QStringList::Iterator i = entries.begin(); i != entries.end(); ++i) {
+ for (TQStringList::Iterator i = entries.begin(); i != entries.end(); ++i) {
_implicitDenyMap[*i] = cfg.readListEntry(*i);
}
// Update if wallet was enabled/disabled
if (!_enabled) { // close all wallets
while (!_wallets.isEmpty()) {
- QIntDictIterator<KWallet::Backend> it(_wallets);
+ TQIntDictIterator<KWallet::Backend> it(_wallets);
if (!it.current()) { // necessary?
break;
}
@@ -1377,60 +1377,60 @@ bool KWalletD::isEnabled() const {
}
-bool KWalletD::folderDoesNotExist(const QString& wallet, const QString& folder) {
+bool KWalletD::folderDoesNotExist(const TQString& wallet, const TQString& folder) {
if (!wallets().contains(wallet)) {
return true;
}
- for (QIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) {
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) {
if (it.current()->walletName() == wallet) {
return it.current()->folderDoesNotExist(folder);
}
}
KWallet::Backend *b = new KWallet::Backend(wallet);
- b->open(QByteArray());
+ b->open(TQByteArray());
bool rc = b->folderDoesNotExist(folder);
delete b;
return rc;
}
-bool KWalletD::keyDoesNotExist(const QString& wallet, const QString& folder, const QString& key) {
+bool KWalletD::keyDoesNotExist(const TQString& wallet, const TQString& folder, const TQString& key) {
if (!wallets().contains(wallet)) {
return true;
}
- for (QIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) {
+ for (TQIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) {
if (it.current()->walletName() == wallet) {
return it.current()->entryDoesNotExist(folder, key);
}
}
KWallet::Backend *b = new KWallet::Backend(wallet);
- b->open(QByteArray());
+ b->open(TQByteArray());
bool rc = b->entryDoesNotExist(folder, key);
delete b;
return rc;
}
-bool KWalletD::implicitAllow(const QString& wallet, const QCString& app) {
- return _implicitAllowMap[wallet].contains(QString::fromLocal8Bit(app));
+bool KWalletD::implicitAllow(const TQString& wallet, const TQCString& app) {
+ return _implicitAllowMap[wallet].contains(TQString::fromLocal8Bit(app));
}
-bool KWalletD::implicitDeny(const QString& wallet, const QCString& app) {
- return _implicitDenyMap[wallet].contains(QString::fromLocal8Bit(app));
+bool KWalletD::implicitDeny(const TQString& wallet, const TQCString& app) {
+ return _implicitDenyMap[wallet].contains(TQString::fromLocal8Bit(app));
}
-QCString KWalletD::friendlyDCOPPeerName() {
+TQCString KWalletD::friendlyDCOPPeerName() {
DCOPClient *dc = callingDcopClient();
if (!dc) {
return "";
}
- return dc->senderId().replace(QRegExp("-[0-9]+$"), "");
+ return dc->senderId().replace(TQRegExp("-[0-9]+$"), "");
}
@@ -1443,9 +1443,9 @@ void KWalletD::timedOut(int id) {
void KWalletD::closeAllWallets() {
- QIntDict<KWallet::Backend> tw = _wallets;
+ TQIntDict<KWallet::Backend> tw = _wallets;
- for (QIntDictIterator<KWallet::Backend> it(tw); it.current(); ++it) {
+ for (TQIntDictIterator<KWallet::Backend> it(tw); it.current(); ++it) {
closeWallet(it.current(), it.currentKey(), true);
}
@@ -1454,7 +1454,7 @@ void KWalletD::closeAllWallets() {
// All of this should be basically noop. Let's just be safe.
_wallets.clear();
- for (QMap<QString,QCString>::Iterator it = _passwords.begin();
+ for (TQMap<TQString,TQCString>::Iterator it = _passwords.begin();
it != _passwords.end();
++it) {
it.data().fill(0);
@@ -1463,12 +1463,12 @@ void KWalletD::closeAllWallets() {
}
-QString KWalletD::networkWallet() {
+TQString KWalletD::networkWallet() {
return KWallet::Wallet::NetworkWallet();
}
-QString KWalletD::localWallet() {
+TQString KWalletD::localWallet() {
return KWallet::Wallet::LocalWallet();
}
diff --git a/kio/misc/kwalletd/kwalletd.h b/kio/misc/kwalletd/kwalletd.h
index afa999f24..b426e7d5a 100644
--- a/kio/misc/kwalletd/kwalletd.h
+++ b/kio/misc/kwalletd/kwalletd.h
@@ -23,10 +23,10 @@
#define _KWALLETD_H_
#include <kded/kdedmodule.h>
-#include <qintdict.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqintdict.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
#include "kwalletbackend.h"
#include <time.h>
@@ -42,7 +42,7 @@ class KWalletD : public KDEDModule {
Q_OBJECT
K_DCOP
public:
- KWalletD(const QCString &name);
+ KWalletD(const TQCString &name);
virtual ~KWalletD();
k_dcop:
@@ -50,145 +50,145 @@ class KWalletD : public KDEDModule {
virtual bool isEnabled() const;
// Open and unlock the wallet
- virtual int open(const QString& wallet, uint wId);
+ virtual int open(const TQString& wallet, uint wId);
// Open and unlock the wallet with this path
- virtual int openPath(const QString& path, uint wId);
+ virtual int openPath(const TQString& path, uint wId);
// Asynchronous open - must give the object to return the handle
// to.
- virtual void openAsynchronous(const QString& wallet, const QCString& returnObject, uint wId);
+ virtual void openAsynchronous(const TQString& wallet, const TQCString& returnObject, uint wId);
// Close and lock the wallet
// If force = true, will close it for all users. Behave. This
// can break applications, and is generally intended for use by
// the wallet manager app only.
- virtual int close(const QString& wallet, bool force);
+ virtual int close(const TQString& wallet, bool force);
virtual int close(int handle, bool force);
// Save to disk but leave open
virtual ASYNC sync(int handle);
// Physically deletes the wallet from disk.
- virtual int deleteWallet(const QString& wallet);
+ virtual int deleteWallet(const TQString& wallet);
// Returns true if the wallet is open
- virtual bool isOpen(const QString& wallet) const;
+ virtual bool isOpen(const TQString& wallet) const;
virtual bool isOpen(int handle);
// List the users of this wallet
- virtual QStringList users(const QString& wallet) const;
+ virtual TQStringList users(const TQString& wallet) const;
// Change the password of this wallet
- virtual void changePassword(const QString& wallet, uint wId);
+ virtual void changePassword(const TQString& wallet, uint wId);
// A list of all wallets
- virtual QStringList wallets() const;
+ virtual TQStringList wallets() const;
// A list of all folders in this wallet
- virtual QStringList folderList(int handle);
+ virtual TQStringList folderList(int handle);
// Does this wallet have this folder?
- virtual bool hasFolder(int handle, const QString& folder);
+ virtual bool hasFolder(int handle, const TQString& folder);
// Create this folder
- virtual bool createFolder(int handle, const QString& folder);
+ virtual bool createFolder(int handle, const TQString& folder);
// Remove this folder
- virtual bool removeFolder(int handle, const QString& folder);
+ virtual bool removeFolder(int handle, const TQString& folder);
// List of entries in this folder
- virtual QStringList entryList(int handle, const QString& folder);
+ virtual TQStringList entryList(int handle, const TQString& folder);
// Read an entry. If the entry does not exist, it just
// returns an empty result. It is your responsibility to check
// hasEntry() first.
- virtual QByteArray readEntry(int handle, const QString& folder, const QString& key);
- virtual QByteArray readMap(int handle, const QString& folder, const QString& key);
- virtual QString readPassword(int handle, const QString& folder, const QString& key);
- virtual QMap<QString, QByteArray> readEntryList(int handle, const QString& folder, const QString& key);
- virtual QMap<QString, QByteArray> readMapList(int handle, const QString& folder, const QString& key);
- virtual QMap<QString, QString> readPasswordList(int handle, const QString& folder, const QString& key);
+ virtual TQByteArray readEntry(int handle, const TQString& folder, const TQString& key);
+ virtual TQByteArray readMap(int handle, const TQString& folder, const TQString& key);
+ virtual TQString readPassword(int handle, const TQString& folder, const TQString& key);
+ virtual TQMap<TQString, TQByteArray> readEntryList(int handle, const TQString& folder, const TQString& key);
+ virtual TQMap<TQString, TQByteArray> readMapList(int handle, const TQString& folder, const TQString& key);
+ virtual TQMap<TQString, TQString> readPasswordList(int handle, const TQString& folder, const TQString& key);
// Rename an entry. rc=0 on success.
- virtual int renameEntry(int handle, const QString& folder, const QString& oldName, const QString& newName);
+ virtual int renameEntry(int handle, const TQString& folder, const TQString& oldName, const TQString& newName);
// Write an entry. rc=0 on success.
- virtual int writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value, int entryType);
- virtual int writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value);
- virtual int writeMap(int handle, const QString& folder, const QString& key, const QByteArray& value);
- virtual int writePassword(int handle, const QString& folder, const QString& key, const QString& value);
+ virtual int writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value, int entryType);
+ virtual int writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value);
+ virtual int writeMap(int handle, const TQString& folder, const TQString& key, const TQByteArray& value);
+ virtual int writePassword(int handle, const TQString& folder, const TQString& key, const TQString& value);
// Does the entry exist?
- virtual bool hasEntry(int handle, const QString& folder, const QString& key);
+ virtual bool hasEntry(int handle, const TQString& folder, const TQString& key);
// What type is the entry?
- virtual int entryType(int handle, const QString& folder, const QString& key);
+ virtual int entryType(int handle, const TQString& folder, const TQString& key);
// Remove an entry. rc=0 on success.
- virtual int removeEntry(int handle, const QString& folder, const QString& key);
+ virtual int removeEntry(int handle, const TQString& folder, const TQString& key);
// Disconnect an app from a wallet
- virtual bool disconnectApplication(const QString& wallet, const QCString& application);
+ virtual bool disconnectApplication(const TQString& wallet, const TQCString& application);
virtual void reconfigure();
// Determine
- virtual bool folderDoesNotExist(const QString& wallet, const QString& folder);
- virtual bool keyDoesNotExist(const QString& wallet, const QString& folder, const QString& key);
+ virtual bool folderDoesNotExist(const TQString& wallet, const TQString& folder);
+ virtual bool keyDoesNotExist(const TQString& wallet, const TQString& folder, const TQString& key);
virtual void closeAllWallets();
- virtual QString networkWallet();
+ virtual TQString networkWallet();
- virtual QString localWallet();
+ virtual TQString localWallet();
private slots:
- void slotAppUnregistered(const QCString& app);
+ void slotAppUnregistered(const TQCString& app);
void emitWalletListDirty();
void timedOut(int);
void notifyFailures();
void processTransactions();
private:
- int internalOpen(const QCString& appid, const QString& wallet, bool isPath = false, WId w = 0, bool modal = false);
- bool isAuthorizedApp(const QCString& appid, const QString& wallet, WId w);
+ int internalOpen(const TQCString& appid, const TQString& wallet, bool isPath = false, WId w = 0, bool modal = false);
+ bool isAuthorizedApp(const TQCString& appid, const TQString& wallet, WId w);
// This also validates the handle. May return NULL.
- KWallet::Backend* getWallet(const QCString& appid, int handle);
+ KWallet::Backend* getWallet(const TQCString& appid, int handle);
// Generate a new unique handle.
int generateHandle();
- // Invalidate a handle (remove it from the QMap)
+ // Invalidate a handle (remove it from the TQMap)
void invalidateHandle(int handle);
// Emit signals about closing wallets
- void doCloseSignals(int,const QString&);
- void emitFolderUpdated(const QString&, const QString&);
+ void doCloseSignals(int,const TQString&);
+ void emitFolderUpdated(const TQString&, const TQString&);
// Internal - close this wallet.
int closeWallet(KWallet::Backend *w, int handle, bool force);
// Implicitly allow access for this application
- bool implicitAllow(const QString& wallet, const QCString& app);
- bool implicitDeny(const QString& wallet, const QCString& app);
- QCString friendlyDCOPPeerName();
+ bool implicitAllow(const TQString& wallet, const TQCString& app);
+ bool implicitDeny(const TQString& wallet, const TQCString& app);
+ TQCString friendlyDCOPPeerName();
- void doTransactionChangePassword(const QCString& appid, const QString& wallet, uint wId);
- int doTransactionOpen(const QCString& appid, const QString& wallet, uint wId, bool modal);
+ void doTransactionChangePassword(const TQCString& appid, const TQString& wallet, uint wId);
+ int doTransactionOpen(const TQCString& appid, const TQString& wallet, uint wId, bool modal);
- void setupDialog( QWidget* dialog, WId wId, const QCString& appid, bool modal );
+ void setupDialog( TQWidget* dialog, WId wId, const TQCString& appid, bool modal );
void checkActiveDialog();
- QIntDict<KWallet::Backend> _wallets;
- QMap<QCString,QValueList<int> > _handles;
- QMap<QString,QCString> _passwords;
+ TQIntDict<KWallet::Backend> _wallets;
+ TQMap<TQCString,TQValueList<int> > _handles;
+ TQMap<TQString,TQCString> _passwords;
KDirWatch *_dw;
int _failed;
bool _leaveOpen, _closeIdle, _launchManager, _enabled;
bool _openPrompt, _firstUse, _showingFailureNotify;
int _idleTime;
- QMap<QString,QStringList> _implicitAllowMap, _implicitDenyMap;
+ TQMap<TQString,TQStringList> _implicitAllowMap, _implicitDenyMap;
KTimeout *_timeouts;
- QPtrList<KWalletTransaction> _transactions;
- QGuardedPtr< QWidget > activeDialog;
+ TQPtrList<KWalletTransaction> _transactions;
+ TQGuardedPtr< TQWidget > activeDialog;
};
diff --git a/kio/misc/kwalletd/kwalletwizard.ui.h b/kio/misc/kwalletd/kwalletwizard.ui.h
index 95346355a..a42635e9b 100644
--- a/kio/misc/kwalletd/kwalletwizard.ui.h
+++ b/kio/misc/kwalletd/kwalletwizard.ui.h
@@ -28,7 +28,7 @@ void KWalletWizard::passwordPageUpdate()
_matchLabel->setText(i18n("Passwords do not match."));
}
} else {
- _matchLabel->setText(QString::null);
+ _matchLabel->setText(TQString::null);
}
}
diff --git a/kio/misc/uiserver.cpp b/kio/misc/uiserver.cpp
index 1948d57d4..b1d060f21 100644
--- a/kio/misc/uiserver.cpp
+++ b/kio/misc/uiserver.cpp
@@ -19,11 +19,11 @@
*/
// -*- mode: c++; c-basic-offset: 4 -*-
-#include <qtimer.h>
+#include <tqtimer.h>
-#include <qregexp.h>
-#include <qheader.h>
-#include <qevent.h>
+#include <tqregexp.h>
+#include <tqheader.h>
+#include <tqevent.h>
#include <ksqueezedtextlabel.h>
#include <kconfig.h>
@@ -44,11 +44,11 @@
#include <kpopupmenu.h>
#include <kaction.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qheader.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqheader.h>
#include "observer_stub.h"
#include "observer.h" // for static methods only
@@ -95,60 +95,60 @@ class UIServerSystemTray:public KSystemTray
:KSystemTray(uis)
{
KPopupMenu* pop= contextMenu();
- pop->insertItem(i18n("Settings..."), uis, SLOT(slotConfigure()));
- pop->insertItem(i18n("Remove"), uis, SLOT(slotRemoveSystemTrayIcon()));
+ pop->insertItem(i18n("Settings..."), uis, TQT_SLOT(slotConfigure()));
+ pop->insertItem(i18n("Remove"), uis, TQT_SLOT(slotRemoveSystemTrayIcon()));
setPixmap(loadIcon("filesave"));
//actionCollection()->action("file_quit")->setEnabled(true);
- KStdAction::quit(uis, SLOT(slotQuit()), actionCollection());
+ KStdAction::quit(uis, TQT_SLOT(slotQuit()), actionCollection());
}
};
class ProgressConfigDialog:public KDialogBase
{
public:
- ProgressConfigDialog(QWidget* parent);
+ ProgressConfigDialog(TQWidget* parent);
~ProgressConfigDialog() {}
void setChecked(int i, bool on);
bool isChecked(int i) const;
friend class UIServer;
private:
- QCheckBox *m_showSystemTrayCb;
- QCheckBox *m_keepOpenCb;
- QCheckBox *m_toolBarCb;
- QCheckBox *m_statusBarCb;
- QCheckBox *m_headerCb;
- QCheckBox *m_fixedWidthCb;
+ TQCheckBox *m_showSystemTrayCb;
+ TQCheckBox *m_keepOpenCb;
+ TQCheckBox *m_toolBarCb;
+ TQCheckBox *m_statusBarCb;
+ TQCheckBox *m_headerCb;
+ TQCheckBox *m_fixedWidthCb;
KListView *m_columns;
- QCheckListItem *(m_items[ListProgress::TB_MAX]);
+ TQCheckListItem *(m_items[ListProgress::TB_MAX]);
};
-ProgressConfigDialog::ProgressConfigDialog(QWidget *parent)
+ProgressConfigDialog::ProgressConfigDialog(TQWidget *parent)
:KDialogBase(KDialogBase::Plain,i18n("Configure Network Operation Window"),KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel,
KDialogBase::Ok, parent, "configprog", false)
{
- QVBoxLayout *layout=new QVBoxLayout(plainPage(),spacingHint());
- m_showSystemTrayCb=new QCheckBox(i18n("Show system tray icon"), plainPage());
- m_keepOpenCb=new QCheckBox(i18n("Keep network operation window always open"), plainPage());
- m_headerCb=new QCheckBox(i18n("Show column headers"), plainPage());
- m_toolBarCb=new QCheckBox(i18n("Show toolbar"), plainPage());
- m_statusBarCb=new QCheckBox(i18n("Show statusbar"), plainPage());
- m_fixedWidthCb=new QCheckBox(i18n("Column widths are user adjustable"), plainPage());
- QLabel *label=new QLabel(i18n("Show information:"), plainPage());
+ TQVBoxLayout *layout=new TQVBoxLayout(plainPage(),spacingHint());
+ m_showSystemTrayCb=new TQCheckBox(i18n("Show system tray icon"), plainPage());
+ m_keepOpenCb=new TQCheckBox(i18n("Keep network operation window always open"), plainPage());
+ m_headerCb=new TQCheckBox(i18n("Show column headers"), plainPage());
+ m_toolBarCb=new TQCheckBox(i18n("Show toolbar"), plainPage());
+ m_statusBarCb=new TQCheckBox(i18n("Show statusbar"), plainPage());
+ m_fixedWidthCb=new TQCheckBox(i18n("Column widths are user adjustable"), plainPage());
+ TQLabel *label=new TQLabel(i18n("Show information:"), plainPage());
m_columns=new KListView(plainPage());
m_columns->addColumn("info");
m_columns->setSorting(-1);
m_columns->header()->hide();
- m_items[ListProgress::TB_ADDRESS] =new QCheckListItem(m_columns, i18n("URL"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_REMAINING_TIME] =new QCheckListItem(m_columns, i18n("Remaining Time", "Rem. Time"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_SPEED] =new QCheckListItem(m_columns, i18n("Speed"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_TOTAL] =new QCheckListItem(m_columns, i18n("Size"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_PROGRESS] =new QCheckListItem(m_columns, i18n("%"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_COUNT] =new QCheckListItem(m_columns, i18n("Count"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_RESUME] =new QCheckListItem(m_columns, i18n("Resume", "Res."), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_LOCAL_FILENAME] =new QCheckListItem(m_columns, i18n("Local Filename"), QCheckListItem::CheckBox);
- m_items[ListProgress::TB_OPERATION] =new QCheckListItem(m_columns, i18n("Operation"), QCheckListItem::CheckBox);
+ m_items[ListProgress::TB_ADDRESS] =new TQCheckListItem(m_columns, i18n("URL"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_REMAINING_TIME] =new TQCheckListItem(m_columns, i18n("Remaining Time", "Rem. Time"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_SPEED] =new TQCheckListItem(m_columns, i18n("Speed"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_TOTAL] =new TQCheckListItem(m_columns, i18n("Size"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_PROGRESS] =new TQCheckListItem(m_columns, i18n("%"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_COUNT] =new TQCheckListItem(m_columns, i18n("Count"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_RESUME] =new TQCheckListItem(m_columns, i18n("Resume", "Res."), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_LOCAL_FILENAME] =new TQCheckListItem(m_columns, i18n("Local Filename"), TQCheckListItem::CheckBox);
+ m_items[ListProgress::TB_OPERATION] =new TQCheckListItem(m_columns, i18n("Operation"), TQCheckListItem::CheckBox);
layout->addWidget(m_showSystemTrayCb);
layout->addWidget(m_keepOpenCb);
@@ -174,9 +174,9 @@ bool ProgressConfigDialog::isChecked(int i) const
return m_items[i]->isOn();
}
-ProgressItem::ProgressItem( ListProgress* view, QListViewItem *after, QCString app_id, int job_id,
+ProgressItem::ProgressItem( ListProgress* view, TQListViewItem *after, TQCString app_id, int job_id,
bool showDefault )
- : QListViewItem( view, after ) {
+ : TQListViewItem( view, after ) {
listProgress = view;
@@ -194,8 +194,8 @@ ProgressItem::ProgressItem( ListProgress* view, QListViewItem *after, QCString a
// create dialog, but don't show it
defaultProgress = new KIO::DefaultProgress( false );
defaultProgress->setOnlyClean( true );
- connect ( defaultProgress, SIGNAL( stopped() ), this, SLOT( slotCanceled() ) );
- connect ( &m_showTimer, SIGNAL( timeout() ), this, SLOT(slotShowDefaultProgress()) );
+ connect ( defaultProgress, TQT_SIGNAL( stopped() ), this, TQT_SLOT( slotCanceled() ) );
+ connect ( &m_showTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT(slotShowDefaultProgress()) );
if ( showDefault ) {
m_showTimer.start( 500, true );
@@ -251,7 +251,7 @@ void ProgressItem::setProcessedSize( KIO::filesize_t size ) {
void ProgressItem::setProcessedFiles( unsigned long files ) {
m_iProcessedFiles = files;
- QString tmps = i18n("%1 / %2").arg( m_iProcessedFiles ).arg( m_iTotalFiles );
+ TQString tmps = i18n("%1 / %2").arg( m_iProcessedFiles ).arg( m_iTotalFiles );
setText( ListProgress::TB_COUNT, tmps );
defaultProgress->slotProcessedFiles( 0, m_iProcessedFiles );
@@ -264,16 +264,16 @@ void ProgressItem::setProcessedDirs( unsigned long dirs ) {
void ProgressItem::setPercent( unsigned long percent ) {
- const QString tmps = KIO::DefaultProgress::makePercentString( percent, m_iTotalSize, m_iTotalFiles );
+ const TQString tmps = KIO::DefaultProgress::makePercentString( percent, m_iTotalSize, m_iTotalFiles );
setText( ListProgress::TB_PROGRESS, tmps );
defaultProgress->slotPercent( 0, percent );
}
-void ProgressItem::setInfoMessage( const QString & msg ) {
- QString plainTextMsg(msg);
- plainTextMsg.replace( QRegExp( "</?b>" ), QString::null );
- plainTextMsg.replace( QRegExp( "<img.*>" ), QString::null );
+void ProgressItem::setInfoMessage( const TQString & msg ) {
+ TQString plainTextMsg(msg);
+ plainTextMsg.replace( TQRegExp( "</?b>" ), TQString::null );
+ plainTextMsg.replace( TQRegExp( "<img.*>" ), TQString::null );
setText( ListProgress::TB_PROGRESS, plainTextMsg );
defaultProgress->slotInfoMessage( 0, msg );
@@ -283,7 +283,7 @@ void ProgressItem::setSpeed( unsigned long bytes_per_second ) {
m_iSpeed = bytes_per_second;
m_remainingSeconds = KIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, m_iSpeed );
- QString tmps, tmps2;
+ TQString tmps, tmps2;
if ( m_iSpeed == 0 ) {
tmps = i18n( "Stalled");
tmps2 = tmps;
@@ -341,11 +341,11 @@ void ProgressItem::setTransferring( const KURL& url ) {
defaultProgress->slotTransferring( 0, url );
}
-void ProgressItem::setText(ListProgress::ListProgressFields field, const QString& text)
+void ProgressItem::setText(ListProgress::ListProgressFields field, const TQString& text)
{
if (listProgress->m_lpcc[field].enabled)
{
- QString t=text;
+ TQString t=text;
if ((field==ListProgress::TB_ADDRESS) && (listProgress->m_fixedColumnWidths))
// if (((field==ListProgress::TB_LOCAL_FILENAME) || (field==ListProgress::TB_ADDRESS)) && (listProgress->m_fixedColumnWidths))
{
@@ -354,7 +354,7 @@ void ProgressItem::setText(ListProgress::ListProgressFields field, const QString
listProgress->m_squeezer->setText(t);
t=listProgress->m_squeezer->text();
}
- QListViewItem::setText(listProgress->m_lpcc[field].index,t);
+ TQListViewItem::setText(listProgress->m_lpcc[field].index,t);
}
}
@@ -366,7 +366,7 @@ void ProgressItem::setStating( const KURL& url ) {
defaultProgress->slotStating( 0, url );
}
-void ProgressItem::setMounting( const QString& dev, const QString & point ) {
+void ProgressItem::setMounting( const TQString& dev, const TQString & point ) {
setText( ListProgress::TB_OPERATION, i18n("Mounting") );
setText( ListProgress::TB_ADDRESS, point ); // ?
setText( ListProgress::TB_LOCAL_FILENAME, dev ); // ?
@@ -374,7 +374,7 @@ void ProgressItem::setMounting( const QString& dev, const QString & point ) {
defaultProgress->slotMounting( 0, dev, point );
}
-void ProgressItem::setUnmounting( const QString & point ) {
+void ProgressItem::setUnmounting( const TQString & point ) {
setText( ListProgress::TB_OPERATION, i18n("Unmounting") );
setText( ListProgress::TB_ADDRESS, point ); // ?
setText( ListProgress::TB_LOCAL_FILENAME, "" ); // ?
@@ -384,7 +384,7 @@ void ProgressItem::setUnmounting( const QString & point ) {
void ProgressItem::setCanResume( KIO::filesize_t offset ) {
/*
- QString tmps;
+ TQString tmps;
// set canResume
if ( _resume ) {
tmps = i18n("Yes");
@@ -454,7 +454,7 @@ void ProgressItem::updateVisibility()
//-----------------------------------------------------------------------------
-ListProgress::ListProgress (QWidget *parent, const char *name)
+ListProgress::ListProgress (TQWidget *parent, const char *name)
: KListView (parent, name)
{
@@ -479,7 +479,7 @@ ListProgress::ListProgress (QWidget *parent, const char *name)
//used for squeezing the text in local file name and url
m_squeezer=new KSqueezedTextLabel(this);
m_squeezer->hide();
- connect(header(),SIGNAL(sizeChange(int,int,int)),this,SLOT(columnWidthChanged(int)));
+ connect(header(),TQT_SIGNAL(sizeChange(int,int,int)),this,TQT_SLOT(columnWidthChanged(int)));
}
@@ -532,11 +532,11 @@ void ListProgress::readSettings() {
// read listview geometry properties
config.setGroup( "ProgressList" );
for ( int i = 0; i < TB_MAX; i++ ) {
- QString tmps="Col"+QString::number(i);
+ TQString tmps="Col"+TQString::number(i);
m_lpcc[i].width=config.readNumEntry( tmps, 0);
if (m_lpcc[i].width==0) m_lpcc[i].width=defaultColumnWidth[i];
- tmps="Enabled"+QString::number(i);
+ tmps="Enabled"+TQString::number(i);
m_lpcc[i].enabled=config.readBoolEntry(tmps,true);
}
m_showHeader=config.readBoolEntry("ShowListHeader",true);
@@ -550,7 +550,7 @@ void ListProgress::columnWidthChanged(int column)
//resqueeze if necessary
if ((m_lpcc[TB_ADDRESS].enabled) && (column==m_lpcc[TB_ADDRESS].index))
{
- for (QListViewItem* lvi=firstChild(); lvi!=0; lvi=lvi->nextSibling())
+ for (TQListViewItem* lvi=firstChild(); lvi!=0; lvi=lvi->nextSibling())
{
ProgressItem *pi=(ProgressItem*)lvi;
pi->setText(TB_ADDRESS,pi->fullLengthAddress());
@@ -566,12 +566,12 @@ void ListProgress::writeSettings() {
config.setGroup( "ProgressList" );
for ( int i = 0; i < TB_MAX; i++ ) {
if (!m_lpcc[i].enabled) {
- QString tmps= "Enabled" + QString::number(i);
+ TQString tmps= "Enabled" + TQString::number(i);
config.writeEntry( tmps, false );
continue;
}
m_lpcc[i].width=columnWidth(m_lpcc[i].index);
- QString tmps="Col"+QString::number(i);
+ TQString tmps="Col"+TQString::number(i);
config.writeEntry( tmps, m_lpcc[i].width);
}
config.writeEntry("ShowListHeader", m_showHeader);
@@ -596,11 +596,11 @@ UIServer::UIServer()
// setup toolbar
toolBar()->insertButton("editdelete", TOOL_CANCEL,
- SIGNAL(clicked()), this,
- SLOT(slotCancelCurrent()), FALSE, i18n("Cancel"));
+ TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(slotCancelCurrent()), FALSE, i18n("Cancel"));
toolBar()->insertButton("configure", TOOL_CONFIGURE,
- SIGNAL(clicked()), this,
- SLOT(slotConfigure()), true, i18n("Settings..."));
+ TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(slotConfigure()), true, i18n("Settings..."));
toolBar()->setBarPos( KToolBar::Left );
@@ -615,18 +615,18 @@ UIServer::UIServer()
setCentralWidget( listProgress );
- connect( listProgress, SIGNAL( selectionChanged() ),
- SLOT( slotSelection() ) );
- connect( listProgress, SIGNAL( executed( QListViewItem* ) ),
- SLOT( slotToggleDefaultProgress( QListViewItem* ) ) );
- connect( listProgress, SIGNAL( contextMenu( KListView*, QListViewItem *, const QPoint &)),
- SLOT(slotShowContextMenu(KListView*, QListViewItem *, const QPoint&)));
+ connect( listProgress, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelection() ) );
+ connect( listProgress, TQT_SIGNAL( executed( TQListViewItem* ) ),
+ TQT_SLOT( slotToggleDefaultProgress( TQListViewItem* ) ) );
+ connect( listProgress, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem *, const TQPoint &)),
+ TQT_SLOT(slotShowContextMenu(KListView*, TQListViewItem *, const TQPoint&)));
// setup animation timer
- updateTimer = new QTimer( this );
- connect( updateTimer, SIGNAL( timeout() ),
- SLOT( slotUpdate() ) );
+ updateTimer = new TQTimer( this );
+ connect( updateTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotUpdate() ) );
m_bUpdateNewJob=false;
setCaption(i18n("Progress Dialog"));
@@ -671,20 +671,20 @@ void UIServer::applySettings()
toolBar()->show();
}
-void UIServer::slotShowContextMenu(KListView*, QListViewItem* item, const QPoint& pos)
+void UIServer::slotShowContextMenu(KListView*, TQListViewItem* item, const TQPoint& pos)
{
if (m_contextMenu==0)
{
- m_contextMenu=new QPopupMenu(this);
- m_idCancelItem = m_contextMenu->insertItem(i18n("Cancel Job"), this, SLOT(slotCancelCurrent()));
-// m_contextMenu->insertItem(i18n("Toggle Progress"), this, SLOT(slotToggleDefaultProgress()));
+ m_contextMenu=new TQPopupMenu(this);
+ m_idCancelItem = m_contextMenu->insertItem(i18n("Cancel Job"), this, TQT_SLOT(slotCancelCurrent()));
+// m_contextMenu->insertItem(i18n("Toggle Progress"), this, TQT_SLOT(slotToggleDefaultProgress()));
m_contextMenu->insertSeparator();
- m_contextMenu->insertItem(i18n("Settings..."), this, SLOT(slotConfigure()));
+ m_contextMenu->insertItem(i18n("Settings..."), this, TQT_SLOT(slotConfigure()));
}
if ( item )
item->setSelected( true );
bool enabled = false;
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
enabled = true;
@@ -708,9 +708,9 @@ void UIServer::slotConfigure()
if (m_configDialog==0)
{
m_configDialog=new ProgressConfigDialog(0);
-// connect(m_configDialog,SIGNAL(cancelClicked()), this, SLOT(slotCancelConfig()));
- connect(m_configDialog,SIGNAL(okClicked()), this, SLOT(slotApplyConfig()));
- connect(m_configDialog,SIGNAL(applyClicked()), this, SLOT(slotApplyConfig()));
+// connect(m_configDialog,TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotCancelConfig()));
+ connect(m_configDialog,TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotApplyConfig()));
+ connect(m_configDialog,TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotApplyConfig()));
}
m_configDialog->m_showSystemTrayCb->setChecked(m_showSystemTray);
m_configDialog->m_keepOpenCb->setChecked(m_keepListOpen);
@@ -743,12 +743,12 @@ void UIServer::slotApplyConfig()
listProgress->writeSettings();
}
-int UIServer::newJob( QCString observerAppId, bool showProgress )
+int UIServer::newJob( TQCString observerAppId, bool showProgress )
{
kdDebug(7024) << "UIServer::newJob observerAppId=" << observerAppId << ". "
<< "Giving id=" << s_jobId+1 << endl;
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
for ( ; it.current(); ++it ) {
if ( it.current()->itemBelow() == 0L ) { // this will find the end of list
break;
@@ -761,8 +761,8 @@ int UIServer::newJob( QCString observerAppId, bool showProgress )
bool show = !m_bShowList && showProgress;
ProgressItem *item = new ProgressItem( listProgress, it.current(), observerAppId, s_jobId, show );
- connect( item, SIGNAL( jobCanceled( ProgressItem* ) ),
- SLOT( slotJobCanceled( ProgressItem* ) ) );
+ connect( item, TQT_SIGNAL( jobCanceled( ProgressItem* ) ),
+ TQT_SLOT( slotJobCanceled( ProgressItem* ) ) );
if ( m_bShowList && !updateTimer->isActive() )
updateTimer->start( 1000 );
@@ -775,7 +775,7 @@ int UIServer::newJob( QCString observerAppId, bool showProgress )
ProgressItem* UIServer::findItem( int id )
{
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
ProgressItem *item;
@@ -913,7 +913,7 @@ void UIServer::speed( int id, unsigned long bytes_per_second )
}
}
-void UIServer::infoMessage( int id, const QString & msg )
+void UIServer::infoMessage( int id, const TQString & msg )
{
//kdDebug(7024) << "UIServer::infoMessage " << id << " " << msg << endl;
@@ -996,7 +996,7 @@ void UIServer::stating( int id, KURL url )
}
}
-void UIServer::mounting( int id, QString dev, QString point )
+void UIServer::mounting( int id, TQString dev, TQString point )
{
kdDebug(7024) << "UIServer::mounting " << id << " " << dev << " " << point << endl;
@@ -1006,7 +1006,7 @@ void UIServer::mounting( int id, QString dev, QString point )
}
}
-void UIServer::unmounting( int id, QString point )
+void UIServer::unmounting( int id, TQString point )
{
kdDebug(7024) << "UIServer::unmounting " << id << " " << point << endl;
@@ -1016,7 +1016,7 @@ void UIServer::unmounting( int id, QString point )
}
}
-void UIServer::killJob( QCString observerAppId, int progressId )
+void UIServer::killJob( TQCString observerAppId, int progressId )
{
// Contact the object "KIO::Observer" in the application <appId>
Observer_stub observer( observerAppId, "KIO::Observer" );
@@ -1044,7 +1044,7 @@ void UIServer::slotQuit()
void UIServer::slotUpdate() {
// don't do anything if we don't have any inserted progress item
// or if they're all hidden
- QListViewItemIterator lvit( listProgress );
+ TQListViewItemIterator lvit( listProgress );
bool visible = false;
for ( ; lvit.current(); ++lvit )
if ( ((ProgressItem*)lvit.current())->isVisible() ) {
@@ -1078,7 +1078,7 @@ void UIServer::slotUpdate() {
ProgressItem *item;
// count totals for statusbar
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
for ( ; it.current(); ++it ) {
item = (ProgressItem*) it.current();
@@ -1107,7 +1107,7 @@ void UIServer::slotUpdate() {
void UIServer::setListMode( bool list )
{
m_bShowList = list;
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
for ( ; it.current(); ++it ) {
// When going to list mode -> hide all progress dialogs
// When going back to separate dialogs -> show them all
@@ -1126,13 +1126,13 @@ void UIServer::setListMode( bool list )
}
}
-void UIServer::slotToggleDefaultProgress( QListViewItem *item ) {
+void UIServer::slotToggleDefaultProgress( TQListViewItem *item ) {
((ProgressItem*) item )->slotToggleDefaultProgress();
}
void UIServer::slotSelection() {
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
@@ -1145,7 +1145,7 @@ void UIServer::slotSelection() {
// This code is deprecated, slaves go to Observer::openPassDlg now,
// but this is kept for compat (DCOP calls to kio_uiserver).
-QByteArray UIServer::openPassDlg( const KIO::AuthInfo &info )
+TQByteArray UIServer::openPassDlg( const KIO::AuthInfo &info )
{
kdDebug(7024) << "UIServer::openPassDlg: User= " << info.username
<< ", Msg= " << info.prompt << endl;
@@ -1154,9 +1154,9 @@ QByteArray UIServer::openPassDlg( const KIO::AuthInfo &info )
&inf.keepPassword, inf.prompt,
inf.readOnly, inf.caption,
inf.comment, inf.commentLabel );
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
- if ( result == QDialog::Accepted )
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
+ if ( result == TQDialog::Accepted )
inf.setModified( true );
else
inf.setModified( false );
@@ -1164,28 +1164,28 @@ QByteArray UIServer::openPassDlg( const KIO::AuthInfo &info )
return data;
}
-int UIServer::messageBox( int progressId, int type, const QString &text, const QString &caption, const QString &buttonYes, const QString &buttonNo )
+int UIServer::messageBox( int progressId, int type, const TQString &text, const TQString &caption, const TQString &buttonYes, const TQString &buttonNo )
{
return Observer::messageBox( progressId, type, text, caption, buttonYes, buttonNo );
}
-void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta)
+void UIServer::showSSLInfoDialog(const TQString &url, const KIO::MetaData &meta)
{
return showSSLInfoDialog(url,meta,0);
}
-void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta, int mainwindow)
+void UIServer::showSSLInfoDialog(const TQString &url, const KIO::MetaData &meta, int mainwindow)
{
KSSLInfoDlg *kid = new KSSLInfoDlg(meta["ssl_in_use"].upper()=="TRUE", 0L /*parent?*/, 0L, true);
KSSLCertificate *x = KSSLCertificate::fromString(meta["ssl_peer_certificate"].local8Bit());
if (x) {
// Set the chain back onto the certificate
- QStringList cl =
- QStringList::split(QString("\n"), meta["ssl_peer_chain"]);
- QPtrList<KSSLCertificate> ncl;
+ TQStringList cl =
+ TQStringList::split(TQString("\n"), meta["ssl_peer_chain"]);
+ TQPtrList<KSSLCertificate> ncl;
ncl.setAutoDelete(true);
- for (QStringList::Iterator it = cl.begin(); it != cl.end(); ++it) {
+ for (TQStringList::Iterator it = cl.begin(); it != cl.end(); ++it) {
KSSLCertificate *y = KSSLCertificate::fromString((*it).local8Bit());
if (y) ncl.append(y);
}
@@ -1195,7 +1195,7 @@ void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta,
kdDebug(7024) << "ssl_cert_errors=" << meta["ssl_cert_errors"] << endl;
kid->setCertState(meta["ssl_cert_errors"]);
- QString ip = meta.contains("ssl_proxied") ? "" : meta["ssl_peer_ip"];
+ TQString ip = meta.contains("ssl_proxied") ? "" : meta["ssl_peer_ip"];
kid->setup( x,
ip,
url, // the URL
@@ -1220,12 +1220,12 @@ void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta,
// Don't delete kid!!
}
-KSSLCertDlgRet UIServer::showSSLCertDialog(const QString& host, const QStringList& certList)
+KSSLCertDlgRet UIServer::showSSLCertDialog(const TQString& host, const TQStringList& certList)
{
return showSSLCertDialog( host, certList, 0 );
}
-KSSLCertDlgRet UIServer::showSSLCertDialog(const QString& host, const QStringList& certList, int mainwindow)
+KSSLCertDlgRet UIServer::showSSLCertDialog(const TQString& host, const TQStringList& certList, int mainwindow)
{
KSSLCertDlgRet rc;
rc.ok = false;
@@ -1250,9 +1250,9 @@ KSSLCertDlgRet UIServer::showSSLCertDialog(const QString& host, const QStringLis
}
-QByteArray UIServer::open_RenameDlg( int id,
- const QString & caption,
- const QString& src, const QString & dest,
+TQByteArray UIServer::open_RenameDlg( int id,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
int mode,
unsigned long sizeSrc,
unsigned long sizeDest,
@@ -1265,9 +1265,9 @@ QByteArray UIServer::open_RenameDlg( int id,
ctimeSrc, ctimeDest, mtimeSrc, mtimeDest); }
-QByteArray UIServer::open_RenameDlg64( int id,
- const QString & caption,
- const QString& src, const QString & dest,
+TQByteArray UIServer::open_RenameDlg64( int id,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
int mode,
KIO::filesize_t sizeSrc,
KIO::filesize_t sizeDest,
@@ -1281,7 +1281,7 @@ QByteArray UIServer::open_RenameDlg64( int id,
ProgressItem *item = findItem( id );
if ( item )
setItemVisible( item, false );
- QString newDest;
+ TQString newDest;
kdDebug(7024) << "Calling KIO::open_RenameDlg" << endl;
KIO::RenameDlg_Result result = KIO::open_RenameDlg( caption, src, dest,
(KIO::RenameDlg_Mode) mode, newDest,
@@ -1289,8 +1289,8 @@ QByteArray UIServer::open_RenameDlg64( int id,
(time_t)ctimeSrc, (time_t)ctimeDest,
(time_t)mtimeSrc, (time_t)mtimeDest );
kdDebug(7024) << "KIO::open_RenameDlg done" << endl;
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << Q_UINT8(result) << newDest;
if ( item && result != KIO::R_CANCEL )
setItemVisible( item, true );
@@ -1299,7 +1299,7 @@ QByteArray UIServer::open_RenameDlg64( int id,
int UIServer::open_SkipDlg( int id,
int /*bool*/ multi,
- const QString & error_text )
+ const TQString & error_text )
{
// Hide existing dialog box if any
ProgressItem *item = findItem( id );
@@ -1339,7 +1339,7 @@ void UIServer::writeSettings() {
void UIServer::slotCancelCurrent() {
- QListViewItemIterator it( listProgress );
+ TQListViewItemIterator it( listProgress );
ProgressItem *item;
// kill selected jobs
@@ -1353,7 +1353,7 @@ void UIServer::slotCancelCurrent() {
}
}
-void UIServer::resizeEvent(QResizeEvent* e)
+void UIServer::resizeEvent(TQResizeEvent* e)
{
KMainWindow::resizeEvent(e);
writeSettings();
diff --git a/kio/misc/uiserver.h b/kio/misc/uiserver.h
index e676bb7a0..73040f186 100644
--- a/kio/misc/uiserver.h
+++ b/kio/misc/uiserver.h
@@ -19,9 +19,9 @@
#ifndef __kio_uiserver_h__
#define __kio_uiserver_h__
-#include <qintdict.h>
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqintdict.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
#include <dcopobject.h>
#include <kio/global.h>
@@ -45,7 +45,7 @@ namespace KIO {
struct ListProgressColumnConfig
{
- QString title;
+ TQString title;
int index;
int width;
bool enabled;
@@ -61,7 +61,7 @@ class KIO_EXPORT ListProgress : public KListView {
public:
- ListProgress (QWidget *parent = 0, const char *name = 0 );
+ ListProgress (TQWidget *parent = 0, const char *name = 0 );
virtual ~ListProgress();
@@ -103,16 +103,16 @@ protected:
* One item in the ListProgress
* @internal
*/
-class KIO_EXPORT ProgressItem : public QObject, public QListViewItem {
+class KIO_EXPORT ProgressItem : public TQObject, public TQListViewItem {
Q_OBJECT
public:
- ProgressItem( ListProgress* view, QListViewItem *after, QCString app_id, int job_id,
+ ProgressItem( ListProgress* view, TQListViewItem *after, TQCString app_id, int job_id,
bool showDefault = true );
~ProgressItem();
- QCString appId() { return m_sAppId; }
+ TQCString appId() { return m_sAppId; }
int jobId() { return m_iJobId; }
bool keepOpen() const;
@@ -132,7 +132,7 @@ public:
void setPercent( unsigned long percent );
void setSpeed( unsigned long bytes_per_second );
- void setInfoMessage( const QString & msg );
+ void setInfoMessage( const TQString & msg );
void setCopying( const KURL& from, const KURL& to );
void setMoving( const KURL& from, const KURL& to );
@@ -140,8 +140,8 @@ public:
void setTransferring( const KURL& url );
void setCreatingDir( const KURL& dir );
void setStating( const KURL& url );
- void setMounting( const QString & dev, const QString & point );
- void setUnmounting( const QString & point );
+ void setMounting( const TQString & dev, const TQString & point );
+ void setUnmounting( const TQString & point );
void setCanResume( KIO::filesize_t offset );
@@ -152,8 +152,8 @@ public:
unsigned long speed() { return m_iSpeed; }
unsigned int remainingSeconds() { return m_remainingSeconds; }
- const QString& fullLengthAddress() const {return m_fullLengthAddress;}
- void setText(ListProgress::ListProgressFields field, const QString& text);
+ const TQString& fullLengthAddress() const {return m_fullLengthAddress;}
+ void setText(ListProgress::ListProgressFields field, const TQString& text);
public slots:
void slotShowDefaultProgress();
void slotToggleDefaultProgress();
@@ -168,7 +168,7 @@ protected:
void updateVisibility();
// ids that uniquely identify this progress item
- QCString m_sAppId;
+ TQCString m_sAppId;
int m_iJobId;
// whether shown or not (it is hidden if a rename dialog pops up for the same job)
@@ -188,8 +188,8 @@ protected:
unsigned long m_iProcessedFiles;
unsigned long m_iSpeed;
int m_remainingSeconds;
- QTimer m_showTimer;
- QString m_fullLengthAddress;
+ TQTimer m_showTimer;
+ TQString m_fullLengthAddress;
};
class QResizeEvent;
@@ -236,7 +236,7 @@ k_dcop:
* other things, like SSL dialogs.
* @return the job id
*/
- int newJob( QCString appId, bool showProgress );
+ int newJob( TQCString appId, bool showProgress );
ASYNC jobFinished( int id );
@@ -252,7 +252,7 @@ k_dcop:
ASYNC percent( int id, unsigned long ipercent );
ASYNC speed( int id, unsigned long bytes_per_second );
- ASYNC infoMessage( int id, const QString & msg );
+ ASYNC infoMessage( int id, const TQString & msg );
ASYNC copying( int id, KURL from, KURL to );
ASYNC moving( int id, KURL from, KURL to );
@@ -261,8 +261,8 @@ k_dcop:
ASYNC creatingDir( int id, KURL dir );
ASYNC stating( int id, KURL url );
- ASYNC mounting( int id, QString dev, QString point );
- ASYNC unmounting( int id, QString point );
+ ASYNC mounting( int id, TQString dev, TQString point );
+ ASYNC unmounting( int id, TQString point );
ASYNC canResume( int id, unsigned long offset );
ASYNC canResume64( int id, KIO::filesize_t offset );
@@ -272,7 +272,7 @@ k_dcop:
* Use KIO::PasswordDialog::getNameAndPassword instead.
* To be removed in KDE 4.0.
*/
- QByteArray openPassDlg( const KIO::AuthInfo &info );
+ TQByteArray openPassDlg( const KIO::AuthInfo &info );
/**
* Popup a message box.
@@ -291,17 +291,17 @@ k_dcop:
* and for Information, none is used.
* @return a button code, as defined in KMessageBox, or 0 on communication error.
*/
- int messageBox( int id, int type, const QString &text, const QString &caption,
- const QString &buttonYes, const QString &buttonNo );
+ int messageBox( int id, int type, const TQString &text, const TQString &caption,
+ const TQString &buttonYes, const TQString &buttonNo );
/**
* @deprecated (it blocks other apps).
* Use KIO::open_RenameDlg instead.
* To be removed in KDE 4.0.
*/
- QByteArray open_RenameDlg64( int id,
- const QString & caption,
- const QString& src, const QString & dest,
+ TQByteArray open_RenameDlg64( int id,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
int /* KIO::RenameDlg_Mode */ mode,
KIO::filesize_t sizeSrc,
KIO::filesize_t sizeDest,
@@ -315,9 +315,9 @@ k_dcop:
* Use KIO::open_RenameDlg instead.
* To be removed in KDE 4.0.
*/
- QByteArray open_RenameDlg( int id,
- const QString & caption,
- const QString& src, const QString & dest,
+ TQByteArray open_RenameDlg( int id,
+ const TQString & caption,
+ const TQString& src, const TQString & dest,
int /* KIO::RenameDlg_Mode */ mode,
unsigned long sizeSrc,
unsigned long sizeDest,
@@ -334,7 +334,7 @@ k_dcop:
*/
int open_SkipDlg( int id,
int /*bool*/ multi,
- const QString & error_text );
+ const TQString & error_text );
/**
* Switch to or from list mode - called by the kcontrol module
@@ -350,22 +350,22 @@ k_dcop:
/**
* Show a SSL Information Dialog
*/
- void showSSLInfoDialog(const QString &url, const KIO::MetaData &data, int mainwindow);
+ void showSSLInfoDialog(const TQString &url, const KIO::MetaData &data, int mainwindow);
/**
* @deprecated
*/
- void showSSLInfoDialog(const QString &url, const KIO::MetaData &data);
+ void showSSLInfoDialog(const TQString &url, const KIO::MetaData &data);
/*
* Show an SSL Certificate Selection Dialog
*/
- KSSLCertDlgRet showSSLCertDialog(const QString& host, const QStringList& certList, int mainwindow);
+ KSSLCertDlgRet showSSLCertDialog(const TQString& host, const TQStringList& certList, int mainwindow);
/*
* @deprecated
*/
- KSSLCertDlgRet showSSLCertDialog(const QString& host, const QStringList& certList);
+ KSSLCertDlgRet showSSLCertDialog(const TQString& host, const TQStringList& certList);
public slots:
void slotConfigure();
@@ -377,34 +377,34 @@ protected slots:
void slotCancelCurrent();
- void slotToggleDefaultProgress( QListViewItem * );
+ void slotToggleDefaultProgress( TQListViewItem * );
void slotSelection();
void slotJobCanceled( ProgressItem * );
void slotApplyConfig();
- void slotShowContextMenu(KListView*, QListViewItem *item, const QPoint& pos);
+ void slotShowContextMenu(KListView*, TQListViewItem *item, const TQPoint& pos);
protected:
ProgressItem* findItem( int id );
- virtual void resizeEvent(QResizeEvent* e);
+ virtual void resizeEvent(TQResizeEvent* e);
virtual bool queryClose();
void setItemVisible( ProgressItem * item, bool visible );
- QTimer* updateTimer;
+ TQTimer* updateTimer;
ListProgress* listProgress;
KToolBar::BarPosition toolbarPos;
- QString properties;
+ TQString properties;
void applySettings();
void readSettings();
void writeSettings();
private:
- void killJob( QCString observerAppId, int progressId );
+ void killJob( TQCString observerAppId, int progressId );
int m_initWidth;
int m_initHeight;
@@ -419,7 +419,7 @@ private:
// true if there's a new job that hasn't been shown yet.
bool m_bUpdateNewJob;
ProgressConfigDialog *m_configDialog;
- QPopupMenu* m_contextMenu;
+ TQPopupMenu* m_contextMenu;
UIServerSystemTray *m_systemTray;
static int s_jobId;
diff --git a/kio/tests/dataprotocoltest.cpp b/kio/tests/dataprotocoltest.cpp
index fa867291c..0c8470a61 100644
--- a/kio/tests/dataprotocoltest.cpp
+++ b/kio/tests/dataprotocoltest.cpp
@@ -18,8 +18,8 @@
#include <kio/global.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include <iostream.h>
@@ -35,7 +35,7 @@ public:
virtual void get(const KURL &) = 0;
virtual void mimetype(const KURL &) = 0;
- void mimeType(const QString &type) {
+ void mimeType(const TQString &type) {
testStrings("MIME Type: ",mime_type_expected,type);
}
@@ -43,10 +43,10 @@ public:
// cout << "content size: " << bytes << " bytes" << endl;
}
- void setMetaData(const QString &key, const QString &value) {
+ void setMetaData(const TQString &key, const TQString &value) {
// meta_data[key] = value;
// cout << "§ " << key << " = " << value << endl;
- QString prefix = "Metadata[\""+key+"\"]: ";
+ TQString prefix = "Metadata[\""+key+"\"]: ";
KIO::MetaData::Iterator it = attributes_expected.find(key);
if (it != attributes_expected.end()) {
testStrings(prefix,it.data(),value);
@@ -69,7 +69,7 @@ public:
}
}
- void data(const QByteArray &a) {
+ void data(const TQByteArray &a) {
if (a.isEmpty())
/* cout << "<no more data>" << endl*/;
else {
@@ -88,14 +88,14 @@ public:
private:
int testcaseno; // number of testcase
bool failure; // true if any testcase failed
- QMap<int,bool> failed_testcases;
+ TQMap<int,bool> failed_testcases;
// -- testcase related members
- QString mime_type_expected; // expected mime type
+ TQString mime_type_expected; // expected mime type
/** contains all attributes and values the testcase has to set */
KIO::MetaData attributes_expected;
/** contains the content as it is expected to be returned */
- QByteArray content_expected;
+ TQByteArray content_expected;
int passed; // # of passed tests
int total; // # of total tests
@@ -106,8 +106,8 @@ private:
* @param s string to compare to template
* @param casesensitive true if case sensitive compare (currently not used)
*/
- void testStrings(const QString &prefix, const QString &templat,
- const QString &s, bool /*casesensitive*/ = true) {
+ void testStrings(const TQString &prefix, const TQString &templat,
+ const TQString &s, bool /*casesensitive*/ = true) {
if (templat == s)
passed++;
else {
@@ -143,7 +143,7 @@ public:
/**
* sets the mime type that this testcase is expected to return
*/
- void setExpectedMimeType(const QString &mime_type) {
+ void setExpectedMimeType(const TQString &mime_type) {
mime_type_expected = mime_type;
}
@@ -157,7 +157,7 @@ public:
/**
* sets content as expected to be delivered by the testcase.
*/
- void setExpectedContent(const QByteArray &content) {
+ void setExpectedContent(const TQByteArray &content) {
content_expected = content;
}
@@ -177,7 +177,7 @@ public:
void endTestrun() {
if (failure) {
- QMap<int,bool>::ConstIterator it = failed_testcases.begin();
+ TQMap<int,bool>::ConstIterator it = failed_testcases.begin();
for (; it != failed_testcases.end(); ++it) {
cout << "Testcase " << it.key() << " failed" << endl;
}
@@ -246,7 +246,7 @@ const char * const url;
// == charset tests
// -------------------- string
const QChar
-const QChar * const charset_urls[] = {
+const TQChar * const charset_urls[] = {
#endif
int main(int /*argc*/,char* /*argv*/[]) {
@@ -270,7 +270,7 @@ int main(int /*argc*/,char* /*argv*/[]) {
if (!has_charset) exp_attrs["charset"] = "us-ascii";
kio_data.setExpectedAttributes(exp_attrs);
- QByteArray exp_content;
+ TQByteArray exp_content;
uint exp_content_len = strlen(testcases[i].exp_content);
exp_content.setRawData(testcases[i].exp_content,exp_content_len);
kio_data.setExpectedContent(exp_content);
diff --git a/kio/tests/dummymeta.cpp b/kio/tests/dummymeta.cpp
index be8bca2ad..f0d1584c9 100644
--- a/kio/tests/dummymeta.cpp
+++ b/kio/tests/dummymeta.cpp
@@ -4,8 +4,8 @@
K_EXPORT_COMPONENT_FACTORY( dummymeta, KGenericFactory<DummyMeta> )
-DummyMeta::DummyMeta( QObject *parent, const char *name,
- const QStringList &preferredItems )
+DummyMeta::DummyMeta( TQObject *parent, const char *name,
+ const TQStringList &preferredItems )
: KFilePlugin( parent, name, preferredItems )
{
qDebug("---- DummyMeta::DummyMeta: got %i preferred items.", preferredItems.count());
diff --git a/kio/tests/dummymeta.h b/kio/tests/dummymeta.h
index 5eb51402c..053c48ecb 100644
--- a/kio/tests/dummymeta.h
+++ b/kio/tests/dummymeta.h
@@ -10,7 +10,7 @@ class DummyMeta : public KFilePlugin
Q_OBJECT
public:
- DummyMeta( QObject *parent, const char *name, const QStringList &args );
+ DummyMeta( TQObject *parent, const char *name, const TQStringList &args );
~DummyMeta() {}
virtual bool readInfo( KFileMetaInfo::Internal& info );
diff --git a/kio/tests/getalltest.cpp b/kio/tests/getalltest.cpp
index eab0931fe..58c8d5a3f 100644
--- a/kio/tests/getalltest.cpp
+++ b/kio/tests/getalltest.cpp
@@ -13,7 +13,7 @@ int main(int argc, char *argv[])
kdDebug() << "All services" << endl;
KService::List services = KService::allServices();
kdDebug() << "got " << services.count() << " services" << endl;
- QValueListIterator<KService::Ptr> s = services.begin();
+ TQValueListIterator<KService::Ptr> s = services.begin();
for ( ; s != services.end() ; ++s )
{
kdDebug() << (*s)->name() << " " << (*s)->desktopEntryPath() << endl;
@@ -23,7 +23,7 @@ int main(int argc, char *argv[])
kdDebug() << "All mimeTypes" << endl;
KMimeType::List mimeTypes = KMimeType::allMimeTypes();
kdDebug() << "got " << mimeTypes.count() << " mimeTypes" << endl;
- QValueListIterator<KMimeType::Ptr> m = mimeTypes.begin();
+ TQValueListIterator<KMimeType::Ptr> m = mimeTypes.begin();
for ( ; m != mimeTypes.end() ; ++m )
{
kdDebug() << (*m)->name() << endl;
@@ -32,7 +32,7 @@ int main(int argc, char *argv[])
kdDebug() << "All service types" << endl;
KServiceType::List list = KServiceType::allServiceTypes();
kdDebug() << "got " << list.count() << " service types" << endl;
- QValueListIterator<KServiceType::Ptr> st = list.begin();
+ TQValueListIterator<KServiceType::Ptr> st = list.begin();
for ( ; st != list.end() ; ++st )
{
kdDebug() << (*st)->name() << endl;
diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp
index 0f6b426a5..9fe4b4c49 100644
--- a/kio/tests/jobtest.cpp
+++ b/kio/tests/jobtest.cpp
@@ -29,10 +29,10 @@
#include <kcmdlineargs.h>
#include <kprotocolinfo.h>
-#include <qfileinfo.h>
-#include <qeventloop.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
+#include <tqeventloop.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include <stdio.h>
#include <stdlib.h>
@@ -46,12 +46,12 @@
// The code comes partly from kdebase/kioslave/trash/testtrash.cpp
-static bool check(const QString& txt, QString a, QString b)
+static bool check(const TQString& txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -76,12 +76,12 @@ int main(int argc, char *argv[])
return 0; // success. The exit(1) in check() is what happens in case of failure.
}
-QString JobTest::homeTmpDir() const
+TQString JobTest::homeTmpDir() const
{
- return QDir::homeDirPath() + "/.kde/jobtest/";
+ return TQDir::homeDirPath() + "/.kde/jobtest/";
}
-QString JobTest::otherTmpDir() const
+TQString JobTest::otherTmpDir() const
{
// This one needs to be on another partition
return "/tmp/jobtest/";
@@ -92,16 +92,16 @@ KURL JobTest::systemTmpDir() const
return "system:/home/.kde/jobtest-system/";
}
-QString JobTest::realSystemPath() const
+TQString JobTest::realSystemPath() const
{
- return QDir::homeDirPath() + "/.kde/jobtest-system/";
+ return TQDir::homeDirPath() + "/.kde/jobtest-system/";
}
void JobTest::setup()
{
// Start with a clean base dir
cleanup();
- QDir dir; // TT: why not a static method?
+ TQDir dir; // TT: why not a static method?
bool ok = dir.mkdir( homeTmpDir() );
if ( !ok )
kdFatal() << "Couldn't create " << homeTmpDir() << endl;
@@ -140,7 +140,7 @@ void JobTest::cleanup()
KIO::NetAccess::del( systemTmpDir(), 0 );
}
-static void setTimeStamp( const QString& path )
+static void setTimeStamp( const TQString& path )
{
#ifdef Q_OS_UNIX
// Put timestamp in the past so that we can check that the
@@ -150,14 +150,14 @@ static void setTimeStamp( const QString& path )
struct utimbuf utbuf;
utbuf.actime = tp.tv_sec - 30; // 30 seconds ago
utbuf.modtime = tp.tv_sec - 60; // 60 second ago
- utime( QFile::encodeName( path ), &utbuf );
+ utime( TQFile::encodeName( path ), &utbuf );
qDebug( "Time changed for %s", path.latin1() );
#endif
}
-static void createTestFile( const QString& path )
+static void createTestFile( const TQString& path )
{
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_WriteOnly ) )
kdFatal() << "Can't create " << path << endl;
f.writeBlock( "Hello world", 11 );
@@ -165,20 +165,20 @@ static void createTestFile( const QString& path )
setTimeStamp( path );
}
-static void createTestSymlink( const QString& path )
+static void createTestSymlink( const TQString& path )
{
// Create symlink if it doesn't exist yet
KDE_struct_stat buf;
- if ( KDE_lstat( QFile::encodeName( path ), &buf ) != 0 ) {
- bool ok = symlink( "/IDontExist", QFile::encodeName( path ) ) == 0; // broken symlink
+ if ( KDE_lstat( TQFile::encodeName( path ), &buf ) != 0 ) {
+ bool ok = symlink( "/IDontExist", TQFile::encodeName( path ) ) == 0; // broken symlink
if ( !ok )
kdFatal() << "couldn't create symlink: " << strerror( errno ) << endl;
}
}
-static void createTestDirectory( const QString& path )
+static void createTestDirectory( const TQString& path )
{
- QDir dir;
+ TQDir dir;
bool ok = dir.mkdir( path );
if ( !ok && !dir.exists() )
kdFatal() << "couldn't create " << path << endl;
@@ -190,17 +190,17 @@ static void createTestDirectory( const QString& path )
void JobTest::get()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "fileFromHome";
+ const TQString filePath = homeTmpDir() + "fileFromHome";
createTestFile( filePath );
KURL u; u.setPath( filePath );
m_result = -1;
KIO::StoredTransferJob* job = KIO::storedGet( u );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotGetResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotGetResult( KIO::Job* ) ) );
kapp->eventLoop()->enterLoop();
assert( m_result == 0 ); // no error
assert( m_data.size() == 11 );
- assert( QCString( m_data ) == "Hello world" );
+ assert( TQCString( m_data ) == "Hello world" );
}
void JobTest::slotGetResult( KIO::Job* job )
@@ -212,7 +212,7 @@ void JobTest::slotGetResult( KIO::Job* job )
////
-void JobTest::copyLocalFile( const QString& src, const QString& dest )
+void JobTest::copyLocalFile( const TQString& src, const TQString& dest )
{
KURL u;
u.setPath( src );
@@ -222,45 +222,45 @@ void JobTest::copyLocalFile( const QString& src, const QString& dest )
// copy the file with file_copy
bool ok = KIO::NetAccess::file_copy( u, d );
assert( ok );
- assert( QFile::exists( dest ) );
- assert( QFile::exists( src ) ); // still there
+ assert( TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) ); // still there
{
// check that the timestamp is the same (#24443)
// Note: this only works because of copy() in kio_file.
// The datapump solution ignores mtime, the app has to call FileCopyJob::setModificationTime()
- QFileInfo srcInfo( src );
- QFileInfo destInfo( dest );
+ TQFileInfo srcInfo( src );
+ TQFileInfo destInfo( dest );
assert( srcInfo.lastModified() == destInfo.lastModified() );
}
// cleanup and retry with KIO::copy()
- QFile::remove( dest );
+ TQFile::remove( dest );
ok = KIO::NetAccess::dircopy( u, d, 0 );
assert( ok );
- assert( QFile::exists( dest ) );
- assert( QFile::exists( src ) ); // still there
+ assert( TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) ); // still there
{
// check that the timestamp is the same (#24443)
- QFileInfo srcInfo( src );
- QFileInfo destInfo( dest );
+ TQFileInfo srcInfo( src );
+ TQFileInfo destInfo( dest );
assert( srcInfo.lastModified() == destInfo.lastModified() );
}
}
-void JobTest::copyLocalDirectory( const QString& src, const QString& _dest, int flags )
+void JobTest::copyLocalDirectory( const TQString& src, const TQString& _dest, int flags )
{
- assert( QFileInfo( src ).isDir() );
- assert( QFileInfo( src + "/testfile" ).isFile() );
+ assert( TQFileInfo( src ).isDir() );
+ assert( TQFileInfo( src + "/testfile" ).isFile() );
KURL u;
u.setPath( src );
- QString dest( _dest );
+ TQString dest( _dest );
KURL d;
d.setPath( dest );
if ( flags & AlreadyExists )
- assert( QFile::exists( dest ) );
+ assert( TQFile::exists( dest ) );
else
- assert( !QFile::exists( dest ) );
+ assert( !TQFile::exists( dest ) );
bool ok = KIO::NetAccess::dircopy( u, d, 0 );
assert( ok );
@@ -270,14 +270,14 @@ void JobTest::copyLocalDirectory( const QString& src, const QString& _dest, int
//kdDebug() << "Expecting dest=" << dest << endl;
}
- assert( QFile::exists( dest ) );
- assert( QFileInfo( dest ).isDir() );
- assert( QFileInfo( dest + "/testfile" ).isFile() );
- assert( QFile::exists( src ) ); // still there
+ assert( TQFile::exists( dest ) );
+ assert( TQFileInfo( dest ).isDir() );
+ assert( TQFileInfo( dest + "/testfile" ).isFile() );
+ assert( TQFile::exists( src ) ); // still there
{
// check that the timestamp is the same (#24443)
- QFileInfo srcInfo( src );
- QFileInfo destInfo( dest );
+ TQFileInfo srcInfo( src );
+ TQFileInfo destInfo( dest );
assert( srcInfo.lastModified() == destInfo.lastModified() );
}
}
@@ -285,8 +285,8 @@ void JobTest::copyLocalDirectory( const QString& src, const QString& _dest, int
void JobTest::copyFileToSamePartition()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "fileFromHome";
- const QString dest = homeTmpDir() + "fileFromHome_copied";
+ const TQString filePath = homeTmpDir() + "fileFromHome";
+ const TQString dest = homeTmpDir() + "fileFromHome_copied";
createTestFile( filePath );
copyLocalFile( filePath, dest );
}
@@ -294,8 +294,8 @@ void JobTest::copyFileToSamePartition()
void JobTest::copyDirectoryToSamePartition()
{
kdDebug() << k_funcinfo << endl;
- const QString src = homeTmpDir() + "dirFromHome";
- const QString dest = homeTmpDir() + "dirFromHome_copied";
+ const TQString src = homeTmpDir() + "dirFromHome";
+ const TQString dest = homeTmpDir() + "dirFromHome_copied";
createTestDirectory( src );
copyLocalDirectory( src, dest );
}
@@ -305,8 +305,8 @@ void JobTest::copyDirectoryToExistingDirectory()
kdDebug() << k_funcinfo << endl;
// just the same as copyDirectoryToSamePartition, but it means that
// this time dest exists.
- const QString src = homeTmpDir() + "dirFromHome";
- const QString dest = homeTmpDir() + "dirFromHome_copied";
+ const TQString src = homeTmpDir() + "dirFromHome";
+ const TQString dest = homeTmpDir() + "dirFromHome_copied";
createTestDirectory( src );
copyLocalDirectory( src, dest, AlreadyExists );
}
@@ -314,8 +314,8 @@ void JobTest::copyDirectoryToExistingDirectory()
void JobTest::copyFileToOtherPartition()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "fileFromHome";
- const QString dest = otherTmpDir() + "fileFromHome_copied";
+ const TQString filePath = homeTmpDir() + "fileFromHome";
+ const TQString dest = otherTmpDir() + "fileFromHome_copied";
createTestFile( filePath );
copyLocalFile( filePath, dest );
}
@@ -323,18 +323,18 @@ void JobTest::copyFileToOtherPartition()
void JobTest::copyDirectoryToOtherPartition()
{
kdDebug() << k_funcinfo << endl;
- const QString src = homeTmpDir() + "dirFromHome";
- const QString dest = otherTmpDir() + "dirFromHome_copied";
+ const TQString src = homeTmpDir() + "dirFromHome";
+ const TQString dest = otherTmpDir() + "dirFromHome_copied";
// src is already created by copyDirectoryToSamePartition()
// so this is just in case someone calls this method only
- if ( !QFile::exists( src ) )
+ if ( !TQFile::exists( src ) )
createTestDirectory( src );
copyLocalDirectory( src, dest );
}
-void JobTest::moveLocalFile( const QString& src, const QString& dest )
+void JobTest::moveLocalFile( const TQString& src, const TQString& dest )
{
- assert( QFile::exists( src ) );
+ assert( TQFile::exists( src ) );
KURL u;
u.setPath( src );
KURL d;
@@ -343,20 +343,20 @@ void JobTest::moveLocalFile( const QString& src, const QString& dest )
// move the file with file_move
bool ok = KIO::NetAccess::file_move( u, d );
assert( ok );
- assert( QFile::exists( dest ) );
- assert( !QFile::exists( src ) ); // not there anymore
+ assert( TQFile::exists( dest ) );
+ assert( !TQFile::exists( src ) ); // not there anymore
// move it back with KIO::move()
ok = KIO::NetAccess::move( d, u, 0 );
assert( ok );
- assert( !QFile::exists( dest ) );
- assert( QFile::exists( src ) ); // it's back
+ assert( !TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) ); // it's back
}
-static void moveLocalSymlink( const QString& src, const QString& dest )
+static void moveLocalSymlink( const TQString& src, const TQString& dest )
{
KDE_struct_stat buf;
- assert ( KDE_lstat( QFile::encodeName( src ), &buf ) == 0 );
+ assert ( KDE_lstat( TQFile::encodeName( src ), &buf ) == 0 );
KURL u;
u.setPath( src );
KURL d;
@@ -367,22 +367,22 @@ static void moveLocalSymlink( const QString& src, const QString& dest )
if ( !ok )
kdWarning() << KIO::NetAccess::lastError() << endl;
assert( ok );
- assert ( KDE_lstat( QFile::encodeName( dest ), &buf ) == 0 );
- assert( !QFile::exists( src ) ); // not there anymore
+ assert ( KDE_lstat( TQFile::encodeName( dest ), &buf ) == 0 );
+ assert( !TQFile::exists( src ) ); // not there anymore
// move it back with KIO::move()
ok = KIO::NetAccess::move( d, u, 0 );
assert( ok );
- assert ( KDE_lstat( QFile::encodeName( dest ), &buf ) != 0 ); // doesn't exist anymore
- assert ( KDE_lstat( QFile::encodeName( src ), &buf ) == 0 ); // it's back
+ assert ( KDE_lstat( TQFile::encodeName( dest ), &buf ) != 0 ); // doesn't exist anymore
+ assert ( KDE_lstat( TQFile::encodeName( src ), &buf ) == 0 ); // it's back
}
-void JobTest::moveLocalDirectory( const QString& src, const QString& dest )
+void JobTest::moveLocalDirectory( const TQString& src, const TQString& dest )
{
- assert( QFile::exists( src ) );
- assert( QFileInfo( src ).isDir() );
- assert( QFileInfo( src + "/testfile" ).isFile() );
- assert( QFileInfo( src + "/testlink" ).isSymLink() );
+ assert( TQFile::exists( src ) );
+ assert( TQFileInfo( src ).isDir() );
+ assert( TQFileInfo( src + "/testfile" ).isFile() );
+ assert( TQFileInfo( src + "/testlink" ).isSymLink() );
KURL u;
u.setPath( src );
KURL d;
@@ -390,19 +390,19 @@ void JobTest::moveLocalDirectory( const QString& src, const QString& dest )
bool ok = KIO::NetAccess::move( u, d, 0 );
assert( ok );
- assert( QFile::exists( dest ) );
- assert( QFileInfo( dest ).isDir() );
- assert( QFileInfo( dest + "/testfile" ).isFile() );
- assert( !QFile::exists( src ) ); // not there anymore
+ assert( TQFile::exists( dest ) );
+ assert( TQFileInfo( dest ).isDir() );
+ assert( TQFileInfo( dest + "/testfile" ).isFile() );
+ assert( !TQFile::exists( src ) ); // not there anymore
- assert( QFileInfo( dest + "/testlink" ).isSymLink() );
+ assert( TQFileInfo( dest + "/testlink" ).isSymLink() );
}
void JobTest::moveFileToSamePartition()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "fileFromHome";
- const QString dest = homeTmpDir() + "fileFromHome_moved";
+ const TQString filePath = homeTmpDir() + "fileFromHome";
+ const TQString dest = homeTmpDir() + "fileFromHome_moved";
createTestFile( filePath );
moveLocalFile( filePath, dest );
}
@@ -410,8 +410,8 @@ void JobTest::moveFileToSamePartition()
void JobTest::moveDirectoryToSamePartition()
{
kdDebug() << k_funcinfo << endl;
- const QString src = homeTmpDir() + "dirFromHome";
- const QString dest = homeTmpDir() + "dirFromHome_moved";
+ const TQString src = homeTmpDir() + "dirFromHome";
+ const TQString dest = homeTmpDir() + "dirFromHome_moved";
createTestDirectory( src );
moveLocalDirectory( src, dest );
}
@@ -419,8 +419,8 @@ void JobTest::moveDirectoryToSamePartition()
void JobTest::moveFileToOtherPartition()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "fileFromHome";
- const QString dest = otherTmpDir() + "fileFromHome_moved";
+ const TQString filePath = homeTmpDir() + "fileFromHome";
+ const TQString dest = otherTmpDir() + "fileFromHome_moved";
createTestFile( filePath );
moveLocalFile( filePath, dest );
}
@@ -428,8 +428,8 @@ void JobTest::moveFileToOtherPartition()
void JobTest::moveSymlinkToOtherPartition()
{
kdDebug() << k_funcinfo << endl;
- const QString filePath = homeTmpDir() + "testlink";
- const QString dest = otherTmpDir() + "testlink_moved";
+ const TQString filePath = homeTmpDir() + "testlink";
+ const TQString dest = otherTmpDir() + "testlink_moved";
createTestSymlink( filePath );
moveLocalSymlink( filePath, dest );
}
@@ -437,8 +437,8 @@ void JobTest::moveSymlinkToOtherPartition()
void JobTest::moveDirectoryToOtherPartition()
{
kdDebug() << k_funcinfo << endl;
- const QString src = homeTmpDir() + "dirFromHome";
- const QString dest = otherTmpDir() + "dirFromHome_moved";
+ const TQString src = homeTmpDir() + "dirFromHome";
+ const TQString dest = otherTmpDir() + "dirFromHome_moved";
createTestDirectory( src );
moveLocalDirectory( src, dest );
}
@@ -446,10 +446,10 @@ void JobTest::moveDirectoryToOtherPartition()
void JobTest::moveFileNoPermissions()
{
kdDebug() << k_funcinfo << endl;
- const QString src = "/etc/passwd";
- const QString dest = homeTmpDir() + "passwd";
- assert( QFile::exists( src ) );
- assert( QFileInfo( src ).isFile() );
+ const TQString src = "/etc/passwd";
+ const TQString dest = homeTmpDir() + "passwd";
+ assert( TQFile::exists( src ) );
+ assert( TQFileInfo( src ).isFile() );
KURL u;
u.setPath( src );
KURL d;
@@ -457,7 +457,7 @@ void JobTest::moveFileNoPermissions()
KIO::CopyJob* job = KIO::move( u, d, 0 );
job->setInteractive( false ); // no skip dialog, thanks
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( !ok );
assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED );
@@ -466,17 +466,17 @@ void JobTest::moveFileNoPermissions()
// there is no destination file created, but in the second case the
// destination file remains.
// In fact we assume /home is a separate partition, in this test, so:
- assert( QFile::exists( dest ) );
- assert( QFile::exists( src ) );
+ assert( TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) );
}
void JobTest::moveDirectoryNoPermissions()
{
kdDebug() << k_funcinfo << endl;
- const QString src = "/etc/init.d";
- const QString dest = homeTmpDir() + "init.d";
- assert( QFile::exists( src ) );
- assert( QFileInfo( src ).isDir() );
+ const TQString src = "/etc/init.d";
+ const TQString dest = homeTmpDir() + "init.d";
+ assert( TQFile::exists( src ) );
+ assert( TQFileInfo( src ).isDir() );
KURL u;
u.setPath( src );
KURL d;
@@ -484,22 +484,22 @@ void JobTest::moveDirectoryNoPermissions()
KIO::CopyJob* job = KIO::move( u, d, 0 );
job->setInteractive( false ); // no skip dialog, thanks
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( !ok );
assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED );
- assert( QFile::exists( dest ) ); // see moveFileNoPermissions
- assert( QFile::exists( src ) );
+ assert( TQFile::exists( dest ) ); // see moveFileNoPermissions
+ assert( TQFile::exists( src ) );
}
void JobTest::listRecursive()
{
- const QString src = homeTmpDir();
+ const TQString src = homeTmpDir();
KURL u;
u.setPath( src );
KIO::ListJob* job = KIO::listRecursive( u );
- connect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
+ TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
m_names.sort();
@@ -514,7 +514,7 @@ void JobTest::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst )
{
for( KIO::UDSEntryList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
KIO::UDSEntry::ConstIterator it2 = (*it).begin();
- QString displayName;
+ TQString displayName;
KURL url;
for( ; it2 != (*it).end(); it2++ ) {
switch ((*it2).m_uds) {
@@ -532,7 +532,7 @@ void JobTest::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst )
void JobTest::copyFileToSystem()
{
- if ( !KProtocolInfo::isKnownProtocol( QString::fromLatin1( "system" ) ) ) {
+ if ( !KProtocolInfo::isKnownProtocol( TQString::fromLatin1( "system" ) ) ) {
kdDebug() << k_funcinfo << "no kio_system, skipping test" << endl;
return;
}
@@ -540,8 +540,8 @@ void JobTest::copyFileToSystem()
// First test with support for UDS_LOCAL_PATH
copyFileToSystem( true );
- QString dest = realSystemPath() + "fileFromHome_copied";
- QFile::remove( dest );
+ TQString dest = realSystemPath() + "fileFromHome_copied";
+ TQFile::remove( dest );
// Then disable support for UDS_LOCAL_PATH, i.e. test what would
// happen for ftp, smb, http etc.
@@ -554,7 +554,7 @@ void JobTest::copyFileToSystem( bool resolve_local_urls )
extern KIO_EXPORT bool kio_resolve_local_urls;
kio_resolve_local_urls = resolve_local_urls;
- const QString src = homeTmpDir() + "fileFromHome";
+ const TQString src = homeTmpDir() + "fileFromHome";
createTestFile( src );
KURL u;
u.setPath( src );
@@ -565,15 +565,15 @@ void JobTest::copyFileToSystem( bool resolve_local_urls )
// copy the file with file_copy
KIO::FileCopyJob* job = KIO::file_copy( u, d );
- connect( job, SIGNAL(mimetype(KIO::Job*,const QString&)),
- this, SLOT(slotMimetype(KIO::Job*,const QString&)) );
+ connect( job, TQT_SIGNAL(mimetype(KIO::Job*,const TQString&)),
+ this, TQT_SLOT(slotMimetype(KIO::Job*,const TQString&)) );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
- QString dest = realSystemPath() + "fileFromHome_copied";
+ TQString dest = realSystemPath() + "fileFromHome_copied";
- assert( QFile::exists( dest ) );
- assert( QFile::exists( src ) ); // still there
+ assert( TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) ); // still there
{
// do NOT check that the timestamp is the same.
@@ -588,15 +588,15 @@ void JobTest::copyFileToSystem( bool resolve_local_urls )
//assert( m_mimetype == "text/plain" );
// cleanup and retry with KIO::copy()
- QFile::remove( dest );
+ TQFile::remove( dest );
ok = KIO::NetAccess::dircopy( u, d, 0 );
assert( ok );
- assert( QFile::exists( dest ) );
- assert( QFile::exists( src ) ); // still there
+ assert( TQFile::exists( dest ) );
+ assert( TQFile::exists( src ) ); // still there
{
// check that the timestamp is the same (#79937)
- QFileInfo srcInfo( src );
- QFileInfo destInfo( dest );
+ TQFileInfo srcInfo( src );
+ TQFileInfo destInfo( dest );
assert( srcInfo.lastModified() == destInfo.lastModified() );
}
@@ -604,7 +604,7 @@ void JobTest::copyFileToSystem( bool resolve_local_urls )
kio_resolve_local_urls = true;
}
-void JobTest::slotMimetype(KIO::Job* job, const QString& type)
+void JobTest::slotMimetype(KIO::Job* job, const TQString& type)
{
assert( job );
m_mimetype = type;
diff --git a/kio/tests/jobtest.h b/kio/tests/jobtest.h
index 9d3d52894..533ffba8c 100644
--- a/kio/tests/jobtest.h
+++ b/kio/tests/jobtest.h
@@ -20,8 +20,8 @@
#ifndef JOBTEST_H
#define JOBTEST_H
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <kio/job.h>
class JobTest : public QObject
@@ -56,24 +56,24 @@ public:
private slots:
void slotEntries( KIO::Job*, const KIO::UDSEntryList& lst );
void slotGetResult( KIO::Job* );
- void slotMimetype(KIO::Job*,const QString&);
+ void slotMimetype(KIO::Job*,const TQString&);
private:
- QString homeTmpDir() const;
- QString otherTmpDir() const;
- QString realSystemPath() const;
+ TQString homeTmpDir() const;
+ TQString otherTmpDir() const;
+ TQString realSystemPath() const;
KURL systemTmpDir() const;
enum { AlreadyExists = 1 };
- void copyLocalFile( const QString& src, const QString& dest );
- void copyLocalDirectory( const QString& src, const QString& dest, int flags = 0 );
- void moveLocalFile( const QString& src, const QString& dest );
- void moveLocalDirectory( const QString& src, const QString& dest );
+ void copyLocalFile( const TQString& src, const TQString& dest );
+ void copyLocalDirectory( const TQString& src, const TQString& dest, int flags = 0 );
+ void moveLocalFile( const TQString& src, const TQString& dest );
+ void moveLocalDirectory( const TQString& src, const TQString& dest );
void copyFileToSystem( bool resolve_local_urls );
int m_result;
- QByteArray m_data;
- QStringList m_names;
- QString m_mimetype;
+ TQByteArray m_data;
+ TQStringList m_names;
+ TQString m_mimetype;
};
#endif
diff --git a/kio/tests/kacltest.cpp b/kio/tests/kacltest.cpp
index 7f75dfde6..58ae319b2 100644
--- a/kio/tests/kacltest.cpp
+++ b/kio/tests/kacltest.cpp
@@ -26,22 +26,22 @@
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qfileinfo.h>
-#include <qeventloop.h>
+#include <tqfileinfo.h>
+#include <tqeventloop.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
-#include <qdir.h>
+#include <tqdir.h>
// The code comes partly from kdebase/kioslave/trash/testtrash.cpp
-static bool check(const QString& txt, QString a, QString b)
+static bool check(const TQString& txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -53,7 +53,7 @@ static bool check(const QString& txt, QString a, QString b)
}
template<typename T>
-static bool check(const QString& txt, T a, T b)
+static bool check(const TQString& txt, T a, T b)
{
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
@@ -80,22 +80,22 @@ int main(int argc, char *argv[])
}
#ifdef Q_OS_FREEBSD
-static const QString s_group1 = QString::fromLatin1("staff");
-static const QString s_group2 = QString::fromLatin1("guest");
+static const TQString s_group1 = TQString::fromLatin1("staff");
+static const TQString s_group2 = TQString::fromLatin1("guest");
#else
-static const QString s_group1 = QString::fromLatin1("audio");
-static const QString s_group2 = QString::fromLatin1("users");
+static const TQString s_group1 = TQString::fromLatin1("audio");
+static const TQString s_group2 = TQString::fromLatin1("users");
#endif
-static const QString s_testACL = QString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" );
-static const QString s_testACL2 = QString::fromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") +
- QString::fromLatin1( "group:" ) + s_group1 + QString::fromLatin1( ":--x\n" ) +
- QString::fromLatin1( "group:" ) + s_group2 + QString::fromLatin1( ":r--\n" ) +
- QString::fromLatin1( "mask::r-x\nother::r--\n" );
-static const QString s_testACLEffective = QString::fromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) +
- QString::fromLatin1( "group:" ) + s_group1 + QString::fromLatin1( ":--x\n" ) +
- QString::fromLatin1( "group:" ) + s_group2 + QString::fromLatin1( ":r--\n" ) +
- QString::fromLatin1( "mask::r-x\nother::r--\n" );
+static const TQString s_testACL = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" );
+static const TQString s_testACL2 = TQString::fromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") +
+ TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) +
+ TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) +
+ TQString::fromLatin1( "mask::r-x\nother::r--\n" );
+static const TQString s_testACLEffective = TQString::fromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) +
+ TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) +
+ TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) +
+ TQString::fromLatin1( "mask::r-x\nother::r--\n" );
KACLTest::KACLTest()
:m_acl( s_testACL )
@@ -147,24 +147,24 @@ void KACLTest::testSetACL()
void KACLTest::testGetOwnerPermissions()
{
- check( "Owner permissions: ", QString::number( m_acl.ownerPermissions() ), "6" );
+ check( "Owner permissions: ", TQString::number( m_acl.ownerPermissions() ), "6" );
}
void KACLTest::testGetOwningGroupPermissions()
{
- check( "Owning group permissions: ", QString::number( m_acl.owningGroupPermissions() ), "6" );
+ check( "Owning group permissions: ", TQString::number( m_acl.owningGroupPermissions() ), "6" );
}
void KACLTest::testGetOthersPermissions()
{
- check( "Others permissions: ", QString::number( m_acl.othersPermissions() ), "4" );
+ check( "Others permissions: ", TQString::number( m_acl.othersPermissions() ), "4" );
}
void KACLTest::testGetMaskPermissions()
{
bool exists = false;
unsigned short mask = m_acl.maskPermissions( exists );
- check( "Mask permissions: ", QString::number( mask ), "7" );
+ check( "Mask permissions: ", TQString::number( mask ), "7" );
check( "Mask permissions: ", exists, true );
}
@@ -172,7 +172,7 @@ void KACLTest::testGetAllUserPermissions()
{
ACLUserPermissionsList list = m_acl.allUserPermissions();
ACLUserPermissionsConstIterator it = list.begin();
- QString name;
+ TQString name;
unsigned short permissions;
int count = 0;
while ( it != list.end() ) {
@@ -181,16 +181,16 @@ void KACLTest::testGetAllUserPermissions()
++it;
++count;
}
- check( "All users count: ", QString::number( count ), "1" );
+ check( "All users count: ", TQString::number( count ), "1" );
check( "All users name: ", name, "bin" );
- check( "All users permissions: ", QString::number( permissions ), "7" );
+ check( "All users permissions: ", TQString::number( permissions ), "7" );
}
void KACLTest::testGetAllGroupsPermissions()
{
ACLGroupPermissionsList list = m_acl.allGroupPermissions();
ACLGroupPermissionsConstIterator it = list.begin();
- QString name;
+ TQString name;
unsigned short permissions;
int count = 0;
while ( it != list.end() ) {
@@ -199,15 +199,15 @@ void KACLTest::testGetAllGroupsPermissions()
// setACL sorts them alphabetically ...
if ( count == 0 ) {
check( "All groups name: ", name, s_group1 );
- check( "All groups permissions: ", QString::number( permissions ), "1" );
+ check( "All groups permissions: ", TQString::number( permissions ), "1" );
} else if ( count == 1 ) {
check( "All groups name: ", name, s_group2 );
- check( "All groups permissions: ", QString::number( permissions ), "4" );
+ check( "All groups permissions: ", TQString::number( permissions ), "4" );
}
++it;
++count;
}
- check( "All users count: ", QString::number( count ), "2" );
+ check( "All users count: ", TQString::number( count ), "2" );
}
void KACLTest::testIsExtended()
@@ -235,9 +235,9 @@ void KACLTest::testSettingBasic()
CharlesII.setOwnerPermissions( 7 ); // clearly
CharlesII.setOwningGroupPermissions( 0 );
CharlesII.setOthersPermissions( 0 );
- check( "setOwnerPermissions: ", QString::number( CharlesII.ownerPermissions() ),"7" );
- check( "setOwningGroupPermissions: ", QString::number( CharlesII.owningGroupPermissions() ),"0" );
- check( "setOthersPermissions: ", QString::number( CharlesII.othersPermissions() ),"0" );
+ check( "setOwnerPermissions: ", TQString::number( CharlesII.ownerPermissions() ),"7" );
+ check( "setOwningGroupPermissions: ", TQString::number( CharlesII.owningGroupPermissions() ),"0" );
+ check( "setOthersPermissions: ", TQString::number( CharlesII.othersPermissions() ),"0" );
}
void KACLTest::testSettingExtended()
@@ -245,28 +245,28 @@ void KACLTest::testSettingExtended()
KACL CharlesII( s_testACL );
CharlesII.setMaskPermissions( 7 ); // clearly
bool dummy = false;
- check( "setMaskPermissions: ", QString::number( CharlesII.maskPermissions( dummy ) ),"7" );
+ check( "setMaskPermissions: ", TQString::number( CharlesII.maskPermissions( dummy ) ),"7" );
- const QString expected( "user::rw-\nuser:root:rwx\nuser:bin:r--\ngroup::rw-\nmask::rwx\nother::r--\n" );
+ const TQString expected( "user::rw-\nuser:root:rwx\nuser:bin:r--\ngroup::rw-\nmask::rwx\nother::r--\n" );
ACLUserPermissionsList users;
- ACLUserPermissions user = qMakePair( QString( "root" ), ( unsigned short )7 );
+ ACLUserPermissions user = qMakePair( TQString( "root" ), ( unsigned short )7 );
users.append( user );
- user = qMakePair( QString( "bin" ), ( unsigned short )4 );
+ user = qMakePair( TQString( "bin" ), ( unsigned short )4 );
users.append( user );
CharlesII.setAllUserPermissions( users );
check( "setAllUserPermissions: ", CharlesII.asString(), expected );
CharlesII.setACL( s_testACL ); // reset
// it already has an entry for bin, let's change it
- CharlesII.setNamedUserPermissions( QString("bin"), 4 );
- CharlesII.setNamedUserPermissions( QString( "root" ), 7 );
+ CharlesII.setNamedUserPermissions( TQString("bin"), 4 );
+ CharlesII.setNamedUserPermissions( TQString( "root" ), 7 );
check( "setNamedUserPermissions: ", CharlesII.asString(), expected );
// groups, all and named
- const QString expected2 = QString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 +
- QString::fromLatin1( ":-wx\ngroup:" ) + s_group2 + QString::fromLatin1(":r--\nmask::rwx\nother::r--\n" );
+ const TQString expected2 = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 +
+ TQString::fromLatin1( ":-wx\ngroup:" ) + s_group2 + TQString::fromLatin1(":r--\nmask::rwx\nother::r--\n" );
CharlesII.setACL( s_testACL ); // reset
ACLGroupPermissionsList groups;
ACLGroupPermissions group = qMakePair( s_group1, ( unsigned short )3 );
@@ -304,6 +304,6 @@ void KACLTest::testNewMask()
check( "mask exists: ", dummy, false );
CharlesII.setMaskPermissions( 6 );
- check( "new mask set: ", QString::number( CharlesII.maskPermissions( dummy ) ), "6" );
+ check( "new mask set: ", TQString::number( CharlesII.maskPermissions( dummy ) ), "6" );
check( "mask exists now: ", dummy, true );
}
diff --git a/kio/tests/kacltest.h b/kio/tests/kacltest.h
index 906a5a84f..1a85e4109 100644
--- a/kio/tests/kacltest.h
+++ b/kio/tests/kacltest.h
@@ -20,7 +20,7 @@
#ifndef KACLTEST_H
#define KACLTEST_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kacl.h>
class KACLTest
diff --git a/kio/tests/kdcopcheck.cpp b/kio/tests/kdcopcheck.cpp
index 09cbf1310..b61dfd03d 100644
--- a/kio/tests/kdcopcheck.cpp
+++ b/kio/tests/kdcopcheck.cpp
@@ -8,7 +8,7 @@
#include <kimageio.h>
#include <kprotocolinfo.h>
#include <kprocess.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "kdcopcheck.h"
#include <dcopclient.h>
@@ -18,7 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
-void debug(QString txt)
+void debug(TQString txt)
{
fprintf(stderr, "%s\n", txt.ascii());
}
@@ -33,27 +33,27 @@ void debug(const char *format, const char *txt)
fprintf(stderr, "\n");
}
-TestService::TestService(const QString &exec)
+TestService::TestService(const TQString &exec)
{
m_exec = exec;
proc << exec;
proc.start();
- connect(kapp->dcopClient(), SIGNAL( applicationRegistered(const QCString&)),
- this, SLOT(newApp(const QCString&)));
- connect(kapp->dcopClient(), SIGNAL( applicationRemoved(const QCString&)),
- this, SLOT(endApp(const QCString&)));
- connect(&proc, SIGNAL(processExited(KProcess *)),
- this, SLOT(appExit()));
+ connect(kapp->dcopClient(), TQT_SIGNAL( applicationRegistered(const TQCString&)),
+ this, TQT_SLOT(newApp(const TQCString&)));
+ connect(kapp->dcopClient(), TQT_SIGNAL( applicationRemoved(const TQCString&)),
+ this, TQT_SLOT(endApp(const TQCString&)));
+ connect(&proc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(appExit()));
- QTimer::singleShot(20*1000, this, SLOT(stop()));
+ TQTimer::singleShot(20*1000, this, TQT_SLOT(stop()));
result = KService::DCOP_None;
}
-void TestService::newApp(const QCString &appId)
+void TestService::newApp(const TQCString &appId)
{
- QString id = appId;
+ TQString id = appId;
if (id == m_exec)
{
result = KService::DCOP_Unique;
@@ -67,7 +67,7 @@ void TestService::newApp(const QCString &appId)
qWarning("Register %s", appId.data());
}
-void TestService::endApp(const QCString &appId)
+void TestService::endApp(const TQCString &appId)
{
qWarning("Unegister %s", appId.data());
}
@@ -113,7 +113,7 @@ int main(int argc, char *argv[])
int n = test->exec();
delete test;
- QString result;
+ TQString result;
if (n == KService::DCOP_None)
result = "None";
else if (n == KService::DCOP_Unique)
diff --git a/kio/tests/kdcopcheck.h b/kio/tests/kdcopcheck.h
index 5410bbec2..c3572d929 100644
--- a/kio/tests/kdcopcheck.h
+++ b/kio/tests/kdcopcheck.h
@@ -2,26 +2,26 @@
#define _BLA_H_
#include <kprocess.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
class TestService : public QObject
{
Q_OBJECT
public:
- TestService(const QString &exec);
+ TestService(const TQString &exec);
int exec();
public slots:
- void newApp(const QCString &appId);
- void endApp(const QCString &appId);
+ void newApp(const TQCString &appId);
+ void endApp(const TQCString &appId);
void appExit();
void stop();
protected:
int result;
- QString m_exec;
+ TQString m_exec;
KProcess proc;
};
diff --git a/kio/tests/kdefaultprogresstest.cpp b/kio/tests/kdefaultprogresstest.cpp
index 16d00d81d..a831041e1 100644
--- a/kio/tests/kdefaultprogresstest.cpp
+++ b/kio/tests/kdefaultprogresstest.cpp
@@ -18,7 +18,7 @@ int main(int argc, char **argv)
dlg->slotTotalDirs( 0L, 1 );
dlg->slotSpeed( 0L, 55 );
- dlg->slotInfoMessage( 0L, QString::fromLatin1( "Starting..." ) );
+ dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Starting..." ) );
int files = 0;
for ( int size = 0 ; size < 12000 ; size += 1 )
@@ -31,7 +31,7 @@ int main(int argc, char **argv)
}
kapp->processEvents();
}
- dlg->slotInfoMessage( 0L, QString::fromLatin1( "Done." ) );
+ dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Done." ) );
delete dlg;
return 0;
diff --git a/kio/tests/kdirlistertest.cpp b/kio/tests/kdirlistertest.cpp
index d3ea5b888..6137f5e71 100644
--- a/kio/tests/kdirlistertest.cpp
+++ b/kio/tests/kdirlistertest.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kdirlister.h>
@@ -30,18 +30,18 @@
#include <cstdlib>
-KDirListerTest::KDirListerTest( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KDirListerTest::KDirListerTest( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
lister = new KDirLister( false /* true */ );
debug = new PrintSignals;
- QVBoxLayout* layout = new QVBoxLayout( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
- QPushButton* startH = new QPushButton( "Start listing $HOME", this );
- QPushButton* startR= new QPushButton( "Start listing /", this );
- QPushButton* test = new QPushButton( "Many", this );
- QPushButton* startT = new QPushButton( "tarfile", this );
+ TQPushButton* startH = new TQPushButton( "Start listing $HOME", this );
+ TQPushButton* startR= new TQPushButton( "Start listing /", this );
+ TQPushButton* test = new TQPushButton( "Many", this );
+ TQPushButton* startT = new TQPushButton( "tarfile", this );
layout->addWidget( startH );
layout->addWidget( startR );
@@ -49,48 +49,48 @@ KDirListerTest::KDirListerTest( QWidget *parent, const char *name )
layout->addWidget( test );
resize( layout->sizeHint() );
- connect( startR, SIGNAL( clicked() ), SLOT( startRoot() ) );
- connect( startH, SIGNAL( clicked() ), SLOT( startHome() ) );
- connect( startT, SIGNAL( clicked() ), SLOT( startTar() ) );
- connect( test, SIGNAL( clicked() ), SLOT( test() ) );
-
- connect( lister, SIGNAL( started( const KURL & ) ),
- debug, SLOT( started( const KURL & ) ) );
- connect( lister, SIGNAL( completed() ),
- debug, SLOT( completed() ) );
- connect( lister, SIGNAL( completed( const KURL & ) ),
- debug, SLOT( completed( const KURL & ) ) );
- connect( lister, SIGNAL( canceled() ),
- debug, SLOT( canceled() ) );
- connect( lister, SIGNAL( canceled( const KURL & ) ),
- debug, SLOT( canceled( const KURL & ) ) );
- connect( lister, SIGNAL( redirection( const KURL & ) ),
- debug, SLOT( redirection( const KURL & ) ) );
- connect( lister, SIGNAL( redirection( const KURL &, const KURL & ) ),
- debug, SLOT( redirection( const KURL &, const KURL & ) ) );
- connect( lister, SIGNAL( clear() ),
- debug, SLOT( clear() ) );
- connect( lister, SIGNAL( newItems( const KFileItemList & ) ),
- debug, SLOT( newItems( const KFileItemList & ) ) );
- connect( lister, SIGNAL( itemsFilteredByMime( const KFileItemList & ) ),
- debug, SLOT( itemsFilteredByMime( const KFileItemList & ) ) );
- connect( lister, SIGNAL( deleteItem( KFileItem * ) ),
- debug, SLOT( deleteItem( KFileItem * ) ) );
- connect( lister, SIGNAL( refreshItems( const KFileItemList & ) ),
- debug, SLOT( refreshItems( const KFileItemList & ) ) );
- connect( lister, SIGNAL( infoMessage( const QString& ) ),
- debug, SLOT( infoMessage( const QString& ) ) );
- connect( lister, SIGNAL( percent( int ) ),
- debug, SLOT( percent( int ) ) );
- connect( lister, SIGNAL( totalSize( KIO::filesize_t ) ),
- debug, SLOT( totalSize( KIO::filesize_t ) ) );
- connect( lister, SIGNAL( processedSize( KIO::filesize_t ) ),
- debug, SLOT( processedSize( KIO::filesize_t ) ) );
- connect( lister, SIGNAL( speed( int ) ),
- debug, SLOT( speed( int ) ) );
-
- connect( lister, SIGNAL( completed() ),
- this, SLOT( completed() ) );
+ connect( startR, TQT_SIGNAL( clicked() ), TQT_SLOT( startRoot() ) );
+ connect( startH, TQT_SIGNAL( clicked() ), TQT_SLOT( startHome() ) );
+ connect( startT, TQT_SIGNAL( clicked() ), TQT_SLOT( startTar() ) );
+ connect( test, TQT_SIGNAL( clicked() ), TQT_SLOT( test() ) );
+
+ connect( lister, TQT_SIGNAL( started( const KURL & ) ),
+ debug, TQT_SLOT( started( const KURL & ) ) );
+ connect( lister, TQT_SIGNAL( completed() ),
+ debug, TQT_SLOT( completed() ) );
+ connect( lister, TQT_SIGNAL( completed( const KURL & ) ),
+ debug, TQT_SLOT( completed( const KURL & ) ) );
+ connect( lister, TQT_SIGNAL( canceled() ),
+ debug, TQT_SLOT( canceled() ) );
+ connect( lister, TQT_SIGNAL( canceled( const KURL & ) ),
+ debug, TQT_SLOT( canceled( const KURL & ) ) );
+ connect( lister, TQT_SIGNAL( redirection( const KURL & ) ),
+ debug, TQT_SLOT( redirection( const KURL & ) ) );
+ connect( lister, TQT_SIGNAL( redirection( const KURL &, const KURL & ) ),
+ debug, TQT_SLOT( redirection( const KURL &, const KURL & ) ) );
+ connect( lister, TQT_SIGNAL( clear() ),
+ debug, TQT_SLOT( clear() ) );
+ connect( lister, TQT_SIGNAL( newItems( const KFileItemList & ) ),
+ debug, TQT_SLOT( newItems( const KFileItemList & ) ) );
+ connect( lister, TQT_SIGNAL( itemsFilteredByMime( const KFileItemList & ) ),
+ debug, TQT_SLOT( itemsFilteredByMime( const KFileItemList & ) ) );
+ connect( lister, TQT_SIGNAL( deleteItem( KFileItem * ) ),
+ debug, TQT_SLOT( deleteItem( KFileItem * ) ) );
+ connect( lister, TQT_SIGNAL( refreshItems( const KFileItemList & ) ),
+ debug, TQT_SLOT( refreshItems( const KFileItemList & ) ) );
+ connect( lister, TQT_SIGNAL( infoMessage( const TQString& ) ),
+ debug, TQT_SLOT( infoMessage( const TQString& ) ) );
+ connect( lister, TQT_SIGNAL( percent( int ) ),
+ debug, TQT_SLOT( percent( int ) ) );
+ connect( lister, TQT_SIGNAL( totalSize( KIO::filesize_t ) ),
+ debug, TQT_SLOT( totalSize( KIO::filesize_t ) ) );
+ connect( lister, TQT_SIGNAL( processedSize( KIO::filesize_t ) ),
+ debug, TQT_SLOT( processedSize( KIO::filesize_t ) ) );
+ connect( lister, TQT_SIGNAL( speed( int ) ),
+ debug, TQT_SLOT( speed( int ) ) );
+
+ connect( lister, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( completed() ) );
}
KDirListerTest::~KDirListerTest()
diff --git a/kio/tests/kdirlistertest.h b/kio/tests/kdirlistertest.h
index 5c0e751a4..6b1e831f5 100644
--- a/kio/tests/kdirlistertest.h
+++ b/kio/tests/kdirlistertest.h
@@ -21,8 +21,8 @@
#ifndef _KDIRLISTERTEST_H_
#define _KDIRLISTERTEST_H_
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kfileitem.h>
@@ -35,7 +35,7 @@ class PrintSignals : public QObject
{
Q_OBJECT
public:
- PrintSignals() : QObject() { }
+ PrintSignals() : TQObject() { }
public slots:
void started( const KURL &url )
@@ -82,7 +82,7 @@ public slots:
cout << "*** refreshItems: " << endl;
// TODO
}
- void infoMessage( const QString& msg )
+ void infoMessage( const TQString& msg )
{ cout << "*** infoMessage: " << msg.local8Bit() << endl; }
void percent( int percent )
@@ -102,7 +102,7 @@ class KDirListerTest : public QWidget
{
Q_OBJECT
public:
- KDirListerTest( QWidget *parent=0, const char *name=0 );
+ KDirListerTest( TQWidget *parent=0, const char *name=0 );
~KDirListerTest();
public slots:
diff --git a/kio/tests/kdirwatchtest.cpp b/kio/tests/kdirwatchtest.cpp
index 41924078e..48bc59a14 100644
--- a/kio/tests/kdirwatchtest.cpp
+++ b/kio/tests/kdirwatchtest.cpp
@@ -9,7 +9,7 @@
LGPL version 2.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kcmdlineargs.h>
@@ -38,26 +38,26 @@ int main (int argc, char **argv)
KDirWatch *dirwatch1 = KDirWatch::self();
KDirWatch *dirwatch2 = new KDirWatch;
- testObject.connect(dirwatch1, SIGNAL( dirty( const QString &)), SLOT( dirty( const QString &)) );
- testObject.connect(dirwatch1, SIGNAL( created( const QString &)), SLOT( created( const QString &)) );
- testObject.connect(dirwatch1, SIGNAL( deleted( const QString &)), SLOT( deleted( const QString &)) );
+ testObject.connect(dirwatch1, TQT_SIGNAL( dirty( const TQString &)), TQT_SLOT( dirty( const TQString &)) );
+ testObject.connect(dirwatch1, TQT_SIGNAL( created( const TQString &)), TQT_SLOT( created( const TQString &)) );
+ testObject.connect(dirwatch1, TQT_SIGNAL( deleted( const TQString &)), TQT_SLOT( deleted( const TQString &)) );
if (args->count() >0) {
for(int i = 0; i < args->count(); i++) {
kdDebug() << "Watching: " << args->arg(i) << endl;
- dirwatch2->addDir( QFile::decodeName( args->arg(i)));
+ dirwatch2->addDir( TQFile::decodeName( args->arg(i)));
}
}
- QString home = QString(getenv ("HOME")) + "/";
- QString desk = home + "Desktop/";
+ TQString home = TQString(getenv ("HOME")) + "/";
+ TQString desk = home + "Desktop/";
kdDebug() << "Watching: " << home << endl;
dirwatch1->addDir(home);
kdDebug() << "Watching file: " << home << "foo " << endl;
dirwatch1->addFile(home+"foo");
kdDebug() << "Watching: " << desk << endl;
dirwatch1->addDir(desk);
- QString test = home + "test/";
+ TQString test = home + "test/";
kdDebug() << "Watching: (but skipped) " << test << endl;
dirwatch1->addDir(test);
diff --git a/kio/tests/kdirwatchtest.h b/kio/tests/kdirwatchtest.h
index 9330f941c..24dc94a91 100644
--- a/kio/tests/kdirwatchtest.h
+++ b/kio/tests/kdirwatchtest.h
@@ -14,20 +14,20 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "kdirwatch.h"
#include "kapplication.h"
-class myTest : public QObject
+class myTest : public TQObject
{
Q_OBJECT
public:
myTest() { };
public slots:
- void dirty(const QString &a) { printf("Dirty: %s\n", a.ascii()); };
- void created(const QString& f) { printf("Created: %s\n", f.ascii()); }
- void deleted(const QString& f) { printf("Deleted: %s\n", f.ascii()); }
+ void dirty(const TQString &a) { printf("Dirty: %s\n", a.ascii()); };
+ void created(const TQString& f) { printf("Created: %s\n", f.ascii()); }
+ void deleted(const TQString& f) { printf("Deleted: %s\n", f.ascii()); }
};
#endif
diff --git a/kio/tests/kdirwatchunittest.cpp b/kio/tests/kdirwatchunittest.cpp
index d523909ec..1bd17edd6 100644
--- a/kio/tests/kdirwatchunittest.cpp
+++ b/kio/tests/kdirwatchunittest.cpp
@@ -11,8 +11,8 @@
#include <unistd.h>
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <kdebug.h>
@@ -39,7 +39,7 @@ void KDirWatchTest::VERIFY_NOTHING()
VERIFY (nothing_failed);
}
-void KDirWatchTest::VERIFY_DIRTY(const QString& alert)
+void KDirWatchTest::VERIFY_DIRTY(const TQString& alert)
{
unsigned m_s[3];
for(int i = 0; i < 3; ++i)
@@ -56,7 +56,7 @@ void KDirWatchTest::VERIFY_DIRTY(const QString& alert)
m_lastSignal == alert);
}
-void KDirWatchTest::VERIFY_CREATED(const QString& alert)
+void KDirWatchTest::VERIFY_CREATED(const TQString& alert)
{
unsigned m_s[3];
for(int i = 0; i < 3; ++i)
@@ -73,7 +73,7 @@ void KDirWatchTest::VERIFY_CREATED(const QString& alert)
m_lastSignal == alert);
}
-void KDirWatchTest::VERIFY_DELETED(const QString& alert)
+void KDirWatchTest::VERIFY_DELETED(const TQString& alert)
{
unsigned m_s[3];
for(int i = 0; i < 3; ++i)
@@ -90,26 +90,26 @@ void KDirWatchTest::VERIFY_DELETED(const QString& alert)
m_lastSignal == alert);
}
-void KDirWatchTest::remove_file (const QString& file)
+void KDirWatchTest::remove_file (const TQString& file)
{
- ::unlink (QFile::encodeName(file));
+ ::unlink (TQFile::encodeName(file));
}
-void KDirWatchTest::touch_file (const QString& file)
+void KDirWatchTest::touch_file (const TQString& file)
{
- QFile f(file);
+ TQFile f(file);
f.open(IO_WriteOnly);
}
-void KDirWatchTest::rename_file(const QString& from, const QString& to)
+void KDirWatchTest::rename_file(const TQString& from, const TQString& to)
{
- ::rename(QFile::encodeName(from), QFile::encodeName(to));
+ ::rename(TQFile::encodeName(from), TQFile::encodeName(to));
}
KUNITTEST_MODULE ( kunittest_kdirwatch, "KDirWatchTest" )
KUNITTEST_MODULE_REGISTER_TESTER (KDirWatchTest)
-#define SLEEP() QApplication::processEvents();
+#define SLEEP() TQApplication::processEvents();
void KDirWatchTest::allTests()
{
@@ -117,12 +117,12 @@ void KDirWatchTest::allTests()
d = new KDirWatch;
VERIFY (d != 0);
- QDir* dir = new QDir(m_workingDir);
+ TQDir* dir = new TQDir(m_workingDir);
VERIFY (dir != 0);
- connect(d, SIGNAL (dirty( const QString &)), SLOT( slotDirty( const QString &)) );
- connect(d, SIGNAL (created( const QString &)), SLOT( slotCreated( const QString &)) );
- connect(d, SIGNAL (deleted( const QString &)), SLOT( slotDeleted( const QString &)) );
+ connect(d, TQT_SIGNAL (dirty( const TQString &)), TQT_SLOT( slotDirty( const TQString &)) );
+ connect(d, TQT_SIGNAL (created( const TQString &)), TQT_SLOT( slotCreated( const TQString &)) );
+ connect(d, TQT_SIGNAL (deleted( const TQString &)), TQT_SLOT( slotDeleted( const TQString &)) );
VERIFY (dir->mkdir (m_workingDir));
diff --git a/kio/tests/kdirwatchunittest.h b/kio/tests/kdirwatchunittest.h
index 417cdf24e..053ab2882 100644
--- a/kio/tests/kdirwatchunittest.h
+++ b/kio/tests/kdirwatchunittest.h
@@ -14,7 +14,7 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "kdirwatch.h"
#include "kapplication.h"
@@ -38,9 +38,9 @@ public:
virtual void allTests();
private slots:
- void slotDirty (const QString& s) { m_signals[sigDirty]++; m_lastSignal = s; }
- void slotCreated (const QString& s) { m_signals[sigCreated]++; m_lastSignal = s; }
- void slotDeleted (const QString& s) { m_signals[sigDeleted]++; m_lastSignal = s; }
+ void slotDirty (const TQString& s) { m_signals[sigDirty]++; m_lastSignal = s; }
+ void slotCreated (const TQString& s) { m_signals[sigCreated]++; m_lastSignal = s; }
+ void slotDeleted (const TQString& s) { m_signals[sigDeleted]++; m_lastSignal = s; }
private:
unsigned m_signals[3];
@@ -48,18 +48,18 @@ private:
/* verify nothing happens */
void VERIFY_NOTHING();
/* verify that dirty got emitted */
- void VERIFY_DIRTY (const QString&);
+ void VERIFY_DIRTY (const TQString&);
/* verify that created got emitted */
- void VERIFY_CREATED (const QString&);
+ void VERIFY_CREATED (const TQString&);
/* verify that deleted got emitted */
- void VERIFY_DELETED (const QString&);
+ void VERIFY_DELETED (const TQString&);
- void touch_file (const QString& file);
- void remove_file (const QString& file);
- void rename_file (const QString& from, const QString& to);
+ void touch_file (const TQString& file);
+ void remove_file (const TQString& file);
+ void rename_file (const TQString& from, const TQString& to);
- QString m_lastSignal;
- QString m_workingDir;
+ TQString m_lastSignal;
+ TQString m_workingDir;
KDirWatch* d;
};
diff --git a/kio/tests/kfiltertest.cpp b/kio/tests/kfiltertest.cpp
index a0dd8fe49..901dec14e 100644
--- a/kio/tests/kfiltertest.cpp
+++ b/kio/tests/kfiltertest.cpp
@@ -20,25 +20,25 @@
#include "kfilterbase.h"
#include <unistd.h>
#include <limits.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kinstance.h>
-void test_block( const QString & fileName )
+void test_block( const TQString & fileName )
{
- QIODevice * dev = KFilterDev::deviceForFile( fileName );
+ TQIODevice * dev = KFilterDev::deviceForFile( fileName );
if (!dev) { kdWarning() << "dev=0" << endl; return; }
if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; }
- // This is what KGzipDev::readAll could do, if QIODevice::readAll was virtual....
+ // This is what KGzipDev::readAll could do, if TQIODevice::readAll was virtual....
- QByteArray array(1024);
+ TQByteArray array(1024);
int n;
while ( ( n = dev->readBlock( array.data(), array.size() ) ) )
{
kdDebug() << "readBlock returned " << n << endl << endl;
- // QCString s(array,n+1); // Terminate with 0 before printing
+ // TQCString s(array,n+1); // Terminate with 0 before printing
// printf("%s", s.data());
kdDebug() << "dev.at = " << dev->at() << endl;
@@ -48,13 +48,13 @@ void test_block( const QString & fileName )
delete dev;
}
-void test_block_write( const QString & fileName )
+void test_block_write( const TQString & fileName )
{
- QIODevice * dev = KFilterDev::deviceForFile( fileName );
+ TQIODevice * dev = KFilterDev::deviceForFile( fileName );
if (!dev) { kdWarning() << "dev=0" << endl; return; }
if ( !dev->open( IO_WriteOnly ) ) { kdWarning() << "open failed " << endl; return; }
- QCString s("hello\n");
+ TQCString s("hello\n");
int ret = dev->writeBlock( s, s.size()-1 );
kdDebug() << "writeBlock ret=" << ret << endl;
//ret = dev->writeBlock( s, s.size()-1 );
@@ -63,9 +63,9 @@ void test_block_write( const QString & fileName )
delete dev;
}
-void test_getch( const QString & fileName )
+void test_getch( const TQString & fileName )
{
- QIODevice * dev = KFilterDev::deviceForFile( fileName );
+ TQIODevice * dev = KFilterDev::deviceForFile( fileName );
if (!dev) { kdWarning() << "dev=0" << endl; return; }
if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; }
int ch;
@@ -75,12 +75,12 @@ void test_getch( const QString & fileName )
delete dev;
}
-void test_textstream( const QString & fileName )
+void test_textstream( const TQString & fileName )
{
- QIODevice * dev = KFilterDev::deviceForFile( fileName );
+ TQIODevice * dev = KFilterDev::deviceForFile( fileName );
if (!dev) { kdWarning() << "dev=0" << endl; return; }
if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; }
- QTextStream ts( dev );
+ TQTextStream ts( dev );
printf("%s\n", ts.read().latin1());
dev->close();
delete dev;
@@ -92,8 +92,8 @@ int main()
char currentdir[PATH_MAX+1];
getcwd( currentdir, PATH_MAX );
- QString pathgz = QFile::decodeName(currentdir) + "/test.gz";
- QString pathbz2 = QFile::decodeName(currentdir) + "/test.bz2";
+ TQString pathgz = TQFile::decodeName(currentdir) + "/test.gz";
+ TQString pathbz2 = TQFile::decodeName(currentdir) + "/test.bz2";
kdDebug() << " -- test_block_write gzip -- " << endl;
test_block_write(pathgz);
diff --git a/kio/tests/kionetrctest.cpp b/kio/tests/kionetrctest.cpp
index 977603426..852a06453 100644
--- a/kio/tests/kionetrctest.cpp
+++ b/kio/tests/kionetrctest.cpp
@@ -26,7 +26,7 @@ void output( const KURL& u )
<< "Login: " << l.login << endl
<< "Password: " << l.password << endl;
- QMap<QString,QStringList>::ConstIterator it = l.macdef.begin();
+ TQMap<TQString,TQStringList>::ConstIterator it = l.macdef.begin();
for ( ; it != l.macdef.end(); ++it )
{
kdDebug() << "Macro: " << it.key() << "= "
diff --git a/kio/tests/kiopassdlgtest.cpp b/kio/tests/kiopassdlgtest.cpp
index fc017476d..2e8894108 100644
--- a/kio/tests/kiopassdlgtest.cpp
+++ b/kio/tests/kiopassdlgtest.cpp
@@ -12,15 +12,15 @@ int main ( int argc, char** argv )
KCmdLineArgs::init(argc, argv, &aboutData);
KApplication app;
- QString usr, pass, comment, label;
+ TQString usr, pass, comment, label;
label = "Site:";
comment = "<b>localhost</b>";
int res = KIO::PasswordDialog::getNameAndPassword( usr, pass, 0L,
- QString::null, false,
- QString::null, comment,
+ TQString::null, false,
+ TQString::null, comment,
label );
- if ( res == QDialog::Accepted )
- KMessageBox::information( 0L, QString("You entered:\n"
+ if ( res == TQDialog::Accepted )
+ KMessageBox::information( 0L, TQString("You entered:\n"
" Username: %1\n"
" Password: %2").arg(usr).arg(pass),
"Test Result");
diff --git a/kio/tests/kioslavetest.cpp b/kio/tests/kioslavetest.cpp
index 8594586df..0db23457d 100644
--- a/kio/tests/kioslavetest.cpp
+++ b/kio/tests/kioslavetest.cpp
@@ -9,9 +9,9 @@
LGPL version 2.
*/
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qdir.h>
+#include <tqlayout.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
#include <kacl.h>
#include <kapplication.h>
@@ -28,16 +28,16 @@
using namespace KIO;
-KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr )
+KioslaveTest::KioslaveTest( TQString src, TQString dest, uint op, uint pr )
: KMainWindow(0, "")
{
job = 0L;
- main_widget = new QWidget( this, "");
- QBoxLayout *topLayout = new QVBoxLayout( main_widget, 10, 5 );
+ main_widget = new TQWidget( this, "");
+ TQBoxLayout *topLayout = new TQVBoxLayout( main_widget, 10, 5 );
- QGridLayout *grid = new QGridLayout( 2, 2, 10 );
+ TQGridLayout *grid = new TQGridLayout( 2, 2, 10 );
topLayout->addLayout( grid );
grid->setRowStretch(0,1);
@@ -46,68 +46,68 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr )
grid->setColStretch(0,1);
grid->setColStretch(1,100);
- lb_from = new QLabel( "From:", main_widget );
+ lb_from = new TQLabel( "From:", main_widget );
grid->addWidget( lb_from, 0, 0 );
- le_source = new QLineEdit( main_widget );
+ le_source = new TQLineEdit( main_widget );
grid->addWidget( le_source, 0, 1 );
le_source->setText( src );
- lb_to = new QLabel( "To:", main_widget );
+ lb_to = new TQLabel( "To:", main_widget );
grid->addWidget( lb_to, 1, 0 );
- le_dest = new QLineEdit( main_widget );
+ le_dest = new TQLineEdit( main_widget );
grid->addWidget( le_dest, 1, 1 );
le_dest->setText( dest );
// Operation groupbox & buttons
- opButtons = new QButtonGroup( "Operation", main_widget );
+ opButtons = new TQButtonGroup( "Operation", main_widget );
topLayout->addWidget( opButtons, 10 );
- connect( opButtons, SIGNAL(clicked(int)), SLOT(changeOperation(int)) );
+ connect( opButtons, TQT_SIGNAL(clicked(int)), TQT_SLOT(changeOperation(int)) );
- QBoxLayout *hbLayout = new QHBoxLayout( opButtons, 15 );
+ TQBoxLayout *hbLayout = new TQHBoxLayout( opButtons, 15 );
- rbList = new QRadioButton( "List", opButtons );
+ rbList = new TQRadioButton( "List", opButtons );
opButtons->insert( rbList, List );
hbLayout->addWidget( rbList, 5 );
- rbListRecursive = new QRadioButton( "ListRecursive", opButtons );
+ rbListRecursive = new TQRadioButton( "ListRecursive", opButtons );
opButtons->insert( rbListRecursive, ListRecursive );
hbLayout->addWidget( rbListRecursive, 5 );
- rbStat = new QRadioButton( "Stat", opButtons );
+ rbStat = new TQRadioButton( "Stat", opButtons );
opButtons->insert( rbStat, Stat );
hbLayout->addWidget( rbStat, 5 );
- rbGet = new QRadioButton( "Get", opButtons );
+ rbGet = new TQRadioButton( "Get", opButtons );
opButtons->insert( rbGet, Get );
hbLayout->addWidget( rbGet, 5 );
- rbPut = new QRadioButton( "Put", opButtons );
+ rbPut = new TQRadioButton( "Put", opButtons );
opButtons->insert( rbPut, Put );
hbLayout->addWidget( rbPut, 5 );
- rbCopy = new QRadioButton( "Copy", opButtons );
+ rbCopy = new TQRadioButton( "Copy", opButtons );
opButtons->insert( rbCopy, Copy );
hbLayout->addWidget( rbCopy, 5 );
- rbMove = new QRadioButton( "Move", opButtons );
+ rbMove = new TQRadioButton( "Move", opButtons );
opButtons->insert( rbMove, Move );
hbLayout->addWidget( rbMove, 5 );
- rbDelete = new QRadioButton( "Delete", opButtons );
+ rbDelete = new TQRadioButton( "Delete", opButtons );
opButtons->insert( rbDelete, Delete );
hbLayout->addWidget( rbDelete, 5 );
- rbShred = new QRadioButton( "Shred", opButtons );
+ rbShred = new TQRadioButton( "Shred", opButtons );
opButtons->insert( rbShred, Shred );
hbLayout->addWidget( rbShred, 5 );
- rbMkdir = new QRadioButton( "Mkdir", opButtons );
+ rbMkdir = new TQRadioButton( "Mkdir", opButtons );
opButtons->insert( rbMkdir, Mkdir );
hbLayout->addWidget( rbMkdir, 5 );
- rbMimetype = new QRadioButton( "Mimetype", opButtons );
+ rbMimetype = new TQRadioButton( "Mimetype", opButtons );
opButtons->insert( rbMimetype, Mimetype );
hbLayout->addWidget( rbMimetype, 5 );
@@ -115,21 +115,21 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr )
changeOperation( op );
// Progress groupbox & buttons
- progressButtons = new QButtonGroup( "Progress dialog mode", main_widget );
+ progressButtons = new TQButtonGroup( "Progress dialog mode", main_widget );
topLayout->addWidget( progressButtons, 10 );
- connect( progressButtons, SIGNAL(clicked(int)), SLOT(changeProgressMode(int)) );
+ connect( progressButtons, TQT_SIGNAL(clicked(int)), TQT_SLOT(changeProgressMode(int)) );
- hbLayout = new QHBoxLayout( progressButtons, 15 );
+ hbLayout = new TQHBoxLayout( progressButtons, 15 );
- rbProgressNone = new QRadioButton( "None", progressButtons );
+ rbProgressNone = new TQRadioButton( "None", progressButtons );
progressButtons->insert( rbProgressNone, ProgressNone );
hbLayout->addWidget( rbProgressNone, 5 );
- rbProgressDefault = new QRadioButton( "Default", progressButtons );
+ rbProgressDefault = new TQRadioButton( "Default", progressButtons );
progressButtons->insert( rbProgressDefault, ProgressDefault );
hbLayout->addWidget( rbProgressDefault, 5 );
- rbProgressStatus = new QRadioButton( "Status", progressButtons );
+ rbProgressStatus = new TQRadioButton( "Status", progressButtons );
progressButtons->insert( rbProgressStatus, ProgressStatus );
hbLayout->addWidget( rbProgressStatus, 5 );
@@ -141,23 +141,23 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr )
statusBar()->addWidget( statusProgress, 0, true );
// run & stop butons
- hbLayout = new QHBoxLayout( topLayout, 15 );
+ hbLayout = new TQHBoxLayout( topLayout, 15 );
- pbStart = new QPushButton( "&Start", main_widget );
+ pbStart = new TQPushButton( "&Start", main_widget );
pbStart->setFixedSize( pbStart->sizeHint() );
- connect( pbStart, SIGNAL(clicked()), SLOT(startJob()) );
+ connect( pbStart, TQT_SIGNAL(clicked()), TQT_SLOT(startJob()) );
hbLayout->addWidget( pbStart, 5 );
- pbStop = new QPushButton( "Sto&p", main_widget );
+ pbStop = new TQPushButton( "Sto&p", main_widget );
pbStop->setFixedSize( pbStop->sizeHint() );
pbStop->setEnabled( false );
- connect( pbStop, SIGNAL(clicked()), SLOT(stopJob()) );
+ connect( pbStop, TQT_SIGNAL(clicked()), TQT_SLOT(stopJob()) );
hbLayout->addWidget( pbStop, 5 );
// close button
- close = new QPushButton( "&Close", main_widget );
+ close = new TQPushButton( "&Close", main_widget );
close->setFixedSize( close->sizeHint() );
- connect(close, SIGNAL(clicked()), this, SLOT(slotQuit()));
+ connect(close, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotQuit()));
topLayout->addWidget( close, 5 );
@@ -166,14 +166,14 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr )
slave = 0;
// slave = KIO::Scheduler::getConnectedSlave(KURL("ftp://ftp.kde.org"));
- KIO::Scheduler::connect(SIGNAL(slaveConnected(KIO::Slave*)),
- this, SLOT(slotSlaveConnected()));
- KIO::Scheduler::connect(SIGNAL(slaveError(KIO::Slave*,int,const QString&)),
- this, SLOT(slotSlaveError()));
+ KIO::Scheduler::connect(TQT_SIGNAL(slaveConnected(KIO::Slave*)),
+ this, TQT_SLOT(slotSlaveConnected()));
+ KIO::Scheduler::connect(TQT_SIGNAL(slaveError(KIO::Slave*,int,const TQString&)),
+ this, TQT_SLOT(slotSlaveError()));
}
-void KioslaveTest::closeEvent( QCloseEvent * ){
+void KioslaveTest::closeEvent( TQCloseEvent * ){
slotQuit();
}
@@ -210,22 +210,22 @@ void KioslaveTest::changeProgressMode( int id ) {
void KioslaveTest::startJob() {
- QString sCurrent = QDir::currentDirPath()+"/";
+ TQString sCurrent = TQDir::currentDirPath()+"/";
KURL::encode_string(sCurrent);
- QString sSrc( le_source->text() );
+ TQString sSrc( le_source->text() );
KURL src( sCurrent, sSrc );
if ( !src.isValid() ) {
- QMessageBox::critical(this, "Kioslave Error Message", "Source URL is malformed" );
+ TQMessageBox::critical(this, "Kioslave Error Message", "Source URL is malformed" );
return;
}
- QString sDest( le_dest->text() );
+ TQString sDest( le_dest->text() );
KURL dest( sCurrent, sDest );
if ( !dest.isValid() &&
( selectedOperation == Copy || selectedOperation == Move ) ) {
- QMessageBox::critical(this, "Kioslave Error Message",
+ TQMessageBox::critical(this, "Kioslave Error Message",
"Destination URL is malformed" );
return;
}
@@ -242,14 +242,14 @@ void KioslaveTest::startJob() {
switch ( selectedOperation ) {
case List:
myJob = KIO::listDir( src );
- connect(myJob, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
- SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)));
+ connect(myJob, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
+ TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)));
break;
case ListRecursive:
myJob = KIO::listRecursive( src );
- connect(myJob, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
- SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)));
+ connect(myJob, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
+ TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)));
break;
case Stat:
@@ -258,15 +258,15 @@ void KioslaveTest::startJob() {
case Get:
myJob = KIO::get( src, true );
- connect(myJob, SIGNAL( data( KIO::Job*, const QByteArray &)),
- SLOT( slotData( KIO::Job*, const QByteArray &)));
+ connect(myJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray &)),
+ TQT_SLOT( slotData( KIO::Job*, const TQByteArray &)));
break;
case Put:
putBuffer = 0;
myJob = KIO::put( src, -1, true, false);
- connect(myJob, SIGNAL( dataReq( KIO::Job*, QByteArray &)),
- SLOT( slotDataReq( KIO::Job*, QByteArray &)));
+ connect(myJob, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray &)),
+ TQT_SLOT( slotDataReq( KIO::Job*, TQByteArray &)));
break;
case Copy:
@@ -300,11 +300,11 @@ void KioslaveTest::startJob() {
job = myJob;
}
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
- connect( job, SIGNAL( canceled( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( canceled( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
if (progressMode == ProgressStatus) {
statusProgress->setJob( job );
@@ -347,7 +347,7 @@ void KioslaveTest::slotSlaveError()
slave = 0;
}
-static void printACL( const QString& acl )
+static void printACL( const TQString& acl )
{
KACL kacl( acl );
kdDebug() << "According to KACL: " << endl << kacl.asString() << endl;
@@ -424,8 +424,8 @@ void KioslaveTest::slotEntries(KIO::Job* job, const KIO::UDSEntryList& list) {
kdDebug() << "" << ( *it2 ).m_str << endl;
else if ( (*it2).m_uds == UDS_EXTRA) {
Q_ASSERT( extraFieldsIt != extraFields.end() );
- QString column = (*extraFieldsIt).name;
- //QString type = (*extraFieldsIt).type;
+ TQString column = (*extraFieldsIt).name;
+ //TQString type = (*extraFieldsIt).type;
kdDebug() << " Extra data (" << column << ") :" << ( *it2 ).m_str << endl;
++extraFieldsIt;
}
@@ -433,7 +433,7 @@ void KioslaveTest::slotEntries(KIO::Job* job, const KIO::UDSEntryList& list) {
}
}
-void KioslaveTest::slotData(KIO::Job*, const QByteArray &data)
+void KioslaveTest::slotData(KIO::Job*, const TQByteArray &data)
{
if (data.size() == 0)
{
@@ -441,11 +441,11 @@ void KioslaveTest::slotData(KIO::Job*, const QByteArray &data)
}
else
{
- kdDebug(0) << "Data: \"" << QCString(data, data.size()+1) << "\"" << endl;
+ kdDebug(0) << "Data: \"" << TQCString(data, data.size()+1) << "\"" << endl;
}
}
-void KioslaveTest::slotDataReq(KIO::Job*, QByteArray &data)
+void KioslaveTest::slotDataReq(KIO::Job*, TQByteArray &data)
{
const char *fileDataArray[] =
{
@@ -500,13 +500,13 @@ int main(int argc, char **argv) {
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString src = args->getOption("src");
- QString dest = args->getOption("dest");
+ TQString src = args->getOption("src");
+ TQString dest = args->getOption("dest");
uint op = 0;
uint pr = 0;
- QString tmps;
+ TQString tmps;
tmps = args->getOption("operation");
if ( tmps == "list") {
diff --git a/kio/tests/kioslavetest.h b/kio/tests/kioslavetest.h
index 34cb00c15..02fae7f23 100644
--- a/kio/tests/kioslavetest.h
+++ b/kio/tests/kioslavetest.h
@@ -12,12 +12,12 @@
#ifndef _KIOSLAVETEST_H
#define _KIOSLAVETEST_H
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qbuttongroup.h>
-#include <qwidget.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqbuttongroup.h>
+#include <tqwidget.h>
#include <kmainwindow.h>
@@ -30,7 +30,7 @@ class KioslaveTest : public KMainWindow {
Q_OBJECT
public:
- KioslaveTest( QString src, QString dest, uint op, uint pr );
+ KioslaveTest( TQString src, TQString dest, uint op, uint pr );
~KioslaveTest() {}
enum Operations { List, ListRecursive, Stat, Get, Put, Copy, Move, Delete, Shred, Mkdir, Mimetype };
@@ -39,43 +39,43 @@ public:
protected:
- void closeEvent( QCloseEvent * );
+ void closeEvent( TQCloseEvent * );
void printUDSEntry( const KIO::UDSEntry & entry );
// info stuff
- QLabel *lb_from;
- QLineEdit *le_source;
+ TQLabel *lb_from;
+ TQLineEdit *le_source;
- QLabel *lb_to;
- QLineEdit *le_dest;
+ TQLabel *lb_to;
+ TQLineEdit *le_dest;
// operation stuff
- QButtonGroup *opButtons;
-
- QRadioButton *rbList;
- QRadioButton *rbListRecursive;
- QRadioButton *rbStat;
- QRadioButton *rbGet;
- QRadioButton *rbPut;
- QRadioButton *rbCopy;
- QRadioButton *rbMove;
- QRadioButton *rbDelete;
- QRadioButton *rbShred;
- QRadioButton *rbMkdir;
- QRadioButton *rbMimetype;
+ TQButtonGroup *opButtons;
+
+ TQRadioButton *rbList;
+ TQRadioButton *rbListRecursive;
+ TQRadioButton *rbStat;
+ TQRadioButton *rbGet;
+ TQRadioButton *rbPut;
+ TQRadioButton *rbCopy;
+ TQRadioButton *rbMove;
+ TQRadioButton *rbDelete;
+ TQRadioButton *rbShred;
+ TQRadioButton *rbMkdir;
+ TQRadioButton *rbMimetype;
// progress stuff
- QButtonGroup *progressButtons;
+ TQButtonGroup *progressButtons;
- QRadioButton *rbProgressNone;
- QRadioButton *rbProgressDefault;
- QRadioButton *rbProgressStatus;
+ TQRadioButton *rbProgressNone;
+ TQRadioButton *rbProgressDefault;
+ TQRadioButton *rbProgressStatus;
- QPushButton *pbStart;
- QPushButton *pbStop;
+ TQPushButton *pbStart;
+ TQPushButton *pbStop;
- QPushButton *close;
+ TQPushButton *close;
protected slots:
void changeOperation( int id );
@@ -86,8 +86,8 @@ protected slots:
void slotResult( KIO::Job * );
void slotEntries( KIO::Job *, const KIO::UDSEntryList& );
- void slotData( KIO::Job *, const QByteArray &data );
- void slotDataReq( KIO::Job *, QByteArray &data );
+ void slotData( KIO::Job *, const TQByteArray &data );
+ void slotDataReq( KIO::Job *, TQByteArray &data );
void slotQuit();
void slotSlaveConnected();
@@ -95,7 +95,7 @@ protected slots:
private:
KIO::Job *job;
- QWidget *main_widget;
+ TQWidget *main_widget;
KIO::StatusbarProgress *statusProgress;
diff --git a/kio/tests/kmfitest.cpp b/kio/tests/kmfitest.cpp
index c50b83b34..25e96759f 100644
--- a/kio/tests/kmfitest.cpp
+++ b/kio/tests/kmfitest.cpp
@@ -1,6 +1,6 @@
#include <stdio.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kinstance.h>
#include <kurl.h>
#include <kfilemetainfo.h>
@@ -16,12 +16,12 @@ int main (int argc, char **argv)
}
for (int i = 1; i < argc; i++) {
- QString file = QFile::decodeName(argv[i]);
+ TQString file = TQFile::decodeName(argv[i]);
qWarning("File: %s", file.local8Bit().data());
KMimeType::Ptr p;
p = KMimeType::findByPath(file);
qWarning("Mime type (findByPath): %s", p->name().latin1());
- KFileMetaInfo meta(file, QString::null, KFileMetaInfo::TechnicalInfo | KFileMetaInfo::ContentInfo);
+ KFileMetaInfo meta(file, TQString::null, KFileMetaInfo::TechnicalInfo | KFileMetaInfo::ContentInfo);
}
return 0;
diff --git a/kio/tests/kmimefromext.cpp b/kio/tests/kmimefromext.cpp
index e867d4822..248407f95 100644
--- a/kio/tests/kmimefromext.cpp
+++ b/kio/tests/kmimefromext.cpp
@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
KApplication app;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString fileName = args->arg( 0 );
+ TQString fileName = args->arg( 0 );
// The "true" here means only the filename will be looked at.
// "Mime-magic" will not interfer. The file doesn't exist.
diff --git a/kio/tests/kmimemagictest.cpp b/kio/tests/kmimemagictest.cpp
index 9f3f5bb2b..eb01137c9 100644
--- a/kio/tests/kmimemagictest.cpp
+++ b/kio/tests/kmimemagictest.cpp
@@ -32,7 +32,7 @@ int main( int argc, char** argv )
}
KInstance blah("kmimemagictest");
- QString file = QString::fromLocal8Bit( argv[1] );
+ TQString file = TQString::fromLocal8Bit( argv[1] );
KMimeMagicResult * result = KMimeMagic::self()->findFileType( file );
diff --git a/kio/tests/kmimetypetest.cpp b/kio/tests/kmimetypetest.cpp
index b95f1ceea..1856e6036 100644
--- a/kio/tests/kmimetypetest.cpp
+++ b/kio/tests/kmimetypetest.cpp
@@ -20,14 +20,14 @@
#include <kinstance.h>
#include <ktempdir.h>
#include <kprotocolinfo.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
-static void checkIcon( const KURL& url, const QString& expectedIcon )
+static void checkIcon( const KURL& url, const TQString& expectedIcon )
{
- QString icon = KMimeType::iconForURL( url );
+ TQString icon = KMimeType::iconForURL( url );
if ( icon == expectedIcon )
qDebug( "icon for %s is %s, OK", url.prettyURL().latin1(), icon.latin1() );
else {
@@ -45,32 +45,32 @@ int main( int argc, char** argv )
KURL url;
// safely check a "regular" folder
- url.setPath( QDir::homeDirPath() );
+ url.setPath( TQDir::homeDirPath() );
checkIcon( url, "folder" );
// safely check a non-readable folder
if (0 != geteuid()) { // can't do this test if we're root
- KTempDir tmp( QString::null, 0 );
+ KTempDir tmp( TQString::null, 0 );
tmp.setAutoDelete( true );
url.setPath( tmp.name() );
checkIcon( url, "folder_locked" );
- chmod( QFile::encodeName( tmp.name() ), 0500 ); // so we can 'rm -rf' it
+ chmod( TQFile::encodeName( tmp.name() ), 0500 ); // so we can 'rm -rf' it
}
// safely check the trash folder
- if ( KProtocolInfo::isKnownProtocol( QString("trash") ) ) {
+ if ( KProtocolInfo::isKnownProtocol( TQString("trash") ) ) {
checkIcon( "trash:/", "trashcan_full" ); // #100321
checkIcon( "trash:/foo/", "folder" );
}
- QString pdf;
+ TQString pdf;
KMimeType::diagnoseFileName("foo.pdf", pdf);
qDebug("extension: '%s'", pdf.latin1());
- assert(pdf == QString("*.pdf"));
- QString ps;
+ assert(pdf == TQString("*.pdf"));
+ TQString ps;
KMimeType::diagnoseFileName("foo.ps", ps);
qDebug("extension: '%s'", ps.latin1());
- assert(ps == QString("*.ps"));
+ assert(ps == TQString("*.ps"));
return 0;
}
diff --git a/kio/tests/kprotocolinfotest.cpp b/kio/tests/kprotocolinfotest.cpp
index 64ec617f6..b0fe392f2 100644
--- a/kio/tests/kprotocolinfotest.cpp
+++ b/kio/tests/kprotocolinfotest.cpp
@@ -47,11 +47,11 @@ int main(int argc, char **argv) {
assert( KProtocolInfo::showFilePreview( "audiocd" ) == false );
assert( KGlobalSettings::showFilePreview( "audiocd:/" ) == false );
- QString proxy;
- QString protocol = KProtocolManager::slaveProtocol( "http://bugs.kde.org", proxy );
+ TQString proxy;
+ TQString protocol = KProtocolManager::slaveProtocol( "http://bugs.kde.org", proxy );
assert( protocol == "http" );
- QStringList capabilities = KProtocolInfo::capabilities( "imap" );
+ TQStringList capabilities = KProtocolInfo::capabilities( "imap" );
kdDebug() << "kio_imap capabilities: " << capabilities << endl;
//assert(capabilities.contains("ACL"));
diff --git a/kio/tests/kruntest.cpp b/kio/tests/kruntest.cpp
index 92c0a3af3..10dbc9b71 100644
--- a/kio/tests/kruntest.cpp
+++ b/kio/tests/kruntest.cpp
@@ -27,9 +27,9 @@
#include <kservice.h>
#include <kde_file.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qdir.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqdir.h>
#include <stdlib.h>
#include <unistd.h>
@@ -39,7 +39,7 @@ const int MAXKRUNS = 100;
testKRun * myArray[MAXKRUNS];
-void testKRun::foundMimeType( const QString& _type )
+void testKRun::foundMimeType( const TQString& _type )
{
kdDebug() << "testKRun::foundMimeType " << _type << endl;
kdDebug() << "testKRun::foundMimeType URL=" << m_strURL.url() << endl;
@@ -50,15 +50,15 @@ void testKRun::foundMimeType( const QString& _type )
Receiver::Receiver()
{
- QVBoxLayout *lay = new QVBoxLayout(this);
+ TQVBoxLayout *lay = new TQVBoxLayout(this);
lay->setAutoAdd(true);
- QPushButton * h = new QPushButton( "Press here to terminate", this );
- start = new QPushButton( "Launch KRuns", this );
- stop = new QPushButton( "Stop those KRuns", this );
+ TQPushButton * h = new TQPushButton( "Press here to terminate", this );
+ start = new TQPushButton( "Launch KRuns", this );
+ stop = new TQPushButton( "Stop those KRuns", this );
stop->setEnabled(false);
- QObject::connect( h, SIGNAL(clicked()), kapp, SLOT(quit()) );
- QObject::connect( start, SIGNAL(clicked()), this, SLOT(slotStart()) );
- QObject::connect( stop, SIGNAL(clicked()), this, SLOT(slotStop()) );
+ TQObject::connect( h, TQT_SIGNAL(clicked()), kapp, TQT_SLOT(quit()) );
+ TQObject::connect( start, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStart()) );
+ TQObject::connect( stop, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStop()) );
adjustSize();
show();
@@ -87,12 +87,12 @@ void Receiver::slotStart()
stop->setEnabled(true);
}
-void check(QString txt, QString a, QString b)
+void check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b)
kdDebug() << txt << " : '" << a << "' - ok" << endl;
else {
@@ -103,15 +103,15 @@ void check(QString txt, QString a, QString b)
const char *bt(bool tr) { return tr?"true":"false"; }
-void checkBN(QString a, bool tr, QString b)
+void checkBN(TQString a, bool tr, TQString b)
{
- check( QString().sprintf("binaryName('%s', %s)", a.latin1(), bt(tr)), KRun::binaryName(a, tr), b);
+ check( TQString().sprintf("binaryName('%s', %s)", a.latin1(), bt(tr)), KRun::binaryName(a, tr), b);
}
-void checkPDE(const KService &service, const KURL::List &urls, bool hs, bool tf, QString b)
+void checkPDE(const KService &service, const KURL::List &urls, bool hs, bool tf, TQString b)
{
check(
- QString().sprintf("processDesktopExec( "
+ TQString().sprintf("processDesktopExec( "
"service = {\nexec = %s\nterminal = %s, terminalOptions = %s\nsubstituteUid = %s, user = %s },"
"\nURLs = { %s },\nhas_shell = %s, temp_files = %s )",
service.exec().latin1(), bt(service.terminal()), service.terminalOptions().latin1(), bt(service.substituteUid()), service.username().latin1(),
@@ -174,7 +174,7 @@ int main(int argc, char **argv)
"%s\n%s\n%s\n",execs[ex],terms[te],sus[su]);
close(fd);
fclose(f);
- KService s(QDir::currentDirPath() + "/kruntest.desktop");
+ KService s(TQDir::currentDirPath() + "/kruntest.desktop");
unlink("kruntest.desktop");
checkPDE( s, l0, hs, false, rslts[ex+te*2+su*4+hs*8]);
}
diff --git a/kio/tests/kruntest.h b/kio/tests/kruntest.h
index e1bb92729..3df8e1ac5 100644
--- a/kio/tests/kruntest.h
+++ b/kio/tests/kruntest.h
@@ -21,7 +21,7 @@
#include <krun.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class testKRun : public KRun
{
@@ -34,7 +34,7 @@ public:
virtual ~testKRun() {}
- virtual void foundMimeType( const QString& _type );
+ virtual void foundMimeType( const TQString& _type );
};
@@ -50,8 +50,8 @@ public slots:
void slotStart();
void slotStop();
private:
- QPushButton * start;
- QPushButton * stop;
+ TQPushButton * start;
+ TQPushButton * stop;
};
diff --git a/kio/tests/kshredtest.cpp b/kio/tests/kshredtest.cpp
index 3bd7ae189..76e87fca4 100644
--- a/kio/tests/kshredtest.cpp
+++ b/kio/tests/kshredtest.cpp
@@ -21,7 +21,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "kshred.h"
-#include <qstring.h>
+#include <tqstring.h>
int main(int argc, char **argv)
diff --git a/kio/tests/ksycocatest.cpp b/kio/tests/ksycocatest.cpp
index fe2c22d94..4a4fcabb0 100644
--- a/kio/tests/ksycocatest.cpp
+++ b/kio/tests/ksycocatest.cpp
@@ -33,12 +33,12 @@
#include <stdio.h>
#include <stdlib.h>
-bool check(QString txt, QString a, QString b)
+bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -50,7 +50,7 @@ bool check(QString txt, QString a, QString b)
return true;
}
-void debug(QString txt)
+void debug(TQString txt)
{
fprintf(stderr, "%s\n", txt.ascii());
}
@@ -69,8 +69,8 @@ int main(int argc, char *argv[])
{
KApplication k(argc,argv,"whatever",false/*noGUI*/); // KMessageBox needs KApp for makeStdCaption
- QCString instname = "kword";
- QString desktopPath = QString::fromLatin1( "Office/%1.desktop" ).arg( instname );
+ TQCString instname = "kword";
+ TQString desktopPath = TQString::fromLatin1( "Office/%1.desktop" ).arg( instname );
qDebug( "Looking for %s", desktopPath.latin1() );
KService::Ptr service = KService::serviceByDesktopPath( desktopPath );
if ( service )
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
if ( s1 )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(s1->comment(KURL(),false)));
+ debug(TQString("Comment is %1").arg(s1->comment(KURL(),false)));
}
else
{
@@ -103,7 +103,7 @@ int main(int argc, char *argv[])
if ( s0 )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(s0->comment(KURL(),false)));
+ debug(TQString("Comment is %1").arg(s0->comment(KURL(),false)));
}
else
{
@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
if ( se )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(se->comment()));
+ debug(TQString("Comment is %1").arg(se->comment()));
}
else
{
@@ -128,10 +128,10 @@ int main(int argc, char *argv[])
if ( se )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(se->comment()));
- QVariant qv = se->property("DocPath");
- debug(QString("Property type is %1").arg(qv.typeName()));
- debug(QString("Property value is %1").arg(qv.toString()));
+ debug(TQString("Comment is %1").arg(se->comment()));
+ TQVariant qv = se->property("DocPath");
+ debug(TQString("Property type is %1").arg(qv.typeName()));
+ debug(TQString("Property value is %1").arg(qv.toString()));
}
else
{
@@ -143,7 +143,7 @@ int main(int argc, char *argv[])
if ( se )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(se->comment()));
+ debug(TQString("Comment is %1").arg(se->comment()));
}
else
{
@@ -155,7 +155,7 @@ int main(int argc, char *argv[])
if ( se )
{
debug("Found it !");
- debug(QString("Comment is %1").arg(se->comment()));
+ debug(TQString("Comment is %1").arg(se->comment()));
}
else
{
@@ -165,7 +165,7 @@ int main(int argc, char *argv[])
#if 1
debug("Querying userprofile for services associated with text/plain");
KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers("text/plain");
- debug(QString("got %1 offers").arg(offers.count()));
+ debug(TQString("got %1 offers").arg(offers.count()));
KServiceTypeProfile::OfferList::Iterator it = offers.begin();
for ( ; it != offers.end() ; it++ )
{
@@ -174,7 +174,7 @@ int main(int argc, char *argv[])
debug("Querying userprofile for services associated with KOfficeFilter");
offers = KServiceTypeProfile::offers("KOfficeFilter");
- debug(QString("got %1 offers").arg(offers.count()));
+ debug(TQString("got %1 offers").arg(offers.count()));
it = offers.begin();
for ( ; it != offers.end() ; it++ )
{
@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
debug("Querying trader for Konqueror/Plugin");
KTrader::OfferList traderoffers = KTrader::self()->query("Konqueror/Plugin");
- debug(QString("got %1 offers").arg(traderoffers.count()));
+ debug(TQString("got %1 offers").arg(traderoffers.count()));
KTrader::OfferList::Iterator trit = traderoffers.begin();
for ( ; trit != traderoffers.end() ; trit++ )
{
@@ -201,7 +201,7 @@ int main(int argc, char *argv[])
//
debug("\nTrying findByURL for folder_home.png");
- QString fh;
+ TQString fh;
(void)k.iconLoader()->loadIcon("folder_home.png",KIcon::Desktop,0,KIcon::DefaultState,&fh);
mf = KMimeType::findByURL( fh, 0, true, false );
assert( mf );
@@ -211,8 +211,8 @@ int main(int argc, char *argv[])
//debug("\nTrying findByURL for Makefile.am");
//mf = KMimeType::findByURL( KURL("/tmp/Makefile.am"), 0, true, false );
//assert( mf );
- //debug(QString("Name is %1").arg(mf->name()));
- //debug(QString("Comment is %1").arg(mf->comment(KURL(),false)));
+ //debug(TQString("Name is %1").arg(mf->name()));
+ //debug(TQString("Comment is %1").arg(mf->comment(KURL(),false)));
debug("\nTrying findByURL for man:/ls");
mf = KMimeType::findByURL( KURL("man:/ls") );
@@ -228,17 +228,17 @@ int main(int argc, char *argv[])
mtl = KMimeType::allMimeTypes( );
assert( mtl.count() );
- debug(QString("Found %1 mime types.").arg(mtl.count()));
+ debug(TQString("Found %1 mime types.").arg(mtl.count()));
for(int i = 0; i < (int)mtl.count(); i++)
{
- debug(QString("Mime type %1: %2.").arg(i).arg(mtl[i]->name()));
+ debug(TQString("Mime type %1: %2.").arg(i).arg(mtl[i]->name()));
}
KService::List sl;
sl = KService::allServices( );
assert( sl.count() );
- debug(QString("Found %1 services.").arg(sl.count()));
+ debug(TQString("Found %1 services.").arg(sl.count()));
KServiceGroup::Ptr root = KServiceGroup::root();
KServiceGroup::List list = root->entries();
@@ -248,7 +248,7 @@ int main(int argc, char *argv[])
KServiceGroup::Ptr first;
- debug(QString("Found %1 entries").arg(list.count()));
+ debug(TQString("Found %1 entries").arg(list.count()));
for( KServiceGroup::List::ConstIterator it = list.begin();
it != list.end(); it++)
{
@@ -262,7 +262,7 @@ int main(int argc, char *argv[])
else if (p->isType(KST_KServiceGroup))
{
KServiceGroup *serviceGroup = static_cast<KServiceGroup *>(p);
- debug(QString(" %1 -->").arg(serviceGroup->caption()));
+ debug(TQString(" %1 -->").arg(serviceGroup->caption()));
if (!first) first = serviceGroup;
}
else
@@ -274,7 +274,7 @@ int main(int argc, char *argv[])
if (first)
{
list = first->entries();
- debug(QString("Found %1 entries").arg(list.count()));
+ debug(TQString("Found %1 entries").arg(list.count()));
for( KServiceGroup::List::ConstIterator it = list.begin();
it != list.end(); it++)
{
@@ -282,12 +282,12 @@ int main(int argc, char *argv[])
if (p->isType(KST_KService))
{
KService *service = static_cast<KService *>(p);
- debug(QString(" %1").arg(service->name()));
+ debug(TQString(" %1").arg(service->name()));
}
else if (p->isType(KST_KServiceGroup))
{
KServiceGroup *serviceGroup = static_cast<KServiceGroup *>(p);
- debug(QString(" %1 -->").arg(serviceGroup->caption()));
+ debug(TQString(" %1 -->").arg(serviceGroup->caption()));
}
else
{
@@ -307,8 +307,8 @@ int main(int argc, char *argv[])
debug("--End of list--");
debug("--protocols--");
- QStringList stringL = KProtocolInfo::protocols();
- for( QStringList::ConstIterator it = stringL.begin();
+ TQStringList stringL = KProtocolInfo::protocols();
+ for( TQStringList::ConstIterator it = stringL.begin();
it != stringL.end(); it++)
{
debug((*it).ascii());
@@ -319,38 +319,38 @@ int main(int argc, char *argv[])
#if 0
KImageIO::registerFormats();
- QStringList types;
+ TQStringList types;
types = KImageIO::types(KImageIO::Reading);
debug("Can read:");
- for(QStringList::ConstIterator it = types.begin();
+ for(TQStringList::ConstIterator it = types.begin();
it != types.end(); ++it)
- debug(QString(" %1").arg((*it)));
+ debug(TQString(" %1").arg((*it)));
types = KImageIO::types(KImageIO::Writing);
debug("Can write:");
- for(QStringList::ConstIterator it = types.begin();
+ for(TQStringList::ConstIterator it = types.begin();
it != types.end(); ++it)
- debug(QString(" %1").arg((*it)));
+ debug(TQString(" %1").arg((*it)));
- QString rPattern = KImageIO::pattern( KImageIO::Reading );
+ TQString rPattern = KImageIO::pattern( KImageIO::Reading );
debug("Read pattern:\n%s", rPattern.ascii());
- QString wPattern = KImageIO::pattern( KImageIO::Writing );
+ TQString wPattern = KImageIO::pattern( KImageIO::Writing );
debug("Write pattern:\n%s", wPattern.ascii());
- QString suffix = KImageIO::suffix("JPEG");
+ TQString suffix = KImageIO::suffix("JPEG");
debug("Standard suffix for JPEG: %s", suffix.ascii());
types = KImageIO::mimeTypes(KImageIO::Reading);
debug("Can read (mimetypes):");
- for(QStringList::ConstIterator it = types.begin();
+ for(TQStringList::ConstIterator it = types.begin();
it != types.end(); ++it)
debug(" %s", (*it).ascii());
types = KImageIO::mimeTypes(KImageIO::Writing);
debug("Can write (mimetypes):");
- for(QStringList::ConstIterator it = types.begin();
+ for(TQStringList::ConstIterator it = types.begin();
it != types.end(); ++it)
debug(" %s", (*it).ascii());
diff --git a/kio/tests/ktartest.cpp b/kio/tests/ktartest.cpp
index 055d016a7..5fe4a4f1f 100644
--- a/kio/tests/ktartest.cpp
+++ b/kio/tests/ktartest.cpp
@@ -19,14 +19,14 @@
#include "ktar.h"
#include <stdio.h>
#include <kinstance.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <assert.h>
-void recursive_print( const KTarDirectory * dir, const QString & path )
+void recursive_print( const KTarDirectory * dir, const TQString & path )
{
- QStringList l = dir->entries();
- QStringList::Iterator it = l.begin();
+ TQStringList l = dir->entries();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
const KTarEntry* entry = dir->entry( (*it) );
@@ -51,7 +51,7 @@ int main( int argc, char** argv )
return 1;
}
KInstance instance("ktartest");
- QString command = argv[1];
+ TQString command = argv[1];
if ( command == "list" )
{
KTarGz tar( argv[2] );
@@ -120,9 +120,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KTarFile* f = (KTarFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
tar.close();
@@ -143,7 +143,7 @@ int main( int argc, char** argv )
// implementation fares
for (int i = 98; i < 514 ; i++ )
{
- QString str, num;
+ TQString str, num;
str.fill( 'a', i-10 );
num.setNum( i );
num = num.rightJustify( 10, '0' );
@@ -165,9 +165,9 @@ int main( int argc, char** argv )
const KTarEntry* entry = dir->entry( "my/dir/test3" );
if ( entry && entry->isFile() )
{
- QIODevice *dev = static_cast<const KTarFile *>(entry)->device();
- QByteArray contents = dev->readAll();
- printf("contents='%s'\n", QCString(contents, contents.size()+1 ).data());
+ TQIODevice *dev = static_cast<const KTarFile *>(entry)->device();
+ TQByteArray contents = dev->readAll();
+ printf("contents='%s'\n", TQCString(contents, contents.size()+1 ).data());
} else
printf("entry=%p - not found if 0, otherwise not a file\n", (void*)entry);
return 0;
diff --git a/kio/tests/ktradertest.cpp b/kio/tests/ktradertest.cpp
index 28d3730d6..34ce8e3bc 100644
--- a/kio/tests/ktradertest.cpp
+++ b/kio/tests/ktradertest.cpp
@@ -44,18 +44,18 @@ int main( int argc, char **argv )
if ( args->count() < 1 )
KCmdLineArgs::usage();
- QString query = QString::fromLocal8Bit( args->arg( 0 ) );
+ TQString query = TQString::fromLocal8Bit( args->arg( 0 ) );
- QString genericServiceType, constraint, preference;
+ TQString genericServiceType, constraint, preference;
if ( args->count() >= 2 )
- genericServiceType = QString::fromLocal8Bit( args->arg( 1 ) );
+ genericServiceType = TQString::fromLocal8Bit( args->arg( 1 ) );
if ( args->count() >= 3 )
- constraint = QString::fromLocal8Bit( args->arg( 2 ) );
+ constraint = TQString::fromLocal8Bit( args->arg( 2 ) );
if ( args->count() == 4 )
- preference = QString::fromLocal8Bit( args->arg( 3 ) );
+ preference = TQString::fromLocal8Bit( args->arg( 3 ) );
printf( "query is : %s\n", query.local8Bit().data() );
printf( "genericServiceType is : %s\n", genericServiceType.local8Bit().data() );
@@ -72,12 +72,12 @@ int main( int argc, char **argv )
for (; it != end; ++it, ++i )
{
printf("---- Offer %d ----\n", i);
- QStringList props = (*it)->propertyNames();
- QStringList::ConstIterator propIt = props.begin();
- QStringList::ConstIterator propEnd = props.end();
+ TQStringList props = (*it)->propertyNames();
+ TQStringList::ConstIterator propIt = props.begin();
+ TQStringList::ConstIterator propEnd = props.end();
for (; propIt != propEnd; ++propIt )
{
- QVariant prop = (*it)->property( *propIt );
+ TQVariant prop = (*it)->property( *propIt );
if ( !prop.isValid() )
{
@@ -85,15 +85,15 @@ int main( int argc, char **argv )
continue;
}
- QString outp = *propIt;
+ TQString outp = *propIt;
outp += " : '";
switch ( prop.type() )
{
- case QVariant::StringList:
+ case TQVariant::StringList:
outp += prop.toStringList().join(" - ");
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
outp += prop.toBool() ? "TRUE" : "FALSE";
break;
default:
diff --git a/kio/tests/kurifiltertest.cpp b/kio/tests/kurifiltertest.cpp
index 9a041e28f..8e4b023cb 100644
--- a/kio/tests/kurifiltertest.cpp
+++ b/kio/tests/kurifiltertest.cpp
@@ -29,23 +29,23 @@
#include <kstandarddirs.h>
#include <ksimpleconfig.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kio/netaccess.h>
static const char * const s_uritypes[] = { "NET_PROTOCOL", "LOCAL_FILE", "LOCAL_DIR", "EXECUTABLE", "HELP", "SHELL", "BLOCKED", "ERROR", "UNKNOWN" };
#define NO_FILTERING -2
-void filter( const char* u, const char * expectedResult = 0, int expectedUriType = -1, QStringList list = QStringList(), const char * abs_path = 0, bool checkForExecutables = true )
+void filter( const char* u, const char * expectedResult = 0, int expectedUriType = -1, TQStringList list = TQStringList(), const char * abs_path = 0, bool checkForExecutables = true )
{
- QString a = QString::fromUtf8( u );
+ TQString a = TQString::fromUtf8( u );
KURIFilterData * m_filterData = new KURIFilterData;
m_filterData->setData( a );
m_filterData->setCheckForExecutables( checkForExecutables );
if( abs_path )
{
- m_filterData->setAbsolutePath( QString::fromLatin1( abs_path ) );
+ m_filterData->setAbsolutePath( TQString::fromLatin1( abs_path ) );
kdDebug() << "Filtering: " << a << " with abs_path=" << abs_path << endl;
}
else
@@ -54,7 +54,7 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType
if (KURIFilter::self()->filterURI(*m_filterData, list))
{
// Copied from minicli...
- QString cmd;
+ TQString cmd;
KURL uri = m_filterData->uri();
if ( uri.isLocalFile() && !uri.hasRef() && uri.query().isEmpty() )
@@ -97,8 +97,8 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType
if ( expectedResult )
{
// Hack for other locales than english, normalize google hosts to google.com
- cmd = cmd.replace( QRegExp( "www\\.google\\.[^/]*/" ), "www.google.com/" );
- if ( cmd != QString::fromLatin1( expectedResult ) )
+ cmd = cmd.replace( TQRegExp( "www\\.google\\.[^/]*/" ), "www.google.com/" );
+ if ( cmd != TQString::fromLatin1( expectedResult ) )
{
kdError() << " Got " << cmd << " expected " << expectedResult << endl;
::exit(1);
@@ -125,13 +125,13 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType
kdDebug() << "-----" << endl;
}
-void testLocalFile( const QString& filename )
+void testLocalFile( const TQString& filename )
{
- QFile tmpFile( filename ); // Yeah, I know, security risk blah blah. This is a test prog!
+ TQFile tmpFile( filename ); // Yeah, I know, security risk blah blah. This is a test prog!
if ( tmpFile.open( IO_ReadWrite ) )
{
- QCString fname = QFile::encodeName( tmpFile.name() );
+ TQCString fname = TQFile::encodeName( tmpFile.name() );
filter(fname, fname, KURIFilterData::LOCAL_FILE);
tmpFile.close();
tmpFile.remove();
@@ -155,7 +155,7 @@ int main(int argc, char **argv)
{
// Ensure that user configuration doesn't change the results of those tests
// KDEHOME needs to be writable though, for a ksycoca database
- setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kde-kurifiltertest" ), true );
+ setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kde-kurifiltertest" ), true );
setenv( "KDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup
KAboutData aboutData(appName, programName, version, description);
@@ -187,7 +187,7 @@ int main(int argc, char **argv)
cfg.sync();
}
- QStringList minicliFilters;
+ TQStringList minicliFilters;
minicliFilters << "kshorturifilter" << "kurisearchfilter" << "localdomainurifilter";
// URI that should require no filtering
@@ -241,8 +241,8 @@ int main(int argc, char **argv)
filter( "/", "/", KURIFilterData::LOCAL_DIR );
filter( "/", "/", KURIFilterData::LOCAL_DIR, "kshorturifilter" );
- filter( "~/.bashrc", QDir::homeDirPath().local8Bit()+"/.bashrc", KURIFilterData::LOCAL_FILE, "kshorturifilter" );
- filter( "~", QDir::homeDirPath().local8Bit(), KURIFilterData::LOCAL_DIR, "kshorturifilter", "/tmp" );
+ filter( "~/.bashrc", TQDir::homeDirPath().local8Bit()+"/.bashrc", KURIFilterData::LOCAL_FILE, "kshorturifilter" );
+ filter( "~", TQDir::homeDirPath().local8Bit(), KURIFilterData::LOCAL_DIR, "kshorturifilter", "/tmp" );
filter( "~foobar", 0, KURIFilterData::ERROR, "kshorturifilter" );
filter( "user@host.domain", "mailto:user@host.domain", KURIFilterData::NET_PROTOCOL ); // new in KDE-3.2
@@ -270,7 +270,7 @@ int main(int argc, char **argv)
// a search using the default search engine
// 'ls' is a bit of a special case though, due to the toplevel domain called 'ls'
filter( "cp", "http://www.google.com/search?q=cp&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL,
- QStringList(), 0, false /* don't check for executables, see konq_misc.cc */ );
+ TQStringList(), 0, false /* don't check for executables, see konq_misc.cc */ );
// Executable tests - No IKWS in minicli
filter( "cp", "cp", KURIFilterData::EXECUTABLE, minicliFilters );
@@ -288,13 +288,13 @@ int main(int argc, char **argv)
setenv( "SOMEVAR", "/somevar", 0 );
setenv( "ETC", "/etc", 0 );
- QCString qtdir=getenv("QTDIR");
- QCString home = getenv("HOME");
- QCString kdehome = getenv("KDEHOME");
+ TQCString qtdir=getenv("QTDIR");
+ TQCString home = getenv("HOME");
+ TQCString kdehome = getenv("KDEHOME");
filter( "$SOMEVAR/kdelibs/kio", 0, KURIFilterData::ERROR ); // note: this dir doesn't exist...
filter( "$ETC/passwd", "/etc/passwd", KURIFilterData::LOCAL_FILE );
- filter( "$QTDIR/doc/html/functions.html#s", QCString("file://")+qtdir+"/doc/html/functions.html#s", KURIFilterData::LOCAL_FILE );
+ filter( "$QTDIR/doc/html/functions.html#s", TQCString("file://")+qtdir+"/doc/html/functions.html#s", KURIFilterData::LOCAL_FILE );
filter( "http://www.kde.org/$USER", "http://www.kde.org/$USER", KURIFilterData::NET_PROTOCOL ); // no expansion
// Assume the default (~/.kde) if
@@ -337,7 +337,7 @@ int main(int argc, char **argv)
filter( "$HOME", home, KURIFilterData::LOCAL_DIR, "kshorturifilter" ); //use specific filter.
- QCString sc;
+ TQCString sc;
filter( sc.sprintf("gg%cfoo bar",delimiter), "http://www.google.com/search?q=foo+bar&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL );
filter( sc.sprintf("bug%c55798", delimiter), "http://bugs.kde.org/show_bug.cgi?id=55798", KURIFilterData::NET_PROTOCOL );
diff --git a/kio/tests/kurlcompletiontest.cpp b/kio/tests/kurlcompletiontest.cpp
index ac0108ead..612dab558 100644
--- a/kio/tests/kurlcompletiontest.cpp
+++ b/kio/tests/kurlcompletiontest.cpp
@@ -19,9 +19,9 @@
#include <kapplication.h>
#include <kurlcompletion.h>
#include <kdebug.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <assert.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ktempdir.h>
#include <kcmdlineargs.h>
#include <unistd.h>
@@ -42,7 +42,7 @@ private:
KURLCompletion* m_completion;
KTempDir* m_tempDir;
KURL m_dirURL;
- QString m_dir;
+ TQString m_dir;
};
void KURLCompletionTest::setup( bool setDirAsURL )
@@ -62,12 +62,12 @@ void KURLCompletionTest::setup( bool setDirAsURL )
}
m_dirURL.setPath( m_dir );
- QFile f1( m_dir + "/file1" );
+ TQFile f1( m_dir + "/file1" );
bool ok = f1.open( IO_WriteOnly );
assert( ok );
f1.close();
- QFile f2( m_dir + "/file#a" );
+ TQFile f2( m_dir + "/file#a" );
ok = f2.open( IO_WriteOnly );
assert( ok );
f2.close();
@@ -94,22 +94,22 @@ void KURLCompletionTest::testLocalRelativePath()
// Completion from relative path, with two matches
m_completion->makeCompletion( "f" );
waitForCompletion();
- QStringList comp1all = m_completion->allMatches();
+ TQStringList comp1all = m_completion->allMatches();
assert( comp1all.count() == 2 );
assert( comp1all.find( "file1" ) != comp1all.end() );
assert( comp1all.find( "file#a" ) != comp1all.end() );
- QString comp1 = m_completion->replacedPath( "file1" ); // like KURLRequester does
+ TQString comp1 = m_completion->replacedPath( "file1" ); // like KURLRequester does
assert( comp1 == "file1" );
// Completion from relative path
kdDebug() << endl << k_funcinfo << "now completing on 'file#'" << endl;
m_completion->makeCompletion( "file#" );
waitForCompletion();
- QStringList compall = m_completion->allMatches();
+ TQStringList compall = m_completion->allMatches();
kdDebug() << compall << endl;
assert( compall.count() == 1 );
assert( compall.first() == "file#a" );
- QString comp2 = m_completion->replacedPath( compall.first() ); // like KURLRequester does
+ TQString comp2 = m_completion->replacedPath( compall.first() ); // like KURLRequester does
assert( comp2 == "file#a" );
}
@@ -119,10 +119,10 @@ void KURLCompletionTest::testLocalAbsolutePath()
kdDebug() << k_funcinfo << m_dir+"file#" << endl;
m_completion->makeCompletion( m_dir + "file#" );
waitForCompletion();
- QStringList compall = m_completion->allMatches();
+ TQStringList compall = m_completion->allMatches();
kdDebug() << compall << endl;
assert( compall.count() == 1 );
- QString comp = compall.first();
+ TQString comp = compall.first();
assert( comp == m_dir + "file#a" );
comp = m_completion->replacedPath( comp ); // like KURLRequester does
assert( comp == m_dir + "file#a" );
@@ -135,20 +135,20 @@ void KURLCompletionTest::testLocalURL()
KURL url = KURL::fromPathOrURL( m_dirURL.path() + "file" );
m_completion->makeCompletion( url.prettyURL() );
waitForCompletion();
- QStringList comp1all = m_completion->allMatches();
+ TQStringList comp1all = m_completion->allMatches();
kdDebug() << comp1all << endl;
assert( comp1all.count() == 2 );
assert( comp1all.find( m_dirURL.url() + "file1" ) != comp1all.end() );
- QString filehash = m_dirURL.url() + "file%23a";
+ TQString filehash = m_dirURL.url() + "file%23a";
assert( comp1all.find( filehash ) != comp1all.end() );
- QString filehashPath = m_completion->replacedPath( filehash ); // note that it returns a path!!
+ TQString filehashPath = m_completion->replacedPath( filehash ); // note that it returns a path!!
kdDebug() << filehashPath << endl;
assert( filehashPath == m_dirURL.path() + "file#a" );
// Completion from URL with no match
url = KURL::fromPathOrURL( m_dirURL.path() + "foobar" );
kdDebug() << k_funcinfo << "makeCompletion(" << url << ")" << endl;
- QString comp2 = m_completion->makeCompletion( url.prettyURL() );
+ TQString comp2 = m_completion->makeCompletion( url.prettyURL() );
assert( comp2.isEmpty() );
waitForCompletion();
assert( m_completion->allMatches().isEmpty() );
diff --git a/kio/tests/kziptest.cpp b/kio/tests/kziptest.cpp
index 11ad36b7d..5b784c40b 100644
--- a/kio/tests/kziptest.cpp
+++ b/kio/tests/kziptest.cpp
@@ -20,14 +20,14 @@
#include <stdio.h>
#include <kinstance.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <assert.h>
-void recursive_print( const KArchiveDirectory * dir, const QString & path )
+void recursive_print( const KArchiveDirectory * dir, const TQString & path )
{
- QStringList l = dir->entries();
- QStringList::Iterator it = l.begin();
+ TQStringList l = dir->entries();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
const KArchiveEntry* entry = dir->entry( (*it) );
@@ -36,7 +36,7 @@ void recursive_print( const KArchiveDirectory * dir, const QString & path )
entry->isDirectory() ? 0 : ((KArchiveFile*)entry)->size(),
entry->isDirectory() ? 0 : ((KArchiveFile*)entry)->position(),
path.latin1(), (*it).latin1(), entry->isDirectory(),
- !entry->symlink() ? "" : QString(" symlink: %1").arg(entry->symlink()).latin1() );
+ !entry->symlink() ? "" : TQString(" symlink: %1").arg(entry->symlink()).latin1() );
// if (!entry->isDirectory()) printf("%d", ((KArchiveFile*)entry)->size());
printf("\n");
@@ -47,10 +47,10 @@ void recursive_print( const KArchiveDirectory * dir, const QString & path )
void recursive_transfer(const KArchiveDirectory * dir,
- const QString & path, KZip * zip)
+ const TQString & path, KZip * zip)
{
- QStringList l = dir->entries();
- QStringList::Iterator it = l.begin();
+ TQStringList l = dir->entries();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
const KArchiveEntry* e = dir->entry( (*it) );
@@ -61,9 +61,9 @@ void recursive_transfer(const KArchiveDirectory * dir,
const KArchiveFile* f = (KArchiveFile*)e;
printf("FILE=%s\n", e->name().latin1());
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
if (e->symlink().isEmpty()) {
@@ -99,7 +99,7 @@ int main( int argc, char** argv )
return 1;
}
KInstance instance("kziptest");
- QString command = argv[1];
+ TQString command = argv[1];
if ( command == "list" )
{
KZip zip( argv[2] );
@@ -178,10 +178,10 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KArchiveFile* f = (KArchiveFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
Q_ASSERT( arr.size() == 13 );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
Q_ASSERT( str == "Noch so einer" );
printf("DATA=%s\n", str.latin1());
@@ -211,7 +211,7 @@ int main( int argc, char** argv )
// Generate long filenames of each possible length bigger than 98...
for (int i = 98; i < 500 ; i++ )
{
- QString str, num;
+ TQString str, num;
str.fill( 'a', i-10 );
num.setNum( i );
num = num.rightJustify( 10, '0' );
@@ -233,10 +233,10 @@ int main( int argc, char** argv )
const KArchiveEntry* entry = dir->entry( "my/dir/test3" );
if ( entry && entry->isFile() )
{
- QIODevice *dev = static_cast<const KZipFileEntry *>(entry)->device();
+ TQIODevice *dev = static_cast<const KZipFileEntry *>(entry)->device();
if ( dev ) {
- QByteArray contents = dev->readAll();
- printf("contents='%s'\n", QCString(contents, contents.size()+1).data());
+ TQByteArray contents = dev->readAll();
+ printf("contents='%s'\n", TQCString(contents, contents.size()+1).data());
}
} else
printf("entry=%p - not found if 0, otherwise not a file\n", (void*)entry);
@@ -253,8 +253,8 @@ int main( int argc, char** argv )
}
const KArchiveDirectory* dir = zip.directory();
kdDebug() << "Listing toplevel of zip file" << endl;
- QStringList l = dir->entries();
- QStringList::Iterator it = l.begin();
+ TQStringList l = dir->entries();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
const KArchiveEntry* e = dir->entry( (*it) );
@@ -264,9 +264,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KArchiveFile* f = (KArchiveFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
}
}
@@ -291,9 +291,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KArchiveFile* f = (KArchiveFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
// printf("DATA=%s\n", str.latin1());
printf("%s", str.latin1());
zip.close();
@@ -318,16 +318,16 @@ int main( int argc, char** argv )
// Q_ASSERT( e && e->isFile() );
// const KArchiveFile* f = (KArchiveFile*)e;
-// QCString data( "This is some new data that goes into " );
+// TQCString data( "This is some new data that goes into " );
// data += argv[3];
- QFile f ( argv[3] );
+ TQFile f ( argv[3] );
if (!f.open( IO_ReadOnly ))
{
printf("Could not open %s for reading\n", argv[2] );
return 1;
}
- QDataStream s( &f );
+ TQDataStream s( &f );
// zip.writeFile( argv[3], "", "", data.size(), data.data() );
@@ -402,9 +402,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KArchiveFile* f = (KArchiveFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
zip.close();
@@ -419,9 +419,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KArchiveFile* f = (KArchiveFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
// printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
// printf("DATA=%s\n", str.latin1());
printf("%s", str.latin1());
zip.close();
diff --git a/kio/tests/metatest.cpp b/kio/tests/metatest.cpp
index 9a5824132..54b87b6a0 100644
--- a/kio/tests/metatest.cpp
+++ b/kio/tests/metatest.cpp
@@ -1,11 +1,11 @@
#include <kapplication.h>
#include <kfilemetainfo.h>
#include <kcmdlineargs.h>
-#include <qstringlist.h>
-#include <qimage.h>
+#include <tqstringlist.h>
+#include <tqimage.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qvalidator.h>
+#include <tqlabel.h>
+#include <tqvalidator.h>
#define I18N_NOOP
@@ -28,11 +28,11 @@
void printKeyValues(KFileMetaInfo& info)
{
- QStringList l = info.preferredKeys();
+ TQStringList l = info.preferredKeys();
kdDebug() << "found " << l.size() << " keys\n";
- QString s;
- QStringList::Iterator it;
+ TQString s;
+ TQStringList::Iterator it;
for (it = l.begin(); it!=l.end(); ++it)
{
s +=" - " + *it;
@@ -42,23 +42,23 @@ void printKeyValues(KFileMetaInfo& info)
for (it = l.begin(); it!=l.end(); ++it)
{
KFileMetaInfoItem item = info.item(*it);
- if ( item.isValid() && item.value().canCast(QVariant::String)) {
+ if ( item.isValid() && item.value().canCast(TQVariant::String)) {
kdDebug() << item.key() << "(" << item.translatedKey() << ") -> "
<< item.string() << endl;
}
}
}
-void printMimeTypeInfo(QString mimetype)
+void printMimeTypeInfo(TQString mimetype)
{
const KFileMimeTypeInfo* info = KFileMetaInfoProvider::self()->mimeTypeInfo(mimetype);
if (!info) return;
kdDebug() << "Preferred groups:\n";
kdDebug() << "=================\n";
- QStringList groups = info->preferredGroups();
+ TQStringList groups = info->preferredGroups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
{
kdDebug() << *it << endl;
}
@@ -67,12 +67,12 @@ void printMimeTypeInfo(QString mimetype)
kdDebug() << "Supported groups:\n";
kdDebug() << "=================\n";
groups = info->supportedGroups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
{
kdDebug() << *it << endl;
}
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
{
const KFileMimeTypeInfo::GroupInfo* groupinfo = info->groupInfo(*it);
@@ -84,16 +84,16 @@ void printMimeTypeInfo(QString mimetype)
kdDebug() << endl;
kdDebug() << " Supported keys:\n";
- QStringList keys = groupinfo->supportedKeys();
+ TQStringList keys = groupinfo->supportedKeys();
if (!keys.count()) kdDebug() << " none\n";
- for (QStringList::Iterator kit=keys.begin(); kit!=keys.end(); ++kit)
+ for (TQStringList::Iterator kit=keys.begin(); kit!=keys.end(); ++kit)
{
kdDebug() << " " << *kit << endl;
const KFileMimeTypeInfo::ItemInfo* iti = groupinfo->itemInfo(*kit);
kdDebug() << " Key: " << iti->key() << endl;
kdDebug() << " Translated: " << iti->key() << endl;
- kdDebug() << " Type: " << QVariant::typeToName(iti->type()) << endl;
+ kdDebug() << " Type: " << TQVariant::typeToName(iti->type()) << endl;
kdDebug() << " Unit: " << iti->unit() << endl;
kdDebug() << " Hint: " << iti->hint() << endl;
kdDebug() << " Attributes: " << iti->attributes() << endl;
@@ -108,16 +108,16 @@ void printMimeTypeInfo(QString mimetype)
if (groupinfo->supportsVariableKeys())
{
const KFileMimeTypeInfo::ItemInfo* iti = groupinfo->variableItemInfo();
- kdDebug() << " variable key type/attr: " << QVariant::typeToName(iti->type()) << " / " << iti->attributes() << endl;
+ kdDebug() << " variable key type/attr: " << TQVariant::typeToName(iti->type()) << " / " << iti->attributes() << endl;
}
}
kdDebug() << endl;
kdDebug() << "Preferred keys:\n";
kdDebug() << "===============\n";
- QStringList prefKeys = info->preferredKeys();
+ TQStringList prefKeys = info->preferredKeys();
if (!prefKeys.count()) kdDebug() << " none\n";
- for (QStringList::Iterator kit=prefKeys.begin(); kit!=prefKeys.end(); ++kit)
+ for (TQStringList::Iterator kit=prefKeys.begin(); kit!=prefKeys.end(); ++kit)
{
kdDebug() << *kit << endl;
}
@@ -125,21 +125,21 @@ void printMimeTypeInfo(QString mimetype)
kdDebug() << endl;
kdDebug() << "Supported keys:\n";
kdDebug() << "===============\n";
- QStringList supKeys = info->supportedKeys();
+ TQStringList supKeys = info->supportedKeys();
if (!supKeys.count()) kdDebug() << " none\n";
- for (QStringList::Iterator kit=supKeys.begin(); kit!=supKeys.end(); ++kit)
+ for (TQStringList::Iterator kit=supKeys.begin(); kit!=supKeys.end(); ++kit)
{
kdDebug() << *kit << endl;
}
}
-void addGroup(KFileMetaInfo& info, QString group)
+void addGroup(KFileMetaInfo& info, TQString group)
{
kdDebug() << "trying to add group " << group << endl;
kdDebug() << "groups before: \n";
- QStringList groups = info.groups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ TQStringList groups = info.groups();
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
kdDebug() << " " << *it << endl;
if (info.addGroup(group))
@@ -157,24 +157,24 @@ void addGroup(KFileMetaInfo& info, QString group)
kdDebug() << "and afterwards: \n";
groups = info.groups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
kdDebug() << " " << *it << endl;
}
-void removeGroup(KFileMetaInfo& info, QString group)
+void removeGroup(KFileMetaInfo& info, TQString group)
{
kdDebug() << "trying to remove group " << group << endl;
kdDebug() << "groups before: \n";
- QStringList groups = info.groups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ TQStringList groups = info.groups();
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
kdDebug() << " " << *it << endl;
info.removeGroup(group);
kdDebug() << "and afterwards: \n";
groups = info.groups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
kdDebug() << " " << *it << endl;
}
@@ -193,7 +193,7 @@ int main( int argc, char **argv )
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
- QCString ov;
+ TQCString ov;
ov = args->getOption("mimetypeinfo");
if (ov)
{
@@ -203,19 +203,19 @@ int main( int argc, char **argv )
if (!args->count()) return 1;
- KFileMetaInfo info( args->url(0), QString::null, KFileMetaInfo::Everything);
+ KFileMetaInfo info( args->url(0), TQString::null, KFileMetaInfo::Everything);
if (args->isSet("groups"))
{
- QStringList groups = info.groups();
- for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
+ TQStringList groups = info.groups();
+ for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it)
{
kdDebug() << "group " << *it << endl;
}
return 0;
}
- QString group, item;
+ TQString group, item;
ov = args->getOption("addgroup");
if (ov) addGroup(info, ov);
@@ -254,7 +254,7 @@ int main( int argc, char **argv )
ov = args->getOption("set");
if (ov && !group.isNull() && !item.isNull())
{
- if (info[group][item].setValue(QString(ov)))
+ if (info[group][item].setValue(TQString(ov)))
kdDebug() << "setValue success\n";
else
kdDebug() << "setValue failed\n";
@@ -272,7 +272,7 @@ int main( int argc, char **argv )
if (args->isSet("validator") && !group.isNull() && !item.isNull())
{
const KFileMimeTypeInfo* kfmti = KFileMetaInfoProvider::self()->mimeTypeInfo(info.mimeType());
- QValidator* v = kfmti->createValidator(group, item);
+ TQValidator* v = kfmti->createValidator(group, item);
if (!v)
kdDebug() << "got no validator\n";
else
@@ -306,11 +306,11 @@ int main( int argc, char **argv )
kdDebug() << "type of thumbnail is " << thumbitem.value().typeName() << endl;
- if (thumbitem.isValid() && thumbitem.value().canCast(QVariant::Image))
+ if (thumbitem.isValid() && thumbitem.value().canCast(TQVariant::Image))
{
- QLabel* label = new QLabel(0);
+ TQLabel* label = new TQLabel(0);
app.setMainWidget(label);
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage(thumbitem.value().toImage());
label->setPixmap(pix);
label->show();
diff --git a/kio/tests/netaccesstest.cpp b/kio/tests/netaccesstest.cpp
index 6ac85fcfc..9fb0ff07a 100644
--- a/kio/tests/netaccesstest.cpp
+++ b/kio/tests/netaccesstest.cpp
@@ -20,7 +20,7 @@
#include <kdebug.h>
#include <kurl.h>
#include <kio/netaccess.h>
-#include <qfile.h>
+#include <tqfile.h>
int main(int argc, char **argv)
{
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
if ( !KIO::NetAccess::file_copy(srcURL, tmpURL, -1, true, false, 0) )
kdError() << "file_copy failed: " << KIO::NetAccess::lastErrorString() << endl;
else {
- QFile f( tmpURL.path() );
+ TQFile f( tmpURL.path() );
if (!f.open(IO_ReadOnly))
kdFatal() << "Cannot open: " << f.name() << ". The error was: " << f.errorString() << endl;
else {
diff --git a/kio/tests/previewtest.cpp b/kio/tests/previewtest.cpp
index 66fa9398e..f2b740224 100644
--- a/kio/tests/previewtest.cpp
+++ b/kio/tests/previewtest.cpp
@@ -1,7 +1,7 @@
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -12,16 +12,16 @@
#include "previewtest.moc"
PreviewTest::PreviewTest()
- :QWidget()
+ :TQWidget()
{
- QGridLayout *layout = new QGridLayout(this, 2, 2);
+ TQGridLayout *layout = new TQGridLayout(this, 2, 2);
m_url = new KLineEdit(this);
m_url->setText("/home/malte/gore_bush.jpg");
layout->addWidget(m_url, 0, 0);
- QPushButton *btn = new QPushButton("Generate", this);
- connect(btn, SIGNAL(clicked()), SLOT(slotGenerate()));
+ TQPushButton *btn = new TQPushButton("Generate", this);
+ connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotGenerate()));
layout->addWidget(btn, 0, 1);
- m_preview = new QLabel(this);
+ m_preview = new TQLabel(this);
m_preview->setMinimumSize(400, 300);
layout->addMultiCellWidget(m_preview, 1, 1, 0, 1);
}
@@ -31,9 +31,9 @@ void PreviewTest::slotGenerate()
KURL::List urls;
urls.append(m_url->text());
KIO::PreviewJob *job = KIO::filePreview(urls, m_preview->width(), m_preview->height(), true, 48);
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)));
- connect(job, SIGNAL(gotPreview(const KFileItem *, const QPixmap &)), SLOT(slotPreview(const KFileItem *, const QPixmap &)));
- connect(job, SIGNAL(failed(const KFileItem *)), SLOT(slotFailed()));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)));
+ connect(job, TQT_SIGNAL(gotPreview(const KFileItem *, const TQPixmap &)), TQT_SLOT(slotPreview(const KFileItem *, const TQPixmap &)));
+ connect(job, TQT_SIGNAL(failed(const KFileItem *)), TQT_SLOT(slotFailed()));
}
void PreviewTest::slotResult(KIO::Job*)
@@ -41,7 +41,7 @@ void PreviewTest::slotResult(KIO::Job*)
kdDebug() << "PreviewTest::slotResult(...)" << endl;
}
-void PreviewTest::slotPreview(const KFileItem *, const QPixmap &pix)
+void PreviewTest::slotPreview(const KFileItem *, const TQPixmap &pix)
{
kdDebug() << "PreviewTest::slotPreview()" << endl;
m_preview->setPixmap(pix);
diff --git a/kio/tests/previewtest.h b/kio/tests/previewtest.h
index 52c10f240..99b329f9d 100644
--- a/kio/tests/previewtest.h
+++ b/kio/tests/previewtest.h
@@ -1,5 +1,5 @@
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kio/job.h>
class KLineEdit;
@@ -15,11 +15,11 @@ public:
private slots:
void slotGenerate();
void slotResult(KIO::Job *);
- void slotPreview( const KFileItem *, const QPixmap & );
+ void slotPreview( const KFileItem *, const TQPixmap & );
void slotFailed();
private:
KLineEdit *m_url;
- QLabel *m_preview;
+ TQLabel *m_preview;
};
diff --git a/kio/tests/speed.cpp b/kio/tests/speed.cpp
index fc7128f35..d8ddae20a 100644
--- a/kio/tests/speed.cpp
+++ b/kio/tests/speed.cpp
@@ -22,20 +22,20 @@
#include "speed.h"
#include <kio/job.h>
#include <kcmdlineargs.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kio/global.h>
using namespace KIO;
SpeedTest::SpeedTest( const KURL & url )
- : QObject(0, "speed")
+ : TQObject(0, "speed")
{
Job *job = listRecursive( url );
- //Job *job = del( KURL("file:" + QDir::currentDirPath()) ); DANGEROUS !
- connect(job, SIGNAL( result( KIO::Job*)),
- SLOT( finished( KIO::Job* ) ));
- /*connect(job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
- SLOT( entries( KIO::Job*, const KIO::UDSEntryList&)));
+ //Job *job = del( KURL("file:" + TQDir::currentDirPath()) ); DANGEROUS !
+ connect(job, TQT_SIGNAL( result( KIO::Job*)),
+ TQT_SLOT( finished( KIO::Job* ) ));
+ /*connect(job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
+ TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList&)));
*/
}
@@ -77,11 +77,11 @@ int main(int argc, char **argv) {
if ( args->count() == 1 )
url = args->url(0);
else
- url = "file:" + QDir::currentDirPath();
+ url = "file:" + TQDir::currentDirPath();
kdDebug() << url.url() << " is probably " << (KIO::probably_slow_mounted(url.path()) ? "slow" : "normal") << " mounted\n";
kdDebug() << url.url() << " is " << (KIO::manually_mounted(url.path()) ? "manually" : "system") << " mounted\n";
- QString mp = KIO::findDeviceMountPoint(url.path());
+ TQString mp = KIO::findDeviceMountPoint(url.path());
if (mp.isEmpty()) {
kdDebug() << "no mount point for device " << url.url() << " found\n";
} else
@@ -103,7 +103,7 @@ int main(int argc, char **argv) {
// SpeedTest test( url );
// app.exec();
- url.setPath(QDir::homeDirPath());
+ url.setPath(TQDir::homeDirPath());
mp = KIO::findPathMountPoint(url.path());
if (mp.isEmpty()) {
@@ -124,7 +124,7 @@ int main(int argc, char **argv) {
if ( args->count() == 1 )
url = args->url(0);
else
- url = "file:" + QDir::currentDirPath();
+ url = "file:" + TQDir::currentDirPath();
mp = KIO::findPathMountPoint(url.path());
if (mp.isEmpty()) {
diff --git a/kio/tests/speed.h b/kio/tests/speed.h
index e66970f0f..69b12465f 100644
--- a/kio/tests/speed.h
+++ b/kio/tests/speed.h
@@ -9,7 +9,7 @@ namespace KIO {
class Job;
}
-class SpeedTest : public QObject {
+class SpeedTest : public TQObject {
Q_OBJECT
public: