From 4ae0c208b66e0f7954e194384464fe2d0a2c56dd Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:51:49 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- cervisia/addremovedlg.cpp | 36 +- cervisia/addremovedlg.h | 6 +- cervisia/addrepositorydlg.cpp | 52 +- cervisia/addrepositorydlg.h | 18 +- cervisia/annotatectl.cpp | 26 +- cervisia/annotatectl.h | 4 +- cervisia/annotatedlg.cpp | 8 +- cervisia/annotatedlg.h | 4 +- cervisia/annotateview.cpp | 72 +-- cervisia/annotateview.h | 10 +- cervisia/cervisiapart.cpp | 402 +++++++------- cervisia/cervisiapart.h | 32 +- cervisia/cervisiashell.cpp | 26 +- cervisia/cervisiashell.h | 2 +- cervisia/changelogdlg.cpp | 42 +- cervisia/changelogdlg.h | 10 +- cervisia/checkoutdlg.cpp | 134 ++--- cervisia/checkoutdlg.h | 28 +- cervisia/commitdlg.cpp | 98 ++-- cervisia/commitdlg.h | 28 +- cervisia/cvsdir.cpp | 8 +- cervisia/cvsdir.h | 4 +- cervisia/cvsinitdlg.cpp | 32 +- cervisia/cvsinitdlg.h | 6 +- cervisia/cvsservice/cvsaskpass.cpp | 6 +- cervisia/cvsservice/cvsjob.cpp | 62 +-- cervisia/cvsservice/cvsjob.h | 30 +- cervisia/cvsservice/cvsloginjob.cpp | 16 +- cervisia/cvsservice/cvsloginjob.h | 20 +- cervisia/cvsservice/cvsservice.cpp | 136 ++--- cervisia/cvsservice/cvsservice.h | 108 ++-- cervisia/cvsservice/cvsserviceutils.cpp | 12 +- cervisia/cvsservice/cvsserviceutils.h | 4 +- cervisia/cvsservice/repository.cpp | 74 +-- cervisia/cvsservice/repository.h | 22 +- cervisia/cvsservice/sshagent.cpp | 54 +- cervisia/cvsservice/sshagent.h | 18 +- cervisia/diffdlg.cpp | 134 ++--- cervisia/diffdlg.h | 32 +- cervisia/diffview.cpp | 150 +++--- cervisia/diffview.h | 50 +- cervisia/dirignorelist.cpp | 10 +- cervisia/dirignorelist.h | 6 +- cervisia/editwithmenu.cpp | 12 +- cervisia/editwithmenu.h | 8 +- cervisia/entry.h | 12 +- cervisia/entry_status.cpp | 6 +- cervisia/entry_status.h | 2 +- cervisia/entry_status_change.h | 4 +- cervisia/globalignorelist.cpp | 18 +- cervisia/globalignorelist.h | 6 +- cervisia/historydlg.cpp | 142 ++--- cervisia/historydlg.h | 6 +- cervisia/ignorelistbase.cpp | 18 +- cervisia/ignorelistbase.h | 8 +- cervisia/logdlg.cpp | 178 +++---- cervisia/logdlg.h | 40 +- cervisia/loginfo.cpp | 52 +- cervisia/loginfo.h | 32 +- cervisia/loglist.cpp | 52 +- cervisia/loglist.h | 12 +- cervisia/logmessageedit.cpp | 30 +- cervisia/logmessageedit.h | 8 +- cervisia/logplainview.cpp | 64 +-- cervisia/logplainview.h | 10 +- cervisia/logtree.cpp | 110 ++-- cervisia/logtree.h | 32 +- cervisia/main.cpp | 32 +- cervisia/mergedlg.cpp | 66 +-- cervisia/mergedlg.h | 14 +- cervisia/misc.cpp | 106 ++-- cervisia/misc.h | 20 +- cervisia/patchoptiondlg.cpp | 54 +- cervisia/patchoptiondlg.h | 16 +- cervisia/progressdlg.cpp | 94 ++-- cervisia/progressdlg.h | 14 +- cervisia/protocolview.cpp | 48 +- cervisia/protocolview.h | 22 +- cervisia/qttableview.cpp | 154 +++--- cervisia/qttableview.h | 32 +- cervisia/repositories.cpp | 44 +- cervisia/repositories.h | 4 +- cervisia/repositorydlg.cpp | 124 ++--- cervisia/repositorydlg.h | 12 +- cervisia/resolvedlg.cpp | 160 +++--- cervisia/resolvedlg.h | 34 +- cervisia/resolvedlg_p.cpp | 12 +- cervisia/resolvedlg_p.h | 6 +- cervisia/settingsdlg.cpp | 94 ++-- cervisia/settingsdlg.h | 12 +- cervisia/stringmatcher.cpp | 24 +- cervisia/stringmatcher.h | 14 +- cervisia/tagdlg.cpp | 46 +- cervisia/tagdlg.h | 12 +- cervisia/tooltip.cpp | 38 +- cervisia/tooltip.h | 16 +- cervisia/updatedlg.cpp | 58 +- cervisia/updatedlg.h | 12 +- cervisia/updateview.cpp | 140 ++--- cervisia/updateview.h | 40 +- cervisia/updateview_items.cpp | 128 ++--- cervisia/updateview_items.h | 46 +- cervisia/updateview_visitors.cpp | 4 +- cervisia/watchdlg.cpp | 46 +- cervisia/watchdlg.h | 6 +- cervisia/watchersdlg.cpp | 32 +- cervisia/watchersdlg.h | 6 +- kapptemplate/kapp/app.cpp | 50 +- kapptemplate/kapp/app.h | 8 +- kapptemplate/kapp/app_client.cpp | 14 +- kapptemplate/kapp/appiface.h | 2 +- kapptemplate/kapp/apppref.cpp | 22 +- kapptemplate/kapp/apppref.h | 6 +- kapptemplate/kapp/appview.cpp | 28 +- kapptemplate/kapp/appview.h | 20 +- kapptemplate/kpartapp/app.cpp | 16 +- kapptemplate/kpartapp/app_part.cpp | 44 +- kapptemplate/kpartapp/app_part.h | 6 +- kapptemplate/kpartplugin/plugin_app.cpp | 16 +- kapptemplate/kpartplugin/plugin_app.h | 4 +- kbabel/addons/kfile-plugins/kfile_po.cpp | 20 +- kbabel/addons/kfile-plugins/kfile_po.h | 2 +- kbabel/addons/preview/pothumbcreator.cpp | 42 +- kbabel/addons/preview/pothumbcreator.h | 2 +- kbabel/catalogmanager/catalogmanager.cpp | 440 +++++++-------- kbabel/catalogmanager/catalogmanager.h | 54 +- kbabel/catalogmanager/catalogmanagerapp.h | 8 +- kbabel/catalogmanager/catalogmanageriface.h | 6 +- kbabel/catalogmanager/catalogmanagerview.cpp | 532 +++++++++---------- kbabel/catalogmanager/catalogmanagerview.h | 122 ++--- kbabel/catalogmanager/catmanlistitem.cpp | 164 +++--- kbabel/catalogmanager/catmanlistitem.h | 60 +-- kbabel/catalogmanager/findinfilesdialog.cpp | 32 +- kbabel/catalogmanager/findinfilesdialog.h | 16 +- kbabel/catalogmanager/libcvs/cvsdialog.cpp | 128 ++--- kbabel/catalogmanager/libcvs/cvsdialog.h | 36 +- kbabel/catalogmanager/libcvs/cvshandler.cpp | 124 ++--- kbabel/catalogmanager/libcvs/cvshandler.h | 38 +- kbabel/catalogmanager/libsvn/svndialog.cpp | 120 ++--- kbabel/catalogmanager/libsvn/svndialog.h | 34 +- kbabel/catalogmanager/libsvn/svnhandler.cpp | 152 +++--- kbabel/catalogmanager/libsvn/svnhandler.h | 52 +- kbabel/catalogmanager/main.cpp | 26 +- kbabel/catalogmanager/markpatterndialog.cpp | 26 +- kbabel/catalogmanager/markpatterndialog.h | 10 +- kbabel/catalogmanager/multiroughtransdlg.cpp | 16 +- kbabel/catalogmanager/multiroughtransdlg.h | 4 +- kbabel/catalogmanager/validateprogress.cpp | 56 +- kbabel/catalogmanager/validateprogress.h | 32 +- kbabel/catalogmanager/validateprogresswidget.ui.h | 4 +- kbabel/common/argextractor.cpp | 18 +- kbabel/common/argextractor.h | 18 +- kbabel/common/catalog.cpp | 570 ++++++++++---------- kbabel/common/catalog.h | 106 ++-- kbabel/common/catalog_private.h | 54 +- kbabel/common/catalogfileplugin.h | 30 +- kbabel/common/catalogitem.cpp | 96 ++-- kbabel/common/catalogitem.h | 48 +- kbabel/common/catalogitem_private.h | 16 +- kbabel/common/catalogsettings.cpp | 58 +- kbabel/common/catalogsettings.h | 60 +-- kbabel/common/diff.cpp | 56 +- kbabel/common/diff.h | 20 +- kbabel/common/editcmd.cpp | 10 +- kbabel/common/editcmd.h | 8 +- kbabel/common/exportplugin.cpp | 8 +- kbabel/common/findoptions.h | 10 +- kbabel/common/importplugin.cpp | 22 +- kbabel/common/importplugin_private.h | 12 +- kbabel/common/kbabeldatatool.h | 4 +- kbabel/common/kbmailer.cpp | 58 +- kbabel/common/kbmailer.h | 22 +- kbabel/common/kbproject.cpp | 14 +- kbabel/common/kbproject.h | 16 +- kbabel/common/kbprojectmanager.cpp | 10 +- kbabel/common/kbprojectmanager.h | 12 +- kbabel/common/msgfmt.cpp | 44 +- kbabel/common/msgfmt.h | 12 +- kbabel/common/poinfo.cpp | 172 +++--- kbabel/common/poinfo.h | 34 +- kbabel/common/projectsettings.cpp | 12 +- kbabel/common/projectsettings.h | 38 +- kbabel/common/regexpextractor.cpp | 64 +-- kbabel/common/regexpextractor.h | 46 +- kbabel/common/stringdistance.cpp | 10 +- kbabel/common/stringdistance.h | 16 +- kbabel/common/tagextractor.cpp | 4 +- kbabel/commonui/cmdedit.cpp | 80 +-- kbabel/commonui/cmdedit.h | 28 +- kbabel/commonui/context.cpp | 88 +-- kbabel/commonui/context.h | 20 +- kbabel/commonui/finddialog.cpp | 104 ++-- kbabel/commonui/finddialog.h | 48 +- kbabel/commonui/kactionselector.cpp | 146 ++--- kbabel/commonui/kactionselector.h | 64 +-- kbabel/commonui/klisteditor.ui.h | 14 +- kbabel/commonui/projectpref.cpp | 22 +- kbabel/commonui/projectpref.h | 2 +- kbabel/commonui/projectprefwidgets.cpp | 468 ++++++++-------- kbabel/commonui/projectprefwidgets.h | 142 ++--- kbabel/commonui/projectwizard.cpp | 24 +- kbabel/commonui/projectwizard.h | 12 +- kbabel/commonui/roughtransdlg.cpp | 160 +++--- kbabel/commonui/roughtransdlg.h | 22 +- kbabel/commonui/toolaction.cpp | 40 +- kbabel/commonui/toolaction.h | 12 +- kbabel/commonui/toolselectionwidget.cpp | 32 +- kbabel/commonui/toolselectionwidget.h | 10 +- kbabel/datatools/accelerators/main.cc | 22 +- kbabel/datatools/accelerators/main.h | 10 +- kbabel/datatools/arguments/main.cc | 54 +- kbabel/datatools/arguments/main.h | 8 +- kbabel/datatools/context/main.cc | 4 +- kbabel/datatools/context/main.h | 6 +- kbabel/datatools/equations/main.cc | 6 +- kbabel/datatools/equations/main.h | 8 +- kbabel/datatools/length/main.cc | 22 +- kbabel/datatools/length/main.h | 8 +- kbabel/datatools/not-translated/main.cc | 20 +- kbabel/datatools/not-translated/main.h | 8 +- kbabel/datatools/pluralforms/main.cc | 6 +- kbabel/datatools/pluralforms/main.h | 6 +- kbabel/datatools/punctuation/main.cc | 22 +- kbabel/datatools/punctuation/main.h | 4 +- kbabel/datatools/regexp/main.cc | 42 +- kbabel/datatools/regexp/main.h | 22 +- kbabel/datatools/setfuzzy/main.cc | 4 +- kbabel/datatools/setfuzzy/main.h | 4 +- kbabel/datatools/whitespace/main.cc | 28 +- kbabel/datatools/whitespace/main.h | 10 +- kbabel/datatools/xml/main.cc | 42 +- kbabel/datatools/xml/main.h | 16 +- kbabel/filters/gettext/gettextexport.cpp | 58 +- kbabel/filters/gettext/gettextexport.h | 10 +- kbabel/filters/gettext/gettextimport.cpp | 208 ++++---- kbabel/filters/gettext/gettextimport.h | 22 +- kbabel/filters/linguist/linguistexport.cpp | 62 +-- kbabel/filters/linguist/linguistexport.h | 18 +- kbabel/filters/linguist/linguistimport.cpp | 40 +- kbabel/filters/linguist/linguistimport.h | 14 +- kbabel/filters/xliff/xliffexport.cpp | 64 +-- kbabel/filters/xliff/xliffexport.h | 16 +- kbabel/filters/xliff/xliffimport.cpp | 42 +- kbabel/filters/xliff/xliffimport.h | 14 +- kbabel/kbabel/charselectview.cpp | 36 +- kbabel/kbabel/charselectview.h | 6 +- kbabel/kbabel/commentview.cpp | 34 +- kbabel/kbabel/commentview.h | 10 +- kbabel/kbabel/contextview.cpp | 46 +- kbabel/kbabel/contextview.h | 4 +- kbabel/kbabel/errorlistview.cpp | 16 +- kbabel/kbabel/errorlistview.h | 4 +- kbabel/kbabel/gotodialog.cpp | 6 +- kbabel/kbabel/gotodialog.h | 4 +- kbabel/kbabel/headereditor.cpp | 20 +- kbabel/kbabel/headereditor.h | 2 +- kbabel/kbabel/hidingmsgedit.cpp | 52 +- kbabel/kbabel/hidingmsgedit.h | 42 +- kbabel/kbabel/kbabel.cpp | 574 ++++++++++---------- kbabel/kbabel/kbabel.h | 50 +- kbabel/kbabel/kbabeliface.h | 38 +- kbabel/kbabel/kbabelpref.cpp | 18 +- kbabel/kbabel/kbabelpref.h | 6 +- kbabel/kbabel/kbabelsplash.cpp | 32 +- kbabel/kbabel/kbabelsplash.h | 6 +- kbabel/kbabel/kbabelview.cpp | 560 ++++++++++---------- kbabel/kbabel/kbabelview.h | 118 ++--- kbabel/kbabel/kbabelview2.cpp | 126 ++--- kbabel/kbabel/kbbookmarkhandler.cpp | 28 +- kbabel/kbabel/kbbookmarkhandler.h | 22 +- kbabel/kbabel/kbcatalog.cpp | 2 +- kbabel/kbabel/kbcatalog.h | 2 +- kbabel/kbabel/kbcataloglistview.cpp | 24 +- kbabel/kbabel/kbcataloglistview.h | 16 +- kbabel/kbabel/kbcataloglistviewitem.cpp | 32 +- kbabel/kbabel/kbcataloglistviewitem.h | 26 +- kbabel/kbabel/kbcatalogview.cpp | 8 +- kbabel/kbabel/kbcatalogview.h | 6 +- kbabel/kbabel/kbcharselect.cpp | 24 +- kbabel/kbabel/kbcharselect.h | 8 +- kbabel/kbabel/kbhighlighting.cpp | 44 +- kbabel/kbabel/kbhighlighting.h | 32 +- kbabel/kbabel/main.cpp | 138 ++--- kbabel/kbabel/mymultilineedit.cpp | 300 +++++------ kbabel/kbabel/mymultilineedit.h | 92 ++-- kbabel/kbabel/sourceview.cpp | 12 +- kbabel/kbabel/sourceview.h | 2 +- kbabel/kbabel/spelldlg.cpp | 10 +- kbabel/kbabel/spelldlg.h | 2 +- kbabel/kbabel/taglistview.cpp | 22 +- kbabel/kbabel/taglistview.h | 4 +- kbabel/kbabeldict/aboutmoduledlg.cpp | 4 +- kbabel/kbabeldict/aboutmoduledlg.h | 4 +- kbabel/kbabeldict/dictchooser.cpp | 76 +-- kbabel/kbabeldict/dictchooser.h | 28 +- kbabel/kbabeldict/dictionarymenu.cpp | 44 +- kbabel/kbabeldict/dictionarymenu.h | 26 +- kbabel/kbabeldict/kbabeldict.cpp | 10 +- kbabel/kbabeldict/kbabeldictbox.cpp | 386 +++++++------- kbabel/kbabeldict/kbabeldictbox.h | 126 ++--- kbabel/kbabeldict/kbabeldictiface.h | 8 +- kbabel/kbabeldict/kbabeldictview.cpp | 108 ++-- kbabel/kbabeldict/kbabeldictview.h | 24 +- kbabel/kbabeldict/kbabelsplash.cpp | 32 +- kbabel/kbabeldict/kbabelsplash.h | 6 +- kbabel/kbabeldict/main.cpp | 10 +- .../modules/dbsearchengine/KDBSearchEngine.cpp | 322 +++++------ .../modules/dbsearchengine/KDBSearchEngine.h | 86 +-- .../kbabeldict/modules/dbsearchengine/database.cpp | 122 ++--- .../kbabeldict/modules/dbsearchengine/database.h | 74 +-- .../kbabeldict/modules/dbsearchengine/dbscan.cpp | 30 +- kbabel/kbabeldict/modules/dbsearchengine/dbscan.h | 8 +- .../modules/dbsearchengine/dbse_factory.cpp | 8 +- .../modules/dbsearchengine/dbse_factory.h | 8 +- .../modules/dbsearchengine/preferenceswidget.cpp | 28 +- .../modules/dbsearchengine/preferenceswidget.h | 4 +- .../modules/dbsearchengine2/KDBSearchEngine2.cpp | 118 ++--- .../modules/dbsearchengine2/KDBSearchEngine2.h | 48 +- .../modules/dbsearchengine2/algorithms.cpp | 86 +-- .../modules/dbsearchengine2/algorithms.h | 24 +- .../kbabeldict/modules/dbsearchengine2/chunk.cpp | 52 +- kbabel/kbabeldict/modules/dbsearchengine2/chunk.h | 64 +-- .../modules/dbsearchengine2/database.cpp | 166 +++--- .../kbabeldict/modules/dbsearchengine2/database.h | 82 +-- .../modules/dbsearchengine2/dbentries.cpp | 38 +- .../kbabeldict/modules/dbsearchengine2/dbentries.h | 62 +-- .../kbabeldict/modules/dbsearchengine2/dbscan.cpp | 44 +- kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h | 18 +- .../modules/dbsearchengine2/dbse2_factory.cpp | 8 +- .../modules/dbsearchengine2/dbse2_factory.h | 8 +- .../modules/dbsearchengine2/preferenceswidget.cpp | 24 +- .../modules/dbsearchengine2/preferenceswidget.h | 2 +- .../kbabeldict/modules/poauxiliary/pa_factory.cpp | 8 +- kbabel/kbabeldict/modules/poauxiliary/pa_factory.h | 8 +- .../kbabeldict/modules/poauxiliary/poauxiliary.cpp | 84 +-- .../kbabeldict/modules/poauxiliary/poauxiliary.h | 56 +- .../modules/poauxiliary/preferenceswidget.cpp | 20 +- .../modules/poauxiliary/preferenceswidget.h | 6 +- .../modules/pocompendium/compendiumdata.cpp | 52 +- .../modules/pocompendium/compendiumdata.h | 44 +- .../kbabeldict/modules/pocompendium/pc_factory.cpp | 8 +- .../kbabeldict/modules/pocompendium/pc_factory.h | 8 +- .../modules/pocompendium/pocompendium.cpp | 196 +++---- .../kbabeldict/modules/pocompendium/pocompendium.h | 58 +- .../modules/pocompendium/preferenceswidget.cpp | 100 ++-- .../modules/pocompendium/preferenceswidget.h | 6 +- kbabel/kbabeldict/modules/tmx/pc_factory.cpp | 8 +- kbabel/kbabeldict/modules/tmx/pc_factory.h | 8 +- .../kbabeldict/modules/tmx/preferenceswidget.cpp | 94 ++-- kbabel/kbabeldict/modules/tmx/preferenceswidget.h | 6 +- kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp | 164 +++--- kbabel/kbabeldict/modules/tmx/tmxcompendium.h | 42 +- .../kbabeldict/modules/tmx/tmxcompendiumdata.cpp | 64 +-- kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h | 52 +- kbabel/kbabeldict/searchengine.cpp | 40 +- kbabel/kbabeldict/searchengine.h | 144 ++--- kbugbuster/backend/bug.cpp | 64 +-- kbugbuster/backend/bug.h | 30 +- kbugbuster/backend/bugcache.cpp | 78 +-- kbugbuster/backend/bugcache.h | 18 +- kbugbuster/backend/bugcommand.cpp | 86 +-- kbugbuster/backend/bugcommand.h | 132 ++--- kbugbuster/backend/bugdetails.cpp | 70 +-- kbugbuster/backend/bugdetails.h | 26 +- kbugbuster/backend/bugdetailsimpl.h | 24 +- kbugbuster/backend/bugdetailsjob.cpp | 2 +- kbugbuster/backend/bugdetailsjob.h | 2 +- kbugbuster/backend/bugdetailspart.h | 14 +- kbugbuster/backend/bugimpl.h | 6 +- kbugbuster/backend/bugjob.cpp | 22 +- kbugbuster/backend/bugjob.h | 12 +- kbugbuster/backend/buglistjob.cpp | 8 +- kbugbuster/backend/buglistjob.h | 10 +- kbugbuster/backend/bugmybugsjob.cpp | 6 +- kbugbuster/backend/bugmybugsjob.h | 4 +- kbugbuster/backend/bugserver.cpp | 76 +-- kbugbuster/backend/bugserver.h | 38 +- kbugbuster/backend/bugserverconfig.cpp | 24 +- kbugbuster/backend/bugserverconfig.h | 58 +- kbugbuster/backend/bugsystem.cpp | 118 ++--- kbugbuster/backend/bugsystem.h | 52 +- kbugbuster/backend/domprocessor.cpp | 142 ++--- kbugbuster/backend/domprocessor.h | 24 +- kbugbuster/backend/error.h | 6 +- kbugbuster/backend/htmlparser.cpp | 80 +-- kbugbuster/backend/htmlparser.h | 36 +- kbugbuster/backend/kbbprefs.cpp | 16 +- kbugbuster/backend/kbbprefs.h | 14 +- kbugbuster/backend/mailsender.cpp | 92 ++-- kbugbuster/backend/mailsender.h | 26 +- kbugbuster/backend/package.cpp | 12 +- kbugbuster/backend/package.h | 10 +- kbugbuster/backend/packageimpl.h | 12 +- kbugbuster/backend/packagelistjob.cpp | 6 +- kbugbuster/backend/packagelistjob.h | 4 +- kbugbuster/backend/person.cpp | 12 +- kbugbuster/backend/person.h | 14 +- kbugbuster/backend/processor.cpp | 6 +- kbugbuster/backend/processor.h | 8 +- kbugbuster/backend/rdfprocessor.cpp | 18 +- kbugbuster/backend/rdfprocessor.h | 4 +- kbugbuster/backend/smtp.cpp | 50 +- kbugbuster/backend/smtp.h | 30 +- kbugbuster/gui/buglvi.cpp | 24 +- kbugbuster/gui/buglvi.h | 6 +- kbugbuster/gui/centralwidget.cpp | 148 +++--- kbugbuster/gui/centralwidget.h | 38 +- kbugbuster/gui/cwbugdetails.cpp | 66 +-- kbugbuster/gui/cwbugdetails.h | 14 +- kbugbuster/gui/cwbugdetailscontainer.cpp | 76 +-- kbugbuster/gui/cwbugdetailscontainer.h | 4 +- kbugbuster/gui/cwbuglistcontainer.cpp | 92 ++-- kbugbuster/gui/cwbuglistcontainer.h | 32 +- kbugbuster/gui/cwloadingwidget.cpp | 74 +-- kbugbuster/gui/cwloadingwidget.h | 32 +- kbugbuster/gui/cwsearchwidget.cpp | 24 +- kbugbuster/gui/cwsearchwidget.h | 6 +- kbugbuster/gui/kbbbookmarkmanager.h | 2 +- kbugbuster/gui/kbbmainwindow.cpp | 170 +++--- kbugbuster/gui/kbbmainwindow.h | 22 +- kbugbuster/gui/loadallbugsdlg.cpp | 20 +- kbugbuster/gui/loadallbugsdlg.h | 4 +- kbugbuster/gui/messageeditor.cpp | 36 +- kbugbuster/gui/messageeditor.h | 8 +- kbugbuster/gui/msginputdialog.cpp | 76 +-- kbugbuster/gui/msginputdialog.h | 12 +- kbugbuster/gui/packagelvi.cpp | 10 +- kbugbuster/gui/packagelvi.h | 14 +- kbugbuster/gui/packageselectdialog.cpp | 84 +-- kbugbuster/gui/packageselectdialog.h | 28 +- kbugbuster/gui/preferencesdialog.cpp | 100 ++-- kbugbuster/gui/preferencesdialog.h | 24 +- kbugbuster/gui/serverconfigdialog.cpp | 36 +- kbugbuster/gui/serverconfigdialog.h | 10 +- kbugbuster/gui/severityselectdialog.cpp | 18 +- kbugbuster/gui/severityselectdialog.h | 6 +- kbugbuster/kresources/kcalresource.cpp | 30 +- kbugbuster/kresources/kcalresource.h | 10 +- kbugbuster/kresources/kcalresourceconfig.cpp | 14 +- kbugbuster/kresources/kcalresourceconfig.h | 2 +- kbugbuster/main.cpp | 4 +- kcachegrind/kcachegrind/cachegrindloader.cpp | 100 ++-- kcachegrind/kcachegrind/callgraphview.cpp | 476 ++++++++--------- kcachegrind/kcachegrind/callgraphview.h | 128 ++--- kcachegrind/kcachegrind/callitem.cpp | 32 +- kcachegrind/kcachegrind/callitem.h | 6 +- kcachegrind/kcachegrind/callmapview.cpp | 108 ++-- kcachegrind/kcachegrind/callmapview.h | 34 +- kcachegrind/kcachegrind/callview.cpp | 50 +- kcachegrind/kcachegrind/callview.h | 16 +- kcachegrind/kcachegrind/configdlg.cpp | 172 +++--- kcachegrind/kcachegrind/configdlg.h | 20 +- kcachegrind/kcachegrind/configuration.cpp | 122 ++--- kcachegrind/kcachegrind/configuration.h | 28 +- kcachegrind/kcachegrind/costlistitem.cpp | 30 +- kcachegrind/kcachegrind/costlistitem.h | 8 +- kcachegrind/kcachegrind/costtypeitem.cpp | 22 +- kcachegrind/kcachegrind/costtypeitem.h | 6 +- kcachegrind/kcachegrind/costtypeview.cpp | 60 +-- kcachegrind/kcachegrind/costtypeview.h | 18 +- kcachegrind/kcachegrind/coverageitem.cpp | 76 +-- kcachegrind/kcachegrind/coverageitem.h | 14 +- kcachegrind/kcachegrind/coverageview.cpp | 46 +- kcachegrind/kcachegrind/coverageview.h | 16 +- kcachegrind/kcachegrind/dumpmanager.cpp | 2 +- kcachegrind/kcachegrind/dumpmanager.h | 12 +- kcachegrind/kcachegrind/dumpselection.cpp | 2 +- kcachegrind/kcachegrind/dumpselection.h | 4 +- kcachegrind/kcachegrind/functionitem.cpp | 38 +- kcachegrind/kcachegrind/functionitem.h | 10 +- kcachegrind/kcachegrind/functionselection.cpp | 158 +++--- kcachegrind/kcachegrind/functionselection.h | 30 +- kcachegrind/kcachegrind/instritem.cpp | 92 ++-- kcachegrind/kcachegrind/instritem.h | 28 +- kcachegrind/kcachegrind/instrview.cpp | 98 ++-- kcachegrind/kcachegrind/instrview.h | 24 +- kcachegrind/kcachegrind/listutils.cpp | 48 +- kcachegrind/kcachegrind/listutils.h | 22 +- kcachegrind/kcachegrind/loader.cpp | 8 +- kcachegrind/kcachegrind/loader.h | 24 +- kcachegrind/kcachegrind/main.cpp | 6 +- kcachegrind/kcachegrind/multiview.cpp | 24 +- kcachegrind/kcachegrind/multiview.h | 18 +- kcachegrind/kcachegrind/partgraph.cpp | 38 +- kcachegrind/kcachegrind/partgraph.h | 22 +- kcachegrind/kcachegrind/partlistitem.cpp | 30 +- kcachegrind/kcachegrind/partlistitem.h | 6 +- kcachegrind/kcachegrind/partselection.cpp | 54 +- kcachegrind/kcachegrind/partselection.h | 8 +- kcachegrind/kcachegrind/partview.cpp | 36 +- kcachegrind/kcachegrind/partview.h | 12 +- kcachegrind/kcachegrind/pool.cpp | 2 +- kcachegrind/kcachegrind/sourceitem.cpp | 92 ++-- kcachegrind/kcachegrind/sourceitem.h | 24 +- kcachegrind/kcachegrind/sourceview.cpp | 104 ++-- kcachegrind/kcachegrind/sourceview.h | 20 +- kcachegrind/kcachegrind/stackbrowser.cpp | 6 +- kcachegrind/kcachegrind/stackbrowser.h | 2 +- kcachegrind/kcachegrind/stackitem.cpp | 22 +- kcachegrind/kcachegrind/stackitem.h | 6 +- kcachegrind/kcachegrind/stackselection.cpp | 40 +- kcachegrind/kcachegrind/stackselection.h | 6 +- kcachegrind/kcachegrind/subcost.cpp | 10 +- kcachegrind/kcachegrind/subcost.h | 4 +- kcachegrind/kcachegrind/tabview.cpp | 204 +++---- kcachegrind/kcachegrind/tabview.h | 66 +-- kcachegrind/kcachegrind/toplevel.cpp | 486 ++++++++--------- kcachegrind/kcachegrind/toplevel.h | 52 +- kcachegrind/kcachegrind/tracedata.cpp | 374 ++++++------- kcachegrind/kcachegrind/tracedata.h | 332 ++++++------ kcachegrind/kcachegrind/traceitemview.cpp | 24 +- kcachegrind/kcachegrind/traceitemview.h | 22 +- kcachegrind/kcachegrind/treemap.cpp | 338 ++++++------ kcachegrind/kcachegrind/treemap.h | 178 +++---- kcachegrind/kcachegrind/utils.cpp | 10 +- kcachegrind/kcachegrind/utils.h | 12 +- kdeaccounts-plugin/kdeaccountsformat.cpp | 28 +- kdeaccounts-plugin/kdeaccountsformat.h | 10 +- kfile-plugins/c++/kfile_cpp.cpp | 36 +- kfile-plugins/c++/kfile_cpp.h | 4 +- kfile-plugins/diff/kfile_diff.cpp | 102 ++-- kfile-plugins/diff/kfile_diff.h | 14 +- kfile-plugins/ts/kfile_ts.cpp | 24 +- kfile-plugins/ts/kfile_ts.h | 4 +- kioslave/svn/ksvnd/commitdlg.ui.h | 4 +- kioslave/svn/ksvnd/ksvnd.cpp | 104 ++-- kioslave/svn/ksvnd/ksvnd.h | 24 +- kioslave/svn/svn.cpp | 226 ++++---- kioslave/svn/svn.h | 36 +- kioslave/svn/svnhelper/kio_svn_helper.cpp | 110 ++-- kioslave/svn/svnhelper/kio_svn_helper.h | 4 +- kmtrace/demangle.cpp | 18 +- kmtrace/kmtrace.cpp | 84 +-- kmtrace/match.cpp | 24 +- kompare/interfaces/kompareinterface.cpp | 2 +- kompare/interfaces/kompareinterface.h | 12 +- kompare/kompare_shell.cpp | 106 ++-- kompare/kompare_shell.h | 6 +- kompare/komparenavtreepart/komparenavtreepart.cpp | 82 +-- kompare/komparenavtreepart/komparenavtreepart.h | 66 +-- kompare/komparepart/kompare_part.cpp | 170 +++--- kompare/komparepart/kompare_part.h | 18 +- kompare/komparepart/kompare_qsplitter.h | 86 +-- kompare/komparepart/kompareconnectwidget.cpp | 76 +-- kompare/komparepart/kompareconnectwidget.h | 26 +- kompare/komparepart/komparelistview.cpp | 114 ++-- kompare/komparepart/komparelistview.h | 46 +- kompare/komparepart/kompareprefdlg.cpp | 4 +- kompare/komparepart/komparesaveoptionswidget.cpp | 58 +- kompare/komparepart/komparesaveoptionswidget.h | 8 +- kompare/komparepart/komparesplitter.cpp | 98 ++-- kompare/komparepart/komparesplitter.h | 16 +- kompare/kompareurldialog.cpp | 26 +- kompare/kompareurldialog.h | 10 +- kompare/libdialogpages/diffpage.cpp | 142 ++--- kompare/libdialogpages/diffpage.h | 34 +- kompare/libdialogpages/diffsettings.cpp | 2 +- kompare/libdialogpages/diffsettings.h | 18 +- kompare/libdialogpages/filespage.cpp | 36 +- kompare/libdialogpages/filespage.h | 20 +- kompare/libdialogpages/filessettings.cpp | 4 +- kompare/libdialogpages/filessettings.h | 18 +- kompare/libdialogpages/pagebase.cpp | 24 +- kompare/libdialogpages/pagebase.h | 8 +- kompare/libdialogpages/settingsbase.cpp | 4 +- kompare/libdialogpages/settingsbase.h | 4 +- kompare/libdialogpages/viewpage.cpp | 68 +-- kompare/libdialogpages/viewpage.h | 8 +- kompare/libdialogpages/viewsettings.cpp | 18 +- kompare/libdialogpages/viewsettings.h | 34 +- kompare/libdiff2/cvsdiffparser.cpp | 22 +- kompare/libdiff2/cvsdiffparser.h | 4 +- kompare/libdiff2/difference.cpp | 8 +- kompare/libdiff2/difference.h | 42 +- kompare/libdiff2/diffhunk.cpp | 12 +- kompare/libdiff2/diffhunk.h | 14 +- kompare/libdiff2/diffmodel.cpp | 38 +- kompare/libdiff2/diffmodel.h | 66 +-- kompare/libdiff2/diffmodellist.h | 10 +- kompare/libdiff2/diffparser.cpp | 16 +- kompare/libdiff2/diffparser.h | 2 +- kompare/libdiff2/kompare.h | 14 +- kompare/libdiff2/komparemodellist.cpp | 164 +++--- kompare/libdiff2/komparemodellist.h | 52 +- kompare/libdiff2/kompareprocess.cpp | 44 +- kompare/libdiff2/kompareprocess.h | 16 +- kompare/libdiff2/levenshteintable.cpp | 18 +- kompare/libdiff2/parser.cpp | 20 +- kompare/libdiff2/parser.h | 6 +- kompare/libdiff2/parserbase.cpp | 54 +- kompare/libdiff2/parserbase.h | 60 +-- kompare/libdiff2/perforceparser.cpp | 32 +- kompare/libdiff2/perforceparser.h | 2 +- kompare/main.cpp | 4 +- kprofilemethod/kprofilemethod.h | 6 +- kspy/classinfoview.cpp | 18 +- kspy/classinfoview.h | 8 +- kspy/kspy.h | 2 +- kspy/navview.cpp | 28 +- kspy/navview.h | 8 +- kspy/navviewitem.cpp | 6 +- kspy/navviewitem.h | 8 +- kspy/propsview.cpp | 116 ++-- kspy/propsview.h | 8 +- kspy/receiversview.cpp | 30 +- kspy/receiversview.h | 8 +- kspy/sigslotview.cpp | 26 +- kspy/sigslotview.h | 8 +- kspy/spy.cpp | 44 +- kspy/spy.h | 10 +- kstartperf/kstartperf.cpp | 18 +- kuiviewer/kuiviewer.cpp | 18 +- kuiviewer/kuiviewer.h | 2 +- kuiviewer/kuiviewer_part.cpp | 74 +-- kuiviewer/kuiviewer_part.h | 10 +- kuiviewer/main.cpp | 4 +- kuiviewer/quicreator.cpp | 14 +- kuiviewer/quicreator.h | 2 +- kunittest/dcopinterface.h | 6 +- kunittest/example/module/sampleextra.cpp | 2 +- kunittest/example/module/samplemodule2.cpp | 8 +- kunittest/example/module/sampletests.cpp | 12 +- kunittest/example/module/sampletests.h | 2 +- kunittest/example/simple/sampletest.cpp | 8 +- kunittest/runnergui.cpp | 122 ++--- kunittest/runnergui.h | 18 +- kunittest/testerwidget.ui.h | 12 +- poxml/GettextParser.cpp | 14 +- poxml/parser.cpp | 214 ++++---- poxml/parser.h | 80 +-- poxml/po2xml.cpp | 40 +- poxml/split.cpp | 14 +- poxml/transxx.cpp | 38 +- poxml/xml2pot.cpp | 12 +- scheck/scheck.cpp | 588 ++++++++++----------- scheck/scheck.h | 110 ++-- umbrello/umbrello/activitywidget.cpp | 38 +- umbrello/umbrello/activitywidget.h | 8 +- umbrello/umbrello/actor.cpp | 8 +- umbrello/umbrello/actor.h | 6 +- umbrello/umbrello/actorwidget.cpp | 18 +- umbrello/umbrello/actorwidget.h | 6 +- umbrello/umbrello/aligntoolbar.cpp | 10 +- umbrello/umbrello/aligntoolbar.h | 6 +- umbrello/umbrello/artifact.cpp | 10 +- umbrello/umbrello/artifact.h | 6 +- umbrello/umbrello/artifactwidget.cpp | 72 +-- umbrello/umbrello/artifactwidget.h | 18 +- umbrello/umbrello/association.cpp | 74 +-- umbrello/umbrello/association.h | 30 +- umbrello/umbrello/associationwidget.cpp | 370 ++++++------- umbrello/umbrello/associationwidget.h | 108 ++-- umbrello/umbrello/associationwidgetlist.h | 6 +- umbrello/umbrello/attribute.cpp | 72 +-- umbrello/umbrello/attribute.h | 24 +- umbrello/umbrello/autolayout/autolayoutdlg.cpp | 12 +- umbrello/umbrello/autolayout/autolayoutdlg.h | 8 +- umbrello/umbrello/autolayout/simplecanvas.h | 2 +- umbrello/umbrello/boxwidget.cpp | 10 +- umbrello/umbrello/boxwidget.h | 6 +- umbrello/umbrello/classifier.cpp | 108 ++-- umbrello/umbrello/classifier.h | 32 +- umbrello/umbrello/classifiercodedocument.cpp | 70 +-- umbrello/umbrello/classifiercodedocument.h | 24 +- umbrello/umbrello/classifierlistitem.cpp | 10 +- umbrello/umbrello/classifierlistitem.h | 10 +- umbrello/umbrello/classifierwidget.cpp | 98 ++-- umbrello/umbrello/classifierwidget.h | 22 +- umbrello/umbrello/clipboard/idchangelog.h | 14 +- umbrello/umbrello/clipboard/umlclipboard.cpp | 22 +- umbrello/umbrello/clipboard/umlclipboard.h | 18 +- umbrello/umbrello/clipboard/umldrag.cpp | 258 ++++----- umbrello/umbrello/clipboard/umldrag.h | 46 +- umbrello/umbrello/cmdlineexportallviewsevent.cpp | 14 +- umbrello/umbrello/cmdlineexportallviewsevent.h | 8 +- umbrello/umbrello/codeaccessormethod.cpp | 14 +- umbrello/umbrello/codeaccessormethod.h | 10 +- umbrello/umbrello/codeaccessormethodlist.h | 6 +- umbrello/umbrello/codeblock.cpp | 14 +- umbrello/umbrello/codeblock.h | 14 +- umbrello/umbrello/codeblockwithcomments.cpp | 40 +- umbrello/umbrello/codeblockwithcomments.h | 16 +- umbrello/umbrello/codeclassfield.cpp | 64 +-- umbrello/umbrello/codeclassfield.h | 22 +- .../umbrello/codeclassfielddeclarationblock.cpp | 12 +- umbrello/umbrello/codeclassfielddeclarationblock.h | 8 +- umbrello/umbrello/codeclassfieldlist.h | 6 +- umbrello/umbrello/codecomment.cpp | 8 +- umbrello/umbrello/codecomment.h | 8 +- umbrello/umbrello/codedocument.cpp | 96 ++-- umbrello/umbrello/codedocument.h | 58 +- umbrello/umbrello/codedocumentlist.h | 6 +- umbrello/umbrello/codegenerationpolicy.cpp | 72 +-- umbrello/umbrello/codegenerationpolicy.h | 32 +- umbrello/umbrello/codegenerator.cpp | 152 +++--- umbrello/umbrello/codegenerator.h | 46 +- umbrello/umbrello/codegenerators/adawriter.cpp | 86 +-- umbrello/umbrello/codegenerators/adawriter.h | 16 +- umbrello/umbrello/codegenerators/aswriter.cpp | 36 +- umbrello/umbrello/codegenerators/aswriter.h | 6 +- umbrello/umbrello/codegenerators/classifierinfo.h | 6 +- umbrello/umbrello/codegenerators/codegen_utils.cpp | 12 +- umbrello/umbrello/codegenerators/codegen_utils.h | 8 +- .../umbrello/codegenerators/codegenpolicyext.h | 6 +- .../umbrello/codegenerators/cppcodeclassfield.cpp | 8 +- .../umbrello/codegenerators/cppcodeclassfield.h | 10 +- .../umbrello/codegenerators/cppcodecomment.cpp | 26 +- umbrello/umbrello/codegenerators/cppcodecomment.h | 12 +- .../codegenerators/cppcodedocumentation.cpp | 34 +- .../umbrello/codegenerators/cppcodedocumentation.h | 12 +- .../codegenerators/cppcodegenerationform.cpp | 46 +- .../codegenerators/cppcodegenerationform.h | 18 +- .../codegenerators/cppcodegenerationpolicy.cpp | 60 +-- .../codegenerators/cppcodegenerationpolicy.h | 44 +- .../codegenerators/cppcodegenerationpolicypage.cpp | 6 +- .../codegenerators/cppcodegenerationpolicypage.h | 2 +- .../umbrello/codegenerators/cppcodegenerator.cpp | 18 +- .../umbrello/codegenerators/cppcodegenerator.h | 12 +- .../cppheaderclassdeclarationblock.cpp | 16 +- .../cppheaderclassdeclarationblock.h | 10 +- .../codegenerators/cppheadercodeaccessormethod.cpp | 28 +- .../codegenerators/cppheadercodeaccessormethod.h | 2 +- .../cppheadercodeclassfielddeclarationblock.cpp | 10 +- .../cppheadercodeclassfielddeclarationblock.h | 2 +- .../codegenerators/cppheadercodedocument.cpp | 62 +-- .../codegenerators/cppheadercodedocument.h | 6 +- .../codegenerators/cppheadercodeoperation.cpp | 30 +- .../codegenerators/cppheadercodeoperation.h | 6 +- .../codegenerators/cppmakecodedocument.cpp | 14 +- .../umbrello/codegenerators/cppmakecodedocument.h | 6 +- .../codegenerators/cppsourcecodeaccessormethod.cpp | 26 +- .../codegenerators/cppsourcecodeaccessormethod.h | 2 +- .../cppsourcecodeclassfielddeclarationblock.cpp | 14 +- .../cppsourcecodeclassfielddeclarationblock.h | 2 +- .../codegenerators/cppsourcecodedocument.cpp | 12 +- .../codegenerators/cppsourcecodedocument.h | 4 +- .../codegenerators/cppsourcecodeoperation.cpp | 38 +- .../codegenerators/cppsourcecodeoperation.h | 4 +- umbrello/umbrello/codegenerators/cppwriter.cpp | 256 ++++----- umbrello/umbrello/codegenerators/cppwriter.h | 100 ++-- umbrello/umbrello/codegenerators/csharpwriter.cpp | 58 +- umbrello/umbrello/codegenerators/csharpwriter.h | 24 +- umbrello/umbrello/codegenerators/dwriter.cpp | 148 +++--- umbrello/umbrello/codegenerators/dwriter.h | 72 +-- umbrello/umbrello/codegenerators/idlwriter.cpp | 64 +-- umbrello/umbrello/codegenerators/idlwriter.h | 8 +- .../codegenerators/javaantcodedocument.cpp | 42 +- .../umbrello/codegenerators/javaantcodedocument.h | 16 +- .../codegenerators/javaclassdeclarationblock.cpp | 16 +- .../codegenerators/javaclassdeclarationblock.h | 10 +- .../codegenerators/javaclassifiercodedocument.cpp | 52 +- .../codegenerators/javaclassifiercodedocument.h | 10 +- .../codegenerators/javacodeaccessormethod.cpp | 42 +- .../codegenerators/javacodeaccessormethod.h | 6 +- .../umbrello/codegenerators/javacodeclassfield.cpp | 12 +- .../umbrello/codegenerators/javacodeclassfield.h | 10 +- .../javacodeclassfielddeclarationblock.cpp | 14 +- .../javacodeclassfielddeclarationblock.h | 2 +- .../umbrello/codegenerators/javacodecomment.cpp | 22 +- umbrello/umbrello/codegenerators/javacodecomment.h | 10 +- .../codegenerators/javacodedocumentation.cpp | 34 +- .../codegenerators/javacodedocumentation.h | 12 +- .../codegenerators/javacodegenerationpolicy.cpp | 2 +- .../codegenerators/javacodegenerationpolicy.h | 4 +- .../javacodegenerationpolicypage.cpp | 8 +- .../codegenerators/javacodegenerationpolicypage.h | 2 +- .../umbrello/codegenerators/javacodegenerator.cpp | 22 +- .../umbrello/codegenerators/javacodegenerator.h | 14 +- .../umbrello/codegenerators/javacodeoperation.cpp | 24 +- .../umbrello/codegenerators/javacodeoperation.h | 4 +- umbrello/umbrello/codegenerators/javawriter.cpp | 174 +++--- umbrello/umbrello/codegenerators/javawriter.h | 58 +- umbrello/umbrello/codegenerators/jswriter.cpp | 36 +- umbrello/umbrello/codegenerators/jswriter.h | 6 +- umbrello/umbrello/codegenerators/pascalwriter.cpp | 62 +-- umbrello/umbrello/codegenerators/pascalwriter.h | 14 +- umbrello/umbrello/codegenerators/perlwriter.cpp | 104 ++-- umbrello/umbrello/codegenerators/perlwriter.h | 18 +- umbrello/umbrello/codegenerators/php5writer.cpp | 46 +- umbrello/umbrello/codegenerators/php5writer.h | 12 +- umbrello/umbrello/codegenerators/phpwriter.cpp | 44 +- umbrello/umbrello/codegenerators/phpwriter.h | 12 +- umbrello/umbrello/codegenerators/pythonwriter.cpp | 58 +- umbrello/umbrello/codegenerators/pythonwriter.h | 10 +- .../codegenerators/rubyclassdeclarationblock.cpp | 22 +- .../codegenerators/rubyclassdeclarationblock.h | 10 +- .../codegenerators/rubyclassifiercodedocument.cpp | 38 +- .../codegenerators/rubyclassifiercodedocument.h | 10 +- .../codegenerators/rubycodeaccessormethod.cpp | 52 +- .../codegenerators/rubycodeaccessormethod.h | 6 +- .../umbrello/codegenerators/rubycodeclassfield.cpp | 12 +- .../umbrello/codegenerators/rubycodeclassfield.h | 10 +- .../rubycodeclassfielddeclarationblock.cpp | 14 +- .../rubycodeclassfielddeclarationblock.h | 2 +- .../umbrello/codegenerators/rubycodecomment.cpp | 22 +- umbrello/umbrello/codegenerators/rubycodecomment.h | 10 +- .../codegenerators/rubycodedocumentation.cpp | 32 +- .../codegenerators/rubycodedocumentation.h | 12 +- .../codegenerators/rubycodegenerationpolicy.cpp | 2 +- .../codegenerators/rubycodegenerationpolicy.h | 4 +- .../rubycodegenerationpolicypage.cpp | 8 +- .../codegenerators/rubycodegenerationpolicypage.h | 2 +- .../umbrello/codegenerators/rubycodegenerator.cpp | 44 +- .../umbrello/codegenerators/rubycodegenerator.h | 14 +- .../umbrello/codegenerators/rubycodeoperation.cpp | 52 +- .../umbrello/codegenerators/rubycodeoperation.h | 4 +- umbrello/umbrello/codegenerators/rubywriter.cpp | 110 ++-- umbrello/umbrello/codegenerators/rubywriter.h | 22 +- .../codegenerators/simplecodegenerator.cpp | 48 +- .../umbrello/codegenerators/simplecodegenerator.h | 18 +- umbrello/umbrello/codegenerators/sqlwriter.cpp | 40 +- umbrello/umbrello/codegenerators/sqlwriter.h | 8 +- umbrello/umbrello/codegenerators/tclwriter.cpp | 130 ++--- umbrello/umbrello/codegenerators/tclwriter.h | 44 +- .../umbrello/codegenerators/xmlcodecomment.cpp | 12 +- umbrello/umbrello/codegenerators/xmlcodecomment.h | 6 +- .../codegenerators/xmlelementcodeblock.cpp | 26 +- .../umbrello/codegenerators/xmlelementcodeblock.h | 20 +- .../umbrello/codegenerators/xmlschemawriter.cpp | 112 ++-- umbrello/umbrello/codegenerators/xmlschemawriter.h | 56 +- umbrello/umbrello/codegenobjectwithtextblocks.cpp | 42 +- umbrello/umbrello/codegenobjectwithtextblocks.h | 26 +- umbrello/umbrello/codeimport/adaimport.cpp | 108 ++-- umbrello/umbrello/codeimport/adaimport.h | 14 +- umbrello/umbrello/codeimport/classimport.cpp | 12 +- umbrello/umbrello/codeimport/classimport.h | 8 +- umbrello/umbrello/codeimport/cppimport.cpp | 22 +- umbrello/umbrello/codeimport/cppimport.h | 8 +- umbrello/umbrello/codeimport/idlimport.cpp | 86 +-- umbrello/umbrello/codeimport/idlimport.h | 8 +- umbrello/umbrello/codeimport/import_utils.cpp | 102 ++-- umbrello/umbrello/codeimport/import_utils.h | 42 +- umbrello/umbrello/codeimport/javaimport.cpp | 106 ++-- umbrello/umbrello/codeimport/javaimport.h | 18 +- umbrello/umbrello/codeimport/kdevcppparser/ast.cpp | 66 +-- umbrello/umbrello/codeimport/kdevcppparser/ast.h | 104 ++-- .../codeimport/kdevcppparser/ast_utils.cpp | 50 +- .../umbrello/codeimport/kdevcppparser/ast_utils.h | 8 +- .../codeimport/kdevcppparser/cpptree2uml.cpp | 146 ++--- .../codeimport/kdevcppparser/cpptree2uml.h | 18 +- .../umbrello/codeimport/kdevcppparser/driver.cpp | 104 ++-- .../umbrello/codeimport/kdevcppparser/driver.h | 104 ++-- .../umbrello/codeimport/kdevcppparser/errors.h | 6 +- .../umbrello/codeimport/kdevcppparser/lexer.cpp | 92 ++-- umbrello/umbrello/codeimport/kdevcppparser/lexer.h | 68 +-- .../umbrello/codeimport/kdevcppparser/lookup.cpp | 12 +- .../umbrello/codeimport/kdevcppparser/lookup.h | 14 +- .../umbrello/codeimport/kdevcppparser/parser.cpp | 70 +-- .../umbrello/codeimport/kdevcppparser/parser.h | 16 +- .../codeimport/kdevcppparser/tree_parser.cpp | 12 +- .../umbrello/codeimport/kdevcppparser/urlutil.cpp | 98 ++-- .../umbrello/codeimport/kdevcppparser/urlutil.h | 44 +- umbrello/umbrello/codeimport/nativeimportbase.cpp | 104 ++-- umbrello/umbrello/codeimport/nativeimportbase.h | 46 +- umbrello/umbrello/codeimport/pascalimport.cpp | 54 +- umbrello/umbrello/codeimport/pascalimport.h | 2 +- umbrello/umbrello/codeimport/pythonimport.cpp | 40 +- umbrello/umbrello/codeimport/pythonimport.h | 4 +- umbrello/umbrello/codemethodblock.cpp | 40 +- umbrello/umbrello/codemethodblock.h | 22 +- umbrello/umbrello/codeoperation.cpp | 24 +- umbrello/umbrello/codeoperation.h | 16 +- umbrello/umbrello/codeparameter.cpp | 34 +- umbrello/umbrello/codeparameter.h | 16 +- umbrello/umbrello/codeviewerstate.h | 20 +- umbrello/umbrello/component.cpp | 18 +- umbrello/umbrello/component.h | 6 +- umbrello/umbrello/componentwidget.cpp | 30 +- umbrello/umbrello/componentwidget.h | 6 +- umbrello/umbrello/configurable.cpp | 8 +- umbrello/umbrello/configurable.h | 8 +- umbrello/umbrello/datatypewidget.cpp | 24 +- umbrello/umbrello/datatypewidget.h | 8 +- umbrello/umbrello/dialog_utils.cpp | 26 +- umbrello/umbrello/dialog_utils.h | 26 +- umbrello/umbrello/dialogs/activitydialog.cpp | 26 +- umbrello/umbrello/dialogs/activitydialog.h | 16 +- umbrello/umbrello/dialogs/activitypage.cpp | 94 ++-- umbrello/umbrello/dialogs/activitypage.h | 26 +- umbrello/umbrello/dialogs/assocgenpage.cpp | 30 +- umbrello/umbrello/dialogs/assocgenpage.h | 32 +- umbrello/umbrello/dialogs/assocpage.cpp | 48 +- umbrello/umbrello/dialogs/assocpage.h | 22 +- umbrello/umbrello/dialogs/assocpropdlg.cpp | 18 +- umbrello/umbrello/dialogs/assocpropdlg.h | 2 +- umbrello/umbrello/dialogs/assocrolepage.cpp | 96 ++-- umbrello/umbrello/dialogs/assocrolepage.h | 32 +- umbrello/umbrello/dialogs/classgenpage.cpp | 136 ++--- umbrello/umbrello/dialogs/classgenpage.h | 32 +- umbrello/umbrello/dialogs/classifierlistpage.cpp | 112 ++-- umbrello/umbrello/dialogs/classifierlistpage.h | 34 +- umbrello/umbrello/dialogs/classoptionspage.cpp | 50 +- umbrello/umbrello/dialogs/classoptionspage.h | 22 +- umbrello/umbrello/dialogs/classpropdlg.cpp | 64 +-- umbrello/umbrello/dialogs/classpropdlg.h | 6 +- umbrello/umbrello/dialogs/classwizard.cpp | 24 +- umbrello/umbrello/dialogs/classwizard.h | 2 +- umbrello/umbrello/dialogs/codeeditor.cpp | 190 +++---- umbrello/umbrello/dialogs/codeeditor.h | 44 +- .../umbrello/dialogs/codegenerationoptionspage.cpp | 24 +- .../umbrello/dialogs/codegenerationoptionspage.h | 6 +- .../umbrello/dialogs/codegenerationpolicypage.cpp | 4 +- .../umbrello/dialogs/codegenerationpolicypage.h | 4 +- umbrello/umbrello/dialogs/codegenerationwizard.cpp | 62 +-- umbrello/umbrello/dialogs/codegenerationwizard.h | 10 +- umbrello/umbrello/dialogs/codeviewerdialog.cpp | 18 +- umbrello/umbrello/dialogs/codeviewerdialog.h | 14 +- .../umbrello/dialogs/codevieweroptionspage.cpp | 2 +- umbrello/umbrello/dialogs/codevieweroptionspage.h | 4 +- .../umbrello/dialogs/defaultcodegenpolicypage.cpp | 6 +- .../umbrello/dialogs/defaultcodegenpolicypage.h | 8 +- umbrello/umbrello/dialogs/diagramprintpage.cpp | 66 +-- umbrello/umbrello/dialogs/diagramprintpage.h | 22 +- umbrello/umbrello/dialogs/exportallviewsdialog.cpp | 14 +- umbrello/umbrello/dialogs/exportallviewsdialog.h | 6 +- umbrello/umbrello/dialogs/notedialog.cpp | 20 +- umbrello/umbrello/dialogs/notedialog.h | 6 +- umbrello/umbrello/dialogs/overwritedialogue.cpp | 18 +- umbrello/umbrello/dialogs/overwritedialogue.h | 12 +- umbrello/umbrello/dialogs/parmpropdlg.cpp | 48 +- umbrello/umbrello/dialogs/parmpropdlg.h | 42 +- umbrello/umbrello/dialogs/pkgcontentspage.cpp | 50 +- umbrello/umbrello/dialogs/pkgcontentspage.h | 22 +- umbrello/umbrello/dialogs/selectopdlg.cpp | 32 +- umbrello/umbrello/dialogs/selectopdlg.h | 34 +- umbrello/umbrello/dialogs/settingsdlg.cpp | 128 ++--- umbrello/umbrello/dialogs/settingsdlg.h | 92 ++-- umbrello/umbrello/dialogs/statedialog.cpp | 36 +- umbrello/umbrello/dialogs/statedialog.h | 8 +- umbrello/umbrello/dialogs/umlattributedialog.cpp | 50 +- umbrello/umbrello/dialogs/umlattributedialog.h | 18 +- .../umbrello/dialogs/umlentityattributedialog.cpp | 56 +- .../umbrello/dialogs/umlentityattributedialog.h | 22 +- umbrello/umbrello/dialogs/umloperationdialog.cpp | 130 ++--- umbrello/umbrello/dialogs/umloperationdialog.h | 38 +- umbrello/umbrello/dialogs/umlroledialog.cpp | 8 +- umbrello/umbrello/dialogs/umlroledialog.h | 2 +- umbrello/umbrello/dialogs/umlroleproperties.cpp | 10 +- umbrello/umbrello/dialogs/umlroleproperties.h | 2 +- umbrello/umbrello/dialogs/umltemplatedialog.cpp | 28 +- umbrello/umbrello/dialogs/umltemplatedialog.h | 12 +- umbrello/umbrello/dialogs/umlviewdialog.cpp | 34 +- umbrello/umbrello/dialogs/umlviewdialog.h | 16 +- umbrello/umbrello/dialogs/umlwidgetcolorpage.cpp | 34 +- umbrello/umbrello/dialogs/umlwidgetcolorpage.h | 16 +- .../umbrello/docgenerators/docbookgenerator.cpp | 28 +- umbrello/umbrello/docgenerators/docbookgenerator.h | 2 +- umbrello/umbrello/docgenerators/main.cpp | 2 +- umbrello/umbrello/docgenerators/xhtmlgenerator.cpp | 40 +- umbrello/umbrello/docgenerators/xhtmlgenerator.h | 2 +- umbrello/umbrello/docwindow.cpp | 18 +- umbrello/umbrello/docwindow.h | 10 +- umbrello/umbrello/entity.cpp | 42 +- umbrello/umbrello/entity.h | 10 +- umbrello/umbrello/entityattribute.cpp | 28 +- umbrello/umbrello/entityattribute.h | 24 +- umbrello/umbrello/entitywidget.cpp | 32 +- umbrello/umbrello/entitywidget.h | 8 +- umbrello/umbrello/enum.cpp | 36 +- umbrello/umbrello/enum.h | 10 +- umbrello/umbrello/enumliteral.cpp | 12 +- umbrello/umbrello/enumliteral.h | 8 +- umbrello/umbrello/enumwidget.cpp | 34 +- umbrello/umbrello/enumwidget.h | 8 +- umbrello/umbrello/floatingtextwidget.cpp | 82 +-- umbrello/umbrello/floatingtextwidget.h | 42 +- umbrello/umbrello/floatingtextwidgetcontroller.cpp | 12 +- umbrello/umbrello/floatingtextwidgetcontroller.h | 10 +- umbrello/umbrello/folder.cpp | 104 ++-- umbrello/umbrello/folder.h | 28 +- umbrello/umbrello/forkjoinwidget.cpp | 22 +- umbrello/umbrello/forkjoinwidget.h | 12 +- umbrello/umbrello/hierarchicalcodeblock.cpp | 60 +-- umbrello/umbrello/hierarchicalcodeblock.h | 36 +- umbrello/umbrello/import_rose.cpp | 110 ++-- umbrello/umbrello/import_rose.h | 4 +- umbrello/umbrello/kplayerslideraction.cpp | 152 +++--- umbrello/umbrello/kplayerslideraction.h | 36 +- umbrello/umbrello/kstartuplogo.cpp | 20 +- umbrello/umbrello/kstartuplogo.h | 10 +- umbrello/umbrello/linepath.cpp | 248 ++++----- umbrello/umbrello/linepath.h | 70 +-- umbrello/umbrello/linkwidget.cpp | 4 +- umbrello/umbrello/linkwidget.h | 16 +- umbrello/umbrello/listpopupmenu.cpp | 30 +- umbrello/umbrello/listpopupmenu.h | 10 +- umbrello/umbrello/main.cpp | 6 +- umbrello/umbrello/messagewidget.cpp | 94 ++-- umbrello/umbrello/messagewidget.h | 46 +- umbrello/umbrello/messagewidgetcontroller.cpp | 6 +- umbrello/umbrello/messagewidgetcontroller.h | 10 +- umbrello/umbrello/messagewidgetlist.h | 6 +- umbrello/umbrello/model_utils.cpp | 92 ++-- umbrello/umbrello/model_utils.h | 42 +- umbrello/umbrello/node.cpp | 8 +- umbrello/umbrello/node.h | 6 +- umbrello/umbrello/nodewidget.cpp | 28 +- umbrello/umbrello/nodewidget.h | 6 +- umbrello/umbrello/notewidget.cpp | 66 +-- umbrello/umbrello/notewidget.h | 20 +- umbrello/umbrello/notewidgetcontroller.cpp | 6 +- umbrello/umbrello/notewidgetcontroller.h | 12 +- umbrello/umbrello/object_factory.cpp | 20 +- umbrello/umbrello/object_factory.h | 12 +- umbrello/umbrello/objectwidget.cpp | 58 +- umbrello/umbrello/objectwidget.h | 20 +- umbrello/umbrello/objectwidgetcontroller.cpp | 2 +- umbrello/umbrello/objectwidgetcontroller.h | 2 +- umbrello/umbrello/operation.cpp | 82 +-- umbrello/umbrello/operation.h | 14 +- umbrello/umbrello/optionstate.h | 10 +- umbrello/umbrello/ownedcodeblock.cpp | 10 +- umbrello/umbrello/ownedcodeblock.h | 10 +- umbrello/umbrello/ownedhierarchicalcodeblock.cpp | 6 +- umbrello/umbrello/ownedhierarchicalcodeblock.h | 12 +- umbrello/umbrello/package.cpp | 18 +- umbrello/umbrello/package.h | 8 +- umbrello/umbrello/packagewidget.cpp | 24 +- umbrello/umbrello/packagewidget.h | 6 +- umbrello/umbrello/petalnode.cpp | 10 +- umbrello/umbrello/petalnode.h | 24 +- umbrello/umbrello/petaltree2uml.cpp | 94 ++-- umbrello/umbrello/plugin.cpp | 12 +- umbrello/umbrello/plugin.h | 12 +- umbrello/umbrello/pluginloader.cpp | 14 +- umbrello/umbrello/pluginloader.h | 22 +- .../umbrello/refactoring/refactoringassistant.cpp | 138 ++--- .../umbrello/refactoring/refactoringassistant.h | 26 +- umbrello/umbrello/seqlinewidget.cpp | 26 +- umbrello/umbrello/seqlinewidget.h | 14 +- umbrello/umbrello/statewidget.cpp | 66 +-- umbrello/umbrello/statewidget.h | 28 +- umbrello/umbrello/stereotype.cpp | 10 +- umbrello/umbrello/stereotype.h | 6 +- umbrello/umbrello/template.cpp | 18 +- umbrello/umbrello/template.h | 14 +- umbrello/umbrello/textblock.cpp | 78 +-- umbrello/umbrello/textblock.h | 50 +- umbrello/umbrello/textblocklist.h | 6 +- umbrello/umbrello/toolbarstate.cpp | 44 +- umbrello/umbrello/toolbarstate.h | 24 +- umbrello/umbrello/toolbarstatearrow.cpp | 6 +- umbrello/umbrello/toolbarstatearrow.h | 4 +- umbrello/umbrello/toolbarstateassociation.cpp | 10 +- umbrello/umbrello/toolbarstateassociation.h | 4 +- umbrello/umbrello/toolbarstatemessages.cpp | 8 +- umbrello/umbrello/toolbarstatemessages.h | 6 +- umbrello/umbrello/uml.cpp | 312 +++++------ umbrello/umbrello/uml.h | 50 +- umbrello/umbrello/umlassociationlist.h | 6 +- umbrello/umbrello/umlattributelist.h | 10 +- umbrello/umbrello/umlcanvasobject.cpp | 14 +- umbrello/umbrello/umlcanvasobject.h | 8 +- umbrello/umbrello/umlclassifierlist.h | 6 +- umbrello/umbrello/umlclassifierlistitemlist.h | 10 +- umbrello/umbrello/umldoc.cpp | 330 ++++++------ umbrello/umbrello/umldoc.h | 72 +-- umbrello/umbrello/umlentityattributelist.h | 10 +- umbrello/umbrello/umlenumliterallist.h | 6 +- umbrello/umbrello/umllistview.cpp | 262 ++++----- umbrello/umbrello/umllistview.h | 54 +- umbrello/umbrello/umllistviewitem.cpp | 76 +-- umbrello/umbrello/umllistviewitem.h | 28 +- umbrello/umbrello/umllistviewitemlist.h | 6 +- umbrello/umbrello/umlnamespace.cpp | 18 +- umbrello/umbrello/umlnamespace.h | 14 +- umbrello/umbrello/umlobject.cpp | 106 ++-- umbrello/umbrello/umlobject.h | 66 +-- umbrello/umbrello/umlobjectlist.h | 10 +- umbrello/umbrello/umloperationlist.h | 6 +- umbrello/umbrello/umlpackagelist.h | 6 +- umbrello/umbrello/umlrole.cpp | 34 +- umbrello/umbrello/umlrole.h | 10 +- umbrello/umbrello/umlstereotypelist.h | 6 +- umbrello/umbrello/umltemplatelist.h | 6 +- umbrello/umbrello/umlview.cpp | 340 ++++++------ umbrello/umbrello/umlview.h | 108 ++-- umbrello/umbrello/umlviewcanvas.cpp | 8 +- umbrello/umbrello/umlviewcanvas.h | 6 +- umbrello/umbrello/umlviewimageexporter.cpp | 16 +- umbrello/umbrello/umlviewimageexporter.h | 6 +- umbrello/umbrello/umlviewimageexporterall.cpp | 14 +- umbrello/umbrello/umlviewimageexportermodel.cpp | 152 +++--- umbrello/umbrello/umlviewimageexportermodel.h | 46 +- umbrello/umbrello/umlviewlist.h | 4 +- umbrello/umbrello/umlwidget.cpp | 150 +++--- umbrello/umbrello/umlwidget.h | 96 ++-- umbrello/umbrello/umlwidgetcontroller.cpp | 50 +- umbrello/umbrello/umlwidgetcontroller.h | 68 +-- umbrello/umbrello/umlwidgetlist.h | 6 +- umbrello/umbrello/usecase.cpp | 8 +- umbrello/umbrello/usecase.h | 6 +- umbrello/umbrello/usecasewidget.cpp | 18 +- umbrello/umbrello/usecasewidget.h | 6 +- umbrello/umbrello/widget_factory.cpp | 8 +- umbrello/umbrello/widget_factory.h | 6 +- umbrello/umbrello/widget_utils.cpp | 20 +- umbrello/umbrello/widget_utils.h | 8 +- umbrello/umbrello/widgetbase.cpp | 20 +- umbrello/umbrello/widgetbase.h | 24 +- umbrello/umbrello/worktoolbar.cpp | 26 +- umbrello/umbrello/worktoolbar.h | 26 +- 1102 files changed, 23558 insertions(+), 23558 deletions(-) diff --git a/cervisia/addremovedlg.cpp b/cervisia/addremovedlg.cpp index 108ac80e..9bd3671b 100644 --- a/cervisia/addremovedlg.cpp +++ b/cervisia/addremovedlg.cpp @@ -20,52 +20,52 @@ #include "addremovedlg.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include -AddRemoveDialog::AddRemoveDialog(ActionType action, QWidget* parent, const char* name) - : KDialogBase(parent, name, true, QString::null, +AddRemoveDialog::AddRemoveDialog(ActionType action, TQWidget* parent, const char* name) + : KDialogBase(parent, name, true, TQString::null, Ok | Cancel | Help, Ok, true) { setCaption( (action==Add)? i18n("CVS Add") : (action==AddBinary)? i18n("CVS Add Binary") : i18n("CVS Remove") ); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QLabel *textlabel = new QLabel + TQLabel *textlabel = new QLabel ( (action==Add)? i18n("Add the following files to the repository:") : (action==AddBinary)? i18n("Add the following binary files to the repository:") : i18n("Remove the following files from the repository:") , mainWidget ); layout->addWidget(textlabel); - m_listBox = new QListBox(mainWidget); - m_listBox->setSelectionMode(QListBox::NoSelection); + m_listBox = new TQListBox(mainWidget); + m_listBox->setSelectionMode(TQListBox::NoSelection); layout->addWidget(m_listBox, 5); // Add warning message to dialog when user wants to remove a file if (action==Remove) { - QBoxLayout *warningLayout = new QHBoxLayout; + TQBoxLayout *warningLayout = new QHBoxLayout; - QLabel *warningIcon = new QLabel(mainWidget); + TQLabel *warningIcon = new TQLabel(mainWidget); KIconLoader *loader = kapp->iconLoader(); warningIcon->setPixmap(loader->loadIcon("messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true)); warningLayout->addWidget(warningIcon); - QLabel *warningText = new QLabel(i18n("This will also remove the files from " + TQLabel *warningText = new TQLabel(i18n("This will also remove the files from " "your local working copy."), mainWidget); warningLayout->addWidget(warningText); @@ -81,15 +81,15 @@ AddRemoveDialog::AddRemoveDialog(ActionType action, QWidget* parent, const char* } -void AddRemoveDialog::setFileList(const QStringList& files) +void AddRemoveDialog::setFileList(const TQStringList& files) { // the dot for the root directory is hard to see, so // we convert it to the absolut path if( files.find(".") != files.end() ) { - QStringList copy(files); + TQStringList copy(files); int idx = copy.findIndex("."); - copy[idx] = QFileInfo(".").absFilePath(); + copy[idx] = TQFileInfo(".").absFilePath(); m_listBox->insertStringList(copy); } diff --git a/cervisia/addremovedlg.h b/cervisia/addremovedlg.h index 06b98260..735199ab 100644 --- a/cervisia/addremovedlg.h +++ b/cervisia/addremovedlg.h @@ -35,12 +35,12 @@ class AddRemoveDialog : public KDialogBase public: enum ActionType { Add, AddBinary, Remove }; - explicit AddRemoveDialog(ActionType action, QWidget* parent=0, const char* name=0); + explicit AddRemoveDialog(ActionType action, TQWidget* parent=0, const char* name=0); - void setFileList(const QStringList& files); + void setFileList(const TQStringList& files); private: - QListBox* m_listBox; + TQListBox* m_listBox; }; #endif diff --git a/cervisia/addrepositorydlg.cpp b/cervisia/addrepositorydlg.cpp index d1d24cb0..c370b02a 100644 --- a/cervisia/addrepositorydlg.cpp +++ b/cervisia/addrepositorydlg.cpp @@ -21,10 +21,10 @@ #include "addrepositorydlg.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -32,17 +32,17 @@ #include -AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const QString& repo, - QWidget* parent, const char* name) +AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const TQString& repo, + TQWidget* parent, const char* name) : KDialogBase(parent, name, true, i18n("Add Repository"), Ok | Cancel, Ok, true) , partConfig(cfg) { - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout* layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout* layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QLabel* repo_label = new QLabel(i18n("&Repository:"), mainWidget); + TQLabel* repo_label = new TQLabel(i18n("&Repository:"), mainWidget); layout->addWidget(repo_label); repo_edit = new KLineEdit(mainWidget); @@ -55,14 +55,14 @@ AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const QString& repo, } layout->addWidget(repo_edit); - QLabel* rsh_label = new QLabel(i18n("Use remote &shell (only for :ext: repositories):"), mainWidget); + TQLabel* rsh_label = new TQLabel(i18n("Use remote &shell (only for :ext: repositories):"), mainWidget); layout->addWidget(rsh_label); rsh_edit = new KLineEdit(mainWidget); rsh_label->setBuddy(rsh_edit); layout->addWidget(rsh_edit); - QLabel* server_label = new QLabel(i18n("Invoke this program on the server side:"), + TQLabel* server_label = new TQLabel(i18n("Invoke this program on the server side:"), mainWidget); layout->addWidget(server_label); @@ -70,24 +70,24 @@ AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const QString& repo, server_label->setBuddy(server_edit); layout->addWidget(server_edit); - QHBox* compressionBox = new QHBox(mainWidget); - m_useDifferentCompression = new QCheckBox(i18n("Use different &compression level:"), compressionBox); + TQHBox* compressionBox = new TQHBox(mainWidget); + m_useDifferentCompression = new TQCheckBox(i18n("Use different &compression level:"), compressionBox); m_compressionLevel = new KIntNumInput(compressionBox); m_compressionLevel->setRange(0, 9, 1, false); layout->addWidget(compressionBox); - m_retrieveCvsignoreFile = new QCheckBox(i18n("Download cvsignore file from " + m_retrieveCvsignoreFile = new TQCheckBox(i18n("Download cvsignore file from " "server"), mainWidget); layout->addWidget(m_retrieveCvsignoreFile); - connect( repo_edit, SIGNAL(textChanged(const QString&)), - this, SLOT(repoChanged()) ); - connect( m_useDifferentCompression, SIGNAL(toggled(bool)), - this, SLOT(compressionToggled(bool)) ); + connect( repo_edit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(repoChanged()) ); + connect( m_useDifferentCompression, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(compressionToggled(bool)) ); repoChanged(); - QSize size = configDialogSize(partConfig, "AddRepositoryDialog"); + TQSize size = configDialogSize(partConfig, "AddRepositoryDialog"); resize(size); } @@ -98,13 +98,13 @@ AddRepositoryDialog::~AddRepositoryDialog() } -void AddRepositoryDialog::setRsh(const QString& rsh) +void AddRepositoryDialog::setRsh(const TQString& rsh) { rsh_edit->setText(rsh); } -void AddRepositoryDialog::setServer(const QString& server) +void AddRepositoryDialog::setServer(const TQString& server) { server_edit->setText(server); } @@ -134,19 +134,19 @@ void AddRepositoryDialog::setRetrieveCvsignoreFile(bool enabled) } -QString AddRepositoryDialog::repository() const +TQString AddRepositoryDialog::repository() const { return repo_edit->text(); } -QString AddRepositoryDialog::rsh() const +TQString AddRepositoryDialog::rsh() const { return rsh_edit->text(); } -QString AddRepositoryDialog::server() const +TQString AddRepositoryDialog::server() const { return server_edit->text(); } @@ -167,7 +167,7 @@ bool AddRepositoryDialog::retrieveCvsignoreFile() const } -void AddRepositoryDialog::setRepository(const QString& repo) +void AddRepositoryDialog::setRepository(const TQString& repo) { setCaption(i18n("Repository Settings")); @@ -178,7 +178,7 @@ void AddRepositoryDialog::setRepository(const QString& repo) void AddRepositoryDialog::repoChanged() { - QString repo = repository(); + TQString repo = repository(); rsh_edit->setEnabled((!repo.startsWith(":pserver:")) && repo.contains(":")); m_useDifferentCompression->setEnabled(repo.contains(":")); diff --git a/cervisia/addrepositorydlg.h b/cervisia/addrepositorydlg.h index 8fbf66fd..bd759e6f 100644 --- a/cervisia/addrepositorydlg.h +++ b/cervisia/addrepositorydlg.h @@ -35,19 +35,19 @@ class AddRepositoryDialog : public KDialogBase Q_OBJECT public: - AddRepositoryDialog(KConfig& cfg, const QString& repo, QWidget* parent = 0, + AddRepositoryDialog(KConfig& cfg, const TQString& repo, TQWidget* parent = 0, const char* name = 0); virtual ~AddRepositoryDialog(); - void setRepository(const QString& repo); - void setRsh(const QString& rsh); - void setServer(const QString& server); + void setRepository(const TQString& repo); + void setRsh(const TQString& rsh); + void setServer(const TQString& server); void setCompression(int compression); void setRetrieveCvsignoreFile(bool enabled); - QString repository() const; - QString rsh() const; - QString server() const; + TQString repository() const; + TQString rsh() const; + TQString server() const; int compression() const; bool retrieveCvsignoreFile() const; @@ -59,8 +59,8 @@ private: KLineEdit* repo_edit; KLineEdit* rsh_edit; KLineEdit* server_edit; - QCheckBox* m_useDifferentCompression; - QCheckBox* m_retrieveCvsignoreFile; + TQCheckBox* m_useDifferentCompression; + TQCheckBox* m_retrieveCvsignoreFile; KIntNumInput* m_compressionLevel; KConfig& partConfig; }; diff --git a/cervisia/annotatectl.cpp b/cervisia/annotatectl.cpp index 31f95f84..f74735e3 100644 --- a/cervisia/annotatectl.cpp +++ b/cervisia/annotatectl.cpp @@ -19,8 +19,8 @@ #include "annotatectl.h" -#include -#include +#include +#include #include #include @@ -36,14 +36,14 @@ using namespace Cervisia; struct AnnotateController::Private { - typedef QMap RevisionCommentMap; + typedef TQMap RevisionCommentMap; RevisionCommentMap comments; // maps comment to a revision CvsService_stub* cvsService; AnnotateDialog* dialog; ProgressDialog* progress; - bool execute(const QString& fileName, const QString& revision); + bool execute(const TQString& fileName, const TQString& revision); void parseCvsLogOutput(); void parseCvsAnnotateOutput(); }; @@ -65,7 +65,7 @@ AnnotateController::~AnnotateController() } -void AnnotateController::showDialog(const QString& fileName, const QString& revision) +void AnnotateController::showDialog(const TQString& fileName, const TQString& revision) { if( !d->execute(fileName, revision) ) { @@ -84,7 +84,7 @@ void AnnotateController::showDialog(const QString& fileName, const QString& revi } -bool AnnotateController::Private::execute(const QString& fileName, const QString& revision) +bool AnnotateController::Private::execute(const TQString& fileName, const TQString& revision) { DCOPRef job = cvsService->annotate(fileName, revision); if( !cvsService->ok() ) @@ -98,7 +98,7 @@ bool AnnotateController::Private::execute(const QString& fileName, const QString void AnnotateController::Private::parseCvsLogOutput() { - QString line, comment, rev; + TQString line, comment, rev; enum { Begin, Tags, Admin, Revision, Author, Branches, Comment, Finished } state; @@ -140,7 +140,7 @@ void AnnotateController::Private::parseCvsLogOutput() else if( line == "=============================================================================" ) state = Finished; if( state == Comment ) - comment += QString("\n") + line; + comment += TQString("\n") + line; else comments[rev] = comment; break; @@ -162,13 +162,13 @@ void AnnotateController::Private::parseCvsLogOutput() void AnnotateController::Private::parseCvsAnnotateOutput() { LogInfo logInfo; - QString rev, content, line; - QString oldRevision = ""; + TQString rev, content, line; + TQString oldRevision = ""; bool odd = false; while( progress->getLine(line) ) { - QString dateString = line.mid(23, 9); + TQString dateString = line.mid(23, 9); if( !dateString.isEmpty() ) logInfo.m_dateTime.setTime_t(KRFCDate::parseDate(dateString), Qt::UTC); @@ -182,8 +182,8 @@ void AnnotateController::Private::parseCvsAnnotateOutput() if( rev == oldRevision ) { - logInfo.m_author = QString::null; - rev = QString::null; + logInfo.m_author = TQString::null; + rev = TQString::null; } else { diff --git a/cervisia/annotatectl.h b/cervisia/annotatectl.h index d6b76437..eb8c98f0 100644 --- a/cervisia/annotatectl.h +++ b/cervisia/annotatectl.h @@ -20,7 +20,7 @@ #ifndef ANNOTATECTL_H #define ANNOTATECTL_H -#include +#include class AnnotateDialog; class CvsService_stub; @@ -33,7 +33,7 @@ public: AnnotateController(AnnotateDialog* dialog, CvsService_stub* cvsService); ~AnnotateController(); - void showDialog(const QString& fileName, const QString& revision = QString::null); + void showDialog(const TQString& fileName, const TQString& revision = TQString::null); private: struct Private; diff --git a/cervisia/annotatedlg.cpp b/cervisia/annotatedlg.cpp index 40b0d555..86b64b43 100644 --- a/cervisia/annotatedlg.cpp +++ b/cervisia/annotatedlg.cpp @@ -23,8 +23,8 @@ #include "annotateview.h" -AnnotateDialog::AnnotateDialog(KConfig& cfg, QWidget *parent, const char *name) - : KDialogBase(parent, name, false, QString::null, +AnnotateDialog::AnnotateDialog(KConfig& cfg, TQWidget *parent, const char *name) + : KDialogBase(parent, name, false, TQString::null, Close | Help, Close, true) , partConfig(cfg) { @@ -35,7 +35,7 @@ AnnotateDialog::AnnotateDialog(KConfig& cfg, QWidget *parent, const char *name) setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "AnnotateDialog"); + TQSize size = configDialogSize(partConfig, "AnnotateDialog"); resize(size); } @@ -47,7 +47,7 @@ AnnotateDialog::~AnnotateDialog() void AnnotateDialog::addLine(const Cervisia::LogInfo& logInfo, - const QString& content, bool odd) + const TQString& content, bool odd) { annotate->addLine(logInfo, content, odd); } diff --git a/cervisia/annotatedlg.h b/cervisia/annotatedlg.h index 48299cf3..dda738aa 100644 --- a/cervisia/annotatedlg.h +++ b/cervisia/annotatedlg.h @@ -39,11 +39,11 @@ class AnnotateDialog : public KDialogBase { public: - explicit AnnotateDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit AnnotateDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~AnnotateDialog(); - void addLine(const Cervisia::LogInfo& logInfo, const QString& content, + void addLine(const Cervisia::LogInfo& logInfo, const TQString& content, bool odd); private: diff --git a/cervisia/annotateview.cpp b/cervisia/annotateview.cpp index 594ca936..58d8d407 100644 --- a/cervisia/annotateview.cpp +++ b/cervisia/annotateview.cpp @@ -19,8 +19,8 @@ #include "annotateview.h" -#include -#include +#include +#include #include #include @@ -37,16 +37,16 @@ public: enum { LineNumberColumn, AuthorColumn, ContentColumn }; AnnotateViewItem(AnnotateView *parent, const LogInfo& logInfo, - const QString &content, bool odd, int linenumber); + const TQString &content, bool odd, int linenumber); - virtual int compare(QListViewItem *item, int col, bool ascending) const; - virtual int width(const QFontMetrics &, const QListView *, int col) const; - virtual QString text(int col) const; - virtual void paintCell(QPainter *, const QColorGroup &, int, int, int); + virtual int compare(TQListViewItem *item, int col, bool ascending) const; + virtual int width(const TQFontMetrics &, const TQListView *, int col) const; + virtual TQString text(int col) const; + virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int); private: LogInfo m_logInfo; - QString m_content; + TQString m_content; bool m_odd; int m_lineNumber; friend class AnnotateView; @@ -59,8 +59,8 @@ const int AnnotateViewItem::BORDER = 4; AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, const LogInfo& logInfo, - const QString &content, bool odd, int linenumber) - : QListViewItem(parent) + const TQString &content, bool odd, int linenumber) + : TQListViewItem(parent) , m_logInfo(logInfo) , m_content(content) , m_odd(odd) @@ -68,7 +68,7 @@ AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, const LogInfo& logInfo, {} -int AnnotateViewItem::compare(QListViewItem *item, int, bool) const +int AnnotateViewItem::compare(TQListViewItem *item, int, bool) const { int linenum1 = m_lineNumber; int linenum2 = static_cast(item)->m_lineNumber; @@ -77,30 +77,30 @@ int AnnotateViewItem::compare(QListViewItem *item, int, bool) const } -QString AnnotateViewItem::text(int col) const +TQString AnnotateViewItem::text(int col) const { switch (col) { case LineNumberColumn: - return QString::number(m_lineNumber); + return TQString::number(m_lineNumber); case AuthorColumn: if( m_logInfo.m_author.isNull() ) - return QString::null; + return TQString::null; else - return (m_logInfo.m_author + QChar(' ') + m_logInfo.m_revision); + return (m_logInfo.m_author + TQChar(' ') + m_logInfo.m_revision); case ContentColumn: return m_content; default: ; }; - return QString::null; + return TQString::null; } -void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int width, int align) +void AnnotateViewItem::paintCell(TQPainter *p, const TQColorGroup &, int col, int width, int align) { - QColor backgroundColor; + TQColor backgroundColor; switch (col) { @@ -117,7 +117,7 @@ void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int p->fillRect(0, 0, width, height(), backgroundColor); - QString str = text(col); + TQString str = text(col); if (str.isEmpty()) return; @@ -129,7 +129,7 @@ void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int -int AnnotateViewItem::width(const QFontMetrics &fm, const QListView *, int col) const +int AnnotateViewItem::width(const TQFontMetrics &fm, const TQListView *, int col) const { return fm.width(text(col)) + 2*BORDER; } @@ -137,30 +137,30 @@ int AnnotateViewItem::width(const QFontMetrics &fm, const QListView *, int col) /*! @todo The dummy column (remaining space eater) doesn't work - caused by a bug in QHeader::adjustHeaderSize() in Qt <= 3.0.4. + caused by a bug in TQHeader::adjustHeaderSize() in Qt <= 3.0.4. */ -AnnotateView::AnnotateView(KConfig &cfg, QWidget *parent, const char *name) - : QListView(parent, name, WRepaintNoErase | WResizeNoErase) +AnnotateView::AnnotateView(KConfig &cfg, TQWidget *parent, const char *name) + : TQListView(parent, name, WRepaintNoErase | WResizeNoErase) { - setFrameStyle(QFrame::WinPanel | QFrame::Sunken); + setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); setAllColumnsShowFocus(true); setShowToolTips(false); setSelectionMode(NoSelection); header()->hide(); // setResizeMode(LastColumn); - addColumn(QString::null); - addColumn(QString::null); - addColumn(QString::null); + addColumn(TQString::null); + addColumn(TQString::null); + addColumn(TQString::null); setSorting(AnnotateViewItem::LineNumberColumn); setColumnAlignment(AnnotateViewItem::LineNumberColumn, Qt::AlignRight); ToolTip* toolTip = new ToolTip(viewport()); - connect(toolTip, SIGNAL(queryToolTip(const QPoint&, QRect&, QString&)), - this, SLOT(slotQueryToolTip(const QPoint&, QRect&, QString&))); + connect(toolTip, TQT_SIGNAL(queryToolTip(const TQPoint&, TQRect&, TQString&)), + this, TQT_SLOT(slotQueryToolTip(const TQPoint&, TQRect&, TQString&))); KConfigGroupSaver cs(&cfg, "LookAndFeel"); setFont(cfg.readFontEntry("AnnotateFont")); @@ -168,23 +168,23 @@ AnnotateView::AnnotateView(KConfig &cfg, QWidget *parent, const char *name) -void AnnotateView::addLine(const LogInfo& logInfo, const QString& content, +void AnnotateView::addLine(const LogInfo& logInfo, const TQString& content, bool odd) { new AnnotateViewItem(this, logInfo, content, odd, childCount()+1); } -QSize AnnotateView::sizeHint() const +TQSize AnnotateView::sizeHint() const { - QFontMetrics fm(fontMetrics()); - return QSize(100 * fm.width("0"), 10 * fm.lineSpacing()); + TQFontMetrics fm(fontMetrics()); + return TQSize(100 * fm.width("0"), 10 * fm.lineSpacing()); } -void AnnotateView::slotQueryToolTip(const QPoint& viewportPos, - QRect& viewportRect, - QString& text) +void AnnotateView::slotQueryToolTip(const TQPoint& viewportPos, + TQRect& viewportRect, + TQString& text) { if (const AnnotateViewItem* item = static_cast(itemAt(viewportPos))) { diff --git a/cervisia/annotateview.h b/cervisia/annotateview.h index be74d430..f0ae7e21 100644 --- a/cervisia/annotateview.h +++ b/cervisia/annotateview.h @@ -22,7 +22,7 @@ #define ANNOTATEVIEW_H -#include +#include class KConfig; @@ -40,16 +40,16 @@ class AnnotateView : public QListView public: - explicit AnnotateView( KConfig &cfg, QWidget *parent=0, const char *name=0 ); + explicit AnnotateView( KConfig &cfg, TQWidget *parent=0, const char *name=0 ); - void addLine(const Cervisia::LogInfo& logInfo, const QString& content, + void addLine(const Cervisia::LogInfo& logInfo, const TQString& content, bool odd); - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; private slots: - void slotQueryToolTip(const QPoint&, QRect&, QString&); + void slotQueryToolTip(const TQPoint&, TQRect&, TQString&); }; diff --git a/cervisia/cervisiapart.cpp b/cervisia/cervisiapart.cpp index 56b37ece..df166d7a 100644 --- a/cervisia/cervisiapart.cpp +++ b/cervisia/cervisiapart.cpp @@ -18,12 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -80,8 +80,8 @@ using Cervisia::TagDialog; K_EXPORT_COMPONENT_FACTORY( libcervisiapart, CervisiaFactory ) -CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList& /*args*/ ) +CervisiaPart::CervisiaPart( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList& /*args*/ ) : KParts::ReadOnlyPart( parent, name ) , hasRunningJob( false ) , opt_hideFiles( false ) @@ -109,9 +109,9 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName, m_browserExt = new CervisiaBrowserExtension( this ); // start the cvs DCOP service - QString error; - QCString appId; - if( KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error, &appId) ) + TQString error; + TQCString appId; + if( KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error, &appId) ) { KMessageBox::sorry(0, i18n("Starting cvsservice failed with message: ") + error, "Cervisia"); @@ -125,31 +125,31 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName, conf->setGroup("LookAndFeel"); bool splitHorz = conf->readBoolEntry("SplitHorizontally",true); - // When we couldn't start the DCOP service, we just display a QLabel with + // When we couldn't start the DCOP service, we just display a TQLabel with // an explaination if( cvsService ) { - Orientation o = splitHorz ? QSplitter::Vertical - : QSplitter::Horizontal; - splitter = new QSplitter(o, parentWidget, widgetName); + Orientation o = splitHorz ? TQSplitter::Vertical + : TQSplitter::Horizontal; + splitter = new TQSplitter(o, parentWidget, widgetName); // avoid PartManager's warning that Part's window can't handle focus - splitter->setFocusPolicy( QWidget::StrongFocus ); + splitter->setFocusPolicy( TQWidget::StrongFocus ); update = new UpdateView(*config(), splitter); - update->setFocusPolicy( QWidget::StrongFocus ); + update->setFocusPolicy( TQWidget::StrongFocus ); update->setFocus(); - connect( update, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this, SLOT(popupRequested(KListView*, QListViewItem*, const QPoint&)) ); - connect( update, SIGNAL(fileOpened(QString)), - this, SLOT(openFile(QString)) ); + connect( update, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT(popupRequested(KListView*, TQListViewItem*, const TQPoint&)) ); + connect( update, TQT_SIGNAL(fileOpened(TQString)), + this, TQT_SLOT(openFile(TQString)) ); protocol = new ProtocolView(appId, splitter); - protocol->setFocusPolicy( QWidget::StrongFocus ); + protocol->setFocusPolicy( TQWidget::StrongFocus ); setWidget(splitter); } else - setWidget(new QLabel(i18n("This KPart is non-functional, because the " + setWidget(new TQLabel(i18n("This KPart is non-functional, because the " "cvs DCOP service could not be started."), parentWidget)); @@ -157,12 +157,12 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName, { setupActions(); readSettings(); - connect( update, SIGNAL( selectionChanged() ), this, SLOT( updateActions() ) ); + connect( update, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( updateActions() ) ); } setXMLFile( "cervisiaui.rc" ); - QTimer::singleShot(0, this, SLOT(slotSetupStatusBar())); + TQTimer::singleShot(0, this, TQT_SLOT(slotSetupStatusBar())); } CervisiaPart::~CervisiaPart() @@ -212,10 +212,10 @@ bool CervisiaPart::openURL( const KURL &u ) void CervisiaPart::slotSetupStatusBar() { // create the active filter indicator and add it to the statusbar - filterLabel = new QLabel("UR", m_statusBar->statusBar()); + filterLabel = new TQLabel("UR", m_statusBar->statusBar()); filterLabel->setFixedSize(filterLabel->sizeHint()); filterLabel->setText(""); - QToolTip::add(filterLabel, + TQToolTip::add(filterLabel, i18n("F - All files are hidden, the tree shows only folders\n" "N - All up-to-date files are hidden\n" "R - All removed files are hidden")); @@ -225,7 +225,7 @@ void CervisiaPart::slotSetupStatusBar() void CervisiaPart::setupActions() { KAction *action; - QString hint; + TQString hint; actionCollection()->setHighlightingEnabled(true); @@ -233,81 +233,81 @@ void CervisiaPart::setupActions() // File Menu // action = new KAction( i18n("O&pen Sandbox..."), "fileopen", CTRL+Key_O, - this, SLOT( slotOpenSandbox() ), + this, TQT_SLOT( slotOpenSandbox() ), actionCollection(), "file_open" ); hint = i18n("Opens a CVS working folder in the main window"); action->setToolTip( hint ); action->setWhatsThis( hint ); recent = new KRecentFilesAction( i18n("Recent Sandboxes"), 0, - this, SLOT( openURL( const KURL & ) ), + this, TQT_SLOT( openURL( const KURL & ) ), actionCollection(), "file_open_recent" ); action = new KAction( i18n("&Insert ChangeLog Entry..."), 0, - this, SLOT( slotChangeLog() ), + this, TQT_SLOT( slotChangeLog() ), actionCollection(), "insert_changelog_entry" ); hint = i18n("Inserts a new intro into the file ChangeLog in the toplevel folder"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Update"), "vcs_update", CTRL+Key_U, - this, SLOT( slotUpdate() ), + this, TQT_SLOT( slotUpdate() ), actionCollection(), "file_update" ); hint = i18n("Updates (cvs update) the selected files and folders"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Status"), "vcs_status", Key_F5, - this, SLOT( slotStatus() ), + this, TQT_SLOT( slotStatus() ), actionCollection(), "file_status" ); hint = i18n("Updates the status (cvs -n update) of the selected files and folders"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Edit"), 0, - this, SLOT( slotOpen() ), + this, TQT_SLOT( slotOpen() ), actionCollection(), "file_edit" ); hint = i18n("Opens the marked file for editing"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Reso&lve..."), 0, - this, SLOT( slotResolve() ), + this, TQT_SLOT( slotResolve() ), actionCollection(), "file_resolve" ); hint = i18n("Opens the resolve dialog with the selected file"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Commit..."), "vcs_commit", Key_NumberSign, - this, SLOT( slotCommit() ), + this, TQT_SLOT( slotCommit() ), actionCollection(), "file_commit" ); hint = i18n("Commits the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Add to Repository..."), "vcs_add", Key_Insert, - this, SLOT( slotAdd() ), + this, TQT_SLOT( slotAdd() ), actionCollection(), "file_add" ); hint = i18n("Adds (cvs add) the selected files to the repository"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Add &Binary..."), 0, - this, SLOT( slotAddBinary() ), + this, TQT_SLOT( slotAddBinary() ), actionCollection(), "file_add_binary" ); hint = i18n("Adds (cvs -kb add) the selected files as binaries to the repository"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Remove From Repository..."), "vcs_remove", Key_Delete, - this, SLOT( slotRemove() ), + this, TQT_SLOT( slotRemove() ), actionCollection(), "file_remove" ); hint = i18n("Removes (cvs remove) the selected files from the repository"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Rever&t"), 0, - this, SLOT( slotRevert() ), + this, TQT_SLOT( slotRevert() ), actionCollection(), "file_revert_local_changes" ); hint = i18n("Reverts (cvs update -C) the selected files (only cvs 1.11)"); action->setToolTip( hint ); @@ -315,14 +315,14 @@ void CervisiaPart::setupActions() // context menu only action = new KAction( i18n("&Properties"), 0, - this, SLOT( slotFileProperties() ), + this, TQT_SLOT( slotFileProperties() ), actionCollection(), "file_properties" ); // // View Menu // action = new KAction( i18n("Stop"), "stop", Key_Escape, - protocol, SLOT(cancelJob()), + protocol, TQT_SLOT(cancelJob()), actionCollection(), "stop_job" ); action->setEnabled( false ); hint = i18n("Stops any running sub-processes"); @@ -331,7 +331,7 @@ void CervisiaPart::setupActions() action = new KAction( i18n("Browse &Log..."), CTRL+Key_L, - this, SLOT(slotBrowseLog()), + this, TQT_SLOT(slotBrowseLog()), actionCollection(), "view_log" ); hint = i18n("Shows the revision tree of the selected file"); action->setToolTip( hint ); @@ -339,46 +339,46 @@ void CervisiaPart::setupActions() #if 0 action = new KAction( i18n("Browse Multi-File Log..."), 0, - this, SLOT(slotBrowseMultiLog()), + this, TQT_SLOT(slotBrowseMultiLog()), actionCollection() ); #endif action = new KAction( i18n("&Annotate..."), CTRL+Key_A, - this, SLOT(slotAnnotate()), + this, TQT_SLOT(slotAnnotate()), actionCollection(), "view_annotate" ); hint = i18n("Shows a blame-annotated view of the selected file"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Difference to Repository (BASE)..."), "vcs_diff", CTRL+Key_D, - this, SLOT(slotDiffBase()), + this, TQT_SLOT(slotDiffBase()), actionCollection(), "view_diff_base" ); hint = i18n("Shows the differences of the selected file to the checked out version (tag BASE)"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Difference to Repository (HEAD)..."), "vcs_diff", CTRL+Key_H, - this, SLOT(slotDiffHead()), + this, TQT_SLOT(slotDiffHead()), actionCollection(), "view_diff_head" ); hint = i18n("Shows the differences of the selected file to the newest version in the repository (tag HEAD)"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Last &Change..."), 0, - this, SLOT(slotLastChange()), + this, TQT_SLOT(slotLastChange()), actionCollection(), "view_last_change" ); hint = i18n("Shows the differences between the last two revisions of the selected file"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&History..."), 0, - this, SLOT(slotHistory()), + this, TQT_SLOT(slotHistory()), actionCollection(), "view_history" ); hint = i18n("Shows the CVS history as reported by the server"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Unfold File Tree"), 0, - this , SLOT(slotUnfoldTree()), + this , TQT_SLOT(slotUnfoldTree()), actionCollection(), "view_unfold_tree" ); hint = i18n("Opens all branches of the file tree"); @@ -386,7 +386,7 @@ void CervisiaPart::setupActions() action->setWhatsThis( hint ); action = new KAction( i18n("&Fold File Tree"), 0, - this, SLOT(slotFoldTree()), + this, TQT_SLOT(slotFoldTree()), actionCollection(), "view_fold_tree" ); hint = i18n("Closes all branches of the file tree"); action->setToolTip( hint ); @@ -396,98 +396,98 @@ void CervisiaPart::setupActions() // Advanced Menu // action = new KAction( i18n("&Tag/Branch..."), 0, - this, SLOT(slotCreateTag()), + this, TQT_SLOT(slotCreateTag()), actionCollection(), "create_tag" ); hint = i18n("Creates a tag or branch for the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Delete Tag..."), 0, - this, SLOT(slotDeleteTag()), + this, TQT_SLOT(slotDeleteTag()), actionCollection(), "delete_tag" ); hint = i18n("Deletes a tag from the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Update to Tag/Date..."), 0, - this, SLOT(slotUpdateToTag()), + this, TQT_SLOT(slotUpdateToTag()), actionCollection(), "update_to_tag" ); hint = i18n("Updates the selected files to a given tag, branch or date"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Update to &HEAD"), 0, - this, SLOT(slotUpdateToHead()), + this, TQT_SLOT(slotUpdateToHead()), actionCollection(), "update_to_head" ); hint = i18n("Updates the selected files to the HEAD revision"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Merge..."), 0, - this, SLOT(slotMerge()), + this, TQT_SLOT(slotMerge()), actionCollection(), "merge" ); hint = i18n("Merges a branch or a set of modifications into the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Add Watch..."), 0, - this, SLOT(slotAddWatch()), + this, TQT_SLOT(slotAddWatch()), actionCollection(), "add_watch" ); hint = i18n("Adds a watch for the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Remove Watch..."), 0, - this, SLOT(slotRemoveWatch()), + this, TQT_SLOT(slotRemoveWatch()), actionCollection(), "remove_watch" ); hint = i18n("Removes a watch from the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Show &Watchers"), 0, - this, SLOT(slotShowWatchers()), + this, TQT_SLOT(slotShowWatchers()), actionCollection(), "show_watchers" ); hint = i18n("Shows the watchers of the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Ed&it Files"), 0, - this, SLOT(slotEdit()), + this, TQT_SLOT(slotEdit()), actionCollection(), "edit_files" ); hint = i18n("Edits (cvs edit) the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("U&nedit Files"), 0, - this, SLOT(slotUnedit()), + this, TQT_SLOT(slotUnedit()), actionCollection(), "unedit_files" ); hint = i18n("Unedits (cvs unedit) the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Show &Editors"), 0, - this, SLOT(slotShowEditors()), + this, TQT_SLOT(slotShowEditors()), actionCollection(), "show_editors" ); hint = i18n("Shows the editors of the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Lock Files"), 0, - this, SLOT(slotLock()), + this, TQT_SLOT(slotLock()), actionCollection(), "lock_files" ); hint = i18n("Locks the selected files, so that others cannot modify them"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Unl&ock Files"), 0, - this, SLOT(slotUnlock()), + this, TQT_SLOT(slotUnlock()), actionCollection(), "unlock_files" ); hint = i18n("Unlocks the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Create &Patch Against Repository..."), 0, - this, SLOT(slotMakePatch()), + this, TQT_SLOT(slotMakePatch()), actionCollection(), "make_patch" ); hint = i18n("Creates a patch from the modifications in your sandbox"); action->setToolTip( hint ); @@ -497,25 +497,25 @@ void CervisiaPart::setupActions() // Repository Menu // action = new KAction( i18n("&Create..."), 0, - this, SLOT(slotCreateRepository()), + this, TQT_SLOT(slotCreateRepository()), actionCollection(), "repository_create" ); action = new KAction( i18n("&Checkout..."), 0, - this, SLOT(slotCheckout()), + this, TQT_SLOT(slotCheckout()), actionCollection(), "repository_checkout" ); hint = i18n("Allows you to checkout a module from a repository"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Import..."), 0, - this, SLOT(slotImport()), + this, TQT_SLOT(slotImport()), actionCollection(), "repository_import" ); hint = i18n("Allows you to import a module into a repository"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Repositories..."), 0, - this, SLOT(slotRepositories()), + this, TQT_SLOT(slotRepositories()), actionCollection(), "show_repositories" ); hint = i18n("Configures a list of repositories you regularly use"); action->setToolTip( hint ); @@ -525,7 +525,7 @@ void CervisiaPart::setupActions() // Settings menu // KToggleAction* toggaction = new KToggleAction( i18n("Hide All &Files"), 0, - this, SLOT(slotHideFiles()), + this, TQT_SLOT(slotHideFiles()), actionCollection(), "settings_hide_files" ); toggaction->setCheckedState(i18n("Show All &Files")); hint = i18n("Determines whether only folders are shown"); @@ -533,7 +533,7 @@ void CervisiaPart::setupActions() toggaction->setWhatsThis( hint ); toggaction = new KToggleAction( i18n("Hide Unmodified Files"), 0, - this, SLOT(slotHideUpToDate()), + this, TQT_SLOT(slotHideUpToDate()), actionCollection(), "settings_hide_uptodate" ); toggaction->setCheckedState(i18n("Show Unmodified Files")); hint = i18n("Determines whether files with status up-to-date or " @@ -542,7 +542,7 @@ void CervisiaPart::setupActions() toggaction->setWhatsThis( hint ); toggaction = new KToggleAction( i18n("Hide Removed Files"), 0, - this, SLOT(slotHideRemoved()), + this, TQT_SLOT(slotHideRemoved()), actionCollection(), "settings_hide_removed" ); toggaction->setCheckedState(i18n("Show Removed Files")); hint = i18n("Determines whether removed files are hidden"); @@ -550,7 +550,7 @@ void CervisiaPart::setupActions() toggaction->setWhatsThis( hint ); toggaction = new KToggleAction( i18n("Hide Non-CVS Files"), 0, - this, SLOT(slotHideNotInCVS()), + this, TQT_SLOT(slotHideNotInCVS()), actionCollection(), "settings_hide_notincvs" ); toggaction->setCheckedState(i18n("Show Non-CVS Files")); hint = i18n("Determines whether files not in CVS are hidden"); @@ -558,7 +558,7 @@ void CervisiaPart::setupActions() toggaction->setWhatsThis( hint ); toggaction = new KToggleAction( i18n("Hide Empty Folders"), 0, - this, SLOT(slotHideEmptyDirectories()), + this, TQT_SLOT(slotHideEmptyDirectories()), actionCollection(), "settings_hide_empty_directories" ); toggaction->setCheckedState(i18n("Show Empty Folders")); hint = i18n("Determines whether folders without visible entries are hidden"); @@ -566,42 +566,42 @@ void CervisiaPart::setupActions() toggaction->setWhatsThis( hint ); action = new KToggleAction( i18n("Create &Folders on Update"), 0, - this, SLOT(slotCreateDirs()), + this, TQT_SLOT(slotCreateDirs()), actionCollection(), "settings_create_dirs" ); hint = i18n("Determines whether updates create folders"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KToggleAction( i18n("&Prune Empty Folders on Update"), 0, - this, SLOT(slotPruneDirs()), + this, TQT_SLOT(slotPruneDirs()), actionCollection(), "settings_prune_dirs" ); hint = i18n("Determines whether updates remove empty folders"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KToggleAction( i18n("&Update Recursively"), 0, - this, SLOT(slotUpdateRecursive()), + this, TQT_SLOT(slotUpdateRecursive()), actionCollection(), "settings_update_recursively" ); hint = i18n("Determines whether updates are recursive"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KToggleAction( i18n("C&ommit && Remove Recursively"), 0, - this, SLOT(slotCommitRecursive()), + this, TQT_SLOT(slotCommitRecursive()), actionCollection(), "settings_commit_recursively" ); hint = i18n("Determines whether commits and removes are recursive"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KToggleAction( i18n("Do cvs &edit Automatically When Necessary"), 0, - this, SLOT(slotDoCVSEdit()), + this, TQT_SLOT(slotDoCVSEdit()), actionCollection(), "settings_do_cvs_edit" ); hint = i18n("Determines whether automatic cvs editing is active"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Configure Cervisia..."), "configure", 0, - this, SLOT(slotConfigure()), + this, TQT_SLOT(slotConfigure()), actionCollection(), "configure_cervisia" ); hint = i18n("Allows you to configure the Cervisia KPart"); action->setToolTip( hint ); @@ -610,11 +610,11 @@ void CervisiaPart::setupActions() // // Help Menu // - action = KStdAction::help( this, SLOT(slotHelp()), + action = KStdAction::help( this, TQT_SLOT(slotHelp()), actionCollection() ); action = new KAction( i18n("CVS &Manual"), 0, - this, SLOT(slotCVSInfo()), + this, TQT_SLOT(slotCVSInfo()), actionCollection(), "help_cvs_manual" ); hint = i18n("Opens the help browser with the CVS documentation"); action->setToolTip( hint ); @@ -624,18 +624,18 @@ void CervisiaPart::setupActions() // Folder context menu // toggaction = new KToggleAction( i18n("Unfold Folder"), 0, - this, SLOT( slotUnfoldFolder() ), + this, TQT_SLOT( slotUnfoldFolder() ), actionCollection(), "unfold_folder" ); toggaction->setCheckedState(i18n("Fold Folder")); - //action = KStdAction::aboutApp( this, SLOT(aboutCervisia()), + //action = KStdAction::aboutApp( this, TQT_SLOT(aboutCervisia()), // actionCollection(), "help_about_cervisia" ); } -void CervisiaPart::popupRequested(KListView*, QListViewItem* item, const QPoint& p) +void CervisiaPart::popupRequested(KListView*, TQListViewItem* item, const TQPoint& p) { - QString xmlName = "context_popup"; + TQString xmlName = "context_popup"; if( isDirItem(item) && update->fileSelection().isEmpty() ) { @@ -644,7 +644,7 @@ void CervisiaPart::popupRequested(KListView*, QListViewItem* item, const QPoint& action->setChecked(item->isOpen()); } - if( QPopupMenu* popup = static_cast(hostContainer(xmlName)) ) + if( TQPopupMenu* popup = static_cast(hostContainer(xmlName)) ) { if( isFileItem(item) ) { @@ -659,7 +659,7 @@ void CervisiaPart::popupRequested(KListView*, QListViewItem* item, const QPoint& } // get name of selected file - QString selectedFile; + TQString selectedFile; update->getSingleSelection(&selectedFile); if( !selectedFile.isEmpty() ) @@ -710,7 +710,7 @@ void CervisiaPart::updateActions() void CervisiaPart::aboutCervisia() { - QString aboutstr(i18n("Cervisia %1\n" + TQString aboutstr(i18n("Cervisia %1\n" "(Using KDE %2)\n" "\n" "Copyright (c) 1999-2002\n" @@ -725,7 +725,7 @@ void CervisiaPart::aboutCervisia() "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "See the ChangeLog file for a list of contributors.")); - QMessageBox::about(0, i18n("About Cervisia"), + TQMessageBox::about(0, i18n("About Cervisia"), aboutstr.arg(CERVISIA_VERSION).arg(KDE_VERSION_STRING)); } @@ -755,7 +755,7 @@ KAboutData* CervisiaPart::createAboutData() void CervisiaPart::slotOpenSandbox() { - QString dirname = KFileDialog::getExistingDirectory(":CervisiaPart", widget(), + TQString dirname = KFileDialog::getExistingDirectory(":CervisiaPart", widget(), i18n("Open Sandbox")); if (dirname.isEmpty()) return; @@ -778,34 +778,34 @@ void CervisiaPart::slotChangeLog() void CervisiaPart::slotOpen() { - QStringList filenames = update->fileSelection(); + TQStringList filenames = update->fileSelection(); if (filenames.isEmpty()) return; openFiles(filenames); } -void CervisiaPart::openFile(QString filename) +void CervisiaPart::openFile(TQString filename) { - QStringList files; + TQStringList files; files << filename; openFiles(files); } -void CervisiaPart::openFiles(const QStringList &filenames) +void CervisiaPart::openFiles(const TQStringList &filenames) { // call cvs edit automatically? if( opt_doCVSEdit ) { - QStringList files; + TQStringList files; // only edit read-only files - QStringList::ConstIterator it = filenames.begin(); - QStringList::ConstIterator end = filenames.end(); + TQStringList::ConstIterator it = filenames.begin(); + TQStringList::ConstIterator end = filenames.end(); for( ; it != end; ++it ) { - if( !QFileInfo(*it).isWritable() ) + if( !TQFileInfo(*it).isWritable() ) files << *it; } @@ -820,10 +820,10 @@ void CervisiaPart::openFiles(const QStringList &filenames) } // Now open the files by using KRun - QDir dir(sandbox); + TQDir dir(sandbox); - QStringList::ConstIterator it = filenames.begin(); - QStringList::ConstIterator end = filenames.end(); + TQStringList::ConstIterator it = filenames.begin(); + TQStringList::ConstIterator end = filenames.end(); for( ; it != end; ++it ) { KURL u; @@ -836,7 +836,7 @@ void CervisiaPart::openFiles(const QStringList &filenames) void CervisiaPart::slotResolve() { - QString filename; + TQString filename; update->getSingleSelection(&filename); if (filename.isEmpty()) return; @@ -858,14 +858,14 @@ void CervisiaPart::slotUpdate() void CervisiaPart::slotStatus() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; // Bug #105097: Embedded in Konqueror, all Cervisia tabs share // a common current directory. This confuses UpdateView. That's // why we always change the current directory here. - QDir::setCurrent(sandbox); + TQDir::setCurrent(sandbox); update->prepareJob(opt_updateRecursive, UpdateView::UpdateNoAct); @@ -873,17 +873,17 @@ void CervisiaPart::slotStatus() opt_createDirs, opt_pruneDirs); // get command line from cvs job - QString cmdline; + TQString cmdline; DCOPReply reply = cvsJob.call("cvsCommand()"); if( reply.isValid() ) - reply.get(cmdline); + reply.get(cmdline); if( protocol->startJob(true) ) { showJobStart(cmdline); - connect( protocol, SIGNAL(receivedLine(QString)), update, SLOT(processUpdateLine(QString)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), update, SLOT(finishJob(bool, int)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(receivedLine(TQString)), update, TQT_SLOT(processUpdateLine(TQString)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), update, TQT_SLOT(finishJob(bool, int)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), this, TQT_SLOT(slotJobFinished()) ); } } @@ -894,7 +894,7 @@ void CervisiaPart::slotUpdateToTag() if (l->exec()) { - QString tagopt; + TQString tagopt; if (l->byTag()) { tagopt = "-r "; @@ -930,7 +930,7 @@ void CervisiaPart::slotMerge() if (dlg.exec()) { - QString tagopt; + TQString tagopt; if (dlg.byBranch()) { tagopt = "-j "; @@ -951,7 +951,7 @@ void CervisiaPart::slotMerge() void CervisiaPart::slotCommit() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; @@ -968,7 +968,7 @@ void CervisiaPart::slotCommit() if( list.isEmpty() ) return; - QString msg = dlg.logMessage(); + TQString msg = dlg.logMessage(); if( !recentCommits.contains( msg ) ) { recentCommits.prepend( msg ); @@ -986,14 +986,14 @@ void CervisiaPart::slotCommit() opt_commitRecursive); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { m_jobType = Commit; showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), update, SLOT(finishJob(bool, int)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), update, TQT_SLOT(finishJob(bool, int)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), this, TQT_SLOT(slotJobFinished()) ); } } } @@ -1019,13 +1019,13 @@ void CervisiaPart::slotRemove() void CervisiaPart::slotFileProperties() { - QString filename; + TQString filename; update->getSingleSelection(&filename); if( filename.isEmpty() ) return; // Create URL from selected filename - QDir dir(sandbox); + TQDir dir(sandbox); KURL u; u.setPath(dir.absFilePath(filename)); @@ -1035,16 +1035,16 @@ void CervisiaPart::slotFileProperties() } -void CervisiaPart::updateSandbox(const QString &extraopt) +void CervisiaPart::updateSandbox(const TQString &extraopt) { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; // Bug #105097: Embedded in Konqueror, all Cervisia tabs share // a common current directory. This confuses UpdateView. That's // why we always change the current directory here. - QDir::setCurrent(sandbox); + TQDir::setCurrent(sandbox); update->prepareJob(opt_updateRecursive, UpdateView::Update); @@ -1052,24 +1052,24 @@ void CervisiaPart::updateSandbox(const QString &extraopt) opt_createDirs, opt_pruneDirs, extraopt); // get command line from cvs job - QString cmdline; + TQString cmdline; DCOPReply reply = cvsJob.call("cvsCommand()"); if( reply.isValid() ) - reply.get(cmdline); + reply.get(cmdline); if( protocol->startJob(true) ) { showJobStart(cmdline); - connect( protocol, SIGNAL(receivedLine(QString)), update, SLOT(processUpdateLine(QString)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), update, SLOT(finishJob(bool, int)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(receivedLine(TQString)), update, TQT_SLOT(processUpdateLine(TQString)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), update, TQT_SLOT(finishJob(bool, int)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), this, TQT_SLOT(slotJobFinished()) ); } } void CervisiaPart::addOrRemove(AddRemoveDialog::ActionType action) { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; @@ -1100,25 +1100,25 @@ void CervisiaPart::addOrRemove(AddRemoveDialog::ActionType action) } // get command line from cvs job - QString cmdline; + TQString cmdline; DCOPReply reply = cvsJob.call("cvsCommand()"); if( reply.isValid() ) - reply.get(cmdline); + reply.get(cmdline); if (protocol->startJob()) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - update, SLOT(finishJob(bool, int)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + update, TQT_SLOT(finishJob(bool, int)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } } void CervisiaPart::slotBrowseLog() { - QString filename; + TQString filename; update->getSingleSelection(&filename); if (filename.isEmpty()) return; @@ -1135,7 +1135,7 @@ void CervisiaPart::slotBrowseLog() #if 0 void CervisiaPart::slotBrowseMultiLog() { - QStrList list = update->multipleSelection(); + TQStrList list = update->multipleSelection(); if (!list.isEmpty()) { // Non-modal dialog @@ -1151,7 +1151,7 @@ void CervisiaPart::slotBrowseMultiLog() void CervisiaPart::slotAnnotate() { - QString filename; + TQString filename; update->getSingleSelection(&filename); if (filename.isEmpty()) @@ -1166,13 +1166,13 @@ void CervisiaPart::slotAnnotate() void CervisiaPart::slotDiffBase() { - showDiff(QString::fromLatin1("BASE")); + showDiff(TQString::fromLatin1("BASE")); } void CervisiaPart::slotDiffHead() { - showDiff(QString::fromLatin1("HEAD")); + showDiff(TQString::fromLatin1("HEAD")); } @@ -1190,7 +1190,7 @@ void CervisiaPart::slotRemoveWatch() void CervisiaPart::addOrRemoveWatch(WatchDialog::ActionType action) { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; @@ -1206,13 +1206,13 @@ void CervisiaPart::addOrRemoveWatch(WatchDialog::ActionType action) cvsJob = cvsService->removeWatch(list, dlg.events()); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } } @@ -1220,7 +1220,7 @@ void CervisiaPart::addOrRemoveWatch(WatchDialog::ActionType action) void CervisiaPart::slotShowWatchers() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; @@ -1235,100 +1235,100 @@ void CervisiaPart::slotShowWatchers() void CervisiaPart::slotEdit() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; DCOPRef cvsJob = cvsService->edit(list); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } void CervisiaPart::slotUnedit() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; DCOPRef cvsJob = cvsService->unedit(list); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } void CervisiaPart::slotLock() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; DCOPRef cvsJob = cvsService->lock(list); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } void CervisiaPart::slotUnlock() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; DCOPRef cvsJob = cvsService->unlock(list); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } void CervisiaPart::slotShowEditors() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; DCOPRef cvsJob = cvsService->editors(list); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } @@ -1339,8 +1339,8 @@ void CervisiaPart::slotMakePatch() if( optionDlg.exec() == KDialogBase::Rejected ) return; - QString format = optionDlg.formatOption(); - QString diffOptions = optionDlg.diffOptions(); + TQString format = optionDlg.formatOption(); + TQString diffOptions = optionDlg.diffOptions(); DCOPRef job = cvsService->makePatch(diffOptions, format); if( !cvsService->ok() ) @@ -1350,14 +1350,14 @@ void CervisiaPart::slotMakePatch() if( !dlg.execute() ) return; - QString fileName = KFileDialog::getSaveFileName(); + TQString fileName = KFileDialog::getSaveFileName(); if( fileName.isEmpty() ) return; if( !Cervisia::CheckOverwrite(fileName) ) return; - QFile f(fileName); + TQFile f(fileName); if( !f.open(IO_WriteOnly) ) { KMessageBox::sorry(widget(), @@ -1366,8 +1366,8 @@ void CervisiaPart::slotMakePatch() return; } - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; while( dlg.getLine(line) ) t << line << '\n'; @@ -1389,13 +1389,13 @@ void CervisiaPart::slotImport() dlg.useModificationTime()); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } @@ -1409,13 +1409,13 @@ void CervisiaPart::slotCreateRepository() DCOPRef cvsJob = cvsService->createRepository(dlg.directory()); - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } @@ -1432,13 +1432,13 @@ void CervisiaPart::slotCheckout() dlg.alias(), dlg.exportOnly(), dlg.recursive()); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } @@ -1464,7 +1464,7 @@ void CervisiaPart::slotDeleteTag() void CervisiaPart::createOrDeleteTag(TagDialog::ActionType action) { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; @@ -1482,13 +1482,13 @@ void CervisiaPart::createOrDeleteTag(TagDialog::ActionType action) dlg.forceTag()); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } } @@ -1497,7 +1497,7 @@ void CervisiaPart::createOrDeleteTag(TagDialog::ActionType action) void CervisiaPart::slotLastChange() { - QString filename, revA, revB; + TQString filename, revA, revB; update->getSingleSelection(&filename, &revA); if (filename.isEmpty()) return; @@ -1520,7 +1520,7 @@ void CervisiaPart::slotLastChange() return; } revB = revA.left(pos+1); - revB += QString::number(lastnumber-1); + revB += TQString::number(lastnumber-1); // Non-modal dialog DiffDialog *l = new DiffDialog(*config()); @@ -1635,25 +1635,25 @@ void CervisiaPart::slotConfigure() conf->setGroup("LookAndFeel"); bool splitHorz = conf->readBoolEntry("SplitHorizontally",true); splitter->setOrientation( splitHorz ? - QSplitter::Vertical : - QSplitter::Horizontal); + TQSplitter::Vertical : + TQSplitter::Horizontal); } void CervisiaPart::slotHelp() { emit setStatusBarText( i18n("Invoking help on Cervisia") ); - KApplication::startServiceByDesktopName("khelpcenter", QString("help:/cervisia/index.html")); + KApplication::startServiceByDesktopName("khelpcenter", TQString("help:/cervisia/index.html")); } void CervisiaPart::slotCVSInfo() { emit setStatusBarText( i18n("Invoking help on CVS") ); - KApplication::startServiceByDesktopName("khelpcenter", QString("info:/cvs/Top")); + KApplication::startServiceByDesktopName("khelpcenter", TQString("info:/cvs/Top")); } -void CervisiaPart::showJobStart(const QString &cmdline) +void CervisiaPart::showJobStart(const TQString &cmdline) { hasRunningJob = true; actionCollection()->action( "stop_job" )->setEnabled( true ); @@ -1663,9 +1663,9 @@ void CervisiaPart::showJobStart(const QString &cmdline) } -void CervisiaPart::showDiff(const QString& revision) +void CervisiaPart::showDiff(const TQString& revision) { - QString fileName; + TQString fileName; update->getSingleSelection(&fileName); if (fileName.isEmpty()) @@ -1673,7 +1673,7 @@ void CervisiaPart::showDiff(const QString& revision) // Non-modal dialog DiffDialog *l = new DiffDialog(*config()); - if (l->parseCvsDiff(cvsService, fileName, revision, QString::null)) + if (l->parseCvsDiff(cvsService, fileName, revision, TQString::null)) l->show(); else delete l; @@ -1687,8 +1687,8 @@ void CervisiaPart::slotJobFinished() emit setStatusBarText( i18n("Done") ); updateActions(); - disconnect( protocol, SIGNAL(receivedLine(QString)), - update, SLOT(processUpdateLine(QString)) ); + disconnect( protocol, TQT_SIGNAL(receivedLine(TQString)), + update, TQT_SLOT(processUpdateLine(TQString)) ); if( m_jobType == Commit ) { @@ -1700,7 +1700,7 @@ void CervisiaPart::slotJobFinished() } -bool CervisiaPart::openSandbox(const QString &dirname) +bool CervisiaPart::openSandbox(const TQString &dirname) { // Do we have a cvs service? if( !cvsService ) @@ -1720,7 +1720,7 @@ bool CervisiaPart::openSandbox(const QString &dirname) "Cervisia"); // remove path from recent sandbox menu - QFileInfo fi(dirname); + TQFileInfo fi(dirname); recent->removeURL( KURL::fromPathOrURL(fi.absFilePath()) ); return false; @@ -1751,7 +1751,7 @@ bool CervisiaPart::openSandbox(const QString &dirname) Cervisia::GlobalIgnoreList().retrieveServerIgnoreList(cvsService, repository); - QDir::setCurrent(sandbox); + TQDir::setCurrent(sandbox); update->openDirectory(sandbox); setFilter(); @@ -1790,7 +1790,7 @@ void CervisiaPart::setFilter() filter = UpdateView::Filter(filter | UpdateView::NoEmptyDirectories); update->setFilter(filter); - QString str; + TQString str; if (opt_hideFiles) str = "F"; else @@ -1862,7 +1862,7 @@ void CervisiaPart::readSettings() int splitterpos2 = config->readNumEntry("Splitter Pos 2", 0); if (splitterpos1) { - QValueList sizes; + TQValueList sizes; sizes << splitterpos1; sizes << splitterpos2; splitter->setSizes(sizes); @@ -1887,7 +1887,7 @@ void CervisiaPart::writeSettings() config->writeEntry("Hide Removed Files", opt_hideRemoved); config->writeEntry("Hide Non CVS Files", opt_hideNotInCVS); config->writeEntry("Hide Empty Directories", opt_hideEmptyDirectories); - QValueList sizes = splitter->sizes(); + TQValueList sizes = splitter->sizes(); config->writeEntry("Splitter Pos 1", sizes[0]); config->writeEntry("Splitter Pos 2", sizes[1]); diff --git a/cervisia/cervisiapart.h b/cervisia/cervisiapart.h index e5881a8d..3a68abc1 100644 --- a/cervisia/cervisiapart.h +++ b/cervisia/cervisiapart.h @@ -55,8 +55,8 @@ class CervisiaPart : public KParts::ReadOnlyPart Q_OBJECT public: - CervisiaPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name=0, const QStringList& args = QStringList()); + CervisiaPart( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name=0, const TQStringList& args = TQStringList()); virtual ~CervisiaPart(); /** @@ -64,7 +64,7 @@ public: */ static KConfig *config(); - QString sandBox() const { return sandbox; } + TQString sandBox() const { return sandbox; } static KAboutData* createAboutData(); @@ -73,9 +73,9 @@ public slots: virtual bool openFile() { return true; } virtual bool openURL( const KURL & ); - void openFile(QString filename); - void openFiles(const QStringList &filenames); - void popupRequested(KListView*, QListViewItem*, const QPoint&); + void openFile(TQString filename); + void openFiles(const TQStringList &filenames); + void popupRequested(KListView*, TQListViewItem*, const TQPoint&); void updateActions(); void aboutCervisia(); @@ -156,25 +156,25 @@ private: void readSettings(); void writeSettings(); - bool openSandbox(const QString &dirname); - void updateSandbox(const QString &extraopt = QString::null); + bool openSandbox(const TQString &dirname); + void updateSandbox(const TQString &extraopt = TQString::null); void addOrRemove(AddRemoveDialog::ActionType action); void addOrRemoveWatch(WatchDialog::ActionType action); void createOrDeleteTag(Cervisia::TagDialog::ActionType action); - void showJobStart(const QString &command); - void showDiff(const QString& revision); + void showJobStart(const TQString &command); + void showDiff(const TQString& revision); void setFilter(); UpdateView *update; ProtocolView *protocol; bool hasRunningJob; - QSplitter *splitter; + TQSplitter *splitter; - QString sandbox; - QString repository; + TQString sandbox; + TQString repository; - QString changelogstr; - QStringList recentCommits; + TQString changelogstr; + TQStringList recentCommits; bool opt_hideFiles, opt_hideUpToDate, opt_hideRemoved, opt_hideNotInCVS, opt_hideEmptyDirectories; bool opt_createDirs, opt_pruneDirs; bool opt_updateRecursive, opt_commitRecursive, opt_doCVSEdit; @@ -185,7 +185,7 @@ private: CvsService_stub* cvsService; KParts::StatusBarExtension* m_statusBar; CervisiaBrowserExtension* m_browserExt; - QLabel* filterLabel; + TQLabel* filterLabel; int m_editWithId; Cervisia::EditWithMenu* m_currentEditMenu; diff --git a/cervisia/cervisiashell.cpp b/cervisia/cervisiashell.cpp index 33dac96c..eb0518e2 100644 --- a/cervisia/cervisiashell.cpp +++ b/cervisia/cervisiashell.cpp @@ -62,15 +62,15 @@ CervisiaShell::CervisiaShell( const char *name ) // Magic needed for status texts // actionCollection()->setHighlightingEnabled(true); - connect( actionCollection(), SIGNAL( actionStatusText(const QString &) ), - statusBar(), SLOT( message(const QString &) ) ); - connect( actionCollection(), SIGNAL( clearStatusText() ), - statusBar(), SLOT( clear() ) ); + connect( actionCollection(), TQT_SIGNAL( actionStatusText(const TQString &) ), + statusBar(), TQT_SLOT( message(const TQString &) ) ); + connect( actionCollection(), TQT_SIGNAL( clearStatusText() ), + statusBar(), TQT_SLOT( clear() ) ); m_part->actionCollection()->setHighlightingEnabled(true); - connect( m_part->actionCollection(), SIGNAL( actionStatusText(const QString &) ), - statusBar(), SLOT( message(const QString &) ) ); - connect( m_part->actionCollection(), SIGNAL( clearStatusText() ), - statusBar(), SLOT( clear() ) ); + connect( m_part->actionCollection(), TQT_SIGNAL( actionStatusText(const TQString &) ), + statusBar(), TQT_SLOT( message(const TQString &) ) ); + connect( m_part->actionCollection(), TQT_SIGNAL( clearStatusText() ), + statusBar(), TQT_SLOT( clear() ) ); createGUI( m_part ); @@ -92,19 +92,19 @@ void CervisiaShell::setupActions() { setStandardToolBarMenuEnabled( true ); - KAction *action = KStdAction::configureToolbars( this, SLOT(slotConfigureToolBars()), + KAction *action = KStdAction::configureToolbars( this, TQT_SLOT(slotConfigureToolBars()), actionCollection() ); - QString hint = i18n("Allows you to configure the toolbar"); + TQString hint = i18n("Allows you to configure the toolbar"); action->setToolTip( hint ); action->setWhatsThis( hint ); - action = KStdAction::keyBindings( this, SLOT(slotConfigureKeys()), + action = KStdAction::keyBindings( this, TQT_SLOT(slotConfigureKeys()), actionCollection() ); hint = i18n("Allows you to customize the keybindings"); action->setToolTip( hint ); action->setWhatsThis( hint ); - action = KStdAction::quit( kapp, SLOT( quit() ), actionCollection() ); + action = KStdAction::quit( kapp, TQT_SLOT( quit() ), actionCollection() ); hint = i18n("Exits Cervisia"); action->setToolTip( hint ); action->setWhatsThis( hint ); @@ -161,7 +161,7 @@ void CervisiaShell::slotConfigureToolBars() { saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); KEditToolbar dlg( factory() ); - connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig())); + connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig())); dlg.exec(); } diff --git a/cervisia/cervisiashell.h b/cervisia/cervisiashell.h index 6e19ce1d..e96e15d9 100644 --- a/cervisia/cervisiashell.h +++ b/cervisia/cervisiashell.h @@ -60,7 +60,7 @@ private: void writeSettings(); KParts::ReadOnlyPart* m_part; - QString m_lastOpenDir; + TQString m_lastOpenDir; }; diff --git a/cervisia/changelogdlg.cpp b/cervisia/changelogdlg.cpp index 902a40f3..49476610 100644 --- a/cervisia/changelogdlg.cpp +++ b/cervisia/changelogdlg.cpp @@ -21,8 +21,8 @@ #include "changelogdlg.h" -#include -#include +#include +#include #include #include #include @@ -31,16 +31,16 @@ #include "misc.h" -static inline QString DateStringISO8601() +static inline TQString DateStringISO8601() { - return QDate::currentDate().toString(Qt::ISODate); + return TQDate::currentDate().toString(Qt::ISODate); } ChangeLogDialog::Options *ChangeLogDialog::options = 0; -ChangeLogDialog::ChangeLogDialog(KConfig& cfg, QWidget *parent, const char *name) +ChangeLogDialog::ChangeLogDialog(KConfig& cfg, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit ChangeLog"), Ok | Cancel, Ok, true) , partConfig(cfg) @@ -51,16 +51,16 @@ ChangeLogDialog::ChangeLogDialog(KConfig& cfg, QWidget *parent, const char *name edit->setFont(cfg.readFontEntry("ChangeLogFont")); edit->setFocus(); - edit->setWordWrap(QTextEdit::NoWrap); - edit->setTextFormat(QTextEdit::PlainText); + edit->setWordWrap(TQTextEdit::NoWrap); + edit->setTextFormat(TQTextEdit::PlainText); edit->setCheckSpellingEnabled(true); - QFontMetrics const fm(edit->fontMetrics()); + TQFontMetrics const fm(edit->fontMetrics()); edit->setMinimumSize(fm.width('0') * 80, fm.lineSpacing() * 20); setMainWidget(edit); - QSize size = configDialogSize(partConfig, "ChangeLogDialog"); + TQSize size = configDialogSize(partConfig, "ChangeLogDialog"); resize(size); } @@ -74,7 +74,7 @@ ChangeLogDialog::~ChangeLogDialog() void ChangeLogDialog::slotOk() { // Write changelog - QFile f(fname); + TQFile f(fname); if (!f.open(IO_ReadWrite)) { KMessageBox::sorry(this, @@ -83,7 +83,7 @@ void ChangeLogDialog::slotOk() return; } - QTextStream stream(&f); + TQTextStream stream(&f); stream << edit->text(); f.close(); @@ -91,11 +91,11 @@ void ChangeLogDialog::slotOk() } -bool ChangeLogDialog::readFile(const QString &filename) +bool ChangeLogDialog::readFile(const TQString &filename) { fname = filename; - if (!QFile::exists(filename)) + if (!TQFile::exists(filename)) { if (KMessageBox::warningContinueCancel(this, i18n("A ChangeLog file does not exist. Create one?"), @@ -105,7 +105,7 @@ bool ChangeLogDialog::readFile(const QString &filename) } else { - QFile f(filename); + TQFile f(filename); if (!f.open(IO_ReadWrite)) { KMessageBox::sorry(this, @@ -113,13 +113,13 @@ bool ChangeLogDialog::readFile(const QString &filename) "Cervisia"); return false; } - QTextStream stream(&f); + TQTextStream stream(&f); edit->setText(stream.read()); f.close(); } KConfigGroupSaver cs(&partConfig, "General"); - const QString username = partConfig.readEntry("Username", Cervisia::UserName()); + const TQString username = partConfig.readEntry("Username", Cervisia::UserName()); edit->insertParagraph("", 0); edit->insertParagraph("\t* ", 0); @@ -131,13 +131,13 @@ bool ChangeLogDialog::readFile(const QString &filename) } -QString ChangeLogDialog::message() +TQString ChangeLogDialog::message() { int no = 0; // Find first line which begins with non-whitespace while (no < edit->lines()) { - QString str = edit->text(no); + TQString str = edit->text(no); if (!str.isEmpty() && !str[0].isSpace()) break; ++no; @@ -146,17 +146,17 @@ QString ChangeLogDialog::message() // Skip empty lines while (no < edit->lines()) { - QString str = edit->text(no); + TQString str = edit->text(no); if( str.isEmpty() || str == " " ) break; ++no; } - QString res; + TQString res; // Use all lines until one which begins with non-whitespace // Remove tabs or 8 whitespace at beginning of each line while (no < edit->lines()) { - QString str = edit->text(no); + TQString str = edit->text(no); if (!str.isEmpty() && !str[0].isSpace()) break; if (!str.isEmpty() && str[0] == '\t') diff --git a/cervisia/changelogdlg.h b/cervisia/changelogdlg.h index 6c1aa3e3..ee7b8fc4 100644 --- a/cervisia/changelogdlg.h +++ b/cervisia/changelogdlg.h @@ -31,23 +31,23 @@ class KConfig; class ChangeLogDialog : public KDialogBase { public: - explicit ChangeLogDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit ChangeLogDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~ChangeLogDialog(); - bool readFile(const QString &fileName); - QString message(); + bool readFile(const TQString &fileName); + TQString message(); protected: virtual void slotOk(); private: struct Options { - QSize size; + TQSize size; }; static Options *options; - QString fname; + TQString fname; KTextEdit *edit; KConfig& partConfig; }; diff --git a/cervisia/checkoutdlg.cpp b/cervisia/checkoutdlg.cpp index 85a8b0a8..32885e8e 100644 --- a/cervisia/checkoutdlg.cpp +++ b/cervisia/checkoutdlg.cpp @@ -21,12 +21,12 @@ #include "checkoutdlg.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -43,9 +43,9 @@ using Cervisia::IsValidTag; CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service, - ActionType action, QWidget* parent, + ActionType action, TQWidget* parent, const char* name) - : KDialogBase(parent, name, true, QString::null, + : KDialogBase(parent, name, true, TQString::null, Ok | Cancel | Help, Ok, true) , act(action) , partConfig(cfg) @@ -53,91 +53,91 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service, { setCaption( (action==Checkout)? i18n("CVS Checkout") : i18n("CVS Import") ); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout* layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout* layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QGridLayout* grid = new QGridLayout(layout); + TQGridLayout* grid = new TQGridLayout(layout); grid->setColStretch(0, 1); grid->setColStretch(1, 20); for( int i = 0; i < ((action==Checkout)? 4 : 10); ++i ) grid->setRowStretch(i, 0); - repo_combo = new QComboBox(true, mainWidget); + repo_combo = new TQComboBox(true, mainWidget); repo_combo->setFocus(); // make sure combobox is smaller than the screen - repo_combo->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + repo_combo->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); grid->addWidget(repo_combo, 0, 1); - QLabel* repo_label = new QLabel(repo_combo, i18n("&Repository:"), mainWidget); + TQLabel* repo_label = new TQLabel(repo_combo, i18n("&Repository:"), mainWidget); grid->addWidget(repo_label, 0, 0, AlignLeft | AlignVCenter); if( action == Import ) { module_edit = new KLineEdit(mainWidget); grid->addWidget(module_edit, 1, 1); - QLabel* module_label = new QLabel(module_edit, i18n("&Module:"), mainWidget); + TQLabel* module_label = new TQLabel(module_edit, i18n("&Module:"), mainWidget); grid->addWidget(module_label, 1, 0, AlignLeft | AlignVCenter); } else { - module_combo = new QComboBox(true, mainWidget); + module_combo = new TQComboBox(true, mainWidget); - QPushButton* module_button = new QPushButton(i18n("Fetch &List"), mainWidget); - connect( module_button, SIGNAL(clicked()), - this, SLOT(moduleButtonClicked()) ); + TQPushButton* module_button = new TQPushButton(i18n("Fetch &List"), mainWidget); + connect( module_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(moduleButtonClicked()) ); - QBoxLayout* module_layout = new QHBoxLayout(); + TQBoxLayout* module_layout = new TQHBoxLayout(); grid->addLayout(module_layout, 1, 1); module_layout->addWidget(module_combo, 10); module_layout->addWidget(module_button, 0, AlignVCenter); - QLabel* module_label = new QLabel(module_combo, i18n("&Module:"), mainWidget); + TQLabel* module_label = new TQLabel(module_combo, i18n("&Module:"), mainWidget); grid->addWidget(module_label, 1, 0, AlignLeft | AlignVCenter); - branchCombo = new QComboBox(true, mainWidget); + branchCombo = new TQComboBox(true, mainWidget); - QPushButton* branchButton = new QPushButton(i18n("Fetch &List"), mainWidget); - connect( branchButton, SIGNAL(clicked()), - this, SLOT(branchButtonClicked()) ); + TQPushButton* branchButton = new TQPushButton(i18n("Fetch &List"), mainWidget); + connect( branchButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(branchButtonClicked()) ); - QBoxLayout* branchLayout = new QHBoxLayout(); + TQBoxLayout* branchLayout = new TQHBoxLayout(); grid->addLayout(branchLayout, 2, 1); branchLayout->addWidget(branchCombo, 10); branchLayout->addWidget(branchButton, 0, AlignVCenter); - QLabel* branch_label = new QLabel(branchCombo, i18n("&Branch tag:"), + TQLabel* branch_label = new TQLabel(branchCombo, i18n("&Branch tag:"), mainWidget); grid->addWidget(branch_label, 2, 0, AlignLeft | AlignVCenter); - connect( branchCombo, SIGNAL( textChanged( const QString&)), - this, SLOT( branchTextChanged() )); + connect( branchCombo, TQT_SIGNAL( textChanged( const TQString&)), + this, TQT_SLOT( branchTextChanged() )); - recursive_box = new QCheckBox(i18n("Re&cursive checkout"), mainWidget); + recursive_box = new TQCheckBox(i18n("Re&cursive checkout"), mainWidget); grid->addMultiCellWidget(recursive_box, 6, 6, 0, 1); } workdir_edit = new KLineEdit(mainWidget); - workdir_edit->setText(QDir::homeDirPath()); + workdir_edit->setText(TQDir::homeDirPath()); workdir_edit->setMinimumWidth(fontMetrics().width('X') * 40); KURLCompletion* comp = new KURLCompletion(); workdir_edit->setCompletionObject(comp); workdir_edit->setAutoDeleteCompletionObject(true); - connect( workdir_edit, SIGNAL(returnPressed(const QString&)), - comp, SLOT(addItem(const QString&)) ); + connect( workdir_edit, TQT_SIGNAL(returnPressed(const TQString&)), + comp, TQT_SLOT(addItem(const TQString&)) ); - QPushButton* dir_button = new QPushButton("...", mainWidget); - connect( dir_button, SIGNAL(clicked()), - this, SLOT(dirButtonClicked()) ); + TQPushButton* dir_button = new TQPushButton("...", mainWidget); + connect( dir_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(dirButtonClicked()) ); dir_button->setFixedWidth(30); - QBoxLayout* workdir_layout = new QHBoxLayout(); + TQBoxLayout* workdir_layout = new TQHBoxLayout(); grid->addLayout(workdir_layout, (action==Import)? 2 : 3, 1); workdir_layout->addWidget(workdir_edit, 10); workdir_layout->addWidget(dir_button, 0, AlignVCenter); - QLabel* workdir_label = new QLabel(workdir_edit, i18n("Working &folder:"), + TQLabel* workdir_label = new TQLabel(workdir_edit, i18n("Working &folder:"), mainWidget); grid->addWidget(workdir_label, (action==Import)? 2 : 3, 0, AlignLeft | AlignVCenter); @@ -146,35 +146,35 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service, vendortag_edit = new KLineEdit(mainWidget); grid->addWidget(vendortag_edit, 3, 1); - QLabel* vendortag_label = new QLabel(vendortag_edit, i18n("&Vendor tag:"), + TQLabel* vendortag_label = new TQLabel(vendortag_edit, i18n("&Vendor tag:"), mainWidget); grid->addWidget(vendortag_label, 3, 0, AlignLeft | AlignVCenter); releasetag_edit = new KLineEdit(mainWidget); grid->addWidget(releasetag_edit, 4, 1); - QLabel* releasetag_label = new QLabel(releasetag_edit, i18n("&Release tag:"), + TQLabel* releasetag_label = new TQLabel(releasetag_edit, i18n("&Release tag:"), mainWidget); grid->addWidget(releasetag_label, 4, 0, AlignLeft | AlignVCenter); ignore_edit = new KLineEdit(mainWidget); grid->addWidget(ignore_edit, 5, 1); - QLabel* ignore_label = new QLabel(ignore_edit, i18n("&Ignore files:"), + TQLabel* ignore_label = new TQLabel(ignore_edit, i18n("&Ignore files:"), mainWidget); grid->addWidget(ignore_label, 5, 0, AlignLeft | AlignVCenter); comment_edit = new KLineEdit(mainWidget); grid->addWidget(comment_edit, 6, 1); - QLabel* comment_label = new QLabel(comment_edit, i18n("&Comment:"), + TQLabel* comment_label = new TQLabel(comment_edit, i18n("&Comment:"), mainWidget); grid->addWidget(comment_label, 6, 0, AlignLeft | AlignVCenter); - binary_box = new QCheckBox(i18n("Import as &binaries"), mainWidget); + binary_box = new TQCheckBox(i18n("Import as &binaries"), mainWidget); grid->addMultiCellWidget(binary_box, 7, 7, 0, 1); - m_useModificationTimeBox = new QCheckBox( + m_useModificationTimeBox = new TQCheckBox( i18n("Use file's modification time as time of import"), mainWidget); grid->addMultiCellWidget(m_useModificationTimeBox, 8, 8, 0, 1); } @@ -183,20 +183,20 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service, alias_edit = new KLineEdit(mainWidget); grid->addWidget(alias_edit, 4, 1); - QLabel* alias_label = new QLabel(alias_edit, i18n("Chec&k out as:"), mainWidget); + TQLabel* alias_label = new TQLabel(alias_edit, i18n("Chec&k out as:"), mainWidget); grid->addWidget(alias_label, 4, 0, AlignLeft | AlignVCenter); - export_box = new QCheckBox(i18n("Ex&port only"), mainWidget); + export_box = new TQCheckBox(i18n("Ex&port only"), mainWidget); grid->addMultiCellWidget(export_box, 5, 5, 0, 1); } - QStringList list1 = Repositories::readCvsPassFile(); - QStringList::ConstIterator it1; + TQStringList list1 = Repositories::readCvsPassFile(); + TQStringList::ConstIterator it1; for (it1 = list1.begin(); it1 != list1.end(); ++it1) repo_combo->insertItem(*it1); - QStringList list2 = Repositories::readConfigFile(); - QStringList::ConstIterator it2; + TQStringList list2 = Repositories::readConfigFile(); + TQStringList::ConstIterator it2; for (it2 = list2.begin(); it2 != list2.end(); ++it2) if (!list1.contains(*it2)) repo_combo->insertItem(*it2); @@ -207,54 +207,54 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service, } -QString CheckoutDialog::workingDirectory() const +TQString CheckoutDialog::workingDirectory() const { return workdir_edit->text(); } -QString CheckoutDialog::repository() const +TQString CheckoutDialog::repository() const { return repo_combo->currentText(); } -QString CheckoutDialog::module() const +TQString CheckoutDialog::module() const { return act==Import? module_edit->text() : module_combo->currentText(); } -QString CheckoutDialog::branch() const +TQString CheckoutDialog::branch() const { return branchCombo->currentText(); } -QString CheckoutDialog::vendorTag() const +TQString CheckoutDialog::vendorTag() const { return vendortag_edit->text(); } -QString CheckoutDialog::releaseTag() const +TQString CheckoutDialog::releaseTag() const { return releasetag_edit->text(); } -QString CheckoutDialog::ignoreFiles() const +TQString CheckoutDialog::ignoreFiles() const { return ignore_edit->text(); } -QString CheckoutDialog::comment() const +TQString CheckoutDialog::comment() const { return comment_edit->text(); } -QString CheckoutDialog::alias() const +TQString CheckoutDialog::alias() const { return alias_edit->text(); } @@ -284,7 +284,7 @@ bool CheckoutDialog::recursive() const void CheckoutDialog::slotOk() { - QFileInfo fi(workingDirectory()); + TQFileInfo fi(workingDirectory()); if (!fi.exists() || !fi.isDir()) { KMessageBox::information(this, i18n("Please choose an existing working folder.")); @@ -330,7 +330,7 @@ void CheckoutDialog::slotOk() void CheckoutDialog::dirButtonClicked() { - QString dir = KFileDialog::getExistingDirectory(workdir_edit->text()); + TQString dir = KFileDialog::getExistingDirectory(workdir_edit->text()); if (!dir.isEmpty()) workdir_edit->setText(dir); } @@ -347,7 +347,7 @@ void CheckoutDialog::moduleButtonClicked() return; module_combo->clear(); - QString str; + TQString str; while (dlg.getLine(str)) { if (str.left(12) == "Unknown host") @@ -358,7 +358,7 @@ void CheckoutDialog::moduleButtonClicked() pos = str.find('\t'); if (pos == -1) pos = str.length(); - QString module( str.left(pos).stripWhiteSpace() ); + TQString module( str.left(pos).stripWhiteSpace() ); if ( !module.isEmpty() ) module_combo->insertItem(module); } @@ -367,7 +367,7 @@ void CheckoutDialog::moduleButtonClicked() void CheckoutDialog::branchButtonClicked() { - QStringList branchTagList; + TQStringList branchTagList; if( repository().isEmpty() ) { @@ -386,12 +386,12 @@ void CheckoutDialog::branchButtonClicked() if( !cvsService->ok() ) return; - ProgressDialog dlg(this, "Remote Log", cvsJob, QString::null, + ProgressDialog dlg(this, "Remote Log", cvsJob, TQString::null, i18n("CVS Remote Log")); if( !dlg.execute() ) return; - QString line; + TQString line; while( dlg.getLine(line) ) { int colonPos; @@ -401,7 +401,7 @@ void CheckoutDialog::branchButtonClicked() if( (colonPos = line.find(':', 1)) < 0 ) continue; - const QString tag = line.mid(1, colonPos - 1); + const TQString tag = line.mid(1, colonPos - 1); if( !branchTagList.contains(tag) ) branchTagList.push_back(tag); } diff --git a/cervisia/checkoutdlg.h b/cervisia/checkoutdlg.h index 33f95f2b..20fd9cfd 100644 --- a/cervisia/checkoutdlg.h +++ b/cervisia/checkoutdlg.h @@ -40,17 +40,17 @@ public: enum ActionType { Checkout, Import }; CheckoutDialog( KConfig& cfg, CvsService_stub* service, ActionType action, - QWidget *parent=0, const char *name=0 ); - - QString workingDirectory() const; - QString repository() const; - QString module() const; - QString branch() const; - QString vendorTag() const; - QString releaseTag() const; - QString ignoreFiles() const; - QString comment() const; - QString alias() const; + TQWidget *parent=0, const char *name=0 ); + + TQString workingDirectory() const; + TQString repository() const; + TQString module() const; + TQString branch() const; + TQString vendorTag() const; + TQString releaseTag() const; + TQString ignoreFiles() const; + TQString comment() const; + TQString alias() const; bool importBinary() const; bool useModificationTime() const; bool exportOnly() const; @@ -69,12 +69,12 @@ private: void saveUserInput(); void restoreUserInput(); - QComboBox *repo_combo, *module_combo, *branchCombo; + TQComboBox *repo_combo, *module_combo, *branchCombo; KLineEdit *module_edit, *workdir_edit; KLineEdit *comment_edit; KLineEdit *vendortag_edit, *releasetag_edit, *ignore_edit, *alias_edit; - QCheckBox *binary_box, *export_box, *recursive_box; - QCheckBox* m_useModificationTimeBox; + TQCheckBox *binary_box, *export_box, *recursive_box; + TQCheckBox* m_useModificationTimeBox; ActionType act; KConfig& partConfig; diff --git a/cervisia/commitdlg.cpp b/cervisia/commitdlg.cpp index 53c91ba7..4fdaca68 100644 --- a/cervisia/commitdlg.cpp +++ b/cervisia/commitdlg.cpp @@ -20,13 +20,13 @@ #include "commitdlg.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -39,31 +39,31 @@ class CommitListItem : public QCheckListItem { public: - CommitListItem(QListView* parent, const QString& text, const QString fileName) - : QCheckListItem(parent, text, QCheckListItem::CheckBox) + CommitListItem(TQListView* parent, const TQString& text, const TQString fileName) + : TQCheckListItem(parent, text, TQCheckListItem::CheckBox) , m_fileName(fileName) { } - QString fileName() const { return m_fileName; } + TQString fileName() const { return m_fileName; } private: - QString m_fileName; + TQString m_fileName; }; CommitDialog::CommitDialog(KConfig& cfg, CvsService_stub* service, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("CVS Commit"), Ok | Cancel | Help | User1, Ok, true) , partConfig(cfg) , cvsService(service) { - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QLabel *textlabel = new QLabel( i18n("Commit the following &files:"), mainWidget ); + TQLabel *textlabel = new TQLabel( i18n("Commit the following &files:"), mainWidget ); layout->addWidget(textlabel); m_fileList = new KListView(mainWidget); @@ -71,23 +71,23 @@ CommitDialog::CommitDialog(KConfig& cfg, CvsService_stub* service, m_fileList->setFullWidth(true); m_fileList->header()->hide(); textlabel->setBuddy(m_fileList); - connect( m_fileList, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(fileSelected(QListViewItem*))); - connect( m_fileList, SIGNAL(selectionChanged()), - this, SLOT(fileHighlighted()) ); + connect( m_fileList, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(fileSelected(TQListViewItem*))); + connect( m_fileList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(fileHighlighted()) ); layout->addWidget(m_fileList, 5); - QLabel *archivelabel = new QLabel(i18n("Older &messages:"), mainWidget); + TQLabel *archivelabel = new TQLabel(i18n("Older &messages:"), mainWidget); layout->addWidget(archivelabel); - combo = new QComboBox(mainWidget); + combo = new TQComboBox(mainWidget); archivelabel->setBuddy(combo); - connect( combo, SIGNAL(activated(int)), this, SLOT(comboActivated(int)) ); + connect( combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(comboActivated(int)) ); // make sure that combobox is smaller than the screen - combo->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed)); + combo->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); layout->addWidget(combo); - QLabel *messagelabel = new QLabel(i18n("&Log message:"), mainWidget); + TQLabel *messagelabel = new TQLabel(i18n("&Log message:"), mainWidget); layout->addWidget(messagelabel); edit = new Cervisia::LogMessageEdit(mainWidget); @@ -97,20 +97,20 @@ CommitDialog::CommitDialog(KConfig& cfg, CvsService_stub* service, edit->setMinimumSize(400, 100); layout->addWidget(edit, 10); - m_useTemplateChk = new QCheckBox(i18n("Use log message &template"), mainWidget); + m_useTemplateChk = new TQCheckBox(i18n("Use log message &template"), mainWidget); layout->addWidget(m_useTemplateChk); - connect( m_useTemplateChk, SIGNAL(clicked()), this, SLOT(useTemplateClicked()) ); + connect( m_useTemplateChk, TQT_SIGNAL(clicked()), this, TQT_SLOT(useTemplateClicked()) ); checkForTemplateFile(); setButtonGuiItem(User1, KGuiItem(i18n("&Diff"), "vcs_diff")); enableButton(User1, false); - connect( this, SIGNAL(user1Clicked()), - this, SLOT(diffClicked()) ); + connect( this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(diffClicked()) ); setHelp("commitingfiles"); - QSize size = configDialogSize(partConfig, "CommitDialog"); + TQSize size = configDialogSize(partConfig, "CommitDialog"); resize(size); } @@ -124,16 +124,16 @@ CommitDialog::~CommitDialog() } -void CommitDialog::setFileList(const QStringList &list) +void CommitDialog::setFileList(const TQStringList &list) { - QString currentDirName = QFileInfo(QChar('.')).absFilePath(); + TQString currentDirName = TQFileInfo(TQChar('.')).absFilePath(); - QStringList::ConstIterator it = list.begin(); + TQStringList::ConstIterator it = list.begin(); for( ; it != list.end(); ++it ) { // the dot for the root directory is hard to see, so // we convert it to the absolut path - QString text = (*it != "." ? *it : currentDirName); + TQString text = (*it != "." ? *it : currentDirName); edit->compObj()->addItem(text); CommitListItem* item = new CommitListItem(m_fileList, text, *it); @@ -142,11 +142,11 @@ void CommitDialog::setFileList(const QStringList &list) } -QStringList CommitDialog::fileList() const +TQStringList CommitDialog::fileList() const { - QStringList files; + TQStringList files; - QListViewItemIterator it(m_fileList, QListViewItemIterator::Checked); + TQListViewItemIterator it(m_fileList, TQListViewItemIterator::Checked); for( ; it.current(); ++it ) { CommitListItem* item = static_cast(it.current()); @@ -157,7 +157,7 @@ QStringList CommitDialog::fileList() const } -void CommitDialog::setLogMessage(const QString &msg) +void CommitDialog::setLogMessage(const TQString &msg) { edit->setText(msg); @@ -166,25 +166,25 @@ void CommitDialog::setLogMessage(const QString &msg) } -QString CommitDialog::logMessage() const +TQString CommitDialog::logMessage() const { return edit->text(); } -void CommitDialog::setLogHistory(const QStringList &list) +void CommitDialog::setLogHistory(const TQStringList &list) { commits = list; combo->insertItem(i18n("Current")); - for ( QStringList::ConstIterator it = list.begin(); + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { if( (*it).isEmpty() ) continue; - QString txt = *it; + TQString txt = *it; int index = txt.find('\n', 0); if ( index != -1 ) // Fetch first line { @@ -216,7 +216,7 @@ void CommitDialog::comboActivated(int index) } -void CommitDialog::fileSelected(QListViewItem* item) +void CommitDialog::fileSelected(TQListViewItem* item) { // double click on empty space? if( !item ) @@ -235,7 +235,7 @@ void CommitDialog::fileHighlighted() void CommitDialog::diffClicked() { - QListViewItem* item = m_fileList->selectedItem(); + TQListViewItem* item = m_fileList->selectedItem(); if( !item ) return; @@ -243,7 +243,7 @@ void CommitDialog::diffClicked() } -void CommitDialog::showDiffDialog(const QString& fileName) +void CommitDialog::showDiffDialog(const TQString& fileName) { DiffDialog *l = new DiffDialog(partConfig, this, "diffdialog"); @@ -275,13 +275,13 @@ void CommitDialog::useTemplateClicked() void CommitDialog::checkForTemplateFile() { - QString filename = QDir::current().absPath() + "/CVS/Template"; - if( QFile::exists(filename) ) + TQString filename = TQDir::current().absPath() + "/CVS/Template"; + if( TQFile::exists(filename) ) { - QFile f(filename); + TQFile f(filename); if( f.open(IO_ReadOnly) ) { - QTextStream stream(&f); + TQTextStream stream(&f); m_templateText = stream.read(); f.close(); @@ -307,7 +307,7 @@ void CommitDialog::checkForTemplateFile() void CommitDialog::addTemplateText() { edit->append(m_templateText); - edit->moveCursor(QTextEdit::MoveHome, false); + edit->moveCursor(TQTextEdit::MoveHome, false); edit->ensureCursorVisible(); } diff --git a/cervisia/commitdlg.h b/cervisia/commitdlg.h index fe3d9acf..c9bd44b5 100644 --- a/cervisia/commitdlg.h +++ b/cervisia/commitdlg.h @@ -22,7 +22,7 @@ #ifndef COMMITDLG_H #define COMMITDLG_H -#include +#include #include namespace Cervisia { class LogMessageEdit; } @@ -39,40 +39,40 @@ class CommitDialog : public KDialogBase Q_OBJECT public: - CommitDialog( KConfig& cfg, CvsService_stub* service, QWidget *parent=0, + CommitDialog( KConfig& cfg, CvsService_stub* service, TQWidget *parent=0, const char *name=0 ); virtual ~CommitDialog(); - void setFileList(const QStringList &list); - QStringList fileList() const; - void setLogMessage(const QString &msg); - QString logMessage() const; - void setLogHistory(const QStringList &list); + void setFileList(const TQStringList &list); + TQStringList fileList() const; + void setLogMessage(const TQString &msg); + TQString logMessage() const; + void setLogHistory(const TQStringList &list); private slots: void comboActivated(int); - void fileSelected(QListViewItem* item); + void fileSelected(TQListViewItem* item); void fileHighlighted(); void diffClicked(); void useTemplateClicked(); private: - void showDiffDialog(const QString& fileName); + void showDiffDialog(const TQString& fileName); void checkForTemplateFile(); void addTemplateText(); void removeTemplateText(); KListView* m_fileList; Cervisia::LogMessageEdit* edit; - QComboBox *combo; - QStringList commits; + TQComboBox *combo; + TQStringList commits; int current_index; - QString current_text; + TQString current_text; int highlightedFile; - QCheckBox* m_useTemplateChk; - QString m_templateText; + TQCheckBox* m_useTemplateChk; + TQString m_templateText; KConfig& partConfig; CvsService_stub* cvsService; // for diff dialog diff --git a/cervisia/cvsdir.cpp b/cervisia/cvsdir.cpp index 263fd704..20f2994d 100644 --- a/cervisia/cvsdir.cpp +++ b/cervisia/cvsdir.cpp @@ -25,16 +25,16 @@ using namespace Cervisia; -CvsDir::CvsDir(const QString &path) - : QDir( path, 0, QDir::Name, - QDir::All | QDir::Hidden | QDir::NoSymLinks ) +CvsDir::CvsDir(const TQString &path) + : TQDir( path, 0, TQDir::Name, + TQDir::All | TQDir::Hidden | TQDir::NoSymLinks ) {} const QFileInfoList *CvsDir::entryInfoList() const { DirIgnoreList ignorelist(absPath()); - const QFileInfoList *fulllist = QDir::entryInfoList(); + const QFileInfoList *fulllist = TQDir::entryInfoList(); if (!fulllist) return 0; diff --git a/cervisia/cvsdir.h b/cervisia/cvsdir.h index 8f732163..2b9cd9ce 100644 --- a/cervisia/cvsdir.h +++ b/cervisia/cvsdir.h @@ -21,13 +21,13 @@ #ifndef CVSDIR_H #define CVSDIR_H -#include +#include class CvsDir : public QDir { public: - explicit CvsDir(const QString &path); + explicit CvsDir(const TQString &path); const QFileInfoList *entryInfoList() const; diff --git a/cervisia/cvsinitdlg.cpp b/cervisia/cvsinitdlg.cpp index 9de80759..cf0b4641 100644 --- a/cervisia/cvsinitdlg.cpp +++ b/cervisia/cvsinitdlg.cpp @@ -19,9 +19,9 @@ #include "cvsinitdlg.h" -#include -#include -#include +#include +#include +#include #include #include @@ -32,17 +32,17 @@ using Cervisia::CvsInitDialog; -CvsInitDialog::CvsInitDialog(QWidget* parent, const char* name) +CvsInitDialog::CvsInitDialog(TQWidget* parent, const char* name) : KDialogBase(parent, name, true, i18n("Create New Repository (cvs init)"), Ok | Cancel, Ok, true) { - QFrame* mainWidget = makeMainWidget(); - QVBoxLayout* mainLayout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQFrame* mainWidget = makeMainWidget(); + TQVBoxLayout* mainLayout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QLabel* dirLabel = new QLabel(i18n("Repository folder:"), mainWidget); + TQLabel* dirLabel = new TQLabel(i18n("Repository folder:"), mainWidget); mainLayout->addWidget(dirLabel); - QHBoxLayout* dirLayout = new QHBoxLayout(mainLayout); + TQHBoxLayout* dirLayout = new TQHBoxLayout(mainLayout); m_directoryEdit = new KLineEdit(mainWidget); m_directoryEdit->setFocus(); @@ -54,14 +54,14 @@ CvsInitDialog::CvsInitDialog(QWidget* parent, const char* name) dirLabel->setBuddy(m_directoryEdit); dirLayout->addWidget(m_directoryEdit); - QPushButton* dirButton = new QPushButton("...", mainWidget); + TQPushButton* dirButton = new TQPushButton("...", mainWidget); dirButton->setFixedWidth(30); dirLayout->addWidget(dirButton); - connect( dirButton, SIGNAL(clicked()), - this, SLOT(dirButtonClicked()) ); - connect( m_directoryEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(lineEditTextChanged(const QString&))); + connect( dirButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(dirButtonClicked()) ); + connect( m_directoryEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(lineEditTextChanged(const TQString&))); enableButton(Ok, false); @@ -69,7 +69,7 @@ CvsInitDialog::CvsInitDialog(QWidget* parent, const char* name) } -QString CvsInitDialog::directory() const +TQString CvsInitDialog::directory() const { return m_directoryEdit->text(); } @@ -77,13 +77,13 @@ QString CvsInitDialog::directory() const void CvsInitDialog::dirButtonClicked() { - QString dir = KFileDialog::getExistingDirectory(m_directoryEdit->text()); + TQString dir = KFileDialog::getExistingDirectory(m_directoryEdit->text()); if( !dir.isEmpty() ) m_directoryEdit->setText(dir); } -void CvsInitDialog::lineEditTextChanged(const QString& text) +void CvsInitDialog::lineEditTextChanged(const TQString& text) { enableButton(Ok, !text.stripWhiteSpace().isEmpty()); } diff --git a/cervisia/cvsinitdlg.h b/cervisia/cvsinitdlg.h index 007617a7..9ca35ad0 100644 --- a/cervisia/cvsinitdlg.h +++ b/cervisia/cvsinitdlg.h @@ -34,13 +34,13 @@ class CvsInitDialog : public KDialogBase Q_OBJECT public: - CvsInitDialog(QWidget* parent = 0, const char* name = 0); + CvsInitDialog(TQWidget* parent = 0, const char* name = 0); - QString directory() const; + TQString directory() const; private slots: void dirButtonClicked(); - void lineEditTextChanged(const QString& text); + void lineEditTextChanged(const TQString& text); private: KLineEdit* m_directoryEdit; diff --git a/cervisia/cvsservice/cvsaskpass.cpp b/cervisia/cvsservice/cvsaskpass.cpp index 01903f02..13660c7e 100644 --- a/cervisia/cvsservice/cvsaskpass.cpp +++ b/cervisia/cvsservice/cvsaskpass.cpp @@ -18,7 +18,7 @@ * */ -#include +#include #include #include #include @@ -56,8 +56,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char** argv) return 1; // parse repository name from the passed argument - QString prompt = KCmdLineArgs::parsedArgs()->arg(0); - QRegExp rx("(.*@.*)'s password:"); + TQString prompt = KCmdLineArgs::parsedArgs()->arg(0); + TQRegExp rx("(.*@.*)'s password:"); int pos = rx.search(prompt); KPasswordDialog dlg(KPasswordDialog::Password, false, 0); diff --git a/cervisia/cvsservice/cvsjob.cpp b/cervisia/cvsservice/cvsjob.cpp index e73e0abc..3f4f06fe 100644 --- a/cervisia/cvsservice/cvsjob.cpp +++ b/cervisia/cvsservice/cvsjob.cpp @@ -20,7 +20,7 @@ #include "cvsjob.h" -#include +#include #include #include @@ -37,26 +37,26 @@ struct CvsJob::Private ~Private() { delete childproc; } KProcess* childproc; - QString server; - QString rsh; - QString directory; + TQString server; + TQString rsh; + TQString directory; bool isRunning; - QStringList outputLines; + TQStringList outputLines; }; CvsJob::CvsJob(unsigned jobNum) - : QObject() + : TQObject() , DCOPObject() , d(new Private) { - QString objId("CvsJob" + QString::number(jobNum)); + TQString objId("CvsJob" + TQString::number(jobNum)); setObjId(objId.local8Bit()); } -CvsJob::CvsJob(const QString& objId) - : QObject() +CvsJob::CvsJob(const TQString& objId) + : TQObject() , DCOPObject() , d(new Private) { @@ -76,19 +76,19 @@ void CvsJob::clearCvsCommand() } -void CvsJob::setRSH(const QString& rsh) +void CvsJob::setRSH(const TQString& rsh) { d->rsh = rsh; } -void CvsJob::setServer(const QString& server) +void CvsJob::setServer(const TQString& server) { d->server = server; } -void CvsJob::setDirectory(const QString& directory) +void CvsJob::setDirectory(const TQString& directory) { d->directory = directory; } @@ -100,7 +100,7 @@ bool CvsJob::isRunning() const } -CvsJob& CvsJob::operator<<(const QString& arg) +CvsJob& CvsJob::operator<<(const TQString& arg) { *d->childproc << arg; return *this; @@ -114,39 +114,39 @@ CvsJob& CvsJob::operator<<(const char* arg) } -CvsJob& CvsJob::operator<<(const QCString& arg) +CvsJob& CvsJob::operator<<(const TQCString& arg) { *d->childproc << arg; return *this; } -CvsJob& CvsJob::operator<<(const QStringList& args) +CvsJob& CvsJob::operator<<(const TQStringList& args) { *d->childproc << args; return *this; } -QString CvsJob::cvsCommand() const +TQString CvsJob::cvsCommand() const { - QString command; + TQString command; - const QValueList& args(d->childproc->args()); - for (QValueList::const_iterator it = args.begin(), itEnd = args.end(); + const TQValueList& args(d->childproc->args()); + for (TQValueList::const_iterator it = args.begin(), itEnd = args.end(); it != itEnd; ++it) { if (!command.isEmpty()) command += ' '; - command += QFile::decodeName(*it); + command += TQFile::decodeName(*it); } return command; } -QStringList CvsJob::output() const +TQStringList CvsJob::output() const { return d->outputLines; } @@ -176,12 +176,12 @@ bool CvsJob::execute() if( !d->directory.isEmpty() ) d->childproc->setWorkingDirectory(d->directory); - connect(d->childproc, SIGNAL(processExited(KProcess*)), - SLOT(slotProcessExited())); - connect(d->childproc, SIGNAL(receivedStdout(KProcess*, char*, int)), - SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(d->childproc, SIGNAL(receivedStderr(KProcess*, char*, int)), - SLOT(slotReceivedStderr(KProcess*, char*, int)) ); + connect(d->childproc, TQT_SIGNAL(processExited(KProcess*)), + TQT_SLOT(slotProcessExited())); + connect(d->childproc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); + connect(d->childproc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)) ); kdDebug(8051) << "Execute cvs command: " << cvsCommand() << endl; @@ -212,10 +212,10 @@ void CvsJob::slotReceivedStdout(KProcess* proc, char* buffer, int buflen) { Q_UNUSED(proc); - QString output = QString::fromLocal8Bit(buffer, buflen); + TQString output = TQString::fromLocal8Bit(buffer, buflen); // accumulate output - d->outputLines += QStringList::split("\n", output); + d->outputLines += TQStringList::split("\n", output); emit receivedStdout(output); } @@ -225,10 +225,10 @@ void CvsJob::slotReceivedStderr(KProcess* proc, char* buffer, int buflen) { Q_UNUSED(proc); - QString output = QString::fromLocal8Bit(buffer, buflen); + TQString output = TQString::fromLocal8Bit(buffer, buflen); // accumulate output - d->outputLines += QStringList::split("\n", output); + d->outputLines += TQStringList::split("\n", output); emit receivedStderr(output); } diff --git a/cervisia/cvsservice/cvsjob.h b/cervisia/cvsservice/cvsjob.h index 85d9b1fd..88aaa9fb 100644 --- a/cervisia/cvsservice/cvsjob.h +++ b/cervisia/cvsservice/cvsjob.h @@ -21,33 +21,33 @@ #ifndef CVSJOB_H #define CVSJOB_H -#include -#include -#include +#include +#include +#include #include class KProcess; -class KDE_EXPORT CvsJob : public QObject, public DCOPObject +class KDE_EXPORT CvsJob : public TQObject, public DCOPObject { Q_OBJECT K_DCOP public: explicit CvsJob(unsigned jobNum); - explicit CvsJob(const QString& objId); + explicit CvsJob(const TQString& objId); virtual ~CvsJob(); void clearCvsCommand(); - void setRSH(const QString& rsh); - void setServer(const QString& server); - void setDirectory(const QString& directory); + void setRSH(const TQString& rsh); + void setServer(const TQString& server); + void setDirectory(const TQString& directory); - CvsJob& operator<<(const QString& arg); + CvsJob& operator<<(const TQString& arg); CvsJob& operator<<(const char* arg); - CvsJob& operator<<(const QCString& arg); - CvsJob& operator<<(const QStringList& args); + CvsJob& operator<<(const TQCString& arg); + CvsJob& operator<<(const TQStringList& args); k_dcop: bool execute(); @@ -60,14 +60,14 @@ k_dcop: * * @return The current cvs command. Can be null if not set. */ - QString cvsCommand() const; + TQString cvsCommand() const; - QStringList output() const; + TQStringList output() const; k_dcop_signals: void jobExited(bool normalExit, int status); - void receivedStdout(const QString& buffer); - void receivedStderr(const QString& buffer); + void receivedStdout(const TQString& buffer); + void receivedStderr(const TQString& buffer); private slots: void slotProcessExited(); diff --git a/cervisia/cvsservice/cvsloginjob.cpp b/cervisia/cvsservice/cvsloginjob.cpp index 5ffe0d17..ad6f9176 100644 --- a/cervisia/cvsservice/cvsloginjob.cpp +++ b/cervisia/cvsservice/cvsloginjob.cpp @@ -36,7 +36,7 @@ CvsLoginJob::CvsLoginJob(unsigned jobNum) : DCOPObject() , m_Proc(0) { - QString objId("CvsLoginJob" + QString::number(jobNum)); + TQString objId("CvsLoginJob" + TQString::number(jobNum)); setObjId(objId.local8Bit()); m_Proc = new PtyProcess; @@ -49,13 +49,13 @@ CvsLoginJob::~CvsLoginJob() } -void CvsLoginJob::setServer(const QString& server) +void CvsLoginJob::setServer(const TQString& server) { m_Server = server; } -void CvsLoginJob::setCvsClient(const QCString& cvsClient) +void CvsLoginJob::setCvsClient(const TQCString& cvsClient) { m_CvsClient = cvsClient; @@ -64,7 +64,7 @@ void CvsLoginJob::setCvsClient(const QCString& cvsClient) } -void CvsLoginJob::setRepository(const QCString& repository) +void CvsLoginJob::setRepository(const TQCString& repository) { m_Arguments += "-d"; m_Arguments += repository; @@ -74,7 +74,7 @@ void CvsLoginJob::setRepository(const QCString& repository) bool CvsLoginJob::execute() { - static QCString repository; + static TQCString repository; int res = m_Proc->exec(m_CvsClient, m_Arguments); if( res < 0 ) @@ -86,7 +86,7 @@ bool CvsLoginJob::execute() bool result = false; while( true ) { - QCString line = m_Proc->readLine(); + TQCString line = m_Proc->readLine(); if( line.isNull() ) { return result; @@ -113,7 +113,7 @@ bool CvsLoginJob::execute() // TODO: We really should display the repository name. Unfortunately // the dialog doesn't show part of the repository name, because // it's too long. :-( - QCString password; + TQCString password; int res = KPasswordDialog::getPassword(password, i18n("Please type " "in your password for the repository below.")); if( res == KPasswordDialog::Accepted ) @@ -150,7 +150,7 @@ bool CvsLoginJob::execute() } -QStringList CvsLoginJob::output() +TQStringList CvsLoginJob::output() { return m_output; } diff --git a/cervisia/cvsservice/cvsloginjob.h b/cervisia/cvsservice/cvsloginjob.h index 7aae928f..71291175 100644 --- a/cervisia/cvsservice/cvsloginjob.h +++ b/cervisia/cvsservice/cvsloginjob.h @@ -21,8 +21,8 @@ #ifndef CVSLOGINJOB_H #define CVSLOGINJOB_H -#include -#include +#include +#include #include #include @@ -36,22 +36,22 @@ public: explicit CvsLoginJob(unsigned jobNum); virtual ~CvsLoginJob(); - void setServer(const QString& server); + void setServer(const TQString& server); - void setCvsClient(const QCString& cvsClient); - void setRepository(const QCString& repository); + void setCvsClient(const TQCString& cvsClient); + void setRepository(const TQCString& repository); k_dcop: bool execute(); - QStringList output(); + TQStringList output(); private: PtyProcess* m_Proc; - QString m_Server; - QString m_Rsh; - QCString m_CvsClient; + TQString m_Server; + TQString m_Rsh; + TQCString m_CvsClient; QCStringList m_Arguments; - QStringList m_output; + TQStringList m_output; }; diff --git a/cervisia/cvsservice/cvsservice.cpp b/cervisia/cvsservice/cvsservice.cpp index 4a4c830b..aa64bb4b 100644 --- a/cervisia/cvsservice/cvsservice.cpp +++ b/cervisia/cvsservice/cvsservice.cpp @@ -20,8 +20,8 @@ #include "cvsservice.h" -#include -#include +#include +#include #include #include @@ -54,11 +54,11 @@ struct CvsService::Private CvsJob* singleCvsJob; // non-concurrent cvs job, like update or commit DCOPRef singleJobRef; // DCOP reference to non-concurrent cvs job - QIntDict cvsJobs; // concurrent cvs jobs, like diff or annotate - QIntDict loginJobs; + TQIntDict cvsJobs; // concurrent cvs jobs, like diff or annotate + TQIntDict loginJobs; unsigned lastJobId; - QCString appId; // cache the DCOP clients app id + TQCString appId; // cache the DCOP clients app id Repository* repository; @@ -111,7 +111,7 @@ CvsService::~CvsService() } -DCOPRef CvsService::add(const QStringList& files, bool isBinary) +DCOPRef CvsService::add(const TQStringList& files, bool isBinary) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -131,7 +131,7 @@ DCOPRef CvsService::add(const QStringList& files, bool isBinary) } -DCOPRef CvsService::addWatch(const QStringList& files, int events) +DCOPRef CvsService::addWatch(const TQStringList& files, int events) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -157,7 +157,7 @@ DCOPRef CvsService::addWatch(const QStringList& files, int events) } -DCOPRef CvsService::annotate(const QString& fileName, const QString& revision) +DCOPRef CvsService::annotate(const TQString& fileName, const TQString& revision) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -167,8 +167,8 @@ DCOPRef CvsService::annotate(const QString& fileName, const QString& revision) // assemble the command line // (cvs log [FILE] && cvs annotate [-r rev] [FILE]) - QString quotedName = KProcess::quote(fileName); - QString cvsClient = d->repository->cvsClient(); + TQString quotedName = KProcess::quote(fileName); + TQString cvsClient = d->repository->cvsClient(); *job << "(" << cvsClient << "log" << quotedName << "&&" << cvsClient << "annotate"; @@ -186,8 +186,8 @@ DCOPRef CvsService::annotate(const QString& fileName, const QString& revision) } -DCOPRef CvsService::checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, +DCOPRef CvsService::checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, bool pruneDirs) { if( d->hasRunningJob() ) @@ -216,9 +216,9 @@ DCOPRef CvsService::checkout(const QString& workingDir, const QString& repositor } -DCOPRef CvsService::checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, - bool pruneDirs, const QString& alias, bool exportOnly) +DCOPRef CvsService::checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, + bool pruneDirs, const TQString& alias, bool exportOnly) { if( d->hasRunningJob() ) return DCOPRef(); @@ -251,9 +251,9 @@ DCOPRef CvsService::checkout(const QString& workingDir, const QString& repositor return d->setupNonConcurrentJob(&repo); } -DCOPRef CvsService::checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, - bool pruneDirs, const QString& alias, bool exportOnly, +DCOPRef CvsService::checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, + bool pruneDirs, const TQString& alias, bool exportOnly, bool recursive) { if( d->hasRunningJob() ) @@ -290,7 +290,7 @@ DCOPRef CvsService::checkout(const QString& workingDir, const QString& repositor return d->setupNonConcurrentJob(&repo); } -DCOPRef CvsService::commit(const QStringList& files, const QString& commitMessage, +DCOPRef CvsService::commit(const TQStringList& files, const TQString& commitMessage, bool recursive) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) @@ -312,7 +312,7 @@ DCOPRef CvsService::commit(const QStringList& files, const QString& commitMessag } -DCOPRef CvsService::createRepository(const QString& repository) +DCOPRef CvsService::createRepository(const TQString& repository) { if( d->hasRunningJob() ) return DCOPRef(); @@ -330,7 +330,7 @@ DCOPRef CvsService::createRepository(const QString& repository) } -DCOPRef CvsService::createTag(const QStringList& files, const QString& tag, +DCOPRef CvsService::createTag(const TQStringList& files, const TQString& tag, bool branch, bool force) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) @@ -355,7 +355,7 @@ DCOPRef CvsService::createTag(const QStringList& files, const QString& tag, } -DCOPRef CvsService::deleteTag(const QStringList& files, const QString& tag, +DCOPRef CvsService::deleteTag(const TQStringList& files, const TQString& tag, bool branch, bool force) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) @@ -380,8 +380,8 @@ DCOPRef CvsService::deleteTag(const QStringList& files, const QString& tag, } -DCOPRef CvsService::downloadCvsIgnoreFile(const QString& repository, - const QString& outputFile) +DCOPRef CvsService::downloadCvsIgnoreFile(const TQString& repository, + const TQString& outputFile) { Repository repo(repository); @@ -399,9 +399,9 @@ DCOPRef CvsService::downloadCvsIgnoreFile(const QString& repository, } -DCOPRef CvsService::downloadRevision(const QString& fileName, - const QString& revision, - const QString& outputFile) +DCOPRef CvsService::downloadRevision(const TQString& fileName, + const TQString& revision, + const TQString& outputFile) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -423,11 +423,11 @@ DCOPRef CvsService::downloadRevision(const QString& fileName, } -DCOPRef CvsService::downloadRevision(const QString& fileName, - const QString& revA, - const QString& outputFileA, - const QString& revB, - const QString& outputFileB) +DCOPRef CvsService::downloadRevision(const TQString& fileName, + const TQString& revA, + const TQString& outputFileA, + const TQString& revB, + const TQString& outputFileB) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -450,19 +450,19 @@ DCOPRef CvsService::downloadRevision(const QString& fileName, } -DCOPRef CvsService::diff(const QString& fileName, const QString& revA, - const QString& revB, const QString& diffOptions, +DCOPRef CvsService::diff(const TQString& fileName, const TQString& revA, + const TQString& revB, const TQString& diffOptions, unsigned contextLines) { // cvs diff [DIFFOPTIONS] -U CONTEXTLINES [-r REVA] {-r REVB] [FILE] - QString format = "-U" + QString::number(contextLines); + TQString format = "-U" + TQString::number(contextLines); return diff(fileName, revA, revB, diffOptions, format); } -DCOPRef CvsService::diff(const QString& fileName, const QString& revA, - const QString& revB, const QString& diffOptions, - const QString& format) +DCOPRef CvsService::diff(const TQString& fileName, const TQString& revA, + const TQString& revB, const TQString& diffOptions, + const TQString& format) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -488,7 +488,7 @@ DCOPRef CvsService::diff(const QString& fileName, const QString& revA, } -DCOPRef CvsService::edit(const QStringList& files) +DCOPRef CvsService::edit(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -504,7 +504,7 @@ DCOPRef CvsService::edit(const QStringList& files) } -DCOPRef CvsService::editors(const QStringList& files) +DCOPRef CvsService::editors(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -537,10 +537,10 @@ DCOPRef CvsService::history() } -DCOPRef CvsService::import(const QString& workingDir, const QString& repository, - const QString& module, const QString& ignoreList, - const QString& comment, const QString& vendorTag, - const QString& releaseTag, bool importAsBinary) +DCOPRef CvsService::import(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& ignoreList, + const TQString& comment, const TQString& vendorTag, + const TQString& releaseTag, bool importAsBinary) { if( d->hasRunningJob() ) return DCOPRef(); @@ -558,11 +558,11 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository, if( importAsBinary ) *d->singleCvsJob << "-kb"; - const QString ignore = ignoreList.stripWhiteSpace(); + const TQString ignore = ignoreList.stripWhiteSpace(); if( !ignore.isEmpty() ) *d->singleCvsJob << "-I" << KProcess::quote(ignore); - QString logMessage = comment.stripWhiteSpace(); + TQString logMessage = comment.stripWhiteSpace(); logMessage.prepend("\""); logMessage.append("\""); *d->singleCvsJob << "-m" << logMessage; @@ -573,10 +573,10 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository, } -DCOPRef CvsService::import(const QString& workingDir, const QString& repository, - const QString& module, const QString& ignoreList, - const QString& comment, const QString& vendorTag, - const QString& releaseTag, bool importAsBinary, +DCOPRef CvsService::import(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& ignoreList, + const TQString& comment, const TQString& vendorTag, + const TQString& releaseTag, bool importAsBinary, bool useModificationTime) { if( d->hasRunningJob() ) @@ -598,11 +598,11 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository, if( useModificationTime ) *d->singleCvsJob << "-d"; - const QString ignore = ignoreList.stripWhiteSpace(); + const TQString ignore = ignoreList.stripWhiteSpace(); if( !ignore.isEmpty() ) *d->singleCvsJob << "-I" << KProcess::quote(ignore); - QString logMessage = comment.stripWhiteSpace(); + TQString logMessage = comment.stripWhiteSpace(); logMessage.prepend("\""); logMessage.append("\""); *d->singleCvsJob << "-m" << logMessage; @@ -613,7 +613,7 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository, } -DCOPRef CvsService::lock(const QStringList& files) +DCOPRef CvsService::lock(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -629,7 +629,7 @@ DCOPRef CvsService::lock(const QStringList& files) } -DCOPRef CvsService::log(const QString& fileName) +DCOPRef CvsService::log(const TQString& fileName) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -646,7 +646,7 @@ DCOPRef CvsService::log(const QString& fileName) } -DCOPRef CvsService::login(const QString& repository) +DCOPRef CvsService::login(const TQString& repository) { if( repository.isEmpty() ) return DCOPRef(); @@ -672,7 +672,7 @@ DCOPRef CvsService::login(const QString& repository) } -DCOPRef CvsService::logout(const QString& repository) +DCOPRef CvsService::logout(const TQString& repository) { if( repository.isEmpty() ) return DCOPRef(); @@ -704,7 +704,7 @@ DCOPRef CvsService::makePatch() } -DCOPRef CvsService::makePatch(const QString& diffOptions, const QString& format) +DCOPRef CvsService::makePatch(const TQString& diffOptions, const TQString& format) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -722,7 +722,7 @@ DCOPRef CvsService::makePatch(const QString& diffOptions, const QString& format) } -DCOPRef CvsService::moduleList(const QString& repository) +DCOPRef CvsService::moduleList(const TQString& repository) { Repository repo(repository); @@ -745,7 +745,7 @@ DCOPRef CvsService::moduleList(const QString& repository) } -DCOPRef CvsService::remove(const QStringList& files, bool recursive) +DCOPRef CvsService::remove(const TQStringList& files, bool recursive) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -765,7 +765,7 @@ DCOPRef CvsService::remove(const QStringList& files, bool recursive) } -DCOPRef CvsService::removeWatch(const QStringList& files, int events) +DCOPRef CvsService::removeWatch(const TQStringList& files, int events) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -791,7 +791,7 @@ DCOPRef CvsService::removeWatch(const QStringList& files, int events) } -DCOPRef CvsService::rlog(const QString& repository, const QString& module, +DCOPRef CvsService::rlog(const TQString& repository, const TQString& module, bool recursive) { Repository repo(repository); @@ -819,7 +819,7 @@ DCOPRef CvsService::rlog(const QString& repository, const QString& module, } -DCOPRef CvsService::simulateUpdate(const QStringList& files, bool recursive, +DCOPRef CvsService::simulateUpdate(const TQStringList& files, bool recursive, bool createDirs, bool pruneDirs) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) @@ -846,7 +846,7 @@ DCOPRef CvsService::simulateUpdate(const QStringList& files, bool recursive, } -DCOPRef CvsService::status(const QStringList& files, bool recursive, bool tagInfo) +DCOPRef CvsService::status(const TQStringList& files, bool recursive, bool tagInfo) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -871,7 +871,7 @@ DCOPRef CvsService::status(const QStringList& files, bool recursive, bool tagInf } -DCOPRef CvsService::unedit(const QStringList& files) +DCOPRef CvsService::unedit(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -888,7 +888,7 @@ DCOPRef CvsService::unedit(const QStringList& files) } -DCOPRef CvsService::unlock(const QStringList& files) +DCOPRef CvsService::unlock(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -904,8 +904,8 @@ DCOPRef CvsService::unlock(const QStringList& files) } -DCOPRef CvsService::update(const QStringList& files, bool recursive, - bool createDirs, bool pruneDirs, const QString& extraOpt) +DCOPRef CvsService::update(const TQStringList& files, bool recursive, + bool createDirs, bool pruneDirs, const TQString& extraOpt) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -932,7 +932,7 @@ DCOPRef CvsService::update(const QStringList& files, bool recursive, } -DCOPRef CvsService::watchers(const QStringList& files) +DCOPRef CvsService::watchers(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); diff --git a/cervisia/cvsservice/cvsservice.h b/cervisia/cvsservice/cvsservice.h index a472ca09..1cabfe99 100644 --- a/cervisia/cvsservice/cvsservice.h +++ b/cervisia/cvsservice/cvsservice.h @@ -21,7 +21,7 @@ #ifndef CVSSERVICE_H #define CVSSERVICE_H -#include +#include #include #include @@ -47,11 +47,11 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef add(const QStringList& files, bool isBinary); + DCOPRef add(const TQStringList& files, bool isBinary); /** */ - DCOPRef addWatch(const QStringList& files, int events); + DCOPRef addWatch(const TQStringList& files, int events); /** * Shows information on who last modified each line of a file and when. @@ -62,7 +62,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef annotate(const QString& fileName, const QString& revision); + DCOPRef annotate(const TQString& fileName, const TQString& revision); /** * Checks out a module from the repository into a working copy. @@ -76,8 +76,8 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, bool pruneDirs); + DCOPRef checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, bool pruneDirs); /** * Checks out a module from the repository into a working copy. @@ -94,9 +94,9 @@ k_dcop: * null reference. */ //### KDE4: merge with above checkout() method - DCOPRef checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, bool pruneDirs, - const QString& alias, bool exportOnly); + DCOPRef checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, bool pruneDirs, + const TQString& alias, bool exportOnly); /** * Checks out a module from the repository into a working copy. @@ -113,9 +113,9 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, bool pruneDirs, - const QString& alias, bool exportOnly, bool recursive); + DCOPRef checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, bool pruneDirs, + const TQString& alias, bool exportOnly, bool recursive); /** * @@ -127,7 +127,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef commit(const QStringList& files, const QString& commitMessage, + DCOPRef commit(const TQStringList& files, const TQString& commitMessage, bool recursive); /** @@ -135,33 +135,33 @@ k_dcop: * * @param repository */ - DCOPRef createRepository(const QString& repository); + DCOPRef createRepository(const TQString& repository); /** */ - DCOPRef createTag(const QStringList& files, const QString& tag, + DCOPRef createTag(const TQStringList& files, const TQString& tag, bool branch, bool force); /** */ - DCOPRef deleteTag(const QStringList& files, const QString& tag, + DCOPRef deleteTag(const TQStringList& files, const TQString& tag, bool branch, bool force); /** */ - DCOPRef downloadCvsIgnoreFile(const QString& repository, - const QString& outputFile); + DCOPRef downloadCvsIgnoreFile(const TQString& repository, + const TQString& outputFile); /** */ - DCOPRef downloadRevision(const QString& fileName, const QString& revision, - const QString& outputFile); + DCOPRef downloadRevision(const TQString& fileName, const TQString& revision, + const TQString& outputFile); /** */ - DCOPRef downloadRevision(const QString& fileName, const QString& revA, - const QString& outputFileA, const QString& revB, - const QString& outputFileB); + DCOPRef downloadRevision(const TQString& fileName, const TQString& revA, + const TQString& outputFileA, const TQString& revB, + const TQString& outputFileB); /** * @@ -174,8 +174,8 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef diff(const QString& fileName, const QString& revA, - const QString& revB, const QString& diffOptions, + DCOPRef diff(const TQString& fileName, const TQString& revA, + const TQString& revB, const TQString& diffOptions, unsigned contextLines); /** @@ -189,19 +189,19 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef diff(const QString& fileName, const QString& revA, - const QString& revB, const QString& diffOptions, - const QString& format); + DCOPRef diff(const TQString& fileName, const TQString& revA, + const TQString& revB, const TQString& diffOptions, + const TQString& format); /** * @param files */ - DCOPRef edit(const QStringList& files); + DCOPRef edit(const TQStringList& files); /** * @param files */ - DCOPRef editors(const QStringList& files); + DCOPRef editors(const TQStringList& files); /** * Shows a history of activity (like checkouts, commits, etc) in the @@ -216,26 +216,26 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef import(const QString& workingDir, const QString& repository, - const QString& module, const QString& ignoreList, - const QString& comment, const QString& vendorTag, - const QString& releaseTag, bool importAsBinary); + DCOPRef import(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& ignoreList, + const TQString& comment, const TQString& vendorTag, + const TQString& releaseTag, bool importAsBinary); /** * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ //### KDE4: merge with above import() method - DCOPRef import(const QString& workingDir, const QString& repository, - const QString& module, const QString& ignoreList, - const QString& comment, const QString& vendorTag, - const QString& releaseTag, bool importAsBinary, + DCOPRef import(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& ignoreList, + const TQString& comment, const TQString& vendorTag, + const TQString& releaseTag, bool importAsBinary, bool useModificationTime); /** * @param files */ - DCOPRef lock(const QStringList& files); + DCOPRef lock(const TQStringList& files); /** * Shows log messages for a file. @@ -245,7 +245,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef log(const QString& fileName); + DCOPRef log(const TQString& fileName); /** * @param repository @@ -253,7 +253,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef login(const QString& repository); + DCOPRef login(const TQString& repository); /** * @param repository @@ -261,7 +261,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef logout(const QString& repository); + DCOPRef logout(const TQString& repository); /** */ @@ -270,7 +270,7 @@ k_dcop: /** */ //### KDE4: merge with above makePatch() method - DCOPRef makePatch(const QString& diffOptions, const QString& format); + DCOPRef makePatch(const TQString& diffOptions, const TQString& format); /** * @param repository @@ -278,7 +278,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef moduleList(const QString& repository); + DCOPRef moduleList(const TQString& repository); /** * Deletes files from the local working copy and schedules them to be @@ -291,15 +291,15 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef remove(const QStringList& files, bool recursive); + DCOPRef remove(const TQStringList& files, bool recursive); /** */ - DCOPRef removeWatch(const QStringList& files, int events); + DCOPRef removeWatch(const TQStringList& files, int events); /** */ - DCOPRef rlog(const QString& repository, const QString& module, + DCOPRef rlog(const TQString& repository, const TQString& module, bool recursive); /** @@ -314,7 +314,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef simulateUpdate(const QStringList& files, bool recursive, + DCOPRef simulateUpdate(const TQStringList& files, bool recursive, bool createDirs, bool pruneDirs); /** @@ -327,17 +327,17 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef status(const QStringList& files, bool recursive, bool tagInfo); + DCOPRef status(const TQStringList& files, bool recursive, bool tagInfo); /** * @param files */ - DCOPRef unedit(const QStringList& files); + DCOPRef unedit(const TQStringList& files); /** * @param files */ - DCOPRef unlock(const QStringList& files); + DCOPRef unlock(const TQStringList& files); /** * Merges changes from the repository into the files of the @@ -353,13 +353,13 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef update(const QStringList& files, bool recursive, bool createDirs, - bool pruneDirs, const QString& extraOpt); + DCOPRef update(const TQStringList& files, bool recursive, bool createDirs, + bool pruneDirs, const TQString& extraOpt); /** * @param files */ - DCOPRef watchers(const QStringList& files); + DCOPRef watchers(const TQStringList& files); /** * Quits the DCOP service. diff --git a/cervisia/cvsservice/cvsserviceutils.cpp b/cervisia/cvsservice/cvsserviceutils.cpp index de2f38a7..33585f49 100644 --- a/cervisia/cvsservice/cvsserviceutils.cpp +++ b/cervisia/cvsservice/cvsserviceutils.cpp @@ -20,17 +20,17 @@ #include "cvsserviceutils.h" -#include -#include +#include +#include #include -QString CvsServiceUtils::joinFileList(const QStringList& files) +TQString CvsServiceUtils::joinFileList(const TQStringList& files) { - QString result; + TQString result; - QStringList::ConstIterator it = files.begin(); - QStringList::ConstIterator end = files.end(); + TQStringList::ConstIterator it = files.begin(); + TQStringList::ConstIterator end = files.end(); for( ; it != end; ++it ) { diff --git a/cervisia/cvsservice/cvsserviceutils.h b/cervisia/cvsservice/cvsserviceutils.h index 26f29b5b..98feceb8 100644 --- a/cervisia/cvsservice/cvsserviceutils.h +++ b/cervisia/cvsservice/cvsserviceutils.h @@ -29,10 +29,10 @@ namespace CvsServiceUtils { /** - * Joins a list of file names to one QString and quotes + * Joins a list of file names to one TQString and quotes * each name properly for usage with KProcess. */ -QString joinFileList(const QStringList& files); +TQString joinFileList(const TQStringList& files); } diff --git a/cervisia/cvsservice/repository.cpp b/cervisia/cvsservice/repository.cpp index 1a911140..d5f06ef4 100644 --- a/cervisia/cvsservice/repository.cpp +++ b/cervisia/cvsservice/repository.cpp @@ -20,9 +20,9 @@ #include "repository.h" -#include -#include -#include +#include +#include +#include #include #include @@ -36,14 +36,14 @@ struct Repository::Private { Private() : compressionLevel(0) {} - QString configFileName; + TQString configFileName; - QString workingCopy; - QString location; + TQString workingCopy; + TQString location; - QString client; - QString rsh; - QString server; + TQString client; + TQString rsh; + TQString server; int compressionLevel; bool retrieveCvsignoreFile; @@ -54,7 +54,7 @@ struct Repository::Private Repository::Repository() - : QObject() + : TQObject() , DCOPObject("CvsRepository") , d(new Private) { @@ -64,14 +64,14 @@ Repository::Repository() // so we watch it for changes d->configFileName = locate("config", "cvsservicerc"); KDirWatch* fileWatcher = new KDirWatch(this); - connect(fileWatcher, SIGNAL(dirty(const QString&)), - this, SLOT(slotConfigDirty(const QString&))); + connect(fileWatcher, TQT_SIGNAL(dirty(const TQString&)), + this, TQT_SLOT(slotConfigDirty(const TQString&))); fileWatcher->addFile(d->configFileName); } -Repository::Repository(const QString& repository) - : QObject() +Repository::Repository(const TQString& repository) + : TQObject() , DCOPObject() , d(new Private) { @@ -83,8 +83,8 @@ Repository::Repository(const QString& repository) // so we watch it for changes d->configFileName = locate("config", "cvsservicerc"); KDirWatch* fileWatcher = new KDirWatch(this); - connect(fileWatcher, SIGNAL(dirty(const QString&)), - this, SLOT(slotConfigDirty(const QString&))); + connect(fileWatcher, TQT_SIGNAL(dirty(const TQString&)), + this, TQT_SLOT(slotConfigDirty(const TQString&))); fileWatcher->addFile(d->configFileName); } @@ -95,9 +95,9 @@ Repository::~Repository() } -QString Repository::cvsClient() const +TQString Repository::cvsClient() const { - QString client(d->client); + TQString client(d->client); // suppress reading of the '.cvsrc' file client += " -f"; @@ -105,52 +105,52 @@ QString Repository::cvsClient() const // we don't need the command line option if there is no compression level set if( d->compressionLevel > 0 ) { - client += " -z" + QString::number(d->compressionLevel) + " "; + client += " -z" + TQString::number(d->compressionLevel) + " "; } return client; } -QString Repository::clientOnly() const +TQString Repository::clientOnly() const { return d->client; } -QString Repository::rsh() const +TQString Repository::rsh() const { return d->rsh; } -QString Repository::server() const +TQString Repository::server() const { return d->server; } -bool Repository::setWorkingCopy(const QString& dirName) +bool Repository::setWorkingCopy(const TQString& dirName) { - const QFileInfo fi(dirName); - const QString path = fi.absFilePath(); + const TQFileInfo fi(dirName); + const TQString path = fi.absFilePath(); // is this really a cvs-controlled directory? - const QFileInfo cvsDirInfo(path + "/CVS"); + const TQFileInfo cvsDirInfo(path + "/CVS"); if( !cvsDirInfo.exists() || !cvsDirInfo.isDir() || - !QFile::exists( cvsDirInfo.filePath() + "/Entries" ) || - !QFile::exists( cvsDirInfo.filePath() + "/Repository" ) || - !QFile::exists( cvsDirInfo.filePath() + "/Root" ) ) + !TQFile::exists( cvsDirInfo.filePath() + "/Entries" ) || + !TQFile::exists( cvsDirInfo.filePath() + "/Repository" ) || + !TQFile::exists( cvsDirInfo.filePath() + "/Root" ) ) return false; d->workingCopy = path; - d->location = QString::null; + d->location = TQString::null; // determine path to the repository - QFile rootFile(path + "/CVS/Root"); + TQFile rootFile(path + "/CVS/Root"); if( rootFile.open(IO_ReadOnly) ) { - QTextStream stream(&rootFile); + TQTextStream stream(&rootFile); d->location = stream.readLine(); } rootFile.close(); @@ -163,20 +163,20 @@ bool Repository::setWorkingCopy(const QString& dirName) ssh.addSshIdentities(); } - QDir::setCurrent(path); + TQDir::setCurrent(path); d->readConfig(); return true; } -QString Repository::workingCopy() const +TQString Repository::workingCopy() const { return d->workingCopy; } -QString Repository::location() const +TQString Repository::location() const { return d->location; } @@ -188,7 +188,7 @@ bool Repository::retrieveCvsignoreFile() const } -void Repository::slotConfigDirty(const QString& fileName) +void Repository::slotConfigDirty(const TQString& fileName) { if( fileName == d->configFileName ) { @@ -223,7 +223,7 @@ void Repository::Private::readConfig() // // In order to be able to read this group, we then have to manually add // the port number to it. - QString repositoryGroup = QString::fromLatin1("Repository-") + location; + TQString repositoryGroup = TQString::fromLatin1("Repository-") + location; if( !config->hasGroup(repositoryGroup) ) { // find the position of the first path separator diff --git a/cervisia/cvsservice/repository.h b/cervisia/cvsservice/repository.h index e77754bb..0c6ed8a9 100644 --- a/cervisia/cvsservice/repository.h +++ b/cervisia/cvsservice/repository.h @@ -21,7 +21,7 @@ #ifndef REPOSITORY_H #define REPOSITORY_H -#include +#include #include class QString; @@ -31,14 +31,14 @@ class QString; * Represents a local or remote cvs repository with * its repository-specific configuration data. */ -class KDE_EXPORT Repository : public QObject, public DCOPObject +class KDE_EXPORT Repository : public TQObject, public DCOPObject { K_DCOP Q_OBJECT public: Repository(); - explicit Repository(const QString& repository); + explicit Repository(const TQString& repository); ~Repository(); /** @@ -47,11 +47,11 @@ public: * * @return A cvs command (including path). */ - QString cvsClient() const; + TQString cvsClient() const; /** */ - QString clientOnly() const; + TQString clientOnly() const; /** * Remote shell command line client which should be used to @@ -60,7 +60,7 @@ public: * * @return The remote shell client. Can be null if not set. */ - QString rsh() const; + TQString rsh() const; /** * Program to start on the server side when accessing a remote @@ -68,7 +68,7 @@ public: * * @return The server program. Can be null if not set. */ - QString server() const; + TQString server() const; k_dcop: /** @@ -76,14 +76,14 @@ k_dcop: * * @param dirName path to the local working copy directory. */ - bool setWorkingCopy(const QString& dirName); + bool setWorkingCopy(const TQString& dirName); /** * Path to the current working copy. * * @return The working copy directory. Can be null if not set. */ - QString workingCopy() const; + TQString workingCopy() const; /** * Path and method to access the current cvs repository. @@ -91,14 +91,14 @@ k_dcop: * * @return The path and method to access the cvs repository. */ - QString location() const; + TQString location() const; /** */ bool retrieveCvsignoreFile() const; private slots: - void slotConfigDirty(const QString& fileName); + void slotConfigDirty(const TQString& fileName); private: struct Private; diff --git a/cervisia/cvsservice/sshagent.cpp b/cervisia/cvsservice/sshagent.cpp index fe50dce8..4f8abd25 100644 --- a/cervisia/cvsservice/sshagent.cpp +++ b/cervisia/cvsservice/sshagent.cpp @@ -20,7 +20,7 @@ #include "sshagent.h" -#include +#include #include #include #include @@ -32,12 +32,12 @@ // initialize static member variables bool SshAgent::m_isRunning = false; bool SshAgent::m_isOurAgent = false; -QString SshAgent::m_authSock = QString::null; -QString SshAgent::m_pid = QString::null; +TQString SshAgent::m_authSock = TQString::null; +TQString SshAgent::m_pid = TQString::null; -SshAgent::SshAgent(QObject* parent, const char* name) - : QObject(parent, name) +SshAgent::SshAgent(TQObject* parent, const char* name) + : TQObject(parent, name) { } @@ -61,11 +61,11 @@ bool SshAgent::querySshAgent() kdDebug(8051) << "SshAgent::querySshAgent(): ssh-agent already exists" << endl; - m_pid = QString::fromLocal8Bit(pid); + m_pid = TQString::fromLocal8Bit(pid); char* sock = ::getenv("SSH_AUTH_SOCK"); if( sock ) - m_authSock = QString::fromLocal8Bit(sock); + m_authSock = TQString::fromLocal8Bit(sock); m_isOurAgent = false; m_isRunning = true; @@ -99,10 +99,10 @@ bool SshAgent::addSshIdentities() proc << "ssh-add"; - connect(&proc, SIGNAL(receivedStdout(KProcess*, char*, int)), - SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(&proc, SIGNAL(receivedStderr(KProcess*, char*, int)), - SLOT(slotReceivedStderr(KProcess*, char*, int))); + connect(&proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); + connect(&proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStderr(KProcess*, char*, int))); proc.start(KProcess::DontCare, KProcess::AllOutput); @@ -137,14 +137,14 @@ void SshAgent::slotProcessExited(KProcess*) { kdDebug(8051) << "SshAgent::slotProcessExited(): ENTER" << endl; - QRegExp cshPidRx("setenv SSH_AGENT_PID (\\d*);"); - QRegExp cshSockRx("setenv SSH_AUTH_SOCK (.*);"); + TQRegExp cshPidRx("setenv SSH_AGENT_PID (\\d*);"); + TQRegExp cshSockRx("setenv SSH_AUTH_SOCK (.*);"); - QRegExp bashPidRx("SSH_AGENT_PID=(\\d*).*"); - QRegExp bashSockRx("SSH_AUTH_SOCK=(.*\\.\\d*);.*"); + TQRegExp bashPidRx("SSH_AGENT_PID=(\\d*).*"); + TQRegExp bashSockRx("SSH_AUTH_SOCK=(.*\\.\\d*);.*"); - QStringList::Iterator it = m_outputLines.begin(); - QStringList::Iterator end = m_outputLines.end(); + TQStringList::Iterator it = m_outputLines.begin(); + TQStringList::Iterator end = m_outputLines.end(); for( ; it != end; ++it ) { if( m_pid.isEmpty() ) @@ -191,8 +191,8 @@ void SshAgent::slotReceivedStdout(KProcess* proc, char* buffer, int buflen) { Q_UNUSED(proc); - QString output = QString::fromLocal8Bit(buffer, buflen); - m_outputLines += QStringList::split("\n", output); + TQString output = TQString::fromLocal8Bit(buffer, buflen); + m_outputLines += TQStringList::split("\n", output); kdDebug(8051) << "SshAgent::slotReceivedStdout(): output = " << output << endl; } @@ -202,8 +202,8 @@ void SshAgent::slotReceivedStderr(KProcess* proc, char* buffer, int buflen) { Q_UNUSED(proc); - QString output = QString::fromLocal8Bit(buffer, buflen); - m_outputLines += QStringList::split("\n", output); + TQString output = TQString::fromLocal8Bit(buffer, buflen); + m_outputLines += TQStringList::split("\n", output); kdDebug(8051) << "SshAgent::slotReceivedStderr(): output = " << output << endl; } @@ -217,12 +217,12 @@ bool SshAgent::startSshAgent() proc << "ssh-agent"; - connect(&proc, SIGNAL(processExited(KProcess*)), - SLOT(slotProcessExited(KProcess*))); - connect(&proc, SIGNAL(receivedStdout(KProcess*, char*, int)), - SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(&proc, SIGNAL(receivedStderr(KProcess*, char*, int)), - SLOT(slotReceivedStderr(KProcess*, char*, int)) ); + connect(&proc, TQT_SIGNAL(processExited(KProcess*)), + TQT_SLOT(slotProcessExited(KProcess*))); + connect(&proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); + connect(&proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)) ); proc.start(KProcess::NotifyOnExit, KProcess::All); diff --git a/cervisia/cvsservice/sshagent.h b/cervisia/cvsservice/sshagent.h index beb0e488..3de23076 100644 --- a/cervisia/cvsservice/sshagent.h +++ b/cervisia/cvsservice/sshagent.h @@ -21,9 +21,9 @@ #ifndef SSHAGENT_H #define SSHAGENT_H -#include -#include -#include +#include +#include +#include class KProcess; @@ -33,7 +33,7 @@ class SshAgent : public QObject Q_OBJECT public: - SshAgent(QObject* parent = 0, const char* name = 0); + SshAgent(TQObject* parent = 0, const char* name = 0); ~SshAgent(); bool querySshAgent(); @@ -41,8 +41,8 @@ public: void killSshAgent(); bool isRunning() const { return m_isRunning; } - QString pid() const { return m_pid; } - QString authSock() const { return m_authSock; } + TQString pid() const { return m_pid; } + TQString authSock() const { return m_authSock; } private slots: void slotProcessExited(KProcess*); @@ -52,12 +52,12 @@ private slots: private: bool startSshAgent(); - QStringList m_outputLines; + TQStringList m_outputLines; static bool m_isRunning; static bool m_isOurAgent; - static QString m_authSock; - static QString m_pid; + static TQString m_authSock; + static TQString m_pid; }; diff --git a/cervisia/diffdlg.cpp b/cervisia/diffdlg.cpp index 8dcb5bdf..fadb6582 100644 --- a/cervisia/diffdlg.cpp +++ b/cervisia/diffdlg.cpp @@ -19,14 +19,14 @@ #include "diffdlg.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -41,19 +41,19 @@ #include "diffview.h" -DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool modal) - : KDialogBase(parent, name, modal, QString::null, +DiffDialog::DiffDialog(KConfig& cfg, TQWidget *parent, const char *name, bool modal) + : KDialogBase(parent, name, modal, TQString::null, Close | Help | User1, Close, true, KStdGuiItem::saveAs()) , partConfig(cfg) { items.setAutoDelete(true); markeditem = -1; - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QGridLayout *pairlayout = new QGridLayout(layout); + TQGridLayout *pairlayout = new TQGridLayout(layout); pairlayout->setRowStretch(0, 0); pairlayout->setRowStretch(1, 1); pairlayout->setColStretch(1, 0); @@ -61,10 +61,10 @@ DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool mod pairlayout->setColStretch(0, 10); pairlayout->setColStretch(2, 10); - revlabel1 = new QLabel(mainWidget); + revlabel1 = new TQLabel(mainWidget); pairlayout->addWidget(revlabel1, 0, 0); - revlabel2 = new QLabel(mainWidget); + revlabel2 = new TQLabel(mainWidget); pairlayout->addWidget(revlabel2, 0, 2); diff1 = new DiffView(cfg, true, false, mainWidget); @@ -79,29 +79,29 @@ DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool mod diff1->setPartner(diff2); diff2->setPartner(diff1); - syncbox = new QCheckBox(i18n("Synchronize scroll bars"), mainWidget); + syncbox = new TQCheckBox(i18n("Synchronize scroll bars"), mainWidget); syncbox->setChecked(true); - connect( syncbox, SIGNAL(toggled(bool)), - this, SLOT(toggleSynchronize(bool)) ); + connect( syncbox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(toggleSynchronize(bool)) ); - itemscombo = new QComboBox(mainWidget); - itemscombo->insertItem(QString::null); - connect( itemscombo, SIGNAL(activated(int)), - this, SLOT(comboActivated(int)) ); + itemscombo = new TQComboBox(mainWidget); + itemscombo->insertItem(TQString::null); + connect( itemscombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(comboActivated(int)) ); - nofnlabel = new QLabel(mainWidget); + nofnlabel = new TQLabel(mainWidget); // avoids auto resize when the text is changed nofnlabel->setMinimumWidth(fontMetrics().width(i18n("%1 differences").arg(10000))); - backbutton = new QPushButton(QString::fromLatin1("&<<"), mainWidget); - connect( backbutton, SIGNAL(clicked()), SLOT(backClicked()) ); + backbutton = new TQPushButton(TQString::fromLatin1("&<<"), mainWidget); + connect( backbutton, TQT_SIGNAL(clicked()), TQT_SLOT(backClicked()) ); - forwbutton = new QPushButton(QString::fromLatin1("&>>"), mainWidget); - connect( forwbutton, SIGNAL(clicked()), SLOT(forwClicked()) ); + forwbutton = new TQPushButton(TQString::fromLatin1("&>>"), mainWidget); + connect( forwbutton, TQT_SIGNAL(clicked()), TQT_SLOT(forwClicked()) ); - connect( this, SIGNAL(user1Clicked()), SLOT(saveAsClicked()) ); + connect( this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(saveAsClicked()) ); - QBoxLayout *buttonlayout = new QHBoxLayout(layout); + TQBoxLayout *buttonlayout = new TQHBoxLayout(layout); buttonlayout->addWidget(syncbox, 0); buttonlayout->addStretch(4); buttonlayout->addWidget(itemscombo); @@ -115,7 +115,7 @@ DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool mod setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "DiffDialog"); + TQSize size = configDialogSize(partConfig, "DiffDialog"); resize(size); KConfigGroupSaver cs(&partConfig, "DiffDialog"); @@ -132,7 +132,7 @@ DiffDialog::~DiffDialog() } -void DiffDialog::keyPressEvent(QKeyEvent *e) +void DiffDialog::keyPressEvent(TQKeyEvent *e) { switch (e->key()) { @@ -171,9 +171,9 @@ void DiffDialog::comboActivated(int index) } -static void interpretRegion(QString line, int *linenoA, int *linenoB) +static void interpretRegion(TQString line, int *linenoA, int *linenoB) { - QRegExp region( "^@@ -([0-9]+),([0-9]+) \\+([0-9]+),([0-9]+) @@.*$" ); + TQRegExp region( "^@@ -([0-9]+),([0-9]+) \\+([0-9]+),([0-9]+) @@.*$" ); if (!region.exactMatch(line)) return; @@ -183,24 +183,24 @@ static void interpretRegion(QString line, int *linenoA, int *linenoB) } -static QString regionAsString(int linenoA, int linecountA, int linenoB, int linecountB) +static TQString regionAsString(int linenoA, int linecountA, int linenoB, int linecountB) { int lineendA = linenoA+linecountA-1; int lineendB = linenoB+linecountB-1; - QString res; + TQString res; if (linecountB == 0) - res = QString("%1,%2d%3").arg(linenoA).arg(lineendA).arg(linenoB-1); + res = TQString("%1,%2d%3").arg(linenoA).arg(lineendA).arg(linenoB-1); else if (linecountA == 0) - res = QString("%1a%2,%3").arg(linenoA-1).arg(linenoB).arg(lineendB); + res = TQString("%1a%2,%3").arg(linenoA-1).arg(linenoB).arg(lineendB); else if (linenoA == lineendA) if (linenoB == lineendB) - res = QString("%1c%2").arg(linenoA).arg(linenoB); + res = TQString("%1c%2").arg(linenoA).arg(linenoB); else - res = QString("%1c%2,%3").arg(linenoA).arg(linenoB).arg(lineendB); + res = TQString("%1c%2,%3").arg(linenoA).arg(linenoB).arg(lineendB); else if (linenoB == lineendB) - res = QString("%1,%2c%3").arg(linenoA).arg(lineendA).arg(linenoB); + res = TQString("%1,%2c%3").arg(linenoA).arg(lineendA).arg(linenoB); else - res = QString("%1,%2c%3,%4").arg(linenoA).arg(lineendA).arg(linenoB).arg(lineendB); + res = TQString("%1,%2c%3,%4").arg(linenoA).arg(lineendA).arg(linenoB).arg(lineendB); return res; @@ -216,10 +216,10 @@ public: }; -bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName, - const QString &revA, const QString &revB) +bool DiffDialog::parseCvsDiff(CvsService_stub* service, const TQString& fileName, + const TQString &revA, const TQString &revB) { - QStringList linesA, linesB; + TQStringList linesA, linesB; int linenoA, linenoB; setCaption(i18n("CVS Diff: %1").arg(fileName)); @@ -238,14 +238,14 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName, // place, but this design at least makes the handling trans- // parent for the calling routines - QString extdiff = partConfig.readPathEntry("ExternalDiff"); + TQString extdiff = partConfig.readPathEntry("ExternalDiff"); if (!extdiff.isEmpty()) { callExternalDiff(extdiff, service, fileName, revA, revB); return false; } - const QString diffOptions = partConfig.readEntry("DiffOptions"); + const TQString diffOptions = partConfig.readEntry("DiffOptions"); const unsigned contextLines = partConfig.readUnsignedNumEntry("ContextLines", 65535); DCOPRef job = service->diff(fileName, revA, revB, diffOptions, contextLines); @@ -259,7 +259,7 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName, // remember diff output for "save as" action m_diffOutput = dlg.getOutput(); - QString line; + TQString line; while ( dlg.getLine(line) && !line.startsWith("+++")) ; @@ -278,7 +278,7 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName, if (line.length() < 1) continue; - QChar marker = line[0]; + TQChar marker = line[0]; line.remove(0, 1); if (marker == '-') @@ -312,7 +312,7 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName, void DiffDialog::newDiffHunk(int& linenoA, int& linenoB, - const QStringList& linesA, const QStringList& linesB) + const TQStringList& linesA, const TQStringList& linesB) { DiffItem *item = new DiffItem; item->linenoA = linenoA+1; @@ -321,12 +321,12 @@ void DiffDialog::newDiffHunk(int& linenoA, int& linenoB, item->linecountB = linesB.count(); items.append(item); - const QString region = regionAsString(linenoA+1, linesA.count(), + const TQString region = regionAsString(linenoA+1, linesA.count(), linenoB+1, linesB.count()); itemscombo->insertItem(region); - QStringList::ConstIterator itA = linesA.begin(); - QStringList::ConstIterator itB = linesB.begin(); + TQStringList::ConstIterator itA = linesA.begin(); + TQStringList::ConstIterator itB = linesB.begin(); while (itA != linesA.end() || itB != linesB.end()) { if (itA != linesA.end()) @@ -351,22 +351,22 @@ void DiffDialog::newDiffHunk(int& linenoA, int& linenoB, } -void DiffDialog::callExternalDiff(const QString& extdiff, CvsService_stub* service, - const QString& fileName, const QString &revA, - const QString &revB) +void DiffDialog::callExternalDiff(const TQString& extdiff, CvsService_stub* service, + const TQString& fileName, const TQString &revA, + const TQString &revB) { - QString extcmdline = extdiff; + TQString extcmdline = extdiff; extcmdline += " "; - // create suffix for temporary file (used QFileInfo to remove path from file name) - const QString suffix = "-" + QFileInfo(fileName).fileName(); + // create suffix for temporary file (used TQFileInfo to remove path from file name) + const TQString suffix = "-" + TQFileInfo(fileName).fileName(); DCOPRef job; if (!revA.isEmpty() && !revB.isEmpty()) { // We're comparing two revisions - QString revAFilename = tempFileName(suffix+QString("-")+revA); - QString revBFilename = tempFileName(suffix+QString("-")+revB); + TQString revAFilename = tempFileName(suffix+TQString("-")+revA); + TQString revBFilename = tempFileName(suffix+TQString("-")+revB); // download the files for revision A and B job = service->downloadRevision(fileName, revA, revAFilename, @@ -381,14 +381,14 @@ void DiffDialog::callExternalDiff(const QString& extdiff, CvsService_stub* servi else { // We're comparing to a file, and perhaps one revision - QString revAFilename = tempFileName(suffix+QString("-")+revA); + TQString revAFilename = tempFileName(suffix+TQString("-")+revA); job = service->downloadRevision(fileName, revA, revAFilename); if( !service->ok() ) return; extcmdline += KProcess::quote(revAFilename); extcmdline += " "; - extcmdline += KProcess::quote(QFileInfo(fileName).absFilePath()); + extcmdline += KProcess::quote(TQFileInfo(fileName).absFilePath()); } ProgressDialog dlg(this, "Diff", job, "diff"); @@ -406,7 +406,7 @@ void DiffDialog::callExternalDiff(const QString& extdiff, CvsService_stub* servi void DiffDialog::updateNofN() { - QString str; + TQString str; if (markeditem >= 0) str = i18n("%1 of %2").arg(markeditem+1).arg(items.count()); else @@ -477,14 +477,14 @@ void DiffDialog::forwClicked() void DiffDialog::saveAsClicked() { - QString fileName = KFileDialog::getSaveFileName(QString::null, QString::null, this); + TQString fileName = KFileDialog::getSaveFileName(TQString::null, TQString::null, this); if( fileName.isEmpty() ) return; if( !Cervisia::CheckOverwrite(fileName, this) ) return; - QFile f(fileName); + TQFile f(fileName); if( !f.open(IO_WriteOnly) ) { KMessageBox::sorry(this, @@ -493,8 +493,8 @@ void DiffDialog::saveAsClicked() return; } - QTextStream ts(&f); - QStringList::Iterator it = m_diffOutput.begin(); + TQTextStream ts(&f); + TQStringList::Iterator it = m_diffOutput.begin(); for( ; it != m_diffOutput.end(); ++it ) ts << *it << "\n"; diff --git a/cervisia/diffdlg.h b/cervisia/diffdlg.h index 25407c96..f234b36c 100644 --- a/cervisia/diffdlg.h +++ b/cervisia/diffdlg.h @@ -21,7 +21,7 @@ #ifndef DIFFDLG_H #define DIFFDLG_H -#include +#include #include @@ -40,16 +40,16 @@ class DiffDialog : public KDialogBase public: - explicit DiffDialog( KConfig& config, QWidget *parent=0, const char *name=0, + explicit DiffDialog( KConfig& config, TQWidget *parent=0, const char *name=0, bool modal=false ); virtual ~DiffDialog(); - bool parseCvsDiff(CvsService_stub* service, const QString &fileName, - const QString &revA, const QString &revB); + bool parseCvsDiff(CvsService_stub* service, const TQString &fileName, + const TQString &revA, const TQString &revB); protected: - virtual void keyPressEvent(QKeyEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); private slots: void toggleSynchronize(bool b); @@ -59,24 +59,24 @@ private slots: void saveAsClicked(); private: - void newDiffHunk(int& linenoA, int& linenoB, const QStringList& linesA, - const QStringList& linesB); - void callExternalDiff(const QString& extdiff, CvsService_stub* service, - const QString& fileName, const QString& revA, - const QString& revB); + void newDiffHunk(int& linenoA, int& linenoB, const TQStringList& linesA, + const TQStringList& linesB); + void callExternalDiff(const TQString& extdiff, CvsService_stub* service, + const TQString& fileName, const TQString& revA, + const TQString& revB); void updateNofN(); void updateHighlight(int newitem); - QLabel *revlabel1, *revlabel2, *nofnlabel; - QCheckBox *syncbox; - QComboBox *itemscombo; - QPushButton *backbutton, *forwbutton; + TQLabel *revlabel1, *revlabel2, *nofnlabel; + TQCheckBox *syncbox; + TQComboBox *itemscombo; + TQPushButton *backbutton, *forwbutton; DiffView *diff1, *diff2; - QPtrList items; + TQPtrList items; int markeditem; KConfig& partConfig; - QStringList m_diffOutput; + TQStringList m_diffOutput; }; #endif diff --git a/cervisia/diffview.cpp b/cervisia/diffview.cpp index 1892880e..597ec97f 100644 --- a/cervisia/diffview.cpp +++ b/cervisia/diffview.cpp @@ -20,11 +20,11 @@ #include "diffview.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -36,14 +36,14 @@ class DiffViewItem { public: - QString line; + TQString line; DiffView::DiffType type; bool inverted; int no; }; -int DiffViewItemList::compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2) +int DiffViewItemList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2) { return (static_cast(item1)->no == static_cast(item2)->no)? 0 : 1; @@ -54,7 +54,7 @@ const int DiffView::BORDER = 7; DiffView::DiffView( KConfig& cfg, bool withlinenos, bool withmarker, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : QtTableView(parent, name, WRepaintNoErase) , partConfig(cfg) { @@ -62,13 +62,13 @@ DiffView::DiffView( KConfig& cfg, bool withlinenos, bool withmarker, setNumCols( 1 + (withlinenos?1:0) + (withmarker?1:0) ); setTableFlags( Tbl_autoVScrollBar|Tbl_autoHScrollBar| Tbl_smoothVScrolling ); - setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); + setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken ); setBackgroundMode( PaletteBase ); setWFlags( WResizeNoErase ); partConfig.setGroup("LookAndFeel"); setFont(partConfig.readFontEntry("DiffFont")); - QFontMetrics fm(font()); + TQFontMetrics fm(font()); setCellHeight(fm.lineSpacing()); setCellWidth(0); textwidth = 0; @@ -81,19 +81,19 @@ DiffView::DiffView( KConfig& cfg, bool withlinenos, bool withmarker, marker = withmarker; partConfig.setGroup("Colors"); - QColor defaultColor=QColor(237, 190, 190); + TQColor defaultColor=TQColor(237, 190, 190); diffChangeColor=partConfig.readColorEntry("DiffChange",&defaultColor); - defaultColor=QColor(190, 190, 237); + defaultColor=TQColor(190, 190, 237); diffInsertColor=partConfig.readColorEntry("DiffInsert",&defaultColor); - defaultColor=QColor(190, 237, 190); + defaultColor=TQColor(190, 237, 190); diffDeleteColor=partConfig.readColorEntry("DiffDelete",&defaultColor); } -void DiffView::setFont(const QFont &font) +void DiffView::setFont(const TQFont &font) { QtTableView::setFont(font); - QFontMetrics fm(font); + TQFontMetrics fm(font); setCellHeight(fm.lineSpacing()); } @@ -103,14 +103,14 @@ void DiffView::setPartner(DiffView *other) partner = other; if (partner) { - connect( verticalScrollBar(), SIGNAL(valueChanged(int)), - SLOT(vertPositionChanged(int)) ); - connect( verticalScrollBar(), SIGNAL(sliderMoved(int)), - SLOT(vertPositionChanged(int)) ); - connect( horizontalScrollBar(), SIGNAL(valueChanged(int)), - SLOT(horzPositionChanged(int)) ); - connect( horizontalScrollBar(), SIGNAL(sliderMoved(int)), - SLOT(horzPositionChanged(int)) ); + connect( verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(vertPositionChanged(int)) ); + connect( verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(vertPositionChanged(int)) ); + connect( horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(horzPositionChanged(int)) ); + connect( horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(horzPositionChanged(int)) ); } } @@ -137,7 +137,7 @@ void DiffView::removeAtOffset(int offset) } -void DiffView::insertAtOffset(const QString &line, DiffType type, int offset) +void DiffView::insertAtOffset(const TQString &line, DiffType type, int offset) { DiffViewItem *item = new DiffViewItem; item->line = line; @@ -159,12 +159,12 @@ void DiffView::setCenterOffset(int offset) } -void DiffView::addLine(const QString &line, DiffType type, int no) +void DiffView::addLine(const TQString &line, DiffType type, int no) { - QFont f(font()); + TQFont f(font()); f.setBold(true); - QFontMetrics fmbold(f); - QFontMetrics fm(font()); + TQFontMetrics fmbold(f); + TQFontMetrics fm(font()); // calculate textwidth based on 'line' where tabs are expanded @@ -172,9 +172,9 @@ void DiffView::addLine(const QString &line, DiffType type, int no) // *Please note* // For some fonts, e.g. "Clean", is fm.maxWidth() greater than // fmbold.maxWidth(). - QString copy(line); + TQString copy(line); const int numTabs = copy.contains('\t', false); - copy.replace( QRegExp("\t"), ""); + copy.replace( TQRegExp("\t"), ""); const int tabSize = m_tabWidth * QMAX(fm.maxWidth(), fmbold.maxWidth()); const int copyWidth = QMAX(fm.width(copy), fmbold.width(copy)); @@ -190,7 +190,7 @@ void DiffView::addLine(const QString &line, DiffType type, int no) } -QString DiffView::stringAtOffset(int offset) +TQString DiffView::stringAtOffset(int offset) { if (offset >= (int)items.count()) { @@ -236,21 +236,21 @@ void DiffView::setCenterLine(int lineno) } -QString DiffView::stringAtLine(int lineno) +TQString DiffView::stringAtLine(int lineno) { int pos; if ( (pos = findLine(lineno)) != -1 ) return items.at(pos)->line; else - return QString(); + return TQString(); } -QByteArray DiffView::compressedContent() +TQByteArray DiffView::compressedContent() { - QByteArray res(items.count()); + TQByteArray res(items.count()); - QPtrListIterator it(items); + TQPtrListIterator it(items); int i=0; for (; it.current(); ++it) { @@ -273,12 +273,12 @@ int DiffView::cellWidth(int col) { if (col == 0 && linenos) { - QFontMetrics fm(font()); + TQFontMetrics fm(font()); return fm.width("10000"); } else if (marker && (col == 0 || col == 1)) { - QFontMetrics fm( fontMetrics() ); + TQFontMetrics fm( fontMetrics() ); return QMAX(QMAX( fm.width(i18n("Delete")), fm.width(i18n("Insert"))), fm.width(i18n("Change")))+2*BORDER; @@ -293,16 +293,16 @@ int DiffView::cellWidth(int col) } -QSize DiffView::sizeHint() const +TQSize DiffView::sizeHint() const { - QFontMetrics fm(font()); - return QSize( 4*fm.width("0123456789"), fm.lineSpacing()*8 ); + TQFontMetrics fm(font()); + return TQSize( 4*fm.width("0123456789"), fm.lineSpacing()*8 ); } -void DiffView::paintCell(QPainter *p, int row, int col) +void DiffView::paintCell(TQPainter *p, int row, int col) { - QFontMetrics fm(font()); + TQFontMetrics fm(font()); p->setTabStops(m_tabWidth * fm.maxWidth()); DiffViewItem *item = items.at(row); @@ -310,13 +310,13 @@ void DiffView::paintCell(QPainter *p, int row, int col) int width = cellWidth(col); int height = cellHeight(); - QColor backgroundColor; + TQColor backgroundColor; bool inverted; int align; int innerborder; - QString str; + TQString str; - QFont oldFont(p->font()); + TQFont oldFont(p->font()); if (item->type==Separator) { backgroundColor = KGlobalSettings::highlightColor(); @@ -326,7 +326,7 @@ void DiffView::paintCell(QPainter *p, int row, int col) innerborder = 0; if (col == (linenos?1:0) + (marker?1:0)) str = item->line; - QFont f(oldFont); + TQFont f(oldFont); f.setBold(true); p->setFont(f); } @@ -351,7 +351,7 @@ void DiffView::paintCell(QPainter *p, int row, int col) innerborder = BORDER; str = (item->type==Change)? i18n("Change") : (item->type==Insert)? i18n("Insert") - : (item->type==Delete)? i18n("Delete") : QString::null; + : (item->type==Delete)? i18n("Delete") : TQString::null; } else { @@ -371,7 +371,7 @@ void DiffView::paintCell(QPainter *p, int row, int col) { p->setPen(backgroundColor); backgroundColor = KGlobalSettings::textColor(); - QFont f(oldFont); + TQFont f(oldFont); f.setBold(true); p->setFont(f); } @@ -382,23 +382,23 @@ void DiffView::paintCell(QPainter *p, int row, int col) } -void DiffView::wheelEvent(QWheelEvent *e) +void DiffView::wheelEvent(TQWheelEvent *e) { - QApplication::sendEvent(verticalScrollBar(), e); + TQApplication::sendEvent(verticalScrollBar(), e); } -DiffZoomWidget::DiffZoomWidget(KConfig& cfg, QWidget *parent, const char *name) - : QFrame(parent, name) +DiffZoomWidget::DiffZoomWidget(KConfig& cfg, TQWidget *parent, const char *name) + : TQFrame(parent, name) { - setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ) ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) ); cfg.setGroup("Colors"); - QColor defaultColor=QColor(237, 190, 190); + TQColor defaultColor=TQColor(237, 190, 190); diffChangeColor=cfg.readColorEntry("DiffChange",&defaultColor); - defaultColor=QColor(190, 190, 237); + defaultColor=TQColor(190, 190, 237); diffInsertColor=cfg.readColorEntry("DiffInsert",&defaultColor); - defaultColor=QColor(190, 237, 190); + defaultColor=TQColor(190, 237, 190); diffDeleteColor=cfg.readColorEntry("DiffDelete",&defaultColor); } @@ -410,49 +410,49 @@ DiffZoomWidget::~DiffZoomWidget() void DiffZoomWidget::setDiffView(DiffView *view) { diffview = view; - QScrollBar *sb = const_cast(diffview->scrollBar()); + TQScrollBar *sb = const_cast(diffview->scrollBar()); sb->installEventFilter(this); } -QSize DiffZoomWidget::sizeHint() const +TQSize DiffZoomWidget::sizeHint() const { - return QSize(25, style().pixelMetric(QStyle::PM_ScrollBarExtent, this)); + return TQSize(25, style().pixelMetric(TQStyle::PM_ScrollBarExtent, this)); } -bool DiffZoomWidget::eventFilter(QObject *o, QEvent *e) +bool DiffZoomWidget::eventFilter(TQObject *o, TQEvent *e) { - if (e->type() == QEvent::Show - || e->type() == QEvent::Hide - || e->type() == QEvent::Resize) + if (e->type() == TQEvent::Show + || e->type() == TQEvent::Hide + || e->type() == TQEvent::Resize) repaint(); - return QFrame::eventFilter(o, e); + return TQFrame::eventFilter(o, e); } -void DiffZoomWidget::paintEvent(QPaintEvent *) +void DiffZoomWidget::paintEvent(TQPaintEvent *) { - const QScrollBar* scrollBar = diffview->scrollBar(); + const TQScrollBar* scrollBar = diffview->scrollBar(); if (!scrollBar) return; // only y and height are important - const QRect scrollBarGroove(scrollBar->isVisible() - ? style().querySubControlMetrics(QStyle::CC_ScrollBar, + const TQRect scrollBarGroove(scrollBar->isVisible() + ? style().querySubControlMetrics(TQStyle::CC_ScrollBar, scrollBar, - QStyle::SC_ScrollBarGroove) + TQStyle::SC_ScrollBarGroove) : rect()); // draw rectangles at the positions of the differences - const QByteArray& lineTypes(diffview->compressedContent()); + const TQByteArray& lineTypes(diffview->compressedContent()); - QPixmap pixbuf(width(), scrollBarGroove.height()); + TQPixmap pixbuf(width(), scrollBarGroove.height()); pixbuf.fill(KGlobalSettings::baseColor()); - QPainter p(&pixbuf, this); + TQPainter p(&pixbuf, this); if (const unsigned int numberOfLines = lineTypes.size()) { const double scale(((double) scrollBarGroove.height()) / numberOfLines); @@ -468,7 +468,7 @@ void DiffZoomWidget::paintEvent(QPaintEvent *) for (++index; index < numberOfLines && lineType == lineTypes[index]; ++index) ; - QColor color; + TQColor color; switch (lineType) { case 'C': @@ -491,7 +491,7 @@ void DiffZoomWidget::paintEvent(QPaintEvent *) const int yPos2(qRound(index * scale)); const int areaHeight((yPos2 != yPos1) ? yPos2 - yPos1 : 1); - p.fillRect(0, yPos1, pixbuf.width(), areaHeight, QBrush(color)); + p.fillRect(0, yPos1, pixbuf.width(), areaHeight, TQBrush(color)); } } } diff --git a/cervisia/diffview.h b/cervisia/diffview.h index b79c7189..160dd2cd 100644 --- a/cervisia/diffview.h +++ b/cervisia/diffview.h @@ -24,18 +24,18 @@ #include "qttableview.h" -#include -#include +#include +#include class KConfig; class DiffViewItem; -class DiffViewItemList : public QPtrList +class DiffViewItemList : public TQPtrList { protected: - virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2); + virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2); }; @@ -47,7 +47,7 @@ public: enum DiffType { Change, Insert, Delete, Neutral, Unchanged, Separator }; DiffView( KConfig& cfg, bool withlinenos, bool withmarker, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); void setPartner(DiffView *other); @@ -60,23 +60,23 @@ public: void prior() { setTopCell(topCell()-viewHeight()/cellHeight()); } - void addLine(const QString &line, DiffType type, int no=-1); - QString stringAtLine(int lineno); + void addLine(const TQString &line, DiffType type, int no=-1); + TQString stringAtLine(int lineno); void setCenterLine(int lineno); void setInverted(int lineno, bool inverted); int count(); void removeAtOffset(int offset); - void insertAtOffset(const QString &line, DiffType type, int offset); + void insertAtOffset(const TQString &line, DiffType type, int offset); void setCenterOffset(int offset); - QString stringAtOffset(int offset); - QByteArray compressedContent(); + TQString stringAtOffset(int offset); + TQByteArray compressedContent(); - virtual void setFont(const QFont &font); + virtual void setFont(const TQFont &font); virtual int cellWidth(int col); - virtual QSize sizeHint() const; - virtual void paintCell(QPainter *p, int row, int col); - virtual void wheelEvent(QWheelEvent *); - const QScrollBar *scrollBar() const + virtual TQSize sizeHint() const; + virtual void paintCell(TQPainter *p, int row, int col); + virtual void wheelEvent(TQWheelEvent *); + const TQScrollBar *scrollBar() const { return verticalScrollBar(); } protected slots: @@ -92,9 +92,9 @@ private: DiffView *partner; static const int BORDER; - QColor diffChangeColor; - QColor diffInsertColor; - QColor diffDeleteColor; + TQColor diffChangeColor; + TQColor diffInsertColor; + TQColor diffDeleteColor; int m_tabWidth; KConfig& partConfig; @@ -106,22 +106,22 @@ class DiffZoomWidget : public QFrame Q_OBJECT public: - DiffZoomWidget(KConfig& cfg, QWidget *parent=0, const char *name=0); + DiffZoomWidget(KConfig& cfg, TQWidget *parent=0, const char *name=0); ~DiffZoomWidget(); void setDiffView(DiffView *view); - QSize sizeHint() const; + TQSize sizeHint() const; protected: - void paintEvent(QPaintEvent *); - bool eventFilter(QObject *, QEvent *e); + void paintEvent(TQPaintEvent *); + bool eventFilter(TQObject *, TQEvent *e); private: DiffView *diffview; - QColor diffChangeColor; - QColor diffInsertColor; - QColor diffDeleteColor; + TQColor diffChangeColor; + TQColor diffInsertColor; + TQColor diffDeleteColor; }; #endif diff --git a/cervisia/dirignorelist.cpp b/cervisia/dirignorelist.cpp index d6ffcf2d..d6c91a36 100644 --- a/cervisia/dirignorelist.cpp +++ b/cervisia/dirignorelist.cpp @@ -19,18 +19,18 @@ #include "dirignorelist.h" using namespace Cervisia; -#include +#include -DirIgnoreList::DirIgnoreList(const QString& path) +DirIgnoreList::DirIgnoreList(const TQString& path) { addEntriesFromFile(path + "/.cvsignore"); } -void DirIgnoreList::addEntry(const QString& entry) +void DirIgnoreList::addEntry(const TQString& entry) { - if (entry != QChar('!')) + if (entry != TQChar('!')) { m_stringMatcher.add(entry); } @@ -41,7 +41,7 @@ void DirIgnoreList::addEntry(const QString& entry) } -bool DirIgnoreList::matches(const QFileInfo* fi) const +bool DirIgnoreList::matches(const TQFileInfo* fi) const { return m_stringMatcher.match(fi->fileName()); } diff --git a/cervisia/dirignorelist.h b/cervisia/dirignorelist.h index 41f82982..d1af9d5e 100644 --- a/cervisia/dirignorelist.h +++ b/cervisia/dirignorelist.h @@ -33,12 +33,12 @@ namespace Cervisia class DirIgnoreList : public IgnoreListBase { public: - explicit DirIgnoreList(const QString& path); + explicit DirIgnoreList(const TQString& path); - virtual bool matches(const QFileInfo* fi) const; + virtual bool matches(const TQFileInfo* fi) const; private: - virtual void addEntry(const QString& entry); + virtual void addEntry(const TQString& entry); StringMatcher m_stringMatcher; }; diff --git a/cervisia/editwithmenu.cpp b/cervisia/editwithmenu.cpp index 9ca0f14b..d7d1044a 100644 --- a/cervisia/editwithmenu.cpp +++ b/cervisia/editwithmenu.cpp @@ -19,7 +19,7 @@ #include "editwithmenu.h" using namespace Cervisia; -#include +#include #include #include #include @@ -27,8 +27,8 @@ using namespace Cervisia; #include -EditWithMenu::EditWithMenu(const KURL& url, QWidget* parent) - : QObject(parent) +EditWithMenu::EditWithMenu(const KURL& url, TQWidget* parent) + : TQObject(parent) , m_menu(0) , m_url(url) { @@ -43,21 +43,21 @@ EditWithMenu::EditWithMenu(const KURL& url, QWidget* parent) if( !m_offers.isEmpty() ) { - m_menu = new QPopupMenu(); + m_menu = new TQPopupMenu(); KTrader::OfferList::ConstIterator it = m_offers.begin(); for( int i = 0 ; it != m_offers.end(); ++it, ++i ) { int id = m_menu->insertItem(SmallIcon((*it)->icon()), (*it)->name(), - this, SLOT(itemActivated(int))); + this, TQT_SLOT(itemActivated(int))); m_menu->setItemParameter(id, i); } } } -QPopupMenu* EditWithMenu::menu() +TQPopupMenu* EditWithMenu::menu() { return m_menu; } diff --git a/cervisia/editwithmenu.h b/cervisia/editwithmenu.h index f78b7a2e..bd513412 100644 --- a/cervisia/editwithmenu.h +++ b/cervisia/editwithmenu.h @@ -19,7 +19,7 @@ #ifndef EDITWITHMENU_H #define EDITWITHMENU_H -#include +#include #include #include @@ -35,15 +35,15 @@ class EditWithMenu : public QObject Q_OBJECT public: - EditWithMenu(const KURL& url, QWidget* parent); - QPopupMenu* menu(); + EditWithMenu(const KURL& url, TQWidget* parent); + TQPopupMenu* menu(); private slots: void itemActivated(int); private: KTrader::OfferList m_offers; - QPopupMenu* m_menu; + TQPopupMenu* m_menu; KURL m_url; }; diff --git a/cervisia/entry.h b/cervisia/entry.h index 875885d0..f3705d35 100644 --- a/cervisia/entry.h +++ b/cervisia/entry.h @@ -21,8 +21,8 @@ #define CERVISIA_ENTRY_H -#include -#include +#include +#include #include "entry_status.h" @@ -50,7 +50,7 @@ struct Entry /** * The name of this entry (without path). */ - QString m_name; + TQString m_name; /** * The type of this entry. @@ -65,17 +65,17 @@ struct Entry /** * The revision of this entry. */ - QString m_revision; + TQString m_revision; /** * The modification date/time of this entry (in user's local time). */ - QDateTime m_dateTime; + TQDateTime m_dateTime; /** * The tag/branch of this entry. */ - QString m_tag; + TQString m_tag; }; diff --git a/cervisia/entry_status.cpp b/cervisia/entry_status.cpp index 8ad624fa..00ff3b32 100644 --- a/cervisia/entry_status.cpp +++ b/cervisia/entry_status.cpp @@ -19,7 +19,7 @@ #include "entry_status.h" -#include +#include #include @@ -28,9 +28,9 @@ namespace Cervisia { -QString toString(EntryStatus entryStatus) +TQString toString(EntryStatus entryStatus) { - QString result; + TQString result; switch (entryStatus) { case LocallyModified: diff --git a/cervisia/entry_status.h b/cervisia/entry_status.h index 634e0a04..9d1562ef 100644 --- a/cervisia/entry_status.h +++ b/cervisia/entry_status.h @@ -55,7 +55,7 @@ enum EntryStatus * * @return The translated string. */ -QString toString(EntryStatus entryStatus); +TQString toString(EntryStatus entryStatus); } // namespace Cervisia diff --git a/cervisia/entry_status_change.h b/cervisia/entry_status_change.h index 63b5f089..3518eed8 100644 --- a/cervisia/entry_status_change.h +++ b/cervisia/entry_status_change.h @@ -21,7 +21,7 @@ #define CERVISIA_ENTRY_STATUS_CHANGE_H -#include +#include #include "entry_status.h" @@ -39,7 +39,7 @@ struct EntryStatusChange /** * The name of the changed entry (including the path inside the repository / working copy). */ - QString m_name; + TQString m_name; /** * The new status of the entry. diff --git a/cervisia/globalignorelist.cpp b/cervisia/globalignorelist.cpp index 6d905fc7..b3834a42 100644 --- a/cervisia/globalignorelist.cpp +++ b/cervisia/globalignorelist.cpp @@ -19,7 +19,7 @@ #include "globalignorelist.h" using namespace Cervisia; -#include +#include #include #include #include // for getenv() @@ -39,14 +39,14 @@ GlobalIgnoreList::GlobalIgnoreList() } -bool GlobalIgnoreList::matches(const QFileInfo* fi) const +bool GlobalIgnoreList::matches(const TQFileInfo* fi) const { return m_stringMatcher.match(fi->fileName()); } void GlobalIgnoreList::retrieveServerIgnoreList(CvsService_stub* cvsService, - const QString& repository) + const TQString& repository) { KTempFile tmpFile; tmpFile.setAutoDelete(true); @@ -68,9 +68,9 @@ void GlobalIgnoreList::retrieveServerIgnoreList(CvsService_stub* cvsService, } -void GlobalIgnoreList::addEntry(const QString& entry) +void GlobalIgnoreList::addEntry(const TQString& entry) { - if (entry != QChar('!')) + if (entry != TQChar('!')) { m_stringMatcher.add(entry); } @@ -81,7 +81,7 @@ void GlobalIgnoreList::addEntry(const QString& entry) // Bug #89215: // Make sure '.' and '..' are always in the ignore list, so // UpdateDirItem::maybeScanDir() doesn't loop endlessly. - addEntriesFromString(QString::fromLatin1(". ..")); + addEntriesFromString(TQString::fromLatin1(". ..")); } } @@ -92,9 +92,9 @@ void GlobalIgnoreList::setup() .nse_depinfo #* .#* cvslog.* ,* CVS CVS.adm .del-* *.a *.olb *.o *.obj\ *.so *.Z *~ *.old *.elc *.ln *.bak *.BAK *.orig *.rej *.exe _$* *$"; - addEntriesFromString(QString::fromLatin1(ignorestr)); - addEntriesFromString(QString::fromLocal8Bit(::getenv("CVSIGNORE"))); - addEntriesFromFile(QDir::homeDirPath() + "/.cvsignore"); + addEntriesFromString(TQString::fromLatin1(ignorestr)); + addEntriesFromString(TQString::fromLocal8Bit(::getenv("CVSIGNORE"))); + addEntriesFromFile(TQDir::homeDirPath() + "/.cvsignore"); m_isInitialized = true; } diff --git a/cervisia/globalignorelist.h b/cervisia/globalignorelist.h index b8f72664..2cde8c8f 100644 --- a/cervisia/globalignorelist.h +++ b/cervisia/globalignorelist.h @@ -35,14 +35,14 @@ class GlobalIgnoreList : public IgnoreListBase public: GlobalIgnoreList(); - virtual bool matches(const QFileInfo* fi) const; + virtual bool matches(const TQFileInfo* fi) const; void retrieveServerIgnoreList(CvsService_stub* cvsService, - const QString& repository); + const TQString& repository); private: void setup(); - virtual void addEntry(const QString& entry); + virtual void addEntry(const TQString& entry); static StringMatcher m_stringMatcher; static bool m_isInitialized; diff --git a/cervisia/historydlg.cpp b/cervisia/historydlg.cpp index 35eb5e01..4eb9cca5 100644 --- a/cervisia/historydlg.cpp +++ b/cervisia/historydlg.cpp @@ -20,11 +20,11 @@ #include "historydlg.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -36,14 +36,14 @@ #include "progressdlg.h" -static QDateTime parseDate(const QString& date, const QString& _time, const QString& offset) +static TQDateTime parseDate(const TQString& date, const TQString& _time, const TQString& offset) { // cvs history only prints hh:mm but parseDateISO8601 needs hh:mm:ss - QString time(_time); + TQString time(_time); if( time.contains(':') == 1 ) time += ":00"; - QDateTime dateTime; + TQDateTime dateTime; dateTime.setTime_t(KRFCDate::parseDateISO8601(date + 'T' + time + offset)); return dateTime; @@ -56,13 +56,13 @@ public: enum { Date, Event, Author, Revision, File, Path }; - HistoryItem(QListView *parent, const QDateTime& date) - : QListViewItem(parent), m_date(date) + HistoryItem(TQListView *parent, const TQDateTime& date) + : TQListViewItem(parent), m_date(date) {} - virtual int compare(QListViewItem* i, int col, bool) const; + virtual int compare(TQListViewItem* i, int col, bool) const; - virtual QString text(int col) const; + virtual TQString text(int col) const; bool isCommit(); bool isCheckout(); @@ -71,11 +71,11 @@ public: private: - const QDateTime m_date; + const TQDateTime m_date; }; -int HistoryItem::compare(QListViewItem* i, int col, bool ascending) const +int HistoryItem::compare(TQListViewItem* i, int col, bool ascending) const { const HistoryItem* pItem = static_cast(i); @@ -89,23 +89,23 @@ int HistoryItem::compare(QListViewItem* i, int col, bool ascending) const iResult = ::compareRevisions(text(Revision), pItem->text(Revision)); break; default: - iResult = QListViewItem::compare(i, col, ascending); + iResult = TQListViewItem::compare(i, col, ascending); } return iResult; } -QString HistoryItem::text(int col) const +TQString HistoryItem::text(int col) const { - QString sText; + TQString sText; switch (col) { case Date: sText = KGlobal::locale()->formatDateTime(m_date); break; default: - sText = QListViewItem::text(col); + sText = TQListViewItem::text(col); } return sText; @@ -138,17 +138,17 @@ bool HistoryItem::isOther() } -HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name) - : KDialogBase(parent, name, false, QString::null, +HistoryDialog::HistoryDialog(KConfig& cfg, TQWidget *parent, const char *name) + : KDialogBase(parent, name, false, TQString::null, Close | Help, ButtonCode(0), true) , partConfig(cfg) { - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); listview = new KListView(mainWidget); - listview->setSelectionMode(QListView::NoSelection); + listview->setSelectionMode(TQListView::NoSelection); listview->setAllColumnsShowFocus(true); listview->setShowSortIndicator(true); listview->setSorting(HistoryItem::Date, false); @@ -161,23 +161,23 @@ HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name) listview->setFocus(); layout->addWidget(listview, 1); - commit_box = new QCheckBox(i18n("Show c&ommit events"), mainWidget); + commit_box = new TQCheckBox(i18n("Show c&ommit events"), mainWidget); commit_box->setChecked(true); - checkout_box = new QCheckBox(i18n("Show ch&eckout events"), mainWidget); + checkout_box = new TQCheckBox(i18n("Show ch&eckout events"), mainWidget); checkout_box->setChecked(true); - tag_box = new QCheckBox(i18n("Show &tag events"), mainWidget); + tag_box = new TQCheckBox(i18n("Show &tag events"), mainWidget); tag_box->setChecked(true); - other_box = new QCheckBox(i18n("Show &other events"), mainWidget); + other_box = new TQCheckBox(i18n("Show &other events"), mainWidget); other_box->setChecked(true); - onlyuser_box = new QCheckBox(i18n("Only &user:"), mainWidget); + onlyuser_box = new TQCheckBox(i18n("Only &user:"), mainWidget); - onlyfilenames_box = new QCheckBox(i18n("Only &filenames matching:"), mainWidget); + onlyfilenames_box = new TQCheckBox(i18n("Only &filenames matching:"), mainWidget); - onlydirnames_box = new QCheckBox(i18n("Only &folders matching:"), mainWidget); + onlydirnames_box = new TQCheckBox(i18n("Only &folders matching:"), mainWidget); user_edit = new KLineEdit(mainWidget); user_edit->setEnabled(false); @@ -188,34 +188,34 @@ HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name) dirname_edit = new KLineEdit(mainWidget); dirname_edit->setEnabled(false); - connect( onlyuser_box, SIGNAL(toggled(bool)), - this, SLOT(toggled(bool)) ); - connect( onlyfilenames_box, SIGNAL(toggled(bool)), - this, SLOT(toggled(bool)) ); - connect( onlydirnames_box, SIGNAL(toggled(bool)), - this, SLOT(toggled(bool)) ); - connect( commit_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( checkout_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( tag_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( other_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( onlyuser_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( onlyfilenames_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( onlydirnames_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( user_edit, SIGNAL(returnPressed()), - this, SLOT(choiceChanged()) ); - connect( filename_edit, SIGNAL(returnPressed()), - this, SLOT(choiceChanged()) ); - connect( dirname_edit, SIGNAL(returnPressed()), - this, SLOT(choiceChanged()) ); - - QGridLayout *grid = new QGridLayout(layout); + connect( onlyuser_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(toggled(bool)) ); + connect( onlyfilenames_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(toggled(bool)) ); + connect( onlydirnames_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(toggled(bool)) ); + connect( commit_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( checkout_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( tag_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( other_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( onlyuser_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( onlyfilenames_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( onlydirnames_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( user_edit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(choiceChanged()) ); + connect( filename_edit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(choiceChanged()) ); + connect( dirname_edit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(choiceChanged()) ); + + TQGridLayout *grid = new TQGridLayout(layout); grid->setColStretch(0, 1); grid->setColStretch(1, 0); grid->setColStretch(2, 4); @@ -239,14 +239,14 @@ HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name) setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "HistoryDialog"); + TQSize size = configDialogSize(partConfig, "HistoryDialog"); resize(size); // without this restoreLayout() can't change the column widths for (int i = 0; i < listview->columns(); ++i) - listview->setColumnWidthMode(i, QListView::Manual); + listview->setColumnWidthMode(i, TQListView::Manual); - listview->restoreLayout(&partConfig, QString::fromLatin1("HistoryListView")); + listview->restoreLayout(&partConfig, TQString::fromLatin1("HistoryListView")); } @@ -254,15 +254,15 @@ HistoryDialog::~HistoryDialog() { saveDialogSize(partConfig, "HistoryDialog"); - listview->saveLayout(&partConfig, QString::fromLatin1("HistoryListView")); + listview->saveLayout(&partConfig, TQString::fromLatin1("HistoryListView")); } void HistoryDialog::choiceChanged() { - const QString author(user_edit->text()); - const QRegExp fileMatcher(filename_edit->text(), true, true); - const QRegExp pathMatcher(dirname_edit->text(), true, true); + const TQString author(user_edit->text()); + const TQRegExp fileMatcher(filename_edit->text(), true, true); + const TQRegExp pathMatcher(dirname_edit->text(), true, true); const bool showCommitEvents(commit_box->isChecked()); const bool showCheckoutEvents(checkout_box->isChecked()); @@ -272,7 +272,7 @@ void HistoryDialog::choiceChanged() const bool filterByFile(onlyfilenames_box->isChecked() && !fileMatcher.isEmpty()); const bool filterByPath(onlydirnames_box->isChecked() && !pathMatcher.isEmpty()); - QListViewItemIterator it(listview); + TQListViewItemIterator it(listview); for (; it.current(); ++it) { HistoryItem *item = static_cast(it.current()); @@ -320,15 +320,15 @@ bool HistoryDialog::parseHistory(CvsService_stub* cvsService) if( !dlg.execute() ) return false; - QString line; + TQString line; while( dlg.getLine(line) ) { - const QStringList list(splitLine(line)); + const TQStringList list(splitLine(line)); const int listSize(list.size()); if( listSize < 6) continue; - QString cmd = list[0]; + TQString cmd = list[0]; if( cmd.length() != 1 ) continue; @@ -349,7 +349,7 @@ bool HistoryDialog::parseHistory(CvsService_stub* cvsService) if( ncol != (int)list.count() ) continue; - QString event; + TQString event; switch( cmd_code ) { case 'O': event = i18n("Checkout "); break; @@ -366,7 +366,7 @@ bool HistoryDialog::parseHistory(CvsService_stub* cvsService) default: event = i18n("Unknown "); } - const QDateTime date(parseDate(list[1], list[2], list[3])); + const TQDateTime date(parseDate(list[1], list[2], list[3])); HistoryItem *item = new HistoryItem(listview, date); item->setText(HistoryItem::Event, event); diff --git a/cervisia/historydlg.h b/cervisia/historydlg.h index ac2241d2..2b44a75b 100644 --- a/cervisia/historydlg.h +++ b/cervisia/historydlg.h @@ -37,7 +37,7 @@ class HistoryDialog : public KDialogBase Q_OBJECT public: - explicit HistoryDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit HistoryDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~HistoryDialog(); bool parseHistory(CvsService_stub* cvsService); @@ -48,8 +48,8 @@ private slots: private: KListView *listview; - QCheckBox *commit_box, *checkout_box, *tag_box, *other_box; - QCheckBox *onlyuser_box, *onlyfilenames_box, *onlydirnames_box; + TQCheckBox *commit_box, *checkout_box, *tag_box, *other_box; + TQCheckBox *onlyuser_box, *onlyfilenames_box, *onlydirnames_box; KLineEdit *user_edit, *filename_edit, *dirname_edit; KConfig& partConfig; }; diff --git a/cervisia/ignorelistbase.cpp b/cervisia/ignorelistbase.cpp index 27b3d159..74036d25 100644 --- a/cervisia/ignorelistbase.cpp +++ b/cervisia/ignorelistbase.cpp @@ -19,28 +19,28 @@ #include "ignorelistbase.h" using namespace Cervisia; -#include -#include -#include +#include +#include +#include -void IgnoreListBase::addEntriesFromString(const QString& str) +void IgnoreListBase::addEntriesFromString(const TQString& str) { - QStringList entries = QStringList::split(' ', str); - for( QStringList::iterator it = entries.begin(); it != entries.end(); ++it ) + TQStringList entries = TQStringList::split(' ', str); + for( TQStringList::iterator it = entries.begin(); it != entries.end(); ++it ) { addEntry(*it); } } -void IgnoreListBase::addEntriesFromFile(const QString& name) +void IgnoreListBase::addEntriesFromFile(const TQString& name) { - QFile file(name); + TQFile file(name); if( file.open(IO_ReadOnly) ) { - QTextStream stream(&file); + TQTextStream stream(&file); while( !stream.eof() ) { addEntriesFromString(stream.readLine()); diff --git a/cervisia/ignorelistbase.h b/cervisia/ignorelistbase.h index 9d166796..f9534bca 100644 --- a/cervisia/ignorelistbase.h +++ b/cervisia/ignorelistbase.h @@ -32,14 +32,14 @@ class IgnoreListBase public: virtual ~IgnoreListBase() {} - virtual bool matches(const QFileInfo* fi) const = 0; + virtual bool matches(const TQFileInfo* fi) const = 0; protected: - void addEntriesFromString(const QString& str); - void addEntriesFromFile(const QString& name); + void addEntriesFromString(const TQString& str); + void addEntriesFromFile(const TQString& name); private: - virtual void addEntry(const QString& entry) = 0; + virtual void addEntry(const TQString& entry) = 0; }; diff --git a/cervisia/logdlg.cpp b/cervisia/logdlg.cpp index 41a0751c..28b3078e 100644 --- a/cervisia/logdlg.cpp +++ b/cervisia/logdlg.cpp @@ -21,15 +21,15 @@ #include "logdlg.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -57,8 +57,8 @@ #include "patchoptiondlg.h" -LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name) - : KDialogBase(parent, name, false, QString::null, +LogDialog::LogDialog(KConfig& cfg, TQWidget *parent, const char *name) + : KDialogBase(parent, name, false, TQString::null, Ok | Apply | Close | Help | User1 | User2 | User3, Close, true, KGuiItem(i18n("&Annotate")), KGuiItem(i18n("&Diff"), "vcs_diff"), @@ -66,16 +66,16 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name) , cvsService(0) , partConfig(cfg) { - QSplitter *splitter = new QSplitter(Qt::Vertical, this); + TQSplitter *splitter = new TQSplitter(Qt::Vertical, this); setMainWidget(splitter); tree = new LogTreeView(this); - connect( tree, SIGNAL(revisionClicked(QString,bool)), - this, SLOT(revisionSelected(QString,bool)) ); + connect( tree, TQT_SIGNAL(revisionClicked(TQString,bool)), + this, TQT_SLOT(revisionSelected(TQString,bool)) ); - QWidget* listWidget = new QWidget(this); - QVBoxLayout* listLayout = new QVBoxLayout(listWidget); - QHBoxLayout* searchLayout = new QHBoxLayout(listLayout); + TQWidget* listWidget = new TQWidget(this); + TQVBoxLayout* listLayout = new TQVBoxLayout(listWidget); + TQHBoxLayout* searchLayout = new TQHBoxLayout(listLayout); searchLayout->setMargin(KDialog::spacingHint()); searchLayout->setSpacing(KDialog::spacingHint()); @@ -83,45 +83,45 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name) listLayout->addWidget(list, 1); KListViewSearchLine* searchLine = new KListViewSearchLine(listWidget, list); - QLabel* searchLabel = new QLabel(searchLine, i18n("S&earch:"), listWidget); + TQLabel* searchLabel = new TQLabel(searchLine, i18n("S&earch:"), listWidget); searchLayout->addWidget(searchLabel); searchLayout->addWidget(searchLine, 1); - connect( list, SIGNAL(revisionClicked(QString,bool)), - this, SLOT(revisionSelected(QString,bool)) ); + connect( list, TQT_SIGNAL(revisionClicked(TQString,bool)), + this, TQT_SLOT(revisionSelected(TQString,bool)) ); plain = new LogPlainView(this); - connect( plain, SIGNAL(revisionClicked(QString,bool)), - this, SLOT(revisionSelected(QString,bool)) ); + connect( plain, TQT_SIGNAL(revisionClicked(TQString,bool)), + this, TQT_SLOT(revisionSelected(TQString,bool)) ); - tabWidget = new QTabWidget(splitter); + tabWidget = new TQTabWidget(splitter); tabWidget->addTab(tree, i18n("&Tree")); tabWidget->addTab(listWidget, i18n("&List")); tabWidget->addTab(plain, i18n("CVS &Output")); - connect(tabWidget, SIGNAL(currentChanged(QWidget*)), - this, SLOT(tabChanged(QWidget*))); + connect(tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)), + this, TQT_SLOT(tabChanged(TQWidget*))); - QWhatsThis::add(tree, i18n("Choose revision A by clicking with the left " + TQWhatsThis::add(tree, i18n("Choose revision A by clicking with the left " "mouse button,\nrevision B by clicking with " "the middle mouse button.")); items.setAutoDelete(true); tags.setAutoDelete(true); - QWidget *mainWidget = new QWidget(splitter); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQWidget *mainWidget = new TQWidget(splitter); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); for (int i = 0; i < 2; ++i) { if ( i == 1 ) { - QFrame *frame = new QFrame(mainWidget); - frame->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *frame = new TQFrame(mainWidget); + frame->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); layout->addWidget(frame); } - QGridLayout *grid = new QGridLayout(layout); + TQGridLayout *grid = new TQGridLayout(layout); grid->setRowStretch(0, 0); grid->setRowStretch(1, 0); grid->setRowStretch(2, 1); @@ -131,69 +131,69 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name) grid->setColStretch(3, 1); grid->setColStretch(4, 2); - QString versionident = (i==0)? i18n("Revision A:") : i18n("Revision B:"); - QLabel *versionlabel = new QLabel(versionident, mainWidget); + TQString versionident = (i==0)? i18n("Revision A:") : i18n("Revision B:"); + TQLabel *versionlabel = new TQLabel(versionident, mainWidget); grid->addWidget(versionlabel, 0, 0); - revbox[i] = new QLabel(mainWidget); - revbox[i]->setFrameStyle(QFrame::Panel | QFrame::Sunken); + revbox[i] = new TQLabel(mainWidget); + revbox[i]->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); grid->addWidget(revbox[i], 0, 1, Qt::AlignVCenter); - QLabel *selectlabel = new QLabel(i18n("Select by tag:"), mainWidget); + TQLabel *selectlabel = new TQLabel(i18n("Select by tag:"), mainWidget); grid->addWidget(selectlabel, 0, 2); - tagcombo[i] = new QComboBox(mainWidget); - QFontMetrics fm(tagcombo[i]->fontMetrics()); + tagcombo[i] = new TQComboBox(mainWidget); + TQFontMetrics fm(tagcombo[i]->fontMetrics()); tagcombo[i]->setMinimumWidth(fm.width("X")*20); grid->addWidget(tagcombo[i], 0, 3); - QLabel *authorlabel = new QLabel(i18n("Author:"), mainWidget); + TQLabel *authorlabel = new TQLabel(i18n("Author:"), mainWidget); grid->addWidget(authorlabel, 1, 0); - authorbox[i] = new QLabel(mainWidget); - authorbox[i]->setFrameStyle(QFrame::Panel | QFrame::Sunken); + authorbox[i] = new TQLabel(mainWidget); + authorbox[i]->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); grid->addWidget(authorbox[i], 1, 1); - QLabel *datelabel = new QLabel(i18n("Date:"), mainWidget); + TQLabel *datelabel = new TQLabel(i18n("Date:"), mainWidget); grid->addWidget(datelabel, 1, 2); - datebox[i] = new QLabel(mainWidget); - datebox[i]->setFrameStyle(QFrame::Panel | QFrame::Sunken); + datebox[i] = new TQLabel(mainWidget); + datebox[i]->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); grid->addWidget(datebox[i], 1, 3); - QLabel *commentlabel = new QLabel(i18n("Comment/Tags:"), mainWidget); + TQLabel *commentlabel = new TQLabel(i18n("Comment/Tags:"), mainWidget); grid->addWidget(commentlabel, 2, 0); - commentbox[i] = new QTextEdit(mainWidget); + commentbox[i] = new TQTextEdit(mainWidget); commentbox[i]->setReadOnly(true); commentbox[i]->setTextFormat(Qt::PlainText); fm = commentbox[i]->fontMetrics(); commentbox[i]->setMinimumHeight(2*fm.lineSpacing()+10); grid->addMultiCellWidget(commentbox[i], 2, 2, 1, 3); - tagsbox[i] = new QTextEdit(mainWidget); + tagsbox[i] = new TQTextEdit(mainWidget); tagsbox[i]->setReadOnly(true); tagsbox[i]->setMinimumHeight(2*fm.lineSpacing()+10); grid->addWidget(tagsbox[i], 2, 4); } - QWhatsThis::add(revbox[0], i18n("This revision is used when you click " + TQWhatsThis::add(revbox[0], i18n("This revision is used when you click " "Annotate.\nIt is also used as the first " "item of a Diff operation.")); - QWhatsThis::add(revbox[1], i18n("This revision is used as the second " + TQWhatsThis::add(revbox[1], i18n("This revision is used as the second " "item of a Diff operation.")); - connect( tagcombo[0], SIGNAL(activated(int)), - this, SLOT(tagASelected(int)) ); - connect( tagcombo[1], SIGNAL(activated(int)), - this, SLOT(tagBSelected(int)) ); + connect( tagcombo[0], TQT_SIGNAL(activated(int)), + this, TQT_SLOT(tagASelected(int)) ); + connect( tagcombo[1], TQT_SIGNAL(activated(int)), + this, TQT_SLOT(tagBSelected(int)) ); - connect( this, SIGNAL(user1Clicked()), - this, SLOT(annotateClicked()) ); - connect( this, SIGNAL(user2Clicked()), - this, SLOT(diffClicked()) ); - connect( this, SIGNAL(user3Clicked()), - this, SLOT(findClicked()) ); + connect( this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(annotateClicked()) ); + connect( this, TQT_SIGNAL(user2Clicked()), + this, TQT_SLOT(diffClicked()) ); + connect( this, TQT_SIGNAL(user3Clicked()), + this, TQT_SLOT(findClicked()) ); setButtonGuiItem(Ok, KGuiItem(i18n("to view something", "&View"),"fileopen")); setButtonGuiItem(Apply, KGuiItem(i18n("Create Patch..."))); @@ -201,7 +201,7 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name) setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "LogDialog"); + TQSize size = configDialogSize(partConfig, "LogDialog"); resize(size); KConfigGroupSaver cs(&partConfig, "LogDialog"); @@ -220,9 +220,9 @@ LogDialog::~LogDialog() } -bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) +bool LogDialog::parseCvsLog(CvsService_stub* service, const TQString& fileName) { - QString rev; + TQString rev; Cervisia::LogInfo logInfo; @@ -245,7 +245,7 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) // process cvs log output state = Begin; - QString line; + TQString line; while( dlg.getLine(line) ) { switch( state ) @@ -257,10 +257,10 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) case Tags: if( line[0] == '\t' ) { - const QStringList strlist(splitLine(line, ':')); + const TQStringList strlist(splitLine(line, ':')); rev = strlist[1].simplifyWhiteSpace(); - const QString tag(strlist[0].simplifyWhiteSpace()); - QString branchpoint; + const TQString tag(strlist[0].simplifyWhiteSpace()); + TQString branchpoint; int pos1, pos2; if( (pos2 = rev.findRev('.')) > 0 && (pos1 = rev.findRev('.', pos2-1)) > 0 && @@ -298,15 +298,15 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) break; case Author: { - QStringList strList = QStringList::split(";", line); + TQStringList strList = TQStringList::split(";", line); // convert date into ISO format (YYYY-MM-DDTHH:MM:SS) int len = strList[0].length(); - QString dateTimeStr = strList[0].right(len-6); // remove 'date: ' + TQString dateTimeStr = strList[0].right(len-6); // remove 'date: ' dateTimeStr.replace('/', '-'); - QString date = dateTimeStr.section(' ', 0, 0); - QString time = dateTimeStr.section(' ', 1, 1); + TQString date = dateTimeStr.section(' ', 0, 0); + TQString time = dateTimeStr.section(' ', 1, 1); logInfo.m_dateTime.setTime_t(KRFCDate::parseDateISO8601(date + 'T' + time)); logInfo.m_author = strList[1].section(':', 1, 1).stripWhiteSpace(); @@ -335,7 +335,7 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) else { // Create tagcomment - QString branchrev; + TQString branchrev; int pos1, pos2; // 1.60.x.y => revision belongs to branch 1.60.0.x if( (pos2 = rev.findRev('.')) > 0 && @@ -343,7 +343,7 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) branchrev = rev.left(pos2); // Build Cervisia::TagInfo for logInfo - QPtrListIterator it(tags); + TQPtrListIterator it(tags); for( ; it.current(); ++it ) { if( rev == it.current()->rev ) @@ -380,12 +380,12 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) } } - tagcombo[0]->insertItem(QString::null); - tagcombo[1]->insertItem(QString::null); - QPtrListIterator it(tags); + tagcombo[0]->insertItem(TQString::null); + tagcombo[1]->insertItem(TQString::null); + TQPtrListIterator it(tags); for( ; it.current(); ++it ) { - QString str = it.current()->tag; + TQString str = it.current()->tag; if( !it.current()->branchpoint.isEmpty() ) str += i18n(" (Branchpoint)"); tagcombo[0]->insertItem(str); @@ -412,15 +412,15 @@ void LogDialog::slotOk() } // retrieve the selected revision - QString revision; + TQString revision; if( !selectionA.isEmpty() ) revision = selectionA; else revision = selectionB; // create a temporary file - const QString suffix("-" + revision + "-" + QFileInfo(filename).fileName()); - const QString tempFileName(::tempFileName(suffix)); + const TQString suffix("-" + revision + "-" + TQFileInfo(filename).fileName()); + const TQString tempFileName(::tempFileName(suffix)); // retrieve the file with the selected revision from cvs // and save the content into the temporary file @@ -432,7 +432,7 @@ void LogDialog::slotOk() if( dlg.execute() ) { // make file read-only - chmod(QFile::encodeName(tempFileName), 0400); + chmod(TQFile::encodeName(tempFileName), 0400); // open file in preferred editor KURL url; @@ -456,8 +456,8 @@ void LogDialog::slotApply() if( optionDlg.exec() == KDialogBase::Rejected ) return; - QString format = optionDlg.formatOption(); - QString diffOptions = optionDlg.diffOptions(); + TQString format = optionDlg.formatOption(); + TQString diffOptions = optionDlg.diffOptions(); DCOPRef job = cvsService->diff(filename, selectionA, selectionB, diffOptions, format); @@ -468,14 +468,14 @@ void LogDialog::slotApply() if( !dlg.execute() ) return; - QString fileName = KFileDialog::getSaveFileName(); + TQString fileName = KFileDialog::getSaveFileName(); if( fileName.isEmpty() ) return; if( !Cervisia::CheckOverwrite(fileName) ) return; - QFile f(fileName); + TQFile f(fileName); if( !f.open(IO_WriteOnly) ) { KMessageBox::sorry(this, @@ -484,8 +484,8 @@ void LogDialog::slotApply() return; } - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; while( dlg.getLine(line) ) t << line << '\n'; @@ -528,9 +528,9 @@ void LogDialog::annotateClicked() } -void LogDialog::revisionSelected(QString rev, bool rmb) +void LogDialog::revisionSelected(TQString rev, bool rmb) { - QPtrListIterator it(items); + TQPtrListIterator it(items); for (; it.current(); ++it) if (it.current()->m_revision == rev) { @@ -607,7 +607,7 @@ void LogDialog::tagBSelected(int n) } -void LogDialog::tabChanged(QWidget* w) +void LogDialog::tabChanged(TQWidget* w) { bool isPlainView = (w == plain); showButton(User3, isPlainView); diff --git a/cervisia/logdlg.h b/cervisia/logdlg.h index c5cce4b3..ad50f6e4 100644 --- a/cervisia/logdlg.h +++ b/cervisia/logdlg.h @@ -25,7 +25,7 @@ #include "loginfo.h" -#include +#include class LogListView; @@ -43,9 +43,9 @@ class CvsService_stub; class LogDialogTagInfo { public: - QString rev; - QString tag; - QString branchpoint; + TQString rev; + TQString tag; + TQString branchpoint; }; @@ -54,11 +54,11 @@ class LogDialog : public KDialogBase Q_OBJECT public: - explicit LogDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit LogDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~LogDialog(); - bool parseCvsLog(CvsService_stub* service, const QString& fileName); + bool parseCvsLog(CvsService_stub* service, const TQString& fileName); protected slots: void slotOk(); @@ -68,30 +68,30 @@ private slots: void findClicked(); void diffClicked(); void annotateClicked(); - void revisionSelected(QString rev, bool rmb); + void revisionSelected(TQString rev, bool rmb); void tagASelected(int n); void tagBSelected(int n); - void tabChanged(QWidget* w); + void tabChanged(TQWidget* w); private: void tagSelected(LogDialogTagInfo* tag, bool rmb); void updateButtons(); - QString filename; - QPtrList items; - QPtrList tags; - QString selectionA; - QString selectionB; + TQString filename; + TQPtrList items; + TQPtrList tags; + TQString selectionA; + TQString selectionB; LogTreeView *tree; LogListView *list; LogPlainView *plain; - QTabWidget *tabWidget; - QLabel *revbox[2]; - QLabel *authorbox[2]; - QLabel *datebox[2]; - QTextEdit *commentbox[2]; - QTextEdit *tagsbox[2]; - QComboBox *tagcombo[2]; + TQTabWidget *tabWidget; + TQLabel *revbox[2]; + TQLabel *authorbox[2]; + TQLabel *datebox[2]; + TQTextEdit *commentbox[2]; + TQTextEdit *tagsbox[2]; + TQComboBox *tagcombo[2]; CvsService_stub* cvsService; KConfig& partConfig; diff --git a/cervisia/loginfo.cpp b/cervisia/loginfo.cpp index 49f7efb2..b97ff1f0 100644 --- a/cervisia/loginfo.cpp +++ b/cervisia/loginfo.cpp @@ -19,7 +19,7 @@ #include "loginfo.h" -#include +#include #include #include @@ -29,19 +29,19 @@ namespace Cervisia { -TagInfo::TagInfo(const QString& name, Type type) +TagInfo::TagInfo(const TQString& name, Type type) : m_name(name), m_type(type) { } -QString TagInfo::toString(bool prefixWithType) const +TQString TagInfo::toString(bool prefixWithType) const { - QString text; + TQString text; if (prefixWithType) { - text += typeToString() + QString::fromLatin1(": "); + text += typeToString() + TQString::fromLatin1(": "); } text += m_name; @@ -49,9 +49,9 @@ QString TagInfo::toString(bool prefixWithType) const } -QString TagInfo::typeToString() const +TQString TagInfo::typeToString() const { - QString text; + TQString text; switch (m_type) { case Branch: @@ -69,41 +69,41 @@ QString TagInfo::typeToString() const } -QString LogInfo::createToolTipText(bool showTime) const +TQString LogInfo::createToolTipText(bool showTime) const { - QString text(QString::fromLatin1("")); - text += QStyleSheet::escape(m_revision); - text += QString::fromLatin1("  "); - text += QStyleSheet::escape(m_author); - text += QString::fromLatin1("  "); - text += QStyleSheet::escape(dateTimeToString(showTime)); - text += QString::fromLatin1(""); + TQString text(TQString::fromLatin1("")); + text += TQStyleSheet::escape(m_revision); + text += TQString::fromLatin1("  "); + text += TQStyleSheet::escape(m_author); + text += TQString::fromLatin1("  "); + text += TQStyleSheet::escape(dateTimeToString(showTime)); + text += TQString::fromLatin1(""); if (!m_comment.isEmpty()) { - text += QString::fromLatin1("
");
-        text += QStyleSheet::escape(m_comment);
-        text += QString::fromLatin1("
"); + text += TQString::fromLatin1("
");
+        text += TQStyleSheet::escape(m_comment);
+        text += TQString::fromLatin1("
"); } if (!m_tags.isEmpty()) { - text += QString::fromLatin1(""); + text += TQString::fromLatin1(""); for (TTagInfoSeq::const_iterator it = m_tags.begin(); it != m_tags.end(); ++it) { if (it != m_tags.begin() || m_comment.isEmpty()) - text += QString::fromLatin1("
"); - text += QStyleSheet::escape((*it).toString()); + text += TQString::fromLatin1("
"); + text += TQStyleSheet::escape((*it).toString()); } - text += QString::fromLatin1("
"); + text += TQString::fromLatin1("
"); } return text; } -QString LogInfo::dateTimeToString(bool showTime, bool shortFormat) const +TQString LogInfo::dateTimeToString(bool showTime, bool shortFormat) const { if( showTime ) return KGlobal::locale()->formatDateTime(m_dateTime, shortFormat); @@ -112,11 +112,11 @@ QString LogInfo::dateTimeToString(bool showTime, bool shortFormat) const } -QString LogInfo::tagsToString(unsigned int types, +TQString LogInfo::tagsToString(unsigned int types, unsigned int prefixWithType, - const QString& separator) const + const TQString& separator) const { - QString text; + TQString text; for (TTagInfoSeq::const_iterator it = m_tags.begin(); it != m_tags.end(); ++it) { diff --git a/cervisia/loginfo.h b/cervisia/loginfo.h index e4eb7071..92c67312 100644 --- a/cervisia/loginfo.h +++ b/cervisia/loginfo.h @@ -21,9 +21,9 @@ #define CERVISIA_LOGINFO_H -#include -#include -#include +#include +#include +#include namespace Cervisia @@ -58,7 +58,7 @@ struct TagInfo Tag = 1 << 2 }; - explicit TagInfo(const QString& name = QString::null, Type type = Tag); + explicit TagInfo(const TQString& name = TQString::null, Type type = Tag); /** * @param prefixWithType prefix the string with the type of the tag @@ -66,17 +66,17 @@ struct TagInfo * * @return tag as string. */ - QString toString(bool prefixWithType = true) const; + TQString toString(bool prefixWithType = true) const; /** * @return type of tag as string. */ - QString typeToString() const; + TQString typeToString() const; /** * The name of the tag. */ - QString m_name; + TQString m_name; /** * The type of the tag. @@ -91,14 +91,14 @@ struct TagInfo */ struct LogInfo { - typedef QValueList TTagInfoSeq; + typedef TQValueList TTagInfoSeq; /** * @param showTime show commit time in tooltip. * * @return rich text formatted tooltip text. */ - QString createToolTipText(bool showTime = true) const; + TQString createToolTipText(bool showTime = true) const; /** * Calls KLocale::formatDateTime() to create a formatted string. @@ -108,7 +108,7 @@ struct LogInfo * * @return The date/time formatted to the user's locale's conventions. */ - QString dateTimeToString(bool showTime = true, bool shortFormat = true) const; + TQString dateTimeToString(bool showTime = true, bool shortFormat = true) const; enum { @@ -126,29 +126,29 @@ struct LogInfo * * @return string of joined tags. */ - QString tagsToString(unsigned int types = AllTagTypes, + TQString tagsToString(unsigned int types = AllTagTypes, unsigned int prefixWithType = AllTagTypes, - const QString& separator = QString(QChar('\n'))) const; + const TQString& separator = TQString(TQChar('\n'))) const; /** * The revision of this entry. */ - QString m_revision; + TQString m_revision; /** * The author who committed. */ - QString m_author; + TQString m_author; /** * The commit message. */ - QString m_comment; + TQString m_comment; /** * The date/time of the commit. */ - QDateTime m_dateTime; + TQDateTime m_dateTime; /** * Sequence of tags of this entry. diff --git a/cervisia/loglist.cpp b/cervisia/loglist.cpp index 101dd3d7..833a2429 100644 --- a/cervisia/loglist.cpp +++ b/cervisia/loglist.cpp @@ -20,8 +20,8 @@ #include "loglist.h" -#include -#include +#include +#include #include #include "loginfo.h" @@ -35,19 +35,19 @@ public: enum { Revision, Author, Date, Branch, Comment, Tags }; - LogListViewItem(QListView* list, const Cervisia::LogInfo& logInfo); + LogListViewItem(TQListView* list, const Cervisia::LogInfo& logInfo); - virtual int compare(QListViewItem* i, int col, bool) const; + virtual int compare(TQListViewItem* i, int col, bool) const; private: - static QString truncateLine(const QString &s); + static TQString truncateLine(const TQString &s); Cervisia::LogInfo m_logInfo; friend class LogListView; }; -LogListViewItem::LogListViewItem(QListView* list, const Cervisia::LogInfo& logInfo) +LogListViewItem::LogListViewItem(TQListView* list, const Cervisia::LogInfo& logInfo) : KListViewItem(list), m_logInfo(logInfo) { @@ -69,15 +69,15 @@ LogListViewItem::LogListViewItem(QListView* list, const Cervisia::LogInfo& logIn setText(Tags, logInfo.tagsToString(Cervisia::TagInfo::Tag, Cervisia::LogInfo::NoTagType, - QString::fromLatin1(", "))); + TQString::fromLatin1(", "))); } -QString LogListViewItem::truncateLine(const QString &s) +TQString LogListViewItem::truncateLine(const TQString &s) { int pos; - QString res = s.simplifyWhiteSpace(); + TQString res = s.simplifyWhiteSpace(); if ( (pos = res.find('\n')) != -1 ) res = res.left(pos) + "..."; @@ -85,7 +85,7 @@ QString LogListViewItem::truncateLine(const QString &s) } -int LogListViewItem::compare(QListViewItem* i, int col, bool ascending) const +int LogListViewItem::compare(TQListViewItem* i, int col, bool ascending) const { const LogListViewItem* item = static_cast(i); @@ -99,14 +99,14 @@ int LogListViewItem::compare(QListViewItem* i, int col, bool ascending) const iResult = ::compare(m_logInfo.m_dateTime, item->m_logInfo.m_dateTime); break; default: - iResult = QListViewItem::compare(i, col, ascending); + iResult = TQListViewItem::compare(i, col, ascending); } return iResult; } -LogListView::LogListView(KConfig& cfg, QWidget *parent, const char *name) +LogListView::LogListView(KConfig& cfg, TQWidget *parent, const char *name) : KListView(parent, name) , partConfig(cfg) { @@ -124,20 +124,20 @@ LogListView::LogListView(KConfig& cfg, QWidget *parent, const char *name) Cervisia::ToolTip* toolTip = new Cervisia::ToolTip(viewport()); - connect(toolTip, SIGNAL(queryToolTip(const QPoint&, QRect&, QString&)), - this, SLOT(slotQueryToolTip(const QPoint&, QRect&, QString&))); + connect(toolTip, TQT_SIGNAL(queryToolTip(const TQPoint&, TQRect&, TQString&)), + this, TQT_SLOT(slotQueryToolTip(const TQPoint&, TQRect&, TQString&))); // without this restoreLayout() can't change the column widths for (int i = 0; i < columns(); ++i) setColumnWidthMode(i, Manual); - restoreLayout(&partConfig, QString::fromLatin1("LogList view")); + restoreLayout(&partConfig, TQString::fromLatin1("LogList view")); } LogListView::~LogListView() { - saveLayout(&partConfig, QString::fromLatin1("LogList view")); + saveLayout(&partConfig, TQString::fromLatin1("LogList view")); } @@ -147,9 +147,9 @@ void LogListView::addRevision(const Cervisia::LogInfo& logInfo) } -void LogListView::setSelectedPair(const QString &selectionA, const QString &selectionB) +void LogListView::setSelectedPair(const TQString &selectionA, const TQString &selectionB) { - for ( QListViewItem *item = firstChild(); item; + for ( TQListViewItem *item = firstChild(); item; item = item->nextSibling() ) { LogListViewItem *i = static_cast(item); @@ -158,7 +158,7 @@ void LogListView::setSelectedPair(const QString &selectionA, const QString &sele } } -void LogListView::contentsMousePressEvent(QMouseEvent *e) +void LogListView::contentsMousePressEvent(TQMouseEvent *e) { // Retrieve selected item const LogListViewItem* selItem @@ -167,7 +167,7 @@ void LogListView::contentsMousePressEvent(QMouseEvent *e) return; // Retrieve revision - const QString revision = selItem->text(LogListViewItem::Revision); + const TQString revision = selItem->text(LogListViewItem::Revision); if ( e->button() == LeftButton ) { @@ -182,7 +182,7 @@ void LogListView::contentsMousePressEvent(QMouseEvent *e) } -void LogListView::keyPressEvent(QKeyEvent *e) +void LogListView::keyPressEvent(TQKeyEvent *e) { switch (e->key()) { case Key_A: @@ -203,9 +203,9 @@ void LogListView::keyPressEvent(QKeyEvent *e) case Key_Next: case Key_Prior: if (e->state() == 0) - QListView::keyPressEvent(e); + TQListView::keyPressEvent(e); else - QApplication::postEvent(this, new QKeyEvent(QEvent::KeyPress, e->key(), e->ascii(), 0)); + TQApplication::postEvent(this, new TQKeyEvent(TQEvent::KeyPress, e->key(), e->ascii(), 0)); break; default: // Ignore Key_Enter, Key_Return @@ -214,9 +214,9 @@ void LogListView::keyPressEvent(QKeyEvent *e) } -void LogListView::slotQueryToolTip(const QPoint& viewportPos, - QRect& viewportRect, - QString& text) +void LogListView::slotQueryToolTip(const TQPoint& viewportPos, + TQRect& viewportRect, + TQString& text) { if (const LogListViewItem* item = static_cast(itemAt(viewportPos))) { diff --git a/cervisia/loglist.h b/cervisia/loglist.h index dc2bca08..3c608ea8 100644 --- a/cervisia/loglist.h +++ b/cervisia/loglist.h @@ -41,22 +41,22 @@ class LogListView : public KListView Q_OBJECT public: - explicit LogListView( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit LogListView( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~LogListView(); void addRevision(const Cervisia::LogInfo& logInfo); - void setSelectedPair(const QString &selectionA, const QString &selectionB); + void setSelectedPair(const TQString &selectionA, const TQString &selectionB); signals: - void revisionClicked(QString rev, bool rmb); + void revisionClicked(TQString rev, bool rmb); protected: - virtual void contentsMousePressEvent(QMouseEvent *e); - virtual void keyPressEvent(QKeyEvent *e); + virtual void contentsMousePressEvent(TQMouseEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); private slots: - void slotQueryToolTip(const QPoint&, QRect&, QString&); + void slotQueryToolTip(const TQPoint&, TQRect&, TQString&); private: diff --git a/cervisia/logmessageedit.cpp b/cervisia/logmessageedit.cpp index 33599409..f861c873 100644 --- a/cervisia/logmessageedit.cpp +++ b/cervisia/logmessageedit.cpp @@ -22,11 +22,11 @@ #include "logmessageedit.h" using Cervisia::LogMessageEdit; -#include +#include #include -LogMessageEdit::LogMessageEdit(QWidget* parent) +LogMessageEdit::LogMessageEdit(TQWidget* parent) : KTextEdit(parent) , KCompletionBase() , m_completing(false) @@ -36,18 +36,18 @@ LogMessageEdit::LogMessageEdit(QWidget* parent) completionObject(); // a mouse click stops the completion process - connect( this, SIGNAL(clicked(int, int)), SLOT(stopCompletion()) ); + connect( this, TQT_SIGNAL(clicked(int, int)), TQT_SLOT(stopCompletion()) ); } -void LogMessageEdit::setCompletedText(const QString& match) +void LogMessageEdit::setCompletedText(const TQString& match) { int para, index; getCursorPosition(¶, &index); - QString paragraphText = text(para); + TQString paragraphText = text(para); int length = index - m_completionStartPos; - QString word = match.right(match.length() - length); + TQString word = match.right(match.length() - length); insert(word); @@ -62,12 +62,12 @@ void LogMessageEdit::setCompletedText(const QString& match) } -void LogMessageEdit::setCompletedItems(const QStringList&) +void LogMessageEdit::setCompletedItems(const TQStringList&) { } -void LogMessageEdit::keyPressEvent(QKeyEvent* event) +void LogMessageEdit::keyPressEvent(TQKeyEvent* event) { bool noModifier = (event->state() == NoButton || event->state() == ShiftButton || @@ -75,7 +75,7 @@ void LogMessageEdit::keyPressEvent(QKeyEvent* event) if( noModifier ) { - QString keycode = event->text(); + TQString keycode = event->text(); if( !keycode.isEmpty() && keycode.unicode()->isPrint() ) { KTextEdit::keyPressEvent(event); @@ -155,16 +155,16 @@ void LogMessageEdit::tryCompletion() int para, index; getCursorPosition(¶, &index); - QString paragraphText = text(para); + TQString paragraphText = text(para); if( paragraphText.at(index).isSpace() ) { if( !m_completing ) m_completionStartPos = paragraphText.findRev(' ', index-1) + 1; int length = index - m_completionStartPos; - QString word = paragraphText.mid(m_completionStartPos, length); + TQString word = paragraphText.mid(m_completionStartPos, length); - QString match = compObj()->makeCompletion(word); + TQString match = compObj()->makeCompletion(word); if( !match.isNull() && match != word ) { setCompletedText(match); @@ -184,15 +184,15 @@ void LogMessageEdit::rotateMatches(KeyBindingType type) if( completionObj && m_completing && (type == PrevCompletionMatch || type == NextCompletionMatch) ) { - QString match = (type == PrevCompletionMatch) ? completionObj->previousMatch() + TQString match = (type == PrevCompletionMatch) ? completionObj->previousMatch() : completionObj->nextMatch(); int para, index; getCursorPosition(¶, &index); - QString paragraphText = text(para); + TQString paragraphText = text(para); - QString word = paragraphText.mid(m_completionStartPos, index - m_completionStartPos); + TQString word = paragraphText.mid(m_completionStartPos, index - m_completionStartPos); if( match.isNull() || match == word ) return; diff --git a/cervisia/logmessageedit.h b/cervisia/logmessageedit.h index 05de18fa..c27865b6 100644 --- a/cervisia/logmessageedit.h +++ b/cervisia/logmessageedit.h @@ -35,13 +35,13 @@ class LogMessageEdit : public KTextEdit, public KCompletionBase Q_OBJECT public: - explicit LogMessageEdit(QWidget* parent); + explicit LogMessageEdit(TQWidget* parent); - virtual void setCompletedText(const QString& match); - virtual void setCompletedItems(const QStringList& items); + virtual void setCompletedText(const TQString& match); + virtual void setCompletedItems(const TQStringList& items); protected: - void keyPressEvent(QKeyEvent* event); + void keyPressEvent(TQKeyEvent* event); private slots: void stopCompletion(); diff --git a/cervisia/logplainview.cpp b/cervisia/logplainview.cpp index ca28f8b0..413180af 100644 --- a/cervisia/logplainview.cpp +++ b/cervisia/logplainview.cpp @@ -19,9 +19,9 @@ #include "logplainview.h" -#include -#include -#include +#include +#include +#include #include #include #include @@ -31,7 +31,7 @@ using namespace Cervisia; -LogPlainView::LogPlainView(QWidget* parent, const char* name) +LogPlainView::LogPlainView(TQWidget* parent, const char* name) : KTextBrowser(parent, name) , m_find(0) , m_findPos(0) @@ -48,76 +48,76 @@ LogPlainView::~LogPlainView() void LogPlainView::addRevision(const LogInfo& logInfo) { - setTextFormat(QStyleSheet::RichText); + setTextFormat(TQStyleSheet::RichText); // assemble revision information lines - QString logEntry; + TQString logEntry; - logEntry += "" + i18n("revision %1").arg(QStyleSheet::escape(logInfo.m_revision)) + + logEntry += "" + i18n("revision %1").arg(TQStyleSheet::escape(logInfo.m_revision)) + ""; - logEntry += "  [" + + logEntry += "  [" + i18n("Select for revision A") + "]"; - logEntry += " [" + + logEntry += " [" + i18n("Select for revision B") + "]
"; logEntry += "" + - i18n("date: %1; author: %2").arg(QStyleSheet::escape(logInfo.dateTimeToString())) - .arg(QStyleSheet::escape(logInfo.m_author)) + + i18n("date: %1; author: %2").arg(TQStyleSheet::escape(logInfo.dateTimeToString())) + .arg(TQStyleSheet::escape(logInfo.m_author)) + ""; append(logEntry); - setTextFormat(QStyleSheet::PlainText); + setTextFormat(TQStyleSheet::PlainText); - const QChar newline('\n'); + const TQChar newline('\n'); // split comment in separate lines - QStringList lines = QStringList::split(newline, logInfo.m_comment, true); + TQStringList lines = TQStringList::split(newline, logInfo.m_comment, true); append(newline); - QStringList::Iterator it = lines.begin(); - QStringList::Iterator end = lines.end(); + TQStringList::Iterator it = lines.begin(); + TQStringList::Iterator end = lines.end(); for( ; it != end; ++it ) { - append((*it).isEmpty() ? QString(newline) : *it); + append((*it).isEmpty() ? TQString(newline) : *it); } append(newline); - setTextFormat(QStyleSheet::RichText); + setTextFormat(TQStyleSheet::RichText); for( LogInfo::TTagInfoSeq::const_iterator it = logInfo.m_tags.begin(); it != logInfo.m_tags.end(); ++it ) { - append("" + QStyleSheet::escape((*it).toString()) + ""); + append("" + TQStyleSheet::escape((*it).toString()) + ""); } // add an empty line when we had tags or branches if( !logInfo.m_tags.empty() ) { - setTextFormat(QStyleSheet::PlainText); + setTextFormat(TQStyleSheet::PlainText); append(newline); } // add horizontal line - setTextFormat(QStyleSheet::RichText); + setTextFormat(TQStyleSheet::RichText); append("
"); } -void LogPlainView::searchText(int options, const QString& pattern) +void LogPlainView::searchText(int options, const TQString& pattern) { m_find = new KFind(pattern, options, this); - connect(m_find, SIGNAL(highlight(const QString&, int, int)), - this, SLOT(searchHighlight(const QString&, int, int))); - connect(m_find, SIGNAL(findNext()), - this, SLOT(findNext())); + connect(m_find, TQT_SIGNAL(highlight(const TQString&, int, int)), + this, TQT_SLOT(searchHighlight(const TQString&, int, int))); + connect(m_find, TQT_SIGNAL(findNext()), + this, TQT_SLOT(findNext())); m_findPos = 0; if( options & KFindDialog::FromCursor ) { - const QPoint pos(contentsX(), contentsY()); + const TQPoint pos(contentsX(), contentsY()); m_findPos = paragraphAt(pos); } @@ -133,8 +133,8 @@ void LogPlainView::scrollToTop() void LogPlainView::findNext() { - static const QRegExp breakLineTag("]*>"); - static const QRegExp htmlTags("<[^>]*>"); + static const TQRegExp breakLineTag("]*>"); + static const TQRegExp htmlTags("<[^>]*>"); KFind::Result res = KFind::NoMatch; @@ -142,7 +142,7 @@ void LogPlainView::findNext() { if( m_find->needData() ) { - QString richText = text(m_findPos); + TQString richText = text(m_findPos); // replace
with '\n' richText.replace(breakLineTag, "\n"); @@ -181,14 +181,14 @@ void LogPlainView::findNext() } -void LogPlainView::searchHighlight(const QString& text, int index, int length) +void LogPlainView::searchHighlight(const TQString& text, int index, int length) { Q_UNUSED(text); setSelection(m_findPos, index, m_findPos, index + length); } -void LogPlainView::setSource(const QString& name) +void LogPlainView::setSource(const TQString& name) { if( name.isEmpty() ) return; diff --git a/cervisia/logplainview.h b/cervisia/logplainview.h index f5da46a5..37e60f7b 100644 --- a/cervisia/logplainview.h +++ b/cervisia/logplainview.h @@ -36,23 +36,23 @@ class LogPlainView : public KTextBrowser Q_OBJECT public: - explicit LogPlainView(QWidget* parent = 0, const char* name = 0); + explicit LogPlainView(TQWidget* parent = 0, const char* name = 0); ~LogPlainView(); void addRevision(const Cervisia::LogInfo& logInfo); - void searchText(int options, const QString& pattern); + void searchText(int options, const TQString& pattern); signals: - void revisionClicked(QString rev, bool rmb); + void revisionClicked(TQString rev, bool rmb); public slots: void scrollToTop(); void findNext(); - void searchHighlight(const QString& text, int index, int length); + void searchHighlight(const TQString& text, int index, int length); protected: - virtual void setSource(const QString& name); + virtual void setSource(const TQString& name); private: KFind* m_find; diff --git a/cervisia/logtree.cpp b/cervisia/logtree.cpp index 1b5258ad..d0e8e6d2 100644 --- a/cervisia/logtree.cpp +++ b/cervisia/logtree.cpp @@ -20,7 +20,7 @@ #include "logtree.h" -#include +#include #include #include #include @@ -43,7 +43,7 @@ class LogTreeItem { public: Cervisia::LogInfo m_logInfo; - QString branchpoint; + TQString branchpoint; bool firstonbranch; int row; int col; @@ -59,13 +59,13 @@ public: }; -LogTreeView::LogTreeView(QWidget *parent, const char *name) - : QTable(parent, name) +LogTreeView::LogTreeView(TQWidget *parent, const char *name) + : TQTable(parent, name) { if (!static_initialized) { static_initialized = true; - QFontMetrics fm( fontMetrics() ); + TQFontMetrics fm( fontMetrics() ); static_width = fm.width("1234567890") + 2*BORDER + 2*INSPACE; static_height = 2*fm.height() + 2*BORDER + 3*INSPACE; } @@ -73,14 +73,14 @@ LogTreeView::LogTreeView(QWidget *parent, const char *name) setNumCols(0); setNumRows(0); setReadOnly(true); - setFocusStyle(QTable::FollowStyle); - setSelectionMode(QTable::NoSelection); + setFocusStyle(TQTable::FollowStyle); + setSelectionMode(TQTable::NoSelection); setShowGrid(false); horizontalHeader()->hide(); setTopMargin(0); verticalHeader()->hide(); setLeftMargin(0); - setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); + setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken ); setBackgroundMode(PaletteBase); setFocusPolicy(NoFocus); @@ -92,16 +92,16 @@ LogTreeView::LogTreeView(QWidget *parent, const char *name) Cervisia::ToolTip* toolTip = new Cervisia::ToolTip(viewport()); - connect(toolTip, SIGNAL(queryToolTip(const QPoint&, QRect&, QString&)), - this, SLOT(slotQueryToolTip(const QPoint&, QRect&, QString&))); + connect(toolTip, TQT_SIGNAL(queryToolTip(const TQPoint&, TQRect&, TQString&)), + this, TQT_SLOT(slotQueryToolTip(const TQPoint&, TQRect&, TQString&))); } void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) { - QString branchpoint, branchrev; + TQString branchpoint, branchrev; - const QString rev(logInfo.m_revision); + const TQString rev(logInfo.m_revision); // find branch int pos1, pos2; @@ -133,7 +133,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) // look whether we have revisions on this branch // shift them up int row=-1, col=-1; - QPtrListIterator it(items); + TQPtrListIterator it(items); for (; it.current(); ++it) { if (branchrev == (it.current()->m_logInfo.m_revision).left(branchrev.length())) @@ -145,7 +145,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) // Are we at the top of the widget? if (row == 0) { - QPtrListIterator it2(items); + TQPtrListIterator it2(items); for (; it2.current(); ++it2) it2.current()->row++; setNumRows(numRows()+1); @@ -158,13 +158,13 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) { // Ok, so we must open a new branch // Let's find the branch point - QPtrListIterator it3(items); + TQPtrListIterator it3(items); for (it3.toLast(); it3.current(); --it3) { if (branchpoint == it3.current()->m_logInfo.m_revision) { // Move existing branches to the right - QPtrListIterator it4(items); + TQPtrListIterator it4(items); for (; it4.current(); ++it4) if (it4.current()->col > it3.current()->col) { @@ -175,7 +175,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) col = it3.current()->col+1; if (row == -1) { - QPtrListIterator it5(items); + TQPtrListIterator it5(items); for (; it5.current(); ++it5) it5.current()->row++; setNumRows(numRows()+1); @@ -198,7 +198,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) #if 0 cout << "Dump: " << endl; cout << "Rows: " << numRows() << "Cols: " << numCols() << endl; - QPtrListIterator it5(items); + TQPtrListIterator it5(items); for (; it5.current(); ++it5) { cout << "Rev: "<< it5.current()->rev << endl; @@ -213,12 +213,12 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) void LogTreeView::collectConnections() { - QPtrListIterator it(items); + TQPtrListIterator it(items); for (; it.current(); ++it) { - QString rev = it.current()->m_logInfo.m_revision; + TQString rev = it.current()->m_logInfo.m_revision; - QPtrListIterator it2(items); + TQPtrListIterator it2(items); for (it2=it,++it2; it2.current(); ++it2) if (it2.current()->branchpoint == rev && it2.current()->firstonbranch) @@ -232,9 +232,9 @@ void LogTreeView::collectConnections() } -void LogTreeView::setSelectedPair(QString selectionA, QString selectionB) +void LogTreeView::setSelectedPair(TQString selectionA, TQString selectionB) { - QPtrListIterator it(items); + TQPtrListIterator it(items); for(; it.current(); ++it) { bool oldstate = it.current()->selected; @@ -249,17 +249,17 @@ void LogTreeView::setSelectedPair(QString selectionA, QString selectionB) } -QSize LogTreeView::sizeHint() const +TQSize LogTreeView::sizeHint() const { - return QSize(2 * static_width, 3 * static_height); + return TQSize(2 * static_width, 3 * static_height); } -QString LogTreeView::text(int row, int col) const +TQString LogTreeView::text(int row, int col) const { LogTreeItem* item = 0; - QPtrListIterator it(items); + TQPtrListIterator it(items); for( ; it.current(); ++it ) { if( it.current()->col == col && it.current()->row == row ) @@ -269,7 +269,7 @@ QString LogTreeView::text(int row, int col) const } } - QString text; + TQString text; if( item && !item->m_logInfo.m_author.isNull() ) text = item->m_logInfo.createToolTipText(); @@ -278,8 +278,8 @@ QString LogTreeView::text(int row, int col) const } -void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr, - bool selected, const QColorGroup& cg) +void LogTreeView::paintCell(TQPainter *p, int row, int col, const TQRect& cr, + bool selected, const TQColorGroup& cg) { Q_UNUSED(selected) Q_UNUSED(cr) @@ -290,7 +290,7 @@ void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr, followed = false; item = 0; - QPtrListIterator it(items); + TQPtrListIterator it(items); for(; it.current(); ++it) { int itcol = it.current()->col; @@ -300,7 +300,7 @@ void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr, if (itrow == row && itcol == col) item = it.current(); } - QPtrListIterator it2(connections); + TQPtrListIterator it2(connections); for (; it2.current(); ++it2) { int itcol1 = it2.current()->start->col; @@ -321,7 +321,7 @@ void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr, } -void LogTreeView::paintConnector(QPainter *p, +void LogTreeView::paintConnector(TQPainter *p, int row, int col, bool followed, bool branched) { const int midx = columnWidth(col) / 2; @@ -333,17 +333,17 @@ void LogTreeView::paintConnector(QPainter *p, } -QSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo, +TQSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo, int* authorHeight, int* tagsHeight) const { - const QFontMetrics fm(fontMetrics()); + const TQFontMetrics fm(fontMetrics()); - const QString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag, + const TQString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag, Cervisia::TagInfo::Branch)); - const QSize r1 = fm.size(AlignCenter, logInfo.m_revision); - const QSize r3 = fm.size(AlignCenter, logInfo.m_author); + const TQSize r1 = fm.size(AlignCenter, logInfo.m_revision); + const TQSize r3 = fm.size(AlignCenter, logInfo.m_author); if (authorHeight) *authorHeight = r3.height(); @@ -353,7 +353,7 @@ QSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo, if (!tags.isEmpty()) { - const QSize r2 = fm.size(AlignCenter, tags); + const TQSize r2 = fm.size(AlignCenter, tags); infoWidth = kMax(infoWidth, r2.width()); infoHeight += r2.height() + INSPACE; if (tagsHeight) @@ -366,24 +366,24 @@ QSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo, } infoWidth += 2 * INSPACE; - return QSize(infoWidth, infoHeight); + return TQSize(infoWidth, infoHeight); } -void LogTreeView::paintRevisionCell(QPainter *p, +void LogTreeView::paintRevisionCell(TQPainter *p, int row, int col, const Cervisia::LogInfo& logInfo, bool followed, bool branched, bool selected) { int authorHeight; int tagsHeight; - const QSize infoSize(computeSize(logInfo, &authorHeight, &tagsHeight)); - const QSize cellSize(columnWidth(col), rowHeight(row)); + const TQSize infoSize(computeSize(logInfo, &authorHeight, &tagsHeight)); + const TQSize cellSize(columnWidth(col), rowHeight(row)); const int midx(cellSize.width() / 2); const int midy(cellSize.height() / 2); - QRect rect(QPoint((cellSize.width() - infoSize.width()) / 2, + TQRect rect(TQPoint((cellSize.width() - infoSize.width()) / 2, (cellSize.height() - infoSize.height()) / 2), infoSize); @@ -412,12 +412,12 @@ void LogTreeView::paintRevisionCell(QPainter *p, p->drawText(rect, AlignHCenter, logInfo.m_author); rect.setY(rect.y() + authorHeight + INSPACE); - const QString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag, + const TQString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag, Cervisia::TagInfo::Branch)); if (!tags.isEmpty()) { - const QFont font(p->font()); - QFont underline(font); + const TQFont font(p->font()); + TQFont underline(font); underline.setUnderline(true); p->setFont(underline); @@ -431,7 +431,7 @@ void LogTreeView::paintRevisionCell(QPainter *p, } -void LogTreeView::contentsMousePressEvent(QMouseEvent *e) +void LogTreeView::contentsMousePressEvent(TQMouseEvent *e) { if ( e->button() == MidButton || e->button() == LeftButton) @@ -439,7 +439,7 @@ void LogTreeView::contentsMousePressEvent(QMouseEvent *e) int row = rowAt( e->pos().y() ); int col = columnAt( e->pos().x() ); - QPtrListIterator it(items); + TQPtrListIterator it(items); for(; it.current(); ++it) if (it.current()->row == row && it.current()->col == col) @@ -462,11 +462,11 @@ void LogTreeView::contentsMousePressEvent(QMouseEvent *e) void LogTreeView::recomputeCellSizes () { // Compute maximum for each column and row - for (QPtrListIterator it(items); it.current(); ++it) + for (TQPtrListIterator it(items); it.current(); ++it) { const LogTreeItem *item = it.current(); - const QSize cellSize(computeSize(item->m_logInfo) + QSize(2 * BORDER, 2 * BORDER)); + const TQSize cellSize(computeSize(item->m_logInfo) + TQSize(2 * BORDER, 2 * BORDER)); setColumnWidth(item->col, kMax(columnWidth(item->col), cellSize.width())); setRowHeight(item->row, kMax(rowHeight(item->row), cellSize.height())); @@ -476,11 +476,11 @@ void LogTreeView::recomputeCellSizes () } -void LogTreeView::slotQueryToolTip(const QPoint& viewportPos, - QRect& viewportRect, - QString& tipText) +void LogTreeView::slotQueryToolTip(const TQPoint& viewportPos, + TQRect& viewportRect, + TQString& tipText) { - const QPoint contentsPos(viewportToContents(viewportPos)); + const TQPoint contentsPos(viewportToContents(viewportPos)); const int column(columnAt(contentsPos.x())); const int row(rowAt(contentsPos.y())); diff --git a/cervisia/logtree.h b/cervisia/logtree.h index 9ab505bc..360a1a99 100644 --- a/cervisia/logtree.h +++ b/cervisia/logtree.h @@ -23,9 +23,9 @@ #define LOGTREE_H -#include +#include -#include +#include class LogTreeItem; @@ -37,8 +37,8 @@ struct LogInfo; } -typedef QPtrList LogTreeItemList; -typedef QPtrList LogTreeConnectionList; +typedef TQPtrList LogTreeItemList; +typedef TQPtrList LogTreeConnectionList; class LogTreeView : public QTable @@ -46,34 +46,34 @@ class LogTreeView : public QTable Q_OBJECT public: - explicit LogTreeView( QWidget *parent=0, const char *name=0 ); + explicit LogTreeView( TQWidget *parent=0, const char *name=0 ); void addRevision(const Cervisia::LogInfo& logInfo); - void setSelectedPair(QString selectionA, QString selectionB); + void setSelectedPair(TQString selectionA, TQString selectionB); void collectConnections(); void recomputeCellSizes(); - virtual void paintCell(QPainter *p, int row, int col, const QRect& cr, - bool selected, const QColorGroup& cg); + virtual void paintCell(TQPainter *p, int row, int col, const TQRect& cr, + bool selected, const TQColorGroup& cg); - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; - virtual QString text(int row, int col) const; + virtual TQString text(int row, int col) const; signals: - void revisionClicked(QString rev, bool rmb); + void revisionClicked(TQString rev, bool rmb); protected: - virtual void contentsMousePressEvent(QMouseEvent *e); + virtual void contentsMousePressEvent(TQMouseEvent *e); private slots: - void slotQueryToolTip(const QPoint&, QRect&, QString&); + void slotQueryToolTip(const TQPoint&, TQRect&, TQString&); private: - QSize computeSize(const Cervisia::LogInfo&, int* = 0, int* = 0) const; - void paintRevisionCell(QPainter *p, int row, int col, const Cervisia::LogInfo& logInfo, + TQSize computeSize(const Cervisia::LogInfo&, int* = 0, int* = 0) const; + void paintRevisionCell(TQPainter *p, int row, int col, const Cervisia::LogInfo& logInfo, bool followed, bool branched, bool selected); - void paintConnector(QPainter *p, int row, int col, bool followed, bool branched); + void paintConnector(TQPainter *p, int row, int col, bool followed, bool branched); LogTreeItemList items; LogTreeConnectionList connections; diff --git a/cervisia/main.cpp b/cervisia/main.cpp index e8e6a505..9d6e181d 100644 --- a/cervisia/main.cpp +++ b/cervisia/main.cpp @@ -20,7 +20,7 @@ #include -#include +#include #include #include #include @@ -38,12 +38,12 @@ #include "version.h" -static CvsService_stub* StartDCOPService(const QString& directory) +static CvsService_stub* StartDCOPService(const TQString& directory) { // start the cvs DCOP service - QString error; - QCString appId; - if( KApplication::startServiceByDesktopName("cvsservice", QStringList(), + TQString error; + TQCString appId; + if( KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error, &appId) ) { std::cerr << "Starting cvsservice failed with message: " @@ -53,14 +53,14 @@ static CvsService_stub* StartDCOPService(const QString& directory) DCOPRef repository(appId, "CvsRepository"); - repository.call("setWorkingCopy(QString)", directory); + repository.call("setWorkingCopy(TQString)", directory); // create a reference to the service return new CvsService_stub(appId, "CvsService"); } -static int ShowResolveDialog(const QString& fileName) +static int ShowResolveDialog(const TQString& fileName) { KConfig* config = new KConfig("cervisiapartrc"); @@ -79,15 +79,15 @@ static int ShowResolveDialog(const QString& fileName) } -static int ShowLogDialog(const QString& fileName) +static int ShowLogDialog(const TQString& fileName) { KConfig* config = new KConfig("cervisiapartrc"); LogDialog* dlg = new LogDialog(*config); kapp->setMainWidget(dlg); // get directory for file - const QFileInfo fi(fileName); - QString directory = fi.dirPath(true); + const TQFileInfo fi(fileName); + TQString directory = fi.dirPath(true); // start the cvs DCOP service CvsService_stub* cvsService = StartDCOPService(directory); @@ -109,15 +109,15 @@ static int ShowLogDialog(const QString& fileName) } -static int ShowAnnotateDialog(const QString& fileName) +static int ShowAnnotateDialog(const TQString& fileName) { KConfig* config = new KConfig("cervisiapartrc"); AnnotateDialog* dlg = new AnnotateDialog(*config); kapp->setMainWidget(dlg); // get directory for file - const QFileInfo fi(fileName); - QString directory = fi.dirPath(true); + const TQFileInfo fi(fileName); + TQString directory = fi.dirPath(true); // start the cvs DCOP service CvsService_stub* cvsService = StartDCOPService(directory); @@ -169,17 +169,17 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) KApplication app; - QString resolvefile = KCmdLineArgs::parsedArgs()->getOption("resolve"); + TQString resolvefile = KCmdLineArgs::parsedArgs()->getOption("resolve"); if (!resolvefile.isEmpty()) return ShowResolveDialog(resolvefile); // is command line option 'show log dialog' specified? - QString logFile = KCmdLineArgs::parsedArgs()->getOption("log"); + TQString logFile = KCmdLineArgs::parsedArgs()->getOption("log"); if( !logFile.isEmpty() ) return ShowLogDialog(logFile); // is command line option 'show annotation dialog' specified? - QString annotateFile = KCmdLineArgs::parsedArgs()->getOption("annotate"); + TQString annotateFile = KCmdLineArgs::parsedArgs()->getOption("annotate"); if( !annotateFile.isEmpty() ) return ShowAnnotateDialog(annotateFile); diff --git a/cervisia/mergedlg.cpp b/cervisia/mergedlg.cpp index 92d337d5..e2b770c6 100644 --- a/cervisia/mergedlg.cpp +++ b/cervisia/mergedlg.cpp @@ -20,13 +20,13 @@ #include "mergedlg.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include "misc.h" @@ -34,50 +34,50 @@ MergeDialog::MergeDialog(CvsService_stub* service, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("CVS Merge"), Ok | Cancel, Ok, true), cvsService(service) { int const iComboBoxMinWidth(30 * fontMetrics().width('0')); - int const iWidgetIndent(style().pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, 0) + 6); + int const iWidgetIndent(style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0) + 6); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - bybranch_button = new QRadioButton(i18n("Merge from &branch:"), mainWidget); + bybranch_button = new TQRadioButton(i18n("Merge from &branch:"), mainWidget); bybranch_button->setChecked(true); layout->addWidget(bybranch_button); - branch_combo = new QComboBox(true, mainWidget); + branch_combo = new TQComboBox(true, mainWidget); branch_combo->setMinimumWidth(iComboBoxMinWidth); - branch_button = new QPushButton(i18n("Fetch &List"), mainWidget); - connect( branch_button, SIGNAL(clicked()), - this, SLOT(branchButtonClicked()) ); + branch_button = new TQPushButton(i18n("Fetch &List"), mainWidget); + connect( branch_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(branchButtonClicked()) ); - QBoxLayout *branchedit_layout = new QHBoxLayout(layout); + TQBoxLayout *branchedit_layout = new TQHBoxLayout(layout); branchedit_layout->addSpacing(iWidgetIndent); branchedit_layout->addWidget(branch_combo, 2); branchedit_layout->addWidget(branch_button, 0); - bytags_button = new QRadioButton(i18n("Merge &modifications:"), mainWidget); + bytags_button = new TQRadioButton(i18n("Merge &modifications:"), mainWidget); layout->addWidget(bytags_button); - QLabel *tag1_label = new QLabel(i18n("between tag: "), mainWidget); - tag1_combo = new QComboBox(true, mainWidget); + TQLabel *tag1_label = new TQLabel(i18n("between tag: "), mainWidget); + tag1_combo = new TQComboBox(true, mainWidget); tag1_combo->setMinimumWidth(iComboBoxMinWidth); - QLabel *tag2_label = new QLabel(i18n("and tag: "), mainWidget); - tag2_combo = new QComboBox(true, mainWidget); + TQLabel *tag2_label = new TQLabel(i18n("and tag: "), mainWidget); + tag2_combo = new TQComboBox(true, mainWidget); tag2_combo->setMinimumWidth(iComboBoxMinWidth); - tag_button = new QPushButton(i18n("Fetch L&ist"), mainWidget); - connect( tag_button, SIGNAL(clicked()), - this, SLOT(tagButtonClicked()) ); + tag_button = new TQPushButton(i18n("Fetch L&ist"), mainWidget); + connect( tag_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(tagButtonClicked()) ); - QGridLayout *tagsedit_layout = new QGridLayout(layout); + TQGridLayout *tagsedit_layout = new TQGridLayout(layout); tagsedit_layout->addColSpacing(0, iWidgetIndent); tagsedit_layout->setColStretch(0, 0); tagsedit_layout->setColStretch(1, 1); @@ -89,12 +89,12 @@ MergeDialog::MergeDialog(CvsService_stub* service, tagsedit_layout->addWidget(tag2_combo, 1, 2); tagsedit_layout->addMultiCellWidget(tag_button, 0, 1, 3, 3); - QButtonGroup* group = new QButtonGroup(mainWidget); + TQButtonGroup* group = new TQButtonGroup(mainWidget); group->hide(); group->insert(bybranch_button); group->insert(bytags_button); - connect( group, SIGNAL(clicked(int)), - this, SLOT(toggled()) ); + connect( group, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(toggled()) ); // dis-/enable the widgets toggled(); @@ -107,19 +107,19 @@ bool MergeDialog::byBranch() const } -QString MergeDialog::branch() const +TQString MergeDialog::branch() const { return branch_combo->currentText(); } -QString MergeDialog::tag1() const +TQString MergeDialog::tag1() const { return tag1_combo->currentText(); } -QString MergeDialog::tag2() const +TQString MergeDialog::tag2() const { return tag2_combo->currentText(); } @@ -127,7 +127,7 @@ QString MergeDialog::tag2() const void MergeDialog::tagButtonClicked() { - QStringList const listTags(::fetchTags(cvsService, this)); + TQStringList const listTags(::fetchTags(cvsService, this)); tag1_combo->clear(); tag1_combo->insertStringList(listTags); tag2_combo->clear(); diff --git a/cervisia/mergedlg.h b/cervisia/mergedlg.h index bd4464c1..63454dc6 100644 --- a/cervisia/mergedlg.h +++ b/cervisia/mergedlg.h @@ -37,12 +37,12 @@ class MergeDialog : public KDialogBase public: MergeDialog( CvsService_stub* service, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); bool byBranch() const; - QString branch() const; - QString tag1() const; - QString tag2() const; + TQString branch() const; + TQString tag1() const; + TQString tag2() const; private slots: void toggled(); @@ -52,9 +52,9 @@ private slots: private: CvsService_stub* cvsService; - QRadioButton *bybranch_button, *bytags_button; - QComboBox *branch_combo, *tag1_combo, *tag2_combo; - QPushButton *tag_button, *branch_button; + TQRadioButton *bybranch_button, *bytags_button; + TQComboBox *branch_combo, *tag1_combo, *tag2_combo; + TQPushButton *tag_button, *branch_button; }; #endif diff --git a/cervisia/misc.cpp b/cervisia/misc.cpp index e1cfe208..fbff3398 100644 --- a/cervisia/misc.cpp +++ b/cervisia/misc.cpp @@ -25,10 +25,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -43,14 +43,14 @@ // These regular expression parts aren't useful to check the validity of the // CVSROOT specification. They are just used to extract the different parts of it. -static const QString userNameRegExp("([a-z0-9_][a-z0-9_-.]*)?"); -static const QString passwordRegExp("(:[^@]+)?"); -static const QString hostNameRegExp("([^:/@]+)"); -static const QString portRegExp("(:(\\d*))?"); -static const QString pathRegExp("(/.*)"); +static const TQString userNameRegExp("([a-z0-9_][a-z0-9_-.]*)?"); +static const TQString passwordRegExp("(:[^@]+)?"); +static const TQString hostNameRegExp("([^:/@]+)"); +static const TQString portRegExp("(:(\\d*))?"); +static const TQString pathRegExp("(/.*)"); -static int FindWhiteSpace(const QString& str, int index) +static int FindWhiteSpace(const TQString& str, int index) { const int length = str.length(); @@ -60,10 +60,10 @@ static int FindWhiteSpace(const QString& str, int index) if( index < 0 || index >= length ) return -1; - const QChar* const startPos = str.unicode(); - const QChar* const endPos = startPos + length; + const TQChar* const startPos = str.unicode(); + const TQChar* const endPos = startPos + length; - const QChar* pos = startPos + index; + const TQChar* pos = startPos + index; while( pos < endPos && !pos->isSpace() ) ++pos; @@ -72,21 +72,21 @@ static int FindWhiteSpace(const QString& str, int index) } -static const QStringList FetchBranchesAndTags(const QString& searchedType, +static const TQStringList FetchBranchesAndTags(const TQString& searchedType, CvsService_stub* cvsService, - QWidget* parent) + TQWidget* parent) { - QStringList branchOrTagList; + TQStringList branchOrTagList; - DCOPRef job = cvsService->status(QStringList(), true, true); + DCOPRef job = cvsService->status(TQStringList(), true, true); if( !cvsService->ok() ) return branchOrTagList; - ProgressDialog dlg(parent, "Status", job, QString::null, i18n("CVS Status")); + ProgressDialog dlg(parent, "Status", job, TQString::null, i18n("CVS Status")); if( dlg.execute() ) { - QString line; + TQString line; while( dlg.getLine(line) ) { int wsPos, bracketPos, colonPos; @@ -100,8 +100,8 @@ static const QStringList FetchBranchesAndTags(const QString& searchedType, if( (colonPos = line.find(':', bracketPos + 1)) < 0 ) continue; - const QString tag = line.mid(1, wsPos - 1); - const QString type = line.mid(bracketPos + 1, colonPos - bracketPos - 1); + const TQString tag = line.mid(1, wsPos - 1); + const TQString type = line.mid(bracketPos + 1, colonPos - bracketPos - 1); if( type == searchedType && !branchOrTagList.contains(tag) ) branchOrTagList.push_back(tag); } @@ -113,9 +113,9 @@ static const QStringList FetchBranchesAndTags(const QString& searchedType, } -bool Cervisia::IsValidTag(const QString& tag) +bool Cervisia::IsValidTag(const TQString& tag) { - static const QString prohibitedChars("$,.:;@"); + static const TQString prohibitedChars("$,.:;@"); if( !isalpha(tag[0].latin1()) ) return false; @@ -130,19 +130,19 @@ bool Cervisia::IsValidTag(const QString& tag) } -QString Cervisia::UserName() +TQString Cervisia::UserName() { // 1. Try to retrieve the information from the control center settings KEMailSettings settings; - QString name = settings.getSetting(KEMailSettings::RealName); - QString email = settings.getSetting(KEMailSettings::EmailAddress); + TQString name = settings.getSetting(KEMailSettings::RealName); + TQString email = settings.getSetting(KEMailSettings::EmailAddress); if( name.isEmpty() || email.isEmpty() ) { // 2. Try to retrieve the information from the system struct passwd* pw = getpwuid(getuid()); if( !pw ) - return QString::null; + return TQString::null; char hostname[512]; hostname[0] = '\0'; @@ -150,12 +150,12 @@ QString Cervisia::UserName() if( !gethostname(hostname, sizeof(hostname)) ) hostname[sizeof(hostname)-1] = '0'; - name = QString::fromLocal8Bit(pw->pw_gecos); - email = QString::fromLocal8Bit(pw->pw_name) + "@" + - QString::fromLocal8Bit(hostname); + name = TQString::fromLocal8Bit(pw->pw_gecos); + email = TQString::fromLocal8Bit(pw->pw_name) + "@" + + TQString::fromLocal8Bit(hostname); } - QString result = name; + TQString result = name; result += " <"; result += email; result += ">"; @@ -164,17 +164,17 @@ QString Cervisia::UserName() } -QString Cervisia::NormalizeRepository(const QString& repository) +TQString Cervisia::NormalizeRepository(const TQString& repository) { // only :pserver: repositories if( !repository.startsWith(":pserver:") ) return repository; - QRegExp rx(":pserver:(" + userNameRegExp + passwordRegExp + "@)?" + + TQRegExp rx(":pserver:(" + userNameRegExp + passwordRegExp + "@)?" + hostNameRegExp + portRegExp + pathRegExp); // extract username, hostname, port and path from CVSROOT - QString userName, hostName, port, path; + TQString userName, hostName, port, path; if( rx.search(repository) != -1 ) { userName = rx.cap(2); @@ -193,7 +193,7 @@ QString Cervisia::NormalizeRepository(const QString& repository) if( userName.isEmpty() ) userName = KUser().loginName(); - QString canonicalForm = ":pserver:" + userName + "@" + hostName + + TQString canonicalForm = ":pserver:" + userName + "@" + hostName + ":" + port + path; kdDebug() << "NormalizeRepository(): canonicalForm=" << canonicalForm @@ -205,11 +205,11 @@ QString Cervisia::NormalizeRepository(const QString& repository) } -bool Cervisia::CheckOverwrite(const QString& fileName, QWidget* parent) +bool Cervisia::CheckOverwrite(const TQString& fileName, TQWidget* parent) { bool result = true; - QFileInfo fi(fileName); + TQFileInfo fi(fileName); // does the file already exist? if( fi.exists() ) @@ -224,10 +224,10 @@ bool Cervisia::CheckOverwrite(const QString& fileName, QWidget* parent) } -QString joinLine(const QStringList &list) +TQString joinLine(const TQStringList &list) { - QString line; - for ( QStringList::ConstIterator it = list.begin(); + TQString line; + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { line += KShellProcess::quote(*it); @@ -241,11 +241,11 @@ QString joinLine(const QStringList &list) } -// Should be replaceable by QStringList::split -QStringList splitLine(QString line, char delim) +// Should be replaceable by TQStringList::split +TQStringList splitLine(TQString line, char delim) { int pos; - QStringList list; + TQStringList list; line = line.simplifyWhiteSpace(); while ((pos = line.find(delim)) != -1) @@ -259,46 +259,46 @@ QStringList splitLine(QString line, char delim) } -const QStringList fetchBranches(CvsService_stub* cvsService, QWidget* parent) +const TQStringList fetchBranches(CvsService_stub* cvsService, TQWidget* parent) { - return FetchBranchesAndTags(QString::fromLatin1("branch"), cvsService, + return FetchBranchesAndTags(TQString::fromLatin1("branch"), cvsService, parent); } -const QStringList fetchTags(CvsService_stub* cvsService, QWidget* parent) +const TQStringList fetchTags(CvsService_stub* cvsService, TQWidget* parent) { - return FetchBranchesAndTags(QString::fromLatin1("revision"), cvsService, + return FetchBranchesAndTags(TQString::fromLatin1("revision"), cvsService, parent); } -static QStringList *tempFiles = 0; +static TQStringList *tempFiles = 0; void cleanupTempFiles() { if (tempFiles) { - QStringList::Iterator it; + TQStringList::Iterator it; for (it = tempFiles->begin(); it != tempFiles->end(); ++it) - QFile::remove(*it); + TQFile::remove(*it); delete tempFiles; } } -QString tempFileName(const QString& suffix) +TQString tempFileName(const TQString& suffix) { if (!tempFiles) tempFiles = new QStringList; - KTempFile f(QString::null, suffix); + KTempFile f(TQString::null, suffix); tempFiles->append(f.name()); return f.name(); } -int compareRevisions(const QString& rev1, const QString& rev2) +int compareRevisions(const TQString& rev1, const TQString& rev2) { const int length1(rev1.length()); const int length2(rev2.length()); diff --git a/cervisia/misc.h b/cervisia/misc.h index b0d912e5..40dca86b 100644 --- a/cervisia/misc.h +++ b/cervisia/misc.h @@ -36,40 +36,40 @@ namespace Cervisia /** * Verifies that the passed tag name is a valid cvs tag. */ -bool IsValidTag(const QString& tag); +bool IsValidTag(const TQString& tag); /** * Returns the user name (real name + mail address) for the changelog entry. */ -QString UserName(); +TQString UserName(); /** * This method makes sure that the cvsroot specification for a pserver repository has * always the form: * :pserver:[user]@[host]:[port][path] */ -QString NormalizeRepository(const QString& repository); +TQString NormalizeRepository(const TQString& repository); -bool CheckOverwrite(const QString& fileName, QWidget* parent=0); +bool CheckOverwrite(const TQString& fileName, TQWidget* parent=0); } -QString joinLine(const QStringList &list); -QStringList splitLine(QString, char delim=' '); +TQString joinLine(const TQStringList &list); +TQStringList splitLine(TQString, char delim=' '); -QString tempFileName(const QString& suffix); +TQString tempFileName(const TQString& suffix); void cleanupTempFiles(); -const QStringList fetchBranches(CvsService_stub* cvsService, QWidget* parent); -const QStringList fetchTags(CvsService_stub* cvsService, QWidget* parent); +const TQStringList fetchBranches(CvsService_stub* cvsService, TQWidget* parent); +const TQStringList fetchTags(CvsService_stub* cvsService, TQWidget* parent); /** * Compares two revision numbers. * * @return -1 / 0 / 1 if rev1 is < / == / > rev2 */ -int compareRevisions(const QString& rev1, const QString& rev2); +int compareRevisions(const TQString& rev1, const TQString& rev2); /** diff --git a/cervisia/patchoptiondlg.cpp b/cervisia/patchoptiondlg.cpp index 9e6f92d1..b764c57c 100644 --- a/cervisia/patchoptiondlg.cpp +++ b/cervisia/patchoptiondlg.cpp @@ -19,52 +19,52 @@ #include "patchoptiondlg.h" using Cervisia::PatchOptionDialog; -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include -PatchOptionDialog::PatchOptionDialog(QWidget* parent, const char* name) - : KDialogBase(parent, name, true/*modal*/, QString::null, +PatchOptionDialog::PatchOptionDialog(TQWidget* parent, const char* name) + : KDialogBase(parent, name, true/*modal*/, TQString::null, Ok | Cancel | Help, Ok, true/*separator*/) { - QFrame* mainWidget = makeMainWidget(); - QBoxLayout* topLayout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQFrame* mainWidget = makeMainWidget(); + TQBoxLayout* topLayout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - m_formatBtnGroup = new QVButtonGroup(i18n("Output Format"), mainWidget, ""); + m_formatBtnGroup = new TQVButtonGroup(i18n("Output Format"), mainWidget, ""); topLayout->addWidget(m_formatBtnGroup); - connect(m_formatBtnGroup, SIGNAL(clicked(int)), - this, SLOT(formatChanged(int))); + connect(m_formatBtnGroup, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(formatChanged(int))); - new QRadioButton(i18n( "Context" ), m_formatBtnGroup); - new QRadioButton(i18n( "Normal" ), m_formatBtnGroup); - QRadioButton* unifiedFormatBtn = new QRadioButton(i18n( "Unified" ), m_formatBtnGroup); + new TQRadioButton(i18n( "Context" ), m_formatBtnGroup); + new TQRadioButton(i18n( "Normal" ), m_formatBtnGroup); + TQRadioButton* unifiedFormatBtn = new TQRadioButton(i18n( "Unified" ), m_formatBtnGroup); unifiedFormatBtn->setChecked(true); - QLabel* contextLinesLbl = new QLabel(i18n("&Number of context lines:"), + TQLabel* contextLinesLbl = new TQLabel(i18n("&Number of context lines:"), mainWidget); m_contextLines = new KIntNumInput(3, mainWidget); m_contextLines->setRange(2, 65535, 1, false); contextLinesLbl->setBuddy(m_contextLines); - QBoxLayout* contextLinesLayout = new QHBoxLayout(topLayout); + TQBoxLayout* contextLinesLayout = new TQHBoxLayout(topLayout); contextLinesLayout->addWidget(contextLinesLbl); contextLinesLayout->addWidget(m_contextLines); - QVButtonGroup* ignoreBtnGroup = new QVButtonGroup(i18n("Ignore Options"), mainWidget); + TQVButtonGroup* ignoreBtnGroup = new TQVButtonGroup(i18n("Ignore Options"), mainWidget); topLayout->addWidget(ignoreBtnGroup); - m_blankLineChk = new QCheckBox(i18n("Ignore added or removed empty lines"), + m_blankLineChk = new TQCheckBox(i18n("Ignore added or removed empty lines"), ignoreBtnGroup); - m_spaceChangeChk = new QCheckBox(i18n("Ignore changes in the amount of whitespace"), + m_spaceChangeChk = new TQCheckBox(i18n("Ignore changes in the amount of whitespace"), ignoreBtnGroup); - m_allSpaceChk = new QCheckBox(i18n("Ignore all whitespace"), ignoreBtnGroup); - m_caseChangesChk = new QCheckBox(i18n("Ignore changes in case"), ignoreBtnGroup); + m_allSpaceChk = new TQCheckBox(i18n("Ignore all whitespace"), ignoreBtnGroup); + m_caseChangesChk = new TQCheckBox(i18n("Ignore changes in case"), ignoreBtnGroup); } @@ -73,9 +73,9 @@ PatchOptionDialog::~PatchOptionDialog() } -QString PatchOptionDialog::diffOptions() const +TQString PatchOptionDialog::diffOptions() const { - QString options; + TQString options; if( m_blankLineChk->isChecked() ) options += " -B "; @@ -93,13 +93,13 @@ QString PatchOptionDialog::diffOptions() const } -QString PatchOptionDialog::formatOption() const +TQString PatchOptionDialog::formatOption() const { switch( m_formatBtnGroup->selectedId() ) { - case 0: return "-C " + QString::number(m_contextLines->value()); + case 0: return "-C " + TQString::number(m_contextLines->value()); case 1: return ""; - case 2: return "-U " + QString::number(m_contextLines->value()); + case 2: return "-U " + TQString::number(m_contextLines->value()); } return ""; diff --git a/cervisia/patchoptiondlg.h b/cervisia/patchoptiondlg.h index 64109a2b..148640d2 100644 --- a/cervisia/patchoptiondlg.h +++ b/cervisia/patchoptiondlg.h @@ -36,22 +36,22 @@ class PatchOptionDialog : public KDialogBase Q_OBJECT public: - explicit PatchOptionDialog(QWidget* parent = 0, const char* name = 0); + explicit PatchOptionDialog(TQWidget* parent = 0, const char* name = 0); virtual ~PatchOptionDialog(); - QString diffOptions() const; - QString formatOption() const; + TQString diffOptions() const; + TQString formatOption() const; private slots: void formatChanged(int buttonId); private: - QVButtonGroup* m_formatBtnGroup; + TQVButtonGroup* m_formatBtnGroup; KIntNumInput* m_contextLines; - QCheckBox* m_blankLineChk; - QCheckBox* m_allSpaceChk; - QCheckBox* m_spaceChangeChk; - QCheckBox* m_caseChangesChk; + TQCheckBox* m_blankLineChk; + TQCheckBox* m_allSpaceChk; + TQCheckBox* m_spaceChangeChk; + TQCheckBox* m_caseChangesChk; }; diff --git a/cervisia/progressdlg.cpp b/cervisia/progressdlg.cpp index d72c6565..a7e34018 100644 --- a/cervisia/progressdlg.cpp +++ b/cervisia/progressdlg.cpp @@ -19,12 +19,12 @@ #include "progressdlg.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,19 +42,19 @@ struct ProgressDialog::Private bool hasError; CvsJob_stub* cvsJob; - QString buffer; - QString errorId1, errorId2; - QStringList output; + TQString buffer; + TQString errorId1, errorId2; + TQStringList output; - QTimer* timer; + TQTimer* timer; KAnimWidget* gear; - QListBox* resultbox; + TQListBox* resultbox; }; -ProgressDialog::ProgressDialog(QWidget* parent, const QString& heading, - const DCOPRef& job, const QString& errorIndicator, - const QString& caption) +ProgressDialog::ProgressDialog(TQWidget* parent, const TQString& heading, + const DCOPRef& job, const TQString& errorIndicator, + const TQString& caption) : KDialogBase(parent, 0, true, caption, Cancel, Cancel, true) , DCOPObject() , d(new Private) @@ -81,27 +81,27 @@ ProgressDialog::~ProgressDialog() } -void ProgressDialog::setupGui(const QString& heading) +void ProgressDialog::setupGui(const TQString& heading) { - QVBox* vbox = makeVBoxMainWidget(); + TQVBox* vbox = makeVBoxMainWidget(); vbox->setSpacing(10); - QWidget* headingBox = new QWidget(vbox); - QHBoxLayout* hboxLayout = new QHBoxLayout(headingBox); + TQWidget* headingBox = new TQWidget(vbox); + TQHBoxLayout* hboxLayout = new TQHBoxLayout(headingBox); - QLabel* textLabel = new QLabel(heading, headingBox); + TQLabel* textLabel = new TQLabel(heading, headingBox); textLabel->setMinimumWidth(textLabel->sizeHint().width()); textLabel->setFixedHeight(textLabel->sizeHint().height()); hboxLayout->addWidget(textLabel); hboxLayout->addStretch(); - d->gear = new KAnimWidget(QString("kde"), 32, headingBox); + d->gear = new KAnimWidget(TQString("kde"), 32, headingBox); d->gear->setFixedSize(32, 32); hboxLayout->addWidget(d->gear); - d->resultbox = new QListBox(vbox); - d->resultbox->setSelectionMode(QListBox::NoSelection); - QFontMetrics fm(d->resultbox->fontMetrics()); + d->resultbox = new TQListBox(vbox); + d->resultbox->setSelectionMode(TQListBox::NoSelection); + TQFontMetrics fm(d->resultbox->fontMetrics()); d->resultbox->setMinimumSize(fm.width("0")*70, fm.lineSpacing()*8); resize(sizeHint()); @@ -111,37 +111,37 @@ void ProgressDialog::setupGui(const QString& heading) bool ProgressDialog::execute() { // get command line and display it - QString cmdLine = d->cvsJob->cvsCommand(); + TQString cmdLine = d->cvsJob->cvsCommand(); d->resultbox->insertItem(cmdLine); // establish connections to the signals of the cvs job connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(QString)", - "slotReceivedOutputNonGui(QString)", true); - connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(QString)", - "slotReceivedOutputNonGui(QString)", true); + connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(TQString)", + "slotReceivedOutputNonGui(TQString)", true); + connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(TQString)", + "slotReceivedOutputNonGui(TQString)", true); // we wait for 4 seconds (or the timeout set by the user) before we // force the dialog to show up - d->timer = new QTimer(this); - connect(d->timer, SIGNAL(timeout()), this, SLOT(slotTimeoutOccurred())); + d->timer = new TQTimer(this); + connect(d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeoutOccurred())); d->timer->start(CervisiaSettings::timeout(), true); bool started = d->cvsJob->execute(); if( !started ) return false; - QApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(waitCursor); kapp->enter_loop(); - if (QApplication::overrideCursor()) - QApplication::restoreOverrideCursor(); + if (TQApplication::overrideCursor()) + TQApplication::restoreOverrideCursor(); return !d->isCancelled; } -bool ProgressDialog::getLine(QString& line) +bool ProgressDialog::getLine(TQString& line) { if( d->output.isEmpty() ) return false; @@ -153,13 +153,13 @@ bool ProgressDialog::getLine(QString& line) } -QStringList ProgressDialog::getOutput() const +TQStringList ProgressDialog::getOutput() const { return d->output; } -void ProgressDialog::slotReceivedOutputNonGui(QString buffer) +void ProgressDialog::slotReceivedOutputNonGui(TQString buffer) { d->buffer += buffer; @@ -172,7 +172,7 @@ void ProgressDialog::slotReceivedOutputNonGui(QString buffer) } -void ProgressDialog::slotReceivedOutput(QString buffer) +void ProgressDialog::slotReceivedOutput(TQString buffer) { d->buffer += buffer; processOutput(); @@ -224,10 +224,10 @@ void ProgressDialog::stopNonGuiPart() { d->timer->stop(); - disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(QString)", - "slotReceivedOutputNonGui(QString)"); - disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(QString)", - "slotReceivedOutputNonGui(QString)"); + disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(TQString)", + "slotReceivedOutputNonGui(TQString)"); + disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(TQString)", + "slotReceivedOutputNonGui(TQString)"); kapp->exit_loop(); } @@ -235,16 +235,16 @@ void ProgressDialog::stopNonGuiPart() void ProgressDialog::startGuiPart() { - connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(QString)", - "slotReceivedOutput(QString)", true); - connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(QString)", - "slotReceivedOutput(QString)", true); + connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(TQString)", + "slotReceivedOutput(TQString)", true); + connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(TQString)", + "slotReceivedOutput(TQString)", true); show(); d->isShown = true; d->gear->start(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); kapp->enter_loop(); } @@ -254,7 +254,7 @@ void ProgressDialog::processOutput() int pos; while( (pos = d->buffer.find('\n')) != -1 ) { - QString item = d->buffer.left(pos); + TQString item = d->buffer.left(pos); if( item.startsWith(d->errorId1) || item.startsWith(d->errorId2) || item.startsWith("cvs [server aborted]:") ) diff --git a/cervisia/progressdlg.h b/cervisia/progressdlg.h index 3e9dfed1..9ffa9dbf 100644 --- a/cervisia/progressdlg.h +++ b/cervisia/progressdlg.h @@ -34,17 +34,17 @@ class ProgressDialog : public KDialogBase, public DCOPObject Q_OBJECT public: - ProgressDialog(QWidget* parent, const QString& heading, const DCOPRef& job, - const QString& errorIndicator, const QString& caption = ""); + ProgressDialog(TQWidget* parent, const TQString& heading, const DCOPRef& job, + const TQString& errorIndicator, const TQString& caption = ""); ~ProgressDialog(); bool execute(); - bool getLine(QString& line); - QStringList getOutput() const; + bool getLine(TQString& line); + TQStringList getOutput() const; k_dcop: - void slotReceivedOutputNonGui(QString buffer); - void slotReceivedOutput(QString buffer); + void slotReceivedOutputNonGui(TQString buffer); + void slotReceivedOutput(TQString buffer); void slotJobExited(bool normalExit, int status); protected slots: @@ -54,7 +54,7 @@ private slots: void slotTimeoutOccurred(); private: - void setupGui(const QString& heading); + void setupGui(const TQString& heading); void stopNonGuiPart(); void startGuiPart(); void processOutput(); diff --git a/cervisia/protocolview.cpp b/cervisia/protocolview.cpp index 8496b983..2de8405f 100644 --- a/cervisia/protocolview.cpp +++ b/cervisia/protocolview.cpp @@ -21,8 +21,8 @@ #include "protocolview.h" -#include -#include +#include +#include #include #include #include @@ -32,8 +32,8 @@ #include "cvsjob_stub.h" -ProtocolView::ProtocolView(const QCString& appId, QWidget *parent, const char *name) - : QTextEdit(parent, name) +ProtocolView::ProtocolView(const TQCString& appId, TQWidget *parent, const char *name) + : TQTextEdit(parent, name) , job(0) , m_isUpdateJob(false) { @@ -47,11 +47,11 @@ ProtocolView::ProtocolView(const QCString& appId, QWidget *parent, const char *n setFont(config->readFontEntry("ProtocolFont")); config->setGroup("Colors"); - QColor defaultColor = QColor(255, 130, 130); + TQColor defaultColor = TQColor(255, 130, 130); conflictColor=config->readColorEntry("Conflict",&defaultColor); - defaultColor=QColor(130, 130, 255); + defaultColor=TQColor(130, 130, 255); localChangeColor=config->readColorEntry("LocalChange",&defaultColor); - defaultColor=QColor(70, 210, 70); + defaultColor=TQColor(70, 210, 70); remoteChangeColor=config->readColorEntry("RemoteChange",&defaultColor); // create a DCOP stub for the non-concurrent cvs job @@ -60,10 +60,10 @@ ProtocolView::ProtocolView(const QCString& appId, QWidget *parent, const char *n // establish connections to the signals of the cvs job connectDCOPSignal(job->app(), job->obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(job->app(), job->obj(), "receivedStdout(QString)", - "slotReceivedOutput(QString)", true); - connectDCOPSignal(job->app(), job->obj(), "receivedStderr(QString)", - "slotReceivedOutput(QString)", true); + connectDCOPSignal(job->app(), job->obj(), "receivedStdout(TQString)", + "slotReceivedOutput(TQString)", true); + connectDCOPSignal(job->app(), job->obj(), "receivedStderr(TQString)", + "slotReceivedOutput(TQString)", true); } @@ -78,24 +78,24 @@ bool ProtocolView::startJob(bool isUpdateJob) m_isUpdateJob = isUpdateJob; // get command line and add it to output buffer - QString cmdLine = job->cvsCommand(); + TQString cmdLine = job->cvsCommand(); buf += cmdLine; buf += '\n'; processOutput(); // disconnect 3rd party slots from our signals - disconnect( SIGNAL(receivedLine(QString)) ); - disconnect( SIGNAL(jobFinished(bool, int)) ); + disconnect( TQT_SIGNAL(receivedLine(TQString)) ); + disconnect( TQT_SIGNAL(jobFinished(bool, int)) ); return job->execute(); } -QPopupMenu* ProtocolView::createPopupMenu(const QPoint &pos) +TQPopupMenu* ProtocolView::createPopupMenu(const TQPoint &pos) { - QPopupMenu* menu = QTextEdit::createPopupMenu(pos); + TQPopupMenu* menu = TQTextEdit::createPopupMenu(pos); - int id = menu->insertItem(i18n("Clear"), this, SLOT( clear() ), 0, -1, 0); + int id = menu->insertItem(i18n("Clear"), this, TQT_SLOT( clear() ), 0, -1, 0); if( length() == 0 ) menu->setItemEnabled(id, false); @@ -110,7 +110,7 @@ void ProtocolView::cancelJob() } -void ProtocolView::slotReceivedOutput(QString buffer) +void ProtocolView::slotReceivedOutput(TQString buffer) { buf += buffer; processOutput(); @@ -119,7 +119,7 @@ void ProtocolView::slotReceivedOutput(QString buffer) void ProtocolView::slotJobExited(bool normalExit, int exitStatus) { - QString msg; + TQString msg; if( normalExit ) { @@ -144,7 +144,7 @@ void ProtocolView::processOutput() int pos; while ( (pos = buf.find('\n')) != -1) { - QString line = buf.left(pos); + TQString line = buf.left(pos); if (!line.isEmpty()) { appendLine(line); @@ -155,11 +155,11 @@ void ProtocolView::processOutput() } -void ProtocolView::appendLine(const QString &line) +void ProtocolView::appendLine(const TQString &line) { // Escape output line, so that html tags in commit // messages aren't interpreted - const QString escapedLine = QStyleSheet::escape(line); + const TQString escapedLine = TQStyleSheet::escape(line); // When we don't get the output from an update job then // just add it to the text edit. @@ -169,7 +169,7 @@ void ProtocolView::appendLine(const QString &line) return; } - QColor color; + TQColor color; // Colors are the same as in UpdateViewItem::paintCell() if (line.startsWith("C ")) color = conflictColor; @@ -180,7 +180,7 @@ void ProtocolView::appendLine(const QString &line) color = remoteChangeColor; append(color.isValid() - ? QString("%2").arg(color.name()) + ? TQString("%2").arg(color.name()) .arg(escapedLine) : escapedLine); } diff --git a/cervisia/protocolview.h b/cervisia/protocolview.h index 0e0390d2..e3b59f6d 100644 --- a/cervisia/protocolview.h +++ b/cervisia/protocolview.h @@ -22,7 +22,7 @@ #ifndef PROTOCOLVIEW_H #define PROTOCOLVIEW_H -#include +#include #include class QPoint; @@ -30,26 +30,26 @@ class QPopupMenu; class CvsJob_stub; -class ProtocolView : public QTextEdit, public DCOPObject +class ProtocolView : public TQTextEdit, public DCOPObject { K_DCOP Q_OBJECT public: - explicit ProtocolView(const QCString& appId, QWidget *parent=0, const char *name=0); + explicit ProtocolView(const TQCString& appId, TQWidget *parent=0, const char *name=0); ~ProtocolView(); bool startJob(bool isUpdateJob = false); protected: - virtual QPopupMenu* createPopupMenu(const QPoint &pos); + virtual TQPopupMenu* createPopupMenu(const TQPoint &pos); k_dcop: - void slotReceivedOutput(QString buffer); + void slotReceivedOutput(TQString buffer); void slotJobExited(bool normalExit, int exitStatus); signals: - void receivedLine(QString line); + void receivedLine(TQString line); void jobFinished(bool normalExit, int exitStatus); private slots: @@ -57,13 +57,13 @@ private slots: private: void processOutput(); - void appendLine(const QString &line); + void appendLine(const TQString &line); - QString buf; + TQString buf; - QColor conflictColor; - QColor localChangeColor; - QColor remoteChangeColor; + TQColor conflictColor; + TQColor localChangeColor; + TQColor remoteChangeColor; CvsJob_stub* job; diff --git a/cervisia/qttableview.cpp b/cervisia/qttableview.cpp index 22b2993c..7e877ef8 100644 --- a/cervisia/qttableview.cpp +++ b/cervisia/qttableview.cpp @@ -13,10 +13,10 @@ **********************************************************************/ #include "qttableview.h" -#include "qscrollbar.h" -#include "qpainter.h" -#include "qdrawutil.h" -#include +#include "tqscrollbar.h" +#include "tqpainter.h" +#include "tqdrawutil.h" +#include #include enum ScrollBarDirtyFlags { @@ -40,16 +40,16 @@ enum ScrollBarDirtyFlags { class QCornerSquare : public QWidget // internal class { public: - QCornerSquare( QWidget *, const char* = 0 ); - void paintEvent( QPaintEvent * ); + QCornerSquare( TQWidget *, const char* = 0 ); + void paintEvent( TQPaintEvent * ); }; -QCornerSquare::QCornerSquare( QWidget *parent, const char *name ) - : QWidget( parent, name ) +QCornerSquare::QCornerSquare( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { } -void QCornerSquare::paintEvent( QPaintEvent * ) +void QCornerSquare::paintEvent( TQPaintEvent * ) { } @@ -112,9 +112,9 @@ void QCornerSquare::paintEvent( QPaintEvent * ) \warning Experience has shown that use of this widget tends to cause more bugs than expected and our analysis indicates that the widget's - very flexibility is the problem. If QScrollView or QListBox can + very flexibility is the problem. If TQScrollView or TQListBox can easily be made to do the job you need, we recommend subclassing - those widgets rather than QtTableView. In addition, QScrollView makes + those widgets rather than QtTableView. In addition, TQScrollView makes it easy to have child widgets inside tables, which QtTableView doesn't support at all. @@ -125,7 +125,7 @@ void QCornerSquare::paintEvent( QPaintEvent * ) /*! Constructs a table view. The \a parent, \a name and \f arguments - are passed to the QFrame constructor. + are passed to the TQFrame constructor. The \link setTableFlags() table flags\endlink are all cleared (set to 0). Set \c Tbl_autoVScrollBar or \c Tbl_autoHScrollBar to get automatic scroll @@ -134,17 +134,17 @@ void QCornerSquare::paintEvent( QPaintEvent * ) The \link setCellHeight() cell height\endlink and \link setCellWidth() cell width\endlink are set to 0. - Frame line shapes (QFrame::HLink and QFrame::VLine) are disallowed; - see QFrame::setFrameStyle(). + Frame line shapes (TQFrame::HLink and TQFrame::VLine) are disallowed; + see TQFrame::setFrameStyle(). Note that the \a f argument is \e not \link setTableFlags() table - flags \endlink but rather \link QWidget::QWidget() widget + flags \endlink but rather \link TQWidget::TQWidget() widget flags. \endlink */ -QtTableView::QtTableView( QWidget *parent, const char *name, WFlags f ) - : QFrame( parent, name, f ) +QtTableView::QtTableView( TQWidget *parent, const char *name, WFlags f ) + : TQFrame( parent, name, f ) { nRows = nCols = 0; // zero rows/cols xCellOffs = yCellOffs = 0; // zero offset @@ -178,21 +178,21 @@ QtTableView::~QtTableView() /*! \internal - Reimplements QWidget::setBackgroundColor() for binary compatibility. + Reimplements TQWidget::setBackgroundColor() for binary compatibility. \sa setPalette() */ -void QtTableView::setBackgroundColor( const QColor &c ) +void QtTableView::setBackgroundColor( const TQColor &c ) { - QWidget::setBackgroundColor( c ); + TQWidget::setBackgroundColor( c ); } /*!\reimp */ -void QtTableView::setPalette( const QPalette &p ) +void QtTableView::setPalette( const TQPalette &p ) { - QWidget::setPalette( p ); + TQWidget::setPalette( p ); } /*!\reimp @@ -201,7 +201,7 @@ void QtTableView::setPalette( const QPalette &p ) void QtTableView::show() { showOrHideScrollBars(); - QWidget::show(); + TQWidget::show(); } @@ -225,7 +225,7 @@ void QtTableView::show() event. At present, QtTableView is the only widget that reimplements \link - QWidget::repaint() repaint()\endlink. It does this because by + TQWidget::repaint() repaint()\endlink. It does this because by clearing and then repainting one cell at at time, it can make the screen flicker less than it would otherwise. */ @@ -237,10 +237,10 @@ void QtTableView::repaint( int x, int y, int w, int h, bool erase ) w = width() - x; if ( h < 0 ) h = height() - y; - QRect r( x, y, w, h ); + TQRect r( x, y, w, h ); if ( r.isEmpty() ) return; // nothing to do - QPaintEvent e( r ); + TQPaintEvent e( r ); if ( erase && backgroundMode() != NoBackground ) eraseInPaint = TRUE; // erase when painting paintEvent( &e ); @@ -248,7 +248,7 @@ void QtTableView::repaint( int x, int y, int w, int h, bool erase ) } /*! - \overload void QtTableView::repaint( const QRect &r, bool erase ) + \overload void QtTableView::repaint( const TQRect &r, bool erase ) Replaints rectangle \a r. If \a erase is TRUE draws the background using the palette's background. */ @@ -729,7 +729,7 @@ int QtTableView::totalHeight()
Tbl_autoHScrollBar
The table has a horizontal scroll bar if - and only if - the table is wider than the view.
Tbl_autoScrollBars
- The union of the previous two flags. -
Tbl_clipCellPainting
- The table uses QPainter::setClipRect() to +
Tbl_clipCellPainting
- The table uses TQPainter::setClipRect() to make sure that paintCell() will not draw outside the cell boundaries.
Tbl_cutCellsV
- The table will never show part of a @@ -959,7 +959,7 @@ void QtTableView::updateCell( int row, int col, bool erase ) return; if ( !rowYPos( row, &yPos ) ) return; - QRect uR = QRect( xPos, yPos, + TQRect uR = TQRect( xPos, yPos, cellW ? cellW : cellWidth(col), cellH ? cellH : cellHeight(row) ); repaint( uR.intersect(viewRect()), erase ); @@ -967,7 +967,7 @@ void QtTableView::updateCell( int row, int col, bool erase ) /*! - \fn QRect QtTableView::cellUpdateRect() const + \fn TQRect QtTableView::cellUpdateRect() const This function should be called only from the paintCell() function in subclasses. It returns the portion of a cell that actually needs to be @@ -981,9 +981,9 @@ void QtTableView::updateCell( int row, int col, bool erase ) frame, in \e widget coordinates. */ -QRect QtTableView::viewRect() const +TQRect QtTableView::viewRect() const { - return QRect( frameWidth(), frameWidth(), viewWidth(), viewHeight() ); + return TQRect( frameWidth(), frameWidth(), viewWidth(), viewHeight() ); } @@ -1126,7 +1126,7 @@ void QtTableView::snapToGrid( bool horizontal, bool vertical ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::valueChanged() signal. + TQScrollBar::valueChanged() signal. Moves the table horizontally to offset \a val without updating the scroll bar. @@ -1147,7 +1147,7 @@ void QtTableView::horSbValue( int val ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::sliderMoved() signal. + TQScrollBar::sliderMoved() signal. Scrolls the table smoothly horizontally even if \c Tbl_snapToHGrid is set. */ @@ -1167,7 +1167,7 @@ void QtTableView::horSbSliding( int val ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::sliderReleased() signal. + TQScrollBar::sliderReleased() signal. */ void QtTableView::horSbSlidingDone( ) @@ -1180,7 +1180,7 @@ void QtTableView::horSbSlidingDone( ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::valueChanged() signal. + TQScrollBar::valueChanged() signal. Moves the table vertically to offset \a val without updating the scroll bar. @@ -1201,7 +1201,7 @@ void QtTableView::verSbValue( int val ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::sliderMoved() signal. + TQScrollBar::sliderMoved() signal. Scrolls the table smoothly vertically even if \c Tbl_snapToVGrid is set. */ @@ -1221,7 +1221,7 @@ void QtTableView::verSbSliding( int val ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::sliderReleased() signal. + TQScrollBar::sliderReleased() signal. */ void QtTableView::verSbSlidingDone( ) @@ -1239,18 +1239,18 @@ void QtTableView::verSbSlidingDone( ) do so for each cell. */ -void QtTableView::setupPainter( QPainter * ) +void QtTableView::setupPainter( TQPainter * ) { } /*! - \fn void QtTableView::paintCell( QPainter *p, int row, int col ) + \fn void QtTableView::paintCell( TQPainter *p, int row, int col ) This pure virtual function is called to paint the single cell at \a (row,col) using \a p, which is open when paintCell() is called and must remain open. - The coordinate system is \link QPainter::translate() translated \endlink + The coordinate system is \link TQPainter::translate() translated \endlink so that the origin is at the top-left corner of the cell to be painted, i.e. \e cell coordinates. Do not scale or shear the coordinate system (or if you do, restore the transformation matrix before you @@ -1268,16 +1268,16 @@ void QtTableView::setupPainter( QPainter * ) Calls paintCell() for the cells that needs to be repainted. */ -void QtTableView::paintEvent( QPaintEvent *e ) +void QtTableView::paintEvent( TQPaintEvent *e ) { - QRect updateR = e->rect(); // update rectangle + TQRect updateR = e->rect(); // update rectangle if ( sbDirty ) { bool e = eraseInPaint; updateScrollBars(); eraseInPaint = e; } - QPainter paint( this ); + TQPainter paint( this ); if ( !contentsRect().contains( updateR, TRUE ) ) {// update frame ? drawFrame( &paint ); @@ -1311,11 +1311,11 @@ void QtTableView::paintEvent( QPaintEvent *e ) int xPos = maxX+1; // in case the while() is empty int nextX; int nextY; - QRect winR = viewRect(); - QRect cellR; - QRect cellUR; + TQRect winR = viewRect(); + TQRect cellR; + TQRect cellUR; #ifndef QT_NO_TRANSFORMATIONS - QWMatrix matrix; + TQWMatrix matrix; #endif while ( yPos <= maxY && row < nRows ) { @@ -1383,22 +1383,22 @@ void QtTableView::paintEvent( QPaintEvent *e ) // inside the cells. So QtTableView is reponsible for all pixels // outside the cells. - QRect viewR = viewRect(); - const QColorGroup g = colorGroup(); + TQRect viewR = viewRect(); + const TQColorGroup g = colorGroup(); if ( xPos <= maxX ) { - QRect r = viewR; + TQRect r = viewR; r.setLeft( xPos ); r.setBottom( yPosorientation() == Vertical && vScrollBar && vScrollBar->isVisible() ) - QApplication::sendEvent( vScrollBar, e ); + TQApplication::sendEvent( vScrollBar, e ); } /*! @@ -1439,11 +1439,11 @@ void QtTableView::updateView() values; use findRow() to translate to cell numbers. */ -QScrollBar *QtTableView::verticalScrollBar() const +TQScrollBar *QtTableView::verticalScrollBar() const { QtTableView *that = (QtTableView*)this; // semantic const if ( !vScrollBar ) { - QScrollBar *sb = new QScrollBar( QScrollBar::Vertical, that ); + TQScrollBar *sb = new TQScrollBar( TQScrollBar::Vertical, that ); #ifndef QT_NO_CURSOR sb->setCursor( arrowCursor ); #endif @@ -1451,12 +1451,12 @@ QScrollBar *QtTableView::verticalScrollBar() const Q_CHECK_PTR(sb); sb->setTracking( FALSE ); sb->setFocusPolicy( NoFocus ); - connect( sb, SIGNAL(valueChanged(int)), - SLOT(verSbValue(int))); - connect( sb, SIGNAL(sliderMoved(int)), - SLOT(verSbSliding(int))); - connect( sb, SIGNAL(sliderReleased()), - SLOT(verSbSlidingDone())); + connect( sb, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(verSbValue(int))); + connect( sb, TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(verSbSliding(int))); + connect( sb, TQT_SIGNAL(sliderReleased()), + TQT_SLOT(verSbSlidingDone())); sb->hide(); that->vScrollBar = sb; return sb; @@ -1470,11 +1470,11 @@ QScrollBar *QtTableView::verticalScrollBar() const values; use findCol() to translate to cell numbers. */ -QScrollBar *QtTableView::horizontalScrollBar() const +TQScrollBar *QtTableView::horizontalScrollBar() const { QtTableView *that = (QtTableView*)this; // semantic const if ( !hScrollBar ) { - QScrollBar *sb = new QScrollBar( QScrollBar::Horizontal, that ); + TQScrollBar *sb = new TQScrollBar( TQScrollBar::Horizontal, that ); #ifndef QT_NO_CURSOR sb->setCursor( arrowCursor ); #endif @@ -1482,12 +1482,12 @@ QScrollBar *QtTableView::horizontalScrollBar() const sb->setFocusPolicy( NoFocus ); Q_CHECK_PTR(sb); sb->setTracking( FALSE ); - connect( sb, SIGNAL(valueChanged(int)), - SLOT(horSbValue(int))); - connect( sb, SIGNAL(sliderMoved(int)), - SLOT(horSbSliding(int))); - connect( sb, SIGNAL(sliderReleased()), - SLOT(horSbSlidingDone())); + connect( sb, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(horSbValue(int))); + connect( sb, TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(horSbSliding(int))); + connect( sb, TQT_SIGNAL(sliderReleased()), + TQT_SLOT(horSbSlidingDone())); sb->hide(); that->hScrollBar = sb; return sb; @@ -1791,10 +1791,10 @@ bool QtTableView::colXPos( int col, int *xPos ) const Moves the visible area of the table right by \a xPixels and down by \a yPixels pixels. Both may be negative. - \warning You might find that QScrollView offers a higher-level of + \warning You might find that TQScrollView offers a higher-level of functionality than using QtTableView and this function. - This function is \e not the same as QWidget::scroll(); in particular, + This function is \e not the same as TQWidget::scroll(); in particular, the signs of \a xPixels and \a yPixels have the reverse semantics. \sa setXOffset(), setYOffset(), setOffset(), setTopCell(), @@ -1803,7 +1803,7 @@ bool QtTableView::colXPos( int col, int *xPos ) const void QtTableView::scroll( int xPixels, int yPixels ) { - QWidget::scroll( -xPixels, -yPixels, contentsRect() ); + TQWidget::scroll( -xPixels, -yPixels, contentsRect() ); } @@ -2062,7 +2062,7 @@ void QtTableView::updateFrameSize() if ( autoUpdate() ) { int fh = frameRect().height(); int fw = frameRect().width(); - setFrameRect( QRect(0,0,rw,rh) ); + setFrameRect( TQRect(0,0,rw,rh) ); if ( rw != fw ) update( QMIN(fw,rw) - frameWidth() - 2, 0, frameWidth()+4, rh ); diff --git a/cervisia/qttableview.h b/cervisia/qttableview.h index 6f8b8397..04cc2a9a 100644 --- a/cervisia/qttableview.h +++ b/cervisia/qttableview.h @@ -16,7 +16,7 @@ #define QTTABLEVIEW_H #ifndef QT_H -#include "qframe.h" +#include "tqframe.h" #endif // QT_H #ifndef QT_NO_QTTABLEVIEW @@ -29,16 +29,16 @@ class QtTableView : public QFrame { Q_OBJECT public: - virtual void setBackgroundColor( const QColor & ); - virtual void setPalette( const QPalette & ); + virtual void setBackgroundColor( const TQColor & ); + virtual void setPalette( const TQPalette & ); void show(); void repaint( bool erase=TRUE ); void repaint( int x, int y, int w, int h, bool erase=TRUE ); - void repaint( const QRect &, bool erase=TRUE ); + void repaint( const TQRect &, bool erase=TRUE ); protected: - QtTableView( QWidget *parent=0, const char *name=0, WFlags f=0 ); + QtTableView( TQWidget *parent=0, const char *name=0, WFlags f=0 ); ~QtTableView(); int numRows() const; @@ -87,8 +87,8 @@ protected: bool rowIsVisible( int row ) const; bool colIsVisible( int col ) const; - QScrollBar *verticalScrollBar() const; - QScrollBar *horizontalScrollBar() const; + TQScrollBar *verticalScrollBar() const; + TQScrollBar *horizontalScrollBar() const; private slots: void horSbValue( int ); @@ -99,12 +99,12 @@ private slots: void verSbSlidingDone(); protected: - virtual void paintCell( QPainter *, int row, int col ) = 0; - virtual void setupPainter( QPainter * ); + virtual void paintCell( TQPainter *, int row, int col ) = 0; + virtual void setupPainter( TQPainter * ); - void paintEvent( QPaintEvent * ); - void resizeEvent( QResizeEvent * ); - virtual void wheelEvent( QWheelEvent *e ); + void paintEvent( TQPaintEvent * ); + void resizeEvent( TQResizeEvent * ); + virtual void wheelEvent( TQWheelEvent *e ); int findRow( int yPos ) const; int findCol( int xPos ) const; @@ -165,8 +165,8 @@ private: uint tFlags; QRect cellUpdateR; - QScrollBar *vScrollBar; - QScrollBar *hScrollBar; + TQScrollBar *vScrollBar; + TQScrollBar *hScrollBar; QCornerSquare *cornerSquare; private: // Disabled copy constructor and operator= @@ -231,7 +231,7 @@ inline uint QtTableView::tableFlags() const inline bool QtTableView::testTableFlags( uint f ) const { return (tFlags & f) != 0; } -inline QRect QtTableView::cellUpdateRect() const +inline TQRect QtTableView::cellUpdateRect() const { return cellUpdateR; } inline bool QtTableView::autoUpdate() const @@ -240,7 +240,7 @@ inline bool QtTableView::autoUpdate() const inline void QtTableView::repaint( bool erase ) { repaint( 0, 0, width(), height(), erase ); } -inline void QtTableView::repaint( const QRect &r, bool erase ) +inline void QtTableView::repaint( const TQRect &r, bool erase ) { repaint( r.x(), r.y(), r.width(), r.height(), erase ); } inline void QtTableView::updateScrollBars() diff --git a/cervisia/repositories.cpp b/cervisia/repositories.cpp index 4c517116..7f52a39d 100644 --- a/cervisia/repositories.cpp +++ b/cervisia/repositories.cpp @@ -19,9 +19,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -29,15 +29,15 @@ #include "cervisiapart.h" -static QString fileNameCvs() +static TQString fileNameCvs() { - return QDir::homeDirPath() + "/.cvspass"; + return TQDir::homeDirPath() + "/.cvspass"; } -static QString fileNameCvsnt() +static TQString fileNameCvsnt() { - return QDir::homeDirPath() + "/.cvs/cvspass"; + return TQDir::homeDirPath() + "/.cvs/cvspass"; } @@ -47,18 +47,18 @@ static QString fileNameCvsnt() // new .cvspass format (since cvs 1.11.1): // /1 user@host:port/path Aencoded_password // -static QStringList readCvsPassFile() +static TQStringList readCvsPassFile() { - QStringList list; + TQStringList list; - QFile f(fileNameCvs()); + TQFile f(fileNameCvs()); if (f.open(IO_ReadOnly)) { - QTextStream stream(&f); + TQTextStream stream(&f); while (!stream.eof()) { int pos; - QString line = stream.readLine(); + TQString line = stream.readLine(); if ( (pos = line.find(' ')) != -1) { if (line[0] != '/') // old format @@ -76,17 +76,17 @@ static QStringList readCvsPassFile() // .cvs/cvspass format // user@host:port/path=Aencoded_password // -static QStringList readCvsntPassFile() +static TQStringList readCvsntPassFile() { - QStringList list; + TQStringList list; - QFile file(fileNameCvsnt()); + TQFile file(fileNameCvsnt()); if (file.open(IO_ReadOnly)) { - QTextStream stream(&file); + TQTextStream stream(&file); while (!stream.atEnd()) { - const QString line(stream.readLine()); + const TQString line(stream.readLine()); const int pos(line.find("=A")); if (pos >= 0) @@ -98,18 +98,18 @@ static QStringList readCvsntPassFile() } -QStringList Repositories::readCvsPassFile() +TQStringList Repositories::readCvsPassFile() { - return (QFileInfo(fileNameCvs()).lastModified() - < QFileInfo(fileNameCvsnt()).lastModified()) + return (TQFileInfo(fileNameCvs()).lastModified() + < TQFileInfo(fileNameCvsnt()).lastModified()) ? readCvsntPassFile() : ::readCvsPassFile(); } -QStringList Repositories::readConfigFile() +TQStringList Repositories::readConfigFile() { - QStringList list; + TQStringList list; KConfig *config = CervisiaPart::config(); config->setGroup("Repositories"); diff --git a/cervisia/repositories.h b/cervisia/repositories.h index 28d7a469..79c1c5ad 100644 --- a/cervisia/repositories.h +++ b/cervisia/repositories.h @@ -25,8 +25,8 @@ class Repositories { public: - static QStringList readCvsPassFile(); - static QStringList readConfigFile(); + static TQStringList readCvsPassFile(); + static TQStringList readConfigFile(); }; diff --git a/cervisia/repositorydlg.cpp b/cervisia/repositorydlg.cpp index d0568398..a30a13ce 100644 --- a/cervisia/repositorydlg.cpp +++ b/cervisia/repositorydlg.cpp @@ -21,8 +21,8 @@ #include "repositorydlg.h" -#include -#include +#include +#include #include #include #include @@ -40,25 +40,25 @@ class RepositoryListItem : public KListViewItem { public: - RepositoryListItem(KListView* parent, const QString& repo, bool loggedin); + RepositoryListItem(KListView* parent, const TQString& repo, bool loggedin); - void setRsh(const QString& rsh); - void setServer(const QString& server) { m_server = server; } + void setRsh(const TQString& rsh); + void setServer(const TQString& server) { m_server = server; } void setCompression(int compression); void setIsLoggedIn(bool isLoggedIn); void setRetrieveCvsignore(bool retrieve) { m_retrieveCvsignore = retrieve; } - QString repository() const + TQString repository() const { return text(0); } - QString rsh() const + TQString rsh() const { - QString str = text(1); + TQString str = text(1); return (str.startsWith("ext (") ? str.mid(5, str.length()-6) - : QString::null); + : TQString::null); } - QString server() const { return m_server; } + TQString server() const { return m_server; } int compression() const { bool ok; @@ -72,20 +72,20 @@ private: void changeLoginStatusColumn(); private: - QString m_server; + TQString m_server; bool m_isLoggedIn; bool m_retrieveCvsignore; }; -static bool LoginNeeded(const QString& repository) +static bool LoginNeeded(const TQString& repository) { return repository.startsWith(":pserver:") || repository.startsWith(":sspi:"); } -RepositoryListItem::RepositoryListItem(KListView* parent, const QString& repo, +RepositoryListItem::RepositoryListItem(KListView* parent, const TQString& repo, bool loggedin) : KListViewItem(parent) , m_isLoggedIn(loggedin) @@ -96,10 +96,10 @@ RepositoryListItem::RepositoryListItem(KListView* parent, const QString& repo, } -void RepositoryListItem::setRsh(const QString& rsh) +void RepositoryListItem::setRsh(const TQString& rsh) { - QString repo = repository(); - QString method; + TQString repo = repository(); + TQString method; if( repo.startsWith(":pserver:") ) method = "pserver"; @@ -124,7 +124,7 @@ void RepositoryListItem::setRsh(const QString& rsh) void RepositoryListItem::setCompression(int compression) { - QString compressionStr = (compression >= 0) ? QString::number(compression) + TQString compressionStr = (compression >= 0) ? TQString::number(compression) : i18n("Default"); setText(2, compressionStr); @@ -141,7 +141,7 @@ void RepositoryListItem::setIsLoggedIn(bool isLoggedIn) void RepositoryListItem::changeLoginStatusColumn() { - QString loginStatus; + TQString loginStatus; if( LoginNeeded(repository()) ) loginStatus = m_isLoggedIn ? i18n("Logged in") : i18n("Not logged in"); @@ -153,15 +153,15 @@ void RepositoryListItem::changeLoginStatusColumn() RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, - QWidget* parent, const char* name) + TQWidget* parent, const char* name) : KDialogBase(parent, name, true, i18n("Configure Access to Repositories"), Ok | Cancel | Help, Ok, true) , m_partConfig(cfg) , m_cvsService(cvsService) { - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout* hbox = new QHBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout* hbox = new TQHBoxLayout(mainWidget, 0, spacingHint()); m_repoList = new KListView(mainWidget); hbox->addWidget(m_repoList, 10); @@ -173,13 +173,13 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, m_repoList->addColumn(i18n("Status")); m_repoList->setFocus(); - connect(m_repoList, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotDoubleClicked(QListViewItem*))); - connect(m_repoList, SIGNAL(selectionChanged()), - this, SLOT(slotSelectionChanged())); + connect(m_repoList, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotDoubleClicked(TQListViewItem*))); + connect(m_repoList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotSelectionChanged())); KButtonBox* actionbox = new KButtonBox(mainWidget, KButtonBox::Vertical); - QPushButton* addbutton = actionbox->addButton(i18n("&Add...")); + TQPushButton* addbutton = actionbox->addButton(i18n("&Add...")); m_modifyButton = actionbox->addButton(i18n("&Modify...")); m_removeButton = actionbox->addButton(i18n("&Remove")); actionbox->addStretch(); @@ -192,16 +192,16 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, m_loginButton->setEnabled(false); m_logoutButton->setEnabled(false); - connect( addbutton, SIGNAL(clicked()), - this, SLOT(slotAddClicked()) ); - connect( m_modifyButton, SIGNAL(clicked()), - this, SLOT(slotModifyClicked()) ); - connect( m_removeButton, SIGNAL(clicked()), - this, SLOT(slotRemoveClicked()) ); - connect( m_loginButton, SIGNAL(clicked()), - this, SLOT(slotLoginClicked()) ); - connect( m_logoutButton, SIGNAL(clicked()), - this, SLOT(slotLogoutClicked()) ); + connect( addbutton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddClicked()) ); + connect( m_modifyButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotModifyClicked()) ); + connect( m_removeButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveClicked()) ); + connect( m_loginButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLoginClicked()) ); + connect( m_logoutButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLogoutClicked()) ); // open cvs DCOP service configuration file m_serviceConfig = new KConfig("cvsservicerc"); @@ -209,7 +209,7 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, readCvsPassFile(); readConfigFile(); - if (QListViewItem* item = m_repoList->firstChild()) + if (TQListViewItem* item = m_repoList->firstChild()) { m_repoList->setCurrentItem(item); m_repoList->setSelected(item, true); @@ -224,14 +224,14 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(m_partConfig, "RepositoryDialog"); + TQSize size = configDialogSize(m_partConfig, "RepositoryDialog"); resize(size); // without this restoreLayout() can't change the column widths for (int i = 0; i < m_repoList->columns(); ++i) - m_repoList->setColumnWidthMode(i, QListView::Manual); + m_repoList->setColumnWidthMode(i, TQListView::Manual); - m_repoList->restoreLayout(&m_partConfig, QString::fromLatin1("RepositoryListView")); + m_repoList->restoreLayout(&m_partConfig, TQString::fromLatin1("RepositoryListView")); } @@ -239,7 +239,7 @@ RepositoryDialog::~RepositoryDialog() { saveDialogSize(m_partConfig, "RepositoryDialog"); - m_repoList->saveLayout(&m_partConfig, QString::fromLatin1("RepositoryListView")); + m_repoList->saveLayout(&m_partConfig, TQString::fromLatin1("RepositoryListView")); delete m_serviceConfig; } @@ -247,8 +247,8 @@ RepositoryDialog::~RepositoryDialog() void RepositoryDialog::readCvsPassFile() { - QStringList list = Repositories::readCvsPassFile(); - QStringList::ConstIterator it; + TQStringList list = Repositories::readCvsPassFile(); + TQStringList::ConstIterator it; for( it = list.begin(); it != list.end(); ++it ) (void) new RepositoryListItem(m_repoList, (*it), true); } @@ -256,14 +256,14 @@ void RepositoryDialog::readCvsPassFile() void RepositoryDialog::readConfigFile() { - QStringList list = Repositories::readConfigFile(); + TQStringList list = Repositories::readConfigFile(); // Sort out all list elements which are already in the list view - QListViewItem* item = m_repoList->firstChild(); + TQListViewItem* item = m_repoList->firstChild(); for( ; item; item = item->nextSibling() ) list.remove(item->text(0)); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = list.begin(); it != list.end(); ++it ) new RepositoryListItem(m_repoList, *it, false); @@ -274,11 +274,11 @@ void RepositoryDialog::readConfigFile() RepositoryListItem* ritem = static_cast(item); // read entries from cvs DCOP service configuration - m_serviceConfig->setGroup(QString::fromLatin1("Repository-") + + m_serviceConfig->setGroup(TQString::fromLatin1("Repository-") + ritem->repository()); - QString rsh = m_serviceConfig->readEntry("rsh", QString()); - QString server = m_serviceConfig->readEntry("cvs_server", QString()); + TQString rsh = m_serviceConfig->readEntry("rsh", TQString()); + TQString server = m_serviceConfig->readEntry("cvs_server", TQString()); int compression = m_serviceConfig->readNumEntry("Compression", -1); bool retrieveFile = m_serviceConfig->readBoolEntry("RetrieveCvsignore", false); @@ -294,8 +294,8 @@ void RepositoryDialog::readConfigFile() void RepositoryDialog::slotOk() { // Make list of repositories - QListViewItem* item; - QStringList list; + TQListViewItem* item; + TQStringList list; for( item = m_repoList->firstChild(); item; item = item->nextSibling() ) list.append(item->text(0)); @@ -319,18 +319,18 @@ void RepositoryDialog::slotOk() void RepositoryDialog::slotAddClicked() { - AddRepositoryDialog dlg(m_partConfig, QString::null, this); + AddRepositoryDialog dlg(m_partConfig, TQString::null, this); // default compression level dlg.setCompression(-1); if( dlg.exec() ) { - QString repo = Cervisia::NormalizeRepository(dlg.repository()); - QString rsh = dlg.rsh(); - QString server = dlg.server(); + TQString repo = Cervisia::NormalizeRepository(dlg.repository()); + TQString rsh = dlg.rsh(); + TQString server = dlg.server(); int compression = dlg.compression(); bool retrieveFile = dlg.retrieveCvsignoreFile(); - QListViewItem* item = m_repoList->firstChild(); + TQListViewItem* item = m_repoList->firstChild(); for( ; item; item = item->nextSibling() ) if( item->text(0) == repo ) { @@ -369,15 +369,15 @@ void RepositoryDialog::slotRemoveClicked() } -void RepositoryDialog::slotDoubleClicked(QListViewItem* item) +void RepositoryDialog::slotDoubleClicked(TQListViewItem* item) { if( !item ) return; RepositoryListItem* ritem = static_cast(item); - QString repo = ritem->repository(); - QString rsh = ritem->rsh(); - QString server = ritem->server(); + TQString repo = ritem->repository(); + TQString rsh = ritem->rsh(); + TQString server = ritem->server(); int compression = ritem->compression(); bool retrieveFile = ritem->retrieveCvsignore(); @@ -422,7 +422,7 @@ void RepositoryDialog::slotLoginClicked() bool success = job.call("execute()"); if( !success ) { - QStringList output = job.call("output()"); + TQStringList output = job.call("output()"); KMessageBox::detailedError(this, i18n("Login failed."), output.join("\n")); return; } @@ -490,7 +490,7 @@ void RepositoryDialog::slotSelectionChanged() void RepositoryDialog::writeRepositoryData(RepositoryListItem* item) { // write entries to cvs DCOP service configuration - m_serviceConfig->setGroup(QString::fromLatin1("Repository-") + + m_serviceConfig->setGroup(TQString::fromLatin1("Repository-") + item->repository()); m_serviceConfig->writeEntry("rsh", item->rsh()); diff --git a/cervisia/repositorydlg.h b/cervisia/repositorydlg.h index c980b712..0ffae1ab 100644 --- a/cervisia/repositorydlg.h +++ b/cervisia/repositorydlg.h @@ -39,7 +39,7 @@ class RepositoryDialog : public KDialogBase public: RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, - QWidget* parent = 0, const char* name = 0); + TQWidget* parent = 0, const char* name = 0); virtual ~RepositoryDialog(); void readConfigFile(); @@ -52,7 +52,7 @@ private slots: void slotAddClicked(); void slotModifyClicked(); void slotRemoveClicked(); - void slotDoubleClicked(QListViewItem *item); + void slotDoubleClicked(TQListViewItem *item); void slotLoginClicked(); void slotLogoutClicked(); void slotSelectionChanged(); @@ -65,10 +65,10 @@ private: CvsService_stub* m_cvsService; KConfig* m_serviceConfig; KListView* m_repoList; - QPushButton* m_modifyButton; - QPushButton* m_removeButton; - QPushButton* m_loginButton; - QPushButton* m_logoutButton; + TQPushButton* m_modifyButton; + TQPushButton* m_removeButton; + TQPushButton* m_loginButton; + TQPushButton* m_logoutButton; }; #endif diff --git a/cervisia/resolvedlg.cpp b/cervisia/resolvedlg.cpp index 2cf0ffd6..8fce2ee7 100644 --- a/cervisia/resolvedlg.cpp +++ b/cervisia/resolvedlg.cpp @@ -21,18 +21,18 @@ #include "resolvedlg.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #include "misc.h" #include "resolvedlg_p.h" using Cervisia::ResolveEditorDialog; @@ -40,13 +40,13 @@ using Cervisia::ResolveEditorDialog; // *UGLY HACK* // The following conditions are a rough hack -static QTextCodec *DetectCodec(const QString &fileName) +static TQTextCodec *DetectCodec(const TQString &fileName) { if (fileName.endsWith(".ui") || fileName.endsWith(".docbook") || fileName.endsWith(".xml")) - return QTextCodec::codecForName("utf8"); + return TQTextCodec::codecForName("utf8"); - return QTextCodec::codecForLocale(); + return TQTextCodec::codecForLocale(); } @@ -56,19 +56,19 @@ namespace class LineSeparator { public: - LineSeparator(const QString& text) + LineSeparator(const TQString& text) : m_text(text) , m_startPos(0) , m_endPos(0) { } - QString nextLine() const + TQString nextLine() const { // already reach end of text on previous call if( m_endPos < 0 ) { - m_currentLine = QString::null; + m_currentLine = TQString::null; return m_currentLine; } @@ -87,16 +87,16 @@ public: } private: - const QString m_text; - mutable QString m_currentLine; + const TQString m_text; + mutable TQString m_currentLine; mutable int m_startPos, m_endPos; }; } -ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) - : KDialogBase(parent, name, false, QString::null, +ResolveDialog::ResolveDialog(KConfig& cfg, TQWidget *parent, const char *name) + : KDialogBase(parent, name, false, TQString::null, Close | Help | User1 | User2, Close, true, KStdGuiItem::saveAs(), KStdGuiItem::save()) , markeditem(-1) @@ -104,26 +104,26 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) { items.setAutoDelete(true); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QSplitter *vertSplitter = new QSplitter(QSplitter::Vertical, mainWidget); + TQSplitter *vertSplitter = new TQSplitter(TQSplitter::Vertical, mainWidget); - QSplitter *splitter = new QSplitter(QSplitter::Horizontal, vertSplitter); + TQSplitter *splitter = new TQSplitter(TQSplitter::Horizontal, vertSplitter); - QWidget *versionALayoutWidget = new QWidget(splitter); - QBoxLayout *versionAlayout = new QVBoxLayout(versionALayoutWidget, 5); + TQWidget *versionALayoutWidget = new TQWidget(splitter); + TQBoxLayout *versionAlayout = new TQVBoxLayout(versionALayoutWidget, 5); - QLabel *revlabel1 = new QLabel(i18n("Your version (A):"), versionALayoutWidget); + TQLabel *revlabel1 = new TQLabel(i18n("Your version (A):"), versionALayoutWidget); versionAlayout->addWidget(revlabel1); diff1 = new DiffView(cfg, true, false, versionALayoutWidget); versionAlayout->addWidget(diff1, 10); - QWidget* versionBLayoutWidget = new QWidget(splitter); - QBoxLayout *versionBlayout = new QVBoxLayout(versionBLayoutWidget, 5); + TQWidget* versionBLayoutWidget = new TQWidget(splitter); + TQBoxLayout *versionBlayout = new TQVBoxLayout(versionBLayoutWidget, 5); - QLabel *revlabel2 = new QLabel(i18n("Other version (B):"), versionBLayoutWidget); + TQLabel *revlabel2 = new TQLabel(i18n("Other version (B):"), versionBLayoutWidget); versionBlayout->addWidget(revlabel2); diff2 = new DiffView(cfg, true, false, versionBLayoutWidget); versionBlayout->addWidget(diff2, 10); @@ -131,10 +131,10 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) diff1->setPartner(diff2); diff2->setPartner(diff1); - QWidget* mergeLayoutWidget = new QWidget(vertSplitter); - QBoxLayout *mergeLayout = new QVBoxLayout(mergeLayoutWidget, 5); + TQWidget* mergeLayoutWidget = new TQWidget(vertSplitter); + TQBoxLayout *mergeLayout = new TQVBoxLayout(mergeLayoutWidget, 5); - QLabel *mergelabel = new QLabel(i18n("Merged version:"), mergeLayoutWidget); + TQLabel *mergelabel = new TQLabel(i18n("Merged version:"), mergeLayoutWidget); mergeLayout->addWidget(mergelabel); merge = new DiffView(cfg, false, false, mergeLayoutWidget); @@ -142,31 +142,31 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) layout->addWidget(vertSplitter); - abutton = new QPushButton("&A", mainWidget); - connect( abutton, SIGNAL(clicked()), SLOT(aClicked()) ); + abutton = new TQPushButton("&A", mainWidget); + connect( abutton, TQT_SIGNAL(clicked()), TQT_SLOT(aClicked()) ); - bbutton = new QPushButton("&B", mainWidget); - connect( bbutton, SIGNAL(clicked()), SLOT(bClicked()) ); + bbutton = new TQPushButton("&B", mainWidget); + connect( bbutton, TQT_SIGNAL(clicked()), TQT_SLOT(bClicked()) ); - abbutton = new QPushButton("A+B", mainWidget); - connect( abbutton, SIGNAL(clicked()), SLOT(abClicked()) ); + abbutton = new TQPushButton("A+B", mainWidget); + connect( abbutton, TQT_SIGNAL(clicked()), TQT_SLOT(abClicked()) ); - babutton = new QPushButton("B+A", mainWidget); - connect( babutton, SIGNAL(clicked()), SLOT(baClicked()) ); + babutton = new TQPushButton("B+A", mainWidget); + connect( babutton, TQT_SIGNAL(clicked()), TQT_SLOT(baClicked()) ); - editbutton = new QPushButton(i18n("&Edit"), mainWidget); - connect( editbutton, SIGNAL(clicked()), SLOT(editClicked()) ); + editbutton = new TQPushButton(i18n("&Edit"), mainWidget); + connect( editbutton, TQT_SIGNAL(clicked()), TQT_SLOT(editClicked()) ); - nofnlabel = new QLabel(mainWidget); + nofnlabel = new TQLabel(mainWidget); nofnlabel->setAlignment(AlignCenter); - backbutton = new QPushButton("&<<", mainWidget); - connect( backbutton, SIGNAL(clicked()), SLOT(backClicked()) ); + backbutton = new TQPushButton("&<<", mainWidget); + connect( backbutton, TQT_SIGNAL(clicked()), TQT_SLOT(backClicked()) ); - forwbutton = new QPushButton("&>>", mainWidget); - connect( forwbutton, SIGNAL(clicked()), SLOT(forwClicked()) ); + forwbutton = new TQPushButton("&>>", mainWidget); + connect( forwbutton, TQT_SIGNAL(clicked()), TQT_SLOT(forwClicked()) ); - QBoxLayout *buttonlayout = new QHBoxLayout(layout); + TQBoxLayout *buttonlayout = new TQHBoxLayout(layout); buttonlayout->addWidget(abutton, 1); buttonlayout->addWidget(bbutton, 1); buttonlayout->addWidget(abbutton, 1); @@ -178,10 +178,10 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) buttonlayout->addWidget(backbutton, 1); buttonlayout->addWidget(forwbutton, 1); - connect( this, SIGNAL(user2Clicked()), SLOT(saveClicked()) ); - connect( this, SIGNAL(user1Clicked()), SLOT(saveAsClicked()) ); + connect( this, TQT_SIGNAL(user2Clicked()), TQT_SLOT(saveClicked()) ); + connect( this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(saveAsClicked()) ); - QFontMetrics const fm(fontMetrics()); + TQFontMetrics const fm(fontMetrics()); setMinimumSize(fm.width('0') * 120, fm.lineSpacing() * 40); @@ -189,7 +189,7 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "ResolveDialog"); + TQSize size = configDialogSize(partConfig, "ResolveDialog"); resize(size); } @@ -216,7 +216,7 @@ public: }; -bool ResolveDialog::parseFile(const QString &name) +bool ResolveDialog::parseFile(const TQString &name) { int lineno1, lineno2; int advanced1, advanced2; @@ -226,7 +226,7 @@ bool ResolveDialog::parseFile(const QString &name) fname = name; - QString fileContent = readFile(); + TQString fileContent = readFile(); if( fileContent.isNull() ) return false; @@ -237,7 +237,7 @@ bool ResolveDialog::parseFile(const QString &name) advanced1 = advanced2 = 0; do { - QString line = separator.nextLine(); + TQString line = separator.nextLine(); // reached end of file? if( separator.atEnd() ) @@ -250,7 +250,7 @@ bool ResolveDialog::parseFile(const QString &name) // check for start of conflict block // Set to look for <<<<<<< at begining of line with exaclty one // space after then anything after that. - QRegExp rx( "^<{7}\\s.*$" ); + TQRegExp rx( "^<{7}\\s.*$" ); int separatorPos = rx.search(line); if( separatorPos >= 0 ) { @@ -268,7 +268,7 @@ bool ResolveDialog::parseFile(const QString &name) { // Set to look for ======= at begining of line which may have one // or more spaces after then nothing else. - QRegExp rx( "^={7}\\s*$" ); + TQRegExp rx( "^={7}\\s*$" ); int separatorPos = rx.search(line); if( separatorPos < 0 ) // still in version A { @@ -286,7 +286,7 @@ bool ResolveDialog::parseFile(const QString &name) { // Set to look for >>>>>>> at begining of line with exaclty one // space after then anything after that. - QRegExp rx( "^>{7}\\s.*$" ); + TQRegExp rx( "^>{7}\\s.*$" ); int separatorPos = rx.search(line); if( separatorPos < 0 ) // still in version B { @@ -325,7 +325,7 @@ bool ResolveDialog::parseFile(const QString &name) } -void ResolveDialog::addToMergeAndVersionA(const QString& line, +void ResolveDialog::addToMergeAndVersionA(const TQString& line, DiffView::DiffType type, int& lineNo) { lineNo++; @@ -334,7 +334,7 @@ void ResolveDialog::addToMergeAndVersionA(const QString& line, } -void ResolveDialog::addToVersionB(const QString& line, DiffView::DiffType type, +void ResolveDialog::addToVersionB(const TQString& line, DiffView::DiffType type, int& lineNo) { lineNo++; @@ -342,9 +342,9 @@ void ResolveDialog::addToVersionB(const QString& line, DiffView::DiffType type, } -void ResolveDialog::saveFile(const QString &name) +void ResolveDialog::saveFile(const TQString &name) { - QFile f(name); + TQFile f(name); if (!f.open(IO_WriteOnly)) { KMessageBox::sorry(this, @@ -352,11 +352,11 @@ void ResolveDialog::saveFile(const QString &name) "Cervisia"); return; } - QTextStream stream(&f); - QTextCodec *fcodec = DetectCodec(name); + TQTextStream stream(&f); + TQTextCodec *fcodec = DetectCodec(name); stream.setCodec(fcodec); - QString output; + TQString output; for( int i = 0; i < merge->count(); i++ ) output +=merge->stringAtOffset(i); stream << output; @@ -365,14 +365,14 @@ void ResolveDialog::saveFile(const QString &name) } -QString ResolveDialog::readFile() +TQString ResolveDialog::readFile() { - QFile f(fname); + TQFile f(fname); if( !f.open(IO_ReadOnly) ) - return QString::null; + return TQString::null; - QTextStream stream(&f); - QTextCodec* codec = DetectCodec(fname); + TQTextStream stream(&f); + TQTextCodec* codec = DetectCodec(fname); stream.setCodec(codec); return stream.read(); @@ -381,7 +381,7 @@ QString ResolveDialog::readFile() void ResolveDialog::updateNofN() { - QString str; + TQString str; if (markeditem >= 0) str = i18n("%1 of %2").arg(markeditem+1).arg(items.count()); else @@ -441,7 +441,7 @@ void ResolveDialog::updateMergedVersion(ResolveItem* item, // Insert new int total = 0; LineSeparator separator(m_contentMergedVersion); - QString line = separator.nextLine(); + TQString line = separator.nextLine(); while( !separator.atEnd() ) { merge->insertAtOffset(line, DiffView::Change, item->offsetM+total); @@ -546,7 +546,7 @@ void ResolveDialog::editClicked() ResolveItem *item = items.at(markeditem); - QString mergedPart; + TQString mergedPart; int total = item->linecountTotal; int offset = item->offsetM; for( int i = 0; i < total; ++i ) @@ -576,7 +576,7 @@ void ResolveDialog::saveClicked() void ResolveDialog::saveAsClicked() { - QString filename = + TQString filename = KFileDialog::getSaveFileName(0, 0, this, 0); if( !filename.isEmpty() && Cervisia::CheckOverwrite(filename) ) @@ -584,7 +584,7 @@ void ResolveDialog::saveAsClicked() } -void ResolveDialog::keyPressEvent(QKeyEvent *e) +void ResolveDialog::keyPressEvent(TQKeyEvent *e) { switch (e->key()) { @@ -601,10 +601,10 @@ void ResolveDialog::keyPressEvent(QKeyEvent *e) -/* This will return the A side of the diff in a QString. */ -QString ResolveDialog::contentVersionA(const ResolveItem *item) +/* This will return the A side of the diff in a TQString. */ +TQString ResolveDialog::contentVersionA(const ResolveItem *item) { - QString result; + TQString result; for( int i = item->linenoA; i < item->linenoA+item->linecountA; ++i ) { result += diff1->stringAtLine(i); @@ -614,10 +614,10 @@ QString ResolveDialog::contentVersionA(const ResolveItem *item) } -/* This will return the B side of the diff item in a QString. */ -QString ResolveDialog::contentVersionB(const ResolveItem *item) +/* This will return the B side of the diff item in a TQString. */ +TQString ResolveDialog::contentVersionB(const ResolveItem *item) { - QString result; + TQString result; for( int i = item->linenoB; i < item->linenoB+item->linecountB; ++i ) { result += diff2->stringAtLine(i); diff --git a/cervisia/resolvedlg.h b/cervisia/resolvedlg.h index 1cee22b7..334622d9 100644 --- a/cervisia/resolvedlg.h +++ b/cervisia/resolvedlg.h @@ -25,7 +25,7 @@ #include -#include +#include #include "diffview.h" @@ -42,13 +42,13 @@ class ResolveDialog : public KDialogBase public: enum ChooseType { ChA, ChB, ChAB, ChBA, ChEdit }; - explicit ResolveDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit ResolveDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~ResolveDialog(); - bool parseFile(const QString &name); + bool parseFile(const TQString &name); protected: - virtual void keyPressEvent(QKeyEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); private slots: void backClicked(); @@ -66,27 +66,27 @@ private: void updateHighlight(int newitem); void choose(ChooseType ch); void chooseEdit(); - void saveFile(const QString &name); - QString readFile(); - void addToMergeAndVersionA(const QString& line, DiffView::DiffType type, + void saveFile(const TQString &name); + TQString readFile(); + void addToMergeAndVersionA(const TQString& line, DiffView::DiffType type, int& lineNo); - void addToVersionB(const QString& line, DiffView::DiffType type, int& lineNo); + void addToVersionB(const TQString& line, DiffView::DiffType type, int& lineNo); void updateMergedVersion(ResolveItem* item, ChooseType chosen); - QString contentVersionA(const ResolveItem *item); - QString contentVersionB(const ResolveItem *item); + TQString contentVersionA(const ResolveItem *item); + TQString contentVersionB(const ResolveItem *item); - QLabel *nofnlabel; - QPushButton *backbutton, *forwbutton; - QPushButton *abutton, *bbutton, *abbutton, *babutton, *editbutton; + TQLabel *nofnlabel; + TQPushButton *backbutton, *forwbutton; + TQPushButton *abutton, *bbutton, *abbutton, *babutton, *editbutton; DiffView *diff1, *diff2, *merge; - QPtrList items; - QString fname; - QTextCodec *fcodec; + TQPtrList items; + TQString fname; + TQTextCodec *fcodec; int markeditem; KConfig& partConfig; - QString m_contentMergedVersion; + TQString m_contentMergedVersion; }; diff --git a/cervisia/resolvedlg_p.cpp b/cervisia/resolvedlg_p.cpp index e925677d..1023465a 100644 --- a/cervisia/resolvedlg_p.cpp +++ b/cervisia/resolvedlg_p.cpp @@ -22,8 +22,8 @@ using namespace Cervisia; #include -ResolveEditorDialog::ResolveEditorDialog(KConfig& cfg, QWidget *parent, const char *name) - : KDialogBase(parent, name, true, QString::null, +ResolveEditorDialog::ResolveEditorDialog(KConfig& cfg, TQWidget *parent, const char *name) + : KDialogBase(parent, name, true, TQString::null, Ok | Cancel, Ok, true) , m_partConfig(cfg) { @@ -32,11 +32,11 @@ ResolveEditorDialog::ResolveEditorDialog(KConfig& cfg, QWidget *parent, const ch setMainWidget(m_edit); - QFontMetrics const fm(fontMetrics()); + TQFontMetrics const fm(fontMetrics()); setMinimumSize(fm.width('0') * 120, fm.lineSpacing() * 40); - QSize size = configDialogSize(m_partConfig, "ResolveEditDialog"); + TQSize size = configDialogSize(m_partConfig, "ResolveEditDialog"); resize(size); } @@ -47,13 +47,13 @@ ResolveEditorDialog::~ResolveEditorDialog() } -void ResolveEditorDialog::setContent(const QString& text) +void ResolveEditorDialog::setContent(const TQString& text) { m_edit->setText(text); } -QString ResolveEditorDialog::content() const +TQString ResolveEditorDialog::content() const { return m_edit->text(); } diff --git a/cervisia/resolvedlg_p.h b/cervisia/resolvedlg_p.h index 30b4559a..08d7a779 100644 --- a/cervisia/resolvedlg_p.h +++ b/cervisia/resolvedlg_p.h @@ -33,11 +33,11 @@ namespace Cervisia class ResolveEditorDialog : public KDialogBase { public: - explicit ResolveEditorDialog(KConfig& cfg, QWidget* parent=0, const char* name=0); + explicit ResolveEditorDialog(KConfig& cfg, TQWidget* parent=0, const char* name=0); virtual ~ResolveEditorDialog(); - void setContent(const QString& text); - QString content() const; + void setContent(const TQString& text); + TQString content() const; private: KTextEdit* m_edit; diff --git a/cervisia/settingsdlg.cpp b/cervisia/settingsdlg.cpp index 71b8b32c..1d50b6c1 100644 --- a/cervisia/settingsdlg.cpp +++ b/cervisia/settingsdlg.cpp @@ -20,16 +20,16 @@ #include "settingsdlg.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -49,27 +49,27 @@ namespace { // helper method to load icons for configuration pages - inline QPixmap LoadIcon(const char* iconName) + inline TQPixmap LoadIcon(const char* iconName) { KIconLoader* loader = KGlobal::instance()->iconLoader(); - return loader->loadIcon(QString::fromLatin1(iconName), KIcon::NoGroup, + return loader->loadIcon(TQString::fromLatin1(iconName), KIcon::NoGroup, KIcon::SizeMedium); } } -FontButton::FontButton( const QString &text, QWidget *parent, const char *name ) - : QPushButton(text, parent, name) +FontButton::FontButton( const TQString &text, TQWidget *parent, const char *name ) + : TQPushButton(text, parent, name) { - connect( this, SIGNAL(clicked()), this, SLOT(chooseFont()) ); + connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseFont()) ); } void FontButton::chooseFont() { - QFont newFont(font()); + TQFont newFont(font()); - if (KFontDialog::getFont(newFont, false, this) == QDialog::Rejected) + if (KFontDialog::getFont(newFont, false, this) == TQDialog::Rejected) return; setFont(newFont); @@ -77,7 +77,7 @@ void FontButton::chooseFont() } -SettingsDialog::SettingsDialog( KConfig *conf, QWidget *parent, const char *name ) +SettingsDialog::SettingsDialog( KConfig *conf, TQWidget *parent, const char *name ) : KDialogBase(KDialogBase::IconList, i18n("Configure Cervisia"), KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help, KDialogBase::Ok, @@ -204,10 +204,10 @@ void SettingsDialog::writeSettings() CervisiaSettings::setDiffDeleteColor(m_diffDeleteButton->color()); // I'm not yet sure whether this is a hack or not :-) - QWidgetListIt it(*QApplication::allWidgets()); + TQWidgetListIt it(*TQApplication::allWidgets()); for (; it.current(); ++it) { - QWidget *w = it.current(); + TQWidget *w = it.current(); if (w->inherits("ProtocolView")) w->setFont(m_protocolFontBox->font()); if (w->inherits("AnnotateView")) @@ -234,11 +234,11 @@ void SettingsDialog::done(int res) */ void SettingsDialog::addGeneralPage() { - QFrame* generalPage = addPage(i18n("General"), QString::null, + TQFrame* generalPage = addPage(i18n("General"), TQString::null, LoadIcon("misc")); - QVBoxLayout* layout = new QVBoxLayout(generalPage, 0, KDialog::spacingHint()); + TQVBoxLayout* layout = new TQVBoxLayout(generalPage, 0, KDialog::spacingHint()); - QLabel *usernamelabel = new QLabel( i18n("&User name for the change log editor:"), generalPage ); + TQLabel *usernamelabel = new TQLabel( i18n("&User name for the change log editor:"), generalPage ); usernameedit = new KLineEdit(generalPage); usernameedit->setFocus(); usernamelabel->setBuddy(usernameedit); @@ -246,7 +246,7 @@ void SettingsDialog::addGeneralPage() layout->addWidget(usernamelabel); layout->addWidget(usernameedit); - QLabel *cvspathlabel = new QLabel( i18n("&Path to CVS executable, or 'cvs':"), generalPage ); + TQLabel *cvspathlabel = new TQLabel( i18n("&Path to CVS executable, or 'cvs':"), generalPage ); cvspathedit = new KURLRequester(generalPage); cvspathlabel->setBuddy(cvspathedit); @@ -262,29 +262,29 @@ void SettingsDialog::addGeneralPage() */ void SettingsDialog::addDiffPage() { - QGrid *diffPage = addGridPage(2, QGrid::Horizontal, i18n("Diff Viewer"), - QString::null, LoadIcon("vcs_diff")); + TQGrid *diffPage = addGridPage(2, TQGrid::Horizontal, i18n("Diff Viewer"), + TQString::null, LoadIcon("vcs_diff")); - QLabel *contextlabel = new QLabel( i18n("&Number of context lines in diff dialog:"), diffPage ); + TQLabel *contextlabel = new TQLabel( i18n("&Number of context lines in diff dialog:"), diffPage ); contextedit = new KIntNumInput( 0, diffPage ); contextedit->setRange(0, 65535, 1, false); contextlabel->setBuddy(contextedit); - QLabel *diffoptlabel = new QLabel(i18n("Additional &options for cvs diff:"), diffPage); + TQLabel *diffoptlabel = new TQLabel(i18n("Additional &options for cvs diff:"), diffPage); diffoptedit = new KLineEdit(diffPage); diffoptlabel->setBuddy(diffoptedit); - QLabel *tabwidthlabel = new QLabel(i18n("Tab &width in diff dialog:"), diffPage); + TQLabel *tabwidthlabel = new TQLabel(i18n("Tab &width in diff dialog:"), diffPage); tabwidthedit = new KIntNumInput(0, diffPage); tabwidthedit->setRange(1, 16, 1, false); tabwidthlabel->setBuddy(tabwidthedit); - QLabel *extdifflabel = new QLabel(i18n("External diff &frontend:"), diffPage); + TQLabel *extdifflabel = new TQLabel(i18n("External diff &frontend:"), diffPage); extdiffedit = new KURLRequester(diffPage); extdifflabel->setBuddy(extdiffedit); // dummy widget to take up the vertical space - new QWidget(diffPage); + new TQWidget(diffPage); } @@ -293,16 +293,16 @@ void SettingsDialog::addDiffPage() */ void SettingsDialog::addStatusPage() { - QVBox* statusPage = addVBoxPage(i18n("Status"), QString::null, + TQVBox* statusPage = addVBoxPage(i18n("Status"), TQString::null, LoadIcon("fork")); - remotestatusbox = new QCheckBox(i18n("When opening a sandbox from a &remote repository,\n" + remotestatusbox = new TQCheckBox(i18n("When opening a sandbox from a &remote repository,\n" "start a File->Status command automatically"), statusPage); - localstatusbox = new QCheckBox(i18n("When opening a sandbox from a &local repository,\n" + localstatusbox = new TQCheckBox(i18n("When opening a sandbox from a &local repository,\n" "start a File->Status command automatically"), statusPage); // dummy widget to take up the vertical space - new QWidget(statusPage); + new TQWidget(statusPage); } @@ -311,7 +311,7 @@ void SettingsDialog::addStatusPage() */ void SettingsDialog::addAdvancedPage() { - QVBox* frame = addVBoxPage(i18n("Advanced"), QString::null, + TQVBox* frame = addVBoxPage(i18n("Advanced"), TQString::null, LoadIcon("configure")); m_advancedPage = new AdvancedPage(frame); @@ -325,10 +325,10 @@ void SettingsDialog::addAdvancedPage() */ void SettingsDialog::addLookAndFeelPage() { - QVBox* lookPage = addVBoxPage(i18n("Appearance"), QString::null, + TQVBox* lookPage = addVBoxPage(i18n("Appearance"), TQString::null, LoadIcon("looknfeel")); - QGroupBox* fontGroupBox = new QGroupBox(4, Qt::Vertical, i18n("Fonts"), + TQGroupBox* fontGroupBox = new TQGroupBox(4, Qt::Vertical, i18n("Fonts"), lookPage); fontGroupBox->setInsideSpacing(KDialog::spacingHint()); @@ -341,40 +341,40 @@ void SettingsDialog::addLookAndFeelPage() m_changelogFontBox = new FontButton(i18n("Font for ChangeLog View..."), fontGroupBox); - QGroupBox* colorGroupBox = new QGroupBox(4, Qt::Horizontal, + TQGroupBox* colorGroupBox = new TQGroupBox(4, Qt::Horizontal, i18n("Colors"), lookPage); colorGroupBox->setColumns(4); colorGroupBox->setInsideSpacing(KDialog::spacingHint()); - QLabel* conflictLabel = new QLabel(i18n("Conflict:"), colorGroupBox); + TQLabel* conflictLabel = new TQLabel(i18n("Conflict:"), colorGroupBox); m_conflictButton = new KColorButton(colorGroupBox); conflictLabel->setBuddy(m_conflictButton); - QLabel* diffChangeLabel = new QLabel(i18n("Diff change:"), colorGroupBox); + TQLabel* diffChangeLabel = new TQLabel(i18n("Diff change:"), colorGroupBox); m_diffChangeButton = new KColorButton(colorGroupBox); diffChangeLabel->setBuddy(m_diffChangeButton); - QLabel* localChangeLabel = new QLabel(i18n("Local change:"), colorGroupBox); + TQLabel* localChangeLabel = new TQLabel(i18n("Local change:"), colorGroupBox); m_localChangeButton = new KColorButton(colorGroupBox); localChangeLabel->setBuddy(m_localChangeButton); - QLabel* diffInsertLabel = new QLabel(i18n("Diff insertion:"), colorGroupBox); + TQLabel* diffInsertLabel = new TQLabel(i18n("Diff insertion:"), colorGroupBox); m_diffInsertButton = new KColorButton(colorGroupBox); diffInsertLabel->setBuddy(m_diffInsertButton); - QLabel* remoteChangeLabel = new QLabel(i18n("Remote change:"), colorGroupBox); + TQLabel* remoteChangeLabel = new TQLabel(i18n("Remote change:"), colorGroupBox); m_remoteChangeButton = new KColorButton(colorGroupBox); remoteChangeLabel->setBuddy( m_remoteChangeButton ); - QLabel* diffDeleteLabel = new QLabel(i18n("Diff deletion:"), colorGroupBox); + TQLabel* diffDeleteLabel = new TQLabel(i18n("Diff deletion:"), colorGroupBox); m_diffDeleteButton = new KColorButton(colorGroupBox); diffDeleteLabel->setBuddy(m_diffDeleteButton); - QLabel* notInCvsLabel = new QLabel(i18n("Not in cvs:"), colorGroupBox); + TQLabel* notInCvsLabel = new TQLabel(i18n("Not in cvs:"), colorGroupBox); m_notInCvsButton = new KColorButton(colorGroupBox); notInCvsLabel->setBuddy(m_notInCvsButton); - m_splitterBox = new QCheckBox(i18n("Split main window &horizontally"), lookPage); + m_splitterBox = new TQCheckBox(i18n("Split main window &horizontally"), lookPage); } #include "settingsdlg.moc" diff --git a/cervisia/settingsdlg.h b/cervisia/settingsdlg.h index 2f7effb4..e07c2153 100644 --- a/cervisia/settingsdlg.h +++ b/cervisia/settingsdlg.h @@ -22,7 +22,7 @@ #define SETTINGSDLG_H -#include +#include #include @@ -40,7 +40,7 @@ class FontButton : public QPushButton Q_OBJECT public: - FontButton( const QString &text, QWidget *parent=0, const char *name=0 ); + FontButton( const TQString &text, TQWidget *parent=0, const char *name=0 ); private slots: void chooseFont(); @@ -52,7 +52,7 @@ class SettingsDialog : public KDialogBase Q_OBJECT public: - SettingsDialog( KConfig *conf, QWidget *parent=0, const char *name=0 ); + SettingsDialog( KConfig *conf, TQWidget *parent=0, const char *name=0 ); virtual ~SettingsDialog(); protected slots: @@ -75,8 +75,8 @@ private: KLineEdit *usernameedit; KLineEdit *diffoptedit; KURLRequester *extdiffedit; - QCheckBox *remotestatusbox; - QCheckBox *localstatusbox; + TQCheckBox *remotestatusbox; + TQCheckBox *localstatusbox; FontButton* m_protocolFontBox; FontButton* m_annotateFontBox; FontButton* m_diffFontBox; @@ -90,7 +90,7 @@ private: KColorButton* m_diffInsertButton; KColorButton* m_diffDeleteButton; - QCheckBox* m_splitterBox; + TQCheckBox* m_splitterBox; AdvancedPage* m_advancedPage; KConfig* serviceConfig; diff --git a/cervisia/stringmatcher.cpp b/cervisia/stringmatcher.cpp index 1f0b4de8..6e70a6e0 100644 --- a/cervisia/stringmatcher.cpp +++ b/cervisia/stringmatcher.cpp @@ -28,27 +28,27 @@ namespace Cervisia { namespace { - const QChar asterix('*'); - const QChar question('?'); + const TQChar asterix('*'); + const TQChar question('?'); - inline bool isMetaCharacter(QChar c) + inline bool isMetaCharacter(TQChar c) { return c == asterix || c == question; } - unsigned int countMetaCharacters(const QString& text); + unsigned int countMetaCharacters(const TQString& text); } -bool StringMatcher::match(const QString& text) const +bool StringMatcher::match(const TQString& text) const { if (m_exactPatterns.find(text) != m_exactPatterns.end()) { return true; } - for (QStringList::const_iterator it(m_startPatterns.begin()), + for (TQStringList::const_iterator it(m_startPatterns.begin()), itEnd(m_startPatterns.end()); it != itEnd; ++it) { @@ -58,7 +58,7 @@ bool StringMatcher::match(const QString& text) const } } - for (QStringList::const_iterator it(m_endPatterns.begin()), + for (TQStringList::const_iterator it(m_endPatterns.begin()), itEnd(m_endPatterns.end()); it != itEnd; ++it) { @@ -68,7 +68,7 @@ bool StringMatcher::match(const QString& text) const } } - for (QValueList::const_iterator it(m_generalPatterns.begin()), + for (TQValueList::const_iterator it(m_generalPatterns.begin()), itEnd(m_generalPatterns.end()); it != itEnd; ++it) { @@ -82,7 +82,7 @@ bool StringMatcher::match(const QString& text) const } -void StringMatcher::add(const QString& pattern) +void StringMatcher::add(const TQString& pattern) { if (pattern.isEmpty()) { @@ -129,12 +129,12 @@ void StringMatcher::clear() namespace { -unsigned int countMetaCharacters(const QString& text) +unsigned int countMetaCharacters(const TQString& text) { unsigned int count(0); - const QChar* pos(text.unicode()); - const QChar* posEnd(pos + text.length()); + const TQChar* pos(text.unicode()); + const TQChar* posEnd(pos + text.length()); while (pos < posEnd) { count += isMetaCharacter(*pos++); diff --git a/cervisia/stringmatcher.h b/cervisia/stringmatcher.h index 17ecd3e8..baedc69f 100644 --- a/cervisia/stringmatcher.h +++ b/cervisia/stringmatcher.h @@ -21,7 +21,7 @@ #define CERVISIA_STRINGMATCHER_H -#include +#include namespace Cervisia @@ -35,12 +35,12 @@ public: /** * @return \c true, if text matches one of the given patterns. */ - bool match(const QString& text) const; + bool match(const TQString& text) const; /** * Adds pattern \a pattern. */ - void add(const QString& pattern); + void add(const TQString& pattern); /** * Removes all patterns. @@ -52,22 +52,22 @@ private: /** * The patterns which are tested in match(). */ - QStringList m_exactPatterns; + TQStringList m_exactPatterns; /** * The patterns which are tested in match(). */ - QStringList m_startPatterns; + TQStringList m_startPatterns; /** * The patterns which are tested in match(). */ - QStringList m_endPatterns; + TQStringList m_endPatterns; /** * The patterns which are tested in match(). */ - QValueList m_generalPatterns; + TQValueList m_generalPatterns; }; diff --git a/cervisia/tagdlg.cpp b/cervisia/tagdlg.cpp index 2f1e7e89..7dc3df0c 100644 --- a/cervisia/tagdlg.cpp +++ b/cervisia/tagdlg.cpp @@ -20,12 +20,12 @@ #include "tagdlg.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -35,8 +35,8 @@ using Cervisia::TagDialog; TagDialog::TagDialog(ActionType action, CvsService_stub* service, - QWidget *parent, const char *name) - : KDialogBase(parent, name, true, QString::null, + TQWidget *parent, const char *name) + : KDialogBase(parent, name, true, TQString::null, Ok | Cancel | Help, Ok, true), act(action), cvsService(service), @@ -45,43 +45,43 @@ TagDialog::TagDialog(ActionType action, CvsService_stub* service, { setCaption( (action==Delete)? i18n("CVS Delete Tag") : i18n("CVS Tag") ); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); if (action == Delete) { - tag_combo = new QComboBox(true, mainWidget); + tag_combo = new TQComboBox(true, mainWidget); tag_combo->setFocus(); tag_combo->setMinimumWidth(fontMetrics().width('0') * 30); - QLabel *tag_label = new QLabel(tag_combo, i18n("&Name of tag:"), mainWidget); + TQLabel *tag_label = new TQLabel(tag_combo, i18n("&Name of tag:"), mainWidget); - QPushButton *tag_button = new QPushButton(i18n("Fetch &List"), mainWidget); - connect( tag_button, SIGNAL(clicked()), - this, SLOT(tagButtonClicked()) ); + TQPushButton *tag_button = new TQPushButton(i18n("Fetch &List"), mainWidget); + connect( tag_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(tagButtonClicked()) ); - QBoxLayout *tagedit_layout = new QHBoxLayout(layout); + TQBoxLayout *tagedit_layout = new TQHBoxLayout(layout); tagedit_layout->addWidget(tag_label); tagedit_layout->addWidget(tag_combo); tagedit_layout->addWidget(tag_button); } else { - tag_edit = new QLineEdit(mainWidget); + tag_edit = new TQLineEdit(mainWidget); tag_edit->setFocus(); tag_edit->setMinimumWidth(fontMetrics().width('0') * 30); - QLabel *tag_label = new QLabel(tag_edit, i18n("&Name of tag:"), mainWidget); + TQLabel *tag_label = new TQLabel(tag_edit, i18n("&Name of tag:"), mainWidget); - QBoxLayout *tagedit_layout = new QHBoxLayout(layout); + TQBoxLayout *tagedit_layout = new TQHBoxLayout(layout); tagedit_layout->addWidget(tag_label); tagedit_layout->addWidget(tag_edit); - branchtag_button = new QCheckBox(i18n("Create &branch with this tag"), mainWidget); + branchtag_button = new TQCheckBox(i18n("Create &branch with this tag"), mainWidget); layout->addWidget(branchtag_button); - forcetag_button = new QCheckBox(i18n("&Force tag creation even if tag already exists"), mainWidget); + forcetag_button = new TQCheckBox(i18n("&Force tag creation even if tag already exists"), mainWidget); layout->addWidget(forcetag_button); } @@ -101,7 +101,7 @@ bool TagDialog::forceTag() const } -QString TagDialog::tag() const +TQString TagDialog::tag() const { return act==Delete? tag_combo->currentText() : tag_edit->text(); } @@ -109,7 +109,7 @@ QString TagDialog::tag() const void TagDialog::slotOk() { - QString const str(tag()); + TQString const str(tag()); if (str.isEmpty()) { diff --git a/cervisia/tagdlg.h b/cervisia/tagdlg.h index 4d1e4754..fedb738a 100644 --- a/cervisia/tagdlg.h +++ b/cervisia/tagdlg.h @@ -41,11 +41,11 @@ public: enum ActionType { Create, Delete }; TagDialog( ActionType action, CvsService_stub* service, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); bool branchTag() const; bool forceTag() const; - QString tag() const; + TQString tag() const; protected: virtual void slotOk(); @@ -57,10 +57,10 @@ private: ActionType act; CvsService_stub* cvsService; - QCheckBox *branchtag_button; - QCheckBox *forcetag_button; - QLineEdit *tag_edit; - QComboBox *tag_combo; + TQCheckBox *branchtag_button; + TQCheckBox *forcetag_button; + TQLineEdit *tag_edit; + TQComboBox *tag_combo; }; } diff --git a/cervisia/tooltip.cpp b/cervisia/tooltip.cpp index 7debf9d7..728945ca 100644 --- a/cervisia/tooltip.cpp +++ b/cervisia/tooltip.cpp @@ -22,27 +22,27 @@ #include #include -#include +#include namespace Cervisia { -static QString truncateLines(const QString&, const QFontMetrics&, const QSize&); -static QString truncateLines(const QString&, const QFont&, const QPoint&, const QRect&); +static TQString truncateLines(const TQString&, const TQFontMetrics&, const TQSize&); +static TQString truncateLines(const TQString&, const TQFont&, const TQPoint&, const TQRect&); -ToolTip::ToolTip(QWidget* widget) - : QObject(widget), QToolTip(widget) +ToolTip::ToolTip(TQWidget* widget) + : TQObject(widget), TQToolTip(widget) { } -void ToolTip::maybeTip(const QPoint& pos) +void ToolTip::maybeTip(const TQPoint& pos) { - QRect rect; - QString text; + TQRect rect; + TQString text; emit queryToolTip(pos, rect, text); if (rect.isValid() && !text.isEmpty()) @@ -59,11 +59,11 @@ void ToolTip::maybeTip(const QPoint& pos) // Primtive routine to truncate the text. size.width() is ignored, only // size.height() is used at the moment to keep it fast. It doesn't work // correct if text lines have different heights. -QString truncateLines(const QString& text, - const QFontMetrics& fm, - const QSize& size) +TQString truncateLines(const TQString& text, + const TQFontMetrics& fm, + const TQSize& size) { - const QChar newLine('\n'); + const TQChar newLine('\n'); const int lineSpacing(fm.lineSpacing()); const int numberOfLines(text.contains(newLine) + 1); @@ -72,7 +72,7 @@ QString truncateLines(const QString& text, if (numberOfLines <= maxNumberOfLines) return text; - const QChar* unicode(text.unicode()); + const TQChar* unicode(text.unicode()); for (int count(maxNumberOfLines); count; ++unicode) if (*unicode == newLine) --count; @@ -82,10 +82,10 @@ QString truncateLines(const QString& text, // Truncate the tooltip's text if necessary -QString truncateLines(const QString& text, - const QFont& font, - const QPoint& globalPos, - const QRect& desktopGeometry) +TQString truncateLines(const TQString& text, + const TQFont& font, + const TQPoint& globalPos, + const TQRect& desktopGeometry) { // maximum size of the tooltip, - 10 just to be safe const int maxWidth(kMax(desktopGeometry.width() - globalPos.x(), globalPos.x()) @@ -94,13 +94,13 @@ QString truncateLines(const QString& text, - desktopGeometry.top() - 10); // calculate the tooltip's size - const QSimpleRichText layoutedText(text, font); + const TQSimpleRichText layoutedText(text, font); // only if the tooltip's size is bigger in x- and y-direction the text must // be truncated otherwise the tip is moved to a position where it fits return ((layoutedText.widthUsed() > maxWidth) && (layoutedText.height() > maxHeight)) - ? truncateLines(text, QFontMetrics(font), QSize(maxWidth, maxHeight)) + ? truncateLines(text, TQFontMetrics(font), TQSize(maxWidth, maxHeight)) : text; } diff --git a/cervisia/tooltip.h b/cervisia/tooltip.h index fc0cd7be..f6a47999 100644 --- a/cervisia/tooltip.h +++ b/cervisia/tooltip.h @@ -21,8 +21,8 @@ #define CERVISIA_TOOLTIP_H -#include -#include +#include +#include namespace Cervisia @@ -30,11 +30,11 @@ namespace Cervisia /** - * This class extends QToolTip: + * This class extends TQToolTip: * - no more need to subclass just connect to the signal queryToolTip() * - truncate too large tooltip texts. */ -class ToolTip : public QObject, public QToolTip +class ToolTip : public TQObject, public QToolTip { Q_OBJECT @@ -42,10 +42,10 @@ public: /** * @param widget The widget you want to add tooltips to. It's also used as - * parent for the QObject. So you don't have to free an instance of this + * parent for the TQObject. So you don't have to free an instance of this * class yourself. */ - explicit ToolTip(QWidget* widget); + explicit ToolTip(TQWidget* widget); signals: @@ -61,11 +61,11 @@ signals: * * @param text The tooltip text. */ - void queryToolTip(const QPoint& pos, QRect& rect, QString& text); + void queryToolTip(const TQPoint& pos, TQRect& rect, TQString& text); protected: - virtual void maybeTip(const QPoint&); + virtual void maybeTip(const TQPoint&); }; diff --git a/cervisia/updatedlg.cpp b/cervisia/updatedlg.cpp index 9a536763..4cd4367c 100644 --- a/cervisia/updatedlg.cpp +++ b/cervisia/updatedlg.cpp @@ -20,12 +20,12 @@ #include "updatedlg.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -34,65 +34,65 @@ UpdateDialog::UpdateDialog(CvsService_stub* service, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("CVS Update"), Ok | Cancel, Ok, true), cvsService(service) { int const iComboBoxMinWidth(40 * fontMetrics().width('0')); - int const iWidgetIndent(style().pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, 0) + 6); + int const iWidgetIndent(style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0) + 6); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - bybranch_button = new QRadioButton(i18n("Update to &branch: "), mainWidget); + bybranch_button = new TQRadioButton(i18n("Update to &branch: "), mainWidget); bybranch_button->setChecked(true); layout->addWidget(bybranch_button); - branch_combo = new QComboBox(true, mainWidget); + branch_combo = new TQComboBox(true, mainWidget); branch_combo->setMinimumWidth(iComboBoxMinWidth); - branch_button = new QPushButton(i18n("Fetch &List"), mainWidget); - connect( branch_button, SIGNAL(clicked()), - this, SLOT(branchButtonClicked()) ); + branch_button = new TQPushButton(i18n("Fetch &List"), mainWidget); + connect( branch_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(branchButtonClicked()) ); - QBoxLayout *branchedit_layout = new QHBoxLayout(layout); + TQBoxLayout *branchedit_layout = new TQHBoxLayout(layout); branchedit_layout->addSpacing(iWidgetIndent); branchedit_layout->addWidget(branch_combo); branchedit_layout->addWidget(branch_button); - bytag_button = new QRadioButton(i18n("Update to &tag: "), mainWidget); + bytag_button = new TQRadioButton(i18n("Update to &tag: "), mainWidget); layout->addWidget(bytag_button); - tag_combo = new QComboBox(true, mainWidget); + tag_combo = new TQComboBox(true, mainWidget); tag_combo->setMinimumWidth(iComboBoxMinWidth); - tag_button = new QPushButton(i18n("Fetch L&ist"), mainWidget); - connect( tag_button, SIGNAL(clicked()), - this, SLOT(tagButtonClicked()) ); + tag_button = new TQPushButton(i18n("Fetch L&ist"), mainWidget); + connect( tag_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(tagButtonClicked()) ); - QBoxLayout *tagedit_layout = new QHBoxLayout(layout); + TQBoxLayout *tagedit_layout = new TQHBoxLayout(layout); tagedit_layout->addSpacing(iWidgetIndent); tagedit_layout->addWidget(tag_combo); tagedit_layout->addWidget(tag_button); - bydate_button = new QRadioButton(i18n("Update to &date ('yyyy-mm-dd'):"), mainWidget); + bydate_button = new TQRadioButton(i18n("Update to &date ('yyyy-mm-dd'):"), mainWidget); layout->addWidget(bydate_button); date_edit = new KLineEdit(mainWidget); - QBoxLayout *dateedit_layout = new QHBoxLayout(layout); + TQBoxLayout *dateedit_layout = new TQHBoxLayout(layout); dateedit_layout->addSpacing(iWidgetIndent); dateedit_layout->addWidget(date_edit); - QButtonGroup* group = new QButtonGroup(mainWidget); + TQButtonGroup* group = new TQButtonGroup(mainWidget); group->hide(); group->insert(bytag_button); group->insert(bybranch_button); group->insert(bydate_button); - connect( group, SIGNAL(clicked(int)), - this, SLOT(toggled()) ); + connect( group, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(toggled()) ); // dis-/enable the widgets toggled(); @@ -105,7 +105,7 @@ bool UpdateDialog::byTag() const } -QString UpdateDialog::tag() const +TQString UpdateDialog::tag() const { return bybranch_button->isChecked() ? branch_combo->currentText() @@ -113,7 +113,7 @@ QString UpdateDialog::tag() const } -QString UpdateDialog::date() const +TQString UpdateDialog::date() const { return date_edit->text(); } diff --git a/cervisia/updatedlg.h b/cervisia/updatedlg.h index 2ce143cf..0e4e1718 100644 --- a/cervisia/updatedlg.h +++ b/cervisia/updatedlg.h @@ -38,11 +38,11 @@ class UpdateDialog : public KDialogBase public: UpdateDialog( CvsService_stub* service, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); bool byTag() const; - QString tag() const; - QString date() const; + TQString tag() const; + TQString date() const; private slots: void toggled(); @@ -52,9 +52,9 @@ private slots: private: CvsService_stub* cvsService; - QRadioButton *bytag_button, *bybranch_button, *bydate_button; - QComboBox *tag_combo, *branch_combo; - QPushButton *tag_button, *branch_button; + TQRadioButton *bytag_button, *bybranch_button, *bydate_button; + TQComboBox *tag_combo, *branch_combo; + TQPushButton *tag_button, *branch_button; KLineEdit *date_edit; }; diff --git a/cervisia/updateview.cpp b/cervisia/updateview.cpp index 94679f6c..710eabd8 100644 --- a/cervisia/updateview.cpp +++ b/cervisia/updateview.cpp @@ -22,9 +22,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -38,7 +38,7 @@ using Cervisia::Entry; using Cervisia::EntryStatus; -UpdateView::UpdateView(KConfig& partConfig, QWidget *parent, const char *name) +UpdateView::UpdateView(KConfig& partConfig, TQWidget *parent, const char *name) : KListView(parent, name), m_partConfig(partConfig), m_unfoldingTree(false) @@ -56,22 +56,22 @@ UpdateView::UpdateView(KConfig& partConfig, QWidget *parent, const char *name) setFilter(NoFilter); - connect( this, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(itemExecuted(QListViewItem*)) ); - connect( this, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(itemExecuted(QListViewItem*)) ); + connect( this, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(itemExecuted(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(itemExecuted(TQListViewItem*)) ); // without this restoreLayout() can't change the column widths for (int col = 0; col < columns(); ++col) - setColumnWidthMode(col, QListView::Manual); + setColumnWidthMode(col, TQListView::Manual); - restoreLayout(&m_partConfig, QString::fromLatin1("UpdateView")); + restoreLayout(&m_partConfig, TQString::fromLatin1("UpdateView")); } UpdateView::~UpdateView() { - saveLayout(&m_partConfig, QString::fromLatin1("UpdateView")); + saveLayout(&m_partConfig, TQString::fromLatin1("UpdateView")); } @@ -98,18 +98,18 @@ UpdateView::Filter UpdateView::filter() const // returns true iff exactly one UpdateFileItem is selected bool UpdateView::hasSingleSelection() const { - const QPtrList& listSelectedItems(selectedItems()); + const TQPtrList& listSelectedItems(selectedItems()); return (listSelectedItems.count() == 1) && isFileItem(listSelectedItems.getFirst()); } -void UpdateView::getSingleSelection(QString *filename, QString *revision) const +void UpdateView::getSingleSelection(TQString *filename, TQString *revision) const { - const QPtrList& listSelectedItems(selectedItems()); + const TQPtrList& listSelectedItems(selectedItems()); - QString tmpFileName; - QString tmpRevision; + TQString tmpFileName; + TQString tmpRevision; if ((listSelectedItems.count() == 1) && isFileItem(listSelectedItems.getFirst())) { UpdateFileItem* fileItem(static_cast(listSelectedItems.getFirst())); @@ -123,12 +123,12 @@ void UpdateView::getSingleSelection(QString *filename, QString *revision) const } -QStringList UpdateView::multipleSelection() const +TQStringList UpdateView::multipleSelection() const { - QStringList res; + TQStringList res; - const QPtrList& listSelectedItems(selectedItems()); - for (QPtrListIterator it(listSelectedItems); + const TQPtrList& listSelectedItems(selectedItems()); + for (TQPtrListIterator it(listSelectedItems); it.current() != 0; ++it) { if ((*it)->isVisible()) @@ -139,15 +139,15 @@ QStringList UpdateView::multipleSelection() const } -QStringList UpdateView::fileSelection() const +TQStringList UpdateView::fileSelection() const { - QStringList res; + TQStringList res; - const QPtrList& listSelectedItems(selectedItems()); - for (QPtrListIterator it(listSelectedItems); + const TQPtrList& listSelectedItems(selectedItems()); + for (TQPtrListIterator it(listSelectedItems); it.current() != 0; ++it) { - QListViewItem* item(*it); + TQListViewItem* item(*it); if (isFileItem(item) && item->isVisible()) res.append(static_cast(item)->filePath()); @@ -157,25 +157,25 @@ QStringList UpdateView::fileSelection() const } -const QColor& UpdateView::conflictColor() const +const TQColor& UpdateView::conflictColor() const { return m_conflictColor; } -const QColor& UpdateView::localChangeColor() const +const TQColor& UpdateView::localChangeColor() const { return m_localChangeColor; } -const QColor& UpdateView::remoteChangeColor() const +const TQColor& UpdateView::remoteChangeColor() const { return m_remoteChangeColor; } -const QColor& UpdateView::notInCvsColor() const +const TQColor& UpdateView::notInCvsColor() const { return m_notInCvsColor; } @@ -188,8 +188,8 @@ bool UpdateView::isUnfoldingTree() const // updates internal data -void UpdateView::replaceItem(QListViewItem* oldItem, - QListViewItem* newItem) +void UpdateView::replaceItem(TQListViewItem* oldItem, + TQListViewItem* newItem) { const int index(relevantSelection.find(oldItem)); if (index >= 0) @@ -199,15 +199,15 @@ void UpdateView::replaceItem(QListViewItem* oldItem, void UpdateView::unfoldSelectedFolders() { - QApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(waitCursor); int previousDepth = 0; bool isUnfolded = false; - QStringList selection = multipleSelection(); + TQStringList selection = multipleSelection(); // setup name of selected folder - QString selectedItem = selection.first(); + TQString selectedItem = selection.first(); if( selectedItem.contains('/') ) selectedItem.remove(0, selectedItem.findRev('/')+1); @@ -215,8 +215,8 @@ void UpdateView::unfoldSelectedFolders() const bool updatesEnabled = isUpdatesEnabled(); setUpdatesEnabled(false); - QListViewItemIterator it(this); - while( QListViewItem* item = it.current() ) + TQListViewItemIterator it(this); + while( TQListViewItem* item = it.current() ) { if( isDirItem(item) ) { @@ -275,13 +275,13 @@ void UpdateView::unfoldSelectedFolders() setUpdatesEnabled(updatesEnabled); triggerUpdate(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void UpdateView::unfoldTree() { - QApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(waitCursor); m_unfoldingTree = true; @@ -289,8 +289,8 @@ void UpdateView::unfoldTree() setUpdatesEnabled(false); - QListViewItemIterator it(this); - while (QListViewItem* item = it.current()) + TQListViewItemIterator it(this); + while (TQListViewItem* item = it.current()) { if (isDirItem(item)) { @@ -323,14 +323,14 @@ void UpdateView::unfoldTree() m_unfoldingTree = false; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void UpdateView::foldTree() { - QListViewItemIterator it(this); - while (QListViewItem* item = it.current()) + TQListViewItemIterator it(this); + while (TQListViewItem* item = it.current()) { // don't close the top level directory if (isDirItem(item) && item->parent()) @@ -345,7 +345,7 @@ void UpdateView::foldTree() * Clear the tree view and insert the directory dirname * into it as the new root item */ -void UpdateView::openDirectory(const QString& dirName) +void UpdateView::openDirectory(const TQString& dirName) { clear(); @@ -411,11 +411,11 @@ void UpdateView::finishJob(bool normalExit, int exitStatus) */ void UpdateView::markUpdated(bool laststage, bool success) { - QPtrListIterator it(relevantSelection); + TQPtrListIterator it(relevantSelection); for ( ; it.current(); ++it) if (isDirItem(it.current())) { - for (QListViewItem *item = it.current()->firstChild(); item; + for (TQListViewItem *item = it.current()->firstChild(); item; item = item->nextSibling() ) if (isFileItem(item)) { @@ -436,10 +436,10 @@ void UpdateView::markUpdated(bool laststage, bool success) */ void UpdateView::rememberSelection(bool recursive) { - std::set setItems; - for (QListViewItemIterator it(this); it.current(); ++it) + std::set setItems; + for (TQListViewItemIterator it(this); it.current(); ++it) { - QListViewItem* item(it.current()); + TQListViewItem* item(it.current()); // if this item is selected and if it was not inserted already // and if we work recursive and if it is a dir item then insert @@ -450,8 +450,8 @@ void UpdateView::rememberSelection(bool recursive) && recursive && isDirItem(item)) { - QPtrStack s; - for (QListViewItem* childItem = item->firstChild(); childItem; + TQPtrStack s; + for (TQListViewItem* childItem = item->firstChild(); childItem; childItem = childItem->nextSibling() ? childItem->nextSibling() : s.pop()) { // if this item is a dir item and if it is was not @@ -459,7 +459,7 @@ void UpdateView::rememberSelection(bool recursive) // DON'T CHANGE TESTING ORDER if (isDirItem(childItem) && setItems.insert(childItem).second) { - if (QListViewItem* childChildItem = childItem->firstChild()) + if (TQListViewItem* childChildItem = childItem->firstChild()) s.push(childChildItem); } } @@ -468,14 +468,14 @@ void UpdateView::rememberSelection(bool recursive) // Copy the set to the list relevantSelection.clear(); - std::set::const_iterator const itItemEnd = setItems.end(); - for (std::set::const_iterator itItem = setItems.begin(); + std::set::const_iterator const itItemEnd = setItems.end(); + for (std::set::const_iterator itItem = setItems.begin(); itItem != itItemEnd; ++itItem) relevantSelection.append(*itItem); #if 0 DEBUGOUT("Relevant:"); - QPtrListIterator it44(relevantSelection); + TQPtrListIterator it44(relevantSelection); for (; it44.current(); ++it44) DEBUGOUT(" " << (*it44)->text(UpdateFileItem::File)); DEBUGOUT("End"); @@ -492,22 +492,22 @@ void UpdateView::syncSelection() // compute all directories which are selected or contain a selected file // (in recursive mode this includes all sub directories) std::set setDirItems; - for (QPtrListIterator itItem(relevantSelection); + for (TQPtrListIterator itItem(relevantSelection); itItem.current(); ++itItem) { - QListViewItem* item(itItem.current()); + TQListViewItem* item(itItem.current()); UpdateDirItem* dirItem(0); if (isDirItem(item)) dirItem = static_cast(item); - else if (QListViewItem* parentItem = item->parent()) + else if (TQListViewItem* parentItem = item->parent()) dirItem = static_cast(parentItem); if (dirItem) setDirItems.insert(dirItem); } - QApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(waitCursor); std::set::const_iterator const itDirItemEnd = setDirItems.end(); for (std::set::const_iterator itDirItem = setDirItems.begin(); @@ -521,7 +521,7 @@ void UpdateView::syncSelection() qApp->processEvents(); } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } @@ -534,13 +534,13 @@ void UpdateView::updateColors() KConfigGroupSaver cs(&m_partConfig, "Colors"); m_partConfig.setGroup("Colors"); - QColor defaultColor = QColor(255, 130, 130); + TQColor defaultColor = TQColor(255, 130, 130); m_conflictColor = m_partConfig.readColorEntry("Conflict", &defaultColor); - defaultColor = QColor(130, 130, 255); + defaultColor = TQColor(130, 130, 255); m_localChangeColor = m_partConfig.readColorEntry("LocalChange", &defaultColor); - defaultColor = QColor(70, 210, 70); + defaultColor = TQColor(70, 210, 70); m_remoteChangeColor = m_partConfig.readColorEntry("RemoteChange", &defaultColor); m_notInCvsColor = CervisiaSettings::notInCvsColor(); @@ -552,7 +552,7 @@ void UpdateView::updateColors() * is true, it is assumed that the output is from a command * 'cvs update -n', i.e. cvs actually changes no files. */ -void UpdateView::processUpdateLine(QString str) +void UpdateView::processUpdateLine(TQString str) { if (str.length() > 2 && str[1] == ' ') { @@ -586,8 +586,8 @@ void UpdateView::processUpdateLine(QString str) updateItem(str.mid(2), status, false); } - const QString removedFileStart(QString::fromLatin1("cvs server: ")); - const QString removedFileEnd(QString::fromLatin1(" is no longer in the repository")); + const TQString removedFileStart(TQString::fromLatin1("cvs server: ")); + const TQString removedFileEnd(TQString::fromLatin1(" is no longer in the repository")); if (str.startsWith(removedFileStart) && str.endsWith(removedFileEnd)) { } @@ -600,12 +600,12 @@ void UpdateView::processUpdateLine(QString str) } -void UpdateView::updateItem(const QString& filePath, EntryStatus status, bool isdir) +void UpdateView::updateItem(const TQString& filePath, EntryStatus status, bool isdir) { - if (isdir && filePath == QChar('.')) + if (isdir && filePath == TQChar('.')) return; - const QFileInfo fileInfo(filePath); + const TQFileInfo fileInfo(filePath); UpdateDirItem* rootItem = static_cast(firstChild()); UpdateDirItem* dirItem = findOrCreateDirItem(fileInfo.dirPath(), rootItem); @@ -614,7 +614,7 @@ void UpdateView::updateItem(const QString& filePath, EntryStatus status, bool is } -void UpdateView::itemExecuted(QListViewItem *item) +void UpdateView::itemExecuted(TQListViewItem *item) { if (isFileItem(item)) emit fileOpened(static_cast(item)->filePath()); diff --git a/cervisia/updateview.h b/cervisia/updateview.h index d01446a9..d583b16b 100644 --- a/cervisia/updateview.h +++ b/cervisia/updateview.h @@ -24,7 +24,7 @@ #include -#include +#include #include "entry.h" @@ -42,7 +42,7 @@ public: NoRemoved=4, NoNotInCVS=8 , NoEmptyDirectories = 16 }; enum Action { Add, Remove, Update, UpdateNoAct, Commit }; - explicit UpdateView(KConfig& partConfig, QWidget *parent=0, const char *name=0); + explicit UpdateView(KConfig& partConfig, TQWidget *parent=0, const char *name=0); virtual ~UpdateView(); @@ -50,42 +50,42 @@ public: Filter filter() const; bool hasSingleSelection() const; - void getSingleSelection(QString *filename, QString *revision=0) const; + void getSingleSelection(TQString *filename, TQString *revision=0) const; /* Returns a list of all marked files and directories */ - QStringList multipleSelection() const; + TQStringList multipleSelection() const; /* Returns a list of all marked files, excluding directories*/ - QStringList fileSelection() const; + TQStringList fileSelection() const; - void openDirectory(const QString& dirname); + void openDirectory(const TQString& dirname); void prepareJob(bool recursive, Action action); - const QColor& conflictColor() const; - const QColor& localChangeColor() const; - const QColor& remoteChangeColor() const; - const QColor& notInCvsColor() const; + const TQColor& conflictColor() const; + const TQColor& localChangeColor() const; + const TQColor& remoteChangeColor() const; + const TQColor& notInCvsColor() const; /** * @return \c true iff unfoldTree() is active. */ bool isUnfoldingTree() const; - void replaceItem(QListViewItem*, QListViewItem*); + void replaceItem(TQListViewItem*, TQListViewItem*); signals: - void fileOpened(QString filename); + void fileOpened(TQString filename); public slots: void unfoldSelectedFolders(); void unfoldTree(); void foldTree(); void finishJob(bool normalExit, int exitStatus); - void processUpdateLine(QString line); + void processUpdateLine(TQString line); private slots: - void itemExecuted(QListViewItem *item); + void itemExecuted(TQListViewItem *item); private: - void updateItem(const QString &filename, Cervisia::EntryStatus status, bool isdir); + void updateItem(const TQString &filename, Cervisia::EntryStatus status, bool isdir); void rememberSelection(bool recursive); void syncSelection(); void markUpdated(bool laststage, bool success); @@ -96,12 +96,12 @@ private: Filter filt; Action act; - QPtrList relevantSelection; + TQPtrList relevantSelection; - QColor m_conflictColor; - QColor m_localChangeColor; - QColor m_remoteChangeColor; - QColor m_notInCvsColor; + TQColor m_conflictColor; + TQColor m_localChangeColor; + TQColor m_remoteChangeColor; + TQColor m_notInCvsColor; /** * \c true iff unfoldTree() is active (is needed by UpdateDirItem::setOpen()). diff --git a/cervisia/updateview_items.cpp b/cervisia/updateview_items.cpp index 76223c24..582c9aae 100644 --- a/cervisia/updateview_items.cpp +++ b/cervisia/updateview_items.cpp @@ -22,9 +22,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -47,9 +47,9 @@ using Cervisia::EntryStatus; // ------------------------------------------------------------------------------ -QString UpdateItem::dirPath() const +TQString UpdateItem::dirPath() const { - QString path; + TQString path; const UpdateItem* item = static_cast(parent()); while (item) @@ -57,7 +57,7 @@ QString UpdateItem::dirPath() const const UpdateItem* parentItem = static_cast(item->parent()); if (parentItem) { - path.prepend(item->m_entry.m_name + QDir::separator()); + path.prepend(item->m_entry.m_name + TQDir::separator()); } item = parentItem; @@ -67,10 +67,10 @@ QString UpdateItem::dirPath() const } -QString UpdateItem::filePath() const +TQString UpdateItem::filePath() const { // the filePath of the root item is '.' - return parent() ? dirPath() + m_entry.m_name : QChar('.'); + return parent() ? dirPath() + m_entry.m_name : TQChar('.'); } @@ -102,7 +102,7 @@ UpdateDirItem::UpdateDirItem(UpdateView* parent, /** * Update the status of an item; if it doesn't exist yet, create new one */ -void UpdateDirItem::updateChildItem(const QString& name, +void UpdateDirItem::updateChildItem(const TQString& name, EntryStatus status, bool isdir) { @@ -154,7 +154,7 @@ void UpdateDirItem::updateEntriesItem(const Entry& entry, } fileItem->setRevTag(entry.m_revision, entry.m_tag); fileItem->setDate(entry.m_dateTime); - fileItem->setPixmap(0, isBinary ? SmallIcon("binary") : QPixmap()); + fileItem->setPixmap(0, isBinary ? SmallIcon("binary") : TQPixmap()); } return; } @@ -169,8 +169,8 @@ void UpdateDirItem::updateEntriesItem(const Entry& entry, void UpdateDirItem::scanDirectory() { - const QString& path(filePath()); - if (!QFile::exists(path)) + const TQString& path(filePath()); + if (!TQFile::exists(path)) return; const CvsDir dir(path); @@ -243,24 +243,24 @@ UpdateItem* UpdateDirItem::insertItem(UpdateItem* item) } -UpdateItem* UpdateDirItem::findItem(const QString& name) const +UpdateItem* UpdateDirItem::findItem(const TQString& name) const { const TMapItemsByName::const_iterator it = m_itemsByName.find(name); return (it != m_itemsByName.end()) ? *it : 0; } -// Qt-3.3.8 changed the parsing in QDateTime::fromString() but introduced +// Qt-3.3.8 changed the parsing in TQDateTime::fromString() but introduced // a bug which leads to the problem that days with 1 digit will incorrectly being // parsed as day 0 - which is invalid. // workaround with the implementation from Qt-3.3.6 -QDateTime parseDateTime(const QString &s) +TQDateTime parseDateTime(const TQString &s) { static const char * const qt_shortMonthNames[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; - QString monthName( s.mid( 4, 3 ) ); + TQString monthName( s.mid( 4, 3 ) ); int month = -1; // Assume that English monthnames are the default for ( int i = 0; i < 12; ++i ) { @@ -272,30 +272,30 @@ QDateTime parseDateTime(const QString &s) // If English names can't be found, search the localized ones if ( month == -1 ) { for ( int i = 1; i <= 12; ++i ) { - if ( monthName == QDate::shortMonthName( i ) ) { + if ( monthName == TQDate::shortMonthName( i ) ) { month = i; break; } } } if ( month < 1 || month > 12 ) { - qWarning( "QDateTime::fromString: Parameter out of range" ); - QDateTime dt; + qWarning( "TQDateTime::fromString: Parameter out of range" ); + TQDateTime dt; return dt; } int day = s.mid( 8, 2 ).simplifyWhiteSpace().toInt(); int year = s.right( 4 ).toInt(); - QDate date( year, month, day ); - QTime time; + TQDate date( year, month, day ); + TQTime time; int hour, minute, second; - int pivot = s.find( QRegExp(QString::fromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) ); + int pivot = s.find( TQRegExp(TQString::fromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) ); if ( pivot != -1 ) { hour = s.mid( pivot, 2 ).toInt(); minute = s.mid( pivot+3, 2 ).toInt(); second = s.mid( pivot+6, 2 ).toInt(); time.setHMS( hour, minute, second ); } - return QDateTime( date, time ); + return TQDateTime( date, time ); } // Format of the CVS/Entries file: @@ -303,15 +303,15 @@ QDateTime parseDateTime(const QString &s) void UpdateDirItem::syncWithEntries() { - const QString path(filePath() + QDir::separator()); + const TQString path(filePath() + TQDir::separator()); - QFile f(path + "CVS/Entries"); + TQFile f(path + "CVS/Entries"); if( f.open(IO_ReadOnly) ) { - QTextStream stream(&f); + TQTextStream stream(&f); while( !stream.eof() ) { - QString line = stream.readLine(); + TQString line = stream.readLine(); Cervisia::Entry entry; @@ -332,15 +332,15 @@ void UpdateDirItem::syncWithEntries() } else { - QString rev(line.section('/', 2, 2)); - const QString timestamp(line.section('/', 3, 3)); - const QString options(line.section('/', 4, 4)); + TQString rev(line.section('/', 2, 2)); + const TQString timestamp(line.section('/', 3, 3)); + const TQString options(line.section('/', 4, 4)); entry.m_tag = line.section('/', 5, 5); const bool isBinary(options.find("-kb") >= 0); // file date in local time - entry.m_dateTime = QFileInfo(path + entry.m_name).lastModified(); + entry.m_dateTime = TQFileInfo(path + entry.m_name).lastModified(); if( rev == "0" ) entry.m_status = Cervisia::LocallyAdded; @@ -356,9 +356,9 @@ void UpdateDirItem::syncWithEntries() else { // workaround Qt-3.3.8 bug with our own function (see function above) - // const QDateTime date(QDateTime::fromString(timestamp)); // UTC Time - const QDateTime date(parseDateTime(timestamp)); // UTC Time - QDateTime fileDateUTC; + // const TQDateTime date(TQDateTime::fromString(timestamp)); // UTC Time + const TQDateTime date(parseDateTime(timestamp)); // UTC Time + TQDateTime fileDateUTC; fileDateUTC.setTime_t(entry.m_dateTime.toTime_t(), Qt::UTC); if (date != fileDateUTC) entry.m_status = Cervisia::LocallyModified; @@ -378,7 +378,7 @@ void UpdateDirItem::syncWithEntries() */ void UpdateDirItem::syncWithDirectory() { - QDir dir(filePath()); + TQDir dir(filePath()); for (TMapItemsByName::iterator it(m_itemsByName.begin()), itEnd(m_itemsByName.end()); @@ -393,7 +393,7 @@ void UpdateDirItem::syncWithDirectory() if (!dir.exists(it.key())) { fileItem->setStatus(Cervisia::Removed); - fileItem->setRevTag(QString::null, QString::null); + fileItem->setRevTag(TQString::null, TQString::null); } } } @@ -460,11 +460,11 @@ void UpdateDirItem::setOpen(bool open) view->setFilter(view->filter()); } - QListViewItem::setOpen(open); + TQListViewItem::setOpen(open); } -int UpdateDirItem::compare(QListViewItem* i, +int UpdateDirItem::compare(TQListViewItem* i, int /*column*/, bool bAscending) const { @@ -479,9 +479,9 @@ int UpdateDirItem::compare(QListViewItem* i, } -QString UpdateDirItem::text(int column) const +TQString UpdateDirItem::text(int column) const { - QString result; + TQString result; if (column == Name) result = entry().m_name; @@ -541,7 +541,7 @@ bool UpdateFileItem::applyFilter(UpdateView::Filter filter) } -void UpdateFileItem::setRevTag(const QString& rev, const QString& tag) +void UpdateFileItem::setRevTag(const TQString& rev, const TQString& tag) { m_entry.m_revision = rev; @@ -549,13 +549,13 @@ void UpdateFileItem::setRevTag(const QString& rev, const QString& tag) && tag[8] == '.' && tag[11] == '.' && tag[14] == '.' && tag[17] == '.') { - const QDate tagDate(tag.mid(1, 4).toInt(), + const TQDate tagDate(tag.mid(1, 4).toInt(), tag.mid(6, 2).toInt(), tag.mid(9, 2).toInt()); - const QTime tagTime(tag.mid(12, 2).toInt(), + const TQTime tagTime(tag.mid(12, 2).toInt(), tag.mid(15, 2).toInt(), tag.mid(18, 2).toInt()); - const QDateTime tagDateTimeUtc(tagDate, tagTime); + const TQDateTime tagDateTimeUtc(tagDate, tagTime); if (tagDateTimeUtc.isValid()) { @@ -565,11 +565,11 @@ void UpdateFileItem::setRevTag(const QString& rev, const QString& tag) // Compute the difference between UTC and local timezone for this // tag date. const unsigned int dateTimeInSeconds(tagDateTimeUtc.toTime_t()); - QDateTime dateTime; + TQDateTime dateTime; dateTime.setTime_t(dateTimeInSeconds, Qt::UTC); const int localUtcOffset(dateTime.secsTo(tagDateTimeUtc)); - const QDateTime tagDateTimeLocal(tagDateTimeUtc.addSecs(localUtcOffset)); + const TQDateTime tagDateTimeLocal(tagDateTimeUtc.addSecs(localUtcOffset)); m_entry.m_tag = KGlobal::locale()->formatDateTime(tagDateTimeLocal); } @@ -589,7 +589,7 @@ void UpdateFileItem::setRevTag(const QString& rev, const QString& tag) } -void UpdateFileItem::setDate(const QDateTime& date) +void UpdateFileItem::setDate(const TQDateTime& date) { m_entry.m_dateTime = date; } @@ -649,7 +649,7 @@ int UpdateFileItem::statusClass() const } -int UpdateFileItem::compare(QListViewItem* i, +int UpdateFileItem::compare(TQListViewItem* i, int column, bool bAscending) const { @@ -687,9 +687,9 @@ int UpdateFileItem::compare(QListViewItem* i, } -QString UpdateFileItem::text(int column) const +TQString UpdateFileItem::text(int column) const { - QString result; + TQString result; switch (column) { case Name: @@ -717,15 +717,15 @@ QString UpdateFileItem::text(int column) const } -void UpdateFileItem::paintCell(QPainter *p, - const QColorGroup &cg, +void UpdateFileItem::paintCell(TQPainter *p, + const TQColorGroup &cg, int col, int width, int align) { const UpdateView* view(updateView()); - QColor color; + TQColor color; switch (m_entry.m_status) { case Cervisia::Conflict: @@ -752,17 +752,17 @@ void UpdateFileItem::paintCell(QPainter *p, break; } - const QFont oldFont(p->font()); - QColorGroup mycg(cg); + const TQFont oldFont(p->font()); + TQColorGroup mycg(cg); if (color.isValid() && color != KGlobalSettings::textColor()) { - QFont myFont(oldFont); + TQFont myFont(oldFont); myFont.setBold(true); p->setFont(myFont); - mycg.setColor(QColorGroup::Text, color); + mycg.setColor(TQColorGroup::Text, color); } - QListViewItem::paintCell(p, mycg, col, width, align); + TQListViewItem::paintCell(p, mycg, col, width, align); if (color.isValid()) { @@ -775,7 +775,7 @@ void UpdateFileItem::paintCell(QPainter *p, * Finds or creates the UpdateDirItem with path \a dirPath. If \a dirPath * is "." \a rootItem is returned. */ -UpdateDirItem* findOrCreateDirItem(const QString& dirPath, +UpdateDirItem* findOrCreateDirItem(const TQString& dirPath, UpdateDirItem* rootItem) { assert(!dirPath.isEmpty()); @@ -783,14 +783,14 @@ UpdateDirItem* findOrCreateDirItem(const QString& dirPath, UpdateDirItem* dirItem(rootItem); - if (dirPath != QChar('.')) + if (dirPath != TQChar('.')) { - const QStringList& dirNames(QStringList::split('/', dirPath)); - const QStringList::const_iterator itDirNameEnd(dirNames.end()); - for (QStringList::const_iterator itDirName(dirNames.begin()); + const TQStringList& dirNames(TQStringList::split('/', dirPath)); + const TQStringList::const_iterator itDirNameEnd(dirNames.end()); + for (TQStringList::const_iterator itDirName(dirNames.begin()); itDirName != itDirNameEnd; ++itDirName) { - const QString& dirName(*itDirName); + const TQString& dirName(*itDirName); UpdateItem* item = dirItem->findItem(dirName); if (isFileItem(item)) diff --git a/cervisia/updateview_items.h b/cervisia/updateview_items.h index 49f5cf91..0b24ca85 100644 --- a/cervisia/updateview_items.h +++ b/cervisia/updateview_items.h @@ -22,9 +22,9 @@ #define UPDATEVIEW_ITEMS_H -#include -#include -#include +#include +#include +#include #include "entry.h" #include "updateview.h" @@ -35,7 +35,7 @@ class UpdateFileItem; class Visitor; -UpdateDirItem* findOrCreateDirItem(const QString&, UpdateDirItem*); +UpdateDirItem* findOrCreateDirItem(const TQString&, UpdateDirItem*); class UpdateItem : public QListViewItem @@ -43,19 +43,19 @@ class UpdateItem : public QListViewItem public: UpdateItem(UpdateView* parent, const Cervisia::Entry& entry) - : QListViewItem(parent), m_entry(entry) {} + : TQListViewItem(parent), m_entry(entry) {} UpdateItem(UpdateItem* parent, const Cervisia::Entry& entry) - : QListViewItem(parent), m_entry(entry) {} + : TQListViewItem(parent), m_entry(entry) {} const Cervisia::Entry& entry() const { return m_entry; } // Returns the path (relative to the repository). - // QString::null for the root item and its (direct) children. - // If it's not QString::null it ends with '/'. - QString dirPath() const; + // TQString::null for the root item and its (direct) children. + // If it's not TQString::null it ends with '/'. + TQString dirPath() const; // Returns the file name, including the path (relative to the repository) - QString filePath() const; + TQString filePath() const; virtual void accept(Visitor&) = 0; @@ -78,13 +78,13 @@ public: void syncWithDirectory(); void syncWithEntries(); - void updateChildItem(const QString& name, Cervisia::EntryStatus status, bool isdir); + void updateChildItem(const TQString& name, Cervisia::EntryStatus status, bool isdir); void updateEntriesItem(const Cervisia::Entry& entry, bool isBinary); bool wasScanned() const { return m_opened; } - virtual int compare(QListViewItem* i, int col, bool) const; - virtual QString text(int col) const; + virtual int compare(TQListViewItem* i, int col, bool) const; + virtual TQString text(int col) const; virtual void setOpen(bool o); virtual int rtti() const { return RTTI; } @@ -103,15 +103,15 @@ private: UpdateItem* insertItem(UpdateItem* item); - UpdateItem* findItem(const QString& name) const; + UpdateItem* findItem(const TQString& name) const; - typedef QMap TMapItemsByName; + typedef TQMap TMapItemsByName; TMapItemsByName m_itemsByName; bool m_opened; - friend UpdateDirItem* findOrCreateDirItem(const QString&, UpdateDirItem*); + friend UpdateDirItem* findOrCreateDirItem(const TQString&, UpdateDirItem*); }; @@ -126,15 +126,15 @@ public: bool undefinedState() const { return m_undefined; } - virtual int compare(QListViewItem* i, int col, bool) const; - virtual QString text(int col) const; - virtual void paintCell(QPainter *p, const QColorGroup &cg, + virtual int compare(TQListViewItem* i, int col, bool) const; + virtual TQString text(int col) const; + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int col, int width, int align); virtual int rtti() const { return RTTI; } void setStatus(Cervisia::EntryStatus status); - void setRevTag(const QString& rev, const QString& tag); - void setDate(const QDateTime& date); + void setRevTag(const TQString& rev, const TQString& tag); + void setDate(const TQDateTime& date); void setUndefinedState(bool b) { m_undefined = b; } @@ -154,13 +154,13 @@ private: }; -inline bool isDirItem(const QListViewItem* item) +inline bool isDirItem(const TQListViewItem* item) { return item && item->rtti() == UpdateDirItem::RTTI; } -inline bool isFileItem(const QListViewItem* item) +inline bool isFileItem(const TQListViewItem* item) { return item && item->rtti() == UpdateFileItem::RTTI; } diff --git a/cervisia/updateview_visitors.cpp b/cervisia/updateview_visitors.cpp index e18b5b68..0dae046b 100644 --- a/cervisia/updateview_visitors.cpp +++ b/cervisia/updateview_visitors.cpp @@ -34,7 +34,7 @@ ApplyFilterVisitor::ApplyFilterVisitor(UpdateView::Filter filter) void ApplyFilterVisitor::preVisit(UpdateDirItem* item) { - // as QListViewItem::setVisible() is recursive we have to make + // as TQListViewItem::setVisible() is recursive we have to make // this UpdateDirItem visible first and later we can make it invisible item->setVisible(true); @@ -56,7 +56,7 @@ void ApplyFilterVisitor::postVisit(UpdateDirItem* item) || !(m_filter & UpdateView::NoEmptyDirectories) || !item->parent()); - // only set invisible as QListViewItem::setVisible() is recursive + // only set invisible as TQListViewItem::setVisible() is recursive // and so maybe overrides the state applied by the filter if (visible) { diff --git a/cervisia/watchdlg.cpp b/cervisia/watchdlg.cpp index 317f5c95..1ea42da6 100644 --- a/cervisia/watchdlg.cpp +++ b/cervisia/watchdlg.cpp @@ -20,65 +20,65 @@ #include "watchdlg.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -WatchDialog::WatchDialog(ActionType action, QWidget *parent, const char *name) - : KDialogBase(parent, name, true, QString::null, +WatchDialog::WatchDialog(ActionType action, TQWidget *parent, const char *name) + : KDialogBase(parent, name, true, TQString::null, Ok | Cancel | Help, Ok, true) { setCaption( (action==Add)? i18n("CVS Watch Add") : i18n("CVS Watch Remove") ); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QLabel *textlabel = new QLabel + TQLabel *textlabel = new QLabel ( (action==Add)? i18n("Add watches for the following events:") : i18n("Remove watches for the following events:"), mainWidget ); layout->addWidget(textlabel, 0); - all_button = new QRadioButton(i18n("&All"), mainWidget); + all_button = new TQRadioButton(i18n("&All"), mainWidget); all_button->setFocus(); all_button->setChecked(true); layout->addWidget(all_button); - only_button = new QRadioButton(i18n("&Only:"), mainWidget); + only_button = new TQRadioButton(i18n("&Only:"), mainWidget); layout->addWidget(only_button); - QGridLayout *eventslayout = new QGridLayout(layout); + TQGridLayout *eventslayout = new TQGridLayout(layout); eventslayout->addColSpacing(0, 20); eventslayout->setColStretch(0, 0); eventslayout->setColStretch(1, 1); - commitbox = new QCheckBox(i18n("&Commits"), mainWidget); + commitbox = new TQCheckBox(i18n("&Commits"), mainWidget); commitbox->setEnabled(false); eventslayout->addWidget(commitbox, 0, 1); - editbox = new QCheckBox(i18n("&Edits"), mainWidget); + editbox = new TQCheckBox(i18n("&Edits"), mainWidget); editbox->setEnabled(false); eventslayout->addWidget(editbox, 1, 1); - uneditbox = new QCheckBox(i18n("&Unedits"), mainWidget); + uneditbox = new TQCheckBox(i18n("&Unedits"), mainWidget); uneditbox->setEnabled(false); eventslayout->addWidget(uneditbox, 2, 1); - QButtonGroup* group = new QButtonGroup(mainWidget); + TQButtonGroup* group = new TQButtonGroup(mainWidget); group->hide(); group->insert(all_button); group->insert(only_button); - connect( only_button, SIGNAL(toggled(bool)), - commitbox, SLOT(setEnabled(bool)) ); - connect( only_button, SIGNAL(toggled(bool)), - editbox, SLOT(setEnabled(bool)) ); - connect( only_button, SIGNAL(toggled(bool)), - uneditbox, SLOT(setEnabled(bool)) ); + connect( only_button, TQT_SIGNAL(toggled(bool)), + commitbox, TQT_SLOT(setEnabled(bool)) ); + connect( only_button, TQT_SIGNAL(toggled(bool)), + editbox, TQT_SLOT(setEnabled(bool)) ); + connect( only_button, TQT_SIGNAL(toggled(bool)), + uneditbox, TQT_SLOT(setEnabled(bool)) ); setHelp("watches"); } diff --git a/cervisia/watchdlg.h b/cervisia/watchdlg.h index 59510dc2..fc58be05 100644 --- a/cervisia/watchdlg.h +++ b/cervisia/watchdlg.h @@ -35,13 +35,13 @@ public: enum ActionType { Add, Remove }; enum Events { None=0, All=1, Commits=2, Edits=4, Unedits=8 }; - explicit WatchDialog( ActionType action, QWidget *parent=0, const char *name=0 ); + explicit WatchDialog( ActionType action, TQWidget *parent=0, const char *name=0 ); Events events() const; private: - QRadioButton *all_button, *only_button; - QCheckBox *commitbox, *editbox, *uneditbox; + TQRadioButton *all_button, *only_button; + TQCheckBox *commitbox, *editbox, *uneditbox; }; #endif diff --git a/cervisia/watchersdlg.cpp b/cervisia/watchersdlg.cpp index d7d849bd..157f154b 100644 --- a/cervisia/watchersdlg.cpp +++ b/cervisia/watchersdlg.cpp @@ -19,8 +19,8 @@ #include "watchersdlg.h" -#include -#include +#include +#include #include #include #include @@ -30,18 +30,18 @@ #include "progressdlg.h" -WatchersDialog::WatchersDialog(KConfig& cfg, QWidget* parent, const char* name) - : KDialogBase(parent, name, false, QString::null, +WatchersDialog::WatchersDialog(KConfig& cfg, TQWidget* parent, const char* name) + : KDialogBase(parent, name, false, TQString::null, Close, ButtonCode(0), true) , partConfig(cfg) { - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - table = new QTable(mainWidget, "watchersTable"); + table = new TQTable(mainWidget, "watchersTable"); table->setNumCols(5); - table->setSelectionMode(QTable::NoSelection); + table->setSelectionMode(TQTable::NoSelection); table->setColumnMovingEnabled(false); table->setRowMovingEnabled(false); table->setReadOnly(true); @@ -50,7 +50,7 @@ WatchersDialog::WatchersDialog(KConfig& cfg, QWidget* parent, const char* name) table->verticalHeader()->hide(); table->setLeftMargin(0); - QHeader* header = table->horizontalHeader(); + TQHeader* header = table->horizontalHeader(); header->setLabel(0, i18n("File")); header->setLabel(1, i18n("Watcher")); header->setLabel(2, i18n("Edit")); @@ -61,7 +61,7 @@ WatchersDialog::WatchersDialog(KConfig& cfg, QWidget* parent, const char* name) setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "WatchersDialog"); + TQSize size = configDialogSize(partConfig, "WatchersDialog"); resize(size); } @@ -73,7 +73,7 @@ WatchersDialog::~WatchersDialog() bool WatchersDialog::parseWatchers(CvsService_stub* cvsService, - const QStringList& files) + const TQStringList& files) { setCaption(i18n("CVS Watchers")); @@ -85,12 +85,12 @@ bool WatchersDialog::parseWatchers(CvsService_stub* cvsService, if( !dlg.execute() ) return false; - QString line; + TQString line; int numRows = 0; while( dlg.getLine(line) ) { // parse the output line - QStringList list = splitLine(line); + TQStringList list = splitLine(line); // ignore empty lines and unknown files if( list.isEmpty() || list[0] == "?" ) @@ -102,15 +102,15 @@ bool WatchersDialog::parseWatchers(CvsService_stub* cvsService, table->setText(numRows, 0, list[0]); table->setText(numRows, 1, list[1]); - QCheckTableItem* item = new QCheckTableItem(table, ""); + TQCheckTableItem* item = new TQCheckTableItem(table, ""); item->setChecked(list.contains("edit")); table->setItem(numRows, 2, item); - item = new QCheckTableItem(table, ""); + item = new TQCheckTableItem(table, ""); item->setChecked(list.contains("unedit")); table->setItem(numRows, 3, item); - item = new QCheckTableItem(table, ""); + item = new TQCheckTableItem(table, ""); item->setChecked(list.contains("commit")); table->setItem(numRows, 4, item); diff --git a/cervisia/watchersdlg.h b/cervisia/watchersdlg.h index 59b2d52c..c98b0dc4 100644 --- a/cervisia/watchersdlg.h +++ b/cervisia/watchersdlg.h @@ -31,14 +31,14 @@ class CvsService_stub; class WatchersDialog : public KDialogBase { public: - explicit WatchersDialog(KConfig& cfg, QWidget* parent = 0, + explicit WatchersDialog(KConfig& cfg, TQWidget* parent = 0, const char* name = 0); virtual ~WatchersDialog(); - bool parseWatchers(CvsService_stub* cvsService, const QStringList& files); + bool parseWatchers(CvsService_stub* cvsService, const TQStringList& files); private: - QTable* table; + TQTable* table; KConfig& partConfig; }; diff --git a/kapptemplate/kapp/app.cpp b/kapptemplate/kapp/app.cpp index 58ed3415..04f88108 100644 --- a/kapptemplate/kapp/app.cpp +++ b/kapptemplate/kapp/app.cpp @@ -10,8 +10,8 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}.cpp #include "${APP_NAME_LC}pref.h" #include -#include -#include +#include +#include #include #include @@ -51,10 +51,10 @@ ${APP_NAME}::${APP_NAME}() setupGUI(); // allow the view to change the statusbar and caption - connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)), - this, SLOT(changeStatusbar(const QString&))); - connect(m_view, SIGNAL(signalChangeCaption(const QString&)), - this, SLOT(changeCaption(const QString&))); + connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)), + this, TQT_SLOT(changeStatusbar(const TQString&))); + connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)), + this, TQT_SLOT(changeCaption(const TQString&))); } @@ -65,7 +65,7 @@ ${APP_NAME}::~${APP_NAME}() void ${APP_NAME}::load(const KURL& url) { - QString target; + TQString target; // the below code is what you should normally do. in this // example case, we want the url to our own. you probably // want to use this code instead for your app @@ -91,19 +91,19 @@ void ${APP_NAME}::load(const KURL& url) void ${APP_NAME}::setupActions() { - KStdAction::openNew(this, SLOT(fileNew()), actionCollection()); - KStdAction::open(this, SLOT(fileOpen()), actionCollection()); - KStdAction::save(this, SLOT(fileSave()), actionCollection()); - KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection()); - KStdAction::print(this, SLOT(filePrint()), actionCollection()); - KStdAction::quit(kapp, SLOT(quit()), actionCollection()); + KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); + KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection()); + KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); + KStdAction::print(this, TQT_SLOT(filePrint()), actionCollection()); + KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); - KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection()); + KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); // this doesn't do anything useful. it's just here to illustrate // how to insert a custom menu and menu item KAction *custom = new KAction(i18n("Cus&tom Menuitem"), 0, - this, SLOT(optionsPreferences()), + this, TQT_SLOT(optionsPreferences()), actionCollection(), "custom_action"); } @@ -129,19 +129,19 @@ void ${APP_NAME}::readProperties(KConfig *config) // the app is being restored. read in here whatever you wrote // in 'saveProperties' - QString url = config->readPathEntry("lastURL"); + TQString url = config->readPathEntry("lastURL"); if (!url.isEmpty()) m_view->openURL(KURL::fromPathOrURL(url)); } -void ${APP_NAME}::dragEnterEvent(QDragEnterEvent *event) +void ${APP_NAME}::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void ${APP_NAME}::dropEvent(QDropEvent *event) +void ${APP_NAME}::dropEvent(TQDropEvent *event) { // this is a very simplistic implementation of a drop event. we // will only accept a dropped URL. the Qt dnd code can do *much* @@ -174,7 +174,7 @@ void ${APP_NAME}::fileOpen() // this slot is called whenever the File->Open menu is selected, // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar // button is clicked - KURL url = KURLRequesterDlg::getURL(QString::null, this, i18n("Open Location") ); + KURL url = KURLRequesterDlg::getURL(TQString::null, this, i18n("Open Location") ); if (!url.isEmpty()) m_view->openURL(url); } @@ -207,13 +207,13 @@ void ${APP_NAME}::filePrint() if (m_printer->setup(this)) { // setup the printer. with Qt, you always "print" to a - // QPainter.. whether the output medium is a pixmap, a screen, + // TQPainter.. whether the output medium is a pixmap, a screen, // or paper - QPainter p; + TQPainter p; p.begin(m_printer); // we let our view do the actual printing - QPaintDeviceMetrics metrics(m_printer); + TQPaintDeviceMetrics metrics(m_printer); m_view->print(&p, metrics.height(), metrics.width()); // and send the result to the printer @@ -226,7 +226,7 @@ void ${APP_NAME}::optionsConfigureToolbars() // use the standard toolbar editor saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); KEditToolbar dlg(actionCollection()); - connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig())); dlg.exec(); } @@ -248,13 +248,13 @@ void ${APP_NAME}::optionsPreferences() } } -void ${APP_NAME}::changeStatusbar(const QString& text) +void ${APP_NAME}::changeStatusbar(const TQString& text) { // display the text on the statusbar statusBar()->message(text); } -void ${APP_NAME}::changeCaption(const QString& text) +void ${APP_NAME}::changeCaption(const TQString& text) { // display the text on the caption setCaption(text); diff --git a/kapptemplate/kapp/app.h b/kapptemplate/kapp/app.h index 7f7b0d39..2b1d1d55 100644 --- a/kapptemplate/kapp/app.h +++ b/kapptemplate/kapp/app.h @@ -46,8 +46,8 @@ protected: /** * Overridden virtuals for Qt drag 'n drop (XDND) */ - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); protected: /** @@ -74,8 +74,8 @@ private slots: void optionsPreferences(); void newToolbarConfig(); - void changeStatusbar(const QString& text); - void changeCaption(const QString& text); + void changeStatusbar(const TQString& text); + void changeCaption(const TQString& text); private: void setupAccel(); diff --git a/kapptemplate/kapp/app_client.cpp b/kapptemplate/kapp/app_client.cpp index cd5e065d..53de48f5 100644 --- a/kapptemplate/kapp/app_client.cpp +++ b/kapptemplate/kapp/app_client.cpp @@ -2,8 +2,8 @@ echo "Creating $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_client.cpp..."; cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_client.cpp #include #include -#include -#include +#include +#include int main(int argc, char **argv) { @@ -14,13 +14,13 @@ int main(int argc, char **argv) client->attach(); // do a 'send' for now - QByteArray data; - QDataStream ds(data, IO_WriteOnly); + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); if (argc > 1) - ds << QString(argv[1]); + ds << TQString(argv[1]); else - ds << QString("http://www.kde.org"); - client->send("${APP_NAME_LC}", "${APP_NAME}Iface", "openURL(QString)", data); + ds << TQString("http://www.kde.org"); + client->send("${APP_NAME_LC}", "${APP_NAME}Iface", "openURL(TQString)", data); return app.exec(); } diff --git a/kapptemplate/kapp/appiface.h b/kapptemplate/kapp/appiface.h index 2601df94..9b1ab6ec 100644 --- a/kapptemplate/kapp/appiface.h +++ b/kapptemplate/kapp/appiface.h @@ -11,7 +11,7 @@ class ${APP_NAME}Iface : virtual public DCOPObject public: k_dcop: - virtual void openURL(QString url) = 0; + virtual void openURL(TQString url) = 0; }; #endif // ${APP_NAME_UC}IFACE_H diff --git a/kapptemplate/kapp/apppref.cpp b/kapptemplate/kapp/apppref.cpp index b025924a..6a479b83 100644 --- a/kapptemplate/kapp/apppref.cpp +++ b/kapptemplate/kapp/apppref.cpp @@ -4,8 +4,8 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}pref.cpp #include -#include -#include +#include +#include ${APP_NAME}Preferences::${APP_NAME}Preferences() : KDialogBase(TreeList, "${APP_NAME} Preferences", @@ -14,7 +14,7 @@ ${APP_NAME}Preferences::${APP_NAME}Preferences() // this is the base class for your preferences dialog. it is now // a Treelist dialog.. but there are a number of other // possibilities (including Tab, Swallow, and just Plain) - QFrame *frame; + TQFrame *frame; frame = addPage(i18n("First Page"), i18n("Page One Options")); m_pageOne = new ${APP_NAME}PrefPageOne(frame); @@ -22,21 +22,21 @@ ${APP_NAME}Preferences::${APP_NAME}Preferences() m_pageTwo = new ${APP_NAME}PrefPageTwo(frame); } -${APP_NAME}PrefPageOne::${APP_NAME}PrefPageOne(QWidget *parent) - : QFrame(parent) +${APP_NAME}PrefPageOne::${APP_NAME}PrefPageOne(TQWidget *parent) + : TQFrame(parent) { - QHBoxLayout *layout = new QHBoxLayout(this); + TQHBoxLayout *layout = new TQHBoxLayout(this); layout->setAutoAdd(true); - new QLabel("Add something here", this); + new TQLabel("Add something here", this); } -${APP_NAME}PrefPageTwo::${APP_NAME}PrefPageTwo(QWidget *parent) - : QFrame(parent) +${APP_NAME}PrefPageTwo::${APP_NAME}PrefPageTwo(TQWidget *parent) + : TQFrame(parent) { - QHBoxLayout *layout = new QHBoxLayout(this); + TQHBoxLayout *layout = new TQHBoxLayout(this); layout->setAutoAdd(true); - new QLabel("Add something here", this); + new TQLabel("Add something here", this); } #include "${APP_NAME_LC}pref.moc" diff --git a/kapptemplate/kapp/apppref.h b/kapptemplate/kapp/apppref.h index 97371936..234223f6 100644 --- a/kapptemplate/kapp/apppref.h +++ b/kapptemplate/kapp/apppref.h @@ -4,7 +4,7 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}pref.h #define ${APP_NAME_UC}PREF_H #include -#include +#include class ${APP_NAME}PrefPageOne; class ${APP_NAME}PrefPageTwo; @@ -24,14 +24,14 @@ class ${APP_NAME}PrefPageOne : public QFrame { Q_OBJECT public: - ${APP_NAME}PrefPageOne(QWidget *parent = 0); + ${APP_NAME}PrefPageOne(TQWidget *parent = 0); }; class ${APP_NAME}PrefPageTwo : public QFrame { Q_OBJECT public: - ${APP_NAME}PrefPageTwo(QWidget *parent = 0); + ${APP_NAME}PrefPageTwo(TQWidget *parent = 0); }; #endif // ${APP_NAME_UC}PREF_H diff --git a/kapptemplate/kapp/appview.cpp b/kapptemplate/kapp/appview.cpp index 575e8a5d..3527596b 100644 --- a/kapptemplate/kapp/appview.cpp +++ b/kapptemplate/kapp/appview.cpp @@ -2,8 +2,8 @@ echo "Creating $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}view.cpp..."; cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}view.cpp #include "${APP_NAME_LC}view.h" -#include -#include +#include +#include #include @@ -12,12 +12,12 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}view.cpp #include #include -${APP_NAME}View::${APP_NAME}View(QWidget *parent) - : QWidget(parent), +${APP_NAME}View::${APP_NAME}View(TQWidget *parent) + : TQWidget(parent), DCOPObject("${APP_NAME}Iface") { // setup our layout manager to automatically add our widgets - QHBoxLayout *top_layout = new QHBoxLayout(this); + TQHBoxLayout *top_layout = new TQHBoxLayout(this); top_layout->setAutoAdd(true); // we want to look for all components that satisfy our needs. the @@ -62,10 +62,10 @@ ${APP_NAME}View::${APP_NAME}View(QWidget *parent) return; } - connect(m_html, SIGNAL(setWindowCaption(const QString&)), - this, SLOT(slotSetTitle(const QString&))); - connect(m_html, SIGNAL(setStatusBarText(const QString&)), - this, SLOT(slotOnURL(const QString&))); + connect(m_html, TQT_SIGNAL(setWindowCaption(const TQString&)), + this, TQT_SLOT(slotSetTitle(const TQString&))); + connect(m_html, TQT_SIGNAL(setStatusBarText(const TQString&)), + this, TQT_SLOT(slotOnURL(const TQString&))); } @@ -73,18 +73,18 @@ ${APP_NAME}View::~${APP_NAME}View() { } -void ${APP_NAME}View::print(QPainter *p, int height, int width) +void ${APP_NAME}View::print(TQPainter *p, int height, int width) { // do the actual printing, here // p->drawText(etc..) } -QString ${APP_NAME}View::currentURL() +TQString ${APP_NAME}View::currentURL() { return m_html->url().url(); } -void ${APP_NAME}View::openURL(QString url) +void ${APP_NAME}View::openURL(TQString url) { openURL(KURL(url)); } @@ -94,12 +94,12 @@ void ${APP_NAME}View::openURL(const KURL& url) m_html->openURL(url); } -void ${APP_NAME}View::slotOnURL(const QString& url) +void ${APP_NAME}View::slotOnURL(const TQString& url) { emit signalChangeStatusbar(url); } -void ${APP_NAME}View::slotSetTitle(const QString& title) +void ${APP_NAME}View::slotSetTitle(const TQString& title) { emit signalChangeCaption(title); } diff --git a/kapptemplate/kapp/appview.h b/kapptemplate/kapp/appview.h index 881b979c..76e61701 100644 --- a/kapptemplate/kapp/appview.h +++ b/kapptemplate/kapp/appview.h @@ -3,7 +3,7 @@ cat << EOF > $LOCATION_ROOT/$APP_NAME_LC/${APP_NAME_LC}view.h #ifndef ${APP_NAME_UC}VIEW_H #define ${APP_NAME_UC}VIEW_H -#include +#include #include #include <${APP_NAME_LC}iface.h> @@ -21,14 +21,14 @@ class KURL; * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class ${APP_NAME}View : public QWidget, public ${APP_NAME}Iface +class ${APP_NAME}View : public TQWidget, public ${APP_NAME}Iface { Q_OBJECT public: /** * Default constructor */ - ${APP_NAME}View(QWidget *parent); + ${APP_NAME}View(TQWidget *parent); /** * Destructor @@ -38,12 +38,12 @@ public: /** * Random 'get' function */ - QString currentURL(); + TQString currentURL(); /** * Random 'set' function accessed by DCOP */ - virtual void openURL(QString url); + virtual void openURL(TQString url); /** * Random 'set' function @@ -53,22 +53,22 @@ public: /** * Print this view to any medium -- paper or not */ - void print(QPainter *, int height, int width); + void print(TQPainter *, int height, int width); signals: /** * Use this signal to change the content of the statusbar */ - void signalChangeStatusbar(const QString& text); + void signalChangeStatusbar(const TQString& text); /** * Use this signal to change the content of the caption */ - void signalChangeCaption(const QString& text); + void signalChangeCaption(const TQString& text); private slots: - void slotOnURL(const QString& url); - void slotSetTitle(const QString& title); + void slotOnURL(const TQString& url); + void slotSetTitle(const TQString& title); private: KParts::ReadOnlyPart *m_html; diff --git a/kapptemplate/kpartapp/app.cpp b/kapptemplate/kpartapp/app.cpp index 8b04053e..626aa8bd 100644 --- a/kapptemplate/kpartapp/app.cpp +++ b/kapptemplate/kpartapp/app.cpp @@ -79,16 +79,16 @@ void ${APP_NAME}::load(const KURL& url) void ${APP_NAME}::setupActions() { - KStdAction::openNew(this, SLOT(fileNew()), actionCollection()); - KStdAction::open(this, SLOT(fileOpen()), actionCollection()); + KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); + KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - KStdAction::quit(kapp, SLOT(quit()), actionCollection()); + KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); - KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); } void ${APP_NAME}::saveProperties(KConfig* /*config*/) @@ -136,8 +136,8 @@ void ${APP_NAME}::optionsConfigureToolbars() // use the standard toolbar editor KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), - this, SLOT(applyNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + this, TQT_SLOT(applyNewToolbarConfig())); dlg.exec(); } @@ -152,7 +152,7 @@ void ${APP_NAME}::fileOpen() // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar // button is clicked KURL url = - KFileDialog::getOpenURL( QString::null, QString::null, this ); + KFileDialog::getOpenURL( TQString::null, TQString::null, this ); if (url.isEmpty() == false) { diff --git a/kapptemplate/kpartapp/app_part.cpp b/kapptemplate/kpartapp/app_part.cpp index c2821950..d8880577 100644 --- a/kapptemplate/kpartapp/app_part.cpp +++ b/kapptemplate/kpartapp/app_part.cpp @@ -10,30 +10,30 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_part.cpp #include #include -#include -#include -#include +#include +#include +#include typedef KParts::GenericFactory<${APP_NAME}Part> ${APP_NAME}PartFactory; K_EXPORT_COMPONENT_FACTORY( lib${APP_NAME_LC}part, ${APP_NAME}PartFactory ) -${APP_NAME}Part::${APP_NAME}Part( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const QStringList & /*args*/ ) +${APP_NAME}Part::${APP_NAME}Part( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const TQStringList & /*args*/ ) : KParts::ReadWritePart(parent, name) { // we need an instance setInstance( ${APP_NAME}PartFactory::instance() ); // this should be your custom internal widget - m_widget = new QMultiLineEdit( parentWidget, widgetName ); + m_widget = new TQMultiLineEdit( parentWidget, widgetName ); // notify the part that this is our internal widget setWidget(m_widget); // create our actions - KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection()); - KStdAction::save(this, SLOT(save()), actionCollection()); + KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); + KStdAction::save(this, TQT_SLOT(save()), actionCollection()); // set our XML-UI resource file setXMLFile("${APP_NAME_LC}_part.rc"); @@ -54,12 +54,12 @@ void ${APP_NAME}Part::setReadWrite(bool rw) // notify your internal widget of the read-write state m_widget->setReadOnly(!rw); if (rw) - connect(m_widget, SIGNAL(textChanged()), - this, SLOT(setModified())); + connect(m_widget, TQT_SIGNAL(textChanged()), + this, TQT_SLOT(setModified())); else { - disconnect(m_widget, SIGNAL(textChanged()), - this, SLOT(setModified())); + disconnect(m_widget, TQT_SIGNAL(textChanged()), + this, TQT_SLOT(setModified())); } ReadWritePart::setReadWrite(rw); @@ -95,15 +95,15 @@ KAboutData *${APP_NAME}Part::createAboutData() bool ${APP_NAME}Part::openFile() { - // m_file is always local so we can use QFile on it - QFile file(m_file); + // m_file is always local so we can use TQFile on it + TQFile file(m_file); if (file.open(IO_ReadOnly) == false) return false; - // our example widget is text-based, so we use QTextStream instead + // our example widget is text-based, so we use TQTextStream instead // of a raw QDataStream - QTextStream stream(&file); - QString str; + TQTextStream stream(&file); + TQString str; while (!stream.eof()) str += stream.readLine() + "\n"; @@ -125,12 +125,12 @@ bool ${APP_NAME}Part::saveFile() return false; // m_file is always local, so we use QFile - QFile file(m_file); + TQFile file(m_file); if (file.open(IO_WriteOnly) == false) return false; - // use QTextStream to dump the text to the file - QTextStream stream(&file); + // use TQTextStream to dump the text to the file + TQTextStream stream(&file); stream << m_widget->text(); file.close(); @@ -141,7 +141,7 @@ bool ${APP_NAME}Part::saveFile() void ${APP_NAME}Part::fileSaveAs() { // this slot is called whenever the File->Save As menu is selected, - QString file_name = KFileDialog::getSaveFileName(); + TQString file_name = KFileDialog::getSaveFileName(); if (file_name.isEmpty() == false) saveAs(file_name); } diff --git a/kapptemplate/kpartapp/app_part.h b/kapptemplate/kpartapp/app_part.h index 18841510..e60b147b 100644 --- a/kapptemplate/kpartapp/app_part.h +++ b/kapptemplate/kpartapp/app_part.h @@ -26,8 +26,8 @@ public: /** * Default constructor */ - ${APP_NAME}Part(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList &args); + ${APP_NAME}Part(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList &args); /** * Destructor @@ -63,7 +63,7 @@ protected slots: void fileSaveAs(); private: - QMultiLineEdit *m_widget; + TQMultiLineEdit *m_widget; }; #endif // ${APP_NAME_UC}PART_H diff --git a/kapptemplate/kpartplugin/plugin_app.cpp b/kapptemplate/kpartplugin/plugin_app.cpp index 71c68bc7..0ec7a273 100644 --- a/kapptemplate/kpartplugin/plugin_app.cpp +++ b/kapptemplate/kpartplugin/plugin_app.cpp @@ -13,14 +13,14 @@ typedef KGenericFactory ${APP_NAME}Factory; K_EXPORT_COMPONENT_FACTORY( lib${APP_NAME_LC}plugin, ${APP_NAME}Factory( "${APP_NAME_LC}" ) ); -Plugin${APP_NAME}::Plugin${APP_NAME}( QObject* parent, const char* name, - const QStringList & /*args*/ ) +Plugin${APP_NAME}::Plugin${APP_NAME}( TQObject* parent, const char* name, + const TQStringList & /*args*/ ) : Plugin( parent, name ) { // Instantiate all of your actions here. These will appear in // Konqueror's menu and toolbars. (void) new KAction( i18n("&Plugin Action"), "${APP_NAME_LC}", 0, - this, SLOT(slotAction()), + this, TQT_SLOT(slotAction()), actionCollection(), "plugin_action" ); } @@ -35,8 +35,8 @@ void Plugin${APP_NAME}::slotAction() // change the following block. if ( !parent()->inherits("KHTMLPart") ) { - QString title( i18n( "Cannot Translate Source" ) ); - QString text( i18n( "You cannot translate anything except web pages " + TQString title( i18n( "Cannot Translate Source" ) ); + TQString text( i18n( "You cannot translate anything except web pages " "with this plugin." ) ); KMessageBox::sorry( 0, text, title ); @@ -55,8 +55,8 @@ void Plugin${APP_NAME}::slotAction() // valid URL if ( !url.isValid() ) { - QString title( i18n( "Malformed URL" ) ); - QString text( i18n( "The URL you entered is not valid, please " + TQString title( i18n( "Malformed URL" ) ); + TQString text( i18n( "The URL you entered is not valid, please " "correct it and try again." ) ); KMessageBox::sorry( 0, text, title ); @@ -69,7 +69,7 @@ void Plugin${APP_NAME}::slotAction() // BEGIN KURL work( "http://babel.altavista.com/translate.dyn" ); - QString query( "urltext=" ); + TQString query( "urltext=" ); query += KURL::encode_string( url.url() ); work.setQuery( query ); // END diff --git a/kapptemplate/kpartplugin/plugin_app.h b/kapptemplate/kpartplugin/plugin_app.h index 3e651499..8bb225b8 100644 --- a/kapptemplate/kpartplugin/plugin_app.h +++ b/kapptemplate/kpartplugin/plugin_app.h @@ -9,8 +9,8 @@ class Plugin${APP_NAME} : public KParts::Plugin { Q_OBJECT public: - Plugin${APP_NAME}( QObject* parent = 0, const char* name = 0, - const QStringList &args = QStringList() ); + Plugin${APP_NAME}( TQObject* parent = 0, const char* name = 0, + const TQStringList &args = TQStringList() ); virtual ~Plugin${APP_NAME}(); public slots: diff --git a/kbabel/addons/kfile-plugins/kfile_po.cpp b/kbabel/addons/kfile-plugins/kfile_po.cpp index 190d81fc..457e4bd9 100644 --- a/kbabel/addons/kfile-plugins/kfile_po.cpp +++ b/kbabel/addons/kfile-plugins/kfile_po.cpp @@ -30,7 +30,7 @@ #include "kfile_po.h" -#include +#include #include "poinfo.h" #include @@ -40,8 +40,8 @@ using namespace KBabel; typedef KGenericFactory POFactory; K_EXPORT_COMPONENT_FACTORY(kfile_po, POFactory("kfile_po")) -KPoPlugin::KPoPlugin(QObject *parent, const char *name, - const QStringList& args) +KPoPlugin::KPoPlugin(TQObject *parent, const char *name, + const TQStringList& args) : KFilePlugin(parent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo("application/x-gettext"); @@ -50,18 +50,18 @@ KPoPlugin::KPoPlugin(QObject *parent, const char *name, addGroupInfo(info, "CatalogInfo", i18n("Catalog Information")); KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Total", i18n("Total Messages"), QVariant::Int); - item = addItemInfo(group, "Fuzzy", i18n("Fuzzy Messages"), QVariant::Int); - item = addItemInfo(group, "Untranslated", i18n("Untranslated Messages"), QVariant::Int); - item = addItemInfo(group, "LastTranslator", i18n("Last Translator"), QVariant::String); - item = addItemInfo(group, "LanguageTeam", i18n("Language Team"), QVariant::String); - item = addItemInfo(group, "Revision", i18n("Revision"), QVariant::String); + item = addItemInfo(group, "Total", i18n("Total Messages"), TQVariant::Int); + item = addItemInfo(group, "Fuzzy", i18n("Fuzzy Messages"), TQVariant::Int); + item = addItemInfo(group, "Untranslated", i18n("Untranslated Messages"), TQVariant::Int); + item = addItemInfo(group, "LastTranslator", i18n("Last Translator"), TQVariant::String); + item = addItemInfo(group, "LanguageTeam", i18n("Language Team"), TQVariant::String); + item = addItemInfo(group, "Revision", i18n("Revision"), TQVariant::String); } bool KPoPlugin::readInfo(KFileMetaInfo& metaInfo, uint) { PoInfo poInfo; - QStringList wordList; + TQStringList wordList; ConversionStatus status = PoInfo::info(metaInfo.path(), poInfo, wordList, false, false, false); if (status == OK) { KFileMetaInfoGroup group = appendGroup(metaInfo, "CatalogInfo"); diff --git a/kbabel/addons/kfile-plugins/kfile_po.h b/kbabel/addons/kfile-plugins/kfile_po.h index 8e69a0ce..9b707a8f 100644 --- a/kbabel/addons/kfile-plugins/kfile_po.h +++ b/kbabel/addons/kfile-plugins/kfile_po.h @@ -42,7 +42,7 @@ class KPoPlugin : public KFilePlugin Q_OBJECT public: - KPoPlugin(QObject *parent, const char *name, const QStringList& args); + KPoPlugin(TQObject *parent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint); }; diff --git a/kbabel/addons/preview/pothumbcreator.cpp b/kbabel/addons/preview/pothumbcreator.cpp index f067948a..0883025c 100644 --- a/kbabel/addons/preview/pothumbcreator.cpp +++ b/kbabel/addons/preview/pothumbcreator.cpp @@ -33,9 +33,9 @@ */ -#include -#include -#include +#include +#include +#include #include #include @@ -67,35 +67,35 @@ PoThumbCreator::~PoThumbCreator() delete m_splitter; } -bool PoThumbCreator::create(const QString &path, int width, int height, QImage &img) +bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage &img) { if ( !m_splitter ) { m_splitter = new KPixmapSplitter; - QString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" ); + TQString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" ); if ( !pixmap.isEmpty() ) { - m_splitter->setPixmap( QPixmap( pixmap )); - m_splitter->setItemSize( QSize( 4, 7 )); + m_splitter->setPixmap( TQPixmap( pixmap )); + m_splitter->setItemSize( TQSize( 4, 7 )); } } bool ok = false; PoInfo poInfo; - QStringList wordList; + TQStringList wordList; // We do not call msgfmt, as a thumbnail must be created fast. if( PoInfo::info( path, poInfo, wordList, false, true, false ) == OK ) { ok = true; - QPixmap pix; + TQPixmap pix; if (height * 3 > width * 4) pix.resize(width, width * 4 / 3); else pix.resize(height * 3 / 4, height); - pix.fill( QColor( 245, 245, 245 ) ); // light-grey background + pix.fill( TQColor( 245, 245, 245 ) ); // light-grey background @@ -114,7 +114,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage & xBorder = (pix.width()-d)/2; yBorder = (pix.height()*2/3-d)/2; - QPainter p(&pix); + TQPainter p(&pix); if(fuzzyAngle>0) { @@ -163,9 +163,9 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage & - QRect rect; + TQRect rect; - QSize chSize = m_splitter->itemSize(); // the size of one char + TQSize chSize = m_splitter->itemSize(); // the size of one char int xOffset = chSize.width(); int yOffset = chSize.height(); @@ -186,7 +186,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage & // end centering - QString text; + TQString text; if(numCharsPerLine < 30) { @@ -250,9 +250,9 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage & text = locale->formatNumber(p,0)+'%'; */ // find the maximum string length to center the text - QStringList lineList=QStringList::split('\n',text); + TQStringList lineList=TQStringList::split('\n',text); uint max=0; - for( QStringList::Iterator it = lineList.begin(); it != lineList.end() + for( TQStringList::Iterator it = lineList.begin(); it != lineList.end() ; ++it ) { if((*it).length() > max) @@ -269,7 +269,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage & int posLastLine = pix.height() - (chSize.height() + yBorder); bool newLine = false; Q_ASSERT( posNewLine > 0 ); - const QPixmap *fontPixmap = &(m_splitter->pixmap()); + const TQPixmap *fontPixmap = &(m_splitter->pixmap()); for ( uint i = 0; i < text.length(); i++ ) @@ -295,7 +295,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage & } // check for newlines in the text (unix,dos) - QChar ch = text.at( i ); + TQChar ch = text.at( i ); if ( ch == '\n' ) { newLine = true; @@ -311,7 +311,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage & rect = m_splitter->coordinates( ch ); if ( !rect.isEmpty() ) { - bitBlt( &pix, QPoint(x,y), fontPixmap, rect, Qt::CopyROP ); + bitBlt( &pix, TQPoint(x,y), fontPixmap, rect, Qt::CopyROP ); } x += xOffset; // next character @@ -321,7 +321,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage & // in this seldom cases they are usually hidden ;-) if(pix.width() > 40 && KApplication::random()%2000 == 0) { - QPixmap kbabelPix; + TQPixmap kbabelPix; if(pix.width() < 80) { kbabelPix = KGlobal::iconLoader()->loadIcon("kbabel" @@ -342,7 +342,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage & x = QMAX(x,0); if(!kbabelPix.isNull()) { - bitBlt(&pix, QPoint(x,4), &kbabelPix, kbabelPix.rect() + bitBlt(&pix, TQPoint(x,4), &kbabelPix, kbabelPix.rect() , Qt::CopyROP); } } diff --git a/kbabel/addons/preview/pothumbcreator.h b/kbabel/addons/preview/pothumbcreator.h index 401e9431..25a1f7ab 100644 --- a/kbabel/addons/preview/pothumbcreator.h +++ b/kbabel/addons/preview/pothumbcreator.h @@ -44,7 +44,7 @@ class PoThumbCreator : public ThumbCreator public: PoThumbCreator(); virtual ~PoThumbCreator(); - virtual bool create(const QString &path, int width, int height, QImage &img); + virtual bool create(const TQString &path, int width, int height, TQImage &img); virtual Flags flags() const; private: diff --git a/kbabel/catalogmanager/catalogmanager.cpp b/kbabel/catalogmanager/catalogmanager.cpp index 6cbe964d..1292c0cf 100644 --- a/kbabel/catalogmanager/catalogmanager.cpp +++ b/kbabel/catalogmanager/catalogmanager.cpp @@ -45,8 +45,8 @@ #include "msgfmt.h" #include "toolaction.h" -#include -#include +#include +#include #include #include @@ -72,24 +72,24 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace KBabel; WId CatalogManagerApp::_preferredWindow = 0; -QStringList CatalogManager::_foundFilesList; -QStringList CatalogManager::_toBeSearched; +TQStringList CatalogManager::_foundFilesList; +TQStringList CatalogManager::_toBeSearched; -CatalogManager::CatalogManager(QString configFile ) +CatalogManager::CatalogManager(TQString configFile ) :KMainWindow(0,0) { if ( configFile.isEmpty() ) @@ -114,8 +114,8 @@ void CatalogManager::init() _totalFound = 0; _foundFilesList.clear(); _toBeSearched.clear(); - _timerFind = new QTimer( this ); - connect(_timerFind, SIGNAL( timeout() ), this, SLOT(findNextFile()) ); + _timerFind = new TQTimer( this ); + connect(_timerFind, TQT_SIGNAL( timeout() ), this, TQT_SLOT(findNextFile()) ); _searchStopped = false; _prefDialog=0; @@ -132,11 +132,11 @@ void CatalogManager::init() _project = KBabel::ProjectManager::open(KBabel::ProjectManager::defaultProjectName()); } - connect( _project, SIGNAL (signalCatManSettingsChanged()) - , this, SLOT (updateSettings())); + connect( _project, TQT_SIGNAL (signalCatManSettingsChanged()) + , this, TQT_SLOT (updateSettings())); - QWidget *view = new QWidget(this); - QVBoxLayout* layout= new QVBoxLayout(view); + TQWidget *view = new TQWidget(this); + TQVBoxLayout* layout= new TQVBoxLayout(view); layout->setMargin(0); layout->setSpacing(KDialog::spacingHint()); @@ -144,26 +144,26 @@ void CatalogManager::init() layout->addWidget(_catalogManager); layout->setStretchFactor(_catalogManager,1); - connect(this,SIGNAL(settingsChanged(KBabel::CatManSettings)) - ,_catalogManager,SLOT(setSettings(KBabel::CatManSettings))); - connect(_catalogManager,SIGNAL(openFile(QString,QString)) - ,this,SLOT(openFile(QString,QString))); - connect(_catalogManager,SIGNAL(openFileInNewWindow(QString,QString)) - ,this,SLOT(openFileInNewWindow(QString,QString))); - connect(_catalogManager,SIGNAL(openTemplate(QString,QString,QString)) - ,this,SLOT(openTemplate(QString,QString,QString))); - connect(_catalogManager,SIGNAL(openTemplateInNewWindow(QString,QString,QString)) - ,this,SLOT(openTemplateInNewWindow(QString,QString,QString))); - connect(_catalogManager,SIGNAL(gotoFileEntry(QString,QString,int)) - ,this,SLOT(openFile(QString,QString,int))); - connect(_catalogManager, SIGNAL(selectedChanged(uint)), - this, SLOT(selectedChanged(uint))); + connect(this,TQT_SIGNAL(settingsChanged(KBabel::CatManSettings)) + ,_catalogManager,TQT_SLOT(setSettings(KBabel::CatManSettings))); + connect(_catalogManager,TQT_SIGNAL(openFile(TQString,TQString)) + ,this,TQT_SLOT(openFile(TQString,TQString))); + connect(_catalogManager,TQT_SIGNAL(openFileInNewWindow(TQString,TQString)) + ,this,TQT_SLOT(openFileInNewWindow(TQString,TQString))); + connect(_catalogManager,TQT_SIGNAL(openTemplate(TQString,TQString,TQString)) + ,this,TQT_SLOT(openTemplate(TQString,TQString,TQString))); + connect(_catalogManager,TQT_SIGNAL(openTemplateInNewWindow(TQString,TQString,TQString)) + ,this,TQT_SLOT(openTemplateInNewWindow(TQString,TQString,TQString))); + connect(_catalogManager,TQT_SIGNAL(gotoFileEntry(TQString,TQString,int)) + ,this,TQT_SLOT(openFile(TQString,TQString,int))); + connect(_catalogManager, TQT_SIGNAL(selectedChanged(uint)), + this, TQT_SLOT(selectedChanged(uint))); KWin::setIcons(winId(),BarIcon("catalogmanager",32) ,SmallIcon("catalogmanager")); - QHBoxLayout* hBoxL = new QHBoxLayout(layout); - _progressLabel = new QLabel(view); + TQHBoxLayout* hBoxL = new TQHBoxLayout(layout); + _progressLabel = new TQLabel(view); hBoxL->addWidget(_progressLabel); _progressBar=new KProgress(view); hBoxL->addWidget(_progressBar); @@ -172,20 +172,20 @@ void CatalogManager::init() _progressLabel->hide(); _progressBar->hide(); - connect(_catalogManager,SIGNAL(prepareProgressBar(QString,int)) - , this, SLOT(prepareProgressBar(QString,int))); - connect(_catalogManager,SIGNAL(clearProgressBar()) - , this, SLOT(clearProgressBar())); - connect(_catalogManager,SIGNAL(progress(int)) - , _progressBar, SLOT(setProgress(int))); -// connect(_catalogManager, SIGNAL(signalBuildTree(bool)) -// , this, SLOT(enableMenuForFiles(bool))); - connect(_catalogManager, SIGNAL(signalBuildTree(bool)) - , this, SLOT(enableActions(bool))); - connect(this, SIGNAL(searchStopped()) - , _catalogManager, SLOT(stopSearch())); - connect(_catalogManager, SIGNAL(prepareFindProgressBar(int)) - , this, SLOT(prepareStatusProgressBar(int))); + connect(_catalogManager,TQT_SIGNAL(prepareProgressBar(TQString,int)) + , this, TQT_SLOT(prepareProgressBar(TQString,int))); + connect(_catalogManager,TQT_SIGNAL(clearProgressBar()) + , this, TQT_SLOT(clearProgressBar())); + connect(_catalogManager,TQT_SIGNAL(progress(int)) + , _progressBar, TQT_SLOT(setProgress(int))); +// connect(_catalogManager, TQT_SIGNAL(signalBuildTree(bool)) +// , this, TQT_SLOT(enableMenuForFiles(bool))); + connect(_catalogManager, TQT_SIGNAL(signalBuildTree(bool)) + , this, TQT_SLOT(enableActions(bool))); + connect(this, TQT_SIGNAL(searchStopped()) + , _catalogManager, TQT_SLOT(stopSearch())); + connect(_catalogManager, TQT_SIGNAL(prepareFindProgressBar(int)) + , this, TQT_SLOT(prepareStatusProgressBar(int))); setCentralWidget(view); resize( 600,300); @@ -194,20 +194,20 @@ void CatalogManager::init() setupActions(); - QPopupMenu* popup; - popup = (QPopupMenu*)(factory()->container("rmb_file", this)); + TQPopupMenu* popup; + popup = (TQPopupMenu*)(factory()->container("rmb_file", this)); if(popup) { _catalogManager->setRMBMenuFile(popup); } - popup = (QPopupMenu*)(factory()->container("rmb_dir", this)); + popup = (TQPopupMenu*)(factory()->container("rmb_dir", this)); if(popup) { _catalogManager->setRMBMenuDir(popup); } - connect(_catalogManager, SIGNAL(signalSearchedFile(int)) - , _statusProgressBar, SLOT(advance(int))); + connect(_catalogManager, TQT_SIGNAL(signalSearchedFile(int)) + , _statusProgressBar, TQT_SLOT(advance(int))); restoreView(); } @@ -220,60 +220,60 @@ void CatalogManager::setupActions() // the file menu action = new KAction( i18n("&Open"), CTRL+Key_O, _catalogManager, - SLOT(slotOpenFile()),actionCollection(), "open"); + TQT_SLOT(slotOpenFile()),actionCollection(), "open"); action->setEnabled(false); action = new KAction(i18n("&Open Template"),Key_Space,_catalogManager, - SLOT(slotOpenTemplate()),actionCollection(), "open_template"); + TQT_SLOT(slotOpenTemplate()),actionCollection(), "open_template"); action->setEnabled(false); action = new KAction(i18n("Open in &New Window"),CTRL+SHIFT+Key_O,_catalogManager, - SLOT(slotOpenFileInNewWindow()),actionCollection(), "open_new_window"); + TQT_SLOT(slotOpenFileInNewWindow()),actionCollection(), "open_new_window"); action->setEnabled(false); - action = KStdAction::quit(kapp, SLOT (closeAllWindows()), actionCollection()); + action = KStdAction::quit(kapp, TQT_SLOT (closeAllWindows()), actionCollection()); actionMap["open_template"] = NEEDS_POT; // the edit menu action = new KAction( i18n("Fi&nd in Files..."), CTRL+Key_F, this, - SLOT(find()), actionCollection(), "find_in_files"); + TQT_SLOT(find()), actionCollection(), "find_in_files"); action->setEnabled(false); action = new KAction( i18n("Re&place in Files..."), CTRL+Key_R, this, - SLOT(replace()), actionCollection(), "replace_in_files"); + TQT_SLOT(replace()), actionCollection(), "replace_in_files"); action->setEnabled(false); action = new KAction( i18n("&Stop Searching"), "stop", Key_Escape, this, - SLOT(stopSearching()), actionCollection(), "stop_search"); + TQT_SLOT(stopSearching()), actionCollection(), "stop_search"); action->setEnabled(false); action = new KAction( i18n("&Reload"), "reload", KStdAccel::reload(), _catalogManager, - SLOT(updateCurrent()), actionCollection(), "reload"); + TQT_SLOT(updateCurrent()), actionCollection(), "reload"); action->setEnabled(false); // the marking menu action = new KAction( i18n("&Toggle Marking"), CTRL+Key_M, _catalogManager, - SLOT(toggleMark()), actionCollection(), "toggle_marking"); + TQT_SLOT(toggleMark()), actionCollection(), "toggle_marking"); action->setEnabled(false); action = new KAction( i18n("Remove Marking"), 0, _catalogManager, - SLOT(slotClearMarksInDir()), actionCollection(), "remove_marking"); + TQT_SLOT(slotClearMarksInDir()), actionCollection(), "remove_marking"); action->setEnabled(false); action = new KAction( i18n("Toggle All Markings"), 0, _catalogManager, - SLOT(toggleAllMarks()), actionCollection(), "toggle_all_marking"); + TQT_SLOT(toggleAllMarks()), actionCollection(), "toggle_all_marking"); action->setEnabled(false); action = new KAction( i18n("Remove All Markings"), 0, _catalogManager, - SLOT(clearAllMarks()), actionCollection(), "remove_all_marking"); + TQT_SLOT(clearAllMarks()), actionCollection(), "remove_all_marking"); action->setEnabled(false); action = new KAction( i18n("Mark Modified Files"), 0, _catalogManager, - SLOT(markModifiedFiles()), actionCollection(), "mark_modified_files"); + TQT_SLOT(markModifiedFiles()), actionCollection(), "mark_modified_files"); // fixme to enabling this when loading is done using updateFinished() signal action->setEnabled(true); action = new KAction( i18n("&Load Markings..."), 0, _catalogManager, - SLOT(loadMarks()), actionCollection(), "load_marking"); + TQT_SLOT(loadMarks()), actionCollection(), "load_marking"); action->setEnabled(false); action = new KAction( i18n("&Save Markings..."), 0, _catalogManager, - SLOT(saveMarks()), actionCollection(), "save_marking"); + TQT_SLOT(saveMarks()), actionCollection(), "save_marking"); action->setEnabled(false); (void)new KAction(i18n("&Mark Files..."), 0, _catalogManager, - SLOT(slotMarkPattern()), actionCollection(), "mark_pattern"); + TQT_SLOT(slotMarkPattern()), actionCollection(), "mark_pattern"); (void)new KAction(i18n("&Unmark Files..."), 0, _catalogManager, - SLOT(slotUnmarkPattern()), actionCollection(), "unmark_pattern"); + TQT_SLOT(slotUnmarkPattern()), actionCollection(), "unmark_pattern"); actionMap["remove_marking"] = NEEDS_MARK; actionMap["remove_all_marking"] = NEEDS_MARK; @@ -282,102 +282,102 @@ void CatalogManager::setupActions() // go menu action = new KAction(i18n("Nex&t Untranslated"), "nextuntranslated", ALT+Key_Next, - _catalogManager, SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans"); + _catalogManager, TQT_SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans"); action->setEnabled(false); action = new KAction(i18n("Prev&ious Untranslated"), "prevuntranslated", ALT+Key_Prior, - _catalogManager, SLOT(gotoPreviousUntranslated()),actionCollection(), "go_prev_untrans"); + _catalogManager, TQT_SLOT(gotoPreviousUntranslated()),actionCollection(), "go_prev_untrans"); action->setEnabled(false); action = new KAction(i18n("Ne&xt Fuzzy"), "nextfuzzy", CTRL+Key_Next, - _catalogManager, SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy"); + _catalogManager, TQT_SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy"); action->setEnabled(false); action = new KAction(i18n("Pre&vious Fuzzy"), "prevfuzzy", CTRL+Key_Prior, - _catalogManager, SLOT(gotoPreviousFuzzy()),actionCollection(), "go_prev_fuzzy"); + _catalogManager, TQT_SLOT(gotoPreviousFuzzy()),actionCollection(), "go_prev_fuzzy"); action->setEnabled(false); action = new KAction(i18n("N&ext Fuzzy or Untranslated"), "nextfuzzyuntrans", CTRL+SHIFT+Key_Next, - _catalogManager, SLOT(gotoNextFuzzyOrUntranslated()),actionCollection(), "go_next_fuzzyUntr"); + _catalogManager, TQT_SLOT(gotoNextFuzzyOrUntranslated()),actionCollection(), "go_next_fuzzyUntr"); action->setEnabled(false); action = new KAction(i18n("P&revious Fuzzy or Untranslated"), "prevfuzzyuntrans", CTRL+SHIFT+Key_Prior, - _catalogManager, SLOT(gotoPreviousFuzzyOrUntranslated()),actionCollection(), "go_prev_fuzzyUntr"); + _catalogManager, TQT_SLOT(gotoPreviousFuzzyOrUntranslated()),actionCollection(), "go_prev_fuzzyUntr"); action->setEnabled(false); action = new KAction(i18n("Next Err&or"), "nexterror", ALT+SHIFT+Key_Next, - _catalogManager, SLOT(gotoNextError()),actionCollection(), "go_next_error"); + _catalogManager, TQT_SLOT(gotoNextError()),actionCollection(), "go_next_error"); action->setEnabled(false); action = new KAction(i18n("Previo&us Error"), "preverror", ALT+SHIFT+Key_Prior, - _catalogManager, SLOT(gotoPreviousError()),actionCollection(), "go_prev_error"); + _catalogManager, TQT_SLOT(gotoPreviousError()),actionCollection(), "go_prev_error"); action->setEnabled(false); action = new KAction(i18n("Next Te&mplate Only"), "nexttemplate", CTRL+Key_Down, - _catalogManager, SLOT(gotoNextTemplate()),actionCollection(), "go_next_template"); + _catalogManager, TQT_SLOT(gotoNextTemplate()),actionCollection(), "go_next_template"); action->setEnabled(false); action = new KAction(i18n("Previous Temp&late Only"), "prevtemplate", CTRL+Key_Up, - _catalogManager, SLOT(gotoPreviousTemplate()),actionCollection(), "go_prev_template"); + _catalogManager, TQT_SLOT(gotoPreviousTemplate()),actionCollection(), "go_prev_template"); action->setEnabled(false); action = new KAction(i18n("Next Tran&slation Exists"), "nextpo", ALT+Key_Down, - _catalogManager, SLOT(gotoNextPo()),actionCollection(), "go_next_po"); + _catalogManager, TQT_SLOT(gotoNextPo()),actionCollection(), "go_next_po"); action->setEnabled(false); action = new KAction(i18n("Previous Transl&ation Exists"), "prevpo", ALT+Key_Up, - _catalogManager, SLOT(gotoPreviousPo()),actionCollection(), "go_prev_po"); + _catalogManager, TQT_SLOT(gotoPreviousPo()),actionCollection(), "go_prev_po"); action->setEnabled(false); action = new KAction(i18n("Previous Marke&d"), "prevmarked", SHIFT+Key_Up, - _catalogManager, SLOT(gotoPreviousMarked()),actionCollection(), "go_prev_marked"); + _catalogManager, TQT_SLOT(gotoPreviousMarked()),actionCollection(), "go_prev_marked"); action->setEnabled(false); action = new KAction(i18n("Next &Marked"), "nextmarked", SHIFT+Key_Down, - _catalogManager, SLOT(gotoNextMarked()),actionCollection(), "go_next_marked"); + _catalogManager, TQT_SLOT(gotoNextMarked()),actionCollection(), "go_next_marked"); action->setEnabled(false); // project menu // the project menu action = new KAction(i18n("&New..."), "filenew" - , this, SLOT(projectNew()),actionCollection() + , this, TQT_SLOT(projectNew()),actionCollection() ,"project_new"); action = new KAction(i18n("&Open..."), "fileopen" - , this, SLOT(projectOpen()),actionCollection() + , this, TQT_SLOT(projectOpen()),actionCollection() ,"project_open"); action = new KAction(i18n("C&lose"), "fileclose" - , this, SLOT(projectClose()),actionCollection() + , this, TQT_SLOT(projectClose()),actionCollection() ,"project_close"); action->setEnabled (_project->filename() != KBabel::ProjectManager::defaultProjectName() ); action = new KAction(i18n("&Configure..."), "configure" - , this, SLOT(projectConfigure()),actionCollection() + , this, TQT_SLOT(projectConfigure()),actionCollection() ,"project_settings"); // tools menu action = new KAction( i18n("&Statistics"), "statistics", CTRL+Key_S, - _catalogManager, SLOT(statistics()), actionCollection(), "statistics"); + _catalogManager, TQT_SLOT(statistics()), actionCollection(), "statistics"); action->setEnabled(false); action = new KAction( i18n("S&tatistics in Marked"), "statistics", CTRL+ALT+Key_S, - _catalogManager, SLOT(markedStatistics()), actionCollection(), "statistics_marked"); + _catalogManager, TQT_SLOT(markedStatistics()), actionCollection(), "statistics_marked"); action->setEnabled(false); action = new KAction( i18n("Check S&yntax"), "syntax", CTRL+Key_Y, - _catalogManager, SLOT(checkSyntax()), actionCollection(), "syntax"); + _catalogManager, TQT_SLOT(checkSyntax()), actionCollection(), "syntax"); action->setEnabled(false); action = new KAction( i18n("S&pell Check"), "spellcheck", CTRL+Key_I, - this, SLOT(spellcheck()), actionCollection(), "spellcheck"); + this, TQT_SLOT(spellcheck()), actionCollection(), "spellcheck"); action->setEnabled(false); action = new KAction( i18n("Spell Check in &Marked"), "spellcheck", CTRL+ALT+Key_I, - this, SLOT(markedSpellcheck()), actionCollection(), "spellcheck_marked"); + this, TQT_SLOT(markedSpellcheck()), actionCollection(), "spellcheck_marked"); action->setEnabled(false); action = new KAction( i18n("&Rough Translation"), CTRL+Key_T, - _catalogManager, SLOT(roughTranslation()), actionCollection(), "rough_translation"); + _catalogManager, TQT_SLOT(roughTranslation()), actionCollection(), "rough_translation"); action->setEnabled(false); action = new KAction( i18n("Rough Translation in M&arked"), CTRL+ALT+Key_T, - _catalogManager, SLOT(markedRoughTranslation()), actionCollection(), "rough_translation_marked"); + _catalogManager, TQT_SLOT(markedRoughTranslation()), actionCollection(), "rough_translation_marked"); action->setEnabled(false); action = new KAction( i18n("Mai&l"), "mail_send", CTRL+Key_A, - _catalogManager, SLOT(mailFiles()), actionCollection(), "mail_file"); + _catalogManager, TQT_SLOT(mailFiles()), actionCollection(), "mail_file"); action->setEnabled(false); action = new KAction( i18n("Mail Mar&ked"), "mail_send", CTRL+ALT+Key_A, - _catalogManager, SLOT(mailMarkedFiles()), actionCollection(), "mail_file_marked"); + _catalogManager, TQT_SLOT(mailMarkedFiles()), actionCollection(), "mail_file_marked"); action->setEnabled(false); action = new KAction( i18n("&Pack"), "tar", CTRL+Key_B, - _catalogManager, SLOT(packageFiles()), actionCollection(), "package_file"); - action = new KAction( i18n("Pack &Marked"), "tar", CTRL+ALT+Key_B, _catalogManager, SLOT(packageMarkedFiles()), actionCollection(), "package_file_marked"); + _catalogManager, TQT_SLOT(packageFiles()), actionCollection(), "package_file"); + action = new KAction( i18n("Pack &Marked"), "tar", CTRL+ALT+Key_B, _catalogManager, TQT_SLOT(packageMarkedFiles()), actionCollection(), "package_file_marked"); action->setEnabled(false); actionMap["statistics_marked"] = NEEDS_DIR | NEEDS_MARK; @@ -390,10 +390,10 @@ void CatalogManager::setupActions() actionMap["package_file_marked"] = NEEDS_PO | NEEDS_MARK; // dynamic tools - QValueList tools = ToolAction::validationTools(); + TQValueList tools = ToolAction::validationTools(); - QPtrList actions = ToolAction::dataToolActionList( - tools, _catalogManager, SLOT(validateUsingTool( const KDataToolInfo &, const QString& )) + TQPtrList actions = ToolAction::dataToolActionList( + tools, _catalogManager, TQT_SLOT(validateUsingTool( const KDataToolInfo &, const TQString& )) ,"validate", false, actionCollection() ); KActionMenu* m_menu = new KActionMenu(i18n("&Validation"), actionCollection(), @@ -407,7 +407,7 @@ void CatalogManager::setupActions() } actions = ToolAction::dataToolActionList( - tools, _catalogManager, SLOT(validateMarkedUsingTool( const KDataToolInfo &, const QString& )) + tools, _catalogManager, TQT_SLOT(validateMarkedUsingTool( const KDataToolInfo &, const TQString& )) ,"validate", false, actionCollection(), "marked_" ); m_menu = new KActionMenu(i18n("V&alidation Marked"), actionCollection(), "dynamic_validation_marked"); @@ -423,19 +423,19 @@ void CatalogManager::setupActions() // CVS submenu // Actions for PO files (void)new KAction( i18n( "Update" ), "down", 0, _catalogManager, - SLOT( cvsUpdate( ) ), actionCollection( ), "cvs_update" ); + TQT_SLOT( cvsUpdate( ) ), actionCollection( ), "cvs_update" ); (void)new KAction( i18n( "Update Marked" ), 0, _catalogManager, - SLOT( cvsUpdateMarked( ) ), actionCollection( ), "cvs_update_marked" ); + TQT_SLOT( cvsUpdateMarked( ) ), actionCollection( ), "cvs_update_marked" ); (void)new KAction( i18n( "Commit" ), "up", 0, _catalogManager, - SLOT( cvsCommit( ) ), actionCollection( ), "cvs_commit" ); + TQT_SLOT( cvsCommit( ) ), actionCollection( ), "cvs_commit" ); (void)new KAction( i18n( "Commit Marked" ), 0, _catalogManager, - SLOT( cvsCommitMarked( ) ), actionCollection( ), "cvs_commit_marked" ); + TQT_SLOT( cvsCommitMarked( ) ), actionCollection( ), "cvs_commit_marked" ); (void)new KAction( i18n( "Status" ), 0, _catalogManager, - SLOT( cvsStatus( ) ), actionCollection( ), "cvs_status" ); + TQT_SLOT( cvsStatus( ) ), actionCollection( ), "cvs_status" ); (void)new KAction( i18n( "Status for Marked" ), 0, _catalogManager, - SLOT( cvsStatusMarked( ) ), actionCollection( ), "cvs_status_marked" ); + TQT_SLOT( cvsStatusMarked( ) ), actionCollection( ), "cvs_status_marked" ); (void)new KAction( i18n( "Show Diff" ), 0, _catalogManager, - SLOT( cvsDiff( ) ), actionCollection( ), "cvs_diff" ); + TQT_SLOT( cvsDiff( ) ), actionCollection( ), "cvs_diff" ); // CVS actionMap["cvs_update"] = NEEDS_PO | NEEDS_PO_CVS; @@ -449,27 +449,27 @@ void CatalogManager::setupActions() // SVN submenu // Actions for PO files (void)new KAction( i18n( "Update" ), "down", 0, _catalogManager, - SLOT( svnUpdate( ) ), actionCollection( ), "svn_update" ); + TQT_SLOT( svnUpdate( ) ), actionCollection( ), "svn_update" ); (void)new KAction( i18n( "Update Marked" ), 0, _catalogManager, - SLOT( svnUpdateMarked( ) ), actionCollection( ), "svn_update_marked" ); + TQT_SLOT( svnUpdateMarked( ) ), actionCollection( ), "svn_update_marked" ); (void)new KAction( i18n( "Commit" ), "up", 0, _catalogManager, - SLOT( svnCommit( ) ), actionCollection( ), "svn_commit" ); + TQT_SLOT( svnCommit( ) ), actionCollection( ), "svn_commit" ); (void)new KAction( i18n( "Commit Marked" ), 0, _catalogManager, - SLOT( svnCommitMarked( ) ), actionCollection( ), "svn_commit_marked" ); + TQT_SLOT( svnCommitMarked( ) ), actionCollection( ), "svn_commit_marked" ); (void)new KAction( i18n( "Status (Local)" ), 0, _catalogManager, - SLOT( svnStatusLocal() ), actionCollection( ), "svn_status_local" ); + TQT_SLOT( svnStatusLocal() ), actionCollection( ), "svn_status_local" ); (void)new KAction( i18n( "Status (Local) for Marked" ), 0, _catalogManager, - SLOT( svnStatusLocalMarked() ), actionCollection( ), "svn_status_local_marked" ); + TQT_SLOT( svnStatusLocalMarked() ), actionCollection( ), "svn_status_local_marked" ); (void)new KAction( i18n( "Status (Remote)" ), 0, _catalogManager, - SLOT( svnStatusRemote() ), actionCollection( ), "svn_status_remote" ); + TQT_SLOT( svnStatusRemote() ), actionCollection( ), "svn_status_remote" ); (void)new KAction( i18n( "Status (Remote) for Marked" ), 0, _catalogManager, - SLOT( svnStatusRemoteMarked() ), actionCollection( ), "svn_status_remote_marked" ); + TQT_SLOT( svnStatusRemoteMarked() ), actionCollection( ), "svn_status_remote_marked" ); (void)new KAction( i18n( "Show Diff" ), 0, _catalogManager, - SLOT( svnDiff( ) ), actionCollection( ), "svn_diff" ); + TQT_SLOT( svnDiff( ) ), actionCollection( ), "svn_diff" ); (void)new KAction( i18n( "Show Information" ), 0, _catalogManager, - SLOT( svnInfo() ), actionCollection( ), "svn_info" ); + TQT_SLOT( svnInfo() ), actionCollection( ), "svn_info" ); (void)new KAction( i18n( "Show Information for Marked" ), 0, _catalogManager, - SLOT( svnInfoMarked() ), actionCollection( ), "svn_info_marked" ); + TQT_SLOT( svnInfoMarked() ), actionCollection( ), "svn_info_marked" ); // SVN actionMap["svn_update"] = NEEDS_PO | NEEDS_PO_SVN; @@ -486,13 +486,13 @@ void CatalogManager::setupActions() // CVS Actions for POT files (void)new KAction( i18n( "Update Templates" ), 0, _catalogManager, - SLOT( cvsUpdateTemplate( ) ), actionCollection( ), "cvs_update_template" ); + TQT_SLOT( cvsUpdateTemplate( ) ), actionCollection( ), "cvs_update_template" ); (void)new KAction( i18n( "Update Marked Templates" ), 0, _catalogManager, - SLOT( cvsUpdateMarkedTemplate( ) ), actionCollection( ), "cvs_update_marked_template" ); + TQT_SLOT( cvsUpdateMarkedTemplate( ) ), actionCollection( ), "cvs_update_marked_template" ); (void)new KAction( i18n( "Commit Templates" ), 0, _catalogManager, - SLOT( cvsCommitTemplate( ) ), actionCollection( ), "cvs_commit_template" ); + TQT_SLOT( cvsCommitTemplate( ) ), actionCollection( ), "cvs_commit_template" ); (void)new KAction( i18n( "Commit Marked Templates" ), 0, _catalogManager, - SLOT( cvsCommitMarkedTemplate( ) ), actionCollection( ), "cvs_commit_marked_template" ); + TQT_SLOT( cvsCommitMarkedTemplate( ) ), actionCollection( ), "cvs_commit_marked_template" ); actionMap["cvs_update_template"] = NEEDS_POT | NEEDS_POT_CVS; actionMap["cvs_update_marked_template"] = NEEDS_POT | NEEDS_POT_CVS | NEEDS_MARK; @@ -501,13 +501,13 @@ void CatalogManager::setupActions() // SVN Actions for POT files (void)new KAction( i18n( "Update Templates" ), 0, _catalogManager, - SLOT( svnUpdateTemplate( ) ), actionCollection( ), "svn_update_template" ); + TQT_SLOT( svnUpdateTemplate( ) ), actionCollection( ), "svn_update_template" ); (void)new KAction( i18n( "Update Marked Templates" ), 0, _catalogManager, - SLOT( svnUpdateMarkedTemplate( ) ), actionCollection( ), "svn_update_marked_template" ); + TQT_SLOT( svnUpdateMarkedTemplate( ) ), actionCollection( ), "svn_update_marked_template" ); (void)new KAction( i18n( "Commit Templates" ), 0, _catalogManager, - SLOT( svnCommitTemplate( ) ), actionCollection( ), "svn_commit_template" ); + TQT_SLOT( svnCommitTemplate( ) ), actionCollection( ), "svn_commit_template" ); (void)new KAction( i18n( "Commit Marked Templates" ), 0, _catalogManager, - SLOT( svnCommitMarkedTemplate( ) ), actionCollection( ), "svn_commit_marked_template" ); + TQT_SLOT( svnCommitMarkedTemplate( ) ), actionCollection( ), "svn_commit_marked_template" ); actionMap["svn_update_template"] = NEEDS_POT | NEEDS_POT_SVN; actionMap["svn_update_marked_template"] = NEEDS_POT | NEEDS_POT_SVN | NEEDS_MARK; @@ -515,7 +515,7 @@ void CatalogManager::setupActions() actionMap["svn_commit_marked_template"] = NEEDS_POT | NEEDS_POT_SVN | NEEDS_MARK; // settings menu - // FIXME: KStdAction::preferences(this, SLOT( optionsPreferences()), actionCollection()); + // FIXME: KStdAction::preferences(this, TQT_SLOT( optionsPreferences()), actionCollection()); createStandardStatusBarAction(); @@ -530,7 +530,7 @@ void CatalogManager::setupActions() actionCollection(), "file_commands"); _catalogManager->setFileCommandsMenu( actionMenu->popupMenu()); - action = new KAction(i18n("&Delete"),Key_Delete,_catalogManager,SLOT(slotDeleteFile()),actionCollection(), "delete"); + action = new KAction(i18n("&Delete"),Key_Delete,_catalogManager,TQT_SLOT(slotDeleteFile()),actionCollection(), "delete"); action->setEnabled(false); #if KDE_IS_VERSION( 3, 2, 90 ) @@ -542,19 +542,19 @@ void CatalogManager::setupActions() void CatalogManager::setupStatusBar() { - _foundLabel = new QLabel( " ", statusBar()); + _foundLabel = new TQLabel( " ", statusBar()); statusBar()->addWidget(_foundLabel,0); - QHBox* progressBox = new QHBox(statusBar(), "progressBox" ); + TQHBox* progressBox = new TQHBox(statusBar(), "progressBox" ); progressBox->setSpacing(2); - _statusProgressLabel = new QLabel( "", progressBox ); + _statusProgressLabel = new TQLabel( "", progressBox ); _statusProgressBar = new KProgress( progressBox, "progressBar"); _statusProgressBar->hide(); statusBar()->addWidget(progressBox,1); statusBar()->setMinimumHeight(_statusProgressBar->sizeHint().height()); - QWhatsThis::add(statusBar(), + TQWhatsThis::add(statusBar(), i18n("

Statusbar

\n" "

The statusbar displays information about progress of" " the current find or replace operation. The first number in Found:" @@ -570,7 +570,7 @@ void CatalogManager::enableMenuForFiles(bool enable) void CatalogManager::selectedChanged(uint actionValue) { - QMap::Iterator it; + TQMap::Iterator it; for (it = actionMap.begin( ); it != actionMap.end( ); ++it) { KAction * action = actionCollection()->action(it.key( ).latin1( )); if (action) action->setEnabled((actionValue & it.data( )) == it.data( )); @@ -589,7 +589,7 @@ void CatalogManager::updateSettings() _openNewWindow=_settings.openWindow; } -void CatalogManager::saveSettings( QString configFile ) +void CatalogManager::saveSettings( TQString configFile ) { _settings = _catalogManager->settings(); // restore settings from the view @@ -615,12 +615,12 @@ void CatalogManager::setPreferredWindow(WId window) kdDebug(KBABEL_CATMAN) << "setPrefereedWindow set to :" << _preferredWindow << endl; } -void CatalogManager::updateFile(QString fileWithPath) +void CatalogManager::updateFile(TQString fileWithPath) { _catalogManager->updateFile(fileWithPath,true); //force update } -void CatalogManager::updateAfterSave(QString fileWithPath, PoInfo &info) +void CatalogManager::updateAfterSave(TQString fileWithPath, PoInfo &info) { _catalogManager->updateAfterSave(fileWithPath, info); } @@ -630,16 +630,16 @@ CatalogManagerView *CatalogManager::view() return _catalogManager; } -void CatalogManager::openFile(QString filename, QString package) +void CatalogManager::openFile(TQString filename, TQString package) { DCOPClient * client = kapp->dcopClient(); if( startKBabel() ) { - QByteArray data; - QCString url = filename.local8Bit(); - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQCString url = filename.local8Bit(); + TQDataStream arg(data, IO_WriteOnly); arg << url; arg << package.utf8(); arg << CatalogManagerApp::_preferredWindow; @@ -647,11 +647,11 @@ void CatalogManager::openFile(QString filename, QString package) kdDebug(KBABEL_CATMAN) << "Open file with project " << _configFile << endl; - QCString callfunc="openURL(QCString, QCString, WId,int)"; + TQCString callfunc="openURL(TQCString, TQCString, WId,int)"; if(_configFile != "kbabelrc" ) { arg << _configFile.utf8(); - callfunc="openURL(QCString, QCString, WId,int,QCString)"; + callfunc="openURL(TQCString, TQCString, WId,int,TQCString)"; } kdDebug(KBABEL_CATMAN) << callfunc << endl; @@ -665,26 +665,26 @@ void CatalogManager::openFile(QString filename, QString package) } } -void CatalogManager::openFile(QString filename, QString package, int msgid) +void CatalogManager::openFile(TQString filename, TQString package, int msgid) { DCOPClient * client = kapp->dcopClient(); if( startKBabel() ) { - QByteArray data; - QCString url = filename.local8Bit(); - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQCString url = filename.local8Bit(); + TQDataStream arg(data, IO_WriteOnly); arg << url; arg << package.utf8(); arg << msgid; kdDebug(KBABEL_CATMAN) << "Open file with project " << _configFile << endl; - QCString callfunc="gotoFileEntry(QCString, QCString, int)"; + TQCString callfunc="gotoFileEntry(TQCString, TQCString, int)"; if(_configFile != "kbabelrc" ) { arg << _configFile.utf8(); - callfunc="gotoFileEntry(QCString, QCString,int,QCString)"; + callfunc="gotoFileEntry(TQCString, TQCString,int,TQCString)"; } kdDebug(KBABEL_CATMAN) << callfunc << endl; @@ -698,26 +698,26 @@ void CatalogManager::openFile(QString filename, QString package, int msgid) } } -void CatalogManager::openFileInNewWindow(QString filename, QString package) +void CatalogManager::openFileInNewWindow(TQString filename, TQString package) { DCOPClient * client = kapp->dcopClient(); if( startKBabel() ) { - QByteArray data; - QCString url = filename.local8Bit(); - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQCString url = filename.local8Bit(); + TQDataStream arg(data, IO_WriteOnly); arg << url; arg << package.utf8(); arg << CatalogManagerApp::_preferredWindow; arg << ((int)1); - QCString callfunc="openURL(QCString, QCString, WId,int)"; + TQCString callfunc="openURL(TQCString, TQCString, WId,int)"; if(_configFile != "kbabelrc" ) { arg << _configFile.utf8(); - callfunc="openURL(QCString, QCString, WId,int,QCString)"; + callfunc="openURL(TQCString, TQCString, WId,int,TQCString)"; } // update the user timestamp for KBabel to get it a focus @@ -729,25 +729,25 @@ void CatalogManager::openFileInNewWindow(QString filename, QString package) } } -void CatalogManager::openTemplate(QString openFilename,QString saveFilename,QString package) +void CatalogManager::openTemplate(TQString openFilename,TQString saveFilename,TQString package) { DCOPClient * client = kapp->dcopClient(); if( startKBabel() ) { - QByteArray data; - QCString url = openFilename.local8Bit(); - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQCString url = openFilename.local8Bit(); + TQDataStream arg(data, IO_WriteOnly); arg << url; url = saveFilename.utf8(); arg << url; arg << package.utf8(); arg << (_openNewWindow ? 1 : 0 ); - QCString callfunc="openTemplate(QCString,QCString,QCString,int)"; + TQCString callfunc="openTemplate(TQCString,TQCString,TQCString,int)"; if(_configFile != "kbabelrc" ) { arg << _configFile.utf8(); - callfunc="openTemplate(QCString,QCString,QCString,int,QCString)"; + callfunc="openTemplate(TQCString,TQCString,TQCString,int,TQCString)"; } // update the user timestamp for KBabel to get it a focus @@ -759,25 +759,25 @@ void CatalogManager::openTemplate(QString openFilename,QString saveFilename,QStr } } -void CatalogManager::openTemplateInNewWindow(QString openFilename,QString saveFilename,QString package) +void CatalogManager::openTemplateInNewWindow(TQString openFilename,TQString saveFilename,TQString package) { DCOPClient * client = kapp->dcopClient(); if( startKBabel() ) { - QByteArray data; - QCString url = openFilename.local8Bit(); - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQCString url = openFilename.local8Bit(); + TQDataStream arg(data, IO_WriteOnly); arg << url; url = saveFilename.utf8(); arg << url; arg << package.utf8(); arg << ((int)1); - QCString callfunc="openTemplate(QCString,QCString,QCString,int)"; + TQCString callfunc="openTemplate(TQCString,TQCString,TQCString,int)"; if(_configFile != "kbabelrc" ) { arg << _configFile.utf8(); - callfunc="openTemplate(QCString,QCString,QCString,int,QCString)"; + callfunc="openTemplate(TQCString,TQCString,TQCString,int,TQCString)"; } // update the user timestamp for KBabel to get it a focus @@ -793,17 +793,17 @@ void CatalogManager::spellcheck() { DCOPClient * client = kapp->dcopClient(); - QStringList fileList = _catalogManager->current(); + TQStringList fileList = _catalogManager->current(); if( startKBabel() ) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << fileList; // update the user timestamp for KBabel to get it a focus kapp->updateRemoteUserTimestamp ("kbabel"); - if( !client->send("kbabel","KBabelIFace", "spellcheck(QStringList)", data) ) + if( !client->send("kbabel","KBabelIFace", "spellcheck(TQStringList)", data) ) KMessageBox::error(this, i18n("Cannot send a message to KBabel.\n" "Please check your installation of KDE.")); } @@ -813,17 +813,17 @@ void CatalogManager::markedSpellcheck() { DCOPClient * client = kapp->dcopClient(); - QStringList fileList = _catalogManager->marked(); + TQStringList fileList = _catalogManager->marked(); if( startKBabel() ) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << fileList; // update the user timestamp for KBabel to get it a focus kapp->updateRemoteUserTimestamp ("kbabel"); - if( !client->send("kbabel","KBabelIFace", "spellcheck(QStringList)", data) ) + if( !client->send("kbabel","KBabelIFace", "spellcheck(TQStringList)", data) ) KMessageBox::error(this, i18n("Cannot send a message to KBabel.\n" "Please check your installation of KDE.")); } @@ -831,8 +831,8 @@ void CatalogManager::markedSpellcheck() bool CatalogManager::startKBabel() { - QCString service; - QString result; + TQCString service; + TQString result; DCOPClient * client = kapp->dcopClient(); @@ -840,7 +840,7 @@ bool CatalogManager::startKBabel() QCStringList apps = client->registeredApplications(); for( QCStringList::Iterator it = apps.begin() ; it != apps.end() ; ++it ) { - QString clientID = *it; + TQString clientID = *it; if( clientID=="kbabel" ) { service = *it; @@ -851,8 +851,8 @@ bool CatalogManager::startKBabel() // if there is no running kbabel, start one if( service.isEmpty() ) { - QString app = "kbabel"; - QString url = ""; + TQString app = "kbabel"; + TQString url = ""; if( kapp->startServiceByDesktopName(app,url, &result, &service)) { KMessageBox::error( this, i18n("Unable to use KLauncher to start KBabel.\n" @@ -866,7 +866,7 @@ bool CatalogManager::startKBabel() } -void CatalogManager::prepareProgressBar(QString msg, int max) +void CatalogManager::prepareProgressBar(TQString msg, int max) { _progressBar->setTotalSteps(max); _progressBar->setProgress(0); @@ -884,7 +884,7 @@ void CatalogManager::clearProgressBar() _progressLabel->hide(); } -void CatalogManager::prepareStatusProgressBar(QString msg, int max) +void CatalogManager::prepareStatusProgressBar(TQString msg, int max) { _totalFound = 0; _foundToBeSent = 0; @@ -932,7 +932,7 @@ void CatalogManager::find() { if( !_findDialog ) _findDialog = new FindInFilesDialog(false,this); - if( _findDialog->exec("") == QDialog::Accepted ) + if( _findDialog->exec("") == TQDialog::Accepted ) { _timerFind->stop(); _searchStopped = false; @@ -946,22 +946,22 @@ void CatalogManager::find() _findOptions = _findDialog->findOpts(); // get from options the information for ignoring text parts - _findOptions.contextInfo = QRegExp( _project->miscSettings().contextInfo ); + _findOptions.contextInfo = TQRegExp( _project->miscSettings().contextInfo ); _findOptions.accelMarker = _project->miscSettings().accelMarker; _foundFilesList.clear(); kdDebug(KBABEL_CATMAN) << "Calling catalogmanagerview::find" << endl; - QString url = _catalogManager->find(_findOptions, _toBeSearched ); + TQString url = _catalogManager->find(_findOptions, _toBeSearched ); if( _catalogManager->isStopped() ) return; if( !url.isEmpty() ) { if( startKBabel() ) { - QCString funcCall("findInFile(QCString,QCString,QString,int,int,int,int,int,int,int,int,int,int)"); + TQCString funcCall("findInFile(TQCString,TQCString,TQString,int,int,int,int,int,int,int,int,int,int)"); DCOPClient *client = kapp->dcopClient(); - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << client->appId(); arg << url.utf8(); arg << _findOptions.findStr; @@ -977,9 +977,9 @@ void CatalogManager::find() arg << (_findOptions.askForSave ? 1 : 0); if(_configFile != "kbabelrc" ) { arg << _configFile.utf8(); - funcCall="findInFile(QCString,QCString,QString,int,int,int,int,int,int,int,int,int,int,QCString)"; + funcCall="findInFile(TQCString,TQCString,TQString,int,int,int,int,int,int,int,int,int,int,TQCString)"; } - kdDebug(KBABEL) << "DCOP: " << QString(data.data()) << endl; + kdDebug(KBABEL) << "DCOP: " << TQString(data.data()) << endl; if( !client->send("kbabel","KBabelIFace", funcCall, data) ) { @@ -1016,7 +1016,7 @@ void CatalogManager::replace() if( !_replaceDialog ) _replaceDialog = new FindInFilesDialog(true,this); - if( _replaceDialog->exec("") == QDialog::Accepted ) + if( _replaceDialog->exec("") == TQDialog::Accepted ) { _timerFind->stop(); _searchStopped = false; @@ -1032,21 +1032,21 @@ void CatalogManager::replace() _findOptions = options; // get from options the information for ignoring text parts - options.contextInfo = QRegExp( _project->miscSettings().contextInfo ); + options.contextInfo = TQRegExp( _project->miscSettings().contextInfo ); options.accelMarker = _project->miscSettings().accelMarker; _foundFilesList.clear(); - QString url = _catalogManager->find(options, _toBeSearched ); + TQString url = _catalogManager->find(options, _toBeSearched ); if( _catalogManager->isStopped() ) return; if( !url.isEmpty() ) { if( startKBabel() ) { - QCString funcCall("replaceInFile(QCString,QCString,QString,QString,int,int,int,int,int,int,int,int,int,int,int)"); + TQCString funcCall("replaceInFile(TQCString,TQCString,TQString,TQString,int,int,int,int,int,int,int,int,int,int,int)"); DCOPClient *client = kapp->dcopClient(); - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << client->appId(); arg << url.utf8(); @@ -1065,7 +1065,7 @@ void CatalogManager::replace() arg << (options.askForSave ? 1 : 0); if(_configFile != "kbabelrc" ) { arg << _configFile.utf8(); - funcCall="replaceInFile(QCString,QCString,QString,QString,int,int,int,int,int,int,int,int,int,int,int,QCString)"; + funcCall="replaceInFile(TQCString,TQCString,TQString,TQString,int,int,int,int,int,int,int,int,int,int,int,TQCString)"; } if( !client->send("kbabel","KBabelIFace", funcCall, data) @@ -1105,7 +1105,7 @@ void CatalogManager::findNextFile() stopSearching(); return; } - QString file = _toBeSearched.first(); + TQString file = _toBeSearched.first(); _toBeSearched.pop_front(); if( PoInfo::findInFile( file, _findOptions ) ) { @@ -1188,11 +1188,11 @@ void CatalogManager::projectNew() KBabel::Project::Ptr p = KBabel::ProjectWizard::newProject(); if( p ) { - disconnect( _project, SIGNAL (signalCatManSettingsChanged()) - , this, SLOT (updateSettings())); + disconnect( _project, TQT_SIGNAL (signalCatManSettingsChanged()) + , this, TQT_SLOT (updateSettings())); _project = p; - connect( _project, SIGNAL (signalCatManSettingsChanged()) - , this, SLOT (updateSettings())); + connect( _project, TQT_SIGNAL (signalCatManSettingsChanged()) + , this, TQT_SLOT (updateSettings())); _configFile = _project->filename(); restoreSettings(); @@ -1204,12 +1204,12 @@ void CatalogManager::projectNew() void CatalogManager::projectOpen() { - QString oldproject = _project->filename(); + TQString oldproject = _project->filename(); if( oldproject == KBabel::ProjectManager::defaultProjectName() ) { - oldproject = QString(); + oldproject = TQString(); } - const QString file = KFileDialog::getOpenFileName(oldproject, QString::null, this); + const TQString file = KFileDialog::getOpenFileName(oldproject, TQString::null, this); if (file.isEmpty()) { return; @@ -1217,11 +1217,11 @@ void CatalogManager::projectOpen() KBabel::Project::Ptr p = KBabel::ProjectManager::open(file); if( p ) { - disconnect( _project, SIGNAL (signalCatManSettingsChanged()) - , this, SLOT (updateSettings())); + disconnect( _project, TQT_SIGNAL (signalCatManSettingsChanged()) + , this, TQT_SLOT (updateSettings())); _project = p; - connect( _project, SIGNAL (signalCatManSettingsChanged()) - , this, SLOT (updateSettings())); + connect( _project, TQT_SIGNAL (signalCatManSettingsChanged()) + , this, TQT_SLOT (updateSettings())); _configFile = p->filename(); restoreSettings(); @@ -1238,11 +1238,11 @@ void CatalogManager::projectOpen() void CatalogManager::projectClose() { - disconnect( _project, SIGNAL (signalCatManSettingsChanged()) - , this, SLOT (updateSettings())); + disconnect( _project, TQT_SIGNAL (signalCatManSettingsChanged()) + , this, TQT_SLOT (updateSettings())); _project = KBabel::ProjectManager::open(KBabel::ProjectManager::defaultProjectName()); - connect( _project, SIGNAL (signalCatManSettingsChanged()) - , this, SLOT (updateSettings())); + connect( _project, TQT_SIGNAL (signalCatManSettingsChanged()) + , this, TQT_SLOT (updateSettings())); _configFile = _project->filename(); restoreSettings(); updateSettings(); @@ -1250,7 +1250,7 @@ void CatalogManager::projectClose() emit settingsChanged(_settings); } -void CatalogManager::changeProjectActions(const QString& project) +void CatalogManager::changeProjectActions(const TQString& project) { bool def = ( project == KBabel::ProjectManager::defaultProjectName() ) ; @@ -1262,8 +1262,8 @@ void CatalogManager::projectConfigure() { KBabel::ProjectDialog* _projectDialog = new ProjectDialog(_project); - connect (_projectDialog, SIGNAL (settingsChanged()) - , this, SLOT (updateSettings())); + connect (_projectDialog, TQT_SIGNAL (settingsChanged()) + , this, TQT_SLOT (updateSettings())); // settings are updated via signals _projectDialog->exec(); diff --git a/kbabel/catalogmanager/catalogmanager.h b/kbabel/catalogmanager/catalogmanager.h index 67f871fa..11927bd7 100644 --- a/kbabel/catalogmanager/catalogmanager.h +++ b/kbabel/catalogmanager/catalogmanager.h @@ -34,18 +34,18 @@ #ifndef CATALOGMANAGER_H #define CATALOGMANAGER_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #include "projectsettings.h" #include "kbproject.h" @@ -71,7 +71,7 @@ class CatalogManager : public KMainWindow { Q_OBJECT public: - CatalogManager(QString configfile = QString() ); + CatalogManager(TQString configfile = TQString() ); ~CatalogManager(); KBabel::CatManSettings settings() const; @@ -82,15 +82,15 @@ public: void setPreferredWindow(WId id); /** updates the file fileWithPath in the @ref CatalogManagerView */ - void updateFile(QString fileWithPath); - void updateAfterSave(QString fileWithPath, KBabel::PoInfo &info); + void updateFile(TQString fileWithPath); + void updateAfterSave(TQString fileWithPath, KBabel::PoInfo &info); CatalogManagerView *view(); void pause(bool flag) { if( _catalogManager ) _catalogManager->pause (flag); } - static QStringList _foundFilesList; - static QStringList _toBeSearched; + static TQStringList _foundFilesList; + static TQStringList _toBeSearched; public slots: /** updates the settings from the project */ @@ -110,13 +110,13 @@ public slots: void projectOpen(); void projectClose(); void projectConfigure(); - void changeProjectActions(const QString& project); + void changeProjectActions(const TQString& project); virtual void clearProgressBar(); - virtual void prepareProgressBar(QString msg, int max); + virtual void prepareProgressBar(TQString msg, int max); virtual void clearStatusProgressBar(); - virtual void prepareStatusProgressBar(QString msg, int max); + virtual void prepareStatusProgressBar(TQString msg, int max); virtual void prepareStatusProgressBar(int max); virtual void setNumberOfFound( int toBeSent, int total ); @@ -137,7 +137,7 @@ private: void restoreView(); void saveView(); - void saveSettings( QString configFile = QString::null ); + void saveSettings( TQString configFile = TQString::null ); void setupActions(); void setupStatusBar(); @@ -150,16 +150,16 @@ private slots: * is used. If this is deleted meanwhile, the first window in * @ref KMainWindow::memberList is used. */ - void openFile(QString filename,QString package); - void openFile(QString filename,QString package, int msgid); - void openFileInNewWindow(QString filename,QString package); + void openFile(TQString filename,TQString package); + void openFile(TQString filename,TQString package, int msgid); + void openFileInNewWindow(TQString filename,TQString package); /** * calls @ref KBabel::openTemplate where as preferred windos _preferredWindow * is used. If this is deleted meanwhile, the first window in * @ref KMainWindow::memberList is used. */ - void openTemplate(QString openFilename,QString saveFileName,QString package); - void openTemplateInNewWindow(QString openFilename,QString saveFileName,QString package); + void openTemplate(TQString openFilename,TQString saveFileName,TQString package); + void openTemplateInNewWindow(TQString openFilename,TQString saveFileName,TQString package); void markedSpellcheck(); void spellcheck(); @@ -187,16 +187,16 @@ private: /// update progress bar KProgress* _progressBar; - QLabel* _progressLabel; + TQLabel* _progressLabel; /// statusbar progress bar KProgress* _statusProgressBar; - QLabel* _statusProgressLabel; - QLabel* _foundLabel; + TQLabel* _statusProgressLabel; + TQLabel* _foundLabel; int _foundToBeSent; int _totalFound; - QTimer* _timerFind; + TQTimer* _timerFind; bool _searchStopped; KBabel::CatManSettings _settings; @@ -207,12 +207,12 @@ private: /// project configuration file - QString _configFile; + TQString _configFile; KBabel::Project::Ptr _project; KConfig* config; - QMap actionMap; + TQMap actionMap; }; #endif // CATALOGMANAGER_H diff --git a/kbabel/catalogmanager/catalogmanagerapp.h b/kbabel/catalogmanager/catalogmanagerapp.h index e0762e5b..3534a516 100644 --- a/kbabel/catalogmanager/catalogmanagerapp.h +++ b/kbabel/catalogmanager/catalogmanagerapp.h @@ -49,8 +49,8 @@ public: CatalogManagerInterface(); virtual void setPreferredWindow( WId id ); - virtual QCString findNextFile(); - virtual void updatedFile( QCString url ); + virtual TQCString findNextFile(); + virtual void updatedFile( TQCString url ); }; class CatalogManagerApp : public KApplication @@ -62,8 +62,8 @@ public: virtual int newInstance(); static void setPreferredWindow( WId id ); - static QCString findNextFile(); - static void updatedFile( QCString url ); + static TQCString findNextFile(); + static void updatedFile( TQCString url ); static WId _preferredWindow; private: CatalogManagerInterface *kbInterface; diff --git a/kbabel/catalogmanager/catalogmanageriface.h b/kbabel/catalogmanager/catalogmanageriface.h index 232a694c..037aa7c0 100644 --- a/kbabel/catalogmanager/catalogmanageriface.h +++ b/kbabel/catalogmanager/catalogmanageriface.h @@ -52,16 +52,16 @@ k_dcop: * Returns a next file containing the searched string. Invoked from * KBabel in case the FindNext() finishes a file and wants to continue in * the next one. - * @returns a URL to the next file, QString:null if there is no more + * @returns a URL to the next file, TQString:null if there is no more * files to be searched or empty string if the search string * is not found yet, but there is more files to be searched in. */ - virtual QCString findNextFile() = 0; + virtual TQCString findNextFile() = 0; /** * If you care about this file, you should update information shown. */ - virtual void updatedFile( QCString url) = 0; + virtual void updatedFile( TQCString url) = 0; }; #endif // CATALOGMANAGERIFACE_H diff --git a/kbabel/catalogmanager/catalogmanagerview.cpp b/kbabel/catalogmanager/catalogmanagerview.cpp index 6bb4c88f..991e1899 100644 --- a/kbabel/catalogmanager/catalogmanagerview.cpp +++ b/kbabel/catalogmanager/catalogmanagerview.cpp @@ -50,10 +50,10 @@ #include "markpatterndialog.h" #include "validationoptions.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -73,15 +73,15 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace KBabel; @@ -98,8 +98,8 @@ const char* columnNames[] = { #define COLTEXT(a) (i18n(columnNames[a])) -CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* parent,const char* name) - : QListView(parent,name) +CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, TQWidget* parent,const char* name) + : TQListView(parent,name) , _dirWatch(0) , _readInfoCount(0) , _active(false) @@ -131,8 +131,8 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa _dictBox = new KBabelDictBox(this, "dictbox"); _dictBox->hide(); - _updateTimer = new QTimer(this); - connect(_updateTimer,SIGNAL(timeout()),this,SLOT(checkUpdate())); + _updateTimer = new TQTimer(this); + connect(_updateTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(checkUpdate())); addColumn(COLTEXT(COL_NAME)); addColumn(COLTEXT(COL_MARKER),25); @@ -143,7 +143,7 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa setColumnAlignment(2,AlignCenter); addColumn(COLTEXT(COL_TOTAL)); setColumnAlignment(3,AlignCenter); - addColumn(QString::null); // CVS/SVN column, header is set later + addColumn(TQString::null); // CVS/SVN column, header is set later addColumn(COLTEXT(COL_REVISION)); addColumn(COLTEXT(COL_TRANSLATOR)); @@ -154,21 +154,21 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa if(KContextMenuManager::showOnButtonPress()) { - connect(this,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint &, int)) - ,this, SLOT(showContentsMenu(QListViewItem*,const QPoint &, int))); + connect(this,TQT_SIGNAL(rightButtonPressed(TQListViewItem*,const TQPoint &, int)) + ,this, TQT_SLOT(showContentsMenu(TQListViewItem*,const TQPoint &, int))); } else { - connect(this,SIGNAL(rightButtonClicked(QListViewItem*,const QPoint &, int)) - ,this, SLOT(showContentsMenu(QListViewItem*,const QPoint &, int))); + connect(this,TQT_SIGNAL(rightButtonClicked(TQListViewItem*,const TQPoint &, int)) + ,this, TQT_SLOT(showContentsMenu(TQListViewItem*,const TQPoint &, int))); } - connect(this, SIGNAL(returnPressed(QListViewItem*)) - ,this, SLOT(activateItem(QListViewItem*))); - connect(this, SIGNAL(doubleClicked(QListViewItem*)) - ,this, SLOT(activateItem(QListViewItem*))); - connect(this,SIGNAL(selectionChanged()),this,SLOT(checkSelected())); - connect( this, SIGNAL( clicked(QListViewItem *, const QPoint &, int)), - this, SLOT( columnClicked(QListViewItem *, const QPoint &, int))); + connect(this, TQT_SIGNAL(returnPressed(TQListViewItem*)) + ,this, TQT_SLOT(activateItem(TQListViewItem*))); + connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*)) + ,this, TQT_SLOT(activateItem(TQListViewItem*))); + connect(this,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(checkSelected())); + connect( this, TQT_SIGNAL( clicked(TQListViewItem *, const TQPoint &, int)), + this, TQT_SLOT( columnClicked(TQListViewItem *, const TQPoint &, int))); _dirCommandsMenu = 0; _fileCommandsMenu = 0; @@ -178,20 +178,20 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa _logWindow = new KDialogBase(0,"log window",false,i18n("Log Window") ,KDialogBase::Close | KDialogBase::User1,KDialogBase::Close); _logWindow->setButtonText(KDialogBase::User1,i18n("C&lear")); - _logWindow->setInitialSize(QSize(300,200)); + _logWindow->setInitialSize(TQSize(300,200)); - QWhatsThis::add(_logWindow,i18n("

Log window

\n" + TQWhatsThis::add(_logWindow,i18n("

Log window

\n" "

In this window the output of " "the executed commands are shown.

")); - _logView = new QTextEdit(_logWindow); + _logView = new TQTextEdit(_logWindow); _logView->setReadOnly(true); _logWindow->setMainWidget(_logView); - connect(_logWindow,SIGNAL(user1Clicked()),_logView,SLOT(clear())); + connect(_logWindow,TQT_SIGNAL(user1Clicked()),_logView,TQT_SLOT(clear())); - QWhatsThis::add(this,i18n("

Catalog Manager

\n" + TQWhatsThis::add(this,i18n("

Catalog Manager

\n" "

The Catalog Manager merges two folders into one tree and displays all\n" "PO and POT files in these folders. This way you can easily see if a\n" "template has been added or removed. Also some information about the files\n" @@ -205,21 +205,21 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa // CVS cvshandler = new CVSHandler( ); - connect( cvshandler, SIGNAL( signalIsPORepository( bool ) ), - this, SLOT( slotValidPOCVSRepository( bool ) ) ); - connect( cvshandler, SIGNAL( signalIsPOTRepository( bool ) ), - this, SLOT( slotValidPOTCVSRepository( bool ) ) ); - connect( cvshandler, SIGNAL( signalFilesCommitted( const QStringList& ) ), - this, SLOT( updateFiles( const QStringList& ) ) ); + connect( cvshandler, TQT_SIGNAL( signalIsPORepository( bool ) ), + this, TQT_SLOT( slotValidPOCVSRepository( bool ) ) ); + connect( cvshandler, TQT_SIGNAL( signalIsPOTRepository( bool ) ), + this, TQT_SLOT( slotValidPOTCVSRepository( bool ) ) ); + connect( cvshandler, TQT_SIGNAL( signalFilesCommitted( const TQStringList& ) ), + this, TQT_SLOT( updateFiles( const TQStringList& ) ) ); // SVN svnhandler = new SVNHandler( ); - connect( svnhandler, SIGNAL( signalIsPORepository( bool ) ), - this, SLOT( slotValidPOSVNRepository( bool ) ) ); - connect( svnhandler, SIGNAL( signalIsPOTRepository( bool ) ), - this, SLOT( slotValidPOTSVNRepository( bool ) ) ); - connect( svnhandler, SIGNAL( signalFilesCommitted( const QStringList& ) ), - this, SLOT( updateFiles( const QStringList& ) ) ); + connect( svnhandler, TQT_SIGNAL( signalIsPORepository( bool ) ), + this, TQT_SLOT( slotValidPOSVNRepository( bool ) ) ); + connect( svnhandler, TQT_SIGNAL( signalIsPOTRepository( bool ) ), + this, TQT_SLOT( slotValidPOTSVNRepository( bool ) ) ); + connect( svnhandler, TQT_SIGNAL( signalFilesCommitted( const TQStringList& ) ), + this, TQT_SLOT( updateFiles( const TQStringList& ) ) ); KConfig *config = KGlobal::config(); restoreView(config); @@ -271,26 +271,26 @@ void CatalogManagerView::restoreView( KConfig *config) _ignoreFuzzy = config->readBoolEntry( "ValidateIgnoreFuzzy", false ); } -void CatalogManagerView::setRMBMenuFile( QPopupMenu *m ) +void CatalogManagerView::setRMBMenuFile( TQPopupMenu *m ) { _fileContentsMenu = m; } -void CatalogManagerView::setRMBMenuDir( QPopupMenu *m ) +void CatalogManagerView::setRMBMenuDir( TQPopupMenu *m ) { _dirContentsMenu = m; } -void CatalogManagerView::setDirCommandsMenu( QPopupMenu *m ) +void CatalogManagerView::setDirCommandsMenu( TQPopupMenu *m ) { _dirCommandsMenu = m; - connect(_dirCommandsMenu,SIGNAL(activated(int)),this,SLOT(slotDirCommand(int))); + connect(_dirCommandsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotDirCommand(int))); } -void CatalogManagerView::setFileCommandsMenu( QPopupMenu *m ) +void CatalogManagerView::setFileCommandsMenu( TQPopupMenu *m ) { _fileCommandsMenu = m; - connect(_fileCommandsMenu,SIGNAL(activated(int)),this,SLOT(slotFileCommand(int))); + connect(_fileCommandsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotFileCommand(int))); } void CatalogManagerView::checkUpdate() @@ -298,7 +298,7 @@ void CatalogManagerView::checkUpdate() _updateNesting++; pause(true); - QDictIterator it( _fileList ); // iterator for dict + TQDictIterator it( _fileList ); // iterator for dict while ( it.current() && !_stop) { @@ -353,24 +353,24 @@ void CatalogManagerView::clear() delete _dirWatch; _dirWatch= new KDirWatch(); - connect(_dirWatch,SIGNAL(deleted(const QString&)),this - ,SLOT(directoryDeleted(const QString&))); - connect(_dirWatch,SIGNAL(dirty(const QString&)),this - ,SLOT(directoryChanged(const QString&))); - connect(_dirWatch,SIGNAL(created(const QString&)),this - ,SLOT(directoryChanged(const QString&))); + connect(_dirWatch,TQT_SIGNAL(deleted(const TQString&)),this + ,TQT_SLOT(directoryDeleted(const TQString&))); + connect(_dirWatch,TQT_SIGNAL(dirty(const TQString&)),this + ,TQT_SLOT(directoryChanged(const TQString&))); + connect(_dirWatch,TQT_SIGNAL(created(const TQString&)),this + ,TQT_SLOT(directoryChanged(const TQString&))); _dirList.clear(); _fileList.clear(); - QListView::clear(); + TQListView::clear(); } void CatalogManagerView::toggleAllMarks() { _markerList.clear(); - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); CatManListItem* item; for ( ; it.current(); ++it ) @@ -397,7 +397,7 @@ void CatalogManagerView::toggleAllMarks() void CatalogManagerView::clearAllMarks() { _markerList.clear(); - QDictIterator it( _fileList ); // iterator for dict + TQDictIterator it( _fileList ); // iterator for dict while ( it.current() ) { @@ -415,7 +415,7 @@ void CatalogManagerView::clearAllMarks() void CatalogManagerView::markModifiedFiles() { - QDictIterator it( _fileList ); + TQDictIterator it( _fileList ); while ( it.current() ) { CatManListItem* item=it.current(); @@ -434,10 +434,10 @@ void CatalogManagerView::markModifiedFiles() void CatalogManagerView::loadMarks() { - const KURL url = KFileDialog::getOpenURL( QString(),"*.marklist", this ); + const KURL url = KFileDialog::getOpenURL( TQString(),"*.marklist", this ); if( url.isEmpty() ) return; - QString filename; + TQString filename; #if KDE_IS_VERSION( 3, 2, 90 ) if (!KIO::NetAccess::download( url, filename, this ) ) #else @@ -450,13 +450,13 @@ void CatalogManagerView::loadMarks() } // now load from file - QStringList newMarkerList; // better create new list in case of problems - QFile f( filename ); + TQStringList newMarkerList; // better create new list in case of problems + TQFile f( filename ); if( f.open( IO_ReadOnly) ) { - QTextStream s(&f); + TQTextStream s(&f); - QString input; + TQString input; s >> input ; if( input == "[Markers]" ) @@ -486,8 +486,8 @@ void CatalogManagerView::loadMarks() KIO::NetAccess::removeTempFile( filename ); // test validity of list items - QStringList testedList; - QStringList::const_iterator it; + TQStringList testedList; + TQStringList::const_iterator it; for( it=newMarkerList.constBegin() ; it!=newMarkerList.constEnd() ; ++it ) if( _fileList[(*it)] != 0 ) testedList.append( (*it) ); @@ -510,13 +510,13 @@ void CatalogManagerView::loadMarks() void CatalogManagerView::saveMarks() { - const KURL url2 = KFileDialog::getSaveURL( QString(), "*.marklist", this ); + const KURL url2 = KFileDialog::getSaveURL( TQString(), "*.marklist", this ); if( url2.isEmpty() ) return; // ### FIXME: why is the file dialog not doing this? if ( KIO::NetAccess::exists( url2, false, this ) ) { - if(KMessageBox::warningContinueCancel(this,QString("%1").arg(i18n("The file %1 already exists. " + if(KMessageBox::warningContinueCancel(this,TQString("%1").arg(i18n("The file %1 already exists. " "Do you want to overwrite it?").arg(url2.prettyURL())),i18n("Warning"),i18n("&Overwrite"))==KMessageBox::Cancel) { return; @@ -531,19 +531,19 @@ void CatalogManagerView::saveMarks() #endif kdDebug() << "Saving marks: " << url2.prettyURL() << " most-local: " << url.prettyURL() << endl; - QFile* file = 0; + TQFile* file = 0; KTempFile* tempFile = 0; - QTextStream* stream = 0; + TQTextStream* stream = 0; bool error = false; const bool localFile = url.isLocalFile(); if ( localFile ) { // We have a local file - file = new QFile( url.path() ); + file = new TQFile( url.path() ); if ( file->open (IO_WriteOnly) ) { - stream = new QTextStream( file ); + stream = new TQTextStream( file ); } else { @@ -561,7 +561,7 @@ void CatalogManagerView::saveMarks() { // ### TODO: try to get a better file format for KDE4 (XML?), one working with real relative paths (no / at start) and working with UTF-8 *stream << "[Markers]" << endl; - for( QStringList::const_iterator it = _markerList.constBegin(); it!=_markerList.constEnd() ; ++it ) + for( TQStringList::const_iterator it = _markerList.constBegin(); it!=_markerList.constEnd() ; ++it ) *stream << (*it) << endl; } if ( error ) @@ -622,20 +622,20 @@ void CatalogManagerView::setPatternMarks(bool mark) if (markPatternDialog->exec( ) != KDialog::Accepted) return; - QRegExp rx(markPatternDialog->pattern( )); + TQRegExp rx(markPatternDialog->pattern( )); rx.setWildcard(!markPatternDialog->useRegExp( )); rx.setCaseSensitive(markPatternDialog->isCaseSensitive( )); - QStringList fileList = item->allChildrenList(true); - for (QStringList::const_iterator it = fileList.constBegin( ); it != fileList.constEnd( ); ++it) { + TQStringList fileList = item->allChildrenList(true); + for (TQStringList::const_iterator it = fileList.constBegin( ); it != fileList.constEnd( ); ++it) { CatManListItem * i = _fileList[*it]; - QString matchName; + TQString matchName; if (i->hasPo( )) matchName = i->poFile( ); else if (i->hasPot( ) && markPatternDialog->includeTemplates( )) matchName = i->potFile( ); - matchName = QFileInfo(matchName).baseName( ); + matchName = TQFileInfo(matchName).baseName( ); if (mark) { if (!matchName.isEmpty( ) && rx.exactMatch(matchName) && !i->marked( )) { @@ -670,7 +670,7 @@ void CatalogManagerView::statistics() } } - QStringList doList; + TQStringList doList; if( i->isFile() ) doList.append(i->package()); else doList = i->allChildrenList(true); @@ -697,13 +697,13 @@ void CatalogManagerView::markedStatistics() } } - QStringList doList; + TQStringList doList; if( i->isFile() ) doList.append(i->package()); else doList = i->allChildrenList(true); - QStringList markedDoList; - QStringList::const_iterator it; + TQStringList markedDoList; + TQStringList::const_iterator it; for( it = doList.constBegin(); it != doList.constEnd(); ++it ) { CatManListItem* item = _fileList[(*it)]; @@ -713,11 +713,11 @@ void CatalogManagerView::markedStatistics() showStatistics( i, markedDoList ); } -void CatalogManagerView::showStatistics( CatManListItem *i, QStringList &childrenList ) +void CatalogManagerView::showStatistics( CatManListItem *i, TQStringList &childrenList ) { KLocale *locale = KGlobal::locale(); - QString msg; + TQString msg; int totalPackages=0; int totalPo=0; int totalNoPot=0; @@ -726,7 +726,7 @@ void CatalogManagerView::showStatistics( CatManListItem *i, QStringList &childr int totalFuzzy=0; int totalUntranslated=0; - QStringList::const_iterator it; + TQStringList::const_iterator it; for( it = childrenList.constBegin(); it != childrenList.constEnd(); ++it ) { CatManListItem* item = _fileList[(*it)]; @@ -764,7 +764,7 @@ void CatalogManagerView::showStatistics( CatManListItem *i, QStringList &childr double percent; - const QString name=i->package(false); + const TQString name=i->package(false); if(name.isEmpty()) msg = i18n("Statistics for all:\n"); else @@ -808,7 +808,7 @@ void CatalogManagerView::checkSyntax() return; Msgfmt::Status status; - QString output; + TQString output; Msgfmt msgfmt; status=msgfmt.checkSyntax(item->poFile(),output); @@ -851,18 +851,18 @@ void CatalogManagerView::checkSyntax() else { Msgfmt::Status status; - QString output; + TQString output; Msgfmt msgfmt; status=msgfmt.checkSyntaxInDir(item->poFile(), "*.po", output); - QString name=item->package(false); + TQString name=item->package(false); switch(status) { case Msgfmt::Ok: { - QString msg; + TQString msg; if(!name.isEmpty()) { msg=i18n("All files in folder %1 are syntactically correct.\n" @@ -878,7 +878,7 @@ void CatalogManagerView::checkSyntax() } case Msgfmt::SyntaxError: { - QString msg; + TQString msg; if(!name.isEmpty()) { msg=i18n("At least one file in folder %1 has syntax errors.\n" @@ -894,7 +894,7 @@ void CatalogManagerView::checkSyntax() } case Msgfmt::HeaderError: { - QString msg; + TQString msg; if(!name.isEmpty()) { msg=i18n("At least one file in folder %1 has header syntax errors.\n" @@ -910,7 +910,7 @@ void CatalogManagerView::checkSyntax() } case Msgfmt::Error: { - QString msg; + TQString msg; if(!name.isEmpty()) { msg=i18n("An error occurred while processing \"msgfmt --statistics *.po\" " @@ -940,12 +940,12 @@ void CatalogManagerView::checkSyntax() void CatalogManagerView::roughTranslation() { - QPtrList result; + TQPtrList result; CatManListItem *current = static_cast(currentItem()); if( current->isDir() ) { - QStringList s = current->allChildrenList(true); - QStringList::const_iterator it; + TQStringList s = current->allChildrenList(true); + TQStringList::const_iterator it; for( it = s.constBegin() ; it != s.constEnd(); ++it ) { CatManListItem *item = _fileList[(*it)]; @@ -966,9 +966,9 @@ void CatalogManagerView::markedRoughTranslation() { if( _markerList.count() == 0 ) return; - QPtrList result; + TQPtrList result; - QStringList::const_iterator it; + TQStringList::const_iterator it; for( it = _markerList.constBegin() ; it != _markerList.constEnd(); ++it ) { CatManListItem *item = _fileList[(*it)]; @@ -984,10 +984,10 @@ void CatalogManagerView::mailFiles() { CatManListItem* item = (CatManListItem*)currentItem(); if(item->isDir()) { - QStringList filesToSend; - QStringList childrenList = item->allChildrenList(true); + TQStringList filesToSend; + TQStringList childrenList = item->allChildrenList(true); - QStringList::const_iterator it; + TQStringList::const_iterator it; for (it = childrenList.constBegin(); it != childrenList.constEnd(); ++it) { CatManListItem* i = _fileList[(*it)]; if (i->hasPo()) { @@ -1007,8 +1007,8 @@ void CatalogManagerView::mailMarkedFiles() if (_markerList.count() == 0) return; - QStringList filesToSend; - QStringList::const_iterator it; + TQStringList filesToSend; + TQStringList::const_iterator it; for (it = _markerList.constBegin(); it != _markerList.constEnd(); ++it) { CatManListItem* i = _fileList[(*it)]; if (i->hasPo()) { @@ -1022,24 +1022,24 @@ void CatalogManagerView::packageFiles( ) { CatManListItem* item = (CatManListItem*)currentItem(); if(item->isDir()) { - QStringList filesToPackage; - QStringList childrenList = item->allChildrenList(true); + TQStringList filesToPackage; + TQStringList childrenList = item->allChildrenList(true); - QStringList::const_iterator it; + TQStringList::const_iterator it; for (it = childrenList.constBegin(); it != childrenList.constEnd(); ++it) { CatManListItem* i = _fileList[(*it)]; if (i->hasPo()) { filesToPackage << i->poFile(); } } - QString packageFileName = KFileDialog::getSaveFileName(QString::null,"*.tar.bz2\n*.tar.gz",this); - mailer->buildArchive( filesToPackage, packageFileName, QString::null, false ); + TQString packageFileName = KFileDialog::getSaveFileName(TQString::null,"*.tar.bz2\n*.tar.gz",this); + mailer->buildArchive( filesToPackage, packageFileName, TQString::null, false ); } else { if (item->hasPo()) { - QStringList fileToPackage(item->poFile()); - QString packageFileName = KFileDialog::getSaveFileName(QString::null,"*.tar.bz2\n*.tar.gz",this); - mailer->buildArchive( fileToPackage, packageFileName, QString::null, false ); + TQStringList fileToPackage(item->poFile()); + TQString packageFileName = KFileDialog::getSaveFileName(TQString::null,"*.tar.bz2\n*.tar.gz",this); + mailer->buildArchive( fileToPackage, packageFileName, TQString::null, false ); } } } @@ -1048,8 +1048,8 @@ void CatalogManagerView::packageMarkedFiles( ) if (_markerList.count() == 0) return; - QStringList filesToPackage; - QStringList::const_iterator it; + TQStringList filesToPackage; + TQStringList::const_iterator it; for (it = _markerList.constBegin(); it != _markerList.constEnd(); ++it) { CatManListItem* i = _fileList[(*it)]; if (i->hasPo()) { @@ -1057,8 +1057,8 @@ void CatalogManagerView::packageMarkedFiles( ) } } - QString packageFileName = KFileDialog::getSaveFileName(QString::null,"*.tar.bz2\n*.tar.gz",this); - mailer->buildArchive( filesToPackage, packageFileName, QString::null, false ); + TQString packageFileName = KFileDialog::getSaveFileName(TQString::null,"*.tar.bz2\n*.tar.gz",this); + mailer->buildArchive( filesToPackage, packageFileName, TQString::null, false ); } // CVS @@ -1122,8 +1122,8 @@ void CatalogManagerView::doCVSCommand( CVS::Command cmd, bool marked, bool templ KSharedConfig* config = _project->sharedConfig(); if ( marked ) { if ( _markerList.isEmpty() ) return; - QStringList fileList; - QStringList::const_iterator it; + TQStringList fileList; + TQStringList::const_iterator it; for ( it = _markerList.constBegin( ); it != _markerList.constEnd( ); ++it ) { CatManListItem * i = _fileList[(*it)]; if ( templates && i->hasPot( ) ) @@ -1133,12 +1133,12 @@ void CatalogManagerView::doCVSCommand( CVS::Command cmd, bool marked, bool templ } cvshandler->execCVSCommand( this, cmd, fileList, templates, config ); } else { - const QString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir ); - QString cvsItem; + const TQString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir ); + TQString cvsItem; CatManListItem * item = (CatManListItem*)currentItem( ); if ( ( cmd == CVS::Commit || cmd == CVS::Diff ) && item->isDir( ) ) { // all children including directories - QStringList cvsItems = item->allChildrenFileList (true, false, true); + TQStringList cvsItems = item->allChildrenFileList (true, false, true); if ( !cvsItems.isEmpty( ) ) cvshandler->execCVSCommand( this, cmd, cvsItems, templates, config ); } else { @@ -1234,8 +1234,8 @@ void CatalogManagerView::doSVNCommand( SVN::Command cmd, bool marked, bool templ KSharedConfig* config = _project->sharedConfig(); if ( marked ) { if ( _markerList.isEmpty() ) return; - QStringList fileList; - QStringList::const_iterator it; + TQStringList fileList; + TQStringList::const_iterator it; for ( it = _markerList.constBegin( ); it != _markerList.constEnd( ); ++it ) { CatManListItem * i = _fileList[(*it)]; if ( templates && i->hasPot( ) ) @@ -1245,12 +1245,12 @@ void CatalogManagerView::doSVNCommand( SVN::Command cmd, bool marked, bool templ } svnhandler->execSVNCommand( this, cmd, fileList, templates, config ); } else { - const QString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir ); - QString svnItem; + const TQString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir ); + TQString svnItem; CatManListItem * item = (CatManListItem*)currentItem( ); if ( ( cmd == SVN::Commit || cmd == SVN::Diff ) && item->isDir( ) ) { // all children including directories - QStringList svnItems = item->allChildrenFileList (true, false, true); + TQStringList svnItems = item->allChildrenFileList (true, false, true); if ( !svnItems.isEmpty( ) ) svnhandler->execSVNCommand( this, cmd, svnItems, templates, config ); } else { @@ -1270,26 +1270,26 @@ void CatalogManagerView::showLog() _logWindow->show(); } -QString CatalogManagerView::find( FindOptions &options, QStringList &rest ) +TQString CatalogManagerView::find( FindOptions &options, TQStringList &rest ) { CatManListItem* i=(CatManListItem*) currentItem(); if(!i || options.inAllFiles) i=(CatManListItem*)_dirList["/"]; - QValueList foundFiles; + TQValueList foundFiles; _stopSearch = false; - const QString search = options.findStr.lower().simplifyWhiteSpace(); - QStringList searchWords = QStringList::split(' ', search); + const TQString search = options.findStr.lower().simplifyWhiteSpace(); + TQStringList searchWords = TQStringList::split(' ', search); - QStringList childrenList; + TQStringList childrenList; if( i->isFile() ) childrenList.append(i->name()); else childrenList =i->allChildrenList(true); emit prepareFindProgressBar(childrenList.size()); - QStringList::const_iterator it; + TQStringList::const_iterator it; for( it = childrenList.constBegin(); it != childrenList.constEnd(); ++it ) { CatManListItem* item = _fileList[(*it)]; @@ -1314,7 +1314,7 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest ) else doSearch = true; // we do not have index, we need to search if( doSearch ) { - QString itemFile; + TQString itemFile; if( options.inTemplates ) { if( item->hasPot() ) itemFile=item->potFile(); @@ -1338,14 +1338,14 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest ) _stopSearch = false; return itemFile; } - const QString foundItemFile = itemFile; + const TQString foundItemFile = itemFile; it++; while( it != childrenList.constEnd() ) { CatManListItem *item = _fileList[(*it)]; - itemFile = QString::null; + itemFile = TQString::null; if( options.inTemplates ) { if( item->hasPot() ) itemFile=item->potFile(); @@ -1353,7 +1353,7 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest ) if( item->hasPo() )itemFile=item->poFile(); } if( options.inMarkedFiles && !item->marked() ) - itemFile=QString::null; + itemFile=TQString::null; if( !itemFile.isNull()) { @@ -1380,23 +1380,23 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest ) _stopSearch = false; rest.clear(); if( _updateNesting == 0 && !_stop ) emit updateFinished(); - return QString::null; + return TQString::null; } } - return QString::null; + return TQString::null; } -bool CatalogManagerView::hasMatchingWords( QStringList &itemWords, QStringList &searchWords) +bool CatalogManagerView::hasMatchingWords( TQStringList &itemWords, TQStringList &searchWords) { - for( QStringList::const_iterator it1 = searchWords.constBegin() ; it1 != searchWords.constEnd() ; ++it1 ) - for( QStringList::const_iterator it2 = itemWords.constBegin() ; it2 != itemWords.constEnd() ; ++it2 ) + for( TQStringList::const_iterator it1 = searchWords.constBegin() ; it1 != searchWords.constEnd() ; ++it1 ) + for( TQStringList::const_iterator it2 = itemWords.constBegin() ; it2 != itemWords.constEnd() ; ++it2 ) if( *it1 == *it2 || (*it1).contains(*it2) || (*it2).contains(*it1) ) return true; return false; } -void CatalogManagerView::showContentsMenu(QListViewItem *i, const QPoint &point, int) +void CatalogManagerView::showContentsMenu(TQListViewItem *i, const TQPoint &point, int) { CatManListItem* item = (CatManListItem*) i; @@ -1427,7 +1427,7 @@ void CatalogManagerView::checkSelected() emit selectedChanged(actionValue); } -void CatalogManagerView::activateItem(QListViewItem *) +void CatalogManagerView::activateItem(TQListViewItem *) { CatManListItem* item=(CatManListItem*) currentItem(); @@ -1471,7 +1471,7 @@ void CatalogManagerView::slotOpenFileInNewWindow() if(item && item->isFile()) { - QString filename; + TQString filename; if(item->hasPo()) { emit openFileInNewWindow(item->poFile(),item->package()); @@ -1499,10 +1499,10 @@ void CatalogManagerView::slotDeleteFile() if(item && item->isFile() && item->hasPo() && !item->hasPot()) { - const QString msg=i18n("Do you really want to delete the file %1?").arg(item->poFile()); + const TQString msg=i18n("Do you really want to delete the file %1?").arg(item->poFile()); if(KMessageBox::warningContinueCancel(this,msg,i18n("Warning"),KGuiItem( i18n("Delete"), "editdelete"))== KMessageBox::Continue) { - if(!QFile::remove(item->poFile())) + if(!TQFile::remove(item->poFile())) { KMessageBox::sorry(this,i18n("Was not able to delete the file %1!").arg(item->poFile())); } @@ -1545,9 +1545,9 @@ void CatalogManagerView::slotToggleMarksInDir() if(i && i->isDir()) { - const QStringList contentList = i->allChildrenList(true); + const TQStringList contentList = i->allChildrenList(true); - QStringList::const_iterator it; + TQStringList::const_iterator it; for( it = contentList.constBegin(); it != contentList.constEnd(); ++it ) { CatManListItem* item = _fileList[(*it)]; @@ -1579,9 +1579,9 @@ void CatalogManagerView::slotClearMarksInDir() if(i && i->isDir()) { - const QStringList contentList=i->contentsList(true); + const TQStringList contentList=i->contentsList(true); - QStringList::const_iterator it; + TQStringList::const_iterator it; for( it = contentList.constBegin(); it != contentList.constEnd(); ++it ) { CatManListItem* item = _fileList[(*it)]; @@ -1608,7 +1608,7 @@ void CatalogManagerView::slotDirCommand(int index) if(index>=0 && item && item->isDir()) { - QString cmd=*(_settings.dirCommands).at(index); + TQString cmd=*(_settings.dirCommands).at(index); cmd.replace("@PACKAGE@",item->name()); cmd.replace("@PODIR@",item->poFile()); cmd.replace("@POTDIR@",item->potFile()); @@ -1620,12 +1620,12 @@ void CatalogManagerView::slotDirCommand(int index) KProcess* proc = new KShellProcess(); _pendingProcesses.append(proc); - connect( proc,SIGNAL( processExited(KProcess *) ), this - ,SLOT( processEnded(KProcess*) ) ); - connect( proc,SIGNAL( receivedStdout(KProcess*,char*,int) ), this - ,SLOT( showOutput(KProcess*,char*,int) ) ); - connect( proc,SIGNAL( receivedStderr(KProcess*,char*,int) ), this - ,SLOT( showOutput(KProcess*,char*,int) ) ); + connect( proc,TQT_SIGNAL( processExited(KProcess *) ), this + ,TQT_SLOT( processEnded(KProcess*) ) ); + connect( proc,TQT_SIGNAL( receivedStdout(KProcess*,char*,int) ), this + ,TQT_SLOT( showOutput(KProcess*,char*,int) ) ); + connect( proc,TQT_SIGNAL( receivedStderr(KProcess*,char*,int) ), this + ,TQT_SLOT( showOutput(KProcess*,char*,int) ) ); *proc << "cd" << item->poFile() << ";" << cmd; proc->start(KProcess::NotifyOnExit,KProcess::AllOutput); @@ -1640,7 +1640,7 @@ void CatalogManagerView::slotFileCommand(int index) { CatManListItem* parent = (CatManListItem*)item->parent(); - QString cmd=*(_settings.fileCommands).at(index); + TQString cmd=*(_settings.fileCommands).at(index); cmd.replace("@PACKAGE@",item->name()); cmd.replace("@POFILE@",item->poFile()); cmd.replace("@POTFILE@",item->potFile()); @@ -1653,12 +1653,12 @@ void CatalogManagerView::slotFileCommand(int index) KProcess* proc = new KShellProcess(); _pendingProcesses.append(proc); - connect( proc,SIGNAL( processExited(KProcess *) ), this - ,SLOT( processEnded(KProcess*) ) ); - connect( proc,SIGNAL( receivedStdout(KProcess*,char*,int) ), this - ,SLOT( showOutput(KProcess*,char*,int) ) ); - connect( proc,SIGNAL( receivedStderr(KProcess*,char*,int) ), this - ,SLOT( showOutput(KProcess*,char*,int) ) ); + connect( proc,TQT_SIGNAL( processExited(KProcess *) ), this + ,TQT_SLOT( processEnded(KProcess*) ) ); + connect( proc,TQT_SIGNAL( receivedStdout(KProcess*,char*,int) ), this + ,TQT_SLOT( showOutput(KProcess*,char*,int) ) ); + connect( proc,TQT_SIGNAL( receivedStderr(KProcess*,char*,int) ), this + ,TQT_SLOT( showOutput(KProcess*,char*,int) ) ); *proc << "cd" << parent->poFile() << ";" << cmd; proc->start(KProcess::NotifyOnExit,KProcess::AllOutput); @@ -1667,9 +1667,9 @@ void CatalogManagerView::slotFileCommand(int index) } -void CatalogManagerView::updateFile(QString fileWithPath, bool force) +void CatalogManagerView::updateFile(TQString fileWithPath, bool force) { - QString relFile; + TQString relFile; if(fileWithPath.startsWith(_settings.poBaseDir)) { relFile=fileWithPath.mid(_settings.poBaseDir.length()); @@ -1704,9 +1704,9 @@ void CatalogManagerView::updateFile(QString fileWithPath, bool force) } -void CatalogManagerView::updateAfterSave(QString fileWithPath, PoInfo &newInfo) +void CatalogManagerView::updateAfterSave(TQString fileWithPath, PoInfo &newInfo) { - QString relFile; + TQString relFile; if(fileWithPath.startsWith(_settings.poBaseDir)) { relFile=fileWithPath.mid(_settings.poBaseDir.length()); @@ -1741,7 +1741,7 @@ void CatalogManagerView::updateAfterSave(QString fileWithPath, PoInfo &newInfo) void CatalogManagerView::buildTree() { // in case we were called after settings update - disconnect( this, SIGNAL( updateFinished() ), this, SLOT(buildTree() ) ); + disconnect( this, TQT_SIGNAL( updateFinished() ), this, TQT_SLOT(buildTree() ) ); emit signalBuildTree(false); // announce start of building @@ -1760,7 +1760,7 @@ void CatalogManagerView::buildTree() _dirList.insert("/",root); //root->setSelectable(false); - QFileInfo fileInfo(_settings.poBaseDir); + TQFileInfo fileInfo(_settings.poBaseDir); if(!fileInfo.isDir()) { KMessageBox::error(this,i18n("You have not specified a valid folder " @@ -1833,7 +1833,7 @@ void CatalogManagerView::buildTree() } // first read information about the files... - QDictIterator it( _fileList ); // iterator for dict + TQDictIterator it( _fileList ); // iterator for dict int i=0; while ( it.current() && !_stop) @@ -1844,7 +1844,7 @@ void CatalogManagerView::buildTree() } // ...then update directories - QDictIterator dit( _dirList ); // iterator for dict + TQDictIterator dit( _dirList ); // iterator for dict while ( dit.current() && !_stop) { @@ -1868,12 +1868,12 @@ void CatalogManagerView::buildTree() } } -bool CatalogManagerView::buildDir(QString relDir,bool fast) +bool CatalogManagerView::buildDir(TQString relDir,bool fast) { if( _stop ) return false; bool haveTemplateDir=true; - QFileInfo fileInfo; + TQFileInfo fileInfo; fileInfo.setFile(_settings.potBaseDir); if(!fileInfo.isDir()) @@ -1891,8 +1891,8 @@ bool CatalogManagerView::buildDir(QString relDir,bool fast) } -bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir - , const QString extension , bool fast) +bool CatalogManagerView::buildDir(const TQString& baseDir,const TQString& relDir + , const TQString extension , bool fast) { if( _stop ) return false; @@ -1905,14 +1905,14 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir return false; } - const QString poBaseDir=_settings.poBaseDir; - const QString potBaseDir=_settings.potBaseDir; + const TQString poBaseDir=_settings.poBaseDir; + const TQString potBaseDir=_settings.potBaseDir; // traverse directory in poBaseDir - QDir dir(baseDir+relDir); - QStringList entryList=dir.entryList("*"+extension,QDir::Files,QDir::Name); + TQDir dir(baseDir+relDir); + TQStringList entryList=dir.entryList("*"+extension,TQDir::Files,TQDir::Name); - QStringList::const_iterator it; + TQStringList::const_iterator it; for ( it = entryList.constBegin(); it != entryList.constEnd() && !_stop ; ++it ) { @@ -1920,8 +1920,8 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir havePoFiles=true; - QString file=relDir+(*it); - file.remove(QRegExp(extension+"$")); + TQString file=relDir+(*it); + file.remove(TQRegExp(extension+"$")); CatManListItem* item = _fileList[file]; if(!item) { @@ -1941,7 +1941,7 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir } } - entryList=dir.entryList(QDir::Dirs,QDir::Name); + entryList=dir.entryList(TQDir::Dirs,TQDir::Name); for ( it = entryList.constBegin(); it != entryList.constEnd() && !_stop ; ++it ) { @@ -1952,7 +1952,7 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir continue; } - QString subDir=relDir+(*it)+"/"; + TQString subDir=relDir+(*it)+"/"; if(!_dirWatch->contains(baseDir+subDir)) { _dirWatch->addDir(baseDir+subDir); @@ -1987,7 +1987,7 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir } -void CatalogManagerView::updateDir(QString relDir) +void CatalogManagerView::updateDir(TQString relDir) { if( _stop ) return; @@ -2002,16 +2002,16 @@ void CatalogManagerView::updateDir(QString relDir) return; } - QStringList contentList = thisItem->contentsList(true); + TQStringList contentList = thisItem->contentsList(true); - const QString poBaseDir=_settings.poBaseDir; - const QString potBaseDir=_settings.potBaseDir; + const TQString poBaseDir=_settings.poBaseDir; + const TQString potBaseDir=_settings.potBaseDir; // first lookup template directory - QDir dir(potBaseDir+relDir); - QStringList entryList=dir.entryList("*.pot",QDir::Files,QDir::Name); + TQDir dir(potBaseDir+relDir); + TQStringList entryList=dir.entryList("*.pot",TQDir::Files,TQDir::Name); - QStringList::const_iterator it; + TQStringList::const_iterator it; for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it ) { @@ -2019,8 +2019,8 @@ void CatalogManagerView::updateDir(QString relDir) havePoFiles=true; - QString file=relDir+(*it); - file.remove(QRegExp(".pot$")); + TQString file=relDir+(*it); + file.remove(TQRegExp(".pot$")); CatManListItem* item = _fileList[file]; if(!item) { @@ -2042,7 +2042,7 @@ void CatalogManagerView::updateDir(QString relDir) contentList.remove(file); } - entryList=dir.entryList(QDir::Dirs,QDir::Name); + entryList=dir.entryList(TQDir::Dirs,TQDir::Name); for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it ) { @@ -2055,7 +2055,7 @@ void CatalogManagerView::updateDir(QString relDir) bool newDirAdded=false; - QString subDir=relDir+(*it)+"/"; + TQString subDir=relDir+(*it)+"/"; if(!_dirWatch->contains(potBaseDir+subDir)) { _dirWatch->addDir(potBaseDir+subDir); @@ -2093,7 +2093,7 @@ void CatalogManagerView::updateDir(QString relDir) // now traverse directory in poBaseDir dir.setPath(poBaseDir+relDir); - entryList=dir.entryList("*.po",QDir::Files,QDir::Name); + entryList=dir.entryList("*.po",TQDir::Files,TQDir::Name); for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it ) { @@ -2101,8 +2101,8 @@ void CatalogManagerView::updateDir(QString relDir) if( _stop ) return; - QString file=relDir+(*it); - file.remove(QRegExp(".po$")); + TQString file=relDir+(*it); + file.remove(TQRegExp(".po$")); CatManListItem* item = _fileList[file]; if(!item) { @@ -2124,7 +2124,7 @@ void CatalogManagerView::updateDir(QString relDir) contentList.remove(file); } - entryList=dir.entryList(QDir::Dirs,QDir::Name); + entryList=dir.entryList(TQDir::Dirs,TQDir::Name); for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it ) { @@ -2137,7 +2137,7 @@ void CatalogManagerView::updateDir(QString relDir) bool newDirAdded=false; - QString subDir=relDir+(*it)+"/"; + TQString subDir=relDir+(*it)+"/"; if(!_dirWatch->contains(poBaseDir+subDir)) { _dirWatch->addDir(poBaseDir+subDir); @@ -2180,11 +2180,11 @@ void CatalogManagerView::updateDir(QString relDir) // but only if we traversed also the template directory if(contentList.count()>0) { - QStringList::const_iterator it; + TQStringList::const_iterator it; for( it = contentList.constBegin(); it != contentList.constEnd(); ++it ) { - QFileInfo po(poBaseDir+(*it)); - QFileInfo pot(potBaseDir+(*it)); + TQFileInfo po(poBaseDir+(*it)); + TQFileInfo pot(potBaseDir+(*it)); if(!po.exists() && !pot.exists()) { @@ -2217,11 +2217,11 @@ void CatalogManagerView::updateDir(QString relDir) } } -void CatalogManagerView::directoryChanged(const QString& dir) +void CatalogManagerView::directoryChanged(const TQString& dir) { pause(true); - QString relDir, relDirPo, relDirPot; + TQString relDir, relDirPo, relDirPot; if(dir.startsWith(_settings.poBaseDir)) { relDirPo=dir.mid(_settings.poBaseDir.length()); @@ -2261,13 +2261,13 @@ void CatalogManagerView::directoryChanged(const QString& dir) kdDebug(KBABEL_CATMAN) << "directory changed: " << relDir << endl; - QFileInfo fileInfo(_settings.potBaseDir); + TQFileInfo fileInfo(_settings.potBaseDir); CatManListItem* thisItem=_dirList[relDir]; if(!thisItem) { // if this item is not in the list search for next existing parent item - QString prevRelDir; + TQString prevRelDir; do { prevRelDir=relDir; @@ -2312,11 +2312,11 @@ void CatalogManagerView::directoryChanged(const QString& dir) } -void CatalogManagerView::directoryDeleted(const QString& dir) +void CatalogManagerView::directoryDeleted(const TQString& dir) { pause(true); - QString relDir, relDirPo, relDirPot; + TQString relDir, relDirPo, relDirPot; if(dir.startsWith(_settings.poBaseDir)) { relDirPo=dir.mid(_settings.poBaseDir.length()); @@ -2371,10 +2371,10 @@ void CatalogManagerView::directoryDeleted(const QString& dir) } else { - QStringList childList = thisItem->contentsList(); + TQStringList childList = thisItem->contentsList(); CatManListItem* item; - QStringList::const_iterator it; + TQStringList::const_iterator it; for( it = childList.constBegin();it != childList.constEnd(); ++it ) { item=_fileList[(*it)]; @@ -2415,7 +2415,7 @@ void CatalogManagerView::directoryDeleted(const QString& dir) pause(false); } -void CatalogManagerView::fileInfoRead( QString filename ) +void CatalogManagerView::fileInfoRead( TQString filename ) { if( _readInfoFileList.find( filename ) != _readInfoFileList.end() ) { emit progress( ++_readInfoCount); @@ -2437,25 +2437,25 @@ void CatalogManagerView::setSettings(CatManSettings newSettings) _dirCommandsMenu->clear(); int counter=0; - for ( QStringList::const_iterator it = _settings.dirCommandNames.constBegin() + for ( TQStringList::const_iterator it = _settings.dirCommandNames.constBegin() ; it != _settings.dirCommandNames.constEnd(); ++it ) { _dirCommandsMenu->insertItem((*it),counter); counter++; } _dirCommandsMenu->insertSeparator(); - _dirCommandsMenu->insertItem(i18n("Log Window"),this,SLOT(showLog())); + _dirCommandsMenu->insertItem(i18n("Log Window"),this,TQT_SLOT(showLog())); _fileCommandsMenu->clear(); counter=0; - for ( QStringList::const_iterator it = _settings.fileCommandNames.constBegin() + for ( TQStringList::const_iterator it = _settings.fileCommandNames.constBegin() ; it != _settings.fileCommandNames.constEnd(); ++it ) { _fileCommandsMenu->insertItem((*it),counter); counter++; } _fileCommandsMenu->insertSeparator(); - _fileCommandsMenu->insertItem(i18n("Log Window"),this,SLOT(showLog())); + _fileCommandsMenu->insertItem(i18n("Log Window"),this,TQT_SLOT(showLog())); const bool pathChanged = (oldSettings.poBaseDir!=_settings.poBaseDir) || (oldSettings.potBaseDir!=_settings.potBaseDir); @@ -2463,10 +2463,10 @@ void CatalogManagerView::setSettings(CatManSettings newSettings) if(pathChanged) { if( !isActive() ) { - QTimer::singleShot(100,this,SLOT(buildTree())); + TQTimer::singleShot(100,this,TQT_SLOT(buildTree())); } else { stop(); - connect( this, SIGNAL( updateFinished() ), this, SLOT(buildTree() ) ); + connect( this, TQT_SIGNAL( updateFinished() ), this, TQT_SLOT(buildTree() ) ); } } @@ -2487,7 +2487,7 @@ CatManSettings CatalogManagerView::settings() const } -void CatalogManagerView::hideEvent(QHideEvent*) +void CatalogManagerView::hideEvent(TQHideEvent*) { pause(true); @@ -2495,9 +2495,9 @@ void CatalogManagerView::hideEvent(QHideEvent*) _dirWatch->stopScan(); } -void CatalogManagerView::showEvent(QShowEvent*) +void CatalogManagerView::showEvent(TQShowEvent*) { - QTimer::singleShot(1,this,SLOT(checkUpdate())); + TQTimer::singleShot(1,this,TQT_SLOT(checkUpdate())); pause(false); @@ -2505,15 +2505,15 @@ void CatalogManagerView::showEvent(QShowEvent*) _dirWatch->startScan(true); } -void CatalogManagerView::contentsMousePressEvent(QMouseEvent* event) +void CatalogManagerView::contentsMousePressEvent(TQMouseEvent* event) { if(event->button() == LeftButton) _pressPos=event->pos(); - QListView::contentsMousePressEvent( event ); + TQListView::contentsMousePressEvent( event ); } -void CatalogManagerView::contentsMouseMoveEvent(QMouseEvent* event) +void CatalogManagerView::contentsMouseMoveEvent(TQMouseEvent* event) { if(event->state() & LeftButton) { @@ -2526,29 +2526,29 @@ void CatalogManagerView::contentsMouseMoveEvent(QMouseEvent* event) { // always add the po-file and if existing the pot-file to the drag and // let the user decide what to do, when dropping into kbabel - QStrList uri; - uri.append(QUriDrag::localFileToUri(item->poFile())); + TQStrList uri; + uri.append(TQUriDrag::localFileToUri(item->poFile())); if(item->hasPot()) - uri.append(QUriDrag::localFileToUri(item->potFile())); + uri.append(TQUriDrag::localFileToUri(item->potFile())); - QUriDrag* drag = new QUriDrag(uri,this); - QPixmap icon=KGlobal::iconLoader()->loadIcon("txt",KIcon::Desktop); - drag->setPixmap(icon,QPoint(icon.width()/2,icon.height()/2)); + TQUriDrag* drag = new TQUriDrag(uri,this); + TQPixmap icon=KGlobal::iconLoader()->loadIcon("txt",KIcon::Desktop); + drag->setPixmap(icon,TQPoint(icon.width()/2,icon.height()/2)); drag->drag(); } else { - QListView::contentsMouseMoveEvent(event); + TQListView::contentsMouseMoveEvent(event); } } else { - QListView::contentsMouseMoveEvent(event); + TQListView::contentsMouseMoveEvent(event); } } else { - QListView::contentsMouseMoveEvent(event); + TQListView::contentsMouseMoveEvent(event); } } @@ -2568,7 +2568,7 @@ void CatalogManagerView::saveMarker( KConfig* config) const } -void CatalogManagerView::deleteDirItem(QString relDir) +void CatalogManagerView::deleteDirItem(TQString relDir) { CatManListItem* thisItem=_dirList[relDir]; @@ -2577,9 +2577,9 @@ void CatalogManagerView::deleteDirItem(QString relDir) _dirList.remove(relDir); - QStringList childList = thisItem->allChildrenList(); + TQStringList childList = thisItem->allChildrenList(); - QStringList::const_iterator it; + TQStringList::const_iterator it; for( it = childList.constBegin();it != childList.constEnd(); ++it ) { if(!_fileList.remove((*it))) @@ -2601,12 +2601,12 @@ void CatalogManagerView::processEnded(KProcess* proc) void CatalogManagerView::showOutput(KProcess*, char *buffer, int buflen) { - const QCString output(buffer,buflen+1); + const TQCString output(buffer,buflen+1); _logView->insert(output); } -void CatalogManagerView::columnClicked(QListViewItem * item, const QPoint &, int c) +void CatalogManagerView::columnClicked(TQListViewItem * item, const TQPoint &, int c) { if( item && c == COL_MARKER ) { @@ -2878,14 +2878,14 @@ void CatalogManagerView::gotoPreviousMarked() } } -QStringList CatalogManagerView::current() +TQStringList CatalogManagerView::current() { - QStringList result; + TQStringList result; CatManListItem *current = static_cast(currentItem()); if( current->isDir() ) { - QStringList s = current->allChildrenList(true); - QStringList::const_iterator it; + TQStringList s = current->allChildrenList(true); + TQStringList::const_iterator it; for( it = s.constBegin() ; it != s.constEnd(); ++it ) { CatManListItem *item = _fileList[(*it)]; @@ -2899,11 +2899,11 @@ QStringList CatalogManagerView::current() return result; } -QStringList CatalogManagerView::marked() +TQStringList CatalogManagerView::marked() { - QStringList result; + TQStringList result; - QStringList::const_iterator it; + TQStringList::const_iterator it; for( it = _markerList.constBegin() ; it != _markerList.constEnd(); ++it ) { CatManListItem *item = _fileList[(*it)]; @@ -2943,9 +2943,9 @@ void CatalogManagerView::updateCurrent() } } -void CatalogManagerView::updateFiles( const QStringList& files ) +void CatalogManagerView::updateFiles( const TQStringList& files ) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = files.constBegin( ); it != files.constEnd( ); ++it ) { updateFile( *it, true ); } @@ -2961,14 +2961,14 @@ SVNHandler * CatalogManagerView::svnHandler( ) return svnhandler; } -void CatalogManagerView::validateUsingTool( const KDataToolInfo &tool, const QString& command ) +void CatalogManagerView::validateUsingTool( const KDataToolInfo &tool, const TQString& command ) { - QStringList result; + TQStringList result; CatManListItem *current = static_cast(currentItem()); if( current->isDir() ) { - const QStringList s = current->allChildrenList(true); - QStringList::const_iterator it; + const TQStringList s = current->allChildrenList(true); + TQStringList::const_iterator it; for( it = s.constBegin() ; it != s.constEnd(); ++it ) { CatManListItem *item = _fileList[(*it)]; @@ -2983,12 +2983,12 @@ void CatalogManagerView::validateUsingTool( const KDataToolInfo &tool, const QSt validate_internal( result, tool, command ); } -void CatalogManagerView::validateMarkedUsingTool( const KDataToolInfo &tool, const QString& command ) +void CatalogManagerView::validateMarkedUsingTool( const KDataToolInfo &tool, const TQString& command ) { validate_internal( _markerList, tool, command ); } -void CatalogManagerView::validate_internal( const QStringList& files, const KDataToolInfo &tool, const QString& ) +void CatalogManagerView::validate_internal( const TQStringList& files, const KDataToolInfo &tool, const TQString& ) { if( files.isEmpty() ) return; @@ -3015,7 +3015,7 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat _validateOptions->ignoreFuzzy->setChecked( _ignoreFuzzy ); } - if( _validateOptionsDlg->exec() != QDialog::Accepted ) + if( _validateOptionsDlg->exec() != TQDialog::Accepted ) { delete t; @@ -3025,8 +3025,8 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat if( !_validateDialog ) { _validateDialog = new ValidateProgressDialog(_settings.ignoreURL, this); - connect( _validateDialog, SIGNAL( errorDoubleClicked(const QString,const int)), - this, SLOT(showError( const QString, const int ))); + connect( _validateDialog, TQT_SIGNAL( errorDoubleClicked(const TQString,const int)), + this, TQT_SLOT(showError( const TQString, const int ))); } _markAsFuzzy = _validateOptions->markAsFuzzy->isChecked(); @@ -3035,9 +3035,9 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat _validateDialog->setMarkAsFuzzy(_markAsFuzzy); _validateDialog->setIgnoreFuzzy(_ignoreFuzzy); - QPtrList fileitems; + TQPtrList fileitems; - for( QValueListConstIterator it=files.begin() ; it!=files.end() ; ++it ) + for( TQValueListConstIterator it=files.begin() ; it!=files.end() ; ++it ) { CatManListItem* item=_fileList[ (*it) ]; if( item ) { @@ -3050,7 +3050,7 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat delete t; } -void CatalogManagerView::showError( const QString package, const int num ) +void CatalogManagerView::showError( const TQString package, const int num ) { CatManListItem* item = _fileList[ package]; if( !item ) @@ -3064,9 +3064,9 @@ void CatalogManagerView::showError( const QString package, const int num ) void CatalogManagerView::updateMarkerList() { - QStringList newMarkers; + TQStringList newMarkers; - for( QStringList::const_iterator it = _markerList.constBegin(); it != _markerList.constEnd(); ++it ) { + for( TQStringList::const_iterator it = _markerList.constBegin(); it != _markerList.constEnd(); ++it ) { if( _fileList[ (*it) ] ) newMarkers.append( (*it) ); } diff --git a/kbabel/catalogmanager/catalogmanagerview.h b/kbabel/catalogmanager/catalogmanagerview.h index e4421973..9c93d195 100644 --- a/kbabel/catalogmanager/catalogmanagerview.h +++ b/kbabel/catalogmanager/catalogmanagerview.h @@ -35,17 +35,17 @@ #ifndef CATALOGMANAGERVIEW_H #define CATALOGMANAGERVIEW_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include -#include +#include #include "kbproject.h" #include "projectsettings.h" @@ -78,7 +78,7 @@ class CatalogManagerView : public QListView { Q_OBJECT public: - CatalogManagerView(KBabel::Project::Ptr project, QWidget* parent=0, const char* name=0); + CatalogManagerView(KBabel::Project::Ptr project, TQWidget* parent=0, const char* name=0); virtual ~CatalogManagerView(); KBabel::CatManSettings settings() const; @@ -89,9 +89,9 @@ public: void pause(bool); /** if file fileWithPath exists in the treeview, this is updated */ - void updateFile(QString fileWithPath, bool force = false); + void updateFile(TQString fileWithPath, bool force = false); - void updateAfterSave(QString fileWithPath, KBabel::PoInfo &info); + void updateAfterSave(TQString fileWithPath, KBabel::PoInfo &info); bool isActive() const {return _active;} bool isStopped() const {return _stop;} @@ -99,10 +99,10 @@ public: void restoreView(KConfig *config); void saveView(KConfig *config) const; - void setRMBMenuFile( QPopupMenu *m); - void setRMBMenuDir( QPopupMenu *m); - void setDirCommandsMenu( QPopupMenu *m); - void setFileCommandsMenu( QPopupMenu *m); + void setRMBMenuFile( TQPopupMenu *m); + void setRMBMenuDir( TQPopupMenu *m); + void setDirCommandsMenu( TQPopupMenu *m); + void setFileCommandsMenu( TQPopupMenu *m); CVSHandler * cvsHandler(); SVNHandler * svnHandler(); @@ -184,7 +184,7 @@ public slots: void svnInfo(); void svnInfoMarked(); - QString find(KBabel::FindOptions &options, QStringList &rest); + TQString find(KBabel::FindOptions &options, TQStringList &rest); void showLog(); @@ -193,7 +193,7 @@ public slots: /** * Stop searching, do not try to proceed to the next file * @ref @find will return clear list of rest to be searched - * and @ref QString::null, if search string was not is the last searched file + * and @ref TQString::null, if search string was not is the last searched file */ void stopSearch(); @@ -201,7 +201,7 @@ public slots: * Information for this file has been read. If the file is in * @ref @_readInfoFileList, it will update progress bar by emitting @ref @progress */ - void fileInfoRead( QString file ); + void fileInfoRead( TQString file ); void gotoNextUntranslated(); void gotoPreviousUntranslated(); @@ -218,10 +218,10 @@ public slots: void gotoNextMarked(); void gotoPreviousMarked(); - void validateUsingTool( const KDataToolInfo &, const QString& ); - void validateMarkedUsingTool( const KDataToolInfo &, const QString& ); + void validateUsingTool( const KDataToolInfo &, const TQString& ); + void validateMarkedUsingTool( const KDataToolInfo &, const TQString& ); - void showError( const QString package, const int num); + void showError( const TQString package, const int num); void updateCurrent(); @@ -230,33 +230,33 @@ public slots: * after 'cvs commit' or 'svn commit' the file contents have not changed * but the CVS/SVN file status could have changed. */ - void updateFiles( const QStringList& files ); + void updateFiles( const TQStringList& files ); /** * Returns the list of all currently selected files. If current selection is dir, * it returns list of all its children. */ - QStringList current(); + TQStringList current(); /** * Returns the list of all currently marked files. */ - QStringList marked(); + TQStringList marked(); signals: - void openFile(QString filename,QString package); - void openFileInNewWindow(QString filename,QString package); - void openTemplate(QString openFilename,QString saveFileName,QString package); - void openTemplateInNewWindow(QString openFilename,QString saveFileName,QString package); - void gotoFileEntry(QString filename,QString package,int msgid); - void prepareProgressBar(QString msg,int max); + void openFile(TQString filename,TQString package); + void openFileInNewWindow(TQString filename,TQString package); + void openTemplate(TQString openFilename,TQString saveFileName,TQString package); + void openTemplateInNewWindow(TQString openFilename,TQString saveFileName,TQString package); + void gotoFileEntry(TQString filename,TQString package,int msgid); + void prepareProgressBar(TQString msg,int max); void progress(int); void clearProgressBar(); void prepareFindProgressBar(int max); void signalBuildTree(bool done); void signalSearchedFile(int count); - void newValidationFile(QString); - void newValidationTool(QString); + void newValidationFile(TQString); + void newValidationTool(TQString); void setValidationProgressBar(int); void advanceValidationFileProgressBar(int); void setMaxValidationProgressBar(int); @@ -284,7 +284,7 @@ protected: * @see CatalogManagerView::buildDir * @see CatalogManagerView::updateDir */ - bool buildDir(QString relDir,bool fast=true); + bool buildDir(TQString relDir,bool fast=true); /** * This function is traversing the real directory on the @@ -297,7 +297,7 @@ protected: * @see CatalogManagerView::buildDir * @see CatalogManagerView::updateDir */ - bool buildDir(const QString& baseDir,const QString& relDir, const QString extension,bool fast=true); + bool buildDir(const TQString& baseDir,const TQString& relDir, const TQString extension,bool fast=true); /** * updates dir relDir and if any new subdir is added @@ -306,27 +306,27 @@ protected: * This function doesn't enters subdirs except when a new subdir is added. * @see CatalogManagerView::buildDir */ - void updateDir(QString relDir); + void updateDir(TQString relDir); /** * stops the update timer and the dirwatch * @see KDirWatch::stop - * @see QTimer::stop + * @see TQTimer::stop */ - virtual void hideEvent(QHideEvent*); + virtual void hideEvent(TQHideEvent*); /** * restarts the update timer and the dirwatch * @see KDirWatch::start - * @see QTimer::start + * @see TQTimer::start */ - virtual void showEvent(QShowEvent*); + virtual void showEvent(TQShowEvent*); /** used for dragging */ - virtual void contentsMousePressEvent(QMouseEvent* e); + virtual void contentsMousePressEvent(TQMouseEvent* e); /** used for dragging */ - virtual void contentsMouseMoveEvent(QMouseEvent* e); + virtual void contentsMouseMoveEvent(TQMouseEvent* e); - void showStatistics( CatManListItem *i, QStringList &packages); + void showStatistics( CatManListItem *i, TQStringList &packages); protected slots: /** rebuilds the tree*/ @@ -338,13 +338,13 @@ protected slots: void checkUpdate(); /** this is called from KDirWatch when a directory has changed */ - void directoryChanged(const QString& dir); + void directoryChanged(const TQString& dir); /** this is called from KDirWatch when a directory has been deleted */ - void directoryDeleted(const QString& dir); + void directoryDeleted(const TQString& dir); - void showContentsMenu(QListViewItem *, const QPoint &, int col); + void showContentsMenu(TQListViewItem *, const TQPoint &, int col); /** does the default action on the currently selected item*/ - void activateItem(QListViewItem *); + void activateItem(TQListViewItem *); /** emits the state of the selected item using selectedChanged*/ void checkSelected(); /** calls @ref activateItem with the selected item as argument*/ @@ -366,7 +366,7 @@ protected slots: private slots: void showOutput(KProcess *proc, char *buffer, int buflen); void processEnded(KProcess *proc); - void columnClicked(QListViewItem * item, const QPoint & pnt, int c); + void columnClicked(TQListViewItem * item, const TQPoint & pnt, int c); void slotToggleCVSOrSVNColumn( bool ); @@ -396,33 +396,33 @@ private: * deletes item with package name (relative directory) relDir * and makes sure, that all subitems are removed from the lists */ - void deleteDirItem(QString relDir); + void deleteDirItem(TQString relDir); - bool hasMatchingWords( QStringList &itemWords, QStringList &searchWords); + bool hasMatchingWords( TQStringList &itemWords, TQStringList &searchWords); CatManListItem *itemBelow( CatManListItem *item ); CatManListItem *itemAbove( CatManListItem *item ); - void validate_internal( const QStringList&, const KDataToolInfo &, const QString& ); + void validate_internal( const TQStringList&, const KDataToolInfo &, const TQString& ); void doCVSCommand( CVS::Command cmd, bool marked = false, bool templates = false ); void doSVNCommand( SVN::Command cmd, bool marked = false, bool templates = false ); private: - QDict _dirList; - QDict _fileList; + TQDict _dirList; + TQDict _fileList; KDirWatch *_dirWatch; - QTimer *_updateTimer; + TQTimer *_updateTimer; // list of files for which was calculated the progress bar for reading file info - QStringList _readInfoFileList; + TQStringList _readInfoFileList; // current count of already read files in @ref @_readInfoFileList. int _readInfoCount; KBabel::CatManSettings _settings; - QStringList _markerList; + TQStringList _markerList; bool _active; // stopping, application quit @@ -431,17 +431,17 @@ private: bool _stopSearch; int _updateNesting; - QPtrList _pendingProcesses; + TQPtrList _pendingProcesses; - QTextEdit* _logView; + TQTextEdit* _logView; KDialogBase* _logWindow; - QPopupMenu* _fileContentsMenu; - QPopupMenu* _dirContentsMenu; - QPopupMenu* _dirCommandsMenu; - QPopupMenu* _fileCommandsMenu; + TQPopupMenu* _fileContentsMenu; + TQPopupMenu* _dirContentsMenu; + TQPopupMenu* _dirCommandsMenu; + TQPopupMenu* _fileCommandsMenu; /** used for starting a drag */ - QPoint _pressPos; + TQPoint _pressPos; KBabelDictBox* _dictBox; diff --git a/kbabel/catalogmanager/catmanlistitem.cpp b/kbabel/catalogmanager/catmanlistitem.cpp index 249cb053..5613a0bd 100644 --- a/kbabel/catalogmanager/catmanlistitem.cpp +++ b/kbabel/catalogmanager/catmanlistitem.cpp @@ -42,29 +42,29 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include using namespace KBabel; -CatManListItem::CatManListItem(CatalogManagerView *view, QListViewItem* parent,QString fullPath,QString fullPotPath,QString package) - : QListViewItem(parent) +CatManListItem::CatManListItem(CatalogManagerView *view, TQListViewItem* parent,TQString fullPath,TQString fullPotPath,TQString package) + : TQListViewItem(parent) { _view = view; init(fullPath,fullPotPath,package); } -CatManListItem::CatManListItem(CatalogManagerView *view, QListView* parent,QString fullPath,QString fullPotPath) - : QListViewItem(parent) +CatManListItem::CatManListItem(CatalogManagerView *view, TQListView* parent,TQString fullPath,TQString fullPotPath) + : TQListViewItem(parent) { - _primary=QFileInfo(fullPath); - _template=QFileInfo(fullPotPath); + _primary=TQFileInfo(fullPath); + _template=TQFileInfo(fullPotPath); _package="/"; _type=Dir; _marked=false; @@ -82,10 +82,10 @@ CatManListItem::CatManListItem(CatalogManagerView *view, QListView* parent,QStri } -void CatManListItem::init(const QString& fullPath, const QString& fullPotPath, const QString& package) +void CatManListItem::init(const TQString& fullPath, const TQString& fullPotPath, const TQString& package) { - _primary=QFileInfo(fullPath); - _template=QFileInfo(fullPotPath); + _primary=TQFileInfo(fullPath); + _template=TQFileInfo(fullPotPath); _package=package; _marked=false; @@ -97,7 +97,7 @@ void CatManListItem::init(const QString& fullPath, const QString& fullPotPath, c _template.setCaching(false); // set - _lastUpdated=QDate(1900,1,1); + _lastUpdated=TQDate(1900,1,1); _wordList.clear(); _wordListUpdated = false; @@ -141,11 +141,11 @@ bool CatManListItem::marked() const void CatManListItem::setOpen(bool open) { bool needWork = needsWork(); - QListViewItem::setOpen(open); + TQListViewItem::setOpen(open); if(open && _type==Dir) { - QPixmap icon; + TQPixmap icon; icon = needWork ? ICON_FOLDER_OPEN_WORK : ICON_FOLDER_OPEN_OK; if(!_template.exists()) @@ -164,7 +164,7 @@ void CatManListItem::setOpen(bool open) } else { - QPixmap icon; + TQPixmap icon; if(needsWork()) icon = ICON_FOLDER_CLOSED_WORK; @@ -181,14 +181,14 @@ void CatManListItem::setOpen(bool open) } -QStringList CatManListItem::allChildrenList(bool onlyFiles) const +TQStringList CatManListItem::allChildrenList(bool onlyFiles) const { - QStringList childrenList; + TQStringList childrenList; CatManListItem * myChild = (CatManListItem*)firstChild(); while( myChild ) { - QString name=myChild->package(); + TQString name=myChild->package(); if(myChild->isFile()) { @@ -209,9 +209,9 @@ QStringList CatManListItem::allChildrenList(bool onlyFiles) const } -QStringList CatManListItem::allChildrenFileList(bool onlyFiles, bool emptyDirs, bool onlyModified) const +TQStringList CatManListItem::allChildrenFileList(bool onlyFiles, bool emptyDirs, bool onlyModified) const { - QStringList childrenList; + TQStringList childrenList; CatManListItem * myChild = (CatManListItem*)firstChild(); while( myChild ) @@ -238,14 +238,14 @@ QStringList CatManListItem::allChildrenFileList(bool onlyFiles, bool emptyDirs, } -QStringList CatManListItem::contentsList(bool onlyFiles) const +TQStringList CatManListItem::contentsList(bool onlyFiles) const { - QStringList childList; + TQStringList childList; CatManListItem * myChild = (CatManListItem*)firstChild(); while( myChild ) { - QString name=myChild->package(); + TQString name=myChild->package(); if(onlyFiles) { @@ -292,10 +292,10 @@ void CatManListItem::checkUpdate(bool noParents) } } -QString CatManListItem::key(int col, bool) const +TQString CatManListItem::key(int col, bool) const { // show directories first - QString key=text(col); + TQString key=text(col); if(col==COL_NAME) { @@ -356,7 +356,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren { if(_primary.isDir()) { - QDir dir=_primary.dir(); + TQDir dir=_primary.dir(); setText(COL_NAME,dir.dirName()); // count the childen numbers @@ -374,15 +374,15 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren ch = static_cast(ch->nextSibling()); } - setText(COL_FUZZY,QString::number(fuzzy)); - setText(COL_UNTRANS,QString::number(untrans)); - setText(COL_TOTAL,QString::number(total)); + setText(COL_FUZZY,TQString::number(fuzzy)); + setText(COL_UNTRANS,TQString::number(untrans)); + setText(COL_TOTAL,TQString::number(total)); //setSelectable(false); _type=Dir; bool needWork = needsWork(); - QPixmap icon; + TQPixmap icon; if(!isOpen()) { if( needWork ) @@ -403,7 +403,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren } else { - QPixmap folder = icon; + TQPixmap folder = icon; icon=paintExclamation(&folder); setPixmap(COL_NAME,folder); @@ -412,18 +412,18 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren else // primary is file { _type=File; - QString name=_primary.fileName(); + TQString name=_primary.fileName(); setText(COL_NAME,name.left(name.length()-3)); if(showPoInfo) { - _lastUpdated=QDateTime::currentDateTime(); + _lastUpdated=TQDateTime::currentDateTime(); bool neededWork=needsWork(); bool needWork=false; PoInfo poInfo; - QPixmap icon = ICON_UPDATING; + TQPixmap icon = ICON_UPDATING; setPixmap(COL_NAME,icon); if ( PoInfo::info( _primary.absFilePath(), poInfo, _wordList, updateWordList, true, true ) == OK ) { @@ -441,7 +441,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren _isModified = cvsHandler->isConsideredModified( cvsFileStatus ) || svnHandler->isConsideredModified( svnFileStatus ); - QString versionControl; + TQString versionControl; if ( cvsFileStatus != CVSHandler::NO_REPOSITORY ) versionControl = cvsHandler->fileStatus( cvsFileStatus ); else if ( svnFileStatus != SVNHandler::NO_REPOSITORY ) @@ -449,9 +449,9 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren else versionControl = i18n("No version control"); - setText(COL_FUZZY,QString::number(poInfo.fuzzy)); - setText(COL_UNTRANS,QString::number(poInfo.untranslated)); - setText(COL_TOTAL,QString::number(poInfo.total)); + setText(COL_FUZZY,TQString::number(poInfo.fuzzy)); + setText(COL_UNTRANS,TQString::number(poInfo.untranslated)); + setText(COL_TOTAL,TQString::number(poInfo.total)); setText( COL_CVS_OR_SVN, versionControl ); setText(COL_REVISION,poInfo.revision); setText(COL_TRANSLATOR,poInfo.lastTranslator); @@ -492,7 +492,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren { if(_template.isDir()) { - QDir dir=_template.dir(); + TQDir dir=_template.dir(); setText(COL_NAME,dir.dirName()); //setSelectable(false); _type=Dir; @@ -508,10 +508,10 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren ch = static_cast(ch->nextSibling()); } - setText(COL_TOTAL,QString::number(total)); + setText(COL_TOTAL,TQString::number(total)); - QPixmap icon; + TQPixmap icon; if(!isOpen()) { icon = ICON_FOLDER_CLOSED_WORK; @@ -527,20 +527,20 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren else { _type=File; - QString name=_primary.fileName(); + TQString name=_primary.fileName(); setText(COL_NAME,name.left(name.length()-3)); if(showPoInfo) { - _lastUpdated=QDateTime::currentDateTime(); + _lastUpdated=TQDateTime::currentDateTime(); // clean previous state information - setText(COL_FUZZY,QString::null); - setText(COL_UNTRANS,QString::null); - setText(COL_TOTAL,QString::null); - setText(COL_CVS_OR_SVN, QString::null); - setText(COL_REVISION, QString::null); - setText(COL_TRANSLATOR, QString::null); + setText(COL_FUZZY,TQString::null); + setText(COL_UNTRANS,TQString::null); + setText(COL_TOTAL,TQString::null); + setText(COL_CVS_OR_SVN, TQString::null); + setText(COL_REVISION, TQString::null); + setText(COL_TRANSLATOR, TQString::null); setPixmap(COL_NAME,ICON_UPDATING); @@ -548,7 +548,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren if ( PoInfo::info( _template.absFilePath(), poInfo, _wordList, false, true, true ) == OK ) { if( _view->isStopped() ) return; - setText(COL_TOTAL,QString::number(poInfo.total)); + setText(COL_TOTAL,TQString::number(poInfo.total)); } if( _view->isStopped() ) return; } @@ -614,21 +614,21 @@ void CatManListItem::updateAfterSave( PoInfo &poInfo ) // primary is existent file _type=File; - QString name=_primary.fileName(); + TQString name=_primary.fileName(); setText(COL_NAME,name.left(name.length()-3)); - _lastUpdated=QDateTime::currentDateTime(); + _lastUpdated=TQDateTime::currentDateTime(); bool neededWork=needsWork(); bool needWork=false; - QPixmap icon; + TQPixmap icon; _hasErrors=false; const CVSHandler::FileStatus cvsFileStatus = _view->cvsHandler()->fstatus(poFile()); const SVNHandler::FileStatus svnFileStatus = _view->svnHandler()->fstatus(poFile()); - QString versionControl; + TQString versionControl; if ( cvsFileStatus != CVSHandler::NO_REPOSITORY ) versionControl = _view->cvsHandler()->fileStatus( cvsFileStatus ); else if ( svnFileStatus != SVNHandler::NO_REPOSITORY ) @@ -636,9 +636,9 @@ void CatManListItem::updateAfterSave( PoInfo &poInfo ) else versionControl = i18n("No version control"); - setText(COL_FUZZY,QString::number(poInfo.fuzzy)); - setText(COL_UNTRANS,QString::number(poInfo.untranslated)); - setText(COL_TOTAL,QString::number(poInfo.total)); + setText(COL_FUZZY,TQString::number(poInfo.fuzzy)); + setText(COL_UNTRANS,TQString::number(poInfo.untranslated)); + setText(COL_TOTAL,TQString::number(poInfo.total)); setText( COL_CVS_OR_SVN, versionControl ); setText(COL_REVISION,poInfo.revision); setText(COL_TRANSLATOR,poInfo.lastTranslator); @@ -777,17 +777,17 @@ bool CatManListItem::isFile() const return type()==File; } -QString CatManListItem::poFile() const +TQString CatManListItem::poFile() const { return _primary.absFilePath(); } -QString CatManListItem::potFile() const +TQString CatManListItem::potFile() const { return _template.absFilePath(); } -QString CatManListItem::package(bool rootSlash) const +TQString CatManListItem::package(bool rootSlash) const { if(rootSlash) return _package; @@ -797,21 +797,21 @@ QString CatManListItem::package(bool rootSlash) const } } -QString CatManListItem::packageDir( ) const +TQString CatManListItem::packageDir( ) const { - return ( _type == Dir ? _package : QString::null ); + return ( _type == Dir ? _package : TQString::null ); } -QString CatManListItem::name() const +TQString CatManListItem::name() const { int index = _package.findRev("/"); return _package.right(_package.length()-index-1); } -QPixmap CatManListItem::paintExclamation(QPixmap* pixmap) +TQPixmap CatManListItem::paintExclamation(TQPixmap* pixmap) { if(!pixmap || pixmap->isNull()) - return QPixmap(0,0); + return TQPixmap(0,0); if(_package=="/" && _template.filePath().isEmpty()) return *pixmap; @@ -827,17 +827,17 @@ QPixmap CatManListItem::paintExclamation(QPixmap* pixmap) int diameter=QMIN(width,height); - QBitmap mask=pixmap->createHeuristicMask(); + TQBitmap mask=pixmap->createHeuristicMask(); - QPainter mp(&mask); - mp.setPen(QPen(Qt::color1,1)); + TQPainter mp(&mask); + mp.setPen(TQPen(Qt::color1,1)); mp.drawEllipse(width-diameter,height-diameter,diameter,diameter); - QPixmap result(width,height); + TQPixmap result(width,height); - QPainter p(&result); + TQPainter p(&result); p.drawPixmap(0,0,*pixmap); - p.setPen( QPen(red,1) ); + p.setPen( TQPen(red,1) ); p.drawEllipse(width-diameter,height-diameter,diameter,diameter); result.setMask(mask); @@ -845,9 +845,9 @@ QPixmap CatManListItem::paintExclamation(QPixmap* pixmap) return result; } -QListViewItem *CatManListItem::previousSibling() +TQListViewItem *CatManListItem::previousSibling() { - QListViewItem * i = parent(); + TQListViewItem * i = parent(); if( !i ) return i; i = i->firstChild(); if( !i ) return i; @@ -856,22 +856,22 @@ QListViewItem *CatManListItem::previousSibling() return i; } -QListViewItem *CatManListItem::lastChild() +TQListViewItem *CatManListItem::lastChild() { - QListViewItem * i = firstChild(); + TQListViewItem * i = firstChild(); if( !i ) return i; while( i->nextSibling() ) i = i->nextSibling(); return i; } -void CatManListItem::checkErrors(KDataTool* tool, QObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy) +void CatManListItem::checkErrors(KDataTool* tool, TQObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy) { bool hasError=false; _errors.clear(); Catalog* cat = new Catalog(); - QObject::connect( cat, SIGNAL( signalProgress(int) ), progressSignalHandler, SIGNAL( setValidationProgressBar(int))); - QObject::connect( cat, SIGNAL( signalResetProgressBar(QString, int) ), progressSignalHandler, SLOT( setupFileProgressBar(QString, int))); + TQObject::connect( cat, TQT_SIGNAL( signalProgress(int) ), progressSignalHandler, TQT_SIGNAL( setValidationProgressBar(int))); + TQObject::connect( cat, TQT_SIGNAL( signalResetProgressBar(TQString, int) ), progressSignalHandler, TQT_SLOT( setupFileProgressBar(TQString, int))); if( cat->openURL(KURL( poFile() )) == OK ) { @@ -887,7 +887,7 @@ void CatManListItem::checkErrors(KDataTool* tool, QObject* progressSignalHandler if( hasError ) { - QString errortext; + TQString errortext; _hasErrors = true; DocPosition dummy; diff --git a/kbabel/catalogmanager/catmanlistitem.h b/kbabel/catalogmanager/catmanlistitem.h index a5f41e2f..00fc3842 100644 --- a/kbabel/catalogmanager/catmanlistitem.h +++ b/kbabel/catalogmanager/catmanlistitem.h @@ -38,10 +38,10 @@ #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include "validateprogress.h" @@ -60,24 +60,24 @@ public: /** the type of this item */ enum Type{File,Dir}; - CatManListItem(CatalogManagerView *view, QListViewItem* parent,QString fullPath - ,QString fullPotPath,QString package); + CatManListItem(CatalogManagerView *view, TQListViewItem* parent,TQString fullPath + ,TQString fullPotPath,TQString package); /** creates the toplevel root item with package name "/" */ - CatManListItem(CatalogManagerView *view, QListView* parent,QString fullPath, QString fullPotPath); + CatManListItem(CatalogManagerView *view, TQListView* parent,TQString fullPath, TQString fullPotPath); /** * returns the package names (including relative path) of the * children of this item */ - QStringList contentsList(bool onlyFiles=false) const; + TQStringList contentsList(bool onlyFiles=false) const; /** * returns the package names of all children of this item * (including all subdirectries) * @param onlyFiles flag, if only the names of files should be returned * @see CatManListItem::contentsList */ - QStringList allChildrenList(bool onlyFiles=false) const; + TQStringList allChildrenList(bool onlyFiles=false) const; /** * returns the relative file names of all children of this item @@ -87,7 +87,7 @@ public: * @param onlyModified, if only modified files should be returned * @see CatManListItem::contentsList */ - QStringList allChildrenFileList(bool onlyFiles=false, bool emptyDirs=false, bool onlyModified=false) const; + TQStringList allChildrenFileList(bool onlyFiles=false, bool emptyDirs=false, bool onlyModified=false) const; void setMarked(bool on); bool marked() const; @@ -110,20 +110,20 @@ public: * @param ignoreFuzzy flag, whether fuzzy messages in the file should be not checked * @param markAsFuzzy flag, whether the error messages should be marked as fuzzy (this alters the PO file) */ - void checkErrors(KDataTool* validator, QObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy); + void checkErrors(KDataTool* validator, TQObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy); /** return the absolute filename of the po-File */ - QString poFile() const; + TQString poFile() const; /** return the absolute filename of the pot-File */ - QString potFile() const; + TQString potFile() const; /** returns the package name (inlcuding relative path to base-directory) */ - QString package(bool rootSlash=true) const; + TQString package(bool rootSlash=true) const; - /** returns the relative path of a dir or QString::null if not a dir. */ - QString packageDir( ) const; + /** returns the relative path of a dir or TQString::null if not a dir. */ + TQString packageDir( ) const; /** returns the package name (without path) */ - QString name() const; + TQString name() const; /** * returns the type of this item @@ -159,25 +159,25 @@ public: * @return true, if there were errors while parsing the file */ bool hasErrors() const {return _hasErrors;} - QValueList errors() const {return _errors;} + TQValueList errors() const {return _errors;} - virtual QString key(int col,bool) const; + virtual TQString key(int col,bool) const; virtual void setOpen(bool); /** paints the marking, if this package has no template */ - QPixmap paintExclamation(QPixmap*); + TQPixmap paintExclamation(TQPixmap*); void updateAfterSave( KBabel::PoInfo &po); - QStringList &wordList() { return _wordList; } + TQStringList &wordList() { return _wordList; } bool wordsUpdated() { return _wordListUpdated; } /** These are not in Qt, so we need to implement it ourselves*/ - QListViewItem *previousSibling(); - QListViewItem *lastChild(); + TQListViewItem *previousSibling(); + TQListViewItem *lastChild(); private: - void init(const QString& fullPath, const QString& fullPotPath,const QString& package); + void init(const TQString& fullPath, const TQString& fullPotPath,const TQString& package); /** * updates the item * @param showPoInfo if true, reads information about the @@ -197,12 +197,12 @@ private: * last updated. This is used to check, if the file * on the disc has changed since last update. */ - QDateTime _lastUpdated; + TQDateTime _lastUpdated; /** the po-file */ - QFileInfo _primary; + TQFileInfo _primary; /** the pot-file */ - QFileInfo _template; + TQFileInfo _template; /** * The package name, includes the relative path beginning * at the base directory. @@ -210,7 +210,7 @@ private: * The root item has the package name "/" * @see CatManListItem::CatManListItem */ - QString _package; + TQString _package; Type _type; bool _marked; @@ -225,13 +225,13 @@ private: /** flag, if the PO-file has a syntax error */ bool _hasErrors; /** a list of errors found by validation tool*/ - QValueList _errors; + TQValueList _errors; /** parent view for this item, used for stopping the activity */ CatalogManagerView *_view; /** index of words, but it does not contain any useful information as values */ - QStringList _wordList; + TQStringList _wordList; bool _wordListUpdated; }; diff --git a/kbabel/catalogmanager/findinfilesdialog.cpp b/kbabel/catalogmanager/findinfilesdialog.cpp index b11a20d8..becffa51 100644 --- a/kbabel/catalogmanager/findinfilesdialog.cpp +++ b/kbabel/catalogmanager/findinfilesdialog.cpp @@ -32,10 +32,10 @@ **************************************************************************** */ #include "findinfilesdialog.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -44,19 +44,19 @@ using namespace KBabel; -FindInFilesDialog::FindInFilesDialog(bool forReplace, QWidget* parent) +FindInFilesDialog::FindInFilesDialog(bool forReplace, TQWidget* parent) :FindDialog(forReplace, parent) { - QGroupBox* box = new QGroupBox(2, Qt::Horizontal, i18n("File Options"), mainWidget()); + TQGroupBox* box = new TQGroupBox(2, Qt::Horizontal, i18n("File Options"), mainWidget()); mainWidget()->layout()->add(box); - _inAllFiles = new QCheckBox(i18n("&In all files"),box); - _inMarked = new QCheckBox(i18n("&Marked files"),box); - _inTemplates = new QCheckBox(i18n("In &templates"),box); - _askForNextFile = new QCheckBox(i18n("Ask before ne&xt file"),box); - _askForSave = new QCheckBox(i18n("Save &without asking"),box); + _inAllFiles = new TQCheckBox(i18n("&In all files"),box); + _inMarked = new TQCheckBox(i18n("&Marked files"),box); + _inTemplates = new TQCheckBox(i18n("In &templates"),box); + _askForNextFile = new TQCheckBox(i18n("Ask before ne&xt file"),box); + _askForSave = new TQCheckBox(i18n("Save &without asking"),box); - QWhatsThis::add(box,i18n("

File Options

" + TQWhatsThis::add(box,i18n("

File Options

" "

Here you can finetune where to find:" "

  • In all files: search in all files, otherwise searched " "is the selected file or files in the selected folder
  • " @@ -71,14 +71,14 @@ FindInFilesDialog::~FindInFilesDialog() saveSettings(); } -int FindInFilesDialog::show(QString initialStr) +int FindInFilesDialog::show(TQString initialStr) { FindDialog::show(initialStr); int r = result(); - if( r == QDialog::Accepted ) { + if( r == TQDialog::Accepted ) { if( isReplaceDialog() ) { ReplaceOptions options = replaceOpts(); options.inAllFiles = _inAllFiles->isChecked(); @@ -102,13 +102,13 @@ int FindInFilesDialog::show(QString initialStr) return r; } -int FindInFilesDialog::exec(QString initialStr) +int FindInFilesDialog::exec(TQString initialStr) { FindDialog::exec(initialStr); int r = result(); - if( r == QDialog::Accepted ) { + if( r == TQDialog::Accepted ) { if(isReplaceDialog()) { ReplaceOptions options = replaceOpts(); options.inAllFiles = _inAllFiles->isChecked(); diff --git a/kbabel/catalogmanager/findinfilesdialog.h b/kbabel/catalogmanager/findinfilesdialog.h index fd25f845..608e78e0 100644 --- a/kbabel/catalogmanager/findinfilesdialog.h +++ b/kbabel/catalogmanager/findinfilesdialog.h @@ -46,7 +46,7 @@ public: * Constructor * @param replaceDlg flag, if this is a replace dialog */ - FindInFilesDialog(bool replaceDlg, QWidget* parent); + FindInFilesDialog(bool replaceDlg, TQWidget* parent); ~FindInFilesDialog(); /** @@ -56,7 +56,7 @@ public: * * @return the result code of the dialog */ - int show(QString initialStr); + int show(TQString initialStr); /** * executes the dialog as modal @@ -65,7 +65,7 @@ public: * * @return the result code of the dialog */ - int exec(QString initialStr); + int exec(TQString initialStr); void setFindOpts(KBabel::FindOptions options); void setReplaceOpts(KBabel::ReplaceOptions options); @@ -75,11 +75,11 @@ protected: void saveSettings(); private: - QCheckBox *_inAllFiles; - QCheckBox *_inTemplates; - QCheckBox *_inMarked; - QCheckBox *_askForNextFile; - QCheckBox *_askForSave; + TQCheckBox *_inAllFiles; + TQCheckBox *_inTemplates; + TQCheckBox *_inMarked; + TQCheckBox *_askForNextFile; + TQCheckBox *_askForSave; }; #endif // FINDDIALOG_H diff --git a/kbabel/catalogmanager/libcvs/cvsdialog.cpp b/kbabel/catalogmanager/libcvs/cvsdialog.cpp index af76d9d0..090b3de3 100644 --- a/kbabel/catalogmanager/libcvs/cvsdialog.cpp +++ b/kbabel/catalogmanager/libcvs/cvsdialog.cpp @@ -33,18 +33,18 @@ // Qt include files -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE include files #include #include @@ -60,16 +60,16 @@ #include "cvsdialog.h" -CVSDialog::CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config ) +CVSDialog::CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config ) : KDialog( parent, "CVSDIALOG", true ), m_config( config ) { _cmd = cmd; p=0L; setCaption( i18n( "CVS Dialog" ) ); - QString temp; + TQString temp; - QVBoxLayout * layout = new QVBoxLayout( this, 6, 6, "MAIN LAYOUT" ); + TQVBoxLayout * layout = new TQVBoxLayout( this, 6, 6, "MAIN LAYOUT" ); // Set the label's text depending on the CVS command. switch ( cmd ) { @@ -86,54 +86,54 @@ CVSDialog::CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config temp = i18n( "Get diff for the following files:" ); break; } - layout->addWidget( new QLabel( temp, this ) ); + layout->addWidget( new TQLabel( temp, this ) ); // Widget for showing the list of files. - filebox = new QListBox( this ); + filebox = new TQListBox( this ); layout->addWidget( filebox ); // Add special widgets for 'cvs commit'. if ( cmd == CVS::Commit ) { - QLabel * label; + TQLabel * label; // Combobox for displaying old log messages. - label = new QLabel( i18n( "&Old messages:" ), this ); - oldMessages = new QComboBox( this ); + label = new TQLabel( i18n( "&Old messages:" ), this ); + oldMessages = new TQComboBox( this ); oldMessages->setDuplicatesEnabled( false ); label->setBuddy( oldMessages ); layout->addWidget( label ); layout->addWidget( oldMessages ); // Textfield for entering a log message. - label = new QLabel( i18n( "&Log message:" ), this ); - logedit = new QTextEdit( this ); + label = new TQLabel( i18n( "&Log message:" ), this ); + logedit = new TQTextEdit( this ); label->setBuddy( logedit ); layout->addWidget( label ); layout->addWidget( logedit ); - label = new QLabel( i18n( "E&ncoding:" ), this ); + label = new TQLabel( i18n( "E&ncoding:" ), this ); m_encodingComboBox = new KComboBox( this ); label->setBuddy( m_encodingComboBox ); layout->addWidget( label ); layout->addWidget( m_encodingComboBox ); - QStringList encodingList; + TQStringList encodingList; // The last encoding will be added at the top of the list, when the seetings will be read. encodingList << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); - encodingList << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( QTextCodec::codecForLocale()->mimeName() ); + encodingList << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->mimeName() ); encodingList += KGlobal::charsets()->descriptiveEncodingNames(); m_encodingComboBox->insertStringList( encodingList ); - connect( oldMessages, SIGNAL( activated( int ) ), - this, SLOT( slotComboActivated( int ) ) ); + connect( oldMessages, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotComboActivated( int ) ) ); } - QHBoxLayout * buttons = new QHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" ); + TQHBoxLayout * buttons = new TQHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" ); // Add special buttons for 'cvs commit'. if ( cmd == CVS::Commit ) { - autoAddBox = new QCheckBox( i18n( "Auto&matically add files if necessary" ), this ); + autoAddBox = new TQCheckBox( i18n( "Auto&matically add files if necessary" ), this ); buttons->addWidget( autoAddBox ); } - buttons->addItem( new QSpacerItem( 1, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); + buttons->addItem( new TQSpacerItem( 1, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ) ); // Set the main button's text depending on the CVS comand. switch ( cmd ) { @@ -150,33 +150,33 @@ CVSDialog::CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config temp = i18n( "&Get Diff" ); break; } - mainBtn = new QPushButton( temp, this ); + mainBtn = new TQPushButton( temp, this ); mainBtn->setDefault( true ); buttons->addWidget( mainBtn ); - cancelBtn = new QPushButton( i18n( "C&ancel" ), this ); + cancelBtn = new TQPushButton( i18n( "C&ancel" ), this ); buttons->addWidget( cancelBtn ); layout->addLayout( buttons ); - QFrame * line = new QFrame( this ); - line->setFrameStyle( QFrame::HLine | QFrame::Sunken ); + TQFrame * line = new TQFrame( this ); + line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); layout->addWidget( line ); - layout->addWidget( new QLabel( i18n( "Command output:" ), this ) ); + layout->addWidget( new TQLabel( i18n( "Command output:" ), this ) ); - output = new QTextEdit( this ); + output = new TQTextEdit( this ); output->setReadOnly( true ); layout->addWidget( output ); - resize( QSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) ); + resize( TQSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) ); if ( cmd == CVS::Commit ) logedit->setFocus( ); readSettings( ); - connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( slotExecuteCommand( ) ) ); - connect( cancelBtn, SIGNAL( clicked( ) ), this, SLOT( reject( ) ) ); + connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotExecuteCommand( ) ) ); + connect( cancelBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( reject( ) ) ); } void CVSDialog::slotComboActivated( int index ) @@ -197,17 +197,17 @@ void CVSDialog::accept( ) KDialog::accept( ); } -void CVSDialog::setFiles( const QStringList& files ) +void CVSDialog::setFiles( const TQStringList& files ) { filebox->insertStringList( files ); } -void CVSDialog::setCommandLine( const QString& command ) +void CVSDialog::setCommandLine( const TQString& command ) { _commandLine = command; } -void CVSDialog::setAddCommand( const QString& command ) +void CVSDialog::setAddCommand( const TQString& command ) { _addCommand = command; } @@ -228,7 +228,7 @@ void CVSDialog::slotExecuteCommand( ) if ( autoAddBox->isChecked( ) && !_addCommand.isEmpty( ) ) _commandLine.prepend( _addCommand ); - const QString msg( logedit->text() ); + const TQString msg( logedit->text() ); if ( msg.isEmpty() ) { @@ -240,7 +240,7 @@ void CVSDialog::slotExecuteCommand( ) } m_encoding = KGlobal::charsets()->encodingForName( m_encodingComboBox->currentText() ); - QTextCodec* codec = QTextCodec::codecForName( m_encoding.utf8() ); + TQTextCodec* codec = TQTextCodec::codecForName( m_encoding.utf8() ); if ( !codec ) { @@ -259,10 +259,10 @@ void CVSDialog::slotExecuteCommand( ) // Write the commit log message from the input field to a temporary file m_tempFile = new KTempFile; m_tempFile->setAutoDelete( true ); - QTextStream* stream = m_tempFile->textStream(); + TQTextStream* stream = m_tempFile->textStream(); if ( !stream ) { - kdError() << "Could not create QTextStream for file " << m_tempFile->name(); + kdError() << "Could not create TQTextStream for file " << m_tempFile->name(); delete m_tempFile; m_tempFile = 0; KMessageBox::error( this, i18n( "Cannot open temporary file for writing. Aborting.") ); @@ -286,7 +286,7 @@ void CVSDialog::slotExecuteCommand( ) // Update the list of log messages if ( !msg.isEmpty() ) { - const QString shortLog = KStringHandler::csqueeze( msg, 80 ); + const TQString shortLog = KStringHandler::csqueeze( msg, 80 ); // Remove the message from the list if it already exists @@ -301,12 +301,12 @@ void CVSDialog::slotExecuteCommand( ) // Set the KProcess' command line. *p << _commandLine; - connect( p, SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, SLOT ( slotProcessStdout( KProcess*, char*, int ) ) ); - connect( p, SIGNAL( receivedStderr( KProcess*, char*, int ) ), - this, SLOT ( slotProcessStderr( KProcess*, char*, int ) ) ); - connect( p, SIGNAL( processExited( KProcess* ) ), - this, SLOT( slotProcessExited( KProcess* ) ) ); + connect( p, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), + this, TQT_SLOT ( slotProcessStdout( KProcess*, char*, int ) ) ); + connect( p, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), + this, TQT_SLOT ( slotProcessStderr( KProcess*, char*, int ) ) ); + connect( p, TQT_SIGNAL( processExited( KProcess* ) ), + this, TQT_SLOT( slotProcessExited( KProcess* ) ) ); output->append( i18n( "[ Starting command ]" ) ); @@ -325,22 +325,22 @@ void CVSDialog::slotExecuteCommand( ) void CVSDialog::slotProcessStdout( KProcess*, char * buffer, int len ) { - output->append( QString::fromLocal8Bit( buffer, len ) ); + output->append( TQString::fromLocal8Bit( buffer, len ) ); // Set the cursor's position at the end of the output. output->setCursorPosition( output->lines( ), 0 ); // If the command is 'cvs status' or 'cvs diff' collect the output of stdout. if ( (_cmd == CVS::Status) || (_cmd == CVS::Diff) ) - _statusOutput += QString::fromLocal8Bit( buffer, len ); + _statusOutput += TQString::fromLocal8Bit( buffer, len ); } void CVSDialog::slotProcessStderr( KProcess*, char * buffer, int len ) { // If an error occurs while executing the command display stderr in // another color. - QColor oldColor( output->color( ) ); + TQColor oldColor( output->color( ) ); output->setColor( Qt::red ); - output->append( QString::fromLocal8Bit( buffer, len ) ); + output->append( TQString::fromLocal8Bit( buffer, len ) ); output->setColor( oldColor ); output->setCursorPosition( output->lines( ), 0 ); } @@ -358,7 +358,7 @@ void CVSDialog::slotProcessExited( KProcess * p ) mainBtn->setText( i18n( "&Show Diff" ) ); else mainBtn->setText( i18n( "&Close" ) ); - connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( accept( ) ) ); + connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( accept( ) ) ); // Reenable the button and the log edit now that the process is finished. mainBtn->setEnabled( true ); @@ -366,7 +366,7 @@ void CVSDialog::slotProcessExited( KProcess * p ) logedit->setEnabled( true ); } -QString CVSDialog::statusOutput( ) +TQString CVSDialog::statusOutput( ) { return _statusOutput; } @@ -383,14 +383,14 @@ void CVSDialog::readSettings( ) m_logMessages.clear(); m_squeezedLogMessages.clear(); for ( int cnt = 0; cnt < 10; cnt++ ) - if ( config->hasKey( QString( "CommitLogMessage%1" ).arg( cnt ) ) ) + if ( config->hasKey( TQString( "CommitLogMessage%1" ).arg( cnt ) ) ) { - const QString logMessage = config->readEntry( QString( "CommitLogMessage%1" ).arg( cnt ) ); + const TQString logMessage = config->readEntry( TQString( "CommitLogMessage%1" ).arg( cnt ) ); if ( !logMessage.isEmpty() ) { // If the message is too long, cut it to 80 characters (or the combo box becomes too wide) // ### FIXME: if the string matches the squeezed 80 chars, it might overwrite another entry - const QString shortLog = KStringHandler::csqueeze( logMessage ); + const TQString shortLog = KStringHandler::csqueeze( logMessage ); m_logMessages.append( logMessage ); m_squeezedLogMessages.append( shortLog ); oldMessages->insertItem( shortLog ); @@ -411,9 +411,9 @@ void CVSDialog::saveSettings( ) // Write the log messages to the config file. int cnt = 0; - QStringList::const_iterator it; + TQStringList::const_iterator it; for ( it = m_logMessages.constBegin( ); it != m_logMessages.constEnd( ) && cnt < 10 ; ++it, ++cnt ) - config->writeEntry( QString( "CommitLogMessage%1" ).arg( cnt ), *it ); + config->writeEntry( TQString( "CommitLogMessage%1" ).arg( cnt ), *it ); config->writeEntry( "CVSEncoding", m_encoding ); } diff --git a/kbabel/catalogmanager/libcvs/cvsdialog.h b/kbabel/catalogmanager/libcvs/cvsdialog.h index 658e9883..1ed312fe 100644 --- a/kbabel/catalogmanager/libcvs/cvsdialog.h +++ b/kbabel/catalogmanager/libcvs/cvsdialog.h @@ -72,30 +72,30 @@ class CVSDialog : public KDialog * Constructor for creating the dialog. * @param cmd The type of command to be executed. */ - CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config ); + CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config ); ~CVSDialog(); /** * Set the list of files which will be used for the CVS command. * @param files The list of files. */ - void setFiles( const QStringList& files ); + void setFiles( const TQStringList& files ); /** * Set the command line for the execution of the CVS command. * @param command The command line. */ - void setCommandLine( const QString& command ); + void setCommandLine( const TQString& command ); /** * Set the command line for adding files to the CVS repository. * This method is only used together with a 'cvs commit' for automatically * adding files which are not yet in the repository. * @param command The command line. */ - void setAddCommand( const QString& command ); + void setAddCommand( const TQString& command ); /** * Return the output of a 'cvs status' command. * @returns The complete output. */ - QString statusOutput( ); + TQString statusOutput( ); protected: /** @@ -123,30 +123,30 @@ class CVSDialog : public KDialog private: CVS::Command _cmd; - QPushButton * mainBtn; - QPushButton * cancelBtn; - QListBox * filebox; - QComboBox * oldMessages; - QTextEdit * logedit; - QTextEdit * output; - QCheckBox * autoAddBox; + TQPushButton * mainBtn; + TQPushButton * cancelBtn; + TQListBox * filebox; + TQComboBox * oldMessages; + TQTextEdit * logedit; + TQTextEdit * output; + TQCheckBox * autoAddBox; KProcess * p; - QString _commandLine; - QString _addCommand; - QString _statusOutput; + TQString _commandLine; + TQString _addCommand; + TQString _statusOutput; /// Log messages (long version) - QStringList m_logMessages; + TQStringList m_logMessages; /// Log messages (short version) - QStringList m_squeezedLogMessages; + TQStringList m_squeezedLogMessages; /// Temporary file (for commits) KTempFile* m_tempFile; /// Encoding for the commit log message - QString m_encoding; + TQString m_encoding; /// Combo box for the encoding KComboBox* m_encodingComboBox; diff --git a/kbabel/catalogmanager/libcvs/cvshandler.cpp b/kbabel/catalogmanager/libcvs/cvshandler.cpp index d3f2ae18..66eeac0a 100644 --- a/kbabel/catalogmanager/libcvs/cvshandler.cpp +++ b/kbabel/catalogmanager/libcvs/cvshandler.cpp @@ -37,12 +37,12 @@ #include #include // Qt include files -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // KDE include files #include #include @@ -52,17 +52,17 @@ #include "cvshandler.h" -CVSHandler::CVSHandler( const QString& poBaseDir, const QString& potBaseDir ) +CVSHandler::CVSHandler( const TQString& poBaseDir, const TQString& potBaseDir ) { setPOBaseDir( poBaseDir ); setPOTBaseDir( potBaseDir ); _autoUpdateTemplates = false; } -void CVSHandler::setPOBaseDir( const QString& dir ) +void CVSHandler::setPOBaseDir( const TQString& dir ) { // check if 'CVS/Entries' exists in the PO base directory - if ( QFileInfo( dir + "/CVS/Entries" ).exists( ) ) { + if ( TQFileInfo( dir + "/CVS/Entries" ).exists( ) ) { _isPORepository = true; _poBaseDir = dir; } else @@ -70,10 +70,10 @@ void CVSHandler::setPOBaseDir( const QString& dir ) emit signalIsPORepository( _isPORepository ); } -void CVSHandler::setPOTBaseDir( const QString& dir ) +void CVSHandler::setPOTBaseDir( const TQString& dir ) { // check if 'CVS/Entries' exists in the POT base directory - if ( QFileInfo( dir + "/CVS/Entries" ).exists( ) ) { + if ( TQFileInfo( dir + "/CVS/Entries" ).exists( ) ) { _isPOTRepository = true; _potBaseDir = dir; } else @@ -81,7 +81,7 @@ void CVSHandler::setPOTBaseDir( const QString& dir ) emit signalIsPOTRepository( _isPOTRepository ); } -QString CVSHandler::fileStatus( const FileStatus status ) const +TQString CVSHandler::fileStatus( const FileStatus status ) const { switch ( status ) { case NO_REPOSITORY: @@ -111,29 +111,29 @@ QString CVSHandler::fileStatus( const FileStatus status ) const } } -CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const +CVSHandler::FileStatus CVSHandler::fstatus( const TQString& filename ) const { // no valid repository if ( !_isPORepository ) return NO_REPOSITORY; - QString fn( filename ); - fn = fn.remove( QRegExp( "/$" ) ); + TQString fn( filename ); + fn = fn.remove( TQRegExp( "/$" ) ); - QFileInfo info( fn ); + TQFileInfo info( fn ); // check if 'CVS/Entries' exists and can be read - QFile entries( info.dir( true ).path( ) + "/CVS/Entries" ); + TQFile entries( info.dir( true ).path( ) + "/CVS/Entries" ); if ( !entries.open( IO_ReadOnly ) ) return NOT_IN_CVS; // we already know that it's a repository // ### FIXME: it does not take care of CVS/Entries.Log // a line in CVS/Entries has the following format: // [D]/NAME/REVISION/[CONFLICT+]TIMESTAMP/OPTIONS/TAGDATE - QRegExp rx( QString( "^D?/%1/" ).arg( info.fileName( ) ) ); + TQRegExp rx( TQString( "^D?/%1/" ).arg( info.fileName( ) ) ); - QString temp; - QTextStream stream( &entries ); + TQString temp; + TQTextStream stream( &entries ); bool isInRepository = false; while ( !stream.atEnd() ) { @@ -149,11 +149,11 @@ CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const if ( !isInRepository ) return NOT_IN_CVS; - const QStringList fields = QStringList::split( '/', temp, true ); + const TQStringList fields = TQStringList::split( '/', temp, true ); // bool isDir = ( fields[0] == "D" ); - const QString cvsname( fields[1] ); - const QString revision( fields[2] ); - const QString timestamp( fields[3] ); + const TQString cvsname( fields[1] ); + const TQString revision( fields[2] ); + const TQString timestamp( fields[3] ); // ignore the other fields for now if ( revision == "0" && timestamp == "dummy timestamp" ) @@ -167,9 +167,9 @@ CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const // calculate the UTC time from the file's last modified date struct stat st; - lstat( QFile::encodeName(fn), &st ); + lstat( TQFile::encodeName(fn), &st ); struct tm * tm_p = gmtime( &st.st_mtime ); - QString ftime = QString( asctime( tm_p ) ); + TQString ftime = TQString( asctime( tm_p ) ); ftime.truncate( ftime.length( ) - 1 ); if ( ftime != timestamp ) return LOCALLY_MODIFIED; @@ -177,12 +177,12 @@ CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const return UP_TO_DATE; } -QString CVSHandler::cvsStatus( const QString& filename ) const +TQString CVSHandler::cvsStatus( const TQString& filename ) const { return map[filename]; } -void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QString& filename, bool templates, KSharedConfig* config ) +void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQString& filename, bool templates, KSharedConfig* config ) { if ( !_isPORepository ) { // This message box should never be visible but who knows... ;-) @@ -191,16 +191,16 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin return; } - QFileInfo info( filename ); + TQFileInfo info( filename ); if ( !info.isDir( ) ) { - execCVSCommand( parent, cmd, QStringList( filename ), templates, config ); + execCVSCommand( parent, cmd, TQStringList( filename ), templates, config ); return; } - // ### FIXME: instead of making a QString, use KProcess directly, so that it cares about quoting. + // ### FIXME: instead of making a TQString, use KProcess directly, so that it cares about quoting. // ### FIXME: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.) // it's a dir - QString command( "cd " + filename + " && cvs " ); + TQString command( "cd " + filename + " && cvs " ); switch ( cmd ) { case CVS::Update: command += "update -dP"; @@ -208,7 +208,7 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin case CVS::Commit: // The cvs client does not care about the encoding, so we cannot set anything here command += "commit -F @LOG@FILE@"; - checkToAdd( QStringList( filename ) ); + checkToAdd( TQStringList( filename ) ); break; case CVS::Status: command += "status"; @@ -218,10 +218,10 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin break; } - showDialog( parent, cmd, QStringList( filename ), command, config ); + showDialog( parent, cmd, TQStringList( filename ), command, config ); } -void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStringList& files, bool templates, KSharedConfig* config ) +void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config ) { if ( !_isPORepository ) { // This message box should never be visible but who knows... ;-) @@ -230,9 +230,9 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin return; } - // ### FIXME: instead of making a QString, use KProcess directly, so that it cares about quoting. + // ### FIXME: instead of making a TQString, use KProcess directly, so that it cares about quoting. // ### FIXME: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.) - QString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && cvs "); + TQString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && cvs "); switch ( cmd ) { case CVS::Update: command += "update -dP"; @@ -249,15 +249,15 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin break; } - QRegExp rx; + TQRegExp rx; if (templates) rx.setPattern(_potBaseDir + "/?"); else rx.setPattern(_poBaseDir + "/?"); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = files.begin( ); it != files.end( ); ++it ) { - QString temp = *it; + TQString temp = *it; temp.remove(rx); command += " \'" + temp + "\'"; } @@ -270,7 +270,7 @@ void CVSHandler::setAutoUpdateTemplates( bool update ) _autoUpdateTemplates = update; } -void CVSHandler::showDialog( QWidget* parent, CVS::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config ) +void CVSHandler::showDialog( TQWidget* parent, CVS::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config ) { CVSDialog * dia = new CVSDialog( cmd, parent, config ); dia->setFiles( files ); @@ -293,30 +293,30 @@ void CVSHandler::showDialog( QWidget* parent, CVS::Command cmd, const QStringLis emit signalFilesCommitted( files ); } -void CVSHandler::checkToAdd( const QStringList& files ) +void CVSHandler::checkToAdd( const TQStringList& files ) { if ( files.isEmpty( ) ) return; - QStringList toBeAdded; + TQStringList toBeAdded; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = files.begin( ); it != files.end( ); ++it ) { // check for every entry if it needs to be added if ( fstatus( *it ) == NOT_IN_CVS ) { - QFileInfo info( *it ); - QString temp; // will hold the dir path + TQFileInfo info( *it ); + TQString temp; // will hold the dir path if ( info.isDir( ) ) { toBeAdded << *it; temp = *it; } else { toBeAdded << *it; - temp = QFileInfo( *it ).dirPath( true ); + temp = TQFileInfo( *it ).dirPath( true ); } // check recursivlely if parent dirs have to be added as well while ( fstatus( temp ) == NOT_IN_CVS && toBeAdded.findIndex( temp ) == -1 ) { toBeAdded << temp; - temp = QFileInfo( temp ).dirPath( true ); + temp = TQFileInfo( temp ).dirPath( true ); } } } @@ -329,36 +329,36 @@ void CVSHandler::checkToAdd( const QStringList& files ) // create a command line for adding the files and dirs for ( it = toBeAdded.begin( ); it != toBeAdded.end( ); ++it ) { - QFileInfo info( *it ); + TQFileInfo info( *it ); _addCommand += "cd " + info.dirPath( true ) + " && cvs add " + info.fileName( ) + "; "; } } -void CVSHandler::processStatusOutput( const QString& status ) +void CVSHandler::processStatusOutput( const TQString& status ) { if ( !_isPORepository ) return; // at first we need to extract the name of the base directory on the server - QFile f( _poBaseDir + "/CVS/Root" ); + TQFile f( _poBaseDir + "/CVS/Root" ); if ( !f.open( IO_ReadOnly ) ) return; - QTextStream stream( &f ); + TQTextStream stream( &f ); // extract the string after the last colon in the first line - QString basedir = stream.readLine( ).section( ':', -1 ); + TQString basedir = stream.readLine( ).section( ':', -1 ); f.close( ); // divide the complete status output in little chunks for every file - QStringList entries = QStringList::split( QRegExp( "={67,67}" ), status ); - QStringList::Iterator it; + TQStringList entries = TQStringList::split( TQRegExp( "={67,67}" ), status ); + TQStringList::Iterator it; for ( it = entries.begin( ); it != entries.end( ); ++it ) { - QString entr = *it; + TQString entr = *it; // translate the filename from repository to local - QRegExp rx( basedir + ".*,v" ); + TQRegExp rx( basedir + ".*,v" ); int pos = entr.find( rx ); - QString file = _poBaseDir + entr.mid( pos + basedir.length( ), + TQString file = _poBaseDir + entr.mid( pos + basedir.length( ), rx.matchedLength( ) - basedir.length( ) - 2 ); entr = "" + entr + ""; @@ -369,16 +369,16 @@ void CVSHandler::processStatusOutput( const QString& status ) } } -void CVSHandler::processDiff( QString output ) +void CVSHandler::processDiff( TQString output ) { - output.remove( QRegExp( "\\[ .* \\]$" )); - output.remove( QRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]"))); + output.remove( TQRegExp( "\\[ .* \\]$" )); + output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]"))); KTempFile tmpFile; *(tmpFile.textStream()) << output; tmpFile.close(); - QString error; + TQString error; if ( KApplication::startServiceByName( "Kompare", tmpFile.name(), &error ) ) KMessageBox::error( 0, error ); } diff --git a/kbabel/catalogmanager/libcvs/cvshandler.h b/kbabel/catalogmanager/libcvs/cvshandler.h index 44777aa3..8157a895 100644 --- a/kbabel/catalogmanager/libcvs/cvshandler.h +++ b/kbabel/catalogmanager/libcvs/cvshandler.h @@ -36,8 +36,8 @@ #define CVSHANDLER_H // Qt include files -#include -#include +#include +#include // Project specific include files #include "cvsdialog.h" #include "cvsresources.h" @@ -69,17 +69,17 @@ class CVSHandler : public QObject UP_TO_DATE }; - CVSHandler( const QString& poBaseDir = QString::null, const QString& potBaseDir = QString::null ); + CVSHandler( const TQString& poBaseDir = TQString::null, const TQString& potBaseDir = TQString::null ); - void setPOBaseDir( const QString& dir ); - void setPOTBaseDir( const QString& dir ); + void setPOBaseDir( const TQString& dir ); + void setPOTBaseDir( const TQString& dir ); - FileStatus fstatus( const QString& filename ) const; - QString fileStatus( const FileStatus status ) const; - QString cvsStatus( const QString& filename ) const; + FileStatus fstatus( const TQString& filename ) const; + TQString fileStatus( const FileStatus status ) const; + TQString cvsStatus( const TQString& filename ) const; - void execCVSCommand( QWidget* parent, CVS::Command cmd, const QString& filename, bool templates, KSharedConfig* config ); - void execCVSCommand( QWidget* parent, CVS::Command cmd, const QStringList& files, bool templates, KSharedConfig* config ); + void execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQString& filename, bool templates, KSharedConfig* config ); + void execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config ); void setAutoUpdateTemplates( bool update ); @@ -91,24 +91,24 @@ class CVSHandler : public QObject signals: void signalIsPORepository( bool ); void signalIsPOTRepository( bool ); - void signalFilesCommitted( const QStringList& ); + void signalFilesCommitted( const TQStringList& ); private: - void showDialog( QWidget* parent, CVS::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config ); - void checkToAdd( const QStringList& files ); - void processStatusOutput( const QString& status ); - void processDiff( QString output ); + void showDialog( TQWidget* parent, CVS::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config ); + void checkToAdd( const TQStringList& files ); + void processStatusOutput( const TQString& status ); + void processDiff( TQString output ); private: - QString _poBaseDir; - QString _potBaseDir; + TQString _poBaseDir; + TQString _potBaseDir; bool _isPORepository; bool _isPOTRepository; bool _autoUpdateTemplates; - QString _addCommand; + TQString _addCommand; /** Mapping the output of 'cvs status' against the filename. */ - QMap map; + TQMap map; }; #endif // CVSHANDLER_H diff --git a/kbabel/catalogmanager/libsvn/svndialog.cpp b/kbabel/catalogmanager/libsvn/svndialog.cpp index 69653591..a6f7d229 100644 --- a/kbabel/catalogmanager/libsvn/svndialog.cpp +++ b/kbabel/catalogmanager/libsvn/svndialog.cpp @@ -33,17 +33,17 @@ // Qt include files -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE include files #include #include @@ -57,16 +57,16 @@ #include "svndialog.h" -SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config ) +SVNDialog::SVNDialog( SVN::Command cmd, TQWidget * parent, KSharedConfig* config ) : KDialog( parent, "SVN DIALOG", true ), m_tempFile( 0 ), m_config( config ) { _cmd = cmd; p=0L; setCaption( i18n( "SVN Dialog" ) ); - QString temp; + TQString temp; - QVBoxLayout * layout = new QVBoxLayout( this, 6, 6, "MAIN LAYOUT" ); + TQVBoxLayout * layout = new TQVBoxLayout( this, 6, 6, "MAIN LAYOUT" ); // Set the label's text depending on the SVN command. switch ( cmd ) { @@ -89,42 +89,42 @@ SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config temp = i18n( "Get information for the following files:" ); break; } - layout->addWidget( new QLabel( temp, this ) ); + layout->addWidget( new TQLabel( temp, this ) ); // Widget for showing the list of files. - filebox = new QListBox( this ); + filebox = new TQListBox( this ); layout->addWidget( filebox ); // Add special widgets for 'svn commit'. if ( cmd == SVN::Commit ) { - QLabel * label; + TQLabel * label; // Combobox for displaying old log messages. - label = new QLabel( i18n( "&Old messages:" ), this ); - oldMessages = new QComboBox( this ); + label = new TQLabel( i18n( "&Old messages:" ), this ); + oldMessages = new TQComboBox( this ); oldMessages->setDuplicatesEnabled( false ); label->setBuddy( oldMessages ); layout->addWidget( label ); layout->addWidget( oldMessages ); // Textfield for entering a log message. - label = new QLabel( i18n( "&Log message:" ), this ); - logedit = new QTextEdit( this ); + label = new TQLabel( i18n( "&Log message:" ), this ); + logedit = new TQTextEdit( this ); label->setBuddy( logedit ); layout->addWidget( label ); layout->addWidget( logedit ); - connect( oldMessages, SIGNAL( activated( int ) ), - this, SLOT( slotComboActivated( int ) ) ); + connect( oldMessages, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotComboActivated( int ) ) ); } - QHBoxLayout * buttons = new QHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" ); + TQHBoxLayout * buttons = new TQHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" ); // Add special buttons for 'svn commit'. if ( cmd == SVN::Commit ) { - autoAddBox = new QCheckBox( i18n( "Auto&matically add files if necessary" ), this ); + autoAddBox = new TQCheckBox( i18n( "Auto&matically add files if necessary" ), this ); buttons->addWidget( autoAddBox ); } - buttons->addItem( new QSpacerItem( 1, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); + buttons->addItem( new TQSpacerItem( 1, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ) ); // Set the main button's text depending on the SVN comand. switch ( cmd ) { @@ -145,33 +145,33 @@ SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config temp = i18n( "&Get Information" ); break; } - mainBtn = new QPushButton( temp, this ); + mainBtn = new TQPushButton( temp, this ); mainBtn->setDefault( true ); buttons->addWidget( mainBtn ); - cancelBtn = new QPushButton( i18n( "C&ancel" ), this ); + cancelBtn = new TQPushButton( i18n( "C&ancel" ), this ); buttons->addWidget( cancelBtn ); layout->addLayout( buttons ); - QFrame * line = new QFrame( this ); - line->setFrameStyle( QFrame::HLine | QFrame::Sunken ); + TQFrame * line = new TQFrame( this ); + line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); layout->addWidget( line ); - layout->addWidget( new QLabel( i18n( "Command output:" ), this ) ); + layout->addWidget( new TQLabel( i18n( "Command output:" ), this ) ); - output = new QTextEdit( this ); + output = new TQTextEdit( this ); output->setReadOnly( true ); layout->addWidget( output ); - resize( QSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) ); + resize( TQSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) ); if ( cmd == SVN::Commit ) logedit->setFocus( ); readSettings( ); - connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( slotExecuteCommand( ) ) ); - connect( cancelBtn, SIGNAL( clicked( ) ), this, SLOT( reject( ) ) ); + connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotExecuteCommand( ) ) ); + connect( cancelBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( reject( ) ) ); } void SVNDialog::slotComboActivated( int index ) @@ -193,17 +193,17 @@ void SVNDialog::accept( ) KDialog::accept( ); } -void SVNDialog::setFiles( const QStringList& files ) +void SVNDialog::setFiles( const TQStringList& files ) { filebox->insertStringList( files ); } -void SVNDialog::setCommandLine( const QString& command ) +void SVNDialog::setCommandLine( const TQString& command ) { _commandLine = command; } -void SVNDialog::setAddCommand( const QString& command ) +void SVNDialog::setAddCommand( const TQString& command ) { _addCommand = command; } @@ -224,7 +224,7 @@ void SVNDialog::slotExecuteCommand( ) if ( autoAddBox->isChecked( ) && !_addCommand.isEmpty( ) ) _commandLine.prepend( _addCommand ); - const QString msg( logedit->text() ); + const TQString msg( logedit->text() ); if ( msg.isEmpty() ) { @@ -238,16 +238,16 @@ void SVNDialog::slotExecuteCommand( ) // Write the commit log message from the input field to a temporary file m_tempFile = new KTempFile; m_tempFile->setAutoDelete( true ); - QTextStream* stream = m_tempFile->textStream(); + TQTextStream* stream = m_tempFile->textStream(); if ( !stream ) { - kdError() << "Could not create QTextStream for file " << m_tempFile->name(); + kdError() << "Could not create TQTextStream for file " << m_tempFile->name(); delete m_tempFile; m_tempFile = 0; KMessageBox::error( this, i18n( "Cannot open temporary file for writing. Aborting.") ); return; } - stream->setEncoding( QTextStream::UnicodeUTF8 ); + stream->setEncoding( TQTextStream::UnicodeUTF8 ); *stream << msg; m_tempFile->close(); @@ -265,7 +265,7 @@ void SVNDialog::slotExecuteCommand( ) // Update the list of log messages if ( !msg.isEmpty() ) { - const QString shortLog = KStringHandler::csqueeze( msg, 80 ); + const TQString shortLog = KStringHandler::csqueeze( msg, 80 ); // Remove the message from the list if it already exists @@ -280,12 +280,12 @@ void SVNDialog::slotExecuteCommand( ) // Set the KProcess' command line. *p << _commandLine; - connect( p, SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, SLOT ( slotProcessStdout( KProcess*, char*, int ) ) ); - connect( p, SIGNAL( receivedStderr( KProcess*, char*, int ) ), - this, SLOT ( slotProcessStderr( KProcess*, char*, int ) ) ); - connect( p, SIGNAL( processExited( KProcess* ) ), - this, SLOT( slotProcessExited( KProcess* ) ) ); + connect( p, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), + this, TQT_SLOT ( slotProcessStdout( KProcess*, char*, int ) ) ); + connect( p, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), + this, TQT_SLOT ( slotProcessStderr( KProcess*, char*, int ) ) ); + connect( p, TQT_SIGNAL( processExited( KProcess* ) ), + this, TQT_SLOT( slotProcessExited( KProcess* ) ) ); output->append( i18n( "[ Starting command ]" ) ); @@ -304,22 +304,22 @@ void SVNDialog::slotExecuteCommand( ) void SVNDialog::slotProcessStdout( KProcess*, char * buffer, int len ) { - output->append( QString::fromLocal8Bit( buffer, len ) ); + output->append( TQString::fromLocal8Bit( buffer, len ) ); // Set the cursor's position at the end of the output. output->setCursorPosition( output->lines( ), 0 ); // If the command is 'svn status' or 'svn diff' collect the output of stdout. if ( ( _cmd == SVN::StatusLocal ) || ( _cmd == SVN::StatusRemote ) || ( _cmd == SVN::Diff ) ) - _statusOutput += QString::fromLocal8Bit( buffer, len ); + _statusOutput += TQString::fromLocal8Bit( buffer, len ); } void SVNDialog::slotProcessStderr( KProcess*, char * buffer, int len ) { // If an error occurs while executing the command display stderr in // another color. - QColor oldColor( output->color( ) ); + TQColor oldColor( output->color( ) ); output->setColor( Qt::red ); - output->append( QString::fromLocal8Bit( buffer, len ) ); + output->append( TQString::fromLocal8Bit( buffer, len ) ); output->setColor( oldColor ); output->setCursorPosition( output->lines( ), 0 ); } @@ -337,7 +337,7 @@ void SVNDialog::slotProcessExited( KProcess * p ) mainBtn->setText( i18n( "&Show Diff" ) ); else mainBtn->setText( i18n( "&Close" ) ); - connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( accept( ) ) ); + connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( accept( ) ) ); // Reenable the button and the log edit now that the process is finished. mainBtn->setEnabled( true ); @@ -345,7 +345,7 @@ void SVNDialog::slotProcessExited( KProcess * p ) logedit->setEnabled( true ); } -QString SVNDialog::statusOutput( ) +TQString SVNDialog::statusOutput( ) { return _statusOutput; } @@ -362,14 +362,14 @@ void SVNDialog::readSettings( ) m_logMessages.clear(); m_squeezedLogMessages.clear(); for ( int cnt = 0; cnt < 10; cnt++ ) - if ( config->hasKey( QString( "CommitLogMessage%1" ).arg( cnt ) ) ) + if ( config->hasKey( TQString( "CommitLogMessage%1" ).arg( cnt ) ) ) { - const QString logMessage = config->readEntry( QString( "CommitLogMessage%1" ).arg( cnt ) ); + const TQString logMessage = config->readEntry( TQString( "CommitLogMessage%1" ).arg( cnt ) ); if ( !logMessage.isEmpty() ) { // If the message is too long, cut it to 80 characters (or the combo box becomes too wide) // ### FIXME: if the string matches the squeezed 80 chars, it might overwrite another entry - const QString shortLog = KStringHandler::csqueeze( logMessage ); + const TQString shortLog = KStringHandler::csqueeze( logMessage ); m_logMessages.append( logMessage ); m_squeezedLogMessages.append( shortLog ); oldMessages->insertItem( shortLog ); @@ -388,9 +388,9 @@ void SVNDialog::saveSettings( ) // Write the log messages to the config file. int cnt = 0; - QStringList::const_iterator it; + TQStringList::const_iterator it; for ( it = m_logMessages.constBegin( ); it != m_logMessages.constEnd( ) && cnt < 10 ; ++it, ++cnt ) - config->writeEntry( QString( "CommitLogMessage%1" ).arg( cnt ), *it ); + config->writeEntry( TQString( "CommitLogMessage%1" ).arg( cnt ), *it ); } m_config->sync(); } diff --git a/kbabel/catalogmanager/libsvn/svndialog.h b/kbabel/catalogmanager/libsvn/svndialog.h index 0c824fa8..23ec6a7e 100644 --- a/kbabel/catalogmanager/libsvn/svndialog.h +++ b/kbabel/catalogmanager/libsvn/svndialog.h @@ -71,30 +71,30 @@ class SVNDialog : public KDialog * Constructor for creating the dialog. * @param cmd The type of command to be executed. */ - SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config ); + SVNDialog( SVN::Command cmd, TQWidget * parent, KSharedConfig* config ); ~SVNDialog(); /** * Set the list of files which will be used for the SVN command. * @param files The list of files. */ - void setFiles( const QStringList& files ); + void setFiles( const TQStringList& files ); /** * Set the command line for the execution of the SVN command. * @param command The command line. */ - void setCommandLine( const QString& command ); + void setCommandLine( const TQString& command ); /** * Set the command line for adding files to the SVN repository. * This method is only used together with a 'svn commit' for automatically * adding files which are not yet in the repository. * @param command The command line. */ - void setAddCommand( const QString& command ); + void setAddCommand( const TQString& command ); /** * Return the output of a 'svn status' command. * @returns The complete output. */ - QString statusOutput( ); + TQString statusOutput( ); protected: /** @@ -122,24 +122,24 @@ class SVNDialog : public KDialog private: SVN::Command _cmd; - QPushButton * mainBtn; - QPushButton * cancelBtn; - QListBox * filebox; - QComboBox * oldMessages; - QTextEdit * logedit; - QTextEdit * output; - QCheckBox * autoAddBox; + TQPushButton * mainBtn; + TQPushButton * cancelBtn; + TQListBox * filebox; + TQComboBox * oldMessages; + TQTextEdit * logedit; + TQTextEdit * output; + TQCheckBox * autoAddBox; KProcess * p; - QString _commandLine; - QString _addCommand; - QString _statusOutput; + TQString _commandLine; + TQString _addCommand; + TQString _statusOutput; /// Log messages (long version) - QStringList m_logMessages; + TQStringList m_logMessages; /// Log messages (short version) - QStringList m_squeezedLogMessages; + TQStringList m_squeezedLogMessages; /// Temporary file (for commits) KTempFile* m_tempFile; diff --git a/kbabel/catalogmanager/libsvn/svnhandler.cpp b/kbabel/catalogmanager/libsvn/svnhandler.cpp index 8117fe62..1ac98f66 100644 --- a/kbabel/catalogmanager/libsvn/svnhandler.cpp +++ b/kbabel/catalogmanager/libsvn/svnhandler.cpp @@ -37,13 +37,13 @@ #include #include // Qt include files -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // KDE include files #include #include @@ -54,17 +54,17 @@ // project specific include files #include "svnhandler.h" -SVNHandler::SVNHandler( const QString& poBaseDir, const QString& potBaseDir ) +SVNHandler::SVNHandler( const TQString& poBaseDir, const TQString& potBaseDir ) { setPOBaseDir( poBaseDir ); setPOTBaseDir( potBaseDir ); _autoUpdateTemplates = false; } -void SVNHandler::setPOBaseDir( const QString& dir ) +void SVNHandler::setPOBaseDir( const TQString& dir ) { // check if '.svn/entries' exists in the PO base directory - if ( QFileInfo( dir + "/.svn/entries" ).exists( ) ) { + if ( TQFileInfo( dir + "/.svn/entries" ).exists( ) ) { _isPORepository = true; _poBaseDir = dir; } else @@ -72,10 +72,10 @@ void SVNHandler::setPOBaseDir( const QString& dir ) emit signalIsPORepository( _isPORepository ); } -void SVNHandler::setPOTBaseDir( const QString& dir ) +void SVNHandler::setPOTBaseDir( const TQString& dir ) { // check if '.svn/entries' exists in the POT base directory - if ( QFileInfo( dir + "/.svn/entries" ).exists( ) ) { + if ( TQFileInfo( dir + "/.svn/entries" ).exists( ) ) { _isPOTRepository = true; _potBaseDir = dir; } else @@ -83,7 +83,7 @@ void SVNHandler::setPOTBaseDir( const QString& dir ) emit signalIsPOTRepository( _isPOTRepository ); } -QString SVNHandler::fileStatus( const FileStatus status ) const +TQString SVNHandler::fileStatus( const FileStatus status ) const { switch ( status ) { case NO_REPOSITORY: @@ -115,19 +115,19 @@ QString SVNHandler::fileStatus( const FileStatus status ) const } } -SVNHandler::FileStatus SVNHandler::fstatus( const QString& filename ) const +SVNHandler::FileStatus SVNHandler::fstatus( const TQString& filename ) const { // no valid repository if ( !_isPORepository ) return NO_REPOSITORY; - QString fn( filename ); - fn = fn.remove( QRegExp( "/$" ) ); + TQString fn( filename ); + fn = fn.remove( TQRegExp( "/$" ) ); - QFileInfo info( fn ); + TQFileInfo info( fn ); // check if '.svn/entries' exists. - QFile entries( info.dir( true ).path( ) + "/.svn/entries" ); + TQFile entries( info.dir( true ).path( ) + "/.svn/entries" ); if ( !entries.exists() ) return NOT_IN_SVN; @@ -140,12 +140,12 @@ SVNHandler::FileStatus SVNHandler::fstatus( const QString& filename ) const if( !proc.start( KProcess::Block, KProcess::Stdout ) ) return ERROR_IN_WC; - QDomDocument doc; - QString errorMsg; + TQDomDocument doc; + TQString errorMsg; int errorLine, errorCol; - QDomNodeList nodelist; - QDomNode node; - QDomElement entry, wcStatus; + TQDomNodeList nodelist; + TQDomNode node; + TQDomElement entry, wcStatus; // Parse the output. if ( !doc.setContent( out.getOutput(), &errorMsg, &errorLine, &errorCol ) ) { @@ -211,11 +211,11 @@ no_status_xml: } entries.close(); - QDomElement element; + TQDomElement element; // File name that we are searching - const QString findName = info.fileName(); + const TQString findName = info.fileName(); // The entries are elements, so we have to check them - QDomNode child = doc.documentElement().firstChild(); + TQDomNode child = doc.documentElement().firstChild(); for ( ; !child.isNull() ; child = child.nextSibling() ) { if ( !child.isElement() ) @@ -226,7 +226,7 @@ no_status_xml: // Should not happend with svn 1.1.x continue; } - const QString name = element.attribute("name"); + const TQString name = element.attribute("name"); if ( name == findName ) break; } @@ -239,7 +239,7 @@ no_status_xml: // ### TODO: should we check the attribute kind to be file and not dir? // ### TODO: what do copy and move add here? - const QString onSchedule = element.attribute( "schedule" ); + const TQString onSchedule = element.attribute( "schedule" ); if ( onSchedule == "delete" ) return LOCALLY_REMOVED; else if ( onSchedule == "added" ) @@ -250,15 +250,15 @@ no_status_xml: } // Note: we do not check the property time stamp - const QString textTimeStamp( element.attribute( "text-time" ) ); + const TQString textTimeStamp( element.attribute( "text-time" ) ); // calculate the UTC time from the file's last modified date struct stat st; - lstat( QFile::encodeName(fn), &st ); + lstat( TQFile::encodeName(fn), &st ); struct tm * tm_p = gmtime( &st.st_mtime ); const int year = tm_p->tm_year + 1900; const int month = tm_p->tm_mon + 1; - QString fileTime; + TQString fileTime; fileTime.sprintf( "%04i-%02i-%02iT%02i:%02i:%02i.000000Z", year, month, tm_p->tm_mday, tm_p->tm_hour, tm_p->tm_min, tm_p->tm_sec ); //kdDebug() << "File: " << filename << " SVN time: " << textTimeStamp << " File time: " << fileTime << endl; @@ -269,19 +269,19 @@ no_status_xml: } -QString SVNHandler::svnStatus( const QString& filename ) const +TQString SVNHandler::svnStatus( const TQString& filename ) const { return map[filename]; } -void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QString& filename, bool templates, KSharedConfig* config) +void SVNHandler::execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQString& filename, bool templates, KSharedConfig* config) { // Unlike cvs, svn works also from outside the repository(as long as the path is in a repository of course!) // ### FIXME: wrong, svn commit cannot work if the current directory is not a SVN one - execSVNCommand( parent, cmd, QStringList( filename ), templates, config ); + execSVNCommand( parent, cmd, TQStringList( filename ), templates, config ); } -void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QStringList& files, bool templates, KSharedConfig* config ) +void SVNHandler::execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config ) { if ( !_isPORepository ) { // This message box should never be visible but who knows... ;-) @@ -290,9 +290,9 @@ void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QStrin return; } - // ### TODO: instead of making a QString, use KProcess directly, so that it cares about quoting. + // ### TODO: instead of making a TQString, use KProcess directly, so that it cares about quoting. // ### TODO: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.) - QString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && svn "); + TQString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && svn "); switch ( cmd ) { case SVN::Update: command += "update --non-interactive"; @@ -315,15 +315,15 @@ void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QStrin command += "info"; // Does not allow --non-interactive (at least svn 1.1.4). } - QRegExp rx; + TQRegExp rx; if (templates) rx.setPattern(_potBaseDir + "/?"); else rx.setPattern(_poBaseDir + "/?"); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = files.begin( ); it != files.end( ); ++it ) { - QString temp = *it; + TQString temp = *it; temp.remove(rx); command += " \'" + temp + "\'"; } @@ -336,7 +336,7 @@ void SVNHandler::setAutoUpdateTemplates( bool update ) _autoUpdateTemplates = update; } -void SVNHandler::showDialog( QWidget* parent, SVN::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config ) +void SVNHandler::showDialog( TQWidget* parent, SVN::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config ) { SVNDialog * dia = new SVNDialog( cmd, parent, config ); dia->setFiles( files ); @@ -359,7 +359,7 @@ void SVNHandler::showDialog( QWidget* parent, SVN::Command cmd, const QStringLis emit signalFilesCommitted( files ); } -bool SVNHandler::isInSvn( const QString& path ) +bool SVNHandler::isInSvn( const TQString& path ) { if ( path.isEmpty() ) return false; @@ -375,57 +375,57 @@ bool SVNHandler::isInSvn( const QString& path ) * - for a file: check if there is a corresponding file in .svn/text-base/ */ - const QFileInfo info( path ); + const TQFileInfo info( path ); if ( info.isDir() ) { // It is a directory, so find a .svn/entries file - QDir dir( path ); + TQDir dir( path ); return dir.exists( ".svn/entries", true ); } else { // It is a file, so find the corresponding file in .svn/text-base - QDir dir( info.dirPath() ); + TQDir dir( info.dirPath() ); if ( ! dir.cd( ".svn/text-base" ) ) { // There is not even a .svn/text-base directory, so the file is not under control return false; } - const QString textBaseFilename( info.fileName() + ".svn-base" ); + const TQString textBaseFilename( info.fileName() + ".svn-base" ); return dir.exists( textBaseFilename, true ); } } -void SVNHandler::checkToAdd( const QStringList& files ) +void SVNHandler::checkToAdd( const TQStringList& files ) { if ( files.isEmpty( ) ) return; - QStringList toBeAdded; + TQStringList toBeAdded; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = files.begin( ); it != files.end( ); ++it ) { // check for every entry if it needs to be added if ( ! isInSvn( *it ) ) { - QFileInfo info( *it ); - QString temp; // will hold the dir path + TQFileInfo info( *it ); + TQString temp; // will hold the dir path if ( info.isDir( ) ) { toBeAdded << *it; temp = *it; } else { toBeAdded << *it; - temp = QFileInfo( *it ).dirPath( true ); + temp = TQFileInfo( *it ).dirPath( true ); } // ### TODO: does SVN really needs this or does it do it automatically? // check recursivlely if parent dirs have to be added as well while ( ! isInSvn( temp ) && toBeAdded.findIndex( temp ) == -1 ) { toBeAdded << temp; - temp = QFileInfo( temp ).dirPath( true ); + temp = TQFileInfo( temp ).dirPath( true ); } } } // remove an old command - _addCommand = QString(); + _addCommand = TQString(); // ### TODO: does SVN really need this? // make sure the directories are added before the files @@ -434,38 +434,38 @@ void SVNHandler::checkToAdd( const QStringList& files ) // ### TODO: try to make this better // create a command line for adding the files and dirs for ( it = toBeAdded.begin( ); it != toBeAdded.end( ); ++it ) { - QFileInfo info( *it ); + TQFileInfo info( *it ); _addCommand += "cd " + info.dirPath( true ) + " && svn add " + info.fileName( ) + "; "; } } // ### TODO: convert to SVN -void SVNHandler::processStatusOutput( const QString& status ) +void SVNHandler::processStatusOutput( const TQString& status ) { if ( !_isPORepository ) return; #if 0 // at first we need to extract the name of the base directory on the server - QFile f( _poBaseDir + "/SVN/Root" ); // ### FIXME + TQFile f( _poBaseDir + "/SVN/Root" ); // ### FIXME if ( !f.open( IO_ReadOnly ) ) return; - QTextStream stream( &f ); + TQTextStream stream( &f ); // extract the string after the last colon in the first line - QString basedir = stream.readLine( ).section( ':', -1 ); + TQString basedir = stream.readLine( ).section( ':', -1 ); f.close( ); // divide the complete status output in little chunks for every file - QStringList entries = QStringList::split( QRegExp( "={67,67}" ), status ); - QStringList::Iterator it; + TQStringList entries = TQStringList::split( TQRegExp( "={67,67}" ), status ); + TQStringList::Iterator it; for ( it = entries.begin( ); it != entries.end( ); ++it ) { - QString entr = *it; + TQString entr = *it; // translate the filename from repository to local - QRegExp rx( basedir + ".*,v" ); + TQRegExp rx( basedir + ".*,v" ); int pos = entr.find( rx ); - QString file = _poBaseDir + entr.mid( pos + basedir.length( ), + TQString file = _poBaseDir + entr.mid( pos + basedir.length( ), rx.matchedLength( ) - basedir.length( ) - 2 ); entr = "" + entr + ""; @@ -477,16 +477,16 @@ void SVNHandler::processStatusOutput( const QString& status ) #endif } -void SVNHandler::processDiff( QString output ) +void SVNHandler::processDiff( TQString output ) { - output.remove( QRegExp( "\\[ .* \\]$" )); - output.remove( QRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]"))); + output.remove( TQRegExp( "\\[ .* \\]$" )); + output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]"))); KTempFile tmpFile; *(tmpFile.textStream()) << output; tmpFile.close(); - QString error; + TQString error; if ( KApplication::startServiceByName( "Kompare", tmpFile.name(), &error ) ) KMessageBox::error( 0, error ); } @@ -516,10 +516,10 @@ void SVNOutputCollector::setProcess( KProcess* p ) m_process = p; if( p ) { - connect( p, SIGNAL(receivedStdout(KProcess*, char*, int)), - this, SLOT(slotGatherStdout(KProcess*, char*, int)) ); - connect( p, SIGNAL(receivedStderr(KProcess*, char*, int)), - this, SLOT(slotGatherStderr(KProcess*, char*, int)) ); + connect( p, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + this, TQT_SLOT(slotGatherStdout(KProcess*, char*, int)) ); + connect( p, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + this, TQT_SLOT(slotGatherStderr(KProcess*, char*, int)) ); } m_gatheredOutput.truncate( 0 ); @@ -529,14 +529,14 @@ void SVNOutputCollector::setProcess( KProcess* p ) void SVNOutputCollector::slotGatherStderr( KProcess*, char* data, int len ) { - m_gatheredOutput.append( QString::fromLocal8Bit( data, len ) ); - m_stderrOutput.append( QString::fromLocal8Bit( data, len ) ); + m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) ); + m_stderrOutput.append( TQString::fromLocal8Bit( data, len ) ); } void SVNOutputCollector::slotGatherStdout( KProcess*, char* data, int len ) { - m_gatheredOutput.append( QString::fromLocal8Bit( data, len ) ); - m_stdoutOutput.append( QString::fromLocal8Bit( data, len ) ); + m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) ); + m_stdoutOutput.append( TQString::fromLocal8Bit( data, len ) ); } #include "svnhandler.moc" diff --git a/kbabel/catalogmanager/libsvn/svnhandler.h b/kbabel/catalogmanager/libsvn/svnhandler.h index 67c86d73..4933cb92 100644 --- a/kbabel/catalogmanager/libsvn/svnhandler.h +++ b/kbabel/catalogmanager/libsvn/svnhandler.h @@ -36,8 +36,8 @@ #define SVNHANDLER_H // Qt include files -#include -#include +#include +#include // Project specific include files #include "svndialog.h" #include "svnresources.h" @@ -68,17 +68,17 @@ class SVNHandler : public QObject ERROR_IN_WC ///< The working copy has data that cannot be handled }; - SVNHandler( const QString& poBaseDir = QString::null, const QString& potBaseDir = QString::null ); + SVNHandler( const TQString& poBaseDir = TQString::null, const TQString& potBaseDir = TQString::null ); - void setPOBaseDir( const QString& dir ); - void setPOTBaseDir( const QString& dir ); + void setPOBaseDir( const TQString& dir ); + void setPOTBaseDir( const TQString& dir ); - FileStatus fstatus( const QString& filename ) const; - QString fileStatus( const FileStatus status ) const; - QString svnStatus( const QString& filename ) const; + FileStatus fstatus( const TQString& filename ) const; + TQString fileStatus( const FileStatus status ) const; + TQString svnStatus( const TQString& filename ) const; - void execSVNCommand( QWidget* parent, SVN::Command cmd, const QString& filename, bool templates, KSharedConfig* config ); - void execSVNCommand( QWidget* parent, SVN::Command cmd, const QStringList& files, bool templates, KSharedConfig* config ); + void execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQString& filename, bool templates, KSharedConfig* config ); + void execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config ); void setAutoUpdateTemplates( bool update ); @@ -90,26 +90,26 @@ class SVNHandler : public QObject signals: void signalIsPORepository( bool ); void signalIsPOTRepository( bool ); - void signalFilesCommitted( const QStringList& ); + void signalFilesCommitted( const TQStringList& ); private: - void showDialog( QWidget* parent, SVN::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config ); + void showDialog( TQWidget* parent, SVN::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config ); /// Check quickly if the file is part of a SVN repository - bool isInSvn( const QString& path ); - void checkToAdd( const QStringList& files ); - void processStatusOutput( const QString& status ); - void processDiff( QString output ); + bool isInSvn( const TQString& path ); + void checkToAdd( const TQStringList& files ); + void processStatusOutput( const TQString& status ); + void processDiff( TQString output ); private: - QString _poBaseDir; - QString _potBaseDir; + TQString _poBaseDir; + TQString _potBaseDir; bool _isPORepository; bool _isPOTRepository; bool _autoUpdateTemplates; - QString _addCommand; + TQString _addCommand; /** Mapping the output of 'svn status' against the filename. */ - QMap map; + TQMap map; }; class SVNOutputCollector: public QObject @@ -120,18 +120,18 @@ class SVNOutputCollector: public QObject SVNOutputCollector( KProcess* ); void setProcess( KProcess* ); - const QString& getOutput() const { return m_gatheredOutput; } - const QString& getStderr() const { return m_stderrOutput; } - const QString& getStdout() const { return m_stdoutOutput; } + const TQString& getOutput() const { return m_gatheredOutput; } + const TQString& getStderr() const { return m_stderrOutput; } + const TQString& getStdout() const { return m_stdoutOutput; } private slots: void slotGatherStderr( KProcess*, char*, int ); void slotGatherStdout( KProcess*, char*, int ); private: - QString m_gatheredOutput; - QString m_stderrOutput; - QString m_stdoutOutput; + TQString m_gatheredOutput; + TQString m_stderrOutput; + TQString m_stdoutOutput; KProcess* m_process; }; diff --git a/kbabel/catalogmanager/main.cpp b/kbabel/catalogmanager/main.cpp index 868df92a..706ad67f 100644 --- a/kbabel/catalogmanager/main.cpp +++ b/kbabel/catalogmanager/main.cpp @@ -53,10 +53,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include CatalogManager *CatalogManagerApp::_view = 0; @@ -84,15 +84,15 @@ void CatalogManagerApp::setPreferredWindow(WId id) } } -void CatalogManagerApp::updatedFile(QCString url) +void CatalogManagerApp::updatedFile(TQCString url) { if( _view ) _view->updateFile(url); } -QCString CatalogManagerApp::findNextFile() +TQCString CatalogManagerApp::findNextFile() { - QString reply = ""; + TQString reply = ""; if( !CatalogManager::_foundFilesList.isEmpty() ) { reply = CatalogManager::_foundFilesList.first(); @@ -101,9 +101,9 @@ QCString CatalogManagerApp::findNextFile() } else { if( !CatalogManager::_toBeSearched.isEmpty() ) - reply = QString(""); // nothing found yet + reply = TQString(""); // nothing found yet else - return QCString(); // not found definitely + return TQCString(); // not found definitely } return reply.utf8(); @@ -128,11 +128,11 @@ int CatalogManagerApp::newInstance() { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QString configfile = args->getOption("project"); + TQString configfile = args->getOption("project"); if( !configfile.isEmpty() ) { - QFileInfo fi( configfile ); + TQFileInfo fi( configfile ); configfile = fi.absFilePath(); } else @@ -163,12 +163,12 @@ void CatalogManagerInterface::setPreferredWindow( WId id ) CatalogManagerApp::setPreferredWindow(id); } -QCString CatalogManagerInterface::findNextFile() +TQCString CatalogManagerInterface::findNextFile() { return CatalogManagerApp::findNextFile(); } -void CatalogManagerInterface::updatedFile( QCString url ) +void CatalogManagerInterface::updatedFile( TQCString url ) { CatalogManagerApp::updatedFile(url); } diff --git a/kbabel/catalogmanager/markpatterndialog.cpp b/kbabel/catalogmanager/markpatterndialog.cpp index efe893a2..f56a735b 100644 --- a/kbabel/catalogmanager/markpatterndialog.cpp +++ b/kbabel/catalogmanager/markpatterndialog.cpp @@ -31,10 +31,10 @@ **************************************************************************** */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -47,21 +47,21 @@ #include "markpatterndialog.h" #include "markpatternwidget.h" -MarkPatternDialog::MarkPatternDialog(QWidget * parent, const char * name) +MarkPatternDialog::MarkPatternDialog(TQWidget * parent, const char * name) : KDialogBase(parent, name, true, 0, Ok|Cancel, Ok) { actionButton(Ok)->setEnabled(false); mainWidget = new MarkPatternWidget(this); - connect (mainWidget->combo, SIGNAL(textChanged(const QString&)), - this, SLOT(slotComboTextChanged(const QString&))); + connect (mainWidget->combo, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotComboTextChanged(const TQString&))); comboCompletion = mainWidget->combo->completionObject( ); regexpEditDialog = 0; if (!KTrader::self( )->query("KRegExpEditor/KRegExpEditor").isEmpty( )) { - connect(mainWidget->regexpButton, SIGNAL(clicked( )), this, SLOT(slotRegexpButtonClicked( ))); + connect(mainWidget->regexpButton, TQT_SIGNAL(clicked( )), this, TQT_SLOT(slotRegexpButtonClicked( ))); } else { disconnect(mainWidget->useRegExp, 0, mainWidget->regexpButton, 0); delete mainWidget->regexpButton; @@ -87,7 +87,7 @@ void MarkPatternDialog::accept( ) KDialogBase::accept( ); } -QString MarkPatternDialog::pattern( ) +TQString MarkPatternDialog::pattern( ) { return mainWidget->combo->currentText( ); } @@ -118,7 +118,7 @@ void MarkPatternDialog::setMode(bool markMode) } } -void MarkPatternDialog::slotComboTextChanged(const QString& text) +void MarkPatternDialog::slotComboTextChanged(const TQString& text) { actionButton(Ok)->setEnabled(!text.isEmpty( )); } @@ -126,14 +126,14 @@ void MarkPatternDialog::slotComboTextChanged(const QString& text) void MarkPatternDialog::slotRegexpButtonClicked( ) { if (!regexpEditDialog) - regexpEditDialog = KParts::ComponentFactory::createInstanceFromQuery( - "KRegExpEditor/KRegExpEditor", QString::null, this); + regexpEditDialog = KParts::ComponentFactory::createInstanceFromQuery( + "KRegExpEditor/KRegExpEditor", TQString::null, this); KRegExpEditorInterface * iface = dynamic_cast(regexpEditDialog); if (iface) { iface->setRegExp(mainWidget->combo->currentText( )); - if (regexpEditDialog->exec( ) == QDialog::Accepted) + if (regexpEditDialog->exec( ) == TQDialog::Accepted) mainWidget->combo->setCurrentText(iface->regExp( )); } } diff --git a/kbabel/catalogmanager/markpatterndialog.h b/kbabel/catalogmanager/markpatterndialog.h index c8ec1218..de919130 100644 --- a/kbabel/catalogmanager/markpatterndialog.h +++ b/kbabel/catalogmanager/markpatterndialog.h @@ -45,9 +45,9 @@ class MarkPatternDialog : public KDialogBase Q_OBJECT public: - MarkPatternDialog(QWidget * parent, const char * name = 0); + MarkPatternDialog(TQWidget * parent, const char * name = 0); - QString pattern( ); + TQString pattern( ); bool isCaseSensitive( ); bool useRegExp( ); bool includeTemplates( ); @@ -60,14 +60,14 @@ class MarkPatternDialog : public KDialogBase void saveSettings( ); protected slots: - void slotComboTextChanged(const QString& text); + void slotComboTextChanged(const TQString& text); void slotRegexpButtonClicked( ); private: MarkPatternWidget * mainWidget; - QDialog * regexpEditDialog; + TQDialog * regexpEditDialog; - QStringList patternList; + TQStringList patternList; KCompletion * comboCompletion; }; diff --git a/kbabel/catalogmanager/multiroughtransdlg.cpp b/kbabel/catalogmanager/multiroughtransdlg.cpp index 874b9c3e..248ac55a 100644 --- a/kbabel/catalogmanager/multiroughtransdlg.cpp +++ b/kbabel/catalogmanager/multiroughtransdlg.cpp @@ -35,8 +35,8 @@ #include "catmanlistitem.h" #include "multiroughtransdlg.h" -#include -#include +#include +#include #include #include @@ -47,18 +47,18 @@ using namespace KBabel; -MultiRoughTransDlg::MultiRoughTransDlg(KBabelDictBox *dict, QPtrList files - , QWidget *parent,const char *name) +MultiRoughTransDlg::MultiRoughTransDlg(KBabelDictBox *dict, TQPtrList files + , TQWidget *parent,const char *name) : RoughTransDlg(dict, new Catalog(), parent, name ) ,_fileList(files) { - QWidget* bars = static_cast(progressbar->parent()); - QLabel* label = new QLabel( i18n("Files:"), bars ); + TQWidget* bars = static_cast(progressbar->parent()); + TQLabel* label = new TQLabel( i18n("Files:"), bars ); filesProgressbar = new KProgress(bars,"files progressbar"); filesProgressbar->setTextEnabled(true); filesProgressbar->setFormat("%v/%m (%p%)"); filesProgressbar->setTotalSteps(files.count()); - QHBoxLayout* mylayout= new QHBoxLayout(bars->layout()); + TQHBoxLayout* mylayout= new TQHBoxLayout(bars->layout()); mylayout->add(label); mylayout->add(filesProgressbar); @@ -126,7 +126,7 @@ void MultiRoughTransDlg::showAllStatistics() int nothing=tt-ptc-etc; KLocale *locale = KGlobal::locale(); - QString statMsg = i18n("Result of the translation:\n" + TQString statMsg = i18n("Result of the translation:\n" "Edited entries: %1\n" "Exact translations: %2 (%3%)\n" "Approximate translations: %4 (%5%)\n" diff --git a/kbabel/catalogmanager/multiroughtransdlg.h b/kbabel/catalogmanager/multiroughtransdlg.h index 8bda58e2..cdc4d1ed 100644 --- a/kbabel/catalogmanager/multiroughtransdlg.h +++ b/kbabel/catalogmanager/multiroughtransdlg.h @@ -42,7 +42,7 @@ class MultiRoughTransDlg : public RoughTransDlg Q_OBJECT public: - MultiRoughTransDlg(KBabelDictBox* dictBox, QPtrList list, QWidget *parent + MultiRoughTransDlg(KBabelDictBox* dictBox, TQPtrList list, TQWidget *parent , const char *name=0); protected slots: @@ -56,7 +56,7 @@ protected slots: private: - QPtrList _fileList; + TQPtrList _fileList; KProgress *filesProgressbar; }; diff --git a/kbabel/catalogmanager/validateprogress.cpp b/kbabel/catalogmanager/validateprogress.cpp index 9075f24e..b8c563a8 100644 --- a/kbabel/catalogmanager/validateprogress.cpp +++ b/kbabel/catalogmanager/validateprogress.cpp @@ -43,8 +43,8 @@ #include #include -#include -#include +#include +#include #define ID_ERROR_OPEN 1 #define ID_ERROR_IGNORE 2 @@ -52,7 +52,7 @@ // version identification for validation ignores #define IGNOREFILE_VERSION 0x00 -ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget *parent,const char *name) +ValidateProgressDialog::ValidateProgressDialog(const TQString& ignoreURL, TQWidget *parent,const char *name) : KDialogBase(parent,name,true,i18n("Caption of dialog","Validation") , Close, Close) , _ignoreURL(ignoreURL), _tool(0), _stopped(false) @@ -61,7 +61,7 @@ ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget { _mainWidget = new ValidateProgressWidget(this); setMainWidget(_mainWidget); - setInitialSize( QSize(400, 300) ); + setInitialSize( TQSize(400, 300) ); _errors.clear(); _ignores.clear(); @@ -72,12 +72,12 @@ ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget _errorMenu->insertItem(i18n("&Open"),ID_ERROR_OPEN); _errorMenu->insertItem(i18n("&Ignore"),ID_ERROR_IGNORE); - connect( this, SIGNAL(closeClicked()), this, SLOT(stop())); - connect( _mainWidget->_errorList, SIGNAL( doubleClicked(QListBoxItem *)), - this, SLOT( errorItemDoubleClicked(QListBoxItem *))); + connect( this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(stop())); + connect( _mainWidget->_errorList, TQT_SIGNAL( doubleClicked(TQListBoxItem *)), + this, TQT_SLOT( errorItemDoubleClicked(TQListBoxItem *))); - connect( _mainWidget->_errorList, SIGNAL( contextMenuRequested(QListBoxItem *, const QPoint &)), - this, SLOT( showContextMenu(QListBoxItem *, const QPoint &))); + connect( _mainWidget->_errorList, TQT_SIGNAL( contextMenuRequested(TQListBoxItem *, const TQPoint &)), + this, TQT_SLOT( showContextMenu(TQListBoxItem *, const TQPoint &))); } ValidateProgressDialog::~ValidateProgressDialog() @@ -85,7 +85,7 @@ ValidateProgressDialog::~ValidateProgressDialog() writeIgnores(); } -void ValidateProgressDialog::validate( const KDataToolInfo &tool, const QPtrList files ) +void ValidateProgressDialog::validate( const KDataToolInfo &tool, const TQPtrList files ) { if( files.isEmpty() ) return; @@ -111,7 +111,7 @@ void ValidateProgressDialog::validate( const KDataToolInfo &tool, const QPtrList _stopped = false; - QTimer::singleShot( 0, this, SLOT(validate_internal()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(validate_internal()) ); exec(); @@ -139,13 +139,13 @@ void ValidateProgressDialog::validate_internal() if( it->hasErrors() ) { - QValueList err = it->errors(); + TQValueList err = it->errors(); - for( QValueList::Iterator errit = err.begin(); errit!=err.end() ; ++errit ) + for( TQValueList::Iterator errit = err.begin(); errit!=err.end() ; ++errit ) { IgnoreItem item = (*errit); - QValueList::Iterator ig; + TQValueList::Iterator ig; for( ig = _ignores.begin() ; ig != _ignores.end() ; ++ig ) { if( (*ig).validationTool == _toolID && @@ -167,7 +167,7 @@ void ValidateProgressDialog::validate_internal() noHeader = false; } - QString errortext=QString::number(item.index+1)+": " + item.msgid.first().left(50); + TQString errortext=TQString::number(item.index+1)+": " + item.msgid.first().left(50); errortext.replace("\n"," "); if( item.msgid.first().length() > 50 ) errortext+="..."; _mainWidget->_errorList->insertItem( errortext); @@ -200,9 +200,9 @@ void ValidateProgressDialog::stop() _stopped = true; } -void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item) +void ValidateProgressDialog::errorItemDoubleClicked(TQListBoxItem * item) { - QString it = item->text(); + TQString it = item->text(); bool ok =false; int offset = it.find(":"); @@ -215,7 +215,7 @@ void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item) if( !ok ) num = 0; } - QListBoxItem* package=item; + TQListBoxItem* package=item; while( package && !package->text().startsWith("/") ) package=package->prev(); @@ -228,7 +228,7 @@ void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item) emit errorDoubleClicked(package->text(), num-1 ); } -void ValidateProgressDialog::showContextMenu(QListBoxItem * item, const QPoint & pos) +void ValidateProgressDialog::showContextMenu(TQListBoxItem * item, const TQPoint & pos) { // disable ignore for whole package _errorMenu->setItemEnabled(ID_ERROR_IGNORE, item->pixmap()==0 ); @@ -255,10 +255,10 @@ void ValidateProgressDialog::readIgnores() { IgnoreItem item; - QFile ignoreFile( _ignoreURL ); + TQFile ignoreFile( _ignoreURL ); if( ignoreFile.open( IO_ReadOnly ) ) { - QDataStream s( &ignoreFile ); - QString url; + TQDataStream s( &ignoreFile ); + TQString url; int version; s >> version; @@ -277,15 +277,15 @@ void ValidateProgressDialog::readIgnores() void ValidateProgressDialog::writeIgnores() { - QFile ignoreFile( _ignoreURL ); + TQFile ignoreFile( _ignoreURL ); if( ignoreFile.open( IO_WriteOnly ) ) { - QDataStream s( &ignoreFile ); - QString url; + TQDataStream s( &ignoreFile ); + TQString url; int version = IGNOREFILE_VERSION; s << version; - for( QValueList::Iterator it = _ignores.begin(); it!=_ignores.end(); ++it) + for( TQValueList::Iterator it = _ignores.begin(); it!=_ignores.end(); ++it) { s << (*it); } @@ -293,7 +293,7 @@ void ValidateProgressDialog::writeIgnores() } } -QDataStream & operator<<( QDataStream & stream, const IgnoreItem & i ) +TQDataStream & operator<<( TQDataStream & stream, const IgnoreItem & i ) { return stream << i.fileURL << i.msgid @@ -302,7 +302,7 @@ QDataStream & operator<<( QDataStream & stream, const IgnoreItem & i ) << i.validationTool; } -QDataStream & operator>>( QDataStream & stream, IgnoreItem & i ) { +TQDataStream & operator>>( TQDataStream & stream, IgnoreItem & i ) { return stream >> i.fileURL >> i.msgid >> i.msgstr diff --git a/kbabel/catalogmanager/validateprogress.h b/kbabel/catalogmanager/validateprogress.h index 05133889..15c7c238 100644 --- a/kbabel/catalogmanager/validateprogress.h +++ b/kbabel/catalogmanager/validateprogress.h @@ -33,7 +33,7 @@ #ifndef VALIDATEDLG_H #define VALIDATEDLG_H -#include +#include #include #include @@ -47,31 +47,31 @@ class KPopupMenu; struct IgnoreItem { KURL fileURL; - QStringList msgid; - QStringList msgstr; + TQStringList msgid; + TQStringList msgstr; uint index; - QString validationTool; + TQString validationTool; }; -QDataStream & operator<<( QDataStream & stream, const IgnoreItem &ident ); -QDataStream & operator>>( QDataStream & stream, IgnoreItem & ident); +TQDataStream & operator<<( TQDataStream & stream, const IgnoreItem &ident ); +TQDataStream & operator>>( TQDataStream & stream, IgnoreItem & ident); class ValidateProgressDialog : public KDialogBase { Q_OBJECT public: - ValidateProgressDialog(const QString& ignoreURL, QWidget* parent, const char *name=0); + ValidateProgressDialog(const TQString& ignoreURL, TQWidget* parent, const char *name=0); virtual ~ValidateProgressDialog(); void setIgnoreFuzzy(bool enable) { _ignoreFuzzy = enable; } void setMarkAsFuzzy(bool enable) { _setAsFuzzy = enable; } public slots: - void validate(const KDataToolInfo &tool, const QPtrList files); + void validate(const KDataToolInfo &tool, const TQPtrList files); signals: - void errorDoubleClicked(const QString file, const int messageNumber); + void errorDoubleClicked(const TQString file, const int messageNumber); private slots: /** implementation of the validation itself */ @@ -82,28 +82,28 @@ private slots: /** If user doubleclicked an item, this slot will be invoked. * It emits errorDoubleClicked signal for corresponding error*/ - void errorItemDoubleClicked(QListBoxItem * item); + void errorItemDoubleClicked(TQListBoxItem * item); /** show our context menu */ - void showContextMenu(QListBoxItem * item, const QPoint & pos); + void showContextMenu(TQListBoxItem * item, const TQPoint & pos); private: void readIgnores(); void writeIgnores(); ValidateProgressWidget *_mainWidget; - QString _ignoreURL; + TQString _ignoreURL; KDataTool* _tool; - QString _toolID; - QPtrList _files; + TQString _toolID; + TQPtrList _files; bool _stopped; KPopupMenu* _errorMenu; bool _ignoreFuzzy; bool _setAsFuzzy; - QValueList _ignores; - QMap _errors; + TQValueList _ignores; + TQMap _errors; }; #endif // VALIDATEDLG_H diff --git a/kbabel/catalogmanager/validateprogresswidget.ui.h b/kbabel/catalogmanager/validateprogresswidget.ui.h index 88f36d60..f3723e02 100644 --- a/kbabel/catalogmanager/validateprogresswidget.ui.h +++ b/kbabel/catalogmanager/validateprogresswidget.ui.h @@ -37,11 +37,11 @@ ** place of a destructor. *****************************************************************************/ -void ValidateProgressWidget::setupFileProgressBar( QString text, int maxvalue ) +void ValidateProgressWidget::setupFileProgressBar( TQString text, int maxvalue ) { _currentFileProgress->setTotalSteps(maxvalue); - QString t = text[0].upper()+text.mid(1)+":"; + TQString t = text[0].upper()+text.mid(1)+":"; _currentAction->setText(t); _currentAction->repaint(); diff --git a/kbabel/common/argextractor.cpp b/kbabel/common/argextractor.cpp index 4146a5a7..ec5d659f 100644 --- a/kbabel/common/argextractor.cpp +++ b/kbabel/common/argextractor.cpp @@ -37,22 +37,22 @@ #include #include -#include +#include using namespace KBabel; -ArgExtractor::ArgExtractor(QString string) : RegExpExtractor( string ) +ArgExtractor::ArgExtractor(TQString string) : RegExpExtractor( string ) { } -QStringList *ArgExtractor::_argList=0; -KStaticDeleter< QStringList > sdAL; +TQStringList *ArgExtractor::_argList=0; +KStaticDeleter< TQStringList > sdAL; -QStringList *ArgExtractor::regExpList() +TQStringList *ArgExtractor::regExpList() { if(!_argList) { - sdAL.setObject( _argList, new QStringList ); + sdAL.setObject( _argList, new TQStringList ); //Build the default arg list _argList->append("%[ndioxXucsfeEgGp]"); _argList->append("%([0-9]+(\\$))?[-+'#0]?[0-9]*(.[0-9]+)?[hlL]?[dioxXucsfeEgGp]"); @@ -62,9 +62,9 @@ QStringList *ArgExtractor::regExpList() return _argList; } -void ArgExtractor::setArgExpressions( QStringList* list ) +void ArgExtractor::setArgExpressions( TQStringList* list ) { - sdAL.setObject( _argList, new QStringList ); - for( QStringList::Iterator it = list->begin() ; it != list->end() ; ++it ) + sdAL.setObject( _argList, new TQStringList ); + for( TQStringList::Iterator it = list->begin() ; it != list->end() ; ++it ) _argList->append(*it); } diff --git a/kbabel/common/argextractor.h b/kbabel/common/argextractor.h index 31b28c8a..dd84f1c2 100644 --- a/kbabel/common/argextractor.h +++ b/kbabel/common/argextractor.h @@ -35,11 +35,11 @@ #ifndef _ARG_EXTRACTOR_H_ #define _ARG_EXTRACTOR_H_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "regexpextractor.h" @@ -58,23 +58,23 @@ public: /** * Create an argument extractor for "string" */ - ArgExtractor(QString string=QString::null); + ArgExtractor(TQString string=TQString::null); /** * Set a new list of tag regular expressions. It also * deletes the old tags. * @param list a list of regular expressions */ - static void setArgExpressions(QStringList* list); + static void setArgExpressions(TQStringList* list); protected: /** * @return the static list of args */ - virtual QStringList *regExpList(); + virtual TQStringList *regExpList(); private: - static QStringList *_argList; + static TQStringList *_argList; }; } diff --git a/kbabel/common/catalog.cpp b/kbabel/common/catalog.cpp index ffd939b7..d6501c3e 100644 --- a/kbabel/common/catalog.cpp +++ b/kbabel/common/catalog.cpp @@ -31,14 +31,14 @@ your version. **************************************************************************** */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -70,8 +70,8 @@ #include using namespace KBabel; -Catalog::Catalog(QObject* parent, const char* name, QString projectFile) - : QObject(parent,name) +Catalog::Catalog(TQObject* parent, const char* name, TQString projectFile) + : TQObject(parent,name) { if ( projectFile.isEmpty() ) projectFile = KBabel::ProjectManager::defaultProjectName(); @@ -79,7 +79,7 @@ Catalog::Catalog(QObject* parent, const char* name, QString projectFile) readPreferences(); } -Catalog::Catalog(const Catalog& c): QObject(c.parent(),c.name() +Catalog::Catalog(const Catalog& c): TQObject(c.parent(),c.name() ) { kdFatal() << "Copy constructor of Catalog, please report how to reproduce to the authors" << endl; @@ -90,20 +90,20 @@ Catalog::~Catalog() delete d; } -QString Catalog::msgctxt(uint index) const +TQString Catalog::msgctxt(uint index) const { if ( d->_entries.isEmpty() ) - return QString::null; + return TQString::null; uint max=d->_entries.count()-1; if(index > max) index=max; return d->_entries[index].msgctxt(); } -QStringList Catalog::msgid(uint index, const bool noNewlines) const +TQStringList Catalog::msgid(uint index, const bool noNewlines) const { if ( d->_entries.isEmpty() ) - return QString::null; + return TQString::null; uint max=d->_entries.count()-1; if(index > max) index=max; @@ -111,10 +111,10 @@ QStringList Catalog::msgid(uint index, const bool noNewlines) const return d->_entries[index].msgid(noNewlines); } -QStringList Catalog::msgstr(uint index, const bool noNewlines) const +TQStringList Catalog::msgstr(uint index, const bool noNewlines) const { if ( d->_entries.isEmpty() ) - return QString::null; + return TQString::null; uint max=d->_entries.count()-1; if(index > max) @@ -123,24 +123,24 @@ QStringList Catalog::msgstr(uint index, const bool noNewlines) const return d->_entries[index].msgstr(noNewlines); } -QString Catalog::comment(uint index) const +TQString Catalog::comment(uint index) const { if ( d->_entries.isEmpty() ) - return QString::null; + return TQString::null; uint max=d->_entries.count()-1; if(index > max) index=max; return d->_entries[index].comment(); } -QString Catalog::context(uint index) const +TQString Catalog::context(uint index) const { - QString c = comment(index); + TQString c = comment(index); - QStringList lines = QStringList::split("\n",c); + TQStringList lines = TQStringList::split("\n",c); - QString result; - for( QStringList::Iterator it=lines.begin(); it!=lines.end(); ++it) + TQString result; + for( TQStringList::Iterator it=lines.begin(); it!=lines.end(); ++it) { if( (*it).startsWith( "#:") ) { @@ -155,15 +155,15 @@ CatalogItem Catalog::header() const return d->_header; } -QString Catalog::lastTranslator() const +TQString Catalog::lastTranslator() const { return headerInfo( d->_header ).lastTranslator; } -int Catalog::indexForMsgid(const QString& id) const +int Catalog::indexForMsgid(const TQString& id) const { int i=0; - QValueVector::ConstIterator it = d->_entries.begin(); + TQValueVector::ConstIterator it = d->_entries.begin(); while(it != d->_entries.end() && !((*it).msgid(true).contains(id))) { @@ -177,10 +177,10 @@ int Catalog::indexForMsgid(const QString& id) const return i; } -QStringList Catalog::tagList(uint index) +TQStringList Catalog::tagList(uint index) { if ( d->_entries.isEmpty() ) - return QStringList(); + return TQStringList(); uint max=d->_entries.count()-1; if(index > max) @@ -190,10 +190,10 @@ QStringList Catalog::tagList(uint index) } -QStringList Catalog::argList(uint index) +TQStringList Catalog::argList(uint index) { if ( d->_entries.isEmpty() ) - return QStringList(); + return TQStringList(); uint max=d->_entries.count()-1; if(index > max) @@ -204,7 +204,7 @@ QStringList Catalog::argList(uint index) /* -bool Catalog::setMsgstr(uint index,QString msgstr) +bool Catalog::setMsgstr(uint index,TQString msgstr) { kdWarning() << "Catalog::setMsgstr()" << endl; @@ -217,7 +217,7 @@ bool Catalog::setMsgstr(uint index,QString msgstr) } else if(msgstr.isEmpty()) { - QValueList::Iterator it; + TQValueList::Iterator it; // insert index in the right place in the list it = _untransIndex.begin(); @@ -242,7 +242,7 @@ bool Catalog::setMsgstr(uint index,QString msgstr) */ /* -bool Catalog::setComment(uint index,QString comment) +bool Catalog::setComment(uint index,TQString comment) { kdWarning() << "Catalog::setComment()" << endl; bool fuzziesChanged=false; @@ -261,7 +261,7 @@ bool Catalog::setComment(uint index,QString comment) } else if(isFuzzy) { - QValueList::Iterator it; + TQValueList::Iterator it; // insert index in the right place in the list it = _fuzzyIndex.begin(); @@ -289,7 +289,7 @@ bool Catalog::setHeader(CatalogItem newHeader) if(newHeader.isValid()) { // normalize the values - ensure every key:value pair is only on a single line - QString values = newHeader.msgstr().first(); + TQString values = newHeader.msgstr().first(); values.replace ("\n", ""); values.replace ("\\n", "\\n\n"); @@ -321,11 +321,11 @@ void Catalog::setCurrentURL(const KURL& url) CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const { - QStringList headerList=oldHeader.msgstrAsList(); - QStringList commentList=QStringList::split('\n',oldHeader.comment()); + TQStringList headerList=oldHeader.msgstrAsList(); + TQStringList commentList=TQStringList::split('\n',oldHeader.comment()); - QStringList::Iterator it,ait; - QString temp; + TQStringList::Iterator it,ait; + TQString temp; bool found; const IdentitySettings identityOptions = identitySettings(); @@ -343,7 +343,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const temp+="\\n"; for( it = headerList.begin(); it != headerList.end(); ++it ) { - if((*it).contains(QRegExp("^ *Last-Translator:.*"))) + if((*it).contains(TQRegExp("^ *Last-Translator:.*"))) { (*it) = temp; found=true; @@ -363,7 +363,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const for( it = headerList.begin(); it != headerList.end(); ++it ) { - if((*it).contains(QRegExp("^ *PO-Revision-Date:.*"))) + if((*it).contains(TQRegExp("^ *PO-Revision-Date:.*"))) { (*it) = temp; found=true; @@ -384,7 +384,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const for( it = headerList.begin(); it != headerList.end(); ++it ) { - if((*it).contains(QRegExp("^ *Project-Id-Version:.*"))) + if((*it).contains(TQRegExp("^ *Project-Id-Version:.*"))) { (*it) = temp; found=true; @@ -408,7 +408,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const temp+="\\n"; for( it = headerList.begin(); it != headerList.end(); ++it ) { - if((*it).contains(QRegExp("^ *Language-Team:.*"))) + if((*it).contains(TQRegExp("^ *Language-Team:.*"))) { (*it) = temp; found=true; @@ -425,7 +425,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const found=false; - QString encodingStr; + TQString encodingStr; if(saveOptions.useOldEncoding && d->fileCodec) { encodingStr = charsetString(d->fileCodec); @@ -440,7 +440,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const it = headerList.begin(); while( it != headerList.end() ) { - if( (*it).find( QRegExp( "^ *Content-Type:.*" ) ) != -1 ) + if( (*it).find( TQRegExp( "^ *Content-Type:.*" ) ) != -1 ) { if ( found ) { @@ -450,8 +450,8 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const else { found=true; - QRegExp regexp( "^ *Content-Type:(.*/.*);?\\s*charset=.*$" ); - QString mimeType; + TQRegExp regexp( "^ *Content-Type:(.*/.*);?\\s*charset=.*$" ); + TQString mimeType; if ( regexp.search( *it ) ) { mimeType = regexp.cap( 1 ).stripWhiteSpace(); @@ -483,7 +483,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const for( it = headerList.begin(); it != headerList.end(); ++it ) { - if((*it).contains(QRegExp("^ *Content-Transfer-Encoding:.*"))) + if((*it).contains(TQRegExp("^ *Content-Transfer-Encoding:.*"))) { (*it) = temp; found=true; @@ -502,7 +502,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const for( it = headerList.begin(); it != headerList.end(); ++it ) { - if((*it).contains(QRegExp("^ *X-Generator:.*"))) + if((*it).contains(TQRegExp("^ *X-Generator:.*"))) { (*it) = temp; found=true; @@ -519,7 +519,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const found=false; for( it = headerList.begin(); it != headerList.end(); ++it ) { - if((*it).contains(QRegExp("^ *MIME-Version:"))) + if((*it).contains(TQRegExp("^ *MIME-Version:"))) { (*it) = temp; found=true; @@ -541,7 +541,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const { for( it = headerList.begin(); it != headerList.end(); ++it ) { - if((*it).contains(QRegExp("^ *Plural-Forms:"))) + if((*it).contains(TQRegExp("^ *Plural-Forms:"))) { (*it) = temp; found=true; @@ -564,7 +564,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const for( it = commentList.begin(); it != commentList.end(); ++it ) { // U+00A9 is the Copyright sign - if ( (*it).find( QRegExp("^# *Copyright (\\(C\\)|\\x00a9).*Free Software Foundation, Inc") ) != -1 ) + if ( (*it).find( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9).*Free Software Foundation, Inc") ) != -1 ) { found=true; break; @@ -572,27 +572,27 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const } if(found) { - if ( (*it).find( QRegExp("^# *Copyright (\\(C\\)|\\x00a9) YEAR Free Software Foundation, Inc\\.") ) != -1 ) + if ( (*it).find( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9) YEAR Free Software Foundation, Inc\\.") ) != -1 ) { //template string if( saveOptions.FSFCopyright == ProjectSettingsBase::Remove) (*it).remove(" YEAR Free Software Foundation, Inc"); else - (*it).replace("YEAR", QDate::currentDate().toString("yyyy")); + (*it).replace("YEAR", TQDate::currentDate().toString("yyyy")); } else if( saveOptions.FSFCopyright == ProjectSettingsBase::Update ) { //update years - QString cy = QDate::currentDate().toString("yyyy"); - if( !(*it).contains( QRegExp(cy)) ) // is the year already included? + TQString cy = TQDate::currentDate().toString("yyyy"); + if( !(*it).contains( TQRegExp(cy)) ) // is the year already included? { - int index = (*it).findRev( QRegExp("[\\d]+[\\d\\-, ]*") ); + int index = (*it).findRev( TQRegExp("[\\d]+[\\d\\-, ]*") ); if( index == -1 ) { KMessageBox::information(0,i18n("Free Software Foundation Copyright does not contain any year. " "It will not be updated.")); } else { - (*it).insert(index+1, QString(", ")+cy); + (*it).insert(index+1, TQString(", ")+cy); } } } @@ -608,14 +608,14 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const temp = temp.stripWhiteSpace(); // The description strings has often buggy variants already in the file, these must be removed - QString regexpstr = "^#\\s+" + QRegExp::escape( saveOptions.descriptionString.stripWhiteSpace() ) + "\\s*$"; + TQString regexpstr = "^#\\s+" + TQRegExp::escape( saveOptions.descriptionString.stripWhiteSpace() ) + "\\s*$"; regexpstr.replace( "@PACKAGE@", ".*" ); regexpstr.replace( "@LANGUAGE@", ".*" ); //kdDebug() << "REGEXPSTR: " << regexpstr << endl; - QRegExp regexp ( regexpstr ); + TQRegExp regexp ( regexpstr ); // The buggy variants exist in English too (of a time before KBabel got a translation for the corresponding language) - QRegExp regexpUntranslated ( "^#\\s+Translation of .* into .*\\s*$" ); + TQRegExp regexpUntranslated ( "^#\\s+Translation of .* into .*\\s*$" ); kdDebug () << "Temp is '" << temp << "'" << endl; @@ -666,7 +666,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const && ( ! identityOptions.authorName.isEmpty() ) && ( ! identityOptions.authorEmail.isEmpty() ) ) // An email address can be used as ersatz of a name { - QStringList foundAuthors; + TQStringList foundAuthors; temp = "# "; temp += identityOptions.authorName; @@ -674,11 +674,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const { temp+=(" <"+identityOptions.authorEmail+">"); } - temp+=", "+QDate::currentDate().toString("yyyy")+"."; + temp+=", "+TQDate::currentDate().toString("yyyy")+"."; // ### TODO: it would be nice if the entry could start with "COPYRIGHT" and have the "(C)" symbol (both not mandatory) - QRegExp regexpAuthorYear( "^#.*(<.+@.+>)?,\\s*([\\d]+[\\d\\-, ]*|YEAR)" ); - QRegExp regexpYearAlone( "^# , \\d{4}.?\\s*$" ); + TQRegExp regexpAuthorYear( "^#.*(<.+@.+>)?,\\s*([\\d]+[\\d\\-, ]*|YEAR)" ); + TQRegExp regexpYearAlone( "^# , \\d{4}.?\\s*$" ); it = commentList.begin(); while ( it != commentList.end() ) { @@ -721,14 +721,14 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const found = false; bool foundAuthor = false; - const QString cy = QDate::currentDate().toString("yyyy"); + const TQString cy = TQDate::currentDate().toString("yyyy"); ait = foundAuthors.end(); for( it = foundAuthors.begin() ; it!=foundAuthors.end(); ++it ) { - if ( (*it).find( QRegExp( - QRegExp::escape( identityOptions.authorName )+".*" - + QRegExp::escape( identityOptions.authorEmail ) ) ) != -1 ) + if ( (*it).find( TQRegExp( + TQRegExp::escape( identityOptions.authorName )+".*" + + TQRegExp::escape( identityOptions.authorEmail ) ) ) != -1 ) { foundAuthor = true; if( (*it).find( cy ) != -1 ) @@ -744,11 +744,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const else if ( ait != foundAuthors.end() ) { //update years - const int index = (*ait).findRev( QRegExp("[\\d]+[\\d\\-, ]*") ); + const int index = (*ait).findRev( TQRegExp("[\\d]+[\\d\\-, ]*") ); if ( index == -1 ) (*ait)+=", "+cy; else - (*ait).insert(index+1, QString(", ")+cy); + (*ait).insert(index+1, TQString(", ")+cy); } else kdDebug() << "INTERNAL ERROR: author found but iterator dangling!" << endl; @@ -760,11 +760,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const it=commentList.end(); do --it; - while( ( it != commentList.begin() ) && ( (*it).find( QRegExp( "^#(\\s*$|[:,\\.])" ) ) == -1 ) ); + while( ( it != commentList.begin() ) && ( (*it).find( TQRegExp( "^#(\\s*$|[:,\\.])" ) ) == -1 ) ); ++it; for( ait = foundAuthors.begin() ; ait != foundAuthors.end() ; ++ait ) { - QString s = (*ait); + TQString s = (*ait); // ensure dot at the end of copyright if( !s.endsWith(".") ) s += "."; @@ -790,7 +790,7 @@ void Catalog::setFuzzy(uint index, bool on) { applyBeginCommand( index, Comment, 0 ); - QPtrList editList; + TQPtrList editList; if(on) { editList=d->_entries[index].addFuzzy(false); @@ -832,13 +832,13 @@ void Catalog::setModified(bool flag) } -QString Catalog::packageName() const +TQString Catalog::packageName() const { if( !d->_packageName.isNull() ) return d->_packageName; - QString package=d->_url.fileName(); + TQString package=d->_url.fileName(); - int index=package.find(QRegExp("(\\."+identitySettings().languageCode+")?\\.pot?$")); + int index=package.find(TQRegExp("(\\."+identitySettings().languageCode+")?\\.pot?$")); if(index>0) package=package.left(index); @@ -846,12 +846,12 @@ QString Catalog::packageName() const return package; } -void Catalog::setPackage(const QString& package ) +void Catalog::setPackage(const TQString& package ) { const int pos = package.findRev( '/' ); if( pos < 0 ) { - d->_packageDir = QString(); + d->_packageDir = TQString(); d->_packageName = package; } else @@ -862,20 +862,20 @@ void Catalog::setPackage(const QString& package ) kdDebug() << k_funcinfo << " " << package << " => " << d->_packageDir << " + " << d->_packageName << endl; } -QString Catalog::packageDir() const +TQString Catalog::packageDir() const { - QString result; + TQString result; if( !d->_packageDir.isNull() ) result=d->_packageDir; else result=d->_url.directory(false); return result; } -QString Catalog::encoding() const +TQString Catalog::encoding() const { SaveSettings options = saveSettings(); - QString encodingStr; + TQString encodingStr; if(options.useOldEncoding && d->fileCodec) { encodingStr = charsetString(d->fileCodec); @@ -888,9 +888,9 @@ QString Catalog::encoding() const return encodingStr; } -ConversionStatus Catalog::openURL(const KURL& url, const QString& package) +ConversionStatus Catalog::openURL(const KURL& url, const TQString& package) { - QString target; + TQString target; ConversionStatus error = OK; if(KIO::NetAccess::download(url, target, NULL)) @@ -930,15 +930,15 @@ ConversionStatus Catalog::openURL(const KURL& url, const QString& package) filter = static_cast(factory->create(0, 0)); // provide progress bar indication - connect( filter, SIGNAL( signalResetProgressBar(QString,int) ), - this, SIGNAL( signalResetProgressBar(QString,int) )); - connect( filter, SIGNAL( signalProgress(int) ), - this, SIGNAL( signalProgress(int) )); - connect( filter, SIGNAL( signalClearProgressBar() ), - this, SIGNAL( signalClearProgressBar() )); - - connect( this, SIGNAL( signalStopActivity() ), - filter, SLOT( stop() )); + connect( filter, TQT_SIGNAL( signalResetProgressBar(TQString,int) ), + this, TQT_SIGNAL( signalResetProgressBar(TQString,int) )); + connect( filter, TQT_SIGNAL( signalProgress(int) ), + this, TQT_SIGNAL( signalProgress(int) )); + connect( filter, TQT_SIGNAL( signalClearProgressBar() ), + this, TQT_SIGNAL( signalClearProgressBar() )); + + connect( this, TQT_SIGNAL( signalStopActivity() ), + filter, TQT_SLOT( stop() )); // load in the file (target is always local) d->_active = true; @@ -971,8 +971,8 @@ ConversionStatus Catalog::openURL(const KURL& url, const QString& package) if( package.isEmpty() ) { - d->_packageName=QString::null; - d->_packageDir=QString::null; + d->_packageName=TQString::null; + d->_packageDir=TQString::null; } else setPackage(package); @@ -992,9 +992,9 @@ ConversionStatus Catalog::openURL(const KURL& url, const QString& package) } } -ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, const QString& package) +ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, const TQString& package) { - QString target; + TQString target; ConversionStatus error = OK; if(KIO::NetAccess::download(openUrl, target, NULL)) @@ -1027,15 +1027,15 @@ ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, cons filter = static_cast(factory->create(0, 0)); // provide progress bar indication - connect( filter, SIGNAL( signalResetProgressBar(QString,int) ), - this, SIGNAL( signalResetProgressBar(QString,int) )); - connect( filter, SIGNAL( signalProgress(int) ), - this, SIGNAL( signalProgress(int) )); - connect( filter, SIGNAL( signalClearProgressBar() ), - this, SIGNAL( signalClearProgressBar() )); + connect( filter, TQT_SIGNAL( signalResetProgressBar(TQString,int) ), + this, TQT_SIGNAL( signalResetProgressBar(TQString,int) )); + connect( filter, TQT_SIGNAL( signalProgress(int) ), + this, TQT_SIGNAL( signalProgress(int) )); + connect( filter, TQT_SIGNAL( signalClearProgressBar() ), + this, TQT_SIGNAL( signalClearProgressBar() )); - connect( this, SIGNAL( signalStopActivity() ), - filter, SLOT( stop() )); + connect( this, TQT_SIGNAL( signalStopActivity() ), + filter, TQT_SLOT( stop() )); // load in the file (target is always local) d->_active = true; @@ -1069,8 +1069,8 @@ ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, cons d->_url = saveURL; if( package.isEmpty() ) { - d->_packageName=QString::null; - d->_packageDir=QString::null; + d->_packageName=TQString::null; + d->_packageDir=TQString::null; } else setPackage(package); @@ -1093,12 +1093,12 @@ ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, cons } } -Msgfmt::Status Catalog::checkSyntax(QString& output, bool clearErrors) +Msgfmt::Status Catalog::checkSyntax(TQString& output, bool clearErrors) { if( !d->_mimeTypes.contains( "application/x-gettext" ) ) return Msgfmt::Unsupported; - QString filename; + TQString filename; bool tempFileUsed=false; if(d->_url.isLocalFile() && !isModified()) @@ -1125,15 +1125,15 @@ Msgfmt::Status Catalog::checkSyntax(QString& output, bool clearErrors) currentLine=d->_header.totalLines()+1; // ### KDE4: return "lines" not "output" - const QStringList lines = QStringList::split("\n",output); - for ( QStringList::const_iterator it = lines.constBegin(); it != lines.constEnd(); ++it ) + const TQStringList lines = TQStringList::split("\n",output); + for ( TQStringList::const_iterator it = lines.constBegin(); it != lines.constEnd(); ++it ) { - if( (*it).find(QRegExp("^.+:\\d+:")) >= 0 ) + if( (*it).find(TQRegExp("^.+:\\d+:")) >= 0 ) { const int begin=(*it).find(":",0)+1; const int end=(*it).find(":",begin); - const QString line=(*it).mid(begin,end-begin); + const TQString line=(*it).mid(begin,end-begin); while( line.toInt() > currentLine ) { @@ -1158,14 +1158,14 @@ Msgfmt::Status Catalog::checkSyntax(QString& output, bool clearErrors) } if(tempFileUsed) - QFile::remove(filename); + TQFile::remove(filename); return result; } void Catalog::clearErrorList() { - QValueList::Iterator it; + TQValueList::Iterator it; for(it = d->_errorIndex.begin(); it != d->_errorIndex.end(); ++it) { d->_entries[(*it)].setSyntaxError(false); @@ -1185,10 +1185,10 @@ void Catalog::removeFromErrorList(uint index) } } -QStringList Catalog::itemStatus(uint index, bool recheck, QPtrList whatToCheck) +TQStringList Catalog::itemStatus(uint index, bool recheck, TQPtrList whatToCheck) { if ( d->_entries.isEmpty() ) - return QStringList(); + return TQStringList(); uint max=d->_entries.count()-1; if(index > max) @@ -1207,10 +1207,10 @@ QStringList Catalog::itemStatus(uint index, bool recheck, QPtrList wh return item.errors(); } -QStringList Catalog::itemStatus(uint index) +TQStringList Catalog::itemStatus(uint index) { if ( d->_entries.isEmpty() ) - return QStringList(); + return TQStringList(); uint max=d->_entries.count()-1; if(index > max) @@ -1229,14 +1229,14 @@ bool Catalog::checkUsingTool(KDataTool* tool, bool clearErrors) kdDebug(KBABEL) << "checkUsingTool active" << endl; d->_active=true; d->_stop=false; - connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); int index = 0; bool hasErrors=false; emit signalResetProgressBar(i18n("validating file"),100); - for ( QValueVector::Iterator it = d->_entries.begin(); + for ( TQValueVector::Iterator it = d->_entries.begin(); it != d->_entries.end(); ++it, index++ ) { if( !tool->run( "validate", (void*)(&(*it)), "CatalogItem", "application/x-kbabel-catalogitem" )) @@ -1256,26 +1256,26 @@ bool Catalog::checkUsingTool(KDataTool* tool, bool clearErrors) kdDebug(KBABEL) << "checkUsingTool not active" << endl; d->_active=false; d->_stop=false; - disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); emit signalClearProgressBar(); return !hasErrors; } -void Catalog::modifyUsingTool(KDataTool* tool, const QString& command) +void Catalog::modifyUsingTool(KDataTool* tool, const TQString& command) { kdDebug(KBABEL) << "modifyUsingTool active" << endl; d->_active=true; d->_stop=false; - connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); int index = 0; bool modified = false; emit signalResetProgressBar(i18n("applying tool"),100); - for ( QValueVector::Iterator it = d->_entries.begin(); + for ( TQValueVector::Iterator it = d->_entries.begin(); it != d->_entries.end(); ++it, index++ ) { CatalogItem dummyItem( *it ); @@ -1294,7 +1294,7 @@ void Catalog::modifyUsingTool(KDataTool* tool, const QString& command) { uint in = 0; // number of current lural form // go over all plural forms and test, which changed - for ( QStringList::Iterator itorig = (*it).msgstr().begin() + for ( TQStringList::Iterator itorig = (*it).msgstr().begin() , itchanged = dummyItem.msgstr().begin() ; itorig != (*it).msgstr().end() ; ++itorig, ++itchanged) { @@ -1334,7 +1334,7 @@ void Catalog::modifyUsingTool(KDataTool* tool, const QString& command) kdDebug(KBABEL) << "modifyUsingTool not active" << endl; d->_active=false; d->_stop=false; - disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); emit signalClearProgressBar(); } @@ -1653,7 +1653,7 @@ bool Catalog::isGeneratedFromDocbook() const return d->_generatedFromDocbook; } -QString Catalog::package() const +TQString Catalog::package() const { return packageDir()+packageName(); } @@ -1672,7 +1672,7 @@ void Catalog::setSettings(IdentitySettings settings) { IdentitySettings oldsettings = d->_project->identitySettings(); - QString oldLanguageCode = oldsettings.languageCode; + TQString oldLanguageCode = oldsettings.languageCode; int oldForms = oldsettings.numberOfPluralForms; @@ -1711,7 +1711,7 @@ void Catalog::generateIndexLists() clearErrorList(); uint counter=0; - for ( QValueVector::Iterator it = d->_entries.begin(); it != d->_entries.end(); ++it ) + for ( TQValueVector::Iterator it = d->_entries.begin(); it != d->_entries.end(); ++it ) { if((*it).isUntranslated()) { @@ -1727,9 +1727,9 @@ void Catalog::generateIndexLists() } -int Catalog::findNextInList(const QValueList& list,uint index) const +int Catalog::findNextInList(const TQValueList& list,uint index) const { - QValueList::ConstIterator it; + TQValueList::ConstIterator it; int nextIndex=-1; @@ -1759,9 +1759,9 @@ int Catalog::findNextInList(const QValueList& list,uint index) const return nextIndex; } -int Catalog::findPrevInList(const QValueList& list,uint index) const +int Catalog::findPrevInList(const TQValueList& list,uint index) const { - QValueList::ConstIterator it; + TQValueList::ConstIterator it; int prevIndex=-1; @@ -1798,10 +1798,10 @@ int Catalog::findPrevInList(const QValueList& list,uint index) const } -QString Catalog::dateTime() const +TQString Catalog::dateTime() const { - const QDateTime dt = QDateTime::currentDateTime(); - QString dateTimeString; + const TQDateTime dt = TQDateTime::currentDateTime(); + TQString dateTimeString; const SaveSettings options = d->_project->saveSettings(); @@ -1815,7 +1815,7 @@ QString Catalog::dateTime() const case Qt::ISODate: { dateTimeString = dt.toString("yyyy-MM-dd hh:mm"); - QTime t; + TQTime t; const int offset = KRFCDate::localUTCOffset(); const int correction = offset < 0 ? -60 : 60 ; t = t.addSecs( offset * correction ); @@ -1827,56 +1827,56 @@ QString Catalog::dateTime() const { dateTimeString = options.customDateFormat; - const QDate date = dt.date(); - const QTime time = dt.time(); + const TQDate date = dt.date(); + const TQTime time = dt.time(); // the year - dateTimeString.replace( "%Y", QString::number( date.year() ) ); - dateTimeString.replace( "%y", QString::number( date.year() ).right(2) ); + dateTimeString.replace( "%Y", TQString::number( date.year() ) ); + dateTimeString.replace( "%y", TQString::number( date.year() ).right(2) ); // the month if(date.month()<10) { - dateTimeString.replace( "%m", "0"+QString::number( date.month() ) ); + dateTimeString.replace( "%m", "0"+TQString::number( date.month() ) ); } else { - dateTimeString.replace( "%m", QString::number( date.month() ) ); + dateTimeString.replace( "%m", TQString::number( date.month() ) ); } - dateTimeString.replace( "%f", QString::number( date.month() ) ); + dateTimeString.replace( "%f", TQString::number( date.month() ) ); dateTimeString.replace( "%b", date.longMonthName(date.month()) ); dateTimeString.replace( "%h", date.longMonthName(date.month()) ); // the day - dateTimeString.replace( "%j", QString::number( date.dayOfYear() ) ); - dateTimeString.replace( "%e", QString::number( date.day() ) ); + dateTimeString.replace( "%j", TQString::number( date.dayOfYear() ) ); + dateTimeString.replace( "%e", TQString::number( date.day() ) ); if(date.day() < 10) { - dateTimeString.replace( "%d", "0"+QString::number( date.day() ) ); + dateTimeString.replace( "%d", "0"+TQString::number( date.day() ) ); } else { - dateTimeString.replace( "%d", QString::number( date.day() ) ); + dateTimeString.replace( "%d", TQString::number( date.day() ) ); } dateTimeString.replace( "%a", date.longDayName( date.dayOfWeek() ) ); // hour - dateTimeString.replace( "%k", QString::number( time.hour() ) ); + dateTimeString.replace( "%k", TQString::number( time.hour() ) ); if(time.hour() < 10) { - dateTimeString.replace( "%H", "0"+QString::number( time.hour() ) ); + dateTimeString.replace( "%H", "0"+TQString::number( time.hour() ) ); } else { - dateTimeString.replace( "%H", QString::number( time.hour() ) ); + dateTimeString.replace( "%H", TQString::number( time.hour() ) ); } - QString zone; // AM or PM + TQString zone; // AM or PM int hour = time.hour(); if( hour > 12 ) { @@ -1888,15 +1888,15 @@ QString Catalog::dateTime() const zone="AM"; } - dateTimeString.replace( "%I", QString::number( hour ) ); + dateTimeString.replace( "%I", TQString::number( hour ) ); if(hour < 10) { - dateTimeString.replace( "%i", "0"+QString::number( hour ) ); + dateTimeString.replace( "%i", "0"+TQString::number( hour ) ); } else { - dateTimeString.replace( "%i", QString::number( hour ) ); + dateTimeString.replace( "%i", TQString::number( hour ) ); } dateTimeString.replace( "%p", zone ); @@ -1904,26 +1904,26 @@ QString Catalog::dateTime() const // minutes if(time.minute() < 10) { - dateTimeString.replace( "%M", "0"+QString::number( time.minute() ) ); + dateTimeString.replace( "%M", "0"+TQString::number( time.minute() ) ); } else { - dateTimeString.replace( "%M", QString::number( time.minute() ) ); + dateTimeString.replace( "%M", TQString::number( time.minute() ) ); } // seconds if(time.second() < 10) { - dateTimeString.replace( "%S", "0"+QString::number( time.second() ) ); + dateTimeString.replace( "%S", "0"+TQString::number( time.second() ) ); } else { - dateTimeString.replace( "%S", QString::number( time.second() ) ); + dateTimeString.replace( "%S", TQString::number( time.second() ) ); } // timezone dateTimeString.replace( "%Z", d->_project->identitySettings().timeZone ); - QTime t; + TQTime t; const int offset = KRFCDate::localUTCOffset(); const int correction = offset < 0 ? -60 : 60; t = t.addSecs( offset * correction ); @@ -1973,15 +1973,15 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite) if(targetURL.isLocalFile()) { // test if the directory exists. If not, create it. - QDir dir( targetURL.directory()); + TQDir dir( targetURL.directory()); - QStringList dirList; + TQStringList dirList; while(!dir.exists() && !dir.dirName().isEmpty()) { dirList.prepend(dir.dirName()); dir.setPath(dir.path()+"/.."); } - for ( QStringList::Iterator it = dirList.begin(); it != dirList.end(); ++it ) + for ( TQStringList::Iterator it = dirList.begin(); it != dirList.end(); ++it ) { if(!dir.mkdir(*it)) { @@ -1998,7 +1998,7 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite) } else { - QString tempFile=kapp->tempSaveName(targetURL.path(0)); + TQString tempFile=kapp->tempSaveName(targetURL.path(0)); status = writeFile(tempFile,overwrite); @@ -2010,7 +2010,7 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite) } } - QFile::remove(tempFile); + TQFile::remove(tempFile); } if(status == OK) @@ -2031,21 +2031,21 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite) return status; } -QString Catalog::saveTempFile() +TQString Catalog::saveTempFile() { - QString filename = kapp->tempSaveName("/temp/kbabel_temp.po"); + TQString filename = kapp->tempSaveName("/temp/kbabel_temp.po"); if( writeFile(filename) != OK ) { - filename = QString::null; + filename = TQString::null; } return filename; } -ConversionStatus Catalog::writeFile(QString localFile , bool overwrite) +ConversionStatus Catalog::writeFile(TQString localFile , bool overwrite) { - QFileInfo info(localFile); + TQFileInfo info(localFile); if(info.isDir()) return NO_FILE; @@ -2059,7 +2059,7 @@ ConversionStatus Catalog::writeFile(QString localFile , bool overwrite) } else // check if the directory is writable { - QFileInfo dir(info.dirPath()); + TQFileInfo dir(info.dirPath()); if(!dir.isWritable()) { return NO_PERMISSIONS; @@ -2093,15 +2093,15 @@ ConversionStatus Catalog::writeFile(QString localFile , bool overwrite) filter = static_cast(factory->create(0, 0)); // provide progress bar indication - connect( filter, SIGNAL( signalResetProgressBar(QString,int) ), - this, SIGNAL( signalResetProgressBar(QString,int) )); - connect( filter, SIGNAL( signalProgress(int) ), - this, SIGNAL( signalProgress(int) )); - connect( filter, SIGNAL( signalClearProgressBar() ), - this, SIGNAL( signalClearProgressBar() )); + connect( filter, TQT_SIGNAL( signalResetProgressBar(TQString,int) ), + this, TQT_SIGNAL( signalResetProgressBar(TQString,int) )); + connect( filter, TQT_SIGNAL( signalProgress(int) ), + this, TQT_SIGNAL( signalProgress(int) )); + connect( filter, TQT_SIGNAL( signalClearProgressBar() ), + this, TQT_SIGNAL( signalClearProgressBar() )); - connect( this, SIGNAL( signalStopActivity() ), - filter, SLOT( stop() )); + connect( this, TQT_SIGNAL( signalStopActivity() ), + filter, TQT_SLOT( stop() )); // load in the file (target is always local) kdDebug(KBABEL) << "writeFile active" << endl; @@ -2117,13 +2117,13 @@ ConversionStatus Catalog::writeFile(QString localFile , bool overwrite) return error; } -QTextCodec* Catalog::codecForFile(QString gettextHeader) +TQTextCodec* Catalog::codecForFile(TQString gettextHeader) { - QString charset; + TQString charset; - QString head = gettextHeader; + TQString head = gettextHeader; - QRegExp r("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*[^\\\"\\n]+"); + TQRegExp r("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*[^\\\"\\n]+"); int begin=r.search(head); int len=r.matchedLength(); if(begin<0) { @@ -2133,13 +2133,13 @@ QTextCodec* Catalog::codecForFile(QString gettextHeader) head = head.mid(begin,len); - QRegExp regexp("charset *= *([^\\\\\\\"]+)"); + TQRegExp regexp("charset *= *([^\\\\\\\"]+)"); if( regexp.search( head ) > -1 ) { charset = regexp.cap(1); } - QTextCodec* codec=0; + TQTextCodec* codec=0; if(!charset.isEmpty()) { @@ -2148,20 +2148,20 @@ QTextCodec* Catalog::codecForFile(QString gettextHeader) // at least utf8, so utf8-codec can be used for both. if( charset == "CHARSET") { - codec=QTextCodec::codecForName("utf8"); + codec=TQTextCodec::codecForName("utf8"); kdDebug(KBABEL) - << QString("file seems to be a template: using utf8 encoding.") + << TQString("file seems to be a template: using utf8 encoding.") << endl; } else { - codec=QTextCodec::codecForName(charset.latin1()); + codec=TQTextCodec::codecForName(charset.latin1()); } if(!codec) { kdWarning() << "charset found, but no codec available, using UTF8 instead" << endl; - codec=QTextCodec::codecForName("utf8"); + codec=TQTextCodec::codecForName("utf8"); } } @@ -2170,81 +2170,81 @@ QTextCodec* Catalog::codecForFile(QString gettextHeader) PoInfo Catalog::headerInfo(const CatalogItem headerItem) { - QStringList header=headerItem.msgstrAsList(); + TQStringList header=headerItem.msgstrAsList(); - QStringList::Iterator it; + TQStringList::Iterator it; PoInfo info; // extract information from the header for(it=header.begin();it!=header.end();++it) { - if((*it).contains(QRegExp("^\\s*Project-Id-Version\\s*:\\s*.+\\s*$"))) + if((*it).contains(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*.+\\s*$"))) { - info.project=(*it).replace(QRegExp("^\\s*Project-Id-Version\\s*:\\s*"),""); + info.project=(*it).replace(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*"),""); if(info.project.right(2)=="\\n") info.project.remove(info.project.length()-2,2); info.project=info.project.simplifyWhiteSpace(); } - else if((*it).contains(QRegExp("^\\s*POT-Creation-Date\\s*:\\s*.+\\s*$"))) + else if((*it).contains(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*.+\\s*$"))) { - info.creation=(*it).replace(QRegExp("^\\s*POT-Creation-Date\\s*:\\s*"),""); + info.creation=(*it).replace(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*"),""); if(info.creation.right(2)=="\\n") info.creation.remove(info.creation.length()-2,2); info.creation=info.creation.simplifyWhiteSpace(); } - else if((*it).contains(QRegExp("^\\s*PO-Revision-Date\\s*:\\s*.+\\s*$"))) + else if((*it).contains(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*.+\\s*$"))) { - info.revision=(*it).replace(QRegExp("^\\s*PO-Revision-Date\\s*:\\s*"),""); + info.revision=(*it).replace(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*"),""); if(info.revision.right(2)=="\\n") info.revision.remove(info.revision.length()-2,2); info.revision=info.revision.simplifyWhiteSpace(); } - else if((*it).contains(QRegExp("^\\s*Last-Translator\\s*:\\s*.+\\s*$"))) + else if((*it).contains(TQRegExp("^\\s*Last-Translator\\s*:\\s*.+\\s*$"))) { - info.lastTranslator=(*it).replace(QRegExp("^\\s*Last-Translator\\s*:\\s*"),""); + info.lastTranslator=(*it).replace(TQRegExp("^\\s*Last-Translator\\s*:\\s*"),""); if(info.lastTranslator.right(2)=="\\n") info.lastTranslator.remove(info.lastTranslator.length()-2,2); info.lastTranslator=info.lastTranslator.simplifyWhiteSpace(); } - else if((*it).contains(QRegExp("^\\s*Language-Team\\s*:\\s*.+\\s*"))) + else if((*it).contains(TQRegExp("^\\s*Language-Team\\s*:\\s*.+\\s*"))) { - info.languageTeam=(*it).replace(QRegExp("^\\s*Language-Team\\s*:\\s*"),""); + info.languageTeam=(*it).replace(TQRegExp("^\\s*Language-Team\\s*:\\s*"),""); if(info.languageTeam.right(2)=="\\n") info.languageTeam.remove(info.languageTeam.length()-2,2); info.languageTeam=info.languageTeam.simplifyWhiteSpace(); } - else if((*it).contains(QRegExp("^\\s*MIME-Version\\s*:\\s*.+\\s*"))) + else if((*it).contains(TQRegExp("^\\s*MIME-Version\\s*:\\s*.+\\s*"))) { - info.mimeVersion=(*it).replace(QRegExp("^\\s*MIME-Version\\s*:\\s*"),""); + info.mimeVersion=(*it).replace(TQRegExp("^\\s*MIME-Version\\s*:\\s*"),""); if(info.mimeVersion.right(2)=="\\n") info.mimeVersion.remove(info.mimeVersion.length()-2,2); info.mimeVersion=info.mimeVersion.simplifyWhiteSpace(); } - else if((*it).contains(QRegExp("^\\s*Content-Type\\s*:\\s*.+\\s*"))) + else if((*it).contains(TQRegExp("^\\s*Content-Type\\s*:\\s*.+\\s*"))) { - info.contentType=(*it).replace(QRegExp("^\\s*Content-Type\\s*:\\s*"),""); + info.contentType=(*it).replace(TQRegExp("^\\s*Content-Type\\s*:\\s*"),""); if(info.contentType.right(2)=="\\n") info.contentType.remove(info.contentType.length()-2,2); info.contentType=info.contentType.simplifyWhiteSpace(); } - else if((*it).contains(QRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*.+\\s*"))) + else if((*it).contains(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*.+\\s*"))) { - info.encoding=(*it).replace(QRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*"),""); + info.encoding=(*it).replace(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*"),""); if(info.encoding.right(2)=="\\n") info.encoding.remove(info.encoding.length()-2,2); @@ -2253,7 +2253,7 @@ PoInfo Catalog::headerInfo(const CatalogItem headerItem) } else { - QString line=(*it); + TQString line=(*it); if(line.right(2)=="\\n") line.remove(line.length()-2,2); @@ -2455,7 +2455,7 @@ void Catalog::processCommand(EditCommand* cmd,CatalogView* view, bool undo) if(checkUntranslated && item.isUntranslated()) { - QValueList::Iterator it; + TQValueList::Iterator it; // insert index in the right place in the list it = d->_untransIndex.begin(); @@ -2478,7 +2478,7 @@ void Catalog::processCommand(EditCommand* cmd,CatalogView* view, bool undo) } else { - QValueList::Iterator it; + TQValueList::Iterator it; // insert index in the right place in the list it = d->_fuzzyIndex.begin(); @@ -2504,15 +2504,15 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le kdDebug(KBABEL) << "findNext active" << endl; d->_active=true; d->_stop=false; - connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); MiscSettings miscOptions = miscSettings(); len=0; int pos=0; - QString searchStr = findOpts->findStr; - QRegExp regexp(searchStr); + TQString searchStr = findOpts->findStr; + TQRegExp regexp(searchStr); if( findOpts->isRegExp ) { regexp.setCaseSensitive(findOpts->caseSensitive); @@ -2547,14 +2547,14 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le int accelMarkerPos = -1; int contextInfoLength = 0; int contextInfoPos = -1; - QString targetStr; + TQString targetStr; kapp->processEvents(10); if( d->_stop || endReached) { kdDebug(KBABEL) << "FindNext: endReached or stopped" << endl; - disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); kdDebug(KBABEL) << "findNext not active" << endl; d->_active=false; d->_stop=false; @@ -2603,9 +2603,9 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le if ((pos=regexp.search(targetStr,docPos.offset)) >= 0 ) { len = regexp.matchedLength(); if(findOpts->wholeWords) { - QString pre=targetStr.mid(pos-1,1); - QString post=targetStr.mid(pos+len,1); - if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){ + TQString pre=targetStr.mid(pos-1,1); + TQString post=targetStr.mid(pos+len,1); + if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){ success=true; docPos.offset=pos; } @@ -2621,9 +2621,9 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le len=searchStr.length(); if(findOpts->wholeWords) { - QString pre=targetStr.mid(pos-1,1); - QString post=targetStr.mid(pos+len,1); - if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){ + TQString pre=targetStr.mid(pos-1,1); + TQString post=targetStr.mid(pos+len,1); + if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){ success=true; docPos.offset=pos; } @@ -2763,7 +2763,7 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le } } - disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); kdDebug(KBABEL) << "findNext not active" << endl; d->_active=false; d->_stop=false; @@ -2779,15 +2779,15 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le kdDebug(KBABEL) << "findPrev active" << endl; d->_active=true; d->_stop=false; - connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); MiscSettings miscOptions = miscSettings(); len=0; int pos=0; - QString searchStr = findOpts->findStr; - QRegExp regexp(searchStr); + TQString searchStr = findOpts->findStr; + TQRegExp regexp(searchStr); if( findOpts->isRegExp ) { regexp.setCaseSensitive(findOpts->caseSensitive); @@ -2796,14 +2796,14 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le int accelMarkerPos = -1; int contextInfoLength = 0; int contextInfoPos = -1; - QString targetStr; + TQString targetStr; kapp->processEvents(10); if( d->_stop || beginReached) { kdDebug(KBABEL) << "FindNext: endReached or stopped" << endl; - disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); kdDebug(KBABEL) << "findPrev active" << endl; d->_active=false; d->_stop=false; @@ -2869,9 +2869,9 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le } if(found) { if(findOpts->wholeWords) { - QString pre=targetStr.mid(pos-1,1); - QString post=targetStr.mid(pos+len,1); - if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){ + TQString pre=targetStr.mid(pos-1,1); + TQString post=targetStr.mid(pos+len,1); + if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){ success=true; docPos.offset=pos; } @@ -2886,9 +2886,9 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le && (uint)pos < docPos.offset) { len=searchStr.length(); if(findOpts->wholeWords) { - QString pre=targetStr.mid(pos-1,1); - QString post=targetStr.mid(pos+len,1); - if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){ + TQString pre=targetStr.mid(pos-1,1); + TQString post=targetStr.mid(pos+len,1); + if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){ success=true; docPos.offset=pos; } @@ -3034,7 +3034,7 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le } } - disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); kdDebug(KBABEL) << "findPrev active" << endl; d->_active=false; d->_stop=false; @@ -3043,7 +3043,7 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le } -Catalog::DiffResult Catalog::diff(uint entry, QString *result) +Catalog::DiffResult Catalog::diff(uint entry, TQString *result) { if(!result) { @@ -3057,7 +3057,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result) } // first look if the diff for this entry is in the cache - QString *s = d->diffCache[entry]; + TQString *s = d->diffCache[entry]; if(s) { if(s->isEmpty()) @@ -3070,7 +3070,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result) // then look if the same msgid is contained in the diff file // FIXME: should care about plural forms in msgid - QString id = msgid(entry).first(); + TQString id = msgid(entry).first(); id.replace( "\n",""); if(d->msgidDiffList.contains(id)) { @@ -3080,21 +3080,21 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result) return DiffOk; } - connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); kdDebug(KBABEL) << "diffv active" << endl; d->_active=true; d->_stop=false; - QString idForDiff; + TQString idForDiff; // then look if there are entries with the same translation kdWarning() << "Diff feature (2) does not work with plural forms" << endl; - QString str = msgstr(entry).first(); + TQString str = msgstr(entry).first(); str.replace("\n",""); if(d->msgstr2MsgidDiffList.contains(str)) { - QStringList list = d->msgstr2MsgidDiffList[str]; + TQStringList list = d->msgstr2MsgidDiffList[str]; if(list.count() == 1) { @@ -3104,9 +3104,9 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result) { // find the best matching id double bestWeight = 0.6; - QString bestId; + TQString bestId; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for(it = list.begin(); it != list.end(); ++it) { double weight = LevenshteinDistance()(id, (*it)); @@ -3130,13 +3130,13 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result) // find the best matching id double bestWeight = 0.6; - QString bestId; + TQString bestId; int counter=0; int oldPercent=0; int max = QMAX( d->msgidDiffList.count()-1, 1); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for(it = d->msgidDiffList.begin(); it != d->msgidDiffList.end(); ++it) { @@ -3159,7 +3159,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result) if( d->_stop ) { - disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); kdDebug (KBABEL) << "diffv not active" << endl; @@ -3180,7 +3180,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result) if( idForDiff.isEmpty() ) { - s = new QString(*result); + s = new TQString(*result); if( !d->diffCache.insert(entry,s) ) delete s; @@ -3190,16 +3190,16 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result) return DiffNotFound; } - QString r = wordDiff(idForDiff,id); + TQString r = wordDiff(idForDiff,id); //esp for plural forms - *result = r.replace("\\n" + QString(QChar(0x00B6)) + "", "\\n\n"); + *result = r.replace("\\n" + TQString(TQChar(0x00B6)) + "", "\\n\n"); - s = new QString(*result); + s = new TQString(*result); if( !d->diffCache.insert(entry,s) ) delete s; - disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); kdDebug(KBABEL) << "diffv not active" << endl; d->_active=false; d->_stop=false; @@ -3207,9 +3207,9 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result) return DiffOk; } -void Catalog::setDiffList( const QValueList& list) +void Catalog::setDiffList( const TQValueList& list) { - connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); kdDebug(KBABEL) << "setDiffList active" << endl; d->_active=true; d->_stop=false; @@ -3223,7 +3223,7 @@ void Catalog::setDiffList( const QValueList& list) uint max = QMAX(list.count()-1,1); int oldPercent=0; uint counter=0; - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for(it = list.begin(); it != list.end(); ++it) { int percent = (100*counter)/max; @@ -3235,9 +3235,9 @@ void Catalog::setDiffList( const QValueList& list) kapp->processEvents(10); } - QString id = (*it).msgid; + TQString id = (*it).msgid; id.replace("\n",""); - QString str = (*it).msgstr; + TQString str = (*it).msgstr; str.replace("\n",""); d->msgidDiffList.append(id); @@ -3245,12 +3245,12 @@ void Catalog::setDiffList( const QValueList& list) { if(d->msgstr2MsgidDiffList.contains(str)) { - QStringList sl = d->msgstr2MsgidDiffList[str]; + TQStringList sl = d->msgstr2MsgidDiffList[str]; sl.append(id); } else { - QStringList sl; + TQStringList sl; sl.append(id); d->msgstr2MsgidDiffList.insert(str,sl); } @@ -3259,17 +3259,17 @@ void Catalog::setDiffList( const QValueList& list) emit signalClearProgressBar(); - disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() )); + disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() )); kdDebug(KBABEL) << "setDiffList not active" << endl; d->_active=false; d->_stop=false; } -QValueList Catalog::asDiffList() +TQValueList Catalog::asDiffList() { - QValueList list; + TQValueList list; - for ( QValueVector::Iterator it = d->_entries.begin(); + for ( TQValueVector::Iterator it = d->_entries.begin(); it != d->_entries.end(); ++it) { DiffEntry e; @@ -3299,7 +3299,7 @@ void Catalog::getNumberOfPluralForms() return; } - QString lang=options.languageCode; + TQString lang=options.languageCode; if(lang.isEmpty()) { d->numberOfPluralForms=-1; @@ -3309,7 +3309,7 @@ void Catalog::getNumberOfPluralForms() d->numberOfPluralForms = getNumberOfPluralForms(lang); } -int Catalog::getNumberOfPluralForms(const QString& lang) +int Catalog::getNumberOfPluralForms(const TQString& lang) { int nr=-1; @@ -3323,7 +3323,7 @@ int Catalog::getNumberOfPluralForms(const QString& lang) "that out if unsure, the programs will crash!!\n" "Definition of PluralForm - to be set by the translator of kdelibs.po"; - QString formsTranslation = locale.translate(formsString); + TQString formsTranslation = locale.translate(formsString); // no translation found if(formsTranslation == formsString || formsTranslation.isEmpty()) @@ -3385,44 +3385,44 @@ bool Catalog::isModified() const return d->_modified; } -void Catalog::setEntries(QValueVector entries) +void Catalog::setEntries(TQValueVector entries) { d->_entries=entries; // update the project for entries - for ( QValueVector::Iterator it = d->_entries.begin(); + for ( TQValueVector::Iterator it = d->_entries.begin(); it != d->_entries.end(); ++it) { it->setProject( d->_project ); } } -void Catalog::setObsoleteEntries(QValueList entries) +void Catalog::setObsoleteEntries(TQValueList entries) { d->_obsoleteEntries=entries; } -QValueList Catalog::obsoleteEntries() const +TQValueList Catalog::obsoleteEntries() const { return d->_obsoleteEntries; } -void Catalog::setCatalogExtraData(const QStringList& data) +void Catalog::setCatalogExtraData(const TQStringList& data) { d->_catalogExtra = data; } -QStringList Catalog::catalogExtraData() const +TQStringList Catalog::catalogExtraData() const { return d->_catalogExtra; } -QString Catalog::importPluginID() const +TQString Catalog::importPluginID() const { return d->_importID; } -QTextCodec* Catalog::fileCodec() const +TQTextCodec* Catalog::fileCodec() const { return d->fileCodec; } @@ -3432,17 +3432,17 @@ void Catalog::setGeneratedFromDocbook(const bool generated) d->_generatedFromDocbook = generated; } -void Catalog::setFileCodec( QTextCodec* codec ) +void Catalog::setFileCodec( TQTextCodec* codec ) { d->fileCodec = codec; } -void Catalog::setErrorIndex( const QValueList& list ) +void Catalog::setErrorIndex( const TQValueList& list ) { d->_errorIndex = list; } -void Catalog::setImportPluginID( const QString& id ) +void Catalog::setImportPluginID( const TQString& id ) { d->_importID = id; } @@ -3463,12 +3463,12 @@ bool Catalog::isActive() return d->_active; } -void Catalog::setMimeTypes( const QString& mimeTypes ) +void Catalog::setMimeTypes( const TQString& mimeTypes ) { d->_mimeTypes = mimeTypes; } -QString Catalog::mimeTypes() const +TQString Catalog::mimeTypes() const { return d->_mimeTypes; } @@ -3479,21 +3479,21 @@ void Catalog::wordCount (uint &total, uint &fuzzy, uint &untranslated) const fuzzy = 0; untranslated = 0; - QRegExp separator( "[ \n\t]+" ); + TQRegExp separator( "[ \n\t]+" ); - for ( QValueVector::Iterator it = d->_entries.begin(); + for ( TQValueVector::Iterator it = d->_entries.begin(); it != d->_entries.end(); ++it) { // find out the number of words for this message // join all forms together - QString message = (*it).msgid ().join (" "); + TQString message = (*it).msgid ().join (" "); // remove tags first d->_tagExtractor->setString( message ); message = d->_tagExtractor->plainString(false); - QStringList words = QStringList::split ( separator, message ); + TQStringList words = TQStringList::split ( separator, message ); total += words.count(); diff --git a/kbabel/common/catalog.h b/kbabel/common/catalog.h index db47c48b..27b22bab 100644 --- a/kbabel/common/catalog.h +++ b/kbabel/common/catalog.h @@ -42,8 +42,8 @@ #include "catalogfileplugin.h" #include "kbproject.h" -#include -#include +#include +#include #include #include @@ -95,8 +95,8 @@ struct DocPosition */ struct DiffEntry { - QString msgid; - QString msgstr; + TQString msgid; + TQString msgstr; }; /** @@ -121,17 +121,17 @@ public: * * @return Codec for found charset or 0, if no information has been found */ - static QTextCodec* codecForFile(QString gettextHeader); + static TQTextCodec* codecForFile(TQString gettextHeader); static PoInfo headerInfo(const CatalogItem headerItem); /** * A constructor for an empty message catalog. - * @param parent parent @ref QObject for this catalog + * @param parent parent @ref TQObject for this catalog * @param name unique name for this object * @param configFile configuration file to read config from */ - Catalog(QObject* parent=0, const char* name=0, QString projectFile = QString() ); + Catalog(TQObject* parent=0, const char* name=0, TQString projectFile = TQString() ); /** * Deprecated. A copy constructor. Do not use since each Catalog registers @@ -146,7 +146,7 @@ public: * @param index index of the requested message * @return context for the given message */ - QString msgctxt(uint index) const; + TQString msgctxt(uint index) const; /** * Get list of texts for a given message in original language. Each entry in the list @@ -157,7 +157,7 @@ public: * (useful for searching etc) * @return list of singular/plural forms of the original text */ - QStringList msgid(uint index, const bool noNewlines=false) const; + TQStringList msgid(uint index, const bool noNewlines=false) const; /** * Get list of translated texts for a given message. Each entry in the list @@ -168,7 +168,7 @@ public: * (useful for searching etc) * @return list of translated singular/plural forms */ - QStringList msgstr(uint index, const bool noNewlines=false) const; + TQStringList msgstr(uint index, const bool noNewlines=false) const; /** * Get the comment for a given message. @@ -176,7 +176,7 @@ public: * @param index index of the requested message * @return comment for the given message */ - QString comment(uint index) const; + TQString comment(uint index) const; /** * Get the context information for a given message. This works @@ -187,7 +187,7 @@ public: * @return context information found in the message comment * @deprecated */ - QString context(uint index) const KDE_DEPRECATED; + TQString context(uint index) const KDE_DEPRECATED; /** * Get the header for the current file. @@ -201,31 +201,31 @@ public: * * @return string representation of the name and e-mail address */ - QString lastTranslator() const; + TQString lastTranslator() const; /** * @return The list of obsolete entries. These cannot be changed at * all and are stored for import/export purposes. */ - QValueList obsoleteEntries() const; + TQValueList obsoleteEntries() const; /** * @return The index of the item, that has the msgid id. * If no item is found, -1 is returned. */ - int indexForMsgid(const QString& id) const; + int indexForMsgid(const TQString& id) const; /** @return a list of tags in entry #index */ - QStringList tagList(uint index); + TQStringList tagList(uint index); /** @return a list of arguments in entry #index */ - QStringList argList(uint index); + TQStringList argList(uint index); /** * @return the list of errors found for a given item index * @param index index of the item to check */ - QStringList itemStatus(uint index); + TQStringList itemStatus(uint index); /** * @return the list of errors found for a given item index @@ -233,18 +233,18 @@ public: * @param recheck flag, if the item status should be checked now * @param whatToCheck what checks to do (a list of tools to be used */ - QStringList itemStatus(uint index, bool recheck, QPtrList whatToCheck); + TQStringList itemStatus(uint index, bool recheck, TQPtrList whatToCheck); /** * replaces msgstr in catalog item at index index with msgstr * returns true, if untranslated status changed */ - //bool setMsgstr(uint index,QString msgstr); + //bool setMsgstr(uint index,TQString msgstr); /** * replaces comment in catalog item at index index with comment * returns true, if fuzzy status changed */ - //bool setComment(uint index,QString comment); + //bool setComment(uint index,TQString comment); /** * replaces header with given String * @return false if the header is not valid @@ -270,40 +270,40 @@ public: /** * @return package name for the current catalog */ - QString packageName() const; + TQString packageName() const; /** * @return directory for the package of the current catalog */ - QString packageDir() const; + TQString packageDir() const; /** * @return package name and directory for the current catalog */ - QString package() const; + TQString package() const; /** * Setup the package for the catalog. It tries to parse the * package and split it to name and directory * @param package the name and directory to be set as package */ - void setPackage(const QString& package); + void setPackage(const TQString& package); /** * @return encoding for the current catalog */ - QString encoding() const; + TQString encoding() const; /** * opens file url by using KDE's network downlad and calls * openFile with a local filename */ - ConversionStatus openURL(const KURL& url, const QString& package=QString::null); + ConversionStatus openURL(const KURL& url, const TQString& package=TQString::null); /** * opens file openURL by using KDE's network downlad and calls * openFile with a local filename * sets current URL to saveURL */ - ConversionStatus openURL(const KURL& openURL, const KURL& saveURL, const QString& package=QString::null); + ConversionStatus openURL(const KURL& openURL, const KURL& saveURL, const TQString& package=TQString::null); /** save the file under the old filename */ ConversionStatus saveFile(); @@ -314,25 +314,25 @@ public: * saves the current catalog in a temporary file and * returns the name and path of the file. */ - QString saveTempFile(); + TQString saveTempFile(); /** * @return extra data for the catalog as set by the import filter */ - QStringList catalogExtraData() const; + TQStringList catalogExtraData() const; /** * @return ID string of the used import filter */ - QString importPluginID() const; + TQString importPluginID() const; /** * @return list of MIME types (separated by comma) this catalog * can be viewed as. It is set by the used import filter. */ - QString mimeTypes() const; + TQString mimeTypes() const; /** * @return the file codec used for the current catalog */ - QTextCodec* fileCodec() const; + TQTextCodec* fileCodec() const; /** * Check syntax of the GNU gettext PO file using 'msgfmt'. @@ -341,7 +341,7 @@ public: * @param clearError should the errors be cleared before running msgfmt * @return the file codec used for the current catalog */ - Msgfmt::Status checkSyntax(QString& output, bool clearErrors=true); + Msgfmt::Status checkSyntax(TQString& output, bool clearErrors=true); /** * checks using an external tool. The tool must provide the "validate" command @@ -355,7 +355,7 @@ public: * with the datatype expected to be CatalogItem *. The MIME type * is application/x-kbabel-catalogitem. */ - void modifyUsingTool(KDataTool* tool, const QString& command); + void modifyUsingTool(KDataTool* tool, const TQString& command); /** * Returns true, if there is an ongoing activity, such as load/save @@ -483,7 +483,7 @@ public: * the search in po-files. This way, I can easily find the first * catalog entry in the textstream */ -// static ConversionStatus readHeader(QTextStream& stream,CatalogItem& header); +// static ConversionStatus readHeader(TQTextStream& stream,CatalogItem& header); void registerView(CatalogView* view); @@ -531,23 +531,23 @@ public: * tries to find a corresponding entry for entry entry * from the list of old messages and calculates the diff for it */ - DiffResult diff(uint entry, QString* result); + DiffResult diff(uint entry, TQString* result); /** * sets a list of entries to generate a diff from */ - void setDiffList( const QValueList& ); + void setDiffList( const TQValueList& ); /** * @return the contents of this catalog as list for diffs */ - QValueList asDiffList(); + TQValueList asDiffList(); /** * @return how many plural forms are used in language lang. * If nothing is found -1 is returned. */ - static int getNumberOfPluralForms(const QString& lang); + static int getNumberOfPluralForms(const TQString& lang); public slots: /** @@ -611,7 +611,7 @@ private: void processCommand(EditCommand* cmd, CatalogView* view2exclude=0, bool undo=false); /** do the actual file write using plugin */ - ConversionStatus writeFile(QString localfile, bool overwrite=false); + ConversionStatus writeFile(TQString localfile, bool overwrite=false); /** * generates lists that contain indexes of all fuzzy and untranslated entries @@ -622,15 +622,15 @@ private: * returns value in list that is lower than parameter index * or -1 if there is none */ - int findPrevInList(const QValueList& list,uint index) const; + int findPrevInList(const TQValueList& list,uint index) const; /** * returns value in list that is bigger than parameter index * or -1 if there is none */ - int findNextInList(const QValueList& list,uint index) const; + int findNextInList(const TQValueList& list,uint index) const; /** returns the current date and time in the format of the users choice */ - QString dateTime() const; + TQString dateTime() const; /** clear the list of all errors */ void clearErrorList(); @@ -648,26 +648,26 @@ private: /** set the flag that the catalog is generated from docbook */ void setGeneratedFromDocbook(const bool generated); /** set the entries of the catalog */ - void setEntries( QValueVector entries); + void setEntries( TQValueVector entries); /** set the obsolete entries of the catalog */ - void setObsoleteEntries( QValueList entries); + void setObsoleteEntries( TQValueList entries); /** set extra data for the catalog as defined by import plugin */ - void setCatalogExtraData(const QStringList& data); + void setCatalogExtraData(const TQStringList& data); /** set file codec for the catalog */ - void setFileCodec(QTextCodec* codec); + void setFileCodec(TQTextCodec* codec); /** set the list of import errors */ - void setErrorIndex(const QValueList&errors); + void setErrorIndex(const TQValueList&errors); /** set ID of the used import plugin */ - void setImportPluginID(const QString& id); + void setImportPluginID(const TQString& id); /** set the MIME types for the current catalog as defined by import plugin */ - void setMimeTypes(const QString& mimeTypes); + void setMimeTypes(const TQString& mimeTypes); private: CatalogPrivate* d; signals: - void signalError(QString); - void signalResetProgressBar(QString,int); + void signalError(TQString); + void signalResetProgressBar(TQString,int); void signalProgress(int); void signalClearProgressBar(); diff --git a/kbabel/common/catalog_private.h b/kbabel/common/catalog_private.h index 645353f3..153c8486 100644 --- a/kbabel/common/catalog_private.h +++ b/kbabel/common/catalog_private.h @@ -35,12 +35,12 @@ #ifndef CATALOGPRIVATE_H #define CATALOGPRIVATE_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include "msgfmt.h" @@ -66,20 +66,20 @@ public: /** url of the po-file, that belongs to this catalog */ KURL _url; - QString _packageName; - QString _packageDir; + TQString _packageName; + TQString _packageDir; /** holds the entries in the catalog */ - QValueVector _entries; + TQValueVector _entries; /** The header of the po-file. */ CatalogItem _header; /** list of obsolete entries */ - QValueList _obsoleteEntries; + TQValueList _obsoleteEntries; /** identification string for used import filter*/ - QString _importID; - QString _mimeTypes; + TQString _importID; + TQString _mimeTypes; bool _modified; bool _readOnly; @@ -87,34 +87,34 @@ public: bool _active; bool _stop; - QValueList _fuzzyIndex; - QValueList _untransIndex; - QValueList _errorIndex; + TQValueList _fuzzyIndex; + TQValueList _untransIndex; + TQValueList _errorIndex; - QPtrList _views; + TQPtrList _views; TagSettings _tagSettings; - QPtrList _undoList; - QPtrList _redoList; + TQPtrList _undoList; + TQPtrList _redoList; - QTextCodec *fileCodec; + TQTextCodec *fileCodec; - QStringList msgidDiffList; - QMap< QString, QStringList > msgstr2MsgidDiffList; - QIntCache diffCache; + TQStringList msgidDiffList; + TQMap< TQString, TQStringList > msgstr2MsgidDiffList; + TQIntCache diffCache; int numberOfPluralForms; Project::Ptr _project; RegExpExtractor *_tagExtractor, *_argExtractor; - QStringList _catalogExtra; + TQStringList _catalogExtra; CatalogPrivate(Project::Ptr project) : - _packageName( QString::null ), _packageDir( QString::null ), + _packageName( TQString::null ), _packageDir( TQString::null ), _header (project), - _importID( QString::null ), _mimeTypes( "text/plain" ), + _importID( TQString::null ), _mimeTypes( "text/plain" ), _modified(false), _readOnly(false), _generatedFromDocbook(false), _active(false), _stop(false), fileCodec(0), diffCache(30,76), numberOfPluralForms(-1), @@ -129,8 +129,8 @@ public: _undoList.setAutoDelete(true); _redoList.setAutoDelete(true); - _tagExtractor = new RegExpExtractor(QStringList()); - _argExtractor = new RegExpExtractor(QStringList()); + _tagExtractor = new RegExpExtractor(TQStringList()); + _argExtractor = new RegExpExtractor(TQStringList()); _catalogExtra.clear(); } diff --git a/kbabel/common/catalogfileplugin.h b/kbabel/common/catalogfileplugin.h index f47e0d89..caa94c17 100644 --- a/kbabel/common/catalogfileplugin.h +++ b/kbabel/common/catalogfileplugin.h @@ -32,7 +32,7 @@ #ifndef IMPORTPLUGIN_H #define IMPORTPLUGIN_H -#include +#include #include @@ -84,7 +84,7 @@ class KDE_EXPORT CatalogImportPlugin: public QObject Q_OBJECT public: - CatalogImportPlugin(QObject* parent, const char* name); + CatalogImportPlugin(TQObject* parent, const char* name); virtual ~CatalogImportPlugin(); /** @@ -96,7 +96,7 @@ public: * @param catalog the catalog to be filled * @return result of the operation */ - ConversionStatus open(const QString& file, const QString& mimetype, Catalog* catalog); + ConversionStatus open(const TQString& file, const TQString& mimetype, Catalog* catalog); /** * Reimplement this method to load the local file passed as an argument. @@ -108,16 +108,16 @@ public: * @param file file to be loaded * @param mimetype the expected MIME type (the type used for plugin selection */ - virtual ConversionStatus load(const QString& file, const QString& mimetype) = 0; + virtual ConversionStatus load(const TQString& file, const TQString& mimetype) = 0; /** * Reimplement this method to return unique identification of your plugin */ - virtual const QString id() = 0; + virtual const TQString id() = 0; /** @return the list of all available MIME types for which there * is a import plugin. */ - static QStringList availableImportMimeTypes(); + static TQStringList availableImportMimeTypes(); public slots: /** stop the current operation */ @@ -133,17 +133,17 @@ protected: /** set flag that the file is generated from DocBook */ void setGeneratedFromDocbook(const bool fromDocbook); /** set the list of parse error indexes */ - void setErrorIndex(const QValueList& errors); + void setErrorIndex(const TQValueList& errors); /** set the file codec */ - void setFileCodec(QTextCodec* codec); + void setFileCodec(TQTextCodec* codec); /** set extra data for the catalog, which can't be stored in * @ref CatalogItem. The format can be arbitrary */ - void setCatalogExtraData( const QStringList& data ); + void setCatalogExtraData( const TQStringList& data ); /** set the header catalog item */ void setHeader( const CatalogItem& header ); /** set the MIME types which can be used for this catalog */ - void setMimeTypes( const QString& catalog ); + void setMimeTypes( const TQString& catalog ); /** start a new transaction. You should never call this method. */ void startTransaction(); @@ -155,7 +155,7 @@ protected: signals: /** Signal start of the operation */ - void signalResetProgressBar(QString,int); + void signalResetProgressBar(TQString,int); /** Signal progress of the operation */ void signalProgress(int); /** Signal end of the operation */ @@ -179,11 +179,11 @@ class KDE_EXPORT CatalogExportPlugin: public QObject Q_OBJECT public: - CatalogExportPlugin(QObject* parent, const char* name); + CatalogExportPlugin(TQObject* parent, const char* name); virtual ~CatalogExportPlugin(); - virtual ConversionStatus save(const QString& file, const QString& mimetype, const Catalog* catalog) = 0; + virtual ConversionStatus save(const TQString& file, const TQString& mimetype, const Catalog* catalog) = 0; - static QStringList availableExportMimeTypes(); + static TQStringList availableExportMimeTypes(); public slots: void stop(); @@ -192,7 +192,7 @@ protected: bool isStopped() const; signals: - void signalResetProgressBar(QString,int); + void signalResetProgressBar(TQString,int); void signalProgress(int); void signalClearProgressBar(); diff --git a/kbabel/common/catalogitem.cpp b/kbabel/common/catalogitem.cpp index ced02e8c..bd55d7b6 100644 --- a/kbabel/common/catalogitem.cpp +++ b/kbabel/common/catalogitem.cpp @@ -40,9 +40,9 @@ #include "regexpextractor.h" -#include -#include -#include +#include +#include +#include using namespace KBabel; @@ -65,16 +65,16 @@ CatalogItem::~CatalogItem() delete d; } -QString CatalogItem::comment() const +TQString CatalogItem::comment() const { return d->_comment; } -QString CatalogItem::msgctxt(const bool noNewlines) const +TQString CatalogItem::msgctxt(const bool noNewlines) const { if( noNewlines ) { - QString tmp = d->_msgctxt; + TQString tmp = d->_msgctxt; tmp.replace("\n", " "); // ### TODO: " " or "" ? return tmp; } @@ -82,9 +82,9 @@ QString CatalogItem::msgctxt(const bool noNewlines) const return d->_msgctxt; } -QStringList CatalogItem::msgid(const bool noNewlines) const +TQStringList CatalogItem::msgid(const bool noNewlines) const { - QStringList result=d->_msgid; + TQStringList result=d->_msgid; if( noNewlines ) { result.gres( "\n", "" ); @@ -92,9 +92,9 @@ QStringList CatalogItem::msgid(const bool noNewlines) const return result; } -QStringList CatalogItem::msgstr(const bool noNewlines) const +TQStringList CatalogItem::msgstr(const bool noNewlines) const { - QStringList result=d->_msgstr; + TQStringList result=d->_msgstr; if( noNewlines ) { result.gres( "\n", "" ); @@ -102,12 +102,12 @@ QStringList CatalogItem::msgstr(const bool noNewlines) const return result; } -QStringList CatalogItem::msgstrAsList(int nr) const +TQStringList CatalogItem::msgstrAsList(int nr) const { - QString str; + TQString str; if(d->_gettextPluralForm && nr > 0) { - QStringList::ConstIterator it = d->_msgstr.at(nr); + TQStringList::ConstIterator it = d->_msgstr.at(nr); if(it != d->_msgstr.end()) { str = *it; @@ -123,7 +123,7 @@ QStringList CatalogItem::msgstrAsList(int nr) const str = d->_msgstr.first(); } - QStringList list=QStringList::split("\n",str); + TQStringList list=TQStringList::split("\n",str); if(str.left(1)=="\n") list.prepend(""); @@ -139,32 +139,32 @@ bool CatalogItem::isValid() const return d->_valid; } -void CatalogItem::setMsgctxt(QString msg) +void CatalogItem::setMsgctxt(TQString msg) { d->_msgctxt=msg; } -void CatalogItem::setMsgid(QString msg) +void CatalogItem::setMsgid(TQString msg) { d->_msgid=msg; } -void CatalogItem::setMsgid(QStringList msg) +void CatalogItem::setMsgid(TQStringList msg) { d->_msgid=msg; } -void CatalogItem::setMsgstr(QString msg) +void CatalogItem::setMsgstr(TQString msg) { d->_msgstr=msg; } -void CatalogItem::setMsgstr(QStringList msg) +void CatalogItem::setMsgstr(TQStringList msg) { d->_msgstr=msg; } -void CatalogItem::setComment(QString com) +void CatalogItem::setComment(TQString com) { d->_comment=com; } @@ -174,31 +174,31 @@ void CatalogItem::setGettextPluralForm( bool _gettextPlural ) d->_gettextPluralForm = _gettextPlural; } -QStringList CatalogItem::errors() const +TQStringList CatalogItem::errors() const { return d->_errors; } -QStringList CatalogItem::tagList( RegExpExtractor& te) +TQStringList CatalogItem::tagList( RegExpExtractor& te) { if(!d->_haveTagList) { // FIXME: should care about plural forms in msgid te.setString(msgid(true).first()); - d->_tagList = QStringList(te.matches()); + d->_tagList = TQStringList(te.matches()); d->_haveTagList = true; } return d->_tagList; } -QStringList CatalogItem::argList( RegExpExtractor& te) +TQStringList CatalogItem::argList( RegExpExtractor& te) { if(!d->_haveArgList) { // FIXME: should care about plural forms in msgid te.setString(msgid(true).first()); - d->_argList = QStringList(te.matches()); + d->_argList = TQStringList(te.matches()); } return d->_argList; @@ -207,29 +207,29 @@ QStringList CatalogItem::argList( RegExpExtractor& te) bool CatalogItem::isFuzzy() const { - return d->_comment.find( QRegExp(",\\s*fuzzy") ) != -1; + return d->_comment.find( TQRegExp(",\\s*fuzzy") ) != -1; } bool CatalogItem::isCformat() const { // Allow "possible-c-format" (from xgettext --debug) or "c-format" // Note the regexp (?: ) is similar to () but it does not capture (so it is faster) - return d->_comment.find( QRegExp(",\\s*(?:possible-)c-format") ) == -1; + return d->_comment.find( TQRegExp(",\\s*(?:possible-)c-format") ) == -1; } bool CatalogItem::isNoCformat() const { - return d->_comment.find( QRegExp(",\\s*no-c-format") ) == -1; + return d->_comment.find( TQRegExp(",\\s*no-c-format") ) == -1; } bool CatalogItem::isQtformat() const { - return d->_comment.find( QRegExp(",\\s*qt-format") ) == -1; + return d->_comment.find( TQRegExp(",\\s*qt-format") ) == -1; } bool CatalogItem::isNoQtformat() const { - return d->_comment.find( QRegExp(",\\s*no-qt-format") ) == -1; + return d->_comment.find( TQRegExp(",\\s*no-qt-format") ) == -1; } bool CatalogItem::isUntranslated() const @@ -260,7 +260,7 @@ int CatalogItem::totalLines() const msgctxtLines=d->_msgctxt.contains('\n')+1; } int msgidLines=0; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for(it=d->_msgid.begin(); it != d->_msgid.end(); ++it) { msgidLines += (*it).contains('\n')+1; @@ -292,17 +292,17 @@ void CatalogItem::setSyntaxError(bool on) d->_errors.remove("syntax error"); } -QPtrList CatalogItem::removeFuzzy(bool doIt) +TQPtrList CatalogItem::removeFuzzy(bool doIt) { - QPtrList editList; + TQPtrList editList; editList.setAutoDelete(false); - QString comment=d->_comment; + TQString comment=d->_comment; if(isFuzzy()) { EditCommand *cmd; - QRegExp fuzzyStr(",\\s*fuzzy"); + TQRegExp fuzzyStr(",\\s*fuzzy"); int offset; offset=comment.find(fuzzyStr); @@ -318,7 +318,7 @@ QPtrList CatalogItem::removeFuzzy(bool doIt) } // remove empty comment lines - if( comment.contains( QRegExp("^#\\s*$") )) + if( comment.contains( TQRegExp("^#\\s*$") )) { cmd = new DelTextCmd(0,comment,0); cmd->setPart(Comment); @@ -326,9 +326,9 @@ QPtrList CatalogItem::removeFuzzy(bool doIt) comment=""; } - if( comment.contains( QRegExp("\n#\\s*$") )) + if( comment.contains( TQRegExp("\n#\\s*$") )) { - offset=comment.find( QRegExp("\n#\\s*$") ); + offset=comment.find( TQRegExp("\n#\\s*$") ); while(offset>=0) { cmd = new DelTextCmd(offset,comment.mid(offset),0); @@ -337,12 +337,12 @@ QPtrList CatalogItem::removeFuzzy(bool doIt) comment.remove(offset,comment.length()-offset); - offset=comment.find( QRegExp("\n#\\s*$"), offset+1 ); + offset=comment.find( TQRegExp("\n#\\s*$"), offset+1 ); } } - if( comment.contains( QRegExp("\n#\\s*\n") )) + if( comment.contains( TQRegExp("\n#\\s*\n") )) { - offset=comment.find( QRegExp("\n#\\s*\n") )+1; + offset=comment.find( TQRegExp("\n#\\s*\n") )+1; while(offset>=0) { int endIndex=comment.find("\n",offset)+1; @@ -353,7 +353,7 @@ QPtrList CatalogItem::removeFuzzy(bool doIt) comment.remove(offset,endIndex-offset); - offset=comment.find( QRegExp("\n#\\s*\n"), offset+1 ); + offset=comment.find( TQRegExp("\n#\\s*\n"), offset+1 ); } } @@ -367,9 +367,9 @@ QPtrList CatalogItem::removeFuzzy(bool doIt) -QPtrList CatalogItem::addFuzzy(bool doIt) +TQPtrList CatalogItem::addFuzzy(bool doIt) { - QPtrList editList; + TQPtrList editList; editList.setAutoDelete(false); @@ -378,7 +378,7 @@ QPtrList CatalogItem::addFuzzy(bool doIt) EditCommand *cmd; int offset=d->_comment.length(); - QString addStr; + TQString addStr; if(offset > 0 && d->_comment[offset-1] != '\n') { addStr='\n'; @@ -487,7 +487,7 @@ void CatalogItem::operator=(const CatalogItem& rhs) d->_gettextPluralForm = rhs.d->_gettextPluralForm; } -QString CatalogItem::nextError() const +TQString CatalogItem::nextError() const { return d->_errors.first(); } @@ -497,13 +497,13 @@ void CatalogItem::clearErrors() d->_errors.clear(); } -void CatalogItem::appendError(const QString& error ) +void CatalogItem::appendError(const TQString& error ) { if( !d->_errors.contains( error ) ) d->_errors.append(error); } -void CatalogItem::removeError(const QString& error ) +void CatalogItem::removeError(const TQString& error ) { d->_errors.remove(error); } diff --git a/kbabel/common/catalogitem.h b/kbabel/common/catalogitem.h index 91e6cc25..9a7d6071 100644 --- a/kbabel/common/catalogitem.h +++ b/kbabel/common/catalogitem.h @@ -34,8 +34,8 @@ #ifndef CATALOGITEM_H #define CATALOGITEM_H -#include -#include +#include +#include #include "pluralforms.h" #include "editcmd.h" @@ -127,14 +127,14 @@ public: * @param doIt if false, the comment is not changed, just the * commands for doing it are calculated */ - QPtrList removeFuzzy(bool doIt=true); + TQPtrList removeFuzzy(bool doIt=true); /** * adds the string ", fuzzy" to the comment * @param doIt if false, the comment is not changed, just the * commands for doing it are calculated */ - QPtrList addFuzzy(bool doIt=true); + TQPtrList addFuzzy(bool doIt=true); /** cleares the item */ @@ -142,13 +142,13 @@ public: /** returns the comment of this entry */ - QString comment() const; + TQString comment() const; /** returns the msgctxt of this entry */ - QString msgctxt(const bool noNewlines = false) const; + TQString msgctxt(const bool noNewlines = false) const; /** returns the msgid of the entry */ - QStringList msgid(const bool noNewlines = false) const; + TQStringList msgid(const bool noNewlines = false) const; /** returns the msgstr of the entry */ - QStringList msgstr(const bool noNewlines = false) const; + TQStringList msgstr(const bool noNewlines = false) const; /** * @param pluralNr If this item is a gettext plural form item, @@ -156,14 +156,14 @@ public: * is returned * @return the msgstr as list */ - QStringList msgstrAsList(int pluralNr=0) const; - - void setComment(QString com); - void setMsgctxt(QString msg); - void setMsgid(QString msg); - void setMsgid(QStringList msg); - void setMsgstr(QString msg); - void setMsgstr(QStringList msg); + TQStringList msgstrAsList(int pluralNr=0) const; + + void setComment(TQString com); + void setMsgctxt(TQString msg); + void setMsgid(TQString msg); + void setMsgid(TQStringList msg); + void setMsgstr(TQString msg); + void setMsgstr(TQStringList msg); void setGettextPluralForm( bool _gettextPlurals ); @@ -173,20 +173,20 @@ public: /** @return a list of tags in the msgid */ - QStringList tagList( RegExpExtractor& tagExtractor ); + TQStringList tagList( RegExpExtractor& tagExtractor ); /** @return a list of args in the msgid */ - QStringList argList( RegExpExtractor& argExtractor); + TQStringList argList( RegExpExtractor& argExtractor); /** * @return the list of all errors of this item */ - QStringList errors() const; + TQStringList errors() const; - QString nextError() const; + TQString nextError() const; void clearErrors(); - void removeError(const QString& error); - void appendError(const QString& error); + void removeError(const TQString& error); + void appendError(const TQString& error); /** * makes some sanity checks and set status accordingly @@ -200,8 +200,8 @@ public: * @param neededLines how many lines a string with singular-plural form * must have */ - int checkErrors(QChar accelMarker, const QRegExp& contextInfo - , const QRegExp& singularPlural, const int neededLines); + int checkErrors(TQChar accelMarker, const TQRegExp& contextInfo + , const TQRegExp& singularPlural, const int neededLines); void operator=(const CatalogItem& rhs); diff --git a/kbabel/common/catalogitem_private.h b/kbabel/common/catalogitem_private.h index 15c81fc7..411e76b2 100644 --- a/kbabel/common/catalogitem_private.h +++ b/kbabel/common/catalogitem_private.h @@ -34,7 +34,7 @@ #ifndef CATALOGITEMPRIVATE_H #define CATALOGITEMPRIVATE_H -#include +#include namespace KBabel { @@ -55,18 +55,18 @@ class CatalogItemPrivate public: - QString _comment; - QString _msgctxt; - QStringList _msgid; - QStringList _msgstr; + TQString _comment; + TQString _msgctxt; + TQStringList _msgid; + TQStringList _msgstr; - QStringList _tagList; - QStringList _argList; + TQStringList _tagList; + TQStringList _argList; bool _valid; bool _haveTagList; bool _haveArgList; - QStringList _errors; + TQStringList _errors; /** flag, if this entry is a plural forms entry */ bool _gettextPluralForm; diff --git a/kbabel/common/catalogsettings.cpp b/kbabel/common/catalogsettings.cpp index 480f4cb9..4b87f522 100644 --- a/kbabel/common/catalogsettings.cpp +++ b/kbabel/common/catalogsettings.cpp @@ -43,19 +43,19 @@ #include -#include -#include -#include +#include +#include +#include #include using namespace KBabel; -QString KBabel::charsetString(const QTextCodec *codec) +TQString KBabel::charsetString(const TQTextCodec *codec) { if(codec) { - QString encodingStr = codec->mimeName(); + TQString encodingStr = codec->mimeName(); if ( encodingStr.startsWith("CP " ) ) encodingStr.remove( 2, 1 ); else if ( encodingStr.startsWith("IBM " ) ) @@ -63,14 +63,14 @@ QString KBabel::charsetString(const QTextCodec *codec) return encodingStr; } else - return QString::null; + return TQString::null; } -QString KBabel::GNUPluralForms(const QString& lang) +TQString KBabel::GNUPluralForms(const TQString& lang) { KTempFile infile, outfile; - QTextStream* str = infile.textStream(); + TQTextStream* str = infile.textStream(); *str << "# SOME DESCRIPTIVE TITLE." << endl; *str << "# Copyright (C) YEAR Free Software Foundation, Inc." << endl; @@ -105,24 +105,24 @@ QString KBabel::GNUPluralForms(const QString& lang) msginit.start( KProcess::Block ); - QString res(""); + TQString res(""); if( msginit.normalExit() ) { // parse out the plural form string - QFile f(outfile.name()); + TQFile f(outfile.name()); if( f.open (IO_ReadOnly) ) { - QTextStream str(&f); + TQTextStream str(&f); - QString line; + TQString line; do { line = str.readLine(); if( line.startsWith( "\"Plural-Forms:" ) ) { kdDebug() << "Plural form line: " << line << endl; - QRegExp re( "^\"Plural-Forms: *(.*)\\\\n\"" ); + TQRegExp re( "^\"Plural-Forms: *(.*)\\\\n\"" ); re.search( line ); res = re.cap(1); break; @@ -141,15 +141,15 @@ QString KBabel::GNUPluralForms(const QString& lang) return res; } -QString KBabel::charsetString(const int e) +TQString KBabel::charsetString(const int e) { - QString encodingStr; + TQString encodingStr; switch(e) { case ProjectSettingsBase::Locale: { - QTextCodec *codec=QTextCodec::codecForLocale(); + TQTextCodec *codec=TQTextCodec::codecForLocale(); if(codec) encodingStr=charsetString(codec); else @@ -172,36 +172,36 @@ QString KBabel::charsetString(const int e) return encodingStr; } -QString Defaults::Identity::authorName() +TQString Defaults::Identity::authorName() { KEMailSettings emSet; return emSet.getSetting(KEMailSettings::RealName); } -QString Defaults::Identity::authorLocalizedName() +TQString Defaults::Identity::authorLocalizedName() { return authorName(); } -QString Defaults::Identity::authorEmail() +TQString Defaults::Identity::authorEmail() { KEMailSettings emSet; return emSet.getSetting(KEMailSettings::EmailAddress); } -QString Defaults::Identity::mailingList() +TQString Defaults::Identity::mailingList() { - QString lang=Defaults::Identity::languageCode(); + TQString lang=Defaults::Identity::languageCode(); int temp=lang.find("_"); lang=lang.left(temp); return lang+"@li.org"; } -QString Defaults::Identity::languageCode() +TQString Defaults::Identity::languageCode() { // first try to get the language from KDE settings KLocale *locale = KGlobal::locale(); - QString lang; + TQString lang; if(locale) { lang=locale->languageList().first(); @@ -223,18 +223,18 @@ QString Defaults::Identity::languageCode() return lang; } -QString Defaults::Identity::timezone() +TQString Defaults::Identity::timezone() { - QString timezone=getenv("TIMEZONE"); + TQString timezone=getenv("TIMEZONE"); if(timezone.isEmpty()) timezone="GMT"; return timezone; } -QStringList Defaults::Tag::tagExpressions() +TQStringList Defaults::Tag::tagExpressions() { - QStringList list; + TQStringList list; list.append(""); list.append("<[A-Za-z0-9\\n]+[^>]*/?>"); @@ -246,9 +246,9 @@ QStringList Defaults::Tag::tagExpressions() return list; } -QStringList Defaults::Tag::argExpressions() +TQStringList Defaults::Tag::argExpressions() { - QStringList list; + TQStringList list; list.append("%[ndioxXucsfeEgGp]"); list.append("%([0-9]+(\\$))?[-+'#0]?[0-9]*(.[0-9]+)?[hlL]?[dioxXucsfeEgGp]"); diff --git a/kbabel/common/catalogsettings.h b/kbabel/common/catalogsettings.h index f87ec673..5d220e57 100644 --- a/kbabel/common/catalogsettings.h +++ b/kbabel/common/catalogsettings.h @@ -34,9 +34,9 @@ #ifndef CATALOGSETTINGS_H #define CATALOGSETTINGS_H -#include -#include -#include +#include +#include +#include #include class QTextCodec; @@ -56,7 +56,7 @@ struct KDE_EXPORT SaveSettings bool updateProject; bool updateDescription; - QString descriptionString; + TQString descriptionString; bool updateTranslatorCopyright; int FSFCopyright; @@ -64,9 +64,9 @@ struct KDE_EXPORT SaveSettings bool useOldEncoding; Qt::DateFormat dateFormat; - QString customDateFormat; + TQString customDateFormat; - QString projectString; + TQString projectString; bool autoSyntaxCheck; bool saveObsolete; @@ -76,13 +76,13 @@ struct KDE_EXPORT SaveSettings struct KDE_EXPORT IdentitySettings { - QString authorName; - QString authorLocalizedName; - QString authorEmail; - QString languageName; - QString languageCode; - QString mailingList; - QString timeZone; + TQString authorName; + TQString authorLocalizedName; + TQString authorEmail; + TQString languageName; + TQString languageCode; + TQString mailingList; + TQString timeZone; /** * The number of plural forms. If <= 0 the number is determined @@ -94,7 +94,7 @@ struct KDE_EXPORT IdentitySettings */ bool checkPluralArgument; - QString gnuPluralFormHeader; + TQString gnuPluralFormHeader; }; @@ -104,19 +104,19 @@ struct KDE_EXPORT MiscSettings * The char, that marks keyboard accelerators. * Default is '&' as used by Qt */ - QChar accelMarker; + TQChar accelMarker; /** * The regular expression for what is context information. * Default is "^_:.+" as used in KDE */ - QRegExp contextInfo; + TQRegExp contextInfo; /** * The regular expression for strings that contain a message for * singular and one for plural */ - QRegExp singularPlural; + TQRegExp singularPlural; /** * The method used for compresion of email attachments. Use @@ -137,35 +137,35 @@ struct TagSettings /** * A list of regular expressions defining tags */ - QStringList tagExpressions; + TQStringList tagExpressions; /** * A list of regular expressions defining arguments */ - QStringList argExpressions; + TQStringList argExpressions; }; -KDE_EXPORT QString charsetString(const int encoding); -KDE_EXPORT QString charsetString(const QTextCodec *codec); -KDE_EXPORT QString GNUPluralForms(const QString& lang); +KDE_EXPORT TQString charsetString(const int encoding); +KDE_EXPORT TQString charsetString(const TQTextCodec *codec); +KDE_EXPORT TQString GNUPluralForms(const TQString& lang); namespace Defaults { class KDE_EXPORT Identity { public: - static QString authorName(); - static QString authorLocalizedName(); - static QString authorEmail(); - static QString languageCode(); - static QString mailingList(); - static QString timezone(); + static TQString authorName(); + static TQString authorLocalizedName(); + static TQString authorEmail(); + static TQString languageCode(); + static TQString mailingList(); + static TQString timezone(); }; class KDE_EXPORT Tag { public: - static QStringList tagExpressions(); - static QStringList argExpressions(); + static TQStringList tagExpressions(); + static TQStringList argExpressions(); }; } diff --git a/kbabel/common/diff.cpp b/kbabel/common/diff.cpp index 7a54e4d3..455a26f1 100644 --- a/kbabel/common/diff.cpp +++ b/kbabel/common/diff.cpp @@ -37,7 +37,7 @@ #include -LCSprinter::LCSprinter(const QStringList &s_1, const QStringList &s_2, QValueVector *b_, const uint nT_, uint index):s1(s_1),s2(s_2),b(b_),nT(nT_) +LCSprinter::LCSprinter(const TQStringList &s_1, const TQStringList &s_2, TQValueVector *b_, const uint nT_, uint index):s1(s_1),s2(s_2),b(b_),nT(nT_) { it1=s1.begin(); it2=s2.begin(); @@ -93,24 +93,24 @@ void LCSprinter::printLCS(uint index) -QString wordDiff(const QString& str1, const QString& str2) +TQString wordDiff(const TQString& str1, const TQString& str2) { //separate punctuation marks etc from words as _only_ they may have changed - QStringList s1, s2; + TQStringList s1, s2; uint i=0; uint j=0; uint l1=str1.length(); uint l2=str2.length(); - QString temp; + TQString temp; temp.reserve(16); /* while ( i b(mT*nT, NOTHING); - QValueVector c(mT*nT, 0); + TQValueVector b(mT*nT, NOTHING); + TQValueVector c(mT*nT, 0); // calculate the LCS b[0] = FINAL; uint index_cache; - QStringList::iterator it1, it2; + TQStringList::iterator it1, it2; for (i=1, it1 = s1.begin(); i -QString Diff::charDiff(QString s1, QString s2) +TQString Diff::charDiff(TQString s1, TQString s2) { int n = 3; s1+="xxx"; @@ -305,7 +305,7 @@ QString Diff::charDiff(QString s1, QString s2) int pos2=0; int len1 = s1.length(); int len2 = s2.length(); - QString resultstr; + TQString resultstr; bool found = true; bool swap = false; while (found && pos1+n < len1 && pos2+n < len2) @@ -346,7 +346,7 @@ QString Diff::charDiff(QString s1, QString s2) pos1 = pos2; pos2 = pos; - QString s = s1; + TQString s = s1; s1 = s2; s2 = s; @@ -375,7 +375,7 @@ QString Diff::charDiff(QString s1, QString s2) pos1 = pos2; pos2 = pos; - QString s = s1; + TQString s = s1; s1 = s2; s2 = s; @@ -427,7 +427,7 @@ QString Diff::charDiff(QString s1, QString s2) pos1 = pos2; pos2 = pos; - QString s = s1; + TQString s = s1; s1 = s2; s2 = s; diff --git a/kbabel/common/diff.h b/kbabel/common/diff.h index 4e7dfb72..2ce055bf 100644 --- a/kbabel/common/diff.h +++ b/kbabel/common/diff.h @@ -35,8 +35,8 @@ #ifndef DIFF_H #define DIFF_H -#include -#include +#include +#include typedef enum { @@ -54,7 +54,7 @@ typedef enum * @short Word-by-word diff algorithm * @author Nick Shaforostoff */ - QString wordDiff(const QString& oldString, const QString& newString); + TQString wordDiff(const TQString& oldString, const TQString& newString); /** @@ -66,22 +66,22 @@ typedef enum class LCSprinter { public: - LCSprinter(const QStringList &s_1, const QStringList &s_2, QValueVector* b_, const uint nT_, uint index); + LCSprinter(const TQStringList &s_1, const TQStringList &s_2, TQValueVector* b_, const uint nT_, uint index); void printLCS(uint index); - inline QString getString(); + inline TQString getString(); ~LCSprinter() {}; private: - QStringList s1, s2, resultString; + TQStringList s1, s2, resultString; uint nT;//for use 1d vector as 2d - QValueVector *b; - QStringList::iterator it1, it2; + TQValueVector *b; + TQStringList::iterator it1, it2; }; -inline QString LCSprinter::getString() +inline TQString LCSprinter::getString() { - return resultString.join("").replace(QChar('\n'), ""); //w/o replace we'd get whole line colored + return resultString.join("").replace(TQChar('\n'), ""); //w/o replace we'd get whole line colored } #endif // DIFF_H diff --git a/kbabel/common/editcmd.cpp b/kbabel/common/editcmd.cpp index 1643ed0b..4ea98364 100644 --- a/kbabel/common/editcmd.cpp +++ b/kbabel/common/editcmd.cpp @@ -31,7 +31,7 @@ **************************************************************************** */ #include "editcmd.h" -#include +#include using namespace KBabel; @@ -49,7 +49,7 @@ EditCommand::EditCommand(const int index, const Part part) // have to handle deletion of current selection -DelTextCmd::DelTextCmd(int _offset, const QString &_str, int _pluralNumber ) +DelTextCmd::DelTextCmd(int _offset, const TQString &_str, int _pluralNumber ) : EditCommand(), offset( _offset ), str ( _str ), @@ -68,7 +68,7 @@ bool DelTextCmd::merge( EditCommand* other) && o->type() == type() && o->pluralNumber==pluralNumber ) { DelTextCmd* o = (DelTextCmd*) other; - if ( offset + int(str.length()) == o->offset && !str.contains(QRegExp("^\\s$")) ) + if ( offset + int(str.length()) == o->offset && !str.contains(TQRegExp("^\\s$")) ) { o->str.prepend( str ); o->offset = offset; @@ -80,7 +80,7 @@ bool DelTextCmd::merge( EditCommand* other) -InsTextCmd::InsTextCmd(int offset,const QString &str, int pluralNumber ) +InsTextCmd::InsTextCmd(int offset,const TQString &str, int pluralNumber ) : DelTextCmd( offset, str, pluralNumber ) { } @@ -95,7 +95,7 @@ bool InsTextCmd::merge( EditCommand* other) if ( o->index()==index() && o->part() == part() && o->type() == type() && o->pluralNumber==pluralNumber ) { - if ( offset == o->offset + int(o->str.length()) && !str.contains(QRegExp("^\\s$")) ) + if ( offset == o->offset + int(o->str.length()) && !str.contains(TQRegExp("^\\s$")) ) { o->str += str; return true; diff --git a/kbabel/common/editcmd.h b/kbabel/common/editcmd.h index 458d2c57..64bd4b93 100644 --- a/kbabel/common/editcmd.h +++ b/kbabel/common/editcmd.h @@ -34,7 +34,7 @@ #include "itempart.h" -#include +#include #include namespace KBabel @@ -87,11 +87,11 @@ class KDE_EXPORT DelTextCmd : public EditCommand { public: int offset; - QString str; + TQString str; int pluralNumber; // have to handle deletion of current selection - DelTextCmd(int offset, const QString &str, int pluralNumber ); + DelTextCmd(int offset, const TQString &str, int pluralNumber ); virtual Commands type() const { return Delete; } bool merge( EditCommand* other); @@ -101,7 +101,7 @@ class KDE_EXPORT InsTextCmd : public DelTextCmd { public: - InsTextCmd(int offset,const QString &str, int pluralNumber ); + InsTextCmd(int offset,const TQString &str, int pluralNumber ); virtual Commands type() const { return Insert; } bool merge( EditCommand* other); diff --git a/kbabel/common/exportplugin.cpp b/kbabel/common/exportplugin.cpp index 99a727f8..327e85d0 100644 --- a/kbabel/common/exportplugin.cpp +++ b/kbabel/common/exportplugin.cpp @@ -33,7 +33,7 @@ #include "catalogfileplugin.h" -#include +#include #include #include @@ -45,7 +45,7 @@ struct KBabel::CatalogExportPluginPrivate bool _stop; }; -CatalogExportPlugin::CatalogExportPlugin(QObject* parent, const char* name) : QObject(parent,name) +CatalogExportPlugin::CatalogExportPlugin(TQObject* parent, const char* name) : TQObject(parent,name) { d = new CatalogExportPluginPrivate; d->_stop=false; @@ -56,9 +56,9 @@ CatalogExportPlugin::~CatalogExportPlugin() delete d; } -QStringList CatalogExportPlugin::availableExportMimeTypes() +TQStringList CatalogExportPlugin::availableExportMimeTypes() { - QStringList result; + TQStringList result; KTrader::OfferList offers = KTrader::self()->query("KBabelFilter", "exist [X-KDE-Export]"); diff --git a/kbabel/common/findoptions.h b/kbabel/common/findoptions.h index 45c29e25..4b5f94a9 100644 --- a/kbabel/common/findoptions.h +++ b/kbabel/common/findoptions.h @@ -35,7 +35,7 @@ #ifndef FINDOPTIONS_H #define FINDOPTIONS_H -#include +#include class QString; class QChar; @@ -46,7 +46,7 @@ namespace KBabel class FindOptions { public: - QString findStr; + TQString findStr; bool caseSensitive; bool wholeWords; @@ -69,15 +69,15 @@ public: // these are non-persistent options - not saved into configuration database bool askFile; // whether findNext should ask catalog manager for next file - QRegExp contextInfo; // actual settings of context info regular expression - QChar accelMarker; // actual settings of accelerator marker + TQRegExp contextInfo; // actual settings of context info regular expression + TQChar accelMarker; // actual settings of accelerator marker }; class ReplaceOptions : public FindOptions { public: - QString replaceStr; + TQString replaceStr; bool ask; }; diff --git a/kbabel/common/importplugin.cpp b/kbabel/common/importplugin.cpp index d763e670..711d77cd 100644 --- a/kbabel/common/importplugin.cpp +++ b/kbabel/common/importplugin.cpp @@ -36,14 +36,14 @@ #include "catalog.h" -#include +#include #include #include using namespace KBabel; -CatalogImportPlugin::CatalogImportPlugin(QObject* parent, const char* name) : QObject(parent,name) +CatalogImportPlugin::CatalogImportPlugin(TQObject* parent, const char* name) : TQObject(parent,name) { d = new CatalogImportPluginPrivate; d->_catalog = 0; @@ -64,7 +64,7 @@ void CatalogImportPlugin::appendCatalogItem( const CatalogItem& item, const bool d->_entries.append(item); } -void CatalogImportPlugin::setCatalogExtraData( const QStringList& data ) +void CatalogImportPlugin::setCatalogExtraData( const TQStringList& data ) { d->_catalogExtraData=data; d->_updateCatalogExtraData=true; @@ -76,13 +76,13 @@ void CatalogImportPlugin::setGeneratedFromDocbook( const bool generated ) d->_updateGeneratedFromDocbook = true; } -void CatalogImportPlugin::setErrorIndex(const QValueList& errors) +void CatalogImportPlugin::setErrorIndex(const TQValueList& errors) { d->_errorList = errors; d->_updateErrorList = true; } -void CatalogImportPlugin::setFileCodec(QTextCodec* codec) +void CatalogImportPlugin::setFileCodec(TQTextCodec* codec) { d->_codec=codec; d->_updateCodec = true; @@ -94,12 +94,12 @@ void CatalogImportPlugin::setHeader( const CatalogItem& item ) d->_updateHeader=true; } -void CatalogImportPlugin::setMimeTypes( const QString& mimetypes ) +void CatalogImportPlugin::setMimeTypes( const TQString& mimetypes ) { d->_mimeTypes=mimetypes; } -ConversionStatus CatalogImportPlugin::open(const QString& file, const QString& mimetype, Catalog* catalog) +ConversionStatus CatalogImportPlugin::open(const TQString& file, const TQString& mimetype, Catalog* catalog) { d->_stopped=false; d->_catalog=catalog; @@ -138,9 +138,9 @@ void CatalogImportPlugin::commitTransaction() d->_catalog->clear(); // fill in the entries - QValueVector e; + TQValueVector e; e.reserve( d->_entries.count() ); - for( QValueList::const_iterator it = d->_entries.begin(); it != d->_entries.end(); ++it ) + for( TQValueList::const_iterator it = d->_entries.begin(); it != d->_entries.end(); ++it ) { e.append( *it ); } @@ -167,9 +167,9 @@ void CatalogImportPlugin::commitTransaction() d->_started = false; } -QStringList CatalogImportPlugin::availableImportMimeTypes() +TQStringList CatalogImportPlugin::availableImportMimeTypes() { - QStringList result; + TQStringList result; KTrader::OfferList offers = KTrader::self()->query("KBabelFilter", "exist [X-KDE-Import]"); diff --git a/kbabel/common/importplugin_private.h b/kbabel/common/importplugin_private.h index 3c45919c..bff1ed90 100644 --- a/kbabel/common/importplugin_private.h +++ b/kbabel/common/importplugin_private.h @@ -48,14 +48,14 @@ public: bool _started; bool _stopped; - QValueList _entries; - QValueList _obsoleteEntries; + TQValueList _entries; + TQValueList _obsoleteEntries; CatalogItem _header; bool _generatedFromDocbook; - QTextCodec* _codec; - QValueList _errorList; - QStringList _catalogExtraData; - QString _mimeTypes; + TQTextCodec* _codec; + TQValueList _errorList; + TQStringList _catalogExtraData; + TQString _mimeTypes; bool _updateHeader; bool _updateGeneratedFromDocbook; diff --git a/kbabel/common/kbabeldatatool.h b/kbabel/common/kbabeldatatool.h index 57d9f771..207f8bc5 100644 --- a/kbabel/common/kbabeldatatool.h +++ b/kbabel/common/kbabeldatatool.h @@ -49,13 +49,13 @@ class KBabelDataTool: public KDataTool Q_OBJECT protected: - KBabelDataTool( QObject* parent, const char* name ) : KDataTool( parent, name ) {} + KBabelDataTool( TQObject* parent, const char* name ) : KDataTool( parent, name ) {} public slots: /** The only method to be redefined in inherited classes. * This method is called everytime the settings are changed. * @param project is ID of the project, for which the settings changed. */ - virtual void settingsChanged(const QString &project) = 0; + virtual void settingsChanged(const TQString &project) = 0; }; } diff --git a/kbabel/common/kbmailer.cpp b/kbabel/common/kbmailer.cpp index fb3ab3b1..0526bd74 100644 --- a/kbabel/common/kbmailer.cpp +++ b/kbabel/common/kbmailer.cpp @@ -33,11 +33,11 @@ **************************************************************************** */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -53,7 +53,7 @@ using namespace KBabel; -KBabelMailer::KBabelMailer( QWidget* parent, Project::Ptr project) +KBabelMailer::KBabelMailer( TQWidget* parent, Project::Ptr project) : _project( project ), m_parent( parent ) { m_tempDir.setAutoDelete( true ); @@ -65,12 +65,12 @@ KBabelMailer::~KBabelMailer() saveConfig( ); } -void KBabelMailer::sendOneFile(const QString& fileName) +void KBabelMailer::sendOneFile(const TQString& fileName) { if (!singleFileCompression) { kapp->invokeMailer("", "", "", "", "", "", fileName); } else { - const QString archive ( createArchive( QStringList( fileName ), QFileInfo( fileName ).baseName() ) ); + const TQString archive ( createArchive( TQStringList( fileName ), TQFileInfo( fileName ).baseName() ) ); if ( !archive.isEmpty() ) { kapp->invokeMailer("", "", "", "", "", "", archive); } @@ -91,13 +91,13 @@ void KBabelMailer::sendOneFile( const KURL& url) } if (!singleFileCompression) { - QString fileName( url.filename() ); + TQString fileName( url.filename() ); if ( fileName.isEmpty() ) { fileName = "attachment"; } // ### TODO: the current implementation has the default to possibly overwrite an already existing temporary file - QString tempName( m_tempDir.name() ); + TQString tempName( m_tempDir.name() ); tempName += fileName; if ( KIO::NetAccess::download( url, tempName, m_parent ) ) kapp->invokeMailer("", "", "", "", "", "", fileName); @@ -108,47 +108,47 @@ void KBabelMailer::sendOneFile( const KURL& url) } else { - const QString archive ( createArchive( QStringList( url.url() ), url.filename() ) ); + const TQString archive ( createArchive( TQStringList( url.url() ), url.filename() ) ); if ( !archive.isEmpty() ) { kapp->invokeMailer("", "", "", "", "", "", archive); } } } -void KBabelMailer::sendFiles(QStringList fileList, const QString& initialName) +void KBabelMailer::sendFiles(TQStringList fileList, const TQString& initialName) { - const QString archive ( createArchive( fileList, initialName ) ); + const TQString archive ( createArchive( fileList, initialName ) ); if ( !archive.isEmpty() ) { kapp->invokeMailer("", "", "", "", "", "", archive); } } -QString KBabelMailer::createArchive(QStringList fileList, QString initialName) +TQString KBabelMailer::createArchive(TQStringList fileList, TQString initialName) { if ( m_tempDir.name().isEmpty() ) { kdWarning() << "KBabelMailer has not a valid temporary directory!" << endl; - return QString(); // No temporary directory! + return TQString(); // No temporary directory! } // do nothing if there are no files in the list if (fileList.empty()) - return QString::null; + return TQString::null; // determine the name of the archive, do nothing if none is given // or Cancel was pressed - initialName = ( initialName.isEmpty() ? QString("translations") : initialName ); + initialName = ( initialName.isEmpty() ? TQString("translations") : initialName ); bool ok = false; - QStringList list( archiveList ); + TQStringList list( archiveList ); list.prepend( initialName ); - QString archiveName ( KInputDialog::getItem( i18n("Save"), + TQString archiveName ( KInputDialog::getItem( i18n("Save"), i18n( "Enter the name of the archive without file extension" ), archiveList, 0, true, &ok, m_parent ) ); if ( !ok || archiveName.isEmpty() ) - return QString(); + return TQString(); // file extensions are determined from the type of compression - archiveName.remove( QRegExp( "\\.tar\\.(gz|bz2)$" ) ); + archiveName.remove( TQRegExp( "\\.tar\\.(gz|bz2)$" ) ); // Update the list of archive names, keep only the ten most recent ones. archiveList.remove( archiveName ); @@ -157,7 +157,7 @@ QString KBabelMailer::createArchive(QStringList fileList, QString initialName) archiveList.pop_back(); // set the correct extension and mimetype - QString mimetype; + TQString mimetype; if (bzipCompression) { archiveName += ".tar.bz2"; mimetype = "application/x-bzip2"; @@ -169,18 +169,18 @@ QString KBabelMailer::createArchive(QStringList fileList, QString initialName) return buildArchive (fileList, m_tempDir.name()+archiveName, mimetype, true); } -QString KBabelMailer::buildArchive(QStringList fileList, QString archiveName, QString mimetype, bool remove) +TQString KBabelMailer::buildArchive(TQStringList fileList, TQString archiveName, TQString mimetype, bool remove) { Q_UNUSED( remove ); // create a new archive KTar archive(archiveName, mimetype); if (!archive.open(IO_WriteOnly)) { KMessageBox::error( m_parent, i18n("Error while trying to create archive file.") ); - return QString::null; + return TQString::null; } // add files to this archive - QStringList::const_iterator it; + TQStringList::const_iterator it; for (it = fileList.constBegin(); it != fileList.constEnd(); ++it) { #if KDE_IS_VERSION( 3, 5, 0 ) // Try to get a local URL instead of a remote one @@ -188,7 +188,7 @@ QString KBabelMailer::buildArchive(QStringList fileList, QString archiveName, QS #else const KURL url( KURL::fromPathOrURL( *it ) ); #endif - QString poTempName; + TQString poTempName; if ( !KIO::NetAccess::download( url, poTempName, m_parent ) ) { KMessageBox::error( m_parent, i18n("Error while trying to read file %1.").arg( url.prettyURL() ) ); continue; @@ -198,11 +198,11 @@ QString KBabelMailer::buildArchive(QStringList fileList, QString archiveName, QS // but only if "PoBaseDir" in the config file is set and the files // actually reside in one of its subdirectories. Else they are stored // without relative path. - QString poArchFileName = url.path(); + TQString poArchFileName = url.path(); if (_poBaseDir.isEmpty( ) || poArchFileName.find(_poBaseDir) != 0) - poArchFileName = QFileInfo( poArchFileName ).fileName(); + poArchFileName = TQFileInfo( poArchFileName ).fileName(); else - poArchFileName.remove( QRegExp( "^" + QRegExp::escape( _poBaseDir ) + "/?" ) ); + poArchFileName.remove( TQRegExp( "^" + TQRegExp::escape( _poBaseDir ) + "/?" ) ); if ( !archive.addLocalFile( poTempName, poArchFileName ) ) { KMessageBox::error( m_parent, i18n("Error while trying to copy file %1 into archive.").arg( url.prettyURL() ) ); diff --git a/kbabel/common/kbmailer.h b/kbabel/common/kbmailer.h index 7df5ce9d..c83c9371 100644 --- a/kbabel/common/kbmailer.h +++ b/kbabel/common/kbmailer.h @@ -66,7 +66,7 @@ class KDE_EXPORT KBabelMailer * @param project The project to be used. * @since 1.11.2 (KDE 3.5.2): @p parent parameter */ - KBabelMailer( QWidget* parent, Project::Ptr project); + KBabelMailer( TQWidget* parent, Project::Ptr project); virtual ~KBabelMailer(); /** @@ -75,7 +75,7 @@ class KDE_EXPORT KBabelMailer * * @param fileName the name of the file to be sent. */ - void sendOneFile(const QString& fileName); + void sendOneFile(const TQString& fileName); /** * Send only one file as a mail attachment. The file can either be sent * as a compressed or an uncompressed file. @@ -91,13 +91,13 @@ class KDE_EXPORT KBabelMailer * @param fileList contains the names of the files to be sent. * @param initialName the possible name of the archive */ - void sendFiles(QStringList fileList, const QString& initialName = QString::null); + void sendFiles(TQStringList fileList, const TQString& initialName = TQString::null); /** * Sets the the PO files' base directory. * * @param dir the PO file base dir. */ - void setPOBaseDir(const QString& dir) { _poBaseDir = dir; } + void setPOBaseDir(const TQString& dir) { _poBaseDir = dir; } /** @@ -109,14 +109,14 @@ class KDE_EXPORT KBabelMailer * name is queried. * * @return name of the archive if it was created successfully, - * otherwise QString::null. + * otherwise TQString::null. */ - QString createArchive(QStringList fileList, QString initialName); + TQString createArchive(TQStringList fileList, TQString initialName); /** * Write the archive file. */ - QString buildArchive(QStringList fileList, QString fileName, QString mimetype, bool remove = true); + TQString buildArchive(TQStringList fileList, TQString fileName, TQString mimetype, bool remove = true); private: /** * Read the config file to extract the values for compression @@ -145,9 +145,9 @@ class KDE_EXPORT KBabelMailer */ bool singleFileCompression; /** - * This QStringList stores the recently used archive names. + * This TQStringList stores the recently used archive names. */ - QStringList archiveList; + TQStringList archiveList; /** * The project object. */ @@ -155,10 +155,10 @@ class KDE_EXPORT KBabelMailer /** * The path to the PO Base directory */ - QString _poBaseDir; + TQString _poBaseDir; /// The parent widget - QWidget* m_parent; + TQWidget* m_parent; }; } diff --git a/kbabel/common/kbproject.cpp b/kbabel/common/kbproject.cpp index 38996b51..73ac9dbd 100644 --- a/kbabel/common/kbproject.cpp +++ b/kbabel/common/kbproject.cpp @@ -36,7 +36,7 @@ #include "kbprojectmanager.h" #include "kbprojectsettings.h" -#include +#include #include #include @@ -47,15 +47,15 @@ namespace KBabel { -Project::Project( const QString& file ) : - QObject () +Project::Project( const TQString& file ) : + TQObject () , _filename (file) , _name (i18n("unnamed")) , _valid (false) , _config (NULL) , _settings (NULL) { - QFileInfo info(file); + TQFileInfo info(file); if(info.isDir()) return; @@ -96,12 +96,12 @@ Project::Project( const QString& file ) : // read the project name _config->setGroup( "Project" ); - _name = _config->readEntry( "Name", QString() ); + _name = _config->readEntry( "Name", TQString() ); if ( _name.isEmpty() ) _name = "Default-Project"; // set default project name // ### FIXME: why is the Version number not written to the project file? - if ( _config->readEntry( "Version", QString() ) != "1.0.1" ) + if ( _config->readEntry( "Version", TQString() ) != "1.0.1" ) { kdWarning() << "Old project format assumed" << endl; @@ -266,7 +266,7 @@ MiscSettings Project::miscSettings () { MiscSettings settings; - QString temp=_settings->accelMarker(); + TQString temp=_settings->accelMarker(); if(temp.length() > 0) { settings.accelMarker=temp[0]; diff --git a/kbabel/common/kbproject.h b/kbabel/common/kbproject.h index 1e1ebc79..4c3d6fc7 100644 --- a/kbabel/common/kbproject.h +++ b/kbabel/common/kbproject.h @@ -33,7 +33,7 @@ #ifndef KBPROJECT_H #define KBPROJECT_H -#include +#include #include #include "catalogsettings.h" @@ -43,19 +43,19 @@ namespace KBabel { class ProjectSettingsBase; - class KDE_EXPORT Project : public QObject, public KShared + class KDE_EXPORT Project : public TQObject, public KShared { Q_OBJECT public: typedef KSharedPtr Ptr; - Project( const QString& file ); + Project( const TQString& file ); virtual ~Project (); - QString filename () const { return _filename; } - QString name () const { return _name; } + TQString filename () const { return _filename; } + TQString name () const { return _name; } - void setName( const QString& name ) { _name = name; } + void setName( const TQString& name ) { _name = name; } KConfig* config (); /** @@ -97,8 +97,8 @@ namespace KBabel void signalSettingsChanged(); private: - QString _filename; - QString _name; + TQString _filename; + TQString _name; bool _valid; KSharedConfig::Ptr _config; ProjectSettingsBase* _settings; diff --git a/kbabel/common/kbprojectmanager.cpp b/kbabel/common/kbprojectmanager.cpp index 048c530a..ab117c97 100644 --- a/kbabel/common/kbprojectmanager.cpp +++ b/kbabel/common/kbprojectmanager.cpp @@ -39,15 +39,15 @@ namespace KBabel { -QPtrList ProjectManager::p_list; -QString ProjectManager::strDefaultProjectName = QString(); +TQPtrList ProjectManager::p_list; +TQString ProjectManager::strDefaultProjectName = TQString(); -Project::Ptr ProjectManager::open( const QString& file ) +Project::Ptr ProjectManager::open( const TQString& file ) { kdDebug() << k_funcinfo << " " << file << endl; // TODO: ensure full path // TODO: isn't a map better? - for(QPtrList::ConstIterator it = p_list.constBegin(); + for(TQPtrList::ConstIterator it = p_list.constBegin(); it != p_list.constEnd(); ++it) { if ((*it)->filename() == file) @@ -77,7 +77,7 @@ void ProjectManager::close( Project::Ptr project) project->config()->sync(); } -QString ProjectManager::defaultProjectName( void ) +TQString ProjectManager::defaultProjectName( void ) { if ( strDefaultProjectName.isEmpty() ) strDefaultProjectName = locateLocal("config", "kbabel.defaultproject" ); diff --git a/kbabel/common/kbprojectmanager.h b/kbabel/common/kbprojectmanager.h index 418183bb..abfce3e4 100644 --- a/kbabel/common/kbprojectmanager.h +++ b/kbabel/common/kbprojectmanager.h @@ -33,8 +33,8 @@ #ifndef KBPROJECTMANAGER_H #define KBPROJECTMANAGER_H -#include -#include +#include +#include #include #include "kbproject.h" @@ -45,16 +45,16 @@ namespace KBabel class KDE_EXPORT ProjectManager { public: - static Project::Ptr open( const QString& file ); + static Project::Ptr open( const TQString& file ); static void close( Project::Ptr project ); static Project::Ptr create(); - static QString defaultProjectName( void ); + static TQString defaultProjectName( void ); friend class Project; private: static void remove (Project*); - static QPtrList p_list; - static QString strDefaultProjectName; + static TQPtrList p_list; + static TQString strDefaultProjectName; }; } diff --git a/kbabel/common/msgfmt.cpp b/kbabel/common/msgfmt.cpp index ef8ca895..61525a2f 100644 --- a/kbabel/common/msgfmt.cpp +++ b/kbabel/common/msgfmt.cpp @@ -35,33 +35,33 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include using namespace KBabel; -Msgfmt::Msgfmt(QObject* parent,const char* name) - : QObject(parent , name) +Msgfmt::Msgfmt(TQObject* parent,const char* name) + : TQObject(parent , name) { } -Msgfmt::Status Msgfmt::checkSyntax(QString file,QString& output, bool gnu) +Msgfmt::Status Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu) { Status stat=Ok; // this method does not return the right retrun values at the moment :-( KProcess proc; - connect(&proc,SIGNAL(receivedStdout(KProcess*, char*, int)), - this,SLOT(addToOutput(KProcess*,char *, int ))); - connect(&proc,SIGNAL(receivedStderr(KProcess *, char *, int)), - this,SLOT(addToOutput(KProcess*,char *, int))); + connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + this,TQT_SLOT(addToOutput(KProcess*,char *, int ))); + connect(&proc,TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + this,TQT_SLOT(addToOutput(KProcess*,char *, int))); // remove last output _output=""; @@ -80,7 +80,7 @@ Msgfmt::Status Msgfmt::checkSyntax(QString file,QString& output, bool gnu) } else if(proc.normalExit()) { - if( proc.exitStatus() || _output.contains(QRegExp("^.+:\\d+:")) ) // little workaround :-( + if( proc.exitStatus() || _output.contains(TQRegExp("^.+:\\d+:")) ) // little workaround :-( stat=SyntaxError; } else @@ -92,7 +92,7 @@ Msgfmt::Status Msgfmt::checkSyntax(QString file,QString& output, bool gnu) return stat; } -Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& output) +Msgfmt::Status Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString& output) { Status stat=Ok; @@ -100,10 +100,10 @@ Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& outp KProcess proc; proc.setUseShell(true); - connect(&proc,SIGNAL(receivedStdout(KProcess*, char*, int)), - this,SLOT(addToOutput(KProcess*,char *, int ))); - connect(&proc,SIGNAL(receivedStderr(KProcess *, char *, int)), - this,SLOT(addToOutput(KProcess*,char *, int))); + connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + this,TQT_SLOT(addToOutput(KProcess*,char *, int ))); + connect(&proc,TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + this,TQT_SLOT(addToOutput(KProcess*,char *, int))); // remove last output _output=""; @@ -117,7 +117,7 @@ Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& outp } else if(proc.normalExit()) { - if( proc.exitStatus() || _output.contains(QRegExp("^.+:\\d+:")) ) // little workaround :-( + if( proc.exitStatus() || _output.contains(TQRegExp("^.+:\\d+:")) ) // little workaround :-( stat=SyntaxError; } else @@ -133,13 +133,13 @@ Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& outp void Msgfmt::addToOutput(KProcess*,char *buffer, int buflen) { - QString newString = QString::fromLocal8Bit(buffer, buflen); + TQString newString = TQString::fromLocal8Bit(buffer, buflen); _output+=newString; } -QString Msgfmt::tempSaveName() +TQString Msgfmt::tempSaveName() { return kapp->tempSaveName("/tmp/kbabel_msgfmt.po"); } diff --git a/kbabel/common/msgfmt.h b/kbabel/common/msgfmt.h index bf983b2f..846501c1 100644 --- a/kbabel/common/msgfmt.h +++ b/kbabel/common/msgfmt.h @@ -33,7 +33,7 @@ #ifndef MSGFMT_H #define MSGFMT_H -#include +#include #include class KProcess; @@ -47,17 +47,17 @@ class KDE_EXPORT Msgfmt : private QObject Q_OBJECT public: enum Status{NoExecutable,Ok,SyntaxError,HeaderError,Error,Unsupported}; - Msgfmt(QObject* parent=0,const char* name=0); + Msgfmt(TQObject* parent=0,const char* name=0); - Status checkSyntax(QString file,QString& output, bool gnu = false); - Status checkSyntaxInDir(QString dir,QString regexp,QString& output); + Status checkSyntax(TQString file,TQString& output, bool gnu = false); + Status checkSyntaxInDir(TQString dir,TQString regexp,TQString& output); private slots: void addToOutput(KProcess*,char *buffer, int buflen); private: - static QString tempSaveName(); - QString _output; + static TQString tempSaveName(); + TQString _output; }; } diff --git a/kbabel/common/poinfo.cpp b/kbabel/common/poinfo.cpp index b7beba7d..68e13da8 100644 --- a/kbabel/common/poinfo.cpp +++ b/kbabel/common/poinfo.cpp @@ -42,13 +42,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "libgettext/pofiles.h" #include "libgettext/tokens.h" @@ -61,10 +61,10 @@ using namespace KBabel; struct poInfoCacheItem { PoInfo info; - QDateTime lastModified; + TQDateTime lastModified; }; -inline QDataStream& operator << ( QDataStream& stream, poInfoCacheItem* item ) +inline TQDataStream& operator << ( TQDataStream& stream, poInfoCacheItem* item ) { // Note: if you change anything here, do not forget to increase the #define POINFOCACHE_VERSION stream << item->info.total; @@ -84,7 +84,7 @@ inline QDataStream& operator << ( QDataStream& stream, poInfoCacheItem* item ) return stream; } -inline QDataStream& operator >> ( QDataStream& stream, poInfoCacheItem* item ) +inline TQDataStream& operator >> ( TQDataStream& stream, poInfoCacheItem* item ) { stream >> item->info.total; stream >> item->info.fuzzy; @@ -104,10 +104,10 @@ inline QDataStream& operator >> ( QDataStream& stream, poInfoCacheItem* item ) } // Cache of PO-file items -static QDict _poInfoCache; +static TQDict _poInfoCache; // File name of cache -static QString _poInfoCacheName; +static TQString _poInfoCacheName; // flag to stop current reading bool PoInfo::stopStaticRead; @@ -117,9 +117,9 @@ bool PoInfo::_gettextPluralForm; // Note: We only read the cache file if the data seems usable. If not, we will re-generate the data. void PoInfo::cacheRead() { - QFile cacheFile( _poInfoCacheName ); + TQFile cacheFile( _poInfoCacheName ); if( cacheFile.open( IO_ReadOnly ) ) { - QDataStream s( &cacheFile ); + TQDataStream s( &cacheFile ); // Check the file cache version. // If it is not the current version, we do not read the cache file @@ -132,13 +132,13 @@ void PoInfo::cacheRead() } /* - * Check the version of the QDataStream with which the cache file was written + * Check the version of the TQDataStream with which the cache file was written * * If the cache file was written by an incompatible future version of Qt, * the cache file will not be read. * * On the other side, a cache file written by a previous version of Qt can be read, - * by setting the version of the QDataStream used. + * by setting the version of the TQDataStream used. */ Q_INT32 qdatastreamVersion; s >> qdatastreamVersion; @@ -146,12 +146,12 @@ void PoInfo::cacheRead() s.setVersion( qdatastreamVersion ); } else { - // QDataStream version seems stupid, so abort - kdDebug(KBABEL) << "Wrong QDataStream version: " << qdatastreamVersion << endl; + // TQDataStream version seems stupid, so abort + kdDebug(KBABEL) << "Wrong TQDataStream version: " << qdatastreamVersion << endl; return; } - QString url; + TQString url; while( !s.atEnd() ) { poInfoCacheItem* item = new poInfoCacheItem; s >> url; @@ -168,7 +168,7 @@ void PoInfo::cacheWrite() // (especially if two instances would write into the same cache file) KSaveFile cacheFile( _poInfoCacheName ); - QDataStream* stream = cacheFile.dataStream(); + TQDataStream* stream = cacheFile.dataStream(); if( stream ) { @@ -182,9 +182,9 @@ void PoInfo::cacheWrite() const Q_INT32 qdatastreamVersion = stream->version(); *stream << qdatastreamVersion; - QDictIterator it( _poInfoCache ); // iterator for dict + TQDictIterator it( _poInfoCache ); // iterator for dict for ( ; it.current(); ++it ) { - if( QFile::exists( it.currentKey() ) ) { + if( TQFile::exists( it.currentKey() ) ) { *stream << it.currentKey(); *stream << it.current(); } @@ -194,12 +194,12 @@ void PoInfo::cacheWrite() } } else { - kdWarning(KBABEL) << "Could not create QDataStream for cache file: " << _poInfoCacheName << endl; + kdWarning(KBABEL) << "Could not create TQDataStream for cache file: " << _poInfoCacheName << endl; cacheFile.abort(); } } -bool PoInfo::cacheFind(const QString url, PoInfo& info) +bool PoInfo::cacheFind(const TQString url, PoInfo& info) { // Read cache if it has not been read, and set up post routine to write it static bool _cacheIsRead = false; @@ -211,7 +211,7 @@ bool PoInfo::cacheFind(const QString url, PoInfo& info) poInfoCacheItem *item = _poInfoCache.find( url ); if( item ) { - QFileInfo fi( url ); + TQFileInfo fi( url ); if( fi.lastModified() == item->lastModified ) { info = item->info; @@ -221,29 +221,29 @@ bool PoInfo::cacheFind(const QString url, PoInfo& info) return false; } -void PoInfo::cacheSave(const QString url, PoInfo& info) +void PoInfo::cacheSave(const TQString url, PoInfo& info) { poInfoCacheItem *item = new poInfoCacheItem; - QFileInfo fi( url ); + TQFileInfo fi( url ); item->info = info; item->lastModified = fi.lastModified(); _poInfoCache.insert( url, item ); } -QTextCodec* PoInfo::codecForFile(QString gettextHeader) +TQTextCodec* PoInfo::codecForFile(TQString gettextHeader) { - QRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n"); + TQRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n"); if( regexp.search(gettextHeader) == -1 ) { kdDebug(KBABEL) << "no charset entry found" << endl; return 0; } - const QString charset = regexp.cap(1); + const TQString charset = regexp.cap(1); kdDebug(KBABEL) << "charset: " << charset << endl; - QTextCodec* codec=0; + TQTextCodec* codec=0; if(!charset.isEmpty()) { @@ -252,27 +252,27 @@ QTextCodec* PoInfo::codecForFile(QString gettextHeader) // at least utf8, so utf8-codec can be used for both. if( charset == "CHARSET") { - codec=QTextCodec::codecForName("utf8"); + codec=TQTextCodec::codecForName("utf8"); kdDebug(KBABEL) - << QString("file seems to be a template: using utf8 encoding.") + << TQString("file seems to be a template: using utf8 encoding.") << endl; } else { - codec=QTextCodec::codecForName(charset.latin1()); + codec=TQTextCodec::codecForName(charset.latin1()); } if(!codec) { kdWarning(KBABEL) << "charset found, but no codec available, using UTF8 instead" << endl; - codec=QTextCodec::codecForName("utf8"); + codec=TQTextCodec::codecForName("utf8"); } } else { // No charset? So it is probably ASCII, therefore UTF-8 kdWarning(KBABEL) << "No charset defined! Assuming UTF-8!" << endl; - codec=QTextCodec::codecForName("utf8"); + codec=TQTextCodec::codecForName("utf8"); } return codec; @@ -285,12 +285,12 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem) // Note that the "line" defined by the \n can be different than the line of the file. // We join all lines of the header and then split the result again at the \n sequence - const QStringList header=QStringList::split("\\n",headerItem.msgstrAsList().join(QString())); + const TQStringList header=TQStringList::split("\\n",headerItem.msgstrAsList().join(TQString())); PoInfo info; // extract information from the header - QStringList::const_iterator it; + TQStringList::const_iterator it; // The header of a Gettext .po file is consisted of lines of key and value for(it=header.begin();it!=header.end();++it) @@ -301,8 +301,8 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem) if (res>=0) { knownKey=true; // We know most keys, if not it will be changed to false in the "else" case - const QString key=(*it).left(res).simplifyWhiteSpace(); - QString value=(*it).mid(res+1); + const TQString key=(*it).left(res).simplifyWhiteSpace(); + TQString value=(*it).mid(res+1); // "Chop" the \n at the end if (value.endsWith("\\n")) value.remove(value.length()-2,2); // ### Qt4: use value.chop(2) @@ -332,7 +332,7 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem) } if (!knownKey) { - QString line=(*it); + TQString line=(*it); if(line.right(2)=="\\n") line.remove(line.length()-2,2); // ### Qt4: use value.chop(2) @@ -350,28 +350,28 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem) } -ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive) +ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive) { return PoInfo::info( url, info, wordList, updateWordList, interactive, true); } -ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive, bool msgfmt) +ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt) { stopStaticRead = false; if( !updateWordList && PoInfo::cacheFind( url, info ) ) return OK; - QString target; + TQString target; if(KIO::NetAccess::download(KURL( url ), target, 0)) { - QFile file(target); + TQFile file(target); if ( msgfmt ) { // First check file with msgfmt to be sure, it is syntactically correct Msgfmt msgfmt; - QString output; + TQString output; Msgfmt::Status stat = msgfmt.checkSyntax( target , output ); if(stat == Msgfmt::SyntaxError) { @@ -422,7 +422,7 @@ ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wor if( temp.isFuzzy() ) temp.removeFuzzy(); //find out the codec - QTextCodec* codec = codecForFile( temp.msgstr().first() ); + TQTextCodec* codec = codecForFile( temp.msgstr().first() ); if( !codec ) return PARSE_ERROR; // convert from UTF-8 using codec @@ -447,27 +447,27 @@ ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wor if( updateWordList ) { // FIXME: should care about plural forms in msgid - QString st = temp.msgid().first().simplifyWhiteSpace().lower(); - QStringList sl = QStringList::split( ' ', st ); + TQString st = temp.msgid().first().simplifyWhiteSpace().lower(); + TQStringList sl = TQStringList::split( ' ', st ); while(!sl.isEmpty()) { - QString w = sl.first(); + TQString w = sl.first(); sl.pop_front(); if( !wordList.contains(w) ) wordList.append( w ); } st = temp.msgstr().join(" " ).simplifyWhiteSpace().lower(); - sl = QStringList::split( ' ', st ); + sl = TQStringList::split( ' ', st ); while(!sl.isEmpty()) { - QString w = sl.first(); + TQString w = sl.first(); sl.pop_front(); if( !wordList.contains(w) ) wordList.append( w ); } st = temp.comment().simplifyWhiteSpace().lower(); - sl = QStringList::split( ' ', st ); + sl = TQStringList::split( ' ', st ); while(!sl.isEmpty()) { - QString w = sl.first(); + TQString w = sl.first(); sl.pop_front(); if( !wordList.contains(w) ) wordList.append( w ); } @@ -504,12 +504,12 @@ ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wor return OK; } -bool PoInfo::findInFile( const QString& url, FindOptions options ) +bool PoInfo::findInFile( const TQString& url, FindOptions options ) { enum {Begin, Comment, Msgid, Msgstr, Msgctxt} part = Begin; stopStaticRead = false; - QString target; + TQString target; if(KIO::NetAccess::download(KURL( url ), target, 0)) { std::ifstream* stream = new std::ifstream( target.local8Bit()); @@ -523,8 +523,8 @@ bool PoInfo::findInFile( const QString& url, FindOptions options ) // prepare the search - QString searchStr = options.findStr; - QRegExp regexp( searchStr ); + TQString searchStr = options.findStr; + TQRegExp regexp( searchStr ); if( options.isRegExp ) regexp.setCaseSensitive( options.caseSensitive ); @@ -540,14 +540,14 @@ bool PoInfo::findInFile( const QString& url, FindOptions options ) return false; // header is not at the beginning, broken file } - QTextCodec* codec = codecForFile( temp.msgstr().first() ); + TQTextCodec* codec = codecForFile( temp.msgstr().first() ); if( !codec ) { return false; } // now parse the rest of the file - QString text; + TQString text; int pos,len; while(lexer->lastToken != T_EOF) @@ -565,10 +565,10 @@ bool PoInfo::findInFile( const QString& url, FindOptions options ) { if( options.wholeWords) { len = searchStr.length(); - QString pre = text.mid(pos-1,1); - QString post = text.mid(pos+len,1); - if( !pre.contains( QRegExp("[a-zA-Z0-9]")) && - !post.contains( QRegExp("[a-zA-Z0-9]") ) + TQString pre = text.mid(pos-1,1); + TQString post = text.mid(pos+len,1); + if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) && + !post.contains( TQRegExp("[a-zA-Z0-9]") ) ) { delete lexer; delete stream; @@ -615,10 +615,10 @@ bool PoInfo::findInFile( const QString& url, FindOptions options ) { if( options.wholeWords) { len = searchStr.length(); - QString pre = text.mid(pos-1,1); - QString post = text.mid(pos+len,1); - if( !pre.contains( QRegExp("[a-zA-Z0-9]")) && - !post.contains( QRegExp("[a-zA-Z0-9]") ) + TQString pre = text.mid(pos-1,1); + TQString post = text.mid(pos+len,1); + if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) && + !post.contains( TQRegExp("[a-zA-Z0-9]") ) ) { delete lexer; delete stream; @@ -674,9 +674,9 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b // comment if( lexer->lastToken == T_COMMENT ) { - QString _comment = QString::fromUtf8(lexer->YYText()); + TQString _comment = TQString::fromUtf8(lexer->YYText()); while( lexer->yylex() == T_COMMENT ) - _comment += "\n"+QString::fromUtf8(lexer->YYText()); + _comment += "\n"+TQString::fromUtf8(lexer->YYText()); item.setComment( _comment ); // kdDebug(KBABEL) << "Comment: " << _comment << endl; } @@ -700,12 +700,12 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b if( lexer->lastToken != T_MSGID ) return PARSE_ERROR; if( lexer->yylex() != T_STRING ) return PARSE_ERROR; - QStringList msgids = item.msgid(); - QStringList::Iterator it = msgids.begin(); - *it = QString::fromUtf8(lexer->YYText()); + TQStringList msgids = item.msgid(); + TQStringList::Iterator it = msgids.begin(); + *it = TQString::fromUtf8(lexer->YYText()); if( storeText ) while( lexer->yylex() == T_STRING ) - (*it) += ("\n"+ QString::fromUtf8(lexer->YYText()) ); + (*it) += ("\n"+ TQString::fromUtf8(lexer->YYText()) ); else { if( lexer->yylex() == T_STRING ) // this is not header { @@ -721,12 +721,12 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b { _gettextPluralForm = true; if( lexer->yylex() != T_STRING ) return PARSE_ERROR; - QStringList msgids = item.msgid(); + TQStringList msgids = item.msgid(); it = msgids.fromLast(); - *it = QString::fromUtf8(lexer->YYText()); + *it = TQString::fromUtf8(lexer->YYText()); if( storeText ) while( lexer->yylex() == T_STRING ) - (*it)+="\n"+ QString::fromUtf8(lexer->YYText()); + (*it)+="\n"+ TQString::fromUtf8(lexer->YYText()); else while( lexer->yylex() == T_STRING ); item.setMsgid( msgids ); // kdDebug(KBABEL) << "Msgid_plural: " << *it << endl; @@ -739,12 +739,12 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b { if( lexer->yylex() != T_STRING ) return PARSE_ERROR; - QStringList msgstrs = item.msgstr(); + TQStringList msgstrs = item.msgstr(); it = msgstrs.begin(); - *it = QString::fromUtf8(lexer->YYText()); + *it = TQString::fromUtf8(lexer->YYText()); if( storeText || item.msgid().first().isEmpty() ) // if we should store the text or it is a header while( lexer->yylex() == T_STRING ) - (*it)+= ("\n"+ QString::fromUtf8(lexer->YYText())); + (*it)+= ("\n"+ TQString::fromUtf8(lexer->YYText())); else if( lexer->yylex() == T_STRING ) // check next token, whether it is really translated { @@ -756,21 +756,21 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b } else { - QStringList msgstrs = item.msgstr(); - QString s = QString::fromUtf8(lexer->YYText()); - while( lexer->lastToken == T_MSGSTR && s.contains( QRegExp("^msgstr\\[[0-9]+\\]" ) ) ) + TQStringList msgstrs = item.msgstr(); + TQString s = TQString::fromUtf8(lexer->YYText()); + while( lexer->lastToken == T_MSGSTR && s.contains( TQRegExp("^msgstr\\[[0-9]+\\]" ) ) ) { if( lexer->yylex() != T_STRING ) return PARSE_ERROR; it = msgstrs.fromLast(); - *it = QString::fromUtf8(lexer->YYText()); + *it = TQString::fromUtf8(lexer->YYText()); if( storeText ) do { - (*it)+="\n"+QString::fromUtf8(lexer->YYText()); + (*it)+="\n"+TQString::fromUtf8(lexer->YYText()); } while( lexer->yylex() == T_STRING ); else while( lexer->yylex() == T_STRING ); // kdDebug(KBABEL) << "Msgstr: " << *it << endl; - s = QString::fromUtf8(lexer->YYText()); + s = TQString::fromUtf8(lexer->YYText()); } item.setMsgstr( msgstrs ); } diff --git a/kbabel/common/poinfo.h b/kbabel/common/poinfo.h index 21b8d72d..830d35eb 100644 --- a/kbabel/common/poinfo.h +++ b/kbabel/common/poinfo.h @@ -38,7 +38,7 @@ #include -#include +#include /** * @brief File cache version number. @@ -64,17 +64,17 @@ public: int fuzzy; int untranslated; - QString project; - QString creation; - QString revision; - QString lastTranslator; - QString languageTeam; - QString mimeVersion; - QString contentType; - QString encoding; - QString others; + TQString project; + TQString creation; + TQString revision; + TQString lastTranslator; + TQString languageTeam; + TQString mimeVersion; + TQString contentType; + TQString encoding; + TQString others; - QString headerComment; + TQString headerComment; /** * Find PO-file information in the cache. @@ -83,7 +83,7 @@ public: * @param info Returned cached information. * @return true if found, false otherwise. */ - static bool cacheFind(const QString url, PoInfo& info); + static bool cacheFind(const TQString url, PoInfo& info); /** * Save PO-file information in the cache. @@ -91,7 +91,7 @@ public: * @param url The URL of the PO-file. * @param info Information to save. */ - static void cacheSave(const QString url, PoInfo& info); + static void cacheSave(const TQString url, PoInfo& info); /** * @brief Get information about the PO file @@ -105,7 +105,7 @@ public: * being parsed? * @since KBabel 1.11 (KDE 3.5) */ - static ConversionStatus info(const QString& url,PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive, bool msgfmt); + static ConversionStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt); /** * @brief Get information about the PO file @@ -121,10 +121,10 @@ public: * KBabel 1.11.1 (KDE 3.5.1) * @note This function always call Gettext's mgfmt before parsing each file */ - static ConversionStatus info(const QString& url,PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive = true); + static ConversionStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive = true); static PoInfo headerInfo(const CatalogItem&); - static bool findInFile(const QString& url, FindOptions options ); + static bool findInFile(const TQString& url, FindOptions options ); static bool stopStaticRead; @@ -135,7 +135,7 @@ public: * * @return Codec for found charset or 0, if no information has been found */ - static QTextCodec* codecForFile(QString gettextHeader); + static TQTextCodec* codecForFile(TQString gettextHeader); /** * @brief Write the entire cache. diff --git a/kbabel/common/projectsettings.cpp b/kbabel/common/projectsettings.cpp index 3687c9d4..3f8f47a3 100644 --- a/kbabel/common/projectsettings.cpp +++ b/kbabel/common/projectsettings.cpp @@ -35,16 +35,16 @@ #include "projectsettings.h" #include "resources.h" -#include +#include #include #include #include #include -QString KBabel::Defaults::Spellcheck::ignoreURL() +TQString KBabel::Defaults::Spellcheck::ignoreURL() { - QString _ignoreURL; + TQString _ignoreURL; KStandardDirs * dirs = KGlobal::dirs(); if(dirs) @@ -89,7 +89,7 @@ int KBabel::Defaults::Spellcheck::spellClient() return defaultsettings->client(); } -QString KBabel::Defaults::Spellcheck::spellDictionary() +TQString KBabel::Defaults::Spellcheck::spellDictionary() { if( ! defaultsettings ) { @@ -109,9 +109,9 @@ int KBabel::Defaults::Spellcheck::spellEncoding() return defaultsettings->encoding(); } -QString KBabel::Defaults::CatalogManager::ignoreURL() +TQString KBabel::Defaults::CatalogManager::ignoreURL() { - QString _ignoreURL; + TQString _ignoreURL; KStandardDirs * dirs = KGlobal::dirs(); if(dirs) diff --git a/kbabel/common/projectsettings.h b/kbabel/common/projectsettings.h index 186b21e5..49afc0a6 100644 --- a/kbabel/common/projectsettings.h +++ b/kbabel/common/projectsettings.h @@ -35,10 +35,10 @@ #ifndef PROJECTSETTINGS_H #define PROJECTSETTINGS_H -#include -#include -#include -#include +#include +#include +#include +#include #include #include "catalogsettings.h" @@ -54,10 +54,10 @@ struct SpellcheckSettings bool runTogether; int spellEncoding; int spellClient; - QString spellDict; + TQString spellDict; bool rememberIgnored; - QString ignoreURL; + TQString ignoreURL; bool onFlySpellcheck; @@ -66,17 +66,17 @@ struct SpellcheckSettings struct CatManSettings { - QString poBaseDir; - QString potBaseDir; + TQString poBaseDir; + TQString potBaseDir; bool openWindow; - QStringList dirCommands; - QStringList dirCommandNames; - QStringList fileCommands; - QStringList fileCommandNames; + TQStringList dirCommands; + TQStringList dirCommandNames; + TQStringList fileCommands; + TQStringList fileCommandNames; - QString ignoreURL; + TQString ignoreURL; bool killCmdOnExit; bool indexWords; @@ -99,16 +99,16 @@ struct SourceContextSettings * A path, which can be used as @CODEROOT@ variable in @ref sourcePaths . * Defaults to empty string. */ - QString codeRoot; + TQString codeRoot; /** * List of paths, where the source file should be lookup. Can use @CODEROOT@ (replaced by @ref codeRoot), * @PACKAGE@ (replaced by package name), @PACKAGEDIR@ (replaced by the * longest known path of the package) and @COMMENTPATH@ (path extracted from comment specs. */ - QStringList sourcePaths; + TQStringList sourcePaths; - void SourceContextSettins() { codeRoot = QString::null; sourcePaths.clear(); } + void SourceContextSettins() { codeRoot = TQString::null; sourcePaths.clear(); } }; /** @@ -120,11 +120,11 @@ namespace Defaults class KDE_EXPORT Spellcheck { public: - static QString ignoreURL(); + static TQString ignoreURL(); static bool noRootAffix(); static bool runTogether(); static int spellClient(); - static QString spellDictionary(); + static TQString spellDictionary(); static int spellEncoding(); private: static KSpellConfig* defaultsettings; @@ -133,7 +133,7 @@ namespace Defaults class KDE_EXPORT CatalogManager { public: - static QString ignoreURL(); + static TQString ignoreURL(); }; } diff --git a/kbabel/common/regexpextractor.cpp b/kbabel/common/regexpextractor.cpp index b69398c6..058834ea 100644 --- a/kbabel/common/regexpextractor.cpp +++ b/kbabel/common/regexpextractor.cpp @@ -35,18 +35,18 @@ #include "regexpextractor.h" #include -#include +#include using namespace KBabel; -RegExpExtractor::RegExpExtractor(const QStringList& regexps) : +RegExpExtractor::RegExpExtractor(const TQStringList& regexps) : _regExpList( regexps ) { - _string=QString::null; + _string=TQString::null; _matches.setAutoDelete(true); } -void RegExpExtractor::setString(QString string) +void RegExpExtractor::setString(TQString string) { _string=string; processString(); @@ -57,17 +57,17 @@ uint RegExpExtractor::countMatches() return _matches.count(); } -QString RegExpExtractor::firstMatch() +TQString RegExpExtractor::firstMatch() { MatchedEntryInfo *ti = _matches.first(); if(ti) return ti->extracted; - return QString::null; + return TQString::null; } -QString RegExpExtractor::nextMatch() +TQString RegExpExtractor::nextMatch() { MatchedEntryInfo *ti=_matches.next(); if(!ti) @@ -76,16 +76,16 @@ QString RegExpExtractor::nextMatch() if(ti) return ti->extracted; - return QString::null; + return TQString::null; } -QString RegExpExtractor::match(uint tagnumber) +TQString RegExpExtractor::match(uint tagnumber) { MatchedEntryInfo *ti=_matches.at(tagnumber); if(ti) return ti->extracted; - return QString::null; + return TQString::null; } int RegExpExtractor::matchIndex(uint tagnumber) @@ -97,27 +97,27 @@ int RegExpExtractor::matchIndex(uint tagnumber) return -1; } -QString RegExpExtractor::prevMatch() +TQString RegExpExtractor::prevMatch() { MatchedEntryInfo *ti=_matches.prev(); if(ti) return ti->extracted; - return QString::null; + return TQString::null; } -QString RegExpExtractor::lastMatch() +TQString RegExpExtractor::lastMatch() { MatchedEntryInfo *ti=_matches.last(); if(ti) return ti->extracted; - return QString::null; + return TQString::null; } -QStringList RegExpExtractor::matches() +TQStringList RegExpExtractor::matches() { - QStringList list; + TQStringList list; MatchedEntryInfo *ti; for(ti=_matches.first(); ti!=0; ti = _matches.next()) { @@ -127,15 +127,15 @@ QStringList RegExpExtractor::matches() return list; } -QString RegExpExtractor::plainString(bool keepPos) +TQString RegExpExtractor::plainString(bool keepPos) { - QString tmp=_string; + TQString tmp=_string; MatchedEntryInfo *ti; for(ti=_matches.first(); ti != 0; ti=_matches.next()) { uint len=ti->extracted.length(); - QString s; + TQString s; for(uint i=0; i tmpList; + TQValueList tmpList; bool found=false; - QString tmp=_string; + TQString tmp=_string; do { found=false; - QStringList::Iterator it; + TQStringList::Iterator it; for(it=_regExpList.begin();it!=_regExpList.end();++it) { int pos=-1; - QString tag; + TQString tag; - QRegExp reg = QRegExp((*it)); + TQRegExp reg = TQRegExp((*it)); pos = reg.search(tmp); int len=reg.matchedLength(); @@ -208,7 +208,7 @@ void RegExpExtractor::processString() ti.extracted=tag; tmpList.append(ti); - QString s; + TQString s; for(uint i=0; i::Iterator it; + TQValueList::Iterator it; for(it=tmpList.begin();it!=tmpList.end();++it) { if((*it).index < min) @@ -249,22 +249,22 @@ void RegExpExtractor::processString() } } -QStringList RegExpExtractor::regExpList() +TQStringList RegExpExtractor::regExpList() { return _regExpList; } -void RegExpExtractor::setRegExpList( const QStringList& regexps ) +void RegExpExtractor::setRegExpList( const TQStringList& regexps ) { _regExpList = regexps; } -void RegExpExtractor::addRegExpIdentifier(QString regExp) +void RegExpExtractor::addRegExpIdentifier(TQString regExp) { _regExpList.append(regExp); } -void RegExpExtractor::deleteRegExpIdentifier(QString regExp) +void RegExpExtractor::deleteRegExpIdentifier(TQString regExp) { _regExpList.remove(regExp); } diff --git a/kbabel/common/regexpextractor.h b/kbabel/common/regexpextractor.h index 89703fba..83ff8f60 100644 --- a/kbabel/common/regexpextractor.h +++ b/kbabel/common/regexpextractor.h @@ -34,11 +34,11 @@ #ifndef _REGEXP_EXTRACTOR_H_ #define _REGEXP_EXTRACTOR_H_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include namespace KBabel @@ -46,7 +46,7 @@ namespace KBabel struct KDE_EXPORT MatchedEntryInfo{ uint index; - QString extracted; + TQString extracted; }; @@ -61,14 +61,14 @@ public: /** * Create a regexp extractor for "string" */ - RegExpExtractor(const QStringList& regexps); + RegExpExtractor(const TQStringList& regexps); virtual ~RegExpExtractor() {} /** * Set the string of this extractor */ - void setString(QString string); + void setString(TQString string); /** * @return the number of matches found @@ -79,17 +79,17 @@ public: * @return the first match, and set the internal cursor to * the beginning */ - QString firstMatch(); + TQString firstMatch(); /** * @return the next match and move cursor forward */ - QString nextMatch(); + TQString nextMatch(); /** * @return the n-th match. It also moves the cursor. */ - QString match(uint matchnumber); + TQString match(uint matchnumber); /** * @return the n-th match. It also moves the cursor. -1 is there @@ -100,17 +100,17 @@ public: /** * @return the next match and move cursor forward */ - QString prevMatch(); + TQString prevMatch(); /** * @return the last match and move the cursor to the end */ - QString lastMatch(); + TQString lastMatch(); /** * @return a list of all matches */ - QStringList matches(); + TQStringList matches(); /** * @return the string without matched text @@ -120,36 +120,36 @@ public: * the matches are replaced with ' ' and therefore the position of the * words will not change */ - QString plainString(bool keepPos=false); + TQString plainString(bool keepPos=false); /** * @return the string, where matches are replaced with the given string */ - QString matchesReplaced(const QString& replace); + TQString matchesReplaced(const TQString& replace); //Functions that allow user to define his own regexps. /** * Add a regexp to the list of regexp identifier. */ - void addRegExpIdentifier(QString regexp); + void addRegExpIdentifier(TQString regexp); /** * Delete from the regexp list the regexp. */ - void deleteRegExpIdentifier(QString regexp); + void deleteRegExpIdentifier(TQString regexp); - void setRegExpList( const QStringList& regexps ); + void setRegExpList( const TQStringList& regexps ); - QStringList regExpList(); + TQStringList regExpList(); protected: void processString(); - QPtrList _matches; - QString _string; - QStringList _regExpList; + TQPtrList _matches; + TQString _string; + TQStringList _regExpList; }; diff --git a/kbabel/common/stringdistance.cpp b/kbabel/common/stringdistance.cpp index 32cb9b96..8de11c98 100644 --- a/kbabel/common/stringdistance.cpp +++ b/kbabel/common/stringdistance.cpp @@ -46,7 +46,7 @@ const int LevenshteinDistance::editCost_insert = 1; const int LevenshteinDistance::editCost_delete = 1; -double relativeDistance(double distance, const QString& left_string, const QString& right_string) +double relativeDistance(double distance, const TQString& left_string, const TQString& right_string) { double maxsize=0; double compsize=0; @@ -63,7 +63,7 @@ double relativeDistance(double distance, const QString& left_string, const QStri * This function sums all the distances between all trees. * For the calculation of the distance between two trees, it calls the function calculate. */ -double Distance::operator()(const QString& left_string, const QString& right_string) +double Distance::operator()(const TQString& left_string, const TQString& right_string) { m_distance = 0.00; if (left_string == right_string) @@ -86,7 +86,7 @@ double Distance::operator()(const QString& left_string, const QString& right_str /** This function calculates the distance between two nodes. * For the calculation you can specify two variables gap & distance. */ -int Distance::nodeDistance(const QString& left_letter, const QString& right_letter) +int Distance::nodeDistance(const TQString& left_letter, const TQString& right_letter) { if ( left_letter == right_letter ) { @@ -105,7 +105,7 @@ int Distance::nodeDistance(const QString& left_letter, const QString& right_lett * This function sums all the distances between all nodes. * For the calculation you can specify the distance between two nodes in variable distance */ -double HammingDistance::calculate(const QString& left_string, const QString& right_string) +double HammingDistance::calculate(const TQString& left_string, const TQString& right_string) { double hammingDistance = 0.00; // if (debug > 0) @@ -135,7 +135,7 @@ double HammingDistance::calculate(const QString& left_string, const QString& rig * A matrice D is generated which represent the distribution of distances between two trees. * The last element represent the Levenshtein-distance. */ -double LevenshteinDistance::calculate(const QString& left_string, const QString& right_string) +double LevenshteinDistance::calculate(const TQString& left_string, const TQString& right_string) { // if (debug > 0) // cout << left_string.length() << " " << right_string.length() << "\t"; diff --git a/kbabel/common/stringdistance.h b/kbabel/common/stringdistance.h index 6f5aa185..89c60627 100644 --- a/kbabel/common/stringdistance.h +++ b/kbabel/common/stringdistance.h @@ -34,7 +34,7 @@ #ifndef STRINGDISTANCE_H #define STRINGDISTANCE_H -#include +#include //#include @@ -69,20 +69,20 @@ class Distance : public NonCopyable { public: virtual ~Distance(){} - double operator()(const QString& left, const QString& right); + double operator()(const TQString& left, const TQString& right); int editCostReplace() { return editCost_replace_base; } static int debug; protected: - virtual double calculate(const QString& left_string, const QString& right_string) = 0; - int nodeDistance(const QString& left_letter, const QString& right_letter); + virtual double calculate(const TQString& left_string, const TQString& right_string) = 0; + int nodeDistance(const TQString& left_letter, const TQString& right_letter); static const int editCost_replace_base; double m_distance; }; -double relativeDistance(double distance, const QString& left_string, const QString right_string); +double relativeDistance(double distance, const TQString& left_string, const TQString right_string); /** @@ -96,7 +96,7 @@ double relativeDistance(double distance, const QString& left_string, const QStri class HammingDistance : public Distance { protected: - virtual double calculate(const QString& left_string, const QString& right_string); + virtual double calculate(const TQString& left_string, const TQString& right_string); int editCostReplace() { return editCost; } static const int editCost; }; @@ -113,7 +113,7 @@ protected: class LevenshteinDistance : public Distance { protected: - virtual double calculate(const QString& left_string, const QString& right_string); + virtual double calculate(const TQString& left_string, const TQString& right_string); int editCostReplace() { return editCost_replace; } static const int editCost_replace; static const int editCost_insert; @@ -122,7 +122,7 @@ protected: /** wrapper function for replacement of fstrcmp from gettext */ -inline double fstrcmp(const QString& left, const QString& right) +inline double fstrcmp(const TQString& left, const TQString& right) { return LevenshteinDistance()(left,right); } diff --git a/kbabel/common/tagextractor.cpp b/kbabel/common/tagextractor.cpp index 45b8ad9f..fded2703 100644 --- a/kbabel/common/tagextractor.cpp +++ b/kbabel/common/tagextractor.cpp @@ -40,13 +40,13 @@ using namespace KBabel; -TagExtractor::TagExtractor() : RegExpExtractor(QStringList()) +TagExtractor::TagExtractor() : RegExpExtractor(TQStringList()) { KConfig* config = KGlobal::config(); config->setGroup("Tags"); - QStringList s=config->readListEntry("TagExpressions"); + TQStringList s=config->readListEntry("TagExpressions"); if( s.empty() ) s = Defaults::Tag::tagExpressions(); RegExpExtractor::setRegExpList(s); diff --git a/kbabel/commonui/cmdedit.cpp b/kbabel/commonui/cmdedit.cpp index bfe95293..07a35c2f 100644 --- a/kbabel/commonui/cmdedit.cpp +++ b/kbabel/commonui/cmdedit.cpp @@ -32,67 +32,67 @@ **************************************************************************** */ #include "cmdedit.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include -CmdEdit::CmdEdit(QWidget* parent, const char* name) - : QWidget(parent,name) +CmdEdit::CmdEdit(TQWidget* parent, const char* name) + : TQWidget(parent,name) { - QGridLayout* layout = new QGridLayout( this , 1 , 1 ); + TQGridLayout* layout = new TQGridLayout( this , 1 , 1 ); layout->setSpacing( KDialog::spacingHint() ); - QLabel* nameLabel = new QLabel( i18n("Command &Label:"), this); - QLabel* cmdLabel = new QLabel( i18n("Co&mmand:"), this); + TQLabel* nameLabel = new TQLabel( i18n("Command &Label:"), this); + TQLabel* cmdLabel = new TQLabel( i18n("Co&mmand:"), this); layout->addWidget( nameLabel, 0 , 0 ); layout->addWidget( cmdLabel, 0 , 1 ); - _cmdNameEdit = new QLineEdit( this , "cmdNameEdit" ); + _cmdNameEdit = new TQLineEdit( this , "cmdNameEdit" ); _cmdNameEdit->setMaxLength(20); nameLabel->setBuddy(_cmdNameEdit); layout->addWidget( _cmdNameEdit , 1 , 0 ); - _cmdEdit = new QLineEdit( this , "cmdEdit" ); + _cmdEdit = new TQLineEdit( this , "cmdEdit" ); cmdLabel->setBuddy(_cmdEdit); layout->addWidget( _cmdEdit , 1 , 1 ); - _addButton = new QPushButton( i18n("&Add"), this ); + _addButton = new TQPushButton( i18n("&Add"), this ); _addButton->setEnabled(false); layout->addWidget( _addButton , 1 , 2 ); - _editButton = new QPushButton( i18n("&Edit"), this ); + _editButton = new TQPushButton( i18n("&Edit"), this ); _editButton->setEnabled(false); layout->addWidget( _editButton , 3 , 2 ); - _removeButton = new QPushButton( i18n("&Remove"), this ); + _removeButton = new TQPushButton( i18n("&Remove"), this ); _removeButton->setEnabled(false); layout->addWidget( _removeButton , 4 , 2 ); - QHBoxLayout* hbox = new QHBoxLayout(); + TQHBoxLayout* hbox = new TQHBoxLayout(); layout->addLayout(hbox,5,2); - _upButton = new QToolButton(UpArrow,this); + _upButton = new TQToolButton(UpArrow,this); _upButton->setFixedSize(20,20); _upButton->setEnabled(false); hbox->addWidget( _upButton ); - _downButton = new QToolButton(DownArrow,this); + _downButton = new TQToolButton(DownArrow,this); _downButton->setFixedSize(20,20); _downButton->setEnabled(false); hbox->addWidget( _downButton); - _commandNames = new QListBox( this , "commandNamesBox" ); + _commandNames = new TQListBox( this , "commandNamesBox" ); _commandNames->setMinimumSize(100, 100); layout->addMultiCellWidget( _commandNames , 3 , 6 , 0 , 0); - _commands = new QListBox( this , "commandsBox" ); + _commands = new TQListBox( this , "commandsBox" ); _commands->setMinimumSize(160, 100); layout->addMultiCellWidget( _commands , 3 , 6 , 1 ,1 ); @@ -107,22 +107,22 @@ CmdEdit::CmdEdit(QWidget* parent, const char* name) setMinimumSize(layout->sizeHint()); - connect(_addButton , SIGNAL(clicked()) , this , SLOT(addCmd()) ) ; - connect(_editButton , SIGNAL(clicked()) , this , SLOT(editCmd()) ); - connect(_removeButton , SIGNAL(clicked()) , this , SLOT(removeCmd()) ); - connect(_upButton , SIGNAL(clicked()) , this , SLOT(upCmd()) ) ; - connect(_downButton , SIGNAL(clicked()) , this , SLOT(downCmd()) ); + connect(_addButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(addCmd()) ) ; + connect(_editButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(editCmd()) ); + connect(_removeButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(removeCmd()) ); + connect(_upButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(upCmd()) ) ; + connect(_downButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(downCmd()) ); - connect(_commands , SIGNAL(highlighted(int)) , this, SLOT(cmdHighlighted(int)) ); - connect(_commandNames , SIGNAL(highlighted(int)) , this, SLOT(cmdNameHighlighted(int)) ); - connect(_commands , SIGNAL(selected(int)) , this, SLOT(editCmd()) ); - connect(_commandNames , SIGNAL(selected(int)) , this, SLOT(editCmd()) ); + connect(_commands , TQT_SIGNAL(highlighted(int)) , this, TQT_SLOT(cmdHighlighted(int)) ); + connect(_commandNames , TQT_SIGNAL(highlighted(int)) , this, TQT_SLOT(cmdNameHighlighted(int)) ); + connect(_commands , TQT_SIGNAL(selected(int)) , this, TQT_SLOT(editCmd()) ); + connect(_commandNames , TQT_SIGNAL(selected(int)) , this, TQT_SLOT(editCmd()) ); - connect(_cmdEdit, SIGNAL(textChanged(const QString&)) , this , SLOT(checkAdd()) ); - connect(_cmdNameEdit, SIGNAL(textChanged(const QString&)) , this , SLOT(checkAdd()) ); + connect(_cmdEdit, TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(checkAdd()) ); + connect(_cmdNameEdit, TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(checkAdd()) ); } -void CmdEdit::setCommands(const QStringList& commands,const QStringList& commandNames) +void CmdEdit::setCommands(const TQStringList& commands,const TQStringList& commandNames) { _commands->clear(); _commands->insertStringList(commands); @@ -131,7 +131,7 @@ void CmdEdit::setCommands(const QStringList& commands,const QStringList& command _commandNames->insertStringList(commandNames); } -void CmdEdit::commands(QStringList& commands, QStringList& commandNames) +void CmdEdit::commands(TQStringList& commands, TQStringList& commandNames) { commands.clear(); commandNames.clear(); @@ -148,8 +148,8 @@ void CmdEdit::commands(QStringList& commands, QStringList& commandNames) void CmdEdit::addCmd() { - QString cmd = _cmdEdit->text(); - QString cmdName = _cmdNameEdit->text(); + TQString cmd = _cmdEdit->text(); + TQString cmdName = _cmdNameEdit->text(); _cmdEdit->clear(); _cmdNameEdit->clear(); @@ -197,8 +197,8 @@ void CmdEdit::removeCmd() void CmdEdit::upCmd() { - QString cmd = _commands->currentText(); - QString cmdName = _commandNames->currentText(); + TQString cmd = _commands->currentText(); + TQString cmdName = _commandNames->currentText(); int index=_commands->currentItem(); _commands->removeItem(index); @@ -220,8 +220,8 @@ void CmdEdit::upCmd() void CmdEdit::downCmd() { - QString cmd = _commands->currentText(); - QString cmdName = _commandNames->currentText(); + TQString cmd = _commands->currentText(); + TQString cmdName = _commandNames->currentText(); int index=_commands->currentItem(); _commands->removeItem(index); diff --git a/kbabel/commonui/cmdedit.h b/kbabel/commonui/cmdedit.h index dc61679b..64abd815 100644 --- a/kbabel/commonui/cmdedit.h +++ b/kbabel/commonui/cmdedit.h @@ -37,8 +37,8 @@ #include #endif -#include -#include +#include +#include class QListBox; class QLineEdit; @@ -49,10 +49,10 @@ class CmdEdit : public QWidget { Q_OBJECT public: - CmdEdit(QWidget* parent=0,const char* name=0); + CmdEdit(TQWidget* parent=0,const char* name=0); - void setCommands(const QStringList& commands,const QStringList& commandNames); - void commands(QStringList& commands, QStringList& commandNames); + void setCommands(const TQStringList& commands,const TQStringList& commandNames); + void commands(TQStringList& commands, TQStringList& commandNames); signals: void widgetChanged(); @@ -78,17 +78,17 @@ private slots: void checkAdd(); private: - QListBox* _commands; - QListBox* _commandNames; + TQListBox* _commands; + TQListBox* _commandNames; - QLineEdit* _cmdEdit; - QLineEdit* _cmdNameEdit; + TQLineEdit* _cmdEdit; + TQLineEdit* _cmdNameEdit; - QPushButton* _addButton; - QPushButton* _editButton; - QPushButton* _removeButton; - QToolButton* _upButton; - QToolButton* _downButton; + TQPushButton* _addButton; + TQPushButton* _editButton; + TQPushButton* _removeButton; + TQToolButton* _upButton; + TQToolButton* _downButton; }; #endif // CMDEDIT_H diff --git a/kbabel/commonui/context.cpp b/kbabel/commonui/context.cpp index db468795..55c0f196 100644 --- a/kbabel/commonui/context.cpp +++ b/kbabel/commonui/context.cpp @@ -34,17 +34,17 @@ #include "klisteditor.h" #include "kbprojectsettings.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -62,7 +62,7 @@ #include #include -SourceContext::SourceContext(QWidget *parent, KBabel::Project::Ptr project): QWidget(parent) +SourceContext::SourceContext(TQWidget *parent, KBabel::Project::Ptr project): TQWidget(parent) , m_parent( parent ) , _part(0) , _view(0) @@ -71,20 +71,20 @@ SourceContext::SourceContext(QWidget *parent, KBabel::Project::Ptr project): QWi , _project(project) { _referenceList.clear(); - _referenceCombo = new QComboBox( this ); - connect( _referenceCombo, SIGNAL(activated(int)), this, SLOT(updateToSelected(int))); + _referenceCombo = new TQComboBox( this ); + connect( _referenceCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateToSelected(int))); - _layout= new QVBoxLayout(this); + _layout= new TQVBoxLayout(this); _layout->addWidget(_referenceCombo); } -void SourceContext::setContext( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile ) +void SourceContext::setContext( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile ) { if( !_part && !loadPart() ) return; _referenceCombo->clear(); _referenceList = resolvePath( packageDir, packageName, gettextComment, urlPoFile ); - for( QValueList::const_iterator it = _referenceList.constBegin(); it != _referenceList.constEnd(); ++it ) + for( TQValueList::const_iterator it = _referenceList.constBegin(); it != _referenceList.constEnd(); ++it ) _referenceCombo->insertItem((*it).path); _referenceCombo->setEnabled( !_referenceList.isEmpty() ); @@ -120,24 +120,24 @@ void SourceContext::updateToSelected(int index) (dynamic_cast(_part))->setSelection(ci.line-1,0,ci.line,0); } -QValueList SourceContext::resolvePath( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile ) +TQValueList SourceContext::resolvePath( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile ) { //kdDebug() << "GETTEXTCOMMENT:" << gettextComment << endl; // Find the directory name of the PO file, if the PO file is local // ### TODO: find a way to allow remote files too - QString poDir; + TQString poDir; #if KDE_IS_VERSION( 3, 5, 0 ) const KURL localUrl( KIO::NetAccess::mostLocalURL( urlPoFile, m_parent ) ); if ( localUrl.isLocalFile() ) { - const QFileInfo fi( localUrl.path() ); + const TQFileInfo fi( localUrl.path() ); poDir = fi.dirPath( true ); } #else if ( urlPoFile.isLocalFile() ) { - const QFileInfo fi( urlPoFile.path() ); + const TQFileInfo fi( urlPoFile.path() ); poDir = fi.dirPath( true ); } #endif @@ -151,12 +151,12 @@ QValueList SourceContext::resolvePath( const QString& packageDir, c kdDebug() << "CONTEXT VARIABLE END" << endl; #endif - QStringList prefixes; - const QStringList paths = _project->settings()->paths(); + TQStringList prefixes; + const TQStringList paths = _project->settings()->paths(); - for( QStringList::const_iterator it = paths.constBegin(); it!=paths.constEnd() ; ++it ) + for( TQStringList::const_iterator it = paths.constBegin(); it!=paths.constEnd() ; ++it ) { - QString pref = (*it); + TQString pref = (*it); if ( !poDir.isEmpty() ) { @@ -171,19 +171,19 @@ QValueList SourceContext::resolvePath( const QString& packageDir, c prefixes.append(pref); } - QValueList rawRefList; // raw references - QRegExp re("^\\s*(.+):(\\d+)\\s*$"); // Reg. exp. for Gettext references - QRegExp rex( "^#. i18n: file (.+) line (\\d+)\\s*$" ); //Reg. exp. for KDE extractrc/extractattr references - QRegExp res( "^# [Ff]ile: (.+), line(?: number)?: (\\d+)\\s*$"); // Reg. exp. for "strict" PO format - const QStringList lines = QStringList::split( "\n", gettextComment ); - for ( QStringList::const_iterator it = lines.constBegin() ; it != lines.constEnd() ; ++it) + TQValueList rawRefList; // raw references + TQRegExp re("^\\s*(.+):(\\d+)\\s*$"); // Reg. exp. for Gettext references + TQRegExp rex( "^#. i18n: file (.+) line (\\d+)\\s*$" ); //Reg. exp. for KDE extractrc/extractattr references + TQRegExp res( "^# [Ff]ile: (.+), line(?: number)?: (\\d+)\\s*$"); // Reg. exp. for "strict" PO format + const TQStringList lines = TQStringList::split( "\n", gettextComment ); + for ( TQStringList::const_iterator it = lines.constBegin() ; it != lines.constEnd() ; ++it) { - const QString curLine = (*it).stripWhiteSpace(); + const TQString curLine = (*it).stripWhiteSpace(); if( curLine.startsWith( "#:" ) ) { // We have a Gettext line with references - const QStringList references( QStringList::split( " ", curLine.mid( 2 ), false ) ); - for ( QStringList::const_iterator it = references.constBegin(); it != references.constEnd(); ++it ) + const TQStringList references( TQStringList::split( " ", curLine.mid( 2 ), false ) ); + for ( TQStringList::const_iterator it = references.constBegin(); it != references.constEnd(); ++it ) { if ( re.exactMatch( (*it) ) ) { @@ -191,7 +191,7 @@ QValueList SourceContext::resolvePath( const QString& packageDir, c ref.line = re.cap(2).toInt(); ref.path = re.cap(1); // ### TODO KDE4: perhaps we should not do the replace if compiled for Windows - ref.path.replace( QChar( '\\' ), QChar( '/' ) ); + ref.path.replace( TQChar( '\\' ), TQChar( '/' ) ); rawRefList.append( ref ); } } @@ -223,7 +223,7 @@ QValueList SourceContext::resolvePath( const QString& packageDir, c ref.line = res.cap(2).toInt(); ref.path = res.cap(1); // ### TODO KDE4: perhaps we should not do the replace if compiled for Windows - ref.path.replace( QChar( '\\' ), QChar( '/' ) ); + ref.path.replace( TQChar( '\\' ), TQChar( '/' ) ); rawRefList.append( ref ); } } @@ -232,18 +232,18 @@ QValueList SourceContext::resolvePath( const QString& packageDir, c } // Now that we have gathered the references, we need to convert them to absolute paths - QValueList results; - for ( QValueList::const_iterator it = rawRefList.constBegin(); it != rawRefList.constEnd(); ++it ) + TQValueList results; + for ( TQValueList::const_iterator it = rawRefList.constBegin(); it != rawRefList.constEnd(); ++it ) { const int lineNum = (*it).line; - const QString fileName = (*it).path; - for ( QStringList::const_iterator it1 = prefixes.constBegin(); it1 != prefixes.constEnd(); ++it1 ) + const TQString fileName = (*it).path; + for ( TQStringList::const_iterator it1 = prefixes.constBegin(); it1 != prefixes.constEnd(); ++it1 ) { - QString path = (*it1); + TQString path = (*it1); path.replace( "@COMMENTPATH@", fileName); //kdDebug() << "CONTEXT PATH: " << path << endl; // DEBUG - QFileInfo pathInfo( path ); + TQFileInfo pathInfo( path ); if( pathInfo.exists() ) { ContextInfo ref; @@ -289,8 +289,8 @@ bool SourceContext::loadPart() return false; } _view = _part->createView( this, 0 ); - _layout->addWidget(static_cast(_view), 1); - static_cast(_view)->show(); + _layout->addWidget(static_cast(_view), 1); + static_cast(_view)->show(); return true; } diff --git a/kbabel/commonui/context.h b/kbabel/commonui/context.h index 2ccceecd..d68a2371 100644 --- a/kbabel/commonui/context.h +++ b/kbabel/commonui/context.h @@ -33,8 +33,8 @@ #ifndef CONTEXT_H #define CONTEXT_H -#include -#include +#include +#include #include #include @@ -50,7 +50,7 @@ class KURL; struct ContextInfo { - QString path; + TQString path; uint line; }; @@ -78,7 +78,7 @@ class KDE_EXPORT SourceContext : public QWidget { Q_OBJECT public: - SourceContext(QWidget* parent, KBabel::Project::Ptr project); + SourceContext(TQWidget* parent, KBabel::Project::Ptr project); void setProject(KBabel::Project::Ptr project); @@ -91,7 +91,7 @@ public slots: * @param urlPoFile URL of the PO file * @todo even if @p urlPoFile is an URL SourceContext::resolvePath is not remote-aware yet */ - void setContext( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile ); + void setContext( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile ); private: /** @@ -103,17 +103,17 @@ private: * @todo even if @p urlPoFile is an URL SourceContext::resolvePath is not remote-aware yet * @private */ - QValueList resolvePath( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile ); + TQValueList resolvePath( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile ); bool loadPart(); /// Parent widget (for KIO::NetAccess member functions) - QWidget* m_parent; + TQWidget* m_parent; KTextEditor::Document* _part; KTextEditor::View* _view; - QComboBox *_referenceCombo; - QVBoxLayout *_layout; + TQComboBox *_referenceCombo; + TQVBoxLayout *_layout; - QValueList _referenceList; + TQValueList _referenceList; KBabel::Project::Ptr _project; private slots: diff --git a/kbabel/commonui/finddialog.cpp b/kbabel/commonui/finddialog.cpp index 7335f30a..d210811a 100644 --- a/kbabel/commonui/finddialog.cpp +++ b/kbabel/commonui/finddialog.cpp @@ -34,14 +34,14 @@ **************************************************************************** */ #include "finddialog.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -52,14 +52,14 @@ using namespace KBabel; -FindDialog::FindDialog(bool forReplace, QWidget* parent) +FindDialog::FindDialog(bool forReplace, TQWidget* parent) :KDialogBase(parent, "finddialog",true, "", Ok|Cancel, Ok) , _regExpEditDialog(0), _replaceDlg(forReplace) { - QWidget* page = new QWidget(this); - QVBoxLayout *layout = new QVBoxLayout(page, 0, spacingHint()); + TQWidget* page = new TQWidget(this); + TQVBoxLayout *layout = new TQVBoxLayout(page, 0, spacingHint()); - QLabel *label = new QLabel(i18n("&Find:"),page); + TQLabel *label = new TQLabel(i18n("&Find:"),page); layout->addWidget(label); _findCombo = new KComboBox(true, page, "findCombo"); @@ -68,20 +68,20 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent) layout->addWidget(_findCombo); label->setBuddy(_findCombo); - QString msg=i18n("

    Find text

    " + TQString msg=i18n("

    Find text

    " "

    Here you can enter the text you want to search for. " "If you want to search for a regular expression, " "enable Use regular expression below.

    "); - QWhatsThis::add(label,msg); - QWhatsThis::add(_findCombo,msg); + TQWhatsThis::add(label,msg); + TQWhatsThis::add(_findCombo,msg); if(forReplace) { setCaption(i18n("Replace")); setButtonOK(i18n("&Replace")); - _replaceLabel = new QLabel(i18n("&Replace with:"),page); + _replaceLabel = new TQLabel(i18n("&Replace with:"),page); layout->addWidget(_replaceLabel); _replaceCombo = new KComboBox(true, page, "replaceCombo"); _replaceCombo->setMaxCount(10); @@ -94,8 +94,8 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent) "replaced with. The text is used as is. It is not possible to make a back " "reference, if you have searched for a regular expression.

    "); - QWhatsThis::add(_replaceLabel,msg); - QWhatsThis::add(_replaceCombo,msg); + TQWhatsThis::add(_replaceLabel,msg); + TQWhatsThis::add(_replaceCombo,msg); } else { setCaption(i18n("Find")); @@ -105,48 +105,48 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent) _replaceCombo=0; } - _buttonGrp = new QButtonGroup(3, Qt::Horizontal, i18n("Where to Search"), page); - connect(_buttonGrp,SIGNAL(clicked(int)), this, SLOT(inButtonsClicked(int))); + _buttonGrp = new TQButtonGroup(3, Qt::Horizontal, i18n("Where to Search"), page); + connect(_buttonGrp,TQT_SIGNAL(clicked(int)), this, TQT_SLOT(inButtonsClicked(int))); layout->addWidget(_buttonGrp); - _inMsgid = new QCheckBox(i18n("&Msgid"),_buttonGrp); - _inMsgstr = new QCheckBox(i18n("M&sgstr"),_buttonGrp); - _inComment = new QCheckBox(i18n("Comm&ent"),_buttonGrp); + _inMsgid = new TQCheckBox(i18n("&Msgid"),_buttonGrp); + _inMsgstr = new TQCheckBox(i18n("M&sgstr"),_buttonGrp); + _inComment = new TQCheckBox(i18n("Comm&ent"),_buttonGrp); - QWhatsThis::add(_buttonGrp,i18n("

    Where to search

    " + TQWhatsThis::add(_buttonGrp,i18n("

    Where to search

    " "

    Select here in which parts of a catalog entry you want " "to search.

    ")); - QGroupBox* box = new QGroupBox(2, Qt::Horizontal, i18n("Options"), page); + TQGroupBox* box = new TQGroupBox(2, Qt::Horizontal, i18n("Options"), page); layout->addWidget(box); - _caseSensitive = new QCheckBox(i18n("C&ase sensitive"),box); - _wholeWords = new QCheckBox(i18n("O&nly whole words"),box); - _ignoreAccelMarker = new QCheckBox(i18n("I&gnore marker for keyboard accelerator"),box); - _ignoreContextInfo = new QCheckBox(i18n("Ignore con&text information"),box); - _fromCursor = new QCheckBox(i18n("From c&ursor position"),box); - _backwards = new QCheckBox(i18n("F&ind backwards"),box); + _caseSensitive = new TQCheckBox(i18n("C&ase sensitive"),box); + _wholeWords = new TQCheckBox(i18n("O&nly whole words"),box); + _ignoreAccelMarker = new TQCheckBox(i18n("I&gnore marker for keyboard accelerator"),box); + _ignoreContextInfo = new TQCheckBox(i18n("Ignore con&text information"),box); + _fromCursor = new TQCheckBox(i18n("From c&ursor position"),box); + _backwards = new TQCheckBox(i18n("F&ind backwards"),box); - QHBox *regexp = new QHBox(box); + TQHBox *regexp = new TQHBox(box); - _isRegExp = new QCheckBox(i18n("Use regu&lar expression"),regexp); + _isRegExp = new TQCheckBox(i18n("Use regu&lar expression"),regexp); _regExpButton = 0; if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) { - _regExpButton = new QPushButton( i18n("&Edit..."), regexp ); - connect( _regExpButton, SIGNAL( clicked() ), this, SLOT( regExpButtonClicked())); - connect( _isRegExp, SIGNAL( toggled(bool) ), _regExpButton, SLOT(setEnabled(bool))); + _regExpButton = new TQPushButton( i18n("&Edit..."), regexp ); + connect( _regExpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( regExpButtonClicked())); + connect( _isRegExp, TQT_SIGNAL( toggled(bool) ), _regExpButton, TQT_SLOT(setEnabled(bool))); } if(forReplace) { _inMsgid->setEnabled(false); - _askForReplace = new QCheckBox(i18n("As&k before replacing"),box); + _askForReplace = new TQCheckBox(i18n("As&k before replacing"),box); _ignoreContextInfo->setEnabled(false); - QWhatsThis::add(box,i18n("

    Options

    " + TQWhatsThis::add(box,i18n("

    Options

    " "

    Here you can finetune replacing:" "

    • Case sensitive: does case of entered text have to be respected?
    • " "
    • Only whole words: text found must not be part of a longer word
    • " @@ -163,7 +163,7 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent) else { _askForReplace=0; - QWhatsThis::add(box,i18n("

      Options

      " + TQWhatsThis::add(box,i18n("

      Options

      " "

      Here you can finetune the search:" "

      • Case sensitive: does case of entered text have to be respected?
      • " "
      • Only whole words: text found must not be part of a longer word
      • " @@ -186,7 +186,7 @@ FindDialog::~FindDialog() saveSettings(); } -int FindDialog::show(QString initialStr) +int FindDialog::show(TQString initialStr) { if( !initialStr.isEmpty() ) { _findCombo->setEditText( initialStr ); @@ -199,7 +199,7 @@ int FindDialog::show(QString initialStr) int r = result(); - if( r == QDialog::Accepted ) { + if( r == TQDialog::Accepted ) { if(_replaceDlg) { _replaceList.remove(_replaceCombo->currentText()); _replaceList.prepend(_replaceCombo->currentText()); @@ -260,7 +260,7 @@ int FindDialog::show(QString initialStr) return r; } -int FindDialog::exec(QString initialStr) +int FindDialog::exec(TQString initialStr) { if( !initialStr.isEmpty() ) { _findCombo->setEditText( initialStr ); @@ -273,7 +273,7 @@ int FindDialog::exec(QString initialStr) int r = result(); - if( r == QDialog::Accepted ) { + if( r == TQDialog::Accepted ) { if(_replaceDlg) { _replaceList.remove(_replaceCombo->currentText()); _replaceList.prepend(_replaceCombo->currentText()); @@ -520,30 +520,30 @@ void FindDialog::inButtonsClicked(int id) void FindDialog::regExpButtonClicked() { if ( _regExpEditDialog == 0 ) - _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor", QString::null, this ); + _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor", TQString::null, this ); KRegExpEditorInterface *iface = dynamic_cast( _regExpEditDialog ); if( iface ) { iface->setRegExp( _findCombo->currentText() ); - if( _regExpEditDialog->exec() == QDialog::Accepted ) + if( _regExpEditDialog->exec() == TQDialog::Accepted ) _findCombo->setCurrentText( iface->regExp() ); } } -ReplaceDialog::ReplaceDialog(QWidget* parent) +ReplaceDialog::ReplaceDialog(TQWidget* parent) :KDialogBase(Plain, "", Close|User1|User2|User3, User1, parent,"finddialog" , true,false,i18n("&Replace"),i18n("&Goto Next"),i18n("R&eplace All")) { - QWidget* page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout(page, 0, spacingHint()); + TQWidget* page = plainPage(); + TQVBoxLayout *layout = new TQVBoxLayout(page, 0, spacingHint()); - QLabel *label = new QLabel(i18n("Replace this string?"),page); + TQLabel *label = new TQLabel(i18n("Replace this string?"),page); layout->addWidget(label); - connect(this,SIGNAL(user1Clicked()),this,SIGNAL(replace())); - connect(this,SIGNAL(user2Clicked()),this,SIGNAL(next())); - connect(this,SIGNAL(user3Clicked()),this,SIGNAL(replaceAll())); + connect(this,TQT_SIGNAL(user1Clicked()),this,TQT_SIGNAL(replace())); + connect(this,TQT_SIGNAL(user2Clicked()),this,TQT_SIGNAL(next())); + connect(this,TQT_SIGNAL(user3Clicked()),this,TQT_SIGNAL(replaceAll())); } ReplaceDialog::~ReplaceDialog() diff --git a/kbabel/commonui/finddialog.h b/kbabel/commonui/finddialog.h index 7baa0675..c7e6ac14 100644 --- a/kbabel/commonui/finddialog.h +++ b/kbabel/commonui/finddialog.h @@ -33,8 +33,8 @@ #ifndef FINDDIALOG_H #define FINDDIALOG_H -#include -#include +#include +#include #include class QButtonGroup; @@ -52,7 +52,7 @@ public: * Constructor * @param replaceDlg flag, if this is a replace dialog */ - FindDialog(bool replaceDlg, QWidget* parent); + FindDialog(bool replaceDlg, TQWidget* parent); ~FindDialog(); /** @@ -62,7 +62,7 @@ public: * * @return the result code of the dialog */ - int show(QString initialStr); + int show(TQString initialStr); /** * executes the dialog as modal @@ -71,7 +71,7 @@ public: * * @return the result code of the dialog */ - int exec(QString initialStr); + int exec(TQString initialStr); KBabel::FindOptions findOpts(); void setFindOpts(KBabel::FindOptions options); KBabel::ReplaceOptions replaceOpts(); @@ -90,31 +90,31 @@ private slots: private: KComboBox *_findCombo; KComboBox *_replaceCombo; - QLabel *_replaceLabel; + TQLabel *_replaceLabel; - QButtonGroup *_buttonGrp; - QCheckBox *_inMsgid; - QCheckBox *_inMsgstr; - QCheckBox *_inComment; + TQButtonGroup *_buttonGrp; + TQCheckBox *_inMsgid; + TQCheckBox *_inMsgstr; + TQCheckBox *_inComment; - QCheckBox *_caseSensitive; - QCheckBox *_wholeWords; - QCheckBox *_ignoreAccelMarker; - QCheckBox *_ignoreContextInfo; - QCheckBox *_backwards; - QCheckBox *_fromCursor; - QCheckBox *_isRegExp; - QCheckBox *_askForReplace; + TQCheckBox *_caseSensitive; + TQCheckBox *_wholeWords; + TQCheckBox *_ignoreAccelMarker; + TQCheckBox *_ignoreContextInfo; + TQCheckBox *_backwards; + TQCheckBox *_fromCursor; + TQCheckBox *_isRegExp; + TQCheckBox *_askForReplace; - QPushButton *_regExpButton; - QDialog *_regExpEditDialog; + TQPushButton *_regExpButton; + TQDialog *_regExpEditDialog; KBabel::FindOptions _findOptions; KBabel::ReplaceOptions _replaceOptions; - QStringList _findList; - QStringList _replaceFindList; - QStringList _replaceList; + TQStringList _findList; + TQStringList _replaceFindList; + TQStringList _replaceList; bool _replaceDlg; }; @@ -123,7 +123,7 @@ class KDE_EXPORT ReplaceDialog : public KDialogBase { Q_OBJECT public: - ReplaceDialog(QWidget* parent); + ReplaceDialog(TQWidget* parent); ~ReplaceDialog(); signals: diff --git a/kbabel/commonui/kactionselector.cpp b/kbabel/commonui/kactionselector.cpp index b214a49f..b699480c 100644 --- a/kbabel/commonui/kactionselector.cpp +++ b/kbabel/commonui/kactionselector.cpp @@ -35,37 +35,37 @@ #include // for spacingHint() #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include class KActionSelectorPrivate { public: - QListBox *availableListBox, *selectedListBox; - QToolButton *btnAdd, *btnRemove, *btnUp, *btnDown; - QLabel *lAvailable, *lSelected; + TQListBox *availableListBox, *selectedListBox; + TQToolButton *btnAdd, *btnRemove, *btnUp, *btnDown; + TQLabel *lAvailable, *lSelected; bool moveOnDoubleClick, keyboardEnabled; KActionSelector::ButtonIconSize iconSize; - QString addIcon, removeIcon, upIcon, downIcon; + TQString addIcon, removeIcon, upIcon, downIcon; KActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy; bool showUpDownButtons; }; //BEGIN Constructor/destructor -KActionSelector::KActionSelector( QWidget *parent, const char *name ) - : QWidget( parent, name ) +KActionSelector::KActionSelector( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { d = new KActionSelectorPrivate(); d->moveOnDoubleClick = true; d->keyboardEnabled = true; d->iconSize = SmallIcon; - d->addIcon = QApplication::reverseLayout() ? "back" : "forward"; - d->removeIcon = QApplication::reverseLayout() ? "forward" : "back"; + d->addIcon = TQApplication::reverseLayout() ? "back" : "forward"; + d->removeIcon = TQApplication::reverseLayout() ? "forward" : "back"; d->upIcon = "up"; d->downIcon = "down"; d->availableInsertionPolicy = Sorted; @@ -74,53 +74,53 @@ KActionSelector::KActionSelector( QWidget *parent, const char *name ) //int isz = IconSize( KIcon::Small ); - QHBoxLayout *lo = new QHBoxLayout( this ); + TQHBoxLayout *lo = new TQHBoxLayout( this ); lo->setSpacing( KDialog::spacingHint() ); - QVBoxLayout *loAv = new QVBoxLayout( lo ); - d->lAvailable = new QLabel( i18n("&Available:"), this ); + TQVBoxLayout *loAv = new TQVBoxLayout( lo ); + d->lAvailable = new TQLabel( i18n("&Available:"), this ); loAv->addWidget( d->lAvailable ); - d->availableListBox = new QListBox( this ); + d->availableListBox = new TQListBox( this ); loAv->addWidget( d->availableListBox ); d->lAvailable->setBuddy( d->availableListBox ); - QVBoxLayout *loHBtns = new QVBoxLayout( lo ); + TQVBoxLayout *loHBtns = new TQVBoxLayout( lo ); loHBtns->addStretch( 1 ); - d->btnAdd = new QToolButton( this ); + d->btnAdd = new TQToolButton( this ); loHBtns->addWidget( d->btnAdd ); - d->btnRemove = new QToolButton( this ); + d->btnRemove = new TQToolButton( this ); loHBtns->addWidget( d->btnRemove ); loHBtns->addStretch( 1 ); - QVBoxLayout *loS = new QVBoxLayout( lo ); - d->lSelected = new QLabel( i18n("&Selected:"), this ); + TQVBoxLayout *loS = new TQVBoxLayout( lo ); + d->lSelected = new TQLabel( i18n("&Selected:"), this ); loS->addWidget( d->lSelected ); - d->selectedListBox = new QListBox( this ); + d->selectedListBox = new TQListBox( this ); loS->addWidget( d->selectedListBox ); d->lSelected->setBuddy( d->selectedListBox ); - QVBoxLayout *loVBtns = new QVBoxLayout( lo ); + TQVBoxLayout *loVBtns = new TQVBoxLayout( lo ); loVBtns->addStretch( 1 ); - d->btnUp = new QToolButton( this ); + d->btnUp = new TQToolButton( this ); loVBtns->addWidget( d->btnUp ); - d->btnDown = new QToolButton( this ); + d->btnDown = new TQToolButton( this ); loVBtns->addWidget( d->btnDown ); loVBtns->addStretch( 1 ); loadIcons(); - connect( d->btnAdd, SIGNAL(clicked()), this, SLOT(buttonAddClicked()) ); - connect( d->btnRemove, SIGNAL(clicked()), this, SLOT(buttonRemoveClicked()) ); - connect( d->btnUp, SIGNAL(clicked()), this, SLOT(buttonUpClicked()) ); - connect( d->btnDown, SIGNAL(clicked()), this, SLOT(buttonDownClicked()) ); - connect( d->availableListBox, SIGNAL(doubleClicked(QListBoxItem*)), - this, SLOT(itemDoubleClicked(QListBoxItem*)) ); - connect( d->selectedListBox, SIGNAL(doubleClicked(QListBoxItem*)), - this, SLOT(itemDoubleClicked(QListBoxItem*)) ); - connect( d->availableListBox, SIGNAL(currentChanged(QListBoxItem*)), - this, SLOT(slotCurrentChanged(QListBoxItem *)) ); - connect( d->selectedListBox, SIGNAL(currentChanged(QListBoxItem*)), - this, SLOT(slotCurrentChanged(QListBoxItem *)) ); + connect( d->btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonAddClicked()) ); + connect( d->btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonRemoveClicked()) ); + connect( d->btnUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonUpClicked()) ); + connect( d->btnDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonDownClicked()) ); + connect( d->availableListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), + this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) ); + connect( d->selectedListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), + this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) ); + connect( d->availableListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)), + this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) ); + connect( d->selectedListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)), + this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) ); d->availableListBox->installEventFilter( this ); d->selectedListBox->installEventFilter( this ); @@ -135,17 +135,17 @@ KActionSelector::~KActionSelector() //BEGIN Public Methods -QListBox *KActionSelector::availableListBox() +TQListBox *KActionSelector::availableListBox() { return d->availableListBox; } -QListBox *KActionSelector::selectedListBox() +TQListBox *KActionSelector::selectedListBox() { return d->selectedListBox; } -void KActionSelector::setButtonIcon( const QString &icon, MoveButton button ) +void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) { int isz; if ( d->iconSize == SmallIcon ) isz = IconSize( KIcon::Small ); @@ -177,7 +177,7 @@ void KActionSelector::setButtonIcon( const QString &icon, MoveButton button ) } } -void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton button ) +void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button ) { switch ( button ) { @@ -198,7 +198,7 @@ void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton butt } } -void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button ) +void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button ) { switch ( button ) { @@ -219,21 +219,21 @@ void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button ) } } -void KActionSelector::setButtonWhatsThis( const QString &text, MoveButton button ) +void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button ) { switch ( button ) { case ButtonAdd: - QWhatsThis::add( d->btnAdd, text ); + TQWhatsThis::add( d->btnAdd, text ); break; case ButtonRemove: - QWhatsThis::add( d->btnRemove, text ); + TQWhatsThis::add( d->btnRemove, text ); break; case ButtonUp: - QWhatsThis::add( d->btnUp, text ); + TQWhatsThis::add( d->btnUp, text ); break; case ButtonDown: - QWhatsThis::add( d->btnDown, text ); + TQWhatsThis::add( d->btnDown, text ); break; default: kdDebug(KBABEL)<<"KActionSelector::setButtonWhatsThis: DAINBREAD!"<keyboardEnabled = b; } -QString KActionSelector::availableLabel() const +TQString KActionSelector::availableLabel() const { return d->lAvailable->text(); } -void KActionSelector::setAvailableLabel( const QString &text ) +void KActionSelector::setAvailableLabel( const TQString &text ) { d->lAvailable->setText( text ); } -QString KActionSelector::selectedLabel() const +TQString KActionSelector::selectedLabel() const { return d->lSelected->text(); } -void KActionSelector::setSelectedLabel( const QString &text ) +void KActionSelector::setSelectedLabel( const TQString &text ) { d->lSelected->setText( text ); } @@ -357,7 +357,7 @@ void KActionSelector::polish() //END Public Slots //BEGIN Protected -void KActionSelector::keyPressEvent( QKeyEvent *e ) +void KActionSelector::keyPressEvent( TQKeyEvent *e ) { if ( ! d->keyboardEnabled ) return; if ( (e->state() & Qt::ControlButton) ) @@ -383,13 +383,13 @@ void KActionSelector::keyPressEvent( QKeyEvent *e ) } } -bool KActionSelector::eventFilter( QObject *o, QEvent *e ) +bool KActionSelector::eventFilter( TQObject *o, TQEvent *e ) { - if ( d->keyboardEnabled && e->type() == QEvent::KeyPress ) + if ( d->keyboardEnabled && e->type() == TQEvent::KeyPress ) { - if ( (((QKeyEvent*)e)->state() & Qt::ControlButton) ) + if ( (((TQKeyEvent*)e)->state() & Qt::ControlButton) ) { - switch ( ((QKeyEvent*)e)->key() ) + switch ( ((TQKeyEvent*)e)->key() ) { case Key_Right: buttonAddClicked(); @@ -404,18 +404,18 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e ) buttonDownClicked(); break; default: - return QWidget::eventFilter( o, e ); + return TQWidget::eventFilter( o, e ); break; } return true; } - else if ( o->inherits( "QListBox" ) ) + else if ( o->inherits( "TQListBox" ) ) { - switch ( ((QKeyEvent*)e)->key() ) + switch ( ((TQKeyEvent*)e)->key() ) { case Key_Return: case Key_Enter: - QListBox *lb = (QListBox*)o; + TQListBox *lb = (TQListBox*)o; int index = lb->currentItem(); if ( index < 0 ) break; moveItem( lb->item( index ) ); @@ -423,7 +423,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e ) } } } - return QWidget::eventFilter( o, e ); + return TQWidget::eventFilter( o, e ); } //END Protected @@ -433,7 +433,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e ) void KActionSelector::buttonAddClicked() { // move all selected items from available to selected listbox - QListBoxItem *item = d->availableListBox->firstItem(); + TQListBoxItem *item = d->availableListBox->firstItem(); while ( item ) { if ( item->isSelected() ) { d->availableListBox->takeItem( item ); @@ -451,7 +451,7 @@ void KActionSelector::buttonAddClicked() void KActionSelector::buttonRemoveClicked() { // move all selected items from selected to available listbox - QListBoxItem *item = d->selectedListBox->firstItem(); + TQListBoxItem *item = d->selectedListBox->firstItem(); while ( item ) { if ( item->isSelected() ) { d->selectedListBox->takeItem( item ); @@ -470,7 +470,7 @@ void KActionSelector::buttonUpClicked() { int c = d->selectedListBox->currentItem(); if ( c < 0 ) return; - QListBoxItem *item = d->selectedListBox->item( c ); + TQListBoxItem *item = d->selectedListBox->item( c ); d->selectedListBox->takeItem( item ); d->selectedListBox->insertItem( item, c-1 ); d->selectedListBox->setCurrentItem( item ); @@ -481,14 +481,14 @@ void KActionSelector::buttonDownClicked() { int c = d->selectedListBox->currentItem(); if ( c < 0 ) return; - QListBoxItem *item = d->selectedListBox->item( c ); + TQListBoxItem *item = d->selectedListBox->item( c ); d->selectedListBox->takeItem( item ); d->selectedListBox->insertItem( item, c+1 ); d->selectedListBox->setCurrentItem( item ); emit movedDown( item ); } -void KActionSelector::itemDoubleClicked( QListBoxItem *item ) +void KActionSelector::itemDoubleClicked( TQListBoxItem *item ) { if ( d->moveOnDoubleClick ) moveItem( item ); @@ -513,10 +513,10 @@ void KActionSelector::loadIcons() d->btnDown->setIconSet( SmallIconSet( d->downIcon, isz ) ); } -void KActionSelector::moveItem( QListBoxItem *item ) +void KActionSelector::moveItem( TQListBoxItem *item ) { - QListBox *lbFrom = item->listBox(); - QListBox *lbTo; + TQListBox *lbFrom = item->listBox(); + TQListBox *lbTo; if ( lbFrom == d->availableListBox ) lbTo = d->selectedListBox; else if ( lbFrom == d->selectedListBox ) @@ -540,7 +540,7 @@ void KActionSelector::moveItem( QListBoxItem *item ) emit removed( item ); } -int KActionSelector::insertionIndex( QListBox *lb, InsertionPolicy policy ) +int KActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy ) { int index; switch ( policy ) diff --git a/kbabel/commonui/kactionselector.h b/kbabel/commonui/kactionselector.h index 324ed54f..04139570 100644 --- a/kbabel/commonui/kactionselector.h +++ b/kbabel/commonui/kactionselector.h @@ -30,7 +30,7 @@ #ifndef _KACTION_SELECTOR_H_ #define _KACTION_SELECTOR_H_ -#include +#include class QListBox; class QListBoxItem; @@ -56,13 +56,13 @@ class KActionSelectorPrivate; see keyboardEnabled. Note that this may conflist with keyboard selection in the selected list box, - if you set that to anything else than QListBox::Single (which is the default). + if you set that to anything else than TQListBox::Single (which is the default). To use it, simply construct an instance and then add items to the two listboxes, available through lbAvailable() and lbSelected(). Whenever you want, you can retrieve - the selected options using QListBox methods on lbSelected(). + the selected options using TQListBox methods on lbSelected(). - This way, you can use your own QListBoxItem class, allowing you to easily + This way, you can use your own TQListBoxItem class, allowing you to easily store object data in those. When an item is moved to a listbox, it is placed below the current item @@ -84,31 +84,31 @@ class KActionSelectorPrivate; @author Anders Lund */ -class KActionSelector : public QWidget { +class KActionSelector : public TQWidget { Q_OBJECT Q_ENUMS( ButtonIconSize InsertionPolicy ) Q_PROPERTY( bool moveOnDoubleClick READ moveOnDoubleClick WRITE setMoveOnDoubleClick ) Q_PROPERTY( bool keyboardEnabled READ keyboardEnabled WRITE setKeyboardEnabled ) - Q_PROPERTY( QString availableLabel READ availableLabel WRITE setAvailableLabel ) - Q_PROPERTY( QString selectedLabel READ selectedLabel WRITE setSelectedLabel ) + Q_PROPERTY( TQString availableLabel READ availableLabel WRITE setAvailableLabel ) + Q_PROPERTY( TQString selectedLabel READ selectedLabel WRITE setSelectedLabel ) Q_PROPERTY( ButtonIconSize buttonIconSize READ buttonIconSize WRITE setButtonIconSize ) Q_PROPERTY( InsertionPolicy availableInsertionPolicy READ availableInsertionPolicy WRITE setAvailableInsertionPolicy ) Q_PROPERTY( InsertionPolicy selectedInsertionPolicy READ selectedInsertionPolicy WRITE setSelectedInsertionPolicy ) Q_PROPERTY( bool showUpDownButtons READ showUpDownButtons WRITE setShowUpDownButtons ) public: - KActionSelector( QWidget *parent=0, const char *name=0 ); + KActionSelector( TQWidget *parent=0, const char *name=0 ); ~KActionSelector(); /** - @return The QListBox holding the available actions + @return The TQListBox holding the available actions */ - QListBox *availableListBox(); + TQListBox *availableListBox(); /** - @return The QListBox holding the selected actions + @return The TQListBox holding the selected actions */ - QListBox *selectedListBox(); + TQListBox *selectedListBox(); /** This enum indentifies the moving buttons @@ -201,7 +201,7 @@ public: /** @return The text of the label for the available items listbox. */ - QString availableLabel() const; + TQString availableLabel() const; /** Sets the label for the available items listbox to @p text. @@ -209,12 +209,12 @@ public: if you have a single ampersand in the text, the following character will become the accellerator to focus te listbox. */ - void setAvailableLabel( const QString & text ); + void setAvailableLabel( const TQString & text ); /** @return the label of the selected items listbox. */ - QString selectedLabel() const; + TQString selectedLabel() const; /** Sets the label for the selected items listbox to @p text. @@ -222,7 +222,7 @@ public: if you have a single ampersand in the text, the following character will become the accellerator to focus te listbox. */ - void setSelectedLabel( const QString & text ); + void setSelectedLabel( const TQString & text ); /** @return the current ButtonIconSize. @@ -276,25 +276,25 @@ public: Sets the pixmap of the button @p button to @p icon. It calls @ref SmallIconSet(pm) to generate the icon set. */ - void setButtonIcon( const QString &icon, MoveButton button ); + void setButtonIcon( const TQString &icon, MoveButton button ); /** Sets the iconset for button @p button to @p iconset. You can use this method to et a costum icon set. Either - created by @ref QIconSet, or use the application instance of + created by @ref TQIconSet, or use the application instance of @ref KIconLoader (recommended). */ - void setButtonIconSet( const QIconSet &iconset, MoveButton button ); + void setButtonIconSet( const TQIconSet &iconset, MoveButton button ); /** Sets the tooltip for the button @p button to @p tip. */ - void setButtonTooltip( const QString &tip, MoveButton button ); + void setButtonTooltip( const TQString &tip, MoveButton button ); /** Sets the whatsthis help for button @p button to @p text. */ - void setButtonWhatsThis( const QString &text, MoveButton button ); + void setButtonWhatsThis( const TQString &text, MoveButton button ); /** Sets the enabled state of all moving buttons to reflect the current @@ -309,27 +309,27 @@ signals: /** Emitted when an item is moved to the "selected" listbox. */ - void added( QListBoxItem *item ); + void added( TQListBoxItem *item ); /** Emitted when an item is moved out of the "selected" listbox. */ - void removed( QListBoxItem *item ); + void removed( TQListBoxItem *item ); /** Emitted when an item is moved upwards in the "selected" listbox. */ - void movedUp( QListBoxItem *item ); + void movedUp( TQListBoxItem *item ); /** Emitted when an item is moved downwards in the "selected" listbox. */ - void movedDown( QListBoxItem *item ); + void movedDown( TQListBoxItem *item ); /** Emitted when an item is moved to the "selected" listbox. */ -// void addedToSelection( QListBoxItem *item ); +// void addedToSelection( TQListBoxItem *item ); public slots: /** @@ -342,12 +342,12 @@ protected: /** Reimplamented for internal reasons. */ - void keyPressEvent( QKeyEvent * ); + void keyPressEvent( TQKeyEvent * ); /** Reimplemented for internal reasons. */ - bool eventFilter( QObject *, QEvent * ); + bool eventFilter( TQObject *, TQEvent * ); private slots: /** @@ -373,19 +373,19 @@ private slots: /** Moves the item @p item to the other listbox if moveOnDoubleClick is enabled. */ - void itemDoubleClicked( QListBoxItem *item ); + void itemDoubleClicked( TQListBoxItem *item ); /** connected to both list boxes to set the buttons enabled */ - void slotCurrentChanged( QListBoxItem * ) { setButtonsEnabled(); }; + void slotCurrentChanged( TQListBoxItem * ) { setButtonsEnabled(); }; private: /** Move item @p item to the other listbox */ - void moveItem( QListBoxItem *item ); + void moveItem( TQListBoxItem *item ); /** loads the icons for the move buttons. @@ -399,7 +399,7 @@ private: Note that if policy is Sorted, this will return -1. Sort the listbox after inserting the item in that case. */ - int insertionIndex( QListBox *lb, InsertionPolicy policy ); + int insertionIndex( TQListBox *lb, InsertionPolicy policy ); /** @private Private data storage diff --git a/kbabel/commonui/klisteditor.ui.h b/kbabel/commonui/klisteditor.ui.h index bc916e56..3d0e17df 100644 --- a/kbabel/commonui/klisteditor.ui.h +++ b/kbabel/commonui/klisteditor.ui.h @@ -50,7 +50,7 @@ void KListEditor::downInList() { int i=_list->currentItem(); if( i< (int)_list->count()-1 ) { - QString ci = _list->currentText(); + TQString ci = _list->currentText(); _list->removeItem(i); _list->insertItem(ci,i+1); _list->setCurrentItem(i+1); @@ -70,7 +70,7 @@ void KListEditor::upInList() { int i=_list->currentItem(); if( i>0 ) { - QString ci = _list->currentText(); + TQString ci = _list->currentText(); _list->removeItem(i); _list->insertItem(ci,i-1); _list->setCurrentItem(i-1); @@ -92,7 +92,7 @@ void KListEditor::updateList() else _list->changeItem(_edit->text(), i ); } -void KListEditor::setList( QStringList contents ) +void KListEditor::setList( TQStringList contents ) { _list->clear(); _list->insertStringList(contents); @@ -101,21 +101,21 @@ void KListEditor::setList( QStringList contents ) } -void KListEditor::editChanged( const QString &s ) +void KListEditor::editChanged( const TQString &s ) { _addButton->setEnabled(!s.isEmpty()); } -void KListEditor::setTitle( const QString &s ) +void KListEditor::setTitle( const TQString &s ) { _frame->setTitle(s); } -QStringList KListEditor::list() +TQStringList KListEditor::list() { - QStringList result; + TQStringList result; for( uint i=0; i<_list->count() ; i++ ) result.append(_list->text(i)); return result; diff --git a/kbabel/commonui/projectpref.cpp b/kbabel/commonui/projectpref.cpp index 1bffa2e6..16e6c114 100644 --- a/kbabel/commonui/projectpref.cpp +++ b/kbabel/commonui/projectpref.cpp @@ -37,9 +37,9 @@ #include "diffpreferences.h" #include "kbprojectsettings.h" -#include -#include -#include +#include +#include +#include #include #include @@ -82,15 +82,15 @@ ProjectDialog::ProjectDialog(Project::Ptr project) addPage(_spellPage, i18n("title of page in preferences dialog","Spelling") , "spellcheck" , i18n("Options for Spell Checking")); - connect( _spellPage, SIGNAL( settingsChanged() ) - , this, SLOT(updateButtons()) ); + connect( _spellPage, TQT_SIGNAL( settingsChanged() ) + , this, TQT_SLOT(updateButtons()) ); _sourcePage = new SourceContextPreferences(0); addPage(_sourcePage, i18n("title of page in preferences dialog","Source") , "source" ,i18n("Options for Showing Source Context")); - connect(_sourcePage, SIGNAL (itemsChanged()) - , this, SLOT (updateButtons()) ); + connect(_sourcePage, TQT_SIGNAL (itemsChanged()) + , this, TQT_SLOT (updateButtons()) ); _miscPage = new MiscPreferences(0); addPage(_miscPage, i18n("title of page in preferences dialog","Miscellaneous") @@ -106,15 +106,15 @@ ProjectDialog::ProjectDialog(Project::Ptr project) addPage(_dirCommandsPage, i18n("title of page in preferences dialog","Folder Commands") , "folder" , i18n("User-Defined Commands for Folder Items")); - connect( _dirCommandsPage, SIGNAL( settingsChanged() ), - this, SLOT(updateButtons()) ); + connect( _dirCommandsPage, TQT_SIGNAL( settingsChanged() ), + this, TQT_SLOT(updateButtons()) ); _fileCommandsPage = new FileCommandsPreferences(0); addPage(_fileCommandsPage, i18n("title of page in preferences dialog","File Commands") , "files" , i18n("User-Defined Commands for File Items")); - connect( _fileCommandsPage, SIGNAL( settingsChanged() ), - this, SLOT(updateButtons()) ); + connect( _fileCommandsPage, TQT_SIGNAL( settingsChanged() ), + this, TQT_SLOT(updateButtons()) ); _viewPage = new ViewPreferences(0); addPage(_viewPage, i18n("title of page in preferences dialog","Catalog Manager") diff --git a/kbabel/commonui/projectpref.h b/kbabel/commonui/projectpref.h index 90561c5b..ce4e7f86 100644 --- a/kbabel/commonui/projectpref.h +++ b/kbabel/commonui/projectpref.h @@ -36,7 +36,7 @@ #define PROJECTPREF_H #include -#include +#include class SavePreferences; class IdentityPreferences; diff --git a/kbabel/commonui/projectprefwidgets.cpp b/kbabel/commonui/projectprefwidgets.cpp index 16bc2da4..0357065e 100644 --- a/kbabel/commonui/projectprefwidgets.cpp +++ b/kbabel/commonui/projectprefwidgets.cpp @@ -58,25 +58,25 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace KBabel; -static QSize sizeHintForWidget(const QWidget* widget) +static TQSize sizeHintForWidget(const TQWidget* widget) { // // The size is computed by adding the sizeHint().height() of all @@ -84,23 +84,23 @@ static QSize sizeHintForWidget(const QWidget* widget) // layout()->margin() and layout()->spacing() // - QSize size; + TQSize size; int numChild = 0; - QObjectList *l = (QObjectList*)(widget->children()); + TQObjectList *l = (TQObjectList*)(widget->children()); for( uint i=0; i < l->count(); i++ ) { - QObject *o = l->at(i); + TQObject *o = l->at(i); if( o->isWidgetType() ) { numChild += 1; - QWidget *w=((QWidget*)o); + TQWidget *w=((TQWidget*)o); - QSize s = w->sizeHint(); + TQSize s = w->sizeHint(); if( s.isEmpty() == true ) { - s = QSize( 50, 100 ); // Default size + s = TQSize( 50, 100 ); // Default size } size.setHeight( size.height() + s.height() ); if( s.width() > size.width() ) { size.setWidth( s.width() ); } @@ -110,11 +110,11 @@ static QSize sizeHintForWidget(const QWidget* widget) if( numChild > 0 ) { size.setHeight( size.height() + widget->layout()->spacing()*(numChild-1) ); - size += QSize( widget->layout()->margin()*2, widget->layout()->margin()*2 + 1 ); + size += TQSize( widget->layout()->margin()*2, widget->layout()->margin()*2 + 1 ); } else { - size = QSize( 1, 1 ); + size = TQSize( 1, 1 ); } return( size ); @@ -123,44 +123,44 @@ static QSize sizeHintForWidget(const QWidget* widget) -SavePreferences::SavePreferences(QWidget *parent) +SavePreferences::SavePreferences(TQWidget *parent) : KTabCtl(parent) { - QWidget* page = new QWidget(this); - QVBoxLayout* layout=new QVBoxLayout(page); + TQWidget* page = new TQWidget(this); + TQVBoxLayout* layout=new TQVBoxLayout(page); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(KDialog::marginHint()); - QGroupBox* box=new QGroupBox(1,Qt::Horizontal,page); + TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,page); layout->addWidget(box); box->setMargin(KDialog::marginHint()); - _updateButton = new QCheckBox(i18n("&Update header when saving"),box, "kcfg_AutoUpdate"); - _descriptionButton = new QCheckBox(i18n("Update &description comment when saving"),box, "kcfg_UpdateDescription"); - _autoCheckButton = new QCheckBox(i18n("Chec&k syntax of file when saving"),box, "kcfg_AutoSyntaxCheck"); - _saveObsoleteButton = new QCheckBox(i18n("Save &obsolete entries"),box, "kcfg_SaveObsolete"); + _updateButton = new TQCheckBox(i18n("&Update header when saving"),box, "kcfg_AutoUpdate"); + _descriptionButton = new TQCheckBox(i18n("Update &description comment when saving"),box, "kcfg_UpdateDescription"); + _autoCheckButton = new TQCheckBox(i18n("Chec&k syntax of file when saving"),box, "kcfg_AutoSyntaxCheck"); + _saveObsoleteButton = new TQCheckBox(i18n("Save &obsolete entries"),box, "kcfg_SaveObsolete"); - QGroupBox* descBox=new QGroupBox(1,Qt::Horizontal,i18n("De&scription"),page); + TQGroupBox* descBox=new TQGroupBox(1,Qt::Horizontal,i18n("De&scription"),page); layout->addWidget(descBox); descBox->setMargin(KDialog::marginHint()); - _descriptionEdit = new QLineEdit(descBox, "kcfg_DescriptionString"); + _descriptionEdit = new TQLineEdit(descBox, "kcfg_DescriptionString"); - QGroupBox* encodingBox = new QGroupBox(1,Qt::Horizontal,i18n("Encoding") + TQGroupBox* encodingBox = new TQGroupBox(1,Qt::Horizontal,i18n("Encoding") ,page); encodingBox->setMargin(KDialog::marginHint()); layout->addWidget(encodingBox); - QHBox *b = new QHBox(encodingBox); + TQHBox *b = new TQHBox(encodingBox); - QLabel* tempLabel=new QLabel(i18n("Default:"),b); - _encodingBox = new QComboBox(b, "kcfg_Encoding"); + TQLabel* tempLabel=new TQLabel(i18n("Default:"),b); + _encodingBox = new TQComboBox(b, "kcfg_Encoding"); b->setStretchFactor(_encodingBox,2); b->setSpacing(KDialog::spacingHint()); - QString defaultName=charsetString(ProjectSettingsBase::Locale); + TQString defaultName=charsetString(ProjectSettingsBase::Locale); defaultName+=" "+i18n("(default)"); - QString utf8Name=charsetString(ProjectSettingsBase::UTF8); - QString utf16Name=charsetString(ProjectSettingsBase::UTF16); + TQString utf8Name=charsetString(ProjectSettingsBase::UTF8); + TQString utf16Name=charsetString(ProjectSettingsBase::UTF16); _encodingBox->insertItem(defaultName,(int)ProjectSettingsBase::Locale); _encodingBox->insertItem(utf8Name,(int)ProjectSettingsBase::UTF8); @@ -172,10 +172,10 @@ SavePreferences::SavePreferences(QWidget *parent) tempLabel->setBuddy(_encodingBox); - _oldEncodingButton = new QCheckBox(i18n("Kee&p the encoding of the file") + _oldEncodingButton = new TQCheckBox(i18n("Kee&p the encoding of the file") ,encodingBox, "kcfg_UseOldEncoding"); - _autoSaveBox = new QGroupBox( 1, Qt::Horizontal, i18n( "Automatic Saving" ), page ); + _autoSaveBox = new TQGroupBox( 1, Qt::Horizontal, i18n( "Automatic Saving" ), page ); _autoSaveBox->setMargin( KDialog::marginHint( ) ); layout->addWidget( _autoSaveBox ); _autoSaveDelay = new KIntNumInput( _autoSaveBox, "kcfg_AutoSaveDelay" ); @@ -187,49 +187,49 @@ SavePreferences::SavePreferences(QWidget *parent) page->setMinimumSize(sizeHintForWidget(page)); addTab(page, i18n("&General")); - page = new QWidget(this); - layout=new QVBoxLayout(page); + page = new TQWidget(this); + layout=new TQVBoxLayout(page); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(KDialog::marginHint()); - QGroupBox* gridBox = new QGroupBox(2,Qt::Horizontal,i18n("Fields to Update"),page); + TQGroupBox* gridBox = new TQGroupBox(2,Qt::Horizontal,i18n("Fields to Update"),page); layout->addWidget(gridBox); gridBox->setMargin(KDialog::marginHint()); - _revisionButton = new QCheckBox(i18n("Re&vision-Date"),gridBox, "kcfg_UpdateRevisionDate"); - _lastButton = new QCheckBox(i18n("Last-&Translator"),gridBox, "kcfg_UpdateLastTranslator"); - _languageButton = new QCheckBox(i18n("&Language"),gridBox, "kcfg_UpdateLanguageTeam"); - _charsetButton = new QCheckBox(i18n("Char&set"),gridBox, "kcfg_UpdateCharset"); - _encodingButton = new QCheckBox(i18n("&Encoding"),gridBox, "kcfg_UpdateEncoding"); - _projectButton = new QCheckBox(i18n("Pro&ject"),gridBox, "kcfg_UpdateProject"); + _revisionButton = new TQCheckBox(i18n("Re&vision-Date"),gridBox, "kcfg_UpdateRevisionDate"); + _lastButton = new TQCheckBox(i18n("Last-&Translator"),gridBox, "kcfg_UpdateLastTranslator"); + _languageButton = new TQCheckBox(i18n("&Language"),gridBox, "kcfg_UpdateLanguageTeam"); + _charsetButton = new TQCheckBox(i18n("Char&set"),gridBox, "kcfg_UpdateCharset"); + _encodingButton = new TQCheckBox(i18n("&Encoding"),gridBox, "kcfg_UpdateEncoding"); + _projectButton = new TQCheckBox(i18n("Pro&ject"),gridBox, "kcfg_UpdateProject"); - QButtonGroup* dateBox = new QButtonGroup(2,Qt::Horizontal,i18n("Format of Revision-Date"),page, "kcfg_DateFormat"); + TQButtonGroup* dateBox = new TQButtonGroup(2,Qt::Horizontal,i18n("Format of Revision-Date"),page, "kcfg_DateFormat"); layout->addWidget(dateBox); box->setMargin(KDialog::marginHint()); // we remove/insert default date button to correctly map Qt::DateFormat to our Ids - _defaultDateButton = new QRadioButton( i18n("De&fault date format"),dateBox ); + _defaultDateButton = new TQRadioButton( i18n("De&fault date format"),dateBox ); dateBox->remove (_defaultDateButton); - _localDateButton = new QRadioButton( i18n("Local date fo&rmat"),dateBox ); + _localDateButton = new TQRadioButton( i18n("Local date fo&rmat"),dateBox ); dateBox->remove (_localDateButton); - _customDateButton = new QRadioButton( i18n("Custo&m date format:"),dateBox ); + _customDateButton = new TQRadioButton( i18n("Custo&m date format:"),dateBox ); dateBox->insert (_defaultDateButton); dateBox->insert (_localDateButton); - _dateFormatEdit = new QLineEdit(dateBox, "kcfg_CustomDateFormat"); + _dateFormatEdit = new TQLineEdit(dateBox, "kcfg_CustomDateFormat"); _dateFormatEdit->setEnabled(false); - connect( _customDateButton, SIGNAL(toggled(bool)), this, SLOT( customDateActivated(bool) ) ); + connect( _customDateButton, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( customDateActivated(bool) ) ); - QGroupBox* projectBox = new QGroupBox(1,Qt::Horizontal,i18n("Project String") + TQGroupBox* projectBox = new TQGroupBox(1,Qt::Horizontal,i18n("Project String") ,page); projectBox->setMargin(KDialog::marginHint()); layout->addWidget(projectBox); - b = new QHBox(projectBox); + b = new TQHBox(projectBox); - tempLabel=new QLabel(i18n("Project-Id:"),b); - _projectEdit = new QLineEdit(b, "kcfg_ProjectString"); + tempLabel=new TQLabel(i18n("Project-Id:"),b); + _projectEdit = new TQLineEdit(b, "kcfg_ProjectString"); b->setStretchFactor(_projectEdit,2); b->setSpacing(KDialog::spacingHint()); tempLabel->setBuddy(_projectEdit); @@ -238,31 +238,31 @@ SavePreferences::SavePreferences(QWidget *parent) page->setMinimumSize(sizeHintForWidget(page)); addTab(page, i18n("&Header")); - page = new QWidget(this); - layout=new QVBoxLayout(page); + page = new TQWidget(this); + layout=new TQVBoxLayout(page); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(KDialog::marginHint()); - QGroupBox* translatorCopyrightBox = new QGroupBox(1,Qt::Horizontal, page); + TQGroupBox* translatorCopyrightBox = new TQGroupBox(1,Qt::Horizontal, page); translatorCopyrightBox->setMargin(KDialog::marginHint()); _translatorCopyrightButton = - new QCheckBox(i18n("Update &translator copyright") + new TQCheckBox(i18n("Update &translator copyright") ,translatorCopyrightBox, "kcfg_UpdateTranslatorCopyright"); layout->addWidget(translatorCopyrightBox); - QGroupBox* fsfBox=new QButtonGroup(1,Qt::Horizontal,i18n("Free Software Foundation Copyright"),page, "kcfg_FSFCopyright"); + TQGroupBox* fsfBox=new TQButtonGroup(1,Qt::Horizontal,i18n("Free Software Foundation Copyright"),page, "kcfg_FSFCopyright"); layout->addWidget(fsfBox); fsfBox->setMargin(KDialog::marginHint()); - _removeFSFButton = new QRadioButton(i18n("&Remove copyright if empty"),fsfBox); - _updateFSFButton = new QRadioButton(i18n("&Update copyright"),fsfBox); - _nochangeFSFButton = new QRadioButton(i18n("Do ¬ change"),fsfBox); + _removeFSFButton = new TQRadioButton(i18n("&Remove copyright if empty"),fsfBox); + _updateFSFButton = new TQRadioButton(i18n("&Update copyright"),fsfBox); + _nochangeFSFButton = new TQRadioButton(i18n("Do ¬ change"),fsfBox); layout->addStretch(1); page->setMinimumSize(sizeHintForWidget(page)); addTab(page, i18n("Cop&yright")); - QWhatsThis::add(_updateButton, + TQWhatsThis::add(_updateButton, i18n("

        Update Header

        \n" "

        Check this button to update the header " "information of the file " @@ -275,7 +275,7 @@ SavePreferences::SavePreferences(QWidget *parent) "If you want to add additional fields to the header, you can edit the header manually by choosing\n" "Edit->Edit Header in the editor window.

        ")); - QWhatsThis::add(gridBox,i18n("

        Fields to update

        \n" + TQWhatsThis::add(gridBox,i18n("

        Fields to update

        \n" "

        Choose which fields in the header you want to have updated when saving.\n" "If a field does not exist, it is appended to the header.

        \n" "

        If you want to add other information to the header, you have to edit the header manually\n" @@ -283,7 +283,7 @@ SavePreferences::SavePreferences(QWidget *parent) "

        Deactivate Update Header above if you do not want to have the header\n" "updated when saving.

        ")); - QWhatsThis::add(encodingBox,i18n("

        Encoding

        " + TQWhatsThis::add(encodingBox,i18n("

        Encoding

        " "

        Choose how to encode characters when saving to a file. If you are unsure " "what encoding to use, please ask your translation coordinator.

        " "
        • %1: this is the encoding that fits the character " @@ -292,18 +292,18 @@ SavePreferences::SavePreferences(QWidget *parent) "
        ").arg(defaultName).arg(utf8Name) ); - QWhatsThis::add(_oldEncodingButton + TQWhatsThis::add(_oldEncodingButton ,i18n("

        Keep the encoding of the file

        " "

        If this option is activated, files are always saved in the " "same encoding as they were read in. Files without charset " "information in the header (e.g. POT files) are saved in the " "encoding set above.

        ")); - QWhatsThis::add(_autoCheckButton,i18n("

        Check syntax of file when saving

        \n" + TQWhatsThis::add(_autoCheckButton,i18n("

        Check syntax of file when saving

        \n" "

        Check this to automatically check syntax of file with \"msgfmt --statistics\"\n" "when saving a file. You will only get a message, if an error occurred.

        ")); - QWhatsThis::add(_saveObsoleteButton,i18n("

        Save obsolete entries

        \n" + TQWhatsThis::add(_saveObsoleteButton,i18n("

        Save obsolete entries

        \n" "

        If this option is activated, obsolete entries found when the file was open\n" "will be saved back to the file. Obsolete entries are marked by #~ and are\n" "created when the msgmerge does not need the translation anymore.\n" @@ -311,7 +311,7 @@ SavePreferences::SavePreferences(QWidget *parent) "The main drawback is the size of the saved file.

        ")); - QWhatsThis::add(dateBox, i18n("

        Format of Revision-Date

        " + TQWhatsThis::add(dateBox, i18n("

        Format of Revision-Date

        " "

        Choose in which format the date and time of the header field\n" "PO-Revision-Date is saved:

          \n" "
        • Default is the format normally used in PO files.
        • \n" @@ -398,92 +398,92 @@ void SavePreferences::setAutoSaveVisible( const bool on ) -IdentityPreferences::IdentityPreferences(QWidget* parent, const QString& project) - : QWidget(parent) +IdentityPreferences::IdentityPreferences(TQWidget* parent, const TQString& project) + : TQWidget(parent) { - QWidget* page = this; - QVBoxLayout* layout=new QVBoxLayout(page); + TQWidget* page = this; + TQVBoxLayout* layout=new TQVBoxLayout(page); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(KDialog::marginHint()); if( !project.isEmpty() ) { // show the project name in the widget at the top - layout->addWidget(new QLabel(i18n("Project: %1").arg(project),page)); + layout->addWidget(new TQLabel(i18n("Project: %1").arg(project),page)); } - QGroupBox* group = new QGroupBox(2,Qt::Horizontal,page); + TQGroupBox* group = new TQGroupBox(2,Qt::Horizontal,page); layout->addWidget(group); group->setMargin(KDialog::marginHint()); - QLabel* tempLabel=new QLabel(i18n("&Name:"),group); - _nameEdit = new QLineEdit(group, "kcfg_AuthorName"); + TQLabel* tempLabel=new TQLabel(i18n("&Name:"),group); + _nameEdit = new TQLineEdit(group, "kcfg_AuthorName"); tempLabel->setBuddy(_nameEdit); - tempLabel=new QLabel(i18n("Localized na&me:"),group); - _localNameEdit = new QLineEdit(group, "kcfg_LocalAuthorName"); + tempLabel=new TQLabel(i18n("Localized na&me:"),group); + _localNameEdit = new TQLineEdit(group, "kcfg_LocalAuthorName"); tempLabel->setBuddy(_localNameEdit); - tempLabel=new QLabel(i18n("E&mail:"),group); - _mailEdit = new QLineEdit(group, "kcfg_AuthorEmail"); + tempLabel=new TQLabel(i18n("E&mail:"),group); + _mailEdit = new TQLineEdit(group, "kcfg_AuthorEmail"); tempLabel->setBuddy(_mailEdit); - tempLabel=new QLabel(i18n("&Full language name:"),group); + tempLabel=new TQLabel(i18n("&Full language name:"),group); - QHBox *hbox = new QHBox(group); + TQHBox *hbox = new TQHBox(group); hbox->setSpacing(KDialog::spacingHint()); - _langEdit = new QLineEdit(hbox, "kcfg_Language"); + _langEdit = new TQLineEdit(hbox, "kcfg_Language"); tempLabel->setBuddy(_langEdit); - tempLabel=new QLabel(i18n("Lan&guage code:"),hbox); - _langCodeEdit = new QLineEdit(hbox, "kcfg_LanguageCode"); + tempLabel=new TQLabel(i18n("Lan&guage code:"),hbox); + _langCodeEdit = new TQLineEdit(hbox, "kcfg_LanguageCode"); tempLabel->setBuddy(_langCodeEdit); - connect(_langCodeEdit,SIGNAL(textChanged(const QString&)), this - , SLOT(checkTestPluralButton())); + connect(_langCodeEdit,TQT_SIGNAL(textChanged(const TQString&)), this + , TQT_SLOT(checkTestPluralButton())); - tempLabel=new QLabel(i18n("&Language mailing list:"),group); - _listEdit = new QLineEdit(group, "kcfg_Mailinglist"); + tempLabel=new TQLabel(i18n("&Language mailing list:"),group); + _listEdit = new TQLineEdit(group, "kcfg_Mailinglist"); _listEdit->setMinimumSize(100,_listEdit->sizeHint().height()); tempLabel->setBuddy(_listEdit); - tempLabel=new QLabel(i18n("&Timezone:"), group); - _timezoneEdit = new QLineEdit(group, "kcfg_Timezone"); + tempLabel=new TQLabel(i18n("&Timezone:"), group); + _timezoneEdit = new TQLineEdit(group, "kcfg_Timezone"); _timezoneEdit->setMinimumSize(100,_timezoneEdit->sizeHint().height()); tempLabel->setBuddy(_timezoneEdit); - QString whatsThisMsg=i18n("

          Identity

          \n" + TQString whatsThisMsg=i18n("

          Identity

          \n" "

          Fill in information about you and your translation team.\n" "This information is used when updating the header of a file.

          \n" "

          You can find the options if and what fields in the header should be updated\n" "on page Save in this dialog.

          "); - QWhatsThis::add(group,whatsThisMsg); + TQWhatsThis::add(group,whatsThisMsg); - group = new QGroupBox(1,Qt::Horizontal,page); + group = new TQGroupBox(1,Qt::Horizontal,page); layout->addWidget(group); group->setMargin(KDialog::marginHint()); - hbox = new QHBox(group); + hbox = new TQHBox(group); hbox->setSpacing(KDialog::spacingHint()); - QLabel *label = new QLabel(i18n("&Number of singular/plural forms:"), hbox); - _pluralFormsBox = new QSpinBox(0,100,1,hbox, "kcfg_PluralForms"); + TQLabel *label = new TQLabel(i18n("&Number of singular/plural forms:"), hbox); + _pluralFormsBox = new TQSpinBox(0,100,1,hbox, "kcfg_PluralForms"); _pluralFormsBox->setSpecialValueText( i18n("automatic choose number of plural forms","Automatic")); label->setBuddy(_pluralFormsBox); - connect(_pluralFormsBox,SIGNAL(valueChanged(int)), this - , SLOT(checkTestPluralButton())); + connect(_pluralFormsBox,TQT_SIGNAL(valueChanged(int)), this + , TQT_SLOT(checkTestPluralButton())); hbox->setStretchFactor(_pluralFormsBox,1); - _testPluralButton = new QPushButton(i18n("Te&st"),hbox); + _testPluralButton = new TQPushButton(i18n("Te&st"),hbox); _testPluralButton->setEnabled(false); - connect(_testPluralButton, SIGNAL(clicked()), this - , SLOT(testPluralForm())); + connect(_testPluralButton, TQT_SIGNAL(clicked()), this + , TQT_SLOT(testPluralForm())); - const QString msg=i18n("

          Number of singular/plural forms

          " + const TQString msg=i18n("

          Number of singular/plural forms

          " "

          Note: This option is KDE specific. " "If you are not translating a KDE application, you can safely " "ignore this option.

          " @@ -495,29 +495,29 @@ IdentityPreferences::IdentityPreferences(QWidget* parent, const QString& project "Automatic and KBabel will try to get this information " "automatically from KDE. Use the Test button " "to test if it can find it out.

          "); - QWhatsThis::add(_pluralFormsBox,msg); - QWhatsThis::add(_testPluralButton,msg); + TQWhatsThis::add(_pluralFormsBox,msg); + TQWhatsThis::add(_testPluralButton,msg); - QVBox* vbox = new QVBox(group); + TQVBox* vbox = new TQVBox(group); vbox->setSpacing(KDialog::spacingHint()); - label = new QLabel(i18n("&GNU plural form header:"), vbox); + label = new TQLabel(i18n("&GNU plural form header:"), vbox); - hbox = new QHBox(vbox); + hbox = new TQHBox(vbox); hbox->setSpacing(KDialog::spacingHint()); - _gnuPluralFormHeaderEdit = new QLineEdit(hbox, "kcfg_PluralFormsHeader"); + _gnuPluralFormHeaderEdit = new TQLineEdit(hbox, "kcfg_PluralFormsHeader"); label->setBuddy(_gnuPluralFormHeaderEdit); hbox->setStretchFactor(_gnuPluralFormHeaderEdit,1); - _testGnuPluralFormButton = new QPushButton(i18n("&Lookup"),hbox); - connect(_testGnuPluralFormButton, SIGNAL(clicked()), this - , SLOT(lookupGnuPluralFormHeader())); + _testGnuPluralFormButton = new TQPushButton(i18n("&Lookup"),hbox); + connect(_testGnuPluralFormButton, TQT_SIGNAL(clicked()), this + , TQT_SLOT(lookupGnuPluralFormHeader())); - _checkPluralArgumentBox = new QCheckBox( i18n("Re&quire plural form arguments in translation") + _checkPluralArgumentBox = new TQCheckBox( i18n("Re&quire plural form arguments in translation") , group, "kcfg_CheckPluralArgument" ); - QWhatsThis::add(_checkPluralArgumentBox, + TQWhatsThis::add(_checkPluralArgumentBox, i18n("

          Require plural form arguments in translation

          \n" "

          Note: This option is KDE specific at the moment. " "If you are not translating a KDE application, you can safely " @@ -525,7 +525,7 @@ IdentityPreferences::IdentityPreferences(QWidget* parent, const QString& project "

          If is this option enabled, the validation check will " "require the %n argument to be present in the message.

          ")); - QWhatsThis::add(_gnuPluralFormHeaderEdit, + TQWhatsThis::add(_gnuPluralFormHeaderEdit, i18n("

          GNU plural form header

          \n" "

          Here you can fill a header entry for GNU plural form handling; " "if you leave the entry empty, the entry in the PO file will not be " @@ -557,18 +557,18 @@ void IdentityPreferences::defaults(const IdentitySettings& settings) _checkPluralArgumentBox->setChecked(settings.checkPluralArgument); } -bool IdentityPreferences::eventFilter(QObject *o, QEvent *e) +bool IdentityPreferences::eventFilter(TQObject *o, TQEvent *e) { - if(e->type() == QEvent::Drop) + if(e->type() == TQEvent::Drop) { - QDropEvent *de = static_cast(e); + TQDropEvent *de = static_cast(e); KURL::List urlList; if(de && KURLDrag::decode(de,urlList)) { KURL url(urlList.first()); if(url.protocol()== "mailto") { - QString mail=url.path(); + TQString mail=url.path(); bool handled=false; if(o == _mailEdit) @@ -594,14 +594,14 @@ bool IdentityPreferences::eventFilter(QObject *o, QEvent *e) void IdentityPreferences::checkTestPluralButton() { int val = _pluralFormsBox->value(); - QString lang=_langCodeEdit->text(); + TQString lang=_langCodeEdit->text(); _testPluralButton->setEnabled(val==0 && !lang.isEmpty()); } void IdentityPreferences::testPluralForm() { - QString lang=_langCodeEdit->text(); + TQString lang=_langCodeEdit->text(); if(lang.isEmpty()) { @@ -611,7 +611,7 @@ void IdentityPreferences::testPluralForm() int number=Catalog::getNumberOfPluralForms(lang); - QString msg; + TQString msg; if(number < 0) { @@ -635,7 +635,7 @@ void IdentityPreferences::testPluralForm() void IdentityPreferences::lookupGnuPluralFormHeader() { - QString lang=_langCodeEdit->text(); + TQString lang=_langCodeEdit->text(); if(lang.isEmpty()) { @@ -643,7 +643,7 @@ void IdentityPreferences::lookupGnuPluralFormHeader() return; } - QString header=GNUPluralForms(lang); + TQString header=GNUPluralForms(lang); if( header.isEmpty() ) { @@ -658,39 +658,39 @@ void IdentityPreferences::lookupGnuPluralFormHeader() } -MiscPreferences::MiscPreferences(QWidget *parent) - : QWidget(parent), _regExpEditDialog(0) +MiscPreferences::MiscPreferences(TQWidget *parent) + : TQWidget(parent), _regExpEditDialog(0) { - QWidget* page = this; + TQWidget* page = this; - QVBoxLayout* layout=new QVBoxLayout(page); + TQVBoxLayout* layout=new TQVBoxLayout(page); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(KDialog::marginHint()); - QGroupBox* box=new QGroupBox(1,Qt::Horizontal,page); + TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,page); box->setMargin(KDialog::marginHint()); layout->addWidget(box); - QHBox *hbox = new QHBox(box); + TQHBox *hbox = new TQHBox(box); hbox->setSpacing(KDialog::spacingHint()); - QLabel *label = new QLabel(i18n("&Marker for keyboard accelerator:"),hbox); + TQLabel *label = new TQLabel(i18n("&Marker for keyboard accelerator:"),hbox); accelMarkerEdit = new KLineEdit(hbox, "kcfg_AccelMarker"); accelMarkerEdit->setMaxLength(1); label->setBuddy(accelMarkerEdit); hbox->setStretchFactor(accelMarkerEdit,1); - QString msg=i18n("

          Marker for keyboard accelerator

          " + TQString msg=i18n("

          Marker for keyboard accelerator

          " "

          Define here, what character marks the following " "character as keyboard accelerator. For example in Qt it is " "'&' and in Gtk it is '_'.

          "); - QWhatsThis::add(label,msg); - QWhatsThis::add(accelMarkerEdit,msg); + TQWhatsThis::add(label,msg); + TQWhatsThis::add(accelMarkerEdit,msg); - hbox = new QHBox(box); + hbox = new TQHBox(box); hbox->setSpacing(KDialog::spacingHint()); - label = new QLabel(i18n("&Regular expression for context information:") + label = new TQLabel(i18n("&Regular expression for context information:") ,hbox); contextInfoEdit = new KLineEdit(hbox, "kcfg_ContextInfo"); label->setBuddy(contextInfoEdit); @@ -700,27 +700,27 @@ MiscPreferences::MiscPreferences(QWidget *parent) "

          Enter a regular expression here which defines what is " "context information in the message and must not get " "translated.

          "); - QWhatsThis::add(label,msg); - QWhatsThis::add(contextInfoEdit,msg); + TQWhatsThis::add(label,msg); + TQWhatsThis::add(contextInfoEdit,msg); if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) { - _regExpButton = new QPushButton( i18n("&Edit..."), hbox ); - connect( _regExpButton, SIGNAL( clicked() ), this, SLOT( regExpButtonClicked())); + _regExpButton = new TQPushButton( i18n("&Edit..."), hbox ); + connect( _regExpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( regExpButtonClicked())); } // preferences for mail attachments - QVButtonGroup* vbgroup = new QVButtonGroup(page); + TQVButtonGroup* vbgroup = new TQVButtonGroup(page); vbgroup->setTitle(i18n("Compression Method for Mail Attachments")); vbgroup->setRadioButtonExclusive(true); vbgroup->setMargin(KDialog::marginHint()); layout->addWidget(vbgroup); - bzipButton = new QRadioButton(i18n("tar/&bzip2"), vbgroup, "kcfg_BZipCompression"); - gzipButton = new QRadioButton(i18n("tar/&gzip"), vbgroup); + bzipButton = new TQRadioButton(i18n("tar/&bzip2"), vbgroup, "kcfg_BZipCompression"); + gzipButton = new TQRadioButton(i18n("tar/&gzip"), vbgroup); - compressSingle = new QCheckBox(i18n("&Use compression when sending " + compressSingle = new TQCheckBox(i18n("&Use compression when sending " "a single file"), vbgroup, "kcfg_CompressSingleFile"); layout->addStretch(1); @@ -739,12 +739,12 @@ void MiscPreferences::defaults(const MiscSettings& settings) compressSingle->setChecked(settings.compressSingleFile); } -QString MiscPreferences::contextInfo() const +TQString MiscPreferences::contextInfo() const { - QString temp=contextInfoEdit->text(); + TQString temp=contextInfoEdit->text(); bool quoted=false; - QString newStr; + TQString newStr; for(uint i=0; isetText(reg); @@ -777,61 +777,61 @@ void MiscPreferences::setContextInfo(QString reg) void MiscPreferences::regExpButtonClicked() { if ( _regExpEditDialog==0 ) - _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery - ("KRegExpEditor/KRegExpEditor", QString::null, this ); + _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery + ("KRegExpEditor/KRegExpEditor", TQString::null, this ); KRegExpEditorInterface *iface = dynamic_cast( _regExpEditDialog ); if( iface ) { iface->setRegExp( contextInfoEdit->text() ); - if( _regExpEditDialog->exec() == QDialog::Accepted ) + if( _regExpEditDialog->exec() == TQDialog::Accepted ) contextInfoEdit->setText( iface->regExp() ); } } -SpellPreferences::SpellPreferences(QWidget* parent) - : QWidget(parent) +SpellPreferences::SpellPreferences(TQWidget* parent) + : TQWidget(parent) { - QWidget* page = this; - QVBoxLayout* layout=new QVBoxLayout(page); + TQWidget* page = this; + TQVBoxLayout* layout=new TQVBoxLayout(page); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(KDialog::marginHint()); - onFlyBtn = new QCheckBox(i18n("On the &fly spellchecking"),page, "kcfg_OnFlySpellCheck"); + onFlyBtn = new TQCheckBox(i18n("On the &fly spellchecking"),page, "kcfg_OnFlySpellCheck"); layout->addWidget(onFlyBtn); - QWhatsThis::add(onFlyBtn, i18n("

          On the fly spellchecking

          " + TQWhatsThis::add(onFlyBtn, i18n("

          On the fly spellchecking

          " "

          Activate this to let KBabel spell check the text " "as you type. Mispelled words will be colored by the error color.

          ")); spellConfig = new KSpellConfig(page,"spellConfigWidget",0,false); layout->addWidget(spellConfig); - remIgnoredBtn = new QCheckBox(i18n("&Remember ignored words"),page, "kcfg_RememberIgnored"); + remIgnoredBtn = new TQCheckBox(i18n("&Remember ignored words"),page, "kcfg_RememberIgnored"); layout->addWidget(remIgnoredBtn); - connect( spellConfig, SIGNAL( configChanged() ) - , this, SIGNAL ( settingsChanged() ) ); + connect( spellConfig, TQT_SIGNAL( configChanged() ) + , this, TQT_SIGNAL ( settingsChanged() ) ); - QLabel *tempLabel = new QLabel(i18n("F&ile to store ignored words:"),page); + TQLabel *tempLabel = new TQLabel(i18n("F&ile to store ignored words:"),page); layout->addWidget(tempLabel); ignoreURLEdit = new KURLRequester(page, "kcfg_IgnoreURL"); layout->addWidget(ignoreURLEdit); tempLabel->setBuddy(ignoreURLEdit); - connect(remIgnoredBtn,SIGNAL(toggled(bool)),ignoreURLEdit - ,SLOT(setEnabled(bool))); + connect(remIgnoredBtn,TQT_SIGNAL(toggled(bool)),ignoreURLEdit + ,TQT_SLOT(setEnabled(bool))); - QString msg = i18n("

          Remember ignored words

          " + TQString msg = i18n("

          Remember ignored words

          " "

          Activate this, to let KBabel ignore the words, where you have " "chosen Ignore All in the spell check dialog, " "in every spell check.

          "); - QWhatsThis::add(remIgnoredBtn,msg); - QWhatsThis::add(tempLabel,msg); - QWhatsThis::add(ignoreURLEdit,msg); + TQWhatsThis::add(remIgnoredBtn,msg); + TQWhatsThis::add(tempLabel,msg); + TQWhatsThis::add(ignoreURLEdit,msg); layout->addStretch(1); @@ -874,21 +874,21 @@ void SpellPreferences::defaults(const SpellcheckSettings& settings) *spellConfig = spCfg; } -CatmanPreferences::CatmanPreferences(QWidget* parent) - : QWidget(parent) +CatmanPreferences::CatmanPreferences(TQWidget* parent) + : TQWidget(parent) { - QWidget* page = this; + TQWidget* page = this; - QVBoxLayout* layout=new QVBoxLayout(page); + TQVBoxLayout* layout=new TQVBoxLayout(page); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(KDialog::marginHint()); - QGroupBox* box=new QGroupBox(1,Qt::Horizontal,page); + TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,page); box->setMargin(KDialog::marginHint()); layout->addWidget(box); - QLabel* label=new QLabel(i18n("&Base folder of PO files:"),box); - QHBox* hbox = new QHBox(box); + TQLabel* label=new TQLabel(i18n("&Base folder of PO files:"),box); + TQHBox* hbox = new TQHBox(box); hbox->setSpacing(KDialog::spacingHint()); const KFile::Mode mode = static_cast( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly ); @@ -900,8 +900,8 @@ CatmanPreferences::CatmanPreferences(QWidget* parent) label->setBuddy(_poDirEdit); - label=new QLabel(i18n("Ba&se folder of POT files:"),box); - hbox = new QHBox(box); + label=new TQLabel(i18n("Ba&se folder of POT files:"),box); + hbox = new TQHBox(box); hbox->setSpacing(KDialog::spacingHint()); _potDirEdit = new KURLRequester(hbox, "kcfg_PotBaseDir"); @@ -911,40 +911,40 @@ CatmanPreferences::CatmanPreferences(QWidget* parent) - QWhatsThis::add(box,i18n("

          Base folders

          \n" + TQWhatsThis::add(box,i18n("

          Base folders

          \n" "

          Type in the folders which contain all your PO and POT files.\n" "The files and the folders in these folders will then be merged into one\n" "tree.

          ")); - box=new QGroupBox(1,Qt::Horizontal,page); + box=new TQGroupBox(1,Qt::Horizontal,page); box->setMargin(KDialog::marginHint()); layout->addWidget(box); - _openWindowButton = new QCheckBox(i18n("O&pen files in new window"),box, "kcfg_OpenWindow"); + _openWindowButton = new TQCheckBox(i18n("O&pen files in new window"),box, "kcfg_OpenWindow"); - QWhatsThis::add(_openWindowButton,i18n("

          Open files in new window

          \n" + TQWhatsThis::add(_openWindowButton,i18n("

          Open files in new window

          \n" "

          If this is activated all files that are opened from the Catalog Manager are opened\n" "in a new window.

          ")); - _killButton = new QCheckBox( i18n("&Kill processes on exit") , box, "kcfg_KillCmdOnExit" ); + _killButton = new TQCheckBox( i18n("&Kill processes on exit") , box, "kcfg_KillCmdOnExit" ); - QWhatsThis::add( _killButton , i18n("

          Kill processes on exit

          \n" + TQWhatsThis::add( _killButton , i18n("

          Kill processes on exit

          \n" "

          If you check this, KBabel tries to kill the processes, that have not exited already when KBabel exits,\n" "by sending a kill signal to them.

          \n" "

          NOTE: It is not guaranteed that the processes will be killed.

          ") ); - _indexButton = new QCheckBox( i18n("Create inde&x for file contents"), box, "kcfg_IndexWords" ); + _indexButton = new TQCheckBox( i18n("Create inde&x for file contents"), box, "kcfg_IndexWords" ); - QWhatsThis::add( _indexButton , i18n("

          Create index for file contents

          \n" + TQWhatsThis::add( _indexButton , i18n("

          Create index for file contents

          \n" "

          If you check this, KBabel will create an index for each PO file to speed up the find/replace functions.

          \n" "

          NOTE: This will slow down updating the file information considerably.

          ") ); - m_msgfmtButton = new QCheckBox( i18n("Run &msgfmt before processing a file"), box, "kcfg_msgfmt" ); + m_msgfmtButton = new TQCheckBox( i18n("Run &msgfmt before processing a file"), box, "kcfg_msgfmt" ); - QWhatsThis::add( m_msgfmtButton, i18n("

          Run msgfmt before processing a file

          " + TQWhatsThis::add( m_msgfmtButton, i18n("

          Run msgfmt before processing a file

          " "

          If you enable this, KBabel will run Gettext's " "msgfmt tool before processing a file.

          " "

          Enabling this setting is recommended, even if it causes processing to be slower. " @@ -976,26 +976,26 @@ void CatmanPreferences::defaults(const CatManSettings& settings) m_msgfmtButton->setChecked( settings.msgfmt ); } -DirCommandsPreferences::DirCommandsPreferences(QWidget* parent) - : QWidget(parent) +DirCommandsPreferences::DirCommandsPreferences(TQWidget* parent) + : TQWidget(parent) { - QWidget* page = this; + TQWidget* page = this; - QVBoxLayout* layout=new QVBoxLayout(page); + TQVBoxLayout* layout=new TQVBoxLayout(page); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(KDialog::marginHint()); - QGroupBox* box = new QGroupBox( 1 , Qt::Horizontal , i18n("Commands for Folders") , page ); + TQGroupBox* box = new TQGroupBox( 1 , Qt::Horizontal , i18n("Commands for Folders") , page ); box->setMargin( KDialog::marginHint() ); layout->addWidget( box ); _dirCmdEdit = new CmdEdit( box ); - new QLabel( i18n("Replaceables:\n@PACKAGE@, @PODIR@, @POTDIR@\n" + new TQLabel( i18n("Replaceables:\n@PACKAGE@, @PODIR@, @POTDIR@\n" "@POFILES@, @MARKEDPOFILES@"), box); - connect (_dirCmdEdit, SIGNAL(widgetChanged()), this, SIGNAL(settingsChanged())); + connect (_dirCmdEdit, TQT_SIGNAL(widgetChanged()), this, TQT_SIGNAL(settingsChanged())); - QWhatsThis::add( box , i18n("

          Commands for folders

          " + TQWhatsThis::add( box , i18n("

          Commands for folders

          " "

          Insert here the commands you want to execute in folders from " "the Catalog Manager. The commands are then shown in the submenu " "Commands in the Catalog Manager's context menu.

          " @@ -1039,26 +1039,26 @@ void DirCommandsPreferences::defaults(const CatManSettings& settings) } -FileCommandsPreferences::FileCommandsPreferences(QWidget* parent) - : QWidget(parent) +FileCommandsPreferences::FileCommandsPreferences(TQWidget* parent) + : TQWidget(parent) { - QWidget* page = this; + TQWidget* page = this; - QVBoxLayout* layout=new QVBoxLayout(page); + TQVBoxLayout* layout=new TQVBoxLayout(page); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(KDialog::marginHint()); - QGroupBox* box=new QGroupBox( 1 , Qt::Horizontal , i18n("Commands for Files") , page ); + TQGroupBox* box=new TQGroupBox( 1 , Qt::Horizontal , i18n("Commands for Files") , page ); box->setMargin( KDialog::marginHint() ); layout->addWidget( box ); _fileCmdEdit = new CmdEdit( box ); - new QLabel( i18n("Replaceables:\n" + new TQLabel( i18n("Replaceables:\n" "@PACKAGE@, @POFILE@,@POTFILE@,\n@PODIR@, @POTDIR@"), box); - connect (_fileCmdEdit, SIGNAL(widgetChanged()), this, SIGNAL(settingsChanged())); + connect (_fileCmdEdit, TQT_SIGNAL(widgetChanged()), this, TQT_SIGNAL(settingsChanged())); - QWhatsThis::add( box , i18n("

          Commands for files

          " + TQWhatsThis::add( box , i18n("

          Commands for files

          " "

          Insert here the commands you want to execute on files from " "the Catalog Manager. The commands are then shown in the submenu " "Commands in the Catalog Manager's context menu.

          " @@ -1102,28 +1102,28 @@ void FileCommandsPreferences::defaults(const CatManSettings& settings) _fileCmdEdit->setCommands( settings.fileCommands, settings.fileCommandNames ); } -ViewPreferences::ViewPreferences(QWidget* parent) - : QWidget(parent) +ViewPreferences::ViewPreferences(TQWidget* parent) + : TQWidget(parent) { - QWidget* page = this; + TQWidget* page = this; - QVBoxLayout* layout=new QVBoxLayout(page); + TQVBoxLayout* layout=new TQVBoxLayout(page); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(KDialog::marginHint()); - QGroupBox* box=new QGroupBox(2, Qt::Horizontal,i18n("Shown Columns"),page); + TQGroupBox* box=new TQGroupBox(2, Qt::Horizontal,i18n("Shown Columns"),page); box->setMargin(KDialog::marginHint()); layout->addWidget(box); - _flagColumnCheckbox = new QCheckBox( i18n("Fla&g"), box, "kcfg_ShowFlagColumn" ); - _fuzzyColumnCheckbox = new QCheckBox( i18n("&Fuzzy"), box, "kcfg_ShowFuzzyColumn" ); - _untranslatedColumnCheckbox = new QCheckBox( i18n("&Untranslated"), box, "kcfg_ShowUntranslatedColumn" ); - _totalColumnCheckbox = new QCheckBox( i18n("&Total"), box, "kcfg_ShowTotalColumn" ); - _cvsColumnCheckbox = new QCheckBox( i18n("SVN/&CVS status"), box, "kcfg_ShowCVSColumn" ); - _revisionColumnCheckbox = new QCheckBox( i18n("Last &revision"), box, "kcfg_ShowRevisionColumn" ); - _translatorColumnCheckbox = new QCheckBox( i18n("Last t&ranslator"), box, "kcfg_ShowTranslatorColumn" ); + _flagColumnCheckbox = new TQCheckBox( i18n("Fla&g"), box, "kcfg_ShowFlagColumn" ); + _fuzzyColumnCheckbox = new TQCheckBox( i18n("&Fuzzy"), box, "kcfg_ShowFuzzyColumn" ); + _untranslatedColumnCheckbox = new TQCheckBox( i18n("&Untranslated"), box, "kcfg_ShowUntranslatedColumn" ); + _totalColumnCheckbox = new TQCheckBox( i18n("&Total"), box, "kcfg_ShowTotalColumn" ); + _cvsColumnCheckbox = new TQCheckBox( i18n("SVN/&CVS status"), box, "kcfg_ShowCVSColumn" ); + _revisionColumnCheckbox = new TQCheckBox( i18n("Last &revision"), box, "kcfg_ShowRevisionColumn" ); + _translatorColumnCheckbox = new TQCheckBox( i18n("Last t&ranslator"), box, "kcfg_ShowTranslatorColumn" ); - QWhatsThis::add(box,i18n("

          Shown columns

          \n" + TQWhatsThis::add(box,i18n("

          Shown columns

          \n" "

          ")); layout->addStretch(1); @@ -1145,16 +1145,16 @@ void ViewPreferences::defaults(const CatManSettings& _settings) _translatorColumnCheckbox->setChecked(_settings.translatorColumn); } -SourceContextPreferences::SourceContextPreferences(QWidget* parent): QWidget(parent) +SourceContextPreferences::SourceContextPreferences(TQWidget* parent): TQWidget(parent) { - QWidget* page = this; - QVBoxLayout* layout=new QVBoxLayout(page); + TQWidget* page = this; + TQVBoxLayout* layout=new TQVBoxLayout(page); layout->setSpacing(KDialog::spacingHint()); layout->setMargin(KDialog::marginHint()); - QHBox* box = new QHBox(page); + TQHBox* box = new TQHBox(page); box->setSpacing(KDialog::spacingHint()); - QLabel* tempLabel=new QLabel(i18n("&Base folder for source code:"),box); + TQLabel* tempLabel=new TQLabel(i18n("&Base folder for source code:"),box); const KFile::Mode mode = static_cast( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly ); _coderootEdit = new KURLRequester ( box, "kcfg_CodeRoot" ); @@ -1168,8 +1168,8 @@ SourceContextPreferences::SourceContextPreferences(QWidget* parent): QWidget(par _pathsEditor->setTitle(i18n("Path Patterns")); layout->addWidget(_pathsEditor); - connect ( _pathsEditor, SIGNAL (itemsChanged ()) - , this, SIGNAL (itemsChanged ())); + connect ( _pathsEditor, TQT_SIGNAL (itemsChanged ()) + , this, TQT_SIGNAL (itemsChanged ())); _pathsEditor->installEventFilter(this); @@ -1195,11 +1195,11 @@ void SourceContextPreferences::defaults(const KBabel::SourceContextSettings& set _pathsEditor->setList(settings.sourcePaths); } -bool SourceContextPreferences::eventFilter( QObject *, QEvent *e ) +bool SourceContextPreferences::eventFilter( TQObject *, TQEvent *e ) { - if( e->type() == QEvent::KeyPress ) + if( e->type() == TQEvent::KeyPress ) { - QKeyEvent *ke = dynamic_cast(e); + TQKeyEvent *ke = dynamic_cast(e); if( ke->key() == Key_Return || ke->key() == Key_Enter ) return true; } diff --git a/kbabel/commonui/projectprefwidgets.h b/kbabel/commonui/projectprefwidgets.h index 81a1b3e6..8dd7b561 100644 --- a/kbabel/commonui/projectprefwidgets.h +++ b/kbabel/commonui/projectprefwidgets.h @@ -36,7 +36,7 @@ #define PROJECTPREFWIDGETS_H #include -#include +#include #include "projectsettings.h" @@ -66,42 +66,42 @@ class KDE_EXPORT SavePreferences : public KTabCtl { Q_OBJECT public: - SavePreferences(QWidget* parent=0); + SavePreferences(TQWidget* parent=0); void defaults(const KBabel::SaveSettings& settings); void setAutoSaveVisible(const bool on); private: - QCheckBox* _lastButton; - QCheckBox* _revisionButton; - QCheckBox* _languageButton; - QCheckBox* _charsetButton; - QCheckBox* _encodingButton; - QCheckBox* _projectButton; - - QCheckBox* _updateButton; - QCheckBox* _autoCheckButton; - QCheckBox* _saveObsoleteButton; - - QComboBox* _encodingBox; - QCheckBox* _oldEncodingButton; - - QRadioButton* _defaultDateButton; - QRadioButton* _localDateButton; - QRadioButton* _customDateButton; - QLineEdit* _dateFormatEdit; + TQCheckBox* _lastButton; + TQCheckBox* _revisionButton; + TQCheckBox* _languageButton; + TQCheckBox* _charsetButton; + TQCheckBox* _encodingButton; + TQCheckBox* _projectButton; + + TQCheckBox* _updateButton; + TQCheckBox* _autoCheckButton; + TQCheckBox* _saveObsoleteButton; + + TQComboBox* _encodingBox; + TQCheckBox* _oldEncodingButton; + + TQRadioButton* _defaultDateButton; + TQRadioButton* _localDateButton; + TQRadioButton* _customDateButton; + TQLineEdit* _dateFormatEdit; - QLineEdit* _projectEdit; + TQLineEdit* _projectEdit; - QRadioButton* _removeFSFButton; - QRadioButton* _updateFSFButton; - QRadioButton* _nochangeFSFButton; - QCheckBox* _translatorCopyrightButton; + TQRadioButton* _removeFSFButton; + TQRadioButton* _updateFSFButton; + TQRadioButton* _nochangeFSFButton; + TQCheckBox* _translatorCopyrightButton; - QCheckBox* _descriptionButton; - QLineEdit* _descriptionEdit; + TQCheckBox* _descriptionButton; + TQLineEdit* _descriptionEdit; KIntNumInput * _autoSaveDelay; - QGroupBox * _autoSaveBox; + TQGroupBox * _autoSaveBox; private slots: void customDateActivated(bool on); @@ -112,8 +112,8 @@ class IdentityPreferences : public QWidget { Q_OBJECT public: - IdentityPreferences(QWidget *parent = 0, const QString& project = ""); - virtual bool eventFilter(QObject *, QEvent*); + IdentityPreferences(TQWidget *parent = 0, const TQString& project = ""); + virtual bool eventFilter(TQObject *, TQEvent*); void defaults(const KBabel::IdentitySettings& settings); private slots: @@ -122,19 +122,19 @@ private slots: void lookupGnuPluralFormHeader(); private: - QLineEdit* _nameEdit; - QLineEdit* _localNameEdit; - QLineEdit* _mailEdit; - QLineEdit* _langEdit; - QLineEdit* _langCodeEdit; - QLineEdit* _listEdit; - - QLineEdit* _timezoneEdit; - QSpinBox *_pluralFormsBox; - QPushButton *_testPluralButton; - QCheckBox* _checkPluralArgumentBox; - QLineEdit* _gnuPluralFormHeaderEdit; - QPushButton *_testGnuPluralFormButton; + TQLineEdit* _nameEdit; + TQLineEdit* _localNameEdit; + TQLineEdit* _mailEdit; + TQLineEdit* _langEdit; + TQLineEdit* _langCodeEdit; + TQLineEdit* _listEdit; + + TQLineEdit* _timezoneEdit; + TQSpinBox *_pluralFormsBox; + TQPushButton *_testPluralButton; + TQCheckBox* _checkPluralArgumentBox; + TQLineEdit* _gnuPluralFormHeaderEdit; + TQPushButton *_testGnuPluralFormButton; }; @@ -142,32 +142,32 @@ class MiscPreferences : public QWidget { Q_OBJECT public: - MiscPreferences(QWidget *parent=0); + MiscPreferences(TQWidget *parent=0); void defaults(const KBabel::MiscSettings& settings); private slots: void regExpButtonClicked(); private: - void setContextInfo(QString reg); - QString contextInfo() const; + void setContextInfo(TQString reg); + TQString contextInfo() const; KLineEdit *contextInfoEdit; KLineEdit *accelMarkerEdit; - QDialog *_regExpEditDialog; - QPushButton *_regExpButton; + TQDialog *_regExpEditDialog; + TQPushButton *_regExpButton; - QRadioButton* bzipButton; - QRadioButton* gzipButton; - QCheckBox* compressSingle; + TQRadioButton* bzipButton; + TQRadioButton* gzipButton; + TQCheckBox* compressSingle; }; class SpellPreferences : public QWidget { Q_OBJECT public: - SpellPreferences(QWidget *parent=0); + SpellPreferences(TQWidget *parent=0); void mergeSettings(KBabel::SpellcheckSettings& set) const; void updateWidgets(const KBabel::SpellcheckSettings& settings); @@ -178,8 +178,8 @@ signals: private: KSpellConfig* spellConfig; - QCheckBox* remIgnoredBtn; - QCheckBox* onFlyBtn; + TQCheckBox* remIgnoredBtn; + TQCheckBox* onFlyBtn; KURLRequester* ignoreURLEdit; }; @@ -188,25 +188,25 @@ class CatmanPreferences : public QWidget { Q_OBJECT public: - CatmanPreferences(QWidget *parent = 0); + CatmanPreferences(TQWidget *parent = 0); void defaults(const KBabel::CatManSettings& settings); private: KURLRequester* _poDirEdit; KURLRequester* _potDirEdit; - QCheckBox* _openWindowButton; + TQCheckBox* _openWindowButton; - QCheckBox* _killButton; - QCheckBox* _indexButton; - QCheckBox* m_msgfmtButton; + TQCheckBox* _killButton; + TQCheckBox* _indexButton; + TQCheckBox* m_msgfmtButton; }; class DirCommandsPreferences : public QWidget { Q_OBJECT public: - DirCommandsPreferences(QWidget *parent = 0); + DirCommandsPreferences(TQWidget *parent = 0); virtual ~DirCommandsPreferences(); void mergeSettings(KBabel::CatManSettings& settings) const; @@ -224,7 +224,7 @@ class FileCommandsPreferences : public QWidget { Q_OBJECT public: - FileCommandsPreferences(QWidget *parent = 0); + FileCommandsPreferences(TQWidget *parent = 0); virtual ~FileCommandsPreferences(); void mergeSettings(KBabel::CatManSettings& settings) const; @@ -242,17 +242,17 @@ class ViewPreferences : public QWidget { Q_OBJECT public: - ViewPreferences(QWidget *parent = 0); + ViewPreferences(TQWidget *parent = 0); void defaults(const KBabel::CatManSettings& settings); private: - QCheckBox* _flagColumnCheckbox; - QCheckBox* _fuzzyColumnCheckbox; - QCheckBox* _untranslatedColumnCheckbox; - QCheckBox* _totalColumnCheckbox; - QCheckBox* _cvsColumnCheckbox; - QCheckBox* _revisionColumnCheckbox; - QCheckBox* _translatorColumnCheckbox; + TQCheckBox* _flagColumnCheckbox; + TQCheckBox* _fuzzyColumnCheckbox; + TQCheckBox* _untranslatedColumnCheckbox; + TQCheckBox* _totalColumnCheckbox; + TQCheckBox* _cvsColumnCheckbox; + TQCheckBox* _revisionColumnCheckbox; + TQCheckBox* _translatorColumnCheckbox; }; /** @@ -265,14 +265,14 @@ class SourceContextPreferences : public QWidget { Q_OBJECT public: - SourceContextPreferences(QWidget* parent=0); + SourceContextPreferences(TQWidget* parent=0); virtual ~SourceContextPreferences(); void mergeSettings(KBabel::SourceContextSettings& settings) const; void updateWidgets(const KBabel::SourceContextSettings& settings); void defaults(const KBabel::SourceContextSettings& settings); - virtual bool eventFilter(QObject *, QEvent*); + virtual bool eventFilter(TQObject *, TQEvent*); signals: void itemsChanged (); diff --git a/kbabel/commonui/projectwizard.cpp b/kbabel/commonui/projectwizard.cpp index d1202f4a..e5df7285 100644 --- a/kbabel/commonui/projectwizard.cpp +++ b/kbabel/commonui/projectwizard.cpp @@ -37,7 +37,7 @@ #include "kbprojectmanager.h" -#include +#include #include #include @@ -47,19 +47,19 @@ using namespace KBabel; -ProjectWizard::ProjectWizard(QWidget *parent,const char *name) +ProjectWizard::ProjectWizard(TQWidget *parent,const char *name) : KWizard(parent,name,true) { _wizard = new ProjectStep1(this,"project wizard widget"); // fill the known language codes KConfig all_languages("all_languages", true, false, "locale"); - QStringList lang_codes = KGlobal::locale()->allLanguagesTwoAlpha(); - for (QStringList::iterator it = lang_codes.begin(); + TQStringList lang_codes = KGlobal::locale()->allLanguagesTwoAlpha(); + for (TQStringList::iterator it = lang_codes.begin(); it != lang_codes.end(); ++it) { // we need untranslated entries here, because of Translation Robot! - QString entry = (*it); + TQString entry = (*it); const int i = entry.find('_'); entry.replace(0, i, entry.left(i).lower()); all_languages.setGroup(entry); @@ -71,9 +71,9 @@ ProjectWizard::ProjectWizard(QWidget *parent,const char *name) } } - connect( _wizard->_projectName, SIGNAL(textChanged(const QString &)), this, SLOT(textChanged(const QString &))); - connect( _wizard->_projectFile, SIGNAL(textChanged(const QString &)), this, SLOT(textChanged(const QString &))); - connect( this, SIGNAL( helpClicked( void ) ), this, SLOT( slotHelpClicked( void ) ) ); + connect( _wizard->_projectName, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(textChanged(const TQString &))); + connect( _wizard->_projectFile, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(textChanged(const TQString &))); + connect( this, TQT_SIGNAL( helpClicked( void ) ), this, TQT_SLOT( slotHelpClicked( void ) ) ); addPage(_wizard, i18n("Basic Project Information")); @@ -86,7 +86,7 @@ ProjectWizard::ProjectWizard(QWidget *parent,const char *name) setNextEnabled (_wizard, false); } -QString ProjectWizard::url() +TQString ProjectWizard::url() { return _wizard->_projectFile->url(); } @@ -133,7 +133,7 @@ Project::Ptr ProjectWizard::project() void ProjectWizard::next() { // check if the file exists - QFileInfo file(url()); + TQFileInfo file(url()); if( file.exists() ) { @@ -145,7 +145,7 @@ void ProjectWizard::next() KWizard::next(); } -void ProjectWizard::textChanged(const QString &) +void ProjectWizard::textChanged(const TQString &) { setNextEnabled( _wizard, !_wizard->_projectName->text().isEmpty() && !_wizard->_projectFile->url().isEmpty() ); } @@ -153,7 +153,7 @@ void ProjectWizard::textChanged(const QString &) Project::Ptr ProjectWizard::newProject() { ProjectWizard* dialog = new ProjectWizard(); - if( dialog->exec() == QDialog::Accepted ) + if( dialog->exec() == TQDialog::Accepted ) { Project::Ptr res = dialog->project(); delete dialog; diff --git a/kbabel/commonui/projectwizard.h b/kbabel/commonui/projectwizard.h index 5c994784..7805190f 100644 --- a/kbabel/commonui/projectwizard.h +++ b/kbabel/commonui/projectwizard.h @@ -37,8 +37,8 @@ #include "kbproject.h" -#include "qmap.h" -#include "qstring.h" +#include "tqmap.h" +#include "tqstring.h" class ProjectStep1; class ProjectStep2; @@ -49,16 +49,16 @@ class KDE_EXPORT ProjectWizard : public KWizard { Q_OBJECT public: - ProjectWizard(QWidget* parent = 0, const char * name = 0); + ProjectWizard(TQWidget* parent = 0, const char * name = 0); Project::Ptr project(); - QString url(); + TQString url(); static Project::Ptr newProject(); private slots: - void textChanged(const QString &); + void textChanged(const TQString &); void slotHelpClicked( void ); virtual void next(); @@ -66,7 +66,7 @@ private: ProjectStep1* _wizard; ProjectStep2* _wizard2; - QMap m_language_codes; + TQMap m_language_codes; }; } diff --git a/kbabel/commonui/roughtransdlg.cpp b/kbabel/commonui/roughtransdlg.cpp index de321044..75395630 100644 --- a/kbabel/commonui/roughtransdlg.cpp +++ b/kbabel/commonui/roughtransdlg.cpp @@ -40,16 +40,16 @@ #include "regexpextractor.h" #include "roughtransdlg.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -64,7 +64,7 @@ using namespace KBabel; RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat - , QWidget *parent,const char *name) + , TQWidget *parent,const char *name) : KDialogBase(parent,name,true ,i18n("Caption of dialog","Rough Translation") , User1|User2|User3|Close) @@ -85,45 +85,45 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat enableButton(User2,false); enableButton(User3,false); - QWidget *mw = new QWidget(this); + TQWidget *mw = new TQWidget(this); setMainWidget(mw); - QVBoxLayout *mainLayout = new QVBoxLayout(mw); + TQVBoxLayout *mainLayout = new TQVBoxLayout(mw); - configWidget = new QVBox(mw); + configWidget = new TQVBox(mw); mainLayout->addWidget(configWidget); - QVGroupBox *box = new QVGroupBox(i18n("What to Translate"),configWidget); + TQVGroupBox *box = new TQVGroupBox(i18n("What to Translate"),configWidget); - QHButtonGroup *bBox = new QHButtonGroup(box); + TQHButtonGroup *bBox = new TQHButtonGroup(box); bBox->setMargin(0); - bBox->setFrameStyle(QFrame::NoFrame); + bBox->setFrameStyle(TQFrame::NoFrame); whatBox = bBox; - untransButton = new QCheckBox(i18n("U&ntranslated entries"),bBox); - fuzzyButton = new QCheckBox(i18n("&Fuzzy entries"),bBox); - transButton = new QCheckBox(i18n("T&ranslated entries"),bBox); + untransButton = new TQCheckBox(i18n("U&ntranslated entries"),bBox); + fuzzyButton = new TQCheckBox(i18n("&Fuzzy entries"),bBox); + transButton = new TQCheckBox(i18n("T&ranslated entries"),bBox); - connect(bBox,SIGNAL(clicked(int)),this,SLOT(msgButtonClicked(int))); + connect(bBox,TQT_SIGNAL(clicked(int)),this,TQT_SLOT(msgButtonClicked(int))); - QWhatsThis::add(bBox,i18n("

          What entries to translate

          " + TQWhatsThis::add(bBox,i18n("

          What entries to translate

          " "

          Choose here, for which entries of the file KBabel " "tries to find a translation. Changed entries are always " "marked as fuzzy, no matter which option you choose.

          ")); - box = new QVGroupBox(i18n("How to Translate"),configWidget); - bBox = new QHButtonGroup(box); - bBox->setFrameStyle(QFrame::NoFrame); + box = new TQVGroupBox(i18n("How to Translate"),configWidget); + bBox = new TQHButtonGroup(box); + bBox->setFrameStyle(TQFrame::NoFrame); bBox->setMargin(0); - searchMatchButton = new QCheckBox(i18n("&Use dictionary settings") + searchMatchButton = new TQCheckBox(i18n("&Use dictionary settings") ,bBox); - fuzzyMatchButton = new QCheckBox(i18n("Fu&zzy translation (slow)") + fuzzyMatchButton = new TQCheckBox(i18n("Fu&zzy translation (slow)") ,bBox); - singleWordButton = new QCheckBox(i18n("&Single word translation") + singleWordButton = new TQCheckBox(i18n("&Single word translation") ,bBox); - QWhatsThis::add(bBox,i18n("

          How messages get translated

          " + TQWhatsThis::add(bBox,i18n("

          How messages get translated

          " "

          Here you can define if a message can only get translated " "completely, if similar messages are acceptable or if KBabel " "is supposed to try translating " @@ -131,11 +131,11 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat "complete message or similar message was found.

          ")); - box = new QVGroupBox(i18n("Options"),configWidget); + box = new TQVGroupBox(i18n("Options"),configWidget); - markFuzzyButton = new QCheckBox(i18n("&Mark changed entries as fuzzy"),box); + markFuzzyButton = new TQCheckBox(i18n("&Mark changed entries as fuzzy"),box); markFuzzyButton->setChecked(true); - QWhatsThis::add(markFuzzyButton, + TQWhatsThis::add(markFuzzyButton, i18n("

          Mark changed entries as fuzzy

          " "

          When a translation for a message is found, the entry " "will be marked fuzzy by default. This is because the " @@ -144,25 +144,25 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat "you know what you are doing.

          ")); - connect(markFuzzyButton, SIGNAL(toggled(bool)) - , this, SLOT(fuzzyButtonToggled(bool))); + connect(markFuzzyButton, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(fuzzyButtonToggled(bool))); - kdeButton = new QCheckBox(i18n("Initialize &KDE-specific entries"),box); + kdeButton = new TQCheckBox(i18n("Initialize &KDE-specific entries"),box); kdeButton->setChecked(true); - QWhatsThis::add(kdeButton, + TQWhatsThis::add(kdeButton, i18n("

          Initialize KDE-specific entries

          " "

          Initialize \"Comment=\" and \"Name=\" entries " "if a translation is not found. Also, \"NAME OF TRANSLATORS\" " "and \"EMAIL OF TRANSLATORS\" is filled with identity settings.

          ")); - QVGroupBox *dBox = new QVGroupBox(i18n("Dictionaries"),configWidget); + TQVGroupBox *dBox = new TQVGroupBox(i18n("Dictionaries"),configWidget); configWidget->setStretchFactor(dBox,1); - QPtrList moduleList = dict->moduleInfos(); + TQPtrList moduleList = dict->moduleInfos(); KConfig *config = KGlobal::config(); KConfigGroupSaver gs(config,"RoughTranslation"); - QStringList selectedList=config->readListEntry("Selected"); + TQStringList selectedList=config->readListEntry("Selected"); if(selectedList.isEmpty()) { int a = dict->activeModule(); @@ -174,7 +174,7 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat } dictChooser = new DictChooser(dict,selectedList,dBox,"dictChooser"); - QWhatsThis::add(dictChooser,i18n("

          Dictionaries

          " + TQWhatsThis::add(dictChooser,i18n("

          Dictionaries

          " "

          Choose here, which dictionaries have to be used for " "finding a translation. If you select more than one " "dictionary, they are used in the same order as they " @@ -183,11 +183,11 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat "configure selected dictionary. The original settings " "will be restored after closing the dialog.

          ")); - QLabel* label = new QLabel( i18n("Messages:"), mw ); + TQLabel* label = new TQLabel( i18n("Messages:"), mw ); progressbar = new KProgress(mw,"progressbar"); progressbar->setTextEnabled(true); progressbar->setFormat("%v/%m (%p%)"); - QHBoxLayout* pblayout= new QHBoxLayout(mainLayout); + TQHBoxLayout* pblayout= new TQHBoxLayout(mainLayout); pblayout->add(label); pblayout->add(progressbar); @@ -249,7 +249,7 @@ void RoughTransDlg::slotUser1() partTransCounter=0; totalTried=0; - QTimer::singleShot(0,this, SLOT(translate())); + TQTimer::singleShot(0,this, TQT_SLOT(translate())); } void RoughTransDlg::translate() @@ -263,16 +263,16 @@ void RoughTransDlg::translate() int total=catalog->numberOfEntries(); progressbar->setTotalSteps(total); - QStringList dictList = dictChooser->selectedDicts(); + TQStringList dictList = dictChooser->selectedDicts(); catalog->applyBeginCommand(0,Msgstr,0); bool singleWords=singleWordButton->isChecked(); bool fuzzyMatch=fuzzyMatchButton->isChecked(); bool searchMatch=searchMatchButton->isChecked(); - QRegExp contextReg=catalog->miscSettings().contextInfo; - QChar accelMarker=catalog->miscSettings().accelMarker; - QRegExp endPunctReg("[\\.?!: ]+$"); + TQRegExp contextReg=catalog->miscSettings().contextInfo; + TQChar accelMarker=catalog->miscSettings().accelMarker; + TQRegExp endPunctReg("[\\.?!: ]+$"); for(int i = 0; i < total; i++) @@ -283,18 +283,18 @@ void RoughTransDlg::translate() if(stop || cancel) break; // FIXME: should care about plural forms - QString msg=catalog->msgid(i,true).first(); - QString translation; + TQString msg=catalog->msgid(i,true).first(); + TQString translation; // this is KDE specific: if( kdeSpecific ) { if( catalog->pluralForm(i) == NoPluralForm ) { - QString origTrans = catalog->msgstr(i).first(); + TQString origTrans = catalog->msgstr(i).first(); if(msg.find("_: NAME OF TRANSLATORS\\n")==0) { - QString authorName; + TQString authorName; if( !catalog->identitySettings().authorLocalizedName.isEmpty() ) authorName = catalog->identitySettings().authorLocalizedName; else // fallback to non-localized name @@ -302,7 +302,7 @@ void RoughTransDlg::translate() authorName = catalog->identitySettings().authorName; else continue; // there is no name to be inserted - if( !QStringList::split(',', origTrans).contains(authorName) ) + if( !TQStringList::split(',', origTrans).contains(authorName) ) { if(origTrans.isEmpty() ) translation=authorName; else translation+=origTrans+","+authorName; @@ -313,7 +313,7 @@ void RoughTransDlg::translate() // skip, if email is not specified in settings if( catalog->identitySettings().authorEmail.isEmpty() ) continue; - if( !QStringList::split(',', origTrans).contains(catalog->identitySettings().authorEmail) ) + if( !TQStringList::split(',', origTrans).contains(catalog->identitySettings().authorEmail) ) { if(origTrans.isEmpty() ) translation=catalog->identitySettings().authorEmail; else translation=origTrans+","+catalog->identitySettings().authorEmail; @@ -321,7 +321,7 @@ void RoughTransDlg::translate() } else if (msg.find("ROLES_OF_TRANSLATORS") == 0) { - QString temp = "\n" + TQString temp = "\n" "\n
          " + catalog->identitySettings( ).authorEmail+"
          \n" "
          "; @@ -332,12 +332,12 @@ void RoughTransDlg::translate() } else if (msg.find("CREDIT_FOR_TRANSLATORS") == 0) { - QString authorName; + TQString authorName; if (!catalog->identitySettings( ).authorLocalizedName.isEmpty( )) authorName = catalog->identitySettings( ).authorLocalizedName; else if (!catalog->identitySettings( ).authorName.isEmpty( )) authorName = catalog->identitySettings( ).authorName; - QString temp = "" + authorName + "\n" + "" + + TQString temp = "" + authorName + "\n" + "" + catalog->identitySettings( ).authorEmail + ""; if (origTrans.isEmpty( )) translation = temp; @@ -370,7 +370,7 @@ void RoughTransDlg::translate() } // try exact translation - QStringList::Iterator dit = dictList.begin(); + TQStringList::Iterator dit = dictList.begin(); while(translation.isEmpty() && dit != dictList.end()) { dictBox->setActiveModule(*dit); @@ -386,7 +386,7 @@ void RoughTransDlg::translate() // try search settings translation else if (searchMatch) { - QString tr; + TQString tr; int score, best_score = 0; dit = dictList.begin(); while(dit != dictList.end()) @@ -412,7 +412,7 @@ void RoughTransDlg::translate() // try fuzzy translation else if (fuzzyMatch) { - QString tr; + TQString tr; int score, best_score = 0; dit = dictList.begin(); while(dit != dictList.end()) @@ -439,9 +439,9 @@ void RoughTransDlg::translate() // try single word translation if(translation.isEmpty() && singleWords) { - QStringList wordList; - QChar accel; - QString endingPunctuation; + TQStringList wordList; + TQChar accel; + TQString endingPunctuation; int pos = msg.findRev(endPunctReg); if(pos >= 0) { @@ -456,12 +456,12 @@ void RoughTransDlg::translate() te.setString(msg); msg=te.matchesReplaced(" KBABELTAG "); - QString word; + TQString word; int length = msg.length(); - QRegExp digitReg("^[0-9]*$"); + TQRegExp digitReg("^[0-9]*$"); for(int index=0; index < length; index++) { - QChar c=msg[index]; + TQChar c=msg[index]; if(c==accelMarker) { @@ -478,7 +478,7 @@ void RoughTransDlg::translate() if(!word.contains(digitReg)) wordList.append(word); - word=QString::null; + word=TQString::null; } } else if(!word.isEmpty()) @@ -486,7 +486,7 @@ void RoughTransDlg::translate() if(!word.contains(digitReg)) wordList.append(word); - word=QString::null; + word=TQString::null; } } @@ -503,7 +503,7 @@ void RoughTransDlg::translate() if(!word.isEmpty() && !word.contains(digitReg)) wordList.append(word); - word=QString::null; + word=TQString::null; wordList.append("\\n\n"); index+=2; @@ -513,7 +513,7 @@ void RoughTransDlg::translate() if(!word.contains(digitReg)) wordList.append(word); - word=QString::null; + word=TQString::null; } } else if(!word.isEmpty()) @@ -521,7 +521,7 @@ void RoughTransDlg::translate() if(!word.contains(digitReg)) wordList.append(word); - word=QString::null; + word=TQString::null; } } else if(!word.isEmpty()) @@ -530,7 +530,7 @@ void RoughTransDlg::translate() wordList.append(word); } - word=QString::null; + word=TQString::null; } } @@ -543,7 +543,7 @@ void RoughTransDlg::translate() { dictBox->setActiveModule(*dit); - for(QStringList::Iterator it=wordList.begin(); + for(TQStringList::Iterator it=wordList.begin(); it!=wordList.end(); ++it) { if( (*it)=="\\n\n" ) @@ -556,7 +556,7 @@ void RoughTransDlg::translate() } else { - QString trans = dictBox->translate(*it); + TQString trans = dictBox->translate(*it); if(!trans.isEmpty()) { @@ -571,7 +571,7 @@ void RoughTransDlg::translate() } if(wordCounter==0) - translation=QString::null; + translation=TQString::null; ++dit; } @@ -610,9 +610,9 @@ void RoughTransDlg::translate() { if(!catalog->isUntranslated(i)) { - QStringList msgs = catalog->msgstr(i); + TQStringList msgs = catalog->msgstr(i); uint counter = 0; - for( QStringList::Iterator it = msgs.begin() ; it != msgs.end() ; ++it) + for( TQStringList::Iterator it = msgs.begin() ; it != msgs.end() ; ++it) { DelTextCmd* delCmd = new DelTextCmd(0 ,(*it),counter++); @@ -668,7 +668,7 @@ void RoughTransDlg::showStatistics() { int nothing=totalTried-partTransCounter-exactTransCounter; KLocale *locale = KGlobal::locale(); - QString statMsg = i18n("Result of the translation:\n" + TQString statMsg = i18n("Result of the translation:\n" "Edited entries: %1\n" "Exact translations: %2 (%3%)\n" "Approximate translations: %4 (%5%)\n" @@ -717,7 +717,7 @@ void RoughTransDlg::msgButtonClicked(int id) if(!transButton->isChecked() && !untransButton->isChecked() && !fuzzyButton->isChecked()) { - QButton *button = whatBox->find(id); + TQButton *button = whatBox->find(id); if(button == transButton) { transButton->setChecked(true); @@ -741,14 +741,14 @@ void RoughTransDlg::fuzzyButtonToggled(bool on) { if(!on) { - QString msg=i18n("

          " + TQString msg=i18n("

          " "When a translation for a message is found, the entry " "will be marked fuzzy by default. This is because the " "translation is just guessed by KBabel and you should always " "check the results carefully. Deactivate this option only if " "you know what you are doing.

          "); - KMessageBox::information(this, msg, QString::null,"MarkFuzzyWarningInRoughTransDlg"); + KMessageBox::information(this, msg, TQString::null,"MarkFuzzyWarningInRoughTransDlg"); } } diff --git a/kbabel/commonui/roughtransdlg.h b/kbabel/commonui/roughtransdlg.h index e51378a5..d9e582f2 100644 --- a/kbabel/commonui/roughtransdlg.h +++ b/kbabel/commonui/roughtransdlg.h @@ -55,7 +55,7 @@ class KDE_EXPORT RoughTransDlg : public KDialogBase Q_OBJECT public: - RoughTransDlg(KBabelDictBox* dictBox, KBabel::Catalog* catalog, QWidget *parent + RoughTransDlg(KBabelDictBox* dictBox, KBabel::Catalog* catalog, TQWidget *parent , const char *name=0); ~RoughTransDlg(); @@ -87,20 +87,20 @@ private: KBabelDictBox *dictBox; DictChooser *dictChooser; - QVBox *configWidget; + TQVBox *configWidget; - QHButtonGroup *whatBox; - QCheckBox *transButton; - QCheckBox *untransButton; - QCheckBox *fuzzyButton; + TQHButtonGroup *whatBox; + TQCheckBox *transButton; + TQCheckBox *untransButton; + TQCheckBox *fuzzyButton; - QCheckBox *singleWordButton; - QCheckBox *fuzzyMatchButton; - QCheckBox *searchMatchButton; + TQCheckBox *singleWordButton; + TQCheckBox *fuzzyMatchButton; + TQCheckBox *searchMatchButton; - QCheckBox *markFuzzyButton; - QCheckBox *kdeButton; + TQCheckBox *markFuzzyButton; + TQCheckBox *kdeButton; int exactTransCounter; int partTransCounter; diff --git a/kbabel/commonui/toolaction.cpp b/kbabel/commonui/toolaction.cpp index bec1363a..20dac847 100644 --- a/kbabel/commonui/toolaction.cpp +++ b/kbabel/commonui/toolaction.cpp @@ -33,9 +33,9 @@ #include -ToolAction::ToolAction( const QString & text, const KShortcut& cut, const KDataToolInfo & info, const QString & command, - QObject * parent, const char * name ) - : KAction( text, info.iconName() == "unknown" ? QString::null : info.iconName(), cut, parent, name ), +ToolAction::ToolAction( const TQString & text, const KShortcut& cut, const KDataToolInfo & info, const TQString & command, + TQObject * parent, const char * name ) + : KAction( text, info.iconName() == "unknown" ? TQString::null : info.iconName(), cut, parent, name ), m_command( command ), m_info( info ) { @@ -46,37 +46,37 @@ void ToolAction::slotActivated() emit toolActivated( m_info, m_command ); } -QPtrList ToolAction::dataToolActionList( const QValueList & tools, const QObject *receiver, const char* slot, const QStringList& command, bool excludeCommand, KActionCollection* parent, const QString& namePrefix ) +TQPtrList ToolAction::dataToolActionList( const TQValueList & tools, const TQObject *receiver, const char* slot, const TQStringList& command, bool excludeCommand, KActionCollection* parent, const TQString& namePrefix ) { - QPtrList actionList; + TQPtrList actionList; if ( tools.isEmpty() ) return actionList; - QValueList::ConstIterator entry = tools.begin(); + TQValueList::ConstIterator entry = tools.begin(); for( ; entry != tools.end(); ++entry ) { - QStringList userCommands = (*entry).userCommands(); - QStringList commands = (*entry).commands(); - QStringList shortcuts = (*entry).service()->property("Shortcuts").toStringList(); + TQStringList userCommands = (*entry).userCommands(); + TQStringList commands = (*entry).commands(); + TQStringList shortcuts = (*entry).service()->property("Shortcuts").toStringList(); Q_ASSERT(!commands.isEmpty()); if ( commands.count() != userCommands.count() ) kdWarning() << "KDataTool desktop file error (" << (*entry).service() << "). " << commands.count() << " commands and " << userCommands.count() << " descriptions." << endl; - QStringList::ConstIterator uit = userCommands.begin(); - QStringList::ConstIterator cit = commands.begin(); - QStringList::ConstIterator sit = shortcuts.begin(); + TQStringList::ConstIterator uit = userCommands.begin(); + TQStringList::ConstIterator cit = commands.begin(); + TQStringList::ConstIterator sit = shortcuts.begin(); for (; uit != userCommands.end() && cit != commands.end(); ++uit, ++cit) { if( !excludeCommand == command.contains(*cit) ) { - QString sc=*sit; + TQString sc=*sit; - ToolAction * action = new ToolAction( *uit, (sc.isEmpty()?QString::null:sc), *entry, *cit + ToolAction * action = new ToolAction( *uit, (sc.isEmpty()?TQString::null:sc), *entry, *cit , parent - , QString(namePrefix+(*entry).service()->library()+"_"+(*cit)).utf8() ); - connect( action, SIGNAL( toolActivated( const KDataToolInfo &, const QString & ) ), + , TQString(namePrefix+(*entry).service()->library()+"_"+(*cit)).utf8() ); + connect( action, TQT_SIGNAL( toolActivated( const KDataToolInfo &, const TQString & ) ), receiver, slot ); actionList.append( action ); @@ -88,13 +88,13 @@ QPtrList ToolAction::dataToolActionList( const QValueList ToolAction::validationTools() +TQValueList ToolAction::validationTools() { - QValueList result; + TQValueList result; - QValueList tools = KDataToolInfo::query("CatalogItem", "application/x-kbabel-catalogitem", KGlobal::instance()); + TQValueList tools = KDataToolInfo::query("CatalogItem", "application/x-kbabel-catalogitem", KGlobal::instance()); - for( QValueList::ConstIterator entry = tools.begin(); entry != tools.end(); ++entry ) + for( TQValueList::ConstIterator entry = tools.begin(); entry != tools.end(); ++entry ) { if( (*entry).commands().contains("validate") ) { diff --git a/kbabel/commonui/toolaction.h b/kbabel/commonui/toolaction.h index fba7863c..7159aaf2 100644 --- a/kbabel/commonui/toolaction.h +++ b/kbabel/commonui/toolaction.h @@ -32,7 +32,7 @@ #ifndef TOOLACTION_H #define TOOLACTION_H -#include +#include #include #include @@ -43,29 +43,29 @@ class KDE_EXPORT ToolAction : public KAction { Q_OBJECT public: - ToolAction( const QString & text, const KShortcut& cut, const KDataToolInfo & info, const QString & command, QObject * parent = 0, const char * name = 0); + ToolAction( const TQString & text, const KShortcut& cut, const KDataToolInfo & info, const TQString & command, TQObject * parent = 0, const char * name = 0); /** * return the list of KActions created for a list of tools. @ref command * allows to specify rescriction of commands, for which the list should * or shouldn't be created according to the @ref excludeCommand flag. */ - static QPtrList dataToolActionList( const QValueList & tools, const QObject *receiver, const char* slot, const QStringList& command, bool excludeCommand, KActionCollection* parent=0, const QString& namePrefix=QString::null ); + static TQPtrList dataToolActionList( const TQValueList & tools, const TQObject *receiver, const char* slot, const TQStringList& command, bool excludeCommand, KActionCollection* parent=0, const TQString& namePrefix=TQString::null ); /** * returns information about all available validation tools (KDataTools with support for CatalogItem * and the "validate" command. */ - static QValueList validationTools(); + static TQValueList validationTools(); signals: - void toolActivated( const KDataToolInfo & info, const QString & command ); + void toolActivated( const KDataToolInfo & info, const TQString & command ); protected: virtual void slotActivated(); private: - QString m_command; + TQString m_command; KDataToolInfo m_info; }; diff --git a/kbabel/commonui/toolselectionwidget.cpp b/kbabel/commonui/toolselectionwidget.cpp index 56759490..1e97f473 100644 --- a/kbabel/commonui/toolselectionwidget.cpp +++ b/kbabel/commonui/toolselectionwidget.cpp @@ -34,33 +34,33 @@ #include #include -#include +#include -ToolSelectionWidget::ToolSelectionWidget( QWidget * parent, const char * name ) +ToolSelectionWidget::ToolSelectionWidget( TQWidget * parent, const char * name ) : KActionSelector( parent, name ) { } -void ToolSelectionWidget::loadTools( const QStringList &commands, - const QValueList& tools) +void ToolSelectionWidget::loadTools( const TQStringList &commands, + const TQValueList& tools) { if ( tools.isEmpty() ) return; _allTools = tools; - QValueList::ConstIterator entry = tools.begin(); + TQValueList::ConstIterator entry = tools.begin(); for( ; entry != tools.end(); ++entry ) { - QStringList userCommands = (*entry).userCommands(); - QStringList toolCommands = (*entry).commands(); + TQStringList userCommands = (*entry).userCommands(); + TQStringList toolCommands = (*entry).commands(); Q_ASSERT(!toolCommands.isEmpty()); if ( toolCommands.count() != userCommands.count() ) kdWarning() << "KDataTool desktop file error (" << (*entry).service() << "). " << toolCommands.count() << " commands and " << userCommands.count() << " descriptions." << endl; - QStringList::ConstIterator uit = userCommands.begin(); - QStringList::ConstIterator cit = toolCommands.begin(); + TQStringList::ConstIterator uit = userCommands.begin(); + TQStringList::ConstIterator cit = toolCommands.begin(); for (; uit != userCommands.end() && cit != toolCommands.end(); ++uit, ++cit ) { if( commands.contains(*cit) ) @@ -71,14 +71,14 @@ void ToolSelectionWidget::loadTools( const QStringList &commands, } } -void ToolSelectionWidget::setSelectedTools( const QStringList& tools ) +void ToolSelectionWidget::setSelectedTools( const TQStringList& tools ) { availableListBox()->clear(); selectedListBox()->clear(); - QValueList::ConstIterator entry = _allTools.begin(); + TQValueList::ConstIterator entry = _allTools.begin(); for( ; entry != _allTools.end(); ++entry ) { - QString uic=*(*entry).userCommands().at((*entry).commands().findIndex("validate")); + TQString uic=*(*entry).userCommands().at((*entry).commands().findIndex("validate")); if( tools.contains((*entry).service()->library()) ) selectedListBox()->insertItem( uic ); else @@ -86,14 +86,14 @@ void ToolSelectionWidget::setSelectedTools( const QStringList& tools ) } } -QStringList ToolSelectionWidget::selectedTools() +TQStringList ToolSelectionWidget::selectedTools() { - QStringList usedNames; + TQStringList usedNames; for( uint i=0; icount() ; i++ ) usedNames += selectedListBox()->text(i); - QStringList result; - QValueList::ConstIterator entry = _allTools.begin(); + TQStringList result; + TQValueList::ConstIterator entry = _allTools.begin(); for( ; entry != _allTools.end(); ++entry ) { if( usedNames.contains(*((*entry).userCommands().at((*entry).commands().findIndex("validate")))) ) diff --git a/kbabel/commonui/toolselectionwidget.h b/kbabel/commonui/toolselectionwidget.h index 391f15dd..bbc08ca0 100644 --- a/kbabel/commonui/toolselectionwidget.h +++ b/kbabel/commonui/toolselectionwidget.h @@ -41,17 +41,17 @@ class KDE_EXPORT ToolSelectionWidget : public KActionSelector { Q_OBJECT public: - ToolSelectionWidget(QWidget* parent=0, const char* name=0 ); + ToolSelectionWidget(TQWidget* parent=0, const char* name=0 ); - QStringList selectedTools(); + TQStringList selectedTools(); - void loadTools (const QStringList& commands, const QValueList & tools); + void loadTools (const TQStringList& commands, const TQValueList & tools); public slots: - void setSelectedTools( const QStringList& tools ); + void setSelectedTools( const TQStringList& tools ); private: - QValueList _allTools; + TQValueList _allTools; }; #endif diff --git a/kbabel/datatools/accelerators/main.cc b/kbabel/datatools/accelerators/main.cc index 2bf6ec90..632eb7b5 100644 --- a/kbabel/datatools/accelerators/main.cc +++ b/kbabel/datatools/accelerators/main.cc @@ -51,14 +51,14 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_accelstool, KGenericFactory using namespace KBabel; -AcceleratorTool::AcceleratorTool( QObject* parent, const char* name, const QStringList & ) +AcceleratorTool::AcceleratorTool( TQObject* parent, const char* name, const TQStringList & ) : KDataTool( parent, name ), _cache_origin( 0 ) { // bogus translation just for allowing the translation i18n("what check found errors","accelerator"); } -bool AcceleratorTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype ) +bool AcceleratorTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype ) { if ( command != "validate" ) { @@ -96,26 +96,26 @@ bool AcceleratorTool::run( const QString& command, void* data, const QString& da if(!item->isUntranslated()) { // FIXME: this should care about plural forms in msgid - QString lineid=item->msgid().first(); + TQString lineid=item->msgid().first(); lineid.replace( _context, ""); - lineid.replace(QRegExp("\\n"),""); + lineid.replace(TQRegExp("\\n"),""); lineid.simplifyWhiteSpace(); - QString regStr(_marker); + TQString regStr(_marker); regStr+="[^\\s]"; - QRegExp reg(regStr); + TQRegExp reg(regStr); - QStringList str = item->msgstr(true); - for( QStringList::Iterator form = str.begin() ; form != str.end(); form++ ) + TQStringList str = item->msgstr(true); + for( TQStringList::Iterator form = str.begin() ; form != str.end(); form++ ) { - QString linestr=(*form); + TQString linestr=(*form); linestr.simplifyWhiteSpace(); int n = lineid.contains(reg); if( _marker == '&' ) - n = n - lineid.contains(QRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); + n = n - lineid.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); int m = linestr.contains(reg); if( _marker == '&' ) - m = m - linestr.contains(QRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); + m = m - linestr.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))")); hasError = hasError || ( n<=1 && m != n); } } diff --git a/kbabel/datatools/accelerators/main.h b/kbabel/datatools/accelerators/main.h index 4eba780e..ee9ae3a8 100644 --- a/kbabel/datatools/accelerators/main.h +++ b/kbabel/datatools/accelerators/main.h @@ -37,19 +37,19 @@ #include -#include +#include class AcceleratorTool : public KDataTool { Q_OBJECT public: - AcceleratorTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + AcceleratorTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: - QRegExp _context; - QChar _marker; + TQRegExp _context; + TQChar _marker; KBabel::Project::Ptr _cache_origin; }; diff --git a/kbabel/datatools/arguments/main.cc b/kbabel/datatools/arguments/main.cc index fd3daf3c..e80c7c35 100644 --- a/kbabel/datatools/arguments/main.cc +++ b/kbabel/datatools/arguments/main.cc @@ -51,13 +51,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_argstool, KGenericFactory ( "kb using namespace KBabel; -ArgumentTool::ArgumentTool( QObject* parent, const char* name, const QStringList & ) +ArgumentTool::ArgumentTool( TQObject* parent, const char* name, const TQStringList & ) : KDataTool( parent, name ), _cache_origin( 0 ) { i18n( "what check found errors","arguments"); } -bool ArgumentTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype ) +bool ArgumentTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype ) { if ( command != "validate" ) { @@ -96,13 +96,13 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat if(!item->isUntranslated()) { - QString formatChars="dioxXucsfeEgGp%"; + TQString formatChars="dioxXucsfeEgGp%"; if( _checkPlurals ) formatChars+="n"; // FIXME: this should care about plural forms in msgid - QString line=item->msgid().first(); - QStringList argList; + TQString line=item->msgid().first(); + TQStringList argList; // if( isPluralForm() ) { @@ -114,17 +114,17 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat } } line.replace(_context, ""); - line.replace(QRegExp("\\n"),""); + line.replace(TQRegExp("\\n"),""); line.simplifyWhiteSpace(); // flag, for GNU only we can allow reordering bool non_gnu = (item->pluralForm() == KDESpecific); - int index=line.find(QRegExp("%.")); + int index=line.find(TQRegExp("%.")); while(index>=0) { - int endIndex=line.find(QRegExp("[^\\d]"),index+1); + int endIndex=line.find(TQRegExp("[^\\d]"),index+1); if(endIndex<0) { endIndex=line.length(); @@ -135,15 +135,15 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat } if(endIndex - index > 1 ) { - QString arg = line.mid(index,endIndex-index); - if( arg.contains( QRegExp("\\d") ) ) { + TQString arg = line.mid(index,endIndex-index); + if( arg.contains( TQRegExp("\\d") ) ) { non_gnu = true; } argList.append(arg); } - index=line.find(QRegExp("%."),endIndex); + index=line.find(TQRegExp("%."),endIndex); } if( item->pluralForm()==KDESpecific) @@ -157,22 +157,22 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat // generate for each plural form to be checked separately line=item->msgstr().first(); - QStringList lines; + TQStringList lines; // FIXME; this is KDE specific if( item->pluralForm() == KDESpecific ) { - lines = QStringList::split("\\n",line); + lines = TQStringList::split("\\n",line); } else { lines.append(line); } - QStringList argCache = argList; - QStringList foundArgs; + TQStringList argCache = argList; + TQStringList foundArgs; - for(QStringList::Iterator i = lines.begin() ; i!=lines.end() ; i++) + for(TQStringList::Iterator i = lines.begin() ; i!=lines.end() ; i++) { // initialize for the next plural form foundArgs.clear(); @@ -180,9 +180,9 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat line=(*i); - line.replace(QRegExp("\\n"),""); + line.replace(TQRegExp("\\n"),""); - QRegExp argdesc( + TQRegExp argdesc( "%((["+formatChars+"])" +"|(\\d)+" +"|(\\d)+\\$(["+formatChars+"])" @@ -204,7 +204,7 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat argList = argCache; if( non_gnu ) { - for ( QStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) { + for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) { if( argList.find( *it ) == argList.end() ) { hasError = true; break; @@ -220,11 +220,11 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat else { // handle GNU with replacements - QStringList::Iterator oit = argList.begin(); - for ( QStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it , ++oit) { + TQStringList::Iterator oit = argList.begin(); + for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it , ++oit) { if( *it == *oit ) { // argument is the same, mark as used - *oit = QString::null; + *oit = TQString::null; } else { // try to strip replacement int index = (*it).find( '$' ); @@ -233,13 +233,13 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat hasError = true; break; } - QString place = (*it).mid( 1, index-1 ); - QString arg = (*it).right( index ); + TQString place = (*it).mid( 1, index-1 ); + TQString arg = (*it).right( index ); arg[0] = '%'; - QStringList::Iterator a = argList.at( place.toInt()-1 ); + TQStringList::Iterator a = argList.at( place.toInt()-1 ); if( a != argList.end() && (*a) == arg ) { - (*a) = QString::null; + (*a) = TQString::null; } else { @@ -249,7 +249,7 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat } } - for ( QStringList::Iterator it = argList.begin(); it != argList.end(); ++it) { + for ( TQStringList::Iterator it = argList.begin(); it != argList.end(); ++it) { if( ! (*it).isNull () ) { // argument is the same, mark as used hasError = true; diff --git a/kbabel/datatools/arguments/main.h b/kbabel/datatools/arguments/main.h index 1f258ca9..ea7e4e23 100644 --- a/kbabel/datatools/arguments/main.h +++ b/kbabel/datatools/arguments/main.h @@ -37,18 +37,18 @@ #include -#include +#include class ArgumentTool : public KDataTool { Q_OBJECT public: - ArgumentTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + ArgumentTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: KBabel::Project::Ptr _cache_origin; - QRegExp _context; + TQRegExp _context; bool _checkPlurals; }; diff --git a/kbabel/datatools/context/main.cc b/kbabel/datatools/context/main.cc index 7715cedd..066ef430 100644 --- a/kbabel/datatools/context/main.cc +++ b/kbabel/datatools/context/main.cc @@ -52,13 +52,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_contexttool, KGenericFactory ( " using namespace KBabel; -ContextTool::ContextTool( QObject* parent, const char* name, const QStringList & ) +ContextTool::ContextTool( TQObject* parent, const char* name, const TQStringList & ) : KDataTool( parent, name ), _cache_origin( 0 ) { i18n("what check found errors","context info"); } -bool ContextTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype ) +bool ContextTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype ) { if ( command != "validate" ) { diff --git a/kbabel/datatools/context/main.h b/kbabel/datatools/context/main.h index 80388d17..8dc24e9f 100644 --- a/kbabel/datatools/context/main.h +++ b/kbabel/datatools/context/main.h @@ -42,11 +42,11 @@ class ContextTool : public KDataTool Q_OBJECT public: - ContextTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + ContextTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: KBabel::Project::Ptr _cache_origin; - QRegExp _context; + TQRegExp _context; }; #endif diff --git a/kbabel/datatools/equations/main.cc b/kbabel/datatools/equations/main.cc index 14a03cd6..64d19adf 100644 --- a/kbabel/datatools/equations/main.cc +++ b/kbabel/datatools/equations/main.cc @@ -52,13 +52,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_equationstool, KGenericFactory using namespace KBabel; -EquationsTool::EquationsTool( QObject* parent, const char* name, const QStringList & ) +EquationsTool::EquationsTool( TQObject* parent, const char* name, const TQStringList & ) : KDataTool( parent, name ), _equation("^[a-zA-Z0-9]+=.+") { i18n("what check found errors","equations"); } -bool EquationsTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype ) +bool EquationsTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype ) { if ( command != "validate" ) { @@ -90,7 +90,7 @@ bool EquationsTool::run( const QString& command, void* data, const QString& data && item->msgid().first().contains(_equation)) { int index = item->msgid().first().find('='); - QString left = item->msgid().first().left(index); + TQString left = item->msgid().first().left(index); index = item->msgstr().first().find('='); if(left != item->msgstr().first().left(index)) hasError = true; diff --git a/kbabel/datatools/equations/main.h b/kbabel/datatools/equations/main.h index 15337a1b..72fae529 100644 --- a/kbabel/datatools/equations/main.h +++ b/kbabel/datatools/equations/main.h @@ -33,7 +33,7 @@ #ifndef __main_h__ #define __main_h__ -#include +#include #include class EquationsTool : public KDataTool @@ -41,10 +41,10 @@ class EquationsTool : public KDataTool Q_OBJECT public: - EquationsTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + EquationsTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: - QRegExp _equation; + TQRegExp _equation; }; #endif diff --git a/kbabel/datatools/length/main.cc b/kbabel/datatools/length/main.cc index 6e62c626..5b2bc411 100644 --- a/kbabel/datatools/length/main.cc +++ b/kbabel/datatools/length/main.cc @@ -55,13 +55,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_lengthtool, KGenericFactory ( "kb using namespace KBabel; -LengthTool::LengthTool( QObject* parent, const char* name, const QStringList & ) +LengthTool::LengthTool( TQObject* parent, const char* name, const TQStringList & ) : KDataTool( parent, name ), _cache_origin( 0 ) { i18n("which check found errors","translation has inconsistent length"); } -bool LengthTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype ) +bool LengthTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype ) { if ( command != "validate" ) @@ -89,7 +89,7 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp CatalogItem* item = (CatalogItem*)(data); bool hasError = false; - QStringList str, id; + TQStringList str, id; if(!item->isUntranslated()) { @@ -102,9 +102,9 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp //Ensure KDE plural forms are in a StringList if( item->pluralForm() == KDESpecific ) { - str = QStringList::split( "\\n", item->msgstr().first(), true ); - id = QStringList::split( "\\n", - item->msgid().first().replace( QRegExp(_plurals), ""), true ); + str = TQStringList::split( "\\n", item->msgstr().first(), true ); + id = TQStringList::split( "\\n", + item->msgid().first().replace( TQRegExp(_plurals), ""), true ); } else { str = item->msgstr(); id = item->msgid(); @@ -116,11 +116,11 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp //FIXME: replace 10% check with configurable setting or a statistical //based expected length relationship int idlen, strlen; - for( QStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) { - QString iditem = (*i); - idlen = iditem.replace( QRegExp(_context),"").length(); - for( QStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) { - QString stritem = (*j); + for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) { + TQString iditem = (*i); + idlen = iditem.replace( TQRegExp(_context),"").length(); + for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) { + TQString stritem = (*j); strlen = stritem.length(); hasError = hasError || (strlen < (0.1 * idlen)) || (strlen > (10 * idlen)); diff --git a/kbabel/datatools/length/main.h b/kbabel/datatools/length/main.h index 7e84cf55..6a4ec06f 100644 --- a/kbabel/datatools/length/main.h +++ b/kbabel/datatools/length/main.h @@ -43,12 +43,12 @@ class LengthTool : public KDataTool Q_OBJECT public: - LengthTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + LengthTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: KBabel::Project::Ptr _cache_origin; - QRegExp _context; - QRegExp _plurals; + TQRegExp _context; + TQRegExp _plurals; }; #endif diff --git a/kbabel/datatools/not-translated/main.cc b/kbabel/datatools/not-translated/main.cc index 0714caf3..22e23c84 100644 --- a/kbabel/datatools/not-translated/main.cc +++ b/kbabel/datatools/not-translated/main.cc @@ -54,13 +54,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_nottranslatedtool, KGenericFactorypluralForm() == KDESpecific ) { - str = QStringList::split( "\\n", item->msgstr().first(), true ); - id = QStringList::split( "\\n", - item->msgid().first().replace( QRegExp(_plurals), ""), true ); + str = TQStringList::split( "\\n", item->msgstr().first(), true ); + id = TQStringList::split( "\\n", + item->msgid().first().replace( TQRegExp(_plurals), ""), true ); } else { str = item->msgstr(); id = item->msgid(); } - for( QStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) { - QString id_str = (*i).replace( QRegExp(_context), ""); - for( QStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) { - QString str_str = (*j); + for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) { + TQString id_str = (*i).replace( TQRegExp(_context), ""); + for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) { + TQString str_str = (*j); hasError = hasError || ( id_str == str_str ); } } diff --git a/kbabel/datatools/not-translated/main.h b/kbabel/datatools/not-translated/main.h index 3b1176e8..c1aeabd8 100644 --- a/kbabel/datatools/not-translated/main.h +++ b/kbabel/datatools/not-translated/main.h @@ -43,13 +43,13 @@ class NotTranslatedTool : public KDataTool Q_OBJECT public: - NotTranslatedTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + NotTranslatedTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: KBabel::Project::Ptr _cache_origin; - QRegExp _context; - QRegExp _plurals; + TQRegExp _context; + TQRegExp _plurals; }; #endif diff --git a/kbabel/datatools/pluralforms/main.cc b/kbabel/datatools/pluralforms/main.cc index 4d275e60..87dfef71 100644 --- a/kbabel/datatools/pluralforms/main.cc +++ b/kbabel/datatools/pluralforms/main.cc @@ -53,13 +53,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_pluraltool, KGenericFactory ( "k using namespace KBabel; -PluralsTool::PluralsTool( QObject* parent, const char* name, const QStringList & ) +PluralsTool::PluralsTool( TQObject* parent, const char* name, const TQStringList & ) : KDataTool( parent, name ), _cache_origin( 0 ), _neededForms(-1) { i18n("what check found errors", "plural forms"); } -bool PluralsTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype ) +bool PluralsTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype ) { if ( command != "validate" ) { @@ -106,7 +106,7 @@ bool PluralsTool::run( const QString& command, void* data, const QString& dataty { hasError = true; } - else if( item->msgstr().first().contains(QString("\\n"))+1 != _neededForms ) + else if( item->msgstr().first().contains(TQString("\\n"))+1 != _neededForms ) { hasError = true; } diff --git a/kbabel/datatools/pluralforms/main.h b/kbabel/datatools/pluralforms/main.h index f2101975..420824d2 100644 --- a/kbabel/datatools/pluralforms/main.h +++ b/kbabel/datatools/pluralforms/main.h @@ -42,11 +42,11 @@ class PluralsTool : public KDataTool Q_OBJECT public: - PluralsTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + PluralsTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: KBabel::Project::Ptr _cache_origin; - QRegExp _plurals; + TQRegExp _plurals; int _neededForms; }; diff --git a/kbabel/datatools/punctuation/main.cc b/kbabel/datatools/punctuation/main.cc index 433d9711..8806b536 100644 --- a/kbabel/datatools/punctuation/main.cc +++ b/kbabel/datatools/punctuation/main.cc @@ -51,14 +51,14 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_punctuationtool, KGenericFactoryisUntranslated()) { - QString lineid=item->msgid().first(); + TQString lineid=item->msgid().first(); // lookup punctuation in original text - QRegExp punc("[\\.!\\?:]+$"); + TQRegExp punc("[\\.!\\?:]+$"); int i = lineid.find(punc); - QString t(""); + TQString t(""); if( i != -1 ) t = lineid.right(lineid.length()-i); if( item->pluralForm() != NoPluralForm ) { // check, that both plural forms contain the same punctuation - QString pl = *(item->msgid().at(1)); + TQString pl = *(item->msgid().at(1)); int j = pl.find(punc); - QString tp(""); + TQString tp(""); if( j != -1 ) tp = pl.right(pl.length()-j); if( tp != t ) @@ -113,14 +113,14 @@ bool PunctuationTool::run( const QString& command, void* data, const QString& da } } - QStringList forms = item->msgstr(true); + TQStringList forms = item->msgstr(true); if( item->pluralForm() == KDESpecific ) { - forms = QStringList::split("\\n",*item->msgstr(true).at(0)); + forms = TQStringList::split("\\n",*item->msgstr(true).at(0)); } - for( QStringList::Iterator form = forms.begin() ; form != forms.end(); form++ ) + for( TQStringList::Iterator form = forms.begin() ; form != forms.end(); form++ ) { - QString linestr=(*form); + TQString linestr=(*form); int j = linestr.find(punc); diff --git a/kbabel/datatools/punctuation/main.h b/kbabel/datatools/punctuation/main.h index 63a36d62..eb30293f 100644 --- a/kbabel/datatools/punctuation/main.h +++ b/kbabel/datatools/punctuation/main.h @@ -40,8 +40,8 @@ class PunctuationTool : public KDataTool Q_OBJECT public: - PunctuationTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + PunctuationTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); }; #endif diff --git a/kbabel/datatools/regexp/main.cc b/kbabel/datatools/regexp/main.cc index a101d5c9..eca0be81 100644 --- a/kbabel/datatools/regexp/main.cc +++ b/kbabel/datatools/regexp/main.cc @@ -27,11 +27,11 @@ #include "main.h" #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -49,16 +49,16 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_regexptool, KGenericFactory ( "kb using namespace KBabel; -RegExpTool::RegExpTool( QObject* parent, const char* name, const QStringList & ) +RegExpTool::RegExpTool( TQObject* parent, const char* name, const TQStringList & ) : KDataTool( parent, name ) { i18n("which check found errors","translation has inconsistent length"); loadExpressions(); if ( ! _error.isNull() ) - KMessageBox::error( (QWidget*)parent, i18n( "Error loading data (%1)" ).arg( _error ) ); + KMessageBox::error( (TQWidget*)parent, i18n( "Error loading data (%1)" ).arg( _error ) ); } -bool RegExpTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype ) +bool RegExpTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype ) { if ( command != "validate" ) { @@ -86,8 +86,8 @@ bool RegExpTool::run( const QString& command, void* data, const QString& datatyp if(!item->isUntranslated()) { ExpressionList::Iterator it( _list.begin() ); ExpressionList::Iterator end( _list.end() ); - QStringList msgs = item->msgstr(); - QStringList results; + TQStringList msgs = item->msgstr(); + TQStringList results; for ( ; it != end; ++it ) { results.clear(); results = msgs.grep( (*it).regExp() ); @@ -110,8 +110,8 @@ bool RegExpTool::run( const QString& command, void* data, const QString& datatyp void RegExpTool::loadExpressions() { // TODO: Change file path - QFile file( QDir::homeDirPath() + "/.kde/share/apps/kbabel/regexplist.xml" ); - QDomDocument doc; + TQFile file( TQDir::homeDirPath() + "/.kde/share/apps/kbabel/regexplist.xml" ); + TQDomDocument doc; if ( ! file.open( IO_ReadOnly ) ) { kdDebug() << "File not found" << endl; @@ -125,10 +125,10 @@ void RegExpTool::loadExpressions() } file.close(); - QDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQDomElement docElem = doc.documentElement(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( !e.isNull() ) elementToExpression( e ); if ( ! _error.isNull() ) @@ -137,10 +137,10 @@ void RegExpTool::loadExpressions() } } -void RegExpTool::elementToExpression( const QDomElement& e ) +void RegExpTool::elementToExpression( const TQDomElement& e ) { - QString name; - QString exp; + TQString name; + TQString exp; bool cs = false; //Expressions are case insensitive by default if ( e.tagName().compare( "item" ) != 0 ) { @@ -148,13 +148,13 @@ void RegExpTool::elementToExpression( const QDomElement& e ) return; } - QDomNode n = e.firstChild(); + TQDomNode n = e.firstChild(); if ( n.isNull() ) { _error = i18n( "First child of 'item' is not a node" ); return; } - QDomElement el = n.toElement(); + TQDomElement el = n.toElement(); if ( el.isNull() || el.tagName().compare( "name" ) != 0 ) { _error = i18n( "Expected tag 'name'" ); return; @@ -175,7 +175,7 @@ void RegExpTool::elementToExpression( const QDomElement& e ) cs = true; kdDebug(KBABEL) << "RegExpTool: Adding expression: " << name << endl; - _list.append( Expression( name, QRegExp( exp, cs ) ) ); + _list.append( Expression( name, TQRegExp( exp, cs ) ) ); } #include "main.moc" diff --git a/kbabel/datatools/regexp/main.h b/kbabel/datatools/regexp/main.h index 4ae8953b..c81f96a0 100644 --- a/kbabel/datatools/regexp/main.h +++ b/kbabel/datatools/regexp/main.h @@ -25,7 +25,7 @@ #define __main_h__ #include -#include +#include class QDomElement; @@ -33,41 +33,41 @@ class Expression { public: Expression() {}; - Expression( const QString& name, const QRegExp& regExp ) + Expression( const TQString& name, const TQRegExp& regExp ) { _name = name; _regExp = regExp; } - const QString& name() const + const TQString& name() const { return _name; } - const QRegExp& regExp() const + const TQRegExp& regExp() const { return _regExp; } private: - QString _name; - QRegExp _regExp; + TQString _name; + TQRegExp _regExp; }; -typedef QValueList ExpressionList; +typedef TQValueList ExpressionList; class RegExpTool : public KDataTool { Q_OBJECT public: - RegExpTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + RegExpTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: void loadExpressions(); - void elementToExpression( const QDomElement& e ); + void elementToExpression( const TQDomElement& e ); ExpressionList _list; - QString _error; + TQString _error; }; #endif diff --git a/kbabel/datatools/setfuzzy/main.cc b/kbabel/datatools/setfuzzy/main.cc index 373560ec..54bbcb57 100644 --- a/kbabel/datatools/setfuzzy/main.cc +++ b/kbabel/datatools/setfuzzy/main.cc @@ -49,12 +49,12 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_setfuzzytool, KGenericFactory ( using namespace KBabel; -SetFuzzyTool::SetFuzzyTool( QObject* parent, const char* name, const QStringList & ) +SetFuzzyTool::SetFuzzyTool( TQObject* parent, const char* name, const TQStringList & ) : KDataTool( parent, name ) { } -bool SetFuzzyTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype ) +bool SetFuzzyTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype ) { if ( command != "allfuzzy" ) { diff --git a/kbabel/datatools/setfuzzy/main.h b/kbabel/datatools/setfuzzy/main.h index 5c86bf15..45e0bc38 100644 --- a/kbabel/datatools/setfuzzy/main.h +++ b/kbabel/datatools/setfuzzy/main.h @@ -40,8 +40,8 @@ class SetFuzzyTool : public KDataTool Q_OBJECT public: - SetFuzzyTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + SetFuzzyTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); }; #endif diff --git a/kbabel/datatools/whitespace/main.cc b/kbabel/datatools/whitespace/main.cc index 882815a5..7bfa50b2 100644 --- a/kbabel/datatools/whitespace/main.cc +++ b/kbabel/datatools/whitespace/main.cc @@ -54,13 +54,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_whitespacetool, KGenericFactoryisUntranslated()) { if( _cache_origin != item->project() ) @@ -102,28 +102,28 @@ bool WhitespaceTool::run( const QString& command, void* data, const QString& dat //Ensure KDE plural forms are in a StringList //FIXME Eliminate context information and this could become a generic message splitter if( item->pluralForm() == KDESpecific ) { - str = QStringList::split( "\\n", item->msgstr().first(), true ); - id = QStringList::split( "\\n", - item->msgid().first().replace( QRegExp(_plurals), ""), true ); + str = TQStringList::split( "\\n", item->msgstr().first(), true ); + id = TQStringList::split( "\\n", + item->msgid().first().replace( TQRegExp(_plurals), ""), true ); } else { str = item->msgstr(); id = item->msgid(); } //Strip equations - id.first().replace( QRegExp(_equation), ""); - str.first().replace( QRegExp(_equation), ""); + id.first().replace( TQRegExp(_equation), ""); + str.first().replace( TQRegExp(_equation), ""); //Ignore Messages with blank msgid components - for( QStringList::Iterator it = id.begin() ; it != id.end() ; it++ ) { - QString resultstring = (*it); + for( TQStringList::Iterator it = id.begin() ; it != id.end() ; it++ ) { + TQString resultstring = (*it); hasIdError = hasIdError || resultstring.contains(_whitespace); } if( hasIdError ) return true; - //Check each QString in the List is not whitespace - for( QStringList::Iterator it = str.begin() ; it != str.end() ; it++ ) { - QString resultstring = (*it); + //Check each TQString in the List is not whitespace + for( TQStringList::Iterator it = str.begin() ; it != str.end() ; it++ ) { + TQString resultstring = (*it); hasStrError = hasStrError || resultstring.contains(_whitespace); } diff --git a/kbabel/datatools/whitespace/main.h b/kbabel/datatools/whitespace/main.h index 2a234457..c8cd373a 100644 --- a/kbabel/datatools/whitespace/main.h +++ b/kbabel/datatools/whitespace/main.h @@ -36,7 +36,7 @@ #include "kbproject.h" -#include +#include #include class WhitespaceTool : public KDataTool @@ -44,12 +44,12 @@ class WhitespaceTool : public KDataTool Q_OBJECT public: - WhitespaceTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + WhitespaceTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: KBabel::Project::Ptr _cache_origin; - QRegExp _plurals; - QRegExp _equation; + TQRegExp _plurals; + TQRegExp _equation; }; #endif diff --git a/kbabel/datatools/xml/main.cc b/kbabel/datatools/xml/main.cc index cae88b4c..3bcf66da 100644 --- a/kbabel/datatools/xml/main.cc +++ b/kbabel/datatools/xml/main.cc @@ -35,7 +35,7 @@ #include "catalogsettings.h" #include "main.h" -#include +#include #include #include @@ -54,13 +54,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xmltool, KGenericFactory ( "kbabelda using namespace KBabel; -XMLTool::XMLTool( QObject* parent, const char* name, const QStringList & ) +XMLTool::XMLTool( TQObject* parent, const char* name, const TQStringList & ) : KDataTool( parent, name ), _cache_origin( 0 ) { i18n( "what check found errors", "XML tags" ); } -bool XMLTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype ) +bool XMLTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype ) { if ( command != "validate" ) { @@ -93,9 +93,9 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype, } uint correctnessLevel = 0; - QString msgid = item->msgid().first(); + TQString msgid = item->msgid().first(); msgid.replace( "\\\"", "\"" ); // Change '\"' to '"' - msgid.replace( QRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); + msgid.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); msgid.replace( _context, "" ); msgid.replace("\n",""); // delete newlines @@ -130,12 +130,12 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype, if(!item->isUntranslated()) { - QStringList str = item->msgstr(true); - for( QStringList::Iterator form = str.begin() ; form != str.end() ; form++ ) + TQStringList str = item->msgstr(true); + for( TQStringList::Iterator form = str.begin() ; form != str.end() ; form++ ) { - QString text=(*form); + TQString text=(*form); text.replace( "\\\"", "\"" ); // Change '\"' to '"' - text.replace( QRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); + text.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); // isNonCaseWithoutCommonCompliant can fail // even though higher level checks works @@ -171,34 +171,34 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype, return FALSE; } -bool XMLTool::isFullyCompliant( const QString& text) +bool XMLTool::isFullyCompliant( const TQString& text) { - QDomDocument doc; + TQDomDocument doc; return doc.setContent("" + text + "" ); } -bool XMLTool::isNonCaseCompliant( const QString& text) +bool XMLTool::isNonCaseCompliant( const TQString& text) { - QDomDocument doc; - QString test = text.lower(); + TQDomDocument doc; + TQString test = text.lower(); return doc.setContent("" + test + "" ); } -bool XMLTool::isNonCaseWithoutCommonCompliant( const QString& text) +bool XMLTool::isNonCaseWithoutCommonCompliant( const TQString& text) { - QDomDocument doc; - QString test = text.lower(); - QRegExp rx( "(
          )|(
          )|(

          )||(<\\w+@(\\w+.)*\\w+>)" ); + TQDomDocument doc; + TQString test = text.lower(); + TQRegExp rx( "(
          )|(


          )|(

          )||(<\\w+@(\\w+.)*\\w+>)" ); test.replace( rx, "" ); - QString a; + TQString a; do { a = test; - test.replace( QRegExp("<[^_:A-Za-z/]"), "" ); + test.replace( TQRegExp("<[^_:A-Za-z/]"), "" ); } while( a!=test); - test.replace( QRegExp("<$"), "" ); + test.replace( TQRegExp("<$"), "" ); return doc.setContent("" + test + "" ); } diff --git a/kbabel/datatools/xml/main.h b/kbabel/datatools/xml/main.h index 357a4f0d..68c06cdb 100644 --- a/kbabel/datatools/xml/main.h +++ b/kbabel/datatools/xml/main.h @@ -35,7 +35,7 @@ #include "kbproject.h" -#include +#include #include class XMLTool : public KDataTool @@ -43,17 +43,17 @@ class XMLTool : public KDataTool Q_OBJECT public: - XMLTool( QObject* parent, const char* name, const QStringList & ); - virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype); + XMLTool( TQObject* parent, const char* name, const TQStringList & ); + virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: - bool isFullyCompliant( const QString& text); - bool isNonCaseCompliant( const QString& text); - bool isNonCaseWithoutCommonCompliant( const QString& text); + bool isFullyCompliant( const TQString& text); + bool isNonCaseCompliant( const TQString& text); + bool isNonCaseWithoutCommonCompliant( const TQString& text); - QMap _levelCache; + TQMap _levelCache; KBabel::Project::Ptr _cache_origin; - QRegExp _context; + TQRegExp _context; }; #endif diff --git a/kbabel/filters/gettext/gettextexport.cpp b/kbabel/filters/gettext/gettextexport.cpp index e951847b..c2fe9c67 100644 --- a/kbabel/filters/gettext/gettextexport.cpp +++ b/kbabel/filters/gettext/gettextexport.cpp @@ -40,8 +40,8 @@ #include "catalogsettings.h" #include "kbprojectsettings.h" -#include -#include +#include +#include #include #include @@ -51,12 +51,12 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_gettextexport, KGenericFactoryimportPluginID() != "GNU gettext") @@ -66,14 +66,14 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr if( mimetype != "application/x-gettext") return UNSUPPORTED_TYPE; - QFile file(localFile); + TQFile file(localFile); if(file.open(IO_WriteOnly)) { int progressRatio = QMAX(100/ QMAX(catalog->numberOfEntries(),1), 1); emit signalResetProgressBar(i18n("saving file"),100); - QTextStream stream(&file); + TQTextStream stream(&file); SaveSettings _saveSettings = catalog->saveSettings(); @@ -86,26 +86,26 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr switch(_saveSettings.encoding) { case ProjectSettingsBase::UTF8: - stream.setCodec(QTextCodec::codecForName("utf-8")); + stream.setCodec(TQTextCodec::codecForName("utf-8")); break; case ProjectSettingsBase::UTF16: - stream.setCodec(QTextCodec::codecForName("utf-16")); + stream.setCodec(TQTextCodec::codecForName("utf-16")); break; default: - stream.setCodec(QTextCodec::codecForLocale()); + stream.setCodec(TQTextCodec::codecForLocale()); break; } } // only save header if it is not empty - const QString headerComment( catalog->header().comment() ); + const TQString headerComment( catalog->header().comment() ); // ### TODO: why is this useful to have a header with an empty msgstr? if( !headerComment.isEmpty() || !catalog->header().msgstr().isEmpty() ) { // write header writeComment( stream, headerComment ); - const QString headerMsgid = catalog->header().msgid().first(); + const TQString headerMsgid = catalog->header().msgid().first(); // Gettext PO files should have an empty msgid as header if ( !headerMsgid.isEmpty() ) @@ -122,7 +122,7 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr stream << "\n"; } - QStringList list; + TQStringList list; for( uint counter = 0; counter < catalog->numberOfEntries() ; counter++ ) { if(counter%10==0) { @@ -132,7 +132,7 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr // write entry writeComment( stream, catalog->comment(counter) ); - const QString msgctxt = catalog->msgctxt(counter); + const TQString msgctxt = catalog->msgctxt(counter); if (! msgctxt.isEmpty() ) { writeKeyword( stream, "msgctxt", msgctxt ); @@ -154,8 +154,8 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr const int forms = catalog->msgstr( counter ).count(); for ( int i = 0; i < forms; ++i ) { - QString keyword ( "msgstr[" ); - keyword += QString::number( i ); + TQString keyword ( "msgstr[" ); + keyword += TQString::number( i ); keyword += ']'; writeKeyword( stream, keyword, *( catalog->msgstr( counter ).at( i ) ) ); @@ -173,9 +173,9 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr if( _saveSettings.saveObsolete ) { - QValueList::ConstIterator oit; + TQValueList::ConstIterator oit; - QStringList _obsolete = catalog->catalogExtraData(); + TQStringList _obsolete = catalog->catalogExtraData(); for( oit = _obsolete.begin(); oit != _obsolete.end(); ++oit ) { @@ -203,7 +203,7 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr return OK; } -void GettextExportPlugin::writeComment( QTextStream& stream, const QString& comment ) const +void GettextExportPlugin::writeComment( TQTextStream& stream, const TQString& comment ) const { if( !comment.isEmpty() ) { @@ -218,13 +218,13 @@ void GettextExportPlugin::writeComment( QTextStream& stream, const QString& comm stream << "\n"; continue; } - const QString span ( ( newpos == -1 ) ? comment.mid( pos ) : comment.mid( pos, newpos-pos ) ); + const TQString span ( ( newpos == -1 ) ? comment.mid( pos ) : comment.mid( pos, newpos-pos ) ); const int len = span.length(); - QString spaces; // Stored leading spaces + TQString spaces; // Stored leading spaces for ( int i = 0 ; i < len ; ++i ) { - const QChar& ch = span[ i ]; + const TQChar& ch = span[ i ]; if ( ch == '#' ) { stream << spaces << span.mid( i ); @@ -252,7 +252,7 @@ void GettextExportPlugin::writeComment( QTextStream& stream, const QString& comm } } -void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyword, const QString& text ) const +void GettextExportPlugin::writeKeyword( TQTextStream& stream, const TQString& keyword, const TQString& text ) const { if ( text.isEmpty() ) { @@ -263,20 +263,20 @@ void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyw else if ( m_wrapWidth == -1 ) { // Traditional KBabel wrapping - QStringList list = QStringList::split( '\n', text ); + TQStringList list = TQStringList::split( '\n', text ); if ( text.startsWith( "\n" ) ) - list.prepend( QString() ); + list.prepend( TQString() ); if(list.isEmpty()) - list.append( QString() ); + list.append( TQString() ); if( list.count() > 1 ) - list.prepend( QString() ); + list.prepend( TQString() ); stream << keyword << " "; - QStringList::const_iterator it; + TQStringList::const_iterator it; for( it = list.constBegin(); it != list.constEnd(); ++it ) { stream << "\"" << (*it) << "\"\n"; @@ -290,7 +290,7 @@ void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyw // No wrapping (like Gettext's --no.wrap or -w0 ) // we need to remove the \n characters, as they are extra characters - QString realText( text ); + TQString realText( text ); realText.remove( '\n' ); stream << keyword << " \"" << realText << "\"\n"; return; @@ -301,7 +301,7 @@ void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyw // From here on, we assume that we have an non-empty text and a positive non-null m_wrapWidth // we need to remove the \n characters, as they are extra characters - QString realText( text ); + TQString realText( text ); realText.remove( '\n' ); bool needFirstEmptyLine = false; diff --git a/kbabel/filters/gettext/gettextexport.h b/kbabel/filters/gettext/gettextexport.h index 81cbe9c4..3c694d1a 100644 --- a/kbabel/filters/gettext/gettextexport.h +++ b/kbabel/filters/gettext/gettextexport.h @@ -35,7 +35,7 @@ #include -#include +#include namespace KBabel { class Catalog; @@ -53,20 +53,20 @@ class QTextCodec; class GettextExportPlugin: public KBabel::CatalogExportPlugin { public: - GettextExportPlugin(QObject* parent, const char* name, const QStringList &); - virtual KBabel::ConversionStatus save(const QString& file, const QString& mimetype, const KBabel::Catalog* catalog); + GettextExportPlugin(TQObject* parent, const char* name, const TQStringList &); + virtual KBabel::ConversionStatus save(const TQString& file, const TQString& mimetype, const KBabel::Catalog* catalog); private: /** * Write a PO comment to @p stream and take care that each comment lines start with a # character */ - void writeComment( QTextStream& stream, const QString& comment ) const; + void writeComment( TQTextStream& stream, const TQString& comment ) const; /** * Write a PO keyword (msgctxt, msgid, msgstr, msgstr_plural, msgstr[0]) and the corresponding text. * This includes wrapping the text. */ - void writeKeyword( QTextStream& stream, const QString& keyword, const QString& text ) const; + void writeKeyword( TQTextStream& stream, const TQString& keyword, const TQString& text ) const; public: /** diff --git a/kbabel/filters/gettext/gettextimport.cpp b/kbabel/filters/gettext/gettextimport.cpp index 3f54301d..9210c1a9 100644 --- a/kbabel/filters/gettext/gettextimport.cpp +++ b/kbabel/filters/gettext/gettextimport.cpp @@ -39,10 +39,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -53,11 +53,11 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_gettextimport, KGenericFactorysize(); // if somethings goes wrong with the parsing, we don't have deleted the old contents CatalogItem tempHeader; - QStringList tempObsolete; + TQStringList tempObsolete; kdDebug(KBABEL) << "start parsing..." << endl; @@ -139,15 +139,15 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin { // The header must have an empty msgid kdWarning(KBABEL) << "Header entry has non-empty msgid. Creating a temporary header! " << _msgid << endl; - tempHeader.setMsgid( QStringList() ); - QStringList tmp; + tempHeader.setMsgid( TQStringList() ); + TQStringList tmp; tmp.append( "Content-Type: text/plain; charset=UTF-8\\n" // Unknown charset "Content-Transfer-Encoding: 8bit\\n" "Mime-Version: 1.0" ); tempHeader.setMsgstr( tmp ); // We keep the comment of the first entry, as it might really be a header comment (at least partially) - const QString comment( "# Header entry was created by KBabel!\n#\n" + _comment ); + const TQString comment( "# Header entry was created by KBabel!\n#\n" + _comment ); tempHeader.setComment( comment ); recoveredErrorInHeader = true; } @@ -167,7 +167,7 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin // now parse the rest of the file uint counter=0; - QValueList errorIndex; + TQValueList errorIndex; bool recoveredError=false; bool docbookFile=false; @@ -289,17 +289,17 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin } } -QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec) +TQTextCodec* GettextImportPlugin::codecForArray(TQByteArray& array, bool* hadCodec) { if(hadCodec) { *hadCodec=false; } - QTextStream stream( array, IO_ReadOnly ); - // ### TODO Qt4: see if it can be done with QByteArray alone, in an encoding-neutral way. + TQTextStream stream( array, IO_ReadOnly ); + // ### TODO Qt4: see if it can be done with TQByteArray alone, in an encoding-neutral way. // Set ISO-8859-1 as it is a relatively neutral encoding when reading (compared to UTF-8 or a random locale encoing) - stream.setEncoding( QTextStream::Latin1 ); + stream.setEncoding( TQTextStream::Latin1 ); // first read header ConversionStatus status = readHeader(stream); @@ -309,19 +309,19 @@ QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec return 0; } - const QString head = _msgstr.first(); + const TQString head = _msgstr.first(); - QRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n"); + TQRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n"); if( regexp.search( head ) == -1 ) { kdDebug(KBABEL) << "no charset entry found" << endl; return 0; } - const QString charset = regexp.cap(1); + const TQString charset = regexp.cap(1); kdDebug(KBABEL) << "charset: " << charset << endl; - QTextCodec* codec=0; + TQTextCodec* codec=0; if(!charset.isEmpty()) { @@ -333,14 +333,14 @@ QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec if(hadCodec) *hadCodec=false; - codec=QTextCodec::codecForName("utf8"); + codec=TQTextCodec::codecForName("utf8"); kdDebug(KBABEL) - << QString("file seems to be a template: using utf-8 encoding.") + << TQString("file seems to be a template: using utf-8 encoding.") << endl; } else { - codec=QTextCodec::codecForName(charset.latin1()); + codec=TQTextCodec::codecForName(charset.latin1()); if(hadCodec) *hadCodec=true; } @@ -360,7 +360,7 @@ QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec return codec; } -ConversionStatus GettextImportPlugin::readHeader(QTextStream& stream) +ConversionStatus GettextImportPlugin::readHeader(TQTextStream& stream) { CatalogItem temp; int filePos=stream.device()->at(); @@ -380,25 +380,25 @@ ConversionStatus GettextImportPlugin::readHeader(QTextStream& stream) return PARSE_ERROR; } -ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) +ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream) { //kdDebug( KBABEL ) << k_funcinfo << " START" << endl; enum {Begin,Comment,Msgctxt,Msgid,Msgstr} part=Begin; - QString line; + TQString line; bool error=false; bool recoverableError=false; bool seenMsgctxt=false; _msgstr.clear(); - _msgstr.append(QString()); + _msgstr.append(TQString()); _msgid.clear(); - _msgid.append(QString()); - _msgctxt=QString(); - _comment=QString(); + _msgid.append(TQString()); + _msgctxt=TQString(); + _comment=TQString(); _gettextPluralForm=false; _obsolete=false; - QStringList::Iterator msgstrIt=_msgstr.begin(); + TQStringList::Iterator msgstrIt=_msgstr.begin(); while( !stream.eof() ) { @@ -439,34 +439,34 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) part=Comment; _comment=line; } - else if(line.find(QRegExp("^msgctxt\\s*\".*\"$")) != -1) + else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1) { part=Msgctxt; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgctxt\\s*\"")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgctxt\\s*\"")); + line.remove(TQRegExp("\"$")); _msgctxt=line; seenMsgctxt=true; } - else if(line.find(QRegExp("^msgid\\s*\".*\"$")) != -1) + else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1) { part=Msgid; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgid\\s*\"")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgid\\s*\"")); + line.remove(TQRegExp("\"$")); (*(_msgid).begin())=line; } // one of the quotation marks is missing - else if(line.find(QRegExp("^msgid\\s*\"?.*\"?$")) != -1) + else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1) { part=Msgid; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgid\\s*\"?")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgid\\s*\"?")); + line.remove(TQRegExp("\"$")); (*(_msgid).begin())=line; @@ -494,34 +494,34 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) { _comment+=("\n"+line); } - else if(line.find(QRegExp("^msgctxt\\s*\".*\"$")) != -1) + else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1) { part=Msgctxt; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgctxt\\s*\"")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgctxt\\s*\"")); + line.remove(TQRegExp("\"$")); _msgctxt=line; seenMsgctxt=true; } - else if(line.find(QRegExp("^msgid\\s*\".*\"$")) != -1) + else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1) { part=Msgid; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgid\\s*\"")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgid\\s*\"")); + line.remove(TQRegExp("\"$")); (*(_msgid).begin())=line; } // one of the quotation marks is missing - else if(line.find(QRegExp("^msgid\\s*\"?.*\"?$")) != -1) + else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1) { part=Msgid; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgid\\s*\"?")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgid\\s*\"?")); + line.remove(TQRegExp("\"$")); (*(_msgid).begin())=line; @@ -539,11 +539,11 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) { if(line.isEmpty()) continue; - else if(line.find(QRegExp("^\".*\\n?\"$")) != -1) + else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1) { // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^\"")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^\"")); + line.remove(TQRegExp("\"$")); // add Msgctxt line to item if(_msgctxt.isEmpty()) @@ -551,24 +551,24 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) else _msgctxt+=("\n"+line); } - else if(line.find(QRegExp("^msgid\\s*\".*\"$")) != -1) + else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1) { part=Msgid; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgid\\s*\"")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgid\\s*\"")); + line.remove(TQRegExp("\"$")); (*(_msgid).begin())=line; } // one of the quotation marks is missing - else if(line.find(QRegExp("^msgid\\s*\"?.*\"?$")) != -1) + else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1) { part=Msgid; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgid\\s*\"?")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgid\\s*\"?")); + line.remove(TQRegExp("\"$")); (*(_msgid).begin())=line; @@ -586,13 +586,13 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) { if(line.isEmpty()) continue; - else if(line.find(QRegExp("^\".*\\n?\"$")) != -1) + else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1) { // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^\"")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^\"")); + line.remove(TQRegExp("\"$")); - QStringList::Iterator it; + TQStringList::Iterator it; if(_gettextPluralForm) it = _msgid.fromLast(); else @@ -604,26 +604,26 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) else (*it)+=("\n"+line); } - else if(line.find(QRegExp("^msgid_plural\\s*\".*\"$")) != -1) + else if(line.find(TQRegExp("^msgid_plural\\s*\".*\"$")) != -1) { part=Msgid; _gettextPluralForm = true; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgid_plural\\s*\"")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgid_plural\\s*\"")); + line.remove(TQRegExp("\"$")); _msgid.append(line); } // one of the quotation marks is missing - else if(line.find(QRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1) + else if(line.find(TQRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1) { part=Msgid; _gettextPluralForm = true; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgid_plural\\s*\"?")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgid_plural\\s*\"?")); + line.remove(TQRegExp("\"$")); _msgid.append(line); @@ -631,24 +631,24 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) recoverableError=true; } else if(!_gettextPluralForm - && (line.find(QRegExp("^msgstr\\s*\".*\\n?\"$")) != -1)) + && (line.find(TQRegExp("^msgstr\\s*\".*\\n?\"$")) != -1)) { part=Msgstr; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgstr\\s*\"?")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgstr\\s*\"?")); + line.remove(TQRegExp("\"$")); (*msgstrIt)=line; } else if(!_gettextPluralForm - && line.find(QRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1) + && line.find(TQRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1) { part=Msgstr; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgstr\\s*\"?")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgstr\\s*\"?")); + line.remove(TQRegExp("\"$")); (*msgstrIt)=line; @@ -656,24 +656,24 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) recoverableError=true; } else if( _gettextPluralForm - && (line.find(QRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1)) + && (line.find(TQRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1)) { part=Msgstr; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgstr\\[0\\]\\s*\"?")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgstr\\[0\\]\\s*\"?")); + line.remove(TQRegExp("\"$")); (*msgstrIt)=line; } else if( _gettextPluralForm - && (line.find(QRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1)) + && (line.find(TQRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1)) { part=Msgstr; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgstr\\[0\\]\\s*\"?")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgstr\\[0\\]\\s*\"?")); + line.remove(TQRegExp("\"$")); (*msgstrIt)=line; @@ -694,15 +694,15 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) break; } // a line of the msgid with a missing quotation mark - else if(line.find(QRegExp("^\"?.+\\n?\"?$")) != -1) + else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1) { recoverableError=true; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^\"")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^\"")); + line.remove(TQRegExp("\"$")); - QStringList::Iterator it; + TQStringList::Iterator it; if( _gettextPluralForm ) it = _msgid.fromLast(); else @@ -726,11 +726,11 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) if(line.isEmpty()) continue; // another line of the msgstr - else if(line.find(QRegExp("^\".*\\n?\"$")) != -1) + else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1) { // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^\"")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^\"")); + line.remove(TQRegExp("\"$")); if((*msgstrIt).isEmpty()) (*msgstrIt)=line; @@ -738,27 +738,27 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) (*msgstrIt)+=("\n"+line); } else if( _gettextPluralForm - && (line.find(QRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1)) + && (line.find(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1)) { // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgstr\\[[0-9]+\\]\\s*\"?")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\"?")); + line.remove(TQRegExp("\"$")); msgstrIt=_msgstr.append(line); } else if( _gettextPluralForm - && (line.find(QRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1)) + && (line.find(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1)) { // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^msgstr\\[[0-9]\\]\\s*\"?")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?")); + line.remove(TQRegExp("\"$")); msgstrIt=_msgstr.append(line); if(!line.isEmpty()) recoverableError=true; } - else if((line.find(QRegExp("^\\s*msgid")) != -1) || (line.find(QRegExp("^\\s*#")) != -1)) + else if((line.find(TQRegExp("^\\s*msgid")) != -1) || (line.find(TQRegExp("^\\s*#")) != -1)) { // We have read successfully one entry, so end loop. stream.device()->at(pos);// reset position in stream to beginning of this line @@ -771,13 +771,13 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) break; } // another line of the msgstr with a missing quotation mark - else if(line.find(QRegExp("^\"?.+\\n?\"?$")) != -1) + else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1) { recoverableError=true; // remove quotes at beginning and the end of the lines - line.remove(QRegExp("^\"")); - line.remove(QRegExp("\"$")); + line.remove(TQRegExp("^\"")); + line.remove(TQRegExp("\"$")); if((*msgstrIt).isEmpty()) (*msgstrIt)=line; @@ -800,7 +800,7 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream) << "msgid:\n" << _msgid.first() << "\n" << "msgid_plural:\n" << _msgid.last() << "\n" << endl; int counter=0; - for(QStringList::Iterator it = _msgstr.begin(); it != _msgstr.end(); ++it) + for(TQStringList::Iterator it = _msgstr.begin(); it != _msgstr.end(); ++it) { kdDebug(KBABEL) << "msgstr[" << counter << "]:\n" << (*it) << endl; diff --git a/kbabel/filters/gettext/gettextimport.h b/kbabel/filters/gettext/gettextimport.h index e28ec790..dc84e404 100644 --- a/kbabel/filters/gettext/gettextimport.h +++ b/kbabel/filters/gettext/gettextimport.h @@ -35,7 +35,7 @@ #include -#include +#include class KURL; class QFile; @@ -49,20 +49,20 @@ class QTextCodec; class GettextImportPlugin: public KBabel::CatalogImportPlugin { public: - GettextImportPlugin(QObject* parent, const char* name, const QStringList &); - virtual KBabel::ConversionStatus load(const QString& file, const QString& mimetype); - virtual const QString id() { return "GNU gettext"; } + GettextImportPlugin(TQObject* parent, const char* name, const TQStringList &); + virtual KBabel::ConversionStatus load(const TQString& file, const TQString& mimetype); + virtual const TQString id() { return "GNU gettext"; } private: - QTextCodec* codecForArray(QByteArray& arary, bool* hadCodec); - KBabel::ConversionStatus readHeader(QTextStream& stream); - KBabel::ConversionStatus readEntry(QTextStream& stream); + TQTextCodec* codecForArray(TQByteArray& arary, bool* hadCodec); + KBabel::ConversionStatus readHeader(TQTextStream& stream); + KBabel::ConversionStatus readEntry(TQTextStream& stream); // description of the last read entry - QString _msgctxt; - QStringList _msgid; - QStringList _msgstr; - QString _comment; + TQString _msgctxt; + TQStringList _msgid; + TQStringList _msgstr; + TQString _comment; bool _gettextPluralForm; bool _obsolete; }; diff --git a/kbabel/filters/linguist/linguistexport.cpp b/kbabel/filters/linguist/linguistexport.cpp index 3b69e20a..af0a3298 100644 --- a/kbabel/filters/linguist/linguistexport.cpp +++ b/kbabel/filters/linguist/linguistexport.cpp @@ -36,11 +36,11 @@ **************************************************************************** */ -#include -#include "qregexp.h" -#include -#include -#include +#include +#include "tqregexp.h" +#include +#include +#include #include @@ -53,25 +53,25 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_linguistexport, KGenericFactoryimportPluginID( ) != "Qt translation source" ) return UNSUPPORTED_TYPE; - QFile file( filename ); + TQFile file( filename ); if ( !file.open( IO_WriteOnly ) ) return OS_ERROR; SaveSettings settings = catalog->saveSettings( ); // New DOM document. - QDomDocument doc( "TS" ); + TQDomDocument doc( "TS" ); // Create the root element. doc.appendChild( doc.createElement( "TS" ) ); @@ -82,36 +82,36 @@ ConversionStatus LinguistExportPlugin::save( const QString& filename, const QStr // Regular messages. for ( uint i = 0; i < catalog->numberOfEntries( ); i++ ) { - QString comment( extractComment( doc, catalog->comment( i ), fuzzy ) ); + TQString comment( extractComment( doc, catalog->comment( i ), fuzzy ) ); createMessage( doc, catalog->msgid( i ).join( "" ), catalog->msgstr( i ).join( "" ), comment, false, fuzzy ); } // Obsolete messages. if ( settings.saveObsolete ) { - QValueList obsMessages = catalog->obsoleteEntries( ); - QValueList::Iterator it; + TQValueList obsMessages = catalog->obsoleteEntries( ); + TQValueList::Iterator it; for ( it = obsMessages.begin( ); it != obsMessages.end( ); ++it ) { - QString comment( extractComment( doc, (*it).comment( ), fuzzy ) ); + TQString comment( extractComment( doc, (*it).comment( ), fuzzy ) ); createMessage( doc, (*it).msgid( true ).join( "" ), (*it).msgstr( true ).join( "" ), comment, true, fuzzy ); } } - QTextStream stream( &file ); + TQTextStream stream( &file ); doc.save( stream, 2 ); file.close( ); return OK; } -const QString LinguistExportPlugin::extractComment( QDomDocument& doc, const QString& s, bool& fuzzy ) +const TQString LinguistExportPlugin::extractComment( TQDomDocument& doc, const TQString& s, bool& fuzzy ) { fuzzy = false; - QString comment( s ); + TQString comment( s ); if ( !comment.isEmpty( ) ) { // Extract the context and the actual comment. - comment.remove( QRegExp( "^Context:[\\s]*" ) ); + comment.remove( TQRegExp( "^Context:[\\s]*" ) ); /* * HACK * @@ -129,28 +129,28 @@ const QString LinguistExportPlugin::extractComment( QDomDocument& doc, const QSt comment.remove("#, fuzzy"); } - QString newContext; + TQString newContext; pos = comment.find( '\n' ); if ( pos >= 0 ) { newContext = comment.left( pos ); - comment.replace( 0, pos + 1, "" ); // ### TODO: use QString::remove + comment.replace( 0, pos + 1, "" ); // ### TODO: use TQString::remove } else { newContext = comment; - comment = ""; // ### TODO: use QString() instead of "" + comment = ""; // ### TODO: use TQString() instead of "" } setContext( doc, newContext ); } return comment; } -void LinguistExportPlugin::createMessage( QDomDocument& doc, const QString& msgid, - const QString& msgstr, const QString& comment, +void LinguistExportPlugin::createMessage( TQDomDocument& doc, const TQString& msgid, + const TQString& msgstr, const TQString& comment, const bool obsolete, const bool fuzzy ) { - QDomElement elem; - QDomText text; + TQDomElement elem; + TQDomText text; - QDomElement messageElement = doc.createElement( "message" ); + TQDomElement messageElement = doc.createElement( "message" ); elem = doc.createElement( "source" ); text = doc.createTextNode( msgid ); @@ -179,17 +179,17 @@ void LinguistExportPlugin::createMessage( QDomDocument& doc, const QString& msgi contextElement.appendChild( messageElement ); } -void LinguistExportPlugin::setContext( QDomDocument& doc, QString newContext ) +void LinguistExportPlugin::setContext( TQDomDocument& doc, TQString newContext ) { // Nothing to do here. if ( newContext == context ) return; - // Find out whether there is already such a context in the QDomDocument. - QDomNode node = doc.documentElement( ).firstChild( ); + // Find out whether there is already such a context in the TQDomDocument. + TQDomNode node = doc.documentElement( ).firstChild( ); while ( !node.isNull( ) ) { if ( node.isElement( ) ) { - QDomElement elem = node.firstChild( ).toElement( ); + TQDomElement elem = node.firstChild( ).toElement( ); if ( elem.isElement( ) && elem.tagName( ) == "name" && elem.text( ) == newContext ) { // We found the context. context = newContext; @@ -205,8 +205,8 @@ void LinguistExportPlugin::setContext( QDomDocument& doc, QString newContext ) contextElement = doc.createElement( "context" ); doc.documentElement( ).appendChild( contextElement ); // Appropriate name element. - QDomElement nameElement = doc.createElement( "name" ); - QDomText text = doc.createTextNode( newContext ); + TQDomElement nameElement = doc.createElement( "name" ); + TQDomText text = doc.createTextNode( newContext ); nameElement.appendChild( text ); contextElement.appendChild( nameElement ); // Store new context. diff --git a/kbabel/filters/linguist/linguistexport.h b/kbabel/filters/linguist/linguistexport.h index 3201f95f..2ad80bd7 100644 --- a/kbabel/filters/linguist/linguistexport.h +++ b/kbabel/filters/linguist/linguistexport.h @@ -37,7 +37,7 @@ #ifndef LINGUISTEXPORT_H #define LINGUISTEXPORT_H -#include +#include #include "catalogfileplugin.h" @@ -51,18 +51,18 @@ class Catalog; class LinguistExportPlugin : public KBabel::CatalogExportPlugin { public: - LinguistExportPlugin( QObject * parent, const char * name, const QStringList& ); - virtual KBabel::ConversionStatus save( const QString& filename, const QString& mimetype, const KBabel::Catalog * catalog ); + LinguistExportPlugin( TQObject * parent, const char * name, const TQStringList& ); + virtual KBabel::ConversionStatus save( const TQString& filename, const TQString& mimetype, const KBabel::Catalog * catalog ); private: - const QString extractComment( QDomDocument& doc, const QString& s, bool& fuzzy ); - void createMessage( QDomDocument& doc, const QString& msgid, const QString& msgstr, - const QString& comment, const bool obsolete, const bool fuzzy ); - void setContext( QDomDocument& doc, QString newContext ); + const TQString extractComment( TQDomDocument& doc, const TQString& s, bool& fuzzy ); + void createMessage( TQDomDocument& doc, const TQString& msgid, const TQString& msgstr, + const TQString& comment, const bool obsolete, const bool fuzzy ); + void setContext( TQDomDocument& doc, TQString newContext ); private: - QString context; - QDomElement contextElement; + TQString context; + TQDomElement contextElement; }; #endif // LINGUISTEXPORT_H diff --git a/kbabel/filters/linguist/linguistimport.cpp b/kbabel/filters/linguist/linguistimport.cpp index 220c0634..a1870bd7 100644 --- a/kbabel/filters/linguist/linguistimport.cpp +++ b/kbabel/filters/linguist/linguistimport.cpp @@ -38,12 +38,12 @@ **************************************************************************** */ // Qt include files -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // KDE include files #include #include @@ -55,19 +55,19 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_linguistimport, KGenericFactory +#include #include "catalogfileplugin.h" @@ -50,19 +50,19 @@ class QStringList; class LinguistImportPlugin : public KBabel::CatalogImportPlugin { public: - LinguistImportPlugin( QObject * parent, const char * name, const QStringList& ); + LinguistImportPlugin( TQObject * parent, const char * name, const TQStringList& ); - virtual KBabel::ConversionStatus load( const QString& filename, const QString& mimetype ); - virtual const QString id( ) { return "Qt translation source"; } + virtual KBabel::ConversionStatus load( const TQString& filename, const TQString& mimetype ); + virtual const TQString id( ) { return "Qt translation source"; } private: - void parse( const QDomElement& parentElement ); + void parse( const TQDomElement& parentElement ); private: uint msgcnt; uint cnt; - QString context; - //QStringList obsMessages; + TQString context; + //TQStringList obsMessages; }; #endif // LINGUISTIMPORT_H diff --git a/kbabel/filters/xliff/xliffexport.cpp b/kbabel/filters/xliff/xliffexport.cpp index 53527f2c..9400b9c6 100644 --- a/kbabel/filters/xliff/xliffexport.cpp +++ b/kbabel/filters/xliff/xliffexport.cpp @@ -36,11 +36,11 @@ **************************************************************************** */ -#include -#include "qregexp.h" -#include -#include -#include +#include +#include "tqregexp.h" +#include +#include +#include #include @@ -53,25 +53,25 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xliffexport, KGenericFactoryimportPluginID( ) != "XLIFF 1.1" ) return UNSUPPORTED_TYPE; - QFile file( filename ); + TQFile file( filename ); if ( !file.open( IO_WriteOnly ) ) return OS_ERROR; SaveSettings settings = catalog->saveSettings( ); // New DOM document. - QDomDocument doc( "" ); + TQDomDocument doc( "" ); extraData = catalog->catalogExtraData(); kdDebug () << "Setting the document data: " << extraData.first () << endl; @@ -79,20 +79,20 @@ ConversionStatus XLIFFExportPlugin::save( const QString& filename, const QString // Regular messages. for ( uint i = 0; i < catalog->numberOfEntries( ); i++ ) { - QDomElement element = extractComment( doc, *(extraData.at( i+1 )) ); + TQDomElement element = extractComment( doc, *(extraData.at( i+1 )) ); createMessage( doc, element, catalog->msgid( i ).join( "" ), catalog->msgstr( i ).join( "" ) ); } - QTextStream stream( &file ); + TQTextStream stream( &file ); doc.save( stream, 2 ); file.close( ); return OK; } -QDomElement XLIFFExportPlugin::extractComment( QDomDocument& doc, const QString& s ) +TQDomElement XLIFFExportPlugin::extractComment( TQDomDocument& doc, const TQString& s ) { - QString comment( s ); + TQString comment( s ); if ( comment.isEmpty () ) { @@ -100,27 +100,27 @@ QDomElement XLIFFExportPlugin::extractComment( QDomDocument& doc, const QString& } // Extract the context and the actual comment. - comment.remove( QRegExp( "^Context:[\\s]*" ) ); - QString newContext; - QStringList commentlines = QStringList::split ( '\n', comment); + comment.remove( TQRegExp( "^Context:[\\s]*" ) ); + TQString newContext; + TQStringList commentlines = TQStringList::split ( '\n', comment); - QString file = *(commentlines.at(0)); - QString id = *(commentlines.at(1)); + TQString file = *(commentlines.at(0)); + TQString id = *(commentlines.at(1)); kdDebug () << "Looking for file " << file << endl; return getContext( doc, file, id ); } -void XLIFFExportPlugin::createMessage( QDomDocument& doc, QDomElement& translationElement, const QString& msgid, - const QString& msgstr ) +void XLIFFExportPlugin::createMessage( TQDomDocument& doc, TQDomElement& translationElement, const TQString& msgid, + const TQString& msgstr ) { // for empty messages, don't store anything if (msgstr.isEmpty ()) return; // find the trans element - QDomNode node = translationElement.firstChild( ); + TQDomNode node = translationElement.firstChild( ); while ( !node.isNull( ) ) { kdDebug () << node.nodeName () << endl; if ( node.isElement() && node.toElement().tagName( ) == "target") { @@ -139,16 +139,16 @@ void XLIFFExportPlugin::createMessage( QDomDocument& doc, QDomElement& translati node = doc.createElement ("target"); translationElement.appendChild (node); - QDomText data = doc.createTextNode(msgstr ); + TQDomText data = doc.createTextNode(msgstr ); node.appendChild( data ); } } -QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& file, const QString& id ) +TQDomElement XLIFFExportPlugin::getContext( TQDomDocument& doc, const TQString& file, const TQString& id ) { - // Find out whether there is already such a context in the QDomDocument. - QDomNode parentelem = doc.documentElement(); - QDomNode elem = doc.documentElement( ).firstChild( ); + // Find out whether there is already such a context in the TQDomDocument. + TQDomNode parentelem = doc.documentElement(); + TQDomNode elem = doc.documentElement( ).firstChild( ); while ( !elem.isNull( ) ) { if ( elem.isElement( ) && elem.toElement().tagName( ) == "file" && elem.toElement().attribute ("original") == file ) { kdDebug () << "We have found the file" << endl; @@ -160,7 +160,7 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil if (elem.isNull ()) { kdError () << "File not found at all, creating" << endl; - QDomElement newelem = doc.createElement ("file"); + TQDomElement newelem = doc.createElement ("file"); newelem.setAttribute ("original", file); parentelem.appendChild (newelem); elem = newelem; @@ -180,7 +180,7 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil if (elem.isNull ()) { kdError () << "File body not found at all, creating" << endl; - QDomElement newelem = doc.createElement ("body"); + TQDomElement newelem = doc.createElement ("body"); parentelem.appendChild (newelem); elem = newelem; } @@ -190,7 +190,7 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil if (elem.isNull ()) { kdError () << "Trans-unit not found at all, creating" << endl; - QDomElement newelem = doc.createElement ("trans-unit"); + TQDomElement newelem = doc.createElement ("trans-unit"); newelem.setAttribute ("id", id); parentelem.appendChild (newelem); elem = newelem; @@ -199,16 +199,16 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil return elem.toElement (); } -QDomElement XLIFFExportPlugin::findTransUnit( QDomNode& group, const QString& id ) +TQDomElement XLIFFExportPlugin::findTransUnit( TQDomNode& group, const TQString& id ) { - QDomNode elem = group.firstChild( ); + TQDomNode elem = group.firstChild( ); // lookup correct trans-unit tag while ( !elem.isNull( ) ) { if ( elem.isElement( ) && elem.toElement().tagName() == "group" ) { // search recursively - QDomElement res = findTransUnit( elem, id ); + TQDomElement res = findTransUnit( elem, id ); if (! res.isNull () ) return res.toElement(); } diff --git a/kbabel/filters/xliff/xliffexport.h b/kbabel/filters/xliff/xliffexport.h index 5bf64b25..2e720b82 100644 --- a/kbabel/filters/xliff/xliffexport.h +++ b/kbabel/filters/xliff/xliffexport.h @@ -37,7 +37,7 @@ #ifndef XLIFFEXPORT_H #define XLIFFEXPORT_H -#include +#include #include "catalogfileplugin.h" @@ -51,16 +51,16 @@ class Catalog; class XLIFFExportPlugin : public KBabel::CatalogExportPlugin { public: - XLIFFExportPlugin( QObject * parent, const char * name, const QStringList& ); - virtual KBabel::ConversionStatus save( const QString& filename, const QString& mimetype, const KBabel::Catalog * catalog ); + XLIFFExportPlugin( TQObject * parent, const char * name, const TQStringList& ); + virtual KBabel::ConversionStatus save( const TQString& filename, const TQString& mimetype, const KBabel::Catalog * catalog ); private: - QDomElement extractComment( QDomDocument& doc, const QString& s ); - void createMessage( QDomDocument& doc, QDomElement& context, const QString& msgid, const QString& msgstr ); - QDomElement getContext( QDomDocument& doc, const QString& file, const QString& id); - QDomElement findTransUnit( QDomNode& doc, const QString& id); + TQDomElement extractComment( TQDomDocument& doc, const TQString& s ); + void createMessage( TQDomDocument& doc, TQDomElement& context, const TQString& msgid, const TQString& msgstr ); + TQDomElement getContext( TQDomDocument& doc, const TQString& file, const TQString& id); + TQDomElement findTransUnit( TQDomNode& doc, const TQString& id); - QStringList extraData; + TQStringList extraData; }; #endif // XLIFFEXPORT_H diff --git a/kbabel/filters/xliff/xliffimport.cpp b/kbabel/filters/xliff/xliffimport.cpp index f7de63ce..25f34ec3 100644 --- a/kbabel/filters/xliff/xliffimport.cpp +++ b/kbabel/filters/xliff/xliffimport.cpp @@ -48,12 +48,12 @@ */ // Qt include files -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // KDE include files #include #include @@ -68,19 +68,19 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xliffimport, KGenericFactory +#include #include "catalogfileplugin.h" @@ -50,19 +50,19 @@ class QStringList; class XLIFFImportPlugin : public KBabel::CatalogImportPlugin { public: - XLIFFImportPlugin( QObject * parent, const char * name, const QStringList& ); + XLIFFImportPlugin( TQObject * parent, const char * name, const TQStringList& ); - virtual KBabel::ConversionStatus load( const QString& filename, const QString& mimetype ); - virtual const QString id( ) { return "XLIFF 1.1"; } + virtual KBabel::ConversionStatus load( const TQString& filename, const TQString& mimetype ); + virtual const TQString id( ) { return "XLIFF 1.1"; } private: - void parse( const QDomElement& parentElement ); + void parse( const TQDomElement& parentElement ); private: uint msgcnt; uint cnt; - QString context; - QStringList extraData; + TQString context; + TQStringList extraData; }; #endif // XLIFFIMPORT_H diff --git a/kbabel/kbabel/charselectview.cpp b/kbabel/kbabel/charselectview.cpp index 12cd765f..2e58b084 100644 --- a/kbabel/kbabel/charselectview.cpp +++ b/kbabel/kbabel/charselectview.cpp @@ -33,11 +33,11 @@ #include "charselectview.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -49,24 +49,24 @@ using namespace KBabel; -CharacterSelectorView::CharacterSelectorView(KBCatalog* catalog,QWidget *parent, Project::Ptr project) +CharacterSelectorView::CharacterSelectorView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project) : KBCatalogView(catalog,parent,project) { - QVBoxLayout* layout = new QVBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + TQVBoxLayout* layout = new TQVBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); layout->setSpacing( KDialog::spacingHint() ); - QHBox* bar = new QHBox(this); + TQHBox* bar = new TQHBox(this); bar->setSpacing( KDialog::spacingHint() ); layout->addWidget (bar); - QLabel *lTable = new QLabel( i18n( "Table:" ), bar ); - _tableNum = new QSpinBox( 0, 255, 1, bar ); + TQLabel *lTable = new TQLabel( i18n( "Table:" ), bar ); + _tableNum = new TQSpinBox( 0, 255, 1, bar ); lTable->setBuddy( _tableNum ); bar->setStretchFactor( _tableNum, 1 ); - QScrollView* scroll = new QScrollView( this ); + TQScrollView* scroll = new TQScrollView( this ); _table = new KCharSelectTable(scroll,"charselector","helvetica",' ',0); _table->setNumCols(16); _table->setNumRows(16); @@ -74,13 +74,13 @@ CharacterSelectorView::CharacterSelectorView(KBCatalog* catalog,QWidget *parent, scroll->addChild(_table); layout->addWidget (scroll); - connect( _table, SIGNAL( doubleClicked() ), this, SLOT( emitChar() ) ); - connect( _tableNum, SIGNAL( valueChanged(int) ), this, SLOT( setTab(int) )); + connect( _table, TQT_SIGNAL( doubleClicked() ), this, TQT_SLOT( emitChar() ) ); + connect( _tableNum, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( setTab(int) )); - connect( _catalog, SIGNAL( signalFileOpened(bool) ), this, SLOT (setDisabled (bool))); - connect( _catalog, SIGNAL( signalFileOpened(bool) ), _table, SLOT (setDisabled (bool))); + connect( _catalog, TQT_SIGNAL( signalFileOpened(bool) ), this, TQT_SLOT (setDisabled (bool))); + connect( _catalog, TQT_SIGNAL( signalFileOpened(bool) ), _table, TQT_SLOT (setDisabled (bool))); - QWhatsThis::add(this, + TQWhatsThis::add(this, i18n("

          Character Selector

          " "

          This tool allows to insert special characters using " "double click.

          ")); @@ -101,7 +101,7 @@ void CharacterSelectorView::saveSettings(KConfig* config) KConfigGroupSaver saver(config, "KBCharSelector" ); config->writeEntry( "TableNum", _tableNum->value() ); - config->writeEntry( "SelectedChar", QString(_table->chr()) ); + config->writeEntry( "SelectedChar", TQString(_table->chr()) ); } void CharacterSelectorView::restoreSettings(KConfig* config) diff --git a/kbabel/kbabel/charselectview.h b/kbabel/kbabel/charselectview.h index 76ee19b8..7b0fa8a5 100644 --- a/kbabel/kbabel/charselectview.h +++ b/kbabel/kbabel/charselectview.h @@ -45,7 +45,7 @@ public: /** * Default constructor */ - CharacterSelectorView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project); + CharacterSelectorView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project); void saveSettings(KConfig* config); void restoreSettings(KConfig* config); @@ -55,7 +55,7 @@ public slots: virtual void updateView() {} signals: - void characterDoubleClicked( QChar ch ); + void characterDoubleClicked( TQChar ch ); public slots: void emitChar(); @@ -65,7 +65,7 @@ private slots: private: KCharSelectTable* _table; - QSpinBox* _tableNum; + TQSpinBox* _tableNum; }; #endif // CHARSELECTVIEW_H diff --git a/kbabel/kbabel/commentview.cpp b/kbabel/kbabel/commentview.cpp index bf2301de..57d838b9 100644 --- a/kbabel/kbabel/commentview.cpp +++ b/kbabel/kbabel/commentview.cpp @@ -35,11 +35,11 @@ #include "commentview.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -62,12 +62,12 @@ using namespace KBabel; -CommentView::CommentView(KBCatalog* catalog,QWidget *parent, Project::Ptr project) +CommentView::CommentView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project) : KBCatalogView(catalog,parent, project) { setAcceptDrops(true); - QVBoxLayout* layout=new QVBoxLayout(this); + TQVBoxLayout* layout=new TQVBoxLayout(this); commentEdit = new MsgMultiLineEdit(0, 0, this); commentEdit->setMinimumHeight(50); @@ -75,16 +75,16 @@ CommentView::CommentView(KBCatalog* catalog,QWidget *parent, Project::Ptr projec commentEdit->setHighlightSyntax(false); KCursor::setAutoHideCursor(commentEdit,true); - QLabel* label=new QLabel(commentEdit,i18n("&Comment:"),this); + TQLabel* label=new TQLabel(commentEdit,i18n("&Comment:"),this); - QHBoxLayout* hb=new QHBoxLayout(layout); + TQHBoxLayout* hb=new TQHBoxLayout(layout); hb->addSpacing(KDialog::marginHint()); hb->addWidget(label); layout->addWidget(commentEdit); layout->setStretchFactor(commentEdit,1); - QWhatsThis::add(this, + TQWhatsThis::add(this, i18n("

          Comment Editor

          \n\ This edit window shows you the comments of the currently displayed message.

          \n\

          The comments normally contain information about where the message is found in the source\n\ @@ -94,12 +94,12 @@ Hints from other translators are also sometimes contained in comments.

          \n\ Options->Show Comments.

          ")); commentEdit->setReadOnly(true); - connect(commentEdit,SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,SLOT(forwardCommentEditCmd(KBabel::EditCommand*))); + connect(commentEdit,TQT_SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,TQT_SLOT(forwardCommentEditCmd(KBabel::EditCommand*))); - connect(commentEdit,SIGNAL(cursorPositionChanged(int,int)) - , this, SIGNAL(signalCursorPosChanged(int,int))); + connect(commentEdit,TQT_SIGNAL(cursorPositionChanged(int,int)) + , this, TQT_SIGNAL(signalCursorPosChanged(int,int))); - connect(_catalog, SIGNAL(signalFileOpened(bool)), this, SLOT(setDisabled(bool))); + connect(_catalog, TQT_SIGNAL(signalFileOpened(bool)), this, TQT_SLOT(setDisabled(bool))); } void CommentView::update(EditCommand* cmd, bool undo) @@ -178,7 +178,7 @@ void CommentView::readFileSettings() setReadOnly( _catalog->isReadOnly() ); } -const QString CommentView::selectText(int from, int to) +const TQString CommentView::selectText(int from, int to) { int line, col, endline, endcol; @@ -203,12 +203,12 @@ int CommentView::currentIndex () return commentEdit->currentIndex (); } -const QString CommentView::selectedText () +const TQString CommentView::selectedText () { return commentEdit->selectedText (); } -void CommentView::installEventFilter( const QObject * filterObj ) +void CommentView::installEventFilter( const TQObject * filterObj ) { commentEdit->installEventFilter( filterObj ); } diff --git a/kbabel/kbabel/commentview.h b/kbabel/kbabel/commentview.h index 1531683b..6d637add 100644 --- a/kbabel/kbabel/commentview.h +++ b/kbabel/kbabel/commentview.h @@ -35,7 +35,7 @@ class QTextView; -#include +#include #include "kbcatalogview.h" #include "kbcatalog.h" @@ -51,7 +51,7 @@ public: /** * Default constructor */ - CommentView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project); + CommentView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project); /** * this is called from the catalog when updating his views. @@ -67,13 +67,13 @@ public: virtual void textSelectAll (); virtual void textDeselectAll (); - const QString selectText( int from, int to ); - const QString selectedText (); + const TQString selectText( int from, int to ); + const TQString selectedText (); bool isActiveView (); int currentIndex (); // this method is not virtual! - void installEventFilter( const QObject * filterObj ); + void installEventFilter( const TQObject * filterObj ); bool hasFocus (); diff --git a/kbabel/kbabel/contextview.cpp b/kbabel/kbabel/contextview.cpp index e56e15dc..264d4e84 100644 --- a/kbabel/kbabel/contextview.cpp +++ b/kbabel/kbabel/contextview.cpp @@ -35,9 +35,9 @@ #include "contextview.h" -#include -#include -#include +#include +#include +#include #include #include @@ -47,19 +47,19 @@ using namespace KBabel; -ContextView::ContextView(KBCatalog* catalog,QWidget *parent, Project::Ptr project) +ContextView::ContextView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project) : KBCatalogView(catalog,parent,project) { - QVBoxLayout* layout = new QVBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + TQVBoxLayout* layout = new TQVBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); - _textview = new QTextView (this, "context textview"); + _textview = new TQTextView (this, "context textview"); KCursor::setAutoHideCursor(_textview->viewport(),true); _textview->setReadOnly(true); layout->addWidget (_textview); - QWhatsThis::add(this, + TQWhatsThis::add(this, i18n("

          PO Context

          " "

          This window shows the context of the current message " "in the PO file. Normally it shows four messages in front " @@ -67,7 +67,7 @@ ContextView::ContextView(KBCatalog* catalog,QWidget *parent, Project::Ptr projec "

          You can hide the tools window by deactivating " "Options->Show Tools.

          ")); - connect(_catalog, SIGNAL(signalFileOpened(bool)), this, SLOT(setDisabled(bool))); + connect(_catalog, TQT_SIGNAL(signalFileOpened(bool)), this, TQT_SLOT(setDisabled(bool))); } void ContextView::updateView() @@ -76,7 +76,7 @@ void ContextView::updateView() if(total==0) return; - QString text; + TQString text; uint startIndex; uint context = 4; if(_currentIndex < context) @@ -100,24 +100,24 @@ void ContextView::updateView() continue; } - QString entry; - QString temp; + TQString entry; + TQString temp; temp = _catalog->comment(i); if(!temp.isEmpty()) { - temp = QStyleSheet::convertFromPlainText(temp); - temp.replace(QRegExp("^

          "),""); - temp.replace(QRegExp("

          $"),""); + temp = TQStyleSheet::convertFromPlainText(temp); + temp.replace(TQRegExp("^

          "),""); + temp.replace(TQRegExp("

          $"),""); entry += ""+temp+"
          "; } // FIXME: should care about plural forms - temp = QStyleSheet::convertFromPlainText(_catalog->msgid(i).first()); - temp.replace(QRegExp("^

          "),""); - temp.replace(QRegExp("

          $"),""); + temp = TQStyleSheet::convertFromPlainText(_catalog->msgid(i).first()); + temp.replace(TQRegExp("^

          "),""); + temp.replace(TQRegExp("

          $"),""); entry += temp + "
          ---
          "; - QStringList tempList = _catalog->msgstr(i); + TQStringList tempList = _catalog->msgstr(i); if(tempList.isEmpty()) { @@ -135,14 +135,14 @@ void ContextView::updateView() { uint counter = 1; temp = ""; - for( QStringList::Iterator i=tempList.begin() ; i != tempList.end() ; ++i) + for( TQStringList::Iterator i=tempList.begin() ; i != tempList.end() ; ++i) { temp += i18n("Plural %1: %2\n").arg(counter++).arg(*i); } } - temp = QStyleSheet::convertFromPlainText(temp); - temp.replace(QRegExp("^

          "),""); - temp.replace(QRegExp("

          $"),""); + temp = TQStyleSheet::convertFromPlainText(temp); + temp.replace(TQRegExp("^

          "),""); + temp.replace(TQRegExp("

          $"),""); entry += temp+"
          "; } diff --git a/kbabel/kbabel/contextview.h b/kbabel/kbabel/contextview.h index 18bd0f4e..f51d3767 100644 --- a/kbabel/kbabel/contextview.h +++ b/kbabel/kbabel/contextview.h @@ -44,13 +44,13 @@ public: /** * Default constructor */ - ContextView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project); + ContextView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project); public slots: virtual void updateView(); private: - QTextView* _textview; + TQTextView* _textview; }; #endif // CONTEXTVIEW_H diff --git a/kbabel/kbabel/errorlistview.cpp b/kbabel/kbabel/errorlistview.cpp index 2dcd3b12..c49c7940 100644 --- a/kbabel/kbabel/errorlistview.cpp +++ b/kbabel/kbabel/errorlistview.cpp @@ -35,9 +35,9 @@ #include "errorlistview.h" -#include -#include -#include +#include +#include +#include #include #include @@ -47,19 +47,19 @@ using namespace KBabel; -ErrorListView::ErrorListView(KBCatalog* catalog,QWidget *parent, Project::Ptr project) +ErrorListView::ErrorListView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project) : KBCatalogView(catalog,parent,project) { - QVBoxLayout* layout = new QVBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + TQVBoxLayout* layout = new TQVBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); - _textview = new QTextView (this); + _textview = new TQTextView (this); KCursor::setAutoHideCursor(_textview->viewport(),true); _textview->setReadOnly(true); layout->addWidget(_textview); - QWhatsThis::add(this, i18n( "

          Error List

          " + TQWhatsThis::add(this, i18n( "

          Error List

          " "

          This window shows the list of errors found by validator tools " "so you can know why the current message has been marked with an " "error.

          " ) ); diff --git a/kbabel/kbabel/errorlistview.h b/kbabel/kbabel/errorlistview.h index d50e7ec7..cb1886c9 100644 --- a/kbabel/kbabel/errorlistview.h +++ b/kbabel/kbabel/errorlistview.h @@ -43,13 +43,13 @@ public: /** * Default constructor */ - ErrorListView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project); + ErrorListView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project); public slots: virtual void updateView(); private: - QTextView* _textview; + TQTextView* _textview; }; #endif // ERRORLISTVIEW_H diff --git a/kbabel/kbabel/gotodialog.cpp b/kbabel/kbabel/gotodialog.cpp index f822f0dc..b08b0098 100644 --- a/kbabel/kbabel/gotodialog.cpp +++ b/kbabel/kbabel/gotodialog.cpp @@ -31,16 +31,16 @@ **************************************************************************** */ -#include +#include #include #include #include "gotodialog.h" -GotoDialog::GotoDialog(int max,QWidget* parent) +GotoDialog::GotoDialog(int max,TQWidget* parent) : KDialogBase(parent,0,true,i18n("Go to Entry"),Ok|Cancel) { - QGroupBox* box=new QGroupBox(1,Qt::Horizontal,i18n("Go to Entry"),this); + TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,i18n("Go to Entry"),this); _spinBox= new KIntSpinBox(1,max,1,1,10,box); setMainWidget(box); diff --git a/kbabel/kbabel/gotodialog.h b/kbabel/kbabel/gotodialog.h index 4c8378d8..4c033973 100644 --- a/kbabel/kbabel/gotodialog.h +++ b/kbabel/kbabel/gotodialog.h @@ -38,14 +38,14 @@ #endif #include -#include +#include class KIntSpinBox; class GotoDialog : public KDialogBase { public: - GotoDialog(int max, QWidget* parent); + GotoDialog(int max, TQWidget* parent); virtual ~GotoDialog(); /** reimplemented to select contents when shown*/ diff --git a/kbabel/kbabel/headereditor.cpp b/kbabel/kbabel/headereditor.cpp index 55ad4eb5..2f686652 100644 --- a/kbabel/kbabel/headereditor.cpp +++ b/kbabel/kbabel/headereditor.cpp @@ -49,13 +49,13 @@ using namespace KBabel; HeaderEditor::HeaderEditor(Catalog* cat,const char* name) - : KDialogBase((QWidget*)0,name,false,QString::null, Ok|Cancel|Default|User1) + : KDialogBase((TQWidget*)0,name,false,TQString::null, Ok|Cancel|Default|User1) { restoreSettings(); _catalog=cat; - connect(_catalog,SIGNAL(signalFileOpened(bool)),this,SLOT(readHeader(bool))); - connect(_catalog,SIGNAL(signalHeaderChanged()),this,SLOT(updateHeader())); + connect(_catalog,TQT_SIGNAL(signalFileOpened(bool)),this,TQT_SLOT(readHeader(bool))); + connect(_catalog,TQT_SIGNAL(signalHeaderChanged()),this,TQT_SLOT(updateHeader())); setButtonText(User1,i18n("&Apply Settings")); setButtonWhatsThis (User1, i18n("

          This button " @@ -97,7 +97,7 @@ void HeaderEditor::restoreSettings() KConfigGroupSaver saver(config, "HeaderEditor" ); - QSize defaultSize(350,250); + TQSize defaultSize(350,250); _editorSize = config->readSizeEntry("Size", &defaultSize ); } @@ -133,7 +133,7 @@ void HeaderEditor::slotUser1() if(error) { - QString msg=i18n("

          This is not a valid header.

          \n" + TQString msg=i18n("

          This is not a valid header.

          \n" "

          Please edit the header before updating!

          "); KMessageBox::sorry(this,msg); @@ -160,7 +160,7 @@ void HeaderEditor::slotCancel() { updateHeader(); - QDialog::reject(); + TQDialog::reject(); } void HeaderEditor::slotOk() @@ -169,7 +169,7 @@ void HeaderEditor::slotOk() { if(!isValid()) { - QString msg=i18n("

          This is not a valid header.

          \n" + TQString msg=i18n("

          This is not a valid header.

          \n" "

          Please edit the header before updating.

          "); switch(KMessageBox::warningYesNo(this,msg,i18n("Warning"),KStdGuiItem::discard(),i18n("Edit"))) @@ -192,15 +192,15 @@ void HeaderEditor::slotOk() _catalog->setHeader(header); } - QDialog::accept(); + TQDialog::accept(); } bool HeaderEditor::isValid() { // check the comments - QStringList comments = QStringList::split('\n',_editor->commentEdit->text()); + TQStringList comments = TQStringList::split('\n',_editor->commentEdit->text()); - for( QStringList::Iterator it = comments.begin(); it != comments.end(); ++it ) + for( TQStringList::Iterator it = comments.begin(); it != comments.end(); ++it ) { if( !(*it).startsWith("#") ) { diff --git a/kbabel/kbabel/headereditor.h b/kbabel/kbabel/headereditor.h index 9fb9d6fb..88dda5ee 100644 --- a/kbabel/kbabel/headereditor.h +++ b/kbabel/kbabel/headereditor.h @@ -79,7 +79,7 @@ private: KBabel::Catalog* _catalog; HeaderWidget* _editor; - QSize _editorSize; + TQSize _editorSize; }; #endif // HEADEREDITOR_H diff --git a/kbabel/kbabel/hidingmsgedit.cpp b/kbabel/kbabel/hidingmsgedit.cpp index f18f8b81..60a62da4 100644 --- a/kbabel/kbabel/hidingmsgedit.cpp +++ b/kbabel/kbabel/hidingmsgedit.cpp @@ -31,18 +31,18 @@ #include "mymultilineedit.h" #include "editcmd.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include using namespace KBabel; -HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter, KSpell* spell, QWidget *parent, const char *name ) : - QWidgetStack(parent,name) +HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, TQWidget* eventFilter, KSpell* spell, TQWidget *parent, const char *name ) : + TQWidgetStack(parent,name) , _singleEdit(0) , _multipleEdit(0) , _eventFilter(eventFilter) @@ -54,8 +54,8 @@ HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter, KSpell* _allEdits.clear(); setNumberOfPlurals( _numberOfPlurals ); - connect( _multipleEdit, SIGNAL(currentChanged( QWidget* )), - this, SLOT( newCurrentMultiple( QWidget* ))); + connect( _multipleEdit, TQT_SIGNAL(currentChanged( TQWidget* )), + this, TQT_SLOT( newCurrentMultiple( TQWidget* ))); showSingle(); } @@ -63,7 +63,7 @@ HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter, KSpell* HidingMsgEdit::~HidingMsgEdit(){ } -void HidingMsgEdit::setText(QStringList texts, QString msgctxt){ +void HidingMsgEdit::setText(TQStringList texts, TQString msgctxt){ if( texts.count() == 0 ) { kdWarning() << "HidingMsgEdit::setText with empty text" << endl; @@ -84,7 +84,7 @@ void HidingMsgEdit::setText(QStringList texts, QString msgctxt){ { if( _numberOfPlurals ) { - QStringList::iterator text = texts.begin(); + TQStringList::iterator text = texts.begin(); uint i; for( i=0 ; i < _numberOfPlurals && text!= texts.end() ; i++, text++ ) { @@ -172,12 +172,12 @@ void HidingMsgEdit::setNumberOfPlurals( uint numberOfPlurals ) if( _eventFilter ) _singleEdit->installEventFilter(_eventFilter); - _multipleEdit = new QTabWidget( this ); + _multipleEdit = new TQTabWidget( this ); MsgMultiLineEdit* pl; for(uint i=0 ; i< _numberOfPlurals ; i++) { - pl = new MsgMultiLineEdit( i, _spell, _multipleEdit, QString("multipleEdit %1").arg(i).local8Bit()); + pl = new MsgMultiLineEdit( i, _spell, _multipleEdit, TQString("multipleEdit %1").arg(i).local8Bit()); _allEdits.append(pl); _multipleEdit->addTab( pl, i18n("Plural %1").arg(i+1)); if( _eventFilter ) @@ -189,12 +189,12 @@ void HidingMsgEdit::setNumberOfPlurals( uint numberOfPlurals ) for( MsgMultiLineEdit* e = _allEdits.first() ; e ; e = _allEdits.next() ) { - connect( e, SIGNAL( signalUndoCmd( KBabel::EditCommand* )), - this, SIGNAL( signalUndoCmd( KBabel::EditCommand* ))); - connect( e, SIGNAL( textChanged() ) , this, SIGNAL( textChanged() )); - connect( e, SIGNAL( textChanged() ) , this, SLOT( emitTextChanged() )); - connect( e, SIGNAL( cursorPositionChanged( int, int )), - this, SLOT( emitCursorPositionChanged( int, int )) ); + connect( e, TQT_SIGNAL( signalUndoCmd( KBabel::EditCommand* )), + this, TQT_SIGNAL( signalUndoCmd( KBabel::EditCommand* ))); + connect( e, TQT_SIGNAL( textChanged() ) , this, TQT_SIGNAL( textChanged() )); + connect( e, TQT_SIGNAL( textChanged() ) , this, TQT_SLOT( emitTextChanged() )); + connect( e, TQT_SIGNAL( cursorPositionChanged( int, int )), + this, TQT_SLOT( emitCursorPositionChanged( int, int )) ); } showPlurals( plurals ); @@ -213,7 +213,7 @@ uint HidingMsgEdit::currentForm() else return _multipleEdit->currentPageIndex(); } -void HidingMsgEdit::newCurrentMultiple( QWidget* widget ) +void HidingMsgEdit::newCurrentMultiple( TQWidget* widget ) { _currentEdit = dynamic_cast(widget); emit currentFormChanged ( _multipleEdit->currentPageIndex () ); @@ -278,7 +278,7 @@ void HidingMsgEdit::setQuotes(bool on) } } -void HidingMsgEdit::setBgColor( const QColor& color) +void HidingMsgEdit::setBgColor( const TQColor& color) { for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() ) { @@ -286,8 +286,8 @@ void HidingMsgEdit::setBgColor( const QColor& color) } } -void HidingMsgEdit::setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor - , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor) +void HidingMsgEdit::setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor + , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor) { for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() ) { @@ -328,7 +328,7 @@ void HidingMsgEdit::setHighlightBg( bool on ) } } -void HidingMsgEdit::setContextMenu( QPopupMenu *menu ) +void HidingMsgEdit::setContextMenu( TQPopupMenu *menu ) { for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() ) { @@ -351,10 +351,10 @@ bool HidingMsgEdit::hasFocus () if( e->hasFocus() ) return true; } - return _multipleEdit->hasFocus() || QWidgetStack::hasFocus(); + return _multipleEdit->hasFocus() || TQWidgetStack::hasFocus(); } -void HidingMsgEdit::setDiffColors(const QColor& addColor, const QColor& delColor) +void HidingMsgEdit::setDiffColors(const TQColor& addColor, const TQColor& delColor) { for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() ) { @@ -378,7 +378,7 @@ void HidingMsgEdit::setDiffDisplayMode(bool underlineAdded, bool strikeOutDelete } } -void HidingMsgEdit::setFont(const QFont& font) +void HidingMsgEdit::setFont(const TQFont& font) { for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() ) { diff --git a/kbabel/kbabel/hidingmsgedit.h b/kbabel/kbabel/hidingmsgedit.h index 38e5d750..226f6e2d 100644 --- a/kbabel/kbabel/hidingmsgedit.h +++ b/kbabel/kbabel/hidingmsgedit.h @@ -30,9 +30,9 @@ #ifndef HIDINGMSGEDIT_H #define HIDINGMSGEDIT_H -#include -#include -#include +#include +#include +#include #include "mymultilineedit.h" @@ -49,10 +49,10 @@ namespace KBabel *@author Stanislav Visnovsky */ -class HidingMsgEdit : public QWidgetStack { +class HidingMsgEdit : public TQWidgetStack { Q_OBJECT public: - HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter=0, KSpell* spell=0, QWidget *parent=0, const char *name=0); + HidingMsgEdit(uint numberOfPlurals, TQWidget* eventFilter=0, KSpell* spell=0, TQWidget *parent=0, const char *name=0); ~HidingMsgEdit(); void setNumberOfPlurals(uint numberOfPlurals); @@ -64,7 +64,7 @@ public: bool isOverwriteMode() const { return _currentEdit->isOverwriteMode(); } bool isModified(); bool hasSelectedText() const { return _currentEdit->hasSelectedText(); } - QString selectedText () const { return _currentEdit->selectedText(); } + TQString selectedText () const { return _currentEdit->selectedText(); } void processCommand(KBabel::EditCommand* cmd, bool undo=false); void offset2Pos(int offset, int &row, int &col) const { return _currentEdit->offset2Pos(offset, row, col ); } @@ -74,25 +74,25 @@ public: { return _currentEdit->currentIndex(); } int beginOfLastMarkedText() const { return _currentEdit->beginOfLastMarkedText(); } - virtual void setFont ( const QFont & ); + virtual void setFont ( const TQFont & ); void setCurrentColor(const MsgMultiLineEdit::TextColor color); bool spacePoints() const { return _currentEdit->spacePoints(); } void setSpacePoints(bool on); bool quotes() const { return _currentEdit->quotes(); } void setQuotes(bool on); - void setBgColor( const QColor& color); + void setBgColor( const TQColor& color); bool highlightBg() const { return _currentEdit->highlightBg(); } bool highlightSyntax() const { return _currentEdit->highlightSyntax(); } - void setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor - , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor); + void setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor + , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor); int beginOfMarkedText() { return _currentEdit->beginOfMarkedText(); } - virtual void insertAt ( const QString & s, int line, int col, bool mark = false ) + virtual void insertAt ( const TQString & s, int line, int col, bool mark = false ) { _currentEdit->insertAt( s, line, col, mark ); } void setDiffMode(bool on); void setDiffDisplayMode(bool underlineAdded, bool strikeOutDeleted); - void setDiffColors(const QColor& addColor, const QColor& delColor); - QString text(int para) { return _currentEdit->text(para); } + void setDiffColors(const TQColor& addColor, const TQColor& delColor); + TQString text(int para) { return _currentEdit->text(para); } void setSpellChecker(KSpell* spell); @@ -101,7 +101,7 @@ public: // reiplemented to return correct value bool hasFocus (); public slots: // Public slots - void setText(QStringList texts, QString msgctxt = QString::null); + void setText(TQStringList texts, TQString msgctxt = TQString::null); void showSingle(); void showMultiple(); void showPlurals( bool on ); @@ -125,12 +125,12 @@ public slots: // Public slots virtual void selectAll(bool select=true) { _currentEdit->selectAll(select); } virtual void setCursorPosition ( int para, int index ) { _currentEdit->setCursorPosition(para,index); } - virtual void setContextMenu( QPopupMenu *menu ); + virtual void setContextMenu( TQPopupMenu *menu ); signals: void signalUndoCmd(KBabel::EditCommand*); void textChanged(); - void textChanged(const QString&); + void textChanged(const TQString&); void cursorPositionChanged ( int para, int pos ); void currentFormChanged ( uint form ); @@ -139,7 +139,7 @@ private slots: void emitTextChanged(); // invoked if TabWidget changes the shown widget - void newCurrentMultiple( QWidget * ); + void newCurrentMultiple( TQWidget * ); // invoked by inner cursorPositionChanged() to transform line/col for wrapping void emitCursorPositionChanged( int para, int pos ); @@ -147,15 +147,15 @@ private: // Private attributes /** Used for editting non-plural messages */ MsgMultiLineEdit* _singleEdit; /** Used for editting plural forms */ - QTabWidget* _multipleEdit; - QWidget* _eventFilter; + TQTabWidget* _multipleEdit; + TQWidget* _eventFilter; MsgMultiLineEdit* _currentEdit; - QPtrList _allEdits; + TQPtrList _allEdits; uint _numberOfPlurals; - QGuardedPtr _spell; + TQGuardedPtr _spell; }; #endif diff --git a/kbabel/kbabel/kbabel.cpp b/kbabel/kbabel/kbabel.cpp index cae7bf77..0c3c897d 100644 --- a/kbabel/kbabel/kbabel.cpp +++ b/kbabel/kbabel/kbabel.cpp @@ -48,15 +48,15 @@ #include "taglistview.h" #include "sourceview.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -108,19 +108,19 @@ using namespace KBabel; -QPtrList KBabelMW::prefDialogs; +TQPtrList KBabelMW::prefDialogs; class MyKProgress: public KProgress { public: - MyKProgress( QWidget *parent, const char *name ) : KProgress( parent, name ) + MyKProgress( TQWidget *parent, const char *name ) : KProgress( parent, name ) { - setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred ); + setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred ); } - QSize sizeHint() const { return QSize( 1, 1);} + TQSize sizeHint() const { return TQSize( 1, 1);} }; -KBabelMW::KBabelMW(QString projectFile) +KBabelMW::KBabelMW(TQString projectFile) : KDockMainWindow (), m_charselectorview(0) { if ( projectFile.isEmpty() ) @@ -138,7 +138,7 @@ KBabelMW::KBabelMW(QString projectFile) init(catalog); } -KBabelMW::KBabelMW(KBCatalog* catalog, QString projectFile) +KBabelMW::KBabelMW(KBCatalog* catalog, TQString projectFile) : KDockMainWindow (), m_charselectorview(0) { if ( projectFile.isEmpty() ) @@ -170,9 +170,9 @@ void KBabelMW::init(KBCatalog* catalog) _prefDialog=0; prefDialogs.setAutoDelete(true); - _statusbarTimer = new QTimer(this, "statusbartimer"); - connect(_statusbarTimer,SIGNAL(timeout()),this - ,SLOT(clearStatusbarMsg())); + _statusbarTimer = new TQTimer(this, "statusbartimer"); + connect(_statusbarTimer,TQT_SIGNAL(timeout()),this + ,TQT_SLOT(clearStatusbarMsg())); // FIXME: Q_ASSERT(_project); @@ -193,87 +193,87 @@ void KBabelMW::init(KBCatalog* catalog) stateChanged( "fileopened" , StateReverse ); stateChanged( "readonly", StateNoReverse ); - QPopupMenu* popup; - popup = (QPopupMenu*)(factory()->container("rmb_edit", this)); + TQPopupMenu* popup; + popup = (TQPopupMenu*)(factory()->container("rmb_edit", this)); if(popup) { m_view->setRMBEditMenu(popup); } - popup = (QPopupMenu*)(factory()->container("rmb_search", this)); + popup = (TQPopupMenu*)(factory()->container("rmb_search", this)); if(popup) { m_view->setRMBSearchMenu(popup); } - connect(catalog,SIGNAL(signalUndoAvailable(bool)),this - ,SLOT(enableUndo(bool))); - connect(catalog,SIGNAL(signalRedoAvailable(bool)),this - ,SLOT(enableRedo(bool))); - connect(catalog,SIGNAL(signalNumberOfFuzziesChanged(uint)),this - ,SLOT(setNumberOfFuzzies(uint))); - connect(catalog,SIGNAL(signalNumberOfUntranslatedChanged(uint)),this - ,SLOT(setNumberOfUntranslated(uint))); - connect(catalog,SIGNAL(signalTotalNumberChanged(uint)),this - ,SLOT(setNumberOfTotal(uint))); - connect(catalog,SIGNAL(signalProgress(int)),_progressBar,SLOT(setProgress(int))); - connect(catalog,SIGNAL(signalClearProgressBar()),this,SLOT(clearProgressBar())); - connect(catalog,SIGNAL(signalResetProgressBar(QString,int)) - ,this,SLOT(prepareProgressBar(QString,int))); - connect(catalog,SIGNAL(signalFileOpened(bool)),this,SLOT(enableDefaults(bool))); - connect(catalog,SIGNAL(signalFileOpened(bool)),m_view,SLOT(newFileOpened(bool))); - connect(catalog,SIGNAL(signalModified(bool)),this,SLOT(showModified(bool))); + connect(catalog,TQT_SIGNAL(signalUndoAvailable(bool)),this + ,TQT_SLOT(enableUndo(bool))); + connect(catalog,TQT_SIGNAL(signalRedoAvailable(bool)),this + ,TQT_SLOT(enableRedo(bool))); + connect(catalog,TQT_SIGNAL(signalNumberOfFuzziesChanged(uint)),this + ,TQT_SLOT(setNumberOfFuzzies(uint))); + connect(catalog,TQT_SIGNAL(signalNumberOfUntranslatedChanged(uint)),this + ,TQT_SLOT(setNumberOfUntranslated(uint))); + connect(catalog,TQT_SIGNAL(signalTotalNumberChanged(uint)),this + ,TQT_SLOT(setNumberOfTotal(uint))); + connect(catalog,TQT_SIGNAL(signalProgress(int)),_progressBar,TQT_SLOT(setProgress(int))); + connect(catalog,TQT_SIGNAL(signalClearProgressBar()),this,TQT_SLOT(clearProgressBar())); + connect(catalog,TQT_SIGNAL(signalResetProgressBar(TQString,int)) + ,this,TQT_SLOT(prepareProgressBar(TQString,int))); + connect(catalog,TQT_SIGNAL(signalFileOpened(bool)),this,TQT_SLOT(enableDefaults(bool))); + connect(catalog,TQT_SIGNAL(signalFileOpened(bool)),m_view,TQT_SLOT(newFileOpened(bool))); + connect(catalog,TQT_SIGNAL(signalModified(bool)),this,TQT_SLOT(showModified(bool))); // allow the view to change the statusbar and caption - connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)), - this, SLOT(changeStatusbar(const QString&))); - connect(m_view, SIGNAL(signalChangeCaption(const QString&)), - this, SLOT(changeCaption(const QString&))); - connect(m_view,SIGNAL(signalFirstDisplayed(bool, bool)),this - ,SLOT(firstEntryDisplayed(bool, bool))); - connect(m_view,SIGNAL(signalLastDisplayed(bool, bool)),this - ,SLOT(lastEntryDisplayed(bool, bool))); - connect(m_view,SIGNAL(signalFuzzyDisplayed(bool)),this - ,SLOT(fuzzyDisplayed(bool))); - connect(m_view,SIGNAL(signalUntranslatedDisplayed(bool)),this - ,SLOT(untranslatedDisplayed(bool))); - connect(m_view,SIGNAL(signalFaultyDisplayed(bool)),this - ,SLOT(faultyDisplayed(bool))); - connect(m_view,SIGNAL(signalDisplayed(const KBabel::DocPosition&)),this - ,SLOT(displayedEntryChanged(const KBabel::DocPosition&))); - connect(m_view,SIGNAL(signalFuzzyAfterwards(bool)),this - ,SLOT(hasFuzzyAfterwards(bool))); - connect(m_view,SIGNAL(signalFuzzyInFront(bool)),this - ,SLOT(hasFuzzyInFront(bool))); - connect(m_view,SIGNAL(signalUntranslatedAfterwards(bool)),this - ,SLOT(hasUntranslatedAfterwards(bool))); - connect(m_view,SIGNAL(signalUntranslatedInFront(bool)),this - ,SLOT(hasUntranslatedInFront(bool))); - connect(m_view,SIGNAL(signalErrorAfterwards(bool)),this - ,SLOT(hasErrorAfterwards(bool))); - connect(m_view,SIGNAL(signalErrorInFront(bool)),this - ,SLOT(hasErrorInFront(bool))); - connect(m_view,SIGNAL(signalBackHistory(bool)),this - ,SLOT(enableBackHistory(bool))); - connect(m_view,SIGNAL(signalForwardHistory(bool)),this - ,SLOT(enableForwardHistory(bool))); - - - connect(m_view,SIGNAL(ledColorChanged(const QColor&)),this - ,SLOT(setLedColor(const QColor&))); - - - connect(m_view,SIGNAL(signalSearchActive(bool)),this,SLOT(enableStop(bool))); - - connect(m_view,SIGNAL(signalProgress(int)),_progressBar,SLOT(setProgress(int))); - connect(m_view,SIGNAL(signalClearProgressBar()),this,SLOT(clearProgressBar())); - connect(m_view,SIGNAL(signalResetProgressBar(QString,int)) - ,this,SLOT(prepareProgressBar(QString,int))); - - connect(m_view,SIGNAL(signalDictionariesChanged()) - , this, SLOT(buildDictMenus())); - connect(m_view,SIGNAL(signalCursorPosChanged(int,int)), this - , SLOT(updateCursorPosition(int,int))); + connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)), + this, TQT_SLOT(changeStatusbar(const TQString&))); + connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)), + this, TQT_SLOT(changeCaption(const TQString&))); + connect(m_view,TQT_SIGNAL(signalFirstDisplayed(bool, bool)),this + ,TQT_SLOT(firstEntryDisplayed(bool, bool))); + connect(m_view,TQT_SIGNAL(signalLastDisplayed(bool, bool)),this + ,TQT_SLOT(lastEntryDisplayed(bool, bool))); + connect(m_view,TQT_SIGNAL(signalFuzzyDisplayed(bool)),this + ,TQT_SLOT(fuzzyDisplayed(bool))); + connect(m_view,TQT_SIGNAL(signalUntranslatedDisplayed(bool)),this + ,TQT_SLOT(untranslatedDisplayed(bool))); + connect(m_view,TQT_SIGNAL(signalFaultyDisplayed(bool)),this + ,TQT_SLOT(faultyDisplayed(bool))); + connect(m_view,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&)),this + ,TQT_SLOT(displayedEntryChanged(const KBabel::DocPosition&))); + connect(m_view,TQT_SIGNAL(signalFuzzyAfterwards(bool)),this + ,TQT_SLOT(hasFuzzyAfterwards(bool))); + connect(m_view,TQT_SIGNAL(signalFuzzyInFront(bool)),this + ,TQT_SLOT(hasFuzzyInFront(bool))); + connect(m_view,TQT_SIGNAL(signalUntranslatedAfterwards(bool)),this + ,TQT_SLOT(hasUntranslatedAfterwards(bool))); + connect(m_view,TQT_SIGNAL(signalUntranslatedInFront(bool)),this + ,TQT_SLOT(hasUntranslatedInFront(bool))); + connect(m_view,TQT_SIGNAL(signalErrorAfterwards(bool)),this + ,TQT_SLOT(hasErrorAfterwards(bool))); + connect(m_view,TQT_SIGNAL(signalErrorInFront(bool)),this + ,TQT_SLOT(hasErrorInFront(bool))); + connect(m_view,TQT_SIGNAL(signalBackHistory(bool)),this + ,TQT_SLOT(enableBackHistory(bool))); + connect(m_view,TQT_SIGNAL(signalForwardHistory(bool)),this + ,TQT_SLOT(enableForwardHistory(bool))); + + + connect(m_view,TQT_SIGNAL(ledColorChanged(const TQColor&)),this + ,TQT_SLOT(setLedColor(const TQColor&))); + + + connect(m_view,TQT_SIGNAL(signalSearchActive(bool)),this,TQT_SLOT(enableStop(bool))); + + connect(m_view,TQT_SIGNAL(signalProgress(int)),_progressBar,TQT_SLOT(setProgress(int))); + connect(m_view,TQT_SIGNAL(signalClearProgressBar()),this,TQT_SLOT(clearProgressBar())); + connect(m_view,TQT_SIGNAL(signalResetProgressBar(TQString,int)) + ,this,TQT_SLOT(prepareProgressBar(TQString,int))); + + connect(m_view,TQT_SIGNAL(signalDictionariesChanged()) + , this, TQT_SLOT(buildDictMenus())); + connect(m_view,TQT_SIGNAL(signalCursorPosChanged(int,int)), this + , TQT_SLOT(updateCursorPosition(int,int))); if(!catalog->currentURL().isEmpty()) { @@ -292,18 +292,18 @@ void KBabelMW::init(KBCatalog* catalog) mailer = new KBabelMailer( this, _project ); - bmHandler = new KBabelBookmarkHandler((QPopupMenu*)factory()->container("bookmark", this)); + bmHandler = new KBabelBookmarkHandler((TQPopupMenu*)factory()->container("bookmark", this)); // the earlier created KAction for "clear_bookmarks" is now reconnected KAction* action = actionCollection()->action("clear_bookmarks"); if (action) { - action->disconnect(SIGNAL(activated())); - connect(action, SIGNAL(activated()), - bmHandler, SLOT(slotClearBookmarks())); + action->disconnect(TQT_SIGNAL(activated())); + connect(action, TQT_SIGNAL(activated()), + bmHandler, TQT_SLOT(slotClearBookmarks())); } - connect(bmHandler, SIGNAL(signalBookmarkSelected(int)), - this, SLOT(slotOpenBookmark(int))); - connect(m_view, SIGNAL(signalNewFileOpened(KURL)), - bmHandler, SLOT(slotClearBookmarks())); + connect(bmHandler, TQT_SIGNAL(signalBookmarkSelected(int)), + this, TQT_SLOT(slotOpenBookmark(int))); + connect(m_view, TQT_SIGNAL(signalNewFileOpened(KURL)), + bmHandler, TQT_SLOT(slotClearBookmarks())); _config = KSharedConfig::openConfig( "kbabelrc" ); restoreSettings(); @@ -312,17 +312,17 @@ void KBabelMW::init(KBCatalog* catalog) if(!_config->hasKey("Version")) { - QString encodingStr; + TQString encodingStr; switch(catalog->saveSettings().encoding) { case KBabel::ProjectSettingsBase::UTF8: - encodingStr=QTextCodec::codecForName("UTF-8")->name(); + encodingStr=TQTextCodec::codecForName("UTF-8")->name(); break; case KBabel::ProjectSettingsBase::UTF16: - encodingStr=QTextCodec::codecForName("UTF-16")->name(); + encodingStr=TQTextCodec::codecForName("UTF-16")->name(); break; default: - encodingStr=QTextCodec::codecForLocale()->name(); + encodingStr=TQTextCodec::codecForLocale()->name(); } if( KBabelSplash::instance ) KBabelSplash::instance->close(); //close splash screen window, if there is one @@ -335,7 +335,7 @@ void KBabelMW::init(KBCatalog* catalog) "set to %1. You may want to change this setting " "according to the settings of your language team.").arg(encodingStr)); - QTimer::singleShot(1,this,SLOT(projectConfigure())); + TQTimer::singleShot(1,this,TQT_SLOT(projectConfigure())); } _config->writeEntry("Version",VERSION); @@ -404,296 +404,296 @@ void KBabelMW::setupActions() KAction* action; // the file menu - action = KStdAction::open(this, SLOT(fileOpen()), actionCollection()); + action = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - a_recent = KStdAction::openRecent(this, SLOT(openRecent(const KURL&)), actionCollection()); + a_recent = KStdAction::openRecent(this, TQT_SLOT(openRecent(const KURL&)), actionCollection()); a_recent->setMaxItems(MAX_RECENT); - action = KStdAction::revert(m_view,SLOT(revertToSaved()),actionCollection()); - action=KStdAction::save(this, SLOT(fileSave()), actionCollection()); - action = KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection()); - action = new KAction(i18n("Save Sp&ecial..."), 0, this, SLOT(fileSaveSpecial()), + action = KStdAction::revert(m_view,TQT_SLOT(revertToSaved()),actionCollection()); + action=KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection()); + action = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); + action = new KAction(i18n("Save Sp&ecial..."), 0, this, TQT_SLOT(fileSaveSpecial()), actionCollection(), "save_special" ); - action = new KAction(i18n("Set &Package..."), 0, m_view, SLOT(setFilePackage()), + action = new KAction(i18n("Set &Package..."), 0, m_view, TQT_SLOT(setFilePackage()), actionCollection(), "set_package" ); - action = KStdAction::mail(this, SLOT(fileMail()), actionCollection()); + action = KStdAction::mail(this, TQT_SLOT(fileMail()), actionCollection()); - action = new KAction(i18n("&New View"), 0, this, SLOT(fileNewView()), + action = new KAction(i18n("&New View"), 0, this, TQT_SLOT(fileNewView()), actionCollection(), "file_new_view"); - action = new KAction(i18n("New &Window"), 0, this, SLOT(fileNewWindow()), + action = new KAction(i18n("New &Window"), 0, this, TQT_SLOT(fileNewWindow()), actionCollection(), "file_new_window"); action->setShortcut( KStdAccel::openNew() ); - action = KStdAction::quit(this, SLOT(quit()), actionCollection()); + action = KStdAction::quit(this, TQT_SLOT(quit()), actionCollection()); // the edit menu - action = KStdAction::undo(m_view, SLOT(undo()), actionCollection()); - action = KStdAction::redo(m_view, SLOT(redo()), actionCollection()); - action = KStdAction::cut(m_view, SIGNAL(signalCut()), actionCollection()); - action = KStdAction::copy(m_view, SIGNAL(signalCopy()), actionCollection()); - action = KStdAction::paste(m_view, SIGNAL(signalPaste()), actionCollection()); - action = KStdAction::selectAll(m_view, SIGNAL(signalSelectAll()), actionCollection()); - action = KStdAction::find(m_view, SLOT(find()), actionCollection()); - action = KStdAction::findNext(m_view, SLOT(findNext()), actionCollection()); - action = KStdAction::findPrev(m_view, SLOT(findPrev()), actionCollection()); - action = KStdAction::replace(m_view, SLOT(replace()), actionCollection()); - - action = KStdAction::clear( m_view, SLOT(clear()), actionCollection(), "clear" ); + action = KStdAction::undo(m_view, TQT_SLOT(undo()), actionCollection()); + action = KStdAction::redo(m_view, TQT_SLOT(redo()), actionCollection()); + action = KStdAction::cut(m_view, TQT_SIGNAL(signalCut()), actionCollection()); + action = KStdAction::copy(m_view, TQT_SIGNAL(signalCopy()), actionCollection()); + action = KStdAction::paste(m_view, TQT_SIGNAL(signalPaste()), actionCollection()); + action = KStdAction::selectAll(m_view, TQT_SIGNAL(signalSelectAll()), actionCollection()); + action = KStdAction::find(m_view, TQT_SLOT(find()), actionCollection()); + action = KStdAction::findNext(m_view, TQT_SLOT(findNext()), actionCollection()); + action = KStdAction::findPrev(m_view, TQT_SLOT(findPrev()), actionCollection()); + action = KStdAction::replace(m_view, TQT_SLOT(replace()), actionCollection()); + + action = KStdAction::clear( m_view, TQT_SLOT(clear()), actionCollection(), "clear" ); action = new KAction(i18n("Cop&y Msgid to Msgstr"), "msgid2msgstr", CTRL+Key_Space, m_view - ,SLOT(msgid2msgstr()), actionCollection(), "msgid2msgstr"); + ,TQT_SLOT(msgid2msgstr()), actionCollection(), "msgid2msgstr"); action = new KAction(i18n("Copy Searc&h Result to Msgstr"), "search2msgstr", - CTRL+ALT+Key_Space, m_view, SLOT(search2msgstr()), + CTRL+ALT+Key_Space, m_view, TQT_SLOT(search2msgstr()), actionCollection(), "search2msgstr"); action = new KAction(i18n("Copy Msgstr to Other &Plurals"), Key_F11, m_view - ,SLOT(plural2msgstr()), actionCollection(), "plural2msgstr"); + ,TQT_SLOT(plural2msgstr()), actionCollection(), "plural2msgstr"); action = new KAction(i18n("Copy Selected Character to Msgstr"), Key_F10, m_charselectorview - ,SLOT(emitChar()), actionCollection(), "char2msgstr"); + ,TQT_SLOT(emitChar()), actionCollection(), "char2msgstr"); a_unsetFuzzy = new KAction(i18n("To&ggle Fuzzy Status"), "togglefuzzy", CTRL+Key_U, m_view - , SLOT(removeFuzzyStatus()), actionCollection(), "edit_toggle_fuzzy"); - action = new KAction(i18n("&Edit Header..."), 0, m_view, SLOT(editHeader()), + , TQT_SLOT(removeFuzzyStatus()), actionCollection(), "edit_toggle_fuzzy"); + action = new KAction(i18n("&Edit Header..."), 0, m_view, TQT_SLOT(editHeader()), actionCollection(), "edit_edit_header"); action = new KAction(i18n("&Insert Next Tag"), "insert_tag", CTRL+ALT+Key_N - , m_view, SLOT(insertNextTag()) + , m_view, TQT_SLOT(insertNextTag()) , actionCollection(),"insert_next_tag"); - connect(m_view,SIGNAL(signalNextTagAvailable(bool)),action - ,SLOT(setEnabled(bool))); + connect(m_view,TQT_SIGNAL(signalNextTagAvailable(bool)),action + ,TQT_SLOT(setEnabled(bool))); action = new KAction(i18n("Insert Next Tag From Msgid P&osition"), "insert_tag", CTRL+Key_M - , m_view, SLOT(insertNextTagMsgid()) + , m_view, TQT_SLOT(insertNextTagMsgid()) , actionCollection(),"insert_next_tag_msgid"); - connect(m_view,SIGNAL(signalNextTagAvailable(bool)),action - ,SLOT(setEnabled(bool))); + connect(m_view,TQT_SIGNAL(signalNextTagAvailable(bool)),action + ,TQT_SLOT(setEnabled(bool))); KActionMenu *actionMenu= new KActionMenu(i18n("Inser&t Tag"), "insert_tag" , actionCollection(),"insert_tag"); m_view->setTagsMenu(actionMenu->popupMenu()); - connect(m_view,SIGNAL(signalTagsAvailable(bool)),actionMenu - ,SLOT(setEnabled(bool))); - connect(actionMenu,SIGNAL(activated()),m_view,SLOT(insertNextTag())); + connect(m_view,TQT_SIGNAL(signalTagsAvailable(bool)),actionMenu + ,TQT_SLOT(setEnabled(bool))); + connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(insertNextTag())); action = new KAction(i18n("Show Tags Menu"),CTRL+Key_Less - , m_view, SLOT(showTagsMenu()), actionCollection(),"show_tags_menu"); + , m_view, TQT_SLOT(showTagsMenu()), actionCollection(),"show_tags_menu"); action->setEnabled(false); - connect(m_view,SIGNAL(signalTagsAvailable(bool)),action - ,SLOT(setEnabled(bool))); + connect(m_view,TQT_SIGNAL(signalTagsAvailable(bool)),action + ,TQT_SLOT(setEnabled(bool))); action = new KAction(i18n("Move to Next Tag"), 0, CTRL+ALT+Key_M - , m_view, SLOT(skipToNextTag()) + , m_view, TQT_SLOT(skipToNextTag()) , actionCollection(),"move_to_next_tag"); action = new KAction(i18n("Move to Previous Tag"), 0, CTRL+ALT+Key_B - , m_view, SLOT(skipToPreviousTag()) + , m_view, TQT_SLOT(skipToPreviousTag()) , actionCollection(),"move_to_prev_tag"); action = new KAction(i18n("Insert Next Argument"), "insert_arg", CTRL+ALT+Key_G - , m_view, SLOT(insertNextArg()) + , m_view, TQT_SLOT(insertNextArg()) , actionCollection(),"insert_next_arg"); - connect(m_view,SIGNAL(signalNextArgAvailable(bool)),action - ,SLOT(setEnabled(bool))); + connect(m_view,TQT_SIGNAL(signalNextArgAvailable(bool)),action + ,TQT_SLOT(setEnabled(bool))); actionMenu= new KActionMenu(i18n("Inser&t Argument"), "insert_arg" , actionCollection(),"insert_arg"); m_view->setArgsMenu(actionMenu->popupMenu()); - connect(m_view,SIGNAL(signalArgsAvailable(bool)),actionMenu - ,SLOT(setEnabled(bool))); - connect(actionMenu,SIGNAL(activated()),m_view,SLOT(insertNextArg())); + connect(m_view,TQT_SIGNAL(signalArgsAvailable(bool)),actionMenu + ,TQT_SLOT(setEnabled(bool))); + connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(insertNextArg())); action = new KAction(i18n("Show Arguments Menu"),CTRL+Key_Percent - , m_view, SLOT(showArgsMenu()), actionCollection(),"show_args_menu"); + , m_view, TQT_SLOT(showArgsMenu()), actionCollection(),"show_args_menu"); action->setEnabled(false); - connect(m_view,SIGNAL(signalArgsAvailable(bool)),action - ,SLOT(setEnabled(bool))); + connect(m_view,TQT_SIGNAL(signalArgsAvailable(bool)),action + ,TQT_SLOT(setEnabled(bool))); // next, the go-menu action = new KAction(i18n("&Previous"), "previous", - KStdAccel::shortcut(KStdAccel::Prior), m_view , SLOT(gotoPrev()), + KStdAccel::shortcut(KStdAccel::Prior), m_view , TQT_SLOT(gotoPrev()), actionCollection(),"go_prev_entry"); action = new KAction(i18n("&Next"), "next", - KStdAccel::shortcut(KStdAccel::Next), m_view , SLOT(gotoNext()), + KStdAccel::shortcut(KStdAccel::Next), m_view , TQT_SLOT(gotoNext()), actionCollection(),"go_next_entry"); - action = KStdAction::goTo(m_view, SLOT(gotoEntry()), actionCollection()); + action = KStdAction::goTo(m_view, TQT_SLOT(gotoEntry()), actionCollection()); action->setShortcut( KStdAccel::gotoLine()); - action = KStdAction::firstPage(m_view, SLOT(gotoFirst()),actionCollection()); + action = KStdAction::firstPage(m_view, TQT_SLOT(gotoFirst()),actionCollection()); action->setText(i18n("&First Entry")); action->setShortcut(CTRL+ALT+Key_Home); - action = KStdAction::lastPage(m_view, SLOT(gotoLast()),actionCollection()); + action = KStdAction::lastPage(m_view, TQT_SLOT(gotoLast()),actionCollection()); action->setText(i18n("&Last Entry")); action->setShortcut(CTRL+ALT+Key_End); a_prevFoU = new KAction(i18n("P&revious Fuzzy or Untranslated"),"prevfuzzyuntrans", CTRL+SHIFT+Key_Prior, m_view, - SLOT(gotoPrevFuzzyOrUntrans()),actionCollection(), "go_prev_fuzzyUntr"); + TQT_SLOT(gotoPrevFuzzyOrUntrans()),actionCollection(), "go_prev_fuzzyUntr"); a_nextFoU = new KAction(i18n("N&ext Fuzzy or Untranslated"),"nextfuzzyuntrans", CTRL+SHIFT+Key_Next, m_view, - SLOT(gotoNextFuzzyOrUntrans()),actionCollection(), "go_next_fuzzyUntr"); + TQT_SLOT(gotoNextFuzzyOrUntrans()),actionCollection(), "go_next_fuzzyUntr"); a_prevFuzzy = new KAction(i18n("Pre&vious Fuzzy"),"prevfuzzy", CTRL+Key_Prior, m_view, - SLOT(gotoPrevFuzzy()),actionCollection(), "go_prev_fuzzy"); + TQT_SLOT(gotoPrevFuzzy()),actionCollection(), "go_prev_fuzzy"); a_nextFuzzy = new KAction(i18n("Ne&xt Fuzzy"), "nextfuzzy", CTRL+Key_Next, m_view, - SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy"); + TQT_SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy"); a_prevUntrans = new KAction(i18n("Prev&ious Untranslated"), "prevuntranslated", ALT+Key_Prior, m_view, - SLOT(gotoPrevUntranslated()),actionCollection(), "go_prev_untrans"); + TQT_SLOT(gotoPrevUntranslated()),actionCollection(), "go_prev_untrans"); a_nextUntrans = new KAction(i18n("Nex&t Untranslated"), "nextuntranslated", ALT+Key_Next, m_view, - SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans"); + TQT_SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans"); action = new KAction(i18n("Previo&us Error"), "preverror", SHIFT+Key_Prior, m_view, - SLOT(gotoPrevError()),actionCollection(), "go_prev_error"); + TQT_SLOT(gotoPrevError()),actionCollection(), "go_prev_error"); action = new KAction(i18n("Next Err&or"), "nexterror", SHIFT+Key_Next, m_view, - SLOT(gotoNextError()),actionCollection(), "go_next_error"); + TQT_SLOT(gotoNextError()),actionCollection(), "go_next_error"); action = new KAction(i18n("&Back in History"), "back", ALT+Key_Left, m_view, - SLOT(backHistory()),actionCollection(), "go_back_history"); + TQT_SLOT(backHistory()),actionCollection(), "go_back_history"); action = new KAction(i18n("For&ward in History"), "forward", ALT+Key_Right, m_view, - SLOT(forwardHistory()),actionCollection(), "go_forward_history"); + TQT_SLOT(forwardHistory()),actionCollection(), "go_forward_history"); // the search menu actionMenu=new KActionMenu(i18n("&Find Text"), "transsearch",actionCollection(),"dict_search_all"); - connect(actionMenu,SIGNAL(activated()),m_view,SLOT(startSearch())); + connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(startSearch())); dictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this); - connect(dictMenu,SIGNAL(activated(const QString)), m_view - , SLOT(startSearch(const QString))); + connect(dictMenu,TQT_SIGNAL(activated(const TQString)), m_view + , TQT_SLOT(startSearch(const TQString))); actionMenu=new KActionMenu(i18n("F&ind Selected Text"), "transsearch",actionCollection(),"dict_search_selected"); - connect(actionMenu,SIGNAL(activated()),m_view,SLOT(startSelectionSearch())); + connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(startSelectionSearch())); selectionDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this); - connect(selectionDictMenu,SIGNAL(activated(const QString)), m_view - , SLOT(startSelectionSearch(const QString))); + connect(selectionDictMenu,TQT_SIGNAL(activated(const TQString)), m_view + , TQT_SLOT(startSelectionSearch(const TQString))); actionMenu=new KActionMenu(i18n("&Edit Dictionary"), "transsearch",actionCollection(),"dict_edit"); editDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this); - connect(editDictMenu,SIGNAL(activated(const QString)), m_view - , SLOT(editDictionary(const QString))); + connect(editDictMenu,TQT_SIGNAL(activated(const TQString)), m_view + , TQT_SLOT(editDictionary(const TQString))); actionMenu=new KActionMenu(i18n("Con&figure Dictionary"), "transsearch",actionCollection(),"dict_configure"); configDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this); - connect(configDictMenu,SIGNAL(activated(const QString)), m_view - , SLOT(configureDictionary(const QString))); + connect(configDictMenu,TQT_SIGNAL(activated(const TQString)), m_view + , TQT_SLOT(configureDictionary(const TQString))); actionMenu=new KActionMenu(i18n("About Dictionary"), "transsearch", actionCollection(), "dict_about"); aboutDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this); - connect(aboutDictMenu,SIGNAL(activated(const QString)), m_view - , SLOT(aboutDictionary(const QString))); + connect(aboutDictMenu,TQT_SIGNAL(activated(const TQString)), m_view + , TQT_SLOT(aboutDictionary(const TQString))); buildDictMenus(); // the project menu action = new KAction(i18n("&New..."), "filenew" - , this, SLOT(projectNew()),actionCollection() + , this, TQT_SLOT(projectNew()),actionCollection() ,"project_new"); action = new KAction(i18n("&Open..."), "fileopen" - , this, SLOT(projectOpen()),actionCollection() + , this, TQT_SLOT(projectOpen()),actionCollection() ,"project_open"); action = new KAction(i18n("C&lose"), "fileclose" - , this, SLOT(projectClose()),actionCollection() + , this, TQT_SLOT(projectClose()),actionCollection() ,"project_close"); action->setEnabled (_project->filename() != KBabel::ProjectManager::defaultProjectName() ); action = new KAction(i18n("&Configure..."), "configure" - , this, SLOT(projectConfigure()),actionCollection() + , this, TQT_SLOT(projectConfigure()),actionCollection() ,"project_settings"); - a_recentprojects = new KRecentFilesAction(i18n("Open &Recent"), 0, this, SLOT(projectOpenRecent(const KURL&)), actionCollection(), "recent_projects"); + a_recentprojects = new KRecentFilesAction(i18n("Open &Recent"), 0, this, TQT_SLOT(projectOpenRecent(const KURL&)), actionCollection(), "recent_projects"); // the tools menu action = new KAction(i18n("&Spell Check..."), "spellcheck", CTRL+Key_I - , m_view, SLOT(spellcheckCommon()),actionCollection() + , m_view, TQT_SLOT(spellcheckCommon()),actionCollection() ,"spellcheck_common"); action = new KAction(i18n("&Check All..."), "spellcheck_all", 0 - , m_view, SLOT(spellcheckAll()),actionCollection() + , m_view, TQT_SLOT(spellcheckAll()),actionCollection() ,"spellcheck_all"); action = new KAction(i18n("C&heck From Cursor Position..."), "spellcheck_from_cursor", 0 - , m_view, SLOT(spellcheckFromCursor()),actionCollection() + , m_view, TQT_SLOT(spellcheckFromCursor()),actionCollection() ,"spellcheck_from_cursor"); action = new KAction(i18n("Ch&eck Current..."), "spellcheck_actual", 0 - , m_view, SLOT(spellcheckCurrent()),actionCollection() + , m_view, TQT_SLOT(spellcheckCurrent()),actionCollection() ,"spellcheck_current"); action = new KAction(i18n("Check Fro&m Current to End of File..."), 0 - , m_view, SLOT(spellcheckFromCurrent()),actionCollection() + , m_view, TQT_SLOT(spellcheckFromCurrent()),actionCollection() ,"spellcheck_from_current"); action = new KAction(i18n("Chec&k Selected Text..."), "spellcheck_selected", 0 - , m_view, SLOT(spellcheckMarked()),actionCollection() + , m_view, TQT_SLOT(spellcheckMarked()),actionCollection() ,"spellcheck_marked"); KToggleAction *toggleAction; toggleAction = new KToggleAction(i18n("&Diffmode"), "autodiff", 0 ,actionCollection(), "diff_toggleDiff"); - connect(toggleAction,SIGNAL(toggled(bool)), m_view, SLOT(toggleAutoDiff(bool))); - connect(m_view,SIGNAL(signalDiffEnabled(bool)), toggleAction - , SLOT(setChecked(bool))); + connect(toggleAction,TQT_SIGNAL(toggled(bool)), m_view, TQT_SLOT(toggleAutoDiff(bool))); + connect(m_view,TQT_SIGNAL(signalDiffEnabled(bool)), toggleAction + , TQT_SLOT(setChecked(bool))); toggleAction->setChecked(m_view->autoDiffEnabled()); action = new KAction(i18n("&Show Diff"), "diff", Key_F5 - , m_view, SLOT(diff()),actionCollection() + , m_view, TQT_SLOT(diff()),actionCollection() ,"diff_diff"); action = new KAction(i18n("S&how Original Text"), "contents", Key_F6 - , m_view, SLOT(diffShowOrig()),actionCollection() + , m_view, TQT_SLOT(diffShowOrig()),actionCollection() ,"diff_showOrig"); action = new KAction(i18n("&Open File for Diff"), "fileopen" ,0 - , m_view, SLOT(openDiffFile()),actionCollection() + , m_view, TQT_SLOT(openDiffFile()),actionCollection() ,"diff_openFile"); action = new KAction(i18n("&Rough Translation..."), 0 - , m_view, SLOT(roughTranslation()),actionCollection() + , m_view, TQT_SLOT(roughTranslation()),actionCollection() ,"rough_translation"); action = new KAction(i18n("&Catalog Manager..."),"catalogmanager", 0 , this, - SLOT(openCatalogManager()),actionCollection(), "open_catalog_manager"); + TQT_SLOT(openCatalogManager()),actionCollection(), "open_catalog_manager"); - new KAction( i18n("Toggle Edit Mode"), 0, Key_Insert,this,SLOT(toggleEditMode()), actionCollection(), "toggle_insert_mode"); + new KAction( i18n("Toggle Edit Mode"), 0, Key_Insert,this,TQT_SLOT(toggleEditMode()), actionCollection(), "toggle_insert_mode"); - new KAction( i18n("&Word Count"), 0, m_view, SLOT(wordCount()), actionCollection(), "word_count"); + new KAction( i18n("&Word Count"), 0, m_view, TQT_SLOT(wordCount()), actionCollection(), "word_count"); // next, the settings menu createStandardStatusBarAction(); - KStdAction::configureToolbars(this,SLOT(optionsEditToolbars()),actionCollection()); + KStdAction::configureToolbars(this,TQT_SLOT(optionsEditToolbars()),actionCollection()); - KStdAction::keyBindings(guiFactory(),SLOT(configureShortcuts()),actionCollection()); - KStdAction::preferences(this,SLOT(optionsPreferences()),actionCollection()); + KStdAction::keyBindings(guiFactory(),TQT_SLOT(configureShortcuts()),actionCollection()); + KStdAction::preferences(this,TQT_SLOT(optionsPreferences()),actionCollection()); setStandardToolBarMenuEnabled ( true ); action = new KAction(i18n("&Stop Searching"), "stop",Key_Escape, m_view, - SLOT(stopSearch()),actionCollection(), "stop_search"); + TQT_SLOT(stopSearch()),actionCollection(), "stop_search"); action->setEnabled(false); new KAction(i18n("&Gettext Info"), 0, this, - SLOT(gettextHelp()), actionCollection(), "help_gettext"); + TQT_SLOT(gettextHelp()), actionCollection(), "help_gettext"); // the bookmarks menu - action = KStdAction::addBookmark(this, SLOT(slotAddBookmark()), + action = KStdAction::addBookmark(this, TQT_SLOT(slotAddBookmark()), actionCollection(), "add_bookmark"); action->setEnabled(false); // this action is now connected to dummySlot(), and later reconnected // to bmHandler after that object actually is created - new KAction(i18n("Clear Bookmarks"), 0, this, SLOT(dummySlot()), + new KAction(i18n("Clear Bookmarks"), 0, this, TQT_SLOT(dummySlot()), actionCollection(), "clear_bookmarks"); setupDynamicActions(); createGUI(0); - QPopupMenu *popup = static_cast(factory()->container("settings",this)); + TQPopupMenu *popup = static_cast(factory()->container("settings",this)); popup->insertItem( i18n("&Views"), dockHideShowMenu(), -1, 0 ); } @@ -707,22 +707,22 @@ void KBabelMW::setupStatusBar() if(KBabelSettings::ledInStatusbar()) { - QColor ledColor=KBabelSettings::ledColor(); - QHBox* statusBox = new QHBox(statusBar(),"statusBox"); + TQColor ledColor=KBabelSettings::ledColor(); + TQHBox* statusBox = new TQHBox(statusBar(),"statusBox"); statusBox->setSpacing(2); - new QLabel(" "+i18n("Status: "),statusBox); + new TQLabel(" "+i18n("Status: "),statusBox); _fuzzyLed = new KLed(ledColor,KLed::Off,KLed::Sunken,KLed::Rectangular ,statusBox); _fuzzyLed->setFixedSize(15,12); - new QLabel(i18n("fuzzy")+" ",statusBox); + new TQLabel(i18n("fuzzy")+" ",statusBox); _untransLed = new KLed(ledColor,KLed::Off,KLed::Sunken,KLed::Rectangular ,statusBox); _untransLed->setFixedSize(15,12); - new QLabel(i18n("untranslated")+" ",statusBox); + new TQLabel(i18n("untranslated")+" ",statusBox); _errorLed = new KLed(ledColor,KLed::Off,KLed::Sunken,KLed::Rectangular ,statusBox); _errorLed->setFixedSize(15,12); - new QLabel(i18n("faulty")+" ",statusBox); + new TQLabel(i18n("faulty")+" ",statusBox); statusBox->setFixedWidth(statusBox->sizeHint().width()); statusBar()->addWidget(statusBox); @@ -735,7 +735,7 @@ void KBabelMW::setupStatusBar() statusBar()->insertItem(i18n("Line: %1 Col: %2").arg(1).arg(1) ,ID_STATUS_CURSOR); - QHBox* progressBox = new QHBox(statusBar(),"progressBox"); + TQHBox* progressBox = new TQHBox(statusBar(),"progressBox"); progressBox->setSpacing(2); _progressLabel = new KSqueezedTextLabel( "", progressBox ); _progressBar=new MyKProgress(progressBox,"progressbar"); @@ -745,7 +745,7 @@ void KBabelMW::setupStatusBar() statusBar()->addWidget(progressBox,1); statusBar()->setMinimumHeight(progressBox->sizeHint().height()); - QWhatsThis::add(statusBar(), + TQWhatsThis::add(statusBar(), i18n("

          Statusbar

          \n\

          The statusbar displays some information about the opened file,\n\ like the total number of entries and the number of fuzzy and untranslated\n\ @@ -756,23 +756,23 @@ messages. Also the index and the status of the currently displayed entry is show void KBabelMW::setupDynamicActions() { // dynamic validation tools - QValueList tools = ToolAction::validationTools(); + TQValueList tools = ToolAction::validationTools(); - QPtrList actions = ToolAction::dataToolActionList( - tools, m_view, SLOT(validateUsingTool( const KDataToolInfo &, const QString & )), + TQPtrList actions = ToolAction::dataToolActionList( + tools, m_view, TQT_SLOT(validateUsingTool( const KDataToolInfo &, const TQString & )), "validate", false, actionCollection() ); KActionMenu* m_menu = new KActionMenu(i18n("&Validation"), actionCollection(), "dynamic_validation_tools"); KAction* ac = new KAction(i18n("Perform &All Checks"), CTRL+Key_E , m_view, - SLOT(checkAll()),actionCollection(), "check_all"); + TQT_SLOT(checkAll()),actionCollection(), "check_all"); ac->setEnabled(false); m_menu->insert(ac); m_menu->insert( new KActionSeparator() ); ac = new KAction(i18n("C&heck Syntax"), CTRL+Key_T , m_view, - SLOT(checkSyntax()),actionCollection(), "check_syntax"); + TQT_SLOT(checkSyntax()),actionCollection(), "check_syntax"); ac->setEnabled(false); m_menu->insert(ac); @@ -784,13 +784,13 @@ void KBabelMW::setupDynamicActions() // dynamic modify tools // query available tools - QValueList allTools = KDataToolInfo::query + TQValueList allTools = KDataToolInfo::query ("CatalogItem", "application/x-kbabel-catalogitem", KGlobal::instance()); // skip read-only tools for single items - QValueList modifyTools; + TQValueList modifyTools; - QValueList::ConstIterator entry = allTools.begin(); + TQValueList::ConstIterator entry = allTools.begin(); for( ; entry != allTools.end(); ++entry ) { if( !(*entry).isReadOnly() ) @@ -801,7 +801,7 @@ void KBabelMW::setupDynamicActions() // create corresponding actions actions = ToolAction::dataToolActionList( - modifyTools, m_view, SLOT(modifyUsingTool( const KDataToolInfo &, const QString & )), + modifyTools, m_view, TQT_SLOT(modifyUsingTool( const KDataToolInfo &, const TQString & )), "validate", true, actionCollection() ); // skip validation actions @@ -833,7 +833,7 @@ void KBabelMW::setupDynamicActions() // create corresponding actions actions = ToolAction::dataToolActionList( - modifyTools, m_view, SLOT(modifyUsingTool( const KDataToolInfo &, const QString & )), + modifyTools, m_view, TQT_SLOT(modifyUsingTool( const KDataToolInfo &, const TQString & )), "validate", true, actionCollection() ); // skip validation actions @@ -844,7 +844,7 @@ void KBabelMW::setupDynamicActions() // create corresponding actions actions = ToolAction::dataToolActionList( - modifyTools, m_view, SLOT(modifyCatalogUsingTool( const KDataToolInfo &, const QString & )), + modifyTools, m_view, TQT_SLOT(modifyCatalogUsingTool( const KDataToolInfo &, const TQString & )), "validate", true, actionCollection() ); // insert tools @@ -923,7 +923,7 @@ bool KBabelMW::queryClose() { if(m_view->isSearching()) { - connect(m_view,SIGNAL(signalSearchActive(bool)),this,SLOT(quit())); + connect(m_view,TQT_SIGNAL(signalSearchActive(bool)),this,TQT_SLOT(quit())); m_view->stopSearch(); return false; } @@ -932,7 +932,7 @@ bool KBabelMW::queryClose() { // stop the activity and try again m_view->catalog()->stop(); - QTimer::singleShot(0, this, SLOT( close() )); + TQTimer::singleShot(0, this, TQT_SLOT( close() )); return false; } @@ -973,13 +973,13 @@ void KBabelMW::quit() } -void KBabelMW::dragEnterEvent(QDragEnterEvent *event) +void KBabelMW::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void KBabelMW::dropEvent(QDropEvent *event) +void KBabelMW::dropEvent(TQDropEvent *event) { KURL::List uri; // see if we can decode a URI.. if not, just ignore it @@ -989,14 +989,14 @@ void KBabelMW::dropEvent(QDropEvent *event) } } -void KBabelMW::wheelEvent(QWheelEvent *e) +void KBabelMW::wheelEvent(TQWheelEvent *e) { m_view->wheelEvent(e); } void KBabelMW::openRecent(const KURL& url) { - KBabelView *view = KBabelView::viewForURL(url,QString::null); + KBabelView *view = KBabelView::viewForURL(url,TQString::null); if(view) { KWin::activateWindow(view->topLevelWidget()->winId()); @@ -1008,10 +1008,10 @@ void KBabelMW::openRecent(const KURL& url) void KBabelMW::open(const KURL& url) { - open(url,QString::null,false); + open(url,TQString::null,false); } -void KBabelMW::open(const KURL& url, const QString package, bool newWindow) +void KBabelMW::open(const KURL& url, const TQString package, bool newWindow) { kdDebug(KBABEL) << "opening file with project:" << _project->filename() << endl; kdDebug(KBABEL) << "URL:" << url.prettyURL() << endl; @@ -1036,7 +1036,7 @@ void KBabelMW::open(const KURL& url, const QString package, bool newWindow) } } -void KBabelMW::openTemplate(const KURL& openURL,const KURL& saveURL,const QString& package, bool newWindow) +void KBabelMW::openTemplate(const KURL& openURL,const KURL& saveURL,const TQString& package, bool newWindow) { if(newWindow) { @@ -1067,7 +1067,7 @@ void KBabelMW::addToRecentFiles(KURL url) void KBabelMW::fileSave() { // do it asynchronously due to kdelibs bug - QTimer::singleShot( 0, this, SLOT( fileSave_internal() )); + TQTimer::singleShot( 0, this, TQT_SLOT( fileSave_internal() )); } void KBabelMW::fileSave_internal() @@ -1091,10 +1091,10 @@ void KBabelMW::fileSave_internal() KURL url=m_view->currentURL(); DCOPClient *client = kapp->dcopClient(); - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << ((url.directory(false)+url.fileName()).utf8()) ; - if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(QCString)", data )) + if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(TQCString)", data )) kdDebug(KBABEL) << "Unable to send file update info via DCOP" << endl; // reenable save action @@ -1108,10 +1108,10 @@ void KBabelMW::fileSaveAs() KURL url=m_view->currentURL(); DCOPClient *client = kapp->dcopClient(); - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << ((url.directory(false)+url.fileName()).utf8()) ; - if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(QCString)", data )) + if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(TQCString)", data )) kdDebug(KBABEL) << "Unable to send file update info via DCOP" << endl; } @@ -1122,10 +1122,10 @@ void KBabelMW::fileSaveSpecial() KURL url=m_view->currentURL(); DCOPClient *client = kapp->dcopClient(); - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << ((url.directory(false)+url.fileName()).utf8()) ; - if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(QCString)", data )) + if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(TQCString)", data )) kdDebug(KBABEL) << "Unable to send file update info via DCOP" << endl; } @@ -1181,7 +1181,7 @@ void KBabelMW::optionsEditToolbars() { saveMainWindowSettings( KGlobal::config(), "View" ); KEditToolbar dlg(actionCollection()); - connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig())); dlg.exec(); } @@ -1198,8 +1198,8 @@ void KBabelMW::optionsPreferences() _prefDialog = new KBabelPreferences(m_view->dictionaries()); prefDialogs.append(_prefDialog); - connect(_prefDialog,SIGNAL(settingsChanged()) - ,m_view,SLOT(updateSettings())); + connect(_prefDialog,TQT_SIGNAL(settingsChanged()) + ,m_view,TQT_SLOT(updateSettings())); } int prefHeight=_prefDialog->height(); @@ -1210,7 +1210,7 @@ void KBabelMW::optionsPreferences() int x=width/2-prefWidth/2; int y=height/2-prefHeight/2; - _prefDialog->move(mapToGlobal(QPoint(x,y))); + _prefDialog->move(mapToGlobal(TQPoint(x,y))); if(!_prefDialog->isVisible()) { @@ -1221,7 +1221,7 @@ void KBabelMW::optionsPreferences() KWin::activateWindow(_prefDialog->winId()); } -void KBabelMW::setLedColor(const QColor& color) +void KBabelMW::setLedColor(const TQColor& color) { if(_fuzzyLed) { @@ -1239,8 +1239,8 @@ void KBabelMW::setLedColor(const QColor& color) void KBabelMW::openCatalogManager() { - QCString service; - QString result; + TQCString service; + TQString result; DCOPClient * client = kapp->dcopClient(); @@ -1248,7 +1248,7 @@ void KBabelMW::openCatalogManager() QCStringList apps = client->registeredApplications(); for( QCStringList::Iterator it = apps.begin() ; it != apps.end() ; ++it ) { - QString clientID = *it; + TQString clientID = *it; if( clientID.startsWith("catalogmanager") ) { service = *it; @@ -1259,8 +1259,8 @@ void KBabelMW::openCatalogManager() // if there is no running catalog manager, start one if( service.isEmpty() ) { - QString prog = "catalogmanager"; - QString url = ""; + TQString prog = "catalogmanager"; + TQString url = ""; if( kapp->startServiceByDesktopName(prog,url, &result,&service)) { KMessageBox::error(this, i18n("Unable to use KLauncher to start " @@ -1271,8 +1271,8 @@ void KBabelMW::openCatalogManager() } // set preferred window - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << (this->winId()) ; if( !client->send( service, "CatalogManagerIFace", "setPreferredWindow( WId )", data )) kdDebug(KBABEL) << "Unable to set preferred window via DCOP" << endl; } @@ -1469,7 +1469,7 @@ void KBabelMW::enableForwardHistory(bool on) } -void KBabelMW::prepareProgressBar(QString msg,int max) +void KBabelMW::prepareProgressBar(TQString msg,int max) { if(_statusbarTimer->isActive()) _statusbarTimer->stop(); @@ -1489,7 +1489,7 @@ void KBabelMW::clearProgressBar() } -void KBabelMW::changeStatusbar(const QString& text) +void KBabelMW::changeStatusbar(const TQString& text) { // display the text on the statusbar _progressLabel->setText(" "+text); @@ -1505,7 +1505,7 @@ void KBabelMW::clearStatusbarMsg() _progressLabel->setText(""); } -void KBabelMW::changeCaption(const QString& text) +void KBabelMW::changeCaption(const TQString& text) { // display the text on the caption setCaption(text + ( _project->filename () != KBabel::ProjectManager::defaultProjectName() ? @@ -1559,9 +1559,9 @@ void KBabelMW::enableStop(bool flag) void KBabelMW::gettextHelp() { - QString error; + TQString error; KApplication::startServiceByDesktopName("khelpcenter", - QString("info:/gettext"), &error); + TQString("info:/gettext"), &error); if(!error.isEmpty()) { @@ -1572,7 +1572,7 @@ void KBabelMW::gettextHelp() void KBabelMW::buildDictMenus() { - QPtrList dictList = m_view->dictionaries(); + TQPtrList dictList = m_view->dictionaries(); dictList.setAutoDelete(true); dictMenu->clear(); @@ -1584,10 +1584,10 @@ void KBabelMW::buildDictMenus() ModuleInfo *info; for(info = dictList.first(); info !=0; info = dictList.next()) { - QString accel="Ctrl+Alt+%1"; + TQString accel="Ctrl+Alt+%1"; dictMenu->add(info->name,info->id, accel); - accel=QString("Ctrl+%1"); + accel=TQString("Ctrl+%1"); selectionDictMenu->add(info->name,info->id, accel); configDictMenu->add(info->name,info->id); @@ -1607,14 +1607,14 @@ void KBabelMW::updateCursorPosition(int line, int col) } -KBabelMW *KBabelMW::winForURL(const KURL& url, QString project) +KBabelMW *KBabelMW::winForURL(const KURL& url, TQString project) { KBabelMW *kb=0; KBabelView *v = KBabelView::viewForURL(url,project); if(v) { - QObject *p = v->parent(); + TQObject *p = v->parent(); while(p && !p->inherits("KBabelMW")) { p = p->parent(); @@ -1627,14 +1627,14 @@ KBabelMW *KBabelMW::winForURL(const KURL& url, QString project) return kb; } -KBabelMW *KBabelMW::emptyWin(QString project) +KBabelMW *KBabelMW::emptyWin(TQString project) { KBabelMW *kb=0; KBabelView *v = KBabelView::emptyView(project); if(v) { - QObject *p = v->parent(); + TQObject *p = v->parent(); while(p && !p->inherits("KBabelMW")) { p = p->parent(); @@ -1647,11 +1647,11 @@ KBabelMW *KBabelMW::emptyWin(QString project) return kb; } -void KBabelMW::spellcheckMoreFiles(QStringList filelist) +void KBabelMW::spellcheckMoreFiles(TQStringList filelist) { if( filelist.isEmpty() ) return; _toSpellcheck = filelist; - connect( m_view, SIGNAL( signalSpellcheckDone(int) ), this, SLOT( spellcheckDone(int))); + connect( m_view, TQT_SIGNAL( signalSpellcheckDone(int) ), this, TQT_SLOT( spellcheckDone(int))); spellcheckDone( KS_IGNORE ); // use something else than KS_STOP } @@ -1659,22 +1659,22 @@ void KBabelMW::spellcheckDone( int result) { if( _toSpellcheck.isEmpty() || result == KS_STOP) { - disconnect( m_view, SIGNAL( signalSpellcheckDone(int)), this, SLOT(spellcheckDone( int))); + disconnect( m_view, TQT_SIGNAL( signalSpellcheckDone(int)), this, TQT_SLOT(spellcheckDone( int))); KMessageBox::information( this, i18n("MessageBox text", "Spellchecking of multiple files is finished."), i18n("MessageBox caption", "Spellcheck Done")); } else { - QString file = _toSpellcheck.first(); + TQString file = _toSpellcheck.first(); _toSpellcheck.pop_front(); if( m_view->isModified() ) fileSave(); - open(KURL( file ), QString::null, false); + open(KURL( file ), TQString::null, false); kdDebug(KBABEL) << "Starting another spellcheck" << endl; - QTimer::singleShot( 1, m_view, SLOT(spellcheckAllMulti())); + TQTimer::singleShot( 1, m_view, TQT_SLOT(spellcheckAllMulti())); } } -void KBabelMW::initBookmarks(QPtrList list) +void KBabelMW::initBookmarks(TQPtrList list) { bmHandler->setBookmarks(list); } @@ -1705,12 +1705,12 @@ void KBabelMW::projectNew() void KBabelMW::projectOpen() { - QString oldproject = m_view->project(); + TQString oldproject = m_view->project(); if( oldproject == KBabel::ProjectManager::defaultProjectName() ) { - oldproject = QString(); + oldproject = TQString(); } - const QString file = KFileDialog::getOpenFileName(oldproject, QString::null, this); + const TQString file = KFileDialog::getOpenFileName(oldproject, TQString::null, this); if (file.isEmpty()) { return; @@ -1731,9 +1731,9 @@ void KBabelMW::projectOpenRecent(const KURL& url) } } -void KBabelMW::projectOpen(const QString& file) +void KBabelMW::projectOpen(const TQString& file) { - QString oldproject = m_view->project(); + TQString oldproject = m_view->project(); if( oldproject == KBabel::ProjectManager::defaultProjectName() ) { oldproject = ""; @@ -1761,13 +1761,13 @@ void KBabelMW::projectOpen(const QString& file) void KBabelMW::projectClose() { - QString defaultProject = KBabel::ProjectManager::defaultProjectName(); + TQString defaultProject = KBabel::ProjectManager::defaultProjectName(); m_view->useProject( KBabel::ProjectManager::open(defaultProject) ); _project = ProjectManager::open(defaultProject); changeProjectActions(defaultProject); } -void KBabelMW::changeProjectActions(const QString& project) +void KBabelMW::changeProjectActions(const TQString& project) { bool def = (project == KBabel::ProjectManager::defaultProjectName()); @@ -1792,8 +1792,8 @@ void KBabelMW::projectConfigure() if(!_projectDialog) { _projectDialog = new ProjectDialog(_project); - connect (_projectDialog, SIGNAL (settingsChanged()) - , m_view, SLOT (updateProjectSettings())); + connect (_projectDialog, TQT_SIGNAL (settingsChanged()) + , m_view, TQT_SLOT (updateProjectSettings())); } int prefHeight=_projectDialog->height(); @@ -1804,7 +1804,7 @@ void KBabelMW::projectConfigure() int x=width/2-prefWidth/2; int y=height/2-prefHeight/2; - _projectDialog->move(mapToGlobal(QPoint(x,y))); + _projectDialog->move(mapToGlobal(TQPoint(x,y))); if(!_projectDialog->isVisible()) { diff --git a/kbabel/kbabel/kbabel.h b/kbabel/kbabel/kbabel.h index 4ff184c1..f6c5aa18 100644 --- a/kbabel/kbabel/kbabel.h +++ b/kbabel/kbabel/kbabel.h @@ -42,8 +42,8 @@ #include #include #include -#include -#include +#include +#include #include #include "kbabelview.h" @@ -86,23 +86,23 @@ public: /** * Default Constructor */ - KBabelMW(QString projectFile = QString()); + KBabelMW(TQString projectFile = TQString()); /** use this contructor, if you just want to create a new view of an existing catalog*/ - KBabelMW(KBCatalog* catalog, QString projectFile = QString()); + KBabelMW(KBCatalog* catalog, TQString projectFile = TQString()); /** * Default Destructor */ virtual ~KBabelMW(); - QString project() const { return _project->filename(); } + TQString project() const { return _project->filename(); } - void open(const KURL& url, const QString package, bool newWindow); - void openTemplate(const KURL& openURL,const KURL& saveURL,const QString& package, bool newWindow=false); - void projectOpen(const QString& filename); + void open(const KURL& url, const TQString package, bool newWindow); + void openTemplate(const KURL& openURL,const KURL& saveURL,const TQString& package, bool newWindow=false); + void projectOpen(const TQString& filename); - void spellcheckMoreFiles( QStringList filelist); + void spellcheckMoreFiles( TQStringList filelist); void setSettings(KBabel::SaveSettings,KBabel::IdentitySettings); void updateSettings(); @@ -111,13 +111,13 @@ public: * @return A pointer to a KBabel, that has opened file URL or 0 if no * KBabel was found */ - static KBabelMW *winForURL(const KURL& url, QString projectFile = QString::null); + static KBabelMW *winForURL(const KURL& url, TQString projectFile = TQString::null); /** * @return A pointer to a KBabel, that has opened no file URL or 0 if no * KBabel was found */ - static KBabelMW *emptyWin(QString projectFile = QString::null); + static KBabelMW *emptyWin(TQString projectFile = TQString::null); public slots: void toggleEditMode(); @@ -126,13 +126,13 @@ protected: /** * Overridden virtuals for Qt drag 'n drop (XDND) */ - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); /** * Overrriden virtual for wheel event handling to forward to KBabelView */ - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); /** * This function is called when it is time for the app to save its @@ -212,15 +212,15 @@ private slots: * activity. message is displayed left to the progressbar * and max is the maximum number for the progressbar */ - void prepareProgressBar(QString message,int max); + void prepareProgressBar(TQString message,int max); /** * resets the progressBar and enables the window */ void clearProgressBar(); - void changeStatusbar(const QString& text); + void changeStatusbar(const TQString& text); void clearStatusbarMsg(); - void changeCaption(const QString& text); + void changeCaption(const TQString& text); void showModified(bool); /** @@ -228,7 +228,7 @@ private slots: */ void enableDefaults(bool readOnly); - void setLedColor(const QColor& color); + void setLedColor(const TQColor& color); void buildDictMenus(); @@ -254,7 +254,7 @@ private: void init(KBCatalog* catalog); void setupActions(); void setupDynamicActions(); - void changeProjectActions(const QString& project); + void changeProjectActions(const TQString& project); void setupStatusBar(); void saveSettings(); void restoreSettings(); @@ -263,7 +263,7 @@ private: * * @param list the list of bookmarks. */ - void initBookmarks(QPtrList list); + void initBookmarks(TQPtrList list); private: KBabelView *m_view; @@ -273,22 +273,22 @@ private: int _currentIndex; KProgress* _progressBar; - QLabel* _progressLabel; + TQLabel* _progressLabel; KLed* _fuzzyLed; KLed* _untransLed; KLed* _errorLed; - QTimer *_statusbarTimer; + TQTimer *_statusbarTimer; KBabelPreferences* _prefDialog; - QStringList _toSpellcheck; + TQStringList _toSpellcheck; /** * used for updating preferences, that are common in * the whole application */ - static QPtrList prefDialogs; + static TQPtrList prefDialogs; // frequently used actions @@ -316,7 +316,7 @@ private: KSharedConfig::Ptr _config; KBabel::ProjectDialog* _projectDialog; - QMap _toolsShortcuts; + TQMap _toolsShortcuts; KBabel::KBabelMailer* mailer; KBabelBookmarkHandler* bmHandler; diff --git a/kbabel/kbabel/kbabeliface.h b/kbabel/kbabel/kbabeliface.h index d03b927d..49d19f5c 100644 --- a/kbabel/kbabel/kbabeliface.h +++ b/kbabel/kbabel/kbabeliface.h @@ -36,7 +36,7 @@ #define KBABELIFACE_H #include -#include +#include class KBabelIface : virtual public DCOPObject { @@ -44,38 +44,38 @@ class KBabelIface : virtual public DCOPObject public: k_dcop: - virtual void openURL(QCString url, QCString package, WId window, int newWindow) { url = ""; window = 0; newWindow = 0; package= "";} - virtual void openURL(QCString url, QCString package, WId window, int newWindow, QCString projectFile) + virtual void openURL(TQCString url, TQCString package, WId window, int newWindow) { url = ""; window = 0; newWindow = 0; package= "";} + virtual void openURL(TQCString url, TQCString package, WId window, int newWindow, TQCString projectFile) { url = ""; window = 0; newWindow = 0; projectFile=""; package= "";} - virtual void openTemplate(QCString openFilename, QCString package, QCString saveFilename, int newWindow) { openFilename = ""; saveFilename = ""; newWindow = 0; package= "";} - virtual void openTemplate(QCString openFilename, QCString package, QCString saveFilename, int newWindow, QCString projectFile) + virtual void openTemplate(TQCString openFilename, TQCString package, TQCString saveFilename, int newWindow) { openFilename = ""; saveFilename = ""; newWindow = 0; package= "";} + virtual void openTemplate(TQCString openFilename, TQCString package, TQCString saveFilename, int newWindow, TQCString projectFile) { openFilename = ""; saveFilename = ""; newWindow = 0; projectFile=""; package= "";} /** * open file url, if not already opened and goto entry * that is equal msgid */ - virtual void gotoFileEntry(QCString url, QCString msgid)=0; - virtual void gotoFileEntry(QCString url, QCString package, int msgid)=0; - virtual void gotoFileEntry(QCString url, QCString package, int msgid, QCString projectFile)=0; + virtual void gotoFileEntry(TQCString url, TQCString msgid)=0; + virtual void gotoFileEntry(TQCString url, TQCString package, int msgid)=0; + virtual void gotoFileEntry(TQCString url, TQCString package, int msgid, TQCString projectFile)=0; - virtual bool findInFile(QCString fileSource, QCString url, - QString findStr, int caseSensitive, int wholeWords, int isRegExp, + virtual bool findInFile(TQCString fileSource, TQCString url, + TQString findStr, int caseSensitive, int wholeWords, int isRegExp, int inMsgid, int inMsgstr, int inComment, int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave)=0; - virtual bool replaceInFile(QCString fileSource, QCString url, - QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp, + virtual bool replaceInFile(TQCString fileSource, TQCString url, + TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp, int inMsgid, int inMsgstr, int inComment, int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave)=0; - virtual bool findInFile(QCString fileSource, QCString url, - QString findStr, int caseSensitive, int wholeWords, int isRegExp, + virtual bool findInFile(TQCString fileSource, TQCString url, + TQString findStr, int caseSensitive, int wholeWords, int isRegExp, int inMsgid, int inMsgstr, int inComment, - int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, QCString project )=0; - virtual bool replaceInFile(QCString fileSource, QCString url, - QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp, + int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, TQCString project )=0; + virtual bool replaceInFile(TQCString fileSource, TQCString url, + TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp, int inMsgid, int inMsgstr, int inComment, int ignoreAccelMarker, - int ignoreContextInfo, int ask, int askForNextFile, int askForSave, QCString project )=0; - virtual void spellcheck(QStringList fileList)=0; + int ignoreContextInfo, int ask, int askForNextFile, int askForSave, TQCString project )=0; + virtual void spellcheck(TQStringList fileList)=0; }; #endif // KBABELIFACE_H diff --git a/kbabel/kbabel/kbabelpref.cpp b/kbabel/kbabel/kbabelpref.cpp index 2907f060..2592385e 100644 --- a/kbabel/kbabel/kbabelpref.cpp +++ b/kbabel/kbabel/kbabelpref.cpp @@ -42,14 +42,14 @@ #include "colorpreferences.h" #include "toolaction.h" #include "toolselectionwidget.h" -#include "qcombobox.h" +#include "tqcombobox.h" #include #include using namespace KBabel; -KBabelPreferences::KBabelPreferences(QPtrList ml) +KBabelPreferences::KBabelPreferences(TQPtrList ml) : KConfigDialog(0, "Preferences", KBabelSettings::self()) { _editorPage = new EditorPreferences(0, "editor"); @@ -59,12 +59,12 @@ KBabelPreferences::KBabelPreferences(QPtrList ml) , i18n("Options for Editing")); // this contains a custom widget for tool selection, set it up - QValueList tools = ToolAction::validationTools(); + TQValueList tools = ToolAction::validationTools(); _editorPage->_kcfg_AutoCheckTools->loadTools( "validate", tools ); - connect( _editorPage->_kcfg_AutoCheckTools, SIGNAL( added( QListBoxItem * ) ), - this, SLOT (updateButtons())); - connect( _editorPage->_kcfg_AutoCheckTools, SIGNAL( removed( QListBoxItem * ) ), - this, SLOT (updateButtons())); + connect( _editorPage->_kcfg_AutoCheckTools, TQT_SIGNAL( added( TQListBoxItem * ) ), + this, TQT_SLOT (updateButtons())); + connect( _editorPage->_kcfg_AutoCheckTools, TQT_SIGNAL( removed( TQListBoxItem * ) ), + this, TQT_SLOT (updateButtons())); addPage(_searchPage = new SearchPreferences(0, "search") , i18n("title of page in preferences dialog","Search") @@ -78,8 +78,8 @@ KBabelPreferences::KBabelPreferences(QPtrList ml) _searchPage->_kcfg_DefaultModule->insertItem(info->name); } moduleList = ml; - connect( _searchPage->_kcfg_DefaultModule, SIGNAL( activated(int) ), - this, SLOT (updateButtons())); + connect( _searchPage->_kcfg_DefaultModule, TQT_SIGNAL( activated(int) ), + this, TQT_SLOT (updateButtons())); addPage(new EditorDiffPreferences(0, "diff") ,i18n("title of page in preferences dialog","Diff") diff --git a/kbabel/kbabel/kbabelpref.h b/kbabel/kbabel/kbabelpref.h index a275e11e..6d72aaf1 100644 --- a/kbabel/kbabel/kbabelpref.h +++ b/kbabel/kbabel/kbabelpref.h @@ -36,7 +36,7 @@ #define KBABELPREF_H #include -#include +#include class SearchPreferences; class EditorPreferences; @@ -46,7 +46,7 @@ class KBabelPreferences : public KConfigDialog { Q_OBJECT public: - KBabelPreferences(QPtrList); + KBabelPreferences(TQPtrList); protected slots: virtual void slotHelp(); @@ -62,7 +62,7 @@ private: SearchPreferences* _searchPage; EditorPreferences* _editorPage; - QPtrList moduleList; + TQPtrList moduleList; }; diff --git a/kbabel/kbabel/kbabelsplash.cpp b/kbabel/kbabel/kbabelsplash.cpp index a13d8cd7..4166cffe 100644 --- a/kbabel/kbabel/kbabelsplash.cpp +++ b/kbabel/kbabel/kbabelsplash.cpp @@ -28,36 +28,36 @@ #include "kbabelsplash.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include KBabelSplash* KBabelSplash::instance = 0; -KBabelSplash::KBabelSplash( QWidget* parent, const char* name ) - : QVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose ) +KBabelSplash::KBabelSplash( TQWidget* parent, const char* name ) + : TQVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose ) { setMargin( 0 ); setSpacing( 0 ); - QLabel* picLabel = new QLabel( this ); - QPixmap pixmap; + TQLabel* picLabel = new TQLabel( this ); + TQPixmap pixmap; if( pixmap.load( locate( "data", "kbabel/pics/splash.png" ) ) ) picLabel->setPixmap( pixmap ); - picLabel->setFrameStyle(QFrame::WinPanel | QFrame::Raised); + picLabel->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised); // Set geometry, with support for Xinerama systems - QRect r; + TQRect r; r.setSize(sizeHint()); - int ps = QApplication::desktop()->primaryScreen(); - r.moveCenter( QApplication::desktop()->screenGeometry(ps).center() ); + int ps = TQApplication::desktop()->primaryScreen(); + r.moveCenter( TQApplication::desktop()->screenGeometry(ps).center() ); setGeometry(r); delete instance; @@ -65,7 +65,7 @@ KBabelSplash::KBabelSplash( QWidget* parent, const char* name ) } -void KBabelSplash::mousePressEvent( QMouseEvent* ) +void KBabelSplash::mousePressEvent( TQMouseEvent* ) { close(); } diff --git a/kbabel/kbabel/kbabelsplash.h b/kbabel/kbabel/kbabelsplash.h index 3ae14c9a..b9a92c53 100644 --- a/kbabel/kbabel/kbabelsplash.h +++ b/kbabel/kbabel/kbabelsplash.h @@ -30,7 +30,7 @@ #ifndef KBABELSPLASH_H #define KBABELSPLASH_H -#include +#include class QLabel; class QMouseEvent; @@ -43,13 +43,13 @@ class KBabelSplash : public QVBox Q_OBJECT public: - KBabelSplash( QWidget* parent = 0, const char* name = 0 ); + KBabelSplash( TQWidget* parent = 0, const char* name = 0 ); ~KBabelSplash() { instance = 0; } static KBabelSplash* instance; protected: - void mousePressEvent( QMouseEvent* ); + void mousePressEvent( TQMouseEvent* ); }; #endif diff --git a/kbabel/kbabel/kbabelview.cpp b/kbabel/kbabel/kbabelview.cpp index 2e9ebfa3..ca41a7ad 100644 --- a/kbabel/kbabel/kbabelview.cpp +++ b/kbabel/kbabel/kbabelview.cpp @@ -39,21 +39,21 @@ #include "kbabelsettings.h" #include "kbprojectsettings.h" -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -113,17 +113,17 @@ using namespace KBabel; -QPtrList *KBabelView::viewList = 0; +TQPtrList *KBabelView::viewList = 0; KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project) - : QWidget(parent) + : TQWidget(parent) , _redirectedBackSearch (false) , _project (project) , m_mainwindow (parent) , m_sourceview (0) { if(!viewList) - viewList = new QPtrList; + viewList = new TQPtrList; viewList->append(this); @@ -181,7 +181,7 @@ KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project hide(); dictBox = new KBabelDictBox(this,"dictBox"); - QWhatsThis::add(dictBox, + TQWhatsThis::add(dictBox, i18n("

          Search results

          " "

          This part of the window shows the results of searching in " "dictionaries.

          " @@ -201,68 +201,68 @@ KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project msgstrEdit->setReadOnly(true); dictBox->setEnabled(false); - connect(this, SIGNAL(signalNewFileOpened(KURL)), - m_cataloglistview, SLOT(slotNewFileOpened())); + connect(this, TQT_SIGNAL(signalNewFileOpened(KURL)), + m_cataloglistview, TQT_SLOT(slotNewFileOpened())); - connect(msgstrEdit,SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,SLOT(forwardMsgstrEditCmd(KBabel::EditCommand*))); - connect(msgstrEdit,SIGNAL(textChanged()),this - ,SIGNAL(signalMsgstrChanged())); + connect(msgstrEdit,TQT_SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,TQT_SLOT(forwardMsgstrEditCmd(KBabel::EditCommand*))); + connect(msgstrEdit,TQT_SIGNAL(textChanged()),this + ,TQT_SIGNAL(signalMsgstrChanged())); - connect(msgstrEdit,SIGNAL(textChanged(const QString&)),m_cataloglistview - ,SLOT(msgstrChanged(const QString&))); + connect(msgstrEdit,TQT_SIGNAL(textChanged(const TQString&)),m_cataloglistview + ,TQT_SLOT(msgstrChanged(const TQString&))); - connect(this,SIGNAL(signalMsgstrChanged()),this,SLOT(autoCheck())); - connect(msgstrEdit,SIGNAL(currentFormChanged(uint)), this - ,SLOT(msgstrPluralFormChanged(uint))); - - connect(msgidLabel,SIGNAL(cursorPositionChanged(int,int)) - , this, SIGNAL(signalCursorPosChanged(int,int))); - connect(msgstrEdit,SIGNAL(cursorPositionChanged(int,int)) - , this, SIGNAL(signalCursorPosChanged(int,int))); - - connect(dictBox,SIGNAL(searchStarted()),this - ,SLOT(forwardSearchStart())); - connect(dictBox, SIGNAL(progressStarts(const QString&)), this - ,SLOT(forwardProgressStart(const QString&))); - connect(dictBox,SIGNAL(progressed(int)),this - ,SIGNAL(signalProgress(int))); - connect(dictBox,SIGNAL(searchStopped()),this - ,SLOT(forwardSearchStop())); - connect(dictBox,SIGNAL(progressEnds()),this - ,SIGNAL(signalClearProgressBar())); - - connect(dictBox,SIGNAL(modulesChanged()),this, - SIGNAL(signalDictionariesChanged())); - connect(dictBox,SIGNAL(errorInModule(const QString&)),this - ,SLOT(showError(const QString&))); - - connect(_catalog,SIGNAL(signalSettingsChanged(KBabel::IdentitySettings)), - this, SLOT(setNewLanguage())); - - connect(_catalog,SIGNAL(signalNumberOfFuzziesChanged(uint)), - this, SLOT(checkFuzzies())); - connect(_catalog,SIGNAL(signalNumberOfUntranslatedChanged(uint)), - this, SLOT(checkUntranslated())); + connect(this,TQT_SIGNAL(signalMsgstrChanged()),this,TQT_SLOT(autoCheck())); + connect(msgstrEdit,TQT_SIGNAL(currentFormChanged(uint)), this + ,TQT_SLOT(msgstrPluralFormChanged(uint))); + + connect(msgidLabel,TQT_SIGNAL(cursorPositionChanged(int,int)) + , this, TQT_SIGNAL(signalCursorPosChanged(int,int))); + connect(msgstrEdit,TQT_SIGNAL(cursorPositionChanged(int,int)) + , this, TQT_SIGNAL(signalCursorPosChanged(int,int))); + + connect(dictBox,TQT_SIGNAL(searchStarted()),this + ,TQT_SLOT(forwardSearchStart())); + connect(dictBox, TQT_SIGNAL(progressStarts(const TQString&)), this + ,TQT_SLOT(forwardProgressStart(const TQString&))); + connect(dictBox,TQT_SIGNAL(progressed(int)),this + ,TQT_SIGNAL(signalProgress(int))); + connect(dictBox,TQT_SIGNAL(searchStopped()),this + ,TQT_SLOT(forwardSearchStop())); + connect(dictBox,TQT_SIGNAL(progressEnds()),this + ,TQT_SIGNAL(signalClearProgressBar())); + + connect(dictBox,TQT_SIGNAL(modulesChanged()),this, + TQT_SIGNAL(signalDictionariesChanged())); + connect(dictBox,TQT_SIGNAL(errorInModule(const TQString&)),this + ,TQT_SLOT(showError(const TQString&))); + + connect(_catalog,TQT_SIGNAL(signalSettingsChanged(KBabel::IdentitySettings)), + this, TQT_SLOT(setNewLanguage())); + + connect(_catalog,TQT_SIGNAL(signalNumberOfFuzziesChanged(uint)), + this, TQT_SLOT(checkFuzzies())); + connect(_catalog,TQT_SIGNAL(signalNumberOfUntranslatedChanged(uint)), + this, TQT_SLOT(checkUntranslated())); if(buildLeds) { - connect(this,SIGNAL(signalFuzzyDisplayed(bool)) - ,this,SLOT(toggleFuzzyLed(bool))); - connect(this,SIGNAL(signalUntranslatedDisplayed(bool)) - ,this,SLOT(toggleUntransLed(bool))); - connect(this,SIGNAL(signalFaultyDisplayed(bool)) - ,this,SLOT(toggleErrorLed(bool))); + connect(this,TQT_SIGNAL(signalFuzzyDisplayed(bool)) + ,this,TQT_SLOT(toggleFuzzyLed(bool))); + connect(this,TQT_SIGNAL(signalUntranslatedDisplayed(bool)) + ,this,TQT_SLOT(toggleUntransLed(bool))); + connect(this,TQT_SIGNAL(signalFaultyDisplayed(bool)) + ,this,TQT_SLOT(toggleErrorLed(bool))); } - _dropMenu = new QPopupMenu(this); + _dropMenu = new TQPopupMenu(this); _dropMenu->insertItem(i18n("Menu item", "Open"),ID_DROP_OPEN); _dropMenu->insertItem(i18n("Open Template"),ID_DROP_OPEN_TEMPLATE); readSettings(_config); readProject(_project); - connect (project, SIGNAL(signalSpellcheckSettingsChanged()), - this, SLOT(updateProjectSettings())); + connect (project, TQT_SIGNAL(signalSpellcheckSettingsChanged()), + this, TQT_SLOT(updateProjectSettings())); if(!_catalog->currentURL().isEmpty()) { @@ -304,10 +304,10 @@ KBabelView::~KBabelView() void KBabelView::initDockWidgets() { // setup main dock widget - original text - QWidget *tempWidget=new QWidget(this,"msgidWidget"); + TQWidget *tempWidget=new TQWidget(this,"msgidWidget"); tempWidget->setMinimumSize(350,150); - QVBoxLayout *layout=new QVBoxLayout(tempWidget); + TQVBoxLayout *layout=new TQVBoxLayout(tempWidget); msgidLabel = new HidingMsgEdit(2, this, 0, tempWidget,"msgidLabel"); msgidLabel->installEventFilter(this); @@ -330,22 +330,22 @@ void KBabelView::initDockWidgets() "Many good ideas, especially for the Catalog Manager, are taken\n" "from KTranslator by Andrea Rizzi.").arg(VERSION).arg(2006)); - QLabel *label=new QLabel(msgidLabel,i18n("O&riginal string (msgid):"),tempWidget); + TQLabel *label=new TQLabel(msgidLabel,i18n("O&riginal string (msgid):"),tempWidget); - QHBoxLayout* hb=new QHBoxLayout(layout); + TQHBoxLayout* hb=new TQHBoxLayout(layout); hb->addSpacing(KDialog::marginHint()); hb->addWidget(label); layout->addWidget(msgidLabel); layout->setStretchFactor(msgidLabel,1); - QWhatsThis::add(tempWidget, + TQWhatsThis::add(tempWidget, i18n("

          Original String

          \n\

          This part of the window shows the original message\n\ of the currently displayed entry.

          ")); KDockWidget* mainDock; - mainDock = m_mainwindow->createDockWidget( "Original", QPixmap ()); + mainDock = m_mainwindow->createDockWidget( "Original", TQPixmap ()); //i18n: translators: Dock window caption mainDock->setCaption(i18n("Original Text")); mainDock->setGeometry(50, 50, 100, 100); @@ -356,12 +356,12 @@ of the currently displayed entry.

          ")); m_mainwindow->setMainDockWidget(mainDock); // master dockwidget mainDock->show (); m_mainwindow->setView (mainDock); - connect (this, SIGNAL (signalCopy ()), this, SLOT (textCopy ())); - connect (this, SIGNAL (signalCut ()), this, SLOT (textCut ())); - connect (this, SIGNAL (signalPaste ()), this, SLOT (textPaste ())); - connect (this, SIGNAL (signalSelectAll ()), this, SLOT (selectAll ())); + connect (this, TQT_SIGNAL (signalCopy ()), this, TQT_SLOT (textCopy ())); + connect (this, TQT_SIGNAL (signalCut ()), this, TQT_SLOT (textCut ())); + connect (this, TQT_SIGNAL (signalPaste ()), this, TQT_SLOT (textPaste ())); + connect (this, TQT_SIGNAL (signalSelectAll ()), this, TQT_SLOT (selectAll ())); - KDockWidget* comment_dock = m_mainwindow->createDockWidget( "Comment", QPixmap ()); + KDockWidget* comment_dock = m_mainwindow->createDockWidget( "Comment", TQPixmap ()); //i18n: translators: Dock window caption comment_dock->setCaption(i18n("Comment")); comment_dock->setGeometry(50, 50, 100, 100); @@ -372,17 +372,17 @@ of the currently displayed entry.

          ")); KDockWidget::DockRight, // dock site 20 ); // relation target/this (in percent) comment_dock->show (); - connect (this, SIGNAL (signalCopy ()), m_commentview, SLOT (textCopy ())); - connect (this, SIGNAL (signalCut ()), m_commentview, SLOT (textCut ())); - connect (this, SIGNAL (signalPaste ()), m_commentview, SLOT (textPaste ())); - connect (this, SIGNAL (signalSelectAll ()), m_commentview, SLOT (textSelectAll ())); + connect (this, TQT_SIGNAL (signalCopy ()), m_commentview, TQT_SLOT (textCopy ())); + connect (this, TQT_SIGNAL (signalCut ()), m_commentview, TQT_SLOT (textCut ())); + connect (this, TQT_SIGNAL (signalPaste ()), m_commentview, TQT_SLOT (textPaste ())); + connect (this, TQT_SIGNAL (signalSelectAll ()), m_commentview, TQT_SLOT (textSelectAll ())); m_commentview->installEventFilter( this ); // build the msgstr widget - tempWidget=new QWidget(this,"msgstrWidget"); + tempWidget=new TQWidget(this,"msgstrWidget"); tempWidget->setMinimumSize(350,150); - layout=new QVBoxLayout(tempWidget); + layout=new TQVBoxLayout(tempWidget); // if undefined number of plural forms, use 1 int pf = _catalog->defaultNumberOfPluralForms(); @@ -393,9 +393,9 @@ of the currently displayed entry.

          ")); msgstrEdit->installEventFilter(this); KCursor::setAutoHideCursor(msgstrEdit,true); - label=new QLabel(msgstrEdit,i18n("Trans&lated string (msgstr):"),tempWidget); + label=new TQLabel(msgstrEdit,i18n("Trans&lated string (msgstr):"),tempWidget); - hb=new QHBoxLayout(layout); + hb=new TQHBoxLayout(layout); hb->setSpacing(KDialog::spacingHint()); hb->addSpacing(KDialog::marginHint()); @@ -407,7 +407,7 @@ of the currently displayed entry.

          ")); _fuzzyLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular ,tempWidget); _fuzzyLed->setFixedSize(15,12); - label = new QLabel(i18n("fuzzy"),tempWidget); + label = new TQLabel(i18n("fuzzy"),tempWidget); hb->addWidget(_fuzzyLed); hb->addWidget(label); @@ -416,7 +416,7 @@ of the currently displayed entry.

          ")); _untransLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular ,tempWidget); _untransLed->setFixedSize(15,12); - label = new QLabel(i18n("untranslated"),tempWidget); + label = new TQLabel(i18n("untranslated"),tempWidget); hb->addWidget(_untransLed); hb->addWidget(label); @@ -425,7 +425,7 @@ of the currently displayed entry.

          ")); _errorLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular ,tempWidget); _errorLed->setFixedSize(15,12); - label = new QLabel(i18n("faulty"),tempWidget); + label = new TQLabel(i18n("faulty"),tempWidget); hb->addWidget(_errorLed); hb->addWidget(label); @@ -434,24 +434,24 @@ of the currently displayed entry.

          ")); hb->addStretch(1); // ### TODO: perhaps it should be moreprecise where the setting can be changed - QString ledMsg=i18n("

          Status LEDs

          \n" + TQString ledMsg=i18n("

          Status LEDs

          \n" "

          These LEDs display the status of the currently displayed message.\n" "You can change their color in the preferences dialog section\n" "Editor on page Appearance

          "); - QWhatsThis::add(_fuzzyLed,ledMsg); - QWhatsThis::add(_untransLed,ledMsg); - QWhatsThis::add(_errorLed,ledMsg); + TQWhatsThis::add(_fuzzyLed,ledMsg); + TQWhatsThis::add(_untransLed,ledMsg); + TQWhatsThis::add(_errorLed,ledMsg); } layout->addWidget(msgstrEdit); layout->setStretchFactor(msgstrEdit,1); - QWhatsThis::add(tempWidget, + TQWhatsThis::add(tempWidget, i18n("

          Translation Editor

          \n\

          This editor displays and lets you edit the translation of the currently displayed message.

          ")); - KDockWidget* msgstr_dock = m_mainwindow->createDockWidget( "Msgstr", QPixmap ()); + KDockWidget* msgstr_dock = m_mainwindow->createDockWidget( "Msgstr", TQPixmap ()); //i18n: translators: Dock window caption msgstr_dock->setCaption(i18n("Translated String")); msgstr_dock->setEnableDocking(KDockWidget::DockCorner); @@ -461,7 +461,7 @@ of the currently displayed entry.

          ")); 50 ); // relation target/this (in percent) msgstr_dock->show (); - KDockWidget* dock = m_mainwindow->createDockWidget( "Search", QPixmap ()); + KDockWidget* dock = m_mainwindow->createDockWidget( "Search", TQPixmap ()); //i18n: translators: Dock window caption dock->setCaption(i18n("the search (noun)","Search")); //i18n: translators: Dock tab caption @@ -475,7 +475,7 @@ of the currently displayed entry.

          ")); KDockWidget* tools = dock; - dock = m_mainwindow->createDockWidget( "PO context", QPixmap ()); + dock = m_mainwindow->createDockWidget( "PO context", TQPixmap ()); //i18n: translators: Dock window caption dock->setCaption(i18n("PO Context")); //i18n: translators: Dock tab caption @@ -488,7 +488,7 @@ of the currently displayed entry.

          ")); 20 ); // relation target/this (in percent) dock->show (); - dock = m_mainwindow->createDockWidget( "Charselector", QPixmap ()); + dock = m_mainwindow->createDockWidget( "Charselector", TQPixmap ()); //i18n: translators: Dock window caption dock->setCaption(i18n("Character Table")); //i18n: translators: Dock tab caption @@ -502,7 +502,7 @@ of the currently displayed entry.

          ")); dock->show (); - dock = m_mainwindow->createDockWidget( "Tag List", QPixmap ()); + dock = m_mainwindow->createDockWidget( "Tag List", TQPixmap ()); //i18n: translators: Dock window caption dock->setCaption(i18n("Tag List")); //i18n: translators: Dock tab caption @@ -515,7 +515,7 @@ of the currently displayed entry.

          ")); 20 ); // relation target/this (in percent) dock->show (); - dock = m_mainwindow->createDockWidget( "Source Context", QPixmap ()); + dock = m_mainwindow->createDockWidget( "Source Context", TQPixmap ()); //i18n: translators: Dock window caption dock->setCaption(i18n("Source Context")); //i18n: translators: Dock tab caption @@ -528,7 +528,7 @@ of the currently displayed entry.

          ")); 20 ); // relation target/this (in percent) dock->show (); - KDockWidget* translist_dock = m_mainwindow->createDockWidget( "Translation List", QPixmap ()); + KDockWidget* translist_dock = m_mainwindow->createDockWidget( "Translation List", TQPixmap ()); translist_dock->setCaption(i18n("Translation List")); translist_dock->setGeometry(50, 50, 100, 100); translist_dock->setEnableDocking(KDockWidget::DockFullSite); @@ -537,7 +537,7 @@ of the currently displayed entry.

          ")); translist_dock->manualDock( mainDock, KDockWidget::DockTop,100); translist_dock->show (); - dock = m_mainwindow->createDockWidget( "Error List", QPixmap ()); + dock = m_mainwindow->createDockWidget( "Error List", TQPixmap ()); //i18n: translators: Dock window caption dock->setCaption(i18n("Error List")); //i18n: translators: Dock tab caption @@ -550,33 +550,33 @@ of the currently displayed entry.

          ")); 20 ); dock->show (); - connect(m_cataloglistview,SIGNAL(signalSelectionChanged(const KBabel::DocPosition&)) - ,this,SLOT(gotoEntry(const KBabel::DocPosition&))); - connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&)) - ,m_commentview,SLOT(gotoEntry(const KBabel::DocPosition&))); - connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&)) - ,m_contextview,SLOT(gotoEntry(const KBabel::DocPosition&))); - connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&)) - ,m_taglistview,SLOT(gotoEntry(const KBabel::DocPosition&))); - connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&)) - ,m_sourceview,SLOT(gotoEntry(const KBabel::DocPosition&))); - connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&)) - ,m_errorlistview,SLOT(gotoEntry(const KBabel::DocPosition&))); - connect(this,SIGNAL(signalFaultyDisplayed(bool)) - ,m_errorlistview,SLOT(updateView())); - connect(m_charselectorview, SIGNAL( characterDoubleClicked(QChar) ) - ,this, SLOT( insertChar(QChar) )); - connect(m_taglistview,SIGNAL(signalTagSelected(const QString&)) - , this, SLOT(insertTagFromTool(const QString&))); - connect(m_taglistview,SIGNAL(signalHighlightedTagChanged(int)) - , this, SLOT(skipToTagFromTool(int))); - connect(this, SIGNAL(signalNextTag(int)) - , m_taglistview, SLOT(highlightTag(int))); - connect(m_commentview,SIGNAL(signalCursorPosChanged(int,int)) - , m_mainwindow, SLOT(updateCursorPosition(int,int))); + connect(m_cataloglistview,TQT_SIGNAL(signalSelectionChanged(const KBabel::DocPosition&)) + ,this,TQT_SLOT(gotoEntry(const KBabel::DocPosition&))); + connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&)) + ,m_commentview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&))); + connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&)) + ,m_contextview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&))); + connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&)) + ,m_taglistview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&))); + connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&)) + ,m_sourceview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&))); + connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&)) + ,m_errorlistview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&))); + connect(this,TQT_SIGNAL(signalFaultyDisplayed(bool)) + ,m_errorlistview,TQT_SLOT(updateView())); + connect(m_charselectorview, TQT_SIGNAL( characterDoubleClicked(TQChar) ) + ,this, TQT_SLOT( insertChar(TQChar) )); + connect(m_taglistview,TQT_SIGNAL(signalTagSelected(const TQString&)) + , this, TQT_SLOT(insertTagFromTool(const TQString&))); + connect(m_taglistview,TQT_SIGNAL(signalHighlightedTagChanged(int)) + , this, TQT_SLOT(skipToTagFromTool(int))); + connect(this, TQT_SIGNAL(signalNextTag(int)) + , m_taglistview, TQT_SLOT(highlightTag(int))); + connect(m_commentview,TQT_SIGNAL(signalCursorPosChanged(int,int)) + , m_mainwindow, TQT_SLOT(updateCursorPosition(int,int))); } -KBabelView *KBabelView::viewForURL(const KURL& url, const QString project) +KBabelView *KBabelView::viewForURL(const KURL& url, const TQString project) { if(url.isEmpty()) return 0; @@ -587,7 +587,7 @@ KBabelView *KBabelView::viewForURL(const KURL& url, const QString project) KURL u = url; u.cleanPath(); - QPtrListIterator it(*viewList); + TQPtrListIterator it(*viewList); KBabelView *view=0; while( it.current() && !view) { @@ -605,12 +605,12 @@ KBabelView *KBabelView::viewForURL(const KURL& url, const QString project) return view; } -KBabelView *KBabelView::emptyView(const QString) +KBabelView *KBabelView::emptyView(const TQString) { if(!viewList) return 0; - QPtrListIterator it(*viewList); + TQPtrListIterator it(*viewList); KBabelView *view=0; while( it.current() && !view) { @@ -684,8 +684,8 @@ void KBabelView::readSettings(KConfig* config) if(KBabelSettings::autoUnsetFuzzy()) { - connect(msgstrEdit,SIGNAL(textChanged()) - ,this,SLOT(autoRemoveFuzzyStatus())); + connect(msgstrEdit,TQT_SIGNAL(textChanged()) + ,this,TQT_SLOT(autoRemoveFuzzyStatus())); } setupAutoCheckTools(); @@ -770,7 +770,7 @@ void KBabelView::readProject(Project::Ptr project) spell2.config->setEncoding(_spellcheckSettings.spellEncoding); spell2.config->setDictionary(_spellcheckSettings.spellDict); - spell2.kspell= new KSpell(this, "", this, SLOT(dummy(KSpell *)), + spell2.kspell= new KSpell(this, "", this, TQT_SLOT(dummy(KSpell *)), spell2.config, false, false); if(spell2.kspell->status() == KSpell::Error) kdWarning(KBABEL) << "Something's wrong with KSpell, can't start on-the-fly checking" << endl; @@ -853,13 +853,13 @@ void KBabelView::updateSettings() _errorLed->setColor(KBabelSettings::ledColor()); } - disconnect(msgstrEdit,SIGNAL(textChanged()) - ,this,SLOT(autoRemoveFuzzyStatus())); + disconnect(msgstrEdit,TQT_SIGNAL(textChanged()) + ,this,TQT_SLOT(autoRemoveFuzzyStatus())); if(KBabelSettings::autoUnsetFuzzy()) { - connect(msgstrEdit,SIGNAL(textChanged()) - ,this,SLOT(autoRemoveFuzzyStatus())); + connect(msgstrEdit,TQT_SIGNAL(textChanged()) + ,this,TQT_SLOT(autoRemoveFuzzyStatus())); } msgstrEdit->setCleverEditing(KBabelSettings::cleverEditing()); @@ -926,9 +926,9 @@ void KBabelView::setupAutoCheckTools() if(!KBabelSettings::autoCheckTools().isEmpty() ) { - QValueList tools = ToolAction::validationTools(); + TQValueList tools = ToolAction::validationTools(); - QValueList::Iterator it; + TQValueList::Iterator it; for( it=tools.begin(); it!=tools.end() ; ++it ) { if(KBabelSettings::autoCheckTools().contains((*it).service()->library()) ) @@ -942,14 +942,14 @@ void KBabelView::setupAutoCheckTools() } } -void KBabelView::setRMBEditMenu(QPopupMenu* popup) +void KBabelView::setRMBEditMenu(TQPopupMenu* popup) { msgidLabel->setContextMenu( popup ); msgstrEdit->setContextMenu( popup ); KContextMenuManager::insert(this,popup); } -void KBabelView::setRMBSearchMenu(QPopupMenu* popup) +void KBabelView::setRMBSearchMenu(TQPopupMenu* popup) { dictBox->setRMBMenu(popup); } @@ -965,7 +965,7 @@ void KBabelView::restoreView(KConfig *) void KBabelView::saveSession(KConfig* config) { - QString focus; + TQString focus; int line=0,col=0; if(msgstrEdit->hasFocus()) { @@ -1009,11 +1009,11 @@ void KBabelView::saveSession(KConfig* config) void KBabelView::restoreSession(KConfig* config) { - QString url=config->readPathEntry("URL"); + TQString url=config->readPathEntry("URL"); if(!url.isEmpty()) { - open(KURL( url ), QString::null, false,true); + open(KURL( url ), TQString::null, false,true); } @@ -1031,7 +1031,7 @@ void KBabelView::restoreSession(KConfig* config) pos.form=config->readNumEntry("PluralForm"); gotoEntry(pos); - QString focus=config->readEntry("Focus"); + TQString focus=config->readEntry("Focus"); int line=config->readNumEntry("CursorLine"); int col=config->readNumEntry("CursorCol"); if(focus=="msgstr") @@ -1067,7 +1067,7 @@ void KBabelView::newFileOpened(bool readOnly) msgstrEdit->setReadOnly(readOnly); msgstrEdit->setFocus(); - QString caption=_catalog->package(); + TQString caption=_catalog->package(); if(readOnly) caption+=i18n(" [readonly]"); emit signalChangeCaption(caption); @@ -1103,7 +1103,7 @@ void KBabelView::open() open(KURL()); } -void KBabelView::open(const KURL& _url, const QString & package, bool checkIfModified, bool newView) +void KBabelView::open(const KURL& _url, const TQString & package, bool checkIfModified, bool newView) { #if KDE_IS_VERSION( 3, 5, 0) KURL url = KIO::NetAccess::mostLocalURL(_url,this); @@ -1126,7 +1126,7 @@ void KBabelView::open(const KURL& _url, const QString & package, bool checkIfMod { if(url.isEmpty()) { - QString filename; + TQString filename; if ((url = KFileDialog::getOpenURL(currentURL().url(), CatalogImportPlugin::availableImportMimeTypes().join(" ") ,this)).isEmpty()) { @@ -1192,7 +1192,7 @@ void KBabelView::open(const KURL& _url, const QString & package, bool checkIfMod } case RECOVERED_PARSE_ERROR: { - QString msg=i18n( + TQString msg=i18n( "The file contained syntax errors and an attempt has been " "made to recover it.\n" "Please check the questionable entries by using " @@ -1243,8 +1243,8 @@ void KBabelView::open(const KURL& _url, const QString & package, bool checkIfMod _autoSaveDelay = _catalog->saveSettings( ).autoSaveDelay; if ( _autoSaveDelay ) { if ( !autoSaveTimer ) { - autoSaveTimer = new QTimer( this, "AUTOSAVE TIMER" ); - connect( autoSaveTimer, SIGNAL( timeout( ) ), this, SLOT( slotAutoSaveTimeout( ) ) ); + autoSaveTimer = new TQTimer( this, "AUTOSAVE TIMER" ); + connect( autoSaveTimer, TQT_SIGNAL( timeout( ) ), this, TQT_SLOT( slotAutoSaveTimeout( ) ) ); } autoSaveTimer->stop( ); autoSaveTimer->start( 1000 * 60 * _autoSaveDelay ); @@ -1268,7 +1268,7 @@ void KBabelView::revertToSaved() } } - open(_catalog->currentURL(),QString::null,false); + open(_catalog->currentURL(),TQString::null,false); } void KBabelView::openTemplate(const KURL& openURL, const KURL& saveURL) @@ -1448,7 +1448,7 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck) if (KIO::NetAccess::exists(url, false, this)) { - if(KMessageBox::warningContinueCancel(this,QString("%1").arg(i18n("The file %1 already exists. " + if(KMessageBox::warningContinueCancel(this,TQString("%1").arg(i18n("The file %1 already exists. " "Do you want to overwrite it?").arg(url.prettyURL())),i18n("Warning"),i18n("&Overwrite"))==KMessageBox::Cancel) { return false; @@ -1468,7 +1468,7 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck) do { // select the right error message - QString message; + TQString message; switch(stat) { case NO_PERMISSIONS: @@ -1569,7 +1569,7 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck) bool KBabelView::saveFileSpecial() { - QString tmpname; + TQString tmpname; bool result = false; { @@ -1596,7 +1596,7 @@ bool KBabelView::saveFileSpecial() , "filesave" , i18n("Options for File Saving")); - if( _prefDialog->exec() == QDialog::Accepted ) + if( _prefDialog->exec() == TQDialog::Accepted ) { SaveSettings settings = project->saveSettings(); SaveSettings originalSettings = _catalog->saveSettings(); @@ -1607,7 +1607,7 @@ bool KBabelView::saveFileSpecial() } } - QFile::remove( tmpname ); + TQFile::remove( tmpname ); return result; } @@ -1623,11 +1623,11 @@ bool KBabelView::checkSyntax(bool msgOnlyAtError,bool question) return false; bool returnCode=true; - QString output; + TQString output; Msgfmt::Status result=_catalog->checkSyntax( output ); - const QStringList outputLines = QStringList::split("\n",output); + const TQStringList outputLines = TQStringList::split("\n",output); switch(result) { @@ -1654,7 +1654,7 @@ bool KBabelView::checkSyntax(bool msgOnlyAtError,bool question) case Msgfmt::HeaderError: case Msgfmt::SyntaxError: { - QString msg = ( result == Msgfmt::SyntaxError ) + TQString msg = ( result == Msgfmt::SyntaxError ) ? i18n("msgfmt detected a syntax error.\n") : i18n("msgfmt detected a header syntax error.\n"); @@ -1695,7 +1695,7 @@ bool KBabelView::checkSyntax(bool msgOnlyAtError,bool question) case Msgfmt::NoExecutable: case Msgfmt::Error: { - QString msg = i18n("While trying to check syntax with msgfmt an error occurred.\n" + TQString msg = i18n("While trying to check syntax with msgfmt an error occurred.\n" "Please make sure that you have installed\n" "the GNU gettext package properly."); if(question) @@ -1742,9 +1742,9 @@ bool KBabelView::checkAll() bool a,badresult=false; - QValueList tools = ToolAction::validationTools(); + TQValueList tools = ToolAction::validationTools(); - QValueList::ConstIterator entry = tools.begin(); + TQValueList::ConstIterator entry = tools.begin(); for( ; entry != tools.end(); ++entry ) { KDataTool* tool = (*entry).createTool(); @@ -1756,7 +1756,7 @@ bool KBabelView::checkAll() } } - QString output; + TQString output; a = (_catalog->checkSyntax(output, false)!=Msgfmt::Ok); badresult=badresult||a; @@ -1831,7 +1831,7 @@ void KBabelView::updateEditor(int form, bool delay) if(KBabelSettings::autoUnsetFuzzy() && !msgstrEdit->isModified()) { - disconnect(msgstrEdit,SIGNAL(textChanged()),this,SLOT(autoRemoveFuzzyStatus())); + disconnect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus())); } msgidLabel->setText(_catalog->msgid(_currentIndex), _catalog->msgctxt(_currentIndex)); @@ -1844,7 +1844,7 @@ void KBabelView::updateEditor(int form, bool delay) if(KBabelSettings::autoUnsetFuzzy() && _catalog->isFuzzy(_currentIndex)) { - connect(msgstrEdit,SIGNAL(textChanged()),this,SLOT(autoRemoveFuzzyStatus())); + connect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus())); } msgstrEdit->blockSignals(false); @@ -1862,7 +1862,7 @@ void KBabelView::updateEditor(int form, bool delay) { if (delay) { - QTimer::singleShot(0, this, SLOT (startSearch())); + TQTimer::singleShot(0, this, TQT_SLOT (startSearch())); } else { @@ -2034,7 +2034,7 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui) r = KMessageBox::questionYesNo(this, i18n("%n replacement made.
          End of document reached.
          Continue from the beginning?
          ", "%n replacements made.
          End of document reached.
          Continue from the beginning?
          ", - _replacesTotal), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()); + _replacesTotal), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()); } else { r = KMessageBox::Yes; @@ -2042,7 +2042,7 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui) } else { r = KMessageBox::questionYesNo(this,i18n("End of document reached.\n" - "Continue from the beginning?"), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()); + "Continue from the beginning?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()); } if(r == KMessageBox::Yes) { if(opts.inMsgid && !forReplace) @@ -2078,23 +2078,23 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui) if( opts.askForNextFile ) { int r = KMessageBox::questionYesNo(this,i18n("End of document reached.\n" - "Continue in the next file?"), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()); + "Continue in the next file?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()); if( r != KMessageBox::Yes ) return false; } if( isModified() && !opts.askForSave ) saveFile(); DCOPClient *client = kapp->dcopClient(); - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; bool morefiles = false; // more files to lookup in if( !client->call( _fileSource,"CatalogManagerIFace", "findNextFile()", data, replyType, replyData) ) kdDebug(KBABEL) << "unable to call, reply type is " << replyType << endl; - else if( replyType == "QCString" ) + else if( replyType == "TQCString" ) { - QDataStream rep( replyData, IO_ReadOnly); - QCString f; + TQDataStream rep( replyData, IO_ReadOnly); + TQCString f; rep >> f; - QString foundFile = QString::fromUtf8(f); + TQString foundFile = TQString::fromUtf8(f); morefiles = !f.isEmpty() && !f.isNull(); if( morefiles ) { @@ -2219,7 +2219,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui) r = KMessageBox::questionYesNo(this, i18n("%n replacement made.
          Beginning of document reached.
          Continue from the end?
          ", "%n replacements made.
          Beginning of document reached.
          Continue from the end?
          ", - _replacesTotal),QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()); + _replacesTotal),TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()); } else { r = KMessageBox::Yes; @@ -2228,7 +2228,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui) } else { r = KMessageBox::questionYesNo(this,i18n("Beginning of document reached.\n" - "Continue from the end?"), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()); + "Continue from the end?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()); } if(r == KMessageBox::Yes) { pos.item = _catalog->numberOfEntries()-1; @@ -2345,7 +2345,7 @@ void KBabelView::find() _findDialog = new FindDialog(false,this); } - QString marked; + TQString marked; if(msgstrEdit->hasFocus()) { marked=msgstrEdit->selectedText(); msgstrEdit->selectAll(false); @@ -2363,7 +2363,7 @@ void KBabelView::find() if(marked==_lastFoundString) marked=""; - if( _findDialog->exec(marked) == QDialog::Accepted ) { + if( _findDialog->exec(marked) == TQDialog::Accepted ) { DocPosition pos; FindOptions opts=_findDialog->findOpts(); opts.askFile = false; // do not search in more files @@ -2443,7 +2443,7 @@ void KBabelView::replace() if( !_replaceDialog ) { _replaceDialog = new FindDialog(true,this); } - QString marked; + TQString marked; if(msgstrEdit->hasFocus()) { marked=msgstrEdit->selectedText(); msgstrEdit->selectAll(false); @@ -2460,7 +2460,7 @@ void KBabelView::replace() if(marked==_lastFoundString) marked=""; - if( _replaceDialog->exec(marked) == QDialog::Accepted ) { + if( _replaceDialog->exec(marked) == TQDialog::Accepted ) { KBabel::ReplaceOptions opts=_replaceDialog->replaceOpts(); if(opts.fromCursor) { _findBreakAtEnd=false; @@ -2518,9 +2518,9 @@ void KBabelView::replace() if(success) { if(!_replaceAskDialog) { _replaceAskDialog = new ReplaceDialog(this); - connect(_replaceAskDialog,SIGNAL(replace()),this,SLOT(replaceNext())); - connect(_replaceAskDialog,SIGNAL(next()),this,SLOT(findNextReplace())); - connect(_replaceAskDialog,SIGNAL(replaceAll()),this,SLOT(replaceAll())); + connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext())); + connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace())); + connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll())); } if(opts.ask) { @@ -2551,7 +2551,7 @@ void KBabelView::replaceNext() Part part; uint form = 0; - QString str; + TQString str; if(_replacePos.part==Msgstr) { part=Msgstr; @@ -2629,7 +2629,7 @@ void KBabelView::replaceAll() Part part; uint form=0; - QString str; + TQString str; if(_replacePos.part==Msgstr) { part=Msgstr; @@ -2689,7 +2689,7 @@ void KBabelView::findNextReplace() } -void KBabelView::findInFile(QCString fileSource, FindOptions options) +void KBabelView::findInFile(TQCString fileSource, FindOptions options) { DocPosition pos; pos.item=0; @@ -2714,7 +2714,7 @@ void KBabelView::findInFile(QCString fileSource, FindOptions options) findNext_internal(pos); } -void KBabelView::replaceInFile(QCString fileSource, KBabel::ReplaceOptions options) +void KBabelView::replaceInFile(TQCString fileSource, KBabel::ReplaceOptions options) { _replacePos.item=0; _replacePos.part=Msgid; @@ -2749,9 +2749,9 @@ void KBabelView::replaceInFile(QCString fileSource, KBabel::ReplaceOptions optio else { if(!_replaceAskDialog) { _replaceAskDialog = new ReplaceDialog(this); - connect(_replaceAskDialog,SIGNAL(replace()),this,SLOT(replaceNext())); - connect(_replaceAskDialog,SIGNAL(next()),this,SLOT(findNextReplace())); - connect(_replaceAskDialog,SIGNAL(replaceAll()),this,SLOT(replaceAll())); + connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext())); + connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace())); + connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll())); } if(options.ask) { @@ -2800,7 +2800,7 @@ void KBabelView::clear() void KBabelView::msgid2msgstr() { // FIXME: should care about plural forms - QString text = _catalog->msgid(_currentIndex).first(); + TQString text = _catalog->msgid(_currentIndex).first(); // this is KDE specific: if(text.find("_: NAME OF TRANSLATORS\\n")==0) @@ -2830,7 +2830,7 @@ void KBabelView::msgid2msgstr() // end of KDE specific part - QRegExp reg=_catalog->miscSettings().contextInfo; + TQRegExp reg=_catalog->miscSettings().contextInfo; if(text.contains(reg)) { text.replace(reg,""); @@ -3182,7 +3182,7 @@ void KBabelView::editHeader() int x=w/2-editWidth/2; int y=h/2-editHeight/2; - editor->move(mapToGlobal(QPoint(x,y))); + editor->move(mapToGlobal(TQPoint(x,y))); editor->show(); editor->raise(); @@ -3202,8 +3202,8 @@ void KBabelView::startSearch() void KBabelView::startSearch(bool delay) { - QString msg = _catalog->msgid(_currentIndex,true).first(); - QRegExp reg=_catalog->miscSettings().contextInfo; + TQString msg = _catalog->msgid(_currentIndex,true).first(); + TQRegExp reg=_catalog->miscSettings().contextInfo; if(msg.contains(reg)) { msg.replace(reg,""); @@ -3220,11 +3220,11 @@ void KBabelView::startSearch(bool delay) } } -void KBabelView::startSearch(const QString module) +void KBabelView::startSearch(const TQString module) { // FIXME: should care about plural forms - QString msg = _catalog->msgid(_currentIndex,true).first(); - QRegExp reg=_catalog->miscSettings().contextInfo; + TQString msg = _catalog->msgid(_currentIndex,true).first(); + TQRegExp reg=_catalog->miscSettings().contextInfo; if(msg.contains(reg)) { msg.replace(reg,""); @@ -3240,7 +3240,7 @@ void KBabelView::startSelectionSearch() startSelectionSearch(KBabelSettings::defaultModule()); } -void KBabelView::startSelectionSearch(const QString module) +void KBabelView::startSelectionSearch(const TQString module) { dictBox->setActiveModule(module); @@ -3256,8 +3256,8 @@ void KBabelView::startSelectionSearch(const QString module) else { // should care about plural forms - QString msg = _catalog->msgid(_currentIndex,true).first(); - QRegExp reg=_catalog->miscSettings().contextInfo; + TQString msg = _catalog->msgid(_currentIndex,true).first(); + TQRegExp reg=_catalog->miscSettings().contextInfo; if(msg.contains(reg)) { msg.replace(reg,""); @@ -3299,8 +3299,8 @@ void KBabelView::emitEntryState() if(isError) { - QPalette palette=msgstrEdit->palette(); - palette.setColor( QColorGroup::Text, red ); + TQPalette palette=msgstrEdit->palette(); + palette.setColor( TQColorGroup::Text, red ); if( _catalog->itemStatus(_currentIndex).contains("syntax error")) { @@ -3335,7 +3335,7 @@ void KBabelView::checkUntranslated() void KBabelView::autoRemoveFuzzyStatus() { // only at first text change remove fuzzy status - disconnect(msgstrEdit,SIGNAL(textChanged()),this,SLOT(autoRemoveFuzzyStatus())); + disconnect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus())); //removeFuzzyStatus(); } @@ -3398,18 +3398,18 @@ void KBabelView::toggleErrorLed(bool on) -void KBabelView::showError(const QString& message) +void KBabelView::showError(const TQString& message) { KMessageBox::error(this,message); } -void KBabelView::dragEnterEvent(QDragEnterEvent *event) +void KBabelView::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void KBabelView::dropEvent(QDropEvent *event) +void KBabelView::dropEvent(TQDropEvent *event) { KURL::List uri; @@ -3421,33 +3421,33 @@ void KBabelView::dropEvent(QDropEvent *event) } -bool KBabelView::eventFilter( QObject* object, QEvent* event) +bool KBabelView::eventFilter( TQObject* object, TQEvent* event) { - if(event->type() == QEvent::DragEnter) + if(event->type() == TQEvent::DragEnter) { - QDragEnterEvent* e = (QDragEnterEvent*) event; + TQDragEnterEvent* e = (TQDragEnterEvent*) event; if(KURLDrag::canDecode(e)) { e->accept(true); return true; } } - else if(event->type() == QEvent::Drop) + else if(event->type() == TQEvent::Drop) { KURL::List uri; // see if we can decode a URI.. if not, just ignore it - if (KURLDrag::decode((QDropEvent*)event, uri)) + if (KURLDrag::decode((TQDropEvent*)event, uri)) { - processUriDrop(uri ,( (QWidget*)object)->mapToGlobal( ( (QDropEvent*)event )->pos())); + processUriDrop(uri ,( (TQWidget*)object)->mapToGlobal( ( (TQDropEvent*)event )->pos())); return true; } } - else if(event->type() == QEvent::KeyPress) + else if(event->type() == TQEvent::KeyPress) { // This is a little workaround to use CTRL+ALT+Home, CTRL+ALT+End, Undo keys // to go to the first and the last entry. Because otherwise // CTRL+Home and CTRL+End and Undo are caught by QTextEdit - QKeyEvent *ke = (QKeyEvent*)event; + TQKeyEvent *ke = (TQKeyEvent*)event; if(ke->key() == Key_Home && ke->state() == (AltButton | ControlButton)) { @@ -3480,7 +3480,7 @@ bool KBabelView::eventFilter( QObject* object, QEvent* event) return false; } -void KBabelView::processUriDrop(KURL::List& uriList, const QPoint& pos) +void KBabelView::processUriDrop(KURL::List& uriList, const TQPoint& pos) { // if we have two entries, the chance is high, that it // is a drag from the catalog manager @@ -3526,12 +3526,12 @@ void KBabelView::forwardMsgstrEditCmd(EditCommand* cmd) /* if(cmd->terminator()!=0) { - kdDebug(KBABEL) << QString::number(cmd->terminator()) << endl; + kdDebug(KBABEL) << TQString::number(cmd->terminator()) << endl; } else { DelTextCmd* delcmd = (DelTextCmd*) cmd; - kdDebug(KBABEL) << QString::number(delcmd->offset)+":"+delcmd->str+"|" << endl; + kdDebug(KBABEL) << TQString::number(delcmd->offset)+":"+delcmd->str+"|" << endl; } */ bool fuzzyRemoved=false; @@ -3576,9 +3576,9 @@ void KBabelView::autoCheck(bool onlyWhenChanged) { if( !_autocheckTools.isEmpty() ) { - QStringList oldStatus = _catalog->itemStatus(_currentIndex); + TQStringList oldStatus = _catalog->itemStatus(_currentIndex); - QStringList status = _catalog->itemStatus( _currentIndex,true, _autocheckTools ); + TQStringList status = _catalog->itemStatus( _currentIndex,true, _autocheckTools ); // if there is more than one view, the status changes only in // one view, so we have to update always. @@ -3587,12 +3587,12 @@ void KBabelView::autoCheck(bool onlyWhenChanged) if( !status.isEmpty() ) { - QString msg = ""; + TQString msg = ""; // ### TODO: whynot use i18n("context",text) directly? KLocale* locale=KGlobal::locale(); - for( QStringList::iterator it=status.begin() ; it != status.end() ; ++it ) + for( TQStringList::iterator it=status.begin() ; it != status.end() ; ++it ) { if( msg.isEmpty() ) msg = locale->translate("what check found errors",(*it).utf8()); else msg += ", "+locale->translate("what check found errors",(*it).utf8()); @@ -3712,20 +3712,20 @@ void KBabelView::spellcheckCommon() delete spellDlg; } -void KBabelView::addSpellcheckWords( uint pos, QString text, uint index, uint form ) +void KBabelView::addSpellcheckWords( uint pos, TQString text, uint index, uint form ) { // special format chars - QString spclChars="abfnrtv'\"?\\"; - QChar accelMarker=_catalog->miscSettings().accelMarker; + TQString spclChars="abfnrtv'\"?\\"; + TQChar accelMarker=_catalog->miscSettings().accelMarker; uint textLength=text.length(); do { - QString word=""; + TQString word=""; bool wordBegin=false; while(!wordBegin && pos < textLength) { - QChar c=text[pos]; + TQChar c=text[pos]; if(c.isLetter() || c==accelMarker) { wordBegin=true; @@ -3830,7 +3830,7 @@ void KBabelView::spellcheck() spell.lastIndex=_currentIndex; _tagExtractor->setString(msgstrEdit->selectedText()); - QString marked=_tagExtractor->plainString(true); + TQString marked=_tagExtractor->plainString(true); addSpellcheckWords(msgstrEdit->beginOfMarkedText(),marked ,_currentIndex,msgstrEdit->currentForm()); @@ -3839,7 +3839,7 @@ void KBabelView::spellcheck() { uint first=0; uint last=_catalog->numberOfEntries()-1; - QString text; + TQString text; bool emitProgress=false; @@ -3863,12 +3863,12 @@ void KBabelView::spellcheck() int pos=msgstrEdit->currentIndex(); int form=msgstrEdit->currentForm(); - QStringList msgs = _catalog->msgstr(_currentIndex); + TQStringList msgs = _catalog->msgstr(_currentIndex); _tagExtractor->setString((*msgs.at(form))); text=_tagExtractor->plainString(true); addSpellcheckWords( pos, text, _currentIndex, form++ ); - for( QStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++) + for( TQStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++) { _tagExtractor->setString(*i); text=_tagExtractor->plainString(true); @@ -3903,9 +3903,9 @@ void KBabelView::spellcheck() kapp->processEvents(100); } - QStringList msgs=_catalog->msgstr(i); + TQStringList msgs=_catalog->msgstr(i); uint formCounter=0; - for(QStringList::Iterator j=msgs.begin() ; j!=msgs.end() ; ++j) + for(TQStringList::Iterator j=msgs.begin() ; j!=msgs.end() ; ++j) { _tagExtractor->setString(*j); text=_tagExtractor->plainString(true); @@ -3918,12 +3918,12 @@ void KBabelView::spellcheck() int pos=msgstrEdit->currentIndex(); int form=msgstrEdit->currentForm(); - QStringList msgs = _catalog->msgstr(_currentIndex); + TQStringList msgs = _catalog->msgstr(_currentIndex); _tagExtractor->setString((*msgs.at(form)).left(pos)); text=_tagExtractor->plainString(true); addSpellcheckWords( 0, text, _currentIndex, form++ ); - for( QStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++) + for( TQStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++) { _tagExtractor->setString(*i); text=_tagExtractor->plainString(true); @@ -3943,7 +3943,7 @@ void KBabelView::spellcheck() _dontBeep=true; spell.kspell= new KSpell (this, i18n("Spellcheck"), - this, SLOT(spellStart(KSpell *)), spell.config, true, true); + this, TQT_SLOT(spellStart(KSpell *)), spell.config, true, true); if( spell.kspell->status() == KSpell::Error ) { KMessageBox::error( this, i18n("KBabel cannot start spell checker. " @@ -3951,20 +3951,20 @@ void KBabelView::spellcheck() return; } - connect(spell.kspell, SIGNAL(death()),this, SLOT(spellCleanDone())); + connect(spell.kspell, TQT_SIGNAL(death()),this, TQT_SLOT(spellCleanDone())); - connect(spell.kspell, SIGNAL(misspelling(const QString &, const QStringList & + connect(spell.kspell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList & , unsigned int)), this - , SLOT(spellMisspelled(const QString &, const QStringList &, unsigned int))); + , TQT_SLOT(spellMisspelled(const TQString &, const TQStringList &, unsigned int))); - connect(spell.kspell, SIGNAL(corrected(const QString &, const QString &, unsigned int)) - , this, SLOT(spellCorrected(const QString &, const QString &, unsigned int))); + connect(spell.kspell, TQT_SIGNAL(corrected(const TQString &, const TQString &, unsigned int)) + , this, TQT_SLOT(spellCorrected(const TQString &, const TQString &, unsigned int))); - connect(spell.kspell,SIGNAL(ignoreall(const QString &)) - , this, SLOT(spellAddIgnore(const QString &))); + connect(spell.kspell,TQT_SIGNAL(ignoreall(const TQString &)) + , this, TQT_SLOT(spellAddIgnore(const TQString &))); - connect(spell.kspell, SIGNAL(done(bool)) - , this, SLOT(spellResult(bool))); + connect(spell.kspell, TQT_SIGNAL(done(bool)) + , this, TQT_SLOT(spellResult(bool))); spell.kspell->setAutoDelete(true); // let KSpell handle delete } @@ -3980,7 +3980,7 @@ void KBabelView::spellStart(KSpell *) // set ignored words if(_spellcheckSettings.rememberIgnored) { - QString urlString = _spellcheckSettings.ignoreURL; + TQString urlString = _spellcheckSettings.ignoreURL; if(urlString.contains("@PACKAGE@")) { urlString.replace("@PACKAGE@",_catalog->packageName()); @@ -3989,15 +3989,15 @@ void KBabelView::spellStart(KSpell *) KURL url(urlString); if(url.isLocalFile()) { - QFile file(url.path()); + TQFile file(url.path()); if(file.open(IO_ReadOnly)) { - QTextStream stream(&file); - stream.setEncoding(QTextStream::UnicodeUTF8); - QString contents = stream.read(); + TQTextStream stream(&file); + stream.setEncoding(TQTextStream::UnicodeUTF8); + TQString contents = stream.read(); file.close(); - spell.ignoreList = QStringList::split('\n',contents); + spell.ignoreList = TQStringList::split('\n',contents); } else if(file.exists()) { @@ -4023,7 +4023,7 @@ void KBabelView::spellStart(KSpell *) uint total = spell.ignoreList.count(); uint oldPercent=0; uint counter=0; - QStringList::Iterator it; + TQStringList::Iterator it; for(it=spell.ignoreList.begin(); it != spell.ignoreList.end(); ++it) { counter++; @@ -4045,7 +4045,7 @@ void KBabelView::spellStart(KSpell *) } -bool KBabelView::markMisspelled(const QString &orig, unsigned int pos) +bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos) { Position *p = spell.posDict.at(pos); if(!p) @@ -4081,9 +4081,9 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos) int end=p->end+spell.posCorrection-spell.inWordCorrection; // check if this is the correct word - QString text = *_catalog->msgstr(p->index).at(p->form); + TQString text = *_catalog->msgstr(p->index).at(p->form); text=text.mid(begin,end-begin); - QChar accelMarker=_catalog->miscSettings().accelMarker; + TQChar accelMarker=_catalog->miscSettings().accelMarker; if(text.contains(accelMarker)) { @@ -4104,7 +4104,7 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos) if( n > 0 ) { // re-get the original text since we replace some things above - QString text = *_catalog->msgstr(p->index).at(p->form); + TQString text = *_catalog->msgstr(p->index).at(p->form); text=text.mid(begin,end-begin); bool textFound=false; @@ -4126,7 +4126,7 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos) if(e<0) e=text.length(); - QString w=text.mid(lastPos,e-lastPos); + TQString w=text.mid(lastPos,e-lastPos); if(w.contains(accelMarker)) { w.replace(accelMarker,""); @@ -4183,7 +4183,7 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos) return textOk; } -void KBabelView::spellMisspelled(const QString &orig, const QStringList &, unsigned int pos) +void KBabelView::spellMisspelled(const TQString &orig, const TQStringList &, unsigned int pos) { kdDebug(KBABEL) << "misspelled: " << orig << " pos: " << pos << endl; @@ -4192,11 +4192,11 @@ void KBabelView::spellMisspelled(const QString &orig, const QStringList &, unsig markMisspelled(orig,pos); } -void KBabelView::spellCorrected(const QString &orig, const QString &word, unsigned int pos) +void KBabelView::spellCorrected(const TQString &orig, const TQString &word, unsigned int pos) { if(orig != word) { - QString newWord(word); + TQString newWord(word); kdDebug(KBABEL) << "corrected: " << orig << " " << newWord << " pos: " << pos << endl; @@ -4222,12 +4222,12 @@ void KBabelView::spellCorrected(const QString &orig, const QString &word, unsign if(markMisspelled(orig,pos)) { - QString marked=msgstrEdit->selectedText(); + TQString marked=msgstrEdit->selectedText(); spell.origWords.append(marked); if(marked.contains("\n") && !newWord.contains('\n')) { - QString s1=newWord; + TQString s1=newWord; s1.replace(" ","\n"); // if only a newline has been replaced with a white space @@ -4240,11 +4240,11 @@ void KBabelView::spellCorrected(const QString &orig, const QString &word, unsign // check if the old word had an accelerator. If yes and the new // word has no accelerator, try to add the accelerator for // the same char else add in at the same position - QChar accelMarker=_catalog->miscSettings().accelMarker; + TQChar accelMarker=_catalog->miscSettings().accelMarker; if(marked.contains(accelMarker) && !newWord.contains(accelMarker)) { int b=marked.find(accelMarker); - QChar accel=marked[b+1]; + TQChar accel=marked[b+1]; int nb=newWord.find(accel,0,false); if(nb>=0) { @@ -4308,9 +4308,9 @@ void KBabelView::spellResult(bool flag) else if(spell.replaced > 0 && spell.what2Check!=Current && spell.what2Check!=Marked) { - QStringList list; - QStringList::Iterator origIt; - QStringList::Iterator newIt; + TQStringList list; + TQStringList::Iterator origIt; + TQStringList::Iterator newIt; origIt=spell.origWords.begin(); newIt=spell.newWords.begin(); @@ -4332,12 +4332,12 @@ void KBabelView::spellResult(bool flag) KURL url(_spellcheckSettings.ignoreURL); if(url.isLocalFile()) { - QFile file(url.path()); + TQFile file(url.path()); if(file.open(IO_WriteOnly|IO_Append)) { - QStringList::Iterator it; - QTextStream stream(&file); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQStringList::Iterator it; + TQTextStream stream(&file); + stream.setEncoding(TQTextStream::UnicodeUTF8); for(it=spell.newIgnoreList.begin(); it!=spell.newIgnoreList.end(); @@ -4368,7 +4368,7 @@ void KBabelView::spellResult(bool flag) spell.kspell->cleanUp(); emit signalSpellcheckDone(s); - QTimer::singleShot(0,this,SLOT(cleanUpSpellStruct())); + TQTimer::singleShot(0,this,TQT_SLOT(cleanUpSpellStruct())); } @@ -4420,7 +4420,7 @@ void KBabelView::cancelSpellcheck() spell.active=false; } -void KBabelView::spellAddIgnore(const QString &word) +void KBabelView::spellAddIgnore(const TQString &word) { if(!spell.ignoreList.contains(word)) { @@ -4440,7 +4440,7 @@ void KBabelView::forwardSearchStop() emit signalSearchActive(false); } -void KBabelView::forwardProgressStart(const QString& msg) +void KBabelView::forwardProgressStart(const TQString& msg) { emit signalResetProgressBar(msg,100); } @@ -4458,16 +4458,16 @@ void KBabelView::slotAutoSaveTimeout( ) void KBabelView::useProject (Project::Ptr project) { // FIXME: close the current project first - disconnect (_project, SIGNAL(signalSpellcheckSettingsChanged()), - this, SLOT(updateProjectSettings())); + disconnect (_project, TQT_SIGNAL(signalSpellcheckSettingsChanged()), + this, TQT_SLOT(updateProjectSettings())); _project = project; _catalog->useProject(_project); readProject(_project); - connect (project, SIGNAL(signalSpellcheckSettingsChanged()), - this, SLOT(updateProjectSettings())); + connect (project, TQT_SIGNAL(signalSpellcheckSettingsChanged()), + this, TQT_SLOT(updateProjectSettings())); } #include "kbabelview.moc" diff --git a/kbabel/kbabel/kbabelview.h b/kbabel/kbabel/kbabelview.h index a52ed4dc..fb86cd6b 100644 --- a/kbabel/kbabel/kbabelview.h +++ b/kbabel/kbabel/kbabelview.h @@ -65,8 +65,8 @@ struct ModuleInfo; #include #include #include -#include -#include +#include +#include #include #include @@ -90,7 +90,7 @@ class TagListView; * @author Matthias Kiefer * @version 0.1 */ -class KBabelView : public QWidget, public KBabel::CatalogView +class KBabelView : public TQWidget, public KBabel::CatalogView { Q_OBJECT public: @@ -109,16 +109,16 @@ public: * @return the view, that has opened file url or 0 if this * file is not opened */ - static KBabelView *viewForURL(const KURL& url, const QString project); + static KBabelView *viewForURL(const KURL& url, const TQString project); /** * @return the view, that has no opened file url or 0 if there * is no such view */ - static KBabelView *emptyView(const QString project); + static KBabelView *emptyView(const TQString project); KURL currentURL() const; - QString project() const { return _project->filename(); } + TQString project() const { return _project->filename(); } void useProject (KBabel::Project::Ptr project); bool isLastView() const; @@ -178,7 +178,7 @@ public: KBCatalog* catalog() const{return _catalog;} - void processUriDrop(KURL::List& uriList, const QPoint & pos); + void processUriDrop(KURL::List& uriList, const TQPoint & pos); /** * checks the status of the displayed entry: last, first, fuzzy,... @@ -186,12 +186,12 @@ public: */ void emitEntryState(); - void setRMBEditMenu(QPopupMenu*); - void setRMBSearchMenu(QPopupMenu*); - void setTagsMenu(QPopupMenu*); - void setArgsMenu(QPopupMenu*); + void setRMBEditMenu(TQPopupMenu*); + void setRMBSearchMenu(TQPopupMenu*); + void setTagsMenu(TQPopupMenu*); + void setArgsMenu(TQPopupMenu*); - QPtrList dictionaries(); + TQPtrList dictionaries(); KBabelDictBox* searchView() { return dictBox; } bool autoDiffEnabled() const {return _diffEnabled;} @@ -202,7 +202,7 @@ public slots: /** opens a filedialog and asks for an url */ void open(); - void open(const KURL& url, const QString & package=QString::null, bool checkModified=true, bool newView=false); + void open(const KURL& url, const TQString & package=TQString::null, bool checkModified=true, bool newView=false); void setFilePackage(); void revertToSaved(); @@ -217,8 +217,8 @@ public slots: bool findNext(); bool findPrev(); void find(); - void findInFile(QCString fileSource, KBabel::FindOptions options); - void replaceInFile(QCString fileSource, KBabel::ReplaceOptions options); + void findInFile(TQCString fileSource, KBabel::FindOptions options); + void replaceInFile(TQCString fileSource, KBabel::ReplaceOptions options); void replace(); void selectAll(); void deselectAll(); @@ -259,7 +259,7 @@ public slots: void insertNextTag(); void insertNextTagMsgid(); void insertNextArg(); - void insertTagFromTool( const QString& tag ); + void insertTagFromTool( const TQString& tag ); void showTagsMenu(); void showArgsMenu(); void skipToNextTag(); @@ -282,23 +282,23 @@ public slots: void stopSearch(); void startSearch(); void startSelectionSearch(); - void startSearch(const QString id); - void startSelectionSearch(const QString id); + void startSearch(const TQString id); + void startSelectionSearch(const TQString id); - void configureDictionary(const QString id); - void editDictionary(const QString id); - void aboutDictionary(const QString id); + void configureDictionary(const TQString id); + void editDictionary(const TQString id); + void aboutDictionary(const TQString id); /** * this was originally protected, but we need this to expose for * KBabelMW forwarding */ - virtual void wheelEvent(QWheelEvent*); + virtual void wheelEvent(TQWheelEvent*); protected: - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); - virtual bool eventFilter(QObject*, QEvent* event); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); + virtual bool eventFilter(TQObject*, TQEvent* event); signals: /** emited when a fuzzy catalogentry is shown */ @@ -346,15 +346,15 @@ signals: /** * Use this signal to change the content of the statusbar */ - void signalChangeStatusbar(const QString& text); + void signalChangeStatusbar(const TQString& text); /** * Use this signal to change the content of the caption */ - void signalChangeCaption(const QString& text); + void signalChangeCaption(const TQString& text); void signalNewFileOpened(KURL url); - void signalResetProgressBar(QString,int); + void signalResetProgressBar(TQString,int); void signalProgress(int); void signalClearProgressBar(); @@ -365,7 +365,7 @@ signals: void signalForwardHistory(bool have); void signalBackHistory(bool have); - void ledColorChanged(const QColor& color); + void ledColorChanged(const TQColor& color); void signalDictionariesChanged(); @@ -441,12 +441,12 @@ private: * Inserts a text into the msgstr (into the current form) using undoable commands. * if @param clearFirst is set to true, it will clear the contents of msgstr before inserting */ - void modifyMsgstrText(const uint offset, const QString& text, bool clearFirst=false); + void modifyMsgstrText(const uint offset, const TQString& text, bool clearFirst=false); protected slots: - bool validateUsingTool( const KDataToolInfo & info, const QString & command ); - void modifyUsingTool( const KDataToolInfo & info, const QString & command ); - void modifyCatalogUsingTool( const KDataToolInfo & info, const QString & command ); + bool validateUsingTool( const KDataToolInfo & info, const TQString & command ); + void modifyUsingTool( const KDataToolInfo & info, const TQString & command ); + void modifyCatalogUsingTool( const KDataToolInfo & info, const TQString & command ); private slots: void msgstrPluralFormChanged (uint index); @@ -455,7 +455,7 @@ private slots: /** connected to the catalog. it is called when a new file is opened*/ void newFileOpened(bool readOnly); - void showError(const QString& message); + void showError(const TQString& message); void toggleFuzzyLed(bool on); void toggleUntransLed(bool on); @@ -493,7 +493,7 @@ private slots: void informDictionary(); void setNewLanguage(); - void forwardProgressStart(const QString& msg); + void forwardProgressStart(const TQString& msg); void forwardSearchStart(); void forwardSearchStop(); @@ -520,14 +520,14 @@ private slots: void insertArg(int n); void updateArgs(); - void insertChar(QChar ch); + void insertChar(TQChar ch); void showTryLaterMessageBox(); void dummy(KSpell*) {} private: - static QPtrList *viewList; + static TQPtrList *viewList; HidingMsgEdit* msgstrEdit; HidingMsgEdit* msgidLabel; @@ -537,7 +537,7 @@ private: FindDialog* _replaceDialog; ReplaceDialog* _replaceAskDialog; - QPopupMenu* _dropMenu; + TQPopupMenu* _dropMenu; KLed* _fuzzyLed; KLed* _untransLed; @@ -551,8 +551,8 @@ private: bool _autoSearchTempDisabled; - QValueList _backHistory; - QValueList _forwardHistory; + TQValueList _backHistory; + TQValueList _forwardHistory; // flag to not beep, when switching to the next entry, because // go -> next or prev entry was used. @@ -566,7 +566,7 @@ private: /** * the string that was marked during the last search */ - QString _lastFoundString; + TQString _lastFoundString; /* * flag, if internal find functions should break at end or ask for @@ -590,13 +590,13 @@ private: int _replaceExtraOffset; /** appId for a source of the next files to be searched */ - QCString _fileSource; + TQCString _fileSource; - QStringList _tags; - QPopupMenu *_tagsMenu; + TQStringList _tags; + TQPopupMenu *_tagsMenu; - QStringList _args; - QPopupMenu *_argsMenu; + TQStringList _args; + TQPopupMenu *_argsMenu; bool _diffEnabled; bool _loadingDiffFile; @@ -606,7 +606,7 @@ private: * flag, set if editing KDE documentation PO-file */ bool _editingDocumentation; - QPtrList _autocheckTools; + TQPtrList _autocheckTools; //spellcheck things private: @@ -624,13 +624,13 @@ private: { KSpell *kspell; KSpellConfig* config; - QStringList wordList; + TQStringList wordList; bool active; int misspelled; int replaced; int posCorrection; uint lastIndex; - QPtrList posDict; + TQPtrList posDict; SpellWhat what2Check; // the last word, that was misspelled @@ -639,11 +639,11 @@ private: // needed if words with '-' are treated as seperate words int inWordCorrection; - QStringList origWords; - QStringList newWords; + TQStringList origWords; + TQStringList newWords; - QStringList ignoreList; - QStringList newIgnoreList; + TQStringList ignoreList; + TQStringList newIgnoreList; } spell; struct { @@ -665,23 +665,23 @@ private: * @returns false, if the there is a synchronization error, * means the word has not been found in the editor. */ - bool markMisspelled(const QString &orig, unsigned int pos); + bool markMisspelled(const TQString &orig, unsigned int pos); private slots: void spellcheck(); void cancelSpellcheck(); void spellStart(KSpell*); - void spellMisspelled(const QString &orig, const QStringList &sug, unsigned int pos); - void spellCorrected(const QString &orig, const QString &newWord, unsigned int pos); + void spellMisspelled(const TQString &orig, const TQStringList &sug, unsigned int pos); + void spellCorrected(const TQString &orig, const TQString &newWord, unsigned int pos); void spellResult(bool); void spellCleanDone(); - void spellAddIgnore(const QString &); + void spellAddIgnore(const TQString &); // initialize spellchecking struct void cleanUpSpellStruct(); void slotAutoSaveTimeout( ); private: - void addSpellcheckWords(uint pos, QString text, uint index, uint form); + void addSpellcheckWords(uint pos, TQString text, uint index, uint form); private: // configuration file @@ -692,7 +692,7 @@ private: KBabel::RegExpExtractor* _tagExtractor; KBabel::RegExpExtractor* _argExtractor; - QTimer * autoSaveTimer; + TQTimer * autoSaveTimer; int _autoSaveDelay; int _currentTag; diff --git a/kbabel/kbabel/kbabelview2.cpp b/kbabel/kbabel/kbabelview2.cpp index c07990d0..101674a3 100644 --- a/kbabel/kbabel/kbabelview2.cpp +++ b/kbabel/kbabel/kbabelview2.cpp @@ -43,12 +43,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "catalogsettings.h" #include "editcmd.h" @@ -65,25 +65,25 @@ using namespace KBabel; -QPtrList KBabelView::dictionaries() +TQPtrList KBabelView::dictionaries() { - QPtrList list = dictBox->moduleInfos(); + TQPtrList list = dictBox->moduleInfos(); return list; } -void KBabelView::configureDictionary(const QString id) +void KBabelView::configureDictionary(const TQString id) { dictBox->configure(id); } -void KBabelView::editDictionary(const QString id) +void KBabelView::editDictionary(const TQString id) { dictBox->edit(id); } -void KBabelView::aboutDictionary(const QString id) +void KBabelView::aboutDictionary(const TQString id) { dictBox->aboutModule(id); } @@ -121,7 +121,7 @@ void KBabelView::setNewLanguage() } -void KBabelView::wheelEvent(QWheelEvent *e) +void KBabelView::wheelEvent(TQWheelEvent *e) { if( _catalog->numberOfEntries() == 0 ) return; @@ -196,12 +196,12 @@ void KBabelView::updateTags() { _tagsMenu->clear(); - QStringList tList; - QStringList::Iterator it; + TQStringList tList; + TQStringList::Iterator it; int counter=0; for(it=_tags.begin(); it!=_tags.end(); ++it) { - QString s = *it; + TQString s = *it; if( s.startsWith("&") ) s = "&"+s; if(!tList.contains(s)) { @@ -259,7 +259,7 @@ void KBabelView::selectTag() // count number of eofs in tag uint diff=0; // FIXME: what about plural forms - QString msgid = _catalog->msgid(_currentIndex).first(); + TQString msgid = _catalog->msgid(_currentIndex).first(); for( uint i = _tagExtractor->matchIndex(_currentTag); i < _tagExtractor->matchIndex(_currentTag)+_tags[_currentTag].length()+1; i++ ) { @@ -269,14 +269,14 @@ void KBabelView::selectTag() emit signalNextTag (_currentTag); } -void KBabelView::setTagsMenu(QPopupMenu *menu) +void KBabelView::setTagsMenu(TQPopupMenu *menu) { _tagsMenu=menu; - connect(_tagsMenu,SIGNAL(activated(int)),this,SLOT(insertTag(int))); + connect(_tagsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(insertTag(int))); } -void KBabelView::modifyMsgstrText(const uint offset, const QString& text, bool clearFirst) +void KBabelView::modifyMsgstrText(const uint offset, const TQString& text, bool clearFirst) { _catalog->applyBeginCommand( _currentIndex, Msgstr ,this); @@ -296,7 +296,7 @@ void KBabelView::modifyMsgstrText(const uint offset, const QString& text, bool c void KBabelView::insertTag(int n) { - QString tag = _tagsMenu->text(n); + TQString tag = _tagsMenu->text(n); if( tag.startsWith( "&&" ) ) tag = tag.remove(0,1); // replace && -> &. && is used for correct menu display modifyMsgstrText( msgstrEdit->currentIndex(), tag ); @@ -324,9 +324,9 @@ void KBabelView::insertNextTagMsgid() int offset = msgstrEdit->beginOfLastMarkedText(); //msgstrEdit->currentIndex(); - QString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset); + TQString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset); - QString t; + TQString t; if( _catalog->pluralForm( _currentIndex ) == KDESpecific ) { @@ -359,7 +359,7 @@ void KBabelView::showTagsMenu() { int y=msgstrEdit->height()/2; int x=msgstrEdit->width()/2; - _tagsMenu->exec(msgstrEdit->mapToGlobal( QPoint(x,y) ) ); + _tagsMenu->exec(msgstrEdit->mapToGlobal( TQPoint(x,y) ) ); return; } @@ -376,12 +376,12 @@ void KBabelView::updateArgs() { _argsMenu->clear(); - QStringList tList; - QStringList::Iterator it; + TQStringList tList; + TQStringList::Iterator it; int counter=0; for(it=_args.begin(); it!=_args.end(); ++it) { - QString s = *it; + TQString s = *it; if(!tList.contains(s)) { _argsMenu->insertItem(s,counter); @@ -403,17 +403,17 @@ void KBabelView::updateArgs() } } -void KBabelView::setArgsMenu(QPopupMenu *menu) +void KBabelView::setArgsMenu(TQPopupMenu *menu) { _argsMenu=menu; - connect(_argsMenu,SIGNAL(activated(int)),this,SLOT(insertArg(int))); + connect(_argsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(insertArg(int))); } void KBabelView::insertArg(int n) { - QString arg = _argsMenu->text(n); + TQString arg = _argsMenu->text(n); modifyMsgstrText( msgstrEdit->currentIndex(), arg ); } @@ -422,7 +422,7 @@ void KBabelView::insertNextArg() { int offset = msgstrEdit->currentIndex(); - QString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset); + TQString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset); if( _catalog->pluralForm( _currentIndex ) == KDESpecific ) { @@ -444,7 +444,7 @@ void KBabelView::insertNextArg() return; } - QString t=_args[num]; + TQString t=_args[num]; modifyMsgstrText( offset,t ); } @@ -455,7 +455,7 @@ void KBabelView::showArgsMenu() { int y=msgstrEdit->height()/2; int x=msgstrEdit->width()/2; - _argsMenu->exec(msgstrEdit->mapToGlobal( QPoint(x,y) ) ); + _argsMenu->exec(msgstrEdit->mapToGlobal( TQPoint(x,y) ) ); return; } @@ -507,7 +507,7 @@ void KBabelView::diffInternal(bool autoDf) _diffing = true; uint diffIndex = _currentIndex; - QString diffString; + TQString diffString; Catalog::DiffResult r = _catalog->diff(_currentIndex, &diffString); @@ -521,9 +521,9 @@ void KBabelView::diffInternal(bool autoDf) bool wasEnabled=_diffEnabled; _diffEnabled=false; - QValueList diffList; - QString error; - QString package = _catalog->packageName()+".po"; + TQValueList diffList; + TQString error; + TQString package = _catalog->packageName()+".po"; kdDebug(KBABEL) << "getting list for " << package << endl; if(dictBox->messagesForPackage(package,diffList,error)) @@ -569,12 +569,12 @@ void KBabelView::diffInternal(bool autoDf) case 2: { // get the list of all entries - QValueList diffList = _catalog->asDiffList(); + TQValueList diffList = _catalog->asDiffList(); - QValueList resultList; + TQValueList resultList; // swap msgstr and msgid - QValueList::iterator it; + TQValueList::iterator it; DiffEntry entry; for ( it = diffList.begin(); it != diffList.end(); ++it ) @@ -663,18 +663,18 @@ bool KBabelView::openDiffFile(bool autoDiff) KURL poBaseURL( _project->catManSettings().poBaseDir ); - QString poBase = poBaseURL.path(); + TQString poBase = poBaseURL.path(); int len = poBase.length(); if(fileURL.path().left(len) == poBase) { - QString fileRelPath = fileURL.path().mid(len); + TQString fileRelPath = fileURL.path().mid(len); if(fileRelPath[0] == '/') fileRelPath=fileRelPath.mid(1); if(_project->settings()->diffBaseDir().right(1) != "/") _project->settings()->diffBaseDir() += '/'; - QString diffFilePath = _project->settings()->diffBaseDir() + fileRelPath; + TQString diffFilePath = _project->settings()->diffBaseDir() + fileRelPath; KURL diffFileURL(diffFilePath); @@ -706,7 +706,7 @@ bool KBabelView::openDiffFile(bool autoDiff) Catalog cat; - connect(&cat,SIGNAL(signalProgress(int)),this,SIGNAL(signalProgress(int))); + connect(&cat,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(signalProgress(int))); emit signalResetProgressBar(i18n("loading file for diff"),100); ConversionStatus stat = cat.openURL(url); @@ -786,19 +786,19 @@ void KBabelView::showTryLaterMessageBox() this, "information", true, true, KStdGuiItem::ok() ); - QVBox *topcontents = new QVBox (dialog); + TQVBox *topcontents = new TQVBox (dialog); topcontents->setSpacing(KDialog::spacingHint()*2); topcontents->setMargin(KDialog::marginHint()*2); - QWidget *contents = new QWidget(topcontents); - QHBoxLayout * lay = new QHBoxLayout(contents); + TQWidget *contents = new TQWidget(topcontents); + TQHBoxLayout * lay = new TQHBoxLayout(contents); lay->setSpacing(KDialog::spacingHint()*2); lay->addStretch(1); - QLabel *label1 = new QLabel( contents); - label1->setPixmap(QMessageBox::standardIcon(QMessageBox::Information)); + TQLabel *label1 = new TQLabel( contents); + label1->setPixmap(TQMessageBox::standardIcon(TQMessageBox::Information)); lay->add( label1 ); - QLabel *label2 = new QLabel( i18n("The search string has not been found yet.\n" + TQLabel *label2 = new TQLabel( i18n("The search string has not been found yet.\n" "However, the string might be found " "in the files being searched at the moment.\n" "Please try later."), contents); @@ -807,11 +807,11 @@ void KBabelView::showTryLaterMessageBox() lay->add( label2 ); lay->addStretch(1); - QCheckBox *checkbox = new QCheckBox(i18n("Do not show in this find/replace session again"), topcontents); + TQCheckBox *checkbox = new TQCheckBox(i18n("Do not show in this find/replace session again"), topcontents); dialog->setMainWidget(topcontents); dialog->enableButtonSeparator(false); - dialog->incInitialSize( QSize(50,0) ); + dialog->incInitialSize( TQSize(50,0) ); dialog->exec(); @@ -822,7 +822,7 @@ void KBabelView::showTryLaterMessageBox() void KBabelView::setFilePackage() { bool result=false; - QString p = KInputDialog::getText(QString::null, i18n("Enter new package for the current file:"),_catalog->package(),&result,this); + TQString p = KInputDialog::getText(TQString::null, i18n("Enter new package for the current file:"),_catalog->package(),&result,this); if( result ) { _catalog->setPackage(p); @@ -830,7 +830,7 @@ void KBabelView::setFilePackage() } } -void KBabelView::insertTagFromTool( const QString& tag ) +void KBabelView::insertTagFromTool( const TQString& tag ) { modifyMsgstrText(msgstrEdit->currentIndex(),tag); @@ -848,14 +848,14 @@ void KBabelView::plural2msgstr() int currentFormBegin, currentFormEnd, pos; uint i; - QStringList msgs = _catalog->msgstr(_currentIndex); - QString text= *msgs.at(msgstrEdit->currentForm()); + TQStringList msgs = _catalog->msgstr(_currentIndex); + TQString text= *msgs.at(msgstrEdit->currentForm()); uint numForms = _catalog->numberOfPluralForms(_currentIndex); if( text.isEmpty() || _catalog->pluralForm(_currentIndex) == NoPluralForm) return; - QString result; + TQString result; switch( _catalog->pluralForm(_currentIndex) ) { @@ -864,7 +864,7 @@ void KBabelView::plural2msgstr() _catalog->applyBeginCommand( _currentIndex, Msgstr ,this); i=0; - for( QStringList::Iterator it=msgs.begin() ; it!=msgs.end() ; ++it ) + for( TQStringList::Iterator it=msgs.begin() ; it!=msgs.end() ; ++it ) { if( i!= msgstrEdit->currentForm() ) { @@ -912,7 +912,7 @@ void KBabelView::plural2msgstr() text=text.mid(currentFormBegin,currentFormEnd-currentFormBegin); - QString result=text; + TQString result=text; for( i=1; icheckUsingTool(tool); emitEntryState(); - QString checkName = *(info.userCommands().at( info.commands().findIndex(command) )); + TQString checkName = *(info.userCommands().at( info.commands().findIndex(command) )); if(result) { @@ -972,7 +972,7 @@ bool KBabelView::validateUsingTool( const KDataToolInfo & info, const QString &c return result; } -void KBabelView::modifyUsingTool( const KDataToolInfo & info, const QString &command ) +void KBabelView::modifyUsingTool( const KDataToolInfo & info, const TQString &command ) { KDataTool* tool = info.createTool(); if( !tool ) @@ -987,7 +987,7 @@ void KBabelView::modifyUsingTool( const KDataToolInfo & info, const QString &com delete tool; } -void KBabelView::modifyCatalogUsingTool( const KDataToolInfo & info, const QString &command ) +void KBabelView::modifyCatalogUsingTool( const KDataToolInfo & info, const TQString &command ) { KDataTool* tool = info.createTool(); if( !tool ) @@ -1002,7 +1002,7 @@ void KBabelView::modifyCatalogUsingTool( const KDataToolInfo & info, const QStri delete tool; } -void KBabelView::insertChar( QChar ch ) +void KBabelView::insertChar( TQChar ch ) { if( isReadOnly() || _catalog->package().isEmpty() ) return; diff --git a/kbabel/kbabel/kbbookmarkhandler.cpp b/kbabel/kbabel/kbbookmarkhandler.cpp index fde1b051..2685905b 100644 --- a/kbabel/kbabel/kbbookmarkhandler.cpp +++ b/kbabel/kbabel/kbbookmarkhandler.cpp @@ -31,15 +31,15 @@ **************************************************************************** */ -#include -#include -#include +#include +#include +#include #include "kbbookmarkhandler.h" // implementation of KBabelBookmark -KBabelBookmark::KBabelBookmark(int msgindex, QString msgtext) +KBabelBookmark::KBabelBookmark(int msgindex, TQString msgtext) { _msgindex = msgindex; if (msgtext.length() > 32) { @@ -49,7 +49,7 @@ KBabelBookmark::KBabelBookmark(int msgindex, QString msgtext) // insert one '&' before every consecutive group of ampersands to keep the // first of these from acting either as accelerator or mask in the menu - QRegExp rx("&+"); + TQRegExp rx("&+"); int pos = msgtext.find(rx); while (pos >= 0) { msgtext.insert(pos, '&'); @@ -64,14 +64,14 @@ int KBabelBookmark::msgindex() const return _msgindex; } -QString KBabelBookmark::msgtext() const +TQString KBabelBookmark::msgtext() const { return _msgtext; } // implementation of KBabelBookmarkHandler -KBabelBookmarkHandler::KBabelBookmarkHandler(QPopupMenu* menu) +KBabelBookmarkHandler::KBabelBookmarkHandler(TQPopupMenu* menu) { _menu = menu; _list.setAutoDelete(true); @@ -80,7 +80,7 @@ KBabelBookmarkHandler::KBabelBookmarkHandler(QPopupMenu* menu) void KBabelBookmarkHandler::addBookmark(KBabelBookmark* b) { // check if a bookmark to the current msgid exists already - QPtrListIterator it(_list); + TQPtrListIterator it(_list); KBabelBookmark* temp; while((temp = it.current()) != 0) { @@ -94,18 +94,18 @@ void KBabelBookmarkHandler::addBookmark(KBabelBookmark* b) // if it's okay then add the bookmark _list.append(b); - _menu->insertItem(QString("#%1 - %2").arg(b->msgindex()).arg(b->msgtext()), - this, SIGNAL(signalBookmarkSelected(int)), 0, b->msgindex()); + _menu->insertItem(TQString("#%1 - %2").arg(b->msgindex()).arg(b->msgtext()), + this, TQT_SIGNAL(signalBookmarkSelected(int)), 0, b->msgindex()); } -void KBabelBookmarkHandler::addBookmark(int msgindex, QString msgtext) +void KBabelBookmarkHandler::addBookmark(int msgindex, TQString msgtext) { addBookmark(new KBabelBookmark(msgindex, msgtext)); } -void KBabelBookmarkHandler::setBookmarks(QPtrList list) +void KBabelBookmarkHandler::setBookmarks(TQPtrList list) { - QPtrListIterator it(list); + TQPtrListIterator it(list); KBabelBookmark* temp; while((temp = it.current()) != 0) { @@ -114,7 +114,7 @@ void KBabelBookmarkHandler::setBookmarks(QPtrList list) } } -QPtrList KBabelBookmarkHandler::bookmarks() const +TQPtrList KBabelBookmarkHandler::bookmarks() const { return _list; } diff --git a/kbabel/kbabel/kbbookmarkhandler.h b/kbabel/kbabel/kbbookmarkhandler.h index f47c2dbf..42e94959 100644 --- a/kbabel/kbabel/kbbookmarkhandler.h +++ b/kbabel/kbabel/kbbookmarkhandler.h @@ -34,8 +34,8 @@ #ifndef KBBOOKMARKHANDLER_H #define KBBOOKMARKHANDLER_H -#include -#include +#include +#include class QPopupMenu; class QString; @@ -55,7 +55,7 @@ class KBabelBookmark * @param msgindex the index of the bookmarked msgid. * @param msgtext the msgid. */ - KBabelBookmark(int msgindex, QString msgtext); + KBabelBookmark(int msgindex, TQString msgtext); /** * Return the index of the msgid. @@ -68,7 +68,7 @@ class KBabelBookmark * * @return the msgid. */ - QString msgtext() const; + TQString msgtext() const; private: /** @@ -78,7 +78,7 @@ class KBabelBookmark /** * The classes' own copy of the msgid. */ - QString _msgtext; + TQString _msgtext; }; @@ -96,7 +96,7 @@ class KBabelBookmarkHandler : public QObject * @param menu the pointer to the menu where the bookmarks will be * displayed. */ - KBabelBookmarkHandler(QPopupMenu* menu); + KBabelBookmarkHandler(TQPopupMenu* menu); /** * Add a bookmark. @@ -113,20 +113,20 @@ class KBabelBookmarkHandler : public QObject * @param msgindex the index of the bookmark's msgid. * @param msgtext the msgindex of the bookmark to be added. */ - void addBookmark(int msgindex, QString msgtext); + void addBookmark(int msgindex, TQString msgtext); /** * Provide the handler with a list of bookmarks. * Especially useful when creating a new view of the KBabel window. * * @param list the list to be copied. */ - void setBookmarks(QPtrList list); + void setBookmarks(TQPtrList list); /** * Return the list of bookmarks for a new view of the KBabel window. * * @return the internal list of bookmarks */ - QPtrList bookmarks() const; + TQPtrList bookmarks() const; public slots: /** @@ -145,11 +145,11 @@ class KBabelBookmarkHandler : public QObject /** * The pointer to the menu. */ - QPopupMenu* _menu; + TQPopupMenu* _menu; /** * The internal list for storing the bookmarks. */ - QPtrList _list; + TQPtrList _list; }; #endif // KBBOOKMARKHANDLER_H diff --git a/kbabel/kbabel/kbcatalog.cpp b/kbabel/kbabel/kbcatalog.cpp index 52205484..4c4e269a 100644 --- a/kbabel/kbabel/kbcatalog.cpp +++ b/kbabel/kbabel/kbcatalog.cpp @@ -35,7 +35,7 @@ #include "headereditor.h" -KBCatalog::KBCatalog(QString configFile, QObject* parent, const char* name) +KBCatalog::KBCatalog(TQString configFile, TQObject* parent, const char* name) : KBabel::Catalog(parent,name,configFile) { _headerEditor=0; diff --git a/kbabel/kbabel/kbcatalog.h b/kbabel/kbabel/kbcatalog.h index ae6508cf..2c2846d4 100644 --- a/kbabel/kbabel/kbcatalog.h +++ b/kbabel/kbabel/kbcatalog.h @@ -48,7 +48,7 @@ class KBCatalog : public KBabel::Catalog Q_OBJECT public: - KBCatalog(QString configFile = QString::null ,QObject* parent=0, const char* name=0); + KBCatalog(TQString configFile = TQString::null ,TQObject* parent=0, const char* name=0); virtual ~KBCatalog(); HeaderEditor* headerEditor(); diff --git a/kbabel/kbabel/kbcataloglistview.cpp b/kbabel/kbabel/kbcataloglistview.cpp index 51f9b008..e04da3c2 100644 --- a/kbabel/kbabel/kbcataloglistview.cpp +++ b/kbabel/kbabel/kbcataloglistview.cpp @@ -28,17 +28,17 @@ #include #include -#include -#include +#include +#include #include using namespace KBabel; -KBCatalogListView::KBCatalogListView(KBCatalog* catalog, QWidget *parent, KBabel::Project::Ptr project) - : QWidget(parent) +KBCatalogListView::KBCatalogListView(KBCatalog* catalog, TQWidget *parent, KBabel::Project::Ptr project) + : TQWidget(parent) { m_catalog= catalog; - QVBoxLayout* layout=new QVBoxLayout(this); + TQVBoxLayout* layout=new TQVBoxLayout(this); m_listview = new KListView(this, "catalogListView"); m_listview->addColumn(i18n("Id")); @@ -52,7 +52,7 @@ KBCatalogListView::KBCatalogListView(KBCatalog* catalog, QWidget *parent, KBabel layout->addWidget(m_listview); layout->setStretchFactor(m_listview,1); - connect(m_listview,SIGNAL(selectionChanged(QListViewItem *)), this,SLOT(selectionChanged(QListViewItem *))); + connect(m_listview,TQT_SIGNAL(selectionChanged(TQListViewItem *)), this,TQT_SLOT(selectionChanged(TQListViewItem *))); } KBCatalogListView::~KBCatalogListView() @@ -60,7 +60,7 @@ KBCatalogListView::~KBCatalogListView() } -void KBCatalogListView::selectionChanged ( QListViewItem * item) +void KBCatalogListView::selectionChanged ( TQListViewItem * item) { DocPosition pos; int number = m_items->find(reinterpret_cast(item)); @@ -74,7 +74,7 @@ void KBCatalogListView::selectionChanged ( QListViewItem * item) void KBCatalogListView::setSelectedItem(int index) { - QListViewItem * item = m_items->at(index); + TQListViewItem * item = m_items->at(index); // block signals - don't reemit the selected item signal blockSignals(true); @@ -100,7 +100,7 @@ void KBCatalogListView::update(EditCommand* cmd, bool undo) */ } -void KBCatalogListView::msgstrChanged(const QString& str) +void KBCatalogListView::msgstrChanged(const TQString& str) { KBCatalogListViewItem * item = reinterpret_cast(m_listview->selectedItem()); item->setMsgStr(str); @@ -112,12 +112,12 @@ void KBCatalogListView::slotNewFileOpened() KBCatalogListViewItem * tempItem; if(m_catalog) { - m_items = new QPtrVector(m_catalog->numberOfEntries()); + m_items = new TQPtrVector(m_catalog->numberOfEntries()); for(uint i=0;inumberOfEntries();i++) { - QString msgid = ( *m_catalog->msgid(i).at(0) ); - QString msgstr = ( *m_catalog->msgstr(i).at(0) ); + TQString msgid = ( *m_catalog->msgid(i).at(0) ); + TQString msgstr = ( *m_catalog->msgstr(i).at(0) ); tempItem = new KBCatalogListViewItem(m_listview,0,i+1, msgid, msgstr); diff --git a/kbabel/kbabel/kbcataloglistview.h b/kbabel/kbabel/kbcataloglistview.h index d9737871..c2c46bdf 100644 --- a/kbabel/kbabel/kbcataloglistview.h +++ b/kbabel/kbabel/kbcataloglistview.h @@ -23,11 +23,11 @@ #ifndef KBCATALOGLISTVIEW_H #define KBCATALOGLISTVIEW_H -#include +#include #include #include -#include -//#include +#include +//#include #include #include "catalog.h" #include "kbcatalog.h" @@ -47,11 +47,11 @@ class KListView; /** @author */ -class KBCatalogListView : public QWidget, public KBabel::CatalogView +class KBCatalogListView : public TQWidget, public KBabel::CatalogView { Q_OBJECT public: - KBCatalogListView(KBCatalog* catalog, QWidget *parent, KBabel::Project::Ptr project); + KBCatalogListView(KBCatalog* catalog, TQWidget *parent, KBabel::Project::Ptr project); ~KBCatalogListView(); @@ -68,15 +68,15 @@ signals: public slots: virtual void slotNewFileOpened(); - void msgstrChanged(const QString&); + void msgstrChanged(const TQString&); private: KListView * m_listview; KBCatalog* m_catalog; - QPtrVector* m_items; + TQPtrVector* m_items; private slots: - void selectionChanged ( QListViewItem * item); + void selectionChanged ( TQListViewItem * item); }; #endif diff --git a/kbabel/kbabel/kbcataloglistviewitem.cpp b/kbabel/kbabel/kbcataloglistviewitem.cpp index 5a4012a2..4bbc3049 100644 --- a/kbabel/kbabel/kbcataloglistviewitem.cpp +++ b/kbabel/kbabel/kbcataloglistviewitem.cpp @@ -23,10 +23,10 @@ #include "kbcataloglistviewitem.h" #include -KBCatalogListViewItem::KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, QString msgid, QString msgstr) +KBCatalogListViewItem::KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, TQString msgid, TQString msgstr) : Super(lv, parent, "","",""), m_id(id), m_msgid(msgid), m_msgstr(msgstr) { - setText(0,QString::number(id)); + setText(0,TQString::number(id)); } @@ -34,14 +34,14 @@ KBCatalogListViewItem::~KBCatalogListViewItem() { } -void KBCatalogListViewItem::setMsgId(const QString& st) +void KBCatalogListViewItem::setMsgId(const TQString& st) { m_msgid = st; setup(); repaint(); } -void KBCatalogListViewItem::setMsgStr(const QString& st) +void KBCatalogListViewItem::setMsgStr(const TQString& st) { m_msgstr = st; setup(); @@ -60,10 +60,10 @@ void KBCatalogListViewItem::setId(const uint id) repaint(); } -QString KBCatalogListViewItem::key ( int column, bool ascending ) const{ +TQString KBCatalogListViewItem::key ( int column, bool ascending ) const{ if(column==0) - return QString().sprintf("%.8u", m_id); + return TQString().sprintf("%.8u", m_id); else if(column==1) return m_msgid; else if(column==2) @@ -84,7 +84,7 @@ void KBCatalogListViewItem::setup() makeDocAvailable(); - QListView* lv = listView(); + TQListView* lv = listView(); m_doc_msgid->setWidth(std::max(1, int(lv->columnWidth(1)))); m_doc_msgstr->setWidth(std::max(1, int(lv->columnWidth(2)))); @@ -97,7 +97,7 @@ void KBCatalogListViewItem::setup() } -void KBCatalogListViewItem::paintMsgIdCell(QPainter* p, const QColorGroup& cg, +void KBCatalogListViewItem::paintMsgIdCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align) { // check width @@ -123,11 +123,11 @@ void KBCatalogListViewItem::paintMsgIdCell(QPainter* p, const QColorGroup& cg, // draw it - m_doc_msgid->draw(p, 0, 0, QRect(0,0, width, height()), cg); + m_doc_msgid->draw(p, 0, 0, TQRect(0,0, width, height()), cg); } -void KBCatalogListViewItem::paintMsgStrCell(QPainter* p, const QColorGroup& cg, +void KBCatalogListViewItem::paintMsgStrCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align) { // check width @@ -162,11 +162,11 @@ void KBCatalogListViewItem::paintMsgStrCell(QPainter* p, const QColorGroup& cg, // draw it - m_doc_msgstr->draw(p, 0, 0, QRect(0,0, width, height()), cg); + m_doc_msgstr->draw(p, 0, 0, TQRect(0,0, width, height()), cg); } -void KBCatalogListViewItem::paintCell(QPainter* p, const QColorGroup& cg, +void KBCatalogListViewItem::paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align) { assert(m_doc_msgid.get() && m_doc_msgstr.get() && p); @@ -195,16 +195,16 @@ void KBCatalogListViewItem::makeDocAvailable() assert(listView()); - m_doc_msgid.reset(new QSimpleRichText( + m_doc_msgid.reset(new TQSimpleRichText( formatMsg(m_msgid), listView()->font())); - m_doc_msgstr.reset(new QSimpleRichText( + m_doc_msgstr.reset(new TQSimpleRichText( formatMsg(m_msgstr), listView()->font())); } -QString KBCatalogListViewItem::formatMsg(const QString str) +TQString KBCatalogListViewItem::formatMsg(const TQString str) { // TODO: Use KBHighlighting for this - QString tmp_msgid = str; + TQString tmp_msgid = str; tmp_msgid = tmp_msgid.replace( "\\n", "
          " ); tmp_msgid = tmp_msgid.replace( "<", "<" ); tmp_msgid = tmp_msgid.replace( ">", ">" ); diff --git a/kbabel/kbabel/kbcataloglistviewitem.h b/kbabel/kbabel/kbcataloglistviewitem.h index 8fa6704a..4a24c159 100644 --- a/kbabel/kbabel/kbcataloglistviewitem.h +++ b/kbabel/kbabel/kbcataloglistviewitem.h @@ -24,7 +24,7 @@ #define KBCATALOGLISTVIEWITEM_H #include #include -#include +#include #include "mymultilineedit.h" /** @@ -34,39 +34,39 @@ class KBCatalogListViewItem : public KListViewItem { typedef KListViewItem Super; public: - KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, QString msgid, QString msgstr); + KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, TQString msgid, TQString msgstr); ~KBCatalogListViewItem(); - void setMsgId(const QString& st); - void setMsgStr(const QString& st); + void setMsgId(const TQString& st); + void setMsgStr(const TQString& st); void setId(const uint id); uint getId(); protected: virtual void setup(); - virtual QString key ( int column, bool ascending ) const; + virtual TQString key ( int column, bool ascending ) const; - virtual void paintCell(QPainter* p, const QColorGroup& cg, + virtual void paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align); private: void makeDocAvailable(); - void paintMsgIdCell(QPainter* p, const QColorGroup& cg, + void paintMsgIdCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align); - void paintMsgStrCell(QPainter* p, const QColorGroup& cg, + void paintMsgStrCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align); - QString formatMsg(const QString str); + TQString formatMsg(const TQString str); uint m_id; - QString m_msgid; - QString m_msgstr; + TQString m_msgid; + TQString m_msgstr; - std::auto_ptr m_doc_msgid; - std::auto_ptr m_doc_msgstr; + std::auto_ptr m_doc_msgid; + std::auto_ptr m_doc_msgstr; }; #endif diff --git a/kbabel/kbabel/kbcatalogview.cpp b/kbabel/kbabel/kbcatalogview.cpp index ba8e9c03..ae701c4e 100644 --- a/kbabel/kbabel/kbcatalogview.cpp +++ b/kbabel/kbabel/kbcatalogview.cpp @@ -36,8 +36,8 @@ using namespace KBabel; -KBCatalogView::KBCatalogView(KBCatalog* catalog, QWidget* parent, Project::Ptr project) - : QWidget (parent), KBabel::CatalogView () , _project (project) +KBCatalogView::KBCatalogView(KBCatalog* catalog, TQWidget* parent, Project::Ptr project) + : TQWidget (parent), KBabel::CatalogView () , _project (project) { if (catalog == 0) kdFatal(KBABEL) << "catalog==0" << endl; @@ -49,8 +49,8 @@ KBCatalogView::KBCatalogView(KBCatalog* catalog, QWidget* parent, Project::Ptr p _currentIndex=1; // here we use 1 to accept update at opening a file - connect ( _project, SIGNAL (signalSettingsChanged()), this, SLOT (readProjectSettings()) ); - connect ( _catalog, SIGNAL (signalFileOpened(bool)), this, SLOT (readFileSettings() ) ); + connect ( _project, TQT_SIGNAL (signalSettingsChanged()), this, TQT_SLOT (readProjectSettings()) ); + connect ( _catalog, TQT_SIGNAL (signalFileOpened(bool)), this, TQT_SLOT (readFileSettings() ) ); readProjectSettings(); readFileSettings(); diff --git a/kbabel/kbabel/kbcatalogview.h b/kbabel/kbabel/kbcatalogview.h index 5f23381a..355e2a4c 100644 --- a/kbabel/kbabel/kbcatalogview.h +++ b/kbabel/kbabel/kbcatalogview.h @@ -33,21 +33,21 @@ #ifndef KBCATALOGVIEW_H #define KBCATALOGVIEW_H -#include +#include #include #include "kbcatalog.h" #include "kbproject.h" #include "projectsettings.h" -class KBCatalogView : public QWidget, public KBabel::CatalogView +class KBCatalogView : public TQWidget, public KBabel::CatalogView { Q_OBJECT public: /** * Default constructor */ - KBCatalogView(KBCatalog* catalog, QWidget* parent, KBabel::Project::Ptr project); + KBCatalogView(KBCatalog* catalog, TQWidget* parent, KBabel::Project::Ptr project); /** * Destructor diff --git a/kbabel/kbabel/kbcharselect.cpp b/kbabel/kbabel/kbcharselect.cpp index 63316255..8dd87bcc 100644 --- a/kbabel/kbabel/kbcharselect.cpp +++ b/kbabel/kbabel/kbcharselect.cpp @@ -37,32 +37,32 @@ #include #include -#include -#include -#include +#include +#include +#include -KBCharSelect::KBCharSelect(QWidget* parent,const char* name) - : QVBox(parent,name) +KBCharSelect::KBCharSelect(TQWidget* parent,const char* name) + : TQVBox(parent,name) { setSpacing( KDialog::spacingHint() ); - QHBox* bar = new QHBox(this); + TQHBox* bar = new TQHBox(this); bar->setSpacing( KDialog::spacingHint() ); - QLabel *lTable = new QLabel( i18n( "Table:" ), bar ); - _tableNum = new QSpinBox( 0, 255, 1, bar ); + TQLabel *lTable = new TQLabel( i18n( "Table:" ), bar ); + _tableNum = new TQSpinBox( 0, 255, 1, bar ); lTable->setBuddy( _tableNum ); bar->setStretchFactor( _tableNum, 1 ); - QScrollView* scroll = new QScrollView( this ); + TQScrollView* scroll = new TQScrollView( this ); _table = new KCharSelectTable(scroll,"charselector","helvetica",' ',0); _table->setNumCols(16); _table->setNumRows(16); scroll->addChild(_table); - connect( _table, SIGNAL( doubleClicked() ), this, SLOT( emitChar() ) ); - connect( _tableNum, SIGNAL( valueChanged(int) ), this, SLOT( setTab(int) )); + connect( _table, TQT_SIGNAL( doubleClicked() ), this, TQT_SLOT( emitChar() ) ); + connect( _tableNum, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( setTab(int) )); } void KBCharSelect::emitChar() @@ -80,7 +80,7 @@ void KBCharSelect::saveSettings(KConfig* config) KConfigGroupSaver saver(config, "KBCharSelector" ); config->writeEntry( "TableNum", _tableNum->value() ); - config->writeEntry( "SelectedChar", QString(_table->chr()) ); + config->writeEntry( "SelectedChar", TQString(_table->chr()) ); } void KBCharSelect::restoreSettings(KConfig* config) diff --git a/kbabel/kbabel/kbcharselect.h b/kbabel/kbabel/kbcharselect.h index 4de3460f..7b42318c 100644 --- a/kbabel/kbabel/kbcharselect.h +++ b/kbabel/kbabel/kbcharselect.h @@ -33,7 +33,7 @@ #ifndef KBCHARSELECT_H #define KBCHARSELECT_H -#include +#include class KConfig; class KCharSelectTable; @@ -43,13 +43,13 @@ class KBCharSelect : public QVBox { Q_OBJECT public: - KBCharSelect(QWidget* parent, const char* name=0); + KBCharSelect(TQWidget* parent, const char* name=0); void saveSettings(KConfig* config); void restoreSettings(KConfig* config); signals: - void characterDoubleClicked( QChar ch ); + void characterDoubleClicked( TQChar ch ); public slots: void emitChar(); @@ -59,7 +59,7 @@ private slots: private: KCharSelectTable* _table; - QSpinBox* _tableNum; + TQSpinBox* _tableNum; }; #endif // KBCHARSELECT_H diff --git a/kbabel/kbabel/kbhighlighting.cpp b/kbabel/kbabel/kbhighlighting.cpp index ce58c483..3d555d7b 100644 --- a/kbabel/kbabel/kbhighlighting.cpp +++ b/kbabel/kbabel/kbhighlighting.cpp @@ -34,10 +34,10 @@ **************************************************************************** */ -#include -#include -#include -#include +#include +#include +#include +#include #include "kapplication.h" #include @@ -49,7 +49,7 @@ #include "kbhighlighting.h" #include "resources.h" -KBabelHighlighter::KBabelHighlighter( QTextEdit * edit, KSpell *spell ) : QObject() +KBabelHighlighter::KBabelHighlighter( TQTextEdit * edit, KSpell *spell ) : TQObject() , _edit( edit ) , syntaxHighlighting(true) , mSpell(0), alwaysEndsWithSpace(true) @@ -74,7 +74,7 @@ KBabelHighlighter::KBabelHighlighter( QTextEdit * edit, KSpell *spell ) : QObjec readSettings( ); regexps << accelMarker + "[\\w]"; - connect( _edit, SIGNAL( textChanged( ) ), this, SLOT( highlight( ) ) ); + connect( _edit, TQT_SIGNAL( textChanged( ) ), this, TQT_SLOT( highlight( ) ) ); setSpellChecker(spell); } @@ -97,10 +97,10 @@ void KBabelHighlighter::highlight( ) // create a single line out of the text: remove "\n", so that we only // have to deal with one single line of text. - QString text = _edit->text( ); + TQString text = _edit->text( ); text.replace( "\n", "" ); - QRegExp rx; + TQRegExp rx; int pos; if (syntaxHighlighting) @@ -180,7 +180,7 @@ void KBabelHighlighter::doHighlighting( HighlightType type, int pos, int length _edit->removeSelection( ); } -void KBabelHighlighter::setHighlightColor( HighlightType type, QColor color ) +void KBabelHighlighter::setHighlightColor( HighlightType type, TQColor color ) { colors[type] = color; } @@ -195,7 +195,7 @@ void KBabelHighlighter::readSettings( ) // FIXME: does not care about different projects yet KConfig * config = KGlobal::config( ); config->setGroup( "Misc" ); - QString temp = config->readEntry( "AccelMarker", "&" ); + TQString temp = config->readEntry( "AccelMarker", "&" ); accelMarker = temp[0]; } @@ -210,14 +210,14 @@ void KBabelHighlighter::flushCurrentWord() currentPos++; } - QChar ch; + TQChar ch; while ((ch = currentWord[(int) currentWord.length() - 1]).isPunct() && ch != '(' && ch != '@') currentWord.truncate( currentWord.length() - 1 ); // try to remove tags (they might not be fully compliant, but // we don't want to check them anyway - QRegExp tags("(<[-_.:A-Za-z0-9]*([\\s]*[-_.:A-Za-z0-9]*=\\\\\"[^<>]*\\\\\")*[\\s]*/?>)|()"); + TQRegExp tags("(<[-_.:A-Za-z0-9]*([\\s]*[-_.:A-Za-z0-9]*=\\\\\"[^<>]*\\\\\")*[\\s]*/?>)|()"); if( tags.search (currentWord) != -1 ) { currentPos += tags.matchedLength(); @@ -228,7 +228,7 @@ void KBabelHighlighter::flushCurrentWord() if (!currentWord.isEmpty()) { bool isPlainWord = true; for (int i = 0; i < (int) currentWord.length(); i++) { - QChar ch = currentWord[i]; + TQChar ch = currentWord[i]; if (ch.upper() == ch) { isPlainWord = false; break; @@ -241,15 +241,15 @@ void KBabelHighlighter::flushCurrentWord() currentWord = ""; } -QDict KBabelHighlighter::dict(50021); +TQDict KBabelHighlighter::dict(50021); -bool KBabelHighlighter::isMisspelled(const QString& wordRaw) +bool KBabelHighlighter::isMisspelled(const TQString& wordRaw) { // We have to treat ampersands (like in "&go" or "g&o") in a special way. // they must not break the word. And we cannot change the parameter, as // then the highlight would be one character short. So we have to copy the // word first. - QString word = wordRaw; + TQString word = wordRaw; kdDebug(KBABEL) << "isampersand: checking (raw):" << word << endl; word.replace("&", "" ); kdDebug(KBABEL) << "isMisspelled: checking: " << word << endl; @@ -271,8 +271,8 @@ bool KBabelHighlighter::isMisspelled(const QString& wordRaw) return false; } -void KBabelHighlighter::slotMisspelling(const QString & originalword, - const QStringList & suggestions, unsigned int) +void KBabelHighlighter::slotMisspelling(const TQString & originalword, + const TQStringList & suggestions, unsigned int) { kdDebug(KBABEL) << "Misspelled " << originalword << ", " << suggestions << endl; dict.replace( originalword, NotOkay ); @@ -285,8 +285,8 @@ void KBabelHighlighter::setSpellChecker( KSpell* spell ) { if( mSpell ) { - disconnect(mSpell, SIGNAL(misspelling(const QString &, const QStringList &, unsigned int)), - this, SLOT(slotMisspelling(const QString &, const QStringList &, unsigned int))); + disconnect(mSpell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList &, unsigned int)), + this, TQT_SLOT(slotMisspelling(const TQString &, const TQStringList &, unsigned int))); // cleanup the cache dict.clear(); @@ -296,8 +296,8 @@ void KBabelHighlighter::setSpellChecker( KSpell* spell ) if( mSpell ) { - connect(mSpell, SIGNAL(misspelling(const QString &, const QStringList &, unsigned int)), - this, SLOT(slotMisspelling(const QString &, const QStringList &, unsigned int))); + connect(mSpell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList &, unsigned int)), + this, TQT_SLOT(slotMisspelling(const TQString &, const TQStringList &, unsigned int))); // wait for KSpell to startup correctly kapp->processEvents(500); diff --git a/kbabel/kbabel/kbhighlighting.h b/kbabel/kbabel/kbhighlighting.h index 91a6202d..fe93e0ef 100644 --- a/kbabel/kbabel/kbhighlighting.h +++ b/kbabel/kbabel/kbhighlighting.h @@ -37,10 +37,10 @@ #ifndef KBHIGHLIGHTING_H #define KBHIGHLIGHTING_H -#include -#include -#include -#include +#include +#include +#include +#include class KSpell; class QColor; @@ -63,21 +63,21 @@ class KBabelHighlighter : public QObject SpellcheckError }; - KBabelHighlighter( QTextEdit * edit, KSpell *spell ); + KBabelHighlighter( TQTextEdit * edit, KSpell *spell ); - void setHighlightColor( HighlightType type, QColor color ); + void setHighlightColor( HighlightType type, TQColor color ); void setHasErrors( bool err ); void setSpellChecker( KSpell* spell); - bool isMisspelled(const QString& word); + bool isMisspelled(const TQString& word); public slots: void highlight( ); void setSyntaxHighlighting( bool enable ); protected slots: - void slotMisspelling (const QString & originalword, - const QStringList & suggestions, unsigned int pos); + void slotMisspelling (const TQString & originalword, + const TQStringList & suggestions, unsigned int pos); private: void doHighlighting( HighlightType type, int pos, int length ); @@ -85,18 +85,18 @@ class KBabelHighlighter : public QObject void flushCurrentWord(); private: - QTextEdit * _edit; + TQTextEdit * _edit; bool syntaxHighlighting; - QStringList regexps; - QMemArray colors; + TQStringList regexps; + TQMemArray colors; bool _hasErrors; - QString accelMarker; + TQString accelMarker; - static QDict dict; - QGuardedPtr mSpell; - QString currentWord; + static TQDict dict; + TQGuardedPtr mSpell; + TQString currentWord; int currentPos; bool alwaysEndsWithSpace; }; diff --git a/kbabel/kbabel/main.cpp b/kbabel/kbabel/main.cpp index 40c28926..5758d563 100644 --- a/kbabel/kbabel/main.cpp +++ b/kbabel/kbabel/main.cpp @@ -49,41 +49,41 @@ #include #include -#include -#include -#include +#include +#include +#include class KBabelInterface : public KBabelIface { public: KBabelInterface(); - virtual void openURL(QCString url, QCString package, WId window, int newWindow); - virtual void openURL(QCString url, QCString package, WId window, int newWindow, QCString projectFile); - virtual void openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow ); - virtual void openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow, QCString projectFile ); - virtual void gotoFileEntry(QCString url, QCString msgid); - virtual void gotoFileEntry(QCString url, QCString package, int msgid); - virtual void gotoFileEntry(QCString url, QCString package, int msgid, QCString projectFile); - virtual bool findInFile(QCString fileSource, QCString url, - QString findStr, int caseSensitive, int wholeWords, int isRegExp, + virtual void openURL(TQCString url, TQCString package, WId window, int newWindow); + virtual void openURL(TQCString url, TQCString package, WId window, int newWindow, TQCString projectFile); + virtual void openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow ); + virtual void openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow, TQCString projectFile ); + virtual void gotoFileEntry(TQCString url, TQCString msgid); + virtual void gotoFileEntry(TQCString url, TQCString package, int msgid); + virtual void gotoFileEntry(TQCString url, TQCString package, int msgid, TQCString projectFile); + virtual bool findInFile(TQCString fileSource, TQCString url, + TQString findStr, int caseSensitive, int wholeWords, int isRegExp, int inMsgid, int inMsgstr, int inComment, int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave); - virtual bool replaceInFile(QCString fileSource, QCString url, - QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp, + virtual bool replaceInFile(TQCString fileSource, TQCString url, + TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp, int inMsgid, int inMsgstr, int inComment, int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave); - virtual bool findInFile(QCString fileSource, QCString url, - QString findStr, int caseSensitive, int wholeWords, int isRegExp, + virtual bool findInFile(TQCString fileSource, TQCString url, + TQString findStr, int caseSensitive, int wholeWords, int isRegExp, int inMsgid, int inMsgstr, int inComment, - int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, QCString project ); - virtual bool replaceInFile(QCString fileSource, QCString url, - QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp, + int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, TQCString project ); + virtual bool replaceInFile(TQCString fileSource, TQCString url, + TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp, int inMsgid, int inMsgstr, int inComment, - int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave, QCString project ); - virtual void spellcheck(QStringList fileList); + int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave, TQCString project ); + virtual void spellcheck(TQStringList fileList); private: - KBabelMW* findInstance( const KURL& url, const QString& project, const QString& package) const; + KBabelMW* findInstance( const KURL& url, const TQString& project, const TQString& package) const; }; @@ -130,8 +130,8 @@ int KBabelApp::newInstance() KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QTimer timer; - QWidget *splash=0; + TQTimer timer; + TQWidget *splash=0; bool showSplash=args->isSet("splash"); if( showSplash && first ) @@ -142,10 +142,10 @@ int KBabelApp::newInstance() timer.start(4000,true); } - QString projectFile=args->getOption("project"); + TQString projectFile=args->getOption("project"); if( !projectFile.isEmpty() ) { - QFileInfo fi(projectFile); + TQFileInfo fi(projectFile); projectFile = fi.absFilePath(); } else @@ -155,11 +155,11 @@ int KBabelApp::newInstance() } kdDebug() << "Project: " << projectFile << endl; - QCString msgid=args->getOption("gotomsgid"); + TQCString msgid=args->getOption("gotomsgid"); if(!msgid.isEmpty() && args->count() > 0) { kdDebug(KBABEL) << "gotomsgid" << endl; - QString m = QString::fromLocal8Bit(msgid); + TQString m = TQString::fromLocal8Bit(msgid); kdDebug () << "Resuming DCOP" << endl; kapp->dcopClient()->resume(); @@ -187,7 +187,7 @@ int KBabelApp::newInstance() widget->show(); for (int i=0; i < args->count(); i++) { - widget->open( args->url(i) , QString::null, i != 0 ); + widget->open( args->url(i) , TQString::null, i != 0 ); } kdDebug () << "Resuming DCOP" << endl; @@ -223,18 +223,18 @@ KBabelInterface::KBabelInterface() { } -void KBabelInterface::openURL(QCString url, QCString package, WId window, int newWindow) +void KBabelInterface::openURL(TQCString url, TQCString package, WId window, int newWindow) { openURL(url,package,window,newWindow, KBabel::ProjectManager::defaultProjectName().local8Bit()); } -void KBabelInterface::openURL(QCString url, QCString package, WId window, int newWindow, QCString projectFile) +void KBabelInterface::openURL(TQCString url, TQCString package, WId window, int newWindow, TQCString projectFile) { - const QString project( QString::fromLocal8Bit( projectFile ) ); + const TQString project( TQString::fromLocal8Bit( projectFile ) ); kdDebug() << "openURL " << url << endl; - KURL u(QString::fromLocal8Bit(url)); + KURL u(TQString::fromLocal8Bit(url)); kdDebug () << "Suspending DCOP" << endl; kapp->dcopClient()->suspend(); @@ -256,7 +256,7 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne { kb = static_cast(mw); KWin::activateWindow(kb->topLevelWidget()->winId()); - kb->open(u, QString::fromUtf8(package),newWindow); + kb->open(u, TQString::fromUtf8(package),newWindow); kdDebug () << "Resuming DCOP" << endl; kapp->dcopClient()->resume(); @@ -274,7 +274,7 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne // it's empty KWin::setActiveWindow(kb->topLevelWidget()->winId()); kb->projectOpen(projectFile); - kb->open(u,QString::fromUtf8(package),false); + kb->open(u,TQString::fromUtf8(package),false); kdDebug () << "Resuming DCOP" << endl; kapp->dcopClient()->resume(); @@ -290,7 +290,7 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne { kb = static_cast(mw); KWin::activateWindow(kb->topLevelWidget()->winId()); - kb->open(u, QString::fromUtf8(package),newWindow); + kb->open(u, TQString::fromUtf8(package),newWindow); kdDebug () << "Resuming DCOP" << endl; kapp->dcopClient()->resume(); @@ -306,24 +306,24 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne kb->show(); } else kb = static_cast(mw); KWin::activateWindow(kb->topLevelWidget()->winId()); - kb->open(u,QString::fromUtf8(package),newWindow); + kb->open(u,TQString::fromUtf8(package),newWindow); } kdDebug () << "Resuming DCOP" << endl; kapp->dcopClient()->resume(); } -void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow) +void KBabelInterface::openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow) { openTemplate(openFilename, saveFilename, package, newWindow, KBabel::ProjectManager::defaultProjectName().local8Bit()); } -void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow, QCString projectFile) +void KBabelInterface::openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow, TQCString projectFile) { - const QString project( QString::fromLocal8Bit( projectFile ) ); + const TQString project( TQString::fromLocal8Bit( projectFile ) ); - const KURL u( QString::fromLocal8Bit( saveFilename ) ); - const KURL t( QString::fromLocal8Bit( openFilename ) ); + const KURL u( TQString::fromLocal8Bit( saveFilename ) ); + const KURL t( TQString::fromLocal8Bit( openFilename ) ); kdDebug () << "Suspending DCOP" << endl; kapp->dcopClient()->suspend(); @@ -344,14 +344,14 @@ void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename, kb = static_cast(mw); KWin::activateWindow(kb->topLevelWidget()->winId()); kb->projectOpen(projectFile); - kb->openTemplate(t,u,QString::fromUtf8(package),newWindow); + kb->openTemplate(t,u,TQString::fromUtf8(package),newWindow); } else { kb = new KBabelMW(project); kb->show(); KWin::activateWindow(kb->topLevelWidget()->winId()); - kb->openTemplate(t,u,QString::fromUtf8(package)); + kb->openTemplate(t,u,TQString::fromUtf8(package)); } } @@ -359,14 +359,14 @@ void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename, kapp->dcopClient()->resume(); } -void KBabelInterface::gotoFileEntry(QCString url, QCString m) +void KBabelInterface::gotoFileEntry(TQCString url, TQCString m) { - const KURL u( QString::fromLocal8Bit( url ) ); - KBabelMW *kb = findInstance( u, KBabel::ProjectManager::defaultProjectName(), QString() ); + const KURL u( TQString::fromLocal8Bit( url ) ); + KBabelMW *kb = findInstance( u, KBabel::ProjectManager::defaultProjectName(), TQString() ); if(!kb) return; - QString msgid = QString::fromUtf8(m); + TQString msgid = TQString::fromUtf8(m); int index = kb->m_view->catalog()->indexForMsgid(msgid); if(index >= 0) { @@ -377,15 +377,15 @@ void KBabelInterface::gotoFileEntry(QCString url, QCString m) } } -void KBabelInterface::gotoFileEntry(QCString url, QCString package, int m) +void KBabelInterface::gotoFileEntry(TQCString url, TQCString package, int m) { gotoFileEntry(url, package, m, KBabel::ProjectManager::defaultProjectName().local8Bit() ); } -void KBabelInterface::gotoFileEntry(QCString url, QCString package, int m, QCString projectFile) +void KBabelInterface::gotoFileEntry(TQCString url, TQCString package, int m, TQCString projectFile) { - const KURL u ( QString::fromLocal8Bit( url ) ); - const QString p ( QString::fromUtf8( package ) ); // ### VERIFY encoding! + const KURL u ( TQString::fromLocal8Bit( url ) ); + const TQString p ( TQString::fromUtf8( package ) ); // ### VERIFY encoding! KBabelMW *kb = findInstance( u, projectFile, p ); if(!kb) return; @@ -396,8 +396,8 @@ void KBabelInterface::gotoFileEntry(QCString url, QCString package, int m, QCStr kb->m_view->gotoEntry(pos); } -bool KBabelInterface::findInFile(QCString fileSource, QCString url, - QString findStr, int caseSensitive, int wholeWords, int isRegExp, +bool KBabelInterface::findInFile(TQCString fileSource, TQCString url, + TQString findStr, int caseSensitive, int wholeWords, int isRegExp, int inMsgid, int inMsgstr, int inComment, int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave) { @@ -408,15 +408,15 @@ bool KBabelInterface::findInFile(QCString fileSource, QCString url, KBabel::ProjectManager::defaultProjectName().utf8() ); } -bool KBabelInterface::findInFile(QCString fileSource, QCString url, - QString findStr, int caseSensitive, int wholeWords, int isRegExp, +bool KBabelInterface::findInFile(TQCString fileSource, TQCString url, + TQString findStr, int caseSensitive, int wholeWords, int isRegExp, int inMsgid, int inMsgstr, int inComment, - int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, QCString project ) + int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, TQCString project ) { kdDebug(KBABEL) << "findInFile (" <show(); kb->spellcheckMoreFiles( fileList ); } -KBabelMW* KBabelInterface::findInstance( const KURL& url, const QString& project, const QString& package) const +KBabelMW* KBabelInterface::findInstance( const KURL& url, const TQString& project, const TQString& package) const { kdDebug () << "Suspending DCOP" << endl; kapp->dcopClient()->suspend(); diff --git a/kbabel/kbabel/mymultilineedit.cpp b/kbabel/kbabel/mymultilineedit.cpp index 820d493e..9b7913d1 100644 --- a/kbabel/kbabel/mymultilineedit.cpp +++ b/kbabel/kbabel/mymultilineedit.cpp @@ -41,16 +41,16 @@ #include "editcmd.h" #include "resources.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include //#include -#include +#include #include #include @@ -62,7 +62,7 @@ using namespace KBabel; -MyMultiLineEdit::MyMultiLineEdit(int ID, QWidget* parent,const char* name) +MyMultiLineEdit::MyMultiLineEdit(int ID, TQWidget* parent,const char* name) :KTextEdit(parent,name), emitUndo(true), _firstChangedLine(0), _lastChangedLine(0), @@ -77,7 +77,7 @@ MyMultiLineEdit::MyMultiLineEdit(int ID, QWidget* parent,const char* name) setWordWrap( WidgetWidth ); viewport()->setAcceptDrops( false ); // we need our parent to get drops - connect(this, SIGNAL(selectionChanged()), this, SLOT( onSelectionChanged() ) ); + connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT( onSelectionChanged() ) ); } void MyMultiLineEdit::onSelectionChanged() @@ -118,11 +118,11 @@ void MyMultiLineEdit::processCommand(EditCommand* cmd, bool undo) bool oldEmitUndo = emitUndo; emitUndo = false; - QPalette _visibleHighlight( palette() ); - QPalette _invisibleHighlight( palette() ); - QColorGroup newcg( colorGroup() ); - newcg.setColor( QColorGroup::HighlightedText, newcg.text() ); - newcg.setColor( QColorGroup::Highlight, newcg.base() ); + TQPalette _visibleHighlight( palette() ); + TQPalette _invisibleHighlight( palette() ); + TQColorGroup newcg( colorGroup() ); + newcg.setColor( TQColorGroup::HighlightedText, newcg.text() ); + newcg.setColor( TQColorGroup::Highlight, newcg.base() ); if( hasFocus() ) _invisibleHighlight.setActive( newcg ); else _invisibleHighlight.setInactive( newcg ); setPalette( _invisibleHighlight ); @@ -213,34 +213,34 @@ void MyMultiLineEdit::emitCursorPosition() emit cursorPositionChanged(line, col); } -void MyMultiLineEdit::wheelEvent(QWheelEvent *e) +void MyMultiLineEdit::wheelEvent(TQWheelEvent *e) { e->ignore(); } -void MyMultiLineEdit::focusInEvent(QFocusEvent *e) +void MyMultiLineEdit::focusInEvent(TQFocusEvent *e) { KTextEdit::focusInEvent(e); emitCursorPosition(); } -void MyMultiLineEdit::contentsContextMenuEvent( QContextMenuEvent * e) +void MyMultiLineEdit::contentsContextMenuEvent( TQContextMenuEvent * e) { e->accept(); if( _menu ) _menu->exec( e->globalPos() ); } -QPopupMenu * MyMultiLineEdit::createPopupMenu() +TQPopupMenu * MyMultiLineEdit::createPopupMenu() { return _menu; } -QPopupMenu * MyMultiLineEdit::createPopupMenu(const QPoint &) +TQPopupMenu * MyMultiLineEdit::createPopupMenu(const TQPoint &) { return 0; } -void MyMultiLineEdit::setContextMenu( QPopupMenu * menu ) +void MyMultiLineEdit::setContextMenu( TQPopupMenu * menu ) { _menu = menu; } @@ -270,10 +270,10 @@ void MyMultiLineEdit::doKeyboardAction( KeyboardAction action ) { int x,y; getCursorPosition( &x, &y ); - QString s = text(x); + TQString s = text(x); if( y < (int)s.length()-1 ) // not the end of paragraph { - QString delText = s.mid( y, s.length()-y-1); + TQString delText = s.mid( y, s.length()-y-1); emit signalUndoCmd( new DelTextCmd(currentIndex(), delText, _myID ) ); } else if( x < paragraphs()-1 ) // not the end of text @@ -288,7 +288,7 @@ void MyMultiLineEdit::doKeyboardAction( KeyboardAction action ) emitCursorPosition(); } -void MyMultiLineEdit::setText(const QString& s) +void MyMultiLineEdit::setText(const TQString& s) { _lastParagraph=0; _lastParagraphOffset=0; @@ -303,7 +303,7 @@ void MyMultiLineEdit::setText(const QString& s) emitCursorPosition(); } -void MyMultiLineEdit::insertAt( const QString & s, int line, int col, bool mark ) +void MyMultiLineEdit::insertAt( const TQString & s, int line, int col, bool mark ) { // it will invoke insert, don't need to send InsTextCmd KTextEdit::insertAt(s,line,col); @@ -316,7 +316,7 @@ void MyMultiLineEdit::insertAt( const QString & s, int line, int col, bool mark emitCursorPosition(); } -void MyMultiLineEdit::insert( const QString & text, bool indent, bool checkNewLine, bool removeSelected ) +void MyMultiLineEdit::insert( const TQString & text, bool indent, bool checkNewLine, bool removeSelected ) { int row,col; @@ -360,11 +360,11 @@ void MyMultiLineEdit::insert( const QString & text, bool indent, bool checkNewLi // setup palettes - QPalette _visibleHighlight( palette() ); - QPalette _invisibleHighlight( palette() ); - QColorGroup newcg( colorGroup() ); - newcg.setColor( QColorGroup::HighlightedText, newcg.text() ); - newcg.setColor( QColorGroup::Highlight, newcg.base() ); + TQPalette _visibleHighlight( palette() ); + TQPalette _invisibleHighlight( palette() ); + TQColorGroup newcg( colorGroup() ); + newcg.setColor( TQColorGroup::HighlightedText, newcg.text() ); + newcg.setColor( TQColorGroup::Highlight, newcg.base() ); if( hasFocus() ) _invisibleHighlight.setActive( newcg ); else _invisibleHighlight.setInactive( newcg ); setPalette( _invisibleHighlight ); @@ -391,7 +391,7 @@ void MyMultiLineEdit::clear() _dontUpdate=true; - QString s = text(); + TQString s = text(); if( !s.isEmpty() && emitUndo ) { emit signalUndoCmd( new BeginCommand(-1,UndefPart) ); emit signalUndoCmd( new DelTextCmd(0,s,_myID) ); @@ -423,10 +423,10 @@ void MyMultiLineEdit::my_backspace() { int offset = currentIndex(); - QString s= text(cursorY); + TQString s= text(cursorY); if(cursorX != 0) { - QString delTxt(s[cursorX-1]); + TQString delTxt(s[cursorX-1]); emit signalUndoCmd(new DelTextCmd(offset-1,delTxt,_myID)); } else if( cursorY > 0 || cursorX > 0 ) // not at the beginning @@ -453,10 +453,10 @@ void MyMultiLineEdit::my_del() { int offset = pos2Offset(cursorY, cursorX); - QString s=text(cursorY); + TQString s=text(cursorY); if(cursorX != (int)s.length()-1) { - QString delTxt(s[cursorX]); + TQString delTxt(s[cursorX]); emit signalUndoCmd(new DelTextCmd(offset,delTxt,_myID)); } else if( cursorY < (int)paragraphs()-1 || ( (cursorY == (int)paragraphs()-1) && (cursorX < (int)text( paragraphs()-1 ).length()-1 ) ) )// !atEnd() ) @@ -583,7 +583,7 @@ void MyMultiLineEdit::setReadOnly(bool on) setBackgroundMode(PaletteBase); } - QTextEdit::setReadOnly(on); + TQTextEdit::setReadOnly(on); } void MyMultiLineEdit::setOverwriteMode( bool b ) @@ -592,7 +592,7 @@ void MyMultiLineEdit::setOverwriteMode( bool b ) } /*******************************************************************************/ -MsgMultiLineEdit::MsgMultiLineEdit(int ID, KSpell* spell, QWidget* parent,const char* name) +MsgMultiLineEdit::MsgMultiLineEdit(int ID, KSpell* spell, TQWidget* parent,const char* name) :MyMultiLineEdit(ID, parent,name), _quotes(false), _cleverEditing(false), @@ -620,32 +620,32 @@ MsgMultiLineEdit::MsgMultiLineEdit(int ID, KSpell* spell, QWidget* parent,const diffPos.setAutoDelete(true); diffPos.clear(); - _whitespace = new QPixmap(2,2,-1,QPixmap::BestOptim); + _whitespace = new TQPixmap(2,2,-1,TQPixmap::BestOptim); _whitespace->fill(_textColor); - _errorWhitespace = new QPixmap(2,2,-1,QPixmap::BestOptim); + _errorWhitespace = new TQPixmap(2,2,-1,TQPixmap::BestOptim); _errorWhitespace->fill(_errorColor); - _whitespaceNB = new QPixmap(3,3,-1,QPixmap::BestOptim); + _whitespaceNB = new TQPixmap(3,3,-1,TQPixmap::BestOptim); _whitespaceNB->fill(); - _errorWhitespaceNB = new QPixmap(3,3,-1,QPixmap::BestOptim); + _errorWhitespaceNB = new TQPixmap(3,3,-1,TQPixmap::BestOptim); _errorWhitespaceNB->fill(); - QPainter p(_whitespaceNB); + TQPainter p(_whitespaceNB); p.setPen( _textColor ); p.drawEllipse(_whitespaceNB->rect()); - QPainter q(_errorWhitespaceNB); + TQPainter q(_errorWhitespaceNB); q.setPen( _errorColor ); q.drawEllipse(_errorWhitespaceNB->rect()); // this will setup bitBlt pixmaps setFont( font() ); highlighter = new KBabelHighlighter( this, spell ); - connect( this, SIGNAL( signalSyntaxHighlightingChanged( bool ) ), highlighter, SLOT( setSyntaxHighlighting( bool ) ) ); + connect( this, TQT_SIGNAL( signalSyntaxHighlightingChanged( bool ) ), highlighter, TQT_SLOT( setSyntaxHighlighting( bool ) ) ); - connect( this, SIGNAL( selectionChanged() ), this, SLOT( paintSpacePoints() ) ); - connect( this, SIGNAL( cursorPositionChanged( int, int ) ), this, SLOT( paintSpacePoints(int, int) ) ); - connect( this, SIGNAL( textChanged() ), this, SLOT( emittedTextChanged() ) ); + connect( this, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( paintSpacePoints() ) ); + connect( this, TQT_SIGNAL( cursorPositionChanged( int, int ) ), this, TQT_SLOT( paintSpacePoints(int, int) ) ); + connect( this, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( emittedTextChanged() ) ); } MsgMultiLineEdit::~MsgMultiLineEdit () @@ -654,9 +654,9 @@ MsgMultiLineEdit::~MsgMultiLineEdit () delete highlighter; } -void MsgMultiLineEdit::setText(const QString& s) +void MsgMultiLineEdit::setText(const TQString& s) { - QString str = s; + TQString str = s; if(_showDiff) { @@ -664,13 +664,13 @@ void MsgMultiLineEdit::setText(const QString& s) int lines = s.contains('\n'); diffPos.resize(lines+1); - QStringList lineList = QStringList::split('\n',s,true); + TQStringList lineList = TQStringList::split('\n',s,true); int lineCounter=-1; bool haveAdd=false; bool haveDel=false; bool multiline=false; - QStringList::Iterator it; + TQStringList::Iterator it; for(it = lineList.begin(); it != lineList.end(); ++it) { lineCounter++; @@ -791,10 +791,10 @@ void MsgMultiLineEdit::setText(const QString& s) if(di.begin >= 0) { - QValueList *list = diffPos[lineCounter]; + TQValueList *list = diffPos[lineCounter]; if(!list) { - list = new QValueList; + list = new TQValueList; diffPos.insert(lineCounter,list); } @@ -804,7 +804,7 @@ void MsgMultiLineEdit::setText(const QString& s) } } - QRegExp reg(""); + TQRegExp reg(""); str.replace(reg,""); reg.setPattern(""); str.replace(reg,""); @@ -833,7 +833,7 @@ void MsgMultiLineEdit::setHighlightBg(bool on) } -void MsgMultiLineEdit::setBgColor(const QColor& color) +void MsgMultiLineEdit::setBgColor(const TQColor& color) { _bgColor=color; @@ -857,8 +857,8 @@ void MsgMultiLineEdit::setHighlightSyntax(bool on) update(); } -void MsgMultiLineEdit::setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor - , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor) +void MsgMultiLineEdit::setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor + , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor) { _quoteColor=quoteColor; _unquoteColor=unquoteColor; @@ -875,13 +875,13 @@ void MsgMultiLineEdit::setHighlightColors(const QColor& quoteColor, const QColor } -void MsgMultiLineEdit::setFont(const QFont& font) +void MsgMultiLineEdit::setFont(const TQFont& font) { KTextEdit::setFont(font); // we don't need to calculate a special offset for non-breaking space, since // they are very similar in size - QFontMetrics fm(font); + TQFontMetrics fm(font); _wsOffsetX = QMAX(fm.width(' ')/2-2,1); _wsOffsetY = QMAX(fm.height()/2-1,0); @@ -897,8 +897,8 @@ void MsgMultiLineEdit::setDiffDisplayMode(bool addUnderline, bool delStrikeOut) update(); } -void MsgMultiLineEdit::setDiffColors(const QColor& addColor - , const QColor& delColor) +void MsgMultiLineEdit::setDiffColors(const TQColor& addColor + , const TQColor& delColor) { _diffAddColor = addColor; _diffDelColor = delColor; @@ -907,11 +907,11 @@ void MsgMultiLineEdit::setDiffColors(const QColor& addColor update(); } -void MsgMultiLineEdit::setTextColor(const QColor &color ) +void MsgMultiLineEdit::setTextColor(const TQColor &color ) { - QPalette p( palette() ); - QColorGroup newcg( colorGroup() ); - newcg.setColor( QColorGroup::Text, color ); + TQPalette p( palette() ); + TQColorGroup newcg( colorGroup() ); + newcg.setColor( TQColorGroup::Text, color ); if( hasFocus() ) p.setActive( newcg ); else p.setInactive( newcg ); setPalette( p ); @@ -919,7 +919,7 @@ void MsgMultiLineEdit::setTextColor(const QColor &color ) highlighter->setHighlightColor( KBabelHighlighter::Normal, color ); } -void MsgMultiLineEdit::setErrorColor(const QColor &color ) +void MsgMultiLineEdit::setErrorColor(const TQColor &color ) { _errorColor = color; highlighter->setHighlightColor( KBabelHighlighter::Error, color ); @@ -961,17 +961,17 @@ void MsgMultiLineEdit::paintSpacePoints(int, int ) void MsgMultiLineEdit::paintSpacePoints() { - QRect r; - QPainter painter(viewport() ); - const QFontMetrics& fm = fontMetrics(); + TQRect r; + TQPainter painter(viewport() ); + const TQFontMetrics& fm = fontMetrics(); - int paranum = paragraphAt(QPoint(contentsX(), contentsY())); + int paranum = paragraphAt(TQPoint(contentsX(), contentsY())); if( _spacePoints ) { int curpara = paranum; painter.setPen( _currentColor ); - QPixmap* ws, *wsnb; + TQPixmap* ws, *wsnb; if( _currentColor== _errorColor ) { @@ -988,12 +988,12 @@ void MsgMultiLineEdit::paintSpacePoints() { if ( paragraphRect( curpara ).top() > contentsY()+visibleHeight()) break; - const QString& s = text(curpara); + const TQString& s = text(curpara); int i = s.find( " " ); while( (i >= 0) && (i < (int)s.length()-1) ) // -1 because text will end by EOLN { - QPixmap* pm = ( s.at(i).unicode() == 0x00A0U ) ? wsnb : ws; - QRect r = mapToView( curpara, i ); + TQPixmap* pm = ( s.at(i).unicode() == 0x00A0U ) ? wsnb : ws; + TQRect r = mapToView( curpara, i ); r.moveBy( r.width()/2, (r.height() - fm.descent())/2 ); r.moveBy( -pm->rect().width()/2, -pm->rect().height()/2-1 ); bitBlt(viewport(), r.topLeft(), pm, pm->rect(), Qt::CopyROP); @@ -1005,19 +1005,19 @@ void MsgMultiLineEdit::paintSpacePoints() if( _quotes ) { - QFontMetrics fm( font()); - QRect qs = fm.boundingRect("\""); + TQFontMetrics fm( font()); + TQRect qs = fm.boundingRect("\""); for( int curpara = paranum; curpara < paragraphs() ; curpara++ ) { r = paragraphRect(curpara); if( r.y() > contentsY()+visibleHeight() ) break; - painter.drawText( QPoint( 0, mapToView( curpara, 0 ).top()) + - QPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT + painter.drawText( TQPoint( 0, mapToView( curpara, 0 ).top()) + + TQPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT painter.drawText( mapToView( curpara, QMAX( 0, ((int)text( curpara ).length())-1)).topRight() + - QPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT + TQPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT } } @@ -1031,16 +1031,16 @@ void MsgMultiLineEdit::paintSpacePoints() r = paragraphRect(curpara); if( r.y() > contentsY()+visibleHeight() ) break; - QValueList *list = diffPos[curpara]; + TQValueList *list = diffPos[curpara]; if(list) { - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for(it = list->begin(); it != list->end(); ++it) { - QRect beg = mapToView( curpara, (*it).begin ); - QRect end = mapToView( curpara, (*it).end ); + TQRect beg = mapToView( curpara, (*it).begin ); + TQRect end = mapToView( curpara, (*it).end ); - QColor* c = 0; + TQColor* c = 0; if( (*it).add && !_diffUnderlineAdd) c = &_diffAddColor; else if(!(*it).add && !_diffStrikeOutDel) @@ -1051,23 +1051,23 @@ void MsgMultiLineEdit::paintSpacePoints() // Single or multiple lines? if ( beg.top() == end.top()) { - painter.fillRect( QRect( beg.topLeft(), - QPoint( end.right(), end.bottom())), *c ); + painter.fillRect( TQRect( beg.topLeft(), + TQPoint( end.right(), end.bottom())), *c ); } else { - painter.fillRect( QRect( + painter.fillRect( TQRect( beg.topLeft(), - QPoint( r.right(), beg.bottom())), *c ); + TQPoint( r.right(), beg.bottom())), *c ); if( end.top()-beg.bottom() > 2 ) { // there is a line, not only thin space - painter.fillRect( QRect( - QPoint( r.left(), beg.bottom()), - QPoint( r.right(), end.top())), *c ); + painter.fillRect( TQRect( + TQPoint( r.left(), beg.bottom()), + TQPoint( r.right(), end.top())), *c ); } - painter.fillRect( QRect( - QPoint( r.left(), end.top()), - QPoint( end.right(), end.bottom())), *c ); + painter.fillRect( TQRect( + TQPoint( r.left(), end.top()), + TQPoint( end.right(), end.bottom())), *c ); } } } @@ -1085,18 +1085,18 @@ void MsgMultiLineEdit::paintSpacePoints() r = paragraphRect(curpara); if( r.y() > contentsY()+visibleHeight() ) break; - QValueList *list = diffPos[curpara]; + TQValueList *list = diffPos[curpara]; if(list) { - QPen addPen(_diffAddColor,2); - QPen delPen(_diffDelColor,2); - QValueList::ConstIterator it; + TQPen addPen(_diffAddColor,2); + TQPen delPen(_diffDelColor,2); + TQValueList::ConstIterator it; for(it = list->begin(); it != list->end(); ++it) { - QRect beg = mapToView( curpara, (*it).begin ); - QRect end = mapToView( curpara, (*it).end ); + TQRect beg = mapToView( curpara, (*it).begin ); + TQRect end = mapToView( curpara, (*it).end ); - QPen* p = 0; + TQPen* p = 0; int dy = 0; if( (*it).add && _diffUnderlineAdd) p = &addPen; @@ -1113,25 +1113,25 @@ void MsgMultiLineEdit::paintSpacePoints() // Single or multiple lines? if ( beg.top() == end.top()) painter.drawLine( - beg.topLeft() + QPoint(0, fm.ascent()-dy), - end.topRight()+ QPoint(0, fm.ascent()-dy)); + beg.topLeft() + TQPoint(0, fm.ascent()-dy), + end.topRight()+ TQPoint(0, fm.ascent()-dy)); else { int y = beg.top() + fm.ascent(); painter.drawLine( - QPoint(beg.left(), y), - QPoint(r.right(), y)); + TQPoint(beg.left(), y), + TQPoint(r.right(), y)); y += fm.lineSpacing(); while (y < end.top() + fm.ascent()) { painter.drawLine( - QPoint(r.left(), y), - QPoint(r.right(), y)); + TQPoint(r.left(), y), + TQPoint(r.right(), y)); y += fm.lineSpacing(); } painter.drawLine( - QPoint(r.left(), end.top() + fm.ascent()), - QPoint(end.right(), end.top() + fm.ascent())); + TQPoint(r.left(), end.top() + fm.ascent()), + TQPoint(end.right(), end.top() + fm.ascent())); } } } @@ -1165,7 +1165,7 @@ void MsgMultiLineEdit::highlight() { /* if( _dontUpdate ) return; - QColor bg; + TQColor bg; if( _highlightBg ) bg = _bgColor; else bg = colorGroup().base(); @@ -1185,19 +1185,19 @@ void MsgMultiLineEdit::highlight() uint i; - QRegExp markup("(\\\\)|(\")|(\\\\[abfnrtv'\"\?\\\\])|(\\\\\\d+)|(\\\\x[\\dabcdef]+)" + TQRegExp markup("(\\\\)|(\")|(\\\\[abfnrtv'\"\?\\\\])|(\\\\\\d+)|(\\\\x[\\dabcdef]+)" "|(%[\\ddioxXucsfeEgGphln]+)|(&[^\\s])|(&[\\w-]+;)"); for( i = QMAX(_firstChangedLine,0) ; i < QMIN(_lastChangedLine+1,(uint)paragraphs()) ; i++ ) { - QString line=text(i); + TQString line=text(i); //remove old highlighting setSelection(i,0,i,line.length()); setColor( _currentColor ); removeSelection(); - QColor colorToUse; + TQColor colorToUse; int index=0; index=markup.search( line, index ); @@ -1234,7 +1234,7 @@ void MsgMultiLineEdit::highlight() int lineindex=0; uint index=0; int startPara, endPara, startIndex, endIndex; - QString t= text(); + TQString t= text(); if(_lastParagraph <= _firstChangedLine) { @@ -1245,19 +1245,19 @@ void MsgMultiLineEdit::highlight() for( ; index<_firstChangedLine ; index++) lineindex+=paragraphLength(index)+1; - QRegExp re("<.*>"); + TQRegExp re("<.*>"); re.setMinimal(true); if( _firstChangedLine >0 ) { - QColor c; - QFont f; + TQColor c; + TQFont f; VerticalAlignment v; getFormat(_firstChangedLine-1, paragraphLength(_firstChangedLine-1)-1, &f, &c, &v); - QString l = text(_firstChangedLine-1); + TQString l = text(_firstChangedLine-1); if( c==_tagColor && !l.endsWith(">") ) // hope _tagColor will be different than other colors { - QRegExp endtag("[^<]*>"); + TQRegExp endtag("[^<]*>"); tagindex=endtag.search(t, lineindex); taglength=endtag.matchedLength(); } else { @@ -1311,26 +1311,26 @@ void MsgMultiLineEdit::highlight() */ } -void MsgMultiLineEdit::drawContents( QPainter *painter, int clipx, int clipy, int clipw, int cliph ) +void MsgMultiLineEdit::drawContents( TQPainter *painter, int clipx, int clipy, int clipw, int cliph ) { MyMultiLineEdit::drawContents( painter, clipx, clipy, clipw, cliph ); paintSpacePoints(); } -void MsgMultiLineEdit::paintEvent( QPaintEvent *event ) +void MsgMultiLineEdit::paintEvent( TQPaintEvent *event ) { MyMultiLineEdit::paintEvent( event ); paintSpacePoints(); } -QRect MsgMultiLineEdit::mapToView( int para, int index ) +TQRect MsgMultiLineEdit::mapToView( int para, int index ) { if( para < 0 || para > paragraphs() || index < 0 || index > paragraphLength(para) ) - return QRect(); //invalid rectangle + return TQRect(); //invalid rectangle - const QFontMetrics& fm = fontMetrics(); - const QString& paratext = text(para); + const TQFontMetrics& fm = fontMetrics(); + const TQString& paratext = text(para); // Find index of the first character on the same line as parameter // 'index' using binary search. Very fast, even for long texts. @@ -1377,9 +1377,9 @@ QRect MsgMultiLineEdit::mapToView( int para, int index ) // no tag on the line, no bold linewidth = fm.width( paratext.mid( linestart, index-linestart )); } else { - QFont f( font() ); + TQFont f( font() ); f.setBold( true ); - QFontMetrics bfm( f ); + TQFontMetrics bfm( f ); // is tag single displayed line? if( _tagStartPara == _tagEndPara && lineOfChar( _tagStartPara, _tagStartIndex ) == lineOfChar( _tagEndPara, _tagEndIndex ) ) @@ -1400,9 +1400,9 @@ QRect MsgMultiLineEdit::mapToView( int para, int index ) } else { // in tag - QFont f( font() ); + TQFont f( font() ); f.setBold( true ); - QFontMetrics bfm( f ); + TQFontMetrics bfm( f ); // is it the first line of the tag? if( para == _tagStartPara && indexline == lineOfChar( _tagStartPara, _tagStartIndex ) ) { // start of the line is normal @@ -1415,23 +1415,23 @@ QRect MsgMultiLineEdit::mapToView( int para, int index ) } } - // FIXME as soon as it's possible to ask real margins from QTextEdit: + // FIXME as soon as it's possible to ask real margins from TQTextEdit: const int left_margin = 4; // const int top_margin = 4; - QPainter painter( viewport()); - const QRect& linerect = paragraphRect(para); - return QRect( - contentsToViewport( QPoint( + TQPainter painter( viewport()); + const TQRect& linerect = paragraphRect(para); + return TQRect( + contentsToViewport( TQPoint( left_margin + linerect.left() + linewidth , /*top_margin + */linerect.top() + indexline * fm.lineSpacing() + fm.leading())), - QSize( + TQSize( fm.charWidth( paratext, index ), fm.lineSpacing() )); } -void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e) +void MsgMultiLineEdit::keyPressEvent(TQKeyEvent *e) { if(!_cleverEditing || isReadOnly()) { @@ -1447,7 +1447,7 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e) int row, col; getCursorPosition(&row,&col); - QString str=text(row); + TQString str=text(row); if(e->state() & ShiftButton) { @@ -1491,7 +1491,7 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e) if( !str.isEmpty()) { // construct new event without modifiers - MyMultiLineEdit::keyPressEvent( new QKeyEvent(e->type(), e->key(), e->ascii(), 0, + MyMultiLineEdit::keyPressEvent( new TQKeyEvent(e->type(), e->key(), e->ascii(), 0, e->text(), e->isAutoRepeat(), e->count() ) ); e->accept(); } @@ -1515,12 +1515,12 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e) { int row, col; getCursorPosition(&row,&col); - QString str=text(row); + TQString str=text(row); if(!str.isEmpty() && col < (int)str.length() && str.at(col) == '\\' && !isMasked(&str,col)) { - QString spclChars="abfnrtv'\"?\\"; + TQString spclChars="abfnrtv'\"?\\"; if(col < (int)str.length()-1 && spclChars.contains(str.at(col+1))) { @@ -1545,9 +1545,9 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e) { int row, col; getCursorPosition(&row,&col); - QString str=text(row); + TQString str=text(row); - QString spclChars="abfnrtv'\"?\\"; + TQString spclChars="abfnrtv'\"?\\"; if(!str.isEmpty() && col > 0 && spclChars.contains(str.at(col-1))) { if(col > 1 && str.at(col-2)=='\\' && !isMasked(&str,col-2)) @@ -1571,7 +1571,7 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e) int row, col; getCursorPosition(&row,&col); - QString str=text(row); + TQString str=text(row); if(col == 0 || str.at(col-1) != '\\' || isMasked(&str,col-1) ) { @@ -1589,14 +1589,14 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e) } else if(e->key() == Key_Space && ( e->state() & AltButton ) ) { - insert( QChar( 0x00a0U ) ); + insert( TQChar( 0x00a0U ) ); e->accept(); return; } // ALT+123 feature else if(( e->state() & AltButton ) && e->text()[0].isDigit() ) { - QString text=e->text(); + TQString text=e->text(); while ( text[0].isDigit() ) { _currentUnicodeNumber = 10*_currentUnicodeNumber+(text[0].digitValue()); text.remove( 0, 1 ); @@ -1608,11 +1608,11 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e) } } -void MsgMultiLineEdit::keyReleaseEvent(QKeyEvent* e) +void MsgMultiLineEdit::keyReleaseEvent(TQKeyEvent* e) { if ( e->key() == Key_Alt && _currentUnicodeNumber >= 32 ) { - QString text = QChar( _currentUnicodeNumber ); + TQString text = TQChar( _currentUnicodeNumber ); _currentUnicodeNumber=0; insert( text ); } @@ -1628,7 +1628,7 @@ void MsgMultiLineEdit::setDiffMode(bool on) } } -bool MsgMultiLineEdit::isMasked(QString *str, uint col) +bool MsgMultiLineEdit::isMasked(TQString *str, uint col) { if(col == 0 || !str) return false; diff --git a/kbabel/kbabel/mymultilineedit.h b/kbabel/kbabel/mymultilineedit.h index 30771610..4f076af5 100644 --- a/kbabel/kbabel/mymultilineedit.h +++ b/kbabel/kbabel/mymultilineedit.h @@ -36,7 +36,7 @@ #define MYMULTILINEEDIT_H #include -#include +#include namespace KBabel { @@ -51,7 +51,7 @@ class MyMultiLineEdit : public KTextEdit { Q_OBJECT public: - MyMultiLineEdit(int ID,QWidget* parent,const char* name=0); + MyMultiLineEdit(int ID,TQWidget* parent,const char* name=0); /** applies cmd to the displayed text, but does not emit @@ -79,7 +79,7 @@ public: */ int endOfLastMarkedText(); - virtual void insertAt ( const QString & s, int line, int col, bool mark = false ); + virtual void insertAt ( const TQString & s, int line, int col, bool mark = false ); virtual void removeLine ( int line ); int pos2Offset(uint paragraph, uint index); @@ -98,7 +98,7 @@ public: /** * need to override deleting of popup menus :-( */ - void contentsContextMenuEvent( QContextMenuEvent *e ); + void contentsContextMenuEvent( TQContextMenuEvent *e ); /** * need to reimplement overwrite mode :-( @@ -110,27 +110,27 @@ public slots: virtual void clear(); virtual void paste(); virtual void setReadOnly(bool on); - virtual void setContextMenu( QPopupMenu *menu ); - virtual void setText(const QString& s); + virtual void setContextMenu( TQPopupMenu *menu ); + virtual void setText(const TQString& s); virtual void doKeyboardAction( KeyboardAction action ); virtual void removeSelectedText(int selNum = 0); virtual void onSelectionChanged(); /** - reimplemented overwrite mode, since QTextEdit handles this internally and does + reimplemented overwrite mode, since TQTextEdit handles this internally and does not use any accessible virtual methods :-((. */ virtual void setOverwriteMode(bool b); protected: - virtual void focusInEvent(QFocusEvent*); - virtual QPopupMenu *createPopupMenu(); - virtual QPopupMenu *createPopupMenu(const QPoint &pos); + virtual void focusInEvent(TQFocusEvent*); + virtual TQPopupMenu *createPopupMenu(); + virtual TQPopupMenu *createPopupMenu(const TQPoint &pos); /* the parent handles this */ - virtual void wheelEvent(QWheelEvent*); + virtual void wheelEvent(TQWheelEvent*); bool emitUndo; @@ -154,7 +154,7 @@ protected: bool _dontUpdate; protected slots: - virtual void insert ( const QString & text, bool indent = FALSE, bool checkNewLine = TRUE, bool removeSelected = TRUE ); + virtual void insert ( const TQString & text, bool indent = FALSE, bool checkNewLine = TRUE, bool removeSelected = TRUE ); virtual void emitCursorPosition(); signals: @@ -165,7 +165,7 @@ protected: int _myID; private: - QPopupMenu *_menu; + TQPopupMenu *_menu; bool _overwrite; }; @@ -176,7 +176,7 @@ class MsgMultiLineEdit : public MyMultiLineEdit public: enum TextColor { NormalColor, ErrorColor }; - MsgMultiLineEdit(int ID, KSpell* spell=0, QWidget* parent=0,const char* name=0); + MsgMultiLineEdit(int ID, KSpell* spell=0, TQWidget* parent=0,const char* name=0); virtual ~MsgMultiLineEdit(); /** is displaying surrounding quotes enabled? */ @@ -192,8 +192,8 @@ public: bool highlightBg() const { return _highlightBg; } /** enable or disable highlighting background*/ void setHighlightBg(bool on); - QColor bgColor() const { return _bgColor; } - void setBgColor(const QColor& color); + TQColor bgColor() const { return _bgColor; } + void setBgColor(const TQColor& color); bool spacePoints() const { return _spacePoints; } void setSpacePoints(bool on); @@ -201,17 +201,17 @@ public: bool highlightSyntax() const { return _hlSyntax; } void highlight(); void setHighlightSyntax(bool on); - void setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor - , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor); + void setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor + , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor); - void setFont(const QFont& font); + void setFont(const TQFont& font); void setDiffMode(bool on); void setDiffDisplayMode(bool underlineAdded, bool strikeOutDeleted); - void setDiffColors(const QColor& addColor, const QColor& delColor); + void setDiffColors(const TQColor& addColor, const TQColor& delColor); - void setTextColor(const QColor &color); - void setErrorColor(const QColor &color); + void setTextColor(const TQColor &color); + void setErrorColor(const TQColor &color); void setCurrentColor(const TextColor color); @@ -220,9 +220,9 @@ public: void selectTag(int start, int length); public slots: - virtual void setText(const QString& s); + virtual void setText(const TQString& s); void paintSpacePoints(); - void paintSpacePoints( int para, int pos ); // overloaded for signal QTextEdit::cursorPositionChanged + void paintSpacePoints( int para, int pos ); // overloaded for signal TQTextEdit::cursorPositionChanged /** * reimplemented to call highlight() @@ -237,49 +237,49 @@ public slots: void ensureCursorVisible(); protected: - virtual void paintEvent (QPaintEvent * event ); - virtual void drawContents( QPainter *painter, int clipx, int clipy, int clipw, int cliph ); + virtual void paintEvent (TQPaintEvent * event ); + virtual void drawContents( TQPainter *painter, int clipx, int clipy, int clipw, int cliph ); - virtual void keyPressEvent(QKeyEvent*); - virtual void keyReleaseEvent(QKeyEvent*); + virtual void keyPressEvent(TQKeyEvent*); + virtual void keyReleaseEvent(TQKeyEvent*); private: /** * Computes the pixel position in line which corresponds to * character position xIndex */ - QRect mapToView( int para, int index ); + TQRect mapToView( int para, int index ); /** * tests if the character in string str at position col is masked with * '\' by counting the number of '\' backwards */ - static bool isMasked(QString *str,uint col); + static bool isMasked(TQString *str,uint col); private: bool _quotes; bool _cleverEditing; bool _highlightBg; bool _spacePoints; - QColor _bgColor; - QColor _textColor; - QColor _errorColor; - QColor _currentColor; + TQColor _bgColor; + TQColor _textColor; + TQColor _errorColor; + TQColor _currentColor; - QPixmap* _whitespace; - QPixmap* _whitespaceNB; - QPixmap* _errorWhitespace; - QPixmap* _errorWhitespaceNB; + TQPixmap* _whitespace; + TQPixmap* _whitespaceNB; + TQPixmap* _errorWhitespace; + TQPixmap* _errorWhitespaceNB; int _wsOffsetX; int _wsOffsetY; bool _hlSyntax; - QColor _quoteColor; - QColor _unquoteColor; - QColor _cformatColor; - QColor _accelColor; - QColor _tagColor; + TQColor _quoteColor; + TQColor _unquoteColor; + TQColor _cformatColor; + TQColor _accelColor; + TQColor _tagColor; struct DiffInfo { @@ -288,12 +288,12 @@ private: int end; }; - QPtrVector< QValueList > diffPos; + TQPtrVector< TQValueList > diffPos; bool _showDiff; bool _diffUnderlineAdd; bool _diffStrikeOutDel; - QColor _diffAddColor; - QColor _diffDelColor; + TQColor _diffAddColor; + TQColor _diffDelColor; // for Alt+123 feature int _currentUnicodeNumber; diff --git a/kbabel/kbabel/sourceview.cpp b/kbabel/kbabel/sourceview.cpp index 08c0f8a4..00d8a3b2 100644 --- a/kbabel/kbabel/sourceview.cpp +++ b/kbabel/kbabel/sourceview.cpp @@ -34,8 +34,8 @@ #include "sourceview.h" #include "context.h" -#include -#include +#include +#include #include #include @@ -45,16 +45,16 @@ using namespace KBabel; -SourceView::SourceView(KBCatalog* catalog,QWidget *parent, Project::Ptr project) +SourceView::SourceView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project) : KBCatalogView(catalog,parent,project) { - QVBoxLayout* layout = new QVBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + TQVBoxLayout* layout = new TQVBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); _contextView = new SourceContext (this, project); layout->addWidget (_contextView); - connect(_catalog, SIGNAL(signalFileOpened(bool)), this, SLOT(setDisabled(bool))); + connect(_catalog, TQT_SIGNAL(signalFileOpened(bool)), this, TQT_SLOT(setDisabled(bool))); } void SourceView::updateView() diff --git a/kbabel/kbabel/sourceview.h b/kbabel/kbabel/sourceview.h index 8caeed35..a12ca767 100644 --- a/kbabel/kbabel/sourceview.h +++ b/kbabel/kbabel/sourceview.h @@ -44,7 +44,7 @@ public: /** * Default constructor */ - SourceView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project); + SourceView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project); public slots: virtual void updateView(); diff --git a/kbabel/kbabel/spelldlg.cpp b/kbabel/kbabel/spelldlg.cpp index 49500e09..de9f2ce6 100644 --- a/kbabel/kbabel/spelldlg.cpp +++ b/kbabel/kbabel/spelldlg.cpp @@ -33,14 +33,14 @@ #include "spelldlg.h" #include "spelldlgwidget.h" -#include -#include +#include +#include #include #include #include -SpellDlg::SpellDlg(bool haveMarkedText,QWidget *parent,const char *name) +SpellDlg::SpellDlg(bool haveMarkedText,TQWidget *parent,const char *name) : KDialogBase(parent,name,true,i18n("Caption of dialog","Spelling") , Ok|Cancel) { @@ -61,7 +61,7 @@ SpellDlg::SpellDlg(bool haveMarkedText,QWidget *parent,const char *name) KConfig *config = KGlobal::config(); KConfigGroupSaver cs(config,"SpellDlg"); - QString what=config->readEntry("Default","All"); + TQString what=config->readEntry("Default","All"); if(what=="All") _mainWidget->allBtn->setChecked(true); @@ -85,7 +85,7 @@ SpellDlg::~SpellDlg() KConfig *config=KGlobal::config(); KConfigGroupSaver cs(config,"SpellDlg"); - QString what="All"; + TQString what="All"; if(_mainWidget->endBtn->isChecked()) what="End"; else if(_mainWidget->beginBtn->isChecked()) diff --git a/kbabel/kbabel/spelldlg.h b/kbabel/kbabel/spelldlg.h index ea857777..e12fc515 100644 --- a/kbabel/kbabel/spelldlg.h +++ b/kbabel/kbabel/spelldlg.h @@ -43,7 +43,7 @@ class SpellDlg : public KDialogBase Q_OBJECT public: - SpellDlg(bool haveMarkedText, QWidget* parent, const char *name=0); + SpellDlg(bool haveMarkedText, TQWidget* parent, const char *name=0); ~SpellDlg(); bool all() const; diff --git a/kbabel/kbabel/taglistview.cpp b/kbabel/kbabel/taglistview.cpp index 8dedccea..476c2ed7 100644 --- a/kbabel/kbabel/taglistview.cpp +++ b/kbabel/kbabel/taglistview.cpp @@ -33,8 +33,8 @@ #include "taglistview.h" -#include -#include +#include +#include #include #include @@ -44,23 +44,23 @@ using namespace KBabel; -TagListView::TagListView(KBCatalog* catalog,QWidget *parent, Project::Ptr project) +TagListView::TagListView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project) : KBCatalogView(catalog,parent,project) { - QVBoxLayout* layout = new QVBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + TQVBoxLayout* layout = new TQVBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); _tagBox = new KListBox (this, "taglist textview"); layout->addWidget (_tagBox); - connect(_tagBox,SIGNAL(selected(const QString&)) - , this, SIGNAL(signalTagSelected(const QString&))); - connect(_tagBox,SIGNAL(highlighted(int)) - , this, SIGNAL(signalHighlightedTagChanged(int))); + connect(_tagBox,TQT_SIGNAL(selected(const TQString&)) + , this, TQT_SIGNAL(signalTagSelected(const TQString&))); + connect(_tagBox,TQT_SIGNAL(highlighted(int)) + , this, TQT_SIGNAL(signalHighlightedTagChanged(int))); - connect(_catalog, SIGNAL(signalFileOpened(bool)) - , this, SLOT(setDisabled(bool))); + connect(_catalog, TQT_SIGNAL(signalFileOpened(bool)) + , this, TQT_SLOT(setDisabled(bool))); } void TagListView::updateView() diff --git a/kbabel/kbabel/taglistview.h b/kbabel/kbabel/taglistview.h index 0435e3ba..d4361a23 100644 --- a/kbabel/kbabel/taglistview.h +++ b/kbabel/kbabel/taglistview.h @@ -44,7 +44,7 @@ public: /** * Default constructor */ - TagListView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project); + TagListView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project); public slots: virtual void updateView(); @@ -52,7 +52,7 @@ public slots: signals: void signalHighlightedTagChanged (int index); - void signalTagSelected (const QString& tag); + void signalTagSelected (const TQString& tag); private: KListBox* _tagBox; diff --git a/kbabel/kbabeldict/aboutmoduledlg.cpp b/kbabel/kbabeldict/aboutmoduledlg.cpp index eaab8b3b..5de3f0fb 100644 --- a/kbabel/kbabeldict/aboutmoduledlg.cpp +++ b/kbabel/kbabeldict/aboutmoduledlg.cpp @@ -35,7 +35,7 @@ #include #include -AboutModuleDlg::AboutModuleDlg(const KAboutData *aboutData, QWidget *parent) +AboutModuleDlg::AboutModuleDlg(const KAboutData *aboutData, TQWidget *parent) : KAboutApplication(aboutData, parent) , _aboutData(aboutData) { @@ -43,7 +43,7 @@ AboutModuleDlg::AboutModuleDlg(const KAboutData *aboutData, QWidget *parent) enableLinkedHelp(true); } -void AboutModuleDlg::helpClickedSlot(const QString&) +void AboutModuleDlg::helpClickedSlot(const TQString&) { KBugReport *bugReport = new KBugReport(0,true,_aboutData); diff --git a/kbabel/kbabeldict/aboutmoduledlg.h b/kbabel/kbabeldict/aboutmoduledlg.h index f79d77ec..09f13f8f 100644 --- a/kbabel/kbabeldict/aboutmoduledlg.h +++ b/kbabel/kbabeldict/aboutmoduledlg.h @@ -43,10 +43,10 @@ class AboutModuleDlg : public KAboutApplication Q_OBJECT public: - AboutModuleDlg(const KAboutData *aboutData, QWidget* parent=0); + AboutModuleDlg(const KAboutData *aboutData, TQWidget* parent=0); public slots: - virtual void helpClickedSlot(const QString&); + virtual void helpClickedSlot(const TQString&); private: const KAboutData *_aboutData; diff --git a/kbabel/kbabeldict/dictchooser.cpp b/kbabel/kbabeldict/dictchooser.cpp index f9360b61..f99c3709 100644 --- a/kbabel/kbabeldict/dictchooser.cpp +++ b/kbabel/kbabeldict/dictchooser.cpp @@ -35,42 +35,42 @@ #include "dictchooser.h" #include "resources.h" -#include -#include -#include +#include +#include +#include #include #include #include #include #include -DictChooser::DictChooser(KBabelDictBox*b, QStringList selected - , QWidget *parent, const char *name) - : QWidget(parent,name), box(b) +DictChooser::DictChooser(KBabelDictBox*b, TQStringList selected + , TQWidget *parent, const char *name) + : TQWidget(parent,name), box(b) { tempConfig.clear(); tempConfig.setAutoDelete(true); dictList = box->moduleInfos(); - QGridLayout *layout = new QGridLayout(this); + TQGridLayout *layout = new TQGridLayout(this); layout->setSpacing(KDialog::spacingHint()); - QLabel *label = new QLabel(i18n("dictionary to not use","Do not use:"),this); + TQLabel *label = new TQLabel(i18n("dictionary to not use","Do not use:"),this); layout->addWidget(label,0,0); - label = new QLabel(i18n("dictionary to use","Use:"),this); + label = new TQLabel(i18n("dictionary to use","Use:"),this); layout->addWidget(label,0,2); unselectedBox = new KListBox(this,"unselectedBox"); layout->addWidget(unselectedBox,1,0); - QVBoxLayout *bLayout = new QVBoxLayout(); - selectBtn = new QPushButton(" &>> ", this); + TQVBoxLayout *bLayout = new TQVBoxLayout(); + selectBtn = new TQPushButton(" &>> ", this); selectBtn->setEnabled(false); bLayout->addWidget(selectBtn); - unselectBtn = new QPushButton(" &<< ", this); + unselectBtn = new TQPushButton(" &<< ", this); unselectBtn->setEnabled(false); bLayout->addWidget(unselectBtn); bLayout->addStretch(); @@ -80,14 +80,14 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected layout->addWidget(selectedBox,1,2); - bLayout = new QVBoxLayout(); - upBtn = new QPushButton(i18n("Move &Up"), this); + bLayout = new TQVBoxLayout(); + upBtn = new TQPushButton(i18n("Move &Up"), this); upBtn->setEnabled(false); bLayout->addWidget(upBtn); - downBtn = new QPushButton(i18n("Move &Down"), this); + downBtn = new TQPushButton(i18n("Move &Down"), this); downBtn->setEnabled(false); bLayout->addWidget(downBtn); - configureBtn = new QPushButton(i18n("Con&figure..."), this); + configureBtn = new TQPushButton(i18n("Con&figure..."), this); bLayout->addWidget(configureBtn); bLayout->addStretch(); layout->addLayout(bLayout,1,3); @@ -95,7 +95,7 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected dictList.setAutoDelete(true); ModuleInfo *mi; - for(QStringList::Iterator it=selected.begin(); it!=selected.end(); + for(TQStringList::Iterator it=selected.begin(); it!=selected.end(); ++it) { for(mi = dictList.first(); mi != 0; mi = dictList.next()) @@ -122,17 +122,17 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected } - connect(selectedBox,SIGNAL(highlighted(int)), this - , SLOT(selectedMarked(int))); - connect(unselectedBox,SIGNAL(highlighted(int)), this - , SLOT(unselectedMarked(int))); + connect(selectedBox,TQT_SIGNAL(highlighted(int)), this + , TQT_SLOT(selectedMarked(int))); + connect(unselectedBox,TQT_SIGNAL(highlighted(int)), this + , TQT_SLOT(unselectedMarked(int))); - connect(selectBtn, SIGNAL(clicked()), this, SLOT(select())); - connect(unselectBtn, SIGNAL(clicked()), this, SLOT(unselect())); - connect(upBtn, SIGNAL(clicked()), this, SLOT(up())); - connect(downBtn, SIGNAL(clicked()), this, SLOT(down())); - connect(configureBtn,SIGNAL(clicked()), this - , SLOT(configureSelected())); + connect(selectBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(select())); + connect(unselectBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(unselect())); + connect(upBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(up())); + connect(downBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(down())); + connect(configureBtn,TQT_SIGNAL(clicked()), this + , TQT_SLOT(configureSelected())); selectedBox->installEventFilter(this); @@ -144,13 +144,13 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected } -QStringList DictChooser::selectedDicts() +TQStringList DictChooser::selectedDicts() { - QStringList selected; + TQStringList selected; for(int i = 0; i < (int)selectedBox->count(); i++) { - QString text = selectedBox->text(i); + TQString text = selectedBox->text(i); ModuleInfo *mi; for(mi = dictList.first(); mi!=0; mi = dictList.next()) @@ -192,7 +192,7 @@ void DictChooser::select() int i = unselectedBox->currentItem(); if(i >= 0) { - QString text = unselectedBox->text(i); + TQString text = unselectedBox->text(i); selectedBox->insertItem(text); unselectedBox->removeItem(i); @@ -214,7 +214,7 @@ void DictChooser::unselect() int i = selectedBox->currentItem(); if(i >= 0 && selectedBox->count() > 1) { - QString text = selectedBox->text(i); + TQString text = selectedBox->text(i); unselectedBox->insertItem(text); selectedBox->removeItem(i); @@ -236,7 +236,7 @@ void DictChooser::up() int i = selectedBox->currentItem(); if(i > 0) { - QString text = selectedBox->text(i); + TQString text = selectedBox->text(i); selectedBox->changeItem(selectedBox->text(i-1),i); selectedBox->changeItem(text,i-1); selectedBox->setSelected(i-1,true); @@ -249,7 +249,7 @@ void DictChooser::down() int i = selectedBox->currentItem(); if(i < (int)selectedBox->count()-1) { - QString text = selectedBox->text(i); + TQString text = selectedBox->text(i); selectedBox->changeItem(selectedBox->text(i+1),i); selectedBox->changeItem(text,i+1); selectedBox->setSelected(i+1,true); @@ -257,9 +257,9 @@ void DictChooser::down() } -bool DictChooser::eventFilter(QObject *object, QEvent *event) +bool DictChooser::eventFilter(TQObject *object, TQEvent *event) { - if(event->type() == QEvent::FocusIn) + if(event->type() == TQEvent::FocusIn) { if(object==selectedBox) { @@ -289,7 +289,7 @@ void DictChooser::configureSelected() { int ci = selectedBox->currentItem(); if( ci == -1 ) ci = 0; // there is always at least one item - QString module = selectedBox->text(ci); + TQString module = selectedBox->text(ci); ModuleInfo *mi; for(mi = dictList.first(); mi!=0; mi = dictList.next()) @@ -320,7 +320,7 @@ void DictChooser::restoreConfig() { kdDebug( KBABEL_SEARCH ) << "Cleanup" << endl; // cleanup - QDictIterator it( tempConfig ); // See QDictIterator + TQDictIterator it( tempConfig ); // See QDictIterator for( ; it.current(); ++it ) { KConfig config( it.current()->name() ); diff --git a/kbabel/kbabeldict/dictchooser.h b/kbabel/kbabeldict/dictchooser.h index 2b757455..c5740d33 100644 --- a/kbabel/kbabeldict/dictchooser.h +++ b/kbabel/kbabeldict/dictchooser.h @@ -35,9 +35,9 @@ #ifndef DICTCHOOSER_H #define DICTCHOOSER_H -#include -#include -#include +#include +#include +#include #include class KListBox; @@ -52,17 +52,17 @@ class KDE_EXPORT DictChooser : public QWidget Q_OBJECT public: - DictChooser(KBabelDictBox* box, QStringList selected, - QWidget *parent , const char *name=0); + DictChooser(KBabelDictBox* box, TQStringList selected, + TQWidget *parent , const char *name=0); - QStringList selectedDicts(); + TQStringList selectedDicts(); /** If the user configured some of the modules, this * restores the original configuration of all these modules */ void restoreConfig(); - virtual bool eventFilter(QObject *, QEvent *); + virtual bool eventFilter(TQObject *, TQEvent *); private slots: void select(); @@ -77,18 +77,18 @@ private slots: private: KBabelDictBox* box; - QPtrList dictList; + TQPtrList dictList; KListBox *selectedBox; KListBox *unselectedBox; - QPushButton *selectBtn; - QPushButton *unselectBtn; - QPushButton *upBtn; - QPushButton *downBtn; - QPushButton *configureBtn; + TQPushButton *selectBtn; + TQPushButton *unselectBtn; + TQPushButton *upBtn; + TQPushButton *downBtn; + TQPushButton *configureBtn; - QDict tempConfig; + TQDict tempConfig; }; #endif // DICTCHOOSER_H diff --git a/kbabel/kbabeldict/dictionarymenu.cpp b/kbabel/kbabeldict/dictionarymenu.cpp index 2ed57d5f..5d648697 100644 --- a/kbabel/kbabeldict/dictionarymenu.cpp +++ b/kbabel/kbabeldict/dictionarymenu.cpp @@ -36,11 +36,11 @@ #include #include -#include +#include DictionaryMenu::DictionaryMenu(KPopupMenu *popupMenu, KActionCollection *collection - , QObject *parent) - : QObject(parent, "dictionarymenu") + , TQObject *parent) + : TQObject(parent, "dictionarymenu") , popup(popupMenu) , actionCollection(collection) , maxId(10) @@ -50,12 +50,12 @@ DictionaryMenu::DictionaryMenu(KPopupMenu *popupMenu, KActionCollection *collect if(popup) { - connect(popup,SIGNAL(activated(int)),this,SLOT(activated(int))); + connect(popup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(activated(int))); } - dictionaryMapper = new QSignalMapper( this ); - connect( dictionaryMapper, SIGNAL( mapped( int ) ), - this, SLOT( activated( int ) ) ); + dictionaryMapper = new TQSignalMapper( this ); + connect( dictionaryMapper, TQT_SIGNAL( mapped( int ) ), + this, TQT_SLOT( activated( int ) ) ); } @@ -68,7 +68,7 @@ void DictionaryMenu::clear() { if(popup) { - QIntDictIterator it( num2id ); // iterator for dict + TQIntDictIterator it( num2id ); // iterator for dict while ( it.current() ) { popup->removeItem(it.currentKey()); @@ -80,49 +80,49 @@ void DictionaryMenu::clear() // create new mapper delete dictionaryMapper; - dictionaryMapper = new QSignalMapper( this ); - connect( dictionaryMapper, SIGNAL( mapped( int ) ), - this, SLOT( activated( int ) ) ); + dictionaryMapper = new TQSignalMapper( this ); + connect( dictionaryMapper, TQT_SIGNAL( mapped( int ) ), + this, TQT_SLOT( activated( int ) ) ); } -void DictionaryMenu::add(const QString& name, const QString& moduleId) +void DictionaryMenu::add(const TQString& name, const TQString& moduleId) { if(popup) { - KAction* dictionaryAction = new KAction( name, 0, dictionaryMapper, SLOT(map()), actionCollection, moduleId.utf8() ); + KAction* dictionaryAction = new KAction( name, 0, dictionaryMapper, TQT_SLOT(map()), actionCollection, moduleId.utf8() ); uint id = maxId++; dictionaryAction->plug(popup, id); dictionaryMapper->setMapping( dictionaryAction, id ); - QString *idString = new QString(moduleId); + TQString *idString = new TQString(moduleId); num2id.insert(id,idString); } } -void DictionaryMenu::add(const QString& n, const QString& moduleId - , const QString& key) +void DictionaryMenu::add(const TQString& n, const TQString& moduleId + , const TQString& key) { if(popup) { - QString name=n; + TQString name=n; - QString keyString=key; + TQString keyString=key; if(keyString.contains("%1")) { keyString=key.arg(accel2id.count()+1); } KShortcut k(keyString); - KAction* dictionaryAction = new KAction( name, k, dictionaryMapper, SLOT(map()), actionCollection, key.arg(moduleId).utf8() ); + KAction* dictionaryAction = new KAction( name, k, dictionaryMapper, TQT_SLOT(map()), actionCollection, key.arg(moduleId).utf8() ); uint id = maxId++; dictionaryAction->plug(popup,id); if(!k.isNull()) { - QString *idString = new QString(moduleId); + TQString *idString = new TQString(moduleId); accel2id.insert(id,idString); dictionaryMapper->setMapping( dictionaryAction, id ); @@ -135,7 +135,7 @@ void DictionaryMenu::add(const QString& n, const QString& moduleId kdWarning() << "key not valid" << endl; } - QString *idString = new QString(moduleId); + TQString *idString = new TQString(moduleId); num2id.insert(id,idString); } } @@ -143,7 +143,7 @@ void DictionaryMenu::add(const QString& n, const QString& moduleId void DictionaryMenu::activated(int id) { - QString *idString = num2id[id]; + TQString *idString = num2id[id]; if(idString) { diff --git a/kbabel/kbabeldict/dictionarymenu.h b/kbabel/kbabeldict/dictionarymenu.h index c688508e..c520501a 100644 --- a/kbabel/kbabeldict/dictionarymenu.h +++ b/kbabel/kbabeldict/dictionarymenu.h @@ -33,10 +33,10 @@ #ifndef DICTIONARYMENU_H #define DICTIONARYMENU_H -#include -#include -#include -#include +#include +#include +#include +#include #include class QSignalMapper; @@ -48,31 +48,31 @@ class KDE_EXPORT DictionaryMenu : public QObject Q_OBJECT public: - DictionaryMenu(KPopupMenu *menu, KActionCollection *collection, QObject *parent=0); + DictionaryMenu(KPopupMenu *menu, KActionCollection *collection, TQObject *parent=0); ~DictionaryMenu(); - void add(const QString& name,const QString& id); + void add(const TQString& name,const TQString& id); /** * Adds an item to this menu and to the keyboard accelerator. * If key contains %1 it is replaced with a number 1-9 */ - void add(const QString& name,const QString& id, const QString& key); + void add(const TQString& name,const TQString& id, const TQString& key); void clear(); signals: - void activated(const QString moduleId); + void activated(const TQString moduleId); private slots: void activated(int); private: - QGuardedPtr popup; - QGuardedPtr actionCollection; - QIntDict num2id; - QIntDict accel2id; - QSignalMapper* dictionaryMapper; + TQGuardedPtr popup; + TQGuardedPtr actionCollection; + TQIntDict num2id; + TQIntDict accel2id; + TQSignalMapper* dictionaryMapper; uint maxId; }; diff --git a/kbabel/kbabeldict/kbabeldict.cpp b/kbabel/kbabeldict/kbabeldict.cpp index ebb68227..cae04d07 100644 --- a/kbabel/kbabeldict/kbabeldict.cpp +++ b/kbabel/kbabeldict/kbabeldict.cpp @@ -47,13 +47,13 @@ KBabelDict::KBabelDict() , i18n("About"), i18n("About Module") , i18n("Hide Sett&ings")) { - connect(this, SIGNAL(closeClicked()),this,SLOT(saveConfig())); - connect(this, SIGNAL(closeClicked()),this,SLOT(quit())); + connect(this, TQT_SIGNAL(closeClicked()),this,TQT_SLOT(saveConfig())); + connect(this, TQT_SIGNAL(closeClicked()),this,TQT_SLOT(quit())); view = new KBabelDictView(this); - connect(this, SIGNAL(user1Clicked()), view, SLOT(about())); - connect(this, SIGNAL(user2Clicked()), view, SLOT(aboutModule())); - connect(this, SIGNAL(user3Clicked()), this, SLOT(togglePref())); + connect(this, TQT_SIGNAL(user1Clicked()), view, TQT_SLOT(about())); + connect(this, TQT_SIGNAL(user2Clicked()), view, TQT_SLOT(aboutModule())); + connect(this, TQT_SIGNAL(user3Clicked()), this, TQT_SLOT(togglePref())); // HACK: hide default button, otherwise it would be Help button showButtonOK(false); diff --git a/kbabel/kbabeldict/kbabeldictbox.cpp b/kbabel/kbabeldict/kbabeldictbox.cpp index 2beed684..f6ca948f 100644 --- a/kbabel/kbabeldict/kbabeldictbox.cpp +++ b/kbabel/kbabeldict/kbabeldictbox.cpp @@ -58,17 +58,17 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define KBABELDICT 5321 @@ -77,9 +77,9 @@ using namespace KBabel; class ResultListItem : public QListViewItem { public: - ResultListItem(QListView *parent, const SearchResult& result,bool richText); + ResultListItem(TQListView *parent, const SearchResult& result,bool richText); - virtual QString key(int column, bool ascending) const; + virtual TQString key(int column, bool ascending) const; const SearchResult* result() const; bool richText() const { return _richText; } @@ -88,9 +88,9 @@ private: bool _richText; }; -ResultListItem::ResultListItem(QListView *parent, const SearchResult& result +ResultListItem::ResultListItem(TQListView *parent, const SearchResult& result , bool richText) - : QListViewItem(parent) + : TQListViewItem(parent) , _result(result) , _richText(richText) { @@ -99,9 +99,9 @@ ResultListItem::ResultListItem(QListView *parent, const SearchResult& result score=0; else if(score>100) score=100; - setText(0,QString::number(score)); + setText(0,TQString::number(score)); - QString tmp; + TQString tmp; if(richText) tmp=_result.plainFound; else @@ -160,17 +160,17 @@ ResultListItem::ResultListItem(QListView *parent, const SearchResult& result } -QString ResultListItem::key(int column, bool ascending) const +TQString ResultListItem::key(int column, bool ascending) const { if(column==0) { - QString result=QString::number(_result.score); + TQString result=TQString::number(_result.score); result=result.rightJustify(10,'0'); return result; } - return QListViewItem::key(column,ascending); + return TQListViewItem::key(column,ascending); } const SearchResult *ResultListItem::result() const @@ -182,8 +182,8 @@ const SearchResult *ResultListItem::result() const * Constructs a KBabelDictBox which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ -KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl ) - : DCOPObject("KBabelDict"), QWidget( parent, name, fl ) +KBabelDictBox::KBabelDictBox( TQWidget* parent, const char* name, WFlags fl ) + : DCOPObject("KBabelDict"), TQWidget( parent, name, fl ) { active=-1; currentResult=0; @@ -191,39 +191,39 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl ) moduleList.setAutoDelete(false); - QVBoxLayout *mainLayout = new QVBoxLayout(this); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this); mainLayout->setMargin(KDialog::marginHint()); mainLayout->setSpacing(KDialog::spacingHint()); - QGridLayout *grid = new QGridLayout(mainLayout); + TQGridLayout *grid = new TQGridLayout(mainLayout); - QHBoxLayout *hbox = new QHBoxLayout; - QLabel *label = new QLabel(i18n("Total:"),this); + TQHBoxLayout *hbox = new QHBoxLayout; + TQLabel *label = new TQLabel(i18n("Total:"),this); hbox->addWidget(label); - totalResultsLabel = new QLabel("0",this); + totalResultsLabel = new TQLabel("0",this); hbox->addWidget(totalResultsLabel); grid->addLayout(hbox,0,0); hbox = new QHBoxLayout; - label = new QLabel(i18n("Current:"), this); + label = new TQLabel(i18n("Current:"), this); hbox->addWidget(label); - currentLabel = new QLabel("0",this); + currentLabel = new TQLabel("0",this); hbox->addWidget(currentLabel); grid->addLayout(hbox,1,0); hbox = new QHBoxLayout; - label = new QLabel(i18n("Found in:"), this); + label = new TQLabel(i18n("Found in:"), this); hbox->addWidget(label); - locationLabel = new QLabel(this); + locationLabel = new TQLabel(this); hbox->addWidget(locationLabel); hbox->setStretchFactor(locationLabel,2); grid->addLayout(hbox,0,1); hbox = new QHBoxLayout; - label = new QLabel(i18n("Translator:"), this); + label = new TQLabel(i18n("Translator:"), this); hbox->addWidget(label); - translatorLabel = new QLabel(this); + translatorLabel = new TQLabel(this); translatorLabel->setMinimumSize(50,0); hbox->addWidget(translatorLabel); hbox->setStretchFactor(translatorLabel,2); @@ -233,14 +233,14 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl ) hbox = new QHBoxLayout; - label = new QLabel(i18n("Date:"),this); + label = new TQLabel(i18n("Date:"),this); hbox->addWidget(label); - dateLabel = new QLabel(this); + dateLabel = new TQLabel(this); dateLabel->setMinimumSize(50,0); hbox->addWidget(dateLabel); hbox->setStretchFactor(dateLabel,2); - moreButton = new QPushButton(this,"moreButton"); + moreButton = new TQPushButton(this,"moreButton"); moreButton->setText(i18n("&More")); moreButton->setEnabled(false); moreButton->setAutoRepeat(true); @@ -251,33 +251,33 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl ) hbox = new QHBoxLayout; hbox->addStretch(1); - listButton = new QToolButton(Qt::UpArrow,this); + listButton = new TQToolButton(Qt::UpArrow,this); listButton->setFixedSize(20,15); listButton->setAutoRepeat(false); - connect(listButton,SIGNAL(clicked()),this,SLOT(showListOnly())); + connect(listButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showListOnly())); hbox->addWidget(listButton); - detailButton = new QToolButton(Qt::DownArrow,this); + detailButton = new TQToolButton(Qt::DownArrow,this); detailButton->setFixedSize(20,15); detailButton->setAutoRepeat(false); - connect(detailButton,SIGNAL(clicked()),this,SLOT(showDetailsOnly())); + connect(detailButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showDetailsOnly())); hbox->addWidget(detailButton); mainLayout->addLayout(hbox); - resultSplitter = new QSplitter(Qt::Vertical,this + resultSplitter = new TQSplitter(Qt::Vertical,this ,"resultsplitter"); mainLayout->addWidget(resultSplitter); - viewContainer = new QSplitter(Qt::Vertical,resultSplitter, "singleEntrySplitter"); - QVBoxLayout *vbox = new QVBoxLayout(viewContainer); - vbox->setResizeMode(QLayout::FreeResize); - origView = new QTextView(viewContainer,"origView"); - origView->setWordWrap( QTextEdit::WidgetWidth ); + viewContainer = new TQSplitter(Qt::Vertical,resultSplitter, "singleEntrySplitter"); + TQVBoxLayout *vbox = new TQVBoxLayout(viewContainer); + vbox->setResizeMode(TQLayout::FreeResize); + origView = new TQTextView(viewContainer,"origView"); + origView->setWordWrap( TQTextEdit::WidgetWidth ); origView->setMinimumSize(1,1); vbox->addWidget(origView); - translationView = new QTextView(viewContainer,"translationView"); - origView->setWordWrap( QTextEdit::WidgetWidth ); + translationView = new TQTextView(viewContainer,"translationView"); + origView->setWordWrap( TQTextEdit::WidgetWidth ); translationView->setMinimumSize(1,1); vbox->addWidget(translationView); viewContainer->setMinimumSize(1,1); @@ -291,17 +291,17 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl ) resultListView->installEventFilter(this); connect(resultListView - , SIGNAL(doubleClicked(QListViewItem *,const QPoint&,int)) - , this, SLOT(editFile())); - connect(resultListView, SIGNAL(returnPressed(QListViewItem *)) - , this, SLOT(editFile())); + , TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint&,int)) + , this, TQT_SLOT(editFile())); + connect(resultListView, TQT_SIGNAL(returnPressed(TQListViewItem *)) + , this, TQT_SLOT(editFile())); connect(resultListView - , SIGNAL(contextMenu(KListView *,QListViewItem *,const QPoint&)) + , TQT_SIGNAL(contextMenu(KListView *,TQListViewItem *,const TQPoint&)) , this - , SLOT(showContextMenu(KListView *,QListViewItem *,const QPoint&))); + , TQT_SLOT(showContextMenu(KListView *,TQListViewItem *,const TQPoint&))); - resultSplitter->setResizeMode(viewContainer,QSplitter::KeepSize); - QValueList sizes; + resultSplitter->setResizeMode(viewContainer,TQSplitter::KeepSize); + TQValueList sizes; sizes.append(50); sizes.append(50); resultSplitter->setSizes(sizes); @@ -310,12 +310,12 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl ) hbox = new QHBoxLayout; hbox->addStretch(1); - prevButton = new QPushButton(i18n("< &Previous"),this); + prevButton = new TQPushButton(i18n("< &Previous"),this); prevButton->setEnabled(false); prevButton->setAutoRepeat(true); hbox->addWidget(prevButton); - nextButton = new QPushButton(i18n("&Next >"),this); + nextButton = new TQPushButton(i18n("&Next >"),this); nextButton->setEnabled(false); nextButton->setAutoRepeat(true); hbox->addWidget(nextButton); @@ -330,21 +330,21 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl ) currentLabel->setFixedSize(currentLabel->sizeHint()); currentLabel->setNum(0); - setRMBMenu(new QPopupMenu(this)); - QStringList fileList; + setRMBMenu(new TQPopupMenu(this)); + TQStringList fileList; #if 0 // try to find installed modules by looking into directories // kbabeldict/modules and getting all files *.rc - QStringList dirList = KGlobal::dirs()->findDirs("data" + TQStringList dirList = KGlobal::dirs()->findDirs("data" ,"kbabeldict/modules"); - for ( QStringList::Iterator it = dirList.begin(); it != dirList.end() + for ( TQStringList::Iterator it = dirList.begin(); it != dirList.end() ; ++it ) { - QDir dir((*it),"*.rc"); - QStringList list = dir.entryList(QDir::Files|QDir::Readable); + TQDir dir((*it),"*.rc"); + TQStringList list = dir.entryList(TQDir::Files|TQDir::Readable); - for ( QStringList::Iterator fit = list.begin(); fit != list.end() + for ( TQStringList::Iterator fit = list.begin(); fit != list.end() ; ++fit ) { if(!fileList.contains((*fit))) @@ -357,28 +357,28 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl ) // use locate to locate the actual file, because rcfiles in the users // directory is prefered for systemwide rc files - QStringList rcList; - for( QStringList::Iterator fit = fileList.begin(); fit != fileList.end(); + TQStringList rcList; + for( TQStringList::Iterator fit = fileList.begin(); fit != fileList.end(); ++fit) { rcList.append(locate("data","kbabeldict/modules/"+(*fit))); } - for( QStringList::Iterator rit = rcList.begin(); rit != rcList.end(); + for( TQStringList::Iterator rit = rcList.begin(); rit != rcList.end(); ++rit) { KConfig rcConfig((*rit),true,false); rcConfig.setGroup("SearchEngine"); - QStringList appList = rcConfig.readListEntry("Applications"); + TQStringList appList = rcConfig.readListEntry("Applications"); KInstance *inst = KGlobal::instance(); if(inst && !appList.isEmpty() && !appList.contains(inst->instanceName())) { continue; } - QString libName = rcConfig.readEntry("Lib"); + TQString libName = rcConfig.readEntry("Lib"); if(!libName.isNull()) { @@ -464,9 +464,9 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl ) } } - connect(nextButton,SIGNAL(clicked()),this,SLOT(slotNextResult())); - connect(prevButton,SIGNAL(clicked()),this,SLOT(slotPrevResult())); - connect(moreButton,SIGNAL(clicked()),this,SLOT(nextInfo())); + connect(nextButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotNextResult())); + connect(prevButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotPrevResult())); + connect(moreButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(nextInfo())); origView->installEventFilter(this); @@ -475,8 +475,8 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl ) resultListView->setSorting(0,false); resultListView->setAllColumnsShowFocus(true); - connect(resultListView,SIGNAL(selectionChanged(QListViewItem*)) - , this, SLOT(showResult(QListViewItem*))); + connect(resultListView,TQT_SIGNAL(selectionChanged(TQListViewItem*)) + , this, TQT_SLOT(showResult(TQListViewItem*))); } /* @@ -490,18 +490,18 @@ void KBabelDictBox::registerModule( SearchEngine* e ) { active = 0; moduleList.append(e); - connect(e, SIGNAL(started()),this,SIGNAL(searchStarted())); - connect(e, SIGNAL(finished()),this,SIGNAL(searchStopped())); - connect(e, SIGNAL(finished()),this - ,SLOT(clearModuleResults())); - connect(e, SIGNAL(progress(int)),this,SIGNAL(progressed(int))); - connect(e, SIGNAL(progressStarts(const QString&)),this - , SIGNAL(progressStarts(const QString&))); - connect(e, SIGNAL(progressEnds()),this,SIGNAL(progressEnds())); - connect(e, SIGNAL(resultFound(const SearchResult*)), this - , SLOT(addResult(const SearchResult*))); - connect(e, SIGNAL(hasError(const QString&)), this - , SIGNAL(errorInModule(const QString&))); + connect(e, TQT_SIGNAL(started()),this,TQT_SIGNAL(searchStarted())); + connect(e, TQT_SIGNAL(finished()),this,TQT_SIGNAL(searchStopped())); + connect(e, TQT_SIGNAL(finished()),this + ,TQT_SLOT(clearModuleResults())); + connect(e, TQT_SIGNAL(progress(int)),this,TQT_SIGNAL(progressed(int))); + connect(e, TQT_SIGNAL(progressStarts(const TQString&)),this + , TQT_SIGNAL(progressStarts(const TQString&))); + connect(e, TQT_SIGNAL(progressEnds()),this,TQT_SIGNAL(progressEnds())); + connect(e, TQT_SIGNAL(resultFound(const SearchResult*)), this + , TQT_SLOT(addResult(const SearchResult*))); + connect(e, TQT_SIGNAL(hasError(const TQString&)), this + , TQT_SIGNAL(errorInModule(const TQString&))); } void KBabelDictBox::saveSettings(KConfigBase *config) @@ -527,7 +527,7 @@ void KBabelDictBox::saveSettings(KConfigBase *config) } -void KBabelDictBox::saveSettings(const QString& moduleId, KConfigBase *config) +void KBabelDictBox::saveSettings(const TQString& moduleId, KConfigBase *config) { SearchEngine *e; @@ -545,11 +545,11 @@ void KBabelDictBox::readSettings(KConfigBase *config) { SearchEngine *e; KConfigGroupSaver cs(config,"KBabelDict"); - QValueList sizes=config->readIntListEntry("ResultSplitter"); + TQValueList sizes=config->readIntListEntry("ResultSplitter"); if(!sizes.isEmpty()) resultSplitter->setSizes(sizes); - QString m = config->readEntry("ActiveModule"); + TQString m = config->readEntry("ActiveModule"); if(!m.isEmpty()) { setActiveModule(m); @@ -562,7 +562,7 @@ void KBabelDictBox::readSettings(KConfigBase *config) } } -void KBabelDictBox::readSettings(const QString& moduleId, KConfigBase *config) +void KBabelDictBox::readSettings(const TQString& moduleId, KConfigBase *config) { SearchEngine *e; @@ -626,7 +626,7 @@ void KBabelDictBox::setActiveModule(int a) } } -void KBabelDictBox::setActiveModule(QString id) +void KBabelDictBox::setActiveModule(TQString id) { SearchEngine *e; @@ -647,7 +647,7 @@ void KBabelDictBox::setActiveModule(QString id) /* * public slot */ -void KBabelDictBox::startSearch(const QString text) +void KBabelDictBox::startSearch(const TQString text) { clear(); SearchEngine *engine = moduleList.at(active); @@ -661,8 +661,8 @@ void KBabelDictBox::startSearch(const QString text) if(engine->isSearching()) { engine->stopSearch(); - connect(this, SIGNAL(searchStopped()), this - , SLOT(startDelayedSearch())); + connect(this, TQT_SIGNAL(searchStopped()), this + , TQT_SLOT(startDelayedSearch())); searchText=text; } @@ -673,7 +673,7 @@ void KBabelDictBox::startSearch(const QString text) /* * public slot */ -void KBabelDictBox::startTranslationSearch(const QString text) +void KBabelDictBox::startTranslationSearch(const TQString text) { clear(); SearchEngine *engine = moduleList.at(active); @@ -687,8 +687,8 @@ void KBabelDictBox::startTranslationSearch(const QString text) if(engine->isSearching()) { engine->stopSearch(); - connect(this, SIGNAL(searchStopped()), this - , SLOT(startDelayedTranslationSearch())); + connect(this, TQT_SIGNAL(searchStopped()), this + , TQT_SLOT(startDelayedTranslationSearch())); searchText=text; } @@ -696,7 +696,7 @@ void KBabelDictBox::startTranslationSearch(const QString text) } } -void KBabelDictBox::startDelayedSearch(const QString text) +void KBabelDictBox::startDelayedSearch(const TQString text) { clear(); SearchEngine *engine = moduleList.at(active); @@ -713,18 +713,18 @@ void KBabelDictBox::startDelayedSearch(const QString text) { engine->stopSearch(); - connect(this, SIGNAL(searchStopped()), this - , SLOT(startDelayedSearch())); + connect(this, TQT_SIGNAL(searchStopped()), this + , TQT_SLOT(startDelayedSearch())); } else { - QTimer::singleShot(5,this,SLOT(startDelayedSearch())); + TQTimer::singleShot(5,this,TQT_SLOT(startDelayedSearch())); } } } -void KBabelDictBox::startDelayedTranslationSearch(const QString text) +void KBabelDictBox::startDelayedTranslationSearch(const TQString text) { clear(); SearchEngine *engine = moduleList.at(active); @@ -741,25 +741,25 @@ void KBabelDictBox::startDelayedTranslationSearch(const QString text) { engine->stopSearch(); - connect(this, SIGNAL(searchStopped()), this - , SLOT(startDelayedTranslationSearch())); + connect(this, TQT_SIGNAL(searchStopped()), this + , TQT_SLOT(startDelayedTranslationSearch())); } else { - QTimer::singleShot(5,this,SLOT(startDelayedTranslationSearch())); + TQTimer::singleShot(5,this,TQT_SLOT(startDelayedTranslationSearch())); } } } -QString KBabelDictBox::translate(const QString text) +TQString KBabelDictBox::translate(const TQString text) { SearchEngine *engine = moduleList.at(active); if(!engine) { kdDebug(KBABELDICT) << "no module available" << endl; - return QString::null; + return TQString::null; } else { @@ -772,14 +772,14 @@ QString KBabelDictBox::translate(const QString text) } } -QString KBabelDictBox::fuzzyTranslation(const QString text, int &score) +TQString KBabelDictBox::fuzzyTranslation(const TQString text, int &score) { SearchEngine *engine = moduleList.at(active); if(!engine) { kdDebug(KBABELDICT) << "no module available" << endl; - return QString::null; + return TQString::null; } else { @@ -792,14 +792,14 @@ QString KBabelDictBox::fuzzyTranslation(const QString text, int &score) } } -QString KBabelDictBox::searchTranslation(const QString text, int &score) +TQString KBabelDictBox::searchTranslation(const TQString text, int &score) { SearchEngine *engine = moduleList.at(active); if(!engine) { kdDebug(KBABELDICT) << "no module available" << endl; - return QString::null; + return TQString::null; } else { @@ -824,8 +824,8 @@ void KBabelDictBox::startDelayedSearch() } else { - disconnect(this, SIGNAL(searchStopped()), this - , SLOT(startDelayedSearch())); + disconnect(this, TQT_SIGNAL(searchStopped()), this + , TQT_SLOT(startDelayedSearch())); engine->startSearch(searchText); @@ -844,8 +844,8 @@ void KBabelDictBox::startDelayedTranslationSearch() } else { - disconnect(this, SIGNAL(searchStopped()), this - , SLOT(startDelayedTranslationSearch())); + disconnect(this, TQT_SIGNAL(searchStopped()), this + , TQT_SLOT(startDelayedTranslationSearch())); engine->startSearchInTranslation(searchText); @@ -884,9 +884,9 @@ bool KBabelDictBox::isSearching() } -QStringList KBabelDictBox::moduleNames() +TQStringList KBabelDictBox::moduleNames() { - QStringList list; + TQStringList list; SearchEngine *e; for(e = moduleList.first(); e != 0; e = moduleList.next()) @@ -897,9 +897,9 @@ QStringList KBabelDictBox::moduleNames() return list; } -QStringList KBabelDictBox::modules() +TQStringList KBabelDictBox::modules() { - QStringList list; + TQStringList list; SearchEngine *e; for(e = moduleList.first(); e != 0; e = moduleList.next()) @@ -910,9 +910,9 @@ QStringList KBabelDictBox::modules() return list; } -QPtrList KBabelDictBox::moduleInfos() +TQPtrList KBabelDictBox::moduleInfos() { - QPtrList list; + TQPtrList list; SearchEngine *e; for(e = moduleList.first(); e != 0; e = moduleList.next()) @@ -929,9 +929,9 @@ QPtrList KBabelDictBox::moduleInfos() } -QPtrList KBabelDictBox::modPrefWidgets(QWidget *parent) +TQPtrList KBabelDictBox::modPrefWidgets(TQWidget *parent) { - QPtrList list; + TQPtrList list; list.setAutoDelete(false); SearchEngine *e; @@ -945,7 +945,7 @@ QPtrList KBabelDictBox::modPrefWidgets(QWidget *parent) } -void KBabelDictBox::showResult(QListViewItem *item) +void KBabelDictBox::showResult(TQListViewItem *item) { ResultListItem *resultItem = static_cast(item); @@ -979,14 +979,14 @@ void KBabelDictBox::showResult(QListViewItem *item) else { // FIXME: what about plural forms? - origView->setText(QStyleSheet::convertFromPlainText(result->found.first())); + origView->setText(TQStyleSheet::convertFromPlainText(result->found.first())); translationView->setText( - QStyleSheet::convertFromPlainText(result->translation)); + TQStyleSheet::convertFromPlainText(result->translation)); } if(result->descriptions.count() > 0) { - QPtrListIterator it(result->descriptions); + TQPtrListIterator it(result->descriptions); TranslationInfo *info=it.current(); if(info) { @@ -1030,7 +1030,7 @@ void KBabelDictBox::showResult(QListViewItem *item) moreButton->setEnabled((result->descriptions.count() > 1)); - currentLabel->setText(QString::number(currentResult+1)); + currentLabel->setText(TQString::number(currentResult+1)); prevButton->setEnabled(currentResult > 0); nextButton->setEnabled(currentResult+1 < total); @@ -1040,7 +1040,7 @@ void KBabelDictBox::showResult(QListViewItem *item) void KBabelDictBox::nextResult() { - QListViewItem *item=resultListView->selectedItem(); + TQListViewItem *item=resultListView->selectedItem(); if(item) { item=item->itemBelow(); @@ -1054,7 +1054,7 @@ void KBabelDictBox::nextResult() void KBabelDictBox::prevResult() { - QListViewItem *item=resultListView->selectedItem(); + TQListViewItem *item=resultListView->selectedItem(); if(item) { item=item->itemAbove(); @@ -1077,7 +1077,7 @@ void KBabelDictBox::addResult(const SearchResult* result) return; } - QListViewItem *item=resultListView->selectedItem(); + TQListViewItem *item=resultListView->selectedItem(); int index=0; if(item) { @@ -1086,7 +1086,7 @@ void KBabelDictBox::addResult(const SearchResult* result) new ResultListItem(resultListView, *result,e->usesRichTextResults()); total++; - totalResultsLabel->setText(QString::number(total)); + totalResultsLabel->setText(TQString::number(total)); if(total==1) { @@ -1108,8 +1108,8 @@ void KBabelDictBox::clear() dateLabel->setText(""); locationLabel->setText(""); translatorLabel->setText(""); - currentLabel->setText(QString::number(0)); - totalResultsLabel->setText(QString::number(0)); + currentLabel->setText(TQString::number(0)); + totalResultsLabel->setText(TQString::number(0)); origView->setText(""); translationView->setText(""); currentResult=0; @@ -1150,13 +1150,13 @@ void KBabelDictBox::nextInfo() TranslationInfo *info; if(currentInfo == (int)result->descriptions.count()) { - QPtrListIterator it(result->descriptions); + TQPtrListIterator it(result->descriptions); info = it.current(); currentInfo = 0; } else { - QPtrListIterator it(result->descriptions); + TQPtrListIterator it(result->descriptions); for(int i=0; i < currentInfo; i++) { ++it; @@ -1199,7 +1199,7 @@ void KBabelDictBox::nextInfo() void KBabelDictBox::showListOnly() { int h=resultSplitter->height(); - QValueList sizes; + TQValueList sizes; sizes.append(1); sizes.append(h-1); resultSplitter->setSizes(sizes); @@ -1208,7 +1208,7 @@ void KBabelDictBox::showListOnly() void KBabelDictBox::showDetailsOnly() { int h=resultSplitter->height(); - QValueList sizes; + TQValueList sizes; sizes.append(h-1); sizes.append(h); resultSplitter->setSizes(sizes); @@ -1234,7 +1234,7 @@ void KBabelDictBox::about() if(aboutData) { - QString text = aboutData->programName() + " " + + TQString text = aboutData->programName() + " " + aboutData->version() + "\n"; text += "\n"+aboutData->shortDescription()+"\n"; @@ -1258,7 +1258,7 @@ void KBabelDictBox::about() .arg(aboutData->bugAddress()) +"\n"; } - QLabel *label = new QLabel(text,0); + TQLabel *label = new TQLabel(text,0); page->addWidget(label); int authorCount = aboutData->authors().count(); @@ -1269,10 +1269,10 @@ void KBabelDictBox::about() else text=i18n("Authors:"); - label = new QLabel(text,0); + label = new TQLabel(text,0); page->addWidget(label); - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for(it = aboutData->authors().begin(); it != aboutData->authors().end(); ++it) { @@ -1284,10 +1284,10 @@ void KBabelDictBox::about() if(creditsCount) { text = i18n("Thanks to:"); - label = new QLabel(text,0); + label = new TQLabel(text,0); page->addWidget(label); - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for(it = aboutData->credits().begin(); it != aboutData->credits().end(); ++it) { @@ -1299,14 +1299,14 @@ void KBabelDictBox::about() } else { - QString text = i18n("No information available."); - QLabel *label = new QLabel(text,0); + TQString text = i18n("No information available."); + TQLabel *label = new TQLabel(text,0); page->addWidget(label); } } - aboutDlg->setInitialSize(QSize(400,1)); + aboutDlg->setInitialSize(TQSize(400,1)); aboutDlg->exec(); delete aboutDlg; @@ -1321,7 +1321,7 @@ void KBabelDictBox::aboutActiveModule() aboutModule(engine->id()); } -void KBabelDictBox::aboutModule(const QString& id) +void KBabelDictBox::aboutModule(const TQString& id) { SearchEngine *e; @@ -1360,12 +1360,12 @@ void KBabelDictBox::slotStopSearch() stopSearch(); } -void KBabelDictBox::slotStartSearch(const QString& text) +void KBabelDictBox::slotStartSearch(const TQString& text) { startSearch(text); } -void KBabelDictBox::setEditedPackage(const QString& name) +void KBabelDictBox::setEditedPackage(const TQString& name) { SearchEngine *e; @@ -1376,7 +1376,7 @@ void KBabelDictBox::setEditedPackage(const QString& name) } -void KBabelDictBox::setEditedFile(const QString& path) +void KBabelDictBox::setEditedFile(const TQString& path) { SearchEngine *e; @@ -1386,8 +1386,8 @@ void KBabelDictBox::setEditedFile(const QString& path) } } -void KBabelDictBox::setLanguage(const QString& languageCode, - const QString& languageName) +void KBabelDictBox::setLanguage(const TQString& languageCode, + const TQString& languageName) { SearchEngine *e; @@ -1415,11 +1415,11 @@ void KBabelDictBox::copy() } } -QString KBabelDictBox::translation() +TQString KBabelDictBox::translation() { - QString trans; + TQString trans; - QListViewItem *item=resultListView->selectedItem(); + TQListViewItem *item=resultListView->selectedItem(); if(item) { ResultListItem *r=static_cast(item); @@ -1439,7 +1439,7 @@ QString KBabelDictBox::translation() return trans; } -void KBabelDictBox::setRMBMenu(QPopupMenu *popup) +void KBabelDictBox::setRMBMenu(TQPopupMenu *popup) { if(popup) { @@ -1447,7 +1447,7 @@ void KBabelDictBox::setRMBMenu(QPopupMenu *popup) popup->insertSeparator(); editFileIndex = popup->insertItem(i18n("Edit File") - , this, SLOT(editFile())); + , this, TQT_SLOT(editFile())); popup->setItemEnabled(editFileIndex,false); KContextMenuManager::insert(origView,popup); @@ -1474,9 +1474,9 @@ bool KBabelDictBox::hasSelectedText() const return have; } -QString KBabelDictBox::selectedText() const +TQString KBabelDictBox::selectedText() const { - QString text; + TQString text; if(origView->hasSelectedText()) text=origView->selectedText(); else if(translationView->hasSelectedText()) @@ -1487,10 +1487,10 @@ QString KBabelDictBox::selectedText() const -void KBabelDictBox::configure(const QString& id, bool modal) +void KBabelDictBox::configure(const TQString& id, bool modal) { - QWidget* w = prefDialogs[id]; + TQWidget* w = prefDialogs[id]; if(w) { KWin::setActiveWindow(w->winId()); @@ -1502,23 +1502,23 @@ void KBabelDictBox::configure(const QString& id, bool modal) { if(e->id() == id) { - QString caption = i18n("Configure Dictionary %1").arg(e->name()); + TQString caption = i18n("Configure Dictionary %1").arg(e->name()); KDialogBase *dialog = new KDialogBase(this,"prefDialog" , modal, caption , KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel| KDialogBase::Default); - QWhatsThis::add(dialog,""); + TQWhatsThis::add(dialog,""); PrefWidget *prefWidget = e->preferencesWidget(dialog); dialog->setMainWidget(prefWidget); - connect(dialog, SIGNAL(okClicked()),prefWidget,SLOT(apply())); - connect(dialog, SIGNAL(applyClicked()),prefWidget,SLOT(apply())); - connect(dialog, SIGNAL(defaultClicked()),prefWidget,SLOT(standard())); - connect(dialog, SIGNAL(cancelClicked()),prefWidget,SLOT(cancel())); + connect(dialog, TQT_SIGNAL(okClicked()),prefWidget,TQT_SLOT(apply())); + connect(dialog, TQT_SIGNAL(applyClicked()),prefWidget,TQT_SLOT(apply())); + connect(dialog, TQT_SIGNAL(defaultClicked()),prefWidget,TQT_SLOT(standard())); + connect(dialog, TQT_SIGNAL(cancelClicked()),prefWidget,TQT_SLOT(cancel())); - connect(dialog, SIGNAL(finished()),this,SLOT(destroyConfigDialog())); + connect(dialog, TQT_SIGNAL(finished()),this,TQT_SLOT(destroyConfigDialog())); prefDialogs.insert(id,dialog); @@ -1534,7 +1534,7 @@ void KBabelDictBox::configure(const QString& id, bool modal) void KBabelDictBox::destroyConfigDialog() { - const QObject *obj = sender(); + const TQObject *obj = sender(); if(obj && obj->inherits("KDialogBase")) { KDialogBase *dialog = (KDialogBase*)obj; @@ -1542,7 +1542,7 @@ void KBabelDictBox::destroyConfigDialog() { dialog->delayedDestruct(); - QDictIterator it(prefDialogs); + TQDictIterator it(prefDialogs); while(it.current() != dialog) { ++it; @@ -1553,7 +1553,7 @@ void KBabelDictBox::destroyConfigDialog() } } -void KBabelDictBox::edit(const QString& id) +void KBabelDictBox::edit(const TQString& id) { SearchEngine *e; @@ -1579,8 +1579,8 @@ void KBabelDictBox::edit() engine->edit(); } -void KBabelDictBox::setTextChanged(const QStringList& orig, - const QString& translation, uint pluralForm, const QString& description) +void KBabelDictBox::setTextChanged(const TQStringList& orig, + const TQString& translation, uint pluralForm, const TQString& description) { SearchEngine *e; @@ -1591,7 +1591,7 @@ void KBabelDictBox::setTextChanged(const QStringList& orig, } -void KBabelDictBox::wheelEvent(QWheelEvent *we) +void KBabelDictBox::wheelEvent(TQWheelEvent *we) { if(we->delta() > 0) { @@ -1605,18 +1605,18 @@ void KBabelDictBox::wheelEvent(QWheelEvent *we) we->accept(); } -bool KBabelDictBox::eventFilter(QObject *o, QEvent *e) +bool KBabelDictBox::eventFilter(TQObject *o, TQEvent *e) { - if(e->type() == QEvent::Wheel) + if(e->type() == TQEvent::Wheel) { - QWheelEvent *we = static_cast(e); + TQWheelEvent *we = static_cast(e); if(we) { wheelEvent(we); return true; } } - else if(e->type() == QEvent::Resize && o == resultListView) + else if(e->type() == TQEvent::Resize && o == resultListView) { if(resultListView->height() < 2) { @@ -1655,7 +1655,7 @@ void KBabelDictBox::editFile() if(!result->descriptions.isEmpty()) { TranslationInfo *info; - QPtrListIterator it(result->descriptions); + TQPtrListIterator it(result->descriptions); for(int i=0; i < currentInfo; i++) { ++it; @@ -1664,8 +1664,8 @@ void KBabelDictBox::editFile() if(!info->filePath.isEmpty()) { - QString url = info->filePath; - QString msgid; + TQString url = info->filePath; + TQString msgid; if( item->richText() ) { @@ -1685,8 +1685,8 @@ void KBabelDictBox::editFile() { kdDebug(KBABELDICT) << "kbabel is not registered" << endl; - QString error; - QStringList argList; + TQString error; + TQStringList argList; argList.append("--nosplash"); argList.append("--gotomsgid"); argList.append(msgid.local8Bit()); @@ -1702,11 +1702,11 @@ void KBabelDictBox::editFile() } else { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << url.utf8() << msgid.utf8(); if (!dcop->send("kbabel", "KBabelIFace" - , "gotoFileEntry(QCString,QCString)",data)) + , "gotoFileEntry(TQCString,TQCString)",data)) { KMessageBox::sorry(this ,i18n("There was an error using DCOP.")); @@ -1717,7 +1717,7 @@ void KBabelDictBox::editFile() } } -void KBabelDictBox::showContextMenu(KListView *,QListViewItem *,const QPoint& p) +void KBabelDictBox::showContextMenu(KListView *,TQListViewItem *,const TQPoint& p) { if(rmbPopup) { @@ -1726,8 +1726,8 @@ void KBabelDictBox::showContextMenu(KListView *,QListViewItem *,const QPoint& p) } -bool KBabelDictBox::messagesForPackage(const QString& package - , QValueList& resultList, QString& error) +bool KBabelDictBox::messagesForPackage(const TQString& package + , TQValueList& resultList, TQString& error) { setActiveModule("dbsearchengine"); SearchEngine *engine = moduleList.at(active); @@ -1740,7 +1740,7 @@ bool KBabelDictBox::messagesForPackage(const QString& package return false; } - QValueList rList; + TQValueList rList; SearchFilter* filter = new SearchFilter(); filter->setLocation(package); @@ -1749,7 +1749,7 @@ bool KBabelDictBox::messagesForPackage(const QString& package if(success) { - QValueList::Iterator it; + TQValueList::Iterator it; for(it=rList.begin(); it != rList.end(); ++it) { // FIXME: what about plural forms? diff --git a/kbabel/kbabeldict/kbabeldictbox.h b/kbabel/kbabeldict/kbabeldictbox.h index 8168786e..2c3992f1 100644 --- a/kbabel/kbabeldict/kbabeldictbox.h +++ b/kbabel/kbabeldict/kbabeldictbox.h @@ -37,10 +37,10 @@ #include "searchengine.h" #include "catalog.h" -#include -#include -#include -#include +#include +#include +#include +#include class KListView; class QLabel; @@ -53,36 +53,36 @@ class QToolButton; struct ModuleInfo { - QString id; - QString name; + TQString id; + TQString name; bool editable; }; -class KDE_EXPORT KBabelDictBox : public QWidget, virtual public KBabelDictIFace +class KDE_EXPORT KBabelDictBox : public TQWidget, virtual public KBabelDictIFace { Q_OBJECT public: - KBabelDictBox( QWidget* parent = 0, const char* name = 0 + KBabelDictBox( TQWidget* parent = 0, const char* name = 0 , WFlags fl = 0 ); ~KBabelDictBox(); /** @returns ids of available modules */ - virtual QStringList modules(); + virtual TQStringList modules(); /** @returns (translated) names of available modules */ - QStringList moduleNames(); + TQStringList moduleNames(); /** * @returns a list with information about the available modules * Take care about, that you have to delete the items by yourself. */ - QPtrList moduleInfos(); + TQPtrList moduleInfos(); /** @returns preferencesWidgets of modules */ - QPtrList modPrefWidgets(QWidget* parent); + TQPtrList modPrefWidgets(TQWidget* parent); int activeModule(); bool activeModuleEditable(); @@ -95,15 +95,15 @@ public: void nextResult(); void prevResult(); - void startSearch(const QString); - void startTranslationSearch(const QString); - void startDelayedSearch(const QString); - void startDelayedTranslationSearch(const QString); - QString translate(const QString); - QString searchTranslation(const QString, int& score); - QString fuzzyTranslation(const QString, int& score); + void startSearch(const TQString); + void startTranslationSearch(const TQString); + void startDelayedSearch(const TQString); + void startDelayedTranslationSearch(const TQString); + TQString translate(const TQString); + TQString searchTranslation(const TQString, int& score); + TQString fuzzyTranslation(const TQString, int& score); void stopSearch(); - void setActiveModule(QString name); + void setActiveModule(TQString name); /** * @returns true, if a search is active at the moment @@ -120,7 +120,7 @@ public: * Saves the settings of the given module * in the given config object. */ - void saveSettings(const QString& moduleId, KConfigBase *config); + void saveSettings(const TQString& moduleId, KConfigBase *config); /** * Reads the settings including the settings of the different modules @@ -132,20 +132,20 @@ public: * Reads the settings of the given module * from the given config object. */ - void readSettings(const QString& moduleId, KConfigBase *config); + void readSettings(const TQString& moduleId, KConfigBase *config); /** @returns the translation of the current search result */ - QString translation(); + TQString translation(); bool hasSelectedText() const; - QString selectedText() const; + TQString selectedText() const; - void setRMBMenu(QPopupMenu *popup); + void setRMBMenu(TQPopupMenu *popup); - virtual bool eventFilter(QObject *, QEvent*); + virtual bool eventFilter(TQObject *, TQEvent*); /** @@ -153,37 +153,37 @@ public: * from dbsearchengine. When dbsearchengine allows multiple access to * the database this will get removed. */ - bool messagesForPackage(const QString& package - , QValueList& resultList, QString& error); + bool messagesForPackage(const TQString& package + , TQValueList& resultList, TQString& error); public slots: virtual void setActiveModule(int); - void slotStartSearch(const QString&); + void slotStartSearch(const TQString&); void slotStopSearch(); void slotNextResult(); void slotPrevResult(); void about(); - void aboutModule(const QString& moduleID); + void aboutModule(const TQString& moduleID); void aboutActiveModule(); /** * sets the name of the package currently edited */ - void setEditedPackage(const QString& packageName); + void setEditedPackage(const TQString& packageName); /** * sets the filepath of the package currently edited */ - void setEditedFile(const QString& path); + void setEditedFile(const TQString& path); /** sets the language code to use */ - void setLanguage(const QString& languageCode - , const QString& languageName); + void setLanguage(const TQString& languageCode + , const TQString& languageName); - void setTextChanged(const QStringList& orig, const QString& translation, - uint pluralForm, const QString& description); + void setTextChanged(const TQStringList& orig, const TQString& translation, + uint pluralForm, const TQString& description); /** * if text is marked, copy this into the clipboard, otherwise @@ -191,8 +191,8 @@ public slots: */ void copy(); - void configure(const QString& moduleID, bool modal=false); - void edit(const QString& moduleID); + void configure(const TQString& moduleID, bool modal=false); + void edit(const TQString& moduleID); void edit(); void clear(); @@ -202,11 +202,11 @@ signals: void searchStarted(); void searchStopped(); void progressed(int); - void progressStarts(const QString&); + void progressStarts(const TQString&); void progressEnds(); void activeModuleChanged(int); void activeModuleChanged(bool editable); - void errorInModule(const QString& error); + void errorInModule(const TQString& error); /** * emitted when either the order @@ -215,14 +215,14 @@ signals: void modulesChanged(); protected slots: - void showResult(QListViewItem*); + void showResult(TQListViewItem*); void addResult(const SearchResult*); void nextInfo(); void showDetailsOnly(); void showListOnly(); void clearModuleResults(); void editFile(); - void showContextMenu(KListView *, QListViewItem *, const QPoint&); + void showContextMenu(KListView *, TQListViewItem *, const TQPoint&); /** * This slots gets connected to a SearchEngine's searchStopped() signal, @@ -239,7 +239,7 @@ protected slots: void destroyConfigDialog(); protected: - virtual void wheelEvent(QWheelEvent*); + virtual void wheelEvent(TQWheelEvent*); private: /** @@ -247,36 +247,36 @@ private: */ void registerModule( SearchEngine* module); - QPtrList moduleList; + TQPtrList moduleList; int active; int currentResult; int currentInfo; int total; /** stores a string to be used with delayed search */ - QString searchText; - - QDict prefDialogs; - - QLabel *translatorLabel; - QLabel *locationLabel; - QLabel *totalResultsLabel; - QLabel *currentLabel; - QLabel *dateLabel; - QPushButton *moreButton; - QPushButton *nextButton; - QPushButton *prevButton; - QTextView *origView; - QTextView *translationView; - QSplitter *viewContainer; + TQString searchText; + + TQDict prefDialogs; + + TQLabel *translatorLabel; + TQLabel *locationLabel; + TQLabel *totalResultsLabel; + TQLabel *currentLabel; + TQLabel *dateLabel; + TQPushButton *moreButton; + TQPushButton *nextButton; + TQPushButton *prevButton; + TQTextView *origView; + TQTextView *translationView; + TQSplitter *viewContainer; KListView *resultListView; - QSplitter *resultSplitter; + TQSplitter *resultSplitter; - QToolButton *listButton; - QToolButton *detailButton; + TQToolButton *listButton; + TQToolButton *detailButton; int editFileIndex; - QGuardedPtr rmbPopup; + TQGuardedPtr rmbPopup; }; #endif // KBABELDICTBOX_H diff --git a/kbabel/kbabeldict/kbabeldictiface.h b/kbabel/kbabeldict/kbabeldictiface.h index 0b98a565..d576d4c5 100644 --- a/kbabel/kbabeldict/kbabeldictiface.h +++ b/kbabel/kbabeldict/kbabeldictiface.h @@ -35,17 +35,17 @@ #define KBABELDICTINTERFACE_H #include -#include +#include class KBabelDictIFace : virtual public DCOPObject { K_DCOP k_dcop: - virtual QStringList modules() = 0; - virtual ASYNC setActiveModule(QString modulename) = 0; + virtual TQStringList modules() = 0; + virtual ASYNC setActiveModule(TQString modulename) = 0; - virtual ASYNC startSearch(const QString searchstring) = 0; + virtual ASYNC startSearch(const TQString searchstring) = 0; virtual ASYNC stopSearch() = 0; virtual ASYNC nextResult()=0; diff --git a/kbabel/kbabeldict/kbabeldictview.cpp b/kbabel/kbabeldict/kbabeldictview.cpp index 26afd981..b5be8399 100644 --- a/kbabel/kbabeldict/kbabeldictview.cpp +++ b/kbabel/kbabeldict/kbabeldictview.cpp @@ -37,17 +37,17 @@ #include "searchengine.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -64,37 +64,37 @@ * Constructs a KBabelDictView which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ -KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) +KBabelDictView::KBabelDictView( TQWidget* parent, const char* name, WFlags fl ) + : TQWidget( parent, name, fl ) { - QVBoxLayout *mainLayout = new QVBoxLayout(this); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this); mainLayout->setSpacing(KDialog::spacingHint()); mainLayout->setMargin(KDialog::marginHint()); - splitter = new QSplitter(this); + splitter = new TQSplitter(this); mainLayout->addWidget(splitter); - QWidget *w = new QWidget(splitter); - QVBoxLayout *wLayout= new QVBoxLayout(w); + TQWidget *w = new TQWidget(splitter); + TQVBoxLayout *wLayout= new TQVBoxLayout(w); wLayout->setSpacing(KDialog::spacingHint()); wLayout->setMargin(KDialog::marginHint()); - QHBoxLayout *hbox = new QHBoxLayout(wLayout); - QLabel *label = new QLabel(i18n("Search in module:"), w); + TQHBoxLayout *hbox = new TQHBoxLayout(wLayout); + TQLabel *label = new TQLabel(i18n("Search in module:"), w); hbox->addWidget(label); moduleCombo = new KComboBox(w); hbox->addWidget(moduleCombo); - QWidget *temp = new QWidget(w); + TQWidget *temp = new TQWidget(w); hbox->addWidget(temp); hbox->setStretchFactor(temp,2); - editButton = new QPushButton(i18n("&Edit"),w); + editButton = new TQPushButton(i18n("&Edit"),w); editButton->setEnabled(false); hbox->addWidget(editButton); // added a button "clear search" here - hbox = new QHBoxLayout(wLayout); - QPushButton* clearButton = new QPushButton(w); + hbox = new TQHBoxLayout(wLayout); + TQPushButton* clearButton = new TQPushButton(w); clearButton->setFlat(true); clearButton->setPixmap(SmallIcon("locationbar_erase")); hbox->addWidget(clearButton); @@ -102,13 +102,13 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl ) textEdit->setFocus(); hbox->addWidget(textEdit); - hbox = new QHBoxLayout(wLayout); - startButton = new QPushButton(i18n("&Start Search"),w); + hbox = new TQHBoxLayout(wLayout); + startButton = new TQPushButton(i18n("&Start Search"),w); hbox->addWidget(startButton); - inTransButton = new QCheckBox(i18n("Sea&rch in translations"),w); + inTransButton = new TQCheckBox(i18n("Sea&rch in translations"),w); hbox->addWidget(inTransButton); hbox->addStretch(1); - stopButton = new QPushButton(i18n("S&top"),w); + stopButton = new TQPushButton(i18n("S&top"),w); stopButton->setEnabled(false); hbox->addWidget(stopButton); @@ -117,15 +117,15 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl ) dictBox = new KBabelDictBox(w,"kbabeldictbox"); wLayout->addWidget(dictBox); - prefWidget = new QWidget(splitter); - QVBoxLayout *tempLayout= new QVBoxLayout(prefWidget); + prefWidget = new TQWidget(splitter); + TQVBoxLayout *tempLayout= new TQVBoxLayout(prefWidget); tempLayout->setSpacing(KDialog::spacingHint()); tempLayout->setMargin(KDialog::marginHint()); - label = new QLabel(i18n("Settings:"),prefWidget); + label = new TQLabel(i18n("Settings:"),prefWidget); tempLayout->addWidget(label); - prefStack = new QWidgetStack(prefWidget); + prefStack = new TQWidgetStack(prefWidget); tempLayout->addWidget(prefStack); tempLayout->addStretch(1); @@ -133,10 +133,10 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl ) dictBox->readSettings(config); dictBox->setAutoUpdateOptions(true); - QStringList modules = dictBox->moduleNames(); + TQStringList modules = dictBox->moduleNames(); moduleCombo->insertStringList(modules); - QPtrList prefs = dictBox->modPrefWidgets(prefStack); + TQPtrList prefs = dictBox->modPrefWidgets(prefStack); prefs.setAutoDelete(false); PrefWidget *p; @@ -152,31 +152,31 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl ) moduleCombo->setCurrentItem(active); - QHBox *h = new QHBox(this); + TQHBox *h = new TQHBox(this); h->setSpacing(KDialog::spacingHint()); mainLayout->addWidget(h); - progressLabel = new QLabel(h); + progressLabel = new TQLabel(h); progressBar = new KProgress(h); - connect(textEdit,SIGNAL(returnPressed()),startButton,SLOT(animateClick())); - connect(startButton,SIGNAL(clicked()),this, SLOT(startSearch())); - connect(stopButton, SIGNAL(clicked()), dictBox,SLOT(slotStopSearch())); - connect(editButton, SIGNAL(clicked()), dictBox, SLOT(edit())); - connect(dictBox, SIGNAL(searchStarted()), this, SLOT(searchStarted())); - connect(dictBox, SIGNAL(searchStopped()), this, SLOT(searchStopped())); - connect(dictBox, SIGNAL(progressed(int)), progressBar, SLOT(setProgress(int))); - connect(dictBox, SIGNAL(activeModuleChanged(bool)) - , editButton, SLOT(setEnabled(bool))); + connect(textEdit,TQT_SIGNAL(returnPressed()),startButton,TQT_SLOT(animateClick())); + connect(startButton,TQT_SIGNAL(clicked()),this, TQT_SLOT(startSearch())); + connect(stopButton, TQT_SIGNAL(clicked()), dictBox,TQT_SLOT(slotStopSearch())); + connect(editButton, TQT_SIGNAL(clicked()), dictBox, TQT_SLOT(edit())); + connect(dictBox, TQT_SIGNAL(searchStarted()), this, TQT_SLOT(searchStarted())); + connect(dictBox, TQT_SIGNAL(searchStopped()), this, TQT_SLOT(searchStopped())); + connect(dictBox, TQT_SIGNAL(progressed(int)), progressBar, TQT_SLOT(setProgress(int))); + connect(dictBox, TQT_SIGNAL(activeModuleChanged(bool)) + , editButton, TQT_SLOT(setEnabled(bool))); - connect(dictBox, SIGNAL(progressStarts(const QString&)) - , this, SLOT(progressStarted(const QString&))); - connect(dictBox, SIGNAL(progressEnds()), this, SLOT(progressStopped())); + connect(dictBox, TQT_SIGNAL(progressStarts(const TQString&)) + , this, TQT_SLOT(progressStarted(const TQString&))); + connect(dictBox, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(progressStopped())); - connect(moduleCombo, SIGNAL(activated(int)), - dictBox, SLOT(setActiveModule(int))); - connect(dictBox, SIGNAL(activeModuleChanged(int)) - , this, SLOT(switchModule(int))); - connect(clearButton, SIGNAL(clicked()), this, SLOT(slotClearSearch())); + connect(moduleCombo, TQT_SIGNAL(activated(int)), + dictBox, TQT_SLOT(setActiveModule(int))); + connect(dictBox, TQT_SIGNAL(activeModuleChanged(int)) + , this, TQT_SLOT(switchModule(int))); + connect(clearButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearSearch())); } /* @@ -194,7 +194,7 @@ KBabelDictView::~KBabelDictView() */ void KBabelDictView::startSearch() { - QString text = textEdit->text(); + TQString text = textEdit->text(); if(!text.isEmpty()) { @@ -219,7 +219,7 @@ void KBabelDictView::progressStopped() stopButton->setEnabled(false); } -void KBabelDictView::progressStarted(const QString& msg) +void KBabelDictView::progressStarted(const TQString& msg) { progressLabel->setText(msg); startButton->setEnabled(false); diff --git a/kbabel/kbabeldict/kbabeldictview.h b/kbabel/kbabeldict/kbabeldictview.h index 510936c4..838d3ba3 100644 --- a/kbabel/kbabeldict/kbabeldictview.h +++ b/kbabel/kbabeldict/kbabeldictview.h @@ -35,7 +35,7 @@ #ifndef KBABELDICTVIEW_H #define KBABELDICTVIEW_H -#include +#include class KComboBox; class KLineEdit; @@ -48,12 +48,12 @@ class QWidgetStack; class KBabelDictBox; -class KBabelDictView : public QWidget +class KBabelDictView : public TQWidget { Q_OBJECT public: - KBabelDictView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + KBabelDictView( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~KBabelDictView(); bool prefVisible(); @@ -69,7 +69,7 @@ private slots: void searchStarted(); void switchModule(int); void progressStopped(); - void progressStarted(const QString&); + void progressStarted(const TQString&); void slotClearSearch(); private: @@ -77,16 +77,16 @@ private: KComboBox *moduleCombo; KLineEdit *textEdit; - QCheckBox *inTransButton; - QPushButton *startButton; - QPushButton *stopButton; - QPushButton *editButton; - QWidgetStack *prefStack; + TQCheckBox *inTransButton; + TQPushButton *startButton; + TQPushButton *stopButton; + TQPushButton *editButton; + TQWidgetStack *prefStack; KProgress *progressBar; - QLabel *progressLabel; - QSplitter *splitter; + TQLabel *progressLabel; + TQSplitter *splitter; - QWidget *prefWidget; + TQWidget *prefWidget; }; #endif // KBABELDICTVIEW_H diff --git a/kbabel/kbabeldict/kbabelsplash.cpp b/kbabel/kbabeldict/kbabelsplash.cpp index 16ac2352..7b62f31e 100644 --- a/kbabel/kbabeldict/kbabelsplash.cpp +++ b/kbabel/kbabeldict/kbabelsplash.cpp @@ -28,36 +28,36 @@ #include "kbabelsplash.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include KBabelSplash* KBabelSplash::instance = 0; -KBabelSplash::KBabelSplash( QWidget* parent, const char* name ) - : QVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose ) +KBabelSplash::KBabelSplash( TQWidget* parent, const char* name ) + : TQVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose ) { setMargin( 0 ); setSpacing( 0 ); - QLabel* picLabel = new QLabel( this ); - QPixmap pixmap; + TQLabel* picLabel = new TQLabel( this ); + TQPixmap pixmap; if( pixmap.load( locate( "data", "kbabel/pics/splash.png" ) ) ) picLabel->setPixmap( pixmap ); - picLabel->setFrameStyle(QFrame::WinPanel | QFrame::Raised); + picLabel->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised); // Set geometry, with support for Xinerama systems - QRect r; + TQRect r; r.setSize(sizeHint()); - int ps = QApplication::desktop()->primaryScreen(); - r.moveCenter( QApplication::desktop()->screenGeometry(ps).center() ); + int ps = TQApplication::desktop()->primaryScreen(); + r.moveCenter( TQApplication::desktop()->screenGeometry(ps).center() ); setGeometry(r); if( instance ) delete instance; @@ -65,7 +65,7 @@ KBabelSplash::KBabelSplash( QWidget* parent, const char* name ) } -void KBabelSplash::mousePressEvent( QMouseEvent* ) +void KBabelSplash::mousePressEvent( TQMouseEvent* ) { close(); } diff --git a/kbabel/kbabeldict/kbabelsplash.h b/kbabel/kbabeldict/kbabelsplash.h index c10b4fec..c381d11b 100644 --- a/kbabel/kbabeldict/kbabelsplash.h +++ b/kbabel/kbabeldict/kbabelsplash.h @@ -30,7 +30,7 @@ #ifndef KBABELSPLASH_H #define KBABELSPLASH_H -#include +#include class QLabel; class QMouseEvent; @@ -43,13 +43,13 @@ class KBabelSplash : public QVBox Q_OBJECT public: - KBabelSplash( QWidget* parent = 0, const char* name = 0 ); + KBabelSplash( TQWidget* parent = 0, const char* name = 0 ); ~KBabelSplash() { instance = 0; } static KBabelSplash* instance; protected: - void mousePressEvent( QMouseEvent* ); + void mousePressEvent( TQMouseEvent* ); }; #endif diff --git a/kbabel/kbabeldict/main.cpp b/kbabel/kbabeldict/main.cpp index be6ca67e..c327196b 100644 --- a/kbabel/kbabeldict/main.cpp +++ b/kbabel/kbabeldict/main.cpp @@ -41,7 +41,7 @@ #include #include -#include +#include #include "kbabeldict.h" #include "kbabelsplash.h" @@ -63,8 +63,8 @@ KBabelDictApplication::KBabelDictApplication() { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QTimer timer; - QWidget *splash=0; + TQTimer timer; + TQWidget *splash=0; bool showSplash=args->isSet("splash"); if(showSplash) { @@ -91,8 +91,8 @@ KBabelDictApplication::KBabelDictApplication() KApplication::restoreOverrideCursor(); } - QObject::connect( topLevel, SIGNAL( destroyed() ), - this, SLOT( quit() ) ); + TQObject::connect( topLevel, TQT_SIGNAL( destroyed() ), + this, TQT_SLOT( quit() ) ); } KBabelDictApplication::~KBabelDictApplication() diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp index ac55335d..5c5c6a6d 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp @@ -28,10 +28,10 @@ * your version. * */ -#include -#include +#include +#include -#include +#include #include #include #include @@ -52,17 +52,17 @@ #include #include "preferenceswidget.h" #include "dbse_factory.h" -#include -#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "database.h" @@ -72,7 +72,7 @@ using namespace KBabel; -KDBSearchEngine::KDBSearchEngine (QObject * parent, const char *name): +KDBSearchEngine::KDBSearchEngine (TQObject * parent, const char *name): SearchEngine (parent, name) { edited = "unknown"; @@ -82,8 +82,8 @@ SearchEngine (parent, name) dbOpened = false; dbname = ""; lasterror = i18n ("No error"); - connect (this, SIGNAL (hasError (const QString &)), - SLOT (setLastError (const QString &))); + connect (this, TQT_SIGNAL (hasError (const TQString &)), + TQT_SLOT (setLastError (const TQString &))); IAmReady = true; // I don't know if it is a good idea, no DB loaded!!! @@ -104,7 +104,7 @@ KDBSearchEngine::~KDBSearchEngine () bool -KDBSearchEngine::loadDatabase (QString database, bool noask = false) +KDBSearchEngine::loadDatabase (TQString database, bool noask = false) { bool ret = true; bool asked = false; @@ -116,7 +116,7 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false) dm = 0; } - QDir dir (database); + TQDir dir (database); if (!dir.exists ()) { if (asked @@ -124,19 +124,19 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false) i18n ("Database folder does not exist:\n%1\n" "Do you want to create it now?"). - arg (database), QString::null, i18n("Create Folder"), i18n("Do Not Create")) == + arg (database), TQString::null, i18n("Create Folder"), i18n("Do Not Create")) == KMessageBox::Yes) { asked = true; - QStringList dirList; + TQStringList dirList; while (!dir.exists () && !dir.dirName ().isEmpty ()) { dirList.prepend (dir.dirName ()); dir.setPath (dir.path () + "/.."); } - for (QStringList::Iterator it = dirList.begin (); + for (TQStringList::Iterator it = dirList.begin (); it != dirList.end (); ++it) { if (!dir.mkdir (*it)) @@ -161,10 +161,10 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false) if (ret) { // test, if there are both of ,old and standard databases - QString transFile = database + "/translations." + lang + ".db"; + TQString transFile = database + "/translations." + lang + ".db"; - bool oldstuff = QFile::exists (transFile + ",old"); - bool newstuff = QFile::exists (transFile); + bool oldstuff = TQFile::exists (transFile + ",old"); + bool newstuff = TQFile::exists (transFile); if (oldstuff && newstuff) { @@ -188,11 +188,11 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false) KMessageBox::Yes) { // remove the new files - QFile::remove (transFile); - QFile::remove (database + "/wordsindex." + lang + + TQFile::remove (transFile); + TQFile::remove (database + "/wordsindex." + lang + ".db"); - QFile::remove (database + "/keysindex." + lang + ".db"); - QFile::remove (database + "/catalogsinfo." + lang + + TQFile::remove (database + "/keysindex." + lang + ".db"); + TQFile::remove (database + "/catalogsinfo." + lang + ".db"); // rename the old files @@ -216,12 +216,12 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false) KURL (database + "/catalogsinfo." + lang + ".db"), 0); - QFile::remove (transFile + ",old"); - QFile::remove (database + "/wordsindex." + lang + + TQFile::remove (transFile + ",old"); + TQFile::remove (database + "/wordsindex." + lang + ".db,old"); - QFile::remove (database + "/keysindex." + lang + + TQFile::remove (database + "/keysindex." + lang + ".db,old"); - QFile::remove (database + "/catalogsinfo." + lang + + TQFile::remove (database + "/catalogsinfo." + lang + ".db,old"); } } @@ -241,10 +241,10 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false) (database + "/catalogsinfo." + lang + ".db,old"), KURL (database + "/catalogsinfo." + lang + ".db"), 0); - QFile::remove (transFile + ",old"); - QFile::remove (database + "/wordsindex." + lang + ".db,old"); - QFile::remove (database + "/keysindex." + lang + ".db,old"); - QFile::remove (database + "/catalogsinfo." + lang + + TQFile::remove (transFile + ",old"); + TQFile::remove (database + "/wordsindex." + lang + ".db,old"); + TQFile::remove (database + "/keysindex." + lang + ".db,old"); + TQFile::remove (database + "/catalogsinfo." + lang + ".db,old"); } @@ -255,7 +255,7 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false) if (asked || KMessageBox::questionYesNo (0, i18n - ("Database files not found.\nDo you want to create them now?"), QString::null, i18n("Create"), i18n("Do Not Create")) + ("Database files not found.\nDo you want to create them now?"), TQString::null, i18n("Create"), i18n("Do Not Create")) == KMessageBox::Yes) { //fprintf(stderr,"SI\n"); @@ -312,7 +312,7 @@ KDBSearchEngine::setCaseSensitive (bool sensitive) */ void -KDBSearchEngine::setRemoveCharString (QString chartoremove) +KDBSearchEngine::setRemoveCharString (TQString chartoremove) { remchar = chartoremove; } @@ -336,12 +336,12 @@ KDBSearchEngine::isSearching () const */ int -KDBSearchEngine::addSearchString (QString searchString, int rule) +KDBSearchEngine::addSearchString (TQString searchString, int rule) { if (searching || scanInProgress) return -1; SearchEntry e; - e.string = QString (searchString); + e.string = TQString (searchString); e.rules = rule; searchStringList.append (e); return searchStringList.count (); @@ -354,7 +354,7 @@ KDBSearchEngine::addSearchString (QString searchString, int rule) */ bool -KDBSearchEngine::startSearch (const QString & str, uint pluralForm, +KDBSearchEngine::startSearch (const TQString & str, uint pluralForm, const SearchFilter * filter) { @@ -376,7 +376,7 @@ KDBSearchEngine::startSearch (const QString & str, uint pluralForm, } bool -KDBSearchEngine::startSearchInTranslation (QString s) +KDBSearchEngine::startSearchInTranslation (TQString s) { if (autoUpdate) @@ -418,8 +418,8 @@ KDBSearchEngine::openDb (bool noask = false) bool KDBSearchEngine::messagesForFilter (const SearchFilter * filter, - QValueList < SearchResult > &resultList, - QString & error) + TQValueList < SearchResult > &resultList, + TQString & error) { int count = 0; @@ -452,7 +452,7 @@ KDBSearchEngine::messagesForFilter (const SearchFilter * filter, return false; } - QString package = filter->location (); + TQString package = filter->location (); int step = (totalRecord / 30) + 1; int ntra, nref; @@ -544,17 +544,17 @@ KDBSearchEngine::repeat () kdDebug (0) << "No kdelibs.po found!" << endl; - QProgressDialog *pd = - new QProgressDialog (i18n ("Looking for repetitions"), i18n ("Stop"), + TQProgressDialog *pd = + new TQProgressDialog (i18n ("Looking for repetitions"), i18n ("Stop"), 100); - connect (this, SIGNAL (progress (int)), pd, SLOT (setProgress (int))); - connect (this, SIGNAL (finished ()), pd, SLOT (close ())); - connect (pd, SIGNAL (cancelled ()), this, SLOT (stopSearch ())); + connect (this, TQT_SIGNAL (progress (int)), pd, TQT_SLOT (setProgress (int))); + connect (this, TQT_SIGNAL (finished ()), pd, TQT_SLOT (close ())); + connect (pd, TQT_SIGNAL (cancelled ()), this, TQT_SLOT (stopSearch ())); - QString txt = "// %1 repetitions, %2 translation(s)\ni18n(\"%3\");\n"; - QString id; + TQString txt = "// %1 repetitions, %2 translation(s)\ni18n(\"%3\");\n"; + TQString id; int min; bool ok = false; @@ -571,7 +571,7 @@ KDBSearchEngine::repeat () progressStarts (i18n ("Searching repeated string")); - static QTextEdit *mle = new QTextEdit (); + static TQTextEdit *mle = new TQTextEdit (); mle->clear (); bool inlibs; @@ -671,10 +671,10 @@ KDBSearchEngine::startSearchNow (int searchmode) intra = searchmode & MD_IN_TRANSLATION; - QString msgIdFound; - QString msgId; - QString msgStr; - //QString msgIdRequested; + TQString msgIdFound; + TQString msgId; + TQString msgStr; + //TQString msgIdRequested; SearchResult *aresult; TranslationInfo *adescription; SearchList searchList; @@ -682,13 +682,13 @@ KDBSearchEngine::startSearchNow (int searchmode) len = remchar.length (); int n, m; //,word; - QString *id; + TQString *id; - QString mainRequest = searchStringList[0].string; + TQString mainRequest = searchStringList[0].string; SearchList::Iterator it, it1; - QString *idMod; + TQString *idMod; bool foundSomething = false; searchList = searchStringList; //Create a copy and modify it @@ -705,7 +705,7 @@ KDBSearchEngine::startSearchNow (int searchmode) } if (comm) - idMod->replace (QRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE) + idMod->replace (TQRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE) if (norm) @@ -728,7 +728,7 @@ KDBSearchEngine::startSearchNow (int searchmode) //Now we can browse the whole db or the "good keys" - QValueList < KeyAndScore > goodkeys; + TQValueList < KeyAndScore > goodkeys; int totalprogress; bool gk = (searchmode == MD_GOOD_KEYS) || allkey; @@ -807,7 +807,7 @@ KDBSearchEngine::startSearchNow (int searchmode) //Remove context information from id found if (comm) - msgId.replace (QRegExp ("\\_\\:.*\\\\n"), ""); + msgId.replace (TQRegExp ("\\_\\:.*\\\\n"), ""); if (norm) @@ -845,7 +845,7 @@ KDBSearchEngine::startSearchNow (int searchmode) //Remove context information from id found if (comm) msgId. - replace (QRegExp ("\\_\\:.*\\\\n"), + replace (TQRegExp ("\\_\\:.*\\\\n"), ""); @@ -878,7 +878,7 @@ KDBSearchEngine::startSearchNow (int searchmode) if (!foundExact && (rules & RegExp)) { - QRegExp reg (*idMod); + TQRegExp reg (*idMod); regexp = (reg.search (msgId) != -1); } else @@ -996,7 +996,7 @@ KDBSearchEngine::startSearchNow (int searchmode) */ bool -KDBSearchEngine::startSingleSearch (QString searchString, +KDBSearchEngine::startSingleSearch (TQString searchString, unsigned int pattern1Limit, unsigned int /*pattern2Limit */ , bool inTranslation) @@ -1013,7 +1013,7 @@ KDBSearchEngine::startSingleSearch (QString searchString, - QRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+"); + TQRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+"); while ((in = reg.search (searchString, in + len)) != -1) { nw++; @@ -1033,7 +1033,7 @@ KDBSearchEngine::startSingleSearch (QString searchString, { in = reg.search (searchString, in + len); len = reg.matchedLength (); - QString regToAdd = searchString; + TQString regToAdd = searchString; regToAdd.replace (in, len, "[a-zA-Z0-9_%" + regaddchar + "]*"); regToAdd.append ("$"); regToAdd.prepend ("^"); @@ -1055,7 +1055,7 @@ KDBSearchEngine::startSingleSearch (QString searchString, Start a search for a list of string */ -//bool KDBSearchEngine::startListSearch(QPtrList searchStrList) +//bool KDBSearchEngine::startListSearch(TQPtrList searchStrList) //{ // searchStringList=searchStrList; // return startSearchNow(); @@ -1067,7 +1067,7 @@ KDBSearchEngine::startSingleSearch (QString searchString, void -KDBSearchEngine::setLanguageCode (const QString & ll) +KDBSearchEngine::setLanguageCode (const TQString & ll) { if (ll == lang) return; @@ -1079,8 +1079,8 @@ KDBSearchEngine::setLanguageCode (const QString & ll) } void -KDBSearchEngine::setLanguage (const QString & languageCode, - const QString & /*languageName */ ) +KDBSearchEngine::setLanguage (const TQString & languageCode, + const TQString & /*languageName */ ) { setLanguageCode (languageCode); } @@ -1147,17 +1147,17 @@ KDBSearchEngine::saveSettings (KConfigBase * config) void KDBSearchEngine::readSettings (KConfigBase * config) { - QString newName; + TQString newName; KConfigGroupSaver cgs (config, "KDBSearchEngine"); - QString defaultLang; - QString oldLang = lang; + TQString defaultLang; + TQString oldLang = lang; Defaults::Identity def; defaultLang = def.languageCode (); lang = config->readEntry ("Language", defaultLang); - QString defaultDir; + TQString defaultDir; KStandardDirs *dirs = KGlobal::dirs (); if (dirs) { @@ -1203,20 +1203,20 @@ KDBSearchEngine::readSettings (KConfigBase * config) } PrefWidget * -KDBSearchEngine::preferencesWidget (QWidget * parent) +KDBSearchEngine::preferencesWidget (TQWidget * parent) { pw = new PreferencesWidget (parent); setSettings (); - connect (pw, SIGNAL (restoreNow ()), this, SLOT (setSettings ())); - connect (pw, SIGNAL (applyNow ()), this, SLOT (updateSettings ())); - connect (pw, SIGNAL (destroyed ()), this, SLOT (prefDestr ())); - connect (pw->dbpw->scanPB_2, SIGNAL (clicked ()), this, SLOT (scan ())); - connect (pw->dbpw->scanrecPB, SIGNAL (clicked ()), this, - SLOT (scanRecur ())); - connect (pw->dbpw->scanFilePB, SIGNAL (clicked ()), this, - SLOT (scanFile ())); - connect (pw->dbpw->repeatPB, SIGNAL (clicked ()), this, SLOT (repeat ())); + connect (pw, TQT_SIGNAL (restoreNow ()), this, TQT_SLOT (setSettings ())); + connect (pw, TQT_SIGNAL (applyNow ()), this, TQT_SLOT (updateSettings ())); + connect (pw, TQT_SIGNAL (destroyed ()), this, TQT_SLOT (prefDestr ())); + connect (pw->dbpw->scanPB_2, TQT_SIGNAL (clicked ()), this, TQT_SLOT (scan ())); + connect (pw->dbpw->scanrecPB, TQT_SIGNAL (clicked ()), this, + TQT_SLOT (scanRecur ())); + connect (pw->dbpw->scanFilePB, TQT_SIGNAL (clicked ()), this, + TQT_SLOT (scanFile ())); + connect (pw->dbpw->repeatPB, TQT_SIGNAL (clicked ()), this, TQT_SLOT (repeat ())); return pw; @@ -1233,7 +1233,7 @@ KDBSearchEngine::scanRecur () return; scanInProgress = true; PoScanner *sca = new PoScanner (dm, this, "Po Scanner"); - QString cvsdir; + TQString cvsdir; cvsdir = KFileDialog::getExistingDirectory ("", 0, i18n @@ -1246,32 +1246,32 @@ KDBSearchEngine::scanRecur () } if (pw) { - connect (sca, SIGNAL (patternProgress (int)), pw->dbpw->totalPB, - SLOT (setProgress (int))); - connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB, - SLOT (setProgress (int))); - connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB, - SLOT (setProgress (int))); + connect (sca, TQT_SIGNAL (patternProgress (int)), pw->dbpw->totalPB, + TQT_SLOT (setProgress (int))); + connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB, + TQT_SLOT (setProgress (int))); + connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB, + TQT_SLOT (setProgress (int))); } - connect (sca, SIGNAL (patternProgress (int)), SIGNAL (progress (int))); //Kbabel progress bar + connect (sca, TQT_SIGNAL (patternProgress (int)), TQT_SIGNAL (progress (int))); //Kbabel progress bar - connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int))); - connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString))); + connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int))); + connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString))); progressStarts (i18n ("Scanning folder %1").arg (cvsdir)); - connect (sca, SIGNAL (patternFinished ()), SIGNAL (progressEnds ())); + connect (sca, TQT_SIGNAL (patternFinished ()), TQT_SIGNAL (progressEnds ())); sca->scanPattern (cvsdir, "*.po", true); - disconnect (this, SIGNAL (progress (int))); -//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) ); - disconnect (this, SIGNAL (progressEnds ())); + disconnect (this, TQT_SIGNAL (progress (int))); +//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) ); + disconnect (this, TQT_SIGNAL (progressEnds ())); if (pw) { - disconnect (pw->dbpw->totalPB, SLOT (setProgress (int))); - disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int))); - disconnect (pw->dbpw->processPB, SLOT (setProgress (int))); + disconnect (pw->dbpw->totalPB, TQT_SLOT (setProgress (int))); + disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int))); + disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int))); } totalRecord = dm->count (); @@ -1292,7 +1292,7 @@ KDBSearchEngine::scan () return; scanInProgress = true; PoScanner *sca = new PoScanner (dm, this, "Po Scanner"); - QString cvsdir; + TQString cvsdir; cvsdir = KFileDialog::getExistingDirectory ("", 0, @@ -1304,32 +1304,32 @@ KDBSearchEngine::scan () } if (pw) { - connect (sca, SIGNAL (patternProgress (int)), pw->dbpw->totalPB, - SLOT (setProgress (int))); - connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB, - SLOT (setProgress (int))); - connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB, - SLOT (setProgress (int))); + connect (sca, TQT_SIGNAL (patternProgress (int)), pw->dbpw->totalPB, + TQT_SLOT (setProgress (int))); + connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB, + TQT_SLOT (setProgress (int))); + connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB, + TQT_SLOT (setProgress (int))); } - connect (sca, SIGNAL (patternProgress (int)), SIGNAL (progress (int))); + connect (sca, TQT_SIGNAL (patternProgress (int)), TQT_SIGNAL (progress (int))); progressStarts (i18n ("Scanning folder %1").arg (cvsdir)); - connect (sca, SIGNAL (patternFinished ()), SIGNAL (progressEnds ())); + connect (sca, TQT_SIGNAL (patternFinished ()), TQT_SIGNAL (progressEnds ())); - connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int))); - connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString))); + connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int))); + connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString))); sca->scanPattern (cvsdir, "*.po", false); - disconnect (this, SIGNAL (progress (int))); -//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) ); - disconnect (this, SIGNAL (progressEnds ())); + disconnect (this, TQT_SIGNAL (progress (int))); +//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) ); + disconnect (this, TQT_SIGNAL (progressEnds ())); if (pw) { - disconnect (pw->dbpw->totalPB, SLOT (setProgress (int))); - disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int))); - disconnect (pw->dbpw->processPB, SLOT (setProgress (int))); + disconnect (pw->dbpw->totalPB, TQT_SLOT (setProgress (int))); + disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int))); + disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int))); } totalRecord = dm->count (); @@ -1350,7 +1350,7 @@ KDBSearchEngine::scanFile () return; scanInProgress = true; PoScanner *sca = new PoScanner (dm, this, "Po Scanner"); - QString cvsdir; + TQString cvsdir; pw->dbpw->totalPB->setProgress (0); cvsdir = @@ -1363,31 +1363,31 @@ KDBSearchEngine::scanFile () } if (pw) { - connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB, - SLOT (setProgress (int))); - connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB, - SLOT (setProgress (int))); + connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB, + TQT_SLOT (setProgress (int))); + connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB, + TQT_SLOT (setProgress (int))); } - connect (sca, SIGNAL (fileProgress (int)), SIGNAL (progress (int))); + connect (sca, TQT_SIGNAL (fileProgress (int)), TQT_SIGNAL (progress (int))); progressStarts (i18n ("Scanning file %1").arg (directory (cvsdir, 0))); - connect (sca, SIGNAL (fileFinished ()), SIGNAL (progressEnds ())); + connect (sca, TQT_SIGNAL (fileFinished ()), TQT_SIGNAL (progressEnds ())); - connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int))); - connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString))); + connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int))); + connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString))); sca->scanFile (cvsdir); - sca->disconnect (SIGNAL (fileProgress (int)), this, - SIGNAL (progress (int))); -//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) ); - sca->disconnect (SIGNAL (fileFinished ()), this, - SIGNAL (progressEnds ())); + sca->disconnect (TQT_SIGNAL (fileProgress (int)), this, + TQT_SIGNAL (progress (int))); +//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) ); + sca->disconnect (TQT_SIGNAL (fileFinished ()), this, + TQT_SIGNAL (progressEnds ())); if (pw) { - disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int))); - disconnect (pw->dbpw->processPB, SLOT (setProgress (int))); + disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int))); + disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int))); } totalRecord = dm->count (); @@ -1415,7 +1415,7 @@ KDBSearchEngine::name () const QString KDBSearchEngine::id () const { - return QString ("KDBSearchEngine"); + return TQString ("KDBSearchEngine"); } QString @@ -1488,7 +1488,7 @@ KDBSearchEngine::updateSettings () if (pw == 0) return; - QString newName = pw->dbpw->dirInput->url (); + TQString newName = pw->dbpw->dirInput->url (); if (newName != dbname) { @@ -1547,16 +1547,16 @@ KDBSearchEngine::updateSettings () } void -KDBSearchEngine::setLastError (const QString & er) +KDBSearchEngine::setLastError (const TQString & er) { lasterror = er; } QString -KDBSearchEngine::translate (const QString & text, const uint pluralForm) +KDBSearchEngine::translate (const TQString & text, const uint pluralForm) { if (!openDb ()) - return QString::null; + return TQString::null; /* if(!dbOpened) @@ -1566,7 +1566,7 @@ if(!dbOpened) { //emit anerror hasError(i18n("Database not opened")); - return QString::null; + return TQString::null; } } */ @@ -1574,7 +1574,7 @@ if(!dbOpened) DataBaseItem dbit = dm->getItem (text); if (dbit.isNull ()) - return QString::null; + return TQString::null; if (dbit.numTra == 1) return dbit.translations[0].translation; @@ -1592,34 +1592,34 @@ if(!dbOpened) } -QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase, +TQValueList < KeyAndScore > KDBSearchEngine::searchWords (TQString phrase, int threshold, int thresholdorig, uint32 max) { - QValueList < QString > wordlist; + TQValueList < TQString > wordlist; if (!openDb ()) { - QValueList < KeyAndScore > a; + TQValueList < KeyAndScore > a; return a; } progressStarts (i18n ("Searching words")); - QValueList < QString >::Iterator wlit; + TQValueList < TQString >::Iterator wlit; wordlist = dm->wordsIn (phrase); int nw = wordlist.count (); -//QMemArray wi(nw); - QMemArray < uint32 > numofloc (nw), currentloc (nw); - QMemArray < int > +//TQMemArray wi(nw); + TQMemArray < uint32 > numofloc (nw), currentloc (nw); + TQMemArray < int > score (nw); - QMemArray < uint32 * >loc (nw), locorig (nw); - QValueList < uint32 > resloc; - QValueList < int > + TQMemArray < uint32 * >loc (nw), locorig (nw); + TQValueList < uint32 > resloc; + TQValueList < int > resfound; - QValueList < KeyAndScore > keylist; + TQValueList < KeyAndScore > keylist; //wi.resize(wordlist.count()); int totalprogress = 0; @@ -1837,7 +1837,7 @@ QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase, KeyAndScore key (strkey, sc); -// kdDebug(0) << (QString) key << " [" << key.score << "]" << endl; +// kdDebug(0) << (TQString) key << " [" << key.score << "]" << endl; keylist.append (key); } @@ -1852,12 +1852,12 @@ QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase, } void -KDBSearchEngine::stringChanged (const QStringList & o, - const QString & translated, const uint, - const QString &) +KDBSearchEngine::stringChanged (const TQStringList & o, + const TQString & translated, const uint, + const TQString &) { - QString orig = o.first (); // FIXME: plural forms + TQString orig = o.first (); // FIXME: plural forms // skip empty originals or translated texts if (orig.isEmpty () || translated.isEmpty ()) @@ -1879,19 +1879,19 @@ KDBSearchEngine::stringChanged (const QStringList & o, } void -KDBSearchEngine::setEditedFile (const QString & file) +KDBSearchEngine::setEditedFile (const TQString & file) { edited = file; //kdDebug(0) << edited << endl; } -KeyAndScore::KeyAndScore (const QString & a, int sc): -QString (a) +KeyAndScore::KeyAndScore (const TQString & a, int sc): +TQString (a) { score = sc; } -KeyAndScore::KeyAndScore ():QString () +KeyAndScore::KeyAndScore ():TQString () { score = 0; } diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h index 058444db..d948bbd4 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h +++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h @@ -42,11 +42,11 @@ #ifndef _KDBSEARCH_ENGINE_ #define _KDBSEARCH_ENGINE_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "database.h" @@ -63,7 +63,7 @@ class SearchEntry { public: - QString string; + TQString string; int rules; }; @@ -71,22 +71,22 @@ class KeyAndScore : public QString { public: KeyAndScore(); - KeyAndScore(const QString &a,int sc); + KeyAndScore(const TQString &a,int sc); int score; }; -typedef QValueList SearchList; +typedef TQValueList SearchList; /* USE searchengine.h structure class CatalogDescription { public: char language[6]; // How many character chinese language needs? - // QString is better ? - QString filename; - QString dateOfScan; //When you add this to database (last time) - QString authorOfScan; - QString fileHeader; //msgid "" + // TQString is better ? + TQString filename; + TQString dateOfScan; //When you add this to database (last time) + TQString authorOfScan; + TQString fileHeader; //msgid "" }; */ @@ -98,7 +98,7 @@ class KDBSearchEngine : public SearchEngine public: - KDBSearchEngine(QObject *parent=0,const char *name=0); + KDBSearchEngine(TQObject *parent=0,const char *name=0); ~KDBSearchEngine(); enum Rules {Equal = 1, Contains = 2, Contained = 4, RegExp = 8}; enum FormatRules { Dots = 1, Ampersand = 2, FirstWordUpper = 4, //Not yet used @@ -108,7 +108,7 @@ public: Set the directory where db file are located */ - void setDBName(QString filename); + void setDBName(TQString filename); /* Set if the research have to consider multiple spaces as a single one. @@ -136,7 +136,7 @@ public: */ - void setRemoveCharString(QString chartoremove); + void setRemoveCharString(TQString chartoremove); /* Enable an output filter that format Uppercase/lowercase @@ -179,13 +179,13 @@ public: virtual bool messagesForFilter(const SearchFilter* filter - , QValueList& resultList, QString& error); + , TQValueList& resultList, TQString& error); - virtual void setLanguageCode(const QString& lang); - virtual void setLanguage(const QString& languageCode, const QString& languageName); + virtual void setLanguageCode(const TQString& lang); + virtual void setLanguage(const TQString& languageCode, const TQString& languageName); - virtual void setEditedFile(const QString& file); + virtual void setEditedFile(const TQString& file); virtual bool isReady() const ; virtual bool isSearching() const; @@ -193,20 +193,20 @@ public: virtual void saveSettings(KConfigBase *config); virtual void readSettings(KConfigBase *config); - virtual PrefWidget *preferencesWidget(QWidget *parent); + virtual PrefWidget *preferencesWidget(TQWidget *parent); virtual const KAboutData *about() const; - virtual QString name() const; + virtual TQString name() const; - virtual QString id() const; + virtual TQString id() const; - virtual QString lastError(); + virtual TQString lastError(); - virtual QString translate(const QString& text, uint pluralForm); + virtual TQString translate(const TQString& text, uint pluralForm); - virtual void stringChanged( const QStringList& orig, const QString& translated - , const uint translationPluralForm, const QString& description); + virtual void stringChanged( const TQStringList& orig, const TQString& translated + , const uint translationPluralForm, const TQString& description); public slots: @@ -221,7 +221,7 @@ public slots: progress) */ - int addSearchString(QString searchString, int rule=Equal); + int addSearchString(TQString searchString, int rule=Equal); /* Start the research in the database of all the string in the list @@ -244,14 +244,14 @@ public slots: */ - bool startSingleSearch(QString searchString,unsigned int pattern1Limit,unsigned int pattern2Limit, + bool startSingleSearch(TQString searchString,unsigned int pattern1Limit,unsigned int pattern2Limit, bool inTranslation=false); /* Start a search for a list of string */ -// bool startListSearch(QPtrList searchStrList); +// bool startListSearch(TQPtrList searchStrList); /* * Return a list of key in database that contains some @@ -263,7 +263,7 @@ public slots: * max is the maximum number of results */ -QValueList searchWords(QString phrase,int threshold, +TQValueList searchWords(TQString phrase,int threshold, int thresholdorig ,uint32 max); @@ -272,8 +272,8 @@ QValueList searchWords(QString phrase,int threshold, */ virtual void stopSearch(); - virtual bool startSearch(const QString& text, uint pluralForm, const SearchFilter* filter); - virtual bool startSearchInTranslation(QString s); + virtual bool startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter); + virtual bool startSearchInTranslation(TQString s); void clearList(); signals: @@ -282,13 +282,13 @@ private slots: void updateSettings(); //Use widget settings void setSettings(); //Fill widget with actual settings void prefDestr(); - void setLastError(const QString&); + void setLastError(const TQString&); void repeat(); private: /* Reload database info (and keep the dbase opened). */ - bool loadDatabase(QString database,bool); + bool loadDatabase(TQString database,bool); bool openDb(bool); @@ -312,22 +312,22 @@ private: bool norm,sens,comm; int numofresult; char * filename; - QString remchar; - QString regaddchar; - QString dbname; + TQString remchar; + TQString regaddchar; + TQString dbname; bool dbOpened; // GDBM_FILE db; DataBaseManager * dm; // datum key, value; -// QMemArray catinfo; +// TQMemArray catinfo; SearchList searchStringList; int totalRecord; - QString lasterror; - QString lang; + TQString lasterror; + TQString lang; bool scanInProgress; - QString edited; + TQString edited; bool autoup; - QString autoauthor; + TQString autoauthor; }; #endif diff --git a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp index 003a3a95..0847d594 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp @@ -36,12 +36,12 @@ #include "database.h" #include -#include +#include #include #include -WordItem::WordItem (char *data, QString w) +WordItem::WordItem (char *data, TQString w) { word = w; @@ -58,7 +58,7 @@ WordItem::WordItem (char *data, QString w) } -WordItem::WordItem (QString w) +WordItem::WordItem (TQString w) { locations = NULL; count = 0; @@ -100,7 +100,7 @@ InfoItem::InfoItem () language = "No language"; } -InfoItem::InfoItem (const char *rawData, QString lang) +InfoItem::InfoItem (const char *rawData, TQString lang) { const char *rd; rd = rawData; @@ -110,16 +110,16 @@ InfoItem::InfoItem (const char *rawData, QString lang) charset = "Utf8"; - catalogName = QString::fromUtf8 (rd); + catalogName = TQString::fromUtf8 (rd); len = strlen (rd) + 1; rd += len; - lastTranslator = QString::fromUtf8 (rd); + lastTranslator = TQString::fromUtf8 (rd); len = strlen (rd) + 1; rd += len; secs = *(unsigned int *) rd; revisionDate.setTime_t (secs); rd += 4; - lastFullPath = QString::fromUtf8 (rd); + lastFullPath = TQString::fromUtf8 (rd); len = strlen (rd) + 1; rd += len; @@ -139,8 +139,8 @@ InfoItem::rawData (char *rawData) rd += strlen (rd) + 1; - //QDate Time problem!!!!!!!!!!! - QDateTime zeroDate; + //TQDate Time problem!!!!!!!!!!! + TQDateTime zeroDate; zeroDate.setTime_t (0); *(unsigned int *) rd = -revisionDate.secsTo (zeroDate); rd += 4; @@ -168,7 +168,7 @@ InfoItem::size () // this is a quick hack to copy a local file int -copy_hack (QFile & input, QFile & output) +copy_hack (TQFile & input, TQFile & output) { if (!input.isOpen ()) { @@ -204,7 +204,7 @@ DataBaseItem::DataBaseItem (char *_key, char *_data) { char *data = _data; - key = QString::fromUtf8 (_key); + key = TQString::fromUtf8 (_key); unsigned int i, r; numTra = *(uint32 *) data; @@ -228,7 +228,7 @@ DataBaseItem::DataBaseItem (char *_key, char *_data) tr.infoRef.append (ref); } - tr.translation = QString::fromUtf8 ((const char *) data); + tr.translation = TQString::fromUtf8 ((const char *) data); translations.append (tr); data += strlen (data) + 1; @@ -293,11 +293,11 @@ DataBaseItem::toRawData (char *_data) } -DataBaseManager::DataBaseManager (QString directory, QString lang, - QObject * parent, const char *name): -QObject (parent, name) +DataBaseManager::DataBaseManager (TQString directory, TQString lang, + TQObject * parent, const char *name): +TQObject (parent, name) { - QString filename; + TQString filename; language = lang; iAmOk = true; @@ -312,22 +312,22 @@ void DataBaseManager::openDataBase () { kdDebug () << "Opendatabase" << endl; - QString directory; + TQString directory; directory = basedir; - QString ll = "." + language; + TQString ll = "." + language; if (ll == ".") ll = ".NOLANG"; - QString transfilename = "%1/translations%2.db"; + TQString transfilename = "%1/translations%2.db"; transfilename = transfilename.arg (directory).arg (ll); - QString infofilename = "%1/catalogsinfo%2.db"; + TQString infofilename = "%1/catalogsinfo%2.db"; infofilename = infofilename.arg (directory).arg (ll); - QString wordsfilename = "%1/wordsindex%2.db"; + TQString wordsfilename = "%1/wordsindex%2.db"; wordsfilename = wordsfilename.arg (directory).arg (ll); - QString keysfilename = "%1/keysindex%2.db"; + TQString keysfilename = "%1/keysindex%2.db"; keysfilename = keysfilename.arg (directory).arg (ll); cursor = 0; @@ -354,7 +354,7 @@ DataBaseManager::openDataBase () KTempFile transFile, infoFile, keysFile, wordsFile; // do the upgrade on the translation file - QFile transfilenameFile (transfilename); + TQFile transfilenameFile (transfilename); if ((ret = copy_hack (transfilenameFile, *transFile.file ())) == 0) { @@ -373,7 +373,7 @@ DataBaseManager::openDataBase () } // do the upgrade on the info file - QFile infofilenameFile (infofilename); + TQFile infofilenameFile (infofilename); if ((ret = copy_hack (infofilenameFile, *infoFile.file ())) == 0) { ret = @@ -394,7 +394,7 @@ DataBaseManager::openDataBase () } // do the upgrade on the words file - QFile wordfilenameFile (wordsfilename); + TQFile wordfilenameFile (wordsfilename); if ((ret = copy_hack (wordfilenameFile, *wordsFile.file ())) == 0) { ret = @@ -415,7 +415,7 @@ DataBaseManager::openDataBase () } // do the upgrade on the keys file - QFile keysfilenameFile (keysfilename); + TQFile keysfilenameFile (keysfilename); if ((ret = copy_hack (keysfilenameFile, *keysFile.file ())) == 0) { ret = @@ -620,11 +620,11 @@ DataBaseManager::putItem (DataBaseItem * item, bool ow) { uint32 location = loc; - QValueList < QString > wlist; + TQValueList < TQString > wlist; wlist = wordsIn (item->key); - QValueList < QString >::Iterator wlistit; + TQValueList < TQString >::Iterator wlistit; for (wlistit = wlist.begin (); wlistit != wlist.end (); ++wlistit) { @@ -641,7 +641,7 @@ DataBaseManager::putItem (DataBaseItem * item, bool ow) } DataBaseItem -DataBaseManager::getItem (QString key) +DataBaseManager::getItem (TQString key) { if (!iAmOk) return DataBaseItem (); @@ -702,7 +702,7 @@ DataBaseManager::cursorGet (uint32 flags) } else { - kdDebug (KBABEL_SEARCH) << QString ("...cursor getting...%1"). + kdDebug (KBABEL_SEARCH) << TQString ("...cursor getting...%1"). arg (ret) << endl; return DataBaseItem (); @@ -770,11 +770,11 @@ DataBaseManager::current () } int -DataBaseManager::createDataBase (QString directory, - QString language, int mode) +DataBaseManager::createDataBase (TQString directory, + TQString language, int mode) { - QString filename; - QString ll = "." + language; + TQString filename; + TQString ll = "." + language; if (ll == ".") ll = ".NOLANG"; filename = "%1/translations%2.db"; @@ -782,7 +782,7 @@ DataBaseManager::createDataBase (QString directory, rename (filename.local8Bit (), filename.local8Bit () + ",old"); -//kdDebug(0) << QString("Creating %1").arg(filename) << endl; +//kdDebug(0) << TQString("Creating %1").arg(filename) << endl; iAmOk = true; @@ -860,7 +860,7 @@ DataBaseManager::createDataBase (QString directory, if (iAmOk) loadInfo (); else - kdDebug (KBABEL_SEARCH) << QString ("I am NOT ok : %1"). + kdDebug (KBABEL_SEARCH) << TQString ("I am NOT ok : %1"). arg (ret) << endl; //THIS IS WRONG, rewrite the error handling. @@ -889,7 +889,7 @@ DataBaseManager::getCatalogInfo (int n) return InfoItem (); } -// kdDebug(0) << QString("Trad %1").arg(ret) << endl; +// kdDebug(0) << TQString("Trad %1").arg(ret) << endl; InfoItem it ((char *) data.data, language); //free(data.data); // Read docu for this!!!! @@ -936,10 +936,10 @@ DataBaseManager::addCatalogInfo (InfoItem * catInfo, int cat = -1) } int -DataBaseManager::searchCatalogInfo (QString location) +DataBaseManager::searchCatalogInfo (TQString location) { int n = 0; - QValueList < InfoItem >::Iterator it; + TQValueList < InfoItem >::Iterator it; for (it = info.begin (); it != info.end (); ++it) { n++; @@ -998,11 +998,11 @@ DataBaseManager::loadInfo () } -QValueList < QString > DataBaseManager::wordsIn (QString string) +TQValueList < TQString > DataBaseManager::wordsIn (TQString string) { QString a; - QValueList < QString > words; + TQValueList < TQString > words; int i, l; @@ -1036,10 +1036,10 @@ QValueList < QString > DataBaseManager::wordsIn (QString string) WordItem -DataBaseManager::getWordLocations (QString word) +DataBaseManager::getWordLocations (TQString word) { - QString keystring = word.lower (); + TQString keystring = word.lower (); DBT key; DBT data; @@ -1080,10 +1080,10 @@ DataBaseManager::getWordLocations (QString word) bool -DataBaseManager::addLocation (QString word, unsigned int location) +DataBaseManager::addLocation (TQString word, unsigned int location) { - QString keystring = word.lower (); + TQString keystring = word.lower (); DBT key; @@ -1289,7 +1289,7 @@ DataBaseManager::addLocation (QString word, unsigned int location) bool -DataBaseManager::removeLocation (QString /*word */ , int /*location */ ) +DataBaseManager::removeLocation (TQString /*word */ , int /*location */ ) { //#warning TODO: REMOVE LOCATION @@ -1298,7 +1298,7 @@ DataBaseManager::removeLocation (QString /*word */ , int /*location */ ) } uint32 -DataBaseManager::appendKey (QString _key) +DataBaseManager::appendKey (TQString _key) { DBT key; @@ -1324,7 +1324,7 @@ DataBaseManager::appendKey (QString _key) else ret = *(uint32 *) key.data; -//kdDebug(0) << QString("Append result %1,err = %1").arg(ret).arg(err) << endl; +//kdDebug(0) << TQString("Append result %1,err = %1").arg(ret).arg(err) << endl; free (data.data); @@ -1349,16 +1349,16 @@ DataBaseManager::getKey (uint32 n) //Check for errors int ret = indexDb->get (indexDb, 0, &key, &data, 0); //DB_SET_RECNO); if (ret) - return QString::null; + return TQString::null; - return QString::fromUtf8 ((char *) data.data); + return TQString::fromUtf8 ((char *) data.data); -// kdDebug(0) << QString("Trad %1").arg(ret) << endl; +// kdDebug(0) << TQString("Trad %1").arg(ret) << endl; } int -DataBaseManager::catalogRef (QString location, QString author, QString path) +DataBaseManager::catalogRef (TQString location, TQString author, TQString path) { InfoItem cinfo; int cat, catnum; @@ -1397,19 +1397,19 @@ DataBaseManager::catalogRef (QString location, QString author, QString path) } int -DataBaseManager::putNewTranslation (QString key, QString tran, int catalog, +DataBaseManager::putNewTranslation (TQString key, TQString tran, int catalog, bool ow) { int catnum = catalog; int count = 0; - QString msgid = key; + TQString msgid = key; DataBaseItem dbit = getItem (msgid); if (dbit.numTra == 0) //Not found { dbit.numTra += 1; - // use local variable, dbit.translations is QValueList and + // use local variable, dbit.translations is TQValueList and // will create own copy TranslationItem tra; tra.numRef = 1; @@ -1423,16 +1423,16 @@ DataBaseManager::putNewTranslation (QString key, QString tran, int catalog, int aa = putItem (&dbit); if (aa) - kdDebug (0) << QString ("-----------put code ") << aa << endl; + kdDebug (0) << TQString ("-----------put code ") << aa << endl; } else { // key exists - QString msgstr = tran; + TQString msgstr = tran; bool found_catalog_info = false, foundTr = false, isThisOne = false; - QValueList < TranslationItem >::Iterator ittr; + TQValueList < TranslationItem >::Iterator ittr; bool rem = false; // check all translations in the list @@ -1493,7 +1493,7 @@ DataBaseManager::putNewTranslation (QString key, QString tran, int catalog, //Check ret value int aa = putItem (&dbit, true); if (aa) - kdDebug (0) << QString ("-----------put code ") << aa << endl; + kdDebug (0) << TQString ("-----------put code ") << aa << endl; } return count; @@ -1513,11 +1513,11 @@ DataBaseManager::rebuildIndexes () uint32 location = loc; - QValueList < QString > wlist; + TQValueList < TQString > wlist; wlist = wordsIn (item->key); - QValueList < QString >::Iterator wlistit; + TQValueList < TQString >::Iterator wlistit; for (wlistit = wlist.begin (); wlistit != wlist.end (); ++wlistit) { diff --git a/kbabel/kbabeldict/modules/dbsearchengine/database.h b/kbabel/kbabeldict/modules/dbsearchengine/database.h index bf4767df..3e68e01d 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/database.h +++ b/kbabel/kbabeldict/modules/dbsearchengine/database.h @@ -52,29 +52,29 @@ #define uint32 u_int32_t -#include -#include -#include -#include -#include -#include //bytearray +#include +#include +#include +#include +#include +#include //bytearray class WordItem // Returned by getWordLocations { public: - WordItem(char *data,QString w); - WordItem(QString w); + WordItem(char *data,TQString w); + WordItem(TQString w); //WordItem(const WordItem &wi); //WordItem& operator=(const WordItem & wi ); //The word (key in database) - QString word; + TQString word; //Sorted locations - //QByteArray locations; //too many problems with this.. + //TQByteArray locations; //too many problems with this.. //NOTE: - //This is allocated only if you call WordItem(char *data,QString w); + //This is allocated only if you call WordItem(char *data,TQString w); //YOU MUST FREE IT when you do not need it anymore //No destructor will do it !!! @@ -97,15 +97,15 @@ class InfoItem InfoItem(); // Create an info item from raw data - InfoItem(const char *rawData,QString lang); + InfoItem(const char *rawData,TQString lang); - QString catalogName; - QString lastFullPath; + TQString catalogName; + TQString lastFullPath; - QString lastTranslator; - QDateTime revisionDate; - QString charset; - QString language; + TQString lastTranslator; + TQDateTime revisionDate; + TQString charset; + TQString language; int size(); @@ -116,8 +116,8 @@ class InfoItem class TranslationItem { public: - QString translation; - QValueList infoRef; + TQString translation; + TQValueList infoRef; uint32 numRef; }; @@ -149,8 +149,8 @@ class DataBaseItem void toRawData(char *_data); void toRawKey(char *_key); - QString key; - QValueList translations; + TQString key; + TQValueList translations; uint32 numTra; uint32 location; }; @@ -175,13 +175,13 @@ class DataBaseManager : public QObject */ - DataBaseManager(QString directory,QString lang,QObject *parent=0,const char *name=0); + DataBaseManager(TQString directory,TQString lang,TQObject *parent=0,const char *name=0); ~DataBaseManager(); /* Create a new databse structure. */ - int createDataBase(QString directory,QString language,int mode=0664); + int createDataBase(TQString directory,TQString language,int mode=0664); @@ -198,7 +198,7 @@ class DataBaseManager : public QObject int putItem(DataBaseItem *item,bool ow=false); - DataBaseItem getItem(QString key); + DataBaseItem getItem(TQString key); /* @return the first entry in the database. @@ -226,7 +226,7 @@ class DataBaseManager : public QObject * overwritten if you provide a new translation */ - int putNewTranslation(QString key,QString tran,int catalog,bool ow=true); + int putNewTranslation(TQString key,TQString tran,int catalog,bool ow=true); /* @return info about catalog n @@ -246,14 +246,14 @@ class DataBaseManager : public QObject @return its refnum. */ - int searchCatalogInfo(QString location); + int searchCatalogInfo(TQString location); /* Get a catalog info for location, * if it doesn't exist it will create one. * @return the refnum */ - int catalogRef(QString location,QString author,QString path); + int catalogRef(TQString location,TQString author,TQString path); /* Put at refnum the catInfo @@ -265,17 +265,17 @@ class DataBaseManager : public QObject /* Get word info */ - WordItem getWordLocations(QString word); + WordItem getWordLocations(TQString word); /* Add a location for word */ - bool addLocation(QString word, unsigned int location); + bool addLocation(TQString word, unsigned int location); /* Remove location for word */ - bool removeLocation(QString word, int location); + bool removeLocation(TQString word, int location); /* @@ -283,9 +283,9 @@ class DataBaseManager : public QObject */ void rebuildIndexes(); - uint32 appendKey(class QString); + uint32 appendKey(class TQString); - QString getKey(uint32 n); + TQString getKey(uint32 n); /* Load the catalogs info. @@ -302,7 +302,7 @@ class DataBaseManager : public QObject void openDataBase(); void closeDataBase(); - static QValueList wordsIn(QString string); + static TQValueList wordsIn(TQString string); signals: @@ -312,9 +312,9 @@ class DataBaseManager : public QObject protected: DataBaseItem cursorGet(uint32 flags); - QString language; - QString basedir; - QValueList info; + TQString language; + TQString basedir; + TQValueList info; DB *db,*infoDb,*wordDb,*indexDb; DBC *cursor; diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp index 87b39e61..0ee1ba4b 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp @@ -30,8 +30,8 @@ */ #include "dbscan.h" -#include -#include +#include +#include #include #include #include @@ -39,14 +39,14 @@ using namespace KBabel; PoScanner::PoScanner(DataBaseManager *dbm, - QObject *parent,const char *name):QObject(parent,name) + TQObject *parent,const char *name):TQObject(parent,name) { dm=dbm; removeOldCatalogTranslation=false; //Check if this flag do something. count=0; } -bool PoScanner::scanPattern(QString pathName,QString pattern,bool rec) +bool PoScanner::scanPattern(TQString pathName,TQString pattern,bool rec) { int tot; @@ -57,17 +57,17 @@ if (!called) { pb=true; count=0;} called=true; -kdDebug(0) << QString("cat: %1, %2").arg(pathName).arg(pattern) << endl; +kdDebug(0) << TQString("cat: %1, %2").arg(pathName).arg(pattern) << endl; if(pb) {emit patternStarted(); emit patternProgress(0); } - QDir d(pathName,pattern); + TQDir d(pathName,pattern); d.setMatchAllDirs(true); const QFileInfoList* files = d.entryInfoList(); tot=files->count(); - QPtrListIterator it(*files); + TQPtrListIterator it(*files); kdDebug(0) << tot << endl; for ( int i=0; ilastTranslator(); -else author=QString("unknown"); +else author=TQString("unknown"); int catnum=dm->catalogRef(location,author,fileName); @@ -149,7 +149,7 @@ tot=catalog->numberOfEntries(); bool fuzzy; bool untra; -//kdDebug(0) << QString("Tot: %1").arg(tot) << endl; +//kdDebug(0) << TQString("Tot: %1").arg(tot) << endl; for (i=0;imsgid(i,true).first(); kdWarning() << "Translation database does not support plural forms" << endl; msgstr=catalog->msgstr(i).first(); @@ -181,7 +181,7 @@ for (i=0;i -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include -#include +#include #include #include #include "dbseprefwidget.h" #include "preferenceswidget.h" -PreferencesWidget::PreferencesWidget(QWidget *parent, const char* name) +PreferencesWidget::PreferencesWidget(TQWidget *parent, const char* name) : PrefWidget(parent,name) { - QVBoxLayout *layout = new QVBoxLayout(this); -// QLabel *label = new QLabel(i18n("Settings for KDE database search engine"),this); + TQVBoxLayout *layout = new TQVBoxLayout(this); +// TQLabel *label = new TQLabel(i18n("Settings for KDE database search engine"),this); // layout->addWidget(label); dbpw = new DBSearchEnginePref(this); dbpw->dirInput->setMode(KFile::Directory | KFile::LocalOnly); layout->addWidget(dbpw); - resize(QSize(200,200).expandedTo(minimumSizeHint())); + resize(TQSize(200,200).expandedTo(minimumSizeHint())); -// connect(dbpw->browseTB_3,SIGNAL(clicked()),SLOT(browse1())); +// connect(dbpw->browseTB_3,TQT_SIGNAL(clicked()),TQT_SLOT(browse1())); emit restoreNow(); //Fill with actual params. @@ -84,7 +84,7 @@ dbpw->ignoreLE->setText("&.:"); dbpw->autoAddCB_2->setChecked(true); -QString defaultDir; +TQString defaultDir; KStandardDirs * dirs = KGlobal::dirs(); if(dirs) { @@ -97,7 +97,7 @@ QString defaultDir; dbpw->dirInput->setURL(defaultDir); } -void PreferencesWidget::setName(QString n) +void PreferencesWidget::setName(TQString n) { dbpw->filenameLB->setText(i18n("Scanning file: %1").arg(n)); } diff --git a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h index 599408cd..5cd1fed8 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h +++ b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h @@ -9,7 +9,7 @@ class PreferencesWidget : public PrefWidget Q_OBJECT public: - PreferencesWidget(QWidget *parent=0, const char* name=0); + PreferencesWidget(TQWidget *parent=0, const char* name=0); virtual ~PreferencesWidget(); virtual void apply(); @@ -17,7 +17,7 @@ public: virtual void standard(); DBSearchEnginePref *dbpw; public slots: - void setName(QString); + void setName(TQString); void setEntries(int); signals: void applyNow(); diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp index 5bf088b8..41f4319d 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp @@ -35,19 +35,19 @@ #include "dbscan.h" #include #include -#include +#include #include -#include +#include #include #include #include -#include +#include #include #define i18n (const char *) -KDBSearchEngine2::KDBSearchEngine2(QObject *parent,const char*name) +KDBSearchEngine2::KDBSearchEngine2(TQObject *parent,const char*name) : SearchEngine(parent,name) { pw=0; @@ -55,7 +55,7 @@ KDBSearchEngine2::KDBSearchEngine2(QObject *parent,const char*name) di=0; //Database Interface is not yet initialized - connect(this,SIGNAL(hasError(QString)),SLOT(setLastError(QString))); + connect(this,TQT_SIGNAL(hasError(TQString)),TQT_SLOT(setLastError(TQString))); searching=false; // i'm not searching iAmReady=true; //there are no reason to say I'm not ready. @@ -69,11 +69,11 @@ KDBSearchEngine2::~KDBSearchEngine2() delete di; //delete database interface } -bool KDBSearchEngine2::startSearch(QString str) +bool KDBSearchEngine2::startSearch(TQString str) { kdDebug(0) << "Start a new search. Looking for: " << str << endl; - static QString queryString; + static TQString queryString; queryString=str; //set the latest query string (note: it is static) @@ -92,7 +92,7 @@ bool KDBSearchEngine2::startSearch(QString str) searching=true; //really start searching - QString searchingString; + TQString searchingString; do //Search loop, it stops only when finished and latest searched string is the actual query string. { @@ -134,8 +134,8 @@ bool KDBSearchEngine2::startSearch(QString str) strategy.addAlgorithm(&wbyw); - connect(&strategy,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult))); - strategy.exec(searchingString); disconnect(&strategy,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult))); + connect(&strategy,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult))); + strategy.exec(searchingString); disconnect(&strategy,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult))); kdDebug(0) << "End of search for " << searchingString << endl; @@ -158,7 +158,7 @@ bool KDBSearchEngine2::startSearch(QString str) -bool KDBSearchEngine2::startSearchInTranslation(QString str) +bool KDBSearchEngine2::startSearchInTranslation(TQString str) { if(autoupdate) { @@ -172,20 +172,20 @@ bool KDBSearchEngine2::startSearchInTranslation(QString str) -bool KDBSearchEngine2::messagesForPackage(const QString& package - , QValueList& resultList, QString& error) +bool KDBSearchEngine2::messagesForPackage(const TQString& package + , TQValueList& resultList, TQString& error) { //FIXME implement this (needs filters) return true; } -void KDBSearchEngine2::setLastError(QString er) +void KDBSearchEngine2::setLastError(TQString er) { lasterror=er; } -QString KDBSearchEngine2::translate(const QString text) +TQString KDBSearchEngine2::translate(const TQString text) { ExactSearchAlgorithm exact(di,&settings); @@ -212,14 +212,14 @@ void KDBSearchEngine2::receiveResult(QueryResult r) /* A SEARCH RESULT CONTAINS (see searchengine.h) - QString requested; - QString found; - QString translation; - QString plainTranslation; - QString plainFound; - QString plainRequested; + TQString requested; + TQString found; + TQString translation; + TQString plainTranslation; + TQString plainFound; + TQString plainRequested; int score; - QPtrList descriptions; + TQPtrList descriptions; */ @@ -230,7 +230,7 @@ bool KDBSearchEngine2::init() else { di = new DataBaseInterface(dbDirectory,&settings); - connect(di,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult))); + connect(di,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult))); //FIXME: what wbout ready() if(!di->mainOk()) return false; //check if the main DB is OK. @@ -243,8 +243,8 @@ const KAboutData *KDBSearchEngine2::about() const return DbSe2Factory::instance()->aboutData(); } -void KDBSearchEngine2::stringChanged( QString orig, QString translated - , QString description) +void KDBSearchEngine2::stringChanged( TQString orig, TQString translated + , TQString description) { if(!init()) return; @@ -255,22 +255,22 @@ void KDBSearchEngine2::stringChanged( QString orig, QString translated } -PrefWidget * KDBSearchEngine2::preferencesWidget(QWidget *parent) +PrefWidget * KDBSearchEngine2::preferencesWidget(TQWidget *parent) { pw = new KDB2PreferencesWidget(parent); kdDebug(0) << "new KDB2 preferences widget" << endl; setSettings(); - connect(pw,SIGNAL(restoreNow()),this,SLOT(setSettings())); - connect(pw,SIGNAL(applyNow()),this,SLOT(updateSettings())); - connect(pw,SIGNAL(destroyed()),this,SLOT(prefDestr())); + connect(pw,TQT_SIGNAL(restoreNow()),this,TQT_SLOT(setSettings())); + connect(pw,TQT_SIGNAL(applyNow()),this,TQT_SLOT(updateSettings())); + connect(pw,TQT_SIGNAL(destroyed()),this,TQT_SLOT(prefDestr())); - connect(pw->dbpw->scanAll,SIGNAL(clicked()),this,SLOT(scanAllPressed())); - connect(pw->dbpw->scanSource,SIGNAL(clicked()),this,SLOT(scanNowPressed())); - connect(pw->dbpw->addSource,SIGNAL(clicked()),this,SLOT(addSource())); - connect(pw->dbpw->editSource,SIGNAL(clicked()),this,SLOT(editSource())); - connect(pw->dbpw->removeSource,SIGNAL(clicked()),this,SLOT(removeSource())); + connect(pw->dbpw->scanAll,TQT_SIGNAL(clicked()),this,TQT_SLOT(scanAllPressed())); + connect(pw->dbpw->scanSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(scanNowPressed())); + connect(pw->dbpw->addSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(addSource())); + connect(pw->dbpw->editSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(editSource())); + connect(pw->dbpw->removeSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeSource())); return pw; @@ -309,10 +309,10 @@ void KDBSearchEngine2::saveSettings(KConfigBase *config) uint sourceNumber=0; config->writeEntry("NumberOfDBImportSources",sources.count()); - for(QMap::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt) + for(TQMap::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt) { sourceNumber++; - config->setGroup("DBImportSource-"+QString::number(sourceNumber)); + config->setGroup("DBImportSource-"+TQString::number(sourceNumber)); config->writeEntry("Name",sourceIt.key()); sourceIt.data().writeConfig(config); } @@ -321,7 +321,7 @@ void KDBSearchEngine2::saveSettings(KConfigBase *config) void KDBSearchEngine2::readSettings(KConfigBase *config) { - /*QString defaultDir; + /*TQString defaultDir; KStandardDirs * dirs = KGlobal::dirs(); if(dirs) { @@ -361,8 +361,8 @@ void KDBSearchEngine2::readSettings(KConfigBase *config) kdDebug(0) << "Found "<< numberOfSources << " sources" << endl; for(uint sourceNumber=1;sourceNumber<=numberOfSources;sourceNumber++) { - config->setGroup("DBImportSource-"+QString::number(sourceNumber)); - QString name=config->readEntry("Name"); + config->setGroup("DBImportSource-"+TQString::number(sourceNumber)); + TQString name=config->readEntry("Name"); sources[name].readConfig(config); } if(pw) @@ -401,7 +401,7 @@ void KDBSearchEngine2::setSettings() //pw->dbpw->useFilters->setChecked(false); //pw->dbpw->dateToday->setChecked(false); pw->dbpw->sourceList->clear(); - for(QMap::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt) + for(TQMap::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt) { pw->dbpw->sourceList->insertItem(sourceIt.key()); } @@ -413,7 +413,7 @@ void KDBSearchEngine2::updateSettings() { if(!pw) return; - QString newdb = pw->dbpw->dbDirectory->url(); + TQString newdb = pw->dbpw->dbDirectory->url(); if(newdb !=dbDirectory) { kdDebug(0) << "Recreate DB-Interface cause dbdir is changed" << endl; @@ -469,19 +469,19 @@ pw->dbpw->sourceList-> } -/*void KDBSearchEngine2::scanSource(QString sourceName) +/*void KDBSearchEngine2::scanSource(TQString sourceName) { //FIXME: an error here would be nice if(!init()) return; - for(QValueList::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); sourceIt++) + for(TQValueList::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); sourceIt++) { if((*sourceIt).getName()==sourceName) { - QValueList urls=(*sourceIt).urls(); + TQValueList urls=(*sourceIt).urls(); PoScanner ps(di); - for(QValueList::iterator urlIt=urls.begin();urlIt!=urls.end();urlIt++) + for(TQValueList::iterator urlIt=urls.begin();urlIt!=urls.end();urlIt++) ps.scanFile(*urlIt); //We suppose name are unique so no need for further scrolling @@ -496,14 +496,14 @@ void KDBSearchEngine2::scanNowPressed() kdDebug(0) << "We should not be here, scanNow called without a pw!" << endl; return; } - QString sourceName; + TQString sourceName; sourceName=pw->dbpw->sourceList->currentText(); if(!init()) return; if(sources.contains(sourceName)) { - QValueList urls=sources[sourceName].urls(); + TQValueList urls=sources[sourceName].urls(); PoScanner ps(di); - for(QValueList::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt) + for(TQValueList::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt) ps.scanURL(*urlIt); } @@ -520,10 +520,10 @@ void KDBSearchEngine2::scanAllPressed() PoScanner ps(di); - for(QMap::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt) + for(TQMap::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt) { - QValueList urls=(*sourceIt).urls(); - for(QValueList::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt) + TQValueList urls=(*sourceIt).urls(); + for(TQValueList::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt) ps.scanURL(*urlIt); } } @@ -535,18 +535,18 @@ void KDBSearchEngine2::editSource() kdDebug(0) << "We should not be here, editSource called without a pw!" << endl; return; } - QString sourceName; + TQString sourceName; sourceName=pw->dbpw->sourceList->currentText(); if(sources.contains(sourceName)) { bool nameIsNew; - QString newName; + TQString newName; SourceDialog sd; do{ sources[sourceName].setDialogValues(&sd); sd.sourceName->setText(sourceName); - if(sd.exec()==QDialog::Accepted) + if(sd.exec()==TQDialog::Accepted) { sources[sourceName].getDialogValues(&sd); newName= sd.sourceName->text(); @@ -586,7 +586,7 @@ void KDBSearchEngine2::removeSource() kdDebug(0) << "We should not be here, delteSource called without a pw!" << endl; return; } - QString sourceName; + TQString sourceName; sourceName=pw->dbpw->sourceList->currentText(); sources.remove(sourceName); pw->dbpw->sourceList->removeItem(pw->dbpw->sourceList->currentItem()); @@ -595,11 +595,11 @@ void KDBSearchEngine2::removeSource() void KDBSearchEngine2::addSource() { - QString newName; + TQString newName; SourceDialog sd; bool nameIsNew; do{ - if(sd.exec()==QDialog::Accepted) + if(sd.exec()==TQDialog::Accepted) { newName= sd.sourceName->text(); nameIsNew=!sources.contains(newName); @@ -625,7 +625,7 @@ void KDBSearchEngine2::addSource() } -QString KDBSearchEngine2::searchTranslation( const QString text, int & score ) +TQString KDBSearchEngine2::searchTranslation( const TQString text, int & score ) { GenericSearchAlgorithm strategy(di,&settings); strategy.setMaxResultNumber(1); @@ -644,7 +644,7 @@ QString KDBSearchEngine2::searchTranslation( const QString text, int & score ) } -QString KDBSearchEngine2::fuzzyTranslation( const QString text, int & score ) +TQString KDBSearchEngine2::fuzzyTranslation( const TQString text, int & score ) { GenericSearchAlgorithm strategy(di,&settings); strategy.setMaxResultNumber(1); diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h index 0db19c6c..fb9cff70 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h @@ -9,7 +9,7 @@ Andrea Rizzi #define DBSEARCH_ENGINE2_H #include -#include +#include #include "database.h" #include "dbse2_factory.h" @@ -25,7 +25,7 @@ class KDBSearchEngine2 : public SearchEngine public: - KDBSearchEngine2(QObject *parent=0, const char *name=0); + KDBSearchEngine2(TQObject *parent=0, const char *name=0); virtual ~KDBSearchEngine2(); //init if needed. @@ -46,10 +46,10 @@ class KDBSearchEngine2 : public SearchEngine void readSettings(KConfigBase *config); - QString translate(const QString text); + TQString translate(const TQString text); - QString fuzzyTranslation(const QString text, int &score); - QString searchTranslation(const QString, int &score ); + TQString fuzzyTranslation(const TQString text, int &score); + TQString searchTranslation(const TQString, int &score ); /** * Finds all messages belonging to package package. If nothing is found, @@ -60,8 +60,8 @@ class KDBSearchEngine2 : public SearchEngine * * @return true, if successfull */ - bool messagesForPackage(const QString& package - , QValueList& resultList, QString& error); + bool messagesForPackage(const TQString& package + , TQValueList& resultList, TQString& error); /** * @returns true, if the searchresults are given as rich text @@ -79,19 +79,19 @@ class KDBSearchEngine2 : public SearchEngine * a tabbed widget. * @param parent the parent of the returned widget */ - virtual PrefWidget* preferencesWidget(QWidget *parent); + virtual PrefWidget* preferencesWidget(TQWidget *parent); /** @returns information about this SearchEngine */ virtual const KAboutData *about() const; /** @returns the i18n name of this search engine */ - QString name() const {return i18n("DB SearchEngine II");} + TQString name() const {return i18n("DB SearchEngine II");} /** @returns a untranslated name of this engine */ - QString id() const {return "dbse2";} + TQString id() const {return "dbse2";} /** @returns the last error message */ - QString lastError() {return lasterror;} + TQString lastError() {return lasterror;} /** @@ -114,14 +114,14 @@ class KDBSearchEngine2 : public SearchEngine * @returns false, if an error occured. Use @ref lastError * to get the last error message */ - bool startSearch(QString s); + bool startSearch(TQString s); /** * starts a search for string s in the translated text * @returns false, if an error occured. Use @ref lastError * to get the last error message */ - bool startSearchInTranslation(QString s); + bool startSearchInTranslation(TQString s); /** stops a search */ @@ -133,22 +133,22 @@ class KDBSearchEngine2 : public SearchEngine * on the edited file. The default implementation does nothing. * @param file The edited file with path */ - // virtual void setEditedFile(QString file); + // virtual void setEditedFile(TQString file); /** * This method allows a search engine to use different settings depending * on the edited package. The default implementation does nothing. * @param package The name of the package, that is currently translated. */ - // virtual void setEditedPackage(QString package); + // virtual void setEditedPackage(TQString package); /** * This method allows a search engine to use different settings depending * on the language code. The default implementation does nothing. * @param lang The current language code (e.g. de). */ - // virtual void setLanguageCode(QString lang); - // virtual void setLanguage(QString languageCode, QString languageName); + // virtual void setLanguageCode(TQString lang); + // virtual void setLanguage(TQString languageCode, TQString languageName); @@ -160,15 +160,15 @@ class KDBSearchEngine2 : public SearchEngine * @param translation the translated string */ - void stringChanged( QString orig, QString translated - , QString description); + void stringChanged( TQString orig, TQString translated + , TQString description); //void scan(); - void setLastError(QString er); + void setLastError(TQString er); //Slots for preference dialog - // void scanSource(QString sourceName); + // void scanSource(TQString sourceName); void scanNowPressed(); void scanAllPressed(); void editSource(); @@ -181,7 +181,7 @@ class KDBSearchEngine2 : public SearchEngine bool searching; bool iAmReady; bool autoupdate; - QString lasterror; + TQString lasterror; KDB2PreferencesWidget *pw; //PrefWidg -> DBSE @@ -190,11 +190,11 @@ class KDBSearchEngine2 : public SearchEngine void setSettings(); DBSESettings settings; - QString dbDirectory; + TQString dbDirectory; bool autoAdd,useSentence,useGlossary,useExact; bool useDivide,useAlpha,useWordByWord,useDynamic; uint numberOfResult; - QMap sources; + TQMap sources; }; diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp index 0ca040e8..466b68e5 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp @@ -10,20 +10,20 @@ // // #include "algorithms.h" -#include +#include #include //FIXME: remove #define i18n (const char*) -DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const QString& query ) +DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const TQString& query ) { DataBaseInterface::ResultList res; DataBaseInterface::MainEntry e=di->get(query,0); - QStringList trs=e.second.getTranslations(); + TQStringList trs=e.second.getTranslations(); - for(QStringList::iterator it=trs.begin();it!=trs.end();++it) + for(TQStringList::iterator it=trs.begin();it!=trs.end();++it) { emit newResult(QueryResult(*it,e.first.getString(),settings->scoreExact)); @@ -35,19 +35,19 @@ DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const QString& query ) } -DataBaseInterface::ResultList GenericSearchAlgorithm::exec(const QString& query ) +DataBaseInterface::ResultList GenericSearchAlgorithm::exec(const TQString& query ) { DataBaseInterface::ResultList res; // ExactSearchAlgorithm exact(query,settings); uint countResults=0; - for(QValueList::iterator algoit = algoChain.begin(); algoit!=algoChain.end() && countResults < maxResults; algoit++) + for(TQValueList::iterator algoit = algoChain.begin(); algoit!=algoChain.end() && countResults < maxResults; algoit++) { - connect(*algoit,SIGNAL(newResult(QueryResult)),this,SIGNAL(newResult(QueryResult))); + connect(*algoit,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SIGNAL(newResult(QueryResult))); kdDebug(0) << "Algo pointer" << (*algoit) << endl; res+=(*algoit)->exec(query); countResults=res.count(); kdDebug(0) << "Count = " << countResults << endl; - disconnect(*algoit,SIGNAL(newResult(QueryResult)),this,SIGNAL(newResult(QueryResult))); + disconnect(*algoit,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SIGNAL(newResult(QueryResult))); } return res; } @@ -57,7 +57,7 @@ void GenericSearchAlgorithm::addAlgorithm( AbstractSearchAlgorithm * algo ) algoChain.append(algo); } -DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query ) +DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const TQString & query ) { DataBaseInterface::ResultList res; DBItemMultiIndex::IndexList il=di->getAlpha(query); @@ -65,8 +65,8 @@ DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query for(DBItemMultiIndex::IndexList::iterator it=il.begin();it!=il.end()&&!di->stopNow();++it) { DataBaseInterface::MainEntry e=di->getFromIndex(*it); - QStringList trs=e.second.getTranslations(); - for(QStringList::iterator it=trs.begin();it!=trs.end() && !di->stopNow();++it) + TQStringList trs=e.second.getTranslations(); + for(TQStringList::iterator it=trs.begin();it!=trs.end() && !di->stopNow();++it) { QueryResult r(di->format(di->simple(*it,true),query),e.first.getString(),settings->scoreAlpha); emit newResult(r); @@ -78,17 +78,17 @@ DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query return res; } -DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const QString & query ) +DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const TQString & query ) { DataBaseInterface::ResultList res; DataBaseInterface::MainEntry e = di->getSentence(query); - QStringList trs=e.second.getTranslations(); + TQStringList trs=e.second.getTranslations(); kdDebug(0) << "Count in sentence archive " << trs.count()<< endl; - for(QStringList::iterator it=trs.begin();it!=trs.end();++it) + for(TQStringList::iterator it=trs.begin();it!=trs.end();++it) { QueryResult r(di->format(di->simple(*it,true),query),e.first.getString(),settings->scoreSentence); emit newResult(r); @@ -100,31 +100,31 @@ DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const QStrin return res; } -DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString & query ) +DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const TQString & query ) { ResultList res; factory->setQuery(query); - QPtrList chunks=factory->chunks(); + TQPtrList chunks=factory->chunks(); kdDebug(0) << "Number of chunks " << chunks.count() << endl; chunks.setAutoDelete(true); //I should delete the chunks myself - QStringList querySeparators=factory->separators(); + TQStringList querySeparators=factory->separators(); //This prevents recursive loop. if (chunks.count()<=1) return res; - QStringList translations,tmpTranslations; + TQStringList translations,tmpTranslations; translations.push_back(""); //FIXME this is needed to start , but is not good int finalscore=0; int i=0; - QMap translationUsed; + TQMap translationUsed; //Loop on all chunk for(AbstractChunk *it=chunks.first();it && !di->stopNow(); it=chunks.next()) { kdDebug(0) << "Process next chunk" << endl; int chunkscore=0; - QValueList r=it->translations(); + TQValueList r=it->translations(); kdDebug(0) << "Number of results for this chunk " << r.count() << endl; if(r.count()<1) { @@ -144,14 +144,14 @@ DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString & translationUsed.clear(); for(ResultList::iterator it1=r.begin();it1!=r.end() &&!di->stopNow(); ++it1) { - QString chunkTranslation= (*it1).result(); + TQString chunkTranslation= (*it1).result(); if(!translationUsed.contains(chunkTranslation)) { translationUsed[chunkTranslation]=true; kdDebug(0) << "a translation is: " << chunkTranslation << endl; - for(QStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++) + for(TQStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++) { - QString prevTranslation=*it2; + TQString prevTranslation=*it2; tmpTranslations.push_back(prevTranslation+chunkTranslation+querySeparators[i]); kdDebug(0) << "..appending it to " << prevTranslation << endl; } @@ -176,9 +176,9 @@ DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString & if (finalscore<50) return res; - for(QStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++) + for(TQStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++) { - QString theTranslation=*it2; + TQString theTranslation=*it2; QueryResult qr(di->format(theTranslation,query),i18n("CHUNK BY CHUNK"),finalscore); qr.setRichOriginal(i18n("

          Chunk by chunk

          CHANGE THIS TEXT!!!!This translation is" "obtained translating the sentences and using a" @@ -211,22 +211,22 @@ FuzzyChunkSearchAlgorithm::FuzzyChunkSearchAlgorithm( DataBaseInterface * dbi, D } -DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & query ) +DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const TQString & query ) { //FIXME: this code is shit too ResultList res; factory->setQuery(query); - QPtrList querychunks = factory->chunks(); + TQPtrList querychunks = factory->chunks(); querychunks.setAutoDelete(true); - typedef QMap > ResultMap; + typedef TQMap > ResultMap; ResultMap rmap; //result of words index query unsigned int notfound=0,frequent=0,nchunks = querychunks.count(); //Get index list for each word for(AbstractChunk *it=querychunks.first(); it &&!di->stopNow() ; it=querychunks.next() ) { - QValueList locations = (*it).locationReferences(); + TQValueList locations = (*it).locationReferences(); if(locations.count()>0) { @@ -246,10 +246,10 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q //Now we have a map (rmap) "word in query->list of occurency" - QValueList::iterator countpos[nchunks+1]; + TQValueList::iterator countpos[nchunks+1]; - QValueList il; + TQValueList il; for(int i = 0;i<=nchunks&&!di->stopNow();i++) countpos[i]=il.end(); @@ -310,12 +310,12 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q int bestscore=0; for(unsigned int wf=nchunks;wf>0;wf-- ){ - for(QValueList::iterator it=countpos[wf];it!=countpos[wf-1] ;++it) + for(TQValueList::iterator it=countpos[wf];it!=countpos[wf-1] ;++it) { //loop on entries with same number of word found DataBaseInterface::MainEntry e; e=di->getFromIndex(*it); - QStringList trs=e.second.getTranslations(); - for(QStringList::iterator it=trs.begin();it!=trs.end()&&!di->stopNow();++it) + TQStringList trs=e.second.getTranslations(); + for(TQStringList::iterator it=trs.begin();it!=trs.end()&&!di->stopNow();++it) { unsigned int cinr=factory->chunks(*it).count(); //chunk in result //compute a score, lets kbabel sort now, it should be fast... @@ -326,11 +326,11 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q // kdDebug(0) << "s: "<0)?(nwords-winr):(winr-nwords))/(nwords*10)<< endl; // FIXME: format better the richtext - QString ori=e.first.getString(); - QString re=di->format(di->simple(*it,true),query); + TQString ori=e.first.getString(); + TQString re=di->format(di->simple(*it,true),query); QueryResult r(re,ori,score); - for(QPtrListIterator it(querychunks); it.current() && di->stopNow() ; ++it){ - ori=ori.replace(QRegExp((*it)->chunkString(),false),""+(*it)->chunkString()+""); + for(TQPtrListIterator it(querychunks); it.current() && di->stopNow() ; ++it){ + ori=ori.replace(TQRegExp((*it)->chunkString(),false),""+(*it)->chunkString()+""); } r.setRichOriginal(ori); if(!di->stopNow()) @@ -344,16 +344,16 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q } -DataBaseInterface::ResultList CorrelationSearchAlgorithm::exec( const QString & query ) +DataBaseInterface::ResultList CorrelationSearchAlgorithm::exec( const TQString & query ) { //FIXME, this code is shit. DataBaseInterface::ResultList res; if(di->words(query).count()>1) return res; - QMap corRes = di->correlation(query,0,false); + TQMap corRes = di->correlation(query,0,false); float max=0,max1=0,max2=0; - QString best,best1,best2; + TQString best,best1,best2; - for(QMap::iterator it = corRes.begin(); it !=corRes.end(); ++it) + for(TQMap::iterator it = corRes.begin(); it !=corRes.end(); ++it) { if(it.data()>max) { @@ -414,7 +414,7 @@ SingleWordSearchAlgorithm::SingleWordSearchAlgorithm( DataBaseInterface * dbi, D addAlgorithm(&corr); } -DataBaseInterface::ResultList SingleWordSearchAlgorithm::exec( const QString & query ) +DataBaseInterface::ResultList SingleWordSearchAlgorithm::exec( const TQString & query ) { if(di->words(query).count()>1) return ResultList(); diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h index 5f9ee682..aa049f85 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h @@ -14,14 +14,14 @@ #include "database.h" #include "chunk.h" -#include +#include class AbstractSearchAlgorithm : public QObject { Q_OBJECT public: - typedef QValueList ResultList; + typedef TQValueList ResultList; AbstractSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) { @@ -31,7 +31,7 @@ class AbstractSearchAlgorithm : public QObject /** * this contains the algo and return some results. */ - virtual DataBaseInterface::ResultList exec(const QString& query)=0; + virtual DataBaseInterface::ResultList exec(const TQString& query)=0; signals: void newResult(QueryResult); @@ -50,7 +50,7 @@ class ExactSearchAlgorithm : public AbstractSearchAlgorithm public: ExactSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {} - virtual DataBaseInterface::ResultList exec(const QString& query); + virtual DataBaseInterface::ResultList exec(const TQString& query); }; class AlphaSearchAlgorithm : public AbstractSearchAlgorithm @@ -59,7 +59,7 @@ class AlphaSearchAlgorithm : public AbstractSearchAlgorithm public: AlphaSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {} - virtual DataBaseInterface::ResultList exec(const QString& query); + virtual DataBaseInterface::ResultList exec(const TQString& query); }; class SentenceArchiveSearchAlgorithm : public AbstractSearchAlgorithm @@ -68,7 +68,7 @@ class SentenceArchiveSearchAlgorithm : public AbstractSearchAlgorithm public: SentenceArchiveSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) ; - virtual DataBaseInterface::ResultList exec(const QString& query); + virtual DataBaseInterface::ResultList exec(const TQString& query); }; class ChunkByChunkSearchAlgorithm : public AbstractSearchAlgorithm @@ -77,7 +77,7 @@ class ChunkByChunkSearchAlgorithm : public AbstractSearchAlgorithm public: ChunkByChunkSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets); - virtual DataBaseInterface::ResultList exec(const QString& query); + virtual DataBaseInterface::ResultList exec(const TQString& query); void setChunkFactory(AbstractChunkFactory *_factory) { @@ -93,7 +93,7 @@ class FuzzyChunkSearchAlgorithm : public AbstractSearchAlgorithm public: FuzzyChunkSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets); - virtual DataBaseInterface::ResultList exec(const QString& query); + virtual DataBaseInterface::ResultList exec(const TQString& query); void setChunkFactory(AbstractChunkFactory *_factory) { factory=_factory; @@ -108,14 +108,14 @@ class GenericSearchAlgorithm : public AbstractSearchAlgorithm public: GenericSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) ; - virtual ResultList exec(const QString& query); + virtual ResultList exec(const TQString& query); void addAlgorithm(AbstractSearchAlgorithm *algo); void setMaxResultNumber(uint num){maxResults=num;} protected: - QValueList algoChain; + TQValueList algoChain; uint maxResults; }; @@ -125,7 +125,7 @@ class CorrelationSearchAlgorithm : public AbstractSearchAlgorithm Q_OBJECT public: CorrelationSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {} - virtual ResultList exec(const QString& query); + virtual ResultList exec(const TQString& query); }; @@ -135,7 +135,7 @@ class SingleWordSearchAlgorithm : public GenericSearchAlgorithm Q_OBJECT public: SingleWordSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets); - virtual DataBaseInterface::ResultList exec(const QString& query); + virtual DataBaseInterface::ResultList exec(const TQString& query); private: ExactSearchAlgorithm exact; diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp index 7c62748a..ef426d53 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp @@ -19,12 +19,12 @@ AbstractChunk::~AbstractChunk( ) { } -WordChunk::WordChunk( DataBaseInterface * di, QString _word ) : AbstractChunk(di) +WordChunk::WordChunk( DataBaseInterface * di, TQString _word ) : AbstractChunk(di) { word=_word; } -QValueList WordChunk::translations( ) +TQValueList WordChunk::translations( ) { DataBaseInterface::ResultList r; SingleWordSearchAlgorithm sa(di,di->getSettings()); @@ -32,13 +32,13 @@ QValueList WordChunk::translations( ) return r; } -//QValueList WordChunk::translationsFromReference( uint reference ) +//TQValueList WordChunk::translationsFromReference( uint reference ) //{ //} -QValueList< uint > WordChunk::locationReferences( ) +TQValueList< uint > WordChunk::locationReferences( ) { - QValueList res=di->getWordIndex(word); + TQValueList res=di->getWordIndex(word); kdDebug(0) << "Number of locations " << res.count() < WordChunk::locationReferences( ) if(wordsindex->get(k,d)!=DB_NOTFOUND) return d->getList(); else - return QValueList tmpList; + return TQValueList tmpList; */ } -void WordChunk::setLocationReferences( QValueList< uint > ) +void WordChunk::setLocationReferences( TQValueList< uint > ) { } -SentenceChunk::SentenceChunk( DataBaseInterface * di, QString _sentence ): AbstractChunk(di) +SentenceChunk::SentenceChunk( DataBaseInterface * di, TQString _sentence ): AbstractChunk(di) { sentence=_sentence; } -QValueList SentenceChunk::translations( ) +TQValueList SentenceChunk::translations( ) { GenericSearchAlgorithm g(di,di->getSettings()); @@ -75,29 +75,29 @@ QValueList SentenceChunk::translations( ) } -//QValueList SentenceChunk::translationsFromReference( uint reference ) +//TQValueList SentenceChunk::translationsFromReference( uint reference ) //{ // //} -QValueList< uint > SentenceChunk::locationReferences( ) +TQValueList< uint > SentenceChunk::locationReferences( ) { } -void SentenceChunk::setLocationReferences( QValueList< uint > ) +void SentenceChunk::setLocationReferences( TQValueList< uint > ) { } -QPtrList< AbstractChunk> WordChunkFactory::chunks() +TQPtrList< AbstractChunk> WordChunkFactory::chunks() { - QString str=di->simple(string); - QPtrList list; + TQString str=di->simple(string); + TQPtrList list; if(str.isEmpty()) return list; _separators.clear(); kdDebug(0) << "Word chunks of:" < WordChunkFactory::chunks() -QPtrList SentenceChunkFactory::chunks() +TQPtrList SentenceChunkFactory::chunks() { - QString str=string; - QPtrList list; + TQString str=string; + TQPtrList list; if(str.isEmpty()) return list; // kdDebug(0) << s << endl; @@ -132,9 +132,9 @@ QPtrList SentenceChunkFactory::chunks() do { - QRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))"); + TQRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))"); pos=re.search(str); - QString sep=re.cap(1); + TQString sep=re.cap(1); if(!str.left(pos).isEmpty()) { @@ -154,14 +154,14 @@ QPtrList SentenceChunkFactory::chunks() return list; } -QPtrList< AbstractChunk > CaseBasedWordChunkFactory::chunks( ) +TQPtrList< AbstractChunk > CaseBasedWordChunkFactory::chunks( ) { - QString str=string; - QPtrList list; + TQString str=string; + TQPtrList list; if(str.isEmpty()) return list; uint slen=str.length(); kdDebug(0) << "CaseWordChunk string:" << str << endl; - QString tmpWord; + TQString tmpWord; bool upcase; for(uint i=0;i<=slen;i++) { diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h index 5c5fcb93..2578e59e 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h @@ -11,8 +11,8 @@ // #ifndef DBSE2_CHUNK_H #define DBSE2_CHUNK_H -#include -#include +#include +#include #include "database.h" /** @@ -29,13 +29,13 @@ class AbstractChunk /** * This function should return a list of translation for the current chunk. */ - virtual QValueList translations()=0; + virtual TQValueList translations()=0; //FIXME: is this in the right place, better in factory? check that stuff - //virtual QValueList translationsFromReference(uint reference)=0; - virtual QValueList locationReferences()=0; - virtual void setLocationReferences(QValueList)=0; - virtual QString chunkString()=0; + //virtual TQValueList translationsFromReference(uint reference)=0; + virtual TQValueList locationReferences()=0; + virtual void setLocationReferences(TQValueList)=0; + virtual TQString chunkString()=0; protected: DataBaseInterface *di; @@ -47,16 +47,16 @@ class AbstractChunk class WordChunk : public AbstractChunk { public: - WordChunk(DataBaseInterface *di,QString _word); - virtual QValueList translations(); - //virtual QValueList translationsFromReference(uint reference); - virtual QValueList locationReferences(); - virtual void setLocationReferences(QValueList); - virtual QString chunkString(){return word;} + WordChunk(DataBaseInterface *di,TQString _word); + virtual TQValueList translations(); + //virtual TQValueList translationsFromReference(uint reference); + virtual TQValueList locationReferences(); + virtual void setLocationReferences(TQValueList); + virtual TQString chunkString(){return word;} - //static QValueList divide(QString); + //static TQValueList divide(TQString); private: - QString word; + TQString word; }; /** @@ -65,17 +65,17 @@ class WordChunk : public AbstractChunk class SentenceChunk : public AbstractChunk { public: - SentenceChunk(DataBaseInterface *di,QString _sentence); - virtual QValueList translations(); - //virtual QValueList translationsFromReference(uint reference); - virtual QValueList locationReferences(); - virtual void setLocationReferences(QValueList); - virtual QString chunkString(){return sentence;} + SentenceChunk(DataBaseInterface *di,TQString _sentence); + virtual TQValueList translations(); + //virtual TQValueList translationsFromReference(uint reference); + virtual TQValueList locationReferences(); + virtual void setLocationReferences(TQValueList); + virtual TQString chunkString(){return sentence;} - // static QValueList divide(QString); + // static TQValueList divide(TQString); private: - QString sentence; + TQString sentence; }; @@ -92,11 +92,11 @@ class AbstractChunkFactory di=_di; } virtual ~AbstractChunkFactory(){} - virtual QPtrList chunks()=0; + virtual TQPtrList chunks()=0; /** Change th string and return the chunks */ - virtual QPtrList chunks(const QString& s) + virtual TQPtrList chunks(const TQString& s) { string=s; return chunks(); @@ -105,14 +105,14 @@ class AbstractChunkFactory * Returns the list of separators of last @ref chunks() call */ - virtual QStringList separators(){ return _separators;} - void setQuery(const QString& s) + virtual TQStringList separators(){ return _separators;} + void setQuery(const TQString& s) { string=s; } protected: - QString string; - QStringList _separators; + TQString string; + TQStringList _separators; DataBaseInterface *di; }; @@ -123,7 +123,7 @@ class WordChunkFactory : public AbstractChunkFactory /** YOU SHOULD DELETE THE CHUNKS!! */ - virtual QPtrList chunks(); + virtual TQPtrList chunks(); }; class CaseBasedWordChunkFactory : public AbstractChunkFactory @@ -133,7 +133,7 @@ class CaseBasedWordChunkFactory : public AbstractChunkFactory /** YOU SHOULD DELETE THE CHUNKS!! */ - virtual QPtrList chunks(); + virtual TQPtrList chunks(); }; class SentenceChunkFactory : public AbstractChunkFactory @@ -144,7 +144,7 @@ class SentenceChunkFactory : public AbstractChunkFactory /** YOU SHOULD DELETE THE CHUNKS!! */ - virtual QPtrList chunks(); + virtual TQPtrList chunks(); }; diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp index ea0e8379..0631f7ad 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp @@ -8,8 +8,8 @@ License: GPLv2 #include #include "database.h" -#include -#include +#include +#include #include #include #include @@ -21,7 +21,7 @@ License: GPLv2 -DataBase::DataBase(QString dbpath,QString dbname, QString dblang) : Db(0,DB_CXX_NO_EXCEPTIONS) +DataBase::DataBase(TQString dbpath,TQString dbname, TQString dblang) : Db(0,DB_CXX_NO_EXCEPTIONS) { filename=dbpath+"."+dblang+".db"; @@ -59,11 +59,11 @@ unsigned int DataBase::getLast() -QueryResult::QueryResult(QString r) +QueryResult::QueryResult(TQString r) { res=r; } -QueryResult::QueryResult(QString r,QString o,int s) +QueryResult::QueryResult(TQString r,TQString o,int s) { res=r; richr=r; @@ -80,7 +80,7 @@ QueryResult::QueryResult() -DataBaseInterface::DataBaseInterface(QString dir, DBSESettings *sets) +DataBaseInterface::DataBaseInterface(TQString dir, DBSESettings *sets) { //FIXME Better db names!! @@ -125,7 +125,7 @@ DataBaseInterface::~DataBaseInterface() } -DataBase *DataBaseInterface::openMyDataBase(const QString& prefix,const QString& name,const QString& l,DBTYPE tt) +DataBase *DataBaseInterface::openMyDataBase(const TQString& prefix,const TQString& name,const TQString& l,DBTYPE tt) { DataBase *aDb = new DataBase(prefix,name,l); @@ -163,7 +163,7 @@ DataBase *DataBaseInterface::openMyDataBase(const QString& prefix,const QString& */ -DataBaseInterface::MainEntry DataBaseInterface::get(const QString& query,SearchFilter *filter) +DataBaseInterface::MainEntry DataBaseInterface::get(const TQString& query,SearchFilter *filter) { static int counter=1; counter++; @@ -184,11 +184,11 @@ DataBaseInterface::MainEntry DataBaseInterface::get(const QString& query,SearchF */ -bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *info) +bool DataBaseInterface::addEntry(TQString original,TQString translated,InputInfo *info) { DBItemMainKey mk(original); DBItemMainData md; - QMap correlationDiff; + TQMap correlationDiff; bool newentry=false; //try to get kdDebug(0) << "Inserting the pair:" << endl; @@ -220,8 +220,8 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo * alpha->put(&ka,&in); kdDebug(0) << "Updating the word index " << endl; //Update words index - QStringList ws=words(original); - for(QStringList::iterator it = ws.begin(); it!=ws.end(); ++it) + TQStringList ws=words(original); + for(TQStringList::iterator it = ws.begin(); it!=ws.end(); ++it) { DBItemMainKey word(*it); DBItemMultiIndex win; @@ -240,8 +240,8 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo * //Update sentence index - QStringList so=sentences(original); - QStringList st=sentences(translated); + TQStringList so=sentences(original); + TQStringList st=sentences(translated); if(so.count()==st.count() && st.count() >1 ) //we already hav a database for single string. { kdDebug(0) << "inside sentence loop" << endl; @@ -276,11 +276,11 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo * if(!translated.isEmpty()) { //loop on all translations to update correlation - QStringList tmpTranslations=md.getTranslations(); - for(QStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt) + TQStringList tmpTranslations=md.getTranslations(); + for(TQStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt) { - QStringList wt=words(*otIt); - for(QStringList::iterator it = wt.begin(); it!=wt.end(); ++it) + TQStringList wt=words(*otIt); + for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it) { if(correlationDiff.contains(*it)) correlationDiff[*it]--; @@ -294,10 +294,10 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo * md.addTranslation(translated,info->ref()); tmpTranslations=md.getTranslations(); - for(QStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt) + for(TQStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt) { - QStringList wt=words(*otIt); - for(QStringList::iterator it = wt.begin(); it!=wt.end(); ++it) + TQStringList wt=words(*otIt); + for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it) { if(correlationDiff.contains(*it)) correlationDiff[*it]++; @@ -316,7 +316,7 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo * } -bool DataBaseInterface::removeEntry(QString original) +bool DataBaseInterface::removeEntry(TQString original) { DBItemMainKey mk(original); DBItemMainData md; @@ -346,8 +346,8 @@ bool DataBaseInterface::removeEntry(QString original) alpha->put(&ka,&in); //Update words index - QStringList ws=words(original); - for(QStringList::iterator it = ws.begin(); it!=ws.end(); it++) + TQStringList ws=words(original); + for(TQStringList::iterator it = ws.begin(); it!=ws.end(); it++) { DBItemMainKey word(*it); DBItemMultiIndex win; @@ -357,8 +357,8 @@ bool DataBaseInterface::removeEntry(QString original) } //Update sentence index - QStringList so=sentences(original); - QStringList st=sentences(translated); + TQStringList so=sentences(original); + TQStringList st=sentences(translated); if(so.count()==st.count() && st.count() >1 ) //we already hav a database for single string. { for(int i=0; i< so.count() ; i++) @@ -380,16 +380,16 @@ bool DataBaseInterface::removeEntry(QString original) -QMap DataBaseInterface::correlation(QString word,SearchFilter *filter,bool notify, float minSign) +TQMap DataBaseInterface::correlation(TQString word,SearchFilter *filter,bool notify, float minSign) { - QDict res; + TQDict res; // res.setAutoDelete(true); - QMapfinal; + TQMapfinal; DBItemMultiIndex::IndexList il; unsigned int tot=0; unsigned int background=0; unsigned int nocck; - QString sword=simple(word); + TQString sword=simple(word); DBItemMainKey *k = new DBItemMainKey(sword); DBItemMultiIndex *d = new DBItemMultiIndex(); if(wordsindex->get(k,d)!=DB_NOTFOUND) @@ -398,29 +398,29 @@ QMap DataBaseInterface::correlation(QString word,SearchFilter *fi il=d->getList(); kdDebug(0) << il.count()<::iterator it=il.begin();it!=il.end();++it) + for(TQValueList::iterator it=il.begin();it!=il.end();++it) { numindex->get(*it,k); - // QValueList trad=exactMatch(k->getString(),filter); + // TQValueList trad=exactMatch(k->getString(),filter); MainEntry e=get(k->getString(),filter); - QStringList trad=e.second.getTranslations(); + TQStringList trad=e.second.getTranslations(); nocck=words(k->getString()).contains(sword); - for( QStringList::iterator it2=trad.begin();it2!=trad.end();++it2) + for( TQStringList::iterator it2=trad.begin();it2!=trad.end();++it2) { - QStringList w=words(*it2); + TQStringList w=words(*it2); unsigned int numWords = w.count()*10+1; unsigned int wei=100000/sqrt(numWords); //weight (is the best one?) background+=(numWords-nocck)*wei; - QDict count; + TQDict count; //count.setAutoDelete(true); //FIXME:SET AUTODELETE FOR ALL DICTS - for(QStringList::iterator it1=w.begin();it1!=w.end();it1++) + for(TQStringList::iterator it1=w.begin();it1!=w.end();it1++) { uint *ip; if(!(ip=count[*it1])) count.insert(*it1,new uint(1)); @@ -428,7 +428,7 @@ QMap DataBaseInterface::correlation(QString word,SearchFilter *fi (*ip)++; } - for(QStringList::iterator it1=w.begin();it1!=w.end();it1++) + for(TQStringList::iterator it1=w.begin();it1!=w.end();it1++) { uint *ip; if(*(count[*it1])==nocck) //add only if same number of entry (it cuts articles) @@ -442,7 +442,7 @@ QMap DataBaseInterface::correlation(QString word,SearchFilter *fi unsigned int sqrBG=sqrt((1.0*background+1)/10000); - for(QDictIterator it(res) ; it.current(); ++it) + for(TQDictIterator it(res) ; it.current(); ++it) { float sign=1.0*(*(it.current()))/(10000.0*sqrBG); if(sign >minSign){ @@ -457,15 +457,15 @@ QMap DataBaseInterface::correlation(QString word,SearchFilter *fi return final; } -QStringList DataBaseInterface::words(QString s) +TQStringList DataBaseInterface::words(TQString s) { - QString str=simple(s); - QStringList list; + TQString str=simple(s); + TQStringList list; int pos; do { - pos=str.find(QRegExp("\\s")); + pos=str.find(TQRegExp("\\s")); // if(!simple(str.left(pos)).isEmpty()) // list.append(simple(str.left(pos))); if(!str.left(pos).isEmpty()) @@ -476,24 +476,24 @@ QStringList DataBaseInterface::words(QString s) return list; } -QString DataBaseInterface::simple(QString str,bool ck) +TQString DataBaseInterface::simple(TQString str,bool ck) { - QString res; + TQString res; if(ck) res=str; //case keep else res=str.lower(); //lowercase //FIXME: uncoment the foll. line (check speed) - res=res.replace(QRegExp("(<(.*)>)(.*)()"),"\\3"); //remove enclosing tags + res=res.replace(TQRegExp("(<(.*)>)(.*)()"),"\\3"); //remove enclosing tags //Try to get rid of regexps. - // res=res.replace(QRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char - // res=res.replace(QRegExp("(('|-|_)+)")," "); //strip non-word char - // res=res.replace(QRegExp("[^\\w\\s%]"),""); //strip non-word char + // res=res.replace(TQRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char + // res=res.replace(TQRegExp("(('|-|_)+)")," "); //strip non-word char + // res=res.replace(TQRegExp("[^\\w\\s%]"),""); //strip non-word char - QString r; - QChar c; + TQString r; + TQChar c; bool wasSpace=true; uint len=res.length(); for(uint i=0; i)(.*)()"),"\\3"); - QChar first=noTagT[noTagT.find(QRegExp("\\w"))]; + TQString s=_s; + TQString noTagT=t.replace(TQRegExp("(<(.*)>)(.*)()"),"\\3"); + TQChar first=noTagT[noTagT.find(TQRegExp("\\w"))]; bool firstCapital=isUpper(first); /* @@ -643,9 +643,9 @@ if(columnAtEnd) if(allupper) s=s.upper(); - int pos=t.find(QRegExp("&")); + int pos=t.find(TQRegExp("&")); if(pos>=0) { - QChar accel=t[t.find(QRegExp("&"))+1]; + TQChar accel=t[t.find(TQRegExp("&"))+1]; if(accel!='&') { @@ -667,32 +667,32 @@ if(columnAtEnd) } -QString DataBaseInterface::formatRegExp(QString _s, QString t, QString tre,QString stringSearch,QString stringReplace) +TQString DataBaseInterface::formatRegExp(TQString _s, TQString t, TQString tre,TQString stringSearch,TQString stringReplace) { - QString s=_s; - QRegExp templateRegExp(tre); - //QString stringSearch = "(.*)!@CAP1@$"; // use @CAP1.. fot caps in templates - //QString stringReplace = "\\1@CAP1@"; // use \1, \2 for caps in str and @CAP1 fot caps in template + TQString s=_s; + TQRegExp templateRegExp(tre); + //TQString stringSearch = "(.*)!@CAP1@$"; // use @CAP1.. fot caps in templates + //TQString stringReplace = "\\1@CAP1@"; // use \1, \2 for caps in str and @CAP1 fot caps in template if(templateRegExp.exactMatch(t)) { - QStringList caps=templateRegExp.capturedTexts(); + TQStringList caps=templateRegExp.capturedTexts(); int i=0; - for(QStringList::iterator capit=caps.begin();capit!=caps.end();++capit) + for(TQStringList::iterator capit=caps.begin();capit!=caps.end();++capit) { - QString phRegExp="(?!\\\\)@CAP"+QString::number(i)+"@"; + TQString phRegExp="(?!\\\\)@CAP"+TQString::number(i)+"@"; //kdDebug(0) << "phRegExp: " << phRegExp << endl; //kdDebug(0) << "cap[" << i << "]: "<< *capit<< endl; - stringReplace = stringReplace.replace(QRegExp(phRegExp),*capit); - stringSearch = stringSearch.replace(QRegExp(phRegExp),*capit); + stringReplace = stringReplace.replace(TQRegExp(phRegExp),*capit); + stringSearch = stringSearch.replace(TQRegExp(phRegExp),*capit); i++; } // kdDebug(0) << "stringSearch " << stringSearch << endl; // kdDebug(0) << "stringReplace " << stringReplace << endl; - QRegExp stringSearchRegExp = QRegExp(stringSearch); + TQRegExp stringSearchRegExp = TQRegExp(stringSearch); // kdDebug(0) << "before: "< tmpList; + TQValueList tmpList; return tmpList; } diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/database.h b/kbabel/kbabeldict/modules/dbsearchengine2/database.h index c447fa59..d6ed3482 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/database.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/database.h @@ -8,11 +8,11 @@ #ifndef DATABASE_2_H #define DATABASE_2_H -#include -#include +#include +#include #include -#include -#include +#include +#include #include "dbentries.h" @@ -43,7 +43,7 @@ public: class DataBase : Db { public: - DataBase(QString dbpath, QString dbname, QString dblang); + DataBase(TQString dbpath, TQString dbname, TQString dblang); int open(DBTYPE type,unsigned int flags=0); @@ -105,12 +105,12 @@ int get(DBItem * key,DBItem *data){ int close(unsigned int i) {return Db::close( i); } //For scrolling - // int getFirst(DBItem *key,DBItem *data,QString table); - // int getNext(DBItem *key,DBItem *data,QString table); - // bool isEnd(QString table); + // int getFirst(DBItem *key,DBItem *data,TQString table); + // int getNext(DBItem *key,DBItem *data,TQString table); + // bool isEnd(TQString table); private: - QString filename; - QString database; + TQString filename; + TQString database; DBTYPE mytype; }; @@ -122,26 +122,26 @@ class QueryResult //from DBInterface to KDBSearchEngine { public: QueryResult(); - QueryResult(QString r); - QueryResult(QString r,QString o,int s); - void setRichResult(QString r) { richr=r; } - void setRichOriginal(QString r) { richo=r; } + QueryResult(TQString r); + QueryResult(TQString r,TQString o,int s); + void setRichResult(TQString r) { richr=r; } + void setRichOriginal(TQString r) { richo=r; } - QString richResult() {return richr;} - QString richOriginal() {return richo;} + TQString richResult() {return richr;} + TQString richOriginal() {return richo;} - QString result(){ return res; } - QString original() {return orig; } + TQString result(){ return res; } + TQString original() {return orig; } int score() {return sco;} //info contains originalkey,catalog,date,author etc... ResultInfo info(){ResultInfo i; i.info="no info"; return i;} private: - QString res; - QString orig; - QString richr; - QString richo; + TQString res; + TQString orig; + TQString richr; + TQString richo; int sco; }; @@ -158,34 +158,34 @@ class DataBaseInterface : public QObject public: //move result list typedef to AbstractAlgorthm or somewhere else - typedef QValueList ResultList; + typedef TQValueList ResultList; typedef QPair MainEntry; - DataBaseInterface( QString dir, DBSESettings *sets); + DataBaseInterface( TQString dir, DBSESettings *sets); ~DataBaseInterface(); //Ask the Database to stop now. void stop(bool b=true) {_stopNow=b;} //Search words - ResultList wordsMatch(QString query,SearchFilter *filter=0,bool notify=true); + ResultList wordsMatch(TQString query,SearchFilter *filter=0,bool notify=true); //Edit database functions. //addEntry and sync all the tables - bool addEntry(QString original,QString translated,InputInfo *info); + bool addEntry(TQString original,TQString translated,InputInfo *info); //FIXME:implement me! - bool removeEntry(QString original); + bool removeEntry(TQString original); //FIXME: go persistent! - QMap correlation(QString word,SearchFilter *filter=0,bool notify=true,float minSign=0.2); + TQMap correlation(TQString word,SearchFilter *filter=0,bool notify=true,float minSign=0.2); // Read the database - MainEntry get(const QString& query,SearchFilter *filter=0); + MainEntry get(const TQString& query,SearchFilter *filter=0); MainEntry getFromIndex(uint i); - DBItemMultiIndex::IndexList getAlpha(const QString& query); - DBItemMultiIndex::IndexList getWordIndex(const QString& query); - MainEntry getSentence(const QString& query); + DBItemMultiIndex::IndexList getAlpha(const TQString& query); + DBItemMultiIndex::IndexList getWordIndex(const TQString& query); + MainEntry getSentence(const TQString& query); //Database status check functions bool mainOk() {return main!=0;} @@ -206,7 +206,7 @@ class DataBaseInterface : public QObject DBSESettings *getSettings() {return settings;} private: - DataBase * openMyDataBase(const QString& prefix,const QString& name,const QString& l,DBTYPE tt); + DataBase * openMyDataBase(const TQString& prefix,const TQString& name,const TQString& l,DBTYPE tt); DataBase *main; DataBase *numindex; DataBase *wordsindex; @@ -222,14 +222,14 @@ class DataBaseInterface : public QObject //FIXME:Move to KBabel common library. public: - QString format( QString _s,QString t); - QString formatRegExp(QString _s, QString t, QString tre,QString stringSearch,QString stringReplace); - static QStringList words(QString s); - static QStringList sentences(QString s); - static QStringList sentencesSeparator(QString s); - static QString simple(QString str,bool ck=false); - static bool isUpper(QChar s); - static bool isLower(QChar s); + TQString format( TQString _s,TQString t); + TQString formatRegExp(TQString _s, TQString t, TQString tre,TQString stringSearch,TQString stringReplace); + static TQStringList words(TQString s); + static TQStringList sentences(TQString s); + static TQStringList sentencesSeparator(TQString s); + static TQString simple(TQString str,bool ck=false); + static bool isUpper(TQChar s); + static bool isLower(TQChar s); }; diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp index 4f048f9c..efa7e44d 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp @@ -1,12 +1,12 @@ #include "dbentries.h" -#include +#include void DBItem::set() { - QBuffer b(mydata); + TQBuffer b(mydata); b.open( IO_WriteOnly ); - QDataStream s(&b); + TQDataStream s(&b); write(&s); b.close(); set_data(mydata.data()); @@ -18,7 +18,7 @@ void DBItem::set() mydata.resize(get_size()); mydata.duplicate((const char *)get_data(),(unsigned int)get_size()); - QDataStream *s = new QDataStream(mydata,IO_ReadOnly); + TQDataStream *s = new TQDataStream(mydata,IO_ReadOnly); read(s); delete s; } @@ -31,18 +31,18 @@ DBItemMainKey::DBItemMainKey() //set(); } -DBItemMainKey::DBItemMainKey(QString searchstring) +DBItemMainKey::DBItemMainKey(TQString searchstring) { sstr=searchstring; //set(); } -void DBItemMainKey::read(QDataStream *s) +void DBItemMainKey::read(TQDataStream *s) { *s >> sstr; } -void DBItemMainKey::write(QDataStream *s) +void DBItemMainKey::write(TQDataStream *s) { *s << sstr; } @@ -64,17 +64,17 @@ void DBItemMainData::clear() //set(); } -void DBItemMainData::read(QDataStream *s) +void DBItemMainData::read(TQDataStream *s) { *s >> indexnumber >> translations; } -void DBItemMainData::write(QDataStream *s) +void DBItemMainData::write(TQDataStream *s) { *s << (Q_UINT32)indexnumber << translations; } -void DBItemMainData::addTranslation(QString str, unsigned int ref) +void DBItemMainData::addTranslation(TQString str, unsigned int ref) { //get(); if(translations[str].find(ref)==translations[str].end()) // If it do not exists @@ -87,7 +87,7 @@ void DBItemMainData::addTranslation(QString str, unsigned int ref) } -void DBItemMainData::removeTranslation(QString str, unsigned int ref) +void DBItemMainData::removeTranslation(TQString str, unsigned int ref) { //get(); translations[str].remove(ref); @@ -100,8 +100,8 @@ void DBItemMainData::removeTranslation(QString str, unsigned int ref) void DBItemMainData::removeRef( unsigned int ref) { //get(); -QMapIterator > it2; - for(QMapIterator > it = translations.begin(); +TQMapIterator > it2; + for(TQMapIterator > it = translations.begin(); it!= translations.end(); /* it++*/) { //Dirty hack it2=it; @@ -113,11 +113,11 @@ QMapIterator > it2; //set(); } -QStringList DBItemMainData::getTranslations() +TQStringList DBItemMainData::getTranslations() { //get(); -QStringList result; - for(QMapIterator > it = translations.begin(); +TQStringList result; + for(TQMapIterator > it = translations.begin(); it!= translations.end(); it++) result.append(it.key()); @@ -125,7 +125,7 @@ return result; } -QValueList DBItemMainData::getReferences(QString str) +TQValueList DBItemMainData::getReferences(TQString str) { //get(); return translations[str]; //this also add a "str" entry but we do not call set()! @@ -160,12 +160,12 @@ void DBItemMultiIndex::removeEntry(unsigned int index) } -void DBItemMultiIndex::read(QDataStream *s) +void DBItemMultiIndex::read(TQDataStream *s) { *s >> list; } -void DBItemMultiIndex::write(QDataStream *s) +void DBItemMultiIndex::write(TQDataStream *s) { *s << list; } diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h index 0a40878c..c4410ade 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h @@ -2,19 +2,19 @@ #define DBENTRIES_H #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class CatalogInfo { - QString author; - QDateTime datetime; - QString filename; - QString filepath; + TQString author; + TQDateTime datetime; + TQString filename; + TQString filepath; }; @@ -23,13 +23,13 @@ class ResultInfo { public: //Common info - QString original; //placeholder + TQString original; //placeholder // //Multi reference info - QValueList catalogs; + TQValueList catalogs; - QString info; + TQString info; }; @@ -54,9 +54,9 @@ public: protected: - virtual void read(QDataStream *s) = 0; - virtual void write(QDataStream *s) = 0; - QByteArray mydata; + virtual void read(TQDataStream *s) = 0; + virtual void write(TQDataStream *s) = 0; + TQByteArray mydata; bool empty; }; @@ -65,17 +65,17 @@ class DBItemMainKey : public DBItem { public: DBItemMainKey(); - DBItemMainKey(QString searchstring); + DBItemMainKey(TQString searchstring); - QString getString(){ return sstr;} + TQString getString(){ return sstr;} private: - virtual void read(QDataStream *s); - virtual void write(QDataStream *s); + virtual void read(TQDataStream *s); + virtual void write(TQDataStream *s); - QString sstr; + TQString sstr; }; @@ -84,21 +84,21 @@ class DBItemMainData : public DBItem { public: - typedef QMapIterator > TranslationIterator; - typedef QMap > TranslationMap; + typedef TQMapIterator > TranslationIterator; + typedef TQMap > TranslationMap; DBItemMainData(); - QStringList getTranslations(); - QValueList getReferences(QString str); + TQStringList getTranslations(); + TQValueList getReferences(TQString str); void clear(); //Add a translation with reference ref, if translation exists append // ref to the list of references - void addTranslation(QString str,unsigned int ref); - void removeTranslation(QString str,unsigned int ref); + void addTranslation(TQString str,unsigned int ref); + void removeTranslation(TQString str,unsigned int ref); //remove any reference to ref, if ref is the only reference of a translation // the translation is removed @@ -109,8 +109,8 @@ class DBItemMainData : public DBItem private: - virtual void read(QDataStream *s); - virtual void write(QDataStream *s); + virtual void read(TQDataStream *s); + virtual void write(TQDataStream *s); unsigned int indexnumber; TranslationMap translations; @@ -121,7 +121,7 @@ private: class DBItemMultiIndex : public DBItem { public: - typedef QValueList IndexList; + typedef TQValueList IndexList; DBItemMultiIndex(); // DBItemMultiIndex(IndexList l); @@ -134,8 +134,8 @@ class DBItemMultiIndex : public DBItem private: - virtual void read(QDataStream *s); - virtual void write(QDataStream *s); + virtual void read(TQDataStream *s); + virtual void write(TQDataStream *s); IndexList list; diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp index b19b2db2..7c2d8564 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp @@ -18,8 +18,8 @@ */ #include "dbscan.h" #include -#include -#include +#include +#include #include #include #include @@ -69,9 +69,9 @@ void MessagesSource::getDialogValues(SourceDialog *sd) type=sd->type->currentItem(); } -QValueList MessagesSource::urls() +TQValueList MessagesSource::urls() { - QValueList urlList; + TQValueList urlList; if(type==0) urlList.append(location); if(type==1|| type==2) @@ -81,18 +81,18 @@ QValueList MessagesSource::urls() } -QValueList MessagesSource::filesInDir(KURL url,bool recursive) +TQValueList MessagesSource::filesInDir(KURL url,bool recursive) { - QValueList result; - QDir d(url.path()); + TQValueList result; + TQDir d(url.path()); d.setMatchAllDirs(true); kdDebug(0) << d.count() << " files in dir "<< url.path()< it(*files); + // TQPtrListIterator it(*files); if(files){ - for (QPtrListIterator fileit(*files); !fileit.atLast(); ++fileit ) + for (TQPtrListIterator fileit(*files); !fileit.atLast(); ++fileit ) { if ((*fileit)->isDir()) { @@ -120,14 +120,14 @@ QValueList MessagesSource::filesInDir(KURL url,bool recursive) //FIXME: clean this class PoScanner::PoScanner(DataBaseInterface *dbi, - QObject *parent,const char *name):QObject(parent,name) + TQObject *parent,const char *name):TQObject(parent,name) { di=dbi; removeOldCatalogTranslation=true; count=0; } -bool PoScanner::scanPattern(QString pathName,QString pattern,bool rec) +bool PoScanner::scanPattern(TQString pathName,TQString pattern,bool rec) { int tot; //Only one progress bar!! @@ -138,18 +138,18 @@ if (!called) { pb=true; count=0;} called=true; -kdDebug(0) << QString("Scanning: %1, %2").arg(pathName).arg(pattern) << endl; +kdDebug(0) << TQString("Scanning: %1, %2").arg(pathName).arg(pattern) << endl; if(pb) { emit patternStarted(); emit patternProgress(0); } - QDir d(pathName,pattern); + TQDir d(pathName,pattern); d.setMatchAllDirs(true); const QFileInfoList* files = d.entryInfoList(); tot=files->count(); - QPtrListIterator it(*files); + TQPtrListIterator it(*files); kdDebug(0) << tot << endl; for ( int i=0; ilastTranslator(); -else author=QString(""); +else author=TQString(""); //int catnum=dm->catalogRef(location,author,fileName); InputInfo ii; @@ -253,7 +253,7 @@ for (i=0;imsgid(i,true).first(); msgstr=catalog->msgstr(i).first(); res=di->addEntry(msgid,msgstr,&ii); @@ -264,7 +264,7 @@ for (i=0;i urls(); + TQValueList urls(); private: - QValueList filesInDir(KURL url,bool recursive); + TQValueList filesInDir(KURL url,bool recursive); KURL location; // The source type "SingleFile" =0, "SingleDirectory"=1, "RecursiveDirectory"=2 @@ -63,9 +63,9 @@ class MessagesSource SearchFilter filter; - QString projectName; - QString projectKeywords; - QString status; + TQString projectName; + TQString projectKeywords; + TQString status; }; @@ -75,12 +75,12 @@ class PoScanner : public QObject public: - PoScanner(DataBaseInterface *dbi,QObject *parent=0,const char *name=0); + PoScanner(DataBaseInterface *dbi,TQObject *parent=0,const char *name=0); /* Scan a single PO file. */ - bool scanFile(QString fileName); + bool scanFile(TQString fileName); /* Scan a single URL file. @@ -91,7 +91,7 @@ class PoScanner : public QObject /* Scan a list of space separated files with possible MetaCharacters */ - bool scanPattern(QString pathName,QString pattern="*.po",bool rec=false); + bool scanPattern(TQString pathName,TQString pattern="*.po",bool rec=false); @@ -105,7 +105,7 @@ class PoScanner : public QObject void patternProgress(int); void patternFinished(); void added(int); - void filename(QString); + void filename(TQString); private: // If true when a translation is found in a CATALOG the old translation for this CATALOG diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp index 9c286052..55f6a16f 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp @@ -22,7 +22,7 @@ KInstance *DbSe2Factory::s_instance = 0; KAboutData *DbSe2Factory::s_about = 0; -DbSe2Factory::DbSe2Factory( QObject *parent, const char *name) +DbSe2Factory::DbSe2Factory( TQObject *parent, const char *name) : KLibFactory(parent,name) { } @@ -43,10 +43,10 @@ DbSe2Factory::~DbSe2Factory() } -QObject *DbSe2Factory::createObject( QObject *parent, const char *name, - const char *classname, const QStringList &) +TQObject *DbSe2Factory::createObject( TQObject *parent, const char *name, + const char *classname, const TQStringList &) { - if(QCString(classname) != "SearchEngine") + if(TQCString(classname) != "SearchEngine") { kdError() << "not a SearchEngine requested" << endl; return 0; diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h index 4285d53c..2b70184a 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h @@ -9,12 +9,12 @@ class DbSe2Factory : public KLibFactory { Q_OBJECT public: - DbSe2Factory( QObject *parent=0, const char *name=0); + DbSe2Factory( TQObject *parent=0, const char *name=0); ~DbSe2Factory(); - virtual QObject *createObject( QObject *parent=0, const char *name=0, - const char *classname="QObject", - const QStringList &args = QStringList()); + virtual TQObject *createObject( TQObject *parent=0, const char *name=0, + const char *classname="TQObject", + const TQStringList &args = TQStringList()); static KInstance *instance(); diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp index 7634a799..76aef878 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp +++ b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp @@ -1,13 +1,13 @@ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -15,11 +15,11 @@ #include "dbse2.h" #include "preferenceswidget.h" -KDB2PreferencesWidget::KDB2PreferencesWidget(QWidget *parent, const char* name) +KDB2PreferencesWidget::KDB2PreferencesWidget(TQWidget *parent, const char* name) : PrefWidget(parent,name) { - QVBoxLayout *layout = new QVBoxLayout(this); -// QLabel *label = new QLabel(i18n("Settings for KDE Database Search Engine"),this); + TQVBoxLayout *layout = new TQVBoxLayout(this); +// TQLabel *label = new TQLabel(i18n("Settings for KDE Database Search Engine"),this); // layout->addWidget(label); dbpw = new DBSearchEnginePrefWidget(this); @@ -30,7 +30,7 @@ KDB2PreferencesWidget::KDB2PreferencesWidget(QWidget *parent, const char* name) standard(); -// connect(dbpw->browseTB_3,SIGNAL(clicked()),SLOT(browse1())); +// connect(dbpw->browseTB_3,TQT_SIGNAL(clicked()),TQT_SLOT(browse1())); emit restoreNow(); //Fill with actual params. @@ -52,7 +52,7 @@ emit restoreNow(); void KDB2PreferencesWidget::standard() { -QString defaultDir; +TQString defaultDir; KStandardDirs * dirs = KGlobal::dirs(); if(dirs) { diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h index 4714fd13..1f706902 100644 --- a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h +++ b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h @@ -9,7 +9,7 @@ class KDB2PreferencesWidget : public PrefWidget Q_OBJECT public: - KDB2PreferencesWidget(QWidget *parent=0, const char* name=0); + KDB2PreferencesWidget(TQWidget *parent=0, const char* name=0); virtual ~KDB2PreferencesWidget(); virtual void apply(); diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp index 1448e2b0..c8d8c1db 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp +++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp @@ -54,7 +54,7 @@ KInstance *PaFactory::s_instance = 0; KAboutData *PaFactory::s_about = 0; -PaFactory::PaFactory( QObject *parent, const char *name) +PaFactory::PaFactory( TQObject *parent, const char *name) : KLibFactory(parent,name) { } @@ -75,10 +75,10 @@ PaFactory::~PaFactory() } -QObject *PaFactory::createObject( QObject *parent, const char *name - , const char *classname, const QStringList &) +TQObject *PaFactory::createObject( TQObject *parent, const char *name + , const char *classname, const TQStringList &) { - if(QCString(classname) != "SearchEngine") + if(TQCString(classname) != "SearchEngine") { kdError() << "not a SearchEngine requested" << endl; return 0; diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h index 8871a538..901351c7 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h +++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h @@ -43,12 +43,12 @@ class PaFactory : public KLibFactory { Q_OBJECT public: - PaFactory( QObject *parent=0, const char *name=0); + PaFactory( TQObject *parent=0, const char *name=0); ~PaFactory(); - virtual QObject *createObject( QObject *parent=0, const char *name=0 - , const char *classname="QObject" - , const QStringList &args = QStringList()); + virtual TQObject *createObject( TQObject *parent=0, const char *name=0 + , const char *classname="TQObject" + , const TQStringList &args = TQStringList()); static KInstance *instance(); diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp index 373f123d..eae86d65 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp +++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp @@ -37,9 +37,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "poauxiliary.h" #include "preferenceswidget.h" @@ -50,7 +50,7 @@ using namespace KBabel; -PoAuxiliary::PoAuxiliary(QObject *parent, const char *name) +PoAuxiliary::PoAuxiliary(TQObject *parent, const char *name) : SearchEngine(parent, name) { catalog = new Catalog(this, "PoAuxiliary::catalog"); @@ -63,8 +63,8 @@ PoAuxiliary::PoAuxiliary(QObject *parent, const char *name) ignoreFuzzy=true; - loadTimer = new QTimer(this); - connect(loadTimer,SIGNAL(timeout()),this,SLOT(loadAuxiliary())); + loadTimer = new TQTimer(this); + connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(loadAuxiliary())); msgidDict.setAutoDelete(true); } @@ -101,7 +101,7 @@ void PoAuxiliary::readSettings(KConfigBase *config) { bool needLoading=false; - QString newPath = config->readEntry("Auxiliary" + TQString newPath = config->readEntry("Auxiliary" ,"../../../de/messages/@DIR1@/@PACKAGE@.po"); if(!initialized) { @@ -124,12 +124,12 @@ void PoAuxiliary::readSettings(KConfigBase *config) restoreSettings(); } -PrefWidget *PoAuxiliary::preferencesWidget(QWidget *parent) +PrefWidget *PoAuxiliary::preferencesWidget(TQWidget *parent) { prefWidget = new AuxiliaryPreferencesWidget(parent,"pocompendium_prefwidget"); - connect(prefWidget, SIGNAL(applySettings()), this, SLOT(applySettings())); - connect(prefWidget, SIGNAL(restoreSettings()) - , this, SLOT(restoreSettings())); + connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings())); + connect(prefWidget, TQT_SIGNAL(restoreSettings()) + , this, TQT_SLOT(restoreSettings())); restoreSettings(); @@ -142,24 +142,24 @@ const KAboutData *PoAuxiliary::about() const } -QString PoAuxiliary::name() const +TQString PoAuxiliary::name() const { return i18n("PO Auxiliary"); } -QString PoAuxiliary::id() const +TQString PoAuxiliary::id() const { return "poauxiliary"; } -QString PoAuxiliary::lastError() +TQString PoAuxiliary::lastError() { return errorMsg; } -bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFilter*filter) +bool PoAuxiliary::startSearch(const TQString& t, uint pluralForm, const SearchFilter*filter) { - QString text(t); + TQString text(t); if(autoUpdate && prefWidget && prefWidget->settingsChanged()) { applySettings(); @@ -192,10 +192,10 @@ bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFil if( !(entry->fuzzy && ignoreFuzzy) ) { SearchResult *result = new SearchResult; - result->requested =QStyleSheet::convertFromPlainText(text); - result->found = QStyleSheet::convertFromPlainText(text); + result->requested =TQStyleSheet::convertFromPlainText(text); + result->found = TQStyleSheet::convertFromPlainText(text); result->translation = - QStyleSheet::convertFromPlainText(entry->translation); + TQStyleSheet::convertFromPlainText(entry->translation); result->plainRequested = text; result->plainFound=text; @@ -231,7 +231,7 @@ bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFil } -bool PoAuxiliary::startSearchInTranslation(const QString& text) +bool PoAuxiliary::startSearchInTranslation(const TQString& text) { if(autoUpdate && prefWidget && prefWidget->settingsChanged()) { @@ -263,10 +263,10 @@ bool PoAuxiliary::startSearchInTranslation(const QString& text) if( !(entry->fuzzy && ignoreFuzzy) ) { SearchResult *result = new SearchResult; - result->requested =QStyleSheet::convertFromPlainText(entry->orig); - result->found = QStyleSheet::convertFromPlainText(entry->orig); + result->requested =TQStyleSheet::convertFromPlainText(entry->orig); + result->found = TQStyleSheet::convertFromPlainText(entry->orig); result->translation = - QStyleSheet::convertFromPlainText(text); + TQStyleSheet::convertFromPlainText(text); result->plainRequested = entry->orig; result->plainFound=entry->orig; @@ -317,7 +317,7 @@ void PoAuxiliary::applySettings() if(isSearching()) stopSearch(); - QString newPath = prefWidget->url(); + TQString newPath = prefWidget->url(); if(!initialized) { url = newPath; @@ -356,7 +356,7 @@ void PoAuxiliary::loadAuxiliary() loading=true; error=false; - QString path=url; + TQString path=url; if(path.contains("@LANG@")) { @@ -370,14 +370,14 @@ void PoAuxiliary::loadAuxiliary() } if(path.contains("@PACKAGEDIR@")) { - QString packagedir; + TQString packagedir; int pos=package.findRev("/"); if( pos > 0 ) packagedir=package.left(pos); else packagedir=""; path.replace("@PACKAGEDIR@",packagedir); kdDebug(KBABEL_SEARCH) << "Packagedir found " << packagedir << endl; } - QRegExp reg("@DIR[0-9]+@"); + TQRegExp reg("@DIR[0-9]+@"); if(path.contains(reg)) { int pos=reg.search(path); @@ -385,14 +385,14 @@ void PoAuxiliary::loadAuxiliary() while(pos>=0) { - QString num=path.mid(pos+4,len-5); + TQString num=path.mid(pos+4,len-5); bool ok; int number=num.toInt(&ok); if(ok) { - QString dir=directory(editedFile,number); - QString s("@DIR%1@"); + TQString dir=directory(editedFile,number); + TQString s("@DIR%1@"); path.replace(s.arg(number),dir); pos+=dir.length(); @@ -404,7 +404,7 @@ void PoAuxiliary::loadAuxiliary() } KURL u; - QRegExp rel("^[a-zA-Z]+:"); + TQRegExp rel("^[a-zA-Z]+:"); if(rel.search(path) >= 0) { u=path; @@ -412,7 +412,7 @@ void PoAuxiliary::loadAuxiliary() else if(path[0] != '/') // relative path { KURL temp(editedFile); - QString dir = temp.directory(); + TQString dir = temp.directory(); kdDebug(KBABEL_SEARCH) << dir << endl; u.setPath(dir+"/"+path); u.cleanPath(); @@ -424,8 +424,8 @@ void PoAuxiliary::loadAuxiliary() } emit progressStarts(i18n("Loading PO auxiliary")); - connect(catalog, SIGNAL(signalProgress(int)) - , this, SIGNAL(progress(int))); + connect(catalog, TQT_SIGNAL(signalProgress(int)) + , this, TQT_SIGNAL(progress(int))); ConversionStatus stat = catalog->openURL(u); if( stat != OK && stat != RECOVERED_PARSE_ERROR) @@ -476,8 +476,8 @@ void PoAuxiliary::loadAuxiliary() auxTranslator = catalog->lastTranslator(); } - disconnect(catalog, SIGNAL(signalProgress(int)) - , this, SIGNAL(progress(int))); + disconnect(catalog, TQT_SIGNAL(signalProgress(int)) + , this, TQT_SIGNAL(progress(int))); emit progressEnds(); @@ -489,7 +489,7 @@ void PoAuxiliary::loadAuxiliary() } -void PoAuxiliary::setEditedFile(const QString& file) +void PoAuxiliary::setEditedFile(const TQString& file) { if(initialized && (url.contains("@DIR") || KURL::isRelativeURL(url)) && file!=editedFile && !loadTimer->isActive() ) @@ -501,7 +501,7 @@ void PoAuxiliary::setEditedFile(const QString& file) } -void PoAuxiliary::setEditedPackage(const QString& pack) +void PoAuxiliary::setEditedPackage(const TQString& pack) { if(initialized && url.contains("@PACKAGE@") && pack!=package && !loadTimer->isActive() ) @@ -513,7 +513,7 @@ void PoAuxiliary::setEditedPackage(const QString& pack) } -void PoAuxiliary::setLanguageCode(const QString& lang) +void PoAuxiliary::setLanguageCode(const TQString& lang) { if(initialized && url.contains("@LANG@") && lang!=langCode && !loadTimer->isActive() ) @@ -529,7 +529,7 @@ bool PoAuxiliary::usesRichTextResults() return true; } -QString PoAuxiliary::translate(const QString& text, uint pluralForm) +TQString PoAuxiliary::translate(const TQString& text, uint pluralForm) { if(!initialized) { @@ -538,7 +538,7 @@ QString PoAuxiliary::translate(const QString& text, uint pluralForm) if(error) { - return QString::null; + return TQString::null; } Entry *entry = msgidDict[text]; @@ -547,7 +547,7 @@ QString PoAuxiliary::translate(const QString& text, uint pluralForm) return entry->translation; } - return QString::null; + return TQString::null; } diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h index 27fecba6..e0f4fe5d 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h +++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h @@ -36,8 +36,8 @@ #include "searchengine.h" -#include -#include +#include +#include class QTimer; namespace KBabel @@ -52,40 +52,40 @@ class PoAuxiliary : public SearchEngine Q_OBJECT public: - PoAuxiliary(QObject *parent=0, const char *name=0); + PoAuxiliary(TQObject *parent=0, const char *name=0); virtual ~PoAuxiliary(); virtual bool isReady() const; - virtual QString translate(const QString& text, uint pluralForm); + virtual TQString translate(const TQString& text, uint pluralForm); virtual bool isSearching() const; virtual void saveSettings(KConfigBase *config); virtual void readSettings(KConfigBase *config); - virtual PrefWidget *preferencesWidget(QWidget *parent); + virtual PrefWidget *preferencesWidget(TQWidget *parent); virtual const KAboutData *about() const; - virtual QString name() const; + virtual TQString name() const; - virtual QString id() const; + virtual TQString id() const; - virtual QString lastError(); + virtual TQString lastError(); virtual bool usesRichTextResults(); public slots: - virtual bool startSearch(const QString& text, unsigned int pluralForm + virtual bool startSearch(const TQString& text, unsigned int pluralForm , const SearchFilter*filter); - virtual bool startSearchInTranslation(const QString& text); + virtual bool startSearchInTranslation(const TQString& text); virtual void stopSearch(); - virtual void setEditedFile(const QString&); - virtual void setEditedPackage(const QString&); - virtual void setLanguageCode(const QString&); + virtual void setEditedFile(const TQString&); + virtual void setEditedPackage(const TQString&); + virtual void setLanguageCode(const TQString&); protected slots: @@ -98,39 +98,39 @@ protected slots: void loadAuxiliary(); private: - QGuardedPtr prefWidget; + TQGuardedPtr prefWidget; KBabel::Catalog *catalog; - QString auxPackage; - QString auxTranslator; - QString auxURL; + TQString auxPackage; + TQString auxTranslator; + TQString auxURL; - QString url; + TQString url; bool ignoreFuzzy; - QString editedFile; - QString package; - QString langCode; + TQString editedFile; + TQString package; + TQString langCode; bool error; - QString errorMsg; + TQString errorMsg; bool stop; bool active; bool loading; bool initialized; - QTimer *loadTimer; + TQTimer *loadTimer; struct Entry { - QString orig; - QString translation; - QString comment; + TQString orig; + TQString translation; + TQString comment; bool fuzzy; }; - QDict msgidDict; - QDict msgstrDict; + TQDict msgidDict; + TQDict msgstrDict; }; #endif diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp index e8d48032..5a534ecf 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp +++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp @@ -30,12 +30,12 @@ your version. **************************************************************************** */ -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include #include @@ -43,18 +43,18 @@ #include "preferenceswidget.h" #include "pwidget.h" -AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(QWidget *parent, const char* name) +AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(TQWidget *parent, const char* name) : PrefWidget(parent,name) , changed(false) { - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); prefWidget = new PWidget(this); layout->addWidget(prefWidget); - connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&)) - , this, SLOT(setChanged())); + connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&)) + , this, TQT_SLOT(setChanged())); } AuxiliaryPreferencesWidget::~AuxiliaryPreferencesWidget() @@ -78,13 +78,13 @@ void AuxiliaryPreferencesWidget::standard() changed=true; } -void AuxiliaryPreferencesWidget::setURL(const QString url) +void AuxiliaryPreferencesWidget::setURL(const TQString url) { prefWidget->urlInput->setURL(url); changed=false; } -QString AuxiliaryPreferencesWidget::url() +TQString AuxiliaryPreferencesWidget::url() { changed = false; return prefWidget->urlInput->url(); diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h index 45488158..3f0862b2 100644 --- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h +++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h @@ -44,15 +44,15 @@ class AuxiliaryPreferencesWidget : public PrefWidget Q_OBJECT public: - AuxiliaryPreferencesWidget(QWidget *parent=0, const char* name=0); + AuxiliaryPreferencesWidget(TQWidget *parent=0, const char* name=0); virtual ~AuxiliaryPreferencesWidget(); virtual void apply(); virtual void cancel(); virtual void standard(); - void setURL(const QString url); - QString url(); + void setURL(const TQString url); + TQString url(); void setIgnoreFuzzy(bool); bool ignoreFuzzy(); diff --git a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp index d862b236..9eb816bd 100644 --- a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp +++ b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp @@ -42,8 +42,8 @@ using namespace KBabel; -CompendiumData::CompendiumData(QObject *parent) - : QObject(parent) +CompendiumData::CompendiumData(TQObject *parent) + : TQObject(parent) , _active(false) , _error(false) , _initialized(false) @@ -53,7 +53,7 @@ CompendiumData::CompendiumData(QObject *parent) , _wordDict(9887) , _textonlyDict(9887) { - _catalog = new Catalog(this, "CompendiumData::catalog", QString::null); + _catalog = new Catalog(this, "CompendiumData::catalog", TQString::null); _exactDict.setAutoDelete(true); _allDict.setAutoDelete(true); _wordDict.setAutoDelete(true); @@ -77,12 +77,12 @@ bool CompendiumData::load(KURL url) emit progressStarts(i18n("Loading PO compendium")); - connect(_catalog, SIGNAL(signalProgress(int)), this, SIGNAL(progress(int))); + connect(_catalog, TQT_SIGNAL(signalProgress(int)), this, TQT_SIGNAL(progress(int))); ConversionStatus stat=_catalog->openURL(url); - disconnect(_catalog, SIGNAL(signalProgress(int)) - , this, SIGNAL(progress(int))); + disconnect(_catalog, TQT_SIGNAL(signalProgress(int)) + , this, TQT_SIGNAL(progress(int))); if( stat!= OK && stat != RECOVERED_PARSE_ERROR) @@ -113,7 +113,7 @@ bool CompendiumData::load(KURL url) } // FIXME: shoudl care about plural forms - QString temp = _catalog->msgid(i,true).first(); + TQString temp = _catalog->msgid(i,true).first(); int *index = new int(i); _exactDict.insert(temp,index); @@ -125,25 +125,25 @@ bool CompendiumData::load(KURL url) if(!temp.isEmpty() && temp.length() > 1) { // add to allDict - QValueList *indexList=_allDict[temp]; + TQValueList *indexList=_allDict[temp]; if(!indexList) { - indexList = new QValueList; + indexList = new TQValueList; _allDict.insert(temp,indexList); } indexList->append(i); // add to textonlyDict - QString temp1 = temp; + TQString temp1 = temp; temp1.remove( ' ' ); indexList=_textonlyDict[temp1]; if(!indexList) { - indexList = new QValueList; + indexList = new TQValueList; _textonlyDict.insert(temp1,indexList); kdDebug() << "Adding " << temp1 << endl; } @@ -151,8 +151,8 @@ bool CompendiumData::load(KURL url) indexList->append(i); // add to wordDict - QStringList wList = wordList(temp); - for ( QStringList::Iterator it = wList.begin() + TQStringList wList = wordList(temp); + for ( TQStringList::Iterator it = wList.begin() ; it != wList.end(); ++it ) { if( (*it).length() > 1) @@ -161,7 +161,7 @@ bool CompendiumData::load(KURL url) if(!indexList) { - indexList = new QValueList; + indexList = new TQValueList; _wordDict.insert(*it,indexList); } @@ -173,7 +173,7 @@ bool CompendiumData::load(KURL url) // remove words, that are too frequent uint max=_allDict.count()/10; - QDictIterator< QValueList > it(_wordDict); + TQDictIterator< TQValueList > it(_wordDict); while ( it.current() ) { if(it.current()->count() > max) @@ -198,34 +198,34 @@ bool CompendiumData::load(KURL url) return true; } -const int* CompendiumData::exactDict(const QString text) const +const int* CompendiumData::exactDict(const TQString text) const { return _exactDict[text]; } -const QValueList* CompendiumData::allDict(const QString text) const +const TQValueList* CompendiumData::allDict(const TQString text) const { return _allDict[text]; } -const QValueList* CompendiumData::wordDict(const QString text) const +const TQValueList* CompendiumData::wordDict(const TQString text) const { return _wordDict[text]; } -const QValueList* CompendiumData::textonlyDict(const QString text) const +const TQValueList* CompendiumData::textonlyDict(const TQString text) const { return _textonlyDict[text]; } -void CompendiumData::registerObject(QObject *obj) +void CompendiumData::registerObject(TQObject *obj) { if(!_registered.containsRef(obj)) _registered.append(obj); } -bool CompendiumData::unregisterObject(QObject *obj) +bool CompendiumData::unregisterObject(TQObject *obj) { _registered.removeRef(obj); @@ -237,9 +237,9 @@ bool CompendiumData::hasObjects() const return _registered.count()==0; } -QString CompendiumData::simplify(const QString string) +TQString CompendiumData::simplify(const TQString string) { - QString result; + TQString result; TagExtractor te; te.setString(string); @@ -251,11 +251,11 @@ QString CompendiumData::simplify(const QString string) return result; } -QStringList CompendiumData::wordList(const QString string) +TQStringList CompendiumData::wordList(const TQString string) { - QString result=CompendiumData::simplify(string); + TQString result=CompendiumData::simplify(string); - return QStringList::split(' ',result); + return TQStringList::split(' ',result); } #include "compendiumdata.moc" diff --git a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h index 2fec45cb..d5668b4a 100644 --- a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h +++ b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h @@ -35,11 +35,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace KBabel { @@ -51,38 +51,38 @@ class CompendiumData : public QObject Q_OBJECT public: - CompendiumData(QObject *parent=0); + CompendiumData(TQObject *parent=0); bool load(KURL url); const KBabel::Catalog *catalog() const { return _catalog; } - const int *exactDict(const QString text) const; - const QValueList *allDict(const QString text) const; - const QValueList *wordDict(const QString text) const; - const QValueList *textonlyDict(const QString text) const; + const int *exactDict(const TQString text) const; + const TQValueList *allDict(const TQString text) const; + const TQValueList *wordDict(const TQString text) const; + const TQValueList *textonlyDict(const TQString text) const; bool active() const { return _active; } bool initialized() const { return _initialized; } bool hasErrors() const { return _error; } - QString errorMsg() const { return _errorMsg; } + TQString errorMsg() const { return _errorMsg; } /** registers an object, that uses this data */ - void registerObject(QObject *); + void registerObject(TQObject *); /** * unregisters an object, that uses this data * * @return true, if this was the last object */ - bool unregisterObject(QObject *); + bool unregisterObject(TQObject *); bool hasObjects() const; - static QString simplify(const QString text); - static QStringList wordList(const QString text); + static TQString simplify(const TQString text); + static TQStringList wordList(const TQString text); signals: - void progressStarts(const QString); + void progressStarts(const TQString); void progressEnds(); void progress(int); @@ -91,15 +91,15 @@ private: bool _active; bool _error; bool _initialized; - QString _errorMsg; + TQString _errorMsg; KBabel::Catalog *_catalog; - QDict _exactDict; - QDict< QValueList > _allDict; - QDict< QValueList > _wordDict; - QDict< QValueList > _textonlyDict; + TQDict _exactDict; + TQDict< TQValueList > _allDict; + TQDict< TQValueList > _wordDict; + TQDict< TQValueList > _textonlyDict; - QPtrList _registered; + TQPtrList _registered; }; #endif diff --git a/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp b/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp index 882cc064..37ae63a4 100644 --- a/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp +++ b/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp @@ -54,7 +54,7 @@ KInstance *PcFactory::s_instance = 0; KAboutData *PcFactory::s_about = 0; -PcFactory::PcFactory( QObject *parent, const char *name) +PcFactory::PcFactory( TQObject *parent, const char *name) : KLibFactory(parent,name) { } @@ -75,10 +75,10 @@ PcFactory::~PcFactory() } -QObject *PcFactory::createObject( QObject *parent, const char *name - , const char *classname, const QStringList &) +TQObject *PcFactory::createObject( TQObject *parent, const char *name + , const char *classname, const TQStringList &) { - if(QCString(classname) != "SearchEngine") + if(TQCString(classname) != "SearchEngine") { kdError() << "not a SearchEngine requested" << endl; return 0; diff --git a/kbabel/kbabeldict/modules/pocompendium/pc_factory.h b/kbabel/kbabeldict/modules/pocompendium/pc_factory.h index d52fadfe..1b0b8820 100644 --- a/kbabel/kbabeldict/modules/pocompendium/pc_factory.h +++ b/kbabel/kbabeldict/modules/pocompendium/pc_factory.h @@ -43,12 +43,12 @@ class PcFactory : public KLibFactory { Q_OBJECT public: - PcFactory( QObject *parent=0, const char *name=0); + PcFactory( TQObject *parent=0, const char *name=0); ~PcFactory(); - virtual QObject *createObject( QObject *parent=0, const char *name=0 - , const char *classname="QObject" - , const QStringList &args = QStringList()); + virtual TQObject *createObject( TQObject *parent=0, const char *name=0 + , const char *classname="TQObject" + , const TQStringList &args = TQStringList()); static KInstance *instance(); diff --git a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp index 0cd79fb3..5220f88a 100644 --- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp +++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp @@ -41,9 +41,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "resources.h" #include "compendiumdata.h" @@ -60,10 +60,10 @@ using namespace KBabel; -static KStaticDeleter< QDict > compDataDeleter; -QDict *PoCompendium::_compDict = 0; +static KStaticDeleter< TQDict > compDataDeleter; +TQDict *PoCompendium::_compDict = 0; -PoCompendium::PoCompendium(QObject *parent, const char *name) +PoCompendium::PoCompendium(TQObject *parent, const char *name) : SearchEngine(parent, name) { prefWidget=0; @@ -87,8 +87,8 @@ PoCompendium::PoCompendium(QObject *parent, const char *name) matchWords=true; - loadTimer = new QTimer(this); - connect(loadTimer,SIGNAL(timeout()),this,SLOT(slotLoadCompendium())); + loadTimer = new TQTimer(this); + connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotLoadCompendium())); } PoCompendium::~PoCompendium() @@ -145,7 +145,7 @@ void PoCompendium::readSettings(KConfigBase *config) matchWords = config->readBoolEntry("MatchWords",true); matchNGram = config->readBoolEntry("MatchNGram",true); - QString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages"); + TQString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages"); if(!initialized) { url = newPath; @@ -160,13 +160,13 @@ void PoCompendium::readSettings(KConfigBase *config) restoreSettings(); } -PrefWidget *PoCompendium::preferencesWidget(QWidget *parent) +PrefWidget *PoCompendium::preferencesWidget(TQWidget *parent) { prefWidget = new CompendiumPreferencesWidget(parent,"pocompendium_prefwidget"); kdDebug(KBABEL_SEARCH) << "PreferencesWidget is " << prefWidget << endl; - connect(prefWidget, SIGNAL(applySettings()), this, SLOT(applySettings())); - connect(prefWidget, SIGNAL(restoreSettings()) - , this, SLOT(restoreSettings())); + connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings())); + connect(prefWidget, TQT_SIGNAL(restoreSettings()) + , this, TQT_SLOT(restoreSettings())); restoreSettings(); @@ -179,22 +179,22 @@ const KAboutData *PoCompendium::about() const } -QString PoCompendium::name() const +TQString PoCompendium::name() const { return i18n("PO Compendium"); } -QString PoCompendium::id() const +TQString PoCompendium::id() const { return "pocompendium"; } -QString PoCompendium::lastError() +TQString PoCompendium::lastError() { return errorMsg; } -bool PoCompendium::searchExact(const QString& text, uint pluralForm, QPtrList& results, QValueList& foundIndices, QValueList& ) +bool PoCompendium::searchExact(const TQString& text, uint pluralForm, TQPtrList& results, TQValueList& foundIndices, TQValueList& ) { const int *index = data->exactDict(text); if(index) @@ -222,14 +222,14 @@ bool PoCompendium::searchExact(const QString& text, uint pluralForm, QPtrList& results, QValueList& foundIndices, QValueList& ) +bool PoCompendium::searchCaseInsensitive(const TQString& text, uint pluralForm, TQPtrList& results, TQValueList& foundIndices, TQValueList& ) { - QString searchStr = text.lower(); + TQString searchStr = text.lower(); - const QValueList *indexList = data->allDict(text.lower()); + const TQValueList *indexList = data->allDict(text.lower()); if(indexList) { - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for( it = indexList->begin(); it != indexList->end(); ++it ) { if(foundIndices.contains(*it)) @@ -243,7 +243,7 @@ bool PoCompendium::searchCaseInsensitive(const QString& text, uint pluralForm, Q } - QString origStr = data->catalog()->msgid(*it).first(); + TQString origStr = data->catalog()->msgid(*it).first(); origStr = CompendiumData::simplify(origStr); @@ -276,16 +276,16 @@ bool PoCompendium::searchCaseInsensitive(const QString& text, uint pluralForm, Q return false; } -bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList& results, QValueList& foundIndices, QValueList& ) +bool PoCompendium::searchTextOnly(const TQString& text, uint pluralForm, TQPtrList& results, TQValueList& foundIndices, TQValueList& ) { - QString searchStr = text.lower(); - QString t = text; + TQString searchStr = text.lower(); + TQString t = text; t.remove( " " ); - const QValueList *indexList = data->textonlyDict(t.lower()); + const TQValueList *indexList = data->textonlyDict(t.lower()); if(indexList) { - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for( it = indexList->begin(); it != indexList->end(); ++it ) { if(foundIndices.contains(*it)) @@ -299,7 +299,7 @@ bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList } - QString origStr = data->catalog()->msgid(*it).first(); + TQString origStr = data->catalog()->msgid(*it).first(); origStr = CompendiumData::simplify(origStr); @@ -325,22 +325,22 @@ bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList return false; } -bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrList& results, QValueList& foundIndices, QValueList& checkedIndices ) +bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtrList& results, TQValueList& foundIndices, TQValueList& checkedIndices ) { uint checkCounter = 0; bool foundResults = false; - QStringList wList = CompendiumData::wordList(searchStr); - for ( QStringList::Iterator wit = wList.begin() + TQStringList wList = CompendiumData::wordList(searchStr); + for ( TQStringList::Iterator wit = wList.begin() ; wit != wList.end(); ++wit ) { if(stop) break; - const QValueList *indexList = data->wordDict((*wit).lower()); + const TQValueList *indexList = data->wordDict((*wit).lower()); if(indexList) { - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for( it = indexList->begin(); it != indexList->end(); ++it ) { if(stop) @@ -371,7 +371,7 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi kapp->processEvents(100); - QString origStr = data->catalog()->msgid(*it).first(); + TQString origStr = data->catalog()->msgid(*it).first(); origStr = CompendiumData::simplify(origStr); @@ -389,8 +389,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi } else { - QString s=*wit; - QString o=origStr; + TQString s=*wit; + TQString o=origStr; if(wholeWords) { @@ -421,8 +421,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi if(!found && matchContains && !wholeWords) { - QString s=maskString(searchStr); - QRegExp searchReg(s); + TQString s=maskString(searchStr); + TQRegExp searchReg(s); if(searchReg.search(origStr) >= 0) found=true; @@ -430,8 +430,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi if(!found && matchIsContained && !wholeWords) { - QString s=maskString(origStr); - QRegExp reg(s); + TQString s=maskString(origStr); + TQRegExp reg(s); if(reg.search(searchStr) >= 0) { @@ -440,13 +440,13 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi } if(!found && matchWords && !wholeWords) { - QStringList list = CompendiumData::wordList(searchStr); + TQStringList list = CompendiumData::wordList(searchStr); - for ( QStringList::Iterator wit2 = list.begin() + for ( TQStringList::Iterator wit2 = list.begin() ; wit2 != list.end(); ++wit2 ) { - QString s=maskString(*wit2); - QRegExp reg(s); + TQString s=maskString(*wit2); + TQRegExp reg(s); if(reg.search(origStr) >= 0) { @@ -483,15 +483,15 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi return foundResults; } -bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrList& results, QValueList& foundIndices, QValueList& checkedIndices ) +bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtrList& results, TQValueList& foundIndices, TQValueList& checkedIndices ) { uint checkCounter = 0; bool foundResults = false; - QRegExp searchReg; + TQRegExp searchReg; if(matchContains) { - QString s=maskString(searchStr); + TQString s=maskString(searchStr); searchReg.setPattern(s); } @@ -539,7 +539,7 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi kapp->processEvents(100); - QString origStr = data->catalog()->msgid(i).first(); + TQString origStr = data->catalog()->msgid(i).first(); origStr = CompendiumData::simplify(origStr); if(!caseSensitive) @@ -564,8 +564,8 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi if(!found && matchIsContained) { - QString s=maskString(origStr); - QRegExp reg(s); + TQString s=maskString(origStr); + TQRegExp reg(s); if(reg.search(searchStr) >= 0) { @@ -575,19 +575,19 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi if(!found && matchWords) { - QStringList list = CompendiumData::wordList(searchStr); + TQStringList list = CompendiumData::wordList(searchStr); - for ( QStringList::Iterator wit2 = list.begin() + for ( TQStringList::Iterator wit2 = list.begin() ; wit2 != list.end(); ++wit2 ) { - QString s=maskString(*wit2); + TQString s=maskString(*wit2); if(wholeWords) { origStr = " "+origStr+" "; s=" "+s+" "; } - QRegExp reg(s); + TQRegExp reg(s); if(reg.search(origStr) >= 0) { @@ -632,7 +632,7 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi return foundResults; } -bool PoCompendium::startSearch(const QString& text, uint pluralForm, const SearchFilter* filter) +bool PoCompendium::startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter) { if(autoUpdate && prefWidget && prefWidget->settingsChanged()) { @@ -669,13 +669,13 @@ bool PoCompendium::startSearch(const QString& text, uint pluralForm, const Searc emit started(); - QValueList foundIndices; - QValueList checkedIndices; + TQValueList foundIndices; + TQValueList checkedIndices; // first, exact search searchExact(text, pluralForm, results, foundIndices, checkedIndices); - QString searchStr=CompendiumData::simplify(text); + TQString searchStr=CompendiumData::simplify(text); if(!caseSensitive) @@ -738,7 +738,7 @@ void PoCompendium::applySettings() bool needLoading=false; - QString newPath = prefWidget->url(); + TQString newPath = prefWidget->url(); if(!initialized) { url = newPath; @@ -795,7 +795,7 @@ void PoCompendium::slotLoadCompendium() } - QString path=url; + TQString path=url; if(path.contains("@LANG@")) { @@ -828,7 +828,7 @@ void PoCompendium::slotLoadCompendium() } else { - connect(data, SIGNAL(progressEnds()), this, SLOT(recheckData())); + connect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData())); } } else @@ -847,7 +847,7 @@ void PoCompendium::recheckData() { if(data) { - disconnect(data, SIGNAL(progressEnds()), this, SLOT(recheckData())); + disconnect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData())); error = data->hasErrors(); errorMsg = data->errorMsg(); @@ -864,7 +864,7 @@ void PoCompendium::recheckData() loading=false; } -QString PoCompendium::maskString(QString s) +TQString PoCompendium::maskString(TQString s) { s.replace("\\","\\\\"); s.replace("\?","\\?"); @@ -883,7 +883,7 @@ QString PoCompendium::maskString(QString s) return s; } -void PoCompendium::addResult(SearchResult *result, QPtrList& res) +void PoCompendium::addResult(SearchResult *result, TQPtrList& res) { if(res.last() && res.last()->score >= result->score) { @@ -915,7 +915,7 @@ void PoCompendium::addResult(SearchResult *result, QPtrList& res) } -void PoCompendium::setLanguageCode(const QString& lang) +void PoCompendium::setLanguageCode(const TQString& lang) { if(initialized && url.contains("@LANG@") && lang!=langCode && !loadTimer->isActive() ) @@ -926,7 +926,7 @@ void PoCompendium::setLanguageCode(const QString& lang) langCode=lang; } -QString PoCompendium::translate(const QString& text, uint pluralForm) +TQString PoCompendium::translate(const TQString& text, uint pluralForm) { if(!initialized) { @@ -938,7 +938,7 @@ QString PoCompendium::translate(const QString& text, uint pluralForm) if(error || !data || data->active()) { - return QString::null; + return TQString::null; } @@ -950,10 +950,10 @@ QString PoCompendium::translate(const QString& text, uint pluralForm) return data->catalog()->msgstr(*index).first(); } - return QString::null; + return TQString::null; } -QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const uint pluralForm) +TQString PoCompendium::fuzzyTranslation(const TQString& text, int &score, const uint pluralForm) { if(!initialized) { @@ -965,7 +965,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui if(error || !data || data->active()) { - return QString::null; + return TQString::null; } // try to find fuzzy string @@ -976,7 +976,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui int best_match = 0; int total = data->catalog()->numberOfEntries(); - QString searchStr = CompendiumData::simplify(text); + TQString searchStr = CompendiumData::simplify(text); //kdDebug(750) << "find best match for " << searchStr << endl; @@ -1004,7 +1004,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui } // get a message from the catalog FIXME: plurals - QString origStr = data->catalog()->msgid(i).first(); + TQString origStr = data->catalog()->msgid(i).first(); origStr = CompendiumData::simplify(origStr); // don't match too long strings for short search string @@ -1029,11 +1029,11 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui return data->catalog()->msgstr(best_matching).first(); } - return QString::null; + return TQString::null; } -QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint pluralForm) +TQString PoCompendium::searchTranslation(const TQString& text, int &sc, const uint pluralForm) { if(autoUpdate && prefWidget && prefWidget->settingsChanged()) { @@ -1041,7 +1041,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint } if(isSearching()) - return QString::null; + return TQString::null; clearResults(); stop = false; @@ -1058,21 +1058,21 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint if(error || !data) { active = false; - return QString::null; + return TQString::null; } if(data->active()) { active = false; - return QString::null; + return TQString::null; } emit started(); - QPtrList res; + TQPtrList res; - QValueList foundIndices; - QValueList checkedIndices; + TQValueList foundIndices; + TQValueList checkedIndices; // first, exact search if( searchExact(text, pluralForm, res, foundIndices, checkedIndices) ) @@ -1086,7 +1086,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint return res.first()->translation; } - QString searchStr=CompendiumData::simplify(text); + TQString searchStr=CompendiumData::simplify(text); if(!caseSensitive) @@ -1107,7 +1107,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint } // search without whitespace - QString s = searchStr; + TQString s = searchStr; s.remove( ' ' ); if( searchTextOnly(s, pluralForm, res, foundIndices, checkedIndices) ) { @@ -1145,7 +1145,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint sc = 0; - return QString::null; + return TQString::null; } @@ -1153,14 +1153,14 @@ void PoCompendium::unregisterData() { if(data) { - disconnect(data, SIGNAL(progressStarts(const QString&)), this - , SIGNAL(progressStarts(const QString&))); - disconnect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds())); - disconnect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int))); + disconnect(data, TQT_SIGNAL(progressStarts(const TQString&)), this + , TQT_SIGNAL(progressStarts(const TQString&))); + disconnect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds())); + disconnect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int))); if(data->active()) { - disconnect(data,SIGNAL(progressEnds()),this,SLOT(recheckData())); + disconnect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(recheckData())); } if(data->unregisterObject(this)) @@ -1171,7 +1171,7 @@ void PoCompendium::unregisterData() } else { - connect(data,SIGNAL(progressEnds()),this,SLOT(removeData())); + connect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(removeData())); } } @@ -1195,22 +1195,22 @@ void PoCompendium::registerData() emit progressStarts(i18n("Loading PO compendium")); } - connect(data, SIGNAL( - progressStarts(const QString&)), this - , SIGNAL(progressStarts(const QString&))); - connect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds())); - connect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int))); + connect(data, TQT_SIGNAL( + progressStarts(const TQString&)), this + , TQT_SIGNAL(progressStarts(const TQString&))); + connect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds())); + connect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int))); } void PoCompendium::removeData() { - const QObject *s=sender(); + const TQObject *s=sender(); if(s && s->inherits("CompendiumData")) { const CompendiumData *d=static_cast(s); if(d) { - QDictIterator it(*compendiumDict()); + TQDictIterator it(*compendiumDict()); while(it.current()) { if(it.current() == d) @@ -1230,11 +1230,11 @@ void PoCompendium::removeData() } } -QDict *PoCompendium::compendiumDict() +TQDict *PoCompendium::compendiumDict() { if(!_compDict) { - _compDict=compDataDeleter.setObject( new QDict ); + _compDict=compDataDeleter.setObject( new TQDict ); _compDict->setAutoDelete(true); } diff --git a/kbabel/kbabeldict/modules/pocompendium/pocompendium.h b/kbabel/kbabeldict/modules/pocompendium/pocompendium.h index 6d92fb58..d96774e9 100644 --- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.h +++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.h @@ -39,10 +39,10 @@ #include "compendiumdata.h" #include "searchengine.h" -#include -#include -#include -#include +#include +#include +#include +#include class CompendiumPreferencesWidget; class KConfigBase; @@ -53,35 +53,35 @@ class PoCompendium : public SearchEngine Q_OBJECT public: - PoCompendium(QObject *parent=0, const char *name=0); + PoCompendium(TQObject *parent=0, const char *name=0); virtual ~PoCompendium(); virtual bool isReady() const; - virtual QString translate(const QString&text, uint pluralForm); - virtual QString searchTranslation(const QString&, int &score, const uint pluralForm); - virtual QString fuzzyTranslation(const QString&, int &score, const uint pluralForm); + virtual TQString translate(const TQString&text, uint pluralForm); + virtual TQString searchTranslation(const TQString&, int &score, const uint pluralForm); + virtual TQString fuzzyTranslation(const TQString&, int &score, const uint pluralForm); virtual bool isSearching() const; virtual void saveSettings(KConfigBase *config); virtual void readSettings(KConfigBase *config); - virtual PrefWidget *preferencesWidget(QWidget *parent); + virtual PrefWidget *preferencesWidget(TQWidget *parent); virtual const KAboutData *about() const; - virtual QString name() const; + virtual TQString name() const; - virtual QString id() const; + virtual TQString id() const; - virtual QString lastError(); + virtual TQString lastError(); public slots: - virtual bool startSearch(const QString& s, uint pluralForm = 0, const SearchFilter* filter = 0); + virtual bool startSearch(const TQString& s, uint pluralForm = 0, const SearchFilter* filter = 0); virtual void stopSearch(); - virtual void setLanguageCode(const QString& lang); + virtual void setLanguageCode(const TQString& lang); protected slots: /** reads the current settings from the preferences dialog */ @@ -97,27 +97,27 @@ protected slots: protected: void loadCompendium(); - void addResult(SearchResult *, QPtrList& allResults); - QString maskString(QString string); + void addResult(SearchResult *, TQPtrList& allResults); + TQString maskString(TQString string); void registerData(); void unregisterData(); - bool searchExact(const QString& searchString, uint pluralForm, QPtrList& results, QValueList& foundIndices, QValueList& checkedIndices ); - bool searchTextOnly(const QString& searchString, uint pluralForm, QPtrList& results, QValueList& foundIndices, QValueList& checkedIndices ); - bool searchCaseInsensitive(const QString& searchString, uint pluralForm, QPtrList& results, QValueList& foundIndices, QValueList& checkedIndices ); - bool searchWords(const QString& searchString, uint pluralForm, QPtrList& results, QValueList& foundIndices, QValueList& checkedIndices ); - bool searchNGram(const QString& searchString, uint pluralForm, QPtrList& results, QValueList& foundIndices, QValueList& checkedIndices ); + bool searchExact(const TQString& searchString, uint pluralForm, TQPtrList& results, TQValueList& foundIndices, TQValueList& checkedIndices ); + bool searchTextOnly(const TQString& searchString, uint pluralForm, TQPtrList& results, TQValueList& foundIndices, TQValueList& checkedIndices ); + bool searchCaseInsensitive(const TQString& searchString, uint pluralForm, TQPtrList& results, TQValueList& foundIndices, TQValueList& checkedIndices ); + bool searchWords(const TQString& searchString, uint pluralForm, TQPtrList& results, TQValueList& foundIndices, TQValueList& checkedIndices ); + bool searchNGram(const TQString& searchString, uint pluralForm, TQPtrList& results, TQValueList& foundIndices, TQValueList& checkedIndices ); private: - QGuardedPtr prefWidget; + TQGuardedPtr prefWidget; CompendiumData *data; KBabel::PoInfo catalogInfo; - QTimer *loadTimer; + TQTimer *loadTimer; - QString url; - QString realURL; - QString langCode; + TQString url; + TQString realURL; + TQString langCode; bool caseSensitive; bool ignoreFuzzy; @@ -133,15 +133,15 @@ private: uint freeMemDelay; bool error; - QString errorMsg; + TQString errorMsg; bool stop; bool active; bool initialized; bool loading; - static QDict *_compDict; - static QDict *compendiumDict(); + static TQDict *_compDict; + static TQDict *compendiumDict(); }; #endif diff --git a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp index c3ce730d..1f3a8b37 100644 --- a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp +++ b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp @@ -30,13 +30,13 @@ your version. **************************************************************************** */ -#include -#include -#include +#include +#include +#include #include -#include -#include +#include +#include #include #include #include @@ -44,72 +44,72 @@ #include "preferenceswidget.h" #include "pwidget.h" -CompendiumPreferencesWidget::CompendiumPreferencesWidget(QWidget *parent, const char* name) +CompendiumPreferencesWidget::CompendiumPreferencesWidget(TQWidget *parent, const char* name) : PrefWidget(parent,name) , changed(false) { - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); prefWidget = new CompendiumPWidget(this); layout->addWidget(prefWidget); - connect(prefWidget->caseBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->equalBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->ngramBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->containsBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->fuzzyBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->wholeBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); + connect(prefWidget->caseBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->fuzzyBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->wholeBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); - connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&)) - , this, SLOT(setChanged())); - - connect(prefWidget->equalBtn, SIGNAL(toggled(bool)) - , this, SLOT(equalBtnToggled(bool))); - connect(prefWidget->ngramBtn, SIGNAL(toggled(bool)) - , this, SLOT(ngramBtnToggled(bool))); - connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool)) - , this, SLOT(isContainedBtnToggled(bool))); - connect(prefWidget->containsBtn, SIGNAL(toggled(bool)) - , this, SLOT(containsBtnToggled(bool))); - connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool)) - , this, SLOT(hasWordBtnToggled(bool))); - - - QString whatsthis=i18n("

          Parameters

          " + connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&)) + , this, TQT_SLOT(setChanged())); + + connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(equalBtnToggled(bool))); + connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(ngramBtnToggled(bool))); + connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(isContainedBtnToggled(bool))); + connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(containsBtnToggled(bool))); + connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(hasWordBtnToggled(bool))); + + + TQString whatsthis=i18n("

          Parameters

          " "

          Here you can fine-tune searching within the PO file. " "For example if you want to perform a case sensitive search, or if " "you want fuzzy messages to be ignored.

          " ); - QWhatsThis::add(prefWidget->caseBtn,whatsthis); - QWhatsThis::add(prefWidget->fuzzyBtn,whatsthis); - QWhatsThis::add(prefWidget->wholeBtn,whatsthis); + TQWhatsThis::add(prefWidget->caseBtn,whatsthis); + TQWhatsThis::add(prefWidget->fuzzyBtn,whatsthis); + TQWhatsThis::add(prefWidget->wholeBtn,whatsthis); whatsthis = i18n("

          Comparison Options

          " "

          Choose here which messages you want to have treated as a matching " "message.

          "); - QWhatsThis::add(prefWidget->equalBtn,whatsthis); - QWhatsThis::add(prefWidget->containsBtn,whatsthis); - QWhatsThis::add(prefWidget->isContainedBtn,whatsthis); - QWhatsThis::add(prefWidget->hasWordBtn,whatsthis); + TQWhatsThis::add(prefWidget->equalBtn,whatsthis); + TQWhatsThis::add(prefWidget->containsBtn,whatsthis); + TQWhatsThis::add(prefWidget->isContainedBtn,whatsthis); + TQWhatsThis::add(prefWidget->hasWordBtn,whatsthis); whatsthis = i18n("

          3-Gram-matching

          " "

          A message matches another if most of its 3-letter groups are " "contained in the other message. e.g. 'abc123' matches 'abcx123c12'.

          "); - QWhatsThis::add(prefWidget->ngramBtn,whatsthis); + TQWhatsThis::add(prefWidget->ngramBtn,whatsthis); whatsthis = i18n("

          Location

          " "

          Configure here which file is to be used for searching." "

          "); - QWhatsThis::add(prefWidget->urlInput,whatsthis); + TQWhatsThis::add(prefWidget->urlInput,whatsthis); } CompendiumPreferencesWidget::~CompendiumPreferencesWidget() @@ -143,7 +143,7 @@ void CompendiumPreferencesWidget::standard() changed=true; } -void CompendiumPreferencesWidget::setURL(const QString url) +void CompendiumPreferencesWidget::setURL(const TQString url) { prefWidget->urlInput->setURL(url); changed=false; @@ -200,7 +200,7 @@ void CompendiumPreferencesWidget::setMatchWords(bool on) -QString CompendiumPreferencesWidget::url() +TQString CompendiumPreferencesWidget::url() { changed=false; return prefWidget->urlInput->url(); diff --git a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h index db70df4d..3a22bc31 100644 --- a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h +++ b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h @@ -44,14 +44,14 @@ class CompendiumPreferencesWidget : public PrefWidget Q_OBJECT public: - CompendiumPreferencesWidget(QWidget *parent=0, const char* name=0); + CompendiumPreferencesWidget(TQWidget *parent=0, const char* name=0); virtual ~CompendiumPreferencesWidget(); virtual void apply(); virtual void cancel(); virtual void standard(); - void setURL(const QString url); + void setURL(const TQString url); void setMatchEqual(bool); void setMatchNGram(bool); void setMatchIsContained(bool); @@ -61,7 +61,7 @@ public: void setWholeWords(bool); void setCaseSensitive(bool); - QString url(); + TQString url(); bool matchEqual(); bool matchNGram(); bool matchIsContained(); diff --git a/kbabel/kbabeldict/modules/tmx/pc_factory.cpp b/kbabel/kbabeldict/modules/tmx/pc_factory.cpp index a3dcfdf9..eaea5194 100644 --- a/kbabel/kbabeldict/modules/tmx/pc_factory.cpp +++ b/kbabel/kbabeldict/modules/tmx/pc_factory.cpp @@ -54,7 +54,7 @@ KInstance *PcFactory::s_instance = 0; KAboutData *PcFactory::s_about = 0; -PcFactory::PcFactory( QObject *parent, const char *name) +PcFactory::PcFactory( TQObject *parent, const char *name) : KLibFactory(parent,name) { } @@ -75,10 +75,10 @@ PcFactory::~PcFactory() } -QObject *PcFactory::createObject( QObject *parent, const char *name - , const char *classname, const QStringList &) +TQObject *PcFactory::createObject( TQObject *parent, const char *name + , const char *classname, const TQStringList &) { - if(QCString(classname) != "SearchEngine") + if(TQCString(classname) != "SearchEngine") { kdError() << "not a SearchEngine requested" << endl; return 0; diff --git a/kbabel/kbabeldict/modules/tmx/pc_factory.h b/kbabel/kbabeldict/modules/tmx/pc_factory.h index 5ef08277..74739e0a 100644 --- a/kbabel/kbabeldict/modules/tmx/pc_factory.h +++ b/kbabel/kbabeldict/modules/tmx/pc_factory.h @@ -45,12 +45,12 @@ class PcFactory : public KLibFactory { Q_OBJECT public: - PcFactory( QObject *parent=0, const char *name=0); + PcFactory( TQObject *parent=0, const char *name=0); ~PcFactory(); - virtual QObject *createObject( QObject *parent=0, const char *name=0 - , const char *classname="QObject" - , const QStringList &args = QStringList()); + virtual TQObject *createObject( TQObject *parent=0, const char *name=0 + , const char *classname="TQObject" + , const TQStringList &args = TQStringList()); static KInstance *instance(); diff --git a/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp b/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp index 1202496d..85d38294 100644 --- a/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp +++ b/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp @@ -32,13 +32,13 @@ your version. **************************************************************************** */ -#include -#include -#include +#include +#include +#include #include -#include -#include +#include +#include #include #include #include @@ -46,68 +46,68 @@ #include "preferenceswidget.h" #include "pwidget.h" -TmxCompendiumPreferencesWidget::TmxCompendiumPreferencesWidget(QWidget *parent, const char* name) +TmxCompendiumPreferencesWidget::TmxCompendiumPreferencesWidget(TQWidget *parent, const char* name) : PrefWidget(parent,name) , changed(false) { - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); prefWidget = new TmxCompendiumPWidget(this); layout->addWidget(prefWidget); - connect(prefWidget->caseBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->equalBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->ngramBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->containsBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); - connect(prefWidget->wholeBtn, SIGNAL(toggled(bool)) - , this, SLOT(setChanged())); + connect(prefWidget->caseBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); + connect(prefWidget->wholeBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(setChanged())); - connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&)) - , this, SLOT(setChanged())); - - connect(prefWidget->equalBtn, SIGNAL(toggled(bool)) - , this, SLOT(equalBtnToggled(bool))); - connect(prefWidget->ngramBtn, SIGNAL(toggled(bool)) - , this, SLOT(ngramBtnToggled(bool))); - connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool)) - , this, SLOT(isContainedBtnToggled(bool))); - connect(prefWidget->containsBtn, SIGNAL(toggled(bool)) - , this, SLOT(containsBtnToggled(bool))); - connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool)) - , this, SLOT(hasWordBtnToggled(bool))); - - - QString whatsthis=i18n("

          Parameters

          " + connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&)) + , this, TQT_SLOT(setChanged())); + + connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(equalBtnToggled(bool))); + connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(ngramBtnToggled(bool))); + connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(isContainedBtnToggled(bool))); + connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(containsBtnToggled(bool))); + connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool)) + , this, TQT_SLOT(hasWordBtnToggled(bool))); + + + TQString whatsthis=i18n("

          Parameters

          " "

          Here you can fine-tune searching within the PO file. " "For example, if you want to perform a case sensitive search.

          " ); - QWhatsThis::add(prefWidget->caseBtn,whatsthis); - QWhatsThis::add(prefWidget->wholeBtn,whatsthis); + TQWhatsThis::add(prefWidget->caseBtn,whatsthis); + TQWhatsThis::add(prefWidget->wholeBtn,whatsthis); whatsthis = i18n("

          Comparison Options

          " "

          Choose here which messages you want to have treated as a matching " "message.

          "); - QWhatsThis::add(prefWidget->equalBtn,whatsthis); - QWhatsThis::add(prefWidget->containsBtn,whatsthis); - QWhatsThis::add(prefWidget->isContainedBtn,whatsthis); - QWhatsThis::add(prefWidget->hasWordBtn,whatsthis); + TQWhatsThis::add(prefWidget->equalBtn,whatsthis); + TQWhatsThis::add(prefWidget->containsBtn,whatsthis); + TQWhatsThis::add(prefWidget->isContainedBtn,whatsthis); + TQWhatsThis::add(prefWidget->hasWordBtn,whatsthis); whatsthis = i18n("

          3-Gram-matching

          " "

          A message matches another if most of its 3-letter groups are " "contained in the other message. e.g. 'abc123' matches 'abcx123c12'.

          "); - QWhatsThis::add(prefWidget->ngramBtn,whatsthis); + TQWhatsThis::add(prefWidget->ngramBtn,whatsthis); whatsthis = i18n("

          Location

          " "

          Configure here which file is to be used for searching." "

          "); - QWhatsThis::add(prefWidget->urlInput,whatsthis); + TQWhatsThis::add(prefWidget->urlInput,whatsthis); } TmxCompendiumPreferencesWidget::~TmxCompendiumPreferencesWidget() @@ -139,7 +139,7 @@ void TmxCompendiumPreferencesWidget::standard() changed=true; } -void TmxCompendiumPreferencesWidget::setURL(const QString url) +void TmxCompendiumPreferencesWidget::setURL(const TQString url) { prefWidget->urlInput->setURL(url); changed=false; @@ -190,7 +190,7 @@ void TmxCompendiumPreferencesWidget::setMatchWords(bool on) -QString TmxCompendiumPreferencesWidget::url() +TQString TmxCompendiumPreferencesWidget::url() { changed=false; return prefWidget->urlInput->url(); diff --git a/kbabel/kbabeldict/modules/tmx/preferenceswidget.h b/kbabel/kbabeldict/modules/tmx/preferenceswidget.h index c8356c3d..e2a4b900 100644 --- a/kbabel/kbabeldict/modules/tmx/preferenceswidget.h +++ b/kbabel/kbabeldict/modules/tmx/preferenceswidget.h @@ -46,14 +46,14 @@ class TmxCompendiumPreferencesWidget : public PrefWidget Q_OBJECT public: - TmxCompendiumPreferencesWidget(QWidget *parent=0, const char* name=0); + TmxCompendiumPreferencesWidget(TQWidget *parent=0, const char* name=0); virtual ~TmxCompendiumPreferencesWidget(); virtual void apply(); virtual void cancel(); virtual void standard(); - void setURL(const QString url); + void setURL(const TQString url); void setMatchEqual(bool); void setMatchNGram(bool); void setMatchIsContained(bool); @@ -62,7 +62,7 @@ public: void setWholeWords(bool); void setCaseSensitive(bool); - QString url(); + TQString url(); bool matchEqual(); bool matchNGram(); bool matchIsContained(); diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp index 152bc536..415992bf 100644 --- a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp +++ b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp @@ -41,8 +41,8 @@ #include #include -#include -#include +#include +#include #include "tmxcompendiumdata.h" #include "tmxcompendium.h" @@ -55,10 +55,10 @@ #define NGRAM_LEN 3 #define LIM_NGRAM 50 -static KStaticDeleter< QDict > compDataDeleter; -QDict *TmxCompendium::_compDict = 0; +static KStaticDeleter< TQDict > compDataDeleter; +TQDict *TmxCompendium::_compDict = 0; -TmxCompendium::TmxCompendium(QObject *parent, const char *name) +TmxCompendium::TmxCompendium(TQObject *parent, const char *name) : SearchEngine(parent, name) { prefWidget=0; @@ -81,8 +81,8 @@ TmxCompendium::TmxCompendium(QObject *parent, const char *name) matchWords=true; - loadTimer = new QTimer(this); - connect(loadTimer,SIGNAL(timeout()),this,SLOT(slotLoadCompendium())); + loadTimer = new TQTimer(this); + connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotLoadCompendium())); } TmxCompendium::~TmxCompendium() @@ -137,7 +137,7 @@ void TmxCompendium::readSettings(KConfigBase *config) matchWords = config->readBoolEntry("MatchWords",true); matchNGram = config->readBoolEntry("MatchNGram",true); - QString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages"); + TQString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages"); if(!initialized) { url = newPath; @@ -152,12 +152,12 @@ void TmxCompendium::readSettings(KConfigBase *config) restoreSettings(); } -PrefWidget *TmxCompendium::preferencesWidget(QWidget *parent) +PrefWidget *TmxCompendium::preferencesWidget(TQWidget *parent) { prefWidget = new TmxCompendiumPreferencesWidget(parent,"tmxcompendium_prefwidget"); - connect(prefWidget, SIGNAL(applySettings()), this, SLOT(applySettings())); - connect(prefWidget, SIGNAL(restoreSettings()) - , this, SLOT(restoreSettings())); + connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings())); + connect(prefWidget, TQT_SIGNAL(restoreSettings()) + , this, TQT_SLOT(restoreSettings())); restoreSettings(); @@ -170,23 +170,23 @@ const KAboutData *TmxCompendium::about() const } -QString TmxCompendium::name() const +TQString TmxCompendium::name() const { return i18n("TMX Compendium"); } -QString TmxCompendium::id() const +TQString TmxCompendium::id() const { return "tmxcompendium"; } -QString TmxCompendium::lastError() +TQString TmxCompendium::lastError() { return errorMsg; } -bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const SearchFilter*) +bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const SearchFilter*) { if(autoUpdate && prefWidget && prefWidget->settingsChanged()) { @@ -223,8 +223,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear emit started(); - QValueList foundIndices; - QValueList checkedIndices; + TQValueList foundIndices; + TQValueList checkedIndices; uint checkCounter=0; const int *index = data->exactDict(text); @@ -240,8 +240,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear TranslationInfo *info = new TranslationInfo; info->location = directory(realURL,0); - info->translator = QString::null; - info->description = QString::null; + info->translator = TQString::null; + info->description = TQString::null; result->descriptions.append(info); results.append(result); @@ -250,7 +250,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear emit resultFound(result); } - QString searchStr=TmxCompendiumData::simplify(text); + TQString searchStr=TmxCompendiumData::simplify(text); if(!caseSensitive) @@ -258,13 +258,13 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear searchStr = searchStr.lower(); } - QString temp = searchStr; + TQString temp = searchStr; temp = temp.lower(); - const QValueList *indexList = data->allDict(temp); + const TQValueList *indexList = data->allDict(temp); if(indexList) { - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for( it = indexList->begin(); it != indexList->end(); ++it ) { if(foundIndices.contains(*it)) @@ -272,7 +272,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear continue; } - QString origStr = data->msgid(*it); + TQString origStr = data->msgid(*it); origStr = TmxCompendiumData::simplify(origStr); @@ -294,8 +294,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear TranslationInfo *info = new TranslationInfo; info->location = directory(realURL,0); - info->translator = QString::null; - info->description = QString::null; + info->translator = TQString::null; + info->description = TQString::null; result->descriptions.append(info); addResult(result); @@ -303,8 +303,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear } } - QStringList wList = TmxCompendiumData::wordList(searchStr); - for ( QStringList::Iterator wit = wList.begin() + TQStringList wList = TmxCompendiumData::wordList(searchStr); + for ( TQStringList::Iterator wit = wList.begin() ; wit != wList.end(); ++wit ) { if(stop) @@ -313,7 +313,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear indexList = data->wordDict((*wit).lower()); if(indexList) { - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for( it = indexList->begin(); it != indexList->end(); ++it ) { if(stop) @@ -339,7 +339,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear kapp->processEvents(100); - QString origStr = data->msgid(*it); + TQString origStr = data->msgid(*it); origStr = TmxCompendiumData::simplify(origStr); @@ -357,8 +357,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear } else { - QString s=*wit; - QString o=origStr; + TQString s=*wit; + TQString o=origStr; if(wholeWords) { @@ -389,8 +389,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear if(!found && matchContains && !wholeWords) { - QString s=maskString(searchStr); - QRegExp searchReg(s); + TQString s=maskString(searchStr); + TQRegExp searchReg(s); if(searchReg.search(origStr) >= 0) found=true; @@ -398,8 +398,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear if(!found && matchIsContained && !wholeWords) { - QString s=maskString(origStr); - QRegExp reg(s); + TQString s=maskString(origStr); + TQRegExp reg(s); if(reg.search(searchStr) >= 0) { @@ -408,13 +408,13 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear } if(!found && matchWords && !wholeWords) { - QStringList list = TmxCompendiumData::wordList(searchStr); + TQStringList list = TmxCompendiumData::wordList(searchStr); - for ( QStringList::Iterator wit2 = list.begin() + for ( TQStringList::Iterator wit2 = list.begin() ; wit2 != list.end(); ++wit2 ) { - QString s=maskString(*wit2); - QRegExp reg(s); + TQString s=maskString(*wit2); + TQRegExp reg(s); if(reg.search(origStr) >= 0) { @@ -436,8 +436,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear TranslationInfo *info = new TranslationInfo; info->location = directory(realURL,0); - info->translator = QString::null; - info->description = QString::null; + info->translator = TQString::null; + info->description = TQString::null; result->descriptions.append(info); addResult(result); @@ -451,10 +451,10 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear (!wholeWords && (matchContains || matchIsContained || matchWords)) ) { - QRegExp searchReg; + TQRegExp searchReg; if(matchContains) { - QString s=maskString(searchStr); + TQString s=maskString(searchStr); searchReg.setPattern(s); } @@ -497,7 +497,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear emit progress( (100*(checkCounter+1))/data->numberOfEntries()); } - QString origStr = data->msgid(i); + TQString origStr = data->msgid(i); origStr = TmxCompendiumData::simplify(origStr); if(!caseSensitive) @@ -523,8 +523,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear if(!found && matchIsContained) { - QString s=maskString(origStr); - QRegExp reg(s); + TQString s=maskString(origStr); + TQRegExp reg(s); if(reg.search(searchStr) >= 0) { @@ -533,19 +533,19 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear } if(!found && matchWords) { - QStringList list = TmxCompendiumData::wordList(searchStr); + TQStringList list = TmxCompendiumData::wordList(searchStr); - for ( QStringList::Iterator wit2 = list.begin() + for ( TQStringList::Iterator wit2 = list.begin() ; wit2 != list.end(); ++wit2 ) { - QString s=maskString(*wit2); + TQString s=maskString(*wit2); if(wholeWords) { origStr = " "+origStr+" "; s=" "+s+" "; } - QRegExp reg(s); + TQRegExp reg(s); if(reg.search(origStr) >= 0) { @@ -577,8 +577,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear TranslationInfo *info = new TranslationInfo; info->location = directory(realURL,0); - info->translator = QString::null; - info->description = QString::null; + info->translator = TQString::null; + info->description = TQString::null; result->descriptions.append(info); addResult(result); @@ -629,7 +629,7 @@ void TmxCompendium::applySettings() bool needLoading=false; - QString newPath = prefWidget->url(); + TQString newPath = prefWidget->url(); if(!initialized) { url = newPath; @@ -685,7 +685,7 @@ void TmxCompendium::slotLoadCompendium() } - QString path=url; + TQString path=url; if(path.contains("@LANG@")) { @@ -718,7 +718,7 @@ void TmxCompendium::slotLoadCompendium() } else { - connect(data, SIGNAL(progressEnds()), this, SLOT(recheckData())); + connect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData())); } } else @@ -737,7 +737,7 @@ void TmxCompendium::recheckData() { if(data) { - disconnect(data, SIGNAL(progressEnds()), this, SLOT(recheckData())); + disconnect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData())); error = data->hasErrors(); errorMsg = data->errorMsg(); @@ -746,7 +746,7 @@ void TmxCompendium::recheckData() loading=false; } -QString TmxCompendium::maskString(QString s) const +TQString TmxCompendium::maskString(TQString s) const { s.replace('\\',"\\\\"); s.replace('?',"\\?"); @@ -795,7 +795,7 @@ void TmxCompendium::addResult(SearchResult *result) } -void TmxCompendium::setLanguageCode(const QString& lang) +void TmxCompendium::setLanguageCode(const TQString& lang) { if(initialized && url.contains("@LANG@") && lang!=langCode && !loadTimer->isActive() ) @@ -806,7 +806,7 @@ void TmxCompendium::setLanguageCode(const QString& lang) langCode=lang; } -QString TmxCompendium::translate(const QString& text, uint pluralForm) +TQString TmxCompendium::translate(const TQString& text, uint pluralForm) { if(!initialized) { @@ -818,7 +818,7 @@ QString TmxCompendium::translate(const QString& text, uint pluralForm) if(error || !data || data->active()) { - return QString::null; + return TQString::null; } @@ -829,10 +829,10 @@ QString TmxCompendium::translate(const QString& text, uint pluralForm) return data->msgstr(*index); } - return QString::null; + return TQString::null; } -QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pluralForm) +TQString TmxCompendium::fuzzyTranslation(const TQString& text, int &score, uint pluralForm) { if(!initialized) { @@ -844,7 +844,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl if(error || !data || data->active()) { - return QString::null; + return TQString::null; } // try to find fuzzy string @@ -855,7 +855,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl int best_match = 0; int total = data->numberOfEntries(); - QString searchStr = TmxCompendiumData::simplify(text); + TQString searchStr = TmxCompendiumData::simplify(text); //kdDebug(750) << "find best match for " << searchStr << endl; @@ -883,7 +883,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl } // get a message from the catalog - QString origStr = data->msgid(i); + TQString origStr = data->msgid(i); origStr = TmxCompendiumData::simplify(origStr); // don't match too long strings for short search string @@ -907,7 +907,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl return data->msgstr(best_matching); } - return QString::null; + return TQString::null; } @@ -915,14 +915,14 @@ void TmxCompendium::unregisterData() { if(data) { - disconnect(data, SIGNAL(progressStarts(const QString&)), this - , SIGNAL(progressStarts(const QString&))); - disconnect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds())); - disconnect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int))); + disconnect(data, TQT_SIGNAL(progressStarts(const TQString&)), this + , TQT_SIGNAL(progressStarts(const TQString&))); + disconnect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds())); + disconnect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int))); if(data->active()) { - disconnect(data,SIGNAL(progressEnds()),this,SLOT(recheckData())); + disconnect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(recheckData())); } if(data->unregisterObject(this)) @@ -933,7 +933,7 @@ void TmxCompendium::unregisterData() } else { - connect(data,SIGNAL(progressEnds()),this,SLOT(removeData())); + connect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(removeData())); } } @@ -957,21 +957,21 @@ void TmxCompendium::registerData() emit progressStarts(i18n("Loading PO compendium")); } - connect(data, SIGNAL(progressStarts(const QString&)), this - , SIGNAL(progressStarts(const QString&))); - connect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds())); - connect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int))); + connect(data, TQT_SIGNAL(progressStarts(const TQString&)), this + , TQT_SIGNAL(progressStarts(const TQString&))); + connect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds())); + connect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int))); } void TmxCompendium::removeData() { - const QObject *s=sender(); + const TQObject *s=sender(); if(s && s->inherits("TmxCompendiumData")) { const TmxCompendiumData *d=static_cast(s); if(d) { - QDictIterator it(*compendiumDict()); + TQDictIterator it(*compendiumDict()); while(it.current()) { if(it.current() == d) @@ -991,11 +991,11 @@ void TmxCompendium::removeData() } } -QDict *TmxCompendium::compendiumDict() +TQDict *TmxCompendium::compendiumDict() { if(!_compDict) { - _compDict=compDataDeleter.setObject( new QDict ); + _compDict=compDataDeleter.setObject( new TQDict ); _compDict->setAutoDelete(true); } diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendium.h b/kbabel/kbabeldict/modules/tmx/tmxcompendium.h index 9a2f8fba..21270799 100644 --- a/kbabel/kbabeldict/modules/tmx/tmxcompendium.h +++ b/kbabel/kbabeldict/modules/tmx/tmxcompendium.h @@ -39,9 +39,9 @@ #include "tmxcompendiumdata.h" #include "searchengine.h" -#include -#include -#include +#include +#include +#include class TmxCompendiumPreferencesWidget; class KConfigBase; @@ -52,34 +52,34 @@ class TmxCompendium : public SearchEngine Q_OBJECT public: - TmxCompendium(QObject *parent=0, const char *name=0); + TmxCompendium(TQObject *parent=0, const char *name=0); virtual ~TmxCompendium(); virtual bool isReady() const; - virtual QString translate(const QString& text, uint pluralForm); - virtual QString fuzzyTranslation(const QString& text, int &score, uint pluralForm); + virtual TQString translate(const TQString& text, uint pluralForm); + virtual TQString fuzzyTranslation(const TQString& text, int &score, uint pluralForm); virtual bool isSearching() const; virtual void saveSettings(KConfigBase *config); virtual void readSettings(KConfigBase *config); - virtual PrefWidget *preferencesWidget(QWidget *parent); + virtual PrefWidget *preferencesWidget(TQWidget *parent); virtual const KAboutData *about() const; - virtual QString name() const; + virtual TQString name() const; - virtual QString id() const; + virtual TQString id() const; - virtual QString lastError(); + virtual TQString lastError(); public slots: - virtual bool startSearch(const QString& text, uint pluralForm, const SearchFilter* filter); + virtual bool startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter); virtual void stopSearch(); - virtual void setLanguageCode(const QString& lang); + virtual void setLanguageCode(const TQString& lang); protected slots: /** reads the current settings from the preferences dialog */ @@ -96,19 +96,19 @@ protected slots: protected: void loadCompendium(); void addResult(SearchResult *); - QString maskString(QString string) const; + TQString maskString(TQString string) const; void registerData(); void unregisterData(); private: - QGuardedPtr prefWidget; + TQGuardedPtr prefWidget; TmxCompendiumData *data; - QTimer *loadTimer; + TQTimer *loadTimer; - QString url; - QString realURL; - QString langCode; + TQString url; + TQString realURL; + TQString langCode; bool caseSensitive; bool wholeWords; @@ -123,15 +123,15 @@ private: uint freeMemDelay; bool error; - QString errorMsg; + TQString errorMsg; bool stop; bool active; bool initialized; bool loading; - static QDict *_compDict; - static QDict *compendiumDict(); + static TQDict *_compDict; + static TQDict *compendiumDict(); }; #endif diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp index 3fa84aa4..7893e837 100644 --- a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp +++ b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp @@ -34,8 +34,8 @@ **************************************************************************** */ #include "tmxcompendiumdata.h" -#include -#include +#include +#include #include #include @@ -47,8 +47,8 @@ using namespace KBabel; -TmxCompendiumData::TmxCompendiumData(QObject *parent) - : QObject(parent) +TmxCompendiumData::TmxCompendiumData(TQObject *parent) + : TQObject(parent) , _active(false) , _error(false) , _initialized(false) @@ -62,7 +62,7 @@ TmxCompendiumData::TmxCompendiumData(QObject *parent) } -bool TmxCompendiumData::load(const KURL& url, const QString& language) +bool TmxCompendiumData::load(const KURL& url, const TQString& language) { kdDebug(KBABEL_SEARCH) << "Load " << url.url() << " in " << language << endl; if(_active) @@ -79,13 +79,13 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language) emit progressStarts(i18n("Loading TMX compendium")); - QDomDocument doc( "mydocument" ); + TQDomDocument doc( "mydocument" ); - QString target; + TQString target; if( KIO::NetAccess::download( url, target ) ) { - QFile f( target ); + TQFile f( target ); if ( !f.open( IO_ReadOnly ) ) { _error = true; @@ -102,7 +102,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language) _errorMsg = i18n( "Cannot open the file." ); } - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); if( docElem.tagName() != "tmx" || !(docElem.hasAttribute("version") && docElem.attribute("version") == "1.4" ) ) @@ -131,7 +131,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language) emit progressStarts(i18n("Building indices")); - QDomNodeList tuTags = docElem.elementsByTagName("tu"); + TQDomNodeList tuTags = docElem.elementsByTagName("tu"); uint total = tuTags.count(); _originals.clear(); @@ -149,11 +149,11 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language) kapp->processEvents(100); } - QDomNodeList tuvTags = tuTags.item(i).toElement().elementsByTagName("tuv"); - QString english, other; + TQDomNodeList tuvTags = tuTags.item(i).toElement().elementsByTagName("tuv"); + TQString english, other; for( uint j = 0 ; j < tuvTags.count() ; j++ ) { - QDomElement el = tuvTags.item(j).toElement(); + TQDomElement el = tuvTags.item(j).toElement(); if( el.attribute("xml:lang").upper() == "EN" ) english = el.text(); if( el.attribute("xml:lang").upper().startsWith(language.upper()) ) other = el.text(); @@ -165,7 +165,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language) _originals[lastindex] = english; _translations[lastindex] = other; - QString temp = english; + TQString temp = english; int *index = new int(lastindex); _exactDict.insert(temp,index); @@ -175,18 +175,18 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language) if(!temp.isEmpty() && temp.length() > 1) { - QValueList *indexList=_allDict[temp]; + TQValueList *indexList=_allDict[temp]; if(!indexList) { - indexList = new QValueList; + indexList = new TQValueList; _allDict.insert(temp,indexList); } indexList->append(lastindex); - QStringList wList = wordList(temp); - for ( QStringList::Iterator it = wList.begin() + TQStringList wList = wordList(temp); + for ( TQStringList::Iterator it = wList.begin() ; it != wList.end(); ++it ) { if( (*it).length() > 1) @@ -195,7 +195,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language) if(!indexList) { - indexList = new QValueList; + indexList = new TQValueList; _wordDict.insert(*it,indexList); } @@ -210,7 +210,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language) // remove words, that are too frequent uint max=_allDict.count()/10; - QDictIterator< QValueList > it(_wordDict); + TQDictIterator< TQValueList > it(_wordDict); while ( it.current() ) { if(it.current()->count() > max) @@ -240,39 +240,39 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language) return true; } -const int* TmxCompendiumData::exactDict(const QString& text) const +const int* TmxCompendiumData::exactDict(const TQString& text) const { return _exactDict[text]; } -const QValueList* TmxCompendiumData::allDict(const QString& text) const +const TQValueList* TmxCompendiumData::allDict(const TQString& text) const { return _allDict[text]; } -const QValueList* TmxCompendiumData::wordDict(const QString& text) const +const TQValueList* TmxCompendiumData::wordDict(const TQString& text) const { return _wordDict[text]; } -const QString TmxCompendiumData::msgid(const int index) const +const TQString TmxCompendiumData::msgid(const int index) const { return _originals[index]; } -const QString TmxCompendiumData::msgstr(const int index) const +const TQString TmxCompendiumData::msgstr(const int index) const { return _translations[index]; } -void TmxCompendiumData::registerObject(QObject *obj) +void TmxCompendiumData::registerObject(TQObject *obj) { if(!_registered.containsRef(obj)) _registered.append(obj); } -bool TmxCompendiumData::unregisterObject(QObject *obj) +bool TmxCompendiumData::unregisterObject(TQObject *obj) { _registered.removeRef(obj); @@ -284,9 +284,9 @@ bool TmxCompendiumData::hasObjects() const return _registered.count()==0; } -QString TmxCompendiumData::simplify(const QString& string) +TQString TmxCompendiumData::simplify(const TQString& string) { - QString result; + TQString result; TagExtractor te; te.setString(string); @@ -298,11 +298,11 @@ QString TmxCompendiumData::simplify(const QString& string) return result; } -QStringList TmxCompendiumData::wordList(const QString& string) +TQStringList TmxCompendiumData::wordList(const TQString& string) { - QString result=TmxCompendiumData::simplify(string); + TQString result=TmxCompendiumData::simplify(string); - return QStringList::split(' ',result); + return TQStringList::split(' ',result); } #include "tmxcompendiumdata.moc" diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h index bc88a92e..ce2692a1 100644 --- a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h +++ b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h @@ -37,52 +37,52 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class TmxCompendiumData : public QObject { Q_OBJECT public: - TmxCompendiumData(QObject *parent=0); + TmxCompendiumData(TQObject *parent=0); - bool load(const KURL& url, const QString& language); + bool load(const KURL& url, const TQString& language); - const int *exactDict(const QString& text) const; - const QValueList *allDict(const QString& text) const; - const QValueList *wordDict(const QString& text) const; + const int *exactDict(const TQString& text) const; + const TQValueList *allDict(const TQString& text) const; + const TQValueList *wordDict(const TQString& text) const; - const QString msgid(const int index) const; - const QString msgstr(const int index) const; + const TQString msgid(const int index) const; + const TQString msgstr(const int index) const; const int numberOfEntries() const { return _exactDict.count(); } bool active() const { return _active; } bool initialized() const { return _initialized; } bool hasErrors() const { return _error; } - QString errorMsg() const { return _errorMsg; } + TQString errorMsg() const { return _errorMsg; } /** registers an object, that uses this data */ - void registerObject(QObject *); + void registerObject(TQObject *); /** * unregisters an object, that uses this data * * @return true, if this was the last object */ - bool unregisterObject(QObject *); + bool unregisterObject(TQObject *); bool hasObjects() const; - static QString simplify(const QString& text); - static QStringList wordList(const QString& text); + static TQString simplify(const TQString& text); + static TQStringList wordList(const TQString& text); signals: - void progressStarts(const QString&); + void progressStarts(const TQString&); void progressEnds(); void progress(int); @@ -91,16 +91,16 @@ private: bool _active; bool _error; bool _initialized; - QString _errorMsg; + TQString _errorMsg; - QDict _exactDict; - QDict< QValueList > _allDict; - QDict< QValueList > _wordDict; + TQDict _exactDict; + TQDict< TQValueList > _allDict; + TQDict< TQValueList > _wordDict; - QValueVector _originals; - QValueVector _translations; + TQValueVector _originals; + TQValueVector _translations; - QPtrList _registered; + TQPtrList _registered; }; #endif diff --git a/kbabel/kbabeldict/searchengine.cpp b/kbabel/kbabeldict/searchengine.cpp index 95ab5694..19112fe7 100644 --- a/kbabel/kbabeldict/searchengine.cpp +++ b/kbabel/kbabeldict/searchengine.cpp @@ -53,7 +53,7 @@ SearchResult::SearchResult(const SearchResult& r) descriptions.setAutoDelete(true); score=r.score; - QPtrListIterator it(r.descriptions); + TQPtrListIterator it(r.descriptions); for ( ; it.current(); ++it ) { TranslationInfo *ti=new TranslationInfo(*(*it)); @@ -62,8 +62,8 @@ SearchResult::SearchResult(const SearchResult& r) } -PrefWidget::PrefWidget(QWidget *parent, const char *name) - : QWidget(parent,name) +PrefWidget::PrefWidget(TQWidget *parent, const char *name) + : TQWidget(parent,name) { } @@ -72,8 +72,8 @@ PrefWidget::~PrefWidget() } -SearchEngine::SearchEngine(QObject *parent, const char *name) - : QObject(parent, name) +SearchEngine::SearchEngine(TQObject *parent, const char *name) + : TQObject(parent, name) { autoUpdate=false; results.setAutoDelete(true); @@ -83,7 +83,7 @@ SearchEngine::~SearchEngine() { } -bool SearchEngine::startSearchInTranslation(const QString&, unsigned int, const SearchFilter*) +bool SearchEngine::startSearchInTranslation(const TQString&, unsigned int, const SearchFilter*) { return true; } @@ -175,34 +175,34 @@ void SearchEngine::clearResults() -void SearchEngine::setEditedFile(const QString&) +void SearchEngine::setEditedFile(const TQString&) { } -void SearchEngine::setEditedPackage(const QString&) +void SearchEngine::setEditedPackage(const TQString&) { } -void SearchEngine::setLanguageCode(const QString&) +void SearchEngine::setLanguageCode(const TQString&) { } -void SearchEngine::setLanguage(const QString&,const QString&) +void SearchEngine::setLanguage(const TQString&,const TQString&) { } -void SearchEngine::stringChanged(const QStringList&,const QString&,unsigned int, const QString&) +void SearchEngine::stringChanged(const TQStringList&,const TQString&,unsigned int, const TQString&) { } -QString SearchEngine::directory(const QString& path, int n) +TQString SearchEngine::directory(const TQString& path, int n) { if(n<0) - return QString::null; + return TQString::null; int begin=path.findRev('/'); int end=path.length(); @@ -213,14 +213,14 @@ QString SearchEngine::directory(const QString& path, int n) if(n==0) return path; else - return QString::null; + return TQString::null; } for(int i=0; i < n; i++) { if(begin==0) { - return QString::null; + return TQString::null; } end = begin; @@ -228,7 +228,7 @@ QString SearchEngine::directory(const QString& path, int n) if(begin < 0) { - return QString::null; + return TQString::null; } } @@ -237,7 +237,7 @@ QString SearchEngine::directory(const QString& path, int n) } -uint SearchEngine::score(const QString& orig, const QString& found) +uint SearchEngine::score(const TQString& orig, const TQString& found) { if(orig == found) return 100; @@ -246,8 +246,8 @@ uint SearchEngine::score(const QString& orig, const QString& found) uint scoreB = ngramMatch(orig,found); uint score = QMIN(scoreA, scoreB); - QString f = found.lower(); - QString o = orig.lower(); + TQString f = found.lower(); + TQString o = orig.lower(); scoreA = ngramMatch(f, o); scoreB = ngramMatch(o, f); @@ -256,7 +256,7 @@ uint SearchEngine::score(const QString& orig, const QString& found) return score; } -uint SearchEngine::ngramMatch (const QString& text1, const QString& text2, +uint SearchEngine::ngramMatch (const TQString& text1, const TQString& text2, uint ngram_len) { if (text1.length() < ngram_len || text2.length() < ngram_len) diff --git a/kbabel/kbabeldict/searchengine.h b/kbabel/kbabeldict/searchengine.h index db722362..a10e6193 100644 --- a/kbabel/kbabeldict/searchengine.h +++ b/kbabel/kbabeldict/searchengine.h @@ -34,11 +34,11 @@ #ifndef SEARCH_ENGINE_H #define SEARCH_ENGINE_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -55,50 +55,50 @@ public: * Information about the location, where this entry was found. * For example the PO-file it was found in, etc. * */ - QString location; + TQString location; /** * The complete path of the file, where this entry was found */ - QString filePath; + TQString filePath; /** The date of the last change */ - QDateTime lastChange; + TQDateTime lastChange; /** The language, the translation belongs to */ - QString languageCode; + TQString languageCode; /** * The translator of this string * For example the translator found in the header of the PO-file. */ - QString translator; + TQString translator; /** * The name of a project this translation is a part of. */ - QString projectName; + TQString projectName; /** * Keywords defined for @ref projectName. For example KDE_3_1_BRANCH (project branch) */ - QStringList projectKeywords; + TQStringList projectKeywords; /** * Part/context in a project, for example "multimedia", "admin", etc. */ - QString projectContext; + TQString projectContext; /** * Status of the translation, for example "approved", "spellchecked", "unknown" */ - QString status; + TQString status; /** * Additional information to be presented to the user, for example a comment */ - QString description; + TQString description; }; @@ -114,16 +114,16 @@ public: SearchResult(const SearchResult&); /** The requested string to search for */ - QString requested; + TQString requested; /** The string that, was found (a list if it is a plural form) */ - QStringList found; + TQStringList found; /** The number of a plural form to search for */ uint requestedPluralForm; /** The translation of the found string */ - QString translation; + TQString translation; /** The number of a plural form of the translated string found */ uint translationPluralForm; @@ -133,21 +133,21 @@ public: * using rich text. If you don't use rich text, you can leave * it empty */ - QString plainTranslation; + TQString plainTranslation; /** * This string contains the plain string, that was found, if you are * using rich text. If you don't use rich text, you can leave * it empty */ - QString plainFound; + TQString plainFound; /** * This string contains the plain requested string if you are * using rich text. If you don't use rich text, you can leave * it empty */ - QString plainRequested; + TQString plainRequested; /** * Constains a score for the found translation. 0 means exact matching. @@ -156,7 +156,7 @@ public: */ int score; - QPtrList descriptions; + TQPtrList descriptions; }; /** @@ -167,9 +167,9 @@ class KDE_EXPORT SearchFilter public: SearchFilter() : _projects() - , _location( QString::null ) - , _languageCode( QString::null ) - , _origLanguageCode( QString::null ) + , _location( TQString::null ) + , _languageCode( TQString::null ) + , _origLanguageCode( TQString::null ) , _translators() , _projectKeywords() , _projectContexts() @@ -178,45 +178,45 @@ public: virtual ~SearchFilter() {} - void setProjectName( const QString& project ) { _projects = project; } - void setProjectName( const QStringList& projects ) { _projects = projects; } + void setProjectName( const TQString& project ) { _projects = project; } + void setProjectName( const TQStringList& projects ) { _projects = projects; } /** * Information about the location, where this entry was found. * For example the PO-file it was found in, etc. * */ - void setLocation( const QString& location) { _location = location; } - QString location() const { return _location; } + void setLocation( const TQString& location) { _location = location; } + TQString location() const { return _location; } /** The original language, the translation was made from */ - void setOriginalLanguage( const QString& languageCode) { _origLanguageCode = languageCode; } + void setOriginalLanguage( const TQString& languageCode) { _origLanguageCode = languageCode; } /** The language, the translation belongs to */ - void setTranslationLanguage( const QString& languageCode) { _languageCode = languageCode; } + void setTranslationLanguage( const TQString& languageCode) { _languageCode = languageCode; } /** * The translator of this string * For example the translator found in the header of the PO-file. */ - void setTranslator( const QString& translator) { _translators = translator ; } - void setTranslator( const QStringList& translators) { _translators = translators ; } + void setTranslator( const TQString& translator) { _translators = translator ; } + void setTranslator( const TQStringList& translators) { _translators = translators ; } /** * Keywords defined for @ref projectName. For example KDE_3_1_BRANCH (project branch) */ - void setProjectKeywords( const QStringList& projectKeywords ) { _projectKeywords = projectKeywords; } + void setProjectKeywords( const TQStringList& projectKeywords ) { _projectKeywords = projectKeywords; } /** * Part/context in a project, for example "multimedia", "admin", etc. */ - void setProjectContext( const QString& projectContext) { _projectContexts = projectContext; } - void setProjectContext( const QStringList& projectContexts) { _projectContexts = projectContexts; } + void setProjectContext( const TQString& projectContext) { _projectContexts = projectContext; } + void setProjectContext( const TQStringList& projectContexts) { _projectContexts = projectContexts; } /** * Status of the translation, for example "approved", "spellchecked", "unknown" */ - void setStatus( const QString& translationStatus) { _translationStatus = translationStatus; } - void setStatus( const QStringList& translationStati) { _translationStatus = translationStati; } + void setStatus( const TQString& translationStatus) { _translationStatus = translationStatus; } + void setStatus( const TQStringList& translationStati) { _translationStatus = translationStati; } /** * The key method of the class - check, if the argument @@ -225,14 +225,14 @@ public: virtual bool match( const TranslationInfo& toCheck ); private: - QStringList _projects; - QString _location; - QString _languageCode; - QString _origLanguageCode; - QStringList _translators; - QStringList _projectKeywords ; - QStringList _projectContexts; - QStringList _translationStatus; + TQStringList _projects; + TQString _location; + TQString _languageCode; + TQString _origLanguageCode; + TQStringList _translators; + TQStringList _projectKeywords ; + TQStringList _projectContexts; + TQStringList _translationStatus; }; /** @@ -246,7 +246,7 @@ class KDE_EXPORT PrefWidget : public QWidget Q_OBJECT public: - PrefWidget(QWidget *parent, const char* name=0); + PrefWidget(TQWidget *parent, const char* name=0); virtual ~PrefWidget(); public slots: @@ -270,7 +270,7 @@ class KDE_EXPORT SearchEngine : public QObject Q_OBJECT public: - SearchEngine(QObject *parent=0, const char *name=0); + SearchEngine(TQObject *parent=0, const char *name=0); virtual ~SearchEngine(); @@ -297,26 +297,26 @@ public: * @returns the exact translation of text or a empty string * if no exact match was found. */ - virtual QString translate(const QString& text, const uint pluralForm = 0)=0; + virtual TQString translate(const TQString& text, const uint pluralForm = 0)=0; /** * @returns the translation of text according to the plugin settings or a empty string * if no match was found. */ - virtual QString searchTranslation(const QString&, int &score, const uint pluralForm = 0) { + virtual TQString searchTranslation(const TQString&, int &score, const uint pluralForm = 0) { Q_UNUSED(pluralForm); - score = 0; return QString::null; + score = 0; return TQString::null; } /** * @returns a fuzzy translation of text or a empty string * if no good match was found. */ - virtual QString fuzzyTranslation(const QString& /*text*/, int &score, const uint pluralForm = 0) { + virtual TQString fuzzyTranslation(const TQString& /*text*/, int &score, const uint pluralForm = 0) { Q_UNUSED(pluralForm); - score = 0; return QString::null; }; + score = 0; return TQString::null; }; /** @@ -329,7 +329,7 @@ public: * @return true, if successfull */ virtual bool messagesForFilter(const SearchFilter* filter - , QValueList& resultList, QString& error) + , TQValueList& resultList, TQString& error) { Q_UNUSED(filter); Q_UNUSED(resultList); @@ -354,19 +354,19 @@ public: * a tabbed widget. * @param parent the parent of the returned widget */ - virtual PrefWidget* preferencesWidget(QWidget *parent)=0; + virtual PrefWidget* preferencesWidget(TQWidget *parent)=0; /** @returns information about this SearchEngine */ virtual const KAboutData *about() const= 0; /** @returns the i18n name of this search engine */ - virtual QString name() const= 0; + virtual TQString name() const= 0; /** @returns a untranslated name of this engine */ - virtual QString id() const= 0; + virtual TQString id() const= 0; /** @returns the last error message */ - virtual QString lastError() = 0; + virtual TQString lastError() = 0; /** @@ -382,7 +382,7 @@ public: * a number between 0 and 100. @param ngram_len should be * a value between 3 and 5. */ - static uint ngramMatch (const QString& text1, const QString& text2, + static uint ngramMatch (const TQString& text1, const TQString& text2, uint ngram_len=3); public slots: @@ -391,14 +391,14 @@ public slots: * @returns false, if an error occured. Use @ref lastError * to get the last error message */ - virtual bool startSearch(const QString& s, uint pluralForm = 0, const SearchFilter* filter = 0) = 0; + virtual bool startSearch(const TQString& s, uint pluralForm = 0, const SearchFilter* filter = 0) = 0; /** * starts a search for string s in the translated text * @returns false, if an error occured. Use @ref lastError * to get the last error message */ - virtual bool startSearchInTranslation(const QString& s, uint pluralForm = 0, const SearchFilter* filter = 0); + virtual bool startSearchInTranslation(const TQString& s, uint pluralForm = 0, const SearchFilter* filter = 0); /** stops a search */ @@ -425,22 +425,22 @@ public slots: * on the edited file. The default implementation does nothing. * @param file The edited file with path */ - virtual void setEditedFile(const QString& file); + virtual void setEditedFile(const TQString& file); /** * This method allows a search engine to use different settings depending * on the edited package. The default implementation does nothing. * @param package The name of the package, that is currently translated. */ - virtual void setEditedPackage(const QString& package); + virtual void setEditedPackage(const TQString& package); /** * This method allows a search engine to use different settings depending * on the language code. The default implementation does nothing. * @param lang The current language code (e.g. de). */ - virtual void setLanguageCode(const QString& lang); - virtual void setLanguage(const QString& languageCode, const QString& languageName); + virtual void setLanguageCode(const TQString& lang); + virtual void setLanguage(const TQString& languageCode, const TQString& languageName); @@ -453,8 +453,8 @@ public slots: * @param pluralForm the number of the plural form of the translation * @param description the additional description, e.g., a PO comment */ - virtual void stringChanged( const QStringList& orig, const QString& translated - , const uint translationPluralForm, const QString& description); + virtual void stringChanged( const TQStringList& orig, const TQString& translated + , const uint translationPluralForm, const TQString& description); /** * If the database is editable this slot should open an dialog to let @@ -470,13 +470,13 @@ public slots: * returns "foobar", while n=1 would return "src" * FIXME: isn't it a code duplication? */ - static QString directory(const QString& path, int n); + static TQString directory(const TQString& path, int n); /** * computes a score to assess the match of the two strings: * 0 means exact match, bigger means worse */ - static uint score(const QString& orig, const QString& found); + static uint score(const TQString& orig, const TQString& found); signals: /** signals, that a new search started */ @@ -493,7 +493,7 @@ signals: * progressbar or if you do something else then searching, * maybe loading a big file */ - void progressStarts(const QString&); + void progressStarts(const TQString&); void progressEnds(); @@ -523,10 +523,10 @@ signals: * signals, that an error occured, for example, that you wasn't * able to open a database. */ - void hasError(const QString& error); + void hasError(const TQString& error); protected: - QPtrList results; + TQPtrList results; bool autoUpdate; }; diff --git a/kbugbuster/backend/bug.cpp b/kbugbuster/backend/bug.cpp index 4523652e..aaa61273 100644 --- a/kbugbuster/backend/bug.cpp +++ b/kbugbuster/backend/bug.cpp @@ -21,9 +21,9 @@ Bug::Bug( const Bug &other ) (*this) = other; } -Bug Bug::fromNumber( const QString &bugNumber ) +Bug Bug::fromNumber( const TQString &bugNumber ) { - return new BugImpl( QString::null, Person(), bugNumber, 0xFFFFFFFF, Normal, Person(), + return new BugImpl( TQString::null, Person(), bugNumber, 0xFFFFFFFF, Normal, Person(), Unconfirmed, Bug::BugMergeList() ); } @@ -37,7 +37,7 @@ Bug::~Bug() { } -QString Bug::severityLabel( Bug::Severity s ) +TQString Bug::severityLabel( Bug::Severity s ) { switch ( s ) { @@ -53,23 +53,23 @@ QString Bug::severityLabel( Bug::Severity s ) } } -QString Bug::severityToString( Bug::Severity s ) +TQString Bug::severityToString( Bug::Severity s ) { switch ( s ) { - case Critical: return QString::fromLatin1( "critical" ); - case Grave: return QString::fromLatin1( "grave" ); - case Major: return QString::fromLatin1( "major" ); - case Crash: return QString::fromLatin1( "crash" ); - case Normal: return QString::fromLatin1( "normal" ); - case Minor: return QString::fromLatin1( "minor" ); - case Wishlist: return QString::fromLatin1( "wishlist" ); + case Critical: return TQString::fromLatin1( "critical" ); + case Grave: return TQString::fromLatin1( "grave" ); + case Major: return TQString::fromLatin1( "major" ); + case Crash: return TQString::fromLatin1( "crash" ); + case Normal: return TQString::fromLatin1( "normal" ); + case Minor: return TQString::fromLatin1( "minor" ); + case Wishlist: return TQString::fromLatin1( "wishlist" ); default: kdWarning() << "Bug::severityToString invalid severity " << s << endl; - return QString::fromLatin1( "" ); + return TQString::fromLatin1( "" ); } } -Bug::Severity Bug::stringToSeverity( const QString &s, bool *ok ) +Bug::Severity Bug::stringToSeverity( const TQString &s, bool *ok ) { if ( ok ) *ok = true; @@ -88,14 +88,14 @@ Bug::Severity Bug::stringToSeverity( const QString &s, bool *ok ) return SeverityUndefined; } -QValueList Bug::severities() +TQValueList Bug::severities() { - QValueList s; + TQValueList s; s << Critical << Grave << Major << Crash << Normal << Minor << Wishlist; return s; } -QString Bug::statusLabel( Bug::Status s ) +TQString Bug::statusLabel( Bug::Status s ) { switch ( s ) { @@ -109,21 +109,21 @@ QString Bug::statusLabel( Bug::Status s ) } } -QString Bug::statusToString( Bug::Status s ) +TQString Bug::statusToString( Bug::Status s ) { switch ( s ) { - case Unconfirmed: return QString::fromLatin1( "unconfirmed" ); - case New: return QString::fromLatin1( "new" ); - case Assigned: return QString::fromLatin1( "assigned" ); - case Reopened: return QString::fromLatin1( "reopened" ); - case Closed: return QString::fromLatin1( "closed" ); + case Unconfirmed: return TQString::fromLatin1( "unconfirmed" ); + case New: return TQString::fromLatin1( "new" ); + case Assigned: return TQString::fromLatin1( "assigned" ); + case Reopened: return TQString::fromLatin1( "reopened" ); + case Closed: return TQString::fromLatin1( "closed" ); default: kdWarning() << "Bug::statusToString invalid status " << s << endl; - return QString::fromLatin1( "" ); + return TQString::fromLatin1( "" ); } } -Bug::Status Bug::stringToStatus( const QString &s, bool *ok ) +Bug::Status Bug::stringToStatus( const TQString &s, bool *ok ) { if ( ok ) *ok = true; @@ -140,15 +140,15 @@ Bug::Status Bug::stringToStatus( const QString &s, bool *ok ) return StatusUndefined; } -QString Bug::title() const +TQString Bug::title() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->title; } -void Bug::setTitle( QString title) +void Bug::setTitle( TQString title) { if ( m_impl ) m_impl->title = title; @@ -171,15 +171,15 @@ void Bug::setAge( uint age ) struct Person Bug::submitter() const { if ( !m_impl ) - return Person( QString::null, QString::null ); + return Person( TQString::null, TQString::null ); return m_impl->submitter; } -QString Bug::number() const +TQString Bug::number() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->number; } @@ -215,14 +215,14 @@ Bug::Status Bug::status() const return m_impl->status; } -QString Bug::severityAsString() const +TQString Bug::severityAsString() const { return severityToString( severity() ); } Person Bug::developerTODO() const { - return (m_impl == NULL) ? Person( QString::null, QString::null ) : + return (m_impl == NULL) ? Person( TQString::null, TQString::null ) : m_impl->developerTODO; } diff --git a/kbugbuster/backend/bug.h b/kbugbuster/backend/bug.h index 9a5ae8b6..406179c8 100644 --- a/kbugbuster/backend/bug.h +++ b/kbugbuster/backend/bug.h @@ -3,7 +3,7 @@ #include "person.h" -#include +#include #include @@ -12,8 +12,8 @@ class BugImpl; class Bug { public: - typedef QValueList List; - typedef QValueList BugMergeList; + typedef TQValueList List; + typedef TQValueList BugMergeList; enum Severity { SeverityUndefined, Critical, Grave, Major, Crash, Normal, Minor, Wishlist }; @@ -26,30 +26,30 @@ public: Bug &operator=( const Bug &rhs ); ~Bug(); - static QString severityLabel( Severity s ); + static TQString severityLabel( Severity s ); /** Return string representation of severity. This function is symmetric to stringToSeverity(). */ - static QString severityToString( Severity s ); + static TQString severityToString( Severity s ); /** Return severity code of string representation. This function is symmetric to severityToString(). */ - static Severity stringToSeverity( const QString &, bool *ok = 0 ); + static Severity stringToSeverity( const TQString &, bool *ok = 0 ); - static QValueList severities(); + static TQValueList severities(); uint age() const; void setAge( uint days ); - QString title() const; - void setTitle( QString title ); + TQString title() const; + void setTitle( TQString title ); Person submitter() const; - QString number() const; + TQString number() const; Severity severity() const; void setSeverity( Severity severity ); - QString severityAsString() const; + TQString severityAsString() const; Person developerTODO() const; BugMergeList mergedWith() const; @@ -61,24 +61,24 @@ public: Status status() const; void setStatus( Status newStatus ); - static QString statusLabel( Status s ); + static TQString statusLabel( Status s ); /** Return string representation of status. This function is symmetric to stringToStatus(). */ - static QString statusToString( Status s ); + static TQString statusToString( Status s ); /** Return status code of string representation. This function is symmetric to statusToString(). */ - static Status stringToStatus( const QString &, bool *ok = 0 ); + static Status stringToStatus( const TQString &, bool *ok = 0 ); bool operator==( const Bug &rhs ); bool operator<( const Bug &rhs ) const; bool isNull() const { return m_impl == 0; } - static Bug fromNumber( const QString &bugNumber ); + static Bug fromNumber( const TQString &bugNumber ); private: BugImpl *impl() const { return m_impl; } diff --git a/kbugbuster/backend/bugcache.cpp b/kbugbuster/backend/bugcache.cpp index 0eb44c8c..a6ef25df 100644 --- a/kbugbuster/backend/bugcache.cpp +++ b/kbugbuster/backend/bugcache.cpp @@ -1,7 +1,7 @@ // (C) 2001, Cornelius Schumacher -#include -#include +#include +#include #include #include @@ -14,7 +14,7 @@ #include "bugcache.h" -BugCache::BugCache( const QString &id ) +BugCache::BugCache( const TQString &id ) { mId = id; @@ -55,18 +55,18 @@ Package::List BugCache::loadPackageList() { Package::List pkgs; - QStringList packages = m_cachePackages->groupList(); - QStringList::ConstIterator it; + TQStringList packages = m_cachePackages->groupList(); + TQStringList::ConstIterator it; for( it = packages.begin(); it != packages.end(); ++it ) { if ((*it) == "") continue; if ((*it).contains("/")) continue; m_cachePackages->setGroup(*it); - QString description = m_cachePackages->readEntry("description"); + TQString description = m_cachePackages->readEntry("description"); int numberOfBugs = m_cachePackages->readNumEntry("numberOfBugs"); Person maintainer = readPerson( m_cachePackages, "Maintainer"); - QStringList components = m_cachePackages->readListEntry("components"); + TQStringList components = m_cachePackages->readListEntry("components"); pkgs.append( Package( new PackageImpl( (*it), description, numberOfBugs, maintainer, components ) ) ); @@ -78,21 +78,21 @@ Package::List BugCache::loadPackageList() void BugCache::invalidatePackageList() { // Completely wipe out packages.cache - QStringList packages = m_cachePackages->groupList(); - QStringList::ConstIterator it; + TQStringList packages = m_cachePackages->groupList(); + TQStringList::ConstIterator it; for( it = packages.begin(); it != packages.end(); ++it ) { if ((*it) == "") continue; m_cachePackages->deleteGroup(*it, true); } } -void BugCache::saveBugList( const Package &pkg, const QString &component, const Bug::List &bugs ) +void BugCache::saveBugList( const Package &pkg, const TQString &component, const Bug::List &bugs ) { - QStringList bugList; + TQStringList bugList; Bug::List::ConstIterator it; for( it = bugs.begin(); it != bugs.end(); ++it ) { - QString number = (*it).number(); + TQString number = (*it).number(); bugList.append( number ); m_cacheBugs->setGroup( number ); m_cacheBugs->writeEntry( "Title", (*it).title() ); @@ -113,7 +113,7 @@ void BugCache::saveBugList( const Package &pkg, const QString &component, const m_cachePackages->writeEntry( "bugList", bugList ); } -Bug::List BugCache::loadBugList( const Package &pkg, const QString &component, bool disconnected ) +Bug::List BugCache::loadBugList( const Package &pkg, const TQString &component, bool disconnected ) { // kdDebug() << "Loading bug list for " << pkg.name() << endl; @@ -124,16 +124,16 @@ Bug::List BugCache::loadBugList( const Package &pkg, const QString &component, b else m_cachePackages->setGroup( pkg.name() + "/" + component ); - QStringList bugs = m_cachePackages->readListEntry( "bugList" ); + TQStringList bugs = m_cachePackages->readListEntry( "bugList" ); // kdDebug() << " Bugs: " << (bugs.join(",")) << endl; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = bugs.begin(); it != bugs.end(); ++it ) { if ( m_cacheBugs->hasGroup(*it) ) { m_cacheBugs->setGroup(*it); - QString title = m_cacheBugs->readEntry("Title"); + TQString title = m_cacheBugs->readEntry("Title"); if ( !title.isEmpty() ) // dunno how I ended up with an all empty bug in the cache { Person submitter = readPerson( m_cacheBugs, "Submitter" ); @@ -158,7 +158,7 @@ Bug::List BugCache::loadBugList( const Package &pkg, const QString &component, b return bugList; } -void BugCache::invalidateBugList( const Package& pkg, const QString &component ) +void BugCache::invalidateBugList( const Package& pkg, const TQString &component ) { kdDebug() << "BugCache::invalidateBugList " << pkg.name() << " (" << component << ")" << endl; @@ -167,12 +167,12 @@ void BugCache::invalidateBugList( const Package& pkg, const QString &component ) if ( component.isEmpty() ) { m_cachePackages->setGroup( pkg.name() ); } else { - QString key = pkg.name() + "/" + component; + TQString key = pkg.name() + "/" + component; m_cachePackages->setGroup( key ); m_cachePackages->setGroup( pkg.name() + "/" + component ); } - m_cachePackages->writeEntry("bugList",QString::null); + m_cachePackages->writeEntry("bugList",TQString::null); } void BugCache::saveBugDetails( const Bug &bug, const BugDetails &details ) @@ -184,9 +184,9 @@ void BugCache::saveBugDetails( const Bug &bug, const BugDetails &details ) m_cacheBugs->writeEntry( "Compiler", details.compiler() ); m_cacheBugs->writeEntry( "OS", details.os() ); - QStringList senders; - QStringList texts; - QStringList dates; + TQStringList senders; + TQStringList texts; + TQStringList dates; BugDetailsPart::List parts = details.parts(); BugDetailsPart::List::ConstIterator it; @@ -220,15 +220,15 @@ BugDetails BugCache::loadBugDetails( const Bug &bug ) BugDetailsPart::List parts; - QStringList texts = m_cacheBugs->readListEntry( "Details" ); - QStringList senders = m_cacheBugs->readListEntry( "Senders" ); - QStringList dates = m_cacheBugs->readListEntry( "Dates" ); + TQStringList texts = m_cacheBugs->readListEntry( "Details" ); + TQStringList senders = m_cacheBugs->readListEntry( "Senders" ); + TQStringList dates = m_cacheBugs->readListEntry( "Dates" ); - QStringList::ConstIterator itTexts = texts.begin(); - QStringList::ConstIterator itSenders = senders.begin(); - QStringList::ConstIterator itDates = dates.begin(); + TQStringList::ConstIterator itTexts = texts.begin(); + TQStringList::ConstIterator itSenders = senders.begin(); + TQStringList::ConstIterator itDates = dates.begin(); while( itTexts != texts.end() ) { - QDateTime date = QDateTime::fromString( *itDates, Qt::ISODate ); + TQDateTime date = TQDateTime::fromString( *itDates, Qt::ISODate ); parts.append( BugDetailsPart( Person(*itSenders), date, *itTexts ) ); ++itTexts; @@ -240,10 +240,10 @@ BugDetails BugCache::loadBugDetails( const Bug &bug ) return BugDetails(); } - QString version = m_cacheBugs->readEntry( "Version" ); - QString source = m_cacheBugs->readEntry( "Source" ); - QString compiler = m_cacheBugs->readEntry( "Compiler" ); - QString os = m_cacheBugs->readEntry( "OS" ); + TQString version = m_cacheBugs->readEntry( "Version" ); + TQString source = m_cacheBugs->readEntry( "Source" ); + TQString compiler = m_cacheBugs->readEntry( "Compiler" ); + TQString os = m_cacheBugs->readEntry( "OS" ); return BugDetails( new BugDetailsImpl( version, source, compiler, os, parts ) ); @@ -259,28 +259,28 @@ void BugCache::clear() delete m_cachePackages; delete m_cacheBugs; - QFile f1( mCachePackagesFileName ); + TQFile f1( mCachePackagesFileName ); f1.remove(); - QFile f2( mCacheBugsFileName ); + TQFile f2( mCacheBugsFileName ); f2.remove(); init(); } -void BugCache::writePerson( KSimpleConfig *file, const QString &key, +void BugCache::writePerson( KSimpleConfig *file, const TQString &key, const Person &p ) { - QStringList values; + TQStringList values; values.append(p.name); values.append(p.email); file->writeEntry( key, values ); } -struct Person BugCache::readPerson( KSimpleConfig *file, const QString &key ) +struct Person BugCache::readPerson( KSimpleConfig *file, const TQString &key ) { struct Person p; - QStringList values = file->readListEntry(key); + TQStringList values = file->readListEntry(key); if ( values.count() > 0 ) p.name = values[0]; if ( values.count() > 1 ) diff --git a/kbugbuster/backend/bugcache.h b/kbugbuster/backend/bugcache.h index af1aed11..bef22493 100644 --- a/kbugbuster/backend/bugcache.h +++ b/kbugbuster/backend/bugcache.h @@ -10,16 +10,16 @@ class KSimpleConfig; class BugCache { public: - BugCache( const QString &id ); + BugCache( const TQString &id ); ~BugCache(); void savePackageList( const Package::List &pkgs ); Package::List loadPackageList(); void invalidatePackageList(); - void saveBugList( const Package &pkg, const QString &component, const Bug::List & ); - Bug::List loadBugList( const Package &pkg, const QString &component, bool disconnected ); - void invalidateBugList( const Package &pkg, const QString &component ); + void saveBugList( const Package &pkg, const TQString &component, const Bug::List & ); + Bug::List loadBugList( const Package &pkg, const TQString &component, bool disconnected ); + void invalidateBugList( const Package &pkg, const TQString &component ); void saveBugDetails( const Bug &bug, const BugDetails & ); BugDetails loadBugDetails( const Bug &bug ); @@ -31,17 +31,17 @@ class BugCache private: void init(); - void writePerson( KSimpleConfig *file, const QString &key, + void writePerson( KSimpleConfig *file, const TQString &key, const Person &p ); - struct Person readPerson (KSimpleConfig *file, const QString &key ); + struct Person readPerson (KSimpleConfig *file, const TQString &key ); - QString mId; + TQString mId; KSimpleConfig *m_cachePackages; KSimpleConfig *m_cacheBugs; - QString mCachePackagesFileName; - QString mCacheBugsFileName; + TQString mCachePackagesFileName; + TQString mCacheBugsFileName; }; #endif diff --git a/kbugbuster/backend/bugcommand.cpp b/kbugbuster/backend/bugcommand.cpp index 332c937d..ab61afae 100644 --- a/kbugbuster/backend/bugcommand.cpp +++ b/kbugbuster/backend/bugcommand.cpp @@ -4,19 +4,19 @@ #include "bugcommand.h" -QString BugCommand::name() +TQString BugCommand::name() { return i18n("Unknown"); } -QString BugCommand::details() +TQString BugCommand::details() { - return QString::null; + return TQString::null; } -BugCommand *BugCommand::load( KConfig *config, const QString &type ) +BugCommand *BugCommand::load( KConfig *config, const TQString &type ) { - QString bugNumber = config->group(); + TQString bugNumber = config->group(); // ### this sucks. we better let Bug implement proper persistance, // because this way of instantiating a bug object doesn't bring back // properties like title, package, etc. (Simon) @@ -40,7 +40,7 @@ BugCommand *BugCommand::load( KConfig *config, const QString &type ) } else if ( type == "Reply" ) { return new BugCommandReply( bug, config->readEntry( type ), config->readNumEntry("Recipient",Normal) ); } else if ( type == "ReplyPrivate" ) { - QStringList args = config->readListEntry( type ); + TQStringList args = config->readListEntry( type ); if ( args.count() != 2 ) return 0; return new BugCommandReplyPrivate( bug, *(args.at(0)), *(args.at(1)) ); } else { @@ -51,41 +51,41 @@ BugCommand *BugCommand::load( KConfig *config, const QString &type ) ///////////////////// Close ///////////////////// -QString BugCommandClose::controlString() const +TQString BugCommandClose::controlString() const { if (m_message.isEmpty()) { return "close " + m_bug.number(); } else { - return QString::null; + return TQString::null; } } -QString BugCommandClose::mailAddress() const +TQString BugCommandClose::mailAddress() const { kdDebug() << "BugCommandClose::mailAddress(): number: " << m_bug.number() << endl; if (m_message.isEmpty()) { - return QString::null; + return TQString::null; } else { return m_bug.number() + "-done@bugs.kde.org"; } } -QString BugCommandClose::mailText() const +TQString BugCommandClose::mailText() const { if (m_message.isEmpty()) { - return QString::null; + return TQString::null; } else { return m_message; } } -QString BugCommandClose::name() +TQString BugCommandClose::name() { return i18n("Close"); } -QString BugCommandClose::details() const +TQString BugCommandClose::details() const { return m_message; } @@ -97,12 +97,12 @@ void BugCommandClose::save( KConfig *config ) ///////////////////// Close Silently ///////////////////// -QString BugCommandCloseSilently::controlString() const +TQString BugCommandCloseSilently::controlString() const { return "done " + m_bug.number(); } -QString BugCommandCloseSilently::name() +TQString BugCommandCloseSilently::name() { return i18n("Close Silently"); } @@ -114,12 +114,12 @@ void BugCommandCloseSilently::save( KConfig *config ) ///////////////////// Reopen ///////////////////// -QString BugCommandReopen::controlString() const +TQString BugCommandReopen::controlString() const { return "reopen " + m_bug.number(); } -QString BugCommandReopen::name() +TQString BugCommandReopen::name() { return i18n("Reopen"); } @@ -131,17 +131,17 @@ void BugCommandReopen::save( KConfig *config ) ///////////////////// Retitle ///////////////////// -QString BugCommandRetitle::controlString() const +TQString BugCommandRetitle::controlString() const { return "retitle " + m_bug.number() + " " + m_title; } -QString BugCommandRetitle::name() +TQString BugCommandRetitle::name() { return i18n("Retitle"); } -QString BugCommandRetitle::details() const +TQString BugCommandRetitle::details() const { return m_title; } @@ -153,17 +153,17 @@ void BugCommandRetitle::save( KConfig *config ) ///////////////////// Merge ///////////////////// -QString BugCommandMerge::controlString() const +TQString BugCommandMerge::controlString() const { return "merge " + m_bugNumbers.join(" "); } -QString BugCommandMerge::name() +TQString BugCommandMerge::name() { return i18n("Merge"); } -QString BugCommandMerge::details() const +TQString BugCommandMerge::details() const { return m_bugNumbers.join(", "); } @@ -175,12 +175,12 @@ void BugCommandMerge::save( KConfig *config ) ///////////////////// Unmerge ///////////////////// -QString BugCommandUnmerge::controlString() const +TQString BugCommandUnmerge::controlString() const { return "unmerge " + m_bug.number(); } -QString BugCommandUnmerge::name() +TQString BugCommandUnmerge::name() { return i18n("Unmerge"); } @@ -192,7 +192,7 @@ void BugCommandUnmerge::save( KConfig *config ) ///////////////////// Reply ///////////////////// -QString BugCommandReply::mailAddress() const +TQString BugCommandReply::mailAddress() const { return m_bug.number() + "@bugs.kde.org"; #if 0 @@ -204,16 +204,16 @@ QString BugCommandReply::mailAddress() const case Quiet: return m_bug.number() + "-quiet@bugs.kde.org"; } - return QString::null; + return TQString::null; #endif } -QString BugCommandReply::mailText() const +TQString BugCommandReply::mailText() const { return m_message; } -QString BugCommandReply::name() +TQString BugCommandReply::name() { return i18n("Reply"); #if 0 @@ -225,11 +225,11 @@ QString BugCommandReply::name() case Quiet: return i18n("Reply (Quiet)"); } - return QString::null; + return TQString::null; #endif } -QString BugCommandReply::details() const +TQString BugCommandReply::details() const { return m_message; } @@ -244,29 +244,29 @@ void BugCommandReply::save( KConfig *config ) ///////////////////// Reply Private ///////////////////// -QString BugCommandReplyPrivate::mailAddress() const +TQString BugCommandReplyPrivate::mailAddress() const { return m_address; } -QString BugCommandReplyPrivate::mailText() const +TQString BugCommandReplyPrivate::mailText() const { return m_message; } -QString BugCommandReplyPrivate::name() +TQString BugCommandReplyPrivate::name() { return i18n("Private Reply"); } -QString BugCommandReplyPrivate::details() const +TQString BugCommandReplyPrivate::details() const { return m_message; } void BugCommandReplyPrivate::save( KConfig *config ) { - QStringList args; + TQStringList args; args << m_address; args << m_message; config->writeEntry( "ReplyPrivate", args ); @@ -274,17 +274,17 @@ void BugCommandReplyPrivate::save( KConfig *config ) ///////////////////// Severity ///////////////////// -QString BugCommandSeverity::controlString() const +TQString BugCommandSeverity::controlString() const { return "severity " + m_bug.number() + " " + m_severity.lower(); } -QString BugCommandSeverity::name() +TQString BugCommandSeverity::name() { return i18n("Severity"); } -QString BugCommandSeverity::details() const +TQString BugCommandSeverity::details() const { return m_severity; } @@ -296,17 +296,17 @@ void BugCommandSeverity::save( KConfig *config ) ///////////////////// Reassign ///////////////////// -QString BugCommandReassign::controlString() const +TQString BugCommandReassign::controlString() const { return "reassign " + m_bug.number() + " " + m_package; } -QString BugCommandReassign::name() +TQString BugCommandReassign::name() { return i18n("Reassign"); } -QString BugCommandReassign::details() const +TQString BugCommandReassign::details() const { return m_package; } diff --git a/kbugbuster/backend/bugcommand.h b/kbugbuster/backend/bugcommand.h index 96b9c85c..38b2513f 100644 --- a/kbugbuster/backend/bugcommand.h +++ b/kbugbuster/backend/bugcommand.h @@ -1,8 +1,8 @@ #ifndef BUGCOMMAND_H #define BUGCOMMAND_H -#include -#include +#include +#include #include "bug.h" #include "package.h" @@ -18,21 +18,21 @@ class BugCommand { BugCommand( const Bug &bug, const Package &pkg ) : m_bug( bug ), m_package( pkg ) {} virtual ~BugCommand() {} - virtual QString controlString() const { return QString::null; } + virtual TQString controlString() const { return TQString::null; } - virtual QString mailAddress() const { return QString::null; } - virtual QString mailText() const { return QString::null; } + virtual TQString mailAddress() const { return TQString::null; } + virtual TQString mailText() const { return TQString::null; } Bug bug() const { return m_bug; } Package package() const { return m_package; } - virtual QString name(); - virtual QString details(); + virtual TQString name(); + virtual TQString details(); - virtual QString type() const { return QString::null; } + virtual TQString type() const { return TQString::null; } virtual void save( KConfig * ) = 0; - static BugCommand *load( KConfig *, const QString &type ); + static BugCommand *load( KConfig *, const TQString &type ); protected: Bug m_bug; @@ -41,22 +41,22 @@ class BugCommand { class BugCommandClose : public BugCommand { public: - BugCommandClose( const Bug &bug, const QString &message, const Package &pkg ) : + BugCommandClose( const Bug &bug, const TQString &message, const Package &pkg ) : BugCommand( bug, pkg ), m_message( message ) {} - QString controlString() const; - QString mailAddress() const; - QString mailText() const; + TQString controlString() const; + TQString mailAddress() const; + TQString mailText() const; - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Close"); } + TQString type() const { return TQString::fromLatin1("Close"); } void save( KConfig * ); private: - QString m_message; + TQString m_message; }; class BugCommandCloseSilently : public BugCommand { @@ -64,11 +64,11 @@ class BugCommandCloseSilently : public BugCommand { BugCommandCloseSilently( const Bug &bug, const Package &pkg ) : BugCommand( bug, pkg ) {} - QString controlString() const; + TQString controlString() const; - QString name(); + TQString name(); - QString type() const { return QString::fromLatin1("CloseSilently"); } + TQString type() const { return TQString::fromLatin1("CloseSilently"); } void save( KConfig * ); }; @@ -78,49 +78,49 @@ class BugCommandReopen : public BugCommand { BugCommandReopen( const Bug &bug, const Package &pkg ) : BugCommand( bug, pkg ) {} - QString controlString() const; + TQString controlString() const; - QString name(); + TQString name(); - QString type() const { return QString::fromLatin1("Reopen"); } + TQString type() const { return TQString::fromLatin1("Reopen"); } void save( KConfig * ); }; class BugCommandRetitle : public BugCommand { public: - BugCommandRetitle( const Bug &bug, const QString &title, const Package &pkg ) : + BugCommandRetitle( const Bug &bug, const TQString &title, const Package &pkg ) : BugCommand( bug, pkg ), m_title( title ) {} - QString controlString() const; + TQString controlString() const; - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Retitle"); } + TQString type() const { return TQString::fromLatin1("Retitle"); } void save( KConfig * ); private: - QString m_title; + TQString m_title; }; class BugCommandMerge : public BugCommand { public: - BugCommandMerge( const QStringList &bugNumbers, const Package &pkg ) : + BugCommandMerge( const TQStringList &bugNumbers, const Package &pkg ) : BugCommand( Bug(), pkg ), m_bugNumbers( bugNumbers ) {} - QString controlString() const; + TQString controlString() const; - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Merge"); } + TQString type() const { return TQString::fromLatin1("Merge"); } void save( KConfig * ); private: - QStringList m_bugNumbers; + TQStringList m_bugNumbers; }; class BugCommandUnmerge : public BugCommand { @@ -128,90 +128,90 @@ class BugCommandUnmerge : public BugCommand { BugCommandUnmerge( const Bug &bug, const Package &pkg ) : BugCommand( bug, pkg ) {} - QString name(); + TQString name(); - QString type() const { return QString::fromLatin1("Unmerge"); } + TQString type() const { return TQString::fromLatin1("Unmerge"); } void save( KConfig * ); - QString controlString() const; + TQString controlString() const; }; class BugCommandReply : public BugCommand { public: - BugCommandReply( const Bug &bug, const QString &message, const int &recipient) : + BugCommandReply( const Bug &bug, const TQString &message, const int &recipient) : BugCommand( bug ), m_message( message ), m_recipient( recipient ) {} - QString mailAddress() const; - QString mailText() const; + TQString mailAddress() const; + TQString mailText() const; - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Reply"); } + TQString type() const { return TQString::fromLatin1("Reply"); } void save( KConfig * ); private: - QString m_message; + TQString m_message; int m_recipient; }; class BugCommandReplyPrivate : public BugCommand { public: - BugCommandReplyPrivate( const Bug &bug, const QString &address, - const QString &message ) : + BugCommandReplyPrivate( const Bug &bug, const TQString &address, + const TQString &message ) : BugCommand( bug ), m_address( address ), m_message( message ) {} - QString mailAddress() const; - QString mailText() const; + TQString mailAddress() const; + TQString mailText() const; - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("ReplyPrivate"); } + TQString type() const { return TQString::fromLatin1("ReplyPrivate"); } void save( KConfig * ); private: - QString m_address; - QString m_message; + TQString m_address; + TQString m_message; }; class BugCommandSeverity : public BugCommand { public: - BugCommandSeverity( const Bug &bug, const QString &severity, const Package &pkg ) : + BugCommandSeverity( const Bug &bug, const TQString &severity, const Package &pkg ) : BugCommand( bug, pkg ), m_severity( severity ) {} - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Severity"); } + TQString type() const { return TQString::fromLatin1("Severity"); } - QString controlString() const; + TQString controlString() const; void save( KConfig * ); private: - QString m_severity; + TQString m_severity; }; class BugCommandReassign : public BugCommand { public: - BugCommandReassign( const Bug &bug, const QString &package, const Package &pkg ) : + BugCommandReassign( const Bug &bug, const TQString &package, const Package &pkg ) : BugCommand( bug, pkg ), m_package( package ) {} - QString name(); - QString details() const; + TQString name(); + TQString details() const; - QString type() const { return QString::fromLatin1("Reassign"); } + TQString type() const { return TQString::fromLatin1("Reassign"); } - QString controlString() const; + TQString controlString() const; void save( KConfig * ); private: - QString m_package; + TQString m_package; }; #endif diff --git a/kbugbuster/backend/bugdetails.cpp b/kbugbuster/backend/bugdetails.cpp index ec512d79..d1ce4666 100644 --- a/kbugbuster/backend/bugdetails.cpp +++ b/kbugbuster/backend/bugdetails.cpp @@ -2,11 +2,11 @@ #include "bugdetails.h" #include "bugdetailsimpl.h" -#include +#include #include #include #include -#include +#include BugDetails::BugDetails() { @@ -32,46 +32,46 @@ BugDetails::~BugDetails() { } -QString BugDetails::version() const +TQString BugDetails::version() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->version; } -QString BugDetails::source() const +TQString BugDetails::source() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->source; } -QString BugDetails::compiler() const +TQString BugDetails::compiler() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->compiler; } -QString BugDetails::os() const +TQString BugDetails::os() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->os; } -QDateTime BugDetails::submissionDate() const +TQDateTime BugDetails::submissionDate() const { - if ( !m_impl ) return QDateTime(); + if ( !m_impl ) return TQDateTime(); if ( m_impl->parts.count() > 0 ) { return m_impl->parts.last().date; } - return QDateTime(); + return TQDateTime(); } int BugDetails::age() const @@ -79,7 +79,7 @@ int BugDetails::age() const if ( !m_impl ) return 0; - return submissionDate().daysTo( QDateTime::currentDateTime() ); + return submissionDate().daysTo( TQDateTime::currentDateTime() ); } BugDetailsPart::List BugDetails::parts() const @@ -90,23 +90,23 @@ BugDetailsPart::List BugDetails::parts() const return m_impl->parts; } -QValueList BugDetails::attachmentDetails() const +TQValueList BugDetails::attachmentDetails() const { if ( m_impl ) return m_impl->attachments; else - return QValueList(); + return TQValueList(); } -void BugDetails::addAttachmentDetails( const QValueList& attch ) +void BugDetails::addAttachmentDetails( const TQValueList& attch ) { if ( m_impl ) m_impl->attachments = attch; } -QValueList BugDetails::extractAttachments() const +TQValueList BugDetails::extractAttachments() const { - QValueList lst; + TQValueList lst; if ( !m_impl ) return lst; BugDetailsPart::List parts = m_impl->parts; @@ -118,15 +118,15 @@ QValueList BugDetails::extractAttachments() const //#define DEBUG_EXTRACT -QValueList BugDetails::extractAttachments( const QString& text ) +TQValueList BugDetails::extractAttachments( const TQString& text ) { - QValueList lst; - QStringList lines = QStringList::split( '\n', text ); + TQValueList lst; + TQStringList lines = TQStringList::split( '\n', text ); #ifdef DEBUG_EXTRACT kdDebug() << k_funcinfo << lines.count() << " lines." << endl; #endif - QString boundary; - for ( QStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it ) + TQString boundary; + for ( TQStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it ) { #ifdef DEBUG_EXTRACT kdDebug() << "Line: " << *it << endl; @@ -137,9 +137,9 @@ QValueList BugDetails::extractAttachments( const QString //kdDebug() << "BugDetails::extractAttachments going back, looking for empty or boundary=" << boundary << endl; #endif // Rewind until last empty line - QStringList::Iterator rit = it; + TQStringList::Iterator rit = it; for ( ; rit != lines.begin() ; --rit ) { - QString line = *rit; + TQString line = *rit; if ( line.endsWith( "
          " ) ) line = line.left( line.length() - 6 ); while ( !line.isEmpty() && line[0] == ' ' ) @@ -161,11 +161,11 @@ QValueList BugDetails::extractAttachments( const QString break; } // Forward until next empty line (end of headers) - and parse filename - QString filename; - QString encoding; + TQString filename; + TQString encoding; rit = it; for ( ; rit != lines.end() ; ++rit ) { - QString header = *rit; + TQString header = *rit; if ( header.endsWith( "
          " ) ) header = header.left( header.length() - 6 ); if ( header[0] == ' ' ) @@ -182,7 +182,7 @@ QValueList BugDetails::extractAttachments( const QString #endif // Taken from libkdenetwork/kmime_headers.cpp int pos=header.find("filename=", 0, false); - QString fn; + TQString fn; if(pos>-1) { pos+=9; fn=header.mid(pos, header.length()-pos); @@ -212,10 +212,10 @@ QValueList BugDetails::extractAttachments( const QString if ( it == lines.end() ) break; // Read encoded contents - QString contents; + TQString contents; for ( ; it != lines.end() ; ++it ) { - QString line = *it; + TQString line = *it; if ( line.endsWith( "" ) ) line = line.left( line.length() - 5 ); if ( line.endsWith( "
          " ) ) // necessary for the boundary check @@ -226,12 +226,12 @@ QValueList BugDetails::extractAttachments( const QString break; if ( line == boundary+"--" ) // end of last attachment { - boundary = QString::null; + boundary = TQString::null; break; } contents += line; // no newline, because of linebreaking between
          } - contents = contents.replace( QRegExp("
          "), QString::null ); + contents = contents.replace( TQRegExp("
          "), TQString::null ); #ifdef DEBUG_EXTRACT kdDebug() << "BugDetails::extractAttachments contents=***\n" << contents << "\n***" << endl; #endif @@ -243,7 +243,7 @@ QValueList BugDetails::extractAttachments( const QString //KCodecs::uudecode( contents.local8Bit(), a.contents /*out*/ ); KMessageBox::information( 0, i18n("Attachment %1 could not be decoded.\nEncoding: %2").arg(filename).arg(encoding) ); #ifdef DEBUG_EXTRACT - kdDebug() << "Result: ***\n" << QCString( a.contents.data(), a.contents.size()+1 ) << "\n*+*" << endl; + kdDebug() << "Result: ***\n" << TQCString( a.contents.data(), a.contents.size()+1 ) << "\n*+*" << endl; #endif a.filename = filename; lst.append(a); diff --git a/kbugbuster/backend/bugdetails.h b/kbugbuster/backend/bugdetails.h index 08d20777..171847a7 100644 --- a/kbugbuster/backend/bugdetails.h +++ b/kbugbuster/backend/bugdetails.h @@ -5,7 +5,7 @@ #include "bugdetailspart.h" #include "bugdetailsimpl.h" -#include +#include #include @@ -14,10 +14,10 @@ class BugDetailsImpl; class BugDetails { public: - typedef QValueList List; + typedef TQValueList List; struct Attachment { - QByteArray contents; - QString filename; + TQByteArray contents; + TQString filename; }; BugDetails(); @@ -26,17 +26,17 @@ public: BugDetails &operator=( const BugDetails &rhs ); ~BugDetails(); - QString version() const; - QString source() const; - QString compiler() const; - QString os() const; + TQString version() const; + TQString source() const; + TQString compiler() const; + TQString os() const; BugDetailsPart::List parts() const; - void addAttachmentDetails( const QValueList& attch ); - QValueList attachmentDetails() const; - QValueList extractAttachments() const; - static QValueList extractAttachments( const QString& text ); + void addAttachmentDetails( const TQValueList& attch ); + TQValueList attachmentDetails() const; + TQValueList extractAttachments() const; + static TQValueList extractAttachments( const TQString& text ); - QDateTime submissionDate() const; + TQDateTime submissionDate() const; int age() const; bool operator==( const BugDetails &rhs ); diff --git a/kbugbuster/backend/bugdetailsimpl.h b/kbugbuster/backend/bugdetailsimpl.h index df3e5d6d..5d6dc459 100644 --- a/kbugbuster/backend/bugdetailsimpl.h +++ b/kbugbuster/backend/bugdetailsimpl.h @@ -8,29 +8,29 @@ struct BugDetailsImpl : public KShared { public: - BugDetailsImpl( const QString &_version, const QString &_source, - const QString &_compiler, const QString &_os, + BugDetailsImpl( const TQString &_version, const TQString &_source, + const TQString &_compiler, const TQString &_os, const BugDetailsPart::List &_parts ) : version( _version ), source( _source ), compiler( _compiler ), os( _os ), parts( _parts ) {} struct AttachmentDetails { AttachmentDetails() { } - AttachmentDetails( const QString& descr, const QString& dt, - const QString& idf ) : description( descr ), + AttachmentDetails( const TQString& descr, const TQString& dt, + const TQString& idf ) : description( descr ), date( dt ), id( idf ) { } - QString description; - QString date; - QString id; + TQString description; + TQString date; + TQString id; }; - QString version; - QString source; - QString compiler; - QString os; + TQString version; + TQString source; + TQString compiler; + TQString os; BugDetailsPart::List parts; - QValueList attachments; + TQValueList attachments; }; #endif diff --git a/kbugbuster/backend/bugdetailsjob.cpp b/kbugbuster/backend/bugdetailsjob.cpp index 83599c1d..1218023d 100644 --- a/kbugbuster/backend/bugdetailsjob.cpp +++ b/kbugbuster/backend/bugdetailsjob.cpp @@ -29,7 +29,7 @@ void BugDetailsJob::start( const Bug &bug ) BugJob::start( bugUrl ); } -void BugDetailsJob::process( const QByteArray &data ) +void BugDetailsJob::process( const TQByteArray &data ) { BugDetails bugDetails; diff --git a/kbugbuster/backend/bugdetailsjob.h b/kbugbuster/backend/bugdetailsjob.h index e07ad3a2..5b6a8887 100644 --- a/kbugbuster/backend/bugdetailsjob.h +++ b/kbugbuster/backend/bugdetailsjob.h @@ -19,7 +19,7 @@ class BugDetailsJob : public BugJob void bugDetailsAvailable( const Bug &bug, const BugDetails &details ); protected: - virtual void process( const QByteArray &data ); + virtual void process( const TQByteArray &data ); private: Bug m_bug; diff --git a/kbugbuster/backend/bugdetailspart.h b/kbugbuster/backend/bugdetailspart.h index 483057c8..7e1cfe7b 100644 --- a/kbugbuster/backend/bugdetailspart.h +++ b/kbugbuster/backend/bugdetailspart.h @@ -1,21 +1,21 @@ #ifndef BUGDETAILSPART_H #define BUGDETAILSPART_H -#include -#include +#include +#include struct BugDetailsPart { - typedef QValueList List; + typedef TQValueList List; BugDetailsPart () {} - BugDetailsPart( const Person &_sender, const QDateTime &_date, - const QString &_text ) + BugDetailsPart( const Person &_sender, const TQDateTime &_date, + const TQString &_text ) : sender( _sender ), date( _date ), text( _text ) {} Person sender; - QDateTime date; - QString text; + TQDateTime date; + TQString text; }; #endif diff --git a/kbugbuster/backend/bugimpl.h b/kbugbuster/backend/bugimpl.h index 630105a1..7fefc53d 100644 --- a/kbugbuster/backend/bugimpl.h +++ b/kbugbuster/backend/bugimpl.h @@ -10,7 +10,7 @@ struct BugImpl : public KShared { public: - BugImpl( const QString &_title, const Person &_submitter, QString _number, + BugImpl( const TQString &_title, const Person &_submitter, TQString _number, uint _age, Bug::Severity _severity, Person _developerTODO, Bug::Status _status, const Bug::BugMergeList& _mergedWith ) : age( _age ), title( _title ), submitter( _submitter ), number( _number ), @@ -20,9 +20,9 @@ public: } uint age; - QString title; + TQString title; Person submitter; - QString number; + TQString number; Bug::Severity severity; Person developerTODO; Bug::Status status; diff --git a/kbugbuster/backend/bugjob.cpp b/kbugbuster/backend/bugjob.cpp index 6f32fb97..1d13913b 100644 --- a/kbugbuster/backend/bugjob.cpp +++ b/kbugbuster/backend/bugjob.cpp @@ -30,14 +30,14 @@ void BugJob::start( const KURL &url ) KIO::Job *job = KIO::get( url, true /*always 'reload=true', we have our own cache*/, false ); - connect( job, SIGNAL( result( KIO::Job * ) ), - this, SLOT( ioResult( KIO::Job * ) ) ); - connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), - this, SLOT( ioData( KIO::Job *, const QByteArray & ) ) ); - connect( job, SIGNAL( infoMessage( KIO::Job *, const QString & ) ), - this, SLOT( ioInfoMessage( KIO::Job *, const QString & ) ) ); - connect( job, SIGNAL( percent( KIO::Job *, unsigned long ) ), - this, SLOT( ioInfoPercent( KIO::Job *, unsigned long ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + this, TQT_SLOT( ioResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), + this, TQT_SLOT( ioData( KIO::Job *, const TQByteArray & ) ) ); + connect( job, TQT_SIGNAL( infoMessage( KIO::Job *, const TQString & ) ), + this, TQT_SLOT( ioInfoMessage( KIO::Job *, const TQString & ) ) ); + connect( job, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ), + this, TQT_SLOT( ioInfoPercent( KIO::Job *, unsigned long ) ) ); } void BugJob::ioResult( KIO::Job *job ) @@ -71,7 +71,7 @@ void BugJob::ioResult( KIO::Job *job ) delete this; } -void BugJob::ioData( KIO::Job *, const QByteArray &data ) +void BugJob::ioData( KIO::Job *, const TQByteArray &data ) { unsigned int start = m_data.size(); @@ -79,9 +79,9 @@ void BugJob::ioData( KIO::Job *, const QByteArray &data ) memcpy( m_data.data() + start, data.data(), data.size() ); } -void BugJob::ioInfoMessage( KIO::Job *, const QString &_text ) +void BugJob::ioInfoMessage( KIO::Job *, const TQString &_text ) { - QString text = _text; + TQString text = _text; emit infoMessage( text ); } diff --git a/kbugbuster/backend/bugjob.h b/kbugbuster/backend/bugjob.h index 2c439810..00ab7f8f 100644 --- a/kbugbuster/backend/bugjob.h +++ b/kbugbuster/backend/bugjob.h @@ -15,27 +15,27 @@ class BugJob : public KIO::Job BugServer *server() const { return mServer; } signals: - void infoMessage( const QString &text ); + void infoMessage( const TQString &text ); void infoPercent( unsigned long percent ); - void error( const QString &text ); + void error( const TQString &text ); void jobEnded( BugJob * ); protected: void start( const KURL &url /*, const KParts::URLArgs &args = KParts::URLArgs()*/ ); - virtual void process( const QByteArray &data ) = 0; + virtual void process( const TQByteArray &data ) = 0; private slots: void ioResult( KIO::Job *job ); - void ioData( KIO::Job *job, const QByteArray &data ); + void ioData( KIO::Job *job, const TQByteArray &data ); - void ioInfoMessage( KIO::Job *job, const QString &text ); + void ioInfoMessage( KIO::Job *job, const TQString &text ); void ioInfoPercent( KIO::Job *job, unsigned long percent ); private: - QByteArray m_data; + TQByteArray m_data; BugServer *mServer; }; diff --git a/kbugbuster/backend/buglistjob.cpp b/kbugbuster/backend/buglistjob.cpp index e1dea2f4..74fe5427 100644 --- a/kbugbuster/backend/buglistjob.cpp +++ b/kbugbuster/backend/buglistjob.cpp @@ -32,8 +32,8 @@ #include -#include -#include +#include +#include BugListJob::BugListJob( BugServer *server ) : BugJob( server ) @@ -44,7 +44,7 @@ BugListJob::~BugListJob() { } -void BugListJob::start( const Package &pkg, const QString &component ) +void BugListJob::start( const Package &pkg, const TQString &component ) { m_package = pkg; m_component = component; @@ -53,7 +53,7 @@ void BugListJob::start( const Package &pkg, const QString &component ) } -void BugListJob::process( const QByteArray &data ) +void BugListJob::process( const TQByteArray &data ) { Bug::List bugs; diff --git a/kbugbuster/backend/buglistjob.h b/kbugbuster/backend/buglistjob.h index 0260d3a0..4272325d 100644 --- a/kbugbuster/backend/buglistjob.h +++ b/kbugbuster/backend/buglistjob.h @@ -28,7 +28,7 @@ #include "package.h" #include "bug.h" -#include +#include class BugListJob : public BugJob { @@ -37,17 +37,17 @@ class BugListJob : public BugJob BugListJob( BugServer * ); virtual ~BugListJob(); - void start( const Package &pkg, const QString &component ); + void start( const Package &pkg, const TQString &component ); protected: - void process( const QByteArray &data ); + void process( const TQByteArray &data ); signals: - void bugListAvailable( const Package &pkg, const QString &component, const Bug::List &bugs ); + void bugListAvailable( const Package &pkg, const TQString &component, const Bug::List &bugs ); protected: Package m_package; - QString m_component; + TQString m_component; }; diff --git a/kbugbuster/backend/bugmybugsjob.cpp b/kbugbuster/backend/bugmybugsjob.cpp index 92aa4448..87767a5b 100644 --- a/kbugbuster/backend/bugmybugsjob.cpp +++ b/kbugbuster/backend/bugmybugsjob.cpp @@ -33,8 +33,8 @@ #include -#include -#include +#include +#include BugMyBugsJob::BugMyBugsJob( BugServer *server ) : BugJob( server ) @@ -58,7 +58,7 @@ void BugMyBugsJob::start() BugJob::start( url ); } -void BugMyBugsJob::process( const QByteArray &data ) +void BugMyBugsJob::process( const TQByteArray &data ) { Bug::List bugs; diff --git a/kbugbuster/backend/bugmybugsjob.h b/kbugbuster/backend/bugmybugsjob.h index f51ee229..92685593 100644 --- a/kbugbuster/backend/bugmybugsjob.h +++ b/kbugbuster/backend/bugmybugsjob.h @@ -40,10 +40,10 @@ public: void start(); protected: - void process( const QByteArray &data ); + void process( const TQByteArray &data ); signals: - void bugListAvailable( const QString &label, const Bug::List &bugs ); + void bugListAvailable( const TQString &label, const Bug::List &bugs ); }; #endif diff --git a/kbugbuster/backend/bugserver.cpp b/kbugbuster/backend/bugserver.cpp index 0e6a70e6..768b76cd 100644 --- a/kbugbuster/backend/bugserver.cpp +++ b/kbugbuster/backend/bugserver.cpp @@ -49,10 +49,10 @@ void BugServer::init() { mCache = new BugCache( identifier() ); - QString commandsFile = locateLocal( "appdata", identifier() + "commands" ); + TQString commandsFile = locateLocal( "appdata", identifier() + "commands" ); mCommandsFile = new KSimpleConfig( commandsFile ); - QString bugzilla = mServerConfig.bugzillaVersion(); + TQString bugzilla = mServerConfig.bugzillaVersion(); if ( bugzilla == "KDE" ) mProcessor = new DomProcessor( this ); else if ( bugzilla == "2.10" ) mProcessor = new HtmlParser_2_10( this ); @@ -82,9 +82,9 @@ BugServerConfig &BugServer::serverConfig() return mServerConfig; } -QString BugServer::identifier() +TQString BugServer::identifier() { - QString id = mServerConfig.baseUrl().host(); + TQString id = mServerConfig.baseUrl().host(); return id; } @@ -102,7 +102,7 @@ KURL BugServer::packageListUrl() return url; } -KURL BugServer::bugListUrl( const Package &product, const QString &component ) +KURL BugServer::bugListUrl( const Package &product, const TQString &component ) { KURL url = mServerConfig.baseUrl(); @@ -132,7 +132,7 @@ KURL BugServer::bugLink( const Bug &bug ) return url; } -KURL BugServer::attachmentViewLink( const QString &id ) +KURL BugServer::attachmentViewLink( const TQString &id ) { KURL url = mServerConfig.baseUrl(); @@ -142,7 +142,7 @@ KURL BugServer::attachmentViewLink( const QString &id ) return url; } -KURL BugServer::attachmentEditLink( const QString &id ) +KURL BugServer::attachmentEditLink( const TQString &id ) { KURL url = mServerConfig.baseUrl(); @@ -152,7 +152,7 @@ KURL BugServer::attachmentEditLink( const QString &id ) return url; } -Bug::Status BugServer::bugStatus( const QString &str ) +Bug::Status BugServer::bugStatus( const TQString &str ) { if ( str == "UNCONFIRMED" ) { return Bug::Unconfirmed; @@ -173,7 +173,7 @@ Bug::Status BugServer::bugStatus( const QString &str ) } } -Bug::Severity BugServer::bugSeverity( const QString &str ) +Bug::Severity BugServer::bugSeverity( const TQString &str ) { if ( str == "critical" ) { return Bug::Critical; @@ -204,9 +204,9 @@ void BugServer::writeConfig( KConfig * /*config*/ ) bool BugServer::queueCommand( BugCommand *cmd ) { - // mCommands[bug] is a QPtrList. Get or create, set to autodelete, then append command. + // mCommands[bug] is a TQPtrList. Get or create, set to autodelete, then append command. mCommands[cmd->bug().number()].setAutoDelete( true ); - QPtrListIterator cmdIt( mCommands[cmd->bug().number()] ); + TQPtrListIterator cmdIt( mCommands[cmd->bug().number()] ); for ( ; cmdIt.current(); ++cmdIt ) if ( cmdIt.current()->type() == cmd->type() ) return false; @@ -214,10 +214,10 @@ bool BugServer::queueCommand( BugCommand *cmd ) return true; } -QPtrList BugServer::queryCommands( const Bug &bug ) const +TQPtrList BugServer::queryCommands( const Bug &bug ) const { CommandsMap::ConstIterator it = mCommands.find( bug.number() ); - if (it == mCommands.end()) return QPtrList(); + if (it == mCommands.end()) return TQPtrList(); else return *it; } @@ -227,14 +227,14 @@ bool BugServer::hasCommandsFor( const Bug &bug ) const return it != mCommands.end(); } -void BugServer::sendCommands( MailSender *mailer, const QString &senderName, - const QString &senderEmail, bool sendBCC, - const QString &recipient ) +void BugServer::sendCommands( MailSender *mailer, const TQString &senderName, + const TQString &senderEmail, bool sendBCC, + const TQString &recipient ) { // Disable mail commands for non-KDE servers if ( mServerConfig.baseUrl() != KURL( "http://bugs.kde.org" ) ) return; - QString controlText; + TQString controlText; // For each bug that has commands..... CommandsMap::ConstIterator it; @@ -242,7 +242,7 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName, Bug bug; Package pkg; // And for each command.... - QPtrListIterator cmdIt( *it ); + TQPtrListIterator cmdIt( *it ); for ( ; cmdIt.current() ; ++cmdIt ) { BugCommand* cmd = cmdIt.current(); bug = cmd->bug(); @@ -257,8 +257,8 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName, // implement message queueing for smtp MailSender *directMailer = mailer->clone(); #if 0 - connect( directMailer, SIGNAL( status( const QString & ) ), - this, SIGNAL( infoMessage( const QString & ) ) ); + connect( directMailer, TQT_SIGNAL( status( const TQString & ) ), + this, TQT_SIGNAL( infoMessage( const TQString & ) ) ); #endif if (!directMailer->send( senderName, senderEmail, cmd->mailAddress(), cmd->bug().title().prepend( "Re: " ), @@ -272,9 +272,9 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName, mCommandsFile->deleteGroup( bug.number(), true ); // done, remove command mCache->invalidateBugDetails( bug ); if ( !pkg.isNull() ) { - mCache->invalidateBugList( pkg, QString::null ); // the status of the bug comes from the buglist... + mCache->invalidateBugList( pkg, TQString::null ); // the status of the bug comes from the buglist... - QStringList::ConstIterator it2; + TQStringList::ConstIterator it2; for (it2 = pkg.components().begin();it2 != pkg.components().end();++it2) { mCache->invalidateBugList( pkg, (*it2) ); // the status of the bug comes from the buglist... } @@ -297,7 +297,7 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName, mCommands.clear(); } -void BugServer::clearCommands( const QString &bug ) +void BugServer::clearCommands( const TQString &bug ) { mCommands.remove( bug ); mCommandsFile->deleteGroup( bug, true ); @@ -309,12 +309,12 @@ bool BugServer::commandsPending() const else return false; } -QStringList BugServer::listCommands() const +TQStringList BugServer::listCommands() const { - QStringList result; + TQStringList result; CommandsMap::ConstIterator it; for(it = mCommands.begin(); it != mCommands.end(); ++it ) { - QPtrListIterator cmdIt( *it ); + TQPtrListIterator cmdIt( *it ); for ( ; cmdIt.current() ; ++cmdIt ) { BugCommand* cmd = cmdIt.current(); if (!cmd->controlString().isNull()) @@ -326,9 +326,9 @@ QStringList BugServer::listCommands() const return result; } -QStringList BugServer::bugsWithCommands() const +TQStringList BugServer::bugsWithCommands() const { - QStringList bugs; + TQStringList bugs; CommandsMap::ConstIterator it; for(it = mCommands.begin(); it != mCommands.end(); ++it ) { @@ -343,7 +343,7 @@ void BugServer::saveCommands() const CommandsMap::ConstIterator it; for(it = mCommands.begin(); it != mCommands.end(); ++it ) { mCommandsFile->setGroup( it.key() ); - QPtrListIterator cmdIt( *it ); + TQPtrListIterator cmdIt( *it ); for ( ; cmdIt.current() ; ++cmdIt ) { BugCommand* cmd = cmdIt.current(); cmd->save( mCommandsFile ); @@ -357,14 +357,14 @@ void BugServer::loadCommands() { mCommands.clear(); - QStringList bugs = mCommandsFile->groupList(); - QStringList::ConstIterator it; + TQStringList bugs = mCommandsFile->groupList(); + TQStringList::ConstIterator it; for( it = bugs.begin(); it != bugs.end(); ++it ) { mCommandsFile->setGroup( *it ); - QMap entries = mCommandsFile->entryMap ( *it ); - QMap::ConstIterator it; + TQMap entries = mCommandsFile->entryMap ( *it ); + TQMap::ConstIterator it; for( it = entries.begin(); it != entries.end(); ++it ) { - QString type = it.key(); + TQString type = it.key(); BugCommand *cmd = BugCommand::load( mCommandsFile, type ); if ( cmd ) { mCommands[cmd->bug().number()].setAutoDelete(true); @@ -384,16 +384,16 @@ const Package::List &BugServer::packages() const return mPackages; } -void BugServer::setBugs( const Package &pkg, const QString &component, +void BugServer::setBugs( const Package &pkg, const TQString &component, const Bug::List &bugs ) { - QPair pkg_key = QPair(pkg, component); + QPair pkg_key = QPair(pkg, component); mBugs[ pkg_key ] = bugs; } -const Bug::List &BugServer::bugs( const Package &pkg, const QString &component ) +const Bug::List &BugServer::bugs( const Package &pkg, const TQString &component ) { - QPair pkg_key = QPair(pkg, component); + QPair pkg_key = QPair(pkg, component); return mBugs[ pkg_key ]; } diff --git a/kbugbuster/backend/bugserver.h b/kbugbuster/backend/bugserver.h index 3b534fa0..b2095569 100644 --- a/kbugbuster/backend/bugserver.h +++ b/kbugbuster/backend/bugserver.h @@ -23,7 +23,7 @@ #ifndef BUGSERVER_H #define BUGSERVER_H -#include +#include #include @@ -50,23 +50,23 @@ class BugServer void setServerConfig( const BugServerConfig & ); BugServerConfig &serverConfig(); - QString identifier(); + TQString identifier(); BugCache *cache() const { return mCache; } KURL packageListUrl(); - KURL bugListUrl( const Package &, const QString &component ); + KURL bugListUrl( const Package &, const TQString &component ); KURL bugDetailsUrl( const Bug & ); KURL bugLink( const Bug & ); - KURL attachmentViewLink( const QString &id ); - KURL attachmentEditLink( const QString &id ); + KURL attachmentViewLink( const TQString &id ); + KURL attachmentEditLink( const TQString &id ); - Bug::Status bugStatus( const QString & ); + Bug::Status bugStatus( const TQString & ); - Bug::Severity bugSeverity( const QString & ); + Bug::Severity bugSeverity( const TQString & ); Processor *processor() const; @@ -81,7 +81,7 @@ class BugServer /** Return all the commands for a given bug. */ - QPtrList queryCommands( const Bug & ) const; + TQPtrList queryCommands( const Bug & ) const; /** Return true if we have a least one command for this bug. */ @@ -89,13 +89,13 @@ class BugServer /** Send all commands (generate the mails). */ - void sendCommands( MailSender *, const QString &senderName, - const QString &senderEmail, bool sendBCC, - const QString &recipient ); + void sendCommands( MailSender *, const TQString &senderName, + const TQString &senderEmail, bool sendBCC, + const TQString &recipient ); /** Forget all commands for a given bug. */ - void clearCommands( const QString &bug ); + void clearCommands( const TQString &bug ); /** Return true if any command has been created. */ @@ -103,11 +103,11 @@ class BugServer /** List all pending commands. */ - QStringList listCommands() const; + TQStringList listCommands() const; /** Return numbers of all bugs having at least one command queued. */ - QStringList bugsWithCommands() const; + TQStringList bugsWithCommands() const; void saveCommands() const; void loadCommands(); @@ -115,9 +115,9 @@ class BugServer void setPackages( const Package::List & ); const Package::List &packages() const; - void setBugs( const Package &, const QString &component, + void setBugs( const Package &, const TQString &component, const Bug::List & ); - const Bug::List &bugs( const Package &, const QString &component ); + const Bug::List &bugs( const Package &, const TQString &component ); void setBugDetails( const Bug &, const BugDetails & ); const BugDetails &bugDetails( const Bug & ); @@ -133,13 +133,13 @@ class BugServer Package::List mPackages; // Map package -> list of bugs - typedef QMap< QPair, Bug::List > BugListMap; + typedef TQMap< QPair, Bug::List > BugListMap; BugListMap mBugs; // Map bug -> bug details (i.e. contents of the report) - typedef QMap< Bug, BugDetails > BugDetailsMap; + typedef TQMap< Bug, BugDetails > BugDetailsMap; BugDetailsMap mBugDetails; // Map bug-number -> list of commands - typedef QMap< QString, QPtrList > CommandsMap; + typedef TQMap< TQString, TQPtrList > CommandsMap; CommandsMap mCommands; KSimpleConfig *mCommandsFile; diff --git a/kbugbuster/backend/bugserverconfig.cpp b/kbugbuster/backend/bugserverconfig.cpp index 0669c0ab..91be1f0c 100644 --- a/kbugbuster/backend/bugserverconfig.cpp +++ b/kbugbuster/backend/bugserverconfig.cpp @@ -37,7 +37,7 @@ BugServerConfig::BugServerConfig() mBugzillaVersion = "KDE"; } -BugServerConfig::BugServerConfig( const QString &name, const KURL &baseUrl ) +BugServerConfig::BugServerConfig( const TQString &name, const KURL &baseUrl ) : mName( name ), mBaseUrl( baseUrl ), mBugzillaVersion( "KDE" ) { } @@ -46,12 +46,12 @@ BugServerConfig::~BugServerConfig() { } -void BugServerConfig::setName( const QString &name ) +void BugServerConfig::setName( const TQString &name ) { mName = name; } -QString BugServerConfig::name() const +TQString BugServerConfig::name() const { return mName; } @@ -66,39 +66,39 @@ KURL BugServerConfig::baseUrl() const return mBaseUrl; } -void BugServerConfig::setUser( const QString &user ) +void BugServerConfig::setUser( const TQString &user ) { mUser = user; } -QString BugServerConfig::user() const +TQString BugServerConfig::user() const { return mUser; } -void BugServerConfig::setPassword( const QString &password ) +void BugServerConfig::setPassword( const TQString &password ) { mPassword = password; } -QString BugServerConfig::password() const +TQString BugServerConfig::password() const { return mPassword; } -void BugServerConfig::setBugzillaVersion( const QString &s ) +void BugServerConfig::setBugzillaVersion( const TQString &s ) { mBugzillaVersion = s; } -QString BugServerConfig::bugzillaVersion() const +TQString BugServerConfig::bugzillaVersion() const { return mBugzillaVersion; } -QStringList BugServerConfig::bugzillaVersions() +TQStringList BugServerConfig::bugzillaVersions() { - QStringList v; + TQStringList v; v << "2.10"; v << "2.14.2"; @@ -110,7 +110,7 @@ QStringList BugServerConfig::bugzillaVersions() return v; } -void BugServerConfig::readConfig( KConfig *cfg, const QString &name ) +void BugServerConfig::readConfig( KConfig *cfg, const TQString &name ) { mName = name; diff --git a/kbugbuster/backend/bugserverconfig.h b/kbugbuster/backend/bugserverconfig.h index 2c9be828..2868a791 100644 --- a/kbugbuster/backend/bugserverconfig.h +++ b/kbugbuster/backend/bugserverconfig.h @@ -24,8 +24,8 @@ #ifndef BUGSERVERCONFIG_H #define BUGSERVERCONFIG_H -#include -#include +#include +#include #include @@ -35,53 +35,53 @@ class BugServerConfig { public: BugServerConfig(); - BugServerConfig( const QString &name, const KURL &baseUrl ); + BugServerConfig( const TQString &name, const KURL &baseUrl ); ~BugServerConfig(); - void setName( const QString &name ); - QString name() const; + void setName( const TQString &name ); + TQString name() const; void setBaseUrl( const KURL &url ); KURL baseUrl() const; - void setUser( const QString &user ); - QString user() const; + void setUser( const TQString &user ); + TQString user() const; - void setPassword( const QString &password ); - QString password() const; + void setPassword( const TQString &password ); + TQString password() const; - void readConfig( KConfig *, const QString &name ); + void readConfig( KConfig *, const TQString &name ); void writeConfig( KConfig * ); - static QStringList bugzillaVersions(); + static TQStringList bugzillaVersions(); - void setBugzillaVersion( const QString & ); - QString bugzillaVersion() const; + void setBugzillaVersion( const TQString & ); + TQString bugzillaVersion() const; - void setRecentPackages( const QStringList &v ) { mRecentPackages = v; } - QStringList recentPackages() const { return mRecentPackages; } + void setRecentPackages( const TQStringList &v ) { mRecentPackages = v; } + TQStringList recentPackages() const { return mRecentPackages; } - void setCurrentPackage( const QString &v ) { mCurrentPackage = v; } - QString currentPackage() const { return mCurrentPackage; } + void setCurrentPackage( const TQString &v ) { mCurrentPackage = v; } + TQString currentPackage() const { return mCurrentPackage; } - void setCurrentComponent( const QString &v ) { mCurrentComponent = v; } - QString currentComponent() const { return mCurrentComponent; } + void setCurrentComponent( const TQString &v ) { mCurrentComponent = v; } + TQString currentComponent() const { return mCurrentComponent; } - void setCurrentBug( const QString &v ) { mCurrentBug = v; } - QString currentBug() const { return mCurrentBug; } + void setCurrentBug( const TQString &v ) { mCurrentBug = v; } + TQString currentBug() const { return mCurrentBug; } private: - QString mName; + TQString mName; KURL mBaseUrl; - QString mUser; - QString mPassword; + TQString mUser; + TQString mPassword; - QString mBugzillaVersion; + TQString mBugzillaVersion; - QStringList mRecentPackages; - QString mCurrentPackage; - QString mCurrentComponent; - QString mCurrentBug; + TQStringList mRecentPackages; + TQString mCurrentPackage; + TQString mCurrentComponent; + TQString mCurrentBug; }; #endif diff --git a/kbugbuster/backend/bugsystem.cpp b/kbugbuster/backend/bugsystem.cpp index 26432e08..c3dc0cdd 100644 --- a/kbugbuster/backend/bugsystem.cpp +++ b/kbugbuster/backend/bugsystem.cpp @@ -27,7 +27,7 @@ KStaticDeleter bssd; BugSystem *BugSystem::s_self = 0; -QString BugSystem::mLastResponse; +TQString BugSystem::mLastResponse; BugSystem *BugSystem::self() { @@ -45,7 +45,7 @@ BugSystem::BugSystem() BugSystem::~BugSystem() { - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for( it = mServerList.begin(); it != mServerList.end(); ++it ) { delete *it; } @@ -80,12 +80,12 @@ void BugSystem::retrievePackageList() emit packageListLoading(); PackageListJob *job = new PackageListJob( mServer ); - connect( job, SIGNAL( packageListAvailable( const Package::List & ) ), - this, SIGNAL( packageListAvailable( const Package::List & ) ) ); - connect( job, SIGNAL( packageListAvailable( const Package::List & ) ), - this, SLOT( setPackageList( const Package::List & ) ) ); - connect( job, SIGNAL( error( const QString & ) ), - this, SIGNAL( loadingError( const QString & ) ) ); + connect( job, TQT_SIGNAL( packageListAvailable( const Package::List & ) ), + this, TQT_SIGNAL( packageListAvailable( const Package::List & ) ) ); + connect( job, TQT_SIGNAL( packageListAvailable( const Package::List & ) ), + this, TQT_SLOT( setPackageList( const Package::List & ) ) ); + connect( job, TQT_SIGNAL( error( const TQString & ) ), + this, TQT_SIGNAL( loadingError( const TQString & ) ) ); connectJob( job ); registerJob( job ); @@ -95,7 +95,7 @@ void BugSystem::retrievePackageList() } } -void BugSystem::retrieveBugList( const Package &pkg, const QString &component ) +void BugSystem::retrieveBugList( const Package &pkg, const TQString &component ) { kdDebug() << "BugSystem::retrieveBugList(): " << pkg.name() << endl; @@ -120,12 +120,12 @@ void BugSystem::retrieveBugList( const Package &pkg, const QString &component ) emit bugListLoading( pkg, component ); BugListJob *job = new BugListJob( mServer ); - connect( job, SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ), - this, SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ) ); - connect( job, SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ), - this, SLOT( setBugList( const Package &, const QString &, const Bug::List & ) ) ); - connect( job, SIGNAL( error( const QString & ) ), - this, SIGNAL( loadingError( const QString & ) ) ); + connect( job, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ), + this, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ) ); + connect( job, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ), + this, TQT_SLOT( setBugList( const Package &, const TQString &, const Bug::List & ) ) ); + connect( job, TQT_SIGNAL( error( const TQString & ) ), + this, TQT_SIGNAL( loadingError( const TQString & ) ) ); connectJob( job ); registerJob( job ); @@ -152,10 +152,10 @@ void BugSystem::retrieveMyBugsList() BugMyBugsJob *job = new BugMyBugsJob( mServer ); - connect( job, SIGNAL( bugListAvailable( const QString &, const Bug::List & ) ), - this, SIGNAL( bugListAvailable( const QString &, const Bug::List & ) ) ); - connect( job, SIGNAL( error( const QString & ) ), - this, SIGNAL( loadingError( const QString & ) ) ); + connect( job, TQT_SIGNAL( bugListAvailable( const TQString &, const Bug::List & ) ), + this, TQT_SIGNAL( bugListAvailable( const TQString &, const Bug::List & ) ) ); + connect( job, TQT_SIGNAL( error( const TQString & ) ), + this, TQT_SIGNAL( loadingError( const TQString & ) ) ); connectJob( job ); registerJob( job ); @@ -184,12 +184,12 @@ void BugSystem::retrieveBugDetails( const Bug &bug ) emit bugDetailsLoading( bug ); BugDetailsJob *job = new BugDetailsJob( mServer ); - connect( job, SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ), - this, SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ) ); - connect( job, SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ), - this, SLOT( setBugDetails( const Bug &, const BugDetails & ) ) ); - connect( job, SIGNAL( error( const QString & ) ), - this, SIGNAL( bugDetailsLoadingError() ) ); + connect( job, TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ), + this, TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ) ); + connect( job, TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ), + this, TQT_SLOT( setBugDetails( const Bug &, const BugDetails & ) ) ); + connect( job, TQT_SIGNAL( error( const TQString & ) ), + this, TQT_SIGNAL( bugDetailsLoadingError() ) ); connectJob( job ); registerJob( job ); @@ -201,12 +201,12 @@ void BugSystem::retrieveBugDetails( const Bug &bug ) void BugSystem::connectJob( BugJob *job ) { - connect( job, SIGNAL( infoMessage( const QString & ) ), - this, SIGNAL( infoMessage( const QString & ) ) ); - connect( job, SIGNAL( infoPercent( unsigned long ) ), - this, SIGNAL( infoPercent( unsigned long ) ) ); - connect( job, SIGNAL( jobEnded( BugJob * ) ), - SLOT( unregisterJob( BugJob * ) ) ); + connect( job, TQT_SIGNAL( infoMessage( const TQString & ) ), + this, TQT_SIGNAL( infoMessage( const TQString & ) ) ); + connect( job, TQT_SIGNAL( infoPercent( unsigned long ) ), + this, TQT_SIGNAL( infoPercent( unsigned long ) ) ); + connect( job, TQT_SIGNAL( jobEnded( BugJob * ) ), + TQT_SLOT( unregisterJob( BugJob * ) ) ); } void BugSystem::setPackageList( const Package::List &pkgs ) @@ -216,7 +216,7 @@ void BugSystem::setPackageList( const Package::List &pkgs ) mServer->cache()->savePackageList( pkgs ); } -void BugSystem::setBugList( const Package &pkg, const QString &component, const Bug::List &bugs ) +void BugSystem::setBugList( const Package &pkg, const TQString &component, const Bug::List &bugs ) { mServer->setBugs( pkg, component, bugs ); mServer->cache()->saveBugList( pkg, component, bugs ); @@ -234,7 +234,7 @@ Package::List BugSystem::packageList() const return mServer->packages(); } -Package BugSystem::package( const QString &pkgname ) const +Package BugSystem::package( const TQString &pkgname ) const { Package::List::ConstIterator it; for( it = mServer->packages().begin(); it != mServer->packages().end(); ++it ) { @@ -243,7 +243,7 @@ Package BugSystem::package( const QString &pkgname ) const return Package(); } -Bug BugSystem::bug( const Package &pkg, const QString &component, const QString &number ) const +Bug BugSystem::bug( const Package &pkg, const TQString &component, const TQString &number ) const { Bug::List bugs = mServer->bugs( pkg, component ); @@ -259,7 +259,7 @@ void BugSystem::queueCommand( BugCommand *cmd ) if ( mServer->queueCommand( cmd ) ) emit commandQueued( cmd ); } -void BugSystem::clearCommands( const QString &bug ) +void BugSystem::clearCommands( const TQString &bug ) { mServer->clearCommands( bug ); @@ -268,9 +268,9 @@ void BugSystem::clearCommands( const QString &bug ) void BugSystem::clearCommands() { - QStringList bugs = mServer->bugsWithCommands(); + TQStringList bugs = mServer->bugsWithCommands(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = bugs.begin(); it != bugs.end(); ++it ) { clearCommands( *it ); } @@ -278,42 +278,42 @@ void BugSystem::clearCommands() void BugSystem::sendCommands() { - QString recipient = KBBPrefs::instance()->mOverrideRecipient; + TQString recipient = KBBPrefs::instance()->mOverrideRecipient; bool sendBCC = KBBPrefs::instance()->mSendBCC; KEMailSettings emailSettings; - QString senderName = emailSettings.getSetting( KEMailSettings::RealName ); - QString senderEmail = emailSettings.getSetting( KEMailSettings::EmailAddress ); - QString smtpServer = emailSettings.getSetting( KEMailSettings::OutServer ); + TQString senderName = emailSettings.getSetting( KEMailSettings::RealName ); + TQString senderEmail = emailSettings.getSetting( KEMailSettings::EmailAddress ); + TQString smtpServer = emailSettings.getSetting( KEMailSettings::OutServer ); MailSender::MailClient client = (MailSender::MailClient)KBBPrefs::instance()->mMailClient; // ### connect to signals MailSender *mailer = new MailSender( client, smtpServer ); - connect( mailer, SIGNAL( status( const QString & ) ), - SIGNAL( infoMessage( const QString & ) ) ); + connect( mailer, TQT_SIGNAL( status( const TQString & ) ), + TQT_SIGNAL( infoMessage( const TQString & ) ) ); mServer->sendCommands( mailer, senderName, senderEmail, sendBCC, recipient ); } -void BugSystem::setServerList( const QValueList &servers ) +void BugSystem::setServerList( const TQValueList &servers ) { if ( servers.isEmpty() ) return; - QString currentServer; + TQString currentServer; if ( mServer ) currentServer = mServer->serverConfig().name(); else currentServer = KBBPrefs::instance()->mCurrentServer; killAllJobs(); - QValueList::ConstIterator serverIt; + TQValueList::ConstIterator serverIt; for( serverIt = mServerList.begin(); serverIt != mServerList.end(); ++serverIt ) { delete *serverIt; } mServerList.clear(); - QValueList::ConstIterator cfgIt; + TQValueList::ConstIterator cfgIt; for( cfgIt = servers.begin(); cfgIt != servers.end(); ++cfgIt ) { mServerList.append( new BugServer( *cfgIt ) ); } @@ -321,12 +321,12 @@ void BugSystem::setServerList( const QValueList &servers ) setCurrentServer( currentServer ); } -QValueList BugSystem::serverList() +TQValueList BugSystem::serverList() { return mServerList; } -void BugSystem::setCurrentServer( const QString &name ) +void BugSystem::setCurrentServer( const TQString &name ) { killAllJobs(); @@ -347,9 +347,9 @@ void BugSystem::setCurrentServer( const QString &name ) } } -BugServer *BugSystem::findServer( const QString &name ) +BugServer *BugSystem::findServer( const TQString &name ) { - QValueList::ConstIterator serverIt; + TQValueList::ConstIterator serverIt; for( serverIt = mServerList.begin(); serverIt != mServerList.end(); ++serverIt ) { if ( (*serverIt)->serverConfig().name() == name ) return *serverIt; @@ -363,12 +363,12 @@ void BugSystem::saveQuery( const KURL &url ) mLastResponse += "\n\n"; } -void BugSystem::saveResponse( const QByteArray &response ) +void BugSystem::saveResponse( const TQByteArray &response ) { mLastResponse += response; } -QString BugSystem::lastResponse() +TQString BugSystem::lastResponse() { return mLastResponse; } @@ -376,14 +376,14 @@ QString BugSystem::lastResponse() void BugSystem::readConfig( KConfig *config ) { config->setGroup("Servers"); - QStringList servers = config->readListEntry( "Servers" ); + TQStringList servers = config->readListEntry( "Servers" ); - QValueList serverList; + TQValueList serverList; if ( servers.isEmpty() ) { serverList.append( BugServerConfig() ); } else { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = servers.begin(); it != servers.end(); ++it ) { BugServerConfig cfg; cfg.readConfig( config, *it ); @@ -396,9 +396,9 @@ void BugSystem::readConfig( KConfig *config ) void BugSystem::writeConfig( KConfig *config ) { - QValueList::ConstIterator itServer; - QStringList servers; - QValueList serverList = BugSystem::self()->serverList(); + TQValueList::ConstIterator itServer; + TQStringList servers; + TQValueList serverList = BugSystem::self()->serverList(); for( itServer = serverList.begin(); itServer != serverList.end(); ++itServer ) { BugServerConfig serverConfig = (*itServer)->serverConfig(); diff --git a/kbugbuster/backend/bugsystem.h b/kbugbuster/backend/bugsystem.h index c573698b..c5c37d18 100644 --- a/kbugbuster/backend/bugsystem.h +++ b/kbugbuster/backend/bugsystem.h @@ -8,10 +8,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include class KConfig; @@ -36,13 +36,13 @@ class BugSystem : public QObject /** BugSystem takes ownership of the BugServerConfig objects. */ - void setServerList( const QValueList &servers ); - QValueList serverList(); + void setServerList( const TQValueList &servers ); + TQValueList serverList(); - void setCurrentServer( const QString & ); + void setCurrentServer( const TQString & ); void retrievePackageList(); - void retrieveBugList( const Package &, const QString &component ); + void retrieveBugList( const Package &, const TQString &component ); void retrieveBugDetails( const Bug & ); /** @@ -57,7 +57,7 @@ class BugSystem : public QObject /** Forget all commands for a given bug. */ - void clearCommands( const QString &bug ); + void clearCommands( const TQString &bug ); /** Forget all commands for all bugs. */ @@ -72,44 +72,44 @@ class BugSystem : public QObject Package::List packageList() const; - Package package( const QString &pkgname ) const; - Bug bug( const Package &pkg, const QString &component, const QString &number ) const; + Package package( const TQString &pkgname ) const; + Bug bug( const Package &pkg, const TQString &component, const TQString &number ) const; static void saveQuery( const KURL &url ); - static void saveResponse( const QByteArray &d ); - static QString lastResponse(); + static void saveResponse( const TQByteArray &d ); + static TQString lastResponse(); void readConfig( KConfig * ); void writeConfig( KConfig * ); signals: void packageListAvailable( const Package::List &pkgs ); - void bugListAvailable( const Package &pkg, const QString &component, const Bug::List & ); - void bugListAvailable( const QString &label, const Bug::List & ); + void bugListAvailable( const Package &pkg, const TQString &component, const Bug::List & ); + void bugListAvailable( const TQString &label, const Bug::List & ); void bugDetailsAvailable( const Bug &, const BugDetails & ); void packageListLoading(); - void bugListLoading( const Package &, const QString &component ); - void bugListLoading( const QString &label ); + void bugListLoading( const Package &, const TQString &component ); + void bugListLoading( const TQString &label ); void bugDetailsLoading( const Bug & ); void packageListCacheMiss(); void bugListCacheMiss( const Package &package ); - void bugListCacheMiss( const QString &label ); + void bugListCacheMiss( const TQString &label ); void bugDetailsCacheMiss( const Bug & ); void bugDetailsLoadingError(); - void infoMessage( const QString &message ); + void infoMessage( const TQString &message ); void infoPercent( unsigned long percent ); void commandQueued( BugCommand * ); - void commandCanceled( const QString & ); + void commandCanceled( const TQString & ); - void loadingError( const QString &text ); + void loadingError( const TQString &text ); protected: - BugServer *findServer( const QString &name ); + BugServer *findServer( const TQString &name ); void registerJob( BugJob * ); @@ -122,7 +122,7 @@ class BugSystem : public QObject private slots: void setPackageList( const Package::List &pkgs ); - void setBugList( const Package &pkg, const QString &component, const Bug::List &bugs ); + void setBugList( const Package &pkg, const TQString &component, const Bug::List &bugs ); void setBugDetails( const Bug &bug, const BugDetails &details ); private: @@ -130,13 +130,13 @@ class BugSystem : public QObject BugServer *mServer; - QValueList mServerList; + TQValueList mServerList; - QPtrList mJobs; + TQPtrList mJobs; static BugSystem *s_self; - static QString mLastResponse; + static TQString mLastResponse; }; #endif diff --git a/kbugbuster/backend/domprocessor.cpp b/kbugbuster/backend/domprocessor.cpp index 7643ca11..bfef2ca6 100644 --- a/kbugbuster/backend/domprocessor.cpp +++ b/kbugbuster/backend/domprocessor.cpp @@ -23,8 +23,8 @@ #include "domprocessor.h" -#include -#include +#include +#include #include #include @@ -44,15 +44,15 @@ DomProcessor::~DomProcessor() { } -KBB::Error DomProcessor::parsePackageList( const QByteArray &data, +KBB::Error DomProcessor::parsePackageList( const TQByteArray &data, Package::List &packages ) { - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent( data ) ) { return KBB::Error( "Error parsing xml response for package list request." ); } - QDomElement bugzilla = doc.documentElement(); + TQDomElement bugzilla = doc.documentElement(); if ( bugzilla.isNull() ) { return KBB::Error( "No document in xml response." ); @@ -63,14 +63,14 @@ KBB::Error DomProcessor::parsePackageList( const QByteArray &data, return err; } -KBB::Error DomProcessor::parseBugList( const QByteArray &data, Bug::List &bugs ) +KBB::Error DomProcessor::parseBugList( const TQByteArray &data, Bug::List &bugs ) { - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent( data ) ) { return KBB::Error( "Error parsing xml response for bug list request" ); } - QDomElement bugzilla = doc.documentElement(); + TQDomElement bugzilla = doc.documentElement(); if ( bugzilla.isNull() ) { return KBB::Error( "No document in xml response." ); @@ -81,23 +81,23 @@ KBB::Error DomProcessor::parseBugList( const QByteArray &data, Bug::List &bugs ) return err; } -KBB::Error DomProcessor::parseBugDetails( const QByteArray &data, +KBB::Error DomProcessor::parseBugDetails( const TQByteArray &data, BugDetails &bugDetails ) { - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent( data ) ) { return KBB::Error( "Error parsing xml response for bug details request." ); } - QDomElement bugzilla = doc.documentElement(); + TQDomElement bugzilla = doc.documentElement(); if ( bugzilla.isNull() ) { return KBB::Error( "No document in xml response." ); } - QDomNode p; + TQDomNode p; for ( p = bugzilla.firstChild(); !p.isNull(); p = p.nextSibling() ) { - QDomElement bug = p.toElement(); + TQDomElement bug = p.toElement(); if ( bug.tagName() != "bug" ) continue; KBB::Error err = parseDomBugDetails( bug, bugDetails ); @@ -109,24 +109,24 @@ KBB::Error DomProcessor::parseBugDetails( const QByteArray &data, } -KBB::Error DomProcessor::parseDomPackageList( const QDomElement &element, +KBB::Error DomProcessor::parseDomPackageList( const TQDomElement &element, Package::List &packages ) { - QDomNode p; + TQDomNode p; for ( p = element.firstChild(); !p.isNull(); p = p.nextSibling() ) { - QDomElement bug = p.toElement(); + TQDomElement bug = p.toElement(); if ( bug.tagName() != "product" ) continue; - QString pkgName = bug.attribute( "name" ); + TQString pkgName = bug.attribute( "name" ); uint bugCount = 999; Person maintainer; - QString description; - QStringList components; + TQString description; + TQStringList components; - QDomNode n; + TQDomNode n; for( n = bug.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.tagName() == "descr" ) description= e.text().stripWhiteSpace(); if ( e.tagName() == "component" ) components += e.text().stripWhiteSpace(); } @@ -141,13 +141,13 @@ KBB::Error DomProcessor::parseDomPackageList( const QDomElement &element, return KBB::Error(); } -KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement, +KBB::Error DomProcessor::parseDomBugList( const TQDomElement &topElement, Bug::List &bugs ) { - QDomElement element; + TQDomElement element; if ( topElement.tagName() != "querybugids" ) { - QDomNode buglist = topElement.namedItem( "querybugids" ); + TQDomNode buglist = topElement.namedItem( "querybugids" ); element = buglist.toElement(); if ( element.isNull() ) { return KBB::Error( "No querybugids element found." ); @@ -156,9 +156,9 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement, element = topElement; } - QDomNode p; + TQDomNode p; for ( p = element.firstChild(); !p.isNull(); p = p.nextSibling() ) { - QDomElement hit = p.toElement(); + TQDomElement hit = p.toElement(); kdDebug() << "DomProcessor::parseDomBugList(): tag: " << hit.tagName() << endl; @@ -166,20 +166,20 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement, return KBB::Error( "Error: " + hit.text() ); } else if ( hit.tagName() != "hit" ) continue; - QString title; - QString submitterName; - QString submitterEmail; - QString bugNr; + TQString title; + TQString submitterName; + TQString submitterEmail; + TQString bugNr; Bug::Status status = Bug::StatusUndefined; Bug::Severity severity = Bug::SeverityUndefined; Person developerTodo; Bug::BugMergeList mergedList; uint age = 0xFFFFFFFF; - QDomNode n; + TQDomNode n; for ( n = hit.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.tagName() == "bugid" ) bugNr = e.text(); @@ -194,7 +194,7 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement, else if ( e.tagName() == "severity" ) severity = Bug::stringToSeverity( e.text() ); else if ( e.tagName() == "creationdate" ) - age = ( QDateTime::fromString( e.text(), Qt::ISODate ) ).daysTo( QDateTime::currentDateTime() ); + age = ( TQDateTime::fromString( e.text(), Qt::ISODate ) ).daysTo( TQDateTime::currentDateTime() ); } Person submitter( submitterName, submitterEmail ); @@ -210,57 +210,57 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement, return KBB::Error(); } -KBB::Error DomProcessor::parseDomBugDetails( const QDomElement &element, +KBB::Error DomProcessor::parseDomBugDetails( const TQDomElement &element, BugDetails &bugDetails ) { if ( element.tagName() != "bug" ) return KBB::Error( "No tag found" ); BugDetailsPart::List parts; - QValueList attachments; + TQValueList attachments; - QString versionXml; - QString osXml; + TQString versionXml; + TQString osXml; - QString version; - QString source; - QString compiler; - QString os; + TQString version; + TQString source; + TQString compiler; + TQString os; - QDomNode n; + TQDomNode n; for( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.tagName() == "version" ) versionXml = e.text().stripWhiteSpace(); if ( e.tagName() == "op_sys" ) osXml = e.text().stripWhiteSpace(); if ( e.tagName() == "long_desc" ) { - QString encoding = e.attribute( "encoding" ); + TQString encoding = e.attribute( "encoding" ); Person sender; - QDateTime date; - QString text; + TQDateTime date; + TQString text; - QDomNode n2; + TQDomNode n2; for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) { - QDomElement e2 = n2.toElement(); + TQDomElement e2 = n2.toElement(); if ( e2.tagName() == "who" ) { sender = Person::parseFromString( e2.text() ); } else if ( e2.tagName() == "bug_when" ) { date = parseDate( e2.text().stripWhiteSpace() ); } else if ( e2.tagName() == "thetext" ) { - QString in; + TQString in; if ( encoding == "base64" ) { in = KCodecs::base64Decode( e2.text().latin1() ); } else { in = e2.text(); } - QString raw = QStyleSheet::escape( in ); + TQString raw = TQStyleSheet::escape( in ); if ( parts.isEmpty() ) { - QTextStream ts( &raw, IO_ReadOnly ); - QString line; + TQTextStream ts( &raw, IO_ReadOnly ); + TQString line; while( !( line = ts.readLine() ).isNull() ) { if ( parseAttributeLine( line, "Version", version ) ) continue; if ( parseAttributeLine( line, "Installed from", source ) ) continue; @@ -272,8 +272,8 @@ KBB::Error DomProcessor::parseDomBugDetails( const QDomElement &element, } else { text += raw; } - QString bugBaseURL = server()->serverConfig().baseUrl().htmlURL(); - text = "
          " + wrapLines( text ).replace( QRegExp( "(Created an attachment \\(id=([0-9]+)\\))" ),
          +          TQString bugBaseURL = server()->serverConfig().baseUrl().htmlURL();
          +          text = "
          " + wrapLines( text ).replace( TQRegExp( "(Created an attachment \\(id=([0-9]+)\\))" ),
                         "\\1" ) + "\n
          "; } } @@ -282,15 +282,15 @@ KBB::Error DomProcessor::parseDomBugDetails( const QDomElement &element, } if ( e.tagName() == "attachment" ) { - QString attachid, date, desc; - for( QDomNode node = e.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement e2 = node.toElement(); + TQString attachid, date, desc; + for( TQDomNode node = e.firstChild(); !node.isNull(); node = node.nextSibling() ) { + TQDomElement e2 = node.toElement(); if ( e2.tagName() == "attachid" ) { attachid = e2.text(); } else if ( e2.tagName() == "date" ) { date = e2.text().stripWhiteSpace(); } else if ( e2.tagName() == "desc" ) { - desc = "
          " + wrapLines( QStyleSheet::escape(e2.text()) ) + "\n
          "; + desc = "
          " + wrapLines( TQStyleSheet::escape(e2.text()) ) + "\n
          "; } } attachments.append( BugDetailsImpl::AttachmentDetails( desc, date, attachid ) ); @@ -313,7 +313,7 @@ void DomProcessor::setPackageListQuery( KURL &url ) url.setQuery( "?data=versiontable" ); } -void DomProcessor::setBugListQuery( KURL &url, const Package &product, const QString &component ) +void DomProcessor::setBugListQuery( KURL &url, const Package &product, const TQString &component ) { if ( server()->serverConfig().bugzillaVersion() == "Bugworld" ) { url.setFileName( "bugworld.cgi" ); @@ -321,7 +321,7 @@ void DomProcessor::setBugListQuery( KURL &url, const Package &product, const QSt url.setFileName( "xmlquery.cgi" ); } - QString user = server()->serverConfig().user(); + TQString user = server()->serverConfig().user(); if ( component.isEmpty() ) url.setQuery( "?user=" + user + "&product=" + product.name() ); @@ -338,18 +338,18 @@ void DomProcessor::setBugDetailsQuery( KURL &url, const Bug &bug ) url.setQuery( "?id=" + bug.number() ); } -QString DomProcessor::wrapLines( const QString &text ) +TQString DomProcessor::wrapLines( const TQString &text ) { int wrap = KBBPrefs::instance()->mWrapColumn; - QStringList lines = QStringList::split( '\n', text, true ); + TQStringList lines = TQStringList::split( '\n', text, true ); //kdDebug() << lines.count() << " lines." << endl; - QString out; + TQString out; bool removeBlankLines = true; - for ( QStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it ) + for ( TQStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it ) { - QString line = *it; + TQString line = *it; if ( removeBlankLines ) { if ( line.isEmpty() ) continue; @@ -358,7 +358,7 @@ QString DomProcessor::wrapLines( const QString &text ) //kdDebug() << "BugDetailsJob::processNode IN line='" << line << "'" << endl; - QString wrappedLine; + TQString wrappedLine; while ( line.length() > uint( wrap ) ) { int breakPoint = line.findRev( ' ', wrap ); @@ -380,14 +380,14 @@ QString DomProcessor::wrapLines( const QString &text ) return out; } -bool DomProcessor::parseAttributeLine( const QString &line, const QString &key, - QString &result ) +bool DomProcessor::parseAttributeLine( const TQString &line, const TQString &key, + TQString &result ) { if ( !result.isEmpty() ) return false; if ( !line.startsWith( key + ":" ) ) return false; - QString value = line.mid( key.length() + 1 ); + TQString value = line.mid( key.length() + 1 ); value = value.stripWhiteSpace(); result = value; @@ -395,9 +395,9 @@ bool DomProcessor::parseAttributeLine( const QString &line, const QString &key, return true; } -QDateTime DomProcessor::parseDate( const QString &dateStr ) +TQDateTime DomProcessor::parseDate( const TQString &dateStr ) { - QDateTime date = QDateTime::fromString( dateStr, Qt::ISODate ); + TQDateTime date = TQDateTime::fromString( dateStr, Qt::ISODate ); return date; } diff --git a/kbugbuster/backend/domprocessor.h b/kbugbuster/backend/domprocessor.h index 1553ae4a..a561cbea 100644 --- a/kbugbuster/backend/domprocessor.h +++ b/kbugbuster/backend/domprocessor.h @@ -31,7 +31,7 @@ #include -#include +#include class BugServer; @@ -41,25 +41,25 @@ class DomProcessor : public Processor DomProcessor( BugServer * ); virtual ~DomProcessor(); - KBB::Error parsePackageList( const QByteArray &data, + KBB::Error parsePackageList( const TQByteArray &data, Package::List &packages ); - KBB::Error parseBugList( const QByteArray &data, Bug::List &bugs ); - KBB::Error parseBugDetails( const QByteArray &, BugDetails & ); + KBB::Error parseBugList( const TQByteArray &data, Bug::List &bugs ); + KBB::Error parseBugDetails( const TQByteArray &, BugDetails & ); void setPackageListQuery( KURL & ); - void setBugListQuery( KURL &, const Package &, const QString &component ); + void setBugListQuery( KURL &, const Package &, const TQString &component ); void setBugDetailsQuery( KURL &, const Bug & ); protected: - virtual KBB::Error parseDomPackageList( const QDomElement &, + virtual KBB::Error parseDomPackageList( const TQDomElement &, Package::List & ); - virtual KBB::Error parseDomBugList( const QDomElement &, Bug::List & ); - virtual KBB::Error parseDomBugDetails( const QDomElement &, BugDetails & ); + virtual KBB::Error parseDomBugList( const TQDomElement &, Bug::List & ); + virtual KBB::Error parseDomBugDetails( const TQDomElement &, BugDetails & ); - QString wrapLines( const QString & ); - bool parseAttributeLine( const QString &line, const QString &key, - QString &result ); - QDateTime parseDate( const QString & ); + TQString wrapLines( const TQString & ); + bool parseAttributeLine( const TQString &line, const TQString &key, + TQString &result ); + TQDateTime parseDate( const TQString & ); }; #endif diff --git a/kbugbuster/backend/error.h b/kbugbuster/backend/error.h index e12bcf61..595c070c 100644 --- a/kbugbuster/backend/error.h +++ b/kbugbuster/backend/error.h @@ -28,14 +28,14 @@ namespace KBB { class Error { public: - Error( const QString &msg = QString::null ) : mMsg( msg ) {} + Error( const TQString &msg = TQString::null ) : mMsg( msg ) {} operator bool() { return !mMsg.isEmpty(); } - QString message() const { return mMsg; } + TQString message() const { return mMsg; } private: - QString mMsg; + TQString mMsg; }; } diff --git a/kbugbuster/backend/htmlparser.cpp b/kbugbuster/backend/htmlparser.cpp index 7e53c1bd..055b8d11 100644 --- a/kbugbuster/backend/htmlparser.cpp +++ b/kbugbuster/backend/htmlparser.cpp @@ -28,22 +28,22 @@ #include -#include -#include -#include +#include +#include +#include -KBB::Error HtmlParser::parseBugList( const QByteArray &data, Bug::List &bugs ) +KBB::Error HtmlParser::parseBugList( const TQByteArray &data, Bug::List &bugs ) { - QBuffer buffer( data ); + TQBuffer buffer( data ); if ( !buffer.open( IO_ReadOnly ) ) { return KBB::Error( "Can't open buffer" ); } - QTextStream ts( &buffer ); + TQTextStream ts( &buffer ); mState = Idle; - QString line; + TQString line; while ( !( line = ts.readLine() ).isNull() ) { KBB::Error err = parseLine( line, bugs ); if ( err ) return err; @@ -52,19 +52,19 @@ KBB::Error HtmlParser::parseBugList( const QByteArray &data, Bug::List &bugs ) return KBB::Error(); } -KBB::Error HtmlParser::parsePackageList( const QByteArray &data, +KBB::Error HtmlParser::parsePackageList( const TQByteArray &data, Package::List &packages ) { init(); - QBuffer buffer( data ); + TQBuffer buffer( data ); if ( !buffer.open( IO_ReadOnly ) ) { return KBB::Error( "Can't open buffer" ); } - QTextStream ts( &buffer ); + TQTextStream ts( &buffer ); - QString line; + TQString line; while ( !( line = ts.readLine() ).isNull() ) { KBB::Error err = parseLine( line, packages ); if ( err ) return err; @@ -84,12 +84,12 @@ void HtmlParser::setPackageListQuery( KURL &url ) url.setFileName( "query.cgi" ); } -KBB::Error HtmlParser::parseLine( const QString &, Bug::List & ) +KBB::Error HtmlParser::parseLine( const TQString &, Bug::List & ) { return KBB::Error(); } -KBB::Error HtmlParser::parseLine( const QString &, Package::List & ) +KBB::Error HtmlParser::parseLine( const TQString &, Package::List & ) { return KBB::Error(); } @@ -98,20 +98,20 @@ void HtmlParser::processResult( Package::List & ) { } -QString HtmlParser::getAttribute( const QString &line, const QString &name ) +TQString HtmlParser::getAttribute( const TQString &line, const TQString &name ) { int pos1 = line.find( name + "=\"" ); - if ( pos1 < 1 ) return QString::null; + if ( pos1 < 1 ) return TQString::null; pos1 += name.length() + 2; int pos2 = line.find( "\"", pos1 ); - if ( pos2 < 1 ) return QString::null; + if ( pos2 < 1 ) return TQString::null; return line.mid( pos1, pos2 - pos1 ); } -bool HtmlParser::getCpts( const QString &line, QString &key, - QStringList &values ) +bool HtmlParser::getCpts( const TQString &line, TQString &key, + TQStringList &values ) { - if ( !line.contains( QRegExp( "\\s*cpts" ) ) ) return false; + if ( !line.contains( TQRegExp( "\\s*cpts" ) ) ) return false; // kdDebug() << "LINE: " << line << endl; int pos1 = line.find( "[" ); @@ -131,7 +131,7 @@ bool HtmlParser::getCpts( const QString &line, QString &key, if ( pos1 >= 0 ) pos2 = line.find( "'", ++pos1 ); while ( pos1 >= 0 && pos2 >= 0 ) { - QString value = line.mid( pos1, pos2 - pos1 ); + TQString value = line.mid( pos1, pos2 - pos1 ); // kdDebug() << " VALUE: " << value << endl; values.append( value ); @@ -143,16 +143,16 @@ bool HtmlParser::getCpts( const QString &line, QString &key, return true; } -KBB::Error HtmlParser_2_10::parseLine( const QString &line, Bug::List &bugs ) +KBB::Error HtmlParser_2_10::parseLine( const TQString &line, Bug::List &bugs ) { if ( line.startsWith( "" ); if ( pos >= 0 ) summary = line.mid( pos + 8 ); @@ -168,11 +168,11 @@ KBB::Error HtmlParser_2_10::parseLine( const QString &line, Bug::List &bugs ) return KBB::Error(); } -KBB::Error HtmlParser_2_10::parseLine( const QString &line, +KBB::Error HtmlParser_2_10::parseLine( const TQString &line, Package::List &packages ) { - QString package; - QStringList components; + TQString package; + TQStringList components; if ( getCpts( line, package, components ) ) { packages.append( Package( new PackageImpl( package, "", 0, Person(), @@ -190,7 +190,7 @@ void HtmlParser_2_14_2::init() mState = Idle; } -KBB::Error HtmlParser_2_14_2::parseLine( const QString &line, +KBB::Error HtmlParser_2_14_2::parseLine( const TQString &line, Package::List & ) { switch ( mState ) { @@ -199,8 +199,8 @@ KBB::Error HtmlParser_2_14_2::parseLine( const QString &line, break; case Components: { if ( line.startsWith( "function" ) ) mState = Finished; - QString key; - QStringList values; + TQString key; + TQStringList values; if ( getCpts( line, key, values ) ) { // kdDebug() << "KEY: " << key << " VALUES: " << values.join(",") << endl; if ( values.count() == 2 ) { @@ -217,7 +217,7 @@ KBB::Error HtmlParser_2_14_2::parseLine( const QString &line, void HtmlParser_2_14_2::processResult( Package::List &packages ) { - QMap::ConstIterator it; + TQMap::ConstIterator it; for ( it = mComponentsMap.begin(); it != mComponentsMap.end(); ++it ) { packages.append( Package( new PackageImpl( it.key(), "", 0, Person(), it.data() ) ) ); @@ -233,17 +233,17 @@ void HtmlParser_2_17_1::init() mState = Idle; } -KBB::Error HtmlParser_2_17_1::parseBugList( const QByteArray &data, Bug::List &bugs ) +KBB::Error HtmlParser_2_17_1::parseBugList( const TQByteArray &data, Bug::List &bugs ) { return RdfProcessor::parseBugList( data, bugs ); } -KBB::Error HtmlParser_2_17_1::parseLine( const QString & /*line*/, Bug::List &/*bugs*/ ) +KBB::Error HtmlParser_2_17_1::parseLine( const TQString & /*line*/, Bug::List &/*bugs*/ ) { return KBB::Error( "Not implemented" ); } -KBB::Error HtmlParser_2_17_1::parseLine( const QString &line, Package::List & ) +KBB::Error HtmlParser_2_17_1::parseLine( const TQString &line, Package::List & ) { switch ( mState ) { case Idle: @@ -254,18 +254,18 @@ KBB::Error HtmlParser_2_17_1::parseLine( const QString &line, Package::List & ) if ( line.contains( "onchange=\"selectProduct" ) ) mState = Products; break; case Components: { - if ( line.contains( QRegExp( "\\s*function" ) ) ) { + if ( line.contains( TQRegExp( "\\s*function" ) ) ) { mState = SearchProducts; } - QString key; - QStringList components; + TQString key; + TQStringList components; if ( getCpts( line, key, components ) ) { mComponents.append( components ); } } case Products: { if ( line.contains( "" ) ) mState = Finished; - QString product = getAttribute( line, "value" ); + TQString product = getAttribute( line, "value" ); if ( !product.isEmpty() ) { kdDebug() << "PRODUCT: " << product << endl; mProducts.append( product ); @@ -282,8 +282,8 @@ KBB::Error HtmlParser_2_17_1::parseLine( const QString &line, Package::List & ) void HtmlParser_2_17_1::processResult( Package::List &packages ) { - QStringList::ConstIterator itProduct = mProducts.begin(); - QValueList::ConstIterator itComponents = mComponents.begin(); + TQStringList::ConstIterator itProduct = mProducts.begin(); + TQValueList::ConstIterator itComponents = mComponents.begin(); while( itProduct != mProducts.end() && itComponents != mComponents.end() ) { packages.append( Package( new PackageImpl( *itProduct, "", 0, Person(), diff --git a/kbugbuster/backend/htmlparser.h b/kbugbuster/backend/htmlparser.h index ffb0a22a..b8ad2c6f 100644 --- a/kbugbuster/backend/htmlparser.h +++ b/kbugbuster/backend/htmlparser.h @@ -29,9 +29,9 @@ #include "error.h" #include "rdfprocessor.h" -#include -#include -#include +#include +#include +#include class HtmlParser : public RdfProcessor { @@ -44,8 +44,8 @@ class HtmlParser : public RdfProcessor HtmlParser( BugServer *s ) : RdfProcessor( s ), mState( Idle ) {} virtual ~HtmlParser() {} - KBB::Error parseBugList( const QByteArray &data, Bug::List &bugs ); - KBB::Error parsePackageList( const QByteArray &data, + KBB::Error parseBugList( const TQByteArray &data, Bug::List &bugs ); + KBB::Error parsePackageList( const TQByteArray &data, Package::List &packages ); void setPackageListQuery( KURL & ); @@ -53,14 +53,14 @@ class HtmlParser : public RdfProcessor protected: virtual void init(); - virtual KBB::Error parseLine( const QString &line, Bug::List &bugs ); - virtual KBB::Error parseLine( const QString &line, + virtual KBB::Error parseLine( const TQString &line, Bug::List &bugs ); + virtual KBB::Error parseLine( const TQString &line, Package::List &packages ); virtual void processResult( Package::List &packages ); - QString getAttribute( const QString &line, const QString &name ); - bool getCpts( const QString &line, QString &key, QStringList &values ); + TQString getAttribute( const TQString &line, const TQString &name ); + bool getCpts( const TQString &line, TQString &key, TQStringList &values ); }; @@ -70,8 +70,8 @@ class HtmlParser_2_10 : public HtmlParser HtmlParser_2_10( BugServer *s ) : HtmlParser( s ) {} protected: - KBB::Error parseLine( const QString &line, Bug::List &bugs ); - KBB::Error parseLine( const QString &line, Package::List &packages ); + KBB::Error parseLine( const TQString &line, Bug::List &bugs ); + KBB::Error parseLine( const TQString &line, Package::List &packages ); }; @@ -83,12 +83,12 @@ class HtmlParser_2_14_2 : public HtmlParser_2_10 protected: void init(); - KBB::Error parseLine( const QString &line, Package::List &packages ); + KBB::Error parseLine( const TQString &line, Package::List &packages ); void processResult( Package::List &packages ); private: - QMap mComponentsMap; + TQMap mComponentsMap; }; @@ -98,19 +98,19 @@ class HtmlParser_2_17_1 : public HtmlParser public: HtmlParser_2_17_1( BugServer *s ) : HtmlParser( s ) {} - KBB::Error parseBugList( const QByteArray &data, Bug::List &bugs ); + KBB::Error parseBugList( const TQByteArray &data, Bug::List &bugs ); protected: void init(); - KBB::Error parseLine( const QString &line, Bug::List &bugs ); - KBB::Error parseLine( const QString &line, Package::List &packages ); + KBB::Error parseLine( const TQString &line, Bug::List &bugs ); + KBB::Error parseLine( const TQString &line, Package::List &packages ); void processResult( Package::List &packages ); private: - QStringList mProducts; - QValueList mComponents; + TQStringList mProducts; + TQValueList mComponents; }; #endif diff --git a/kbugbuster/backend/kbbprefs.cpp b/kbugbuster/backend/kbbprefs.cpp index 30f337ab..cfef3418 100644 --- a/kbugbuster/backend/kbbprefs.cpp +++ b/kbugbuster/backend/kbbprefs.cpp @@ -22,8 +22,8 @@ without including the source code for Qt in the source distribution. */ -#include -#include +#include +#include #include #include @@ -54,7 +54,7 @@ KBBPrefs::KBBPrefs() : KConfigSkeleton() addItemBool("ShowVotes", mShowVoted, false); addItemInt("MinimumVotes", mMinVotes, 0); addItemBool("SendBCC",mSendBCC,false); - addItemString("OverrideRecipient",mOverrideRecipient,QString::null); + addItemString("OverrideRecipient",mOverrideRecipient,TQString::null); addItemInt("WrapColumn",mWrapColumn,90); @@ -103,13 +103,13 @@ void KBBPrefs::usrReadConfig() mMessageButtons.clear(); config()->setGroup("MessageButtons"); - QStringList buttonList = config()->readListEntry("ButtonList"); + TQStringList buttonList = config()->readListEntry("ButtonList"); if (buttonList.isEmpty()) { setMessageButtonsDefault(); } else { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for(it = buttonList.begin(); it != buttonList.end(); ++it) { - QString text = config()->readEntry(*it); + TQString text = config()->readEntry(*it); mMessageButtons.insert(*it,text); } } @@ -120,8 +120,8 @@ void KBBPrefs::usrReadConfig() void KBBPrefs::usrWriteConfig() { config()->setGroup("MessageButtons"); - QStringList buttonList; - QMap::ConstIterator it; + TQStringList buttonList; + TQMap::ConstIterator it; for(it = mMessageButtons.begin();it != mMessageButtons.end();++it) { buttonList.append(it.key()); config()->writeEntry(it.key(),it.data()); diff --git a/kbugbuster/backend/kbbprefs.h b/kbugbuster/backend/kbbprefs.h index 64d7f20d..3c883e7e 100644 --- a/kbugbuster/backend/kbbprefs.h +++ b/kbugbuster/backend/kbbprefs.h @@ -24,7 +24,7 @@ #ifndef KBBPREFS_H #define KBBPREFS_H -#include +#include #include @@ -54,29 +54,29 @@ class KBBPrefs : public KConfigSkeleton public: int mRecentPackagesCount; - QValueList mSplitter1; - QValueList mSplitter2; + TQValueList mSplitter1; + TQValueList mSplitter2; int mMailClient; bool mShowClosedBugs; bool mShowWishes; bool mSendBCC; - QString mOverrideRecipient; + TQString mOverrideRecipient; bool mShowVoted; int mMinVotes; int mWrapColumn; - QMap mMessageButtons; + TQMap mMessageButtons; int mMsgDlgWidth; int mMsgDlgHeight; - QValueList mMsgDlgSplitter; + TQValueList mMsgDlgSplitter; bool mDebugMode; - QString mCurrentServer; + TQString mCurrentServer; }; #endif diff --git a/kbugbuster/backend/mailsender.cpp b/kbugbuster/backend/mailsender.cpp index ec32405d..59f73db2 100644 --- a/kbugbuster/backend/mailsender.cpp +++ b/kbugbuster/backend/mailsender.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include @@ -19,7 +19,7 @@ #include "mailsender.h" #include "smtp.h" -MailSender::MailSender(MailClient client,const QString &smtpServer) : +MailSender::MailSender(MailClient client,const TQString &smtpServer) : m_client( client ), m_smtpServer( smtpServer ) { } @@ -33,13 +33,13 @@ MailSender *MailSender::clone() const return new MailSender(m_client,m_smtpServer); } -bool MailSender::send(const QString &fromName,const QString &fromEmail,const QString &to, - const QString &subject,const QString &body,bool bcc, - const QString &recipient) +bool MailSender::send(const TQString &fromName,const TQString &fromEmail,const TQString &to, + const TQString &subject,const TQString &body,bool bcc, + const TQString &recipient) { - QString from( fromName ); + TQString from( fromName ); if ( !fromEmail.isEmpty() ) - from += QString::fromLatin1( " <%2>" ).arg( fromEmail ); + from += TQString::fromLatin1( " <%2>" ).arg( fromEmail ); kdDebug() << "MailSender::sendMail():\nFrom: " << from << "\nTo: " << to << "\nbccflag:" << bcc << "\nRecipient:" << recipient @@ -53,18 +53,18 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt bool needHeaders = true; - QString command = KStandardDirs::findExe(QString::fromLatin1("sendmail"), - QString::fromLatin1("/sbin:/usr/sbin:/usr/lib")); - if (!command.isNull()) command += QString::fromLatin1(" -oi -t"); + TQString command = KStandardDirs::findExe(TQString::fromLatin1("sendmail"), + TQString::fromLatin1("/sbin:/usr/sbin:/usr/lib")); + if (!command.isNull()) command += TQString::fromLatin1(" -oi -t"); else { - command = KStandardDirs::findExe(QString::fromLatin1("mail")); + command = KStandardDirs::findExe(TQString::fromLatin1("mail")); if (command.isNull()) return false; // give up - command.append(QString::fromLatin1(" -s ")); + command.append(TQString::fromLatin1(" -s ")); command.append(KProcess::quote(subject)); if (bcc) { - command.append(QString::fromLatin1(" -b ")); + command.append(TQString::fromLatin1(" -b ")); command.append(KProcess::quote(from)); } @@ -78,18 +78,18 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt if (!fd) { kdError() << "Unable to open a pipe to " << command << endl; - QTimer::singleShot( 0, this, SLOT( deleteLater() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) ); return false; } - QString textComplete; + TQString textComplete; if (needHeaders) { - textComplete += QString::fromLatin1("From: ") + from + '\n'; - textComplete += QString::fromLatin1("To: ") + to + '\n'; - if (bcc) textComplete += QString::fromLatin1("Bcc: ") + from + '\n'; - textComplete += QString::fromLatin1("Subject: ") + subject + '\n'; - textComplete += QString::fromLatin1("X-Mailer: KBugBuster") + '\n'; + textComplete += TQString::fromLatin1("From: ") + from + '\n'; + textComplete += TQString::fromLatin1("To: ") + to + '\n'; + if (bcc) textComplete += TQString::fromLatin1("Bcc: ") + from + '\n'; + textComplete += TQString::fromLatin1("Subject: ") + subject + '\n'; + textComplete += TQString::fromLatin1("X-Mailer: KBugBuster") + '\n'; } textComplete += '\n'; // end of headers textComplete += body; @@ -103,37 +103,37 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt if (!kapp->dcopClient()->isApplicationRegistered("kmail")) { KMessageBox::error(0,i18n("No running instance of KMail found.")); - QTimer::singleShot( 0, this, SLOT( deleteLater() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) ); return false; } emit status( i18n( "Passing mail to KDE email program..." ) ); if (!kMailOpenComposer(to,"", (bcc ? from : ""), subject,body,0,KURL())) { - QTimer::singleShot( 0, this, SLOT( deleteLater() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) ); return false; } } else if ( m_client == Direct ) { kdDebug() << "Sending Direct" << endl; - QStringList recipients; + TQStringList recipients; if ( !recipient.isEmpty() ) recipients << recipient; else recipients << to; - QString message = QString::fromLatin1( "From: " ) + from + - QString::fromLatin1( "\nTo: " ) + to + - QString::fromLatin1( "\nSubject: " ) + subject + - QString::fromLatin1( "\nX-Mailer: KBugBuster" ) + - QString::fromLatin1( "\n\n" ) + body; + TQString message = TQString::fromLatin1( "From: " ) + from + + TQString::fromLatin1( "\nTo: " ) + to + + TQString::fromLatin1( "\nSubject: " ) + subject + + TQString::fromLatin1( "\nX-Mailer: KBugBuster" ) + + TQString::fromLatin1( "\n\n" ) + body; Smtp *smtp = new Smtp( fromEmail, recipients, message, m_smtpServer ); - connect( smtp, SIGNAL( status( const QString & ) ), - this, SIGNAL( status( const QString & ) ) ); - connect( smtp, SIGNAL( success() ), - this, SLOT( smtpSuccess() ) ); - connect( smtp, SIGNAL( error( const QString &, const QString & ) ), - this, SLOT( smtpError( const QString &, const QString & ) ) ); + connect( smtp, TQT_SIGNAL( status( const TQString & ) ), + this, TQT_SIGNAL( status( const TQString & ) ) ); + connect( smtp, TQT_SIGNAL( success() ), + this, TQT_SLOT( smtpSuccess() ) ); + connect( smtp, TQT_SIGNAL( error( const TQString &, const TQString & ) ), + this, TQT_SLOT( smtpError( const TQString &, const TQString & ) ) ); smtp->insertChild( this ); // die when smtp dies } else { @@ -143,7 +143,7 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt if (m_client != Direct) { emit finished(); - QTimer::singleShot( 0, this, SLOT( deleteLater() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) ); } return true; @@ -158,13 +158,13 @@ void MailSender::smtpSuccess() emit finished(); } -void MailSender::smtpError(const QString &_command, const QString &_response) +void MailSender::smtpError(const TQString &_command, const TQString &_response) { if ( parent() != sender() || !parent()->inherits( "Smtp" ) ) return; - QString command = _command; - QString response = _response; + TQString command = _command; + TQString response = _response; Smtp *smtp = static_cast( parent() ); smtp->removeChild( this ); @@ -176,18 +176,18 @@ void MailSender::smtpError(const QString &_command, const QString &_response) "response: %2" ).arg( command ).arg( response ) ); emit finished(); - QTimer::singleShot( 0, this, SLOT( deleteLater() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) ); } -int MailSender::kMailOpenComposer(const QString& arg0,const QString& arg1, - const QString& arg2,const QString& arg3,const QString& arg4,int arg5, +int MailSender::kMailOpenComposer(const TQString& arg0,const TQString& arg1, + const TQString& arg2,const TQString& arg3,const TQString& arg4,int arg5, const KURL& arg6) { int result = 0; - QByteArray data, replyData; - QCString replyType; - QDataStream arg( data, IO_WriteOnly ); + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg( data, IO_WriteOnly ); arg << arg0; arg << arg1; arg << arg2; @@ -195,9 +195,9 @@ int MailSender::kMailOpenComposer(const QString& arg0,const QString& arg1, arg << arg4; arg << arg5; arg << arg6; - if (kapp->dcopClient()->call("kmail","KMailIface","openComposer(QString,QString,QString,QString,QString,int,KURL)", data, replyType, replyData ) ) { + if (kapp->dcopClient()->call("kmail","KMailIface","openComposer(TQString,TQString,TQString,TQString,TQString,int,KURL)", data, replyType, replyData ) ) { if ( replyType == "int" ) { - QDataStream _reply_stream( replyData, IO_ReadOnly ); + TQDataStream _reply_stream( replyData, IO_ReadOnly ); _reply_stream >> result; } else { kdDebug() << "kMailOpenComposer() call failed." << endl; diff --git a/kbugbuster/backend/mailsender.h b/kbugbuster/backend/mailsender.h index 06517f9c..5df42c2a 100644 --- a/kbugbuster/backend/mailsender.h +++ b/kbugbuster/backend/mailsender.h @@ -1,8 +1,8 @@ #ifndef MAILSENDER_H #define MAILSENDER_H -#include -#include +#include +#include class KURL; class Smtp; @@ -13,7 +13,7 @@ class MailSender : public QObject public: enum MailClient { Sendmail = 0, KMail = 1, Direct = 2 }; - MailSender(MailClient,const QString &smtpServer=QString::null); + MailSender(MailClient,const TQString &smtpServer=TQString::null); virtual ~MailSender(); MailSender *clone() const; @@ -25,26 +25,26 @@ class MailSender : public QObject instead of 'to' . (this currently only works in for direct mail sending through SMTP. */ - bool send(const QString &fromName, const QString &fromEmail, - const QString &to,const QString &subject, - const QString &body,bool bcc=false, - const QString &recipient = QString::null); + bool send(const TQString &fromName, const TQString &fromEmail, + const TQString &to,const TQString &subject, + const TQString &body,bool bcc=false, + const TQString &recipient = TQString::null); signals: - void status( const QString &message ); + void status( const TQString &message ); void finished(); private slots: void smtpSuccess(); - void smtpError(const QString &command, const QString &response); + void smtpError(const TQString &command, const TQString &response); private: - int kMailOpenComposer(const QString& arg0,const QString& arg1, - const QString& arg2,const QString& arg3, - const QString& arg4,int arg5,const KURL& arg6); + int kMailOpenComposer(const TQString& arg0,const TQString& arg1, + const TQString& arg2,const TQString& arg3, + const TQString& arg4,int arg5,const KURL& arg6); MailClient m_client; - QString m_smtpServer; + TQString m_smtpServer; }; #endif diff --git a/kbugbuster/backend/package.cpp b/kbugbuster/backend/package.cpp index ae009397..bc9bb6fe 100644 --- a/kbugbuster/backend/package.cpp +++ b/kbugbuster/backend/package.cpp @@ -27,18 +27,18 @@ Package::~Package() { } -QString Package::name() const +TQString Package::name() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->name; } -QString Package::description() const +TQString Package::description() const { if ( !m_impl ) - return QString::null; + return TQString::null; return m_impl->description; } @@ -59,10 +59,10 @@ Person Package::maintainer() const return m_impl->maintainer; } -const QStringList Package::components() const +const TQStringList Package::components() const { if ( !m_impl ) - return QStringList(); + return TQStringList(); return m_impl->components; } diff --git a/kbugbuster/backend/package.h b/kbugbuster/backend/package.h index 7b5c69a1..df0a119d 100644 --- a/kbugbuster/backend/package.h +++ b/kbugbuster/backend/package.h @@ -3,7 +3,7 @@ #include "person.h" -#include +#include #include @@ -12,7 +12,7 @@ class PackageImpl; class Package { public: - typedef QValueList List; + typedef TQValueList List; Package(); Package( PackageImpl *impl ); @@ -20,11 +20,11 @@ public: Package &operator=( const Package &rhs ); ~Package(); - QString name() const; - QString description() const; + TQString name() const; + TQString description() const; uint numberOfBugs() const; Person maintainer() const; - const QStringList components() const; + const TQStringList components() const; bool isNull() const { return m_impl == 0; } diff --git a/kbugbuster/backend/packageimpl.h b/kbugbuster/backend/packageimpl.h index c60a1079..30fd00af 100644 --- a/kbugbuster/backend/packageimpl.h +++ b/kbugbuster/backend/packageimpl.h @@ -3,25 +3,25 @@ #include "person.h" -#include +#include #include #include struct PackageImpl : public KShared { public: - PackageImpl( const QString &_name, const QString &_description, + PackageImpl( const TQString &_name, const TQString &_description, uint _numberOfBugs, const Person &_maintainer, - const QStringList &_components ) + const TQStringList &_components ) : name( _name ), description( _description ),numberOfBugs( _numberOfBugs ), maintainer( _maintainer ), components(_components) {} - QString name; - QString description; + TQString name; + TQString description; uint numberOfBugs; Person maintainer; - QStringList components; + TQStringList components; }; #endif diff --git a/kbugbuster/backend/packagelistjob.cpp b/kbugbuster/backend/packagelistjob.cpp index 6b05badf..8ebf077e 100644 --- a/kbugbuster/backend/packagelistjob.cpp +++ b/kbugbuster/backend/packagelistjob.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include PackageListJob::PackageListJob( BugServer *server ) : BugJob( server ) @@ -49,7 +49,7 @@ void PackageListJob::start() BugJob::start( server()->packageListUrl() ); } -void PackageListJob::process( const QByteArray &data ) +void PackageListJob::process( const TQByteArray &data ) { Package::List packages; KBB::Error err = server()->processor()->parsePackageList( data, packages ); diff --git a/kbugbuster/backend/packagelistjob.h b/kbugbuster/backend/packagelistjob.h index 0e1bca99..6267158a 100644 --- a/kbugbuster/backend/packagelistjob.h +++ b/kbugbuster/backend/packagelistjob.h @@ -29,7 +29,7 @@ #include "package.h" -#include +#include class PackageListJob : public BugJob { @@ -41,7 +41,7 @@ class PackageListJob : public BugJob void start(); protected: - void process( const QByteArray &data ); + void process( const TQByteArray &data ); signals: void packageListAvailable( const Package::List &pkgs ); diff --git a/kbugbuster/backend/person.cpp b/kbugbuster/backend/person.cpp index a9f63be0..40cf72b7 100644 --- a/kbugbuster/backend/person.cpp +++ b/kbugbuster/backend/person.cpp @@ -2,7 +2,7 @@ #include "person.h" -Person::Person( const QString &fullName ) +Person::Person( const TQString &fullName ) { int emailPos = fullName.find( '<' ); if ( emailPos < 0 ) { @@ -13,7 +13,7 @@ Person::Person( const QString &fullName ) } } -QString Person::fullName(bool html) const +TQString Person::fullName(bool html) const { if( name.isEmpty() ) { @@ -35,11 +35,11 @@ QString Person::fullName(bool html) const } } -Person Person::parseFromString( const QString &_str ) +Person Person::parseFromString( const TQString &_str ) { Person res; - QString str = _str; + TQString str = _str; int ltPos = str.find( '<' ); if ( ltPos != -1 ) @@ -53,9 +53,9 @@ Person Person::parseFromString( const QString &_str ) } int atPos = str.find( '@' ); - int spacedAtPos = str.find( QString::fromLatin1( " at " ) ); + int spacedAtPos = str.find( TQString::fromLatin1( " at " ) ); if ( atPos == -1 && spacedAtPos != -1 ) - str.replace( spacedAtPos, 4, QString::fromLatin1( "@" ) ); + str.replace( spacedAtPos, 4, TQString::fromLatin1( "@" ) ); int spacePos = str.find( ' ' ); while ( spacePos != -1 ) diff --git a/kbugbuster/backend/person.h b/kbugbuster/backend/person.h index f29074f9..7f6da633 100644 --- a/kbugbuster/backend/person.h +++ b/kbugbuster/backend/person.h @@ -1,22 +1,22 @@ #ifndef __person_h__ #define __person_h__ -#include +#include #include struct Person { Person() {} - Person( const QString &fullName ); - Person( const QString &_name, const QString &_email ) + Person( const TQString &fullName ); + Person( const TQString &_name, const TQString &_email ) : name( _name ), email( _email ) {} - QString name; - QString email; + TQString name; + TQString email; - QString fullName( bool html = false ) const; + TQString fullName( bool html = false ) const; - static Person parseFromString( const QString &str ); + static Person parseFromString( const TQString &str ); }; #endif diff --git a/kbugbuster/backend/processor.cpp b/kbugbuster/backend/processor.cpp index 332b4418..c030761d 100644 --- a/kbugbuster/backend/processor.cpp +++ b/kbugbuster/backend/processor.cpp @@ -22,7 +22,7 @@ without including the source code for Qt in the source distribution. */ -#include +#include #include #include @@ -50,7 +50,7 @@ void Processor::setPackageListQuery( KURL &url ) url.setQuery( "?data=versiontable" ); } -void Processor::setBugListQuery( KURL &url, const Package &product, const QString &component ) +void Processor::setBugListQuery( KURL &url, const Package &product, const TQString &component ) { if ( mServer->serverConfig().bugzillaVersion() == "Bugworld" ) { url.setFileName( "bugworld.cgi" ); @@ -58,7 +58,7 @@ void Processor::setBugListQuery( KURL &url, const Package &product, const QStrin url.setFileName( "xmlquery.cgi" ); } - QString user = mServer->serverConfig().user(); + TQString user = mServer->serverConfig().user(); if ( component.isEmpty() ) url.setQuery( "?user=" + user + "&product=" + product.name() ); diff --git a/kbugbuster/backend/processor.h b/kbugbuster/backend/processor.h index cadaa407..8eee8ebf 100644 --- a/kbugbuster/backend/processor.h +++ b/kbugbuster/backend/processor.h @@ -41,15 +41,15 @@ class Processor BugServer *server() const { return mServer; } - virtual KBB::Error parseBugList( const QByteArray &data, + virtual KBB::Error parseBugList( const TQByteArray &data, Bug::List &bugs ) = 0; - virtual KBB::Error parsePackageList( const QByteArray &data, + virtual KBB::Error parsePackageList( const TQByteArray &data, Package::List &packages ) = 0; - virtual KBB::Error parseBugDetails( const QByteArray &, BugDetails & ) = 0; + virtual KBB::Error parseBugDetails( const TQByteArray &, BugDetails & ) = 0; virtual void setPackageListQuery( KURL & ) = 0; virtual void setBugListQuery( KURL &, const Package &, - const QString &component ) = 0; + const TQString &component ) = 0; virtual void setBugDetailsQuery( KURL &, const Bug & ) = 0; private: diff --git a/kbugbuster/backend/rdfprocessor.cpp b/kbugbuster/backend/rdfprocessor.cpp index 89bb3402..3832e899 100644 --- a/kbugbuster/backend/rdfprocessor.cpp +++ b/kbugbuster/backend/rdfprocessor.cpp @@ -40,7 +40,7 @@ RdfProcessor::~RdfProcessor() { } -KBB::Error RdfProcessor::parseDomBugList( const QDomElement &element, +KBB::Error RdfProcessor::parseDomBugList( const TQDomElement &element, Bug::List &bugs ) { if ( element.tagName() != "RDF" ) { @@ -48,22 +48,22 @@ KBB::Error RdfProcessor::parseDomBugList( const QDomElement &element, return KBB::Error( "No RDF element found" ); } - QDomNodeList bugNodes = element.elementsByTagName( "bz:bug" ); + TQDomNodeList bugNodes = element.elementsByTagName( "bz:bug" ); for( uint i = 0; i < bugNodes.count(); ++i ) { - QString title; + TQString title; Person submitter; - QString bugNr; + TQString bugNr; Bug::Status status = Bug::StatusUndefined; Bug::Severity severity = Bug::SeverityUndefined; Person developerTodo; Bug::BugMergeList mergedList; - QDomNode hit = bugNodes.item( i ); + TQDomNode hit = bugNodes.item( i ); - QDomNode n; + TQDomNode n; for( n = hit.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.tagName() == "bz:id" ) { bugNr = e.text(); @@ -87,7 +87,7 @@ KBB::Error RdfProcessor::parseDomBugList( const QDomElement &element, return KBB::Error(); } -void RdfProcessor::setBugListQuery( KURL &url, const Package &product, const QString &component ) +void RdfProcessor::setBugListQuery( KURL &url, const Package &product, const TQString &component ) { url.setFileName( "buglist.cgi" ); if ( component.isEmpty() ) @@ -97,7 +97,7 @@ void RdfProcessor::setBugListQuery( KURL &url, const Package &product, const QSt if ( KBBPrefs::instance()->mShowVoted ) { url.addQueryItem( "field0-0-0", "votes" ); url.addQueryItem( "type0-0-0", "greaterthan" ); - QString num = QString::number( KBBPrefs::instance()->mMinVotes );; + TQString num = TQString::number( KBBPrefs::instance()->mMinVotes );; url.addQueryItem( "value0-0-0", num ); } } diff --git a/kbugbuster/backend/rdfprocessor.h b/kbugbuster/backend/rdfprocessor.h index 0e0bd780..18406323 100644 --- a/kbugbuster/backend/rdfprocessor.h +++ b/kbugbuster/backend/rdfprocessor.h @@ -31,9 +31,9 @@ class RdfProcessor : public DomProcessor RdfProcessor( BugServer * ); virtual ~RdfProcessor(); - KBB::Error parseDomBugList( const QDomElement &, Bug::List & ); + KBB::Error parseDomBugList( const TQDomElement &, Bug::List & ); - void setBugListQuery( KURL &, const Package &, const QString &component ); + void setBugListQuery( KURL &, const Package &, const TQString &component ); }; #endif diff --git a/kbugbuster/backend/smtp.cpp b/kbugbuster/backend/smtp.cpp index d54cafab..b297af20 100644 --- a/kbugbuster/backend/smtp.cpp +++ b/kbugbuster/backend/smtp.cpp @@ -9,26 +9,26 @@ #include "smtp.h" -#include -#include -#include +#include +#include +#include #include #include #include -Smtp::Smtp( const QString &from, const QStringList &to, - const QString &aMessage, - const QString &server, +Smtp::Smtp( const TQString &from, const TQStringList &to, + const TQString &aMessage, + const TQString &server, unsigned short int port ) { skipReadResponse = false; - mSocket = new QSocket( this ); - connect ( mSocket, SIGNAL( readyRead() ), - this, SLOT( readyRead() ) ); - connect ( mSocket, SIGNAL( connected() ), - this, SLOT( connected() ) ); - connect ( mSocket, SIGNAL( error(int) ), - this, SLOT( socketError(int) ) ); + mSocket = new TQSocket( this ); + connect ( mSocket, TQT_SIGNAL( readyRead() ), + this, TQT_SLOT( readyRead() ) ); + connect ( mSocket, TQT_SIGNAL( connected() ), + this, TQT_SLOT( connected() ) ); + connect ( mSocket, TQT_SIGNAL( error(int) ), + this, TQT_SLOT( socketError(int) ) ); message = aMessage; @@ -40,8 +40,8 @@ Smtp::Smtp( const QString &from, const QStringList &to, emit status( i18n( "Connecting to %1" ).arg( server ) ); mSocket->connectToHost( server, port ); - t = new QTextStream( mSocket ); - t->setEncoding(QTextStream::Latin1); + t = new TQTextStream( mSocket ); + t->setEncoding(TQTextStream::Latin1); } @@ -54,8 +54,8 @@ Smtp::~Smtp() } -void Smtp::send( const QString &from, const QStringList &to, - const QString &aMessage ) +void Smtp::send( const TQString &from, const TQStringList &to, + const TQString &aMessage ) { skipReadResponse = true; message = aMessage; @@ -86,19 +86,19 @@ void Smtp::socketError(int errorCode) { command = "CONNECT"; switch ( errorCode ) { - case QSocket::ErrConnectionRefused: + case TQSocket::ErrConnectionRefused: responseLine = i18n( "Connection refused." ); break; - case QSocket::ErrHostNotFound: + case TQSocket::ErrHostNotFound: responseLine = i18n( "Host Not Found." ); break; - case QSocket::ErrSocketRead: + case TQSocket::ErrSocketRead: responseLine = i18n( "Error reading socket." ); break; default: responseLine = i18n( "Internal error, unrecognized error." ); } - QTimer::singleShot( 0, this, SLOT(emitError()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(emitError()) ); } void Smtp::emitError() { @@ -141,13 +141,13 @@ void Smtp::readyRead() state = smtpBody; } else if ( state == smtpBody && responseLine[0] == '3' ) { command = "DATA"; - QString seperator = ""; + TQString seperator = ""; if (message[message.length() - 1] != '\n') seperator = "\r\n"; *t << message << seperator << ".\r\n"; state = smtpSuccess; } else if ( state == smtpSuccess && responseLine[0] == '2' ) { - QTimer::singleShot( 0, this, SIGNAL(success()) ); + TQTimer::singleShot( 0, this, TQT_SIGNAL(success()) ); } else if ( state == smtpQuit && responseLine[0] == '2' ) { command = "QUIT"; *t << "QUIT\r\n"; @@ -157,7 +157,7 @@ void Smtp::readyRead() } else if ( state == smtpClose ) { // we ignore it } else { // error occurred - QTimer::singleShot( 0, this, SLOT(emitError()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(emitError()) ); state = smtpClose; } @@ -168,7 +168,7 @@ void Smtp::readyRead() t = 0; delete mSocket; mSocket = 0; - QTimer::singleShot( 0, this, SLOT(deleteMe()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(deleteMe()) ); } } diff --git a/kbugbuster/backend/smtp.h b/kbugbuster/backend/smtp.h index d800cb77..b97e3b89 100644 --- a/kbugbuster/backend/smtp.h +++ b/kbugbuster/backend/smtp.h @@ -10,9 +10,9 @@ #ifndef SMTP_H #define SMTP_H -#include -#include -#include +#include +#include +#include class QSocket; class QTextStream; @@ -22,17 +22,17 @@ class Smtp : public QObject Q_OBJECT public: - Smtp( const QString &from, const QStringList &to, const QString &message, - const QString &server, unsigned short int port = 25 ); + Smtp( const TQString &from, const TQStringList &to, const TQString &message, + const TQString &server, unsigned short int port = 25 ); ~Smtp(); - void send( const QString &, const QStringList &, const QString & ); + void send( const TQString &, const TQStringList &, const TQString & ); void quit(); signals: void success(); - void status( const QString & ); - void error( const QString &command, const QString &response ); + void status( const TQString & ); + void error( const TQString &command, const TQString &response ); private slots: void readyRead(); @@ -53,15 +53,15 @@ private: smtpClose }; - QString message; - QString from; - QStringList rcpt; - QSocket *mSocket; - QTextStream * t; + TQString message; + TQString from; + TQStringList rcpt; + TQSocket *mSocket; + TQTextStream * t; int state; - QString response, responseLine; + TQString response, responseLine; bool skipReadResponse; - QString command; + TQString command; }; #endif diff --git a/kbugbuster/gui/buglvi.cpp b/kbugbuster/gui/buglvi.cpp index be629510..18d7c064 100644 --- a/kbugbuster/gui/buglvi.cpp +++ b/kbugbuster/gui/buglvi.cpp @@ -1,5 +1,5 @@ /* - buglvi.cpp - Custom QListViewItem that holds a Bug object + buglvi.cpp - Custom TQListViewItem that holds a Bug object copyright : (c) 2001 by Martijn Klingens email : klingens@kde.org @@ -14,8 +14,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -52,9 +52,9 @@ BugLVI::~BugLVI() { } -QString BugLVI::key( int column, bool /* ascending */ ) const +TQString BugLVI::key( int column, bool /* ascending */ ) const { - QString key; + TQString key; if ( column == 0 ) { @@ -65,11 +65,11 @@ QString BugLVI::key( int column, bool /* ascending */ ) const if ( m_bug.age() == 0xFFFFFFFF ) key = "0"; else - key = QString::number( m_bug.age() ).rightJustify( 10, '0' ); + key = TQString::number( m_bug.age() ).rightJustify( 10, '0' ); } else if ( column == 4 ) { - key = QString::number( 10 - m_bug.severity() ); + key = TQString::number( 10 - m_bug.severity() ); key += m_bug.number().rightJustify( 10, '0' ); } else @@ -80,21 +80,21 @@ QString BugLVI::key( int column, bool /* ascending */ ) const return key; } -void BugLVI::paintCell(QPainter* p, const QColorGroup& cg, +void BugLVI::paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align) { - QColorGroup newCg = cg; + TQColorGroup newCg = cg; if ( mCommandState == BugCommand::Queued ) { - QFont font = p->font(); + TQFont font = p->font(); font.setBold( true ); p->setFont( font ); } else if ( mCommandState == BugCommand::Sent ) { - QFont font = p->font(); + TQFont font = p->font(); font.setItalic( true ); p->setFont( font ); } else if ( m_bug.status() == Bug::Closed ) { // Different color for closed bugs - newCg.setColor( QColorGroup::Text, cg.color( QColorGroup::Dark ) ); + newCg.setColor( TQColorGroup::Text, cg.color( TQColorGroup::Dark ) ); } KListViewItem::paintCell( p, newCg, column, width, align ); diff --git a/kbugbuster/gui/buglvi.h b/kbugbuster/gui/buglvi.h index ff8fa7f9..5f66f398 100644 --- a/kbugbuster/gui/buglvi.h +++ b/kbugbuster/gui/buglvi.h @@ -1,5 +1,5 @@ /* - buglvi.h - Custom QListViewItem that holds a Bug object + buglvi.h - Custom TQListViewItem that holds a Bug object copyright : (c) 2001 by Martijn Klingens email : klingens@kde.org @@ -37,11 +37,11 @@ public: Bug& bug() { return m_bug; } void setBug( Bug &bug ) { m_bug = bug; } - QString key ( int column, bool ascending ) const; + TQString key ( int column, bool ascending ) const; void setCommandState( BugCommand::State state ); - void paintCell(QPainter* p, const QColorGroup& cg, + void paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align); private: diff --git a/kbugbuster/gui/centralwidget.cpp b/kbugbuster/gui/centralwidget.cpp index 80bd0672..f90564f1 100644 --- a/kbugbuster/gui/centralwidget.cpp +++ b/kbugbuster/gui/centralwidget.cpp @@ -14,10 +14,10 @@ ************************************************************************* */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -46,20 +46,20 @@ using namespace KBugBusterMainWindow; -CentralWidget::CentralWidget( const QCString &initialPackage, - const QCString &initialComponent, - const QCString &initialBug, QWidget *parent, +CentralWidget::CentralWidget( const TQCString &initialPackage, + const TQCString &initialComponent, + const TQCString &initialBug, TQWidget *parent, const char * name ) - : QWidget( parent, name ) + : TQWidget( parent, name ) { // Master layout - ( new QVBoxLayout( this, 0, + ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true ); - // Create QSplitter children - m_vertSplitter = new QSplitter( QSplitter::Vertical, this ); + // Create TQSplitter children + m_vertSplitter = new TQSplitter( TQSplitter::Vertical, this ); m_listPane = new CWBugListContainer( m_vertSplitter ); - m_horSplitter = new QSplitter( QSplitter::Horizontal,m_vertSplitter ); + m_horSplitter = new TQSplitter( TQSplitter::Horizontal,m_vertSplitter ); // The search pane isn't used. Should we remove the code? m_searchPane = new CWSearchWidget( m_horSplitter ); m_bugPane = new CWBugDetailsContainer( m_horSplitter ); @@ -67,55 +67,55 @@ CentralWidget::CentralWidget( const QCString &initialPackage, m_searchPane->hide(); // m_listPane->hide(); - m_searchPane->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, - QSizePolicy::Minimum ) ); - m_horSplitter->setResizeMode( m_searchPane, QSplitter::FollowSizeHint ); + m_searchPane->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, + TQSizePolicy::Minimum ) ); + m_horSplitter->setResizeMode( m_searchPane, TQSplitter::FollowSizeHint ); - connect( m_listPane, SIGNAL( resetProgressBar() ), - SIGNAL( resetProgressBar() ) ); - connect( m_bugPane, SIGNAL( resetProgressBar() ), - SIGNAL( resetProgressBar() ) ); + connect( m_listPane, TQT_SIGNAL( resetProgressBar() ), + TQT_SIGNAL( resetProgressBar() ) ); + connect( m_bugPane, TQT_SIGNAL( resetProgressBar() ), + TQT_SIGNAL( resetProgressBar() ) ); // Start the proper jobs for loading the package lists connect( BugSystem::self(), - SIGNAL( packageListAvailable( const Package::List & ) ), - SLOT( updatePackageList( const Package::List & ) ) ); + TQT_SIGNAL( packageListAvailable( const Package::List & ) ), + TQT_SLOT( updatePackageList( const Package::List & ) ) ); connect( BugSystem::self(), - SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ), - SLOT( updateBugList( const Package &, const QString &, const Bug::List & ) ) ); + TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ), + TQT_SLOT( updateBugList( const Package &, const TQString &, const Bug::List & ) ) ); connect( BugSystem::self(), - SIGNAL( bugListAvailable( const QString &, const Bug::List & ) ), - SLOT( updateBugList( const QString &, const Bug::List & ) ) ); + TQT_SIGNAL( bugListAvailable( const TQString &, const Bug::List & ) ), + TQT_SLOT( updateBugList( const TQString &, const Bug::List & ) ) ); connect( BugSystem::self(), - SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ), - SLOT( updateBugDetails( const Bug &, const BugDetails & ) ) ); + TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ), + TQT_SLOT( updateBugDetails( const Bug &, const BugDetails & ) ) ); - connect( BugSystem::self(), SIGNAL( loadingError( const QString & ) ), - SLOT( showLoadingError( const QString & ) ) ); + connect( BugSystem::self(), TQT_SIGNAL( loadingError( const TQString & ) ), + TQT_SLOT( showLoadingError( const TQString & ) ) ); - connect( m_bugPane, SIGNAL( signalCloseBug() ), SLOT( closeBug() ) ); - connect( m_bugPane, SIGNAL( signalCloseBugSilently() ), SLOT( closeBugSilently() ) ); - connect( m_bugPane, SIGNAL( signalReopenBug() ), SLOT( reopenBug() ) ); - connect( m_bugPane, SIGNAL( signalReassignBug() ), SLOT( reassignBug() ) ); - connect( m_bugPane, SIGNAL( signalTitleBug() ), SLOT( titleBug() ) ); - connect( m_bugPane, SIGNAL( signalSeverityBug() ), SLOT( severityBug() ) ); - connect( m_bugPane, SIGNAL( signalReplyBug() ), SLOT( replyBug() ) ); - connect( m_bugPane, SIGNAL( signalReplyPrivateBug() ), SLOT( replyPrivateBug() ) ); + connect( m_bugPane, TQT_SIGNAL( signalCloseBug() ), TQT_SLOT( closeBug() ) ); + connect( m_bugPane, TQT_SIGNAL( signalCloseBugSilently() ), TQT_SLOT( closeBugSilently() ) ); + connect( m_bugPane, TQT_SIGNAL( signalReopenBug() ), TQT_SLOT( reopenBug() ) ); + connect( m_bugPane, TQT_SIGNAL( signalReassignBug() ), TQT_SLOT( reassignBug() ) ); + connect( m_bugPane, TQT_SIGNAL( signalTitleBug() ), TQT_SLOT( titleBug() ) ); + connect( m_bugPane, TQT_SIGNAL( signalSeverityBug() ), TQT_SLOT( severityBug() ) ); + connect( m_bugPane, TQT_SIGNAL( signalReplyBug() ), TQT_SLOT( replyBug() ) ); + connect( m_bugPane, TQT_SIGNAL( signalReplyPrivateBug() ), TQT_SLOT( replyPrivateBug() ) ); - connect( m_bugPane, SIGNAL( signalClearCommand() ), SLOT( clearCommand() ) ); + connect( m_bugPane, TQT_SIGNAL( signalClearCommand() ), TQT_SLOT( clearCommand() ) ); // Add the selection slots for the listviews connect( m_searchPane->m_searchPackages, - SIGNAL( activated( const QString & ) ), - SLOT( slotRetrieveBugList( const QString & ) ) ); + TQT_SIGNAL( activated( const TQString & ) ), + TQT_SLOT( slotRetrieveBugList( const TQString & ) ) ); - connect( m_listPane, SIGNAL( executed( const Bug & ) ), - SLOT( slotRetrieveBugDetails( const Bug & ) ) ); - connect( m_listPane, SIGNAL( currentChanged( const Bug & ) ), - SLOT( slotSetActiveBug( const Bug & ) ) ); + connect( m_listPane, TQT_SIGNAL( executed( const Bug & ) ), + TQT_SLOT( slotRetrieveBugDetails( const Bug & ) ) ); + connect( m_listPane, TQT_SIGNAL( currentChanged( const Bug & ) ), + TQT_SLOT( slotSetActiveBug( const Bug & ) ) ); - connect( m_listPane, SIGNAL( searchPackage() ), SIGNAL( searchPackage() ) ); - connect( m_bugPane, SIGNAL( searchBugNumber() ), SIGNAL( searchBugNumber() ) ); + connect( m_listPane, TQT_SIGNAL( searchPackage() ), TQT_SIGNAL( searchPackage() ) ); + connect( m_bugPane, TQT_SIGNAL( searchBugNumber() ), TQT_SIGNAL( searchBugNumber() ) ); m_bLoadingAllBugs = false; @@ -127,15 +127,15 @@ CentralWidget::~CentralWidget() // kdDebug() << "CentralWidget::~CentralWidget()" << endl; } -void CentralWidget::initialize( const QString& p, const QString &c, const QString& b ) +void CentralWidget::initialize( const TQString& p, const TQString &c, const TQString& b ) { // kdDebug() << "CentralWidget::initialize(): package: '" << p // << "' bug: '" << b << "'" << endl; BugServerConfig cfg = BugSystem::self()->server()->serverConfig(); - QString package = p.isEmpty() ? cfg.currentPackage() : p; - QString bug = b.isEmpty() ? cfg.currentBug() : b; - QString component = c.isEmpty() ? cfg.currentComponent() : c; + TQString package = p.isEmpty() ? cfg.currentPackage() : p; + TQString bug = b.isEmpty() ? cfg.currentBug() : b; + TQString component = c.isEmpty() ? cfg.currentComponent() : c; m_listPane->setNoList(); m_bugPane->setNoBug(); @@ -170,8 +170,8 @@ void CentralWidget::writeConfig() { #if 0 kdDebug() << "m_vertSplitter" << endl; - QValueList sizes = m_vertSplitter->sizes(); - QValueList::ConstIterator it; + TQValueList sizes = m_vertSplitter->sizes(); + TQValueList::ConstIterator it; for( it = sizes.begin(); it != sizes.end(); ++it ) { kdDebug() << " " << (*it) << endl; } @@ -186,12 +186,12 @@ void CentralWidget::writeConfig() server->serverConfig().setCurrentBug( m_currentBug.number() ); } -void CentralWidget::slotRetrieveBugList( const QString &package ) +void CentralWidget::slotRetrieveBugList( const TQString &package ) { - slotRetrieveBugList( package, QString::null ); + slotRetrieveBugList( package, TQString::null ); } -void CentralWidget::slotRetrieveBugList( const QString &p, const QString &component ) +void CentralWidget::slotRetrieveBugList( const TQString &p, const TQString &component ) { if ( p.isEmpty() ) return; @@ -212,7 +212,7 @@ void CentralWidget::slotRetrieveBugList( const QString &p, const QString &compon BugSystem::self()->retrieveBugList( m_currentPackage, m_currentComponent ); } -QString CentralWidget::currentNumber() const +TQString CentralWidget::currentNumber() const { if( m_currentBug.isNull() ) return ""; @@ -220,7 +220,7 @@ QString CentralWidget::currentNumber() const return m_currentBug.number(); } -QString CentralWidget::currentTitle() const +TQString CentralWidget::currentTitle() const { if( m_currentBug.isNull() ) return ""; @@ -278,12 +278,12 @@ void CentralWidget::updatePackageList( const Package::List &pkgs ) */ } -void CentralWidget::updateBugList( const Package &pkg, const QString &component, const Bug::List &bugs ) +void CentralWidget::updateBugList( const Package &pkg, const TQString &component, const Bug::List &bugs ) { m_listPane->setBugList( pkg, component, bugs ); } -void CentralWidget::updateBugList( const QString &label, const Bug::List &bugs ) +void CentralWidget::updateBugList( const TQString &label, const Bug::List &bugs ) { m_listPane->setBugList( label, bugs ); } @@ -333,21 +333,21 @@ void CentralWidget::slotExtractAttachments() if (!m_currentBug.isNull()) { // Grab bug details (i.e. full-text) from cache, then extract attachments from it BugDetails details = BugSystem::self()->cache()->loadBugDetails( m_currentBug ); - QValueList attachments = details.extractAttachments(); + TQValueList attachments = details.extractAttachments(); if ( !attachments.isEmpty() ) { - QStringList fileList; - for ( QValueList::Iterator it = attachments.begin() ; it != attachments.end() ; ++it ) + TQStringList fileList; + for ( TQValueList::Iterator it = attachments.begin() ; it != attachments.end() ; ++it ) { // Handle duplicates if ( fileList.contains( (*it).filename ) ) { int n = 2; // looks stupid to have "blah" and "1-blah", start at 2 - QString fn = QString::number(n) + '-' + (*it).filename; + TQString fn = TQString::number(n) + '-' + (*it).filename; while ( fileList.contains( fn ) ) { ++n; - fn = QString::number(n) + '-' + (*it).filename; + fn = TQString::number(n) + '-' + (*it).filename; } (*it).filename = fn; } @@ -356,18 +356,18 @@ void CentralWidget::slotExtractAttachments() int res = KMessageBox::questionYesNoList( this, i18n("Found the following attachments. Save?"), - fileList, QString::null, KStdGuiItem::save(), KStdGuiItem::dontSave() ); + fileList, TQString::null, KStdGuiItem::save(), KStdGuiItem::dontSave() ); if ( res == KMessageBox::No ) return; - QString dir = KFileDialog::getExistingDirectory( QString::null, this, i18n("Select Folder Where to Save Attachments") ); + TQString dir = KFileDialog::getExistingDirectory( TQString::null, this, i18n("Select Folder Where to Save Attachments") ); if ( !dir.isEmpty() ) { if ( !dir.endsWith( "/" ) ) dir += '/'; - for ( QValueList::Iterator it = attachments.begin() ; it != attachments.end() ; ++it ) + for ( TQValueList::Iterator it = attachments.begin() ; it != attachments.end() ; ++it ) { - QString filename = m_currentBug.number() + '-' + (*it).filename; - QFile file( dir + filename ); + TQString filename = m_currentBug.number() + '-' + (*it).filename; + TQFile file( dir + filename ); if ( file.open( IO_WriteOnly ) ) file.writeBlock( (*it).contents ); else @@ -381,7 +381,7 @@ void CentralWidget::slotExtractAttachments() void CentralWidget::mergeBugs() { - QStringList bugNumbers = m_listPane->selectedBugs(); + TQStringList bugNumbers = m_listPane->selectedBugs(); if ( bugNumbers.count() >= 2 ) { BugSystem::self()->queueCommand( new BugCommandMerge( bugNumbers, m_currentPackage ) ); @@ -436,7 +436,7 @@ void CentralWidget::reassignBug() void CentralWidget::titleBug() { bool ok = false; - QString title = KInputDialog::getText( i18n("Change Bug Title"), + TQString title = KInputDialog::getText( i18n("Change Bug Title"), i18n( "Please enter a new title:" ), m_currentBug.title(), &ok, this ); if ( ok && !title.isEmpty() ) { @@ -450,7 +450,7 @@ void CentralWidget::severityBug() SeveritySelectDialog *dlg = new SeveritySelectDialog( this ); dlg->setSeverity( m_currentBug.severity() ); int result = dlg->exec(); - if ( result == QDialog::Accepted ) { + if ( result == TQDialog::Accepted ) { BugSystem::self()->queueCommand( new BugCommandSeverity( m_currentBug, dlg->selectedSeverityAsString(), m_currentPackage ) ); @@ -478,7 +478,7 @@ void CentralWidget::clearCommand() BugSystem::self()->clearCommands( m_currentBug.number() ); } -void CentralWidget::searchBugByTitle( int options, const QString& pattern ) +void CentralWidget::searchBugByTitle( int options, const TQString& pattern ) { m_listPane->searchBugByTitle( options, pattern ); } @@ -492,7 +492,7 @@ void CentralWidget::slotRetrieveAllBugDetails() m_bLoadingAllBugs = false; } -void CentralWidget::showLoadingError( const QString &text ) +void CentralWidget::showLoadingError( const TQString &text ) { KMessageBox::error( this, text ); } diff --git a/kbugbuster/gui/centralwidget.h b/kbugbuster/gui/centralwidget.h index 85b97eca..30b40f61 100644 --- a/kbugbuster/gui/centralwidget.h +++ b/kbugbuster/gui/centralwidget.h @@ -17,7 +17,7 @@ #ifndef KBBMAINWINDOW_CENTRALWIDGET_H #define KBBMAINWINDOW_CENTRALWIDGET_H -#include +#include #include "package.h" #include "bug.h" @@ -42,37 +42,37 @@ class CentralWidget : public QWidget Q_OBJECT public: - CentralWidget( const QCString &initialPackage, - const QCString &initalComponent,const QCString& initialBug, - QWidget* parent = 0, const char* name = 0 ); + CentralWidget( const TQCString &initialPackage, + const TQCString &initalComponent,const TQCString& initialBug, + TQWidget* parent = 0, const char* name = 0 ); ~CentralWidget(); - void initialize( const QString &initialPackage = QString::null, - const QString &initalComponent = QString::null, - const QString &initialBug = QString::null ); + void initialize( const TQString &initialPackage = TQString::null, + const TQString &initalComponent = TQString::null, + const TQString &initialBug = TQString::null ); void readConfig(); void writeConfig(); - void searchBugByTitle( int options, const QString& pattern ); + void searchBugByTitle( int options, const TQString& pattern ); - virtual QString currentNumber() const; - virtual QString currentTitle() const; + virtual TQString currentNumber() const; + virtual TQString currentTitle() const; void updatePackage(); CWBugDetails *bugDetailsWidget(); public slots: - void slotRetrieveBugList( const QString &package, const QString &component ); - void slotRetrieveBugList( const QString &package ); + void slotRetrieveBugList( const TQString &package, const TQString &component ); + void slotRetrieveBugList( const TQString &package ); void slotRetrieveBugDetails( const Bug & ); void slotSetActiveBug( const Bug & ); void slotRetrieveAllBugDetails(); void updatePackageList( const Package::List &pkgs ); - void updateBugList( const Package &pkg, const QString &component, const Bug::List &bugs ); - void updateBugList( const QString &label, const Bug::List &bugs ); + void updateBugList( const Package &pkg, const TQString &component, const Bug::List &bugs ); + void updateBugList( const TQString &label, const Bug::List &bugs ); void updateBugDetails( const Bug &, const BugDetails & ); void slotReloadPackageList(); @@ -105,24 +105,24 @@ signals: void searchBugNumber(); // when clicking on the initial bug-details widget protected slots: - void showLoadingError( const QString & ); + void showLoadingError( const TQString & ); private: CWSearchWidget *m_searchPane; CWBugListContainer *m_listPane; CWBugDetailsContainer *m_bugPane; - QSplitter *m_vertSplitter; - QSplitter *m_horSplitter; + TQSplitter *m_vertSplitter; + TQSplitter *m_horSplitter; /** * Other status info */ Package m_currentPackage; - QString m_currentComponent; + TQString m_currentComponent; Bug m_currentBug; - QMap m_packageList; + TQMap m_packageList; /** * We do multi-select, but the close/reopen buttons are per-item and diff --git a/kbugbuster/gui/cwbugdetails.cpp b/kbugbuster/gui/cwbugdetails.cpp index 7aaf16a4..eca64758 100644 --- a/kbugbuster/gui/cwbugdetails.cpp +++ b/kbugbuster/gui/cwbugdetails.cpp @@ -14,10 +14,10 @@ ************************************************************************* */ -#include -#include -#include -#include +#include +#include +#include +#include #include "cwbugdetails.h" #include "kbbprefs.h" @@ -30,19 +30,19 @@ #include #include -#include -#include +#include +#include using namespace KBugBusterMainWindow; -CWBugDetails::CWBugDetails( QWidget *parent , const char * name ) - : QWidget( parent, name ) +CWBugDetails::CWBugDetails( TQWidget *parent , const char * name ) + : TQWidget( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); m_bugDesc = new KHTMLPart( this, "m_bugDesc" ); - connect( m_bugDesc->browserExtension(), SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ), - this, SLOT( handleOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); + connect( m_bugDesc->browserExtension(), TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ), + this, TQT_SLOT( handleOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); topLayout->addWidget( m_bugDesc->view() ); } @@ -53,14 +53,14 @@ CWBugDetails::~CWBugDetails() void CWBugDetails::setBug( const Bug &bug, const BugDetails &details ) { - QColorGroup cg = m_bugDesc->view()->palette().active(); - QString text = + TQColorGroup cg = m_bugDesc->view()->palette().active(); + TQString text = "\n" "\n" "