From f7e71d47719ab6094cf4a9fafffa5ea351973522 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 13 Jan 2011 08:32:36 +0000 Subject: Initial conversion for TQt for Qt4 3.4.0 TP2 This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- KDE2PORTING.html | 10 +- KDE3PORTING.html | 10 +- arts/kde/kartsdispatcher.h | 2 +- arts/kde/kartsserver.cpp | 6 +- arts/kde/kartsserver.h | 2 +- arts/kde/kaudioconverter.h | 2 +- arts/kde/kaudiorecordstream.h | 2 +- arts/kde/kconverttest.h | 2 +- arts/kde/kioinputstream_impl.cpp | 4 +- arts/kde/kplayobject.cc | 8 +- arts/kde/kplayobject.h | 4 +- arts/kde/kplayobjectcreator.h | 2 +- arts/kde/kplayobjectfactory.cc | 4 +- arts/kde/kplayobjectfactory_p.h | 2 +- arts/kde/kvideowidget.cpp | 18 +- arts/kde/kvideowidget.h | 2 +- arts/knotify/knotify.cpp | 14 +- dcop/KDE-ICE/ICEmsg.h | 4 +- dcop/client/dcop.cpp | 32 +- dcop/client/dcopfind.cpp | 10 +- dcop/client/dcopstart.cpp | 2 +- dcop/client/marshall.cpp | 40 +- dcop/dcopclient.cpp | 124 ++--- dcop/dcopclient.h | 7 +- dcop/dcopidl/main.cpp | 2 +- dcop/dcopidl/scanner.cc | 4 +- dcop/dcopidl/scanner.ll | 1 + dcop/dcopidl/yacc.cc | 2 +- dcop/dcopidl/yacc.yy | 2 +- dcop/dcopidl2cpp/main.cpp | 6 +- dcop/dcopidl2cpp/skel.cpp | 4 +- dcop/dcopidl2cpp/stub.cpp | 10 +- dcop/dcopidl2cpp/stubimpl.cpp | 2 +- dcop/dcopobject.cpp | 6 +- dcop/dcopref.cpp | 8 +- dcop/dcopref.h | 2 +- dcop/dcopserver.cpp | 56 +- dcop/dcopserver.h | 6 +- dcop/dcopsignals.cpp | 18 +- dcop/kdatastream.h | 12 +- dcop/testdcop.h | 4 +- dnssd/domainbrowser.cpp | 2 +- dnssd/domainbrowser.h | 2 +- dnssd/query.h | 2 +- dnssd/remoteservice.cpp | 4 +- dnssd/responder.cpp | 4 +- dnssd/responder.h | 2 +- dnssd/sdevent.h | 8 +- dnssd/servicebase.cpp | 8 +- dnssd/servicebrowser.cpp | 2 +- dnssd/servicebrowser.h | 2 +- interfaces/khexedit/byteseditinterface.h | 8 +- interfaces/khexedit/charcolumninterface.h | 2 +- interfaces/khexedit/clipboardinterface.h | 2 +- interfaces/khexedit/valuecolumninterface.h | 2 +- interfaces/khexedit/zoominterface.h | 2 +- interfaces/kimproxy/interface/kimiface.h | 2 +- interfaces/kimproxy/library/kimproxy.cpp | 10 +- .../kfileaudiopreview/kfileaudiopreview.cpp | 4 +- interfaces/kmediaplayer/player.h | 2 +- interfaces/kmediaplayer/view.h | 2 +- interfaces/kregexpeditor/kregexpeditorinterface.h | 4 +- interfaces/kscript/scriptinterface.h | 2 +- interfaces/ktexteditor/blockselectioninterface.cpp | 2 +- interfaces/ktexteditor/clipboardinterface.cpp | 2 +- interfaces/ktexteditor/codecompletioninterface.cpp | 2 +- interfaces/ktexteditor/configinterface.cpp | 4 +- .../ktexteditor/configinterfaceextension.cpp | 4 +- interfaces/ktexteditor/configinterfaceextension.h | 2 +- interfaces/ktexteditor/cursorinterface.cpp | 2 +- interfaces/ktexteditor/dynwordwrapinterface.cpp | 2 +- interfaces/ktexteditor/editinterface.cpp | 2 +- interfaces/ktexteditor/editinterfaceext.cpp | 2 +- interfaces/ktexteditor/editinterfaceext.h | 2 +- interfaces/ktexteditor/editor.h | 2 +- interfaces/ktexteditor/editorchooser.cpp | 6 +- interfaces/ktexteditor/editorchooser.h | 4 +- interfaces/ktexteditor/editorchooser_ui.ui | 6 +- interfaces/ktexteditor/encodinginterface.cpp | 2 +- interfaces/ktexteditor/highlightinginterface.cpp | 2 +- interfaces/ktexteditor/ktexteditor.cpp | 6 +- interfaces/ktexteditor/markinterface.cpp | 2 +- interfaces/ktexteditor/markinterfaceextension.cpp | 2 +- interfaces/ktexteditor/plugin.h | 2 +- interfaces/ktexteditor/popupmenuinterface.cpp | 2 +- interfaces/ktexteditor/printinterface.cpp | 2 +- interfaces/ktexteditor/searchinterface.cpp | 2 +- interfaces/ktexteditor/selectioninterface.cpp | 4 +- interfaces/ktexteditor/selectioninterfaceext.cpp | 4 +- interfaces/ktexteditor/sessionconfiginterface.cpp | 6 +- interfaces/ktexteditor/templateinterface.cpp | 4 +- interfaces/ktexteditor/texthintinterface.cpp | 2 +- interfaces/ktexteditor/undointerface.cpp | 2 +- interfaces/ktexteditor/variableinterface.cpp | 2 +- interfaces/ktexteditor/viewcursorinterface.cpp | 2 +- interfaces/ktexteditor/viewstatusmsginterface.cpp | 2 +- interfaces/ktexteditor/wordwrapinterface.cpp | 2 +- interfaces/terminal/kde_terminal_interface.h | 2 +- interfaces/terminal/test/main.cc | 6 +- kab/addressbook.cc | 6 +- kab/addressbook.h | 6 +- kab/kabapi.cc | 4 +- kab/qconfigDB.cc | 16 +- kab/qconfigDB.h | 2 +- kabc/address.cpp | 20 +- kabc/addressbook.cpp | 2 +- kabc/addressbook.h | 2 +- kabc/addresseedialog.cpp | 4 +- kabc/addresseedialog.h | 2 +- kabc/addresseehelper.cpp | 8 +- kabc/addresseelist.cpp | 2 +- kabc/addresslineedit.cpp | 28 +- kabc/agent.cpp | 4 +- kabc/distributionlist.cpp | 6 +- kabc/distributionlist.h | 2 +- kabc/distributionlistdialog.h | 2 +- kabc/distributionlisteditor.h | 2 +- kabc/errorhandler.cpp | 2 +- kabc/formats/binaryformat.cpp | 12 +- kabc/kab2kabc.cpp | 4 +- kabc/ldapclient.cpp | 6 +- kabc/ldapclient.h | 4 +- kabc/ldapconfigwidget.cpp | 8 +- kabc/ldapconfigwidget.h | 2 +- kabc/ldapurl.cpp | 2 +- kabc/ldif.cpp | 2 +- kabc/ldifconverter.cpp | 120 ++--- kabc/ldifconverter.h | 2 +- kabc/lock.h | 2 +- kabc/plugins/ldapkio/resourceldapkio.cpp | 6 +- kabc/plugins/sql/resourcesql.cpp | 4 +- kabc/plugins/sql/resourcesqlconfig.cpp | 2 +- kabc/resource.cpp | 2 +- kabc/scripts/addressee.src.cpp | 16 +- kabc/tests/testldapclient.h | 2 +- kabc/tests/testlock.h | 2 +- kabc/vcard/AdrParam.cpp | 2 +- kabc/vcard/ContentLine.cpp | 8 +- kabc/vcard/DateValue.cpp | 4 +- kabc/vcard/GeoValue.cpp | 2 +- kabc/vcard/RToken.cpp | 2 +- kabc/vcard/SourceParam.cpp | 2 +- kabc/vcard/URIValue.cpp | 2 +- kabc/vcard/UTCValue.cpp | 2 +- kabc/vcard/VCard.cpp | 8 +- kabc/vcard/VCardEntity.cpp | 4 +- kabc/vcard/include/VCardRToken.h | 2 +- kabc/vcard21parser.cpp | 2 +- kabc/vcardformatimpl.cpp | 6 +- kabc/vcardparser/testwrite.cpp | 2 +- kabc/vcardparser/vcard.cpp | 6 +- kabc/vcardparser/vcardline.cpp | 4 +- kabc/vcardparser/vcardparser.cpp | 6 +- kabc/vcardtool.cpp | 20 +- kate/interfaces/interfaces.cpp | 6 +- kate/part/katearbitraryhighlight.h | 2 +- kate/part/kateautoindent.cpp | 72 +-- kate/part/kateautoindent.h | 4 +- kate/part/katebookmarks.cpp | 2 +- kate/part/katebookmarks.h | 2 +- kate/part/katebuffer.cpp | 42 +- kate/part/katebuffer.h | 8 +- kate/part/katecmds.cpp | 10 +- kate/part/katecmds.h | 2 +- kate/part/katecodecompletion.cpp | 10 +- kate/part/katecodecompletion.h | 8 +- kate/part/katecodefoldinghelpers.h | 2 +- kate/part/kateconfig.cpp | 2 +- kate/part/katecursor.h | 4 +- kate/part/katedialogs.cpp | 6 +- kate/part/katedocument.cpp | 34 +- kate/part/katedocument.h | 4 +- kate/part/katefactory.cpp | 10 +- kate/part/katefactory.h | 4 +- kate/part/katefont.h | 2 +- kate/part/katehighlight.cpp | 16 +- kate/part/katehighlight.h | 8 +- kate/part/katejscript.cpp | 2 +- kate/part/kateprinter.cpp | 6 +- kate/part/katerenderer.cpp | 20 +- kate/part/kateschema.cpp | 44 +- kate/part/kateschema.h | 14 +- kate/part/katesearch.cpp | 6 +- kate/part/katesearch.h | 2 +- kate/part/katespell.h | 2 +- kate/part/katesyntaxdocument.h | 2 +- kate/part/katetextline.cpp | 44 +- kate/part/katetextline.h | 6 +- kate/part/kateview.cpp | 14 +- kate/part/kateview.h | 2 +- kate/part/kateviewhelpers.cpp | 10 +- kate/part/kateviewhelpers.h | 6 +- kate/part/kateviewinternal.cpp | 4 +- kate/part/kateviewinternal.h | 4 +- kate/part/test_regression.cpp | 18 +- kate/part/test_regression.h | 2 +- kate/plugins/autobookmarker/autobookmarker.cpp | 2 +- kate/plugins/kdatatool/kate_kdatatool.cpp | 2 +- kcert/kcertpart.cc | 14 +- kcert/kcertpart.h | 2 +- kconf_update/kconf_update.cpp | 38 +- kdecore/fixx11h.h | 16 +- kdecore/kaboutdata.cpp | 38 +- kdecore/kaccel.cpp | 24 +- kdecore/kaccelbase.cpp | 16 +- kdecore/kaccelmanager.cpp | 42 +- kdecore/kaccelmanager_private.h | 4 +- kdecore/kallocator.cpp | 6 +- kdecore/kapplication.cpp | 100 ++-- kdecore/kapplication.h | 12 +- kdecore/kasyncio.h | 12 +- kdecore/kbufferedio.h | 1 + kdecore/kcalendarsystemfactory.h | 2 +- kdecore/kcalendarsystemgregorian.cpp | 10 +- kdecore/kcalendarsystemhebrew.cpp | 18 +- kdecore/kcalendarsystemhijri.cpp | 4 +- kdecore/kcalendarsystemjalali.cpp | 4 +- kdecore/kcatalogue.cpp | 2 +- kdecore/kcharsets.cpp | 38 +- kdecore/kcheckaccelerators.cpp | 8 +- kdecore/kcheckaccelerators.h | 2 +- kdecore/kclipboard.cpp | 38 +- kdecore/kclipboard.h | 2 +- kdecore/kcmdlineargs.cpp | 14 +- kdecore/kcompletion.cpp | 12 +- kdecore/kcompletion.h | 4 +- kdecore/kcompletion_private.h | 4 +- kdecore/kcompletionbase.cpp | 2 +- kdecore/kconfig.cpp | 10 +- kdecore/kconfig_compiler/kconfig_compiler.cpp | 66 +-- .../tests/kconfigcompiler_test.cpp | 6 +- kdecore/kconfig_compiler/tests/test1.cpp.ref | 48 +- kdecore/kconfig_compiler/tests/test1.h.ref | 18 +- kdecore/kconfig_compiler/tests/test2.cpp.ref | 66 +-- kdecore/kconfig_compiler/tests/test2.h.ref | 22 +- kdecore/kconfig_compiler/tests/test3.cpp.ref | 22 +- kdecore/kconfig_compiler/tests/test3.h.ref | 8 +- kdecore/kconfig_compiler/tests/test4.cpp.ref | 48 +- kdecore/kconfig_compiler/tests/test4.h.ref | 8 +- kdecore/kconfig_compiler/tests/test5.cpp.ref | 48 +- kdecore/kconfig_compiler/tests/test5.h.ref | 8 +- kdecore/kconfig_compiler/tests/test6.cpp.ref | 18 +- kdecore/kconfig_compiler/tests/test6.h.ref | 6 +- kdecore/kconfig_compiler/tests/test7.cpp.ref | 18 +- kdecore/kconfig_compiler/tests/test7.h.ref | 6 +- kdecore/kconfig_compiler/tests/test8a.cpp.ref | 10 +- kdecore/kconfig_compiler/tests/test8a.h.ref | 4 +- kdecore/kconfig_compiler/tests/test8b.cpp.ref | 16 +- kdecore/kconfig_compiler/tests/test8b.h.ref | 6 +- kdecore/kconfig_compiler/tests/test9.cpp.ref | 16 +- kdecore/kconfig_compiler/tests/test9.h.ref | 6 +- kdecore/kconfig_compiler/tests/test9main.cpp | 2 +- .../kconfig_compiler/tests/test_dpointer.cpp.ref | 88 +-- kdecore/kconfigbackend.cpp | 20 +- kdecore/kconfigbase.cpp | 68 +-- kdecore/kconfigbase.h | 27 +- kdecore/kconfigdialogmanager.cpp | 18 +- kdecore/kconfigskeleton.cpp | 38 +- kdecore/kconfigskeleton.h | 50 +- kdecore/kdcoppropertyproxy.cpp | 18 +- kdecore/kde-config.cpp.in | 30 +- kdecore/kdebug.cpp | 28 +- kdecore/kdebug.h | 14 +- kdecore/kdelibs_export.h | 2 +- kdecore/kdemacros.h.in | 8 +- kdecore/kdesktopfile.cpp | 32 +- kdecore/kextsock.cpp | 8 +- kdecore/kextsock.h | 13 +- kdecore/kgenericfactory.h | 16 +- kdecore/kgenericfactory.tcc | 110 ++-- kdecore/kglobal.cpp | 6 +- kdecore/kglobalaccel.h | 2 +- kdecore/kglobalaccel_win.cpp | 6 +- kdecore/kglobalaccel_x11.cpp | 34 +- kdecore/kglobalsettings.cpp | 6 +- kdecore/kiconeffect.cpp | 106 ++-- kdecore/kiconloader.cpp | 40 +- kdecore/kiconloader_p.h | 2 +- kdecore/kicontheme.cpp | 12 +- kdecore/kidna.cpp | 4 +- kdecore/kkeyserver_x11.cpp | 20 +- kdecore/klibloader.cpp | 12 +- kdecore/klibloader.h | 6 +- kdecore/klocale.cpp | 116 ++-- kdecore/klocale.h | 4 +- kdecore/kmacroexpander.cpp | 34 +- kdecore/kmanagerselection.cpp | 4 +- kdecore/kmanagerselection.h | 8 +- kdecore/kmdcodec.cpp | 128 ++--- kdecore/kmdcodec.h | 68 +-- kdecore/kmimesourcefactory.cpp | 2 +- kdecore/kmultipledrag.cpp | 6 +- kdecore/kmultipledrag.h | 4 +- kdecore/knotifyclient.cpp | 14 +- kdecore/kpalette.cpp | 6 +- kdecore/kprocctrl.cpp | 2 +- kdecore/kprocctrl.h | 2 +- kdecore/kprocess.h | 6 +- kdecore/kprocio.cpp | 2 +- kdecore/kprocio.h | 2 +- kdecore/kprotocolinfo_kdecore.cpp | 14 +- kdecore/kprotocolinfofactory.cpp | 2 +- kdecore/kqiodevicegzip_p.cpp | 12 +- kdecore/kqiodevicegzip_p.h | 10 +- kdecore/kregexp.h | 4 +- kdecore/krfcdate.cpp | 10 +- kdecore/krootprop.cpp | 20 +- kdecore/ksavefile.cpp | 6 +- kdecore/ksavefile.h | 2 +- kdecore/kshell.cpp | 50 +- kdecore/kshortcut.cpp | 8 +- kdecore/kshortcutmenu.cpp | 4 +- kdecore/ksimpleconfig.cpp | 2 +- kdecore/ksock.h | 8 +- kdecore/ksockaddr.cpp | 20 +- kdecore/ksockaddr.h | 6 +- kdecore/kstandarddirs.cpp | 98 ++-- kdecore/kstandarddirs.h | 2 +- kdecore/kstartupinfo.cpp | 120 ++--- kdecore/kstartupinfo.h | 7 +- kdecore/kstdaccel.cpp | 4 +- kdecore/kstringhandler.cpp | 30 +- kdecore/ksycoca.cpp | 51 +- kdecore/ksycoca.h | 6 +- kdecore/ksycocadict.cpp | 42 +- kdecore/ksycocadict.h | 8 +- kdecore/ksycocaentry.h | 4 +- kdecore/ksycocafactory.cpp | 36 +- kdecore/ktempdir.cpp | 4 +- kdecore/ktempfile.cpp | 2 +- kdecore/ktimezones.cpp | 40 +- kdecore/kurl.cpp | 72 +-- kdecore/kurl.h | 10 +- kdecore/kurldrag.cpp | 10 +- kdecore/kurldrag.h | 4 +- kdecore/kuser.cpp | 4 +- kdecore/kvmallocator.cpp | 8 +- kdecore/kwin.cpp | 20 +- kdecore/kwinmodule.cpp | 12 +- kdecore/kwinmodule.h | 6 +- kdecore/kxmessages.cpp | 2 +- kdecore/kxmessages.h | 7 +- kdecore/libintl.cpp | 2 +- kdecore/malloc/malloc.c | 114 ++-- kdecore/netsupp.cpp | 18 +- kdecore/netsupp.h | 48 +- kdecore/netwm.cpp | 12 +- kdecore/network/kbufferedsocket.cpp | 24 +- kdecore/network/kbufferedsocket.h | 19 +- kdecore/network/kclientsocketbase.cpp | 44 +- kdecore/network/kclientsocketbase.h | 30 +- kdecore/network/kdatagramsocket.cpp | 6 +- kdecore/network/kdatagramsocket.h | 7 +- kdecore/network/khttpproxysocketdevice.cpp | 14 +- kdecore/network/kiobuffer.h | 10 +- kdecore/network/kresolver.cpp | 54 +- kdecore/network/kresolver.h | 11 +- kdecore/network/kresolver_p.h | 2 +- kdecore/network/kresolverstandardworkers.cpp | 30 +- kdecore/network/kresolverstandardworkers_p.h | 2 +- kdecore/network/kreverseresolver.cpp | 8 +- kdecore/network/kreverseresolver.h | 5 +- kdecore/network/kserversocket.cpp | 2 +- kdecore/network/kserversocket.h | 1 + kdecore/network/ksocketaddress.cpp | 86 +-- kdecore/network/ksocketaddress.h | 58 +- kdecore/network/ksocketbase.cpp | 2 +- kdecore/network/ksocketbase.h | 20 +- kdecore/network/ksocketbuffer.cpp | 32 +- kdecore/network/ksocketbuffer_p.h | 20 +- kdecore/network/ksocketdevice.cpp | 20 +- kdecore/network/ksocketdevice.h | 16 +- kdecore/network/ksockssocketdevice.cpp | 14 +- kdecore/network/ksockssocketdevice.h | 12 +- kdecore/network/ksrvresolverworker.cpp | 12 +- kdecore/network/ksrvresolverworker_p.h | 9 +- kdecore/network/kstreamsocket.cpp | 4 +- kdecore/network/kstreamsocket.h | 1 + kdecore/svgicons/ksvgiconengine.cpp | 28 +- kdecore/svgicons/ksvgiconpainter.cpp | 92 ++-- kdecore/svgicons/ksvgiconpainter.h | 8 +- kdecore/tests/kcalendartest.cpp | 2 +- kdecore/tests/kconfigtestgui.cpp | 2 +- kdecore/tests/kconfigtestgui.h | 2 +- kdecore/tests/kipctest.h | 2 +- kdecore/tests/klocaletest.cpp | 28 +- kdecore/tests/klocaletest.h | 2 +- kdecore/tests/kmdcodectest.cpp | 6 +- kdecore/tests/kprocesstest.h | 2 +- kdecore/tests/kprociotest.h | 2 +- kdecore/tests/kresolvertest.cpp | 8 +- kdecore/tests/ktimezonestest.cpp | 2 +- kded/kbuildservicefactory.cpp | 40 +- kded/kbuildservicegroupfactory.cpp | 18 +- kded/kbuildservicetypefactory.cpp | 40 +- kded/kbuildsycoca.cpp | 74 +-- kded/kbuildsycoca.h | 2 +- kded/kctimefactory.cpp | 26 +- kded/kctimefactory.h | 8 +- kded/kde-menu.cpp | 2 +- kded/kded.cpp | 18 +- kded/kded.h | 4 +- kded/kdedmodule.cpp | 4 +- kded/khostname.cpp | 14 +- kded/vfolder_menu.cpp | 78 +-- kded/vfolder_menu.h | 2 +- kdefx/kdrawutil.cpp | 10 +- kdefx/kdrawutil.h | 2 +- kdefx/kimageeffect.cpp | 592 ++++++++++----------- kdefx/kpixmap.cpp | 48 +- kdefx/kpixmap.h | 2 +- kdefx/kpixmapeffect.cpp | 4 +- kdefx/kstyle.cpp | 185 ++++--- kdefx/kstyle.h | 51 +- kdeprint/cups/cupsaddsmb2.cpp | 8 +- kdeprint/cups/cupsdconf2/addressdialog.cpp | 2 +- kdeprint/cups/cupsdconf2/cupsdcomment.cpp | 4 +- kdeprint/cups/cupsdconf2/cupsdconf.cpp | 24 +- kdeprint/cups/cupsdconf2/cupsddialog.cpp | 2 +- kdeprint/cups/cupsdconf2/cupsdpage.h | 2 +- kdeprint/cups/cupsdconf2/cupsdsplash.cpp | 4 +- kdeprint/cups/cupsdconf2/editlist.h | 2 +- kdeprint/cups/cupsdconf2/portdialog.cpp | 4 +- kdeprint/cups/cupsdconf2/qdirlineedit.h | 2 +- kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp | 2 +- kdeprint/cups/cupsdconf2/qdirmultilineedit.h | 2 +- kdeprint/cups/cupsdconf2/sizewidget.cpp | 2 +- kdeprint/cups/cupsdconf2/sizewidget.h | 2 +- kdeprint/cups/cupsinfos.cpp | 4 +- kdeprint/cups/image.cpp | 8 +- kdeprint/cups/imageposition.cpp | 6 +- kdeprint/cups/imageposition.h | 4 +- kdeprint/cups/imagepreview.cpp | 6 +- kdeprint/cups/imagepreview.h | 4 +- kdeprint/cups/ippreportdlg.cpp | 2 +- kdeprint/cups/ipprequest.cpp | 2 +- kdeprint/cups/kcupsprinterimpl.cpp | 10 +- kdeprint/cups/kmcupsconfigwidget.h | 2 +- kdeprint/cups/kmcupsjobmanager.cpp | 8 +- kdeprint/cups/kmcupsmanager.cpp | 42 +- kdeprint/cups/kmpropusers.cpp | 2 +- kdeprint/cups/kmwbanners.cpp | 4 +- kdeprint/cups/kmwfax.cpp | 4 +- kdeprint/cups/kmwipp.cpp | 2 +- kdeprint/cups/kmwippprinter.cpp | 6 +- kdeprint/cups/kmwippselect.cpp | 6 +- kdeprint/cups/kmwother.cpp | 4 +- kdeprint/cups/kpimagepage.cpp | 4 +- kdeprint/cups/kptagspage.cpp | 8 +- kdeprint/cups/kptagspage.h | 4 +- kdeprint/cups/kptextpage.cpp | 2 +- kdeprint/driver.cpp | 6 +- kdeprint/driver.h | 2 +- kdeprint/driveritem.cpp | 6 +- kdeprint/driveritem.h | 2 +- kdeprint/driverview.h | 2 +- kdeprint/droptionview.h | 4 +- kdeprint/foomatic/kfoomaticprinterimpl.cpp | 2 +- kdeprint/foomatic/kmfoomaticmanager.cpp | 6 +- kdeprint/foomatic2loader.cpp | 6 +- kdeprint/kdeprintcheck.cpp | 4 +- kdeprint/kdeprintd.cpp | 10 +- kdeprint/kfilelist.cpp | 2 +- kdeprint/kfilelist.h | 4 +- kdeprint/kmdbentry.cpp | 4 +- kdeprint/kmfactory.cpp | 6 +- kdeprint/kmjob.cpp | 2 +- kdeprint/kmjobmanager.cpp | 4 +- kdeprint/kmjobmanager.h | 2 +- kdeprint/kmmanager.cpp | 4 +- kdeprint/kmmanager.h | 2 +- kdeprint/kmprinter.cpp | 2 +- kdeprint/kmspecialmanager.cpp | 6 +- kdeprint/kmspecialmanager.h | 2 +- kdeprint/kmthreadjob.cpp | 6 +- kdeprint/kmthreadjob.h | 2 +- kdeprint/kmuimanager.h | 2 +- kdeprint/kpcopiespage.cpp | 4 +- kdeprint/kpfilterpage.cpp | 12 +- kdeprint/kpgeneralpage.cpp | 12 +- kdeprint/kpipeprocess.h | 2 +- kdeprint/kpposterpage.cpp | 4 +- kdeprint/kpqtpage.cpp | 12 +- kdeprint/kprintaction.cpp | 34 +- kdeprint/kprintaction.h | 14 +- kdeprint/kprintdialog.cpp | 8 +- kdeprint/kprintdialogpage.h | 2 +- kdeprint/kprinter.cpp | 12 +- kdeprint/kprinterimpl.cpp | 6 +- kdeprint/kprinterimpl.h | 2 +- kdeprint/kprintpreview.cpp | 2 +- kdeprint/kxmlcommand.cpp | 12 +- kdeprint/kxmlcommand.h | 4 +- kdeprint/lpd/gschecker.cpp | 4 +- kdeprint/lpd/gschecker.h | 2 +- kdeprint/lpd/klpdprinterimpl.cpp | 2 +- kdeprint/lpd/kmlpdmanager.cpp | 68 +-- kdeprint/lpd/lpdtools.cpp | 24 +- kdeprint/lpdunix/klpdunixprinterimpl.cpp | 4 +- kdeprint/lpdunix/kmlpdunixmanager.cpp | 10 +- kdeprint/lpr/apshandler.cpp | 12 +- kdeprint/lpr/klprprinterimpl.cpp | 4 +- kdeprint/lpr/kmlprmanager.cpp | 18 +- kdeprint/lpr/lpchelper.cpp | 22 +- kdeprint/lpr/lpchelper.h | 2 +- kdeprint/lpr/lpqhelper.cpp | 6 +- kdeprint/lpr/lpqhelper.h | 2 +- kdeprint/lpr/lprhandler.cpp | 4 +- kdeprint/lpr/lprngtoolhandler.cpp | 24 +- kdeprint/lpr/matichandler.cpp | 22 +- kdeprint/lpr/printcapreader.cpp | 8 +- kdeprint/management/cjanuswidget.cpp | 2 +- kdeprint/management/cjanuswidget.h | 2 +- kdeprint/management/kmconfigfilter.cpp | 2 +- kdeprint/management/kmconfigpage.h | 2 +- kdeprint/management/kmdbcreator.cpp | 4 +- kdeprint/management/kmdbcreator.h | 2 +- kdeprint/management/kmdriverdb.cpp | 14 +- kdeprint/management/kmdriverdb.h | 2 +- kdeprint/management/kmdriverdbwidget.cpp | 2 +- kdeprint/management/kmdriverdbwidget.h | 2 +- kdeprint/management/kmiconview.cpp | 4 +- kdeprint/management/kminfopage.cpp | 18 +- kdeprint/management/kminstancepage.cpp | 4 +- kdeprint/management/kmjobviewer.cpp | 2 +- kdeprint/management/kmlistview.cpp | 2 +- kdeprint/management/kmlistview.h | 2 +- kdeprint/management/kmpages.h | 2 +- kdeprint/management/kmprinterview.cpp | 6 +- kdeprint/management/kmprinterview.h | 4 +- kdeprint/management/kmpropcontainer.h | 2 +- kdeprint/management/kmpropmembers.cpp | 2 +- kdeprint/management/kmpropwidget.h | 2 +- kdeprint/management/kmtimer.h | 2 +- kdeprint/management/kmwbackend.cpp | 2 +- kdeprint/management/kmwdriver.cpp | 2 +- kdeprint/management/kmwend.cpp | 12 +- kdeprint/management/kmwfile.cpp | 2 +- kdeprint/management/kmwizard.cpp | 4 +- kdeprint/management/kmwizard.h | 2 +- kdeprint/management/kmwizardpage.h | 2 +- kdeprint/management/kmwlocal.cpp | 2 +- kdeprint/management/kmwlpd.cpp | 4 +- kdeprint/management/kmwname.cpp | 2 +- kdeprint/management/kmwpassword.cpp | 2 +- kdeprint/management/kmwsocket.cpp | 2 +- kdeprint/management/kmwsocketutil.cpp | 4 +- kdeprint/management/kxmlcommanddlg.cpp | 14 +- kdeprint/management/kxmlcommanddlg.h | 2 +- kdeprint/management/kxmlcommandselector.cpp | 2 +- kdeprint/management/kxmlcommandselector.h | 2 +- kdeprint/management/networkscanner.cpp | 6 +- kdeprint/management/networkscanner.h | 2 +- kdeprint/management/sidepixmap.cpp | 4 +- kdeprint/management/sidepixmap.h | 4 +- kdeprint/management/smbview.cpp | 2 +- kdeprint/marginpreview.h | 2 +- kdeprint/marginwidget.h | 2 +- kdeprint/messagewindow.cpp | 12 +- kdeprint/messagewindow.h | 2 +- kdeprint/plugincombobox.cpp | 2 +- kdeprint/posterpreview.cpp | 10 +- kdeprint/posterpreview.h | 2 +- kdeprint/ppdloader.cpp | 6 +- kdeprint/printerfilter.cpp | 2 +- kdeprint/rlpr/kmproxywidget.h | 2 +- kdeprint/rlpr/kmrlprmanager.cpp | 2 +- kdeprint/rlpr/kmwrlpr.cpp | 8 +- kdeprint/rlpr/krlprprinterimpl.cpp | 2 +- kdeprint/tests/drawdemo.cpp | 4 +- kdeprint/tests/drawdemo.h | 2 +- kdeprint/tests/helpwindow.cpp | 4 +- kdeprint/tests/richpage.cpp | 2 +- kdeprint/tools/escputil/escpwidget.cpp | 14 +- kdeprint/tools/escputil/escpwidget.h | 2 +- kdeprint/treecombobox.cpp | 2 +- kdeprint/treecombobox.h | 6 +- kdeprint/util.cpp | 10 +- kdesu/client.cpp | 10 +- kdesu/kcookie.cpp | 2 +- kdesu/process.cpp | 8 +- kdesu/ssh.cpp | 4 +- kdesu/stub.cpp | 2 +- kdeui/kaboutdialog.cpp | 158 +++--- kdeui/kaboutdialog.h | 16 +- kdeui/kaboutdialog_private.h | 6 +- kdeui/kaboutkde.cpp | 8 +- kdeui/kaccelgen.h | 4 +- kdeui/kaction.cpp | 78 +-- kdeui/kaction.h | 6 +- kdeui/kactionclasses.cpp | 126 ++--- kdeui/kactionclasses.h | 14 + kdeui/kactioncollection.cpp | 16 +- kdeui/kactioncollection.h | 2 +- kdeui/kactionselector.cpp | 4 +- kdeui/kactivelabel.cpp | 12 +- kdeui/kactivelabel.h | 6 +- kdeui/kanimwidget.cpp | 8 +- kdeui/kanimwidget.h | 2 +- kdeui/karrowbutton.cpp | 14 +- kdeui/karrowbutton.h | 10 +- kdeui/kauthicon.cpp | 12 +- kdeui/kauthicon.h | 4 +- kdeui/kbugreport.cpp | 72 +-- kdeui/kbuttonbox.cpp | 18 +- kdeui/kbuttonbox.h | 6 +- kdeui/kcharselect.cpp | 116 ++-- kdeui/kcharselect.h | 8 +- kdeui/kcmenumngr.cpp | 14 +- kdeui/kcmenumngr.h | 4 +- kdeui/kcmodule.h | 2 +- kdeui/kcolorbutton.cpp | 26 +- kdeui/kcolorbutton.h | 4 +- kdeui/kcolorcombo.cpp | 4 +- kdeui/kcolorcombo.h | 2 +- kdeui/kcolordialog.cpp | 78 +-- kdeui/kcolordialog.h | 8 +- kdeui/kcolordrag.cpp | 12 +- kdeui/kcolordrag.h | 2 +- kdeui/kcombobox.cpp | 6 +- kdeui/kcommand.cpp | 18 +- kdeui/kcommand.h | 2 +- kdeui/kcompletionbox.cpp | 46 +- kdeui/kcompletionbox.h | 2 +- kdeui/kconfigdialog.cpp | 4 +- kdeui/kcursor.cpp | 34 +- kdeui/kcursor.h | 4 +- kdeui/kcursor_private.h | 4 +- kdeui/kdatepicker.cpp | 36 +- kdeui/kdatepicker.h | 8 +- kdeui/kdatetbl.cpp | 112 ++-- kdeui/kdatetbl.h | 18 +- kdeui/kdatetimewidget.cpp | 4 +- kdeui/kdatetimewidget.h | 2 +- kdeui/kdatewidget.cpp | 4 +- kdeui/kdatewidget.h | 2 +- kdeui/kdcopactionproxy.cpp | 2 +- kdeui/kdetrayproxy/kdetrayproxy.cpp | 16 +- kdeui/kdetrayproxy/kdetrayproxy.h | 2 +- kdeui/kdialog.cpp | 10 +- kdeui/kdialog.h | 4 +- kdeui/kdialogbase.cpp | 106 ++-- kdeui/kdialogbase.h | 16 +- kdeui/kdialogbase_priv.h | 2 +- kdeui/kdockwidget.cpp | 186 +++---- kdeui/kdockwidget.h | 20 +- kdeui/kdockwidget_private.cpp | 84 +-- kdeui/kdockwidget_private.h | 10 +- kdeui/kdualcolorbutton.cpp | 48 +- kdeui/kdualcolorbutton.h | 4 +- kdeui/keditcl.h | 4 +- kdeui/keditcl1.cpp | 16 +- kdeui/keditcl2.cpp | 16 +- kdeui/keditlistbox.cpp | 6 +- kdeui/keditlistbox.h | 7 +- kdeui/kedittoolbar.cpp | 42 +- kdeui/kfontcombo.cpp | 8 +- kdeui/kfontdialog.cpp | 48 +- kdeui/kfontdialog.h | 4 +- kdeui/kfontrequester.cpp | 2 +- kdeui/kfontrequester.h | 2 +- kdeui/kguiitem.cpp | 2 +- kdeui/khelpmenu.cpp | 8 +- kdeui/khelpmenu.h | 2 +- kdeui/kiconview.cpp | 34 +- kdeui/kiconview.h | 4 +- kdeui/kiconviewsearchline.cpp | 2 +- kdeui/kinputdialog.cpp | 8 +- kdeui/kinputdialog.h | 2 +- kdeui/kjanuswidget.cpp | 70 +-- kdeui/kjanuswidget.h | 14 +- kdeui/kkeybutton.cpp | 18 +- kdeui/kkeybutton.h | 2 +- kdeui/kkeydialog.cpp | 14 +- kdeui/kkeydialog.h | 2 +- kdeui/klanguagebutton.cpp | 14 +- kdeui/klanguagebutton.h | 2 +- kdeui/kled.cpp | 52 +- kdeui/kled.h | 24 +- kdeui/klineedit.cpp | 36 +- kdeui/klineeditdlg.cpp | 4 +- kdeui/klineeditdlg.h | 2 +- kdeui/klistbox.cpp | 4 +- kdeui/klistbox.h | 2 +- kdeui/klistview.cpp | 136 ++--- kdeui/klistview.h | 9 +- kdeui/klistviewsearchline.cpp | 10 +- kdeui/klistviewsearchline.h | 2 +- kdeui/kmainwindow.cpp | 74 +-- kdeui/kmainwindow.h | 24 +- kdeui/kmainwindowiface.cpp | 2 +- kdeui/kmenubar.cpp | 72 +-- kdeui/kmenubar.h | 4 +- kdeui/kmessagebox.cpp | 36 +- kdeui/knuminput.cpp | 74 +-- kdeui/knuminput.h | 20 +- kdeui/knumvalidator.cpp | 28 +- kdeui/kpanelapplet.cpp | 24 +- kdeui/kpanelapplet.h | 14 +- kdeui/kpanelappmenu.cpp | 2 +- kdeui/kpanelextension.cpp | 14 +- kdeui/kpanelextension.h | 16 +- kdeui/kpassdlg.cpp | 58 +- kdeui/kpassdlg.h | 2 +- kdeui/kpassivepopup.cpp | 22 +- kdeui/kpassivepopup.h | 2 +- kdeui/kpixmapio.cpp | 152 +++--- kdeui/kpixmapregionselectorwidget.cpp | 18 +- kdeui/kpixmapregionselectorwidget.h | 2 +- kdeui/kpopupmenu.cpp | 45 +- kdeui/kpopupmenu.h | 6 +- kdeui/kprogress.cpp | 6 +- kdeui/kprogress.h | 2 +- kdeui/kpushbutton.cpp | 4 +- kdeui/kpushbutton.h | 2 +- kdeui/krootpixmap.cpp | 28 +- kdeui/krootpixmap.h | 10 +- kdeui/kruler.cpp | 46 +- kdeui/kruler.h | 10 +- kdeui/ksconfig.cpp | 20 +- kdeui/ksconfig.h | 2 +- kdeui/kscrollview.h | 2 +- kdeui/kselect.cpp | 56 +- kdeui/kselect.h | 8 +- kdeui/kseparator.cpp | 10 +- kdeui/kseparator.h | 4 +- kdeui/ksharedpixmap.cpp | 2 +- kdeui/ksharedpixmap.h | 4 + kdeui/kshortcutdialog.cpp | 4 +- kdeui/kshortcutdialog_advanced.ui | 22 +- kdeui/kshortcutdialog_simple.ui | 10 +- kdeui/kspell.cpp | 50 +- kdeui/kspell.h | 2 +- kdeui/kspelldlg.cpp | 2 +- kdeui/kspellui.ui | 36 +- kdeui/ksplashscreen.h | 2 +- kdeui/ksqueezedtextlabel.cpp | 16 +- kdeui/ksqueezedtextlabel.h | 6 +- kdeui/kstatusbar.cpp | 8 +- kdeui/kstatusbar.h | 8 +- kdeui/kstdaction.cpp | 2 +- kdeui/kstdguiitem.cpp | 60 +-- kdeui/kstdguiitem.h | 2 +- kdeui/kstringvalidator.cpp | 6 +- kdeui/kstringvalidator.h | 2 +- kdeui/kswitchlanguagedialog.cpp | 14 +- kdeui/ksyntaxhighlighter.cpp | 34 +- kdeui/ksyntaxhighlighter.h | 2 +- kdeui/ksystemtray.cpp | 38 +- kdeui/ksystemtray.h | 6 +- kdeui/ktabbar.cpp | 50 +- kdeui/ktabbar.h | 2 +- kdeui/ktabctl.cpp | 54 +- kdeui/ktabctl.h | 6 +- kdeui/ktabwidget.cpp | 20 +- kdeui/ktabwidget.h | 2 +- kdeui/ktextbrowser.cpp | 2 +- kdeui/ktextbrowser.h | 2 +- kdeui/ktextedit.cpp | 4 +- kdeui/ktextedit.h | 2 +- kdeui/ktimewidget.cpp | 4 +- kdeui/ktimewidget.h | 2 +- kdeui/ktip.cpp | 24 +- kdeui/ktoolbar.cpp | 128 ++--- kdeui/ktoolbar.h | 16 +- kdeui/ktoolbarbutton.cpp | 68 +-- kdeui/ktoolbarbutton.h | 10 +- kdeui/ktoolbarhandler.cpp | 4 +- kdeui/ktoolbarlabelaction.cpp | 8 +- kdeui/ktoolbarradiogroup.cpp | 6 +- kdeui/ktoolbarradiogroup.h | 2 +- kdeui/kurllabel.cpp | 36 +- kdeui/kurllabel.h | 6 +- kdeui/kwhatsthismanager.cpp | 14 +- kdeui/kwhatsthismanager_p.h | 2 +- kdeui/kwindowinfo.h | 2 +- kdeui/kwindowlistmenu.cpp | 8 +- kdeui/kwindowlistmenu.h | 4 + kdeui/kwizard.h | 2 +- kdeui/kwordwrap.cpp | 4 +- kdeui/kwordwrap.h | 6 +- kdeui/kxmlguibuilder.cpp | 80 +-- kdeui/kxmlguiclient.cpp | 26 +- kdeui/kxmlguifactory.cpp | 10 +- kdeui/kxmlguifactory.h | 2 +- kdeui/kxmlguifactory_p.cpp | 14 +- kdeui/qxembed.cpp | 194 ++++--- kdeui/qxembed.h | 11 +- kdeui/tests/itemcontainertest.h | 2 +- kdeui/tests/kalphaicontest.h | 2 +- kdeui/tests/kblendtest.cpp | 2 +- kdeui/tests/kblendtest.h | 2 +- kdeui/tests/kbuttonboxtest.cpp | 24 +- kdeui/tests/kcharselecttest.cpp | 2 +- kdeui/tests/kcolortest.cpp | 6 +- kdeui/tests/kcolortest.h | 2 +- kdeui/tests/kcomboboxtest.cpp | 10 +- kdeui/tests/kcomboboxtest.h | 2 +- kdeui/tests/kcompletiontest.cpp | 2 +- kdeui/tests/kcompletiontest.h | 2 +- kdeui/tests/kdesattest.cpp | 2 +- kdeui/tests/kdesattest.h | 2 +- kdeui/tests/kdialogbasetest.cpp | 2 +- kdeui/tests/kdockwidgetdemo.cpp | 12 +- kdeui/tests/kdockwidgetdemo.h | 12 +- kdeui/tests/kdockwidgettest.cpp | 4 +- kdeui/tests/kdualcolortest.cpp | 6 +- kdeui/tests/kdualcolortest.h | 2 +- kdeui/tests/keditlistboxtest.cpp | 12 +- kdeui/tests/kgradienttest.h | 2 +- kdeui/tests/khashtest.h | 2 +- kdeui/tests/kledtest.cpp | 6 +- kdeui/tests/kledtest.h | 4 +- kdeui/tests/klineedittest.h | 2 +- kdeui/tests/kmessageboxtest.cpp | 24 +- kdeui/tests/knuminputtest.h | 2 +- kdeui/tests/kpanelmenutest.cpp | 2 +- kdeui/tests/kpanelmenutest.h | 2 +- kdeui/tests/kpopuptest.cpp | 2 +- kdeui/tests/krulertest.cpp | 12 +- kdeui/tests/krulertest.h | 2 +- kdeui/tests/ktabctltest.h | 2 +- kdeui/tests/ktabwidgettest.cpp | 6 +- kdeui/tests/ktabwidgettest.h | 2 +- kdeui/tests/kunbalancedgrdtest.cpp | 2 +- kdeui/tests/kunbalancedgrdtest.h | 4 +- kdeui/tests/kwizardtest.cpp | 2 +- kdewidgets/makekdewidgets.cpp | 18 +- kdoctools/kio_help.cpp | 30 +- kdoctools/kio_help.h | 2 +- kdoctools/meinproc.cpp | 12 +- kdoctools/xslt.cpp | 12 +- khtml/DESIGN.html | 2 +- khtml/css/css_base.cpp | 2 +- khtml/css/css_renderstyledeclarationimpl.cpp | 2 +- khtml/css/css_stylesheetimpl.cpp | 4 +- khtml/css/css_stylesheetimpl.h | 6 +- khtml/css/css_valueimpl.cpp | 18 +- khtml/css/csshelper.cpp | 2 +- khtml/css/cssparser.cpp | 18 +- khtml/css/cssproperties.c | 4 +- khtml/css/cssstyleselector.cpp | 70 +-- khtml/css/cssstyleselector.h | 2 +- khtml/css/html4.css | 12 +- khtml/dom/css_extensions.cpp | 6 +- khtml/dom/css_extensions.h | 8 +- khtml/dom/css_value.cpp | 8 +- khtml/dom/css_value.h | 2 +- khtml/dom/dom_doc.cpp | 4 +- khtml/dom/dom_node.h | 2 +- khtml/dom/dom_string.cpp | 18 +- khtml/dom/dom_string.h | 2 +- khtml/dom/html_block.h | 6 +- khtml/dom/html_element.cpp | 2 +- khtml/dom/html_form.h | 2 +- khtml/dom/html_image.cpp | 2 +- khtml/dom/html_image.h | 12 +- khtml/dom/html_inline.cpp | 2 +- khtml/dom/html_inline.h | 12 +- khtml/dom/html_table.h | 26 +- khtml/ecma/kjs_binding.cpp | 4 +- khtml/ecma/kjs_css.cpp | 2 +- khtml/ecma/kjs_debugwin.cpp | 12 +- khtml/ecma/kjs_dom.cpp | 4 +- khtml/ecma/kjs_events.cpp | 4 +- khtml/ecma/kjs_html.cpp | 8 +- khtml/ecma/kjs_navigator.cpp | 38 +- khtml/ecma/kjs_proxy.cpp | 10 +- khtml/ecma/kjs_window.cpp | 88 +-- khtml/ecma/xmlhttprequest.cpp | 24 +- khtml/html/html_baseimpl.cpp | 4 +- khtml/html/html_documentimpl.cpp | 30 +- khtml/html/html_elementimpl.cpp | 34 +- khtml/html/html_elementimpl.h | 2 +- khtml/html/html_formimpl.cpp | 20 +- khtml/html/html_imageimpl.cpp | 22 +- khtml/html/html_imageimpl.h | 4 +- khtml/html/html_miscimpl.cpp | 2 +- khtml/html/html_objectimpl.cpp | 8 +- khtml/html/htmltokenizer.cpp | 34 +- khtml/html/htmltokenizer.h | 4 +- khtml/htmlpageinfo.ui | 4 +- khtml/java/kjavaapplet.h | 2 +- khtml/java/kjavaappletcontext.cpp | 16 +- khtml/java/kjavaappletcontext.h | 2 +- khtml/java/kjavaappletserver.cpp | 40 +- khtml/java/kjavaappletserver.h | 4 +- khtml/java/kjavaappletviewer.cpp | 32 +- khtml/java/kjavaappletwidget.cpp | 10 +- khtml/java/kjavaappletwidget.h | 4 +- khtml/java/kjavadownloader.h | 2 +- khtml/java/kjavaprocess.cpp | 2 +- khtml/khtml_caret.cpp | 12 +- khtml/khtml_caret_p.h | 4 +- khtml/khtml_ext.cpp | 8 +- khtml/khtml_factory.cpp | 4 +- khtml/khtml_factory.h | 2 +- khtml/khtml_pagecache.cpp | 12 +- khtml/khtml_pagecache.h | 4 +- khtml/khtml_part.cpp | 200 +++---- khtml/khtml_part.h | 6 +- khtml/khtml_run.cpp | 2 +- khtml/khtml_settings.cc | 44 +- khtml/khtmlimage.cpp | 14 +- khtml/khtmlimage.h | 4 +- khtml/khtmlpart_p.h | 4 +- khtml/khtmlview.cpp | 114 ++-- khtml/khtmlview.h | 10 +- khtml/kjserrordlg.ui | 2 +- khtml/kmultipart/kmultipart.cpp | 14 +- khtml/kmultipart/kmultipart.h | 2 +- khtml/misc/arena.cpp | 4 +- khtml/misc/decoder.cpp | 8 +- khtml/misc/helper.cpp | 4 +- khtml/misc/helper.h | 2 +- khtml/misc/htmlattrs.c | 4 +- khtml/misc/khtmllayout.h | 4 +- khtml/misc/knsplugininstaller.h | 2 +- khtml/misc/loader.cpp | 20 +- khtml/misc/loader.h | 2 +- khtml/misc/loader_jpeg.cpp | 4 +- khtml/misc/loader_jpeg.h | 2 +- khtml/misc/multimap.h | 8 +- khtml/misc/stringit.h | 6 +- khtml/rendering/bidi.cpp | 28 +- khtml/rendering/break_lines.h | 8 +- khtml/rendering/enumerate.cpp | 2 +- khtml/rendering/font.cpp | 2 +- khtml/rendering/render_applet.cpp | 18 +- khtml/rendering/render_arena.cpp | 4 +- khtml/rendering/render_block.cpp | 6 +- khtml/rendering/render_body.cpp | 4 +- khtml/rendering/render_body.h | 2 +- khtml/rendering/render_box.cpp | 16 +- khtml/rendering/render_box.h | 4 +- khtml/rendering/render_canvas.cpp | 26 +- khtml/rendering/render_canvas.h | 8 +- khtml/rendering/render_container.cpp | 6 +- khtml/rendering/render_flow.cpp | 10 +- khtml/rendering/render_flow.h | 2 +- khtml/rendering/render_form.cpp | 40 +- khtml/rendering/render_frames.cpp | 42 +- khtml/rendering/render_frames.h | 4 +- khtml/rendering/render_generated.cpp | 2 +- khtml/rendering/render_image.cpp | 6 +- khtml/rendering/render_layer.cpp | 26 +- khtml/rendering/render_layer.h | 8 +- khtml/rendering/render_list.cpp | 12 +- khtml/rendering/render_object.cpp | 46 +- khtml/rendering/render_object.h | 16 +- khtml/rendering/render_replaced.cpp | 22 +- khtml/rendering/render_style.cpp | 6 +- khtml/rendering/render_style.h | 16 +- khtml/rendering/render_table.cpp | 8 +- khtml/rendering/render_table.h | 2 +- khtml/rendering/render_text.cpp | 26 +- khtml/rendering/render_text.h | 4 +- khtml/test/align2.html | 10 +- khtml/test/image_map.html | 10 +- khtml/test_regression.cpp | 30 +- khtml/test_regression.h | 4 +- khtml/test_regression_fontoverload.cpp | 4 +- khtml/testkhtml.cpp | 12 +- khtml/testkhtml.h | 2 +- khtml/xml/dom2_eventsimpl.cpp | 32 +- khtml/xml/dom_docimpl.cpp | 30 +- khtml/xml/dom_docimpl.h | 4 +- khtml/xml/dom_elementimpl.cpp | 2 +- khtml/xml/dom_nodeimpl.cpp | 4 +- khtml/xml/dom_nodeimpl.h | 20 +- khtml/xml/dom_restyler.cpp | 6 +- khtml/xml/dom_stringimpl.cpp | 16 +- khtml/xml/dom_stringimpl.h | 2 +- khtml/xml/dom_xmlimpl.h | 2 +- khtml/xml/xml_tokenizer.cpp | 16 +- khtml/xml/xml_tokenizer.h | 8 +- kimgio/dds.cpp | 48 +- kimgio/eps.cpp | 10 +- kimgio/exr.cpp | 4 +- kimgio/hdr.cpp | 20 +- kimgio/ico.cpp | 52 +- kimgio/jp2.cpp | 16 +- kimgio/pcx.cpp | 68 +-- kimgio/pcx.h | 62 +-- kimgio/psd.cpp | 28 +- kimgio/rgb.cpp | 82 +-- kimgio/rgb.h | 30 +- kimgio/tga.cpp | 50 +- kimgio/tiffr.cpp | 4 +- kimgio/xcf.cpp | 174 +++--- kimgio/xcf.h | 58 +- kimgio/xview.cpp | 20 +- kinit/kinit.cpp | 2 +- kinit/klauncher.cpp | 4 +- kinit/klauncher.h | 2 +- kinit/tests/klaunchertest.cpp | 4 +- kio/bookmarks/dptrtemplate.h | 4 +- kio/bookmarks/kbookmark.cc | 6 +- kio/bookmarks/kbookmark.h | 4 +- kio/bookmarks/kbookmarkbar.cc | 6 +- kio/bookmarks/kbookmarkbar.h | 7 +- kio/bookmarks/kbookmarkdrag.cc | 12 +- kio/bookmarks/kbookmarkdrag.h | 4 +- kio/bookmarks/kbookmarkimporter.h | 2 +- kio/bookmarks/kbookmarkimporter_crash.cc | 8 +- kio/bookmarks/kbookmarkimporter_crash.h | 2 +- kio/bookmarks/kbookmarkimporter_ie.cc | 6 +- kio/bookmarks/kbookmarkimporter_ie.h | 2 +- kio/bookmarks/kbookmarkimporter_kde1.cc | 2 +- kio/bookmarks/kbookmarkimporter_ns.cc | 14 +- kio/bookmarks/kbookmarkimporter_ns.h | 2 +- kio/bookmarks/kbookmarkimporter_opera.h | 2 +- kio/bookmarks/kbookmarkmanager.cc | 20 +- kio/bookmarks/kbookmarkmenu.cc | 10 +- kio/bookmarks/kbookmarkmenu.h | 8 +- kio/bookmarks/kbookmarkmenu_p.h | 2 +- kio/httpfilter/httpfilter.cc | 2 +- kio/httpfilter/httpfilter.h | 2 +- kio/kfile/config-kfile.h | 30 +- kio/kfile/images.h | 2 +- kio/kfile/kacleditwidget.cpp | 28 +- kio/kfile/kacleditwidget.h | 7 +- kio/kfile/kacleditwidget_p.h | 12 +- kio/kfile/kcombiview.cpp | 6 +- kio/kfile/kcustommenueditor.cpp | 12 +- kio/kfile/kdiroperator.cpp | 122 ++--- kio/kfile/kdiroperator.h | 4 +- kio/kfile/kdirselectdialog.cpp | 16 +- kio/kfile/kdirsize.cpp | 6 +- kio/kfile/kdiskfreesp.cpp | 24 +- kio/kfile/kdiskfreesp.h | 2 +- kio/kfile/kencodingfiledialog.cpp | 2 +- kio/kfile/kfiledetailview.cpp | 2 +- kio/kfile/kfiledetailview.h | 2 +- kio/kfile/kfiledialog.cpp | 86 +-- kio/kfile/kfilefiltercombo.cpp | 12 +- kio/kfile/kfileiconview.cpp | 40 +- kio/kfile/kfilemetainfowidget.cpp | 6 +- kio/kfile/kfilemetainfowidget.h | 2 +- kio/kfile/kfilemetapreview.cpp | 18 +- kio/kfile/kfilepreview.cpp | 10 +- kio/kfile/kfilesharedlg.cpp | 4 +- kio/kfile/kfilespeedbar.cpp | 10 +- kio/kfile/kfilespeedbar.h | 2 +- kio/kfile/kfiletreebranch.cpp | 2 +- kio/kfile/kfiletreeview.cpp | 10 +- kio/kfile/kfiletreeview.h | 2 +- kio/kfile/kfileview.cpp | 2 +- kio/kfile/kfileview.h | 6 +- kio/kfile/kicondialog.cpp | 18 +- kio/kfile/kicondialog.h | 2 +- kio/kfile/kimagefilepreview.cpp | 6 +- kio/kfile/kimagefilepreview.h | 2 +- kio/kfile/kmetaprops.cpp | 14 +- kio/kfile/knotifydialog.cpp | 36 +- kio/kfile/knotifydialog.h | 2 +- kio/kfile/knotifywidgetbase.ui | 44 +- kio/kfile/kopenwith.cpp | 56 +- kio/kfile/kopenwith_p.h | 2 +- kio/kfile/kpreviewwidgetbase.h | 4 +- kio/kfile/kpropertiesdesktopadvbase.ui | 33 +- kio/kfile/kpropertiesdesktopbase.ui | 28 +- kio/kfile/kpropertiesdialog.cpp | 138 ++--- kio/kfile/kpropertiesdialog.h | 2 +- kio/kfile/kpropertiesmimetypebase.ui | 4 +- kio/kfile/krecentdirs.cpp | 4 +- kio/kfile/krecentdocument.cpp | 32 +- kio/kfile/kurlbar.cpp | 60 +-- kio/kfile/kurlbar.h | 12 +- kio/kfile/kurlcombobox.cpp | 8 +- kio/kfile/kurlrequester.cpp | 16 +- kio/kfile/kurlrequester.h | 2 +- kio/kfile/kurlrequesterdlg.cpp | 2 +- kio/kfile/tests/kdirselectdialogtest.cpp | 2 +- kio/kfile/tests/kfdtest.cpp | 4 +- kio/kfile/tests/kfdtest.h | 2 +- kio/kfile/tests/kfiletreeviewtest.cpp | 2 +- kio/kfile/tests/kfstest.cpp | 38 +- kio/kfile/tests/kurlrequestertest.cpp | 2 +- kio/kio/authinfo.cpp | 28 +- kio/kio/chmodjob.cpp | 2 +- kio/kio/connection.h | 2 +- kio/kio/dataprotocol.cpp | 6 +- kio/kio/dataslave.cpp | 2 +- kio/kio/defaultprogress.cpp | 12 +- kio/kio/forwardingslavebase.cpp | 26 +- kio/kio/global.cpp | 30 +- kio/kio/global.h | 6 +- kio/kio/job.cpp | 100 ++-- kio/kio/jobclasses.h | 6 +- kio/kio/kacl.cpp | 16 +- kio/kio/kar.cpp | 6 +- kio/kio/karchive.cpp | 14 +- kio/kio/karchive.h | 8 +- kio/kio/kautomount.h | 8 +- kio/kio/kdatatool.cpp | 14 +- kio/kio/kdatatool.h | 4 +- kio/kio/kdirlister.cpp | 24 +- kio/kio/kdirlister.h | 2 +- kio/kio/kdirwatch.cpp | 26 +- kio/kio/kdirwatch.h | 2 +- kio/kio/kdirwatch_p.h | 4 +- kio/kio/kfileitem.cpp | 10 +- kio/kio/kfilemetainfo.cpp | 76 +-- kio/kio/kfilemetainfo.h | 2 +- kio/kio/kfileshare.cpp | 10 +- kio/kio/kfileshare.h | 2 +- kio/kio/kfilterdev.cpp | 52 +- kio/kio/kfilterdev.h | 10 +- kio/kio/kimageio.cpp | 34 +- kio/kio/klimitediodevice.h | 14 +- kio/kio/kmimemagic.cpp | 8 +- kio/kio/kmimetype.cpp | 24 +- kio/kio/kmimetypechooser.cpp | 26 +- kio/kio/kmimetypechooser.h | 2 +- kio/kio/kmimetyperesolver.h | 2 +- kio/kio/knfsshare.cpp | 8 +- kio/kio/kprotocolmanager.cpp | 12 +- kio/kio/kremoteencoding.cpp | 4 +- kio/kio/krun.cpp | 26 +- kio/kio/krun.h | 4 +- kio/kio/ksambashare.cpp | 6 +- kio/kio/kscan.cpp | 8 +- kio/kio/kservice.cpp | 54 +- kio/kio/kservicefactory.cpp | 26 +- kio/kio/kservicegroup.cpp | 28 +- kio/kio/kservicegroupfactory.cpp | 8 +- kio/kio/kservicetype.cpp | 22 +- kio/kio/kservicetypefactory.cpp | 32 +- kio/kio/kservicetypefactory.h | 2 +- kio/kio/kshellcompletion.cpp | 8 +- kio/kio/ktar.cpp | 28 +- kio/kio/ktar.h | 4 +- kio/kio/ktrader.h | 2 +- kio/kio/ktraderparsetree.cpp | 10 +- kio/kio/kurifilter.cpp | 14 +- kio/kio/kurifilter.h | 3 +- kio/kio/kurlcompletion.cpp | 16 +- kio/kio/kuserprofile.cpp | 8 +- kio/kio/kzip.cpp | 34 +- kio/kio/kzip.h | 16 +- kio/kio/metainfojob.cpp | 2 +- kio/kio/netaccess.cpp | 20 +- kio/kio/netaccess.h | 4 +- kio/kio/passdlg.cpp | 34 +- kio/kio/paste.cpp | 22 +- kio/kio/previewjob.cpp | 26 +- kio/kio/renamedlg.cpp | 12 +- kio/kio/renamedlg.h | 2 +- kio/kio/renamedlgplugin.h | 2 +- kio/kio/scheduler.cpp | 36 +- kio/kio/sessiondata.cpp | 12 +- kio/kio/sessiondata.h | 2 +- kio/kio/skipdlg.cpp | 12 +- kio/kio/slave.cpp | 8 +- kio/kio/slavebase.cpp | 32 +- kio/kio/slavebase.h | 12 +- kio/kio/slaveconfig.cpp | 16 +- kio/kio/slaveconfig.h | 2 +- kio/kio/slaveinterface.cpp | 18 +- kio/kio/slaveinterface.h | 6 +- kio/kio/statusbarprogress.cpp | 6 +- kio/kio/tcpslavebase.cpp | 2 +- kio/kioexec/main.cpp | 2 +- kio/kioexec/main.h | 2 +- kio/kpasswdserver/kpasswdserver.cpp | 28 +- kio/kssl/keygenwizard.ui | 6 +- kio/kssl/keygenwizard2.ui | 14 +- kio/kssl/kopenssl.cc | 2 +- kio/kssl/kssl/caroot/ca-bundle.crt | 4 +- kio/kssl/ksslcertdlg.cc | 4 +- kio/kssl/ksslcertificate.cc | 6 +- kio/kssl/ksslcertificatecache.cc | 4 +- kio/kssl/ksslinfodlg.cc | 26 +- kio/kssl/ksslpeerinfo.cc | 2 +- kio/kssl/ksslsettings.cc | 2 +- kio/kssl/ksslx509map.cc | 10 +- kio/misc/kdesasl/kdesasl.cpp | 8 +- kio/misc/kfile/fileprops.cpp | 20 +- kio/misc/kntlm/des.cpp | 18 +- kio/misc/kntlm/des.h | 2 +- kio/misc/kntlm/kntlm.cpp | 70 +-- kio/misc/kntlm/kntlm.h | 38 +- kio/misc/kntlm/kswap.h | 96 ++-- kio/misc/kpac/discovery.cpp | 2 +- kio/misc/kpac/downloader.h | 2 +- kio/misc/kpac/proxyscout.cpp | 4 +- kio/misc/kpac/script.cpp | 2 +- kio/misc/ksendbugmail/main.cpp | 8 +- kio/misc/ksendbugmail/smtp.cpp | 26 +- kio/misc/kssld/kssld.cpp | 48 +- kio/misc/kwalletd/kbetterthankdialogbase.ui | 22 +- kio/misc/kwalletd/ktimeout.cpp | 6 +- kio/misc/kwalletd/kwalletd.cpp | 64 +-- kio/misc/kwalletd/kwalletd.h | 2 +- kio/misc/kwalletd/kwalletwizard.ui | 84 +-- kio/misc/uiserver.cpp | 14 +- kio/tests/dataprotocoltest.cpp | 2 +- kio/tests/jobtest.cpp | 2 +- kio/tests/jobtest.h | 2 +- kio/tests/kacltest.cpp | 30 +- kio/tests/kdcopcheck.h | 2 +- kio/tests/kdefaultprogresstest.cpp | 4 +- kio/tests/kdirlistertest.cpp | 2 +- kio/tests/kdirlistertest.h | 4 +- kio/tests/kdirwatchunittest.cpp | 8 +- kio/tests/kioslavetest.cpp | 10 +- kio/tests/kruntest.h | 2 +- kio/tests/ksycocatest.cpp | 2 +- kio/tests/kurifiltertest.cpp | 4 +- kio/tests/kurlcompletiontest.cpp | 8 +- kio/tests/previewtest.h | 2 +- kioslave/file/file.cc | 38 +- kioslave/ftp/ftp.cc | 20 +- kioslave/http/http.cc | 144 ++--- kioslave/http/http.h | 2 +- kioslave/http/http_cache_cleaner.cpp | 10 +- kioslave/http/kcookiejar/kcookiejar.cpp | 56 +- kioslave/http/kcookiejar/kcookiejar.h | 2 +- kioslave/http/kcookiejar/kcookieserver.cpp | 14 +- kioslave/http/kcookiejar/kcookiewin.cpp | 16 +- kioslave/http/kcookiejar/kcookiewin.h | 2 +- kioslave/http/kcookiejar/tests/kcookiejartest.cpp | 14 +- kioslave/iso/iso.cpp | 16 +- kioslave/iso/kiso.cpp | 2 +- kioslave/iso/kisofile.cpp | 2 +- kjs/internal.cpp | 2 +- kjs/lexer.cpp | 2 +- kjs/lexer.h | 2 +- kjs/regexp.cpp | 10 +- kjs/regexp_object.cpp | 2 +- kjs/ustring.cpp | 6 +- kjs/ustring.h | 6 +- kmdi/kmdi/dockcontainer.cpp | 28 +- kmdi/kmdi/guiclient.cpp | 4 +- kmdi/kmdi/mainwindow.cpp | 36 +- kmdi/kmdi/mainwindow.h | 2 +- kmdi/kmdi/tabwidget.cpp | 6 +- kmdi/kmdi/toolviewaccessor.cpp | 4 +- kmdi/kmdi/toolviewaccessor.h | 2 +- kmdi/kmdichildarea.cpp | 6 +- kmdi/kmdichildarea.h | 2 +- kmdi/kmdichildfrm.cpp | 44 +- kmdi/kmdichildfrm.h | 14 +- kmdi/kmdichildfrmcaption.cpp | 6 +- kmdi/kmdichildfrmcaption.h | 2 +- kmdi/kmdichildview.cpp | 8 +- kmdi/kmdichildview.h | 10 +- kmdi/kmdidockcontainer.cpp | 26 +- kmdi/kmdidocumentviewtabwidget.cpp | 8 +- kmdi/kmdifocuslist.h | 2 +- kmdi/kmdiguiclient.cpp | 4 +- kmdi/kmdimainfrm.cpp | 90 ++-- kmdi/kmdimainfrm.h | 8 +- kmdi/kmditaskbar.cpp | 12 +- kmdi/kmditaskbar.h | 2 +- kmdi/kmditoolviewaccessor.cpp | 6 +- kmdi/kmditoolviewaccessor.h | 2 +- kmdi/test/hello.cpp | 6 +- kmdi/test/hello.h | 2 +- knewstuff/downloaddialog.cpp | 30 +- knewstuff/engine.cpp | 10 +- knewstuff/engine.h | 12 +- knewstuff/entry.cpp | 16 +- knewstuff/ghns.h | 2 +- knewstuff/knewstuff.cpp | 12 +- knewstuff/knewstuff.h | 10 +- knewstuff/knewstuffgeneric.cpp | 2 +- knewstuff/knewstuffsecure.cpp | 16 +- knewstuff/knewstuffsecure.h | 4 +- knewstuff/provider.cpp | 10 +- knewstuff/provider.h | 6 +- knewstuff/security.cpp | 16 +- knewstuff/security.h | 2 +- knewstuff/testnewstuff.h | 2 +- kparts/browserextension.cpp | 30 +- kparts/browserextension.h | 8 +- kparts/browserinterface.cpp | 16 +- kparts/browserinterface.h | 2 +- kparts/browserrun.cpp | 10 +- kparts/browserrun.h | 2 +- kparts/componentfactory.h | 34 +- kparts/dockmainwindow.cpp | 8 +- kparts/dockmainwindow.h | 2 +- kparts/event.h | 2 +- kparts/factory.cpp | 6 +- kparts/factory.h | 8 +- kparts/genericfactory.h | 10 +- kparts/historyprovider.cpp | 6 +- kparts/historyprovider.h | 2 +- kparts/mainwindow.cpp | 8 +- kparts/mainwindow.h | 6 +- kparts/part.cpp | 18 +- kparts/part.h | 2 +- kparts/partmanager.cpp | 42 +- kparts/partmanager.h | 2 +- kparts/plugin.cpp | 10 +- kparts/statusbarextension.cpp | 8 +- kparts/statusbarextension.h | 2 +- kparts/tests/notepad.cpp | 4 +- kparts/tests/parts.cpp | 8 +- kparts/tests/parts.h | 4 +- krandr/ktimerdialog.cpp | 2 +- krandr/libkrandr.cc | 6 +- krandr/randr.h | 2 +- kresources/configdialog.cpp | 2 +- kresources/configpage.cpp | 16 +- kresources/configwidget.h | 2 +- kresources/factory.cpp | 10 +- kresources/manager.h | 2 +- kresources/managerimpl.cpp | 12 +- kresources/resource.h | 2 +- kresources/selectdialog.cpp | 4 +- kspell2/backgroundchecker.h | 2 +- kspell2/backgroundengine.h | 2 +- kspell2/backgroundthread.h | 2 +- kspell2/broker.cpp | 4 +- kspell2/client.h | 2 +- kspell2/plugins/ispell/ispell_checker.h | 2 +- kspell2/plugins/ispell/makedent.cpp | 2 +- kspell2/settings.cpp | 2 +- kspell2/tests/backgroundtest.h | 2 +- kspell2/tests/test_dialog.cpp | 2 +- kspell2/tests/test_dialog.h | 2 +- kspell2/threadevents.h | 4 +- kspell2/ui/configwidget.h | 2 +- kspell2/ui/highlighter.cpp | 2 +- kspell2/ui/highlighter.h | 2 +- kspell2/ui/kspell2ui.ui | 10 +- kstyles/highcolor/bitmaps.h | 18 +- kstyles/highcolor/highcolor.cpp | 159 +++--- kstyles/highcolor/highcolor.h | 10 +- kstyles/highcontrast/config/highcontrastconfig.h | 2 +- kstyles/highcontrast/highcontrast.cpp | 103 ++-- kstyles/highcontrast/highcontrast.h | 10 +- kstyles/keramik/bitmaps.h | 20 +- kstyles/keramik/genembed.cpp | 20 +- kstyles/keramik/gradients.cpp | 2 +- kstyles/keramik/keramik.cpp | 325 +++++------ kstyles/keramik/keramik.h | 10 +- kstyles/keramik/pixmaploader.cpp | 114 ++-- kstyles/klegacy/klegacystyle.cpp | 146 ++--- kstyles/kthemestyle/kthemebase.cpp | 212 ++++---- kstyles/kthemestyle/kthemebase.h | 36 +- kstyles/kthemestyle/kthemestyle.cpp | 328 ++++++------ kstyles/kthemestyle/kthemestyle.h | 12 +- kstyles/light/light.cpp | 5 +- kstyles/light/lightstyle-v2.cpp | 192 +++---- kstyles/light/lightstyle-v2.h | 10 +- kstyles/light/lightstyle-v3.cpp | 230 ++++---- kstyles/light/lightstyle-v3.h | 10 +- kstyles/plastik/config/plastikconf.h | 2 +- kstyles/plastik/misc.cpp | 6 +- kstyles/plastik/plastik.cpp | 258 ++++----- kstyles/plastik/plastik.h | 12 +- kstyles/utils/installtheme/main.cpp | 2 +- kstyles/web/webstyle.cpp | 32 +- kunittest/module.h | 4 +- kunittest/runner.cpp | 4 +- kunittest/runner.h | 2 +- kunittest/tester.cpp | 8 +- kunittest/tester.h | 4 +- kutils/kcmoduleinfo.cpp | 4 +- kutils/kcmoduleloader.cpp | 4 +- kutils/kcmoduleproxy.cpp | 30 +- kutils/kcmoduleproxy.h | 2 +- kutils/kcmultidialog.cpp | 8 +- kutils/kcmultidialog.h | 2 +- kutils/kfind.cpp | 22 +- kutils/kfind.h | 5 +- kutils/kfinddialog.cpp | 4 +- kutils/kmultitabbar.cpp | 114 ++-- kutils/kmultitabbar.h | 6 +- kutils/kmultitabbar_p.h | 2 +- kutils/kpluginselector.cpp | 24 +- kutils/kpluginselector.h | 2 +- kutils/kpluginselector_p.h | 2 +- kutils/kreplace.cpp | 10 +- kutils/kreplace.h | 2 +- kutils/kreplacedialog.cpp | 2 +- kutils/ksettings/componentsdialog.cpp | 4 +- kutils/ksettings/dialog.cpp | 8 +- kutils/ksettings/dialog.h | 2 +- kutils/ksettings/dispatcher.cpp | 6 +- kutils/ksettings/dispatcher.h | 2 +- kutils/tests/kfindtest.h | 2 +- kutils/tests/kreplacetest.cpp | 4 +- kutils/tests/kreplacetest.h | 2 +- kwallet/backend/kwalletbackend.cc | 44 +- kwallet/backend/kwalletbackend.h | 2 +- kwallet/client/kwallet.cc | 2 +- kwallet/client/kwallet.h | 5 + kwallet/tests/kwalletasync.cpp | 6 +- kwallet/tests/kwalletboth.cpp | 6 +- kwallet/tests/kwallettest.h | 2 +- libkmid/deviceman.cc | 2 +- libkscreensaver/kscreensaver.cpp | 4 +- libkscreensaver/kscreensaver.h | 4 +- libkscreensaver/main.cpp | 2 +- networkstatus/connectionmanager.cpp | 2 +- networkstatus/networkstatus.cpp | 2 +- win/qeventloopex.h | 2 +- win/win32_utils2.cpp | 6 +- 1403 files changed, 11183 insertions(+), 10958 deletions(-) diff --git a/KDE2PORTING.html b/KDE2PORTING.html index 1154682c8..0cd2e8a80 100644 --- a/KDE2PORTING.html +++ b/KDE2PORTING.html @@ -18,7 +18,7 @@ or this page online.

@@ -190,8 +190,8 @@ protected: const char *className, const TQStringList &args ) { KGenericFactoryBase::initializeMessageCatalogue(); - return KDEPrivate::ConcreteFactory - ::create( 0, 0, parent, name, className, args ); + return TQT_TQOBJECT((KDEPrivate::ConcreteFactory + ::create( 0, 0, parent, name, className, args ))); } }; @@ -216,7 +216,7 @@ protected: * const TQStringList &args); *
  • If the class is derived from KParts::Part then it needs to have * a constructor like: - * MyPart( TQWidget *parentWidget, const char *widgetName, + * MyPart( TQWidget *tqparentWidget, const char *widgetName, * TQObject *parent, const char *name, * const TQStringList &args ); * @@ -253,7 +253,7 @@ protected: * { * Q_ OBJECT * public: - * MyDialogComponent( TQWidget *parentWidget, const char *name, + * MyDialogComponent( TQWidget *tqparentWidget, const char *name, * const TQStringList &args ); * ... * }; @@ -311,7 +311,7 @@ protected: * const TQStringList &args); *
  • If the class is derived from KParts::Part then it needs to have * a constructor like: - * MyPart( TQWidget *parentWidget, const char *widgetName, + * MyPart( TQWidget *tqparentWidget, const char *widgetName, * TQObject *parent, const char *name, * const TQStringList &args ); * @@ -348,7 +348,7 @@ protected: * { * Q_ OBJECT * public: - * MyDialogComponent( TQWidget *parentWidget, const char *name, + * MyDialogComponent( TQWidget *tqparentWidget, const char *name, * const TQStringList &args ); * ... * }; diff --git a/kdecore/kgenericfactory.tcc b/kdecore/kgenericfactory.tcc index 41cd77824..22fbd7371 100644 --- a/kdecore/kgenericfactory.tcc +++ b/kdecore/kgenericfactory.tcc @@ -37,7 +37,7 @@ #ifndef KGENERICFACTORY_TCC #define KGENERICFACTORY_TCC -#include +#include #include namespace KParts @@ -69,11 +69,11 @@ namespace KDEPrivate */ template - struct QWidgetInheritanceTest + struct TQWidgetInheritanceTest { typedef Derived * DerivedPtr; - enum { Result = sizeof( InheritanceDetector::test( DerivedPtr() ) ) == - sizeof( InheritanceDetector::ConversionExists ) }; + enum { Result = sizeof( InheritanceDetector::test( DerivedPtr() ) ) == + sizeof( InheritanceDetector::ConversionExists ) }; }; template @@ -112,43 +112,43 @@ namespace KDEPrivate // but not least the standard default constructor of parent/name . // the choice of the right constructor is done using an ordered inheritance // test. - template + template class ConcreteFactory { public: typedef typename If< PartInheritanceTest< Product >::Result, KParts::Part, - typename If< QWidgetInheritanceTest< Product >::Result, - QWidget, QObject >::Result >::Result BaseType; + typename If< TQWidgetInheritanceTest< Product >::Result, + TQWidget, TQObject >::Result >::Result BaseType; - static inline Product *create( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const char *className, const QStringList &args ) + static inline Product *create( TQWidget *tqparentWidget, const char *widgetName, + TQObject *parent, const char *name, + const char *className, const TQStringList &args ) { - QMetaObject *metaObject = Product::staticMetaObject(); - while ( metaObject ) + TQMetaObject *tqmetaObject = Product::tqstaticMetaObject(); + while ( tqmetaObject ) { - if ( !qstrcmp( className, metaObject->className() ) ) - return create( parentWidget, widgetName, + if ( !qstrcmp( className, tqmetaObject->className() ) ) + return create( tqparentWidget, widgetName, parent, name, args, Type2Type() ); - metaObject = metaObject->superClass(); + tqmetaObject = tqmetaObject->tqsuperClass(); } return 0; } private: - typedef typename If< QWidgetInheritanceTest::Result, - ParentType, QWidget >::Result WidgetParentType; + typedef typename If< TQWidgetInheritanceTest::Result, + ParentType, TQWidget >::Result WidgetParentType; - static inline Product *create( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const QStringList &args, Type2Type ) + static inline Product *create( TQWidget *tqparentWidget, const char *widgetName, + TQObject *parent, const char *name, + const TQStringList &args, Type2Type ) { - return new Product( parentWidget, widgetName, parent, name, args ); + return new Product( tqparentWidget, widgetName, parent, name, args ); } - static inline Product *create( QWidget* /*parentWidget*/, const char* /*widgetName*/, - QObject *parent, const char *name, - const QStringList &args, Type2Type ) + static inline Product *create( TQWidget* /*tqparentWidget*/, const char* /*widgetName*/, + TQObject *parent, const char *name, + const TQStringList &args, Type2Type ) { WidgetParentType *p = dynamic_cast( parent ); @@ -157,9 +157,9 @@ namespace KDEPrivate return new Product( p, name, args ); } - static inline Product *create( QWidget* /*parentWidget*/, const char* /*widgetName*/, - QObject *parent, const char *name, - const QStringList &args, Type2Type ) + static inline Product *create( TQWidget* /*tqparentWidget*/, const char* /*widgetName*/, + TQObject *parent, const char *name, + const TQStringList &args, Type2Type ) { ParentType *p = dynamic_cast( parent ); if ( parent && !p ) @@ -171,16 +171,16 @@ namespace KDEPrivate // this template is used to iterate through the typelist and call the // concrete factory for each type. the specializations of this template // are the ones actually being responsible for iterating, in fact. - template + template class MultiFactory { public: - inline static QObject *create( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const char *className, - const QStringList &args ) + inline static TQObject *create( TQWidget *tqparentWidget, const char *widgetName, + TQObject *parent, const char *name, + const char *className, + const TQStringList &args ) { - return ConcreteFactory::create( parentWidget, widgetName, + return ConcreteFactory::create( tqparentWidget, widgetName, parent, name, className, args ); } @@ -193,9 +193,9 @@ namespace KDEPrivate class MultiFactory { public: - inline static QObject *create( QWidget *, const char *, QObject *, - const char *, const char *, - const QStringList & ) + inline static TQObject *create( TQWidget *, const char *, TQObject *, + const char *, const char *, + const TQStringList & ) { return 0; } }; @@ -205,29 +205,29 @@ namespace KDEPrivate class MultiFactory { public: - inline static QObject *create( QWidget *, const char *, QObject *, - const char *, const char *, - const QStringList & ) + inline static TQObject *create( TQWidget *, const char *, TQObject *, + const char *, const char *, + const TQStringList & ) { return 0; } }; template - class MultiFactory< KTypeList, QObject > + class MultiFactory< KTypeList, TQObject > { public: - inline static QObject *create( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const char *className, - const QStringList &args ) + inline static TQObject *create( TQWidget *tqparentWidget, const char *widgetName, + TQObject *parent, const char *name, + const char *className, + const TQStringList &args ) { // try with the head of the typelist first. the head is always // a concrete type. - QObject *object = MultiFactory::create( parentWidget, widgetName, - parent, name, className, - args ); + TQObject *object = MultiFactory::create( tqparentWidget, widgetName, + parent, name, className, + args ); if ( !object ) - object = MultiFactory::create( parentWidget, widgetName, + object = MultiFactory::create( tqparentWidget, widgetName, parent, name, className, args ); @@ -241,15 +241,15 @@ namespace KDEPrivate KTypeList > { public: - inline static QObject *create( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const char *className, - const QStringList &args ) + inline static TQObject *create( TQWidget *tqparentWidget, const char *widgetName, + TQObject *parent, const char *name, + const char *className, + const TQStringList &args ) { // try with the head of the typelist first. the head is always // a concrete type. - QObject *object = MultiFactory - ::create( parentWidget, widgetName, + TQObject *object = MultiFactory + ::create( tqparentWidget, widgetName, parent, name, className, args ); // if that failed continue by advancing the typelist, calling this @@ -257,7 +257,7 @@ namespace KDEPrivate // at the end we reach the nulltype specialization. if ( !object ) object = MultiFactory - ::create( parentWidget, widgetName, + ::create( tqparentWidget, widgetName, parent, name, className, args ); return object; diff --git a/kdecore/kglobal.cpp b/kdecore/kglobal.cpp index b886d8d7f..347e8d31c 100644 --- a/kdecore/kglobal.cpp +++ b/kdecore/kglobal.cpp @@ -127,7 +127,7 @@ void KGlobal::setActiveInstance(KInstance *i) const TQString & KGlobal::staticQString(const char *str) { - return staticQString(TQString::fromLatin1(str)); + return staticQString(TQString::tqfromLatin1(str)); } class KStringDict : public TQDict @@ -150,7 +150,7 @@ KGlobal::staticQString(const TQString &str) _stringDict->setAutoDelete( true ); kglobal_init(); } - TQString *result = _stringDict->find(str); + TQString *result = _stringDict->tqfind(str); if (!result) { result = new TQString(str); @@ -170,7 +170,7 @@ KGlobal::registerStaticDeleter(KStaticDeleterBase *obj) { if (!_staticDeleters) kglobal_init(); - if (_staticDeleters->find(obj) == -1) + if (_staticDeleters->tqfind(obj) == -1) _staticDeleters->append(obj); } diff --git a/kdecore/kglobalaccel.h b/kdecore/kglobalaccel.h index 33dd5e37b..4eee753dc 100644 --- a/kdecore/kglobalaccel.h +++ b/kdecore/kglobalaccel.h @@ -42,7 +42,7 @@ class KGlobalAccelPrivate; * @see KKeyDialog * @short Configurable global shortcut support */ -class KDECORE_EXPORT KGlobalAccel : public QObject +class KDECORE_EXPORT KGlobalAccel : public TQObject { Q_OBJECT public: diff --git a/kdecore/kglobalaccel_win.cpp b/kdecore/kglobalaccel_win.cpp index 8b0c81f1a..674f09671 100644 --- a/kdecore/kglobalaccel_win.cpp +++ b/kdecore/kglobalaccel_win.cpp @@ -311,14 +311,14 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s if( rexPassIndex.search( pAction->methodSlotPtr() ) >= 0 && rexIndex.search( pAction->name() ) >= 0 ) { int n = rexIndex.cap(1).toInt(); kdDebug(125) << "Calling " << pAction->methodSlotPtr() << " int = " << n << endl; - int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { QUObject o[2]; static_QUType_int.set(o+1,n); const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) { - int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { QUObject o[4]; static_QUType_QString.set(o+1,pAction->name()); @@ -327,7 +327,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else { - int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 ); } diff --git a/kdecore/kglobalaccel_x11.cpp b/kdecore/kglobalaccel_x11.cpp index e9d86e576..010e9ec0c 100644 --- a/kdecore/kglobalaccel_x11.cpp +++ b/kdecore/kglobalaccel_x11.cpp @@ -179,9 +179,9 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce #ifndef __osf__ // this crashes under Tru64 so ..... - kdDebug(125) << TQString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" ) + kdDebug(125) << TQString(TQString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" ) .arg( key.key().toStringInternal() ).arg( bGrab ) - .arg( keyCodeX, 0, 16 ).arg( keyModX, 0, 16 ); + .arg( keyCodeX, 0, 16 ).arg( keyModX, 0, 16 )); #endif if( !keyCodeX ) return false; @@ -278,11 +278,11 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { KKey key = (keyCode, 0); kdDebug(125) << "fakeKeyPressed: seek " << key.toStringInternal() - << TQString( " keyCodeX: %1 keyCode: %2 keyModX: %3" ) - .arg( codemod.code, 0, 16 ).arg( keyCode, 0, 16 ).arg( codemod.mod, 0, 16 ) << endl; + << TQString(TQString( " keyCodeX: %1 keyCode: %2 keyModX: %3" ) + .arg( codemod.code, 0, 16 ).arg( keyCode, 0, 16 ).arg( codemod.mod, 0, 16 )) << endl; // Search for which accelerator activated this event: - if( !m_rgCodeModToAction.contains( codemod ) ) { + if( !m_rgCodeModToAction.tqcontains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { KAccelAction* pAction = *it; @@ -356,11 +356,11 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) KKey key = keyNative; kdDebug(125) << "x11KeyPress: seek " << key.toStringInternal() - << TQString( " keyCodeX: %1 state: %2 keyModX: %3" ) - .arg( codemod.code, 0, 16 ).arg( pEvent->xkey.state, 0, 16 ).arg( codemod.mod, 0, 16 ) << endl; + << TQString(TQString( " keyCodeX: %1 state: %2 keyModX: %3" ) + .arg( codemod.code, 0, 16 ).arg( pEvent->xkey.state, 0, 16 ).arg( codemod.mod, 0, 16 )) << endl; // Search for which accelerator activated this event: - if( !m_rgCodeModToAction.contains( codemod ) ) { + if( !m_rgCodeModToAction.tqcontains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { KAccelAction* pAction = *it; @@ -407,23 +407,23 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s if( rexPassIndex.search( pAction->methodSlotPtr() ) >= 0 && rexIndex.search( pAction->name() ) >= 0 ) { int n = rexIndex.cap(1).toInt(); kdDebug(125) << "Calling " << pAction->methodSlotPtr() << " int = " << n << endl; - int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { - QUObject o[2]; - static_QUType_int.set(o+1,n); + TQUObject o[2]; + static_TQUType_int.set(o+1,n); const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) { - int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { - QUObject o[4]; - static_QUType_QString.set(o+1,pAction->name()); - static_QUType_QString.set(o+2,pAction->label()); - static_QUType_ptr.set(o+3,&seq); + TQUObject o[4]; + static_TQUType_TQString.set(o+1,pAction->name()); + static_TQUType_TQString.set(o+2,pAction->label()); + static_TQUType_ptr.set(o+3,&seq); const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else { - int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 ); } diff --git a/kdecore/kglobalsettings.cpp b/kdecore/kglobalsettings.cpp index 6dfd92c9b..3595dce4c 100644 --- a/kdecore/kglobalsettings.cpp +++ b/kdecore/kglobalsettings.cpp @@ -35,7 +35,7 @@ #include static QRgb qt_colorref2qrgb(COLORREF col) { - return qRgb(GetRValue(col),GetGValue(col),GetBValue(col)); + return tqRgb(GetRValue(col),GetGValue(col),GetBValue(col)); } #endif @@ -451,7 +451,7 @@ TQFont KGlobalSettings::taskbarFont() TQFont KGlobalSettings::largeFont(const TQString &text) { TQFontDatabase db; - TQStringList fam = db.families(); + TQStringList fam = db.tqfamilies(); // Move a bunch of preferred fonts to the front. if (fam.remove("Arial")) @@ -522,7 +522,7 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an readXdgUserDirs(s_desktopPath, s_documentPath); if (s_desktopPath->isEmpty() == true) { - *s_desktopPath = QDir::homeDirPath() + "/Desktop/"; + *s_desktopPath = TQDir::homeDirPath() + "/Desktop/"; } *s_desktopPath = TQDir::cleanDirPath( *s_desktopPath ); if ( !s_desktopPath->endsWith("/") ) diff --git a/kdecore/kiconeffect.cpp b/kdecore/kiconeffect.cpp index 8315eab6b..3d5833578 100644 --- a/kdecore/kiconeffect.cpp +++ b/kdecore/kiconeffect.cpp @@ -153,8 +153,8 @@ TQString KIconEffect::fingerprint(int group, int state) const cached += ':'; cached += tmp.setNum(mValue[group][state]); cached += ':'; - cached += mTrans[group][state] ? TQString::fromLatin1("trans") - : TQString::fromLatin1("notrans"); + cached += mTrans[group][state] ? TQString::tqfromLatin1("trans") + : TQString::tqfromLatin1("notrans"); if (mEffect[group][state] == Colorize || mEffect[group][state] == ToMonochrome) { cached += ':'; @@ -287,20 +287,20 @@ void KIconEffect::toGray(TQImage &img, float value) int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors(); unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits() - : (unsigned int *) img.colorTable(); + : (unsigned int *) img.tqcolorTable(); int rval, gval, bval, val, alpha, i; for (i=0; i(value*val+(1.0-value)*qRed(data[i])); - gval = static_cast(value*val+(1.0-value)*qGreen(data[i])); - bval = static_cast(value*val+(1.0-value)*qBlue(data[i])); - data[i] = qRgba(rval, gval, bval, alpha); + rval = static_cast(value*val+(1.0-value)*tqRed(data[i])); + gval = static_cast(value*val+(1.0-value)*tqGreen(data[i])); + bval = static_cast(value*val+(1.0-value)*tqBlue(data[i])); + data[i] = tqRgba(rval, gval, bval, alpha); } else - data[i] = qRgba(val, val, val, alpha); + data[i] = tqRgba(val, val, val, alpha); } } @@ -309,12 +309,12 @@ void KIconEffect::colorize(TQImage &img, const TQColor &col, float value) int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors(); unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits() - : (unsigned int *) img.colorTable(); + : (unsigned int *) img.tqcolorTable(); int rval, gval, bval, val, alpha, i; float rcol = col.red(), gcol = col.green(), bcol = col.blue(); for (i=0; i(rcol/128*val); @@ -335,20 +335,20 @@ void KIconEffect::colorize(TQImage &img, const TQColor &col, float value) } if (value < 1.0) { - rval = static_cast(value*rval+(1.0 - value)*qRed(data[i])); - gval = static_cast(value*gval+(1.0 - value)*qGreen(data[i])); - bval = static_cast(value*bval+(1.0 - value)*qBlue(data[i])); + rval = static_cast(value*rval+(1.0 - value)*tqRed(data[i])); + gval = static_cast(value*gval+(1.0 - value)*tqGreen(data[i])); + bval = static_cast(value*bval+(1.0 - value)*tqBlue(data[i])); } - alpha = qAlpha(data[i]); - data[i] = qRgba(rval, gval, bval, alpha); + alpha = tqAlpha(data[i]); + data[i] = tqRgba(rval, gval, bval, alpha); } } void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) { int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors(); unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits() - : (unsigned int *) img.colorTable(); + : (unsigned int *) img.tqcolorTable(); int rval, gval, bval, alpha, i; int rw = white.red(), gw = white.green(), bw = white.blue(); int rb = black.red(), gb = black.green(), bb = black.blue(); @@ -357,9 +357,9 @@ void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor bool grayscale = true; // Step 1: determine the average brightness for (i=0; i( ((255-v)*rb + v*rw)*value/255 + (1.0-value)*qRed(data[i])); - gval = static_cast( ((255-v)*gb + v*gw)*value/255 + (1.0-value)*qGreen(data[i])); - bval = static_cast( ((255-v)*bb + v*bw)*value/255 + (1.0-value)*qBlue(data[i])); + int v = tqRed(data[i]); + rval = static_cast( ((255-v)*rb + v*rw)*value/255 + (1.0-value)*tqRed(data[i])); + gval = static_cast( ((255-v)*gb + v*gw)*value/255 + (1.0-value)*tqGreen(data[i])); + bval = static_cast( ((255-v)*bb + v*bw)*value/255 + (1.0-value)*tqBlue(data[i])); - alpha = qAlpha(data[i]); - data[i] = qRgba(rval, gval, bval, alpha); + alpha = tqAlpha(data[i]); + data[i] = tqRgba(rval, gval, bval, alpha); } } else { for (i=0; i(value*rb+(1.0-value)*qRed(data[i])); - gval = static_cast(value*gb+(1.0-value)*qGreen(data[i])); - bval = static_cast(value*bb+(1.0-value)*qBlue(data[i])); + if (tqGray(data[i]) <= medium) { + rval = static_cast(value*rb+(1.0-value)*tqRed(data[i])); + gval = static_cast(value*gb+(1.0-value)*tqGreen(data[i])); + bval = static_cast(value*bb+(1.0-value)*tqBlue(data[i])); } else { - rval = static_cast(value*rw+(1.0-value)*qRed(data[i])); - gval = static_cast(value*gw+(1.0-value)*qGreen(data[i])); - bval = static_cast(value*bw+(1.0-value)*qBlue(data[i])); + rval = static_cast(value*rw+(1.0-value)*tqRed(data[i])); + gval = static_cast(value*gw+(1.0-value)*tqGreen(data[i])); + bval = static_cast(value*bw+(1.0-value)*tqBlue(data[i])); } - alpha = qAlpha(data[i]); - data[i] = qRgba(rval, gval, bval, alpha); + alpha = tqAlpha(data[i]); + data[i] = tqRgba(rval, gval, bval, alpha); } } } @@ -400,7 +400,7 @@ void KIconEffect::deSaturate(TQImage &img, float value) int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors(); unsigned int *data = (img.depth() > 8) ? (unsigned int *) img.bits() - : (unsigned int *) img.colorTable(); + : (unsigned int *) img.tqcolorTable(); TQColor color; int h, s, v, i; for (i=0; i 8) ? img.width()*img.height() : img.numColors(); unsigned int *data = (img.depth() > 8) ? (unsigned int *) img.bits() - : (unsigned int *) img.colorTable(); + : (unsigned int *) img.tqcolorTable(); TQColor color; int i, rval, gval, bval; float gamma; @@ -431,7 +431,7 @@ void KIconEffect::toGamma(TQImage &img, float value) rval = static_cast(pow(static_cast(rval)/255 , gamma)*255); gval = static_cast(pow(static_cast(gval)/255 , gamma)*255); bval = static_cast(pow(static_cast(bval)/255 , gamma)*255); - data[i] = qRgba(rval, gval, bval, qAlpha(data[i])); + data[i] = tqRgba(rval, gval, bval, tqAlpha(data[i])); } } @@ -476,7 +476,7 @@ void KIconEffect::semiTransparent(TQImage &img) for (x=0; x> 8; g2 = (a1 * g1 + (0xff - a1) * g2) >> 8; b2 = (a1 * b1 + (0xff - a1) * b2) >> 8; a2 = QMAX(a1, a2); - sline[j] = qRgba(r2, g2, b2, a2); + sline[j] = tqRgba(r2, g2, b2, a2); } } } @@ -742,9 +742,9 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect) TQPainter p(widget); - // Use NotROP to avoid having to repaint the pixmap each time. + // Use NotROP to avoid having to tqrepaint the pixmap each time. p.setPen(TQPen(Qt::black, 2, Qt::DotLine)); - p.setRasterOp(Qt::NotROP); + p.setRasterOp(TQt::NotROP); // The spacing between the rects we draw. // Use the minimum of width and height to avoid painting outside the diff --git a/kdecore/kiconloader.cpp b/kdecore/kiconloader.cpp index ff9243ebe..f19b56402 100644 --- a/kdecore/kiconloader.cpp +++ b/kdecore/kiconloader.cpp @@ -221,7 +221,7 @@ void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs ) { if (groups[i] == 0L) break; - config->setGroup(TQString::fromLatin1(groups[i]) + "Icons"); + config->setGroup(TQString::tqfromLatin1(groups[i]) + "Icons"); d->mpGroups[i].size = config->readNumEntry("Size", 0); d->mpGroups[i].dblPixels = config->readBoolEntry("DoublePixels", false); if (TQPixmap::defaultDepth()>8) @@ -328,7 +328,7 @@ void KIconLoader::addBaseThemes(KIconThemeNode *node, const TQString &appname) for (it=lst.begin(); it!=lst.end(); ++it) { - if( d->mThemesInTree.contains(*it) && (*it) != "hicolor") + if( d->mThemesInTree.tqcontains(*it) && (*it) != "hicolor") continue; KIconTheme *theme = new KIconTheme(*it,appname); if (!theme->isValid()) { @@ -370,7 +370,7 @@ void KIconLoader::addExtraDesktopThemes() TQDir dir2( buf ); TQString themeName=dir2.dirName(); - if (!list.contains(themeName)) + if (!list.tqcontains(themeName)) list.append(themeName); } } @@ -378,7 +378,7 @@ void KIconLoader::addExtraDesktopThemes() for (it=list.begin(); it!=list.end(); ++it) { - if ( d->mThemesInTree.contains(*it) ) + if ( d->mThemesInTree.tqcontains(*it) ) continue; if ( *it == TQString("default.kde") ) continue; @@ -601,7 +601,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si key = "$kicou_"; key += TQString::number(size); key += '_'; key += name; - bool inCache = TQPixmapCache::find(key, pix); + bool inCache = TQPixmapCache::tqfind(key, pix); if (inCache && (path_store == 0L)) return pix; @@ -684,14 +684,14 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si { key += d->mpEffect.fingerprint(group, state); if (d->mpGroups[group].dblPixels) - key += TQString::fromLatin1(":dblsize"); + key += TQString::tqfromLatin1(":dblsize"); } else - key += TQString::fromLatin1("noeffect"); + key += TQString::tqfromLatin1("noeffect"); key += '_'; key += overlayStr; // Is the icon in the cache? - bool inCache = TQPixmapCache::find(key, pix); + bool inCache = TQPixmapCache::tqfind(key, pix); if (inCache && (path_store == 0L)) return pix; @@ -806,7 +806,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si { QRgb *line = reinterpret_cast(img->scanLine(y)); for (int x = 0; x < img->width(); x++) - line[x] = (line[x] & 0x00ffffff) | (QMIN(0x80, qAlpha(line[x])) << 24); + line[x] = (line[x] & 0x00ffffff) | (QMIN(0x80, tqAlpha(line[x])) << 24); } } } @@ -848,10 +848,10 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si for( int i = 0; i < favIcon.width(); ++i, ++fpos, ++ipos ) - *ipos = qRgba( ( qRed( *ipos ) * ( 255 - qAlpha( *fpos )) + qRed( *fpos ) * qAlpha( *fpos )) / 255, - ( qGreen( *ipos ) * ( 255 - qAlpha( *fpos )) + qGreen( *fpos ) * qAlpha( *fpos )) / 255, - ( qBlue( *ipos ) * ( 255 - qAlpha( *fpos )) + qBlue( *fpos ) * qAlpha( *fpos )) / 255, - ( qAlpha( *ipos ) * ( 255 - qAlpha( *fpos )) + qAlpha( *fpos ) * qAlpha( *fpos )) / 255 ); + *ipos = tqRgba( ( tqRed( *ipos ) * ( 255 - tqAlpha( *fpos )) + tqRed( *fpos ) * tqAlpha( *fpos )) / 255, + ( tqGreen( *ipos ) * ( 255 - tqAlpha( *fpos )) + tqGreen( *fpos ) * tqAlpha( *fpos )) / 255, + ( tqBlue( *ipos ) * ( 255 - tqAlpha( *fpos )) + tqBlue( *fpos ) * tqAlpha( *fpos )) / 255, + ( tqAlpha( *ipos ) * ( 255 - tqAlpha( *fpos )) + tqAlpha( *fpos ) * tqAlpha( *fpos )) / 255 ); } } @@ -866,7 +866,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si TQImage *KIconLoader::loadOverlay(const TQString &name, int size) const { TQString key = name + '_' + TQString::number(size); - TQImage *image = d->imgDict.find(key); + TQImage *image = d->imgDict.tqfind(key); if (image != 0L) return image; @@ -892,7 +892,7 @@ TQMovie KIconLoader::loadMovie(const TQString& name, KIcon::Group group, int siz TQString file = moviePath( name, group, size ); if (file.isEmpty()) return TQMovie(); - int dirLen = file.findRev('/'); + int dirLen = file.tqfindRev('/'); TQString icon = iconPath(name, size ? -size : group, true); if (!icon.isEmpty() && file.left(dirLen) != icon.left(dirLen)) return TQMovie(); @@ -1048,13 +1048,13 @@ TQStringList KIconLoader::queryIconsByContext(int group_or_size, TQStringList::ConstIterator it; for (it=result.begin(); it!=result.end(); ++it) { - int n = (*it).findRev('/'); + int n = (*it).tqfindRev('/'); if (n == -1) name = *it; else name = (*it).mid(n+1); name = removeIconExtension(name); - if (!entries.contains(name)) + if (!entries.tqcontains(name)) { entries += name; res2 += *it; @@ -1088,13 +1088,13 @@ TQStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context) TQStringList::ConstIterator it; for (it=result.begin(); it!=result.end(); ++it) { - int n = (*it).findRev('/'); + int n = (*it).tqfindRev('/'); if (n == -1) name = *it; else name = (*it).mid(n+1); name = removeIconExtension(name); - if (!entries.contains(name)) + if (!entries.tqcontains(name)) { entries += name; res2 += *it; @@ -1383,7 +1383,7 @@ int IconSize(KIcon::Group group, KInstance *instance) TQPixmap KIconLoader::unknown() { TQPixmap pix; - if ( TQPixmapCache::find("unknown", pix) ) + if ( TQPixmapCache::tqfind("unknown", pix) ) return pix; TQString path = KGlobal::iconLoader()->iconPath("unknown", KIcon::Small, true); diff --git a/kdecore/kiconloader_p.h b/kdecore/kiconloader_p.h index 41083b38c..e6ae13659 100644 --- a/kdecore/kiconloader_p.h +++ b/kdecore/kiconloader_p.h @@ -33,7 +33,7 @@ public: KIconTheme *theme; }; -class KIconLoaderPrivate : public QObject +class KIconLoaderPrivate : public TQObject { Q_OBJECT public: diff --git a/kdecore/kicontheme.cpp b/kdecore/kicontheme.cpp index 6bbeba512..fb25cac21 100644 --- a/kdecore/kicontheme.cpp +++ b/kdecore/kicontheme.cpp @@ -185,7 +185,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName) TQMap > scIcons; for (KIconThemeDir *dir=mDirs.first(); dir!=0L; dir=mDirs.next()) { - if ((dir->type() == KIcon::Scalable) && !scIcons.contains(dir->size())) + if ((dir->type() == KIcon::Scalable) && !scIcons.tqcontains(dir->size())) { TQValueList lst; for (i=dir->minSize(); i<=dir->maxSize(); i++) @@ -209,7 +209,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName) TQValueList::ConstIterator it2; for (it2=lst.begin(); it2!=lst.end(); ++it2) { - if (scIcons.contains(*it2)) + if (scIcons.tqcontains(*it2)) exp += scIcons[*it2]; else exp += *it2; @@ -451,13 +451,13 @@ TQString KIconTheme::current() KConfig *config = KGlobal::config(); KConfigGroupSaver saver(config, "Icons"); *_theme = config->readEntry("Theme",defaultThemeName()); - if ( *_theme == TQString::fromLatin1("hicolor") ) *_theme = defaultThemeName(); + if ( *_theme == TQString::tqfromLatin1("hicolor") ) *_theme = defaultThemeName(); /* if (_theme->isEmpty()) { if (TQPixmap::defaultDepth() > 8) *_theme = defaultThemeName(); else - *_theme = TQString::fromLatin1("locolor"); + *_theme = TQString::tqfromLatin1("locolor"); }*/ return *_theme; } @@ -492,7 +492,7 @@ TQStringList KIconTheme::list() KIconTheme oink(*it2); if (!oink.isValid()) continue; - if (!_theme_list->contains(*it2)) + if (!_theme_list->tqcontains(*it2)) _theme_list->append(*it2); } } @@ -511,7 +511,7 @@ void KIconTheme::reconfigure() // static TQString KIconTheme::defaultThemeName() { - return TQString::fromLatin1("crystalsvg"); + return TQString::tqfromLatin1("crystalsvg"); } /*** KIconThemeDir ***/ diff --git a/kdecore/kidna.cpp b/kdecore/kidna.cpp index ca41fecdf..1ce2c1348 100644 --- a/kdecore/kidna.cpp +++ b/kdecore/kidna.cpp @@ -43,12 +43,12 @@ TQString KIDNA::toAscii(const TQString &idna) { if (idna.length() && (idna[0] == (QChar)'.')) { - TQString host = TQString::fromLatin1(toAsciiCString(idna.mid(1))); + TQString host = TQString::tqfromLatin1(toAsciiCString(idna.mid(1))); if (host.isEmpty()) return TQString::null; // Error return idna[0] + host; } - return TQString::fromLatin1(toAsciiCString(idna)); + return TQString::tqfromLatin1(toAsciiCString(idna)); } TQString KIDNA::toUnicode(const TQString &idna) diff --git a/kdecore/kkeyserver_x11.cpp b/kdecore/kkeyserver_x11.cpp index 96411bca5..96bd7d67d 100644 --- a/kdecore/kkeyserver_x11.cpp +++ b/kdecore/kkeyserver_x11.cpp @@ -176,8 +176,8 @@ static const TransKey g_rgQtToSymX[] = { Qt::Key_Up, XK_Up }, { Qt::Key_Right, XK_Right }, { Qt::Key_Down, XK_Down }, - { Qt::Key_Prior, XK_Prior }, - { Qt::Key_Next, XK_Next }, + { TQt::Key_Prior, XK_Prior }, + { TQt::Key_Next, XK_Next }, //{ Qt::Key_Shift, 0 }, //{ Qt::Key_Control, 0 }, //{ Qt::Key_Meta, 0 }, @@ -285,7 +285,7 @@ static const TransKey g_rgQtToSymX[] = { Qt::Key_VolumeUp, XF86XK_AudioRaiseVolume }, { Qt::Key_MediaPlay, XF86XK_AudioPlay }, { Qt::Key_MediaStop, XF86XK_AudioStop }, - { Qt::Key_MediaPrev, XF86XK_AudioPrev }, + { TQt::Key_MediaPrev, XF86XK_AudioPrev }, { Qt::Key_MediaNext, XF86XK_AudioNext }, { Qt::Key_HomePage, XF86XK_HomePage }, { Qt::Key_LaunchMail, XF86XK_Mail }, @@ -406,7 +406,7 @@ bool Sym::initQt( int keyQt ) int symQt = keyQt & 0xffff; if( (keyQt & Qt::UNICODE_ACCEL) || symQt < 0x1000 ) { - m_sym = TQChar(symQt).lower().unicode(); + m_sym = TQChar(symQt).lower().tqunicode(); return true; } @@ -434,9 +434,9 @@ bool Sym::initQt( int keyQt ) bool Sym::init( const TQString& s ) { - // If it's a single character, get unicode value. + // If it's a single character, get tqunicode value. if( s.length() == 1 ) { - m_sym = s[0].lower().unicode(); + m_sym = s[0].lower().tqunicode(); return true; } @@ -498,7 +498,7 @@ TQString Sym::toString( bool bUserSpace ) const if( m_sym == 0 ) return TQString::null; - // If it's a unicode character, + // If it's a tqunicode character, #ifdef Q_WS_WIN else if( m_sym < 0x1000 ) { #else @@ -542,7 +542,7 @@ uint Sym::getModsRequired() const if( m_sym < 0x3000 ) { TQChar c(m_sym); - if( c.isLetter() && c.lower() != c.upper() && m_sym == c.upper().unicode() ) + if( c.isLetter() && c.lower() != c.upper() && m_sym == c.upper().tqunicode() ) return KKey::SHIFT; } @@ -823,7 +823,7 @@ uint stringUserToMod( const TQString& mod ) // Get code of just the primary key keySymQt = keyCombQt & 0xffff; - // If unicode value beneath 0x1000 (special Qt codes begin thereafter), + // If tqunicode value beneath 0x1000 (special Qt codes begin thereafter), if( keySymQt < 0x1000 ) { // For reasons unbeknownst to me, Qt converts 'a-z' to 'A-Z'. // So convert it back to lowercase if SHIFT isn't held down. @@ -1041,7 +1041,7 @@ void KKey::simplify() // If this is a letter, don't remove any modifiers. if( m_sym < 0x3000 && TQChar(m_sym).isLetter() ) - m_sym = TQChar(m_sym).lower().unicode(); + m_sym = TQChar(m_sym).lower().tqunicode(); // Remove modifers from modifier list which are implicit in the symbol. // Ex. Shift+Plus => Plus (en) diff --git a/kdecore/klibloader.cpp b/kdecore/klibloader.cpp index e2f55fe67..80c5e6377 100644 --- a/kdecore/klibloader.cpp +++ b/kdecore/klibloader.cpp @@ -209,7 +209,7 @@ void KLibrary::slotObjectCreated( TQObject *obj ) if ( m_timer && m_timer->isActive() ) m_timer->stop(); - if ( m_objs.containsRef( obj ) ) + if ( m_objs.tqcontainsRef( obj ) ) return; // we know this object already connect( obj, TQT_SIGNAL( destroyed() ), @@ -220,7 +220,7 @@ void KLibrary::slotObjectCreated( TQObject *obj ) void KLibrary::slotObjectDestroyed() { - m_objs.removeRef( sender() ); + m_objs.removeRef( TQT_TQOBJECT_CONST(sender()) ); if ( m_objs.count() == 0 ) { @@ -337,10 +337,10 @@ static inline TQCString makeLibName( const char* name ) // only append ".la" if there is no extension // this allows to load non-libtool libraries as well // (mhk, 20000228) - int pos = libname.findRev('/'); + int pos = libname.tqfindRev('/'); if (pos < 0) pos = 0; - if (libname.find('.', pos) < 0) + if (libname.tqfind('.', pos) < 0) libname += ".la"; return libname; } @@ -500,7 +500,7 @@ void KLibLoader::slotLibraryDestroyed() void KLibLoader::close_pending(KLibWrapPrivate *wrap) { - if (wrap && !d->pending_close.containsRef( wrap )) + if (wrap && !d->pending_close.tqcontainsRef( wrap )) d->pending_close.append( wrap ); /* First delete all KLibrary objects in pending_close, but _don't_ unload @@ -534,7 +534,7 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap) /* Now ensure, that the libs are only unloaded in the reverse direction they were loaded. */ - if (!d->pending_close.containsRef( wrap )) { + if (!d->pending_close.tqcontainsRef( wrap )) { if (!deleted_one) /* Only diagnose, if we really haven't deleted anything. */ // kdDebug(150) << "try to dlclose " << wrap->name << ": not yet" << endl; diff --git a/kdecore/klibloader.h b/kdecore/klibloader.h index b1a1bc330..c36e82f07 100644 --- a/kdecore/klibloader.h +++ b/kdecore/klibloader.h @@ -47,7 +47,7 @@ class KLibraryPrivate; * @see KLibLoader * @author Torben Weis */ -class KDECORE_EXPORT KLibrary : public QObject +class KDECORE_EXPORT KLibrary : public TQObject { friend class KLibLoader; friend class TQAsciiDict; @@ -139,7 +139,7 @@ class KLibWrapPrivate; * @see KLibrary * @author Torben Weis */ -class KDECORE_EXPORT KLibLoader : public QObject +class KDECORE_EXPORT KLibLoader : public TQObject { friend class KLibrary; @@ -330,7 +330,7 @@ private: * * @author Torben Weis */ -class KDECORE_EXPORT KLibFactory : public QObject +class KDECORE_EXPORT KLibFactory : public TQObject { Q_OBJECT public: diff --git a/kdecore/klocale.cpp b/kdecore/klocale.cpp index 91fe1c2a1..567c9a7f5 100644 --- a/kdecore/klocale.cpp +++ b/kdecore/klocale.cpp @@ -121,9 +121,9 @@ void KLocale::initMainCatalogues(const TQString & catalog) TQString mainCatalogue = catalog; // don't use main catalogue if we're looking up .desktop translations - if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) { + if (mainCatalogue.tqcontains("desktop") == 0 || mainCatalogue.tqcontains("kdesktop") == 1) { if (maincatalogue) { - mainCatalogue = TQString::fromLatin1(maincatalogue); + mainCatalogue = TQString::tqfromLatin1(maincatalogue); } } @@ -135,7 +135,7 @@ void KLocale::initMainCatalogues(const TQString & catalog) else { // do not use insertCatalogue here, that would already trigger updateCatalogs d->catalogNames.append( mainCatalogue ); // application catalog - if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) { //don't bother if we're looking up desktop translations + if (mainCatalogue.tqcontains("desktop") == 0 || mainCatalogue.tqcontains("kdesktop") == 1) { //don't bother if we're looking up desktop translations d->catalogNames.append( SYSTEM_MESSAGES ); // always include kdelibs.mo d->catalogNames.append( "kio" ); // always include kio.mo d->catalogNames.append( "xdg-user-dirs" ); @@ -312,13 +312,13 @@ void KLocale::initFormat() KConfigGroupSaver saver(config, "Locale"); KSimpleConfig entry(locate("locale", - TQString::fromLatin1("l10n/%1/entry.desktop") + TQString::tqfromLatin1("l10n/%1/entry.desktop") .arg(m_country)), true); entry.setGroup("KCM Locale"); // Numeric #define readConfigEntry(key, default, save) \ - save = entry.readEntry(key, TQString::fromLatin1(default)); \ + save = entry.readEntry(key, TQString::tqfromLatin1(default)); \ save = config->readEntry(key, save); #define readConfigNumEntry(key, default, save, type) \ @@ -331,7 +331,7 @@ void KLocale::initFormat() readConfigEntry("DecimalSymbol", ".", m_decimalSymbol); readConfigEntry("ThousandsSeparator", ",", m_thousandsSeparator); - m_thousandsSeparator.replace( TQString::fromLatin1("$0"), TQString::null ); + m_thousandsSeparator.tqreplace( TQString::tqfromLatin1("$0"), TQString() ); //kdDebug(173) << "m_thousandsSeparator=" << m_thousandsSeparator << endl; readConfigEntry("PositiveSign", "", m_positiveSign); @@ -342,7 +342,7 @@ void KLocale::initFormat() readConfigEntry("MonetaryDecimalSymbol", ".", m_monetaryDecimalSymbol); readConfigEntry("MonetaryThousandsSeparator", ",", m_monetaryThousandsSeparator); - m_monetaryThousandsSeparator.replace(TQString::fromLatin1("$0"), TQString::null); + m_monetaryThousandsSeparator.tqreplace(TQString::tqfromLatin1("$0"), TQString()); readConfigNumEntry("FracDigits", 2, m_fracDigits, int); readConfigBoolEntry("PositivePrefixCurrencySymbol", true, @@ -372,7 +372,7 @@ void KLocale::initFormat() //Grammatical //Precedence here is l10n / i18n / config file KSimpleConfig language(locate("locale", - TQString::fromLatin1("%1/entry.desktop") + TQString::tqfromLatin1("%1/entry.desktop") .arg(m_language)), true); language.setGroup("KCM Locale"); #define read3ConfigBoolEntry(key, default, save) \ @@ -404,7 +404,7 @@ bool KLocale::setCountry(const TQString & country) TQString KLocale::catalogueFileName(const TQString & language, const KCatalogue & catalog) { - TQString path = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo") + TQString path = TQString::tqfromLatin1("%1/LC_MESSAGES/%2.mo") .arg( language ) .arg( catalog.name() ); @@ -417,7 +417,7 @@ TQString KLocale::catalogueFileName(const TQString & language, bool KLocale::setLanguage(const TQString & language) { - if ( d->languageList.contains( language ) ) { + if ( d->languageList.tqcontains( language ) ) { d->languageList.remove( language ); } d->languageList.prepend( language ); // let us consider this language to be the most important one @@ -451,7 +451,7 @@ bool KLocale::setLanguage(const TQStringList & languages) { // kdDebug() << "checking " << (*it) << endl; bool bIsTranslated = isApplicationTranslatedInto( *it ); - if ( languageList.contains(*it) > 1 || (*it).isEmpty() || (!bIsTranslated) ) { + if ( languageList.tqcontains(*it) > 1 || (*it).isEmpty() || (!bIsTranslated) ) { // kdDebug() << "removing " << (*it) << endl; it = languageList.remove( it ); } @@ -497,7 +497,7 @@ bool KLocale::isApplicationTranslatedInto( const TQString & language) TQString appName = d->appName; if (maincatalogue) { - appName = TQString::fromLatin1(maincatalogue); + appName = TQString::tqfromLatin1(maincatalogue); } // sorry, catalogueFileName requires catalog object,k which we do not have here // path finding was supposed to be moved completely to KCatalogue. The interface cannot @@ -505,7 +505,7 @@ bool KLocale::isApplicationTranslatedInto( const TQString & language) // duplicated code for file path evaluation. Cleanup will follow later. We could have e.g. // a static method in KCataloge that can translate between these file names. // a stat - TQString sFileName = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo") + TQString sFileName = TQString::tqfromLatin1("%1/LC_MESSAGES/%2.mo") .arg( language ) .arg( appName ); // kdDebug() << "isApplicationTranslatedInto: filename " << sFileName << endl; @@ -526,7 +526,7 @@ void KLocale::splitLocale(const TQString & aStr, TQString str = aStr; // just in case, there is another language appended - int f = str.find(':'); + int f = str.tqfind(':'); if (f >= 0) str.truncate(f); @@ -534,14 +534,14 @@ void KLocale::splitLocale(const TQString & aStr, chrset = TQString::null; language = TQString::null; - f = str.find('.'); + f = str.tqfind('.'); if (f >= 0) { chrset = str.mid(f + 1); str.truncate(f); } - f = str.find('_'); + f = str.tqfind('_'); if (f >= 0) { country = str.mid(f + 1); @@ -644,7 +644,7 @@ TQString KLocale::weekDayName (int i, bool shortName) const void KLocale::insertCatalogue( const TQString & catalog ) { - if ( !d->catalogNames.contains( catalog) ) { + if ( !d->catalogNames.tqcontains( catalog) ) { d->catalogNames.append( catalog ); } updateCatalogues( ); // evaluate the changed list and generate the neccessary KCatalog objects @@ -693,7 +693,7 @@ void KLocale::updateCatalogues( ) void KLocale::removeCatalogue(const TQString &catalog) { - if ( d->catalogNames.contains( catalog )) { + if ( d->catalogNames.tqcontains( catalog )) { d->catalogNames.remove( catalog ); if (KGlobal::_instance) updateCatalogues(); // walk through the KCatalogue instances and weed out everything we no longer need @@ -702,7 +702,7 @@ void KLocale::removeCatalogue(const TQString &catalog) void KLocale::setActiveCatalogue(const TQString &catalog) { - if ( d->catalogNames.contains( catalog ) ) { + if ( d->catalogNames.tqcontains( catalog ) ) { d->catalogNames.remove( catalog ); d->catalogNames.prepend( catalog ); updateCatalogues(); // walk through the KCatalogue instances and adapt to the new order @@ -795,10 +795,10 @@ TQString KLocale::translate( const char *index, const char *fallback) const static TQString put_n_in(const TQString &orig, unsigned long n) { TQString ret = orig; - int index = ret.find("%n"); + int index = ret.tqfind("%n"); if (index == -1) return ret; - ret.replace(index, 2, TQString::number(n)); + ret.tqreplace(index, 2, TQString::number(n)); return ret; } @@ -830,7 +830,7 @@ TQString KLocale::translate( const char *singular, const char *plural, } else { TQString tmp = TQString::fromUtf8( plural ); #ifndef NDEBUG - if (tmp.find("%n") == -1) { + if (tmp.tqfind("%n") == -1) { kdDebug() << "the message for i18n should contain a '%n'! " << plural << endl; } #endif @@ -1142,7 +1142,7 @@ TQString KLocale::formatMoney(double num, TQString res = TQString::number(neg?-num:num, 'f', precision); // Replace dot with locale decimal separator - res.replace(TQChar('.'), monetaryDecimalSymbol()); + res.tqreplace(TQChar('.'), monetaryDecimalSymbol()); // Insert the thousand separators _insertSeparator(res, monetaryThousandsSeparator(), monetaryDecimalSymbol()); @@ -1259,7 +1259,7 @@ static void _inc_by_one(TQString &str, int position) // Cut off if more digits in fractional part than 'precision' static void _round(TQString &str, int precision) { - int decimalSymbolPos = str.find('.'); + int decimalSymbolPos = str.tqfind('.'); if (decimalSymbolPos == -1) if (precision == 0) return; @@ -1294,7 +1294,7 @@ static void _round(TQString &str, int precision) break; } - decimalSymbolPos = str.find('.'); + decimalSymbolPos = str.tqfind('.'); str.truncate(decimalSymbolPos + precision + 1); // if precision == 0 delete also '.' @@ -1324,7 +1324,7 @@ TQString KLocale::formatNumber(const TQString &numStr, bool round, if (round) _round(mantString, precision); // Replace dot with locale decimal separator - mantString.replace(TQChar('.'), decimalSymbol()); + mantString.tqreplace(TQChar('.'), decimalSymbol()); // Insert the thousand separators _insertSeparator(mantString, thousandsSeparator(), decimalSymbol()); @@ -1352,14 +1352,14 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const { if ( !escape ) { - if ( (QChar)(rst.at( format_index ).unicode()) == (QChar)'%' ) + if ( (TQChar(rst.at( format_index )).tqunicode()) == '%' ) escape = true; else buffer.append(rst.at(format_index)); } else { - switch ( rst.at( format_index ).unicode() ) + switch ( TQChar(rst.at( format_index )).tqunicode() ) { case '%': buffer.append('%'); @@ -1418,7 +1418,7 @@ void KLocale::setMainCatalogue(const char *catalog) double KLocale::readNumber(const TQString &_str, bool * ok) const { TQString str = _str.stripWhiteSpace(); - bool neg = str.find(negativeSign()) == 0; + bool neg = str.tqfind(negativeSign()) == 0; if (neg) str.remove( 0, negativeSign().length() ); @@ -1428,7 +1428,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const TQString exponentialPart; int EPos; - EPos = str.find('E', 0, false); + EPos = str.tqfind('E', 0, false); if (EPos != -1) { @@ -1436,7 +1436,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const str = str.left(EPos); } - int pos = str.find(decimalSymbol()); + int pos = str.tqfind(decimalSymbol()); TQString major; TQString minor; if ( pos == -1 ) @@ -1450,7 +1450,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const // Remove thousand separators int thlen = thousandsSeparator().length(); int lastpos = 0; - while ( ( pos = major.find( thousandsSeparator() ) ) > 0 ) + while ( ( pos = major.tqfind( thousandsSeparator() ) ) > 0 ) { // e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N int fromEnd = major.length() - pos; @@ -1487,7 +1487,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const bool currencyFound = false; TQString symbol = currencySymbol(); // First try removing currency symbol from either end - int pos = str.find(symbol); + int pos = str.tqfind(symbol); if ( pos == 0 || pos == (int) str.length()-symbol.length() ) { str.remove(pos,symbol.length()); @@ -1512,7 +1512,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const } else { - int i1 = str.find(negativeSign()); + int i1 = str.tqfind(negativeSign()); if ( i1 == 0 || i1 == (int) str.length()-1 ) { neg = true; @@ -1525,7 +1525,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const // it already (because of the negative sign being in the way). if ( !currencyFound ) { - pos = str.find(symbol); + pos = str.tqfind(symbol); if ( pos == 0 || pos == (int) str.length()-symbol.length() ) { str.remove(pos,symbol.length()); @@ -1534,7 +1534,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const } // And parse the rest as a number - pos = str.find(monetaryDecimalSymbol()); + pos = str.tqfind(monetaryDecimalSymbol()); TQString major; TQString minior; if (pos == -1) @@ -1548,7 +1548,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const // Remove thousand separators int thlen = monetaryThousandsSeparator().length(); int lastpos = 0; - while ( ( pos = major.find( monetaryThousandsSeparator() ) ) > 0 ) + while ( ( pos = major.tqfind( monetaryThousandsSeparator() ) ) > 0 ) { // e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N int fromEnd = major.length() - pos; @@ -1866,7 +1866,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat // only "pm/am" here can grow, the rest shrinks, but // I'm rather safe than sorry - TQChar *buffer = new QChar[rst.length() * 3 / 2 + 30]; + TQChar *buffer = new TQChar[rst.length() * 3 / 2 + 30]; uint index = 0; bool escape = false; @@ -1876,14 +1876,14 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat { if ( !escape ) { - if ( (QChar)(rst.at( format_index ).unicode()) == (QChar)'%' ) + if ( (TQChar(rst.at( format_index )).tqunicode()) == '%' ) escape = true; else buffer[index++] = rst.at( format_index ); } else { - switch ( rst.at( format_index ).unicode() ) + switch ( TQChar(rst.at( format_index )).tqunicode() ) { case '%': buffer[index++] = (QChar)'%'; @@ -1915,7 +1915,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat number = pTime.hour(); case 'l': // to share the code - if ( (QChar)(rst.at( format_index ).unicode()) == (QChar)'l' ) + if ( (TQChar(rst.at( format_index )).tqunicode()) == 'l' ) number = isDuration ? pTime.hour() : (pTime.hour() + 11) % 12 + 1; if ( number / 10 ) buffer[index++] = number / 10 + '0'; @@ -1948,8 +1948,8 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat bool KLocale::use12Clock() const { - if ((timeFormat().contains(TQString::fromLatin1("%I")) > 0) || - (timeFormat().contains(TQString::fromLatin1("%l")) > 0)) + if ((timeFormat().tqcontains(TQString::tqfromLatin1("%I")) > 0) || + (timeFormat().tqcontains(TQString::tqfromLatin1("%l")) > 0)) return true; else return false; @@ -1957,7 +1957,7 @@ bool KLocale::use12Clock() const TQString KLocale::languages() const { - return d->languageList.join( TQString::fromLatin1(":") ); + return d->languageList.join( TQString::tqfromLatin1(":") ); } TQStringList KLocale::languageList() const @@ -1970,8 +1970,8 @@ TQString KLocale::formatDateTime(const TQDateTime &pDateTime, bool includeSeconds) const { return translate("concatenation of dates and time", "%1 %2") - .arg( formatDate( pDateTime.date(), shortFormat ) ) - .arg( formatTime( pDateTime.time(), includeSeconds ) ); + .arg( formatDate( TQT_TQDATE_OBJECT(pDateTime.date()), shortFormat ) ) + .arg( formatTime( TQT_TQTIME_OBJECT(pDateTime.time()), includeSeconds ) ); } TQString i18n(const char* text) @@ -2008,7 +2008,7 @@ void KLocale::initInstance() KInstance *app = KGlobal::instance(); if (app) { - KGlobal::_locale = new KLocale(TQString::fromLatin1(app->instanceName())); + KGlobal::_locale = new KLocale(TQString::tqfromLatin1(app->instanceName())); // only do this for the global instance TQTextCodec::setCodecForLocale(KGlobal::_locale->codecForEncoding()); @@ -2088,17 +2088,17 @@ void KLocale::initFileNameEncoding(KConfig *) TQCString KLocale::encodeFileNameUTF8( const TQString & fileName ) #endif // USE_QT3 #ifdef USE_QT4 -TQByteArray KLocale::encodeFileNameUTF8( const TQString & fileName ) +QByteArray KLocale::encodeFileNameUTF8( const QString & fileName ) #endif // USE_QT4 { - return fileName.utf8(); + return TQString(fileName).utf8(); } #ifdef USE_QT3 TQString KLocale::decodeFileNameUTF8( const TQCString & localFileName ) #endif // USE_QT3 #ifdef USE_QT4 -TQString KLocale::decodeFileNameUTF8( const TQByteArray & localFileName ) +QString KLocale::decodeFileNameUTF8( const QByteArray & localFileName ) #endif // USE_QT4 { return TQString::fromUtf8(localFileName); @@ -2265,12 +2265,12 @@ void KLocale::setMeasureSystem(MeasureSystem value) TQString KLocale::defaultLanguage() { - return TQString::fromLatin1("en_US"); + return TQString::tqfromLatin1("en_US"); } TQString KLocale::defaultCountry() { - return TQString::fromLatin1("C"); + return TQString::tqfromLatin1("C"); } const char * KLocale::encoding() const @@ -2325,7 +2325,7 @@ TQStringList KLocale::languagesTwoAlpha() const TQStringList result; - KConfig config(TQString::fromLatin1("language.codes"), true, false); + KConfig config(TQString::tqfromLatin1("language.codes"), true, false); config.setGroup("TwoLetterCodes"); for ( TQStringList::ConstIterator it = origList.begin(); @@ -2338,7 +2338,7 @@ TQStringList KLocale::languagesTwoAlpha() const langLst = config.readListEntry( lang ); else { - int i = lang.find('_'); + int i = lang.tqfind('_'); if (i >= 0) lang.truncate(i); langLst << lang; @@ -2348,7 +2348,7 @@ TQStringList KLocale::languagesTwoAlpha() const langIt != langLst.end(); ++langIt ) { - if ( !(*langIt).isEmpty() && !result.contains( *langIt ) ) + if ( !(*langIt).isEmpty() && !result.tqcontains( *langIt ) ) result += *langIt; } } @@ -2370,8 +2370,8 @@ TQString KLocale::twoAlphaToLanguageName(const TQString &code) const d->languages = new KConfig("all_languages", true, false, "locale"); TQString groupName = code; - const int i = groupName.find('_'); - groupName.replace(0, i, groupName.left(i).lower()); + const int i = groupName.tqfind('_'); + groupName.tqreplace(0, i, groupName.left(i).lower()); d->languages->setGroup(groupName); return d->languages->readEntry("Name"); @@ -2466,7 +2466,7 @@ KLocale & KLocale::operator=(const KLocale & rhs) } bool KLocale::setCharset(const TQString & ) { return true; } -TQString KLocale::charset() const { return TQString::fromLatin1("UTF-8"); } +TQString KLocale::charset() const { return TQString::tqfromLatin1("UTF-8"); } // KDE4: remove #if 0 diff --git a/kdecore/klocale.h b/kdecore/klocale.h index 5f8be8f7c..9bca02077 100644 --- a/kdecore/klocale.h +++ b/kdecore/klocale.h @@ -1225,7 +1225,7 @@ private: static TQCString encodeFileNameUTF8( const TQString & fileName ); #endif // USE_QT3 #ifdef USE_QT4 - static TQByteArray encodeFileNameUTF8( const TQString & fileName ); + static QByteArray encodeFileNameUTF8( const QString & fileName ); #endif // USE_QT4 /** @@ -1235,7 +1235,7 @@ private: static TQString decodeFileNameUTF8( const TQCString & localFileName ); #endif // USE_QT3 #ifdef USE_QT4 - static TQString decodeFileNameUTF8( const TQByteArray & localFileName ); + static QString decodeFileNameUTF8( const QByteArray & localFileName ); #endif // USE_QT4 /** diff --git a/kdecore/kmacroexpander.cpp b/kdecore/kmacroexpander.cpp index 5516c1b61..89eb5c72f 100644 --- a/kdecore/kmacroexpander.cpp +++ b/kdecore/kmacroexpander.cpp @@ -40,7 +40,7 @@ KMacroExpanderBase::setEscapeChar( TQChar c ) escapechar = c; } -QChar +TQChar KMacroExpanderBase::escapeChar() const { return escapechar; @@ -56,7 +56,7 @@ void KMacroExpanderBase::expandMacros( TQString &str ) for (pos = 0; pos < str.length(); ) { if (ec != (QChar)0) { - if (str.unicode()[pos] != ec) + if (str.tqunicode()[pos] != ec) goto nohit; if (!(len = expandEscapedMacro( str, pos, rst ))) goto nohit; @@ -109,7 +109,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos ) TQString rsts; while (pos < str.length()) { - TQChar cc( str.unicode()[pos] ); + TQChar cc( str.tqunicode()[pos] ); if (ec != (QChar)0) { if (cc != ec) goto nohit; @@ -205,7 +205,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos ) pos = pos2; return false; } - cc = str.unicode()[pos2]; + cc = str.tqunicode()[pos2]; if (cc == (QChar)'`') break; if (cc == (QChar)'\\') { @@ -339,7 +339,7 @@ template int KMacroMapExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) { - TQMapConstIterator it = macromap.find(str[pos]); + TQMapConstIterator it = macromap.tqfind(str[pos]); if (it != macromap.end()) { ret += it.data(); return 1; @@ -355,7 +355,7 @@ KMacroMapExpander::expandEscapedMacro( const TQString &str, uint pos, ret += TQString( escapeChar() ); return 2; } - TQMapConstIterator it = macromap.find(str[pos+1]); + TQMapConstIterator it = macromap.tqfind(str[pos+1]); if (it != macromap.end()) { ret += it.data(); return 2; @@ -383,14 +383,14 @@ template int KMacroMapExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) { - if (isIdentifier( str[pos - 1].unicode() )) + if (isIdentifier( str[pos - 1].tqunicode() )) return 0; uint sl; - for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++); + for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++); if (!sl) return 0; TQMapConstIterator it = - macromap.find( TQConstString( str.unicode() + pos, sl ).string() ); + macromap.tqfind( TQConstString( str.tqunicode() + pos, sl ).string() ); if (it != macromap.end()) { ret += it.data(); return sl; @@ -415,13 +415,13 @@ KMacroMapExpander::expandEscapedMacro( const TQString &str, uint po rsl = sl + 3; } else { rpos = pos + 1; - for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++); + for (sl = 0; isIdentifier( str[rpos + sl].tqunicode() ); sl++); rsl = sl + 1; } if (!sl) return 0; TQMapConstIterator it = - macromap.find( TQConstString( str.unicode() + rpos, sl ).string() ); + macromap.tqfind( TQConstString( str.tqunicode() + rpos, sl ).string() ); if (it != macromap.end()) { ret += it.data(); return rsl; @@ -454,13 +454,13 @@ KCharMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringL int KWordMacroExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) { - if (isIdentifier( str[pos - 1].unicode() )) + if (isIdentifier( str[pos - 1].tqunicode() )) return 0; uint sl; - for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++); + for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++); if (!sl) return 0; - if (expandMacro( TQConstString( str.unicode() + pos, sl ).string(), ret )) + if (expandMacro( TQConstString( str.tqunicode() + pos, sl ).string(), ret )) return sl; return 0; } @@ -481,12 +481,12 @@ KWordMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringL rsl = sl + 3; } else { rpos = pos + 1; - for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++); + for (sl = 0; isIdentifier( str[rpos + sl].tqunicode() ); sl++); rsl = sl + 1; } if (!sl) return 0; - if (expandMacro( TQConstString( str.unicode() + rpos, sl ).string(), ret )) + if (expandMacro( TQConstString( str.tqunicode() + rpos, sl ).string(), ret )) return rsl; return 0; } @@ -510,7 +510,7 @@ TexpandMacrosShellQuote( const TQString &ostr, const TQMap &map, TQChar c TQString str( ostr ); KMacroMapExpander kmx( map, c ); if (!kmx.expandMacrosShellQuote( str )) - return TQString::null; + return TQString(); return str; } diff --git a/kdecore/kmanagerselection.cpp b/kdecore/kmanagerselection.cpp index b88990dbf..feabf630d 100644 --- a/kdecore/kmanagerselection.cpp +++ b/kdecore/kmanagerselection.cpp @@ -65,7 +65,7 @@ class KSelectionOwnerPrivate KSelectionOwnerPrivate::KSelectionOwnerPrivate( KSelectionOwner* owner_P ) : owner( owner_P ) { - kapp->installX11EventFilter( this ); + kapp->installX11EventFilter( TQT_TQWIDGET(this) ); } bool KSelectionOwnerPrivate::x11Event( XEvent* ev_P ) @@ -380,7 +380,7 @@ class KSelectionWatcherPrivate KSelectionWatcherPrivate::KSelectionWatcherPrivate( KSelectionWatcher* watcher_P ) : watcher( watcher_P ) { - kapp->installX11EventFilter( this ); + kapp->installX11EventFilter( TQT_TQWIDGET(this) ); } bool KSelectionWatcherPrivate::x11Event( XEvent* ev_P ) diff --git a/kdecore/kmanagerselection.h b/kdecore/kmanagerselection.h index b6aefd9db..384f5d23f 100644 --- a/kdecore/kmanagerselection.h +++ b/kdecore/kmanagerselection.h @@ -28,6 +28,10 @@ DEALINGS IN THE SOFTWARE. #include #include +#ifdef Q_MOC_RUN +#define Q_WS_X11 +#endif // Q_MOC_RUN + #ifdef Q_WS_X11 // FIXME(E) #include @@ -44,7 +48,7 @@ class KSelectionOwnerPrivate; @short ICCCM manager selection owner */ class KDECORE_EXPORT KSelectionOwner - : public QObject + : public TQObject { Q_OBJECT public: @@ -167,7 +171,7 @@ class KSelectionWatcherPrivate; @short ICCCM manager selection watching */ class KDECORE_EXPORT KSelectionWatcher - : public QObject + : public TQObject { Q_OBJECT public: diff --git a/kdecore/kmdcodec.cpp b/kdecore/kmdcodec.cpp index 76c80d329..4fe968361 100644 --- a/kdecore/kmdcodec.cpp +++ b/kdecore/kmdcodec.cpp @@ -787,7 +787,7 @@ void KMD5::update(const TQCString& in) void KMD5::update(const unsigned char* in, int len) { if (len < 0) - len = qstrlen(reinterpret_cast(in)); + len = tqstrlen(reinterpret_cast(in)); if (!len) return; @@ -797,12 +797,12 @@ void KMD5::update(const unsigned char* in, int len) return; } - Q_UINT32 in_index; - Q_UINT32 buffer_index; - Q_UINT32 buffer_space; - Q_UINT32 in_length = static_cast( len ); + TQ_UINT32 in_index; + TQ_UINT32 buffer_index; + TQ_UINT32 buffer_space; + TQ_UINT32 in_length = static_cast( len ); - buffer_index = static_cast((m_count[0] >> 3) & 0x3F); + buffer_index = static_cast((m_count[0] >> 3) & 0x3F); if ( (m_count[0] += (in_length << 3))<(in_length << 3) ) m_count[1]++; @@ -842,8 +842,8 @@ void KMD5::finalize () { if (m_finalized) return; - Q_UINT8 bits[8]; - Q_UINT32 index, padLen; + TQ_UINT8 bits[8]; + TQ_UINT32 index, padLen; static const unsigned char PADDING[64]= { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -856,7 +856,7 @@ void KMD5::finalize () //memcpy( bits, m_count, 8 ); // Pad out to 56 mod 64. - index = static_cast((m_count[0] >> 3) & 0x3f); + index = static_cast((m_count[0] >> 3) & 0x3f); padLen = (index < 56) ? (56 - index) : (120 - index); update (reinterpret_cast(PADDING), padLen); @@ -957,7 +957,7 @@ void KMD5::reset() void KMD5::transform( const unsigned char block[64] ) { - Q_UINT32 a = m_state[0], b = m_state[1], c = m_state[2], d = m_state[3], x[16]; + TQ_UINT32 a = m_state[0], b = m_state[1], c = m_state[2], d = m_state[3], x[16]; decode (x, block, 64); //memcpy( x, block, 64 ); @@ -1044,91 +1044,91 @@ void KMD5::transform( const unsigned char block[64] ) memset ( static_cast(x), 0, sizeof(x) ); } -inline Q_UINT32 KMD5::rotate_left (Q_UINT32 x, Q_UINT32 n) +inline TQ_UINT32 KMD5::rotate_left (TQ_UINT32 x, TQ_UINT32 n) { return (x << n) | (x >> (32-n)) ; } -inline Q_UINT32 KMD5::F (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z) +inline TQ_UINT32 KMD5::F (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z) { return (x & y) | (~x & z); } -inline Q_UINT32 KMD5::G (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z) +inline TQ_UINT32 KMD5::G (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z) { return (x & z) | (y & ~z); } -inline Q_UINT32 KMD5::H (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z) +inline TQ_UINT32 KMD5::H (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z) { return x ^ y ^ z; } -inline Q_UINT32 KMD5::I (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z) +inline TQ_UINT32 KMD5::I (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z) { return y ^ (x | ~z); } -void KMD5::FF ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, - Q_UINT32 x, Q_UINT32 s, Q_UINT32 ac ) +void KMD5::FF ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, + TQ_UINT32 x, TQ_UINT32 s, TQ_UINT32 ac ) { a += F(b, c, d) + x + ac; a = rotate_left (a, s) +b; } -void KMD5::GG ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, - Q_UINT32 x, Q_UINT32 s, Q_UINT32 ac) +void KMD5::GG ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, + TQ_UINT32 x, TQ_UINT32 s, TQ_UINT32 ac) { a += G(b, c, d) + x + ac; a = rotate_left (a, s) +b; } -void KMD5::HH ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, - Q_UINT32 x, Q_UINT32 s, Q_UINT32 ac ) +void KMD5::HH ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, + TQ_UINT32 x, TQ_UINT32 s, TQ_UINT32 ac ) { a += H(b, c, d) + x + ac; a = rotate_left (a, s) +b; } -void KMD5::II ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, - Q_UINT32 x, Q_UINT32 s, Q_UINT32 ac ) +void KMD5::II ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, + TQ_UINT32 x, TQ_UINT32 s, TQ_UINT32 ac ) { a += I(b, c, d) + x + ac; a = rotate_left (a, s) +b; } -void KMD5::encode ( unsigned char* output, Q_UINT32 *in, Q_UINT32 len ) +void KMD5::encode ( unsigned char* output, TQ_UINT32 *in, TQ_UINT32 len ) { #if !defined(WORDS_BIGENDIAN) memcpy(output, in, len); #else - Q_UINT32 i, j; + TQ_UINT32 i, j; for (i = 0, j = 0; j < len; i++, j += 4) { - output[j] = static_cast((in[i] & 0xff)); - output[j+1] = static_cast(((in[i] >> 8) & 0xff)); - output[j+2] = static_cast(((in[i] >> 16) & 0xff)); - output[j+3] = static_cast(((in[i] >> 24) & 0xff)); + output[j] = static_cast((in[i] & 0xff)); + output[j+1] = static_cast(((in[i] >> 8) & 0xff)); + output[j+2] = static_cast(((in[i] >> 16) & 0xff)); + output[j+3] = static_cast(((in[i] >> 24) & 0xff)); } #endif } -// Decodes in (Q_UINT8) into output (Q_UINT32). Assumes len is a +// Decodes in (TQ_UINT8) into output (TQ_UINT32). Assumes len is a // multiple of 4. -void KMD5::decode (Q_UINT32 *output, const unsigned char* in, Q_UINT32 len) +void KMD5::decode (TQ_UINT32 *output, const unsigned char* in, TQ_UINT32 len) { #if !defined(WORDS_BIGENDIAN) memcpy(output, in, len); #else - Q_UINT32 i, j; + TQ_UINT32 i, j; for (i = 0, j = 0; j < len; i++, j += 4) - output[i] = static_cast(in[j]) | - (static_cast(in[j+1]) << 8) | - (static_cast(in[j+2]) << 16) | - (static_cast(in[j+3]) << 24); + output[i] = static_cast(in[j]) | + (static_cast(in[j+1]) << 8) | + (static_cast(in[j+2]) << 16) | + (static_cast(in[j+3]) << 24); #endif } @@ -1180,7 +1180,7 @@ void KMD4::update(const TQCString& in) void KMD4::update(const unsigned char *in, int len) { if (len < 0) - len = qstrlen(reinterpret_cast(in)); + len = tqstrlen(reinterpret_cast(in)); if (!len) return; @@ -1190,12 +1190,12 @@ void KMD4::update(const unsigned char *in, int len) return; } - Q_UINT32 t; + TQ_UINT32 t; /* Update bitcount */ t = m_count[0]; - if ((m_count[0] = t + ((Q_UINT32) len << 3)) < t) + if ((m_count[0] = t + ((TQ_UINT32) len << 3)) < t) m_count[1]++; /* Carry from low to high */ m_count[1] += len >> 29; @@ -1205,17 +1205,17 @@ void KMD4::update(const unsigned char *in, int len) if (t) { - Q_UINT8 *p = &m_buffer[ t ]; + TQ_UINT8 *p = &m_buffer[ t ]; t = 64 - t; - if ((Q_UINT32)len < t) + if ((TQ_UINT32)len < t) { memcpy (p, in, len); return; } memcpy (p, in, t); byteReverse (m_buffer, 16); - transform (m_state, (Q_UINT32*) m_buffer); + transform (m_state, (TQ_UINT32*) m_buffer); in += t; len -= t; } @@ -1225,7 +1225,7 @@ void KMD4::update(const unsigned char *in, int len) { memcpy (m_buffer, in, 64); byteReverse (m_buffer, 16); - transform (m_state, (Q_UINT32 *) m_buffer); + transform (m_state, (TQ_UINT32 *) m_buffer); in += 64; len -= 64; } @@ -1272,7 +1272,7 @@ void KMD4::finalize() /* Two lots of padding: Pad the first block to 64 bytes */ memset (p, 0, count); byteReverse (m_buffer, 16); - transform (m_state, (Q_UINT32*) m_buffer); + transform (m_state, (TQ_UINT32*) m_buffer); /* Now fill the next block with 56 bytes */ memset (m_buffer, 0, 56); @@ -1285,10 +1285,10 @@ void KMD4::finalize() byteReverse (m_buffer, 14); /* Append length in bits and transform */ - ((Q_UINT32 *) m_buffer)[14] = m_count[0]; - ((Q_UINT32 *) m_buffer)[15] = m_count[1]; + ((TQ_UINT32 *) m_buffer)[14] = m_count[0]; + ((TQ_UINT32 *) m_buffer)[15] = m_count[1]; - transform (m_state, (Q_UINT32 *) m_buffer); + transform (m_state, (TQ_UINT32 *) m_buffer); byteReverse ((unsigned char *) m_state, 4); memcpy (m_digest, m_state, 16); @@ -1380,53 +1380,53 @@ void KMD4::reset() memset ( m_digest, 0, sizeof(*m_digest)); } -//#define rotl32(x,n) (((x) << ((Q_UINT32)(n))) | ((x) >> (32 - (Q_UINT32)(n)))) +//#define rotl32(x,n) (((x) << ((TQ_UINT32)(n))) | ((x) >> (32 - (TQ_UINT32)(n)))) -inline Q_UINT32 KMD4::rotate_left (Q_UINT32 x, Q_UINT32 n) +inline TQ_UINT32 KMD4::rotate_left (TQ_UINT32 x, TQ_UINT32 n) { return (x << n) | (x >> (32-n)) ; } -inline Q_UINT32 KMD4::F (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z) +inline TQ_UINT32 KMD4::F (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z) { return (x & y) | (~x & z); } -inline Q_UINT32 KMD4::G (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z) +inline TQ_UINT32 KMD4::G (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z) { return ((x) & (y)) | ((x) & (z)) | ((y) & (z)); } -inline Q_UINT32 KMD4::H (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z) +inline TQ_UINT32 KMD4::H (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z) { return x ^ y ^ z; } -inline void KMD4::FF ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, - Q_UINT32 x, Q_UINT32 s ) +inline void KMD4::FF ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, + TQ_UINT32 x, TQ_UINT32 s ) { a += F(b, c, d) + x; a = rotate_left (a, s); } -inline void KMD4::GG ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, - Q_UINT32 x, Q_UINT32 s) +inline void KMD4::GG ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, + TQ_UINT32 x, TQ_UINT32 s) { - a += G(b, c, d) + x + (Q_UINT32)0x5a827999; + a += G(b, c, d) + x + (TQ_UINT32)0x5a827999; a = rotate_left (a, s); } -inline void KMD4::HH ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, - Q_UINT32 x, Q_UINT32 s ) +inline void KMD4::HH ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, + TQ_UINT32 x, TQ_UINT32 s ) { - a += H(b, c, d) + x + (Q_UINT32)0x6ed9eba1; + a += H(b, c, d) + x + (TQ_UINT32)0x6ed9eba1; a = rotate_left (a, s); } -void KMD4::byteReverse( unsigned char *buf, Q_UINT32 len ) +void KMD4::byteReverse( unsigned char *buf, TQ_UINT32 len ) { #ifdef WORDS_BIGENDIAN - Q_UINT32 *b = (Q_UINT32*) buf; + TQ_UINT32 *b = (TQ_UINT32*) buf; while ( len > 0 ) { *b = ((((*b) & 0xff000000) >> 24) | (((*b) & 0x00ff0000) >> 8) | (((*b) & 0x0000ff00) << 8) | (((*b) & 0x000000ff) << 24)); @@ -1442,9 +1442,9 @@ void KMD4::byteReverse( unsigned char *buf, Q_UINT32 len ) /* * The core of the MD4 algorithm */ -void KMD4::transform( Q_UINT32 buf[4], Q_UINT32 const in[16] ) +void KMD4::transform( TQ_UINT32 buf[4], TQ_UINT32 const in[16] ) { - Q_UINT32 a, b, c, d; + TQ_UINT32 a, b, c, d; a = buf[0]; b = buf[1]; diff --git a/kdecore/kmdcodec.h b/kdecore/kmdcodec.h index ef1d49d1e..d4bd8dfb0 100644 --- a/kdecore/kmdcodec.h +++ b/kdecore/kmdcodec.h @@ -541,27 +541,27 @@ private: KMD5& operator=(const KMD5& md); void init(); - void encode( unsigned char* output, Q_UINT32 *in, Q_UINT32 len ); - void decode( Q_UINT32 *output, const unsigned char* in, Q_UINT32 len ); - - Q_UINT32 rotate_left( Q_UINT32 x, Q_UINT32 n ); - Q_UINT32 F( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z ); - Q_UINT32 G( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z ); - Q_UINT32 H( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z ); - Q_UINT32 I( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z ); - void FF( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x, - Q_UINT32 s, Q_UINT32 ac ); - void GG( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x, - Q_UINT32 s, Q_UINT32 ac ); - void HH( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x, - Q_UINT32 s, Q_UINT32 ac ); - void II( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x, - Q_UINT32 s, Q_UINT32 ac ); + void encode( unsigned char* output, TQ_UINT32 *in, TQ_UINT32 len ); + void decode( TQ_UINT32 *output, const unsigned char* in, TQ_UINT32 len ); + + TQ_UINT32 rotate_left( TQ_UINT32 x, TQ_UINT32 n ); + TQ_UINT32 F( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z ); + TQ_UINT32 G( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z ); + TQ_UINT32 H( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z ); + TQ_UINT32 I( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z ); + void FF( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x, + TQ_UINT32 s, TQ_UINT32 ac ); + void GG( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x, + TQ_UINT32 s, TQ_UINT32 ac ); + void HH( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x, + TQ_UINT32 s, TQ_UINT32 ac ); + void II( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x, + TQ_UINT32 s, TQ_UINT32 ac ); private: - Q_UINT32 m_state[4]; - Q_UINT32 m_count[2]; - Q_UINT8 m_buffer[64]; + TQ_UINT32 m_state[4]; + TQ_UINT32 m_count[2]; + TQ_UINT8 m_buffer[64]; Digest m_digest; bool m_finalized; @@ -704,7 +704,7 @@ protected: * Performs the real update work. Note * that length is implied to be 64. */ - void transform( Q_UINT32 buf[4], Q_UINT32 const in[16] ); + void transform( TQ_UINT32 buf[4], TQ_UINT32 const in[16] ); /** * finalizes the digest @@ -717,23 +717,23 @@ private: void init(); - void byteReverse( unsigned char *buf, Q_UINT32 len ); + void byteReverse( unsigned char *buf, TQ_UINT32 len ); - Q_UINT32 rotate_left( Q_UINT32 x, Q_UINT32 n ); - Q_UINT32 F( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z ); - Q_UINT32 G( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z ); - Q_UINT32 H( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z ); - void FF( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x, - Q_UINT32 s ); - void GG( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x, - Q_UINT32 s ); - void HH( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x, - Q_UINT32 s ); + TQ_UINT32 rotate_left( TQ_UINT32 x, TQ_UINT32 n ); + TQ_UINT32 F( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z ); + TQ_UINT32 G( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z ); + TQ_UINT32 H( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z ); + void FF( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x, + TQ_UINT32 s ); + void GG( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x, + TQ_UINT32 s ); + void HH( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x, + TQ_UINT32 s ); private: - Q_UINT32 m_state[4]; - Q_UINT32 m_count[2]; - Q_UINT8 m_buffer[64]; + TQ_UINT32 m_state[4]; + TQ_UINT32 m_count[2]; + TQ_UINT8 m_buffer[64]; Digest m_digest; bool m_finalized; diff --git a/kdecore/kmimesourcefactory.cpp b/kdecore/kmimesourcefactory.cpp index 37745d398..0123f3465 100644 --- a/kdecore/kmimesourcefactory.cpp +++ b/kdecore/kmimesourcefactory.cpp @@ -60,7 +60,7 @@ TQString KMimeSourceFactory::makeAbsolute (const TQString& absOrRelName, const T TQString myName; TQString myContext; - const int pos = absOrRelName.find ('|'); + const int pos = absOrRelName.tqfind ('|'); if (pos > -1) { myContext = absOrRelName.left (pos); diff --git a/kdecore/kmultipledrag.cpp b/kdecore/kmultipledrag.cpp index 29d56bd85..94abe689e 100644 --- a/kdecore/kmultipledrag.cpp +++ b/kdecore/kmultipledrag.cpp @@ -39,9 +39,9 @@ void KMultipleDrag::addDragObject( TQDragObject *dragObject ) m_numberFormats.append( i ); // e.g. if it supports two formats, 0 and 1, store 2. } -TQByteArray KMultipleDrag::encodedData( const char *mime ) const +TQByteArray KMultipleDrag::tqencodedData( const char *mime ) const { - //kdDebug() << "KMultipleDrag::encodedData " << mime << endl; + //kdDebug() << "KMultipleDrag::tqencodedData " << mime << endl; // Iterate over the drag objects, and find the format in the right one TQPtrListIterator it( m_dragObjects ); for ( ; it.current(); ++it ) @@ -49,7 +49,7 @@ TQByteArray KMultipleDrag::encodedData( const char *mime ) const for ( int i = 0; it.current()->format( i ); ++i ) { if ( ::qstrcmp( it.current()->format( i ), mime ) == 0 ) - return it.current()->encodedData( mime ); + return it.current()->tqencodedData( mime ); } } return TQByteArray(); diff --git a/kdecore/kmultipledrag.h b/kdecore/kmultipledrag.h index 47bfbd378..5dc6e2972 100644 --- a/kdecore/kmultipledrag.h +++ b/kdecore/kmultipledrag.h @@ -40,7 +40,7 @@ class KMultipleDragPrivate; * Sample code for this: * * \code - * KMultipleDrag *drag = new KMultipleDrag( parentWidget ); + * KMultipleDrag *drag = new KMultipleDrag( tqparentWidget ); * drag->addDragObject( new TQImageDrag( someQImage, 0 ) ); * drag->addDragObject( new KURLDrag( someKURL, 0 ) ); * drag->drag(); @@ -80,7 +80,7 @@ public: * @return the data, or a null byte array if not found * @reimp */ - virtual TQByteArray encodedData( const char *mime ) const; + virtual TQByteArray tqencodedData( const char *mime ) const; /** * Returns the @p i'th supported format, or 0. diff --git a/kdecore/knotifyclient.cpp b/kdecore/knotifyclient.cpp index bce90d86a..185639f11 100644 --- a/kdecore/knotifyclient.cpp +++ b/kdecore/knotifyclient.cpp @@ -84,9 +84,9 @@ static int sendNotifyEvent(const TQString &message, const TQString &text, int uniqueId = kMax( 1, kapp->random() ); // must not be 0 -- means failure! // knotify daemon needs toplevel window - TQWidget* widget = TQWidget::find( (WId)winId ); + TQWidget* widget = TQT_TQWIDGET(TQWidget::find( (WId)winId )); if( widget ) - winId = (int)widget->topLevelWidget()->winId(); + winId = (int)widget->tqtopLevelWidget()->winId(); TQByteArray data; TQDataStream ds(data, IO_WriteOnly); @@ -126,20 +126,20 @@ int KNotifyClient::event( int winId, StandardEvent type, const TQString& text ) TQString message; switch ( type ) { case cannotOpenFile: - message = TQString::fromLatin1("cannotopenfile"); + message = TQString::tqfromLatin1("cannotopenfile"); break; case warning: - message = TQString::fromLatin1("warning"); + message = TQString::tqfromLatin1("warning"); break; case fatalError: - message = TQString::fromLatin1("fatalerror"); + message = TQString::tqfromLatin1("fatalerror"); break; case catastrophe: - message = TQString::fromLatin1("catastrophe"); + message = TQString::tqfromLatin1("catastrophe"); break; case notification: // fall through default: - message = TQString::fromLatin1("notification"); + message = TQString::tqfromLatin1("notification"); break; } diff --git a/kdecore/kpalette.cpp b/kdecore/kpalette.cpp index 777340ea6..1a828fe4d 100644 --- a/kdecore/kpalette.cpp +++ b/kdecore/kpalette.cpp @@ -66,7 +66,7 @@ KPalette::KPalette(const TQString &name) // Read first line // Expected "GIMP Palette" if (paletteFile.readLine(line, maxLength) == -1) return; - if (line.find(" Palette") == -1) return; + if (line.tqfind(" Palette") == -1) return; while( paletteFile.readLine(line, maxLength) != -1) { @@ -170,7 +170,7 @@ KPalette::operator=( const KPalette &p) return *this; } -QColor +TQColor KPalette::color(int index) { if ((index < 0) || (index >= nrColors())) @@ -196,7 +196,7 @@ KPalette::findColor(const TQColor &color) const return -1; } -QString +TQString KPalette::colorName(int index) { if ((index < 0) || (index >= nrColors())) diff --git a/kdecore/kprocctrl.cpp b/kdecore/kprocctrl.cpp index d8170c0a8..6774eee5f 100644 --- a/kdecore/kprocctrl.cpp +++ b/kdecore/kprocctrl.cpp @@ -214,7 +214,7 @@ void KProcessController::slotDoHousekeeping() if( waitpid( *uit, 0, WNOHANG ) > 0 ) { uit = unixProcessList.remove( uit ); - deref(); // counterpart to addProcess, can invalidate 'this' + deref(); // counterpart to addProcess, can tqinvalidate 'this' } else ++uit; } diff --git a/kdecore/kprocctrl.h b/kdecore/kprocctrl.h index 69182a344..0e534f4ad 100644 --- a/kdecore/kprocctrl.h +++ b/kdecore/kprocctrl.h @@ -36,7 +36,7 @@ class TQSocketNotifier; * * This class takes care of the actual (UN*X) signal handling. */ -class KDECORE_EXPORT KProcessController : public QObject +class KDECORE_EXPORT KProcessController : public TQObject { Q_OBJECT diff --git a/kdecore/kprocess.h b/kdecore/kprocess.h index 51366e3e4..a07df060e 100644 --- a/kdecore/kprocess.h +++ b/kdecore/kprocess.h @@ -127,7 +127,7 @@ class KPty; * @author Christian Czezatke e9025461@student.tuwien.ac.at * **/ -class KDECORE_EXPORT KProcess : public QObject +class KDECORE_EXPORT KProcess : public TQObject { Q_OBJECT @@ -606,7 +606,7 @@ signals: * data structures before returning from the slot. * Example: * \code - * TQString myBuf = TQString::fromLatin1(buffer, buflen); + * TQString myBuf = TQString::tqfromLatin1(buffer, buflen); * \endcode **/ void receivedStdout(KProcess *proc, char *buffer, int buflen); @@ -752,7 +752,7 @@ protected: * will usually do some communications cleanup, like closing in[0], * out[1] and out[1]. * - * Furthermore, it must also create the QSocketNotifiers innot, + * Furthermore, it must also create the TQSocketNotifiers innot, * outnot and errnot and connect their Qt signals to the respective * KProcess slots. * diff --git a/kdecore/kprocio.cpp b/kdecore/kprocio.cpp index 9159edab5..91c28024f 100644 --- a/kdecore/kprocio.cpp +++ b/kdecore/kprocio.cpp @@ -231,7 +231,7 @@ int KProcIO::readln (TQString &line, bool autoAck, bool *partial) //need to reduce the size of recvbuffer at some point... - len=recvbuffer.find ('\n',rbi)-rbi; + len=recvbuffer.tqfind ('\n',rbi)-rbi; //kdDebug(174) << "KPIO::readln" << endl; diff --git a/kdecore/kprocio.h b/kdecore/kprocio.h index 8661699a7..89c69008e 100644 --- a/kdecore/kprocio.h +++ b/kdecore/kprocio.h @@ -35,7 +35,7 @@ class TQTextCodec; * buffer and maintained/freed appropriately. There is no need * to be concerned with wroteStdin() signals _at_all_. * @li readln() reads a line of data and buffers any leftovers. - * @li Conversion from/to unicode. + * @li Conversion from/to tqunicode. * * Basically, KProcIO gives you buffered I/O similar to fgets()/fputs(). * diff --git a/kdecore/kprotocolinfo_kdecore.cpp b/kdecore/kprotocolinfo_kdecore.cpp index 203f455a1..66ce97760 100644 --- a/kdecore/kprotocolinfo_kdecore.cpp +++ b/kdecore/kprotocolinfo_kdecore.cpp @@ -151,8 +151,8 @@ KProtocolInfo::load( TQDataStream& _str) { // You may add new fields at the end. Make sure to update the version // number in ksycoca.h - Q_INT32 i_inputType, i_outputType; - Q_INT8 i_isSourceProtocol, i_isHelperProtocol, + TQ_INT32 i_inputType, i_outputType; + TQ_INT8 i_isSourceProtocol, i_isHelperProtocol, i_supportsListing, i_supportsReading, i_supportsWriting, i_supportsMakeDir, i_supportsDeleting, i_supportsLinking, @@ -206,8 +206,8 @@ KProtocolInfo::save( TQDataStream& _str) // You may add new fields at the end. Make sure to update the version // number in ksycoca.h - Q_INT32 i_inputType, i_outputType; - Q_INT8 i_isSourceProtocol, i_isHelperProtocol, + TQ_INT32 i_inputType, i_outputType; + TQ_INT8 i_isSourceProtocol, i_isHelperProtocol, i_supportsListing, i_supportsReading, i_supportsWriting, i_supportsMakeDir, i_supportsDeleting, i_supportsLinking, @@ -216,8 +216,8 @@ KProtocolInfo::save( TQDataStream& _str) i_uriMode, i_canRenameFromFile, i_canRenameToFile, i_canDeleteRecursive, i_fileNameUsedForCopying; - i_inputType = (Q_INT32) m_inputType; - i_outputType = (Q_INT32) m_outputType; + i_inputType = (TQ_INT32) m_inputType; + i_outputType = (TQ_INT32) m_outputType; i_isSourceProtocol = m_isSourceProtocol ? 1 : 0; i_isHelperProtocol = m_isHelperProtocol ? 1 : 0; i_supportsListing = m_supportsListing ? 1 : 0; @@ -392,7 +392,7 @@ TQString KProtocolInfo::icon( const TQString& _protocol ) { KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol); if ( !prot ) - return TQString::fromLatin1("unknown"); + return TQString::tqfromLatin1("unknown"); return prot->m_icon; } diff --git a/kdecore/kprotocolinfofactory.cpp b/kdecore/kprotocolinfofactory.cpp index e47cbb881..6d61c2d8c 100644 --- a/kdecore/kprotocolinfofactory.cpp +++ b/kdecore/kprotocolinfofactory.cpp @@ -86,7 +86,7 @@ KProtocolInfoFactory::findProtocol(const TQString &protocol) { if (!m_sycocaDict) return 0; // Error! - TQMap::iterator it = m_cache.find(protocol); + TQMap::iterator it = m_cache.tqfind(protocol); if (it != m_cache.end()) return (*it); diff --git a/kdecore/kqiodevicegzip_p.cpp b/kdecore/kqiodevicegzip_p.cpp index 2f949b9ee..8439eb26e 100644 --- a/kdecore/kqiodevicegzip_p.cpp +++ b/kdecore/kqiodevicegzip_p.cpp @@ -78,7 +78,11 @@ void KQIODeviceGZip::flush(void) } } +#ifdef USE_QT4 +qint64 KQIODeviceGZip::size(void) const +#else // USE_QT4 TQIODevice::Offset KQIODeviceGZip::size(void) const +#endif // USE_QT4 { return 0; // You cannot determine size! } @@ -111,9 +115,9 @@ bool KQIODeviceGZip::reset(void) return (gzrewind(m_gzfile)>=0); } -Q_LONG KQIODeviceGZip::readBlock( char *data, Q_ULONG maxlen ) +TQ_LONG KQIODeviceGZip::readBlock( char *data, TQ_ULONG maxlen ) { - Q_LONG result=0; + TQ_LONG result=0; if (m_gzfile) { result=gzread(m_gzfile,data,maxlen); @@ -122,9 +126,9 @@ Q_LONG KQIODeviceGZip::readBlock( char *data, Q_ULONG maxlen ) return result; } -Q_LONG KQIODeviceGZip::writeBlock( const char *data, Q_ULONG len ) +TQ_LONG KQIODeviceGZip::writeBlock( const char *data, TQ_ULONG len ) { - Q_ULONG result=0; + TQ_ULONG result=0; if (m_gzfile) { result=gzwrite(m_gzfile,(char*)data,len); diff --git a/kdecore/kqiodevicegzip_p.h b/kdecore/kqiodevicegzip_p.h index 02c3fe039..73da2281d 100644 --- a/kdecore/kqiodevicegzip_p.h +++ b/kdecore/kqiodevicegzip_p.h @@ -32,7 +32,7 @@ * \internal This class is internal to KDE. * The class KFilterDev should be used instead. */ -class KQIODeviceGZip : public QIODevice +class KQIODeviceGZip : public TQIODevice { public: KQIODeviceGZip(const TQString& filename); @@ -42,14 +42,18 @@ public: void close(void); void flush(void); +#ifdef USE_QT4 + qint64 size(void) const; +#else // USE_QT4 Offset size(void) const; +#endif // USE_QT4 Offset at(void) const; bool at(Offset pos); bool atEnd(void) const; bool reset (void); - Q_LONG readBlock( char *data, Q_ULONG maxlen ); - Q_LONG writeBlock( const char *data, Q_ULONG len ); + TQ_LONG readBlock( char *data, TQ_ULONG maxlen ); + TQ_LONG writeBlock( const char *data, TQ_ULONG len ); int getch(void); int putch(int ch); diff --git a/kdecore/kregexp.h b/kdecore/kregexp.h index c3ed8ff3d..88d16a3c7 100644 --- a/kdecore/kregexp.h +++ b/kdecore/kregexp.h @@ -30,7 +30,7 @@ class KRegExpPrivate; * * This was implemented * because TQRegExp did not support back-references. It now does and - * is recommended over KRegExp because of the unicode support and the + * is recommended over KRegExp because of the tqunicode support and the * more powerful API. * * Back-references are parts of a regexp grouped with parentheses. If a @@ -53,7 +53,7 @@ class KRegExpPrivate; * Weis * \endcode * - * Please notice that KRegExp does @em not support unicode. + * Please notice that KRegExp does @em not support tqunicode. * * @author Torben Weis */ diff --git a/kdecore/krfcdate.cpp b/kdecore/krfcdate.cpp index d9a374d0c..ebb12aa62 100644 --- a/kdecore/krfcdate.cpp +++ b/kdecore/krfcdate.cpp @@ -363,12 +363,12 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) TQString input = input_; // First find the 'T' separator, if any. - int tPos = input.find('T'); + int tPos = input.tqfind('T'); // If there is no time, no month or no day specified, fill those missing // fields so that 'input' matches YYYY-MM-DDTHH:MM:SS if (-1 == tPos) { - const int dashes = input.contains('-'); + const int dashes = input.tqcontains('-'); if (0 == dashes) { input += "-01-01"; } else if (1 == dashes) { @@ -400,7 +400,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) // +zone or -zone suffix (offset from UTC). - int plusPos = timeString.findRev('+'); + int plusPos = timeString.tqfindRev('+'); if (-1 != plusPos) { TQString offsetString = timeString.mid(plusPos + 1); @@ -409,7 +409,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) timeString = timeString.left(plusPos); } else { - int minusPos = timeString.findRev('-'); + int minusPos = timeString.tqfindRev('-'); if (-1 != minusPos) { TQString offsetString = timeString.mid(minusPos + 1); @@ -421,7 +421,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) } // secfrac suffix. - int dotPos = timeString.findRev('.'); + int dotPos = timeString.tqfindRev('.'); if (-1 != dotPos) { timeString = timeString.left(dotPos); diff --git a/kdecore/krootprop.cpp b/kdecore/krootprop.cpp index 2d545f30b..88f82b7d3 100644 --- a/kdecore/krootprop.cpp +++ b/kdecore/krootprop.cpp @@ -118,7 +118,7 @@ void KRootProp::setProp( const TQString& rProp ) { // parse the string for first key-value pair separator '\n' - i = s.find("\n"); + i = s.tqfind("\n"); if(i == -1) i = s.length(); @@ -131,7 +131,7 @@ void KRootProp::setProp( const TQString& rProp ) keypair.simplifyWhiteSpace(); - i = keypair.find( "=" ); + i = keypair.tqfind( "=" ); if( i != -1 ) { key = keypair.left( i ); @@ -160,7 +160,7 @@ void KRootProp::destroy() TQString KRootProp::readEntry( const TQString& rKey, const TQString& pDefault ) const { - if( propDict.contains( rKey ) ) + if( propDict.tqcontains( rKey ) ) return propDict[ rKey ]; else return pDefault; @@ -217,18 +217,18 @@ TQColor KRootProp::readColorEntry( const TQString& rKey, // Support #ffffff style color naming. // Help ease transistion from legacy KDE setups - if( aValue.find("#") == 0 ) { + if( aValue.tqfind("#") == 0 ) { aRetColor.setNamedColor( aValue ); return aRetColor; } // Parse "red,green,blue" // find first comma - int nIndex1 = aValue.find( ',' ); + int nIndex1 = aValue.tqfind( ',' ); if( nIndex1 == -1 ) return aRetColor; // find second comma - int nIndex2 = aValue.find( ',', nIndex1+1 ); + int nIndex2 = aValue.tqfind( ',', nIndex1+1 ); if( nIndex2 == -1 ) return aRetColor; @@ -246,9 +246,9 @@ TQColor KRootProp::readColorEntry( const TQString& rKey, TQString KRootProp::writeEntry( const TQString& rKey, const TQString& rValue ) { dirty = true; - if ( propDict.contains( rKey ) ) { + if ( propDict.tqcontains( rKey ) ) { TQString aValue = propDict[ rKey ]; - propDict.replace( rKey, rValue ); + propDict.tqreplace( rKey, rValue ); return aValue; } else { @@ -268,7 +268,7 @@ TQString KRootProp::writeEntry( const TQString& rKey, int nValue ) TQString KRootProp::writeEntry( const TQString& rKey, const TQFont& rFont ) { - return writeEntry( rKey, rFont.toString() ); + return writeEntry( rKey, TQString(rFont.toString()) ); } TQString KRootProp::writeEntry( const TQString& rKey, const TQColor& rColor ) @@ -280,7 +280,7 @@ TQString KRootProp::writeEntry( const TQString& rKey, const TQColor& rColor ) TQString KRootProp::removeEntry(const TQString& rKey) { - if (propDict.contains(rKey)) { + if (propDict.tqcontains(rKey)) { dirty = true; TQString aValue = propDict[rKey]; propDict.remove(rKey); diff --git a/kdecore/ksavefile.cpp b/kdecore/ksavefile.cpp index 16887a677..1f1f28d23 100644 --- a/kdecore/ksavefile.cpp +++ b/kdecore/ksavefile.cpp @@ -55,7 +55,7 @@ KSaveFile::KSaveFile(const TQString &filename, int mode) return; } - if (mTempFile.create(real_filename, TQString::fromLatin1(".new"), mode)) + if (mTempFile.create(real_filename, TQString::tqfromLatin1(".new"), mode)) { mFileName = real_filename; // Set filename upon success @@ -90,7 +90,7 @@ KSaveFile::~KSaveFile() close(); // Close if we were still open } -QString +TQString KSaveFile::name() const { return mFileName; @@ -165,7 +165,7 @@ bool KSaveFile::backupFile( const TQString& qFilename, const TQString& backupDir else { TQCString nameOnly; - int slash = cFilename.findRev('/'); + int slash = cFilename.tqfindRev('/'); if (slash < 0) nameOnly = cFilename; else diff --git a/kdecore/ksavefile.h b/kdecore/ksavefile.h index ae68b2d1f..448c9ca1a 100644 --- a/kdecore/ksavefile.h +++ b/kdecore/ksavefile.h @@ -140,7 +140,7 @@ public: */ static bool backupFile( const TQString& filename, const TQString& backupDir = TQString::null, - const TQString& backupExtension = TQString::fromLatin1( "~" ) ); + const TQString& backupExtension = TQString::tqfromLatin1( "~" ) ); private: TQString mFileName; diff --git a/kdecore/kshell.cpp b/kdecore/kshell.cpp index 5b92b1d5e..9ca5dc9b7 100644 --- a/kdecore/kshell.cpp +++ b/kdecore/kshell.cpp @@ -29,12 +29,12 @@ static int fromHex( TQChar c ) { - if (c >= (QChar)'0' && c <= (QChar)'9') - return c - (QChar)'0'; - else if (c >= (QChar)'A' && c <= (QChar)'F') - return c - (QChar)'A' + 10; - else if (c >= (QChar)'a' && c <= (QChar)'f') - return c - (QChar)'a' + 10; + if (c >= (TQChar)'0' && c <= (TQChar)'9') + return c - (TQChar)'0'; + else if (c >= (TQChar)'A' && c <= (TQChar)'F') + return c - (TQChar)'A' + 10; + else if (c >= (TQChar)'a' && c <= (TQChar)'f') + return c - (TQChar)'a' + 10; return -1; } @@ -72,7 +72,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) do { if (pos >= args.length()) goto okret; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; } while (c.isSpace()); TQString cret; if ((flags & TildeExpand) && c == (QChar)'~') { @@ -80,7 +80,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) for (; ; pos++) { if (pos >= args.length()) break; - c = args.unicode()[pos]; + c = args.tqunicode()[pos]; if (c == (QChar)'/' || c.isSpace()) break; if (isQuoteMeta( c )) { @@ -91,7 +91,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) if ((flags & AbortOnMeta) && isMeta( c )) goto metaerr; } - TQString ccret = homeDir( TQConstString( args.unicode() + opos, pos - opos ).string() ); + TQString ccret = homeDir( TQConstString( args.tqunicode() + opos, pos - opos ).string() ); if (ccret.isEmpty()) { pos = opos; c = (QChar)'~'; @@ -129,20 +129,20 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) do { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; } while (c != (QChar)'\''); - cret += TQConstString( args.unicode() + spos, pos - spos - 1 ).string(); + cret += TQConstString( args.tqunicode() + spos, pos - spos - 1 ).string(); } else if (c == (QChar)'"') { for (;;) { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; if (c == (QChar)'"') break; if (c == (QChar)'\\') { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; if (c != (QChar)'"' && c != (QChar)'\\' && !((flags & AbortOnMeta) && (c == (QChar)'$' || c == (QChar)'`'))) cret += (QChar)'\\'; @@ -155,13 +155,13 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) for (;;) { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; if (c == (QChar)'\'') break; if (c == (QChar)'\\') { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; switch (c) { case 'a': cret += (QChar)'\a'; break; case 'b': cret += (QChar)'\b'; break; @@ -212,7 +212,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) if (c == (QChar)'\\') { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; if (!c.isSpace() && !((flags & AbortOnMeta) ? isMeta( c ) : isQuoteMeta( c ))) cret += '\\'; @@ -222,7 +222,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) } if (pos >= args.length()) break; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; } while (!c.isSpace()); ret += cret; firstword = false; @@ -265,7 +265,7 @@ TQString KShell::joinArgs( const TQStringList &args ) ret.append( q ).append( q ); else { for (uint i = 0; i < (*it).length(); i++) - if (isSpecial((*it).unicode()[i])) { + if (isSpecial((*it).tqunicode()[i])) { TQString tmp(*it); tmp.replace( q, "'\\''" ); ret += q; @@ -294,7 +294,7 @@ TQString KShell::joinArgs( const char * const *args, int nargs ) else { TQString tmp( TQFile::decodeName( *argp ) ); for (uint i = 0; i < tmp.length(); i++) - if (isSpecial(tmp.unicode()[i])) { + if (isSpecial(tmp.tqunicode()[i])) { tmp.replace( q, "'\\''" ); ret += q; tmp += q; @@ -319,10 +319,10 @@ TQString KShell::joinArgsDQ( const TQStringList &args ) ret.append( q ).append( q ); else { for (uint i = 0; i < (*it).length(); i++) - if (isSpecial((*it).unicode()[i])) { + if (isSpecial((*it).tqunicode()[i])) { ret.append( '$' ).append( q ); for (uint pos = 0; pos < (*it).length(); pos++) { - int c = (*it).unicode()[pos]; + int c = (*it).tqunicode()[pos]; if (c < 32) { ret += bs; switch (c) { @@ -355,12 +355,12 @@ TQString KShell::joinArgsDQ( const TQStringList &args ) TQString KShell::tildeExpand( const TQString &fname ) { if (fname[0] == (QChar)'~') { - int pos = fname.find( '/' ); + int pos = fname.tqfind( '/' ); if (pos < 0) - return homeDir( TQConstString( fname.unicode() + 1, fname.length() - 1 ).string() ); - TQString ret = homeDir( TQConstString( fname.unicode() + 1, pos - 1 ).string() ); + return homeDir( TQConstString( fname.tqunicode() + 1, fname.length() - 1 ).string() ); + TQString ret = homeDir( TQConstString( fname.tqunicode() + 1, pos - 1 ).string() ); if (!ret.isNull()) - ret += TQConstString( fname.unicode() + pos, fname.length() - pos ).string(); + ret += TQConstString( fname.tqunicode() + pos, fname.length() - pos ).string(); return ret; } return fname; diff --git a/kdecore/kshortcut.cpp b/kdecore/kshortcut.cpp index 4847b8742..10c6c31fa 100644 --- a/kdecore/kshortcut.cpp +++ b/kdecore/kshortcut.cpp @@ -88,10 +88,10 @@ bool KKey::init( const TQKeySequence& key ) bool KKey::init( const TQKeyEvent* pEvent ) { int keyQt = pEvent->key(); - if( pEvent->state() & Qt::ShiftButton ) keyQt |= Qt::SHIFT; - if( pEvent->state() & Qt::ControlButton ) keyQt |= Qt::CTRL; - if( pEvent->state() & Qt::AltButton ) keyQt |= Qt::ALT; - if( pEvent->state() & Qt::MetaButton ) keyQt |= Qt::META; + if( pEvent->state() & TQt::ShiftButton ) keyQt |= Qt::SHIFT; + if( pEvent->state() & TQt::ControlButton ) keyQt |= Qt::CTRL; + if( pEvent->state() & TQt::AltButton ) keyQt |= Qt::ALT; + if( pEvent->state() & TQt::MetaButton ) keyQt |= Qt::META; return init( keyQt ); } diff --git a/kdecore/kshortcutmenu.cpp b/kdecore/kshortcutmenu.cpp index 3df389f07..930095c84 100644 --- a/kdecore/kshortcutmenu.cpp +++ b/kdecore/kshortcutmenu.cpp @@ -123,7 +123,7 @@ int KShortcutMenu::searchForKey( KKey key ) uint iKey = m_seq.count(); for( uint iItem = 1; iItem < count(); iItem++ ) { - if( m_seqs.contains( iItem ) ) { + if( m_seqs.tqcontains( iItem ) ) { KKey keyItem = m_seqs[iItem].key( iKey ); //kdDebug(125) << "iItem = " << iItem << " key = " << key.toStringInternal() << " keyItem = " << keyItem.toStringInternal() << endl; if( key == keyItem ) { @@ -146,7 +146,7 @@ void KShortcutMenu::keepItemsMatching( KKey key ) m_seq.setKey( iKey, key ); for( uint iItem = 1; iItem < count(); iItem++ ) { - if( m_seqs.contains( iItem ) ) { + if( m_seqs.tqcontains( iItem ) ) { KKey keyItem = m_seqs[iItem].key( iKey ); if( key != keyItem ) { m_seqs.remove( iItem ); diff --git a/kdecore/ksimpleconfig.cpp b/kdecore/ksimpleconfig.cpp index 6b4e13a14..15597826d 100644 --- a/kdecore/ksimpleconfig.cpp +++ b/kdecore/ksimpleconfig.cpp @@ -38,7 +38,7 @@ #include "ksimpleconfig.h" KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly) - : KConfig(TQString::fromLatin1(""), bReadOnly, false) + : KConfig(TQString::tqfromLatin1(""), bReadOnly, false) { // the difference between KConfig and KSimpleConfig is just that // for KSimpleConfig an absolute filename is guaranteed diff --git a/kdecore/ksock.h b/kdecore/ksock.h index 8f2c9280c..67de00dc3 100644 --- a/kdecore/ksock.h +++ b/kdecore/ksock.h @@ -22,6 +22,10 @@ #include "kdelibs_export.h" +#ifdef Q_MOC_RUN +#define Q_OS_UNIX +#endif // Q_MOC_RUN + #ifdef Q_OS_UNIX #include @@ -84,7 +88,7 @@ class KServerSocketPrivate; * @author Torben Weis * @short A TCP/IP client socket. */ -class KDECORE_EXPORT KSocket : public QObject +class KDECORE_EXPORT KSocket : public TQObject { Q_OBJECT public: @@ -247,7 +251,7 @@ private: * * @author Torben Weis */ -class KDECORE_EXPORT KServerSocket : public QObject +class KDECORE_EXPORT KServerSocket : public TQObject { Q_OBJECT public: diff --git a/kdecore/ksockaddr.cpp b/kdecore/ksockaddr.cpp index 82bed0d5c..bc9c03059 100644 --- a/kdecore/ksockaddr.cpp +++ b/kdecore/ksockaddr.cpp @@ -421,7 +421,7 @@ bool KInetSocketAddress::setHost(const TQString& addr, int family) #ifdef AF_INET6 // IPv6 addresses MUST contain colons (:) and IPv4 addresses must not - if (addr.find(':') != -1) + if (addr.tqfind(':') != -1) family = AF_INET6; else family = AF_INET; @@ -485,7 +485,7 @@ bool KInetSocketAddress::setFamily(int _family) return true; } -bool KInetSocketAddress::setFlowinfo(Q_UINT32 flowinfo) +bool KInetSocketAddress::setFlowinfo(TQ_UINT32 flowinfo) { #ifdef AF_INET6 if (d->sockfamily == AF_INET6) @@ -587,7 +587,7 @@ TQString KInetSocketAddress::nodeName() const return i18n(""); } - return TQString::fromLatin1(buf); // FIXME! What's the encoding? + return TQString::tqfromLatin1(buf); // FIXME! What's the encoding? } TQString KInetSocketAddress::serviceName() const @@ -605,11 +605,11 @@ unsigned short KInetSocketAddress::port() const #endif } -Q_UINT32 KInetSocketAddress::flowinfo() const +TQ_UINT32 KInetSocketAddress::flowinfo() const { #ifdef AF_INET6 if (d->sockfamily == AF_INET6) - return (Q_UINT32)d->sin6.sin6_flowinfo; + return (TQ_UINT32)d->sin6.sin6_flowinfo; #endif return 0; } @@ -677,9 +677,9 @@ void KInetSocketAddress::fromV4() d->sin6.sin6_port = d->sin.sin_port; // Make this a v4-mapped address - ((Q_UINT32*)&d->sin6.sin6_addr)[0] = ((Q_UINT32*)&d->sin6.sin6_addr)[1] = 0; - ((Q_UINT32*)&d->sin6.sin6_addr)[2] = htonl(0xffff); - ((Q_UINT32*)&d->sin6.sin6_addr)[3] = *(Q_UINT32*)&d->sin.sin_addr; + ((TQ_UINT32*)&d->sin6.sin6_addr)[0] = ((TQ_UINT32*)&d->sin6.sin6_addr)[1] = 0; + ((TQ_UINT32*)&d->sin6.sin6_addr)[2] = htonl(0xffff); + ((TQ_UINT32*)&d->sin6.sin6_addr)[3] = *(TQ_UINT32*)&d->sin.sin_addr; // Clear flowinfo and scopeid d->sin6.sin6_flowinfo = 0; @@ -700,7 +700,7 @@ void KInetSocketAddress::fromV6() if (V6_CAN_CONVERT_TO_V4(&d->sin6.sin6_addr)) { d->sin.sin_port = d->sin6.sin6_port; - *(Q_UINT32*)&d->sin.sin_addr = ((Q_UINT32*)&d->sin6.sin6_addr)[3]; + *(TQ_UINT32*)&d->sin.sin_addr = ((TQ_UINT32*)&d->sin6.sin6_addr)[3]; } else { @@ -717,7 +717,7 @@ TQString KInetSocketAddress::addrToString(int family, const void* addr) { char buf[INET6_ADDRSTRLEN+1]; - return TQString::fromLatin1(inet_ntop(family, addr, buf, INET6_ADDRSTRLEN)); + return TQString::tqfromLatin1(inet_ntop(family, addr, buf, INET6_ADDRSTRLEN)); } bool KInetSocketAddress::stringToAddr(int family, const char *text, void *dest) diff --git a/kdecore/ksockaddr.h b/kdecore/ksockaddr.h index 8b62f7da9..04ae350aa 100644 --- a/kdecore/ksockaddr.h +++ b/kdecore/ksockaddr.h @@ -43,7 +43,7 @@ class KSocketAddressPrivate; * @author Thiago Macieira * @short a socket address. */ -class KDECORE_EXPORT KSocketAddress: public QObject +class KDECORE_EXPORT KSocketAddress: public TQObject { Q_OBJECT protected: @@ -391,7 +391,7 @@ public: * @param flowinfo flowinfo * @return true if successful, false otherwise */ - bool setFlowinfo(Q_UINT32 flowinfo); + bool setFlowinfo(TQ_UINT32 flowinfo); /** * Sets the scope id for this socket if this is IPv6. @@ -461,7 +461,7 @@ public: * Returns flowinfo for IPv6 socket. * @return the flowinfo, 0 if unsupported */ - Q_UINT32 flowinfo() const; + TQ_UINT32 flowinfo() const; /** * Returns the scope id for this IPv6 socket. diff --git a/kdecore/kstandarddirs.cpp b/kdecore/kstandarddirs.cpp index f8b7bd307..91a178a53 100644 --- a/kdecore/kstandarddirs.cpp +++ b/kdecore/kstandarddirs.cpp @@ -144,7 +144,7 @@ bool KStandardDirs::isRestrictedResource(const char *type, const TQString& relPa void KStandardDirs::applyDataRestrictions(const TQString &relPath) const { TQString key; - int i = relPath.find(QChar('/')); + int i = relPath.tqfind(QChar('/')); if (i != -1) key = "data_"+relPath.left(i); else @@ -159,7 +159,7 @@ TQStringList KStandardDirs::allTypes() const { TQStringList list; for (int i = 0; types[i] != 0; ++i) - list.append(TQString::fromLatin1(types[i])); + list.append(TQString::tqfromLatin1(types[i])); return list; } @@ -192,7 +192,7 @@ void KStandardDirs::addPrefix( const TQString& _dir, bool priority ) if (dir.at(dir.length() - 1) != QChar('/')) dir += QChar('/'); - if (!prefixes.contains(dir)) { + if (!prefixes.tqcontains(dir)) { priorityAdd(prefixes, dir, priority); dircache.clear(); } @@ -212,7 +212,7 @@ void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority ) if (dir.at(dir.length() - 1) != QChar('/')) dir += QChar('/'); - if (!d->xdgconf_prefixes.contains(dir)) { + if (!d->xdgconf_prefixes.tqcontains(dir)) { priorityAdd(d->xdgconf_prefixes, dir, priority); dircache.clear(); } @@ -232,7 +232,7 @@ void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority ) if (dir.at(dir.length() - 1) != QChar('/')) dir += QChar('/'); - if (!d->xdgdata_prefixes.contains(dir)) { + if (!d->xdgdata_prefixes.tqcontains(dir)) { priorityAdd(d->xdgdata_prefixes, dir, priority); dircache.clear(); } @@ -265,7 +265,7 @@ bool KStandardDirs::addResourceType( const char *type, if (relativename.isEmpty()) return false; - TQStringList *rels = relatives.find(type); + TQStringList *rels = relatives.tqfind(type); if (!rels) { rels = new TQStringList(); relatives.insert(type, rels); @@ -273,7 +273,7 @@ bool KStandardDirs::addResourceType( const char *type, TQString copy = relativename; if (copy.at(copy.length() - 1) != QChar('/')) copy += QChar('/'); - if (!rels->contains(copy)) { + if (!rels->tqcontains(copy)) { if (priority) rels->prepend(copy); else @@ -295,7 +295,7 @@ bool KStandardDirs::addResourceDir( const char *type, const TQString& absdir, bool priority) { - TQStringList *paths = absolutes.find(type); + TQStringList *paths = absolutes.tqfind(type); if (!paths) { paths = new TQStringList(); absolutes.insert(type, paths); @@ -304,7 +304,7 @@ bool KStandardDirs::addResourceDir( const char *type, if (copy.at(copy.length() - 1) != QChar('/')) copy += QChar('/'); - if (!paths->contains(copy)) { + if (!paths->tqcontains(copy)) { if (priority) paths->prepend(copy); else @@ -337,7 +337,7 @@ for (TQStringList::ConstIterator pit = prefixes.begin(); else return dir + filename; } -static Q_UINT32 updateHash(const TQString &file, Q_UINT32 hash) +static TQ_UINT32 updateHash(const TQString &file, TQ_UINT32 hash) { TQCString cFile = TQFile::encodeName(file); KDE_struct_stat buff; @@ -345,15 +345,15 @@ static Q_UINT32 updateHash(const TQString &file, Q_UINT32 hash) (KDE_stat( cFile, &buff ) == 0) && (S_ISREG( buff.st_mode ))) { - hash = hash + (Q_UINT32) buff.st_ctime; + hash = hash + (TQ_UINT32) buff.st_ctime; } return hash; } -Q_UINT32 KStandardDirs::calcResourceHash( const char *type, +TQ_UINT32 KStandardDirs::calcResourceHash( const char *type, const TQString& filename, bool deep) const { - Q_UINT32 hash = 0; + TQ_UINT32 hash = 0; if (!TQDir::isRelativePath(filename)) { @@ -492,7 +492,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, while( ( ep = readdir( dp ) ) != 0L ) { TQString fn( TQFile::decodeName(ep->d_name)); - if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1).latin1() == QChar('~').latin1()) + if (fn == _dot || fn == _dotdot || TQChar(fn.at(fn.length() - 1)).latin1() == TQChar('~').latin1()) continue; if (!recursive && !regexp.exactMatch(fn)) @@ -512,7 +512,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, } if ( S_ISREG( buff.st_mode)) { - if (!unique || !relList.contains(relPart + fn)) + if (!unique || !relList.tqcontains(relPart + fn)) { list.append( pathfn ); relList.append( relPart + fn ); @@ -531,7 +531,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, return; // File not found if ( S_ISREG( buff.st_mode)) { - if (!unique || !relList.contains(relPart + fn)) + if (!unique || !relList.tqcontains(relPart + fn)) { list.append( pathfn ); relList.append( relPart + fn ); @@ -557,7 +557,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath, if (relpath.length()) { - int slash = relpath.find(QChar('/')); + int slash = relpath.tqfind(QChar('/')); if (slash < 0) rest = relpath.left(relpath.length() - 1); else { @@ -629,7 +629,7 @@ KStandardDirs::findAllResources( const char *type, if (filter.length()) { - int slash = filter.findRev('/'); + int slash = filter.tqfindRev('/'); if (slash < 0) filterFile = filter; else { @@ -682,7 +682,7 @@ KStandardDirs::findAllResources( const char *type, return findAllResources(type, filter, recursive, unique, relList); } -QString +TQString KStandardDirs::realPath(const TQString &dirname) { char realpath_buffer[MAXPATHLEN + 1]; @@ -692,7 +692,7 @@ KStandardDirs::realPath(const TQString &dirname) if (realpath( TQFile::encodeName(dirname).data(), realpath_buffer) != 0) { // success, use result from realpath int len = strlen(realpath_buffer); - realpath_buffer[len] = QChar('/'); + realpath_buffer[len] = TQChar('/'); realpath_buffer[len+1] = 0; return TQFile::decodeName(realpath_buffer); } @@ -700,7 +700,7 @@ KStandardDirs::realPath(const TQString &dirname) return dirname; } -QString +TQString KStandardDirs::realFilePath(const TQString &filename) { char realpath_buffer[MAXPATHLEN + 1]; @@ -762,9 +762,9 @@ void KStandardDirs::createSpecialResource(const char *type) #else //UNIX if (relink) { - TQString srv = findExe(TQString::fromLatin1("lnusertemp"), kfsstnd_defaultbindir()); + TQString srv = findExe(TQString::tqfromLatin1("lnusertemp"), kfsstnd_defaultbindir()); if (srv.isEmpty()) - srv = findExe(TQString::fromLatin1("lnusertemp")); + srv = findExe(TQString::tqfromLatin1("lnusertemp")); if (!srv.isEmpty()) { system(TQFile::encodeName(srv)+" "+type); @@ -774,7 +774,7 @@ void KStandardDirs::createSpecialResource(const char *type) if (result > 0) { link[result] = 0; - if (link[0] == QChar('/').latin1()) + if (link[0] == TQChar('/').latin1()) dir = TQFile::decodeName(link); else dir = TQDir::cleanDirPath(dir+TQFile::decodeName(link)); @@ -785,7 +785,7 @@ void KStandardDirs::createSpecialResource(const char *type) TQStringList KStandardDirs::resourceDirs(const char *type) const { - TQStringList *candidates = dircache.find(type); + TQStringList *candidates = dircache.tqfind(type); if (!candidates) { // filling cache if (strcmp(type, "socket") == 0) @@ -812,7 +812,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const d->dataRestrictionActive = false; // Reset } - dirs = relatives.find(type); + dirs = relatives.tqfind(type); if (dirs) { bool local = true; @@ -834,7 +834,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const testdir.setPath(path); if (local && restrictionActive) continue; - if ((local || testdir.exists()) && !candidates->contains(path)) + if ((local || testdir.exists()) && !candidates->tqcontains(path)) candidates->append(path); } // UGLY HACK - Chris CHeney @@ -844,7 +844,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const local = false; } } - dirs = absolutes.find(type); + dirs = absolutes.tqfind(type); if (dirs) for (TQStringList::ConstIterator it = dirs->begin(); it != dirs->end(); ++it) @@ -853,7 +853,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const if (testdir.exists()) { TQString filename = realPath(*it); - if (!candidates->contains(filename)) + if (!candidates->tqcontains(filename)) candidates->append(filename); } } @@ -897,7 +897,7 @@ TQStringList KStandardDirs::systemPaths( const TQString& pstr ) if ( p[ 0 ] == QChar('~') ) { - int len = p.find( QChar('/') ); + int len = p.tqfind( QChar('/') ); if ( len == -1 ) len = p.length(); if ( len == 1 ) @@ -931,7 +931,7 @@ TQString KStandardDirs::findExe( const TQString& appname, TQFileInfo info; // absolute or relative path given - if (real_appname.find(TQDir::separator()) >= 0) + if (real_appname.tqfind(TQDir::separator()) >= 0) { info.setFile( real_appname ); if( info.exists() && ( ignore || info.isExecutable() ) @@ -1006,7 +1006,7 @@ static int tokenize( TQStringList& tokens, const TQString& str, for( int index = 0; index < len; index++) { - if ( delim.find( str[ index ] ) >= 0 ) + if ( delim.tqfind( str[ index ] ) >= 0 ) { tokens.append( token ); token = ""; @@ -1093,17 +1093,17 @@ TQString KStandardDirs::saveLocation(const char *type, { checkConfig(); - TQString *pPath = savelocations.find(type); + TQString *pPath = savelocations.tqfind(type); if (!pPath) { - TQStringList *dirs = relatives.find(type); + TQStringList *dirs = relatives.tqfind(type); if (!dirs && ( (strcmp(type, "socket") == 0) || (strcmp(type, "tmp") == 0) || (strcmp(type, "cache") == 0) )) { (void) resourceDirs(type); // Generate socket|tmp|cache resource. - dirs = relatives.find(type); // Search again. + dirs = relatives.tqfind(type); // Search again. } if (dirs) { @@ -1116,7 +1116,7 @@ TQString KStandardDirs::saveLocation(const char *type, pPath = new TQString(realPath(localkdedir() + dirs->last())); } else { - dirs = absolutes.find(type); + dirs = absolutes.tqfind(type); if (!dirs) qFatal("KStandardDirs: The resource type %s is not registered", type); pPath = new TQString(realPath(dirs->last())); @@ -1147,7 +1147,7 @@ TQString KStandardDirs::saveLocation(const char *type, TQString KStandardDirs::relativeLocation(const char *type, const TQString &absPath) { TQString fullPath = absPath; - int i = absPath.findRev('/'); + int i = absPath.tqfindRev('/'); if (i != -1) { fullPath = realPath(absPath.left(i+1))+absPath.mid(i+1); // Normalize @@ -1185,7 +1185,7 @@ bool KStandardDirs::makeDir(const TQString& dir, int mode) while( i < len ) { KDE_struct_stat st; - int pos = target.find(QChar('/'), i); + int pos = target.tqfind(QChar('/'), i); base += target.mid(i - 1, pos - i + 1); TQCString baseEncoded = TQFile::encodeName(base); // bail out if we encountered a problem @@ -1229,17 +1229,17 @@ static TQString executablePrefix() if (length == -1) return TQString::null; - path_buffer[length] = QChar('\0'); + path_buffer[length] = TQChar('\0'); TQString path = TQFile::decodeName(path_buffer); if(path.isEmpty()) return TQString::null; - int pos = path.findRev('/'); // Skip filename + int pos = path.tqfindRev('/'); // Skip filename if(pos <= 0) return TQString::null; - pos = path.findRev(QChar('/'), pos - 1); // Skip last directory + pos = path.tqfindRev(TQChar('/'), pos - 1); // Skip last directory if(pos <= 0) return TQString::null; @@ -1272,11 +1272,11 @@ TQString KStandardDirs::kfsstnd_defaultbindir() if (!s->defaultbindir.isEmpty()) return s->defaultbindir; #ifdef Q_WS_WIN - s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin"); + s->defaultbindir = kfsstnd_defaultprefix() + TQString::tqfromLatin1("/bin"); #else //UNIX s->defaultbindir = __KDE_BINDIR; if (s->defaultbindir.isEmpty()) - s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin"); + s->defaultbindir = kfsstnd_defaultprefix() + TQString::tqfromLatin1("/bin"); #endif if (s->defaultbindir.isEmpty()) kdWarning() << "KStandardDirs::kfsstnd_defaultbindir(): default binary KDE dir not found!" << endl; @@ -1543,21 +1543,21 @@ bool KStandardDirs::addCustomized(KConfig *config) addedCustoms = true; // reading the prefixes in - TQString group = TQString::fromLatin1("Directories"); + TQString group = TQString::tqfromLatin1("Directories"); config->setGroup(group); TQString kioskAdmin = config->readEntry("kioskAdmin"); if (!kioskAdmin.isEmpty() && !kde_kiosk_admin) { - int i = kioskAdmin.find(':'); + int i = kioskAdmin.tqfind(':'); TQString user = kioskAdmin.left(i); TQString host = kioskAdmin.mid(i+1); KUser thisUser; char hostname[ 256 ]; - hostname[ 0 ] = QChar('\0'); + hostname[ 0 ] = TQChar('\0'); if (!gethostname( hostname, 255 )) - hostname[sizeof(hostname)-1] = QChar('\0'); + hostname[sizeof(hostname)-1] = TQChar('\0'); if ((user == thisUser.loginName()) && (host.isEmpty() || (host == hostname))) @@ -1623,7 +1623,7 @@ bool KStandardDirs::addCustomized(KConfig *config) if (profiles.isEmpty()) break; profile = profiles.back(); - group = TQString::fromLatin1("Directories-%1").arg(profile); + group = TQString::tqfromLatin1("Directories-%1").arg(profile); profiles.pop_back(); priority = true; } @@ -1694,7 +1694,7 @@ TQString locateLocal( const char *type, { // try to find slashes. If there are some, we have to // create the subdir first - int slash = filename.findRev('/')+1; + int slash = filename.tqfindRev('/')+1; if (!slash) // only one filename return inst->dirs()->saveLocation(type, TQString::null, createDir) + filename; diff --git a/kdecore/kstandarddirs.h b/kdecore/kstandarddirs.h index ded472d1d..16bfd1847 100644 --- a/kdecore/kstandarddirs.h +++ b/kdecore/kstandarddirs.h @@ -255,7 +255,7 @@ public: * @return A number identifying the current version of the * resource. */ - Q_UINT32 calcResourceHash( const char *type, + TQ_UINT32 calcResourceHash( const char *type, const TQString& filename, bool deep) const; /** diff --git a/kdecore/kstartupinfo.cpp b/kdecore/kstartupinfo.cpp index 673e5e6ab..a55c82f55 100644 --- a/kdecore/kstartupinfo.cpp +++ b/kdecore/kstartupinfo.cpp @@ -177,7 +177,7 @@ void KStartupInfo::got_message( const TQString& msg_P ) namespace { class DelayedWindowEvent - : public QCustomEvent + : public TQCustomEvent { public: DelayedWindowEvent( WId w_P ) @@ -234,7 +234,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P, return; if( id_P.none()) return; - if( d->startups.contains( id_P )) + if( d->startups.tqcontains( id_P )) { // already reported, update d->startups[ id_P ].update( data_P ); d->startups[ id_P ].age = 0; // CHECKME @@ -250,7 +250,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P, emit gotStartupChange( id_P, d->startups[ id_P ] ); return; } - if( d->silent_startups.contains( id_P )) + if( d->silent_startups.tqcontains( id_P )) { // already reported, update d->silent_startups[ id_P ].update( data_P ); d->silent_startups[ id_P ].age = 0; // CHECKME @@ -265,7 +265,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P, emit gotStartupChange( id_P, d->silent_startups[ id_P ] ); return; } - if( d->uninited_startups.contains( id_P )) + if( d->uninited_startups.tqcontains( id_P )) { d->uninited_startups[ id_P ].update( data_P ); kdDebug( 172 ) << "updating uninited" << endl; @@ -317,18 +317,18 @@ void KStartupInfo::remove_startup_info_internal( const KStartupInfoId& id_P ) { if( d == NULL ) return; - if( d->startups.contains( id_P )) + if( d->startups.tqcontains( id_P )) { kdDebug( 172 ) << "removing" << endl; emit gotRemoveStartup( id_P, d->startups[ id_P ]); d->startups.remove( id_P ); } - else if( d->silent_startups.contains( id_P )) + else if( d->silent_startups.tqcontains( id_P )) { kdDebug( 172 ) << "removing silent" << endl; d->silent_startups.remove( id_P ); } - else if( d->uninited_startups.contains( id_P )) + else if( d->uninited_startups.tqcontains( id_P )) { kdDebug( 172 ) << "removing uninited" << endl; d->uninited_startups.remove( id_P ); @@ -360,11 +360,11 @@ void KStartupInfo::remove_startup_pids( const KStartupInfoId& id_P, return; kdFatal( data_P.pids().count() == 0, 172 ); Data* data = NULL; - if( d->startups.contains( id_P )) + if( d->startups.tqcontains( id_P )) data = &d->startups[ id_P ]; - else if( d->silent_startups.contains( id_P )) + else if( d->silent_startups.tqcontains( id_P )) data = &d->silent_startups[ id_P ]; - else if( d->uninited_startups.contains( id_P )) + else if( d->uninited_startups.tqcontains( id_P )) data = &d->uninited_startups[ id_P ]; else return; @@ -381,7 +381,7 @@ bool KStartupInfo::sendStartup( const KStartupInfoId& id_P, const KStartupInfoDa if( id_P.none()) return false; KXMessages msgs; - TQString msg = TQString::fromLatin1( "new: %1 %2" ) + TQString msg = TQString::tqfromLatin1( "new: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); msg = check_required_startup_fields( msg, data_P, qt_xscreen()); kdDebug( 172 ) << "sending " << msg << endl; @@ -394,7 +394,7 @@ bool KStartupInfo::sendStartupX( Display* disp_P, const KStartupInfoId& id_P, { if( id_P.none()) return false; - TQString msg = TQString::fromLatin1( "new: %1 %2" ) + TQString msg = TQString::tqfromLatin1( "new: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); msg = check_required_startup_fields( msg, data_P, DefaultScreen( disp_P )); #ifdef KSTARTUPINFO_ALL_DEBUG @@ -425,7 +425,7 @@ bool KStartupInfo::sendChange( const KStartupInfoId& id_P, const KStartupInfoDat if( id_P.none()) return false; KXMessages msgs; - TQString msg = TQString::fromLatin1( "change: %1 %2" ) + TQString msg = TQString::tqfromLatin1( "change: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); kdDebug( 172 ) << "sending " << msg << endl; msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false ); @@ -437,7 +437,7 @@ bool KStartupInfo::sendChangeX( Display* disp_P, const KStartupInfoId& id_P, { if( id_P.none()) return false; - TQString msg = TQString::fromLatin1( "change: %1 %2" ) + TQString msg = TQString::tqfromLatin1( "change: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); #ifdef KSTARTUPINFO_ALL_DEBUG kdDebug( 172 ) << "sending " << msg << endl; @@ -450,7 +450,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P ) if( id_P.none()) return false; KXMessages msgs; - TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text()); + TQString msg = TQString::tqfromLatin1( "remove: %1" ).arg( id_P.to_text()); kdDebug( 172 ) << "sending " << msg << endl; msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false ); return true; @@ -460,7 +460,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P ) { if( id_P.none()) return false; - TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text()); + TQString msg = TQString::tqfromLatin1( "remove: %1" ).arg( id_P.to_text()); #ifdef KSTARTUPINFO_ALL_DEBUG kdDebug( 172 ) << "sending " << msg << endl; #endif @@ -472,7 +472,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P, const KStartupInfoDat // if( id_P.none()) // id may be none, the pids and hostname matter then // return false; KXMessages msgs; - TQString msg = TQString::fromLatin1( "remove: %1 %2" ) + TQString msg = TQString::tqfromLatin1( "remove: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); kdDebug( 172 ) << "sending " << msg << endl; msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false ); @@ -484,7 +484,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P, { // if( id_P.none()) // id may be none, the pids and hostname matter then // return false; - TQString msg = TQString::fromLatin1( "remove: %1 %2" ) + TQString msg = TQString::tqfromLatin1( "remove: %1 %2" ) .arg( id_P.to_text()).arg( data_P.to_text()); #ifdef KSTARTUPINFO_ALL_DEBUG kdDebug( 172 ) << "sending " << msg << endl; @@ -669,7 +669,7 @@ bool KStartupInfo::find_id( const TQCString& id_P, KStartupInfoId* id_O, kdDebug( 172 ) << "find_id:" << id_P << endl; KStartupInfoId id; id.initId( id_P ); - if( d->startups.contains( id )) + if( d->startups.tqcontains( id )) { if( id_O != NULL ) *id_O = id; @@ -790,7 +790,7 @@ void KStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P ) if( utf8_string_atom == None ) utf8_string_atom = XInternAtom( qt_xdisplay(), "UTF8_STRING", False ); XChangeProperty( qt_xdisplay(), w_P, net_startup_atom, utf8_string_atom, 8, - PropModeReplace, reinterpret_cast< unsigned char* >( id_P.data()), id_P.length()); + PropModeReplace, reinterpret_cast< unsigned char* >( const_cast(id_P).data()), id_P.length()); #endif } @@ -939,9 +939,9 @@ TQCString KStartupInfo::createNewStartupId() #else unsigned long qt_x_user_time = 0; #endif - TQCString id = TQString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec ) - .arg( tm.tv_usec ).arg( getpid()).arg( qt_x_user_time ).utf8(); - kdDebug( 172 ) << "creating: " << id << ":" << qAppName() << endl; + TQCString id = TQString(TQString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec ) + .arg( tm.tv_usec ).arg( getpid()).arg( qt_x_user_time )).utf8(); + kdDebug( 172 ) << "creating: " << id << ":" << tqAppName() << endl; return id; } @@ -960,14 +960,14 @@ const TQCString& KStartupInfoId::id() const TQString KStartupInfoId::to_text() const { - return TQString::fromLatin1( " ID=\"%1\" " ).arg( escape_str( id())); + return TQString::tqfromLatin1( " ID=\"%1\" " ).arg( escape_str( id())); } KStartupInfoId::KStartupInfoId( const TQString& txt_P ) { d = new KStartupInfoIdPrivate; TQStringList items = get_fields( txt_P ); - const TQString id_str = TQString::fromLatin1( "ID=" ); + const TQString id_str = TQString::tqfromLatin1( "ID=" ); for( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) @@ -1074,7 +1074,7 @@ unsigned long KStartupInfoId::timestamp() const { if( none()) return 0; - int pos = d->id.findRev( "_TIME" ); + int pos = d->id.tqfindRev( "_TIME" ); if( pos >= 0 ) { bool ok; @@ -1088,10 +1088,10 @@ unsigned long KStartupInfoId::timestamp() const // snprintf (s, len, "%s/%s/%lu/%d-%d-%s", // canonicalized_launcher, canonicalized_launchee, (unsigned long) timestamp, // (int) getpid (), (int) sequence_number, hostbuf); - int pos1 = d->id.findRev( '/' ); + int pos1 = d->id.tqfindRev( '/' ); if( pos1 > 0 ) { - int pos2 = d->id.findRev( '/', pos1 - 1 ); + int pos2 = d->id.tqfindRev( '/', pos1 - 1 ); if( pos2 >= 0 ) { bool ok; @@ -1129,34 +1129,34 @@ TQString KStartupInfoData::to_text() const { TQString ret = ""; if( !d->bin.isEmpty()) - ret += TQString::fromLatin1( " BIN=\"%1\"" ).arg( escape_str( d->bin )); + ret += TQString::tqfromLatin1( " BIN=\"%1\"" ).arg( escape_str( d->bin )); if( !d->name.isEmpty()) - ret += TQString::fromLatin1( " NAME=\"%1\"" ).arg( escape_str( d->name )); + ret += TQString::tqfromLatin1( " NAME=\"%1\"" ).arg( escape_str( d->name )); if( !d->description.isEmpty()) - ret += TQString::fromLatin1( " DESCRIPTION=\"%1\"" ).arg( escape_str( d->description )); + ret += TQString::tqfromLatin1( " DESCRIPTION=\"%1\"" ).arg( escape_str( d->description )); if( !d->icon.isEmpty()) - ret += TQString::fromLatin1( " ICON=%1" ).arg( d->icon ); + ret += TQString::tqfromLatin1( " ICON=%1" ).arg( d->icon ); if( d->desktop != 0 ) - ret += TQString::fromLatin1( " DESKTOP=%1" ) + ret += TQString::tqfromLatin1( " DESKTOP=%1" ) .arg( d->desktop == NET::OnAllDesktops ? NET::OnAllDesktops : d->desktop - 1 ); // spec counts from 0 if( !d->wmclass.isEmpty()) - ret += TQString::fromLatin1( " WMCLASS=\"%1\"" ).arg( QString(d->wmclass) ); + ret += TQString::tqfromLatin1( " WMCLASS=\"%1\"" ).arg( QString(d->wmclass) ); if( !d->hostname.isEmpty()) - ret += TQString::fromLatin1( " HOSTNAME=%1" ).arg( QString(d->hostname) ); + ret += TQString::tqfromLatin1( " HOSTNAME=%1" ).arg( QString(d->hostname) ); for( TQValueList< pid_t >::ConstIterator it = d->pids.begin(); it != d->pids.end(); ++it ) - ret += TQString::fromLatin1( " PID=%1" ).arg( *it ); + ret += TQString::tqfromLatin1( " PID=%1" ).arg( *it ); if( d->silent != Unknown ) - ret += TQString::fromLatin1( " SILENT=%1" ).arg( d->silent == Yes ? 1 : 0 ); + ret += TQString::tqfromLatin1( " SILENT=%1" ).arg( d->silent == Yes ? 1 : 0 ); if( d->timestamp != -1U ) - ret += TQString::fromLatin1( " TIMESTAMP=%1" ).arg( d->timestamp ); + ret += TQString::tqfromLatin1( " TIMESTAMP=%1" ).arg( d->timestamp ); if( d->screen != -1 ) - ret += TQString::fromLatin1( " SCREEN=%1" ).arg( d->screen ); + ret += TQString::tqfromLatin1( " SCREEN=%1" ).arg( d->screen ); if( d->xinerama != -1 ) - ret += TQString::fromLatin1( " XINERAMA=%1" ).arg( d->xinerama ); + ret += TQString::tqfromLatin1( " XINERAMA=%1" ).arg( d->xinerama ); if( d->launched_by != 0 ) - ret += TQString::fromLatin1( " LAUNCHED_BY=%1" ).arg( d->launched_by ); + ret += TQString::tqfromLatin1( " LAUNCHED_BY=%1" ).arg( d->launched_by ); return ret; } @@ -1164,19 +1164,19 @@ KStartupInfoData::KStartupInfoData( const TQString& txt_P ) { d = new KStartupInfoDataPrivate; TQStringList items = get_fields( txt_P ); - const TQString bin_str = TQString::fromLatin1( "BIN=" ); - const TQString name_str = TQString::fromLatin1( "NAME=" ); - const TQString description_str = TQString::fromLatin1( "DESCRIPTION=" ); - const TQString icon_str = TQString::fromLatin1( "ICON=" ); - const TQString desktop_str = TQString::fromLatin1( "DESKTOP=" ); - const TQString wmclass_str = TQString::fromLatin1( "WMCLASS=" ); - const TQString hostname_str = TQString::fromLatin1( "HOSTNAME=" ); // SELI nonstd - const TQString pid_str = TQString::fromLatin1( "PID=" ); // SELI nonstd - const TQString silent_str = TQString::fromLatin1( "SILENT=" ); - const TQString timestamp_str = TQString::fromLatin1( "TIMESTAMP=" ); - const TQString screen_str = TQString::fromLatin1( "SCREEN=" ); - const TQString xinerama_str = TQString::fromLatin1( "XINERAMA=" ); - const TQString launched_by_str = TQString::fromLatin1( "LAUNCHED_BY=" ); + const TQString bin_str = TQString::tqfromLatin1( "BIN=" ); + const TQString name_str = TQString::tqfromLatin1( "NAME=" ); + const TQString description_str = TQString::tqfromLatin1( "DESCRIPTION=" ); + const TQString icon_str = TQString::tqfromLatin1( "ICON=" ); + const TQString desktop_str = TQString::tqfromLatin1( "DESKTOP=" ); + const TQString wmclass_str = TQString::tqfromLatin1( "WMCLASS=" ); + const TQString hostname_str = TQString::tqfromLatin1( "HOSTNAME=" ); // SELI nonstd + const TQString pid_str = TQString::tqfromLatin1( "PID=" ); // SELI nonstd + const TQString silent_str = TQString::tqfromLatin1( "SILENT=" ); + const TQString timestamp_str = TQString::tqfromLatin1( "TIMESTAMP=" ); + const TQString screen_str = TQString::tqfromLatin1( "SCREEN=" ); + const TQString xinerama_str = TQString::tqfromLatin1( "XINERAMA=" ); + const TQString launched_by_str = TQString::tqfromLatin1( "LAUNCHED_BY=" ); for( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) @@ -1379,7 +1379,7 @@ const TQCString& KStartupInfoData::hostname() const void KStartupInfoData::addPid( pid_t pid_P ) { - if( !d->pids.contains( pid_P )) + if( !d->pids.tqcontains( pid_P )) d->pids.append( pid_P ); } @@ -1395,7 +1395,7 @@ const TQValueList< pid_t >& KStartupInfoData::pids() const bool KStartupInfoData::is_pid( pid_t pid_P ) const { - return d->pids.contains( pid_P ); + return d->pids.tqcontains( pid_P ); } void KStartupInfoData::setSilent( TriState state_P ) @@ -1451,24 +1451,24 @@ WId KStartupInfoData::launchedBy() const static long get_num( const TQString& item_P ) { - unsigned int pos = item_P.find( '=' ); + unsigned int pos = item_P.tqfind( '=' ); return item_P.mid( pos + 1 ).toLong(); } static unsigned long get_unum( const TQString& item_P ) { - unsigned int pos = item_P.find( '=' ); + unsigned int pos = item_P.tqfind( '=' ); return item_P.mid( pos + 1 ).toULong(); } static TQString get_str( const TQString& item_P ) { - unsigned int pos = item_P.find( '=' ); + unsigned int pos = item_P.tqfind( '=' ); if( item_P.length() > pos + 2 && item_P[ pos + 1 ] == (QChar)'\"' ) { - int pos2 = item_P.left( pos + 2 ).find( '\"' ); + int pos2 = item_P.left( pos + 2 ).tqfind( '\"' ); if( pos2 < 0 ) return TQString::null; // 01234 return item_P.mid( pos + 2, pos2 - 2 - pos ); // A="C" diff --git a/kdecore/kstartupinfo.h b/kdecore/kstartupinfo.h index e35bdba56..da3018d8c 100644 --- a/kdecore/kstartupinfo.h +++ b/kdecore/kstartupinfo.h @@ -28,6 +28,10 @@ DEALINGS IN THE SOFTWARE. #include #include +#ifdef Q_MOC_RUN +#define Q_WS_X11 +#endif // Q_MOC_RUN + #ifdef Q_WS_X11 // FIXME(E): Redo in a less X11-specific way #include @@ -61,9 +65,10 @@ class KStartupInfoPrivate; * @author Lubos Lunak */ class KDECORE_EXPORT KStartupInfo - : public QObject + : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * By default, the startup notification is ended for the application diff --git a/kdecore/kstdaccel.cpp b/kdecore/kstdaccel.cpp index 8e1819735..85f8dda20 100644 --- a/kdecore/kstdaccel.cpp +++ b/kdecore/kstdaccel.cpp @@ -76,8 +76,8 @@ static KStdAccelInfo g_infoStdAccel[] = { End, I18N_NOOP("End"), 0, Qt::CTRL+Qt::Key_End, 0, 0, 0, KShortcut(), false }, { BeginningOfLine, "BeginningOfLine", I18N_NOOP("Beginning of Line"), Qt::Key_Home, 0, 0, 0, KShortcut(), false}, { EndOfLine, "EndOfLine", I18N_NOOP("End of Line"), Qt::Key_End, 0, 0, 0, KShortcut(), false}, - { Prior, I18N_NOOP("Prior"), 0, Qt::Key_Prior, 0, 0, 0, KShortcut(), false }, - { Next, I18N_NOOP2("Opposite to Prior","Next"), 0, Qt::Key_Next, 0, 0, 0, KShortcut(), false }, + { Prior, I18N_NOOP("Prior"), 0, TQt::Key_Prior, 0, 0, 0, KShortcut(), false }, + { Next, I18N_NOOP2("Opposite to Prior","Next"), 0, TQt::Key_Next, 0, 0, 0, KShortcut(), false }, { GotoLine, "GotoLine", I18N_NOOP("Go to Line"), Qt::CTRL+Qt::Key_G, 0, 0, 0, KShortcut(), false }, { AddBookmark, "AddBookmark", I18N_NOOP("Add Bookmark"), Qt::CTRL+Qt::Key_B, 0, 0, 0, KShortcut(), false }, { ZoomIn, "ZoomIn", I18N_NOOP("Zoom In"), Qt::CTRL+Qt::Key_Plus, 0, 0, 0, KShortcut(), false }, diff --git a/kdecore/kstringhandler.cpp b/kdecore/kstringhandler.cpp index 8b5ca1a7d..e37d1a3ce 100644 --- a/kdecore/kstringhandler.cpp +++ b/kdecore/kstringhandler.cpp @@ -22,7 +22,7 @@ static void parsePythonRange( const TQCString &range, uint &start, uint &end ) { - const int colon = range.find( ':' ); + const int colon = range.tqfind( ':' ); if ( colon == -1 ) { start = range.toUInt(); end = start; @@ -178,7 +178,7 @@ TQString KStringHandler::remword( const TQString &text , const TQString &word ) // Split words and add into list TQStringList list = TQStringList::split( " ", text, true ); - TQStringList::Iterator it = list.find(word); + TQStringList::Iterator it = list.tqfind(word); if (it != list.end()) list.remove( it ); @@ -422,11 +422,11 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa if ( pattern[ pattern_len - 1 ] == (QChar)'*' && len + 1 >= pattern_len ) { if ( pattern[ 0 ] == (QChar)'*' ) { - return filename.find(pattern.mid(1, pattern_len - 2)) != -1; + return filename.tqfind(pattern.mid(1, pattern_len - 2)) != -1; } - const TQChar *c1 = pattern.unicode(); - const TQChar *c2 = filename.unicode(); + const TQChar *c1 = pattern.tqunicode(); + const TQChar *c2 = filename.tqunicode(); int cnt = 1; while ( cnt < pattern_len && *c1++ == *c2++ ) ++cnt; @@ -436,8 +436,8 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa // Patterns like "*~", "*.extension" if ( pattern[ 0 ] == (QChar)'*' && len + 1 >= pattern_len ) { - const TQChar *c1 = pattern.unicode() + pattern_len - 1; - const TQChar *c2 = filename.unicode() + len - 1; + const TQChar *c1 = pattern.tqunicode() + pattern_len - 1; + const TQChar *c2 = filename.tqunicode() + len - 1; int cnt = 1; while ( cnt < pattern_len && *c1-- == *c2-- ) ++cnt; @@ -457,7 +457,7 @@ KStringHandler::perlSplit(const TQString & sep, const TQString & s, uint max) int searchStart = 0; - int tokenStart = s.find(sep, searchStart); + int tokenStart = s.tqfind(sep, searchStart); while (-1 != tokenStart && (ignoreMax || l.count() < max - 1)) { @@ -465,7 +465,7 @@ KStringHandler::perlSplit(const TQString & sep, const TQString & s, uint max) l << s.mid(searchStart, tokenStart - searchStart); searchStart = tokenStart + sep.length(); - tokenStart = s.find(sep, searchStart); + tokenStart = s.tqfind(sep, searchStart); } if (!s.mid(searchStart, s.length() - searchStart).isEmpty()) @@ -483,7 +483,7 @@ KStringHandler::perlSplit(const TQChar & sep, const TQString & s, uint max) int searchStart = 0; - int tokenStart = s.find(sep, searchStart); + int tokenStart = s.tqfind(sep, searchStart); while (-1 != tokenStart && (ignoreMax || l.count() < max - 1)) { @@ -491,7 +491,7 @@ KStringHandler::perlSplit(const TQChar & sep, const TQString & s, uint max) l << s.mid(searchStart, tokenStart - searchStart); searchStart = tokenStart + 1; - tokenStart = s.find(sep, searchStart); + tokenStart = s.tqfind(sep, searchStart); } if (!s.mid(searchStart, s.length() - searchStart).isEmpty()) @@ -527,7 +527,7 @@ KStringHandler::perlSplit(const TQRegExp & sep, const TQString & s, uint max) return l; } - QString +TQString KStringHandler::tagURLs( const TQString& text ) { /*static*/ TQRegExp urlEx("(www\\.(?!\\.)|(fish|(f|ht)tp(|s))://)[\\d\\w\\./,:_~\\?=&;#@\\-\\+\\%\\$]+[\\d\\w/]"); @@ -556,10 +556,10 @@ KStringHandler::tagURLs( const TQString& text ) TQString KStringHandler::obscure( const TQString &str ) { TQString result; - const TQChar *unicode = str.unicode(); + const TQChar *tqunicode = str.tqunicode(); for ( uint i = 0; i < str.length(); ++i ) - result += ( unicode[ i ].unicode() < 0x21 ) ? unicode[ i ] : - TQChar( 0x1001F - unicode[ i ].unicode() ); + result += ( tqunicode[ i ].tqunicode() < 0x21 ) ? tqunicode[ i ] : + TQChar( 0x1001F - tqunicode[ i ].tqunicode() ); return result; } diff --git a/kdecore/ksycoca.cpp b/kdecore/ksycoca.cpp index fd4d9aa95..a3d017f9a 100644 --- a/kdecore/ksycoca.cpp +++ b/kdecore/ksycoca.cpp @@ -76,7 +76,7 @@ public: TQString language; bool readError; bool autoRebuild; - Q_UINT32 updateSig; + TQ_UINT32 updateSig; TQStringList allResourceDirs; }; @@ -179,8 +179,8 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound ) TQBuffer *buffer = new TQBuffer( TQByteArray() ); buffer->open(IO_ReadWrite); m_str = new TQDataStream( buffer); - (*m_str) << (Q_INT32) KSYCOCA_VERSION; - (*m_str) << (Q_INT32) 0; + (*m_str) << (TQ_INT32) KSYCOCA_VERSION; + (*m_str) << (TQ_INT32) 0; } else { @@ -228,12 +228,15 @@ void KSycoca::closeDatabase() { TQIODevice *device = 0; if (m_str) - device = m_str->device(); + device = m_str->tqdevice(); #ifdef HAVE_MMAP if (device && m_sycoca_mmap) { TQBuffer *buf = (TQBuffer *) device; - buf->buffer().resetRawData(m_sycoca_mmap, m_sycoca_size); +#ifdef USE_QT4 + static_cast +#endif // USE_QT4 + (buf->buffer()).resetRawData(m_sycoca_mmap, m_sycoca_size); // Solaris has munmap(char*, size_t) and everything else should // be happy with a char* for munmap(void*, size_t) munmap((char*) m_sycoca_mmap, m_sycoca_size); @@ -244,7 +247,7 @@ void KSycoca::closeDatabase() delete m_str; m_str = 0; delete device; - if (d->database != device) + if (TQT_TQIODEVICE(d->database) != device) delete d->database; device = 0; d->database = 0; @@ -262,7 +265,7 @@ void KSycoca::addFactory( KSycocaFactory *factory ) bool KSycoca::isChanged(const char *type) { - return self()->d->changeList.contains(type); + return self()->d->changeList.tqcontains(type); } void KSycoca::notifyDatabaseChanged(const TQStringList &changeList) @@ -284,8 +287,8 @@ TQDataStream * KSycoca::findEntry(int offset, KSycocaType &type) if ( !m_str ) openDatabase(); //kdDebug(7011) << TQString("KSycoca::_findEntry(offset=%1)").arg(offset,8,16) << endl; - m_str->device()->at(offset); - Q_INT32 aType; + m_str->tqdevice()->at(offset); + TQ_INT32 aType; (*m_str) >> aType; type = (KSycocaType) aType; //kdDebug(7011) << TQString("KSycoca::found type %1").arg(aType) << endl; @@ -302,8 +305,8 @@ bool KSycoca::checkVersion(bool abortOnError) // We should never get here... if a database was found then m_str shouldn't be 0L. assert(m_str); } - m_str->device()->at(0); - Q_INT32 aVersion; + m_str->tqdevice()->at(0); + TQ_INT32 aVersion; (*m_str) >> aVersion; if ( aVersion < KSYCOCA_VERSION ) { @@ -342,8 +345,8 @@ TQDataStream * KSycoca::findFactory(KSycocaFactoryId id) kdWarning(7011) << "Outdated database found" << endl; return 0L; } - Q_INT32 aId; - Q_INT32 aOffset; + TQ_INT32 aId; + TQ_INT32 aOffset; while(true) { (*m_str) >> aId; @@ -357,7 +360,7 @@ TQDataStream * KSycoca::findFactory(KSycocaFactoryId id) if (aId == id) { //kdDebug(7011) << TQString("KSycoca::findFactory(%1) offset %2").arg((int)id).arg(aOffset) << endl; - m_str->device()->at(aOffset); + m_str->tqdevice()->at(aOffset); return m_str; } } @@ -368,8 +371,8 @@ TQString KSycoca::kfsstnd_prefixes() { if (bNoDatabase) return ""; if (!checkVersion(false)) return ""; - Q_INT32 aId; - Q_INT32 aOffset; + TQ_INT32 aId; + TQ_INT32 aOffset; // skip factories offsets while(true) { @@ -389,14 +392,14 @@ TQString KSycoca::kfsstnd_prefixes() return prefixes; } -Q_UINT32 KSycoca::timeStamp() +TQ_UINT32 KSycoca::timeStamp() { if (!m_timeStamp) (void) kfsstnd_prefixes(); return m_timeStamp; } -Q_UINT32 KSycoca::updateSignature() +TQ_UINT32 KSycoca::updateSignature() { if (!m_timeStamp) (void) kfsstnd_prefixes(); @@ -424,11 +427,11 @@ TQString KSycoca::determineRelativePath( const TQString & _fullpath, const char TQStringList::ConstIterator dirsit = dirs.begin(); for ( ; dirsit != dirs.end() && sRelativeFilePath.isEmpty(); ++dirsit ) { // might need canonicalPath() ... - if ( _fullpath.find( *dirsit ) == 0 ) // path is dirs + relativePath + if ( _fullpath.tqfind( *dirsit ) == 0 ) // path is dirs + relativePath sRelativeFilePath = _fullpath.mid( (*dirsit).length() ); // skip appsdirs } if ( sRelativeFilePath.isEmpty() ) - kdFatal(7011) << TQString("Couldn't find %1 in any %2 dir !!!").arg( _fullpath ).arg( _resource) << endl; + kdFatal(7011) << TQString(TQString("Couldn't find %1 in any %2 dir !!!").arg( _fullpath ).arg( _resource)) << endl; //else // debug code //kdDebug(7011) << sRelativeFilePath << endl; @@ -469,7 +472,7 @@ bool KSycoca::readError() void KSycocaEntry::read( TQDataStream &s, TQString &str ) { - Q_UINT32 bytes; + TQ_UINT32 bytes; s >> bytes; // read size of string if ( bytes > 8192 ) { // null string or too big if (bytes != 0xffffffff) @@ -479,7 +482,7 @@ void KSycocaEntry::read( TQDataStream &s, TQString &str ) else if ( bytes > 0 ) { // not empty int bt = bytes/2; str.setLength( bt ); - TQChar* ch = (TQChar *) str.unicode(); + TQChar* ch = (TQChar *) str.tqunicode(); char t[8192]; char *b = t; s.readRawBytes( b, bytes ); @@ -495,14 +498,14 @@ void KSycocaEntry::read( TQDataStream &s, TQString &str ) void KSycocaEntry::read( TQDataStream &s, TQStringList &list ) { list.clear(); - Q_UINT32 count; + TQ_UINT32 count; s >> count; // read size of list if (count >= 1024) { KSycoca::flagError(); return; } - for(Q_UINT32 i = 0; i < count; i++) + for(TQ_UINT32 i = 0; i < count; i++) { TQString str; read(s, str); diff --git a/kdecore/ksycoca.h b/kdecore/ksycoca.h index 8cbe6eb67..6b8fcd0f3 100644 --- a/kdecore/ksycoca.h +++ b/kdecore/ksycoca.h @@ -93,7 +93,7 @@ public: * The database contains all changes made _before_ this time and * _might_ contain changes made after that. */ - Q_UINT32 timeStamp(); + TQ_UINT32 timeStamp(); /** * @internal - returns update signature of database @@ -104,7 +104,7 @@ public: * Touching this file causes the database to be recreated * from scratch. */ - Q_UINT32 updateSignature(); + TQ_UINT32 updateSignature(); /** * @internal - returns all directories with information @@ -172,7 +172,7 @@ protected: bool bNoDatabase; size_t m_sycoca_size; const char *m_sycoca_mmap; - Q_UINT32 m_timeStamp; + TQ_UINT32 m_timeStamp; public: static KSycoca *_self; // Internal use only. diff --git a/kdecore/ksycocadict.cpp b/kdecore/ksycocadict.cpp index ce7529682..76124e76a 100644 --- a/kdecore/ksycocadict.cpp +++ b/kdecore/ksycocadict.cpp @@ -29,7 +29,7 @@ namespace { struct string_entry { string_entry(TQString _key, KSycocaEntry *_payload) - { keyStr = _key; key = keyStr.unicode(); length = keyStr.length(); payload = _payload; hash = 0; } + { keyStr = _key; key = keyStr.tqunicode(); length = keyStr.length(); payload = _payload; hash = 0; } uint hash; int length; const TQChar *key; @@ -59,8 +59,8 @@ KSycocaDict::KSycocaDict() KSycocaDict::KSycocaDict(TQDataStream *str, int offset) : d(0), mStr(str), mOffset(offset) { - Q_UINT32 test1, test2; - str->device()->at(offset); + TQ_UINT32 test1, test2; + str->tqdevice()->at(offset); (*str) >> test1 >> test2; if ((test1 > 0x000fffff) || (test2 > 1024)) { @@ -70,10 +70,10 @@ KSycocaDict::KSycocaDict(TQDataStream *str, int offset) return; } - str->device()->at(offset); + str->tqdevice()->at(offset); (*str) >> mHashTableSize; (*str) >> mHashList; - mOffset = str->device()->at(); // Start of hashtable + mOffset = str->tqdevice()->at(); // Start of hashtable } KSycocaDict::~KSycocaDict() @@ -129,11 +129,11 @@ KSycocaDict::find_string(const TQString &key ) uint hash = hashKey(key) % mHashTableSize; //kdDebug(7011) << TQString("hash is %1").arg(hash) << endl; - uint off = mOffset+sizeof(Q_INT32)*hash; + uint off = mOffset+sizeof(TQ_INT32)*hash; //kdDebug(7011) << TQString("off is %1").arg(off,8,16) << endl; - mStr->device()->at( off ); + mStr->tqdevice()->at( off ); - Q_INT32 offset; + TQ_INT32 offset; (*mStr) >> offset; //kdDebug(7011) << TQString("offset is %1").arg(offset,8,16) << endl; @@ -146,7 +146,7 @@ KSycocaDict::find_string(const TQString &key ) // Lookup duplicate list. offset = -offset; - mStr->device()->at(offset); + mStr->tqdevice()->at(offset); //kdDebug(7011) << TQString("Looking up duplicate list at %1").arg(offset,8,16) << endl; while(true) @@ -286,7 +286,7 @@ KSycocaDict::save(TQDataStream &str) return; } - mOffset = str.device()->at(); + mOffset = str.tqdevice()->at(); //kdDebug(7011) << TQString("KSycocaDict: %1 entries.").arg(count()) << endl; @@ -402,26 +402,26 @@ KSycocaDict::save(TQDataStream &str) str << mHashTableSize; str << mHashList; - mOffset = str.device()->at(); // mOffset points to start of hashTable + mOffset = str.tqdevice()->at(); // mOffset points to start of hashTable //kdDebug(7011) << TQString("Start of Hash Table, offset = %1").arg(mOffset,8,16) << endl; for(int pass = 1; pass <= 2; pass++) { - str.device()->at(mOffset); + str.tqdevice()->at(mOffset); //kdDebug(7011) << TQString("Writing hash table (pass #%1)").arg(pass) << endl; for(uint i=0; i < mHashTableSize; i++) { - Q_INT32 tmpid; + TQ_INT32 tmpid; if (!hashTable[i].entry) - tmpid = (Q_INT32) 0; + tmpid = (TQ_INT32) 0; else if (!hashTable[i].duplicates) - tmpid = (Q_INT32) hashTable[i].entry->payload->offset(); // Positive ID + tmpid = (TQ_INT32) hashTable[i].entry->payload->offset(); // Positive ID else - tmpid = (Q_INT32) -hashTable[i].duplicate_offset; // Negative ID + tmpid = (TQ_INT32) -hashTable[i].duplicate_offset; // Negative ID str << tmpid; //kdDebug(7011) << TQString("Hash table : %1").arg(tmpid,8,16) << endl; } - //kdDebug(7011) << TQString("End of Hash Table, offset = %1").arg(str.device()->at(),8,16) << endl; + //kdDebug(7011) << TQString("End of Hash Table, offset = %1").arg(str.tqdevice()->at(),8,16) << endl; //kdDebug(7011) << TQString("Writing duplicate lists (pass #%1)").arg(pass) << endl; for(uint i=0; i < mHashTableSize; i++) @@ -429,19 +429,19 @@ KSycocaDict::save(TQDataStream &str) if (hashTable[i].duplicates) { TQPtrList *dups = hashTable[i].duplicates; - hashTable[i].duplicate_offset = str.device()->at(); + hashTable[i].duplicate_offset = str.tqdevice()->at(); /*kdDebug(7011) << TQString("Duplicate lists: Offset = %1 list_size = %2") .arg(hashTable[i].duplicate_offset,8,16).arg(dups->count()) << endl; */ for(string_entry *dup = dups->first(); dup; dup=dups->next()) { - str << (Q_INT32) dup->payload->offset(); // Positive ID + str << (TQ_INT32) dup->payload->offset(); // Positive ID str << dup->keyStr; // Key (TQString) } - str << (Q_INT32) 0; // End of list marker (0) + str << (TQ_INT32) 0; // End of list marker (0) } } - //kdDebug(7011) << TQString("End of Dict, offset = %1").arg(str.device()->at(),8,16) << endl; + //kdDebug(7011) << TQString("End of Dict, offset = %1").arg(str.tqdevice()->at(),8,16) << endl; } //kdDebug(7011) << "Cleaning up hash table." << endl; diff --git a/kdecore/ksycocadict.h b/kdecore/ksycocadict.h index 94a2bc646..0cf5eb257 100644 --- a/kdecore/ksycocadict.h +++ b/kdecore/ksycocadict.h @@ -111,13 +111,13 @@ public: void save(TQDataStream &str); protected: - Q_UINT32 hashKey( const TQString &); + TQ_UINT32 hashKey( const TQString &); private: KSycocaDictStringList *d; TQDataStream *mStr; - Q_INT32 mOffset; - Q_UINT32 mHashTableSize; - TQValueList mHashList; + TQ_INT32 mOffset; + TQ_UINT32 mHashTableSize; + TQValueList mHashList; }; #endif diff --git a/kdecore/ksycocaentry.h b/kdecore/ksycocaentry.h index 5f6f11bbd..2b4611cc2 100644 --- a/kdecore/ksycocaentry.h +++ b/kdecore/ksycocaentry.h @@ -101,8 +101,8 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them */ virtual void save(TQDataStream &s) { - mOffset = s.device()->at(); // store position in member variable - s << (Q_INT32) sycocaType() << mPath; + mOffset = s.tqdevice()->at(); // store position in member variable + s << (TQ_INT32) sycocaType() << mPath; } /** diff --git a/kdecore/ksycocafactory.cpp b/kdecore/ksycocafactory.cpp index e5816dc23..122dd9405 100644 --- a/kdecore/ksycocafactory.cpp +++ b/kdecore/ksycocafactory.cpp @@ -38,7 +38,7 @@ KSycocaFactory::KSycocaFactory(KSycocaFactoryId factory_id) if (m_str) // Can be 0 in case of errors { // Read position of index tables.... - Q_INT32 i; + TQ_INT32 i; (*m_str) >> i; m_sycocaDictOffset = i; (*m_str) >> i; @@ -46,10 +46,10 @@ KSycocaFactory::KSycocaFactory(KSycocaFactoryId factory_id) (*m_str) >> i; m_endEntryOffset = i; - int saveOffset = m_str->device()->at(); + int saveOffset = m_str->tqdevice()->at(); // Init index tables m_sycocaDict = new KSycocaDict(m_str, m_sycocaDictOffset); - saveOffset = m_str->device()->at(saveOffset); + saveOffset = m_str->tqdevice()->at(saveOffset); } } else @@ -78,10 +78,10 @@ void KSycocaFactory::saveHeader(TQDataStream &str) { // Write header - str.device()->at(mOffset); - str << (Q_INT32) m_sycocaDictOffset; - str << (Q_INT32) m_beginEntryOffset; - str << (Q_INT32) m_endEntryOffset; + str.tqdevice()->at(mOffset); + str << (TQ_INT32) m_sycocaDictOffset; + str << (TQ_INT32) m_beginEntryOffset; + str << (TQ_INT32) m_endEntryOffset; } void @@ -91,13 +91,13 @@ KSycocaFactory::save(TQDataStream &str) // building database if (!m_sycocaDict) return; // Error! - mOffset = str.device()->at(); // store position in member variable + mOffset = str.tqdevice()->at(); // store position in member variable m_sycocaDictOffset = 0; // Write header (pass #1) saveHeader(str); - m_beginEntryOffset = str.device()->at(); + m_beginEntryOffset = str.tqdevice()->at(); // Write all entries. int entryCount = 0; @@ -110,30 +110,30 @@ KSycocaFactory::save(TQDataStream &str) entryCount++; } - m_endEntryOffset = str.device()->at(); + m_endEntryOffset = str.tqdevice()->at(); // Write indices... // Linear index - str << (Q_INT32) entryCount; + str << (TQ_INT32) entryCount; for(TQDictIterator it ( *m_entryDict ); it.current(); ++it) { KSycocaEntry *entry = (*it.current()); - str << (Q_INT32) entry->offset(); + str << (TQ_INT32) entry->offset(); } // Dictionary index - m_sycocaDictOffset = str.device()->at(); + m_sycocaDictOffset = str.tqdevice()->at(); m_sycocaDict->save(str); - int endOfFactoryData = str.device()->at(); + int endOfFactoryData = str.tqdevice()->at(); // Update header (pass #2) saveHeader(str); // Seek to end. - str.device()->at(endOfFactoryData); + str.tqdevice()->at(endOfFactoryData); } void @@ -169,8 +169,8 @@ KSycocaEntry::List KSycocaFactory::allEntries() // Assume we're NOT building a database - m_str->device()->at(m_endEntryOffset); - Q_INT32 entryCount; + m_str->tqdevice()->at(m_endEntryOffset); + TQ_INT32 entryCount; (*m_str) >> entryCount; if (entryCount > 8192) @@ -179,7 +179,7 @@ KSycocaEntry::List KSycocaFactory::allEntries() return list; } - Q_INT32 *offsetList = new Q_INT32[entryCount]; + TQ_INT32 *offsetList = new TQ_INT32[entryCount]; for(int i = 0; i < entryCount; i++) { (*m_str) >> offsetList[i]; diff --git a/kdecore/ktempdir.cpp b/kdecore/ktempdir.cpp index 70a442730..3a68e304e 100644 --- a/kdecore/ktempdir.cpp +++ b/kdecore/ktempdir.cpp @@ -118,7 +118,7 @@ KTempDir::status() const return mError; } -QString +TQString KTempDir::name() const { return mTmpName; @@ -177,7 +177,7 @@ rmtree(const TQCString& name) * * Potential problems: * - opendir/readdir/closedir is not re-entrant - * - unlink and rmdir invalidates a opendir/readdir/closedir + * - unlink and rmdir tqinvalidates a opendir/readdir/closedir * - limited number of file descriptors for opendir/readdir/closedir */ if ( ::closedir( dp ) ) diff --git a/kdecore/ktempfile.cpp b/kdecore/ktempfile.cpp index c04f725fe..f439b55ef 100644 --- a/kdecore/ktempfile.cpp +++ b/kdecore/ktempfile.cpp @@ -139,7 +139,7 @@ KTempFile::status() const return mError; } -QString +TQString KTempFile::name() const { return mTmpName; diff --git a/kdecore/ktimezones.cpp b/kdecore/ktimezones.cpp index 5ebf9bd4a..dbd589d85 100644 --- a/kdecore/ktimezones.cpp +++ b/kdecore/ktimezones.cpp @@ -285,12 +285,12 @@ int KTimezone::offset(Qt::TimeSpec basisSpec) const char *originalZone = ::getenv("TZ"); // Get the time in the current timezone. - TQDateTime basisTime = TQDateTime::currentDateTime(basisSpec); + TQDateTime basisTime = TQDateTime::tqcurrentDateTime(basisSpec); // Set the timezone and find out what time it is there compared to the basis. ::setenv("TZ", m_name.utf8(), 1); tzset(); - TQDateTime remoteTime = TQDateTime::currentDateTime(Qt::LocalTime); + TQDateTime remoteTime = TQDateTime::tqcurrentDateTime(Qt::LocalTime); int offset = remoteTime.secsTo(basisTime); // Now restore things @@ -507,7 +507,7 @@ const KTimezone *KTimezones::local() // Compute the MD5 sum of /etc/localtime. KMD5 context(""); context.reset(); - context.update(f); + context.update(TQT_TQIODEVICE_OBJECT(f)); TQIODevice::Offset referenceSize = f.size(); TQString referenceMd5Sum = context.hexDigest(); f.close(); @@ -526,7 +526,7 @@ const KTimezone *KTimezones::local() { // Only do the heavy lifting for file sizes which match. context.reset(); - context.update(f); + context.update(TQT_TQIODEVICE_OBJECT(f)); candidateMd5Sum = context.hexDigest(); } f.close(); @@ -695,28 +695,28 @@ bool KTimezoneSource::parse(const TQString &zone, KTimezoneDetails &dataReceiver } // Structures that represent the zoneinfo file. - Q_UINT8 T, z, i_, f_; + TQ_UINT8 T, z, i_, f_; struct { - Q_UINT32 ttisgmtcnt; - Q_UINT32 ttisstdcnt; - Q_UINT32 leapcnt; - Q_UINT32 timecnt; - Q_UINT32 typecnt; - Q_UINT32 charcnt; + TQ_UINT32 ttisgmtcnt; + TQ_UINT32 ttisstdcnt; + TQ_UINT32 leapcnt; + TQ_UINT32 timecnt; + TQ_UINT32 typecnt; + TQ_UINT32 charcnt; } tzh; - Q_UINT32 transitionTime; - Q_UINT8 localTimeIndex; + TQ_UINT32 transitionTime; + TQ_UINT8 localTimeIndex; struct { - Q_INT32 gmtoff; - Q_INT8 isdst; - Q_UINT8 abbrind; + TQ_INT32 gmtoff; + TQ_INT8 isdst; + TQ_UINT8 abbrind; } tt; - Q_UINT32 leapTime; - Q_UINT32 leapSeconds; - Q_UINT8 isStandard; - Q_UINT8 isUTC; + TQ_UINT32 leapTime; + TQ_UINT32 leapSeconds; + TQ_UINT8 isStandard; + TQ_UINT8 isUTC; TQDataStream str(&f); str >> T >> z >> i_ >> f_; diff --git a/kdecore/kurl.cpp b/kdecore/kurl.cpp index cb396c3a5..047f18dee 100644 --- a/kdecore/kurl.cpp +++ b/kdecore/kurl.cpp @@ -87,7 +87,7 @@ static TQString encode( const TQString& segment, int encoding_offset, int encodi return segment.isNull() ? TQString::null : TQString(""); // differentiate null and empty // a worst case approximation - TQChar *new_segment = new QChar[ old_length * 3 + 1 ]; + TQChar *new_segment = new TQChar[ old_length * 3 + 1 ]; int new_length = 0; for ( int i = 0; i < old_length; i++ ) @@ -167,19 +167,19 @@ static TQString lazy_encode( const TQString& segment, bool encodeAt=true ) return TQString::null; // a worst case approximation - TQChar *new_segment = new QChar[ old_length * 3 + 1 ]; + TQChar *new_segment = new TQChar[ old_length * 3 + 1 ]; int new_length = 0; for ( int i = 0; i < old_length; i++ ) { - unsigned int character = segment[i].unicode(); // Don't use latin1() + unsigned int character = segment[i].tqunicode(); // Don't use latin1() // It returns 0 for non-latin1 values // Small set of really ambiguous chars if ((character < 32) || // Low ASCII ((character == '%') && // The escape character itself (i+2 < old_length) && // But only if part of a valid escape sequence! - (hex2int(segment[i+1].unicode())!= -1) && - (hex2int(segment[i+2].unicode())!= -1)) || + (hex2int(segment[i+1].tqunicode())!= -1) && + (hex2int(segment[i+2].tqunicode())!= -1)) || (character == '?') || // Start of query delimiter ((character == '@') && encodeAt) || // Username delimiter (character == '#') || // Start of reference delimiter @@ -235,7 +235,7 @@ static void decode( const TQString& segment, TQString &decoded, TQString &encode // make a copy of the old one char *new_segment = new char[ old_length + 1 ]; - TQChar *new_usegment = new QChar[ old_length * 3 + 1 ]; + TQChar *new_usegment = new TQChar[ old_length * 3 + 1 ]; int i = 0; while( i < old_length ) @@ -291,12 +291,12 @@ static void decode( const TQString& segment, TQString &decoded, TQString &encode { decoded = textCodec->toUnicode( new_segment ); if ( isRawURI ) { - int length = qstrlen( new_segment ); + int length = tqstrlen( new_segment ); while ( length < new_length ) { decoded += TQChar::null; length += 1; decoded += textCodec->toUnicode( new_segment + length ); - length += qstrlen( new_segment + length ); + length += tqstrlen( new_segment + length ); } } @@ -338,7 +338,7 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de #else TQString encodedDot("%2e"); #endif - if (path.find(encodedDot, 0, false) != -1) + if (path.tqfind(encodedDot, 0, false) != -1) { #ifndef KDE_QT_ONLY static const TQString &encodedDOT = KGlobal::staticQString("%2E"); // Uppercase! @@ -365,7 +365,7 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de cdUp = 0; pos = orig_pos = len; - while ( pos && (pos = path.findRev('/',--pos)) != -1 ) + while ( pos && (pos = path.tqfindRev('/',--pos)) != -1 ) { len = orig_pos - pos - 1; if ( len == 2 && path[pos+1] == '.' && path[pos+2] == '.' ) @@ -404,7 +404,7 @@ bool KURL::isRelativeURL(const TQString &_url) { int len = _url.length(); if (!len) return true; // Very short relative URL. - const TQChar *str = _url.unicode(); + const TQChar *str = _url.tqunicode(); // Absolute URL must start with alpha-character if (!isalpha(str[0].latin1())) @@ -471,13 +471,13 @@ KURL::KURL( const TQString &url, int encoding_hint ) KURL::KURL( const char * url, int encoding_hint ) { reset(); - parse( TQString::fromLatin1(url), encoding_hint ); + parse( TQString::tqfromLatin1(url), encoding_hint ); } KURL::KURL( const TQCString& url, int encoding_hint ) { reset(); - parse( TQString::fromLatin1(url), encoding_hint ); + parse( TQString::tqfromLatin1(url), encoding_hint ); } KURL::KURL( const KURL& _u ) @@ -493,13 +493,13 @@ TQDataStream & operator<< (TQDataStream & s, const KURL & a) s << a.m_strProtocol << a.m_strUser << a.m_strPass << a.m_strHost << a.m_strPath << a.m_strPath_encoded << QueryForWire << a.m_strRef_encoded - << Q_INT8(a.m_bIsMalformed ? 1 : 0) << a.m_iPort; + << TQ_INT8(a.m_bIsMalformed ? 1 : 0) << a.m_iPort; return s; } TQDataStream & operator>> (TQDataStream & s, KURL & a) { - Q_INT8 malf; + TQ_INT8 malf; TQString QueryFromWire; s >> a.m_strProtocol >> a.m_strUser >> a.m_strPass >> a.m_strHost >> a.m_strPath >> a.m_strPath_encoded >> QueryFromWire >> a.m_strRef_encoded @@ -542,11 +542,11 @@ KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint ) TQString rUrl = _rel_url; int len = _u.m_strProtocol.length(); if ( !_u.m_strHost.isEmpty() && !rUrl.isEmpty() && - rUrl.find( _u.m_strProtocol, 0, false ) == 0 && + rUrl.tqfind( _u.m_strProtocol, 0, false ) == 0 && rUrl[len] == ':' && (rUrl[len+1] != '/' || (rUrl[len+1] == '/' && rUrl[len+2] != '/')) ) { - rUrl.remove( 0, rUrl.find( ':' ) + 1 ); + rUrl.remove( 0, rUrl.tqfind( ':' ) + 1 ); } if ( rUrl.isEmpty() ) @@ -579,13 +579,13 @@ KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint ) } else if ( rUrl[0] != '?' ) { - int pos = m_strPath.findRev( '/' ); + int pos = m_strPath.tqfindRev( '/' ); if (pos >= 0) m_strPath.truncate(pos); m_strPath += '/'; if (!m_strPath_encoded.isEmpty()) { - pos = m_strPath_encoded.findRev( '/' ); + pos = m_strPath_encoded.tqfindRev( '/' ); if (pos >= 0) m_strPath_encoded.truncate(pos); m_strPath_encoded += '/'; @@ -643,7 +643,7 @@ void KURL::parse( const TQString& _url, int encoding_hint ) return; } - const TQChar* buf = _url.unicode(); + const TQChar* buf = _url.tqunicode(); const TQChar* orig = buf; uint len = _url.length(); uint pos = 0; @@ -707,7 +707,7 @@ NodeErr: void KURL::parseRawURI( const TQString& _url, int encoding_hint ) { uint len = _url.length(); - const TQChar* buf = _url.unicode(); + const TQChar* buf = _url.tqunicode(); uint pos = 0; @@ -748,9 +748,9 @@ void KURL::parseMailto( const TQString& _url, int encoding_hint ) #ifndef KDE_QT_ONLY TQString host = KIDNA::toUnicode( mailre.cap( 2 ) ); if (host.isEmpty()) - host = mailre.cap( 2 ).lower(); + host = TQString(mailre.cap( 2 )).lower(); #else - TQString host = mailre.cap( 2 ).lower(); + TQString host = TQString(mailre.cap( 2 )).lower(); #endif m_strPath = mailre.cap( 1 ) + host; } @@ -762,7 +762,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) bool badHostName = false; int start = 0; uint len = _url.length(); - const TQChar* buf = _url.unicode(); + const TQChar* buf = _url.tqunicode(); TQChar delim; TQString tmp; @@ -1040,7 +1040,7 @@ KURL& KURL::operator=( const TQString& _url ) KURL& KURL::operator=( const char * _url ) { reset(); - parse( TQString::fromLatin1(_url) ); + parse( TQString::tqfromLatin1(_url) ); return *this; } @@ -1231,7 +1231,7 @@ void KURL::setFileName( const TQString& _txt ) path = "/"; else { - int lastSlash = path.findRev( '/' ); + int lastSlash = path.tqfindRev( '/' ); if ( lastSlash == -1) { // The first character is not a '/' ??? @@ -1347,7 +1347,7 @@ void KURL::setEncodedPath( const TQString& _txt, int encoding_hint ) void KURL::setEncodedPathAndQuery( const TQString& _txt, int encoding_hint ) { - int pos = _txt.find( '?' ); + int pos = _txt.tqfind( '?' ); if ( pos == -1 ) { setEncodedPath(_txt, encoding_hint); @@ -1490,7 +1490,7 @@ TQString KURL::url( int _trailing, int encoding_hint ) const } if ( m_iUriMode == URL ) { - bool IPv6 = (m_strHost.find(':') != -1); + bool IPv6 = (m_strHost.tqfind(':') != -1); if (IPv6) u += '[' + m_strHost + ']'; else @@ -1546,7 +1546,7 @@ TQString KURL::prettyURL( int _trailing ) const } if ( m_iUriMode == URL ) { - bool IPv6 = (m_strHost.find(':') != -1); + bool IPv6 = (m_strHost.tqfind(':') != -1); if (IPv6) { u += '[' + m_strHost + ']'; @@ -1704,13 +1704,13 @@ TQString KURL::fileName( bool _strip_trailing_slash ) const // This is hairy, we need the last unencoded slash. // Count in the encoded string how many encoded slashes follow the last // unencoded one. - int i = m_strPath_encoded.findRev( (QChar)'/', len - 1 ); + int i = m_strPath_encoded.tqfindRev( (QChar)'/', len - 1 ); TQString fileName_encoded = m_strPath_encoded.mid(i+1); - n += fileName_encoded.contains("%2f", false); + n += fileName_encoded.tqcontains("%2f", false); } int i = len; do { - i = path.findRev( (QChar)'/', i - 1 ); + i = path.tqfindRev( (QChar)'/', i - 1 ); } while (--n && (i > 0)); @@ -1773,7 +1773,7 @@ TQString KURL::directory( bool _strip_trailing_slash_from_result, if ( result.isEmpty() || result == "/" ) return result; - int i = result.findRev( "/" ); + int i = result.tqfindRev( "/" ); // If ( i == -1 ) => the first character is not a '/' // So it's some URL like file:blah.tgz, with no path if ( i == -1 ) @@ -2143,14 +2143,14 @@ TQMap< TQString, TQString > KURL::queryItems( int options, int encoding_hint ) c TQMap< TQString, TQString > result; TQStringList items = TQStringList::split( '&', m_strQuery_encoded ); for ( TQStringList::const_iterator it = items.begin() ; it != items.end() ; ++it ) { - int equal_pos = (*it).find( '=' ); + int equal_pos = (*it).tqfind( '=' ); if ( equal_pos > 0 ) { // = is not the first char... TQString name = (*it).left( equal_pos ); if ( options & CaseInsensitiveKeys ) name = name.lower(); TQString value = (*it).mid( equal_pos + 1 ); if ( value.isEmpty() ) - result.insert( name, TQString::fromLatin1("") ); + result.insert( name, TQString::tqfromLatin1("") ); else { // ### why is decoding name not necessary? value.replace( '+', ' ' ); // + in queries means space @@ -2191,7 +2191,7 @@ TQString KURL::queryItem( const TQString& _item, int encoding_hint ) const return decode_string( str, encoding_hint ); } else // empty value - return TQString::fromLatin1(""); + return TQString::tqfromLatin1(""); } } diff --git a/kdecore/kurl.h b/kdecore/kurl.h index 86c7aa169..eaa0291b9 100644 --- a/kdecore/kurl.h +++ b/kdecore/kurl.h @@ -281,7 +281,7 @@ public: * See TQTextCodec::mibEnum() * * @see fromPathOrURL() - * @see TQString::fromLatin1() + * @see TQString::tqfromLatin1() */ KURL( const char * url, int encoding_hint = 0 ); /** @@ -307,7 +307,7 @@ public: * See TQTextCodec::mibEnum() * * @see fromPathOrURL() - * @see TQString::fromLatin1() + * @see TQString::tqfromLatin1() */ KURL( const TQCString& url, int encoding_hint = 0 ); @@ -1586,7 +1586,7 @@ public: * * Convenience function. * - * Convert unicoded string to local encoding and use %%-style + * Convert tqunicoded string to local encoding and use %%-style * encoding for all common delimiters / non-ascii characters. * * @param str the string to encode (can be @c TQString::null) @@ -1605,7 +1605,7 @@ public: * * Convenience function. * - * Convert unicoded string to local encoding and use %%-style + * Convert tqunicoded string to local encoding and use %%-style * encoding for all common delimiters and non-ascii characters * as well as the slash @c '/'. * @@ -1623,7 +1623,7 @@ public: * * Convenience function. * - * Decode %-style encoding and convert from local encoding to unicode. + * Decode %-style encoding and convert from local encoding to tqunicode. * * Reverse of encode_string() * diff --git a/kdecore/kurldrag.cpp b/kdecore/kurldrag.cpp index 7147f7a74..089d2fadb 100644 --- a/kdecore/kurldrag.cpp +++ b/kdecore/kurldrag.cpp @@ -87,7 +87,7 @@ KURLDrag * KURLDrag::newDrag( const KURL::List &urls, const TQMapprovides( "application/x-kde-urilist" ) ) { - TQByteArray payload = e->encodedData( "application/x-kde-urilist" ); + TQByteArray payload = e->tqencodedData( "application/x-kde-urilist" ); if ( payload.size() ) { uint c=0; const char* d = payload.data(); @@ -128,7 +128,7 @@ bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris, TQMapencodedData( "application/x-kio-metadata" ); + TQByteArray ba = e->tqencodedData( "application/x-kio-metadata" ); if ( ba.size() ) { TQString s = ba.data(); @@ -140,7 +140,7 @@ bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris, TQMap KUser::groups() const { TQValueList::const_iterator it; for ( it = allGroups.begin(); it != allGroups.end(); ++it ) { TQValueList users = (*it).users(); - if ( users.find( *this ) != users.end()) { + if ( users.tqfind( *this ) != users.end()) { result.append(*it); } } @@ -232,7 +232,7 @@ TQStringList KUser::groupNames() const { TQValueList::const_iterator it; for ( it = allGroups.begin(); it != allGroups.end(); ++it ) { TQValueList users = (*it).users(); - if ( users.find( *this ) != users.end()) { + if ( users.tqfind( *this ) != users.end()) { result.append((*it).name()); } } diff --git a/kdecore/kvmallocator.cpp b/kdecore/kvmallocator.cpp index 996d55791..031dd4304 100644 --- a/kdecore/kvmallocator.cpp +++ b/kdecore/kvmallocator.cpp @@ -106,7 +106,7 @@ KVMAllocator::allocate(size_t _size) free_block.start += block.size; if (!free_block.size) d->free_blocks.remove(it); - it = d->used_blocks.replace(block.start, block); + it = d->used_blocks.tqreplace(block.start, block); return &(it.data()); } ++it; @@ -120,7 +120,7 @@ KVMAllocator::allocate(size_t _size) block.size = (_size + KVM_ALIGN) & ~KVM_ALIGN; block.mmap = 0; kdDebug(180)<<"VM alloc: using new block "<<(long)block.start<<" size ="<<(long)block.size<<" request = "<<_size<< endl; - it = d->used_blocks.replace(block.start, block); + it = d->used_blocks.tqreplace(block.start, block); d->max_length += block.size; return &(it.data()); } @@ -138,14 +138,14 @@ KVMAllocator::free(Block *block_p) return; } TQMap::iterator it; - it = d->used_blocks.find(block.start); + it = d->used_blocks.tqfind(block.start); if (it == d->used_blocks.end()) { kdDebug(180)<<"VM free: Block "<<(long)block.start<<" is not allocated."<used_blocks.remove(it); - it = d->free_blocks.replace(block.start, block); + it = d->free_blocks.tqreplace(block.start, block); TQMap::iterator before = it; --before; if (before != d->free_blocks.end()) diff --git a/kdecore/kwin.cpp b/kdecore/kwin.cpp index bc9a9761b..706b985fb 100644 --- a/kdecore/kwin.cpp +++ b/kdecore/kwin.cpp @@ -158,7 +158,7 @@ bool KWin::compositingActive() #ifdef Q_WS_X11 namespace { -class ContextWidget : public QWidget +class ContextWidget : public TQWidget { public: ContextWidget(); @@ -179,7 +179,7 @@ ContextWidget::ContextWidget() LeaveWindowMask ), GrabModeAsync, GrabModeAsync, None, c.handle(), CurrentTime ); - qApp->enter_loop(); + tqApp->enter_loop(); } @@ -205,7 +205,7 @@ bool ContextWidget::x11Event( XEvent * ev) e.xbutton.x = lx; e.xbutton.y = ly; XSendEvent( qt_xdisplay(), w, true, ButtonPressMask, &e ); - qApp->exit_loop(); + tqApp->exit_loop(); return true; } return false; @@ -313,7 +313,7 @@ void KWin::setMainWindow( TQWidget* subwindow, WId mainwindow ) Grmbl. See TQDialog::show(). That should get fixed in Qt somehow. */ if( tqqt_cast< TQDialog* >( subwindow ) != NULL - && subwindow->parentWidget() == NULL + && subwindow->tqparentWidget() == NULL && kapp->mainWidget() != NULL ) { kdWarning() << "KWin::setMainWindow(): There either mustn't be kapp->mainWidget()," @@ -412,7 +412,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags ) TQImage img( (uchar*) ni.data, (int) ni.size.width, (int) ni.size.height, 32, 0, 0, TQImage::IgnoreEndian ); img.setAlphaBuffer( true ); if ( scale && width > 0 && height > 0 &&img.size() != TQSize( width, height ) && !img.isNull() ) - img = img.smoothScale( width, height ); + img = TQImage(img).smoothScale( width, height ); if ( !img.isNull() ) result.convertFromImage( img ); return result; @@ -457,7 +457,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags ) } if ( scale && width > 0 && height > 0 && !pm.isNull() && ( (int) w != width || (int) h != height) ){ - result.convertFromImage( pm.convertToImage().smoothScale( width, height ) ); + result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) ); } else { result = pm; } @@ -488,7 +488,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags ) TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( className.lower(), KIcon::Small, iconWidth, KIcon::DefaultState, 0, true ); if( scale && !pm.isNull() ) - result.convertFromImage( pm.convertToImage().smoothScale( width, height ) ); + result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) ); else result = pm; @@ -505,7 +505,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags ) TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( "xapp", KIcon::Small, iconWidth, KIcon::DefaultState, 0, true ); if( scale && !pm.isNull() ) - result.convertFromImage( pm.convertToImage().smoothScale( width, height ) ); + result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) ); else result = pm; } @@ -520,7 +520,7 @@ void KWin::setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon ) if ( icon.isNull() ) return; NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), 0 ); - TQImage img = icon.convertToImage().convertDepth( 32 ); + TQImage img = TQImage(icon.convertToImage()).convertDepth( 32 ); NETIcon ni; ni.size.width = img.size().width(); ni.size.height = img.size().height(); @@ -528,7 +528,7 @@ void KWin::setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon ) info.setIcon( ni, true ); if ( miniIcon.isNull() ) return; - img = miniIcon.convertToImage().convertDepth( 32 ); + img = TQImage(miniIcon.convertToImage()).convertDepth( 32 ); ni.size.width = img.size().width(); ni.size.height = img.size().height(); ni.data = (unsigned char *) img.bits(); diff --git a/kdecore/kwinmodule.cpp b/kdecore/kwinmodule.cpp index f113570db..5e7b77333 100644 --- a/kdecore/kwinmodule.cpp +++ b/kdecore/kwinmodule.cpp @@ -172,7 +172,7 @@ const TQValueList& KWinModule::stackingOrder() const bool KWinModule::hasWId(WId w) const { - return d->windows.findIndex( w ) != -1; + return d->windows.tqfindIndex( w ) != -1; } const TQValueList& KWinModule::systemTrayWindows() const @@ -243,7 +243,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev ) for ( TQPtrListIterator mit( modules ); mit.current(); ++mit ) emit (*mit)->showingDesktopChanged( showingDesktop()); } - } else if ( windows.findIndex( ev->xany.window ) != -1 ){ + } else if ( windows.tqfindIndex( ev->xany.window ) != -1 ){ NETWinInfo ni( qt_xdisplay(), ev->xany.window, qt_xrootwin(), 0 ); unsigned long dirty[ 2 ]; ni.event( ev, dirty, 2 ); @@ -257,7 +257,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev ) } if ( (dirty[ NETWinInfo::PROTOCOLS ] & NET::WMStrut) != 0 ) { removeStrutWindow( ev->xany.window ); - if ( possibleStrutWindows.findIndex( ev->xany.window ) == -1 ) + if ( possibleStrutWindows.tqfindIndex( ev->xany.window ) == -1 ) possibleStrutWindows.append( ev->xany.window ); } if ( dirty[ NETWinInfo::PROTOCOLS ] || dirty[ NETWinInfo::PROTOCOLS2 ] ) { @@ -318,7 +318,7 @@ void KWinModulePrivate::addClient(Window w) void KWinModulePrivate::removeClient(Window w) { bool emit_strutChanged = removeStrutWindow( w ); - if( strutSignalConnected && possibleStrutWindows.findIndex( w ) != -1 && modules.count() > 0 ) { + if( strutSignalConnected && possibleStrutWindows.tqfindIndex( w ) != -1 && modules.count() > 0 ) { NETWinInfo info( qt_xdisplay(), w, qt_xrootwin(), NET::WMStrut ); NETStrut strut = info.strut(); if ( strut.left || strut.top || strut.right || strut.bottom ) { @@ -400,7 +400,7 @@ TQRect KWinModule::workArea( const TQValueList& exclude, int desktop ) cons TQValueList::ConstIterator it1; for( it1 = d->windows.begin(); it1 != d->windows.end(); ++it1 ) { - if(exclude.findIndex(*it1) != -1) continue; + if(exclude.tqfindIndex(*it1) != -1) continue; // Kicker (very) extensively calls this function, causing hundreds of roundtrips just // to repeatedly find out struts of all windows. Therefore strut values for strut @@ -416,7 +416,7 @@ TQRect KWinModule::workArea( const TQValueList& exclude, int desktop ) cons if(!((*it2).desktop == desktop || (*it2).desktop == NETWinInfo::OnAllDesktops )) continue; strut = (*it2).strut; - } else if( d->possibleStrutWindows.findIndex( *it1 ) != -1 ) { + } else if( d->possibleStrutWindows.tqfindIndex( *it1 ) != -1 ) { NETWinInfo info( qt_xdisplay(), (*it1), qt_xrootwin(), NET::WMStrut | NET::WMDesktop); strut = info.strut(); d->possibleStrutWindows.remove( *it1 ); diff --git a/kdecore/kwinmodule.h b/kdecore/kwinmodule.h index f680d561d..6083d9b85 100644 --- a/kdecore/kwinmodule.h +++ b/kdecore/kwinmodule.h @@ -27,6 +27,10 @@ #include #include "kdelibs_export.h" +#ifdef Q_MOC_RUN +#define Q_OS_UNIX +#endif // Q_MOC_RUN + #ifdef Q_OS_UNIX class KWinModulePrivate; @@ -49,7 +53,7 @@ class KWinModulePrivate; * @short Base class for KDE Window Manager modules. * @author Matthias Ettrich (ettrich@kde.org) */ -class KDECORE_EXPORT KWinModule : public QObject +class KDECORE_EXPORT KWinModule : public TQObject { Q_OBJECT diff --git a/kdecore/kxmessages.cpp b/kdecore/kxmessages.cpp index 6b6f971a2..02af07b0f 100644 --- a/kdecore/kxmessages.cpp +++ b/kdecore/kxmessages.cpp @@ -189,7 +189,7 @@ bool KXMessages::x11Event( XEvent* ev_P ) ++i ) buf[ i ] = ev_P->xclient.data.b[ i ]; buf[ i ] = '\0'; - if( incoming_messages.contains( ev_P->xclient.window )) + if( incoming_messages.tqcontains( ev_P->xclient.window )) { if( ev_P->xclient.message_type == accept_atom1 && accept_atom1 != accept_atom2 ) // two different messages on the same window at the same time shouldn't happen anyway diff --git a/kdecore/kxmessages.h b/kdecore/kxmessages.h index 256b69f91..a5604c817 100644 --- a/kdecore/kxmessages.h +++ b/kdecore/kxmessages.h @@ -29,6 +29,11 @@ DEALINGS IN THE SOFTWARE. #include #include #include + +#ifdef Q_MOC_RUN +#define Q_WS_X11 +#endif // Q_MOC_RUN + #ifdef Q_WS_X11 #include @@ -45,7 +50,7 @@ class KXMessagesPrivate; */ // KDE4 - make this internal for KStartupInfo only? class KDECORE_EXPORT KXMessages - : public QWidget + : public TQWidget { Q_OBJECT public: diff --git a/kdecore/libintl.cpp b/kdecore/libintl.cpp index aadfcd821..83e2d3711 100644 --- a/kdecore/libintl.cpp +++ b/kdecore/libintl.cpp @@ -77,7 +77,7 @@ Boston, MA 02110-1301, USA. */ # define W(flag, data) ((flag) ? SWAP (data) : (data)) #endif -typedef Q_UINT32 nls_uint32; +typedef TQ_UINT32 nls_uint32; struct loaded_domain { diff --git a/kdecore/malloc/malloc.c b/kdecore/malloc/malloc.c index dba0fdef0..56d0b7324 100644 --- a/kdecore/malloc/malloc.c +++ b/kdecore/malloc/malloc.c @@ -85,7 +85,7 @@ int kde_malloc_is_used = 0; calloc(size_t n_elements, size_t element_size); free(Void_t* p); realloc(Void_t* p, size_t n); - memalign(size_t alignment, size_t n); + memalign(size_t tqalignment, size_t n); valloc(size_t n); mallinfo() mallopt(int parameter_number, int parameter_value) @@ -107,7 +107,7 @@ int kde_malloc_is_used = 0; You can adjust this by defining INTERNAL_SIZE_T Alignment: 2 * sizeof(size_t) (default) - (i.e., 8 byte alignment with 4byte size_t). This suffices for + (i.e., 8 byte tqalignment with 4byte size_t). This suffices for nearly all current machines and C compilers. However, you can define MALLOC_ALIGNMENT to be wider than this if necessary. @@ -146,7 +146,7 @@ int kde_malloc_is_used = 0; default used to obtain memory from system) accepts signed arguments, and may not be able to handle size_t-wide arguments with negative sign bit. Generally, values that would - appear as negative after accounting for overhead and alignment + appear as negative after accounting for overhead and tqalignment are supported only via mmap(), which does not have this limitation. @@ -393,8 +393,8 @@ extern "C" { defining INTERNAL_SIZE_T to be a 32 bit `unsigned int' at the expense of not being able to handle more than 2^32 of malloced space. If this limitation is acceptable, you are encouraged to set - this unless you are on a platform requiring 16byte alignments. In - this case the alignment requirements turn out to negate any + this unless you are on a platform requiring 16byte tqalignments. In + this case the tqalignment requirements turn out to negate any potential advantages of decreasing size_t word size. Implementors: Beware of the possible combinations of: @@ -419,11 +419,11 @@ extern "C" { /* - MALLOC_ALIGNMENT is the minimum alignment for malloc'ed chunks. + MALLOC_ALIGNMENT is the minimum tqalignment for malloc'ed chunks. It must be a power of two at least 2 * SIZE_SZ, even on machines - for which smaller alignments would suffice. It may be defined as + for which smaller tqalignments would suffice. It may be defined as larger than this though. Note however that code and data structures - are optimized for the case of 8-byte alignment. + are optimized for the case of 8-byte tqalignment. */ @@ -957,13 +957,13 @@ Void_t* public_rEALLOc(); #endif /* - memalign(size_t alignment, size_t n); + memalign(size_t tqalignment, size_t n); Returns a pointer to a newly allocated chunk of n bytes, aligned - in accord with the alignment argument. + in accord with the tqalignment argument. - The alignment argument should be a power of two. If the argument is + The tqalignment argument should be a power of two. If the argument is not a power of two, the nearest greater power is used. - 8-byte alignment is guaranteed by normal malloc calls, so don't + 8-byte tqalignment is guaranteed by normal malloc calls, so don't bother calling memalign with an argument of 8 or less. Overreliance on memalign is a sure way to fragment space. @@ -1228,7 +1228,7 @@ int public_mTRIm(); Returns the number of bytes you can actually use in an allocated chunk, which may be more than you requested (although - often not) due to alignment and minimum size constraints. + often not) due to tqalignment and minimum size constraints. You can use this many bytes without worrying about overwriting other allocated objects. This is not a particularly great programming practice. malloc_usable_size can be more useful in @@ -1252,8 +1252,8 @@ size_t public_mUSABLe(); number of bytes allocated via malloc (or realloc, etc) but not yet freed. Note that this is the number of bytes allocated, not the number requested. It will be larger than the number requested - because of alignment and bookkeeping overhead. Because it includes - alignment wastage as being in use, this figure may be greater than + because of tqalignment and bookkeeping overhead. Because it includes + tqalignment wastage as being in use, this figure may be greater than zero even when no user-level chunks are allocated. The reported current and maximum system memory can be inaccurate if @@ -1290,7 +1290,7 @@ void public_mSTATs(); fragmentation without improving speed. M_MXFAST is set in REQUEST size units. It is internally used in - chunksize units, which adds padding and alignment. You can reduce + chunksize units, which adds padding and tqalignment. You can reduce M_MXFAST to 0 to disable all use of fastbins. This causes the malloc algorithm to be a closer approximation of fifo-best-fit in all cases, not just for larger requests, but will generally cause it to be @@ -1434,7 +1434,7 @@ void public_mSTATs(); 1. The space cannot be reclaimed, consolidated, and then used to service later requests, as happens with normal chunks. - 2. It can lead to more wastage because of mmap page alignment + 2. It can lead to more wastage because of mmap page tqalignment requirements 3. It causes malloc performance to be more dependent on host system memory management support routines which may vary in @@ -1614,12 +1614,12 @@ Void_t* public_rEALLOc(Void_t* m, size_t bytes) { return m; } -Void_t* public_mEMALIGn(size_t alignment, size_t bytes) { +Void_t* public_mEMALIGn(size_t tqalignment, size_t bytes) { Void_t* m; if (MALLOC_PREACTION != 0) { return 0; } - m = mEMALIGn(alignment, bytes); + m = mEMALIGn(tqalignment, bytes); if (MALLOC_POSTACTION != 0) { } return m; @@ -1938,7 +1938,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Note that the `foot' of the current chunk is actually represented as the prev_size of the NEXT chunk. This makes it easier to - deal with alignments etc but can be very confusing when trying + deal with tqalignments etc but can be very confusing when trying to extend or adapt this code. The two exceptions to all this are @@ -1956,7 +1956,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ /* - ---------- Size and alignment checks and conversions ---------- + ---------- Size and tqalignment checks and conversions ---------- */ /* conversion from malloc headers to user pointers, and back */ @@ -1972,7 +1972,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ #define MINSIZE \ (unsigned long)(((MIN_CHUNK_SIZE+MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK)) -/* Check if m has acceptable alignment */ +/* Check if m has acceptable tqalignment */ #define aligned_OK(m) (((unsigned long)((m)) & (MALLOC_ALIGN_MASK)) == 0) @@ -2641,7 +2641,7 @@ static void do_check_remalloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s; /* Legal size ... */ assert((sz & MALLOC_ALIGN_MASK) == 0); assert((unsigned long)(sz) >= MINSIZE); - /* ... and alignment */ + /* ... and tqalignment */ assert(aligned_OK(chunk2mem(p))); /* chunk is less than MINSIZE more than request */ assert((long)(sz) - (long)(s) >= 0); @@ -2704,7 +2704,7 @@ static void do_check_malloc_state() /* internal size_t must be no wider than pointer type */ assert(sizeof(INTERNAL_SIZE_T) <= sizeof(char*)); - /* alignment is a power of 2 */ + /* tqalignment is a power of 2 */ assert((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-1)) == 0); /* cannot run remaining checks until fully initialized */ @@ -3209,7 +3209,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; /* The offset to the start of the mmapped region is stored in the prev_size field of the chunk. This allows us to adjust - returned start address to meet alignment requirements here + returned start address to meet tqalignment requirements here and in memalign(), and still be able to compute proper address argument for later munmap in free() and realloc(). */ @@ -3288,7 +3288,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; Round to a multiple of page size. If MORECORE is not contiguous, this ensures that we only call it with whole-page arguments. And if MORECORE is contiguous and - this is not first time through, this preserves page-alignment of + this is not first time through, this preserves page-tqalignment of previous calls. Otherwise, we correct to page-align below. */ @@ -3384,7 +3384,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; /* handle contiguous cases */ if (contiguous(av)) { - /* Guarantee alignment of first new chunk made from this space */ + /* Guarantee tqalignment of first new chunk made from this space */ front_misalign = (INTERNAL_SIZE_T)chunk2mem(brk) & MALLOC_ALIGN_MASK; if (front_misalign > 0) { @@ -3454,7 +3454,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; double fencepost at old_top to prevent consolidation with space we don't own. These fenceposts are artificial chunks that are marked as inuse and are in any case too small to use. We need - two to make sizes and alignments work out. + two to make sizes and tqalignments work out. */ if (old_size != 0) { @@ -3554,7 +3554,7 @@ Void_t* mALLOc(size_t bytes) /* Convert request size to internal form by adding SIZE_SZ bytes - overhead plus possibly more to obtain necessary alignment and/or + overhead plus possibly more to obtain necessary tqalignment and/or to obtain a size of at least MINSIZE, the smallest allocatable size. Also, checked_request2size traps (returning 0) request sizes that are so large that they wrap around zero when padded and @@ -4127,54 +4127,54 @@ Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes; INLINE #if __STD_C -Void_t* mEMALIGn(size_t alignment, size_t bytes) +Void_t* mEMALIGn(size_t tqalignment, size_t bytes) #else -Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes; +Void_t* mEMALIGn(tqalignment, bytes) size_t tqalignment; size_t bytes; #endif { INTERNAL_SIZE_T nb; /* padded request size */ char* m; /* memory returned by malloc call */ mchunkptr p; /* corresponding chunk */ - char* brk; /* alignment point within p */ + char* brk; /* tqalignment point within p */ mchunkptr newp; /* chunk to return */ INTERNAL_SIZE_T newsize; /* its size */ - INTERNAL_SIZE_T leadsize; /* leading space before alignment point */ + INTERNAL_SIZE_T leadsize; /* leading space before tqalignment point */ mchunkptr remainder; /* spare room at end to split off */ unsigned long remainder_size; /* its size */ INTERNAL_SIZE_T size; - /* If need less alignment than we give anyway, just relay to malloc */ + /* If need less tqalignment than we give anyway, just relay to malloc */ - if (alignment <= MALLOC_ALIGNMENT) return mALLOc(bytes); + if (tqalignment <= MALLOC_ALIGNMENT) return mALLOc(bytes); /* Otherwise, ensure that it is at least a minimum chunk size */ - if (alignment < MINSIZE) alignment = MINSIZE; + if (tqalignment < MINSIZE) tqalignment = MINSIZE; - /* Make sure alignment is power of 2 (in case MINSIZE is not). */ - if ((alignment & (alignment - 1)) != 0) { + /* Make sure tqalignment is power of 2 (in case MINSIZE is not). */ + if ((tqalignment & (tqalignment - 1)) != 0) { size_t a = MALLOC_ALIGNMENT * 2; - while ((unsigned long)a < (unsigned long)alignment) a <<= 1; - alignment = a; + while ((unsigned long)a < (unsigned long)tqalignment) a <<= 1; + tqalignment = a; } checked_request2size(bytes, nb); /* - Strategy: find a spot within that chunk that meets the alignment + Strategy: find a spot within that chunk that meets the tqalignment request, and then possibly free the leading and trailing space. */ - /* Call malloc with worst case padding to hit alignment. */ + /* Call malloc with worst case padding to hit tqalignment. */ - m = (char*)(mALLOc(nb + alignment + MINSIZE)); + m = (char*)(mALLOc(nb + tqalignment + MINSIZE)); if (m == 0) return 0; /* propagate failure */ p = mem2chunk(m); - if ((((unsigned long)(m)) % alignment) != 0) { /* misaligned */ + if ((((unsigned long)(m)) % tqalignment) != 0) { /* misaligned */ /* Find an aligned spot inside chunk. Since we need to give back @@ -4184,10 +4184,10 @@ Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes; total room so that this is always possible. */ - brk = (char*)mem2chunk(((unsigned long)(m + alignment - 1)) & - -((signed long) alignment)); + brk = (char*)mem2chunk(((unsigned long)(m + tqalignment - 1)) & + -((signed long) tqalignment)); if ((unsigned long)(brk - (char*)(p)) < MINSIZE) - brk += alignment; + brk += tqalignment; newp = (mchunkptr)brk; leadsize = brk - (char*)(p); @@ -4208,7 +4208,7 @@ Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes; p = newp; assert (newsize >= nb && - (((unsigned long)(chunk2mem(p))) % alignment) == 0); + (((unsigned long)(chunk2mem(p))) % tqalignment) == 0); } /* Also give back spare room at the end */ @@ -4375,7 +4375,7 @@ static Void_t** iALLOc(n_elements, sizes, opts, chunks) size_t n_elements; size_ contents_size += request2size(sizes[i]); } - /* subtract out alignment bytes from total to minimize overallocation */ + /* subtract out tqalignment bytes from total to minimize overallocation */ size = contents_size + array_size - MALLOC_ALIGN_MASK; /* @@ -5356,7 +5356,7 @@ History: and Anonymous. * Allow override of MALLOC_ALIGNMENT (Thanks to Ruud Waij for helping test this.) - * memalign: check alignment arg + * memalign: check tqalignment arg * realloc: don't try to shift chunks backwards, since this leads to more fragmentation in some programs and doesn't seem to help in any others. @@ -5409,7 +5409,7 @@ History: * Support another case of realloc via move into top * Fix error occurring when initial sbrk_base not word-aligned. * Rely on page size for units instead of SBRK_UNIT to - avoid surprises about sbrk alignment conventions. + avoid surprises about sbrk tqalignment conventions. * Add mallinfo, mallopt. Thanks to Raymond Nijssen (raymond@es.ele.tue.nl) for the suggestion. * Add `pad' argument to malloc_trim and top_pad mallopt parameter. @@ -5569,7 +5569,7 @@ Void_t* public_rEALLOc(Void_t* m, size_t bytes) { #endif } -Void_t* public_mEMALIGn(size_t alignment, size_t bytes) { +Void_t* public_mEMALIGn(size_t tqalignment, size_t bytes) { #ifndef KDE_MALLOC_FULL if( malloc_type == 1 ) { @@ -5578,16 +5578,16 @@ Void_t* public_mEMALIGn(size_t alignment, size_t bytes) { if (MALLOC_PREACTION != 0) { return 0; } - m = mEMALIGn(alignment, bytes); + m = mEMALIGn(tqalignment, bytes); if (MALLOC_POSTACTION != 0) { } return m; #ifndef KDE_MALLOC_FULL } if( malloc_type == 2 ) - return libc_memalign( alignment, bytes ); + return libc_memalign( tqalignment, bytes ); init_malloc_type(); - return public_mEMALIGn( alignment, bytes ); + return public_mEMALIGn( tqalignment, bytes ); #endif } @@ -5728,7 +5728,7 @@ int public_mALLOPt(int p, int v) { #endif int -posix_memalign (void **memptr, size_t alignment, size_t size) +posix_memalign (void **memptr, size_t tqalignment, size_t size) { void *mem; @@ -5737,7 +5737,7 @@ posix_memalign (void **memptr, size_t alignment, size_t size) if (size % sizeof (void *) != 0 || (size & (size - 1)) != 0) return EINVAL; - mem = memalign (alignment, size); + mem = memalign (tqalignment, size); if (mem != NULL) { *memptr = mem; diff --git a/kdecore/netsupp.cpp b/kdecore/netsupp.cpp index 6d56e147d..83aec8bc0 100644 --- a/kdecore/netsupp.cpp +++ b/kdecore/netsupp.cpp @@ -715,9 +715,9 @@ static int make_inet(const char *name, int portnum, int protonum, struct addrinf # endif sin->sin_port = portnum; if (hint->ai_flags & AI_PASSIVE) - *(Q_UINT32*)&sin->sin_addr = INADDR_ANY; + *(TQ_UINT32*)&sin->sin_addr = INADDR_ANY; else - *(Q_UINT32*)&sin->sin_addr = htonl(INADDR_LOOPBACK); + *(TQ_UINT32*)&sin->sin_addr = htonl(INADDR_LOOPBACK); q->ai_flags = 0; q->ai_family = AF_INET; q->ai_socktype = hint->ai_socktype; @@ -1016,7 +1016,7 @@ int getnameinfo(const struct sockaddr *sa, ksocklen_t salen, #define KRF_inet_ntop KRF_USING_OWN_INET_NTOP -static void add_dwords(char *buf, Q_UINT16 *dw, int count) +static void add_dwords(char *buf, TQ_UINT16 *dw, int count) { int i = 1; sprintf(buf + strlen(buf), "%x", ntohs(dw[0])); @@ -1027,7 +1027,7 @@ static void add_dwords(char *buf, Q_UINT16 *dw, int count) const char* inet_ntop(int af, const void *cp, char *buf, size_t len) { char buf2[sizeof "1234:5678:9abc:def0:1234:5678:255.255.255.255" + 1]; - Q_UINT8 *data = (Q_UINT8*)cp; + TQ_UINT8 *data = (TQ_UINT8*)cp; if (af == AF_INET) { @@ -1046,8 +1046,8 @@ const char* inet_ntop(int af, const void *cp, char *buf, size_t len) # ifdef AF_INET6 if (af == AF_INET6) { - Q_UINT16 *p = (Q_UINT16*)data; - Q_UINT16 *longest = NULL, *cur = NULL; + TQ_UINT16 *p = (TQ_UINT16*)data; + TQ_UINT16 *longest = NULL, *cur = NULL; int longest_length = 0, cur_length; int i; @@ -1150,7 +1150,7 @@ int inet_pton(int af, const char *cp, void *buf) # ifdef AF_INET6 else if (af == AF_INET6) { - Q_UINT16 addr[8]; + TQ_UINT16 addr[8]; const char *p = cp; int n = 0, start = 8; bool has_v4 = strchr(p, '.') != NULL; @@ -1200,8 +1200,8 @@ int inet_pton(int af, const char *cp, void *buf) // n < 8 means that we have to move n - start words 8 - n words to the right if (start == 8 && n != 8) return 0; // bad conversion - memmove(addr + start + (8 - n), addr + start, (n - start) * sizeof(Q_UINT16)); - memset(addr + start, 0, (8 - n) * sizeof(Q_UINT16)); + memmove(addr + start + (8 - n), addr + start, (n - start) * sizeof(TQ_UINT16)); + memset(addr + start, 0, (8 - n) * sizeof(TQ_UINT16)); // check the byte order // The compiler should optimise this out in big endian machines diff --git a/kdecore/netsupp.h b/kdecore/netsupp.h index 4dba3f6cc..a94040d44 100644 --- a/kdecore/netsupp.h +++ b/kdecore/netsupp.h @@ -66,63 +66,63 @@ struct kde_in6_addr struct kde_sockaddr_in6 { #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN - Q_UINT8 sin6_len; - Q_UINT8 sin6_family; + TQ_UINT8 sin6_len; + TQ_UINT8 sin6_family; #else //HAVE_STRUCT_SOCKADDR_SA_LEN - Q_UINT16 sin6_family; + TQ_UINT16 sin6_family; #endif unsigned short sin6_port; /* RFC says in_port_t */ - Q_UINT32 sin6_flowinfo; + TQ_UINT32 sin6_flowinfo; struct kde_in6_addr sin6_addr; - Q_UINT32 sin6_scope_id; + TQ_UINT32 sin6_scope_id; }; /* IPv6 test macros that could be missing from some implementations */ #define KDE_IN6_IS_ADDR_UNSPECIFIED(a) \ - (((Q_UINT32 *) (a))[0] == 0 && ((Q_UINT32 *) (a))[1] == 0 && \ - ((Q_UINT32 *) (a))[2] == 0 && ((Q_UINT32 *) (a))[3] == 0) + (((TQ_UINT32 *) (a))[0] == 0 && ((TQ_UINT32 *) (a))[1] == 0 && \ + ((TQ_UINT32 *) (a))[2] == 0 && ((TQ_UINT32 *) (a))[3] == 0) #define KDE_IN6_IS_ADDR_LOOPBACK(a) \ - (((Q_UINT32 *) (a))[0] == 0 && ((Q_UINT32 *) (a))[1] == 0 && \ - ((Q_UINT32 *) (a))[2] == 0 && ((Q_UINT32 *) (a))[3] == htonl (1)) + (((TQ_UINT32 *) (a))[0] == 0 && ((TQ_UINT32 *) (a))[1] == 0 && \ + ((TQ_UINT32 *) (a))[2] == 0 && ((TQ_UINT32 *) (a))[3] == htonl (1)) #define KDE_IN6_IS_ADDR_MULTICAST(a) (((u_int8_t *) (a))[0] == 0xff) #define KDE_IN6_IS_ADDR_LINKLOCAL(a) \ - ((((Q_UINT32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000)) + ((((TQ_UINT32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000)) #define KDE_IN6_IS_ADDR_SITELOCAL(a) \ - ((((Q_UINT32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfec00000)) + ((((TQ_UINT32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfec00000)) #define KDE_IN6_IS_ADDR_V4MAPPED(a) \ - ((((Q_UINT32 *) (a))[0] == 0) && (((Q_UINT32 *) (a))[1] == 0) && \ - (((Q_UINT32 *) (a))[2] == htonl (0xffff))) + ((((TQ_UINT32 *) (a))[0] == 0) && (((TQ_UINT32 *) (a))[1] == 0) && \ + (((TQ_UINT32 *) (a))[2] == htonl (0xffff))) #define KDE_IN6_IS_ADDR_V4COMPAT(a) \ - ((((Q_UINT32 *) (a))[0] == 0) && (((Q_UINT32 *) (a))[1] == 0) && \ - (((Q_UINT32 *) (a))[2] == 0) && (ntohl (((Q_UINT32 *) (a))[3]) > 1)) + ((((TQ_UINT32 *) (a))[0] == 0) && (((TQ_UINT32 *) (a))[1] == 0) && \ + (((TQ_UINT32 *) (a))[2] == 0) && (ntohl (((TQ_UINT32 *) (a))[3]) > 1)) #define KDE_IN6_ARE_ADDR_EQUAL(a,b) \ - ((((Q_UINT32 *) (a))[0] == ((Q_UINT32 *) (b))[0]) && \ - (((Q_UINT32 *) (a))[1] == ((Q_UINT32 *) (b))[1]) && \ - (((Q_UINT32 *) (a))[2] == ((Q_UINT32 *) (b))[2]) && \ - (((Q_UINT32 *) (a))[3] == ((Q_UINT32 *) (b))[3])) + ((((TQ_UINT32 *) (a))[0] == ((TQ_UINT32 *) (b))[0]) && \ + (((TQ_UINT32 *) (a))[1] == ((TQ_UINT32 *) (b))[1]) && \ + (((TQ_UINT32 *) (a))[2] == ((TQ_UINT32 *) (b))[2]) && \ + (((TQ_UINT32 *) (a))[3] == ((TQ_UINT32 *) (b))[3])) #define KDE_IN6_IS_ADDR_MC_NODELOCAL(a) \ - (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((Q_UINT8 *) (a))[1] & 0xf) == 0x1)) + (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((TQ_UINT8 *) (a))[1] & 0xf) == 0x1)) #define KDE_IN6_IS_ADDR_MC_LINKLOCAL(a) \ - (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((Q_UINT8 *) (a))[1] & 0xf) == 0x2)) + (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((TQ_UINT8 *) (a))[1] & 0xf) == 0x2)) #define KDE_IN6_IS_ADDR_MC_SITELOCAL(a) \ - (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((Q_UINT8 *) (a))[1] & 0xf) == 0x5)) + (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((TQ_UINT8 *) (a))[1] & 0xf) == 0x5)) #define KDE_IN6_IS_ADDR_MC_ORGLOCAL(a) \ - (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((Q_UINT8 *) (a))[1] & 0xf) == 0x8)) + (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((TQ_UINT8 *) (a))[1] & 0xf) == 0x8)) #define KDE_IN6_IS_ADDR_MC_GLOBAL(a) \ - (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((Q_UINT8 *) (a))[1] & 0xf) == 0xe)) + (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((TQ_UINT8 *) (a))[1] & 0xf) == 0xe)) #ifdef NEED_IN6_TESTS # define IN6_IS_ADDR_UNSPECIFIED KDE_IN6_IS_ADDR_UNSPECIFIED diff --git a/kdecore/netwm.cpp b/kdecore/netwm.cpp index 9c8bd1283..64c6aab2b 100644 --- a/kdecore/netwm.cpp +++ b/kdecore/netwm.cpp @@ -4626,18 +4626,18 @@ Time NET::timestampDiff( Time time1, Time time2 ) // returns time2 - time1 #else int NET::timestampCompare( unsigned long time1_, unsigned long time2_ ) // like strcmp() { - Q_UINT32 time1 = time1_; - Q_UINT32 time2 = time2_; + TQ_UINT32 time1 = time1_; + TQ_UINT32 time2 = time2_; if( time1 == time2 ) return 0; - return Q_UINT32( time1 - time2 ) < 0x7fffffffU ? 1 : -1; // time1 > time2 -> 1, handle wrapping + return TQ_UINT32( time1 - time2 ) < 0x7fffffffU ? 1 : -1; // time1 > time2 -> 1, handle wrapping } int NET::timestampDiff( unsigned long time1_, unsigned long time2_ ) // returns time2 - time1 { // no need to handle wrapping? - Q_UINT32 time1 = time1_; - Q_UINT32 time2 = time2_; - return Q_UINT32( time2 - time1 ); + TQ_UINT32 time1 = time1_; + TQ_UINT32 time2 = time2_; + return TQ_UINT32( time2 - time1 ); } #endif diff --git a/kdecore/network/kbufferedsocket.cpp b/kdecore/network/kbufferedsocket.cpp index 04115c051..85b433193 100644 --- a/kdecore/network/kbufferedsocket.cpp +++ b/kdecore/network/kbufferedsocket.cpp @@ -94,7 +94,7 @@ void KBufferedSocket::close() } #ifdef USE_QT3 -Q_LONG KBufferedSocket::bytesAvailable() const +TQ_LONG KBufferedSocket::bytesAvailable() const #endif #ifdef USE_QT4 qint64 KBufferedSocket::bytesAvailable() const @@ -106,9 +106,9 @@ qint64 KBufferedSocket::bytesAvailable() const return d->input->length(); } -Q_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout) +TQ_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout) { - Q_LONG retval = KStreamSocket::waitForMore(msecs, timeout); + TQ_LONG retval = KStreamSocket::waitForMore(msecs, timeout); if (d->input) { resetError(); @@ -118,7 +118,7 @@ Q_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout) return retval; } -Q_LONG KBufferedSocket::readBlock(char *data, Q_ULONG maxlen) +TQ_LONG KBufferedSocket::readBlock(char *data, TQ_ULONG maxlen) { if (d->input) { @@ -134,13 +134,13 @@ Q_LONG KBufferedSocket::readBlock(char *data, Q_ULONG maxlen) return KStreamSocket::readBlock(data, maxlen); } -Q_LONG KBufferedSocket::readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) +TQ_LONG KBufferedSocket::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) { from = peerAddress(); return readBlock(data, maxlen); } -Q_LONG KBufferedSocket::peekBlock(char *data, Q_ULONG maxlen) +TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen) { if (d->input) { @@ -156,13 +156,13 @@ Q_LONG KBufferedSocket::peekBlock(char *data, Q_ULONG maxlen) return KStreamSocket::peekBlock(data, maxlen); } -Q_LONG KBufferedSocket::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) +TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) { from = peerAddress(); return peekBlock(data, maxlen); } -Q_LONG KBufferedSocket::writeBlock(const char *data, Q_ULONG len) +TQ_LONG KBufferedSocket::writeBlock(const char *data, TQ_ULONG len) { if (state() != Connected) { @@ -192,7 +192,7 @@ Q_LONG KBufferedSocket::writeBlock(const char *data, Q_ULONG len) return KStreamSocket::writeBlock(data, len); } -Q_LONG KBufferedSocket::writeBlock(const char *data, Q_ULONG maxlen, +TQ_LONG KBufferedSocket::writeBlock(const char *data, TQ_ULONG maxlen, const KSocketAddress&) { // ignore the third parameter @@ -285,7 +285,7 @@ KIOBufferBase* KBufferedSocket::outputBuffer() } #ifdef USE_QT3 -Q_ULONG KBufferedSocket::bytesToWrite() const +TQ_ULONG KBufferedSocket::bytesToWrite() const #endif #ifdef USE_QT4 qint64 KBufferedSocket::bytesToWrite() const @@ -332,7 +332,7 @@ void KBufferedSocket::slotReadActivity() if (d->input && state() == Connected) { mutex()->lock(); - Q_LONG len = d->input->receiveFrom(socketDevice()); + TQ_LONG len = d->input->receiveFrom(socketDevice()); if (len == -1) { @@ -380,7 +380,7 @@ void KBufferedSocket::slotWriteActivity() (state() == Connected || state() == Closing)) { mutex()->lock(); - Q_LONG len = d->output->sendTo(socketDevice()); + TQ_LONG len = d->output->sendTo(socketDevice()); if (len == -1) { diff --git a/kdecore/network/kbufferedsocket.h b/kdecore/network/kbufferedsocket.h index bca034002..0982a88d3 100644 --- a/kdecore/network/kbufferedsocket.h +++ b/kdecore/network/kbufferedsocket.h @@ -58,6 +58,7 @@ class KBufferedSocketPrivate; class KDECORE_EXPORT KBufferedSocket: public KStreamSocket { Q_OBJECT + TQ_OBJECT public: /** * Default constructor. @@ -99,7 +100,7 @@ public: * Make use of the buffers. */ #ifdef USE_QT3 - virtual Q_LONG bytesAvailable() const; + virtual TQ_LONG bytesAvailable() const; #endif #ifdef USE_QT4 virtual qint64 bytesAvailable() const; @@ -108,12 +109,12 @@ public: /** * Make use of buffers. */ - virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L); + virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L); /** * Reads data from the socket. Make use of buffers. */ - virtual Q_LONG readBlock(char *data, Q_ULONG maxlen); + virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen); /** * @overload @@ -121,12 +122,12 @@ public: * * The @p from parameter is always set to @ref peerAddress() */ - virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from); + virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from); /** * Peeks data from the socket. */ - virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen); /** * @overload @@ -134,12 +135,12 @@ public: * * The @p from parameter is always set to @ref peerAddress() */ - virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress &from); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from); /** * Writes data to the socket. */ - virtual Q_LONG writeBlock(const char *data, Q_ULONG len); + virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len); /** * @overload @@ -147,7 +148,7 @@ public: * * The @p to parameter is discarded. */ - virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to); + virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to); /** * Catch changes. @@ -183,7 +184,7 @@ public: * Returns the length of the output buffer. */ #ifdef USE_QT3 - virtual Q_ULONG bytesToWrite() const; + virtual TQ_ULONG bytesToWrite() const; #endif #ifdef USE_QT4 virtual qint64 bytesToWrite() const; diff --git a/kdecore/network/kclientsocketbase.cpp b/kdecore/network/kclientsocketbase.cpp index 7ac3ca3b1..46f7a1942 100644 --- a/kdecore/network/kclientsocketbase.cpp +++ b/kdecore/network/kclientsocketbase.cpp @@ -47,9 +47,17 @@ public: bool enableRead : 1, enableWrite : 1; }; -KClientSocketBase::KClientSocketBase(TQObject *parent, const char *name) - : TQObject(parent, name), d(new KClientSocketBasePrivate) +KClientSocketBase::KClientSocketBase(TQObject *parent, const char *name) : +#ifdef USE_QT4 +#else // USE_QT4 + TQObject(parent, name), +#endif // USE_QT4 + d(new KClientSocketBasePrivate) { +#ifdef USE_QT4 + setParent(parent); + setObjectName(name); +#endif // USE_QT4 d->state = Idle; d->enableRead = true; d->enableWrite = false; @@ -140,7 +148,7 @@ bool KClientSocketBase::lookup() { if (d->localResolver.serviceName().isNull() && !d->localResolver.nodeName().isNull()) - d->localResolver.setServiceName(TQString::fromLatin1("")); + d->localResolver.setServiceName(TQString::tqfromLatin1("")); // don't restart the lookups if they had succeeded and // the input values weren't changed @@ -279,7 +287,7 @@ void KClientSocketBase::close() // This function is unlike all the others because it is const #ifdef USE_QT3 -Q_LONG KClientSocketBase::bytesAvailable() const +TQ_LONG KClientSocketBase::bytesAvailable() const #endif #ifdef USE_QT4 qint64 KClientSocketBase::bytesAvailable() const @@ -291,10 +299,10 @@ qint64 KClientSocketBase::bytesAvailable() const // All the functions below look really alike // Should I use a macro to define them? -Q_LONG KClientSocketBase::waitForMore(int msecs, bool *timeout) +TQ_LONG KClientSocketBase::waitForMore(int msecs, bool *timeout) { resetError(); - Q_LONG retval = socketDevice()->waitForMore(msecs, timeout); + TQ_LONG retval = socketDevice()->waitForMore(msecs, timeout); if (retval == -1) { copyError(); @@ -303,10 +311,10 @@ Q_LONG KClientSocketBase::waitForMore(int msecs, bool *timeout) return retval; } -Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen) +TQ_LONG KClientSocketBase::readBlock(char *data, TQ_ULONG maxlen) { resetError(); - Q_LONG retval = socketDevice()->readBlock(data, maxlen); + TQ_LONG retval = socketDevice()->readBlock(data, maxlen); if (retval == -1) { copyError(); @@ -315,10 +323,10 @@ Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen) return retval; } -Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) +TQ_LONG KClientSocketBase::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) { resetError(); - Q_LONG retval = socketDevice()->readBlock(data, maxlen, from); + TQ_LONG retval = socketDevice()->readBlock(data, maxlen, from); if (retval == -1) { copyError(); @@ -327,10 +335,10 @@ Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen, KSocketAddress& return retval; } -Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen) +TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen) { resetError(); - Q_LONG retval = socketDevice()->peekBlock(data, maxlen); + TQ_LONG retval = socketDevice()->peekBlock(data, maxlen); if (retval == -1) { copyError(); @@ -339,10 +347,10 @@ Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen) return retval; } -Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) +TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) { resetError(); - Q_LONG retval = socketDevice()->peekBlock(data, maxlen, from); + TQ_LONG retval = socketDevice()->peekBlock(data, maxlen, from); if (retval == -1) { copyError(); @@ -351,10 +359,10 @@ Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& return retval; } -Q_LONG KClientSocketBase::writeBlock(const char *data, Q_ULONG len) +TQ_LONG KClientSocketBase::writeBlock(const char *data, TQ_ULONG len) { resetError(); - Q_LONG retval = socketDevice()->writeBlock(data, len); + TQ_LONG retval = socketDevice()->writeBlock(data, len); if (retval == -1) { copyError(); @@ -363,10 +371,10 @@ Q_LONG KClientSocketBase::writeBlock(const char *data, Q_ULONG len) return retval; } -Q_LONG KClientSocketBase::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to) +TQ_LONG KClientSocketBase::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to) { resetError(); - Q_LONG retval = socketDevice()->writeBlock(data, len, to); + TQ_LONG retval = socketDevice()->writeBlock(data, len, to); if (retval == -1) { copyError(); diff --git a/kdecore/network/kclientsocketbase.h b/kdecore/network/kclientsocketbase.h index d4e31b6b3..63ddc3aa3 100644 --- a/kdecore/network/kclientsocketbase.h +++ b/kdecore/network/kclientsocketbase.h @@ -32,6 +32,10 @@ #include "kresolver.h" #include +#ifdef Q_MOC_RUN +#define USE_QT4 +#endif // Q_MOC_RUN + namespace KNetwork { class KClientSocketBasePrivate; @@ -46,9 +50,15 @@ class KClientSocketBasePrivate; * * @author Thiago Macieira */ -class KDECORE_EXPORT KClientSocketBase : public TQObject, public KActiveSocketBase +class KDECORE_EXPORT KClientSocketBase : +#ifdef USE_QT4 +#else // USE_QT4 +public TQObject, +#endif // USE_QT4 +public KActiveSocketBase { Q_OBJECT + TQ_OBJECT public: /** @@ -257,7 +267,7 @@ public: * This is a convenience function provided to ease migrating from * Qt 3.x's TQSocket class. */ - inline void connectToHost(const TQString& host, Q_UINT16 port) + inline void connectToHost(const TQString& host, TQ_UINT16 port) { connect(host, TQString::number(port)); } /** @@ -293,7 +303,7 @@ public: * Reimplemented from KSocketBase. */ #ifdef USE_QT3 - virtual Q_LONG bytesAvailable() const; + virtual TQ_LONG bytesAvailable() const; #endif #ifdef USE_QT4 virtual qint64 bytesAvailable() const; @@ -302,40 +312,40 @@ public: /** * Waits for more data. Reimplemented from KSocketBase. */ - virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L); + virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L); /** * Reads data from a socket. Reimplemented from KSocketBase. */ - virtual Q_LONG readBlock(char *data, Q_ULONG maxlen); + virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen); /** * @overload * Reads data from a socket. Reimplemented from KSocketBase. */ - virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from); + virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from); /** * Peeks data from the socket. Reimplemented from KSocketBase. */ - virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen); /** * @overload * Peeks data from the socket. Reimplemented from KSocketBase. */ - virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress &from); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from); /** * Writes data to the socket. Reimplemented from KSocketBase. */ - virtual Q_LONG writeBlock(const char *data, Q_ULONG len); + virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len); /** * @overload * Writes data to the socket. Reimplemented from KSocketBase. */ - virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to); + virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to); /** * Returns the local socket address. Reimplemented from KSocketBase. diff --git a/kdecore/network/kdatagramsocket.cpp b/kdecore/network/kdatagramsocket.cpp index d598d2d14..ff6ea04b3 100644 --- a/kdecore/network/kdatagramsocket.cpp +++ b/kdecore/network/kdatagramsocket.cpp @@ -133,7 +133,7 @@ bool KDatagramSocket::connect(const TQString& node, const TQString& service) KDatagramPacket KDatagramSocket::receive() { - Q_LONG size = bytesAvailable(); + TQ_LONG size = bytesAvailable(); if (size == 0) { // nothing available yet to read @@ -165,12 +165,12 @@ KDatagramPacket KDatagramSocket::receive() return KDatagramPacket(data, address); } -Q_LONG KDatagramSocket::send(const KDatagramPacket& packet) +TQ_LONG KDatagramSocket::send(const KDatagramPacket& packet) { return writeBlock(packet.data(), packet.size(), packet.address()); } -Q_LONG KDatagramSocket::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to) +TQ_LONG KDatagramSocket::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to) { if (to.family() != AF_UNSPEC) { diff --git a/kdecore/network/kdatagramsocket.h b/kdecore/network/kdatagramsocket.h index 6b94c1d42..7ecbada09 100644 --- a/kdecore/network/kdatagramsocket.h +++ b/kdecore/network/kdatagramsocket.h @@ -180,6 +180,7 @@ class KDatagramSocketPrivate; class KDECORE_EXPORT KDatagramSocket: public KClientSocketBase { Q_OBJECT + TQ_OBJECT public: /** @@ -222,7 +223,7 @@ public: * * Connecting means only to designate the given address as the default * destination address for datagrams sent without destination addresses - * ( writeBlock(const char *, Q_ULONG) ). + * ( writeBlock(const char *, TQ_ULONG) ). * * @note Calling connect will not cause the socket to be bound. You have * to call @ref bind explicitly. @@ -240,7 +241,7 @@ public: /** * Writes data to the socket. Reimplemented from KClientSocketBase. */ - virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to); + virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to); /** * Receives one datagram from the stream. The reading process is guaranteed @@ -260,7 +261,7 @@ public: * * @returns the number of bytes written or -1 in case of error. */ - virtual Q_LONG send(const KDatagramPacket& packet); + virtual TQ_LONG send(const KDatagramPacket& packet); private slots: void lookupFinishedLocal(); diff --git a/kdecore/network/khttpproxysocketdevice.cpp b/kdecore/network/khttpproxysocketdevice.cpp index 09d8dd7a5..f4ef01564 100644 --- a/kdecore/network/khttpproxysocketdevice.cpp +++ b/kdecore/network/khttpproxysocketdevice.cpp @@ -153,7 +153,7 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi setState(0); // unset open flag // prepare the request - TQString request = TQString::fromLatin1("CONNECT %1:%2 HTTP/1.1\r\n" + TQString request = TQString::tqfromLatin1("CONNECT %1:%2 HTTP/1.1\r\n" "Cache-Control: no-cache\r\n" "Host: \r\n" "\r\n"); @@ -161,7 +161,7 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi if (node.contains(':')) node2 = '[' + node + ']'; - d->request = request.arg(node2).arg(service).latin1(); + d->request = TQString(request.arg(node2).arg(service)).latin1(); } return parseServerReply(); @@ -179,7 +179,7 @@ bool KHttpProxySocketDevice::parseServerReply() if (!d->request.isEmpty()) { // send request - Q_LONG written = writeBlock(d->request, d->request.length()); + TQ_LONG written = writeBlock(d->request, d->request.length()); if (written < 0) { qDebug("KHttpProxySocketDevice: would block writing request!"); @@ -205,7 +205,7 @@ bool KHttpProxySocketDevice::parseServerReply() int index; if (!blocking()) { - Q_LONG avail = bytesAvailable(); + TQ_LONG avail = bytesAvailable(); qDebug("KHttpProxySocketDevice: %ld bytes available", avail); setState(0); if (avail == 0) @@ -222,7 +222,7 @@ bool KHttpProxySocketDevice::parseServerReply() TQCString fullHeaders = d->reply + buf.data(); // search for the end of the headers - index = fullHeaders.find("\r\n\r\n"); + index = fullHeaders.tqfind("\r\n\r\n"); if (index == -1) { // no, headers not yet finished... @@ -265,9 +265,9 @@ bool KHttpProxySocketDevice::parseServerReply() // now really parse the reply qDebug("KHttpProxySocketDevice: get reply: %s\n", - d->reply.left(d->reply.find('\r')).data()); + d->reply.left(d->reply.tqfind('\r')).data()); if (d->reply.left(7) != "HTTP/1." || - (index = d->reply.find(' ')) == -1 || + (index = d->reply.tqfind(' ')) == -1 || d->reply[index + 1] != '2') { setError(IO_ConnectError, NetFailure); diff --git a/kdecore/network/kiobuffer.h b/kdecore/network/kiobuffer.h index 839899b18..02f75a420 100644 --- a/kdecore/network/kiobuffer.h +++ b/kdecore/network/kiobuffer.h @@ -85,7 +85,7 @@ public: * * @sa size */ - virtual Q_LONG length() const = 0; + virtual TQ_LONG length() const = 0; /** * Returns true if the buffer is empty of data. @@ -99,7 +99,7 @@ public: * * @sa length for the length of the data stored */ - virtual Q_LONG size() const = 0; + virtual TQ_LONG size() const = 0; /** * Returns true if the buffer is full (i.e., cannot receive more data) @@ -114,7 +114,7 @@ public: * @returns true on success, false if an error occurred. * @note if the new size is less than length(), the buffer will be truncated */ - virtual bool setSize(Q_LONG size) = 0; + virtual bool setSize(TQ_LONG size) = 0; /** * Adds data to the end of the buffer. @@ -123,7 +123,7 @@ public: * @param len the data length, in bytes * @returns the number of bytes added to the end of the buffer. */ - virtual Q_LONG feedBuffer(const char *data, Q_LONG len) = 0; + virtual TQ_LONG feedBuffer(const char *data, TQ_LONG len) = 0; /** * Consumes data from the beginning of the buffer. @@ -133,7 +133,7 @@ public: * @param discard if true, the bytes copied will be discarded * @returns the number of bytes copied from the buffer */ - virtual Q_LONG consumeBuffer(char *data, Q_LONG maxlen, bool discard = true) = 0; + virtual TQ_LONG consumeBuffer(char *data, TQ_LONG maxlen, bool discard = true) = 0; /** * Clears the buffer. diff --git a/kdecore/network/kresolver.cpp b/kdecore/network/kresolver.cpp index cfb87e3ef..d58d02cb0 100644 --- a/kdecore/network/kresolver.cpp +++ b/kdecore/network/kresolver.cpp @@ -105,7 +105,7 @@ KResolverEntry::KResolverEntry(const KSocketAddress& addr, int socktype, int pro } // constructor with even more stuff -KResolverEntry::KResolverEntry(const struct sockaddr* sa, Q_UINT16 salen, int socktype, +KResolverEntry::KResolverEntry(const struct sockaddr* sa, TQ_UINT16 salen, int socktype, int protocol, const TQString& canonName, const TQCString& encodedName) : d(new KResolverEntryPrivate) @@ -141,7 +141,7 @@ KSocketAddress KResolverEntry::address() const } // returns the length -Q_UINT16 KResolverEntry::length() const +TQ_UINT16 KResolverEntry::length() const { return d ? d->addr.length() : 0; } @@ -587,7 +587,7 @@ KResolverResults KResolver::resolve(const TQString& host, const TQString& service, int flags, int families) { - KResolver qres(host, service, qApp, "synchronous KResolver"); + KResolver qres(host, service, TQT_TQOBJECT(tqApp), "synchronous KResolver"); qres.setFlags(flags); qres.setFamily(families); qres.start(); @@ -599,7 +599,7 @@ bool KResolver::resolveAsync(TQObject* userObj, const char *userSlot, const TQString& host, const TQString& service, int flags, int families) { - KResolver* qres = new KResolver(host, service, qApp, "asynchronous KResolver"); + KResolver* qres = new KResolver(host, service, TQT_TQOBJECT(tqApp), "asynchronous KResolver"); TQObject::connect(qres, TQT_SIGNAL(finished(KResolverResults)), userObj, userSlot); qres->setFlags(flags); qres->setFamily(families); @@ -915,16 +915,16 @@ TQString KResolver::localHostName() } if (name.isEmpty()) - return TQString::fromLatin1("localhost"); + return TQString::tqfromLatin1("localhost"); - if (name.find('.') == -1) + if (name.tqfind('.') == -1) { // not fully qualified // must resolve KResolverResults results = resolve(name, "0", CanonName); if (results.isEmpty()) // cannot find a valid hostname! - return TQString::fromLatin1("localhost"); + return TQString::tqfromLatin1("localhost"); else return results.first().canonicalName(); } @@ -934,7 +934,7 @@ TQString KResolver::localHostName() // forward declaration -static TQStringList splitLabels(const TQString& unicodeDomain); +static TQStringList splitLabels(const TQString& tqunicodeDomain); static TQCString ToASCII(const TQString& label); static TQString ToUnicode(const TQString& label); @@ -943,11 +943,11 @@ static TQStringList *KResolver_initIdnDomains() const char *kde_use_idn = getenv("KDE_USE_IDN"); if (!kde_use_idn) kde_use_idn = "ac:at:br:cat:ch:cl:cn:de:dk:fi:gr:hu:info:io:is:jp:kr:li:lt:museum:org:no:se:sh:th:tm:tw:vn"; - return new TQStringList(TQStringList::split(':', TQString::fromLatin1(kde_use_idn).lower())); + return new TQStringList(TQStringList::split(':', TQString::tqfromLatin1(kde_use_idn).lower())); } // implement the ToAscii function, as described by IDN documents -TQCString KResolver::domainToAscii(const TQString& unicodeDomain) +TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) { if (!idnDomains) idnDomains = KResolver_initIdnDomains(); @@ -958,10 +958,10 @@ TQCString KResolver::domainToAscii(const TQString& unicodeDomain) // 2) split the domain into individual labels, without // separators. - TQStringList input = splitLabels(unicodeDomain); + TQStringList input = splitLabels(tqunicodeDomain); // Do we allow IDN names for this TLD? - if (input.count() && !idnDomains->contains(input[input.count()-1].lower())) + if (input.count() && !idnDomains->tqcontains(input[input.count()-1].lower())) return input.join(".").lower().latin1(); // No IDN allowed for this TLD // 3) decide whether to enforce the STD3 rules for chars < 0x7F @@ -987,7 +987,7 @@ TQCString KResolver::domainToAscii(const TQString& unicodeDomain) TQString KResolver::domainToUnicode(const TQCString& asciiDomain) { - return domainToUnicode(TQString::fromLatin1(asciiDomain)); + return domainToUnicode(TQString::tqfromLatin1(asciiDomain)); } // implement the ToUnicode function, as described by IDN documents @@ -1009,7 +1009,7 @@ TQString KResolver::domainToUnicode(const TQString& asciiDomain) TQStringList input = splitLabels(asciiDomain); // Do we allow IDN names for this TLD? - if (input.count() && !idnDomains->contains(input[input.count()-1].lower())) + if (input.count() && !idnDomains->tqcontains(input[input.count()-1].lower())) return asciiDomain.lower(); // No TLDs allowed // 3) decide whether to enforce the STD3 rules for chars < 0x7F @@ -1048,7 +1048,7 @@ void KResolver::virtual_hook( int, void* ) // RFC 3492 - Punycode: A Bootstring encoding of Unicode // for Internationalized Domain Names in Applications (IDNA) -static TQStringList splitLabels(const TQString& unicodeDomain) +static TQStringList splitLabels(const TQString& tqunicodeDomain) { // From RFC 3490 section 3.1: // "Whenever dots are used as label separators, the following characters @@ -1060,9 +1060,9 @@ static TQStringList splitLabels(const TQString& unicodeDomain) TQStringList lst; int start = 0; uint i; - for (i = 0; i < unicodeDomain.length(); i++) + for (i = 0; i < tqunicodeDomain.length(); i++) { - unsigned int c = unicodeDomain[i].unicode(); + unsigned int c = tqunicodeDomain[i].tqunicode(); if (c == separators[0] || c == separators[1] || @@ -1070,13 +1070,13 @@ static TQStringList splitLabels(const TQString& unicodeDomain) c == separators[3]) { // found a separator! - lst << unicodeDomain.mid(start, i - start); + lst << tqunicodeDomain.mid(start, i - start); start = i + 1; } } if ((long)i >= start) // there is still one left - lst << unicodeDomain.mid(start, i - start); + lst << tqunicodeDomain.mid(start, i - start); return lst; } @@ -1097,11 +1097,11 @@ static TQCString ToASCII(const TQString& label) TQCString retval; char buf[65]; - Q_UINT32* ucs4 = new Q_UINT32[label.length() + 1]; + TQ_UINT32* ucs4 = new TQ_UINT32[label.length() + 1]; uint i; for (i = 0; i < label.length(); i++) - ucs4[i] = (unsigned long)label[i].unicode(); + ucs4[i] = (unsigned long)label[i].tqunicode(); ucs4[i] = 0; // terminate with NUL, just to be on the safe side if (idna_to_ascii_4i(ucs4, label.length(), buf, 0) == IDNA_SUCCESS) @@ -1118,18 +1118,18 @@ static TQCString ToASCII(const TQString& label) static TQString ToUnicode(const TQString& label) { #ifdef HAVE_IDNA_H - // We have idna.h, so we can use the idna_to_unicode + // We have idna.h, so we can use the idna_to_tqunicode // function :) - Q_UINT32 *ucs4_input, *ucs4_output; + TQ_UINT32 *ucs4_input, *ucs4_output; size_t outlen; - ucs4_input = new Q_UINT32[label.length() + 1]; + ucs4_input = new TQ_UINT32[label.length() + 1]; for (uint i = 0; i < label.length(); i++) - ucs4_input[i] = (unsigned long)label[i].unicode(); + ucs4_input[i] = (unsigned long)label[i].tqunicode(); // try the same length for output - ucs4_output = new Q_UINT32[outlen = label.length()]; + ucs4_output = new TQ_UINT32[outlen = label.length()]; idna_to_unicode_44i(ucs4_input, label.length(), ucs4_output, &outlen, @@ -1139,7 +1139,7 @@ static TQString ToUnicode(const TQString& label) { // it must have failed delete [] ucs4_output; - ucs4_output = new Q_UINT32[outlen]; + ucs4_output = new TQ_UINT32[outlen]; idna_to_unicode_44i(ucs4_input, label.length(), ucs4_output, &outlen, diff --git a/kdecore/network/kresolver.h b/kdecore/network/kresolver.h index 5b66f362c..069428904 100644 --- a/kdecore/network/kresolver.h +++ b/kdecore/network/kresolver.h @@ -101,7 +101,7 @@ public: * @param canonName the canonical name of the resolved hostname * @param encodedName the ASCII-compatible encoding of the hostname */ - KResolverEntry(const struct sockaddr *sa, Q_UINT16 salen, int socktype, + KResolverEntry(const struct sockaddr *sa, TQ_UINT16 salen, int socktype, int protocol, const TQString& canonName = TQString::null, const TQCString& encodedName = TQCString()); @@ -128,7 +128,7 @@ public: /** * Retrieves the length of the socket address structure. */ - Q_UINT16 length() const; + TQ_UINT16 length() const; /** * Retrieves the family associated with this socket address. @@ -292,9 +292,10 @@ class KResolverPrivate; * * @author Thiago Macieira */ -class KDECORE_EXPORT KResolver: public QObject +class KDECORE_EXPORT KResolver: public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -795,11 +796,11 @@ public: * Note that the encoding is illegible and, thus, should not be presented * to the user, except if requested. * - * @param unicodeDomain the domain name to be encoded + * @param tqunicodeDomain the domain name to be encoded * @return the ACE-encoded suitable for DNS queries if successful, a null * TQCString if failure. */ - static TQCString domainToAscii(const TQString& unicodeDomain); + static TQCString domainToAscii(const TQString& tqunicodeDomain); /** * Does the inverse of @ref domainToAscii and return an Unicode domain diff --git a/kdecore/network/kresolver_p.h b/kdecore/network/kresolver_p.h index e29304383..7f74c6fe6 100644 --- a/kdecore/network/kresolver_p.h +++ b/kdecore/network/kresolver_p.h @@ -326,7 +326,7 @@ namespace KNetwork * This class is a worker thread in the resolver system. * This class must be thread-safe. */ - class KResolverThread: public QThread + class KResolverThread: public TQThread { private: // private constructor. Only the manager can create worker threads diff --git a/kdecore/network/kresolverstandardworkers.cpp b/kdecore/network/kresolverstandardworkers.cpp index f64803ced..08bd57121 100644 --- a/kdecore/network/kresolverstandardworkers.cpp +++ b/kdecore/network/kresolverstandardworkers.cpp @@ -140,7 +140,7 @@ bool KBlacklistWorker::isBlacklisted(const TQString& host) return false; // KDE4: QLatin1String - TQString ascii = TQString::fromLatin1(KResolver::domainToAscii(host)); + TQString ascii = TQString::tqfromLatin1(KResolver::domainToAscii(host)); TQMutexLocker locker(&blacklistMutex); @@ -208,12 +208,12 @@ namespace { public: TQCString m_hostname; // might be different! - Q_UINT16 m_port; + TQ_UINT16 m_port; int m_scopeid; int m_af; KResolverResults& results; - GetHostByNameThread(const char * hostname, Q_UINT16 port, + GetHostByNameThread(const char * hostname, TQ_UINT16 port, int scopeid, int af, KResolverResults* res) : m_hostname(hostname), m_port(port), m_scopeid(scopeid), m_af(af), results(*res) @@ -251,7 +251,7 @@ namespace // check blacklist if (m_af != AF_INET && - KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_hostname))) + KBlacklistWorker::isBlacklisted(TQString::tqfromLatin1(m_hostname))) break; # ifdef USE_GETHOSTBYNAME2_R @@ -358,7 +358,7 @@ namespace if (socktype == 0) socktype = SOCK_STREAM; // default - TQString canon = KResolver::domainToUnicode(TQString::fromLatin1(he->h_name)); + TQString canon = KResolver::domainToUnicode(TQString::tqfromLatin1(he->h_name)); KInetSocketAddress sa; sa.setPort(m_port); if (he->h_addrtype != AF_INET) @@ -404,7 +404,7 @@ namespace { // check blacklist if ((m_af != AF_INET && m_af != AF_UNSPEC) && - KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_node))) + KBlacklistWorker::isBlacklisted(TQString::tqfromLatin1(m_node))) { results.setError(KResolver::NoName); finished(); @@ -547,11 +547,11 @@ bool KStandardWorker::sanityCheck() if (!nodeName().isEmpty()) { TQString node = nodeName(); - if (node.find('%') != -1) - node.truncate(node.find('%')); + if (node.tqfind('%') != -1) + node.truncate(node.tqfind('%')); - if (node.isEmpty() || node == TQString::fromLatin1("*") || - node == TQString::fromLatin1("localhost")) + if (node.isEmpty() || node == TQString::tqfromLatin1("*") || + node == TQString::tqfromLatin1("localhost")) m_encodedName.truncate(0); else { @@ -584,7 +584,7 @@ bool KStandardWorker::resolveScopeId() { // we must test the original name, not the encoded one scopeid = 0; - int pos = nodeName().findRev('%'); + int pos = nodeName().tqfindRev('%'); if (pos == -1) return true; @@ -616,7 +616,7 @@ bool KStandardWorker::resolveService() // service name does not contain a port number // must be a name - if (serviceName().isEmpty() || serviceName().compare(TQString::fromLatin1("*")) == 0) + if (serviceName().isEmpty() || serviceName().compare(TQString::tqfromLatin1("*")) == 0) port = 0; else { @@ -648,7 +648,7 @@ bool KStandardWorker::resolveService() } // it worked, we have a port number - port = (Q_UINT16)result; + port = (TQ_UINT16)result; } } @@ -667,7 +667,7 @@ KResolver::ErrorCodes KStandardWorker::addUnix() if (!m_encodedName.isEmpty()) return KResolver::AddrFamily; // non local hostname - if (protocol() || protocolName()) + if (protocol() || static_cast(protocolName())) return KResolver::BadFlags; // cannot have Unix sockets with protocols TQString pathname = serviceName(); @@ -712,7 +712,7 @@ bool KStandardWorker::resolveNumerically() // now try to resolve the hostname numerically KInetSocketAddress sa; setError(KResolver::NoError); - sa.setHost(KIpAddress(TQString::fromLatin1(m_encodedName))); + sa.setHost(KIpAddress(TQString::tqfromLatin1(m_encodedName))); // if it failed, the length was reset to 0 bool ok = sa.length() != 0; diff --git a/kdecore/network/kresolverstandardworkers_p.h b/kdecore/network/kresolverstandardworkers_p.h index 310849bf3..2db460bef 100644 --- a/kdecore/network/kresolverstandardworkers_p.h +++ b/kdecore/network/kresolverstandardworkers_p.h @@ -66,7 +66,7 @@ namespace KNetwork { namespace Internal { protected: mutable TQCString m_encodedName; - Q_UINT16 port; + TQ_UINT16 port; int scopeid; TQPtrList resultList; diff --git a/kdecore/network/kreverseresolver.cpp b/kdecore/network/kreverseresolver.cpp index 639f6dbe4..00ef7f81d 100644 --- a/kdecore/network/kreverseresolver.cpp +++ b/kdecore/network/kreverseresolver.cpp @@ -78,7 +78,7 @@ namespace bool success; }; - class KReverseResolverEvent: public QEvent + class KReverseResolverEvent: public TQEvent { public: static const int myType = TQEvent::User + 63; // arbitrary value @@ -203,7 +203,7 @@ bool KReverseResolver::resolve(const KSocketAddress& addr, TQString& node, return false; } -bool KReverseResolver::resolve(const struct sockaddr* sa, Q_UINT16 salen, +bool KReverseResolver::resolve(const struct sockaddr* sa, TQ_UINT16 salen, TQString& node, TQString& serv, int flags) { return resolve(KSocketAddress(sa, salen), node, serv, flags); @@ -238,8 +238,8 @@ bool ReverseThread::run() if (err == 0) { - node = KResolver::domainToUnicode(TQString::fromLatin1(h)); - service = TQString::fromLatin1(s); + node = KResolver::domainToUnicode(TQString::tqfromLatin1(h)); + service = TQString::tqfromLatin1(s); success = true; } else diff --git a/kdecore/network/kreverseresolver.h b/kdecore/network/kreverseresolver.h index 26274e586..1f26f4a2a 100644 --- a/kdecore/network/kreverseresolver.h +++ b/kdecore/network/kreverseresolver.h @@ -47,9 +47,10 @@ class KReverseResolverPrivate; * * @author Thiago Macieira */ -class KDECORE_EXPORT KReverseResolver: public QObject +class KDECORE_EXPORT KReverseResolver: public TQObject { Q_OBJECT + TQ_OBJECT public: /** @@ -183,7 +184,7 @@ public: * @return true if the resolution succeeded, false if not * @see ReverseFlags for the possible values for @p flags */ - static bool resolve(const struct sockaddr* sa, Q_UINT16 salen, + static bool resolve(const struct sockaddr* sa, TQ_UINT16 salen, TQString& node, TQString& serv, int flags = 0); private: diff --git a/kdecore/network/kserversocket.cpp b/kdecore/network/kserversocket.cpp index 49facb12c..bd63d6306 100644 --- a/kdecore/network/kserversocket.cpp +++ b/kdecore/network/kserversocket.cpp @@ -155,7 +155,7 @@ bool KServerSocket::lookup() // make sure we have at least one parameter for lookup if (d->resolver.serviceName().isNull() && !d->resolver.nodeName().isNull()) - d->resolver.setServiceName(TQString::fromLatin1("")); + d->resolver.setServiceName(TQString::tqfromLatin1("")); // don't restart the lookups if they had succeeded and // the input values weren't changed diff --git a/kdecore/network/kserversocket.h b/kdecore/network/kserversocket.h index 30d8b40b0..a07ed54a1 100644 --- a/kdecore/network/kserversocket.h +++ b/kdecore/network/kserversocket.h @@ -107,6 +107,7 @@ class KServerSocketPrivate; class KDECORE_EXPORT KServerSocket: public TQObject, public KPassiveSocketBase { Q_OBJECT + TQ_OBJECT public: /** * Default constructor. diff --git a/kdecore/network/ksocketaddress.cpp b/kdecore/network/ksocketaddress.cpp index adfc76b06..a6fd14cf5 100644 --- a/kdecore/network/ksocketaddress.cpp +++ b/kdecore/network/ksocketaddress.cpp @@ -74,7 +74,7 @@ const KIpAddress KIpAddress::anyhostV4(0L, 4); const KIpAddress KIpAddress::anyhostV6(0L, 6); // helper function to test if an IPv6 v4-mapped address is equal to its IPv4 counterpart -static bool check_v4mapped(const Q_UINT32* v6addr, Q_UINT32 v4addr) +static bool check_v4mapped(const TQ_UINT32* v6addr, TQ_UINT32 v4addr) { // check that the v6 is a v4-mapped address if (!(v6addr[0] == 0 && v6addr[1] == 0 && v6addr[2] == htonl(0x0000ffff))) @@ -131,12 +131,12 @@ bool KIpAddress::setAddress(const TQString& address) m_version = 0; // try to guess the address version - if (address.find(':') != -1) + if (address.tqfind(':') != -1) { #ifdef AF_INET6 // guessing IPv6 - Q_UINT32 buf[4]; + TQ_UINT32 buf[4]; if (inet_pton(AF_INET6, address.latin1(), buf)) { memcpy(m_data, buf, sizeof(m_data)); @@ -149,7 +149,7 @@ bool KIpAddress::setAddress(const TQString& address) } else { - Q_UINT32 buf; + TQ_UINT32 buf; if (inet_pton(AF_INET, address.latin1(), &buf)) { *m_data = buf; @@ -165,7 +165,7 @@ bool KIpAddress::setAddress(const TQString& address) bool KIpAddress::setAddress(const char* address) { - return setAddress(TQString::fromLatin1(address)); + return setAddress(TQString::tqfromLatin1(address)); } // set from binary data @@ -194,21 +194,21 @@ TQString KIpAddress::toString() const { case 4: inet_ntop(AF_INET, m_data, buf, sizeof(buf) - 1); - return TQString::fromLatin1(buf); + return TQString::tqfromLatin1(buf); case 6: #ifdef AF_INET6 inet_ntop(AF_INET6, m_data, buf, sizeof(buf) - 1); #endif - return TQString::fromLatin1(buf); + return TQString::tqfromLatin1(buf); } return TQString::null; } -Q_UINT32 KIpAddress::hostIPv4Addr(bool convertMapped) const +TQ_UINT32 KIpAddress::hostIPv4Addr(bool convertMapped) const { - Q_UINT32 addr = IPv4Addr(convertMapped); + TQ_UINT32 addr = IPv4Addr(convertMapped); return ntohl(addr); } @@ -219,23 +219,23 @@ Q_UINT32 KIpAddress::hostIPv4Addr(bool convertMapped) const struct our_sockaddr_in6 { # ifdef HAVE_STRUCT_SOCKADDR_SA_LEN - Q_UINT8 sin6_len; - Q_UINT8 sin6_family; + TQ_UINT8 sin6_len; + TQ_UINT8 sin6_family; # else //!HAVE_STRUCT_SOCKADDR_SA_LEN - Q_UINT16 sin6_family; + TQ_UINT16 sin6_family; # endif - Q_UINT16 sin6_port; /* RFC says in_port_t */ - Q_UINT32 sin6_flowinfo; - Q_UINT8 sin6_addr[16]; // 24 bytes up to here - Q_UINT32 sin6_scope_id; // 28 bytes total + TQ_UINT16 sin6_port; /* RFC says in_port_t */ + TQ_UINT32 sin6_flowinfo; + TQ_UINT8 sin6_addr[16]; // 24 bytes up to here + TQ_UINT32 sin6_scope_id; // 28 bytes total }; // useful definitions -#define MIN_SOCKADDR_LEN sizeof(Q_UINT16) +#define MIN_SOCKADDR_LEN sizeof(TQ_UINT16) #define SOCKADDR_IN_LEN sizeof(sockaddr_in) #define MIN_SOCKADDR_IN6_LEN ((unsigned long) &(((our_sockaddr_in6*)0)->sin6_scope_id)) #define SOCKADDR_IN6_LEN sizeof(our_sockaddr_in6) -#define MIN_SOCKADDR_UN_LEN (sizeof(Q_UINT16) + sizeof(char)) +#define MIN_SOCKADDR_UN_LEN (sizeof(TQ_UINT16) + sizeof(char)) class KNetwork::KSocketAddressData @@ -263,14 +263,14 @@ public: struct our_sockaddr_in6 *in6; struct sockaddr_un *un; } addr; - Q_UINT16 curlen, reallen; + TQ_UINT16 curlen, reallen; KSocketAddressData() : ref(this) { addr.generic = 0L; curlen = 0; - invalidate(); + tqinvalidate(); } ~KSocketAddressData() @@ -282,10 +282,10 @@ public: inline bool invalid() const { return reallen == 0; } - inline void invalidate() + inline void tqinvalidate() { reallen = 0; } - void dup(const sockaddr* sa, Q_UINT16 len, bool clear = true); + void dup(const sockaddr* sa, TQ_UINT16 len, bool clear = true); void makeipv4() { @@ -343,12 +343,12 @@ public: }; // create duplicates of -void KSocketAddressData::dup(const sockaddr* sa, Q_UINT16 len, bool clear) +void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear) { if (len < MIN_SOCKADDR_LEN) { // certainly invalid - invalidate(); + tqinvalidate(); return; } @@ -359,7 +359,7 @@ void KSocketAddressData::dup(const sockaddr* sa, Q_UINT16 len, bool clear) (sa->sa_family == AF_UNIX && len < MIN_SOCKADDR_UN_LEN))) { // also invalid - invalidate(); + tqinvalidate(); return; } @@ -411,7 +411,7 @@ KSocketAddress::KSocketAddress() } // constructor from binary data -KSocketAddress::KSocketAddress(const sockaddr *sa, Q_UINT16 len) +KSocketAddress::KSocketAddress(const sockaddr *sa, TQ_UINT16 len) : d(new KSocketAddressData) { setAddress(sa, len); @@ -444,7 +444,7 @@ KSocketAddress& KSocketAddress::operator =(const KSocketAddress& other) if (other.d && !other.d->invalid()) d->dup(other.d->addr.generic, other.d->reallen); else - d->invalidate(); + d->tqinvalidate(); return *this; } @@ -462,24 +462,24 @@ sockaddr* KSocketAddress::address() return d->addr.generic; } -KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, Q_UINT16 len) +KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len) { if (sa != 0L && len >= MIN_SOCKADDR_LEN) d->dup(sa, len); else - d->invalidate(); + d->tqinvalidate(); return *this; } -Q_UINT16 KSocketAddress::length() const +TQ_UINT16 KSocketAddress::length() const { if (d->invalid()) return 0; return d->reallen; } -KSocketAddress& KSocketAddress::setLength(Q_UINT16 len) +KSocketAddress& KSocketAddress::setLength(TQ_UINT16 len) { d->dup((sockaddr*)0L, len, false); @@ -619,7 +619,7 @@ TQString KSocketAddress::toString() const fmt = "[%1]:%2"; #endif else if (d->addr.generic->sa_family == AF_UNIX) - return TQString::fromLatin1("unix:%1").arg(serviceName()); + return TQString::tqfromLatin1("unix:%1").arg(serviceName()); else return i18n("1: the unknown socket address family number", "Unknown family %1").arg(d->addr.generic->sa_family); @@ -687,7 +687,7 @@ KInetSocketAddress::KInetSocketAddress() } // binary data constructor -KInetSocketAddress::KInetSocketAddress(const sockaddr* sa, Q_UINT16 len) +KInetSocketAddress::KInetSocketAddress(const sockaddr* sa, TQ_UINT16 len) : KSocketAddress(sa, len) { if (!d->invalid()) @@ -695,7 +695,7 @@ KInetSocketAddress::KInetSocketAddress(const sockaddr* sa, Q_UINT16 len) } // create from IP and port -KInetSocketAddress::KInetSocketAddress(const KIpAddress& host, Q_UINT16 port) +KInetSocketAddress::KInetSocketAddress(const KIpAddress& host, TQ_UINT16 port) { setHost(host); setPort(port); @@ -788,14 +788,14 @@ KInetSocketAddress& KInetSocketAddress::setHost(const KIpAddress& ip) default: // empty - d->invalidate(); + d->tqinvalidate(); } return *this; } // returns the port -Q_UINT16 KInetSocketAddress::port() const +TQ_UINT16 KInetSocketAddress::port() const { if (d->invalid()) return 0; @@ -814,7 +814,7 @@ Q_UINT16 KInetSocketAddress::port() const return 0; } -KInetSocketAddress& KInetSocketAddress::setPort(Q_UINT16 port) +KInetSocketAddress& KInetSocketAddress::setPort(TQ_UINT16 port) { if (d->invalid()) makeIPv4(); @@ -832,7 +832,7 @@ KInetSocketAddress& KInetSocketAddress::setPort(Q_UINT16 port) #endif default: - d->invalidate(); // setting the port on something else + d->tqinvalidate(); // setting the port on something else } return *this; @@ -850,7 +850,7 @@ KInetSocketAddress& KInetSocketAddress::makeIPv6() return *this; } -Q_UINT32 KInetSocketAddress::flowinfo() const +TQ_UINT32 KInetSocketAddress::flowinfo() const { #ifndef AF_INET6 return 0; @@ -862,7 +862,7 @@ Q_UINT32 KInetSocketAddress::flowinfo() const #endif } -KInetSocketAddress& KInetSocketAddress::setFlowinfo(Q_UINT32 flowinfo) +KInetSocketAddress& KInetSocketAddress::setFlowinfo(TQ_UINT32 flowinfo) { makeIPv6(); // must set here d->addr.in6->sin6_flowinfo = flowinfo; @@ -897,18 +897,18 @@ void KInetSocketAddress::update() return; #endif else - d->invalidate(); + d->tqinvalidate(); } KUnixSocketAddress::KUnixSocketAddress() { } -KUnixSocketAddress::KUnixSocketAddress(const sockaddr* sa, Q_UINT16 len) +KUnixSocketAddress::KUnixSocketAddress(const sockaddr* sa, TQ_UINT16 len) : KSocketAddress(sa, len) { if (!d->invalid() && d->addr.un->sun_family != AF_UNIX) - d->invalidate(); + d->tqinvalidate(); } KUnixSocketAddress::KUnixSocketAddress(const KUnixSocketAddress& other) diff --git a/kdecore/network/ksocketaddress.h b/kdecore/network/ksocketaddress.h index 6889527e3..75deb60ae 100644 --- a/kdecore/network/ksocketaddress.h +++ b/kdecore/network/ksocketaddress.h @@ -119,7 +119,7 @@ public: * * @param ip4addr the IPv4 address */ - inline KIpAddress(Q_UINT32 ip4addr) + inline KIpAddress(TQ_UINT32 ip4addr) { setAddress(&ip4addr, 4); } /** @@ -232,7 +232,7 @@ public: * system's in_addr type. * */ - inline Q_UINT32 IPv4Addr(bool convertMapped = true) const + inline TQ_UINT32 IPv4Addr(bool convertMapped = true) const { return (convertMapped && isV4Mapped()) ? m_data[3] : m_data[0]; } @@ -245,7 +245,7 @@ public: * valid. The address returned is in host byte order. * */ - Q_UINT32 hostIPv4Addr(bool convertMapped = true) const; + TQ_UINT32 hostIPv4Addr(bool convertMapped = true) const; public: /*-- tests --*/ @@ -310,7 +310,7 @@ public: inline bool isMulticast() const { if (version() == 4) return isClassD(); - if (version() == 6) return ((Q_UINT8*)addr())[0] == 0xff; + if (version() == 6) return ((TQ_UINT8*)addr())[0] == 0xff; return false; } @@ -320,7 +320,7 @@ public: inline bool isLinkLocal() const { if (version() != 6) return false; - Q_UINT8* addr = (Q_UINT8*)this->addr(); + TQ_UINT8* addr = (TQ_UINT8*)this->addr(); return (addr[0] & 0xff) == 0xfe && (addr[1] & 0xc0) == 0x80; } @@ -331,7 +331,7 @@ public: inline bool isSiteLocal() const { if (version() != 6) return false; - Q_UINT8* addr = (Q_UINT8*)this->addr(); + TQ_UINT8* addr = (TQ_UINT8*)this->addr(); return (addr[0] & 0xff) == 0xfe && (addr[1] & 0xc0) == 0xc0; } @@ -348,10 +348,10 @@ public: inline bool isV4Mapped() const { if (version() != 6) return false; - Q_UINT32* addr = (Q_UINT32*)this->addr(); + TQ_UINT32* addr = (TQ_UINT32*)this->addr(); return addr[0] == 0 && addr[1] == 0 && - ((Q_UINT16*)&addr[2])[0] == 0 && - ((Q_UINT16*)&addr[2])[1] == 0xffff; + ((TQ_UINT16*)&addr[2])[0] == 0 && + ((TQ_UINT16*)&addr[2])[1] == 0xffff; } /** @@ -360,7 +360,7 @@ public: inline bool isV4Compat() const { if (version() != 6 || isLocalhost()) return false; - Q_UINT32* addr = (Q_UINT32*)this->addr(); + TQ_UINT32* addr = (TQ_UINT32*)this->addr(); return addr[0] == 0 && addr[1] == 0 && addr[2] == 0 && addr[3] != 0; } @@ -368,34 +368,34 @@ public: * Returns true if this is an IPv6 node-local multicast address. */ inline bool isMulticastNodeLocal() const - { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x1; } + { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x1; } /** * Returns true if this is an IPv6 link-local multicast address. */ inline bool isMulticastLinkLocal() const - { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x2; } + { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x2; } /** * Returns true if this is an IPv6 site-local multicast address. */ inline bool isMulticastSiteLocal() const - { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x5; } + { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x5; } /** * Returns true if this is an IPv6 organisational-local multicast address. */ inline bool isMulticastOrgLocal() const - { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x8; } + { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x8; } /** * Returns true if this is an IPv6 global multicast address. */ inline bool isMulticastGlobal() const - { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0xe; } + { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0xe; } protected: - Q_UINT32 m_data[4]; // 16 bytes, needed for an IPv6 address + TQ_UINT32 m_data[4]; // 16 bytes, needed for an IPv6 address char m_version; @@ -437,7 +437,7 @@ public: * @param sa the socket address structure * @param len the socket address length */ - KSocketAddress(const sockaddr* sa, Q_UINT16 len); + KSocketAddress(const sockaddr* sa, TQ_UINT16 len); /** * Copy constructor. This creates a copy of the other @@ -490,7 +490,7 @@ public: * @param sa the socket address structure * @param len the socket address length */ - KSocketAddress& setAddress(const sockaddr *sa, Q_UINT16 len); + KSocketAddress& setAddress(const sockaddr *sa, TQ_UINT16 len); /** * Returns the socket address structure, to be passed down to @@ -502,7 +502,7 @@ public: /** * Returns the length of this socket address structure. */ - Q_UINT16 length() const; + TQ_UINT16 length() const; /** * Sets the length of this socket structure. @@ -511,7 +511,7 @@ public: * buffer to fit needs. This function should not be used except for handling * unknown socket address structures. * - * Also note that this function may invalidate the socket if a known + * Also note that this function may tqinvalidate the socket if a known * family is set (Internet or Unix socket) and the new length would be * too small to hold the system's sockaddr_* structure. If unsure, reset * the family: @@ -524,7 +524,7 @@ public: * * @param len the new length */ - KSocketAddress& setLength(Q_UINT16 len); + KSocketAddress& setLength(TQ_UINT16 len); /** * Returns the family of this address. @@ -535,7 +535,7 @@ public: /** * Sets the family of this object. * - * Note: setting the family will probably invalidate any address data + * Note: setting the family will probably tqinvalidate any address data * contained in this object. Use this function with care. * * @param family the new family to set @@ -666,7 +666,7 @@ public: * @param sa the sockaddr structure * @param len the structure's length */ - KInetSocketAddress(const sockaddr* sa, Q_UINT16 len); + KInetSocketAddress(const sockaddr* sa, TQ_UINT16 len); /** * Creates an object from an IP address and port. @@ -674,7 +674,7 @@ public: * @param host the IP address * @param port the port number */ - KInetSocketAddress(const KIpAddress& host, Q_UINT16 port); + KInetSocketAddress(const KIpAddress& host, TQ_UINT16 port); /** * Copy constructor. @@ -750,7 +750,7 @@ public: * @return a port number in the range 0 to 65535, inclusive. An empty or * invalid object will have a port number of 0. */ - Q_UINT16 port() const; + TQ_UINT16 port() const; /** * Sets the port number. If this object is empty, this function will default to @@ -759,7 +759,7 @@ public: * @param port the port number to set * @return a reference to itself */ - KInetSocketAddress& setPort(Q_UINT16 port); + KInetSocketAddress& setPort(TQ_UINT16 port); /** * Converts this object to an IPv4 socket address. It has no effect if the object @@ -787,7 +787,7 @@ public: * * @return the flowinfo information or 0 if this object is empty or IPv4 */ - Q_UINT32 flowinfo() const; + TQ_UINT32 flowinfo() const; /** * Sets the flowinfo information for an IPv6 socket address. If this is not @@ -796,7 +796,7 @@ public: * @param flowinfo the flowinfo to set * @return a reference to itself */ - KInetSocketAddress& setFlowinfo(Q_UINT32 flowinfo); + KInetSocketAddress& setFlowinfo(TQ_UINT32 flowinfo); /** * Returns the scope id this IPv6 socket is bound to. @@ -854,7 +854,7 @@ public: * @param sa the socket address structure * @param len the structure's length */ - KUnixSocketAddress(const sockaddr* sa, Q_UINT16 len); + KUnixSocketAddress(const sockaddr* sa, TQ_UINT16 len); /** * Copy constructor. Creates a copy of the other object, diff --git a/kdecore/network/ksocketbase.cpp b/kdecore/network/ksocketbase.cpp index 9071eea0e..1a486ee16 100644 --- a/kdecore/network/ksocketbase.cpp +++ b/kdecore/network/ksocketbase.cpp @@ -309,7 +309,7 @@ int KActiveSocketBase::putch(int ch) void KActiveSocketBase::setError(int status, SocketError error) { KSocketBase::setError(error); - setStatus(status); + setqStatus(status); } void KActiveSocketBase::resetError() diff --git a/kdecore/network/ksocketbase.h b/kdecore/network/ksocketbase.h index 133086114..b7df0c35f 100644 --- a/kdecore/network/ksocketbase.h +++ b/kdecore/network/ksocketbase.h @@ -504,7 +504,11 @@ public: * This call is not supported on sockets. Reimplemented from TQIODevice. * This will always return 0. */ +#ifdef USE_QT4 + virtual qint64 size() const +#else // USE_QT4 virtual Offset size() const +#endif // USE_QT4 { return 0; } /** @@ -533,7 +537,7 @@ public: * blocking. */ #ifdef USE_QT3 - virtual Q_LONG bytesAvailable() const = 0; + virtual TQ_LONG bytesAvailable() const = 0; #endif #ifdef USE_QT4 virtual qint64 bytesAvailable() const = 0; @@ -550,7 +554,7 @@ public: * * @returns the number of bytes available */ - virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L) = 0; + virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L) = 0; /** * Reads data from the socket. @@ -558,7 +562,7 @@ public: * Reimplemented from TQIODevice. See TQIODevice::readBlock for * more information. */ - virtual Q_LONG readBlock(char *data, Q_ULONG len) = 0; + virtual TQ_LONG readBlock(char *data, TQ_ULONG len) = 0; /** @overload * Receives data and the source address. @@ -571,7 +575,7 @@ public: * @param from the address of the sender will be stored here * @returns the actual number of bytes read */ - virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) = 0; + virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) = 0; /** * Peeks the data in the socket. @@ -584,7 +588,7 @@ public: * @param maxlen the maximum number of bytes to peek * @returns the actual number of bytes copied into @p data */ - virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen) = 0; + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen) = 0; /** @overload * Peeks the data in the socket and the source address. @@ -598,7 +602,7 @@ public: * @param from the address of the sender will be stored here * @returns the actual number of bytes copied into @p data */ - virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) = 0; + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) = 0; /** * Writes the given data to the socket. @@ -606,7 +610,7 @@ public: * Reimplemented from TQIODevice. See TQIODevice::writeBlock for * more information. */ - virtual Q_LONG writeBlock(const char *data, Q_ULONG len) = 0; + virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len) = 0; /** @overload * Writes the given data to the destination address. @@ -619,7 +623,7 @@ public: * @param to the address to send to * @returns the number of bytes actually sent */ - virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to) = 0; + virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to) = 0; /** * Reads one character from the socket. diff --git a/kdecore/network/ksocketbuffer.cpp b/kdecore/network/ksocketbuffer.cpp index 18c926c83..4ea12ed14 100644 --- a/kdecore/network/ksocketbuffer.cpp +++ b/kdecore/network/ksocketbuffer.cpp @@ -33,7 +33,7 @@ using namespace KNetwork; using namespace KNetwork::Internal; -KSocketBuffer::KSocketBuffer(Q_LONG size) +KSocketBuffer::KSocketBuffer(TQ_LONG size) : m_mutex(true), m_offset(0), m_size(size), m_length(0) { } @@ -75,9 +75,9 @@ bool KSocketBuffer::canReadLine() const // walk the buffer for ( ; it != end; ++it) { - if ((*it).find('\n', offset) != -1) + if ((*it).tqfind('\n', offset) != -1) return true; - if ((*it).find('\r', offset) != -1) + if ((*it).tqfind('\r', offset) != -1) return true; offset = 0; } @@ -101,7 +101,7 @@ TQCString KSocketBuffer::readLine() // walk the buffer for ( ; it != end; ++it) { - int posnl = (*it).find('\n', offset); + int posnl = (*it).tqfind('\n', offset); if (posnl == -1) { // not found in this one @@ -120,17 +120,17 @@ TQCString KSocketBuffer::readLine() return result; } -Q_LONG KSocketBuffer::length() const +TQ_LONG KSocketBuffer::length() const { return m_length; } -Q_LONG KSocketBuffer::size() const +TQ_LONG KSocketBuffer::size() const { return m_size; } -bool KSocketBuffer::setSize(Q_LONG size) +bool KSocketBuffer::setSize(TQ_LONG size) { m_size = size; if (size == -1 || m_length < m_size) @@ -147,7 +147,7 @@ bool KSocketBuffer::setSize(Q_LONG size) return (m_length - m_size) == consumeBuffer(0L, m_length - m_size, true); } -Q_LONG KSocketBuffer::feedBuffer(const char *data, Q_LONG len) +TQ_LONG KSocketBuffer::feedBuffer(const char *data, TQ_LONG len) { if (data == 0L || len == 0) return 0; // nothing to write @@ -168,7 +168,7 @@ Q_LONG KSocketBuffer::feedBuffer(const char *data, Q_LONG len) return len; } -Q_LONG KSocketBuffer::consumeBuffer(char *destbuffer, Q_LONG maxlen, bool discard) +TQ_LONG KSocketBuffer::consumeBuffer(char *destbuffer, TQ_LONG maxlen, bool discard) { if (maxlen == 0 || isEmpty()) return 0; @@ -176,7 +176,7 @@ Q_LONG KSocketBuffer::consumeBuffer(char *destbuffer, Q_LONG maxlen, bool discar TQValueListIterator it = m_list.begin(), end = m_list.end(); TQIODevice::Offset offset = m_offset; - Q_LONG copied = 0; + TQ_LONG copied = 0; // walk the buffer while (it != end && maxlen) @@ -228,7 +228,7 @@ void KSocketBuffer::clear() m_length = 0; } -Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len) +TQ_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len) { if (len == 0 || isEmpty()) return 0; @@ -238,7 +238,7 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len) TQValueListIterator it = m_list.begin(), end = m_list.end(); TQIODevice::Offset offset = m_offset; - Q_LONG written = 0; + TQ_LONG written = 0; // walk the buffer while (it != end && (len || len == -1)) @@ -248,11 +248,11 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len) // better by concatenating a few of them into a big buffer // question is: how big should that buffer be? 2 kB should be enough - Q_ULONG bufsize = 1460; + TQ_ULONG bufsize = 1460; if (len != -1 && len < bufsize) bufsize = len; TQByteArray buf(bufsize); - Q_LONG count = 0; + TQ_LONG count = 0; while (it != end && count + ((*it).size() - offset) <= bufsize) { @@ -273,7 +273,7 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len) } // now try to write those bytes - Q_LONG wrote = dev->writeBlock(buf, count); + TQ_LONG wrote = dev->writeBlock(buf, count); if (wrote == -1) // error? @@ -293,7 +293,7 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len) return written; } -Q_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, Q_LONG len) +TQ_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, TQ_LONG len) { if (len == 0 || isFull()) return 0; diff --git a/kdecore/network/ksocketbuffer_p.h b/kdecore/network/ksocketbuffer_p.h index a4a0d6a9e..0b8e96205 100644 --- a/kdecore/network/ksocketbuffer_p.h +++ b/kdecore/network/ksocketbuffer_p.h @@ -53,7 +53,7 @@ public: * * @param size the maximum size of the buffer */ - KSocketBuffer(Q_LONG size = -1); + KSocketBuffer(TQ_LONG size = -1); /** * Copy constructor. @@ -86,7 +86,7 @@ public: * * @sa size */ - virtual Q_LONG length() const; + virtual TQ_LONG length() const; /** * Retrieves the buffer size. The value of -1 indicates that @@ -94,7 +94,7 @@ public: * * @sa length for the length of the data stored */ - virtual Q_LONG size() const; + virtual TQ_LONG size() const; /** * Sets the size of the buffer, if allowed. @@ -103,7 +103,7 @@ public: * @returns true on success, false if an error occurred. * @note if the new size is less than length(), the buffer will be truncated */ - virtual bool setSize(Q_LONG size); + virtual bool setSize(TQ_LONG size); /** * Adds data to the end of the buffer. @@ -112,7 +112,7 @@ public: * @param len the data length, in bytes * @returns the number of bytes added to the end of the buffer. */ - virtual Q_LONG feedBuffer(const char *data, Q_LONG len); + virtual TQ_LONG feedBuffer(const char *data, TQ_LONG len); /** * Clears the buffer. @@ -127,7 +127,7 @@ public: * @param discard if true, the bytes copied will be discarded * @returns the number of bytes copied from the buffer */ - virtual Q_LONG consumeBuffer(char *data, Q_LONG maxlen, bool discard = true); + virtual TQ_LONG consumeBuffer(char *data, TQ_LONG maxlen, bool discard = true); /** * Sends at most @p len bytes of data to the I/O Device. @@ -137,7 +137,7 @@ public: * @returns the number of bytes sent and discarded from the buffer, -1 * indicates an error. */ - virtual Q_LONG sendTo(KActiveSocketBase* device, Q_LONG len = -1); + virtual TQ_LONG sendTo(KActiveSocketBase* device, TQ_LONG len = -1); /** * Tries to receive @p len bytes of data from the I/O device. @@ -148,15 +148,15 @@ public: * @returns the number of bytes received and copied into the buffer, * -1 indicates an error. */ - virtual Q_LONG receiveFrom(KActiveSocketBase* device, Q_LONG len = -1); + virtual TQ_LONG receiveFrom(KActiveSocketBase* device, TQ_LONG len = -1); protected: mutable TQMutex m_mutex; TQValueList m_list; TQIODevice::Offset m_offset; ///< offset of the start of data in the first element - Q_LONG m_size; ///< the maximum length of the buffer - mutable Q_LONG m_length; + TQ_LONG m_size; ///< the maximum length of the buffer + mutable TQ_LONG m_length; }; } } // namespace KNetwork::Internal diff --git a/kdecore/network/ksocketdevice.cpp b/kdecore/network/ksocketdevice.cpp index 53a16ca0a..793642bf9 100644 --- a/kdecore/network/ksocketdevice.cpp +++ b/kdecore/network/ksocketdevice.cpp @@ -365,7 +365,7 @@ bool KSocketDevice::disconnect() } #ifdef USE_QT3 -Q_LONG KSocketDevice::bytesAvailable() const +TQ_LONG KSocketDevice::bytesAvailable() const #endif #ifdef USE_QT4 qint64 KSocketDevice::bytesAvailable() const @@ -381,7 +381,7 @@ qint64 KSocketDevice::bytesAvailable() const return nchars; } -Q_LONG KSocketDevice::waitForMore(int msecs, bool *timeout) +TQ_LONG KSocketDevice::waitForMore(int msecs, bool *timeout) { if (m_sockfd == -1) return -1; // there won't ever be anything to read... @@ -393,7 +393,7 @@ Q_LONG KSocketDevice::waitForMore(int msecs, bool *timeout) return bytesAvailable(); } -static int do_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false) +static int do_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false) { socklen_t len; if (from) @@ -419,7 +419,7 @@ static int do_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddress return 0; } -Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen) +TQ_LONG KSocketDevice::readBlock(char *data, TQ_ULONG maxlen) { resetError(); if (m_sockfd == -1) @@ -440,7 +440,7 @@ Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen) return retval; } -Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress &from) +TQ_LONG KSocketDevice::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from) { resetError(); if (m_sockfd == -1) @@ -461,7 +461,7 @@ Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress &from return retval; } -Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen) +TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen) { resetError(); if (m_sockfd == -1) @@ -482,7 +482,7 @@ Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen) return retval; } -Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) +TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) { resetError(); if (m_sockfd == -1) @@ -503,12 +503,12 @@ Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from return retval; } -Q_LONG KSocketDevice::writeBlock(const char *data, Q_ULONG len) +TQ_LONG KSocketDevice::writeBlock(const char *data, TQ_ULONG len) { return writeBlock(data, len, KSocketAddress()); } -Q_LONG KSocketDevice::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to) +TQ_LONG KSocketDevice::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to) { resetError(); if (m_sockfd == -1) @@ -884,7 +884,7 @@ KSocketDevice::setDefaultImpl(KSocketDeviceFactoryBase* factory) void KSocketDevice::addNewImpl(KSocketDeviceFactoryBase* factory, int capabilities) { TQMutexLocker locker(&defaultImplFactoryMutex); - if (factories.contains(capabilities)) + if (factories.tqcontains(capabilities)) delete factories[capabilities]; factories.insert(capabilities, factory); } diff --git a/kdecore/network/ksocketdevice.h b/kdecore/network/ksocketdevice.h index 5f86687b2..5324cd02b 100644 --- a/kdecore/network/ksocketdevice.h +++ b/kdecore/network/ksocketdevice.h @@ -199,7 +199,7 @@ public: * Returns the number of bytes available for reading without blocking. */ #ifdef USE_QT3 - virtual Q_LONG bytesAvailable() const; + virtual TQ_LONG bytesAvailable() const; #endif #ifdef USE_QT4 virtual qint64 bytesAvailable() const; @@ -211,37 +211,37 @@ public: * This function is a wrapper against @ref poll. This function will wait * for any read events. */ - virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L); + virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L); /** * Reads data from this socket. */ - virtual Q_LONG readBlock(char *data, Q_ULONG maxlen); + virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen); /** * Reads data and the source address from this socket. */ - virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from); + virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from); /** * Peeks data in the socket. */ - virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen); /** * Peeks the data in the socket and the source address. */ - virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from); /** * Writes data to the socket. */ - virtual Q_LONG writeBlock(const char *data, Q_ULONG len); + virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len); /** * Writes the given data to the given destination address. */ - virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to); + virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to); /** * Returns this socket's local address. diff --git a/kdecore/network/ksockssocketdevice.cpp b/kdecore/network/ksockssocketdevice.cpp index f67b90bc9..b9fcb6cdd 100644 --- a/kdecore/network/ksockssocketdevice.cpp +++ b/kdecore/network/ksockssocketdevice.cpp @@ -190,7 +190,7 @@ KSocksSocketDevice* KSocksSocketDevice::accept() return new KSocksSocketDevice(newfd); } -static int socks_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false) +static int socks_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false) { kde_socklen_t len; if (from) @@ -214,7 +214,7 @@ static int socks_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddr return 0; } -Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen) +TQ_LONG KSocksSocketDevice::readBlock(char *data, TQ_ULONG maxlen) { resetError(); if (m_sockfd == -1) @@ -235,7 +235,7 @@ Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen) return retval; } -Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress &from) +TQ_LONG KSocksSocketDevice::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from) { resetError(); if (m_sockfd == -1) @@ -256,7 +256,7 @@ Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress return retval; } -Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen) +TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen) { resetError(); if (m_sockfd == -1) @@ -277,7 +277,7 @@ Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen) return retval; } -Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) +TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) { resetError(); if (m_sockfd == -1) @@ -298,12 +298,12 @@ Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& return retval; } -Q_LONG KSocksSocketDevice::writeBlock(const char *data, Q_ULONG len) +TQ_LONG KSocksSocketDevice::writeBlock(const char *data, TQ_ULONG len) { return writeBlock(data, len, KSocketAddress()); } -Q_LONG KSocksSocketDevice::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to) +TQ_LONG KSocksSocketDevice::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to) { resetError(); if (m_sockfd == -1) diff --git a/kdecore/network/ksockssocketdevice.h b/kdecore/network/ksockssocketdevice.h index 62de23f05..1f8453836 100644 --- a/kdecore/network/ksockssocketdevice.h +++ b/kdecore/network/ksockssocketdevice.h @@ -83,20 +83,20 @@ public: /** * Overrides reading. */ - virtual Q_LONG readBlock(char *data, Q_ULONG maxlen); - virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from); + virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen); + virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from); /** * Overrides peeking. */ - virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen); - virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen); + virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from); /** * Overrides writing. */ - virtual Q_LONG writeBlock(const char *data, Q_ULONG len); - virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to); + virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len); + virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to); /** * Overrides getting socket address. diff --git a/kdecore/network/ksrvresolverworker.cpp b/kdecore/network/ksrvresolverworker.cpp index 07e3555fa..c1df59bde 100644 --- a/kdecore/network/ksrvresolverworker.cpp +++ b/kdecore/network/ksrvresolverworker.cpp @@ -33,7 +33,7 @@ using namespace KNetwork::Internal; namespace { - struct KSrvStartEvent: public QCustomEvent + struct KSrvStartEvent: public TQCustomEvent { inline KSrvStartEvent() : TQCustomEvent(TQEvent::User) { } }; @@ -51,11 +51,11 @@ bool KSrvResolverWorker::preprocess() return false; TQString node = nodeName(); - if (node.find('%') != -1) - node.truncate(node.find('%')); + if (node.tqfind('%') != -1) + node.truncate(node.tqfind('%')); - if (node.isEmpty() || node == TQString::fromLatin1("*") || - node == TQString::fromLatin1("localhost")) + if (node.isEmpty() || node == TQString::tqfromLatin1("*") || + node == TQString::tqfromLatin1("localhost")) return false; // empty == localhost encodedName = KResolver::domainToAscii(node); @@ -225,7 +225,7 @@ bool KSrvResolverWorker::postprocess() void KSrvResolverWorker::customEvent(TQCustomEvent*) { - dns = new TQDns(TQString::fromLatin1(encodedName), TQDns::Srv); + dns = new TQDns(TQString::tqfromLatin1(encodedName), TQDns::Srv); TQObject::connect(dns, TQT_SIGNAL(resultsReady()), this, TQT_SLOT(dnsResultsReady())); } diff --git a/kdecore/network/ksrvresolverworker_p.h b/kdecore/network/ksrvresolverworker_p.h index 90074214f..293308544 100644 --- a/kdecore/network/ksrvresolverworker_p.h +++ b/kdecore/network/ksrvresolverworker_p.h @@ -42,13 +42,14 @@ namespace KNetwork public KNetwork::KResolverWorkerBase { Q_OBJECT + TQ_OBJECT public: struct Entry { TQString name; - Q_UINT16 port; - Q_UINT16 weight; + TQ_UINT16 port; + TQ_UINT16 weight; KNetwork::KResolver* resolver; }; @@ -57,7 +58,7 @@ namespace KNetwork PriorityClass() : totalWeight(0) { } TQValueList entries; - Q_UINT16 totalWeight; + TQ_UINT16 totalWeight; }; private: @@ -66,7 +67,7 @@ namespace KNetwork TQCString encodedName; TQSemaphore *sem; - typedef TQMap Results; + typedef TQMap Results; Results myResults; public: diff --git a/kdecore/network/kstreamsocket.cpp b/kdecore/network/kstreamsocket.cpp index 8ca4f91f6..3861a4e09 100644 --- a/kdecore/network/kstreamsocket.cpp +++ b/kdecore/network/kstreamsocket.cpp @@ -130,7 +130,7 @@ bool KStreamSocket::connect(const TQString& node, const TQString& service) // connection hasn't started yet if (!blocking()) { - TQObject::connect(this, TQT_SIGNAL(hostFound()), TQT_SLOT(hostFoundSlot())); + QObject::connect(this, TQT_SIGNAL(hostFound()), TQT_SLOT(hostFoundSlot())); return lookup(); } @@ -196,7 +196,7 @@ bool KStreamSocket::connect(const KResolverEntry& entry) void KStreamSocket::hostFoundSlot() { - TQObject::disconnect(this, TQT_SLOT(hostFoundSlot())); + QObject::disconnect(this, TQT_SLOT(hostFoundSlot())); if (timeout() > 0) d->timer.start(timeout(), true); TQTimer::singleShot(0, this, TQT_SLOT(connectionEvent())); diff --git a/kdecore/network/kstreamsocket.h b/kdecore/network/kstreamsocket.h index 099826cb8..9b58bf23a 100644 --- a/kdecore/network/kstreamsocket.h +++ b/kdecore/network/kstreamsocket.h @@ -97,6 +97,7 @@ class KStreamSocketPrivate; class KDECORE_EXPORT KStreamSocket: public KClientSocketBase { Q_OBJECT + TQ_OBJECT public: /** diff --git a/kdecore/svgicons/ksvgiconengine.cpp b/kdecore/svgicons/ksvgiconengine.cpp index dd54e99be..faca9d967 100644 --- a/kdecore/svgicons/ksvgiconengine.cpp +++ b/kdecore/svgicons/ksvgiconengine.cpp @@ -127,12 +127,12 @@ public: TQColor qStopColor = m_engine->painter()->parseColor(parseColor); // Convert in a libart suitable form - Q_UINT32 stopColor = m_engine->painter()->toArtColor(qStopColor); + TQ_UINT32 stopColor = m_engine->painter()->toArtColor(qStopColor); int opacity = m_engine->painter()->parseOpacity(parseOpacity); - Q_UINT32 rgba = (stopColor << 8) | opacity; - Q_UINT32 r, g, b, a; + TQ_UINT32 rgba = (stopColor << 8) | opacity; + TQ_UINT32 r, g, b, a; // Convert from separated to premultiplied alpha a = rgba & 0xff; @@ -174,8 +174,8 @@ public: return TQPointArray(); points.replace(',', ' '); - points.replace('\r', TQString::null); - points.replace('\n', TQString::null); + points.replace('\r', TQString()); + points.replace('\n', TQString()); points = points.simplifyWhiteSpace(); @@ -201,7 +201,7 @@ public: // Combine new and old matrix TQWMatrix matrix = m_engine->painter()->parseTransform(transform); - TQWMatrix *current = m_engine->painter()->worldMatrix(); + TQWMatrix *current = m_engine->painter()->tqworldMatrix(); *current = matrix * *current; } @@ -221,9 +221,9 @@ public: TQPtrList applyList; applyList.setAutoDelete(true); - TQDomNode shape = node.parentNode(); - for(; !shape.isNull() ; shape = shape.parentNode()) - applyList.prepend(new TQDomNamedNodeMap(shape.attributes())); + TQDomNode tqshape = node.tqparentNode(); + for(; !tqshape.isNull() ; tqshape = tqshape.tqparentNode()) + applyList.prepend(new TQDomNamedNodeMap(tqshape.attributes())); // Apply parent attributes for(TQDomNamedNodeMap *map = applyList.first(); map != 0; map = applyList.next()) @@ -425,7 +425,7 @@ public: if(href.startsWith("data:")) { // Get input - TQCString input = href.remove(TQRegExp("^data:image/.*;base64,")).utf8(); + TQCString input = TQString(href.remove(TQRegExp("^data:image/.*;base64,"))).utf8(); // Decode into 'output' TQByteArray output; @@ -441,7 +441,7 @@ public: { // Scale, if needed if(image.width() != (int) w || image.height() != (int) h) - image = image.smoothScale((int) w, (int) h, TQImage_ScaleFree); + image = image.smoothScale((int) w, (int) h, TQ_ScaleFree); m_engine->painter()->drawImage(x, y, image); } @@ -622,7 +622,7 @@ bool KSVGIconEngine::load(int width, int height, const TQString &path) d->width = w; d->height = h; - d->painter->worldMatrix()->scale(vratiow, vratioh); + d->painter->tqworldMatrix()->scale(vratiow, vratioh); } else { @@ -631,10 +631,10 @@ bool KSVGIconEngine::load(int width, int height, const TQString &path) double ratiow = width / d->width; double ratioh = height / d->height; - d->painter->worldMatrix()->scale(ratiow, ratioh); + d->painter->tqworldMatrix()->scale(ratiow, ratioh); } - TQWMatrix initialMatrix = *d->painter->worldMatrix(); + TQWMatrix initialMatrix = *d->painter->tqworldMatrix(); d->helper->m_initialMatrix = initialMatrix; // Apply transform diff --git a/kdecore/svgicons/ksvgiconpainter.cpp b/kdecore/svgicons/ksvgiconpainter.cpp index 811dfe918..06d5804f8 100644 --- a/kdecore/svgicons/ksvgiconpainter.cpp +++ b/kdecore/svgicons/ksvgiconpainter.cpp @@ -65,7 +65,7 @@ public: m_useFillGradient = false; m_useStrokeGradient = false; - m_worldMatrix = new TQWMatrix(); + m_tqworldMatrix = new TQWMatrix(); // Create new image with alpha support m_image = new TQImage(width, height, 32); @@ -102,7 +102,7 @@ public: art_free(m_buffer); delete m_image; - delete m_worldMatrix; + delete m_tqworldMatrix; for(TQMap::Iterator it = m_linearGradientMap.begin(); it != m_linearGradientMap.end(); ++it) { @@ -185,7 +185,7 @@ public: m_tempBuffer = 0; } - Q_UINT32 toArtColor(const TQColor &color) + TQ_UINT32 toArtColor(const TQColor &color) { // Convert in a libart suitable form TQString tempName = color.name(); @@ -211,7 +211,7 @@ public: return result; } - void drawSVP(ArtSVP *svp, Q_UINT32 rgb, int opacity) + void drawSVP(ArtSVP *svp, TQ_UINT32 rgb, int opacity) { if(!svp) return; @@ -233,12 +233,12 @@ public: void drawBPath(ArtBpath *bpath) { double affine[6]; - affine[0] = m_worldMatrix->m11(); - affine[1] = m_worldMatrix->m12(); - affine[2] = m_worldMatrix->m21(); - affine[3] = m_worldMatrix->m22(); - affine[4] = m_worldMatrix->dx(); - affine[5] = m_worldMatrix->dy(); + affine[0] = m_tqworldMatrix->m11(); + affine[1] = m_tqworldMatrix->m12(); + affine[2] = m_tqworldMatrix->m21(); + affine[3] = m_tqworldMatrix->m22(); + affine[4] = m_tqworldMatrix->dx(); + affine[5] = m_tqworldMatrix->dy(); ArtBpath *temp = art_bpath_affine_transform(bpath, affine); ArtVpath *vec = art_bez_path_to_vec(temp, 0.25); @@ -249,12 +249,12 @@ public: void drawVPath(ArtVpath *vec) { double affine[6]; - affine[0] = m_worldMatrix->m11(); - affine[1] = m_worldMatrix->m12(); - affine[2] = m_worldMatrix->m21(); - affine[3] = m_worldMatrix->m22(); - affine[4] = m_worldMatrix->dx(); - affine[5] = m_worldMatrix->dy(); + affine[0] = m_tqworldMatrix->m11(); + affine[1] = m_tqworldMatrix->m12(); + affine[2] = m_tqworldMatrix->m21(); + affine[3] = m_tqworldMatrix->m22(); + affine[4] = m_tqworldMatrix->dx(); + affine[5] = m_tqworldMatrix->dy(); ArtVpath *temp = art_vpath_affine_transform(vec, affine); art_free(vec); @@ -267,7 +267,7 @@ public: ArtSVP *svp; ArtSVP *fillSVP = 0, *strokeSVP = 0; - Q_UINT32 fillColor = 0, strokeColor = 0; + TQ_UINT32 fillColor = 0, strokeColor = 0; // Filling { @@ -461,10 +461,10 @@ public: m.map(x1, y1, &x1, &y1); m.map(x2, y2, &x2, &y2); - double x1n = x1 * m_worldMatrix->m11() + y1 * m_worldMatrix->m21() + m_worldMatrix->dx(); - double y1n = x1 * m_worldMatrix->m12() + y1 * m_worldMatrix->m22() + m_worldMatrix->dy(); - double x2n = x2 * m_worldMatrix->m11() + y2 * m_worldMatrix->m21() + m_worldMatrix->dx(); - double y2n = x2 * m_worldMatrix->m12() + y2 * m_worldMatrix->m22() + m_worldMatrix->dy(); + double x1n = x1 * m_tqworldMatrix->m11() + y1 * m_tqworldMatrix->m21() + m_tqworldMatrix->dx(); + double y1n = x1 * m_tqworldMatrix->m12() + y1 * m_tqworldMatrix->m22() + m_tqworldMatrix->dy(); + double x2n = x2 * m_tqworldMatrix->m11() + y2 * m_tqworldMatrix->m21() + m_tqworldMatrix->dx(); + double y2n = x2 * m_tqworldMatrix->m12() + y2 * m_tqworldMatrix->m22() + m_tqworldMatrix->dy(); double dx = x2n - x1n; double dy = y2n - y1n; @@ -515,12 +515,12 @@ public: else fy = cy; - radial->affine[0] = m_worldMatrix->m11(); - radial->affine[1] = m_worldMatrix->m12(); - radial->affine[2] = m_worldMatrix->m21(); - radial->affine[3] = m_worldMatrix->m22(); - radial->affine[4] = m_worldMatrix->dx(); - radial->affine[5] = m_worldMatrix->dy(); + radial->affine[0] = m_tqworldMatrix->m11(); + radial->affine[1] = m_tqworldMatrix->m12(); + radial->affine[2] = m_tqworldMatrix->m21(); + radial->affine[3] = m_tqworldMatrix->m22(); + radial->affine[4] = m_tqworldMatrix->dx(); + radial->affine[5] = m_tqworldMatrix->dy(); radial->fx = (fx - cx) / r; radial->fy = (fy - cy) / r; @@ -674,7 +674,7 @@ public: { QRgb *sl = reinterpret_cast(m_image->scanLine(y)); for(int x = 0; x < m_width; x++) - sl[x] = qRgba(line[x * 4], line[x * 4 + 1], line[x * 4 + 2], line[x * 4 + 3]); + sl[x] = tqRgba(line[x * 4], line[x * 4 + 1], line[x * 4 + 2], line[x * 4 + 3]); line += m_rowstride; } @@ -1123,7 +1123,7 @@ private: ArtSVP *m_clipSVP; TQImage *m_image; - TQWMatrix *m_worldMatrix; + TQWMatrix *m_tqworldMatrix; TQString m_fillRule; TQString m_joinStyle; @@ -1211,17 +1211,17 @@ TQImage *KSVGIconPainter::image() return new TQImage(*d->helper->m_image); } -TQWMatrix *KSVGIconPainter::worldMatrix() +TQWMatrix *KSVGIconPainter::tqworldMatrix() { - return d->helper->m_worldMatrix; + return d->helper->m_tqworldMatrix; } void KSVGIconPainter::setWorldMatrix(TQWMatrix *matrix) { - if(d->helper->m_worldMatrix) - delete d->helper->m_worldMatrix; + if(d->helper->m_tqworldMatrix) + delete d->helper->m_tqworldMatrix; - d->helper->m_worldMatrix = matrix; + d->helper->m_tqworldMatrix = matrix; } void KSVGIconPainter::setStrokeWidth(double width) @@ -1263,8 +1263,8 @@ void KSVGIconPainter::setStrokeColor(const TQString &stroke) TQString url = stroke; - unsigned int start = url.find("#") + 1; - unsigned int end = url.findRev(")"); + unsigned int start = url.tqfind("#") + 1; + unsigned int end = url.tqfindRev(")"); d->helper->m_strokeGradientReference = url.mid(start, end - start); } @@ -1291,8 +1291,8 @@ void KSVGIconPainter::setFillColor(const TQString &fill) TQString url = fill; - unsigned int start = url.find("#") + 1; - unsigned int end = url.findRev(")"); + unsigned int start = url.tqfind("#") + 1; + unsigned int end = url.tqfindRev(")"); d->helper->m_fillGradientReference = url.mid(start, end - start); } @@ -1315,7 +1315,7 @@ void KSVGIconPainter::setFillRule(const TQString &fillRule) d->helper->m_fillRule = fillRule; } -Q_UINT32 KSVGIconPainter::parseOpacity(const TQString &data) +TQ_UINT32 KSVGIconPainter::parseOpacity(const TQString &data) { int opacity = 255; @@ -2310,12 +2310,12 @@ void KSVGIconPainter::drawImage(double x, double y, TQImage &image) image = image.convertDepth(32); double affine[6]; - affine[0] = d->helper->m_worldMatrix->m11(); - affine[1] = d->helper->m_worldMatrix->m12(); - affine[2] = d->helper->m_worldMatrix->m21(); - affine[3] = d->helper->m_worldMatrix->m22(); + affine[0] = d->helper->m_tqworldMatrix->m11(); + affine[1] = d->helper->m_tqworldMatrix->m12(); + affine[2] = d->helper->m_tqworldMatrix->m21(); + affine[3] = d->helper->m_tqworldMatrix->m22(); // use the world matrix to convert the coordinates - d->helper->m_worldMatrix->map(x, y, &affine[4], &affine[5]); + d->helper->m_tqworldMatrix->map(x, y, &affine[4], &affine[5]); d->helper->art_rgba_rgba_affine(d->helper->m_buffer, 0, 0, d->helper->m_width, d->helper->m_height, d->helper->m_rowstride, image.bits(), image.width(), image.height(), @@ -2560,7 +2560,7 @@ TQColor KSVGIconPainter::parseColor(const TQString ¶m) return TQColor(245, 255, 250); else if(rgbColor == "mistyrose") return TQColor(255, 228, 225); - else if(rgbColor == "moccasin") + else if(rgbColor == "tqmoccasin") return TQColor(255, 228, 181); else if(rgbColor == "navajowhite") return TQColor(255, 222, 173); @@ -2753,7 +2753,7 @@ void KSVGIconPainter::addRadialGradientElement(ArtGradientRadial *gradient, TQDo d->helper->m_radialGradientElementMap.insert(gradient, element); } -Q_UINT32 KSVGIconPainter::toArtColor(const TQColor &color) +TQ_UINT32 KSVGIconPainter::toArtColor(const TQColor &color) { return d->helper->toArtColor(color); } diff --git a/kdecore/svgicons/ksvgiconpainter.h b/kdecore/svgicons/ksvgiconpainter.h index 9ba44d2cf..6b00d9d7c 100644 --- a/kdecore/svgicons/ksvgiconpainter.h +++ b/kdecore/svgicons/ksvgiconpainter.h @@ -41,7 +41,7 @@ public: TQImage *image(); - TQWMatrix *worldMatrix(); + TQWMatrix *tqworldMatrix(); void finish(); @@ -61,7 +61,7 @@ public: void setStrokeDashOffset(const TQString &dashOffset); void setStrokeDashArray(const TQString &dashes); - void setWorldMatrix(TQWMatrix *worldMatrix); + void setWorldMatrix(TQWMatrix *tqworldMatrix); void setClippingRect(int x, int y, int w, int h); void drawRectangle(double x, double y, double w, double h, double rx, double ry); @@ -73,8 +73,8 @@ public: void drawImage(double x, double y, TQImage &image); TQColor parseColor(const TQString ¶m); - Q_UINT32 toArtColor(const TQColor &color); - Q_UINT32 parseOpacity(const TQString &data); + TQ_UINT32 toArtColor(const TQColor &color); + TQ_UINT32 parseOpacity(const TQString &data); double toPixel(const TQString &s, bool hmode); double dpi(); diff --git a/kdecore/tests/kcalendartest.cpp b/kdecore/tests/kcalendartest.cpp index 51a40b892..8b6e8eea4 100644 --- a/kdecore/tests/kcalendartest.cpp +++ b/kdecore/tests/kcalendartest.cpp @@ -67,7 +67,7 @@ int main(int argc, char **argv) { option = args->getOption("date"); date = KGlobal::locale()->readDate(option); } else - date = TQDate::currentDate(); + date = TQDate::tqcurrentDate(); args->clear(); // Free up some memory. diff --git a/kdecore/tests/kconfigtestgui.cpp b/kdecore/tests/kconfigtestgui.cpp index abd476396..af560b496 100644 --- a/kdecore/tests/kconfigtestgui.cpp +++ b/kdecore/tests/kconfigtestgui.cpp @@ -121,7 +121,7 @@ KConfigTestView::KConfigTestView( TQWidget *parent, const char *name ) pQuitButton = new TQPushButton( this, "quitbutton" ); pQuitButton->setText( "Quit" ); pQuitButton->setGeometry( 340, 60, 60, 60 ); - connect( pQuitButton, TQT_SIGNAL(clicked()), qApp, TQT_SLOT(quit()) ); + connect( pQuitButton, TQT_SIGNAL(clicked()), tqApp, TQT_SLOT(quit()) ); // create a default KConfig object in order to be able to start right away pConfig = new KConfig( TQString::null ); diff --git a/kdecore/tests/kconfigtestgui.h b/kdecore/tests/kconfigtestgui.h index 8311952b5..7655c8142 100644 --- a/kdecore/tests/kconfigtestgui.h +++ b/kdecore/tests/kconfigtestgui.h @@ -39,7 +39,7 @@ // KConfigTestView contains lots of Qt widgets. // -class KConfigTestView : public QDialog +class KConfigTestView : public TQDialog { Q_OBJECT public: diff --git a/kdecore/tests/kipctest.h b/kdecore/tests/kipctest.h index a8abd2e76..17122fbd8 100644 --- a/kdecore/tests/kipctest.h +++ b/kdecore/tests/kipctest.h @@ -3,7 +3,7 @@ #include -class MyObject: public QObject +class MyObject: public TQObject { Q_OBJECT public: diff --git a/kdecore/tests/klocaletest.cpp b/kdecore/tests/klocaletest.cpp index a980359b0..a81d867b1 100644 --- a/kdecore/tests/klocaletest.cpp +++ b/kdecore/tests/klocaletest.cpp @@ -53,7 +53,7 @@ Test::Test( TQWidget *parent, const char *name ) { setCaption("Testing KLocale"); - TQWidget *d = qApp->desktop(); + TQWidget *d = tqApp->desktop(); setGeometry((d->width()-320)>>1, (d->height()-160)>>1, 420, 420); createFields(); @@ -77,19 +77,19 @@ void Test::createFields() string+="Used language: "; string+=KGlobal::locale()->language()+"\n"; string+="Locale encoding: "; - string+=TQString::fromLatin1(KGlobal::locale()->encoding())+"\n"; + string+=TQString::tqfromLatin1(KGlobal::locale()->encoding())+"\n"; string+="Localized date and time: "; - string+=KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); + string+=KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime()); string+="\nLocalized monetary numbers: "; string+=KGlobal::locale()->formatMoney(1234567.89) + " / \n" +KGlobal::locale()->formatMoney(-1234567.89); // This will not work // but you can copy other *.mo file string+="\nSome localized strings:\n"; - string+=TQString::fromLatin1("Yes = ")+i18n("Yes")+"\n"; - string+=TQString::fromLatin1("No = ")+i18n("No")+"\n"; - string+=TQString::fromLatin1("Help = ")+i18n("Help")+"\n"; - string+=TQString::fromLatin1("Cancel = ")+i18n("Cancel")+"\n"; + string+=TQString::tqfromLatin1("Yes = ")+i18n("Yes")+"\n"; + string+=TQString::tqfromLatin1("No = ")+i18n("No")+"\n"; + string+=TQString::tqfromLatin1("Help = ")+i18n("Help")+"\n"; + string+=TQString::tqfromLatin1("Cancel = ")+i18n("Cancel")+"\n"; label=new TQLabel(string,this,"Label"); label->setGeometry(10,10,400,400); @@ -102,9 +102,9 @@ int main( int argc, char ** argv ) KLocale::setMainCatalogue("kdelibs"); KApplication a( argc, argv, "klocaletest" ); - KGlobal::locale()->setLanguage(TQString::fromLatin1("en_US")); - KGlobal::locale()->setCountry(TQString::fromLatin1("C")); - KGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(",")); + KGlobal::locale()->setLanguage(TQString::tqfromLatin1("en_US")); + KGlobal::locale()->setCountry(TQString::tqfromLatin1("C")); + KGlobal::locale()->setThousandsSeparator(TQString::tqfromLatin1(",")); TQString formatted; formatted = KGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00"); @@ -152,8 +152,8 @@ int main( int argc, char ** argv ) TQDate date; date.setYMD( 2002, 5, 3 ); checkDate("readDate( 3, 5, 2002 )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); - date = TQDate::currentDate(); - checkDate("readDate( TQDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); + date = TQDate::tqcurrentDate(); + checkDate("readDate( TQDate::tqcurrentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); TQTime time; time = KGlobal::locale()->readTime( "11:22:33", &ok ); @@ -181,11 +181,11 @@ int main( int argc, char ** argv ) check("formatTime(\"0:22\", as duration)", timeStr, "00:22" ); kdDebug() << "setLanguage C\n"; - KGlobal::locale()->setLanguage(TQString::fromLatin1("C")); + KGlobal::locale()->setLanguage(TQString::tqfromLatin1("C")); kdDebug() << "C: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl; kdDebug() << "setLanguage de\n"; - KGlobal::locale()->setLanguage(TQString::fromLatin1("de")); + KGlobal::locale()->setLanguage(TQString::tqfromLatin1("de")); kdDebug() << "de: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl; diff --git a/kdecore/tests/klocaletest.h b/kdecore/tests/klocaletest.h index f88cfc901..83f4f5cef 100644 --- a/kdecore/tests/klocaletest.h +++ b/kdecore/tests/klocaletest.h @@ -9,7 +9,7 @@ class TQLabel; /** test: a small test program for KLocale */ -class Test : public QWidget +class Test : public TQWidget { Q_OBJECT diff --git a/kdecore/tests/kmdcodectest.cpp b/kdecore/tests/kmdcodectest.cpp index 243d0d289..e74d6f4b4 100644 --- a/kdecore/tests/kmdcodectest.cpp +++ b/kdecore/tests/kmdcodectest.cpp @@ -192,15 +192,15 @@ void MD5_timeTrial () time_t endTime; time_t startTime; - Q_UINT8 block[TEST_BLOCK_LEN]; - Q_UINT32 i; + TQ_UINT8 block[TEST_BLOCK_LEN]; + TQ_UINT32 i; cout << "Timing test. Digesting " << TEST_BLOCK_COUNT << " blocks of " << TEST_BLOCK_LEN << "-byte..." << endl; // Initialize block for (i = 0; i < TEST_BLOCK_LEN; i++) - block[i] = (Q_UINT8)(i & 0xff); + block[i] = (TQ_UINT8)(i & 0xff); // Start timer time (&startTime); diff --git a/kdecore/tests/kprocesstest.h b/kdecore/tests/kprocesstest.h index 3e5d989ec..23ac443dd 100644 --- a/kdecore/tests/kprocesstest.h +++ b/kdecore/tests/kprocesstest.h @@ -15,7 +15,7 @@ #include #include "kprocess.h" -class Dummy : public QObject +class Dummy : public TQObject { Q_OBJECT diff --git a/kdecore/tests/kprociotest.h b/kdecore/tests/kprociotest.h index 6392fc708..9f948e644 100644 --- a/kdecore/tests/kprociotest.h +++ b/kdecore/tests/kprociotest.h @@ -15,7 +15,7 @@ #include #include "kprocio.h" -class Dummy : public QObject +class Dummy : public TQObject { Q_OBJECT diff --git a/kdecore/tests/kresolvertest.cpp b/kdecore/tests/kresolvertest.cpp index f1d3c11f9..1b2f5148d 100644 --- a/kdecore/tests/kresolvertest.cpp +++ b/kdecore/tests/kresolvertest.cpp @@ -75,8 +75,8 @@ public: bool tryLookup(const char* node, const char *serv) { int error; - TQString _node = TQString::fromLatin1(node); - TQString _serv = TQString::fromLatin1(serv); + TQString _node = TQString::tqfromLatin1(node); + TQString _serv = TQString::tqfromLatin1(serv); printf("\tTrying to lookup %s|%s... ", node, serv); TQPtrList list = KExtendedSocket::lookup(_node, _serv, 0, &error); @@ -138,8 +138,8 @@ bool try_pton() bool tryLookup6(const char *node, const char *serv) { int error; - TQString _node = TQString::fromLatin1(node); - TQString _serv = TQString::fromLatin1(serv); + TQString _node = TQString::tqfromLatin1(node); + TQString _serv = TQString::tqfromLatin1(serv); printf("\tTrying to lookup IPv6 of %s|%s... ", node, serv); TQPtrList list = KExtendedSocket::lookup(_node, _serv, KExtendedSocket::ipv6Socket, &error); diff --git a/kdecore/tests/ktimezonestest.cpp b/kdecore/tests/ktimezonestest.cpp index 650cc0512..69ea7c8a1 100644 --- a/kdecore/tests/ktimezonestest.cpp +++ b/kdecore/tests/ktimezonestest.cpp @@ -17,7 +17,7 @@ int main(int argc, char *argv[]) // Find the current offset of the UTC timezone. timezone = timezones.zone("UTC"); - printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::currentDateTime()) ); + printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::tqcurrentDateTime()) ); // Find some offsets for Europe/London. char *london = "Europe/London"; diff --git a/kded/kbuildservicefactory.cpp b/kded/kbuildservicefactory.cpp index f8f8c34f1..64298c273 100644 --- a/kded/kbuildservicefactory.cpp +++ b/kded/kbuildservicefactory.cpp @@ -67,7 +67,7 @@ KSycocaEntry * KBuildServiceFactory::createEntry( const TQString& file, const char *resource ) { TQString name = file; - int pos = name.findRev('/'); + int pos = name.tqfindRev('/'); if (pos != -1) { name = name.mid(pos+1); @@ -101,11 +101,11 @@ KBuildServiceFactory::saveHeader(TQDataStream &str) { KSycocaFactory::saveHeader(str); - str << (Q_INT32) m_nameDictOffset; - str << (Q_INT32) m_relNameDictOffset; - str << (Q_INT32) m_offerListOffset; - str << (Q_INT32) m_initListOffset; - str << (Q_INT32) m_menuIdDictOffset; + str << (TQ_INT32) m_nameDictOffset; + str << (TQ_INT32) m_relNameDictOffset; + str << (TQ_INT32) m_offerListOffset; + str << (TQ_INT32) m_initListOffset; + str << (TQ_INT32) m_menuIdDictOffset; } void @@ -113,32 +113,32 @@ KBuildServiceFactory::save(TQDataStream &str) { KSycocaFactory::save(str); - m_nameDictOffset = str.device()->at(); + m_nameDictOffset = str.tqdevice()->at(); m_nameDict->save(str); - m_relNameDictOffset = str.device()->at(); + m_relNameDictOffset = str.tqdevice()->at(); m_relNameDict->save(str); saveOfferList(str); saveInitList(str); - m_menuIdDictOffset = str.device()->at(); + m_menuIdDictOffset = str.tqdevice()->at(); m_menuIdDict->save(str); - int endOfFactoryData = str.device()->at(); + int endOfFactoryData = str.tqdevice()->at(); // Update header (pass #3) saveHeader(str); // Seek to end. - str.device()->at(endOfFactoryData); + str.tqdevice()->at(endOfFactoryData); } void KBuildServiceFactory::saveOfferList(TQDataStream &str) { - m_offerListOffset = str.device()->at(); + m_offerListOffset = str.tqdevice()->at(); bool isNumber; for(TQDictIterator itserv ( *m_entryDict ); @@ -190,18 +190,18 @@ KBuildServiceFactory::saveOfferList(TQDataStream &str) it2 != services.end(); ++it2) { KService *service = *it2; - str << (Q_INT32) entry->offset(); - str << (Q_INT32) service->offset(); + str << (TQ_INT32) entry->offset(); + str << (TQ_INT32) service->offset(); } } - str << (Q_INT32) 0; // End of list marker (0) + str << (TQ_INT32) 0; // End of list marker (0) } void KBuildServiceFactory::saveInitList(TQDataStream &str) { - m_initListOffset = str.device()->at(); + m_initListOffset = str.tqdevice()->at(); KService::List initList; @@ -215,19 +215,19 @@ KBuildServiceFactory::saveInitList(TQDataStream &str) initList.append(service); } } - str << (Q_INT32) initList.count(); // Nr of init services. + str << (TQ_INT32) initList.count(); // Nr of init services. for(KService::List::Iterator it = initList.begin(); it != initList.end(); ++it) { - str << (Q_INT32) (*it)->offset(); + str << (TQ_INT32) (*it)->offset(); } } void KBuildServiceFactory::addEntry(KSycocaEntry *newEntry, const char *resource) { - if (m_dupeDict.find(newEntry)) + if (m_dupeDict.tqfind(newEntry)) return; KSycocaFactory::addEntry(newEntry, resource); @@ -244,7 +244,7 @@ KBuildServiceFactory::addEntry(KSycocaEntry *newEntry, const char *resource) TQString name = service->desktopEntryName(); m_nameDict->add( name, newEntry ); - m_serviceDict.replace(name, service); + m_serviceDict.tqreplace(name, service); TQString relName = service->desktopEntryPath(); m_relNameDict->add( relName, newEntry ); diff --git a/kded/kbuildservicegroupfactory.cpp b/kded/kbuildservicegroupfactory.cpp index e75931182..a992b885d 100644 --- a/kded/kbuildservicegroupfactory.cpp +++ b/kded/kbuildservicegroupfactory.cpp @@ -59,7 +59,7 @@ KBuildServiceGroupFactory::createEntry( const TQString&, const char * ) void KBuildServiceGroupFactory::addNewEntryTo( const TQString &menuName, KService *newEntry) { KServiceGroup *entry = 0; - KSycocaEntry::Ptr *ptr = m_entryDict->find(menuName); + KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(menuName); if (ptr) entry = dynamic_cast(ptr->data()); @@ -74,7 +74,7 @@ void KBuildServiceGroupFactory::addNewEntryTo( const TQString &menuName, KServic KServiceGroup * KBuildServiceGroupFactory::addNew( const TQString &menuName, const TQString& file, KServiceGroup *entry, bool isDeleted) { - KSycocaEntry::Ptr *ptr = m_entryDict->find(menuName); + KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(menuName); if (ptr) { kdWarning(7021) << "KBuildServiceGroupFactory::addNew( " << menuName << ", " << file << " ): menu already exists!" << endl; @@ -94,14 +94,14 @@ KBuildServiceGroupFactory::addNew( const TQString &menuName, const TQString& fil // Make sure parent dir exists. KServiceGroup *parentEntry = 0; TQString parent = menuName.left(menuName.length()-1); - int i = parent.findRev('/'); + int i = parent.tqfindRev('/'); if (i > 0) { parent = parent.left(i+1); } else { parent = "/"; } parentEntry = 0; - ptr = m_entryDict->find(parent); + ptr = m_entryDict->tqfind(parent); if (ptr) parentEntry = dynamic_cast(ptr->data()); if (!parentEntry) @@ -123,7 +123,7 @@ KBuildServiceGroupFactory::addNewChild( const TQString &parent, const char *reso TQString name = "#parent#"+parent; KServiceGroup *entry = 0; - KSycocaEntry::Ptr *ptr = m_entryDict->find(name); + KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(name); if (ptr) entry = dynamic_cast(ptr->data()); @@ -157,7 +157,7 @@ KBuildServiceGroupFactory::saveHeader(TQDataStream &str) { KSycocaFactory::saveHeader(str); - str << (Q_INT32) m_baseGroupDictOffset; + str << (TQ_INT32) m_baseGroupDictOffset; } void @@ -165,14 +165,14 @@ KBuildServiceGroupFactory::save(TQDataStream &str) { KSycocaFactory::save(str); - m_baseGroupDictOffset = str.device()->at(); + m_baseGroupDictOffset = str.tqdevice()->at(); m_baseGroupDict->save(str); - int endOfFactoryData = str.device()->at(); + int endOfFactoryData = str.tqdevice()->at(); // Update header (pass #3) saveHeader(str); // Seek to end. - str.device()->at(endOfFactoryData); + str.tqdevice()->at(endOfFactoryData); } diff --git a/kded/kbuildservicetypefactory.cpp b/kded/kbuildservicetypefactory.cpp index b5259c5cd..c6a386aca 100644 --- a/kded/kbuildservicetypefactory.cpp +++ b/kded/kbuildservicetypefactory.cpp @@ -69,7 +69,7 @@ KSycocaEntry * KBuildServiceTypeFactory::createEntry(const TQString &file, const char *resource) { TQString name = file; - int pos = name.findRev('/'); + int pos = name.tqfindRev('/'); if (pos != -1) { name = name.mid(pos+1); @@ -133,14 +133,14 @@ void KBuildServiceTypeFactory::saveHeader(TQDataStream &str) { KSycocaFactory::saveHeader(str); - str << (Q_INT32) m_fastPatternOffset; - str << (Q_INT32) m_otherPatternOffset; - str << (Q_INT32) m_propertyTypeDict.count(); + str << (TQ_INT32) m_fastPatternOffset; + str << (TQ_INT32) m_otherPatternOffset; + str << (TQ_INT32) m_propertyTypeDict.count(); TQMapIterator it; for (it = m_propertyTypeDict.begin(); it != m_propertyTypeDict.end(); ++it) { - str << it.key() << (Q_INT32)it.data(); + str << it.key() << (TQ_INT32)it.data(); } } @@ -152,13 +152,13 @@ KBuildServiceTypeFactory::save(TQDataStream &str) savePatternLists(str); - int endOfFactoryData = str.device()->at(); + int endOfFactoryData = str.tqdevice()->at(); // Update header (pass #3) saveHeader(str); // Seek to end. - str.device()->at(endOfFactoryData); + str.tqdevice()->at(endOfFactoryData); } void @@ -183,8 +183,8 @@ KBuildServiceTypeFactory::savePatternLists(TQDataStream &str) for ( ; patit != pat.end() ; ++patit ) { const TQString &pattern = *patit; - if ( pattern.findRev('*') == 0 - && pattern.findRev('.') == 1 + if ( pattern.tqfindRev('*') == 0 + && pattern.tqfindRev('.') == 1 && pattern.length() <= 6 ) // it starts with "*.", has no other '*' and no other '.', and is max 6 chars // => fast patttern @@ -193,20 +193,20 @@ KBuildServiceTypeFactory::savePatternLists(TQDataStream &str) otherPatterns.append( pattern ); // Assumption : there is only one mimetype for that pattern // It doesn't really make sense otherwise, anyway. - dict.replace( pattern, mimeType ); + dict.tqreplace( pattern, mimeType ); } } } // Sort the list - the fast one, useless for the other one fastPatterns.sort(); - Q_INT32 entrySize = 0; - Q_INT32 nrOfEntries = 0; + TQ_INT32 entrySize = 0; + TQ_INT32 nrOfEntries = 0; - m_fastPatternOffset = str.device()->at(); + m_fastPatternOffset = str.tqdevice()->at(); // Write out fastPatternHeader (Pass #1) - str.device()->at(m_fastPatternOffset); + str.tqdevice()->at(m_fastPatternOffset); str << nrOfEntries; str << entrySize; @@ -214,27 +214,27 @@ KBuildServiceTypeFactory::savePatternLists(TQDataStream &str) TQStringList::ConstIterator it = fastPatterns.begin(); for ( ; it != fastPatterns.end() ; ++it ) { - int start = str.device()->at(); + int start = str.tqdevice()->at(); // Justify to 6 chars with spaces, so that the size remains constant // in the database file. TQString paddedPattern = (*it).leftJustify(6).right(4); // remove leading "*." //kdDebug(7021) << TQString("FAST : '%1' '%2'").arg(paddedPattern).arg(dict[(*it)]->name()) << endl; str << paddedPattern; str << dict[(*it)]->offset(); - entrySize = str.device()->at() - start; + entrySize = str.tqdevice()->at() - start; nrOfEntries++; } // store position - m_otherPatternOffset = str.device()->at(); + m_otherPatternOffset = str.tqdevice()->at(); // Write out fastPatternHeader (Pass #2) - str.device()->at(m_fastPatternOffset); + str.tqdevice()->at(m_fastPatternOffset); str << nrOfEntries; str << entrySize; // For the other patterns - str.device()->at(m_otherPatternOffset); + str.tqdevice()->at(m_otherPatternOffset); it = otherPatterns.begin(); for ( ; it != otherPatterns.end() ; ++it ) @@ -267,7 +267,7 @@ KBuildServiceTypeFactory::addEntry(KSycocaEntry *newEntry, const char *resource) TQMap::ConstIterator pit = pd.begin(); for( ; pit != pd.end(); ++pit ) { - if (!m_propertyTypeDict.contains(pit.key())) + if (!m_propertyTypeDict.tqcontains(pit.key())) m_propertyTypeDict.insert(pit.key(), pit.data()); else if (m_propertyTypeDict[pit.key()] != pit.data()) kdWarning(7021) << "Property '"<< pit.key() << "' is defined multiple times ("<< serviceType->name() <<")" < KBSEntryDict; typedef TQValueList KSycocaEntryListList; -static Q_UINT32 newTimestamp = 0; +static TQ_UINT32 newTimestamp = 0; static KBuildServiceFactory *g_bsf = 0; static KBuildServiceGroupFactory *g_bsgf = 0; static KSycocaFactory *g_factory = 0; static KCTimeInfo *g_ctimeInfo = 0; -static TQDict *g_ctimeDict = 0; +static TQDict *g_ctimeDict = 0; static const char *g_resource = 0; static KBSEntryDict *g_entryDict = 0; static KBSEntryDict *g_serviceGroupEntryDict = 0; @@ -160,12 +160,12 @@ void KBuildSycoca::processGnomeVfs() if (line[0] != '\t') { - app = TQString::fromLatin1(line); + app = TQString::tqfromLatin1(line); app.truncate(app.length()-1); } else if (strncmp(line+1, "mime_types=", 11) == 0) { - TQString mimetypes = TQString::fromLatin1(line+12); + TQString mimetypes = TQString::tqfromLatin1(line+12); mimetypes.truncate(mimetypes.length()-1); mimetypes.replace(TQRegExp("\\*"), "all"); KService *s = g_bsf->findServiceByName(app); @@ -186,7 +186,7 @@ void KBuildSycoca::processGnomeVfs() KSycocaEntry *KBuildSycoca::createEntry(const TQString &file, bool addToFactory) { - Q_UINT32 timeStamp = g_ctimeInfo->ctime(file); + TQ_UINT32 timeStamp = g_ctimeInfo->ctime(file); if (!timeStamp) { timeStamp = KGlobal::dirs()->calcResourceHash( g_resource, file, true); @@ -195,23 +195,23 @@ KSycocaEntry *KBuildSycoca::createEntry(const TQString &file, bool addToFactory) if (g_allEntries) { assert(g_ctimeDict); - Q_UINT32 *timeP = (*g_ctimeDict)[file]; - Q_UINT32 oldTimestamp = timeP ? *timeP : 0; + TQ_UINT32 *timeP = (*g_ctimeDict)[file]; + TQ_UINT32 oldTimestamp = timeP ? *timeP : 0; if (timeStamp && (timeStamp == oldTimestamp)) { // Re-use old entry if (g_factory == g_bsgf) // Strip .directory from service-group entries { - entry = g_entryDict->find(file.left(file.length()-10)); + entry = g_entryDict->tqfind(file.left(file.length()-10)); } else if (g_factory == g_bsf) { - entry = g_entryDict->find(file); + entry = g_entryDict->tqfind(file); } else { - entry = g_entryDict->find(file); + entry = g_entryDict->tqfind(file); } // remove from g_ctimeDict; if g_ctimeDict is not empty // after all files have been processed, it means @@ -300,7 +300,7 @@ bool KBuildSycoca::build() ++it1 ) { KSycocaResource res = (*it1); - if (!allResources.contains(res.resource)) + if (!allResources.tqcontains(res.resource)) allResources.append(res.resource); } } @@ -414,7 +414,7 @@ void KBuildSycoca::createMenu(TQString caption, TQString name, VFolderMenu::SubM TQString directoryFile = subMenu->directoryFile; if (directoryFile.isEmpty()) directoryFile = subName+".directory"; - Q_UINT32 timeStamp = g_ctimeInfo->ctime(directoryFile); + TQ_UINT32 timeStamp = g_ctimeInfo->ctime(directoryFile); if (!timeStamp) { timeStamp = KGlobal::dirs()->calcResourceHash( g_resource, directoryFile, true); @@ -423,12 +423,12 @@ void KBuildSycoca::createMenu(TQString caption, TQString name, VFolderMenu::SubM KServiceGroup* entry = 0; if (g_allEntries) { - Q_UINT32 *timeP = (*g_ctimeDict)[directoryFile]; - Q_UINT32 oldTimestamp = timeP ? *timeP : 0; + TQ_UINT32 *timeP = (*g_ctimeDict)[directoryFile]; + TQ_UINT32 oldTimestamp = timeP ? *timeP : 0; if (timeStamp && (timeStamp == oldTimestamp)) { - entry = dynamic_cast (g_serviceGroupEntryDict->find(subName)); + entry = dynamic_cast (g_serviceGroupEntryDict->tqfind(subName)); if (entry && (entry->directoryEntryPath() != directoryFile)) entry = 0; // Can't reuse this one! } @@ -500,7 +500,7 @@ bool KBuildSycoca::recreate() if( build()) // Parse dirs { save(); // Save database - if (m_str->device()->status()) + if (m_str->tqdevice()->status()) database->abort(); // Error m_str = 0L; if (!database->close()) @@ -541,17 +541,17 @@ bool KBuildSycoca::recreate() void KBuildSycoca::save() { // Write header (#pass 1) - m_str->device()->at(0); + m_str->tqdevice()->at(0); - (*m_str) << (Q_INT32) KSycoca::version(); + (*m_str) << (TQ_INT32) KSycoca::version(); KSycocaFactory * servicetypeFactory = 0L; KSycocaFactory * serviceFactory = 0L; for(KSycocaFactory *factory = m_lstFactories->first(); factory; factory = m_lstFactories->next()) { - Q_INT32 aId; - Q_INT32 aOffset; + TQ_INT32 aId; + TQ_INT32 aOffset; aId = factory->factoryId(); if ( aId == KST_KServiceTypeFactory ) servicetypeFactory = factory; @@ -561,7 +561,7 @@ void KBuildSycoca::save() (*m_str) << aId; (*m_str) << aOffset; } - (*m_str) << (Q_INT32) 0; // No more factories. + (*m_str) << (TQ_INT32) 0; // No more factories. // Write KDEDIRS (*m_str) << KGlobal::dirs()->kfsstnd_prefixes(); (*m_str) << newTimestamp; @@ -575,31 +575,31 @@ void KBuildSycoca::save() factory = m_lstFactories->next()) { factory->save(*m_str); - if (m_str->device()->status()) + if (m_str->tqdevice()->status()) return; // error } - int endOfData = m_str->device()->at(); + int endOfData = m_str->tqdevice()->at(); // Write header (#pass 2) - m_str->device()->at(0); + m_str->tqdevice()->at(0); - (*m_str) << (Q_INT32) KSycoca::version(); + (*m_str) << (TQ_INT32) KSycoca::version(); for(KSycocaFactory *factory = m_lstFactories->first(); factory; factory = m_lstFactories->next()) { - Q_INT32 aId; - Q_INT32 aOffset; + TQ_INT32 aId; + TQ_INT32 aOffset; aId = factory->factoryId(); aOffset = factory->offset(); (*m_str) << aId; (*m_str) << aOffset; } - (*m_str) << (Q_INT32) 0; // No more factories. + (*m_str) << (TQ_INT32) 0; // No more factories. // Jump to end of database - m_str->device()->at(endOfData); + m_str->tqdevice()->at(endOfData); } bool KBuildSycoca::checkDirTimestamps( const TQString& dirname, const TQDateTime& stamp, bool top ) @@ -614,11 +614,11 @@ bool KBuildSycoca::checkDirTimestamps( const TQString& dirname, const TQDateTime } } TQDir dir( dirname ); - const QFileInfoList *list = dir.entryInfoList( TQDir::DefaultFilter, TQDir::Unsorted ); + const TQFileInfoList *list = dir.entryInfoList( TQDir::DefaultFilter, TQDir::Unsorted ); if (!list) return true; - for( QFileInfoListIterator it( *list ); + for( TQFileInfoListIterator it( *list ); it.current() != NULL; ++it ) { @@ -640,7 +640,7 @@ bool KBuildSycoca::checkDirTimestamps( const TQString& dirname, const TQDateTime // and also their directories // if all of them all older than the timestamp in file ksycocastamp, this // means that there's no need to rebuild ksycoca -bool KBuildSycoca::checkTimestamps( Q_UINT32 timestamp, const TQStringList &dirs ) +bool KBuildSycoca::checkTimestamps( TQ_UINT32 timestamp, const TQStringList &dirs ) { kdDebug( 7021 ) << "checking file timestamps" << endl; TQDateTime stamp; @@ -806,8 +806,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) KSycoca::self()->disableAutoRebuild(); // Prevent deadlock TQString current_language = KGlobal::locale()->language(); TQString ksycoca_language = KSycoca::self()->language(); - Q_UINT32 current_update_sig = KGlobal::dirs()->calcResourceHash("services", "update_ksycoca", true); - Q_UINT32 ksycoca_update_sig = KSycoca::self()->updateSignature(); + TQ_UINT32 current_update_sig = KGlobal::dirs()->calcResourceHash("services", "update_ksycoca", true); + TQ_UINT32 ksycoca_update_sig = KSycoca::self()->updateSignature(); if ((current_update_sig != ksycoca_update_sig) || (current_language != ksycoca_language) || @@ -822,7 +822,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) g_changeList = new TQStringList; bool checkstamps = incremental && args->isSet("checkstamps") && checkfiles; - Q_UINT32 filestamp = 0; + TQ_UINT32 filestamp = 0; TQStringList oldresourcedirs; if( checkstamps && incremental ) { @@ -859,7 +859,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) cSycocaPath = 0; } - newTimestamp = (Q_UINT32) time(0); + newTimestamp = (TQ_UINT32) time(0); if( checkfiles && ( !checkstamps || !KBuildSycoca::checkTimestamps( filestamp, oldresourcedirs ))) { @@ -874,7 +874,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) KSycoca *oldSycoca = KSycoca::self(); KSycocaFactoryList *factories = new KSycocaFactoryList; g_allEntries = new KSycocaEntryListList; - g_ctimeDict = new TQDict(523); + g_ctimeDict = new TQDict(523); // Must be in same order as in KBuildSycoca::recreate()! factories->append( new KServiceTypeFactory ); diff --git a/kded/kbuildsycoca.h b/kded/kbuildsycoca.h index 0f90c3df6..f98001781 100644 --- a/kded/kbuildsycoca.h +++ b/kded/kbuildsycoca.h @@ -47,7 +47,7 @@ public: */ bool recreate(); - static bool checkTimestamps( Q_UINT32 timestamp, const TQStringList &dirs ); + static bool checkTimestamps( TQ_UINT32 timestamp, const TQStringList &dirs ); static TQStringList existingResourceDirs(); diff --git a/kded/kctimefactory.cpp b/kded/kctimefactory.cpp index 25d78bab0..f268889c4 100644 --- a/kded/kctimefactory.cpp +++ b/kded/kctimefactory.cpp @@ -53,47 +53,47 @@ KCTimeInfo::save(TQDataStream &str) { KSycocaFactory::save(str); - m_dictOffset = str.device()->at(); - TQDictIterator it(ctimeDict); + m_dictOffset = str.tqdevice()->at(); + TQDictIterator it(ctimeDict); while( it.current()) { str << it.currentKey() << *(it.current()); ++it; } - str << TQString::null << (Q_UINT32) 0; + str << TQString::null << (TQ_UINT32) 0; - int endOfFactoryData = str.device()->at(); + int endOfFactoryData = str.tqdevice()->at(); saveHeader(str); - str.device()->at(endOfFactoryData); + str.tqdevice()->at(endOfFactoryData); } void -KCTimeInfo::addCTime(const TQString &path, Q_UINT32 ctime) +KCTimeInfo::addCTime(const TQString &path, TQ_UINT32 ctime) { assert(!path.isEmpty()); - ctimeDict.replace(path, new Q_UINT32(ctime)); + ctimeDict.tqreplace(path, new TQ_UINT32(ctime)); } -Q_UINT32 +TQ_UINT32 KCTimeInfo::ctime(const TQString &path) { - Q_UINT32 *ctimeP = ctimeDict[path]; + TQ_UINT32 *ctimeP = ctimeDict[path]; return ctimeP ? *ctimeP : 0; } void -KCTimeInfo::fillCTimeDict(TQDict &dict) +KCTimeInfo::fillCTimeDict(TQDict &dict) { assert(m_str); - m_str->device()->at(m_dictOffset); + m_str->tqdevice()->at(m_dictOffset); TQString path; - Q_UINT32 ctime; + TQ_UINT32 ctime; while(true) { KSycocaEntry::read(*m_str, path); (*m_str) >> ctime; if (path.isEmpty()) break; - dict.replace(path, new Q_UINT32(ctime)); + dict.tqreplace(path, new TQ_UINT32(ctime)); } } diff --git a/kded/kctimefactory.h b/kded/kctimefactory.h index b878b3033..64cfe6c19 100644 --- a/kded/kctimefactory.h +++ b/kded/kctimefactory.h @@ -50,14 +50,14 @@ public: KSycocaEntry * createEntry(const TQString &, const char *) { return 0; } KSycocaEntry * createEntry(int) { return 0; } - void addCTime(const TQString &path, Q_UINT32 ctime); + void addCTime(const TQString &path, TQ_UINT32 ctime); - Q_UINT32 ctime(const TQString &path); + TQ_UINT32 ctime(const TQString &path); - void fillCTimeDict(TQDict &dict); + void fillCTimeDict(TQDict &dict); protected: - TQDict ctimeDict; + TQDict ctimeDict; int m_dictOffset; }; diff --git a/kded/kde-menu.cpp b/kded/kde-menu.cpp index 89ee5a857..873ce154d 100644 --- a/kded/kde-menu.cpp +++ b/kded/kde-menu.cpp @@ -96,7 +96,7 @@ static void findMenuEntry(KServiceGroup::Ptr parent, const TQString &name, const DCOPRef kicker( "kicker", "kicker" ); bool result = kicker.call( "highlightMenuItem", menuId ); if (!result) - error(3, i18n("Menu item '%1' could not be highlighted.").arg(menuId).local8Bit()); + error(3, TQString(i18n("Menu item '%1' could not be highlighted.").arg(menuId)).local8Bit()); } exit(0); } diff --git a/kded/kded.cpp b/kded/kded.cpp index d33bfc6b3..7f8ec9121 100644 --- a/kded/kded.cpp +++ b/kded/kded.cpp @@ -247,7 +247,7 @@ void Kded::noDemandLoad(const TQString &obj) KDEDModule *Kded::loadModule(const TQCString &obj, bool onDemand) { - KDEDModule *module = m_modules.find(obj); + KDEDModule *module = m_modules.tqfind(obj); if (module) return module; KService::Ptr s = KService::serviceByDesktopPath("kded/"+obj+".desktop"); @@ -260,7 +260,7 @@ KDEDModule *Kded::loadModule(const KService *s, bool onDemand) if (s && !s->library().isEmpty()) { TQCString obj = s->desktopEntryName().latin1(); - KDEDModule *oldModule = m_modules.find(obj); + KDEDModule *oldModule = m_modules.tqfind(obj); if (oldModule) return oldModule; @@ -374,7 +374,7 @@ void Kded::slotApplicationRemoved(const TQCString &appId) it.current()->removeAll(appId); } - TQValueList *windowIds = m_windowIdList.find(appId); + TQValueList *windowIds = m_windowIdList.tqfind(appId); if (windowIds) { for( TQValueList::ConstIterator it = windowIds->begin(); @@ -428,7 +428,7 @@ void Kded::updateResourceList() it != dirs.end(); ++it ) { - if (m_allResourceDirs.find(*it) == m_allResourceDirs.end()) + if (m_allResourceDirs.tqfind(*it) == m_allResourceDirs.end()) { m_allResourceDirs.append(*it); readDirectory(*it); @@ -577,7 +577,7 @@ void Kded::readDirectory( const TQString& _path ) if ( !d.exists() ) // exists&isdir? { - kdDebug(7020) << TQString("Does not exist! (%1)").arg(_path) << endl; + kdDebug(7020) << TQString(TQString("Does not exist! (%1)").arg(_path)) << endl; return; // return false } @@ -603,18 +603,18 @@ void Kded::readDirectory( const TQString& _path ) bool Kded::isWindowRegistered(long windowId) { - return m_globalWindowIdList.find(windowId) != 0; + return m_globalWindowIdList.tqfind(windowId) != 0; } // DCOP void Kded::registerWindowId(long windowId) { - m_globalWindowIdList.replace(windowId, &windowId); + m_globalWindowIdList.tqreplace(windowId, &windowId); TQCString sender = callingDcopClient()->senderId(); if( sender.isEmpty()) // local call sender = callingDcopClient()->appId(); - TQValueList *windowIds = m_windowIdList.find(sender); + TQValueList *windowIds = m_windowIdList.tqfind(sender); if (!windowIds) { windowIds = new TQValueList; @@ -636,7 +636,7 @@ void Kded::unregisterWindowId(long windowId) TQCString sender = callingDcopClient()->senderId(); if( sender.isEmpty()) // local call sender = callingDcopClient()->appId(); - TQValueList *windowIds = m_windowIdList.find(sender); + TQValueList *windowIds = m_windowIdList.tqfind(sender); if (windowIds) { windowIds->remove(windowId); diff --git a/kded/kded.h b/kded/kded.h index 1b6ebe481..b30549083 100644 --- a/kded/kded.h +++ b/kded/kded.h @@ -173,7 +173,7 @@ private: static Kded *_self; }; -class KUpdateD : public QObject +class KUpdateD : public TQObject { Q_OBJECT public: @@ -200,7 +200,7 @@ private: TQTimer* m_pTimer; }; -class KHostnameD : public QObject +class KHostnameD : public TQObject { Q_OBJECT public: diff --git a/kded/kdedmodule.cpp b/kded/kdedmodule.cpp index ca28a5c62..426ec21da 100644 --- a/kded/kdedmodule.cpp +++ b/kded/kdedmodule.cpp @@ -69,14 +69,14 @@ void KDEDModule::insert(const TQCString &app, const TQCString &key, KShared *obj // appKey acts as a placeholder KEntryKey appKey(app, 0); - d->objMap->replace(appKey, 0); + d->objMap->tqreplace(appKey, 0); KEntryKey indexKey(app, key); // Prevent deletion in case the same object is inserted again. KSharedPtr _obj = obj; - d->objMap->replace(indexKey, _obj); + d->objMap->tqreplace(indexKey, _obj); resetIdle(); } diff --git a/kded/khostname.cpp b/kded/khostname.cpp index 0fa837a2c..4965ae684 100644 --- a/kded/khostname.cpp +++ b/kded/khostname.cpp @@ -82,7 +82,7 @@ KHostName::KHostName() display = ::getenv("DISPLAY"); // strip the screen number from the display - display.replace(TQRegExp("\\.[0-9]+$"), ""); + display.tqreplace(TQRegExp("\\.[0-9]+$"), ""); if (display.isEmpty()) { fprintf(stderr, "%s", i18n("Error: DISPLAY environment variable not set.\n").local8Bit().data()); @@ -145,14 +145,14 @@ void KHostName::changeX() TQCString authName = entries[1]; TQCString authKey = entries[2]; - int i = netId.findRev(':'); + int i = netId.tqfindRev(':'); if (i == -1) continue; TQCString netDisplay = netId.mid(i); if (netDisplay != display) continue; - i = netId.find('/'); + i = netId.tqfind('/'); if (i == -1) continue; @@ -208,7 +208,7 @@ void KHostName::changeDcop() if (!newName.isEmpty()) { - int i = line1.findRev(':'); + int i = line1.tqfindRev(':'); if (i == -1) { fprintf(stderr, "Warning: File '%s' has unexpected format.\n", fname.data()); @@ -299,8 +299,8 @@ void KHostName::changeDcop() void KHostName::changeStdDirs(const TQCString &type) { // We make links to the old dirs cause we can't delete the old dirs. - TQCString oldDir = TQFile::encodeName(TQString("%1%2-%3").arg(KGlobal::dirs()->localkdedir()).arg(type).arg(oldName)); - TQCString newDir = TQFile::encodeName(TQString("%1%2-%3").arg(KGlobal::dirs()->localkdedir()).arg(type).arg(newName)); + TQCString oldDir = TQFile::encodeName(TQString("%1%2-%3").arg(KGlobal::dirs()->localkdedir()).arg(type.data()).arg(oldName.data())); + TQCString newDir = TQFile::encodeName(TQString("%1%2-%3").arg(KGlobal::dirs()->localkdedir()).arg(type.data()).arg(newName.data())); KDE_struct_stat st_buf; @@ -340,7 +340,7 @@ void KHostName::changeSessionManager() fprintf(stderr, "Warning: No session management specified.\n"); return; } - int i = sm.findRev(':'); + int i = sm.tqfindRev(':'); if ((i == -1) || (sm.left(6) != "local/")) { fprintf(stderr, "Warning: Session Management socket '%s' has unexpected format.\n", sm.data()); diff --git a/kded/vfolder_menu.cpp b/kded/vfolder_menu.cpp index b48662cb2..c2321cf39 100644 --- a/kded/vfolder_menu.cpp +++ b/kded/vfolder_menu.cpp @@ -39,7 +39,7 @@ static void foldNode(TQDomElement &docElem, TQDomElement &e, TQMap::iterator it = dupeList.find(s); + TQMap::iterator it = dupeList.tqfind(s); if (it != dupeList.end()) { kdDebug(7021) << e.tagName() << " and " << s << " requires combining!" << endl; @@ -69,7 +69,7 @@ static void replaceNode(TQDomElement &docElem, TQDomNode &n, const TQStringList void VFolderMenu::registerFile(const TQString &file) { - int i = file.findRev('/'); + int i = file.tqfindRev('/'); if (i < 0) return; @@ -108,8 +108,8 @@ TQStringList VFolderMenu::allDirectories() static void track(const TQString &menuId, const TQString &menuName, TQDict *includeList, TQDict *excludeList, TQDict *itemList, const TQString &comment) { - if (itemList->find(menuId)) - printf("%s: %s INCL %d EXCL %d\n", menuName.latin1(), comment.latin1(), includeList->find(menuId) ? 1 : 0, excludeList->find(menuId) ? 1 : 0); + if (itemList->tqfind(menuId)) + printf("%s: %s INCL %d EXCL %d\n", menuName.latin1(), comment.latin1(), includeList->tqfind(menuId) ? 1 : 0, excludeList->tqfind(menuId) ? 1 : 0); } void @@ -117,7 +117,7 @@ VFolderMenu::includeItems(TQDict *items1, TQDict *items2) { for(TQDictIterator it(*items2); it.current(); ++it) { - items1->replace(it.current()->menuId(), it.current()); + items1->tqreplace(it.current()->menuId(), it.current()); } } @@ -128,7 +128,7 @@ VFolderMenu::matchItems(TQDict *items1, TQDict *items2) { TQString id = it.current()->menuId(); ++it; - if (!items2->find(id)) + if (!items2->tqfind(id)) items1->remove(id); } } @@ -145,7 +145,7 @@ VFolderMenu::excludeItems(TQDict *items1, TQDict *items2) VFolderMenu::SubMenu* VFolderMenu::takeSubMenu(SubMenu *parentMenu, const TQString &menuName) { - int i = menuName.find('/'); + int i = menuName.tqfind('/'); TQString s1 = i > 0 ? menuName.left(i) : menuName; TQString s2 = menuName.mid(i+1); @@ -231,7 +231,7 @@ VFolderMenu::mergeMenu(SubMenu *menu1, SubMenu *menu2, bool reversePriority) void VFolderMenu::insertSubMenu(SubMenu *parentMenu, const TQString &menuName, SubMenu *newMenu, bool reversePriority) { - int i = menuName.find('/'); + int i = menuName.tqfind('/'); TQString s1 = menuName.left(i); TQString s2 = menuName.mid(i+1); @@ -271,12 +271,12 @@ VFolderMenu::insertSubMenu(SubMenu *parentMenu, const TQString &menuName, SubMen void VFolderMenu::insertService(SubMenu *parentMenu, const TQString &name, KService *newService) { - int i = name.find('/'); + int i = name.tqfind('/'); if (i == -1) { // Add it here - parentMenu->items.replace(newService->menuId(), newService); + parentMenu->items.tqreplace(newService->menuId(), newService); return; } @@ -324,7 +324,7 @@ VFolderMenu::~VFolderMenu() for(appsInfo *info = m_appsInfoStack.first(); \ info; info = m_appsInfoStack.next()) \ { \ - KService::List *list = info->dictCategories.find(category); \ + KService::List *list = info->dictCategories.tqfind(category); \ if (list) for(KService::List::ConstIterator it = list->begin(); \ it != list->end(); ++it) \ { @@ -336,7 +336,7 @@ VFolderMenu::findApplication(const TQString &relPath) for(appsInfo *info = m_appsInfoStack.first(); info; info = m_appsInfoStack.next()) { - KService *s = info->applications.find(relPath); + KService *s = info->applications.tqfind(relPath); if (s) return s; } @@ -347,7 +347,7 @@ void VFolderMenu::addApplication(const TQString &id, KService *service) { service->setMenuId(id); - m_appsInfo->applications.replace(id, service); + m_appsInfo->applications.tqreplace(id, service); } void @@ -364,7 +364,7 @@ VFolderMenu::buildApplicationIndex(bool unusedOnly) KService *s = it.current(); TQDictIterator tmpIt = it; ++it; - if (unusedOnly && m_usedAppsDict.find(s->menuId())) + if (unusedOnly && m_usedAppsDict.tqfind(s->menuId())) { // Remove and skip this one info->applications.remove(tmpIt.currentKey()); @@ -376,7 +376,7 @@ VFolderMenu::buildApplicationIndex(bool unusedOnly) it2 != cats.end(); ++it2) { const TQString &cat = *it2; - KService::List *list = info->dictCategories.find(cat); + KService::List *list = info->dictCategories.tqfind(cat); if (!list) { list = new KService::List(); @@ -428,7 +428,7 @@ VFolderMenu::unloadAppsInfo() m_appsInfo = 0; } -QString +TQString VFolderMenu::absoluteDir(const TQString &_dir, const TQString &baseDir, bool keepRelativeToCfg) { TQString dir = _dir; @@ -471,7 +471,7 @@ static void tagBasePath(TQDomDocument &doc, const TQString &tag, const TQString } } -QDomDocument +TQDomDocument VFolderMenu::loadDoc() { TQDomDocument doc; @@ -603,7 +603,7 @@ VFolderMenu::mergeMenus(TQDomElement &docElem, TQString &name) else if( e.tagName() == "Menu") { TQString name; mergeMenus(e, name); - TQMap::iterator it = menuNodes.find(name); + TQMap::iterator it = menuNodes.tqfind(name); if (it != menuNodes.end()) { TQDomElement docElem2 = *it; @@ -719,7 +719,7 @@ VFolderMenu::pushDocInfo(const TQString &fileName, const TQString &baseDir) return; } int i; - i = baseName.findRev('/'); + i = baseName.tqfindRev('/'); if (i > 0) { m_docInfo.baseDir = baseName.left(i+1); @@ -739,7 +739,7 @@ VFolderMenu::pushDocInfoParent(const TQString &basePath, const TQString &baseDir m_docInfo.baseDir = baseDir; - TQString fileName = basePath.mid(basePath.findRev('/')+1); + TQString fileName = basePath.mid(basePath.tqfindRev('/')+1); m_docInfo.baseName = fileName.left( fileName.length() - 5 ); TQString baseName = TQDir::cleanDirPath(m_docInfo.baseDir + fileName); @@ -762,7 +762,7 @@ VFolderMenu::popDocInfo() m_docInfo = m_docInfoStack.pop(); } -QString +TQString VFolderMenu::locateMenuFile(const TQString &fileName) { if (!TQDir::isRelativePath(fileName)) @@ -800,7 +800,7 @@ VFolderMenu::locateMenuFile(const TQString &fileName) return result; } -QString +TQString VFolderMenu::locateDirectoryFile(const TQString &fileName) { if (fileName.isEmpty()) @@ -937,7 +937,7 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict *items) FOR_ALL_APPLICATIONS(it) { KService *s = it.current(); - items->replace(s->menuId(), s); + items->tqreplace(s->menuId(), s); } FOR_ALL_APPLICATIONS_END @@ -958,7 +958,7 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict *items) FOR_CATEGORY(domElem.text(), it) { KService *s = *it; - items->replace(s->menuId(), s); + items->tqreplace(s->menuId(), s); } FOR_CATEGORY_END } @@ -967,7 +967,7 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict *items) FOR_ALL_APPLICATIONS(it) { KService *s = it.current(); - items->replace(s->menuId(), s); + items->tqreplace(s->menuId(), s); } FOR_ALL_APPLICATIONS_END } @@ -977,7 +977,7 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict *items) kdDebug(7021) << "Adding file " << filename << endl; KService *s = findApplication(filename); if (s) - items->replace(filename, s); + items->tqreplace(filename, s); } } @@ -1000,7 +1000,7 @@ VFolderMenu::loadApplications(const TQString &dir, const TQString &prefix) while( ( ep = readdir( dp ) ) != 0L ) { TQString fn( TQFile::decodeName(ep->d_name)); - if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1).latin1() == '~') + if (fn == _dot || fn == _dotdot || TQChar(fn.at(fn.length() - 1)).latin1() == '~') continue; TQString pathfn = dir + fn; @@ -1071,7 +1071,7 @@ kdDebug(7021) << "processKDELegacyDirs()" << endl; { TQString id = name; // Strip path from id - int i = id.findRev('/'); + int i = id.tqfindRev('/'); if (i >= 0) id = id.mid(i+1); @@ -1079,7 +1079,7 @@ kdDebug(7021) << "processKDELegacyDirs()" << endl; // TODO: add Legacy category addApplication(id, service); - items.replace(service->menuId(), service); + items.tqreplace(service->menuId(), service); if (service->categories().isEmpty()) insertService(m_currentMenu, name, service); @@ -1110,7 +1110,7 @@ kdDebug(7021) << "processLegacyDir(" << dir << ", " << relDir << ", " << prefix while( ( ep = readdir( dp ) ) != 0L ) { TQString fn( TQFile::decodeName(ep->d_name)); - if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1).latin1() == '~') + if (fn == _dot || fn == _dotdot || TQChar(fn.at(fn.length() - 1)).latin1() == '~') continue; TQString pathfn = dir + fn; @@ -1144,10 +1144,10 @@ kdDebug(7021) << "processLegacyDir(" << dir << ", " << relDir << ", " << prefix // TODO: Add legacy category addApplication(id, service); - items.replace(service->menuId(), service); + items.tqreplace(service->menuId(), service); if (service->categories().isEmpty()) - m_currentMenu->items.replace(id, service); + m_currentMenu->items.tqreplace(id, service); } } } @@ -1305,7 +1305,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << endl; processKDELegacyDirs(); - m_legacyNodes.replace("", m_currentMenu); + m_legacyNodes.tqreplace("", m_currentMenu); m_currentMenu = oldMenu; kdeLegacyDirsDone = true; @@ -1318,7 +1318,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << endl; TQString prefix = e.attributes().namedItem("prefix").toAttr().value(); - if (m_defaultLegacyDirs.contains(dir)) + if (m_defaultLegacyDirs.tqcontains(dir)) { if (!kdeLegacyDirsDone) { @@ -1328,7 +1328,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl; processKDELegacyDirs(); - m_legacyNodes.replace("", m_currentMenu); + m_legacyNodes.tqreplace("", m_currentMenu); m_currentMenu = oldMenu; kdeLegacyDirsDone = true; @@ -1343,7 +1343,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl; processLegacyDir(dir, TQString::null, prefix); - m_legacyNodes.replace(dir, m_currentMenu); + m_legacyNodes.tqreplace(dir, m_currentMenu); m_currentMenu = oldMenu; } } @@ -1421,7 +1421,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl; { // Add legacy nodes to Menu structure TQString dir = absoluteDir(e.text(), e.attribute("__BaseDir")); - SubMenu *legacyMenu = m_legacyNodes.find(dir); + SubMenu *legacyMenu = m_legacyNodes.tqfind(dir); if (legacyMenu) { mergeMenu(m_currentMenu, legacyMenu); @@ -1432,7 +1432,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl; { // Add legacy nodes to Menu structure TQString dir = ""; - SubMenu *legacyMenu = m_legacyNodes.find(dir); + SubMenu *legacyMenu = m_legacyNodes.tqfind(dir); if (legacyMenu) { mergeMenu(m_currentMenu, legacyMenu); @@ -1618,7 +1618,7 @@ VFolderMenu::markUsedApplications(TQDict *items) { for(TQDictIterator it(*items); it.current(); ++it) { - m_usedAppsDict.replace(it.current()->menuId(), it.current()); + m_usedAppsDict.tqreplace(it.current()->menuId(), it.current()); } } diff --git a/kded/vfolder_menu.h b/kded/vfolder_menu.h index ce7183056..a2536af7d 100644 --- a/kded/vfolder_menu.h +++ b/kded/vfolder_menu.h @@ -29,7 +29,7 @@ #include -class VFolderMenu : public QObject +class VFolderMenu : public TQObject { Q_OBJECT public: diff --git a/kdefx/kdrawutil.cpp b/kdefx/kdrawutil.cpp index 0fccb94f1..83fe7d300 100644 --- a/kdefx/kdrawutil.cpp +++ b/kdefx/kdrawutil.cpp @@ -143,21 +143,21 @@ KDEFX_EXPORT void kDrawRoundButton(TQPainter *p, int x, int y, int w, int h, kDrawRoundButton(p, r, g, sunken); } -#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2) +#define QCOORDARRLEN(x) sizeof(x)/(sizeof(TQCOORD)*2) KDEFX_EXPORT void kDrawRoundMask(TQPainter *p, int x, int y, int w, int h, bool clear) { // round edge fills - static const QCOORD btm_left_fill[]={ 0,0,1,0,2,0,3,0,4,0,0,1,1,1,2,1,3,1,4,1, + static const TQCOORD btm_left_fill[]={ 0,0,1,0,2,0,3,0,4,0,0,1,1,1,2,1,3,1,4,1, 1,2,2,2,3,2,4,2,2,3,3,3,4,3,3,4,4,4 }; - static const QCOORD btm_right_fill[]={ 0,0,1,0,2,0,3,0,4,0,0,1,1,1,2,1,3,1,4, + static const TQCOORD btm_right_fill[]={ 0,0,1,0,2,0,3,0,4,0,0,1,1,1,2,1,3,1,4, 1,0,2,1,2,2,2,3,2,0,3,1,3,2,3,0,4,1,4 }; - static const QCOORD top_left_fill[]={ 3,0,4,0,2,1,3,1,4,1,1,2,2,2,3,2,4,2,0,3, + static const TQCOORD top_left_fill[]={ 3,0,4,0,2,1,3,1,4,1,1,2,2,2,3,2,4,2,0,3, 1,3,2,3,3,3,4,3,0,4,1,4,2,4,3,4,4,4 }; - static const QCOORD top_right_fill[]={ 0,0,1,0,0,1,1,1,2,1,0,2,1,2,2,2,3,2,0, + static const TQCOORD top_right_fill[]={ 0,0,1,0,0,1,1,1,2,1,0,2,1,2,2,2,3,2,0, 3,1,3,2,3,3,3,4,3,0,4,1,4,2,4,3,4,4,4 }; if(clear) diff --git a/kdefx/kdrawutil.h b/kdefx/kdrawutil.h index 27be8ac58..6aa0f3c44 100644 --- a/kdefx/kdrawutil.h +++ b/kdefx/kdrawutil.h @@ -125,7 +125,7 @@ KDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h); * @c \#include @c * * Paints the pixels covered by a round button of the given size with - * Qt::color1. This function is useful in TQStyle::drawControlMask(). + * Qt::color1. This function is useful in TQStyle::tqdrawControlMask(). * * @param p The painter to use for drawing the button. * @param x The X coordinate of the button. diff --git a/kdefx/kimageeffect.cpp b/kdefx/kimageeffect.cpp index eee05b497..80b3c3e68 100644 --- a/kdefx/kimageeffect.cpp +++ b/kdefx/kimageeffect.cpp @@ -84,9 +84,9 @@ inline const T& fxClamp( const T& x, const T& low, const T& high ) static inline unsigned int intensityValue(unsigned int color) { - return((unsigned int)((0.299*qRed(color) + - 0.587*qGreen(color) + - 0.1140000000000001*qBlue(color)))); + return((unsigned int)((0.299*tqRed(color) + + 0.587*tqGreen(color) + + 0.1140000000000001*tqBlue(color)))); } template @@ -164,7 +164,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca, gl += gcdelta; bl += bcdelta; - rgb = qRgb( (rl>>16), (gl>>16), (bl>>16) ); + rgb = tqRgb( (rl>>16), (gl>>16), (bl>>16) ); for( x = 0; x < size.width(); x++ ) { *p = rgb; @@ -188,7 +188,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca, gl += gcdelta; bl += bcdelta; - *src++ = qRgb( (rl>>16), (gl>>16), (bl>>16)); + *src++ = tqRgb( (rl>>16), (gl>>16), (bl>>16)); } src = o_src; @@ -253,7 +253,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca, for (y = 0; y < size.height(); y++) { unsigned int *scanline = (unsigned int *)image.scanLine(y); for (x = 0; x < size.width(); x++) { - scanline[x] = qRgb(xtable[0][x] + ytable[0][y], + scanline[x] = tqRgb(xtable[0][x] + ytable[0][y], xtable[1][x] + ytable[1][y], xtable[2][x] + ytable[2][y]); } @@ -310,12 +310,12 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca, for (x = 0; x < w; x++, x2--) { unsigned int rgb = 0; if (eff == PyramidGradient) { - rgb = qRgb(rcb-rSign*(xtable[0][x]+ytable[0][y]), + rgb = tqRgb(rcb-rSign*(xtable[0][x]+ytable[0][y]), gcb-gSign*(xtable[1][x]+ytable[1][y]), bcb-bSign*(xtable[2][x]+ytable[2][y])); } if (eff == RectangleGradient) { - rgb = qRgb(rcb - rSign * + rgb = tqRgb(rcb - rSign * QMAX(xtable[0][x], ytable[0][y]) * 2, gcb - gSign * QMAX(xtable[1][x], ytable[1][y]) * 2, @@ -323,7 +323,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca, QMAX(xtable[2][x], ytable[2][y]) * 2); } if (eff == PipeCrossGradient) { - rgb = qRgb(rcb - rSign * + rgb = tqRgb(rcb - rSign * QMIN(xtable[0][x], ytable[0][y]) * 2, gcb - gSign * QMIN(xtable[1][x], ytable[1][y]) * 2, @@ -331,7 +331,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca, QMIN(xtable[2][x], ytable[2][y]) * 2); } if (eff == EllipticGradient) { - rgb = qRgb(rcb - rSign * + rgb = tqRgb(rcb - rSign * (int)sqrt((xtable[0][x]*xtable[0][x] + ytable[0][y]*ytable[0][y])*2.0), gcb - gSign * @@ -360,7 +360,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca, if (ncols && (TQPixmap::defaultDepth() < 15 )) { if ( ncols < 2 || ncols > 256 ) ncols = 3; - TQColor *dPal = new QColor[ncols]; + TQColor *dPal = new TQColor[ncols]; for (int i=0; i 256 ) ncols = 3; - TQColor *dPal = new QColor[ncols]; + TQColor *dPal = new TQColor[ncols]; for (int i=0; i 255 ? 255 : r + segTbl[r]; g = g + segTbl[g] > 255 ? 255 : g + segTbl[g]; b = b + segTbl[b] > 255 ? 255 : b + segTbl[b]; - data[i] = qRgba(r, g, b,a); + data[i] = tqRgba(r, g, b,a); } } else{ for(int i=0; i < pixels; ++i){ - int r = qRed(data[i]); - int g = qGreen(data[i]); - int b = qBlue(data[i]); - int a = qAlpha(data[i]); + int r = tqRed(data[i]); + int g = tqGreen(data[i]); + int b = tqBlue(data[i]); + int a = tqAlpha(data[i]); r = r - segTbl[r] < 0 ? 0 : r - segTbl[r]; g = g - segTbl[g] < 0 ? 0 : g - segTbl[g]; b = b - segTbl[b] < 0 ? 0 : b - segTbl[b]; - data[i] = qRgba(r, g, b, a); + data[i] = tqRgba(r, g, b, a); } } delete [] segTbl; @@ -883,23 +883,23 @@ TQImage& KImageEffect::channelIntensity(TQImage &image, float percent, if(brighten){ // same here if(channel == Red){ // and here ;-) for(int i=0; i < pixels; ++i){ - int c = qRed(data[i]); + int c = tqRed(data[i]); c = c + segTbl[c] > 255 ? 255 : c + segTbl[c]; - data[i] = qRgba(c, qGreen(data[i]), qBlue(data[i]), qAlpha(data[i])); + data[i] = tqRgba(c, tqGreen(data[i]), tqBlue(data[i]), tqAlpha(data[i])); } } else if(channel == Green){ for(int i=0; i < pixels; ++i){ - int c = qGreen(data[i]); + int c = tqGreen(data[i]); c = c + segTbl[c] > 255 ? 255 : c + segTbl[c]; - data[i] = qRgba(qRed(data[i]), c, qBlue(data[i]), qAlpha(data[i])); + data[i] = tqRgba(tqRed(data[i]), c, tqBlue(data[i]), tqAlpha(data[i])); } } else{ for(int i=0; i < pixels; ++i){ - int c = qBlue(data[i]); + int c = tqBlue(data[i]); c = c + segTbl[c] > 255 ? 255 : c + segTbl[c]; - data[i] = qRgba(qRed(data[i]), qGreen(data[i]), c, qAlpha(data[i])); + data[i] = tqRgba(tqRed(data[i]), tqGreen(data[i]), c, tqAlpha(data[i])); } } @@ -907,23 +907,23 @@ TQImage& KImageEffect::channelIntensity(TQImage &image, float percent, else{ if(channel == Red){ for(int i=0; i < pixels; ++i){ - int c = qRed(data[i]); + int c = tqRed(data[i]); c = c - segTbl[c] < 0 ? 0 : c - segTbl[c]; - data[i] = qRgba(c, qGreen(data[i]), qBlue(data[i]), qAlpha(data[i])); + data[i] = tqRgba(c, tqGreen(data[i]), tqBlue(data[i]), tqAlpha(data[i])); } } else if(channel == Green){ for(int i=0; i < pixels; ++i){ - int c = qGreen(data[i]); + int c = tqGreen(data[i]); c = c - segTbl[c] < 0 ? 0 : c - segTbl[c]; - data[i] = qRgba(qRed(data[i]), c, qBlue(data[i]), qAlpha(data[i])); + data[i] = tqRgba(tqRed(data[i]), c, tqBlue(data[i]), tqAlpha(data[i])); } } else{ for(int i=0; i < pixels; ++i){ - int c = qBlue(data[i]); + int c = tqBlue(data[i]); c = c - segTbl[c] < 0 ? 0 : c - segTbl[c]; - data[i] = qRgba(qRed(data[i]), qGreen(data[i]), c, qAlpha(data[i])); + data[i] = tqRgba(tqRed(data[i]), tqGreen(data[i]), c, tqAlpha(data[i])); } } } @@ -982,22 +982,22 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse, color1 = *data1; if (type == Intensity || type == Contrast) { - r = qRed(color1); - g = qGreen(color1); - b = qBlue(color1); + r = tqRed(color1); + g = tqGreen(color1); + b = tqBlue(color1); if (channel != All) { - mod = (channel == Red) ? qRed(color2) : - (channel == Green) ? qGreen(color2) : - (channel == Blue) ? qBlue(color2) : - (channel == Gray) ? qGray(color2) : 0; + mod = (channel == Red) ? tqRed(color2) : + (channel == Green) ? tqGreen(color2) : + (channel == Blue) ? tqBlue(color2) : + (channel == Gray) ? tqGray(color2) : 0; mod = mod*factor/50; } if (type == Intensity) { if (channel == All) { - r += r * factor/50 * qRed(color2)/256; - g += g * factor/50 * qGreen(color2)/256; - b += b * factor/50 * qBlue(color2)/256; + r += r * factor/50 * tqRed(color2)/256; + g += g * factor/50 * tqGreen(color2)/256; + b += b * factor/50 * tqBlue(color2)/256; } else { r += r * mod/256; @@ -1007,9 +1007,9 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse, } else { // Contrast if (channel == All) { - r += (r-128) * factor/50 * qRed(color2)/128; - g += (g-128) * factor/50 * qGreen(color2)/128; - b += (b-128) * factor/50 * qBlue(color2)/128; + r += (r-128) * factor/50 * tqRed(color2)/128; + g += (g-128) * factor/50 * tqGreen(color2)/128; + b += (b-128) * factor/50 * tqBlue(color2)/128; } else { r += (r-128) * mod/128; @@ -1021,16 +1021,16 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse, if (r<0) r=0; if (r>255) r=255; if (g<0) g=0; if (g>255) g=255; if (b<0) b=0; if (b>255) b=255; - a = qAlpha(*data1); - *data1 = qRgba(r, g, b, a); + a = tqAlpha(*data1); + *data1 = tqRgba(r, g, b, a); } else if (type == Saturation || type == HueShift) { clr.setRgb(color1); clr.hsv(&h, &s, &v); - mod = (channel == Red) ? qRed(color2) : - (channel == Green) ? qGreen(color2) : - (channel == Blue) ? qBlue(color2) : - (channel == Gray) ? qGray(color2) : 0; + mod = (channel == Red) ? tqRed(color2) : + (channel == Green) ? tqGreen(color2) : + (channel == Blue) ? tqBlue(color2) : + (channel == Gray) ? tqGray(color2) : 0; mod = mod*factor/50; if (type == Saturation) { @@ -1044,7 +1044,7 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse, } clr.setHsv(h, s, v); - a = qAlpha(*data1); + a = tqAlpha(*data1); *data1 = clr.rgb() | ((uint)(a & 0xff) << 24); } data1++; data2++; data2b++; x++; @@ -1083,14 +1083,14 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity) #ifdef USE_SSE2_INLINE_ASM if ( KCPUInfo::haveExtension( KCPUInfo::IntelSSE2 ) && pixels > 16 ) { - Q_UINT16 alpha = Q_UINT16( ( 1.0 - opacity ) * 256.0 ); + TQ_UINT16 alpha = TQ_UINT16( ( 1.0 - opacity ) * 256.0 ); KIE8Pack packedalpha = { { alpha, alpha, alpha, 256, alpha, alpha, alpha, 256 } }; - Q_UINT16 red = Q_UINT16( clr.red() * 256 * opacity ); - Q_UINT16 green = Q_UINT16( clr.green() * 256 * opacity ); - Q_UINT16 blue = Q_UINT16( clr.blue() * 256 * opacity ); + TQ_UINT16 red = TQ_UINT16( clr.red() * 256 * opacity ); + TQ_UINT16 green = TQ_UINT16( clr.green() * 256 * opacity ); + TQ_UINT16 blue = TQ_UINT16( clr.blue() * 256 * opacity ); KIE8Pack packedcolor = { { blue, green, red, 0, blue, green, red, 0 } }; @@ -1103,10 +1103,10 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity) : : "r"(&packedalpha), "r"(&packedcolor), "m"(packedcolor), "m"(packedalpha) ); - Q_UINT32 *data = reinterpret_cast( dst.bits() ); + TQ_UINT32 *data = reinterpret_cast( dst.bits() ); - // Check how many pixels we need to process to achieve 16 byte alignment - int offset = (16 - (Q_UINT32( data ) & 0x0f)) / 4; + // Check how many pixels we need to process to achieve 16 byte tqalignment + int offset = (16 - (TQ_UINT32( data ) & 0x0f)) / 4; // The main loop processes 8 pixels / iteration int remainder = (pixels - offset) % 8; @@ -1188,12 +1188,12 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity) #ifdef USE_MMX_INLINE_ASM if ( KCPUInfo::haveExtension( KCPUInfo::IntelMMX ) && pixels > 1 ) { - Q_UINT16 alpha = Q_UINT16( ( 1.0 - opacity ) * 256.0 ); + TQ_UINT16 alpha = TQ_UINT16( ( 1.0 - opacity ) * 256.0 ); KIE4Pack packedalpha = { { alpha, alpha, alpha, 256 } }; - Q_UINT16 red = Q_UINT16( clr.red() * 256 * opacity ); - Q_UINT16 green = Q_UINT16( clr.green() * 256 * opacity ); - Q_UINT16 blue = Q_UINT16( clr.blue() * 256 * opacity ); + TQ_UINT16 red = TQ_UINT16( clr.red() * 256 * opacity ); + TQ_UINT16 green = TQ_UINT16( clr.green() * 256 * opacity ); + TQ_UINT16 blue = TQ_UINT16( clr.blue() * 256 * opacity ); KIE4Pack packedcolor = { { blue, green, red, 0 } }; @@ -1203,7 +1203,7 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity) "movq (%1), %%mm5\n\t" // Set up color * alpha * 256 in MM5 : : "r"(&packedalpha), "r"(&packedcolor), "m"(packedcolor), "m"(packedalpha) ); - Q_UINT32 *data = reinterpret_cast( dst.bits() ); + TQ_UINT32 *data = reinterpret_cast( dst.bits() ); // The main loop processes 4 pixels / iteration int remainder = pixels % 4; @@ -1333,7 +1333,7 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity) #ifdef USE_SSE2_INLINE_ASM if ( KCPUInfo::haveExtension( KCPUInfo::IntelSSE2 ) && pixels > 16 ) { - Q_UINT16 alpha = Q_UINT16( opacity * 256.0 ); + TQ_UINT16 alpha = TQ_UINT16( opacity * 256.0 ); KIE8Pack packedalpha = { { alpha, alpha, alpha, 0, alpha, alpha, alpha, 0 } }; @@ -1343,11 +1343,11 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity) "movdqu (%0), %%xmm6\n\t" // Set up alpha * 256 in XMM6 : : "r"(&packedalpha), "m"(packedalpha) ); - Q_UINT32 *data1 = reinterpret_cast( src.bits() ); - Q_UINT32 *data2 = reinterpret_cast( dst.bits() ); + TQ_UINT32 *data1 = reinterpret_cast( src.bits() ); + TQ_UINT32 *data2 = reinterpret_cast( dst.bits() ); - // Check how many pixels we need to process to achieve 16 byte alignment - int offset = (16 - (Q_UINT32( data2 ) & 0x0f)) / 4; + // Check how many pixels we need to process to achieve 16 byte tqalignment + int offset = (16 - (TQ_UINT32( data2 ) & 0x0f)) / 4; // The main loop processes 4 pixels / iteration int remainder = (pixels - offset) % 4; @@ -1428,7 +1428,7 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity) #ifdef USE_MMX_INLINE_ASM if ( KCPUInfo::haveExtension( KCPUInfo::IntelMMX ) && pixels > 1 ) { - Q_UINT16 alpha = Q_UINT16( opacity * 256.0 ); + TQ_UINT16 alpha = TQ_UINT16( opacity * 256.0 ); KIE4Pack packedalpha = { { alpha, alpha, alpha, 0 } }; // Prepare the MM6 and MM7 registers for blending and unpacking @@ -1437,8 +1437,8 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity) "movq (%0), %%mm6\n\t" // Set up alpha * 256 in MM6 : : "r"(&packedalpha), "m"(packedalpha) ); - Q_UINT32 *data1 = reinterpret_cast( src.bits() ); - Q_UINT32 *data2 = reinterpret_cast( dst.bits() ); + TQ_UINT32 *data1 = reinterpret_cast( src.bits() ); + TQ_UINT32 *data2 = reinterpret_cast( dst.bits() ); // The main loop processes 2 pixels / iteration int remainder = pixels % 2; @@ -1602,17 +1602,17 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity, for (x = xi; x < (int)xf ; x++) { if (eff == HorizontalGradient) intensity += var; ind = x + ind_base; - r = qRed (data[ind]) + (int)(intensity * - (r_bgnd - qRed (data[ind]))); - g = qGreen(data[ind]) + (int)(intensity * - (g_bgnd - qGreen(data[ind]))); - b = qBlue (data[ind]) + (int)(intensity * - (b_bgnd - qBlue (data[ind]))); + r = tqRed (data[ind]) + (int)(intensity * + (r_bgnd - tqRed (data[ind]))); + g = tqGreen(data[ind]) + (int)(intensity * + (g_bgnd - tqGreen(data[ind]))); + b = tqBlue (data[ind]) + (int)(intensity * + (b_bgnd - tqBlue (data[ind]))); if (r > 255) r = 255; if (r < 0 ) r = 0; if (g > 255) g = 255; if (g < 0 ) g = 0; if (b > 255) b = 255; if (b < 0 ) b = 0; - a = qAlpha(data[ind]); - data[ind] = qRgba(r, g, b, a); + a = tqAlpha(data[ind]); + data[ind] = tqRgba(r, g, b, a); } } } @@ -1627,17 +1627,17 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity, for (y = 0; y < image_height ; y++) { intensity = initial_intensity + tmp + yvar * y; - r = qRed (data[ind]) + (int)(intensity * - (r_bgnd - qRed (data[ind]))); - g = qGreen(data[ind]) + (int)(intensity * - (g_bgnd - qGreen(data[ind]))); - b = qBlue (data[ind]) + (int)(intensity * - (b_bgnd - qBlue (data[ind]))); + r = tqRed (data[ind]) + (int)(intensity * + (r_bgnd - tqRed (data[ind]))); + g = tqGreen(data[ind]) + (int)(intensity * + (g_bgnd - tqGreen(data[ind]))); + b = tqBlue (data[ind]) + (int)(intensity * + (b_bgnd - tqBlue (data[ind]))); if (r > 255) r = 255; if (r < 0 ) r = 0; if (g > 255) g = 255; if (g < 0 ) g = 0; if (b > 255) b = 255; if (b < 0 ) b = 0; - a = qAlpha(data[ind]); - data[ind] = qRgba(r, g, b, a); + a = tqAlpha(data[ind]); + data[ind] = tqRgba(r, g, b, a); ind += image_width; } @@ -1662,31 +1662,31 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity, //NW ind = x + image_width * y ; - r = qRed (data[ind]) + (int)(intensity * - (r_bgnd - qRed (data[ind]))); - g = qGreen(data[ind]) + (int)(intensity * - (g_bgnd - qGreen(data[ind]))); - b = qBlue (data[ind]) + (int)(intensity * - (b_bgnd - qBlue (data[ind]))); + r = tqRed (data[ind]) + (int)(intensity * + (r_bgnd - tqRed (data[ind]))); + g = tqGreen(data[ind]) + (int)(intensity * + (g_bgnd - tqGreen(data[ind]))); + b = tqBlue (data[ind]) + (int)(intensity * + (b_bgnd - tqBlue (data[ind]))); if (r > 255) r = 255; if (r < 0 ) r = 0; if (g > 255) g = 255; if (g < 0 ) g = 0; if (b > 255) b = 255; if (b < 0 ) b = 0; - a = qAlpha(data[ind]); - data[ind] = qRgba(r, g, b, a); + a = tqAlpha(data[ind]); + data[ind] = tqRgba(r, g, b, a); //NE ind = image_width - x - 1 + image_width * y ; - r = qRed (data[ind]) + (int)(intensity * - (r_bgnd - qRed (data[ind]))); - g = qGreen(data[ind]) + (int)(intensity * - (g_bgnd - qGreen(data[ind]))); - b = qBlue (data[ind]) + (int)(intensity * - (b_bgnd - qBlue (data[ind]))); + r = tqRed (data[ind]) + (int)(intensity * + (r_bgnd - tqRed (data[ind]))); + g = tqGreen(data[ind]) + (int)(intensity * + (g_bgnd - tqGreen(data[ind]))); + b = tqBlue (data[ind]) + (int)(intensity * + (b_bgnd - tqBlue (data[ind]))); if (r > 255) r = 255; if (r < 0 ) r = 0; if (g > 255) g = 255; if (g < 0 ) g = 0; if (b > 255) b = 255; if (b < 0 ) b = 0; - a = qAlpha(data[ind]); - data[ind] = qRgba(r, g, b, a); + a = tqAlpha(data[ind]); + data[ind] = tqRgba(r, g, b, a); } } @@ -1706,31 +1706,31 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity, //SW ind = x + image_width * (image_height - y -1) ; - r = qRed (data[ind]) + (int)(intensity * - (r_bgnd - qRed (data[ind]))); - g = qGreen(data[ind]) + (int)(intensity * - (g_bgnd - qGreen(data[ind]))); - b = qBlue (data[ind]) + (int)(intensity * - (b_bgnd - qBlue (data[ind]))); + r = tqRed (data[ind]) + (int)(intensity * + (r_bgnd - tqRed (data[ind]))); + g = tqGreen(data[ind]) + (int)(intensity * + (g_bgnd - tqGreen(data[ind]))); + b = tqBlue (data[ind]) + (int)(intensity * + (b_bgnd - tqBlue (data[ind]))); if (r > 255) r = 255; if (r < 0 ) r = 0; if (g > 255) g = 255; if (g < 0 ) g = 0; if (b > 255) b = 255; if (b < 0 ) b = 0; - a = qAlpha(data[ind]); - data[ind] = qRgba(r, g, b, a); + a = tqAlpha(data[ind]); + data[ind] = tqRgba(r, g, b, a); //SE ind = image_width-x-1 + image_width * (image_height - y - 1) ; - r = qRed (data[ind]) + (int)(intensity * - (r_bgnd - qRed (data[ind]))); - g = qGreen(data[ind]) + (int)(intensity * - (g_bgnd - qGreen(data[ind]))); - b = qBlue (data[ind]) + (int)(intensity * - (b_bgnd - qBlue (data[ind]))); + r = tqRed (data[ind]) + (int)(intensity * + (r_bgnd - tqRed (data[ind]))); + g = tqGreen(data[ind]) + (int)(intensity * + (g_bgnd - tqGreen(data[ind]))); + b = tqBlue (data[ind]) + (int)(intensity * + (b_bgnd - tqBlue (data[ind]))); if (r > 255) r = 255; if (r < 0 ) r = 0; if (g > 255) g = 255; if (g < 0 ) g = 0; if (b > 255) b = 255; if (b < 0 ) b = 0; - a = qAlpha(data[ind]); - data[ind] = qRgba(r, g, b, a); + a = tqAlpha(data[ind]); + data[ind] = tqRgba(r, g, b, a); } } } @@ -1809,16 +1809,16 @@ TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2, while(x < (int)x1) { color3 = (colorTable3) ? colorTable3[data3b[ind3]] : data3[ind3]; - a = (channel == Red) ? qRed(color3) : - (channel == Green) ? qGreen(color3) : - (channel == Blue) ? qBlue(color3) : qGray(color3); + a = (channel == Red) ? tqRed(color3) : + (channel == Green) ? tqGreen(color3) : + (channel == Blue) ? tqBlue(color3) : tqGray(color3); - r = (a*qRed(data1[ind1]) + (256-a)*qRed(data2[ind2]))/256; - g = (a*qGreen(data1[ind1]) + (256-a)*qGreen(data2[ind2]))/256; - b = (a*qBlue(data1[ind1]) + (256-a)*qBlue(data2[ind2]))/256; + r = (a*tqRed(data1[ind1]) + (256-a)*tqRed(data2[ind2]))/256; + g = (a*tqGreen(data1[ind1]) + (256-a)*tqGreen(data2[ind2]))/256; + b = (a*tqBlue(data1[ind1]) + (256-a)*tqBlue(data2[ind2]))/256; - a = qAlpha(data1[ind1]); - data1[ind1] = qRgba(r, g, b, a); + a = tqAlpha(data1[ind1]); + data1[ind1] = tqRgba(r, g, b, a); ind1++; ind2++; ind3++; x++; if ( (x%x2) ==0) ind2 -= x2; @@ -1837,13 +1837,13 @@ TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2, unsigned int KImageEffect::lHash(unsigned int c) { - unsigned char r = qRed(c), g = qGreen(c), b = qBlue(c), a = qAlpha(c); + unsigned char r = tqRed(c), g = tqGreen(c), b = tqBlue(c), a = tqAlpha(c); unsigned char nr, ng, nb; nr =(r >> 1) + (r >> 2); nr = nr > r ? 0 : nr; ng =(g >> 1) + (g >> 2); ng = ng > g ? 0 : ng; nb =(b >> 1) + (b >> 2); nb = nb > b ? 0 : nb; - return qRgba(nr, ng, nb, a); + return tqRgba(nr, ng, nb, a); } @@ -1851,13 +1851,13 @@ unsigned int KImageEffect::lHash(unsigned int c) unsigned int KImageEffect::uHash(unsigned int c) { - unsigned char r = qRed(c), g = qGreen(c), b = qBlue(c), a = qAlpha(c); + unsigned char r = tqRed(c), g = tqGreen(c), b = tqBlue(c), a = tqAlpha(c); unsigned char nr, ng, nb; nr = r + (r >> 3); nr = nr < r ? ~0 : nr; ng = g + (g >> 3); ng = ng < g ? ~0 : ng; nb = b + (b >> 3); nb = nb < b ? ~0 : nb; - return qRgba(nr, ng, nb, a); + return tqRgba(nr, ng, nb, a); } @@ -1969,7 +1969,7 @@ TQImage& KImageEffect::flatten(TQImage &img, const TQColor &ca, // pseudocolor for (int i = 0; i < img.numColors(); i++) { col = img.color(i); - int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3; + int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3; min = QMIN(min, mean); max = QMAX(max, mean); } @@ -1978,7 +1978,7 @@ TQImage& KImageEffect::flatten(TQImage &img, const TQColor &ca, for (int y=0; y < img.height(); y++) for (int x=0; x < img.width(); x++) { col = img.pixel(x, y); - int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3; + int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3; min = QMIN(min, mean); max = QMAX(max, mean); } @@ -1994,21 +1994,21 @@ TQImage& KImageEffect::flatten(TQImage &img, const TQColor &ca, if (img.numColors()) { for (int i=0; i < img.numColors(); i++) { col = img.color(i); - int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3; + int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3; int r = (int) (sr * (mean - min) + r1 + 0.5); int g = (int) (sg * (mean - min) + g1 + 0.5); int b = (int) (sb * (mean - min) + b1 + 0.5); - img.setColor(i, qRgba(r, g, b, qAlpha(col))); + img.setColor(i, tqRgba(r, g, b, tqAlpha(col))); } } else { for (int y=0; y < img.height(); y++) for (int x=0; x < img.width(); x++) { col = img.pixel(x, y); - int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3; + int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3; int r = (int) (sr * (mean - min) + r1 + 0.5); int g = (int) (sg * (mean - min) + g1 + 0.5); int b = (int) (sb * (mean - min) + b1 + 0.5); - img.setPixel(x, y, qRgba(r, g, b, qAlpha(col))); + img.setPixel(x, y, tqRgba(r, g, b, tqAlpha(col))); } } @@ -2020,7 +2020,7 @@ TQImage& KImageEffect::flatten(TQImage &img, const TQColor &ca, if (ncols == 1) ncols++; if (ncols > 256) ncols = 256; - TQColor *pal = new QColor[ncols]; + TQColor *pal = new TQColor[ncols]; sr = ((float) r2 - r1) / (ncols - 1); sg = ((float) g2 - g1) / (ncols - 1); sb = ((float) b2 - b1) / (ncols - 1); @@ -2065,7 +2065,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color) // pseudo color for (int i=0; i red) r = cr - tbl[cr - red]; else @@ -2078,7 +2078,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color) b = cb - tbl[cb - blue]; else b = cb + tbl[blue - cb]; - img.setColor(i, qRgba(r, g, b, qAlpha(col))); + img.setColor(i, tqRgba(r, g, b, tqAlpha(col))); } } else { @@ -2087,7 +2087,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color) QRgb *data = (QRgb *) img.scanLine(y); for (int x=0; x red) r = cr - tbl[cr - red]; else @@ -2100,7 +2100,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color) b = cb - tbl[cb - blue]; else b = cb + tbl[blue - cb]; - *data++ = qRgba(r, g, b, qAlpha(col)); + *data++ = tqRgba(r, g, b, tqAlpha(col)); } } } @@ -2116,7 +2116,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color) // This code is adapted from code (C) Rik Hemsley // -// The formula used (r + b + g) /3 is different from the qGray formula +// The formula used (r + b + g) /3 is different from the tqGray formula // used by Qt. This is because our formula is much much faster. If, // however, it turns out that this is producing sub-optimal images, // then it will have to change (kurt) @@ -2149,12 +2149,12 @@ TQImage& KImageEffect::toGray(TQImage &img, bool fast) { for (int i = 0; i < img.numColors(); i++) { - register uint r = qRed(img.color(i)); - register uint g = qGreen(img.color(i)); - register uint b = qBlue(img.color(i)); + register uint r = tqRed(img.color(i)); + register uint g = tqGreen(img.color(i)); + register uint b = tqBlue(img.color(i)); register uint gray = (((r + g) >> 1) + b) >> 1; - img.setColor(i, qRgba(gray, gray, gray, qAlpha(img.color(i)))); + img.setColor(i, tqRgba(gray, gray, gray, tqAlpha(img.color(i)))); } } } @@ -2165,8 +2165,8 @@ TQImage& KImageEffect::toGray(TQImage &img, bool fast) (unsigned int *)img.tqcolorTable(); int val, i; for(i=0; i < pixels; ++i){ - val = qGray(data[i]); - data[i] = qRgba(val, val, val, qAlpha(data[i])); + val = tqGray(data[i]); + data[i] = tqRgba(val, val, val, tqAlpha(data[i])); } } return img; @@ -2211,10 +2211,10 @@ TQImage& KImageEffect::contrast(TQImage &img, int c) (unsigned int *)img.tqcolorTable(); int i, r, g, b; for(i=0; i < pixels; ++i){ - r = qRed(data[i]); - g = qGreen(data[i]); - b = qBlue(data[i]); - if(qGray(data[i]) <= 127){ + r = tqRed(data[i]); + g = tqGreen(data[i]); + b = tqBlue(data[i]); + if(tqGray(data[i]) <= 127){ if(r - c > 0) r -= c; else @@ -2242,7 +2242,7 @@ TQImage& KImageEffect::contrast(TQImage &img, int c) else b = 255; } - data[i] = qRgba(r, g, b, qAlpha(data[i])); + data[i] = tqRgba(r, g, b, tqAlpha(data[i])); } return(img); } @@ -2290,11 +2290,11 @@ TQImage& KImageEffect::dither(TQImage &img, const TQColor *palette, int size) for ( i = 0; i < img.width(); i++ ) { - rerr1[i] = rerr2[i] + qRed( *ip ); + rerr1[i] = rerr2[i] + tqRed( *ip ); rerr2[i] = 0; - gerr1[i] = gerr2[i] + qGreen( *ip ); + gerr1[i] = gerr2[i] + tqGreen( *ip ); gerr2[i] = 0; - berr1[i] = berr2[i] + qBlue( *ip ); + berr1[i] = berr2[i] + tqBlue( *ip ); berr2[i] = 0; ip++; } @@ -2404,8 +2404,8 @@ bool KImageEffect::blend( do { - i = upper.scanLine(row); - o = output.scanLine(row); + i = const_cast(upper).scanLine(row); + o = const_cast(output).scanLine(row); col = w << 2; --col; @@ -2484,15 +2484,15 @@ bool KImageEffect::blend( register int j,k; for (j=0; j(&lower.scanLine(y+j) [ (x+cw) << 2 ]); - i=reinterpret_cast(&upper.scanLine(cy+j)[ (cx+cw) << 2 ]); - o=reinterpret_cast(&output.scanLine(j) [ cw << 2 ]); + b=reinterpret_cast(&const_cast(lower).scanLine(y+j) [ (x+cw) << 2 ]); + i=reinterpret_cast(&const_cast(upper).scanLine(cy+j)[ (cx+cw) << 2 ]); + o=reinterpret_cast(&const_cast(output).scanLine(j) [ cw << 2 ]); k=cw-1; --b; --i; --o; do { - while ( !(a=qAlpha(*i)) && k>0 ) + while ( !(a=tqAlpha(*i)) && k>0 ) { i--; // *o=0; @@ -2501,9 +2501,9 @@ bool KImageEffect::blend( k--; }; // *o=0xFF; - *o = qRgb(qRed(*b) + (((qRed(*i) - qRed(*b)) * a) >> 8), - qGreen(*b) + (((qGreen(*i) - qGreen(*b)) * a) >> 8), - qBlue(*b) + (((qBlue(*i) - qBlue(*b)) * a) >> 8)); + *o = tqRgb(tqRed(*b) + (((tqRed(*i) - tqRed(*b)) * a) >> 8), + tqGreen(*b) + (((tqGreen(*i) - tqGreen(*b)) * a) >> 8), + tqBlue(*b) + (((tqBlue(*i) - tqBlue(*b)) * a) >> 8)); --i; --o; --b; } while (k--); } @@ -2543,8 +2543,8 @@ bool KImageEffect::blendOnLower( for (int j=0; j(lower).scanLine(y+j) [ (x+cw) << 2 ]; + i=&const_cast(upper).scanLine(cy+j)[ (cx+cw) << 2 ]; k=cw-1; --b; --i; @@ -2593,12 +2593,12 @@ void KImageEffect::blendOnLower(const TQImage &upper, const TQPoint &upperOffset // blend for (int y = 0; y < lr.height(); y++) { for (int x = 0; x < lr.width(); x++) { - QRgb *b = reinterpret_cast(lower.scanLine(lr.y() + y)+ (lr.x() + x) * sizeof(QRgb)); - QRgb *d = reinterpret_cast(upper.scanLine(upperOffset.y() + y) + (upperOffset.x() + x) * sizeof(QRgb)); - int a = qAlpha(*d); - *b = qRgb(qRed(*b) - (((qRed(*b) - qRed(*d)) * a) >> 8), - qGreen(*b) - (((qGreen(*b) - qGreen(*d)) * a) >> 8), - qBlue(*b) - (((qBlue(*b) - qBlue(*d)) * a) >> 8)); + QRgb *b = reinterpret_cast(const_cast(lower).scanLine(lr.y() + y)+ (lr.x() + x) * sizeof(QRgb)); + QRgb *d = reinterpret_cast(const_cast(upper).scanLine(upperOffset.y() + y) + (upperOffset.x() + x) * sizeof(QRgb)); + int a = tqAlpha(*d); + *b = tqRgb(tqRed(*b) - (((tqRed(*b) - tqRed(*d)) * a) >> 8), + tqGreen(*b) - (((tqGreen(*b) - tqGreen(*d)) * a) >> 8), + tqBlue(*b) - (((tqBlue(*b) - tqBlue(*d)) * a) >> 8)); } } } @@ -2615,12 +2615,12 @@ void KImageEffect::blendOnLower(const TQImage &upper, const TQPoint &upperOffset // blend for (int y = 0; y < lr.height(); y++) { for (int x = 0; x < lr.width(); x++) { - QRgb *b = reinterpret_cast(lower.scanLine(lr.y() + y)+ (lr.x() + x) * sizeof(QRgb)); - QRgb *d = reinterpret_cast(upper.scanLine(upperOffset.y() + y) + (upperOffset.x() + x) * sizeof(QRgb)); - int a = qRound(opacity * qAlpha(*d)); - *b = qRgb(qRed(*b) - (((qRed(*b) - qRed(*d)) * a) >> 8), - qGreen(*b) - (((qGreen(*b) - qGreen(*d)) * a) >> 8), - qBlue(*b) - (((qBlue(*b) - qBlue(*d)) * a) >> 8)); + QRgb *b = reinterpret_cast(const_cast(lower).scanLine(lr.y() + y)+ (lr.x() + x) * sizeof(QRgb)); + QRgb *d = reinterpret_cast(const_cast(upper).scanLine(upperOffset.y() + y) + (upperOffset.x() + x) * sizeof(QRgb)); + int a = tqRound(opacity * tqAlpha(*d)); + *b = tqRgb(tqRed(*b) - (((tqRed(*b) - tqRed(*d)) * a) >> 8), + tqGreen(*b) - (((tqGreen(*b) - tqGreen(*d)) * a) >> 8), + tqBlue(*b) - (((tqBlue(*b) - tqBlue(*d)) * a) >> 8)); } } } @@ -2940,10 +2940,10 @@ TQImage KImageEffect::despeckle(TQImage &src) srcData = (unsigned int *)src.scanLine(y); ++j; for(x=0; x < src.width(); ++x){ - red_channel[j] = qRed(srcData[x]); - green_channel[j] = qGreen(srcData[x]); - blue_channel[j] = qBlue(srcData[x]); - alpha_channel[j] = qAlpha(srcData[x]); + red_channel[j] = tqRed(srcData[x]); + green_channel[j] = tqGreen(srcData[x]); + blue_channel[j] = tqBlue(srcData[x]); + alpha_channel[j] = tqAlpha(srcData[x]); ++j; } ++j; @@ -2958,10 +2958,10 @@ TQImage KImageEffect::despeckle(TQImage &src) ++j; for(x=0; x < src.width(); ++x){ pixel = *(cTable+srcData[x]); - red_channel[j] = qRed(pixel); - green_channel[j] = qGreen(pixel); - blue_channel[j] = qBlue(pixel); - alpha_channel[j] = qAlpha(pixel); + red_channel[j] = tqRed(pixel); + green_channel[j] = tqGreen(pixel); + blue_channel[j] = tqBlue(pixel); + alpha_channel[j] = tqAlpha(pixel); ++j; } ++j; @@ -3000,7 +3000,7 @@ TQImage KImageEffect::despeckle(TQImage &src) ++j; for (x=0; x < dest.width(); ++x) { - destData[x] = qRgba(red_channel[j], green_channel[j], + destData[x] = tqRgba(red_channel[j], green_channel[j], blue_channel[j], alpha_channel[j]); ++j; } @@ -3121,10 +3121,10 @@ TQImage KImageEffect::addNoise(TQImage &src, NoiseType noise_type) srcData = (unsigned int *)src.scanLine(y); destData = (unsigned int *)dest.scanLine(y); for(x=0; x < src.width(); ++x){ - destData[x] = qRgba(generateNoise(qRed(srcData[x]), noise_type), - generateNoise(qGreen(srcData[x]), noise_type), - generateNoise(qBlue(srcData[x]), noise_type), - qAlpha(srcData[x])); + destData[x] = tqRgba(generateNoise(tqRed(srcData[x]), noise_type), + generateNoise(tqGreen(srcData[x]), noise_type), + generateNoise(tqBlue(srcData[x]), noise_type), + tqAlpha(srcData[x])); } } } @@ -3137,10 +3137,10 @@ TQImage KImageEffect::addNoise(TQImage &src, NoiseType noise_type) destData = (unsigned int *)dest.scanLine(y); for(x=0; x < src.width(); ++x){ pixel = *(cTable+srcData[x]); - destData[x] = qRgba(generateNoise(qRed(pixel), noise_type), - generateNoise(qGreen(pixel), noise_type), - generateNoise(qBlue(pixel), noise_type), - qAlpha(pixel)); + destData[x] = tqRgba(generateNoise(tqRed(pixel), noise_type), + generateNoise(tqGreen(pixel), noise_type), + generateNoise(tqBlue(pixel), noise_type), + tqAlpha(pixel)); } } @@ -3233,10 +3233,10 @@ unsigned int KImageEffect::interpolateColor(TQImage *image, double x_offset, alpha = 1.0-x_offset; beta = 1.0-y_offset; - return(qRgba((unsigned char)(beta*(alpha*qRed(p)+x_offset*qRed(q))+y_offset*(alpha*qRed(r)+x_offset*qRed(s))), - (unsigned char)(beta*(alpha*qGreen(p)+x_offset*qGreen(q))+y_offset*(alpha*qGreen(r)+x_offset*qGreen(s))), - (unsigned char)(beta*(alpha*qBlue(p)+x_offset*qBlue(q))+y_offset*(alpha*qBlue(r)+x_offset*qBlue(s))), - (unsigned char)(beta*(alpha*qAlpha(p)+x_offset*qAlpha(q))+y_offset*(alpha*qAlpha(r)+x_offset*qAlpha(s))))); + return(tqRgba((unsigned char)(beta*(alpha*tqRed(p)+x_offset*tqRed(q))+y_offset*(alpha*tqRed(r)+x_offset*tqRed(s))), + (unsigned char)(beta*(alpha*tqGreen(p)+x_offset*tqGreen(q))+y_offset*(alpha*tqGreen(r)+x_offset*tqGreen(s))), + (unsigned char)(beta*(alpha*tqBlue(p)+x_offset*tqBlue(q))+y_offset*(alpha*tqBlue(r)+x_offset*tqBlue(s))), + (unsigned char)(beta*(alpha*tqAlpha(p)+x_offset*tqAlpha(q))+y_offset*(alpha*tqAlpha(r)+x_offset*tqAlpha(s))))); } TQImage KImageEffect::implode(TQImage &src, double factor, @@ -3434,10 +3434,10 @@ void KImageEffect::solarize(TQImage &img, double factor) count = img.width()*img.height(); } for(i=0; i < count; ++i){ - data[i] = qRgba(qRed(data[i]) > threshold ? MaxRGB-qRed(data[i]) : qRed(data[i]), - qGreen(data[i]) > threshold ? MaxRGB-qGreen(data[i]) : qGreen(data[i]), - qBlue(data[i]) > threshold ? MaxRGB-qBlue(data[i]) : qBlue(data[i]), - qAlpha(data[i])); + data[i] = tqRgba(tqRed(data[i]) > threshold ? MaxRGB-tqRed(data[i]) : tqRed(data[i]), + tqGreen(data[i]) > threshold ? MaxRGB-tqGreen(data[i]) : tqGreen(data[i]), + tqBlue(data[i]) > threshold ? MaxRGB-tqBlue(data[i]) : tqBlue(data[i]), + tqAlpha(data[i])); } } @@ -3685,7 +3685,7 @@ TQImage KImageEffect::charcoal(TQImage &src, double radius, double sigma) TQImage img(edge(src, radius)); img = blur(img, radius, sigma); normalize(img); - img.invertPixels(false); + img.tqinvertPixels(false); KImageEffect::toGray(img); return(img); } @@ -3694,7 +3694,7 @@ void KImageEffect::normalize(TQImage &image) { struct double_packet high, low, intensity, *histogram; struct short_packet *normalize_map; - Q_INT64 number_pixels; + TQ_INT64 number_pixels; int x, y; unsigned int *p, *q; register long i; @@ -3725,10 +3725,10 @@ void KImageEffect::normalize(TQImage &image) for(y=0; y < image.height(); ++y){ p = (unsigned int *)image.scanLine(y); for(x=0; x < image.width(); ++x){ - histogram[(unsigned char)(qRed(*p))].red++; - histogram[(unsigned char)(qGreen(*p))].green++; - histogram[(unsigned char)(qBlue(*p))].blue++; - histogram[(unsigned char)(qAlpha(*p))].alpha++; + histogram[(unsigned char)(tqRed(*p))].red++; + histogram[(unsigned char)(tqGreen(*p))].green++; + histogram[(unsigned char)(tqBlue(*p))].blue++; + histogram[(unsigned char)(tqAlpha(*p))].alpha++; p++; } } @@ -3736,7 +3736,7 @@ void KImageEffect::normalize(TQImage &image) /* Find the histogram boundaries by locating the 0.1 percent levels. */ - number_pixels = (Q_INT64)image.width()*image.height(); + number_pixels = (TQ_INT64)image.width()*image.height(); threshold_intensity = number_pixels/1000; /* red */ @@ -3879,22 +3879,22 @@ void KImageEffect::normalize(TQImage &image) q = (unsigned int *)image.scanLine(y); for(x=0; x < image.width(); ++x){ if(low.red != high.red) - r = (normalize_map[(unsigned short)(qRed(q[x]))].red)/257; + r = (normalize_map[(unsigned short)(tqRed(q[x]))].red)/257; else - r = qRed(q[x]); + r = tqRed(q[x]); if(low.green != high.green) - g = (normalize_map[(unsigned short)(qGreen(q[x]))].green)/257; + g = (normalize_map[(unsigned short)(tqGreen(q[x]))].green)/257; else - g = qGreen(q[x]); + g = tqGreen(q[x]); if(low.blue != high.blue) - b = (normalize_map[(unsigned short)(qBlue(q[x]))].blue)/257; + b = (normalize_map[(unsigned short)(tqBlue(q[x]))].blue)/257; else - b = qBlue(q[x]); + b = tqBlue(q[x]); if(low.alpha != high.alpha) - a = (normalize_map[(unsigned short)(qAlpha(q[x]))].alpha)/257; + a = (normalize_map[(unsigned short)(tqAlpha(q[x]))].alpha)/257; else - a = qAlpha(q[x]); - q[x] = qRgba(r, g, b, a); + a = tqAlpha(q[x]); + q[x] = tqRgba(r, g, b, a); } } liberateMemory(&normalize_map); @@ -3933,10 +3933,10 @@ void KImageEffect::equalize(TQImage &image) for(y=0; y < image.height(); ++y){ p = (unsigned int *)image.scanLine(y); for(x=0; x < image.width(); ++x){ - histogram[(unsigned char)(qRed(*p))].red++; - histogram[(unsigned char)(qGreen(*p))].green++; - histogram[(unsigned char)(qBlue(*p))].blue++; - histogram[(unsigned char)(qAlpha(*p))].alpha++; + histogram[(unsigned char)(tqRed(*p))].red++; + histogram[(unsigned char)(tqGreen(*p))].green++; + histogram[(unsigned char)(tqBlue(*p))].blue++; + histogram[(unsigned char)(tqAlpha(*p))].alpha++; p++; } } @@ -3978,22 +3978,22 @@ void KImageEffect::equalize(TQImage &image) q = (unsigned int *)image.scanLine(y); for(x=0; x < image.width(); ++x){ if(low.red != high.red) - r = (equalize_map[(unsigned short)(qRed(q[x]))].red/257); + r = (equalize_map[(unsigned short)(tqRed(q[x]))].red/257); else - r = qRed(q[x]); + r = tqRed(q[x]); if(low.green != high.green) - g = (equalize_map[(unsigned short)(qGreen(q[x]))].green/257); + g = (equalize_map[(unsigned short)(tqGreen(q[x]))].green/257); else - g = qGreen(q[x]); + g = tqGreen(q[x]); if(low.blue != high.blue) - b = (equalize_map[(unsigned short)(qBlue(q[x]))].blue/257); + b = (equalize_map[(unsigned short)(tqBlue(q[x]))].blue/257); else - b = qBlue(q[x]); + b = tqBlue(q[x]); if(low.alpha != high.alpha) - a = (equalize_map[(unsigned short)(qAlpha(q[x]))].alpha/257); + a = (equalize_map[(unsigned short)(tqAlpha(q[x]))].alpha/257); else - a = qAlpha(q[x]); - q[x] = qRgba(r, g, b, a); + a = tqAlpha(q[x]); + q[x] = tqRgba(r, g, b, a); } } liberateMemory(&equalize_map); @@ -4102,10 +4102,10 @@ void KImageEffect::blurScanLine(double *kernel, int width, q = src; for(i=0; i < columns; ++i){ if((i >= (x-width/2)) && (i <= (x+width/2))){ - red += (*p)*(qRed(*q)*257); - green += (*p)*(qGreen(*q)*257); - blue += (*p)*(qBlue(*q)*257); - alpha += (*p)*(qAlpha(*q)*257); + red += (*p)*(tqRed(*q)*257); + green += (*p)*(tqGreen(*q)*257); + blue += (*p)*(tqBlue(*q)*257); + alpha += (*p)*(tqAlpha(*q)*257); } if(((i+width/2-x) >= 0) && ((i+width/2-x) < width)) scale+=kernel[i+width/2-x]; @@ -4123,7 +4123,7 @@ void KImageEffect::blurScanLine(double *kernel, int width, blue = blue < 0 ? 0 : blue > 65535 ? 65535 : blue; alpha = alpha < 0 ? 0 : alpha > 65535 ? 65535 : alpha; - dest[x] = qRgba((unsigned char)(red/257UL), + dest[x] = tqRgba((unsigned char)(red/257UL), (unsigned char)(green/257UL), (unsigned char)(blue/257UL), (unsigned char)(alpha/257UL)); @@ -4137,10 +4137,10 @@ void KImageEffect::blurScanLine(double *kernel, int width, p = kernel+width/2-x; q = src; for(i=width/2-x; i < width; ++i){ - red += (*p)*(qRed(*q)*257); - green += (*p)*(qGreen(*q)*257); - blue += (*p)*(qBlue(*q)*257); - alpha += (*p)*(qAlpha(*q)*257); + red += (*p)*(tqRed(*q)*257); + green += (*p)*(tqGreen(*q)*257); + blue += (*p)*(tqBlue(*q)*257); + alpha += (*p)*(tqAlpha(*q)*257); scale += (*p); p++; q++; @@ -4157,7 +4157,7 @@ void KImageEffect::blurScanLine(double *kernel, int width, blue = blue < 0 ? 0 : blue > 65535 ? 65535 : blue; alpha = alpha < 0 ? 0 : alpha > 65535 ? 65535 : alpha; - dest[x] = qRgba((unsigned char)(red/257UL), + dest[x] = tqRgba((unsigned char)(red/257UL), (unsigned char)(green/257UL), (unsigned char)(blue/257UL), (unsigned char)(alpha/257UL)); @@ -4168,10 +4168,10 @@ void KImageEffect::blurScanLine(double *kernel, int width, p = kernel; q = src+(x-width/2); for (i=0; i < (long) width; ++i){ - red += (*p)*(qRed(*q)*257); - green += (*p)*(qGreen(*q)*257); - blue += (*p)*(qBlue(*q)*257); - alpha += (*p)*(qAlpha(*q)*257); + red += (*p)*(tqRed(*q)*257); + green += (*p)*(tqGreen(*q)*257); + blue += (*p)*(tqBlue(*q)*257); + alpha += (*p)*(tqAlpha(*q)*257); p++; q++; } @@ -4185,7 +4185,7 @@ void KImageEffect::blurScanLine(double *kernel, int width, blue = blue < 0 ? 0 : blue > 65535 ? 65535 : blue; alpha = alpha < 0 ? 0 : alpha > 65535 ? 65535 : alpha; - dest[x] = qRgba((unsigned char)(red/257UL), + dest[x] = tqRgba((unsigned char)(red/257UL), (unsigned char)(green/257UL), (unsigned char)(blue/257UL), (unsigned char)(alpha/257UL)); @@ -4197,10 +4197,10 @@ void KImageEffect::blurScanLine(double *kernel, int width, p = kernel; q = src+(x-width/2); for(i=0; i < columns-x+width/2; ++i){ - red += (*p)*(qRed(*q)*257); - green += (*p)*(qGreen(*q)*257); - blue += (*p)*(qBlue(*q)*257); - alpha += (*p)*(qAlpha(*q)*257); + red += (*p)*(tqRed(*q)*257); + green += (*p)*(tqGreen(*q)*257); + blue += (*p)*(tqBlue(*q)*257); + alpha += (*p)*(tqAlpha(*q)*257); scale += (*p); p++; q++; @@ -4216,7 +4216,7 @@ void KImageEffect::blurScanLine(double *kernel, int width, blue = blue < 0 ? 0 : blue > 65535 ? 65535 : blue; alpha = alpha < 0 ? 0 : alpha > 65535 ? 65535 : alpha; - dest[x] = qRgba((unsigned char)(red/257UL), + dest[x] = tqRgba((unsigned char)(red/257UL), (unsigned char)(green/257UL), (unsigned char)(blue/257UL), (unsigned char)(alpha/257UL)); @@ -4381,10 +4381,10 @@ bool KImageEffect::convolveImage(TQImage *image, TQImage *dest, for(mcx=0; mcx < width; ++mcx, ++sx){ mx = sx < 0 ? 0 : sx > image->width()-1 ? image->width()-1 : sx; - red += (*k)*(qRed(jumpTable[my][mx])*257); - green += (*k)*(qGreen(jumpTable[my][mx])*257); - blue += (*k)*(qBlue(jumpTable[my][mx])*257); - alpha += (*k)*(qAlpha(jumpTable[my][mx])*257); + red += (*k)*(tqRed(jumpTable[my][mx])*257); + green += (*k)*(tqGreen(jumpTable[my][mx])*257); + blue += (*k)*(tqBlue(jumpTable[my][mx])*257); + alpha += (*k)*(tqAlpha(jumpTable[my][mx])*257); ++k; } } @@ -4394,7 +4394,7 @@ bool KImageEffect::convolveImage(TQImage *image, TQImage *dest, blue = blue < 0 ? 0 : blue > 65535 ? 65535 : blue+0.5; alpha = alpha < 0 ? 0 : alpha > 65535 ? 65535 : alpha+0.5; - *q++ = qRgba((unsigned char)(red/257UL), + *q++ = tqRgba((unsigned char)(red/257UL), (unsigned char)(green/257UL), (unsigned char)(blue/257UL), (unsigned char)(alpha/257UL)); @@ -4528,16 +4528,16 @@ TQImage KImageEffect::shade(TQImage &src, bool color_shading, double azimuth, } } if(!color_shading){ - *q = qRgba((unsigned char)(shade), + *q = tqRgba((unsigned char)(shade), (unsigned char)(shade), (unsigned char)(shade), - qAlpha(*s1)); + tqAlpha(*s1)); } else{ - *q = qRgba((unsigned char)((shade*qRed(*s1))/(MaxRGB+1)), - (unsigned char)((shade*qGreen(*s1))/(MaxRGB+1)), - (unsigned char)((shade*qBlue(*s1))/(MaxRGB+1)), - qAlpha(*s1)); + *q = tqRgba((unsigned char)((shade*tqRed(*s1))/(MaxRGB+1)), + (unsigned char)((shade*tqGreen(*s1))/(MaxRGB+1)), + (unsigned char)((shade*tqBlue(*s1))/(MaxRGB+1)), + tqAlpha(*s1)); } ++s0; ++s1; @@ -4585,16 +4585,16 @@ TQImage KImageEffect::shade(TQImage &src, bool color_shading, double azimuth, } } if(!color_shading){ - *q = qRgba((unsigned char)(shade), + *q = tqRgba((unsigned char)(shade), (unsigned char)(shade), (unsigned char)(shade), - qAlpha(*(cTable+(*s1)))); + tqAlpha(*(cTable+(*s1)))); } else{ - *q = qRgba((unsigned char)((shade*qRed(*(cTable+(*s1))))/(MaxRGB+1)), - (unsigned char)((shade*qGreen(*(cTable+(*s1))))/(MaxRGB+1)), - (unsigned char)((shade*qBlue(*(cTable+(*s1))))/(MaxRGB+1)), - qAlpha(*s1)); + *q = tqRgba((unsigned char)((shade*tqRed(*(cTable+(*s1))))/(MaxRGB+1)), + (unsigned char)((shade*tqGreen(*(cTable+(*s1))))/(MaxRGB+1)), + (unsigned char)((shade*tqBlue(*(cTable+(*s1))))/(MaxRGB+1)), + tqAlpha(*s1)); } ++s0; ++s1; @@ -4643,7 +4643,7 @@ void KImageEffect::contrastHSV(TQImage &img, bool sharpen) brightness=0.0; v = (int)(brightness*255); c.setHsv(h, s, v); - data[i] = qRgba(c.red(), c.green(), c.blue(), qAlpha(data[i])); + data[i] = tqRgba(c.red(), c.green(), c.blue(), tqAlpha(data[i])); } } @@ -4726,7 +4726,7 @@ static void bumpmap_convert_row( uint *row, unsigned int idx = (unsigned int)(intensityValue( *row ) + 0.5); *p++ = lut[(unsigned int) ( waterlevel + ( ( idx - - waterlevel) * qBlue( *row )) / 255.0 )]; + waterlevel) * tqBlue( *row )) / 255.0 )]; } else { unsigned int idx = (unsigned int)(intensityValue( *row ) + 0.5); *p++ = lut[idx]; @@ -4807,19 +4807,19 @@ static void bumpmap_row( uint *src, * also change */ if (compensate) { - int red = (int)((qRed( *src ) * shade) / (params->compensation * 255)); - int green = (int)((qGreen( *src ) * shade) / (params->compensation * 255)); - int blue = (int)((qBlue( *src ) * shade) / (params->compensation * 255)); - int alpha = (int)((qAlpha( *src ) * shade) / (params->compensation * 255)); + int red = (int)((tqRed( *src ) * shade) / (params->compensation * 255)); + int green = (int)((tqGreen( *src ) * shade) / (params->compensation * 255)); + int blue = (int)((tqBlue( *src ) * shade) / (params->compensation * 255)); + int alpha = (int)((tqAlpha( *src ) * shade) / (params->compensation * 255)); ++src; - *dest++ = qRgba( red, green, blue, alpha ); + *dest++ = tqRgba( red, green, blue, alpha ); } else { - int red = qRed( *src ) * shade / 255; - int green = qGreen( *src ) * shade / 255; - int blue = qBlue( *src ) * shade / 255; - int alpha = qAlpha( *src ) * shade / 255; + int red = tqRed( *src ) * shade / 255; + int green = tqGreen( *src ) * shade / 255; + int blue = tqBlue( *src ) * shade / 255; + int alpha = tqAlpha( *src ) * shade / 255; ++src; - *dest++ = qRgba( red, green, blue, alpha ); + *dest++ = tqRgba( red, green, blue, alpha ); } /* Next pixel */ diff --git a/kdefx/kpixmap.cpp b/kdefx/kpixmap.cpp index eeccb6213..152ae6e83 100644 --- a/kdefx/kpixmap.cpp +++ b/kdefx/kpixmap.cpp @@ -56,7 +56,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) for ( gc=0; gc<=MAX_G; gc++ ) for ( bc=0; bc<=MAX_B; bc++ ) { dst->setColor( INDEXOF(rc,gc,bc), - qRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) ); + tqRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) ); } int sw = src->width(); @@ -79,8 +79,8 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) b = dst->scanLine(y); int endian = (TQImage::systemBitOrder() == TQImage::BigEndian); int x; - uchar* q = src->scanLine(y); - uchar* q2 = src->scanLine(y+1 < src->height() ? y + 1 : 0); + uchar* q = const_cast(src)->scanLine(y); + uchar* q2 = const_cast(src)->scanLine(y+1 < src->height() ? y + 1 : 0); for (int chan = 0; chan < 3; chan++) { b = dst->scanLine(y); @@ -293,26 +293,26 @@ bool KPixmap::checkColorTable( const TQImage &image ) int i = 0; if (kpixmap_iconPalette == 0) { - kpixmap_iconPalette = new QColor[40]; + kpixmap_iconPalette = new TQColor[40]; // Standard palette - kpixmap_iconPalette[i++] = tqred; - kpixmap_iconPalette[i++] = tqgreen; - kpixmap_iconPalette[i++] = tqblue; - kpixmap_iconPalette[i++] = tqcyan; - kpixmap_iconPalette[i++] = tqmagenta; - kpixmap_iconPalette[i++] = tqyellow; - kpixmap_iconPalette[i++] = tqdarkRed; - kpixmap_iconPalette[i++] = tqdarkGreen; - kpixmap_iconPalette[i++] = tqdarkBlue; - kpixmap_iconPalette[i++] = tqdarkCyan; - kpixmap_iconPalette[i++] = tqdarkMagenta; - kpixmap_iconPalette[i++] = tqdarkYellow; - kpixmap_iconPalette[i++] = tqwhite; - kpixmap_iconPalette[i++] = tqlightGray; - kpixmap_iconPalette[i++] = tqgray; - kpixmap_iconPalette[i++] = tqdarkGray; - kpixmap_iconPalette[i++] = tqblack; + kpixmap_iconPalette[i++] = red; + kpixmap_iconPalette[i++] = green; + kpixmap_iconPalette[i++] = blue; + kpixmap_iconPalette[i++] = cyan; + kpixmap_iconPalette[i++] = magenta; + kpixmap_iconPalette[i++] = yellow; + kpixmap_iconPalette[i++] = darkRed; + kpixmap_iconPalette[i++] = darkGreen; + kpixmap_iconPalette[i++] = darkBlue; + kpixmap_iconPalette[i++] = darkCyan; + kpixmap_iconPalette[i++] = darkMagenta; + kpixmap_iconPalette[i++] = darkYellow; + kpixmap_iconPalette[i++] = white; + kpixmap_iconPalette[i++] = lightGray; + kpixmap_iconPalette[i++] = gray; + kpixmap_iconPalette[i++] = darkGray; + kpixmap_iconPalette[i++] = black; // Pastels kpixmap_iconPalette[i++] = TQColor( 255, 192, 192 ); @@ -367,9 +367,9 @@ bool KPixmap::checkColorTable( const TQImage &image ) for ( i=0; i 256 ) ncols = 3; - TQColor *dPal = new QColor[ncols]; + TQColor *dPal = new TQColor[ncols]; for (int i=0; i 256 ) ncols = 3; - TQColor *dPal = new QColor[ncols]; + TQColor *dPal = new TQColor[ncols]; for (int i=0; i #include #include +#include #include #include @@ -62,7 +63,6 @@ #undef HAVE_XRENDER #endif - #include namespace @@ -117,14 +117,14 @@ namespace static bool useDropShadow(TQWidget* w) { - return w && w->metaObject() && - w->metaObject()->findProperty("KStyleMenuDropShadow") != -1; + return w && w->tqmetaObject() && + w->tqmetaObject()->tqfindProperty("KStyleMenuDropShadow") != -1; } } namespace { -class TransparencyHandler : public QObject +class TransparencyHandler : public TQObject { public: TransparencyHandler(KStyle* style, TransparencyEngine tEngine, @@ -251,14 +251,13 @@ TQString KStyle::defaultStyle() return TQString("light, 3rd revision"); } - void KStyle::polish( TQWidget* widget ) { if ( d->useFilledFrameWorkaround ) { - if ( TQFrame *frame = tqqt_cast< TQFrame* >( widget ) ) { - TQFrame::Shape shape = frame->frameShape(); - if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) + if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { + TQFrame::Shape tqshape = frame->frameShape(); + if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel) widget->installEventFilter(this); } } @@ -277,9 +276,9 @@ void KStyle::unPolish( TQWidget* widget ) { if ( d->useFilledFrameWorkaround ) { - if ( TQFrame *frame = tqqt_cast< TQFrame* >( widget ) ) { - TQFrame::Shape shape = frame->frameShape(); - if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) + if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { + TQFrame::Shape tqshape = frame->frameShape(); + if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel) widget->removeEventFilter(this); } } @@ -365,13 +364,13 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe, else pix.resize( w-2, h-2 ); - TQString title = wid->parentWidget()->caption(); + TQString title = wid->tqparentWidget()->caption(); TQPainter p2; p2.begin(&pix); p2.fillRect(pix.rect(), cg.brush(TQColorGroup::Highlight)); p2.setPen(cg.highlightedText()); p2.setFont(fnt); - p2.drawText(pix.rect(), TQAlignCenter, title); + p2.drawText(pix.rect(), AlignCenter, title); p2.end(); // Draw a sunken bevel @@ -435,7 +434,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe, int i; for( i=0; i < 64; i++ ) a.setPoint( i, 0, i*2+1 ); - p2.setPen( tqcolor1 ); + p2.setPen( color1 ); p2.drawPoints( a ); p2.end(); TQApplication::flushX(); @@ -444,7 +443,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe, p2.begin( d->horizontalLine ); for( i=0; i < 64; i++ ) a.setPoint( i, i*2+1, 0 ); - p2.setPen( tqcolor1 ); + p2.setPen( color1 ); p2.drawPoints( a ); p2.end(); TQApplication::flushX(); @@ -536,25 +535,25 @@ int KStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget* /* widget */) c // #ifdef USE_QT4 // kdebindings / smoke needs this function declaration available at all times. Furthermore I don't think it would hurt to have the declaration available at all times...so leave these commented out for now -void KStyle::drawPrimitive( ControlElement pe, - TQPainter* p, - const TQRect &r, - const TQColorGroup &cg, - SFlags flags, - const TQStyleOption& opt ) const -{ - // FIXME: - // What should "widget" be in actuality? How should I get it? From where? - // Almost certainly it should not be null! - TQWidget *widget = 0; - drawControl(pe, p, widget, r, cg, flags, opt); -} +//void KStyle::tqdrawPrimitive( ControlElement pe, +// TQPainter* p, +// const TQRect &r, +// const TQColorGroup &cg, +// SFlags flags, +// const TQStyleOption& opt ) const +//{ +// // FIXME: +// // What should "widget" be in actuality? How should I get it? From where? +// // Almost certainly it should not be null! +// TQWidget *widget = 0; +// tqdrawControl(pe, p, widget, r, cg, flags, opt); +//} // #endif // USE_QT4 // ----------------------------------------------------------------------------- -void KStyle::drawPrimitive( PrimitiveElement pe, +void KStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter* p, const TQRect &r, const TQColorGroup &cg, @@ -570,7 +569,7 @@ void KStyle::drawPrimitive( PrimitiveElement pe, if (p && p->device()->devType() == TQInternal::Widget) { widget = static_cast(p->device()); - parent = widget->parentWidget(); + parent = widget->tqparentWidget(); } else return; // Don't paint on non-widgets @@ -620,9 +619,9 @@ void KStyle::drawPrimitive( PrimitiveElement pe, } XRenderFillRectangle( - p->device()->x11Display(), + p->tqdevice()->x11Display(), PictOpOver, - p->device()->x11RenderHandle(), + p->tqdevice()->x11RenderHandle(), &clr, rect.x() + point.x(), rect.y() + point.y(), @@ -630,9 +629,9 @@ void KStyle::drawPrimitive( PrimitiveElement pe, rect.height() ); p->save(); - p->setRasterOp( Qt::CopyROP ); + p->setRasterOp( TQt::CopyROP ); p->setPen( TQPen( cg.highlight().dark( 160 ), 1 ) ); - p->setBrush( TQNoBrush ); + p->setBrush( NoBrush ); p->drawRect( rect.x() + point.x(), rect.y() + point.y(), @@ -642,12 +641,12 @@ void KStyle::drawPrimitive( PrimitiveElement pe, #endif #endif } else - TQCommonStyle::drawPrimitive( pe, p, r, cg, flags, opt ); + TQCommonStyle::tqdrawPrimitive( pe, p, r, cg, flags, opt ); } -void KStyle::drawControl( ControlElement element, +void KStyle::tqdrawControl( ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -661,7 +660,7 @@ void KStyle::drawControl( ControlElement element, // ------------------------------------------------------------------------ case CE_TabBarTab: { const TQTabBar* tb = (const TQTabBar*) widget; - TQTabBar::Shape tbs = tb->shape(); + TQTabBar::Shape tbs = tb->tqshape(); bool selected = flags & Style_Selected; int x = r.x(), y=r.y(), bottom=r.bottom(), right=r.right(); @@ -765,7 +764,7 @@ void KStyle::drawControl( ControlElement element, p->setPen (selected ? cg.background() : cg.mid()); p->setBrush(selected ? cg.background() : cg.mid()); p->drawPolygon(a); - p->setBrush(TQNoBrush); + p->setBrush(NoBrush); if (!selected) { p->translate(0,-1); p->setPen(cg.light()); @@ -808,7 +807,7 @@ void KStyle::drawControl( ControlElement element, p->setPen (selected ? cg.background() : cg.mid()); p->setBrush(selected ? cg.background() : cg.mid()); p->drawPolygon(a); - p->setBrush(TQNoBrush); + p->setBrush(NoBrush); if (!selected) { p->translate(0,1); p->setPen(cg.dark()); @@ -825,8 +824,8 @@ void KStyle::drawControl( ControlElement element, // ------------------------------------------------------------------------ case CE_PopupMenuScroller: { p->fillRect(r, cg.background()); - drawPrimitive(PE_ButtonTool, p, r, cg, Style_Enabled); - drawPrimitive((flags & Style_Up) ? PE_ArrowUp : PE_ArrowDown, p, r, cg, Style_Enabled); + tqdrawPrimitive(PE_ButtonTool, p, r, cg, Style_Enabled); + tqdrawPrimitive((flags & Style_Up) ? PE_ArrowUp : PE_ArrowDown, p, r, cg, Style_Enabled); break; } @@ -835,7 +834,7 @@ void KStyle::drawControl( ControlElement element, // ------------------------------------------------------------------------ case CE_ProgressBarGroove: { TQRect fr = subRect(SR_ProgressBarGroove, widget); - drawPrimitive(PE_Panel, p, fr, cg, Style_Sunken, TQStyleOption::TQSO_Default); + tqdrawPrimitive(PE_Panel, p, fr, cg, Style_Sunken, TQStyleOption::SO_Default); break; } @@ -930,22 +929,22 @@ void KStyle::drawControl( ControlElement element, p->save(); p->setPen(pb->isEnabled() ? (reverse ? cg.text() : cg.highlightedText()) : cg.text()); - p->drawText(r, TQAlignCenter, pb->progressString()); + p->drawText(r, AlignCenter, pb->progressString()); p->setClipRect(crect); p->setPen(reverse ? cg.highlightedText() : cg.text()); - p->drawText(r, TQAlignCenter, pb->progressString()); + p->drawText(r, AlignCenter, pb->progressString()); p->restore(); } else { p->setPen(cg.text()); - p->drawText(r, TQAlignCenter, pb->progressString()); + p->drawText(r, AlignCenter, pb->progressString()); } break; } default: - TQCommonStyle::drawControl(element, p, widget, r, cg, flags, opt); + TQCommonStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); } } @@ -972,7 +971,7 @@ TQRect KStyle::subRect(SubRect r, const TQWidget* widget) const } -int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const +int KStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const { switch(m) { @@ -987,13 +986,13 @@ int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const TQWidget* parent = 0; // Check that we are not a normal toolbar or a hidden dockwidget, // in which case we need to adjust the height for font size - if (widget && (parent = widget->parentWidget() ) + if (widget && (parent = widget->tqparentWidget() ) && !parent->inherits("QToolBar") && !parent->inherits("QMainWindow") && widget->inherits("QDockWindowHandle") ) return widget->fontMetrics().lineSpacing(); else - return TQCommonStyle::pixelMetric(m, widget); + return TQCommonStyle::tqpixelMetric(m, widget); } // TABS @@ -1003,8 +1002,8 @@ int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const case PM_TabBarTabVSpace: { const TQTabBar * tb = (const TQTabBar *) widget; - if ( tb->shape() == TQTabBar::RoundedAbove || - tb->shape() == TQTabBar::RoundedBelow ) + if ( tb->tqshape() == TQTabBar::RoundedAbove || + tb->tqshape() == TQTabBar::RoundedBelow ) return 10; else return 4; @@ -1012,7 +1011,7 @@ int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const case PM_TabBarTabOverlap: { const TQTabBar* tb = (const TQTabBar*)widget; - TQTabBar::Shape tbs = tb->shape(); + TQTabBar::Shape tbs = tb->tqshape(); if ( (tbs == TQTabBar::RoundedAbove) || (tbs == TQTabBar::RoundedBelow) ) @@ -1034,7 +1033,7 @@ int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const case PM_SliderControlThickness: { const TQSlider* slider = (const TQSlider*)widget; TQSlider::TickSetting ts = slider->tickmarks(); - int thickness = (slider->orientation() == TQ_Horizontal) ? + int thickness = (slider->orientation() == Qt::Horizontal) ? slider->height() : slider->width(); switch (ts) { case TQSlider::NoMarks: // Use total area. @@ -1077,10 +1076,10 @@ int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const return 0; case PM_PopupMenuScrollerHeight: - return pixelMetric( PM_ScrollBarExtent, 0); + return tqpixelMetric( PM_ScrollBarExtent, 0); default: - return TQCommonStyle::pixelMetric( m, widget ); + return TQCommonStyle::tqpixelMetric( m, widget ); } } @@ -1097,7 +1096,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) return sibling; } -void KStyle::drawComplexControl( ComplexControl control, +void KStyle::tqdrawComplexControl( ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -1139,50 +1138,50 @@ void KStyle::drawComplexControl( ComplexControl control, // Draw the up/left button set if ((controls & SC_ScrollBarSubLine) && subline.isValid()) { - drawPrimitive(PE_ScrollBarSubLine, p, subline, cg, + tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, cg, sflags | (active == SC_ScrollBarSubLine ? Style_Down : Style_Default)); if (useThreeButtonScrollBar && subline2.isValid()) - drawPrimitive(PE_ScrollBarSubLine, p, subline2, cg, + tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, cg, sflags | (active == SC_ScrollBarSubLine ? Style_Down : Style_Default)); } if ((controls & SC_ScrollBarAddLine) && addline.isValid()) - drawPrimitive(PE_ScrollBarAddLine, p, addline, cg, + tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, cg, sflags | ((active == SC_ScrollBarAddLine) ? Style_Down : Style_Default)); if ((controls & SC_ScrollBarSubPage) && subpage.isValid()) - drawPrimitive(PE_ScrollBarSubPage, p, subpage, cg, + tqdrawPrimitive(PE_ScrollBarSubPage, p, subpage, cg, sflags | ((active == SC_ScrollBarSubPage) ? Style_Down : Style_Default)); if ((controls & SC_ScrollBarAddPage) && addpage.isValid()) - drawPrimitive(PE_ScrollBarAddPage, p, addpage, cg, + tqdrawPrimitive(PE_ScrollBarAddPage, p, addpage, cg, sflags | ((active == SC_ScrollBarAddPage) ? Style_Down : Style_Default)); if ((controls & SC_ScrollBarFirst) && first.isValid()) - drawPrimitive(PE_ScrollBarFirst, p, first, cg, + tqdrawPrimitive(PE_ScrollBarFirst, p, first, cg, sflags | ((active == SC_ScrollBarFirst) ? Style_Down : Style_Default)); if ((controls & SC_ScrollBarLast) && last.isValid()) - drawPrimitive(PE_ScrollBarLast, p, last, cg, + tqdrawPrimitive(PE_ScrollBarLast, p, last, cg, sflags | ((active == SC_ScrollBarLast) ? Style_Down : Style_Default)); if ((controls & SC_ScrollBarSlider) && slider.isValid()) { - drawPrimitive(PE_ScrollBarSlider, p, slider, cg, + tqdrawPrimitive(PE_ScrollBarSlider, p, slider, cg, sflags | ((active == SC_ScrollBarSlider) ? Style_Down : Style_Default)); // Draw focus rect if (sb->hasFocus()) { TQRect fr(slider.x() + 2, slider.y() + 2, slider.width() - 5, slider.height() - 5); - drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default); + tqdrawPrimitive(PE_FocusRect, p, fr, cg, Style_Default); } } break; @@ -1201,10 +1200,10 @@ void KStyle::drawComplexControl( ComplexControl control, TQPainter p2; p2.begin(&pix); - if ( slider->parentWidget() && - slider->parentWidget()->backgroundPixmap() && - !slider->parentWidget()->backgroundPixmap()->isNull() ) { - TQPixmap pixmap = *(slider->parentWidget()->backgroundPixmap()); + if ( slider->tqparentWidget() && + slider->tqparentWidget()->backgroundPixmap() && + !slider->tqparentWidget()->backgroundPixmap()->isNull() ) { + TQPixmap pixmap = *(slider->tqparentWidget()->backgroundPixmap()); p2.drawTiledPixmap(r, pixmap, slider->pos()); } else pix.fill(cg.background()); @@ -1215,12 +1214,12 @@ void KStyle::drawComplexControl( ComplexControl control, // Draw the focus rect around the groove if (slider->hasFocus()) - drawPrimitive(PE_FocusRect, &p2, groove, cg); + tqdrawPrimitive(PE_FocusRect, &p2, groove, cg); } // Draw the tickmarks if (controls & SC_SliderTickmarks) - TQCommonStyle::drawComplexControl(control, &p2, widget, + TQCommonStyle::tqdrawComplexControl(control, &p2, widget, r, cg, flags, SC_SliderTickmarks, active, opt); // Draw the slider handle @@ -1246,7 +1245,7 @@ void KStyle::drawComplexControl( ComplexControl control, // Paint the icon and text. if ( controls & SC_ListView ) - TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); // If we're have a branch or are expanded... if ( controls & (SC_ListViewBranch | SC_ListViewExpand) ) @@ -1386,7 +1385,7 @@ void KStyle::drawComplexControl( ComplexControl control, } default: - TQCommonStyle::drawComplexControl( control, p, widget, r, cg, + TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); break; } @@ -1425,7 +1424,7 @@ TQRect KStyle::querySubControlMetrics( ComplexControl control, const TQScrollBar *sb = (const TQScrollBar*)widget; bool horizontal = sb->orientation() == Qt::Horizontal; int sliderstart = sb->sliderStart(); - int sbextent = pixelMetric(PM_ScrollBarExtent, widget); + int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget); int maxlen = (horizontal ? sb->width() : sb->height()) - (sbextent * (threeButtonScrollBar ? 3 : 2)); int sliderlen; @@ -1436,7 +1435,7 @@ TQRect KStyle::querySubControlMetrics( ComplexControl control, uint range = sb->maxValue() - sb->minValue(); sliderlen = (sb->pageStep() * maxlen) / (range + sb->pageStep()); - int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget ); if ( sliderlen < slidermin || range > INT_MAX / 2 ) sliderlen = slidermin; if ( sliderlen > maxlen ) @@ -1826,7 +1825,7 @@ TQPixmap KStyle::stylePixmap( StylePixmap stylepixmap, } -int KStyle::styleHint( StyleHint sh, const TQWidget* w, +int KStyle::tqstyleHint( StyleHint sh, const TQWidget* w, const TQStyleOption &opt, QStyleHintReturn* shr) const { switch (sh) @@ -1841,7 +1840,7 @@ int KStyle::styleHint( StyleHint sh, const TQWidget* w, return d->menuAltKeyNavigation ? 1 : 0; case SH_PopupMenu_SubMenuPopupDelay: - if ( styleHint( SH_PopupMenu_SloppySubMenus, w ) ) + if ( tqstyleHint( SH_PopupMenu_SloppySubMenus, w ) ) return QMIN( 100, d->popupMenuDelay ); else return d->popupMenuDelay; @@ -1877,7 +1876,7 @@ int KStyle::styleHint( StyleHint sh, const TQWidget* w, } default: - return TQCommonStyle::styleHint(sh, w, opt, shr); + return TQCommonStyle::tqstyleHint(sh, w, opt, shr); } } @@ -1890,19 +1889,19 @@ bool KStyle::eventFilter( TQObject* object, TQEvent* event ) // ensure that the filled frame contents are properly painted. // We essentially modify the paintEvent's rect to include the // panel border, which also paints the widget's interior. - // This is nasty, but I see no other way to properly repaint + // This is nasty, but I see no other way to properly tqrepaint // filled frames in all QMenuBars and QToolBars. // -- Karol. TQFrame *frame = 0; if ( event->type() == TQEvent::Paint - && (frame = tqqt_cast(object)) ) + && (frame = ::tqqt_cast(object)) ) { if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel) return false; bool horizontal = true; TQPaintEvent* pe = (TQPaintEvent*)event; - TQToolBar *toolbar = tqqt_cast< TQToolBar *>( frame ); + TQToolBar *toolbar = ::tqqt_cast< TQToolBar *>( frame ); TQRect r = pe->rect(); if (toolbar && toolbar->orientation() == Qt::Vertical) @@ -2042,8 +2041,8 @@ void TransparencyHandler::createShadowWindows(const TQWidget* p) // Create a fake drop-down shadow effect via blended Xwindows ShadowElements se; - se.w1 = new TQWidget(0, 0, WStyle_Customize | WType_Popup | WX11BypassWM ); - se.w2 = new TQWidget(0, 0, WStyle_Customize | WType_Popup | WX11BypassWM ); + se.w1 = new TQWidget(0, 0, (WFlags)(WStyle_Customize | WType_Popup | WX11BypassWM) ); + se.w2 = new TQWidget(0, 0, (WFlags)(WStyle_Customize | WType_Popup | WX11BypassWM) ); se.w1->setGeometry(shadow1); se.w2->setGeometry(shadow2); XSelectInput(qt_xdisplay(), se.w1->winId(), StructureNotifyMask ); @@ -2082,7 +2081,7 @@ void TransparencyHandler::createShadowWindows(const TQWidget* p) void TransparencyHandler::removeShadowWindows(const TQWidget* p) { #ifdef Q_WS_X11 - ShadowMap::iterator it = shadowMap().find(p); + ShadowMap::iterator it = shadowMap().tqfind(p); if (it != shadowMap().end()) { ShadowElements se = it.data(); @@ -2128,12 +2127,12 @@ bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event ) case XRender: #endif case SoftwareBlend: - blendToPixmap(p->colorGroup(), p); + blendToPixmap(p->tqcolorGroup(), p); break; case SoftwareTint: default: - blendToColor(p->colorGroup().button()); + blendToColor(p->tqcolorGroup().button()); }; p->setErasePixmap(pix); @@ -2145,7 +2144,7 @@ bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event ) // * TODO : determine real cause for duplicate events // * till 20021005 if ((dropShadow || useDropShadow(p)) - && p->width() > 16 && p->height() > 16 && !shadowMap().contains( p )) + && p->width() > 16 && p->height() > 16 && !shadowMap().tqcontains( p )) createShadowWindows(p); } else if (et == TQEvent::Resize && p->isShown() && p->isTopLevel()) @@ -2198,8 +2197,8 @@ void TransparencyHandler::blendToPixmap(const TQColorGroup &cg, const TQWidget* return; // Allow styles to define the blend pixmap - allows for some interesting effects. - if (::qt_cast(p)) - kstyle->renderMenuBlendPixmap( blendPix, cg, ::qt_cast(p) ); + if (::tqqt_cast(p)) + kstyle->renderMenuBlendPixmap( blendPix, cg, ::tqqt_cast(p) ); else blendPix.fill(cg.button()); // Just tint as the default behavior @@ -2220,11 +2219,11 @@ void TransparencyHandler::XRenderBlendToPixmap(const TQWidget* p) renderPix.resize( pix.width(), pix.height() ); // Allow styles to define the blend pixmap - allows for some interesting effects. - if (::qt_cast(p)) - kstyle->renderMenuBlendPixmap( renderPix, p->colorGroup(), - ::qt_cast(p) ); + if (::tqqt_cast(p)) + kstyle->renderMenuBlendPixmap( renderPix, p->tqcolorGroup(), + ::tqqt_cast(p) ); else - renderPix.fill(p->colorGroup().button()); // Just tint as the default behavior + renderPix.fill(p->tqcolorGroup().button()); // Just tint as the default behavior Display* dpy = qt_xdisplay(); Pixmap alphaPixmap; diff --git a/kdefx/kstyle.h b/kdefx/kstyle.h index 1e8b0df2c..a50ab721e 100644 --- a/kdefx/kstyle.h +++ b/kdefx/kstyle.h @@ -54,9 +54,10 @@ struct KStylePrivate; * @author Karol Szwed (gallium@kde.org) * @version $Id$ */ -class KDEFX_EXPORT KStyle: public QCommonStyle +class KDEFX_EXPORT KStyle: public TQCommonStyle { Q_OBJECT + TQ_OBJECT public: @@ -70,7 +71,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle * internal menu transparency engine. * * @li FilledFrameWorkaround - Enable this flag to facilitate - * proper repaints of QMenuBars and QToolBars when the style chooses + * proper tqrepaints of QMenuBars and QToolBars when the style chooses * to paint the interior of a TQFrame. The style primitives in question * are PE_PanelMenuBar and PE_PanelDockWindow. The HighColor style uses * this workaround to enable painting of gradients in menubars and @@ -171,7 +172,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle * This virtual function defines the pixmap used to blend between the popup * menu and the background to create different menu transparency effects. * For example, you can fill the pixmap "pix" with a gradient based on the - * popup's colorGroup, a texture, or some other fancy painting routine. + * popup's tqcolorGroup, a texture, or some other fancy painting routine. * KStyle will then internally blend this pixmap with a snapshot of the * background behind the popupMenu to create the illusion of transparency. * @@ -237,13 +238,13 @@ class KDEFX_EXPORT KStyle: public QCommonStyle }; /** - * This function is identical to Qt's TQStyle::drawPrimitive(), except that + * This function is identical to Qt's TQStyle::tqdrawPrimitive(), except that * it adds one further parameter, 'widget', that can be used to determine * the widget state of the KStylePrimitive in question. * * @see KStyle::KStylePrimitive - * @see TQStyle::drawPrimitive - * @see TQStyle::drawComplexControl + * @see TQStyle::tqdrawPrimitive + * @see TQStyle::tqdrawComplexControl */ virtual void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, @@ -251,7 +252,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::TQSO_Default ) const; + const TQStyleOption& = TQStyleOption::SO_Default ) const; enum KStylePixelMetric { @@ -274,33 +275,33 @@ class KDEFX_EXPORT KStyle: public QCommonStyle void unPolish( TQWidget* widget ); void polishPopupMenu( TQPopupMenu* ); - void drawPrimitive( PrimitiveElement pe, + void tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter* p, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::TQSO_Default ) const; + const TQStyleOption& = TQStyleOption::SO_Default ) const; // #ifdef USE_QT4 // kdebindings / smoke needs this function declaration available at all times. Furthermore I don't think it would hurt to have the declaration available at all times...so leave these commented out for now - void drawPrimitive( ControlElement pe, - TQPainter* p, - const TQRect &r, - const TQColorGroup &cg, - SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::TQSO_Default ) const; +// void tqdrawPrimitive( ControlElement pe, +// TQPainter* p, +// const TQRect &r, +// const TQColorGroup &cg, +// SFlags flags = Style_Default, +// const TQStyleOption& = TQStyleOption::SO_Default ) const; // #endif // USE_QT4 - void drawControl( ControlElement element, + void tqdrawControl( ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::TQSO_Default ) const; + const TQStyleOption& = TQStyleOption::SO_Default ) const; - void drawComplexControl( ComplexControl control, + void tqdrawComplexControl( ComplexControl control, TQPainter *p, const TQWidget* widget, const TQRect &r, @@ -308,19 +309,19 @@ class KDEFX_EXPORT KStyle: public QCommonStyle SFlags flags = Style_Default, SCFlags controls = SC_All, SCFlags active = SC_None, - const TQStyleOption& = TQStyleOption::TQSO_Default ) const; + const TQStyleOption& = TQStyleOption::SO_Default ) const; SubControl querySubControl( ComplexControl control, const TQWidget* widget, const TQPoint &pos, - const TQStyleOption& = TQStyleOption::TQSO_Default ) const; + const TQStyleOption& = TQStyleOption::SO_Default ) const; TQRect querySubControlMetrics( ComplexControl control, const TQWidget* widget, SubControl sc, - const TQStyleOption& = TQStyleOption::TQSO_Default ) const; + const TQStyleOption& = TQStyleOption::SO_Default ) const; - int pixelMetric( PixelMetric m, + int tqpixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const; TQRect subRect( SubRect r, @@ -328,11 +329,11 @@ class KDEFX_EXPORT KStyle: public QCommonStyle TQPixmap stylePixmap( StylePixmap stylepixmap, const TQWidget* widget = 0, - const TQStyleOption& = TQStyleOption::TQSO_Default ) const; + const TQStyleOption& = TQStyleOption::SO_Default ) const; - int styleHint( StyleHint sh, + int tqstyleHint( StyleHint sh, const TQWidget* w = 0, - const TQStyleOption &opt = TQStyleOption::TQSO_Default, + const TQStyleOption &opt = TQStyleOption::SO_Default, QStyleHintReturn* shr = 0 ) const; protected: diff --git a/kdeprint/cups/cupsaddsmb2.cpp b/kdeprint/cups/cupsaddsmb2.cpp index ef1b0f4e8..8a6d44d6e 100644 --- a/kdeprint/cups/cupsaddsmb2.cpp +++ b/kdeprint/cups/cupsaddsmb2.cpp @@ -156,7 +156,7 @@ void CupsAddSmb::slotReceived(KProcess*, char *buf, int buflen) while (1) { // read a line - line = TQString::fromLatin1(""); + line = TQString::tqfromLatin1(""); partial = true; while (index < buflen) { @@ -231,7 +231,7 @@ void CupsAddSmb::checkActionStatus() m_status = (m_buffer.count() == 0); break; case MkDir: - m_status = (m_buffer.count() == 1 || m_buffer[1].find("ERRfilexists") != -1); + m_status = (m_buffer.count() == 1 || m_buffer[1].tqfind("ERRfilexists") != -1); break; case AddDriver: case AddPrinter: @@ -315,7 +315,7 @@ void CupsAddSmb::slotProcessExited(KProcess*) if (m_proc.normalExit() && m_state != Start && m_status) { // last process went OK. If it was smbclient, then switch to rpcclient - if (qstrncmp(m_proc.args().first(), "smbclient", 9) == 0) + if (tqstrncmp(m_proc.args().first(), "smbclient", 9) == 0) { doInstall(); return; @@ -433,7 +433,7 @@ bool CupsAddSmb::doExport() m_actions << "quit"; m_proc.clearArguments(); - m_proc << "smbclient" << TQString::fromLatin1("//")+m_servered->text()+"/print$"; + m_proc << "smbclient" << TQString::tqfromLatin1("//")+m_servered->text()+"/print$"; return startProcess(); } diff --git a/kdeprint/cups/cupsdconf2/addressdialog.cpp b/kdeprint/cups/cupsdconf2/addressdialog.cpp index 1811abf68..d4f5b900f 100644 --- a/kdeprint/cups/cupsdconf2/addressdialog.cpp +++ b/kdeprint/cups/cupsdconf2/addressdialog.cpp @@ -76,7 +76,7 @@ TQString AddressDialog::newAddress(TQWidget *parent) TQString AddressDialog::editAddress(const TQString& addr, TQWidget *parent) { AddressDialog dlg(parent); - int p = addr.find(' '); + int p = addr.tqfind(' '); if (p != -1) { dlg.type_->setCurrentItem(addr.left(p).lower() == "deny" ? 1 : 0); diff --git a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp index 43847299b..62c9a0c6f 100644 --- a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp @@ -92,7 +92,7 @@ TQString CupsdComment::comment(const TQString& key) { if (comments_.count() != 0 || loadComments()) { - Comment *comm = comments_.find(key); + Comment *comm = comments_.tqfind(key); if (comm) return comm->comment(); } @@ -103,7 +103,7 @@ TQString CupsdComment::toolTip(const TQString& key) { if (comments_.count() != 0 || loadComments()) { - Comment *comm = comments_.find(key); + Comment *comm = comments_.tqfind(key); if (comm) return comm->toolTip(); } diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.cpp b/kdeprint/cups/cupsdconf2/cupsdconf.cpp index f500d219c..535866e4f 100644 --- a/kdeprint/cups/cupsdconf2/cupsdconf.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdconf.cpp @@ -42,7 +42,7 @@ TQString findDir(const TQStringList& list) void splitSizeSpec(const TQString& s, int& sz, int& suff) { - int p = s.find(TQRegExp("\\D")); + int p = s.tqfind(TQRegExp("\\D")); sz = s.mid(0, p).toInt(); if (p != -1) { @@ -484,7 +484,7 @@ bool CupsdConf::parseOption(const TQString& line) int p(-1); TQString keyword, value, l(line.simplifyWhiteSpace()); - if ((p=l.find(' ')) != -1) + if ((p=l.tqfind(' ')) != -1) { keyword = l.left(p).lower(); value = l.mid(p+1); @@ -508,7 +508,7 @@ bool CupsdConf::parseOption(const TQString& line) { browseprotocols_.clear(); TQStringList prots = TQStringList::split(TQRegExp("\\s"), value, false); - if (prots.find("all") != prots.end()) + if (prots.tqfind("all") != prots.end()) browseprotocols_ << "CUPS" << "SLP"; else for (TQStringList::ConstIterator it=prots.begin(); it!=prots.end(); ++it) @@ -718,7 +718,7 @@ CupsLocation::CupsLocation(const CupsLocation& loc) bool CupsLocation::parseResource(const TQString& line) { QString str = line.simplifyWhiteSpace(); - int p1 = line.find(' '), p2 = line.find('>'); + int p1 = line.tqfind(' '), p2 = line.tqfind('>'); if (p1 != -1 && p2 != -1) { resourcename_ = str.mid(p1+1,p2-p1-1); @@ -732,7 +732,7 @@ bool CupsLocation::parseOption(const TQString& line) int p(-1); TQString keyword, value, l(line.simplifyWhiteSpace()); - if ((p=l.find(' ')) != -1) + if ((p=l.tqfind(' ')) != -1) { keyword = l.left(p).lower(); value = l.mid(p+1); @@ -760,7 +760,7 @@ bool CupsLocation::parseOption(const TQString& line) else if (keyword == "authgroupname") authname_ = value; else if (keyword == "require") { - int p = value.find(' '); + int p = value.tqfind(' '); if (p != -1) { authname_ = value.mid(p+1); @@ -810,8 +810,8 @@ int CupsResource::typeFromText(const TQString& text) { if (text == i18n("Base", "Root") || text == i18n("All printers") || text == i18n("All classes") || text == i18n("Print jobs")) return RESOURCE_GLOBAL; else if (text == i18n("Administration")) return RESOURCE_ADMIN; - else if (text.find(i18n("Class")) == 0) return RESOURCE_CLASS; - else if (text.find(i18n("Printer")) == 0) return RESOURCE_PRINTER; + else if (text.tqfind(i18n("Class")) == 0) return RESOURCE_CLASS; + else if (text.tqfind(i18n("Printer")) == 0) return RESOURCE_PRINTER; else return RESOURCE_PRINTER; } @@ -832,12 +832,12 @@ TQString CupsResource::textToPath(const TQString& text) else if (text == i18n("All classes")) path = "/classes"; else if (text == i18n("Print jobs")) path = "/jobs"; else if (text == i18n("Base", "Root")) path = "/"; - else if (text.find(i18n("Printer")) == 0) + else if (text.tqfind(i18n("Printer")) == 0) { path = "/printers/"; path.append(text.right(text.length()-i18n("Printer").length()-1)); } - else if (text.find(i18n("Class")) == 0) + else if (text.tqfind(i18n("Class")) == 0) { path = "/classes/"; path.append(text.right(text.length()-i18n("Class").length()-1)); @@ -853,13 +853,13 @@ TQString CupsResource::pathToText(const TQString& path) else if (path == "/classes") text = i18n("All classes"); else if (path == "/") text = i18n("Root"); else if (path == "/jobs") text = i18n("Print jobs"); - else if (path.find("/printers/") == 0) + else if (path.tqfind("/printers/") == 0) { text = i18n("Printer"); text.append(" "); text.append(path.right(path.length()-10)); } - else if (path.find("/classes/") == 0) + else if (path.tqfind("/classes/") == 0) { text = i18n("Class"); text.append(" "); diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.cpp b/kdeprint/cups/cupsdconf2/cupsddialog.cpp index 8023aeef7..50f8a3858 100644 --- a/kdeprint/cups/cupsdconf2/cupsddialog.cpp +++ b/kdeprint/cups/cupsdconf2/cupsddialog.cpp @@ -337,7 +337,7 @@ int CupsdDialog::serverOwner() while (!t.eof()) { str = t.readLine(); - if (str.find("Uid:",0,false) == 0) + if (str.tqfind("Uid:",0,false) == 0) { QStringList list = TQStringList::split('\t', str, false); if (list.count() >= 2) diff --git a/kdeprint/cups/cupsdconf2/cupsdpage.h b/kdeprint/cups/cupsdconf2/cupsdpage.h index e503319ca..f6c8b932b 100644 --- a/kdeprint/cups/cupsdconf2/cupsdpage.h +++ b/kdeprint/cups/cupsdconf2/cupsdpage.h @@ -24,7 +24,7 @@ struct CupsdConf; -class CupsdPage : public QWidget +class CupsdPage : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/cups/cupsdconf2/cupsdsplash.cpp b/kdeprint/cups/cupsdconf2/cupsdsplash.cpp index 9dd7581a8..754e7cbd5 100644 --- a/kdeprint/cups/cupsdconf2/cupsdsplash.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdsplash.cpp @@ -39,11 +39,11 @@ CupsdSplash::CupsdSplash(TQWidget *parent, const char *name) QLabel *cupslogo_ = new TQLabel(this); QString logopath = locate("data", TQString("kdeprint/cups_logo.png")); cupslogo_->setPixmap(logopath.isEmpty() ? TQPixmap() : TQPixmap(logopath)); - cupslogo_->setAlignment(Qt::AlignCenter); + cupslogo_->tqsetAlignment(Qt::AlignCenter); QLabel *kupslogo_ = new TQLabel(this); logopath = locate("data", TQString("kdeprint/kde_logo.png")); kupslogo_->setPixmap(logopath.isEmpty() ? TQPixmap() : TQPixmap(logopath)); - kupslogo_->setAlignment(Qt::AlignCenter); + kupslogo_->tqsetAlignment(Qt::AlignCenter); QLabel *helptxt_ = new TQLabel(this); helptxt_->setText(i18n( "

    This tool will help you to configure graphically the server of the CUPS printing system. " diff --git a/kdeprint/cups/cupsdconf2/editlist.h b/kdeprint/cups/cupsdconf2/editlist.h index 9035d980f..9f4800c15 100644 --- a/kdeprint/cups/cupsdconf2/editlist.h +++ b/kdeprint/cups/cupsdconf2/editlist.h @@ -26,7 +26,7 @@ class KListBox; class TQPushButton; -class EditList : public QWidget +class EditList : public TQWidget { Q_OBJECT diff --git a/kdeprint/cups/cupsdconf2/portdialog.cpp b/kdeprint/cups/cupsdconf2/portdialog.cpp index e17e2b081..184005c13 100644 --- a/kdeprint/cups/cupsdconf2/portdialog.cpp +++ b/kdeprint/cups/cupsdconf2/portdialog.cpp @@ -93,12 +93,12 @@ TQString PortDialog::editListen(const TQString& s, TQWidget *parent, CupsdConf * { PortDialog dlg(parent); dlg.setInfos(conf); - int p = s.find(' '); + int p = s.tqfind(' '); if (p != -1) { dlg.usessl_->setChecked(s.left(p).startsWith("SSL")); QString addr = s.mid(p+1).stripWhiteSpace(); - int p1 = addr.find(':'); + int p1 = addr.tqfind(':'); if (p1 == -1) { dlg.address_->setText(addr); diff --git a/kdeprint/cups/cupsdconf2/qdirlineedit.h b/kdeprint/cups/cupsdconf2/qdirlineedit.h index 1f4d87d17..9d4a03b34 100644 --- a/kdeprint/cups/cupsdconf2/qdirlineedit.h +++ b/kdeprint/cups/cupsdconf2/qdirlineedit.h @@ -26,7 +26,7 @@ class TQLineEdit; class TQPushButton; -class QDirLineEdit : public QWidget +class QDirLineEdit : public TQWidget { Q_OBJECT public: diff --git a/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp b/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp index 1daca81cb..7b96d4ef9 100644 --- a/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp +++ b/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp @@ -44,7 +44,7 @@ QDirMultiLineEdit::QDirMultiLineEdit(TQWidget *parent, const char *name) connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveClicked())); m_remove->setEnabled(false); - m_view->setFixedHeight(QMAX(m_view->fontMetrics().lineSpacing()*3+m_view->lineWidth()*2, m_add->sizeHint().height()*2)); + m_view->setFixedHeight(QMAX(m_view->fontMetrics().lineSpacing()*3+m_view->lineWidth()*2, m_add->tqsizeHint().height()*2)); QHBoxLayout *l0 = new TQHBoxLayout(this, 0, 3); QVBoxLayout *l1 = new TQVBoxLayout(0, 0, 0); diff --git a/kdeprint/cups/cupsdconf2/qdirmultilineedit.h b/kdeprint/cups/cupsdconf2/qdirmultilineedit.h index 8853bd18e..66586d37f 100644 --- a/kdeprint/cups/cupsdconf2/qdirmultilineedit.h +++ b/kdeprint/cups/cupsdconf2/qdirmultilineedit.h @@ -26,7 +26,7 @@ class KListView; class TQListViewItem; class TQPushButton; -class QDirMultiLineEdit : public QWidget +class QDirMultiLineEdit : public TQWidget { Q_OBJECT diff --git a/kdeprint/cups/cupsdconf2/sizewidget.cpp b/kdeprint/cups/cupsdconf2/sizewidget.cpp index d77fe5aaa..5920c30a9 100644 --- a/kdeprint/cups/cupsdconf2/sizewidget.cpp +++ b/kdeprint/cups/cupsdconf2/sizewidget.cpp @@ -45,7 +45,7 @@ SizeWidget::SizeWidget( TQWidget *parent, const char *name ) void SizeWidget::setSizeString( const TQString& sz ) { - int p = sz.find( TQRegExp( "\\D" ) ); + int p = sz.tqfind( TQRegExp( "\\D" ) ); m_size->setValue( sz.left( p ).toInt() ); switch( sz[ p ].latin1() ) { diff --git a/kdeprint/cups/cupsdconf2/sizewidget.h b/kdeprint/cups/cupsdconf2/sizewidget.h index faa52e27b..56818b9a1 100644 --- a/kdeprint/cups/cupsdconf2/sizewidget.h +++ b/kdeprint/cups/cupsdconf2/sizewidget.h @@ -25,7 +25,7 @@ class TQSpinBox; class TQComboBox; -class SizeWidget : public QWidget +class SizeWidget : public TQWidget { public: SizeWidget( TQWidget *parent = 0, const char *name = 0 ); diff --git a/kdeprint/cups/cupsinfos.cpp b/kdeprint/cups/cupsinfos.cpp index 839f83612..78bbeb458 100644 --- a/kdeprint/cups/cupsinfos.cpp +++ b/kdeprint/cups/cupsinfos.cpp @@ -119,9 +119,9 @@ void CupsInfos::load() { KConfig *conf_ = KMFactory::self()->printConfig(); conf_->setGroup("CUPS"); - host_ = conf_->readEntry("Host",TQString::fromLatin1(cupsServer())); + host_ = conf_->readEntry("Host",TQString::tqfromLatin1(cupsServer())); port_ = conf_->readNumEntry("Port",ippPort()); - login_ = conf_->readEntry("Login",TQString::fromLatin1(cupsUser())); + login_ = conf_->readEntry("Login",TQString::tqfromLatin1(cupsUser())); savepwd_ = conf_->readBoolEntry( "SavePassword", false ); if ( savepwd_ ) { diff --git a/kdeprint/cups/image.cpp b/kdeprint/cups/image.cpp index 4fe214bc1..9e32ce771 100644 --- a/kdeprint/cups/image.cpp +++ b/kdeprint/cups/image.cpp @@ -267,9 +267,9 @@ TQImage convertImage(const TQImage& image, int hue, int saturation, int brightne for (int j=0;j 255) b2 = 255; else b2 = v; - img.setPixel(i,j,qRgb(r2,g2,b2)); + img.setPixel(i,j,tqRgb(r2,g2,b2)); } return img; } diff --git a/kdeprint/cups/imageposition.cpp b/kdeprint/cups/imageposition.cpp index bc2b207fd..9e0ab4941 100644 --- a/kdeprint/cups/imageposition.cpp +++ b/kdeprint/cups/imageposition.cpp @@ -44,8 +44,8 @@ ImagePosition::ImagePosition(TQWidget *parent, const char *name) : TQWidget(parent,name) { position_ = Center; - setMinimumSize(sizeHint()); - setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); + setMinimumSize(tqsizeHint()); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); pix_.load(locate("data", "kdeprint/preview-mini.png")); } @@ -147,7 +147,7 @@ void ImagePosition::paintEvent(TQPaintEvent*) p.end(); } -TQSize ImagePosition::sizeHint() const +TQSize ImagePosition::tqsizeHint() const { return TQSize(60, 80); } diff --git a/kdeprint/cups/imageposition.h b/kdeprint/cups/imageposition.h index caaa63ca2..406e96951 100644 --- a/kdeprint/cups/imageposition.h +++ b/kdeprint/cups/imageposition.h @@ -24,7 +24,7 @@ #include #include -class ImagePosition : public QWidget +class ImagePosition : public TQWidget { public: enum PositionType {TopLeft, @@ -45,7 +45,7 @@ public: void setPosition(int horiz = 1, int vert = 1); PositionType position() const { return (PositionType)position_; } TQString positionString() const; - TQSize sizeHint() const; + TQSize tqsizeHint() const; protected: void paintEvent(TQPaintEvent *); diff --git a/kdeprint/cups/imagepreview.cpp b/kdeprint/cups/imagepreview.cpp index 7ae5dabf0..9272399e4 100644 --- a/kdeprint/cups/imagepreview.cpp +++ b/kdeprint/cups/imagepreview.cpp @@ -51,7 +51,7 @@ void ImagePreview::setParameters(int brightness, int hue, int saturation, int ga hue_ = hue; saturation_ = saturation; gamma_ = gamma; - repaint(); + tqrepaint(); } void ImagePreview::paintEvent(TQPaintEvent*){ @@ -59,7 +59,7 @@ void ImagePreview::paintEvent(TQPaintEvent*){ int x = (width()-tmpImage.width())/2, y = (height()-tmpImage.height())/2; QPixmap buffer(width(), height()); - buffer.fill(parentWidget(), 0, 0); + buffer.fill(tqparentWidget(), 0, 0); QPainter p(&buffer); p.drawImage(x,y,tmpImage); p.end(); @@ -72,7 +72,7 @@ void ImagePreview::setBlackAndWhite(bool on){ update(); } -TQSize ImagePreview::minimumSizeHint() const +TQSize ImagePreview::tqminimumSizeHint() const { return image_.size(); } diff --git a/kdeprint/cups/imagepreview.h b/kdeprint/cups/imagepreview.h index 1967efdc2..ff9da9fb8 100644 --- a/kdeprint/cups/imagepreview.h +++ b/kdeprint/cups/imagepreview.h @@ -23,7 +23,7 @@ #include #include -class ImagePreview : public QWidget +class ImagePreview : public TQWidget { public: ImagePreview(TQWidget *parent=0, const char *name=0); @@ -32,7 +32,7 @@ public: void setParameters(int brightness, int hue, int saturation, int gamma); void setImage(const TQImage& image); void setBlackAndWhite(bool on); - TQSize minimumSizeHint() const; + TQSize tqminimumSizeHint() const; private: // Private attributes int brightness_; diff --git a/kdeprint/cups/ippreportdlg.cpp b/kdeprint/cups/ippreportdlg.cpp index 343cd4118..20882d8c4 100644 --- a/kdeprint/cups/ippreportdlg.cpp +++ b/kdeprint/cups/ippreportdlg.cpp @@ -59,7 +59,7 @@ void IppReportDlg::slotUser1() int hh = rich.height(), page(1); while (1) { - rich.draw(&painter, margin, margin, r, colorGroup()); + rich.draw(&painter, margin, margin, r, tqcolorGroup()); QString s = caption() + ": " + TQString::number(page); QRect br = painter.fontMetrics().boundingRect(s); painter.drawText(r.right()-br.width()-5, r.top()-br.height()-4, br.width()+5, br.height()+4, Qt::AlignRight|Qt::AlignTop, s); diff --git a/kdeprint/cups/ipprequest.cpp b/kdeprint/cups/ipprequest.cpp index 0b32e45e7..0f6c8cbc6 100644 --- a/kdeprint/cups/ipprequest.cpp +++ b/kdeprint/cups/ipprequest.cpp @@ -66,7 +66,7 @@ void dumpRequest(ipp_t *req, bool answer = false, const TQString& s = TQString:: ipp_attribute_t *attr = req->attrs; while (attr) { - TQString s = TQString::fromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16); + TQString s = TQString::tqfromLatin1("%1 (0x%2) = ").arg(attr->name).arg(attr->value_tag, 0, 16); for (int i=0;inum_values;i++) { switch (attr->value_tag) diff --git a/kdeprint/cups/kcupsprinterimpl.cpp b/kdeprint/cups/kcupsprinterimpl.cpp index 1bf6d55bf..7fa6da140 100644 --- a/kdeprint/cups/kcupsprinterimpl.cpp +++ b/kdeprint/cups/kcupsprinterimpl.cpp @@ -37,9 +37,9 @@ TQSize rangeToSize(const TQString& s) int p(-1); int from, to; - if ((p=range.find(',')) != -1) + if ((p=range.tqfind(',')) != -1) range.truncate(p); - if ((p=range.find('-')) != -1) + if ((p=range.tqfind('-')) != -1) { from = range.left(p).toInt(); to = range.right(range.length()-p-1).toInt(); @@ -67,8 +67,8 @@ bool KCupsPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) // check printer object if (!printer) return false; - QString hoststr = TQString::fromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port()); - cmd = TQString::fromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName())); + QString hoststr = TQString::tqfromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port()); + cmd = TQString::tqfromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName())); if (!CupsInfos::self()->login().isEmpty()) { QString userstr(CupsInfos::self()->login()); @@ -127,7 +127,7 @@ void KCupsPrinterImpl::broadcastOption(const TQString& key, const TQString& valu KPrinterImpl::broadcastOption("orientation-requested",(value == "Landscape" ? "4" : "3")); else if (key == "kde-pagesize") { - QString pagename = TQString::fromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); + QString pagename = TQString::tqfromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); KPrinterImpl::broadcastOption("PageSize",pagename); // simple hack for classes KPrinterImpl::broadcastOption("media",pagename); diff --git a/kdeprint/cups/kmcupsconfigwidget.h b/kdeprint/cups/kmcupsconfigwidget.h index 6c0ceedf7..6f213af6c 100644 --- a/kdeprint/cups/kmcupsconfigwidget.h +++ b/kdeprint/cups/kmcupsconfigwidget.h @@ -26,7 +26,7 @@ class TQLineEdit; class TQCheckBox; class KConfig; -class KMCupsConfigWidget : public QWidget +class KMCupsConfigWidget : public TQWidget { public: KMCupsConfigWidget(TQWidget *parent = 0, const char *name = 0); diff --git a/kdeprint/cups/kmcupsjobmanager.cpp b/kdeprint/cups/kmcupsjobmanager.cpp index 011256cd6..35f2ea272 100644 --- a/kdeprint/cups/kmcupsjobmanager.cpp +++ b/kdeprint/cups/kmcupsjobmanager.cpp @@ -93,7 +93,7 @@ bool KMCupsJobManager::sendCommandSystemJob(const TQPtrList& jobs, int ac if (argstr.isEmpty()) return false; req.setOperation(CUPS_MOVE_JOB); uri = - TQString::fromLatin1("ipp://%1/printers/%2").arg(CupsInfos::self()->hostaddr(), + TQString::tqfromLatin1("ipp://%1/printers/%2").arg(CupsInfos::self()->hostaddr(), argstr); req.addURI(IPP_TAG_OPERATION, "job-printer-uri", uri); break; @@ -150,7 +150,7 @@ bool KMCupsJobManager::listJobs(const TQString& prname, KMJobManager::JobType ty // other attributes req.addKeyword(IPP_TAG_OPERATION, "requested-attributes", keys); if (type == KMJobManager::CompletedJobs) - req.addKeyword(IPP_TAG_OPERATION,"which-jobs",TQString::fromLatin1("completed")); + req.addKeyword(IPP_TAG_OPERATION,"which-jobs",TQString::tqfromLatin1("completed")); if (limit > 0) req.addInteger(IPP_TAG_OPERATION,"limit",limit); @@ -218,7 +218,7 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr) } else if (name == "job-priority") { - job->setAttribute(0, TQString::fromLatin1("%1").arg(attr->values[0].integer, 3)); + job->setAttribute(0, TQString::tqfromLatin1("%1").arg(attr->values[0].integer, 3)); } else if (name == "job-billing") { @@ -356,7 +356,7 @@ static TQString processRange(const TQString& range) for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) { s.append(*it); - if ((*it).find('-') == -1) + if ((*it).tqfind('-') == -1) s.append("-").append(*it); s.append(","); } diff --git a/kdeprint/cups/kmcupsmanager.cpp b/kdeprint/cups/kmcupsmanager.cpp index 2d923a371..e4fe957e6 100644 --- a/kdeprint/cups/kmcupsmanager.cpp +++ b/kdeprint/cups/kmcupsmanager.cpp @@ -95,7 +95,7 @@ KMCupsManager::~KMCupsManager() TQString KMCupsManager::driverDbCreationProgram() { - return TQString::fromLatin1("/opt/kde3/bin/make_driver_db_cups"); + return TQString::tqfromLatin1("/opt/kde3/bin/make_driver_db_cups"); } TQString KMCupsManager::driverDirectory() @@ -173,7 +173,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p) else if (!p->option("requesting-user-name-allowed").isEmpty()) req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQStringList::split(",",p->option("requesting-user-name-allowed"),false)); else - req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::fromLatin1("all")); + req.addName(IPP_TAG_PRINTER,"requesting-user-name-allowed",TQString::tqfromLatin1("all")); } req.addText(IPP_TAG_PRINTER,"printer-info",p->description()); req.addText(IPP_TAG_PRINTER,"printer-location",p->location()); @@ -287,9 +287,9 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p) delete kes; m_hostSuccess = false; } else { - TQDateTime tm = TQDateTime::currentDateTime().addSecs(2); - while (!m_lookupDone && (TQDateTime::currentDateTime() < tm)) - qApp->processEvents(); + TQDateTime tm = TQDateTime::tqcurrentDateTime().addSecs(2); + while (!m_lookupDone && (TQDateTime::tqcurrentDateTime() < tm)) + tqApp->processEvents(); kes->cancelAsyncConnect(); @@ -358,8 +358,8 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p) // banners req.name("job-sheets-default",values); while (values.count() < 2) values.append("none"); - p->setOption("kde-banners",values.join(TQString::fromLatin1(","))); - if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::fromLatin1(","))); + p->setOption("kde-banners",values.join(TQString::tqfromLatin1(","))); + if (req.name("job-sheets-supported",values)) p->setOption("kde-banners-supported",values.join(TQString::tqfromLatin1(","))); // quotas int ival; @@ -405,7 +405,7 @@ bool KMCupsManager::testPrinter(KMPrinter *p) req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); req.addMime(IPP_TAG_OPERATION,"document-format","application/postscript"); if (!CupsInfos::self()->login().isEmpty()) req.addName(IPP_TAG_OPERATION,"requesting-user-name",CupsInfos::self()->login()); - req.addName(IPP_TAG_OPERATION,"job-name",TQString::fromLatin1("KDE Print Test")); + req.addName(IPP_TAG_OPERATION,"job-name",TQString::tqfromLatin1("KDE Print Test")); if (req.doFileRequest("/printers/",testpage)) return true; reportIppError(&req); @@ -453,7 +453,7 @@ void KMCupsManager::loadServerPrinters() // load default req.init(); req.setOperation(CUPS_GET_DEFAULT); - req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name")); + req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::tqfromLatin1("printer-name")); if (req.doRequest("/printers/")) { QString s = TQString::null; @@ -576,7 +576,7 @@ DrMain* KMCupsManager::loadMaticDriver(const TQString& drname) { QStringList comps = TQStringList::split('/', drname, false); QString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); - QString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); + QString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); QString exe = KStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { @@ -655,10 +655,10 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) if (line.startsWith("*% COMDATA #")) { int p(-1), q(-1); - if ((p=line.find("'name'")) != -1) + if ((p=line.tqfind("'name'")) != -1) { - p = line.find('\'',p+6)+1; - q = line.find('\'',p); + p = line.tqfind('\'',p+6)+1; + q = line.tqfind('\'',p); keyword = line.mid(p,q-p); opt = driver->findOption(keyword); if (opt && (opt->type() == DrBase::Integer || opt->type() == DrBase::Float)) @@ -666,19 +666,19 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) else isnumeric = false; } - /*else if ((p=line.find("'type'")) != -1) + /*else if ((p=line.tqfind("'type'")) != -1) { - p = line.find('\'',p+6)+1; - if (line.find("float",p) != -1 || line.find("int",p) != -1) + p = line.tqfind('\'',p+6)+1; + if (line.tqfind("float",p) != -1 || line.tqfind("int",p) != -1) isnumeric = true; else isnumeric = false; }*/ - else if ((p=line.find("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric) + else if ((p=line.tqfind("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric) { QString prefix = line.left(p+9); tout << prefix << " => '" << opt->valueText() << '\''; - if (line.find(',',p) != -1) + if (line.tqfind(',',p) != -1) tout << ','; tout << endl; continue; @@ -687,11 +687,11 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) } else if (line.startsWith("*Default")) { - int p = line.find(':',8); + int p = line.tqfind(':',8); keyword = line.mid(8,p-8); DrBase *bopt = 0; if ( keyword == "PageRegion" || keyword == "ImageableArea" || keyword == "PaperDimension" ) - bopt = driver->findOption( TQString::fromLatin1( "PageSize" ) ); + bopt = driver->findOption( TQString::tqfromLatin1( "PageSize" ) ); else bopt = driver->findOption( keyword ); if (bopt) @@ -938,7 +938,7 @@ void KMCupsManager::slotConnectionSuccess() IppRequest req; req.setOperation( CUPS_GET_PRINTERS ); - req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::fromLatin1( "printer-name" ) ); + req.addKeyword( IPP_TAG_OPERATION, "requested-attributes", TQString::tqfromLatin1( "printer-name" ) ); if ( req.doRequest( "/printers/" ) ) setUpdatePossible( true ); else diff --git a/kdeprint/cups/kmpropusers.cpp b/kdeprint/cups/kmpropusers.cpp index 3f0792d9c..35d6f0fe1 100644 --- a/kdeprint/cups/kmpropusers.cpp +++ b/kdeprint/cups/kmpropusers.cpp @@ -29,7 +29,7 @@ KMPropUsers::KMPropUsers(TQWidget *parent, const char *name) : KMPropWidget(parent,name) { m_text = new TQTextView(this); - m_text->setPaper(colorGroup().background()); + m_text->setPaper(tqcolorGroup().background()); m_text->setFrameStyle(TQFrame::NoFrame); QVBoxLayout *l0 = new TQVBoxLayout(this, 10, 0); diff --git a/kdeprint/cups/kmwbanners.cpp b/kdeprint/cups/kmwbanners.cpp index 80a21a37c..7755e9774 100644 --- a/kdeprint/cups/kmwbanners.cpp +++ b/kdeprint/cups/kmwbanners.cpp @@ -70,7 +70,7 @@ TQString mapBanner( const TQString& ban ) if ( map.size() == 0 ) for ( int i=0; bannermap[ i ].banner; i++ ) map[ bannermap[ i ].banner ] = bannermap[ i ].name; - TQMap::ConstIterator it = map.find( ban ); + TQMap::ConstIterator it = map.tqfind( ban ); if ( it == map.end() ) return ban; else @@ -120,7 +120,7 @@ void KMWBanners::initPrinter(KMPrinter *p) m_bans = TQStringList::split(',',p->option("kde-banners-supported"),false); if (m_bans.count() == 0) m_bans = defaultBanners(); - if (m_bans.find("none") == m_bans.end()) + if (m_bans.tqfind("none") == m_bans.end()) m_bans.prepend("none"); for ( TQStringList::Iterator it=m_bans.begin(); it!=m_bans.end(); ++it ) { diff --git a/kdeprint/cups/kmwfax.cpp b/kdeprint/cups/kmwfax.cpp index ea5b98f3b..45cd502fd 100644 --- a/kdeprint/cups/kmwfax.cpp +++ b/kdeprint/cups/kmwfax.cpp @@ -48,7 +48,7 @@ KMWFax::KMWFax(TQWidget *parent, const char *name) // initialize IppRequest req; req.setOperation(CUPS_GET_DEVICES); - QString uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); + QString uri = TQString::tqfromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); if (req.doRequest("/")) { @@ -57,7 +57,7 @@ KMWFax::KMWFax(TQWidget *parent, const char *name) { if (attr->name && strcmp(attr->name,"device-uri") == 0 && strncmp(attr->values[0].string.text,"fax",3) == 0) { - m_list->insertItem(SmallIcon("blockdevice"),TQString::fromLatin1(attr->values[0].string.text)); + m_list->insertItem(SmallIcon("blockdevice"),TQString::tqfromLatin1(attr->values[0].string.text)); } attr = attr->next; } diff --git a/kdeprint/cups/kmwipp.cpp b/kdeprint/cups/kmwipp.cpp index c0d30c452..81bcf584c 100644 --- a/kdeprint/cups/kmwipp.cpp +++ b/kdeprint/cups/kmwipp.cpp @@ -41,7 +41,7 @@ KMWIpp::KMWIpp(TQWidget *parent, const char *name) "before continuing.

    ")); setLabel(0,i18n("Host:")); setLabel(1,i18n("Port:")); - setText( 1, TQString::fromLatin1( "631" ) ); + setText( 1, TQString::tqfromLatin1( "631" ) ); } bool KMWIpp::isValid(TQString& msg) diff --git a/kdeprint/cups/kmwippprinter.cpp b/kdeprint/cups/kmwippprinter.cpp index 4900a584b..b5f799fc5 100644 --- a/kdeprint/cups/kmwippprinter.cpp +++ b/kdeprint/cups/kmwippprinter.cpp @@ -59,7 +59,7 @@ KMWIppPrinter::KMWIppPrinter(TQWidget *parent, const char *name) l1->setBuddy(m_uri); m_info = new TQTextView(this); - m_info->setPaper(colorGroup().background()); + m_info->setPaper(tqcolorGroup().background()); m_info->setMinimumHeight(100); m_info->setText(i18n("

    Either enter the printer URI directly, or use the network scanning facility.

    ")); m_ippreport = new KPushButton(KGuiItem(i18n("&IPP Report"), "kdeprint_report"), this); @@ -157,7 +157,7 @@ void KMWIppPrinter::slotPrinterSelected(TQListViewItem *item) req.setOperation(IPP_GET_PRINTER_ATTRIBUTES); req.setHost(item->text(1)); req.setPort(item->text(2).toInt()); - uri = TQString::fromLatin1("ipp://%1:%2/ipp").arg(item->text(1)).arg(item->text(2)); + uri = TQString::tqfromLatin1("ipp://%1:%2/ipp").arg(item->text(1)).arg(item->text(2)); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); keys.append("printer-name"); keys.append("printer-state"); @@ -176,7 +176,7 @@ void KMWIppPrinter::slotPrinterSelected(TQListViewItem *item) if (req.uri("printer-uri-supported",value)) { if (value[0] == '/') - value.prepend(TQString::fromLatin1("ipp://%1:%2").arg(item->text(1)).arg(item->text(2))); + value.prepend(TQString::tqfromLatin1("ipp://%1:%2").arg(item->text(1)).arg(item->text(2))); m_uri->setText(value); } if (req.text("printer-make-and-model",value) && !value.isEmpty()) txt.append(i18n("Model: %1
    ").arg(value)); diff --git a/kdeprint/cups/kmwippselect.cpp b/kdeprint/cups/kmwippselect.cpp index fbfa597c7..38fff88df 100644 --- a/kdeprint/cups/kmwippselect.cpp +++ b/kdeprint/cups/kmwippselect.cpp @@ -75,16 +75,16 @@ void KMWIppSelect::initPrinter(KMPrinter *p) IppRequest req; QString uri; req.setOperation(CUPS_GET_PRINTERS); - uri = TQString::fromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); + uri = TQString::tqfromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); - req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::fromLatin1("printer-name")); + req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::tqfromLatin1("printer-name")); if (req.doRequest("/printers/")) { ipp_attribute_t *attr = req.first(); while (attr) { if (attr->name && strcmp(attr->name,"printer-name") == 0) - m_list->insertItem(SmallIcon("kdeprint_printer"),TQString::fromLatin1(attr->values[0].string.text)); + m_list->insertItem(SmallIcon("kdeprint_printer"),TQString::tqfromLatin1(attr->values[0].string.text)); attr = attr->next; } m_list->sort(); diff --git a/kdeprint/cups/kmwother.cpp b/kdeprint/cups/kmwother.cpp index 36e80c76d..f7c91cca0 100644 --- a/kdeprint/cups/kmwother.cpp +++ b/kdeprint/cups/kmwother.cpp @@ -89,7 +89,7 @@ void KMWOther::initPrinter(KMPrinter *p) TQString prt = *( ++it ); if ( !prt.isEmpty() ) desc.append( " [" + prt + "]" ); - TQListViewItem *parent = parents.find( cl ); + TQListViewItem *parent = parents.tqfind( cl ); if ( !parent ) { parent = new TQListViewItem( root, lastparent, cl ); @@ -105,7 +105,7 @@ void KMWOther::initPrinter(KMPrinter *p) lastparent = parent; parents.insert( cl, parent ); } - item = new TQListViewItem( parent, last.find( cl ), desc, uri); + item = new TQListViewItem( parent, last.tqfind( cl ), desc, uri); last.insert( cl, item ); } } diff --git a/kdeprint/cups/kpimagepage.cpp b/kdeprint/cups/kpimagepage.cpp index c4cf50e48..a1b519f59 100644 --- a/kdeprint/cups/kpimagepage.cpp +++ b/kdeprint/cups/kpimagepage.cpp @@ -192,7 +192,7 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name) TQString whatsThisPreviewPositionImagePage = i18n( " " "

    Position Preview Thumbnail

    " "

    This position preview thumbnail indicates the position of the image on the paper sheet. " - "

    Click on horizontal and vertical radio buttons to move image alignment on paper around. Options are: " + "

    Click on horizontal and vertical radio buttons to move image tqalignment on paper around. Options are: " "