summaryrefslogtreecommitdiffstats
path: root/kdecore
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kdecore
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore')
-rw-r--r--kdecore/DESIGN.COLOR32
-rw-r--r--kdecore/kaboutdata.cpp98
-rw-r--r--kdecore/kaboutdata.h92
-rw-r--r--kdecore/kaccel.cpp184
-rw-r--r--kdecore/kaccel.h74
-rw-r--r--kdecore/kaccelaction.cpp52
-rw-r--r--kdecore/kaccelaction.h60
-rw-r--r--kdecore/kaccelbase.cpp38
-rw-r--r--kdecore/kaccelbase.h52
-rw-r--r--kdecore/kaccelmanager.cpp242
-rw-r--r--kdecore/kaccelmanager.h8
-rw-r--r--kdecore/kaccelmanager_private.h46
-rw-r--r--kdecore/kaccelprivate.h20
-rw-r--r--kdecore/kallocator.cpp18
-rw-r--r--kdecore/kallocator.h4
-rw-r--r--kdecore/kappdcopiface.cpp4
-rw-r--r--kdecore/kappdcopiface.h8
-rw-r--r--kdecore/kapplication.cpp832
-rw-r--r--kdecore/kapplication.h206
-rw-r--r--kdecore/kapplication_win.cpp38
-rw-r--r--kdecore/kasyncio.h8
-rw-r--r--kdecore/kaudioplayer.cpp10
-rw-r--r--kdecore/kaudioplayer.h14
-rw-r--r--kdecore/kbufferedio.cpp34
-rw-r--r--kdecore/kbufferedio.h16
-rw-r--r--kdecore/kcalendarsystem.cpp24
-rw-r--r--kdecore/kcalendarsystem.h70
-rw-r--r--kdecore/kcalendarsystemfactory.cpp6
-rw-r--r--kdecore/kcalendarsystemfactory.h10
-rw-r--r--kdecore/kcalendarsystemgregorian.cpp60
-rw-r--r--kdecore/kcalendarsystemgregorian.h46
-rw-r--r--kdecore/kcalendarsystemhebrew.cpp138
-rw-r--r--kdecore/kcalendarsystemhebrew.h52
-rw-r--r--kdecore/kcalendarsystemhijri.cpp70
-rw-r--r--kdecore/kcalendarsystemhijri.h44
-rw-r--r--kdecore/kcalendarsystemjalali.cpp68
-rw-r--r--kdecore/kcalendarsystemjalali.h44
-rw-r--r--kdecore/kcatalogue.cpp22
-rw-r--r--kdecore/kcatalogue.h12
-rw-r--r--kdecore/kcharsets.cpp124
-rw-r--r--kdecore/kcharsets.h42
-rw-r--r--kdecore/kcheckaccelerators.cpp82
-rw-r--r--kdecore/kcheckaccelerators.h24
-rw-r--r--kdecore/kckey.cpp2
-rw-r--r--kdecore/kclipboard.cpp38
-rw-r--r--kdecore/kclipboard.h12
-rw-r--r--kdecore/kcmdlineargs.cpp174
-rw-r--r--kdecore/kcmdlineargs.h40
-rw-r--r--kdecore/kcompletion.cpp138
-rw-r--r--kdecore/kcompletion.h104
-rw-r--r--kdecore/kcompletion_private.h32
-rw-r--r--kdecore/kcompletionbase.cpp2
-rw-r--r--kdecore/kconfig.cpp62
-rw-r--r--kdecore/kconfig.h26
-rw-r--r--kdecore/kconfig_compiler/example/autoexample.cpp2
-rw-r--r--kdecore/kconfig_compiler/kconfig_compiler.cpp582
-rw-r--r--kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp20
-rw-r--r--kdecore/kconfig_compiler/tests/kconfigcompiler_test.h2
-rw-r--r--kdecore/kconfig_compiler/tests/myprefs.h2
-rw-r--r--kdecore/kconfig_compiler/tests/test1.cpp.ref64
-rw-r--r--kdecore/kconfig_compiler/tests/test1.h.ref50
-rw-r--r--kdecore/kconfig_compiler/tests/test1main.cpp2
-rw-r--r--kdecore/kconfig_compiler/tests/test2.cpp.ref74
-rw-r--r--kdecore/kconfig_compiler/tests/test2.h.ref52
-rw-r--r--kdecore/kconfig_compiler/tests/test3.cpp.ref22
-rw-r--r--kdecore/kconfig_compiler/tests/test3.h.ref20
-rw-r--r--kdecore/kconfig_compiler/tests/test4.cpp.ref52
-rw-r--r--kdecore/kconfig_compiler/tests/test4.h.ref20
-rw-r--r--kdecore/kconfig_compiler/tests/test5.cpp.ref52
-rw-r--r--kdecore/kconfig_compiler/tests/test5.h.ref20
-rw-r--r--kdecore/kconfig_compiler/tests/test6.cpp.ref20
-rw-r--r--kdecore/kconfig_compiler/tests/test6.h.ref22
-rw-r--r--kdecore/kconfig_compiler/tests/test6main.cpp2
-rw-r--r--kdecore/kconfig_compiler/tests/test7.cpp.ref18
-rw-r--r--kdecore/kconfig_compiler/tests/test7.h.ref18
-rw-r--r--kdecore/kconfig_compiler/tests/test8a.cpp.ref10
-rw-r--r--kdecore/kconfig_compiler/tests/test8a.h.ref16
-rw-r--r--kdecore/kconfig_compiler/tests/test8b.cpp.ref16
-rw-r--r--kdecore/kconfig_compiler/tests/test8b.h.ref6
-rw-r--r--kdecore/kconfig_compiler/tests/test8main.cpp2
-rw-r--r--kdecore/kconfig_compiler/tests/test9.cpp.ref30
-rw-r--r--kdecore/kconfig_compiler/tests/test9.h.ref32
-rw-r--r--kdecore/kconfig_compiler/tests/test9main.cpp8
-rw-r--r--kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref126
-rw-r--r--kdecore/kconfig_compiler/tests/test_dpointer.h.ref20
-rw-r--r--kdecore/kconfigbackend.cpp164
-rw-r--r--kdecore/kconfigbackend.h30
-rw-r--r--kdecore/kconfigbase.cpp646
-rw-r--r--kdecore/kconfigbase.h340
-rw-r--r--kdecore/kconfigdata.h20
-rw-r--r--kdecore/kconfigdialogmanager.cpp198
-rw-r--r--kdecore/kconfigdialogmanager.h38
-rw-r--r--kdecore/kconfigskeleton.cpp418
-rw-r--r--kdecore/kconfigskeleton.h450
-rw-r--r--kdecore/kcrash.cpp6
-rw-r--r--kdecore/kcrash.h10
-rw-r--r--kdecore/kdcoppropertyproxy.cpp184
-rw-r--r--kdecore/kdcoppropertyproxy.h44
-rw-r--r--kdecore/kde-config.cpp.in14
-rw-r--r--kdecore/kdebug.cpp146
-rw-r--r--kdecore/kdebug.h126
-rw-r--r--kdecore/kdelibs_export.h2
-rw-r--r--kdecore/kdesktopfile.cpp110
-rw-r--r--kdecore/kdesktopfile.h58
-rw-r--r--kdecore/kextsock.cpp116
-rw-r--r--kdecore/kextsock.h70
-rw-r--r--kdecore/kgenericfactory.h102
-rw-r--r--kdecore/kglobal.cpp32
-rw-r--r--kdecore/kglobal.h18
-rw-r--r--kdecore/kglobalaccel.cpp30
-rw-r--r--kdecore/kglobalaccel.h28
-rw-r--r--kdecore/kglobalaccel_mac.h2
-rw-r--r--kdecore/kglobalaccel_win.cpp52
-rw-r--r--kdecore/kglobalaccel_win.h6
-rw-r--r--kdecore/kglobalaccel_x11.cpp68
-rw-r--r--kdecore/kglobalaccel_x11.h8
-rw-r--r--kdecore/kglobalsettings.cpp216
-rw-r--r--kdecore/kglobalsettings.h128
-rw-r--r--kdecore/kiconeffect.cpp158
-rw-r--r--kdecore/kiconeffect.h48
-rw-r--r--kdecore/kiconloader.cpp384
-rw-r--r--kdecore/kiconloader.h108
-rw-r--r--kdecore/kiconloader_p.h26
-rw-r--r--kdecore/kicontheme.cpp162
-rw-r--r--kdecore/kicontheme.h62
-rw-r--r--kdecore/kidna.cpp16
-rw-r--r--kdecore/kidna.h8
-rw-r--r--kdecore/kinstance.cpp28
-rw-r--r--kdecore/kinstance.h10
-rw-r--r--kdecore/kipc.cpp2
-rw-r--r--kdecore/kipc.h2
-rw-r--r--kdecore/kkeynative_x11.cpp8
-rw-r--r--kdecore/kkeyserver_x11.cpp70
-rw-r--r--kdecore/kkeyserver_x11.h20
-rw-r--r--kdecore/klibloader.cpp118
-rw-r--r--kdecore/klibloader.h70
-rw-r--r--kdecore/klocale.cpp520
-rw-r--r--kdecore/klocale.h238
-rw-r--r--kdecore/klockfile.cpp56
-rw-r--r--kdecore/klockfile.h8
-rw-r--r--kdecore/kmacroexpander.cpp144
-rw-r--r--kdecore/kmacroexpander.h106
-rw-r--r--kdecore/kmanagerselection.cpp20
-rw-r--r--kdecore/kmanagerselection.h10
-rw-r--r--kdecore/kmdcodec.cpp116
-rw-r--r--kdecore/kmdcodec.h104
-rw-r--r--kdecore/kmimesourcefactory.cpp12
-rw-r--r--kdecore/kmimesourcefactory.h8
-rw-r--r--kdecore/kmountpoint.cpp60
-rw-r--r--kdecore/kmountpoint.h28
-rw-r--r--kdecore/kmultipledrag.cpp18
-rw-r--r--kdecore/kmultipledrag.h18
-rw-r--r--kdecore/knotifyclient.cpp84
-rw-r--r--kdecore/knotifyclient.h46
-rw-r--r--kdecore/kpalette.cpp50
-rw-r--r--kdecore/kpalette.h52
-rw-r--r--kdecore/kpixmapprovider.h4
-rw-r--r--kdecore/kprocctrl.cpp16
-rw-r--r--kdecore/kprocctrl.h8
-rw-r--r--kdecore/kprocess.cpp76
-rw-r--r--kdecore/kprocess.h46
-rw-r--r--kdecore/kprocio.cpp48
-rw-r--r--kdecore/kprocio.h24
-rw-r--r--kdecore/kprotocolinfo_kdecore.cpp112
-rw-r--r--kdecore/kprotocolinfofactory.cpp10
-rw-r--r--kdecore/kprotocolinfofactory.h14
-rw-r--r--kdecore/kpty.cpp8
-rw-r--r--kdecore/kpty.h2
-rw-r--r--kdecore/kqiodevicegzip_p.cpp14
-rw-r--r--kdecore/kqiodevicegzip_p.h12
-rw-r--r--kdecore/krandomsequence.cpp8
-rw-r--r--kdecore/krandomsequence.h2
-rw-r--r--kdecore/kregexp.h4
-rw-r--r--kdecore/krfcdate.cpp26
-rw-r--r--kdecore/krfcdate.h10
-rw-r--r--kdecore/krootprop.cpp84
-rw-r--r--kdecore/krootprop.h50
-rw-r--r--kdecore/ksavefile.cpp28
-rw-r--r--kdecore/ksavefile.h34
-rw-r--r--kdecore/kshell.cpp72
-rw-r--r--kdecore/kshell.h16
-rw-r--r--kdecore/kshortcut.cpp102
-rw-r--r--kdecore/kshortcut.h78
-rw-r--r--kdecore/kshortcutlist.cpp40
-rw-r--r--kdecore/kshortcutlist.h42
-rw-r--r--kdecore/kshortcutmenu.cpp24
-rw-r--r--kdecore/kshortcutmenu.h12
-rw-r--r--kdecore/ksimpleconfig.cpp12
-rw-r--r--kdecore/ksimpleconfig.h2
-rw-r--r--kdecore/ksock.cpp34
-rw-r--r--kdecore/ksock.h4
-rw-r--r--kdecore/ksockaddr.cpp54
-rw-r--r--kdecore/ksockaddr.h58
-rw-r--r--kdecore/ksocks.cpp22
-rw-r--r--kdecore/ksocks.h6
-rw-r--r--kdecore/ksortablevaluelist.h16
-rw-r--r--kdecore/kstandarddirs.cpp558
-rw-r--r--kdecore/kstandarddirs.h134
-rw-r--r--kdecore/kstartupinfo.cpp304
-rw-r--r--kdecore/kstartupinfo.h94
-rw-r--r--kdecore/kstdaccel.cpp44
-rw-r--r--kdecore/kstdaccel.h18
-rw-r--r--kdecore/kstringhandler.cpp164
-rw-r--r--kdecore/kstringhandler.h130
-rw-r--r--kdecore/ksycoca.cpp84
-rw-r--r--kdecore/ksycoca.h22
-rw-r--r--kdecore/ksycocadict.cpp66
-rw-r--r--kdecore/ksycocadict.h22
-rw-r--r--kdecore/ksycocaentry.h22
-rw-r--r--kdecore/ksycocafactory.cpp20
-rw-r--r--kdecore/ksycocafactory.h16
-rw-r--r--kdecore/ktempdir.cpp32
-rw-r--r--kdecore/ktempdir.h22
-rw-r--r--kdecore/ktempfile.cpp40
-rw-r--r--kdecore/ktempfile.h44
-rw-r--r--kdecore/ktimezones.cpp102
-rw-r--r--kdecore/ktimezones.h48
-rw-r--r--kdecore/kuniqueapplication.cpp62
-rw-r--r--kdecore/kuniqueapplication.h6
-rw-r--r--kdecore/kurl.cpp506
-rw-r--r--kdecore/kurl.h316
-rw-r--r--kdecore/kurldrag.cpp100
-rw-r--r--kdecore/kurldrag.h52
-rw-r--r--kdecore/kuser.cpp142
-rw-r--r--kdecore/kuser.h50
-rw-r--r--kdecore/kvmallocator.cpp18
-rw-r--r--kdecore/kwin.cpp130
-rw-r--r--kdecore/kwin.h64
-rw-r--r--kdecore/kwinmodule.cpp134
-rw-r--r--kdecore/kwinmodule.h34
-rw-r--r--kdecore/kxerrorhandler.cpp2
-rw-r--r--kdecore/kxerrorhandler.h4
-rw-r--r--kdecore/kxmessages.cpp50
-rw-r--r--kdecore/kxmessages.h36
-rw-r--r--kdecore/libintl.cpp2
-rw-r--r--kdecore/netsupp.cpp2
-rw-r--r--kdecore/netsupp.h2
-rw-r--r--kdecore/netwm.cpp6
-rw-r--r--kdecore/netwm.h4
-rw-r--r--kdecore/netwm_def.h6
-rw-r--r--kdecore/network/kbufferedsocket.cpp26
-rw-r--r--kdecore/network/kbufferedsocket.h14
-rw-r--r--kdecore/network/kclientsocketbase.cpp42
-rw-r--r--kdecore/network/kclientsocketbase.h32
-rw-r--r--kdecore/network/kdatagramsocket.cpp24
-rw-r--r--kdecore/network/kdatagramsocket.h26
-rw-r--r--kdecore/network/khttpproxysocketdevice.cpp20
-rw-r--r--kdecore/network/khttpproxysocketdevice.h2
-rw-r--r--kdecore/network/kiobuffer.h4
-rw-r--r--kdecore/network/kmulticastsocket.h2
-rw-r--r--kdecore/network/kresolver.cpp196
-rw-r--r--kdecore/network/kresolver.h108
-rw-r--r--kdecore/network/kresolver_p.h46
-rw-r--r--kdecore/network/kresolvermanager.cpp44
-rw-r--r--kdecore/network/kresolverstandardworkers.cpp66
-rw-r--r--kdecore/network/kresolverstandardworkers_p.h14
-rw-r--r--kdecore/network/kresolverworkerbase.cpp16
-rw-r--r--kdecore/network/kresolverworkerbase.h8
-rw-r--r--kdecore/network/kreverseresolver.cpp52
-rw-r--r--kdecore/network/kreverseresolver.h30
-rw-r--r--kdecore/network/kserversocket.cpp48
-rw-r--r--kdecore/network/kserversocket.h40
-rw-r--r--kdecore/network/ksocketaddress.cpp54
-rw-r--r--kdecore/network/ksocketaddress.h32
-rw-r--r--kdecore/network/ksocketbase.cpp16
-rw-r--r--kdecore/network/ksocketbase.h32
-rw-r--r--kdecore/network/ksocketbuffer.cpp48
-rw-r--r--kdecore/network/ksocketbuffer_p.h14
-rw-r--r--kdecore/network/ksocketdevice.cpp42
-rw-r--r--kdecore/network/ksocketdevice.h18
-rw-r--r--kdecore/network/ksrvresolverworker.cpp38
-rw-r--r--kdecore/network/ksrvresolverworker_p.h28
-rw-r--r--kdecore/network/kstreamsocket.cpp44
-rw-r--r--kdecore/network/kstreamsocket.h44
-rw-r--r--kdecore/svgicons/ksvgiconengine.cpp154
-rw-r--r--kdecore/svgicons/ksvgiconengine.h4
-rw-r--r--kdecore/svgicons/ksvgiconpainter.cpp530
-rw-r--r--kdecore/svgicons/ksvgiconpainter.h64
-rw-r--r--kdecore/tests/KIDLTest.cpp6
-rw-r--r--kdecore/tests/KIDLTest.h4
-rw-r--r--kdecore/tests/KIDLTestClient.cpp2
-rw-r--r--kdecore/tests/cplusplustest.cpp8
-rw-r--r--kdecore/tests/dcopkonqtest.cpp8
-rw-r--r--kdecore/tests/kcalendartest.cpp16
-rw-r--r--kdecore/tests/kcharsetstest.cpp4
-rw-r--r--kdecore/tests/kcmdlineargstest.cpp2
-rw-r--r--kdecore/tests/kconfigtest.cpp32
-rw-r--r--kdecore/tests/kconfigtestgui.cpp70
-rw-r--r--kdecore/tests/kconfigtestgui.h40
-rw-r--r--kdecore/tests/kdebugtest.cpp52
-rw-r--r--kdecore/tests/kglobaltest.cpp6
-rw-r--r--kdecore/tests/kiconloadertest.cpp8
-rw-r--r--kdecore/tests/kipctest.cpp16
-rw-r--r--kdecore/tests/kipctest.h2
-rw-r--r--kdecore/tests/klocaletest.cpp70
-rw-r--r--kdecore/tests/klocaletest.h8
-rw-r--r--kdecore/tests/kmacroexpandertest.cpp24
-rw-r--r--kdecore/tests/kmdcodectest.cpp26
-rw-r--r--kdecore/tests/kprocesstest.cpp32
-rw-r--r--kdecore/tests/kprocesstest.h2
-rw-r--r--kdecore/tests/kprociotest.cpp4
-rw-r--r--kdecore/tests/kprociotest.h4
-rw-r--r--kdecore/tests/krandomsequencetest.cpp26
-rw-r--r--kdecore/tests/kresolvertest.cpp20
-rw-r--r--kdecore/tests/krfcdatetest.cpp8
-rw-r--r--kdecore/tests/kshelltest.cpp4
-rw-r--r--kdecore/tests/ksocktest.cpp14
-rw-r--r--kdecore/tests/ksortablevaluelisttest.cpp6
-rw-r--r--kdecore/tests/kstdacceltest.cpp6
-rw-r--r--kdecore/tests/kstddirstest.cpp16
-rw-r--r--kdecore/tests/kstringhandlertest.cpp6
-rw-r--r--kdecore/tests/ktempfiletest.cpp8
-rw-r--r--kdecore/tests/ktimezonestest.cpp16
-rw-r--r--kdecore/tests/kurltest.cpp128
-rw-r--r--kdecore/tests/kxerrorhandlertest.cpp2
-rw-r--r--kdecore/tests/startserviceby.cpp6
-rw-r--r--kdecore/tests/testqtargs.cpp2
317 files changed, 9851 insertions, 9851 deletions
diff --git a/kdecore/DESIGN.COLOR b/kdecore/DESIGN.COLOR
index e06c7c7d3..b997a6de0 100644
--- a/kdecore/DESIGN.COLOR
+++ b/kdecore/DESIGN.COLOR
@@ -22,12 +22,12 @@ should be taken never to mix foreground colors from one group with
background colors from another group: they do not necasserily have any
contrast at all which can lead to a completely unreadable UI.
-Color schemes are supported by Qt (see QColorGroup) and can be
+Color schemes are supported by Qt (see TQColorGroup) and can be
configured on a KDE wide basis from the Control Panel. The settings
are stored in the global KDE configuration file under the "General"
setting. The KApplication class takes care that the configured
settings are passed on to Qt. Application developers can just use the
-values provided by QColorGroup.
+values provided by TQColorGroup.
There are three major color categories:
@@ -36,13 +36,13 @@ General
The colors in this group are used when no particular other group is
relevant.
-QColorGroup...: ColorRole::Background, background()
+TQColorGroup...: ColorRole::Background, background()
KDE config key: background
Control Center: i18n("Window Background")
Description...: General background color
Example use...: Background of dialogs
-QColorGroup...: ColorRole::Foreground, foreground()
+TQColorGroup...: ColorRole::Foreground, foreground()
KDE config key: foreground
Control Center: i18n("Window Text")
Description...: General foreground color
@@ -53,25 +53,25 @@ Text Areas
The colors in this group are used where the user can type text. it is
also used for lists from which the user can choose.
-QColorGroup...: ColorRole::Base, base()
+TQColorGroup...: ColorRole::Base, base()
KDE config key: windowBackground
Control Center: i18n("Standard background")
Description...: Background color for text areas.
Example use...: Background in a word-processor.
-QColorGroup...: ColorRole::Text, text()
+TQColorGroup...: ColorRole::Text, text()
KDE config key: windowForeground
Control Center: i18n("Standard text")
Description...: Text color for text areas.
Example use...: Text in a word-processor.
-QColorGroup...: ColorRole::Highlight, highlight()
+TQColorGroup...: ColorRole::Highlight, highlight()
KDE config key: selectBackground
Control Center: i18n("Select background")
Description...: Background color for selected text.
Example use...: In a selection list.
-QColorGroup...: ColorRole::HighlightedText, highlightedText()
+TQColorGroup...: ColorRole::HighlightedText, highlightedText()
KDE config key: selectForeground
Control Center: i18n("Select text")
Description...: Text color for selected text.
@@ -88,13 +88,13 @@ The colors used in this category are used for buttons in the broad
sense, including e.g.scrollbars, menubars and
popup-menus.
-QColorGroup...: ColorRole::Button, button()
+TQColorGroup...: ColorRole::Button, button()
KDE config key: buttonBackground
Control Center: i18n("Button background")
Description...: Background color for buttons.
Example use...: Background color of the OK button in a messagebox.
-QColorGroup...: ColorRole::ButtonText, buttonText()
+TQColorGroup...: ColorRole::ButtonText, buttonText()
KDE config key: buttonForeground
Control Center: i18n("Button text")
Description...: Color for text on buttons.
@@ -104,22 +104,22 @@ Example use...: Color of the OK text on a button in a messagebox.
In addition to the above colors a number of derived colors are
defined.They are all darker of lighter version of "Background".
-QColorGroup...: ColorRole::Shadow, shadow()
+TQColorGroup...: ColorRole::Shadow, shadow()
Description...: Used for shadow effects.(Very dark)
-QColorGroup...: ColorRold::BrightText, brightText()
+TQColorGroup...: ColorRold::BrightText, brightText()
Description...: Used for text on pushed pushbuttons
-QColorGroup...: ColorRole::Light, light()
+TQColorGroup...: ColorRole::Light, light()
Description...: Lighter than "Button"
-QColorGroup...: ColorRole::Midlight, midlight()
+TQColorGroup...: ColorRole::Midlight, midlight()
Description...: Between "Button" and "Light"
-QColorGroup...: ColorRole::Dark, dark()
+TQColorGroup...: ColorRole::Dark, dark()
Description...: Darker than "Button"
-QColorGroup...: ColorRole::Mid, mid()
+TQColorGroup...: ColorRole::Mid, mid()
Description...: Between "Button" and "Dark"
Well Behaved Aplications
diff --git a/kdecore/kaboutdata.cpp b/kdecore/kaboutdata.cpp
index aca080837..423166c18 100644
--- a/kdecore/kaboutdata.cpp
+++ b/kdecore/kaboutdata.cpp
@@ -22,13 +22,13 @@
#include <kaboutdata.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
QString
KAboutPerson::name() const
{
- return QString::fromUtf8(mName);
+ return TQString::fromUtf8(mName);
}
QString
@@ -37,36 +37,36 @@ KAboutPerson::task() const
if (mTask && *mTask)
return i18n(mTask);
else
- return QString::null;
+ return TQString::null;
}
QString
KAboutPerson::emailAddress() const
{
- return QString::fromUtf8(mEmailAddress);
+ return TQString::fromUtf8(mEmailAddress);
}
QString
KAboutPerson::webAddress() const
{
- return QString::fromUtf8(mWebAddress);
+ return TQString::fromUtf8(mWebAddress);
}
-KAboutTranslator::KAboutTranslator(const QString & name,
- const QString & emailAddress)
+KAboutTranslator::KAboutTranslator(const TQString & name,
+ const TQString & emailAddress)
{
mName=name;
mEmail=emailAddress;
}
-QString KAboutTranslator::name() const
+TQString KAboutTranslator::name() const
{
return mName;
}
-QString KAboutTranslator::emailAddress() const
+TQString KAboutTranslator::emailAddress() const
{
return mEmail;
}
@@ -90,8 +90,8 @@ public:
const char *translatorName;
const char *translatorEmail;
const char *productName;
- QImage* programLogo;
- QString customAuthorPlainText, customAuthorRichText;
+ TQImage* programLogo;
+ TQString customAuthorPlainText, customAuthorRichText;
bool customAuthorTextEnabled;
const char *mTranslatedProgramName;
};
@@ -166,9 +166,9 @@ KAboutData::setLicenseText( const char *licenseText )
}
void
-KAboutData::setLicenseTextFile( const QString &file )
+KAboutData::setLicenseTextFile( const TQString &file )
{
- mLicenseText = qstrdup(QFile::encodeName(file));
+ mLicenseText = qstrdup(TQFile::encodeName(file));
mLicenseKey = License_File;
}
@@ -254,7 +254,7 @@ KAboutData::programName() const
if (mProgramName && *mProgramName)
return i18n(mProgramName);
else
- return QString::null;
+ return TQString::null;
}
const char*
@@ -281,14 +281,14 @@ KAboutData::translateInternalProgramName() const
QImage
KAboutData::programLogo() const
{
- return d->programLogo ? (*d->programLogo) : QImage();
+ return d->programLogo ? (*d->programLogo) : TQImage();
}
void
-KAboutData::setProgramLogo(const QImage& image)
+KAboutData::setProgramLogo(const TQImage& image)
{
if (!d->programLogo)
- d->programLogo = new QImage( image );
+ d->programLogo = new TQImage( image );
else
*d->programLogo = image;
}
@@ -296,7 +296,7 @@ KAboutData::setProgramLogo(const QImage& image)
QString
KAboutData::version() const
{
- return QString::fromLatin1(mVersion);
+ return TQString::fromLatin1(mVersion);
}
QString
@@ -305,75 +305,75 @@ KAboutData::shortDescription() const
if (mShortDescription && *mShortDescription)
return i18n(mShortDescription);
else
- return QString::null;
+ return TQString::null;
}
QString
KAboutData::homepage() const
{
- return QString::fromLatin1(mHomepageAddress);
+ return TQString::fromLatin1(mHomepageAddress);
}
QString
KAboutData::bugAddress() const
{
- return QString::fromLatin1(mBugEmailAddress);
+ return TQString::fromLatin1(mBugEmailAddress);
}
-const QValueList<KAboutPerson>
+const TQValueList<KAboutPerson>
KAboutData::authors() const
{
return mAuthorList;
}
-const QValueList<KAboutPerson>
+const TQValueList<KAboutPerson>
KAboutData::credits() const
{
return mCreditList;
}
-const QValueList<KAboutTranslator>
+const TQValueList<KAboutTranslator>
KAboutData::translators() const
{
- QValueList<KAboutTranslator> personList;
+ TQValueList<KAboutTranslator> personList;
if(d->translatorName == 0)
return personList;
- QStringList nameList;
- QStringList emailList;
+ TQStringList nameList;
+ TQStringList emailList;
- QString names = i18n(d->translatorName);
- if(names != QString::fromUtf8(d->translatorName))
+ TQString names = i18n(d->translatorName);
+ if(names != TQString::fromUtf8(d->translatorName))
{
- nameList = QStringList::split(',',names);
+ nameList = TQStringList::split(',',names);
}
if(d->translatorEmail)
{
- QString emails = i18n(d->translatorEmail);
+ TQString emails = i18n(d->translatorEmail);
- if(emails != QString::fromUtf8(d->translatorEmail))
+ if(emails != TQString::fromUtf8(d->translatorEmail))
{
- emailList = QStringList::split(',',emails,true);
+ emailList = TQStringList::split(',',emails,true);
}
}
- QStringList::Iterator nit;
- QStringList::Iterator eit=emailList.begin();
+ TQStringList::Iterator nit;
+ TQStringList::Iterator eit=emailList.begin();
for(nit = nameList.begin(); nit != nameList.end(); ++nit)
{
- QString email;
+ TQString email;
if(eit != emailList.end())
{
email=*eit;
++eit;
}
- QString name=*nit;
+ TQString name=*nit;
personList.append(KAboutTranslator(name.stripWhiteSpace(), email.stripWhiteSpace()));
}
@@ -398,23 +398,23 @@ KAboutData::otherText() const
if (mOtherText && *mOtherText)
return i18n(mOtherText);
else
- return QString::null;
+ return TQString::null;
}
QString
KAboutData::license() const
{
- QString result;
+ TQString result;
if (!copyrightStatement().isEmpty())
result = copyrightStatement() + "\n\n";
- QString l;
- QString f;
+ TQString l;
+ TQString f;
switch ( mLicenseKey )
{
case License_File:
- f = QFile::decodeName(mLicenseText);
+ f = TQFile::decodeName(mLicenseText);
break;
case License_GPL_V2:
l = "GPL v2";
@@ -452,12 +452,12 @@ KAboutData::license() const
if (!f.isEmpty())
{
- QFile file(f);
+ TQFile file(f);
if (file.open(IO_ReadOnly))
{
result += '\n';
result += '\n';
- QTextStream str(&file);
+ TQTextStream str(&file);
result += str.read();
}
}
@@ -471,7 +471,7 @@ KAboutData::copyrightStatement() const
if (mCopyrightStatement && *mCopyrightStatement)
return i18n(mCopyrightStatement);
else
- return QString::null;
+ return TQString::null;
}
QString
@@ -493,7 +493,7 @@ KAboutData::customAuthorTextEnabled() const
}
void
-KAboutData::setCustomAuthorText(const QString &plainText, const QString &richText)
+KAboutData::setCustomAuthorText(const TQString &plainText, const TQString &richText)
{
d->customAuthorPlainText = plainText;
d->customAuthorRichText = richText;
@@ -504,8 +504,8 @@ KAboutData::setCustomAuthorText(const QString &plainText, const QString &richTex
void
KAboutData::unsetCustomAuthorText()
{
- d->customAuthorPlainText = QString::null;
- d->customAuthorRichText = QString::null;
+ d->customAuthorPlainText = TQString::null;
+ d->customAuthorRichText = TQString::null;
d->customAuthorTextEnabled = false;
}
diff --git a/kdecore/kaboutdata.h b/kdecore/kaboutdata.h
index 4a5c863fa..3165c89d9 100644
--- a/kdecore/kaboutdata.h
+++ b/kdecore/kaboutdata.h
@@ -19,9 +19,9 @@
*
*/
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qimage.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqimage.h>
#include <klocale.h>
#ifndef _KABOUTDATA_H_
@@ -83,31 +83,31 @@ public:
/**
* The person's name
- * @return the person's name (can be QString::null, if it has been
+ * @return the person's name (can be TQString::null, if it has been
* constructed with a null name)
*/
- QString name() const;
+ TQString name() const;
/**
* The person's task
- * @return the person's task (can be QString::null, if it has been
+ * @return the person's task (can be TQString::null, if it has been
* constructed with a null task)
*/
- QString task() const;
+ TQString task() const;
/**
* The person's email address
- * @return the person's email address (can be QString::null, if it has been
+ * @return the person's email address (can be TQString::null, if it has been
* constructed with a null email)
*/
- QString emailAddress() const;
+ TQString emailAddress() const;
/**
* The home page or a relevant link
- * @return the persons home page (can be QString::null, if it has been
+ * @return the persons home page (can be TQString::null, if it has been
* constructed with a null home page)
*/
- QString webAddress() const;
+ TQString webAddress() const;
private:
const char *mName;
@@ -141,26 +141,26 @@ public:
*
* @param emailAddress The email address of the person.
*/
- KAboutTranslator(const QString & name=QString::null,
- const QString & emailAddress=QString::null);
+ KAboutTranslator(const TQString & name=TQString::null,
+ const TQString & emailAddress=TQString::null);
/**
* The translator's name
- * @return the translators's name (can be QString::null, if it has been
+ * @return the translators's name (can be TQString::null, if it has been
* constructed with a null name)
*/
- QString name() const;
+ TQString name() const;
/**
* The translator's email
- * @return the translator's email address (can be QString::null, if it has been
+ * @return the translator's email address (can be TQString::null, if it has been
* constructed with a null email)
*/
- QString emailAddress() const;
+ TQString emailAddress() const;
private:
- QString mName;
- QString mEmail;
+ TQString mName;
+ TQString mEmail;
KAboutTranslatorPrivate* d;
};
@@ -344,7 +344,7 @@ class KDECORE_EXPORT KAboutData
*
* @param file File containing the license text.
*/
- void setLicenseTextFile( const QString &file );
+ void setLicenseTextFile( const TQString &file );
/**
* Defines the program name used internally.
@@ -372,7 +372,7 @@ class KDECORE_EXPORT KAboutData
* @see programLogo()
* @since 3.4
*/
- void setProgramLogo(const QImage& image);
+ void setProgramLogo(const TQImage& image);
/**
* Defines the program version string.
@@ -462,7 +462,7 @@ class KDECORE_EXPORT KAboutData
* Returns the translated program name.
* @return the program name (translated).
*/
- QString programName() const;
+ TQString programName() const;
/**
* @internal
@@ -479,13 +479,13 @@ class KDECORE_EXPORT KAboutData
* no custom application logo defined.
* @since 3.4
*/
- QImage programLogo() const;
+ TQImage programLogo() const;
/**
* Returns the program's version.
* @return the version string.
*/
- QString version() const;
+ TQString version() const;
/**
* @internal
@@ -495,22 +495,22 @@ class KDECORE_EXPORT KAboutData
/**
* Returns a short, translated description.
* @return the short description (translated). Can be
- * QString::null if not set.
+ * TQString::null if not set.
*/
- QString shortDescription() const;
+ TQString shortDescription() const;
/**
* Returns the application homepage.
- * @return the application homepage URL. Can be QString::null if
+ * @return the application homepage URL. Can be TQString::null if
* not set.
*/
- QString homepage() const;
+ TQString homepage() const;
/**
* Returns the email address for bugs.
* @return the email address where to report bugs.
*/
- QString bugAddress() const;
+ TQString bugAddress() const;
/**
* @internal
@@ -521,31 +521,31 @@ class KDECORE_EXPORT KAboutData
* Returns a list of authors.
* @return author information (list of persons).
*/
- const QValueList<KAboutPerson> authors() const;
+ const TQValueList<KAboutPerson> authors() const;
/**
* Returns a list of persons who contributed.
* @return credit information (list of persons).
*/
- const QValueList<KAboutPerson> credits() const;
+ const TQValueList<KAboutPerson> credits() const;
/**
* Returns a list of translators.
* @return translators information (list of persons)
*/
- const QValueList<KAboutTranslator> translators() const;
+ const TQValueList<KAboutTranslator> translators() const;
/**
* Returns a message about the translation team.
* @return a message about the translation team
*/
- static QString aboutTranslationTeam();
+ static TQString aboutTranslationTeam();
/**
* Returns a translated, free form text.
- * @return the free form text (translated). Can be QString::null if not set.
+ * @return the free form text (translated). Can be TQString::null if not set.
*/
- QString otherText() const;
+ TQString otherText() const;
/**
* Returns the license. If the licenseType argument of the constructor has been
@@ -554,31 +554,31 @@ class KDECORE_EXPORT KAboutData
*
* @return The license text.
*/
- QString license() const;
+ TQString license() const;
/**
* Returns the copyright statement.
- * @return the copyright statement. Can be QString::null if not set.
+ * @return the copyright statement. Can be TQString::null if not set.
*/
- QString copyrightStatement() const;
+ TQString copyrightStatement() const;
/**
* Returns the plain text displayed around the list of authors instead
* of the default message telling users to send bug reports to bugAddress().
*
* @return the plain text displayed around the list of authors instead
- * of the default message. Can be QString::null.
+ * of the default message. Can be TQString::null.
*/
- QString customAuthorPlainText() const;
+ TQString customAuthorPlainText() const;
/**
* Returns the rich text displayed around the list of authors instead
* of the default message telling users to send bug reports to bugAddress().
*
* @return the rich text displayed around the list of authors instead
- * of the default message. Can be QString::null.
+ * of the default message. Can be TQString::null.
*/
- QString customAuthorRichText() const;
+ TQString customAuthorRichText() const;
/**
* Returns whether custom text should be displayed around the list of
@@ -596,10 +596,10 @@ class KDECORE_EXPORT KAboutData
* @param plainText The plain text.
* @param richText The rich text.
*
- * Both parameters can be QString::null to not display any message at
+ * Both parameters can be TQString::null to not display any message at
* all. Call unsetCustomAuthorText() to revert to the default mesage.
*/
- void setCustomAuthorText(const QString &plainText, const QString &richText);
+ void setCustomAuthorText(const TQString &plainText, const TQString &richText);
/**
* Clears any custom text displayed around the list of authors and falls
@@ -618,8 +618,8 @@ class KDECORE_EXPORT KAboutData
const char *mOtherText;
const char *mHomepageAddress;
const char *mBugEmailAddress;
- QValueList<KAboutPerson> mAuthorList;
- QValueList<KAboutPerson> mCreditList;
+ TQValueList<KAboutPerson> mAuthorList;
+ TQValueList<KAboutPerson> mCreditList;
const char *mLicenseText;
KAboutDataPrivate *d;
diff --git a/kdecore/kaccel.cpp b/kdecore/kaccel.cpp
index fc984021a..5cd2195cb 100644
--- a/kdecore/kaccel.cpp
+++ b/kdecore/kaccel.cpp
@@ -19,12 +19,12 @@
#include "kaccel.h"
-#include <qaccel.h>
-#include <qguardedptr.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqaccel.h>
+#include <tqguardedptr.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqtimer.h>
#include "kaccelbase.h"
#include <kapplication.h>
@@ -107,7 +107,7 @@ KAccelEventHandler* KAccelEventHandler::g_pSelf = 0;
bool KAccelEventHandler::g_bAccelActivated = false;
KAccelEventHandler::KAccelEventHandler()
- : QWidget( 0, "KAccelEventHandler" )
+ : TQWidget( 0, "KAccelEventHandler" )
{
# ifdef Q_WS_X11
if ( kapp )
@@ -116,11 +116,11 @@ KAccelEventHandler::KAccelEventHandler()
}
#ifdef Q_WS_X11
-bool qt_try_modal( QWidget *, XEvent * );
+bool qt_try_modal( TQWidget *, XEvent * );
bool KAccelEventHandler::x11Event( XEvent* pEvent )
{
- if( QWidget::keyboardGrabber() || !kapp->focusWidget() )
+ if( TQWidget::keyboardGrabber() || !kapp->focusWidget() )
return false;
if ( !qt_try_modal(kapp->focusWidget(), pEvent) )
@@ -140,7 +140,7 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent )
if( key.modFlags() & KKey::ALT ) state |= Qt::AltButton;
if( key.modFlags() & KKey::WIN ) state |= Qt::MetaButton;
- QKeyEvent ke( QEvent::AccelOverride, keyCodeQt, 0, state );
+ TQKeyEvent ke( TQEvent::AccelOverride, keyCodeQt, 0, state );
ke.ignore();
g_bAccelActivated = false;
@@ -163,14 +163,14 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent )
// KAccelPrivate
//---------------------------------------------------------------------
-KAccelPrivate::KAccelPrivate( KAccel* pParent, QWidget* pWatch )
+KAccelPrivate::KAccelPrivate( KAccel* pParent, TQWidget* pWatch )
: KAccelBase( KAccelBase::QT_KEYS )
{
//kdDebug(125) << "KAccelPrivate::KAccelPrivate( pParent = " << pParent << " ): this = " << this << endl;
m_pAccel = pParent;
m_pWatch = pWatch;
m_bAutoUpdate = true;
- connect( (QAccel*)m_pAccel, SIGNAL(activated(int)), this, SLOT(slotKeyPressed(int)) );
+ connect( (TQAccel*)m_pAccel, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotKeyPressed(int)) );
#ifdef Q_WS_X11 //only makes sense if KAccelEventHandler is working
if( m_pWatch )
@@ -182,10 +182,10 @@ KAccelPrivate::KAccelPrivate( KAccel* pParent, QWidget* pWatch )
void KAccelPrivate::setEnabled( bool bEnabled )
{
m_bEnabled = bEnabled;
- ((QAccel*)m_pAccel)->setEnabled( bEnabled );
+ ((TQAccel*)m_pAccel)->setEnabled( bEnabled );
}
-bool KAccelPrivate::setEnabled( const QString& sAction, bool bEnable )
+bool KAccelPrivate::setEnabled( const TQString& sAction, bool bEnable )
{
kdDebug(125) << "KAccelPrivate::setEnabled( \"" << sAction << "\", " << bEnable << " ): this = " << this << endl;
KAccelAction* pAction = actionPtr( sAction );
@@ -196,25 +196,25 @@ bool KAccelPrivate::setEnabled( const QString& sAction, bool bEnable )
pAction->setEnabled( bEnable );
- QMap<int, KAccelAction*>::const_iterator it = m_mapIDToAction.begin();
+ TQMap<int, KAccelAction*>::const_iterator it = m_mapIDToAction.begin();
for( ; it != m_mapIDToAction.end(); ++it ) {
if( *it == pAction )
- ((QAccel*)m_pAccel)->setItemEnabled( it.key(), bEnable );
+ ((TQAccel*)m_pAccel)->setItemEnabled( it.key(), bEnable );
}
return true;
}
-bool KAccelPrivate::removeAction( const QString& sAction )
+bool KAccelPrivate::removeAction( const TQString& sAction )
{
// FIXME: getID() doesn't contains any useful
// information! Use mapIDToAction. --ellis, 2/May/2002
- // Or maybe KAccelBase::remove() takes care of QAccel indirectly...
+ // Or maybe KAccelBase::remove() takes care of TQAccel indirectly...
KAccelAction* pAction = actions().actionPtr( sAction );
if( pAction ) {
int nID = pAction->getID();
//bool b = actions().removeAction( sAction );
bool b = KAccelBase::remove( sAction );
- ((QAccel*)m_pAccel)->removeItem( nID );
+ ((TQAccel*)m_pAccel)->removeItem( nID );
return b;
} else
return false;
@@ -232,21 +232,21 @@ bool KAccelPrivate::emitSignal( KAccelBase::Signal signal )
bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key )
{
uint keyQt = key.keyCodeQt();
- int nID = ((QAccel*)m_pAccel)->insertItem( keyQt );
+ int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt );
m_mapIDToAction[nID] = &action;
m_mapIDToKey[nID] = keyQt;
if( action.objSlotPtr() && action.methodSlotPtr() ) {
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
- ((QAccel*)m_pAccel)->connectItem( nID, action.objSlotPtr(), action.methodSlotPtr() );
+ ((TQAccel*)m_pAccel)->connectItem( nID, action.objSlotPtr(), action.methodSlotPtr() );
#else
- ((QAccel*)m_pAccel)->connectItem( nID, this, SLOT(slotKeyPressed(int)));
+ ((TQAccel*)m_pAccel)->connectItem( nID, this, TQT_SLOT(slotKeyPressed(int)));
#endif
if( !action.isEnabled() )
- ((QAccel*)m_pAccel)->setItemEnabled( nID, false );
+ ((TQAccel*)m_pAccel)->setItemEnabled( nID, false );
}
- kdDebug(125) << "KAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << QString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
+ kdDebug(125) << "KAccelPrivate::connectKey( \"" << action.name() << "\", " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
//kdDebug(125) << "m_pAccel = " << m_pAccel << endl;
return nID != 0;
}
@@ -254,24 +254,24 @@ bool KAccelPrivate::connectKey( KAccelAction& action, const KKeyServer::Key& key
bool KAccelPrivate::connectKey( const KKeyServer::Key& key )
{
uint keyQt = key.keyCodeQt();
- int nID = ((QAccel*)m_pAccel)->insertItem( keyQt );
+ int nID = ((TQAccel*)m_pAccel)->insertItem( keyQt );
m_mapIDToKey[nID] = keyQt;
- kdDebug(125) << "KAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << QString::number(keyQt,16) << " ): id = " << nID << endl;
+ kdDebug(125) << "KAccelPrivate::connectKey( " << key.key().toStringInternal() << " = 0x" << TQString::number(keyQt,16) << " ): id = " << nID << endl;
return nID != 0;
}
bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key& key )
{
int keyQt = key.keyCodeQt();
- QMap<int, int>::iterator it = m_mapIDToKey.begin();
+ TQMap<int, int>::iterator it = m_mapIDToKey.begin();
for( ; it != m_mapIDToKey.end(); ++it ) {
- //kdDebug(125) << "m_mapIDToKey[" << it.key() << "] = " << QString::number(*it,16) << " == " << QString::number(keyQt,16) << endl;
+ //kdDebug(125) << "m_mapIDToKey[" << it.key() << "] = " << TQString::number(*it,16) << " == " << TQString::number(keyQt,16) << endl;
if( *it == keyQt ) {
int nID = it.key();
- kdDebug(125) << "KAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << QString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
- ((QAccel*)m_pAccel)->removeItem( nID );
+ kdDebug(125) << "KAccelPrivate::disconnectKey( \"" << action.name() << "\", 0x" << TQString::number(keyQt,16) << " ) : id = " << nID << " m_pObjSlot = " << action.objSlotPtr() << endl;
+ ((TQAccel*)m_pAccel)->removeItem( nID );
m_mapIDToAction.remove( nID );
m_mapIDToKey.remove( it );
return true;
@@ -285,11 +285,11 @@ bool KAccelPrivate::disconnectKey( KAccelAction& action, const KKeyServer::Key&
bool KAccelPrivate::disconnectKey( const KKeyServer::Key& key )
{
int keyQt = key.keyCodeQt();
- kdDebug(125) << "KAccelPrivate::disconnectKey( 0x" << QString::number(keyQt,16) << " )" << endl;
- QMap<int, int>::iterator it = m_mapIDToKey.begin();
+ kdDebug(125) << "KAccelPrivate::disconnectKey( 0x" << TQString::number(keyQt,16) << " )" << endl;
+ TQMap<int, int>::iterator it = m_mapIDToKey.begin();
for( ; it != m_mapIDToKey.end(); ++it ) {
if( *it == keyQt ) {
- ((QAccel*)m_pAccel)->removeItem( it.key() );
+ ((TQAccel*)m_pAccel)->removeItem( it.key() );
m_mapIDToKey.remove( it );
return true;
}
@@ -306,7 +306,7 @@ void KAccelPrivate::slotKeyPressed( int id )
if( m_mapIDToKey.contains( id ) ) {
KKey key = m_mapIDToKey[id];
KKeySequence seq( key );
- QPopupMenu* pMenu = createPopupMenu( m_pWatch, seq );
+ TQPopupMenu* pMenu = createPopupMenu( m_pWatch, seq );
// If there was only one action mapped to this key,
// and that action is not a multi-key shortcut,
@@ -318,9 +318,9 @@ void KAccelPrivate::slotKeyPressed( int id )
int iAction = pMenu->idAt(1);
slotMenuActivated( iAction );
} else {
- connect( pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuActivated(int)) );
- pMenu->exec( m_pWatch->mapToGlobal( QPoint( 0, 0 ) ) );
- disconnect( pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuActivated(int)) );
+ connect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuActivated(int)) );
+ pMenu->exec( m_pWatch->mapToGlobal( TQPoint( 0, 0 ) ) );
+ disconnect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuActivated(int)) );
}
delete pMenu;
}
@@ -336,23 +336,23 @@ void KAccelPrivate::slotMenuActivated( int iAction )
KAccelAction* pAction = actions().actionPtr( iAction );
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
if( pAction ) {
- connect( this, SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
+ connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated();
- disconnect( this, SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
+ disconnect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
}
#else
emitActivatedSignal( pAction );
#endif
}
-bool KAccelPrivate::eventFilter( QObject* /*pWatched*/, QEvent* pEvent )
+bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
{
- if( pEvent->type() == QEvent::AccelOverride && m_bEnabled ) {
- QKeyEvent* pKeyEvent = (QKeyEvent*) pEvent;
+ if( pEvent->type() == TQEvent::AccelOverride && m_bEnabled ) {
+ TQKeyEvent* pKeyEvent = (TQKeyEvent*) pEvent;
KKey key( pKeyEvent );
kdDebug(125) << "KAccelPrivate::eventFilter( AccelOverride ): this = " << this << ", key = " << key.toStringInternal() << endl;
int keyCodeQt = key.keyCodeQt();
- QMap<int, int>::iterator it = m_mapIDToKey.begin();
+ TQMap<int, int>::iterator it = m_mapIDToKey.begin();
for( ; it != m_mapIDToKey.end(); ++it ) {
if( (*it) == keyCodeQt ) {
int nID = it.key();
@@ -363,11 +363,11 @@ bool KAccelPrivate::eventFilter( QObject* /*pWatched*/, QEvent* pEvent )
if( !pAction->isEnabled() )
continue;
#ifdef Q_WS_WIN /** @todo TEMP: new implementation (commit #424926) didn't work */
- QGuardedPtr<KAccelPrivate> me = this;
- connect( this, SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
+ TQGuardedPtr<KAccelPrivate> me = this;
+ connect( this, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated();
if (me) {
- disconnect( me, SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
+ disconnect( me, TQT_SIGNAL(menuItemActivated()), pAction->objSlotPtr(), pAction->methodSlotPtr() );
}
#else
emitActivatedSignal( pAction );
@@ -388,21 +388,21 @@ bool KAccelPrivate::eventFilter( QObject* /*pWatched*/, QEvent* pEvent )
void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction )
{
if( pAction ) {
- QGuardedPtr<KAccelPrivate> me = this;
- QRegExp reg( "([ ]*KAccelAction.*)" );
+ TQGuardedPtr<KAccelPrivate> me = this;
+ TQRegExp reg( "([ ]*KAccelAction.*)" );
if( reg.search( pAction->methodSlotPtr()) >= 0 ) {
- connect( this, SIGNAL(menuItemActivated(KAccelAction*)),
+ connect( this, TQT_SIGNAL(menuItemActivated(KAccelAction*)),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated( pAction );
if (me)
- disconnect( me, SIGNAL(menuItemActivated(KAccelAction*)),
+ disconnect( me, TQT_SIGNAL(menuItemActivated(KAccelAction*)),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
} else {
- connect( this, SIGNAL(menuItemActivated()),
+ connect( this, TQT_SIGNAL(menuItemActivated()),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
emit menuItemActivated();
if (me)
- disconnect( me, SIGNAL(menuItemActivated()),
+ disconnect( me, TQT_SIGNAL(menuItemActivated()),
pAction->objSlotPtr(), pAction->methodSlotPtr() );
}
@@ -414,15 +414,15 @@ void KAccelPrivate::emitActivatedSignal( KAccelAction* pAction )
// KAccel
//---------------------------------------------------------------------
-KAccel::KAccel( QWidget* pParent, const char* psName )
-: QAccel( pParent, (psName) ? psName : "KAccel-QAccel" )
+KAccel::KAccel( TQWidget* pParent, const char* psName )
+: TQAccel( pParent, (psName) ? psName : "KAccel-TQAccel" )
{
kdDebug(125) << "KAccel( pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
d = new KAccelPrivate( this, pParent );
}
-KAccel::KAccel( QWidget* watch, QObject* pParent, const char* psName )
-: QAccel( watch, pParent, (psName) ? psName : "KAccel-QAccel" )
+KAccel::KAccel( TQWidget* watch, TQObject* pParent, const char* psName )
+: TQAccel( watch, pParent, (psName) ? psName : "KAccel-TQAccel" )
{
kdDebug(125) << "KAccel( watch = " << watch << ", pParent = " << pParent << ", psName = " << psName << " ): this = " << this << endl;
if( !watch )
@@ -442,9 +442,9 @@ bool KAccel::isEnabled() { return d->isEnabled(); }
void KAccel::setEnabled( bool bEnabled ) { d->setEnabled( bEnabled ); }
bool KAccel::setAutoUpdate( bool bAuto ) { return d->setAutoUpdate( bAuto ); }
-KAccelAction* KAccel::insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
return d->insert( sAction, sLabel, sWhatsThis,
@@ -453,9 +453,9 @@ KAccelAction* KAccel::insert( const QString& sAction, const QString& sLabel, con
bConfigurable, bEnabled );
}
-KAccelAction* KAccel::insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+KAccelAction* KAccel::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
return d->insert( sAction, sLabel, sWhatsThis,
@@ -465,20 +465,20 @@ KAccelAction* KAccel::insert( const QString& sAction, const QString& sLabel, con
}
KAccelAction* KAccel::insert( const char* psAction, const KShortcut& cutDef,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
- return d->insert( psAction, i18n(psAction), QString::null,
+ return d->insert( psAction, i18n(psAction), TQString::null,
cutDef, cutDef,
pObjSlot, psMethodSlot,
bConfigurable, bEnabled );
}
KAccelAction* KAccel::insert( KStdAccel::StdAccel id,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
- QString sAction = KStdAccel::name( id );
+ TQString sAction = KStdAccel::name( id );
if( sAction.isEmpty() )
return 0;
@@ -492,24 +492,24 @@ KAccelAction* KAccel::insert( KStdAccel::StdAccel id,
return pAction;
}
-bool KAccel::remove( const QString& sAction )
+bool KAccel::remove( const TQString& sAction )
{ return d->removeAction( sAction ); }
bool KAccel::updateConnections()
{ return d->updateConnections(); }
-const KShortcut& KAccel::shortcut( const QString& sAction ) const
+const KShortcut& KAccel::shortcut( const TQString& sAction ) const
{
const KAccelAction* pAction = actions().actionPtr( sAction );
return (pAction) ? pAction->shortcut() : KShortcut::null();
}
-bool KAccel::setSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot )
+bool KAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
{ return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); }
-bool KAccel::setEnabled( const QString& sAction, bool bEnable )
+bool KAccel::setEnabled( const TQString& sAction, bool bEnable )
{ return d->setEnabled( sAction, bEnable ); }
-bool KAccel::setShortcut( const QString& sAction, const KShortcut& cut )
+bool KAccel::setShortcut( const TQString& sAction, const KShortcut& cut )
{
kdDebug(125) << "KAccel::setShortcut( \"" << sAction << "\", " << cut.toStringInternal() << " )" << endl;
KAccelAction* pAction = actions().actionPtr( sAction );
@@ -521,10 +521,10 @@ bool KAccel::setShortcut( const QString& sAction, const KShortcut& cut )
return false;
}
-const QString& KAccel::configGroup() const
+const TQString& KAccel::configGroup() const
{ return d->configGroup(); }
// for kdegames/ksirtet
-void KAccel::setConfigGroup( const QString& s )
+void KAccel::setConfigGroup( const TQString& s )
{ d->setConfigGroup( s ); }
bool KAccel::readSettings( KConfigBase* pConfig )
@@ -547,25 +547,25 @@ void KAccel::emitKeycodeChanged()
// Obsolete methods -- for backward compatibility
//------------------------------------------------------------
-bool KAccel::insertItem( const QString& sLabel, const QString& sAction,
+bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
const char* cutsDef,
- int /*nIDMenu*/, QPopupMenu *, bool bConfigurable )
+ int /*nIDMenu*/, TQPopupMenu *, bool bConfigurable )
{
KShortcut cut( cutsDef );
- bool b = d->insert( sAction, sLabel, QString::null,
+ bool b = d->insert( sAction, sLabel, TQString::null,
cut, cut,
0, 0,
bConfigurable ) != 0;
return b;
}
-bool KAccel::insertItem( const QString& sLabel, const QString& sAction,
+bool KAccel::insertItem( const TQString& sLabel, const TQString& sAction,
int key,
- int /*nIDMenu*/, QPopupMenu*, bool bConfigurable )
+ int /*nIDMenu*/, TQPopupMenu*, bool bConfigurable )
{
KShortcut cut;
- cut.init( QKeySequence(key) );
- KAccelAction* pAction = d->insert( sAction, sLabel, QString::null,
+ cut.init( TQKeySequence(key) );
+ KAccelAction* pAction = d->insert( sAction, sLabel, TQString::null,
cut, cut,
0, 0,
bConfigurable );
@@ -573,9 +573,9 @@ bool KAccel::insertItem( const QString& sLabel, const QString& sAction,
}
// Used in kdeutils/kjots
-bool KAccel::insertStdItem( KStdAccel::StdAccel id, const QString& sLabel )
+bool KAccel::insertStdItem( KStdAccel::StdAccel id, const TQString& sLabel )
{
- KAccelAction* pAction = d->insert( KStdAccel::name( id ), sLabel, QString::null,
+ KAccelAction* pAction = d->insert( KStdAccel::name( id ), sLabel, TQString::null,
KStdAccel::shortcutDefault3( id ), KStdAccel::shortcutDefault4( id ),
0, 0 );
if( pAction )
@@ -584,7 +584,7 @@ bool KAccel::insertStdItem( KStdAccel::StdAccel id, const QString& sLabel )
return true;
}
-bool KAccel::connectItem( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot, bool bActivate )
+bool KAccel::connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate )
{
kdDebug(125) << "KAccel::connectItem( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )" << endl;
if( bActivate == false )
@@ -595,22 +595,22 @@ bool KAccel::connectItem( const QString& sAction, const QObject* pObjSlot, const
return b;
}
-bool KAccel::removeItem( const QString& sAction )
+bool KAccel::removeItem( const TQString& sAction )
{ return d->removeAction( sAction ); }
-bool KAccel::setItemEnabled( const QString& sAction, bool bEnable )
+bool KAccel::setItemEnabled( const TQString& sAction, bool bEnable )
{ return setEnabled( sAction, bEnable ); }
-void KAccel::changeMenuAccel( QPopupMenu *menu, int id, const QString& action )
+void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action )
{
KAccelAction* pAction = actions().actionPtr( action );
- QString s = menu->text( id );
+ TQString s = menu->text( id );
if( !pAction || s.isEmpty() )
return;
int i = s.find( '\t' );
- QString k = pAction->shortcut().seq(0).toString();
+ TQString k = pAction->shortcut().seq(0).toString();
if( k.isEmpty() )
return;
@@ -621,24 +621,24 @@ void KAccel::changeMenuAccel( QPopupMenu *menu, int id, const QString& action )
s += k;
}
- QPixmap *pp = menu->pixmap(id);
+ TQPixmap *pp = menu->pixmap(id);
if( pp && !pp->isNull() )
menu->changeItem( *pp, s, id );
else
menu->changeItem( s, id );
}
-void KAccel::changeMenuAccel( QPopupMenu *menu, int id, KStdAccel::StdAccel accel )
+void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel )
{
changeMenuAccel( menu, id, KStdAccel::name( accel ) );
}
-int KAccel::stringToKey( const QString& sKey )
+int KAccel::stringToKey( const TQString& sKey )
{
return KKey( sKey ).keyCodeQt();
}
-int KAccel::currentKey( const QString& sAction ) const
+int KAccel::currentKey( const TQString& sAction ) const
{
KAccelAction* pAction = d->actionPtr( sAction );
if( pAction )
@@ -646,13 +646,13 @@ int KAccel::currentKey( const QString& sAction ) const
return 0;
}
-QString KAccel::findKey( int key ) const
+TQString KAccel::findKey( int key ) const
{
KAccelAction* pAction = d->actionPtr( KKey(key) );
if( pAction )
return pAction->name();
else
- return QString::null;
+ return TQString::null;
}
#endif // !KDE_NO_COMPAT
diff --git a/kdecore/kaccel.h b/kdecore/kaccel.h
index 84c938ea4..c72730b6b 100644
--- a/kdecore/kaccel.h
+++ b/kdecore/kaccel.h
@@ -20,7 +20,7 @@
#ifndef _KACCEL_H
#define _KACCEL_H
-#include <qaccel.h>
+#include <tqaccel.h>
#include <kshortcut.h>
#include <kstdaccel.h>
#include "kdelibs_export.h"
@@ -42,7 +42,7 @@ class KAccelPrivate;
* A KAccel contains a list of accelerator actions.
*
* For example, CTRL+Key_P could be a shortcut for printing a document. The key
- * codes are listed in qnamespace.h. "Print" could be the action name for printing.
+ * codes are listed in tqnamespace.h. "Print" could be the action name for printing.
* The action name identifies the shortcut in configuration files and the
* KKeyChooser GUI.
*
@@ -74,9 +74,9 @@ class KAccelPrivate;
* // Insert an action "Scroll Up" which is associated with the "Up" key:
* pAccel->insert( "Scroll Up", i18n("Scroll up"),
* i18n("Scroll up the current document by one line."),
- * Qt::Key_Up, this, SLOT(slotScrollUp()) );
+ * Qt::Key_Up, this, TQT_SLOT(slotScrollUp()) );
* // Insert an standard acclerator action.
- * pAccel->insert( KStdAccel::Print, this, SLOT(slotPrint()) );
+ * pAccel->insert( KStdAccel::Print, this, TQT_SLOT(slotPrint()) );
*
* // Update the shortcuts by read any user-defined settings from the
* // application's config file.
@@ -101,7 +101,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param pParent the parent and widget to watch for key strokes
* @param psName the name of the QObject
*/
- KAccel( QWidget* pParent, const char* psName = 0 );
+ KAccel( TQWidget* pParent, const char* psName = 0 );
/**
* Creates a new KAccel that watches @p watch.
@@ -110,7 +110,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param parent the parent of the QObject
* @param psName the name of the QObject
*/
- KAccel( QWidget* watch, QObject* parent, const char* psName = 0 );
+ KAccel( TQWidget* watch, TQObject* parent, const char* psName = 0 );
virtual ~KAccel();
/**
@@ -129,7 +129,7 @@ class KDECORE_EXPORT KAccel : public QAccel
/**
* Checks whether the KAccel is active.
- * @return true if the QAccel is enabled
+ * @return true if the TQAccel is enabled
*/
bool isEnabled();
@@ -159,7 +159,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* insert( "Do Something", i18n("Do Something"),
* i18n("This action allows you to do something really great with this program to "
* "the currently open document."),
- * ALT+Key_D, this, SLOT(slotDoSomething()) );
+ * ALT+Key_D, this, TQT_SLOT(slotDoSomething()) );
*\endcode
*
* @param sAction The internal name of the action.
@@ -172,17 +172,17 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param bConfigurable Allow the user to change this shortcut if set to 'true'.
* @param bEnabled The action will be activated by the shortcut if set to 'true'.
*/
- KAccelAction* insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
* Same as first insert(), but with separate shortcuts defined for
* 3- and 4- modifier defaults.
*/
- KAccelAction* insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
* This is an overloaded function provided for convenience.
@@ -191,7 +191,7 @@ class KDECORE_EXPORT KAccel : public QAccel
*
* Usage:
* \code
- * insert( i18n("Do Something"), ALT+Key_D, this, SLOT(slotDoSomething()) );
+ * insert( i18n("Do Something"), ALT+Key_D, this, TQT_SLOT(slotDoSomething()) );
* \endcode
*
* @param psAction The name AND label of the action.
@@ -202,7 +202,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param bEnabled The action will be activated by the shortcut if set to 'true'.
*/
KAccelAction* insert( const char* psAction, const KShortcut& cutDef,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
* Similar to the first insert() method, but with the action
@@ -211,7 +211,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @see KStdAccel.
*/
KAccelAction* insert( KStdAccel::StdAccel id,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
@@ -220,7 +220,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param sAction the name of the action to remove
* @return true if successful, false otherwise
*/
- bool remove( const QString& sAction );
+ bool remove( const TQString& sAction );
/**
* Updates the connections of the accelerations after changing them.
@@ -237,7 +237,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param sAction the name of the action
* @return the action's shortcut, or a null shortcut if not found
*/
- const KShortcut& shortcut( const QString& sAction ) const;
+ const KShortcut& shortcut( const TQString& sAction ) const;
/**
* Set the shortcut to be associated with the action named by @p sAction.
@@ -245,7 +245,7 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param shortcut the shortcut to set
* @return true if successful, false otherwise
*/
- bool setShortcut( const QString& sAction, const KShortcut &shortcut );
+ bool setShortcut( const TQString& sAction, const KShortcut &shortcut );
/**
* Set the slot to be called when the shortcut of the action named
@@ -255,28 +255,28 @@ class KDECORE_EXPORT KAccel : public QAccel
* @param psMethodSlot the name of the slot
* @return true if successful, false otherwise
*/
- bool setSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot );
+ bool setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
/**
* Enable or disable the action named by @p sAction.
* @param sAction the action to en-/disable
* @param bEnabled true to enable, false to disable
* @return true if successful, false otherwise
*/
- bool setEnabled( const QString& sAction, bool bEnabled );
+ bool setEnabled( const TQString& sAction, bool bEnabled );
/**
* Returns the configuration group of the settings.
* @return the configuration group
* @see KConfig
*/
- const QString& configGroup() const;
+ const TQString& configGroup() const;
/**
* Returns the configuration group of the settings.
* @param name the new configuration group
* @see KConfig
*/
- void setConfigGroup( const QString &name );
+ void setConfigGroup( const TQString &name );
/**
* Read all shortcuts from @p pConfig, or (if @p pConfig
@@ -317,49 +317,49 @@ class KDECORE_EXPORT KAccel : public QAccel
/**
* @deprecated use insert
*/
- bool insertItem( const QString& sLabel, const QString& sAction,
+ bool insertItem( const TQString& sLabel, const TQString& sAction,
const char* psKey,
- int nIDMenu = 0, QPopupMenu* pMenu = 0, bool bConfigurable = true ) KDE_DEPRECATED;
+ int nIDMenu = 0, TQPopupMenu* pMenu = 0, bool bConfigurable = true ) KDE_DEPRECATED;
/**
* @deprecated use insert
*/
- bool insertItem( const QString& sLabel, const QString& sAction,
+ bool insertItem( const TQString& sLabel, const TQString& sAction,
int key,
- int nIDMenu = 0, QPopupMenu* pMenu = 0, bool bConfigurable = true ) KDE_DEPRECATED;
+ int nIDMenu = 0, TQPopupMenu* pMenu = 0, bool bConfigurable = true ) KDE_DEPRECATED;
/**
* @deprecated use insert
*/
- bool insertStdItem( KStdAccel::StdAccel id, const QString& descr = QString::null ) KDE_DEPRECATED;
+ bool insertStdItem( KStdAccel::StdAccel id, const TQString& descr = TQString::null ) KDE_DEPRECATED;
/**
* @deprecated use insert
*/
- bool connectItem( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot, bool bActivate = true ) KDE_DEPRECATED;
+ bool connectItem( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot, bool bActivate = true ) KDE_DEPRECATED;
/**
* @deprecated use insert( accel, pObjSlot, psMethodSlot );
*
*/
- KDE_DEPRECATED bool connectItem( KStdAccel::StdAccel accel, const QObject* pObjSlot, const char* psMethodSlot )
+ KDE_DEPRECATED bool connectItem( KStdAccel::StdAccel accel, const TQObject* pObjSlot, const char* psMethodSlot )
{ return insert( accel, pObjSlot, psMethodSlot ); }
/**
* @deprecated use remove
*/
- bool removeItem( const QString& sAction ) KDE_DEPRECATED;
+ bool removeItem( const TQString& sAction ) KDE_DEPRECATED;
/**
* @deprecated
*/
- bool setItemEnabled( const QString& sAction, bool bEnable ) KDE_DEPRECATED;
+ bool setItemEnabled( const TQString& sAction, bool bEnable ) KDE_DEPRECATED;
/**
* @deprecated see KDE3PORTING.html
*/
- void changeMenuAccel( QPopupMenu *menu, int id, const QString& action ) KDE_DEPRECATED;
+ void changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action ) KDE_DEPRECATED;
/**
* @deprecated see KDE3PORTING.html
*/
- void changeMenuAccel( QPopupMenu *menu, int id, KStdAccel::StdAccel accel ) KDE_DEPRECATED;
+ void changeMenuAccel( TQPopupMenu *menu, int id, KStdAccel::StdAccel accel ) KDE_DEPRECATED;
/**
* @deprecated
*/
- static int stringToKey( const QString& ) KDE_DEPRECATED;
+ static int stringToKey( const TQString& ) KDE_DEPRECATED;
/**
* @deprecated Use shortcut().
@@ -368,15 +368,15 @@ class KDECORE_EXPORT KAccel : public QAccel
* @p action, or zero if either the action name cannot be
* found or the current key is set to no key.
*/
- int currentKey( const QString& action ) const KDE_DEPRECATED;
+ int currentKey( const TQString& action ) const KDE_DEPRECATED;
/**
* @deprecated Use actions().actionPtr().
*
* Return the name of the accelerator item with the keycode @p key,
- * or QString::null if the item cannot be found.
+ * or TQString::null if the item cannot be found.
*/
- QString findKey( int key ) const KDE_DEPRECATED;
+ TQString findKey( int key ) const KDE_DEPRECATED;
#endif // !KDE_NO_COMPAT
protected:
diff --git a/kdecore/kaccelaction.cpp b/kdecore/kaccelaction.cpp
index de805d2fc..856bbefdc 100644
--- a/kdecore/kaccelaction.cpp
+++ b/kdecore/kaccelaction.cpp
@@ -23,7 +23,7 @@
#include "kaccelaction.h"
#include "kaccelbase.h" // for KAccelBase::slotRemoveAction() & emitSignal()
-#include <qkeycode.h>
+#include <tqkeycode.h>
#include <kconfig.h>
#include "kckey.h"
@@ -62,9 +62,9 @@ KAccelAction::KAccelAction( const KAccelAction& action )
*this = action;
}
-KAccelAction::KAccelAction( const QString& sName, const QString& sLabel, const QString& sWhatsThis,
+KAccelAction::KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
//kdDebug(125) << "KAccelAction( \"" << sName << "\" ): this = " << this << endl;
@@ -92,9 +92,9 @@ void KAccelAction::clear()
d->m_nConnections = 0;
}
-bool KAccelAction::init( const QString& sName, const QString& sLabel, const QString& sWhatsThis,
+bool KAccelAction::init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
m_sName = sName;
@@ -132,11 +132,11 @@ KAccelAction& KAccelAction::operator =( const KAccelAction& action )
return *this;
}
-void KAccelAction::setName( const QString& s )
+void KAccelAction::setName( const TQString& s )
{ m_sName = s; }
-void KAccelAction::setLabel( const QString& s )
+void KAccelAction::setLabel( const TQString& s )
{ m_sLabel = s; }
-void KAccelAction::setWhatsThis( const QString& s )
+void KAccelAction::setWhatsThis( const TQString& s )
{ m_sWhatsThis = s; }
bool KAccelAction::setShortcut( const KShortcut& cut )
@@ -145,7 +145,7 @@ bool KAccelAction::setShortcut( const KShortcut& cut )
return true;
}
-void KAccelAction::setSlot( const QObject* pObjSlot, const char* psMethodSlot )
+void KAccelAction::setSlot( const TQObject* pObjSlot, const char* psMethodSlot )
{
m_pObjSlot = pObjSlot;
m_psMethodSlot = psMethodSlot;
@@ -156,10 +156,10 @@ void KAccelAction::setConfigurable( bool b )
void KAccelAction::setEnabled( bool b )
{ m_bEnabled = b; }
-QString KAccelAction::toString() const
+TQString KAccelAction::toString() const
{ return m_cut.toString(); }
-QString KAccelAction::toStringInternal() const
+TQString KAccelAction::toStringInternal() const
{ return m_cut.toStringInternal( &shortcutDefault() ); }
bool KAccelAction::setKeySequence( uint i, const KKeySequence& seq )
@@ -294,15 +294,15 @@ bool KAccelActions::init( const KAccelActions& actions )
return true;
}
-bool KAccelActions::init( KConfigBase& config, const QString& sGroup )
+bool KAccelActions::init( KConfigBase& config, const TQString& sGroup )
{
kdDebug(125) << "KAccelActions::init( " << sGroup << " )" << endl;
- QMap<QString, QString> mapEntry = config.entryMap( sGroup );
+ TQMap<TQString, TQString> mapEntry = config.entryMap( sGroup );
resize( mapEntry.count() );
- QMap<QString, QString>::Iterator it( mapEntry.begin() );
+ TQMap<TQString, TQString>::Iterator it( mapEntry.begin() );
for( uint i = 0; it != mapEntry.end(); ++it, i++ ) {
- QString sShortcuts = *it;
+ TQString sShortcuts = *it;
KShortcut cuts;
kdDebug(125) << it.key() << " = " << sShortcuts << endl;
@@ -356,7 +356,7 @@ void KAccelActions::updateShortcuts( KAccelActions& actions2 )
if( pAction && pAction->m_bConfigurable ) {
KAccelAction* pAction2 = actions2.actionPtr( pAction->m_sName );
if( pAction2 ) {
- QString sOld = pAction->m_cut.toStringInternal();
+ TQString sOld = pAction->m_cut.toStringInternal();
pAction->m_cut = pAction2->m_cut;
kdDebug(125) << "\t" << pAction->m_sName
<< " found: " << sOld
@@ -371,7 +371,7 @@ void KAccelActions::updateShortcuts( KAccelActions& actions2 )
emitKeycodeChanged();
}
-int KAccelActions::actionIndex( const QString& sAction ) const
+int KAccelActions::actionIndex( const TQString& sAction ) const
{
for( uint i = 0; i < m_nSize; i++ ) {
if( m_prgActions[i] == 0 )
@@ -392,13 +392,13 @@ const KAccelAction* KAccelActions::actionPtr( uint i ) const
return m_prgActions[i];
}
-KAccelAction* KAccelActions::actionPtr( const QString& sAction )
+KAccelAction* KAccelActions::actionPtr( const TQString& sAction )
{
int i = actionIndex( sAction );
return (i >= 0) ? m_prgActions[i] : 0;
}
-const KAccelAction* KAccelActions::actionPtr( const QString& sAction ) const
+const KAccelAction* KAccelActions::actionPtr( const TQString& sAction ) const
{
int i = actionIndex( sAction );
return (i >= 0) ? m_prgActions[i] : 0;
@@ -425,7 +425,7 @@ const KAccelAction& KAccelActions::operator []( uint i ) const
return *actionPtr( i );
}
-KAccelAction* KAccelActions::insert( const QString& sName, const QString& sLabel )
+KAccelAction* KAccelActions::insert( const TQString& sName, const TQString& sLabel )
{
if( actionPtr( sName ) ) {
kdWarning(125) << "KAccelActions::insertLabel( " << sName << ", " << sLabel << " ): action with same name already present." << endl;
@@ -442,9 +442,9 @@ KAccelAction* KAccelActions::insert( const QString& sName, const QString& sLabel
return pAction;
}
-KAccelAction* KAccelActions::insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+KAccelAction* KAccelActions::insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
//kdDebug(125) << "KAccelActions::insert()2 begin" << endl;
@@ -464,7 +464,7 @@ KAccelAction* KAccelActions::insert( const QString& sAction, const QString& sLab
return pAction;
}
-bool KAccelActions::remove( const QString& sAction )
+bool KAccelActions::remove( const TQString& sAction )
{
kdDebug(125) << "KAccelActions::remove( \"" << sAction << "\" ): this = " << this << " m_pKAccelBase = " << m_pKAccelBase << endl;
@@ -483,7 +483,7 @@ bool KAccelActions::remove( const QString& sAction )
return true;
}
-bool KAccelActions::readActions( const QString& sConfigGroup, KConfigBase* pConfig )
+bool KAccelActions::readActions( const TQString& sConfigGroup, KConfigBase* pConfig )
{
KAccelShortcutList accelList(*this, false);
return accelList.readSettings( sConfigGroup, pConfig );
@@ -502,7 +502,7 @@ bool KAccelActions::readActions( const QString& sConfigGroup, KConfigBase* pConf
1) KKeySequence = Alt+F2
-> "Something=Meta+X,Asterisk;Alt+F2"
*/
-bool KAccelActions::writeActions( const QString &sGroup, KConfigBase* pConfig,
+bool KAccelActions::writeActions( const TQString &sGroup, KConfigBase* pConfig,
bool bWriteAll, bool bGlobal ) const
{
kdDebug(125) << "KAccelActions::writeActions( " << sGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl;
@@ -517,7 +517,7 @@ bool KAccelActions::writeActions( const QString &sGroup, KConfigBase* pConfig,
}
const KAccelAction& action = *m_prgActions[i];
- QString s;
+ TQString s;
bool bConfigHasAction = !pConfig->readEntry( action.m_sName ).isEmpty();
bool bSameAsDefault = true;
bool bWriteAction = false;
diff --git a/kdecore/kaccelaction.h b/kdecore/kaccelaction.h
index 4164ca518..606bd3ccb 100644
--- a/kdecore/kaccelaction.h
+++ b/kdecore/kaccelaction.h
@@ -20,10 +20,10 @@
#ifndef _KACCELACTION_H
#define _KACCELACTION_H
-#include <qmap.h>
-#include <qptrvector.h>
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include <kshortcut.h>
@@ -97,9 +97,9 @@ class KDECORE_EXPORT KAccelAction
* @param bConfigurable if true the user can configure the shortcut
* @param bEnabled true if the accelerator should be enabled
*/
- KAccelAction( const QString& sName, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled );
~KAccelAction();
@@ -123,9 +123,9 @@ class KDECORE_EXPORT KAccelAction
* @param bEnabled true if the accelerator should be enabled
* @return true if successful, false otherwise
*/
- bool init( const QString& sName, const QString& sLabel, const QString& sWhatsThis,
+ bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled );
/**
@@ -138,21 +138,21 @@ class KDECORE_EXPORT KAccelAction
* @return the name of the accelerator action, can be null if not
* set
*/
- const QString& name() const { return m_sName; }
+ const TQString& name() const { return m_sName; }
/**
* Returns the label of the accelerator action.
* @return the label of the accelerator action, can be null if
* not set
*/
- const QString& label() const { return m_sLabel; }
+ const TQString& label() const { return m_sLabel; }
/**
* Returns the What's This text of the accelerator action.
* @return the What's This text of the accelerator action, can be
* null if not set
*/
- const QString& whatsThis() const { return m_sWhatsThis; }
+ const TQString& whatsThis() const { return m_sWhatsThis; }
/**
* The shortcut that is actually used (may be used configured).
@@ -194,7 +194,7 @@ class KDECORE_EXPORT KAccelAction
* Returns the receiver of signals.
* @return the receiver of signals (can be 0 if not set)
*/
- const QObject* objSlotPtr() const { return m_pObjSlot; }
+ const TQObject* objSlotPtr() const { return m_pObjSlot; }
/**
* Returns the slot for the signal.
@@ -218,19 +218,19 @@ class KDECORE_EXPORT KAccelAction
* Sets the name of the accelerator action.
* @param name the new name
*/
- void setName( const QString& name );
+ void setName( const TQString& name );
/**
* Sets the user-readable label of the accelerator action.
* @param label the new label (i18n!)
*/
- void setLabel( const QString& label );
+ void setLabel( const TQString& label );
/**
* Sets the What's This text for the accelerator action.
* @param whatsThis the new What's This text (i18n!)
*/
- void setWhatsThis( const QString& whatsThis );
+ void setWhatsThis( const TQString& whatsThis );
/**
* Sets the new shortcut of the accelerator action.
@@ -244,7 +244,7 @@ class KDECORE_EXPORT KAccelAction
* @param pObjSlot the receiver object of the signal
* @param psMethodSlot the slot for the signal
*/
- void setSlot( const QObject* pObjSlot, const char* psMethodSlot );
+ void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
/**
* Enables or disabled configuring the action.
@@ -308,12 +308,12 @@ class KDECORE_EXPORT KAccelAction
* @return the string representation of the action's shortcut.
* @see KShortcut::toString()
*/
- QString toString() const;
+ TQString toString() const;
/**
* @internal
*/
- QString toStringInternal() const;
+ TQString toStringInternal() const;
/**
* Returns true if four modifier keys will be used.
@@ -329,13 +329,13 @@ class KDECORE_EXPORT KAccelAction
static void useFourModifierKeys( bool use );
protected:
- QString m_sName /**< Name of accel. @sa setName() */,
+ TQString m_sName /**< Name of accel. @sa setName() */,
m_sLabel /**< Label of accel. User-visible. */,
m_sWhatsThis /**< WhatsThis help for accel. User-visible. */;
KShortcut m_cut /**< Shortcut actually assigned. */;
KShortcut m_cutDefault3 /**< Default shortcut in 3-modifier layout */,
m_cutDefault4 /**< Default shortcur in 4-modifier layout */;
- const QObject* m_pObjSlot /**< Object we will send signals to. */;
+ const TQObject* m_pObjSlot /**< Object we will send signals to. */;
const char* m_psMethodSlot /**< Slot we send signals to, in m_pObjSlot */;
bool m_bConfigurable /**< Can this accel be configured by the user? */,
m_bEnabled /**< Is this accel enabled? */;
@@ -400,7 +400,7 @@ class KDECORE_EXPORT KAccelActions
* @param sGroup the group in the configuration file
* @return true if successful, false otherwise
*/
- bool init( KConfigBase& config, const QString& sGroup );
+ bool init( KConfigBase& config, const TQString& sGroup );
/**
* Updates the shortcuts of all actions in this object
@@ -415,7 +415,7 @@ class KDECORE_EXPORT KAccelActions
* @param sAction the action to search
* @return the index of the action, or -1 if not found
*/
- int actionIndex( const QString& sAction ) const;
+ int actionIndex( const TQString& sAction ) const;
/**
* Returns the action with the given @p index.
@@ -441,7 +441,7 @@ class KDECORE_EXPORT KAccelActions
* @return the KAccelAction with the given name, or 0
* if not found
*/
- KAccelAction* actionPtr( const QString& sAction );
+ KAccelAction* actionPtr( const TQString& sAction );
/**
* Returns the action with the given name.
@@ -449,7 +449,7 @@ class KDECORE_EXPORT KAccelActions
* @return the KAccelAction with the given name, or 0
* if not found
*/
- const KAccelAction* actionPtr( const QString& sAction ) const;
+ const KAccelAction* actionPtr( const TQString& sAction ) const;
/**
* Returns the action with the given key sequence.
@@ -494,9 +494,9 @@ class KDECORE_EXPORT KAccelActions
* @param bEnabled if true the accelerator should be enabled
* @return the new action
*/
- KAccelAction* insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const QObject* pObjSlot = 0, const char* psMethodSlot = 0,
+ const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
bool bConfigurable = true, bool bEnabled = true );
/**
@@ -505,14 +505,14 @@ class KDECORE_EXPORT KAccelActions
* @param sLabel the label of the accelerator (i18n!)
* @return the new action
*/
- KAccelAction* insert( const QString& sName, const QString& sLabel );
+ KAccelAction* insert( const TQString& sName, const TQString& sLabel );
/**
* Removes the given action.
* @param sAction the name of the action.
* @return true if successful, false otherwise
*/
- bool remove( const QString& sAction );
+ bool remove( const TQString& sAction );
/**
* Loads the actions from the given configuration file.
@@ -521,7 +521,7 @@ class KDECORE_EXPORT KAccelActions
* @param pConfig the configuration file to load from
* @return true if successful, false otherwise
*/
- bool readActions( const QString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
+ bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
/**
* Writes the actions to the given configuration file.
@@ -532,7 +532,7 @@ class KDECORE_EXPORT KAccelActions
* @param bGlobal true to write to the global configuration file
* @return true if successful, false otherwise
*/
- bool writeActions( const QString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
+ bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
bool bWriteAll = false, bool bGlobal = false ) const;
/**
diff --git a/kdecore/kaccelbase.cpp b/kdecore/kaccelbase.cpp
index d8d0c36da..4ba4c9c3b 100644
--- a/kdecore/kaccelbase.cpp
+++ b/kdecore/kaccelbase.cpp
@@ -22,9 +22,9 @@
#include "kaccelbase.h"
-#include <qkeycode.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
+#include <tqkeycode.h>
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
#include <kconfig.h>
#include "kckey.h"
@@ -69,10 +69,10 @@ bool KAccelBase::isEnabled() const { return m_bEnabled; }
// to disable key grabbing even if enabled
bool KAccelBase::isEnabledInternal() const { return isEnabled(); }
-KAccelAction* KAccelBase::actionPtr( const QString& sAction )
+KAccelAction* KAccelBase::actionPtr( const TQString& sAction )
{ return m_rgActions.actionPtr( sAction ); }
-const KAccelAction* KAccelBase::actionPtr( const QString& sAction ) const
+const KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) const
{ return m_rgActions.actionPtr( sAction ); }
KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key )
@@ -90,13 +90,13 @@ KAccelAction* KAccelBase::actionPtr( const KKey& key )
return actionPtr( k2 );
}
-void KAccelBase::setConfigGroup( const QString& sConfigGroup )
+void KAccelBase::setConfigGroup( const TQString& sConfigGroup )
{ m_sConfigGroup = sConfigGroup; }
void KAccelBase::setConfigGlobal( bool global )
{ m_bConfigIsGlobal = global; }
-bool KAccelBase::setActionEnabled( const QString& sAction, bool bEnable )
+bool KAccelBase::setActionEnabled( const TQString& sAction, bool bEnable )
{
KAccelAction* pAction = actionPtr( sAction );
if( pAction ) {
@@ -126,9 +126,9 @@ bool KAccelBase::setAutoUpdate( bool bAuto )
return b;
}
-KAccelAction* KAccelBase::insert( const QString& sAction, const QString& sDesc, const QString& sHelp,
+KAccelAction* KAccelBase::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
//kdDebug(125) << "KAccelBase::insert() begin" << endl;
@@ -145,10 +145,10 @@ KAccelAction* KAccelBase::insert( const QString& sAction, const QString& sDesc,
return pAction;
}
-KAccelAction* KAccelBase::insert( const QString& sName, const QString& sDesc )
+KAccelAction* KAccelBase::insert( const TQString& sName, const TQString& sDesc )
{ return m_rgActions.insert( sName, sDesc ); }
-bool KAccelBase::remove( const QString& sAction )
+bool KAccelBase::remove( const TQString& sAction )
{
return m_rgActions.remove( sAction );
}
@@ -158,7 +158,7 @@ void KAccelBase::slotRemoveAction( KAccelAction* pAction )
removeConnection( pAction );
}
-bool KAccelBase::setActionSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot )
+bool KAccelBase::setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
{
kdDebug(125) << "KAccelBase::setActionSlot( " << sAction << ", " << pObjSlot << ", " << psMethodSlot << " )\n";
KAccelAction* pAction = m_rgActions.actionPtr( sAction );
@@ -318,7 +318,7 @@ bool KAccelBase::updateConnections()
kdDebug(125) << "KAccelBase::updateConnections() this = " << this << endl;
// Retrieve the list of keys to be connected, sorted by priority.
// (key, variation, seq)
- QValueVector<X> rgKeys;
+ TQValueVector<X> rgKeys;
createKeyList( rgKeys );
m_rgActionsNonUnique.clear();
@@ -410,7 +410,7 @@ bool KAccelBase::updateConnections()
#ifndef NDEBUG
for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) {
kdDebug(125) << "Key: " << it.key().key().toStringInternal() << " => '"
- << (((*it).pAction) ? (*it).pAction->name() : QString::null) << "'" << endl;
+ << (((*it).pAction) ? (*it).pAction->name() : TQString::null) << "'" << endl;
}
#endif
#endif //Q_WS_X11
@@ -419,7 +419,7 @@ bool KAccelBase::updateConnections()
#ifdef Q_WS_X11
// Construct a list of keys to be connected, sorted highest priority first.
-void KAccelBase::createKeyList( QValueVector<struct X>& rgKeys )
+void KAccelBase::createKeyList( TQValueVector<struct X>& rgKeys )
{
//kdDebug(125) << "KAccelBase::createKeyList()" << endl;
if( !isEnabledInternal())
@@ -548,7 +548,7 @@ bool KAccelBase::removeConnection( KAccelAction* pAction )
return true;
}
-bool KAccelBase::setShortcut( const QString& sAction, const KShortcut& cut )
+bool KAccelBase::setShortcut( const TQString& sAction, const KShortcut& cut )
{
KAccelAction* pAction = actionPtr( sAction );
if( pAction ) {
@@ -576,7 +576,7 @@ void KAccelBase::writeSettings( KConfigBase* pConfig ) const
m_rgActions.writeActions( m_sConfigGroup, pConfig, m_bConfigIsGlobal, m_bConfigIsGlobal );
}
-QPopupMenu* KAccelBase::createPopupMenu( QWidget* pParent, const KKeySequence& seq )
+TQPopupMenu* KAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& seq )
{
KShortcutMenu* pMenu = new KShortcutMenu( pParent, &actions(), seq );
@@ -604,8 +604,8 @@ QPopupMenu* KAccelBase::createPopupMenu( QWidget* pParent, const KKeySequence& s
pMenu->insertAction( i, seqAction );
- //kdDebug(125) << "sLabel = " << sLabel << ", seq = " << (QString)seqMenu.qt() << ", i = " << i << endl;
- //kdDebug(125) << "pMenu->accel(" << i << ") = " << (QString)pMenu->accel(i) << endl;
+ //kdDebug(125) << "sLabel = " << sLabel << ", seq = " << (TQString)seqMenu.qt() << ", i = " << i << endl;
+ //kdDebug(125) << "pMenu->accel(" << i << ") = " << (TQString)pMenu->accel(i) << endl;
bActionInserted = true;
break;
}
diff --git a/kdecore/kaccelbase.h b/kdecore/kaccelbase.h
index c1fe515e6..3f6797f79 100644
--- a/kdecore/kaccelbase.h
+++ b/kdecore/kaccelbase.h
@@ -20,11 +20,11 @@
#ifndef _KACCELBASE_H
#define _KACCELBASE_H
-#include <qmap.h>
-#include <qptrvector.h>
-#include <qstring.h>
-#include <qvaluevector.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
+#include <tqvaluelist.h>
#include "kaccelaction.h"
#include "kkeyserver.h"
@@ -79,11 +79,11 @@ class QWidget;
* a->insertItem( i18n("Scroll Up"), "Scroll Up", "Up" );
* // Insert an action "Scroll Down" which is not associated with any key:
* a->insertItem( i18n("Scroll Down"), "Scroll Down", 0);
- * a->connectItem( "Scroll up", myWindow, SLOT( scrollUp() ) );
+ * a->connectItem( "Scroll up", myWindow, TQT_SLOT( scrollUp() ) );
* // a->insertStdItem( KStdAccel::Print ); //not necessary, since it
* // is done automatially with the
* // connect below!
- * a->connectItem(KStdAccel::Print, myWindow, SLOT( printDoc() ) );
+ * a->connectItem(KStdAccel::Print, myWindow, TQT_SLOT( printDoc() ) );
*
* a->readSettings();
*\endcode
@@ -93,12 +93,12 @@ class QWidget;
*
* \code
* int id;
- * id = popup->insertItem("&Print",this, SLOT(printDoc()));
+ * id = popup->insertItem("&Print",this, TQT_SLOT(printDoc()));
* a->changeMenuAccel(popup, id, KStdAccel::Print );
* \endcode
*
* If you want a somewhat "exotic" name for your standard print action, like
- * id = popup->insertItem(i18n("Print &Document"),this, SLOT(printDoc()));
+ * id = popup->insertItem(i18n("Print &Document"),this, TQT_SLOT(printDoc()));
* it might be a good idea to insert the standard action before as
* a->insertStdItem( KStdAccel::Print, i18n("Print Document") )
* as well, so that the user can easily find the corresponding function.
@@ -107,7 +107,7 @@ class QWidget;
* in a menu could be done with
*
* \code
- * id = popup->insertItem(i18n"Scroll &up",this, SLOT(scrollUp()));
+ * id = popup->insertItem(i18n"Scroll &up",this, TQT_SLOT(scrollUp()));
* a->changeMenuAccel(popup, id, "Scroll Up" );
* \endcode
*
@@ -141,9 +141,9 @@ class KDECORE_EXPORT KAccelBase
bool isEnabled() const;
/** Returns a pointer to the KAccelAction named @p sAction. */
- KAccelAction* actionPtr( const QString& sAction );
+ KAccelAction* actionPtr( const TQString& sAction );
/** Const version of the above. */
- const KAccelAction* actionPtr( const QString& sAction ) const;
+ const KAccelAction* actionPtr( const TQString& sAction ) const;
/** Returns a pointer to the KAccelAction associated with
* the key @p key. This function takes into account the
* key mapping defined in the constructor.
@@ -160,11 +160,11 @@ class KDECORE_EXPORT KAccelBase
/** Returns the name of the configuration group these
* accelerators are stored in. The default is "Shortcuts".
*/
- const QString& configGroup() const { return m_sConfigGroup; }
+ const TQString& configGroup() const { return m_sConfigGroup; }
/** Set the group (in the configuration file) for storing
* accelerators.
*/
- void setConfigGroup( const QString& group );
+ void setConfigGroup( const TQString& group );
void setConfigGlobal( bool global );
/** Enables or disables the accelerator.
* @param bEnabled determines whether the accelerator should be enabled or
@@ -181,21 +181,21 @@ class KDECORE_EXPORT KAccelBase
// Procedures for manipulating Actions.
//void clearActions();
- KAccelAction* insert( const QString& sName, const QString& sDesc );
+ KAccelAction* insert( const TQString& sName, const TQString& sDesc );
KAccelAction* insert(
- const QString& sAction, const QString& sDesc, const QString& sHelp,
+ const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
- bool remove( const QString& sAction );
- bool setActionSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot );
+ bool remove( const TQString& sAction );
+ bool setActionSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
bool updateConnections();
- bool setShortcut( const QString& sAction, const KShortcut& cut );
+ bool setShortcut( const TQString& sAction, const KShortcut& cut );
// Modify individual Action sub-items
- bool setActionEnabled( const QString& sAction, bool bEnable );
+ bool setActionEnabled( const TQString& sAction, bool bEnable );
/**
* Read all key associations from @p config, or (if @p config
@@ -214,7 +214,7 @@ class KDECORE_EXPORT KAccelBase
*/
void writeSettings( KConfigBase* pConfig = 0 ) const;
- QPopupMenu* createPopupMenu( QWidget* pParent, const KKeySequence& );
+ TQPopupMenu* createPopupMenu( TQWidget* pParent, const KKeySequence& );
// Protected methods
protected:
@@ -225,7 +225,7 @@ class KDECORE_EXPORT KAccelBase
/** Constructs a list of keys to be connected, sorted highest priority first.
* @param rgKeys constructed list of keys
*/
- void createKeyList( QValueVector<struct X>& rgKeys );
+ void createKeyList( TQValueVector<struct X>& rgKeys );
bool insertConnection( KAccelAction* );
bool removeConnection( KAccelAction* );
@@ -261,15 +261,15 @@ class KDECORE_EXPORT KAccelBase
ActionInfo( KAccelAction* _pAction, uint _iSeq, uint _iVariation )
{ pAction = _pAction; iSeq = _iSeq; iVariation = _iVariation; }
};
- typedef QMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
+ typedef TQMap<KKeyServer::Key, ActionInfo> KKeyToActionMap;
KAccelActions m_rgActions;
KKeyToActionMap m_mapKeyToAction;
- QValueList<KAccelAction*> m_rgActionsNonUnique;
+ TQValueList<KAccelAction*> m_rgActionsNonUnique;
bool m_bNativeKeys; // Use native key codes instead of Qt codes
bool m_bEnabled;
bool m_bConfigIsGlobal;
- QString m_sConfigGroup;
+ TQString m_sConfigGroup;
bool m_bAutoUpdate;
KAccelAction* mtemp_pActionRemoving;
diff --git a/kdecore/kaccelmanager.cpp b/kdecore/kaccelmanager.cpp
index b0aaab4f3..1b5ea4d24 100644
--- a/kdecore/kaccelmanager.cpp
+++ b/kdecore/kaccelmanager.cpp
@@ -19,26 +19,26 @@
#include "kaccelmanager.h"
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmenubar.h>
-#include <qmemarray.h>
-#include <qmetaobject.h>
-#include <qmainwindow.h>
-#include <qobjectlist.h>
-#include <qpopupmenu.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qtabbar.h>
-#include <qtextview.h>
-#include <qwidget.h>
-#include <qwidgetstack.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmenubar.h>
+#include <tqmemarray.h>
+#include <tqmetaobject.h>
+#include <tqmainwindow.h>
+#include <tqobjectlist.h>
+#include <tqpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqtabbar.h>
+#include <tqtextview.h>
+#include <tqwidget.h>
+#include <tqwidgetstack.h>
#include <kstdaction.h>
#include <kstaticdeleter.h>
@@ -74,45 +74,45 @@ class KAcceleratorManagerPrivate
{
public:
- static void manage(QWidget *widget);
+ static void manage(TQWidget *widget);
static bool programmers_mode;
- static bool standardName(const QString &str);
+ static bool standardName(const TQString &str);
static bool checkChange(const KAccelString &as) {
- QString t2 = as.accelerated();
- QString t1 = as.originalText();
+ TQString t2 = as.accelerated();
+ TQString t1 = as.originalText();
if (t1 != t2)
{
if (as.accel() == -1) {
- removed_string += "<tr><td>" + QStyleSheet::escape(t1) + "</td></tr>";
+ removed_string += "<tr><td>" + TQStyleSheet::escape(t1) + "</td></tr>";
} else if (as.originalAccel() == -1) {
- added_string += "<tr><td>" + QStyleSheet::escape(t2) + "</td></tr>";
+ added_string += "<tr><td>" + TQStyleSheet::escape(t2) + "</td></tr>";
} else {
- changed_string += "<tr><td>" + QStyleSheet::escape(t1) + "</td>";
- changed_string += "<td>" + QStyleSheet::escape(t2) + "</td></tr>";
+ changed_string += "<tr><td>" + TQStyleSheet::escape(t1) + "</td>";
+ changed_string += "<td>" + TQStyleSheet::escape(t2) + "</td></tr>";
}
return true;
}
return false;
}
- static QString changed_string;
- static QString added_string;
- static QString removed_string;
- static QMap<QWidget *, int> ignored_widgets;
+ static TQString changed_string;
+ static TQString added_string;
+ static TQString removed_string;
+ static TQMap<TQWidget *, int> ignored_widgets;
private:
class Item;
public:
- typedef QPtrList<Item> ItemList;
+ typedef TQPtrList<Item> ItemList;
private:
- static void traverseChildren(QWidget *widget, Item *item);
+ static void traverseChildren(TQWidget *widget, Item *item);
- static void manageWidget(QWidget *widget, Item *item);
- static void manageMenuBar(QMenuBar *mbar, Item *item);
- static void manageTabBar(QTabBar *bar, Item *item);
+ static void manageWidget(TQWidget *widget, Item *item);
+ static void manageMenuBar(TQMenuBar *mbar, Item *item);
+ static void manageTabBar(TQTabBar *bar, Item *item);
- static void calculateAccelerators(Item *item, QString &used);
+ static void calculateAccelerators(Item *item, TQString &used);
class Item
{
@@ -123,7 +123,7 @@ private:
void addChild(Item *item);
- QWidget *m_widget;
+ TQWidget *m_widget;
KAccelString m_content;
ItemList *m_children;
int m_index;
@@ -133,17 +133,17 @@ private:
bool KAcceleratorManagerPrivate::programmers_mode = false;
-QString KAcceleratorManagerPrivate::changed_string;
-QString KAcceleratorManagerPrivate::added_string;
-QString KAcceleratorManagerPrivate::removed_string;
-static QStringList *kaccmp_sns = 0;
-static KStaticDeleter<QStringList> kaccmp_sns_d;
-QMap<QWidget*, int> KAcceleratorManagerPrivate::ignored_widgets;
+TQString KAcceleratorManagerPrivate::changed_string;
+TQString KAcceleratorManagerPrivate::added_string;
+TQString KAcceleratorManagerPrivate::removed_string;
+static TQStringList *kaccmp_sns = 0;
+static KStaticDeleter<TQStringList> kaccmp_sns_d;
+TQMap<TQWidget*, int> KAcceleratorManagerPrivate::ignored_widgets;
-bool KAcceleratorManagerPrivate::standardName(const QString &str)
+bool KAcceleratorManagerPrivate::standardName(const TQString &str)
{
if (!kaccmp_sns)
- kaccmp_sns_d.setObject(kaccmp_sns, new QStringList(KStdAction::internal_stdNames()));
+ kaccmp_sns_d.setObject(kaccmp_sns, new TQStringList(KStdAction::internal_stdNames()));
return kaccmp_sns->contains(str);
}
@@ -163,7 +163,7 @@ void KAcceleratorManagerPrivate::Item::addChild(Item *item)
m_children->append(item);
}
-void KAcceleratorManagerPrivate::manage(QWidget *widget)
+void KAcceleratorManagerPrivate::manage(TQWidget *widget)
{
if (!widget)
{
@@ -171,10 +171,10 @@ void KAcceleratorManagerPrivate::manage(QWidget *widget)
return;
}
- if (dynamic_cast<QPopupMenu*>(widget))
+ if (dynamic_cast<TQPopupMenu*>(widget))
{
// create a popup accel manager that can deal with dynamic menus
- KPopupAccelManager::manage(static_cast<QPopupMenu*>(widget));
+ KPopupAccelManager::manage(static_cast<TQPopupMenu*>(widget));
return;
}
@@ -182,13 +182,13 @@ void KAcceleratorManagerPrivate::manage(QWidget *widget)
manageWidget(widget, root);
- QString used;
+ TQString used;
calculateAccelerators(root, used);
delete root;
}
-void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, QString &used)
+void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &used)
{
if (!item->m_children)
return;
@@ -211,19 +211,19 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, QString &used
{
cnt++;
- QTabBar *tabBar = dynamic_cast<QTabBar*>(it->m_widget);
+ TQTabBar *tabBar = dynamic_cast<TQTabBar*>(it->m_widget);
if (tabBar)
{
if (checkChange(contents[cnt]))
tabBar->tabAt(it->m_index)->setText(contents[cnt].accelerated());
continue;
}
- QMenuBar *menuBar = dynamic_cast<QMenuBar*>(it->m_widget);
+ TQMenuBar *menuBar = dynamic_cast<TQMenuBar*>(it->m_widget);
if (menuBar)
{
if (it->m_index >= 0)
{
- QMenuItem *mitem = menuBar->findItem(menuBar->idAt(it->m_index));
+ TQMenuItem *mitem = menuBar->findItem(menuBar->idAt(it->m_index));
if (mitem)
{
checkChange(contents[cnt]);
@@ -233,10 +233,10 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, QString &used
}
}
// we possibly reserved an accel, but we won't set it as it looks silly
- if ( dynamic_cast<QGroupBox*>( it->m_widget ) )
+ if ( dynamic_cast<TQGroupBox*>( it->m_widget ) )
continue;
// links look weird with ampersands
- if ( dynamic_cast<QLabel*>( it->m_widget ) && it->m_widget->inherits("KURLLabel") )
+ if ( dynamic_cast<TQLabel*>( it->m_widget ) && it->m_widget->inherits("KURLLabel") )
continue;
int tprop = it->m_widget->metaObject()->findProperty("text", true);
@@ -260,14 +260,14 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, QString &used
}
-void KAcceleratorManagerPrivate::traverseChildren(QWidget *widget, Item *item)
+void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item)
{
- QObjectList *childList = widget->queryList("QWidget", 0, false, false);
- for ( QObject *it = childList->first(); it; it = childList->next() )
+ TQObjectList *childList = widget->queryList("TQWidget", 0, false, false);
+ for ( TQObject *it = childList->first(); it; it = childList->next() )
{
- QWidget *w = static_cast<QWidget*>(it);
+ TQWidget *w = static_cast<TQWidget*>(it);
- if ( !w->isVisibleTo( widget ) || ( w->isTopLevel() && dynamic_cast<QPopupMenu*>(w) == NULL ) )
+ if ( !w->isVisibleTo( widget ) || ( w->isTopLevel() && dynamic_cast<TQPopupMenu*>(w) == NULL ) )
continue;
if ( KAcceleratorManagerPrivate::ignored_widgets.find( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() )
@@ -278,25 +278,25 @@ void KAcceleratorManagerPrivate::traverseChildren(QWidget *widget, Item *item)
delete childList;
}
-void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item)
+void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
{
// first treat the special cases
- QTabBar *tabBar = dynamic_cast<QTabBar*>(w);
+ TQTabBar *tabBar = dynamic_cast<TQTabBar*>(w);
if (tabBar)
{
manageTabBar(tabBar, item);
return;
}
- QWidgetStack *wds = dynamic_cast<QWidgetStack*>( w );
+ TQWidgetStack *wds = dynamic_cast<TQWidgetStack*>( w );
if ( wds )
{
QWidgetStackAccelManager::manage( wds );
// return;
}
- QPopupMenu *popupMenu = dynamic_cast<QPopupMenu*>(w);
+ TQPopupMenu *popupMenu = dynamic_cast<TQPopupMenu*>(w);
if (popupMenu)
{
// create a popup accel manager that can deal with dynamic menus
@@ -304,45 +304,45 @@ void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item)
return;
}
- QWidgetStack *wdst = dynamic_cast<QWidgetStack*>( w );
+ TQWidgetStack *wdst = dynamic_cast<TQWidgetStack*>( w );
if ( wdst )
{
QWidgetStackAccelManager::manage( wdst );
// return;
}
- QMenuBar *menuBar = dynamic_cast<QMenuBar*>(w);
+ TQMenuBar *menuBar = dynamic_cast<TQMenuBar*>(w);
if (menuBar)
{
manageMenuBar(menuBar, item);
return;
}
- if (dynamic_cast<QComboBox*>(w) || dynamic_cast<QLineEdit*>(w) ||
- dynamic_cast<QTextEdit*>(w) || dynamic_cast<QTextView*>(w) ||
- dynamic_cast<QSpinBox*>(w) || w->qt_cast( "KMultiTabBar" ))
+ if (dynamic_cast<TQComboBox*>(w) || dynamic_cast<TQLineEdit*>(w) ||
+ dynamic_cast<TQTextEdit*>(w) || dynamic_cast<TQTextView*>(w) ||
+ dynamic_cast<TQSpinBox*>(w) || w->qt_cast( "KMultiTabBar" ))
return;
// now treat 'ordinary' widgets
- QLabel *label = dynamic_cast<QLabel*>(w);
+ TQLabel *label = dynamic_cast<TQLabel*>(w);
if ( label ) {
if ( !label->buddy() )
label = 0;
else {
if ( label->textFormat() == Qt::RichText ||
( label->textFormat() == Qt::AutoText &&
- QStyleSheet::mightBeRichText( label->text() ) ) )
+ TQStyleSheet::mightBeRichText( label->text() ) ) )
label = 0;
}
}
- if (w->isFocusEnabled() || label || dynamic_cast<QGroupBox*>(w) || dynamic_cast<QRadioButton*>( w ))
+ if (w->isFocusEnabled() || label || dynamic_cast<TQGroupBox*>(w) || dynamic_cast<TQRadioButton*>( w ))
{
- QString content;
- QVariant variant;
+ TQString content;
+ TQVariant variant;
int tprop = w->metaObject()->findProperty("text", true);
if (tprop != -1) {
- const QMetaProperty* p = w->metaObject()->property( tprop, true );
+ const TQMetaProperty* p = w->metaObject()->property( tprop, true );
if ( p && p->isValid() )
w->qt_property( tprop, 1, &variant );
else
@@ -352,7 +352,7 @@ void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item)
if (tprop == -1) {
tprop = w->metaObject()->findProperty("title", true);
if (tprop != -1) {
- const QMetaProperty* p = w->metaObject()->property( tprop, true );
+ const TQMetaProperty* p = w->metaObject()->property( tprop, true );
if ( p && p->isValid() )
w->qt_property( tprop, 1, &variant );
}
@@ -368,11 +368,11 @@ void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item)
// put some more weight on the usual action elements
int weight = KAccelManagerAlgorithm::DEFAULT_WEIGHT;
- if (dynamic_cast<QPushButton*>(w) || dynamic_cast<QCheckBox*>(w) || dynamic_cast<QRadioButton*>(w) || dynamic_cast<QLabel*>(w))
+ if (dynamic_cast<TQPushButton*>(w) || dynamic_cast<TQCheckBox*>(w) || dynamic_cast<TQRadioButton*>(w) || dynamic_cast<TQLabel*>(w))
weight = KAccelManagerAlgorithm::ACTION_ELEMENT_WEIGHT;
// don't put weight on group boxes, as usually the contents are more important
- if (dynamic_cast<QGroupBox*>(w))
+ if (dynamic_cast<TQGroupBox*>(w))
weight = KAccelManagerAlgorithm::GROUP_BOX_WEIGHT;
// put a lot of extra weight on the KDialogBaseButton's
@@ -386,11 +386,11 @@ void KAcceleratorManagerPrivate::manageWidget(QWidget *w, Item *item)
traverseChildren(w, item);
}
-void KAcceleratorManagerPrivate::manageTabBar(QTabBar *bar, Item *item)
+void KAcceleratorManagerPrivate::manageTabBar(TQTabBar *bar, Item *item)
{
for (int i=0; i<bar->count(); i++)
{
- QString content = bar->tabAt(i)->text();
+ TQString content = bar->tabAt(i)->text();
if (content.isEmpty())
continue;
@@ -402,10 +402,10 @@ void KAcceleratorManagerPrivate::manageTabBar(QTabBar *bar, Item *item)
}
}
-void KAcceleratorManagerPrivate::manageMenuBar(QMenuBar *mbar, Item *item)
+void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item)
{
- QMenuItem *mitem;
- QString s;
+ TQMenuItem *mitem;
+ TQString s;
for (uint i=0; i<mbar->count(); ++i)
{
@@ -446,22 +446,22 @@ void KAcceleratorManagerPrivate::manageMenuBar(QMenuBar *mbar, Item *item)
*********************************************************************/
-void KAcceleratorManager::manage(QWidget *widget)
+void KAcceleratorManager::manage(TQWidget *widget)
{
KAcceleratorManager::manage(widget, false);
}
-void KAcceleratorManager::manage(QWidget *widget, bool programmers_mode)
+void KAcceleratorManager::manage(TQWidget *widget, bool programmers_mode)
{
kdDebug(131) << "KAcceleratorManager::manage\n";
- KAcceleratorManagerPrivate::changed_string = QString::null;
- KAcceleratorManagerPrivate::added_string = QString::null;
- KAcceleratorManagerPrivate::removed_string = QString::null;
+ KAcceleratorManagerPrivate::changed_string = TQString::null;
+ KAcceleratorManagerPrivate::added_string = TQString::null;
+ KAcceleratorManagerPrivate::removed_string = TQString::null;
KAcceleratorManagerPrivate::programmers_mode = programmers_mode;
KAcceleratorManagerPrivate::manage(widget);
}
-void KAcceleratorManager::last_manage(QString &added, QString &changed, QString &removed)
+void KAcceleratorManager::last_manage(TQString &added, TQString &changed, TQString &removed)
{
added = KAcceleratorManagerPrivate::added_string;
changed = KAcceleratorManagerPrivate::changed_string;
@@ -475,7 +475,7 @@ void KAcceleratorManager::last_manage(QString &added, QString &changed, QString
*********************************************************************/
-KAccelString::KAccelString(const QString &input, int initialWeight)
+KAccelString::KAccelString(const TQString &input, int initialWeight)
: m_pureText(input), m_weight()
{
m_orig_accel = m_pureText.find("(!)&");
@@ -502,9 +502,9 @@ KAccelString::KAccelString(const QString &input, int initialWeight)
}
-QString KAccelString::accelerated() const
+TQString KAccelString::accelerated() const
{
- QString result = m_origText;
+ TQString result = m_origText;
if (result.isEmpty())
return result;
@@ -531,10 +531,10 @@ QString KAccelString::accelerated() const
}
-QChar KAccelString::accelerator() const
+TQChar KAccelString::accelerator() const
{
if ((m_accel < 0) || (m_accel > (int)m_pureText.length()))
- return QChar();
+ return TQChar();
return m_pureText[m_accel].lower();
}
@@ -549,7 +549,7 @@ void KAccelString::calculateWeights(int initialWeight)
while (pos<m_pureText.length())
{
- QChar c = m_pureText[pos];
+ TQChar c = m_pureText[pos];
int weight = initialWeight+1;
@@ -591,9 +591,9 @@ void KAccelString::calculateWeights(int initialWeight)
}
-int KAccelString::stripAccelerator(QString &text)
+int KAccelString::stripAccelerator(TQString &text)
{
- // Note: this code is derived from QAccel::shortcutKey
+ // Note: this code is derived from TQAccel::shortcutKey
int p = 0;
while (p >= 0)
@@ -605,7 +605,7 @@ int KAccelString::stripAccelerator(QString &text)
if (text[p] != '&')
{
- QChar c = text[p];
+ TQChar c = text[p];
if (c.isPrint())
{
text.remove(p-1,1);
@@ -620,7 +620,7 @@ int KAccelString::stripAccelerator(QString &text)
}
-int KAccelString::maxWeight(int &index, const QString &used)
+int KAccelString::maxWeight(int &index, const TQString &used)
{
int max = 0;
index = -1;
@@ -639,9 +639,9 @@ int KAccelString::maxWeight(int &index, const QString &used)
void KAccelString::dump()
{
- QString s;
+ TQString s;
for (uint i=0; i<m_weight.count(); ++i)
- s += QString("%1(%2) ").arg(pure()[i]).arg(m_weight[i]);
+ s += TQString("%1(%2) ").arg(pure()[i]).arg(m_weight[i]);
kdDebug() << "s " << s << endl;
}
@@ -679,7 +679,7 @@ void KAccelString::dump()
*********************************************************************/
-void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, QString &used)
+void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, TQString &used)
{
kdDebug(131) << "findAccelerators\n";
KAccelStringList accel_strings = result;
@@ -726,15 +726,15 @@ void KAccelManagerAlgorithm::findAccelerators(KAccelStringList &result, QString
/*********************************************************************
- class KPopupAccelManager - managing QPopupMenu widgets dynamically
+ class KPopupAccelManager - managing TQPopupMenu widgets dynamically
*********************************************************************/
-KPopupAccelManager::KPopupAccelManager(QPopupMenu *popup)
- : QObject(popup), m_popup(popup), m_count(-1)
+KPopupAccelManager::KPopupAccelManager(TQPopupMenu *popup)
+ : TQObject(popup), m_popup(popup), m_count(-1)
{
aboutToShow(); // do one check and then connect to show
- connect(popup, SIGNAL(aboutToShow()), SLOT(aboutToShow()));
+ connect(popup, TQT_SIGNAL(aboutToShow()), TQT_SLOT(aboutToShow()));
}
@@ -767,7 +767,7 @@ void KPopupAccelManager::aboutToShow()
void KPopupAccelManager::calculateAccelerators()
{
// find the new accelerators
- QString used;
+ TQString used;
KAccelManagerAlgorithm::findAccelerators(m_entries, used);
// change the menu entries
@@ -777,8 +777,8 @@ void KPopupAccelManager::calculateAccelerators()
void KPopupAccelManager::findMenuEntries(KAccelStringList &list)
{
- QMenuItem *mitem;
- QString s;
+ TQMenuItem *mitem;
+ TQString s;
list.clear();
@@ -807,7 +807,7 @@ void KPopupAccelManager::findMenuEntries(KAccelStringList &list)
void KPopupAccelManager::setMenuEntries(const KAccelStringList &list)
{
- QMenuItem *mitem;
+ TQMenuItem *mitem;
uint cnt = 0;
for (uint i=0; i<m_popup->count(); i++)
@@ -823,36 +823,36 @@ void KPopupAccelManager::setMenuEntries(const KAccelStringList &list)
}
-void KPopupAccelManager::manage(QPopupMenu *popup)
+void KPopupAccelManager::manage(TQPopupMenu *popup)
{
// don't add more than one manager to a popup
if (popup->child(0, "KPopupAccelManager", false) == 0 )
new KPopupAccelManager(popup);
}
-void QWidgetStackAccelManager::manage( QWidgetStack *stack )
+void QWidgetStackAccelManager::manage( TQWidgetStack *stack )
{
if ( stack->child( 0, "QWidgetStackAccelManager", false ) == 0 )
new QWidgetStackAccelManager( stack );
}
-QWidgetStackAccelManager::QWidgetStackAccelManager(QWidgetStack *stack)
- : QObject(stack), m_stack(stack)
+QWidgetStackAccelManager::QWidgetStackAccelManager(TQWidgetStack *stack)
+ : TQObject(stack), m_stack(stack)
{
aboutToShow(stack->visibleWidget()); // do one check and then connect to show
- connect(stack, SIGNAL(aboutToShow(QWidget *)), SLOT(aboutToShow(QWidget *)));
+ connect(stack, TQT_SIGNAL(aboutToShow(TQWidget *)), TQT_SLOT(aboutToShow(TQWidget *)));
}
-bool QWidgetStackAccelManager::eventFilter ( QObject * watched, QEvent * e )
+bool QWidgetStackAccelManager::eventFilter ( TQObject * watched, TQEvent * e )
{
- if ( e->type() == QEvent::Show && qApp->activeWindow() ) {
+ if ( e->type() == TQEvent::Show && qApp->activeWindow() ) {
KAcceleratorManager::manage( qApp->activeWindow() );
watched->removeEventFilter( this );
}
return false;
}
-void QWidgetStackAccelManager::aboutToShow(QWidget *child)
+void QWidgetStackAccelManager::aboutToShow(TQWidget *child)
{
if (!child)
{
@@ -863,7 +863,7 @@ void QWidgetStackAccelManager::aboutToShow(QWidget *child)
child->installEventFilter( this );
}
-void KAcceleratorManager::setNoAccel( QWidget *widget )
+void KAcceleratorManager::setNoAccel( TQWidget *widget )
{
KAcceleratorManagerPrivate::ignored_widgets[widget] = 1;
}
diff --git a/kdecore/kaccelmanager.h b/kdecore/kaccelmanager.h
index 7619d2e29..b4869f072 100644
--- a/kdecore/kaccelmanager.h
+++ b/kdecore/kaccelmanager.h
@@ -61,7 +61,7 @@ public:
* @param widget The toplevel widget you want to manage.
*/
- static void manage(QWidget *widget);
+ static void manage(TQWidget *widget);
/**
* Does the same as the above function, but puts hints in the GUI so the
@@ -72,16 +72,16 @@ public:
* @param programmers_mode if true, KAcceleratorManager adds (&) for removed
* accels and & before added accels
*/
- static void manage(QWidget *widget, bool programmers_mode);
+ static void manage(TQWidget *widget, bool programmers_mode);
/** \internal returns the result of the last manage operation. */
- static void last_manage(QString &added, QString &changed, QString &removed);
+ static void last_manage(TQString &added, TQString &changed, TQString &removed);
/**
* Use this method for a widget (and its children) you want no accels to be set on.
* @since 3.4
*/
- static void setNoAccel( QWidget *widget );
+ static void setNoAccel( TQWidget *widget );
};
diff --git a/kdecore/kaccelmanager_private.h b/kdecore/kaccelmanager_private.h
index 74c844e1d..e19b5a9a5 100644
--- a/kdecore/kaccelmanager_private.h
+++ b/kdecore/kaccelmanager_private.h
@@ -22,10 +22,10 @@
#define __KACCELMANAGER_PRIVATE_H__
-#include <qstring.h>
-#include <qmemarray.h>
-#include <qvaluelist.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqmemarray.h>
+#include <tqvaluelist.h>
+#include <tqobject.h>
class QWidgetStack;
@@ -44,40 +44,40 @@ class KAccelString
public:
KAccelString() : m_pureText(), m_accel(-1) {}
- KAccelString(const QString &input, int initalWeight=-1);
+ KAccelString(const TQString &input, int initalWeight=-1);
void calculateWeights(int initialWeight);
- const QString &pure() const { return m_pureText; }
- QString accelerated() const;
+ const TQString &pure() const { return m_pureText; }
+ TQString accelerated() const;
int accel() const { return m_accel; }
void setAccel(int accel) { m_accel = accel; }
int originalAccel() const { return m_orig_accel; }
- QString originalText() const { return m_origText; }
+ TQString originalText() const { return m_origText; }
- QChar accelerator() const;
+ TQChar accelerator() const;
- int maxWeight(int &index, const QString &used);
+ int maxWeight(int &index, const TQString &used);
bool operator == (const KAccelString &c) const { return m_pureText == c.m_pureText && m_accel == c.m_accel && m_orig_accel == c.m_orig_accel; }
private:
- int stripAccelerator(QString &input);
+ int stripAccelerator(TQString &input);
void dump();
- QString m_pureText, m_origText;
+ TQString m_pureText, m_origText;
int m_accel, m_orig_accel;
- QMemArray<int> m_weight;
+ TQMemArray<int> m_weight;
};
-typedef QValueList<KAccelString> KAccelStringList;
+typedef TQValueList<KAccelString> KAccelStringList;
/**
@@ -114,7 +114,7 @@ public:
};
/// Method to call to find the best distribution of accelerators.
- static void findAccelerators(KAccelStringList &result, QString &used);
+ static void findAccelerators(KAccelStringList &result, TQString &used);
};
@@ -137,12 +137,12 @@ class KPopupAccelManager : public QObject
public:
- static void manage(QPopupMenu *popup);
+ static void manage(TQPopupMenu *popup);
protected:
- KPopupAccelManager(QPopupMenu *popup);
+ KPopupAccelManager(TQPopupMenu *popup);
private slots:
@@ -157,7 +157,7 @@ private:
void findMenuEntries(KAccelStringList &list);
void setMenuEntries(const KAccelStringList &list);
- QPopupMenu *m_popup;
+ TQPopupMenu *m_popup;
KAccelStringList m_entries;
int m_count;
@@ -170,24 +170,24 @@ class QWidgetStackAccelManager : public QObject
public:
- static void manage(QWidgetStack *popup);
+ static void manage(TQWidgetStack *popup);
protected:
- QWidgetStackAccelManager(QWidgetStack *popup);
+ QWidgetStackAccelManager(TQWidgetStack *popup);
private slots:
- void aboutToShow(QWidget *);
- bool eventFilter ( QObject * watched, QEvent * e );
+ void aboutToShow(TQWidget *);
+ bool eventFilter ( TQObject * watched, TQEvent * e );
private:
void calculateAccelerators();
- QWidgetStack *m_stack;
+ TQWidgetStack *m_stack;
KAccelStringList m_entries;
};
diff --git a/kdecore/kaccelprivate.h b/kdecore/kaccelprivate.h
index 7938aca0c..0a6cdc19b 100644
--- a/kdecore/kaccelprivate.h
+++ b/kdecore/kaccelprivate.h
@@ -2,30 +2,30 @@
#define __KACCELPRIVATE_H
#include "kkeyserver_x11.h"
-#include <qtimer.h>
+#include <tqtimer.h>
class KAccelAction;
/**
* @internal
*/
-class KDECORE_EXPORT KAccelPrivate : public QObject, public KAccelBase
+class KDECORE_EXPORT KAccelPrivate : public TQObject, public KAccelBase
{
Q_OBJECT
public:
KAccel* m_pAccel;
- QWidget* m_pWatch;
- QMap<int, int> m_mapIDToKey;
- QMap<int, KAccelAction*> m_mapIDToAction;
- QTimer m_timerShowMenu;
+ TQWidget* m_pWatch;
+ TQMap<int, int> m_mapIDToKey;
+ TQMap<int, KAccelAction*> m_mapIDToAction;
+ TQTimer m_timerShowMenu;
- KAccelPrivate( KAccel* pParent, QWidget* pWatch );
+ KAccelPrivate( KAccel* pParent, TQWidget* pWatch );
virtual void setEnabled( bool bEnabled );
- bool setEnabled( const QString& sAction, bool bEnable );
+ bool setEnabled( const TQString& sAction, bool bEnable );
- virtual bool removeAction( const QString& sAction );
+ virtual bool removeAction( const TQString& sAction );
virtual bool emitSignal( KAccelBase::Signal signal );
virtual bool connectKey( KAccelAction& action, const KKeyServer::Key& key );
@@ -47,7 +47,7 @@ class KDECORE_EXPORT KAccelPrivate : public QObject, public KAccelBase
void slotShowMenu();
void slotMenuActivated( int iAction );
- bool eventFilter( QObject* pWatched, QEvent* pEvent ); // virtual method from QObject
+ bool eventFilter( TQObject* pWatched, TQEvent* pEvent ); // virtual method from QObject
};
#endif // !__KACCELPRIVATE_H
diff --git a/kdecore/kallocator.cpp b/kdecore/kallocator.cpp
index 6ad524dec..c02bbf3ff 100644
--- a/kdecore/kallocator.cpp
+++ b/kdecore/kallocator.cpp
@@ -88,7 +88,7 @@ void KZoneAllocator::insertHash(MemBlock *b)
unsigned long key = adr >> log2;
key = key & (hashSize - 1);
if (!hashList[key])
- hashList[key] = new QValueList<MemBlock *>;
+ hashList[key] = new TQValueList<MemBlock *>;
hashList[key]->append(b);
adr += blockSize;
}
@@ -134,8 +134,8 @@ void KZoneAllocator::initHash()
hashSize = 1024;
if (hashSize > 64*1024)
hashSize = 64*1024;
- hashList = new QValueList<MemBlock *> *[hashSize];
- memset (hashList, 0, sizeof(QValueList<MemBlock*> *) * hashSize);
+ hashList = new TQValueList<MemBlock *> *[hashSize];
+ memset (hashList, 0, sizeof(TQValueList<MemBlock*> *) * hashSize);
hashDirty = false;
for (MemBlock *b = currentBlock; b; b = b->older)
insertHash(b);
@@ -156,9 +156,9 @@ void KZoneAllocator::delBlock(MemBlock *b)
unsigned long key = adr >> log2;
key = key & (hashSize - 1);
if (hashList[key]) {
- QValueList<MemBlock *> *list = hashList[key];
- QValueList<MemBlock *>::Iterator it = list->begin();
- QValueList<MemBlock *>::Iterator endit = list->end();
+ TQValueList<MemBlock *> *list = hashList[key];
+ TQValueList<MemBlock *>::Iterator it = list->begin();
+ TQValueList<MemBlock *>::Iterator endit = list->end();
for (; it != endit; ++it)
if (*it == b) {
list->remove(it);
@@ -210,15 +210,15 @@ KZoneAllocator::deallocate(void *ptr)
initHash();
unsigned long key = (((unsigned long)ptr) >> log2) & (hashSize - 1);
- QValueList<MemBlock *> *list = hashList[key];
+ TQValueList<MemBlock *> *list = hashList[key];
if (!list) {
/* Can happen with certain usage pattern of intermixed free_since()
and deallocate(). */
//qDebug("Uhoh");
return;
}
- QValueList<MemBlock*>::ConstIterator it = list->begin();
- QValueList<MemBlock*>::ConstIterator endit = list->end();
+ TQValueList<MemBlock*>::ConstIterator it = list->begin();
+ TQValueList<MemBlock*>::ConstIterator endit = list->end();
for (; it != endit; ++it) {
MemBlock *cur = *it;
if (cur->is_in(ptr)) {
diff --git a/kdecore/kallocator.h b/kdecore/kallocator.h
index 755926c81..2fed42c85 100644
--- a/kdecore/kallocator.h
+++ b/kdecore/kallocator.h
@@ -26,7 +26,7 @@
#ifndef KALLOCATOR_H
#define KALLOCATOR_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
class KZoneAllocatorPrivate;
@@ -112,7 +112,7 @@ protected:
/** A single chunk of memory from the heap. @internal */
class MemBlock;
/**< A list of chunks. @internal */
- typedef QValueList<MemBlock *> MemList;
+ typedef TQValueList<MemBlock *> MemList;
void addBlock(MemBlock *b);
void delBlock(MemBlock *b);
void insertHash(MemBlock *b);
diff --git a/kdecore/kappdcopiface.cpp b/kdecore/kappdcopiface.cpp
index afe11ecc9..fc0198d87 100644
--- a/kdecore/kappdcopiface.cpp
+++ b/kdecore/kappdcopiface.cpp
@@ -39,12 +39,12 @@ void KAppDCOPInterface::disableSessionManagement()
}
-QCString KAppDCOPInterface::startupId()
+TQCString KAppDCOPInterface::startupId()
{
return "";
}
-QCString KAppDCOPInterface::caption()
+TQCString KAppDCOPInterface::caption()
{
return "";
}
diff --git a/kdecore/kappdcopiface.h b/kdecore/kappdcopiface.h
index 667885a05..448f08d66 100644
--- a/kdecore/kappdcopiface.h
+++ b/kdecore/kappdcopiface.h
@@ -21,8 +21,8 @@
#define KAPPDCOP_INTERFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
#include <dcopref.h>
#include "kdelibs_export.h"
@@ -56,8 +56,8 @@ k_dcop:
**/
void disableSessionManagement();
- QCString startupId();
- QCString caption();
+ TQCString startupId();
+ TQCString caption();
void quit();
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp
index e89efe5b9..678d36677 100644
--- a/kdecore/kapplication.cpp
+++ b/kdecore/kapplication.cpp
@@ -21,28 +21,28 @@
#include "config.h"
#undef QT_NO_TRANSLATION
-#include <qtranslator.h>
+#include <tqtranslator.h>
#define QT_NO_TRANSLATION
-#include <qdir.h>
-#include <qptrcollection.h>
-#include <qwidgetlist.h>
-#include <qstrlist.h>
-#include <qfile.h>
-#include <qmessagebox.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qlineedit.h>
-#include <qtextedit.h>
-#include <qsessionmanager.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qstylesheet.h>
-#include <qpixmapcache.h>
-#include <qtooltip.h>
-#include <qstylefactory.h>
-#include <qmetaobject.h>
+#include <tqdir.h>
+#include <tqptrcollection.h>
+#include <tqwidgetlist.h>
+#include <tqstrlist.h>
+#include <tqfile.h>
+#include <tqmessagebox.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqlineedit.h>
+#include <tqtextedit.h>
+#include <tqsessionmanager.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqstylesheet.h>
+#include <tqpixmapcache.h>
+#include <tqtooltip.h>
+#include <tqstylefactory.h>
+#include <tqmetaobject.h>
#ifndef QT_NO_SQL
-#include <qsqlpropertymap.h>
+#include <tqsqlpropertymap.h>
#endif
#undef QT_NO_TRANSLATION
@@ -67,7 +67,7 @@
#include <kstdaccel.h>
#include <kaccel.h>
#include "kcheckaccelerators.h"
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include <kmacroexpander.h>
#include <kshell.h>
#include <kprotocolinfo.h>
@@ -143,7 +143,7 @@ typedef void* IceIOErrorHandler;
#ifdef Q_WS_MACX
#include <Carbon/Carbon.h>
-#include <qimage.h>
+#include <tqimage.h>
#endif
#include "kappdcopiface.h"
@@ -170,7 +170,7 @@ static Atom kde_xdnd_drop;
// replaced by unpatched one
KDECORE_EXPORT bool qt_qclipboard_bailout_hack = false;
-template class QPtrList<KSessionManaged>;
+template class TQPtrList<KSessionManaged>;
#ifdef Q_WS_X11
extern "C" {
@@ -213,7 +213,7 @@ public:
refCount( 1 ),
oldIceIOErrorHandler( 0 ),
checkAccelerators( 0 ),
- overrideStyle( QString::null ),
+ overrideStyle( TQString::null ),
startup_id( "0" ),
app_started_timer( NULL ),
m_KAppDCOPInterface( 0L ),
@@ -246,10 +246,10 @@ public:
int refCount;
IceIOErrorHandler oldIceIOErrorHandler;
KCheckAccelerators* checkAccelerators;
- QString overrideStyle;
- QString geometry_arg;
- QCString startup_id;
- QTimer* app_started_timer;
+ TQString overrideStyle;
+ TQString geometry_arg;
+ TQCString startup_id;
+ TQTimer* app_started_timer;
KAppDCOPInterface *m_KAppDCOPInterface;
bool session_save;
#ifdef Q_WS_X11
@@ -275,9 +275,9 @@ public:
#define checkEqual(s, b) \
b = (s == "=");
- URLActionRule(const QString &act,
- const QString &bProt, const QString &bHost, const QString &bPath,
- const QString &dProt, const QString &dHost, const QString &dPath,
+ URLActionRule(const TQString &act,
+ const TQString &bProt, const TQString &bHost, const TQString &bPath,
+ const TQString &dProt, const TQString &dHost, const TQString &dPath,
bool perm)
: action(act),
baseProt(bProt), baseHost(bHost), basePath(bPath),
@@ -294,7 +294,7 @@ public:
checkEqual(destHost, destHostEqual);
}
- bool baseMatch(const KURL &url, const QString &protClass)
+ bool baseMatch(const KURL &url, const TQString &protClass)
{
if (baseProtWildCard)
{
@@ -331,7 +331,7 @@ public:
return true;
}
- bool destMatch(const KURL &url, const QString &protClass, const KURL &base, const QString &baseClass)
+ bool destMatch(const KURL &url, const TQString &protClass, const KURL &base, const TQString &baseClass)
{
if (destProtEqual)
{
@@ -379,13 +379,13 @@ public:
return true;
}
- QString action;
- QString baseProt;
- QString baseHost;
- QString basePath;
- QString destProt;
- QString destHost;
- QString destPath;
+ TQString action;
+ TQString baseProt;
+ TQString baseHost;
+ TQString basePath;
+ TQString destProt;
+ TQString destHost;
+ TQString destPath;
bool baseProtWildCard : 1;
bool baseHostWildCard : 1;
bool basePathWildCard : 1;
@@ -396,32 +396,32 @@ public:
bool destHostEqual : 1;
bool permission;
};
- QPtrList<URLActionRule> urlActionRestrictions;
+ TQPtrList<URLActionRule> urlActionRestrictions;
- QString sessionKey;
- QString pSessionConfigFile;
+ TQString sessionKey;
+ TQString pSessionConfigFile;
};
-static QPtrList<QWidget>*x11Filter = 0;
+static TQPtrList<TQWidget>*x11Filter = 0;
static bool autoDcopRegistration = true;
-void KApplication::installX11EventFilter( QWidget* filter )
+void KApplication::installX11EventFilter( TQWidget* filter )
{
if ( !filter )
return;
if (!x11Filter)
- x11Filter = new QPtrList<QWidget>;
- connect ( filter, SIGNAL( destroyed() ), this, SLOT( x11FilterDestroyed() ) );
+ x11Filter = new TQPtrList<TQWidget>;
+ connect ( filter, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( x11FilterDestroyed() ) );
x11Filter->append( filter );
}
void KApplication::x11FilterDestroyed()
{
- removeX11EventFilter( static_cast< const QWidget* >( sender()));
+ removeX11EventFilter( static_cast< const TQWidget* >( sender()));
}
-void KApplication::removeX11EventFilter( const QWidget* filter )
+void KApplication::removeX11EventFilter( const TQWidget* filter )
{
if ( !x11Filter || !filter )
return;
@@ -438,34 +438,34 @@ void KApplication::removeX11EventFilter( const QWidget* filter )
// in KAccelEventHandler so that the AccelOverride isn't sent twice. -- ellis, 19/10/02
extern bool kde_g_bKillAccelOverride;
-bool KApplication::notify(QObject *receiver, QEvent *event)
+bool KApplication::notify(TQObject *receiver, TQEvent *event)
{
- QEvent::Type t = event->type();
+ TQEvent::Type t = event->type();
if (kde_g_bKillAccelOverride)
{
kde_g_bKillAccelOverride = false;
// Indicate that the accelerator has been overridden.
- if (t == QEvent::AccelOverride)
+ if (t == TQEvent::AccelOverride)
{
- static_cast<QKeyEvent *>(event)->accept();
+ static_cast<TQKeyEvent *>(event)->accept();
return true;
}
else
kdWarning(125) << "kde_g_bKillAccelOverride set, but received an event other than AccelOverride." << endl;
}
- if ((t == QEvent::AccelOverride) || (t == QEvent::KeyPress))
+ if ((t == TQEvent::AccelOverride) || (t == TQEvent::KeyPress))
{
static const KShortcut& _selectAll = KStdAccel::selectAll();
- QLineEdit *edit = ::qt_cast<QLineEdit *>(receiver);
+ TQLineEdit *edit = ::qt_cast<TQLineEdit *>(receiver);
if (edit)
{
// We have a keypress for a lineedit...
- QKeyEvent *kevent = static_cast<QKeyEvent *>(event);
+ TQKeyEvent *kevent = static_cast<TQKeyEvent *>(event);
KKey key(kevent);
if (_selectAll.contains(key))
{
- if (t == QEvent::KeyPress)
+ if (t == TQEvent::KeyPress)
{
edit->selectAll();
return true;
@@ -478,11 +478,11 @@ bool KApplication::notify(QObject *receiver, QEvent *event)
// Ctrl-U deletes from start of line.
if (key == KKey(Qt::CTRL + Qt::Key_U))
{
- if (t == QEvent::KeyPress)
+ if (t == TQEvent::KeyPress)
{
if (!edit->isReadOnly())
{
- QString t(edit->text());
+ TQString t(edit->text());
t = t.mid(edit->cursorPosition());
edit->validateAndSet(t, 0, 0, 0);
}
@@ -495,14 +495,14 @@ bool KApplication::notify(QObject *receiver, QEvent *event)
}
}
- QTextEdit *medit = ::qt_cast<QTextEdit *>(receiver);
+ TQTextEdit *medit = ::qt_cast<TQTextEdit *>(receiver);
if (medit)
{
// We have a keypress for a multilineedit...
- QKeyEvent *kevent = static_cast<QKeyEvent *>(event);
+ TQKeyEvent *kevent = static_cast<TQKeyEvent *>(event);
if (_selectAll.contains(KKey(kevent)))
{
- if (t == QEvent::KeyPress)
+ if (t == TQEvent::KeyPress)
{
medit->selectAll();
return true;
@@ -514,19 +514,19 @@ bool KApplication::notify(QObject *receiver, QEvent *event)
}
}
}
- if( t == QEvent::Show && receiver->isWidgetType())
+ if( t == TQEvent::Show && receiver->isWidgetType())
{
- QWidget* w = static_cast< QWidget* >( receiver );
+ TQWidget* w = static_cast< TQWidget* >( receiver );
#if defined Q_WS_X11
- if( w->isTopLevel() && !startupId().isEmpty() && !static_cast<QShowEvent*>(event)->spontaneous()) // TODO better done using window group leader?
+ if( w->isTopLevel() && !startupId().isEmpty() && !static_cast<TQShowEvent*>(event)->spontaneous()) // TODO better done using window group leader?
KStartupInfo::setWindowStartupId( w->winId(), startupId());
#endif
if( w->isTopLevel() && !w->testWFlags( WX11BypassWM ) && !w->isPopup() && !event->spontaneous())
{
if( d->app_started_timer == NULL )
{
- d->app_started_timer = new QTimer( this, "app_started_timer" );
- connect( d->app_started_timer, SIGNAL( timeout()), SLOT( checkAppStartedSlot()));
+ d->app_started_timer = new TQTimer( this, "app_started_timer" );
+ connect( d->app_started_timer, TQT_SIGNAL( timeout()), TQT_SLOT( checkAppStartedSlot()));
}
if( !d->app_started_timer->isActive())
d->app_started_timer->start( 0, true );
@@ -534,9 +534,9 @@ bool KApplication::notify(QObject *receiver, QEvent *event)
if( w->isTopLevel() && ( w->icon() == NULL || w->icon()->isNull()))
{
// icon() cannot be null pixmap, it'll be the "unknown" icon - so check if there is this application icon
- static QPixmap* ic = NULL;
+ static TQPixmap* ic = NULL;
if( ic == NULL )
- ic = new QPixmap( KGlobal::iconLoader()->loadIcon( iconName(),
+ ic = new TQPixmap( KGlobal::iconLoader()->loadIcon( iconName(),
KIcon::NoGroup, 0, KIcon::DefaultState, NULL, true ));
if( !ic->isNull())
{
@@ -547,7 +547,7 @@ bool KApplication::notify(QObject *receiver, QEvent *event)
}
}
}
- return QApplication::notify(receiver, event);
+ return TQApplication::notify(receiver, event);
}
void KApplication::checkAppStartedSlot()
@@ -558,11 +558,11 @@ void KApplication::checkAppStartedSlot()
}
// the help class for session management communication
-static QPtrList<KSessionManaged>* sessionClients()
+static TQPtrList<KSessionManaged>* sessionClients()
{
- static QPtrList<KSessionManaged>* session_clients = 0L;
+ static TQPtrList<KSessionManaged>* session_clients = 0L;
if ( !session_clients )
- session_clients = new QPtrList<KSessionManaged>;
+ session_clients = new TQPtrList<KSessionManaged>;
return session_clients;
}
@@ -571,12 +571,12 @@ static QPtrList<KSessionManaged>* sessionClients()
instance specific config object.
Syntax: "session/<appname>_<sessionId>"
*/
-QString KApplication::sessionConfigName() const
+TQString KApplication::sessionConfigName() const
{
- QString sessKey = sessionKey();
+ TQString sessKey = sessionKey();
if ( sessKey.isEmpty() && !d->sessionKey.isEmpty() )
sessKey = d->sessionKey;
- return QString("session/%1_%2_%3").arg(name()).arg(sessionId()).arg(sessKey);
+ return TQString("session/%1_%2_%3").arg(name()).arg(sessionId()).arg(sessKey);
}
#ifdef Q_WS_X11
@@ -586,11 +586,11 @@ static SmcConn tmpSmcConnection = 0;
// FIXME(E): Implement for Qt Embedded
// Possibly "steal" XFree86's libSM?
#endif
-static QTime* smModificationTime = 0;
+static TQTime* smModificationTime = 0;
-KApplication::KApplication( int& argc, char** argv, const QCString& rAppName,
+KApplication::KApplication( int& argc, char** argv, const TQCString& rAppName,
bool allowStyles, bool GUIenabled ) :
- QApplication( argc, argv, GUIenabled ), KInstance(rAppName),
+ TQApplication( argc, argv, GUIenabled ), KInstance(rAppName),
#ifdef Q_WS_X11
display(0L),
#endif
@@ -613,7 +613,7 @@ KApplication::KApplication( int& argc, char** argv, const QCString& rAppName,
}
KApplication::KApplication( bool allowStyles, bool GUIenabled ) :
- QApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+ TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
GUIenabled ),
KInstance( KCmdLineArgs::about),
#ifdef Q_WS_X11
@@ -638,7 +638,7 @@ KApplication::KApplication( bool allowStyles, bool GUIenabled ) :
#ifdef Q_WS_X11
KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap,
bool allowStyles ) :
- QApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+ TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
visual, colormap ),
KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate)
{
@@ -655,7 +655,7 @@ KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap
KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap,
bool allowStyles, KInstance * _instance ) :
- QApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+ TQApplication( dpy, *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
visual, colormap ),
KInstance( _instance ), display(0L), d (new KApplicationPrivate)
{
@@ -672,7 +672,7 @@ KApplication::KApplication( Display *dpy, Qt::HANDLE visual, Qt::HANDLE colormap
#endif
KApplication::KApplication( bool allowStyles, bool GUIenabled, KInstance* _instance ) :
- QApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
+ TQApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),
GUIenabled ),
KInstance( _instance ),
#ifdef Q_WS_X11
@@ -695,9 +695,9 @@ KApplication::KApplication( bool allowStyles, bool GUIenabled, KInstance* _insta
}
#ifdef Q_WS_X11
-KApplication::KApplication(Display *display, int& argc, char** argv, const QCString& rAppName,
+KApplication::KApplication(Display *display, int& argc, char** argv, const TQCString& rAppName,
bool allowStyles, bool GUIenabled ) :
- QApplication( display ), KInstance(rAppName),
+ TQApplication( display ), KInstance(rAppName),
display(0L),
d (new KApplicationPrivate())
{
@@ -761,7 +761,7 @@ void KApplication::iceIOErrorHandler( _IceConn *conn )
class KDETranslator : public QTranslator
{
public:
- KDETranslator(QObject *parent) : QTranslator(parent, "kdetranslator") {}
+ KDETranslator(TQObject *parent) : QTranslator(parent, "kdetranslator") {}
virtual QTranslatorMessage findMessage(const char* context,
const char *sourceText,
const char* message) const
@@ -786,7 +786,7 @@ void KApplication::init(bool GUIenabled)
(void) KClipboardSynchronizer::self();
- QApplication::setDesktopSettingsAware( false );
+ TQApplication::setDesktopSettingsAware( false );
KApp = this;
@@ -841,7 +841,7 @@ void KApplication::init(bool GUIenabled)
// * We use kdialog to warn the user, so we better not generate warnings from
// kdialog itself.
// * Don't warn if we run with a read-only $HOME
- QCString readOnly = getenv("KDE_HOME_READONLY");
+ TQCString readOnly = getenv("KDE_HOME_READONLY");
if (readOnly.isEmpty() && (qstrcmp(name(), "kdialog") != 0))
{
KConfigGroupSaver saver(config, "KDE Action Restrictions");
@@ -859,15 +859,15 @@ void KApplication::init(bool GUIenabled)
d->oldXIOErrorHandler = XSetIOErrorHandler( kde_xio_errhandler );
#endif
- connect( this, SIGNAL( aboutToQuit() ), this, SIGNAL( shutDown() ) );
+ connect( this, TQT_SIGNAL( aboutToQuit() ), this, TQT_SIGNAL( shutDown() ) );
#ifdef Q_WS_X11 //FIXME(E)
display = desktop()->x11Display();
#endif
{
- QStringList plugins = KGlobal::dirs()->resourceDirs( "qtplugins" );
- QStringList::Iterator it = plugins.begin();
+ TQStringList plugins = KGlobal::dirs()->resourceDirs( "qtplugins" );
+ TQStringList::Iterator it = plugins.begin();
while (it != plugins.end()) {
addLibraryPath( *it );
++it;
@@ -883,14 +883,14 @@ void KApplication::init(bool GUIenabled)
// XXX: This is a hack. Make our factory the default factory, but add the
// previous default factory to the list of factories. Why? When the default
// factory can't resolve something, it iterates in the list of factories.
- // But it QWhatsThis only uses the default factory. So if there was already
+ // But it TQWhatsThis only uses the default factory. So if there was already
// a default factory (which happens when using an image library using uic),
// we prefer KDE's factory and so we put that old default factory in the
// list and use KDE as the default. This may speed up things as well.
- QMimeSourceFactory* oldDefaultFactory = QMimeSourceFactory::takeDefaultFactory();
- QMimeSourceFactory::setDefaultFactory( mimeSourceFactory() );
+ TQMimeSourceFactory* oldDefaultFactory = TQMimeSourceFactory::takeDefaultFactory();
+ TQMimeSourceFactory::setDefaultFactory( mimeSourceFactory() );
if ( oldDefaultFactory ) {
- QMimeSourceFactory::addFactory( oldDefaultFactory );
+ TQMimeSourceFactory::addFactory( oldDefaultFactory );
}
d->checkAccelerators = new KCheckAccelerators( this );
@@ -898,10 +898,10 @@ void KApplication::init(bool GUIenabled)
#ifdef Q_WS_MACX
if (GUIenabled) {
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon( KCmdLineArgs::appName(),
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon( KCmdLineArgs::appName(),
KIcon::NoGroup, KIcon::SizeLarge, KIcon::DefaultState, 0L, false );
if (!pixmap.isNull()) {
- QImage i = pixmap.convertToImage().convertDepth(32).smoothScale(40, 40);
+ TQImage i = pixmap.convertToImage().convertDepth(32).smoothScale(40, 40);
for(int y = 0; y < i.height(); y++) {
uchar *l = i.scanLine(y);
for(int x = 0; x < i.width(); x+=4)
@@ -935,7 +935,7 @@ void KApplication::init(bool GUIenabled)
// install appdata resource type
KGlobal::dirs()->addResourceType("appdata", KStandardDirs::kde_default("data")
- + QString::fromLatin1(name()) + '/');
+ + TQString::fromLatin1(name()) + '/');
pSessionConfig = 0L;
bSessionManagement = true;
@@ -943,7 +943,7 @@ void KApplication::init(bool GUIenabled)
// register a communication window for desktop changes (Matthias)
if (GUIenabled && kde_have_kipc )
{
- smw = new QWidget(0,0);
+ smw = new TQWidget(0,0);
long data = 1;
XChangeProperty(qt_xdisplay(), smw->winId(),
atom_DesktopWindow, atom_DesktopWindow,
@@ -990,10 +990,10 @@ DCOPClient *KApplication::dcopClient()
s_DCOPClient->setServerAddress( args->getOption("dcopserver"));
}
if( kapp ) {
- connect(s_DCOPClient, SIGNAL(attachFailed(const QString &)),
- kapp, SLOT(dcopFailure(const QString &)));
- connect(s_DCOPClient, SIGNAL(blockUserInput(bool) ),
- kapp, SLOT(dcopBlockUserInput(bool)) );
+ connect(s_DCOPClient, TQT_SIGNAL(attachFailed(const TQString &)),
+ kapp, TQT_SLOT(dcopFailure(const TQString &)));
+ connect(s_DCOPClient, TQT_SIGNAL(blockUserInput(bool) ),
+ kapp, TQT_SLOT(dcopBlockUserInput(bool)) );
}
else
s_dcopClientNeedsPostInit = true;
@@ -1007,8 +1007,8 @@ void KApplication::dcopClientPostInit()
if( s_dcopClientNeedsPostInit )
{
s_dcopClientNeedsPostInit = false;
- connect(s_DCOPClient, SIGNAL(blockUserInput(bool) ),
- SLOT(dcopBlockUserInput(bool)) );
+ connect(s_DCOPClient, TQT_SIGNAL(blockUserInput(bool) ),
+ TQT_SLOT(dcopBlockUserInput(bool)) );
s_DCOPClient->bindToApp(); // Make sure we get events from the DCOPClient.
}
}
@@ -1106,14 +1106,14 @@ bool KApplication::requestShutDown(
ShutdownConfirm confirm, ShutdownType sdtype, ShutdownMode sdmode )
{
#ifdef Q_WS_X11
- QApplication::syncX();
+ TQApplication::syncX();
/* use ksmserver's dcop interface if necessary */
if ( confirm == ShutdownConfirmYes ||
sdtype != ShutdownTypeDefault ||
sdmode != ShutdownModeDefault )
{
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (int)confirm << (int)sdtype << (int)sdmode;
return dcopClient()->send( "ksmserver", "ksmserver",
"logout(int,int,int)", data );
@@ -1133,7 +1133,7 @@ bool KApplication::requestShutDown(
// open a temporary connection, if possible
propagateSessionManager();
- QCString smEnv = ::getenv("SESSION_MANAGER");
+ TQCString smEnv = ::getenv("SESSION_MANAGER");
if (smEnv.isEmpty())
return false;
@@ -1168,32 +1168,32 @@ bool KApplication::requestShutDown(
void KApplication::propagateSessionManager()
{
#ifdef Q_WS_X11
- QCString fName = QFile::encodeName(locateLocal("socket", "KSMserver"));
- QCString display = ::getenv(DISPLAY);
+ TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver"));
+ TQCString display = ::getenv(DISPLAY);
// strip the screen number from the display
- display.replace(QRegExp("\\.[0-9]+$"), "");
+ display.replace(TQRegExp("\\.[0-9]+$"), "");
int i;
while( (i = display.find(':')) >= 0)
display[i] = '_';
fName += "_"+display;
- QCString smEnv = ::getenv("SESSION_MANAGER");
+ TQCString smEnv = ::getenv("SESSION_MANAGER");
bool check = smEnv.isEmpty();
if ( !check && smModificationTime ) {
- QFileInfo info( fName );
- QTime current = info.lastModified().time();
+ TQFileInfo info( fName );
+ TQTime current = info.lastModified().time();
check = current > *smModificationTime;
}
if ( check ) {
delete smModificationTime;
- QFile f( fName );
+ TQFile f( fName );
if ( !f.open( IO_ReadOnly ) )
return;
- QFileInfo info ( f );
- smModificationTime = new QTime( info.lastModified().time() );
- QTextStream t(&f);
- t.setEncoding( QTextStream::Latin1 );
- QString s = t.readLine();
+ TQFileInfo info ( f );
+ smModificationTime = new TQTime( info.lastModified().time() );
+ TQTextStream t(&f);
+ t.setEncoding( TQTextStream::Latin1 );
+ TQString s = t.readLine();
f.close();
::setenv( "SESSION_MANAGER", s.latin1(), true );
}
@@ -1213,19 +1213,19 @@ void KApplication::commitData( QSessionManager& sm )
sm.cancel();
if ( sm.allowsInteraction() ) {
- QWidgetList done;
- QWidgetList *list = QApplication::topLevelWidgets();
+ TQWidgetList done;
+ TQWidgetList *list = TQApplication::topLevelWidgets();
bool canceled = false;
- QWidget* w = list->first();
+ TQWidget* w = list->first();
while ( !canceled && w ) {
if ( !w->testWState( WState_ForceHide ) && !w->inherits("KMainWindow") ) {
- QCloseEvent e;
+ TQCloseEvent e;
sendEvent( w, &e );
canceled = !e.isAccepted();
if ( !canceled )
done.append( w );
delete list; // one never knows...
- list = QApplication::topLevelWidgets();
+ list = TQApplication::topLevelWidgets();
w = list->first();
} else {
w = list->next();
@@ -1267,8 +1267,8 @@ static void checkRestartVersion( QSessionManager& sm )
}
}
}
- QString wrapper = KStandardDirs::findExe( "kde3" );
- QStringList restartCommand = sm.restartCommand();
+ TQString wrapper = KStandardDirs::findExe( "kde3" );
+ TQStringList restartCommand = sm.restartCommand();
restartCommand.prepend( wrapper );
sm.setRestartCommand( restartCommand );
}
@@ -1306,9 +1306,9 @@ void KApplication::saveState( QSessionManager& sm )
}
// tell the session manager about our new lifecycle
- QStringList restartCommand = sm.restartCommand();
+ TQStringList restartCommand = sm.restartCommand();
- QCString multiHead = getenv("KDE_MULTIHEAD");
+ TQCString multiHead = getenv("KDE_MULTIHEAD");
if (multiHead.lower() == "true") {
// if multihead is enabled, we save our -display argument so that
// we are restored onto the correct head... one problem with this
@@ -1316,7 +1316,7 @@ void KApplication::saveState( QSessionManager& sm )
// to a different display (ie. if we are in a university lab and try,
// try to restore a multihead session, our apps could be started on
// someone else's display instead of our own)
- QCString displayname = getenv(DISPLAY);
+ TQCString displayname = getenv(DISPLAY);
if (! displayname.isNull()) {
// only store the command if we actually have a DISPLAY
// environment variable
@@ -1340,7 +1340,7 @@ void KApplication::saveState( QSessionManager& sm )
// if we created a new session config object, register a proper discard command
if ( pSessionConfig ) {
pSessionConfig->sync();
- QStringList discard;
+ TQStringList discard;
discard << "rm" << locateLocal("config", sessionConfigName());
sm.setDiscardCommand( discard );
} else {
@@ -1372,20 +1372,20 @@ void KApplication::startKdeinit()
return; // whoever held the lock has already started dcopserver
}
// Try to launch kdeinit.
- QString srv = KStandardDirs::findExe(QString::fromLatin1("kdeinit"));
+ TQString srv = KStandardDirs::findExe(TQString::fromLatin1("kdeinit"));
if (srv.isEmpty())
- srv = KStandardDirs::findExe(QString::fromLatin1("kdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir());
+ srv = KStandardDirs::findExe(TQString::fromLatin1("kdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir());
if (srv.isEmpty())
return;
if (kapp && (Tty != kapp->type()))
setOverrideCursor( Qt::waitCursor );
- my_system(QFile::encodeName(srv)+" --suicide"+" --new-startup");
+ my_system(TQFile::encodeName(srv)+" --suicide"+" --new-startup");
if (kapp && (Tty != kapp->type()))
restoreOverrideCursor();
#endif
}
-void KApplication::dcopFailure(const QString &msg)
+void KApplication::dcopFailure(const TQString &msg)
{
static int failureCount = 0;
failureCount++;
@@ -1401,7 +1401,7 @@ void KApplication::dcopFailure(const QString &msg)
if (KGlobal::config()->readBoolEntry("ignoreDCOPFailures", false))
return;
#endif
- QString msgStr(i18n("There was an error setting up inter-process "
+ TQString msgStr(i18n("There was an error setting up inter-process "
"communications for KDE. The message returned "
"by the system was:\n\n"));
msgStr += msg;
@@ -1409,7 +1409,7 @@ void KApplication::dcopFailure(const QString &msg)
if (Tty != kapp->type())
{
- QMessageBox::critical
+ TQMessageBox::critical
(
kapp->mainWidget(),
i18n("DCOP communications error (%1)").arg(kapp->caption()),
@@ -1436,7 +1436,7 @@ static const KCmdLineOptions qt_options[] =
#endif
{ "session <sessionId>", I18N_NOOP("Restore the application for the given 'sessionId'"), 0},
{ "cmap", I18N_NOOP("Causes the application to install a private color\nmap on an 8-bit display"), 0},
- { "ncols <count>", I18N_NOOP("Limits the number of colors allocated in the color\ncube on an 8-bit display, if the application is\nusing the QApplication::ManyColor color\nspecification"), 0},
+ { "ncols <count>", I18N_NOOP("Limits the number of colors allocated in the color\ncube on an 8-bit display, if the application is\nusing the TQApplication::ManyColor color\nspecification"), 0},
{ "nograb", I18N_NOOP("tells Qt to never grab the mouse or the keyboard"), 0},
{ "dograb", I18N_NOOP("running under a debugger can cause an implicit\n-nograb, use -dograb to override"), 0},
{ "sync", I18N_NOOP("switches to synchronous mode for debugging"), 0},
@@ -1495,17 +1495,17 @@ void KApplication::parseCommandLine( )
if (args->isSet("config"))
{
- QString config = QString::fromLocal8Bit(args->getOption("config"));
+ TQString config = TQString::fromLocal8Bit(args->getOption("config"));
setConfigName(config);
}
if (args->isSet("style"))
{
- QStringList styles = QStyleFactory::keys();
- QString reqStyle(args->getOption("style").lower());
+ TQStringList styles = TQStyleFactory::keys();
+ TQString reqStyle(args->getOption("style").lower());
- for (QStringList::ConstIterator it = styles.begin(); it != styles.end(); ++it)
+ for (TQStringList::ConstIterator it = styles.begin(); it != styles.end(); ++it)
if ((*it).lower() == reqStyle)
{
d->overrideStyle = *it;
@@ -1518,7 +1518,7 @@ void KApplication::parseCommandLine( )
if (args->isSet("caption"))
{
- aCaption = QString::fromLocal8Bit(args->getOption("caption"));
+ aCaption = TQString::fromLocal8Bit(args->getOption("caption"));
}
if (args->isSet("miniicon"))
@@ -1556,7 +1556,7 @@ void KApplication::parseCommandLine( )
KCrash::setCrashHandler(KCrash::defaultCrashHandler);
KCrash::setEmergencySaveFunction(NULL);
- KCrash::setApplicationName(QString(args->appName()));
+ KCrash::setApplicationName(TQString(args->appName()));
}
#ifdef Q_WS_X11
@@ -1593,12 +1593,12 @@ void KApplication::parseCommandLine( )
}
-QString KApplication::geometryArgument() const
+TQString KApplication::geometryArgument() const
{
return d->geometry_arg;
}
-QPixmap KApplication::icon() const
+TQPixmap KApplication::icon() const
{
if( !aIconPixmap.pm.icon) {
aIconPixmap.pm.icon = new QPixmap;
@@ -1609,12 +1609,12 @@ QPixmap KApplication::icon() const
return *aIconPixmap.pm.icon;
}
-QString KApplication::iconName() const
+TQString KApplication::iconName() const
{
- return aIconName.isNull() ? (QString)instanceName() : aIconName;
+ return aIconName.isNull() ? (TQString)instanceName() : aIconName;
}
-QPixmap KApplication::miniIcon() const
+TQPixmap KApplication::miniIcon() const
{
if (!aIconPixmap.pm.miniIcon) {
aIconPixmap.pm.miniIcon = new QPixmap;
@@ -1625,9 +1625,9 @@ QPixmap KApplication::miniIcon() const
return *aIconPixmap.pm.miniIcon;
}
-QString KApplication::miniIconName() const
+TQString KApplication::miniIconName() const
{
- return aMiniIconName.isNull() ? (QString)instanceName() : aMiniIconName;
+ return aMiniIconName.isNull() ? (TQString)instanceName() : aMiniIconName;
}
extern void kDebugCleanup();
@@ -1755,7 +1755,7 @@ bool KApplication::x11EventFilter( XEvent *_event )
}
if (x11Filter) {
- for (QWidget *w=x11Filter->first(); w; w=x11Filter->next()) {
+ for (TQWidget *w=x11Filter->first(); w; w=x11Filter->next()) {
if (((KAppX11HackWidget*) w)->publicx11Event(_event))
return true;
}
@@ -1808,7 +1808,7 @@ bool KApplication::x11EventFilter( XEvent *_event )
break;
case KIPC::IconChanged:
- QPixmapCache::clear();
+ TQPixmapCache::clear();
KGlobal::config()->reparseConfiguration();
KGlobal::instance()->newIconLoader();
emit updateIconLoaders();
@@ -1864,7 +1864,7 @@ unsigned long KApplication::userTimestamp() const
#endif
}
-void KApplication::updateRemoteUserTimestamp( const QCString& dcopId, unsigned long time )
+void KApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigned long time )
{
#if defined Q_WS_X11
if( time == 0 )
@@ -1875,11 +1875,11 @@ void KApplication::updateRemoteUserTimestamp( const QCString& dcopId, unsigned l
void KApplication::invokeEditSlot( const char *slot )
{
- QObject *object = focusWidget();
+ TQObject *object = focusWidget();
if( !object )
return;
- QMetaObject *meta = object->metaObject();
+ TQMetaObject *meta = object->metaObject();
int idx = meta->findSlot( slot + 1, true );
if( idx < 0 )
@@ -1927,20 +1927,20 @@ void KApplication::applyGUIStyle()
if ( !useStyles ) return;
KConfigGroup pConfig (KGlobal::config(), "General");
- QString defaultStyle = KStyle::defaultStyle();
- QString styleStr = pConfig.readEntry("widgetStyle", defaultStyle);
+ TQString defaultStyle = KStyle::defaultStyle();
+ TQString styleStr = pConfig.readEntry("widgetStyle", defaultStyle);
if (d->overrideStyle.isEmpty()) {
// ### add check whether we already use the correct style to return then
// (workaround for Qt misbehavior to avoid double style initialization)
- QStyle* sp = QStyleFactory::create( styleStr );
+ TQStyle* sp = TQStyleFactory::create( styleStr );
// If there is no default style available, try falling back any available style
if ( !sp && styleStr != defaultStyle)
- sp = QStyleFactory::create( defaultStyle );
+ sp = TQStyleFactory::create( defaultStyle );
if ( !sp )
- sp = QStyleFactory::create( *(QStyleFactory::keys().begin()) );
+ sp = TQStyleFactory::create( *(TQStyleFactory::keys().begin()) );
setStyle(sp);
}
else
@@ -1949,7 +1949,7 @@ void KApplication::applyGUIStyle()
kdisplaySetPalette();
}
-QString KApplication::caption() const
+TQString KApplication::caption() const
{
// Caption set from command line ?
if( !aCaption.isNull() )
@@ -1968,62 +1968,62 @@ QString KApplication::caption() const
// 1999-09-20: Espen Sand
// An attempt to simplify consistent captions.
//
-QString KApplication::makeStdCaption( const QString &userCaption,
+TQString KApplication::makeStdCaption( const TQString &userCaption,
bool withAppName, bool modified ) const
{
- QString s = userCaption.isEmpty() ? caption() : userCaption;
+ TQString s = userCaption.isEmpty() ? caption() : userCaption;
// If the document is modified, add '[modified]'.
if (modified)
- s += QString::fromUtf8(" [") + i18n("modified") + QString::fromUtf8("]");
+ s += TQString::fromUtf8(" [") + i18n("modified") + TQString::fromUtf8("]");
if ( !userCaption.isEmpty() ) {
// Add the application name if:
// User asked for it, it's not a duplication and the app name (caption()) is not empty
if ( withAppName && !caption().isNull() && !userCaption.endsWith(caption()) )
- s += QString::fromUtf8(" - ") + caption();
+ s += TQString::fromUtf8(" - ") + caption();
}
return s;
}
-QPalette KApplication::createApplicationPalette()
+TQPalette KApplication::createApplicationPalette()
{
KConfig *config = KGlobal::config();
KConfigGroupSaver saver( config, "General" );
return createApplicationPalette( config, KGlobalSettings::contrast() );
}
-QPalette KApplication::createApplicationPalette( KConfig *config, int contrast_ )
+TQPalette KApplication::createApplicationPalette( KConfig *config, int contrast_ )
{
- QColor kde34Background( 239, 239, 239 );
- QColor kde34Blue( 103,141,178 );
+ TQColor kde34Background( 239, 239, 239 );
+ TQColor kde34Blue( 103,141,178 );
- QColor kde34Button;
- if ( QPixmap::defaultDepth() > 8 )
+ TQColor kde34Button;
+ if ( TQPixmap::defaultDepth() > 8 )
kde34Button.setRgb( 221, 223, 228 );
else
kde34Button.setRgb( 220, 220, 220 );
- QColor kde34Link( 0, 0, 238 );
- QColor kde34VisitedLink( 82, 24, 139 );
+ TQColor kde34Link( 0, 0, 238 );
+ TQColor kde34VisitedLink( 82, 24, 139 );
- QColor background = config->readColorEntry( "background", &kde34Background );
- QColor foreground = config->readColorEntry( "foreground", &black );
- QColor button = config->readColorEntry( "buttonBackground", &kde34Button );
- QColor buttonText = config->readColorEntry( "buttonForeground", &black );
- QColor highlight = config->readColorEntry( "selectBackground", &kde34Blue );
- QColor highlightedText = config->readColorEntry( "selectForeground", &white );
- QColor base = config->readColorEntry( "windowBackground", &white );
- QColor baseText = config->readColorEntry( "windowForeground", &black );
- QColor link = config->readColorEntry( "linkColor", &kde34Link );
- QColor visitedLink = config->readColorEntry( "visitedLinkColor", &kde34VisitedLink );
+ TQColor background = config->readColorEntry( "background", &kde34Background );
+ TQColor foreground = config->readColorEntry( "foreground", &black );
+ TQColor button = config->readColorEntry( "buttonBackground", &kde34Button );
+ TQColor buttonText = config->readColorEntry( "buttonForeground", &black );
+ TQColor highlight = config->readColorEntry( "selectBackground", &kde34Blue );
+ TQColor highlightedText = config->readColorEntry( "selectForeground", &white );
+ TQColor base = config->readColorEntry( "windowBackground", &white );
+ TQColor baseText = config->readColorEntry( "windowForeground", &black );
+ TQColor link = config->readColorEntry( "linkColor", &kde34Link );
+ TQColor visitedLink = config->readColorEntry( "visitedLinkColor", &kde34VisitedLink );
int highlightVal, lowlightVal;
highlightVal = 100 + (2*contrast_+4)*16/10;
lowlightVal = 100 + (2*contrast_+4)*10;
- QColor disfg = foreground;
+ TQColor disfg = foreground;
int h, s, v;
disfg.hsv( &h, &s, &v );
@@ -2038,13 +2038,13 @@ QPalette KApplication::createApplicationPalette( KConfig *config, int contrast_
disfg = Qt::darkGray;
- QColorGroup disabledgrp(disfg, background,
+ TQColorGroup disabledgrp(disfg, background,
background.light(highlightVal),
background.dark(lowlightVal),
background.dark(120),
background.dark(120), base);
- QColorGroup colgrp(foreground, background, background.light(highlightVal),
+ TQColorGroup colgrp(foreground, background, background.light(highlightVal),
background.dark(lowlightVal),
background.dark(120),
baseText, base);
@@ -2053,17 +2053,17 @@ QPalette KApplication::createApplicationPalette( KConfig *config, int contrast_
if(inlowlightVal < 120)
inlowlightVal = 120;
- colgrp.setColor(QColorGroup::Highlight, highlight);
- colgrp.setColor(QColorGroup::HighlightedText, highlightedText);
- colgrp.setColor(QColorGroup::Button, button);
- colgrp.setColor(QColorGroup::ButtonText, buttonText);
- colgrp.setColor(QColorGroup::Midlight, background.light(110));
- colgrp.setColor(QColorGroup::Link, link);
- colgrp.setColor(QColorGroup::LinkVisited, visitedLink);
+ colgrp.setColor(TQColorGroup::Highlight, highlight);
+ colgrp.setColor(TQColorGroup::HighlightedText, highlightedText);
+ colgrp.setColor(TQColorGroup::Button, button);
+ colgrp.setColor(TQColorGroup::ButtonText, buttonText);
+ colgrp.setColor(TQColorGroup::Midlight, background.light(110));
+ colgrp.setColor(TQColorGroup::Link, link);
+ colgrp.setColor(TQColorGroup::LinkVisited, visitedLink);
- disabledgrp.setColor(QColorGroup::Button, button);
+ disabledgrp.setColor(TQColorGroup::Button, button);
- QColor disbtntext = buttonText;
+ TQColor disbtntext = buttonText;
disbtntext.hsv( &h, &s, &v );
if (v > 128)
// dark button, light buttonText - need a darker disabled buttonText
@@ -2075,13 +2075,13 @@ QPalette KApplication::createApplicationPalette( KConfig *config, int contrast_
// black button - use darkgray disabled buttonText
disbtntext = Qt::darkGray;
- disabledgrp.setColor(QColorGroup::ButtonText, disbtntext);
- disabledgrp.setColor(QColorGroup::Midlight, background.light(110));
- disabledgrp.setColor(QColorGroup::Highlight, highlight.dark(120));
- disabledgrp.setColor(QColorGroup::Link, link);
- disabledgrp.setColor(QColorGroup::LinkVisited, visitedLink);
+ disabledgrp.setColor(TQColorGroup::ButtonText, disbtntext);
+ disabledgrp.setColor(TQColorGroup::Midlight, background.light(110));
+ disabledgrp.setColor(TQColorGroup::Highlight, highlight.dark(120));
+ disabledgrp.setColor(TQColorGroup::Link, link);
+ disabledgrp.setColor(TQColorGroup::LinkVisited, visitedLink);
- return QPalette(colgrp, disabledgrp, colgrp);
+ return TQPalette(colgrp, disabledgrp, colgrp);
}
@@ -2097,7 +2097,7 @@ void KApplication::kdisplaySetPalette()
return;
}
#endif
- QApplication::setPalette( createApplicationPalette(), true);
+ TQApplication::setPalette( createApplicationPalette(), true);
emit kdisplayPaletteChanged();
emit appearanceChanged();
}
@@ -2105,13 +2105,13 @@ void KApplication::kdisplaySetPalette()
void KApplication::kdisplaySetFont()
{
- QApplication::setFont(KGlobalSettings::generalFont(), true);
- QApplication::setFont(KGlobalSettings::menuFont(), true, "QMenuBar");
- QApplication::setFont(KGlobalSettings::menuFont(), true, "QPopupMenu");
- QApplication::setFont(KGlobalSettings::menuFont(), true, "KPopupTitle");
+ TQApplication::setFont(KGlobalSettings::generalFont(), true);
+ TQApplication::setFont(KGlobalSettings::menuFont(), true, "TQMenuBar");
+ TQApplication::setFont(KGlobalSettings::menuFont(), true, "TQPopupMenu");
+ TQApplication::setFont(KGlobalSettings::menuFont(), true, "KPopupTitle");
- // "patch" standard QStyleSheet to follow our fonts
- QStyleSheet* sheet = QStyleSheet::defaultSheet();
+ // "patch" standard TQStyleSheet to follow our fonts
+ TQStyleSheet* sheet = TQStyleSheet::defaultSheet();
sheet->item ("pre")->setFontFamily (KGlobalSettings::fixedFont().family());
sheet->item ("code")->setFontFamily (KGlobalSettings::fixedFont().family());
sheet->item ("tt")->setFontFamily (KGlobalSettings::fixedFont().family());
@@ -2137,33 +2137,33 @@ void KApplication::propagateSettings(SettingsCategory arg)
KConfigBase* config = KGlobal::config();
KConfigGroupSaver saver( config, "KDE" );
- int num = config->readNumEntry("CursorBlinkRate", QApplication::cursorFlashTime());
+ int num = config->readNumEntry("CursorBlinkRate", TQApplication::cursorFlashTime());
if ((num != 0) && (num < 200))
num = 200;
if (num > 2000)
num = 2000;
- QApplication::setCursorFlashTime(num);
- num = config->readNumEntry("DoubleClickInterval", QApplication::doubleClickInterval());
- QApplication::setDoubleClickInterval(num);
- num = config->readNumEntry("StartDragTime", QApplication::startDragTime());
- QApplication::setStartDragTime(num);
- num = config->readNumEntry("StartDragDist", QApplication::startDragDistance());
- QApplication::setStartDragDistance(num);
- num = config->readNumEntry("WheelScrollLines", QApplication::wheelScrollLines());
- QApplication::setWheelScrollLines(num);
+ TQApplication::setCursorFlashTime(num);
+ num = config->readNumEntry("DoubleClickInterval", TQApplication::doubleClickInterval());
+ TQApplication::setDoubleClickInterval(num);
+ num = config->readNumEntry("StartDragTime", TQApplication::startDragTime());
+ TQApplication::setStartDragTime(num);
+ num = config->readNumEntry("StartDragDist", TQApplication::startDragDistance());
+ TQApplication::setStartDragDistance(num);
+ num = config->readNumEntry("WheelScrollLines", TQApplication::wheelScrollLines());
+ TQApplication::setWheelScrollLines(num);
bool b = config->readBoolEntry("EffectAnimateMenu", false);
- QApplication::setEffectEnabled( Qt::UI_AnimateMenu, b);
+ TQApplication::setEffectEnabled( Qt::UI_AnimateMenu, b);
b = config->readBoolEntry("EffectFadeMenu", false);
- QApplication::setEffectEnabled( Qt::UI_FadeMenu, b);
+ TQApplication::setEffectEnabled( Qt::UI_FadeMenu, b);
b = config->readBoolEntry("EffectAnimateCombo", false);
- QApplication::setEffectEnabled( Qt::UI_AnimateCombo, b);
+ TQApplication::setEffectEnabled( Qt::UI_AnimateCombo, b);
b = config->readBoolEntry("EffectAnimateTooltip", false);
- QApplication::setEffectEnabled( Qt::UI_AnimateTooltip, b);
+ TQApplication::setEffectEnabled( Qt::UI_AnimateTooltip, b);
b = config->readBoolEntry("EffectFadeTooltip", false);
- QApplication::setEffectEnabled( Qt::UI_FadeTooltip, b);
+ TQApplication::setEffectEnabled( Qt::UI_FadeTooltip, b);
b = !config->readBoolEntry("EffectNoTooltip", false);
- QToolTip::setGloballyEnabled( b );
+ TQToolTip::setGloballyEnabled( b );
emit settingsChanged(arg);
}
@@ -2180,8 +2180,8 @@ void KApplication::installKDEPropertyMap()
* function.
* Thanks.
*/
- // QSqlPropertyMap takes ownership of the new default map.
- QSqlPropertyMap *kdeMap = new QSqlPropertyMap;
+ // TQSqlPropertyMap takes ownership of the new default map.
+ TQSqlPropertyMap *kdeMap = new QSqlPropertyMap;
kdeMap->insert( "KColorButton", "color" );
kdeMap->insert( "KComboBox", "currentItem" );
kdeMap->insert( "KDatePicker", "date" );
@@ -2204,14 +2204,14 @@ void KApplication::installKDEPropertyMap()
kdeMap->insert( "KIntSpinBox", "value" );
kdeMap->insert( "KDoubleNumInput", "value" );
// Temp til fixed in QT then enable ifdef with the correct version num
- kdeMap->insert( "QGroupBox", "checked" );
- kdeMap->insert( "QTabWidget", "currentPage" );
- QSqlPropertyMap::installDefaultMap( kdeMap );
+ kdeMap->insert( "TQGroupBox", "checked" );
+ kdeMap->insert( "TQTabWidget", "currentPage" );
+ TQSqlPropertyMap::installDefaultMap( kdeMap );
#endif
}
-void KApplication::invokeHelp( const QString& anchor,
- const QString& _appname) const
+void KApplication::invokeHelp( const TQString& anchor,
+ const TQString& _appname) const
{
return invokeHelp( anchor, _appname, "" );
}
@@ -2219,29 +2219,29 @@ void KApplication::invokeHelp( const QString& anchor,
#ifndef Q_WS_WIN
// for win32 we're using simple help tools like Qt Assistant,
// see kapplication_win.cpp
-void KApplication::invokeHelp( const QString& anchor,
- const QString& _appname,
- const QCString& startup_id ) const
+void KApplication::invokeHelp( const TQString& anchor,
+ const TQString& _appname,
+ const TQCString& startup_id ) const
{
- QString url;
- QString appname;
+ TQString url;
+ TQString appname;
if (_appname.isEmpty())
appname = name();
else
appname = _appname;
if (!anchor.isEmpty())
- url = QString("help:/%1?anchor=%2").arg(appname).arg(anchor);
+ url = TQString("help:/%1?anchor=%2").arg(appname).arg(anchor);
else
- url = QString("help:/%1/index.html").arg(appname);
+ url = TQString("help:/%1/index.html").arg(appname);
- QString error;
+ TQString error;
if ( !dcopClient()->isApplicationRegistered("khelpcenter") )
{
if (startServiceByDesktopName("khelpcenter", url, &error, 0, 0, startup_id, false))
{
if (Tty != kapp->type())
- QMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Help Center"),
+ TQMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Help Center"),
i18n("Could not launch the KDE Help Center:\n\n%1").arg(error), i18n("&OK"));
else
kdWarning() << "Could not launch help:\n" << error << endl;
@@ -2253,30 +2253,30 @@ void KApplication::invokeHelp( const QString& anchor,
}
#endif
-void KApplication::invokeHTMLHelp( const QString& _filename, const QString& topic ) const
+void KApplication::invokeHTMLHelp( const TQString& _filename, const TQString& topic ) const
{
kdWarning() << "invoking HTML help is deprecated! use docbook and invokeHelp!\n";
- QString filename;
+ TQString filename;
if( _filename.isEmpty() )
- filename = QString(name()) + "/index.html";
+ filename = TQString(name()) + "/index.html";
else
filename = _filename;
- QString url;
+ TQString url;
if (!topic.isEmpty())
- url = QString("help:/%1#%2").arg(filename).arg(topic);
+ url = TQString("help:/%1#%2").arg(filename).arg(topic);
else
- url = QString("help:/%1").arg(filename);
+ url = TQString("help:/%1").arg(filename);
- QString error;
+ TQString error;
if ( !dcopClient()->isApplicationRegistered("khelpcenter") )
{
if (startServiceByDesktopName("khelpcenter", url, &error, 0, 0, "", false))
{
if (Tty != kapp->type())
- QMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Help Center"),
+ TQMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Help Center"),
i18n("Could not launch the KDE Help Center:\n\n%1").arg(error), i18n("&OK"));
else
kdWarning() << "Could not launch help:\n" << error << endl;
@@ -2288,15 +2288,15 @@ void KApplication::invokeHTMLHelp( const QString& _filename, const QString& topi
}
-void KApplication::invokeMailer(const QString &address, const QString &subject)
+void KApplication::invokeMailer(const TQString &address, const TQString &subject)
{
return invokeMailer(address,subject,"");
}
-void KApplication::invokeMailer(const QString &address, const QString &subject, const QCString& startup_id)
+void KApplication::invokeMailer(const TQString &address, const TQString &subject, const TQCString& startup_id)
{
- invokeMailer(address, QString::null, QString::null, subject, QString::null, QString::null,
- QStringList(), startup_id );
+ invokeMailer(address, TQString::null, TQString::null, subject, TQString::null, TQString::null,
+ TQStringList(), startup_id );
}
void KApplication::invokeMailer(const KURL &mailtoURL)
@@ -2304,19 +2304,19 @@ void KApplication::invokeMailer(const KURL &mailtoURL)
return invokeMailer( mailtoURL, "" );
}
-void KApplication::invokeMailer(const KURL &mailtoURL, const QCString& startup_id )
+void KApplication::invokeMailer(const KURL &mailtoURL, const TQCString& startup_id )
{
return invokeMailer( mailtoURL, startup_id, false);
}
-void KApplication::invokeMailer(const KURL &mailtoURL, const QCString& startup_id, bool allowAttachments )
+void KApplication::invokeMailer(const KURL &mailtoURL, const TQCString& startup_id, bool allowAttachments )
{
- QString address = KURL::decode_string(mailtoURL.path()), subject, cc, bcc, body;
- QStringList queries = QStringList::split('&', mailtoURL.query().mid(1));
- QStringList attachURLs;
- for (QStringList::Iterator it = queries.begin(); it != queries.end(); ++it)
+ TQString address = KURL::decode_string(mailtoURL.path()), subject, cc, bcc, body;
+ TQStringList queries = TQStringList::split('&', mailtoURL.query().mid(1));
+ TQStringList attachURLs;
+ for (TQStringList::Iterator it = queries.begin(); it != queries.end(); ++it)
{
- QString q = (*it).lower();
+ TQString q = (*it).lower();
if (q.startsWith("subject="))
subject = KURL::decode_string((*it).mid(8));
else
@@ -2339,12 +2339,12 @@ void KApplication::invokeMailer(const KURL &mailtoURL, const QCString& startup_i
address = address.isEmpty()? KURL::decode_string((*it).mid(3)): address + ',' + KURL::decode_string((*it).mid(3));
}
- invokeMailer( address, cc, bcc, subject, body, QString::null, attachURLs, startup_id );
+ invokeMailer( address, cc, bcc, subject, body, TQString::null, attachURLs, startup_id );
}
-void KApplication::invokeMailer(const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body,
- const QString & messageFile, const QStringList &attachURLs)
+void KApplication::invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body,
+ const TQString & messageFile, const TQStringList &attachURLs)
{
return invokeMailer(to,cc,bcc,subject,body,messageFile,attachURLs,"");
}
@@ -2353,7 +2353,7 @@ void KApplication::invokeMailer(const QString &to, const QString &cc, const QStr
// on win32, for invoking browser we're using win32 API
// see kapplication_win.cpp
-static QStringList splitEmailAddressList( const QString & aStr )
+static TQStringList splitEmailAddressList( const TQString & aStr )
{
// This is a copy of KPIM::splitEmailAddrList().
// Features:
@@ -2364,12 +2364,12 @@ static QStringList splitEmailAddressList( const QString & aStr )
// - ignores everything (including double quotes and commas)
// inside comments
- QStringList list;
+ TQStringList list;
if (aStr.isEmpty())
return list;
- QString addr;
+ TQString addr;
uint addrstart = 0;
int commentlevel = 0;
bool insidequote = false;
@@ -2424,36 +2424,36 @@ static QStringList splitEmailAddressList( const QString & aStr )
return list;
}
-void KApplication::invokeMailer(const QString &_to, const QString &_cc, const QString &_bcc,
- const QString &subject, const QString &body,
- const QString & /*messageFile TODO*/, const QStringList &attachURLs,
- const QCString& startup_id )
+void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const TQString &_bcc,
+ const TQString &subject, const TQString &body,
+ const TQString & /*messageFile TODO*/, const TQStringList &attachURLs,
+ const TQCString& startup_id )
{
KConfig config("emaildefaults");
config.setGroup("Defaults");
- QString group = config.readEntry("Profile","Default");
+ TQString group = config.readEntry("Profile","Default");
- config.setGroup( QString("PROFILE_%1").arg(group) );
- QString command = config.readPathEntry("EmailClient");
+ config.setGroup( TQString("PROFILE_%1").arg(group) );
+ TQString command = config.readPathEntry("EmailClient");
- QString to, cc, bcc;
- if (command.isEmpty() || command == QString::fromLatin1("kmail")
+ TQString to, cc, bcc;
+ if (command.isEmpty() || command == TQString::fromLatin1("kmail")
|| command.endsWith("/kmail"))
{
- command = QString::fromLatin1("kmail --composer -s %s -c %c -b %b --body %B --attach %A -- %t");
+ command = TQString::fromLatin1("kmail --composer -s %s -c %c -b %b --body %B --attach %A -- %t");
if ( !_to.isEmpty() )
{
// put the whole address lists into RFC2047 encoded blobs; technically
// this isn't correct, but KMail understands it nonetheless
- to = QString( "=?utf8?b?%1?=" )
+ to = TQString( "=?utf8?b?%1?=" )
.arg( KCodecs::base64Encode( _to.utf8(), false ) );
}
if ( !_cc.isEmpty() )
- cc = QString( "=?utf8?b?%1?=" )
+ cc = TQString( "=?utf8?b?%1?=" )
.arg( KCodecs::base64Encode( _cc.utf8(), false ) );
if ( !_bcc.isEmpty() )
- bcc = QString( "=?utf8?b?%1?=" )
+ bcc = TQString( "=?utf8?b?%1?=" )
.arg( KCodecs::base64Encode( _bcc.utf8(), false ) );
} else {
to = _to;
@@ -2466,31 +2466,31 @@ void KApplication::invokeMailer(const QString &_to, const QString &_cc, const QS
if (config.readBoolEntry("TerminalClient", false))
{
KConfigGroup confGroup( KGlobal::config(), "General" );
- QString preferredTerminal = confGroup.readPathEntry("TerminalApplication", "konsole");
+ TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", "konsole");
command = preferredTerminal + " -e " + command;
}
- QStringList cmdTokens = KShell::splitArgs(command);
- QString cmd = cmdTokens[0];
+ TQStringList cmdTokens = KShell::splitArgs(command);
+ TQString cmd = cmdTokens[0];
cmdTokens.remove(cmdTokens.begin());
KURL url;
- QStringList qry;
+ TQStringList qry;
if (!to.isEmpty())
{
- QStringList tos = splitEmailAddressList( to );
+ TQStringList tos = splitEmailAddressList( to );
url.setPath( tos.first() );
tos.remove( tos.begin() );
- for (QStringList::ConstIterator it = tos.begin(); it != tos.end(); ++it)
+ for (TQStringList::ConstIterator it = tos.begin(); it != tos.end(); ++it)
qry.append( "to=" + KURL::encode_string( *it ) );
}
- const QStringList ccs = splitEmailAddressList( cc );
- for (QStringList::ConstIterator it = ccs.begin(); it != ccs.end(); ++it)
+ const TQStringList ccs = splitEmailAddressList( cc );
+ for (TQStringList::ConstIterator it = ccs.begin(); it != ccs.end(); ++it)
qry.append( "cc=" + KURL::encode_string( *it ) );
- const QStringList bccs = splitEmailAddressList( bcc );
- for (QStringList::ConstIterator it = bccs.begin(); it != bccs.end(); ++it)
+ const TQStringList bccs = splitEmailAddressList( bcc );
+ for (TQStringList::ConstIterator it = bccs.begin(); it != bccs.end(); ++it)
qry.append( "bcc=" + KURL::encode_string( *it ) );
- for (QStringList::ConstIterator it = attachURLs.begin(); it != attachURLs.end(); ++it)
+ for (TQStringList::ConstIterator it = attachURLs.begin(); it != attachURLs.end(); ++it)
qry.append( "attach=" + KURL::encode_string( *it ) );
if (!subject.isEmpty())
qry.append( "subject=" + KURL::encode_string( subject ) );
@@ -2500,7 +2500,7 @@ void KApplication::invokeMailer(const QString &_to, const QString &_cc, const QS
if ( ! (to.isEmpty() && qry.isEmpty()) )
url.setProtocol("mailto");
- QMap<QChar, QString> keyMap;
+ TQMap<TQChar, TQString> keyMap;
keyMap.insert('t', to);
keyMap.insert('s', subject);
keyMap.insert('c', cc);
@@ -2508,22 +2508,22 @@ void KApplication::invokeMailer(const QString &_to, const QString &_cc, const QS
keyMap.insert('B', body);
keyMap.insert('u', url.url());
- QString attachlist = attachURLs.join(",");
+ TQString attachlist = attachURLs.join(",");
attachlist.prepend('\'');
attachlist.append('\'');
keyMap.insert('A', attachlist);
- for (QStringList::Iterator it = cmdTokens.begin(); it != cmdTokens.end(); )
+ for (TQStringList::Iterator it = cmdTokens.begin(); it != cmdTokens.end(); )
{
if (*it == "%A")
{
if (it == cmdTokens.begin()) // better safe than sorry ...
continue;
- QStringList::ConstIterator urlit = attachURLs.begin();
- QStringList::ConstIterator urlend = attachURLs.end();
+ TQStringList::ConstIterator urlit = attachURLs.begin();
+ TQStringList::ConstIterator urlend = attachURLs.end();
if ( urlit != urlend )
{
- QStringList::Iterator previt = it;
+ TQStringList::Iterator previt = it;
--previt;
*it = *urlit;
++it;
@@ -2542,19 +2542,19 @@ void KApplication::invokeMailer(const QString &_to, const QString &_cc, const QS
}
}
- QString error;
+ TQString error;
// TODO this should check if cmd has a .desktop file, and use data from it, together
// with sending more ASN data
if (kdeinitExec(cmd, cmdTokens, &error, NULL, startup_id ))
if (Tty != kapp->type())
- QMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Mail Client"),
+ TQMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Mail Client"),
i18n("Could not launch the mail client:\n\n%1").arg(error), i18n("&OK"));
else
kdWarning() << "Could not launch mail client:\n" << error << endl;
}
#endif
-void KApplication::invokeBrowser( const QString &url )
+void KApplication::invokeBrowser( const TQString &url )
{
return invokeBrowser( url, "" );
}
@@ -2562,14 +2562,14 @@ void KApplication::invokeBrowser( const QString &url )
#ifndef Q_WS_WIN
// on win32, for invoking browser we're using win32 API
// see kapplication_win.cpp
-void KApplication::invokeBrowser( const QString &url, const QCString& startup_id )
+void KApplication::invokeBrowser( const TQString &url, const TQCString& startup_id )
{
- QString error;
+ TQString error;
if (startServiceByDesktopName("kfmclient", url, &error, 0, 0, startup_id, false))
{
if (Tty != kapp->type())
- QMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Browser"),
+ TQMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Browser"),
i18n("Could not launch the browser:\n\n%1").arg(error), i18n("&OK"));
else
kdWarning() << "Could not launch browser:\n" << error << endl;
@@ -2580,27 +2580,27 @@ void KApplication::invokeBrowser( const QString &url, const QCString& startup_id
void KApplication::cut()
{
- invokeEditSlot( SLOT( cut() ) );
+ invokeEditSlot( TQT_SLOT( cut() ) );
}
void KApplication::copy()
{
- invokeEditSlot( SLOT( copy() ) );
+ invokeEditSlot( TQT_SLOT( copy() ) );
}
void KApplication::paste()
{
- invokeEditSlot( SLOT( paste() ) );
+ invokeEditSlot( TQT_SLOT( paste() ) );
}
void KApplication::clear()
{
- invokeEditSlot( SLOT( clear() ) );
+ invokeEditSlot( TQT_SLOT( clear() ) );
}
void KApplication::selectAll()
{
- invokeEditSlot( SLOT( selectAll() ) );
+ invokeEditSlot( TQT_SLOT( selectAll() ) );
}
void KApplication::broadcastKeyCode(unsigned int keyCode)
@@ -2615,15 +2615,15 @@ KApplication::launcher()
}
static int
-startServiceInternal( const QCString &function,
- const QString& _name, const QStringList &URLs,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+startServiceInternal( const TQCString &function,
+ const TQString& _name, const TQStringList &URLs,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
struct serviceResult
{
int result;
- QCString dcopName;
- QString error;
+ TQCString dcopName;
+ TQString error;
pid_t pid;
};
@@ -2646,20 +2646,20 @@ startServiceInternal( const QCString &function,
return -1;
}
}
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << _name << URLs;
- QCString replyType;
- QByteArray replyData;
- QCString _launcher = KApplication::launcher();
- QValueList<QCString> envs;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQCString _launcher = KApplication::launcher();
+ TQValueList<TQCString> envs;
#ifdef Q_WS_X11
if (qt_xdisplay()) {
- QCString dpystring(XDisplayString(qt_xdisplay()));
- envs.append( QCString("DISPLAY=") + dpystring );
+ TQCString dpystring(XDisplayString(qt_xdisplay()));
+ envs.append( TQCString("DISPLAY=") + dpystring );
} else if( getenv( "DISPLAY" )) {
- QCString dpystring( getenv( "DISPLAY" ));
- envs.append( QCString("DISPLAY=") + dpystring );
+ TQCString dpystring( getenv( "DISPLAY" ));
+ envs.append( TQCString("DISPLAY=") + dpystring );
}
#endif
stream << envs;
@@ -2685,7 +2685,7 @@ startServiceInternal( const QCString &function,
if (noWait)
return 0;
- QDataStream stream2(replyData, IO_ReadOnly);
+ TQDataStream stream2(replyData, IO_ReadOnly);
serviceResult result;
stream2 >> result.result >> result.dcopName >> result.error >> result.pid;
if (dcopService)
@@ -2698,111 +2698,111 @@ startServiceInternal( const QCString &function,
}
int
-KApplication::startServiceByName( const QString& _name, const QString &URL,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByName( const TQString& _name, const TQString &URL,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
- QStringList URLs;
+ TQStringList URLs;
if (!URL.isEmpty())
URLs.append(URL);
return startServiceInternal(
- "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::startServiceByName( const QString& _name, const QStringList &URLs,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByName( const TQString& _name, const TQStringList &URLs,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
return startServiceInternal(
- "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::startServiceByDesktopPath( const QString& _name, const QString &URL,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByDesktopPath( const TQString& _name, const TQString &URL,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
- QStringList URLs;
+ TQStringList URLs;
if (!URL.isEmpty())
URLs.append(URL);
return startServiceInternal(
- "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::startServiceByDesktopPath( const QString& _name, const QStringList &URLs,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByDesktopPath( const TQString& _name, const TQStringList &URLs,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
return startServiceInternal(
- "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::startServiceByDesktopName( const QString& _name, const QString &URL,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByDesktopName( const TQString& _name, const TQString &URL,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
- QStringList URLs;
+ TQStringList URLs;
if (!URL.isEmpty())
URLs.append(URL);
return startServiceInternal(
- "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::startServiceByDesktopName( const QString& _name, const QStringList &URLs,
- QString *error, QCString *dcopService, int *pid, const QCString& startup_id, bool noWait )
+KApplication::startServiceByDesktopName( const TQString& _name, const TQStringList &URLs,
+ TQString *error, TQCString *dcopService, int *pid, const TQCString& startup_id, bool noWait )
{
return startServiceInternal(
- "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString,bool)",
+ "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)",
_name, URLs, error, dcopService, pid, startup_id, noWait);
}
int
-KApplication::kdeinitExec( const QString& name, const QStringList &args,
- QString *error, int *pid )
+KApplication::kdeinitExec( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid )
{
return kdeinitExec( name, args, error, pid, "" );
}
int
-KApplication::kdeinitExec( const QString& name, const QStringList &args,
- QString *error, int *pid, const QCString& startup_id )
+KApplication::kdeinitExec( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid, const TQCString& startup_id )
{
- return startServiceInternal("kdeinit_exec(QString,QStringList,QValueList<QCString>,QCString)",
+ return startServiceInternal("kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>,TQCString)",
name, args, error, 0, pid, startup_id, false);
}
int
-KApplication::kdeinitExecWait( const QString& name, const QStringList &args,
- QString *error, int *pid )
+KApplication::kdeinitExecWait( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid )
{
return kdeinitExecWait( name, args, error, pid, "" );
}
int
-KApplication::kdeinitExecWait( const QString& name, const QStringList &args,
- QString *error, int *pid, const QCString& startup_id )
+KApplication::kdeinitExecWait( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid, const TQCString& startup_id )
{
- return startServiceInternal("kdeinit_exec_wait(QString,QStringList,QValueList<QCString>,QCString)",
+ return startServiceInternal("kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>,TQCString)",
name, args, error, 0, pid, startup_id, false);
}
-QString KApplication::tempSaveName( const QString& pFilename ) const
+TQString KApplication::tempSaveName( const TQString& pFilename ) const
{
- QString aFilename;
+ TQString aFilename;
- if( QDir::isRelativePath(pFilename) )
+ if( TQDir::isRelativePath(pFilename) )
{
kdWarning(101) << "Relative filename passed to KApplication::tempSaveName" << endl;
- aFilename = QFileInfo( QDir( "." ), pFilename ).absFilePath();
+ aFilename = TQFileInfo( TQDir( "." ), pFilename ).absFilePath();
}
else
aFilename = pFilename;
- QDir aAutosaveDir( QDir::homeDirPath() + "/autosave/" );
+ TQDir aAutosaveDir( TQDir::homeDirPath() + "/autosave/" );
if( !aAutosaveDir.exists() )
{
if( !aAutosaveDir.mkdir( aAutosaveDir.absPath() ) )
@@ -2818,20 +2818,20 @@ QString KApplication::tempSaveName( const QString& pFilename ) const
}
-QString KApplication::checkRecoverFile( const QString& pFilename,
+TQString KApplication::checkRecoverFile( const TQString& pFilename,
bool& bRecover ) const
{
- QString aFilename;
+ TQString aFilename;
- if( QDir::isRelativePath(pFilename) )
+ if( TQDir::isRelativePath(pFilename) )
{
kdWarning(101) << "Relative filename passed to KApplication::tempSaveName" << endl;
- aFilename = QFileInfo( QDir( "." ), pFilename ).absFilePath();
+ aFilename = TQFileInfo( TQDir( "." ), pFilename ).absFilePath();
}
else
aFilename = pFilename;
- QDir aAutosaveDir( QDir::homeDirPath() + "/autosave/" );
+ TQDir aAutosaveDir( TQDir::homeDirPath() + "/autosave/" );
if( !aAutosaveDir.exists() )
{
if( !aAutosaveDir.mkdir( aAutosaveDir.absPath() ) )
@@ -2843,7 +2843,7 @@ QString KApplication::checkRecoverFile( const QString& pFilename,
aFilename.replace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() );
- if( QFile( aFilename ).exists() )
+ if( TQFile( aFilename ).exists() )
{
bRecover = true;
return aFilename;
@@ -2856,9 +2856,9 @@ QString KApplication::checkRecoverFile( const QString& pFilename,
}
-bool checkAccess(const QString& pathname, int mode)
+bool checkAccess(const TQString& pathname, int mode)
{
- int accessOK = access( QFile::encodeName(pathname), mode );
+ int accessOK = access( TQFile::encodeName(pathname), mode );
if ( accessOK == 0 )
return true; // OK, I can really access the file
@@ -2869,11 +2869,11 @@ bool checkAccess(const QString& pathname, int mode)
return false; // Check for write access is not part of mode => bail out
- if (!access( QFile::encodeName(pathname), F_OK)) // if it already exists
+ if (!access( TQFile::encodeName(pathname), F_OK)) // if it already exists
return false;
//strip the filename (everything until '/' from the end
- QString dirName(pathname);
+ TQString dirName(pathname);
int pos = dirName.findRev('/');
if ( pos == -1 )
return false; // No path in argument. This is evil, we won't allow this
@@ -2882,7 +2882,7 @@ bool checkAccess(const QString& pathname, int mode)
dirName.truncate(pos); // strip everything starting from the last '/'
- accessOK = access( QFile::encodeName(dirName), W_OK );
+ accessOK = access( TQFile::encodeName(dirName), W_OK );
// -?- Can I write to the accessed diretory
if ( accessOK == 0 )
return true; // Yes
@@ -2890,7 +2890,7 @@ bool checkAccess(const QString& pathname, int mode)
return false; // No
}
-void KApplication::setTopWidget( QWidget *topWidget )
+void KApplication::setTopWidget( TQWidget *topWidget )
{
if( !topWidget )
return;
@@ -2911,12 +2911,12 @@ void KApplication::setTopWidget( QWidget *topWidget )
#endif
}
-QCString KApplication::startupId() const
+TQCString KApplication::startupId() const
{
return d->startup_id;
}
-void KApplication::setStartupId( const QCString& startup_id )
+void KApplication::setStartupId( const TQCString& startup_id )
{
if( startup_id == d->startup_id )
return;
@@ -2969,11 +2969,11 @@ int KApplication::random()
return rand();
}
-QString KApplication::randomString(int length)
+TQString KApplication::randomString(int length)
{
- if (length <=0 ) return QString::null;
+ if (length <=0 ) return TQString::null;
- QString str; str.setLength( length );
+ TQString str; str.setLength( length );
int i = 0;
while (length--)
{
@@ -2987,7 +2987,7 @@ QString KApplication::randomString(int length)
return str;
}
-bool KApplication::authorize(const QString &genericAction)
+bool KApplication::authorize(const TQString &genericAction)
{
if (!d->actionRestrictions)
return true;
@@ -3002,12 +3002,12 @@ bool KApplication::authorizeKAction(const char *action)
if (!d->actionRestrictions || !action)
return true;
- static const QString &action_prefix = KGlobal::staticQString( "action/" );
+ static const TQString &action_prefix = KGlobal::staticQString( "action/" );
return authorize(action_prefix + action);
}
-bool KApplication::authorizeControlModule(const QString &menuId)
+bool KApplication::authorizeControlModule(const TQString &menuId)
{
if (menuId.isEmpty() || kde_kiosk_exception)
return true;
@@ -3016,12 +3016,12 @@ bool KApplication::authorizeControlModule(const QString &menuId)
return config->readBoolEntry(menuId, true);
}
-QStringList KApplication::authorizeControlModules(const QStringList &menuIds)
+TQStringList KApplication::authorizeControlModules(const TQStringList &menuIds)
{
KConfig *config = KGlobal::config();
KConfigGroupSaver saver( config, "KDE Control Module Restrictions" );
- QStringList result;
- for(QStringList::ConstIterator it = menuIds.begin();
+ TQStringList result;
+ for(TQStringList::ConstIterator it = menuIds.begin();
it != menuIds.end(); ++it)
{
if (config->readBoolEntry(*it, true))
@@ -3035,67 +3035,67 @@ void KApplication::initUrlActionRestrictions()
d->urlActionRestrictions.setAutoDelete(true);
d->urlActionRestrictions.clear();
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("open", QString::null, QString::null, QString::null, QString::null, QString::null, QString::null, true));
+ ("open", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, true));
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("list", QString::null, QString::null, QString::null, QString::null, QString::null, QString::null, true));
+ ("list", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, true));
// TEST:
// d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
-// ("list", QString::null, QString::null, QString::null, QString::null, QString::null, QString::null, false));
+// ("list", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, false));
// d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
-// ("list", QString::null, QString::null, QString::null, "file", QString::null, QDir::homeDirPath(), true));
+// ("list", TQString::null, TQString::null, TQString::null, "file", TQString::null, TQDir::homeDirPath(), true));
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("link", QString::null, QString::null, QString::null, ":internet", QString::null, QString::null, true));
+ ("link", TQString::null, TQString::null, TQString::null, ":internet", TQString::null, TQString::null, true));
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", QString::null, QString::null, QString::null, ":internet", QString::null, QString::null, true));
+ ("redirect", TQString::null, TQString::null, TQString::null, ":internet", TQString::null, TQString::null, true));
// We allow redirections to file: but not from internet protocols, redirecting to file:
// is very popular among io-slaves and we don't want to break them
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", QString::null, QString::null, QString::null, "file", QString::null, QString::null, true));
+ ("redirect", TQString::null, TQString::null, TQString::null, "file", TQString::null, TQString::null, true));
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", ":internet", QString::null, QString::null, "file", QString::null, QString::null, false));
+ ("redirect", ":internet", TQString::null, TQString::null, "file", TQString::null, TQString::null, false));
// local protocols may redirect everywhere
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", ":local", QString::null, QString::null, QString::null, QString::null, QString::null, true));
+ ("redirect", ":local", TQString::null, TQString::null, TQString::null, TQString::null, TQString::null, true));
// Anyone may redirect to about:
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", QString::null, QString::null, QString::null, "about", QString::null, QString::null, true));
+ ("redirect", TQString::null, TQString::null, TQString::null, "about", TQString::null, TQString::null, true));
// Anyone may redirect to itself, cq. within it's own group
d->urlActionRestrictions.append( new KApplicationPrivate::URLActionRule
- ("redirect", QString::null, QString::null, QString::null, "=", QString::null, QString::null, true));
+ ("redirect", TQString::null, TQString::null, TQString::null, "=", TQString::null, TQString::null, true));
KConfig *config = KGlobal::config();
KConfigGroupSaver saver( config, "KDE URL Restrictions" );
int count = config->readNumEntry("rule_count");
- QString keyFormat = QString("rule_%1");
+ TQString keyFormat = TQString("rule_%1");
for(int i = 1; i <= count; i++)
{
- QString key = keyFormat.arg(i);
- QStringList rule = config->readListEntry(key);
+ TQString key = keyFormat.arg(i);
+ TQStringList rule = config->readListEntry(key);
if (rule.count() != 8)
continue;
- QString action = rule[0];
- QString refProt = rule[1];
- QString refHost = rule[2];
- QString refPath = rule[3];
- QString urlProt = rule[4];
- QString urlHost = rule[5];
- QString urlPath = rule[6];
- QString strEnabled = rule[7].lower();
+ TQString action = rule[0];
+ TQString refProt = rule[1];
+ TQString refHost = rule[2];
+ TQString refPath = rule[3];
+ TQString urlProt = rule[4];
+ TQString urlHost = rule[5];
+ TQString urlPath = rule[6];
+ TQString strEnabled = rule[7].lower();
bool bEnabled = (strEnabled == "true");
if (refPath.startsWith("$HOME"))
- refPath.replace(0, 5, QDir::homeDirPath());
+ refPath.replace(0, 5, TQDir::homeDirPath());
else if (refPath.startsWith("~"))
- refPath.replace(0, 1, QDir::homeDirPath());
+ refPath.replace(0, 1, TQDir::homeDirPath());
if (urlPath.startsWith("$HOME"))
- urlPath.replace(0, 5, QDir::homeDirPath());
+ urlPath.replace(0, 5, TQDir::homeDirPath());
else if (urlPath.startsWith("~"))
- urlPath.replace(0, 1, QDir::homeDirPath());
+ urlPath.replace(0, 1, TQDir::homeDirPath());
if (refPath.startsWith("$TMP"))
refPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp"));
@@ -3107,7 +3107,7 @@ void KApplication::initUrlActionRestrictions()
}
}
-void KApplication::allowURLAction(const QString &action, const KURL &_baseURL, const KURL &_destURL)
+void KApplication::allowURLAction(const TQString &action, const KURL &_baseURL, const KURL &_destURL)
{
if (authorizeURLAction(action, _baseURL, _destURL))
return;
@@ -3117,7 +3117,7 @@ void KApplication::allowURLAction(const QString &action, const KURL &_baseURL, c
_destURL.protocol(), _destURL.host(), _destURL.path(-1), true));
}
-bool KApplication::authorizeURLAction(const QString &action, const KURL &_baseURL, const KURL &_destURL)
+bool KApplication::authorizeURLAction(const TQString &action, const KURL &_baseURL, const KURL &_destURL)
{
if (_destURL.isEmpty())
return true;
@@ -3127,11 +3127,11 @@ bool KApplication::authorizeURLAction(const QString &action, const KURL &_baseUR
initUrlActionRestrictions();
KURL baseURL(_baseURL);
- baseURL.setPath(QDir::cleanDirPath(baseURL.path()));
- QString baseClass = KProtocolInfo::protocolClass(baseURL.protocol());
+ baseURL.setPath(TQDir::cleanDirPath(baseURL.path()));
+ TQString baseClass = KProtocolInfo::protocolClass(baseURL.protocol());
KURL destURL(_destURL);
- destURL.setPath(QDir::cleanDirPath(destURL.path()));
- QString destClass = KProtocolInfo::protocolClass(destURL.protocol());
+ destURL.setPath(TQDir::cleanDirPath(destURL.path()));
+ TQString destClass = KProtocolInfo::protocolClass(destURL.protocol());
for(KApplicationPrivate::URLActionRule *rule = d->urlActionRestrictions.first();
rule; rule = d->urlActionRestrictions.next())
diff --git a/kdecore/kapplication.h b/kdecore/kapplication.h
index ca81bfc51..b7433bc36 100644
--- a/kdecore/kapplication.h
+++ b/kdecore/kapplication.h
@@ -35,8 +35,8 @@ typedef unsigned long Atom;
typedef void Display;
#endif
-#include <qapplication.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqpixmap.h>
#include <kinstance.h>
struct _IceConn;
@@ -59,7 +59,7 @@ class KApplicationPrivate;
*
* This class provides the following services to all KDE applications.
*
-* @li It controls the event queue (see QApplication ).
+* @li It controls the event queue (see TQApplication ).
* @li It provides the application with KDE resources such as
* accelerators, common menu entries, a KConfig object. session
* management events, help invocation etc.
@@ -91,7 +91,7 @@ class KApplicationPrivate;
* @short Controls and provides information to all KDE applications.
* @author Matthias Kalle Dalheimer <kalle@kde.org>
*/
-class KDECORE_EXPORT KApplication : public QApplication, public KInstance
+class KDECORE_EXPORT KApplication : public TQApplication, public KInstance
{
Q_OBJECT
@@ -173,7 +173,7 @@ public:
* @param GUIenabled Set to false to disable all GUI stuff. This implies
* no styles either.
*/
- KApplication(Display *display, int& argc, char** argv, const QCString& rAppName,
+ KApplication(Display *display, int& argc, char** argv, const TQCString& rAppName,
bool allowStyles=true, bool GUIenabled=true);
#endif
@@ -202,7 +202,7 @@ public:
// REMOVE FOR KDE 4.0 - using it only gives crashing applications because
// KCmdLineArgs::init isn't called
KApplication(int& argc, char** argv,
- const QCString& rAppName, bool allowStyles=true, bool GUIenabled=true) KDE_DEPRECATED;
+ const TQCString& rAppName, bool allowStyles=true, bool GUIenabled=true) KDE_DEPRECATED;
/**
* Add Qt and KDE command line options to KCmdLineArgs.
@@ -214,7 +214,7 @@ public:
/**
* Returns the current application object.
*
- * This is similar to the global QApplication pointer qApp. It
+ * This is similar to the global TQApplication pointer qApp. It
* allows access to the single global KApplication object, since
* more than one cannot be created in the same application. It
* saves you the trouble of having to pass the pointer explicitly
@@ -240,7 +240,7 @@ public:
* sessionConfig() contains data saved by a session closedown.
* @see sessionConfig()
*/
- bool isRestored() const { return QApplication::isSessionRestored(); }
+ bool isRestored() const { return TQApplication::isSessionRestored(); }
/**
* Disables session management for this application.
@@ -399,28 +399,28 @@ public:
static void disableAutoDcopRegistration();
/**
- * Returns a QPixmap with the application icon.
+ * Returns a TQPixmap with the application icon.
* @return the application icon
*/
- QPixmap icon() const;
+ TQPixmap icon() const;
/**
* Returns the name of the application icon.
* @return the icon's name
*/
- QString iconName() const;
+ TQString iconName() const;
/**
- * Returns the mini-icon for the application as a QPixmap.
+ * Returns the mini-icon for the application as a TQPixmap.
* @return the application's mini icon
*/
- QPixmap miniIcon() const;
+ TQPixmap miniIcon() const;
/**
* Returns the name of the mini-icon for the application.
* @return the mini icon's name
*/
- QString miniIconName() const;
+ TQString miniIconName() const;
/**
* Sets the top widget of the application.
@@ -432,7 +432,7 @@ public:
*
* @see icon(), caption()
**/
- void setTopWidget( QWidget *topWidget );
+ void setTopWidget( TQWidget *topWidget );
/**
* Invokes the KHelpCenter HTML help viewer from docbook sources.
@@ -446,13 +446,13 @@ public:
* @param startup_id for app startup notification, "0" for none,
* "" ( empty string ) is the default
*/
- void invokeHelp( const QString& anchor,
- const QString& appname,
- const QCString& startup_id ) const;
+ void invokeHelp( const TQString& anchor,
+ const TQString& appname,
+ const TQCString& startup_id ) const;
// KDE4 merge with above with startup_id = ""
- void invokeHelp( const QString& anchor = QString::null,
- const QString& appname = QString::null ) const;
+ void invokeHelp( const TQString& anchor = TQString::null,
+ const TQString& appname = TQString::null ) const;
/**
* @deprecated
@@ -468,19 +468,19 @@ public:
* value will be appended to the filename,
* prefixed with a "#" (hash) character.
*/
- void invokeHTMLHelp( const QString& aFilename, const QString& aTopic = QString::null ) const KDE_DEPRECATED;
+ void invokeHTMLHelp( const TQString& aFilename, const TQString& aTopic = TQString::null ) const KDE_DEPRECATED;
/**
* Convenience method; invokes the standard email application.
*
* @param address The destination address
- * @param subject Subject string. Can be QString::null.
+ * @param subject Subject string. Can be TQString::null.
* @param startup_id for app startup notification, "0" for none,
* "" ( empty string ) is the default
*/
- void invokeMailer( const QString &address, const QString &subject, const QCString& startup_id );
+ void invokeMailer( const TQString &address, const TQString &subject, const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
- void invokeMailer( const QString &address, const QString &subject );
+ void invokeMailer( const TQString &address, const TQString &subject );
/**
* Invokes the standard email application.
@@ -491,9 +491,9 @@ public:
* @param allowAttachments whether attachments specified in mailtoURL should be honoured.
The default is false; do not honour requests for attachments.
*/
- void invokeMailer( const KURL &mailtoURL, const QCString& startup_id, bool allowAttachments );
+ void invokeMailer( const KURL &mailtoURL, const TQCString& startup_id, bool allowAttachments );
// KDE4 merge with above with allowAttachments = false
- void invokeMailer( const KURL &mailtoURL, const QCString& startup_id );
+ void invokeMailer( const KURL &mailtoURL, const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
void invokeMailer( const KURL &mailtoURL );
@@ -512,14 +512,14 @@ public:
* @param startup_id for app startup notification, "0" for none,
* "" ( empty string ) is the default
*/
- void invokeMailer(const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body,
- const QString &messageFile, const QStringList &attachURLs,
- const QCString& startup_id );
+ void invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body,
+ const TQString &messageFile, const TQStringList &attachURLs,
+ const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
- void invokeMailer(const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body,
- const QString &messageFile = QString::null, const QStringList &attachURLs = QStringList());
+ void invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body,
+ const TQString &messageFile = TQString::null, const TQStringList &attachURLs = TQStringList());
public slots:
/**
@@ -532,19 +532,19 @@ public slots:
* @param startup_id for app startup notification, "0" for none,
* "" ( empty string ) is the default
*/
- void invokeBrowser( const QString &url, const QCString& startup_id );
+ void invokeBrowser( const TQString &url, const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
/**
* Invoke the standard browser. Uses a @p startup_id of "" (empty)
* and is otherwise the same as the above function.
*/
- void invokeBrowser( const QString &url );
+ void invokeBrowser( const TQString &url );
/**
* If the widget with focus provides a cut() slot, call that slot. Thus for a
* simple application cut can be implemented as:
* \code
- * KStdAction::cut( kapp, SLOT( cut() ), actionCollection() );
+ * KStdAction::cut( kapp, TQT_SLOT( cut() ), actionCollection() );
* \endcode
*/
void cut();
@@ -553,7 +553,7 @@ public slots:
* If the widget with focus provides a copy() slot, call that slot. Thus for a
* simple application copy can be implemented as:
* \code
- * KStdAction::copy( kapp, SLOT( copy() ), actionCollection() );
+ * KStdAction::copy( kapp, TQT_SLOT( copy() ), actionCollection() );
* \endcode
*/
void copy();
@@ -562,7 +562,7 @@ public slots:
* If the widget with focus provides a paste() slot, call that slot. Thus for a
* simple application copy can be implemented as:
* \code
- * KStdAction::paste( kapp, SLOT( paste() ), actionCollection() );
+ * KStdAction::paste( kapp, TQT_SLOT( paste() ), actionCollection() );
* \endcode
*/
void paste();
@@ -571,7 +571,7 @@ public slots:
* If the widget with focus provides a clear() slot, call that slot. Thus for a
* simple application clear() can be implemented as:
* \code
- * new KAction( i18n( "Clear" ), "editclear", 0, kapp, SLOT( clear() ), actionCollection(), "clear" );
+ * new KAction( i18n( "Clear" ), "editclear", 0, kapp, TQT_SLOT( clear() ), actionCollection(), "clear" );
* \endcode
*
* Note that for some widgets, this may not provide the intended bahavior. For
@@ -585,7 +585,7 @@ public slots:
* class MyListView : public KListView {
* Q_OBJECT
* public:
- * MyListView( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : KListView( parent, name, f ) {}
+ * MyListView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) : KListView( parent, name, f ) {}
* virtual ~MyListView() {}
* public slots:
* virtual void clear() {}
@@ -598,7 +598,7 @@ public slots:
* If the widget with focus provides a selectAll() slot, call that slot. Thus for a
* simple application select all can be implemented as:
* \code
- * KStdAction::selectAll( kapp, SLOT( selectAll() ), actionCollection() );
+ * KStdAction::selectAll( kapp, TQT_SLOT( selectAll() ), actionCollection() );
* \endcode
*/
void selectAll();
@@ -617,7 +617,7 @@ public:
* klaucher_$host_$uid.
* @return the name of the service launcher
*/
- static QCString launcher();
+ static TQCString launcher();
/**
* Starts a service based on the (translated) name of the service.
@@ -639,8 +639,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByName( const QString& _name, const QString &URL,
- QString *error=0, QCString *dcopService=0, int *pid=0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByName( const TQString& _name, const TQString &URL,
+ TQString *error=0, TQCString *dcopService=0, int *pid=0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a service based on the (translated) name of the service.
@@ -662,8 +662,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByName( const QString& _name, const QStringList &URLs=QStringList(),
- QString *error=0, QCString *dcopService=0, int *pid=0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByName( const TQString& _name, const TQStringList &URLs=TQStringList(),
+ TQString *error=0, TQCString *dcopService=0, int *pid=0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a service based on the desktop path of the service.
@@ -685,8 +685,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByDesktopPath( const QString& _name, const QString &URL,
- QString *error=0, QCString *dcopService=0, int *pid = 0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByDesktopPath( const TQString& _name, const TQString &URL,
+ TQString *error=0, TQCString *dcopService=0, int *pid = 0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a service based on the desktop path of the service.
@@ -708,8 +708,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByDesktopPath( const QString& _name, const QStringList &URLs=QStringList(),
- QString *error=0, QCString *dcopService=0, int *pid = 0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByDesktopPath( const TQString& _name, const TQStringList &URLs=TQStringList(),
+ TQString *error=0, TQCString *dcopService=0, int *pid = 0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a service based on the desktop name of the service.
@@ -731,8 +731,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByDesktopName( const QString& _name, const QString &URL,
- QString *error=0, QCString *dcopService=0, int *pid = 0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByDesktopName( const TQString& _name, const TQString &URL,
+ TQString *error=0, TQCString *dcopService=0, int *pid = 0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a service based on the desktop name of the service.
@@ -754,8 +754,8 @@ public:
* @param noWait if set, the function does not wait till the service is running.
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int startServiceByDesktopName( const QString& _name, const QStringList &URLs=QStringList(),
- QString *error=0, QCString *dcopService=0, int *pid = 0, const QCString &startup_id = "", bool noWait = false );
+ static int startServiceByDesktopName( const TQString& _name, const TQStringList &URLs=TQStringList(),
+ TQString *error=0, TQCString *dcopService=0, int *pid = 0, const TQCString &startup_id = "", bool noWait = false );
/**
* Starts a program via kdeinit.
@@ -774,11 +774,11 @@ public:
* "" ( empty string ) is the default
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int kdeinitExec( const QString& name, const QStringList &args,
- QString *error, int *pid, const QCString& startup_id );
+ static int kdeinitExec( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid, const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
- static int kdeinitExec( const QString& name, const QStringList &args=QStringList(),
- QString *error=0, int *pid = 0 );
+ static int kdeinitExec( const TQString& name, const TQStringList &args=TQStringList(),
+ TQString *error=0, int *pid = 0 );
/**
* Starts a program via kdeinit and wait for it to finish.
@@ -797,11 +797,11 @@ public:
* "" ( empty string ) is the default
* @return an error code indicating success (== 0) or failure (> 0).
*/
- static int kdeinitExecWait( const QString& name, const QStringList &args,
- QString *error, int *pid, const QCString& startup_id );
+ static int kdeinitExecWait( const TQString& name, const TQStringList &args,
+ TQString *error, int *pid, const TQCString& startup_id );
// KDE4 merge with above with startup_id = ""
- static int kdeinitExecWait( const QString& name, const QStringList &args=QStringList(),
- QString *error=0, int *pid = 0 );
+ static int kdeinitExecWait( const TQString& name, const TQStringList &args=TQStringList(),
+ TQString *error=0, int *pid = 0 );
/**
* Returns a text for the window caption.
@@ -811,7 +811,7 @@ public:
* executable.
* @return the text for the window caption
*/
- QString caption() const;
+ TQString caption() const;
/**
* @deprecated
@@ -835,7 +835,7 @@ public:
* modified, i.e., it contains data that has not been saved.
* @return the created caption
*/
- QString makeStdCaption( const QString &userCaption,
+ TQString makeStdCaption( const TQString &userCaption,
bool withAppName=true, bool modified=false ) const;
/**
@@ -845,7 +845,7 @@ public:
* document.
* @return A new filename for auto-saving.
*/
- QString tempSaveName( const QString& pFilename ) const;
+ TQString tempSaveName( const TQString& pFilename ) const;
/**
* Check whether an auto-save file exists for the document you want to
@@ -856,7 +856,7 @@ public:
* file.
* @return The full path of the file to open.
*/
- QString checkRecoverFile( const QString& pFilename, bool& bRecover ) const;
+ TQString checkRecoverFile( const TQString& pFilename, bool& bRecover ) const;
#ifdef Q_WS_X11
/**
@@ -888,18 +888,18 @@ public:
* Installs widget filter as global X11 event filter.
*
* The widget
- * filter receives XEvents in its standard QWidget::x11Event() function.
+ * filter receives XEvents in its standard TQWidget::x11Event() function.
*
* Warning: Only do this when absolutely necessary. An installed X11 filter
* can slow things down.
**/
- void installX11EventFilter( QWidget* filter );
+ void installX11EventFilter( TQWidget* filter );
/**
* Removes global X11 event filter previously installed by
* installX11EventFilter().
*/
- void removeX11EventFilter( const QWidget* filter );
+ void removeX11EventFilter( const TQWidget* filter );
/**
* Generates a uniform random number.
@@ -912,7 +912,7 @@ public:
* @param length Generate a string of this length.
* @return the random string
*/
- static QString randomString(int length);
+ static TQString randomString(int length);
/**
* Adds a message type to the KIPC event mask. You can only add "system
@@ -940,7 +940,7 @@ public:
* application.
* @return the startup notification identifier
*/
- QCString startupId() const;
+ TQCString startupId() const;
/**
* @internal
@@ -949,7 +949,7 @@ public:
* @param startup_id the startup notification identifier
* @see KStartupInfo::setNewStartupId
*/
- void setStartupId( const QCString& startup_id );
+ void setStartupId( const TQCString& startup_id );
/**
* Updates the last user action timestamp to the given time, or to the current time,
@@ -974,18 +974,18 @@ public:
* Consult focus stealing prevention section in kdebase/kwin/README.
* @since 3.3
*/
- void updateRemoteUserTimestamp( const QCString& dcopId, unsigned long time = 0 );
+ void updateRemoteUserTimestamp( const TQCString& dcopId, unsigned long time = 0 );
/**
* Returns the argument to --geometry if any, so the geometry can be set
* wherever necessary
- * @return the geometry argument, or QString::null if there is none
+ * @return the geometry argument, or TQString::null if there is none
*/
- QString geometryArgument() const;
+ TQString geometryArgument() const;
/**
* Install a Qt SQL property map with entries for all KDE widgets
- * Call this in any application using KDE widgets in QSqlForm or QDataView.
+ * Call this in any application using KDE widgets in TQSqlForm or TQDataView.
*/
void installKDEPropertyMap();
@@ -994,7 +994,7 @@ public:
* @param genericAction The name of a generic action
* @return true if the action is authorized
*/
- bool authorize(const QString &genericAction);
+ bool authorize(const TQString &genericAction);
/**
* Returns whether a certain KAction is authorized.
@@ -1018,7 +1018,7 @@ public:
* @return true when the action is authorized, false otherwise.
* @since 3.1
*/
- bool authorizeURLAction(const QString &action, const KURL &baseURL, const KURL &destURL);
+ bool authorizeURLAction(const TQString &action, const KURL &baseURL, const KURL &destURL);
/**
* Allow a certain URL action. This can be useful if your application
@@ -1029,7 +1029,7 @@ public:
* @param _destURL The object of the action
* @since 3.2
*/
- void allowURLAction(const QString &action, const KURL &_baseURL, const KURL &_destURL);
+ void allowURLAction(const TQString &action, const KURL &_baseURL, const KURL &_destURL);
/**
* Returns whether access to a certain control module is authorized.
@@ -1038,7 +1038,7 @@ public:
* @return true if access to the module is authorized, false otherwise.
* @since 3.2
*/
- bool authorizeControlModule(const QString &menuId);
+ bool authorizeControlModule(const TQString &menuId);
/**
* Returns whether access to a certain control modules is authorized.
@@ -1048,12 +1048,12 @@ public:
* @return Those control modules for which access has been authorized.
* @since 3.2
*/
- QStringList authorizeControlModules(const QStringList &menuIds);
+ TQStringList authorizeControlModules(const TQStringList &menuIds);
/**
* Returns the state of the currently pressed keyboard modifiers (e.g. shift, control, etc.)
- * and mouse buttons, similarly to QKeyEvent::state() and QMouseEvent::state().
- * You usually should simply use the information provided by QKeyEvent and QMouseEvent,
+ * and mouse buttons, similarly to TQKeyEvent::state() and TQMouseEvent::state().
+ * You usually should simply use the information provided by TQKeyEvent and TQMouseEvent,
* but it can be useful to query for the status of the modifiers at another moment
* (e.g. some KDE apps do that upon a drop event).
* @return the keyboard modifiers and mouse buttons state
@@ -1135,7 +1135,7 @@ protected:
* This method is used internally to determine which edit slots are implemented
* by the widget that has the focus, and to invoke those slots if available.
*
- * @param slot is the slot as returned using the SLOT() macro, for example SLOT( cut() )
+ * @param slot is the slot as returned using the TQT_SLOT() macro, for example TQT_SLOT( cut() )
*
* This method can be used in KApplication subclasses to implement application wide
* edit actions not supported by the KApplication class. For example (in your subclass):
@@ -1143,7 +1143,7 @@ protected:
* \code
* void MyApplication::deselect()
* {
- * invokeEditSlot( SLOT( deselect() ) );
+ * invokeEditSlot( TQT_SLOT( deselect() ) );
* }
* \endcode
*
@@ -1151,7 +1151,7 @@ protected:
* focused widget if it provides this slot. You can combine this with KAction with:
*
* \code
- * KStdAction::deselect( static_cast<MyApplication *>( kapp ), SLOT( cut() ), actionCollection() );
+ * KStdAction::deselect( static_cast<MyApplication *>( kapp ), TQT_SLOT( cut() ), actionCollection() );
* \endcode
*
* @see cut()
@@ -1165,29 +1165,29 @@ protected:
void invokeEditSlot( const char *slot );
private slots:
- void dcopFailure(const QString &);
+ void dcopFailure(const TQString &);
void dcopBlockUserInput( bool );
void x11FilterDestroyed();
void checkAppStartedSlot();
private:
- QString sessionConfigName() const;
+ TQString sessionConfigName() const;
KConfig* pSessionConfig; //instance specific application config object
static DCOPClient *s_DCOPClient; // app specific application communication client
static bool s_dcopClientNeedsPostInit;
- QString aCaption; // the name for the window title
+ TQString aCaption; // the name for the window title
bool bSessionManagement;
- struct oldPixmapType { QPixmap a, b; };
+ struct oldPixmapType { TQPixmap a, b; };
mutable union {
struct {
- QPixmap *icon, *miniIcon;
+ TQPixmap *icon, *miniIcon;
} pm;
char unused[sizeof(oldPixmapType)];
} aIconPixmap; // KDE4: remove me
- QString aIconName;
- QString aMiniIconName;
+ TQString aIconName;
+ TQString aMiniIconName;
bool useStyles;
- QWidget *smw;
+ TQWidget *smw;
void init( bool GUIenabled );
@@ -1203,7 +1203,7 @@ public:
/**
* @internal
*/
- bool notify(QObject *receiver, QEvent *event);
+ bool notify(TQObject *receiver, TQEvent *event);
/**
@internal
@@ -1237,20 +1237,20 @@ public:
SETTINGS_POPUPMENU, SETTINGS_QT, SETTINGS_SHORTCUTS };
/**
- * Used to obtain the QPalette that will be used to set the application palette.
+ * Used to obtain the TQPalette that will be used to set the application palette.
*
* This is only useful for configuration modules such as krdb and should not be
* used in normal circumstances.
* @return the QPalette
* @since 3.1
*/
- static QPalette createApplicationPalette();
+ static TQPalette createApplicationPalette();
/**
* @internal
* Raw access for use by KDM.
*/
- static QPalette createApplicationPalette( KConfig *config, int contrast );
+ static TQPalette createApplicationPalette( KConfig *config, int contrast );
/**
* Installs a handler for the SIGPIPE signal. It is thrown when you write to
@@ -1295,7 +1295,7 @@ signals:
* using explicit fonts.
*
* Note: If you derive from a QWidget-based class, a faster method is to
- * reimplement QWidget::fontChange(). This is the preferred way
+ * reimplement TQWidget::fontChange(). This is the preferred way
* to get informed about font updates.
*/
void kdisplayFontChanged();
@@ -1432,7 +1432,7 @@ private:
* @param mode The access mode, as in the access() system call.
* @return Whether the access is allowed, true = Access allowed
*/
-KDECORE_EXPORT bool checkAccess(const QString& pathname, int mode);
+KDECORE_EXPORT bool checkAccess(const TQString& pathname, int mode);
class KSessionManagedPrivate;
@@ -1441,7 +1441,7 @@ class KSessionManagedPrivate;
base.
KSessionManaged makes it possible to provide implementations for
- QApplication::commitData() and QApplication::saveState(), without
+ TQApplication::commitData() and TQApplication::saveState(), without
subclassing KApplication. KMainWindow internally makes use of this.
You don't need to do anything with this class when using
@@ -1459,7 +1459,7 @@ public:
virtual ~KSessionManaged();
/**
- See QApplication::saveState() for documentation.
+ See TQApplication::saveState() for documentation.
This function is just a convenience version to avoid subclassing KApplication.
@@ -1469,7 +1469,7 @@ public:
*/
virtual bool saveState( QSessionManager& sm );
/**
- See QApplication::commitData() for documentation.
+ See TQApplication::commitData() for documentation.
This function is just a convenience version to avoid subclassing KApplication.
diff --git a/kdecore/kapplication_win.cpp b/kdecore/kapplication_win.cpp
index dea2a3df1..abf0694b4 100644
--- a/kdecore/kapplication_win.cpp
+++ b/kdecore/kapplication_win.cpp
@@ -26,7 +26,7 @@
#include "kappdcopiface.h"
#include <qassistantclient.h>
-#include <qdir.h>
+#include <tqdir.h>
#include "windows.h"
#include "shellapi.h"
@@ -34,7 +34,7 @@
/**
* MS Windows-related actions for KApplication startup.
*
- * - Use Qt translation which will be usable for QFileDialog
+ * - Use Qt translation which will be usable for TQFileDialog
* and other Qt-only GUIs. The "qt_<language>.qm" file should be stored
* in the same place as .po files for a given language.
*
@@ -42,7 +42,7 @@
*/
void KApplication_init_windows(bool /*GUIenabled*/)
{
- QString qt_transl_file = ::locate( "locale", KGlobal::locale()->language()
+ TQString qt_transl_file = ::locate( "locale", KGlobal::locale()->language()
+ "/LC_MESSAGES/qt_" + KGlobal::locale()->language() + ".qm" );
QTranslator *qt_transl = new QTranslator();
if (qt_transl->load( qt_transl_file, ""))
@@ -65,24 +65,24 @@ public:
int refCount;
IceIOErrorHandler oldIceIOErrorHandler;
KCheckAccelerators* checkAccelerators;
- QString overrideStyle;
- QString geometry_arg;
- QCString startup_id;
- QTimer* app_started_timer;
+ TQString overrideStyle;
+ TQString geometry_arg;
+ TQCString startup_id;
+ TQTimer* app_started_timer;
KAppDCOPInterface *m_KAppDCOPInterface;
bool session_save;
QAssistantClient* qassistantclient;
};
-void KApplication::invokeHelp( const QString& anchor,
- const QString& _appname, const QCString& startup_id ) const
+void KApplication::invokeHelp( const TQString& anchor,
+ const TQString& _appname, const TQCString& startup_id ) const
{
if (!d->qassistantclient) {
d->qassistantclient = new QAssistantClient(
KStandardDirs::findExe( "assistant" ), 0);
- QStringList args;
+ TQStringList args;
args << "-profile";
- args << QDir::convertSeparators( locate("html", QString(name())+"/"+QString(name())+".adp") );
+ args << TQDir::convertSeparators( locate("html", TQString(name())+"/"+TQString(name())+".adp") );
d->qassistantclient->setArguments(args);
}
d->qassistantclient->openAssistant();
@@ -90,27 +90,27 @@ void KApplication::invokeHelp( const QString& anchor,
// on win32, for invoking browser we're using win32 API
// see kapplication_win.cpp
-void KApplication::invokeBrowser( const QString &url, const QCString& startup_id )
+void KApplication::invokeBrowser( const TQString &url, const TQCString& startup_id )
{
- QCString s = url.latin1();
+ TQCString s = url.latin1();
const unsigned short *l = (const unsigned short *)s.data();
ShellExecuteA(0, "open", s.data(), 0, 0, SW_NORMAL);
}
-void KApplication::invokeMailer(const QString &to, const QString &cc, const QString &bcc,
- const QString &subject, const QString &body,
- const QString & /*messageFile TODO*/, const QStringList &attachURLs,
- const QCString& startup_id )
+void KApplication::invokeMailer(const TQString &to, const TQString &cc, const TQString &bcc,
+ const TQString &subject, const TQString &body,
+ const TQString & /*messageFile TODO*/, const TQStringList &attachURLs,
+ const TQCString& startup_id )
{
KURL url("mailto:"+to);
url.setQuery("?subject="+subject);
url.addQueryItem("cc", cc);
url.addQueryItem("bcc", bcc);
url.addQueryItem("body", body);
- for (QStringList::ConstIterator it = attachURLs.constBegin(); it != attachURLs.constEnd(); ++it)
+ for (TQStringList::ConstIterator it = attachURLs.constBegin(); it != attachURLs.constEnd(); ++it)
url.addQueryItem("attach", KURL::encode_string(*it));
- QCString s = url.url().latin1();
+ TQCString s = url.url().latin1();
const unsigned short *l = (const unsigned short *)s.data();
ShellExecuteA(0, "open", s.data(), 0, 0, SW_NORMAL);
}
diff --git a/kdecore/kasyncio.h b/kdecore/kasyncio.h
index c1c3e9a11..a96e30cd8 100644
--- a/kdecore/kasyncio.h
+++ b/kdecore/kasyncio.h
@@ -21,8 +21,8 @@
#define KASYNCIO_H
-#include <qobject.h>
-#include <qiodevice.h>
+#include <tqobject.h>
+#include <tqiodevice.h>
#include "kdelibs_export.h"
class KAsyncIOPrivate;
@@ -30,12 +30,12 @@ class KAsyncIOPrivate;
* Asynchronous I/O Support
*
* This abstract class provides basic functionality for asynchronous I/O
- * support on top of QIODevice.
+ * support on top of TQIODevice.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
* @short Asynchronous I/O support
*/
-class KDECORE_EXPORT KAsyncIO: public QObject, public QIODevice
+class KDECORE_EXPORT KAsyncIO: public TQObject, public QIODevice
{
Q_OBJECT
protected:
diff --git a/kdecore/kaudioplayer.cpp b/kdecore/kaudioplayer.cpp
index c14b7334b..0dae392c9 100644
--- a/kdecore/kaudioplayer.cpp
+++ b/kdecore/kaudioplayer.cpp
@@ -25,13 +25,13 @@
class KAudioPlayerPrivate {
public:
- QString filename;
+ TQString filename;
- KAudioPlayerPrivate(const QString &filename) : filename(filename) { }
+ KAudioPlayerPrivate(const TQString &filename) : filename(filename) { }
};
-KAudioPlayer::KAudioPlayer( const QString& filename,
- QObject* parent, const char* name ) : QObject(parent,name)
+KAudioPlayer::KAudioPlayer( const TQString& filename,
+ TQObject* parent, const char* name ) : TQObject(parent,name)
{
d = new KAudioPlayerPrivate(filename);
}
@@ -41,7 +41,7 @@ KAudioPlayer::~KAudioPlayer()
delete d;
}
-void KAudioPlayer::play(const QString &filename)
+void KAudioPlayer::play(const TQString &filename)
{
KAudioPlayer ap(filename);
ap.play();
diff --git a/kdecore/kaudioplayer.h b/kdecore/kaudioplayer.h
index bf77aeb59..81ca2cdf7 100644
--- a/kdecore/kaudioplayer.h
+++ b/kdecore/kaudioplayer.h
@@ -23,7 +23,7 @@
#ifndef __KAUDIOPLAYER_H__
#define __KAUDIOPLAYER_H__
-#include <qobject.h>
+#include <tqobject.h>
#include "kdelibs_export.h"
class KAudioPlayerPrivate;
@@ -48,23 +48,23 @@ class KAudioPlayerPrivate;
*
* \code
* KAudioPlayer player("/var/share/foo.wav");
- * connect(&button, SIGNAL(clicked()), &player, SLOT(play()));
+ * connect(&button, TQT_SIGNAL(clicked()), &player, TQT_SLOT(play()));
* \endcode
*
*/
//REVISED: hausmann
-class KDECORE_EXPORT KAudioPlayer : public QObject {
+class KDECORE_EXPORT KAudioPlayer : public TQObject {
Q_OBJECT
public:
/**
* Constructor.
*
* @param filename Absolute path to the filename of the sound file to play
- * @param parent A parent QObject for this KAudioPlayer
+ * @param parent A parent TQObject for this KAudioPlayer
* @param name An internal name for this KAudioPlayer
*/
- KAudioPlayer( const QString& filename,
- QObject* parent = 0, const char* name = 0 );
+ KAudioPlayer( const TQString& filename,
+ TQObject* parent = 0, const char* name = 0 );
/**
* Destructor.
@@ -77,7 +77,7 @@ public:
* @param filename Absolute path to the filename of the sound file to play.
* if not absolute, goes off KDEDIR/share/sounds/ (preferred)
*/
- static void play(const QString &filename);
+ static void play(const TQString &filename);
public slots:
/**
diff --git a/kdecore/kbufferedio.cpp b/kdecore/kbufferedio.cpp
index 1c46e4f05..5b9e66dce 100644
--- a/kdecore/kbufferedio.cpp
+++ b/kdecore/kbufferedio.cpp
@@ -22,8 +22,8 @@
#include <string.h>
-#include <qptrlist.h>
-#include <qcstring.h>
+#include <tqptrlist.h>
+#include <tqcstring.h>
#include "kbufferedio.h"
/**
@@ -39,7 +39,7 @@
* simply QByteArrays. The idea is that, instead of having one large, contiguous
* buffer area, we have several small ones. Even though this could be seen as
* a waste of memory, it makes our life easier, because we can just append a new
- * QByteArray to the list and not have to worry with copying the rest of the
+ * TQByteArray to the list and not have to worry with copying the rest of the
* buffer, should we need to expand.
*
* This way, we have the capability of unlimited buffering, which can grow to
@@ -47,7 +47,7 @@
*
* For each buffer, we provide three kinds of functions, available as protected
* members: consume, feed and size. The size functions calculate the current
- * size of the buffer, by adding each individual QByteArray size. The feed
+ * size of the buffer, by adding each individual TQByteArray size. The feed
* functions are used by the I/O functions that receive data from somewhere,
* i.e., from the system, in the case of the input buffer, and from the user,
* in the case of the output buffer. These two functions are used to give
@@ -73,11 +73,11 @@
*
* Both buffers work in the same way: they're an "array" of buffers, each
* concatenated to the other. All data in all buffers is valid data, except
- * for the first QByteArray, whose valid data starts at inBufIndex/outBufIndex
- * bytes from the start. That is, the data starts in the first QByteArray buffer
+ * for the first TQByteArray, whose valid data starts at inBufIndex/outBufIndex
+ * bytes from the start. That is, the data starts in the first TQByteArray buffer
* that many bytes from the start and goes on contiguously until the last
- * QByteArray. This has been decided like that because we didn't want to
- * create a new QByteArray of the remaining bytes in the first buffer, after
+ * TQByteArray. This has been decided like that because we didn't want to
+ * create a new TQByteArray of the remaining bytes in the first buffer, after
* a consume operation, because that could take some time. It is faster
* this way, although not really easy.
*
@@ -127,10 +127,10 @@ bool KBufferedIO::canReadLine() const
if (bytesAvailable() == 0)
return false; // no new line in here
- QByteArray* buf;
+ TQByteArray* buf;
- // scan each QByteArray for the occurrence of '\n'
- QPtrList<QByteArray> &buflist = ((KBufferedIO*)this)->inBuf;
+ // scan each TQByteArray for the occurrence of '\n'
+ TQPtrList<TQByteArray> &buflist = ((KBufferedIO*)this)->inBuf;
buf = buflist.first();
char *p = buf->data() + inBufIndex;
int n = buf->size() - inBufIndex;
@@ -169,7 +169,7 @@ unsigned KBufferedIO::consumeReadBuffer(unsigned nbytes, char *destbuffer, bool
nbytes = u; // we can't consume more than there is
}
- QByteArray *buf;
+ TQByteArray *buf;
unsigned copied = 0;
unsigned index = inBufIndex;
@@ -213,7 +213,7 @@ unsigned KBufferedIO::consumeReadBuffer(unsigned nbytes, char *destbuffer, bool
void KBufferedIO::consumeWriteBuffer(unsigned nbytes)
{
- QByteArray *buf = outBuf.first();
+ TQByteArray *buf = outBuf.first();
if (buf == NULL)
return; // nothing to consume
@@ -245,7 +245,7 @@ unsigned KBufferedIO::feedReadBuffer(unsigned nbytes, const char *buffer, bool a
if (nbytes == 0)
return 0;
- QByteArray *a = new QByteArray(nbytes);
+ TQByteArray *a = new TQByteArray(nbytes);
a->duplicate(buffer, nbytes);
if (atBeginning)
@@ -261,7 +261,7 @@ unsigned KBufferedIO::feedWriteBuffer(unsigned nbytes, const char *buffer)
if (nbytes == 0)
return 0;
- QByteArray *a = new QByteArray(nbytes);
+ TQByteArray *a = new TQByteArray(nbytes);
a->duplicate(buffer, nbytes);
outBuf.append(a);
return nbytes;
@@ -270,7 +270,7 @@ unsigned KBufferedIO::feedWriteBuffer(unsigned nbytes, const char *buffer)
unsigned KBufferedIO::readBufferSize() const
{
unsigned count = 0;
- QByteArray *buf = ((KBufferedIO*)this)->inBuf.first();
+ TQByteArray *buf = ((KBufferedIO*)this)->inBuf.first();
while (buf != NULL)
{
count += buf->size();
@@ -283,7 +283,7 @@ unsigned KBufferedIO::readBufferSize() const
unsigned KBufferedIO::writeBufferSize() const
{
unsigned count = 0;
- QByteArray *buf = ((KBufferedIO*)this)->outBuf.first();
+ TQByteArray *buf = ((KBufferedIO*)this)->outBuf.first();
while (buf != NULL)
{
count += buf->size();
diff --git a/kdecore/kbufferedio.h b/kdecore/kbufferedio.h
index 47579738d..b020663eb 100644
--- a/kdecore/kbufferedio.h
+++ b/kdecore/kbufferedio.h
@@ -21,8 +21,8 @@
#ifndef KBUFFEREDIO_H
#define KBUFFEREDIO_H
-#include <qcstring.h>
-#include <qptrlist.h>
+#include <tqcstring.h>
+#include <tqptrlist.h>
#include "kasyncio.h"
class KBufferedIOPrivate;
@@ -34,7 +34,7 @@ class KBufferedIOPrivate;
* available for reading, how many are still unsent and you can peek at
* the buffered data.
*
- * This class was intentionally written to resemble QSocket, because
+ * This class was intentionally written to resemble TQSocket, because
* KExtendedSocket is a subclass of this one. This is so that applications
* written using QSocket's buffering characteristics will be more easily
* ported to the more powerful KExtendedSocket class.
@@ -42,7 +42,7 @@ class KBufferedIOPrivate;
* KBufferedIO already provides a powerful internal buffering algorithm. However,
* this does not include the I/O itself, which must be implemented in
* derived classes. Thus, to implement a class that does some I/O, you must
- * override, in addition to the pure virtual QIODevice methods, these two:
+ * override, in addition to the pure virtual TQIODevice methods, these two:
* @li closeNow()
* @li waitForMore()
*
@@ -84,8 +84,8 @@ public:
* Closes the stream now, discarding the contents of the
* write buffer. That is, we won't try to flush that
* buffer before closing. If you want that buffer to be
- * flushed, you can call QIODevice::flush(), which is blocking, and
- * then closeNow, or you can call QIODevice::close() for a delayed
+ * flushed, you can call TQIODevice::flush(), which is blocking, and
+ * then closeNow, or you can call TQIODevice::close() for a delayed
* close.
*/
virtual void closeNow() = 0;
@@ -209,13 +209,13 @@ protected:
* For an explanation on how this buffer work, please refer to the comments
* at the top of kbufferedio.cpp, @ref impldetails .
*/
- QPtrList<QByteArray> inBuf;
+ TQPtrList<TQByteArray> inBuf;
/**
* For an explanation on how this buffer work, please refer to the comments
* at the top of kbufferedio.cpp, @ref impldetails .
*/
- QPtrList<QByteArray> outBuf;
+ TQPtrList<TQByteArray> outBuf;
unsigned inBufIndex /** Offset into first input buffer. */,
outBufIndex /** Offset into first output buffer. */ ;
diff --git a/kdecore/kcalendarsystem.cpp b/kdecore/kcalendarsystem.cpp
index 150dbda1b..57898da84 100644
--- a/kdecore/kcalendarsystem.cpp
+++ b/kdecore/kcalendarsystem.cpp
@@ -52,9 +52,9 @@ const KLocale * KCalendarSystem::locale() const
return KGlobal::locale();
}
-QString KCalendarSystem::dayString(const QDate & pDate, bool bShort) const
+TQString KCalendarSystem::dayString(const TQDate & pDate, bool bShort) const
{
- QString sResult;
+ TQString sResult;
sResult.setNum(day(pDate));
if (!bShort && sResult.length() == 1 )
@@ -63,9 +63,9 @@ QString KCalendarSystem::dayString(const QDate & pDate, bool bShort) const
return sResult;
}
-QString KCalendarSystem::monthString(const QDate & pDate, bool bShort) const
+TQString KCalendarSystem::monthString(const TQDate & pDate, bool bShort) const
{
- QString sResult;
+ TQString sResult;
sResult.setNum(month(pDate));
if (!bShort && sResult.length() == 1 )
@@ -74,9 +74,9 @@ QString KCalendarSystem::monthString(const QDate & pDate, bool bShort) const
return sResult;
}
-QString KCalendarSystem::yearString(const QDate & pDate, bool bShort) const
+TQString KCalendarSystem::yearString(const TQDate & pDate, bool bShort) const
{
- QString sResult;
+ TQString sResult;
sResult.setNum(year(pDate));
if (bShort && sResult.length() == 4 )
@@ -85,7 +85,7 @@ QString KCalendarSystem::yearString(const QDate & pDate, bool bShort) const
return sResult;
}
-static int stringToInteger(const QString & sNum, int & iLength)
+static int stringToInteger(const TQString & sNum, int & iLength)
{
unsigned int iPos = 0;
@@ -101,22 +101,22 @@ static int stringToInteger(const QString & sNum, int & iLength)
}
-int KCalendarSystem::dayStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystem::dayStringToInteger(const TQString & sNum, int & iLength) const
{
return stringToInteger(sNum, iLength);
}
-int KCalendarSystem::monthStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystem::monthStringToInteger(const TQString & sNum, int & iLength) const
{
return stringToInteger(sNum, iLength);
}
-int KCalendarSystem::yearStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystem::yearStringToInteger(const TQString & sNum, int & iLength) const
{
return stringToInteger(sNum, iLength);
}
-QString KCalendarSystem::weekDayName (int weekDay, bool shortName) const
+TQString KCalendarSystem::weekDayName (int weekDay, bool shortName) const
{
if ( shortName )
switch ( weekDay )
@@ -141,6 +141,6 @@ QString KCalendarSystem::weekDayName (int weekDay, bool shortName) const
case 7: return locale()->translate("Sunday");
}
- return QString::null;
+ return TQString::null;
}
diff --git a/kdecore/kcalendarsystem.h b/kdecore/kcalendarsystem.h
index a2740492e..826539a65 100644
--- a/kdecore/kcalendarsystem.h
+++ b/kdecore/kcalendarsystem.h
@@ -21,8 +21,8 @@
#ifndef KCALENDARSYSTEM_H
#define KCALENDARSYSTEM_H
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
class KLocale;
@@ -60,7 +60,7 @@ public:
* @param date gregorian date
* @return year
*/
- virtual int year (const QDate & date) const = 0;
+ virtual int year (const TQDate & date) const = 0;
/**
* Converts a date into a year literal
@@ -69,7 +69,7 @@ public:
* @param bShort If the short version of should be used
* @return The year literal of the date
*/
- virtual QString yearString(const QDate & pDate, bool bShort) const;
+ virtual TQString yearString(const TQDate & pDate, bool bShort) const;
/**
* Converts a year literal of a part of a string into a integer starting at the beginning of the string
@@ -78,7 +78,7 @@ public:
* @param iLength The number of QChars used, and 0 if no valid symbols was found in the string
* @return An integer corresponding to the year
*/
- virtual int yearStringToInteger(const QString & sNum, int & iLength) const;
+ virtual int yearStringToInteger(const TQString & sNum, int & iLength) const;
/**
* Gets specific calendar type month for a given gregorian date
@@ -86,7 +86,7 @@ public:
* @param date gregorian date
* @return month number
*/
- virtual int month (const QDate & date) const = 0;
+ virtual int month (const TQDate & date) const = 0;
/**
* Converts a date into a month literal
@@ -95,7 +95,7 @@ public:
* @param bShort If the short version of should be used
* @return The month literal of the date
*/
- virtual QString monthString(const QDate & pDate, bool bShort) const;
+ virtual TQString monthString(const TQDate & pDate, bool bShort) const;
/**
* Converts a month literal of a part of a string into a integer starting at the beginning of the string
@@ -104,7 +104,7 @@ public:
* @param iLength The number of QChars used, and 0 if no valid symbols was found in the string
* @return An integer corresponding to the month
*/
- virtual int monthStringToInteger(const QString & sNum, int & iLength) const;
+ virtual int monthStringToInteger(const TQString & sNum, int & iLength) const;
/**
* Gets specific calendar type day number of month for a given date
@@ -112,7 +112,7 @@ public:
* @param date gregorian date equivalent to the specific one
* @return day of the month
*/
- virtual int day (const QDate & date) const = 0;
+ virtual int day (const TQDate & date) const = 0;
/**
* Converts a date into a day literal
@@ -121,7 +121,7 @@ public:
* @param bShort If the short version of should be used
* @return The day literal of the date
*/
- virtual QString dayString(const QDate & pDate, bool bShort) const;
+ virtual TQString dayString(const TQDate & pDate, bool bShort) const;
/**
* Converts a day literal of a part of a string into a integer starting at the beginning of the string
@@ -130,7 +130,7 @@ public:
* @param iLength The number of QChars used, and 0 if no valid symbols was found in the string
* @return An integer corresponding to the day
*/
- virtual int dayStringToInteger(const QString & sNum, int & iLength) const;
+ virtual int dayStringToInteger(const TQString & sNum, int & iLength) const;
/**
* Gets specific calendar type number of day of week number for a given
@@ -139,7 +139,7 @@ public:
* @param date gregorian date
* @return day of week
*/
- virtual int dayOfWeek (const QDate & date) const = 0;
+ virtual int dayOfWeek (const TQDate & date) const = 0;
/**
* Gets specific calendar type day number of year for a given date
@@ -147,7 +147,7 @@ public:
* @param date gregorian date equivalent to the specific one
* @return day number
*/
- virtual int dayOfYear (const QDate & date) const = 0;
+ virtual int dayOfYear (const TQDate & date) const = 0;
/**
* Changes the date's year, month and day. The range of the year, month
@@ -159,34 +159,34 @@ public:
* @param d Day of month
* @return true if the date is valid; otherwise returns false.
*/
- virtual bool setYMD(QDate & date, int y, int m, int d) const = 0;
+ virtual bool setYMD(TQDate & date, int y, int m, int d) const = 0;
/**
- * Returns a QDate object containing a date nyears later.
+ * Returns a TQDate object containing a date nyears later.
*
* @param date The old date
* @param nyears The number of years to add
* @return The new date
*/
- virtual QDate addYears(const QDate & date, int nyears) const = 0;
+ virtual TQDate addYears(const TQDate & date, int nyears) const = 0;
/**
- * Returns a QDate object containing a date nmonths later.
+ * Returns a TQDate object containing a date nmonths later.
*
* @param date The old date
* @param nmonths The number of months to add
* @return The new date
*/
- virtual QDate addMonths(const QDate & date, int nmonths) const = 0;
+ virtual TQDate addMonths(const TQDate & date, int nmonths) const = 0;
/**
- * Returns a QDate object containing a date ndays later.
+ * Returns a TQDate object containing a date ndays later.
*
* @param date The old date
* @param ndays The number of days to add
* @return The new date
*/
- virtual QDate addDays(const QDate & date, int ndays) const = 0;
+ virtual TQDate addDays(const TQDate & date, int ndays) const = 0;
/**
* Gets specific calendar type number of month for a given year
@@ -194,7 +194,7 @@ public:
* @param date The date whose year to use
* @return The number of months in that year
*/
- virtual int monthsInYear (const QDate & date) const = 0;
+ virtual int monthsInYear (const TQDate & date) const = 0;
/**
* Gets the number of days in date whose years specified.
@@ -202,7 +202,7 @@ public:
* @param date Gregorian date equivalent to the specific one
* @return The number of days in year
*/
- virtual int daysInYear (const QDate & date) const = 0;
+ virtual int daysInYear (const TQDate & date) const = 0;
/**
* Gets specific calendar type number of days in month for a given date
@@ -210,7 +210,7 @@ public:
* @param date gregorian date
* @return number of days for month in date
*/
- virtual int daysInMonth (const QDate & date) const = 0;
+ virtual int daysInMonth (const TQDate & date) const = 0;
/**
* Gets the number of weeks in a specified year
@@ -227,18 +227,18 @@ public:
* @param yearNum The year the date belongs to
* @return week number
*/
- virtual int weekNumber(const QDate& date, int * yearNum = 0) const = 0;
+ virtual int weekNumber(const TQDate& date, int * yearNum = 0) const = 0;
/**
* Gets specific calendar type month name for a given month number
- * If an invalid month is specified, QString::null is returned.
+ * If an invalid month is specified, TQString::null is returned.
*
* @param month The month number
* @param year The year the month belongs to
* @param shortName Specifies if the short month name should be used
* @return The name of the month
*/
- virtual QString monthName (int month, int year, bool shortName = false) const = 0;
+ virtual TQString monthName (int month, int year, bool shortName = false) const = 0;
/**
* Gets specific calendar type month name for a given gregorian date
@@ -247,13 +247,13 @@ public:
* @param shortName Specifies if the short month name should be used
* @return The name of the month
*/
- virtual QString monthName (const QDate & date, bool shortName = false ) const = 0;
+ virtual TQString monthName (const TQDate & date, bool shortName = false ) const = 0;
/**
* Returns a string containing the possessive form of the month name.
* ("of January", "of February", etc.)
* It's needed in long format dates in some languages.
- * If an invalid month is specified, QString::null is returned.
+ * If an invalid month is specified, TQString::null is returned.
*
* @param month The month number
* @param year The year the month belongs to
@@ -261,7 +261,7 @@ public:
*
* @return The possessive form of the name of the month
*/
- virtual QString monthNamePossessive(int month, int year, bool shortName = false) const = 0;
+ virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const = 0;
/**
* Returns a string containing the possessive form of the month name.
@@ -273,17 +273,17 @@ public:
*
* @return The possessive form of the name of the month
*/
- virtual QString monthNamePossessive(const QDate & date, bool shortName = false) const = 0;
+ virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false) const = 0;
/**
* Gets specific calendar type week day name
- * If an invalid week day is specified, QString::null is returned.
+ * If an invalid week day is specified, TQString::null is returned.
*
* @param weekDay number of day in week (1 -> Monday)
* @param shortName short or complete day name
* @return day name
*/
- virtual QString weekDayName (int weekDay, bool shortName = false) const = 0;
+ virtual TQString weekDayName (int weekDay, bool shortName = false) const = 0;
/**
* Gets specific calendar type week day name
@@ -292,7 +292,7 @@ public:
* @param shortName short or complete day name
* @return day name
*/
- virtual QString weekDayName (const QDate & date, bool shortName = false) const = 0;
+ virtual TQString weekDayName (const TQDate & date, bool shortName = false) const = 0;
/**
* Gets the first year value supported by specific calendar type
@@ -304,7 +304,7 @@ public:
/**
* Gets the maximum year value supported by specific calendar type
- * algorithms (QDate, 8000)
+ * algorithms (TQDate, 8000)
*
* @return maximum year supported
*/
@@ -320,7 +320,7 @@ public:
/**
* Gets the string representing the calendar
*/
- virtual QString calendarName() const = 0;
+ virtual TQString calendarName() const = 0;
/**
* Gets if the calendar is lunar based
diff --git a/kdecore/kcalendarsystemfactory.cpp b/kdecore/kcalendarsystemfactory.cpp
index 28c3a6bfa..723873497 100644
--- a/kdecore/kcalendarsystemfactory.cpp
+++ b/kdecore/kcalendarsystemfactory.cpp
@@ -40,7 +40,7 @@ KCalendarSystemFactory::~KCalendarSystemFactory()
{
}
-KCalendarSystem *KCalendarSystemFactory::create( const QString &calType,
+KCalendarSystem *KCalendarSystemFactory::create( const TQString &calType,
const KLocale * locale )
{
if ( calType == "hebrew" )
@@ -58,9 +58,9 @@ KCalendarSystem *KCalendarSystemFactory::create( const QString &calType,
return new KCalendarSystemGregorian(locale);
}
-QStringList KCalendarSystemFactory::calendarSystems()
+TQStringList KCalendarSystemFactory::calendarSystems()
{
- QStringList lst;
+ TQStringList lst;
lst.append("hebrew");
lst.append("hijri");
lst.append("gregorian");
diff --git a/kdecore/kcalendarsystemfactory.h b/kdecore/kcalendarsystemfactory.h
index ea41e156e..ec68124d7 100644
--- a/kdecore/kcalendarsystemfactory.h
+++ b/kdecore/kcalendarsystemfactory.h
@@ -21,8 +21,8 @@
#ifndef KCALENDARSYSTEMFACTORY_H
#define KCALENDARSYSTEMFACTORY_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kdelibs_export.h"
class KCalendarSystem;
@@ -49,15 +49,15 @@ public:
* 0 is specified.
* @return a KCalendarSystem object
*/
- static KCalendarSystem *create (const QString & calType = QString::fromLatin1("gregorian"),
+ static KCalendarSystem *create (const TQString & calType = TQString::fromLatin1("gregorian"),
const KLocale * locale = 0);
/**
* Gets list of names of supported calendar systems
*
- * @return A QStringList object
+ * @return A TQStringList object
*/
- static QStringList calendarSystems();
+ static TQStringList calendarSystems();
private:
};
diff --git a/kdecore/kcalendarsystemgregorian.cpp b/kdecore/kcalendarsystemgregorian.cpp
index 9df2a70a1..26a366fd6 100644
--- a/kdecore/kcalendarsystemgregorian.cpp
+++ b/kdecore/kcalendarsystemgregorian.cpp
@@ -21,8 +21,8 @@
// Derived gregorian kde calendar class
// Just a schema.
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,12 +38,12 @@ KCalendarSystemGregorian::~KCalendarSystemGregorian()
{
}
-int KCalendarSystemGregorian::year(const QDate& date) const
+int KCalendarSystemGregorian::year(const TQDate& date) const
{
return date.year();
}
-int KCalendarSystemGregorian::monthsInYear( const QDate & date ) const
+int KCalendarSystemGregorian::monthsInYear( const TQDate & date ) const
{
Q_UNUSED( date )
@@ -52,7 +52,7 @@ int KCalendarSystemGregorian::monthsInYear( const QDate & date ) const
int KCalendarSystemGregorian::weeksInYear(int year) const
{
- QDate temp;
+ TQDate temp;
temp.setYMD(year, 12, 31);
// If the last day of the year is in the first week, we have to check the
@@ -63,24 +63,24 @@ int KCalendarSystemGregorian::weeksInYear(int year) const
return temp.weekNumber();
}
-int KCalendarSystemGregorian::weekNumber(const QDate& date,
+int KCalendarSystemGregorian::weekNumber(const TQDate& date,
int * yearNum) const
{
return date.weekNumber(yearNum);
}
-QString KCalendarSystemGregorian::monthName(const QDate& date,
+TQString KCalendarSystemGregorian::monthName(const TQDate& date,
bool shortName) const
{
return monthName(month(date), year(date), shortName);
}
-QString KCalendarSystemGregorian::monthNamePossessive(const QDate& date, bool shortName) const
+TQString KCalendarSystemGregorian::monthNamePossessive(const TQDate& date, bool shortName) const
{
return monthNamePossessive(month(date), year(date), shortName);
}
-QString KCalendarSystemGregorian::monthName(int month, int year, bool shortName) const
+TQString KCalendarSystemGregorian::monthName(int month, int year, bool shortName) const
{
Q_UNUSED(year);
@@ -141,10 +141,10 @@ QString KCalendarSystemGregorian::monthName(int month, int year, bool shortName)
return locale()->translate("December");
}
- return QString::null;
+ return TQString::null;
}
-QString KCalendarSystemGregorian::monthNamePossessive(int month, int year,
+TQString KCalendarSystemGregorian::monthNamePossessive(int month, int year,
bool shortName) const
{
Q_UNUSED(year);
@@ -206,35 +206,35 @@ QString KCalendarSystemGregorian::monthNamePossessive(int month, int year,
return locale()->translate("of December");
}
- return QString::null;
+ return TQString::null;
}
-bool KCalendarSystemGregorian::setYMD(QDate & date, int y, int m, int d) const
+bool KCalendarSystemGregorian::setYMD(TQDate & date, int y, int m, int d) const
{
// We don't want Qt to add 1900 to them
if ( y >= 0 && y <= 99 )
return false;
- // QDate supports gregorian internally
+ // TQDate supports gregorian internally
return date.setYMD(y, m, d);
}
-QDate KCalendarSystemGregorian::addYears(const QDate & date, int nyears) const
+TQDate KCalendarSystemGregorian::addYears(const TQDate & date, int nyears) const
{
return date.addYears(nyears);
}
-QDate KCalendarSystemGregorian::addMonths(const QDate & date, int nmonths) const
+TQDate KCalendarSystemGregorian::addMonths(const TQDate & date, int nmonths) const
{
return date.addMonths(nmonths);
}
-QDate KCalendarSystemGregorian::addDays(const QDate & date, int ndays) const
+TQDate KCalendarSystemGregorian::addDays(const TQDate & date, int ndays) const
{
return date.addDays(ndays);
}
-QString KCalendarSystemGregorian::weekDayName(int col, bool shortName) const
+TQString KCalendarSystemGregorian::weekDayName(int col, bool shortName) const
{
// ### Should this really be different to each calendar system? Or are we
// only going to support weeks with 7 days?
@@ -242,48 +242,48 @@ QString KCalendarSystemGregorian::weekDayName(int col, bool shortName) const
return KCalendarSystem::weekDayName(col, shortName);
}
-QString KCalendarSystemGregorian::weekDayName(const QDate& date, bool shortName) const
+TQString KCalendarSystemGregorian::weekDayName(const TQDate& date, bool shortName) const
{
return weekDayName(dayOfWeek(date), shortName);
}
-int KCalendarSystemGregorian::dayOfWeek(const QDate& date) const
+int KCalendarSystemGregorian::dayOfWeek(const TQDate& date) const
{
return date.dayOfWeek();
}
-int KCalendarSystemGregorian::dayOfYear(const QDate & date) const
+int KCalendarSystemGregorian::dayOfYear(const TQDate & date) const
{
return date.dayOfYear();
}
-int KCalendarSystemGregorian::daysInMonth(const QDate& date) const
+int KCalendarSystemGregorian::daysInMonth(const TQDate& date) const
{
return date.daysInMonth();
}
int KCalendarSystemGregorian::minValidYear() const
{
- return 1753; // QDate limit
+ return 1753; // TQDate limit
}
int KCalendarSystemGregorian::maxValidYear() const
{
- return 8000; // QDate limit
+ return 8000; // TQDate limit
}
-int KCalendarSystemGregorian::day(const QDate& date) const
+int KCalendarSystemGregorian::day(const TQDate& date) const
{
return date.day();
}
-int KCalendarSystemGregorian::month(const QDate& date) const
+int KCalendarSystemGregorian::month(const TQDate& date) const
{
return date.month();
}
-int KCalendarSystemGregorian::daysInYear(const QDate& date) const
+int KCalendarSystemGregorian::daysInYear(const TQDate& date) const
{
return date.daysInYear();
}
@@ -293,9 +293,9 @@ int KCalendarSystemGregorian::weekDayOfPray() const
return 7; // sunday
}
-QString KCalendarSystemGregorian::calendarName() const
+TQString KCalendarSystemGregorian::calendarName() const
{
- return QString::fromLatin1("gregorian");
+ return TQString::fromLatin1("gregorian");
}
bool KCalendarSystemGregorian::isLunar() const
@@ -313,7 +313,7 @@ bool KCalendarSystemGregorian::isSolar() const
return true;
}
-int KCalendarSystemGregorian::yearStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystemGregorian::yearStringToInteger(const TQString & sNum, int & iLength) const
{
int iYear;
iYear = KCalendarSystem::yearStringToInteger(sNum, iLength);
diff --git a/kdecore/kcalendarsystemgregorian.h b/kdecore/kcalendarsystemgregorian.h
index 7feaf2ebf..b116c40f4 100644
--- a/kdecore/kcalendarsystemgregorian.h
+++ b/kdecore/kcalendarsystemgregorian.h
@@ -21,8 +21,8 @@
#ifndef KCALENDARSYSTEMGREGORIAN_H
#define KCALENDARSYSTEMGREGORIAN_H
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "kcalendarsystem.h"
@@ -47,39 +47,39 @@ public:
KCalendarSystemGregorian (const KLocale * locale = 0);
virtual ~KCalendarSystemGregorian ();
- virtual int year (const QDate & date) const;
- virtual int month (const QDate & date) const;
- virtual int day (const QDate & date) const;
- virtual int dayOfWeek (const QDate & date) const;
- virtual int dayOfYear (const QDate & date) const;
+ virtual int year (const TQDate & date) const;
+ virtual int month (const TQDate & date) const;
+ virtual int day (const TQDate & date) const;
+ virtual int dayOfWeek (const TQDate & date) const;
+ virtual int dayOfYear (const TQDate & date) const;
- virtual bool setYMD(QDate & date, int y, int m, int d) const;
+ virtual bool setYMD(TQDate & date, int y, int m, int d) const;
- virtual QDate addYears(const QDate & date, int nyears) const;
- virtual QDate addMonths(const QDate & date, int nmonths) const;
- virtual QDate addDays(const QDate & date, int ndays) const;
+ virtual TQDate addYears(const TQDate & date, int nyears) const;
+ virtual TQDate addMonths(const TQDate & date, int nmonths) const;
+ virtual TQDate addDays(const TQDate & date, int ndays) const;
- virtual int monthsInYear (const QDate & date) const;
+ virtual int monthsInYear (const TQDate & date) const;
- virtual int daysInYear (const QDate & date) const;
- virtual int daysInMonth (const QDate & date) const;
+ virtual int daysInYear (const TQDate & date) const;
+ virtual int daysInMonth (const TQDate & date) const;
virtual int weeksInYear(int year) const;
- virtual int weekNumber(const QDate& date, int * yearNum = 0) const;
+ virtual int weekNumber(const TQDate& date, int * yearNum = 0) const;
- virtual int yearStringToInteger(const QString & sNum, int & iLength) const;
+ virtual int yearStringToInteger(const TQString & sNum, int & iLength) const;
- virtual QString monthName (int month, int year, bool shortName = false) const;
- virtual QString monthName (const QDate & date, bool shortName = false ) const;
- virtual QString monthNamePossessive(int month, int year, bool shortName = false) const;
- virtual QString monthNamePossessive(const QDate & date, bool shortName = false ) const;
- virtual QString weekDayName (int weekDay, bool shortName = false) const;
- virtual QString weekDayName (const QDate & date, bool shortName = false) const;
+ virtual TQString monthName (int month, int year, bool shortName = false) const;
+ virtual TQString monthName (const TQDate & date, bool shortName = false ) const;
+ virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const;
+ virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false ) const;
+ virtual TQString weekDayName (int weekDay, bool shortName = false) const;
+ virtual TQString weekDayName (const TQDate & date, bool shortName = false) const;
virtual int minValidYear () const;
virtual int maxValidYear () const;
virtual int weekDayOfPray () const;
- virtual QString calendarName() const;
+ virtual TQString calendarName() const;
virtual bool isLunar() const;
virtual bool isLunisolar() const;
diff --git a/kdecore/kcalendarsystemhebrew.cpp b/kdecore/kcalendarsystemhebrew.cpp
index 694261eda..ec39fc9ca 100644
--- a/kdecore/kcalendarsystemhebrew.cpp
+++ b/kdecore/kcalendarsystemhebrew.cpp
@@ -27,7 +27,7 @@
#include "kcalendarsystemhebrew.h"
static int hebrewDaysElapsed(int y);
-static QString num2heb(int num, bool includeMillenium);
+static TQString num2heb(int num, bool includeMillenium);
class h_date
{
@@ -143,26 +143,26 @@ static class h_date * gregorianToHebrew(int y, int m, int d)
return(&h);
}
-static QString num2heb(int num, bool includeMillenium)
+static TQString num2heb(int num, bool includeMillenium)
{
- const QChar decade[] = {0x05D8, 0x05D9, 0x05DB, 0x05DC, 0x05DE,
+ const TQChar decade[] = {0x05D8, 0x05D9, 0x05DB, 0x05DC, 0x05DE,
0x05E0, 0x05E1, 0x05E2, 0x05E4, 0x05E6};
- QString result;
+ TQString result;
if (num < 1 || num > 9999)
- return QString::number(num);
+ return TQString::number(num);
if (num >= 1000) {
if (includeMillenium || num % 1000 == 0)
- result += QChar(0x05D0 - 1 + num / 1000);
+ result += TQChar(0x05D0 - 1 + num / 1000);
num %= 1000;
}
if (num >= 100) {
while (num >= 500) {
- result += QChar(0x05EA);
+ result += TQChar(0x05EA);
num -= 400;
}
- result += QChar(0x05E7 - 1 + num / 100);
+ result += TQChar(0x05E7 - 1 + num / 100);
num %= 100;
}
if (num >= 10) {
@@ -172,7 +172,7 @@ static QString num2heb(int num, bool includeMillenium)
num %= 10;
}
if (num > 0)
- result += QChar(0x05D0 - 1 + num);
+ result += TQChar(0x05D0 - 1 + num);
if (result.length() == 1)
result += "'";
@@ -223,7 +223,7 @@ static int hebrewDaysElapsed(int y)
*/
static int long_cheshvan(int year)
{
- QDate first, last;
+ TQDate first, last;
class h_date *gd;
gd = hebrewToGregorian(year, 1, 1);
@@ -241,7 +241,7 @@ static int long_cheshvan(int year)
*/
static int short_kislev(int year)
{
- QDate first, last;
+ TQDate first, last;
class h_date * gd;
gd = hebrewToGregorian(year, 1, 1);
@@ -270,7 +270,7 @@ KCalendarSystemHebrew::~KCalendarSystemHebrew()
}
// Ok
-static class h_date * toHebrew(const QDate & date)
+static class h_date * toHebrew(const TQDate & date)
{
class h_date *sd;
sd = gregorianToHebrew(date.year(), date.month(), date.day());
@@ -280,14 +280,14 @@ static class h_date * toHebrew(const QDate & date)
}
// Ok
-int KCalendarSystemHebrew::year(const QDate& date) const
+int KCalendarSystemHebrew::year(const TQDate& date) const
{
class h_date *sd = toHebrew(date);
return sd->hd_year;
}
// Ok
-int KCalendarSystemHebrew::monthsInYear( const QDate & date ) const
+int KCalendarSystemHebrew::monthsInYear( const TQDate & date ) const
{
if ( is_leap_year( year(date) ) )
return 13;
@@ -298,8 +298,8 @@ int KCalendarSystemHebrew::monthsInYear( const QDate & date ) const
// Ok
int KCalendarSystemHebrew::weeksInYear(int year) const
{
- QDate temp;
- setYMD(temp, year, 1, 1); // don't pass an uninitialized QDate to
+ TQDate temp;
+ setYMD(temp, year, 1, 1); // don't pass an uninitialized TQDate to
// monthsInYear in the next call
setYMD(temp, year, monthsInYear(temp), hndays(monthsInYear(temp), year) );
@@ -313,9 +313,9 @@ int KCalendarSystemHebrew::weeksInYear(int year) const
return nWeekNumber;
}
-int KCalendarSystemHebrew::weekNumber(const QDate& date, int * yearNum) const
+int KCalendarSystemHebrew::weekNumber(const TQDate& date, int * yearNum) const
{
- QDate firstDayWeek1, lastDayOfYear;
+ TQDate firstDayWeek1, lastDayOfYear;
int y = year(date);
int week;
int weekDay1, dayOfWeek1InYear;
@@ -362,31 +362,31 @@ int KCalendarSystemHebrew::weekNumber(const QDate& date, int * yearNum) const
}
// Ok
-QString KCalendarSystemHebrew::monthName(const QDate& date,
+TQString KCalendarSystemHebrew::monthName(const TQDate& date,
bool shortName) const
{
return monthName(month(date), year(date), shortName);
}
// Ok
-QString KCalendarSystemHebrew::monthNamePossessive(const QDate& date,
+TQString KCalendarSystemHebrew::monthNamePossessive(const TQDate& date,
bool shortName) const
{
return monthNamePossessive(month(date), year(date), shortName);
}
// ### Fixme
-QString KCalendarSystemHebrew::monthName(int month, int year, bool /*shortName*/) const
+TQString KCalendarSystemHebrew::monthName(int month, int year, bool /*shortName*/) const
{
if ( month < 1 )
- return QString::null;
+ return TQString::null;
if ( is_leap_year(year) )
{
if ( month > 13 )
- return QString::null;
+ return TQString::null;
}
else if ( month > 12 )
- return QString::null;
+ return TQString::null;
// We must map conversion algorithm month index to real index
if( month == 6 && is_leap_year(year) )
@@ -430,17 +430,17 @@ QString KCalendarSystemHebrew::monthName(int month, int year, bool /*shortName*/
break;
}
- return QString::null;
+ return TQString::null;
}
// ### Fixme
-QString KCalendarSystemHebrew::monthNamePossessive(int month, int year,
+TQString KCalendarSystemHebrew::monthNamePossessive(int month, int year,
bool shortName) const
{
return "of " + monthName(month, year, shortName);
}
-bool KCalendarSystemHebrew::setYMD(QDate & date, int y, int m, int d) const
+bool KCalendarSystemHebrew::setYMD(TQDate & date, int y, int m, int d) const
{
if( y < minValidYear() || y > maxValidYear() )
return false;
@@ -454,20 +454,20 @@ bool KCalendarSystemHebrew::setYMD(QDate & date, int y, int m, int d) const
return date.setYMD(gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1);
}
-QString KCalendarSystemHebrew::weekDayName(int day, bool shortName) const
+TQString KCalendarSystemHebrew::weekDayName(int day, bool shortName) const
{
return KCalendarSystem::weekDayName(day, shortName);
}
// Ok
-QString KCalendarSystemHebrew::weekDayName(const QDate& date,
+TQString KCalendarSystemHebrew::weekDayName(const TQDate& date,
bool shortName) const
{
return weekDayName(dayOfWeek(date), shortName);
}
// Ok
-int KCalendarSystemHebrew::dayOfWeek(const QDate& date) const
+int KCalendarSystemHebrew::dayOfWeek(const TQDate& date) const
{
class h_date *sd = toHebrew(date);
if ( sd->hd_dw == 0 )
@@ -477,15 +477,15 @@ int KCalendarSystemHebrew::dayOfWeek(const QDate& date) const
}
// Ok
-int KCalendarSystemHebrew::dayOfYear(const QDate & date) const
+int KCalendarSystemHebrew::dayOfYear(const TQDate & date) const
{
- QDate first;
+ TQDate first;
setYMD(first, year(date), 1, 1);
return first.daysTo(date) + 1;
}
-int KCalendarSystemHebrew::daysInMonth(const QDate& date) const
+int KCalendarSystemHebrew::daysInMonth(const TQDate& date) const
{
return hndays(month(date), year(date));
}
@@ -514,7 +514,7 @@ int KCalendarSystemHebrew::hndays(int mon, int year) const
// Min valid year that may be converted to QDate
int KCalendarSystemHebrew::minValidYear() const
{
- QDate date(1753, 1, 1);
+ TQDate date(1753, 1, 1);
return year(date);
}
@@ -523,13 +523,13 @@ int KCalendarSystemHebrew::minValidYear() const
// Max valid year that may be converted to QDate
int KCalendarSystemHebrew::maxValidYear() const
{
- QDate date(8000, 1, 1);
+ TQDate date(8000, 1, 1);
return year(date);
}
// Ok
-int KCalendarSystemHebrew::day(const QDate& date) const
+int KCalendarSystemHebrew::day(const TQDate& date) const
{
class h_date *sd = toHebrew(date);
@@ -537,7 +537,7 @@ int KCalendarSystemHebrew::day(const QDate& date) const
}
// Ok
-int KCalendarSystemHebrew::month(const QDate& date) const
+int KCalendarSystemHebrew::month(const TQDate& date) const
{
class h_date *sd = toHebrew(date);
@@ -556,9 +556,9 @@ int KCalendarSystemHebrew::month(const QDate& date) const
}
// Ok
-int KCalendarSystemHebrew::daysInYear(const QDate & date) const
+int KCalendarSystemHebrew::daysInYear(const TQDate & date) const
{
- QDate first, last;
+ TQDate first, last;
setYMD(first, year(date), 1, 1); // 1 Tishrey
setYMD(last, year(date) + 1, 1, 1); // 1 Tishrey the year later
@@ -572,15 +572,15 @@ int KCalendarSystemHebrew::weekDayOfPray() const
}
// Ok
-QDate KCalendarSystemHebrew::addDays( const QDate & date, int ndays ) const
+TQDate KCalendarSystemHebrew::addDays( const TQDate & date, int ndays ) const
{
return date.addDays( ndays );
}
// Ok
-QDate KCalendarSystemHebrew::addMonths( const QDate & date, int nmonths ) const
+TQDate KCalendarSystemHebrew::addMonths( const TQDate & date, int nmonths ) const
{
- QDate result = date;
+ TQDate result = date;
while ( nmonths > 0 )
{
@@ -601,9 +601,9 @@ QDate KCalendarSystemHebrew::addMonths( const QDate & date, int nmonths ) const
}
// Ok
-QDate KCalendarSystemHebrew::addYears( const QDate & date, int nyears ) const
+TQDate KCalendarSystemHebrew::addYears( const TQDate & date, int nyears ) const
{
- QDate result = date;
+ TQDate result = date;
int y = year(date) + nyears;
setYMD( result, y, month(date), day(date) );
@@ -612,9 +612,9 @@ QDate KCalendarSystemHebrew::addYears( const QDate & date, int nyears ) const
}
// Ok
-QString KCalendarSystemHebrew::calendarName() const
+TQString KCalendarSystemHebrew::calendarName() const
{
- return QString::fromLatin1("hebrew");
+ return TQString::fromLatin1("hebrew");
}
// Ok
@@ -635,12 +635,12 @@ bool KCalendarSystemHebrew::isSolar() const
return false;
}
-QString KCalendarSystemHebrew::dayString(const QDate & pDate, bool bShort) const
+TQString KCalendarSystemHebrew::dayString(const TQDate & pDate, bool bShort) const
{
- QString sResult;
+ TQString sResult;
// Only use hebrew numbers if the hebrew setting is selected
- if (locale()->language() == QString::fromLatin1("he"))
+ if (locale()->language() == TQString::fromLatin1("he"))
sResult = num2heb(day(pDate), false);
else
sResult = KCalendarSystem::dayString(pDate, bShort);
@@ -648,12 +648,12 @@ QString KCalendarSystemHebrew::dayString(const QDate & pDate, bool bShort) const
return sResult;
}
-QString KCalendarSystemHebrew::yearString(const QDate & pDate, bool bShort) const
+TQString KCalendarSystemHebrew::yearString(const TQDate & pDate, bool bShort) const
{
- QString sResult;
+ TQString sResult;
// Only use hebrew numbers if the hebrew setting is selected
- if (locale()->language() == QString::fromLatin1("he"))
+ if (locale()->language() == TQString::fromLatin1("he"))
sResult = num2heb(year(pDate), !bShort);
else
sResult = KCalendarSystem::yearString(pDate, bShort);
@@ -661,9 +661,9 @@ QString KCalendarSystemHebrew::yearString(const QDate & pDate, bool bShort) cons
return sResult;
}
-static int heb2num(const QString& str, int & iLength) {
- QChar c;
- QString s = str;
+static int heb2num(const TQString& str, int & iLength) {
+ TQChar c;
+ TQString s = str;
int result = 0;
iLength = 0;
int decadeValues[14] = {10, 20, 20, 30, 40, 40, 50,
@@ -673,38 +673,38 @@ static int heb2num(const QString& str, int & iLength) {
for (pos = 0 ; pos < s.length() ; pos++)
{
c = s[pos];
- if (s.length() > pos && (s[pos + 1] == QChar('\'') ||
- s[pos + 1] == QChar('\"')))
+ if (s.length() > pos && (s[pos + 1] == TQChar('\'') ||
+ s[pos + 1] == TQChar('\"')))
{
iLength++;
s.remove(pos + 1, 1);
}
- if (c >= QChar(0x05D0) && c <= QChar(0x05D7))
+ if (c >= TQChar(0x05D0) && c <= TQChar(0x05D7))
{
- if (s.length() > pos && s[pos + 1] >= QChar(0x05D0) &&
- s[pos + 1] <= QChar(0x05EA))
+ if (s.length() > pos && s[pos + 1] >= TQChar(0x05D0) &&
+ s[pos + 1] <= TQChar(0x05EA))
result += (c.unicode() - 0x05D0 + 1) * 1000;
else
result += c.unicode() - 0x05D0 + 1;
}
- else if (c == QChar(0x05D8))
+ else if (c == TQChar(0x05D8))
{
- if (s.length() > pos && s[pos + 1] >= QChar(0x05D0) &&
- s[pos + 1] <= QChar(0x05EA) && s[pos + 1] != QChar(0x05D5) &&
- s[pos + 1] != QChar(0x05D6))
+ if (s.length() > pos && s[pos + 1] >= TQChar(0x05D0) &&
+ s[pos + 1] <= TQChar(0x05EA) && s[pos + 1] != TQChar(0x05D5) &&
+ s[pos + 1] != TQChar(0x05D6))
result += 9000;
else
result += 9;
}
- else if (c >= QChar(0x05D9) && c <= QChar(0x05E6))
+ else if (c >= TQChar(0x05D9) && c <= TQChar(0x05E6))
{
- if (s.length() > pos && s[pos + 1] >= QChar(0x05D9))
+ if (s.length() > pos && s[pos + 1] >= TQChar(0x05D9))
return -1;
else
result += decadeValues[c.unicode() - 0x05D9];
}
- else if (c >= QChar(0x05E7) && c <= QChar(0x05EA))
+ else if (c >= TQChar(0x05E7) && c <= TQChar(0x05EA))
{
result += (c.unicode() - 0x05E7 + 1) * 100;
}
@@ -719,7 +719,7 @@ static int heb2num(const QString& str, int & iLength) {
return result;
}
-int KCalendarSystemHebrew::dayStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystemHebrew::dayStringToInteger(const TQString & sNum, int & iLength) const
{
int iResult;
if (locale()->language() == "he")
@@ -730,7 +730,7 @@ int KCalendarSystemHebrew::dayStringToInteger(const QString & sNum, int & iLengt
return iResult;
}
-int KCalendarSystemHebrew::yearStringToInteger(const QString & sNum, int & iLength) const
+int KCalendarSystemHebrew::yearStringToInteger(const TQString & sNum, int & iLength) const
{
int iResult;
if (locale()->language() == "he")
diff --git a/kdecore/kcalendarsystemhebrew.h b/kdecore/kcalendarsystemhebrew.h
index efa91698d..ec0d82ba2 100644
--- a/kdecore/kcalendarsystemhebrew.h
+++ b/kdecore/kcalendarsystemhebrew.h
@@ -23,8 +23,8 @@
#ifndef KCALENDARSYSTEMHEBREW_H
#define KCALENDARSYSTEMHEBREW_H
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "kcalendarsystem.h"
@@ -49,41 +49,41 @@ public:
KCalendarSystemHebrew(const KLocale * locale = 0);
virtual ~KCalendarSystemHebrew();
- virtual int year (const QDate & date) const;
- virtual int month (const QDate & date) const;
- virtual int day (const QDate & date) const;
- virtual int dayOfWeek (const QDate & date) const;
- virtual int dayOfYear (const QDate & date) const;
+ virtual int year (const TQDate & date) const;
+ virtual int month (const TQDate & date) const;
+ virtual int day (const TQDate & date) const;
+ virtual int dayOfWeek (const TQDate & date) const;
+ virtual int dayOfYear (const TQDate & date) const;
- virtual bool setYMD(QDate & date, int y, int m, int d) const;
+ virtual bool setYMD(TQDate & date, int y, int m, int d) const;
- virtual QDate addYears(const QDate & date, int nyears) const;
- virtual QDate addMonths(const QDate & date, int nmonths) const;
- virtual QDate addDays(const QDate & date, int ndays) const;
+ virtual TQDate addYears(const TQDate & date, int nyears) const;
+ virtual TQDate addMonths(const TQDate & date, int nmonths) const;
+ virtual TQDate addDays(const TQDate & date, int ndays) const;
- virtual int monthsInYear (const QDate & date) const;
- virtual int daysInYear (const QDate & date) const;
- virtual int daysInMonth (const QDate & date) const;
+ virtual int monthsInYear (const TQDate & date) const;
+ virtual int daysInYear (const TQDate & date) const;
+ virtual int daysInMonth (const TQDate & date) const;
virtual int weeksInYear(int year) const;
- virtual int weekNumber(const QDate& date, int * yearNum = 0) const;
+ virtual int weekNumber(const TQDate& date, int * yearNum = 0) const;
- virtual QString monthName (int month, int year, bool shortName = false) const;
- virtual QString monthName (const QDate & date, bool shortName = false ) const;
- virtual QString monthNamePossessive(int month, int year, bool shortName = false) const;
- virtual QString monthNamePossessive(const QDate & date, bool shortName = false ) const;
- virtual QString weekDayName (int weekDay, bool shortName = false) const;
- virtual QString weekDayName (const QDate & date, bool shortName = false) const;
+ virtual TQString monthName (int month, int year, bool shortName = false) const;
+ virtual TQString monthName (const TQDate & date, bool shortName = false ) const;
+ virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const;
+ virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false ) const;
+ virtual TQString weekDayName (int weekDay, bool shortName = false) const;
+ virtual TQString weekDayName (const TQDate & date, bool shortName = false) const;
- virtual QString dayString(const QDate & pDate, bool bShort) const;
- virtual QString yearString(const QDate & pDate, bool bShort) const;
- virtual int dayStringToInteger(const QString & sNum, int & iLength) const;
- virtual int yearStringToInteger(const QString & sNum, int & iLength) const;
+ virtual TQString dayString(const TQDate & pDate, bool bShort) const;
+ virtual TQString yearString(const TQDate & pDate, bool bShort) const;
+ virtual int dayStringToInteger(const TQString & sNum, int & iLength) const;
+ virtual int yearStringToInteger(const TQString & sNum, int & iLength) const;
virtual int minValidYear () const;
virtual int maxValidYear () const;
virtual int weekDayOfPray () const;
- virtual QString calendarName() const;
+ virtual TQString calendarName() const;
virtual bool isLunar() const;
virtual bool isLunisolar() const;
diff --git a/kdecore/kcalendarsystemhijri.cpp b/kdecore/kcalendarsystemhijri.cpp
index c594cf22b..8eb403685 100644
--- a/kdecore/kcalendarsystemhijri.cpp
+++ b/kdecore/kcalendarsystemhijri.cpp
@@ -20,8 +20,8 @@
// Derived hijri kde calendar class
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kdebug.h>
@@ -162,7 +162,7 @@ public:
};
-static void gregorianToHijri(const QDate & date, int * pYear, int * pMonth,
+static void gregorianToHijri(const TQDate & date, int * pYear, int * pMonth,
int * pDay)
{
GregorianDate gregorian(date.month(),date.day(),date.year());
@@ -187,28 +187,28 @@ KCalendarSystemHijri::~KCalendarSystemHijri()
{
}
-int KCalendarSystemHijri::year(const QDate& date) const
+int KCalendarSystemHijri::year(const TQDate& date) const
{
int y;
gregorianToHijri(date, &y, 0, 0);
return y;
}
-int KCalendarSystemHijri::month(const QDate& date) const
+int KCalendarSystemHijri::month(const TQDate& date) const
{
int m;
gregorianToHijri(date, 0, &m, 0);
return m;
}
-int KCalendarSystemHijri::day(const QDate& date) const
+int KCalendarSystemHijri::day(const TQDate& date) const
{
int d;
gregorianToHijri(date, 0, 0, &d);
return d;
}
-int KCalendarSystemHijri::monthsInYear( const QDate & date ) const
+int KCalendarSystemHijri::monthsInYear( const TQDate & date ) const
{
Q_UNUSED( date )
@@ -217,7 +217,7 @@ int KCalendarSystemHijri::monthsInYear( const QDate & date ) const
int KCalendarSystemHijri::weeksInYear(int year) const
{
- QDate temp;
+ TQDate temp;
setYMD(temp, year, 12, lastDayOfIslamicMonth(12, year));
// If the last day of the year is in the first week, we have to check the
@@ -228,9 +228,9 @@ int KCalendarSystemHijri::weeksInYear(int year) const
return weekNumber(temp);
}
-int KCalendarSystemHijri::weekNumber(const QDate& date, int * yearNum) const
+int KCalendarSystemHijri::weekNumber(const TQDate& date, int * yearNum) const
{
- QDate firstDayWeek1, lastDayOfYear;
+ TQDate firstDayWeek1, lastDayOfYear;
int y = year(date);
int week;
int weekDay1, dayOfWeek1InYear;
@@ -274,19 +274,19 @@ int KCalendarSystemHijri::weekNumber(const QDate& date, int * yearNum) const
return week;
}
-QString KCalendarSystemHijri::monthName(const QDate& date,
+TQString KCalendarSystemHijri::monthName(const TQDate& date,
bool shortName) const
{
return monthName(month(date), year(date), shortName);
}
-QString KCalendarSystemHijri::monthNamePossessive(const QDate& date,
+TQString KCalendarSystemHijri::monthNamePossessive(const TQDate& date,
bool shortName) const
{
return monthNamePossessive(month(date), year(date), shortName);
}
-QString KCalendarSystemHijri::monthName(int month, int year, bool shortName)
+TQString KCalendarSystemHijri::monthName(int month, int year, bool shortName)
const {
Q_UNUSED(year);
@@ -348,10 +348,10 @@ QString KCalendarSystemHijri::monthName(int month, int year, bool shortName)
return locale()->translate("Thu al-Hijjah");
}
- return QString::null;
+ return TQString::null;
}
-QString KCalendarSystemHijri::monthNamePossessive(int month, int year,
+TQString KCalendarSystemHijri::monthNamePossessive(int month, int year,
bool shortName) const
{
Q_UNUSED(year);
@@ -413,10 +413,10 @@ QString KCalendarSystemHijri::monthNamePossessive(int month, int year,
return locale()->translate("of Thu al-Hijjah");
}
- return QString::null;
+ return TQString::null;
}
-bool KCalendarSystemHijri::setYMD(QDate & date, int y, int m, int d) const
+bool KCalendarSystemHijri::setYMD(TQDate & date, int y, int m, int d) const
{
// range checks
if ( y < minValidYear() || y > maxValidYear() )
@@ -436,7 +436,7 @@ bool KCalendarSystemHijri::setYMD(QDate & date, int y, int m, int d) const
gregorian.getDay());
}
-QString KCalendarSystemHijri::weekDayName(int day, bool shortName) const
+TQString KCalendarSystemHijri::weekDayName(int day, bool shortName) const
{
if ( shortName )
switch (day)
@@ -475,23 +475,23 @@ QString KCalendarSystemHijri::weekDayName(int day, bool shortName) const
return locale()->translate("Yaum al-Ahad");
}
- return QString::null;
+ return TQString::null;
}
-QString KCalendarSystemHijri::weekDayName(const QDate& date,
+TQString KCalendarSystemHijri::weekDayName(const TQDate& date,
bool shortName) const
{
return weekDayName(dayOfWeek(date), shortName);
}
-int KCalendarSystemHijri::dayOfWeek(const QDate& date) const
+int KCalendarSystemHijri::dayOfWeek(const TQDate& date) const
{
return date.dayOfWeek(); // same as gregorian
}
-int KCalendarSystemHijri::dayOfYear(const QDate & date) const
+int KCalendarSystemHijri::dayOfYear(const TQDate & date) const
{
- QDate first;
+ TQDate first;
setYMD(first, year(date), 1, 1);
return first.daysTo(date) + 1;
@@ -499,7 +499,7 @@ int KCalendarSystemHijri::dayOfYear(const QDate & date) const
return 100;
}
-int KCalendarSystemHijri::daysInMonth(const QDate& date) const
+int KCalendarSystemHijri::daysInMonth(const TQDate& date) const
{
int y, m;
gregorianToHijri(date, &y, &m, 0);
@@ -510,7 +510,7 @@ int KCalendarSystemHijri::daysInMonth(const QDate& date) const
// Min valid year that may be converted to QDate
int KCalendarSystemHijri::minValidYear() const
{
- QDate date(1753, 1, 1);
+ TQDate date(1753, 1, 1);
return year(date);
}
@@ -518,14 +518,14 @@ int KCalendarSystemHijri::minValidYear() const
// Max valid year that may be converted to QDate
int KCalendarSystemHijri::maxValidYear() const
{
- QDate date(8000, 1, 1);
+ TQDate date(8000, 1, 1);
return year(date);
}
-int KCalendarSystemHijri::daysInYear(const QDate & date) const
+int KCalendarSystemHijri::daysInYear(const TQDate & date) const
{
- QDate first, last;
+ TQDate first, last;
setYMD(first, year(date), 1, 1);
setYMD(last, year(date) + 1, 1, 1);
@@ -537,14 +537,14 @@ int KCalendarSystemHijri::weekDayOfPray() const
return 5; // friday
}
-QDate KCalendarSystemHijri::addDays( const QDate & date, int ndays ) const
+TQDate KCalendarSystemHijri::addDays( const TQDate & date, int ndays ) const
{
return date.addDays( ndays );
}
-QDate KCalendarSystemHijri::addMonths( const QDate & date, int nmonths ) const
+TQDate KCalendarSystemHijri::addMonths( const TQDate & date, int nmonths ) const
{
- QDate result = date;
+ TQDate result = date;
int m = month(date);
int y = year(date);
@@ -565,9 +565,9 @@ QDate KCalendarSystemHijri::addMonths( const QDate & date, int nmonths ) const
return result;
}
-QDate KCalendarSystemHijri::addYears( const QDate & date, int nyears ) const
+TQDate KCalendarSystemHijri::addYears( const TQDate & date, int nyears ) const
{
- QDate result = date;
+ TQDate result = date;
int y = year(date) + nyears;
setYMD( result, y, month(date), day(date) );
@@ -575,9 +575,9 @@ QDate KCalendarSystemHijri::addYears( const QDate & date, int nyears ) const
return result;
}
-QString KCalendarSystemHijri::calendarName() const
+TQString KCalendarSystemHijri::calendarName() const
{
- return QString::fromLatin1("hijri");
+ return TQString::fromLatin1("hijri");
}
bool KCalendarSystemHijri::isLunar() const
diff --git a/kdecore/kcalendarsystemhijri.h b/kdecore/kcalendarsystemhijri.h
index d03efe528..214b7a50a 100644
--- a/kdecore/kcalendarsystemhijri.h
+++ b/kdecore/kcalendarsystemhijri.h
@@ -21,8 +21,8 @@
#ifndef KCALENDARSYSTEMHIJRI_H
#define KCALENDARSYSTEMHIJRI_H
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "kcalendarsystem.h"
@@ -47,36 +47,36 @@ public:
KCalendarSystemHijri(const KLocale * locale = 0);
virtual ~KCalendarSystemHijri();
- virtual int year (const QDate & date) const;
- virtual int month (const QDate & date) const;
- virtual int day (const QDate & date) const;
- virtual int dayOfWeek (const QDate & date) const;
- virtual int dayOfYear (const QDate & date) const;
+ virtual int year (const TQDate & date) const;
+ virtual int month (const TQDate & date) const;
+ virtual int day (const TQDate & date) const;
+ virtual int dayOfWeek (const TQDate & date) const;
+ virtual int dayOfYear (const TQDate & date) const;
- virtual bool setYMD(QDate & date, int y, int m, int d) const;
+ virtual bool setYMD(TQDate & date, int y, int m, int d) const;
- virtual QDate addYears(const QDate & date, int nyears) const;
- virtual QDate addMonths(const QDate & date, int nmonths) const;
- virtual QDate addDays(const QDate & date, int ndays) const;
+ virtual TQDate addYears(const TQDate & date, int nyears) const;
+ virtual TQDate addMonths(const TQDate & date, int nmonths) const;
+ virtual TQDate addDays(const TQDate & date, int ndays) const;
- virtual int monthsInYear (const QDate & date) const;
- virtual int daysInYear (const QDate & date) const;
- virtual int daysInMonth (const QDate & date) const;
+ virtual int monthsInYear (const TQDate & date) const;
+ virtual int daysInYear (const TQDate & date) const;
+ virtual int daysInMonth (const TQDate & date) const;
virtual int weeksInYear(int year) const;
- virtual int weekNumber(const QDate& date, int * yearNum = 0) const;
+ virtual int weekNumber(const TQDate& date, int * yearNum = 0) const;
- virtual QString monthName (int month, int year, bool shortName = false) const;
- virtual QString monthName (const QDate & date, bool shortName = false ) const;
- virtual QString monthNamePossessive(int month, int year, bool shortName = false) const;
- virtual QString monthNamePossessive(const QDate & date, bool shortName = false ) const;
- virtual QString weekDayName (int weekDay, bool shortName = false) const;
- virtual QString weekDayName (const QDate & date, bool shortName = false) const;
+ virtual TQString monthName (int month, int year, bool shortName = false) const;
+ virtual TQString monthName (const TQDate & date, bool shortName = false ) const;
+ virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const;
+ virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false ) const;
+ virtual TQString weekDayName (int weekDay, bool shortName = false) const;
+ virtual TQString weekDayName (const TQDate & date, bool shortName = false) const;
virtual int minValidYear () const;
virtual int maxValidYear () const;
virtual int weekDayOfPray () const;
- virtual QString calendarName() const;
+ virtual TQString calendarName() const;
virtual bool isLunar() const;
virtual bool isLunisolar() const;
diff --git a/kdecore/kcalendarsystemjalali.cpp b/kdecore/kcalendarsystemjalali.cpp
index df8b5d0fa..8915c585a 100644
--- a/kdecore/kcalendarsystemjalali.cpp
+++ b/kdecore/kcalendarsystemjalali.cpp
@@ -21,9 +21,9 @@
*/
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <math.h>
#include <kglobal.h>
@@ -165,11 +165,11 @@ return (&sd);
static SDATE *gregorianToJalali(int y,int m, int d)
{
static SDATE sd;
- long jdn = civil_jdn(y,m,d);//QDate::gregorianToJulian(y, m, d);
+ long jdn = civil_jdn(y,m,d);//TQDate::gregorianToJulian(y, m, d);
sd = jdn_jalali(jdn);
return(&sd);
}
-static void gregorianToJalali(const QDate & date, int * pYear, int * pMonth,
+static void gregorianToJalali(const TQDate & date, int * pYear, int * pMonth,
int * pDay)
{
SDATE *sd;
@@ -209,7 +209,7 @@ KCalendarSystemJalali::~KCalendarSystemJalali()
{
}
-int KCalendarSystemJalali::year(const QDate& date) const
+int KCalendarSystemJalali::year(const TQDate& date) const
{
kdDebug(5400) << "Jalali year..." << endl;
@@ -218,7 +218,7 @@ int y;
return y;
}
-int KCalendarSystemJalali::month (const QDate& date) const
+int KCalendarSystemJalali::month (const TQDate& date) const
{
kdDebug(5400) << "Jalali month..." << endl;
@@ -227,7 +227,7 @@ int m;
return m;
}
-int KCalendarSystemJalali::day(const QDate& date) const
+int KCalendarSystemJalali::day(const TQDate& date) const
{
kdDebug(5400) << "Jalali day..." << endl;
@@ -236,7 +236,7 @@ int d;
return d;
}
-int KCalendarSystemJalali::dayOfWeek(const QDate& date) const
+int KCalendarSystemJalali::dayOfWeek(const TQDate& date) const
{
//same same I think?!
return date.dayOfWeek();
@@ -244,16 +244,16 @@ int KCalendarSystemJalali::dayOfWeek(const QDate& date) const
}
//NOT TESTED YET
-int KCalendarSystemJalali::dayOfYear(const QDate & date) const
+int KCalendarSystemJalali::dayOfYear(const TQDate & date) const
{
- QDate first;
+ TQDate first;
setYMD(first, year(date), 1, 1);
return first.daysTo(date) + 1;
}
//MAY BE BUGGY
-bool KCalendarSystemJalali::setYMD(QDate & date, int y, int m, int d) const
+bool KCalendarSystemJalali::setYMD(TQDate & date, int y, int m, int d) const
{
// range checks
if ( y < minValidYear() || y > maxValidYear() )
@@ -270,18 +270,18 @@ bool KCalendarSystemJalali::setYMD(QDate & date, int y, int m, int d) const
return date.setYMD(gd->year, gd->mon, gd->day);
}
-QDate KCalendarSystemJalali::addYears( const QDate & date, int nyears ) const
+TQDate KCalendarSystemJalali::addYears( const TQDate & date, int nyears ) const
{
- QDate result = date;
+ TQDate result = date;
int y = year(date) + nyears;
setYMD( result, y, month(date), day(date) );
return result;
}
-QDate KCalendarSystemJalali::addMonths( const QDate & date, int nmonths ) const
+TQDate KCalendarSystemJalali::addMonths( const TQDate & date, int nmonths ) const
{
- QDate result = date;
+ TQDate result = date;
int m = month(date);
int y = year(date);
@@ -302,19 +302,19 @@ QDate KCalendarSystemJalali::addMonths( const QDate & date, int nmonths ) const
return result;
}
-QDate KCalendarSystemJalali::addDays( const QDate & date, int ndays ) const
+TQDate KCalendarSystemJalali::addDays( const TQDate & date, int ndays ) const
{
return date.addDays( ndays );
}
-int KCalendarSystemJalali::monthsInYear( const QDate & date ) const
+int KCalendarSystemJalali::monthsInYear( const TQDate & date ) const
{
Q_UNUSED( date )
return 12;
}
-int KCalendarSystemJalali::daysInYear(const QDate & date) const
+int KCalendarSystemJalali::daysInYear(const TQDate & date) const
{
Q_UNUSED(date);
int result;
@@ -326,7 +326,7 @@ int result;
return result;
}
-int KCalendarSystemJalali::daysInMonth(const QDate & date) const
+int KCalendarSystemJalali::daysInMonth(const TQDate & date) const
{
SDATE *sd = gregorianToJalali(date.year(),date.month(),date.day());
return hndays(sd->mon,sd->year);
@@ -340,9 +340,9 @@ int KCalendarSystemJalali::weeksInYear(int year) const
return 52;
}
-int KCalendarSystemJalali::weekNumber(const QDate& date, int * yearNum) const
+int KCalendarSystemJalali::weekNumber(const TQDate& date, int * yearNum) const
{
- QDate firstDayWeek1, lastDayOfYear;
+ TQDate firstDayWeek1, lastDayOfYear;
int y = year(date);
int week;
int weekDay1, dayOfWeek1InYear;
@@ -380,7 +380,7 @@ int KCalendarSystemJalali::weekNumber(const QDate& date, int * yearNum) const
return week;
}
-QString KCalendarSystemJalali::monthName(int month, int year, bool shortName)
+TQString KCalendarSystemJalali::monthName(int month, int year, bool shortName)
const
{
Q_UNUSED(year);
@@ -442,10 +442,10 @@ QString KCalendarSystemJalali::monthName(int month, int year, bool shortName)
return locale()->translate("Esfand");
}
- return QString::null;
+ return TQString::null;
}
-QString KCalendarSystemJalali::monthName(const QDate& date, bool shortName)
+TQString KCalendarSystemJalali::monthName(const TQDate& date, bool shortName)
const
{
int mon;
@@ -454,20 +454,20 @@ QString KCalendarSystemJalali::monthName(const QDate& date, bool shortName)
return (monthName(mon, 0, shortName));
}
-QString KCalendarSystemJalali::monthNamePossessive(const QDate& date,
+TQString KCalendarSystemJalali::monthNamePossessive(const TQDate& date,
bool shortName ) const
{
return monthName(date,shortName);
}
-QString KCalendarSystemJalali::monthNamePossessive(int month, int year,
+TQString KCalendarSystemJalali::monthNamePossessive(int month, int year,
bool shortName ) const
{
return monthName(month,year,shortName);
}
-QString KCalendarSystemJalali::weekDayName(int day, bool shortName) const
+TQString KCalendarSystemJalali::weekDayName(int day, bool shortName) const
{
if ( shortName )
switch (day)
@@ -506,10 +506,10 @@ QString KCalendarSystemJalali::weekDayName(int day, bool shortName) const
return locale()->translate("Yek-shanbe");
}
- return QString::null;
+ return TQString::null;
}
-QString KCalendarSystemJalali::weekDayName(const QDate &date,bool shortName)
+TQString KCalendarSystemJalali::weekDayName(const TQDate &date,bool shortName)
const
{
return weekDayName(dayOfWeek(date), shortName);
@@ -518,7 +518,7 @@ QString KCalendarSystemJalali::weekDayName(const QDate &date,bool shortName)
// Min valid year that may be converted to QDate
int KCalendarSystemJalali::minValidYear() const
{
- QDate date(1753, 1, 1);
+ TQDate date(1753, 1, 1);
return year(date);
}
@@ -527,7 +527,7 @@ int KCalendarSystemJalali::minValidYear() const
int KCalendarSystemJalali::maxValidYear() const
{
/*
- QDate date(8000, 1, 1);
+ TQDate date(8000, 1, 1);
SDATE *sd = toJalali(date);
@@ -539,9 +539,9 @@ int KCalendarSystemJalali::weekDayOfPray() const
{
return 5; // friday
}
-QString KCalendarSystemJalali::calendarName() const
+TQString KCalendarSystemJalali::calendarName() const
{
- return QString::fromLatin1("jalali");
+ return TQString::fromLatin1("jalali");
}
bool KCalendarSystemJalali::isLunar() const
diff --git a/kdecore/kcalendarsystemjalali.h b/kdecore/kcalendarsystemjalali.h
index ae24c1446..e7ec99fe3 100644
--- a/kdecore/kcalendarsystemjalali.h
+++ b/kdecore/kcalendarsystemjalali.h
@@ -24,8 +24,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "kcalendarsystem.h"
@@ -42,37 +42,37 @@ public:
- virtual int year (const QDate & date) const;
- virtual int month (const QDate & date) const;
- virtual int day (const QDate & date) const;
- virtual int dayOfWeek (const QDate & date) const;
- virtual int dayOfYear (const QDate & date) const;
+ virtual int year (const TQDate & date) const;
+ virtual int month (const TQDate & date) const;
+ virtual int day (const TQDate & date) const;
+ virtual int dayOfWeek (const TQDate & date) const;
+ virtual int dayOfYear (const TQDate & date) const;
- virtual bool setYMD(QDate & date, int y, int m, int d) const;
+ virtual bool setYMD(TQDate & date, int y, int m, int d) const;
- virtual QDate addYears(const QDate & date, int nyears) const;
- virtual QDate addMonths(const QDate & date, int nmonths) const;
- virtual QDate addDays(const QDate & date, int ndays) const;
+ virtual TQDate addYears(const TQDate & date, int nyears) const;
+ virtual TQDate addMonths(const TQDate & date, int nmonths) const;
+ virtual TQDate addDays(const TQDate & date, int ndays) const;
- virtual int monthsInYear (const QDate & date) const;
+ virtual int monthsInYear (const TQDate & date) const;
- virtual int daysInYear (const QDate & date) const;
- virtual int daysInMonth (const QDate & date) const;
+ virtual int daysInYear (const TQDate & date) const;
+ virtual int daysInMonth (const TQDate & date) const;
virtual int weeksInYear(int year) const;
- virtual int weekNumber(const QDate& date, int * yearNum = 0) const;
+ virtual int weekNumber(const TQDate& date, int * yearNum = 0) const;
- virtual QString monthName (const QDate & date, bool shortName = false ) const;
- virtual QString monthNamePossessive(const QDate & date, bool shortName = false ) const;
- virtual QString weekDayName (int weekDay, bool shortName = false) const;
- virtual QString weekDayName (const QDate & date, bool shortName = false) const;
- virtual QString monthNamePossessive(int month, int year, bool shortName = false) const;
- virtual QString monthName(int month, int year, bool shortName = false) const;
+ virtual TQString monthName (const TQDate & date, bool shortName = false ) const;
+ virtual TQString monthNamePossessive(const TQDate & date, bool shortName = false ) const;
+ virtual TQString weekDayName (int weekDay, bool shortName = false) const;
+ virtual TQString weekDayName (const TQDate & date, bool shortName = false) const;
+ virtual TQString monthNamePossessive(int month, int year, bool shortName = false) const;
+ virtual TQString monthName(int month, int year, bool shortName = false) const;
virtual int minValidYear () const;
virtual int maxValidYear () const;
virtual int weekDayOfPray () const;
- virtual QString calendarName() const;
+ virtual TQString calendarName() const;
virtual bool isLunar() const;
virtual bool isLunisolar() const;
diff --git a/kdecore/kcatalogue.cpp b/kdecore/kcatalogue.cpp
index d5e566db2..8bc81125e 100644
--- a/kdecore/kcatalogue.cpp
+++ b/kdecore/kcatalogue.cpp
@@ -19,7 +19,7 @@
#include <config.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
@@ -45,14 +45,14 @@ struct kde_loaded_l10nfile
class KCataloguePrivate
{
public:
- QString name;
- QString language;
+ TQString name;
+ TQString language;
int pluralType;
kde_loaded_l10nfile domain;
};
-KCatalogue::KCatalogue(const QString & name, const QString & language )
+KCatalogue::KCatalogue(const TQString & name, const TQString & language )
: d( new KCataloguePrivate )
{
d->name = name;
@@ -62,7 +62,7 @@ KCatalogue::KCatalogue(const QString & name, const QString & language )
// has to be set after we have the first catalog objects.
d->pluralType = -1;
- QString path = QString::fromLatin1("%1/LC_MESSAGES/%2.mo")
+ TQString path = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo")
.arg( d->language )
.arg( d->name );
@@ -93,12 +93,12 @@ KCatalogue::~KCatalogue()
delete d;
}
-QString KCatalogue::name() const
+TQString KCatalogue::name() const
{
return d->name;
}
-QString KCatalogue::language() const
+TQString KCatalogue::language() const
{
return d->language;
}
@@ -114,14 +114,14 @@ int KCatalogue::pluralType() const
}
-void KCatalogue::setFileName( const QString & fileName )
+void KCatalogue::setFileName( const TQString & fileName )
{
// nothing to do if the file name is already the same
if ( this->fileName() == fileName ) return;
doUnload();
- QCString newFileName = QFile::encodeName( fileName );
+ TQCString newFileName = TQFile::encodeName( fileName );
if ( !fileName.isEmpty() )
{
@@ -132,9 +132,9 @@ void KCatalogue::setFileName( const QString & fileName )
}
}
-QString KCatalogue::fileName() const
+TQString KCatalogue::fileName() const
{
- return QFile::decodeName( d->domain.filename );
+ return TQFile::decodeName( d->domain.filename );
}
const char * KCatalogue::translate(const char * msgid) const
diff --git a/kdecore/kcatalogue.h b/kdecore/kcatalogue.h
index 38c067711..0658b9000 100644
--- a/kdecore/kcatalogue.h
+++ b/kdecore/kcatalogue.h
@@ -20,7 +20,7 @@
#ifndef KCATALOGUE_H
#define KCATALOGUE_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
struct kde_loaded_l10nfile;
@@ -43,7 +43,7 @@ public:
* @param name The name of the catalog
* @param language The language of this catalog
*/
- explicit KCatalogue(const QString & name = QString::null, const QString & language = QString::null);
+ explicit KCatalogue(const TQString & name = TQString::null, const TQString & language = TQString::null);
/**
* Copy constructor.
@@ -65,14 +65,14 @@ public:
*
* @return The name of the catalog
*/
- QString name() const;
+ TQString name() const;
/**
* Returns the language of the catalog.
*
* @return The language of the catalog
*/
- QString language() const;
+ TQString language() const;
/**
* Returns the plural type for the catalog. This type is based on the language of the catalog
@@ -109,13 +109,13 @@ private:
* @param fileName The new file name
*/
- void setFileName( const QString & fileName );
+ void setFileName( const TQString & fileName );
/**
* @internal Retrieves the current file name.
*
* @return The current file name, if any.
*/
- QString fileName() const;
+ TQString fileName() const;
/**
* @internal Unloads the current file.
diff --git a/kdecore/kcharsets.cpp b/kdecore/kcharsets.cpp
index 1ac3fa94d..f4ae826f5 100644
--- a/kdecore/kcharsets.cpp
+++ b/kdecore/kcharsets.cpp
@@ -26,16 +26,16 @@
#include <klocale.h>
#include <kconfig.h>
-#include <qfontinfo.h>
-#include <qstrlist.h>
-#include <qfontdatabase.h>
+#include <tqfontinfo.h>
+#include <tqstrlist.h>
+#include <tqfontdatabase.h>
#include <kdebug.h>
-#include <qtextcodec.h>
-#include <qmap.h>
-#include <qcstring.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqtextcodec.h>
+#include <tqmap.h>
+#include <tqcstring.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <assert.h>
@@ -350,8 +350,8 @@ public:
{
delete db;
}
- QFontDatabase *db;
- QAsciiDict<QTextCodec> codecForNameDict;
+ TQFontDatabase *db;
+ TQAsciiDict<TQTextCodec> codecForNameDict;
KCharsets* kc;
};
@@ -367,9 +367,9 @@ KCharsets::~KCharsets()
delete d;
}
-QChar KCharsets::fromEntity(const QString &str)
+TQChar KCharsets::fromEntity(const TQString &str)
{
- QChar res = QChar::null;
+ TQChar res = TQChar::null;
int pos = 0;
if(str[pos] == '&') pos++;
@@ -381,11 +381,11 @@ QChar KCharsets::fromEntity(const QString &str)
if (str[pos] == 'x' || str[pos] == 'X') {
pos++;
// '&#x0000', hexadeciaml character reference
- QString tmp(str.unicode()+pos, str.length()-pos);
+ TQString tmp(str.unicode()+pos, str.length()-pos);
res = tmp.toInt(&ok, 16);
} else {
// '&#0000', decimal character reference
- QString tmp(str.unicode()+pos, str.length()-pos);
+ TQString tmp(str.unicode()+pos, str.length()-pos);
res = tmp.toInt(&ok, 10);
}
return res;
@@ -396,46 +396,46 @@ QChar KCharsets::fromEntity(const QString &str)
if(!e)
{
//kdDebug( 0 ) << "unknown entity " << str <<", len = " << str.length() << endl;
- return QChar::null;
+ return TQChar::null;
}
//kdDebug() << "got entity " << str << " = " << e->code << endl;
- return QChar(e->code);
+ return TQChar(e->code);
}
-QChar KCharsets::fromEntity(const QString &str, int &len)
+TQChar KCharsets::fromEntity(const TQString &str, int &len)
{
// entities are never longer than 8 chars... we start from
// that length and work backwards...
len = 8;
while(len > 0)
{
- QString tmp = str.left(len);
- QChar res = fromEntity(tmp);
- if( res != QChar::null ) return res;
+ TQString tmp = str.left(len);
+ TQChar res = fromEntity(tmp);
+ if( res != TQChar::null ) return res;
len--;
}
- return QChar::null;
+ return TQChar::null;
}
-QString KCharsets::toEntity(const QChar &ch)
+TQString KCharsets::toEntity(const TQChar &ch)
{
- QString ent;
+ TQString ent;
ent.sprintf("&#0x%x;", ch.unicode());
return ent;
}
-QString KCharsets::resolveEntities( const QString &input )
+TQString KCharsets::resolveEntities( const TQString &input )
{
- QString text = input;
- const QChar *p = text.unicode();
- const QChar *end = p + text.length();
- const QChar *ampersand = 0;
+ TQString text = input;
+ const TQChar *p = text.unicode();
+ const TQChar *end = p + text.length();
+ const TQChar *ampersand = 0;
bool scanForSemicolon = false;
for ( ; p < end; ++p ) {
- const QChar ch = *p;
+ const TQChar ch = *p;
if ( ch == '&' ) {
ampersand = p;
@@ -450,13 +450,13 @@ QString KCharsets::resolveEntities( const QString &input )
scanForSemicolon = false;
- const QChar *entityBegin = ampersand + 1;
+ const TQChar *entityBegin = ampersand + 1;
const uint entityLength = p - entityBegin;
if ( entityLength == 0 )
continue;
- const QChar entityValue = KCharsets::fromEntity( QConstString( entityBegin, entityLength ).string() );
+ const TQChar entityValue = KCharsets::fromEntity( TQConstString( entityBegin, entityLength ).string() );
if ( entityValue.isNull() )
continue;
@@ -472,31 +472,31 @@ QString KCharsets::resolveEntities( const QString &input )
return text;
}
-QStringList KCharsets::availableEncodingNames()
+TQStringList KCharsets::availableEncodingNames()
{
- QStringList available;
+ TQStringList available;
for ( const char* const* pos = charsets_for_encoding; *pos; ++pos ) {
//kdDebug(0) << *charsets << " available" << endl;
- available.append( QString::fromLatin1( *pos ));
+ available.append( TQString::fromLatin1( *pos ));
}
return available;
}
-QString KCharsets::languageForEncoding( const QString &encoding )
+TQString KCharsets::languageForEncoding( const TQString &encoding )
{
int lang = kcharsets_array_search< LanguageForEncoding, int >
( language_for_encoding, encoding.latin1());
return i18n( language_names[lang] );
}
-QString KCharsets::encodingForName( const QString &descriptiveName )
+TQString KCharsets::encodingForName( const TQString &descriptiveName )
{
const int left = descriptiveName.findRev( '(' );
if (left<0) // No parenthesis, so assume it is a normal encoding name
return descriptiveName.stripWhiteSpace();
- QString name(descriptiveName.mid(left+1));
+ TQString name(descriptiveName.mid(left+1));
const int right = name.findRev( ')' );
@@ -506,30 +506,30 @@ QString KCharsets::encodingForName( const QString &descriptiveName )
return name.left(right).stripWhiteSpace();
}
-QStringList KCharsets::descriptiveEncodingNames()
+TQStringList KCharsets::descriptiveEncodingNames()
{
// As we are sorting, we can directly read the array language_for_encoding
- QStringList encodings;
+ TQStringList encodings;
for ( const LanguageForEncoding* pos = language_for_encoding; pos->index; ++pos ) {
- const QString name = QString::fromLatin1( pos->index );
- const QString description = i18n( language_names[ pos->data ] );
+ const TQString name = TQString::fromLatin1( pos->index );
+ const TQString description = i18n( language_names[ pos->data ] );
encodings.append( i18n("Descriptive Encoding Name", "%1 ( %2 )"). arg ( description ). arg( name ) );
}
encodings.sort();
return encodings;
}
-QTextCodec *KCharsets::codecForName(const QString &n) const
+TQTextCodec *KCharsets::codecForName(const TQString &n) const
{
bool b;
return codecForName( n, b );
}
-QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
+TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const
{
ok = true;
- QTextCodec* codec = 0;
+ TQTextCodec* codec = 0;
// dict lookup is case insensitive anyway
if((codec = d->codecForNameDict[n.isEmpty() ? "->locale<-" : n.latin1()]))
return codec; // cache hit, return
@@ -540,17 +540,17 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
return codec;
}
- QCString name = n.lower().latin1();
- QCString key = name;
+ TQCString name = n.lower().latin1();
+ TQCString key = name;
if (name.right(8) == "_charset")
name.truncate(name.length()-8);
if (name.isEmpty()) {
ok = false;
- return QTextCodec::codecForName("iso8859-1");
+ return TQTextCodec::codecForName("iso8859-1");
}
- codec = QTextCodec::codecForName(name);
+ codec = TQTextCodec::codecForName(name);
if(codec) {
d->codecForNameDict.replace(key, codec);
@@ -558,11 +558,11 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
}
// these codecs are built into Qt, but the name given for the codec is different,
- // so QTextCodec did not recognize it.
- QCString cname = kcharsets_array_search< Builtin, const char* >( builtin, name.data());
+ // so TQTextCodec did not recognize it.
+ TQCString cname = kcharsets_array_search< Builtin, const char* >( builtin, name.data());
if(!cname.isEmpty())
- codec = QTextCodec::codecForName(cname);
+ codec = TQTextCodec::codecForName(cname);
if(codec)
{
@@ -570,10 +570,10 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
return codec;
}
- QString dir;
+ TQString dir;
{
KConfigGroupSaver cfgsav( KGlobal::config(), "i18n" );
- dir = KGlobal::config()->readPathEntry("i18ndir", QString::fromLatin1("/usr/share/i18n/charmaps"));
+ dir = KGlobal::config()->readPathEntry("i18ndir", TQString::fromLatin1("/usr/share/i18n/charmaps"));
}
// these are codecs not included in Qt. They can be build up if the corresponding charmap
@@ -584,12 +584,12 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
cname = name;
cname = cname.upper();
- const QString basicName = QString::fromLatin1(cname);
+ const TQString basicName = TQString::fromLatin1(cname);
kdDebug() << k_funcinfo << endl << " Trying to find " << cname << " in " << dir << endl;
- QString charMapFileName;
+ TQString charMapFileName;
bool gzipped = false;
- QDir qdir(dir);
+ TQDir qdir(dir);
if (!qdir.exists()) {
// The directory for the charmaps does not even exist... (That is common!)
}
@@ -604,9 +604,9 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
// Check if we are asking a code page
// If yes, then check "CP99999" and "IBM99999"
// First we need to find the number of the codepage
- QRegExp regexp("^(X-)?(CP|IBM)(-| )?(0-9)+");
+ TQRegExp regexp("^(X-)?(CP|IBM)(-| )?(0-9)+");
if ( regexp.search(basicName) != -1) {
- const QString num = regexp.cap(4);
+ const TQString num = regexp.cap(4);
if (num.isEmpty()) {
// No number, not a code page (or something went wrong)
}
@@ -631,14 +631,14 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
KQIODeviceGZip gzip(dir + "/" + charMapFileName);
if (gzip.open(IO_ReadOnly)) {
kdDebug() << "Loading gzipped charset..." << endl;
- codec = QTextCodec::loadCharmap(&gzip);
+ codec = TQTextCodec::loadCharmap(&gzip);
gzip.close();
}
else
kdWarning() << "Could not open gzipped charset!" << endl;
}
else if (!charMapFileName.isEmpty()) {
- codec = QTextCodec::loadCharmapFile(dir + "/" + charMapFileName);
+ codec = TQTextCodec::loadCharmapFile(dir + "/" + charMapFileName);
}
if(codec) {
@@ -651,7 +651,7 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
cname = kcharsets_array_search< ConversionHints, const char* >( conversion_hints, (const char*)name.data() );
if(!cname.isEmpty())
- codec = QTextCodec::codecForName(cname);
+ codec = TQTextCodec::codecForName(cname);
if(codec) {
d->codecForNameDict.replace(key, codec);
@@ -660,5 +660,5 @@ QTextCodec *KCharsets::codecForName(const QString &n, bool &ok) const
// could not assign a codec, let's return Latin1
ok = false;
- return QTextCodec::codecForName("iso8859-1");
+ return TQTextCodec::codecForName("iso8859-1");
}
diff --git a/kdecore/kcharsets.h b/kdecore/kcharsets.h
index fe9bb3140..7a92c1303 100644
--- a/kdecore/kcharsets.h
+++ b/kdecore/kcharsets.h
@@ -19,10 +19,10 @@
#ifndef KCHARSETS_H
#define KCHARSETS_H
-#include <qstring.h>
-#include <qfont.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqfont.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include "kdelibs_export.h"
class KGlobal;
@@ -60,45 +60,45 @@ public:
/**
* Provided for compatibility.
* @param name the name of the codec
- * @return the QTextCodec. If the desired codec could not be found,
+ * @return the TQTextCodec. If the desired codec could not be found,
* it returns a default (Latin-1) codec
*/
- QTextCodec *codecForName(const QString &name) const;
+ TQTextCodec *codecForName(const TQString &name) const;
/**
- * Tries to find a QTextCodec to convert the given encoding from and to
+ * Tries to find a TQTextCodec to convert the given encoding from and to
* Unicode. If no codec could be found the latin1 codec will be returned an
* @p ok will be set to false.
- * @return the QTextCodec. If the desired codec could not be found,
+ * @return the TQTextCodec. If the desired codec could not be found,
* it returns a default (Latin-1) codec
*/
- QTextCodec *codecForName(const QString &n, bool &ok) const;
+ TQTextCodec *codecForName(const TQString &n, bool &ok) const;
/**
* Converts an entity to a character. The string must contain only the
* entity without the trailing ';'.
* @param str the entity
- * @return QChar::null if the entity could not be decoded.
+ * @return TQChar::null if the entity could not be decoded.
*/
- static QChar fromEntity(const QString &str);
+ static TQChar fromEntity(const TQString &str);
/**
* Overloaded member function. Tries to find an entity in the
- * QString str.
+ * TQString str.
* @param str the string containing entified
* @param len is a return value, that gives the length of the decoded
* entity.
- * @return a decoded entity if one could be found, QChar::null
+ * @return a decoded entity if one could be found, TQChar::null
* otherwise
*/
- static QChar fromEntity(const QString &str, int &len);
+ static TQChar fromEntity(const TQString &str, int &len);
/**
- * Converts a QChar to an entity. The returned string does already
+ * Converts a TQChar to an entity. The returned string does already
* contain the leading '&' and the trailing ';'.
* @param ch the char to convert
* @return the entity
*/
- static QString toEntity(const QChar &ch);
+ static TQString toEntity(const TQChar &ch);
/**
* Scans the given string for entities (like &amp;amp;) and resolves them
@@ -107,33 +107,33 @@ public:
* @return the clean string
* @since 3.1
*/
- static QString resolveEntities( const QString &text );
+ static TQString resolveEntities( const TQString &text );
/**
* Lists all available encodings as names.
* @return the list of all encodings
*/
- QStringList availableEncodingNames();
+ TQStringList availableEncodingNames();
/**
* Lists the available encoding names together with a more descriptive language.
* @return the list of descriptive encoding names
*/
- QStringList descriptiveEncodingNames();
+ TQStringList descriptiveEncodingNames();
/**
* Returns the language the encoding is used for.
* @param encoding the encoding for the language
* @return the language of the encoding
*/
- QString languageForEncoding( const QString &encoding );
+ TQString languageForEncoding( const TQString &encoding );
/**
* Returns the encoding for a string obtained with descriptiveEncodingNames().
* @param descriptiveName the descriptive name for the encoding
* @return the name of the encoding
*/
- QString encodingForName( const QString &descriptiveName );
+ TQString encodingForName( const TQString &descriptiveName );
private:
KCharsetsPrivate *d;
diff --git a/kdecore/kcheckaccelerators.cpp b/kdecore/kcheckaccelerators.cpp
index 98d8f2440..7b1d3621b 100644
--- a/kdecore/kcheckaccelerators.cpp
+++ b/kdecore/kcheckaccelerators.cpp
@@ -21,23 +21,23 @@
// $Id$
#define INCLUDE_MENUITEM_DEF
-#include <qmenudata.h>
+#include <tqmenudata.h>
#include "config.h"
#include "kcheckaccelerators.h"
#include "kaccelmanager.h"
-#include <qpopupmenu.h>
-#include <qapplication.h>
-#include <qdialog.h>
-#include <qlayout.h>
-#include <qtextview.h>
-#include <qobjectlist.h>
-#include <qmenubar.h>
-#include <qtabbar.h>
-#include <qpushbutton.h>
-#include <qmetaobject.h>
-#include <qcheckbox.h>
+#include <tqpopupmenu.h>
+#include <tqapplication.h>
+#include <tqdialog.h>
+#include <tqlayout.h>
+#include <tqtextview.h>
+#include <tqobjectlist.h>
+#include <tqmenubar.h>
+#include <tqtabbar.h>
+#include <tqpushbutton.h>
+#include <tqmetaobject.h>
+#include <tqcheckbox.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -76,12 +76,12 @@
accelerators.
*/
-KCheckAccelerators::KCheckAccelerators( QObject* parent )
- : QObject( parent, "kapp_accel_filter" ), key(0), block( false ), drklash(0)
+KCheckAccelerators::KCheckAccelerators( TQObject* parent )
+ : TQObject( parent, "kapp_accel_filter" ), key(0), block( false ), drklash(0)
{
parent->installEventFilter( this );
KConfigGroupSaver saver( KGlobal::config(), "Development" );
- QString sKey = KGlobal::config()->readEntry( "CheckAccelerators" ).stripWhiteSpace();
+ TQString sKey = KGlobal::config()->readEntry( "CheckAccelerators" ).stripWhiteSpace();
if( !sKey.isEmpty() ) {
KShortcut cuts( sKey );
if( cuts.count() > 0 )
@@ -89,36 +89,36 @@ KCheckAccelerators::KCheckAccelerators( QObject* parent )
}
alwaysShow = KGlobal::config()->readBoolEntry( "AlwaysShowCheckAccelerators", false );
autoCheck = KGlobal::config()->readBoolEntry( "AutoCheckAccelerators", true );
- connect( &autoCheckTimer, SIGNAL( timeout()), SLOT( autoCheckSlot()));
+ connect( &autoCheckTimer, TQT_SIGNAL( timeout()), TQT_SLOT( autoCheckSlot()));
}
-bool KCheckAccelerators::eventFilter( QObject * , QEvent * e)
+bool KCheckAccelerators::eventFilter( TQObject * , TQEvent * e)
{
if ( block )
return false;
switch ( e->type() ) { // just simplify debuggin
- case QEvent::Accel:
- if ( key && (static_cast<QKeyEvent *>(e)->key() == key) ) {
+ case TQEvent::Accel:
+ if ( key && (static_cast<TQKeyEvent *>(e)->key() == key) ) {
block = true;
checkAccelerators( false );
block = false;
- static_cast<QKeyEvent *>(e)->accept();
+ static_cast<TQKeyEvent *>(e)->accept();
return true;
}
break;
- case QEvent::ChildInserted:
- case QEvent::ChildRemoved:
- case QEvent::Resize:
- case QEvent::LayoutHint:
- case QEvent::WindowActivate:
- case QEvent::WindowDeactivate:
+ case TQEvent::ChildInserted:
+ case TQEvent::ChildRemoved:
+ case TQEvent::Resize:
+ case TQEvent::LayoutHint:
+ case TQEvent::WindowActivate:
+ case TQEvent::WindowDeactivate:
if( autoCheck )
autoCheckTimer.start( 20, true ); // 20 ms
break;
- case QEvent::Timer:
- case QEvent::MouseMove:
- case QEvent::Paint:
+ case TQEvent::Timer:
+ case TQEvent::MouseMove:
+ case TQEvent::Paint:
return false;
default:
// kdDebug(125) << "KCheckAccelerators::eventFilter " << e->type() << " " << autoCheck << endl;
@@ -139,25 +139,25 @@ void KCheckAccelerators::autoCheckSlot()
block = false;
}
-void KCheckAccelerators::createDialog(QWidget *actWin, bool automatic)
+void KCheckAccelerators::createDialog(TQWidget *actWin, bool automatic)
{
if ( drklash )
return;
- drklash = new QDialog( actWin, "kapp_accel_check_dlg", false, Qt::WDestructiveClose);
+ drklash = new TQDialog( actWin, "kapp_accel_check_dlg", false, Qt::WDestructiveClose);
drklash->setCaption( i18n( "Dr. Klash' Accelerator Diagnosis" ));
drklash->resize( 500, 460 );
- QVBoxLayout* layout = new QVBoxLayout( drklash, 11, 6 );
+ TQVBoxLayout* layout = new TQVBoxLayout( drklash, 11, 6 );
layout->setAutoAdd( true );
- drklash_view = new QTextView( drklash );
- QCheckBox* disableAutoCheck = NULL;
+ drklash_view = new TQTextView( drklash );
+ TQCheckBox* disableAutoCheck = NULL;
if( automatic ) {
- disableAutoCheck = new QCheckBox( i18n( "&Disable automatic checking" ), drklash );
- connect(disableAutoCheck, SIGNAL(toggled(bool)), SLOT(slotDisableCheck(bool)));
+ disableAutoCheck = new TQCheckBox( i18n( "&Disable automatic checking" ), drklash );
+ connect(disableAutoCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotDisableCheck(bool)));
}
- QPushButton* btnClose = new QPushButton( i18n( "&Close" ), drklash );
+ TQPushButton* btnClose = new TQPushButton( i18n( "&Close" ), drklash );
btnClose->setDefault( true );
- connect( btnClose, SIGNAL( clicked() ), drklash, SLOT( close() ) );
+ connect( btnClose, TQT_SIGNAL( clicked() ), drklash, TQT_SLOT( close() ) );
if (disableAutoCheck)
disableAutoCheck->setFocus();
else
@@ -173,12 +173,12 @@ void KCheckAccelerators::slotDisableCheck(bool on)
void KCheckAccelerators::checkAccelerators( bool automatic )
{
- QWidget* actWin = qApp->activeWindow();
+ TQWidget* actWin = qApp->activeWindow();
if ( !actWin )
return;
KAcceleratorManager::manage(actWin);
- QString a, c, r;
+ TQString a, c, r;
KAcceleratorManager::last_manage(a, c, r);
if (automatic) // for now we only show dialogs on F12 checks
@@ -187,7 +187,7 @@ void KCheckAccelerators::checkAccelerators( bool automatic )
if (c.isEmpty() && r.isEmpty() && (automatic || a.isEmpty()))
return;
- QString s;
+ TQString s;
if ( ! c.isEmpty() ) {
s += i18n("<h2>Accelerators changed</h2>");
diff --git a/kdecore/kcheckaccelerators.h b/kdecore/kcheckaccelerators.h
index a01d76051..85a6f03f5 100644
--- a/kdecore/kcheckaccelerators.h
+++ b/kdecore/kcheckaccelerators.h
@@ -21,12 +21,12 @@
#ifndef KCHECKACCELERATORS_H_
#define KCHECKACCELERATORS_H_
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qkeysequence.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqkeysequence.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqtimer.h>
class QMenuData;
class QTextView;
@@ -71,11 +71,11 @@ public:
* Creates a KCheckAccelerators instance for the given object.
* @param parent the parent to check
*/
- KCheckAccelerators( QObject* parent );
+ KCheckAccelerators( TQObject* parent );
/**
* Re-implemented to filter the parent's events.
*/
- bool eventFilter( QObject * , QEvent * e);
+ bool eventFilter( TQObject * , TQEvent * e);
private:
void checkAccelerators( bool automatic );
@@ -83,10 +83,10 @@ private:
bool alwaysShow;
bool autoCheck;
bool block;
- QTimer autoCheckTimer;
- void createDialog(QWidget *parent, bool automatic);
- QGuardedPtr<QDialog> drklash;
- QTextView *drklash_view;
+ TQTimer autoCheckTimer;
+ void createDialog(TQWidget *parent, bool automatic);
+ TQGuardedPtr<TQDialog> drklash;
+ TQTextView *drklash_view;
private slots:
void autoCheckSlot();
diff --git a/kdecore/kckey.cpp b/kdecore/kckey.cpp
index 2a06a2c9c..0feea1d49 100644
--- a/kdecore/kckey.cpp
+++ b/kdecore/kckey.cpp
@@ -1,7 +1,7 @@
// This file has been automatically generated by "generate_keys.sh"
// Distributed under the GNU Library General Public License
-#include <qnamespace.h>
+#include <tqnamespace.h>
#include "kckey.h"
const KKeys kde_KKEYS[NB_KEYS] = {
diff --git a/kdecore/kclipboard.cpp b/kdecore/kclipboard.cpp
index 3a266c171..50073cc6a 100644
--- a/kdecore/kclipboard.cpp
+++ b/kdecore/kclipboard.cpp
@@ -41,8 +41,8 @@
class KClipboardSynchronizer::MimeSource : public QMimeSource
{
public:
- MimeSource( const QMimeSource * src )
- : QMimeSource(),
+ MimeSource( const TQMimeSource * src )
+ : TQMimeSource(),
m_formats( true ) // deep copies!
{
m_formats.setAutoDelete( true );
@@ -50,12 +50,12 @@ public:
if ( src )
{
- QByteArray *byteArray;
+ TQByteArray *byteArray;
const char *format;
int i = 0;
while ( (format = src->format( i++ )) )
{
- byteArray = new QByteArray();
+ byteArray = new TQByteArray();
*byteArray = src->encodedData( format ).copy();
m_data.append( byteArray );
m_formats.append( format );
@@ -74,18 +74,18 @@ public:
virtual bool provides( const char *mimeType ) const {
return ( m_formats.find( mimeType ) > -1 );
}
- virtual QByteArray encodedData( const char *format ) const
+ virtual TQByteArray encodedData( const char *format ) const
{
int index = m_formats.find( format );
if ( index > -1 )
return *(m_data.at( index ));
- return QByteArray();
+ return TQByteArray();
}
private:
- mutable QStrList m_formats;
- mutable QPtrList<QByteArray> m_data;
+ mutable TQStrList m_formats;
+ mutable TQPtrList<TQByteArray> m_data;
};
@@ -102,8 +102,8 @@ KClipboardSynchronizer * KClipboardSynchronizer::self()
return s_self;
}
-KClipboardSynchronizer::KClipboardSynchronizer( QObject *parent, const char *name )
- : QObject( parent, name )
+KClipboardSynchronizer::KClipboardSynchronizer( TQObject *parent, const char *name )
+ : TQObject( parent, name )
{
s_self = this;
@@ -123,19 +123,19 @@ KClipboardSynchronizer::~KClipboardSynchronizer()
void KClipboardSynchronizer::setupSignals()
{
- QClipboard *clip = QApplication::clipboard();
+ QClipboard *clip = TQApplication::clipboard();
disconnect( clip, NULL, this, NULL );
if( s_sync )
- connect( clip, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( clip, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
if( s_reverse_sync )
- connect( clip, SIGNAL( dataChanged() ),
- SLOT( slotClipboardChanged() ));
+ connect( clip, TQT_SIGNAL( dataChanged() ),
+ TQT_SLOT( slotClipboardChanged() ));
}
void KClipboardSynchronizer::slotSelectionChanged()
{
- QClipboard *clip = QApplication::clipboard();
+ QClipboard *clip = TQApplication::clipboard();
// qDebug("*** sel changed: %i", s_blocked);
if ( s_blocked || !clip->ownsSelection() )
@@ -147,7 +147,7 @@ void KClipboardSynchronizer::slotSelectionChanged()
void KClipboardSynchronizer::slotClipboardChanged()
{
- QClipboard *clip = QApplication::clipboard();
+ QClipboard *clip = TQApplication::clipboard();
// qDebug("*** clip changed : %i (implicit: %i, ownz: clip: %i, selection: %i)", s_blocked, s_implicitSelection, clip->ownsClipboard(), clip->ownsSelection());
if ( s_blocked || !clip->ownsClipboard() )
@@ -157,11 +157,11 @@ void KClipboardSynchronizer::slotClipboardChanged()
QClipboard::Selection );
}
-void KClipboardSynchronizer::setClipboard( QMimeSource *data, QClipboard::Mode mode )
+void KClipboardSynchronizer::setClipboard( TQMimeSource *data, QClipboard::Mode mode )
{
// qDebug("---> setting clipboard: %p", data);
- QClipboard *clip = QApplication::clipboard();
+ QClipboard *clip = TQApplication::clipboard();
s_blocked = true;
diff --git a/kdecore/kclipboard.h b/kdecore/kclipboard.h
index bfd5cf8c4..593164f54 100644
--- a/kdecore/kclipboard.h
+++ b/kdecore/kclipboard.h
@@ -19,10 +19,10 @@
#ifndef KCLIPBOARD_H
#define KCLIPBOARD_H
-#include <qclipboard.h>
-#include <qmime.h>
-#include <qobject.h>
-#include <qstrlist.h>
+#include <tqclipboard.h>
+#include <tqmime.h>
+#include <tqobject.h>
+#include <tqstrlist.h>
#include "kdelibs_export.h"
/**
@@ -100,10 +100,10 @@ private slots:
void slotClipboardChanged();
private:
- KClipboardSynchronizer( QObject *parent = 0, const char *name = 0L );
+ KClipboardSynchronizer( TQObject *parent = 0, const char *name = 0L );
void setupSignals();
- static void setClipboard( QMimeSource* data, QClipboard::Mode mode );
+ static void setClipboard( TQMimeSource* data, QClipboard::Mode mode );
static KClipboardSynchronizer *s_self;
static bool s_sync;
diff --git a/kdecore/kcmdlineargs.cpp b/kdecore/kcmdlineargs.cpp
index c99903009..6a032f748 100644
--- a/kdecore/kcmdlineargs.cpp
+++ b/kdecore/kcmdlineargs.cpp
@@ -30,10 +30,10 @@
#include <limits.h>
#endif
-#include <qdir.h>
-#include <qfile.h>
-#include <qasciidict.h>
-#include <qstrlist.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqasciidict.h>
+#include <tqstrlist.h>
#include "kcmdlineargs.h"
#include <kaboutdata.h>
@@ -53,37 +53,37 @@
#include <win32_utils.h>
#endif
-template class QAsciiDict<QCString>;
-template class QPtrList<KCmdLineArgs>;
+template class TQAsciiDict<TQCString>;
+template class TQPtrList<KCmdLineArgs>;
-class KCmdLineParsedOptions : public QAsciiDict<QCString>
+class KCmdLineParsedOptions : public TQAsciiDict<TQCString>
{
public:
KCmdLineParsedOptions()
- : QAsciiDict<QCString>( 7 ) { }
+ : TQAsciiDict<TQCString>( 7 ) { }
// WABA: Huh?
// The compiler doesn't find KCmdLineParsedOptions::write(s) by itself ???
// WABA: No, because there is another write function that hides the
// write function in the base class even though this function has a
// different signature. (obscure C++ feature)
- QDataStream& save( QDataStream &s) const
- { return QGDict::write(s); }
+ TQDataStream& save( TQDataStream &s) const
+ { return TQGDict::write(s); }
- QDataStream& load( QDataStream &s)
- { return QGDict::read(s); }
+ TQDataStream& load( TQDataStream &s)
+ { return TQGDict::read(s); }
protected:
- virtual QDataStream& write( QDataStream &s, QPtrCollection::Item data) const
+ virtual TQDataStream& write( TQDataStream &s, TQPtrCollection::Item data) const
{
- QCString *str = (QCString *) data;
+ TQCString *str = (TQCString *) data;
s << (*str);
return s;
}
- virtual QDataStream& read( QDataStream &s, QPtrCollection::Item &item)
+ virtual TQDataStream& read( TQDataStream &s, TQPtrCollection::Item &item)
{
- QCString *str = new QCString;
+ TQCString *str = new QCString;
s >> (*str);
item = (void *)str;
return s;
@@ -95,16 +95,16 @@ class KCmdLineParsedArgs : public QStrList
{
public:
KCmdLineParsedArgs()
- : QStrList( true ) { }
- QDataStream& save( QDataStream &s) const
- { return QGList::write(s); }
+ : TQStrList( true ) { }
+ TQDataStream& save( TQDataStream &s) const
+ { return TQGList::write(s); }
- QDataStream& load( QDataStream &s)
- { return QGList::read(s); }
+ TQDataStream& load( TQDataStream &s)
+ { return TQGList::read(s); }
};
-class KCmdLineArgsList: public QPtrList<KCmdLineArgs>
+class KCmdLineArgsList: public TQPtrList<KCmdLineArgs>
{
public:
KCmdLineArgsList() { }
@@ -191,9 +191,9 @@ KCmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about, bool noKAp
KApplication::addCmdLineOptions();
}
-QString KCmdLineArgs::cwd()
+TQString KCmdLineArgs::cwd()
{
- return QFile::decodeName(QCString(mCwd));
+ return TQFile::decodeName(TQCString(mCwd));
}
const char * KCmdLineArgs::appName()
@@ -235,7 +235,7 @@ KCmdLineArgs::addCmdLineOptions( const KCmdLineOptions *options, const char *nam
}
void
-KCmdLineArgs::saveAppArgs( QDataStream &ds)
+KCmdLineArgs::saveAppArgs( TQDataStream &ds)
{
if (!parsed)
parseAllArgs();
@@ -244,7 +244,7 @@ KCmdLineArgs::saveAppArgs( QDataStream &ds)
removeArgs("qt");
removeArgs("kde");
- QCString qCwd = mCwd;
+ TQCString qCwd = mCwd;
ds << qCwd;
uint count = argsList ? argsList->count() : 0;
@@ -255,13 +255,13 @@ KCmdLineArgs::saveAppArgs( QDataStream &ds)
KCmdLineArgs *args;
for(args = argsList->first(); args; args = argsList->next())
{
- ds << QCString(args->id);
+ ds << TQCString(args->id);
args->save(ds);
}
}
void
-KCmdLineArgs::loadAppArgs( QDataStream &ds)
+KCmdLineArgs::loadAppArgs( TQDataStream &ds)
{
parsed = true; // don't reparse argc/argv!
@@ -280,7 +280,7 @@ KCmdLineArgs::loadAppArgs( QDataStream &ds)
if (ds.atEnd())
return;
- QCString qCwd;
+ TQCString qCwd;
ds >> qCwd;
delete [] mCwd;
@@ -292,7 +292,7 @@ KCmdLineArgs::loadAppArgs( QDataStream &ds)
while(count--)
{
- QCString id;
+ TQCString id;
ds >> id;
assert( argsList );
for(args = argsList->first(); args; args = argsList->next())
@@ -352,7 +352,7 @@ void KCmdLineArgs::removeArgs(const char *id)
* +4 - no more options follow // !fork
*/
static int
-findOption(const KCmdLineOptions *options, QCString &opt,
+findOption(const KCmdLineOptions *options, TQCString &opt,
const char *&opt_name, const char *&def, bool &enabled)
{
int result;
@@ -392,7 +392,7 @@ findOption(const KCmdLineOptions *options, QCString &opt,
options++;
if (!options->name)
return result+0;
- QCString nextOption = options->name;
+ TQCString nextOption = options->name;
int p = nextOption.find(' ');
if (p > 0)
nextOption = nextOption.left(p);
@@ -426,12 +426,12 @@ findOption(const KCmdLineOptions *options, QCString &opt,
void
-KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled, bool &moreOptions)
+KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, bool &moreOptions)
{
KCmdLineArgs *args = argsList->first();
const char *opt_name;
const char *def;
- QCString argument;
+ TQCString argument;
int j = opt.find('=');
if (j != -1)
{
@@ -455,7 +455,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
int p = 1;
while (true)
{
- QCString singleCharOption = " ";
+ TQCString singleCharOption = " ";
singleCharOption[0] = _opt[p];
args = argsList->first();
while (args)
@@ -497,7 +497,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
if (ignoreUnknown)
return;
enable_i18n();
- usage( i18n("Unknown option '%1'.").arg(QString::fromLocal8Bit(_opt)));
+ usage( i18n("Unknown option '%1'.").arg(TQString::fromLocal8Bit(_opt)));
}
if ((result & 4) != 0)
@@ -513,7 +513,7 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
if (ignoreUnknown)
return;
enable_i18n();
- usage( i18n("Unknown option '%1'.").arg(QString::fromLocal8Bit(_opt)));
+ usage( i18n("Unknown option '%1'.").arg(TQString::fromLocal8Bit(_opt)));
}
if (argument.isEmpty())
{
@@ -534,9 +534,9 @@ KCmdLineArgs::findOption(const char *_opt, QCString opt, int &i, bool _enabled,
}
void
-KCmdLineArgs::printQ(const QString &msg)
+KCmdLineArgs::printQ(const TQString &msg)
{
- QCString localMsg = msg.local8Bit();
+ TQCString localMsg = msg.local8Bit();
fprintf(stdout, "%s", localMsg.data());
}
@@ -593,9 +593,9 @@ KCmdLineArgs::parseAllArgs()
else if ( (::qstrcmp(option, "version") == 0) ||
(::qstrcmp(option, "v") == 0))
{
- printQ( QString("Qt: %1\n").arg(qVersion()));
- printQ( QString("KDE: %1\n").arg(KDE_VERSION_STRING));
- printQ( QString("%1: %2\n").
+ printQ( TQString("Qt: %1\n").arg(qVersion()));
+ printQ( TQString("KDE: %1\n").arg(KDE_VERSION_STRING));
+ printQ( TQString("%1: %2\n").
arg(about->programName()).arg(about->version()));
exit(0);
} else if ( (::qstrcmp(option, "license") == 0) )
@@ -607,16 +607,16 @@ KCmdLineArgs::parseAllArgs()
} else if ( ::qstrcmp( option, "author") == 0 ) {
enable_i18n();
if ( about ) {
- const QValueList<KAboutPerson> authors = about->authors();
+ const TQValueList<KAboutPerson> authors = about->authors();
if ( !authors.isEmpty() ) {
- QString authorlist;
- for (QValueList<KAboutPerson>::ConstIterator it = authors.begin(); it != authors.end(); ++it ) {
- QString email;
+ TQString authorlist;
+ for (TQValueList<KAboutPerson>::ConstIterator it = authors.begin(); it != authors.end(); ++it ) {
+ TQString email;
if ( !(*it).emailAddress().isEmpty() )
email = " <" + (*it).emailAddress() + ">";
- authorlist += QString(" ") + (*it).name() + email + "\n";
+ authorlist += TQString(" ") + (*it).name() + email + "\n";
}
- printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( QString(about->programName()) ).arg( authorlist ) );
+ printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( TQString(about->programName()) ).arg( authorlist ) );
}
} else {
printQ( i18n("This application was written by somebody who wants to remain anonymous.") );
@@ -657,7 +657,7 @@ KCmdLineArgs::parseAllArgs()
if (ignoreUnknown)
continue;
enable_i18n();
- usage( i18n("Unexpected argument '%1'.").arg(QString::fromLocal8Bit(argv[i])));
+ usage( i18n("Unexpected argument '%1'.").arg(TQString::fromLocal8Bit(argv[i])));
}
else
{
@@ -754,15 +754,15 @@ KCmdLineArgs::enable_i18n()
}
void
-KCmdLineArgs::usage(const QString &error)
+KCmdLineArgs::usage(const TQString &error)
{
assert(KGlobal::_locale);
- QCString localError = error.local8Bit();
+ TQCString localError = error.local8Bit();
if (localError[error.length()-1] == '\n')
localError = localError.left(error.length()-1);
fprintf(stderr, "%s: %s\n", argv[0], localError.data());
- QString tmp = i18n("Use --help to get a list of available command line options.");
+ TQString tmp = i18n("Use --help to get a list of available command line options.");
localError = tmp.local8Bit();
fprintf(stderr, "%s: %s\n", argv[0], localError.data());
exit(254);
@@ -775,11 +775,11 @@ KCmdLineArgs::usage(const char *id)
assert(argsList != 0); // It's an error to call usage(...) without
// having done addCmdLineOptions first!
- QString optionFormatString = " %1 %2\n";
- QString optionFormatStringDef = " %1 %2 [%3]\n";
- QString optionHeaderString = i18n("\n%1:\n");
- QString tmp;
- QString usage;
+ TQString optionFormatString = " %1 %2\n";
+ TQString optionFormatStringDef = " %1 %2 [%3]\n";
+ TQString optionHeaderString = i18n("\n%1:\n");
+ TQString tmp;
+ TQString usage;
KCmdLineArgs *args = argsList->last();
@@ -824,8 +824,8 @@ KCmdLineArgs::usage(const char *id)
{
if (args->name && args->id)
{
- QString option = QString("--help-%1").arg(args->id);
- QString desc = i18n("Show %1 specific options").arg(args->name);
+ TQString option = TQString("--help-%1").arg(args->id);
+ TQString desc = i18n("Show %1 specific options").arg(args->name);
printQ(optionFormatString.arg(option, -25).arg(desc));
}
@@ -856,22 +856,22 @@ KCmdLineArgs::usage(const char *id)
{
bool hasArgs = false;
bool hasOptions = false;
- QString optionsHeader;
+ TQString optionsHeader;
if (args->name)
- optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(QString::fromLatin1(args->name)));
+ optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(TQString::fromLatin1(args->name)));
else
optionsHeader = i18n("\nOptions:\n");
while (args)
{
const KCmdLineOptions *option = args->options;
- QCString opt = "";
+ TQCString opt = "";
//
while(option && option->name)
{
- QString description;
- QString descriptionRest;
- QStringList dl;
+ TQString description;
+ TQString descriptionRest;
+ TQStringList dl;
// Option header
if (option->name[0] == ':')
@@ -892,7 +892,7 @@ KCmdLineArgs::usage(const char *id)
{
if (option->description)
{
- QString tmp = "\n"+i18n(option->description);
+ TQString tmp = "\n"+i18n(option->description);
if (!tmp.endsWith("\n"))
tmp.append("\n");
printQ(tmp);
@@ -905,11 +905,11 @@ KCmdLineArgs::usage(const char *id)
if (option->description)
{
description = i18n(option->description);
- dl = QStringList::split("\n", description, true);
+ dl = TQStringList::split("\n", description, true);
description = dl.first();
dl.remove( dl.begin() );
}
- QCString name = option->name;
+ TQCString name = option->name;
if (name[0] == '!')
name = name.mid(1);
@@ -959,7 +959,7 @@ KCmdLineArgs::usage(const char *id)
opt = "";
}
}
- for(QStringList::Iterator it = dl.begin();
+ for(TQStringList::Iterator it = dl.begin();
it != dl.end();
++it)
{
@@ -1028,7 +1028,7 @@ KCmdLineArgs::reset()
}
void
-KCmdLineArgs::save( QDataStream &ds) const
+KCmdLineArgs::save( TQDataStream &ds) const
{
uint count = 0;
if (parsedOptionList)
@@ -1043,7 +1043,7 @@ KCmdLineArgs::save( QDataStream &ds) const
}
void
-KCmdLineArgs::load( QDataStream &ds)
+KCmdLineArgs::load( TQDataStream &ds)
{
if (!parsedOptionList) parsedOptionList = new KCmdLineParsedOptions;
if (!parsedArgList) parsedArgList = new KCmdLineParsedArgs;
@@ -1064,12 +1064,12 @@ KCmdLineArgs::load( QDataStream &ds)
}
void
-KCmdLineArgs::setOption(const QCString &opt, bool enabled)
+KCmdLineArgs::setOption(const TQCString &opt, bool enabled)
{
if (isQt)
{
// Qt does it own parsing.
- QCString arg = "-";
+ TQCString arg = "-";
if( !enabled )
arg += "no";
arg += opt;
@@ -1081,18 +1081,18 @@ KCmdLineArgs::setOption(const QCString &opt, bool enabled)
}
if (enabled)
- parsedOptionList->replace( opt, new QCString("t") );
+ parsedOptionList->replace( opt, new TQCString("t") );
else
- parsedOptionList->replace( opt, new QCString("f") );
+ parsedOptionList->replace( opt, new TQCString("f") );
}
void
-KCmdLineArgs::setOption(const QCString &opt, const char *value)
+KCmdLineArgs::setOption(const TQCString &opt, const char *value)
{
if (isQt)
{
// Qt does it's own parsing.
- QCString arg = "-";
+ TQCString arg = "-";
arg += opt;
addArgument(arg);
addArgument(value);
@@ -1110,13 +1110,13 @@ KCmdLineArgs::setOption(const QCString &opt, const char *value)
parsedOptionList->setAutoDelete(true);
}
- parsedOptionList->insert( opt, new QCString(value) );
+ parsedOptionList->insert( opt, new TQCString(value) );
}
QCString
KCmdLineArgs::getOption(const char *_opt) const
{
- QCString *value = 0;
+ TQCString *value = 0;
if (parsedOptionList)
{
value = parsedOptionList->find(_opt);
@@ -1129,7 +1129,7 @@ KCmdLineArgs::getOption(const char *_opt) const
const char *opt_name;
const char *def;
bool dummy = true;
- QCString opt = _opt;
+ TQCString opt = _opt;
int result = ::findOption( options, opt, opt_name, def, dummy) & ~4;
if (result != 3)
@@ -1142,7 +1142,7 @@ KCmdLineArgs::getOption(const char *_opt) const
assert( 0 );
exit(255);
}
- return QCString(def);
+ return TQCString(def);
}
QCStringList
@@ -1154,7 +1154,7 @@ KCmdLineArgs::getOptionList(const char *_opt) const
while(true)
{
- QCString *value = parsedOptionList->take(_opt);
+ TQCString *value = parsedOptionList->take(_opt);
if (!value)
break;
result.prepend(*value);
@@ -1170,7 +1170,7 @@ KCmdLineArgs::getOptionList(const char *_opt) const
it != result.end();
++it)
{
- parsedOptionList->insert(_opt, new QCString(*it));
+ parsedOptionList->insert(_opt, new TQCString(*it));
}
return result;
}
@@ -1182,7 +1182,7 @@ KCmdLineArgs::isSet(const char *_opt) const
const char *opt_name;
const char *def;
bool dummy = true;
- QCString opt = _opt;
+ TQCString opt = _opt;
int result = ::findOption( options, opt, opt_name, def, dummy) & ~4;
if (result == 0)
@@ -1196,7 +1196,7 @@ KCmdLineArgs::isSet(const char *_opt) const
exit(255);
}
- QCString *value = 0;
+ TQCString *value = 0;
if (parsedOptionList)
{
value = parsedOptionList->find(opt);
@@ -1250,8 +1250,8 @@ KCmdLineArgs::url(int n) const
KURL KCmdLineArgs::makeURL(const char *_urlArg)
{
- const QString urlArg = QFile::decodeName(_urlArg);
- QFileInfo fileInfo(urlArg);
+ const TQString urlArg = TQFile::decodeName(_urlArg);
+ TQFileInfo fileInfo(urlArg);
if (!fileInfo.isRelative()) { // i.e. starts with '/', on unix
KURL result;
result.setPath(urlArg);
diff --git a/kdecore/kcmdlineargs.h b/kdecore/kcmdlineargs.h
index 278ad976e..b4386c629 100644
--- a/kdecore/kcmdlineargs.h
+++ b/kdecore/kcmdlineargs.h
@@ -22,11 +22,11 @@
#include "kdelibs_export.h"
#include <kurl.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
* @short Structure that holds command line options.
@@ -118,13 +118,13 @@ class KCmdLineArgsPrivate;
* ....
*
* // An option which takes an additional argument
- * QCString anotherOptionArg = args->getOption("another-option");
+ * TQCString anotherOptionArg = args->getOption("another-option");
*
* // Arguments (e.g. files to open)
* for(int i = 0; i < args->count(); i++) // Counting start at 0!
* {
* // don't forget to convert to Unicode!
- * openFile( QFile::decodeName( args->arg(i)));
+ * openFile( TQFile::decodeName( args->arg(i)));
* // Or more convenient:
* // openURL( args->url(i));
*
@@ -223,7 +223,7 @@ class KDECORE_EXPORT KCmdLineArgs
{
friend class KApplication;
friend class KUniqueApplication;
- friend class QPtrList<KCmdLineArgs>;
+ friend class TQPtrList<KCmdLineArgs>;
public:
// Static functions:
@@ -242,7 +242,7 @@ public:
* @param _description A short description of what your application is about.
* @param _version A version.
* @param noKApp Set this true to not add commandline options for
- * QApplication / KApplication
+ * TQApplication / KApplication
*
* @since 3.2
*/
@@ -270,7 +270,7 @@ public:
* @param _argv As passed to @p main(...).
* @param about A KAboutData object describing your program.
* @param noKApp Set this true to not add commandline options for
- * QApplication / KApplication
+ * TQApplication / KApplication
*/
static void init(int _argc, char **_argv,
const KAboutData *about, bool noKApp = false);
@@ -378,7 +378,7 @@ public:
* where the user started a second instance.
* @return the current working directory
**/
- static QString cwd();
+ static TQString cwd();
/**
* Get the appname according to argv[0].
@@ -399,7 +399,7 @@ public:
* Print an error to stderr and the usage help to stdout and exit.
* @param error the error to print
**/
- static void usage(const QString &error);
+ static void usage(const TQString &error);
/**
* Enable i18n to be able to print a translated error message.
@@ -430,7 +430,7 @@ public:
* If the option was present more than the value of the
* last occurrence is used.
*/
- QCString getOption(const char *option) const;
+ TQCString getOption(const char *option) const;
/**
* Read out all occurrences of a string option.
@@ -532,7 +532,7 @@ public:
/**
* Load arguments from a stream.
*/
- static void loadAppArgs( QDataStream &);
+ static void loadAppArgs( TQDataStream &);
/**
* Add standard option --tempfile
@@ -571,7 +571,7 @@ private:
*
* Checks what to do with a single option
*/
- static void findOption(const char *_opt, QCString opt, int &i, bool enabled, bool &moreOptions);
+ static void findOption(const char *_opt, TQCString opt, int &i, bool enabled, bool &moreOptions);
/**
* @internal
@@ -610,21 +610,21 @@ private:
*
* Save all but the Qt and KDE arguments to a stream.
*/
- static void saveAppArgs( QDataStream &);
+ static void saveAppArgs( TQDataStream &);
/**
* @internal
*
* Set a boolean option
*/
- void setOption(const QCString &option, bool enabled);
+ void setOption(const TQCString &option, bool enabled);
/**
* @internal
*
* Set a string option
*/
- void setOption(const QCString &option, const char *value);
+ void setOption(const TQCString &option, const char *value);
/**
* @internal
@@ -638,14 +638,14 @@ private:
*
* Save to a stream.
*/
- void save( QDataStream &) const;
+ void save( TQDataStream &) const;
/**
* @internal
*
* Restore from a stream.
*/
- void load( QDataStream &);
+ void load( TQDataStream &);
/**
* @internal for KApplication only
@@ -664,7 +664,7 @@ private:
*/
static void initIgnore(int _argc, char **_argv, const char *_appname);
- static void printQ(const QString &msg);
+ static void printQ(const TQString &msg);
const KCmdLineOptions *options;
const char *name;
diff --git a/kdecore/kcompletion.cpp b/kdecore/kcompletion.cpp
index dfa8f351b..84a4cfca2 100644
--- a/kdecore/kcompletion.cpp
+++ b/kdecore/kcompletion.cpp
@@ -24,7 +24,7 @@
#include <knotifyclient.h>
#include <kglobal.h>
-#include <qptrvector.h>
+#include <tqptrvector.h>
#include "kcompletion.h"
#include "kcompletion_private.h"
@@ -68,17 +68,17 @@ void KCompletion::setIgnoreCase( bool ignoreCase )
myIgnoreCase = ignoreCase;
}
-void KCompletion::setItems( const QStringList& items )
+void KCompletion::setItems( const TQStringList& items )
{
clear();
insertItems( items );
}
-void KCompletion::insertItems( const QStringList& items )
+void KCompletion::insertItems( const TQStringList& items )
{
bool weighted = (myOrder == Weighted);
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
if ( weighted ) { // determine weight
for ( it = items.begin(); it != items.end(); ++it )
addWeightedItem( *it );
@@ -89,11 +89,11 @@ void KCompletion::insertItems( const QStringList& items )
}
}
-QStringList KCompletion::items() const
+TQStringList KCompletion::items() const
{
KCompletionMatchesWrapper list; // unsorted
bool addWeight = (myOrder == Weighted);
- extractStringsFromNode( myTreeRoot, QString::null, &list, addWeight );
+ extractStringsFromNode( myTreeRoot, TQString::null, &list, addWeight );
return list.list();
}
@@ -103,16 +103,16 @@ bool KCompletion::isEmpty() const
return (myTreeRoot->childrenCount() == 0);
}
-void KCompletion::addItem( const QString& item )
+void KCompletion::addItem( const TQString& item )
{
d->matches.clear();
myRotationIndex = 0;
- myLastString = QString::null;
+ myLastString = TQString::null;
addItem( item, 0 );
}
-void KCompletion::addItem( const QString& item, uint weight )
+void KCompletion::addItem( const TQString& item, uint weight )
{
if ( item.isEmpty() )
return;
@@ -139,7 +139,7 @@ void KCompletion::addItem( const QString& item, uint weight )
// qDebug("*** added: %s (%i)", item.latin1(), node->weight());
}
-void KCompletion::addWeightedItem( const QString& item )
+void KCompletion::addWeightedItem( const TQString& item )
{
if ( myOrder != Weighted ) {
addItem( item, 0 );
@@ -165,11 +165,11 @@ void KCompletion::addWeightedItem( const QString& item )
}
-void KCompletion::removeItem( const QString& item )
+void KCompletion::removeItem( const TQString& item )
{
d->matches.clear();
myRotationIndex = 0;
- myLastString = QString::null;
+ myLastString = TQString::null;
myTreeRoot->remove( item );
}
@@ -179,17 +179,17 @@ void KCompletion::clear()
{
d->matches.clear();
myRotationIndex = 0;
- myLastString = QString::null;
+ myLastString = TQString::null;
delete myTreeRoot;
myTreeRoot = new KCompTreeNode;
}
-QString KCompletion::makeCompletion( const QString& string )
+TQString KCompletion::makeCompletion( const TQString& string )
{
if ( myCompletionMode == KGlobalSettings::CompletionNone )
- return QString::null;
+ return TQString::null;
//kdDebug(0) << "KCompletion: completing: " << string << endl;
@@ -207,17 +207,17 @@ QString KCompletion::makeCompletion( const QString& string )
// postProcessMatch() during rotation
findAllCompletions( string, &d->matches, myHasMultipleMatches );
- QStringList l = d->matches.list();
+ TQStringList l = d->matches.list();
postProcessMatches( &l );
emit matches( l );
if ( l.isEmpty() )
doBeep( NoMatch );
- return QString::null;
+ return TQString::null;
}
- QString completion;
+ TQString completion;
// in case-insensitive popup mode, we search all completions at once
if ( myCompletionMode == KGlobalSettings::CompletionPopup ||
myCompletionMode == KGlobalSettings::CompletionPopupAuto ) {
@@ -248,14 +248,14 @@ QString KCompletion::makeCompletion( const QString& string )
}
-QStringList KCompletion::substringCompletion( const QString& string ) const
+TQStringList KCompletion::substringCompletion( const TQString& string ) const
{
// get all items in the tree, possibly in sorted order
bool sorted = (myOrder == Weighted);
KCompletionMatchesWrapper allItems( sorted );
- extractStringsFromNode( myTreeRoot, QString::null, &allItems, false );
+ extractStringsFromNode( myTreeRoot, TQString::null, &allItems, false );
- QStringList list = allItems.list();
+ TQStringList list = allItems.list();
// subStringMatches is invoked manually, via a shortcut, so we should
// beep here, if necessary.
@@ -269,11 +269,11 @@ QStringList KCompletion::substringCompletion( const QString& string ) const
return list;
}
- QStringList matches;
- QStringList::ConstIterator it = list.begin();
+ TQStringList matches;
+ TQStringList::ConstIterator it = list.begin();
for( ; it != list.end(); ++it ) {
- QString item = *it;
+ TQString item = *it;
if ( item.find( string, 0, false ) != -1 ) { // always case insensitive
matches.append( item );
}
@@ -293,7 +293,7 @@ void KCompletion::setCompletionMode( KGlobalSettings::Completion mode )
myCompletionMode = mode;
}
-QStringList KCompletion::allMatches()
+TQStringList KCompletion::allMatches()
{
// Don't use d->matches since calling postProcessMatches()
// on d->matches here would interfere with call to
@@ -301,7 +301,7 @@ QStringList KCompletion::allMatches()
KCompletionMatchesWrapper matches( myOrder == Weighted );
bool dummy;
findAllCompletions( myLastString, &matches, dummy );
- QStringList l = matches.list();
+ TQStringList l = matches.list();
postProcessMatches( &l );
return l;
}
@@ -319,17 +319,17 @@ KCompletionMatches KCompletion::allWeightedMatches()
return ret;
}
-QStringList KCompletion::allMatches( const QString &string )
+TQStringList KCompletion::allMatches( const TQString &string )
{
KCompletionMatchesWrapper matches( myOrder == Weighted );
bool dummy;
findAllCompletions( string, &matches, dummy );
- QStringList l = matches.list();
+ TQStringList l = matches.list();
postProcessMatches( &l );
return l;
}
-KCompletionMatches KCompletion::allWeightedMatches( const QString &string )
+KCompletionMatches KCompletion::allWeightedMatches( const TQString &string )
{
KCompletionMatchesWrapper matches( myOrder == Weighted );
bool dummy;
@@ -343,9 +343,9 @@ KCompletionMatches KCompletion::allWeightedMatches( const QString &string )
///////////////// tree operations ///////////////////
-QString KCompletion::nextMatch()
+TQString KCompletion::nextMatch()
{
- QString completion;
+ TQString completion;
myLastMatch = myCurrentMatch;
if ( d->matches.isEmpty() ) {
@@ -358,7 +358,7 @@ QString KCompletion::nextMatch()
return completion;
}
- QStringList matches = d->matches.list();
+ TQStringList matches = d->matches.list();
myLastMatch = matches[ myRotationIndex++ ];
if ( myRotationIndex == matches.count() -1 )
@@ -376,9 +376,9 @@ QString KCompletion::nextMatch()
-QString KCompletion::previousMatch()
+TQString KCompletion::previousMatch()
{
- QString completion;
+ TQString completion;
myLastMatch = myCurrentMatch;
if ( d->matches.isEmpty() ) {
@@ -391,7 +391,7 @@ QString KCompletion::previousMatch()
return completion;
}
- QStringList matches = d->matches.list();
+ TQStringList matches = d->matches.list();
myLastMatch = matches[ myRotationIndex ];
if ( myRotationIndex == 1 )
doBeep( Rotation ); // indicate first item -> rotating
@@ -411,10 +411,10 @@ QString KCompletion::previousMatch()
// tries to complete "string" from the tree-root
-QString KCompletion::findCompletion( const QString& string )
+TQString KCompletion::findCompletion( const TQString& string )
{
- QChar ch;
- QString completion;
+ TQChar ch;
+ TQString completion;
const KCompTreeNode *node = myTreeRoot;
// start at the tree-root and try to find the search-string
@@ -425,7 +425,7 @@ QString KCompletion::findCompletion( const QString& string )
if ( node )
completion += ch;
else
- return QString::null; // no completion
+ return TQString::null; // no completion
}
// Now we have the last node of the to be completed string.
@@ -487,7 +487,7 @@ QString KCompletion::findCompletion( const QString& string )
}
-void KCompletion::findAllCompletions(const QString& string,
+void KCompletion::findAllCompletions(const TQString& string,
KCompletionMatchesWrapper *matches,
bool& hasMultipleMatches) const
{
@@ -497,13 +497,13 @@ void KCompletion::findAllCompletions(const QString& string,
return;
if ( myIgnoreCase ) { // case insensitive completion
- extractStringsFromNodeCI( myTreeRoot, QString::null, string, matches );
+ extractStringsFromNodeCI( myTreeRoot, TQString::null, string, matches );
hasMultipleMatches = (matches->count() > 1);
return;
}
- QChar ch;
- QString completion;
+ TQChar ch;
+ TQString completion;
const KCompTreeNode *node = myTreeRoot;
// start at the tree-root and try to find the search-string
@@ -543,7 +543,7 @@ void KCompletion::findAllCompletions(const QString& string,
void KCompletion::extractStringsFromNode( const KCompTreeNode *node,
- const QString& beginning,
+ const TQString& beginning,
KCompletionMatchesWrapper *matches,
bool addWeight ) const
{
@@ -552,8 +552,8 @@ void KCompletion::extractStringsFromNode( const KCompTreeNode *node,
// kDebug() << "Beginning: " << beginning << endl;
const KCompTreeChildren *list = node->children();
- QString string;
- QString w;
+ TQString string;
+ TQString w;
// loop thru all children
for ( KCompTreeNode *cur = list->begin(); cur ; cur = cur->next) {
@@ -586,8 +586,8 @@ void KCompletion::extractStringsFromNode( const KCompTreeNode *node,
}
void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node,
- const QString& beginning,
- const QString& restString,
+ const TQString& beginning,
+ const TQString& restString,
KCompletionMatchesWrapper *matches ) const
{
if ( restString.isEmpty() ) {
@@ -595,8 +595,8 @@ void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node,
return;
}
- QChar ch1 = restString.at(0);
- QString newRest = restString.mid(1);
+ TQChar ch1 = restString.at(0);
+ TQString newRest = restString.mid(1);
KCompTreeNode *child1, *child2;
child1 = node->find( ch1 ); // the correct match
@@ -607,7 +607,7 @@ void KCompletion::extractStringsFromNodeCI( const KCompTreeNode *node,
// append the case insensitive matches, if available
if ( ch1.isLetter() ) {
// find out if we have to lower or upper it. Is there a better way?
- QChar ch2 = ch1.lower();
+ TQChar ch2 = ch1.lower();
if ( ch1 == ch2 )
ch2 = ch1.upper();
if ( ch1 != ch2 ) {
@@ -624,23 +624,23 @@ void KCompletion::doBeep( BeepMode mode ) const
if ( !myBeep )
return;
- QString text, event;
+ TQString text, event;
switch ( mode ) {
case Rotation:
- event = QString::fromLatin1("Textcompletion: rotation");
+ event = TQString::fromLatin1("Textcompletion: rotation");
text = i18n("You reached the end of the list\nof matching items.\n");
break;
case PartialMatch:
if ( myCompletionMode == KGlobalSettings::CompletionShell ||
myCompletionMode == KGlobalSettings::CompletionMan ) {
- event = QString::fromLatin1("Textcompletion: partial match");
+ event = TQString::fromLatin1("Textcompletion: partial match");
text = i18n("The completion is ambiguous, more than one\nmatch is available.\n");
}
break;
case NoMatch:
if ( myCompletionMode == KGlobalSettings::CompletionShell ) {
- event = QString::fromLatin1("Textcompletion: no match");
+ event = TQString::fromLatin1("Textcompletion: no match");
text = i18n("There is no matching item available.\n");
}
break;
@@ -655,9 +655,9 @@ void KCompletion::doBeep( BeepMode mode ) const
/////////
-// Implements the tree. Every node is a QChar and has a list of children, which
+// Implements the tree. Every node is a TQChar and has a list of children, which
// are Nodes as well.
-// QChar( 0x0 ) is used as the delimiter of a string; the last child of each
+// TQChar( 0x0 ) is used as the delimiter of a string; the last child of each
// inserted string is 0x0.
KCompTreeNode::~KCompTreeNode()
@@ -674,7 +674,7 @@ KCompTreeNode::~KCompTreeNode()
// Adds a child-node "ch" to this node. If such a node is already existant,
// it will not be created. Returns the new/existing node.
-KCompTreeNode * KCompTreeNode::insert( const QChar& ch, bool sorted )
+KCompTreeNode * KCompTreeNode::insert( const TQChar& ch, bool sorted )
{
KCompTreeNode *child = find( ch );
if ( !child ) {
@@ -711,12 +711,12 @@ KCompTreeNode * KCompTreeNode::insert( const QChar& ch, bool sorted )
// Iteratively removes a string from the tree. The nicer recursive
// version apparently was a little memory hungry (see #56757)
-void KCompTreeNode::remove( const QString& str )
+void KCompTreeNode::remove( const TQString& str )
{
- QString string = str;
- string += QChar(0x0);
+ TQString string = str;
+ string += TQChar(0x0);
- QPtrVector<KCompTreeNode> deletables( string.length() + 1 );
+ TQPtrVector<KCompTreeNode> deletables( string.length() + 1 );
KCompTreeNode *child = 0L;
KCompTreeNode *parent = this;
@@ -743,7 +743,7 @@ void KCompTreeNode::remove( const QString& str )
}
}
-QStringList KCompletionMatchesWrapper::list() const
+TQStringList KCompletionMatchesWrapper::list() const
{
if ( sortedList && dirty ) {
sortedList->sort();
@@ -752,7 +752,7 @@ QStringList KCompletionMatchesWrapper::list() const
stringList.clear();
// high weight == sorted last -> reverse the sorting here
- QValueListConstIterator<KSortableItem<QString> > it;
+ TQValueListConstIterator<KSortableItem<TQString> > it;
for ( it = sortedList->begin(); it != sortedList->end(); ++it )
stringList.prepend( (*it).value() );
}
@@ -771,11 +771,11 @@ KCompletionMatches::KCompletionMatches( const KCompletionMatchesWrapper& matches
if( matches.sortedList != 0L )
KCompletionMatchesList::operator=( *matches.sortedList );
else {
- QStringList l = matches.list();
- for( QStringList::ConstIterator it = l.begin();
+ TQStringList l = matches.list();
+ for( TQStringList::ConstIterator it = l.begin();
it != l.end();
++it )
- prepend( KSortableItem<QString, int>( 1, *it ) );
+ prepend( KSortableItem<TQString, int>( 1, *it ) );
}
}
@@ -783,11 +783,11 @@ KCompletionMatches::~KCompletionMatches()
{
}
-QStringList KCompletionMatches::list( bool sort_P ) const
+TQStringList KCompletionMatches::list( bool sort_P ) const
{
if( _sorting && sort_P )
const_cast< KCompletionMatches* >( this )->sort();
- QStringList stringList;
+ TQStringList stringList;
// high weight == sorted last -> reverse the sorting here
for ( ConstIterator it = begin(); it != end(); ++it )
stringList.prepend( (*it).value() );
diff --git a/kdecore/kcompletion.h b/kdecore/kcompletion.h
index af4d5ee32..11e973dc8 100644
--- a/kdecore/kcompletion.h
+++ b/kdecore/kcompletion.h
@@ -20,12 +20,12 @@
#ifndef KCOMPLETION_H
#define KCOMPLETION_H
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
#include "kdelibs_export.h"
#include <kglobalsettings.h>
@@ -43,7 +43,7 @@ class QPopupMenu;
* @short A generic class for completing QStrings
*
* This class offers easy use of "auto-completion", "manual-completion" or
- * "shell completion" on QString objects. A common use is completing filenames
+ * "shell completion" on TQString objects. A common use is completing filenames
* or URLs (see KURLCompletion()).
* But it is not limited to URL-completion -- everything should be completable!
* The user should be able to complete email-addresses, telephone-numbers,
@@ -134,7 +134,7 @@ class KDECORE_EXPORT KCompletion : public QObject
Q_ENUMS( CompOrder )
Q_PROPERTY( CompOrder order READ order WRITE setOrder )
Q_PROPERTY( bool ignoreCase READ ignoreCase WRITE setIgnoreCase )
- Q_PROPERTY( QStringList items READ items WRITE setItems )
+ Q_PROPERTY( TQStringList items READ items WRITE setItems )
Q_OBJECT
public:
@@ -162,7 +162,7 @@ public:
/**
* Attempts to find an item in the list of available completions,
* that begins with @p string. Will either return the first matching item
- * (if there is more than one match) or QString::null, if no match was
+ * (if there is more than one match) or TQString::null, if no match was
* found.
*
* In the latter case, a sound will be issued, depending on
@@ -176,12 +176,12 @@ public:
* This happens only in shell-completion-mode.
*
* @param string the string to complete
- * @return the matching item, or QString::null if there is no matching
+ * @return the matching item, or TQString::null if there is no matching
* item.
* @see slotMakeCompletion
* @see substringCompletion
*/
- virtual QString makeCompletion( const QString& string );
+ virtual TQString makeCompletion( const TQString& string );
/**
* Returns a list of all completion items that contain the given @p string.
@@ -191,18 +191,18 @@ public:
*
* @see makeCompletion
*/
- QStringList substringCompletion( const QString& string ) const;
+ TQStringList substringCompletion( const TQString& string ) const;
/**
* Returns the next item from the matching-items-list.
* When reaching the beginning, the list is rotated so it will return the
* last match and a sound is issued (depending on isSoundsEnabled()).
* @return the next item from the matching-items-list.
- * When there is no match, QString::null is returned and
+ * When there is no match, TQString::null is returned and
* a sound is be issued.
* @see slotPreviousMatch
*/
- QString previousMatch();
+ TQString previousMatch();
/**
* Returns the next item from the matching-items-list.
@@ -210,18 +210,18 @@ public:
* the first match and a sound is issued (depending on
* isSoundsEnabled()).
* @return the next item from the matching-items-list. When there is no
- * match, QString::null is returned and a sound is issued
+ * match, TQString::null is returned and a sound is issued
* @see slotNextMatch
*/
- QString nextMatch();
+ TQString nextMatch();
/**
* Returns the last match. Might be useful if you need to check whether
* a completion is different from the last one.
- * @return the last match. QString::null is returned when there is no
+ * @return the last match. TQString::null is returned when there is no
* last match.
*/
- virtual const QString& lastMatch() const { return myLastMatch; }
+ virtual const TQString& lastMatch() const { return myLastMatch; }
/**
* Returns a list of all items inserted into KCompletion. This is useful
@@ -241,7 +241,7 @@ public:
* @return a list of all items
* @see setItems
*/
- QStringList items() const;
+ TQStringList items() const;
/**
* Returns true when the completion object contains no entries.
@@ -322,14 +322,14 @@ public:
* @return a list of all matches for the last completed string.
* @see substringCompletion
*/
- QStringList allMatches();
+ TQStringList allMatches();
/**
* Returns a list of all items matching @p string.
* @param string the string to match
* @return the list of all matches
*/
- QStringList allMatches( const QString& string );
+ TQStringList allMatches( const TQString& string );
/**
* Returns a list of all items matching the last completed string.
@@ -350,7 +350,7 @@ public:
* @param string the string to match
* @return a list of all matches
*/
- KCompletionMatches allWeightedMatches( const QString& string );
+ KCompletionMatches allWeightedMatches( const TQString& string );
/**
* Enables/disables playing a sound when
@@ -404,7 +404,7 @@ public slots:
* @param string the string to complete
* @see makeCompletion
*/
- void slotMakeCompletion( const QString& string ) {
+ void slotMakeCompletion( const TQString& string ) {
(void) makeCompletion( string );
}
@@ -433,7 +433,7 @@ public slots:
* Does the same as setItems(), but does not call clear() before.
* @param items the items to insert
*/
- void insertItems( const QStringList& items );
+ void insertItems( const TQStringList& items );
/**
* Sets the list of items available for completion. Removes all previous
@@ -450,7 +450,7 @@ public slots:
* @param list the list of items that are available for completion
* @see items
*/
- virtual void setItems( const QStringList& list);
+ virtual void setItems( const TQStringList& list);
/**
* Adds an item to the list of available completions.
@@ -458,7 +458,7 @@ public slots:
* won't work anymore).
* @param item the item to add
*/
- void addItem( const QString& item);
+ void addItem( const TQString& item);
/**
* Adds an item to the list of available completions.
@@ -471,7 +471,7 @@ public slots:
* @param item the item to add
* @param weight the weight of the item, default is 1
*/
- void addItem( const QString& item, uint weight );
+ void addItem( const TQString& item, uint weight );
/**
* Removes an item from the list of available completions.
@@ -479,7 +479,7 @@ public slots:
* won't work anymore).
* @param item the item to remove
*/
- void removeItem( const QString& item);
+ void removeItem( const TQString& item);
/**
* Removes all inserted items.
@@ -490,11 +490,11 @@ public slots:
signals:
/**
* The matching item. Will be emitted by makeCompletion(),
- * previousMatch() or nextMatch(). May be QString::null if there
+ * previousMatch() or nextMatch(). May be TQString::null if there
* is no matching item.
- * @param item the match, or QString::null if there is none
+ * @param item the match, or TQString::null if there is none
*/
- void match( const QString& item);
+ void match( const TQString& item);
/**
* All matching items. Will be emitted by makeCompletion() in shell-
@@ -502,7 +502,7 @@ signals:
* or more often.
* @param matchlist the list of matches
*/
- void matches( const QStringList& matchlist);
+ void matches( const TQStringList& matchlist);
/**
* This signal is emitted, when calling makeCompletion() and more than
@@ -525,7 +525,7 @@ protected:
* @param match the match to process
* @see postProcessMatches
*/
- virtual void postProcessMatch( QString *match ) const { Q_UNUSED(match) }
+ virtual void postProcessMatch( TQString *match ) const { Q_UNUSED(match) }
/**
* This method is called before a list of all available completions is
@@ -537,7 +537,7 @@ protected:
* @param matches the matches to process
* @see postProcessMatch
*/
- virtual void postProcessMatches( QStringList * matches ) const { Q_UNUSED(matches)}
+ virtual void postProcessMatches( TQStringList * matches ) const { Q_UNUSED(matches)}
/**
* This method is called before a list of all available completions is
@@ -552,19 +552,19 @@ protected:
virtual void postProcessMatches( KCompletionMatches * matches ) const {Q_UNUSED(matches)}
private:
- void addWeightedItem( const QString& );
- QString findCompletion( const QString& string );
- void findAllCompletions( const QString&,
+ void addWeightedItem( const TQString& );
+ TQString findCompletion( const TQString& string );
+ void findAllCompletions( const TQString&,
KCompletionMatchesWrapper *matches,
bool& hasMultipleMatches ) const;
void extractStringsFromNode( const KCompTreeNode *,
- const QString& beginning,
+ const TQString& beginning,
KCompletionMatchesWrapper *matches,
bool addWeight = false ) const;
void extractStringsFromNodeCI( const KCompTreeNode *,
- const QString& beginning,
- const QString& restString,
+ const TQString& beginning,
+ const TQString& restString,
KCompletionMatchesWrapper *matches) const;
enum BeepMode { NoMatch, PartialMatch, Rotation };
@@ -573,11 +573,11 @@ private:
KGlobalSettings::Completion myCompletionMode;
CompOrder myOrder;
- QString myLastString;
- QString myLastMatch;
- QString myCurrentMatch;
+ TQString myLastString;
+ TQString myLastMatch;
+ TQString myCurrentMatch;
KCompTreeNode * myTreeRoot;
- QStringList myRotations;
+ TQStringList myRotations;
bool myBeep;
bool myIgnoreCase;
bool myHasMultipleMatches;
@@ -591,7 +591,7 @@ private:
};
// some more helper stuff
-typedef KSortableValueList<QString> KCompletionMatchesList;
+typedef KSortableValueList<TQString> KCompletionMatchesList;
class KCompletionMatchesPrivate;
/**
@@ -607,7 +607,7 @@ class KCompletionMatchesPrivate;
* if( !location.startsWith( "www." ))
matches += completion->allWeightedmatches( "www." + location" );
* matches.removeDuplicates();
- * QStringList list = matches.list();
+ * TQStringList list = matches.list();
* \endcode
*
* @short List for keeping matches returned from KCompletion
@@ -627,12 +627,12 @@ public:
*/
void removeDuplicates();
/**
- * Returns the matches as a QStringList.
+ * Returns the matches as a TQStringList.
* @param sort if false, the matches won't be sorted before the conversion,
* use only if you're sure the sorting is not needed
* @return the list of matches
*/
- QStringList list( bool sort = true ) const;
+ TQStringList list( bool sort = true ) const;
/**
* If sorting() returns false, the matches aren't sorted by their weight,
* even if true is passed to list().
@@ -689,7 +689,7 @@ public:
// Map for the key binding types mentioned above.
- typedef QMap<KeyBindingType, KShortcut> KeyBindingMap;
+ typedef TQMap<KeyBindingType, KShortcut> KeyBindingMap;
/**
* Default constructor.
@@ -930,14 +930,14 @@ public:
*
* @param text the completed text to be set in the widget.
*/
- virtual void setCompletedText( const QString& text ) = 0;
+ virtual void setCompletedText( const TQString& text ) = 0;
/**
* A pure virtual function that must be implemented by
* all inheriting classes.
* @param items the list of completed items
*/
- virtual void setCompletedItems( const QStringList& items ) = 0;
+ virtual void setCompletedItems( const TQStringList& items ) = 0;
/**
* Returns a pointer to the completion object.
@@ -994,7 +994,7 @@ private:
// Stores the completion mode locally.
KGlobalSettings::Completion m_iCompletionMode;
// Pointer to Completion object.
- QGuardedPtr<KCompletion> m_pCompObj;
+ TQGuardedPtr<KCompletion> m_pCompObj;
// Keybindings
KeyBindingMap m_keyMap;
// we may act as a proxy to another KCompletionBase object
diff --git a/kdecore/kcompletion_private.h b/kdecore/kcompletion_private.h
index 10d978806..35c846593 100644
--- a/kdecore/kcompletion_private.h
+++ b/kdecore/kcompletion_private.h
@@ -21,7 +21,7 @@
#ifndef KCOMPLETION_PRIVATE_H
#define KCOMPLETION_PRIVATE_H
-#include <qstring.h>
+#include <tqstring.h>
#include <ksortablevaluelist.h>
class KCompTreeNode;
@@ -53,10 +53,10 @@ private:
typedef KCompTreeNodeList KCompTreeChildren;
/**
- * A helper class for KCompletion. Implements a tree of QChar.
+ * A helper class for KCompletion. Implements a tree of TQChar.
*
* The tree looks like this (containing the items "kde", "kde-ui",
- * "kde-core" and "pfeiffer". Every item is delimited with QChar( 0x0 )
+ * "kde-core" and "pfeiffer". Every item is delimited with TQChar( 0x0 )
*
* some_root_node
* / \
@@ -84,9 +84,9 @@ typedef KCompTreeNodeList KCompTreeChildren;
class KDECORE_EXPORT KCompTreeNode : public QChar
{
public:
- KCompTreeNode() : QChar(), myWeight(0) {}
- KCompTreeNode( const QChar& ch, uint weight = 0 )
- : QChar( ch ),
+ KCompTreeNode() : TQChar(), myWeight(0) {}
+ KCompTreeNode( const TQChar& ch, uint weight = 0 )
+ : TQChar( ch ),
myWeight( weight ) {}
~KCompTreeNode();
@@ -99,13 +99,13 @@ public:
// Returns a child of this node matching ch, if available.
// Otherwise, returns 0L
- inline KCompTreeNode * find( const QChar& ch ) const {
+ inline KCompTreeNode * find( const TQChar& ch ) const {
KCompTreeNode * cur = myChildren.begin();
while (cur && (*cur != ch)) cur = cur->next;
return cur;
}
- KCompTreeNode * insert( const QChar&, bool sorted );
- void remove( const QString& );
+ KCompTreeNode * insert( const TQChar&, bool sorted );
+ void remove( const TQString& );
inline int childrenCount() const { return myChildren.count(); }
@@ -129,7 +129,7 @@ public:
}
/* We want to handle a list of KCompTreeNodes on our own, to not
- need to use QValueList<>. And to make it even more fast we don't
+ need to use TQValueList<>. And to make it even more fast we don't
use an accessor, but just a public member. */
KCompTreeNode *next;
private:
@@ -141,7 +141,7 @@ private:
// some more helper stuff
-typedef KSortableValueList<QString> KCompletionMatchesList;
+typedef KSortableValueList<TQString> KCompletionMatchesList;
/**
* @internal
@@ -172,7 +172,7 @@ public:
return sortedList != 0L;
}
- void append( int i, const QString& string ) {
+ void append( int i, const TQString& string ) {
if ( sortedList )
sortedList->insert( i, string );
else
@@ -197,17 +197,17 @@ public:
return count() == 0;
}
- QString first() const {
+ TQString first() const {
return list().first();
}
- QString last() const {
+ TQString last() const {
return list().last();
}
- QStringList list() const;
+ TQStringList list() const;
- mutable QStringList stringList;
+ mutable TQStringList stringList;
KCompletionMatchesList *sortedList;
mutable bool dirty;
};
diff --git a/kdecore/kcompletionbase.cpp b/kdecore/kcompletionbase.cpp
index a9c70c7a1..9e7f6d746 100644
--- a/kdecore/kcompletionbase.cpp
+++ b/kdecore/kcompletionbase.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qobject.h>
+#include <tqobject.h>
#include <kcompletion.h>
diff --git a/kdecore/kconfig.cpp b/kdecore/kconfig.cpp
index 4712415f4..2531034ee 100644
--- a/kdecore/kconfig.cpp
+++ b/kdecore/kconfig.cpp
@@ -30,7 +30,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#include "kconfigbackend.h"
@@ -39,9 +39,9 @@
#include "kglobal.h"
#include "kstandarddirs.h"
#include "kstaticdeleter.h"
-#include <qtimer.h>
+#include <tqtimer.h>
-KConfig::KConfig( const QString& fileName,
+KConfig::KConfig( const TQString& fileName,
bool bReadOnly, bool bUseKderc, const char *resType )
: KConfigBase(), bGroupImmutable(false), bFileImmutable(false),
bForceGlobal(false)
@@ -104,9 +104,9 @@ void KConfig::rollback(bool bDeep)
(*aIt).bDirty = false;
}
-QStringList KConfig::groupList() const
+TQStringList KConfig::groupList() const
{
- QStringList retList;
+ TQStringList retList;
KEntryMapConstIterator aIt = aEntryMap.begin();
KEntryMapConstIterator aEnd = aEntryMap.end();
@@ -114,7 +114,7 @@ QStringList KConfig::groupList() const
{
while(aIt.key().mKey.isEmpty())
{
- QCString group = aIt.key().mGroup;
+ TQCString group = aIt.key().mGroup;
++aIt;
while (true)
{
@@ -127,7 +127,7 @@ QStringList KConfig::groupList() const
if (!aIt.key().bDefault && !(*aIt).bDeleted)
{
if (group != "$Version") // Special case!
- retList.append(QString::fromUtf8(group));
+ retList.append(TQString::fromUtf8(group));
break; // Group is non-empty, added, next group
}
++aIt;
@@ -138,11 +138,11 @@ QStringList KConfig::groupList() const
return retList;
}
-QMap<QString, QString> KConfig::entryMap(const QString &pGroup) const
+TQMap<TQString, TQString> KConfig::entryMap(const TQString &pGroup) const
{
- QCString pGroup_utf = pGroup.utf8();
+ TQCString pGroup_utf = pGroup.utf8();
KEntryKey groupKey( pGroup_utf, 0 );
- QMap<QString, QString> tmpMap;
+ TQMap<TQString, TQString> tmpMap;
KEntryMapConstIterator aIt = aEntryMap.find(groupKey);
if (aIt == aEntryMap.end())
@@ -152,7 +152,7 @@ QMap<QString, QString> KConfig::entryMap(const QString &pGroup) const
{
// Leave the default values out && leave deleted entries out
if (!aIt.key().bDefault && !(*aIt).bDeleted)
- tmpMap.insert(QString::fromUtf8(aIt.key().mKey), QString::fromUtf8((*aIt).mValue.data(), (*aIt).mValue.length()));
+ tmpMap.insert(TQString::fromUtf8(aIt.key().mKey), TQString::fromUtf8((*aIt).mValue.data(), (*aIt).mValue.length()));
}
return tmpMap;
@@ -175,9 +175,9 @@ void KConfig::reparseConfiguration()
bFileImmutable = bReadOnly;
}
-KEntryMap KConfig::internalEntryMap(const QString &pGroup) const
+KEntryMap KConfig::internalEntryMap(const TQString &pGroup) const
{
- QCString pGroup_utf = pGroup.utf8();
+ TQCString pGroup_utf = pGroup.utf8();
KEntry aEntry;
KEntryMapConstIterator aIt;
KEntryKey aKey(pGroup_utf, 0);
@@ -251,7 +251,7 @@ KEntry KConfig::lookupData(const KEntryKey &_key) const
}
}
-bool KConfig::internalHasGroup(const QCString &group) const
+bool KConfig::internalHasGroup(const TQCString &group) const
{
KEntryKey groupKey( group, 0);
@@ -284,15 +284,15 @@ KLockFile::Ptr KConfig::lockFile(bool bGlobal)
return aBackEnd->lockFile(bGlobal);
}
-void KConfig::checkUpdate(const QString &id, const QString &updateFile)
+void KConfig::checkUpdate(const TQString &id, const TQString &updateFile)
{
- QString oldGroup = group();
+ TQString oldGroup = group();
setGroup("$Version");
- QString cfg_id = updateFile+":"+id;
- QStringList ids = readListEntry("update_info");
+ TQString cfg_id = updateFile+":"+id;
+ TQStringList ids = readListEntry("update_info");
if (!ids.contains(cfg_id))
{
- QStringList args;
+ TQStringList args;
args << "--check" << updateFile;
KApplication::kdeinitExecWait("kconf_update", args);
reparseConfiguration();
@@ -300,22 +300,22 @@ void KConfig::checkUpdate(const QString &id, const QString &updateFile)
setGroup(oldGroup);
}
-KConfig* KConfig::copyTo(const QString &file, KConfig *config) const
+KConfig* KConfig::copyTo(const TQString &file, KConfig *config) const
{
if (!config)
- config = new KConfig(QString::null, false, false);
+ config = new KConfig(TQString::null, false, false);
config->backEnd->changeFileName(file, "config", false);
config->setReadOnly(false);
config->bFileImmutable = false;
config->backEnd->mConfigState = ReadWrite;
- QStringList groups = groupList();
- for(QStringList::ConstIterator it = groups.begin();
+ TQStringList groups = groupList();
+ for(TQStringList::ConstIterator it = groups.begin();
it != groups.end(); ++it)
{
- QMap<QString, QString> map = entryMap(*it);
+ TQMap<TQString, TQString> map = entryMap(*it);
config->setGroup(*it);
- for (QMap<QString,QString>::Iterator it2 = map.begin();
+ for (TQMap<TQString,TQString>::Iterator it2 = map.begin();
it2 != map.end(); ++it2)
{
config->writeEntry(it2.key(), it2.data());
@@ -328,14 +328,14 @@ KConfig* KConfig::copyTo(const QString &file, KConfig *config) const
void KConfig::virtual_hook( int id, void* data )
{ KConfigBase::virtual_hook( id, data ); }
-static KStaticDeleter< QValueList<KSharedConfig*> > sd;
-QValueList<KSharedConfig*> *KSharedConfig::s_list = 0;
+static KStaticDeleter< TQValueList<KSharedConfig*> > sd;
+TQValueList<KSharedConfig*> *KSharedConfig::s_list = 0;
-KSharedConfig::Ptr KSharedConfig::openConfig(const QString& fileName, bool readOnly, bool useKDEGlobals )
+KSharedConfig::Ptr KSharedConfig::openConfig(const TQString& fileName, bool readOnly, bool useKDEGlobals )
{
if (s_list)
{
- for(QValueList<KSharedConfig*>::ConstIterator it = s_list->begin();
+ for(TQValueList<KSharedConfig*>::ConstIterator it = s_list->begin();
it != s_list->end(); ++it)
{
if ((*it)->backEnd->fileName() == fileName &&
@@ -347,12 +347,12 @@ KSharedConfig::Ptr KSharedConfig::openConfig(const QString& fileName, bool readO
return new KSharedConfig(fileName, readOnly, useKDEGlobals);
}
-KSharedConfig::KSharedConfig( const QString& fileName, bool readonly, bool usekdeglobals)
+KSharedConfig::KSharedConfig( const TQString& fileName, bool readonly, bool usekdeglobals)
: KConfig(fileName, readonly, usekdeglobals)
{
if (!s_list)
{
- sd.setObject(s_list, new QValueList<KSharedConfig*>);
+ sd.setObject(s_list, new TQValueList<KSharedConfig*>);
}
s_list->append(this);
diff --git a/kdecore/kconfig.h b/kdecore/kconfig.h
index d8b4d7d54..4eb0ff84b 100644
--- a/kdecore/kconfig.h
+++ b/kdecore/kconfig.h
@@ -24,7 +24,7 @@
class QTimer;
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "kconfigbase.h"
#include "klockfile.h"
@@ -59,7 +59,7 @@ public:
* @param bUseKDEGlobals Toggle reading the global KDE configuration file.
* @param resType the place to look in (config, data, etc) See KStandardDirs.
*/
- KConfig( const QString& fileName = QString::null,
+ KConfig( const TQString& fileName = TQString::null,
bool bReadOnly = false, bool bUseKDEGlobals = true, const char *resType="config");
KConfig(KConfigBackEnd *backEnd, bool bReadOnly = false);
@@ -91,7 +91,7 @@ public:
* Returns a list of groups that are known.
* @return a list of of groups
*/
- virtual QStringList groupList() const;
+ virtual TQStringList groupList() const;
/**
* Returns a map (tree) of entries for all entries in a particular
@@ -104,7 +104,7 @@ public:
* @return A map of entries in the group specified, indexed by key.
* The returned map may be empty if the group is not found.
*/
- virtual QMap<QString, QString> entryMap(const QString &pGroup) const;
+ virtual TQMap<TQString, TQString> entryMap(const TQString &pGroup) const;
/**
* Clears all internal data structures and then reread
@@ -149,7 +149,7 @@ public:
* @param updateFile the file containing the update
* @since 3.1
*/
- void checkUpdate(const QString &id, const QString &updateFile);
+ void checkUpdate(const TQString &id, const TQString &updateFile);
/**
* Copies all entries from this config object to a new config
@@ -162,7 +162,7 @@ public:
* @param config optional config object to reuse
* @since 3.2
*/
- KConfig* copyTo(const QString &file, KConfig *config=0) const;
+ KConfig* copyTo(const TQString &file, KConfig *config=0) const;
/**
* Returns a lock file object for the configuration file or 0 if
@@ -186,7 +186,7 @@ protected:
* @param group The group to search for.
* @returns true if the group exists.
*/
- virtual bool internalHasGroup(const QCString &group) const;
+ virtual bool internalHasGroup(const TQCString &group) const;
/**
* @internal
@@ -198,7 +198,7 @@ protected:
* @param pGroup the group to provide a KEntryMap for.
* @return The map of the entries in the group.
*/
- virtual KEntryMap internalEntryMap(const QString &pGroup) const;
+ virtual KEntryMap internalEntryMap(const TQString &pGroup) const;
/**
* @internal
@@ -238,7 +238,7 @@ protected:
* keys which indicate the start of a group of entries.
*
* These special keys will have the .key portion of their KEntryKey
- * set to QString::null.
+ * set to TQString::null.
*/
KEntryMap aEntryMap;
@@ -272,7 +272,7 @@ private:
*/
class KDECORE_EXPORT KSharedConfig : public KConfig, public KShared
{
- friend class QValueList<KSharedConfig*>;
+ friend class TQValueList<KSharedConfig*>;
public:
typedef KSharedPtr<KSharedConfig> Ptr;
@@ -283,14 +283,14 @@ public:
* @param readOnly set the config object's read-only status
* @param bUseKDEGlobals Toggle reading the global KDE configuration file.
*/
- static KSharedConfig::Ptr openConfig(const QString& fileName, bool readOnly = false,
+ static KSharedConfig::Ptr openConfig(const TQString& fileName, bool readOnly = false,
bool bUseKDEGlobals = true);
private:
- KSharedConfig( const QString& fileName, bool readOnly, bool useKDEGlobals );
+ KSharedConfig( const TQString& fileName, bool readOnly, bool useKDEGlobals );
~KSharedConfig();
- static QValueList<KSharedConfig*> *s_list;
+ static TQValueList<KSharedConfig*> *s_list;
};
#endif
diff --git a/kdecore/kconfig_compiler/example/autoexample.cpp b/kdecore/kconfig_compiler/example/autoexample.cpp
index 528c12457..2c4e4d442 100644
--- a/kdecore/kconfig_compiler/example/autoexample.cpp
+++ b/kdecore/kconfig_compiler/example/autoexample.cpp
@@ -34,7 +34,7 @@
#include <kstandarddirs.h>
#include <kconfigdialog.h>
-#include <qlabel.h>
+#include <tqlabel.h>
int main( int argc, char **argv )
{
diff --git a/kdecore/kconfig_compiler/kconfig_compiler.cpp b/kdecore/kconfig_compiler/kconfig_compiler.cpp
index 9c245e319..f11394495 100644
--- a/kdecore/kconfig_compiler/kconfig_compiler.cpp
+++ b/kdecore/kconfig_compiler/kconfig_compiler.cpp
@@ -22,10 +22,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
+#include <tqregexp.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -52,25 +52,25 @@ static const KCmdLineOptions options[] =
bool globalEnums;
bool itemAccessors;
bool dpointer;
-QStringList allNames;
-QRegExp *validNameRegexp;
-QString This;
-QString Const;
+TQStringList allNames;
+TQRegExp *validNameRegexp;
+TQString This;
+TQString Const;
class CfgEntry
{
public:
struct Choice
{
- QString name;
- QString label;
- QString whatsThis;
+ TQString name;
+ TQString label;
+ TQString whatsThis;
};
- CfgEntry( const QString &group, const QString &type, const QString &key,
- const QString &name, const QString &label,
- const QString &whatsThis, const QString &code,
- const QString &defaultValue, const QValueList<Choice> &choices,
+ CfgEntry( const TQString &group, const TQString &type, const TQString &key,
+ const TQString &name, const TQString &label,
+ const TQString &whatsThis, const TQString &code,
+ const TQString &defaultValue, const TQValueList<Choice> &choices,
bool hidden )
: mGroup( group ), mType( type ), mKey( key ), mName( name ),
mLabel( label ), mWhatsThis( whatsThis ), mCode( code ),
@@ -79,53 +79,53 @@ class CfgEntry
{
}
- void setGroup( const QString &group ) { mGroup = group; }
- QString group() const { return mGroup; }
+ void setGroup( const TQString &group ) { mGroup = group; }
+ TQString group() const { return mGroup; }
- void setType( const QString &type ) { mType = type; }
- QString type() const { return mType; }
+ void setType( const TQString &type ) { mType = type; }
+ TQString type() const { return mType; }
- void setKey( const QString &key ) { mKey = key; }
- QString key() const { return mKey; }
+ void setKey( const TQString &key ) { mKey = key; }
+ TQString key() const { return mKey; }
- void setName( const QString &name ) { mName = name; }
- QString name() const { return mName; }
+ void setName( const TQString &name ) { mName = name; }
+ TQString name() const { return mName; }
- void setLabel( const QString &label ) { mLabel = label; }
- QString label() const { return mLabel; }
+ void setLabel( const TQString &label ) { mLabel = label; }
+ TQString label() const { return mLabel; }
- void setWhatsThis( const QString &whatsThis ) { mWhatsThis = whatsThis; }
- QString whatsThis() const { return mWhatsThis; }
+ void setWhatsThis( const TQString &whatsThis ) { mWhatsThis = whatsThis; }
+ TQString whatsThis() const { return mWhatsThis; }
- void setDefaultValue( const QString &d ) { mDefaultValue = d; }
- QString defaultValue() const { return mDefaultValue; }
+ void setDefaultValue( const TQString &d ) { mDefaultValue = d; }
+ TQString defaultValue() const { return mDefaultValue; }
- void setCode( const QString &d ) { mCode = d; }
- QString code() const { return mCode; }
+ void setCode( const TQString &d ) { mCode = d; }
+ TQString code() const { return mCode; }
- void setMinValue( const QString &d ) { mMin = d; }
- QString minValue() const { return mMin; }
+ void setMinValue( const TQString &d ) { mMin = d; }
+ TQString minValue() const { return mMin; }
- void setMaxValue( const QString &d ) { mMax = d; }
- QString maxValue() const { return mMax; }
+ void setMaxValue( const TQString &d ) { mMax = d; }
+ TQString maxValue() const { return mMax; }
- void setParam( const QString &d ) { mParam = d; }
- QString param() const { return mParam; }
+ void setParam( const TQString &d ) { mParam = d; }
+ TQString param() const { return mParam; }
- void setParamName( const QString &d ) { mParamName = d; }
- QString paramName() const { return mParamName; }
+ void setParamName( const TQString &d ) { mParamName = d; }
+ TQString paramName() const { return mParamName; }
- void setParamType( const QString &d ) { mParamType = d; }
- QString paramType() const { return mParamType; }
+ void setParamType( const TQString &d ) { mParamType = d; }
+ TQString paramType() const { return mParamType; }
- void setChoices( const QValueList<Choice> &d ) { mChoices = d; }
- QValueList<Choice> choices() const { return mChoices; }
+ void setChoices( const TQValueList<Choice> &d ) { mChoices = d; }
+ TQValueList<Choice> choices() const { return mChoices; }
- void setParamValues( const QStringList &d ) { mParamValues = d; }
- QStringList paramValues() const { return mParamValues; }
+ void setParamValues( const TQStringList &d ) { mParamValues = d; }
+ TQStringList paramValues() const { return mParamValues; }
- void setParamDefaultValues( const QStringList &d ) { mParamDefaultValues = d; }
- QString paramDefaultValue(int i) const { return mParamDefaultValues[i]; }
+ void setParamDefaultValues( const TQStringList &d ) { mParamDefaultValues = d; }
+ TQString paramDefaultValue(int i) const { return mParamDefaultValues[i]; }
void setParamMax( int d ) { mParamMax = d; }
int paramMax() const { return mParamMax; }
@@ -158,38 +158,38 @@ class CfgEntry
}
private:
- QString mGroup;
- QString mType;
- QString mKey;
- QString mName;
- QString mLabel;
- QString mWhatsThis;
- QString mCode;
- QString mDefaultValue;
- QString mParam;
- QString mParamName;
- QString mParamType;
- QValueList<Choice> mChoices;
- QStringList mParamValues;
- QStringList mParamDefaultValues;
+ TQString mGroup;
+ TQString mType;
+ TQString mKey;
+ TQString mName;
+ TQString mLabel;
+ TQString mWhatsThis;
+ TQString mCode;
+ TQString mDefaultValue;
+ TQString mParam;
+ TQString mParamName;
+ TQString mParamType;
+ TQValueList<Choice> mChoices;
+ TQStringList mParamValues;
+ TQStringList mParamDefaultValues;
int mParamMax;
bool mHidden;
- QString mMin;
- QString mMax;
+ TQString mMin;
+ TQString mMax;
};
class Param {
public:
- QString name;
- QString type;
+ TQString name;
+ TQString type;
};
// returns the name of an member variable
// use itemPath to know the full path
// like using d-> in case of dpointer
-static QString varName(const QString &n)
+static TQString varName(const TQString &n)
{
- QString result;
+ TQString result;
if ( !dpointer ) {
result = "m"+n;
result[1] = result[1].upper();
@@ -201,9 +201,9 @@ static QString varName(const QString &n)
return result;
}
-static QString varPath(const QString &n)
+static TQString varPath(const TQString &n)
{
- QString result;
+ TQString result;
if ( dpointer ) {
result = "d->"+varName(n);
}
@@ -213,16 +213,16 @@ static QString varPath(const QString &n)
return result;
}
-static QString enumName(const QString &n)
+static TQString enumName(const TQString &n)
{
- QString result = "Enum"+n;
+ TQString result = "Enum"+n;
result[4] = result[4].upper();
return result;
}
-static QString setFunction(const QString &n, const QString &className = QString::null)
+static TQString setFunction(const TQString &n, const TQString &className = TQString::null)
{
- QString result = "set"+n;
+ TQString result = "set"+n;
result[3] = result[3].upper();
if ( !className.isEmpty() )
@@ -231,9 +231,9 @@ static QString setFunction(const QString &n, const QString &className = QString:
}
-static QString getFunction(const QString &n, const QString &className = QString::null)
+static TQString getFunction(const TQString &n, const TQString &className = TQString::null)
{
- QString result = n;
+ TQString result = n;
result[0] = result[0].lower();
if ( !className.isEmpty() )
@@ -242,15 +242,15 @@ static QString getFunction(const QString &n, const QString &className = QString:
}
-static void addQuotes( QString &s )
+static void addQuotes( TQString &s )
{
if ( s.left( 1 ) != "\"" ) s.prepend( "\"" );
if ( s.right( 1 ) != "\"" ) s.append( "\"" );
}
-static QString quoteString( const QString &s )
+static TQString quoteString( const TQString &s )
{
- QString r = s;
+ TQString r = s;
r.replace( "\\", "\\\\" );
r.replace( "\"", "\\\"" );
r.replace( "\r", "" );
@@ -258,22 +258,22 @@ static QString quoteString( const QString &s )
return "\"" + r + "\"";
}
-static QString literalString( const QString &s )
+static TQString literalString( const TQString &s )
{
bool isAscii = true;
for(int i = s.length(); i--;)
if (s[i].unicode() > 127) isAscii = false;
if (isAscii)
- return "QString::fromLatin1( " + quoteString(s) + " )";
+ return "TQString::fromLatin1( " + quoteString(s) + " )";
else
- return "QString::fromUtf8( " + quoteString(s) + " )";
+ return "TQString::fromUtf8( " + quoteString(s) + " )";
}
-static QString dumpNode(const QDomNode &node)
+static TQString dumpNode(const TQDomNode &node)
{
- QString msg;
- QTextStream s(&msg, IO_WriteOnly );
+ TQString msg;
+ TQTextStream s(&msg, IO_WriteOnly );
node.save(s, 0);
msg = msg.simplifyWhiteSpace();
@@ -282,7 +282,7 @@ static QString dumpNode(const QDomNode &node)
return msg;
}
-static QString filenameOnly(QString path)
+static TQString filenameOnly(TQString path)
{
int i = path.findRev('/');
if (i >= 0)
@@ -290,10 +290,10 @@ static QString filenameOnly(QString path)
return path;
}
-static void preProcessDefault( QString &defaultValue, const QString &name,
- const QString &type,
- const QValueList<CfgEntry::Choice> &choices,
- QString &code )
+static void preProcessDefault( TQString &defaultValue, const TQString &name,
+ const TQString &type,
+ const TQValueList<CfgEntry::Choice> &choices,
+ TQString &code )
{
if ( type == "String" && !defaultValue.isEmpty() ) {
defaultValue = literalString(defaultValue);
@@ -302,33 +302,33 @@ static void preProcessDefault( QString &defaultValue, const QString &name,
defaultValue = literalString( defaultValue );
} else if ( (type == "StringList" || type == "PathList") && !defaultValue.isEmpty() ) {
- QTextStream cpp( &code, IO_WriteOnly | IO_Append );
+ TQTextStream cpp( &code, IO_WriteOnly | IO_Append );
if (!code.isEmpty())
cpp << endl;
- cpp << " QStringList default" << name << ";" << endl;
- QStringList defaults = QStringList::split( ",", defaultValue );
- QStringList::ConstIterator it;
+ cpp << " TQStringList default" << name << ";" << endl;
+ TQStringList defaults = TQStringList::split( ",", defaultValue );
+ TQStringList::ConstIterator it;
for( it = defaults.begin(); it != defaults.end(); ++it ) {
- cpp << " default" << name << ".append( QString::fromUtf8( \"" << *it << "\" ) );"
+ cpp << " default" << name << ".append( TQString::fromUtf8( \"" << *it << "\" ) );"
<< endl;
}
defaultValue = "default" + name;
} else if ( type == "Color" && !defaultValue.isEmpty() ) {
- QRegExp colorRe("\\d+,\\s*\\d+,\\s*\\d+");
+ TQRegExp colorRe("\\d+,\\s*\\d+,\\s*\\d+");
if (colorRe.exactMatch(defaultValue))
{
- defaultValue = "QColor( " + defaultValue + " )";
+ defaultValue = "TQColor( " + defaultValue + " )";
}
else
{
- defaultValue = "QColor( \"" + defaultValue + "\" )";
+ defaultValue = "TQColor( \"" + defaultValue + "\" )";
}
} else if ( type == "Enum" ) {
if ( !globalEnums ) {
- QValueList<CfgEntry::Choice>::ConstIterator it;
+ TQValueList<CfgEntry::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
if ( (*it).name == defaultValue ) {
defaultValue.prepend( enumName(name) + "::");
@@ -338,13 +338,13 @@ static void preProcessDefault( QString &defaultValue, const QString &name,
}
} else if ( type == "IntList" ) {
- QTextStream cpp( &code, IO_WriteOnly | IO_Append );
+ TQTextStream cpp( &code, IO_WriteOnly | IO_Append );
if (!code.isEmpty())
cpp << endl;
- cpp << " QValueList<int> default" << name << ";" << endl;
- QStringList defaults = QStringList::split( ",", defaultValue );
- QStringList::ConstIterator it;
+ cpp << " TQValueList<int> default" << name << ";" << endl;
+ TQStringList defaults = TQStringList::split( ",", defaultValue );
+ TQStringList::ConstIterator it;
for( it = defaults.begin(); it != defaults.end(); ++it ) {
cpp << " default" << name << ".append( " << *it << " );"
<< endl;
@@ -354,31 +354,31 @@ static void preProcessDefault( QString &defaultValue, const QString &name,
}
-CfgEntry *parseEntry( const QString &group, const QDomElement &element )
+CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
{
bool defaultCode = false;
- QString type = element.attribute( "type" );
- QString name = element.attribute( "name" );
- QString key = element.attribute( "key" );
- QString hidden = element.attribute( "hidden" );
- QString label;
- QString whatsThis;
- QString defaultValue;
- QString code;
- QString param;
- QString paramName;
- QString paramType;
- QValueList<CfgEntry::Choice> choices;
- QStringList paramValues;
- QStringList paramDefaultValues;
- QString minValue;
- QString maxValue;
+ TQString type = element.attribute( "type" );
+ TQString name = element.attribute( "name" );
+ TQString key = element.attribute( "key" );
+ TQString hidden = element.attribute( "hidden" );
+ TQString label;
+ TQString whatsThis;
+ TQString defaultValue;
+ TQString code;
+ TQString param;
+ TQString paramName;
+ TQString paramType;
+ TQValueList<CfgEntry::Choice> choices;
+ TQStringList paramValues;
+ TQStringList paramDefaultValues;
+ TQString minValue;
+ TQString maxValue;
int paramMax = 0;
- QDomNode n;
+ TQDomNode n;
for ( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
- QString tag = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tag = e.tagName();
if ( tag == "label" ) label = e.text();
else if ( tag == "whatsthis" ) whatsThis = e.text();
else if ( tag == "min" ) minValue = e.text();
@@ -408,14 +408,14 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
}
else if (paramType == "Enum")
{
- QDomNode n2;
+ TQDomNode n2;
for ( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if (e2.tagName() == "values")
{
- QDomNode n3;
+ TQDomNode n3;
for ( n3 = e2.firstChild(); !n3.isNull(); n3 = n3.nextSibling() ) {
- QDomElement e3 = n3.toElement();
+ TQDomElement e3 = n3.toElement();
if (e3.tagName() == "value")
{
paramValues.append( e3.text() );
@@ -447,18 +447,18 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
}
}
else if ( tag == "choices" ) {
- QDomNode n2;
+ TQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() == "choice" ) {
- QDomNode n3;
+ TQDomNode n3;
CfgEntry::Choice choice;
choice.name = e2.attribute( "name" );
if ( choice.name.isEmpty() ) {
kdError() << "Tag <choice> requires attribute 'name'." << endl;
}
for( n3 = e2.firstChild(); !n3.isNull(); n3 = n3.nextSibling() ) {
- QDomElement e3 = n3.toElement();
+ TQDomElement e3 = n3.toElement();
if ( e3.tagName() == "label" ) choice.label = e3.text();
if ( e3.tagName() == "whatsthis" ) choice.whatsThis = e3.text();
}
@@ -480,7 +480,7 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
if ( nameIsEmpty ) {
name = key;
- name.replace( " ", QString::null );
+ name.replace( " ", TQString::null );
} else if ( name.contains( ' ' ) ) {
kdWarning()<<"Entry '"<<name<<"' contains spaces! <name> elements can't contain speces!"<<endl;
name.remove( ' ' );
@@ -513,20 +513,20 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
{
// Adjust name
paramName = name;
- name.replace("$("+param+")", QString::null);
+ name.replace("$("+param+")", TQString::null);
// Lookup defaults for indexed entries
for(int i = 0; i <= paramMax; i++)
{
- paramDefaultValues.append(QString::null);
+ paramDefaultValues.append(TQString::null);
}
- QDomNode n;
+ TQDomNode n;
for ( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
- QString tag = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tag = e.tagName();
if ( tag == "default" )
{
- QString index = e.attribute("param");
+ TQString index = e.attribute("param");
if (index.isEmpty())
continue;
@@ -548,7 +548,7 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
return 0;
}
- QString tmpDefaultValue = e.text();
+ TQString tmpDefaultValue = e.text();
if (e.attribute( "code" ) != "true")
preProcessDefault(tmpDefaultValue, name, type, choices, code);
@@ -605,93 +605,93 @@ CfgEntry *parseEntry( const QString &group, const QDomElement &element )
/**
Return parameter declaration for given type.
*/
-QString param( const QString &type )
+TQString param( const TQString &type )
{
- if ( type == "String" ) return "const QString &";
- else if ( type == "StringList" ) return "const QStringList &";
- else if ( type == "Font" ) return "const QFont &";
- else if ( type == "Rect" ) return "const QRect &";
- else if ( type == "Size" ) return "const QSize &";
- else if ( type == "Color" ) return "const QColor &";
- else if ( type == "Point" ) return "const QPoint &";
+ if ( type == "String" ) return "const TQString &";
+ else if ( type == "StringList" ) return "const TQStringList &";
+ else if ( type == "Font" ) return "const TQFont &";
+ else if ( type == "Rect" ) return "const TQRect &";
+ else if ( type == "Size" ) return "const TQSize &";
+ else if ( type == "Color" ) return "const TQColor &";
+ else if ( type == "Point" ) return "const TQPoint &";
else if ( type == "Int" ) return "int";
else if ( type == "UInt" ) return "uint";
else if ( type == "Bool" ) return "bool";
else if ( type == "Double" ) return "double";
- else if ( type == "DateTime" ) return "const QDateTime &";
+ else if ( type == "DateTime" ) return "const TQDateTime &";
else if ( type == "Int64" ) return "Q_INT64";
else if ( type == "UInt64" ) return "Q_UINT64";
- else if ( type == "IntList" ) return "const QValueList<int> &";
+ else if ( type == "IntList" ) return "const TQValueList<int> &";
else if ( type == "Enum" ) return "int";
- else if ( type == "Path" ) return "const QString &";
- else if ( type == "PathList" ) return "const QStringList &";
- else if ( type == "Password" ) return "const QString &";
+ else if ( type == "Path" ) return "const TQString &";
+ else if ( type == "PathList" ) return "const TQStringList &";
+ else if ( type == "Password" ) return "const TQString &";
else {
kdError() <<"kconfig_compiler does not support type \""<< type <<"\""<<endl;
- return "QString"; //For now, but an assert would be better
+ return "TQString"; //For now, but an assert would be better
}
}
/**
Actual C++ storage type for given type.
*/
-QString cppType( const QString &type )
+TQString cppType( const TQString &type )
{
- if ( type == "String" ) return "QString";
- else if ( type == "StringList" ) return "QStringList";
- else if ( type == "Font" ) return "QFont";
- else if ( type == "Rect" ) return "QRect";
- else if ( type == "Size" ) return "QSize";
- else if ( type == "Color" ) return "QColor";
- else if ( type == "Point" ) return "QPoint";
+ if ( type == "String" ) return "TQString";
+ else if ( type == "StringList" ) return "TQStringList";
+ else if ( type == "Font" ) return "TQFont";
+ else if ( type == "Rect" ) return "TQRect";
+ else if ( type == "Size" ) return "TQSize";
+ else if ( type == "Color" ) return "TQColor";
+ else if ( type == "Point" ) return "TQPoint";
else if ( type == "Int" ) return "int";
else if ( type == "UInt" ) return "uint";
else if ( type == "Bool" ) return "bool";
else if ( type == "Double" ) return "double";
- else if ( type == "DateTime" ) return "QDateTime";
+ else if ( type == "DateTime" ) return "TQDateTime";
else if ( type == "Int64" ) return "Q_INT64";
else if ( type == "UInt64" ) return "Q_UINT64";
- else if ( type == "IntList" ) return "QValueList<int>";
+ else if ( type == "IntList" ) return "TQValueList<int>";
else if ( type == "Enum" ) return "int";
- else if ( type == "Path" ) return "QString";
- else if ( type == "PathList" ) return "QStringList";
- else if ( type == "Password" ) return "QString";
+ else if ( type == "Path" ) return "TQString";
+ else if ( type == "PathList" ) return "TQStringList";
+ else if ( type == "Password" ) return "TQString";
else {
kdError()<<"kconfig_compiler does not support type \""<< type <<"\""<<endl;
- return "QString"; //For now, but an assert would be better
+ return "TQString"; //For now, but an assert would be better
}
}
-QString defaultValue( const QString &type )
+TQString defaultValue( const TQString &type )
{
if ( type == "String" ) return "\"\""; // Use empty string, not null string!
- else if ( type == "StringList" ) return "QStringList()";
+ else if ( type == "StringList" ) return "TQStringList()";
else if ( type == "Font" ) return "KGlobalSettings::generalFont()";
- else if ( type == "Rect" ) return "QRect()";
- else if ( type == "Size" ) return "QSize()";
- else if ( type == "Color" ) return "QColor(128, 128, 128)";
- else if ( type == "Point" ) return "QPoint()";
+ else if ( type == "Rect" ) return "TQRect()";
+ else if ( type == "Size" ) return "TQSize()";
+ else if ( type == "Color" ) return "TQColor(128, 128, 128)";
+ else if ( type == "Point" ) return "TQPoint()";
else if ( type == "Int" ) return "0";
else if ( type == "UInt" ) return "0";
else if ( type == "Bool" ) return "false";
else if ( type == "Double" ) return "0.0";
- else if ( type == "DateTime" ) return "QDateTime()";
+ else if ( type == "DateTime" ) return "TQDateTime()";
else if ( type == "Int64" ) return "0";
else if ( type == "UInt64" ) return "0";
- else if ( type == "IntList" ) return "QValueList<int>()";
+ else if ( type == "IntList" ) return "TQValueList<int>()";
else if ( type == "Enum" ) return "0";
else if ( type == "Path" ) return "\"\""; // Use empty string, not null string!
- else if ( type == "PathList" ) return "QStringList()";
+ else if ( type == "PathList" ) return "TQStringList()";
else if ( type == "Password" ) return "\"\""; // Use empty string, not null string!
else {
kdWarning()<<"Error, kconfig_compiler doesn't support the \""<< type <<"\" type!"<<endl;
- return "QString"; //For now, but an assert would be better
+ return "TQString"; //For now, but an assert would be better
}
}
-QString itemType( const QString &type )
+TQString itemType( const TQString &type )
{
- QString t;
+ TQString t;
t = type;
t.replace( 0, 1, t.left( 1 ).upper() );
@@ -699,25 +699,25 @@ QString itemType( const QString &type )
return t;
}
-static QString itemDeclaration(const CfgEntry *e)
+static TQString itemDeclaration(const CfgEntry *e)
{
if (itemAccessors)
- return QString::null;
+ return TQString::null;
- QString fCap = e->name();
+ TQString fCap = e->name();
fCap[0] = fCap[0].upper();
return " KConfigSkeleton::Item"+itemType( e->type() ) +
" *item" + fCap +
- ( (!e->param().isEmpty())?(QString("[%1]").arg(e->paramMax()+1)) : QString::null) +
+ ( (!e->param().isEmpty())?(TQString("[%1]").arg(e->paramMax()+1)) : TQString::null) +
";\n";
}
// returns the name of an item variable
// use itemPath to know the full path
// like using d-> in case of dpointer
-static QString itemVar(const CfgEntry *e)
+static TQString itemVar(const CfgEntry *e)
{
- QString result;
+ TQString result;
if (itemAccessors)
{
if ( !dpointer )
@@ -739,9 +739,9 @@ static QString itemVar(const CfgEntry *e)
return result;
}
-static QString itemPath(const CfgEntry *e)
+static TQString itemPath(const CfgEntry *e)
{
- QString result;
+ TQString result;
if ( dpointer ) {
result = "d->"+itemVar(e);
}
@@ -751,10 +751,10 @@ static QString itemPath(const CfgEntry *e)
return result;
}
-QString newItem( const QString &type, const QString &name, const QString &key,
- const QString &defaultValue, const QString &param = QString::null)
+TQString newItem( const TQString &type, const TQString &name, const TQString &key,
+ const TQString &defaultValue, const TQString &param = TQString::null)
{
- QString t = "new KConfigSkeleton::Item" + itemType( type ) +
+ TQString t = "new KConfigSkeleton::Item" + itemType( type ) +
"( currentGroup(), " + key + ", " + varPath( name ) + param;
if ( type == "Enum" ) t += ", values" + name;
if ( !defaultValue.isEmpty() ) {
@@ -767,20 +767,20 @@ QString newItem( const QString &type, const QString &name, const QString &key,
return t;
}
-QString paramString(const QString &s, const CfgEntry *e, int i)
+TQString paramString(const TQString &s, const CfgEntry *e, int i)
{
- QString result = s;
- QString needle = "$("+e->param()+")";
+ TQString result = s;
+ TQString needle = "$("+e->param()+")";
if (result.contains(needle))
{
- QString tmp;
+ TQString tmp;
if (e->paramType() == "Enum")
{
tmp = e->paramValues()[i];
}
else
{
- tmp = QString::number(i);
+ tmp = TQString::number(i);
}
result.replace(needle, tmp);
@@ -788,32 +788,32 @@ QString paramString(const QString &s, const CfgEntry *e, int i)
return result;
}
-QString paramString(const QString &group, const QValueList<Param> &parameters)
+TQString paramString(const TQString &group, const TQValueList<Param> &parameters)
{
- QString paramString = group;
- QString arguments;
+ TQString paramString = group;
+ TQString arguments;
int i = 1;
- for (QValueList<Param>::ConstIterator it = parameters.begin();
+ for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
if (paramString.contains("$("+(*it).name+")"))
{
- QString tmp;
+ TQString tmp;
tmp.sprintf("%%%d", i++);
paramString.replace("$("+(*it).name+")", tmp);
arguments += ".arg( mParam"+(*it).name+" )";
}
}
if (arguments.isEmpty())
- return "QString::fromLatin1( \""+group+"\" )";
+ return "TQString::fromLatin1( \""+group+"\" )";
- return "QString::fromLatin1( \""+paramString+"\" )"+arguments;
+ return "TQString::fromLatin1( \""+paramString+"\" )"+arguments;
}
/* int i is the value of the parameter */
-QString userTextsFunctions( CfgEntry *e, QString itemVarStr=QString::null, QString i=QString::null )
+TQString userTextsFunctions( CfgEntry *e, TQString itemVarStr=TQString::null, TQString i=TQString::null )
{
- QString txt;
+ TQString txt;
if (itemVarStr.isNull()) itemVarStr=itemPath(e);
if ( !e->label().isEmpty() ) {
txt += " " + itemVarStr + "->setLabel( i18n(";
@@ -837,12 +837,12 @@ QString userTextsFunctions( CfgEntry *e, QString itemVarStr=QString::null, QStri
// returns the member accesor implementation
// which should go in the h file if inline
// or the cpp file if not inline
-QString memberAccessorBody( CfgEntry *e )
+TQString memberAccessorBody( CfgEntry *e )
{
- QString result;
- QTextStream out(&result, IO_WriteOnly);
- QString n = e->name();
- QString t = e->type();
+ TQString result;
+ TQTextStream out(&result, IO_WriteOnly);
+ TQString n = e->name();
+ TQString t = e->type();
out << "return " << This << varPath(n);
if (!e->param().isEmpty()) out << "[i]";
@@ -854,12 +854,12 @@ QString memberAccessorBody( CfgEntry *e )
// returns the member mutator implementation
// which should go in the h file if inline
// or the cpp file if not inline
-QString memberMutatorBody( CfgEntry *e )
+TQString memberMutatorBody( CfgEntry *e )
{
- QString result;
- QTextStream out(&result, IO_WriteOnly);
- QString n = e->name();
- QString t = e->type();
+ TQString result;
+ TQTextStream out(&result, IO_WriteOnly);
+ TQString n = e->name();
+ TQString t = e->type();
if (!e->minValue().isEmpty())
{
@@ -883,12 +883,12 @@ QString memberMutatorBody( CfgEntry *e )
out << "}" << endl << endl;
}
- out << "if (!" << This << "isImmutable( QString::fromLatin1( \"";
+ out << "if (!" << This << "isImmutable( TQString::fromLatin1( \"";
if (!e->param().isEmpty())
{
out << e->paramName().replace("$("+e->param()+")", "%1") << "\" ).arg( ";
if ( e->paramType() == "Enum" ) {
- out << "QString::fromLatin1( ";
+ out << "TQString::fromLatin1( ";
if (globalEnums)
out << enumName(e->param()) << "ToString[i]";
@@ -919,10 +919,10 @@ QString memberMutatorBody( CfgEntry *e )
// returns the item accesor implementation
// which should go in the h file if inline
// or the cpp file if not inline
-QString itemAccessorBody( CfgEntry *e )
+TQString itemAccessorBody( CfgEntry *e )
{
- QString result;
- QTextStream out(&result, IO_WriteOnly);
+ TQString result;
+ TQTextStream out(&result, IO_WriteOnly);
out << "return " << itemPath(e);
if (!e->param().isEmpty()) out << "[i]";
@@ -932,12 +932,12 @@ QString itemAccessorBody( CfgEntry *e )
}
//indents text adding X spaces per line
-QString indent(QString text, int spaces)
+TQString indent(TQString text, int spaces)
{
- QString result;
- QTextStream out(&result, IO_WriteOnly);
- QTextStream in(&text, IO_ReadOnly);
- QString currLine;
+ TQString result;
+ TQTextStream out(&result, IO_WriteOnly);
+ TQTextStream in(&text, IO_ReadOnly);
+ TQString currLine;
while ( !in.atEnd() )
{
currLine = in.readLine();
@@ -978,37 +978,37 @@ int main( int argc, char **argv )
return 1;
}
- validNameRegexp = new QRegExp("[a-zA-Z_][a-zA-Z0-9_]*");
+ validNameRegexp = new TQRegExp("[a-zA-Z_][a-zA-Z0-9_]*");
- QString baseDir = QFile::decodeName(args->getOption("directory"));
+ TQString baseDir = TQFile::decodeName(args->getOption("directory"));
if (!baseDir.endsWith("/"))
baseDir.append("/");
- QString inputFilename = args->url( 0 ).path();
- QString codegenFilename = args->url( 1 ).path();
+ TQString inputFilename = args->url( 0 ).path();
+ TQString codegenFilename = args->url( 1 ).path();
if (!codegenFilename.endsWith(".kcfgc"))
{
kdError() << "Codegen options file must have extension .kcfgc" << endl;
return 1;
}
- QString baseName = args->url( 1 ).fileName();
+ TQString baseName = args->url( 1 ).fileName();
baseName = baseName.left(baseName.length() - 6);
KSimpleConfig codegenConfig( codegenFilename, true );
- QString nameSpace = codegenConfig.readEntry("NameSpace");
- QString className = codegenConfig.readEntry("ClassName");
- QString inherits = codegenConfig.readEntry("Inherits");
- QString visibility = codegenConfig.readEntry("Visibility");
+ TQString nameSpace = codegenConfig.readEntry("NameSpace");
+ TQString className = codegenConfig.readEntry("ClassName");
+ TQString inherits = codegenConfig.readEntry("Inherits");
+ TQString visibility = codegenConfig.readEntry("Visibility");
if (!visibility.isEmpty()) visibility+=" ";
bool singleton = codegenConfig.readBoolEntry("Singleton", false);
bool staticAccessors = singleton;
//bool useDPointer = codegenConfig.readBoolEntry("DPointer", false);
bool customAddons = codegenConfig.readBoolEntry("CustomAdditions");
- QString memberVariables = codegenConfig.readEntry("MemberVariables");
- QStringList headerIncludes = codegenConfig.readListEntry("IncludeFiles");
- QStringList mutators = codegenConfig.readListEntry("Mutators");
+ TQString memberVariables = codegenConfig.readEntry("MemberVariables");
+ TQStringList headerIncludes = codegenConfig.readListEntry("IncludeFiles");
+ TQStringList mutators = codegenConfig.readListEntry("Mutators");
bool allMutators = false;
if ((mutators.count() == 1) && (mutators[0].lower() == "true"))
allMutators = true;
@@ -1019,10 +1019,10 @@ int main( int argc, char **argv )
dpointer = (memberVariables == "dpointer");
- QFile input( inputFilename );
+ TQFile input( inputFilename );
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int errorRow;
int errorCol;
if ( !doc.setContent( &input, &errorMsg, &errorRow, &errorCol ) ) {
@@ -1031,38 +1031,38 @@ int main( int argc, char **argv )
return 1;
}
- QDomElement cfgElement = doc.documentElement();
+ TQDomElement cfgElement = doc.documentElement();
if ( cfgElement.isNull() ) {
kdError() << "No document in kcfg file" << endl;
return 1;
}
- QString cfgFileName;
+ TQString cfgFileName;
bool cfgFileNameArg = false;
- QValueList<Param> parameters;
- QStringList includes;
+ TQValueList<Param> parameters;
+ TQStringList includes;
- QPtrList<CfgEntry> entries;
+ TQPtrList<CfgEntry> entries;
entries.setAutoDelete( true );
- QDomNode n;
+ TQDomNode n;
for ( n = cfgElement.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
- QString tag = e.tagName();
+ TQString tag = e.tagName();
if ( tag == "include" ) {
- QString includeFile = e.text();
+ TQString includeFile = e.text();
if (!includeFile.isEmpty())
includes.append(includeFile);
} else if ( tag == "kcfgfile" ) {
cfgFileName = e.attribute( "name" );
cfgFileNameArg = e.attribute( "arg" ).lower() == "true";
- QDomNode n2;
+ TQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() == "parameter" ) {
Param p;
p.name = e2.attribute( "name" );
@@ -1074,14 +1074,14 @@ int main( int argc, char **argv )
}
} else if ( tag == "group" ) {
- QString group = e.attribute( "name" );
+ TQString group = e.attribute( "name" );
if ( group.isEmpty() ) {
kdError() << "Group without name" << endl;
return 1;
}
- QDomNode n2;
+ TQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() != "entry" ) continue;
CfgEntry *entry = parseEntry( group, e2 );
if ( entry ) entries.append( entry );
@@ -1122,17 +1122,17 @@ int main( int argc, char **argv )
}
#endif
- QString headerFileName = baseName + ".h";
- QString implementationFileName = baseName + ".cpp";
- QString cppPreamble; // code to be inserted at the beginnin of the cpp file, e.g. initialization of static values
+ TQString headerFileName = baseName + ".h";
+ TQString implementationFileName = baseName + ".cpp";
+ TQString cppPreamble; // code to be inserted at the beginnin of the cpp file, e.g. initialization of static values
- QFile header( baseDir + headerFileName );
+ TQFile header( baseDir + headerFileName );
if ( !header.open( IO_WriteOnly ) ) {
kdError() << "Can't open '" << headerFileName << "' for writing." << endl;
return 1;
}
- QTextStream h( &header );
+ TQTextStream h( &header );
h << "// This file is generated by kconfig_compiler from " << args->url(0).fileName() << "." << endl;
h << "// All changes you do to this file will be lost." << endl;
@@ -1143,7 +1143,7 @@ int main( int argc, char **argv )
<< className.upper() << "_H" << endl << endl;
// Includes
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = headerIncludes.begin(); it != headerIncludes.end(); ++it ) {
h << "#include <" << *it << ">" << endl;
}
@@ -1177,10 +1177,10 @@ int main( int argc, char **argv )
// enums
CfgEntry *e;
for( e = entries.first(); e; e = entries.next() ) {
- QValueList<CfgEntry::Choice> choices = e->choices();
+ TQValueList<CfgEntry::Choice> choices = e->choices();
if ( !choices.isEmpty() ) {
- QStringList values;
- QValueList<CfgEntry::Choice>::ConstIterator itChoice;
+ TQStringList values;
+ TQValueList<CfgEntry::Choice>::ConstIterator itChoice;
for( itChoice = choices.begin(); itChoice != choices.end(); ++itChoice ) {
values.append( (*itChoice).name );
}
@@ -1194,7 +1194,7 @@ int main( int argc, char **argv )
h << " };" << endl;
}
}
- QStringList values = e->paramValues();
+ TQStringList values = e->paramValues();
if ( !values.isEmpty() ) {
if ( globalEnums ) {
h << " enum { " << values.join( ", " ) << " };" << endl;
@@ -1221,7 +1221,7 @@ int main( int argc, char **argv )
h << " " << className << "(";
if (cfgFileNameArg)
h << " KSharedConfig::Ptr config" << (parameters.isEmpty() ? " = KGlobal::sharedConfig()" : ", ");
- for (QValueList<Param>::ConstIterator it = parameters.begin();
+ for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
if (it != parameters.begin())
@@ -1245,8 +1245,8 @@ int main( int argc, char **argv )
Const = " const";
for( e = entries.first(); e; e = entries.next() ) {
- QString n = e->name();
- QString t = e->type();
+ TQString n = e->name();
+ TQString t = e->type();
// Manipulator
if (allMutators || mutators.contains(n))
@@ -1351,7 +1351,7 @@ int main( int argc, char **argv )
}
// Class Parameters
- for (QValueList<Param>::ConstIterator it = parameters.begin();
+ for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
h << " " << cppType((*it).type) << " mParam" << (*it).name << ";" << endl;
@@ -1359,7 +1359,7 @@ int main( int argc, char **argv )
if ( memberVariables != "dpointer" )
{
- QString group;
+ TQString group;
for( e = entries.first(); e; e = entries.next() ) {
if ( e->group() != group ) {
group = e->group();
@@ -1369,7 +1369,7 @@ int main( int argc, char **argv )
h << " " << cppType(e->type()) << " " << varName(e->name());
if (!e->param().isEmpty())
{
- h << QString("[%1]").arg(e->paramMax()+1);
+ h << TQString("[%1]").arg(e->paramMax()+1);
}
h << ";" << endl;
}
@@ -1378,7 +1378,7 @@ int main( int argc, char **argv )
if ( itemAccessors ) {
for( e = entries.first(); e; e = entries.next() ) {
h << " Item" << itemType( e->type() ) << " *" << itemVar( e );
- if (!e->param().isEmpty() ) h << QString("[%1]").arg( e->paramMax()+1 );
+ if (!e->param().isEmpty() ) h << TQString("[%1]").arg( e->paramMax()+1 );
h << ";" << endl;
}
}
@@ -1406,14 +1406,14 @@ int main( int argc, char **argv )
header.close();
- QFile implementation( baseDir + implementationFileName );
+ TQFile implementation( baseDir + implementationFileName );
if ( !implementation.open( IO_WriteOnly ) ) {
kdError() << "Can't open '" << implementationFileName << "' for writing."
<< endl;
return 1;
}
- QTextStream cpp( &implementation );
+ TQTextStream cpp( &implementation );
cpp << "// This file is generated by kconfig_compiler from " << args->url(0).fileName() << "." << endl;
@@ -1432,7 +1432,7 @@ int main( int argc, char **argv )
if ( !nameSpace.isEmpty() )
cpp << "using namespace " << nameSpace << ";" << endl << endl;
- QString group;
+ TQString group;
// private class implementation
if ( dpointer )
@@ -1449,14 +1449,14 @@ int main( int argc, char **argv )
cpp << " " << cppType(e->type()) << " " << varName(e->name());
if (!e->param().isEmpty())
{
- cpp << QString("[%1]").arg(e->paramMax()+1);
+ cpp << TQString("[%1]").arg(e->paramMax()+1);
}
cpp << ";" << endl;
}
cpp << endl << " // items" << endl;
for( e = entries.first(); e; e = entries.next() ) {
cpp << " KConfigSkeleton::Item" << itemType( e->type() ) << " *" << itemVar( e );
- if (!e->param().isEmpty() ) cpp << QString("[%1]").arg( e->paramMax()+1 );
+ if (!e->param().isEmpty() ) cpp << TQString("[%1]").arg( e->paramMax()+1 );
cpp << ";" << endl;
}
@@ -1508,7 +1508,7 @@ int main( int argc, char **argv )
cpp << (parameters.isEmpty() ? " " : ", ");
}
- for (QValueList<Param>::ConstIterator it = parameters.begin();
+ for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
if (it != parameters.begin())
@@ -1518,13 +1518,13 @@ int main( int argc, char **argv )
cpp << " )" << endl;
cpp << " : " << inherits << "(";
- if ( !cfgFileName.isEmpty() ) cpp << " QString::fromLatin1( \"" << cfgFileName << "\" ";
+ if ( !cfgFileName.isEmpty() ) cpp << " TQString::fromLatin1( \"" << cfgFileName << "\" ";
if ( cfgFileNameArg ) cpp << " config ";
if ( !cfgFileName.isEmpty() ) cpp << ") ";
cpp << ")" << endl;
// Store parameters
- for (QValueList<Param>::ConstIterator it = parameters.begin();
+ for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
cpp << " , mParam" << (*it).name << "(" << (*it).name << ")" << endl;
@@ -1539,7 +1539,7 @@ int main( int argc, char **argv )
if ( singleton )
cpp << " mSelf = this;" << endl;
- group = QString::null;
+ group = TQString::null;
for( e = entries.first(); e; e = entries.next() ) {
if ( e->group() != group ) {
if ( !group.isEmpty() ) cpp << endl;
@@ -1547,20 +1547,20 @@ int main( int argc, char **argv )
cpp << " setCurrentGroup( " << paramString(group, parameters) << " );" << endl << endl;
}
- QString key = paramString(e->key(), parameters);
+ TQString key = paramString(e->key(), parameters);
if ( !e->code().isEmpty())
{
cpp << e->code() << endl;
}
if ( e->type() == "Enum" ) {
- cpp << " QValueList<KConfigSkeleton::ItemEnum::Choice> values"
+ cpp << " TQValueList<KConfigSkeleton::ItemEnum::Choice> values"
<< e->name() << ";" << endl;
- QValueList<CfgEntry::Choice> choices = e->choices();
- QValueList<CfgEntry::Choice>::ConstIterator it;
+ TQValueList<CfgEntry::Choice> choices = e->choices();
+ TQValueList<CfgEntry::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
cpp << " {" << endl;
cpp << " KConfigSkeleton::ItemEnum::Choice choice;" << endl;
- cpp << " choice.name = QString::fromLatin1( \"" << (*it).name << "\" );" << endl;
+ cpp << " choice.name = TQString::fromLatin1( \"" << (*it).name << "\" );" << endl;
if ( setUserTexts ) {
if ( !(*it).label.isEmpty() )
cpp << " choice.label = i18n(" << quoteString((*it).label) << ");" << endl;
@@ -1590,9 +1590,9 @@ int main( int argc, char **argv )
cpp << userTextsFunctions( e );
cpp << " addItem( " << itemPath(e);
- QString quotedName = e->name();
+ TQString quotedName = e->name();
addQuotes( quotedName );
- if ( quotedName != key ) cpp << ", QString::fromLatin1( \"" << e->name() << "\" )";
+ if ( quotedName != key ) cpp << ", TQString::fromLatin1( \"" << e->name() << "\" )";
cpp << " );" << endl;
}
else
@@ -1600,8 +1600,8 @@ int main( int argc, char **argv )
// Indexed
for(int i = 0; i <= e->paramMax(); i++)
{
- QString defaultStr;
- QString itemVarStr(itemPath(e)+QString("[%1]").arg(i));
+ TQString defaultStr;
+ TQString itemVarStr(itemPath(e)+TQString("[%1]").arg(i));
if ( !e->paramDefaultValue(i).isEmpty() )
defaultStr = e->paramDefaultValue(i);
@@ -1611,7 +1611,7 @@ int main( int argc, char **argv )
defaultStr = defaultValue( e->type() );
cpp << " " << itemVarStr << " = "
- << newItem( e->type(), e->name(), paramString(key, e, i), defaultStr, QString("[%1]").arg(i) )
+ << newItem( e->type(), e->name(), paramString(key, e, i), defaultStr, TQString("[%1]").arg(i) )
<< endl;
if ( setUserTexts )
@@ -1621,7 +1621,7 @@ int main( int argc, char **argv )
// param name. The check for isImmutable in the set* functions doesn't have the param
// name available, just the corresponding enum value (int), so we need to store the
// param names in a separate static list!.
- cpp << " addItem( " << itemVarStr << ", QString::fromLatin1( \"";
+ cpp << " addItem( " << itemVarStr << ", TQString::fromLatin1( \"";
if ( e->paramType()=="Enum" )
cpp << e->paramName().replace( "$("+e->param()+")", "%1").arg(e->paramValues()[i] );
else
@@ -1638,8 +1638,8 @@ int main( int argc, char **argv )
// setters and getters go in Cpp if in dpointer mode
for( e = entries.first(); e; e = entries.next() )
{
- QString n = e->name();
- QString t = e->type();
+ TQString n = e->name();
+ TQString t = e->type();
// Manipulator
if (allMutators || mutators.contains(n))
diff --git a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp b/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp
index 31f3f5ee9..2f8e7eee3 100644
--- a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp
+++ b/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp
@@ -13,8 +13,8 @@
*************************************************************************
*/
-#include <qfile.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kunittest/module.h>
#include "kconfigcompiler_test.h"
@@ -44,7 +44,7 @@ static CompilerTestSet testCases =
static CompilerTestSet willFailCases =
{
- // where is that QDir comming from?
+ // where is that TQDir comming from?
//"test9.cpp", NULL
NULL
};
@@ -61,7 +61,7 @@ void KConfigCompiler_Test::testExpectedOutput()
// Known to pass test cases
while (testCases[ i ])
{
- performCompare(QString::fromLatin1(testCases[ i ]));
+ performCompare(TQString::fromLatin1(testCases[ i ]));
++i;
}
@@ -69,20 +69,20 @@ void KConfigCompiler_Test::testExpectedOutput()
i= 0;
while (willFailCases[ i ])
{
- performCompare(QString::fromLatin1(willFailCases[ i ]), true);
+ performCompare(TQString::fromLatin1(willFailCases[ i ]), true);
++i;
}
}
-void KConfigCompiler_Test::performCompare(const QString &fileName, bool fail)
+void KConfigCompiler_Test::performCompare(const TQString &fileName, bool fail)
{
- QFile file(fileName);
- QFile fileRef(QString::fromLatin1(SRCDIR) + QString::fromLatin1("/") + fileName + QString::fromLatin1(".ref"));
+ TQFile file(fileName);
+ TQFile fileRef(TQString::fromLatin1(SRCDIR) + TQString::fromLatin1("/") + fileName + TQString::fromLatin1(".ref"));
if ( file.open(IO_ReadOnly) && fileRef.open(IO_ReadOnly) )
{
- QString content = file.readAll();
- QString contentRef = fileRef.readAll();
+ TQString content = file.readAll();
+ TQString contentRef = fileRef.readAll();
if (!fail)
CHECK( content, contentRef);
diff --git a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.h b/kdecore/kconfig_compiler/tests/kconfigcompiler_test.h
index 8ccea83fa..5521ef982 100644
--- a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.h
+++ b/kdecore/kconfig_compiler/tests/kconfigcompiler_test.h
@@ -28,7 +28,7 @@ public:
public slots:
void testExpectedOutput();
private:
- void performCompare(const QString &fileName, bool fail=false);
+ void performCompare(const TQString &fileName, bool fail=false);
};
#endif
diff --git a/kdecore/kconfig_compiler/tests/myprefs.h b/kdecore/kconfig_compiler/tests/myprefs.h
index 263c409d2..ebef89c08 100644
--- a/kdecore/kconfig_compiler/tests/myprefs.h
+++ b/kdecore/kconfig_compiler/tests/myprefs.h
@@ -3,5 +3,5 @@
class MyPrefs : public KConfigSkeleton
{
public:
- MyPrefs( const QString &a ) : KConfigSkeleton( a ) {}
+ MyPrefs( const TQString &a ) : KConfigSkeleton( a ) {}
};
diff --git a/kdecore/kconfig_compiler/tests/test1.cpp.ref b/kdecore/kconfig_compiler/tests/test1.cpp.ref
index e4c9f86d8..b3050921e 100644
--- a/kdecore/kconfig_compiler/tests/test1.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test1.cpp.ref
@@ -3,67 +3,67 @@
#include "test1.h"
-Test1::Test1( const QString & transport, const QString & folder )
- : KConfigSkeleton( QString::fromLatin1( "examplerc" ) )
+Test1::Test1( const TQString & transport, const TQString & folder )
+ : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) )
, mParamtransport(transport)
, mParamfolder(folder)
{
- setCurrentGroup( QString::fromLatin1( "General-%1" ).arg( mParamfolder ) );
+ setCurrentGroup( TQString::fromLatin1( "General-%1" ).arg( mParamfolder ) );
KConfigSkeleton::ItemBool *itemOneOption;
- itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "OneOption" ), mOneOption, true );
- addItem( itemOneOption, QString::fromLatin1( "OneOption" ) );
+ itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "OneOption" ), mOneOption, true );
+ addItem( itemOneOption, TQString::fromLatin1( "OneOption" ) );
KConfigSkeleton::ItemInt *itemAnotherOption;
- itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Another Option" ), mAnotherOption, 5 );
- addItem( itemAnotherOption, QString::fromLatin1( "AnotherOption" ) );
- QValueList<KConfigSkeleton::ItemEnum::Choice> valuesListOption;
+ itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption, 5 );
+ addItem( itemAnotherOption, TQString::fromLatin1( "AnotherOption" ) );
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesListOption;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "One" );
+ choice.name = TQString::fromLatin1( "One" );
valuesListOption.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Two" );
+ choice.name = TQString::fromLatin1( "Two" );
valuesListOption.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Three" );
+ choice.name = TQString::fromLatin1( "Three" );
valuesListOption.append( choice );
}
KConfigSkeleton::ItemEnum *itemListOption;
- itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One );
- addItem( itemListOption, QString::fromLatin1( "ListOption" ) );
+ itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One );
+ addItem( itemListOption, TQString::fromLatin1( "ListOption" ) );
- setCurrentGroup( QString::fromLatin1( "MyOptions" ) );
+ setCurrentGroup( TQString::fromLatin1( "MyOptions" ) );
KConfigSkeleton::ItemString *itemMyString;
- itemMyString = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "MyString" ), mMyString, QString::fromLatin1( "Default String" ) );
- addItem( itemMyString, QString::fromLatin1( "MyString" ) );
+ itemMyString = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "MyString" ), mMyString, TQString::fromLatin1( "Default String" ) );
+ addItem( itemMyString, TQString::fromLatin1( "MyString" ) );
KConfigSkeleton::ItemPath *itemMyPath;
- itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), QString::fromLatin1( "MyPath" ), mMyPath, QDir::homeDirPath()+QString::fromLatin1(".hidden_file") );
- addItem( itemMyPath, QString::fromLatin1( "MyPath" ) );
+ itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), TQString::fromLatin1( "MyPath" ), mMyPath, TQDir::homeDirPath()+TQString::fromLatin1(".hidden_file") );
+ addItem( itemMyPath, TQString::fromLatin1( "MyPath" ) );
KConfigSkeleton::ItemInt *itemAnotherOption2;
- itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Another Option" ), mAnotherOption2, 10 );
- addItem( itemAnotherOption2, QString::fromLatin1( "AnotherOption2" ) );
- QStringList defaultMyStringList;
- defaultMyStringList.append( QString::fromUtf8( "up" ) );
- defaultMyStringList.append( QString::fromUtf8( "down" ) );
+ itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption2, 10 );
+ addItem( itemAnotherOption2, TQString::fromLatin1( "AnotherOption2" ) );
+ TQStringList defaultMyStringList;
+ defaultMyStringList.append( TQString::fromUtf8( "up" ) );
+ defaultMyStringList.append( TQString::fromUtf8( "down" ) );
KConfigSkeleton::ItemStringList *itemMyStringList;
- itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
- addItem( itemMyStringList, QString::fromLatin1( "MyStringList" ) );
- QStringList defaultMyStringListHidden;
- defaultMyStringListHidden.append( QString::fromUtf8( "up" ) );
- defaultMyStringListHidden.append( QString::fromUtf8( "down" ) );
+ itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
+ addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) );
+ TQStringList defaultMyStringListHidden;
+ defaultMyStringListHidden.append( TQString::fromUtf8( "up" ) );
+ defaultMyStringListHidden.append( TQString::fromUtf8( "down" ) );
KConfigSkeleton::ItemStringList *itemMyStringListHidden;
- itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden );
- addItem( itemMyStringListHidden, QString::fromLatin1( "MyStringListHidden" ) );
+ itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden );
+ addItem( itemMyStringListHidden, TQString::fromLatin1( "MyStringListHidden" ) );
KConfigSkeleton::ItemInt *itemMyNumber;
- itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 );
- addItem( itemMyNumber, QString::fromLatin1( "MyNumber" ) );
+ itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 );
+ addItem( itemMyNumber, TQString::fromLatin1( "MyNumber" ) );
}
Test1::~Test1()
diff --git a/kdecore/kconfig_compiler/tests/test1.h.ref b/kdecore/kconfig_compiler/tests/test1.h.ref
index e08ccee8a..cc2d99c69 100644
--- a/kdecore/kconfig_compiler/tests/test1.h.ref
+++ b/kdecore/kconfig_compiler/tests/test1.h.ref
@@ -6,7 +6,7 @@
#include <kconfigskeleton.h>
#include <kdebug.h>
-#include <qdir.h>
+#include <tqdir.h>
class Test1 : public KConfigSkeleton
{
public:
@@ -16,7 +16,7 @@ class Test1 : public KConfigSkeleton
enum type { One, Two, Three, COUNT };
};
- Test1( const QString & transport, const QString & folder );
+ Test1( const TQString & transport, const TQString & folder );
~Test1();
/**
@@ -24,7 +24,7 @@ class Test1 : public KConfigSkeleton
*/
void setOneOption( bool v )
{
- if (!isImmutable( QString::fromLatin1( "OneOption" ) ))
+ if (!isImmutable( TQString::fromLatin1( "OneOption" ) ))
mOneOption = v;
}
@@ -41,7 +41,7 @@ class Test1 : public KConfigSkeleton
*/
void setAnotherOption( int v )
{
- if (!isImmutable( QString::fromLatin1( "AnotherOption" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AnotherOption" ) ))
mAnotherOption = v;
}
@@ -58,7 +58,7 @@ class Test1 : public KConfigSkeleton
*/
void setListOption( int v )
{
- if (!isImmutable( QString::fromLatin1( "ListOption" ) ))
+ if (!isImmutable( TQString::fromLatin1( "ListOption" ) ))
mListOption = v;
}
@@ -73,16 +73,16 @@ class Test1 : public KConfigSkeleton
/**
Set This is a string
*/
- void setMyString( const QString & v )
+ void setMyString( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "MyString" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyString" ) ))
mMyString = v;
}
/**
Get This is a string
*/
- QString myString() const
+ TQString myString() const
{
return mMyString;
}
@@ -90,16 +90,16 @@ class Test1 : public KConfigSkeleton
/**
Set This is a path
*/
- void setMyPath( const QString & v )
+ void setMyPath( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "MyPath" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyPath" ) ))
mMyPath = v;
}
/**
Get This is a path
*/
- QString myPath() const
+ TQString myPath() const
{
return mMyPath;
}
@@ -109,7 +109,7 @@ class Test1 : public KConfigSkeleton
*/
void setAnotherOption2( int v )
{
- if (!isImmutable( QString::fromLatin1( "AnotherOption2" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AnotherOption2" ) ))
mAnotherOption2 = v;
}
@@ -124,16 +124,16 @@ class Test1 : public KConfigSkeleton
/**
Set MyStringList
*/
- void setMyStringList( const QStringList & v )
+ void setMyStringList( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "MyStringList" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyStringList" ) ))
mMyStringList = v;
}
/**
Get MyStringList
*/
- QStringList myStringList() const
+ TQStringList myStringList() const
{
return mMyStringList;
}
@@ -141,16 +141,16 @@ class Test1 : public KConfigSkeleton
/**
Set MyStringListHidden
*/
- void setMyStringListHidden( const QStringList & v )
+ void setMyStringListHidden( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "MyStringListHidden" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyStringListHidden" ) ))
mMyStringListHidden = v;
}
/**
Get MyStringListHidden
*/
- QStringList myStringListHidden() const
+ TQStringList myStringListHidden() const
{
return mMyStringListHidden;
}
@@ -160,7 +160,7 @@ class Test1 : public KConfigSkeleton
*/
void setMyNumber( int v )
{
- if (!isImmutable( QString::fromLatin1( "MyNumber" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyNumber" ) ))
mMyNumber = v;
}
@@ -173,8 +173,8 @@ class Test1 : public KConfigSkeleton
}
protected:
- QString mParamtransport;
- QString mParamfolder;
+ TQString mParamtransport;
+ TQString mParamfolder;
// General-$(folder)
bool mOneOption;
@@ -182,11 +182,11 @@ class Test1 : public KConfigSkeleton
int mListOption;
// MyOptions
- QString mMyString;
- QString mMyPath;
+ TQString mMyString;
+ TQString mMyPath;
int mAnotherOption2;
- QStringList mMyStringList;
- QStringList mMyStringListHidden;
+ TQStringList mMyStringList;
+ TQStringList mMyStringListHidden;
int mMyNumber;
private:
diff --git a/kdecore/kconfig_compiler/tests/test1main.cpp b/kdecore/kconfig_compiler/tests/test1main.cpp
index f55f54195..976a7bbd6 100644
--- a/kdecore/kconfig_compiler/tests/test1main.cpp
+++ b/kdecore/kconfig_compiler/tests/test1main.cpp
@@ -24,6 +24,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
KInstance i("test");
- Test1 *t = new Test1( QString::null, QString::null );
+ Test1 *t = new Test1( TQString::null, TQString::null );
delete t;
}
diff --git a/kdecore/kconfig_compiler/tests/test2.cpp.ref b/kdecore/kconfig_compiler/tests/test2.cpp.ref
index d2197856e..2d56f7545 100644
--- a/kdecore/kconfig_compiler/tests/test2.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test2.cpp.ref
@@ -6,90 +6,90 @@
#include <klocale.h>
Test2::Test2( )
- : MyPrefs( QString::fromLatin1( "korganizerrc" ) )
+ : MyPrefs( TQString::fromLatin1( "korganizerrc" ) )
{
- setCurrentGroup( QString::fromLatin1( "General" ) );
+ setCurrentGroup( TQString::fromLatin1( "General" ) );
- mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Auto Save" ), mAutoSave, false );
+ mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false );
mAutoSaveItem->setLabel( i18n("Enable automatic saving of calendar") );
mAutoSaveItem->setWhatsThis( i18n("WhatsThis text for AutoSave option") );
- addItem( mAutoSaveItem, QString::fromLatin1( "AutoSave" ) );
- mAutoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 );
+ addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) );
+ mAutoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 );
mAutoSaveIntervalItem->setLabel( i18n("Auto Save Interval") );
- addItem( mAutoSaveIntervalItem, QString::fromLatin1( "AutoSaveInterval" ) );
- mConfirmItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Confirm Deletes" ), mConfirm, true );
+ addItem( mAutoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) );
+ mConfirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), mConfirm, true );
mConfirmItem->setLabel( i18n("Confirm deletes") );
- addItem( mConfirmItem, QString::fromLatin1( "Confirm" ) );
- mArchiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "Archive File" ), mArchiveFile );
+ addItem( mConfirmItem, TQString::fromLatin1( "Confirm" ) );
+ mArchiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), mArchiveFile );
mArchiveFileItem->setLabel( i18n("Archive File") );
- addItem( mArchiveFileItem, QString::fromLatin1( "ArchiveFile" ) );
- QValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
+ addItem( mArchiveFileItem, TQString::fromLatin1( "ArchiveFile" ) );
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "standardDestination" );
+ choice.name = TQString::fromLatin1( "standardDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "askDestination" );
+ choice.name = TQString::fromLatin1( "askDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl1" );
+ choice.name = TQString::fromLatin1( "argl1" );
choice.label = i18n("Argl1 Label");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl2" );
+ choice.name = TQString::fromLatin1( "argl2" );
choice.whatsThis = i18n("Argl2 Whatsthis");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl3" );
+ choice.name = TQString::fromLatin1( "argl3" );
choice.label = i18n("Argl3 Label");
choice.whatsThis = i18n("Argl3 Whatsthis");
valuesDestination.append( choice );
}
- mDestinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination );
+ mDestinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination );
mDestinationItem->setLabel( i18n("New Events/Todos Should") );
- addItem( mDestinationItem, QString::fromLatin1( "Destination" ) );
+ addItem( mDestinationItem, TQString::fromLatin1( "Destination" ) );
- setCurrentGroup( QString::fromLatin1( "Views" ) );
+ setCurrentGroup( TQString::fromLatin1( "Views" ) );
- mHourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Hour Size" ), mHourSize, 10 );
+ mHourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), mHourSize, 10 );
mHourSizeItem->setLabel( i18n("Hour Size") );
- addItem( mHourSizeItem, QString::fromLatin1( "HourSize" ) );
- mSelectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false );
+ addItem( mHourSizeItem, TQString::fromLatin1( "HourSize" ) );
+ mSelectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false );
mSelectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") );
- addItem( mSelectionStartsEditorItem, QString::fromLatin1( "SelectionStartsEditor" ) );
+ addItem( mSelectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) );
- setCurrentGroup( QString::fromLatin1( "KOrganizer Plugins" ) );
+ setCurrentGroup( TQString::fromLatin1( "KOrganizer Plugins" ) );
- QStringList defaultSelectedPlugins;
- defaultSelectedPlugins.append( QString::fromUtf8( "holidays" ) );
- defaultSelectedPlugins.append( QString::fromUtf8( "webexport" ) );
+ TQStringList defaultSelectedPlugins;
+ defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) );
+ defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) );
- mSelectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins );
+ mSelectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins );
mSelectedPluginsItem->setLabel( i18n("SelectedPlugins") );
- addItem( mSelectedPluginsItem, QString::fromLatin1( "SelectedPlugins" ) );
+ addItem( mSelectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) );
- setCurrentGroup( QString::fromLatin1( "Colors" ) );
+ setCurrentGroup( TQString::fromLatin1( "Colors" ) );
- mHighlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "Highlight Color" ), mHighlightColor, QColor( 100, 100, 255 ) );
+ mHighlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), mHighlightColor, TQColor( 100, 100, 255 ) );
mHighlightColorItem->setLabel( i18n("Highlight color") );
- addItem( mHighlightColorItem, QString::fromLatin1( "HighlightColor" ) );
- mAgendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "Agenda Background Color" ), mAgendaBgColor, QColor( 255, 255, 255 ) );
+ addItem( mHighlightColorItem, TQString::fromLatin1( "HighlightColor" ) );
+ mAgendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), mAgendaBgColor, TQColor( 255, 255, 255 ) );
mAgendaBgColorItem->setLabel( i18n("Agenda view background color") );
- addItem( mAgendaBgColorItem, QString::fromLatin1( "AgendaBgColor" ) );
+ addItem( mAgendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) );
- setCurrentGroup( QString::fromLatin1( "Fonts" ) );
+ setCurrentGroup( TQString::fromLatin1( "Fonts" ) );
- mTimeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QString::fromLatin1( "TimeBar Font" ), mTimeBarFont );
+ mTimeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), mTimeBarFont );
mTimeBarFontItem->setLabel( i18n("Time bar") );
- addItem( mTimeBarFontItem, QString::fromLatin1( "TimeBarFont" ) );
+ addItem( mTimeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) );
}
Test2::~Test2()
diff --git a/kdecore/kconfig_compiler/tests/test2.h.ref b/kdecore/kconfig_compiler/tests/test2.h.ref
index 4e8b5ec1f..6c0a74d66 100644
--- a/kdecore/kconfig_compiler/tests/test2.h.ref
+++ b/kdecore/kconfig_compiler/tests/test2.h.ref
@@ -21,7 +21,7 @@ class Test2 : public MyPrefs
*/
void setAutoSave( bool v )
{
- if (!isImmutable( QString::fromLatin1( "AutoSave" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AutoSave" ) ))
mAutoSave = v;
}
@@ -46,7 +46,7 @@ class Test2 : public MyPrefs
*/
void setAutoSaveInterval( int v )
{
- if (!isImmutable( QString::fromLatin1( "AutoSaveInterval" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AutoSaveInterval" ) ))
mAutoSaveInterval = v;
}
@@ -71,7 +71,7 @@ class Test2 : public MyPrefs
*/
void setConfirm( bool v )
{
- if (!isImmutable( QString::fromLatin1( "Confirm" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Confirm" ) ))
mConfirm = v;
}
@@ -94,16 +94,16 @@ class Test2 : public MyPrefs
/**
Set Archive File
*/
- void setArchiveFile( const QString & v )
+ void setArchiveFile( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "ArchiveFile" ) ))
+ if (!isImmutable( TQString::fromLatin1( "ArchiveFile" ) ))
mArchiveFile = v;
}
/**
Get Archive File
*/
- QString archiveFile() const
+ TQString archiveFile() const
{
return mArchiveFile;
}
@@ -121,7 +121,7 @@ class Test2 : public MyPrefs
*/
void setDestination( int v )
{
- if (!isImmutable( QString::fromLatin1( "Destination" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Destination" ) ))
mDestination = v;
}
@@ -146,7 +146,7 @@ class Test2 : public MyPrefs
*/
void setHourSize( int v )
{
- if (!isImmutable( QString::fromLatin1( "HourSize" ) ))
+ if (!isImmutable( TQString::fromLatin1( "HourSize" ) ))
mHourSize = v;
}
@@ -171,7 +171,7 @@ class Test2 : public MyPrefs
*/
void setSelectionStartsEditor( bool v )
{
- if (!isImmutable( QString::fromLatin1( "SelectionStartsEditor" ) ))
+ if (!isImmutable( TQString::fromLatin1( "SelectionStartsEditor" ) ))
mSelectionStartsEditor = v;
}
@@ -194,16 +194,16 @@ class Test2 : public MyPrefs
/**
Set SelectedPlugins
*/
- void setSelectedPlugins( const QStringList & v )
+ void setSelectedPlugins( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "SelectedPlugins" ) ))
+ if (!isImmutable( TQString::fromLatin1( "SelectedPlugins" ) ))
mSelectedPlugins = v;
}
/**
Get SelectedPlugins
*/
- QStringList selectedPlugins() const
+ TQStringList selectedPlugins() const
{
return mSelectedPlugins;
}
@@ -219,16 +219,16 @@ class Test2 : public MyPrefs
/**
Set Highlight color
*/
- void setHighlightColor( const QColor & v )
+ void setHighlightColor( const TQColor & v )
{
- if (!isImmutable( QString::fromLatin1( "HighlightColor" ) ))
+ if (!isImmutable( TQString::fromLatin1( "HighlightColor" ) ))
mHighlightColor = v;
}
/**
Get Highlight color
*/
- QColor highlightColor() const
+ TQColor highlightColor() const
{
return mHighlightColor;
}
@@ -244,16 +244,16 @@ class Test2 : public MyPrefs
/**
Set Agenda view background color
*/
- void setAgendaBgColor( const QColor & v )
+ void setAgendaBgColor( const TQColor & v )
{
- if (!isImmutable( QString::fromLatin1( "AgendaBgColor" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AgendaBgColor" ) ))
mAgendaBgColor = v;
}
/**
Get Agenda view background color
*/
- QColor agendaBgColor() const
+ TQColor agendaBgColor() const
{
return mAgendaBgColor;
}
@@ -269,16 +269,16 @@ class Test2 : public MyPrefs
/**
Set Time bar
*/
- void setTimeBarFont( const QFont & v )
+ void setTimeBarFont( const TQFont & v )
{
- if (!isImmutable( QString::fromLatin1( "TimeBarFont" ) ))
+ if (!isImmutable( TQString::fromLatin1( "TimeBarFont" ) ))
mTimeBarFont = v;
}
/**
Get Time bar
*/
- QFont timeBarFont() const
+ TQFont timeBarFont() const
{
return mTimeBarFont;
}
@@ -298,7 +298,7 @@ class Test2 : public MyPrefs
bool mAutoSave;
int mAutoSaveInterval;
bool mConfirm;
- QString mArchiveFile;
+ TQString mArchiveFile;
int mDestination;
// Views
@@ -306,14 +306,14 @@ class Test2 : public MyPrefs
bool mSelectionStartsEditor;
// KOrganizer Plugins
- QStringList mSelectedPlugins;
+ TQStringList mSelectedPlugins;
// Colors
- QColor mHighlightColor;
- QColor mAgendaBgColor;
+ TQColor mHighlightColor;
+ TQColor mAgendaBgColor;
// Fonts
- QFont mTimeBarFont;
+ TQFont mTimeBarFont;
private:
ItemBool *mAutoSaveItem;
diff --git a/kdecore/kconfig_compiler/tests/test3.cpp.ref b/kdecore/kconfig_compiler/tests/test3.cpp.ref
index a9435f2cf..11fe6b38f 100644
--- a/kdecore/kconfig_compiler/tests/test3.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test3.cpp.ref
@@ -6,21 +6,21 @@
using namespace TestNameSpace;
Test3::Test3( )
- : KConfigSkeleton( QString::fromLatin1( "test3rc" ) )
+ : KConfigSkeleton( TQString::fromLatin1( "test3rc" ) )
{
- setCurrentGroup( QString::fromLatin1( "General" ) );
+ setCurrentGroup( TQString::fromLatin1( "General" ) );
- mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Auto Save" ), mAutoSave, false );
- addItem( mAutoSaveItem, QString::fromLatin1( "AutoSave" ) );
+ mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false );
+ addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) );
- setCurrentGroup( QString::fromLatin1( "Blah" ) );
+ setCurrentGroup( TQString::fromLatin1( "Blah" ) );
- mBlubbItem = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Blubb" ), mBlubb, 10 );
- addItem( mBlubbItem, QString::fromLatin1( "Blubb" ) );
- mBlahBlahItem = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "BlahBlah" ), mBlahBlah, QString::fromLatin1( "a string" ) );
- addItem( mBlahBlahItem, QString::fromLatin1( "BlahBlah" ) );
- mMyPasswordItem = new KConfigSkeleton::ItemPassword( currentGroup(), QString::fromLatin1( "MyPassword" ), mMyPassword );
- addItem( mMyPasswordItem, QString::fromLatin1( "MyPassword" ) );
+ mBlubbItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Blubb" ), mBlubb, 10 );
+ addItem( mBlubbItem, TQString::fromLatin1( "Blubb" ) );
+ mBlahBlahItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "BlahBlah" ), mBlahBlah, TQString::fromLatin1( "a string" ) );
+ addItem( mBlahBlahItem, TQString::fromLatin1( "BlahBlah" ) );
+ mMyPasswordItem = new KConfigSkeleton::ItemPassword( currentGroup(), TQString::fromLatin1( "MyPassword" ), mMyPassword );
+ addItem( mMyPasswordItem, TQString::fromLatin1( "MyPassword" ) );
}
Test3::~Test3()
diff --git a/kdecore/kconfig_compiler/tests/test3.h.ref b/kdecore/kconfig_compiler/tests/test3.h.ref
index 4742a0ec1..75b1b0929 100644
--- a/kdecore/kconfig_compiler/tests/test3.h.ref
+++ b/kdecore/kconfig_compiler/tests/test3.h.ref
@@ -20,7 +20,7 @@ class Test3 : public KConfigSkeleton
*/
void setAutoSave( bool v )
{
- if (!isImmutable( QString::fromLatin1( "AutoSave" ) ))
+ if (!isImmutable( TQString::fromLatin1( "AutoSave" ) ))
mAutoSave = v;
}
@@ -45,7 +45,7 @@ class Test3 : public KConfigSkeleton
*/
void setBlubb( int v )
{
- if (!isImmutable( QString::fromLatin1( "Blubb" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Blubb" ) ))
mBlubb = v;
}
@@ -68,16 +68,16 @@ class Test3 : public KConfigSkeleton
/**
Set BlahBlah
*/
- void setBlahBlah( const QString & v )
+ void setBlahBlah( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "BlahBlah" ) ))
+ if (!isImmutable( TQString::fromLatin1( "BlahBlah" ) ))
mBlahBlah = v;
}
/**
Get BlahBlah
*/
- QString blahBlah() const
+ TQString blahBlah() const
{
return mBlahBlah;
}
@@ -93,16 +93,16 @@ class Test3 : public KConfigSkeleton
/**
Set MyPassword
*/
- void setMyPassword( const QString & v )
+ void setMyPassword( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "MyPassword" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyPassword" ) ))
mMyPassword = v;
}
/**
Get MyPassword
*/
- QString myPassword() const
+ TQString myPassword() const
{
return mMyPassword;
}
@@ -122,8 +122,8 @@ class Test3 : public KConfigSkeleton
// Blah
int mBlubb;
- QString mBlahBlah;
- QString mMyPassword;
+ TQString mBlahBlah;
+ TQString mMyPassword;
private:
ItemBool *mAutoSaveItem;
diff --git a/kdecore/kconfig_compiler/tests/test4.cpp.ref b/kdecore/kconfig_compiler/tests/test4.cpp.ref
index d50c98b26..6918a8c8a 100644
--- a/kdecore/kconfig_compiler/tests/test4.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test4.cpp.ref
@@ -21,57 +21,57 @@ Test4 *Test4::self()
const char* const Test4::EnumButton::enumToString[] = { "right", "mid", "left" };
Test4::Test4( )
- : KConfigSkeleton( QString::fromLatin1( "test4rc" ) )
+ : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
{
mSelf = this;
- setCurrentGroup( QString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
-QColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
+TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
KConfigSkeleton::ItemColor *itemColor[4];
- itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
- addItem( itemColor[0], QString::fromLatin1( "Color0" ) );
- itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
- addItem( itemColor[1], QString::fromLatin1( "Color1" ) );
- itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
- addItem( itemColor[2], QString::fromLatin1( "Color2" ) );
- itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
- addItem( itemColor[3], QString::fromLatin1( "Color3" ) );
- QValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
+ itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
+ addItem( itemColor[0], TQString::fromLatin1( "Color0" ) );
+ itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
+ addItem( itemColor[1], TQString::fromLatin1( "Color1" ) );
+ itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
+ addItem( itemColor[2], TQString::fromLatin1( "Color2" ) );
+ itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
+ addItem( itemColor[3], TQString::fromLatin1( "Color3" ) );
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Encrypt" );
+ choice.name = TQString::fromLatin1( "Encrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Decrypt" );
+ choice.name = TQString::fromLatin1( "Decrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "CrashNBurn" );
+ choice.name = TQString::fromLatin1( "CrashNBurn" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "PumpNDump" );
+ choice.name = TQString::fromLatin1( "PumpNDump" );
valuesMouseAction.append( choice );
}
KConfigSkeleton::ItemEnum *itemMouseAction[3];
- itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt );
- addItem( itemMouseAction[0], QString::fromLatin1( "MouseActionright" ) );
- itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt );
- addItem( itemMouseAction[1], QString::fromLatin1( "MouseActionmid" ) );
- itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump );
- addItem( itemMouseAction[2], QString::fromLatin1( "MouseActionleft" ) );
+ itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt );
+ addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) );
+ itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt );
+ addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) );
+ itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump );
+ addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, QString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, QString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
}
Test4::~Test4()
diff --git a/kdecore/kconfig_compiler/tests/test4.h.ref b/kdecore/kconfig_compiler/tests/test4.h.ref
index b7ae85287..d11dd3aee 100644
--- a/kdecore/kconfig_compiler/tests/test4.h.ref
+++ b/kdecore/kconfig_compiler/tests/test4.h.ref
@@ -28,9 +28,9 @@ class Test4 : public KConfigSkeleton
Set Block colors.
*/
static
- void setColor( int i, const QColor & v )
+ void setColor( int i, const TQColor & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Color%1" ).arg( i ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Color%1" ).arg( i ) ))
self()->mColor[i] = v;
}
@@ -38,7 +38,7 @@ class Test4 : public KConfigSkeleton
Get Block colors.
*/
static
- QColor color( int i )
+ TQColor color( int i )
{
return self()->mColor[i];
}
@@ -49,7 +49,7 @@ class Test4 : public KConfigSkeleton
static
void setMouseAction( int i, int v )
{
- if (!self()->isImmutable( QString::fromLatin1( "MouseAction%1" ).arg( QString::fromLatin1( EnumButton::enumToString[i] ) ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "MouseAction%1" ).arg( TQString::fromLatin1( EnumButton::enumToString[i] ) ) ))
self()->mMouseAction[i] = v;
}
@@ -66,9 +66,9 @@ class Test4 : public KConfigSkeleton
Set foo bar
*/
static
- void setFooBar( const QString & v )
+ void setFooBar( const TQString & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "FooBar" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "FooBar" ) ))
self()->mFooBar = v;
}
@@ -76,7 +76,7 @@ class Test4 : public KConfigSkeleton
Get foo bar
*/
static
- QString fooBar()
+ TQString fooBar()
{
return self()->mFooBar;
}
@@ -99,7 +99,7 @@ class Test4 : public KConfigSkeleton
v = 88;
}
- if (!self()->isImmutable( QString::fromLatin1( "Age" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Age" ) ))
self()->mAge = v;
}
@@ -123,9 +123,9 @@ class Test4 : public KConfigSkeleton
// Foo
- QColor mColor[4];
+ TQColor mColor[4];
int mMouseAction[3];
- QString mFooBar;
+ TQString mFooBar;
int mAge;
private:
diff --git a/kdecore/kconfig_compiler/tests/test5.cpp.ref b/kdecore/kconfig_compiler/tests/test5.cpp.ref
index e6dc13f85..8373eb3f6 100644
--- a/kdecore/kconfig_compiler/tests/test5.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test5.cpp.ref
@@ -21,57 +21,57 @@ Test5 *Test5::self()
const char* const Test5::EnumButtonToString[] = { "right", "mid", "left" };
Test5::Test5( )
- : KConfigSkeleton( QString::fromLatin1( "test4rc" ) )
+ : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
{
mSelf = this;
- setCurrentGroup( QString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
-QColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
+TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
KConfigSkeleton::ItemColor *itemColor[4];
- itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
- addItem( itemColor[0], QString::fromLatin1( "Color0" ) );
- itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
- addItem( itemColor[1], QString::fromLatin1( "Color1" ) );
- itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
- addItem( itemColor[2], QString::fromLatin1( "Color2" ) );
- itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
- addItem( itemColor[3], QString::fromLatin1( "Color3" ) );
- QValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
+ itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #0" ), mColor[0], defaultColor[0] );
+ addItem( itemColor[0], TQString::fromLatin1( "Color0" ) );
+ itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #1" ), mColor[1], defaultColor[1] );
+ addItem( itemColor[1], TQString::fromLatin1( "Color1" ) );
+ itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #2" ), mColor[2], defaultColor[2] );
+ addItem( itemColor[2], TQString::fromLatin1( "Color2" ) );
+ itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #3" ), mColor[3], defaultColor[3] );
+ addItem( itemColor[3], TQString::fromLatin1( "Color3" ) );
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Encrypt" );
+ choice.name = TQString::fromLatin1( "Encrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "Decrypt" );
+ choice.name = TQString::fromLatin1( "Decrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "CrashNBurn" );
+ choice.name = TQString::fromLatin1( "CrashNBurn" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "PumpNDump" );
+ choice.name = TQString::fromLatin1( "PumpNDump" );
valuesMouseAction.append( choice );
}
KConfigSkeleton::ItemEnum *itemMouseAction[3];
- itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, Decrypt );
- addItem( itemMouseAction[0], QString::fromLatin1( "MouseActionright" ) );
- itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, Encrypt );
- addItem( itemMouseAction[1], QString::fromLatin1( "MouseActionmid" ) );
- itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, PumpNDump );
- addItem( itemMouseAction[2], QString::fromLatin1( "MouseActionleft" ) );
+ itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, Decrypt );
+ addItem( itemMouseAction[0], TQString::fromLatin1( "MouseActionright" ) );
+ itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, Encrypt );
+ addItem( itemMouseAction[1], TQString::fromLatin1( "MouseActionmid" ) );
+ itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, PumpNDump );
+ addItem( itemMouseAction[2], TQString::fromLatin1( "MouseActionleft" ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, QString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, QString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
}
Test5::~Test5()
diff --git a/kdecore/kconfig_compiler/tests/test5.h.ref b/kdecore/kconfig_compiler/tests/test5.h.ref
index 1a61d3913..efb9b448a 100644
--- a/kdecore/kconfig_compiler/tests/test5.h.ref
+++ b/kdecore/kconfig_compiler/tests/test5.h.ref
@@ -20,9 +20,9 @@ class Test5 : public KConfigSkeleton
Set Block colors.
*/
static
- void setColor( int i, const QColor & v )
+ void setColor( int i, const TQColor & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Color%1" ).arg( i ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Color%1" ).arg( i ) ))
self()->mColor[i] = v;
}
@@ -30,7 +30,7 @@ class Test5 : public KConfigSkeleton
Get Block colors.
*/
static
- QColor color( int i )
+ TQColor color( int i )
{
return self()->mColor[i];
}
@@ -41,7 +41,7 @@ class Test5 : public KConfigSkeleton
static
void setMouseAction( int i, int v )
{
- if (!self()->isImmutable( QString::fromLatin1( "MouseAction%1" ).arg( QString::fromLatin1( EnumButtonToString[i] ) ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "MouseAction%1" ).arg( TQString::fromLatin1( EnumButtonToString[i] ) ) ))
self()->mMouseAction[i] = v;
}
@@ -58,9 +58,9 @@ class Test5 : public KConfigSkeleton
Set foo bar
*/
static
- void setFooBar( const QString & v )
+ void setFooBar( const TQString & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "FooBar" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "FooBar" ) ))
self()->mFooBar = v;
}
@@ -68,7 +68,7 @@ class Test5 : public KConfigSkeleton
Get foo bar
*/
static
- QString fooBar()
+ TQString fooBar()
{
return self()->mFooBar;
}
@@ -91,7 +91,7 @@ class Test5 : public KConfigSkeleton
v = 88;
}
- if (!self()->isImmutable( QString::fromLatin1( "Age" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Age" ) ))
self()->mAge = v;
}
@@ -115,9 +115,9 @@ class Test5 : public KConfigSkeleton
// Foo
- QColor mColor[4];
+ TQColor mColor[4];
int mMouseAction[3];
- QString mFooBar;
+ TQString mFooBar;
int mAge;
private:
diff --git a/kdecore/kconfig_compiler/tests/test6.cpp.ref b/kdecore/kconfig_compiler/tests/test6.cpp.ref
index 21fea85f6..51b96d4c4 100644
--- a/kdecore/kconfig_compiler/tests/test6.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test6.cpp.ref
@@ -3,26 +3,26 @@
#include "test6.h"
-Test6::Test6( const QString & Number )
- : KConfigSkeleton( QString::fromLatin1( "test4rc" ) )
+Test6::Test6( const TQString & Number )
+ : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
, mParamNumber(Number)
{
- setCurrentGroup( QString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
KConfigSkeleton::ItemColor *itemColor;
- itemColor = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, QColor( "red" ) );
- addItem( itemColor, QString::fromLatin1( "Color" ) );
+ itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
+ addItem( itemColor, TQString::fromLatin1( "Color" ) );
- setCurrentGroup( QString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
+ setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, QString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, QString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
}
Test6::~Test6()
diff --git a/kdecore/kconfig_compiler/tests/test6.h.ref b/kdecore/kconfig_compiler/tests/test6.h.ref
index 75fcfd04f..6743d6064 100644
--- a/kdecore/kconfig_compiler/tests/test6.h.ref
+++ b/kdecore/kconfig_compiler/tests/test6.h.ref
@@ -10,22 +10,22 @@ class Test6 : public KConfigSkeleton
{
public:
- Test6( const QString & Number );
+ Test6( const TQString & Number );
~Test6();
/**
Set Block colors.
*/
- void setColor( const QColor & v )
+ void setColor( const TQColor & v )
{
- if (!isImmutable( QString::fromLatin1( "Color" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Color" ) ))
mColor = v;
}
/**
Get Block colors.
*/
- QColor color() const
+ TQColor color() const
{
return mColor;
}
@@ -33,16 +33,16 @@ class Test6 : public KConfigSkeleton
/**
Set foo bar
*/
- void setFooBar( const QString & v )
+ void setFooBar( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "FooBar" ) ))
+ if (!isImmutable( TQString::fromLatin1( "FooBar" ) ))
mFooBar = v;
}
/**
Get foo bar
*/
- QString fooBar() const
+ TQString fooBar() const
{
return mFooBar;
}
@@ -64,7 +64,7 @@ class Test6 : public KConfigSkeleton
v = 88;
}
- if (!isImmutable( QString::fromLatin1( "Age" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Age" ) ))
mAge = v;
}
@@ -77,13 +77,13 @@ class Test6 : public KConfigSkeleton
}
protected:
- QString mParamNumber;
+ TQString mParamNumber;
// Foo
- QColor mColor;
+ TQColor mColor;
// Bar$(Number)
- QString mFooBar;
+ TQString mFooBar;
int mAge;
private:
diff --git a/kdecore/kconfig_compiler/tests/test6main.cpp b/kdecore/kconfig_compiler/tests/test6main.cpp
index a891c097a..27dff57ff 100644
--- a/kdecore/kconfig_compiler/tests/test6main.cpp
+++ b/kdecore/kconfig_compiler/tests/test6main.cpp
@@ -25,6 +25,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
KInstance i("test");
- Test6 *t = new Test6(QString::null);
+ Test6 *t = new Test6(TQString::null);
delete t;
}
diff --git a/kdecore/kconfig_compiler/tests/test7.cpp.ref b/kdecore/kconfig_compiler/tests/test7.cpp.ref
index 8292e31d1..91a22e036 100644
--- a/kdecore/kconfig_compiler/tests/test7.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test7.cpp.ref
@@ -4,25 +4,25 @@
#include "test7.h"
Test7::Test7( int Number )
- : KConfigSkeleton( QString::fromLatin1( "test7rc" ) )
+ : KConfigSkeleton( TQString::fromLatin1( "test7rc" ) )
, mParamNumber(Number)
{
- setCurrentGroup( QString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::fromLatin1( "Foo" ) );
KConfigSkeleton::ItemColor *itemColor;
- itemColor = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, QColor( "red" ) );
- addItem( itemColor, QString::fromLatin1( "Color" ) );
+ itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
+ addItem( itemColor, TQString::fromLatin1( "Color" ) );
- setCurrentGroup( QString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
+ setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, QString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, QString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::fromLatin1( "Age" ) );
}
Test7::~Test7()
diff --git a/kdecore/kconfig_compiler/tests/test7.h.ref b/kdecore/kconfig_compiler/tests/test7.h.ref
index e8983907d..8f8808da1 100644
--- a/kdecore/kconfig_compiler/tests/test7.h.ref
+++ b/kdecore/kconfig_compiler/tests/test7.h.ref
@@ -16,16 +16,16 @@ class Test7 : public KConfigSkeleton
/**
Set Block colors.
*/
- void setColor( const QColor & v )
+ void setColor( const TQColor & v )
{
- if (!isImmutable( QString::fromLatin1( "Color" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Color" ) ))
mColor = v;
}
/**
Get Block colors.
*/
- QColor color() const
+ TQColor color() const
{
return mColor;
}
@@ -33,16 +33,16 @@ class Test7 : public KConfigSkeleton
/**
Set foo bar
*/
- void setFooBar( const QString & v )
+ void setFooBar( const TQString & v )
{
- if (!isImmutable( QString::fromLatin1( "FooBar" ) ))
+ if (!isImmutable( TQString::fromLatin1( "FooBar" ) ))
mFooBar = v;
}
/**
Get foo bar
*/
- QString fooBar() const
+ TQString fooBar() const
{
return mFooBar;
}
@@ -64,7 +64,7 @@ class Test7 : public KConfigSkeleton
v = 88;
}
- if (!isImmutable( QString::fromLatin1( "Age" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Age" ) ))
mAge = v;
}
@@ -80,10 +80,10 @@ class Test7 : public KConfigSkeleton
int mParamNumber;
// Foo
- QColor mColor;
+ TQColor mColor;
// Bar$(Number)
- QString mFooBar;
+ TQString mFooBar;
int mAge;
private:
diff --git a/kdecore/kconfig_compiler/tests/test8a.cpp.ref b/kdecore/kconfig_compiler/tests/test8a.cpp.ref
index 868b63438..f89b7c133 100644
--- a/kdecore/kconfig_compiler/tests/test8a.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test8a.cpp.ref
@@ -6,14 +6,14 @@
Test8a::Test8a( KSharedConfig::Ptr config )
: KConfigSkeleton( config )
{
- setCurrentGroup( QString::fromLatin1( "Group" ) );
+ setCurrentGroup( TQString::fromLatin1( "Group" ) );
KConfigSkeleton::ItemFont *itemFont;
- itemFont = new KConfigSkeleton::ItemFont( currentGroup(), QString::fromLatin1( "Font" ), mFont, KGlobalSettings::generalFont() );
- addItem( itemFont, QString::fromLatin1( "Font" ) );
+ itemFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "Font" ), mFont, KGlobalSettings::generalFont() );
+ addItem( itemFont, TQString::fromLatin1( "Font" ) );
KConfigSkeleton::ItemFont *itemTitleFont;
- itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), QString::fromLatin1( "TitleFont" ), mTitleFont, KGlobalSettings::windowTitleFont() );
- addItem( itemTitleFont, QString::fromLatin1( "TitleFont" ) );
+ itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TitleFont" ), mTitleFont, KGlobalSettings::windowTitleFont() );
+ addItem( itemTitleFont, TQString::fromLatin1( "TitleFont" ) );
}
Test8a::~Test8a()
diff --git a/kdecore/kconfig_compiler/tests/test8a.h.ref b/kdecore/kconfig_compiler/tests/test8a.h.ref
index 6d4f2a00d..2e947c437 100644
--- a/kdecore/kconfig_compiler/tests/test8a.h.ref
+++ b/kdecore/kconfig_compiler/tests/test8a.h.ref
@@ -17,16 +17,16 @@ class Test8a : public KConfigSkeleton
/**
Set Font
*/
- void setFont( const QFont & v )
+ void setFont( const TQFont & v )
{
- if (!isImmutable( QString::fromLatin1( "Font" ) ))
+ if (!isImmutable( TQString::fromLatin1( "Font" ) ))
mFont = v;
}
/**
Get Font
*/
- QFont font() const
+ TQFont font() const
{
return mFont;
}
@@ -34,16 +34,16 @@ class Test8a : public KConfigSkeleton
/**
Set TitleFont
*/
- void setTitleFont( const QFont & v )
+ void setTitleFont( const TQFont & v )
{
- if (!isImmutable( QString::fromLatin1( "TitleFont" ) ))
+ if (!isImmutable( TQString::fromLatin1( "TitleFont" ) ))
mTitleFont = v;
}
/**
Get TitleFont
*/
- QFont titleFont() const
+ TQFont titleFont() const
{
return mTitleFont;
}
@@ -51,8 +51,8 @@ class Test8a : public KConfigSkeleton
protected:
// Group
- QFont mFont;
- QFont mTitleFont;
+ TQFont mFont;
+ TQFont mTitleFont;
private:
};
diff --git a/kdecore/kconfig_compiler/tests/test8b.cpp.ref b/kdecore/kconfig_compiler/tests/test8b.cpp.ref
index 101f2ab6a..e29e3c4e7 100644
--- a/kdecore/kconfig_compiler/tests/test8b.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test8b.cpp.ref
@@ -22,20 +22,20 @@ Test8b::Test8b( )
: Test8a()
{
mSelf = this;
- setCurrentGroup( QString::fromLatin1( "Group8b1" ) );
+ setCurrentGroup( TQString::fromLatin1( "Group8b1" ) );
KConfigSkeleton::ItemUInt *itemSomething;
- itemSomething = new KConfigSkeleton::ItemUInt( currentGroup(), QString::fromLatin1( "Something" ), mSomething, 60 );
- addItem( itemSomething, QString::fromLatin1( "Something" ) );
+ itemSomething = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Something" ), mSomething, 60 );
+ addItem( itemSomething, TQString::fromLatin1( "Something" ) );
- setCurrentGroup( QString::fromLatin1( "Group8b2" ) );
+ setCurrentGroup( TQString::fromLatin1( "Group8b2" ) );
KConfigSkeleton::ItemBool *itemFooBoo;
- itemFooBoo = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "FooBoo" ), mFooBoo, false );
- addItem( itemFooBoo, QString::fromLatin1( "FooBoo" ) );
+ itemFooBoo = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "FooBoo" ), mFooBoo, false );
+ addItem( itemFooBoo, TQString::fromLatin1( "FooBoo" ) );
KConfigSkeleton::ItemUInt *itemPort;
- itemPort = new KConfigSkeleton::ItemUInt( currentGroup(), QString::fromLatin1( "Port" ), mPort, 1000 );
- addItem( itemPort, QString::fromLatin1( "Port" ) );
+ itemPort = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Port" ), mPort, 1000 );
+ addItem( itemPort, TQString::fromLatin1( "Port" ) );
}
Test8b::~Test8b()
diff --git a/kdecore/kconfig_compiler/tests/test8b.h.ref b/kdecore/kconfig_compiler/tests/test8b.h.ref
index 0ee51e3f8..4ca0d5c7f 100644
--- a/kdecore/kconfig_compiler/tests/test8b.h.ref
+++ b/kdecore/kconfig_compiler/tests/test8b.h.ref
@@ -21,7 +21,7 @@ class Test8b : public Test8a
static
void setSomething( uint v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Something" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Something" ) ))
self()->mSomething = v;
}
@@ -40,7 +40,7 @@ class Test8b : public Test8a
static
void setFooBoo( bool v )
{
- if (!self()->isImmutable( QString::fromLatin1( "FooBoo" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "FooBoo" ) ))
self()->mFooBoo = v;
}
@@ -59,7 +59,7 @@ class Test8b : public Test8a
static
void setPort( uint v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Port" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Port" ) ))
self()->mPort = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test8main.cpp b/kdecore/kconfig_compiler/tests/test8main.cpp
index 912631f7a..b3c242f68 100644
--- a/kdecore/kconfig_compiler/tests/test8main.cpp
+++ b/kdecore/kconfig_compiler/tests/test8main.cpp
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
int main( int, char*[] )
{
KInstance i("test");
- Test8a *config1 = new Test8a( KSharedConfig::openConfig( QString::null ) );
+ Test8a *config1 = new Test8a( KSharedConfig::openConfig( TQString::null ) );
Test8a *config2 = new Test8a();
Test8b::self();
delete config1;
diff --git a/kdecore/kconfig_compiler/tests/test9.cpp.ref b/kdecore/kconfig_compiler/tests/test9.cpp.ref
index 309c1ddbe..c5d57e4d1 100644
--- a/kdecore/kconfig_compiler/tests/test9.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test9.cpp.ref
@@ -3,30 +3,30 @@
#include "test9.h"
-Test9::Test9( const QString & transport, const QString & folder )
- : KConfigSkeleton( QString::fromLatin1( "examplerc" ) )
+Test9::Test9( const TQString & transport, const TQString & folder )
+ : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) )
, mParamtransport(transport)
, mParamfolder(folder)
{
- setCurrentGroup( QString::fromLatin1( "MyOptionsXX" ) );
+ setCurrentGroup( TQString::fromLatin1( "MyOptionsXX" ) );
- QStringList defaultMyStringList;
- defaultMyStringList.append( QString::fromUtf8( "up" ) );
- defaultMyStringList.append( QString::fromUtf8( "down" ) );
+ TQStringList defaultMyStringList;
+ defaultMyStringList.append( TQString::fromUtf8( "up" ) );
+ defaultMyStringList.append( TQString::fromUtf8( "down" ) );
KConfigSkeleton::ItemStringList *itemMyStringList;
- itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
- addItem( itemMyStringList, QString::fromLatin1( "MyStringList" ) );
- QStringList defaultMyPathList;
- defaultMyPathList.append( QString::fromUtf8( "/home" ) );
- defaultMyPathList.append( QString::fromUtf8( "~" ) );
+ itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
+ addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) );
+ TQStringList defaultMyPathList;
+ defaultMyPathList.append( TQString::fromUtf8( "/home" ) );
+ defaultMyPathList.append( TQString::fromUtf8( "~" ) );
KConfigSkeleton::ItemPathList *itemMyPathList;
- itemMyPathList = new KConfigSkeleton::ItemPathList( currentGroup(), QString::fromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList );
- addItem( itemMyPathList, QString::fromLatin1( "MyPathList" ) );
+ itemMyPathList = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList );
+ addItem( itemMyPathList, TQString::fromLatin1( "MyPathList" ) );
KConfigSkeleton::ItemPathList *itemMyPathsList2;
- itemMyPathsList2 = new KConfigSkeleton::ItemPathList( currentGroup(), QString::fromLatin1( "MyPathsList2" ), mMyPathsList2, QStringList(QString::fromLatin1("/usr/bin")) += QDir::homeDirPath() );
- addItem( itemMyPathsList2, QString::fromLatin1( "MyPathsList2" ) );
+ itemMyPathsList2 = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathsList2" ), mMyPathsList2, TQStringList(TQString::fromLatin1("/usr/bin")) += TQDir::homeDirPath() );
+ addItem( itemMyPathsList2, TQString::fromLatin1( "MyPathsList2" ) );
}
Test9::~Test9()
diff --git a/kdecore/kconfig_compiler/tests/test9.h.ref b/kdecore/kconfig_compiler/tests/test9.h.ref
index 4f3e241fc..66a629b48 100644
--- a/kdecore/kconfig_compiler/tests/test9.h.ref
+++ b/kdecore/kconfig_compiler/tests/test9.h.ref
@@ -6,27 +6,27 @@
#include <kconfigskeleton.h>
#include <kdebug.h>
-#include <qdir.h>
+#include <tqdir.h>
class Test9 : public KConfigSkeleton
{
public:
- Test9( const QString & transport, const QString & folder );
+ Test9( const TQString & transport, const TQString & folder );
~Test9();
/**
Set MyStringList
*/
- void setMyStringList( const QStringList & v )
+ void setMyStringList( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "MyStringList" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyStringList" ) ))
mMyStringList = v;
}
/**
Get MyStringList
*/
- QStringList myStringList() const
+ TQStringList myStringList() const
{
return mMyStringList;
}
@@ -34,16 +34,16 @@ class Test9 : public KConfigSkeleton
/**
Set This is a list of paths
*/
- void setMyPathList( const QStringList & v )
+ void setMyPathList( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "MyPathList" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyPathList" ) ))
mMyPathList = v;
}
/**
Get This is a list of paths
*/
- QStringList myPathList() const
+ TQStringList myPathList() const
{
return mMyPathList;
}
@@ -51,29 +51,29 @@ class Test9 : public KConfigSkeleton
/**
Set This is an additional test for PathList
*/
- void setMyPathsList2( const QStringList & v )
+ void setMyPathsList2( const TQStringList & v )
{
- if (!isImmutable( QString::fromLatin1( "MyPathsList2" ) ))
+ if (!isImmutable( TQString::fromLatin1( "MyPathsList2" ) ))
mMyPathsList2 = v;
}
/**
Get This is an additional test for PathList
*/
- QStringList myPathsList2() const
+ TQStringList myPathsList2() const
{
return mMyPathsList2;
}
protected:
public:
- QString mParamtransport;
- QString mParamfolder;
+ TQString mParamtransport;
+ TQString mParamfolder;
// MyOptionsXX
- QStringList mMyStringList;
- QStringList mMyPathList;
- QStringList mMyPathsList2;
+ TQStringList mMyStringList;
+ TQStringList mMyPathList;
+ TQStringList mMyPathsList2;
private:
};
diff --git a/kdecore/kconfig_compiler/tests/test9main.cpp b/kdecore/kconfig_compiler/tests/test9main.cpp
index 3802cd339..12e16e0d4 100644
--- a/kdecore/kconfig_compiler/tests/test9main.cpp
+++ b/kdecore/kconfig_compiler/tests/test9main.cpp
@@ -21,18 +21,18 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "test9.h"
#include "kinstance.h"
#include <kdebug.h>
-#include <qdir.h>
+#include <tqdir.h>
int main( int, char*[] )
{
KInstance i("test");
- Test9 *t = new Test9( QString::null, QString::null );
+ Test9 *t = new Test9( TQString::null, TQString::null );
- QStringList myPathsList2 = t->myPathsList2();
+ TQStringList myPathsList2 = t->myPathsList2();
kdWarning() << myPathsList2 << endl;
// add another path
- QStringList newlist = QDir::homeDirPath() + QString::fromLatin1("/.kde");
+ TQStringList newlist = TQDir::homeDirPath() + TQString::fromLatin1("/.kde");
myPathsList2 = myPathsList2 + newlist;
kdWarning() << myPathsList2 << endl;
diff --git a/kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref b/kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref
index e36c50dd0..7b5f55f03 100644
--- a/kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref
@@ -15,7 +15,7 @@ class TestDPointerPrivate
bool autoSave;
int autoSaveInterval;
bool confirm;
- QString archiveFile;
+ TQString archiveFile;
int destination;
// Views
@@ -23,14 +23,14 @@ class TestDPointerPrivate
bool selectionStartsEditor;
// KOrganizer Plugins
- QStringList selectedPlugins;
+ TQStringList selectedPlugins;
// Colors
- QColor highlightColor;
- QColor agendaBgColor;
+ TQColor highlightColor;
+ TQColor agendaBgColor;
// Fonts
- QFont timeBarFont;
+ TQFont timeBarFont;
// items
KConfigSkeleton::ItemBool *autoSaveItem;
@@ -60,97 +60,97 @@ TestDPointer *TestDPointer::self()
}
TestDPointer::TestDPointer( )
- : KConfigSkeleton( QString::fromLatin1( "korganizerrc" ) )
+ : KConfigSkeleton( TQString::fromLatin1( "korganizerrc" ) )
{
d = new TestDPointerPrivate;
mSelf = this;
- setCurrentGroup( QString::fromLatin1( "General" ) );
+ setCurrentGroup( TQString::fromLatin1( "General" ) );
- d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Auto Save" ), d->autoSave, false );
+ d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), d->autoSave, false );
d->autoSaveItem->setLabel( i18n("Enable automatic saving of calendar") );
d->autoSaveItem->setWhatsThis( i18n("WhatsThis text for AutoSave option") );
- addItem( d->autoSaveItem, QString::fromLatin1( "AutoSave" ) );
- d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 );
+ addItem( d->autoSaveItem, TQString::fromLatin1( "AutoSave" ) );
+ d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 );
d->autoSaveIntervalItem->setLabel( i18n("Auto Save Interval") );
- addItem( d->autoSaveIntervalItem, QString::fromLatin1( "AutoSaveInterval" ) );
- d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Confirm Deletes" ), d->confirm, true );
+ addItem( d->autoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) );
+ d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), d->confirm, true );
d->confirmItem->setLabel( i18n("Confirm deletes") );
- addItem( d->confirmItem, QString::fromLatin1( "Confirm" ) );
- d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "Archive File" ), d->archiveFile );
+ addItem( d->confirmItem, TQString::fromLatin1( "Confirm" ) );
+ d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), d->archiveFile );
d->archiveFileItem->setLabel( i18n("Archive File") );
- addItem( d->archiveFileItem, QString::fromLatin1( "ArchiveFile" ) );
- QValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
+ addItem( d->archiveFileItem, TQString::fromLatin1( "ArchiveFile" ) );
+ TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "standardDestination" );
+ choice.name = TQString::fromLatin1( "standardDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "askDestination" );
+ choice.name = TQString::fromLatin1( "askDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl1" );
+ choice.name = TQString::fromLatin1( "argl1" );
choice.label = i18n("Argl1 Label");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl2" );
+ choice.name = TQString::fromLatin1( "argl2" );
choice.whatsThis = i18n("Argl2 Whatsthis");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = QString::fromLatin1( "argl3" );
+ choice.name = TQString::fromLatin1( "argl3" );
choice.label = i18n("Argl3 Label");
choice.whatsThis = i18n("Argl3 Whatsthis");
valuesDestination.append( choice );
}
- d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination );
+ d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination );
d->destinationItem->setLabel( i18n("New Events/Todos Should") );
- addItem( d->destinationItem, QString::fromLatin1( "Destination" ) );
+ addItem( d->destinationItem, TQString::fromLatin1( "Destination" ) );
- setCurrentGroup( QString::fromLatin1( "Views" ) );
+ setCurrentGroup( TQString::fromLatin1( "Views" ) );
- d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Hour Size" ), d->hourSize, 10 );
+ d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), d->hourSize, 10 );
d->hourSizeItem->setLabel( i18n("Hour Size") );
- addItem( d->hourSizeItem, QString::fromLatin1( "HourSize" ) );
- d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false );
+ addItem( d->hourSizeItem, TQString::fromLatin1( "HourSize" ) );
+ d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false );
d->selectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") );
- addItem( d->selectionStartsEditorItem, QString::fromLatin1( "SelectionStartsEditor" ) );
+ addItem( d->selectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) );
- setCurrentGroup( QString::fromLatin1( "KOrganizer Plugins" ) );
+ setCurrentGroup( TQString::fromLatin1( "KOrganizer Plugins" ) );
- QStringList defaultSelectedPlugins;
- defaultSelectedPlugins.append( QString::fromUtf8( "holidays" ) );
- defaultSelectedPlugins.append( QString::fromUtf8( "webexport" ) );
+ TQStringList defaultSelectedPlugins;
+ defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) );
+ defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) );
- d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins );
+ d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins );
d->selectedPluginsItem->setLabel( i18n("SelectedPlugins") );
- addItem( d->selectedPluginsItem, QString::fromLatin1( "SelectedPlugins" ) );
+ addItem( d->selectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) );
- setCurrentGroup( QString::fromLatin1( "Colors" ) );
+ setCurrentGroup( TQString::fromLatin1( "Colors" ) );
- d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "Highlight Color" ), d->highlightColor, QColor( 100, 100, 255 ) );
+ d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), d->highlightColor, TQColor( 100, 100, 255 ) );
d->highlightColorItem->setLabel( i18n("Highlight color") );
- addItem( d->highlightColorItem, QString::fromLatin1( "HighlightColor" ) );
- d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "Agenda Background Color" ), d->agendaBgColor, QColor( 255, 255, 255 ) );
+ addItem( d->highlightColorItem, TQString::fromLatin1( "HighlightColor" ) );
+ d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), d->agendaBgColor, TQColor( 255, 255, 255 ) );
d->agendaBgColorItem->setLabel( i18n("Agenda view background color") );
- addItem( d->agendaBgColorItem, QString::fromLatin1( "AgendaBgColor" ) );
+ addItem( d->agendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) );
- setCurrentGroup( QString::fromLatin1( "Fonts" ) );
+ setCurrentGroup( TQString::fromLatin1( "Fonts" ) );
- d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QString::fromLatin1( "TimeBar Font" ), d->timeBarFont );
+ d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), d->timeBarFont );
d->timeBarFontItem->setLabel( i18n("Time bar") );
- addItem( d->timeBarFontItem, QString::fromLatin1( "TimeBarFont" ) );
+ addItem( d->timeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) );
}
void TestDPointer::setAutoSave( bool v )
{
- if (!self()->isImmutable( QString::fromLatin1( "AutoSave" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "AutoSave" ) ))
self()->d->autoSave = v;
}
@@ -167,7 +167,7 @@ KConfigSkeleton::ItemBool *TestDPointer::autoSaveItem()
void TestDPointer::setAutoSaveInterval( int v )
{
- if (!self()->isImmutable( QString::fromLatin1( "AutoSaveInterval" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "AutoSaveInterval" ) ))
self()->d->autoSaveInterval = v;
}
@@ -184,7 +184,7 @@ KConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem()
void TestDPointer::setConfirm( bool v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Confirm" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Confirm" ) ))
self()->d->confirm = v;
}
@@ -199,13 +199,13 @@ KConfigSkeleton::ItemBool *TestDPointer::confirmItem()
return d->confirmItem;
}
-void TestDPointer::setArchiveFile( const QString & v )
+void TestDPointer::setArchiveFile( const TQString & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "ArchiveFile" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "ArchiveFile" ) ))
self()->d->archiveFile = v;
}
-QString TestDPointer::archiveFile()
+TQString TestDPointer::archiveFile()
{
return self()->d->archiveFile;
}
@@ -218,7 +218,7 @@ KConfigSkeleton::ItemString *TestDPointer::archiveFileItem()
void TestDPointer::setDestination( int v )
{
- if (!self()->isImmutable( QString::fromLatin1( "Destination" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "Destination" ) ))
self()->d->destination = v;
}
@@ -235,7 +235,7 @@ KConfigSkeleton::ItemEnum *TestDPointer::destinationItem()
void TestDPointer::setHourSize( int v )
{
- if (!self()->isImmutable( QString::fromLatin1( "HourSize" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "HourSize" ) ))
self()->d->hourSize = v;
}
@@ -252,7 +252,7 @@ KConfigSkeleton::ItemInt *TestDPointer::hourSizeItem()
void TestDPointer::setSelectionStartsEditor( bool v )
{
- if (!self()->isImmutable( QString::fromLatin1( "SelectionStartsEditor" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "SelectionStartsEditor" ) ))
self()->d->selectionStartsEditor = v;
}
@@ -267,13 +267,13 @@ KConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem()
return d->selectionStartsEditorItem;
}
-void TestDPointer::setSelectedPlugins( const QStringList & v )
+void TestDPointer::setSelectedPlugins( const TQStringList & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "SelectedPlugins" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "SelectedPlugins" ) ))
self()->d->selectedPlugins = v;
}
-QStringList TestDPointer::selectedPlugins()
+TQStringList TestDPointer::selectedPlugins()
{
return self()->d->selectedPlugins;
}
@@ -284,13 +284,13 @@ KConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem()
return d->selectedPluginsItem;
}
-void TestDPointer::setHighlightColor( const QColor & v )
+void TestDPointer::setHighlightColor( const TQColor & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "HighlightColor" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "HighlightColor" ) ))
self()->d->highlightColor = v;
}
-QColor TestDPointer::highlightColor()
+TQColor TestDPointer::highlightColor()
{
return self()->d->highlightColor;
}
@@ -301,13 +301,13 @@ KConfigSkeleton::ItemColor *TestDPointer::highlightColorItem()
return d->highlightColorItem;
}
-void TestDPointer::setAgendaBgColor( const QColor & v )
+void TestDPointer::setAgendaBgColor( const TQColor & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "AgendaBgColor" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "AgendaBgColor" ) ))
self()->d->agendaBgColor = v;
}
-QColor TestDPointer::agendaBgColor()
+TQColor TestDPointer::agendaBgColor()
{
return self()->d->agendaBgColor;
}
@@ -318,13 +318,13 @@ KConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem()
return d->agendaBgColorItem;
}
-void TestDPointer::setTimeBarFont( const QFont & v )
+void TestDPointer::setTimeBarFont( const TQFont & v )
{
- if (!self()->isImmutable( QString::fromLatin1( "TimeBarFont" ) ))
+ if (!self()->isImmutable( TQString::fromLatin1( "TimeBarFont" ) ))
self()->d->timeBarFont = v;
}
-QFont TestDPointer::timeBarFont()
+TQFont TestDPointer::timeBarFont()
{
return self()->d->timeBarFont;
}
diff --git a/kdecore/kconfig_compiler/tests/test_dpointer.h.ref b/kdecore/kconfig_compiler/tests/test_dpointer.h.ref
index a8568fc9b..81f281e83 100644
--- a/kdecore/kconfig_compiler/tests/test_dpointer.h.ref
+++ b/kdecore/kconfig_compiler/tests/test_dpointer.h.ref
@@ -75,13 +75,13 @@ class TestDPointer : public KConfigSkeleton
Set Archive File
*/
static
- void setArchiveFile( const QString & v );
+ void setArchiveFile( const TQString & v );
/**
Get Archive File
*/
static
- QString archiveFile();
+ TQString archiveFile();
/**
Get Item object corresponding to ArchiveFile()
@@ -143,13 +143,13 @@ class TestDPointer : public KConfigSkeleton
Set SelectedPlugins
*/
static
- void setSelectedPlugins( const QStringList & v );
+ void setSelectedPlugins( const TQStringList & v );
/**
Get SelectedPlugins
*/
static
- QStringList selectedPlugins();
+ TQStringList selectedPlugins();
/**
Get Item object corresponding to SelectedPlugins()
@@ -160,13 +160,13 @@ class TestDPointer : public KConfigSkeleton
Set Highlight color
*/
static
- void setHighlightColor( const QColor & v );
+ void setHighlightColor( const TQColor & v );
/**
Get Highlight color
*/
static
- QColor highlightColor();
+ TQColor highlightColor();
/**
Get Item object corresponding to HighlightColor()
@@ -177,13 +177,13 @@ class TestDPointer : public KConfigSkeleton
Set Agenda view background color
*/
static
- void setAgendaBgColor( const QColor & v );
+ void setAgendaBgColor( const TQColor & v );
/**
Get Agenda view background color
*/
static
- QColor agendaBgColor();
+ TQColor agendaBgColor();
/**
Get Item object corresponding to AgendaBgColor()
@@ -194,13 +194,13 @@ class TestDPointer : public KConfigSkeleton
Set Time bar
*/
static
- void setTimeBarFont( const QFont & v );
+ void setTimeBarFont( const TQFont & v );
/**
Get Time bar
*/
static
- QFont timeBarFont();
+ TQFont timeBarFont();
/**
Get Item object corresponding to TimeBarFont()
diff --git a/kdecore/kconfigbackend.cpp b/kdecore/kconfigbackend.cpp
index 2d2672282..09d3a65c1 100644
--- a/kdecore/kconfigbackend.cpp
+++ b/kdecore/kconfigbackend.cpp
@@ -34,10 +34,10 @@
#include <signal.h>
#include <setjmp.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
#include "kconfigbackend.h"
#include "kconfigbase.h"
@@ -50,9 +50,9 @@
#include <kurl.h>
#include <kde_file.h>
-extern bool checkAccess(const QString& pathname, int mode);
+extern bool checkAccess(const TQString& pathname, int mode);
/* translate escaped escape sequences to their actual values. */
-static QCString printableToString(const char *str, int l)
+static TQCString printableToString(const char *str, int l)
{
// Strip leading white-space.
while((l>0) &&
@@ -68,7 +68,7 @@ static QCString printableToString(const char *str, int l)
l--;
}
- QCString result(l + 1);
+ TQCString result(l + 1);
char *r = result.data();
for(int i = 0; i < l;i++, str++)
@@ -112,12 +112,12 @@ static QCString printableToString(const char *str, int l)
return result;
}
-static QCString stringToPrintable(const QCString& str){
- QCString result(str.length()*2); // Maximum 2x as long as source string
+static TQCString stringToPrintable(const TQCString& str){
+ TQCString result(str.length()*2); // Maximum 2x as long as source string
register char *r = result.data();
register char *s = str.data();
- if (!s) return QCString("");
+ if (!s) return TQCString("");
// Escape leading space
if (*s == ' ')
@@ -163,9 +163,9 @@ static QCString stringToPrintable(const QCString& str){
return result;
}
-static QCString decodeGroup(const char*s, int l)
+static TQCString decodeGroup(const char*s, int l)
{
- QCString result(l);
+ TQCString result(l);
register char *r = result.data();
l--; // Correct for trailing \0
@@ -194,10 +194,10 @@ static QCString decodeGroup(const char*s, int l)
return result;
}
-static QCString encodeGroup(const QCString &str)
+static TQCString encodeGroup(const TQCString &str)
{
int l = str.length();
- QCString result(l*2+1);
+ TQCString result(l*2+1);
register char *r = result.data();
register char *s = str.data();
while(l)
@@ -211,9 +211,9 @@ static QCString encodeGroup(const QCString &str)
return result;
}
-static QCString encodeKey(const char* key)
+static TQCString encodeKey(const char* key)
{
- QCString newKey(key);
+ TQCString newKey(key);
newKey.replace('[', "%5b");
newKey.replace(']', "%5d");
@@ -221,9 +221,9 @@ static QCString encodeKey(const char* key)
return newKey;
}
-static QCString decodeKey(const char* key)
+static TQCString decodeKey(const char* key)
{
- QCString newKey(key);
+ TQCString newKey(key);
newKey.replace("%5b", "[");
newKey.replace("%5d", "]");
@@ -234,13 +234,13 @@ static QCString decodeKey(const char* key)
class KConfigBackEnd::KConfigBackEndPrivate
{
public:
- QDateTime localLastModified;
+ TQDateTime localLastModified;
uint localLastSize;
KLockFile::Ptr localLockFile;
KLockFile::Ptr globalLockFile;
};
-void KConfigBackEnd::changeFileName(const QString &_fileName,
+void KConfigBackEnd::changeFileName(const TQString &_fileName,
const char * _resType,
bool _useKDEGlobals)
{
@@ -248,19 +248,19 @@ void KConfigBackEnd::changeFileName(const QString &_fileName,
resType = _resType;
useKDEGlobals = _useKDEGlobals;
if (mfileName.isEmpty())
- mLocalFileName = QString::null;
- else if (!QDir::isRelativePath(mfileName))
+ mLocalFileName = TQString::null;
+ else if (!TQDir::isRelativePath(mfileName))
mLocalFileName = mfileName;
else
mLocalFileName = KGlobal::dirs()->saveLocation(resType) + mfileName;
if (useKDEGlobals)
mGlobalFileName = KGlobal::dirs()->saveLocation("config") +
- QString::fromLatin1("kdeglobals");
+ TQString::fromLatin1("kdeglobals");
else
- mGlobalFileName = QString::null;
+ mGlobalFileName = TQString::null;
- d->localLastModified = QDateTime();
+ d->localLastModified = TQDateTime();
d->localLastSize = 0;
d->localLockFile = 0;
d->globalLockFile = 0;
@@ -294,7 +294,7 @@ KLockFile::Ptr KConfigBackEnd::lockFile(bool bGlobal)
}
KConfigBackEnd::KConfigBackEnd(KConfigBase *_config,
- const QString &_fileName,
+ const TQString &_fileName,
const char * _resType,
bool _useKDEGlobals)
: pConfig(_config), bFileImmutable(false), mConfigState(KConfigBase::NoAccess), mFileMode(-1)
@@ -328,7 +328,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
// Create the containing dir, maybe it wasn't there
KURL path;
path.setPath(mLocalFileName);
- QString dir=path.directory();
+ TQString dir=path.directory();
KStandardDirs::makeDir(dir);
if (checkAccess(mLocalFileName, W_OK))
@@ -336,7 +336,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
mConfigState = KConfigBase::ReadWrite;
}
}
- QFileInfo info(mLocalFileName);
+ TQFileInfo info(mLocalFileName);
d->localLastModified = info.lastModified();
d->localLastSize = info.size();
}
@@ -346,26 +346,26 @@ bool KConfigINIBackEnd::parseConfigFiles()
// Parse the general config files
if (useKDEGlobals) {
- QStringList kdercs = KGlobal::dirs()->
- findAllResources("config", QString::fromLatin1("kdeglobals"));
+ TQStringList kdercs = KGlobal::dirs()->
+ findAllResources("config", TQString::fromLatin1("kdeglobals"));
#ifdef Q_WS_WIN
- QString etc_kderc = QFile::decodeName( QCString(getenv("WINDIR")) + "\\kderc" );
+ TQString etc_kderc = TQFile::decodeName( TQCString(getenv("WINDIR")) + "\\kderc" );
#else
- QString etc_kderc = QString::fromLatin1("/etc/kderc");
+ TQString etc_kderc = TQString::fromLatin1("/etc/kderc");
#endif
if (checkAccess(etc_kderc, R_OK))
kdercs += etc_kderc;
kdercs += KGlobal::dirs()->
- findAllResources("config", QString::fromLatin1("system.kdeglobals"));
+ findAllResources("config", TQString::fromLatin1("system.kdeglobals"));
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = kdercs.fromLast(); it != kdercs.end(); --it) {
- QFile aConfigFile( *it );
+ TQFile aConfigFile( *it );
if (!aConfigFile.open( IO_ReadOnly ))
continue;
parseSingleConfigFile( aConfigFile, 0L, true, (*it != mGlobalFileName) );
@@ -378,7 +378,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
bool bReadFile = !mfileName.isEmpty();
while(bReadFile) {
bReadFile = false;
- QString bootLanguage;
+ TQString bootLanguage;
if (useKDEGlobals && localeString.isEmpty() && !KGlobal::_locale) {
// Boot strap language
bootLanguage = KLocale::_initLanguage(pConfig);
@@ -386,17 +386,17 @@ bool KConfigINIBackEnd::parseConfigFiles()
}
bFileImmutable = false;
- QStringList list;
- if ( !QDir::isRelativePath(mfileName) )
+ TQStringList list;
+ if ( !TQDir::isRelativePath(mfileName) )
list << mfileName;
else
list = KGlobal::dirs()->findAllResources(resType, mfileName);
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = list.fromLast(); it != list.end(); --it) {
- QFile aConfigFile( *it );
+ TQFile aConfigFile( *it );
// we can already be sure that this file exists
bool bIsLocal = (*it == mLocalFileName);
if (aConfigFile.open( IO_ReadOnly )) {
@@ -408,7 +408,7 @@ bool KConfigINIBackEnd::parseConfigFiles()
}
if (KGlobal::dirs()->isRestrictedResource(resType, mfileName))
bFileImmutable = true;
- QString currentLanguage;
+ TQString currentLanguage;
if (!bootLanguage.isEmpty())
{
currentLanguage = KLocale::_initLanguage(pConfig);
@@ -443,13 +443,13 @@ extern "C" {
extern bool kde_kiosk_exception;
-void KConfigINIBackEnd::parseSingleConfigFile(QFile &rFile,
+void KConfigINIBackEnd::parseSingleConfigFile(TQFile &rFile,
KEntryMap *pWriteBackMap,
bool bGlobal, bool bDefault)
{
const char *s; // May get clobbered by sigsetjump, but we don't use them afterwards.
const char *eof; // May get clobbered by sigsetjump, but we don't use them afterwards.
- QByteArray data;
+ TQByteArray data;
if (!rFile.isOpen()) // come back, if you have real work for us ;->
return;
@@ -459,7 +459,7 @@ void KConfigINIBackEnd::parseSingleConfigFile(QFile &rFile,
//qWarning("Parsing %s, global = %s default = %s",
// rFile.name().latin1(), bGlobal ? "true" : "false", bDefault ? "true" : "false");
- QCString aCurrentGroup("<default>");
+ TQCString aCurrentGroup("<default>");
static unsigned int ll = localeString.length();
@@ -506,7 +506,7 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
bool groupOptionImmutable = false;
bool groupSkip = false;
bool foundGettextDomain = false;
- QCString gettextDomain;
+ TQCString gettextDomain;
int line = 0;
for(; s < eof; s++)
@@ -682,7 +682,7 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
{
// backward compatibility. C == en_US
if ( cl != 1 || ll != 5 || *locale != 'C' || memcmp(localeString.data(), "en_US", 5)) {
- //cout<<"mismatched locale '"<<QCString(locale, elocale-locale +1)<<"'"<<endl;
+ //cout<<"mismatched locale '"<<TQCString(locale, elocale-locale +1)<<"'"<<endl;
// We can ignore this one
if (!pWriteBackMap)
continue; // We just ignore it
@@ -694,11 +694,11 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
}
// insert the key/value line
- QCString key(startLine, endOfKey - startLine + 2);
- QCString val = printableToString(st, s - st);
+ TQCString key(startLine, endOfKey - startLine + 2);
+ TQCString val = printableToString(st, s - st);
//qDebug("found key '%s' with value '%s'", key.data(), val.data());
- if (QString(key.data()) == "X-Ubuntu-Gettext-Domain") {
+ if (TQString(key.data()) == "X-Ubuntu-Gettext-Domain") {
gettextDomain = val.data();
foundGettextDomain = true;
}
@@ -734,22 +734,22 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
// Ideas: only translate most important fields, only translate "Desktop Entry" files,
// do translation per KConfig not per single file
if (!pWriteBackMap) {
- QFile file("file.txt");
+ TQFile file("file.txt");
if (foundGettextDomain) {
KLocale locale(gettextDomain);
- QString language = locale.language();
- translateKey(locale, aCurrentGroup, QCString("Name"));
- translateKey(locale, aCurrentGroup, QCString("Comment"));
- translateKey(locale, aCurrentGroup, QCString("Language"));
- translateKey(locale, aCurrentGroup, QCString("Keywords"));
- translateKey(locale, aCurrentGroup, QCString("About"));
- translateKey(locale, aCurrentGroup, QCString("Description"));
- translateKey(locale, aCurrentGroup, QCString("GenericName"));
- translateKey(locale, aCurrentGroup, QCString("Query"));
- translateKey(locale, aCurrentGroup, QCString("ExtraNames"));
- translateKey(locale, aCurrentGroup, QCString("X-KDE-Submenu"));
+ TQString language = locale.language();
+ translateKey(locale, aCurrentGroup, TQCString("Name"));
+ translateKey(locale, aCurrentGroup, TQCString("Comment"));
+ translateKey(locale, aCurrentGroup, TQCString("Language"));
+ translateKey(locale, aCurrentGroup, TQCString("Keywords"));
+ translateKey(locale, aCurrentGroup, TQCString("About"));
+ translateKey(locale, aCurrentGroup, TQCString("Description"));
+ translateKey(locale, aCurrentGroup, TQCString("GenericName"));
+ translateKey(locale, aCurrentGroup, TQCString("Query"));
+ translateKey(locale, aCurrentGroup, TQCString("ExtraNames"));
+ translateKey(locale, aCurrentGroup, TQCString("X-KDE-Submenu"));
}
}
@@ -768,13 +768,13 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
#endif
}
-void KConfigINIBackEnd::translateKey(KLocale& locale, QCString currentGroup, QCString key) {
+void KConfigINIBackEnd::translateKey(KLocale& locale, TQCString currentGroup, TQCString key) {
KEntryKey entryKey = KEntryKey(currentGroup, key);
KEntry entry = pConfig->lookupData(entryKey);
- if (QString(entry.mValue) != "") {
- QString orig = key + "=" + entry.mValue;
- QString translate = locale.translate(key + "=" + entry.mValue);
- if (QString::compare(orig, translate) != 0) {
+ if (TQString(entry.mValue) != "") {
+ TQString orig = key + "=" + entry.mValue;
+ TQString translate = locale.translate(key + "=" + entry.mValue);
+ if (TQString::compare(orig, translate) != 0) {
translate = translate.mid(key.length() + 1);
entry.mValue = translate.utf8();
entryKey.bLocal = true;
@@ -797,11 +797,11 @@ void KConfigINIBackEnd::sync(bool bMerge)
if (!mfileName.isEmpty()) {
// Create the containing dir if needed
- if ((resType!="config") && !QDir::isRelativePath(mLocalFileName))
+ if ((resType!="config") && !TQDir::isRelativePath(mLocalFileName))
{
KURL path;
path.setPath(mLocalFileName);
- QString dir=path.directory();
+ TQString dir=path.directory();
KStandardDirs::makeDir(dir);
}
@@ -827,7 +827,7 @@ void KConfigINIBackEnd::sync(bool bMerge)
// But what if the locking failed? Ignore it for now...
}
- QFileInfo info(mLocalFileName);
+ TQFileInfo info(mLocalFileName);
if ((d->localLastSize == info.size()) &&
(d->localLastModified == info.lastModified()))
{
@@ -837,7 +837,7 @@ void KConfigINIBackEnd::sync(bool bMerge)
else
{
// Changed...
- d->localLastModified = QDateTime();
+ d->localLastModified = TQDateTime();
d->localLastSize = 0;
}
}
@@ -854,7 +854,7 @@ void KConfigINIBackEnd::sync(bool bMerge)
// For KDE 4.0 we may wish to reconsider that.
if (!mergeLocalFile)
{
- QFileInfo info(mLocalFileName);
+ TQFileInfo info(mLocalFileName);
d->localLastModified = info.lastModified();
d->localLastSize = info.size();
}
@@ -885,10 +885,10 @@ void KConfigINIBackEnd::sync(bool bMerge)
}
-static void writeEntries(FILE *pStream, const KEntryMap& entryMap, bool defaultGroup, bool &firstEntry, const QCString &localeString)
+static void writeEntries(FILE *pStream, const KEntryMap& entryMap, bool defaultGroup, bool &firstEntry, const TQCString &localeString)
{
// now write out all other groups.
- QCString currentGroup;
+ TQCString currentGroup;
for (KEntryMapConstIterator aIt = entryMap.begin();
aIt != entryMap.end(); ++aIt)
{
@@ -975,7 +975,7 @@ static void writeEntries(FILE *pStream, const KEntryMap& entryMap, bool defaultG
}
bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal,
- QFile *mergeFile)
+ TQFile *mergeFile)
{
bool bEntriesLeft = false;
bFileImmutable = false;
@@ -1027,8 +1027,8 @@ bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal,
return bEntriesLeft;
}
-/* antlarr: KDE 4.0: make the first parameter "const QString &" */
-bool KConfigINIBackEnd::writeConfigFile(QString filename, bool bGlobal,
+/* antlarr: KDE 4.0: make the first parameter "const TQString &" */
+bool KConfigINIBackEnd::writeConfigFile(TQString filename, bool bGlobal,
bool bMerge)
{
// is the config object read-only?
@@ -1036,7 +1036,7 @@ bool KConfigINIBackEnd::writeConfigFile(QString filename, bool bGlobal,
return true; // pretend we wrote it
KEntryMap aTempMap;
- QFile *mergeFile = (bMerge ? new QFile(filename) : 0);
+ TQFile *mergeFile = (bMerge ? new TQFile(filename) : 0);
bool bEntriesLeft = getEntryMap(aTempMap, bGlobal, mergeFile);
delete mergeFile;
if (bFileImmutable)
@@ -1050,7 +1050,7 @@ bool KConfigINIBackEnd::writeConfigFile(QString filename, bool bGlobal,
bool createNew = true;
KDE_struct_stat buf;
- if (KDE_stat(QFile::encodeName(filename), &buf) == 0)
+ if (KDE_stat(TQFile::encodeName(filename), &buf) == 0)
{
if (buf.st_uid == getuid())
{
@@ -1092,7 +1092,7 @@ bool KConfigINIBackEnd::writeConfigFile(QString filename, bool bGlobal,
{
// Open existing file.
// We use open() to ensure that we call without O_CREAT.
- int fd = KDE_open( QFile::encodeName(filename), O_WRONLY | O_TRUNC );
+ int fd = KDE_open( TQFile::encodeName(filename), O_WRONLY | O_TRUNC );
if (fd < 0)
{
return bEntriesLeft;
@@ -1113,7 +1113,7 @@ bool KConfigINIBackEnd::writeConfigFile(QString filename, bool bGlobal,
if ( bEmptyFile && ((fileMode == -1) || (fileMode == 0600)) )
{
// File is empty and doesn't have special permissions: delete it.
- ::unlink(QFile::encodeName(filename));
+ ::unlink(TQFile::encodeName(filename));
pConfigFile->abort();
}
else
@@ -1152,7 +1152,7 @@ bool KConfigBackEnd::checkConfigFilesWritable(bool warnUser)
{
// WARNING: Do NOT use the event loop as it may not exist at this time.
bool allWritable = true;
- QString errorMsg;
+ TQString errorMsg;
if ( !mLocalFileName.isEmpty() && !bFileImmutable && !checkAccess(mLocalFileName,W_OK) )
{
errorMsg = i18n("Will not save configuration.\n");
@@ -1173,7 +1173,7 @@ bool KConfigBackEnd::checkConfigFilesWritable(bool warnUser)
{
// Note: We don't ask the user if we should not ask this question again because we can't save the answer.
errorMsg += i18n("Please contact your system administrator.");
- QString cmdToExec = KStandardDirs::findExe(QString("kdialog"));
+ TQString cmdToExec = KStandardDirs::findExe(TQString("kdialog"));
KApplication *app = kapp;
if (!cmdToExec.isEmpty() && app)
{
diff --git a/kdecore/kconfigbackend.h b/kdecore/kconfigbackend.h
index 696062bf4..145602e0f 100644
--- a/kdecore/kconfigbackend.h
+++ b/kdecore/kconfigbackend.h
@@ -65,7 +65,7 @@ public:
* will be imported into the config object. If false, only
* the filename specified will be dealt with.
*/
- KConfigBackEnd(KConfigBase *_config, const QString &_fileName,
+ KConfigBackEnd(KConfigBase *_config, const TQString &_fileName,
const char * _resType, bool _useKDEGlobals);
/**
@@ -102,7 +102,7 @@ public:
* @param _useKDEGlobals specifies whether or not to also parse the
* global KDE configuration files.
*/
- void changeFileName(const QString &_fileName, const char * _resType,
+ void changeFileName(const TQString &_fileName, const char * _resType,
bool _useKDEGlobals);
/**
@@ -117,7 +117,7 @@ public:
* Returns the filename as passed to the constructor.
* @return the filename as passed to the constructor.
*/
- QString fileName() const { return mfileName; }
+ TQString fileName() const { return mfileName; }
/**
* Returns the resource type as passed to the constructor.
@@ -130,7 +130,7 @@ public:
* @param _localeString the identifier of the language
* @see KLocale
*/
- void setLocaleString(const QCString &_localeString) { localeString = _localeString; }
+ void setLocaleString(const TQCString &_localeString) { localeString = _localeString; }
/**
* Set the file mode for newly created files.
@@ -159,18 +159,18 @@ private:
/**
* @deprecated Use fileName() instead
*/
- KDE_DEPRECATED QString filename() const { return mfileName; }
+ KDE_DEPRECATED TQString filename() const { return mfileName; }
protected:
KConfigBase *pConfig;
- QString mfileName;
- QCString resType;
+ TQString mfileName;
+ TQCString resType;
bool useKDEGlobals : 1;
bool bFileImmutable : 1;
- QCString localeString;
- QString mLocalFileName;
- QString mGlobalFileName;
+ TQCString localeString;
+ TQString mLocalFileName;
+ TQString mGlobalFileName;
KConfigBase::ConfigState mConfigState;
int mFileMode;
@@ -207,7 +207,7 @@ public:
* will be imported into the config object. If false, only
* the filename specified will be dealt with.
*/
- KConfigINIBackEnd(KConfigBase *_config, const QString &_fileName,
+ KConfigINIBackEnd(KConfigBase *_config, const TQString &_fileName,
const char * _resType, bool _useKDEGlobals = true)
: KConfigBackEnd(_config, _fileName, _resType, _useKDEGlobals) {}
@@ -248,13 +248,13 @@ protected:
* @param bDefault Specifies whether entries should be marked as
* being default values.
*/
- void parseSingleConfigFile(QFile& rFile, KEntryMap *pWriteBackMap = 0L,
+ void parseSingleConfigFile(TQFile& rFile, KEntryMap *pWriteBackMap = 0L,
bool bGlobal = false, bool bDefault = false);
// Kubuntu patch, 2006-08-03
// looks up a key in with KLocale
// see https://launchpad.net/distros/ubuntu/+spec/langpacks-desktopfiles-kde
- void translateKey(KLocale& locale, QCString currentGroup, QCString key);
+ void translateKey(KLocale& locale, TQCString currentGroup, TQCString key);
/**
* Writes configuration file back.
@@ -270,7 +270,7 @@ protected:
* @return Whether some entries are left to be written to other
* files.
*/
- bool writeConfigFile(QString filename, bool bGlobal = false, bool bMerge = true);
+ bool writeConfigFile(TQString filename, bool bGlobal = false, bool bMerge = true);
/** Get the entry map.
*
@@ -284,7 +284,7 @@ protected:
* @return Whether there will be some entries left for writing to other
* files.
*/
- bool getEntryMap(KEntryMap &map, bool bGlobal, QFile *mergeFile);
+ bool getEntryMap(KEntryMap &map, bool bGlobal, TQFile *mergeFile);
/** Write the entries in @e aTempMap to the file stream.*/
void writeEntries(FILE *pStream, const KEntryMap &aTempMap);
diff --git a/kdecore/kconfigbase.cpp b/kdecore/kconfigbase.cpp
index 05156e969..3c80e5710 100644
--- a/kdecore/kconfigbase.cpp
+++ b/kdecore/kconfigbase.cpp
@@ -23,9 +23,9 @@
#include <stdlib.h>
#include <string.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -51,7 +51,7 @@ KConfigBase::KConfigBase()
: backEnd(0L), bDirty(false), bLocaleInitialized(false),
bReadOnly(false), bExpand(false), d(0)
{
- setGroup(QString::null);
+ setGroup(TQString::null);
}
KConfigBase::~KConfigBase()
@@ -71,12 +71,12 @@ void KConfigBase::setLocale()
backEnd->setLocaleString(aLocaleString);
}
-QString KConfigBase::locale() const
+TQString KConfigBase::locale() const
{
- return QString::fromUtf8(aLocaleString);
+ return TQString::fromUtf8(aLocaleString);
}
-void KConfigBase::setGroup( const QString& group )
+void KConfigBase::setGroup( const TQString& group )
{
if ( group.isEmpty() )
mGroup = "<default>";
@@ -86,10 +86,10 @@ void KConfigBase::setGroup( const QString& group )
void KConfigBase::setGroup( const char *pGroup )
{
- setGroup(QCString(pGroup));
+ setGroup(TQCString(pGroup));
}
-void KConfigBase::setGroup( const QCString &group )
+void KConfigBase::setGroup( const TQCString &group )
{
if ( group.isEmpty() )
mGroup = "<default>";
@@ -97,8 +97,8 @@ void KConfigBase::setGroup( const QCString &group )
mGroup = group;
}
-QString KConfigBase::group() const {
- return QString::fromUtf8(mGroup);
+TQString KConfigBase::group() const {
+ return TQString::fromUtf8(mGroup);
}
void KConfigBase::setDesktopGroup()
@@ -106,7 +106,7 @@ void KConfigBase::setDesktopGroup()
mGroup = "Desktop Entry";
}
-bool KConfigBase::hasKey(const QString &key) const
+bool KConfigBase::hasKey(const TQString &key) const
{
return hasKey(key.utf8().data());
}
@@ -131,17 +131,17 @@ bool KConfigBase::hasKey(const char *pKey) const
return !entry.mValue.isNull();
}
-bool KConfigBase::hasGroup(const QString &group) const
+bool KConfigBase::hasGroup(const TQString &group) const
{
return internalHasGroup( group.utf8());
}
bool KConfigBase::hasGroup(const char *_pGroup) const
{
- return internalHasGroup( QCString(_pGroup));
+ return internalHasGroup( TQCString(_pGroup));
}
-bool KConfigBase::hasGroup(const QCString &_pGroup) const
+bool KConfigBase::hasGroup(const TQCString &_pGroup) const
{
return internalHasGroup( _pGroup);
}
@@ -151,7 +151,7 @@ bool KConfigBase::isImmutable() const
return (getConfigState() != ReadWrite);
}
-bool KConfigBase::groupIsImmutable(const QString &group) const
+bool KConfigBase::groupIsImmutable(const TQString &group) const
{
if (getConfigState() != ReadWrite)
return true;
@@ -161,7 +161,7 @@ bool KConfigBase::groupIsImmutable(const QString &group) const
return entry.bImmutable;
}
-bool KConfigBase::entryIsImmutable(const QString &key) const
+bool KConfigBase::entryIsImmutable(const TQString &key) const
{
if (getConfigState() != ReadWrite)
return true;
@@ -171,7 +171,7 @@ bool KConfigBase::entryIsImmutable(const QString &key) const
if (aEntryData.bImmutable)
return true;
- QCString utf8_key = key.utf8();
+ TQCString utf8_key = key.utf8();
entryKey.c_key = utf8_key.data();
aEntryData = lookupData(entryKey); // Normal entry
if (aEntryData.bImmutable)
@@ -183,31 +183,31 @@ bool KConfigBase::entryIsImmutable(const QString &key) const
}
-QString KConfigBase::readEntryUntranslated( const QString& pKey,
- const QString& aDefault ) const
+TQString KConfigBase::readEntryUntranslated( const TQString& pKey,
+ const TQString& aDefault ) const
{
return KConfigBase::readEntryUntranslated(pKey.utf8().data(), aDefault);
}
-QString KConfigBase::readEntryUntranslated( const char *pKey,
- const QString& aDefault ) const
+TQString KConfigBase::readEntryUntranslated( const char *pKey,
+ const TQString& aDefault ) const
{
- QCString result = readEntryUtf8(pKey);
+ TQCString result = readEntryUtf8(pKey);
if (result.isNull())
return aDefault;
- return QString::fromUtf8(result);
+ return TQString::fromUtf8(result);
}
-QString KConfigBase::readEntry( const QString& pKey,
- const QString& aDefault ) const
+TQString KConfigBase::readEntry( const TQString& pKey,
+ const TQString& aDefault ) const
{
return KConfigBase::readEntry(pKey.utf8().data(), aDefault);
}
-QString KConfigBase::readEntry( const char *pKey,
- const QString& aDefault ) const
+TQString KConfigBase::readEntry( const char *pKey,
+ const TQString& aDefault ) const
{
// we need to access _locale instead of the method locale()
// because calling locale() will create a locale object if it
@@ -219,7 +219,7 @@ QString KConfigBase::readEntry( const char *pKey,
that->setLocale();
}
- QString aValue;
+ TQString aValue;
bool expand = false;
// construct a localized version of the key
@@ -238,10 +238,10 @@ QString KConfigBase::readEntry( const char *pKey,
entryKey.bLocal = false;
aEntryData = lookupData(entryKey);
if (!aEntryData.mValue.isNull()) {
- aValue = QString::fromUtf8(aEntryData.mValue.data());
+ aValue = TQString::fromUtf8(aEntryData.mValue.data());
if (aValue.isNull())
{
- static const QString &emptyString = KGlobal::staticQString("");
+ static const TQString &emptyString = KGlobal::staticQString("");
aValue = emptyString;
}
expand = aEntryData.bExpand;
@@ -264,14 +264,14 @@ QString KConfigBase::readEntry( const char *pKey,
while ( (nEndPos <= aValue.length()) && (aValue[nEndPos]!=')') )
nEndPos++;
nEndPos++;
- QString cmd = aValue.mid( nDollarPos+2, nEndPos-nDollarPos-3 );
+ TQString cmd = aValue.mid( nDollarPos+2, nEndPos-nDollarPos-3 );
- QString result;
- FILE *fs = popen(QFile::encodeName(cmd).data(), "r");
+ TQString result;
+ FILE *fs = popen(TQFile::encodeName(cmd).data(), "r");
if (fs)
{
{
- QTextStream ts(fs, IO_ReadOnly);
+ TQTextStream ts(fs, IO_ReadOnly);
result = ts.read().stripWhiteSpace();
}
pclose(fs);
@@ -280,7 +280,7 @@ QString KConfigBase::readEntry( const char *pKey,
} else if( (aValue)[nDollarPos+1] != '$' ) {
uint nEndPos = nDollarPos+1;
// the next character is no $
- QString aVarName;
+ TQString aVarName;
if (aValue[nEndPos]=='{')
{
while ( (nEndPos <= aValue.length()) && (aValue[nEndPos]!='}') )
@@ -317,7 +317,7 @@ QString KConfigBase::readEntry( const char *pKey,
return aValue;
}
-QCString KConfigBase::readEntryUtf8( const char *pKey) const
+TQCString KConfigBase::readEntryUtf8( const char *pKey) const
{
// We don't try the localized key
KEntryKey entryKey(mGroup, 0);
@@ -327,129 +327,129 @@ QCString KConfigBase::readEntryUtf8( const char *pKey) const
if (aEntryData.bExpand)
{
// We need to do fancy, take the slow route.
- return readEntry(pKey, QString::null).utf8();
+ return readEntry(pKey, TQString::null).utf8();
}
return aEntryData.mValue;
}
-QVariant KConfigBase::readPropertyEntry( const QString& pKey,
- QVariant::Type type ) const
+TQVariant KConfigBase::readPropertyEntry( const TQString& pKey,
+ TQVariant::Type type ) const
{
return readPropertyEntry(pKey.utf8().data(), type);
}
-QVariant KConfigBase::readPropertyEntry( const char *pKey,
- QVariant::Type type ) const
+TQVariant KConfigBase::readPropertyEntry( const char *pKey,
+ TQVariant::Type type ) const
{
- QVariant va;
+ TQVariant va;
if ( !hasKey( pKey ) ) return va;
(void)va.cast(type);
return readPropertyEntry(pKey, va);
}
-QVariant KConfigBase::readPropertyEntry( const QString& pKey,
- const QVariant &aDefault ) const
+TQVariant KConfigBase::readPropertyEntry( const TQString& pKey,
+ const TQVariant &aDefault ) const
{
return readPropertyEntry(pKey.utf8().data(), aDefault);
}
-QVariant KConfigBase::readPropertyEntry( const char *pKey,
- const QVariant &aDefault ) const
+TQVariant KConfigBase::readPropertyEntry( const char *pKey,
+ const TQVariant &aDefault ) const
{
if ( !hasKey( pKey ) ) return aDefault;
- QVariant tmp = aDefault;
+ TQVariant tmp = aDefault;
switch( aDefault.type() )
{
- case QVariant::Invalid:
- return QVariant();
- case QVariant::String:
- return QVariant( readEntry( pKey, aDefault.toString() ) );
- case QVariant::StringList:
- return QVariant( readListEntry( pKey ) );
- case QVariant::List: {
- QStringList strList = readListEntry( pKey );
- QStringList::ConstIterator it = strList.begin();
- QStringList::ConstIterator end = strList.end();
- QValueList<QVariant> list;
+ case TQVariant::Invalid:
+ return TQVariant();
+ case TQVariant::String:
+ return TQVariant( readEntry( pKey, aDefault.toString() ) );
+ case TQVariant::StringList:
+ return TQVariant( readListEntry( pKey ) );
+ case TQVariant::List: {
+ TQStringList strList = readListEntry( pKey );
+ TQStringList::ConstIterator it = strList.begin();
+ TQStringList::ConstIterator end = strList.end();
+ TQValueList<TQVariant> list;
for (; it != end; ++it ) {
tmp = *it;
list.append( tmp );
}
- return QVariant( list );
+ return TQVariant( list );
}
- case QVariant::Font:
- return QVariant( readFontEntry( pKey, &tmp.asFont() ) );
- case QVariant::Point:
- return QVariant( readPointEntry( pKey, &tmp.asPoint() ) );
- case QVariant::Rect:
- return QVariant( readRectEntry( pKey, &tmp.asRect() ) );
- case QVariant::Size:
- return QVariant( readSizeEntry( pKey, &tmp.asSize() ) );
- case QVariant::Color:
- return QVariant( readColorEntry( pKey, &tmp.asColor() ) );
- case QVariant::Int:
- return QVariant( readNumEntry( pKey, aDefault.toInt() ) );
- case QVariant::UInt:
- return QVariant( readUnsignedNumEntry( pKey, aDefault.toUInt() ) );
- case QVariant::LongLong:
- return QVariant( readNum64Entry( pKey, aDefault.toLongLong() ) );
- case QVariant::ULongLong:
- return QVariant( readUnsignedNum64Entry( pKey, aDefault.toULongLong() ) );
- case QVariant::Bool:
- return QVariant( readBoolEntry( pKey, aDefault.toBool() ), 0 );
- case QVariant::Double:
- return QVariant( readDoubleNumEntry( pKey, aDefault.toDouble() ) );
- case QVariant::DateTime:
- return QVariant( readDateTimeEntry( pKey, &tmp.asDateTime() ) );
- case QVariant::Date:
- return QVariant(readDateTimeEntry( pKey, &tmp.asDateTime() ).date());
-
- case QVariant::Pixmap:
- case QVariant::Image:
- case QVariant::Brush:
- case QVariant::Palette:
- case QVariant::ColorGroup:
- case QVariant::Map:
- case QVariant::IconSet:
- case QVariant::CString:
- case QVariant::PointArray:
- case QVariant::Region:
- case QVariant::Bitmap:
- case QVariant::Cursor:
- case QVariant::SizePolicy:
- case QVariant::Time:
- case QVariant::ByteArray:
- case QVariant::BitArray:
- case QVariant::KeySequence:
- case QVariant::Pen:
+ case TQVariant::Font:
+ return TQVariant( readFontEntry( pKey, &tmp.asFont() ) );
+ case TQVariant::Point:
+ return TQVariant( readPointEntry( pKey, &tmp.asPoint() ) );
+ case TQVariant::Rect:
+ return TQVariant( readRectEntry( pKey, &tmp.asRect() ) );
+ case TQVariant::Size:
+ return TQVariant( readSizeEntry( pKey, &tmp.asSize() ) );
+ case TQVariant::Color:
+ return TQVariant( readColorEntry( pKey, &tmp.asColor() ) );
+ case TQVariant::Int:
+ return TQVariant( readNumEntry( pKey, aDefault.toInt() ) );
+ case TQVariant::UInt:
+ return TQVariant( readUnsignedNumEntry( pKey, aDefault.toUInt() ) );
+ case TQVariant::LongLong:
+ return TQVariant( readNum64Entry( pKey, aDefault.toLongLong() ) );
+ case TQVariant::ULongLong:
+ return TQVariant( readUnsignedNum64Entry( pKey, aDefault.toULongLong() ) );
+ case TQVariant::Bool:
+ return TQVariant( readBoolEntry( pKey, aDefault.toBool() ), 0 );
+ case TQVariant::Double:
+ return TQVariant( readDoubleNumEntry( pKey, aDefault.toDouble() ) );
+ case TQVariant::DateTime:
+ return TQVariant( readDateTimeEntry( pKey, &tmp.asDateTime() ) );
+ case TQVariant::Date:
+ return TQVariant(readDateTimeEntry( pKey, &tmp.asDateTime() ).date());
+
+ case TQVariant::Pixmap:
+ case TQVariant::Image:
+ case TQVariant::Brush:
+ case TQVariant::Palette:
+ case TQVariant::ColorGroup:
+ case TQVariant::Map:
+ case TQVariant::IconSet:
+ case TQVariant::CString:
+ case TQVariant::PointArray:
+ case TQVariant::Region:
+ case TQVariant::Bitmap:
+ case TQVariant::Cursor:
+ case TQVariant::SizePolicy:
+ case TQVariant::Time:
+ case TQVariant::ByteArray:
+ case TQVariant::BitArray:
+ case TQVariant::KeySequence:
+ case TQVariant::Pen:
break;
}
Q_ASSERT( 0 );
- return QVariant();
+ return TQVariant();
}
-int KConfigBase::readListEntry( const QString& pKey,
- QStrList &list, char sep ) const
+int KConfigBase::readListEntry( const TQString& pKey,
+ TQStrList &list, char sep ) const
{
return readListEntry(pKey.utf8().data(), list, sep);
}
int KConfigBase::readListEntry( const char *pKey,
- QStrList &list, char sep ) const
+ TQStrList &list, char sep ) const
{
if( !hasKey( pKey ) )
return 0;
- QCString str_list = readEntryUtf8( pKey );
+ TQCString str_list = readEntryUtf8( pKey );
if (str_list.isEmpty())
return 0;
list.clear();
- QCString value = "";
+ TQCString value = "";
int len = str_list.length();
for (int i = 0; i < len; i++) {
@@ -466,7 +466,7 @@ int KConfigBase::readListEntry( const char *pKey,
// if we fell through to here, we are at a separator. Append
// contents of value to the list
// !!! Sergey A. Sukiyazov <corwin@micom.don.ru> !!!
- // A QStrList may contain values in 8bit locale cpecified
+ // A TQStrList may contain values in 8bit locale cpecified
// encoding
list.append( value );
value.truncate(0);
@@ -477,22 +477,22 @@ int KConfigBase::readListEntry( const char *pKey,
return list.count();
}
-QStringList KConfigBase::readListEntry( const QString& pKey, char sep ) const
+TQStringList KConfigBase::readListEntry( const TQString& pKey, char sep ) const
{
return readListEntry(pKey.utf8().data(), sep);
}
-QStringList KConfigBase::readListEntry( const char *pKey, char sep ) const
+TQStringList KConfigBase::readListEntry( const char *pKey, char sep ) const
{
- static const QString& emptyString = KGlobal::staticQString("");
+ static const TQString& emptyString = KGlobal::staticQString("");
- QStringList list;
+ TQStringList list;
if( !hasKey( pKey ) )
return list;
- QString str_list = readEntry( pKey );
+ TQString str_list = readEntry( pKey );
if( str_list.isEmpty() )
return list;
- QString value(emptyString);
+ TQString value(emptyString);
int len = str_list.length();
// obviously too big, but faster than letting each += resize the string.
value.reserve( len );
@@ -510,7 +510,7 @@ QStringList KConfigBase::readListEntry( const char *pKey, char sep ) const
value += str_list[i];
continue;
}
- QString finalvalue( value );
+ TQString finalvalue( value );
finalvalue.squeeze();
list.append( finalvalue );
value.truncate( 0 );
@@ -523,7 +523,7 @@ QStringList KConfigBase::readListEntry( const char *pKey, char sep ) const
return list;
}
-QStringList KConfigBase::readListEntry( const char* pKey, const QStringList& aDefault,
+TQStringList KConfigBase::readListEntry( const char* pKey, const TQStringList& aDefault,
char sep ) const
{
if ( !hasKey( pKey ) )
@@ -532,17 +532,17 @@ QStringList KConfigBase::readListEntry( const char* pKey, const QStringList& aDe
return readListEntry( pKey, sep );
}
-QValueList<int> KConfigBase::readIntListEntry( const QString& pKey ) const
+TQValueList<int> KConfigBase::readIntListEntry( const TQString& pKey ) const
{
return readIntListEntry(pKey.utf8().data());
}
-QValueList<int> KConfigBase::readIntListEntry( const char *pKey ) const
+TQValueList<int> KConfigBase::readIntListEntry( const char *pKey ) const
{
- QStringList strlist = readListEntry(pKey);
- QValueList<int> list;
- QStringList::ConstIterator end(strlist.end());
- for (QStringList::ConstIterator it = strlist.begin(); it != end; ++it)
+ TQStringList strlist = readListEntry(pKey);
+ TQValueList<int> list;
+ TQStringList::ConstIterator end(strlist.end());
+ for (TQStringList::ConstIterator it = strlist.begin(); it != end; ++it)
// I do not check if the toInt failed because I consider the number of items
// more important than their value
list << (*it).toInt();
@@ -550,42 +550,42 @@ QValueList<int> KConfigBase::readIntListEntry( const char *pKey ) const
return list;
}
-QString KConfigBase::readPathEntry( const QString& pKey, const QString& pDefault ) const
+TQString KConfigBase::readPathEntry( const TQString& pKey, const TQString& pDefault ) const
{
return readPathEntry(pKey.utf8().data(), pDefault);
}
-QString KConfigBase::readPathEntry( const char *pKey, const QString& pDefault ) const
+TQString KConfigBase::readPathEntry( const char *pKey, const TQString& pDefault ) const
{
const bool bExpandSave = bExpand;
bExpand = true;
- QString aValue = readEntry( pKey, pDefault );
+ TQString aValue = readEntry( pKey, pDefault );
bExpand = bExpandSave;
return aValue;
}
-QStringList KConfigBase::readPathListEntry( const QString& pKey, char sep ) const
+TQStringList KConfigBase::readPathListEntry( const TQString& pKey, char sep ) const
{
return readPathListEntry(pKey.utf8().data(), sep);
}
-QStringList KConfigBase::readPathListEntry( const char *pKey, char sep ) const
+TQStringList KConfigBase::readPathListEntry( const char *pKey, char sep ) const
{
const bool bExpandSave = bExpand;
bExpand = true;
- QStringList aValue = readListEntry( pKey, sep );
+ TQStringList aValue = readListEntry( pKey, sep );
bExpand = bExpandSave;
return aValue;
}
-int KConfigBase::readNumEntry( const QString& pKey, int nDefault) const
+int KConfigBase::readNumEntry( const TQString& pKey, int nDefault) const
{
return readNumEntry(pKey.utf8().data(), nDefault);
}
int KConfigBase::readNumEntry( const char *pKey, int nDefault) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return nDefault;
else if( aValue == "true" || aValue == "on" || aValue == "yes" )
@@ -599,14 +599,14 @@ int KConfigBase::readNumEntry( const char *pKey, int nDefault) const
}
-unsigned int KConfigBase::readUnsignedNumEntry( const QString& pKey, unsigned int nDefault) const
+unsigned int KConfigBase::readUnsignedNumEntry( const TQString& pKey, unsigned int nDefault) const
{
return readUnsignedNumEntry(pKey.utf8().data(), nDefault);
}
unsigned int KConfigBase::readUnsignedNumEntry( const char *pKey, unsigned int nDefault) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -618,14 +618,14 @@ unsigned int KConfigBase::readUnsignedNumEntry( const char *pKey, unsigned int n
}
-long KConfigBase::readLongNumEntry( const QString& pKey, long nDefault) const
+long KConfigBase::readLongNumEntry( const TQString& pKey, long nDefault) const
{
return readLongNumEntry(pKey.utf8().data(), nDefault);
}
long KConfigBase::readLongNumEntry( const char *pKey, long nDefault) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -637,14 +637,14 @@ long KConfigBase::readLongNumEntry( const char *pKey, long nDefault) const
}
-unsigned long KConfigBase::readUnsignedLongNumEntry( const QString& pKey, unsigned long nDefault) const
+unsigned long KConfigBase::readUnsignedLongNumEntry( const TQString& pKey, unsigned long nDefault) const
{
return readUnsignedLongNumEntry(pKey.utf8().data(), nDefault);
}
unsigned long KConfigBase::readUnsignedLongNumEntry( const char *pKey, unsigned long nDefault) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -655,15 +655,15 @@ unsigned long KConfigBase::readUnsignedLongNumEntry( const char *pKey, unsigned
}
}
-Q_INT64 KConfigBase::readNum64Entry( const QString& pKey, Q_INT64 nDefault) const
+Q_INT64 KConfigBase::readNum64Entry( const TQString& pKey, Q_INT64 nDefault) const
{
return readNum64Entry(pKey.utf8().data(), nDefault);
}
Q_INT64 KConfigBase::readNum64Entry( const char *pKey, Q_INT64 nDefault) const
{
- // Note that QCString::toLongLong() is missing, we muse use a QString instead.
- QString aValue = readEntry( pKey );
+ // Note that TQCString::toLongLong() is missing, we muse use a TQString instead.
+ TQString aValue = readEntry( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -675,15 +675,15 @@ Q_INT64 KConfigBase::readNum64Entry( const char *pKey, Q_INT64 nDefault) const
}
-Q_UINT64 KConfigBase::readUnsignedNum64Entry( const QString& pKey, Q_UINT64 nDefault) const
+Q_UINT64 KConfigBase::readUnsignedNum64Entry( const TQString& pKey, Q_UINT64 nDefault) const
{
return readUnsignedNum64Entry(pKey.utf8().data(), nDefault);
}
Q_UINT64 KConfigBase::readUnsignedNum64Entry( const char *pKey, Q_UINT64 nDefault) const
{
- // Note that QCString::toULongLong() is missing, we muse use a QString instead.
- QString aValue = readEntry( pKey );
+ // Note that TQCString::toULongLong() is missing, we muse use a TQString instead.
+ TQString aValue = readEntry( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -694,14 +694,14 @@ Q_UINT64 KConfigBase::readUnsignedNum64Entry( const char *pKey, Q_UINT64 nDefaul
}
}
-double KConfigBase::readDoubleNumEntry( const QString& pKey, double nDefault) const
+double KConfigBase::readDoubleNumEntry( const TQString& pKey, double nDefault) const
{
return readDoubleNumEntry(pKey.utf8().data(), nDefault);
}
double KConfigBase::readDoubleNumEntry( const char *pKey, double nDefault) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return nDefault;
else
@@ -713,14 +713,14 @@ double KConfigBase::readDoubleNumEntry( const char *pKey, double nDefault) const
}
-bool KConfigBase::readBoolEntry( const QString& pKey, bool bDefault ) const
+bool KConfigBase::readBoolEntry( const TQString& pKey, bool bDefault ) const
{
return readBoolEntry(pKey.utf8().data(), bDefault);
}
bool KConfigBase::readBoolEntry( const char *pKey, bool bDefault ) const
{
- QCString aValue = readEntryUtf8( pKey );
+ TQCString aValue = readEntryUtf8( pKey );
if( aValue.isNull() )
return bDefault;
@@ -740,16 +740,16 @@ bool KConfigBase::readBoolEntry( const char *pKey, bool bDefault ) const
}
}
-QFont KConfigBase::readFontEntry( const QString& pKey, const QFont* pDefault ) const
+TQFont KConfigBase::readFontEntry( const TQString& pKey, const TQFont* pDefault ) const
{
return readFontEntry(pKey.utf8().data(), pDefault);
}
-QFont KConfigBase::readFontEntry( const char *pKey, const QFont* pDefault ) const
+TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) const
{
- QFont aRetFont;
+ TQFont aRetFont;
- QString aValue = readEntry( pKey );
+ TQString aValue = readEntry( pKey );
if( !aValue.isNull() ) {
if ( aValue.contains( ',' ) > 5 ) {
// KDE3 and upwards entry
@@ -790,7 +790,7 @@ QFont KConfigBase::readFontEntry( const char *pKey, const QFont* pDefault ) cons
return aRetFont;
}
- aRetFont.setStyleHint( (QFont::StyleHint)aValue.mid( nOldIndex+1, nIndex-nOldIndex-1 ).toUInt() );
+ aRetFont.setStyleHint( (TQFont::StyleHint)aValue.mid( nOldIndex+1, nIndex-nOldIndex-1 ).toUInt() );
// find fourth part (char set)
nOldIndex = nIndex;
@@ -802,7 +802,7 @@ QFont KConfigBase::readFontEntry( const char *pKey, const QFont* pDefault ) cons
return aRetFont;
}
- QString chStr=aValue.mid( nOldIndex+1,
+ TQString chStr=aValue.mid( nOldIndex+1,
nIndex-nOldIndex-1 );
// find fifth part (weight)
nOldIndex = nIndex;
@@ -837,14 +837,14 @@ QFont KConfigBase::readFontEntry( const char *pKey, const QFont* pDefault ) cons
}
-QRect KConfigBase::readRectEntry( const QString& pKey, const QRect* pDefault ) const
+TQRect KConfigBase::readRectEntry( const TQString& pKey, const TQRect* pDefault ) const
{
return readRectEntry(pKey.utf8().data(), pDefault);
}
-QRect KConfigBase::readRectEntry( const char *pKey, const QRect* pDefault ) const
+TQRect KConfigBase::readRectEntry( const char *pKey, const TQRect* pDefault ) const
{
- QCString aValue = readEntryUtf8(pKey);
+ TQCString aValue = readEntryUtf8(pKey);
if (!aValue.isEmpty())
{
@@ -852,25 +852,25 @@ QRect KConfigBase::readRectEntry( const char *pKey, const QRect* pDefault ) cons
if (sscanf(aValue.data(), "%d,%d,%d,%d", &left, &top, &width, &height) == 4)
{
- return QRect(left, top, width, height);
+ return TQRect(left, top, width, height);
}
}
if (pDefault)
return *pDefault;
- return QRect();
+ return TQRect();
}
-QPoint KConfigBase::readPointEntry( const QString& pKey,
- const QPoint* pDefault ) const
+TQPoint KConfigBase::readPointEntry( const TQString& pKey,
+ const TQPoint* pDefault ) const
{
return readPointEntry(pKey.utf8().data(), pDefault);
}
-QPoint KConfigBase::readPointEntry( const char *pKey,
- const QPoint* pDefault ) const
+TQPoint KConfigBase::readPointEntry( const char *pKey,
+ const TQPoint* pDefault ) const
{
- QCString aValue = readEntryUtf8(pKey);
+ TQCString aValue = readEntryUtf8(pKey);
if (!aValue.isEmpty())
{
@@ -878,24 +878,24 @@ QPoint KConfigBase::readPointEntry( const char *pKey,
if (sscanf(aValue.data(), "%d,%d", &x, &y) == 2)
{
- return QPoint(x,y);
+ return TQPoint(x,y);
}
}
if (pDefault)
return *pDefault;
- return QPoint();
+ return TQPoint();
}
-QSize KConfigBase::readSizeEntry( const QString& pKey,
- const QSize* pDefault ) const
+TQSize KConfigBase::readSizeEntry( const TQString& pKey,
+ const TQSize* pDefault ) const
{
return readSizeEntry(pKey.utf8().data(), pDefault);
}
-QSize KConfigBase::readSizeEntry( const char *pKey,
- const QSize* pDefault ) const
+TQSize KConfigBase::readSizeEntry( const char *pKey,
+ const TQSize* pDefault ) const
{
- QCString aValue = readEntryUtf8(pKey);
+ TQCString aValue = readEntryUtf8(pKey);
if (!aValue.isEmpty())
{
@@ -903,28 +903,28 @@ QSize KConfigBase::readSizeEntry( const char *pKey,
if (sscanf(aValue.data(), "%d,%d", &width, &height) == 2)
{
- return QSize(width, height);
+ return TQSize(width, height);
}
}
if (pDefault)
return *pDefault;
- return QSize();
+ return TQSize();
}
-QColor KConfigBase::readColorEntry( const QString& pKey,
- const QColor* pDefault ) const
+TQColor KConfigBase::readColorEntry( const TQString& pKey,
+ const TQColor* pDefault ) const
{
return readColorEntry(pKey.utf8().data(), pDefault);
}
-QColor KConfigBase::readColorEntry( const char *pKey,
- const QColor* pDefault ) const
+TQColor KConfigBase::readColorEntry( const char *pKey,
+ const TQColor* pDefault ) const
{
- QColor aRetColor;
+ TQColor aRetColor;
int nRed = 0, nGreen = 0, nBlue = 0;
- QString aValue = readEntry( pKey );
+ TQString aValue = readEntry( pKey );
if( !aValue.isEmpty() )
{
if ( aValue.at(0) == '#' )
@@ -977,39 +977,39 @@ QColor KConfigBase::readColorEntry( const char *pKey,
}
-QDateTime KConfigBase::readDateTimeEntry( const QString& pKey,
- const QDateTime* pDefault ) const
+TQDateTime KConfigBase::readDateTimeEntry( const TQString& pKey,
+ const TQDateTime* pDefault ) const
{
return readDateTimeEntry(pKey.utf8().data(), pDefault);
}
// ### currentDateTime() as fallback ? (Harri)
-QDateTime KConfigBase::readDateTimeEntry( const char *pKey,
- const QDateTime* pDefault ) const
+TQDateTime KConfigBase::readDateTimeEntry( const char *pKey,
+ const TQDateTime* pDefault ) const
{
if( !hasKey( pKey ) )
{
if( pDefault )
return *pDefault;
else
- return QDateTime::currentDateTime();
+ return TQDateTime::currentDateTime();
}
- QStrList list;
+ TQStrList list;
int count = readListEntry( pKey, list, ',' );
if( count == 6 ) {
- QDate date( atoi( list.at( 0 ) ), atoi( list.at( 1 ) ),
+ TQDate date( atoi( list.at( 0 ) ), atoi( list.at( 1 ) ),
atoi( list.at( 2 ) ) );
- QTime time( atoi( list.at( 3 ) ), atoi( list.at( 4 ) ),
+ TQTime time( atoi( list.at( 3 ) ), atoi( list.at( 4 ) ),
atoi( list.at( 5 ) ) );
- return QDateTime( date, time );
+ return TQDateTime( date, time );
}
- return QDateTime::currentDateTime();
+ return TQDateTime::currentDateTime();
}
-void KConfigBase::writeEntry( const QString& pKey, const QString& value,
+void KConfigBase::writeEntry( const TQString& pKey, const TQString& value,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1017,7 +1017,7 @@ void KConfigBase::writeEntry( const QString& pKey, const QString& value,
writeEntry(pKey.utf8().data(), value, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QString& value,
+void KConfigBase::writeEntry( const char *pKey, const TQString& value,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1025,7 +1025,7 @@ void KConfigBase::writeEntry( const char *pKey, const QString& value,
writeEntry(pKey, value, bPersistent, bGlobal, bNLS, false);
}
-void KConfigBase::writeEntry( const char *pKey, const QString& value,
+void KConfigBase::writeEntry( const char *pKey, const TQString& value,
bool bPersistent,
bool bGlobal,
bool bNLS,
@@ -1058,7 +1058,7 @@ void KConfigBase::writeEntry( const char *pKey, const QString& value,
putData(entryKey, aEntryData, true);
}
-void KConfigBase::writePathEntry( const QString& pKey, const QString & path,
+void KConfigBase::writePathEntry( const TQString& pKey, const TQString & path,
bool bPersistent, bool bGlobal,
bool bNLS)
{
@@ -1066,10 +1066,10 @@ void KConfigBase::writePathEntry( const QString& pKey, const QString & path,
}
-static bool cleanHomeDirPath( QString &path, const QString &homeDir )
+static bool cleanHomeDirPath( TQString &path, const TQString &homeDir )
{
#ifdef Q_WS_WIN //safer
- if (!QDir::convertSeparators(path).startsWith(QDir::convertSeparators(homeDir)))
+ if (!TQDir::convertSeparators(path).startsWith(TQDir::convertSeparators(homeDir)))
return false;
#else
if (!path.startsWith(homeDir))
@@ -1079,13 +1079,13 @@ static bool cleanHomeDirPath( QString &path, const QString &homeDir )
unsigned int len = homeDir.length();
// replace by "$HOME" if possible
if (len && (path.length() == len || path[len] == '/')) {
- path.replace(0, len, QString::fromLatin1("$HOME"));
+ path.replace(0, len, TQString::fromLatin1("$HOME"));
return true;
} else
return false;
}
-static QString translatePath( QString path )
+static TQString translatePath( TQString path )
{
if (path.isEmpty())
return path;
@@ -1112,9 +1112,9 @@ static QString translatePath( QString path )
// since it would not recognize paths without a trailing '/'.
// All of the 3 following functions to return the user's home directory
// can return different paths. We have to test all them.
- QString homeDir0 = QFile::decodeName(getenv("HOME"));
- QString homeDir1 = QDir::homeDirPath();
- QString homeDir2 = QDir(homeDir1).canonicalPath();
+ TQString homeDir0 = TQFile::decodeName(getenv("HOME"));
+ TQString homeDir1 = TQDir::homeDirPath();
+ TQString homeDir2 = TQDir(homeDir1).canonicalPath();
if (cleanHomeDirPath(path, homeDir0) ||
cleanHomeDirPath(path, homeDir1) ||
cleanHomeDirPath(path, homeDir2) ) {
@@ -1127,40 +1127,40 @@ static QString translatePath( QString path )
return path;
}
-void KConfigBase::writePathEntry( const char *pKey, const QString & path,
+void KConfigBase::writePathEntry( const char *pKey, const TQString & path,
bool bPersistent, bool bGlobal,
bool bNLS)
{
writeEntry(pKey, translatePath(path), bPersistent, bGlobal, bNLS, true);
}
-void KConfigBase::writePathEntry ( const QString& pKey, const QStringList &list,
+void KConfigBase::writePathEntry ( const TQString& pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writePathEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writePathEntry ( const char *pKey, const QStringList &list,
+void KConfigBase::writePathEntry ( const char *pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
if( list.isEmpty() )
{
- writeEntry( pKey, QString::fromLatin1(""), bPersistent );
+ writeEntry( pKey, TQString::fromLatin1(""), bPersistent );
return;
}
- QStringList new_list;
- QStringList::ConstIterator it = list.begin();
+ TQStringList new_list;
+ TQStringList::ConstIterator it = list.begin();
for( ; it != list.end(); ++it )
{
- QString value = *it;
+ TQString value = *it;
new_list.append( translatePath(value) );
}
writeEntry( pKey, new_list, sep, bPersistent, bGlobal, bNLS, true );
}
-void KConfigBase::deleteEntry( const QString& pKey,
+void KConfigBase::deleteEntry( const TQString& pKey,
bool bNLS,
bool bGlobal)
{
@@ -1193,7 +1193,7 @@ void KConfigBase::deleteEntry( const char *pKey,
putData(entryKey, aEntryData, true);
}
-bool KConfigBase::deleteGroup( const QString& group, bool bDeep, bool bGlobal )
+bool KConfigBase::deleteGroup( const TQString& group, bool bDeep, bool bGlobal )
{
KEntryMap aEntryMap = internalEntryMap(group);
@@ -1224,33 +1224,33 @@ bool KConfigBase::deleteGroup( const QString& group, bool bDeep, bool bGlobal )
return true;
}
-void KConfigBase::writeEntry ( const QString& pKey, const QVariant &prop,
+void KConfigBase::writeEntry ( const TQString& pKey, const TQVariant &prop,
bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), prop, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const QVariant &prop,
+void KConfigBase::writeEntry ( const char *pKey, const TQVariant &prop,
bool bPersistent,
bool bGlobal, bool bNLS )
{
switch( prop.type() )
{
- case QVariant::Invalid:
+ case TQVariant::Invalid:
writeEntry( pKey, "", bPersistent, bGlobal, bNLS );
return;
- case QVariant::String:
+ case TQVariant::String:
writeEntry( pKey, prop.toString(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::StringList:
+ case TQVariant::StringList:
writeEntry( pKey, prop.toStringList(), ',', bPersistent, bGlobal, bNLS );
return;
- case QVariant::List: {
- QValueList<QVariant> list = prop.toList();
- QValueList<QVariant>::ConstIterator it = list.begin();
- QValueList<QVariant>::ConstIterator end = list.end();
- QStringList strList;
+ case TQVariant::List: {
+ TQValueList<TQVariant> list = prop.toList();
+ TQValueList<TQVariant>::ConstIterator it = list.begin();
+ TQValueList<TQVariant>::ConstIterator end = list.end();
+ TQStringList strList;
for (; it != end; ++it )
strList.append( (*it).toString() );
@@ -1259,94 +1259,94 @@ void KConfigBase::writeEntry ( const char *pKey, const QVariant &prop,
return;
}
- case QVariant::Font:
+ case TQVariant::Font:
writeEntry( pKey, prop.toFont(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Point:
+ case TQVariant::Point:
writeEntry( pKey, prop.toPoint(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Rect:
+ case TQVariant::Rect:
writeEntry( pKey, prop.toRect(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Size:
+ case TQVariant::Size:
writeEntry( pKey, prop.toSize(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Color:
+ case TQVariant::Color:
writeEntry( pKey, prop.toColor(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Int:
+ case TQVariant::Int:
writeEntry( pKey, prop.toInt(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::UInt:
+ case TQVariant::UInt:
writeEntry( pKey, prop.toUInt(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::LongLong:
+ case TQVariant::LongLong:
writeEntry( pKey, prop.toLongLong(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::ULongLong:
+ case TQVariant::ULongLong:
writeEntry( pKey, prop.toULongLong(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Bool:
+ case TQVariant::Bool:
writeEntry( pKey, prop.toBool(), bPersistent, bGlobal, bNLS );
return;
- case QVariant::Double:
+ case TQVariant::Double:
writeEntry( pKey, prop.toDouble(), bPersistent, bGlobal, 'g', 6, bNLS );
return;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
writeEntry( pKey, prop.toDateTime(), bPersistent, bGlobal, bNLS);
return;
- case QVariant::Date:
- writeEntry( pKey, QDateTime(prop.toDate()), bPersistent, bGlobal, bNLS);
+ case TQVariant::Date:
+ writeEntry( pKey, TQDateTime(prop.toDate()), bPersistent, bGlobal, bNLS);
return;
- case QVariant::Pixmap:
- case QVariant::Image:
- case QVariant::Brush:
- case QVariant::Palette:
- case QVariant::ColorGroup:
- case QVariant::Map:
- case QVariant::IconSet:
- case QVariant::CString:
- case QVariant::PointArray:
- case QVariant::Region:
- case QVariant::Bitmap:
- case QVariant::Cursor:
- case QVariant::SizePolicy:
- case QVariant::Time:
- case QVariant::ByteArray:
- case QVariant::BitArray:
- case QVariant::KeySequence:
- case QVariant::Pen:
+ case TQVariant::Pixmap:
+ case TQVariant::Image:
+ case TQVariant::Brush:
+ case TQVariant::Palette:
+ case TQVariant::ColorGroup:
+ case TQVariant::Map:
+ case TQVariant::IconSet:
+ case TQVariant::CString:
+ case TQVariant::PointArray:
+ case TQVariant::Region:
+ case TQVariant::Bitmap:
+ case TQVariant::Cursor:
+ case TQVariant::SizePolicy:
+ case TQVariant::Time:
+ case TQVariant::ByteArray:
+ case TQVariant::BitArray:
+ case TQVariant::KeySequence:
+ case TQVariant::Pen:
break;
}
Q_ASSERT( 0 );
}
-void KConfigBase::writeEntry ( const QString& pKey, const QStrList &list,
+void KConfigBase::writeEntry ( const TQString& pKey, const TQStrList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const QStrList &list,
+void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
if( list.isEmpty() )
{
- writeEntry( pKey, QString::fromLatin1(""), bPersistent );
+ writeEntry( pKey, TQString::fromLatin1(""), bPersistent );
return;
}
- QString str_list;
- QStrListIterator it( list );
+ TQString str_list;
+ TQStrListIterator it( list );
for( ; it.current(); ++it )
{
uint i;
- QString value;
+ TQString value;
// !!! Sergey A. Sukiyazov <corwin@micom.don.ru> !!!
- // A QStrList may contain values in 8bit locale cpecified
+ // A TQStrList may contain values in 8bit locale cpecified
// encoding or in UTF8 encoding.
value = KStringHandler::from8Bit(it.current());
uint strLengh(value.length());
@@ -1363,35 +1363,35 @@ void KConfigBase::writeEntry ( const char *pKey, const QStrList &list,
writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry ( const QString& pKey, const QStringList &list,
+void KConfigBase::writeEntry ( const TQString& pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), list, sep, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const QStringList &list,
+void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
char sep , bool bPersistent,
bool bGlobal, bool bNLS )
{
writeEntry(pKey, list, sep, bPersistent, bGlobal, bNLS, false);
}
-void KConfigBase::writeEntry ( const char *pKey, const QStringList &list,
+void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
char sep, bool bPersistent,
bool bGlobal, bool bNLS, bool bExpand )
{
if( list.isEmpty() )
{
- writeEntry( pKey, QString::fromLatin1(""), bPersistent );
+ writeEntry( pKey, TQString::fromLatin1(""), bPersistent );
return;
}
- QString str_list;
+ TQString str_list;
str_list.reserve( 4096 );
- QStringList::ConstIterator it = list.begin();
+ TQStringList::ConstIterator it = list.begin();
for( ; it != list.end(); ++it )
{
- QString value = *it;
+ TQString value = *it;
uint i;
uint strLength(value.length());
for( i = 0; i < strLength; i++ )
@@ -1407,116 +1407,116 @@ void KConfigBase::writeEntry ( const char *pKey, const QStringList &list,
writeEntry( pKey, str_list, bPersistent, bGlobal, bNLS, bExpand );
}
-void KConfigBase::writeEntry ( const QString& pKey, const QValueList<int> &list,
+void KConfigBase::writeEntry ( const TQString& pKey, const TQValueList<int> &list,
bool bPersistent, bool bGlobal, bool bNLS )
{
writeEntry(pKey.utf8().data(), list, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry ( const char *pKey, const QValueList<int> &list,
+void KConfigBase::writeEntry ( const char *pKey, const TQValueList<int> &list,
bool bPersistent, bool bGlobal, bool bNLS )
{
- QStringList strlist;
- QValueList<int>::ConstIterator end = list.end();
- for (QValueList<int>::ConstIterator it = list.begin(); it != end; it++)
- strlist << QString::number(*it);
+ TQStringList strlist;
+ TQValueList<int>::ConstIterator end = list.end();
+ for (TQValueList<int>::ConstIterator it = list.begin(); it != end; it++)
+ strlist << TQString::number(*it);
writeEntry(pKey, strlist, ',', bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, int nValue,
+void KConfigBase::writeEntry( const TQString& pKey, int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, unsigned int nValue,
+void KConfigBase::writeEntry( const TQString& pKey, unsigned int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, unsigned int nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, long nValue,
+void KConfigBase::writeEntry( const TQString& pKey, long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, unsigned long nValue,
+void KConfigBase::writeEntry( const TQString& pKey, unsigned long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, unsigned long nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, Q_INT64 nValue,
+void KConfigBase::writeEntry( const TQString& pKey, Q_INT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, Q_INT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, Q_UINT64 nValue,
+void KConfigBase::writeEntry( const TQString& pKey, Q_UINT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
void KConfigBase::writeEntry( const char *pKey, Q_UINT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, double nValue,
+void KConfigBase::writeEntry( const TQString& pKey, double nValue,
bool bPersistent, bool bGlobal,
char format, int precision,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue, format, precision),
+ writeEntry( pKey, TQString::number(nValue, format, precision),
bPersistent, bGlobal, bNLS );
}
@@ -1525,12 +1525,12 @@ void KConfigBase::writeEntry( const char *pKey, double nValue,
char format, int precision,
bool bNLS )
{
- writeEntry( pKey, QString::number(nValue, format, precision),
+ writeEntry( pKey, TQString::number(nValue, format, precision),
bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, bool bValue,
+void KConfigBase::writeEntry( const TQString& pKey, bool bValue,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1543,7 +1543,7 @@ void KConfigBase::writeEntry( const char *pKey, bool bValue,
bool bGlobal,
bool bNLS )
{
- QString aValue;
+ TQString aValue;
if( bValue )
aValue = "true";
@@ -1554,14 +1554,14 @@ void KConfigBase::writeEntry( const char *pKey, bool bValue,
}
-void KConfigBase::writeEntry( const QString& pKey, const QFont& rFont,
+void KConfigBase::writeEntry( const TQString& pKey, const TQFont& rFont,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rFont, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QFont& rFont,
+void KConfigBase::writeEntry( const char *pKey, const TQFont& rFont,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1569,19 +1569,19 @@ void KConfigBase::writeEntry( const char *pKey, const QFont& rFont,
}
-void KConfigBase::writeEntry( const QString& pKey, const QRect& rRect,
+void KConfigBase::writeEntry( const TQString& pKey, const TQRect& rRect,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rRect, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QRect& rRect,
+void KConfigBase::writeEntry( const char *pKey, const TQRect& rRect,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- QStrList list;
- QCString tempstr;
+ TQStrList list;
+ TQCString tempstr;
list.insert( 0, tempstr.setNum( rRect.left() ) );
list.insert( 1, tempstr.setNum( rRect.top() ) );
list.insert( 2, tempstr.setNum( rRect.width() ) );
@@ -1591,19 +1591,19 @@ void KConfigBase::writeEntry( const char *pKey, const QRect& rRect,
}
-void KConfigBase::writeEntry( const QString& pKey, const QPoint& rPoint,
+void KConfigBase::writeEntry( const TQString& pKey, const TQPoint& rPoint,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rPoint, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QPoint& rPoint,
+void KConfigBase::writeEntry( const char *pKey, const TQPoint& rPoint,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- QStrList list;
- QCString tempstr;
+ TQStrList list;
+ TQCString tempstr;
list.insert( 0, tempstr.setNum( rPoint.x() ) );
list.insert( 1, tempstr.setNum( rPoint.y() ) );
@@ -1611,26 +1611,26 @@ void KConfigBase::writeEntry( const char *pKey, const QPoint& rPoint,
}
-void KConfigBase::writeEntry( const QString& pKey, const QSize& rSize,
+void KConfigBase::writeEntry( const TQString& pKey, const TQSize& rSize,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rSize, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QSize& rSize,
+void KConfigBase::writeEntry( const char *pKey, const TQSize& rSize,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- QStrList list;
- QCString tempstr;
+ TQStrList list;
+ TQCString tempstr;
list.insert( 0, tempstr.setNum( rSize.width() ) );
list.insert( 1, tempstr.setNum( rSize.height() ) );
writeEntry( pKey, list, ',', bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, const QColor& rColor,
+void KConfigBase::writeEntry( const TQString& pKey, const TQColor& rColor,
bool bPersistent,
bool bGlobal,
bool bNLS )
@@ -1638,12 +1638,12 @@ void KConfigBase::writeEntry( const QString& pKey, const QColor& rColor,
writeEntry( pKey.utf8().data(), rColor, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QColor& rColor,
+void KConfigBase::writeEntry( const char *pKey, const TQColor& rColor,
bool bPersistent,
bool bGlobal,
bool bNLS )
{
- QString aValue;
+ TQString aValue;
if (rColor.isValid())
aValue.sprintf( "%d,%d,%d", rColor.red(), rColor.green(), rColor.blue() );
else
@@ -1652,22 +1652,22 @@ void KConfigBase::writeEntry( const char *pKey, const QColor& rColor,
writeEntry( pKey, aValue, bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const QString& pKey, const QDateTime& rDateTime,
+void KConfigBase::writeEntry( const TQString& pKey, const TQDateTime& rDateTime,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry(pKey.utf8().data(), rDateTime, bPersistent, bGlobal, bNLS);
}
-void KConfigBase::writeEntry( const char *pKey, const QDateTime& rDateTime,
+void KConfigBase::writeEntry( const char *pKey, const TQDateTime& rDateTime,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- QStrList list;
- QCString tempstr;
+ TQStrList list;
+ TQCString tempstr;
- QTime time = rDateTime.time();
- QDate date = rDateTime.date();
+ TQTime time = rDateTime.time();
+ TQDate date = rDateTime.date();
list.insert( 0, tempstr.setNum( date.year() ) );
list.insert( 1, tempstr.setNum( date.month() ) );
@@ -1731,7 +1731,7 @@ bool KConfigBase::readDefaults() const
return (d && d->readDefaults);
}
-void KConfigBase::revertToDefault(const QString &key)
+void KConfigBase::revertToDefault(const TQString &key)
{
setDirty(true);
@@ -1758,7 +1758,7 @@ void KConfigBase::revertToDefault(const QString &key)
putData(aEntryKey, entry, true); // Revert
}
-bool KConfigBase::hasDefault(const QString &key) const
+bool KConfigBase::hasDefault(const TQString &key) const
{
KEntryKey aEntryKey(mGroup, key.utf8());
aEntryKey.bDefault = true;
@@ -1783,7 +1783,7 @@ bool KConfigBase::hasDefault(const QString &key) const
-KConfigGroup::KConfigGroup(KConfigBase *master, const QString &group)
+KConfigGroup::KConfigGroup(KConfigBase *master, const TQString &group)
{
mMaster = master;
backEnd = mMaster->backEnd; // Needed for getConfigState()
@@ -1796,7 +1796,7 @@ KConfigGroup::KConfigGroup(KConfigBase *master, const QString &group)
setReadDefaults(mMaster->readDefaults());
}
-KConfigGroup::KConfigGroup(KConfigBase *master, const QCString &group)
+KConfigGroup::KConfigGroup(KConfigBase *master, const TQCString &group)
{
mMaster = master;
backEnd = mMaster->backEnd; // Needed for getConfigState()
diff --git a/kdecore/kconfigbase.h b/kdecore/kconfigbase.h
index a393b4d87..69c7c3bc0 100644
--- a/kdecore/kconfigbase.h
+++ b/kdecore/kconfigbase.h
@@ -23,14 +23,14 @@
#ifndef _KCONFIGBASE_H
#define _KCONFIGBASE_H
-#include <qobject.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qdatetime.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qvariant.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqdatetime.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
+#include <tqmap.h>
#include "kconfigdata.h"
#include "kdelibs_export.h"
@@ -96,7 +96,7 @@ public:
* Switch back to the default group by passing a null string.
* @param group The name of the new group.
*/
- void setGroup( const QString& group );
+ void setGroup( const TQString& group );
/**
* Sets the group to the "Desktop Entry" group used for
@@ -110,7 +110,7 @@ public:
*
* @return The current group.
*/
- QString group() const;
+ TQString group() const;
/**
* Returns true if the specified group is known about.
@@ -118,21 +118,21 @@ public:
* @param group The group to search for.
* @return true if the group exists.
*/
- bool hasGroup(const QString &group) const;
+ bool hasGroup(const TQString &group) const;
/**
* Returns a list of groups that are known about.
*
* @return The list of groups.
**/
- virtual QStringList groupList() const = 0;
+ virtual TQStringList groupList() const = 0;
/**
* Returns a the current locale.
*
* @return A string representing the current locale.
*/
- QString locale() const;
+ TQString locale() const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
@@ -140,85 +140,85 @@ public:
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found.
- * @return The value for this key. Can be QString::null if aDefault is null.
+ * @return The value for this key. Can be TQString::null if aDefault is null.
*/
- QString readEntry(const QString& pKey,
- const QString& aDefault = QString::null ) const;
+ TQString readEntry(const TQString& pKey,
+ const TQString& aDefault = TQString::null ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found.
- * @return The value for this key. Can be QString::null if aDefault is null.
+ * @return The value for this key. Can be TQString::null if aDefault is null.
*/
- QString readEntry(const char *pKey,
- const QString& aDefault = QString::null ) const;
+ TQString readEntry(const char *pKey,
+ const TQString& aDefault = TQString::null ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
* The value is treated as if it is of the given type.
*
- * Note that only the following QVariant types are allowed : String,
+ * Note that only the following TQVariant types are allowed : String,
* StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool,
* Double, DateTime and Date.
* @deprecated
*
* @param pKey The key to search for.
- * @return An invalid QVariant if the key was not found or if the
- * read value cannot be converted to the given QVariant::Type.
+ * @return An invalid TQVariant if the key was not found or if the
+ * read value cannot be converted to the given TQVariant::Type.
*/
- QVariant readPropertyEntry( const QString& pKey, QVariant::Type ) const;
+ TQVariant readPropertyEntry( const TQString& pKey, TQVariant::Type ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
* The value is treated as if it is of the given type.
*
- * Note that only the following QVariant types are allowed : String,
+ * Note that only the following TQVariant types are allowed : String,
* StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool,
* Double, DateTime and Date.
*
* @deprecated
*
* @param pKey The key to search for.
- * @return An invalid QVariant if the key was not found or if the
- * read value cannot be converted to the given QVariant::Type.
+ * @return An invalid TQVariant if the key was not found or if the
+ * read value cannot be converted to the given TQVariant::Type.
*/
- QVariant readPropertyEntry( const char *pKey, QVariant::Type ) const;
+ TQVariant readPropertyEntry( const char *pKey, TQVariant::Type ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
* The value is treated as if it is of the type of the given default value.
*
- * Note that only the following QVariant types are allowed : String,
+ * Note that only the following TQVariant types are allowed : String,
* StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool,
* Double, DateTime and Date.
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found or
- * if the read value cannot be converted to the QVariant::Type.
+ * if the read value cannot be converted to the TQVariant::Type.
* @return The value for the key or the default value if the key was not
* found.
*/
- QVariant readPropertyEntry( const QString& pKey,
- const QVariant &aDefault) const;
+ TQVariant readPropertyEntry( const TQString& pKey,
+ const TQVariant &aDefault) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
* The value is treated as if it is of the type of the given default value.
*
- * Note that only the following QVariant types are allowed : String,
+ * Note that only the following TQVariant types are allowed : String,
* StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool,
* Double, DateTime and Date.
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found or
- * if the read value cannot be converted to the QVariant::Type.
+ * if the read value cannot be converted to the TQVariant::Type.
* @return The value for the key or the default value if the key was not
* found.
*/
- QVariant readPropertyEntry( const char *pKey,
- const QVariant &aDefault) const;
+ TQVariant readPropertyEntry( const char *pKey,
+ const TQVariant &aDefault) const;
/**
* Reads a list of strings.
@@ -230,7 +230,7 @@ public:
* @param sep The list separator (default ",")
* @return The number of entries in the list.
*/
- int readListEntry( const QString& pKey, QStrList &list, char sep = ',' ) const;
+ int readListEntry( const TQString& pKey, TQStrList &list, char sep = ',' ) const;
/**
* Reads a list of strings.
@@ -242,7 +242,7 @@ public:
* @param sep The list separator (default ",")
* @return The number of entries in the list.
*/
- int readListEntry( const char *pKey, QStrList &list, char sep = ',' ) const;
+ int readListEntry( const char *pKey, TQStrList &list, char sep = ',' ) const;
/**
* Reads a list of strings.
@@ -251,7 +251,7 @@ public:
* @param sep The list separator (default is ",").
* @return The list. Empty if the entry does not exist.
*/
- QStringList readListEntry( const QString& pKey, char sep = ',' ) const;
+ TQStringList readListEntry( const TQString& pKey, char sep = ',' ) const;
/**
* Reads a list of strings.
@@ -260,7 +260,7 @@ public:
* @param sep The list separator (default is ",").
* @return The list. Empty if the entry does not exist.
*/
- QStringList readListEntry( const char *pKey, char sep = ',' ) const;
+ TQStringList readListEntry( const char *pKey, char sep = ',' ) const;
/**
* Reads a list of strings, but returns a default if the key
@@ -271,7 +271,7 @@ public:
* @return The list. Contains @p aDefault if the Key does not exist.
* @since 3.3
*/
- QStringList readListEntry( const char* pKey, const QStringList& aDefault,
+ TQStringList readListEntry( const char* pKey, const TQStringList& aDefault,
char sep = ',' ) const;
/**
@@ -280,7 +280,7 @@ public:
* @param pKey The key to search for.
* @return The list. Empty if the entry does not exist.
*/
- QValueList<int> readIntListEntry( const QString& pKey ) const;
+ TQValueList<int> readIntListEntry( const TQString& pKey ) const;
/**
* Reads a list of Integers.
@@ -288,7 +288,7 @@ public:
* @param pKey The key to search for.
* @return The list. Empty if the entry does not exist.
*/
- QValueList<int> readIntListEntry( const char *pKey ) const;
+ TQValueList<int> readIntListEntry( const char *pKey ) const;
/**
* Reads a path.
@@ -299,9 +299,9 @@ public:
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found.
- * @return The value for this key. Can be QString::null if aDefault is null.
+ * @return The value for this key. Can be TQString::null if aDefault is null.
*/
- QString readPathEntry( const QString& pKey, const QString & aDefault = QString::null ) const;
+ TQString readPathEntry( const TQString& pKey, const TQString & aDefault = TQString::null ) const;
/**
* Reads a path.
@@ -312,9 +312,9 @@ public:
*
* @param pKey The key to search for.
* @param aDefault A default value returned if the key was not found.
- * @return The value for this key. Can be QString::null if aDefault is null.
+ * @return The value for this key. Can be TQString::null if aDefault is null.
*/
- QString readPathEntry( const char *pKey, const QString & aDefault = QString::null ) const;
+ TQString readPathEntry( const char *pKey, const TQString & aDefault = TQString::null ) const;
/**
* Reads a list of string paths.
@@ -328,7 +328,7 @@ public:
* @return The list. Empty if the entry does not exist.
* @since 3.1.3
*/
- QStringList readPathListEntry( const QString& pKey, char sep = ',' ) const;
+ TQStringList readPathListEntry( const TQString& pKey, char sep = ',' ) const;
/**
* Reads a list of string paths.
@@ -342,7 +342,7 @@ public:
* @return The list. Empty if the entry does not exist.
* @since 3.1.3
*/
- QStringList readPathListEntry( const char *pKey, char sep = ',' ) const;
+ TQStringList readPathListEntry( const char *pKey, char sep = ',' ) const;
/**
@@ -356,7 +356,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- int readNumEntry( const QString& pKey, int nDefault = 0 ) const;
+ int readNumEntry( const TQString& pKey, int nDefault = 0 ) const;
/**
* Reads a numerical value.
@@ -382,7 +382,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- unsigned int readUnsignedNumEntry( const QString& pKey, unsigned int nDefault = 0 ) const;
+ unsigned int readUnsignedNumEntry( const TQString& pKey, unsigned int nDefault = 0 ) const;
/**
* Reads an unsigned numerical value.
@@ -409,7 +409,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- long readLongNumEntry( const QString& pKey, long nDefault = 0 ) const;
+ long readLongNumEntry( const TQString& pKey, long nDefault = 0 ) const;
/**
* Reads a numerical value.
@@ -435,7 +435,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- unsigned long readUnsignedLongNumEntry( const QString& pKey, unsigned long nDefault = 0 ) const;
+ unsigned long readUnsignedLongNumEntry( const TQString& pKey, unsigned long nDefault = 0 ) const;
/**
* Read an unsigned numerical value.
@@ -461,7 +461,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- Q_INT64 readNum64Entry( const QString& pKey, Q_INT64 nDefault = 0 ) const;
+ Q_INT64 readNum64Entry( const TQString& pKey, Q_INT64 nDefault = 0 ) const;
/**
* Reads a 64-bit numerical value.
@@ -487,7 +487,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- Q_UINT64 readUnsignedNum64Entry( const QString& pKey, Q_UINT64 nDefault = 0 ) const;
+ Q_UINT64 readUnsignedNum64Entry( const TQString& pKey, Q_UINT64 nDefault = 0 ) const;
/**
* Read an 64-bit unsigned numerical value.
@@ -513,7 +513,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- double readDoubleNumEntry( const QString& pKey, double nDefault = 0.0 ) const;
+ double readDoubleNumEntry( const TQString& pKey, double nDefault = 0.0 ) const;
/**
* Reads a floating point value.
@@ -529,30 +529,30 @@ public:
double readDoubleNumEntry( const char *pKey, double nDefault = 0.0 ) const;
/**
- * Reads a QFont value.
+ * Reads a TQFont value.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a font object.
*
* @param pKey The key to search for.
- * @param pDefault A default value (null QFont by default) returned if the
+ * @param pDefault A default value (null TQFont by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QFont readFontEntry( const QString& pKey, const QFont* pDefault = 0L ) const;
+ TQFont readFontEntry( const TQString& pKey, const TQFont* pDefault = 0L ) const;
/**
- * Reads a QFont value.
+ * Reads a TQFont value.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a font object.
*
* @param pKey The key to search for.
- * @param pDefault A default value (null QFont by default) returned if the
+ * @param pDefault A default value (null TQFont by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QFont readFontEntry( const char *pKey, const QFont* pDefault = 0L ) const;
+ TQFont readFontEntry( const char *pKey, const TQFont* pDefault = 0L ) const;
/**
* Reads a boolean entry.
@@ -565,7 +565,7 @@ public:
* @param bDefault A default value returned if the key was not found.
* @return The value for this key.
*/
- bool readBoolEntry( const QString& pKey, bool bDefault = false ) const;
+ bool readBoolEntry( const TQString& pKey, bool bDefault = false ) const;
/**
* Reads a boolean entry.
@@ -581,112 +581,112 @@ public:
bool readBoolEntry( const char *pKey, bool bDefault = false ) const;
/**
- * Reads a QRect entry.
+ * Reads a TQRect entry.
*
* Read the value of an entry specified by pKey in the current group
- * and interpret it as a QRect object.
+ * and interpret it as a TQRect object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QRect by default) returned if the
+ * @param pDefault A default value (null TQRect by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QRect readRectEntry( const QString& pKey, const QRect* pDefault = 0L ) const;
+ TQRect readRectEntry( const TQString& pKey, const TQRect* pDefault = 0L ) const;
/**
- * Reads a QRect entry.
+ * Reads a TQRect entry.
*
* Read the value of an entry specified by pKey in the current group
- * and interpret it as a QRect object.
+ * and interpret it as a TQRect object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QRect by default) returned if the
+ * @param pDefault A default value (null TQRect by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QRect readRectEntry( const char *pKey, const QRect* pDefault = 0L ) const;
+ TQRect readRectEntry( const char *pKey, const TQRect* pDefault = 0L ) const;
/**
- * Reads a QPoint entry.
+ * Reads a TQPoint entry.
*
* Read the value of an entry specified by @p pKey in the current group
- * and interpret it as a QPoint object.
+ * and interpret it as a TQPoint object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QPoint by default) returned if the
+ * @param pDefault A default value (null TQPoint by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QPoint readPointEntry( const QString& pKey, const QPoint* pDefault = 0L ) const;
+ TQPoint readPointEntry( const TQString& pKey, const TQPoint* pDefault = 0L ) const;
/**
- * Reads a QPoint entry.
+ * Reads a TQPoint entry.
*
* Read the value of an entry specified by @p pKey in the current group
- * and interpret it as a QPoint object.
+ * and interpret it as a TQPoint object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QPoint by default) returned if the
+ * @param pDefault A default value (null TQPoint by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QPoint readPointEntry( const char *pKey, const QPoint* pDefault = 0L ) const;
+ TQPoint readPointEntry( const char *pKey, const TQPoint* pDefault = 0L ) const;
/**
- * Reads a QSize entry.
+ * Reads a TQSize entry.
*
* Read the value of an entry specified by @p pKey in the current group
- * and interpret it as a QSize object.
+ * and interpret it as a TQSize object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QSize by default) returned if the
+ * @param pDefault A default value (null TQSize by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QSize readSizeEntry( const QString& pKey, const QSize* pDefault = 0L ) const;
+ TQSize readSizeEntry( const TQString& pKey, const TQSize* pDefault = 0L ) const;
/**
- * Reads a QSize entry.
+ * Reads a TQSize entry.
*
* Read the value of an entry specified by @p pKey in the current group
- * and interpret it as a QSize object.
+ * and interpret it as a TQSize object.
*
* @param pKey The key to search for
- * @param pDefault A default value (null QSize by default) returned if the
+ * @param pDefault A default value (null TQSize by default) returned if the
* key was not found or if the read value cannot be interpreted.
* @return The value for this key.
*/
- QSize readSizeEntry( const char *pKey, const QSize* pDefault = 0L ) const;
+ TQSize readSizeEntry( const char *pKey, const TQSize* pDefault = 0L ) const;
/**
- * Reads a QColor entry.
+ * Reads a TQColor entry.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a color.
*
* @param pKey The key to search for.
- * @param pDefault A default value (null QColor by default) returned if the
+ * @param pDefault A default value (null TQColor by default) returned if the
* key was not found or if the value cannot be interpreted.
* @return The value for this key.
*/
- QColor readColorEntry( const QString& pKey, const QColor* pDefault = 0L ) const;
+ TQColor readColorEntry( const TQString& pKey, const TQColor* pDefault = 0L ) const;
/**
- * Reads a QColor entry.
+ * Reads a TQColor entry.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a color.
*
* @param pKey The key to search for.
- * @param pDefault A default value (null QColor by default) returned if the
+ * @param pDefault A default value (null TQColor by default) returned if the
* key was not found or if the value cannot be interpreted.
* @return The value for this key.
*/
- QColor readColorEntry( const char *pKey, const QColor* pDefault = 0L ) const;
+ TQColor readColorEntry( const char *pKey, const TQColor* pDefault = 0L ) const;
/**
- * Reads a QDateTime entry.
+ * Reads a TQDateTime entry.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a date and time.
@@ -697,10 +697,10 @@ public:
* interpreted.
* @return The value for this key.
*/
- QDateTime readDateTimeEntry( const QString& pKey, const QDateTime* pDefault = 0L ) const;
+ TQDateTime readDateTimeEntry( const TQString& pKey, const TQDateTime* pDefault = 0L ) const;
/**
- * Reads a QDateTime entry.
+ * Reads a TQDateTime entry.
*
* Read the value of an entry specified by @p pKey in the current group
* and interpret it as a date and time.
@@ -711,7 +711,7 @@ public:
* interpreted.
* @return The value for this key.
*/
- QDateTime readDateTimeEntry( const char *pKey, const QDateTime* pDefault = 0L ) const;
+ TQDateTime readDateTimeEntry( const char *pKey, const TQDateTime* pDefault = 0L ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
@@ -721,8 +721,8 @@ public:
* @param aDefault A default value returned if the key was not found.
* @return The value for this key.
*/
- QString readEntryUntranslated( const QString& pKey,
- const QString& aDefault = QString::null ) const;
+ TQString readEntryUntranslated( const TQString& pKey,
+ const TQString& aDefault = TQString::null ) const;
/**
* Reads the value of an entry specified by @p pKey in the current group.
@@ -732,8 +732,8 @@ public:
* @param aDefault A default value returned if the key was not found.
* @return The value for this key.
*/
- QString readEntryUntranslated( const char *pKey,
- const QString& aDefault = QString::null ) const;
+ TQString readEntryUntranslated( const char *pKey,
+ const TQString& aDefault = TQString::null ) const;
/**
* Writes a key/value pair.
@@ -754,7 +754,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QString& pValue,
+ void writeEntry( const TQString& pKey, const TQString& pValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -775,7 +775,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QString& pValue,
+ void writeEntry( const char *pKey, const TQString& pValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -798,7 +798,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const QString& pKey, const QVariant& rValue,
+ void writeEntry( const TQString& pKey, const TQVariant& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -820,7 +820,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const char *pKey, const QVariant& rValue,
+ void writeEntry( const char *pKey, const TQVariant& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -844,7 +844,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const QString& pKey, const QStrList &rValue,
+ void writeEntry( const TQString& pKey, const TQStrList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
* writeEntry() overridden to accept a list of strings.
@@ -866,7 +866,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const char *pKey, const QStrList &rValue,
+ void writeEntry( const char *pKey, const TQStrList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
@@ -889,7 +889,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const QString& pKey, const QStringList &rValue,
+ void writeEntry( const TQString& pKey, const TQStringList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
* writeEntry() overridden to accept a list of strings.
@@ -911,7 +911,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const char *pKey, const QStringList &rValue,
+ void writeEntry( const char *pKey, const TQStringList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
@@ -934,7 +934,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const QString& pKey, const QValueList<int>& rValue,
+ void writeEntry( const TQString& pKey, const TQValueList<int>& rValue,
bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
* writeEntry() overridden to accept a list of Integers.
@@ -955,7 +955,7 @@ public:
*
* @see writeEntry()
*/
- void writeEntry( const char *pKey, const QValueList<int>& rValue,
+ void writeEntry( const char *pKey, const TQValueList<int>& rValue,
bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
@@ -975,10 +975,10 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const char *pValue,
+ void writeEntry( const TQString& pKey, const char *pValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false )
- { writeEntry(pKey, QString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
+ { writeEntry(pKey, TQString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
/**
* Write a (key/value) pair.
*
@@ -999,7 +999,7 @@ public:
void writeEntry( const char *pKey, const char *pValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false )
- { writeEntry(pKey, QString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
+ { writeEntry(pKey, TQString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
/**
* Write a (key/value) pair.
@@ -1016,7 +1016,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, int nValue,
+ void writeEntry( const TQString& pKey, int nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1053,7 +1053,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, unsigned int nValue,
+ void writeEntry( const TQString& pKey, unsigned int nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1089,7 +1089,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, long nValue,
+ void writeEntry( const TQString& pKey, long nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1124,7 +1124,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, unsigned long nValue,
+ void writeEntry( const TQString& pKey, unsigned long nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1159,7 +1159,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, Q_INT64 nValue,
+ void writeEntry( const TQString& pKey, Q_INT64 nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1194,7 +1194,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, Q_UINT64 nValue,
+ void writeEntry( const TQString& pKey, Q_UINT64 nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1228,11 +1228,11 @@ public:
* @param format @p format determines the format to which the value
* is converted. Default is 'g'.
* @param precision @p precision sets the precision with which the
- * value is converted. Default is 6 as in QString.
+ * value is converted. Default is 6 as in TQString.
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, double nValue,
+ void writeEntry( const TQString& pKey, double nValue,
bool bPersistent = true, bool bGlobal = false,
char format = 'g', int precision = 6,
bool bNLS = false );
@@ -1249,7 +1249,7 @@ public:
* @param format @p format determines the format to which the value
* is converted. Default is 'g'.
* @param precision @p precision sets the precision with which the
- * value is converted. Default is 6 as in QString.
+ * value is converted. Default is 6 as in TQString.
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
@@ -1272,7 +1272,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, bool bValue,
+ void writeEntry( const TQString& pKey, bool bValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1307,7 +1307,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QFont& rFont,
+ void writeEntry( const TQString& pKey, const TQFont& rFont,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1324,7 +1324,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QFont& rFont,
+ void writeEntry( const char *pKey, const TQFont& rFont,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1345,7 +1345,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QColor& rColor,
+ void writeEntry( const TQString& pKey, const TQColor& rColor,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1365,7 +1365,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QColor& rColor,
+ void writeEntry( const char *pKey, const TQColor& rColor,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1386,7 +1386,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QDateTime& rDateTime,
+ void writeEntry( const TQString& pKey, const TQDateTime& rDateTime,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1406,7 +1406,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QDateTime& rDateTime,
+ void writeEntry( const char *pKey, const TQDateTime& rDateTime,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1428,7 +1428,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QRect& rValue,
+ void writeEntry( const TQString& pKey, const TQRect& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1448,7 +1448,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QRect& rValue,
+ void writeEntry( const char *pKey, const TQRect& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1469,7 +1469,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QPoint& rValue,
+ void writeEntry( const TQString& pKey, const TQPoint& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1489,7 +1489,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QPoint& rValue,
+ void writeEntry( const char *pKey, const TQPoint& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1510,7 +1510,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const QString& pKey, const QSize& rValue,
+ void writeEntry( const TQString& pKey, const TQSize& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1530,7 +1530,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const char *pKey, const QSize& rValue,
+ void writeEntry( const char *pKey, const TQSize& rValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1551,7 +1551,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writePathEntry( const QString& pKey, const QString & path,
+ void writePathEntry( const TQString& pKey, const TQString & path,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1571,7 +1571,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writePathEntry( const char *pKey, const QString & path,
+ void writePathEntry( const char *pKey, const TQString & path,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1598,7 +1598,7 @@ public:
* @see readPathListEntry()
* @since 3.1.3
*/
- void writePathEntry( const QString& pKey, const QStringList &rValue,
+ void writePathEntry( const TQString& pKey, const TQStringList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
/**
* writePathEntry() overridden to accept a list of paths (strings).
@@ -1623,7 +1623,7 @@ public:
* @see readPathListEntry()
* @since 3.1.3
*/
- void writePathEntry( const char *pKey, const QStringList &rValue,
+ void writePathEntry( const char *pKey, const TQStringList &rValue,
char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false );
@@ -1635,7 +1635,7 @@ public:
* application specific config file, but to the global KDE config file.
* @param bNLS If @p bNLS is true, the key with the locale tag is removed.
*/
- void deleteEntry( const QString& pKey,
+ void deleteEntry( const TQString& pKey,
bool bNLS = false, bool bGlobal = false);
/**
* Deletes the entry specified by @p pKey in the current group.
@@ -1665,7 +1665,7 @@ public:
* @return If the group is not empty and bDeep is false,
* deleteGroup returns false.
*/
- bool deleteGroup( const QString& group, bool bDeep = true, bool bGlobal = false );
+ bool deleteGroup( const TQString& group, bool bDeep = true, bool bGlobal = false );
/**
@@ -1746,7 +1746,7 @@ public:
* @param key The key to search for.
* @return If true, the key is available.
*/
- bool hasKey( const QString& key ) const;
+ bool hasKey( const TQString& key ) const;
/**
* Returns a map (tree) of entries for all entries in a particular
@@ -1758,7 +1758,7 @@ public:
* The returned map may be empty if the group is not found.
* @see QMap
*/
- virtual QMap<QString, QString> entryMap(const QString &group) const = 0;
+ virtual TQMap<TQString, TQString> entryMap(const TQString &group) const = 0;
/**
* Reparses all configuration files. This is useful for programs
@@ -1786,7 +1786,7 @@ public:
* @return whether changes may be made to @p group in this configuration
* file.
*/
- bool groupIsImmutable(const QString &group) const;
+ bool groupIsImmutable(const TQString &group) const;
/**
* Checks whether it is possible to change the given entry.
@@ -1794,7 +1794,7 @@ public:
* @return whether the entry @p key may be changed in the current group
* in this configuration file.
*/
- bool entryIsImmutable(const QString &key) const;
+ bool entryIsImmutable(const TQString &key) const;
/**
* Possible return values for getConfigState().
@@ -1852,7 +1852,7 @@ public:
* @param key The key of the entry to revert.
* @since 3.2
*/
- void revertToDefault(const QString &key);
+ void revertToDefault(const TQString &key);
/**
* Returns whether a default is specified for an entry in either the
@@ -1861,8 +1861,8 @@ public:
* If an application computes a default value at runtime for
* a certain entry, e.g. like:
* \code
- * QColor computedDefault = kapp->palette().color(QPalette::Active, QColorGroup::Text)
- * QColor color = config->readEntry(key, computedDefault);
+ * TQColor computedDefault = kapp->palette().color(TQPalette::Active, TQColorGroup::Text)
+ * TQColor color = config->readEntry(key, computedDefault);
* \encode
*
* Then it may wish to make the following check before
@@ -1880,7 +1880,7 @@ public:
* @param key The key of the entry to check.
* @since 3.2
*/
- bool hasDefault(const QString &key) const;
+ bool hasDefault(const TQString &key) const;
protected:
/**
@@ -1919,7 +1919,7 @@ protected:
* @return The map of the entries in the group.
* @internal
*/
- virtual KEntryMap internalEntryMap( const QString& pGroup ) const = 0;
+ virtual KEntryMap internalEntryMap( const TQString& pGroup ) const = 0;
/**
* Returns a map (tree) of the entries in the tree.
@@ -1967,7 +1967,7 @@ protected:
*/
virtual KEntry lookupData(const KEntryKey &_key) const = 0;
- virtual bool internalHasGroup(const QCString &group) const = 0;
+ virtual bool internalHasGroup(const TQCString &group) const = 0;
/**
* A back end for loading/saving to disk in a particular format.
@@ -1977,22 +1977,22 @@ public:
/**
* Overloaded public methods:
*/
- void setGroup( const QCString &pGroup );
+ void setGroup( const TQCString &pGroup );
void setGroup( const char *pGroup );
- bool hasGroup(const QCString &_pGroup) const;
+ bool hasGroup(const TQCString &_pGroup) const;
bool hasGroup(const char *_pGroup) const;
bool hasKey( const char *pKey ) const;
protected:
- QCString readEntryUtf8( const char *pKey) const;
+ TQCString readEntryUtf8( const char *pKey) const;
/**
* The currently selected group. */
- QCString mGroup;
+ TQCString mGroup;
/**
* The locale to retrieve keys under if possible, i.e en_US or fr. */
- QCString aLocaleString;
+ TQCString aLocaleString;
/**
* Indicates whether there are any dirty entries in the config object
@@ -2009,9 +2009,9 @@ private:
class KConfigBasePrivate;
KConfigBasePrivate *d;
- void writeEntry( const char *pKey, const QString &rValue,
+ void writeEntry( const char *pKey, const TQString &rValue,
bool bPersistent, bool bGlobal, bool bNLS, bool bExpand );
- void writeEntry( const char *pKey, const QStringList &rValue,
+ void writeEntry( const char *pKey, const TQStringList &rValue,
char sep, bool bPersistent, bool bGlobal, bool bNLS, bool bExpand );
};
@@ -2028,7 +2028,7 @@ class KConfigGroupSaverPrivate;
* written as:
* \code
*
- * QString oldgroup config->group();
+ * TQString oldgroup config->group();
* config->setGroup( "TheGroupThatIWant" );
* ...
* config->writeEntry( "Blah", "Blubb" );
@@ -2066,8 +2066,8 @@ public:
* KConfigGroupSaver works on.
* @param group The new group that the config object should switch to.
*/
- KConfigGroupSaver( KConfigBase* config, QString group )
- /* KDE 4 : make the second parameter const QString & */
+ KConfigGroupSaver( KConfigBase* config, TQString group )
+ /* KDE 4 : make the second parameter const TQString & */
: _config(config), _oldgroup(config->group())
{ _config->setGroup( group ); }
@@ -2075,7 +2075,7 @@ public:
: _config(config), _oldgroup(config->group())
{ _config->setGroup( group ); }
- KConfigGroupSaver( KConfigBase* config, const QCString &group )
+ KConfigGroupSaver( KConfigBase* config, const TQCString &group )
: _config(config), _oldgroup(config->group())
{ _config->setGroup( group ); }
@@ -2085,7 +2085,7 @@ public:
private:
KConfigBase* _config;
- QString _oldgroup;
+ TQString _oldgroup;
KConfigGroupSaver(const KConfigGroupSaver&);
KConfigGroupSaver& operator=(const KConfigGroupSaver&);
@@ -2105,14 +2105,14 @@ public:
* Construct a config group corresponding to @p group in @p master.
* @p group is the group name encoded in UTF-8.
*/
- KConfigGroup(KConfigBase *master, const QCString &group);
+ KConfigGroup(KConfigBase *master, const TQCString &group);
/**
* This is an overloaded constructor provided for convenience.
* It behaves essentially like the above function.
*
* Construct a config group corresponding to @p group in @p master
*/
- KConfigGroup(KConfigBase *master, const QString &group);
+ KConfigGroup(KConfigBase *master, const TQString &group);
/**
* This is an overloaded constructor provided for convenience.
* It behaves essentially like the above function.
@@ -2154,16 +2154,16 @@ private:
void isDirty() { }
// The following members are not used.
- virtual QStringList groupList() const { return QStringList(); }
+ virtual TQStringList groupList() const { return TQStringList(); }
virtual void rollback(bool) { }
virtual void reparseConfiguration() { }
- virtual QMap<QString, QString> entryMap(const QString &) const
- { return QMap<QString,QString>(); }
- virtual KEntryMap internalEntryMap( const QString&) const
+ virtual TQMap<TQString, TQString> entryMap(const TQString &) const
+ { return TQMap<TQString,TQString>(); }
+ virtual KEntryMap internalEntryMap( const TQString&) const
{ return KEntryMap(); }
virtual KEntryMap internalEntryMap() const
{ return KEntryMap(); }
- virtual bool internalHasGroup(const QCString &) const
+ virtual bool internalHasGroup(const TQCString &) const
{ return false; }
void getConfigState() { }
diff --git a/kdecore/kconfigdata.h b/kdecore/kconfigdata.h
index 281e8ecd6..e514b2781 100644
--- a/kdecore/kconfigdata.h
+++ b/kdecore/kconfigdata.h
@@ -22,7 +22,7 @@
#ifndef _KCONFIGDATA_H
#define _KCONFIGDATA_H
-#include <qmap.h> // generic red-black tree class
+#include <tqmap.h> // generic red-black tree class
#include "kdelibs_export.h"
/**
@@ -34,7 +34,7 @@ struct KDECORE_EXPORT KEntry
KEntry()
: mValue(0), bDirty(false), bNLS(false),
bGlobal(false), bImmutable(false), bDeleted(false), bExpand(false) {}
- QCString mValue;
+ TQCString mValue;
/**
* Must the entry be written back to disk?
*/
@@ -68,18 +68,18 @@ struct KDECORE_EXPORT KEntry
*/
struct KDECORE_EXPORT KEntryKey
{
- KEntryKey(const QCString& _group = 0,
- const QCString& _key = 0)
+ KEntryKey(const TQCString& _group = 0,
+ const TQCString& _key = 0)
: mGroup(_group), mKey(_key), bLocal(false), bDefault(false),
c_key(_key.data()) {}
/**
* The "group" to which this EntryKey belongs
*/
- QCString mGroup;
+ TQCString mGroup;
/**
* The _actual_ key of the entry in question
*/
- QCString mKey;
+ TQCString mKey;
/**
* Entry is localised or not
*/
@@ -93,7 +93,7 @@ struct KDECORE_EXPORT KEntryKey
};
/**
- * compares two KEntryKeys (needed for QMap).
+ * compares two KEntryKeys (needed for TQMap).
* @internal
*/
inline bool operator <(const KEntryKey &k1, const KEntryKey &k2)
@@ -125,14 +125,14 @@ inline bool operator <(const KEntryKey &k1, const KEntryKey &k2)
* with the group name.
* @internal
*/
-typedef QMap<KEntryKey, KEntry> KEntryMap;
+typedef TQMap<KEntryKey, KEntry> KEntryMap;
/**
* \relates KEntry
* type for iterating over keys in a KEntryMap in sorted order.
* @internal
*/
-typedef QMap<KEntryKey, KEntry>::Iterator KEntryMapIterator;
+typedef TQMap<KEntryKey, KEntry>::Iterator KEntryMapIterator;
/**
* \relates KEntry
@@ -141,6 +141,6 @@ typedef QMap<KEntryKey, KEntry>::Iterator KEntryMapIterator;
* only examine them.
* @internal
*/
-typedef QMap<KEntryKey, KEntry>::ConstIterator KEntryMapConstIterator;
+typedef TQMap<KEntryKey, KEntry>::ConstIterator KEntryMapConstIterator;
#endif
diff --git a/kdecore/kconfigdialogmanager.cpp b/kdecore/kconfigdialogmanager.cpp
index b9a310b1e..7e549e0b0 100644
--- a/kdecore/kconfigdialogmanager.cpp
+++ b/kdecore/kconfigdialogmanager.cpp
@@ -21,14 +21,14 @@
#include "kconfigdialogmanager.h"
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qmetaobject.h>
-#include <qobjectlist.h>
-#include <qsqlpropertymap.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqmetaobject.h>
+#include <tqobjectlist.h>
+#include <tqsqlpropertymap.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kconfigskeleton.h>
@@ -43,18 +43,18 @@ public:
Private() : insideGroupBox(false) { }
public:
- QDict<QWidget> knownWidget;
- QDict<QWidget> buddyWidget;
+ TQDict<TQWidget> knownWidget;
+ TQDict<TQWidget> buddyWidget;
bool insideGroupBox;
};
-KConfigDialogManager::KConfigDialogManager(QWidget *parent, KConfigSkeleton *conf, const char *name)
- : QObject(parent, name), m_conf(conf), m_dialog(parent)
+KConfigDialogManager::KConfigDialogManager(TQWidget *parent, KConfigSkeleton *conf, const char *name)
+ : TQObject(parent, name), m_conf(conf), m_dialog(parent)
{
d = new Private();
kapp->installKDEPropertyMap();
- propertyMap = QSqlPropertyMap::defaultMap();
+ propertyMap = TQSqlPropertyMap::defaultMap();
init(true);
}
@@ -69,102 +69,102 @@ void KConfigDialogManager::init(bool trackChanges)
if(trackChanges)
{
// QT
- changedMap.insert("QButton", SIGNAL(stateChanged(int)));
- changedMap.insert("QCheckBox", SIGNAL(stateChanged(int)));
- changedMap.insert("QPushButton", SIGNAL(stateChanged(int)));
- changedMap.insert("QRadioButton", SIGNAL(stateChanged(int)));
+ changedMap.insert("TQButton", TQT_SIGNAL(stateChanged(int)));
+ changedMap.insert("TQCheckBox", TQT_SIGNAL(stateChanged(int)));
+ changedMap.insert("TQPushButton", TQT_SIGNAL(stateChanged(int)));
+ changedMap.insert("TQRadioButton", TQT_SIGNAL(stateChanged(int)));
// We can only store one thing, so you can't have
// a ButtonGroup that is checkable.
- changedMap.insert("QButtonGroup", SIGNAL(clicked(int)));
- changedMap.insert("QGroupBox", SIGNAL(toggled(bool)));
- changedMap.insert("QComboBox", SIGNAL(activated (int)));
+ changedMap.insert("TQButtonGroup", TQT_SIGNAL(clicked(int)));
+ changedMap.insert("TQGroupBox", TQT_SIGNAL(toggled(bool)));
+ changedMap.insert("TQComboBox", TQT_SIGNAL(activated (int)));
//qsqlproperty map doesn't store the text, but the value!
- //changedMap.insert("QComboBox", SIGNAL(textChanged(const QString &)));
- changedMap.insert("QDateEdit", SIGNAL(valueChanged(const QDate &)));
- changedMap.insert("QDateTimeEdit", SIGNAL(valueChanged(const QDateTime &)));
- changedMap.insert("QDial", SIGNAL(valueChanged (int)));
- changedMap.insert("QLineEdit", SIGNAL(textChanged(const QString &)));
- changedMap.insert("QSlider", SIGNAL(valueChanged(int)));
- changedMap.insert("QSpinBox", SIGNAL(valueChanged(int)));
- changedMap.insert("QTimeEdit", SIGNAL(valueChanged(const QTime &)));
- changedMap.insert("QTextEdit", SIGNAL(textChanged()));
- changedMap.insert("QTextBrowser", SIGNAL(sourceChanged(const QString &)));
- changedMap.insert("QMultiLineEdit", SIGNAL(textChanged()));
- changedMap.insert("QListBox", SIGNAL(selectionChanged()));
- changedMap.insert("QTabWidget", SIGNAL(currentChanged(QWidget *)));
+ //changedMap.insert("TQComboBox", TQT_SIGNAL(textChanged(const TQString &)));
+ changedMap.insert("QDateEdit", TQT_SIGNAL(valueChanged(const TQDate &)));
+ changedMap.insert("QDateTimeEdit", TQT_SIGNAL(valueChanged(const TQDateTime &)));
+ changedMap.insert("TQDial", TQT_SIGNAL(valueChanged (int)));
+ changedMap.insert("TQLineEdit", TQT_SIGNAL(textChanged(const TQString &)));
+ changedMap.insert("TQSlider", TQT_SIGNAL(valueChanged(int)));
+ changedMap.insert("TQSpinBox", TQT_SIGNAL(valueChanged(int)));
+ changedMap.insert("QTimeEdit", TQT_SIGNAL(valueChanged(const TQTime &)));
+ changedMap.insert("TQTextEdit", TQT_SIGNAL(textChanged()));
+ changedMap.insert("TQTextBrowser", TQT_SIGNAL(sourceChanged(const TQString &)));
+ changedMap.insert("TQMultiLineEdit", TQT_SIGNAL(textChanged()));
+ changedMap.insert("TQListBox", TQT_SIGNAL(selectionChanged()));
+ changedMap.insert("TQTabWidget", TQT_SIGNAL(currentChanged(TQWidget *)));
// KDE
- changedMap.insert( "KComboBox", SIGNAL(activated (int)));
- changedMap.insert( "KFontCombo", SIGNAL(activated (int)));
- changedMap.insert( "KFontRequester", SIGNAL(fontSelected(const QFont &)));
- changedMap.insert( "KFontChooser", SIGNAL(fontSelected(const QFont &)));
- changedMap.insert( "KHistoryCombo", SIGNAL(activated (int)));
-
- changedMap.insert( "KColorButton", SIGNAL(changed(const QColor &)));
- changedMap.insert( "KDatePicker", SIGNAL(dateSelected (QDate)));
- changedMap.insert( "KDateWidget", SIGNAL(changed (QDate)));
- changedMap.insert( "KDateTimeWidget", SIGNAL(valueChanged (const QDateTime &)));
- changedMap.insert( "KEditListBox", SIGNAL(changed()));
- changedMap.insert( "KListBox", SIGNAL(selectionChanged()));
- changedMap.insert( "KLineEdit", SIGNAL(textChanged(const QString &)));
- changedMap.insert( "KPasswordEdit", SIGNAL(textChanged(const QString &)));
- changedMap.insert( "KRestrictedLine", SIGNAL(textChanged(const QString &)));
- changedMap.insert( "KTextBrowser", SIGNAL(sourceChanged(const QString &)));
- changedMap.insert( "KTextEdit", SIGNAL(textChanged()));
- changedMap.insert( "KURLRequester", SIGNAL(textChanged (const QString& )));
- changedMap.insert( "KIntNumInput", SIGNAL(valueChanged (int)));
- changedMap.insert( "KIntSpinBox", SIGNAL(valueChanged (int)));
- changedMap.insert( "KDoubleNumInput", SIGNAL(valueChanged (double)));
+ changedMap.insert( "KComboBox", TQT_SIGNAL(activated (int)));
+ changedMap.insert( "KFontCombo", TQT_SIGNAL(activated (int)));
+ changedMap.insert( "KFontRequester", TQT_SIGNAL(fontSelected(const TQFont &)));
+ changedMap.insert( "KFontChooser", TQT_SIGNAL(fontSelected(const TQFont &)));
+ changedMap.insert( "KHistoryCombo", TQT_SIGNAL(activated (int)));
+
+ changedMap.insert( "KColorButton", TQT_SIGNAL(changed(const TQColor &)));
+ changedMap.insert( "KDatePicker", TQT_SIGNAL(dateSelected (TQDate)));
+ changedMap.insert( "KDateWidget", TQT_SIGNAL(changed (TQDate)));
+ changedMap.insert( "KDateTimeWidget", TQT_SIGNAL(valueChanged (const TQDateTime &)));
+ changedMap.insert( "KEditListBox", TQT_SIGNAL(changed()));
+ changedMap.insert( "KListBox", TQT_SIGNAL(selectionChanged()));
+ changedMap.insert( "KLineEdit", TQT_SIGNAL(textChanged(const TQString &)));
+ changedMap.insert( "KPasswordEdit", TQT_SIGNAL(textChanged(const TQString &)));
+ changedMap.insert( "KRestrictedLine", TQT_SIGNAL(textChanged(const TQString &)));
+ changedMap.insert( "KTextBrowser", TQT_SIGNAL(sourceChanged(const TQString &)));
+ changedMap.insert( "KTextEdit", TQT_SIGNAL(textChanged()));
+ changedMap.insert( "KURLRequester", TQT_SIGNAL(textChanged (const TQString& )));
+ changedMap.insert( "KIntNumInput", TQT_SIGNAL(valueChanged (int)));
+ changedMap.insert( "KIntSpinBox", TQT_SIGNAL(valueChanged (int)));
+ changedMap.insert( "KDoubleNumInput", TQT_SIGNAL(valueChanged (double)));
}
// Go through all of the children of the widgets and find all known widgets
(void) parseChildren(m_dialog, trackChanges);
}
-void KConfigDialogManager::addWidget(QWidget *widget)
+void KConfigDialogManager::addWidget(TQWidget *widget)
{
(void) parseChildren(widget, true);
}
-void KConfigDialogManager::setupWidget(QWidget *widget, KConfigSkeletonItem *item)
+void KConfigDialogManager::setupWidget(TQWidget *widget, KConfigSkeletonItem *item)
{
- QVariant minValue = item->minValue();
+ TQVariant minValue = item->minValue();
if (minValue.isValid())
{
if (widget->metaObject()->findProperty("minValue", true) != -1)
widget->setProperty("minValue", minValue);
}
- QVariant maxValue = item->maxValue();
+ TQVariant maxValue = item->maxValue();
if (maxValue.isValid())
{
if (widget->metaObject()->findProperty("maxValue", true) != -1)
widget->setProperty("maxValue", maxValue);
}
- if (QWhatsThis::textFor( widget ).isEmpty())
+ if (TQWhatsThis::textFor( widget ).isEmpty())
{
- QString whatsThis = item->whatsThis();
+ TQString whatsThis = item->whatsThis();
if ( !whatsThis.isEmpty() )
{
- QWhatsThis::add( widget, whatsThis );
+ TQWhatsThis::add( widget, whatsThis );
}
}
}
-bool KConfigDialogManager::parseChildren(const QWidget *widget, bool trackChanges)
+bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChanges)
{
bool valueChanged = false;
- const QObjectList *listOfChildren = widget->children();
+ const TQObjectList *listOfChildren = widget->children();
if(!listOfChildren)
return valueChanged;
- QObject *object;
- for( QPtrListIterator<QObject> it( *listOfChildren );
+ TQObject *object;
+ for( TQPtrListIterator<TQObject> it( *listOfChildren );
(object = it.current()); ++it )
{
if(!object->isWidgetType())
continue; // Skip non-widgets
- QWidget *childWidget = (QWidget *)object;
+ TQWidget *childWidget = (TQWidget *)object;
const char *widgetName = childWidget->name(0);
bool bParseChildren = true;
@@ -173,7 +173,7 @@ bool KConfigDialogManager::parseChildren(const QWidget *widget, bool trackChange
if (widgetName && (strncmp(widgetName, "kcfg_", 5) == 0))
{
// This is one of our widgets!
- QString configId = widgetName+5;
+ TQString configId = widgetName+5;
KConfigSkeletonItem *item = m_conf->findItem(configId);
if (item)
{
@@ -181,7 +181,7 @@ bool KConfigDialogManager::parseChildren(const QWidget *widget, bool trackChange
setupWidget(childWidget, item);
- QMap<QString, QCString>::const_iterator changedIt = changedMap.find(childWidget->className());
+ TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.find(childWidget->className());
if (changedIt == changedMap.end())
{
@@ -199,18 +199,18 @@ bool KConfigDialogManager::parseChildren(const QWidget *widget, bool trackChange
else
{
connect(childWidget, *changedIt,
- this, SIGNAL(widgetModified()));
+ this, TQT_SIGNAL(widgetModified()));
- QGroupBox *gb = dynamic_cast<QGroupBox *>(childWidget);
+ TQGroupBox *gb = dynamic_cast<TQGroupBox *>(childWidget);
if (!gb)
bParseChildren = false;
else
d->insideGroupBox = true;
- QComboBox *cb = dynamic_cast<QComboBox *>(childWidget);
+ TQComboBox *cb = dynamic_cast<TQComboBox *>(childWidget);
if (cb && cb->editable())
- connect(cb, SIGNAL(textChanged(const QString &)),
- this, SIGNAL(widgetModified()));
+ connect(cb, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SIGNAL(widgetModified()));
}
}
else
@@ -219,28 +219,28 @@ bool KConfigDialogManager::parseChildren(const QWidget *widget, bool trackChange
assert(false);
}
}
- else if (childWidget->inherits("QLabel"))
+ else if (childWidget->inherits("TQLabel"))
{
- QLabel *label = static_cast<QLabel *>(childWidget);
- QWidget *buddy = label->buddy();
+ TQLabel *label = static_cast<TQLabel *>(childWidget);
+ TQWidget *buddy = label->buddy();
if (!buddy)
continue;
const char *buddyName = buddy->name(0);
if (buddyName && (strncmp(buddyName, "kcfg_", 5) == 0))
{
// This is one of our widgets!
- QString configId = buddyName+5;
+ TQString configId = buddyName+5;
d->buddyWidget.insert(configId, childWidget);
}
}
#ifndef NDEBUG
else if (widgetName)
{
- QMap<QString, QCString>::const_iterator changedIt = changedMap.find(childWidget->className());
+ TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.find(childWidget->className());
if (changedIt != changedMap.end())
{
- if ((!d->insideGroupBox || !childWidget->inherits("QRadioButton")) &&
- !childWidget->inherits("QGroupBox"))
+ if ((!d->insideGroupBox || !childWidget->inherits("TQRadioButton")) &&
+ !childWidget->inherits("TQGroupBox"))
kdDebug(178) << "Widget '" << widgetName << "' (" << childWidget->className() << ") remains unmanaged." << endl;
}
}
@@ -263,8 +263,8 @@ void KConfigDialogManager::updateWidgets()
bool bSignalsBlocked = signalsBlocked();
blockSignals(true);
- QWidget *widget;
- for( QDictIterator<QWidget> it( d->knownWidget );
+ TQWidget *widget;
+ for( TQDictIterator<TQWidget> it( d->knownWidget );
(widget = it.current()); ++it )
{
KConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
@@ -274,7 +274,7 @@ void KConfigDialogManager::updateWidgets()
continue;
}
- QVariant p = item->property();
+ TQVariant p = item->property();
if (p != property(widget))
{
setProperty(widget, p);
@@ -284,7 +284,7 @@ void KConfigDialogManager::updateWidgets()
if (item->isImmutable())
{
widget->setEnabled(false);
- QWidget *buddy = d->buddyWidget.find(it.currentKey());
+ TQWidget *buddy = d->buddyWidget.find(it.currentKey());
if (buddy)
buddy->setEnabled(false);
}
@@ -292,7 +292,7 @@ void KConfigDialogManager::updateWidgets()
blockSignals(bSignalsBlocked);
if (changed)
- QTimer::singleShot(0, this, SIGNAL(widgetModified()));
+ TQTimer::singleShot(0, this, TQT_SIGNAL(widgetModified()));
}
void KConfigDialogManager::updateWidgetsDefault()
@@ -306,8 +306,8 @@ void KConfigDialogManager::updateSettings()
{
bool changed = false;
- QWidget *widget;
- for( QDictIterator<QWidget> it( d->knownWidget );
+ TQWidget *widget;
+ for( TQDictIterator<TQWidget> it( d->knownWidget );
(widget = it.current()); ++it )
{
KConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
@@ -317,7 +317,7 @@ void KConfigDialogManager::updateSettings()
continue;
}
- QVariant p = property(widget);
+ TQVariant p = property(widget);
if (p != item->property())
{
item->setProperty(p);
@@ -331,16 +331,16 @@ void KConfigDialogManager::updateSettings()
}
}
-void KConfigDialogManager::setProperty(QWidget *w, const QVariant &v)
+void KConfigDialogManager::setProperty(TQWidget *w, const TQVariant &v)
{
- QButtonGroup *bg = dynamic_cast<QButtonGroup *>(w);
+ TQButtonGroup *bg = dynamic_cast<TQButtonGroup *>(w);
if (bg)
{
bg->setButton(v.toInt());
return;
}
- QComboBox *cb = dynamic_cast<QComboBox *>(w);
+ TQComboBox *cb = dynamic_cast<TQComboBox *>(w);
if (cb && cb->editable())
{
cb->setCurrentText(v.toString());
@@ -350,15 +350,15 @@ void KConfigDialogManager::setProperty(QWidget *w, const QVariant &v)
propertyMap->setProperty(w, v);
}
-QVariant KConfigDialogManager::property(QWidget *w)
+TQVariant KConfigDialogManager::property(TQWidget *w)
{
- QButtonGroup *bg = dynamic_cast<QButtonGroup *>(w);
+ TQButtonGroup *bg = dynamic_cast<TQButtonGroup *>(w);
if (bg)
- return QVariant(bg->selectedId());
+ return TQVariant(bg->selectedId());
- QComboBox *cb = dynamic_cast<QComboBox *>(w);
+ TQComboBox *cb = dynamic_cast<TQComboBox *>(w);
if (cb && cb->editable())
- return QVariant(cb->currentText());
+ return TQVariant(cb->currentText());
return propertyMap->property(w);
}
@@ -366,8 +366,8 @@ QVariant KConfigDialogManager::property(QWidget *w)
bool KConfigDialogManager::hasChanged()
{
- QWidget *widget;
- for( QDictIterator<QWidget> it( d->knownWidget );
+ TQWidget *widget;
+ for( TQDictIterator<TQWidget> it( d->knownWidget );
(widget = it.current()); ++it )
{
KConfigSkeletonItem *item = m_conf->findItem(it.currentKey());
@@ -377,7 +377,7 @@ bool KConfigDialogManager::hasChanged()
continue;
}
- QVariant p = property(widget);
+ TQVariant p = property(widget);
if (p != item->property())
{
// kdDebug(178) << "Widget for '" << it.currentKey() << "' has changed." << endl;
diff --git a/kdecore/kconfigdialogmanager.h b/kdecore/kconfigdialogmanager.h
index f7d3f0c40..ab4dd2476 100644
--- a/kdecore/kconfigdialogmanager.h
+++ b/kdecore/kconfigdialogmanager.h
@@ -21,8 +21,8 @@
#ifndef KCONFIGDIALOGMANAGER_H
#define KCONFIGDIALOGMANAGER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "kdelibs_export.h"
class KConfigSkeleton;
@@ -45,11 +45,11 @@ class QSqlPropertyMap;
* "kcfg_" prefix. For example a widget named "kcfg_MyOption" would be
* associated to the configuration entry "MyOption".
*
- * KConfigDialogManager uses the QSqlPropertyMap class to determine if it can do
+ * KConfigDialogManager uses the TQSqlPropertyMap class to determine if it can do
* anything to a widget. Note that KConfigDialogManager doesn't require a
* database, it simply uses the functionality that is built into the
- * QSqlPropertyMap class. New widgets can be added to the map using
- * QSqlPropertyMap::installDefaultMap(). Note that you can't just add any
+ * TQSqlPropertyMap class. New widgets can be added to the map using
+ * TQSqlPropertyMap::installDefaultMap(). Note that you can't just add any
* class. The class must have a matching Q_PROPERTY(...) macro defined.
*
* For example (note that KColorButton is already added and it doesn't need to
@@ -57,25 +57,25 @@ class QSqlPropertyMap;
*
* kcolorbutton.h defines the following property:
* \code
- * Q_PROPERTY( QColor color READ color WRITE setColor )
+ * Q_PROPERTY( TQColor color READ color WRITE setColor )
* \endcode
*
* To add KColorButton the following code would be inserted in the main.
*
* \code
* kapp->installKDEPropertyMap();
- * QSqlPropertyMap *map = QSqlPropertyMap::defaultMap();
+ * TQSqlPropertyMap *map = TQSqlPropertyMap::defaultMap();
* map->insert("KColorButton", "color");
* \endcode
*
- * If you add a new widget to the QSqlPropertyMap and wish to be notified when
+ * If you add a new widget to the TQSqlPropertyMap and wish to be notified when
* it is modified you should add its signal using addWidgetChangedSignal().
* @since 3.2
* @author Benjamin C Meyer <ben+kdelibs at meyerhome dot net>
* @author Waldo Bastian <bastian@kde.org>
*/
-class KDECORE_EXPORT KConfigDialogManager : public QObject {
+class KDECORE_EXPORT KConfigDialogManager : public TQObject {
Q_OBJECT
@@ -94,7 +94,7 @@ signals:
* contains the one or more modified setting.
* @see settingsChanged()
*/
- void settingsChanged( QWidget *widget );
+ void settingsChanged( TQWidget *widget );
/**
* If retrieveSettings() was told to track changes then if
@@ -114,7 +114,7 @@ public:
* @param conf Object that contains settings
* @param name - Object name.
*/
- KConfigDialogManager(QWidget *parent, KConfigSkeleton *conf, const char *name=0);
+ KConfigDialogManager(TQWidget *parent, KConfigSkeleton *conf, const char *name=0);
/**
* Destructor.
@@ -125,7 +125,7 @@ public:
* Add additional widgets to manage
* @param widget Additional widget to manage, inlcuding all its children
*/
- void addWidget(QWidget *widget);
+ void addWidget(TQWidget *widget);
/**
* Returns whether the current state of the known widgets are
@@ -185,22 +185,22 @@ protected:
* widget that are known.
* @return bool - If a widget was set to something other then its default.
*/
- bool parseChildren(const QWidget *widget, bool trackChanges);
+ bool parseChildren(const TQWidget *widget, bool trackChanges);
/**
* Set a property
*/
- void setProperty(QWidget *w, const QVariant &v);
+ void setProperty(TQWidget *w, const TQVariant &v);
/**
* Retrieve a property
*/
- QVariant property(QWidget *w);
+ TQVariant property(TQWidget *w);
/**
* Setup secondary widget properties
*/
- void setupWidget(QWidget *widget, KConfigSkeletonItem *item);
+ void setupWidget(TQWidget *widget, KConfigSkeletonItem *item);
protected:
/**
@@ -211,17 +211,17 @@ protected:
/**
* Dialog being managed
*/
- QWidget *m_dialog;
+ TQWidget *m_dialog;
/**
* Pointer to the property map for easy access.
*/
- QSqlPropertyMap *propertyMap;
+ TQSqlPropertyMap *propertyMap;
/**
* Map of the classes and the signals that they emit when changed.
*/
- QMap<QString, QCString> changedMap;
+ TQMap<TQString, TQCString> changedMap;
private:
class Private;
diff --git a/kdecore/kconfigskeleton.cpp b/kdecore/kconfigskeleton.cpp
index 819696a15..9e6070d6a 100644
--- a/kdecore/kconfigskeleton.cpp
+++ b/kdecore/kconfigskeleton.cpp
@@ -19,8 +19,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcolor.h>
-#include <qvariant.h>
+#include <tqcolor.h>
+#include <tqvariant.h>
#include <kconfig.h>
#include <kstandarddirs.h>
@@ -38,11 +38,11 @@ void KConfigSkeletonItem::readImmutability( KConfig *config )
}
-KConfigSkeleton::ItemString::ItemString( const QString &group, const QString &key,
- QString &reference,
- const QString &defaultValue,
+KConfigSkeleton::ItemString::ItemString( const TQString &group, const TQString &key,
+ TQString &reference,
+ const TQString &defaultValue,
Type type )
- : KConfigSkeletonGenericItem<QString>( group, key, reference, defaultValue ),
+ : KConfigSkeletonGenericItem<TQString>( group, key, reference, defaultValue ),
mType( type )
{
}
@@ -74,7 +74,7 @@ void KConfigSkeleton::ItemString::readConfig( KConfig *config )
}
else if ( mType == Password )
{
- QString value = config->readEntry( mKey,
+ TQString value = config->readEntry( mKey,
KStringHandler::obscure( mDefault ) );
mReference = KStringHandler::obscure( value );
}
@@ -88,35 +88,35 @@ void KConfigSkeleton::ItemString::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemString::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemString::setProperty(const TQVariant & p)
{
mReference = p.toString();
}
-QVariant KConfigSkeleton::ItemString::property() const
+TQVariant KConfigSkeleton::ItemString::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemPassword::ItemPassword( const QString &group, const QString &key,
- QString &reference,
- const QString &defaultValue)
+KConfigSkeleton::ItemPassword::ItemPassword( const TQString &group, const TQString &key,
+ TQString &reference,
+ const TQString &defaultValue)
: ItemString( group, key, reference, defaultValue, Password )
{
}
-KConfigSkeleton::ItemPath::ItemPath( const QString &group, const QString &key,
- QString &reference,
- const QString &defaultValue)
+KConfigSkeleton::ItemPath::ItemPath( const TQString &group, const TQString &key,
+ TQString &reference,
+ const TQString &defaultValue)
: ItemString( group, key, reference, defaultValue, Path )
{
}
-KConfigSkeleton::ItemProperty::ItemProperty( const QString &group,
- const QString &key,
- QVariant &reference,
- QVariant defaultValue )
- : KConfigSkeletonGenericItem<QVariant>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemProperty::ItemProperty( const TQString &group,
+ const TQString &key,
+ TQVariant &reference,
+ TQVariant defaultValue )
+ : KConfigSkeletonGenericItem<TQVariant>( group, key, reference, defaultValue )
{
}
@@ -129,17 +129,17 @@ void KConfigSkeleton::ItemProperty::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemProperty::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemProperty::setProperty(const TQVariant & p)
{
mReference = p;
}
-QVariant KConfigSkeleton::ItemProperty::property() const
+TQVariant KConfigSkeleton::ItemProperty::property() const
{
return mReference;
}
-KConfigSkeleton::ItemBool::ItemBool( const QString &group, const QString &key,
+KConfigSkeleton::ItemBool::ItemBool( const TQString &group, const TQString &key,
bool &reference, bool defaultValue )
: KConfigSkeletonGenericItem<bool>( group, key, reference, defaultValue )
{
@@ -154,18 +154,18 @@ void KConfigSkeleton::ItemBool::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemBool::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemBool::setProperty(const TQVariant & p)
{
mReference = p.toBool();
}
-QVariant KConfigSkeleton::ItemBool::property() const
+TQVariant KConfigSkeleton::ItemBool::property() const
{
- return QVariant( mReference, 42 /* dummy */ );
+ return TQVariant( mReference, 42 /* dummy */ );
}
-KConfigSkeleton::ItemInt::ItemInt( const QString &group, const QString &key,
+KConfigSkeleton::ItemInt::ItemInt( const TQString &group, const TQString &key,
int &reference, int defaultValue )
: KConfigSkeletonGenericItem<int>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
@@ -185,28 +185,28 @@ void KConfigSkeleton::ItemInt::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemInt::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemInt::setProperty(const TQVariant & p)
{
mReference = p.toInt();
}
-QVariant KConfigSkeleton::ItemInt::property() const
+TQVariant KConfigSkeleton::ItemInt::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-QVariant KConfigSkeleton::ItemInt::minValue() const
+TQVariant KConfigSkeleton::ItemInt::minValue() const
{
if (mHasMin)
- return QVariant(mMin);
- return QVariant();
+ return TQVariant(mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemInt::maxValue() const
+TQVariant KConfigSkeleton::ItemInt::maxValue() const
{
if (mHasMax)
- return QVariant(mMax);
- return QVariant();
+ return TQVariant(mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemInt::setMinValue(int v)
@@ -222,7 +222,7 @@ void KConfigSkeleton::ItemInt::setMaxValue(int v)
}
-KConfigSkeleton::ItemInt64::ItemInt64( const QString &group, const QString &key,
+KConfigSkeleton::ItemInt64::ItemInt64( const TQString &group, const TQString &key,
Q_INT64 &reference, Q_INT64 defaultValue )
: KConfigSkeletonGenericItem<Q_INT64>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
@@ -242,28 +242,28 @@ void KConfigSkeleton::ItemInt64::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemInt64::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemInt64::setProperty(const TQVariant & p)
{
mReference = p.toLongLong();
}
-QVariant KConfigSkeleton::ItemInt64::property() const
+TQVariant KConfigSkeleton::ItemInt64::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-QVariant KConfigSkeleton::ItemInt64::minValue() const
+TQVariant KConfigSkeleton::ItemInt64::minValue() const
{
if (mHasMin)
- return QVariant(mMin);
- return QVariant();
+ return TQVariant(mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemInt64::maxValue() const
+TQVariant KConfigSkeleton::ItemInt64::maxValue() const
{
if (mHasMax)
- return QVariant(mMax);
- return QVariant();
+ return TQVariant(mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemInt64::setMinValue(Q_INT64 v)
@@ -278,9 +278,9 @@ void KConfigSkeleton::ItemInt64::setMaxValue(Q_INT64 v)
mMax = v;
}
-KConfigSkeleton::ItemEnum::ItemEnum( const QString &group, const QString &key,
+KConfigSkeleton::ItemEnum::ItemEnum( const TQString &group, const TQString &key,
int &reference,
- const QValueList<Choice> &choices,
+ const TQValueList<Choice> &choices,
int defaultValue )
: ItemInt( group, key, reference, defaultValue ), mChoices( choices )
{
@@ -297,8 +297,8 @@ void KConfigSkeleton::ItemEnum::readConfig( KConfig *config )
{
int i = 0;
mReference = -1;
- QString tmp = config->readEntry( mKey ).lower();
- for(QValueList<Choice>::ConstIterator it = mChoices.begin();
+ TQString tmp = config->readEntry( mKey ).lower();
+ for(TQValueList<Choice>::ConstIterator it = mChoices.begin();
it != mChoices.end(); ++it, ++i)
{
if ((*it).name.lower() == tmp)
@@ -329,13 +329,13 @@ void KConfigSkeleton::ItemEnum::writeConfig( KConfig *config )
}
}
-QValueList<KConfigSkeleton::ItemEnum::Choice> KConfigSkeleton::ItemEnum::choices() const
+TQValueList<KConfigSkeleton::ItemEnum::Choice> KConfigSkeleton::ItemEnum::choices() const
{
return mChoices;
}
-KConfigSkeleton::ItemUInt::ItemUInt( const QString &group, const QString &key,
+KConfigSkeleton::ItemUInt::ItemUInt( const TQString &group, const TQString &key,
unsigned int &reference,
unsigned int defaultValue )
: KConfigSkeletonGenericItem<unsigned int>( group, key, reference, defaultValue )
@@ -356,28 +356,28 @@ void KConfigSkeleton::ItemUInt::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemUInt::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemUInt::setProperty(const TQVariant & p)
{
mReference = p.toUInt();
}
-QVariant KConfigSkeleton::ItemUInt::property() const
+TQVariant KConfigSkeleton::ItemUInt::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-QVariant KConfigSkeleton::ItemUInt::minValue() const
+TQVariant KConfigSkeleton::ItemUInt::minValue() const
{
if (mHasMin)
- return QVariant(mMin);
- return QVariant();
+ return TQVariant(mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemUInt::maxValue() const
+TQVariant KConfigSkeleton::ItemUInt::maxValue() const
{
if (mHasMax)
- return QVariant(mMax);
- return QVariant();
+ return TQVariant(mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemUInt::setMinValue(unsigned int v)
@@ -393,7 +393,7 @@ void KConfigSkeleton::ItemUInt::setMaxValue(unsigned int v)
}
-KConfigSkeleton::ItemUInt64::ItemUInt64( const QString &group, const QString &key,
+KConfigSkeleton::ItemUInt64::ItemUInt64( const TQString &group, const TQString &key,
Q_UINT64 &reference, Q_UINT64 defaultValue )
: KConfigSkeletonGenericItem<Q_UINT64>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
@@ -413,28 +413,28 @@ void KConfigSkeleton::ItemUInt64::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemUInt64::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemUInt64::setProperty(const TQVariant & p)
{
mReference = p.toULongLong();
}
-QVariant KConfigSkeleton::ItemUInt64::property() const
+TQVariant KConfigSkeleton::ItemUInt64::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-QVariant KConfigSkeleton::ItemUInt64::minValue() const
+TQVariant KConfigSkeleton::ItemUInt64::minValue() const
{
if (mHasMin)
- return QVariant(mMin);
- return QVariant();
+ return TQVariant(mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemUInt64::maxValue() const
+TQVariant KConfigSkeleton::ItemUInt64::maxValue() const
{
if (mHasMax)
- return QVariant(mMax);
- return QVariant();
+ return TQVariant(mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemUInt64::setMinValue(Q_UINT64 v)
@@ -449,7 +449,7 @@ void KConfigSkeleton::ItemUInt64::setMaxValue(Q_UINT64 v)
mMax = v;
}
-KConfigSkeleton::ItemLong::ItemLong( const QString &group, const QString &key,
+KConfigSkeleton::ItemLong::ItemLong( const TQString &group, const TQString &key,
long &reference, long defaultValue )
: KConfigSkeletonGenericItem<long>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
@@ -469,28 +469,28 @@ void KConfigSkeleton::ItemLong::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemLong::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemLong::setProperty(const TQVariant & p)
{
mReference = p.toLongLong();
}
-QVariant KConfigSkeleton::ItemLong::property() const
+TQVariant KConfigSkeleton::ItemLong::property() const
{
- return QVariant((Q_LLONG) mReference);
+ return TQVariant((Q_LLONG) mReference);
}
-QVariant KConfigSkeleton::ItemLong::minValue() const
+TQVariant KConfigSkeleton::ItemLong::minValue() const
{
if (mHasMin)
- return QVariant((Q_LLONG) mMin);
- return QVariant();
+ return TQVariant((Q_LLONG) mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemLong::maxValue() const
+TQVariant KConfigSkeleton::ItemLong::maxValue() const
{
if (mHasMax)
- return QVariant((Q_LLONG) mMax);
- return QVariant();
+ return TQVariant((Q_LLONG) mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemLong::setMinValue(long v)
@@ -506,7 +506,7 @@ void KConfigSkeleton::ItemLong::setMaxValue(long v)
}
-KConfigSkeleton::ItemULong::ItemULong( const QString &group, const QString &key,
+KConfigSkeleton::ItemULong::ItemULong( const TQString &group, const TQString &key,
unsigned long &reference,
unsigned long defaultValue )
: KConfigSkeletonGenericItem<unsigned long>( group, key, reference, defaultValue )
@@ -527,28 +527,28 @@ void KConfigSkeleton::ItemULong::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemULong::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemULong::setProperty(const TQVariant & p)
{
mReference = p.toULongLong();
}
-QVariant KConfigSkeleton::ItemULong::property() const
+TQVariant KConfigSkeleton::ItemULong::property() const
{
- return QVariant((Q_ULLONG) mReference);
+ return TQVariant((Q_ULLONG) mReference);
}
-QVariant KConfigSkeleton::ItemULong::minValue() const
+TQVariant KConfigSkeleton::ItemULong::minValue() const
{
if (mHasMin)
- return QVariant((Q_ULLONG) mMin);
- return QVariant();
+ return TQVariant((Q_ULLONG) mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemULong::maxValue() const
+TQVariant KConfigSkeleton::ItemULong::maxValue() const
{
if (mHasMax)
- return QVariant((Q_ULLONG) mMax);
- return QVariant();
+ return TQVariant((Q_ULLONG) mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemULong::setMinValue(unsigned long v)
@@ -564,7 +564,7 @@ void KConfigSkeleton::ItemULong::setMaxValue(unsigned long v)
}
-KConfigSkeleton::ItemDouble::ItemDouble( const QString &group, const QString &key,
+KConfigSkeleton::ItemDouble::ItemDouble( const TQString &group, const TQString &key,
double &reference, double defaultValue )
: KConfigSkeletonGenericItem<double>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
@@ -584,28 +584,28 @@ void KConfigSkeleton::ItemDouble::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemDouble::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemDouble::setProperty(const TQVariant & p)
{
mReference = p.toDouble();
}
-QVariant KConfigSkeleton::ItemDouble::property() const
+TQVariant KConfigSkeleton::ItemDouble::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-QVariant KConfigSkeleton::ItemDouble::minValue() const
+TQVariant KConfigSkeleton::ItemDouble::minValue() const
{
if (mHasMin)
- return QVariant(mMin);
- return QVariant();
+ return TQVariant(mMin);
+ return TQVariant();
}
-QVariant KConfigSkeleton::ItemDouble::maxValue() const
+TQVariant KConfigSkeleton::ItemDouble::maxValue() const
{
if (mHasMax)
- return QVariant(mMax);
- return QVariant();
+ return TQVariant(mMax);
+ return TQVariant();
}
void KConfigSkeleton::ItemDouble::setMinValue(double v)
@@ -621,10 +621,10 @@ void KConfigSkeleton::ItemDouble::setMaxValue(double v)
}
-KConfigSkeleton::ItemColor::ItemColor( const QString &group, const QString &key,
- QColor &reference,
- const QColor &defaultValue )
- : KConfigSkeletonGenericItem<QColor>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemColor::ItemColor( const TQString &group, const TQString &key,
+ TQColor &reference,
+ const TQColor &defaultValue )
+ : KConfigSkeletonGenericItem<TQColor>( group, key, reference, defaultValue )
{
}
@@ -637,21 +637,21 @@ void KConfigSkeleton::ItemColor::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemColor::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemColor::setProperty(const TQVariant & p)
{
mReference = p.toColor();
}
-QVariant KConfigSkeleton::ItemColor::property() const
+TQVariant KConfigSkeleton::ItemColor::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemFont::ItemFont( const QString &group, const QString &key,
- QFont &reference,
- const QFont &defaultValue )
- : KConfigSkeletonGenericItem<QFont>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemFont::ItemFont( const TQString &group, const TQString &key,
+ TQFont &reference,
+ const TQFont &defaultValue )
+ : KConfigSkeletonGenericItem<TQFont>( group, key, reference, defaultValue )
{
}
@@ -664,21 +664,21 @@ void KConfigSkeleton::ItemFont::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemFont::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemFont::setProperty(const TQVariant & p)
{
mReference = p.toFont();
}
-QVariant KConfigSkeleton::ItemFont::property() const
+TQVariant KConfigSkeleton::ItemFont::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemRect::ItemRect( const QString &group, const QString &key,
- QRect &reference,
- const QRect &defaultValue )
- : KConfigSkeletonGenericItem<QRect>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemRect::ItemRect( const TQString &group, const TQString &key,
+ TQRect &reference,
+ const TQRect &defaultValue )
+ : KConfigSkeletonGenericItem<TQRect>( group, key, reference, defaultValue )
{
}
@@ -691,21 +691,21 @@ void KConfigSkeleton::ItemRect::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemRect::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemRect::setProperty(const TQVariant & p)
{
mReference = p.toRect();
}
-QVariant KConfigSkeleton::ItemRect::property() const
+TQVariant KConfigSkeleton::ItemRect::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemPoint::ItemPoint( const QString &group, const QString &key,
- QPoint &reference,
- const QPoint &defaultValue )
- : KConfigSkeletonGenericItem<QPoint>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemPoint::ItemPoint( const TQString &group, const TQString &key,
+ TQPoint &reference,
+ const TQPoint &defaultValue )
+ : KConfigSkeletonGenericItem<TQPoint>( group, key, reference, defaultValue )
{
}
@@ -718,21 +718,21 @@ void KConfigSkeleton::ItemPoint::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemPoint::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemPoint::setProperty(const TQVariant & p)
{
mReference = p.toPoint();
}
-QVariant KConfigSkeleton::ItemPoint::property() const
+TQVariant KConfigSkeleton::ItemPoint::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemSize::ItemSize( const QString &group, const QString &key,
- QSize &reference,
- const QSize &defaultValue )
- : KConfigSkeletonGenericItem<QSize>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemSize::ItemSize( const TQString &group, const TQString &key,
+ TQSize &reference,
+ const TQSize &defaultValue )
+ : KConfigSkeletonGenericItem<TQSize>( group, key, reference, defaultValue )
{
}
@@ -745,21 +745,21 @@ void KConfigSkeleton::ItemSize::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemSize::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemSize::setProperty(const TQVariant & p)
{
mReference = p.toSize();
}
-QVariant KConfigSkeleton::ItemSize::property() const
+TQVariant KConfigSkeleton::ItemSize::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemDateTime::ItemDateTime( const QString &group, const QString &key,
- QDateTime &reference,
- const QDateTime &defaultValue )
- : KConfigSkeletonGenericItem<QDateTime>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemDateTime::ItemDateTime( const TQString &group, const TQString &key,
+ TQDateTime &reference,
+ const TQDateTime &defaultValue )
+ : KConfigSkeletonGenericItem<TQDateTime>( group, key, reference, defaultValue )
{
}
@@ -772,21 +772,21 @@ void KConfigSkeleton::ItemDateTime::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemDateTime::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemDateTime::setProperty(const TQVariant & p)
{
mReference = p.toDateTime();
}
-QVariant KConfigSkeleton::ItemDateTime::property() const
+TQVariant KConfigSkeleton::ItemDateTime::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemStringList::ItemStringList( const QString &group, const QString &key,
- QStringList &reference,
- const QStringList &defaultValue )
- : KConfigSkeletonGenericItem<QStringList>( group, key, reference, defaultValue )
+KConfigSkeleton::ItemStringList::ItemStringList( const TQString &group, const TQString &key,
+ TQStringList &reference,
+ const TQStringList &defaultValue )
+ : KConfigSkeletonGenericItem<TQStringList>( group, key, reference, defaultValue )
{
}
@@ -802,20 +802,20 @@ void KConfigSkeleton::ItemStringList::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemStringList::setProperty(const QVariant & p)
+void KConfigSkeleton::ItemStringList::setProperty(const TQVariant & p)
{
mReference = p.toStringList();
}
-QVariant KConfigSkeleton::ItemStringList::property() const
+TQVariant KConfigSkeleton::ItemStringList::property() const
{
- return QVariant(mReference);
+ return TQVariant(mReference);
}
-KConfigSkeleton::ItemPathList::ItemPathList( const QString &group, const QString &key,
- QStringList &reference,
- const QStringList &defaultValue )
+KConfigSkeleton::ItemPathList::ItemPathList( const TQString &group, const TQString &key,
+ TQStringList &reference,
+ const TQStringList &defaultValue )
: ItemStringList( group, key, reference, defaultValue )
{
}
@@ -840,17 +840,17 @@ void KConfigSkeleton::ItemPathList::writeConfig( KConfig *config )
if ((mDefault == mReference) && !config->hasDefault( mKey))
config->revertToDefault( mKey );
else {
- QStringList sl = mReference;
+ TQStringList sl = mReference;
config->writePathEntry( mKey, sl );
}
}
}
-KConfigSkeleton::ItemIntList::ItemIntList( const QString &group, const QString &key,
- QValueList<int> &reference,
- const QValueList<int> &defaultValue )
- : KConfigSkeletonGenericItem<QValueList<int> >( group, key, reference, defaultValue )
+KConfigSkeleton::ItemIntList::ItemIntList( const TQString &group, const TQString &key,
+ TQValueList<int> &reference,
+ const TQValueList<int> &defaultValue )
+ : KConfigSkeletonGenericItem<TQValueList<int> >( group, key, reference, defaultValue )
{
}
@@ -866,19 +866,19 @@ void KConfigSkeleton::ItemIntList::readConfig( KConfig *config )
readImmutability( config );
}
-void KConfigSkeleton::ItemIntList::setProperty(const QVariant &)
+void KConfigSkeleton::ItemIntList::setProperty(const TQVariant &)
{
// TODO: Not yet supported
}
-QVariant KConfigSkeleton::ItemIntList::property() const
+TQVariant KConfigSkeleton::ItemIntList::property() const
{
// TODO: Not yet supported
- return QVariant();
+ return TQVariant();
}
-KConfigSkeleton::KConfigSkeleton( const QString &configname )
+KConfigSkeleton::KConfigSkeleton( const TQString &configname )
: mCurrentGroup( "No Group" ), mUseDefaults(false)
{
kdDebug(177) << "Creating KConfigSkeleton (" << (void *)this << ")" << endl;
@@ -910,7 +910,7 @@ KConfigSkeleton::~KConfigSkeleton()
}
}
-void KConfigSkeleton::setCurrentGroup( const QString &group )
+void KConfigSkeleton::setCurrentGroup( const TQString &group )
{
mCurrentGroup = group;
}
@@ -950,7 +950,7 @@ void KConfigSkeleton::readConfig()
{
kdDebug(177) << "KConfigSkeleton::readConfig()" << endl;
- QString origGroup = mConfig->group();
+ TQString origGroup = mConfig->group();
mConfig->reparseConfiguration();
KConfigSkeletonItem::List::ConstIterator it;
@@ -968,7 +968,7 @@ void KConfigSkeleton::writeConfig()
{
kdDebug(177) << "KConfigSkeleton::writeConfig()" << endl;
- QString origGroup = mConfig->group();
+ TQString origGroup = mConfig->group();
KConfigSkeletonItem::List::ConstIterator it;
for( it = mItems.begin(); it != mItems.end(); ++it )
@@ -985,7 +985,7 @@ void KConfigSkeleton::writeConfig()
mConfig->setGroup(origGroup);
}
-void KConfigSkeleton::addItem( KConfigSkeletonItem *item, const QString &name )
+void KConfigSkeleton::addItem( KConfigSkeletonItem *item, const TQString &name )
{
item->setName( name.isEmpty() ? item->key() : name );
mItems.append( item );
@@ -994,8 +994,8 @@ void KConfigSkeleton::addItem( KConfigSkeletonItem *item, const QString &name )
item->readConfig( mConfig );
}
-KConfigSkeleton::ItemString *KConfigSkeleton::addItemString( const QString &name, QString &reference,
- const QString &defaultValue, const QString &key )
+KConfigSkeleton::ItemString *KConfigSkeleton::addItemString( const TQString &name, TQString &reference,
+ const TQString &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemString *item;
item = new KConfigSkeleton::ItemString( mCurrentGroup, key.isEmpty() ? name : key,
@@ -1005,8 +1005,8 @@ KConfigSkeleton::ItemString *KConfigSkeleton::addItemString( const QString &name
return item;
}
-KConfigSkeleton::ItemPassword *KConfigSkeleton::addItemPassword( const QString &name, QString &reference,
- const QString &defaultValue, const QString &key )
+KConfigSkeleton::ItemPassword *KConfigSkeleton::addItemPassword( const TQString &name, TQString &reference,
+ const TQString &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemPassword *item;
item = new KConfigSkeleton::ItemPassword( mCurrentGroup, key.isNull() ? name : key,
@@ -1015,8 +1015,8 @@ KConfigSkeleton::ItemPassword *KConfigSkeleton::addItemPassword( const QString &
return item;
}
-KConfigSkeleton::ItemPath *KConfigSkeleton::addItemPath( const QString &name, QString &reference,
- const QString &defaultValue, const QString &key )
+KConfigSkeleton::ItemPath *KConfigSkeleton::addItemPath( const TQString &name, TQString &reference,
+ const TQString &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemPath *item;
item = new KConfigSkeleton::ItemPath( mCurrentGroup, key.isNull() ? name : key,
@@ -1025,8 +1025,8 @@ KConfigSkeleton::ItemPath *KConfigSkeleton::addItemPath( const QString &name, QS
return item;
}
-KConfigSkeleton::ItemProperty *KConfigSkeleton::addItemProperty( const QString &name, QVariant &reference,
- const QVariant &defaultValue, const QString &key )
+KConfigSkeleton::ItemProperty *KConfigSkeleton::addItemProperty( const TQString &name, TQVariant &reference,
+ const TQVariant &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemProperty *item;
item = new KConfigSkeleton::ItemProperty( mCurrentGroup, key.isNull() ? name : key,
@@ -1035,8 +1035,8 @@ KConfigSkeleton::ItemProperty *KConfigSkeleton::addItemProperty( const QString &
return item;
}
-KConfigSkeleton::ItemBool *KConfigSkeleton::addItemBool( const QString &name, bool &reference,
- bool defaultValue, const QString &key )
+KConfigSkeleton::ItemBool *KConfigSkeleton::addItemBool( const TQString &name, bool &reference,
+ bool defaultValue, const TQString &key )
{
KConfigSkeleton::ItemBool *item;
item = new KConfigSkeleton::ItemBool( mCurrentGroup, key.isNull() ? name : key,
@@ -1045,8 +1045,8 @@ KConfigSkeleton::ItemBool *KConfigSkeleton::addItemBool( const QString &name, bo
return item;
}
-KConfigSkeleton::ItemInt *KConfigSkeleton::addItemInt( const QString &name, int &reference,
- int defaultValue, const QString &key )
+KConfigSkeleton::ItemInt *KConfigSkeleton::addItemInt( const TQString &name, int &reference,
+ int defaultValue, const TQString &key )
{
KConfigSkeleton::ItemInt *item;
item = new KConfigSkeleton::ItemInt( mCurrentGroup, key.isNull() ? name : key,
@@ -1055,8 +1055,8 @@ KConfigSkeleton::ItemInt *KConfigSkeleton::addItemInt( const QString &name, int
return item;
}
-KConfigSkeleton::ItemUInt *KConfigSkeleton::addItemUInt( const QString &name, unsigned int &reference,
- unsigned int defaultValue, const QString &key )
+KConfigSkeleton::ItemUInt *KConfigSkeleton::addItemUInt( const TQString &name, unsigned int &reference,
+ unsigned int defaultValue, const TQString &key )
{
KConfigSkeleton::ItemUInt *item;
item = new KConfigSkeleton::ItemUInt( mCurrentGroup, key.isNull() ? name : key,
@@ -1065,8 +1065,8 @@ KConfigSkeleton::ItemUInt *KConfigSkeleton::addItemUInt( const QString &name, un
return item;
}
-KConfigSkeleton::ItemInt64 *KConfigSkeleton::addItemInt64( const QString &name, Q_INT64 &reference,
- Q_INT64 defaultValue, const QString &key )
+KConfigSkeleton::ItemInt64 *KConfigSkeleton::addItemInt64( const TQString &name, Q_INT64 &reference,
+ Q_INT64 defaultValue, const TQString &key )
{
KConfigSkeleton::ItemInt64 *item;
item = new KConfigSkeleton::ItemInt64( mCurrentGroup, key.isNull() ? name : key,
@@ -1075,8 +1075,8 @@ KConfigSkeleton::ItemInt64 *KConfigSkeleton::addItemInt64( const QString &name,
return item;
}
-KConfigSkeleton::ItemUInt64 *KConfigSkeleton::addItemUInt64( const QString &name, Q_UINT64 &reference,
- Q_UINT64 defaultValue, const QString &key )
+KConfigSkeleton::ItemUInt64 *KConfigSkeleton::addItemUInt64( const TQString &name, Q_UINT64 &reference,
+ Q_UINT64 defaultValue, const TQString &key )
{
KConfigSkeleton::ItemUInt64 *item;
item = new KConfigSkeleton::ItemUInt64( mCurrentGroup, key.isNull() ? name : key,
@@ -1085,8 +1085,8 @@ KConfigSkeleton::ItemUInt64 *KConfigSkeleton::addItemUInt64( const QString &name
return item;
}
-KConfigSkeleton::ItemLong *KConfigSkeleton::addItemLong( const QString &name, long &reference,
- long defaultValue, const QString &key )
+KConfigSkeleton::ItemLong *KConfigSkeleton::addItemLong( const TQString &name, long &reference,
+ long defaultValue, const TQString &key )
{
KConfigSkeleton::ItemLong *item;
item = new KConfigSkeleton::ItemLong( mCurrentGroup, key.isNull() ? name : key,
@@ -1095,8 +1095,8 @@ KConfigSkeleton::ItemLong *KConfigSkeleton::addItemLong( const QString &name, lo
return item;
}
-KConfigSkeleton::ItemULong *KConfigSkeleton::addItemULong( const QString &name, unsigned long &reference,
- unsigned long defaultValue, const QString &key )
+KConfigSkeleton::ItemULong *KConfigSkeleton::addItemULong( const TQString &name, unsigned long &reference,
+ unsigned long defaultValue, const TQString &key )
{
KConfigSkeleton::ItemULong *item;
item = new KConfigSkeleton::ItemULong( mCurrentGroup, key.isNull() ? name : key,
@@ -1105,8 +1105,8 @@ KConfigSkeleton::ItemULong *KConfigSkeleton::addItemULong( const QString &name,
return item;
}
-KConfigSkeleton::ItemDouble *KConfigSkeleton::addItemDouble( const QString &name, double &reference,
- double defaultValue, const QString &key )
+KConfigSkeleton::ItemDouble *KConfigSkeleton::addItemDouble( const TQString &name, double &reference,
+ double defaultValue, const TQString &key )
{
KConfigSkeleton::ItemDouble *item;
item = new KConfigSkeleton::ItemDouble( mCurrentGroup, key.isNull() ? name : key,
@@ -1115,8 +1115,8 @@ KConfigSkeleton::ItemDouble *KConfigSkeleton::addItemDouble( const QString &name
return item;
}
-KConfigSkeleton::ItemColor *KConfigSkeleton::addItemColor( const QString &name, QColor &reference,
- const QColor &defaultValue, const QString &key )
+KConfigSkeleton::ItemColor *KConfigSkeleton::addItemColor( const TQString &name, TQColor &reference,
+ const TQColor &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemColor *item;
item = new KConfigSkeleton::ItemColor( mCurrentGroup, key.isNull() ? name : key,
@@ -1125,8 +1125,8 @@ KConfigSkeleton::ItemColor *KConfigSkeleton::addItemColor( const QString &name,
return item;
}
-KConfigSkeleton::ItemFont *KConfigSkeleton::addItemFont( const QString &name, QFont &reference,
- const QFont &defaultValue, const QString &key )
+KConfigSkeleton::ItemFont *KConfigSkeleton::addItemFont( const TQString &name, TQFont &reference,
+ const TQFont &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemFont *item;
item = new KConfigSkeleton::ItemFont( mCurrentGroup, key.isNull() ? name : key,
@@ -1135,8 +1135,8 @@ KConfigSkeleton::ItemFont *KConfigSkeleton::addItemFont( const QString &name, QF
return item;
}
-KConfigSkeleton::ItemRect *KConfigSkeleton::addItemRect( const QString &name, QRect &reference,
- const QRect &defaultValue, const QString &key )
+KConfigSkeleton::ItemRect *KConfigSkeleton::addItemRect( const TQString &name, TQRect &reference,
+ const TQRect &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemRect *item;
item = new KConfigSkeleton::ItemRect( mCurrentGroup, key.isNull() ? name : key,
@@ -1145,8 +1145,8 @@ KConfigSkeleton::ItemRect *KConfigSkeleton::addItemRect( const QString &name, QR
return item;
}
-KConfigSkeleton::ItemPoint *KConfigSkeleton::addItemPoint( const QString &name, QPoint &reference,
- const QPoint &defaultValue, const QString &key )
+KConfigSkeleton::ItemPoint *KConfigSkeleton::addItemPoint( const TQString &name, TQPoint &reference,
+ const TQPoint &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemPoint *item;
item = new KConfigSkeleton::ItemPoint( mCurrentGroup, key.isNull() ? name : key,
@@ -1155,8 +1155,8 @@ KConfigSkeleton::ItemPoint *KConfigSkeleton::addItemPoint( const QString &name,
return item;
}
-KConfigSkeleton::ItemSize *KConfigSkeleton::addItemSize( const QString &name, QSize &reference,
- const QSize &defaultValue, const QString &key )
+KConfigSkeleton::ItemSize *KConfigSkeleton::addItemSize( const TQString &name, TQSize &reference,
+ const TQSize &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemSize *item;
item = new KConfigSkeleton::ItemSize( mCurrentGroup, key.isNull() ? name : key,
@@ -1165,8 +1165,8 @@ KConfigSkeleton::ItemSize *KConfigSkeleton::addItemSize( const QString &name, QS
return item;
}
-KConfigSkeleton::ItemDateTime *KConfigSkeleton::addItemDateTime( const QString &name, QDateTime &reference,
- const QDateTime &defaultValue, const QString &key )
+KConfigSkeleton::ItemDateTime *KConfigSkeleton::addItemDateTime( const TQString &name, TQDateTime &reference,
+ const TQDateTime &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemDateTime *item;
item = new KConfigSkeleton::ItemDateTime( mCurrentGroup, key.isNull() ? name : key,
@@ -1175,8 +1175,8 @@ KConfigSkeleton::ItemDateTime *KConfigSkeleton::addItemDateTime( const QString &
return item;
}
-KConfigSkeleton::ItemStringList *KConfigSkeleton::addItemStringList( const QString &name, QStringList &reference,
- const QStringList &defaultValue, const QString &key )
+KConfigSkeleton::ItemStringList *KConfigSkeleton::addItemStringList( const TQString &name, TQStringList &reference,
+ const TQStringList &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemStringList *item;
item = new KConfigSkeleton::ItemStringList( mCurrentGroup, key.isNull() ? name : key,
@@ -1185,8 +1185,8 @@ KConfigSkeleton::ItemStringList *KConfigSkeleton::addItemStringList( const QStri
return item;
}
-KConfigSkeleton::ItemIntList *KConfigSkeleton::addItemIntList( const QString &name, QValueList<int> &reference,
- const QValueList<int> &defaultValue, const QString &key )
+KConfigSkeleton::ItemIntList *KConfigSkeleton::addItemIntList( const TQString &name, TQValueList<int> &reference,
+ const TQValueList<int> &defaultValue, const TQString &key )
{
KConfigSkeleton::ItemIntList *item;
item = new KConfigSkeleton::ItemIntList( mCurrentGroup, key.isNull() ? name : key,
@@ -1195,13 +1195,13 @@ KConfigSkeleton::ItemIntList *KConfigSkeleton::addItemIntList( const QString &na
return item;
}
-bool KConfigSkeleton::isImmutable(const QString &name)
+bool KConfigSkeleton::isImmutable(const TQString &name)
{
KConfigSkeletonItem *item = findItem(name);
return !item || item->isImmutable();
}
-KConfigSkeletonItem *KConfigSkeleton::findItem(const QString &name)
+KConfigSkeletonItem *KConfigSkeleton::findItem(const TQString &name)
{
return mItemDict.find(name);
}
diff --git a/kdecore/kconfigskeleton.h b/kdecore/kconfigskeleton.h
index 44fdfc7fa..82185c090 100644
--- a/kdecore/kconfigskeleton.h
+++ b/kdecore/kconfigskeleton.h
@@ -23,16 +23,16 @@
#ifndef _KCONFIGSKELETON_H
#define _KCONFIGSKELETON_H
-#include <qcolor.h>
-#include <qdatetime.h>
-#include <qfont.h>
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qstringlist.h>
-#include <qvariant.h>
+#include <tqcolor.h>
+#include <tqdatetime.h>
+#include <tqfont.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
#include <kconfig.h>
#include <kglobalsettings.h>
@@ -50,9 +50,9 @@
class KDECORE_EXPORT KConfigSkeletonItem
{
public:
- typedef QValueList < KConfigSkeletonItem * >List;
- typedef QDict < KConfigSkeletonItem > Dict;
- typedef QDictIterator < KConfigSkeletonItem > DictIterator;
+ typedef TQValueList < KConfigSkeletonItem * >List;
+ typedef TQDict < KConfigSkeletonItem > Dict;
+ typedef TQDictIterator < KConfigSkeletonItem > DictIterator;
/**
* Constructor.
@@ -60,7 +60,7 @@
* @param group Config file group.
* @param key Config file key.
*/
- KConfigSkeletonItem(const QString & group, const QString & key)
+ KConfigSkeletonItem(const TQString & group, const TQString & key)
:mGroup(group),mKey(key), mIsImmutable(true)
{
}
@@ -75,7 +75,7 @@
/**
* Set config file group.
*/
- void setGroup( const QString &group )
+ void setGroup( const TQString &group )
{
mGroup = group;
}
@@ -83,7 +83,7 @@
/**
* Return config file group.
*/
- QString group() const
+ TQString group() const
{
return mGroup;
}
@@ -91,7 +91,7 @@
/**
* Set config file key.
*/
- void setKey( const QString &key )
+ void setKey( const TQString &key )
{
mKey = key;
}
@@ -99,7 +99,7 @@
/**
* Return config file key.
*/
- QString key() const
+ TQString key() const
{
return mKey;
}
@@ -107,7 +107,7 @@
/**
* Set internal name of entry.
*/
- void setName(const QString &name)
+ void setName(const TQString &name)
{
mName = name;
}
@@ -115,7 +115,7 @@
/**
* Return internal name of entry.
*/
- QString name() const
+ TQString name() const
{
return mName;
}
@@ -123,7 +123,7 @@
/**
Set label providing a translated one-line description of the item.
*/
- void setLabel( const QString &l )
+ void setLabel( const TQString &l )
{
mLabel = l;
}
@@ -131,7 +131,7 @@
/**
Return label of item. See setLabel().
*/
- QString label() const
+ TQString label() const
{
return mLabel;
}
@@ -139,7 +139,7 @@
/**
Set WhatsThis description og item.
*/
- void setWhatsThis( const QString &w )
+ void setWhatsThis( const TQString &w )
{
mWhatsThis = w;
}
@@ -147,7 +147,7 @@
/**
Return WhatsThis description of item. See setWhatsThis().
*/
- QString whatsThis() const
+ TQString whatsThis() const
{
return mWhatsThis;
}
@@ -173,22 +173,22 @@
/**
* Set item to @p p
*/
- virtual void setProperty(const QVariant &p) = 0;
+ virtual void setProperty(const TQVariant &p) = 0;
/**
* Return item as property
*/
- virtual QVariant property() const = 0;
+ virtual TQVariant property() const = 0;
/**
* Return minimum value of item or invalid if not specified
*/
- virtual QVariant minValue() const { return QVariant(); }
+ virtual TQVariant minValue() const { return TQVariant(); }
/**
* Return maximum value of item or invalid if not specified
*/
- virtual QVariant maxValue() const { return QVariant(); }
+ virtual TQVariant maxValue() const { return TQVariant(); }
/**
Sets the current value to the default value.
@@ -216,22 +216,22 @@
*/
void readImmutability(KConfig *config);
- QString mGroup;
- QString mKey;
- QString mName;
+ TQString mGroup;
+ TQString mKey;
+ TQString mName;
private:
bool mIsImmutable;
- QString mLabel;
- QString mWhatsThis;
+ TQString mLabel;
+ TQString mWhatsThis;
};
template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonItem
{
public:
- KConfigSkeletonGenericItem(const QString & group, const QString & key, T & reference,
+ KConfigSkeletonGenericItem(const TQString & group, const TQString & key, T & reference,
T defaultValue)
: KConfigSkeletonItem(group, key), mReference(reference),
mDefault(defaultValue), mLoadedValue(defaultValue)
@@ -330,15 +330,15 @@ template < typename T > class KConfigSkeletonGenericItem:public KConfigSkeletonI
* {
* setCurrentGroup("MyGroup");
* addItemBool("MySetting1",mMyBool,false);
- * addItemColor("MySetting2",mMyColor,QColor(1,2,3));
+ * addItemColor("MySetting2",mMyColor,TQColor(1,2,3));
*
* setCurrentGroup("MyOtherGroup");
- * addItemFont("MySetting3",mMyFont,QFont("helvetica",12));
+ * addItemFont("MySetting3",mMyFont,TQFont("helvetica",12));
* }
*
* bool mMyBool;
- * QColor mMyColor;
- * QFont mMyFont;
+ * TQColor mMyColor;
+ * TQFont mMyFont;
* }
* \endcode
*
@@ -369,20 +369,20 @@ public:
/**
* Class for handling a string preferences item.
*/
- class KDECORE_EXPORT ItemString:public KConfigSkeletonGenericItem < QString >
+ class KDECORE_EXPORT ItemString:public KConfigSkeletonGenericItem < TQString >
{
public:
enum Type { Normal, Password, Path };
- ItemString(const QString & group, const QString & key,
- QString & reference,
- const QString & defaultValue = QString::fromLatin1(""), // NOT QString::null !!
+ ItemString(const TQString & group, const TQString & key,
+ TQString & reference,
+ const TQString & defaultValue = TQString::fromLatin1(""), // NOT TQString::null !!
Type type = Normal);
void writeConfig(KConfig * config);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
private:
Type mType;
@@ -394,9 +394,9 @@ public:
class KDECORE_EXPORT ItemPassword:public ItemString
{
public:
- ItemPassword(const QString & group, const QString & key,
- QString & reference,
- const QString & defaultValue = QString::fromLatin1("")); // NOT QString::null !!
+ ItemPassword(const TQString & group, const TQString & key,
+ TQString & reference,
+ const TQString & defaultValue = TQString::fromLatin1("")); // NOT TQString::null !!
};
/**
@@ -405,24 +405,24 @@ public:
class KDECORE_EXPORT ItemPath:public ItemString
{
public:
- ItemPath(const QString & group, const QString & key,
- QString & reference,
- const QString & defaultValue = QString::null);
+ ItemPath(const TQString & group, const TQString & key,
+ TQString & reference,
+ const TQString & defaultValue = TQString::null);
};
/**
- * Class for handling a QVariant preferences item.
+ * Class for handling a TQVariant preferences item.
*/
- class KDECORE_EXPORT ItemProperty:public KConfigSkeletonGenericItem < QVariant >
+ class KDECORE_EXPORT ItemProperty:public KConfigSkeletonGenericItem < TQVariant >
{
public:
- ItemProperty(const QString & group, const QString & key,
- QVariant & reference, QVariant defaultValue = 0);
+ ItemProperty(const TQString & group, const TQString & key,
+ TQVariant & reference, TQVariant defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
@@ -432,12 +432,12 @@ public:
class KDECORE_EXPORT ItemBool:public KConfigSkeletonGenericItem < bool >
{
public:
- ItemBool(const QString & group, const QString & key, bool & reference,
+ ItemBool(const TQString & group, const TQString & key, bool & reference,
bool defaultValue = true);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
@@ -447,14 +447,14 @@ public:
class KDECORE_EXPORT ItemInt:public KConfigSkeletonGenericItem < int >
{
public:
- ItemInt(const QString & group, const QString & key, int &reference,
+ ItemInt(const TQString & group, const TQString & key, int &reference,
int defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(int);
void setMaxValue(int);
@@ -472,15 +472,15 @@ public:
class KDECORE_EXPORT ItemInt64:public KConfigSkeletonGenericItem < Q_INT64 >
{
public:
- ItemInt64(const QString & group, const QString & key, Q_INT64 &reference,
+ ItemInt64(const TQString & group, const TQString & key, Q_INT64 &reference,
Q_INT64 defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(Q_INT64);
void setMaxValue(Q_INT64);
@@ -500,21 +500,21 @@ public:
public:
struct Choice
{
- QString name;
- QString label;
- QString whatsThis;
+ TQString name;
+ TQString label;
+ TQString whatsThis;
};
- ItemEnum(const QString & group, const QString & key, int &reference,
- const QValueList<Choice> &choices, int defaultValue = 0);
+ ItemEnum(const TQString & group, const TQString & key, int &reference,
+ const TQValueList<Choice> &choices, int defaultValue = 0);
- QValueList<Choice> choices() const;
+ TQValueList<Choice> choices() const;
void readConfig(KConfig * config);
void writeConfig(KConfig * config);
private:
- QValueList<Choice> mChoices;
+ TQValueList<Choice> mChoices;
};
@@ -524,14 +524,14 @@ public:
class KDECORE_EXPORT ItemUInt:public KConfigSkeletonGenericItem < unsigned int >
{
public:
- ItemUInt(const QString & group, const QString & key,
+ ItemUInt(const TQString & group, const TQString & key,
unsigned int &reference, unsigned int defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(unsigned int);
void setMaxValue(unsigned int);
@@ -550,14 +550,14 @@ public:
class KDECORE_EXPORT ItemLong:public KConfigSkeletonGenericItem < long >
{
public:
- ItemLong(const QString & group, const QString & key, long &reference,
+ ItemLong(const TQString & group, const TQString & key, long &reference,
long defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(long);
void setMaxValue(long);
@@ -576,14 +576,14 @@ public:
class KDECORE_EXPORT ItemULong:public KConfigSkeletonGenericItem < unsigned long >
{
public:
- ItemULong(const QString & group, const QString & key,
+ ItemULong(const TQString & group, const TQString & key,
unsigned long &reference, unsigned long defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(unsigned long);
void setMaxValue(unsigned long);
@@ -601,15 +601,15 @@ public:
class KDECORE_EXPORT ItemUInt64:public KConfigSkeletonGenericItem < Q_UINT64 >
{
public:
- ItemUInt64(const QString & group, const QString & key, Q_UINT64 &reference,
+ ItemUInt64(const TQString & group, const TQString & key, Q_UINT64 &reference,
Q_UINT64 defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(Q_UINT64);
void setMaxValue(Q_UINT64);
@@ -627,14 +627,14 @@ public:
class KDECORE_EXPORT ItemDouble:public KConfigSkeletonGenericItem < double >
{
public:
- ItemDouble(const QString & group, const QString & key,
+ ItemDouble(const TQString & group, const TQString & key,
double &reference, double defaultValue = 0);
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
- QVariant minValue() const;
- QVariant maxValue() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
+ TQVariant minValue() const;
+ TQVariant maxValue() const;
void setMinValue(double);
void setMaxValue(double);
@@ -650,108 +650,108 @@ public:
/**
* Class for handling a color preferences item.
*/
- class KDECORE_EXPORT ItemColor:public KConfigSkeletonGenericItem < QColor >
+ class KDECORE_EXPORT ItemColor:public KConfigSkeletonGenericItem < TQColor >
{
public:
- ItemColor(const QString & group, const QString & key,
- QColor & reference,
- const QColor & defaultValue = QColor(128, 128, 128));
+ ItemColor(const TQString & group, const TQString & key,
+ TQColor & reference,
+ const TQColor & defaultValue = TQColor(128, 128, 128));
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
* Class for handling a font preferences item.
*/
- class KDECORE_EXPORT ItemFont:public KConfigSkeletonGenericItem < QFont >
+ class KDECORE_EXPORT ItemFont:public KConfigSkeletonGenericItem < TQFont >
{
public:
- ItemFont(const QString & group, const QString & key, QFont & reference,
- const QFont & defaultValue = KGlobalSettings::generalFont());
+ ItemFont(const TQString & group, const TQString & key, TQFont & reference,
+ const TQFont & defaultValue = KGlobalSettings::generalFont());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
- * Class for handling a QRect preferences item.
+ * Class for handling a TQRect preferences item.
*/
- class KDECORE_EXPORT ItemRect:public KConfigSkeletonGenericItem < QRect >
+ class KDECORE_EXPORT ItemRect:public KConfigSkeletonGenericItem < TQRect >
{
public:
- ItemRect(const QString & group, const QString & key, QRect & reference,
- const QRect & defaultValue = QRect());
+ ItemRect(const TQString & group, const TQString & key, TQRect & reference,
+ const TQRect & defaultValue = TQRect());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
- * Class for handling a QPoint preferences item.
+ * Class for handling a TQPoint preferences item.
*/
- class KDECORE_EXPORT ItemPoint:public KConfigSkeletonGenericItem < QPoint >
+ class KDECORE_EXPORT ItemPoint:public KConfigSkeletonGenericItem < TQPoint >
{
public:
- ItemPoint(const QString & group, const QString & key, QPoint & reference,
- const QPoint & defaultValue = QPoint());
+ ItemPoint(const TQString & group, const TQString & key, TQPoint & reference,
+ const TQPoint & defaultValue = TQPoint());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
- * Class for handling a QSize preferences item.
+ * Class for handling a TQSize preferences item.
*/
- class KDECORE_EXPORT ItemSize:public KConfigSkeletonGenericItem < QSize >
+ class KDECORE_EXPORT ItemSize:public KConfigSkeletonGenericItem < TQSize >
{
public:
- ItemSize(const QString & group, const QString & key, QSize & reference,
- const QSize & defaultValue = QSize());
+ ItemSize(const TQString & group, const TQString & key, TQSize & reference,
+ const TQSize & defaultValue = TQSize());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
- * Class for handling a QDateTime preferences item.
+ * Class for handling a TQDateTime preferences item.
*/
- class KDECORE_EXPORT ItemDateTime:public KConfigSkeletonGenericItem < QDateTime >
+ class KDECORE_EXPORT ItemDateTime:public KConfigSkeletonGenericItem < TQDateTime >
{
public:
- ItemDateTime(const QString & group, const QString & key,
- QDateTime & reference,
- const QDateTime & defaultValue = QDateTime());
+ ItemDateTime(const TQString & group, const TQString & key,
+ TQDateTime & reference,
+ const TQDateTime & defaultValue = TQDateTime());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
/**
* Class for handling a string list preferences item.
*/
- class KDECORE_EXPORT ItemStringList:public KConfigSkeletonGenericItem < QStringList >
+ class KDECORE_EXPORT ItemStringList:public KConfigSkeletonGenericItem < TQStringList >
{
public:
- ItemStringList(const QString & group, const QString & key,
- QStringList & reference,
- const QStringList & defaultValue = QStringList());
+ ItemStringList(const TQString & group, const TQString & key,
+ TQStringList & reference,
+ const TQStringList & defaultValue = TQStringList());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
@@ -761,9 +761,9 @@ public:
class KDECORE_EXPORT ItemPathList:public ItemStringList
{
public:
- ItemPathList(const QString & group, const QString & key,
- QStringList & reference,
- const QStringList & defaultValue = QStringList());
+ ItemPathList(const TQString & group, const TQString & key,
+ TQStringList & reference,
+ const TQStringList & defaultValue = TQStringList());
void readConfig(KConfig * config);
void writeConfig(KConfig * config);
@@ -773,16 +773,16 @@ public:
/**
* Class for handling an integer list preferences item.
*/
- class KDECORE_EXPORT ItemIntList:public KConfigSkeletonGenericItem < QValueList < int > >
+ class KDECORE_EXPORT ItemIntList:public KConfigSkeletonGenericItem < TQValueList < int > >
{
public:
- ItemIntList(const QString & group, const QString & key,
- QValueList < int >&reference,
- const QValueList < int >&defaultValue = QValueList < int >());
+ ItemIntList(const TQString & group, const TQString & key,
+ TQValueList < int >&reference,
+ const TQValueList < int >&defaultValue = TQValueList < int >());
void readConfig(KConfig * config);
- void setProperty(const QVariant & p);
- QVariant property() const;
+ void setProperty(const TQVariant & p);
+ TQVariant property() const;
};
@@ -793,7 +793,7 @@ public:
* @param configname name of config file. If no name is given, the default
* config file as returned by kapp()->config() is used.
*/
- KConfigSkeleton(const QString & configname = QString::null);
+ KConfigSkeleton(const TQString & configname = TQString::null);
/**
* Constructor.
@@ -829,12 +829,12 @@ public:
* until setCurrentGroup() is called with a new argument. Call this before
* you add any items. The default value is "No Group".
*/
- void setCurrentGroup(const QString & group);
+ void setCurrentGroup(const TQString & group);
/**
* Returns the current group used for addItem() calls.
*/
- QString currentGroup() // ### KDE 4.0: make const
+ TQString currentGroup() // ### KDE 4.0: make const
{
return mCurrentGroup;
}
@@ -845,10 +845,10 @@ public:
* Note that all names must be unique but that multiple entries can have
* the same key if they reside in different groups.
*/
- void addItem(KConfigSkeletonItem *, const QString & name = QString::null );
+ void addItem(KConfigSkeletonItem *, const TQString & name = TQString::null );
/**
- * Register an item of type QString.
+ * Register an item of type TQString.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -858,12 +858,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemString *addItemString(const QString & name, QString & reference,
- const QString & defaultValue = QString::fromLatin1(""), // NOT QString::null !!
- const QString & key = QString::null);
+ ItemString *addItemString(const TQString & name, TQString & reference,
+ const TQString & defaultValue = TQString::fromLatin1(""), // NOT TQString::null !!
+ const TQString & key = TQString::null);
/**
- * Register a password item of type QString. The string value is written
+ * Register a password item of type TQString. The string value is written
* encrypted to the config file. Note that the current encryption scheme
* is very weak.
*
@@ -875,12 +875,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemPassword *addItemPassword(const QString & name, QString & reference,
- const QString & defaultValue = QString::fromLatin1(""),
- const QString & key = QString::null);
+ ItemPassword *addItemPassword(const TQString & name, TQString & reference,
+ const TQString & defaultValue = TQString::fromLatin1(""),
+ const TQString & key = TQString::null);
/**
- * Register a path item of type QString. The string value is interpreted
+ * Register a path item of type TQString. The string value is interpreted
* as a path. This means, dollar expension is activated for this value, so
* that e.g. $HOME gets expanded.
*
@@ -892,13 +892,13 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemPath *addItemPath(const QString & name, QString & reference,
- const QString & defaultValue = QString::fromLatin1(""),
- const QString & key = QString::null);
+ ItemPath *addItemPath(const TQString & name, TQString & reference,
+ const TQString & defaultValue = TQString::fromLatin1(""),
+ const TQString & key = TQString::null);
/**
- * Register a property item of type QVariant. Note that only the following
- * QVariant types are allowed: String, StringList, Font, Point, Rect, Size,
+ * Register a property item of type TQVariant. Note that only the following
+ * TQVariant types are allowed: String, StringList, Font, Point, Rect, Size,
* Color, Int, UInt, Bool, Double, DateTime and Date.
*
* @param name Name used to indentify this setting. Names must be unique.
@@ -909,9 +909,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemProperty *addItemProperty(const QString & name, QVariant & reference,
- const QVariant & defaultValue = QVariant(),
- const QString & key = QString::null);
+ ItemProperty *addItemProperty(const TQString & name, TQVariant & reference,
+ const TQVariant & defaultValue = TQVariant(),
+ const TQString & key = TQString::null);
/**
* Register an item of type bool.
*
@@ -923,9 +923,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemBool *addItemBool(const QString & name, bool & reference,
+ ItemBool *addItemBool(const TQString & name, bool & reference,
bool defaultValue = false,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type int.
@@ -938,8 +938,8 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemInt *addItemInt(const QString & name, int &reference, int defaultValue = 0,
- const QString & key = QString::null);
+ ItemInt *addItemInt(const TQString & name, int &reference, int defaultValue = 0,
+ const TQString & key = TQString::null);
/**
* Register an item of type unsigned int.
@@ -952,9 +952,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemUInt *addItemUInt(const QString & name, unsigned int &reference,
+ ItemUInt *addItemUInt(const TQString & name, unsigned int &reference,
unsigned int defaultValue = 0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type long.
@@ -967,9 +967,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemLong *addItemLong(const QString & name, long &reference,
+ ItemLong *addItemLong(const TQString & name, long &reference,
long defaultValue = 0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type unsigned long.
@@ -982,9 +982,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemULong *addItemULong(const QString & name, unsigned long &reference,
+ ItemULong *addItemULong(const TQString & name, unsigned long &reference,
unsigned long defaultValue = 0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type Q_INT64.
@@ -997,9 +997,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemInt64 *addItemInt64(const QString & name, Q_INT64 &reference,
+ ItemInt64 *addItemInt64(const TQString & name, Q_INT64 &reference,
Q_INT64 defaultValue = 0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type Q_UINT64
@@ -1012,9 +1012,9 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemUInt64 *addItemUInt64(const QString & name, Q_UINT64 &reference,
+ ItemUInt64 *addItemUInt64(const TQString & name, Q_UINT64 &reference,
Q_UINT64 defaultValue = 0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
* Register an item of type double.
@@ -1027,12 +1027,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemDouble *addItemDouble(const QString & name, double &reference,
+ ItemDouble *addItemDouble(const TQString & name, double &reference,
double defaultValue = 0.0,
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
- * Register an item of type QColor.
+ * Register an item of type TQColor.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1042,12 +1042,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemColor *addItemColor(const QString & name, QColor & reference,
- const QColor & defaultValue = QColor(128, 128, 128),
- const QString & key = QString::null);
+ ItemColor *addItemColor(const TQString & name, TQColor & reference,
+ const TQColor & defaultValue = TQColor(128, 128, 128),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QFont.
+ * Register an item of type TQFont.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1057,13 +1057,13 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemFont *addItemFont(const QString & name, QFont & reference,
- const QFont & defaultValue =
+ ItemFont *addItemFont(const TQString & name, TQFont & reference,
+ const TQFont & defaultValue =
KGlobalSettings::generalFont(),
- const QString & key = QString::null);
+ const TQString & key = TQString::null);
/**
- * Register an item of type QRect.
+ * Register an item of type TQRect.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1073,12 +1073,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemRect *addItemRect(const QString & name, QRect & reference,
- const QRect & defaultValue = QRect(),
- const QString & key = QString::null);
+ ItemRect *addItemRect(const TQString & name, TQRect & reference,
+ const TQRect & defaultValue = TQRect(),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QPoint.
+ * Register an item of type TQPoint.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1088,12 +1088,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemPoint *addItemPoint(const QString & name, QPoint & reference,
- const QPoint & defaultValue = QPoint(),
- const QString & key = QString::null);
+ ItemPoint *addItemPoint(const TQString & name, TQPoint & reference,
+ const TQPoint & defaultValue = TQPoint(),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QSize.
+ * Register an item of type TQSize.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1103,12 +1103,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemSize *addItemSize(const QString & name, QSize & reference,
- const QSize & defaultValue = QSize(),
- const QString & key = QString::null);
+ ItemSize *addItemSize(const TQString & name, TQSize & reference,
+ const TQSize & defaultValue = TQSize(),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QDateTime.
+ * Register an item of type TQDateTime.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1118,12 +1118,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemDateTime *addItemDateTime(const QString & name, QDateTime & reference,
- const QDateTime & defaultValue = QDateTime(),
- const QString & key = QString::null);
+ ItemDateTime *addItemDateTime(const TQString & name, TQDateTime & reference,
+ const TQDateTime & defaultValue = TQDateTime(),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QStringList.
+ * Register an item of type TQStringList.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1133,12 +1133,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemStringList *addItemStringList(const QString & name, QStringList & reference,
- const QStringList & defaultValue = QStringList(),
- const QString & key = QString::null);
+ ItemStringList *addItemStringList(const TQString & name, TQStringList & reference,
+ const TQStringList & defaultValue = TQStringList(),
+ const TQString & key = TQString::null);
/**
- * Register an item of type QValueList<int>.
+ * Register an item of type TQValueList<int>.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1148,10 +1148,10 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemIntList *addItemIntList(const QString & name, QValueList < int >&reference,
- const QValueList < int >&defaultValue =
- QValueList < int >(),
- const QString & key = QString::null);
+ ItemIntList *addItemIntList(const TQString & name, TQValueList < int >&reference,
+ const TQValueList < int >&defaultValue =
+ TQValueList < int >(),
+ const TQString & key = TQString::null);
/**
* Return the @ref KConfig object used for reading and writing the settings.
@@ -1169,12 +1169,12 @@ public:
/**
* Return whether a certain item is immutable
*/
- bool isImmutable(const QString & name);
+ bool isImmutable(const TQString & name);
/**
* Lookup item by name
*/
- KConfigSkeletonItem * findItem(const QString & name);
+ KConfigSkeletonItem * findItem(const TQString & name);
/**
* Indicate whether this object should reflect the actual
@@ -1213,7 +1213,7 @@ protected:
}
private:
- QString mCurrentGroup;
+ TQString mCurrentGroup;
KSharedConfig::Ptr mConfig; // pointer to KConfig object
diff --git a/kdecore/kcrash.cpp b/kdecore/kcrash.cpp
index 8fb8ed308..2a908670b 100644
--- a/kdecore/kcrash.cpp
+++ b/kdecore/kcrash.cpp
@@ -43,7 +43,7 @@
#include <sys/socket.h>
#include <errno.h>
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
#include <kglobal.h>
#include <kinstance.h>
#include <kaboutdata.h>
@@ -349,9 +349,9 @@ static char *getDisplay()
char *colon;
char *i;
/*
- don't test for a value from qglobal.h but instead distinguish
+ don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
- on the commandline (which in qglobal.h however triggers Q_WS_QWS,
+ on the commandline (which in tqglobal.h however triggers Q_WS_QWS,
but we don't want to include that here) (Simon)
#ifdef Q_WS_X11
*/
diff --git a/kdecore/kcrash.h b/kdecore/kcrash.h
index a2fe969ea..31a802f3d 100644
--- a/kdecore/kcrash.h
+++ b/kdecore/kcrash.h
@@ -22,7 +22,7 @@
#ifndef __KCRASH_H
#define __KCRASH_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
/**
@@ -97,16 +97,16 @@ class KDECORE_EXPORT KCrash
* Dr. Konqi, our nice crash display application.
* @param path the application path.
*/
- static void setApplicationPath (QString path) { appPath = qstrdup(path.local8Bit().data()); }
- /* KDE 4: Make it const QString & */
+ static void setApplicationPath (TQString path) { appPath = qstrdup(path.local8Bit().data()); }
+ /* KDE 4: Make it const TQString & */
/**
* Sets the application name @p name which should be passed to
* Dr. Konqi, our nice crash display application.
* @param name the name of the application, as shown in Dr. Konqi
*/
- static void setApplicationName (QString name) { appName = qstrdup(name.local8Bit().data()); }
- /* KDE 4: Make it const QString & */
+ static void setApplicationName (TQString name) { appName = qstrdup(name.local8Bit().data()); }
+ /* KDE 4: Make it const TQString & */
protected:
/**
diff --git a/kdecore/kdcoppropertyproxy.cpp b/kdecore/kdcoppropertyproxy.cpp
index e9c024fa0..bc720736f 100644
--- a/kdecore/kdcoppropertyproxy.cpp
+++ b/kdecore/kdcoppropertyproxy.cpp
@@ -19,18 +19,18 @@
#include "kdcoppropertyproxy.h"
-#include <qstrlist.h>
-#include <qmetaobject.h>
-#include <qvariant.h>
-#include <qcursor.h>
-#include <qbitmap.h>
-#include <qregion.h>
-#include <qpointarray.h>
-#include <qiconset.h>
-#include <qfont.h>
-#include <qimage.h>
-#include <qbrush.h>
-#include <qpalette.h>
+#include <tqstrlist.h>
+#include <tqmetaobject.h>
+#include <tqvariant.h>
+#include <tqcursor.h>
+#include <tqbitmap.h>
+#include <tqregion.h>
+#include <tqpointarray.h>
+#include <tqiconset.h>
+#include <tqfont.h>
+#include <tqimage.h>
+#include <tqbrush.h>
+#include <tqpalette.h>
#include <ctype.h>
#include <assert.h>
@@ -45,10 +45,10 @@ public:
{
}
- QObject *m_object;
+ TQObject *m_object;
};
-KDCOPPropertyProxy::KDCOPPropertyProxy( QObject *object )
+KDCOPPropertyProxy::KDCOPPropertyProxy( TQObject *object )
{
d = new KDCOPPropertyProxyPrivate;
d->m_object = object;
@@ -59,51 +59,51 @@ KDCOPPropertyProxy::~KDCOPPropertyProxy()
delete d;
}
-bool KDCOPPropertyProxy::isPropertyRequest( const QCString &fun )
+bool KDCOPPropertyProxy::isPropertyRequest( const TQCString &fun )
{
return isPropertyRequest( fun, d->m_object );
}
-bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData )
+bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData )
{
return processPropertyRequest( fun, data, replyType, replyData, d->m_object );
}
-QValueList<QCString> KDCOPPropertyProxy::functions()
+TQValueList<TQCString> KDCOPPropertyProxy::functions()
{
return functions( d->m_object );
}
-bool KDCOPPropertyProxy::isPropertyRequest( const QCString &fun, QObject *object )
+bool KDCOPPropertyProxy::isPropertyRequest( const TQCString &fun, TQObject *object )
{
- if ( fun == "property(QCString)" ||
- fun == "setProperty(QCString,QVariant)" ||
+ if ( fun == "property(TQCString)" ||
+ fun == "setProperty(TQCString,TQVariant)" ||
fun == "propertyNames(bool)" )
return true;
bool set;
- QCString propName, arg;
+ TQCString propName, arg;
return decodePropertyRequestInternal( fun, object, set, propName, arg );
}
-QValueList<QCString> KDCOPPropertyProxy::functions( QObject *object )
+TQValueList<TQCString> KDCOPPropertyProxy::functions( TQObject *object )
{
- QValueList<QCString> res;
- res << "QVariant property(QCString property)";
- res << "bool setProperty(QCString name,QVariant property)";
- res << "QValueList<QCString> propertyNames(bool super)";
-
- QMetaObject *metaObj = object->metaObject();
- QStrList properties = metaObj->propertyNames( true );
- QStrListIterator it( properties );
+ TQValueList<TQCString> res;
+ res << "TQVariant property(TQCString property)";
+ res << "bool setProperty(TQCString name,TQVariant property)";
+ res << "TQValueList<TQCString> propertyNames(bool super)";
+
+ TQMetaObject *metaObj = object->metaObject();
+ TQStrList properties = metaObj->propertyNames( true );
+ TQStrListIterator it( properties );
for (; it.current(); ++it )
{
- const QMetaProperty *metaProp = metaObj->property( metaObj->findProperty( it.current(), true ), true );
+ const TQMetaProperty *metaProp = metaObj->property( metaObj->findProperty( it.current(), true ), true );
assert( metaProp );
- QCString name = it.current();
+ TQCString name = it.current();
name.prepend( " " );
name.prepend( metaProp->type() );
name.append( "()" );
@@ -111,7 +111,7 @@ QValueList<QCString> KDCOPPropertyProxy::functions( QObject *object )
if ( metaProp->writable() )
{
- QCString setName = it.current();
+ TQCString setName = it.current();
setName[ 0 ] = toupper( setName[ 0 ] );
setName = "void set" + setName + "(" + metaProp->type() + " " + it.current() + ")";
res << setName;
@@ -121,31 +121,31 @@ QValueList<QCString> KDCOPPropertyProxy::functions( QObject *object )
return res;
}
-bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData,
- QObject *object )
+bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData,
+ TQObject *object )
{
- if ( fun == "property(QCString)" )
+ if ( fun == "property(TQCString)" )
{
- QCString propName;
- QDataStream stream( data, IO_ReadOnly );
+ TQCString propName;
+ TQDataStream stream( data, IO_ReadOnly );
stream >> propName;
- replyType = "QVariant";
- QDataStream reply( replyData, IO_WriteOnly );
+ replyType = "TQVariant";
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << object->property( propName );
return true;
}
- if ( fun == "setProperty(QCString,QVariant)" )
+ if ( fun == "setProperty(TQCString,TQVariant)" )
{
- QCString propName;
- QVariant propValue;
- QDataStream stream( data, IO_ReadOnly );
+ TQCString propName;
+ TQVariant propValue;
+ TQDataStream stream( data, IO_ReadOnly );
stream >> propName >> propValue;
replyType = "bool";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8)object->setProperty( propName, propValue );
return true;
}
@@ -153,23 +153,23 @@ bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByt
if ( fun == "propertyNames(bool)" )
{
Q_INT8 b;
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
stream >> b;
- QValueList<QCString> res;
- QStrList props = object->metaObject()->propertyNames( static_cast<bool>( b ) );
- QStrListIterator it( props );
+ TQValueList<TQCString> res;
+ TQStrList props = object->metaObject()->propertyNames( static_cast<bool>( b ) );
+ TQStrListIterator it( props );
for (; it.current(); ++it )
res.append( it.current() );
- replyType = "QValueList<QCString>";
- QDataStream reply( replyData, IO_WriteOnly );
+ replyType = "TQValueList<TQCString>";
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << res;
return true;
}
bool set;
- QCString propName, arg;
+ TQCString propName, arg;
bool res = decodePropertyRequestInternal( fun, object, set, propName, arg );
if ( !res )
@@ -177,60 +177,60 @@ bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByt
if ( set )
{
- QVariant prop;
- QDataStream stream( data, IO_ReadOnly );
+ TQVariant prop;
+ TQDataStream stream( data, IO_ReadOnly );
- QVariant::Type type = QVariant::nameToType( arg );
- if ( type == QVariant::Invalid )
+ TQVariant::Type type = TQVariant::nameToType( arg );
+ if ( type == TQVariant::Invalid )
return false;
#define DEMARSHAL( type, val ) \
- case QVariant::type: \
+ case TQVariant::type: \
{ \
val v; \
stream >> v; \
- prop = QVariant( v ); \
+ prop = TQVariant( v ); \
} \
break;
- typedef QValueList<QVariant> ListType;
- typedef QMap<QString,QVariant> MapType;
+ typedef TQValueList<TQVariant> ListType;
+ typedef TQMap<TQString,TQVariant> MapType;
switch ( type )
{
- DEMARSHAL( Cursor, QCursor )
- DEMARSHAL( Bitmap, QBitmap )
- DEMARSHAL( PointArray, QPointArray )
- DEMARSHAL( Region, QRegion )
+ DEMARSHAL( Cursor, TQCursor )
+ DEMARSHAL( Bitmap, TQBitmap )
+ DEMARSHAL( PointArray, TQPointArray )
+ DEMARSHAL( Region, TQRegion )
DEMARSHAL( List, ListType )
DEMARSHAL( Map, MapType )
- DEMARSHAL( String, QString )
- DEMARSHAL( CString, QCString )
- DEMARSHAL( StringList, QStringList )
- DEMARSHAL( Font, QFont )
- DEMARSHAL( Pixmap, QPixmap )
- DEMARSHAL( Image, QImage )
- DEMARSHAL( Brush, QBrush )
- DEMARSHAL( Point, QPoint )
- DEMARSHAL( Rect, QRect )
- DEMARSHAL( Size, QSize )
- DEMARSHAL( Color, QColor )
- DEMARSHAL( Palette, QPalette )
- DEMARSHAL( ColorGroup, QColorGroup )
- case QVariant::IconSet:
+ DEMARSHAL( String, TQString )
+ DEMARSHAL( CString, TQCString )
+ DEMARSHAL( StringList, TQStringList )
+ DEMARSHAL( Font, TQFont )
+ DEMARSHAL( Pixmap, TQPixmap )
+ DEMARSHAL( Image, TQImage )
+ DEMARSHAL( Brush, TQBrush )
+ DEMARSHAL( Point, TQPoint )
+ DEMARSHAL( Rect, TQRect )
+ DEMARSHAL( Size, TQSize )
+ DEMARSHAL( Color, TQColor )
+ DEMARSHAL( Palette, TQPalette )
+ DEMARSHAL( ColorGroup, TQColorGroup )
+ case TQVariant::IconSet:
{
- QPixmap val;
+ TQPixmap val;
stream >> val;
- prop = QVariant( QIconSet( val ) );
+ prop = TQVariant( TQIconSet( val ) );
}
break;
DEMARSHAL( Int, int )
DEMARSHAL( UInt, uint )
- case QVariant::Bool:
+ case TQVariant::Bool:
{
Q_INT8 v;
stream >> v;
- prop = QVariant( static_cast<bool>( v ), 1 );
+ prop = TQVariant( static_cast<bool>( v ), 1 );
}
break;
DEMARSHAL( Double, double )
@@ -243,16 +243,16 @@ bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByt
}
else
{
- QVariant prop = object->property( propName );
+ TQVariant prop = object->property( propName );
- if ( prop.type() == QVariant::Invalid )
+ if ( prop.type() == TQVariant::Invalid )
return false;
replyType = prop.typeName();
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
#define MARSHAL( type ) \
- case QVariant::type: \
+ case TQVariant::type: \
reply << prop.to##type(); \
break;
@@ -277,12 +277,12 @@ bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByt
MARSHAL( Color )
MARSHAL( Palette )
MARSHAL( ColorGroup )
- case QVariant::IconSet:
+ case TQVariant::IconSet:
reply << prop.toIconSet().pixmap();
break;
MARSHAL( Int )
MARSHAL( UInt )
- case QVariant::Bool:
+ case TQVariant::Bool:
reply << (Q_INT8)prop.toBool();
break;
MARSHAL( Double )
@@ -299,8 +299,8 @@ bool KDCOPPropertyProxy::processPropertyRequest( const QCString &fun, const QByt
return false;
}
-bool KDCOPPropertyProxy::decodePropertyRequestInternal( const QCString &fun, QObject *object, bool &set,
- QCString &propName, QCString &arg )
+bool KDCOPPropertyProxy::decodePropertyRequestInternal( const TQCString &fun, TQObject *object, bool &set,
+ TQCString &propName, TQCString &arg )
{
if ( fun.length() < 3 )
return false;
diff --git a/kdecore/kdcoppropertyproxy.h b/kdecore/kdcoppropertyproxy.h
index 97b5f6f73..9bc7736e3 100644
--- a/kdecore/kdcoppropertyproxy.h
+++ b/kdecore/kdcoppropertyproxy.h
@@ -19,21 +19,21 @@
#ifndef __kdcoppropertyproxy_h__
#define __kdcoppropertyproxy_h__
-#include <qobject.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
class KDCOPPropertyProxyPrivate;
/**
* The KDCOPPropertyProxy class provides an easy way to publish Qt properties of a
- * QObject through DCOP.
+ * TQObject through DCOP.
*
* The class provides DCOP equivalents for the Qt property methods setProperty() ,
* property() and propertyNames() and also provides automatic set/get methods for
- * the properties of a QObject. That means for example if your object provides a
- * QString property called foo , then KDCOPPropertyProxy translates DCOP calls
- * "setFoo( QString )" and "QString foo()" automatically into the corresponding
+ * the properties of a TQObject. That means for example if your object provides a
+ * TQString property called foo , then KDCOPPropertyProxy translates DCOP calls
+ * "setFoo( TQString )" and "TQString foo()" automatically into the corresponding
* setProperty/property calls.
*/
class KDECORE_EXPORT KDCOPPropertyProxy
@@ -41,10 +41,10 @@ class KDECORE_EXPORT KDCOPPropertyProxy
public:
/**
* Convenience constructor. Use it if you want to use this class as object, in contrary
- * to using the static methods of this class and providing a QObject argument for each
+ * to using the static methods of this class and providing a TQObject argument for each
* call.
*/
- KDCOPPropertyProxy( QObject *object );
+ KDCOPPropertyProxy( TQObject *object );
/**
* Destructor.
*/
@@ -54,31 +54,31 @@ public:
* Convenience method, when using this class as object. See documentation of the constructor and
* static isPropertyRequest method.
*/
- bool isPropertyRequest( const QCString &fun );
+ bool isPropertyRequest( const TQCString &fun );
/**
* Convenience method, when using this class as object. See documentation of the constructor and
* static processPropertyRequest method.
*/
- bool processPropertyRequest( const QCString &fun, const QByteArray &data, QCString &replyType,
- QByteArray &replyData );
+ bool processPropertyRequest( const TQCString &fun, const TQByteArray &data, TQCString &replyType,
+ TQByteArray &replyData );
/**
* Convenience method, when using this class as object. See documentation of the constructor and
* static functions method.
*/
- QValueList<QCString> functions();
+ TQValueList<TQCString> functions();
/**
* Returns a semicolon-separated list of functions understood by the PropertyProxy for the given
- * QObject argument.
+ * TQObject argument.
*
- * Returns "property(QCString);setProperty(QCString,QVariant);propertyNames();" plus set/get
+ * Returns "property(TQCString);setProperty(TQCString,TQVariant);propertyNames();" plus set/get
* methods for the properties of the given object argument.
*
* @see DCOPObject::functions()
*/
- static QValueList<QCString> functions( QObject *object );
+ static TQValueList<TQCString> functions( TQObject *object );
/**
* Returns true if the method request in the fun argument matches the signature of the three standard
@@ -87,18 +87,18 @@ public:
* Use this method in your own DCOPObject dispatcher to check if the DCOP request is a property
* request which can be handled by this class.
*/
- static bool isPropertyRequest( const QCString &fun, QObject *object );
+ static bool isPropertyRequest( const TQCString &fun, TQObject *object );
/**
* Processes the given DCOP method request by translating the request into a setProperty/property call
- * on the given QObject argument.
+ * on the given TQObject argument.
*/
- static bool processPropertyRequest( const QCString &fun, const QByteArray &data, QCString &replyType,
- QByteArray &replyData, QObject *object );
+ static bool processPropertyRequest( const TQCString &fun, const TQByteArray &data, TQCString &replyType,
+ TQByteArray &replyData, TQObject *object );
private:
- static bool decodePropertyRequestInternal( const QCString &fun, QObject *object, bool &set,
- QCString &propName, QCString &arg );
+ static bool decodePropertyRequestInternal( const TQCString &fun, TQObject *object, bool &set,
+ TQCString &propName, TQCString &arg );
KDCOPPropertyProxyPrivate *d;
};
diff --git a/kdecore/kde-config.cpp.in b/kdecore/kde-config.cpp.in
index 2a9b66bdf..da9d41782 100644
--- a/kdecore/kde-config.cpp.in
+++ b/kdecore/kde-config.cpp.in
@@ -30,9 +30,9 @@ static KCmdLineOptions options[] =
bool _expandvars = false;
-QString expandvars(const char *_input)
+TQString expandvars(const char *_input)
{
- QString result = QString::fromLatin1(_input);
+ TQString result = TQString::fromLatin1(_input);
if (!_expandvars)
return result;
@@ -103,7 +103,7 @@ QString expandvars(const char *_input)
return result;
}
-void printResult(const QString &s)
+void printResult(const TQString &s)
{
if (s.isEmpty())
printf("\n");
@@ -142,7 +142,7 @@ int main(int argc, char **argv)
if (args->isSet("libsuffix"))
{
- QString tmp(KDELIBSUFF);
+ TQString tmp(KDELIBSUFF);
tmp.remove('"');
printResult(expandvars(tmp.local8Bit()));
return 0;
@@ -162,7 +162,7 @@ int main(int argc, char **argv)
if (args->isSet("types"))
{
- QStringList types = KGlobal::dirs()->allTypes();
+ TQStringList types = KGlobal::dirs()->allTypes();
types.sort();
const char *helptexts[] = {
"apps", I18N_NOOP("Applications menu (.desktop files)"),
@@ -191,7 +191,7 @@ int main(int argc, char **argv)
"socket", I18N_NOOP("UNIX Sockets (specific for both current host and current user)"),
0, 0
};
- for (QStringList::ConstIterator it = types.begin(); it != types.end(); ++it)
+ for (TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it)
{
int index = 0;
while (helptexts[index] && *it != helptexts[index]) {
@@ -206,7 +206,7 @@ int main(int argc, char **argv)
return 0;
}
- QString type = args->getOption("path");
+ TQString type = args->getOption("path");
if (!type.isEmpty())
{
printResult(KGlobal::dirs()->resourceDirs(type.latin1()).join(":"));
diff --git a/kdecore/kdebug.cpp b/kdecore/kdebug.cpp
index 4c9c7cf14..38e45daf6 100644
--- a/kdecore/kdebug.cpp
+++ b/kdecore/kdebug.cpp
@@ -32,19 +32,19 @@
#include "kinstance.h"
#include "kstandarddirs.h"
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qintdict.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qregion.h>
-#include <qstringlist.h>
-#include <qpen.h>
-#include <qbrush.h>
-#include <qsize.h>
+#include <tqfile.h>
+#include <tqintdict.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqregion.h>
+#include <tqstringlist.h>
+#include <tqpen.h>
+#include <tqbrush.h>
+#include <tqsize.h>
#include <kurl.h>
@@ -68,19 +68,19 @@ class KDebugEntry;
class KDebugEntry
{
public:
- KDebugEntry (int n, const QCString& d) {number=n; descr=d;}
+ KDebugEntry (int n, const TQCString& d) {number=n; descr=d;}
unsigned int number;
- QCString descr;
+ TQCString descr;
};
-static QIntDict<KDebugEntry> *KDebugCache;
+static TQIntDict<KDebugEntry> *KDebugCache;
-static KStaticDeleter< QIntDict<KDebugEntry> > kdd;
+static KStaticDeleter< TQIntDict<KDebugEntry> > kdd;
-static QCString getDescrFromNum(unsigned int _num)
+static TQCString getDescrFromNum(unsigned int _num)
{
if (!KDebugCache) {
- kdd.setObject(KDebugCache, new QIntDict<KDebugEntry>( 601 ));
+ kdd.setObject(KDebugCache, new TQIntDict<KDebugEntry>( 601 ));
// Do not call this deleter from ~KApplication
KGlobal::unregisterStaticDeleter(&kdd);
KDebugCache->setAutoDelete(true);
@@ -91,21 +91,21 @@ static QCString getDescrFromNum(unsigned int _num)
return ent->descr;
if ( !KDebugCache->isEmpty() ) // areas already loaded
- return QCString();
+ return TQCString();
- QString filename(locate("config","kdebug.areas"));
+ TQString filename(locate("config","kdebug.areas"));
if (filename.isEmpty())
- return QCString();
+ return TQCString();
- QFile file(filename);
+ TQFile file(filename);
if (!file.open(IO_ReadOnly)) {
qWarning("Couldn't open %s", filename.local8Bit().data());
file.close();
- return QCString();
+ return TQCString();
}
uint lineNumber=0;
- QCString line(1024);
+ TQCString line(1024);
int len;
while (( len = file.readLine(line.data(),line.size()-1) ) > 0) {
@@ -143,7 +143,7 @@ static QCString getDescrFromNum(unsigned int _num)
if ( ent )
return ent->descr;
- return QCString();
+ return TQCString();
}
enum DebugLevels {
@@ -160,7 +160,7 @@ struct kDebugPrivate {
~kDebugPrivate() { delete config; }
- QCString aAreaName;
+ TQCString aAreaName;
unsigned int oldarea;
KConfig *config;
};
@@ -197,7 +197,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
}
if (kDebug_data->config && kDebug_data->oldarea != nArea) {
- kDebug_data->config->setGroup( QString::number(static_cast<int>(nArea)) );
+ kDebug_data->config->setGroup( TQString::number(static_cast<int>(nArea)) );
kDebug_data->oldarea = nArea;
if ( nArea > 0 && KGlobal::_instance )
kDebug_data->aAreaName = getDescrFromNum(nArea);
@@ -207,11 +207,11 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
}
int nPriority = 0;
- QString aCaption;
+ TQString aCaption;
/* Determine output */
- QString key;
+ TQString key;
switch( nLevel )
{
case KDEBUG_INFO:
@@ -241,7 +241,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
// if no output mode is specified default to no debug output
short nOutput = kDebug_data->config ? kDebug_data->config->readNumEntry(key, 4) : 4;
- // If the application doesn't have a QApplication object it can't use
+ // If the application doesn't have a TQApplication object it can't use
// a messagebox.
if (!kapp && (nOutput == 1))
nOutput = 2;
@@ -281,7 +281,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
aKey = "ErrorFilename";
break;
}
- QFile aOutputFile( kDebug_data->config->readPathEntry(aKey, "kdebug.dbg") );
+ TQFile aOutputFile( kDebug_data->config->readPathEntry(aKey, "kdebug.dbg") );
aOutputFile.open( IO_WriteOnly | IO_Append | IO_Raw );
aOutputFile.writeBlock( buf, strlen( buf ) );
aOutputFile.close();
@@ -290,10 +290,10 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
case 1: // Message Box
{
// Since we are in kdecore here, we cannot use KMsgBox and use
- // QMessageBox instead
+ // TQMessageBox instead
if ( !kDebug_data->aAreaName.isEmpty() )
- aCaption += QString("(%1)").arg( kDebug_data->aAreaName );
- QMessageBox::warning( 0L, aCaption, data, i18n("&OK") );
+ aCaption += TQString("(%1)").arg( kDebug_data->aAreaName );
+ TQMessageBox::warning( 0L, aCaption, data, i18n("&OK") );
break;
}
case 2: // Shell
@@ -314,7 +314,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
abort();
}
-kdbgstream &perror( kdbgstream &s) { return s << QString::fromLocal8Bit(strerror(errno)); }
+kdbgstream &perror( kdbgstream &s) { return s << TQString::fromLocal8Bit(strerror(errno)); }
kdbgstream kdDebug(int area) { return kdbgstream(area, KDEBUG_INFO); }
kdbgstream kdDebug(bool cond, int area) { if (cond) return kdbgstream(area, KDEBUG_INFO); else return kdbgstream(0, 0, false); }
@@ -335,7 +335,7 @@ void kdbgstream::flush() {
if (output.isEmpty() || !print)
return;
kDebugBackend( level, area, output.local8Bit().data() );
- output = QString::null;
+ output = TQString::null;
}
kdbgstream &kdbgstream::form(const char *format, ...)
@@ -361,7 +361,7 @@ kdbgstream& kdbgstream::operator << (char ch)
{
if (!print) return *this;
if (!isprint(ch))
- output += "\\x" + QString::number( static_cast<uint>( ch ), 16 ).rightJustify(2, '0');
+ output += "\\x" + TQString::number( static_cast<uint>( ch ), 16 ).rightJustify(2, '0');
else {
output += ch;
if (ch == '\n') flush();
@@ -369,11 +369,11 @@ kdbgstream& kdbgstream::operator << (char ch)
return *this;
}
-kdbgstream& kdbgstream::operator << (QChar ch)
+kdbgstream& kdbgstream::operator << (TQChar ch)
{
if (!print) return *this;
if (!ch.isPrint())
- output += "\\x" + QString::number( ch.unicode(), 16 ).rightJustify(2, '0');
+ output += "\\x" + TQString::number( ch.unicode(), 16 ).rightJustify(2, '0');
else {
output += ch;
if (ch == '\n') flush();
@@ -381,33 +381,33 @@ kdbgstream& kdbgstream::operator << (QChar ch)
return *this;
}
-kdbgstream& kdbgstream::operator << (QWidget* widget)
+kdbgstream& kdbgstream::operator << (TQWidget* widget)
{
- return *this << const_cast< const QWidget* >( widget );
+ return *this << const_cast< const TQWidget* >( widget );
}
-kdbgstream& kdbgstream::operator << (const QWidget* widget)
+kdbgstream& kdbgstream::operator << (const TQWidget* widget)
{
- QString string, temp;
+ TQString string, temp;
// -----
if(widget==0)
{
- string=(QString)"[Null pointer]";
+ string=(TQString)"[Null pointer]";
} else {
temp.setNum((ulong)widget, 16);
- string=(QString)"["+widget->className()+" pointer "
+ string=(TQString)"["+widget->className()+" pointer "
+ "(0x" + temp + ")";
if(widget->name(0)==0)
{
string += " to unnamed widget, ";
} else {
- string += (QString)" to widget " + widget->name() + ", ";
+ string += (TQString)" to widget " + widget->name() + ", ";
}
string += "geometry="
- + QString().setNum(widget->width())
- + "x"+QString().setNum(widget->height())
- + "+"+QString().setNum(widget->x())
- + "+"+QString().setNum(widget->y())
+ + TQString().setNum(widget->width())
+ + "x"+TQString().setNum(widget->height())
+ + "+"+TQString().setNum(widget->x())
+ + "+"+TQString().setNum(widget->y())
+ "]";
}
if (!print)
@@ -423,40 +423,40 @@ kdbgstream& kdbgstream::operator << (const QWidget* widget)
}
/*
* either use 'output' directly and do the flush if needed
- * or use the QString operator which calls the char* operator
+ * or use the TQString operator which calls the char* operator
*
*/
-kdbgstream& kdbgstream::operator<<( const QDateTime& time) {
+kdbgstream& kdbgstream::operator<<( const TQDateTime& time) {
*this << time.toString();
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QDate& date) {
+kdbgstream& kdbgstream::operator<<( const TQDate& date) {
*this << date.toString();
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QTime& time ) {
+kdbgstream& kdbgstream::operator<<( const TQTime& time ) {
*this << time.toString();
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QPoint& p ) {
+kdbgstream& kdbgstream::operator<<( const TQPoint& p ) {
*this << "(" << p.x() << ", " << p.y() << ")";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QSize& s ) {
+kdbgstream& kdbgstream::operator<<( const TQSize& s ) {
*this << "[" << s.width() << "x" << s.height() << "]";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QRect& r ) {
+kdbgstream& kdbgstream::operator<<( const TQRect& r ) {
*this << "[" << r.x() << "," << r.y() << " - " << r.width() << "x" << r.height() << "]";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QRegion& reg ) {
+kdbgstream& kdbgstream::operator<<( const TQRegion& reg ) {
*this<< "[ ";
- QMemArray<QRect>rs=reg.rects();
+ TQMemArray<TQRect>rs=reg.rects();
for (uint i=0;i<rs.size();++i)
- *this << QString("[%1,%2 - %3x%4] ").arg(rs[i].x()).arg(rs[i].y()).arg(rs[i].width()).arg(rs[i].height() ) ;
+ *this << TQString("[%1,%2 - %3x%4] ").arg(rs[i].x()).arg(rs[i].y()).arg(rs[i].width()).arg(rs[i].height() ) ;
*this <<"]";
return *this;
@@ -465,21 +465,21 @@ kdbgstream& kdbgstream::operator<<( const KURL& u ) {
*this << u.prettyURL();
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QStringList& l ) {
+kdbgstream& kdbgstream::operator<<( const TQStringList& l ) {
*this << "(";
*this << l.join(",");
*this << ")";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QColor& c ) {
+kdbgstream& kdbgstream::operator<<( const TQColor& c ) {
if ( c.isValid() )
*this <<c.name();
else
*this << "(invalid/default)";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QPen& p ) {
+kdbgstream& kdbgstream::operator<<( const TQPen& p ) {
static const char* const s_penStyles[] = {
"NoPen", "SolidLine", "DashLine", "DotLine", "DashDotLine",
"DashDotDotLine" };
@@ -503,7 +503,7 @@ kdbgstream& kdbgstream::operator<<( const QPen& p ) {
*this <<" ]";
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QBrush& b) {
+kdbgstream& kdbgstream::operator<<( const TQBrush& b) {
static const char* const s_brushStyles[] = {
"NoBrush", "SolidPattern", "Dense1Pattern", "Dense2Pattern", "Dense3Pattern",
"Dense4Pattern", "Dense5Pattern", "Dense6Pattern", "Dense7Pattern",
@@ -524,7 +524,7 @@ kdbgstream& kdbgstream::operator<<( const QBrush& b) {
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QVariant& v) {
+kdbgstream& kdbgstream::operator<<( const TQVariant& v) {
*this << "[variant: ";
*this << v.typeName();
// For now we just attempt a conversion to string.
@@ -535,13 +535,13 @@ kdbgstream& kdbgstream::operator<<( const QVariant& v) {
return *this;
}
-kdbgstream& kdbgstream::operator<<( const QByteArray& data) {
+kdbgstream& kdbgstream::operator<<( const TQByteArray& data) {
if (!print) return *this;
output += '[';
unsigned int i = 0;
unsigned int sz = QMIN( data.size(), 64 );
for ( ; i < sz ; ++i ) {
- output += QString::number( (unsigned char) data[i], 16 ).rightJustify(2, '0');
+ output += TQString::number( (unsigned char) data[i], 16 ).rightJustify(2, '0');
if ( i < sz )
output += ' ';
}
@@ -551,9 +551,9 @@ kdbgstream& kdbgstream::operator<<( const QByteArray& data) {
return *this;
}
-QString kdBacktrace(int levels)
+TQString kdBacktrace(int levels)
{
- QString s;
+ TQString s;
#ifdef HAVE_BACKTRACE
void* trace[256];
int n = backtrace(trace, 256);
@@ -566,9 +566,9 @@ QString kdBacktrace(int levels)
s = "[\n";
for (int i = 0; i < n; ++i)
- s += QString::number(i) +
- QString::fromLatin1(": ") +
- QString::fromLatin1(strings[i]) + QString::fromLatin1("\n");
+ s += TQString::number(i) +
+ TQString::fromLatin1(": ") +
+ TQString::fromLatin1(strings[i]) + TQString::fromLatin1("\n");
s += "]\n";
if (strings)
free (strings);
@@ -576,7 +576,7 @@ QString kdBacktrace(int levels)
return s;
}
-QString kdBacktrace()
+TQString kdBacktrace()
{
return kdBacktrace(-1 /*all*/);
}
diff --git a/kdecore/kdebug.h b/kdecore/kdebug.h
index cf954454d..bc8a858f0 100644
--- a/kdecore/kdebug.h
+++ b/kdecore/kdebug.h
@@ -22,7 +22,7 @@
#ifndef _KDEBUG_H_
#define _KDEBUG_H_
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
class QWidget;
@@ -85,7 +85,7 @@ class KDECORE_EXPORT kdbgstream {
kdbgstream(unsigned int _area, unsigned int _level, bool _print = true) :
area(_area), level(_level), print(_print) { }
kdbgstream(const char * initialString, unsigned int _area, unsigned int _level, bool _print = true) :
- output(QString::fromLatin1(initialString)), area(_area), level(_level), print(_print) { }
+ output(TQString::fromLatin1(initialString)), area(_area), level(_level), print(_print) { }
/// Copy constructor
kdbgstream(kdbgstream &str);
kdbgstream(const kdbgstream &str) :
@@ -98,7 +98,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(bool i) {
if (!print) return *this;
- output += QString::fromLatin1(i ? "true" : "false");
+ output += TQString::fromLatin1(i ? "true" : "false");
return *this;
}
/**
@@ -108,7 +108,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(short i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -118,7 +118,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(unsigned short i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -142,7 +142,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(int i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -152,7 +152,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(unsigned int i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -162,7 +162,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(long i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -172,7 +172,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(unsigned long i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -182,7 +182,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(Q_LLONG i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
/**
@@ -192,7 +192,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(Q_ULLONG i) {
if (!print) return *this;
- QString tmp; tmp.setNum(i); output += tmp;
+ TQString tmp; tmp.setNum(i); output += tmp;
return *this;
}
@@ -207,13 +207,13 @@ class KDECORE_EXPORT kdbgstream {
* @return this stream
* @since 3.3
*/
- kdbgstream &operator<<(QChar ch);
+ kdbgstream &operator<<(TQChar ch);
/**
* Prints the given value.
* @param string the string to print
* @return this stream
*/
- kdbgstream &operator<<(const QString& string) {
+ kdbgstream &operator<<(const TQString& string) {
if (!print) return *this;
output += string;
if (output.at(output.length() -1 ) == '\n')
@@ -227,7 +227,7 @@ class KDECORE_EXPORT kdbgstream {
*/
kdbgstream &operator<<(const char *string) {
if (!print) return *this;
- output += QString::fromUtf8(string);
+ output += TQString::fromUtf8(string);
if (output.at(output.length() - 1) == '\n')
flush();
return *this;
@@ -237,7 +237,7 @@ class KDECORE_EXPORT kdbgstream {
* @param string the string to print
* @return this stream
*/
- kdbgstream &operator<<(const QCString& string) {
+ kdbgstream &operator<<(const TQCString& string) {
*this << string.data();
return *this;
}
@@ -265,7 +265,7 @@ class KDECORE_EXPORT kdbgstream {
* @return this stream
*/
kdbgstream& operator<<(double d) {
- QString tmp; tmp.setNum(d); output += tmp;
+ TQString tmp; tmp.setNum(d); output += tmp;
return *this;
}
/**
@@ -280,62 +280,62 @@ class KDECORE_EXPORT kdbgstream {
#endif
;
- /** Operator to print out basic information about a QWidget.
+ /** Operator to print out basic information about a TQWidget.
* Output of class names only works if the class is moc'ified.
* @param widget the widget to print
* @return this stream
*/
- kdbgstream& operator << (const QWidget* widget);
- kdbgstream& operator << (QWidget* widget); // KDE4 merge
+ kdbgstream& operator << (const TQWidget* widget);
+ kdbgstream& operator << (TQWidget* widget); // KDE4 merge
/**
* Prints the given value.
* @param dateTime the datetime to print
* @return this stream
*/
- kdbgstream& operator << ( const QDateTime& dateTime );
+ kdbgstream& operator << ( const TQDateTime& dateTime );
/**
* Prints the given value.
* @param date the date to print
* @return this stream
*/
- kdbgstream& operator << ( const QDate& date );
+ kdbgstream& operator << ( const TQDate& date );
/**
* Prints the given value.
* @param time the time to print
* @return this stream
*/
- kdbgstream& operator << ( const QTime& time );
+ kdbgstream& operator << ( const TQTime& time );
/**
* Prints the given value.
* @param point the point to print
* @return this stream
*/
- kdbgstream& operator << ( const QPoint& point );
+ kdbgstream& operator << ( const TQPoint& point );
/**
* Prints the given value.
- * @param size the QSize to print
+ * @param size the TQSize to print
* @return this stream
*/
- kdbgstream& operator << ( const QSize& size );
+ kdbgstream& operator << ( const TQSize& size );
/**
* Prints the given value.
- * @param rect the QRect to print
+ * @param rect the TQRect to print
* @return this stream
*/
- kdbgstream& operator << ( const QRect& rect);
+ kdbgstream& operator << ( const TQRect& rect);
/**
* Prints the given value.
- * @param region the QRegion to print
+ * @param region the TQRegion to print
* @return this stream
*/
- kdbgstream& operator << ( const QRegion& region);
+ kdbgstream& operator << ( const TQRegion& region);
/**
* Prints the given value.
@@ -349,15 +349,15 @@ class KDECORE_EXPORT kdbgstream {
* @param list the stringlist to print
* @return this stream
*/
- // ### KDE4: Remove in favor of template operator for QValueList<T> below
- kdbgstream& operator << ( const QStringList& list);
+ // ### KDE4: Remove in favor of template operator for TQValueList<T> below
+ kdbgstream& operator << ( const TQStringList& list);
/**
* Prints the given value.
* @param color the color to print
* @return this stream
*/
- kdbgstream& operator << ( const QColor& color);
+ kdbgstream& operator << ( const TQColor& color);
/**
* Prints the given value.
@@ -365,14 +365,14 @@ class KDECORE_EXPORT kdbgstream {
* @return this stream
* @since 3.2
*/
- kdbgstream& operator << ( const QPen& pen );
+ kdbgstream& operator << ( const TQPen& pen );
/**
* Prints the given value.
* @param brush the brush to print
* @return this stream
*/
- kdbgstream& operator << ( const QBrush& brush );
+ kdbgstream& operator << ( const TQBrush& brush );
/**
* Prints the given value.
@@ -380,7 +380,7 @@ class KDECORE_EXPORT kdbgstream {
* @return this stream
* @since 3.3
*/
- kdbgstream& operator << ( const QVariant& variant );
+ kdbgstream& operator << ( const TQVariant& variant );
/**
* Prints the given value.
@@ -388,7 +388,7 @@ class KDECORE_EXPORT kdbgstream {
* @return this stream
* @since 3.3
*/
- kdbgstream& operator << ( const QByteArray& data );
+ kdbgstream& operator << ( const TQByteArray& data );
/**
* Prints the given value
@@ -397,20 +397,20 @@ class KDECORE_EXPORT kdbgstream {
* @since 3.3
*/
template <class T>
- kdbgstream& operator << ( const QValueList<T> &list );
+ kdbgstream& operator << ( const TQValueList<T> &list );
private:
- QString output;
+ TQString output;
unsigned int area, level;
bool print;
kdbgstreamprivate* d;
};
template <class T>
-kdbgstream &kdbgstream::operator<<( const QValueList<T> &list )
+kdbgstream &kdbgstream::operator<<( const TQValueList<T> &list )
{
*this << "(";
- typename QValueList<T>::ConstIterator it = list.begin();
+ typename TQValueList<T>::ConstIterator it = list.begin();
if ( !list.isEmpty() ) {
*this << *it++;
}
@@ -488,17 +488,17 @@ class KDECORE_EXPORT kndbgstream {
* Does nothing.
* @return this stream
*/
- kndbgstream &operator<<(QChar) { return *this; }
+ kndbgstream &operator<<(TQChar) { return *this; }
/**
* Does nothing.
* @return this stream
*/
- kndbgstream &operator<<(const QString& ) { return *this; }
+ kndbgstream &operator<<(const TQString& ) { return *this; }
/**
* Does nothing.
* @return this stream
*/
- kndbgstream &operator<<(const QCString& ) { return *this; }
+ kndbgstream &operator<<(const TQCString& ) { return *this; }
/**
* Does nothing.
* @return this stream
@@ -548,31 +548,31 @@ class KDECORE_EXPORT kndbgstream {
* Does nothing.
* @return this stream
*/
- kndbgstream& operator << (const QWidget*) { return *this; }
- kndbgstream& operator << (QWidget*) { return *this; } // KDE4 merge
+ kndbgstream& operator << (const TQWidget*) { return *this; }
+ kndbgstream& operator << (TQWidget*) { return *this; } // KDE4 merge
/**
* Does nothing.
* @return this stream
*/
kndbgstream &form(const char *, ...) { return *this; }
- kndbgstream& operator<<( const QDateTime& ) { return *this; }
- kndbgstream& operator<<( const QDate& ) { return *this; }
- kndbgstream& operator<<( const QTime& ) { return *this; }
- kndbgstream& operator<<( const QPoint & ) { return *this; }
- kndbgstream& operator<<( const QSize & ) { return *this; }
- kndbgstream& operator<<( const QRect & ) { return *this; }
- kndbgstream& operator<<( const QRegion & ) { return *this; }
+ kndbgstream& operator<<( const TQDateTime& ) { return *this; }
+ kndbgstream& operator<<( const TQDate& ) { return *this; }
+ kndbgstream& operator<<( const TQTime& ) { return *this; }
+ kndbgstream& operator<<( const TQPoint & ) { return *this; }
+ kndbgstream& operator<<( const TQSize & ) { return *this; }
+ kndbgstream& operator<<( const TQRect & ) { return *this; }
+ kndbgstream& operator<<( const TQRegion & ) { return *this; }
kndbgstream& operator<<( const KURL & ) { return *this; }
- kndbgstream& operator<<( const QStringList & ) { return *this; }
- kndbgstream& operator<<( const QColor & ) { return *this; }
- kndbgstream& operator<<( const QPen & ) { return *this; }
- kndbgstream& operator<<( const QBrush & ) { return *this; }
- kndbgstream& operator<<( const QVariant & ) { return *this; }
- kndbgstream& operator<<( const QByteArray & ) { return *this; }
+ kndbgstream& operator<<( const TQStringList & ) { return *this; }
+ kndbgstream& operator<<( const TQColor & ) { return *this; }
+ kndbgstream& operator<<( const TQPen & ) { return *this; }
+ kndbgstream& operator<<( const TQBrush & ) { return *this; }
+ kndbgstream& operator<<( const TQVariant & ) { return *this; }
+ kndbgstream& operator<<( const TQByteArray & ) { return *this; }
template <class T>
- kndbgstream& operator<<( const QValueList<T> & ) { return *this; }
+ kndbgstream& operator<<( const TQValueList<T> & ) { return *this; }
};
/**
@@ -603,7 +603,7 @@ KDECORE_EXPORT kdbgstream kdDebug(bool cond, int area = 0);
* Returns a backtrace.
* @return a backtrace
*/
-KDECORE_EXPORT QString kdBacktrace();
+KDECORE_EXPORT TQString kdBacktrace();
/**
* \relates KGlobal
* Returns a backtrace.
@@ -611,7 +611,7 @@ KDECORE_EXPORT QString kdBacktrace();
* @return a backtrace
* @since 3.1
*/
-KDECORE_EXPORT QString kdBacktrace(int levels);
+KDECORE_EXPORT TQString kdBacktrace(int levels);
/**
* Returns a dummy debug stream. The stream does not print anything.
* @param area an id to identify the output, 0 for default
@@ -619,8 +619,8 @@ KDECORE_EXPORT QString kdBacktrace(int levels);
*/
inline kndbgstream kndDebug(int area = 0) { Q_UNUSED(area); return kndbgstream(); }
inline kndbgstream kndDebug(bool , int = 0) { return kndbgstream(); }
-inline QString kndBacktrace() { return QString::null; }
-inline QString kndBacktrace(int) { return QString::null; }
+inline TQString kndBacktrace() { return TQString::null; }
+inline TQString kndBacktrace(int) { return TQString::null; }
/**
* \relates KGlobal
diff --git a/kdecore/kdelibs_export.h b/kdecore/kdelibs_export.h
index 8c80f3b6e..e7faabdcf 100644
--- a/kdecore/kdelibs_export.h
+++ b/kdecore/kdelibs_export.h
@@ -24,7 +24,7 @@
#include <kdemacros.h>
/* needed, because e.g. Q_OS_UNIX is so frequently used */
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef Q_WS_WIN
#include <kdelibs_export_win.h>
diff --git a/kdecore/kdesktopfile.cpp b/kdecore/kdesktopfile.cpp
index 0168803ea..915b73429 100644
--- a/kdecore/kdesktopfile.cpp
+++ b/kdecore/kdesktopfile.cpp
@@ -24,9 +24,9 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include "kurl.h"
@@ -38,9 +38,9 @@
#include "kdesktopfile.h"
#include "kdesktopfile.moc"
-KDesktopFile::KDesktopFile(const QString &fileName, bool bReadOnly,
+KDesktopFile::KDesktopFile(const TQString &fileName, bool bReadOnly,
const char * resType)
- : KConfig(QString::fromLatin1(""), bReadOnly, false)
+ : KConfig(TQString::fromLatin1(""), bReadOnly, false)
{
// KConfigBackEnd will try to locate the filename that is provided
// based on the resource type specified, _only_ if the filename
@@ -56,19 +56,19 @@ KDesktopFile::~KDesktopFile()
// no need to do anything
}
-QString KDesktopFile::locateLocal(const QString &path)
+TQString KDesktopFile::locateLocal(const TQString &path)
{
- QString local;
+ TQString local;
if (path.endsWith(".directory"))
{
local = path;
- if (!QDir::isRelativePath(local))
+ if (!TQDir::isRelativePath(local))
{
// Relative wrt apps?
local = KGlobal::dirs()->relativeLocation("apps", path);
}
- if (QDir::isRelativePath(local))
+ if (TQDir::isRelativePath(local))
{
local = ::locateLocal("apps", local); // Relative to apps
}
@@ -77,7 +77,7 @@ QString KDesktopFile::locateLocal(const QString &path)
// XDG Desktop menu items come with absolute paths, we need to
// extract their relative path and then build a local path.
local = KGlobal::dirs()->relativeLocation("xdgdata-dirs", local);
- if (!QDir::isRelativePath(local))
+ if (!TQDir::isRelativePath(local))
{
// Hm, that didn't work...
// What now? Use filename only and hope for the best.
@@ -88,7 +88,7 @@ QString KDesktopFile::locateLocal(const QString &path)
}
else
{
- if (QDir::isRelativePath(path))
+ if (TQDir::isRelativePath(path))
{
local = ::locateLocal("apps", path); // Relative to apps
}
@@ -97,7 +97,7 @@ QString KDesktopFile::locateLocal(const QString &path)
// XDG Desktop menu items come with absolute paths, we need to
// extract their relative path and then build a local path.
local = KGlobal::dirs()->relativeLocation("xdgdata-apps", path);
- if (!QDir::isRelativePath(local))
+ if (!TQDir::isRelativePath(local))
{
// What now? Use filename only and hope for the best.
local = path.mid(path.findRev('/')+1);
@@ -108,19 +108,19 @@ QString KDesktopFile::locateLocal(const QString &path)
return local;
}
-bool KDesktopFile::isDesktopFile(const QString& path)
+bool KDesktopFile::isDesktopFile(const TQString& path)
{
int len = path.length();
- if(len > 8 && path.right(8) == QString::fromLatin1(".desktop"))
+ if(len > 8 && path.right(8) == TQString::fromLatin1(".desktop"))
return true;
- else if(len > 7 && path.right(7) == QString::fromLatin1(".kdelnk"))
+ else if(len > 7 && path.right(7) == TQString::fromLatin1(".kdelnk"))
return true;
else
return false;
}
-bool KDesktopFile::isAuthorizedDesktopFile(const QString& path)
+bool KDesktopFile::isAuthorizedDesktopFile(const TQString& path)
{
if (!kapp || kapp->authorize("run_desktop_files"))
return true;
@@ -128,15 +128,15 @@ bool KDesktopFile::isAuthorizedDesktopFile(const QString& path)
if (path.isEmpty())
return false; // Empty paths are not ok.
- if (QDir::isRelativePath(path))
+ if (TQDir::isRelativePath(path))
return true; // Relative paths are ok.
KStandardDirs *dirs = KGlobal::dirs();
- if (QDir::isRelativePath( dirs->relativeLocation("apps", path) ))
+ if (TQDir::isRelativePath( dirs->relativeLocation("apps", path) ))
return true;
- if (QDir::isRelativePath( dirs->relativeLocation("xdgdata-apps", path) ))
+ if (TQDir::isRelativePath( dirs->relativeLocation("xdgdata-apps", path) ))
return true;
- if (QDir::isRelativePath( dirs->relativeLocation("services", path) ))
+ if (TQDir::isRelativePath( dirs->relativeLocation("services", path) ))
return true;
if (dirs->relativeLocation("data", path).startsWith("kdesktop/Desktop"))
return true;
@@ -145,45 +145,45 @@ bool KDesktopFile::isAuthorizedDesktopFile(const QString& path)
return false;
}
-QString KDesktopFile::readType() const
+TQString KDesktopFile::readType() const
{
return readEntry("Type");
}
-QString KDesktopFile::readIcon() const
+TQString KDesktopFile::readIcon() const
{
return readEntry("Icon");
}
-QString KDesktopFile::readName() const
+TQString KDesktopFile::readName() const
{
return readEntry("Name");
}
-QString KDesktopFile::readComment() const
+TQString KDesktopFile::readComment() const
{
return readEntry("Comment");
}
-QString KDesktopFile::readGenericName() const
+TQString KDesktopFile::readGenericName() const
{
return readEntry("GenericName");
}
-QString KDesktopFile::readPath() const
+TQString KDesktopFile::readPath() const
{
return readPathEntry("Path");
}
-QString KDesktopFile::readDevice() const
+TQString KDesktopFile::readDevice() const
{
return readEntry("Dev");
}
-QString KDesktopFile::readURL() const
+TQString KDesktopFile::readURL() const
{
if (hasDeviceType()) {
- QString device = readDevice();
+ TQString device = readDevice();
KMountPoint::List mountPoints = KMountPoint::possibleMountPoints();
for(KMountPoint::List::ConstIterator it = mountPoints.begin();
@@ -197,10 +197,10 @@ QString KDesktopFile::readURL() const
return u.url();
}
}
- return QString::null;
+ return TQString::null;
} else {
- QString url = readPathEntry("URL");
- if ( !url.isEmpty() && !QDir::isRelativePath(url) )
+ TQString url = readPathEntry("URL");
+ if ( !url.isEmpty() && !TQDir::isRelativePath(url) )
{
// Handle absolute paths as such (i.e. we need to escape them)
KURL u;
@@ -211,61 +211,61 @@ QString KDesktopFile::readURL() const
}
}
-QStringList KDesktopFile::readActions() const
+TQStringList KDesktopFile::readActions() const
{
return readListEntry("Actions", ';');
}
-void KDesktopFile::setActionGroup(const QString &group)
+void KDesktopFile::setActionGroup(const TQString &group)
{
- setGroup(QString::fromLatin1("Desktop Action ") + group);
+ setGroup(TQString::fromLatin1("Desktop Action ") + group);
}
-bool KDesktopFile::hasActionGroup(const QString &group) const
+bool KDesktopFile::hasActionGroup(const TQString &group) const
{
- return hasGroup(QString::fromLatin1("Desktop Action ") + group);
+ return hasGroup(TQString::fromLatin1("Desktop Action ") + group);
}
bool KDesktopFile::hasLinkType() const
{
- return readEntry("Type") == QString::fromLatin1("Link");
+ return readEntry("Type") == TQString::fromLatin1("Link");
}
bool KDesktopFile::hasApplicationType() const
{
- return readEntry("Type") == QString::fromLatin1("Application");
+ return readEntry("Type") == TQString::fromLatin1("Application");
}
bool KDesktopFile::hasMimeTypeType() const
{
- return readEntry("Type") == QString::fromLatin1("MimeType");
+ return readEntry("Type") == TQString::fromLatin1("MimeType");
}
bool KDesktopFile::hasDeviceType() const
{
- return readEntry("Type") == QString::fromLatin1("FSDev") ||
- readEntry("Type") == QString::fromLatin1("FSDevice");
+ return readEntry("Type") == TQString::fromLatin1("FSDev") ||
+ readEntry("Type") == TQString::fromLatin1("FSDevice");
}
bool KDesktopFile::tryExec() const
{
// Test for TryExec and "X-KDE-AuthorizeAction"
- QString te = readPathEntry("TryExec");
+ TQString te = readPathEntry("TryExec");
if (!te.isEmpty()) {
- if (!QDir::isRelativePath(te)) {
- if (::access(QFile::encodeName(te), X_OK))
+ if (!TQDir::isRelativePath(te)) {
+ if (::access(TQFile::encodeName(te), X_OK))
return false;
} else {
// !!! Sergey A. Sukiyazov <corwin@micom.don.ru> !!!
// Environment PATH may contain filenames in 8bit locale cpecified
// encoding (Like a filenames).
- QStringList dirs = QStringList::split(':', QFile::decodeName(::getenv("PATH")));
- QStringList::Iterator it(dirs.begin());
+ TQStringList dirs = TQStringList::split(':', TQFile::decodeName(::getenv("PATH")));
+ TQStringList::Iterator it(dirs.begin());
bool match = false;
for (; it != dirs.end(); ++it) {
- QString fName = *it + "/" + te;
- if (::access(QFile::encodeName(fName), X_OK) == 0)
+ TQString fName = *it + "/" + te;
+ if (::access(TQFile::encodeName(fName), X_OK) == 0)
{
match = true;
break;
@@ -276,10 +276,10 @@ bool KDesktopFile::tryExec() const
return false;
}
}
- QStringList list = readListEntry("X-KDE-AuthorizeAction");
+ TQStringList list = readListEntry("X-KDE-AuthorizeAction");
if (kapp && !list.isEmpty())
{
- for(QStringList::ConstIterator it = list.begin();
+ for(TQStringList::ConstIterator it = list.begin();
it != list.end();
++it)
{
@@ -292,7 +292,7 @@ bool KDesktopFile::tryExec() const
bool su = readBoolEntry("X-KDE-SubstituteUID");
if (su)
{
- QString user = readEntry("X-KDE-Username");
+ TQString user = readEntry("X-KDE-Username");
if (user.isEmpty())
user = ::getenv("ADMIN_ACCOUNT");
if (user.isEmpty())
@@ -325,7 +325,7 @@ KDesktopFile::sortOrder() const
void KDesktopFile::virtual_hook( int id, void* data )
{ KConfig::virtual_hook( id, data ); }
-QString KDesktopFile::readDocPath() const
+TQString KDesktopFile::readDocPath() const
{
// Depreciated, remove in KDE4 or 5?
// See: http://www.freedesktop.org/Standards/desktop-entry-spec
@@ -335,9 +335,9 @@ QString KDesktopFile::readDocPath() const
return readPathEntry( "X-DocPath" );
}
-KDesktopFile* KDesktopFile::copyTo(const QString &file) const
+KDesktopFile* KDesktopFile::copyTo(const TQString &file) const
{
- KDesktopFile *config = new KDesktopFile(QString::null, false);
+ KDesktopFile *config = new KDesktopFile(TQString::null, false);
KConfig::copyTo(file, config);
config->setDesktopGroup();
return config;
diff --git a/kdecore/kdesktopfile.h b/kdecore/kdesktopfile.h
index ff0f66407..dcbe3ea1d 100644
--- a/kdecore/kdesktopfile.h
+++ b/kdecore/kdesktopfile.h
@@ -48,7 +48,7 @@ public:
* to search for if @p fileName is not absolute. For
* instance, you might want to specify "config".
*/
- KDesktopFile( const QString &fileName, bool readOnly = false,
+ KDesktopFile( const TQString &fileName, bool readOnly = false,
const char * resType = "apps");
/**
@@ -67,7 +67,7 @@ public:
* @param path the path of the file to check
* @return true if the file appears to be a desktop file.
*/
- static bool isDesktopFile(const QString& path);
+ static bool isDesktopFile(const TQString& path);
/**
* Checks whether the user is authorized to run this desktop file.
@@ -78,81 +78,81 @@ public:
* @return true if the user is authorized to run the file
* @since 3.1
*/
- static bool isAuthorizedDesktopFile(const QString& path);
+ static bool isAuthorizedDesktopFile(const TQString& path);
/**
* Returns the location where changes for the .desktop file @p path
* should be written to.
* @since 3.2
*/
- static QString locateLocal(const QString &path);
+ static TQString locateLocal(const TQString &path);
/**
* Returns the value of the "Type=" entry.
- * @return the type or QString::null if not specified
+ * @return the type or TQString::null if not specified
*/
- QString readType() const;
+ TQString readType() const;
/**
* Returns the value of the "Icon=" entry.
- * @return the icon or QString::null if not specified
+ * @return the icon or TQString::null if not specified
*/
- QString readIcon() const;
+ TQString readIcon() const;
/**
* Returns the value of the "Name=" entry.
- * @return the name or QString::null if not specified
+ * @return the name or TQString::null if not specified
*/
- QString readName() const;
+ TQString readName() const;
/**
* Returns the value of the "Comment=" entry.
- * @return the comment or QString::null if not specified
+ * @return the comment or TQString::null if not specified
*/
- QString readComment() const;
+ TQString readComment() const;
/**
* Returns the value of the "GenericName=" entry.
- * @return the generic name or QString::null if not specified
+ * @return the generic name or TQString::null if not specified
*/
- QString readGenericName() const;
+ TQString readGenericName() const;
/**
* Returns the value of the "Path=" entry.
- * @return the path or QString::null if not specified
+ * @return the path or TQString::null if not specified
*/
- QString readPath() const;
+ TQString readPath() const;
/**
* Returns the value of the "Dev=" entry.
- * @return the device or QString::null if not specified
+ * @return the device or TQString::null if not specified
*/
- QString readDevice() const;
+ TQString readDevice() const;
/**
* Returns the value of the "URL=" entry.
- * @return the URL or QString::null if not specified
+ * @return the URL or TQString::null if not specified
*/
- QString readURL() const;
+ TQString readURL() const;
/**
* Returns a list of the "Actions=" entries.
* @return the list of actions
*/
- QStringList readActions() const;
+ TQStringList readActions() const;
/**
* Sets the desktop action group.
* @param group the new action group
*/
- void setActionGroup(const QString &group);
+ void setActionGroup(const TQString &group);
/**
* Returns true if the action group exists, false otherwise
* @param group the action group to test
* @return true if the action group exists
*/
- bool hasActionGroup(const QString &group) const;
+ bool hasActionGroup(const TQString &group) const;
/**
* Checks whether there is a "Type=Link" entry.
@@ -191,13 +191,13 @@ public:
* Returns the file name.
* @return The filename as passed to the constructor.
*/
- QString fileName() const;
+ TQString fileName() const;
/**
* Returns the resource.
* @return The resource type as passed to the constructor.
*/
- QString resource() const;
+ TQString resource() const;
/**
* Returns the value of the "X-DocPath=" Or "DocPath=" entry.
@@ -206,13 +206,13 @@ public:
* @return The value of the "X-DocPath=" Or "DocPath=" entry.
* @since 3.1
*/
- QString readDocPath() const;
+ TQString readDocPath() const;
/**
* Returns the entry of the "SortOrder=" entry.
* @return the value of the "SortOrder=" entry.
*/
- QStringList sortOrder() const;
+ TQStringList sortOrder() const;
/**
* Copies all entries from this config object to a new
@@ -224,7 +224,7 @@ public:
* @param file the new KDesktopFile object it will save itself to.
* @since 3.2
*/
- KDesktopFile* copyTo(const QString &file) const;
+ KDesktopFile* copyTo(const TQString &file) const;
#ifdef KDE_NO_COMPAT
private:
@@ -232,7 +232,7 @@ private:
/**
* @deprecated Use fileName() instead.
*/
- KDE_DEPRECATED QString filename() const { return fileName(); };
+ KDE_DEPRECATED TQString filename() const { return fileName(); };
private:
diff --git a/kdecore/kextsock.cpp b/kdecore/kextsock.cpp
index 0ee2664b1..dd670608c 100644
--- a/kdecore/kextsock.cpp
+++ b/kdecore/kextsock.cpp
@@ -36,11 +36,11 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qglobal.h>
-#include <qstring.h>
-#include <qiodevice.h>
-#include <qsocketnotifier.h>
-#include <qguardedptr.h>
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqiodevice.h>
+#include <tqsocketnotifier.h>
+#include <tqguardedptr.h>
#include "kresolver.h"
@@ -75,7 +75,7 @@ public:
::KSocketAddress *local; // local socket address
::KSocketAddress *peer; // peer socket address
- QSocketNotifier *qsnIn, *qsnOut;
+ TQSocketNotifier *qsnIn, *qsnOut;
int inMaxSize, outMaxSize;
bool emitRead : 1, emitWrite : 1;
mutable bool addressReusable : 1, ipv6only : 1;
@@ -189,7 +189,7 @@ KExtendedSocket::KExtendedSocket() :
}
// constructor with hostname
-KExtendedSocket::KExtendedSocket(const QString& host, int port, int flags) :
+KExtendedSocket::KExtendedSocket(const TQString& host, int port, int flags) :
sockfd(-1), d(new KExtendedSocketPrivate)
{
setAddress(host, port);
@@ -197,7 +197,7 @@ KExtendedSocket::KExtendedSocket(const QString& host, int port, int flags) :
}
// same
-KExtendedSocket::KExtendedSocket(const QString& host, const QString& service, int flags) :
+KExtendedSocket::KExtendedSocket(const TQString& host, const TQString& service, int flags) :
sockfd(-1), d(new KExtendedSocketPrivate)
{
setAddress(host, service);
@@ -273,7 +273,7 @@ int KExtendedSocket::socketFlags() const
* Sets socket target hostname
* This is only allowed if we are in nothing state
*/
-bool KExtendedSocket::setHost(const QString& host)
+bool KExtendedSocket::setHost(const TQString& host)
{
if (d->status > nothing)
return false; // error!
@@ -285,7 +285,7 @@ bool KExtendedSocket::setHost(const QString& host)
/*
* returns the hostname
*/
-QString KExtendedSocket::host() const
+TQString KExtendedSocket::host() const
{
return d->resRemote.nodeName();
}
@@ -296,10 +296,10 @@ QString KExtendedSocket::host() const
*/
bool KExtendedSocket::setPort(int port)
{
- return setPort(QString::number(port));
+ return setPort(TQString::number(port));
}
-bool KExtendedSocket::setPort(const QString& service)
+bool KExtendedSocket::setPort(const TQString& service)
{
if (d->status > nothing)
return false; // error
@@ -311,7 +311,7 @@ bool KExtendedSocket::setPort(const QString& service)
/*
* returns the service port number
*/
-QString KExtendedSocket::port() const
+TQString KExtendedSocket::port() const
{
return d->resRemote.serviceName();
}
@@ -319,7 +319,7 @@ QString KExtendedSocket::port() const
/*
* sets the address
*/
-bool KExtendedSocket::setAddress(const QString& host, int port)
+bool KExtendedSocket::setAddress(const TQString& host, int port)
{
return setHost(host) && setPort(port);
}
@@ -327,7 +327,7 @@ bool KExtendedSocket::setAddress(const QString& host, int port)
/*
* the same
*/
-bool KExtendedSocket::setAddress(const QString& host, const QString& serv)
+bool KExtendedSocket::setAddress(const TQString& host, const TQString& serv)
{
return setHost(host) && setPort(serv);
}
@@ -337,7 +337,7 @@ bool KExtendedSocket::setAddress(const QString& host, const QString& serv)
* This is only valid in the 'nothing' state and if this is not a
* passiveSocket socket
*/
-bool KExtendedSocket::setBindHost(const QString& host)
+bool KExtendedSocket::setBindHost(const TQString& host)
{
if (d->status > nothing || d->flags & passiveSocket)
return false; // error
@@ -352,13 +352,13 @@ bool KExtendedSocket::setBindHost(const QString& host)
*/
bool KExtendedSocket::unsetBindHost()
{
- return setBindHost(QString::null);
+ return setBindHost(TQString::null);
}
/*
* returns the binding host
*/
-QString KExtendedSocket::bindHost() const
+TQString KExtendedSocket::bindHost() const
{
return d->resLocal.serviceName();
}
@@ -369,10 +369,10 @@ QString KExtendedSocket::bindHost() const
*/
bool KExtendedSocket::setBindPort(int port)
{
- return setBindPort(QString::number(port));
+ return setBindPort(TQString::number(port));
}
-bool KExtendedSocket::setBindPort(const QString& service)
+bool KExtendedSocket::setBindPort(const TQString& service)
{
if (d->status > nothing || d->flags & passiveSocket)
return false; // error
@@ -386,13 +386,13 @@ bool KExtendedSocket::setBindPort(const QString& service)
*/
bool KExtendedSocket::unsetBindPort()
{
- return setBindPort(QString::null);
+ return setBindPort(TQString::null);
}
/*
* returns the binding port
*/
-QString KExtendedSocket::bindPort() const
+TQString KExtendedSocket::bindPort() const
{
return d->resLocal.serviceName();
}
@@ -400,7 +400,7 @@ QString KExtendedSocket::bindPort() const
/*
* sets the binding address
*/
-bool KExtendedSocket::setBindAddress(const QString& host, int port)
+bool KExtendedSocket::setBindAddress(const TQString& host, int port)
{
return setBindHost(host) && setBindPort(port);
}
@@ -408,7 +408,7 @@ bool KExtendedSocket::setBindAddress(const QString& host, int port)
/*
* same
*/
-bool KExtendedSocket::setBindAddress(const QString& host, const QString& service)
+bool KExtendedSocket::setBindAddress(const TQString& host, const TQString& service)
{
return setBindHost(host) && setBindPort(service);
}
@@ -638,8 +638,8 @@ bool KExtendedSocket::setBufferSize(int rsize, int wsize)
// closed
if (d->qsnIn == NULL)
{
- d->qsnIn = new QSocketNotifier(sockfd, QSocketNotifier::Read);
- QObject::connect(d->qsnIn, SIGNAL(activated(int)), this, SLOT(socketActivityRead()));
+ d->qsnIn = new TQSocketNotifier(sockfd, TQSocketNotifier::Read);
+ TQObject::connect(d->qsnIn, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityRead()));
d->qsnIn->setEnabled(true);
}
@@ -686,8 +686,8 @@ bool KExtendedSocket::setBufferSize(int rsize, int wsize)
if (d->qsnOut == NULL)
{
- d->qsnOut = new QSocketNotifier(sockfd, QSocketNotifier::Write);
- QObject::connect(d->qsnOut, SIGNAL(activated(int)), this, SLOT(socketActivityWrite()));
+ d->qsnOut = new TQSocketNotifier(sockfd, TQSocketNotifier::Write);
+ TQObject::connect(d->qsnOut, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityWrite()));
// if the class is being created now, there's nothing to write yet
// so socketActivityWrite() will get called once and disable
// the notifier
@@ -701,8 +701,8 @@ bool KExtendedSocket::setBufferSize(int rsize, int wsize)
// check we didn't turn something off we shouldn't
if (d->emitWrite && d->qsnOut == NULL)
{
- d->qsnOut = new QSocketNotifier(sockfd, QSocketNotifier::Write);
- QObject::connect(d->qsnOut, SIGNAL(activated(int)), this, SLOT(socketActivityWrite()));
+ d->qsnOut = new TQSocketNotifier(sockfd, TQSocketNotifier::Write);
+ TQObject::connect(d->qsnOut, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityWrite()));
}
return true;
@@ -783,8 +783,8 @@ int KExtendedSocket::startAsyncLookup()
d->resRemote.setFlags(flags);
d->resRemote.setFamily(familyMask);
d->resRemote.setSocketType(socktype);
- QObject::connect(&d->resRemote, SIGNAL(finished(KResolverResults)),
- this, SLOT(dnsResultsReady()));
+ TQObject::connect(&d->resRemote, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(dnsResultsReady()));
if (!d->resRemote.start())
{
@@ -800,8 +800,8 @@ int KExtendedSocket::startAsyncLookup()
d->resLocal.setFlags(flags);
d->resLocal.setFamily(familyMask);
d->resLocal.setSocketType(socktype);
- QObject::connect(&d->resLocal, SIGNAL(finished(KResolverResults)),
- this, SLOT(dnsResultsReady()));
+ TQObject::connect(&d->resLocal, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(dnsResultsReady()));
if (!d->resLocal.start())
{
@@ -895,8 +895,8 @@ int KExtendedSocket::listen(int N)
else
{
d->status = listening;
- d->qsnIn = new QSocketNotifier(sockfd, QSocketNotifier::Read);
- QObject::connect(d->qsnIn, SIGNAL(activated(int)), this, SLOT(socketActivityRead()));
+ d->qsnIn = new TQSocketNotifier(sockfd, TQSocketNotifier::Read);
+ TQObject::connect(d->qsnIn, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityRead()));
}
return retval == -1 ? -1 : 0;
}
@@ -1218,7 +1218,7 @@ int KExtendedSocket::startAsyncConnect()
// signal lookupFinished to do connection
if (d->status < lookupDone)
{
- QObject::connect(this, SIGNAL(lookupFinished(int)), this, SLOT(startAsyncConnectSlot()));
+ TQObject::connect(this, TQT_SIGNAL(lookupFinished(int)), this, TQT_SLOT(startAsyncConnectSlot()));
if (d->status < lookupInProgress)
return startAsyncLookup();
else
@@ -1228,7 +1228,7 @@ int KExtendedSocket::startAsyncConnect()
// here we have d->status >= lookupDone and <= connecting
// we can do our connection
d->status = connecting;
- QGuardedPtr<QObject> p = this;
+ TQGuardedPtr<TQObject> p = this;
connectionEvent();
if (!p)
return -1; // We have been deleted.
@@ -1385,8 +1385,8 @@ void KExtendedSocket::flush()
// better by concatenating a few of them into a big buffer
// question is: how big should that buffer be? 16 kB should be enough
- QByteArray buf(16384);
- QByteArray *a = outBuf.first();
+ TQByteArray buf(16384);
+ TQByteArray *a = outBuf.first();
unsigned count = 0;
while (a && count + (a->size() - offset) <= buf.size())
@@ -1657,7 +1657,7 @@ void KExtendedSocket::socketActivityRead()
if (d->flags & inputBufferedSocket)
{
// aye. Do read from the socket and feed our buffer
- QByteArray a;
+ TQByteArray a;
char buf[1024];
int len, totalread = 0;
@@ -1908,10 +1908,10 @@ void KExtendedSocket::connectionEvent()
// error here is either EWOULDBLOCK or EINPROGRESS
// so, it is a good condition
- d->qsnIn = new QSocketNotifier(sockfd, QSocketNotifier::Read);
- QObject::connect(d->qsnIn, SIGNAL(activated(int)), this, SLOT(socketActivityRead()));
- d->qsnOut = new QSocketNotifier(sockfd, QSocketNotifier::Write);
- QObject::connect(d->qsnOut, SIGNAL(activated(int)), this, SLOT(socketActivityWrite()));
+ d->qsnIn = new TQSocketNotifier(sockfd, TQSocketNotifier::Read);
+ TQObject::connect(d->qsnIn, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityRead()));
+ d->qsnOut = new TQSocketNotifier(sockfd, TQSocketNotifier::Write);
+ TQObject::connect(d->qsnOut, TQT_SIGNAL(activated(int)), this, TQT_SLOT(socketActivityWrite()));
// ok, let the Qt event loop do the selecting for us
return;
@@ -1969,14 +1969,14 @@ void KExtendedSocket::dnsResultsReady()
void KExtendedSocket::startAsyncConnectSlot()
{
- QObject::disconnect(this, SIGNAL(lookupFinished(int)), this, SLOT(startAsyncConnectSlot()));
+ TQObject::disconnect(this, TQT_SIGNAL(lookupFinished(int)), this, TQT_SLOT(startAsyncConnectSlot()));
if (d->status == lookupDone)
startAsyncConnect();
}
-int KExtendedSocket::resolve(sockaddr *sock, ksocklen_t len, QString &host,
- QString &port, int flags)
+int KExtendedSocket::resolve(sockaddr *sock, ksocklen_t len, TQString &host,
+ TQString &port, int flags)
{
kdDebug(170) << "Deprecated function called:" << k_funcinfo << endl;
@@ -1986,26 +1986,26 @@ int KExtendedSocket::resolve(sockaddr *sock, ksocklen_t len, QString &host,
h[0] = s[0] = '\0';
err = getnameinfo(sock, len, h, sizeof(h) - 1, s, sizeof(s) - 1, flags);
- host = QString::fromUtf8(h);
- port = QString::fromUtf8(s);
+ host = TQString::fromUtf8(h);
+ port = TQString::fromUtf8(s);
return err;
}
-int KExtendedSocket::resolve(::KSocketAddress *sock, QString &host, QString &port,
+int KExtendedSocket::resolve(::KSocketAddress *sock, TQString &host, TQString &port,
int flags)
{
return resolve(sock->data, sock->datasize, host, port, flags);
}
-QPtrList<KAddressInfo> KExtendedSocket::lookup(const QString& host, const QString& port,
+TQPtrList<KAddressInfo> KExtendedSocket::lookup(const TQString& host, const TQString& port,
int userflags, int *error)
{
kdDebug(170) << "Deprecated function called:" << k_funcinfo << endl;
int socktype, familyMask, flags;
unsigned i;
- QPtrList<KAddressInfo> l;
+ TQPtrList<KAddressInfo> l;
/* check socket type flags */
if (!process_flags(userflags, socktype, familyMask, flags))
@@ -2032,7 +2032,7 @@ QPtrList<KAddressInfo> KExtendedSocket::lookup(const QString& host, const QStrin
ai->ai->ai_family = res[i].family();
ai->ai->ai_socktype = res[i].socketType();
ai->ai->ai_protocol = res[i].protocol();
- QString canon = res[i].canonicalName();
+ TQString canon = res[i].canonicalName();
if (!canon.isEmpty())
{
ai->ai->ai_canonname = (char *) malloc(canon.length()+1);
@@ -2153,7 +2153,7 @@ QPtrList<KAddressInfo> KExtendedSocket::lookup(const QString& host, const QStrin
return peer;
}
-QString KExtendedSocket::strError(int code, int syserr)
+TQString KExtendedSocket::strError(int code, int syserr)
{
const char * msg;
if (code == IO_LookupError)
@@ -2161,12 +2161,12 @@ QString KExtendedSocket::strError(int code, int syserr)
else
msg = strerror(syserr);
- return QString::fromLocal8Bit(msg);
+ return TQString::fromLocal8Bit(msg);
}
-QSocketNotifier *KExtendedSocket::readNotifier() { return d->qsnIn; }
-QSocketNotifier *KExtendedSocket::writeNotifier() { return d->qsnOut; }
+TQSocketNotifier *KExtendedSocket::readNotifier() { return d->qsnIn; }
+TQSocketNotifier *KExtendedSocket::writeNotifier() { return d->qsnOut; }
/*
* class KAddressInfo
diff --git a/kdecore/kextsock.h b/kdecore/kextsock.h
index f3d1f5923..ed3dbfc3e 100644
--- a/kdecore/kextsock.h
+++ b/kdecore/kextsock.h
@@ -26,9 +26,9 @@
#include <sys/time.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qiodevice.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqiodevice.h>
#include "kbufferedio.h"
#include "ksockaddr.h"
@@ -42,7 +42,7 @@ class QSocketNotifier;
/*
* This is extending QIODevice's error codes
*
- * According to qiodevice.h, the last error is IO_UnspecifiedError
+ * According to tqiodevice.h, the last error is IO_UnspecifiedError
* These errors will never occur in functions declared in QIODevice
* (except open, but you shouldn't call open)
*/
@@ -88,7 +88,7 @@ class KExtendedSocketPrivate;
* @author Thiago Macieira <thiago.macieira@kdemail.net>
* @short an extended socket
*/
-class KDECORE_EXPORT KExtendedSocket: public KBufferedIO // public QObject, public QIODevice
+class KDECORE_EXPORT KExtendedSocket: public KBufferedIO // public TQObject, public QIODevice
{
Q_OBJECT
@@ -167,7 +167,7 @@ public:
*
* If this is a listening (passive) socket, the hostname and port specify
* the address to listen on. In order to listen on every interface
- * available on this node, set @p host to QString::null. To let the operating
+ * available on this node, set @p host to TQString::null. To let the operating
* system select a port, set it to 0.
*
* @sa setAddress
@@ -175,7 +175,7 @@ public:
* @param port the port number
* @param flags flags
*/
- KExtendedSocket(const QString& host, int port, int flags = 0);
+ KExtendedSocket(const TQString& host, int port, int flags = 0);
/**
* Creates a socket with the given hostname and service.
@@ -185,7 +185,7 @@ public:
*
* If this is a listening (passive) socket, the hostname and service specify
* the address to listen on. In order to listen on every interface
- * available on this node, set @p host to QString::null. To let the operating
+ * available on this node, set @p host to TQString::null. To let the operating
* system select a port, set the service to "0".
*
* @sa setAddress
@@ -193,7 +193,7 @@ public:
* @param service the service
* @param flags flags
*/
- KExtendedSocket(const QString& host, const QString& service, int flags = 0);
+ KExtendedSocket(const TQString& host, const TQString& service, int flags = 0);
/**
* Destroys the socket, disconnecting if still connected and
@@ -246,7 +246,7 @@ public:
*
* If this is a listening (passive) socket, the hostname is the host to which the socket
* will bind in order to listen. If you want to listen in every interface, set it
- * to "*" or QString::null.
+ * to "*" or TQString::null.
*
* If this is a connecting (active) socket, the hostname is the host to which we will try
* to connect.
@@ -254,13 +254,13 @@ public:
* @param host the hostname
* @return true on success, false on error
*/
- bool setHost(const QString& host);
+ bool setHost(const TQString& host);
/**
* Returns the hostname.
- * @return the hostname or QString::null if no host has been set
+ * @return the hostname or TQString::null if no host has been set
*/
- QString host() const;
+ TQString host() const;
/**
* Sets the port/service.
@@ -277,13 +277,13 @@ public:
* @param port the port
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setPort(const QString& port);
+ bool setPort(const TQString& port);
/**
* Returns the port/service. If it is a port, the string contains a number.
- * @return the port or QString::null if it has not been set.
+ * @return the port or TQString::null if it has not been set.
*/
- QString port() const;
+ TQString port() const;
/**
* Sets the address where we will connect to.
@@ -294,7 +294,7 @@ public:
* @param port port number
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setAddress(const QString& host, int port);
+ bool setAddress(const TQString& host, int port);
/**
* Sets the address where we will connect to.
@@ -305,14 +305,14 @@ public:
* @param serv the service
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setAddress(const QString& host, const QString& serv);
+ bool setAddress(const TQString& host, const TQString& serv);
/**
* Sets the hostname to which we will bind locally before connecting.
* @param host the hostname
* @return false if this is a passiveSocket, otherwise true.
*/
- bool setBindHost(const QString& host);
+ bool setBindHost(const TQString& host);
/**
* Unsets the bind hostname. That is, don't request a binding host.
@@ -322,9 +322,9 @@ public:
/**
* Returns the hostname to which the socket will be/is bound.
- * @return the host or QString::null if it has not been set.
+ * @return the host or TQString::null if it has not been set.
*/
- QString bindHost() const;
+ TQString bindHost() const;
/**
* Sets the port/service to which we will bind before connecting
@@ -338,7 +338,7 @@ public:
* @param service the port number or service name
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setBindPort(const QString& service);
+ bool setBindPort(const TQString& service);
/**
* Unsets the bind port/service.
@@ -348,9 +348,9 @@ public:
/**
* Returns the service to which the socket will be/is bound.
- * @return the host or QString::null if it has not been set.
+ * @return the host or TQString::null if it has not been set.
*/
- QString bindPort() const;
+ TQString bindPort() const;
/**
* Sets both host and port to which we will bind the socket. Will return
@@ -359,7 +359,7 @@ public:
* @param port the port number
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setBindAddress(const QString& host, int port);
+ bool setBindAddress(const TQString& host, int port);
/**
* Sets both host and service to which we will bind the socket. Will return
@@ -368,7 +368,7 @@ public:
* @param service the service
* @return true if successful, false on error (e.g. connection already established)
*/
- bool setBindAddress(const QString& host, const QString& service);
+ bool setBindAddress(const TQString& host, const TQString& service);
/**
* Unsets the bind address for the socket. That means that we won't
@@ -608,7 +608,7 @@ public:
virtual void cancelAsyncConnect();
/**
- * Implementation of QIODevice::open() pure virtual function.
+ * Implementation of TQIODevice::open() pure virtual function.
* This depends on the target host address already being there.
* If this is a passiveSocket, this is identical to call listen(); else, if
* this is not a passiveSocket and no connection attempt is in progress, this
@@ -886,8 +886,8 @@ protected slots:
protected:
- QSocketNotifier *readNotifier();
- QSocketNotifier *writeNotifier();
+ TQSocketNotifier *readNotifier();
+ TQSocketNotifier *writeNotifier();
private:
@@ -899,7 +899,7 @@ private:
* This is actually a wrapper around getaddrinfo().
* @internal
*/
- static int doLookup(const QString& host, const QString& serv, addrinfo& hint,
+ static int doLookup(const TQString& host, const TQString& serv, addrinfo& hint,
kde_addrinfo** result);
protected:
@@ -930,7 +930,7 @@ public:
* @param flags the same flags as getnameinfo()
* @returns 0 on success, nonzero otherwise.
*/
- static int resolve(sockaddr* sock, ksocklen_t len, QString& host, QString& port, int flags = 0) KDE_DEPRECATED;
+ static int resolve(sockaddr* sock, ksocklen_t len, TQString& host, TQString& port, int flags = 0) KDE_DEPRECATED;
/**
* Performs resolution on the given socket address.
@@ -944,7 +944,7 @@ public:
* @param flags the same flags as getnameinfo()
* @returns 0 on success, nonzero otherwise.
*/
- static int resolve(::KSocketAddress* sock, QString& host, QString& port, int flags = 0) KDE_DEPRECATED;
+ static int resolve(::KSocketAddress* sock, TQString& host, TQString& port, int flags = 0) KDE_DEPRECATED;
/** @deprecated
* This function is now deprecated. Please use @ref KNetwork::KResolver::resolve.
@@ -954,7 +954,7 @@ public:
* The error code can be transformed into string by KExtendedSocket::strError()
* with code of IO_LookupError.
*
- * IMPORTANT: the result values of the QPtrList must be deleted after use. So,
+ * IMPORTANT: the result values of the TQPtrList must be deleted after use. So,
* if you don't copy the KAddressInfo objects, the best way to assure that
* is to call setAutoDelete(true) on the list right after this function
* returns. If you do copy the results out, you must assure that the objects
@@ -966,7 +966,7 @@ public:
* @param error pointer to a variable holding the error code
* @return a list of KAddressInfos
*/
- static QPtrList<KAddressInfo> lookup(const QString& host, const QString& port, int flags = 0, int *error = 0) KDE_DEPRECATED;
+ static TQPtrList<KAddressInfo> lookup(const TQString& host, const TQString& port, int flags = 0, int *error = 0) KDE_DEPRECATED;
/**
* Returns the local socket address
@@ -991,7 +991,7 @@ public:
* @param syserr the system error, as from systemError()
* @return the text for the given error code
*/
- static QString strError(int code, int syserr);
+ static TQString strError(int code, int syserr);
/**
* Sets/unsets address reusing flag for this socket.
diff --git a/kdecore/kgenericfactory.h b/kdecore/kgenericfactory.h
index facdcde20..0bdeaa846 100644
--- a/kdecore/kgenericfactory.h
+++ b/kdecore/kgenericfactory.h
@@ -49,7 +49,7 @@ public:
virtual ~KGenericFactoryBase()
{
if ( s_instance )
- KGlobal::locale()->removeCatalogue( QString::fromAscii( s_instance->instanceName() ) );
+ KGlobal::locale()->removeCatalogue( TQString::fromAscii( s_instance->instanceName() ) );
delete s_instance;
s_instance = 0;
s_self = 0;
@@ -72,7 +72,7 @@ protected:
virtual void setupTranslations( void )
{
if ( instance() )
- KGlobal::locale()->insertCatalogue( QString::fromAscii( instance()->instanceName() ) );
+ KGlobal::locale()->insertCatalogue( TQString::fromAscii( instance()->instanceName() ) );
}
void initializeMessageCatalogue()
@@ -85,7 +85,7 @@ protected:
}
private:
- QCString m_instanceName;
+ TQCString m_instanceName;
const KAboutData *m_aboutData;
bool m_catalogueInitialized;
@@ -123,21 +123,21 @@ KInstance *KGenericFactoryBase<T>::instance()
* Note that the class specified as template argument needs to provide
* a certain constructor:
* <ul>
- * <li>If the class is derived from QObject then it needs to have
+ * <li>If the class is derived from TQObject then it needs to have
* a constructor like:
- * <code>MyClass( QObject *parent, const char *name,
- * const QStringList &args );</code>
- * <li>If the class is derived from QWidget then it needs to have
+ * <code>MyClass( TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
+ * <li>If the class is derived from TQWidget then it needs to have
* a constructor like:
- * <code>MyWidget( QWidget *parent, const char *name,
- * const QStringList &args);</code>
+ * <code>MyWidget( TQWidget *parent, const char *name,
+ * const TQStringList &args);</code>
* <li>If the class is derived from KParts::Part then it needs to have
* a constructor like:
- * <code>MyPart( QWidget *parentWidget, const char *widgetName,
- * QObject *parent, const char *name,
- * const QStringList &args );</code>
+ * <code>MyPart( TQWidget *parentWidget, const char *widgetName,
+ * TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
* </ul>
- * The args QStringList passed to the constructor is the args string list
+ * The args TQStringList passed to the constructor is the args string list
* that the caller passed to KLibFactory's create method.
*
* In addition upon instantiation this template provides a central
@@ -161,15 +161,15 @@ KInstance *KGenericFactoryBase<T>::instance()
* {
* Q_ OBJECT
* public:
- * MyPlugin( QObject *parent, const char *name,
- * const QStringList &args );
+ * MyPlugin( TQObject *parent, const char *name,
+ * const TQStringList &args );
* ...
* };
*
* K_EXPORT_COMPONENT_FACTORY( libmyplugin, KGenericFactory&lt;MyPlugin&gt; )
* \endcode
*/
-template <class Product, class ParentType = QObject>
+template <class Product, class ParentType = TQObject>
class KGenericFactory : public KLibFactory, public KGenericFactoryBase<Product>
{
public:
@@ -186,8 +186,8 @@ public:
protected:
- virtual QObject *createObject( QObject *parent, const char *name,
- const char *className, const QStringList &args )
+ virtual TQObject *createObject( TQObject *parent, const char *name,
+ const char *className, const TQStringList &args )
{
KGenericFactoryBase<Product>::initializeMessageCatalogue();
return KDEPrivate::ConcreteFactory<Product, ParentType>
@@ -206,21 +206,21 @@ protected:
* Note that each class in the specified in the typelist template argument
* needs to provide a certain constructor:
* <ul>
- * <li>If the class is derived from QObject then it needs to have
+ * <li>If the class is derived from TQObject then it needs to have
* a constructor like:
- * <code>MyClass( QObject *parent, const char *name,
- * const QStringList &args );</code>
- * <li>If the class is derived from QWidget then it needs to have
+ * <code>MyClass( TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
+ * <li>If the class is derived from TQWidget then it needs to have
* a constructor like:
- * <code>MyWidget( QWidget *parent, const char *name,
- * const QStringList &args);</code>
+ * <code>MyWidget( TQWidget *parent, const char *name,
+ * const TQStringList &args);</code>
* <li>If the class is derived from KParts::Part then it needs to have
* a constructor like:
- * <code>MyPart( QWidget *parentWidget, const char *widgetName,
- * QObject *parent, const char *name,
- * const QStringList &args );</code>
+ * <code>MyPart( TQWidget *parentWidget, const char *widgetName,
+ * TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
* </ul>
- * The args QStringList passed to the constructor is the args string list
+ * The args TQStringList passed to the constructor is the args string list
* that the caller passed to KLibFactory's create method.
*
* In addition upon instantiation this template provides a central
@@ -244,8 +244,8 @@ protected:
* {
* Q_ OBJECT
* public:
- * MyPlugin( QObject *parent, const char *name,
- * const QStringList &args );
+ * MyPlugin( TQObject *parent, const char *name,
+ * const TQStringList &args );
* ...
* };
*
@@ -253,8 +253,8 @@ protected:
* {
* Q_ OBJECT
* public:
- * MyDialogComponent( QWidget *parentWidget, const char *name,
- * const QStringList &args );
+ * MyDialogComponent( TQWidget *parentWidget, const char *name,
+ * const TQStringList &args );
* ...
* };
*
@@ -263,7 +263,7 @@ protected:
* \endcode
*/
template <class Product, class ProductListTail>
-class KGenericFactory< KTypeList<Product, ProductListTail>, QObject >
+class KGenericFactory< KTypeList<Product, ProductListTail>, TQObject >
: public KLibFactory,
public KGenericFactoryBase< KTypeList<Product, ProductListTail> >
{
@@ -281,8 +281,8 @@ public:
protected:
- virtual QObject *createObject( QObject *parent, const char *name,
- const char *className, const QStringList &args )
+ virtual TQObject *createObject( TQObject *parent, const char *name,
+ const char *className, const TQStringList &args )
{
this->initializeMessageCatalogue();
return KDEPrivate::MultiFactory< KTypeList< Product, ProductListTail > >
@@ -301,21 +301,21 @@ protected:
* Note that each class in the specified in the typelist template argument
* needs to provide a certain constructor:
* <ul>
- * <li>If the class is derived from QObject then it needs to have
+ * <li>If the class is derived from TQObject then it needs to have
* a constructor like:
- * <code>MyClass( QObject *parent, const char *name,
- * const QStringList &args );</code>
- * <li>If the class is derived from QWidget then it needs to have
+ * <code>MyClass( TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
+ * <li>If the class is derived from TQWidget then it needs to have
* a constructor like:
- * <code>MyWidget( QWidget *parent, const char *name,
- * const QStringList &args);</code>
+ * <code>MyWidget( TQWidget *parent, const char *name,
+ * const TQStringList &args);</code>
* <li>If the class is derived from KParts::Part then it needs to have
* a constructor like:
- * <code>MyPart( QWidget *parentWidget, const char *widgetName,
- * QObject *parent, const char *name,
- * const QStringList &args );</code>
+ * <code>MyPart( TQWidget *parentWidget, const char *widgetName,
+ * TQObject *parent, const char *name,
+ * const TQStringList &args );</code>
* </ul>
- * The args QStringList passed to the constructor is the args string list
+ * The args TQStringList passed to the constructor is the args string list
* that the caller passed to KLibFactory's create method.
*
* In addition upon instantiation this template provides a central
@@ -339,8 +339,8 @@ protected:
* {
* Q_ OBJECT
* public:
- * MyPlugin( QObject *parent, const char *name,
- * const QStringList &args );
+ * MyPlugin( TQObject *parent, const char *name,
+ * const TQStringList &args );
* ...
* };
*
@@ -348,8 +348,8 @@ protected:
* {
* Q_ OBJECT
* public:
- * MyDialogComponent( QWidget *parentWidget, const char *name,
- * const QStringList &args );
+ * MyDialogComponent( TQWidget *parentWidget, const char *name,
+ * const TQStringList &args );
* ...
* };
*
@@ -377,8 +377,8 @@ public:
protected:
- virtual QObject *createObject( QObject *parent, const char *name,
- const char *className, const QStringList &args )
+ virtual TQObject *createObject( TQObject *parent, const char *name,
+ const char *className, const TQStringList &args )
{
this->initializeMessageCatalogue();
return KDEPrivate::MultiFactory< KTypeList< Product, ProductListTail >,
diff --git a/kdecore/kglobal.cpp b/kdecore/kglobal.cpp
index 188e8f447..b886d8d7f 100644
--- a/kdecore/kglobal.cpp
+++ b/kdecore/kglobal.cpp
@@ -22,9 +22,9 @@
* Generated: Sat May 1 02:08:43 EST 1999
*/
-#include <qglobal.h>
-#include <qdict.h>
-#include <qptrlist.h>
+#include <tqglobal.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
#include "kglobal.h"
#include <kapplication.h>
@@ -38,7 +38,7 @@
#include <kinstance.h>
#include "kstaticdeleter.h"
-#include <qfont.h>
+#include <tqfont.h>
#ifndef NDEBUG
#define MYASSERT(x) if (!x) \
@@ -115,51 +115,51 @@ void KGlobal::setActiveInstance(KInstance *i)
{
_activeInstance = i;
if (i && _locale)
- _locale->setActiveCatalogue(QString::fromUtf8(i->instanceName()));
+ _locale->setActiveCatalogue(TQString::fromUtf8(i->instanceName()));
}
/**
* Create a static QString
*
* To be used inside functions(!) like:
- * static const QString &myString = KGlobal::staticQString("myText");
+ * static const TQString &myString = KGlobal::staticQString("myText");
*/
-const QString &
+const TQString &
KGlobal::staticQString(const char *str)
{
- return staticQString(QString::fromLatin1(str));
+ return staticQString(TQString::fromLatin1(str));
}
-class KStringDict : public QDict<QString>
+class KStringDict : public TQDict<TQString>
{
public:
- KStringDict() : QDict<QString>(139) { }
+ KStringDict() : TQDict<TQString>(139) { }
};
/**
* Create a static QString
*
* To be used inside functions(!) like:
- * static const QString &myString = KGlobal::staticQString(i18n("My Text"));
+ * static const TQString &myString = KGlobal::staticQString(i18n("My Text"));
*/
-const QString &
-KGlobal::staticQString(const QString &str)
+const TQString &
+KGlobal::staticQString(const TQString &str)
{
if (!_stringDict) {
_stringDict = new KStringDict;
_stringDict->setAutoDelete( true );
kglobal_init();
}
- QString *result = _stringDict->find(str);
+ TQString *result = _stringDict->find(str);
if (!result)
{
- result = new QString(str);
+ result = new TQString(str);
_stringDict->insert(str, result);
}
return *result;
}
-class KStaticDeleterList: public QPtrList<KStaticDeleterBase>
+class KStaticDeleterList: public TQPtrList<KStaticDeleterBase>
{
public:
KStaticDeleterList() { }
diff --git a/kdecore/kglobal.h b/kdecore/kglobal.h
index 1c1f75967..14bf26d32 100644
--- a/kdecore/kglobal.h
+++ b/kdecore/kglobal.h
@@ -90,42 +90,42 @@ public:
static KCharsets *charsets();
/**
- * Creates a static QString.
+ * Creates a static TQString.
*
* To be used inside functions(!) like:
* \code
- * static const QString &myString = KGlobal::staticQString("myText");
+ * static const TQString &myString = KGlobal::staticQString("myText");
* \endcode
*
* !!! Do _NOT_ use: !!!
* \code
- * static QString myString = KGlobal::staticQString("myText");
+ * static TQString myString = KGlobal::staticQString("myText");
* \endcode
* This creates a static object (instead of a static reference)
* and as you know static objects are EVIL.
* @param str the string to create
* @return the static string
*/
- static const QString &staticQString(const char *str);
+ static const TQString &staticQString(const char *str);
/**
- * Creates a static QString.
+ * Creates a static TQString.
*
* To be used inside functions(!) like:
* \code
- * static const QString &myString = KGlobal::staticQString(i18n("My Text"));
+ * static const TQString &myString = KGlobal::staticQString(i18n("My Text"));
* \endcode
*
* !!! Do _NOT_ use: !!!
* \code
- * static QString myString = KGlobal::staticQString(i18n("myText"));
+ * static TQString myString = KGlobal::staticQString(i18n("myText"));
* \endcode
* This creates a static object (instead of a static reference)
* and as you know static objects are EVIL.
* @param str the string to create
* @return the static string
*/
- static const QString &staticQString(const QString &str);
+ static const TQString &staticQString(const TQString &str);
/**
* Registers a static deleter.
@@ -228,7 +228,7 @@ int KDECORE_EXPORT kasciistricmp( const char *str1, const char *str2 );
* of other (but no less important) things.
*
* All KDE applications should link to the kdecore library. Also, using a
- * KApplication derived class instead of QApplication is almost
+ * KApplication derived class instead of TQApplication is almost
* mandatory if you expect your application to behave nicely within the
* KDE environment.
*/
diff --git a/kdecore/kglobalaccel.cpp b/kdecore/kglobalaccel.cpp
index 9628b34d3..a3c4ecf33 100644
--- a/kdecore/kglobalaccel.cpp
+++ b/kdecore/kglobalaccel.cpp
@@ -28,7 +28,7 @@
#include "kglobalaccel_emb.h"
#endif
-#include <qstring.h>
+#include <tqstring.h>
#include "kaccelbase.h"
#include <kdebug.h>
#include <kshortcut.h>
@@ -36,8 +36,8 @@
//----------------------------------------------------
-KGlobalAccel::KGlobalAccel( QObject* pParent, const char* psName )
-: QObject( pParent, psName )
+KGlobalAccel::KGlobalAccel( TQObject* pParent, const char* psName )
+: TQObject( pParent, psName )
{
kdDebug(125) << "KGlobalAccel(): this = " << this << endl;
d = new KGlobalAccelPrivate();
@@ -74,9 +74,9 @@ void KGlobalAccel::blockShortcuts( bool block )
void KGlobalAccel::disableBlocking( bool disable )
{ d->disableBlocking( disable ); }
-KAccelAction* KGlobalAccel::insert( const QString& sAction, const QString& sDesc, const QString& sHelp,
+KAccelAction* KGlobalAccel::insert( const TQString& sAction, const TQString& sDesc, const TQString& sHelp,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled )
{
return d->insert( sAction, sDesc, sHelp,
@@ -85,38 +85,38 @@ KAccelAction* KGlobalAccel::insert( const QString& sAction, const QString& sDesc
bConfigurable, bEnabled );
}
-KAccelAction* KGlobalAccel::insert( const QString& sName, const QString& sDesc )
+KAccelAction* KGlobalAccel::insert( const TQString& sName, const TQString& sDesc )
{ return d->insert( sName, sDesc ); }
bool KGlobalAccel::updateConnections()
{ return d->updateConnections(); }
-bool KGlobalAccel::remove( const QString& sAction )
+bool KGlobalAccel::remove( const TQString& sAction )
{ return d->remove( sAction ); }
-const KShortcut& KGlobalAccel::shortcut( const QString& sAction ) const
+const KShortcut& KGlobalAccel::shortcut( const TQString& sAction ) const
{
const KAccelAction* pAction = d->actions().actionPtr( sAction );
return (pAction) ? pAction->shortcut() : KShortcut::null();
}
-bool KGlobalAccel::setShortcut( const QString& sAction, const KShortcut& cut )
+bool KGlobalAccel::setShortcut( const TQString& sAction, const KShortcut& cut )
{ return d->setShortcut( sAction, cut ); }
-bool KGlobalAccel::setSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot )
+bool KGlobalAccel::setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot )
{ return d->setActionSlot( sAction, pObjSlot, psMethodSlot ); }
-QString KGlobalAccel::label( const QString& sAction ) const
+TQString KGlobalAccel::label( const TQString& sAction ) const
{
const KAccelAction* pAction = d->actions().actionPtr( sAction );
- return (pAction) ? pAction->label() : QString();
+ return (pAction) ? pAction->label() : TQString();
}
-bool KGlobalAccel::setActionEnabled( const QString& sAction, bool bEnable )
+bool KGlobalAccel::setActionEnabled( const TQString& sAction, bool bEnable )
{
return d->setActionEnabled( sAction, bEnable );
}
-const QString& KGlobalAccel::configGroup() const
+const TQString& KGlobalAccel::configGroup() const
{ return d->configGroup(); }
// for kdemultimedia/kmix
-void KGlobalAccel::setConfigGroup( const QString& s )
+void KGlobalAccel::setConfigGroup( const TQString& s )
{ d->setConfigGroup( s ); }
bool KGlobalAccel::readSettings( KConfigBase* pConfig )
diff --git a/kdecore/kglobalaccel.h b/kdecore/kglobalaccel.h
index e4b847cdc..9ef9c9fa7 100644
--- a/kdecore/kglobalaccel.h
+++ b/kdecore/kglobalaccel.h
@@ -20,7 +20,7 @@
#ifndef _KGLOBALACCEL_H_
#define _KGLOBALACCEL_H_
-#include <qobject.h>
+#include <tqobject.h>
#include <kshortcut.h>
class QPopupMenu;
@@ -52,7 +52,7 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param pParent the parent of the QObject
* @param psName the name of the QObject
*/
- KGlobalAccel( QObject* pParent, const char* psName = 0 );
+ KGlobalAccel( TQObject* pParent, const char* psName = 0 );
virtual ~KGlobalAccel();
/**
@@ -76,7 +76,7 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* insert( "Do Something", i18n("Do Something"),
* i18n("This action allows you to do something really great with this program to "
* "the currently open document."),
- * ALT+CTRL+Key_Q, KKey::QtWIN+CTRL+Key_Q, this, SLOT(slotDoSomething()) );
+ * ALT+CTRL+Key_Q, KKey::QtWIN+CTRL+Key_Q, this, TQT_SLOT(slotDoSomething()) );
*\endcode
*
* @param sAction The internal name of the action.
@@ -90,9 +90,9 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param bConfigurable Allow the user to change this shortcut if set to 'true'.
* @param bEnabled The action will be activated by the shortcut if set to 'true'.
*/
- KAccelAction* insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable = true, bool bEnabled = true );
/**
@@ -101,7 +101,7 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param sAction the name of the action to remove
* @since 3.1
*/
- bool remove( const QString& sAction );
+ bool remove( const TQString& sAction );
/**
* Use this to insert a label into the action list. This will be
@@ -110,7 +110,7 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param sLabel a user-readable (i18n!) name for the action
* @return the KAccelAction of the action
*/
- KAccelAction* insert( const QString& sName, const QString& sLabel );
+ KAccelAction* insert( const TQString& sName, const TQString& sLabel );
/**
* Updates the connections of the accelerations after changing them.
@@ -123,14 +123,14 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param sAction the name of the action
* @return the shortcut. If the action does not exist a null shortcut will be returned.
*/
- const KShortcut& shortcut( const QString& sAction ) const;
+ const KShortcut& shortcut( const TQString& sAction ) const;
/**
* Set the shortcut to be associated with the action named by @p sAction.
* @param sAction the name of the action
* @param shortcut the shortcut for the action
* @return true if successful, false otherwise
*/
- bool setShortcut( const QString& sAction, const KShortcut &shortcut );
+ bool setShortcut( const TQString& sAction, const KShortcut &shortcut );
/**
* Set the slot to be called when the shortcut of the action named
* by @p sAction is pressed.
@@ -139,34 +139,34 @@ class KDECORE_EXPORT KGlobalAccel : public QObject
* @param psMethodSlot the slot to receive the signal
* @return true if successful, false otherwise
*/
- bool setSlot( const QString& sAction, const QObject* pObjSlot, const char* psMethodSlot );
+ bool setSlot( const TQString& sAction, const TQObject* pObjSlot, const char* psMethodSlot );
/**
* Enables or disables action @p sAction.
* @since 3.4
*/
- bool setActionEnabled( const QString& sAction, bool bEnable );
+ bool setActionEnabled( const TQString& sAction, bool bEnable );
/**
* Return the label (i18n'ized short description) associated with the action named by @p sAction.
* @param sAction the name of the action
* @return the label
* @since 3.3
*/
- QString label( const QString& sAction ) const;
+ TQString label( const TQString& sAction ) const;
/**
* Returns the configuration group that is used to save the accelerators.
* @return the configuration group
* @see KConfig
*/
- const QString& configGroup() const;
+ const TQString& configGroup() const;
/**
* Sets the configuration group that is used to save the accelerators.
* @param cg the configuration group
* @see KConfig
*/
- void setConfigGroup( const QString &cg );
+ void setConfigGroup( const TQString &cg );
/**
* Read all shortcuts from @p pConfig, or (if @p pConfig
diff --git a/kdecore/kglobalaccel_mac.h b/kdecore/kglobalaccel_mac.h
index 413842256..1bed4f3cc 100644
--- a/kdecore/kglobalaccel_mac.h
+++ b/kdecore/kglobalaccel_mac.h
@@ -1,7 +1,7 @@
#ifndef _KGLOBALACCEL_MAC_H
#define _KGLOBALACCEL_MAC_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kshortcut.h"
#include "kaccelbase.h"
diff --git a/kdecore/kglobalaccel_win.cpp b/kdecore/kglobalaccel_win.cpp
index bfd389627..8b0c81f1a 100644
--- a/kdecore/kglobalaccel_win.cpp
+++ b/kdecore/kglobalaccel_win.cpp
@@ -19,17 +19,17 @@
#include "config.h"
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
#ifdef Q_WS_WIN
#include "kglobalaccel_win.h"
#include "kglobalaccel.h"
#include "kkeyserver_x11.h"
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qwidget.h>
-#include <qmetaobject.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqwidget.h>
+#include <tqmetaobject.h>
#include <private/qucomextra_p.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -37,7 +37,7 @@
//----------------------------------------------------
-static QValueList< KGlobalAccelPrivate* >* all_accels = 0;
+static TQValueList< KGlobalAccelPrivate* >* all_accels = 0;
KGlobalAccelPrivate::KGlobalAccelPrivate()
: KAccelBase( KAccelBase::NATIVE_KEYS )
@@ -45,7 +45,7 @@ KGlobalAccelPrivate::KGlobalAccelPrivate()
, m_blockingDisabled( false )
{
if( all_accels == NULL )
- all_accels = new QValueList< KGlobalAccelPrivate* >;
+ all_accels = new TQValueList< KGlobalAccelPrivate* >;
all_accels->append( this );
m_sConfigGroup = "Global Shortcuts";
// kapp->installX11EventFilter( this );
@@ -74,7 +74,7 @@ void KGlobalAccelPrivate::blockShortcuts( bool block )
{
if( all_accels == NULL )
return;
- for( QValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
+ for( TQValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
it != all_accels->end();
++it ) {
if( (*it)->m_blockingDisabled )
@@ -128,7 +128,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
keyCodeX = 111;
}
- kdDebug(125) << QString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" )
+ kdDebug(125) << TQString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" )
.arg( key.key().toStringInternal() ).arg( bGrab )
.arg( keyCodeX, 0, 16 ).arg( keyModX, 0, 16 );
if( !keyCodeX )
@@ -140,13 +140,13 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
// the irrelevant bits are always ignored and we can just make one XGrabKey
// call per accelerator? -- ellis
#ifndef NDEBUG
- QString sDebug = QString("\tcode: 0x%1 state: 0x%2 | ").arg(keyCodeX,0,16).arg(keyModX,0,16);
+ TQString sDebug = TQString("\tcode: 0x%1 state: 0x%2 | ").arg(keyCodeX,0,16).arg(keyModX,0,16);
#endif
uint keyModMaskX = ~g_keyModMaskXOnOrOff;
for( uint irrelevantBitsMask = 0; irrelevantBitsMask <= 0xff; irrelevantBitsMask++ ) {
if( (irrelevantBitsMask & keyModMaskX) == 0 ) {
#ifndef NDEBUG
- sDebug += QString("0x%3, ").arg(irrelevantBitsMask, 0, 16);
+ sDebug += TQString("0x%3, ").arg(irrelevantBitsMask, 0, 16);
#endif
if( bGrab )
XGrabKey( qt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask,
@@ -202,7 +202,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
if( x11KeyPress( pEvent ) )
return true;
default:
- return QWidget::x11Event( pEvent );
+ return TQWidget::x11Event( pEvent );
}
}
@@ -221,7 +221,7 @@ void KGlobalAccelPrivate::x11MappingNotify()
bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
{
// do not change this line unless you really really know what you are doing (Matthias)
- if ( !QWidget::keyboardGrabber() && !QApplication::activePopupWidget() ) {
+ if ( !TQWidget::keyboardGrabber() && !TQApplication::activePopupWidget() ) {
XUngrabKeyboard( qt_xdisplay(), pEvent->xkey.time );
XFlush( qt_xdisplay()); // avoid X(?) bug
}
@@ -261,7 +261,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
KKey key = keyNative;
kdDebug(125) << "x11KeyPress: seek " << key.toStringInternal()
- << QString( " keyCodeX: %1 state: %2 keyModX: %3" )
+ << TQString( " keyCodeX: %1 state: %2 keyModX: %3" )
.arg( codemod.code, 0, 16 ).arg( pEvent->xkey.state, 0, 16 ).arg( codemod.mod, 0, 16 ) << endl;
// Search for which accelerator activated this event:
@@ -269,8 +269,8 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
#ifndef NDEBUG
for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
KAccelAction* pAction = *it;
- kdDebug(125) << "\tcode: " << QString::number(it.key().code, 16) << " mod: " << QString::number(it.key().mod, 16)
- << (pAction ? QString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : QString::null)
+ kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16)
+ << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString::null)
<< endl;
}
#endif
@@ -282,10 +282,10 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
static bool recursion_block = false;
if( !recursion_block ) {
recursion_block = true;
- QPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
- connect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)) );
- pMenu->exec( QPoint( 0, 0 ) );
- disconnect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)));
+ TQPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
+ connect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)) );
+ pMenu->exec( TQPoint( 0, 0 ) );
+ disconnect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
delete pMenu;
recursion_block = false;
}
@@ -301,9 +301,9 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
{
kdDebug(125) << "KGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl;
- QRegExp rexPassIndex( "([ ]*int[ ]*)" );
- QRegExp rexPassInfo( " QString" );
- QRegExp rexIndex( " ([0-9]+)$" );
+ TQRegExp rexPassIndex( "([ ]*int[ ]*)" );
+ TQRegExp rexPassInfo( " TQString" );
+ TQRegExp rexIndex( " ([0-9]+)$" );
// If the slot to be called accepts an integer index
// and an index is present at the end of the action's name,
@@ -315,7 +315,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
if( slot_id >= 0 ) {
QUObject o[2];
static_QUType_int.set(o+1,n);
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) {
int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
@@ -324,12 +324,12 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
static_QUType_QString.set(o+1,pAction->name());
static_QUType_QString.set(o+2,pAction->label());
static_QUType_ptr.set(o+3,&seq);
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else {
int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
if( slot_id >= 0 )
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 );
}
}
diff --git a/kdecore/kglobalaccel_win.h b/kdecore/kglobalaccel_win.h
index d711115cd..414254881 100644
--- a/kdecore/kglobalaccel_win.h
+++ b/kdecore/kglobalaccel_win.h
@@ -20,8 +20,8 @@
#ifndef _KGLOBALACCEL_WIN_H
#define _KGLOBALACCEL_WIN_H
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include "kaccelbase.h"
#include "kkeyserver.h"
@@ -30,7 +30,7 @@
/**
* @internal
*/
-class KGlobalAccelPrivate : public QWidget, public KAccelBase
+class KGlobalAccelPrivate : public TQWidget, public KAccelBase
{
friend class KGlobalAccel;
Q_OBJECT
diff --git a/kdecore/kglobalaccel_x11.cpp b/kdecore/kglobalaccel_x11.cpp
index 249c06460..54038f81a 100644
--- a/kdecore/kglobalaccel_x11.cpp
+++ b/kdecore/kglobalaccel_x11.cpp
@@ -19,17 +19,17 @@
#include "config.h"
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
#ifdef Q_WS_X11
#include "kglobalaccel_x11.h"
#include "kglobalaccel.h"
#include "kkeyserver_x11.h"
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qwidget.h>
-#include <qmetaobject.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqwidget.h>
+#include <tqmetaobject.h>
#include <private/qucomextra_p.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -76,7 +76,7 @@ static void calculateGrabMasks()
//----------------------------------------------------
-static QValueList< KGlobalAccelPrivate* >* all_accels = 0;
+static TQValueList< KGlobalAccelPrivate* >* all_accels = 0;
KGlobalAccelPrivate::KGlobalAccelPrivate()
: KAccelBase( KAccelBase::NATIVE_KEYS )
@@ -85,11 +85,11 @@ KGlobalAccelPrivate::KGlobalAccelPrivate()
, m_suspended( false )
{
if( all_accels == NULL )
- all_accels = new QValueList< KGlobalAccelPrivate* >;
+ all_accels = new TQValueList< KGlobalAccelPrivate* >;
all_accels->append( this );
m_sConfigGroup = "Global Shortcuts";
kapp->installX11EventFilter( this );
- connect(kapp, SIGNAL(coreFakeKeyPress(unsigned int)), this, SLOT(fakeKeyPressed(unsigned int)));
+ connect(kapp, TQT_SIGNAL(coreFakeKeyPress(unsigned int)), this, TQT_SLOT(fakeKeyPressed(unsigned int)));
}
KGlobalAccelPrivate::~KGlobalAccelPrivate()
@@ -115,7 +115,7 @@ void KGlobalAccelPrivate::blockShortcuts( bool block )
{
if( all_accels == NULL )
return;
- for( QValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
+ for( TQValueList< KGlobalAccelPrivate* >::ConstIterator it = all_accels->begin();
it != all_accels->end();
++it ) {
if( (*it)->m_blockingDisabled )
@@ -179,7 +179,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
#ifndef __osf__
// this crashes under Tru64 so .....
- kdDebug(125) << QString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" )
+ kdDebug(125) << TQString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" )
.arg( key.key().toStringInternal() ).arg( bGrab )
.arg( keyCodeX, 0, 16 ).arg( keyModX, 0, 16 );
#endif
@@ -195,13 +195,13 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
// the irrelevant bits are always ignored and we can just make one XGrabKey
// call per accelerator? -- ellis
#ifndef NDEBUG
- QString sDebug = QString("\tcode: 0x%1 state: 0x%2 | ").arg(keyCodeX,0,16).arg(keyModX,0,16);
+ TQString sDebug = TQString("\tcode: 0x%1 state: 0x%2 | ").arg(keyCodeX,0,16).arg(keyModX,0,16);
#endif
uint keyModMaskX = ~g_keyModMaskXOnOrOff;
for( uint irrelevantBitsMask = 0; irrelevantBitsMask <= 0xff; irrelevantBitsMask++ ) {
if( (irrelevantBitsMask & keyModMaskX) == 0 ) {
#ifndef NDEBUG
- sDebug += QString("0x%3, ").arg(irrelevantBitsMask, 0, 16);
+ sDebug += TQString("0x%3, ").arg(irrelevantBitsMask, 0, 16);
#endif
if( bGrab )
XGrabKey( qt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask,
@@ -256,7 +256,7 @@ bool KGlobalAccelPrivate::x11Event( XEvent* pEvent )
if( x11KeyPress( pEvent ) )
return true;
default:
- return QWidget::x11Event( pEvent );
+ return TQWidget::x11Event( pEvent );
}
}
@@ -278,7 +278,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
KKey key = (keyCode, 0);
kdDebug(125) << "fakeKeyPressed: seek " << key.toStringInternal()
- << QString( " keyCodeX: %1 keyCode: %2 keyModX: %3" )
+ << TQString( " keyCodeX: %1 keyCode: %2 keyModX: %3" )
.arg( codemod.code, 0, 16 ).arg( keyCode, 0, 16 ).arg( codemod.mod, 0, 16 ) << endl;
// Search for which accelerator activated this event:
@@ -286,8 +286,8 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
#ifndef NDEBUG
for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
KAccelAction* pAction = *it;
- kdDebug(125) << "\tcode: " << QString::number(it.key().code, 16) << " mod: " << QString::number(it.key().mod, 16)
- << (pAction ? QString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : QString::null)
+ kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16)
+ << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString::null)
<< endl;
}
#endif
@@ -300,10 +300,10 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
static bool recursion_block = false;
if( !recursion_block ) {
recursion_block = true;
- QPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
- connect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)) );
- pMenu->exec( QPoint( 0, 0 ) );
- disconnect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)));
+ TQPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
+ connect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)) );
+ pMenu->exec( TQPoint( 0, 0 ) );
+ disconnect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
delete pMenu;
recursion_block = false;
}
@@ -316,7 +316,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
{
// do not change this line unless you really really know what you are doing (Matthias)
- if ( !QWidget::keyboardGrabber() && !QApplication::activePopupWidget() ) {
+ if ( !TQWidget::keyboardGrabber() && !TQApplication::activePopupWidget() ) {
XUngrabKeyboard( qt_xdisplay(), pEvent->xkey.time );
XFlush( qt_xdisplay()); // avoid X(?) bug
}
@@ -356,7 +356,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
KKey key = keyNative;
kdDebug(125) << "x11KeyPress: seek " << key.toStringInternal()
- << QString( " keyCodeX: %1 state: %2 keyModX: %3" )
+ << TQString( " keyCodeX: %1 state: %2 keyModX: %3" )
.arg( codemod.code, 0, 16 ).arg( pEvent->xkey.state, 0, 16 ).arg( codemod.mod, 0, 16 ) << endl;
// Search for which accelerator activated this event:
@@ -364,8 +364,8 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
#ifndef NDEBUG
for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
KAccelAction* pAction = *it;
- kdDebug(125) << "\tcode: " << QString::number(it.key().code, 16) << " mod: " << QString::number(it.key().mod, 16)
- << (pAction ? QString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : QString::null)
+ kdDebug(125) << "\tcode: " << TQString::number(it.key().code, 16) << " mod: " << TQString::number(it.key().mod, 16)
+ << (pAction ? TQString(" name: \"%1\" shortcut: %2").arg(pAction->name()).arg(pAction->shortcut().toStringInternal()) : TQString::null)
<< endl;
}
#endif
@@ -378,10 +378,10 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
static bool recursion_block = false;
if( !recursion_block ) {
recursion_block = true;
- QPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
- connect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)) );
- pMenu->exec( QPoint( 0, 0 ) );
- disconnect( pMenu, SIGNAL(activated(int)), this, SLOT(slotActivated(int)));
+ TQPopupMenu* pMenu = createPopupMenu( 0, KKeySequence(key) );
+ connect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)) );
+ pMenu->exec( TQPoint( 0, 0 ) );
+ disconnect( pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
delete pMenu;
recursion_block = false;
}
@@ -397,9 +397,9 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
{
kdDebug(125) << "KGlobalAccelPrivate::activate( \"" << pAction->name() << "\" ) " << endl;
- QRegExp rexPassIndex( "([ ]*int[ ]*)" );
- QRegExp rexPassInfo( " QString" );
- QRegExp rexIndex( " ([0-9]+)$" );
+ TQRegExp rexPassIndex( "([ ]*int[ ]*)" );
+ TQRegExp rexPassInfo( " TQString" );
+ TQRegExp rexIndex( " ([0-9]+)$" );
// If the slot to be called accepts an integer index
// and an index is present at the end of the action's name,
@@ -411,7 +411,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
if( slot_id >= 0 ) {
QUObject o[2];
static_QUType_int.set(o+1,n);
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) {
int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
@@ -420,12 +420,12 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
static_QUType_QString.set(o+1,pAction->name());
static_QUType_QString.set(o+2,pAction->label());
static_QUType_ptr.set(o+3,&seq);
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else {
int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
if( slot_id >= 0 )
- const_cast< QObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 );
+ const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 );
}
}
diff --git a/kdecore/kglobalaccel_x11.h b/kdecore/kglobalaccel_x11.h
index 393596837..3022e0d90 100644
--- a/kdecore/kglobalaccel_x11.h
+++ b/kdecore/kglobalaccel_x11.h
@@ -20,8 +20,8 @@
#ifndef _KGLOBALACCEL_X11_H
#define _KGLOBALACCEL_X11_H
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include "kaccelbase.h"
#include "kkeyserver_x11.h"
@@ -30,7 +30,7 @@
/**
* @internal
*/
-class KGlobalAccelPrivate : public QWidget, public KAccelBase
+class KGlobalAccelPrivate : public TQWidget, public KAccelBase
{
friend class KGlobalAccel;
Q_OBJECT
@@ -73,7 +73,7 @@ class KGlobalAccelPrivate : public QWidget, public KAccelBase
return false;
}
};
- typedef QMap<CodeMod, KAccelAction*> CodeModMap;
+ typedef TQMap<CodeMod, KAccelAction*> CodeModMap;
CodeModMap m_rgCodeModToAction;
diff --git a/kdecore/kglobalsettings.cpp b/kdecore/kglobalsettings.cpp
index 25e95f5c6..60f09fadb 100644
--- a/kdecore/kglobalsettings.cpp
+++ b/kdecore/kglobalsettings.cpp
@@ -18,10 +18,10 @@
#include "config.h"
#include "kglobalsettings.h"
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qfontdatabase.h>
-#include <qcursor.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
+#include <tqfontdatabase.h>
+#include <tqcursor.h>
#include <kconfig.h>
#include <ksimpleconfig.h>
@@ -46,61 +46,61 @@ static QRgb qt_colorref2qrgb(COLORREF col)
#include <kcharsets.h>
#include <kaccel.h>
#include <klocale.h>
-#include <qfontinfo.h>
+#include <tqfontinfo.h>
#include <stdlib.h>
#include <kprotocolinfo.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#endif
-QString* KGlobalSettings::s_desktopPath = 0;
-QString* KGlobalSettings::s_autostartPath = 0;
-QString* KGlobalSettings::s_trashPath = 0;
-QString* KGlobalSettings::s_documentPath = 0;
-QFont *KGlobalSettings::_generalFont = 0;
-QFont *KGlobalSettings::_fixedFont = 0;
-QFont *KGlobalSettings::_toolBarFont = 0;
-QFont *KGlobalSettings::_menuFont = 0;
-QFont *KGlobalSettings::_windowTitleFont = 0;
-QFont *KGlobalSettings::_taskbarFont = 0;
-QFont *KGlobalSettings::_largeFont = 0;
-QColor *KGlobalSettings::_kde34Blue = 0;
-QColor *KGlobalSettings::_inactiveBackground = 0;
-QColor *KGlobalSettings::_inactiveForeground = 0;
-QColor *KGlobalSettings::_activeBackground = 0;
-QColor *KGlobalSettings::_buttonBackground = 0;
-QColor *KGlobalSettings::_selectBackground = 0;
-QColor *KGlobalSettings::_linkColor = 0;
-QColor *KGlobalSettings::_visitedLinkColor = 0;
-QColor *KGlobalSettings::alternateColor = 0;
+TQString* KGlobalSettings::s_desktopPath = 0;
+TQString* KGlobalSettings::s_autostartPath = 0;
+TQString* KGlobalSettings::s_trashPath = 0;
+TQString* KGlobalSettings::s_documentPath = 0;
+TQFont *KGlobalSettings::_generalFont = 0;
+TQFont *KGlobalSettings::_fixedFont = 0;
+TQFont *KGlobalSettings::_toolBarFont = 0;
+TQFont *KGlobalSettings::_menuFont = 0;
+TQFont *KGlobalSettings::_windowTitleFont = 0;
+TQFont *KGlobalSettings::_taskbarFont = 0;
+TQFont *KGlobalSettings::_largeFont = 0;
+TQColor *KGlobalSettings::_kde34Blue = 0;
+TQColor *KGlobalSettings::_inactiveBackground = 0;
+TQColor *KGlobalSettings::_inactiveForeground = 0;
+TQColor *KGlobalSettings::_activeBackground = 0;
+TQColor *KGlobalSettings::_buttonBackground = 0;
+TQColor *KGlobalSettings::_selectBackground = 0;
+TQColor *KGlobalSettings::_linkColor = 0;
+TQColor *KGlobalSettings::_visitedLinkColor = 0;
+TQColor *KGlobalSettings::alternateColor = 0;
KGlobalSettings::KMouseSettings *KGlobalSettings::s_mouseSettings = 0;
// helper function for reading xdg user dirs: it is required in order to take
// care of locale stuff
-void readXdgUserDirs(QString *desktop, QString *documents)
+void readXdgUserDirs(TQString *desktop, TQString *documents)
{
- QFile f( QDir::homeDirPath() + "/.config/user-dirs.dirs" );
+ TQFile f( TQDir::homeDirPath() + "/.config/user-dirs.dirs" );
if (!f.open(IO_ReadOnly))
return;
// set the codec for the current locale
- QTextStream s(&f);
- s.setCodec( QTextCodec::codecForLocale() );
+ TQTextStream s(&f);
+ s.setCodec( TQTextCodec::codecForLocale() );
- QString line = s.readLine();
+ TQString line = s.readLine();
while (!line.isNull())
{
if (line.startsWith("XDG_DESKTOP_DIR="))
- *desktop = line.remove("XDG_DESKTOP_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ *desktop = line.remove("XDG_DESKTOP_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_DOCUMENTS_DIR="))
- *documents = line.remove("XDG_DOCUMENTS_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ *documents = line.remove("XDG_DOCUMENTS_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
line = s.readLine();
}
@@ -109,7 +109,7 @@ void readXdgUserDirs(QString *desktop, QString *documents)
int KGlobalSettings::dndEventDelay()
{
KConfigGroup g( KGlobal::config(), "General" );
- return g.readNumEntry("StartDragDist", QApplication::startDragDistance());
+ return g.readNumEntry("StartDragDist", TQApplication::startDragDistance());
}
bool KGlobalSettings::singleClick()
@@ -184,51 +184,51 @@ int KGlobalSettings::contextMenuKey ()
return cut.keyCodeQt();
}
-QColor KGlobalSettings::toolBarHighlightColor()
+TQColor KGlobalSettings::toolBarHighlightColor()
{
initColors();
KConfigGroup g( KGlobal::config(), "Toolbar style" );
return g.readColorEntry("HighlightColor", _kde34Blue);
}
-QColor KGlobalSettings::inactiveTitleColor()
+TQColor KGlobalSettings::inactiveTitleColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTION));
#else
if (!_inactiveBackground)
- _inactiveBackground = new QColor(157, 170, 186);
+ _inactiveBackground = new TQColor(157, 170, 186);
KConfigGroup g( KGlobal::config(), "WM" );
return g.readColorEntry( "inactiveBackground", _inactiveBackground );
#endif
}
-QColor KGlobalSettings::inactiveTextColor()
+TQColor KGlobalSettings::inactiveTextColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT));
#else
if (!_inactiveForeground)
- _inactiveForeground = new QColor(221,221,221);
+ _inactiveForeground = new TQColor(221,221,221);
KConfigGroup g( KGlobal::config(), "WM" );
return g.readColorEntry( "inactiveForeground", _inactiveForeground );
#endif
}
-QColor KGlobalSettings::activeTitleColor()
+TQColor KGlobalSettings::activeTitleColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_ACTIVECAPTION));
#else
initColors();
if (!_activeBackground)
- _activeBackground = new QColor(65,142,220);
+ _activeBackground = new TQColor(65,142,220);
KConfigGroup g( KGlobal::config(), "WM" );
return g.readColorEntry( "activeBackground", _activeBackground);
#endif
}
-QColor KGlobalSettings::activeTextColor()
+TQColor KGlobalSettings::activeTextColor()
{
#ifdef Q_WS_WIN
return qt_colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT));
@@ -244,15 +244,15 @@ int KGlobalSettings::contrast()
return g.readNumEntry( "contrast", 7 );
}
-QColor KGlobalSettings::buttonBackground()
+TQColor KGlobalSettings::buttonBackground()
{
if (!_buttonBackground)
- _buttonBackground = new QColor(221,223,228);
+ _buttonBackground = new TQColor(221,223,228);
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "buttonBackground", _buttonBackground );
}
-QColor KGlobalSettings::buttonTextColor()
+TQColor KGlobalSettings::buttonTextColor()
{
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "buttonForeground", &Qt::black );
@@ -261,7 +261,7 @@ QColor KGlobalSettings::buttonTextColor()
// IMPORTANT:
// This function should be get in sync with
// KApplication::kdisplaySetPalette()
-QColor KGlobalSettings::baseColor()
+TQColor KGlobalSettings::baseColor()
{
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "windowBackground", &Qt::white );
@@ -270,7 +270,7 @@ QColor KGlobalSettings::baseColor()
// IMPORTANT:
// This function should be get in sync with
// KApplication::kdisplaySetPalette()
-QColor KGlobalSettings::textColor()
+TQColor KGlobalSettings::textColor()
{
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "windowForeground", &Qt::black );
@@ -279,7 +279,7 @@ QColor KGlobalSettings::textColor()
// IMPORTANT:
// This function should be get in sync with
// KApplication::kdisplaySetPalette()
-QColor KGlobalSettings::highlightedTextColor()
+TQColor KGlobalSettings::highlightedTextColor()
{
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "selectForeground", &Qt::white );
@@ -288,16 +288,16 @@ QColor KGlobalSettings::highlightedTextColor()
// IMPORTANT:
// This function should be get in sync with
// KApplication::kdisplaySetPalette()
-QColor KGlobalSettings::highlightColor()
+TQColor KGlobalSettings::highlightColor()
{
initColors();
if (!_selectBackground)
- _selectBackground = new QColor(103,141,178);
+ _selectBackground = new TQColor(103,141,178);
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "selectBackground", _selectBackground );
}
-QColor KGlobalSettings::alternateBackgroundColor()
+TQColor KGlobalSettings::alternateBackgroundColor()
{
initColors();
KConfigGroup g( KGlobal::config(), "General" );
@@ -305,10 +305,10 @@ QColor KGlobalSettings::alternateBackgroundColor()
return g.readColorEntry( "alternateBackground", alternateColor );
}
-QColor KGlobalSettings::calculateAlternateBackgroundColor(const QColor& base)
+TQColor KGlobalSettings::calculateAlternateBackgroundColor(const TQColor& base)
{
if (base == Qt::white)
- return QColor(238,246,255);
+ return TQColor(238,246,255);
else
{
int h, s, v;
@@ -318,7 +318,7 @@ QColor KGlobalSettings::calculateAlternateBackgroundColor(const QColor& base)
else if (base != Qt::black)
return base.light(110);
- return QColor(32,32,32);
+ return TQColor(32,32,32);
}
}
@@ -328,32 +328,32 @@ bool KGlobalSettings::shadeSortColumn()
return g.readBoolEntry( "shadeSortColumn", KDE_DEFAULT_SHADE_SORT_COLUMN );
}
-QColor KGlobalSettings::linkColor()
+TQColor KGlobalSettings::linkColor()
{
initColors();
if (!_linkColor)
- _linkColor = new QColor(0,0,238);
+ _linkColor = new TQColor(0,0,238);
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "linkColor", _linkColor );
}
-QColor KGlobalSettings::visitedLinkColor()
+TQColor KGlobalSettings::visitedLinkColor()
{
if (!_visitedLinkColor)
- _visitedLinkColor = new QColor(82,24,139);
+ _visitedLinkColor = new TQColor(82,24,139);
KConfigGroup g( KGlobal::config(), "General" );
return g.readColorEntry( "visitedLinkColor", _visitedLinkColor );
}
-QFont KGlobalSettings::generalFont()
+TQFont KGlobalSettings::generalFont()
{
if (_generalFont)
return *_generalFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _generalFont = new QFont("Sans Serif", 10);
+ _generalFont = new TQFont("Sans Serif", 10);
_generalFont->setPointSize(10);
- _generalFont->setStyleHint(QFont::SansSerif);
+ _generalFont->setStyleHint(TQFont::SansSerif);
KConfigGroup g( KGlobal::config(), "General" );
*_generalFont = g.readFontEntry("font", _generalFont);
@@ -361,15 +361,15 @@ QFont KGlobalSettings::generalFont()
return *_generalFont;
}
-QFont KGlobalSettings::fixedFont()
+TQFont KGlobalSettings::fixedFont()
{
if (_fixedFont)
return *_fixedFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _fixedFont = new QFont("Monospace", 10);
+ _fixedFont = new TQFont("Monospace", 10);
_fixedFont->setPointSize(10);
- _fixedFont->setStyleHint(QFont::TypeWriter);
+ _fixedFont->setStyleHint(TQFont::TypeWriter);
KConfigGroup g( KGlobal::config(), "General" );
*_fixedFont = g.readFontEntry("fixed", _fixedFont);
@@ -377,15 +377,15 @@ QFont KGlobalSettings::fixedFont()
return *_fixedFont;
}
-QFont KGlobalSettings::toolBarFont()
+TQFont KGlobalSettings::toolBarFont()
{
if(_toolBarFont)
return *_toolBarFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _toolBarFont = new QFont("Sans Serif", 10);
+ _toolBarFont = new TQFont("Sans Serif", 10);
_toolBarFont->setPointSize(10);
- _toolBarFont->setStyleHint(QFont::SansSerif);
+ _toolBarFont->setStyleHint(TQFont::SansSerif);
KConfigGroup g( KGlobal::config(), "General" );
*_toolBarFont = g.readFontEntry("toolBarFont", _toolBarFont);
@@ -393,15 +393,15 @@ QFont KGlobalSettings::toolBarFont()
return *_toolBarFont;
}
-QFont KGlobalSettings::menuFont()
+TQFont KGlobalSettings::menuFont()
{
if(_menuFont)
return *_menuFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _menuFont = new QFont("Sans Serif", 10);
+ _menuFont = new TQFont("Sans Serif", 10);
_menuFont->setPointSize(10);
- _menuFont->setStyleHint(QFont::SansSerif);
+ _menuFont->setStyleHint(TQFont::SansSerif);
KConfigGroup g( KGlobal::config(), "General" );
*_menuFont = g.readFontEntry("menuFont", _menuFont);
@@ -409,15 +409,15 @@ QFont KGlobalSettings::menuFont()
return *_menuFont;
}
-QFont KGlobalSettings::windowTitleFont()
+TQFont KGlobalSettings::windowTitleFont()
{
if(_windowTitleFont)
return *_windowTitleFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _windowTitleFont = new QFont("Sans Serif", 9, QFont::Bold);
+ _windowTitleFont = new TQFont("Sans Serif", 9, TQFont::Bold);
_windowTitleFont->setPointSize(10);
- _windowTitleFont->setStyleHint(QFont::SansSerif);
+ _windowTitleFont->setStyleHint(TQFont::SansSerif);
KConfigGroup g( KGlobal::config(), "WM" );
*_windowTitleFont = g.readFontEntry("activeFont", _windowTitleFont); // inconsistency
@@ -425,15 +425,15 @@ QFont KGlobalSettings::windowTitleFont()
return *_windowTitleFont;
}
-QFont KGlobalSettings::taskbarFont()
+TQFont KGlobalSettings::taskbarFont()
{
if(_taskbarFont)
return *_taskbarFont;
// Sync default with kdebase/kcontrol/fonts/fonts.cpp
- _taskbarFont = new QFont("Sans Serif", 10);
+ _taskbarFont = new TQFont("Sans Serif", 10);
_taskbarFont->setPointSize(10);
- _taskbarFont->setStyleHint(QFont::SansSerif);
+ _taskbarFont->setStyleHint(TQFont::SansSerif);
KConfigGroup g( KGlobal::config(), "General" );
*_taskbarFont = g.readFontEntry("taskbarFont", _taskbarFont);
@@ -442,10 +442,10 @@ QFont KGlobalSettings::taskbarFont()
}
-QFont KGlobalSettings::largeFont(const QString &text)
+TQFont KGlobalSettings::largeFont(const TQString &text)
{
- QFontDatabase db;
- QStringList fam = db.families();
+ TQFontDatabase db;
+ TQStringList fam = db.families();
// Move a bunch of preferred fonts to the front.
if (fam.remove("Arial"))
@@ -466,14 +466,14 @@ QFont KGlobalSettings::largeFont(const QString &text)
if (_largeFont)
fam.prepend(_largeFont->family());
- for(QStringList::ConstIterator it = fam.begin();
+ for(TQStringList::ConstIterator it = fam.begin();
it != fam.end(); ++it)
{
if (db.isSmoothlyScalable(*it) && !db.isFixedPitch(*it))
{
- QFont font(*it);
+ TQFont font(*it);
font.setPixelSize(75);
- QFontMetrics metrics(font);
+ TQFontMetrics metrics(font);
int h = metrics.height();
if ((h < 60) || ( h > 90))
continue;
@@ -491,11 +491,11 @@ QFont KGlobalSettings::largeFont(const QString &text)
continue;
font.setPointSize(48);
- _largeFont = new QFont(font);
+ _largeFont = new TQFont(font);
return *_largeFont;
}
}
- _largeFont = new QFont(KGlobalSettings::generalFont());
+ _largeFont = new TQFont(KGlobalSettings::generalFont());
_largeFont->setPointSize(48);
return *_largeFont;
}
@@ -505,28 +505,28 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an
if ( s_desktopPath != 0 )
return;
- s_desktopPath = new QString();
- s_autostartPath = new QString();
- s_trashPath = new QString();
- s_documentPath = new QString();
+ s_desktopPath = new TQString();
+ s_autostartPath = new TQString();
+ s_trashPath = new TQString();
+ s_documentPath = new TQString();
KConfigGroup g( KGlobal::config(), "Paths" );
// Read desktop and documents path using XDG_USER_DIRS
readXdgUserDirs(s_desktopPath, s_documentPath);
- *s_desktopPath = QDir::cleanDirPath( *s_desktopPath );
+ *s_desktopPath = TQDir::cleanDirPath( *s_desktopPath );
if ( !s_desktopPath->endsWith("/") )
s_desktopPath->append('/');
- *s_documentPath = QDir::cleanDirPath( *s_documentPath );
+ *s_documentPath = TQDir::cleanDirPath( *s_documentPath );
if ( !s_documentPath->endsWith("/"))
s_documentPath->append('/');
// Trash Path - TODO remove in KDE4 (kio_trash can't use it for interoperability reasons)
*s_trashPath = *s_desktopPath + i18n("Trash") + "/";
*s_trashPath = g.readPathEntry( "Trash" , *s_trashPath);
- *s_trashPath = QDir::cleanDirPath( *s_trashPath );
+ *s_trashPath = TQDir::cleanDirPath( *s_trashPath );
if ( !s_trashPath->endsWith("/") )
s_trashPath->append('/');
// We need to save it in any case, in case the language changes later on,
@@ -539,7 +539,7 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an
// Autostart Path
*s_autostartPath = KGlobal::dirs()->localkdedir() + "Autostart/";
*s_autostartPath = g.readPathEntry( "Autostart" , *s_autostartPath);
- *s_autostartPath = QDir::cleanDirPath( *s_autostartPath );
+ *s_autostartPath = TQDir::cleanDirPath( *s_autostartPath );
if ( !s_autostartPath->endsWith("/") )
s_autostartPath->append('/');
@@ -551,13 +551,13 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an
void KGlobalSettings::initColors()
{
if (!_kde34Blue) {
- if (QPixmap::defaultDepth() > 8)
- _kde34Blue = new QColor(103,141,178);
+ if (TQPixmap::defaultDepth() > 8)
+ _kde34Blue = new TQColor(103,141,178);
else
- _kde34Blue = new QColor(0, 0, 192);
+ _kde34Blue = new TQColor(0, 0, 192);
}
if (!alternateColor)
- alternateColor = new QColor(237, 244, 249);
+ alternateColor = new TQColor(237, 244, 249);
}
void KGlobalSettings::rereadFontSettings()
@@ -598,7 +598,7 @@ KGlobalSettings::KMouseSettings & KGlobalSettings::mouseSettings()
#ifndef Q_WS_WIN
KConfigGroup g( KGlobal::config(), "Mouse" );
- QString setting = g.readEntry("MouseButtonMapping");
+ TQString setting = g.readEntry("MouseButtonMapping");
if (setting == "RightHanded")
s.handed = KMouseSettings::RightHanded;
else if (setting == "LeftHanded")
@@ -652,7 +652,7 @@ bool KGlobalSettings::isMultiHead()
#ifdef Q_WS_WIN
return GetSystemMetrics(SM_CMONITORS) > 1;
#else
- QCString multiHead = getenv("KDE_MULTIHEAD");
+ TQCString multiHead = getenv("KDE_MULTIHEAD");
if (!multiHead.isEmpty()) {
return (multiHead.lower() == "true");
}
@@ -666,16 +666,16 @@ bool KGlobalSettings::wheelMouseZooms()
return g.readBoolEntry( "WheelMouseZooms", KDE_DEFAULT_WHEEL_ZOOM );
}
-QRect KGlobalSettings::splashScreenDesktopGeometry()
+TQRect KGlobalSettings::splashScreenDesktopGeometry()
{
- QDesktopWidget *dw = QApplication::desktop();
+ TQDesktopWidget *dw = TQApplication::desktop();
if (dw->isVirtualDesktop()) {
KConfigGroup group(KGlobal::config(), "Windows");
int scr = group.readNumEntry("Unmanaged", -3);
if (group.readBoolEntry("XineramaEnabled", true) && scr != -2) {
if (scr == -3)
- scr = dw->screenNumber(QCursor::pos());
+ scr = dw->screenNumber(TQCursor::pos());
return dw->screenGeometry(scr);
} else {
return dw->geometry();
@@ -685,9 +685,9 @@ QRect KGlobalSettings::splashScreenDesktopGeometry()
}
}
-QRect KGlobalSettings::desktopGeometry(const QPoint& point)
+TQRect KGlobalSettings::desktopGeometry(const TQPoint& point)
{
- QDesktopWidget *dw = QApplication::desktop();
+ TQDesktopWidget *dw = TQApplication::desktop();
if (dw->isVirtualDesktop()) {
KConfigGroup group(KGlobal::config(), "Windows");
@@ -702,9 +702,9 @@ QRect KGlobalSettings::desktopGeometry(const QPoint& point)
}
}
-QRect KGlobalSettings::desktopGeometry(QWidget* w)
+TQRect KGlobalSettings::desktopGeometry(TQWidget* w)
{
- QDesktopWidget *dw = QApplication::desktop();
+ TQDesktopWidget *dw = TQApplication::desktop();
if (dw->isVirtualDesktop()) {
KConfigGroup group(KGlobal::config(), "Windows");
@@ -731,7 +731,7 @@ bool KGlobalSettings::showIconsOnPushButtons()
bool KGlobalSettings::showFilePreview(const KURL &url)
{
KConfigGroup g(KGlobal::config(), "PreviewSettings");
- QString protocol = url.protocol();
+ TQString protocol = url.protocol();
bool defaultSetting = KProtocolInfo::showFilePreview( protocol );
return g.readBoolEntry(protocol, defaultSetting );
}
diff --git a/kdecore/kglobalsettings.h b/kdecore/kglobalsettings.h
index 4f5977bd2..7b5c37ed1 100644
--- a/kdecore/kglobalsettings.h
+++ b/kdecore/kglobalsettings.h
@@ -18,9 +18,9 @@
#ifndef _KGLOBALSETTINGS_H
#define _KGLOBALSETTINGS_H
-#include <qstring.h>
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqfont.h>
#include "kdelibs_export.h"
#define KDE_DEFAULT_SINGLECLICK true
@@ -55,25 +55,25 @@ class KDECORE_EXPORT KGlobalSettings
* to click on something but moved the mouse a bit while doing so.
*
* For this to work you must save the position of the mouse (oldPos)
- * in the QWidget::mousePressEvent().
+ * in the TQWidget::mousePressEvent().
* When the position of the mouse (newPos)
- * in a QWidget::mouseMoveEvent() exceeds this threshold
+ * in a TQWidget::mouseMoveEvent() exceeds this threshold
* you may start a drag
* which should originate from oldPos.
*
* Example code:
* \code
- * void KColorCells::mousePressEvent( QMouseEvent *e )
+ * void KColorCells::mousePressEvent( TQMouseEvent *e )
* {
* mOldPos = e->pos();
* }
*
- * void KColorCells::mouseMoveEvent( QMouseEvent *e )
+ * void KColorCells::mouseMoveEvent( TQMouseEvent *e )
* {
* if( !(e->state() && LeftButton)) return;
*
* int delay = KGlobalSettings::dndEventDelay();
- * QPoint newPos = e->pos();
+ * TQPoint newPos = e->pos();
* if(newPos.x() > mOldPos.x()+delay || newPos.x() < mOldPos.x()-delay ||
* newPos.y() > mOldPos.y()+delay || newPos.y() < mOldPos.y()-delay)
* {
@@ -222,20 +222,20 @@ class KDECORE_EXPORT KGlobalSettings
* The path to the desktop directory of the current user.
* @return the user's desktop directory
*/
- static QString desktopPath() { initStatic(); return *s_desktopPath; }
+ static TQString desktopPath() { initStatic(); return *s_desktopPath; }
/**
* The path to the autostart directory of the current user.
* @return the path of the autostart directory
*/
- static QString autostartPath() { initStatic(); return *s_autostartPath; }
+ static TQString autostartPath() { initStatic(); return *s_autostartPath; }
/**
* DEPRECATED (starting from kde-3.4).
* This isn't where the trash contents is, anymore.
* Use KIO::trash() to trash files, "trash:/" to list the trash contents.
*/
- static QString trashPath() { initStatic(); return *s_trashPath; }
+ static TQString trashPath() { initStatic(); return *s_trashPath; }
// KDE4: if you want to remove the above, move it to kdesktop/init.cc, which needs
// to know the old location of the trash
@@ -243,38 +243,38 @@ class KDECORE_EXPORT KGlobalSettings
* The path where documents are stored of the current user.
* @return the path of the document directory
*/
- static QString documentPath() { initStatic(); return *s_documentPath; }
+ static TQString documentPath() { initStatic(); return *s_documentPath; }
/**
* The default color to use when highlighting toolbar buttons.
* @return the toolbar highlight color
*/
- static QColor toolBarHighlightColor();
+ static TQColor toolBarHighlightColor();
/**
* The default color to use for inactive titles.
* @return the inactive title color
*/
- static QColor inactiveTitleColor();
+ static TQColor inactiveTitleColor();
/**
* The default color to use for inactive texts.
* @return the inactive text color
*/
- static QColor inactiveTextColor();
+ static TQColor inactiveTextColor();
/**
* The default color to use for active titles.
* @return the active title color
*/
- static QColor activeTitleColor();
+ static TQColor activeTitleColor();
/**
* The default color to use for active texts.
* @return the active text color
*/
- static QColor activeTextColor();
+ static TQColor activeTextColor();
/**
* Returns the contrast for borders.
@@ -288,54 +288,54 @@ class KDECORE_EXPORT KGlobalSettings
* @return the button background color
* @since 3.4
*/
- static QColor buttonBackground();
+ static TQColor buttonBackground();
/**
* Returns the button text color
* @return the button text color
* @since 3.4
*/
- static QColor buttonTextColor();
+ static TQColor buttonTextColor();
/**
* Returns the default base (background) color.
* @return the default base (background) color
- * @see QColorGroup::base()
+ * @see TQColorGroup::base()
*/
- static QColor baseColor();
+ static TQColor baseColor();
/**
* Returns the default text color.
* @return the default text color
- * @see QColorGroup::text()
+ * @see TQColorGroup::text()
*/
- static QColor textColor();
+ static TQColor textColor();
/**
* Returns the default link color.
* @return the default link color
*/
- static QColor linkColor();
+ static TQColor linkColor();
/**
* Returns the default color for visited links.
* @return the default color for visited links
*/
- static QColor visitedLinkColor();
+ static TQColor visitedLinkColor();
/**
* Returns the default color for highlighted text.
* @return the default color for highlighted text
- * @see QColorGroup::hightlightedText()
+ * @see TQColorGroup::hightlightedText()
*/
- static QColor highlightedTextColor();
+ static TQColor highlightedTextColor();
/**
* Returns the default color for text highlights.
* @return the default color for text highlights
- * @see QColorGroup::hightlight()
+ * @see TQColorGroup::hightlight()
*/
- static QColor highlightColor();
+ static TQColor highlightColor();
/**
* Returns the alternate background color used by KListView with
@@ -345,7 +345,7 @@ class KDECORE_EXPORT KGlobalSettings
* @return the alternate background color
* @see calculateAlternateBackgroundColor
*/
- static QColor alternateBackgroundColor();
+ static TQColor alternateBackgroundColor();
/**
* Calculates a color based on @p base to be used as alternating
@@ -354,7 +354,7 @@ class KDECORE_EXPORT KGlobalSettings
* @return the calculated color
* @see alternateBackgroundColor
*/
- static QColor calculateAlternateBackgroundColor(const QColor& base);
+ static TQColor calculateAlternateBackgroundColor(const TQColor& base);
/**
* Returns if the sorted column in a KListView shall be drawn with a
@@ -368,37 +368,37 @@ class KDECORE_EXPORT KGlobalSettings
* Returns the default general font.
* @return the default general font.
*/
- static QFont generalFont();
+ static TQFont generalFont();
/**
* Returns the default fixed font.
* @return the default fixed font.
*/
- static QFont fixedFont();
+ static TQFont fixedFont();
/**
* Returns the default toolbar font.
* @return the default toolbar font.
*/
- static QFont toolBarFont();
+ static TQFont toolBarFont();
/**
* Returns the default menu font.
* @return the default menu font.
*/
- static QFont menuFont();
+ static TQFont menuFont();
/**
* Returns the default window title font.
* @return the default window title font.
*/
- static QFont windowTitleFont();
+ static TQFont windowTitleFont();
/**
* Returns the default taskbar font.
* @return the default taskbar font.
*/
- static QFont taskbarFont();
+ static TQFont taskbarFont();
/**
* Returns a font of approx. 48 pt. capable of showing @p text.
@@ -406,7 +406,7 @@ class KDECORE_EXPORT KGlobalSettings
* @return the font that is capable to show the text with 48 pt
* @since 3.1
*/
- static QFont largeFont(const QString &text = QString::null);
+ static TQFont largeFont(const TQString &text = TQString::null);
/**
* Returns if the user specified multihead. In case the display
@@ -418,9 +418,9 @@ class KDECORE_EXPORT KGlobalSettings
static bool isMultiHead();
/**
- * Typically, QScrollView derived classes can be scrolled fast by
+ * Typically, TQScrollView derived classes can be scrolled fast by
* holding down the Ctrl-button during wheel-scrolling.
- * But QTextEdit and derived classes perform zooming instead of fast
+ * But TQTextEdit and derived classes perform zooming instead of fast
* scrolling.
*
* This value determines whether the user wants to zoom or scroll fast
@@ -441,7 +441,7 @@ class KDECORE_EXPORT KGlobalSettings
* start at (0,0).
* @since 3.2
*/
- static QRect splashScreenDesktopGeometry();
+ static TQRect splashScreenDesktopGeometry();
/**
* This function returns the desktop geometry for an application that needs
@@ -459,7 +459,7 @@ class KDECORE_EXPORT KGlobalSettings
* start at (0,0).
* @since 3.2
*/
- static QRect desktopGeometry(const QPoint& point);
+ static TQRect desktopGeometry(const TQPoint& point);
/**
* This function returns the desktop geometry for an application that needs
@@ -474,7 +474,7 @@ class KDECORE_EXPORT KGlobalSettings
* start at (0,0).
* @since 3.2
*/
- static QRect desktopGeometry(QWidget* w);
+ static TQRect desktopGeometry(TQWidget* w);
/**
* This function determines if the user wishes to see icons on the
@@ -498,7 +498,7 @@ class KDECORE_EXPORT KGlobalSettings
/**
* Whether the user wishes to use opaque resizing. Primarily
- * intended for QSplitter::setOpaqueResize()
+ * intended for TQSplitter::setOpaqueResize()
*
* @return Returns true if user wants to use opaque resizing.
*
@@ -538,26 +538,26 @@ private:
static void rereadMouseSettings();
- static QString* s_desktopPath;
- static QString* s_autostartPath;
- static QString* s_trashPath;
- static QString* s_documentPath;
- static QFont *_generalFont;
- static QFont *_fixedFont;
- static QFont *_toolBarFont;
- static QFont *_menuFont;
- static QFont *_windowTitleFont;
- static QFont *_taskbarFont;
- static QFont *_largeFont;
- static QColor * _kde34Blue;
- static QColor * _inactiveBackground;
- static QColor * _inactiveForeground;
- static QColor * _activeBackground;
- static QColor * _buttonBackground;
- static QColor * _selectBackground;
- static QColor * _linkColor;
- static QColor * _visitedLinkColor;
- static QColor * alternateColor;
+ static TQString* s_desktopPath;
+ static TQString* s_autostartPath;
+ static TQString* s_trashPath;
+ static TQString* s_documentPath;
+ static TQFont *_generalFont;
+ static TQFont *_fixedFont;
+ static TQFont *_toolBarFont;
+ static TQFont *_menuFont;
+ static TQFont *_windowTitleFont;
+ static TQFont *_taskbarFont;
+ static TQFont *_largeFont;
+ static TQColor * _kde34Blue;
+ static TQColor * _inactiveBackground;
+ static TQColor * _inactiveForeground;
+ static TQColor * _activeBackground;
+ static TQColor * _buttonBackground;
+ static TQColor * _selectBackground;
+ static TQColor * _linkColor;
+ static TQColor * _visitedLinkColor;
+ static TQColor * alternateColor;
static KMouseSettings *s_mouseSettings;
friend class KApplication;
diff --git a/kdecore/kiconeffect.cpp b/kdecore/kiconeffect.cpp
index 780bea576..cf0095ca9 100644
--- a/kdecore/kiconeffect.cpp
+++ b/kdecore/kiconeffect.cpp
@@ -15,18 +15,18 @@
#include <unistd.h>
#include <math.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qbitmap.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qcolor.h>
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qapplication.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqbitmap.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqcolor.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqapplication.h>
+#include <tqpoint.h>
+#include <tqrect.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -45,8 +45,8 @@ extern bool qt_has_xft;
class KIconEffectPrivate
{
public:
- QString mKey[6][3];
- QColor mColor2[6][3];
+ TQString mKey[6][3];
+ TQColor mColor2[6][3];
};
KIconEffect::KIconEffect()
@@ -66,25 +66,25 @@ void KIconEffect::init()
KConfig *config = KGlobal::config();
int i, j, effect=-1;
- QStringList groups;
+ TQStringList groups;
groups += "Desktop";
groups += "Toolbar";
groups += "MainToolbar";
groups += "Small";
groups += "Panel";
- QStringList states;
+ TQStringList states;
states += "Default";
states += "Active";
states += "Disabled";
- QStringList::ConstIterator it, it2;
- QString _togray("togray");
- QString _colorize("colorize");
- QString _desaturate("desaturate");
- QString _togamma("togamma");
- QString _none("none");
- QString _tomonochrome("tomonochrome");
+ TQStringList::ConstIterator it, it2;
+ TQString _togray("togray");
+ TQString _colorize("colorize");
+ TQString _desaturate("desaturate");
+ TQString _togamma("togamma");
+ TQString _none("none");
+ TQString _tomonochrome("tomonochrome");
KConfigGroupSaver cs(config, "default");
@@ -101,17 +101,17 @@ void KIconEffect::init()
mValue[i][0] = 1.0;
mValue[i][1] = ((i==0)||(i==4)) ? 0.7 : 1.0;
mValue[i][2] = 1.0;
- mColor[i][0] = QColor(144,128,248);
- mColor[i][1] = QColor(169,156,255);
- mColor[i][2] = QColor(34,202,0);
- d->mColor2[i][0] = QColor(0,0,0);
- d->mColor2[i][1] = QColor(0,0,0);
- d->mColor2[i][2] = QColor(0,0,0);
+ mColor[i][0] = TQColor(144,128,248);
+ mColor[i][1] = TQColor(169,156,255);
+ mColor[i][2] = TQColor(34,202,0);
+ d->mColor2[i][0] = TQColor(0,0,0);
+ d->mColor2[i][1] = TQColor(0,0,0);
+ d->mColor2[i][2] = TQColor(0,0,0);
config->setGroup(*it + "Icons");
for (it2=states.begin(), j=0; it2!=states.end(); it2++, j++)
{
- QString tmp = config->readEntry(*it2 + "Effect");
+ TQString tmp = config->readEntry(*it2 + "Effect");
if (tmp == _togray)
effect = ToGray;
else if (tmp == _colorize)
@@ -142,19 +142,19 @@ bool KIconEffect::hasEffect(int group, int state) const
return mEffect[group][state] != NoEffect;
}
-QString KIconEffect::fingerprint(int group, int state) const
+TQString KIconEffect::fingerprint(int group, int state) const
{
if ( group >= KIcon::LastGroup ) return "";
- QString cached = d->mKey[group][state];
+ TQString cached = d->mKey[group][state];
if (cached.isEmpty())
{
- QString tmp;
+ TQString tmp;
cached = tmp.setNum(mEffect[group][state]);
cached += ':';
cached += tmp.setNum(mValue[group][state]);
cached += ':';
- cached += mTrans[group][state] ? QString::fromLatin1("trans")
- : QString::fromLatin1("notrans");
+ cached += mTrans[group][state] ? TQString::fromLatin1("trans")
+ : TQString::fromLatin1("notrans");
if (mEffect[group][state] == Colorize || mEffect[group][state] == ToMonochrome)
{
cached += ':';
@@ -172,7 +172,7 @@ QString KIconEffect::fingerprint(int group, int state) const
return cached;
}
-QImage KIconEffect::apply(QImage image, int group, int state) const
+TQImage KIconEffect::apply(TQImage image, int group, int state) const
{
if (state >= KIcon::LastState)
{
@@ -188,12 +188,12 @@ QImage KIconEffect::apply(QImage image, int group, int state) const
mColor[group][state], d->mColor2[group][state], mTrans[group][state]);
}
-QImage KIconEffect::apply(QImage image, int effect, float value, const QColor col, bool trans) const
+TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, bool trans) const
{
return apply (image, effect, value, col, KGlobalSettings::baseColor(), trans);
}
-QImage KIconEffect::apply(QImage image, int effect, float value, const QColor col, const QColor col2, bool trans) const
+TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, const TQColor col2, bool trans) const
{
if (effect >= LastEffect )
{
@@ -229,7 +229,7 @@ QImage KIconEffect::apply(QImage image, int effect, float value, const QColor co
return image;
}
-QPixmap KIconEffect::apply(QPixmap pixmap, int group, int state) const
+TQPixmap KIconEffect::apply(TQPixmap pixmap, int group, int state) const
{
if (state >= KIcon::LastState)
{
@@ -245,16 +245,16 @@ QPixmap KIconEffect::apply(QPixmap pixmap, int group, int state) const
mColor[group][state], d->mColor2[group][state], mTrans[group][state]);
}
-QPixmap KIconEffect::apply(QPixmap pixmap, int effect, float value,
- const QColor col, bool trans) const
+TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
+ const TQColor col, bool trans) const
{
return apply (pixmap, effect, value, col, KGlobalSettings::baseColor(), trans);
}
-QPixmap KIconEffect::apply(QPixmap pixmap, int effect, float value,
- const QColor col, const QColor col2, bool trans) const
+TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
+ const TQColor col, const TQColor col2, bool trans) const
{
- QPixmap result;
+ TQPixmap result;
if (effect >= LastEffect )
{
@@ -269,7 +269,7 @@ QPixmap KIconEffect::apply(QPixmap pixmap, int effect, float value,
}
else if ( effect != NoEffect )
{
- QImage tmpImg = pixmap.convertToImage();
+ TQImage tmpImg = pixmap.convertToImage();
tmpImg = apply(tmpImg, effect, value, col, col2, trans);
result.convertFromImage(tmpImg);
}
@@ -282,7 +282,7 @@ QPixmap KIconEffect::apply(QPixmap pixmap, int effect, float value,
// Taken from KImageEffect. We don't want to link kdecore to kdeui! As long
// as this code is not too big, it doesn't seem much of a problem to me.
-void KIconEffect::toGray(QImage &img, float value)
+void KIconEffect::toGray(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -304,7 +304,7 @@ void KIconEffect::toGray(QImage &img, float value)
}
}
-void KIconEffect::colorize(QImage &img, const QColor &col, float value)
+void KIconEffect::colorize(TQImage &img, const TQColor &col, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -345,7 +345,7 @@ void KIconEffect::colorize(QImage &img, const QColor &col, float value)
}
}
-void KIconEffect::toMonochrome(QImage &img, const QColor &black, const QColor &white, float value) {
+void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) {
int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits()
: (unsigned int *) img.colorTable();
@@ -395,13 +395,13 @@ void KIconEffect::toMonochrome(QImage &img, const QColor &black, const QColor &w
}
}
-void KIconEffect::deSaturate(QImage &img, float value)
+void KIconEffect::deSaturate(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
unsigned int *data = (img.depth() > 8) ? (unsigned int *) img.bits()
: (unsigned int *) img.colorTable();
- QColor color;
+ TQColor color;
int h, s, v, i;
for (i=0; i<pixels; i++)
{
@@ -413,13 +413,13 @@ void KIconEffect::deSaturate(QImage &img, float value)
}
}
-void KIconEffect::toGamma(QImage &img, float value)
+void KIconEffect::toGamma(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
unsigned int *data = (img.depth() > 8) ? (unsigned int *) img.bits()
: (unsigned int *) img.colorTable();
- QColor color;
+ TQColor color;
int i, rval, gval, bval;
float gamma;
gamma = 1/(2*value+0.5);
@@ -435,7 +435,7 @@ void KIconEffect::toGamma(QImage &img, float value)
}
}
-void KIconEffect::semiTransparent(QImage &img)
+void KIconEffect::semiTransparent(TQImage &img)
{
img.setAlphaBuffer(true);
@@ -509,22 +509,22 @@ void KIconEffect::semiTransparent(QImage &img)
}
}
-void KIconEffect::semiTransparent(QPixmap &pix)
+void KIconEffect::semiTransparent(TQPixmap &pix)
{
if ( qt_use_xrender && qt_has_xft )
{
- QImage img=pix.convertToImage();
+ TQImage img=pix.convertToImage();
semiTransparent(img);
pix.convertFromImage(img);
return;
}
- QImage img;
+ TQImage img;
if (pix.mask() != 0L)
img = pix.mask()->convertToImage();
else
{
- img.create(pix.size(), 1, 2, QImage::BigEndian);
+ img.create(pix.size(), 1, 2, TQImage::BigEndian);
img.fill(1);
}
@@ -535,14 +535,14 @@ void KIconEffect::semiTransparent(QPixmap &pix)
for (int x=0; x<(img.width()+31)/32; x++)
line[x] &= pattern;
}
- QBitmap mask;
+ TQBitmap mask;
mask.convertFromImage(img);
pix.setMask(mask);
}
-QImage KIconEffect::doublePixels(QImage src) const
+TQImage KIconEffect::doublePixels(TQImage src) const
{
- QImage dst;
+ TQImage dst;
if (src.depth() == 1)
{
kdDebug(265) << "image depth 1 not supported\n";
@@ -589,7 +589,7 @@ QImage KIconEffect::doublePixels(QImage src) const
return dst;
}
-void KIconEffect::overlay(QImage &src, QImage &overlay)
+void KIconEffect::overlay(TQImage &src, TQImage &overlay)
{
if (src.depth() != overlay.depth())
{
@@ -704,7 +704,7 @@ void KIconEffect::overlay(QImage &src, QImage &overlay)
}
void
-KIconEffect::visualActivate(QWidget * widget, QRect rect)
+KIconEffect::visualActivate(TQWidget * widget, TQRect rect)
{
if (!KGlobalSettings::visualActivate())
return;
@@ -738,12 +738,12 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect)
//kdDebug() << "actCount=" << actCount << " actDelay=" << actDelay << endl;
- QPoint c = rect.center();
+ TQPoint c = rect.center();
- QPainter p(widget);
+ TQPainter p(widget);
// Use NotROP to avoid having to repaint the pixmap each time.
- p.setPen(QPen(Qt::black, 2, Qt::DotLine));
+ p.setPen(TQPen(Qt::black, 2, Qt::DotLine));
p.setRasterOp(Qt::NotROP);
// The spacing between the rects we draw.
@@ -772,7 +772,7 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect)
}
void
-KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
+KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
{
if (!KGlobalSettings::visualActivate())
return;
@@ -811,8 +811,8 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
unsigned int deltaX = rect.width() / actCount * 1.5;
unsigned int deltaY = rect.height() / actCount * 1.5;
- QPoint c = rect.center();
- QRect maxRect(c.x() - (actCount * 2) * deltaX /2,
+ TQPoint c = rect.center();
+ TQRect maxRect(c.x() - (actCount * 2) * deltaX /2,
c.y() - (actCount * 2) * deltaY /2,
actCount * 2 * deltaX,
actCount * 2 * deltaY);
@@ -821,7 +821,7 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
if ((widget->rect().width() <= maxRect.width())
|| (widget->rect().height() <= maxRect.height()))
{
- QPoint topLeft(rect.x(), rect.y());
+ TQPoint topLeft(rect.x(), rect.y());
rect.moveLeft(widget->mapToGlobal(topLeft).x());
rect.moveTop(widget->mapToGlobal(topLeft).y());
c = rect.center();
@@ -831,12 +831,12 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
actCount * 2 * deltaY);
}
- QPainter *p;
- QImage img = pixmap->convertToImage();
- QPixmap pix;
- QPixmap composite(maxRect.width(), maxRect.height(), -1, QPixmap::BestOptim);
- QPainter cPainter(&composite);
- QPoint cComposite = composite.rect().center();
+ TQPainter *p;
+ TQImage img = pixmap->convertToImage();
+ TQPixmap pix;
+ TQPixmap composite(maxRect.width(), maxRect.height(), -1, TQPixmap::BestOptim);
+ TQPainter cPainter(&composite);
+ TQPoint cComposite = composite.rect().center();
// enable alpha blending
img.setAlphaBuffer(true);
@@ -846,8 +846,8 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
if ((widget->rect().width() <= maxRect.width())
|| (widget->rect().height() <= maxRect.height()))
{
- p = new QPainter(QApplication::desktop()->screen( -1 ), TRUE);
- pix = QPixmap::grabWindow((QApplication::desktop()->screen( -1 ))->winId(),
+ p = new TQPainter(TQApplication::desktop()->screen( -1 ), TRUE);
+ pix = TQPixmap::grabWindow((TQApplication::desktop()->screen( -1 ))->winId(),
maxRect.x(),
maxRect.y(),
maxRect.width(),
@@ -855,8 +855,8 @@ KIconEffect::visualActivate(QWidget * widget, QRect rect, QPixmap *pixmap)
} else
{
// not as ugly as drawing directly to the screen
- p = new QPainter(widget);
- pix = QPixmap::grabWidget(widget,
+ p = new TQPainter(widget);
+ pix = TQPixmap::grabWidget(widget,
maxRect.x(),
maxRect.y(),
maxRect.width(),
diff --git a/kdecore/kiconeffect.h b/kdecore/kiconeffect.h
index de698f4ab..c0eba9c69 100644
--- a/kdecore/kiconeffect.h
+++ b/kdecore/kiconeffect.h
@@ -13,10 +13,10 @@
#ifndef __KIconEffect_h_Included__
#define __KIconEffect_h_Included__
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qcolor.h>
-#include <qrect.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqcolor.h>
+#include <tqrect.h>
#include "kdelibs_export.h"
class QWidget;
@@ -74,13 +74,13 @@ public:
/**
* Returns a fingerprint for the effect by encoding
- * the given @p group and @p state into a QString. This
+ * the given @p group and @p state into a TQString. This
* is useful for caching.
* @param group the group, see KIcon::Group
* @param state the state, see KIcon::States
* @return the fingerprint of the given @p group+@p state
*/
- QString fingerprint(int group, int state) const;
+ TQString fingerprint(int group, int state) const;
/**
* Applies an effect to an image. The effect to apply depends on the
@@ -90,7 +90,7 @@ public:
* @param state The icon's state, see KIcon::States
* @return An image with the effect applied.
*/
- QImage apply(QImage src, int group, int state) const;
+ TQImage apply(TQImage src, int group, int state) const;
/**
* Applies an effect to an image.
@@ -102,11 +102,11 @@ public:
* @return An image with the effect applied.
*/
// KDE4: make them references
- QImage apply(QImage src, int effect, float value, const QColor rgb, bool trans) const;
+ TQImage apply(TQImage src, int effect, float value, const TQColor rgb, bool trans) const;
/**
* @since 3.4
*/
- QImage apply(QImage src, int effect, float value, const QColor rgb, const QColor rgb2, bool trans) const;
+ TQImage apply(TQImage src, int effect, float value, const TQColor rgb, const TQColor rgb2, bool trans) const;
/**
* Applies an effect to a pixmap.
@@ -115,7 +115,7 @@ public:
* @param state The icon's state, see KIcon::States
* @return A pixmap with the effect applied.
*/
- QPixmap apply(QPixmap src, int group, int state) const;
+ TQPixmap apply(TQPixmap src, int group, int state) const;
/**
* Applies an effect to a pixmap.
@@ -126,18 +126,18 @@ public:
* @param trans Add Transparency if trans = true.
* @return A pixmap with the effect applied.
*/
- QPixmap apply(QPixmap src, int effect, float value, const QColor rgb, bool trans) const;
+ TQPixmap apply(TQPixmap src, int effect, float value, const TQColor rgb, bool trans) const;
/**
* @since 3.4
*/
- QPixmap apply(QPixmap src, int effect, float value, const QColor rgb, const QColor rgb2, bool trans) const;
+ TQPixmap apply(TQPixmap src, int effect, float value, const TQColor rgb, const TQColor rgb2, bool trans) const;
/**
* Returns an image twice as large, consisting of 2x2 pixels.
* @param src the image.
* @return the scaled image.
*/
- QImage doublePixels(QImage src) const;
+ TQImage doublePixels(TQImage src) const;
/**
* Provides visual feedback to show activation of an icon on a widget.
@@ -151,8 +151,8 @@ public:
* @param widget The widget on which the effect should be painted
* @param rect This rectangle defines the effect's borders
*/
- static void visualActivate(QWidget *widget, QRect rect);
- static void visualActivate(QWidget *widget, QRect rect, QPixmap *pixmap);
+ static void visualActivate(TQWidget *widget, TQRect rect);
+ static void visualActivate(TQWidget *widget, TQRect rect, TQPixmap *pixmap);
/**
* Tints an image gray.
@@ -160,7 +160,7 @@ public:
* @param image The image
* @param value Strength of the effect. 0 <= @p value <= 1
*/
- static void toGray(QImage &image, float value);
+ static void toGray(TQImage &image, float value);
/**
* Colorizes an image with a specific color.
@@ -169,7 +169,7 @@ public:
* @param col The color with which the @p image is tinted
* @param value Strength of the effect. 0 <= @p value <= 1
*/
- static void colorize(QImage &image, const QColor &col, float value);
+ static void colorize(TQImage &image, const TQColor &col, float value);
/**
* Produces a monochrome icon with a given foreground and background color
@@ -180,7 +180,7 @@ public:
* @param value Strength of the effect. 0 <= @p value <= 1
* @since 3.4
*/
- static void toMonochrome(QImage &image, const QColor &black, const QColor &white, float value);
+ static void toMonochrome(TQImage &image, const TQColor &black, const TQColor &white, float value);
/**
* Desaturates an image.
@@ -188,7 +188,7 @@ public:
* @param image The image
* @param value Strength of the effect. 0 <= @p value <= 1
*/
- static void deSaturate(QImage &image, float value);
+ static void deSaturate(TQImage &image, float value);
/**
* Changes the gamma value of an image.
@@ -196,21 +196,21 @@ public:
* @param image The image
* @param value Strength of the effect. 0 <= @p value <= 1
*/
- static void toGamma(QImage &image, float value);
+ static void toGamma(TQImage &image, float value);
/**
* Renders an image semi-transparent.
*
* @param image The image
*/
- static void semiTransparent(QImage &image);
+ static void semiTransparent(TQImage &image);
/**
* Renders a pixmap semi-transparent.
*
* @param pixmap The pixmap
*/
- static void semiTransparent(QPixmap &pixmap);
+ static void semiTransparent(TQPixmap &pixmap);
/**
* Overlays an image with an other image.
@@ -218,12 +218,12 @@ public:
* @param src The image
* @param overlay The image to overlay @p src with
*/
- static void overlay(QImage &src, QImage &overlay);
+ static void overlay(TQImage &src, TQImage &overlay);
private:
int mEffect[6][3];
float mValue[6][3];
- QColor mColor[6][3];
+ TQColor mColor[6][3];
bool mTrans[6][3];
KIconEffectPrivate *d;
};
diff --git a/kdecore/kiconloader.cpp b/kdecore/kiconloader.cpp
index 3c2a7be40..6ff13f879 100644
--- a/kdecore/kiconloader.cpp
+++ b/kdecore/kiconloader.cpp
@@ -13,18 +13,18 @@
* kiconloader.cpp: An icon loader for KDE with theming functionality.
*/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qintdict.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qimage.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qiconset.h>
-#include <qmovie.h>
-#include <qbitmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqintdict.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqimage.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqiconset.h>
+#include <tqmovie.h>
+#include <tqbitmap.h>
#include <kapplication.h>
#include <kipc.h>
@@ -65,7 +65,7 @@ KIconThemeNode::~KIconThemeNode()
delete theme;
}
-void KIconThemeNode::printTree(QString& dbgString) const
+void KIconThemeNode::printTree(TQString& dbgString) const
{
/* This method doesn't have much sense anymore, so maybe it should
be removed in the (near?) future */
@@ -74,21 +74,21 @@ void KIconThemeNode::printTree(QString& dbgString) const
dbgString += ")";
}
-void KIconThemeNode::queryIcons(QStringList *result,
+void KIconThemeNode::queryIcons(TQStringList *result,
int size, KIcon::Context context) const
{
// add the icons of this theme to it
*result += theme->queryIcons(size, context);
}
-void KIconThemeNode::queryIconsByContext(QStringList *result,
+void KIconThemeNode::queryIconsByContext(TQStringList *result,
int size, KIcon::Context context) const
{
// add the icons of this theme to it
*result += theme->queryIconsByContext(size, context);
}
-KIcon KIconThemeNode::findIcon(const QString& name, int size,
+KIcon KIconThemeNode::findIcon(const TQString& name, int size,
KIcon::MatchType match) const
{
return theme->iconPath(name, size, match);
@@ -110,29 +110,29 @@ struct KIconGroup
// to detect bugs like #68528.
struct KIconLoaderDebug
{
- KIconLoaderDebug( KIconLoader* l, const QString& a )
+ KIconLoaderDebug( KIconLoader* l, const TQString& a )
: loader( l ), appname( a ), valid( true )
{}
- KIconLoaderDebug() {}; // this QValueList feature annoys me
+ KIconLoaderDebug() {}; // this TQValueList feature annoys me
KIconLoader* loader;
- QString appname;
+ TQString appname;
bool valid;
- QString delete_bt;
+ TQString delete_bt;
};
-static QValueList< KIconLoaderDebug > *kiconloaders;
+static TQValueList< KIconLoaderDebug > *kiconloaders;
#endif
/*** KIconLoader: the icon loader ***/
-KIconLoader::KIconLoader(const QString& _appname, KStandardDirs *_dirs)
+KIconLoader::KIconLoader(const TQString& _appname, KStandardDirs *_dirs)
{
#ifdef KICONLOADER_CHECKS
if( kiconloaders == NULL )
- kiconloaders = new QValueList< KIconLoaderDebug>();
+ kiconloaders = new TQValueList< KIconLoaderDebug>();
// check for the (very unlikely case) that new KIconLoader gets allocated
// at exactly same address like some previous one
- for( QValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
+ for( TQValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
it != kiconloaders->end();
)
{
@@ -151,25 +151,25 @@ KIconLoader::KIconLoader(const QString& _appname, KStandardDirs *_dirs)
if (kapp) {
kapp->addKipcEventMask(KIPC::IconChanged);
- QObject::connect(kapp, SIGNAL(updateIconLoaders()), d, SLOT(reconfigure()));
+ TQObject::connect(kapp, TQT_SIGNAL(updateIconLoaders()), d, TQT_SLOT(reconfigure()));
}
init( _appname, _dirs );
}
-void KIconLoader::reconfigure( const QString& _appname, KStandardDirs *_dirs )
+void KIconLoader::reconfigure( const TQString& _appname, KStandardDirs *_dirs )
{
d->links.clear();
d->imgDict.clear();
d->mThemesInTree.clear();
d->lastImage.reset();
- d->lastImageKey = QString::null;
+ d->lastImageKey = TQString::null;
delete [] d->mpGroups;
init( _appname, _dirs );
}
-void KIconLoader::init( const QString& _appname, KStandardDirs *_dirs )
+void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs )
{
// If this is unequal to 0, the iconloader is initialized
// successfully.
@@ -184,7 +184,7 @@ void KIconLoader::init( const QString& _appname, KStandardDirs *_dirs )
else
d->mpDirs = KGlobal::dirs();
- QString appname = _appname;
+ TQString appname = _appname;
if (appname.isEmpty())
appname = KGlobal::instance()->instanceName();
@@ -221,10 +221,10 @@ void KIconLoader::init( const QString& _appname, KStandardDirs *_dirs )
{
if (groups[i] == 0L)
break;
- config->setGroup(QString::fromLatin1(groups[i]) + "Icons");
+ config->setGroup(TQString::fromLatin1(groups[i]) + "Icons");
d->mpGroups[i].size = config->readNumEntry("Size", 0);
d->mpGroups[i].dblPixels = config->readBoolEntry("DoublePixels", false);
- if (QPixmap::defaultDepth()>8)
+ if (TQPixmap::defaultDepth()>8)
d->mpGroups[i].alphaBlending = config->readBoolEntry("AlphaBlending", true);
else
d->mpGroups[i].alphaBlending = false;
@@ -241,18 +241,18 @@ void KIconLoader::init( const QString& _appname, KStandardDirs *_dirs )
appname + "/toolbar/");
// Add legacy icon dirs.
- QStringList dirs;
+ TQStringList dirs;
dirs += d->mpDirs->resourceDirs("icon");
dirs += d->mpDirs->resourceDirs("pixmap");
dirs += d->mpDirs->resourceDirs("xdgdata-icon");
dirs += "/usr/share/pixmaps";
// These are not in the icon spec, but e.g. GNOME puts some icons there anyway.
dirs += d->mpDirs->resourceDirs("xdgdata-pixmap");
- for (QStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it)
+ for (TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it)
d->mpDirs->addResourceDir("appicon", *it);
#ifndef NDEBUG
- QString dbgString = "Theme tree: ";
+ TQString dbgString = "Theme tree: ";
d->mpThemeRoot->printTree(dbgString);
kdDebug(264) << dbgString << endl;
#endif
@@ -261,7 +261,7 @@ void KIconLoader::init( const QString& _appname, KStandardDirs *_dirs )
KIconLoader::~KIconLoader()
{
#ifdef KICONLOADER_CHECKS
- for( QValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
+ for( TQValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
it != kiconloaders->end();
++it )
{
@@ -290,7 +290,7 @@ bool KIconLoader::isDelayedIconSetLoadingEnabled() const
return d->delayedLoading;
}
-void KIconLoader::addAppDir(const QString& appname)
+void KIconLoader::addAppDir(const TQString& appname)
{
d->mpDirs->addResourceType("appicon", KStandardDirs::kde_default("data") +
appname + "/pics/");
@@ -300,7 +300,7 @@ void KIconLoader::addAppDir(const QString& appname)
addAppThemes(appname);
}
-void KIconLoader::addAppThemes(const QString& appname)
+void KIconLoader::addAppThemes(const TQString& appname)
{
if ( KIconTheme::current() != KIconTheme::defaultThemeName() )
{
@@ -321,10 +321,10 @@ void KIconLoader::addAppThemes(const QString& appname)
addBaseThemes(node, appname);
}
-void KIconLoader::addBaseThemes(KIconThemeNode *node, const QString &appname)
+void KIconLoader::addBaseThemes(KIconThemeNode *node, const TQString &appname)
{
- QStringList lst = node->theme->inherits();
- QStringList::ConstIterator it;
+ TQStringList lst = node->theme->inherits();
+ TQStringList::ConstIterator it;
for (it=lst.begin(); it!=lst.end(); ++it)
{
@@ -346,29 +346,29 @@ void KIconLoader::addExtraDesktopThemes()
{
if ( d->extraDesktopIconsLoaded ) return;
- QStringList list;
- QStringList icnlibs = KGlobal::dirs()->resourceDirs("icon");
- QStringList::ConstIterator it;
+ TQStringList list;
+ TQStringList icnlibs = KGlobal::dirs()->resourceDirs("icon");
+ TQStringList::ConstIterator it;
char buf[1000];
int r;
for (it=icnlibs.begin(); it!=icnlibs.end(); ++it)
{
- QDir dir(*it);
+ TQDir dir(*it);
if (!dir.exists())
continue;
- QStringList lst = dir.entryList("default.*", QDir::Dirs);
- QStringList::ConstIterator it2;
+ TQStringList lst = dir.entryList("default.*", TQDir::Dirs);
+ TQStringList::ConstIterator it2;
for (it2=lst.begin(); it2!=lst.end(); ++it2)
{
if (!KStandardDirs::exists(*it + *it2 + "/index.desktop")
&& !KStandardDirs::exists(*it + *it2 + "/index.theme"))
continue;
- r=readlink( QFile::encodeName(*it + *it2) , buf, sizeof(buf)-1);
+ r=readlink( TQFile::encodeName(*it + *it2) , buf, sizeof(buf)-1);
if ( r>0 )
{
buf[r]=0;
- QDir dir2( buf );
- QString themeName=dir2.dirName();
+ TQDir dir2( buf );
+ TQString themeName=dir2.dirName();
if (!list.contains(themeName))
list.append(themeName);
@@ -380,7 +380,7 @@ void KIconLoader::addExtraDesktopThemes()
{
if ( d->mThemesInTree.contains(*it) )
continue;
- if ( *it == QString("default.kde") ) continue;
+ if ( *it == TQString("default.kde") ) continue;
KIconTheme *def = new KIconTheme( *it, "" );
KIconThemeNode* node = new KIconThemeNode(def);
@@ -398,21 +398,21 @@ bool KIconLoader::extraDesktopThemesAdded() const
return d->extraDesktopIconsLoaded;
}
-QString KIconLoader::removeIconExtension(const QString &name) const
+TQString KIconLoader::removeIconExtension(const TQString &name) const
{
int extensionLength=0;
- QString ext = name.right(4);
+ TQString ext = name.right(4);
- static const QString &png_ext = KGlobal::staticQString(".png");
- static const QString &xpm_ext = KGlobal::staticQString(".xpm");
+ static const TQString &png_ext = KGlobal::staticQString(".png");
+ static const TQString &xpm_ext = KGlobal::staticQString(".xpm");
if (ext == png_ext || ext == xpm_ext)
extensionLength=4;
#ifdef HAVE_LIBART
else
{
- static const QString &svgz_ext = KGlobal::staticQString(".svgz");
- static const QString &svg_ext = KGlobal::staticQString(".svg");
+ static const TQString &svgz_ext = KGlobal::staticQString(".svgz");
+ static const TQString &svg_ext = KGlobal::staticQString(".svg");
if (name.right(5) == svgz_ext)
extensionLength=5;
@@ -428,9 +428,9 @@ QString KIconLoader::removeIconExtension(const QString &name) const
return name;
}
-QString KIconLoader::removeIconExtensionInternal(const QString &name) const
+TQString KIconLoader::removeIconExtensionInternal(const TQString &name) const
{
- QString name_noext = removeIconExtension(name);
+ TQString name_noext = removeIconExtension(name);
#ifndef NDEBUG
if (name != name_noext)
@@ -443,21 +443,21 @@ QString KIconLoader::removeIconExtensionInternal(const QString &name) const
return name_noext;
}
-KIcon KIconLoader::findMatchingIcon(const QString& name, int size) const
+KIcon KIconLoader::findMatchingIcon(const TQString& name, int size) const
{
KIcon icon;
- const QString *ext[4];
+ const TQString *ext[4];
int count=0;
- static const QString &png_ext = KGlobal::staticQString(".png");
+ static const TQString &png_ext = KGlobal::staticQString(".png");
ext[count++]=&png_ext;
#ifdef HAVE_LIBART
- static const QString &svgz_ext = KGlobal::staticQString(".svgz");
+ static const TQString &svgz_ext = KGlobal::staticQString(".svgz");
ext[count++]=&svgz_ext;
- static const QString &svg_ext = KGlobal::staticQString(".svg");
+ static const TQString &svg_ext = KGlobal::staticQString(".svg");
ext[count++]=&svg_ext;
#endif
- static const QString &xpm_ext = KGlobal::staticQString(".xpm");
+ static const TQString &xpm_ext = KGlobal::staticQString(".xpm");
ext[count++]=&xpm_ext;
/* JRT: To follow the XDG spec, the order in which we look for an
@@ -491,43 +491,43 @@ KIcon KIconLoader::findMatchingIcon(const QString& name, int size) const
return icon;
}
-inline QString KIconLoader::unknownIconPath( int size ) const
+inline TQString KIconLoader::unknownIconPath( int size ) const
{
- static const QString &str_unknown = KGlobal::staticQString("unknown");
+ static const TQString &str_unknown = KGlobal::staticQString("unknown");
KIcon icon = findMatchingIcon(str_unknown, size);
if (!icon.isValid())
{
kdDebug(264) << "Warning: could not find \"Unknown\" icon for size = "
<< size << endl;
- return QString::null;
+ return TQString::null;
}
return icon.path;
}
// Finds the absolute path to an icon.
-QString KIconLoader::iconPath(const QString& _name, int group_or_size,
+TQString KIconLoader::iconPath(const TQString& _name, int group_or_size,
bool canReturnNull) const
{
if (d->mpThemeRoot == 0L)
- return QString::null;
+ return TQString::null;
- if (!QDir::isRelativePath(_name))
+ if (!TQDir::isRelativePath(_name))
return _name;
- QString name = removeIconExtensionInternal( _name );
+ TQString name = removeIconExtensionInternal( _name );
- QString path;
+ TQString path;
if (group_or_size == KIcon::User)
{
- static const QString &png_ext = KGlobal::staticQString(".png");
- static const QString &xpm_ext = KGlobal::staticQString(".xpm");
+ static const TQString &png_ext = KGlobal::staticQString(".png");
+ static const TQString &xpm_ext = KGlobal::staticQString(".xpm");
path = d->mpDirs->findResource("appicon", name + png_ext);
#ifdef HAVE_LIBART
- static const QString &svgz_ext = KGlobal::staticQString(".svgz");
- static const QString &svg_ext = KGlobal::staticQString(".svg");
+ static const TQString &svgz_ext = KGlobal::staticQString(".svgz");
+ static const TQString &svg_ext = KGlobal::staticQString(".svg");
if (path.isEmpty())
path = d->mpDirs->findResource("appicon", name + svgz_ext);
if (path.isEmpty())
@@ -552,7 +552,7 @@ QString KIconLoader::iconPath(const QString& _name, int group_or_size,
if (_name.isEmpty()) {
if (canReturnNull)
- return QString::null;
+ return TQString::null;
else
return unknownIconPath(size);
}
@@ -567,19 +567,19 @@ QString KIconLoader::iconPath(const QString& _name, int group_or_size,
return path;
if (canReturnNull)
- return QString::null;
+ return TQString::null;
else
return unknownIconPath(size);
}
return icon.path;
}
-QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size,
- int state, QString *path_store, bool canReturnNull) const
+TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int size,
+ int state, TQString *path_store, bool canReturnNull) const
{
- QString name = _name;
- QPixmap pix;
- QString key;
+ TQString name = _name;
+ TQPixmap pix;
+ TQString key;
bool absolutePath=false, favIconOverlay=false;
if (d->mpThemeRoot == 0L)
@@ -591,21 +591,21 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
favIconOverlay = true;
name = locateLocal("cache", name+".png");
}
- if (!QDir::isRelativePath(name)) absolutePath=true;
+ if (!TQDir::isRelativePath(name)) absolutePath=true;
- static const QString &str_unknown = KGlobal::staticQString("unknown");
+ static const TQString &str_unknown = KGlobal::staticQString("unknown");
// Special case for "User" icons.
if (group == KIcon::User)
{
key = "$kicou_";
- key += QString::number(size); key += '_';
+ key += TQString::number(size); key += '_';
key += name;
- bool inCache = QPixmapCache::find(key, pix);
+ bool inCache = TQPixmapCache::find(key, pix);
if (inCache && (path_store == 0L))
return pix;
- QString path = (absolutePath) ? name :
+ TQString path = (absolutePath) ? name :
iconPath(name, KIcon::User, canReturnNull);
if (path.isEmpty())
{
@@ -624,12 +624,12 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
*path_store = path;
if (inCache)
return pix;
- QImage img(path);
+ TQImage img(path);
if (size != 0)
img=img.smoothScale(size,size);
pix.convertFromImage(img);
- QPixmapCache::insert(key, pix);
+ TQPixmapCache::insert(key, pix);
return pix;
}
@@ -674,28 +674,28 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
key = "$kico_";
key += name; key += '_';
- key += QString::number(size); key += '_';
+ key += TQString::number(size); key += '_';
- QString overlayStr = QString::number( overlay );
+ TQString overlayStr = TQString::number( overlay );
- QString noEffectKey = key + '_' + overlayStr;
+ TQString noEffectKey = key + '_' + overlayStr;
if (group >= 0)
{
key += d->mpEffect.fingerprint(group, state);
if (d->mpGroups[group].dblPixels)
- key += QString::fromLatin1(":dblsize");
+ key += TQString::fromLatin1(":dblsize");
} else
- key += QString::fromLatin1("noeffect");
+ key += TQString::fromLatin1("noeffect");
key += '_';
key += overlayStr;
// Is the icon in the cache?
- bool inCache = QPixmapCache::find(key, pix);
+ bool inCache = TQPixmapCache::find(key, pix);
if (inCache && (path_store == 0L))
return pix;
- QImage *img = 0;
+ TQImage *img = 0;
int iconType;
int iconThreshold;
@@ -713,7 +713,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
else
{
if (!name.isEmpty())
- icon = findMatchingIcon(favIconOverlay ? QString("www") : name, size);
+ icon = findMatchingIcon(favIconOverlay ? TQString("www") : name, size);
if (!icon.isValid())
{
@@ -721,7 +721,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
if (!name.isEmpty())
pix = loadIcon(name, KIcon::User, size, state, path_store, true);
if (!pix.isNull() || canReturnNull) {
- QPixmapCache::insert(key, pix);
+ TQPixmapCache::insert(key, pix);
return pix;
}
@@ -742,10 +742,10 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
return pix;
// Use the extension as the format. Works for XPM and PNG, but not for SVG
- QString ext = icon.path.right(3).upper();
+ TQString ext = icon.path.right(3).upper();
if(ext != "SVG" && ext != "VGZ")
{
- img = new QImage(icon.path, ext.latin1());
+ img = new TQImage(icon.path, ext.latin1());
if (img->isNull()) {
delete img;
return pix;
@@ -760,7 +760,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
if(svgEngine->load(size, size, icon.path))
img = svgEngine->painter()->image();
else
- img = new QImage();
+ img = new TQImage();
delete svgEngine;
}
@@ -776,7 +776,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
}
else
{
- img = new QImage( d->lastImage.copy() );
+ img = new TQImage( d->lastImage.copy() );
iconType = d->lastIconType;
iconThreshold = d->lastIconThreshold;
}
@@ -784,7 +784,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
// Blend in all overlays
if (overlay)
{
- QImage *ovl;
+ TQImage *ovl;
KIconTheme *theme = d->mpThemeRoot->theme;
if ((overlay & KIcon::LockOverlay) &&
((ovl = loadOverlay(theme->lockOverlay(), size)) != 0L))
@@ -832,7 +832,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
if (favIconOverlay)
{
- QImage favIcon(name, "PNG");
+ TQImage favIcon(name, "PNG");
int x = img->width() - favIcon.width() - 1,
y = img->height() - favIcon.height() - 1;
if( favIcon.depth() != 32 )
@@ -859,14 +859,14 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIcon::Group group, int size
delete img;
- QPixmapCache::insert(key, pix);
+ TQPixmapCache::insert(key, pix);
return pix;
}
-QImage *KIconLoader::loadOverlay(const QString &name, int size) const
+TQImage *KIconLoader::loadOverlay(const TQString &name, int size) const
{
- QString key = name + '_' + QString::number(size);
- QImage *image = d->imgDict.find(key);
+ TQString key = name + '_' + TQString::number(size);
+ TQImage *image = d->imgDict.find(key);
if (image != 0L)
return image;
@@ -876,7 +876,7 @@ QImage *KIconLoader::loadOverlay(const QString &name, int size) const
kdDebug(264) << "Overlay " << name << "not found." << endl;
return 0L;
}
- image = new QImage(icon.path);
+ image = new TQImage(icon.path);
// In some cases (since size in findMatchingIcon() is more a hint than a
// constraint) image->size can be != size. If so perform rescaling.
if ( size != image->width() )
@@ -887,21 +887,21 @@ QImage *KIconLoader::loadOverlay(const QString &name, int size) const
-QMovie KIconLoader::loadMovie(const QString& name, KIcon::Group group, int size) const
+TQMovie KIconLoader::loadMovie(const TQString& name, KIcon::Group group, int size) const
{
- QString file = moviePath( name, group, size );
+ TQString file = moviePath( name, group, size );
if (file.isEmpty())
- return QMovie();
+ return TQMovie();
int dirLen = file.findRev('/');
- QString icon = iconPath(name, size ? -size : group, true);
+ TQString icon = iconPath(name, size ? -size : group, true);
if (!icon.isEmpty() && file.left(dirLen) != icon.left(dirLen))
- return QMovie();
- return QMovie(file);
+ return TQMovie();
+ return TQMovie(file);
}
-QString KIconLoader::moviePath(const QString& name, KIcon::Group group, int size) const
+TQString KIconLoader::moviePath(const TQString& name, KIcon::Group group, int size) const
{
- if (!d->mpGroups) return QString::null;
+ if (!d->mpGroups) return TQString::null;
if ( (group < -1 || group >= KIcon::LastGroup) && group != KIcon::User )
{
@@ -914,7 +914,7 @@ QString KIconLoader::moviePath(const QString& name, KIcon::Group group, int size
group = KIcon::Desktop;
}
- QString file = name + ".mng";
+ TQString file = name + ".mng";
if (group == KIcon::User)
{
file = d->mpDirs->findResource("appicon", file);
@@ -937,15 +937,15 @@ QString KIconLoader::moviePath(const QString& name, KIcon::Group group, int size
}
icon_found:
- file = icon.isValid() ? icon.path : QString::null;
+ file = icon.isValid() ? icon.path : TQString::null;
}
return file;
}
-QStringList KIconLoader::loadAnimated(const QString& name, KIcon::Group group, int size) const
+TQStringList KIconLoader::loadAnimated(const TQString& name, KIcon::Group group, int size) const
{
- QStringList lst;
+ TQStringList lst;
if (!d->mpGroups) return lst;
@@ -960,7 +960,7 @@ QStringList KIconLoader::loadAnimated(const QString& name, KIcon::Group group, i
group = KIcon::Desktop;
}
- QString file = name + "/0001";
+ TQString file = name + "/0001";
if (group == KIcon::User)
{
file = d->mpDirs->findResource("appicon", file + ".png");
@@ -969,21 +969,21 @@ QStringList KIconLoader::loadAnimated(const QString& name, KIcon::Group group, i
if (size == 0)
size = d->mpGroups[group].size;
KIcon icon = findMatchingIcon(file, size);
- file = icon.isValid() ? icon.path : QString::null;
+ file = icon.isValid() ? icon.path : TQString::null;
}
if (file.isEmpty())
return lst;
- QString path = file.left(file.length()-8);
- DIR* dp = opendir( QFile::encodeName(path) );
+ TQString path = file.left(file.length()-8);
+ DIR* dp = opendir( TQFile::encodeName(path) );
if(!dp)
return lst;
struct dirent* ep;
while( ( ep = readdir( dp ) ) != 0L )
{
- QString fn(QFile::decodeName(ep->d_name));
+ TQString fn(TQFile::decodeName(ep->d_name));
if(!(fn.left(4)).toUInt())
continue;
@@ -1012,21 +1012,21 @@ int KIconLoader::currentSize(KIcon::Group group) const
return d->mpGroups[group].size;
}
-QStringList KIconLoader::queryIconsByDir( const QString& iconsDir ) const
+TQStringList KIconLoader::queryIconsByDir( const TQString& iconsDir ) const
{
- QDir dir(iconsDir);
- QStringList lst = dir.entryList("*.png;*.xpm", QDir::Files);
- QStringList result;
- QStringList::ConstIterator it;
+ TQDir dir(iconsDir);
+ TQStringList lst = dir.entryList("*.png;*.xpm", TQDir::Files);
+ TQStringList result;
+ TQStringList::ConstIterator it;
for (it=lst.begin(); it!=lst.end(); ++it)
result += iconsDir + "/" + *it;
return result;
}
-QStringList KIconLoader::queryIconsByContext(int group_or_size,
+TQStringList KIconLoader::queryIconsByContext(int group_or_size,
KIcon::Context context) const
{
- QStringList result;
+ TQStringList result;
if (group_or_size >= KIcon::LastGroup)
{
kdDebug(264) << "Illegal icon group: " << group_or_size << endl;
@@ -1043,9 +1043,9 @@ QStringList KIconLoader::queryIconsByContext(int group_or_size,
themeNode->queryIconsByContext(&result, size, context);
// Eliminate duplicate entries (same icon in different directories)
- QString name;
- QStringList res2, entries;
- QStringList::ConstIterator it;
+ TQString name;
+ TQStringList res2, entries;
+ TQStringList::ConstIterator it;
for (it=result.begin(); it!=result.end(); ++it)
{
int n = (*it).findRev('/');
@@ -1064,9 +1064,9 @@ QStringList KIconLoader::queryIconsByContext(int group_or_size,
}
-QStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context) const
+TQStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context) const
{
- QStringList result;
+ TQStringList result;
if (group_or_size >= KIcon::LastGroup)
{
kdDebug(264) << "Illegal icon group: " << group_or_size << endl;
@@ -1083,9 +1083,9 @@ QStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context) c
themeNode->queryIcons(&result, size, context);
// Eliminate duplicate entries (same icon in different directories)
- QString name;
- QStringList res2, entries;
- QStringList::ConstIterator it;
+ TQString name;
+ TQStringList res2, entries;
+ TQStringList::ConstIterator it;
for (it=result.begin(); it!=result.end(); ++it)
{
int n = (*it).findRev('/');
@@ -1130,29 +1130,29 @@ bool KIconLoader::alphaBlending(KIcon::Group group) const
return d->mpGroups[group].alphaBlending;
}
-QIconSet KIconLoader::loadIconSet(const QString& name, KIcon::Group group, int size, bool canReturnNull)
+TQIconSet KIconLoader::loadIconSet(const TQString& name, KIcon::Group group, int size, bool canReturnNull)
{
return loadIconSet( name, group, size, canReturnNull, true );
}
-QIconSet KIconLoader::loadIconSet(const QString& name, KIcon::Group group, int size)
+TQIconSet KIconLoader::loadIconSet(const TQString& name, KIcon::Group group, int size)
{
return loadIconSet( name, group, size, false );
}
-/*** class for delayed icon loading for QIconSet ***/
+/*** class for delayed icon loading for TQIconSet ***/
class KIconFactory
: public QIconFactory
{
public:
- KIconFactory( const QString& iconName_P, KIcon::Group group_P,
+ KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
int size_P, KIconLoader* loader_P );
- KIconFactory( const QString& iconName_P, KIcon::Group group_P,
+ KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
int size_P, KIconLoader* loader_P, bool canReturnNull );
- virtual QPixmap* createPixmap( const QIconSet&, QIconSet::Size, QIconSet::Mode, QIconSet::State );
+ virtual TQPixmap* createPixmap( const TQIconSet&, TQIconSet::Size, TQIconSet::Mode, TQIconSet::State );
private:
- QString iconName;
+ TQString iconName;
KIcon::Group group;
int size;
KIconLoader* loader;
@@ -1160,7 +1160,7 @@ class KIconFactory
};
-QIconSet KIconLoader::loadIconSet( const QString& name, KIcon::Group g, int s,
+TQIconSet KIconLoader::loadIconSet( const TQString& name, KIcon::Group g, int s,
bool canReturnNull, bool immediateExistenceCheck)
{
if ( !d->delayedLoading )
@@ -1174,39 +1174,39 @@ QIconSet KIconLoader::loadIconSet( const QString& name, KIcon::Group g, int s,
if(canReturnNull && immediateExistenceCheck)
{ // we need to find out if the icon actually exists
- QPixmap pm = loadIcon( name, g, s, KIcon::DefaultState, NULL, true );
+ TQPixmap pm = loadIcon( name, g, s, KIcon::DefaultState, NULL, true );
if( pm.isNull())
- return QIconSet();
+ return TQIconSet();
- QIconSet ret( pm );
+ TQIconSet ret( pm );
ret.installIconFactory( new KIconFactory( name, g, s, this ));
return ret;
}
- QIconSet ret;
+ TQIconSet ret;
ret.installIconFactory( new KIconFactory( name, g, s, this, canReturnNull ));
return ret;
}
-QIconSet KIconLoader::loadIconSetNonDelayed( const QString& name,
+TQIconSet KIconLoader::loadIconSetNonDelayed( const TQString& name,
KIcon::Group g,
int s, bool canReturnNull )
{
- QIconSet iconset;
- QPixmap tmp = loadIcon(name, g, s, KIcon::ActiveState, NULL, canReturnNull);
- iconset.setPixmap( tmp, QIconSet::Small, QIconSet::Active );
+ TQIconSet iconset;
+ TQPixmap tmp = loadIcon(name, g, s, KIcon::ActiveState, NULL, canReturnNull);
+ iconset.setPixmap( tmp, TQIconSet::Small, TQIconSet::Active );
// we don't use QIconSet's resizing anyway
- iconset.setPixmap( tmp, QIconSet::Large, QIconSet::Active );
+ iconset.setPixmap( tmp, TQIconSet::Large, TQIconSet::Active );
tmp = loadIcon(name, g, s, KIcon::DisabledState, NULL, canReturnNull);
- iconset.setPixmap( tmp, QIconSet::Small, QIconSet::Disabled );
- iconset.setPixmap( tmp, QIconSet::Large, QIconSet::Disabled );
+ iconset.setPixmap( tmp, TQIconSet::Small, TQIconSet::Disabled );
+ iconset.setPixmap( tmp, TQIconSet::Large, TQIconSet::Disabled );
tmp = loadIcon(name, g, s, KIcon::DefaultState, NULL, canReturnNull);
- iconset.setPixmap( tmp, QIconSet::Small, QIconSet::Normal );
- iconset.setPixmap( tmp, QIconSet::Large, QIconSet::Normal );
+ iconset.setPixmap( tmp, TQIconSet::Small, TQIconSet::Normal );
+ iconset.setPixmap( tmp, TQIconSet::Large, TQIconSet::Normal );
return iconset;
}
-KIconFactory::KIconFactory( const QString& iconName_P, KIcon::Group group_P,
+KIconFactory::KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
int size_P, KIconLoader* loader_P )
: iconName( iconName_P ), group( group_P ), size( size_P ), loader( loader_P )
{
@@ -1214,7 +1214,7 @@ KIconFactory::KIconFactory( const QString& iconName_P, KIcon::Group group_P,
setAutoDelete( true );
}
-KIconFactory::KIconFactory( const QString& iconName_P, KIcon::Group group_P,
+KIconFactory::KIconFactory( const TQString& iconName_P, KIcon::Group group_P,
int size_P, KIconLoader* loader_P, bool canReturnNull_P )
: iconName( iconName_P ), group( group_P ), size( size_P ),
loader( loader_P ), canReturnNull( canReturnNull_P)
@@ -1222,11 +1222,11 @@ KIconFactory::KIconFactory( const QString& iconName_P, KIcon::Group group_P,
setAutoDelete( true );
}
-QPixmap* KIconFactory::createPixmap( const QIconSet&, QIconSet::Size, QIconSet::Mode mode_P, QIconSet::State )
+TQPixmap* KIconFactory::createPixmap( const TQIconSet&, TQIconSet::Size, TQIconSet::Mode mode_P, TQIconSet::State )
{
#ifdef KICONLOADER_CHECKS
bool found = false;
- for( QValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
+ for( TQValueList< KIconLoaderDebug >::Iterator it = kiconloaders->begin();
it != kiconloaders->end();
++it )
{
@@ -1266,109 +1266,109 @@ QPixmap* KIconFactory::createPixmap( const QIconSet&, QIconSet::Size, QIconSet::
#endif
}
#endif
- // QIconSet::Mode to KIcon::State conversion
+ // TQIconSet::Mode to KIcon::State conversion
static const KIcon::States tbl[] = { KIcon::DefaultState, KIcon::DisabledState, KIcon::ActiveState };
int state = KIcon::DefaultState;
- if( mode_P <= QIconSet::Active )
+ if( mode_P <= TQIconSet::Active )
state = tbl[ mode_P ];
if( group >= 0 && state == KIcon::ActiveState )
{ // active and normal icon are usually the same
if( loader->iconEffect()->fingerprint(group, KIcon::ActiveState )
== loader->iconEffect()->fingerprint(group, KIcon::DefaultState ))
- return 0; // so let QIconSet simply duplicate it
+ return 0; // so let TQIconSet simply duplicate it
}
// ignore passed size
// ignore passed state (i.e. on/off)
- QPixmap pm = loader->loadIcon( iconName, group, size, state, 0, canReturnNull );
- return new QPixmap( pm );
+ TQPixmap pm = loader->loadIcon( iconName, group, size, state, 0, canReturnNull );
+ return new TQPixmap( pm );
}
// Easy access functions
-QPixmap DesktopIcon(const QString& name, int force_size, int state,
+TQPixmap DesktopIcon(const TQString& name, int force_size, int state,
KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIcon(name, KIcon::Desktop, force_size, state);
}
-QPixmap DesktopIcon(const QString& name, KInstance *instance)
+TQPixmap DesktopIcon(const TQString& name, KInstance *instance)
{
return DesktopIcon(name, 0, KIcon::DefaultState, instance);
}
-QIconSet DesktopIconSet(const QString& name, int force_size, KInstance *instance)
+TQIconSet DesktopIconSet(const TQString& name, int force_size, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIconSet( name, KIcon::Desktop, force_size );
}
-QPixmap BarIcon(const QString& name, int force_size, int state,
+TQPixmap BarIcon(const TQString& name, int force_size, int state,
KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIcon(name, KIcon::Toolbar, force_size, state);
}
-QPixmap BarIcon(const QString& name, KInstance *instance)
+TQPixmap BarIcon(const TQString& name, KInstance *instance)
{
return BarIcon(name, 0, KIcon::DefaultState, instance);
}
-QIconSet BarIconSet(const QString& name, int force_size, KInstance *instance)
+TQIconSet BarIconSet(const TQString& name, int force_size, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIconSet( name, KIcon::Toolbar, force_size );
}
-QPixmap SmallIcon(const QString& name, int force_size, int state,
+TQPixmap SmallIcon(const TQString& name, int force_size, int state,
KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIcon(name, KIcon::Small, force_size, state);
}
-QPixmap SmallIcon(const QString& name, KInstance *instance)
+TQPixmap SmallIcon(const TQString& name, KInstance *instance)
{
return SmallIcon(name, 0, KIcon::DefaultState, instance);
}
-QIconSet SmallIconSet(const QString& name, int force_size, KInstance *instance)
+TQIconSet SmallIconSet(const TQString& name, int force_size, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIconSet( name, KIcon::Small, force_size );
}
-QPixmap MainBarIcon(const QString& name, int force_size, int state,
+TQPixmap MainBarIcon(const TQString& name, int force_size, int state,
KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIcon(name, KIcon::MainToolbar, force_size, state);
}
-QPixmap MainBarIcon(const QString& name, KInstance *instance)
+TQPixmap MainBarIcon(const TQString& name, KInstance *instance)
{
return MainBarIcon(name, 0, KIcon::DefaultState, instance);
}
-QIconSet MainBarIconSet(const QString& name, int force_size, KInstance *instance)
+TQIconSet MainBarIconSet(const TQString& name, int force_size, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIconSet( name, KIcon::MainToolbar, force_size );
}
-QPixmap UserIcon(const QString& name, int state, KInstance *instance)
+TQPixmap UserIcon(const TQString& name, int state, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIcon(name, KIcon::User, 0, state);
}
-QPixmap UserIcon(const QString& name, KInstance *instance)
+TQPixmap UserIcon(const TQString& name, KInstance *instance)
{
return UserIcon(name, KIcon::DefaultState, instance);
}
-QIconSet UserIconSet(const QString& name, KInstance *instance)
+TQIconSet UserIconSet(const TQString& name, KInstance *instance)
{
KIconLoader *loader = instance->iconLoader();
return loader->loadIconSet( name, KIcon::User );
@@ -1380,13 +1380,13 @@ int IconSize(KIcon::Group group, KInstance *instance)
return loader->currentSize(group);
}
-QPixmap KIconLoader::unknown()
+TQPixmap KIconLoader::unknown()
{
- QPixmap pix;
- if ( QPixmapCache::find("unknown", pix) )
+ TQPixmap pix;
+ if ( TQPixmapCache::find("unknown", pix) )
return pix;
- QString path = KGlobal::iconLoader()->iconPath("unknown", KIcon::Small, true);
+ TQString path = KGlobal::iconLoader()->iconPath("unknown", KIcon::Small, true);
if (path.isEmpty())
{
kdDebug(264) << "Warning: Cannot find \"unknown\" icon." << endl;
@@ -1394,7 +1394,7 @@ QPixmap KIconLoader::unknown()
} else
{
pix.load(path);
- QPixmapCache::insert("unknown", pix);
+ TQPixmapCache::insert("unknown", pix);
}
return pix;
diff --git a/kdecore/kiconloader.h b/kdecore/kiconloader.h
index 7c445b962..f8ac3fbc7 100644
--- a/kdecore/kiconloader.h
+++ b/kdecore/kiconloader.h
@@ -12,16 +12,16 @@
#ifndef __KIconLoader_h_Included__
#define __KIconLoader_h_Included__
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qiconset.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqiconset.h>
// Grmbl, X headers.....
#ifdef Status
#define KIconLoaderXStatus Status
#undef Status
#endif
-#include <qmovie.h>
+#include <tqmovie.h>
#ifdef KIconLoaderXStatus
#define Status int
#undef KIconLoaderXStatus
@@ -92,7 +92,7 @@ public:
* @see KGlobal::iconLoader()
* @see KInstance::iconLoader()
*/
- KIconLoader(const QString& appname=QString::null, KStandardDirs *dirs = 0);
+ KIconLoader(const TQString& appname=TQString::null, KStandardDirs *dirs = 0);
/**
* Cleanup
@@ -103,7 +103,7 @@ public:
* Adds @p appname to the list of application specific directories.
* @param appname The application name.
*/
- void addAppDir(const QString& appname);
+ void addAppDir(const TQString& appname);
/**
* Loads an icon. It will try very hard to find an icon which is
@@ -123,11 +123,11 @@ public:
* @param path_store If not null, the path of the icon is stored here.
* @param canReturnNull Can return a null pixmap? If false, the
* "unknown" pixmap is returned when no appropriate icon has been found.
- * @return the QPixmap. Can be null when not found, depending on
+ * @return the TQPixmap. Can be null when not found, depending on
* @p canReturnNull.
*/
- QPixmap loadIcon(const QString& name, KIcon::Group group, int size=0,
- int state=KIcon::DefaultState, QString *path_store=0L,
+ TQPixmap loadIcon(const TQString& name, KIcon::Group group, int size=0,
+ int state=KIcon::DefaultState, TQString *path_store=0L,
bool canReturnNull=false) const;
/**
@@ -148,10 +148,10 @@ public:
* @p canReturnNull.
* @since 3.5
*/
- QIconSet loadIconSet(const QString& name, KIcon::Group group, int size,
+ TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size,
bool canReturnNull, bool immediateExistenceCheck);
- // KDE4 merge as (const QString&,KIcon::Group,int=0,bool=false,bool=true);
+ // KDE4 merge as (const TQString&,KIcon::Group,int=0,bool=false,bool=true);
/**
* Creates an icon set, that will do on-demand loading of the icon.
* Loading itself is done by calling loadIcon .
@@ -168,10 +168,10 @@ public:
* @p canReturnNull.
* @since 3.1
*/
- QIconSet loadIconSet(const QString& name, KIcon::Group group, int size,
+ TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size,
bool canReturnNull);
- // KDE4 merge as (const QString&,KIcon::Group,int=0,bool=false,bool=true);
+ // KDE4 merge as (const TQString&,KIcon::Group,int=0,bool=false,bool=true);
/**
* Creates an icon set, that will do on-demand loading of the icon.
* Loading itself is done by calling loadIcon .
@@ -183,7 +183,7 @@ public:
* See KIcon::StdSizes.
* @return the icon set. Can be null when not found
*/
- QIconSet loadIconSet(const QString& name, KIcon::Group group, int size=0);
+ TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size=0);
/**
* Returns the path of an icon.
@@ -199,7 +199,7 @@ public:
* @return the path of an icon, can be null or the "unknown" icon when
* not found, depending on @p canReturnNull.
*/
- QString iconPath(const QString& name, int group_or_size,
+ TQString iconPath(const TQString& name, int group_or_size,
bool canReturnNull=false) const;
/**
@@ -208,9 +208,9 @@ public:
* @param group The icon group. See loadIcon().
* @param size Override the default size for @p group.
* See KIcon::StdSizes.
- * @return A QMovie object. Can be null if not found.
+ * @return A TQMovie object. Can be null if not found.
*/
- QMovie loadMovie(const QString& name, KIcon::Group group, int size=0) const;
+ TQMovie loadMovie(const TQString& name, KIcon::Group group, int size=0) const;
/**
* Returns the path to an animated icon.
@@ -221,19 +221,19 @@ public:
* @return the full path to the movie, ready to be passed to QMovie's constructor.
* Empty string if not found.
*/
- QString moviePath(const QString& name, KIcon::Group group, int size=0) const;
+ TQString moviePath(const TQString& name, KIcon::Group group, int size=0) const;
/**
* Loads an animated icon as a series of still frames. If you want to load
- * a .mng animation as QMovie instead, please use loadMovie() instead.
+ * a .mng animation as TQMovie instead, please use loadMovie() instead.
* @param name The name of the icon.
* @param group The icon group. See loadIcon().
* @param size Override the default size for @p group.
* See KIcon::StdSizes.
- * @return A QStringList containing the absolute path of all the frames
+ * @return A TQStringList containing the absolute path of all the frames
* making up the animation.
*/
- QStringList loadAnimated(const QString& name, KIcon::Group group, int size=0) const;
+ TQStringList loadAnimated(const TQString& name, KIcon::Group group, int size=0) const;
/**
* Queries all available icons for a specific group, having a specific
@@ -245,7 +245,7 @@ public:
* @param context The icon context.
* @return a list of all icons
*/
- QStringList queryIcons(int group_or_size, KIcon::Context context=KIcon::Any) const;
+ TQStringList queryIcons(int group_or_size, KIcon::Context context=KIcon::Any) const;
/**
* Queries all available icons for a specific context.
@@ -255,10 +255,10 @@ public:
* negative numbers are negated sizes. See KIcon::Group and
* KIcon::StdSizes
* @param context The icon context.
- * @return A QStringList containing the icon names
+ * @return A TQStringList containing the icon names
* available for that context
*/
- QStringList queryIconsByContext(int group_or_size,
+ TQStringList queryIconsByContext(int group_or_size,
KIcon::Context context=KIcon::Any) const;
/**
@@ -270,10 +270,10 @@ public:
* Returns a list of all icons (*.png or *.xpm extension) in the
* given directory.
* @param iconsDir the directory to search in
- * @return A QStringList containing the icon paths
+ * @return A TQStringList containing the icon paths
* @since 3.1
*/
- QStringList queryIconsByDir( const QString& iconsDir ) const;
+ TQStringList queryIconsByDir( const TQString& iconsDir ) const;
/**
* Returns the current size of the group.
@@ -301,14 +301,14 @@ public:
* @param _dirs the new standard directories. If 0, the directories
* from KGlobal will be taken.
*/
- void reconfigure( const QString& _appname, KStandardDirs *_dirs );
+ void reconfigure( const TQString& _appname, KStandardDirs *_dirs );
/**
* Returns the unknown icon. An icon that is used when no other icon
* can be found.
* @return the unknown pixmap
*/
- static QPixmap unknown();
+ static TQPixmap unknown();
/**
* Checks whether the user wants to blend the icons with the background
@@ -334,7 +334,7 @@ public:
bool extraDesktopThemesAdded() const;
/**
- * Enables on-demand icon loading for QIconSets using QIconFactory.
+ * Enables on-demand icon loading for QIconSets using TQIconFactory.
* Icons loaded via loadIconSet() will be loaded as soon as they
* need to be displayed, not earlier.
*
@@ -355,7 +355,7 @@ public:
void enableDelayedIconSetLoading( bool enable );
/**
- * Checks whether delayed loading for QIconSet is enabled.
+ * Checks whether delayed loading for TQIconSet is enabled.
* @return whether icons for QIconSets will be loaded on demand.
* @see enableDelayedIconSetLoading()
* @see QIconFactory
@@ -368,40 +368,40 @@ public:
/**
* @internal
*/
- void init( const QString& _appname, KStandardDirs *_dirs );
+ void init( const TQString& _appname, KStandardDirs *_dirs );
/**
* @internal
* tries to find an icon with the name. It tries some extension and
* match strategies
*/
- KIcon findMatchingIcon(const QString& name, int size) const;
+ KIcon findMatchingIcon(const TQString& name, int size) const;
/**
* @internal
* Loads and caches an overlay.
*/
- QImage *loadOverlay(const QString& name, int size) const;
+ TQImage *loadOverlay(const TQString& name, int size) const;
/**
* @internal
* Adds themes installed in the application's directory.
**/
- void addAppThemes(const QString& appname);
+ void addAppThemes(const TQString& appname);
/**
* Adds all themes that are part of this node and the themes
* below (the fallbacks of the theme) in the tree.
* @internal
*/
- void addBaseThemes(KIconThemeNode *node, const QString &appname);
+ void addBaseThemes(KIconThemeNode *node, const TQString &appname);
/**
* @internal
* return the path for the unknown icon in that size
* @since 3.1
*/
- QString unknownIconPath( int size ) const;
+ TQString unknownIconPath( int size ) const;
/**
* Checks if name ends in one of the supported icon formats (i.e. .png)
@@ -418,7 +418,7 @@ public:
* TODO: KDE 4 make public & static
* @since 3.1
*/
- QString removeIconExtension(const QString &name) const;
+ TQString removeIconExtension(const TQString &name) const;
/**
* Same as removeIconExtension except it prints a debug message
@@ -429,12 +429,12 @@ public:
*
* TODO: KDE 4 make static
*/
- QString removeIconExtensionInternal(const QString &name) const;
+ TQString removeIconExtensionInternal(const TQString &name) const;
/**
* Loads all the different sizes for an iconset.
*/
- QIconSet loadIconSetNonDelayed( const QString& name, KIcon::Group group,
+ TQIconSet loadIconSetNonDelayed( const TQString& name, KIcon::Group group,
int size, bool canReturnNull );
// @internal the data object
@@ -445,7 +445,7 @@ public:
* \relates KIconLoader
* Load a desktop icon.
*/
-KDECORE_EXPORT QPixmap DesktopIcon(const QString& name, int size=0,
+KDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState,
KInstance *instance=KGlobal::instance());
@@ -453,40 +453,40 @@ KDECORE_EXPORT QPixmap DesktopIcon(const QString& name, int size=0,
* \relates KIconLoader
* Load a desktop icon.
*/
-KDECORE_EXPORT QPixmap DesktopIcon(const QString& name, KInstance *instance);
+KDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, KInstance *instance);
/**
* \relates KIconLoader
* Load a desktop icon, and apply the necessary effects to get an IconSet.
*/
-KDECORE_EXPORT QIconSet DesktopIconSet(const QString& name, int size=0,
+KDECORE_EXPORT TQIconSet DesktopIconSet(const TQString& name, int size=0,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a toolbar icon.
*/
-KDECORE_EXPORT QPixmap BarIcon(const QString& name, int size=0, int state=KIcon::DefaultState,
+KDECORE_EXPORT TQPixmap BarIcon(const TQString& name, int size=0, int state=KIcon::DefaultState,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a toolbar icon.
*/
-KDECORE_EXPORT QPixmap BarIcon(const QString& name, KInstance *instance);
+KDECORE_EXPORT TQPixmap BarIcon(const TQString& name, KInstance *instance);
/**
* \relates KIconLoader
* Load a toolbar icon, and apply the necessary effects to get an IconSet.
*/
-KDECORE_EXPORT QIconSet BarIconSet(const QString& name, int size=0,
+KDECORE_EXPORT TQIconSet BarIconSet(const TQString& name, int size=0,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a small icon.
*/
-KDECORE_EXPORT QPixmap SmallIcon(const QString& name, int size=0,
+KDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState,
KInstance *instance=KGlobal::instance());
@@ -494,20 +494,20 @@ KDECORE_EXPORT QPixmap SmallIcon(const QString& name, int size=0,
* \relates KIconLoader
* Load a small icon.
*/
-KDECORE_EXPORT QPixmap SmallIcon(const QString& name, KInstance *instance);
+KDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, KInstance *instance);
/**
* \relates KIconLoader
* Load a small icon, and apply the necessary effects to get an IconSet.
*/
-KDECORE_EXPORT QIconSet SmallIconSet(const QString& name, int size=0,
+KDECORE_EXPORT TQIconSet SmallIconSet(const TQString& name, int size=0,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a main toolbar icon.
*/
-KDECORE_EXPORT QPixmap MainBarIcon(const QString& name, int size=0,
+KDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState,
KInstance *instance=KGlobal::instance());
@@ -515,33 +515,33 @@ KDECORE_EXPORT QPixmap MainBarIcon(const QString& name, int size=0,
* \relates KIconLoader
* Load a main toolbar icon.
*/
-KDECORE_EXPORT QPixmap MainBarIcon(const QString& name, KInstance *instance);
+KDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, KInstance *instance);
/**
* \relates KIconLoader
* Load a main toolbar icon, and apply the effects to get an IconSet.
*/
-KDECORE_EXPORT QIconSet MainBarIconSet(const QString& name, int size=0,
+KDECORE_EXPORT TQIconSet MainBarIconSet(const TQString& name, int size=0,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a user icon. User icons are searched in $appdir/pics.
*/
-KDECORE_EXPORT QPixmap UserIcon(const QString& name, int state=KIcon::DefaultState,
+KDECORE_EXPORT TQPixmap UserIcon(const TQString& name, int state=KIcon::DefaultState,
KInstance *instance=KGlobal::instance());
/**
* \relates KIconLoader
* Load a user icon. User icons are searched in $appdir/pics.
*/
-KDECORE_EXPORT QPixmap UserIcon(const QString& name, KInstance *instance);
+KDECORE_EXPORT TQPixmap UserIcon(const TQString& name, KInstance *instance);
/**
* \relates KIconLoader
* Load a user icon, and apply the effects to get an IconSet.
*/
-KDECORE_EXPORT QIconSet UserIconSet(const QString& name,
+KDECORE_EXPORT TQIconSet UserIconSet(const TQString& name,
KInstance *instance=KGlobal::instance());
/**
diff --git a/kdecore/kiconloader_p.h b/kdecore/kiconloader_p.h
index a3201137b..41083b38c 100644
--- a/kdecore/kiconloader_p.h
+++ b/kdecore/kiconloader_p.h
@@ -12,12 +12,12 @@
#ifndef __KIconLoader_p_h_Included__
#define __KIconLoader_p_h_Included__
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kicontheme.h>
#include <kiconloader.h>
#include <kiconeffect.h>
-#include <qdict.h>
+#include <tqdict.h>
class KIconThemeNode
{
@@ -25,10 +25,10 @@ public:
KIconThemeNode(KIconTheme *_theme);
~KIconThemeNode();
- void queryIcons(QStringList *lst, int size, KIcon::Context context) const;
- void queryIconsByContext(QStringList *lst, int size, KIcon::Context context) const;
- KIcon findIcon(const QString& name, int size, KIcon::MatchType match) const;
- void printTree(QString& dbgString) const;
+ void queryIcons(TQStringList *lst, int size, KIcon::Context context) const;
+ void queryIconsByContext(TQStringList *lst, int size, KIcon::Context context) const;
+ KIcon findIcon(const TQString& name, int size, KIcon::MatchType match) const;
+ void printTree(TQString& dbgString) const;
KIconTheme *theme;
};
@@ -37,19 +37,19 @@ class KIconLoaderPrivate : public QObject
{
Q_OBJECT
public:
- QStringList mThemesInTree;
+ TQStringList mThemesInTree;
KIconGroup *mpGroups;
KIconThemeNode *mpThemeRoot;
KStandardDirs *mpDirs;
KIconLoader *q;
KIconEffect mpEffect;
- QDict<QImage> imgDict;
- QImage lastImage; // last loaded image without effect applied
- QString lastImageKey; // key for icon without effect
- QString appname;
+ TQDict<TQImage> imgDict;
+ TQImage lastImage; // last loaded image without effect applied
+ TQString lastImageKey; // key for icon without effect
+ TQString appname;
int lastIconType; // see KIcon::type
int lastIconThreshold; // see KIcon::threshold
- QPtrList<KIconThemeNode> links;
+ TQPtrList<KIconThemeNode> links;
bool extraDesktopIconsLoaded;
bool delayedLoading;
diff --git a/kdecore/kicontheme.cpp b/kdecore/kicontheme.cpp
index 62044d27e..6bbeba512 100644
--- a/kdecore/kicontheme.cpp
+++ b/kdecore/kicontheme.cpp
@@ -18,15 +18,15 @@
#include <stdlib.h>
#include <config.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qimage.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqimage.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -40,8 +40,8 @@
class KIconThemePrivate
{
public:
- QString example, screenshot;
- QString linkOverlay, lockOverlay, zipOverlay, shareOverlay;
+ TQString example, screenshot;
+ TQString linkOverlay, lockOverlay, zipOverlay, shareOverlay;
bool hidden;
KSharedConfig::Ptr sharedConfig;
};
@@ -52,12 +52,12 @@ public:
class KIconThemeDir
{
public:
- KIconThemeDir(const QString& dir, const KConfigBase *config);
+ KIconThemeDir(const TQString& dir, const KConfigBase *config);
bool isValid() const { return mbValid; }
- QString iconPath(const QString& name) const;
- QStringList iconList() const;
- QString dir() const { return mDir; }
+ TQString iconPath(const TQString& name) const;
+ TQStringList iconList() const;
+ TQString dir() const { return mDir; }
KIcon::Context context() const { return mContext; }
KIcon::Type type() const { return mType; }
@@ -73,20 +73,20 @@ private:
int mSize, mMinSize, mMaxSize;
int mThreshold;
- QString mDir;
+ TQString mDir;
};
/*** KIconTheme ***/
-KIconTheme::KIconTheme(const QString& name, const QString& appName)
+KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
{
d = new KIconThemePrivate;
- QStringList icnlibs;
- QStringList::ConstIterator it, itDir;
- QStringList themeDirs;
- QString cDir;
+ TQStringList icnlibs;
+ TQStringList::ConstIterator it, itDir;
+ TQStringList themeDirs;
+ TQString cDir;
// Applications can have local additions to the global "locolor" and
// "hicolor" icon themes. For these, the _global_ theme description
@@ -99,7 +99,7 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
for (it=icnlibs.begin(); it!=icnlibs.end(); ++it)
{
cDir = *it + appName + "/icons/" + name;
- if (QFile::exists( cDir ))
+ if (TQFile::exists( cDir ))
themeDirs += cDir + "/";
}
}
@@ -128,8 +128,8 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
return;
}
- QString fileName, mainSection;
- if(QFile::exists(mDir + "index.desktop")) {
+ TQString fileName, mainSection;
+ if(TQFile::exists(mDir + "index.desktop")) {
fileName = mDir + "index.desktop";
mainSection="KDE Icon Theme";
} else {
@@ -148,7 +148,7 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
mDepth = cfg.readNumEntry("DisplayDepth", 32);
mInherits = cfg.readListEntry("Inherits");
if ( name != "crystalsvg" )
- for ( QStringList::Iterator it = mInherits.begin(); it != mInherits.end(); ++it )
+ for ( TQStringList::Iterator it = mInherits.begin(); it != mInherits.end(); ++it )
if ( *it == "default" || *it == "hicolor" ) *it="crystalsvg";
d->hidden = cfg.readBoolEntry("Hidden", false);
@@ -159,7 +159,7 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
d->zipOverlay = cfg.readEntry("ZipOverlay", "zip");
d->shareOverlay = cfg.readEntry("ShareOverlay","share");
- QStringList dirs = cfg.readPathListEntry("Directories");
+ TQStringList dirs = cfg.readPathListEntry("Directories");
mDirs.setAutoDelete(true);
for (it=dirs.begin(); it!=dirs.end(); ++it)
{
@@ -182,19 +182,19 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
// Expand available sizes for scalable icons to their full range
int i;
- QMap<int,QValueList<int> > scIcons;
+ TQMap<int,TQValueList<int> > scIcons;
for (KIconThemeDir *dir=mDirs.first(); dir!=0L; dir=mDirs.next())
{
if ((dir->type() == KIcon::Scalable) && !scIcons.contains(dir->size()))
{
- QValueList<int> lst;
+ TQValueList<int> lst;
for (i=dir->minSize(); i<=dir->maxSize(); i++)
lst += i;
scIcons[dir->size()] = lst;
}
}
- QStringList groups;
+ TQStringList groups;
groups += "Desktop";
groups += "Toolbar";
groups += "MainToolbar";
@@ -205,8 +205,8 @@ KIconTheme::KIconTheme(const QString& name, const QString& appName)
for (it=groups.begin(), i=0; it!=groups.end(); ++it, i++)
{
mDefSize[i] = cfg.readNumEntry(*it + "Default", defDefSizes[i]);
- QValueList<int> exp, lst = cfg.readIntListEntry(*it + "Sizes");
- QValueList<int>::ConstIterator it2;
+ TQValueList<int> exp, lst = cfg.readIntListEntry(*it + "Sizes");
+ TQValueList<int>::ConstIterator it2;
for (it2=lst.begin(); it2!=lst.end(); ++it2)
{
if (scIcons.contains(*it2))
@@ -234,12 +234,12 @@ bool KIconTheme::isHidden() const
return d->hidden;
}
-QString KIconTheme::example() const { return d->example; }
-QString KIconTheme::screenshot() const { return d->screenshot; }
-QString KIconTheme::linkOverlay() const { return d->linkOverlay; }
-QString KIconTheme::lockOverlay() const { return d->lockOverlay; }
-QString KIconTheme::zipOverlay() const { return d->zipOverlay; }
-QString KIconTheme::shareOverlay() const { return d->shareOverlay; }
+TQString KIconTheme::example() const { return d->example; }
+TQString KIconTheme::screenshot() const { return d->screenshot; }
+TQString KIconTheme::linkOverlay() const { return d->linkOverlay; }
+TQString KIconTheme::lockOverlay() const { return d->lockOverlay; }
+TQString KIconTheme::zipOverlay() const { return d->zipOverlay; }
+TQString KIconTheme::shareOverlay() const { return d->shareOverlay; }
int KIconTheme::defaultSize(KIcon::Group group) const
{
@@ -251,9 +251,9 @@ int KIconTheme::defaultSize(KIcon::Group group) const
return mDefSize[group];
}
-QValueList<int> KIconTheme::querySizes(KIcon::Group group) const
+TQValueList<int> KIconTheme::querySizes(KIcon::Group group) const
{
- QValueList<int> empty;
+ TQValueList<int> empty;
if ((group < 0) || (group >= KIcon::LastGroup))
{
kdDebug(264) << "Illegal icon group: " << group << "\n";
@@ -262,15 +262,15 @@ QValueList<int> KIconTheme::querySizes(KIcon::Group group) const
return mSizes[group];
}
-QStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
+TQStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
{
int delta = 1000, dw;
- QPtrListIterator<KIconThemeDir> dirs(mDirs);
+ TQPtrListIterator<KIconThemeDir> dirs(mDirs);
KIconThemeDir *dir;
// Try to find exact match
- QStringList result;
+ TQStringList result;
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
@@ -310,21 +310,21 @@ QStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
best = dir;
}
if (best == 0L)
- return QStringList();
+ return TQStringList();
return best->iconList();
}
-QStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) const
+TQStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) const
{
- QPtrListIterator<KIconThemeDir> dirs(mDirs);
+ TQPtrListIterator<KIconThemeDir> dirs(mDirs);
int dw;
KIconThemeDir *dir;
// We want all the icons for a given context, but we prefer icons
// of size size . Note that this may (will) include duplicate icons
- //QStringList iconlist[34]; // 33 == 48-16+1
- QStringList iconlist[128]; // 33 == 48-16+1
+ //TQStringList iconlist[34]; // 33 == 48-16+1
+ TQStringList iconlist[128]; // 33 == 48-16+1
// Usually, only the 0, 6 (22-16), 10 (32-22), 16 (48-32 or 32-16),
// 26 (48-22) and 32 (48-16) will be used, but who knows if someone
// will make icon themes with different icon sizes.
@@ -338,7 +338,7 @@ QStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) co
iconlist[(dw<127)?dw:127]+=dir->iconList();
}
- QStringList iconlistResult;
+ TQStringList iconlistResult;
for (int i=0; i<128; i++) iconlistResult+=iconlist[i];
return iconlistResult;
@@ -346,7 +346,7 @@ QStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) co
bool KIconTheme::hasContext(KIcon::Context context) const
{
- QPtrListIterator<KIconThemeDir> dirs(mDirs);
+ TQPtrListIterator<KIconThemeDir> dirs(mDirs);
KIconThemeDir *dir;
for ( ; dirs.current(); ++dirs)
@@ -358,15 +358,15 @@ bool KIconTheme::hasContext(KIcon::Context context) const
return false;
}
-KIcon KIconTheme::iconPath(const QString& name, int size, KIcon::MatchType match) const
+KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType match) const
{
KIcon icon;
- QString path;
+ TQString path;
int delta = -1000, dw;
KIconThemeDir *dir;
dw = 1000; // shut up, gcc
- QPtrListIterator<KIconThemeDir> dirs(mDirs);
+ TQPtrListIterator<KIconThemeDir> dirs(mDirs);
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
@@ -435,54 +435,54 @@ KIcon KIconTheme::iconPath(const QString& name, int size, KIcon::MatchType match
}
// static
-QString *KIconTheme::_theme = 0L;
+TQString *KIconTheme::_theme = 0L;
// static
-QStringList *KIconTheme::_theme_list = 0L;
+TQStringList *KIconTheme::_theme_list = 0L;
// static
-QString KIconTheme::current()
+TQString KIconTheme::current()
{
// Static pointer because of unloading problems wrt DSO's.
if (_theme != 0L)
return *_theme;
- _theme = new QString();
+ _theme = new TQString();
KConfig *config = KGlobal::config();
KConfigGroupSaver saver(config, "Icons");
*_theme = config->readEntry("Theme",defaultThemeName());
- if ( *_theme == QString::fromLatin1("hicolor") ) *_theme = defaultThemeName();
+ if ( *_theme == TQString::fromLatin1("hicolor") ) *_theme = defaultThemeName();
/* if (_theme->isEmpty())
{
- if (QPixmap::defaultDepth() > 8)
+ if (TQPixmap::defaultDepth() > 8)
*_theme = defaultThemeName();
else
- *_theme = QString::fromLatin1("locolor");
+ *_theme = TQString::fromLatin1("locolor");
}*/
return *_theme;
}
// static
-QStringList KIconTheme::list()
+TQStringList KIconTheme::list()
{
// Static pointer because of unloading problems wrt DSO's.
if (_theme_list != 0L)
return *_theme_list;
- _theme_list = new QStringList();
- QStringList icnlibs = KGlobal::dirs()->resourceDirs("icon");
+ _theme_list = new TQStringList();
+ TQStringList icnlibs = KGlobal::dirs()->resourceDirs("icon");
icnlibs += (KGlobal::dirs()->resourceDirs("xdgdata-icon"));
icnlibs += "/usr/share/pixmaps";
// These are not in the icon spec, but e.g. GNOME puts some icons there anyway.
icnlibs += KGlobal::dirs()->resourceDirs("xdgdata-pixmap");
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it=icnlibs.begin(); it!=icnlibs.end(); ++it)
{
- QDir dir(*it);
+ TQDir dir(*it);
if (!dir.exists())
continue;
- QStringList lst = dir.entryList(QDir::Dirs);
- QStringList::ConstIterator it2;
+ TQStringList lst = dir.entryList(TQDir::Dirs);
+ TQStringList::ConstIterator it2;
for (it2=lst.begin(); it2!=lst.end(); ++it2)
{
if ((*it2 == ".") || (*it2 == "..") || (*it2).startsWith("default.") )
@@ -509,14 +509,14 @@ void KIconTheme::reconfigure()
}
// static
-QString KIconTheme::defaultThemeName()
+TQString KIconTheme::defaultThemeName()
{
- return QString::fromLatin1("crystalsvg");
+ return TQString::fromLatin1("crystalsvg");
}
/*** KIconThemeDir ***/
-KIconThemeDir::KIconThemeDir(const QString& dir, const KConfigBase *config)
+KIconThemeDir::KIconThemeDir(const TQString& dir, const KConfigBase *config)
{
mbValid = false;
mDir = dir;
@@ -528,7 +528,7 @@ KIconThemeDir::KIconThemeDir(const QString& dir, const KConfigBase *config)
if (mSize == 0)
return;
- QString tmp = config->readEntry("Context");
+ TQString tmp = config->readEntry("Context");
if (tmp == "Devices")
mContext = KIcon::Device;
else if (tmp == "MimeTypes")
@@ -577,28 +577,28 @@ KIconThemeDir::KIconThemeDir(const QString& dir, const KConfigBase *config)
mbValid = true;
}
-QString KIconThemeDir::iconPath(const QString& name) const
+TQString KIconThemeDir::iconPath(const TQString& name) const
{
if (!mbValid)
- return QString::null;
- QString file = mDir + "/" + name;
+ return TQString::null;
+ TQString file = mDir + "/" + name;
- if (access(QFile::encodeName(file), R_OK) == 0)
+ if (access(TQFile::encodeName(file), R_OK) == 0)
return file;
- return QString::null;
+ return TQString::null;
}
-QStringList KIconThemeDir::iconList() const
+TQStringList KIconThemeDir::iconList() const
{
- QDir dir(mDir);
+ TQDir dir(mDir);
#ifdef HAVE_LIBART
- QStringList lst = dir.entryList("*.png;*.svg;*.svgz;*.xpm", QDir::Files);
+ TQStringList lst = dir.entryList("*.png;*.svg;*.svgz;*.xpm", TQDir::Files);
#else
- QStringList lst = dir.entryList("*.png;*.xpm", QDir::Files);
+ TQStringList lst = dir.entryList("*.png;*.xpm", TQDir::Files);
#endif
- QStringList result;
- QStringList::ConstIterator it;
+ TQStringList result;
+ TQStringList::ConstIterator it;
for (it=lst.begin(); it!=lst.end(); ++it)
result += mDir + "/" + *it;
return result;
diff --git a/kdecore/kicontheme.h b/kdecore/kicontheme.h
index 424586df7..06c9aea5e 100644
--- a/kdecore/kicontheme.h
+++ b/kdecore/kicontheme.h
@@ -13,9 +13,9 @@
#ifndef __KIconTheme_h_Included__
#define __KIconTheme_h_Included__
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include "kdelibs_export.h"
class KConfig;
@@ -169,7 +169,7 @@ public:
/**
* The full path of the icon.
*/
- QString path;
+ TQString path;
private:
KIconPrivate *d;
@@ -192,71 +192,71 @@ public:
* @param appName the name of the application. Can be null. This argument
* allows applications to have themed application icons.
*/
- KIconTheme(const QString& name, const QString& appName=QString::null);
+ KIconTheme(const TQString& name, const TQString& appName=TQString::null);
~KIconTheme();
/**
* The stylized name of the icon theme.
* @return the (human-readable) name of the theme
*/
- QString name() const { return mName; }
+ TQString name() const { return mName; }
/**
* A description for the icon theme.
- * @return a human-readable description of the theme, QString::null
+ * @return a human-readable description of the theme, TQString::null
* if there is none
*/
- QString description() const { return mDesc; }
+ TQString description() const { return mDesc; }
/**
* Return the name of the "example" icon. This can be used to
* present the theme to the user.
- * @return the name of the example icon, QString::null if there is none
+ * @return the name of the example icon, TQString::null if there is none
*/
- QString example() const;
+ TQString example() const;
/**
* Return the name of the screenshot.
- * @return the name of the screenshot, QString::null if there is none
+ * @return the name of the screenshot, TQString::null if there is none
*/
- QString screenshot() const;
+ TQString screenshot() const;
/**
* Returns the name of this theme's link overlay.
* @return the name of the link overlay
*/
- QString linkOverlay() const;
+ TQString linkOverlay() const;
/**
* Returns the name of this theme's zip overlay.
* @return the name of the zip overlay
*/
- QString zipOverlay() const;
+ TQString zipOverlay() const;
/**
* Returns the name of this theme's lock overlay.
* @return the name of the lock overlay
*/
- QString lockOverlay() const;
+ TQString lockOverlay() const;
/**
* Returns the name of this theme's share overlay.
* @return the name of the share overlay
* @since 3.1
*/
- QString shareOverlay () const;
+ TQString shareOverlay () const;
/**
* Returns the toplevel theme directory.
* @return the directory of the theme
*/
- QString dir() const { return mDir; }
+ TQString dir() const { return mDir; }
/**
* The themes this icon theme falls back on.
* @return a list of icon themes that are used as fall-backs
*/
- QStringList inherits() const { return mInherits; }
+ TQStringList inherits() const { return mInherits; }
/**
* The icon theme exists?
@@ -290,7 +290,7 @@ public:
* @param group The icon group. See KIcon::Group.
* @return a list of available sized for the given group
*/
- QValueList<int> querySizes(KIcon::Group group) const;
+ TQValueList<int> querySizes(KIcon::Group group) const;
/**
* Query available icons for a size and context.
@@ -298,7 +298,7 @@ public:
* @param context the context of the icons
* @return the list of icon names
*/
- QStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
+ TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
/**
* Query available icons for a context and preferred size.
@@ -306,7 +306,7 @@ public:
* @param context the context of the icons
* @return the list of icon names
*/
- QStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
+ TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const;
/**
@@ -319,7 +319,7 @@ public:
* @return A KIcon class that describes the icon. If an icon is found,
* @see KIcon::isValid will return true, and false otherwise.
*/
- KIcon iconPath(const QString& name, int size, KIcon::MatchType match) const;
+ KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const;
/**
* Returns true if the theme has any icons for the given context.
@@ -331,13 +331,13 @@ public:
* List all icon themes installed on the system, global and local.
* @return the list of all icon themes
*/
- static QStringList list();
+ static TQStringList list();
/**
* Returns the current icon theme.
* @return the name of the current theme
*/
- static QString current();
+ static TQString current();
/**
* Reconfigure the theme.
@@ -349,20 +349,20 @@ public:
* @return the name of the default theme name
* @since 3.1
*/
- static QString defaultThemeName();
+ static TQString defaultThemeName();
private:
int mDefSize[8];
- QValueList<int> mSizes[8];
+ TQValueList<int> mSizes[8];
int mDepth;
- QString mDir, mName, mDesc;
- QStringList mInherits;
- QPtrList<KIconThemeDir> mDirs;
+ TQString mDir, mName, mDesc;
+ TQStringList mInherits;
+ TQPtrList<KIconThemeDir> mDirs;
KIconThemePrivate *d;
- static QString *_theme;
- static QStringList *_theme_list;
+ static TQString *_theme;
+ static TQStringList *_theme_list;
};
#endif
diff --git a/kdecore/kidna.cpp b/kdecore/kidna.cpp
index f3289b26c..c7e1ccdb5 100644
--- a/kdecore/kidna.cpp
+++ b/kdecore/kidna.cpp
@@ -30,34 +30,34 @@
using namespace KNetwork;
#endif
-QCString KIDNA::toAsciiCString(const QString &idna)
+TQCString KIDNA::toAsciiCString(const TQString &idna)
{
#ifndef Q_WS_WIN //TODO kresolver not ported
return KResolver::domainToAscii(idna);
#else
- return QCString();
+ return TQCString();
#endif
}
-QString KIDNA::toAscii(const QString &idna)
+TQString KIDNA::toAscii(const TQString &idna)
{
if (idna.length() && (idna[0] == "."))
{
- QString host = QString::fromLatin1(toAsciiCString(idna.mid(1)));
+ TQString host = TQString::fromLatin1(toAsciiCString(idna.mid(1)));
if (host.isEmpty())
- return QString::null; // Error
+ return TQString::null; // Error
return idna[0] + host;
}
- return QString::fromLatin1(toAsciiCString(idna));
+ return TQString::fromLatin1(toAsciiCString(idna));
}
-QString KIDNA::toUnicode(const QString &idna)
+TQString KIDNA::toUnicode(const TQString &idna)
{
#ifndef Q_WS_WIN //TODO kresolver not ported
if (idna.length() && (idna[0] == "."))
return idna[0] + KResolver::domainToUnicode(idna.mid(1));
return KResolver::domainToUnicode(idna);
#else
- return QString::null;
+ return TQString::null;
#endif
}
diff --git a/kdecore/kidna.h b/kdecore/kidna.h
index a8b04200b..9feac63b5 100644
--- a/kdecore/kidna.h
+++ b/kdecore/kidna.h
@@ -21,7 +21,7 @@
#ifndef _KIDNA_H
#define _KIDNA_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
namespace KIDNA {
@@ -31,7 +31,7 @@ namespace KIDNA {
*
* If conversion is not possible, an empty string is returned.
*/
- KDECORE_EXPORT QCString toAsciiCString(const QString &idna);
+ KDECORE_EXPORT TQCString toAsciiCString(const TQString &idna);
/**
* Converts an International Domain Name @p idna to
@@ -39,13 +39,13 @@ namespace KIDNA {
*
* If conversion is not possible, an empty string is returned.
*/
- KDECORE_EXPORT QString toAscii(const QString &idna);
+ KDECORE_EXPORT TQString toAscii(const TQString &idna);
/**
* Converts an International Domain Name @p idna to
* its UNICODE representation
*/
- KDECORE_EXPORT QString toUnicode(const QString &idna);
+ KDECORE_EXPORT TQString toUnicode(const TQString &idna);
}
#endif /* _KIDNA_H */
diff --git a/kdecore/kinstance.cpp b/kdecore/kinstance.cpp
index cc1e0837d..2a579de0a 100644
--- a/kdecore/kinstance.cpp
+++ b/kdecore/kinstance.cpp
@@ -30,17 +30,17 @@
#include "kglobal.h"
#include "kmimesourcefactory.h"
-#include <qfont.h>
+#include <tqfont.h>
#include "config.h"
#ifndef NDEBUG
#include <assert.h>
- #include <qptrdict.h>
- static QPtrList<KInstance> *allInstances = 0;
- static QPtrDict<QCString> *allOldInstances = 0;
- #define DEBUG_ADD do { if (!allInstances) { allInstances = new QPtrList<KInstance>(); allOldInstances = new QPtrDict<QCString>(); } allInstances->append(this); allOldInstances->insert( this, new QCString( _name)); } while (false);
+ #include <tqptrdict.h>
+ static TQPtrList<KInstance> *allInstances = 0;
+ static TQPtrDict<TQCString> *allOldInstances = 0;
+ #define DEBUG_ADD do { if (!allInstances) { allInstances = new TQPtrList<KInstance>(); allOldInstances = new TQPtrDict<TQCString>(); } allInstances->append(this); allOldInstances->insert( this, new TQCString( _name)); } while (false);
#define DEBUG_REMOVE do { allInstances->removeRef(this); } while (false);
- #define DEBUG_CHECK_ALIVE do { if (!allInstances->contains((KInstance*)this)) { QCString *old = allOldInstances->find((KInstance*)this); qWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false);
+ #define DEBUG_CHECK_ALIVE do { if (!allInstances->contains((KInstance*)this)) { TQCString *old = allOldInstances->find((KInstance*)this); qWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false);
#else
#define DEBUG_ADD
#define DEBUG_REMOVE
@@ -61,12 +61,12 @@ public:
}
KMimeSourceFactory* mimeSourceFactory;
- QString configName;
+ TQString configName;
bool ownAboutdata;
KSharedConfig::Ptr sharedConfig;
};
-KInstance::KInstance( const QCString& name)
+KInstance::KInstance( const TQCString& name)
: _dirs (0L),
_config (0L),
_iconLoader (0L),
@@ -184,10 +184,10 @@ KConfig *KInstance::config() const
// Check whether custom config files are allowed.
d->sharedConfig->setGroup( "KDE Action Restrictions" );
- QString kioskException = d->sharedConfig->readEntry("kiosk_exception");
+ TQString kioskException = d->sharedConfig->readEntry("kiosk_exception");
if (d->sharedConfig->readBoolEntry( "custom_config", true))
{
- d->sharedConfig->setGroup(QString::null);
+ d->sharedConfig->setGroup(TQString::null);
}
else
{
@@ -201,11 +201,11 @@ KConfig *KInstance::config() const
if ( !_name.isEmpty() )
d->sharedConfig = KSharedConfig::openConfig( _name + "rc");
else
- d->sharedConfig = KSharedConfig::openConfig( QString::null );
+ d->sharedConfig = KSharedConfig::openConfig( TQString::null );
}
// Check if we are excempt from kiosk restrictions
- if (kde_kiosk_admin && !kde_kiosk_exception && !QCString(getenv("KDE_KIOSK_NO_RESTRICTIONS")).isEmpty())
+ if (kde_kiosk_admin && !kde_kiosk_exception && !TQCString(getenv("KDE_KIOSK_NO_RESTRICTIONS")).isEmpty())
{
kde_kiosk_exception = true;
d->sharedConfig = 0;
@@ -230,7 +230,7 @@ KSharedConfig *KInstance::sharedConfig() const
return d->sharedConfig;
}
-void KInstance::setConfigName(const QString &configName)
+void KInstance::setConfigName(const TQString &configName)
{
DEBUG_CHECK_ALIVE
d->configName = configName;
@@ -260,7 +260,7 @@ const KAboutData * KInstance::aboutData() const
return _aboutData;
}
-QCString KInstance::instanceName() const
+TQCString KInstance::instanceName() const
{
DEBUG_CHECK_ALIVE
return _name;
diff --git a/kdecore/kinstance.h b/kdecore/kinstance.h
index 88678ba99..f502eefc5 100644
--- a/kdecore/kinstance.h
+++ b/kdecore/kinstance.h
@@ -28,7 +28,7 @@ class KInstancePrivate;
class KMimeSourceFactory;
class KSharedConfig;
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
@@ -49,7 +49,7 @@ class KDECORE_EXPORT KInstance
* Constructor.
* @param instanceName the name of the instance
*/
- KInstance( const QCString& instanceName) ;
+ KInstance( const TQCString& instanceName) ;
/**
* Constructor.
@@ -118,7 +118,7 @@ class KDECORE_EXPORT KInstance
* @return the instance name, can be null if the KInstance has been
* created with a null name
*/
- QCString instanceName() const;
+ TQCString instanceName() const;
/**
* Returns the KMimeSourceFactory of the instance.
@@ -138,7 +138,7 @@ protected:
* @param name the name of the default config file
* @since 3.1
*/
- void setConfigName(const QString &name);
+ void setConfigName(const TQString &name);
private:
mutable KStandardDirs *_dirs;
@@ -146,7 +146,7 @@ private:
mutable KConfig *_config;
mutable KIconLoader *_iconLoader;
- QCString _name;
+ TQCString _name;
const KAboutData *_aboutData;
protected:
diff --git a/kdecore/kipc.cpp b/kdecore/kipc.cpp
index 087f28c86..3d21be6d1 100644
--- a/kdecore/kipc.cpp
+++ b/kdecore/kipc.cpp
@@ -27,7 +27,7 @@
*/
#include "config.h"
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
#if defined Q_WS_X11
#include <X11/X.h>
diff --git a/kdecore/kipc.h b/kdecore/kipc.h
index d50697926..384620cde 100644
--- a/kdecore/kipc.h
+++ b/kdecore/kipc.h
@@ -22,7 +22,7 @@
#ifndef __KIPC_h_Included__
#define __KIPC_h_Included__
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
#include "kdelibs_export.h"
/**
diff --git a/kdecore/kkeynative_x11.cpp b/kdecore/kkeynative_x11.cpp
index c0f00eecf..7733d3de7 100644
--- a/kdecore/kkeynative_x11.cpp
+++ b/kdecore/kkeynative_x11.cpp
@@ -20,16 +20,16 @@
Boston, MA 02110-1301, USA.
*/
-#include <qnamespace.h>
-#include <qwindowdefs.h>
+#include <tqnamespace.h>
+#include <tqwindowdefs.h>
#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MACX) // Only compile this module if we're compiling for X11, mac or win32
#include "kkeynative.h"
#include "kkeyserver_x11.h"
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "kckey.h"
#include <kdebug.h>
#include <klocale.h>
diff --git a/kdecore/kkeyserver_x11.cpp b/kdecore/kkeyserver_x11.cpp
index 3f3bddc0a..96411bca5 100644
--- a/kdecore/kkeyserver_x11.cpp
+++ b/kdecore/kkeyserver_x11.cpp
@@ -22,8 +22,8 @@
#include <config.h>
-#include <qnamespace.h>
-#include <qwindowdefs.h>
+#include <tqnamespace.h>
+#include <tqwindowdefs.h>
#if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MACX) // Only compile this module if we're compiling for X11, mac or win32
@@ -81,7 +81,7 @@ struct ModInfo
uint modX;
#endif
const char* psName;
- QString sLabel;
+ TQString sLabel;
};
struct SymVariation
@@ -107,10 +107,10 @@ struct TransKey {
static ModInfo g_rgModInfo[KKey::MOD_FLAG_COUNT] =
{
- { KKey::SHIFT, Qt::SHIFT, X11_ONLY(ShiftMask) I18N_NOOP("Shift"), QString() },
- { KKey::CTRL, Qt::CTRL, X11_ONLY(ControlMask) I18N_NOOP("Ctrl"), QString() },
- { KKey::ALT, Qt::ALT, X11_ONLY(Mod1Mask) I18N_NOOP("Alt"), QString() },
- { KKey::WIN, KKey::QtWIN, X11_ONLY(Mod4Mask) I18N_NOOP("Win"), QString() }
+ { KKey::SHIFT, Qt::SHIFT, X11_ONLY(ShiftMask) I18N_NOOP("Shift"), TQString() },
+ { KKey::CTRL, Qt::CTRL, X11_ONLY(ControlMask) I18N_NOOP("Ctrl"), TQString() },
+ { KKey::ALT, Qt::ALT, X11_ONLY(Mod1Mask) I18N_NOOP("Alt"), TQString() },
+ { KKey::WIN, KKey::QtWIN, X11_ONLY(Mod4Mask) I18N_NOOP("Win"), TQString() }
};
// Special Names List
@@ -365,7 +365,7 @@ bool initializeMods()
g_bInitializedMods = true;
- kdDebug(125) << "KKeyServer::initializeMods(): Win Mod = 0x" << QString::number(g_rgModInfo[3].modX, 16) << endl;
+ kdDebug(125) << "KKeyServer::initializeMods(): Win Mod = 0x" << TQString::number(g_rgModInfo[3].modX, 16) << endl;
return true;
}
@@ -392,7 +392,7 @@ static void intializeKKeyLabels()
// class Mod
//---------------------------------------------------------------------
-/*void Mod::init( const QString& s )
+/*void Mod::init( const TQString& s )
{
}*/
@@ -406,7 +406,7 @@ bool Sym::initQt( int keyQt )
int symQt = keyQt & 0xffff;
if( (keyQt & Qt::UNICODE_ACCEL) || symQt < 0x1000 ) {
- m_sym = QChar(symQt).lower().unicode();
+ m_sym = TQChar(symQt).lower().unicode();
return true;
}
@@ -424,7 +424,7 @@ bool Sym::initQt( int keyQt )
m_sym = 0;
if( symQt != Qt::Key_Shift && symQt != Qt::Key_Control && symQt != Qt::Key_Alt &&
symQt != Qt::Key_Meta && symQt != Qt::Key_Direction_L && symQt != Qt::Key_Direction_R )
- kdDebug(125) << "Sym::initQt( " << QString::number(keyQt,16) << " ): failed to convert key." << endl;
+ kdDebug(125) << "Sym::initQt( " << TQString::number(keyQt,16) << " ): failed to convert key." << endl;
return false;
#elif defined(Q_WS_MACX)
m_sym = symQt;
@@ -432,7 +432,7 @@ bool Sym::initQt( int keyQt )
#endif
}
-bool Sym::init( const QString& s )
+bool Sym::init( const TQString& s )
{
// If it's a single character, get unicode value.
if( s.length() == 1 ) {
@@ -463,7 +463,7 @@ bool Sym::init( const QString& s )
if( !m_sym ) {
m_sym = XStringToKeysym( s.lower().latin1() );
if( !m_sym ) {
- QString s2 = s;
+ TQString s2 = s;
s2[0] = s2[0].upper();
m_sym = XStringToKeysym( s2.latin1() );
}
@@ -476,7 +476,7 @@ int Sym::qt() const
{
if( m_sym < 0x1000 ) {
if( m_sym >= 'a' && m_sym <= 'z' )
- return QChar(m_sym).upper();
+ return TQChar(m_sym).upper();
return m_sym;
}
#ifdef Q_WS_WIN
@@ -493,10 +493,10 @@ int Sym::qt() const
return Qt::Key_unknown;
}
-QString Sym::toString( bool bUserSpace ) const
+TQString Sym::toString( bool bUserSpace ) const
{
if( m_sym == 0 )
- return QString::null;
+ return TQString::null;
// If it's a unicode character,
#ifdef Q_WS_WIN
@@ -504,7 +504,7 @@ QString Sym::toString( bool bUserSpace ) const
#else
else if( m_sym < 0x3000 ) {
#endif
- QChar c = QChar(m_sym).upper();
+ TQChar c = TQChar(m_sym).upper();
// Print all non-space characters directly when output is user-visible.
// Otherwise only print alphanumeric latin1 characters directly (A,B,C,1,2,3).
if( (c.latin1() && c.isLetterOrNumber())
@@ -515,22 +515,22 @@ QString Sym::toString( bool bUserSpace ) const
// Look up in special names list
for( int i = 0; g_rgSymNames[i].sym != 0; i++ ) {
if( m_sym == g_rgSymNames[i].sym )
- return bUserSpace ? i18n(g_rgSymNames[i].psName) : QString(g_rgSymNames[i].psName);
+ return bUserSpace ? i18n(g_rgSymNames[i].psName) : TQString(g_rgSymNames[i].psName);
}
- QString s;
+ TQString s;
#ifdef Q_WS_WIN
- s = QKeySequence( m_sym );
+ s = TQKeySequence( m_sym );
#elif defined(Q_WS_X11)
// Get X-name
s = XKeysymToString( m_sym );
#endif
capitalizeKeyname( s );
- return bUserSpace ? i18n("QAccel", s.latin1()) : s;
+ return bUserSpace ? i18n("TQAccel", s.latin1()) : s;
}
-QString Sym::toStringInternal() const { return toString( false ); }
-QString Sym::toString() const { return toString( true ); }
+TQString Sym::toStringInternal() const { return toString( false ); }
+TQString Sym::toString() const { return toString( true ); }
uint Sym::getModsRequired() const
{
@@ -541,7 +541,7 @@ uint Sym::getModsRequired() const
if( m_sym == XK_Break ) return KKey::CTRL;
if( m_sym < 0x3000 ) {
- QChar c(m_sym);
+ TQChar c(m_sym);
if( c.isLetter() && c.lower() != c.upper() && m_sym == c.upper().unicode() )
return KKey::SHIFT;
}
@@ -576,7 +576,7 @@ uint Sym::getSymVariation() const
return 0;
}
-void Sym::capitalizeKeyname( QString& s )
+void Sym::capitalizeKeyname( TQString& s )
{
s[0] = s[0].upper();
int len = s.length();
@@ -773,33 +773,33 @@ bool codeXToSym( uchar codeX, uint modX, uint& sym )
}
#endif //!Q_WS_WIN
-static QString modToString( uint mod, bool bUserSpace )
+static TQString modToString( uint mod, bool bUserSpace )
{
if( bUserSpace && !g_bInitializedKKeyLabels )
intializeKKeyLabels();
- QString s;
+ TQString s;
for( int i = KKey::MOD_FLAG_COUNT-1; i >= 0; i-- ) {
if( mod & g_rgModInfo[i].mod ) {
if( !s.isEmpty() )
s += '+';
s += (bUserSpace)
? g_rgModInfo[i].sLabel
- : QString(g_rgModInfo[i].psName);
+ : TQString(g_rgModInfo[i].psName);
}
}
return s;
}
-QString modToStringInternal( uint mod ) { return modToString( mod, false ); }
-QString modToStringUser( uint mod ) { return modToString( mod, true ); }
+TQString modToStringInternal( uint mod ) { return modToString( mod, false ); }
+TQString modToStringUser( uint mod ) { return modToString( mod, true ); }
-uint stringUserToMod( const QString& mod )
+uint stringUserToMod( const TQString& mod )
{
if( !g_bInitializedKKeyLabels )
intializeKKeyLabels();
- QString s;
+ TQString s;
for( int i = KKey::MOD_FLAG_COUNT-1; i >= 0; i-- ) {
if( mod.lower() == g_rgModInfo[i].sLabel.lower())
return g_rgModInfo[i].mod;
@@ -843,7 +843,7 @@ uint stringUserToMod( const QString& mod )
// Get X key symbol. Only works if Qt name is same as X name.
if( psKeySym ) {
- QString sKeySym = psKeySym;
+ TQString sKeySym = psKeySym;
// Check for lower-case equalent first because most
// X11 names are all lower-case.
@@ -1040,8 +1040,8 @@ void KKey::simplify()
}
// If this is a letter, don't remove any modifiers.
- if( m_sym < 0x3000 && QChar(m_sym).isLetter() )
- m_sym = QChar(m_sym).lower().unicode();
+ if( m_sym < 0x3000 && TQChar(m_sym).isLetter() )
+ m_sym = TQChar(m_sym).lower().unicode();
// Remove modifers from modifier list which are implicit in the symbol.
// Ex. Shift+Plus => Plus (en)
diff --git a/kdecore/kkeyserver_x11.h b/kdecore/kkeyserver_x11.h
index 73c800db2..dbca533e4 100644
--- a/kdecore/kkeyserver_x11.h
+++ b/kdecore/kkeyserver_x11.h
@@ -64,7 +64,7 @@ namespace KKeyServer
* @param s the description of the symbol
* @see toString()
*/
- Sym( const QString& s )
+ Sym( const TQString& s )
{ init( s ); }
/**
@@ -81,7 +81,7 @@ namespace KKeyServer
* @return true if successful, false otherwise
* @see toString()
*/
- bool init( const QString &s );
+ bool init( const TQString &s );
/**
* Returns the qt key code of the symbol.
@@ -92,13 +92,13 @@ namespace KKeyServer
/**
* @internal
*/
- QString toStringInternal() const;
+ TQString toStringInternal() const;
/**
* Returns the string representation of the symbol.
* @return the string representation of the symbol
*/
- QString toString() const;
+ TQString toString() const;
/**
* Returns the mods that are required for this symbol as
@@ -125,9 +125,9 @@ namespace KKeyServer
Sym& operator =( uint sym ) { m_sym = sym; return *this; }
private:
- QString toString( bool bUserSpace ) const;
+ TQString toString( bool bUserSpace ) const;
- static void capitalizeKeyname( QString& );
+ static void capitalizeKeyname( TQString& );
};
/**
@@ -443,7 +443,7 @@ namespace KKeyServer
/**
* @internal
*/
- KDECORE_EXPORT QString modToStringInternal( uint mod );
+ KDECORE_EXPORT TQString modToStringInternal( uint mod );
/**
* Converts the mask of ORed KKey::ModFlag modifiers to a
@@ -451,7 +451,7 @@ namespace KKeyServer
* @param mod the mask of ORed KKey::ModFlag modifiers
* @return the user-readable string
*/
- KDECORE_EXPORT QString modToStringUser( uint mod );
+ KDECORE_EXPORT TQString modToStringUser( uint mod );
/**
* Converts the modifier given as user-readable string
@@ -459,13 +459,13 @@ namespace KKeyServer
* @internal
* @since 3.5
*/
- KDECORE_EXPORT uint stringUserToMod( const QString& mod );
+ KDECORE_EXPORT uint stringUserToMod( const TQString& mod );
/**
* @internal
* Unimplemented?
*/
- KDECORE_EXPORT bool stringToSymMod( const QString&, uint& sym, uint& mod );
+ KDECORE_EXPORT bool stringToSymMod( const TQString&, uint& sym, uint& mod );
/**
* @internal
diff --git a/kdecore/klibloader.cpp b/kdecore/klibloader.cpp
index e994d7274..61155e7c9 100644
--- a/kdecore/klibloader.cpp
+++ b/kdecore/klibloader.cpp
@@ -19,11 +19,11 @@
#include "config.h"
#include <config.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qobjectdict.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqobjectdict.h>
#include "kapplication.h"
#include "klibloader.h"
@@ -33,7 +33,7 @@
#include "ltdl.h"
-template class QAsciiDict<KLibrary>;
+template class TQAsciiDict<KLibrary>;
#include <stdlib.h> //getenv
@@ -57,19 +57,19 @@ template class QAsciiDict<KLibrary>;
class KLibLoaderPrivate
{
public:
- QPtrList<KLibWrapPrivate> loaded_stack;
- QPtrList<KLibWrapPrivate> pending_close;
+ TQPtrList<KLibWrapPrivate> loaded_stack;
+ TQPtrList<KLibWrapPrivate> pending_close;
enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode;
- QString errorMessage;
+ TQString errorMessage;
};
KLibLoader* KLibLoader::s_self = 0;
// -------------------------------------------------------------------------
-KLibFactory::KLibFactory( QObject* parent, const char* name )
- : QObject( parent, name )
+KLibFactory::KLibFactory( TQObject* parent, const char* name )
+ : TQObject( parent, name )
{
}
@@ -78,16 +78,16 @@ KLibFactory::~KLibFactory()
// kdDebug(150) << "Deleting KLibFactory " << this << endl;
}
-QObject* KLibFactory::create( QObject* parent, const char* name, const char* classname, const QStringList &args )
+TQObject* KLibFactory::create( TQObject* parent, const char* name, const char* classname, const TQStringList &args )
{
- QObject* obj = createObject( parent, name, classname, args );
+ TQObject* obj = createObject( parent, name, classname, args );
if ( obj )
emit objectCreated( obj );
return obj;
}
-QObject* KLibFactory::createObject( QObject*, const char*, const char*, const QStringList &)
+TQObject* KLibFactory::createObject( TQObject*, const char*, const char*, const TQStringList &)
{
return 0;
}
@@ -95,7 +95,7 @@ QObject* KLibFactory::createObject( QObject*, const char*, const char*, const QS
// -----------------------------------------------
-KLibrary::KLibrary( const QString& libname, const QString& filename, void * handle )
+KLibrary::KLibrary( const TQString& libname, const TQString& filename, void * handle )
{
/* Make sure, we have a KLibLoader */
(void) KLibLoader::self();
@@ -115,12 +115,12 @@ KLibrary::~KLibrary()
// If any object is remaining, delete
if ( m_objs.count() > 0 )
{
- QPtrListIterator<QObject> it( m_objs );
+ TQPtrListIterator<TQObject> it( m_objs );
for ( ; it.current() ; ++it )
{
kdDebug(150) << "Factory still has object " << it.current() << " " << it.current()->name () << " Library = " << m_libname << endl;
- disconnect( it.current(), SIGNAL( destroyed() ),
- this, SLOT( slotObjectDestroyed() ) );
+ disconnect( it.current(), TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotObjectDestroyed() ) );
}
m_objs.setAutoDelete(true);
m_objs.clear();
@@ -133,12 +133,12 @@ KLibrary::~KLibrary()
}
}
-QString KLibrary::name() const
+TQString KLibrary::name() const
{
return m_libname;
}
-QString KLibrary::fileName() const
+TQString KLibrary::fileName() const
{
return m_filename;
}
@@ -148,7 +148,7 @@ KLibFactory* KLibrary::factory()
if ( m_factory )
return m_factory;
- QCString symname;
+ TQCString symname;
symname.sprintf("init_%s", name().latin1() );
void* sym = symbol( symname );
@@ -170,8 +170,8 @@ KLibFactory* KLibrary::factory()
return 0;
}
- connect( m_factory, SIGNAL( objectCreated( QObject * ) ),
- this, SLOT( slotObjectCreated( QObject * ) ) );
+ connect( m_factory, TQT_SIGNAL( objectCreated( TQObject * ) ),
+ this, TQT_SLOT( slotObjectCreated( TQObject * ) ) );
return m_factory;
}
@@ -181,7 +181,7 @@ void* KLibrary::symbol( const char* symname ) const
void* sym = lt_dlsym( (lt_dlhandle) m_handle, symname );
if ( !sym )
{
- KLibLoader::self()->d->errorMessage = "KLibrary: " + QString::fromLocal8Bit( lt_dlerror() );
+ KLibLoader::self()->d->errorMessage = "KLibrary: " + TQString::fromLocal8Bit( lt_dlerror() );
kdWarning(150) << KLibLoader::self()->d->errorMessage << endl;
return 0;
}
@@ -198,10 +198,10 @@ bool KLibrary::hasSymbol( const char* symname ) const
void KLibrary::unload() const
{
if (KLibLoader::s_self)
- KLibLoader::s_self->unloadLibrary(QFile::encodeName(name()));
+ KLibLoader::s_self->unloadLibrary(TQFile::encodeName(name()));
}
-void KLibrary::slotObjectCreated( QObject *obj )
+void KLibrary::slotObjectCreated( TQObject *obj )
{
if ( !obj )
return;
@@ -212,8 +212,8 @@ void KLibrary::slotObjectCreated( QObject *obj )
if ( m_objs.containsRef( obj ) )
return; // we know this object already
- connect( obj, SIGNAL( destroyed() ),
- this, SLOT( slotObjectDestroyed() ) );
+ connect( obj, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotObjectDestroyed() ) );
m_objs.append( obj );
}
@@ -229,9 +229,9 @@ void KLibrary::slotObjectDestroyed()
if ( !m_timer )
{
- m_timer = new QTimer( this, "klibrary_shutdown_timer" );
- connect( m_timer, SIGNAL( timeout() ),
- this, SLOT( slotTimeout() ) );
+ m_timer = new TQTimer( this, "klibrary_shutdown_timer" );
+ connect( m_timer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotTimeout() ) );
}
// as long as it's not stable make the timeout short, for debugging
@@ -267,8 +267,8 @@ public:
enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode;
int ref_count;
lt_dlhandle handle;
- QString name;
- QString filename;
+ TQString name;
+ TQString filename;
};
KLibWrapPrivate::KLibWrapPrivate(KLibrary *l, lt_dlhandle h)
@@ -299,8 +299,8 @@ void KLibLoader::cleanUp()
s_self = 0L;
}
-KLibLoader::KLibLoader( QObject* parent, const char* name )
- : QObject( parent, name )
+KLibLoader::KLibLoader( TQObject* parent, const char* name )
+ : TQObject( parent, name )
{
s_self = this;
d = new KLibLoaderPrivate;
@@ -317,7 +317,7 @@ KLibLoader::~KLibLoader()
{
// kdDebug(150) << "Deleting KLibLoader " << this << " " << name() << endl;
- QAsciiDictIterator<KLibWrapPrivate> it( m_libs );
+ TQAsciiDictIterator<KLibWrapPrivate> it( m_libs );
for (; it.current(); ++it )
{
kdDebug(150) << "The KLibLoader contains the library " << it.current()->name
@@ -331,9 +331,9 @@ KLibLoader::~KLibLoader()
d = 0L;
}
-static inline QCString makeLibName( const char* name )
+static inline TQCString makeLibName( const char* name )
{
- QCString libname(name);
+ TQCString libname(name);
// only append ".la" if there is no extension
// this allows to load non-libtool libraries as well
// (mhk, 20000228)
@@ -346,15 +346,15 @@ static inline QCString makeLibName( const char* name )
}
//static
-QString KLibLoader::findLibrary( const char * name, const KInstance * instance )
+TQString KLibLoader::findLibrary( const char * name, const KInstance * instance )
{
- QCString libname = makeLibName( name );
+ TQCString libname = makeLibName( name );
// only look up the file if it is not an absolute filename
// (mhk, 20000228)
- QString libfile;
- if (!QDir::isRelativePath(libname))
- libfile = QFile::decodeName( libname );
+ TQString libfile;
+ if (!TQDir::isRelativePath(libname))
+ libfile = TQFile::decodeName( libname );
else
{
libfile = instance->dirs()->findResource( "module", libname );
@@ -401,7 +401,7 @@ KLibrary* KLibLoader::library( const char *name )
/* Test if this library was loaded at some time, but got
unloaded meanwhile, whithout being dlclose()'ed. */
- QPtrListIterator<KLibWrapPrivate> it(d->loaded_stack);
+ TQPtrListIterator<KLibWrapPrivate> it(d->loaded_stack);
for (; it.current(); ++it) {
if (it.current()->name == name)
wrap = it.current();
@@ -415,10 +415,10 @@ KLibrary* KLibLoader::library( const char *name )
}
wrap->ref_count++;
} else {
- QString libfile = findLibrary( name );
+ TQString libfile = findLibrary( name );
if ( libfile.isEmpty() )
{
- const QCString libname = makeLibName( name );
+ const TQCString libname = makeLibName( name );
#ifndef NDEBUG
kdDebug(150) << "library=" << name << ": No file named " << libname << " found in paths." << endl;
#endif
@@ -426,18 +426,18 @@ KLibrary* KLibLoader::library( const char *name )
return 0;
}
- lt_dlhandle handle = lt_dlopen( QFile::encodeName(libfile) );
+ lt_dlhandle handle = lt_dlopen( TQFile::encodeName(libfile) );
if ( !handle )
{
const char* errmsg = lt_dlerror();
if(errmsg)
- d->errorMessage = QString::fromLocal8Bit(errmsg);
+ d->errorMessage = TQString::fromLocal8Bit(errmsg);
else
- d->errorMessage = QString::null;
+ d->errorMessage = TQString::null;
return 0;
}
else
- d->errorMessage = QString::null;
+ d->errorMessage = TQString::null;
KLibrary *lib = new KLibrary( name, libfile, handle );
wrap = new KLibWrapPrivate(lib, handle);
@@ -445,13 +445,13 @@ KLibrary* KLibLoader::library( const char *name )
}
m_libs.insert( name, wrap );
- connect( wrap->lib, SIGNAL( destroyed() ),
- this, SLOT( slotLibraryDestroyed() ) );
+ connect( wrap->lib, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotLibraryDestroyed() ) );
return wrap->lib;
}
-QString KLibLoader::lastErrorMessage() const
+TQString KLibLoader::lastErrorMessage() const
{
return d->errorMessage;
}
@@ -468,8 +468,8 @@ void KLibLoader::unloadLibrary( const char *libname )
m_libs.remove( libname );
- disconnect( wrap->lib, SIGNAL( destroyed() ),
- this, SLOT( slotLibraryDestroyed() ) );
+ disconnect( wrap->lib, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotLibraryDestroyed() ) );
close_pending( wrap );
}
@@ -486,7 +486,7 @@ void KLibLoader::slotLibraryDestroyed()
{
const KLibrary *lib = static_cast<const KLibrary *>( sender() );
- QAsciiDictIterator<KLibWrapPrivate> it( m_libs );
+ TQAsciiDictIterator<KLibWrapPrivate> it( m_libs );
for (; it.current(); ++it )
if ( it.current()->lib == lib )
{
@@ -505,12 +505,12 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
/* First delete all KLibrary objects in pending_close, but _don't_ unload
the DSO behind it. */
- QPtrListIterator<KLibWrapPrivate> it(d->pending_close);
+ TQPtrListIterator<KLibWrapPrivate> it(d->pending_close);
for (; it.current(); ++it) {
wrap = it.current();
if (wrap->lib) {
- disconnect( wrap->lib, SIGNAL( destroyed() ),
- this, SLOT( slotLibraryDestroyed() ) );
+ disconnect( wrap->lib, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( slotLibraryDestroyed() ) );
KLibrary* to_delete = wrap->lib;
wrap->lib = 0L; // unset first, because KLibrary dtor can cause
delete to_delete; // recursive call to close_pending()
diff --git a/kdecore/klibloader.h b/kdecore/klibloader.h
index 1230f9944..27fc2becc 100644
--- a/kdecore/klibloader.h
+++ b/kdecore/klibloader.h
@@ -18,11 +18,11 @@
#ifndef KLIBLOADER_H
#define KLIBLOADER_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qasciidict.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqasciidict.h>
+#include <tqptrlist.h>
#include <kglobal.h>
#include <stdlib.h> // For backwards compatibility
@@ -50,26 +50,26 @@ class KLibraryPrivate;
class KDECORE_EXPORT KLibrary : public QObject
{
friend class KLibLoader;
- friend class QAsciiDict<KLibrary>;
+ friend class TQAsciiDict<KLibrary>;
Q_OBJECT
public:
/**
* Don't create KLibrary objects on your own. Instead use KLibLoader.
*/
- KLibrary( const QString& libname, const QString& filename, void * handle );
+ KLibrary( const TQString& libname, const TQString& filename, void * handle );
/**
* Returns the name of the library.
* @return The name of the library like "libkspread".
*/
- QString name() const;
+ TQString name() const;
/**
* Returns the file name of the library.
* @return The filename of the library, for example "/opt/kde2&/lib/libkspread.la"
*/
- QString fileName() const;
+ TQString fileName() const;
/**
* Returns the factory of the library.
@@ -107,7 +107,7 @@ public:
void unload() const;
private slots:
- void slotObjectCreated( QObject *obj );
+ void slotObjectCreated( TQObject *obj );
void slotObjectDestroyed();
void slotTimeout();
@@ -118,12 +118,12 @@ private:
*/
~KLibrary();
- QString m_libname;
- QString m_filename;
+ TQString m_libname;
+ TQString m_filename;
KLibFactory* m_factory;
void * m_handle;
- QPtrList<QObject> m_objs;
- QTimer *m_timer;
+ TQPtrList<TQObject> m_objs;
+ TQTimer *m_timer;
KLibraryPrivate *d;
};
@@ -222,12 +222,12 @@ public:
/**
* Returns an error message that can be useful to debug the problem.
- * Returns QString::null if the last call to library() was successful.
+ * Returns TQString::null if the last call to library() was successful.
* You can call this function more than once. The error message is only
* reset by a new call to library().
- * @return the last error message, or QString::null if there was no error
+ * @return the last error message, or TQString::null if there was no error
*/
- QString lastErrorMessage() const;
+ TQString lastErrorMessage() const;
/**
* Unloads the library with the given name.
@@ -273,16 +273,16 @@ public:
* ".la" will be appended.
* @param instance a KInstance used to get the standard paths
*/
- static QString findLibrary( const char * name, const KInstance * instance = KGlobal::instance() );
+ static TQString findLibrary( const char * name, const KInstance * instance = KGlobal::instance() );
protected:
- KLibLoader( QObject* parent = 0, const char* name = 0 );
+ KLibLoader( TQObject* parent = 0, const char* name = 0 );
private slots:
void slotLibraryDestroyed();
private:
void close_pending( KLibWrapPrivate * );
- QAsciiDict<KLibWrapPrivate> m_libs;
+ TQAsciiDict<KLibWrapPrivate> m_libs;
static KLibLoader* s_self;
@@ -322,7 +322,7 @@ private:
* The KLibFactory is used to create the components, the library has to offer.
* The factory of KSpread for example will create instances of KSpreadDoc,
* while the Konqueror factory will create KonqView widgets.
- * All objects created by the factory must be derived from QObject, since QObject
+ * All objects created by the factory must be derived from TQObject, since QObject
* offers type safe casting.
*
* KLibFactory is an abstract class. Reimplement the
@@ -336,10 +336,10 @@ class KDECORE_EXPORT KLibFactory : public QObject
public:
/**
* Create a new factory.
- * @param parent the parent of the QObject, 0 for no parent
- * @param name the name of the QObject, 0 for no name
+ * @param parent the parent of the TQObject, 0 for no parent
+ * @param name the name of the TQObject, 0 for no name
*/
- KLibFactory( QObject* parent = 0, const char* name = 0 );
+ KLibFactory( TQObject* parent = 0, const char* name = 0 );
virtual ~KLibFactory();
/**
@@ -349,7 +349,7 @@ public:
* It is valid behavior to create different kinds of objects
* depending on the requested @p classname. For example a koffice
* library may usually return a pointer to KoDocument. But
- * if asked for a "QWidget", it could create a wrapper widget,
+ * if asked for a "TQWidget", it could create a wrapper widget,
* that encapsulates the Koffice specific features.
*
* create() automatically emits a signal objectCreated to tell
@@ -357,20 +357,20 @@ public:
* important for reference counting, and allows unloading the
* library automatically once all its objects have been destroyed.
*
- * @param parent the parent of the QObject, 0 for no parent
- * @param name the name of the QObject, 0 for no name
+ * @param parent the parent of the TQObject, 0 for no parent
+ * @param name the name of the TQObject, 0 for no name
* @param classname the name of the class
* @param args a list of arguments
*/
- QObject* create( QObject* parent = 0, const char* name = 0, const char* classname = "QObject", const QStringList &args = QStringList() );
+ TQObject* create( TQObject* parent = 0, const char* name = 0, const char* classname = "TQObject", const TQStringList &args = TQStringList() );
signals:
/**
* Emitted in #create
* @param obj the new object
*/
- void objectCreated( QObject *obj );
+ void objectCreated( TQObject *obj );
protected:
@@ -382,18 +382,18 @@ protected:
* It is valid behavior to create different kinds of objects
* depending on the requested @p className. For example a koffice
* library may usually return a pointer to KoDocument. But
- * if asked for a "QWidget", it could create a wrapper widget,
+ * if asked for a "TQWidget", it could create a wrapper widget,
* that encapsulates the Koffice specific features.
*
* This function is called by #create()
- * @param parent the parent of the QObject, 0 for no parent
- * @param name the name of the QObject, 0 for no name
+ * @param parent the parent of the TQObject, 0 for no parent
+ * @param name the name of the TQObject, 0 for no name
* @param className the name of the class
* @param args a list of arguments
*/
- virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
- const char* className = "QObject",
- const QStringList &args = QStringList() ) = 0;
+ virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0,
+ const char* className = "TQObject",
+ const TQStringList &args = TQStringList() ) = 0;
protected:
diff --git a/kdecore/klocale.cpp b/kdecore/klocale.cpp
index 59981d4b1..f8a82e3f5 100644
--- a/kdecore/klocale.cpp
+++ b/kdecore/klocale.cpp
@@ -25,12 +25,12 @@
#include <stdlib.h> // getenv
-#include <qtextcodec.h>
-#include <qfile.h>
-#include <qprinter.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqtextcodec.h>
+#include <tqfile.h>
+#include <tqprinter.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include "kcatalogue.h"
#include "kglobal.h"
@@ -57,22 +57,22 @@ public:
int weekStartDay;
bool nounDeclension;
bool dateMonthNamePossessive;
- QStringList languageList;
- QStringList catalogNames; // list of all catalogs (regardless of language)
- QValueList<KCatalogue> catalogues; // list of all loaded catalogs, contains one instance per catalog name and language
- QString encoding;
- QTextCodec * codecForEncoding;
+ TQStringList languageList;
+ TQStringList catalogNames; // list of all catalogs (regardless of language)
+ TQValueList<KCatalogue> catalogues; // list of all loaded catalogs, contains one instance per catalog name and language
+ TQString encoding;
+ TQTextCodec * codecForEncoding;
KConfig * config;
bool formatInited;
- int /*QPrinter::PageSize*/ pageSize;
+ int /*TQPrinter::PageSize*/ pageSize;
KLocale::MeasureSystem measureSystem;
- QStringList langTwoAlpha;
+ TQStringList langTwoAlpha;
KConfig *languages;
- QString calendarType;
+ TQString calendarType;
KCalendarSystem * calendar;
bool utf8FileEncoding;
- QString appName;
+ TQString appName;
#ifdef Q_WS_WIN
char win32SystemEncoding[3+7]; //"cp " + lang ID
#endif
@@ -81,7 +81,7 @@ public:
static KLocale *this_klocale = 0;
-KLocale::KLocale( const QString & catalog, KConfig * config )
+KLocale::KLocale( const TQString & catalog, KConfig * config )
{
d = new KLocalePrivate;
d->config = config;
@@ -103,7 +103,7 @@ KLocale::KLocale( const QString & catalog, KConfig * config )
initMainCatalogues(catalog);
}
-QString KLocale::_initLanguage(KConfigBase *config)
+TQString KLocale::_initLanguage(KConfigBase *config)
{
if (this_klocale)
{
@@ -112,18 +112,18 @@ QString KLocale::_initLanguage(KConfigBase *config)
// todo: adapt current catalog list: remove unused languages, insert main catalogs, if not already found
return this_klocale->language();
}
- return QString::null;
+ return TQString::null;
}
-void KLocale::initMainCatalogues(const QString & catalog)
+void KLocale::initMainCatalogues(const TQString & catalog)
{
// Use the first non-null string.
- QString mainCatalogue = catalog;
+ TQString mainCatalogue = catalog;
// don't use main catalogue if we're looking up .desktop translations
if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) {
if (maincatalogue) {
- mainCatalogue = QString::fromLatin1(maincatalogue);
+ mainCatalogue = TQString::fromLatin1(maincatalogue);
}
}
@@ -153,10 +153,10 @@ void KLocale::initLanguageList(KConfig * config, bool useEnv)
m_country = defaultCountry();
// Reset the list and add the new languages
- QStringList languageList;
+ TQStringList languageList;
if ( useEnv )
- languageList += QStringList::split
- (':', QFile::decodeName( ::getenv("KDE_LANG") ));
+ languageList += TQStringList::split
+ (':', TQFile::decodeName( ::getenv("KDE_LANG") ));
languageList += config->readListEntry("Language", ':');
@@ -164,17 +164,17 @@ void KLocale::initLanguageList(KConfig * config, bool useEnv)
if ( useEnv )
{
// HPB: Only run splitLocale on the environment variables..
- QStringList langs;
+ TQStringList langs;
- langs << QFile::decodeName( ::getenv("LC_ALL") );
- langs << QFile::decodeName( ::getenv("LC_MESSAGES") );
- langs << QFile::decodeName( ::getenv("LANG") );
+ langs << TQFile::decodeName( ::getenv("LC_ALL") );
+ langs << TQFile::decodeName( ::getenv("LC_MESSAGES") );
+ langs << TQFile::decodeName( ::getenv("LANG") );
- for ( QStringList::Iterator it = langs.begin();
+ for ( TQStringList::Iterator it = langs.begin();
it != langs.end();
++it )
{
- QString ln, ct, chrset;
+ TQString ln, ct, chrset;
splitLocale(*it, ln, ct, chrset);
if (!ct.isEmpty()) {
@@ -195,20 +195,20 @@ void KLocale::initLanguageList(KConfig * config, bool useEnv)
void KLocale::initPluralTypes()
{
- for ( QValueList<KCatalogue>::Iterator it = d->catalogues.begin();
+ for ( TQValueList<KCatalogue>::Iterator it = d->catalogues.begin();
it != d->catalogues.end();
++it )
{
- QString language = (*it).language();
+ TQString language = (*it).language();
int pt = pluralType( language );
(*it).setPluralType( pt );
}
}
-int KLocale::pluralType( const QString & language )
+int KLocale::pluralType( const TQString & language )
{
- for ( QValueList<KCatalogue>::ConstIterator it = d->catalogues.begin();
+ for ( TQValueList<KCatalogue>::ConstIterator it = d->catalogues.begin();
it != d->catalogues.end();
++it )
{
@@ -230,7 +230,7 @@ int KLocale::pluralType( const KCatalogue& catalog )
"Better leave that out if unsure, the programs will "
"crash!!\nDefinition of PluralForm - to be set by the "
"translator of kdelibs.po");
- QString pf (catalog.translate( pluralFormString));
+ TQString pf (catalog.translate( pluralFormString));
if ( pf.isEmpty() ) {
return -1;
}
@@ -312,13 +312,13 @@ void KLocale::initFormat()
KConfigGroupSaver saver(config, "Locale");
KSimpleConfig entry(locate("locale",
- QString::fromLatin1("l10n/%1/entry.desktop")
+ TQString::fromLatin1("l10n/%1/entry.desktop")
.arg(m_country)), true);
entry.setGroup("KCM Locale");
// Numeric
#define readConfigEntry(key, default, save) \
- save = entry.readEntry(key, QString::fromLatin1(default)); \
+ save = entry.readEntry(key, TQString::fromLatin1(default)); \
save = config->readEntry(key, save);
#define readConfigNumEntry(key, default, save, type) \
@@ -331,7 +331,7 @@ void KLocale::initFormat()
readConfigEntry("DecimalSymbol", ".", m_decimalSymbol);
readConfigEntry("ThousandsSeparator", ",", m_thousandsSeparator);
- m_thousandsSeparator.replace( QString::fromLatin1("$0"), QString::null );
+ m_thousandsSeparator.replace( TQString::fromLatin1("$0"), TQString::null );
//kdDebug(173) << "m_thousandsSeparator=" << m_thousandsSeparator << endl;
readConfigEntry("PositiveSign", "", m_positiveSign);
@@ -342,7 +342,7 @@ void KLocale::initFormat()
readConfigEntry("MonetaryDecimalSymbol", ".", m_monetaryDecimalSymbol);
readConfigEntry("MonetaryThousandsSeparator", ",",
m_monetaryThousandsSeparator);
- m_monetaryThousandsSeparator.replace(QString::fromLatin1("$0"), QString::null);
+ m_monetaryThousandsSeparator.replace(TQString::fromLatin1("$0"), TQString::null);
readConfigNumEntry("FracDigits", 2, m_fracDigits, int);
readConfigBoolEntry("PositivePrefixCurrencySymbol", true,
@@ -362,7 +362,7 @@ void KLocale::initFormat()
readConfigNumEntry("WeekStartDay", 1, d->weekStartDay, int);
// other
- readConfigNumEntry("PageSize", (int)QPrinter::A4, d->pageSize, int);
+ readConfigNumEntry("PageSize", (int)TQPrinter::A4, d->pageSize, int);
readConfigNumEntry("MeasureSystem", (int)Metric, d->measureSystem,
MeasureSystem);
readConfigEntry("CalendarSystem", "gregorian", d->calendarType);
@@ -372,7 +372,7 @@ void KLocale::initFormat()
//Grammatical
//Precedence here is l10n / i18n / config file
KSimpleConfig language(locate("locale",
- QString::fromLatin1("%1/entry.desktop")
+ TQString::fromLatin1("%1/entry.desktop")
.arg(m_language)), true);
language.setGroup("KCM Locale");
#define read3ConfigBoolEntry(key, default, save) \
@@ -388,7 +388,7 @@ void KLocale::initFormat()
KGlobal::_locale = lsave;
}
-bool KLocale::setCountry(const QString & country)
+bool KLocale::setCountry(const TQString & country)
{
// Check if the file exists too??
if ( country.isEmpty() )
@@ -401,17 +401,17 @@ bool KLocale::setCountry(const QString & country)
return true;
}
-QString KLocale::catalogueFileName(const QString & language,
+TQString KLocale::catalogueFileName(const TQString & language,
const KCatalogue & catalog)
{
- QString path = QString::fromLatin1("%1/LC_MESSAGES/%2.mo")
+ TQString path = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo")
.arg( language )
.arg( catalog.name() );
return locate( "locale", path );
}
-bool KLocale::setLanguage(const QString & language)
+bool KLocale::setLanguage(const TQString & language)
{
if ( d->languageList.contains( language ) ) {
d->languageList.remove( language );
@@ -429,9 +429,9 @@ bool KLocale::setLanguage(const QString & language)
return true; // Maybe the mo-files for this language are empty, but in principle we can speak all languages
}
-bool KLocale::setLanguage(const QStringList & languages)
+bool KLocale::setLanguage(const TQStringList & languages)
{
- QStringList languageList( languages );
+ TQStringList languageList( languages );
// This list might contain
// 1) some empty strings that we have to eliminate
// 2) duplicate entries like in de:fr:de, where we have to keep the first occurrance of a language in order
@@ -442,7 +442,7 @@ bool KLocale::setLanguage(const QStringList & languages)
// right to left (like Hebrew or Arabic) is set in kdelibs.mo. If you only have kdelibs.mo
// but nothing from appname.mo, you get a mostly English app with layout from right to left.
// That was considered to be a bug by the Hebrew translators.
- for( QStringList::Iterator it = languageList.fromLast();
+ for( TQStringList::Iterator it = languageList.fromLast();
it != languageList.begin(); --it )
{
// kdDebug() << "checking " << (*it) << endl;
@@ -456,7 +456,7 @@ bool KLocale::setLanguage(const QStringList & languages)
// The question why this is the case is left as an exercise for the reader...
// Besides the list might have been empty all the way, so check that too.
if ( languageList.begin() != languageList.end() ) {
- QStringList::Iterator it = languageList.begin(); // now pointing to the first element
+ TQStringList::Iterator it = languageList.begin(); // now pointing to the first element
// kdDebug() << "checking " << (*it) << endl;
if( (*it).isEmpty() || !(isApplicationTranslatedInto( *it )) ) {
// kdDebug() << "removing " << (*it) << endl;
@@ -480,7 +480,7 @@ bool KLocale::setLanguage(const QStringList & languages)
return true; // we found something. Maybe it's only English, but we found something
}
-bool KLocale::isApplicationTranslatedInto( const QString & language)
+bool KLocale::isApplicationTranslatedInto( const TQString & language)
{
if ( language.isEmpty() ) {
return false;
@@ -491,9 +491,9 @@ bool KLocale::isApplicationTranslatedInto( const QString & language)
return true;
}
- QString appName = d->appName;
+ TQString appName = d->appName;
if (maincatalogue) {
- appName = QString::fromLatin1(maincatalogue);
+ appName = TQString::fromLatin1(maincatalogue);
}
// sorry, catalogueFileName requires catalog object,k which we do not have here
// path finding was supposed to be moved completely to KCatalogue. The interface cannot
@@ -501,31 +501,31 @@ bool KLocale::isApplicationTranslatedInto( const QString & language)
// duplicated code for file path evaluation. Cleanup will follow later. We could have e.g.
// a static method in KCataloge that can translate between these file names.
// a stat
- QString sFileName = QString::fromLatin1("%1/LC_MESSAGES/%2.mo")
+ TQString sFileName = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo")
.arg( language )
.arg( appName );
// kdDebug() << "isApplicationTranslatedInto: filename " << sFileName << endl;
- QString sAbsFileName = locate( "locale", sFileName );
+ TQString sAbsFileName = locate( "locale", sFileName );
// kdDebug() << "isApplicationTranslatedInto: absname " << sAbsFileName << endl;
return ! sAbsFileName.isEmpty();
}
-void KLocale::splitLocale(const QString & aStr,
- QString & language,
- QString & country,
- QString & chrset)
+void KLocale::splitLocale(const TQString & aStr,
+ TQString & language,
+ TQString & country,
+ TQString & chrset)
{
- QString str = aStr;
+ TQString str = aStr;
// just in case, there is another language appended
int f = str.find(':');
if (f >= 0)
str.truncate(f);
- country = QString::null;
- chrset = QString::null;
- language = QString::null;
+ country = TQString::null;
+ chrset = TQString::null;
+ language = TQString::null;
f = str.find('.');
if (f >= 0)
@@ -544,17 +544,17 @@ void KLocale::splitLocale(const QString & aStr,
language = str;
}
-QString KLocale::language() const
+TQString KLocale::language() const
{
return m_language;
}
-QString KLocale::country() const
+TQString KLocale::country() const
{
return m_country;
}
-QString KLocale::monthName(int i, bool shortName) const
+TQString KLocale::monthName(int i, bool shortName) const
{
if ( shortName )
switch ( i )
@@ -589,10 +589,10 @@ QString KLocale::monthName(int i, bool shortName) const
case 12: return translate("December");
}
- return QString::null;
+ return TQString::null;
}
-QString KLocale::monthNamePossessive(int i, bool shortName) const
+TQString KLocale::monthNamePossessive(int i, bool shortName) const
{
if ( shortName )
switch ( i )
@@ -627,15 +627,15 @@ QString KLocale::monthNamePossessive(int i, bool shortName) const
case 12: return translate("of December");
}
- return QString::null;
+ return TQString::null;
}
-QString KLocale::weekDayName (int i, bool shortName) const
+TQString KLocale::weekDayName (int i, bool shortName) const
{
return calendar()->weekDayName(i, shortName);
}
-void KLocale::insertCatalogue( const QString & catalog )
+void KLocale::insertCatalogue( const TQString & catalog )
{
if ( !d->catalogNames.contains( catalog) ) {
d->catalogNames.append( catalog );
@@ -658,7 +658,7 @@ void KLocale::updateCatalogues( )
// 3.2) else create a new catalog.
// but we will do this later.
- for ( QValueList<KCatalogue>::Iterator it = d->catalogues.begin();
+ for ( TQValueList<KCatalogue>::Iterator it = d->catalogues.begin();
it != d->catalogues.end(); )
{
it = d->catalogues.remove(it);
@@ -668,10 +668,10 @@ void KLocale::updateCatalogues( )
// the sequence must be e.g. nds/appname nds/kdelibs nds/kio de/appname de/kdelibs de/kio etc.
// and not nds/appname de/appname nds/kdelibs de/kdelibs etc. Otherwise we would be in trouble with a language
// sequende nds,en_US, de. In this case en_US must hide everything below in the language list.
- for ( QStringList::ConstIterator itLangs = d->languageList.begin();
+ for ( TQStringList::ConstIterator itLangs = d->languageList.begin();
itLangs != d->languageList.end(); ++itLangs)
{
- for ( QStringList::ConstIterator itNames = d->catalogNames.begin();
+ for ( TQStringList::ConstIterator itNames = d->catalogNames.begin();
itNames != d->catalogNames.end(); ++itNames)
{
KCatalogue cat( *itNames, *itLangs ); // create Catalog for this name and this language
@@ -684,7 +684,7 @@ void KLocale::updateCatalogues( )
-void KLocale::removeCatalogue(const QString &catalog)
+void KLocale::removeCatalogue(const TQString &catalog)
{
if ( d->catalogNames.contains( catalog )) {
d->catalogNames.remove( catalog );
@@ -693,7 +693,7 @@ void KLocale::removeCatalogue(const QString &catalog)
}
}
-void KLocale::setActiveCatalogue(const QString &catalog)
+void KLocale::setActiveCatalogue(const TQString &catalog)
{
if ( d->catalogNames.contains( catalog ) ) {
d->catalogNames.remove( catalog );
@@ -710,7 +710,7 @@ KLocale::~KLocale()
d = 0L;
}
-QString KLocale::translate_priv(const char *msgid,
+TQString KLocale::translate_priv(const char *msgid,
const char *fallback,
const char **translated,
int* pluralType ) const
@@ -722,14 +722,14 @@ QString KLocale::translate_priv(const char *msgid,
{
kdWarning() << "KLocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
- return QString::null;
+ return TQString::null;
}
if ( useDefaultLanguage() ) { // shortcut evaluation if en_US is main language: do not consult the catalogs
- return QString::fromUtf8( fallback );
+ return TQString::fromUtf8( fallback );
}
- for ( QValueList<KCatalogue>::ConstIterator it = d->catalogues.begin();
+ for ( TQValueList<KCatalogue>::ConstIterator it = d->catalogues.begin();
it != d->catalogues.end();
++it )
{
@@ -737,7 +737,7 @@ QString KLocale::translate_priv(const char *msgid,
// the catalog as it will not have an assiciated mo-file. For this default language we can
// immediately pick the fallback string.
if ( (*it).language() == defaultLanguage() ) {
- return QString::fromUtf8( fallback );
+ return TQString::fromUtf8( fallback );
}
const char * text = (*it).translate( msgid );
@@ -751,77 +751,77 @@ QString KLocale::translate_priv(const char *msgid,
if ( pluralType) {
*pluralType = (*it).pluralType(); // remember the plural type information from the catalog that was used
}
- return QString::fromUtf8( text );
+ return TQString::fromUtf8( text );
}
}
// Always use UTF-8 if the string was not found
- return QString::fromUtf8( fallback );
+ return TQString::fromUtf8( fallback );
}
-QString KLocale::translate(const char* msgid) const
+TQString KLocale::translate(const char* msgid) const
{
return translate_priv(msgid, msgid);
}
-QString KLocale::translate( const char *index, const char *fallback) const
+TQString KLocale::translate( const char *index, const char *fallback) const
{
if (!index || !index[0] || !fallback || !fallback[0])
{
kdDebug(173) << "KLocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
- return QString::null;
+ return TQString::null;
}
if ( useDefaultLanguage() )
- return QString::fromUtf8( fallback );
+ return TQString::fromUtf8( fallback );
char *newstring = new char[strlen(index) + strlen(fallback) + 5];
sprintf(newstring, "_: %s\n%s", index, fallback);
- // as copying QString is very fast, it looks slower as it is ;/
- QString r = translate_priv(newstring, fallback);
+ // as copying TQString is very fast, it looks slower as it is ;/
+ TQString r = translate_priv(newstring, fallback);
delete [] newstring;
return r;
}
-static QString put_n_in(const QString &orig, unsigned long n)
+static TQString put_n_in(const TQString &orig, unsigned long n)
{
- QString ret = orig;
+ TQString ret = orig;
int index = ret.find("%n");
if (index == -1)
return ret;
- ret.replace(index, 2, QString::number(n));
+ ret.replace(index, 2, TQString::number(n));
return ret;
}
#define EXPECT_LENGTH(x) \
if (forms.count() != x) { \
kdError() << "translation of \"" << singular << "\" doesn't contain " << x << " different plural forms as expected\n"; \
- return QString( "BROKEN TRANSLATION %1" ).arg( singular ); }
+ return TQString( "BROKEN TRANSLATION %1" ).arg( singular ); }
-QString KLocale::translate( const char *singular, const char *plural,
+TQString KLocale::translate( const char *singular, const char *plural,
unsigned long n ) const
{
if (!singular || !singular[0] || !plural || !plural[0])
{
kdWarning() << "KLocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
- return QString::null;
+ return TQString::null;
}
char *newstring = new char[strlen(singular) + strlen(plural) + 6];
sprintf(newstring, "_n: %s\n%s", singular, plural);
- // as copying QString is very fast, it looks slower as it is ;/
+ // as copying TQString is very fast, it looks slower as it is ;/
int pluralType = -1;
- QString r = translate_priv(newstring, 0, 0, &pluralType);
+ TQString r = translate_priv(newstring, 0, 0, &pluralType);
delete [] newstring;
if ( r.isEmpty() || useDefaultLanguage() || pluralType == -1) {
if ( n == 1 ) {
- return put_n_in( QString::fromUtf8( singular ), n );
+ return put_n_in( TQString::fromUtf8( singular ), n );
} else {
- QString tmp = QString::fromUtf8( plural );
+ TQString tmp = TQString::fromUtf8( plural );
#ifndef NDEBUG
if (tmp.find("%n") == -1) {
kdDebug() << "the message for i18n should contain a '%n'! " << plural << endl;
@@ -831,7 +831,7 @@ QString KLocale::translate( const char *singular, const char *plural,
}
}
- QStringList forms = QStringList::split( "\n", r, false );
+ TQStringList forms = TQStringList::split( "\n", r, false );
switch ( pluralType ) {
case 0: // NoPlural
EXPECT_LENGTH( 1 );
@@ -950,31 +950,31 @@ QString KLocale::translate( const char *singular, const char *plural,
}
kdFatal() << "The function should have been returned in another way\n";
- return QString::null;
+ return TQString::null;
}
-QString KLocale::translateQt( const char *context, const char *source,
+TQString KLocale::translateQt( const char *context, const char *source,
const char *message) const
{
if (!source || !source[0]) {
kdWarning() << "KLocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
- return QString::null;
+ return TQString::null;
}
if ( useDefaultLanguage() ) {
- return QString::null;
+ return TQString::null;
}
char *newstring = 0;
const char *translation = 0;
- QString r;
+ TQString r;
if ( message && message[0]) {
char *newstring = new char[strlen(source) + strlen(message) + 5];
sprintf(newstring, "_: %s\n%s", source, message);
const char *translation = 0;
- // as copying QString is very fast, it looks slower as it is ;/
+ // as copying TQString is very fast, it looks slower as it is ;/
r = translate_priv(newstring, source, &translation);
delete [] newstring;
if (translation)
@@ -984,7 +984,7 @@ QString KLocale::translateQt( const char *context, const char *source,
if ( context && context[0] && message && message[0]) {
newstring = new char[strlen(context) + strlen(message) + 5];
sprintf(newstring, "_: %s\n%s", context, message);
- // as copying QString is very fast, it looks slower as it is ;/
+ // as copying TQString is very fast, it looks slower as it is ;/
r = translate_priv(newstring, source, &translation);
delete [] newstring;
if (translation)
@@ -994,7 +994,7 @@ QString KLocale::translateQt( const char *context, const char *source,
r = translate_priv(source, source, &translation);
if (translation)
return r;
- return QString::null;
+ return TQString::null;
}
bool KLocale::nounDeclension() const
@@ -1021,43 +1021,43 @@ bool KLocale::weekStartsMonday() const //deprecated
return (d->weekStartDay==1);
}
-QString KLocale::decimalSymbol() const
+TQString KLocale::decimalSymbol() const
{
doFormatInit();
return m_decimalSymbol;
}
-QString KLocale::thousandsSeparator() const
+TQString KLocale::thousandsSeparator() const
{
doFormatInit();
return m_thousandsSeparator;
}
-QString KLocale::currencySymbol() const
+TQString KLocale::currencySymbol() const
{
doFormatInit();
return m_currencySymbol;
}
-QString KLocale::monetaryDecimalSymbol() const
+TQString KLocale::monetaryDecimalSymbol() const
{
doFormatInit();
return m_monetaryDecimalSymbol;
}
-QString KLocale::monetaryThousandsSeparator() const
+TQString KLocale::monetaryThousandsSeparator() const
{
doFormatInit();
return m_monetaryThousandsSeparator;
}
-QString KLocale::positiveSign() const
+TQString KLocale::positiveSign() const
{
doFormatInit();
return m_positiveSign;
}
-QString KLocale::negativeSign() const
+TQString KLocale::negativeSign() const
{
doFormatInit();
return m_negativeSign;
@@ -1093,26 +1093,26 @@ KLocale::SignPosition KLocale::negativeMonetarySignPosition() const
return m_negativeMonetarySignPosition;
}
-static inline void put_it_in( QChar *buffer, uint& index, const QString &s )
+static inline void put_it_in( TQChar *buffer, uint& index, const TQString &s )
{
for ( uint l = 0; l < s.length(); l++ )
buffer[index++] = s.at( l );
}
-static inline void put_it_in( QChar *buffer, uint& index, int number )
+static inline void put_it_in( TQChar *buffer, uint& index, int number )
{
buffer[index++] = number / 10 + '0';
buffer[index++] = number % 10 + '0';
}
// insert (thousands)-"separator"s into the non-fractional part of str
-static void _insertSeparator(QString &str, const QString &separator,
- const QString &decimalSymbol)
+static void _insertSeparator(TQString &str, const TQString &separator,
+ const TQString &decimalSymbol)
{
// leave fractional part untouched
- QString mainPart = str.section(decimalSymbol, 0, 0);
- QString fracPart = str.section(decimalSymbol, 1, 1,
- QString::SectionIncludeLeadingSep);
+ TQString mainPart = str.section(decimalSymbol, 0, 0);
+ TQString fracPart = str.section(decimalSymbol, 1, 1,
+ TQString::SectionIncludeLeadingSep);
for (int pos = mainPart.length() - 3; pos > 0; pos -= 3)
mainPart.insert(pos, separator);
@@ -1120,22 +1120,22 @@ static void _insertSeparator(QString &str, const QString &separator,
str = mainPart + fracPart;
}
-QString KLocale::formatMoney(double num,
- const QString & symbol,
+TQString KLocale::formatMoney(double num,
+ const TQString & symbol,
int precision) const
{
// some defaults
- QString currency = symbol.isNull()
+ TQString currency = symbol.isNull()
? currencySymbol()
: symbol;
if (precision < 0) precision = fracDigits();
// the number itself
bool neg = num < 0;
- QString res = QString::number(neg?-num:num, 'f', precision);
+ TQString res = TQString::number(neg?-num:num, 'f', precision);
// Replace dot with locale decimal separator
- res.replace(QChar('.'), monetaryDecimalSymbol());
+ res.replace(TQChar('.'), monetaryDecimalSymbol());
// Insert the thousand separators
_insertSeparator(res, monetaryThousandsSeparator(), monetaryDecimalSymbol());
@@ -1144,7 +1144,7 @@ QString KLocale::formatMoney(double num,
int signpos = neg
? negativeMonetarySignPosition()
: positiveMonetarySignPosition();
- QString sign = neg
+ TQString sign = neg
? negativeSign()
: positiveSign();
@@ -1181,30 +1181,30 @@ QString KLocale::formatMoney(double num,
return res;
}
-QString KLocale::formatMoney(const QString &numStr) const
+TQString KLocale::formatMoney(const TQString &numStr) const
{
return formatMoney(numStr.toDouble());
}
-QString KLocale::formatNumber(double num, int precision) const
+TQString KLocale::formatNumber(double num, int precision) const
{
if (precision == -1) precision = 2;
- // no need to round since QString::number does this for us
- return formatNumber(QString::number(num, 'f', precision), false, 0);
+ // no need to round since TQString::number does this for us
+ return formatNumber(TQString::number(num, 'f', precision), false, 0);
}
-QString KLocale::formatLong(long num) const
+TQString KLocale::formatLong(long num) const
{
return formatNumber((double)num, 0);
}
-QString KLocale::formatNumber(const QString &numStr) const
+TQString KLocale::formatNumber(const TQString &numStr) const
{
return formatNumber(numStr, true, 2);
}
// increase the digit at 'position' by one
-static void _inc_by_one(QString &str, int position)
+static void _inc_by_one(TQString &str, int position)
{
for (int i = position; i >= 0; i--)
{
@@ -1250,7 +1250,7 @@ static void _inc_by_one(QString &str, int position)
}
// Cut off if more digits in fractional part than 'precision'
-static void _round(QString &str, int precision)
+static void _round(TQString &str, int precision)
{
int decimalSymbolPos = str.find('.');
@@ -1263,7 +1263,7 @@ static void _round(QString &str, int precision)
}
// fill up with more than enough zeroes (in case fractional part too short)
- str.append(QString().fill('0', precision));
+ str.append(TQString().fill('0', precision));
// Now decide whether to round up or down
char last_char = str[decimalSymbolPos + precision + 1].latin1();
@@ -1294,12 +1294,12 @@ static void _round(QString &str, int precision)
if (precision == 0) str = str.section('.', 0, 0);
}
-QString KLocale::formatNumber(const QString &numStr, bool round,
+TQString KLocale::formatNumber(const TQString &numStr, bool round,
int precision) const
{
- QString tmpString = numStr;
+ TQString tmpString = numStr;
if ((round && precision < 0) ||
- ! QRegExp("^[+-]?\\d+(\\.\\d+)*(e[+-]?\\d+)?$").exactMatch(tmpString))
+ ! TQRegExp("^[+-]?\\d+(\\.\\d+)*(e[+-]?\\d+)?$").exactMatch(tmpString))
return numStr;
@@ -1308,16 +1308,16 @@ QString KLocale::formatNumber(const QString &numStr, bool round,
if (neg || tmpString[0] == '+') tmpString.remove(0, 1);
// Split off exponential part (including 'e'-symbol)
- QString mantString = tmpString.section('e', 0, 0,
- QString::SectionCaseInsensitiveSeps);
- QString expString = tmpString.section('e', 1, 1,
- QString::SectionCaseInsensitiveSeps |
- QString::SectionIncludeLeadingSep);
+ TQString mantString = tmpString.section('e', 0, 0,
+ TQString::SectionCaseInsensitiveSeps);
+ TQString expString = tmpString.section('e', 1, 1,
+ TQString::SectionCaseInsensitiveSeps |
+ TQString::SectionIncludeLeadingSep);
if (round) _round(mantString, precision);
// Replace dot with locale decimal separator
- mantString.replace(QChar('.'), decimalSymbol());
+ mantString.replace(TQChar('.'), decimalSymbol());
// Insert the thousand separators
_insertSeparator(mantString, thousandsSeparator(), decimalSymbol());
@@ -1328,11 +1328,11 @@ QString KLocale::formatNumber(const QString &numStr, bool round,
return mantString + expString;
}
-QString KLocale::formatDate(const QDate &pDate, bool shortFormat) const
+TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const
{
- const QString rst = shortFormat?dateFormatShort():dateFormat();
+ const TQString rst = shortFormat?dateFormatShort():dateFormat();
- QString buffer;
+ TQString buffer;
if ( ! pDate.isValid() ) return buffer;
@@ -1408,9 +1408,9 @@ void KLocale::setMainCatalogue(const char *catalog)
maincatalogue = catalog;
}
-double KLocale::readNumber(const QString &_str, bool * ok) const
+double KLocale::readNumber(const TQString &_str, bool * ok) const
{
- QString str = _str.stripWhiteSpace();
+ TQString str = _str.stripWhiteSpace();
bool neg = str.find(negativeSign()) == 0;
if (neg)
str.remove( 0, negativeSign().length() );
@@ -1418,7 +1418,7 @@ double KLocale::readNumber(const QString &_str, bool * ok) const
/* will hold the scientific notation portion of the number.
Example, with 2.34E+23, exponentialPart == "E+23"
*/
- QString exponentialPart;
+ TQString exponentialPart;
int EPos;
EPos = str.find('E', 0, false);
@@ -1430,8 +1430,8 @@ double KLocale::readNumber(const QString &_str, bool * ok) const
}
int pos = str.find(decimalSymbol());
- QString major;
- QString minor;
+ TQString major;
+ TQString minor;
if ( pos == -1 )
major = str;
else
@@ -1465,7 +1465,7 @@ double KLocale::readNumber(const QString &_str, bool * ok) const
return 0.0;
}
- QString tot;
+ TQString tot;
if (neg) tot = '-';
tot += major + '.' + minor + exponentialPart;
@@ -1473,12 +1473,12 @@ double KLocale::readNumber(const QString &_str, bool * ok) const
return tot.toDouble(ok);
}
-double KLocale::readMoney(const QString &_str, bool * ok) const
+double KLocale::readMoney(const TQString &_str, bool * ok) const
{
- QString str = _str.stripWhiteSpace();
+ TQString str = _str.stripWhiteSpace();
bool neg = false;
bool currencyFound = false;
- QString symbol = currencySymbol();
+ TQString symbol = currencySymbol();
// First try removing currency symbol from either end
int pos = str.find(symbol);
if ( pos == 0 || pos == (int) str.length()-symbol.length() )
@@ -1528,8 +1528,8 @@ double KLocale::readMoney(const QString &_str, bool * ok) const
// And parse the rest as a number
pos = str.find(monetaryDecimalSymbol());
- QString major;
- QString minior;
+ TQString major;
+ TQString minior;
if (pos == -1)
major = str;
else
@@ -1562,7 +1562,7 @@ double KLocale::readMoney(const QString &_str, bool * ok) const
return 0.0;
}
- QString tot;
+ TQString tot;
if (neg) tot = '-';
tot += major + '.' + minior;
return tot.toDouble(ok);
@@ -1574,7 +1574,7 @@ double KLocale::readMoney(const QString &_str, bool * ok) const
* @param pos the position to start at. It will be updated when we parse it.
* @return the integer read in the string, or -1 if no string
*/
-static int readInt(const QString &str, uint &pos)
+static int readInt(const TQString &str, uint &pos)
{
if (!str.at(pos).isDigit()) return -1;
int result = 0;
@@ -1587,27 +1587,27 @@ static int readInt(const QString &str, uint &pos)
return result;
}
-QDate KLocale::readDate(const QString &intstr, bool* ok) const
+TQDate KLocale::readDate(const TQString &intstr, bool* ok) const
{
- QDate date;
+ TQDate date;
date = readDate(intstr, ShortFormat, ok);
if (date.isValid()) return date;
return readDate(intstr, NormalFormat, ok);
}
-QDate KLocale::readDate(const QString &intstr, ReadDateFlags flags, bool* ok) const
+TQDate KLocale::readDate(const TQString &intstr, ReadDateFlags flags, bool* ok) const
{
- QString fmt = ((flags & ShortFormat) ? dateFormatShort() : dateFormat()).simplifyWhiteSpace();
+ TQString fmt = ((flags & ShortFormat) ? dateFormatShort() : dateFormat()).simplifyWhiteSpace();
return readDate( intstr, fmt, ok );
}
-QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) const
+TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok) const
{
//kdDebug() << "KLocale::readDate intstr=" << intstr << " fmt=" << fmt << endl;
- QString str = intstr.simplifyWhiteSpace().lower();
+ TQString str = intstr.simplifyWhiteSpace().lower();
int day = -1, month = -1;
// allow the year to be omitted if not in the format
- int year = calendar()->year(QDate::currentDate());
+ int year = calendar()->year(TQDate::currentDate());
uint strpos = 0;
uint fmtpos = 0;
@@ -1618,7 +1618,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
while (fmt.length() > fmtpos && str.length() > strpos && !error)
{
- QChar c = fmt.at(fmtpos++);
+ TQChar c = fmt.at(fmtpos++);
if (c != '%') {
if (c.isSpace() && str.at(strpos).isSpace())
@@ -1642,7 +1642,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
error = true;
j = 1;
while (error && (j < 8)) {
- QString s = calendar()->weekDayName(j, c == 'a').lower();
+ TQString s = calendar()->weekDayName(j, c == 'a').lower();
int len = s.length();
if (str.mid(strpos, len) == s)
{
@@ -1659,7 +1659,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
if (d->nounDeclension && d->dateMonthNamePossessive) {
j = 1;
while (error && (j < 13)) {
- QString s = calendar()->monthNamePossessive(j, year, c == 'b').lower();
+ TQString s = calendar()->monthNamePossessive(j, year, c == 'b').lower();
int len = s.length();
if (str.mid(strpos, len) == s) {
month = j;
@@ -1671,7 +1671,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
}
j = 1;
while (error && (j < 13)) {
- QString s = calendar()->monthName(j, year, c == 'b').lower();
+ TQString s = calendar()->monthName(j, year, c == 'b').lower();
int len = s.length();
if (str.mid(strpos, len) == s) {
month = j;
@@ -1720,7 +1720,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
{
if (ok) *ok = true;
- QDate result;
+ TQDate result;
calendar()->setYMD(result, year, month, day);
return result;
@@ -1728,24 +1728,24 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
else
{
if (ok) *ok = false;
- return QDate(); // invalid date
+ return TQDate(); // invalid date
}
}
-QTime KLocale::readTime(const QString &intstr, bool *ok) const
+TQTime KLocale::readTime(const TQString &intstr, bool *ok) const
{
- QTime _time;
+ TQTime _time;
_time = readTime(intstr, WithSeconds, ok);
if (_time.isValid()) return _time;
return readTime(intstr, WithoutSeconds, ok);
}
-QTime KLocale::readTime(const QString &intstr, ReadTimeFlags flags, bool *ok) const
+TQTime KLocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok) const
{
- QString str = intstr.simplifyWhiteSpace().lower();
- QString Format = timeFormat().simplifyWhiteSpace();
+ TQString str = intstr.simplifyWhiteSpace().lower();
+ TQString Format = timeFormat().simplifyWhiteSpace();
if (flags & WithoutSeconds)
- Format.remove(QRegExp(".%S"));
+ Format.remove(TQRegExp(".%S"));
int hour = -1, minute = -1;
int second = ( (flags & WithoutSeconds) == 0 ) ? -1 : 0; // don't require seconds
@@ -1758,7 +1758,7 @@ QTime KLocale::readTime(const QString &intstr, ReadTimeFlags flags, bool *ok) co
{
if ( !(Format.length() > Formatpos && str.length() > strpos) ) goto error;
- QChar c = Format.at(Formatpos++);
+ TQChar c = Format.at(Formatpos++);
if (c != '%')
{
@@ -1778,7 +1778,7 @@ QTime KLocale::readTime(const QString &intstr, ReadTimeFlags flags, bool *ok) co
{
case 'p':
{
- QString s;
+ TQString s;
s = translate("pm").lower();
int len = s.length();
if (str.mid(strpos, len) == s)
@@ -1839,27 +1839,27 @@ QTime KLocale::readTime(const QString &intstr, ReadTimeFlags flags, bool *ok) co
}
if (ok) *ok = true;
- return QTime(hour, minute, second);
+ return TQTime(hour, minute, second);
error:
if (ok) *ok = false;
// ######## KDE4: remove this
- return QTime(-1, -1, -1); // return invalid date if it didn't work
+ return TQTime(-1, -1, -1); // return invalid date if it didn't work
}
//BIC: merge with below
-QString KLocale::formatTime(const QTime &pTime, bool includeSecs) const
+TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs) const
{
return formatTime( pTime, includeSecs, false );
}
-QString KLocale::formatTime(const QTime &pTime, bool includeSecs, bool isDuration) const
+TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDuration) const
{
- const QString rst = timeFormat();
+ const TQString rst = timeFormat();
// only "pm/am" here can grow, the rest shrinks, but
// I'm rather safe than sorry
- QChar *buffer = new QChar[rst.length() * 3 / 2 + 30];
+ TQChar *buffer = new QChar[rst.length() * 3 / 2 + 30];
uint index = 0;
bool escape = false;
@@ -1917,7 +1917,7 @@ QString KLocale::formatTime(const QTime &pTime, bool includeSecs, bool isDuratio
case 'p':
if ( !isDuration )
{
- QString s;
+ TQString s;
if ( pTime.hour() >= 12 )
put_it_in( buffer, index, translate("pm") );
else
@@ -1931,7 +1931,7 @@ QString KLocale::formatTime(const QTime &pTime, bool includeSecs, bool isDuratio
escape = false;
}
}
- QString ret( buffer, index );
+ TQString ret( buffer, index );
delete [] buffer;
if ( isDuration ) // eliminate trailing-space due to " %p"
return ret.stripWhiteSpace();
@@ -1941,24 +1941,24 @@ QString KLocale::formatTime(const QTime &pTime, bool includeSecs, bool isDuratio
bool KLocale::use12Clock() const
{
- if ((timeFormat().contains(QString::fromLatin1("%I")) > 0) ||
- (timeFormat().contains(QString::fromLatin1("%l")) > 0))
+ if ((timeFormat().contains(TQString::fromLatin1("%I")) > 0) ||
+ (timeFormat().contains(TQString::fromLatin1("%l")) > 0))
return true;
else
return false;
}
-QString KLocale::languages() const
+TQString KLocale::languages() const
{
- return d->languageList.join( QString::fromLatin1(":") );
+ return d->languageList.join( TQString::fromLatin1(":") );
}
-QStringList KLocale::languageList() const
+TQStringList KLocale::languageList() const
{
return d->languageList;
}
-QString KLocale::formatDateTime(const QDateTime &pDateTime,
+TQString KLocale::formatDateTime(const TQDateTime &pDateTime,
bool shortFormat,
bool includeSeconds) const
{
@@ -1967,31 +1967,31 @@ QString KLocale::formatDateTime(const QDateTime &pDateTime,
.arg( formatTime( pDateTime.time(), includeSeconds ) );
}
-QString i18n(const char* text)
+TQString i18n(const char* text)
{
register KLocale *instance = KGlobal::locale();
if (instance)
return instance->translate(text);
- return QString::fromUtf8(text);
+ return TQString::fromUtf8(text);
}
-QString i18n(const char* index, const char *text)
+TQString i18n(const char* index, const char *text)
{
register KLocale *instance = KGlobal::locale();
if (instance)
return instance->translate(index, text);
- return QString::fromUtf8(text);
+ return TQString::fromUtf8(text);
}
-QString i18n(const char* singular, const char* plural, unsigned long n)
+TQString i18n(const char* singular, const char* plural, unsigned long n)
{
register KLocale *instance = KGlobal::locale();
if (instance)
return instance->translate(singular, plural, n);
if (n == 1)
- return put_n_in(QString::fromUtf8(singular), n);
+ return put_n_in(TQString::fromUtf8(singular), n);
else
- return put_n_in(QString::fromUtf8(plural), n);
+ return put_n_in(TQString::fromUtf8(plural), n);
}
void KLocale::initInstance()
@@ -2001,45 +2001,45 @@ void KLocale::initInstance()
KInstance *app = KGlobal::instance();
if (app) {
- KGlobal::_locale = new KLocale(QString::fromLatin1(app->instanceName()));
+ KGlobal::_locale = new KLocale(TQString::fromLatin1(app->instanceName()));
// only do this for the global instance
- QTextCodec::setCodecForLocale(KGlobal::_locale->codecForEncoding());
+ TQTextCodec::setCodecForLocale(KGlobal::_locale->codecForEncoding());
}
else
kdDebug(173) << "no app name available using KLocale - nothing to do\n";
}
-QString KLocale::langLookup(const QString &fname, const char *rtype)
+TQString KLocale::langLookup(const TQString &fname, const char *rtype)
{
- QStringList search;
+ TQStringList search;
// assemble the local search paths
- const QStringList localDoc = KGlobal::dirs()->resourceDirs(rtype);
+ const TQStringList localDoc = KGlobal::dirs()->resourceDirs(rtype);
// look up the different languages
for (int id=localDoc.count()-1; id >= 0; --id)
{
- QStringList langs = KGlobal::locale()->languageList();
+ TQStringList langs = KGlobal::locale()->languageList();
langs.append( "en" );
langs.remove( defaultLanguage() );
- QStringList::ConstIterator lang;
+ TQStringList::ConstIterator lang;
for (lang = langs.begin(); lang != langs.end(); ++lang)
- search.append(QString("%1%2/%3").arg(localDoc[id]).arg(*lang).arg(fname));
+ search.append(TQString("%1%2/%3").arg(localDoc[id]).arg(*lang).arg(fname));
}
// try to locate the file
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = search.begin(); it != search.end(); ++it)
{
kdDebug(173) << "Looking for help in: " << *it << endl;
- QFileInfo info(*it);
+ TQFileInfo info(*it);
if (info.exists() && info.isFile() && info.isReadable())
return *it;
}
- return QString::null;
+ return TQString::null;
}
bool KLocale::useDefaultLanguage() const
@@ -2052,7 +2052,7 @@ void KLocale::initEncoding(KConfig *)
const int mibDefault = 4; // ISO 8859-1
// This all made more sense when we still had the EncodingEnum config key.
- setEncoding( QTextCodec::codecForLocale()->mibEnum() );
+ setEncoding( TQTextCodec::codecForLocale()->mibEnum() );
if ( !d->codecForEncoding )
{
@@ -2070,30 +2070,30 @@ void KLocale::initFileNameEncoding(KConfig *)
d->utf8FileEncoding = getenv("KDE_UTF8_FILENAMES") != 0;
if (d->utf8FileEncoding)
{
- QFile::setEncodingFunction(KLocale::encodeFileNameUTF8);
- QFile::setDecodingFunction(KLocale::decodeFileNameUTF8);
+ TQFile::setEncodingFunction(KLocale::encodeFileNameUTF8);
+ TQFile::setDecodingFunction(KLocale::decodeFileNameUTF8);
}
// Otherwise, stay with QFile's default filename encoding functions
// which, on Unix platforms, use the locale's codec.
}
-QCString KLocale::encodeFileNameUTF8( const QString & fileName )
+TQCString KLocale::encodeFileNameUTF8( const TQString & fileName )
{
return fileName.utf8();
}
-QString KLocale::decodeFileNameUTF8( const QCString & localFileName )
+TQString KLocale::decodeFileNameUTF8( const TQCString & localFileName )
{
- return QString::fromUtf8(localFileName);
+ return TQString::fromUtf8(localFileName);
}
-void KLocale::setDateFormat(const QString & format)
+void KLocale::setDateFormat(const TQString & format)
{
doFormatInit();
m_dateFormat = format.stripWhiteSpace();
}
-void KLocale::setDateFormatShort(const QString & format)
+void KLocale::setDateFormatShort(const TQString & format)
{
doFormatInit();
m_dateFormatShort = format.stripWhiteSpace();
@@ -2105,7 +2105,7 @@ void KLocale::setDateMonthNamePossessive(bool possessive)
d->dateMonthNamePossessive = possessive;
}
-void KLocale::setTimeFormat(const QString & format)
+void KLocale::setTimeFormat(const TQString & format)
{
doFormatInit();
m_timeFormat = format.stripWhiteSpace();
@@ -2129,44 +2129,44 @@ void KLocale::setWeekStartDay(int day)
d->weekStartDay = day;
}
-QString KLocale::dateFormat() const
+TQString KLocale::dateFormat() const
{
doFormatInit();
return m_dateFormat;
}
-QString KLocale::dateFormatShort() const
+TQString KLocale::dateFormatShort() const
{
doFormatInit();
return m_dateFormatShort;
}
-QString KLocale::timeFormat() const
+TQString KLocale::timeFormat() const
{
doFormatInit();
return m_timeFormat;
}
-void KLocale::setDecimalSymbol(const QString & symbol)
+void KLocale::setDecimalSymbol(const TQString & symbol)
{
doFormatInit();
m_decimalSymbol = symbol.stripWhiteSpace();
}
-void KLocale::setThousandsSeparator(const QString & separator)
+void KLocale::setThousandsSeparator(const TQString & separator)
{
doFormatInit();
// allow spaces here
m_thousandsSeparator = separator;
}
-void KLocale::setPositiveSign(const QString & sign)
+void KLocale::setPositiveSign(const TQString & sign)
{
doFormatInit();
m_positiveSign = sign.stripWhiteSpace();
}
-void KLocale::setNegativeSign(const QString & sign)
+void KLocale::setNegativeSign(const TQString & sign)
{
doFormatInit();
m_negativeSign = sign.stripWhiteSpace();
@@ -2202,20 +2202,20 @@ void KLocale::setFracDigits(int digits)
m_fracDigits = digits;
}
-void KLocale::setMonetaryThousandsSeparator(const QString & separator)
+void KLocale::setMonetaryThousandsSeparator(const TQString & separator)
{
doFormatInit();
// allow spaces here
m_monetaryThousandsSeparator = separator;
}
-void KLocale::setMonetaryDecimalSymbol(const QString & symbol)
+void KLocale::setMonetaryDecimalSymbol(const TQString & symbol)
{
doFormatInit();
m_monetaryDecimalSymbol = symbol.stripWhiteSpace();
}
-void KLocale::setCurrencySymbol(const QString & symbol)
+void KLocale::setCurrencySymbol(const TQString & symbol)
{
doFormatInit();
m_currencySymbol = symbol.stripWhiteSpace();
@@ -2246,14 +2246,14 @@ void KLocale::setMeasureSystem(MeasureSystem value)
d->measureSystem = value;
}
-QString KLocale::defaultLanguage()
+TQString KLocale::defaultLanguage()
{
- return QString::fromLatin1("en_US");
+ return TQString::fromLatin1("en_US");
}
-QString KLocale::defaultCountry()
+TQString KLocale::defaultCountry()
{
- return QString::fromLatin1("C");
+ return TQString::fromLatin1("C");
}
const char * KLocale::encoding() const
@@ -2285,38 +2285,38 @@ int KLocale::fileEncodingMib() const
return codecForEncoding()->mibEnum();
}
-QTextCodec * KLocale::codecForEncoding() const
+TQTextCodec * KLocale::codecForEncoding() const
{
return d->codecForEncoding;
}
bool KLocale::setEncoding(int mibEnum)
{
- QTextCodec * codec = QTextCodec::codecForMib(mibEnum);
+ TQTextCodec * codec = TQTextCodec::codecForMib(mibEnum);
if (codec)
d->codecForEncoding = codec;
return codec != 0;
}
-QStringList KLocale::languagesTwoAlpha() const
+TQStringList KLocale::languagesTwoAlpha() const
{
if (d->langTwoAlpha.count())
return d->langTwoAlpha;
- const QStringList &origList = languageList();
+ const TQStringList &origList = languageList();
- QStringList result;
+ TQStringList result;
- KConfig config(QString::fromLatin1("language.codes"), true, false);
+ KConfig config(TQString::fromLatin1("language.codes"), true, false);
config.setGroup("TwoLetterCodes");
- for ( QStringList::ConstIterator it = origList.begin();
+ for ( TQStringList::ConstIterator it = origList.begin();
it != origList.end();
++it )
{
- QString lang = *it;
- QStringList langLst;
+ TQString lang = *it;
+ TQStringList langLst;
if (config.hasKey( lang ))
langLst = config.readListEntry( lang );
else
@@ -2327,7 +2327,7 @@ QStringList KLocale::languagesTwoAlpha() const
langLst << lang;
}
- for ( QStringList::ConstIterator langIt = langLst.begin();
+ for ( TQStringList::ConstIterator langIt = langLst.begin();
langIt != langLst.end();
++langIt )
{
@@ -2339,7 +2339,7 @@ QStringList KLocale::languagesTwoAlpha() const
return result;
}
-QStringList KLocale::allLanguagesTwoAlpha() const
+TQStringList KLocale::allLanguagesTwoAlpha() const
{
if (!d->languages)
d->languages = new KConfig("all_languages", true, false, "locale");
@@ -2347,12 +2347,12 @@ QStringList KLocale::allLanguagesTwoAlpha() const
return d->languages->groupList();
}
-QString KLocale::twoAlphaToLanguageName(const QString &code) const
+TQString KLocale::twoAlphaToLanguageName(const TQString &code) const
{
if (!d->languages)
d->languages = new KConfig("all_languages", true, false, "locale");
- QString groupName = code;
+ TQString groupName = code;
const int i = groupName.find('_');
groupName.replace(0, i, groupName.left(i).lower());
@@ -2360,28 +2360,28 @@ QString KLocale::twoAlphaToLanguageName(const QString &code) const
return d->languages->readEntry("Name");
}
-QStringList KLocale::allCountriesTwoAlpha() const
+TQStringList KLocale::allCountriesTwoAlpha() const
{
- QStringList countries;
- QStringList paths = KGlobal::dirs()->findAllResources("locale", "l10n/*/entry.desktop");
- for(QStringList::ConstIterator it = paths.begin();
+ TQStringList countries;
+ TQStringList paths = KGlobal::dirs()->findAllResources("locale", "l10n/*/entry.desktop");
+ for(TQStringList::ConstIterator it = paths.begin();
it != paths.end(); ++it)
{
- QString code = (*it).mid((*it).length()-16, 2);
+ TQString code = (*it).mid((*it).length()-16, 2);
if (code != "/C")
countries.append(code);
}
return countries;
}
-QString KLocale::twoAlphaToCountryName(const QString &code) const
+TQString KLocale::twoAlphaToCountryName(const TQString &code) const
{
KConfig cfg("l10n/"+code.lower()+"/entry.desktop", true, false, "locale");
cfg.setGroup("KCM Locale");
return cfg.readEntry("Name");
}
-void KLocale::setCalendar(const QString & calType)
+void KLocale::setCalendar(const TQString & calType)
{
doFormatInit();
@@ -2391,7 +2391,7 @@ void KLocale::setCalendar(const QString & calType)
d->calendar = 0;
}
-QString KLocale::calendarType() const
+TQString KLocale::calendarType() const
{
doFormatInit();
@@ -2448,8 +2448,8 @@ KLocale & KLocale::operator=(const KLocale & rhs)
return *this;
}
-bool KLocale::setCharset(const QString & ) { return true; }
-QString KLocale::charset() const { return QString::fromLatin1("UTF-8"); }
+bool KLocale::setCharset(const TQString & ) { return true; }
+TQString KLocale::charset() const { return TQString::fromLatin1("UTF-8"); }
// KDE4: remove
#if 0
diff --git a/kdecore/klocale.h b/kdecore/klocale.h
index 437e4780c..ca665152a 100644
--- a/kdecore/klocale.h
+++ b/kdecore/klocale.h
@@ -22,7 +22,7 @@
#ifndef _KLOCALE_H
#define _KLOCALE_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
class QStringList;
@@ -67,7 +67,7 @@ class KCalendarSystem;
* \relates KLocale
* i18n is the function that does everything you need to translate
* a string. You just wrap around every user visible string a i18n
- * call to get a QString with the string in the user's preferred
+ * call to get a TQString with the string in the user's preferred
* language.
*
* The argument must be an UTF-8 encoded string (If you only use
@@ -75,7 +75,7 @@ class KCalendarSystem;
* for e.g. German umlauts or French accents should be recoded to
* UTF-8)
**/
-KDECORE_EXPORT QString i18n(const char *text);
+KDECORE_EXPORT TQString i18n(const char *text);
/**
* \relates KLocale
@@ -84,7 +84,7 @@ KDECORE_EXPORT QString i18n(const char *text);
* text.
* @see translate
**/
-KDECORE_EXPORT QString i18n(const char *comment, const char *text);
+KDECORE_EXPORT TQString i18n(const char *comment, const char *text);
/**
* \relates KLocale
@@ -97,7 +97,7 @@ KDECORE_EXPORT QString i18n(const char *comment, const char *text);
* depending on n
* @see translate
**/
-KDECORE_EXPORT QString i18n(const char *singular, const char *plural, unsigned long n);
+KDECORE_EXPORT TQString i18n(const char *singular, const char *plural, unsigned long n);
/**
* \relates KLocale
@@ -105,7 +105,7 @@ KDECORE_EXPORT QString i18n(const char *singular, const char *plural, unsigned l
* with our i18n method. We use uic -tr tr2i18n to redirect
* to the right i18n() function
**/
-inline QString tr2i18n(const char* message, const char* =0) {
+inline TQString tr2i18n(const char* message, const char* =0) {
return i18n(message);
}
@@ -141,7 +141,7 @@ public:
* @param catalog The name of the main language file
* @param config The configuration file to use.
*/
- KLocale( const QString& catalog, KConfig *config = 0 );
+ KLocale( const TQString& catalog, KConfig *config = 0 );
/**
* Copy constructor.
@@ -176,7 +176,7 @@ public:
*
* @param index The lookup text and default text, if not found.
*/
- QString translate( const char *index ) const;
+ TQString translate( const char *index ) const;
/**
* Translates the string into the corresponding string in the
@@ -203,7 +203,7 @@ public:
* @param fallback the default text, if not found
* @return translation
*/
- QString translate( const char *comment, const char *fallback) const;
+ TQString translate( const char *comment, const char *fallback) const;
/**
* Used to get the correct, translated singular or plural of a
@@ -215,7 +215,7 @@ public:
* @return the correct singular or plural for the selected language,
* depending on n
*/
- QString translate( const char *singular, const char *plural,
+ TQString translate( const char *singular, const char *plural,
unsigned long n) const;
/**
@@ -236,7 +236,7 @@ public:
*
* @return True on success.
*/
- bool setLanguage(const QString & language);
+ bool setLanguage(const TQString & language);
/**
* Changes the list of prefed languages for the locale. The first valid
@@ -247,7 +247,7 @@ public:
*
* @return True if one of the specified languages were used.
*/
- bool setLanguage(const QStringList & languages);
+ bool setLanguage(const TQStringList & languages);
/**
* Changes the current country. The current country will be left
@@ -258,7 +258,7 @@ public:
*
* @return True on success.
*/
- bool setCountry(const QString & country);
+ bool setCountry(const TQString & country);
/**
* Various positions for where to place the positive or negative
@@ -274,7 +274,7 @@ public:
*
* @return The decimal symbol used by locale.
*/
- QString decimalSymbol() const;
+ TQString decimalSymbol() const;
/**
* Returns what the thousands separator should look
@@ -283,7 +283,7 @@ public:
*
* @return The thousands separator used by locale.
*/
- QString thousandsSeparator() const;
+ TQString thousandsSeparator() const;
/**
* Returns what the symbol denoting currency in the current locale
@@ -291,7 +291,7 @@ public:
*
* @return The default currency symbol used by locale.
*/
- QString currencySymbol() const;
+ TQString currencySymbol() const;
/**
* Returns what a decimal point should look like ("." or "," etc.)
@@ -300,7 +300,7 @@ public:
*
* @return The monetary decimal symbol used by locale.
*/
- QString monetaryDecimalSymbol() const;
+ TQString monetaryDecimalSymbol() const;
/**
* Returns what a thousands separator for monetary values should
@@ -309,7 +309,7 @@ public:
*
* @return The monetary thousands separator used by locale.
*/
- QString monetaryThousandsSeparator() const;
+ TQString monetaryThousandsSeparator() const;
/**
* Returns what a positive sign should look like ("+", " ", etc.)
@@ -317,7 +317,7 @@ public:
*
* @return The positive sign used by locale.
*/
- QString positiveSign() const;
+ TQString positiveSign() const;
/**
* Returns what a negative sign should look like ("-", etc.)
@@ -325,7 +325,7 @@ public:
*
* @return The negative sign used by locale.
*/
- QString negativeSign() const;
+ TQString negativeSign() const;
/**
* The number of fractional digits to include in numeric/monetary
@@ -383,8 +383,8 @@ public:
* @return The number of money as a localized string
* @see fracDigits()
*/
- QString formatMoney(double num,
- const QString & currency = QString::null,
+ TQString formatMoney(double num,
+ const TQString & currency = TQString::null,
int digits = -1) const;
/**
@@ -400,18 +400,18 @@ public:
* @param precision Number of fractional digits used.
*
* @return The number as a localized string
- * @see formatNumber(const QString, bool, int)
+ * @see formatNumber(const TQString, bool, int)
*/
- QString formatNumber(double num, int precision = -1) const;
+ TQString formatNumber(double num, int precision = -1) const;
/**
* @deprecated
*
- * KDE 4.0: merge with formatNumber(const QString int)
+ * KDE 4.0: merge with formatNumber(const TQString int)
*
* calls formatNumber(numStr, 2)
*/
- QString formatNumber(const QString &numStr) const KDE_DEPRECATED;
+ TQString formatNumber(const TQString &numStr) const KDE_DEPRECATED;
/**
* Given a string representing a number, converts that to a numeric
@@ -426,7 +426,7 @@ public:
* @return The number as a localized string
* @since 3.5
*/
- QString formatNumber(const QString &numStr, bool round, int precision) const;
+ TQString formatNumber(const TQString &numStr, bool round, int precision) const;
/**
* Given an integer, converts that to a numeric string containing
@@ -439,7 +439,7 @@ public:
* @return The number as a localized string
* @since 3.2
*/
- QString formatLong(long num) const;
+ TQString formatLong(long num) const;
/**
* Use this to determine whether nouns are declined in
@@ -460,7 +460,7 @@ public:
*
* @return The date as a string
*/
- QString formatDate(const QDate &pDate, bool shortFormat = false) const;
+ TQString formatDate(const TQDate &pDate, bool shortFormat = false) const;
/**
* Use this to determine whether in dates a possessive form of month
@@ -483,7 +483,7 @@ public:
*
* @return The time as a string
*/
- QString formatTime(const QTime &pTime, bool includeSecs, bool isDuration /*=false*/) const;
+ TQString formatTime(const TQTime &pTime, bool includeSecs, bool isDuration /*=false*/) const;
/**
* Returns a string formatted to the current locale's conventions
@@ -495,7 +495,7 @@ public:
*
* @return The time as a string
*/
- QString formatTime(const QTime &pTime, bool includeSecs = false) const; // BIC: merge with above
+ TQString formatTime(const TQTime &pTime, bool includeSecs = false) const; // BIC: merge with above
/**
* Use this to determine if the user wants a 12 hour clock.
@@ -534,7 +534,7 @@ public:
* @return The name of the month
*
* Typically the correct replacement for this deprecated class is
- * calendar()->monthString(), which requires a QDate (rather than an
+ * calendar()->monthString(), which requires a TQDate (rather than an
* integer month) or both a month and a year.
* This will work across different calendars.
* Note that you also need to add
@@ -543,7 +543,7 @@ public:
* \endcode
* to the applicable file.
*/
- QString monthName(int i, bool shortName = false) const KDE_DEPRECATED;
+ TQString monthName(int i, bool shortName = false) const KDE_DEPRECATED;
/**
* @deprecated
@@ -559,7 +559,7 @@ public:
* @since 3.1
*
* Typically the correct replacement for this deprecated class is
- * calendar()->monthNamePossessive(), which requires a QDate (rather than
+ * calendar()->monthNamePossessive(), which requires a TQDate (rather than
* an integer month) or both a month and a year.
* This will work across different calendars.
* Note that you also need to add
@@ -568,7 +568,7 @@ public:
* \endcode
* to the applicable file.
*/
- QString monthNamePossessive(int i, bool shortName = false) const KDE_DEPRECATED;
+ TQString monthNamePossessive(int i, bool shortName = false) const KDE_DEPRECATED;
/**
* @deprecated use calendar()->weekDayName
@@ -580,7 +580,7 @@ public:
*
* @return The name of the day
*/
- QString weekDayName(int i, bool shortName = false) const KDE_DEPRECATED;
+ TQString weekDayName(int i, bool shortName = false) const KDE_DEPRECATED;
/**
* Returns a pointer to the calendar system object.
@@ -597,7 +597,7 @@ public:
* @return the name of the calendar system
* @since 3.2
*/
- QString calendarType() const;
+ TQString calendarType() const;
/**
* Changes the current calendar system to the calendar specified.
@@ -607,7 +607,7 @@ public:
* @param calendarType the name of the calendar type
* @since 3.2
*/
- void setCalendar(const QString & calendarType);
+ void setCalendar(const TQString & calendarType);
/**
* Returns a string formated to the current locale's conventions
@@ -619,7 +619,7 @@ public:
*
* @return The date and time as a string
*/
- QString formatDateTime(const QDateTime &pDateTime,
+ TQString formatDateTime(const TQDateTime &pDateTime,
bool shortFormat = true,
bool includeSecs = false) const;
@@ -632,7 +632,7 @@ public:
*
* @return The string converted to a double
*/
- double readMoney(const QString &numStr, bool * ok = 0) const;
+ double readMoney(const TQString &numStr, bool * ok = 0) const;
/**
* Converts a localized numeric string to a double.
@@ -643,10 +643,10 @@ public:
*
* @return The string converted to a double
*/
- double readNumber(const QString &numStr, bool * ok = 0) const;
+ double readNumber(const TQString &numStr, bool * ok = 0) const;
/**
- * Converts a localized date string to a QDate.
+ * Converts a localized date string to a TQDate.
* The bool pointed by ok will be invalid if the date entered was not valid.
*
* @param str the string we want to convert.
@@ -655,13 +655,13 @@ public:
*
* @return The string converted to a QDate
*/
- QDate readDate(const QString &str, bool* ok = 0) const;
+ TQDate readDate(const TQString &str, bool* ok = 0) const;
/**
- * Converts a localized date string to a QDate, using the specified format.
+ * Converts a localized date string to a TQDate, using the specified format.
* You will usually not want to use this method.
*/
- QDate readDate( const QString &intstr, const QString &fmt, bool* ok = 0) const;
+ TQDate readDate( const TQString &intstr, const TQString &fmt, bool* ok = 0) const;
enum ReadDateFlags {
NormalFormat = 1,
@@ -669,7 +669,7 @@ public:
};
/**
- * Converts a localized date string to a QDate.
+ * Converts a localized date string to a TQDate.
* This method is stricter than readDate(str,&ok): it will either accept
* a date in full format or a date in short format, depending on @p flags.
*
@@ -681,10 +681,10 @@ public:
* @return The string converted to a QDate
* @since 3.2
*/
- QDate readDate(const QString &str, ReadDateFlags flags, bool *ok = 0) const;
+ TQDate readDate(const TQString &str, ReadDateFlags flags, bool *ok = 0) const;
/**
- * Converts a localized time string to a QTime.
+ * Converts a localized time string to a TQTime.
* This method will try to parse it with seconds, then without seconds.
* The bool pointed to by @p ok will be set to false if the time entered was
* not valid.
@@ -695,14 +695,14 @@ public:
*
* @return The string converted to a QTime
*/
- QTime readTime(const QString &str, bool* ok = 0) const;
+ TQTime readTime(const TQString &str, bool* ok = 0) const;
enum ReadTimeFlags {
WithSeconds = 0, // default (no flag set)
WithoutSeconds = 1
}; // (maybe use this enum as a bitfield, if adding independent features?)
/**
- * Converts a localized time string to a QTime.
+ * Converts a localized time string to a TQTime.
* This method is stricter than readTime(str,&ok): it will either accept
* a time with seconds or a time without seconds.
* Use this method when the format is known by the application.
@@ -715,7 +715,7 @@ public:
* @return The string converted to a QTime
* @since 3.2
*/
- QTime readTime(const QString &str, ReadTimeFlags flags, bool *ok = 0) const;
+ TQTime readTime(const TQString &str, ReadTimeFlags flags, bool *ok = 0) const;
/**
* Returns the language used by this object. The domain AND the
@@ -724,7 +724,7 @@ public:
*
* @return The currently used language.
*/
- QString language() const;
+ TQString language() const;
/**
* Returns the country code of the country where the user lives.
@@ -732,7 +732,7 @@ public:
*
* @return The country code for the user.
*/
- QString country() const;
+ TQString country() const;
/**
* Returns the preferred languages as ISO 639-1 codes. This means
@@ -747,7 +747,7 @@ public:
*
* @see languageList
*/
- QStringList languagesTwoAlpha() const;
+ TQStringList languagesTwoAlpha() const;
/**
* Returns the languages selected by user. The codes returned here is the
@@ -757,7 +757,7 @@ public:
*
* @see languagesTwoAlpha
*/
- QStringList languageList() const;
+ TQStringList languageList() const;
/**
* Returns the user's preferred encoding.
@@ -786,15 +786,15 @@ public:
* @see encoding
* @see encodingMib
*/
- QTextCodec * codecForEncoding() const;
+ TQTextCodec * codecForEncoding() const;
/**
* Returns the file encoding.
*
* @return The Mib of the file encoding
*
- * @see QFile::encodeName
- * @see QFile::decodeName
+ * @see TQFile::encodeName
+ * @see TQFile::decodeName
*/
int fileEncodingMib() const;
@@ -820,7 +820,7 @@ public:
*
* @param format The new date format
*/
- void setDateFormat(const QString & format);
+ void setDateFormat(const TQString & format);
/**
* Changes the current short date format.
*
@@ -843,7 +843,7 @@ public:
*
* @param format The new short date format
*/
- void setDateFormatShort(const QString & format);
+ void setDateFormatShort(const TQString & format);
/**
* Changes the form of month name used in dates.
*
@@ -870,7 +870,7 @@ public:
*
* @param format The new time format
*/
- void setTimeFormat(const QString & format);
+ void setTimeFormat(const TQString & format);
/**
* @deprecated
@@ -896,47 +896,47 @@ public:
* @return Current date format.
* @see setDateFormat()
*/
- QString dateFormat() const;
+ TQString dateFormat() const;
/**
* Returns the currently selected short date format.
*
* @return Current short date format.
* @see setDateFormatShort()
*/
- QString dateFormatShort() const;
+ TQString dateFormatShort() const;
/**
* Returns the currently selected time format.
*
* @return Current time format.
* @see setTimeFormat()
*/
- QString timeFormat() const;
+ TQString timeFormat() const;
/**
* Changes the symbol used to identify the decimal pointer.
*
* @param symbol The new decimal symbol.
*/
- void setDecimalSymbol(const QString & symbol);
+ void setDecimalSymbol(const TQString & symbol);
/**
* Changes the separator used to group digits when formating numbers.
*
* @param separator The new thousands separator.
*/
- void setThousandsSeparator(const QString & separator);
+ void setThousandsSeparator(const TQString & separator);
/**
* Changes the sign used to identify a positive number. Normally this is
* left blank.
*
* @param sign Sign used for positive numbers.
*/
- void setPositiveSign(const QString & sign);
+ void setPositiveSign(const TQString & sign);
/**
* Changes the sign used to identify a negative number.
*
* @param sign Sign used for negative numbers.
*/
- void setNegativeSign(const QString & sign);
+ void setNegativeSign(const TQString & sign);
/**
* Changes the sign position used for positive monetary values.
*
@@ -976,32 +976,32 @@ public:
*
* @param separator The new thousands separator.
*/
- void setMonetaryThousandsSeparator(const QString & separator);
+ void setMonetaryThousandsSeparator(const TQString & separator);
/**
* Changes the symbol used to identify the decimal pointer for monetary
* values.
*
* @param symbol The new decimal symbol.
*/
- void setMonetaryDecimalSymbol(const QString & symbol);
+ void setMonetaryDecimalSymbol(const TQString & symbol);
/**
* Changes the current currency symbol.
*
* @param symbol The new currency symbol
*/
- void setCurrencySymbol(const QString & symbol);
+ void setCurrencySymbol(const TQString & symbol);
/**
* Returns the preferred page size for printing.
*
- * @return The preferred page size, cast it to QPrinter::PageSize
+ * @return The preferred page size, cast it to TQPrinter::PageSize
*/
int pageSize() const;
/**
* Changes the preferred page size when printing.
*
- * @param paperFormat the new preferred page size in the format QPrinter::PageSize
+ * @param paperFormat the new preferred page size in the format TQPrinter::PageSize
*/
void setPageSize(int paperFormat);
@@ -1035,28 +1035,28 @@ public:
*
* @param catalog The catalog to add.
*/
- void insertCatalogue(const QString& catalog);
+ void insertCatalogue(const TQString& catalog);
/**
* Removes a catalog for translation lookup.
* @param catalog The catalog to remove.
* @see insertCatalogue()
*/
- void removeCatalogue(const QString &catalog);
+ void removeCatalogue(const TQString &catalog);
/**
* Sets the active catalog for translation lookup.
* @param catalog The catalog to activate.
*/
- void setActiveCatalogue(const QString &catalog);
+ void setActiveCatalogue(const TQString &catalog);
/**
* Translates a message as a QTranslator is supposed to.
* The parameters are similar to i18n(), but the result
- * value has other semantics (it can be QString::null)
+ * value has other semantics (it can be TQString::null)
* @since 3.1
**/
- QString translateQt(const char *context,
+ TQString translateQt(const char *context,
const char *sourceText,
const char *message) const;
@@ -1065,7 +1065,7 @@ public:
* @return a list of all language codes
* @since 3.1
*/
- QStringList allLanguagesTwoAlpha() const;
+ TQStringList allLanguagesTwoAlpha() const;
/**
* Convert a ISO 639-1 code to a human readable form.
@@ -1073,14 +1073,14 @@ public:
* @return the human readable form
* @since 3.1
*/
- QString twoAlphaToLanguageName(const QString &code) const;
+ TQString twoAlphaToLanguageName(const TQString &code) const;
/**
* Returns list of all known country codes.
* @return a list of all country codes
* @since 3.1
*/
- QStringList allCountriesTwoAlpha() const;
+ TQStringList allCountriesTwoAlpha() const;
/**
* Convert a country code to a human readable form.
@@ -1088,7 +1088,7 @@ public:
* @return the human readable form of the country name
* @since 3.1
*/
- QString twoAlphaToCountryName(const QString &code) const;
+ TQString twoAlphaToCountryName(const TQString &code) const;
/**
* Returns the parts of the parameter str understood as language setting
@@ -1099,10 +1099,10 @@ public:
* @param country This will be set to the country part of the string.
* @param charset This will be set to the charset part of the string.
*/
- static void splitLocale(const QString & str,
- QString & language,
- QString & country,
- QString & charset);
+ static void splitLocale(const TQString & str,
+ TQString & language,
+ TQString & country,
+ TQString & charset);
/**
* Use this as main catalog for *all* KLocales, if not the appname
@@ -1120,27 +1120,27 @@ public:
* @param fname relative path to find
* @param rtype resource type to use
*/
- static QString langLookup(const QString &fname, const char *rtype = "html");
+ static TQString langLookup(const TQString &fname, const char *rtype = "html");
/**
* Returns the name of the internal language.
*
* @return Name of the default language
*/
- static QString defaultLanguage();
+ static TQString defaultLanguage();
/**
* Returns the name of the default country.
*
* @return Name of the default country
*/
- static QString defaultCountry();
+ static TQString defaultCountry();
/**
* @internal Called from KConfigBackend to initialize language.
*/
- static QString _initLanguage(KConfigBase *config);
+ static TQString _initLanguage(KConfigBase *config);
#ifdef KDE_NO_COMPAT
private:
@@ -1149,7 +1149,7 @@ private:
* @deprecated
* use formatMoney(double)
*/
- QString formatMoney(const QString &numStr) const KDE_DEPRECATED;
+ TQString formatMoney(const TQString &numStr) const KDE_DEPRECATED;
/**
* @deprecated
@@ -1157,19 +1157,19 @@ private:
*
* @return String containing language codes separated by colons
*/
- QString languages() const KDE_DEPRECATED;
+ TQString languages() const KDE_DEPRECATED;
/**
* @deprecated
* @return True
*/
- bool setCharset(const QString & charset) KDE_DEPRECATED;
+ bool setCharset(const TQString & charset) KDE_DEPRECATED;
/**
* @deprecated
* @see encoding
*/
- QString charset() const KDE_DEPRECATED;
+ TQString charset() const KDE_DEPRECATED;
protected:
/**
@@ -1193,7 +1193,7 @@ private:
* @param config The configuration object used for init
* @param useEnv True if we should use environment variables
*/
- void initMainCatalogues(const QString & catalog);
+ void initMainCatalogues(const TQString & catalog);
/**
* @internal Initializes the list of valid languages from the user's point of view. This is the list of
@@ -1214,19 +1214,19 @@ private:
/**
* @internal Figures out which encoding the user prefers for filenames
- * and sets up the appropriate QFile encoding and decoding functions.
+ * and sets up the appropriate TQFile encoding and decoding functions.
*/
void initFileNameEncoding(KConfig *config);
/**
- * @internal A QFile filename encoding function (QFile::encodeFn).
+ * @internal A TQFile filename encoding function (TQFile::encodeFn).
*/
- static QCString encodeFileNameUTF8( const QString & fileName );
+ static TQCString encodeFileNameUTF8( const TQString & fileName );
/**
- * @internal QFile filename decoding function (QFile::decodeFn).
+ * @internal TQFile filename decoding function (TQFile::decodeFn).
*/
- static QString decodeFileNameUTF8( const QCString & localFileName );
+ static TQString decodeFileNameUTF8( const TQCString & localFileName );
/**
* @internal Changes the file name of the catalog to the correct
@@ -1247,7 +1247,7 @@ private:
/**
* @internal function used by the two translate versions
*/
- QString translate_priv(const char *index,
+ TQString translate_priv(const char *index,
const char *text,
const char ** original = 0,
int* pluralType = 0) const;
@@ -1260,7 +1260,7 @@ private:
/**
* @internal Checks if the specified language is installed
*/
- bool isLanguageInstalled(const QString & language) const;
+ bool isLanguageInstalled(const TQString & language) const;
/**
* @internal evaluate the list of catalogs and check that all instances for all languages are loaded
@@ -1277,7 +1277,7 @@ private:
*
* @param language The language to examine
*/
- int pluralType( const QString & language );
+ int pluralType( const TQString & language );
/**
* @internal Find the plural type information for a given catalog. This catalog will be a kdelibs.mo. Method
@@ -1292,14 +1292,14 @@ private:
* @param language language of the catalog
* @param name name of the catalog
*/
- // const KCatalogue * catalog( const QString & language, const QString & name );
+ // const KCatalogue * catalog( const TQString & language, const TQString & name );
/**
- * @internal Retrieves the file name of the catalog, or QString::null
+ * @internal Retrieves the file name of the catalog, or TQString::null
* if not found.
*/
- static QString catalogueFileName(const QString & language,
+ static TQString catalogueFileName(const TQString & language,
const KCatalogue & catalog);
public:
/**
@@ -1307,28 +1307,28 @@ public:
*
* @param language language to check
*/
- bool isApplicationTranslatedInto( const QString & language);
+ bool isApplicationTranslatedInto( const TQString & language);
private:
// Numbers and money
- QString m_decimalSymbol;
- QString m_thousandsSeparator;
- QString m_currencySymbol;
- QString m_monetaryDecimalSymbol;
- QString m_monetaryThousandsSeparator;
- QString m_positiveSign;
- QString m_negativeSign;
+ TQString m_decimalSymbol;
+ TQString m_thousandsSeparator;
+ TQString m_currencySymbol;
+ TQString m_monetaryDecimalSymbol;
+ TQString m_monetaryThousandsSeparator;
+ TQString m_positiveSign;
+ TQString m_negativeSign;
int m_fracDigits;
SignPosition m_positiveMonetarySignPosition;
SignPosition m_negativeMonetarySignPosition;
// Date and time
- QString m_timeFormat;
- QString m_dateFormat;
- QString m_dateFormatShort;
+ TQString m_timeFormat;
+ TQString m_dateFormat;
+ TQString m_dateFormatShort;
- QString m_language;
- QString m_country;
+ TQString m_language;
+ TQString m_country;
bool m_weekStartsMonday; //### remove for KDE 4.0
bool m_positivePrefixCurrencySymbol;
diff --git a/kdecore/klockfile.cpp b/kdecore/klockfile.cpp
index 41946a36a..3bd6edb30 100644
--- a/kdecore/klockfile.cpp
+++ b/kdecore/klockfile.cpp
@@ -33,8 +33,8 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kde_file.h>
#include <kapplication.h>
@@ -47,22 +47,22 @@
class KLockFile::KLockFilePrivate {
public:
- QString file;
+ TQString file;
int staleTime;
bool isLocked;
bool recoverLock;
bool linkCountSupport;
- QTime staleTimer;
+ TQTime staleTimer;
KDE_struct_stat statBuf;
int pid;
- QString hostname;
- QString instance;
- QString lockRecoverFile;
+ TQString hostname;
+ TQString instance;
+ TQString lockRecoverFile;
};
// 30 seconds
-KLockFile::KLockFile(const QString &file)
+KLockFile::KLockFile(const TQString &file)
{
d = new KLockFilePrivate();
d->file = file;
@@ -99,7 +99,7 @@ static bool statResultIsEqual(KDE_struct_stat &st_buf1, KDE_struct_stat &st_buf2
#undef FIELD_EQ
}
-static bool testLinkCountSupport(const QCString &fileName)
+static bool testLinkCountSupport(const TQCString &fileName)
{
KDE_struct_stat st_buf;
// Check if hardlinks raise the link count at all?
@@ -109,14 +109,14 @@ static bool testLinkCountSupport(const QCString &fileName)
return ((result == 0) && (st_buf.st_nlink == 2));
}
-static KLockFile::LockResult lockFile(const QString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
+static KLockFile::LockResult lockFile(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
{
- QCString lockFileName = QFile::encodeName( lockFile );
+ TQCString lockFileName = TQFile::encodeName( lockFile );
int result = KDE_lstat( lockFileName, &st_buf );
if (result == 0)
return KLockFile::LockFail;
- KTempFile uniqueFile(lockFile, QString::null, 0644);
+ KTempFile uniqueFile(lockFile, TQString::null, 0644);
uniqueFile.setAutoDelete(true);
if (uniqueFile.status() != 0)
return KLockFile::LockError;
@@ -125,14 +125,14 @@ static KLockFile::LockResult lockFile(const QString &lockFile, KDE_struct_stat &
hostname[0] = 0;
gethostname(hostname, 255);
hostname[255] = 0;
- QCString instanceName = KCmdLineArgs::appName();
+ TQCString instanceName = KCmdLineArgs::appName();
- (*(uniqueFile.textStream())) << QString::number(getpid()) << endl
+ (*(uniqueFile.textStream())) << TQString::number(getpid()) << endl
<< instanceName << endl
<< hostname << endl;
uniqueFile.close();
- QCString uniqueName = QFile::encodeName( uniqueFile.name() );
+ TQCString uniqueName = TQFile::encodeName( uniqueFile.name() );
#ifdef Q_OS_UNIX
// Create lock file
@@ -171,7 +171,7 @@ static KLockFile::LockResult lockFile(const QString &lockFile, KDE_struct_stat &
return KLockFile::LockOK;
}
-static KLockFile::LockResult deleteStaleLock(const QString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
+static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struct_stat &st_buf, bool &linkCountSupport)
{
// This is dangerous, we could be deleting a new lock instead of
// the old stale one, let's be very careful
@@ -181,8 +181,8 @@ static KLockFile::LockResult deleteStaleLock(const QString &lockFile, KDE_struct
if (ktmpFile.status() != 0)
return KLockFile::LockError;
- QCString lckFile = QFile::encodeName(lockFile);
- QCString tmpFile = QFile::encodeName(ktmpFile.name());
+ TQCString lckFile = TQFile::encodeName(lockFile);
+ TQCString tmpFile = TQFile::encodeName(ktmpFile.name());
ktmpFile.close();
ktmpFile.unlink();
@@ -251,12 +251,12 @@ KLockFile::LockResult KLockFile::lock(int options)
result = lockFile(d->file, st_buf, d->linkCountSupport);
if (result == KLockFile::LockOK)
{
- d->staleTimer = QTime();
+ d->staleTimer = TQTime();
break;
}
else if (result == KLockFile::LockError)
{
- d->staleTimer = QTime();
+ d->staleTimer = TQTime();
if (--hardErrors == 0)
{
break;
@@ -265,7 +265,7 @@ KLockFile::LockResult KLockFile::lock(int options)
else // KLockFile::Fail
{
if (!d->staleTimer.isNull() && !statResultIsEqual(d->statBuf, st_buf))
- d->staleTimer = QTime();
+ d->staleTimer = TQTime();
if (!d->staleTimer.isNull())
{
@@ -299,7 +299,7 @@ KLockFile::LockResult KLockFile::lock(int options)
if (result == KLockFile::LockOK)
{
// Lock deletion successful
- d->staleTimer = QTime();
+ d->staleTimer = TQTime();
continue; // Now try to get the new lock
}
else if (result != KLockFile::LockFail)
@@ -314,13 +314,13 @@ KLockFile::LockResult KLockFile::lock(int options)
d->staleTimer.start();
d->pid = -1;
- d->hostname = QString::null;
- d->instance = QString::null;
+ d->hostname = TQString::null;
+ d->instance = TQString::null;
- QFile file(d->file);
+ TQFile file(d->file);
if (file.open(IO_ReadOnly))
{
- QTextStream ts(&file);
+ TQTextStream ts(&file);
if (!ts.atEnd())
d->pid = ts.readLine().toInt();
if (!ts.atEnd())
@@ -360,12 +360,12 @@ void KLockFile::unlock()
{
if (d->isLocked)
{
- ::unlink(QFile::encodeName(d->file));
+ ::unlink(TQFile::encodeName(d->file));
d->isLocked = false;
}
}
-bool KLockFile::getLockInfo(int &pid, QString &hostname, QString &appname)
+bool KLockFile::getLockInfo(int &pid, TQString &hostname, TQString &appname)
{
if (d->pid == -1)
return false;
diff --git a/kdecore/klockfile.h b/kdecore/klockfile.h
index b48d09926..fac66831a 100644
--- a/kdecore/klockfile.h
+++ b/kdecore/klockfile.h
@@ -20,8 +20,8 @@
#ifndef _KLOCKFILE_H_
#define _KLOCKFILE_H_
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <ksharedptr.h>
/**
@@ -35,7 +35,7 @@ class KDECORE_EXPORT KLockFile : public KShared
public:
typedef KSharedPtr<KLockFile> Ptr;
- KLockFile(const QString &file);
+ KLockFile(const TQString &file);
/**
* Destroys the object, releasing the lock if held
@@ -113,7 +113,7 @@ public:
* the lock after the lock functon has returned with LockStale.
* @returns false if the pid and hostname could not be determined
*/
- bool getLockInfo(int &pid, QString &hostname, QString &appname);
+ bool getLockInfo(int &pid, TQString &hostname, TQString &appname);
private:
class KLockFilePrivate;
diff --git a/kdecore/kmacroexpander.cpp b/kdecore/kmacroexpander.cpp
index f098f68e4..81fd5478f 100644
--- a/kdecore/kmacroexpander.cpp
+++ b/kdecore/kmacroexpander.cpp
@@ -22,10 +22,10 @@
#include <kmacroexpander.h>
-#include <qvaluestack.h>
-#include <qregexp.h>
+#include <tqvaluestack.h>
+#include <tqregexp.h>
-KMacroExpanderBase::KMacroExpanderBase( QChar c )
+KMacroExpanderBase::KMacroExpanderBase( TQChar c )
{
escapechar = c;
}
@@ -35,7 +35,7 @@ KMacroExpanderBase::~KMacroExpanderBase()
}
void
-KMacroExpanderBase::setEscapeChar( QChar c )
+KMacroExpanderBase::setEscapeChar( TQChar c )
{
escapechar = c;
}
@@ -46,13 +46,13 @@ KMacroExpanderBase::escapeChar() const
return escapechar;
}
-void KMacroExpanderBase::expandMacros( QString &str )
+void KMacroExpanderBase::expandMacros( TQString &str )
{
uint pos;
int len;
- QChar ec( escapechar );
- QStringList rst;
- QString rsts;
+ TQChar ec( escapechar );
+ TQStringList rst;
+ TQString rsts;
for (pos = 0; pos < str.length(); ) {
if (ec != (char)0) {
@@ -89,7 +89,7 @@ namespace KMacroExpander {
bool dquote;
} State;
typedef struct {
- QString str;
+ TQString str;
uint pos;
} Save;
@@ -97,19 +97,19 @@ namespace KMacroExpander {
using namespace KMacroExpander;
-bool KMacroExpanderBase::expandMacrosShellQuote( QString &str, uint &pos )
+bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos )
{
int len;
uint pos2;
- QChar ec( escapechar );
+ TQChar ec( escapechar );
State state = { noquote, false };
- QValueStack<State> sstack;
- QValueStack<Save> ostack;
- QStringList rst;
- QString rsts;
+ TQValueStack<State> sstack;
+ TQValueStack<Save> ostack;
+ TQStringList rst;
+ TQString rsts;
while (pos < str.length()) {
- QChar cc( str.unicode()[pos] );
+ TQChar cc( str.unicode()[pos] );
if (ec != (char)0) {
if (cc != ec)
goto nohit;
@@ -125,10 +125,10 @@ bool KMacroExpanderBase::expandMacrosShellQuote( QString &str, uint &pos )
}
if (state.dquote) {
rsts = rst.join( " " );
- rsts.replace( QRegExp("([$`\"\\\\])"), "\\\\1" );
+ rsts.replace( TQRegExp("([$`\"\\\\])"), "\\\\1" );
} else if (state.current == dollarquote) {
rsts = rst.join( " " );
- rsts.replace( QRegExp("(['\\\\])"), "\\\\1" );
+ rsts.replace( TQRegExp("(['\\\\])"), "\\\\1" );
} else if (state.current == singlequote) {
rsts = rst.join( " " );
rsts.replace( '\'', "'\\''");
@@ -139,14 +139,14 @@ bool KMacroExpanderBase::expandMacrosShellQuote( QString &str, uint &pos )
} else {
rsts = "'";
#if 0 // this could pay off if join() would be cleverer and the strings were long
- for (QStringList::Iterator it = rst.begin(); it != rst.end(); ++it)
+ for (TQStringList::Iterator it = rst.begin(); it != rst.end(); ++it)
(*it).replace( '\'', "'\\''" );
rsts += rst.join( "' '" );
#else
- for (QStringList::ConstIterator it = rst.begin(); it != rst.end(); ++it) {
+ for (TQStringList::ConstIterator it = rst.begin(); it != rst.end(); ++it) {
if (it != rst.begin())
rsts += "' '";
- QString trsts( *it );
+ TQString trsts( *it );
trsts.replace( '\'', "'\\''" );
rsts += trsts;
}
@@ -278,16 +278,16 @@ bool KMacroExpanderBase::expandMacrosShellQuote( QString &str, uint &pos )
return sstack.empty();
}
-bool KMacroExpanderBase::expandMacrosShellQuote( QString &str )
+bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str )
{
uint pos = 0;
return expandMacrosShellQuote( str, pos ) && pos == str.length();
}
-int KMacroExpanderBase::expandPlainMacro( const QString &, uint, QStringList & )
+int KMacroExpanderBase::expandPlainMacro( const TQString &, uint, TQStringList & )
{ qFatal( "KMacroExpanderBase::expandPlainMacro called!" ); return 0; }
-int KMacroExpanderBase::expandEscapedMacro( const QString &, uint, QStringList & )
+int KMacroExpanderBase::expandEscapedMacro( const TQString &, uint, TQStringList & )
{ qFatal( "KMacroExpanderBase::expandEscapedMacro called!" ); return 0; }
@@ -297,18 +297,18 @@ template<class KT,class VT>
class KMacroMapExpander : public KMacroExpanderBase {
public:
- KMacroMapExpander( const QMap<KT,VT> &map, QChar c = '%' ) :
+ KMacroMapExpander( const TQMap<KT,VT> &map, TQChar c = '%' ) :
KMacroExpanderBase( c ), macromap( map ) {}
protected:
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
- QMap<KT,VT> macromap;
+ TQMap<KT,VT> macromap;
};
-static QStringList &operator+=( QStringList &s, const QString &n) { s << n; return s; }
+static TQStringList &operator+=( TQStringList &s, const TQString &n) { s << n; return s; }
////////
@@ -321,25 +321,25 @@ isIdentifier( uint c )
////////
template<class VT>
-class KMacroMapExpander<QChar,VT> : public KMacroExpanderBase {
+class KMacroMapExpander<TQChar,VT> : public KMacroExpanderBase {
public:
- KMacroMapExpander( const QMap<QChar,VT> &map, QChar c = '%' ) :
+ KMacroMapExpander( const TQMap<TQChar,VT> &map, TQChar c = '%' ) :
KMacroExpanderBase( c ), macromap( map ) {}
protected:
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
- QMap<QChar,VT> macromap;
+ TQMap<TQChar,VT> macromap;
};
template<class VT>
int
-KMacroMapExpander<QChar,VT>::expandPlainMacro( const QString &str, uint pos, QStringList &ret )
+KMacroMapExpander<TQChar,VT>::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{
- QMapConstIterator<QChar,VT> it = macromap.find(str[pos]);
+ TQMapConstIterator<TQChar,VT> it = macromap.find(str[pos]);
if (it != macromap.end()) {
ret += it.data();
return 1;
@@ -349,13 +349,13 @@ KMacroMapExpander<QChar,VT>::expandPlainMacro( const QString &str, uint pos, QSt
template<class VT>
int
-KMacroMapExpander<QChar,VT>::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KMacroMapExpander<TQChar,VT>::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (str[pos + 1] == escapeChar()) {
- ret += QString( escapeChar() );
+ ret += TQString( escapeChar() );
return 2;
}
- QMapConstIterator<QChar,VT> it = macromap.find(str[pos+1]);
+ TQMapConstIterator<TQChar,VT> it = macromap.find(str[pos+1]);
if (it != macromap.end()) {
ret += it.data();
return 2;
@@ -365,23 +365,23 @@ KMacroMapExpander<QChar,VT>::expandEscapedMacro( const QString &str, uint pos, Q
}
template<class VT>
-class KMacroMapExpander<QString,VT> : public KMacroExpanderBase {
+class KMacroMapExpander<TQString,VT> : public KMacroExpanderBase {
public:
- KMacroMapExpander( const QMap<QString,VT> &map, QChar c = '%' ) :
+ KMacroMapExpander( const TQMap<TQString,VT> &map, TQChar c = '%' ) :
KMacroExpanderBase( c ), macromap( map ) {}
protected:
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
- QMap<QString,VT> macromap;
+ TQMap<TQString,VT> macromap;
};
template<class VT>
int
-KMacroMapExpander<QString,VT>::expandPlainMacro( const QString &str, uint pos, QStringList &ret )
+KMacroMapExpander<TQString,VT>::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (isIdentifier( str[pos - 1].unicode() ))
return 0;
@@ -389,8 +389,8 @@ KMacroMapExpander<QString,VT>::expandPlainMacro( const QString &str, uint pos, Q
for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++);
if (!sl)
return 0;
- QMapConstIterator<QString,VT> it =
- macromap.find( QConstString( str.unicode() + pos, sl ).string() );
+ TQMapConstIterator<TQString,VT> it =
+ macromap.find( TQConstString( str.unicode() + pos, sl ).string() );
if (it != macromap.end()) {
ret += it.data();
return sl;
@@ -400,10 +400,10 @@ KMacroMapExpander<QString,VT>::expandPlainMacro( const QString &str, uint pos, Q
template<class VT>
int
-KMacroMapExpander<QString,VT>::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KMacroMapExpander<TQString,VT>::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (str[pos + 1] == escapeChar()) {
- ret += QString( escapeChar() );
+ ret += TQString( escapeChar() );
return 2;
}
uint sl, rsl, rpos;
@@ -420,8 +420,8 @@ KMacroMapExpander<QString,VT>::expandEscapedMacro( const QString &str, uint pos,
}
if (!sl)
return 0;
- QMapConstIterator<QString,VT> it =
- macromap.find( QConstString( str.unicode() + rpos, sl ).string() );
+ TQMapConstIterator<TQString,VT> it =
+ macromap.find( TQConstString( str.unicode() + rpos, sl ).string() );
if (it != macromap.end()) {
ret += it.data();
return rsl;
@@ -432,7 +432,7 @@ KMacroMapExpander<QString,VT>::expandEscapedMacro( const QString &str, uint pos,
////////////
int
-KCharMacroExpander::expandPlainMacro( const QString &str, uint pos, QStringList &ret )
+KCharMacroExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (expandMacro( str[pos], ret ))
return 1;
@@ -440,10 +440,10 @@ KCharMacroExpander::expandPlainMacro( const QString &str, uint pos, QStringList
}
int
-KCharMacroExpander::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KCharMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (str[pos + 1] == escapeChar()) {
- ret += QString( escapeChar() );
+ ret += TQString( escapeChar() );
return 2;
}
if (expandMacro( str[pos+1], ret ))
@@ -452,7 +452,7 @@ KCharMacroExpander::expandEscapedMacro( const QString &str, uint pos, QStringLis
}
int
-KWordMacroExpander::expandPlainMacro( const QString &str, uint pos, QStringList &ret )
+KWordMacroExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (isIdentifier( str[pos - 1].unicode() ))
return 0;
@@ -460,16 +460,16 @@ KWordMacroExpander::expandPlainMacro( const QString &str, uint pos, QStringList
for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++);
if (!sl)
return 0;
- if (expandMacro( QConstString( str.unicode() + pos, sl ).string(), ret ))
+ if (expandMacro( TQConstString( str.unicode() + pos, sl ).string(), ret ))
return sl;
return 0;
}
int
-KWordMacroExpander::expandEscapedMacro( const QString &str, uint pos, QStringList &ret )
+KWordMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret )
{
if (str[pos + 1] == escapeChar()) {
- ret += QString( escapeChar() );
+ ret += TQString( escapeChar() );
return 2;
}
uint sl, rsl, rpos;
@@ -486,7 +486,7 @@ KWordMacroExpander::expandEscapedMacro( const QString &str, uint pos, QStringLis
}
if (!sl)
return 0;
- if (expandMacro( QConstString( str.unicode() + rpos, sl ).string(), ret ))
+ if (expandMacro( TQConstString( str.unicode() + rpos, sl ).string(), ret ))
return rsl;
return 0;
}
@@ -495,9 +495,9 @@ KWordMacroExpander::expandEscapedMacro( const QString &str, uint pos, QStringLis
template<class KT,class VT>
inline QString
-TexpandMacros( const QString &ostr, const QMap<KT,VT> &map, QChar c )
+TexpandMacros( const TQString &ostr, const TQMap<KT,VT> &map, TQChar c )
{
- QString str( ostr );
+ TQString str( ostr );
KMacroMapExpander<KT,VT> kmx( map, c );
kmx.expandMacros( str );
return str;
@@ -505,25 +505,25 @@ TexpandMacros( const QString &ostr, const QMap<KT,VT> &map, QChar c )
template<class KT,class VT>
inline QString
-TexpandMacrosShellQuote( const QString &ostr, const QMap<KT,VT> &map, QChar c )
+TexpandMacrosShellQuote( const TQString &ostr, const TQMap<KT,VT> &map, TQChar c )
{
- QString str( ostr );
+ TQString str( ostr );
KMacroMapExpander<KT,VT> kmx( map, c );
if (!kmx.expandMacrosShellQuote( str ))
- return QString::null;
+ return TQString::null;
return str;
}
// public API
namespace KMacroExpander {
- QString expandMacros( const QString &ostr, const QMap<QChar,QString> &map, QChar c ) { return TexpandMacros( ostr, map, c ); }
- QString expandMacrosShellQuote( const QString &ostr, const QMap<QChar,QString> &map, QChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
- QString expandMacros( const QString &ostr, const QMap<QString,QString> &map, QChar c ) { return TexpandMacros( ostr, map, c ); }
- QString expandMacrosShellQuote( const QString &ostr, const QMap<QString,QString> &map, QChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
- QString expandMacros( const QString &ostr, const QMap<QChar,QStringList> &map, QChar c ) { return TexpandMacros( ostr, map, c ); }
- QString expandMacrosShellQuote( const QString &ostr, const QMap<QChar,QStringList> &map, QChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
- QString expandMacros( const QString &ostr, const QMap<QString,QStringList> &map, QChar c ) { return TexpandMacros( ostr, map, c ); }
- QString expandMacrosShellQuote( const QString &ostr, const QMap<QString,QStringList> &map, QChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
+ TQString expandMacros( const TQString &ostr, const TQMap<TQChar,TQString> &map, TQChar c ) { return TexpandMacros( ostr, map, c ); }
+ TQString expandMacrosShellQuote( const TQString &ostr, const TQMap<TQChar,TQString> &map, TQChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
+ TQString expandMacros( const TQString &ostr, const TQMap<TQString,TQString> &map, TQChar c ) { return TexpandMacros( ostr, map, c ); }
+ TQString expandMacrosShellQuote( const TQString &ostr, const TQMap<TQString,TQString> &map, TQChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
+ TQString expandMacros( const TQString &ostr, const TQMap<TQChar,TQStringList> &map, TQChar c ) { return TexpandMacros( ostr, map, c ); }
+ TQString expandMacrosShellQuote( const TQString &ostr, const TQMap<TQChar,TQStringList> &map, TQChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
+ TQString expandMacros( const TQString &ostr, const TQMap<TQString,TQStringList> &map, TQChar c ) { return TexpandMacros( ostr, map, c ); }
+ TQString expandMacrosShellQuote( const TQString &ostr, const TQMap<TQString,TQStringList> &map, TQChar c ) { return TexpandMacrosShellQuote( ostr, map, c ); }
} // namespace
diff --git a/kdecore/kmacroexpander.h b/kdecore/kmacroexpander.h
index deb12e284..226264990 100644
--- a/kdecore/kmacroexpander.h
+++ b/kdecore/kmacroexpander.h
@@ -22,9 +22,9 @@
#ifndef _KMACROEXPANDER_H
#define _KMACROEXPANDER_H
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include "kdelibs_export.h"
/**
@@ -39,9 +39,9 @@ class KDECORE_EXPORT KMacroExpanderBase {
public:
/**
* Constructor.
- * @param c escape char indicating start of macros, or QChar::null for none
+ * @param c escape char indicating start of macros, or TQChar::null for none
*/
- KMacroExpanderBase( QChar c = '%' );
+ KMacroExpanderBase( TQChar c = '%' );
/**
* Destructor.
@@ -53,7 +53,7 @@ public:
*
* @param str the string in which macros are expanded in-place
*/
- void expandMacros( QString &str );
+ void expandMacros( TQString &str );
/*
* Perform safe macro expansion (substitution) on a string for use
@@ -83,30 +83,30 @@ public:
* or brace outside any shell construct is @em not an error (unlike in
* the function below), but still prematurely terminates processing.
*/
- bool expandMacrosShellQuote( QString &str, uint &pos );
+ bool expandMacrosShellQuote( TQString &str, uint &pos );
/**
* Same as above, but always starts at position 0, and unmatched closing
* parens and braces are treated as errors.
*/
- bool expandMacrosShellQuote( QString &str );
+ bool expandMacrosShellQuote( TQString &str );
/**
* Set the macro escape character.
- * @param c escape char indicating start of macros, or QChar::null if none
+ * @param c escape char indicating start of macros, or TQChar::null if none
*/
- void setEscapeChar( QChar c );
+ void setEscapeChar( TQChar c );
/**
* Obtain the macro escape character.
- * @return escape char indicating start of macros, or QChar::null if none
+ * @return escape char indicating start of macros, or TQChar::null if none
*/
- QChar escapeChar() const;
+ TQChar escapeChar() const;
protected:
/**
* This function is called for every single char within the string if
- * the escape char is QChar::null. It should determine whether the
+ * the escape char is TQChar::null. It should determine whether the
* string starting at @p pos within @p str is a valid macro and return
* the substitution value for it if so.
* @param str the input string
@@ -117,11 +117,11 @@ protected:
* than zero, subtract this value from @p pos (to skip a macro, i.e.,
* substitute it with itself). zero requests no special action.
*/
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
/**
* This function is called every time the escape char is found if it is
- * not QChar::null. It should determine whether the
+ * not TQChar::null. It should determine whether the
* string starting at @p pos witin @p str is a valid macro and return
* the substitution value for it if so.
* @param str the input string
@@ -133,10 +133,10 @@ protected:
* than zero, subtract this value from @p pos (to skip a macro, i.e.,
* substitute it with itself). zero requests no special action.
*/
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
private:
- QChar escapechar;
+ TQChar escapechar;
};
/**
@@ -150,7 +150,7 @@ private:
* class MyClass {
* ...
* private:
- * QString m_str;
+ * TQString m_str;
* ...
* friend class MyExpander;
* };
@@ -159,12 +159,12 @@ private:
* public:
* MyExpander( MyClass *_that ) : KWordMacroExpander(), that( _that ) {}
* protected:
- * virtual bool expandMacro( const QString &str, QStringList &ret );
+ * virtual bool expandMacro( const TQString &str, TQStringList &ret );
* private:
* MyClass *that;
* };
*
- * bool MyExpander::expandMacro( const QString &str, QStringList &ret )
+ * bool MyExpander::expandMacro( const TQString &str, TQStringList &ret )
* {
* if (str == "macro") {
* ret += complexOperation( that->m_str );
@@ -175,7 +175,7 @@ private:
*
* ... MyClass::...(...)
* {
- * QString str;
+ * TQString str;
* ...
* MyExpander mx( this );
* mx.expandMacrosShellQuote( str );
@@ -193,13 +193,13 @@ class KDECORE_EXPORT KWordMacroExpander : public KMacroExpanderBase {
public:
/**
* Constructor.
- * @param c escape char indicating start of macros, or QChar::null for none
+ * @param c escape char indicating start of macros, or TQChar::null for none
*/
- KWordMacroExpander( QChar c = '%' ) : KMacroExpanderBase( c ) {}
+ KWordMacroExpander( TQChar c = '%' ) : KMacroExpanderBase( c ) {}
protected:
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
/**
* Return substitution list @p ret for string macro @p str.
@@ -208,7 +208,7 @@ protected:
* when expandMacro is entered.
* @return @c true iff @p chr was a recognized macro name
*/
- virtual bool expandMacro( const QString &str, QStringList &ret ) = 0;
+ virtual bool expandMacro( const TQString &str, TQStringList &ret ) = 0;
};
/**
@@ -226,13 +226,13 @@ class KDECORE_EXPORT KCharMacroExpander : public KMacroExpanderBase {
public:
/**
* Constructor.
- * @param c escape char indicating start of macros, or QChar::null for none
+ * @param c escape char indicating start of macros, or TQChar::null for none
*/
- KCharMacroExpander( QChar c = '%' ) : KMacroExpanderBase( c ) {}
+ KCharMacroExpander( TQChar c = '%' ) : KMacroExpanderBase( c ) {}
protected:
- virtual int expandPlainMacro( const QString &str, uint pos, QStringList &ret );
- virtual int expandEscapedMacro( const QString &str, uint pos, QStringList &ret );
+ virtual int expandPlainMacro( const TQString &str, uint pos, TQStringList &ret );
+ virtual int expandEscapedMacro( const TQString &str, uint pos, TQStringList &ret );
/**
* Return substitution list @p ret for single-character macro @p chr.
@@ -241,7 +241,7 @@ protected:
* when expandMacro is entered.
* @return @c true iff @p chr was a recognized macro name
*/
- virtual bool expandMacro( QChar chr, QStringList &ret ) = 0;
+ virtual bool expandMacro( TQChar chr, TQStringList &ret ) = 0;
};
/**
@@ -257,20 +257,20 @@ namespace KMacroExpander {
*
* @param str The string to expand
* @param map map with substitutions
- * @param c escape char indicating start of macro, or QChar::null if none
+ * @param c escape char indicating start of macro, or TQChar::null if none
* @return the string with all valid macros expanded
*
* \code
* // Code example
- * QMap<QChar,QString> map;
+ * TQMap<TQChar,TQString> map;
* map.insert('u', "/tmp/myfile.txt");
* map.insert('n', "My File");
- * QString s = "%% Title: %u:%n";
+ * TQString s = "%% Title: %u:%n";
* s = KMacroExpander::expandMacros(s, map);
* // s is now "% Title: /tmp/myfile.txt:My File";
* \endcode
*/
- KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QChar,QString> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQChar,TQString> &map, TQChar c = '%' );
/**
* Perform safe macro expansion (substitution) on a string for use
@@ -280,22 +280,22 @@ namespace KMacroExpander {
*
* @param str The string to expand
* @param map map with substitutions
- * @param c escape char indicating start of macro, or QChar::null if none
+ * @param c escape char indicating start of macro, or TQChar::null if none
* @return the string with all valid macros expanded, or a null string
* if a shell syntax error was detected in the command
*
* \code
* // Code example
- * QMap<QChar,QString> map;
+ * TQMap<TQChar,TQString> map;
* map.insert('u', "/tmp/myfile.txt");
* map.insert('n', "My File");
- * QString s = "kedit --caption %n %u";
+ * TQString s = "kedit --caption %n %u";
* s = KMacroExpander::expandMacrosShellQuote(s, map);
* // s is now "kedit --caption 'My File' '/tmp/myfile.txt'";
- * system(QFile::encodeName(s));
+ * system(TQFile::encodeName(s));
* \endcode
*/
- KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QChar,QString> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQChar,TQString> &map, TQChar c = '%' );
/**
* Perform safe macro expansion (substitution) on a string.
@@ -307,20 +307,20 @@ namespace KMacroExpander {
*
* @param str The string to expand
* @param map map with substitutions
- * @param c escape char indicating start of macro, or QChar::null if none
+ * @param c escape char indicating start of macro, or TQChar::null if none
* @return the string with all valid macros expanded
*
* \code
* // Code example
- * QMap<QString,QString> map;
+ * TQMap<TQString,TQString> map;
* map.insert("url", "/tmp/myfile.txt");
* map.insert("name", "My File");
- * QString s = "Title: %{url}-%name";
+ * TQString s = "Title: %{url}-%name";
* s = KMacroExpander::expandMacros(s, map);
* // s is now "Title: /tmp/myfile.txt-My File";
* \endcode
*/
- KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QString,QString> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQString,TQString> &map, TQChar c = '%' );
/**
* Perform safe macro expansion (substitution) on a string for use
@@ -333,33 +333,33 @@ namespace KMacroExpander {
*
* @param str The string to expand
* @param map map with substitutions
- * @param c escape char indicating start of macro, or QChar::null if none
+ * @param c escape char indicating start of macro, or TQChar::null if none
* @return the string with all valid macros expanded, or a null string
* if a shell syntax error was detected in the command
*
* \code
* // Code example
- * QMap<QString,QString> map;
+ * TQMap<TQString,TQString> map;
* map.insert("url", "/tmp/myfile.txt");
* map.insert("name", "My File");
- * QString s = "kedit --caption %name %{url}";
+ * TQString s = "kedit --caption %name %{url}";
* s = KMacroExpander::expandMacrosShellQuote(s, map);
* // s is now "kedit --caption 'My File' '/tmp/myfile.txt'";
- * system(QFile::encodeName(s));
+ * system(TQFile::encodeName(s));
* \endcode
*/
- KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QString,QString> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQString,TQString> &map, TQChar c = '%' );
/**
* Same as above, except that the macros expand to string lists that
* are simply join(" ")ed together.
*/
- KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QChar,QStringList> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQChar,TQStringList> &map, TQChar c = '%' );
/**
* Same as above, except that the macros expand to string lists that
* are simply join(" ")ed together.
*/
- KDECORE_EXPORT QString expandMacros( const QString &str, const QMap<QString,QStringList> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacros( const TQString &str, const TQMap<TQString,TQStringList> &map, TQChar c = '%' );
/**
* Same as above, except that the macros expand to string lists.
@@ -367,14 +367,14 @@ namespace KMacroExpander {
* join(" ")ed together; otherwise every element expands to a separate
* quoted string.
*/
- KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QChar,QStringList> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQChar,TQStringList> &map, TQChar c = '%' );
/**
* Same as above, except that the macros expand to string lists.
* If the macro appears inside a quoted string, the list is simply
* join(" ")ed together; otherwise every element expands to a separate
* quoted string.
*/
- KDECORE_EXPORT QString expandMacrosShellQuote( const QString &str, const QMap<QString,QStringList> &map, QChar c = '%' );
+ KDECORE_EXPORT TQString expandMacrosShellQuote( const TQString &str, const TQMap<TQString,TQStringList> &map, TQChar c = '%' );
}
#endif /* _KMACROEXPANDER_H */
diff --git a/kdecore/kmanagerselection.cpp b/kdecore/kmanagerselection.cpp
index f82df9ff1..b88990dbf 100644
--- a/kdecore/kmanagerselection.cpp
+++ b/kdecore/kmanagerselection.cpp
@@ -40,13 +40,13 @@ DEALINGS IN THE SOFTWARE.
#include <unistd.h>
#endif
-#include <qobject.h>
+#include <tqobject.h>
#ifdef Q_WS_X11 // FIXME(E)
#include "kmanagerselection.h"
#include <kdebug.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kxerrorhandler.h>
#include <X11/Xatom.h>
@@ -73,8 +73,8 @@ bool KSelectionOwnerPrivate::x11Event( XEvent* ev_P )
return owner->filterEvent( ev_P );
}
-KSelectionOwner::KSelectionOwner( Atom selection_P, int screen_P, QObject* parent_P )
- : QObject( parent_P ),
+KSelectionOwner::KSelectionOwner( Atom selection_P, int screen_P, TQObject* parent_P )
+ : TQObject( parent_P ),
selection( selection_P ),
screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
window( None ),
@@ -84,8 +84,8 @@ KSelectionOwner::KSelectionOwner( Atom selection_P, int screen_P, QObject* paren
{
}
-KSelectionOwner::KSelectionOwner( const char* selection_P, int screen_P, QObject* parent_P )
- : QObject( parent_P ),
+KSelectionOwner::KSelectionOwner( const char* selection_P, int screen_P, TQObject* parent_P )
+ : TQObject( parent_P ),
selection( XInternAtom( qt_xdisplay(), selection_P, False )),
screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
window( None ),
@@ -390,8 +390,8 @@ bool KSelectionWatcherPrivate::x11Event( XEvent* ev_P )
}
-KSelectionWatcher::KSelectionWatcher( Atom selection_P, int screen_P, QObject* parent_P )
- : QObject( parent_P ),
+KSelectionWatcher::KSelectionWatcher( Atom selection_P, int screen_P, TQObject* parent_P )
+ : TQObject( parent_P ),
selection( selection_P ),
screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
selection_owner( None ),
@@ -400,8 +400,8 @@ KSelectionWatcher::KSelectionWatcher( Atom selection_P, int screen_P, QObject* p
init();
}
-KSelectionWatcher::KSelectionWatcher( const char* selection_P, int screen_P, QObject* parent_P )
- : QObject( parent_P ),
+KSelectionWatcher::KSelectionWatcher( const char* selection_P, int screen_P, TQObject* parent_P )
+ : TQObject( parent_P ),
selection( XInternAtom( qt_xdisplay(), selection_P, False )),
screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
selection_owner( None ),
diff --git a/kdecore/kmanagerselection.h b/kdecore/kmanagerselection.h
index 9b277b998..b6aefd9db 100644
--- a/kdecore/kmanagerselection.h
+++ b/kdecore/kmanagerselection.h
@@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE.
#ifndef __KMANAGERSELECTION_H
#define __KMANAGERSELECTION_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdelibs_export.h>
#ifdef Q_WS_X11 // FIXME(E)
@@ -56,7 +56,7 @@ class KDECORE_EXPORT KSelectionOwner
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionOwner( Atom selection, int screen = -1, QObject* parent = NULL );
+ KSelectionOwner( Atom selection, int screen = -1, TQObject* parent = NULL );
/**
* @overload
* This constructor accepts the selection name and creates the appropriate atom
@@ -66,7 +66,7 @@ class KDECORE_EXPORT KSelectionOwner
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionOwner( const char* selection, int screen = -1, QObject* parent = NULL );
+ KSelectionOwner( const char* selection, int screen = -1, TQObject* parent = NULL );
/**
* Destructor. Calls release().
*/
@@ -179,7 +179,7 @@ class KDECORE_EXPORT KSelectionWatcher
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionWatcher( Atom selection, int screen = -1, QObject* parent = NULL );
+ KSelectionWatcher( Atom selection, int screen = -1, TQObject* parent = NULL );
/**
* @overload
* This constructor accepts the selection name and creates the appropriate atom
@@ -189,7 +189,7 @@ class KDECORE_EXPORT KSelectionWatcher
* @param screen X screen, or -1 for default
* @param parent parent object, or NULL if there is none
*/
- KSelectionWatcher( const char* selection, int screen = -1, QObject* parent = NULL );
+ KSelectionWatcher( const char* selection, int screen = -1, TQObject* parent = NULL );
virtual ~KSelectionWatcher();
/**
* Return the current owner of the manager selection, if any.
diff --git a/kdecore/kmdcodec.cpp b/kdecore/kmdcodec.cpp
index 10fca9307..76c80d329 100644
--- a/kdecore/kmdcodec.cpp
+++ b/kdecore/kmdcodec.cpp
@@ -151,24 +151,24 @@ static int rikFindChar(register const char * _s, const char c)
return s - _s;
}
-QCString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF)
+TQCString KCodecs::quotedPrintableEncode(const TQByteArray& in, bool useCRLF)
{
- QByteArray out;
+ TQByteArray out;
quotedPrintableEncode (in, out, useCRLF);
- return QCString (out.data(), out.size()+1);
+ return TQCString (out.data(), out.size()+1);
}
-QCString KCodecs::quotedPrintableEncode(const QCString& str, bool useCRLF)
+TQCString KCodecs::quotedPrintableEncode(const TQCString& str, bool useCRLF)
{
if (str.isEmpty())
return "";
- QByteArray in (str.length());
+ TQByteArray in (str.length());
memcpy (in.data(), str.data(), str.length());
return quotedPrintableEncode(in, useCRLF);
}
-void KCodecs::quotedPrintableEncode(const QByteArray& in, QByteArray& out, bool useCRLF)
+void KCodecs::quotedPrintableEncode(const TQByteArray& in, TQByteArray& out, bool useCRLF)
{
out.resize (0);
if (in.isEmpty())
@@ -284,24 +284,24 @@ void KCodecs::quotedPrintableEncode(const QByteArray& in, QByteArray& out, bool
out.truncate(cursor - out.data());
}
-QCString KCodecs::quotedPrintableDecode(const QByteArray & in)
+TQCString KCodecs::quotedPrintableDecode(const TQByteArray & in)
{
- QByteArray out;
+ TQByteArray out;
quotedPrintableDecode (in, out);
- return QCString (out.data(), out.size()+1);
+ return TQCString (out.data(), out.size()+1);
}
-QCString KCodecs::quotedPrintableDecode(const QCString & str)
+TQCString KCodecs::quotedPrintableDecode(const TQCString & str)
{
if (str.isEmpty())
return "";
- QByteArray in (str.length());
+ TQByteArray in (str.length());
memcpy (in.data(), str.data(), str.length());
return quotedPrintableDecode (in);
}
-void KCodecs::quotedPrintableDecode(const QByteArray& in, QByteArray& out)
+void KCodecs::quotedPrintableDecode(const TQByteArray& in, TQByteArray& out)
{
// clear out the output buffer
out.resize (0);
@@ -359,24 +359,24 @@ void KCodecs::quotedPrintableDecode(const QByteArray& in, QByteArray& out)
out.truncate(cursor - out.data());
}
-QCString KCodecs::base64Encode( const QCString& str, bool insertLFs )
+TQCString KCodecs::base64Encode( const TQCString& str, bool insertLFs )
{
if ( str.isEmpty() )
return "";
- QByteArray in (str.length());
+ TQByteArray in (str.length());
memcpy( in.data(), str.data(), str.length() );
return base64Encode( in, insertLFs );
}
-QCString KCodecs::base64Encode( const QByteArray& in, bool insertLFs )
+TQCString KCodecs::base64Encode( const TQByteArray& in, bool insertLFs )
{
- QByteArray out;
+ TQByteArray out;
base64Encode( in, out, insertLFs );
- return QCString( out.data(), out.size()+1 );
+ return TQCString( out.data(), out.size()+1 );
}
-void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
+void KCodecs::base64Encode( const TQByteArray& in, TQByteArray& out,
bool insertLFs )
{
// clear out the output buffer
@@ -448,24 +448,24 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
}
}
-QCString KCodecs::base64Decode( const QCString& str )
+TQCString KCodecs::base64Decode( const TQCString& str )
{
if ( str.isEmpty() )
return "";
- QByteArray in( str.length() );
+ TQByteArray in( str.length() );
memcpy( in.data(), str.data(), str.length() );
return base64Decode( in );
}
-QCString KCodecs::base64Decode( const QByteArray& in )
+TQCString KCodecs::base64Decode( const TQByteArray& in )
{
- QByteArray out;
+ TQByteArray out;
base64Decode( in, out );
- return QCString( out.data(), out.size()+1 );
+ return TQCString( out.data(), out.size()+1 );
}
-void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
+void KCodecs::base64Decode( const TQByteArray& in, TQByteArray& out )
{
out.resize(0);
if ( in.isEmpty() )
@@ -549,25 +549,25 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
out.resize(len);
}
-QCString KCodecs::uuencode( const QCString& str )
+TQCString KCodecs::uuencode( const TQCString& str )
{
if ( str.isEmpty() )
return "";
- QByteArray in;
+ TQByteArray in;
in.resize( str.length() );
memcpy( in.data(), str.data(), str.length() );
return uuencode( in );
}
-QCString KCodecs::uuencode( const QByteArray& in )
+TQCString KCodecs::uuencode( const TQByteArray& in )
{
- QByteArray out;
+ TQByteArray out;
uuencode( in, out );
- return QCString( out.data(), out.size()+1 );
+ return TQCString( out.data(), out.size()+1 );
}
-void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
+void KCodecs::uuencode( const TQByteArray& in, TQByteArray& out )
{
out.resize( 0 );
if( in.isEmpty() )
@@ -646,25 +646,25 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
out.resize( 0 );
}
-QCString KCodecs::uudecode( const QCString& str )
+TQCString KCodecs::uudecode( const TQCString& str )
{
if ( str.isEmpty() )
return "";
- QByteArray in;
+ TQByteArray in;
in.resize( str.length() );
memcpy( in.data(), str.data(), str.length() );
return uudecode( in );
}
-QCString KCodecs::uudecode( const QByteArray& in )
+TQCString KCodecs::uudecode( const TQByteArray& in )
{
- QByteArray out;
+ TQByteArray out;
uudecode( in, out );
- return QCString( out.data(), out.size()+1 );
+ return TQCString( out.data(), out.size()+1 );
}
-void KCodecs::uudecode( const QByteArray& in, QByteArray& out )
+void KCodecs::uudecode( const TQByteArray& in, TQByteArray& out )
{
out.resize( 0 );
if( in.isEmpty() )
@@ -762,24 +762,24 @@ KMD5::KMD5(const char *in, int len)
update(in, len);
}
-KMD5::KMD5(const QByteArray& in)
+KMD5::KMD5(const TQByteArray& in)
{
init();
update( in );
}
-KMD5::KMD5(const QCString& in)
+KMD5::KMD5(const TQCString& in)
{
init();
update( in );
}
-void KMD5::update(const QByteArray& in)
+void KMD5::update(const TQByteArray& in)
{
update(in.data(), int(in.size()));
}
-void KMD5::update(const QCString& in)
+void KMD5::update(const TQCString& in)
{
update(in.data(), int(in.length()));
}
@@ -827,7 +827,7 @@ void KMD5::update(const unsigned char* in, int len)
memcpy(m_buffer+buffer_index, in+in_index, in_length-in_index);
}
-bool KMD5::update(QIODevice& file)
+bool KMD5::update(TQIODevice& file)
{
char buffer[1024];
int len;
@@ -880,7 +880,7 @@ bool KMD5::verify( const KMD5::Digest& digest)
return (0 == memcmp(rawDigest(), digest, sizeof(KMD5::Digest)));
}
-bool KMD5::verify( const QCString& hexdigest)
+bool KMD5::verify( const TQCString& hexdigest)
{
finalize();
return (0 == strcmp(hexDigest().data(), hexdigest));
@@ -899,9 +899,9 @@ void KMD5::rawDigest( KMD5::Digest& bin )
}
-QCString KMD5::hexDigest()
+TQCString KMD5::hexDigest()
{
- QCString s(33);
+ TQCString s(33);
finalize();
sprintf(s.data(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
@@ -912,7 +912,7 @@ QCString KMD5::hexDigest()
return s;
}
-void KMD5::hexDigest(QCString& s)
+void KMD5::hexDigest(TQCString& s)
{
finalize();
s.resize(33);
@@ -922,9 +922,9 @@ void KMD5::hexDigest(QCString& s)
m_digest[12], m_digest[13], m_digest[14], m_digest[15]);
}
-QCString KMD5::base64Digest()
+TQCString KMD5::base64Digest()
{
- QByteArray ba(16);
+ TQByteArray ba(16);
finalize();
memcpy(ba.data(), m_digest, 16);
@@ -1151,24 +1151,24 @@ KMD4::KMD4(const char *in, int len)
update(in, len);
}
-KMD4::KMD4(const QByteArray& in)
+KMD4::KMD4(const TQByteArray& in)
{
init();
update( in );
}
-KMD4::KMD4(const QCString& in)
+KMD4::KMD4(const TQCString& in)
{
init();
update( in );
}
-void KMD4::update(const QByteArray& in)
+void KMD4::update(const TQByteArray& in)
{
update(in.data(), int(in.size()));
}
-void KMD4::update(const QCString& in)
+void KMD4::update(const TQCString& in)
{
update(in.data(), int(in.length()));
}
@@ -1235,7 +1235,7 @@ void KMD4::update(const unsigned char *in, int len)
memcpy (m_buffer, in, len);
}
-bool KMD4::update(QIODevice& file)
+bool KMD4::update(TQIODevice& file)
{
char buffer[1024];
int len;
@@ -1303,7 +1303,7 @@ bool KMD4::verify( const KMD4::Digest& digest)
return (0 == memcmp(rawDigest(), digest, sizeof(KMD4::Digest)));
}
-bool KMD4::verify( const QCString& hexdigest)
+bool KMD4::verify( const TQCString& hexdigest)
{
finalize();
return (0 == strcmp(hexDigest().data(), hexdigest));
@@ -1321,9 +1321,9 @@ void KMD4::rawDigest( KMD4::Digest& bin )
memcpy( bin, m_digest, 16 );
}
-QCString KMD4::hexDigest()
+TQCString KMD4::hexDigest()
{
- QCString s(33);
+ TQCString s(33);
finalize();
sprintf(s.data(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
@@ -1334,7 +1334,7 @@ QCString KMD4::hexDigest()
return s;
}
-void KMD4::hexDigest(QCString& s)
+void KMD4::hexDigest(TQCString& s)
{
finalize();
s.resize(33);
@@ -1344,9 +1344,9 @@ void KMD4::hexDigest(QCString& s)
m_digest[12], m_digest[13], m_digest[14], m_digest[15]);
}
-QCString KMD4::base64Digest()
+TQCString KMD4::base64Digest()
{
- QByteArray ba(16);
+ TQByteArray ba(16);
finalize();
memcpy(ba.data(), m_digest, 16);
diff --git a/kdecore/kmdcodec.h b/kdecore/kmdcodec.h
index 7b1023393..ef1d49d1e 100644
--- a/kdecore/kmdcodec.h
+++ b/kdecore/kmdcodec.h
@@ -36,9 +36,9 @@
#define KBase64 KCodecs
-#include <qglobal.h>
-#include <qstring.h>
-#include <qiodevice.h>
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqiodevice.h>
#include "kdelibs_export.h"
/**
@@ -50,8 +50,8 @@
* \b Usage:
*
* \code
- * QCString input = "Aladdin:open sesame";
- * QCString result = KCodecs::base64Encode(input);
+ * TQCString input = "Aladdin:open sesame";
+ * TQCString result = KCodecs::base64Encode(input);
* cout << "Result: " << result.data() << endl;
* \endcode
*
@@ -64,7 +64,7 @@
* (ones that accept/return null-terminated strings) to encode/decode
* a string. If what you need is to encode or decode binary data, then
* it is highly recommended that you use the functions that take an input
- * and output QByteArray as arguments. These functions are specifically
+ * and output TQByteArray as arguments. These functions are specifically
* tailored for encoding and decoding binary data.
*
* @short A collection of commonly used encoding and decoding algorithms.
@@ -84,7 +84,7 @@ public:
* breaks, too.
* @return quoted-printable encoded string.
*/
- static QCString quotedPrintableEncode(const QByteArray & in,
+ static TQCString quotedPrintableEncode(const TQByteArray & in,
bool useCRLF = true);
/**
@@ -99,7 +99,7 @@ public:
* breaks, too.
* @return quoted-printable encoded string.
*/
- static QCString quotedPrintableEncode(const QCString & str,
+ static TQCString quotedPrintableEncode(const TQCString & str,
bool useCRLF = true);
/**
@@ -120,7 +120,7 @@ public:
* CRLF line breaks and the output will have CRLF line
* breaks, too.
*/
- static void quotedPrintableEncode(const QByteArray & in, QByteArray& out,
+ static void quotedPrintableEncode(const TQByteArray & in, TQByteArray& out,
bool useCRLF);
/**
@@ -131,7 +131,7 @@ public:
* @param in data to be decoded.
* @return decoded string.
*/
- static QCString quotedPrintableDecode(const QByteArray & in);
+ static TQCString quotedPrintableDecode(const TQByteArray & in);
/**
* @overload
@@ -142,7 +142,7 @@ public:
* @param str string to be decoded.
* @return decoded string.
*/
- static QCString quotedPrintableDecode(const QCString & str);
+ static TQCString quotedPrintableDecode(const TQCString & str);
/**
* Decodes a quoted-printable encoded data.
@@ -161,7 +161,7 @@ public:
* @param in data to be decoded.
* @param out decoded data.
*/
- static void quotedPrintableDecode(const QByteArray & in, QByteArray& out);
+ static void quotedPrintableDecode(const TQByteArray & in, TQByteArray& out);
/**
@@ -175,7 +175,7 @@ public:
* @param in data to be uuencoded
* @return uuencoded string.
*/
- static QCString uuencode( const QByteArray& in );
+ static TQCString uuencode( const TQByteArray& in );
/**
* @overload
@@ -186,7 +186,7 @@ public:
* @param str string to be uuencoded.
* @return encoded string.
*/
- static QCString uuencode( const QCString& str );
+ static TQCString uuencode( const TQCString& str );
/**
* Encodes the given data using the uuencode algorithm.
@@ -203,7 +203,7 @@ public:
* @param in data to be uuencoded.
* @param out uudecoded data.
*/
- static void uuencode( const QByteArray& in, QByteArray& out );
+ static void uuencode( const TQByteArray& in, TQByteArray& out );
/**
* Decodes the given data using the uudecode algorithm.
@@ -215,7 +215,7 @@ public:
* @param in data to be decoded.
* @return decoded string.
*/
- static QCString uudecode( const QByteArray& in );
+ static TQCString uudecode( const TQByteArray& in );
/**
* @overload
@@ -226,7 +226,7 @@ public:
* @param str string to be decoded.
* @return uudecoded string.
*/
- static QCString uudecode( const QCString& str );
+ static TQCString uudecode( const TQCString& str );
/**
* Decodes the given data using the uudecode algorithm.
@@ -247,7 +247,7 @@ public:
* @param in data to be decoded.
* @param out uudecoded data.
*/
- static void uudecode( const QByteArray& in, QByteArray& out );
+ static void uudecode( const TQByteArray& in, TQByteArray& out );
/**
@@ -263,7 +263,7 @@ public:
*
* @return base64 encoded string.
*/
- static QCString base64Encode( const QByteArray& in, bool insertLFs = false);
+ static TQCString base64Encode( const TQByteArray& in, bool insertLFs = false);
/**
* @overload
@@ -275,7 +275,7 @@ public:
* @param insertLFs limit the number of characters per line.
* @return decoded string.
*/
- static QCString base64Encode( const QCString& str, bool insertLFs = false );
+ static TQCString base64Encode( const TQCString& str, bool insertLFs = false );
/**
* Encodes the given data using the base64 algorithm.
@@ -298,7 +298,7 @@ public:
* @param out encoded data.
* @param insertLFs limit the number of characters per line.
*/
- static void base64Encode( const QByteArray& in, QByteArray& out,
+ static void base64Encode( const TQByteArray& in, TQByteArray& out,
bool insertLFs = false );
/**
@@ -308,7 +308,7 @@ public:
* @param in data to be decoded.
* @return decoded string.
*/
- static QCString base64Decode( const QByteArray& in );
+ static TQCString base64Decode( const TQByteArray& in );
/**
* @overload
@@ -319,7 +319,7 @@ public:
* @param str string to be decoded.
* @return decoded string.
*/
- static QCString base64Decode( const QCString& str );
+ static TQCString base64Decode( const TQCString& str );
/**
* Decodes the given data that was encoded with the base64
@@ -338,7 +338,7 @@ public:
* @param in data to be decoded.
* @param out decoded data.
*/
- static void base64Decode( const QByteArray& in, QByteArray& out );
+ static void base64Decode( const TQByteArray& in, TQByteArray& out );
private:
@@ -420,16 +420,16 @@ public:
/**
* @overload
*
- * Same as above except it accepts a QByteArray as its argument.
+ * Same as above except it accepts a TQByteArray as its argument.
*/
- KMD5(const QByteArray& a );
+ KMD5(const TQByteArray& a );
/**
* @overload
*
- * Same as above except it accepts a QCString as its argument.
+ * Same as above except it accepts a TQCString as its argument.
*/
- KMD5(const QCString& a );
+ KMD5(const TQCString& a );
/**
* Updates the message to be digested. Be sure to add all data
@@ -449,21 +449,21 @@ public:
/**
* @overload
*
- * @param in message to be added to the digest (QByteArray).
+ * @param in message to be added to the digest (TQByteArray).
*/
- void update(const QByteArray& in );
+ void update(const TQByteArray& in );
/**
* @overload
*
- * @param in message to be added to the digest (QCString).
+ * @param in message to be added to the digest (TQCString).
*/
- void update(const QCString& in );
+ void update(const TQCString& in );
/**
* @overload
*
- * reads the data from an I/O device, i.e. from a file (QFile).
+ * reads the data from an I/O device, i.e. from a file (TQFile).
*
* NOTE that the file must be open for reading.
*
@@ -471,7 +471,7 @@ public:
*
* @returns false if an error occurred during reading.
*/
- bool update(QIODevice& file);
+ bool update(TQIODevice& file);
/**
* Calling this function will reset the calculated message digest.
@@ -500,18 +500,18 @@ public:
* Returns the value of the calculated message digest in
* a hexadecimal representation.
*/
- QCString hexDigest ();
+ TQCString hexDigest ();
/**
* @overload
*/
- void hexDigest(QCString&);
+ void hexDigest(TQCString&);
/**
* Returns the value of the calculated message digest in
* a base64-encoded representation.
*/
- QCString base64Digest ();
+ TQCString base64Digest ();
/**
* returns true if the calculated digest for the given
@@ -522,7 +522,7 @@ public:
/**
* @overload
*/
- bool verify(const QCString&);
+ bool verify(const TQCString&);
protected:
/**
@@ -595,16 +595,16 @@ public:
/**
* @overload
*
- * Same as above except it accepts a QByteArray as its argument.
+ * Same as above except it accepts a TQByteArray as its argument.
*/
- KMD4(const QByteArray& a );
+ KMD4(const TQByteArray& a );
/**
* @overload
*
- * Same as above except it accepts a QCString as its argument.
+ * Same as above except it accepts a TQCString as its argument.
*/
- KMD4(const QCString& a );
+ KMD4(const TQCString& a );
/**
* Updates the message to be digested. Be sure to add all data
@@ -624,21 +624,21 @@ public:
/**
* @overload
*
- * @param in message to be added to the digest (QByteArray).
+ * @param in message to be added to the digest (TQByteArray).
*/
- void update(const QByteArray& in );
+ void update(const TQByteArray& in );
/**
* @overload
*
- * @param in message to be added to the digest (QCString).
+ * @param in message to be added to the digest (TQCString).
*/
- void update(const QCString& in );
+ void update(const TQCString& in );
/**
* @overload
*
- * reads the data from an I/O device, i.e. from a file (QFile).
+ * reads the data from an I/O device, i.e. from a file (TQFile).
*
* NOTE that the file must be open for reading.
*
@@ -646,7 +646,7 @@ public:
*
* @returns false if an error occurred during reading.
*/
- bool update(QIODevice& file);
+ bool update(TQIODevice& file);
/**
* Calling this function will reset the calculated message digest.
@@ -675,18 +675,18 @@ public:
* Returns the value of the calculated message digest in
* a hexadecimal representation.
*/
- QCString hexDigest ();
+ TQCString hexDigest ();
/**
* @overload
*/
- void hexDigest(QCString&);
+ void hexDigest(TQCString&);
/**
* Returns the value of the calculated message digest in
* a base64-encoded representation.
*/
- QCString base64Digest ();
+ TQCString base64Digest ();
/**
* returns true if the calculated digest for the given
@@ -697,7 +697,7 @@ public:
/**
* @overload
*/
- bool verify(const QCString&);
+ bool verify(const TQCString&);
protected:
/**
diff --git a/kdecore/kmimesourcefactory.cpp b/kdecore/kmimesourcefactory.cpp
index a74d69fc8..37745d398 100644
--- a/kdecore/kmimesourcefactory.cpp
+++ b/kdecore/kmimesourcefactory.cpp
@@ -45,7 +45,7 @@ public:
};
KMimeSourceFactory::KMimeSourceFactory (KIconLoader* loader)
- : QMimeSourceFactory (),
+ : TQMimeSourceFactory (),
d (new KMimeSourceFactoryPrivate (loader))
{
}
@@ -55,10 +55,10 @@ KMimeSourceFactory::~KMimeSourceFactory()
delete d;
}
-QString KMimeSourceFactory::makeAbsolute (const QString& absOrRelName, const QString& context) const
+TQString KMimeSourceFactory::makeAbsolute (const TQString& absOrRelName, const TQString& context) const
{
- QString myName;
- QString myContext;
+ TQString myName;
+ TQString myContext;
const int pos = absOrRelName.find ('|');
if (pos > -1)
@@ -67,7 +67,7 @@ QString KMimeSourceFactory::makeAbsolute (const QString& absOrRelName, const QSt
myName = absOrRelName.right (absOrRelName.length() - myContext.length() - 1);
}
- QString result;
+ TQString result;
if (myContext == "desktop")
{
@@ -91,7 +91,7 @@ QString KMimeSourceFactory::makeAbsolute (const QString& absOrRelName, const QSt
}
if (result.isEmpty())
- result = QMimeSourceFactory::makeAbsolute (absOrRelName, context);
+ result = TQMimeSourceFactory::makeAbsolute (absOrRelName, context);
return result;
}
diff --git a/kdecore/kmimesourcefactory.h b/kdecore/kmimesourcefactory.h
index ec73621a7..ce91ee0f8 100644
--- a/kdecore/kmimesourcefactory.h
+++ b/kdecore/kmimesourcefactory.h
@@ -22,18 +22,18 @@
#ifndef KMIMESOURCEFACTORY_H
#define KMIMESOURCEFACTORY_H
-#include <qmime.h>
+#include <tqmime.h>
#include <kglobal.h>
class KMimeSourceFactoryPrivate;
class KInstance;
/**
- * An extension to QMimeSourceFactory that uses KIconLoader to
+ * An extension to TQMimeSourceFactory that uses KIconLoader to
* find images.
*
* Normally you don't have to instantiate this class at all, KApplication does that for
- * you automagically and sets QMimeSourceFactory::setDefaultFactory().
+ * you automagically and sets TQMimeSourceFactory::setDefaultFactory().
*
* @author Peter Putzer <putzer@kde.org>
*/
@@ -67,7 +67,7 @@ public:
* @param abs_or_rel_name is the absolute or relative pathname.
* @param context is the path of the context object for the queried resource. Almost always empty.
*/
- virtual QString makeAbsolute (const QString& abs_or_rel_name, const QString& context) const;
+ virtual TQString makeAbsolute (const TQString& abs_or_rel_name, const TQString& context) const;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdecore/kmountpoint.cpp b/kdecore/kmountpoint.cpp
index a04780a37..764f085a0 100644
--- a/kdecore/kmountpoint.cpp
+++ b/kdecore/kmountpoint.cpp
@@ -23,7 +23,7 @@
#include <config.h>
#include <stdlib.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "kstandarddirs.h"
@@ -139,17 +139,17 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
while (GETMNTENT(fstab, fe))
{
KMountPoint *mp = new KMountPoint();
- mp->m_mountedFrom = QFile::decodeName(FSNAME(fe));
+ mp->m_mountedFrom = TQFile::decodeName(FSNAME(fe));
- mp->m_mountPoint = QFile::decodeName(MOUNTPOINT(fe));
- mp->m_mountType = QFile::decodeName(MOUNTTYPE(fe));
+ mp->m_mountPoint = TQFile::decodeName(MOUNTPOINT(fe));
+ mp->m_mountType = TQFile::decodeName(MOUNTTYPE(fe));
//Devices using supermount have their device names in the mount options
//instead of the device field. That's why we need to read the mount options
if (infoNeeded & NeedMountOptions || (mp->m_mountType == "supermount"))
{
- QString options = QFile::decodeName(MOUNTOPTIONS(fe));
- mp->m_mountOptions = QStringList::split(',', options);
+ TQString options = TQFile::decodeName(MOUNTOPTIONS(fe));
+ mp->m_mountOptions = TQStringList::split(',', options);
}
if(mp->m_mountType == "supermount")
@@ -165,12 +165,12 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
}
ENDMNTENT(fstab);
#else
- QFile f(FSTAB);
+ TQFile f(FSTAB);
if ( !f.open(IO_ReadOnly) )
return result;
- QTextStream t (&f);
- QString s;
+ TQTextStream t (&f);
+ TQString s;
while (! t.eof())
{
@@ -179,7 +179,7 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
continue;
// not empty or commented out by '#'
- QStringList item = QStringList::split(' ', s);
+ TQStringList item = TQStringList::split(' ', s);
#ifdef _OS_SOLARIS_
if (item.count() < 5)
@@ -199,11 +199,11 @@ KMountPoint::List KMountPoint::possibleMountPoints(int infoNeeded)
#endif
mp->m_mountPoint = item[i++];
mp->m_mountType = item[i++];
- QString options = item[i++];
+ TQString options = item[i++];
if (infoNeeded & NeedMountOptions)
{
- mp->m_mountOptions = QStringList::split(',', options);
+ mp->m_mountOptions = TQStringList::split(',', options);
}
if (infoNeeded & NeedRealDeviceName)
@@ -237,20 +237,20 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
for (int i=0;i<num_fs;i++)
{
KMountPoint *mp = new KMountPoint();
- mp->m_mountedFrom = QFile::decodeName(mounted[i].f_mntfromname);
- mp->m_mountPoint = QFile::decodeName(mounted[i].f_mntonname);
+ mp->m_mountedFrom = TQFile::decodeName(mounted[i].f_mntfromname);
+ mp->m_mountPoint = TQFile::decodeName(mounted[i].f_mntonname);
#ifdef __osf__
- mp->m_mountType = QFile::decodeName(mnt_names[mounted[i].f_type]);
+ mp->m_mountType = TQFile::decodeName(mnt_names[mounted[i].f_type]);
#else
- mp->m_mountType = QFile::decodeName(mounted[i].f_fstypename);
+ mp->m_mountType = TQFile::decodeName(mounted[i].f_fstypename);
#endif
if (infoNeeded & NeedMountOptions)
{
struct fstab *ft = getfsfile(mounted[i].f_mntonname);
- QString options = QFile::decodeName(ft->fs_mntops);
- mp->m_mountOptions = QStringList::split(',', options);
+ TQString options = TQFile::decodeName(ft->fs_mntops);
+ mp->m_mountOptions = TQStringList::split(',', options);
}
if (infoNeeded & NeedRealDeviceName)
@@ -305,9 +305,9 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
struct vfs_ent* ent = getvfsbytype(vm->vmt_gfstype);
KMountPoint *mp = new KMountPoint();
- mp->m_mountedFrom = QFile::decodeName(mountedfrom);
- mp->m_mountPoint = QFile::decodeName(mountedto);
- mp->m_mountType = QFile::decodeName(ent->vfsent_name);
+ mp->m_mountedFrom = TQFile::decodeName(mountedfrom);
+ mp->m_mountPoint = TQFile::decodeName(mountedto);
+ mp->m_mountType = TQFile::decodeName(ent->vfsent_name);
free(mountedfrom);
free(mountedto);
@@ -344,17 +344,17 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
while (GETMNTENT(mnttab, fe))
{
KMountPoint *mp = new KMountPoint();
- mp->m_mountedFrom = QFile::decodeName(FSNAME(fe));
+ mp->m_mountedFrom = TQFile::decodeName(FSNAME(fe));
- mp->m_mountPoint = QFile::decodeName(MOUNTPOINT(fe));
- mp->m_mountType = QFile::decodeName(MOUNTTYPE(fe));
+ mp->m_mountPoint = TQFile::decodeName(MOUNTPOINT(fe));
+ mp->m_mountType = TQFile::decodeName(MOUNTTYPE(fe));
//Devices using supermount have their device names in the mount options
//instead of the device field. That's why we need to read the mount options
if (infoNeeded & NeedMountOptions || (mp->m_mountType == "supermount"))
{
- QString options = QFile::decodeName(MOUNTOPTIONS(fe));
- mp->m_mountOptions = QStringList::split(',', options);
+ TQString options = TQFile::decodeName(MOUNTOPTIONS(fe));
+ mp->m_mountOptions = TQStringList::split(',', options);
}
if (mp->m_mountType == "supermount")
@@ -373,13 +373,13 @@ KMountPoint::List KMountPoint::currentMountPoints(int infoNeeded)
return result;
}
-QString KMountPoint::devNameFromOptions(const QStringList &options)
+TQString KMountPoint::devNameFromOptions(const TQStringList &options)
{
// Search options to find the device name
- for ( QStringList::ConstIterator it = options.begin(); it != options.end(); ++it)
+ for ( TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it)
{
if( (*it).startsWith("dev="))
- return QString(*it).remove("dev=");
+ return TQString(*it).remove("dev=");
}
- return QString("none");
+ return TQString("none");
}
diff --git a/kdecore/kmountpoint.h b/kdecore/kmountpoint.h
index ee3ea3941..fd4fe9c5d 100644
--- a/kdecore/kmountpoint.h
+++ b/kdecore/kmountpoint.h
@@ -20,8 +20,8 @@
#ifndef _KMOUNTPOINT_H_
#define _KMOUNTPOINT_H_
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#include <ksharedptr.h>
@@ -37,7 +37,7 @@ class KDECORE_EXPORT KMountPoint : public KShared
typedef signed long long int filesize_t;
public:
typedef KSharedPtr<KMountPoint> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public:
enum { NeedMountOptions = 1, NeedRealDeviceName = 2 };
@@ -59,37 +59,37 @@ public:
* Where this filesystem gets mounted from.
* This can refer to a device, a remote server or something else.
*/
- QString mountedFrom() const { return m_mountedFrom; }
+ TQString mountedFrom() const { return m_mountedFrom; }
/**
* Canonical name of the device where the filesystem got mounted from.
* (Or empty, if not a device)
* Only available when the NeedRealDeviceName flag was set.
*/
- QString realDeviceName() const { return m_device; }
+ TQString realDeviceName() const { return m_device; }
/**
* Path where the filesystem is mounted or can be mounted.
*/
- QString mountPoint() const { return m_mountPoint; }
+ TQString mountPoint() const { return m_mountPoint; }
/**
* Type of filesystem
*/
- QString mountType() const { return m_mountType; }
+ TQString mountType() const { return m_mountType; }
/**
* Options used to mount the filesystem.
* Only available when the NeedMountOptions flag was set.
*/
- QStringList mountOptions() const { return m_mountOptions; }
+ TQStringList mountOptions() const { return m_mountOptions; }
/**
* When using supermount, the device name is in the options field
* as dev=/my/device
* @since 3.4
*/
- static QString devNameFromOptions(const QStringList &options);
+ static TQString devNameFromOptions(const TQStringList &options);
/**
* Destructor
@@ -102,11 +102,11 @@ private:
*/
KMountPoint();
- QString m_mountedFrom;
- QString m_device;
- QString m_mountPoint;
- QString m_mountType;
- QStringList m_mountOptions;
+ TQString m_mountedFrom;
+ TQString m_device;
+ TQString m_mountPoint;
+ TQString m_mountType;
+ TQStringList m_mountOptions;
class KMountPointPrivate;
KMountPointPrivate *d;
diff --git a/kdecore/kmultipledrag.cpp b/kdecore/kmultipledrag.cpp
index 03ad74294..29d56bd85 100644
--- a/kdecore/kmultipledrag.cpp
+++ b/kdecore/kmultipledrag.cpp
@@ -22,13 +22,13 @@
#ifndef QT_NO_DRAGANDDROP
-KMultipleDrag::KMultipleDrag( QWidget *dragSource, const char *name )
- : QDragObject( dragSource, name )
+KMultipleDrag::KMultipleDrag( TQWidget *dragSource, const char *name )
+ : TQDragObject( dragSource, name )
{
m_dragObjects.setAutoDelete( true );
}
-void KMultipleDrag::addDragObject( QDragObject *dragObject )
+void KMultipleDrag::addDragObject( TQDragObject *dragObject )
{
//kdDebug() << "KMultipleDrag::addDragObject" << endl;
m_dragObjects.append( dragObject );
@@ -39,11 +39,11 @@ void KMultipleDrag::addDragObject( QDragObject *dragObject )
m_numberFormats.append( i ); // e.g. if it supports two formats, 0 and 1, store 2.
}
-QByteArray KMultipleDrag::encodedData( const char *mime ) const
+TQByteArray KMultipleDrag::encodedData( const char *mime ) const
{
//kdDebug() << "KMultipleDrag::encodedData " << mime << endl;
// Iterate over the drag objects, and find the format in the right one
- QPtrListIterator<QDragObject> it( m_dragObjects );
+ TQPtrListIterator<TQDragObject> it( m_dragObjects );
for ( ; it.current(); ++it )
{
for ( int i = 0; it.current()->format( i ); ++i )
@@ -52,7 +52,7 @@ QByteArray KMultipleDrag::encodedData( const char *mime ) const
return it.current()->encodedData( mime );
}
}
- return QByteArray();
+ return TQByteArray();
}
const char* KMultipleDrag::format( int i ) const
@@ -64,9 +64,9 @@ const char* KMultipleDrag::format( int i ) const
// i=1 -> textdrag->format( 0 )
// i=2 -> textdrag->format( 1 )
// etc.
- QValueList<int>::ConstIterator nit = m_numberFormats.begin();
- QValueList<int>::ConstIterator nend = m_numberFormats.end();
- QPtrListIterator<QDragObject> it( m_dragObjects );
+ TQValueList<int>::ConstIterator nit = m_numberFormats.begin();
+ TQValueList<int>::ConstIterator nend = m_numberFormats.end();
+ TQPtrListIterator<TQDragObject> it( m_dragObjects );
for ( ; nit != nend && i >= *nit ; ++nit, ++it )
i -= *nit;
if ( it.current() )
diff --git a/kdecore/kmultipledrag.h b/kdecore/kmultipledrag.h
index bb08c86cc..85a0a66a3 100644
--- a/kdecore/kmultipledrag.h
+++ b/kdecore/kmultipledrag.h
@@ -22,8 +22,8 @@
#ifndef QT_NO_DRAGANDDROP
-#include <qdragobject.h>
-#include <qvaluelist.h>
+#include <tqdragobject.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
class KMultipleDragPrivate;
@@ -34,14 +34,14 @@ class KMultipleDragPrivate;
*
* Instead of creating a specific class for each case (as would otherwise
* be necessary), you can simply create independent drag objects (e.g.
- * a QImageDrag object and a KURLDrag object), and bundle them together
+ * a TQImageDrag object and a KURLDrag object), and bundle them together
* using KMultipleDrag.
*
* Sample code for this:
*
* \code
* KMultipleDrag *drag = new KMultipleDrag( parentWidget );
- * drag->addDragObject( new QImageDrag( someQImage, 0 ) );
+ * drag->addDragObject( new TQImageDrag( someQImage, 0 ) );
* drag->addDragObject( new KURLDrag( someKURL, 0 ) );
* drag->drag();
* \endcode
@@ -62,7 +62,7 @@ public:
* 0 for a parent-less object
* @param name the name of the object, can be 0
*/
- KMultipleDrag( QWidget *dragSource = 0, const char *name = 0 );
+ KMultipleDrag( TQWidget *dragSource = 0, const char *name = 0 );
/**
* Call this to add each underlying drag object to the multiple drag object.
@@ -71,7 +71,7 @@ public:
*
* @param dragObject the drag object to add. Should have no parent object.
*/
- void addDragObject( QDragObject *dragObject );
+ void addDragObject( TQDragObject *dragObject );
/**
* Returns the data of a drag object with that supports the given
@@ -80,7 +80,7 @@ public:
* @return the data, or a null byte array if not found
* @reimp
*/
- virtual QByteArray encodedData( const char *mime ) const;
+ virtual TQByteArray encodedData( const char *mime ) const;
/**
* Returns the @p i'th supported format, or 0.
@@ -92,8 +92,8 @@ public:
protected:
// KDE4: make private
- QPtrList<QDragObject> m_dragObjects;
- QValueList<int> m_numberFormats;
+ TQPtrList<TQDragObject> m_dragObjects;
+ TQValueList<int> m_numberFormats;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdecore/knotifyclient.cpp b/kdecore/knotifyclient.cpp
index ab3032c35..bce90d86a 100644
--- a/kdecore/knotifyclient.cpp
+++ b/kdecore/knotifyclient.cpp
@@ -20,8 +20,8 @@
#include "knotifyclient.h"
-#include <qdatastream.h>
-#include <qptrstack.h>
+#include <tqdatastream.h>
+#include <tqptrstack.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -33,7 +33,7 @@
static const char daemonName[] = "knotify";
-static bool canAvoidStartupEvent( const QString& event, const QString& appname, int present )
+static bool canAvoidStartupEvent( const TQString& event, const TQString& appname, int present )
{
static bool checkAvoid = true;
if( !checkAvoid )
@@ -62,9 +62,9 @@ static bool canAvoidStartupEvent( const QString& event, const QString& appname,
return true;
}
-static int sendNotifyEvent(const QString &message, const QString &text,
- int present, int level, const QString &sound,
- const QString &file, int winId )
+static int sendNotifyEvent(const TQString &message, const TQString &text,
+ int present, int level, const TQString &sound,
+ const TQString &file, int winId )
{
if (!kapp) return 0;
@@ -76,7 +76,7 @@ static int sendNotifyEvent(const QString &message, const QString &text,
return 0;
}
- QString appname = KNotifyClient::instance()->instanceName();
+ TQString appname = KNotifyClient::instance()->instanceName();
if( canAvoidStartupEvent( message, appname, present ))
return -1; // done "successfully" - there will be no event presentation
@@ -84,19 +84,19 @@ static int sendNotifyEvent(const QString &message, const QString &text,
int uniqueId = kMax( 1, kapp->random() ); // must not be 0 -- means failure!
// knotify daemon needs toplevel window
- QWidget* widget = QWidget::find( (WId)winId );
+ TQWidget* widget = TQWidget::find( (WId)winId );
if( widget )
winId = (int)widget->topLevelWidget()->winId();
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << message << appname << text << sound << file << present << level
<< winId << uniqueId;
if ( !KNotifyClient::startDaemon() )
return 0;
- if ( client->send(daemonName, "Notify", "notify(QString,QString,QString,QString,QString,int,int,int,int)", data) )
+ if ( client->send(daemonName, "Notify", "notify(TQString,TQString,TQString,TQString,TQString,int,int,int,int)", data) )
{
return uniqueId;
}
@@ -104,63 +104,63 @@ static int sendNotifyEvent(const QString &message, const QString &text,
return 0;
}
-int KNotifyClient::event( StandardEvent type, const QString& text )
+int KNotifyClient::event( StandardEvent type, const TQString& text )
{
return event( 0, type, text );
}
-int KNotifyClient::event(const QString &message, const QString &text)
+int KNotifyClient::event(const TQString &message, const TQString &text)
{
return event(0, message, text);
}
-int KNotifyClient::userEvent(const QString &text, int present, int level,
- const QString &sound, const QString &file)
+int KNotifyClient::userEvent(const TQString &text, int present, int level,
+ const TQString &sound, const TQString &file)
{
return userEvent( 0, text, present, level, sound, file );
}
-int KNotifyClient::event( int winId, StandardEvent type, const QString& text )
+int KNotifyClient::event( int winId, StandardEvent type, const TQString& text )
{
- QString message;
+ TQString message;
switch ( type ) {
case cannotOpenFile:
- message = QString::fromLatin1("cannotopenfile");
+ message = TQString::fromLatin1("cannotopenfile");
break;
case warning:
- message = QString::fromLatin1("warning");
+ message = TQString::fromLatin1("warning");
break;
case fatalError:
- message = QString::fromLatin1("fatalerror");
+ message = TQString::fromLatin1("fatalerror");
break;
case catastrophe:
- message = QString::fromLatin1("catastrophe");
+ message = TQString::fromLatin1("catastrophe");
break;
case notification: // fall through
default:
- message = QString::fromLatin1("notification");
+ message = TQString::fromLatin1("notification");
break;
}
return sendNotifyEvent( message, text, Default, Default,
- QString::null, QString::null, winId );
+ TQString::null, TQString::null, winId );
}
-int KNotifyClient::event(int winId, const QString &message,
- const QString &text)
+int KNotifyClient::event(int winId, const TQString &message,
+ const TQString &text)
{
- return sendNotifyEvent(message, text, Default, Default, QString::null, QString::null, winId);
+ return sendNotifyEvent(message, text, Default, Default, TQString::null, TQString::null, winId);
}
-int KNotifyClient::userEvent(int winId, const QString &text, int present,
+int KNotifyClient::userEvent(int winId, const TQString &text, int present,
int level,
- const QString &sound, const QString &file)
+ const TQString &sound, const TQString &file)
{
- return sendNotifyEvent(QString::null, text, present, level, sound, file, winId);
+ return sendNotifyEvent(TQString::null, text, present, level, sound, file, winId);
}
-int KNotifyClient::getPresentation(const QString &eventname)
+int KNotifyClient::getPresentation(const TQString &eventname)
{
int present;
if (eventname.isEmpty()) return Default;
@@ -173,9 +173,9 @@ int KNotifyClient::getPresentation(const QString &eventname)
return present;
}
-QString KNotifyClient::getFile(const QString &eventname, int present)
+TQString KNotifyClient::getFile(const TQString &eventname, int present)
{
- if (eventname.isEmpty()) return QString::null;
+ if (eventname.isEmpty()) return TQString::null;
KConfig eventsfile( KNotifyClient::instance()->instanceName()+".eventsrc", true, false);
eventsfile.setGroup(eventname);
@@ -188,10 +188,10 @@ QString KNotifyClient::getFile(const QString &eventname, int present)
return eventsfile.readPathEntry("logfile");
}
- return QString::null;
+ return TQString::null;
}
-int KNotifyClient::getDefaultPresentation(const QString &eventname)
+int KNotifyClient::getDefaultPresentation(const TQString &eventname)
{
int present;
if (eventname.isEmpty()) return Default;
@@ -204,9 +204,9 @@ int KNotifyClient::getDefaultPresentation(const QString &eventname)
return present;
}
-QString KNotifyClient::getDefaultFile(const QString &eventname, int present)
+TQString KNotifyClient::getDefaultFile(const TQString &eventname, int present)
{
- if (eventname.isEmpty()) return QString::null;
+ if (eventname.isEmpty()) return TQString::null;
KConfig eventsfile( KNotifyClient::instance()->instanceName()+"/eventsrc", true, false, "data");
eventsfile.setGroup(eventname);
@@ -219,7 +219,7 @@ QString KNotifyClient::getDefaultFile(const QString &eventname, int present)
return eventsfile.readPathEntry("default_logfile");
}
- return QString::null;
+ return TQString::null;
}
bool KNotifyClient::startDaemon()
@@ -236,10 +236,10 @@ bool KNotifyClient::startDaemon()
}
-void KNotifyClient::beep(const QString& reason)
+void KNotifyClient::beep(const TQString& reason)
{
if ( !kapp || KNotifyClient::Instance::currentInstance()->useSystemBell() ) {
- QApplication::beep();
+ TQApplication::beep();
return;
}
@@ -249,14 +249,14 @@ void KNotifyClient::beep(const QString& reason)
client->attach();
if (!client->isAttached() || !client->isApplicationRegistered(daemonName))
{
- QApplication::beep();
+ TQApplication::beep();
return;
}
}
// The kaccess daemon handles visual and other audible beeps
if ( client->isApplicationRegistered( "kaccess" ) )
{
- QApplication::beep();
+ TQApplication::beep();
return;
}
@@ -300,7 +300,7 @@ public:
}
private:
- QPtrStack<Instance> m_instances;
+ TQPtrStack<Instance> m_instances;
Instance *m_defaultInstance;
};
diff --git a/kdecore/knotifyclient.h b/kdecore/knotifyclient.h
index e7be1798e..2de3e297d 100644
--- a/kdecore/knotifyclient.h
+++ b/kdecore/knotifyclient.h
@@ -17,7 +17,7 @@
*/
#ifndef _KNOTIFY_CLIENT
#define _KNOTIFY_CLIENT
-#include <qstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
class KInstance;
@@ -182,19 +182,19 @@ namespace KNotifyClient
* @deprecated
* @param message The name of the event
* @param text The text to put in a dialog box. This won't be shown if
- * the user connected the event to sound, only. Can be QString::null.
+ * the user connected the event to sound, only. Can be TQString::null.
* @return a value > 0, unique for this event if successful, 0 otherwise
*/
- KDECORE_EXPORT int event(const QString &message, const QString &text=QString::null) KDE_DEPRECATED;
+ KDECORE_EXPORT int event(const TQString &message, const TQString &text=TQString::null) KDE_DEPRECATED;
/**
* @deprecated
* Allows to easily emit standard events.
* @param event The event you want to raise.
- * @param text The text explaining the event you raise. Can be QString::null.
+ * @param text The text explaining the event you raise. Can be TQString::null.
* @return a value > 0, unique for this event if successful, 0 otherwise
*/
- KDECORE_EXPORT int event( StandardEvent event, const QString& text=QString::null ) KDE_DEPRECATED;
+ KDECORE_EXPORT int event( StandardEvent event, const TQString& text=TQString::null ) KDE_DEPRECATED;
/**
* @deprecated
@@ -206,8 +206,8 @@ namespace KNotifyClient
* @param file The log file to append the message to if selected with @p present
* @return a value > 0, unique for this event if successful, 0 otherwise
*/
- KDECORE_EXPORT int userEvent(const QString &text=QString::null, int present=Default, int level=Default,
- const QString &sound=QString::null, const QString &file=QString::null) KDE_DEPRECATED;
+ KDECORE_EXPORT int userEvent(const TQString &text=TQString::null, int present=Default, int level=Default,
+ const TQString &sound=TQString::null, const TQString &file=TQString::null) KDE_DEPRECATED;
//#endif
@@ -222,13 +222,13 @@ namespace KNotifyClient
* @param winId The winId() of the widget where the event originates
* @param message The name of the event
* @param text The text to put in a dialog box. This won't be shown if
- * the user connected the event to sound, only. Can be QString::null.
+ * the user connected the event to sound, only. Can be TQString::null.
* @return a value > 0, unique for this event if successful, 0 otherwise
* @since 3.1.1
*/
// KDE4: use WId instead of int
- KDECORE_EXPORT int event( int winId, const QString& message,
- const QString& text = QString::null );
+ KDECORE_EXPORT int event( int winId, const TQString& message,
+ const TQString& text = TQString::null );
/**
* You should
@@ -237,13 +237,13 @@ namespace KNotifyClient
* @param winId The winId() of the widget where the event originates
* @param event The event you want to raise
* @param text The text to put in a dialog box. This won't be shown if
- * the user connected the event to sound, only. Can be QString::null.
+ * the user connected the event to sound, only. Can be TQString::null.
* @return a value > 0, unique for this event if successful, 0 otherwise
* @since 3.1.1
*/
// KDE4: use WId instead of int
KDECORE_EXPORT int event( int winId, StandardEvent event,
- const QString& text = QString::null );
+ const TQString& text = TQString::null );
/**
* Will fire an event that's not registered.
@@ -260,18 +260,18 @@ namespace KNotifyClient
* @since 3.1.1
*/
// KDE4: use WId instead of int
- KDECORE_EXPORT int userEvent(int winId, const QString &text=QString::null, int present=Default, int level=Default,
- const QString &sound=QString::null, const QString &file=QString::null);
+ KDECORE_EXPORT int userEvent(int winId, const TQString &text=TQString::null, int present=Default, int level=Default,
+ const TQString &sound=TQString::null, const TQString &file=TQString::null);
/**
- * This is a simple substitution for QApplication::beep().
+ * This is a simple substitution for TQApplication::beep().
* It simply calls
* \code
* KNotifyClient::event( KNotifyClient::notification, reason );
* \endcode
- * @param reason the reason, can be QString::null.
+ * @param reason the reason, can be TQString::null.
*/
- KDECORE_EXPORT void beep(const QString& reason=QString::null);
+ KDECORE_EXPORT void beep(const TQString& reason=TQString::null);
/**
* Gets the presentation associated with a certain event name
@@ -282,7 +282,7 @@ namespace KNotifyClient
* @param eventname the event name to check
* @return the presentation methods
*/
- KDECORE_EXPORT int getPresentation(const QString &eventname);
+ KDECORE_EXPORT int getPresentation(const TQString &eventname);
/**
* Gets the default file associated with a certain event name
@@ -290,9 +290,9 @@ namespace KNotifyClient
* This has the potential for being slow.
* @param eventname the name of the event
* @param present the presentation method
- * @return the associated file. Can be QString::null if not found.
+ * @return the associated file. Can be TQString::null if not found.
*/
- KDECORE_EXPORT QString getFile(const QString &eventname, int present);
+ KDECORE_EXPORT TQString getFile(const TQString &eventname, int present);
/**
* Gets the default presentation for the event of this program.
@@ -302,7 +302,7 @@ namespace KNotifyClient
* \endcode
* @return the presentation methods
*/
- KDECORE_EXPORT int getDefaultPresentation(const QString &eventname);
+ KDECORE_EXPORT int getDefaultPresentation(const TQString &eventname);
/**
* Gets the default File for the event of this program.
@@ -311,9 +311,9 @@ namespace KNotifyClient
* Some do (Sound)
* @param eventname the name of the event
* @param present the presentation method
- * @return the default file. Can be QString::null if not found.
+ * @return the default file. Can be TQString::null if not found.
*/
- KDECORE_EXPORT QString getDefaultFile(const QString &eventname, int present);
+ KDECORE_EXPORT TQString getDefaultFile(const TQString &eventname, int present);
/**
* Shortcut to KNotifyClient::Instance::current() :)
diff --git a/kdecore/kpalette.cpp b/kdecore/kpalette.cpp
index 293dc293e..49cacc79b 100644
--- a/kdecore/kpalette.cpp
+++ b/kdecore/kpalette.cpp
@@ -21,23 +21,23 @@
#include "kpalette.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kstandarddirs.h>
#include <kglobal.h>
#include <ksavefile.h>
#include <kstringhandler.h>
-template class QPtrList<KPalette::kolor>;
+template class TQPtrList<KPalette::kolor>;
QStringList
KPalette::getPaletteList()
{
- QStringList paletteList;
+ TQStringList paletteList;
KGlobal::dirs()->findAllResources("config", "colors/*", false, true, paletteList);
int strip = strlen("colors/");
- for(QStringList::Iterator it = paletteList.begin();
+ for(TQStringList::Iterator it = paletteList.begin();
it != paletteList.end();
it++)
{
@@ -47,21 +47,21 @@ KPalette::getPaletteList()
return paletteList;
}
-KPalette::KPalette(const QString &name)
+KPalette::KPalette(const TQString &name)
: mName(name)
{
mKolorList.setAutoDelete(true);
if (mName.isEmpty()) return;
- QString filename = locate("config", "colors/"+mName);
+ TQString filename = locate("config", "colors/"+mName);
if (filename.isEmpty()) return;
- QFile paletteFile(filename);
+ TQFile paletteFile(filename);
if (!paletteFile.exists()) return;
if (!paletteFile.open(IO_ReadOnly)) return;
uint maxLength = 1024;
- QString line;
+ TQString line;
// Read first line
// Expected "GIMP Palette"
@@ -112,7 +112,7 @@ KPalette::KPalette(const KPalette &p)
// Make a deep copy of the color list
// We can't iterate a const list :(
// DF: yes you can - use the proper iterator, not first/next
- QPtrList<kolor> *nonConstList = (QPtrList<kolor> *) &p.mKolorList;
+ TQPtrList<kolor> *nonConstList = (TQPtrList<kolor> *) &p.mKolorList;
for(kolor *node = nonConstList->first(); node; node = nonConstList->next())
{
mKolorList.append(new kolor(*node));
@@ -127,20 +127,20 @@ KPalette::~KPalette()
bool
KPalette::save()
{
- QString filename = locateLocal("config", "colors/"+mName);
+ TQString filename = locateLocal("config", "colors/"+mName);
KSaveFile sf(filename);
if (sf.status() != 0) return false;
- QTextStream *str = sf.textStream();
+ TQTextStream *str = sf.textStream();
- QString description = mDesc.stripWhiteSpace();
- description = "#"+QStringList::split("\n", description, true).join("\n#");
+ TQString description = mDesc.stripWhiteSpace();
+ description = "#"+TQStringList::split("\n", description, true).join("\n#");
(*str) << "KDE RGB Palette\n";
(*str) << description << "\n";
// We can't iterate a const list :(
// DF: yes you can - use the proper iterator, not first/next
- QPtrList<kolor> *nonConstList = (QPtrList<kolor> *) (&mKolorList);
+ TQPtrList<kolor> *nonConstList = (TQPtrList<kolor> *) (&mKolorList);
for(kolor *node = nonConstList->first(); node; node = nonConstList->next())
{
int r,g,b;
@@ -159,7 +159,7 @@ KPalette::operator=( const KPalette &p)
// Make a deep copy of the color list
// We can't iterate a const list :(
// DF: yes you can - use the proper iterator, not first/next
- QPtrList<kolor> *nonConstList = (QPtrList<kolor> *) &p.mKolorList;
+ TQPtrList<kolor> *nonConstList = (TQPtrList<kolor> *) &p.mKolorList;
for(kolor *node = nonConstList->first(); node; node = nonConstList->next())
{
mKolorList.append(new kolor(*node));
@@ -174,20 +174,20 @@ QColor
KPalette::color(int index)
{
if ((index < 0) || (index >= nrColors()))
- return QColor();
+ return TQColor();
kolor *node = mKolorList.at(index);
if (!node)
- return QColor();
+ return TQColor();
return node->color;
}
int
-KPalette::findColor(const QColor &color) const
+KPalette::findColor(const TQColor &color) const
{
int index;
- QPtrListIterator<kolor> it( mKolorList );
+ TQPtrListIterator<kolor> it( mKolorList );
for (index = 0; it.current(); ++it, ++index)
{
if (it.current()->color == color)
@@ -200,17 +200,17 @@ QString
KPalette::colorName(int index)
{
if ((index < 0) || (index >= nrColors()))
- return QString::null;
+ return TQString::null;
kolor *node = mKolorList.at(index);
if (!node)
- return QString::null;
+ return TQString::null;
return node->name;
}
int
-KPalette::addColor(const QColor &newColor, const QString &newColorName)
+KPalette::addColor(const TQColor &newColor, const TQString &newColorName)
{
kolor *node = new kolor();
node->color = newColor;
@@ -221,8 +221,8 @@ KPalette::addColor(const QColor &newColor, const QString &newColorName)
int
KPalette::changeColor(int index,
- const QColor &newColor,
- const QString &newColorName)
+ const TQColor &newColor,
+ const TQString &newColorName)
{
if ((index < 0) || (index >= nrColors()))
return -1;
diff --git a/kdecore/kpalette.h b/kdecore/kpalette.h
index 93103c33a..4f9c74029 100644
--- a/kdecore/kpalette.h
+++ b/kdecore/kpalette.h
@@ -22,10 +22,10 @@
#ifndef KDELIBS_KPALETTE_H
#define KDELIBS_KPALETTE_H
-#include <qcolor.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqcolor.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kdelibs_export.h"
class KPalettePrivate;
@@ -39,7 +39,7 @@ class KPalettePrivate;
*
* This class uses the "GIMP" palette file format.
*
- * This class is totally unrelated to QPalette.
+ * This class is totally unrelated to TQPalette.
*
* @author Waldo Bastian (bastian@kde.org)
**/
@@ -51,14 +51,14 @@ public:
*
* @return A list with a palette names.
*/
- static QStringList getPaletteList();
+ static TQStringList getPaletteList();
/**
* KPalette constructor. Creates a KPalette from a file
* the filename is derived from the name.
* @param name The name of palette as returned by getPaletteList()
**/
- KPalette(const QString &name=QString::null);
+ KPalette(const TQString &name=TQString::null);
/**
* KPalette copy constructor.
@@ -86,28 +86,28 @@ public:
* Get the description of the palette.
* @return the description of the palette.
**/
- QString description() const
+ TQString description() const
{ return mDesc; }
/**
* Set the description of the palette.
* @param desc the new description
**/
- void setDescription(const QString &desc)
+ void setDescription(const TQString &desc)
{ mDesc = desc; }
/**
* Get the name of the palette.
* @return the name of the palette
**/
- QString name() const
+ TQString name() const
{ return mName; }
/**
* Set the name of the palette.
* @param name the name of the palette
**/
- void setName(const QString &name)
+ void setName(const TQString &name)
{ mName = name; }
/**
@@ -146,7 +146,7 @@ public:
* @param index the index of the desired color
* @return The @p index -th color of the palette, null if not found.
**/
- QColor color(int index);
+ TQColor color(int index);
/**
* Find index by @p color.
@@ -154,7 +154,7 @@ public:
* @return The index of the color in the palette or -1 if the
* color is not found.
**/
- int findColor(const QColor &color) const;
+ int findColor(const TQColor &color) const;
/**
* Find color name by @p index.
@@ -163,7 +163,7 @@ public:
* Note that not all palettes have named the colors. Null is
* returned if the color does not exist or has no name.
**/
- QString colorName(int index);
+ TQString colorName(int index);
/**
* Find color name by @p color.
@@ -172,7 +172,7 @@ public:
* Note also that each palette can give the same color
* a different name.
**/
- QString colorName(const QColor &color)
+ TQString colorName(const TQColor &color)
{ return colorName( findColor(color)); }
/**
@@ -182,8 +182,8 @@ public:
* the name.
* @return The index of the added color.
**/
- int addColor(const QColor &newColor,
- const QString &newColorName = QString::null);
+ int addColor(const TQColor &newColor,
+ const TQString &newColorName = TQString::null);
/**
* Change a color.
@@ -195,8 +195,8 @@ public:
* be changed.
**/
int changeColor(int index,
- const QColor &newColor,
- const QString &newColorName = QString::null);
+ const TQColor &newColor,
+ const TQString &newColorName = TQString::null);
/**
* Change a color.
@@ -207,17 +207,17 @@ public:
* @return The index of the new color or -1 if the color couldn't
* be changed.
**/
- int changeColor(const QColor &oldColor,
- const QColor &newColor,
- const QString &newColorName = QString::null)
+ int changeColor(const TQColor &oldColor,
+ const TQColor &newColor,
+ const TQString &newColorName = TQString::null)
{ return changeColor( findColor(oldColor), newColor, newColorName); }
private:
- typedef struct { QColor color; QString name; } kolor;
- QPtrList<kolor> mKolorList;
+ typedef struct { TQColor color; TQString name; } kolor;
+ TQPtrList<kolor> mKolorList;
- QString mName;
- QString mDesc;
+ TQString mName;
+ TQString mDesc;
Editable mEditable;
KPalettePrivate *d;
diff --git a/kdecore/kpixmapprovider.h b/kdecore/kpixmapprovider.h
index fb7ac7d0a..8b3c653af 100644
--- a/kdecore/kpixmapprovider.h
+++ b/kdecore/kpixmapprovider.h
@@ -21,7 +21,7 @@
#ifndef KPIXMAPPROVIDER_H
#define KPIXMAPPROVIDER_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "kdelibs_export.h"
/**
@@ -46,7 +46,7 @@ public:
* See KIcon::StdSize.
* @return the pixmap for the arguments, or null if there is none
*/
- virtual QPixmap pixmapFor( const QString& text, int size = 0 ) = 0;
+ virtual TQPixmap pixmapFor( const TQString& text, int size = 0 ) = 0;
protected:
virtual void virtual_hook( int id, void* data );
};
diff --git a/kdecore/kprocctrl.cpp b/kdecore/kprocctrl.cpp
index 363d2d8ef..d8170c0a8 100644
--- a/kdecore/kprocctrl.cpp
+++ b/kdecore/kprocctrl.cpp
@@ -31,7 +31,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
KProcessController *KProcessController::theKProcessController;
int KProcessController::refCount;
@@ -69,10 +69,10 @@ KProcessController::KProcessController()
fcntl( fd[0], F_SETFD, FD_CLOEXEC );
fcntl( fd[1], F_SETFD, FD_CLOEXEC );
- notifier = new QSocketNotifier( fd[0], QSocketNotifier::Read );
+ notifier = new TQSocketNotifier( fd[0], TQSocketNotifier::Read );
notifier->setEnabled( true );
- QObject::connect( notifier, SIGNAL(activated(int)),
- SLOT(slotDoHousekeeping()));
+ TQObject::connect( notifier, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(slotDoHousekeeping()));
}
KProcessController::~KProcessController()
@@ -192,8 +192,8 @@ void KProcessController::slotDoHousekeeping()
int status;
again:
- QValueListIterator<KProcess*> it( kProcessList.begin() );
- QValueListIterator<KProcess*> eit( kProcessList.end() );
+ TQValueListIterator<KProcess*> it( kProcessList.begin() );
+ TQValueListIterator<KProcess*> eit( kProcessList.end() );
while( it != eit )
{
KProcess *prc = *it;
@@ -207,8 +207,8 @@ void KProcessController::slotDoHousekeeping()
}
++it;
}
- QValueListIterator<int> uit( unixProcessList.begin() );
- QValueListIterator<int> ueit( unixProcessList.end() );
+ TQValueListIterator<int> uit( unixProcessList.begin() );
+ TQValueListIterator<int> ueit( unixProcessList.end() );
while( uit != ueit )
{
if( waitpid( *uit, 0, WNOHANG ) > 0 )
diff --git a/kdecore/kprocctrl.h b/kdecore/kprocctrl.h
index 104c8d9e5..3af87fff5 100644
--- a/kdecore/kprocctrl.h
+++ b/kdecore/kprocctrl.h
@@ -20,7 +20,7 @@
#ifndef __KPROCCTRL_H__
#define __KPROCCTRL_H__
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "kprocess.h"
@@ -124,9 +124,9 @@ private:
int fd[2];
bool needcheck;
- QSocketNotifier *notifier;
- QValueList<KProcess*> kProcessList;
- QValueList<int> unixProcessList;
+ TQSocketNotifier *notifier;
+ TQValueList<KProcess*> kProcessList;
+ TQValueList<int> unixProcessList;
static void setupHandlers();
static void resetHandlers();
diff --git a/kdecore/kprocess.cpp b/kdecore/kprocess.cpp
index 286790bcb..f13813d15 100644
--- a/kdecore/kprocess.cpp
+++ b/kdecore/kprocess.cpp
@@ -72,9 +72,9 @@
#include <pwd.h>
#include <grp.h>
-#include <qfile.h>
-#include <qsocketnotifier.h>
-#include <qapplication.h>
+#include <tqfile.h>
+#include <tqsocketnotifier.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -107,18 +107,18 @@ public:
int priority;
- QMap<QString,QString> env;
- QString wd;
- QCString shell;
- QCString executable;
+ TQMap<TQString,TQString> env;
+ TQString wd;
+ TQCString shell;
+ TQCString executable;
};
/////////////////////////////
// public member functions //
/////////////////////////////
-KProcess::KProcess( QObject* parent, const char *name )
- : QObject( parent, name ),
+KProcess::KProcess( TQObject* parent, const char *name )
+ : TQObject( parent, name ),
run_mode(NotifyOnExit),
runs(false),
pid_(0),
@@ -143,7 +143,7 @@ KProcess::KProcess( QObject* parent, const char *name )
}
KProcess::KProcess()
- : QObject(),
+ : TQObject(),
run_mode(NotifyOnExit),
runs(false),
pid_(0),
@@ -168,13 +168,13 @@ KProcess::KProcess()
}
void
-KProcess::setEnvironment(const QString &name, const QString &value)
+KProcess::setEnvironment(const TQString &name, const TQString &value)
{
d->env.insert(name, value);
}
void
-KProcess::setWorkingDirectory(const QString &dir)
+KProcess::setWorkingDirectory(const TQString &dir)
{
d->wd = dir;
}
@@ -182,15 +182,15 @@ KProcess::setWorkingDirectory(const QString &dir)
void
KProcess::setupEnvironment()
{
- QMap<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::Iterator it;
for(it = d->env.begin(); it != d->env.end(); ++it)
{
- setenv(QFile::encodeName(it.key()).data(),
- QFile::encodeName(it.data()).data(), 1);
+ setenv(TQFile::encodeName(it.key()).data(),
+ TQFile::encodeName(it.data()).data(), 1);
}
if (!d->wd.isEmpty())
{
- chdir(QFile::encodeName(d->wd).data());
+ chdir(TQFile::encodeName(d->wd).data());
}
}
@@ -252,7 +252,7 @@ void KProcess::setBinaryExecutable(const char *filename)
d->executable = filename;
}
-bool KProcess::setExecutable(const QString& proc)
+bool KProcess::setExecutable(const TQString& proc)
{
if (runs) return false;
@@ -260,20 +260,20 @@ bool KProcess::setExecutable(const QString& proc)
if (!arguments.isEmpty())
arguments.remove(arguments.begin());
- arguments.prepend(QFile::encodeName(proc));
+ arguments.prepend(TQFile::encodeName(proc));
return true;
}
-KProcess &KProcess::operator<<(const QStringList& args)
+KProcess &KProcess::operator<<(const TQStringList& args)
{
- QStringList::ConstIterator it = args.begin();
+ TQStringList::ConstIterator it = args.begin();
for ( ; it != args.end() ; ++it )
- arguments.append(QFile::encodeName(*it));
+ arguments.append(TQFile::encodeName(*it));
return *this;
}
-KProcess &KProcess::operator<<(const QCString& arg)
+KProcess &KProcess::operator<<(const TQCString& arg)
{
return operator<< (arg.data());
}
@@ -284,9 +284,9 @@ KProcess &KProcess::operator<<(const char* arg)
return *this;
}
-KProcess &KProcess::operator<<(const QString& arg)
+KProcess &KProcess::operator<<(const TQString& arg)
{
- arguments.append(QFile::encodeName(arg));
+ arguments.append(TQFile::encodeName(arg));
return *this;
}
@@ -309,7 +309,7 @@ bool KProcess::start(RunMode runmode, Communication comm)
}
#ifdef Q_OS_UNIX
char **arglist;
- QCString shellCmd;
+ TQCString shellCmd;
if (d->useShell)
{
if (d->shell.isEmpty()) {
@@ -806,10 +806,10 @@ KPty *KProcess::pty() const
}
#endif //Q_OS_UNIX
-QString KProcess::quote(const QString &arg)
+TQString KProcess::quote(const TQString &arg)
{
- QChar q('\'');
- return QString(arg).replace(q, "'\\''").prepend(q).append(q);
+ TQChar q('\'');
+ return TQString(arg).replace(q, "'\\''").prepend(q).append(q);
}
@@ -956,27 +956,27 @@ int KProcess::commSetupDoneP()
if (communication & Stdin) {
fcntl(in[1], F_SETFL, O_NONBLOCK | fcntl(in[1], F_GETFL));
- innot = new QSocketNotifier(in[1], QSocketNotifier::Write, this);
+ innot = new TQSocketNotifier(in[1], TQSocketNotifier::Write, this);
Q_CHECK_PTR(innot);
innot->setEnabled(false); // will be enabled when data has to be sent
- QObject::connect(innot, SIGNAL(activated(int)),
- this, SLOT(slotSendData(int)));
+ TQObject::connect(innot, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotSendData(int)));
}
if (communication & Stdout) {
- outnot = new QSocketNotifier(out[0], QSocketNotifier::Read, this);
+ outnot = new TQSocketNotifier(out[0], TQSocketNotifier::Read, this);
Q_CHECK_PTR(outnot);
- QObject::connect(outnot, SIGNAL(activated(int)),
- this, SLOT(slotChildOutput(int)));
+ TQObject::connect(outnot, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotChildOutput(int)));
if (communication & NoRead)
suspend();
}
if (communication & Stderr) {
- errnot = new QSocketNotifier(err[0], QSocketNotifier::Read, this );
+ errnot = new TQSocketNotifier(err[0], TQSocketNotifier::Read, this );
Q_CHECK_PTR(errnot);
- QObject::connect(errnot, SIGNAL(activated(int)),
- this, SLOT(slotChildError(int)));
+ TQObject::connect(errnot, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotChildError(int)));
}
return 1;
@@ -1121,7 +1121,7 @@ KShellProcess::KShellProcess(const char *shellname):
KShellProcess::~KShellProcess() {
}
-QString KShellProcess::quote(const QString &arg)
+TQString KShellProcess::quote(const TQString &arg)
{
return KProcess::quote(arg);
}
diff --git a/kdecore/kprocess.h b/kdecore/kprocess.h
index 4b3e88cd4..cb64dda81 100644
--- a/kdecore/kprocess.h
+++ b/kdecore/kprocess.h
@@ -24,9 +24,9 @@
#include <sys/wait.h>
#include <signal.h>
#include <unistd.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
-#include <qobject.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
+#include <tqobject.h>
#include "kdelibs_export.h"
class QSocketNotifier;
@@ -91,8 +91,8 @@ class KPty;
*
* *proc << "my_executable";
* *proc << "These" << "are" << "the" << "command" << "line" << "args";
- * QApplication::connect(proc, SIGNAL(processExited(KProcess *)),
- * pointer_to_my_object, SLOT(my_objects_slot(KProcess *)));
+ * TQApplication::connect(proc, TQT_SIGNAL(processExited(KProcess *)),
+ * pointer_to_my_object, TQT_SLOT(my_objects_slot(KProcess *)));
* proc->start();
* \endcode
*
@@ -186,7 +186,7 @@ public:
* Constructor
* @since 3.2
*/
- KProcess( QObject* parent, const char *name = 0 );
+ KProcess( TQObject* parent, const char *name = 0 );
/**
* Constructor
@@ -214,7 +214,7 @@ public:
@see operator<<()
*/
- bool setExecutable(const QString& proc) KDE_DEPRECATED;
+ bool setExecutable(const TQString& proc) KDE_DEPRECATED;
/**
@@ -230,17 +230,17 @@ public:
* @param arg the argument to add
* @return a reference to this KProcess
**/
- KProcess &operator<<(const QString& arg);
+ KProcess &operator<<(const TQString& arg);
/**
* Similar to previous method, takes a char *, supposed to be in locale 8 bit already.
*/
KProcess &operator<<(const char * arg);
/**
- * Similar to previous method, takes a QCString, supposed to be in locale 8 bit already.
+ * Similar to previous method, takes a TQCString, supposed to be in locale 8 bit already.
* @param arg the argument to add
* @return a reference to this KProcess
*/
- KProcess &operator<<(const QCString & arg);
+ KProcess &operator<<(const TQCString & arg);
/**
* Sets the executable and the command line argument list for this process,
@@ -248,7 +248,7 @@ public:
* @param args the arguments to add
* @return a reference to this KProcess
**/
- KProcess &operator<<(const QStringList& args);
+ KProcess &operator<<(const TQStringList& args);
/**
* Clear a command line argument list that has been set by using
@@ -464,7 +464,7 @@ public:
* Lets you see what your arguments are for debugging.
* @return the list of arguments
*/
- const QValueList<QCString> &args() /* const */ { return arguments; }
+ const TQValueList<TQCString> &args() /* const */ { return arguments; }
/**
* Controls whether the started process should drop any
@@ -490,7 +490,7 @@ public:
* @param name the name of the environment variable
* @param value the new value for the environment variable
*/
- void setEnvironment(const QString &name, const QString &value);
+ void setEnvironment(const TQString &name, const TQString &value);
/**
* Changes the current working directory (CWD) of the process
@@ -498,7 +498,7 @@ public:
* This function must be called before starting the process.
* @param dir the new directory
*/
- void setWorkingDirectory(const QString &dir);
+ void setWorkingDirectory(const TQString &dir);
/**
* Specify whether to start the command via a shell or directly.
@@ -527,7 +527,7 @@ public:
* @return the quoted argument
* @since 3.1
*/
- static QString quote(const QString &arg);
+ static TQString quote(const TQString &arg);
/**
* Detaches KProcess from child process. All communication is closed.
@@ -601,7 +601,7 @@ signals:
* data structures before returning from the slot.
* Example:
* \code
- * QString myBuf = QString::fromLatin1(buffer, buflen);
+ * TQString myBuf = TQString::fromLatin1(buffer, buflen);
* \endcode
**/
void receivedStdout(KProcess *proc, char *buffer, int buflen);
@@ -671,7 +671,7 @@ protected slots:
/**
* Called when another bulk of data can be sent to the child's
* stdin. If there is no more data to be sent to stdin currently
- * available, this function must disable the QSocketNotifier innot.
+ * available, this function must disable the TQSocketNotifier innot.
* @param dummy ignore this argument
*/
void slotSendData(int dummy); // KDE 4: remove dummy
@@ -688,7 +688,7 @@ protected:
* The list of the process' command line arguments. The first entry
* in this list is the executable itself.
*/
- QValueList<QCString> arguments;
+ TQValueList<TQCString> arguments;
/**
* How to run the process (Block, NotifyOnExit, DontCare). You should
* not modify this data member directly from derived classes.
@@ -830,15 +830,15 @@ protected:
/**
* The socket notifier for in[1].
*/
- QSocketNotifier *innot;
+ TQSocketNotifier *innot;
/**
* The socket notifier for out[0].
*/
- QSocketNotifier *outnot;
+ TQSocketNotifier *outnot;
/**
* The socket notifier for err[0].
*/
- QSocketNotifier *errnot;
+ TQSocketNotifier *errnot;
/**
* Lists the communication links that are activated for the child
@@ -917,10 +917,10 @@ public:
virtual bool start(RunMode runmode = NotifyOnExit,
Communication comm = NoCommunication);
- static QString quote(const QString &arg);
+ static TQString quote(const TQString &arg);
private:
- QCString shell;
+ TQCString shell;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdecore/kprocio.cpp b/kdecore/kprocio.cpp
index d6fe33d89..15a2f70bc 100644
--- a/kdecore/kprocio.cpp
+++ b/kdecore/kprocio.cpp
@@ -27,7 +27,7 @@
#include "kprocio.h"
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
class KProcIOPrivate {
public:
@@ -35,7 +35,7 @@ public:
KProcess::Communication comm;
};
-KProcIO::KProcIO ( QTextCodec *_codec)
+KProcIO::KProcIO ( TQTextCodec *_codec)
: codec(_codec), d(new KProcIOPrivate)
{
rbi=0;
@@ -44,7 +44,7 @@ KProcIO::KProcIO ( QTextCodec *_codec)
if (!codec)
{
- codec = QTextCodec::codecForName("ISO 8859-1");
+ codec = TQTextCodec::codecForName("ISO 8859-1");
if (!codec)
{
kdError(174) << "Can't create ISO 8859-1 codec!" << endl;
@@ -67,14 +67,14 @@ KProcIO::resetAll ()
rbi=0;
readsignalon=writeready=true;
- disconnect (this, SIGNAL (receivedStdout (KProcess *, char *, int)),
- this, SLOT (received (KProcess *, char *, int)));
+ disconnect (this, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)),
+ this, TQT_SLOT (received (KProcess *, char *, int)));
- disconnect (this, SIGNAL (receivedStderr (KProcess *, char *, int)),
- this, SLOT (received (KProcess *, char *, int)));
+ disconnect (this, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)),
+ this, TQT_SLOT (received (KProcess *, char *, int)));
- disconnect (this, SIGNAL (wroteStdin(KProcess *)),
- this, SLOT (sent (KProcess *)));
+ disconnect (this, TQT_SIGNAL (wroteStdin(KProcess *)),
+ this, TQT_SLOT (sent (KProcess *)));
outbuffer.clear();
@@ -87,29 +87,29 @@ void KProcIO::setComm (Communication comm)
bool KProcIO::start (RunMode runmode, bool includeStderr)
{
- connect (this, SIGNAL (receivedStdout (KProcess *, char *, int)),
- this, SLOT (received (KProcess *, char *, int)));
+ connect (this, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)),
+ this, TQT_SLOT (received (KProcess *, char *, int)));
if (includeStderr)
{
- connect (this, SIGNAL (receivedStderr (KProcess *, char *, int)),
- this, SLOT (received (KProcess *, char *, int)));
+ connect (this, TQT_SIGNAL (receivedStderr (KProcess *, char *, int)),
+ this, TQT_SLOT (received (KProcess *, char *, int)));
}
- connect (this, SIGNAL (wroteStdin(KProcess *)),
- this, SLOT (sent (KProcess *)));
+ connect (this, TQT_SIGNAL (wroteStdin(KProcess *)),
+ this, TQT_SLOT (sent (KProcess *)));
return KProcess::start (runmode, d->comm);
}
-bool KProcIO::writeStdin (const QString &line, bool appendnewline)
+bool KProcIO::writeStdin (const TQString &line, bool appendnewline)
{
return writeStdin(codec->fromUnicode(line), appendnewline);
}
-bool KProcIO::writeStdin (const QCString &line, bool appendnewline)
+bool KProcIO::writeStdin (const TQCString &line, bool appendnewline)
{
- QCString *qs = new QCString(line);
+ TQCString *qs = new TQCString(line);
if (appendnewline)
{
@@ -123,7 +123,7 @@ bool KProcIO::writeStdin (const QCString &line, bool appendnewline)
return true;
}
- QByteArray *b = (QByteArray *) qs;
+ TQByteArray *b = (TQByteArray *) qs;
b->truncate(l); // Strip trailing null
outbuffer.append(b);
@@ -136,11 +136,11 @@ bool KProcIO::writeStdin (const QCString &line, bool appendnewline)
return true;
}
-bool KProcIO::writeStdin(const QByteArray &data)
+bool KProcIO::writeStdin(const TQByteArray &data)
{
if (!data.size())
return true;
- QByteArray *b = new QByteArray(data);
+ TQByteArray *b = new TQByteArray(data);
outbuffer.append(b);
if (writeready)
@@ -173,7 +173,7 @@ void KProcIO::sent(KProcess *)
}
else
{
- QByteArray *b = outbuffer.first();
+ TQByteArray *b = outbuffer.first();
if (!b)
{
closeStdin();
@@ -188,7 +188,7 @@ void KProcIO::sent(KProcess *)
void KProcIO::received (KProcess *, char *buffer, int buflen)
{
- recvbuffer += QCString(buffer, buflen+1);
+ recvbuffer += TQCString(buffer, buflen+1);
controlledEmission();
}
@@ -222,7 +222,7 @@ void KProcIO::enableReadSignals (bool enable)
emit readReady (this);
}
-int KProcIO::readln (QString &line, bool autoAck, bool *partial)
+int KProcIO::readln (TQString &line, bool autoAck, bool *partial)
{
int len;
diff --git a/kdecore/kprocio.h b/kdecore/kprocio.h
index 192c16fc1..1cd397deb 100644
--- a/kdecore/kprocio.h
+++ b/kdecore/kprocio.h
@@ -18,9 +18,9 @@
#ifndef KPROCIO_H_
#define KPROCIO_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <kprocess.h>
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include "kdelibs_export.h"
class KProcIOPrivate;
@@ -55,7 +55,7 @@ public:
/**
* Constructor
*/
- KProcIO ( QTextCodec *codec = 0 );
+ KProcIO ( TQTextCodec *codec = 0 );
/**
* Destructor
@@ -93,7 +93,7 @@ public:
* @param appendnewline if true, a newline '\\n' is appended.
* @return true if successful, false otherwise
**/
- bool writeStdin(const QString &line, bool appendnewline=true);
+ bool writeStdin(const TQString &line, bool appendnewline=true);
/**
* Writes text to stdin of the process.
@@ -101,14 +101,14 @@ public:
* @param appendnewline if true, a newline '\\n' is appended.
* @return true if successful, false otherwise
**/
- bool writeStdin(const QCString &line, bool appendnewline);
+ bool writeStdin(const TQCString &line, bool appendnewline);
/**
* Writes data to stdin of the process.
* @param data Data to write.
* @return true if successful, false otherwise
**/
- bool writeStdin(const QByteArray &data);
+ bool writeStdin(const TQByteArray &data);
//I like fputs better -- it's the same as writeStdin
//inline
@@ -120,7 +120,7 @@ public:
* @return true if successful, false otherwise
* @deprecated
**/
- KDE_DEPRECATED bool fputs (const QString &line, bool AppendNewLine=true)
+ KDE_DEPRECATED bool fputs (const TQString &line, bool AppendNewLine=true)
{ return writeStdin(line, AppendNewLine); }
/**
@@ -149,7 +149,7 @@ public:
* false if the line contains a '\\n' and false otherwise.
* @return the number of characters read, or -1 if no data is available.
**/
- int readln (QString &line, bool autoAck=true, bool *partial=0);
+ int readln (TQString &line, bool autoAck=true, bool *partial=0);
/**
* This function calls readln().
@@ -159,7 +159,7 @@ public:
* @deprecated use readln. Note that it has an inverted autoAck default,
* though.
**/
- KDE_DEPRECATED int fgets (QString &line, bool autoAck=false)
+ KDE_DEPRECATED int fgets (TQString &line, bool autoAck=false)
{ return readln (line, autoAck); }
/**
@@ -195,9 +195,9 @@ signals:
void readReady(KProcIO *pio);
protected:
- QPtrList<QByteArray> outbuffer;
- QCString recvbuffer;
- QTextCodec *codec;
+ TQPtrList<TQByteArray> outbuffer;
+ TQCString recvbuffer;
+ TQTextCodec *codec;
int rbi;
bool needreadsignal, readsignalon, writeready;
diff --git a/kdecore/kprotocolinfo_kdecore.cpp b/kdecore/kprotocolinfo_kdecore.cpp
index 0c40c36d3..203f455a1 100644
--- a/kdecore/kprotocolinfo_kdecore.cpp
+++ b/kdecore/kprotocolinfo_kdecore.cpp
@@ -36,8 +36,8 @@
class KProtocolInfo::KProtocolInfoPrivate
{
public:
- QString docPath;
- QString protClass;
+ TQString docPath;
+ TQString protClass;
KProtocolInfo::ExtraFieldList extraFields;
bool showPreviews;
bool canRenameFromFile;
@@ -45,18 +45,18 @@ public:
bool canDeleteRecursive;
bool fileNameUsedForCopying; // true if using UDS_NAME, false if using KURL::fileName() [default]
KURL::URIMode uriMode;
- QStringList capabilities;
- QString proxyProtocol;
+ TQStringList capabilities;
+ TQString proxyProtocol;
};
//
// Internal functions:
//
-KProtocolInfo::KProtocolInfo(const QString &path)
+KProtocolInfo::KProtocolInfo(const TQString &path)
: KSycocaEntry(path)
{
d = new KProtocolInfoPrivate;
- QString fullPath = locate("services", path);
+ TQString fullPath = locate("services", path);
KSimpleConfig config( fullPath, true );
config.setGroup( "Protocol" );
@@ -89,7 +89,7 @@ KProtocolInfo::KProtocolInfo(const QString &path)
m_config = config.readEntry( "config", m_name );
m_maxSlaves = config.readNumEntry( "maxInstances", 1);
- QString tmp = config.readEntry( "input" );
+ TQString tmp = config.readEntry( "input" );
if ( tmp == "filesystem" )
m_inputType = KProtocolInfo::T_FILESYSTEM;
else if ( tmp == "stream" )
@@ -110,17 +110,17 @@ KProtocolInfo::KProtocolInfo(const QString &path)
if (d->protClass[0] != ':')
d->protClass.prepend(':');
- QStringList extraNames = config.readListEntry( "ExtraNames" );
- QStringList extraTypes = config.readListEntry( "ExtraTypes" );
- QStringList::Iterator it = extraNames.begin();
- QStringList::Iterator typeit = extraTypes.begin();
+ TQStringList extraNames = config.readListEntry( "ExtraNames" );
+ TQStringList extraTypes = config.readListEntry( "ExtraTypes" );
+ TQStringList::Iterator it = extraNames.begin();
+ TQStringList::Iterator typeit = extraTypes.begin();
for( ; it != extraNames.end() && typeit != extraTypes.end(); ++it, ++typeit ) {
d->extraFields.append( ExtraField( *it, *typeit ) );
}
d->showPreviews = config.readBoolEntry( "ShowPreviews", d->protClass == ":local" );
- tmp = config.readEntry( "URIMode", QString::null ).lower();
+ tmp = config.readEntry( "URIMode", TQString::null ).lower();
if (tmp == "rawuri")
d->uriMode = KURL::RawURI;
else if (tmp == "mailto")
@@ -134,7 +134,7 @@ KProtocolInfo::KProtocolInfo(const QString &path)
d->proxyProtocol = config.readEntry( "ProxiedBy" );
}
-KProtocolInfo::KProtocolInfo( QDataStream& _str, int offset) :
+KProtocolInfo::KProtocolInfo( TQDataStream& _str, int offset) :
KSycocaEntry( _str, offset)
{
d = new KProtocolInfoPrivate;
@@ -147,7 +147,7 @@ KProtocolInfo::~KProtocolInfo()
}
void
-KProtocolInfo::load( QDataStream& _str)
+KProtocolInfo::load( TQDataStream& _str)
{
// You may add new fields at the end. Make sure to update the version
// number in ksycoca.h
@@ -200,7 +200,7 @@ KProtocolInfo::load( QDataStream& _str)
}
void
-KProtocolInfo::save( QDataStream& _str)
+KProtocolInfo::save( TQDataStream& _str)
{
KSycocaEntry::save( _str );
@@ -259,12 +259,12 @@ KProtocolInfo::save( QDataStream& _str)
// Static functions:
//
-QStringList KProtocolInfo::protocols()
+TQStringList KProtocolInfo::protocols()
{
return KProtocolInfoFactory::self()->protocols();
}
-bool KProtocolInfo::isSourceProtocol( const QString& _protocol )
+bool KProtocolInfo::isSourceProtocol( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -273,7 +273,7 @@ bool KProtocolInfo::isSourceProtocol( const QString& _protocol )
return prot->m_isSourceProtocol;
}
-bool KProtocolInfo::isFilterProtocol( const QString& _protocol )
+bool KProtocolInfo::isFilterProtocol( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -282,7 +282,7 @@ bool KProtocolInfo::isFilterProtocol( const QString& _protocol )
return !prot->m_isSourceProtocol;
}
-bool KProtocolInfo::isHelperProtocol( const QString& _protocol )
+bool KProtocolInfo::isHelperProtocol( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -291,13 +291,13 @@ bool KProtocolInfo::isHelperProtocol( const QString& _protocol )
return prot->m_isHelperProtocol;
}
-bool KProtocolInfo::isKnownProtocol( const QString& _protocol )
+bool KProtocolInfo::isKnownProtocol( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
return ( prot != 0);
}
-bool KProtocolInfo::supportsListing( const QString& _protocol )
+bool KProtocolInfo::supportsListing( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -306,16 +306,16 @@ bool KProtocolInfo::supportsListing( const QString& _protocol )
return prot->m_supportsListing;
}
-QStringList KProtocolInfo::listing( const QString& _protocol )
+TQStringList KProtocolInfo::listing( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QStringList();
+ return TQStringList();
return prot->m_listing;
}
-bool KProtocolInfo::supportsReading( const QString& _protocol )
+bool KProtocolInfo::supportsReading( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -324,7 +324,7 @@ bool KProtocolInfo::supportsReading( const QString& _protocol )
return prot->m_supportsReading;
}
-bool KProtocolInfo::supportsWriting( const QString& _protocol )
+bool KProtocolInfo::supportsWriting( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -333,7 +333,7 @@ bool KProtocolInfo::supportsWriting( const QString& _protocol )
return prot->m_supportsWriting;
}
-bool KProtocolInfo::supportsMakeDir( const QString& _protocol )
+bool KProtocolInfo::supportsMakeDir( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -342,7 +342,7 @@ bool KProtocolInfo::supportsMakeDir( const QString& _protocol )
return prot->m_supportsMakeDir;
}
-bool KProtocolInfo::supportsDeleting( const QString& _protocol )
+bool KProtocolInfo::supportsDeleting( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -351,7 +351,7 @@ bool KProtocolInfo::supportsDeleting( const QString& _protocol )
return prot->m_supportsDeleting;
}
-bool KProtocolInfo::supportsLinking( const QString& _protocol )
+bool KProtocolInfo::supportsLinking( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -360,7 +360,7 @@ bool KProtocolInfo::supportsLinking( const QString& _protocol )
return prot->m_supportsLinking;
}
-bool KProtocolInfo::supportsMoving( const QString& _protocol )
+bool KProtocolInfo::supportsMoving( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -369,7 +369,7 @@ bool KProtocolInfo::supportsMoving( const QString& _protocol )
return prot->m_supportsMoving;
}
-bool KProtocolInfo::canCopyFromFile( const QString& _protocol )
+bool KProtocolInfo::canCopyFromFile( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -379,7 +379,7 @@ bool KProtocolInfo::canCopyFromFile( const QString& _protocol )
}
-bool KProtocolInfo::canCopyToFile( const QString& _protocol )
+bool KProtocolInfo::canCopyToFile( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -388,25 +388,25 @@ bool KProtocolInfo::canCopyToFile( const QString& _protocol )
return prot->m_canCopyToFile;
}
-QString KProtocolInfo::icon( const QString& _protocol )
+TQString KProtocolInfo::icon( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::fromLatin1("unknown");
+ return TQString::fromLatin1("unknown");
return prot->m_icon;
}
-QString KProtocolInfo::config( const QString& _protocol )
+TQString KProtocolInfo::config( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
- return QString("kio_%1rc").arg(prot->m_config);
+ return TQString("kio_%1rc").arg(prot->m_config);
}
-int KProtocolInfo::maxSlaves( const QString& _protocol )
+int KProtocolInfo::maxSlaves( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -415,16 +415,16 @@ int KProtocolInfo::maxSlaves( const QString& _protocol )
return prot->m_maxSlaves;
}
-QString KProtocolInfo::defaultMimetype( const QString& _protocol )
+TQString KProtocolInfo::defaultMimetype( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->m_defaultMimetype;
}
-bool KProtocolInfo::determineMimetypeFromExtension( const QString &_protocol )
+bool KProtocolInfo::determineMimetypeFromExtension( const TQString &_protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol( _protocol );
if ( !prot )
@@ -433,16 +433,16 @@ bool KProtocolInfo::determineMimetypeFromExtension( const QString &_protocol )
return prot->m_determineMimetypeFromExtension;
}
-QString KProtocolInfo::exec( const QString& _protocol )
+TQString KProtocolInfo::exec( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->m_exec;
}
-KProtocolInfo::Type KProtocolInfo::inputType( const QString& _protocol )
+KProtocolInfo::Type KProtocolInfo::inputType( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -451,7 +451,7 @@ KProtocolInfo::Type KProtocolInfo::inputType( const QString& _protocol )
return prot->m_inputType;
}
-KProtocolInfo::Type KProtocolInfo::outputType( const QString& _protocol )
+KProtocolInfo::Type KProtocolInfo::outputType( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -469,25 +469,25 @@ KProtocolInfo::ExtraFieldList KProtocolInfo::extraFields( const KURL &url )
return prot->d->extraFields;
}
-QString KProtocolInfo::docPath( const QString& _protocol )
+TQString KProtocolInfo::docPath( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->d->docPath;
}
-QString KProtocolInfo::protocolClass( const QString& _protocol )
+TQString KProtocolInfo::protocolClass( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->d->protClass;
}
-bool KProtocolInfo::showFilePreview( const QString& _protocol )
+bool KProtocolInfo::showFilePreview( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -496,7 +496,7 @@ bool KProtocolInfo::showFilePreview( const QString& _protocol )
return prot->d->showPreviews;
}
-KURL::URIMode KProtocolInfo::uriParseMode( const QString& _protocol )
+KURL::URIMode KProtocolInfo::uriParseMode( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
@@ -505,20 +505,20 @@ KURL::URIMode KProtocolInfo::uriParseMode( const QString& _protocol )
return prot->d->uriMode;
}
-QStringList KProtocolInfo::capabilities( const QString& _protocol )
+TQStringList KProtocolInfo::capabilities( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QStringList();
+ return TQStringList();
return prot->d->capabilities;
}
-QString KProtocolInfo::proxiedBy( const QString& _protocol )
+TQString KProtocolInfo::proxiedBy( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return QString::null;
+ return TQString::null;
return prot->d->proxyProtocol;
}
@@ -543,13 +543,13 @@ KProtocolInfo::FileNameUsedForCopying KProtocolInfo::fileNameUsedForCopying() co
return d->fileNameUsedForCopying ? Name : FromURL;
}
-QDataStream& operator>>( QDataStream& s, KProtocolInfo::ExtraField& field ) {
+TQDataStream& operator>>( TQDataStream& s, KProtocolInfo::ExtraField& field ) {
s >> field.name;
s >> field.type;
return s;
}
-QDataStream& operator<<( QDataStream& s, const KProtocolInfo::ExtraField& field ) {
+TQDataStream& operator<<( TQDataStream& s, const KProtocolInfo::ExtraField& field ) {
s << field.name;
s << field.type;
return s;
diff --git a/kdecore/kprotocolinfofactory.cpp b/kdecore/kprotocolinfofactory.cpp
index fc2544853..e47cbb881 100644
--- a/kdecore/kprotocolinfofactory.cpp
+++ b/kdecore/kprotocolinfofactory.cpp
@@ -45,7 +45,7 @@ KProtocolInfoFactory::createEntry(int offset)
{
KProtocolInfo *info = 0;
KSycocaType type;
- QDataStream *str = KSycoca::self()->findEntry(offset, type);
+ TQDataStream *str = KSycoca::self()->findEntry(offset, type);
switch (type)
{
case KST_KProtocolInfo:
@@ -63,9 +63,9 @@ KProtocolInfoFactory::createEntry(int offset)
}
-QStringList KProtocolInfoFactory::protocols()
+TQStringList KProtocolInfoFactory::protocols()
{
- QStringList res;
+ TQStringList res;
KSycocaEntry::List list = allEntries();
for( KSycocaEntry::List::Iterator it = list.begin();
@@ -82,11 +82,11 @@ QStringList KProtocolInfoFactory::protocols()
}
KProtocolInfo *
-KProtocolInfoFactory::findProtocol(const QString &protocol)
+KProtocolInfoFactory::findProtocol(const TQString &protocol)
{
if (!m_sycocaDict) return 0; // Error!
- QMap<QString,KProtocolInfo::Ptr>::iterator it = m_cache.find(protocol);
+ TQMap<TQString,KProtocolInfo::Ptr>::iterator it = m_cache.find(protocol);
if (it != m_cache.end())
return (*it);
diff --git a/kdecore/kprotocolinfofactory.h b/kdecore/kprotocolinfofactory.h
index 822f5b455..f710e8ecc 100644
--- a/kdecore/kprotocolinfofactory.h
+++ b/kdecore/kprotocolinfofactory.h
@@ -22,9 +22,9 @@
#include "../kio/kio/kprotocolinfo.h"
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <ksycocafactory.h>
@@ -58,19 +58,19 @@ public:
* @param protocol the protocol to search for
* @return the pointer to the KProtocolInfo, or 0 if not found
*/
- KProtocolInfo *findProtocol(const QString &protocol);
+ KProtocolInfo *findProtocol(const TQString &protocol);
/**
* Returns list of all known protocols.
* @return a list of all protocols
*/
- QStringList protocols();
+ TQStringList protocols();
protected:
/**
* @internal Not used.
*/
- virtual KSycocaEntry *createEntry(const QString &, const char *)
+ virtual KSycocaEntry *createEntry(const TQString &, const char *)
{ return 0; }
/**
@@ -81,7 +81,7 @@ protected:
protected:
static KProtocolInfoFactory *_self;
- QMap<QString,KProtocolInfo::Ptr> m_cache;
+ TQMap<TQString,KProtocolInfo::Ptr> m_cache;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/kdecore/kpty.cpp b/kdecore/kpty.cpp
index af83e9eab..b6c3782c4 100644
--- a/kdecore/kpty.cpp
+++ b/kdecore/kpty.cpp
@@ -183,7 +183,7 @@ struct KPtyPrivate {
int slaveFd;
struct winsize winSize;
- QCString ttyName;
+ TQCString ttyName;
};
/////////////////////////////
@@ -217,7 +217,7 @@ bool KPty::setPty(int pty_master)
bool KPty::_attachPty(int pty_master)
{
- QCString ptyName;
+ TQCString ptyName;
kdWarning(175)
<< "_attachPty() " << pty_master << endl;
@@ -309,7 +309,7 @@ bool KPty::open()
if (d->masterFd >= 0)
return true;
- QCString ptyName;
+ TQCString ptyName;
// Find a master pty that we can open ////////////////////////////////
@@ -571,7 +571,7 @@ int KPty::slaveFd() const
bool KPty::chownpty(bool grant)
{
KProcess proc;
- proc << locate("exe", BASE_CHOWN) << (grant?"--grant":"--revoke") << QString::number(d->masterFd);
+ proc << locate("exe", BASE_CHOWN) << (grant?"--grant":"--revoke") << TQString::number(d->masterFd);
return proc.start(KProcess::Block) && proc.normalExit() && !proc.exitStatus();
}
diff --git a/kdecore/kpty.h b/kdecore/kpty.h
index a2ae33b28..5b9a94112 100644
--- a/kdecore/kpty.h
+++ b/kdecore/kpty.h
@@ -23,7 +23,7 @@
#ifndef __kpty_h__
#define __kpty_h__
-#include <qglobal.h>
+#include <tqglobal.h>
#include <kdelibs_export.h>
#ifdef Q_OS_UNIX
diff --git a/kdecore/kqiodevicegzip_p.cpp b/kdecore/kqiodevicegzip_p.cpp
index cb0cd2fe6..2f949b9ee 100644
--- a/kdecore/kqiodevicegzip_p.cpp
+++ b/kdecore/kqiodevicegzip_p.cpp
@@ -19,10 +19,10 @@
// TODO: more error report and control
-#include <qstring.h>
+#include <tqstring.h>
#include "kqiodevicegzip_p.h"
-KQIODeviceGZip::KQIODeviceGZip(const QString& filename)
+KQIODeviceGZip::KQIODeviceGZip(const TQString& filename)
{
m_gzfile=0;
m_ungetchar=-1;
@@ -46,11 +46,11 @@ bool KQIODeviceGZip::open(int mode)
if (IO_ReadOnly==mode)
{
- m_gzfile=gzopen(QFile::encodeName(m_filename),"rb");
+ m_gzfile=gzopen(TQFile::encodeName(m_filename),"rb");
}
else if (IO_WriteOnly==mode)
{
- m_gzfile=gzopen(QFile::encodeName(m_filename),"wb9"); // Always set best compression
+ m_gzfile=gzopen(TQFile::encodeName(m_filename),"wb9"); // Always set best compression
}
else
{
@@ -78,19 +78,19 @@ void KQIODeviceGZip::flush(void)
}
}
-QIODevice::Offset KQIODeviceGZip::size(void) const
+TQIODevice::Offset KQIODeviceGZip::size(void) const
{
return 0; // You cannot determine size!
}
-QIODevice::Offset KQIODeviceGZip::at() const
+TQIODevice::Offset KQIODeviceGZip::at() const
{
if (!m_gzfile)
return 0;
return gztell(m_gzfile);
}
-bool KQIODeviceGZip::at(QIODevice::Offset pos)
+bool KQIODeviceGZip::at(TQIODevice::Offset pos)
{
if (!m_gzfile)
return false;
diff --git a/kdecore/kqiodevicegzip_p.h b/kdecore/kqiodevicegzip_p.h
index c8ebe9be9..02c3fe039 100644
--- a/kdecore/kqiodevicegzip_p.h
+++ b/kdecore/kqiodevicegzip_p.h
@@ -20,22 +20,22 @@
#ifndef KDELIBS_KQIODEVICEGZIP_H
#define KDELIBS_KQIODEVICEGZIP_H
-#include <qiodevice.h>
-#include <qstring.h>
-#include <qfile.h>
+#include <tqiodevice.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <zlib.h>
/**
- * \brief QIODevice class for a gzipped file
+ * \brief TQIODevice class for a gzipped file
* \internal This class is internal to KDE.
* The class KFilterDev should be used instead.
*/
class KQIODeviceGZip : public QIODevice
{
public:
- KQIODeviceGZip(const QString& filename);
+ KQIODeviceGZip(const TQString& filename);
~KQIODeviceGZip(void);
bool open(int mode);
@@ -57,7 +57,7 @@ public:
private:
gzFile m_gzfile;
int m_ungetchar;
- QString m_filename;
+ TQString m_filename;
};
diff --git a/kdecore/krandomsequence.cpp b/kdecore/krandomsequence.cpp
index 415329e60..8e4c88297 100644
--- a/kdecore/krandomsequence.cpp
+++ b/kdecore/krandomsequence.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "krandomsequence.h"
#include "kapplication.h"
@@ -221,12 +221,12 @@ class KRandomSequenceList : public QGList
{
friend class KRandomSequence;
public:
- KRandomSequenceList() : QGList() { }
- virtual void deleteItem( QPtrCollection::Item ) {}
+ KRandomSequenceList() : TQGList() { }
+ virtual void deleteItem( TQPtrCollection::Item ) {}
};
void
-KRandomSequence::randomize(QGList *_list)
+KRandomSequence::randomize(TQGList *_list)
{
KRandomSequenceList *list = (KRandomSequenceList *)_list;
KRandomSequenceList l;
diff --git a/kdecore/krandomsequence.h b/kdecore/krandomsequence.h
index 7d18f732d..877df7a1c 100644
--- a/kdecore/krandomsequence.h
+++ b/kdecore/krandomsequence.h
@@ -104,7 +104,7 @@ public:
*
* @param list the list whose order will be modified
*/
- void randomize(QGList *list);
+ void randomize(TQGList *list);
/**
* Modulate the random sequence.
diff --git a/kdecore/kregexp.h b/kdecore/kregexp.h
index 74489fa3f..c3ed8ff3d 100644
--- a/kdecore/kregexp.h
+++ b/kdecore/kregexp.h
@@ -24,12 +24,12 @@ class KRegExpPrivate;
/**
* @deprecated
- * Please use QRegExp instead.
+ * Please use TQRegExp instead.
*
* Regular expression (regexp) matching with back-references.
*
* This was implemented
- * because QRegExp did not support back-references. It now does and
+ * because TQRegExp did not support back-references. It now does and
* is recommended over KRegExp because of the unicode support and the
* more powerful API.
*
diff --git a/kdecore/krfcdate.cpp b/kdecore/krfcdate.cpp
index 4e214a81f..fc57bc2d3 100644
--- a/kdecore/krfcdate.cpp
+++ b/kdecore/krfcdate.cpp
@@ -27,7 +27,7 @@
#include <ctype.h>
#include <stdlib.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <krfcdate.h>
@@ -95,7 +95,7 @@ static const struct {
};
time_t
-KRFCDate::parseDate(const QString &_date)
+KRFCDate::parseDate(const TQString &_date)
{
if (_date.isEmpty())
return 0;
@@ -340,7 +340,7 @@ KRFCDate::parseDate(const QString &_date)
}
time_t
-KRFCDate::parseDateISO8601( const QString& input_ )
+KRFCDate::parseDateISO8601( const TQString& input_ )
{
if (input_.isEmpty())
return 0;
@@ -360,7 +360,7 @@ KRFCDate::parseDateISO8601( const QString& input_ )
int offset = 0;
- QString input = input_;
+ TQString input = input_;
// First find the 'T' separator, if any.
int tPos = input.find('T');
@@ -380,11 +380,11 @@ KRFCDate::parseDateISO8601( const QString& input_ )
// Now parse the date part.
- QString dateString = input.left(tPos).stripWhiteSpace();
+ TQString dateString = input.left(tPos).stripWhiteSpace();
- QString timeString = input.mid(tPos + 1).stripWhiteSpace();
+ TQString timeString = input.mid(tPos + 1).stripWhiteSpace();
- QStringList l = QStringList::split('-', dateString);
+ TQStringList l = TQStringList::split('-', dateString);
if (l.size() < 3)
return 0;
@@ -403,7 +403,7 @@ KRFCDate::parseDateISO8601( const QString& input_ )
int plusPos = timeString.findRev('+');
if (-1 != plusPos) {
- QString offsetString = timeString.mid(plusPos + 1);
+ TQString offsetString = timeString.mid(plusPos + 1);
offset = offsetString.left(2).toUInt() * 60 + offsetString.right(2).toUInt();
@@ -412,7 +412,7 @@ KRFCDate::parseDateISO8601( const QString& input_ )
int minusPos = timeString.findRev('-');
if (-1 != minusPos) {
- QString offsetString = timeString.mid(minusPos + 1);
+ TQString offsetString = timeString.mid(minusPos + 1);
offset = - int(offsetString.left(2).toUInt() * 60 + offsetString.right(2).toUInt());
@@ -429,7 +429,7 @@ KRFCDate::parseDateISO8601( const QString& input_ )
// Now parse the time part.
- l = QStringList::split(':', timeString);
+ l = TQStringList::split(':', timeString);
if (l.size() < 3)
return 0;
@@ -481,13 +481,13 @@ static const char * const month_names[] = {
};
-QCString KRFCDate::rfc2822DateString(time_t utcTime, int utcOffset)
+TQCString KRFCDate::rfc2822DateString(time_t utcTime, int utcOffset)
{
utcTime += utcOffset * 60;
tm *tM = gmtime(&utcTime);
char sgn = (utcOffset < 0) ? '-' : '+';
int z = (utcOffset < 0) ? -utcOffset : utcOffset;
- QCString dateStr;
+ TQCString dateStr;
dateStr.sprintf("%s, %02d %s %04d %02d:%02d:%02d %c%02d%02d",
day_names[tM->tm_wday], tM->tm_mday,
@@ -499,7 +499,7 @@ QCString KRFCDate::rfc2822DateString(time_t utcTime, int utcOffset)
}
-QCString KRFCDate::rfc2822DateString(time_t utcTime)
+TQCString KRFCDate::rfc2822DateString(time_t utcTime)
{
return rfc2822DateString(utcTime, localUTCOffset());
}
diff --git a/kdecore/krfcdate.h b/kdecore/krfcdate.h
index b8884eb0f..ade819622 100644
--- a/kdecore/krfcdate.h
+++ b/kdecore/krfcdate.h
@@ -20,7 +20,7 @@
#ifndef _KRFCDATE_H_
#define _KRFCDATE_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <time.h>
#include "kdelibs_export.h"
@@ -44,7 +44,7 @@ public:
* @param date the date to parse
* @return the date, or 0 if not possible
*/
- static time_t parseDate(const QString &date);
+ static time_t parseDate(const TQString &date);
/**
* This function tries to parse a string containing a date/time in
@@ -61,7 +61,7 @@ public:
* @param date the date to parse
* @return the date, or 0 if not possible
*/
- static time_t parseDateISO8601(const QString &date);
+ static time_t parseDateISO8601(const TQString &date);
/**
* Returns the local timezone offset to UTC in minutes
@@ -79,7 +79,7 @@ public:
* @return the string representation of the date
*/
- static QCString rfc2822DateString(time_t utcTime, int utcOffset);
+ static TQCString rfc2822DateString(time_t utcTime, int utcOffset);
/**
@@ -93,7 +93,7 @@ public:
* @return the string representation of the date
*/
- static QCString rfc2822DateString(time_t utcTime);
+ static TQCString rfc2822DateString(time_t utcTime);
};
diff --git a/kdecore/krootprop.cpp b/kdecore/krootprop.cpp
index aca5b8255..2d545f30b 100644
--- a/kdecore/krootprop.cpp
+++ b/kdecore/krootprop.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include "config.h"
#ifdef Q_WS_X11 // not needed anyway :-)
@@ -27,12 +27,12 @@
#include "klocale.h"
#include "kcharsets.h"
#include "kapplication.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
-KRootProp::KRootProp(const QString& rProp )
+KRootProp::KRootProp(const TQString& rProp )
{
atom = 0;
dirty = false;
@@ -50,15 +50,15 @@ void KRootProp::sync()
if ( !dirty )
return;
- QString propString;
+ TQString propString;
if ( !propDict.isEmpty() )
{
- QMap<QString,QString>::Iterator it = propDict.begin();
- QString keyvalue;
+ TQMap<TQString,TQString>::Iterator it = propDict.begin();
+ TQString keyvalue;
while ( it != propDict.end() )
{
- keyvalue = QString( "%1=%2\n").arg(it.key()).arg(it.data());
+ keyvalue = TQString( "%1=%2\n").arg(it.key()).arg(it.data());
propString += keyvalue;
++it;
}
@@ -71,7 +71,7 @@ void KRootProp::sync()
XFlush( qt_xdisplay() );
}
-void KRootProp::setProp( const QString& rProp )
+void KRootProp::setProp( const TQString& rProp )
{
Atom type;
int format;
@@ -91,7 +91,7 @@ void KRootProp::setProp( const QString& rProp )
atom = XInternAtom( qt_xdisplay(), rProp.utf8(), False);
- QString s;
+ TQString s;
offset = 0; bytes_after = 1;
while (bytes_after != 0)
{
@@ -100,7 +100,7 @@ void KRootProp::setProp( const QString& rProp )
False, XA_STRING, &type, &format, &nitems, &bytes_after,
&buf) == Success && buf)
{
- s += QString::fromUtf8((const char*)buf);
+ s += TQString::fromUtf8((const char*)buf);
offset += nitems/4;
XFree(buf);
}
@@ -109,10 +109,10 @@ void KRootProp::setProp( const QString& rProp )
// Parse through the property string stripping out key value pairs
// and putting them in the dictionary
- QString keypair;
+ TQString keypair;
int i=0;
- QString key;
- QString value;
+ TQString key;
+ TQString value;
while(s.length() >0 )
{
@@ -142,7 +142,7 @@ void KRootProp::setProp( const QString& rProp )
}
-QString KRootProp::prop() const
+TQString KRootProp::prop() const
{
return property_;
}
@@ -157,8 +157,8 @@ void KRootProp::destroy()
}
}
-QString KRootProp::readEntry( const QString& rKey,
- const QString& pDefault ) const
+TQString KRootProp::readEntry( const TQString& rKey,
+ const TQString& pDefault ) const
{
if( propDict.contains( rKey ) )
return propDict[ rKey ];
@@ -166,10 +166,10 @@ QString KRootProp::readEntry( const QString& rKey,
return pDefault;
}
-int KRootProp::readNumEntry( const QString& rKey, int nDefault ) const
+int KRootProp::readNumEntry( const TQString& rKey, int nDefault ) const
{
- QString aValue = readEntry( rKey );
+ TQString aValue = readEntry( rKey );
if( !aValue.isNull() )
{
bool ok;
@@ -182,16 +182,16 @@ int KRootProp::readNumEntry( const QString& rKey, int nDefault ) const
}
-QFont KRootProp::readFontEntry( const QString& rKey,
- const QFont* pDefault ) const
+TQFont KRootProp::readFontEntry( const TQString& rKey,
+ const TQFont* pDefault ) const
{
- QFont aRetFont;
- QFont aDefFont;
+ TQFont aRetFont;
+ TQFont aDefFont;
if (pDefault)
aDefFont = *pDefault;
- QString aValue = readEntry( rKey );
+ TQString aValue = readEntry( rKey );
if( aValue.isNull() )
return aDefFont; // Return default font
@@ -202,16 +202,16 @@ QFont KRootProp::readFontEntry( const QString& rKey,
}
-QColor KRootProp::readColorEntry( const QString& rKey,
- const QColor* pDefault ) const
+TQColor KRootProp::readColorEntry( const TQString& rKey,
+ const TQColor* pDefault ) const
{
- QColor aRetColor;
+ TQColor aRetColor;
int nRed = 0, nGreen = 0, nBlue = 0;
if( pDefault )
aRetColor = *pDefault;
- QString aValue = readEntry( rKey );
+ TQString aValue = readEntry( rKey );
if( aValue.isNull() )
return aRetColor;
@@ -243,58 +243,58 @@ QColor KRootProp::readColorEntry( const QString& rKey,
return aRetColor;
}
-QString KRootProp::writeEntry( const QString& rKey, const QString& rValue )
+TQString KRootProp::writeEntry( const TQString& rKey, const TQString& rValue )
{
dirty = true;
if ( propDict.contains( rKey ) ) {
- QString aValue = propDict[ rKey ];
+ TQString aValue = propDict[ rKey ];
propDict.replace( rKey, rValue );
return aValue;
}
else {
propDict.insert( rKey, rValue );
- return QString::null;
+ return TQString::null;
}
}
-QString KRootProp::writeEntry( const QString& rKey, int nValue )
+TQString KRootProp::writeEntry( const TQString& rKey, int nValue )
{
- QString aValue;
+ TQString aValue;
aValue.setNum( nValue );
return writeEntry( rKey, aValue );
}
-QString KRootProp::writeEntry( const QString& rKey, const QFont& rFont )
+TQString KRootProp::writeEntry( const TQString& rKey, const TQFont& rFont )
{
return writeEntry( rKey, rFont.toString() );
}
-QString KRootProp::writeEntry( const QString& rKey, const QColor& rColor )
+TQString KRootProp::writeEntry( const TQString& rKey, const TQColor& rColor )
{
- QString aValue = QString( "%1,%2,%3").arg(rColor.red()).arg(rColor.green()).arg(rColor.blue() );
+ TQString aValue = TQString( "%1,%2,%3").arg(rColor.red()).arg(rColor.green()).arg(rColor.blue() );
return writeEntry( rKey, aValue );
}
-QString KRootProp::removeEntry(const QString& rKey)
+TQString KRootProp::removeEntry(const TQString& rKey)
{
if (propDict.contains(rKey)) {
dirty = true;
- QString aValue = propDict[rKey];
+ TQString aValue = propDict[rKey];
propDict.remove(rKey);
return aValue;
} else
- return QString::null;
+ return TQString::null;
}
-QStringList KRootProp::listEntries() const
+TQStringList KRootProp::listEntries() const
{
- QMap<QString,QString>::ConstIterator it;
- QStringList list;
+ TQMap<TQString,TQString>::ConstIterator it;
+ TQStringList list;
- QMap<QString,QString>::ConstIterator end(propDict.end());
+ TQMap<TQString,TQString>::ConstIterator end(propDict.end());
for (it=propDict.begin(); it!=end; ++it)
list += it.key();
diff --git a/kdecore/krootprop.h b/kdecore/krootprop.h
index 1234f143e..6d6a43a24 100644
--- a/kdecore/krootprop.h
+++ b/kdecore/krootprop.h
@@ -21,10 +21,10 @@
typedef unsigned long Atom;
-#include <qcolor.h>
-#include <qfont.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -47,8 +47,8 @@ class KDECORE_EXPORT KRootProp
{
private:
Atom atom;
- QMap<QString,QString> propDict;
- QString property_;
+ TQMap<TQString,TQString> propDict;
+ TQString property_;
bool dirty;
KRootPropPrivate *d;
@@ -59,7 +59,7 @@ public:
* do nothing
* @see setProp()
**/
- KRootProp( const QString& rProp = QString::null );
+ KRootProp( const TQString& rProp = TQString::null );
/**
* Destructs the KRootProp object.
*
@@ -71,12 +71,12 @@ public:
* Sets the property in which keys will be searched.
* @param rProp the property that will be searched
**/
- void setProp(const QString& rProp=QString());
+ void setProp(const TQString& rProp=TQString());
/**
* Returns the name of the property under which keys are searched.
* @return the property that will be searched
**/
- QString prop() const;
+ TQString prop() const;
/**
* Destroys the property completely.
@@ -94,8 +94,8 @@ public:
* @return The value for this key or the default if no value
* was found.
**/
- QString readEntry( const QString& rKey,
- const QString& pDefault = QString::null ) const ;
+ TQString readEntry( const TQString& rKey,
+ const TQString& pDefault = TQString::null ) const ;
/**
* Reads a numerical value.
@@ -107,10 +107,10 @@ public:
* @param nDefault A default value returned if the key was not found.
* @return The value for this key or the default if no value was found.
*/
- int readNumEntry( const QString& rKey, int nDefault = 0 ) const;
+ int readNumEntry( const TQString& rKey, int nDefault = 0 ) const;
/**
- * Reads a QFont value.
+ * Reads a TQFont value.
*
* Reads the value of an entry specified by @p rKey in the current property
* and interpret it as a font object.
@@ -119,11 +119,11 @@ public:
* @param pDefault A default value returned if the key was not found.
* @return The value for this key or a default font if no value was found.
*/
- QFont readFontEntry( const QString& rKey,
- const QFont* pDefault = 0 ) const;
+ TQFont readFontEntry( const TQString& rKey,
+ const TQFont* pDefault = 0 ) const;
/**
- * Reads a QColor.
+ * Reads a TQColor.
*
* Reads the value of an entry specified by @p rKey in the current property
* and interprets it as a color.
@@ -133,8 +133,8 @@ public:
* @return The value for this key or a default color if no value
* was found.
*/
- QColor readColorEntry( const QString& rKey,
- const QColor* pDefault = 0 ) const;
+ TQColor readColorEntry( const TQString& rKey,
+ const TQColor* pDefault = 0 ) const;
/**
@@ -149,7 +149,7 @@ public:
* a null string is returned.
*
**/
- QString writeEntry( const QString& rKey, const QString& rValue );
+ TQString writeEntry( const TQString& rKey, const TQString& rValue );
/**
* Writes the (key/value) pair.
@@ -159,7 +159,7 @@ public:
* @return The old value for this key. If this key did not
* exist, a null string is returned.
**/
- QString writeEntry( const QString& rKey, int nValue );
+ TQString writeEntry( const TQString& rKey, int nValue );
/**
* Writes the (key/value) pair.
@@ -169,7 +169,7 @@ public:
* @return The old value for this key. If this key did not
* exist, a null string is returned.
**/
- QString writeEntry( const QString& rKey, const QFont& rFont );
+ TQString writeEntry( const TQString& rKey, const TQFont& rFont );
/**
* Writes the (key/value) pair.
@@ -179,7 +179,7 @@ public:
* @return The old value for this key. If this key did not
* exist, a null string is returned.
**/
- QString writeEntry( const QString& rKey, const QColor& rColor );
+ TQString writeEntry( const TQString& rKey, const TQColor& rColor );
/**
* Removes an entry.
@@ -187,13 +187,13 @@ public:
* @return The old value for this key. If this key did not
* exist, a null string is returned.
**/
- QString removeEntry(const QString& rKey);
+ TQString removeEntry(const TQString& rKey);
/**
* Returns a list of all keys.
- * @return A QStringList containing all the keys.
+ * @return A TQStringList containing all the keys.
**/
- QStringList listEntries() const;
+ TQStringList listEntries() const;
/**
* Flushes the entry cache.
diff --git a/kdecore/ksavefile.cpp b/kdecore/ksavefile.cpp
index 35ec51da1..77b0a6b41 100644
--- a/kdecore/ksavefile.cpp
+++ b/kdecore/ksavefile.cpp
@@ -32,19 +32,19 @@
#include <test.h>
#endif
-#include <qdatetime.h>
-#include <qdir.h>
+#include <tqdatetime.h>
+#include <tqdir.h>
#include <kde_file.h>
#include "kapplication.h"
#include "ksavefile.h"
#include "kstandarddirs.h"
-KSaveFile::KSaveFile(const QString &filename, int mode)
+KSaveFile::KSaveFile(const TQString &filename, int mode)
: mTempFile(true)
{
// follow symbolic link, if any
- QString real_filename = KStandardDirs::realFilePath(filename);
+ TQString real_filename = KStandardDirs::realFilePath(filename);
// we only check here if the directory can be written to
// the actual filename isn't written to, but replaced later
@@ -55,7 +55,7 @@ KSaveFile::KSaveFile(const QString &filename, int mode)
return;
}
- if (mTempFile.create(real_filename, QString::fromLatin1(".new"), mode))
+ if (mTempFile.create(real_filename, TQString::fromLatin1(".new"), mode))
{
mFileName = real_filename; // Set filename upon success
@@ -63,7 +63,7 @@ KSaveFile::KSaveFile(const QString &filename, int mode)
// permissions are the same as existing file so the existing
// file's permissions are preserved
KDE_struct_stat stat_buf;
- if (KDE_stat(QFile::encodeName(real_filename), &stat_buf)==0)
+ if (KDE_stat(TQFile::encodeName(real_filename), &stat_buf)==0)
{
// But only if we own the existing file
if (stat_buf.st_uid == getuid())
@@ -115,7 +115,7 @@ KSaveFile::close()
}
if (mTempFile.close())
{
- if (0==KDE_rename(QFile::encodeName(mTempFile.name()), QFile::encodeName(mFileName)))
+ if (0==KDE_rename(TQFile::encodeName(mTempFile.name()), TQFile::encodeName(mFileName)))
return true; // Success!
mTempFile.setError(errno);
}
@@ -142,10 +142,10 @@ write_all(int fd, const char *buf, size_t len)
return 0;
}
-bool KSaveFile::backupFile( const QString& qFilename, const QString& backupDir,
- const QString& backupExtension)
+bool KSaveFile::backupFile( const TQString& qFilename, const TQString& backupDir,
+ const TQString& backupExtension)
{
- QCString cFilename = QFile::encodeName(qFilename);
+ TQCString cFilename = TQFile::encodeName(qFilename);
const char *filename = cFilename.data();
int fd = KDE_open( filename, O_RDONLY );
@@ -159,23 +159,23 @@ bool KSaveFile::backupFile( const QString& qFilename, const QString& backupDir,
return false;
}
- QCString cBackup;
+ TQCString cBackup;
if ( backupDir.isEmpty() )
cBackup = cFilename;
else
{
- QCString nameOnly;
+ TQCString nameOnly;
int slash = cFilename.findRev('/');
if (slash < 0)
nameOnly = cFilename;
else
nameOnly = cFilename.mid(slash + 1);
- cBackup = QFile::encodeName(backupDir);
+ cBackup = TQFile::encodeName(backupDir);
if ( backupDir[backupDir.length()-1] != '/' )
cBackup += '/';
cBackup += nameOnly;
}
- cBackup += QFile::encodeName(backupExtension);
+ cBackup += TQFile::encodeName(backupExtension);
const char *backup = cBackup.data();
int permissions = buff.st_mode & 07777;
diff --git a/kdecore/ksavefile.h b/kdecore/ksavefile.h
index 7e05aaa81..ae68b2d1f 100644
--- a/kdecore/ksavefile.h
+++ b/kdecore/ksavefile.h
@@ -20,7 +20,7 @@
#ifndef _KSAVEFILE_H_
#define _KSAVEFILE_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
#include <errno.h>
#include <ktempfile.h>
@@ -46,7 +46,7 @@ public:
* @param filename the path of the file
* @param mode the mode of the file (see chmod(1))
*/
- KSaveFile(const QString &filename, int mode = 0666 );
+ KSaveFile(const TQString &filename, int mode = 0666 );
/**
* The destructor closes the file.
@@ -70,10 +70,10 @@ public:
/**
* The name of the file as passed to the constructor.
- * @return The name of the file, or QString::null if opening the
+ * @return The name of the file, or TQString::null if opening the
* file has failed
**/
- QString name() const;
+ TQString name() const;
/**
* An integer file descriptor open for writing to the file.
@@ -92,27 +92,27 @@ public:
{ return mTempFile.fstream(); }
/**
- * A QFile* open for writing to the file.
- * @return A QFile open for writing to the file, or 0 if
+ * A TQFile* open for writing to the file.
+ * @return A TQFile open for writing to the file, or 0 if
* opening the temporary file failed.
**/
- QFile *file()
+ TQFile *file()
{ return mTempFile.file(); }
/**
- * A QTextStream* open for writing to the file.
- * @return A QTextStream that is open for writing to the file, or 0
+ * A TQTextStream* open for writing to the file.
+ * @return A TQTextStream that is open for writing to the file, or 0
* if opening the temporary file failed
**/
- QTextStream *textStream()
+ TQTextStream *textStream()
{ return mTempFile.textStream(); }
/**
- * A QDataStream* open for writing to the file.
- * @return A QDataStream that is open for writing to the file, or 0
+ * A TQDataStream* open for writing to the file.
+ * @return A TQDataStream that is open for writing to the file, or 0
* if opening the file failed
**/
- QDataStream *dataStream()
+ TQDataStream *dataStream()
{ return mTempFile.dataStream(); }
/**
@@ -138,12 +138,12 @@ public:
* @param backupExtension the extension to append to @p filename, "~" by default.
* @since 3.2
*/
- static bool backupFile( const QString& filename,
- const QString& backupDir = QString::null,
- const QString& backupExtension = QString::fromLatin1( "~" ) );
+ static bool backupFile( const TQString& filename,
+ const TQString& backupDir = TQString::null,
+ const TQString& backupExtension = TQString::fromLatin1( "~" ) );
private:
- QString mFileName;
+ TQString mFileName;
KTempFile mTempFile;
KSaveFilePrivate *d;
diff --git a/kdecore/kshell.cpp b/kdecore/kshell.cpp
index 2d688a85f..3dcb3f273 100644
--- a/kdecore/kshell.cpp
+++ b/kdecore/kshell.cpp
@@ -21,13 +21,13 @@
#include <kshell.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <stdlib.h>
#include <pwd.h>
#include <sys/types.h>
-static int fromHex( QChar c )
+static int fromHex( TQChar c )
{
if (c >= '0' && c <= '9')
return c - '0';
@@ -62,19 +62,19 @@ inline static bool isMeta( uint c )
return (c < sizeof(iqm) * 8) && (iqm[c / 8] & (1 << (c & 7)));
}
-QStringList KShell::splitArgs( const QString &args, int flags, int *err )
+TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
{
- QStringList ret;
+ TQStringList ret;
bool firstword = flags & AbortOnMeta;
for (uint pos = 0; ; ) {
- QChar c;
+ TQChar c;
do {
if (pos >= args.length())
goto okret;
c = args.unicode()[pos++];
} while (c.isSpace());
- QString cret;
+ TQString cret;
if ((flags & TildeExpand) && c == '~') {
uint opos = pos;
for (; ; pos++) {
@@ -91,7 +91,7 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
if ((flags & AbortOnMeta) && isMeta( c ))
goto metaerr;
}
- QString ccret = homeDir( QConstString( args.unicode() + opos, pos - opos ).string() );
+ TQString ccret = homeDir( TQConstString( args.unicode() + opos, pos - opos ).string() );
if (ccret.isEmpty()) {
pos = opos;
c = '~';
@@ -113,7 +113,7 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
if (firstword) {
if (c == '_' || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
uint pos2 = pos;
- QChar cc;
+ TQChar cc;
do
cc = args[pos2++];
while (cc == '_' || (cc >= 'A' && cc <= 'Z') ||
@@ -131,7 +131,7 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
goto quoteerr;
c = args.unicode()[pos++];
} while (c != '\'');
- cret += QConstString( args.unicode() + spos, pos - spos - 1 ).string();
+ cret += TQConstString( args.unicode() + spos, pos - spos - 1 ).string();
} else if (c == '"') {
for (;;) {
if (pos >= args.length())
@@ -184,7 +184,7 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
hv = hv * 16 + hhv;
pos++;
}
- cret += QChar( hv );
+ cret += TQChar( hv );
}
break;
}
@@ -198,7 +198,7 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
hv = hv * 8 + (c - '0');
pos++;
}
- cret += QChar( hv );
+ cret += TQChar( hv );
} else {
cret += '\\';
cret += c;
@@ -236,12 +236,12 @@ QStringList KShell::splitArgs( const QString &args, int flags, int *err )
quoteerr:
if (err)
*err = BadQuoting;
- return QStringList();
+ return TQStringList();
metaerr:
if (err)
*err = FoundMeta;
- return QStringList();
+ return TQStringList();
}
inline static bool isSpecial( uint c )
@@ -254,11 +254,11 @@ inline static bool isSpecial( uint c )
return (c < sizeof(iqm) * 8) && (iqm[c / 8] & (1 << (c & 7)));
}
-QString KShell::joinArgs( const QStringList &args )
+TQString KShell::joinArgs( const TQStringList &args )
{
- QChar q( '\'' );
- QString ret;
- for (QStringList::ConstIterator it = args.begin(); it != args.end(); ++it) {
+ TQChar q( '\'' );
+ TQString ret;
+ for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it) {
if (!ret.isEmpty())
ret += ' ';
if (!(*it).length())
@@ -266,7 +266,7 @@ QString KShell::joinArgs( const QStringList &args )
else {
for (uint i = 0; i < (*it).length(); i++)
if (isSpecial((*it).unicode()[i])) {
- QString tmp(*it);
+ TQString tmp(*it);
tmp.replace( q, "'\\''" );
ret += q;
tmp += q;
@@ -280,19 +280,19 @@ QString KShell::joinArgs( const QStringList &args )
return ret;
}
-QString KShell::joinArgs( const char * const *args, int nargs )
+TQString KShell::joinArgs( const char * const *args, int nargs )
{
if (!args)
- return QString::null; // well, QString::empty, in fact. qt sucks ;)
- QChar q( '\'' );
- QString ret;
+ return TQString::null; // well, TQString::empty, in fact. qt sucks ;)
+ TQChar q( '\'' );
+ TQString ret;
for (const char * const *argp = args; nargs && *argp; argp++, nargs--) {
if (!ret.isEmpty())
ret += ' ';
if (!**argp)
ret.append( q ).append( q );
else {
- QString tmp( QFile::decodeName( *argp ) );
+ TQString tmp( TQFile::decodeName( *argp ) );
for (uint i = 0; i < tmp.length(); i++)
if (isSpecial(tmp.unicode()[i])) {
tmp.replace( q, "'\\''" );
@@ -308,11 +308,11 @@ QString KShell::joinArgs( const char * const *args, int nargs )
return ret;
}
-QString KShell::joinArgsDQ( const QStringList &args )
+TQString KShell::joinArgsDQ( const TQStringList &args )
{
- QChar q( '\'' ), sp( ' ' ), bs( '\\' );
- QString ret;
- for (QStringList::ConstIterator it = args.begin(); it != args.end(); ++it) {
+ TQChar q( '\'' ), sp( ' ' ), bs( '\\' );
+ TQString ret;
+ for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it) {
if (!ret.isEmpty())
ret += sp;
if (!(*it).length())
@@ -352,26 +352,26 @@ QString KShell::joinArgsDQ( const QStringList &args )
return ret;
}
-QString KShell::tildeExpand( const QString &fname )
+TQString KShell::tildeExpand( const TQString &fname )
{
if (fname[0] == '~') {
int pos = fname.find( '/' );
if (pos < 0)
- return homeDir( QConstString( fname.unicode() + 1, fname.length() - 1 ).string() );
- QString ret = homeDir( QConstString( fname.unicode() + 1, pos - 1 ).string() );
+ return homeDir( TQConstString( fname.unicode() + 1, fname.length() - 1 ).string() );
+ TQString ret = homeDir( TQConstString( fname.unicode() + 1, pos - 1 ).string() );
if (!ret.isNull())
- ret += QConstString( fname.unicode() + pos, fname.length() - pos ).string();
+ ret += TQConstString( fname.unicode() + pos, fname.length() - pos ).string();
return ret;
}
return fname;
}
-QString KShell::homeDir( const QString &user )
+TQString KShell::homeDir( const TQString &user )
{
if (user.isEmpty())
- return QFile::decodeName( getenv( "HOME" ) );
- struct passwd *pw = getpwnam( QFile::encodeName( user ).data() );
+ return TQFile::decodeName( getenv( "HOME" ) );
+ struct passwd *pw = getpwnam( TQFile::encodeName( user ).data() );
if (!pw)
- return QString::null;
- return QFile::decodeName( pw->pw_dir );
+ return TQString::null;
+ return TQFile::decodeName( pw->pw_dir );
}
diff --git a/kdecore/kshell.h b/kdecore/kshell.h
index 1b52de099..2e9f3ad98 100644
--- a/kdecore/kshell.h
+++ b/kdecore/kshell.h
@@ -21,8 +21,8 @@
#ifndef _KSHELL_H
#define _KSHELL_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kdelibs_export.h"
/**
@@ -90,7 +90,7 @@ namespace KShell {
* target, see Errors
* @return a list of unquoted words or an empty list if an error occurred
*/
- KDECORE_EXPORT QStringList splitArgs( const QString &cmd, int flags = 0, int *err = 0 );
+ KDECORE_EXPORT TQStringList splitArgs( const TQString &cmd, int flags = 0, int *err = 0 );
/**
* Quotes and joins @p args together according to POSIX shell rules.
@@ -98,7 +98,7 @@ namespace KShell {
* @param args a list of strings to quote and join
* @return a command suitable for shell execution
*/
- KDECORE_EXPORT QString joinArgs( const QStringList &args );
+ KDECORE_EXPORT TQString joinArgs( const TQStringList &args );
/**
* Same as above, but $'' is used instead of '' for the quoting.
@@ -110,7 +110,7 @@ namespace KShell {
* @param args a list of strings to quote and join
* @return a command suitable for shell execution
*/
- KDECORE_EXPORT QString joinArgsDQ( const QStringList &args );
+ KDECORE_EXPORT TQString joinArgsDQ( const TQStringList &args );
/**
* Quotes and joins @p argv together according to POSIX shell rules.
@@ -121,7 +121,7 @@ namespace KShell {
* @p argv must be null-terminated.
* @return a command suitable for shell execution
*/
- KDECORE_EXPORT QString joinArgs( const char * const *argv, int argc = -1 );
+ KDECORE_EXPORT TQString joinArgs( const char * const *argv, int argc = -1 );
/**
* Performs tilde expansion on @p path. Interprets "~/path" and
@@ -130,7 +130,7 @@ namespace KShell {
* @param path the path to tilde-expand
* @return the expanded path
*/
- KDECORE_EXPORT QString tildeExpand( const QString &path );
+ KDECORE_EXPORT TQString tildeExpand( const TQString &path );
/**
* Obtain a @p user's home directory.
@@ -139,7 +139,7 @@ namespace KShell {
* An empty string denotes the current user.
* @return The user's home directory.
*/
- KDECORE_EXPORT QString homeDir( const QString &user );
+ KDECORE_EXPORT TQString homeDir( const TQString &user );
}
diff --git a/kdecore/kshortcut.cpp b/kdecore/kshortcut.cpp
index 4e03b1a2a..4847b8742 100644
--- a/kdecore/kshortcut.cpp
+++ b/kdecore/kshortcut.cpp
@@ -21,8 +21,8 @@
#include "kkeynative.h"
#include "kkeyserver.h"
-#include <qevent.h>
-#include <qstringlist.h>
+#include <tqevent.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -42,10 +42,10 @@ static KShortcut* g_pcut = 0;
KKey::KKey() { clear(); }
KKey::KKey( uint key, uint modFlags ) { init( key, modFlags ); }
KKey::KKey( int keyQt ) { init( keyQt ); }
-KKey::KKey( const QKeySequence& seq ) { init( seq ); }
-KKey::KKey( const QKeyEvent* pEvent ) { init( pEvent ); }
+KKey::KKey( const TQKeySequence& seq ) { init( seq ); }
+KKey::KKey( const TQKeyEvent* pEvent ) { init( pEvent ); }
KKey::KKey( const KKey& key ) { init( key ); }
-KKey::KKey( const QString& sKey ) { init( sKey ); }
+KKey::KKey( const TQString& sKey ) { init( sKey ); }
KKey::~KKey()
{
@@ -79,13 +79,13 @@ bool KKey::init( int keyQt )
}
}
-bool KKey::init( const QKeySequence& key )
+bool KKey::init( const TQKeySequence& key )
{
// TODO: if key.count() > 1, should we return failure?
return init( (int) key );
}
-bool KKey::init( const QKeyEvent* pEvent )
+bool KKey::init( const TQKeyEvent* pEvent )
{
int keyQt = pEvent->key();
if( pEvent->state() & Qt::ShiftButton ) keyQt |= Qt::SHIFT;
@@ -102,22 +102,22 @@ bool KKey::init( const KKey& key )
return true;
}
-bool KKey::init( const QString& sSpec )
+bool KKey::init( const TQString& sSpec )
{
clear();
- QString sKey = sSpec.stripWhiteSpace();
+ TQString sKey = sSpec.stripWhiteSpace();
if( sKey.startsWith( "default(" ) && sKey.endsWith( ")" ) )
sKey = sKey.mid( 8, sKey.length() - 9 );
// i.e., "Ctrl++" = "Ctrl+Plus"
if( sKey.endsWith( "++" ) )
sKey = sKey.left( sKey.length() - 1 ) + "plus";
- QStringList rgs = QStringList::split( '+', sKey, true );
+ TQStringList rgs = TQStringList::split( '+', sKey, true );
uint i;
// Check for modifier keys first.
for( i = 0; i < rgs.size(); i++ ) {
- QString s = rgs[i].lower();
+ TQString s = rgs[i].lower();
if( s == "shift" ) m_mod |= KKey::SHIFT;
else if( s == "ctrl" ) m_mod |= KKey::CTRL;
else if( s == "alt" ) m_mod |= KKey::ALT;
@@ -139,8 +139,8 @@ bool KKey::init( const QString& sSpec )
m_mod = 0;
kdDebug(125) << "KKey::init( \"" << sSpec << "\" ):"
- << " m_sym = " << QString::number(m_sym, 16)
- << ", m_mod = " << QString::number(m_mod, 16) << endl;
+ << " m_sym = " << TQString::number(m_sym, 16)
+ << ", m_mod = " << TQString::number(m_mod, 16) << endl;
return m_sym != 0;
}
@@ -163,9 +163,9 @@ int KKey::keyCodeQt() const
return KKeyNative( *this ).keyCodeQt();
}
-QString KKey::toString() const
+TQString KKey::toString() const
{
- QString s;
+ TQString s;
s = KKeyServer::modToStringUser( m_mod );
if( !s.isEmpty() )
@@ -175,12 +175,12 @@ QString KKey::toString() const
return s;
}
-QString KKey::toStringInternal() const
+TQString KKey::toStringInternal() const
{
//kdDebug(125) << "KKey::toStringInternal(): this = " << this
- // << " mod = " << QString::number(m_mod, 16)
- // << " key = " << QString::number(m_sym, 16) << endl;
- QString s;
+ // << " mod = " << TQString::number(m_mod, 16)
+ // << " key = " << TQString::number(m_sym, 16) << endl;
+ TQString s;
s = KKeyServer::modToStringInternal( m_mod );
if( !s.isEmpty() )
@@ -198,7 +198,7 @@ KKey& KKey::null()
return *g_pspec;
}
-QString KKey::modFlagLabel( ModFlag modFlag )
+TQString KKey::modFlagLabel( ModFlag modFlag )
{
return KKeyServer::modToStringUser( modFlag );
}
@@ -208,10 +208,10 @@ QString KKey::modFlagLabel( ModFlag modFlag )
//---------------------------------------------------------------------
KKeySequence::KKeySequence() { clear(); }
-KKeySequence::KKeySequence( const QKeySequence& seq ) { init( seq ); }
+KKeySequence::KKeySequence( const TQKeySequence& seq ) { init( seq ); }
KKeySequence::KKeySequence( const KKey& key ) { init( key ); }
KKeySequence::KKeySequence( const KKeySequence& seq ) { init( seq ); }
-KKeySequence::KKeySequence( const QString& s ) { init( s ); }
+KKeySequence::KKeySequence( const TQString& s ) { init( s ); }
KKeySequence::~KKeySequence()
{
@@ -223,7 +223,7 @@ void KKeySequence::clear()
m_bTriggerOnRelease = false;
}
-bool KKeySequence::init( const QKeySequence& seq )
+bool KKeySequence::init( const TQKeySequence& seq )
{
clear();
if( !seq.isEmpty() ) {
@@ -264,11 +264,11 @@ bool KKeySequence::init( const KKeySequence& seq )
return true;
}
-bool KKeySequence::init( const QString& s )
+bool KKeySequence::init( const TQString& s )
{
m_bTriggerOnRelease = false;
//kdDebug(125) << "KKeySequence::init( " << s << " )" << endl;
- QStringList rgs = QStringList::split( ',', s );
+ TQStringList rgs = TQStringList::split( ',', s );
if( s == "none" || rgs.size() == 0 ) {
clear();
return true;
@@ -343,13 +343,13 @@ int KKeySequence::compare( const KKeySequence& seq ) const
return 0;
}
-QKeySequence KKeySequence::qt() const
+TQKeySequence KKeySequence::qt() const
{
int k[4] = { 0, 0, 0, 0 };
for( uint i = 0; i < count(); i++ )
k[i] = KKeyNative(key(i)).keyCodeQt();
- QKeySequence seq( k[0], k[1], k[2], k[3] );
+ TQKeySequence seq( k[0], k[1], k[2], k[3] );
return seq;
}
@@ -358,11 +358,11 @@ int KKeySequence::keyCodeQt() const
return (count() == 1) ? KKeyNative(key(0)).keyCodeQt() : 0;
}
-QString KKeySequence::toString() const
+TQString KKeySequence::toString() const
{
- if( m_nKeys < 1 ) return QString::null;
+ if( m_nKeys < 1 ) return TQString::null;
- QString s;
+ TQString s;
s = m_rgvar[0].toString();
for( uint i = 1; i < m_nKeys; i++ ) {
s += ",";
@@ -372,11 +372,11 @@ QString KKeySequence::toString() const
return s;
}
-QString KKeySequence::toStringInternal() const
+TQString KKeySequence::toStringInternal() const
{
- if( m_nKeys < 1 ) return QString::null;
+ if( m_nKeys < 1 ) return TQString::null;
- QString s;
+ TQString s;
s = m_rgvar[0].toStringInternal();
for( uint i = 1; i < m_nKeys; i++ ) {
s += ",";
@@ -401,12 +401,12 @@ KKeySequence& KKeySequence::null()
KShortcut::KShortcut() { clear(); }
KShortcut::KShortcut( int keyQt ) { init( keyQt ); }
-KShortcut::KShortcut( const QKeySequence& key ) { init( key ); }
+KShortcut::KShortcut( const TQKeySequence& key ) { init( key ); }
KShortcut::KShortcut( const KKey& key ) { init( key ); }
KShortcut::KShortcut( const KKeySequence& seq ) { init( seq ); }
KShortcut::KShortcut( const KShortcut& cut ) { init( cut ); }
-KShortcut::KShortcut( const char* ps ) { init( QString(ps) ); }
-KShortcut::KShortcut( const QString& s ) { init( s ); }
+KShortcut::KShortcut( const char* ps ) { init( TQString(ps) ); }
+KShortcut::KShortcut( const TQString& s ) { init( s ); }
KShortcut::~KShortcut()
{
@@ -421,13 +421,13 @@ bool KShortcut::init( int keyQt )
{
if( keyQt ) {
m_nSeqs = 1;
- m_rgseq[0].init( QKeySequence(keyQt) );
+ m_rgseq[0].init( TQKeySequence(keyQt) );
} else
clear();
return true;
}
-bool KShortcut::init( const QKeySequence& key )
+bool KShortcut::init( const TQKeySequence& key )
{
m_nSeqs = 1;
m_rgseq[0].init( key );
@@ -456,17 +456,17 @@ bool KShortcut::init( const KShortcut& cut )
return true;
}
-bool KShortcut::init( const QString& s )
+bool KShortcut::init( const TQString& s )
{
bool bRet = true;
- QStringList rgs = QStringList::split( ';', s );
+ TQStringList rgs = TQStringList::split( ';', s );
if( s == "none" || rgs.size() == 0 )
clear();
else if( rgs.size() <= MAX_SEQUENCES ) {
m_nSeqs = rgs.size();
for( uint i = 0; i < m_nSeqs; i++ ) {
- QString& sSeq = rgs[i];
+ TQString& sSeq = rgs[i];
if( sSeq.startsWith( "default(" ) )
sSeq = sSeq.mid( 8, sSeq.length() - 9 );
m_rgseq[i].init( sSeq );
@@ -478,15 +478,15 @@ bool KShortcut::init( const QString& s )
}
if( !s.isEmpty() ) {
- QString sDebug;
- QTextStream os( &sDebug, IO_WriteOnly );
+ TQString sDebug;
+ TQTextStream os( &sDebug, IO_WriteOnly );
os << "KShortcut::init( \"" << s << "\" ): ";
for( uint i = 0; i < m_nSeqs; i++ ) {
os << " m_rgseq[" << i << "]: ";
KKeyServer::Variations vars;
vars.init( m_rgseq[i].key(0), true );
for( uint j = 0; j < vars.count(); j++ )
- os << QString::number(vars.m_rgkey[j].keyCodeQt(),16) << ',';
+ os << TQString::number(vars.m_rgkey[j].keyCodeQt(),16) << ',';
}
kdDebug(125) << sDebug << endl;
}
@@ -508,7 +508,7 @@ int KShortcut::keyCodeQt() const
{
if( m_nSeqs >= 1 )
return m_rgseq[0].keyCodeQt();
- return QKeySequence();
+ return TQKeySequence();
}
bool KShortcut::isNull() const
@@ -621,17 +621,17 @@ bool KShortcut::append( const KShortcut& cut )
return true;
}
-KShortcut::operator QKeySequence () const
+KShortcut::operator TQKeySequence () const
{
if( count() >= 1 )
return m_rgseq[0].qt();
else
- return QKeySequence();
+ return TQKeySequence();
}
-QString KShortcut::toString() const
+TQString KShortcut::toString() const
{
- QString s;
+ TQString s;
for( uint i = 0; i < count(); i++ ) {
s += m_rgseq[i].toString();
@@ -642,9 +642,9 @@ QString KShortcut::toString() const
return s;
}
-QString KShortcut::toStringInternal( const KShortcut* pcutDefault ) const
+TQString KShortcut::toStringInternal( const KShortcut* pcutDefault ) const
{
- QString s;
+ TQString s;
for( uint i = 0; i < count(); i++ ) {
const KKeySequence& seq = m_rgseq[i];
diff --git a/kdecore/kshortcut.h b/kdecore/kshortcut.h
index b06e19f23..ec36cfa93 100644
--- a/kdecore/kshortcut.h
+++ b/kdecore/kshortcut.h
@@ -20,8 +20,8 @@
#ifndef __KSHORTCUT_H
#define __KSHORTCUT_H
-#include <qkeysequence.h>
-#include <qstring.h>
+#include <tqkeysequence.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
class QKeyEvent;
@@ -76,13 +76,13 @@ class KDECORE_EXPORT KKey
* Creates a new key from the first key code of the given key sequence.
* @param keySeq the key sequence that contains the key
*/
- KKey( const QKeySequence& keySeq );
+ KKey( const TQKeySequence& keySeq );
/**
* Extracts the key from the given key event.
* @param keyEvent the key event to get the key from
*/
- KKey( const QKeyEvent* keyEvent );
+ KKey( const TQKeyEvent* keyEvent );
/**
* Copy constructor.
@@ -97,7 +97,7 @@ class KDECORE_EXPORT KKey
* @param key the description of the key
* @see KKeyServer::Sym::init()
*/
- KKey( const QString& key );
+ KKey( const TQString& key );
/**
* @internal
*/
@@ -124,14 +124,14 @@ class KDECORE_EXPORT KKey
* @param keySeq the key sequence that contains the key
* @return true if successful, false otherwise
*/
- bool init( const QKeySequence& keySeq );
+ bool init( const TQKeySequence& keySeq );
/**
* Initializes the key by extracting the code from the given key event.
* @param keyEvent the key event to get the key from
* @return true if successful, false otherwise
*/
- bool init( const QKeyEvent* keyEvent );
+ bool init( const TQKeyEvent* keyEvent );
/**
* Copies the given key.
@@ -149,7 +149,7 @@ class KDECORE_EXPORT KKey
* @return true if successful, false otherwise
* @see KKeyServer::Sym::init()
*/
- bool init( const QString& key);
+ bool init( const TQString& key);
/**
* @internal
@@ -228,13 +228,13 @@ class KDECORE_EXPORT KKey
* @return the string representation of the key
* @see toStringInternal()
*/
- QString toString() const;
+ TQString toString() const;
/**
* Returns an untranslated text representation of the key in the form
* "modifier+key", suitable e.g. for saving in configuration files.
*/
- QString toStringInternal() const;
+ TQString toStringInternal() const;
// Operation methods
/**
@@ -255,7 +255,7 @@ class KDECORE_EXPORT KKey
* @param f the modifiers to convert
* @return the string representation of the modifiers
*/
- static QString modFlagLabel( ModFlag f );
+ static TQString modFlagLabel( ModFlag f );
private:
/*
@@ -266,7 +266,7 @@ class KDECORE_EXPORT KKey
* Returns the native key symbol value key. Under X11, this is the X
* keycode. Under Qt/Embedded, this is the Qt keycode.
* @see /usr/include/X11/keysymdef.h
- * @see qnamespace.h
+ * @see tqnamespace.h
*/
uint m_sym;
/**
@@ -303,7 +303,7 @@ class KDECORE_EXPORT KKeySequence
* Copies the given qt key sequence.
* @param keySeq the qt key sequence to copy
*/
- KKeySequence( const QKeySequence& keySeq );
+ KKeySequence( const TQKeySequence& keySeq );
/**
* Create a new key sequence that only contains the given key.
@@ -326,12 +326,12 @@ class KDECORE_EXPORT KKeySequence
/**
* Creates a new key sequence that contains the given key sequence.
* The description consists of comma-separated keys as
- * required by KKey::KKey(const QString&).
+ * required by KKey::KKey(const TQString&).
* @param keySeq the description of the key
* @see KKeyServer::Sym::init()
- * @see KKey::KKey(const QString&)
+ * @see KKey::KKey(const TQString&)
*/
- KKeySequence( const QString& keySeq );
+ KKeySequence( const TQString& keySeq );
~KKeySequence();
@@ -347,7 +347,7 @@ class KDECORE_EXPORT KKeySequence
* @param keySeq the qt key sequence to copy
* @return true if successful, false otherwise
*/
- bool init( const QKeySequence& keySeq );
+ bool init( const TQKeySequence& keySeq );
/**
* Initializes the key sequence to only contain the given key.
@@ -373,13 +373,13 @@ class KDECORE_EXPORT KKeySequence
/**
* Initializes this key sequence to contain the given key sequence.
* The description consists of comma-separated keys as
- * required by KKey::KKey(const QString&).
+ * required by KKey::KKey(const TQString&).
* @param key the description of the key
* @return true if successful, false otherwise
* @see KKeyServer::Sym::init()
- * @see KKey::KKey(const QString&)
+ * @see KKey::KKey(const TQString&)
*/
- bool init( const QString& key );
+ bool init( const TQString& key );
/**
* Copy the given key sequence into this sequence.
@@ -469,13 +469,13 @@ class KDECORE_EXPORT KKeySequence
*/
bool operator < ( const KKeySequence& seq ) const
{ return compare( seq ) < 0; }
- // TODO: consider adding Qt::SequenceMatch matches(...) methods for QKeySequence equivalence
+ // TODO: consider adding Qt::SequenceMatch matches(...) methods for TQKeySequence equivalence
/**
- * Converts this key sequence to a QKeySequence.
+ * Converts this key sequence to a TQKeySequence.
* @return the QKeySequence
*/
- QKeySequence qt() const;
+ TQKeySequence qt() const;
/**
* Returns the qt key code of the first key.
@@ -491,12 +491,12 @@ class KDECORE_EXPORT KKeySequence
* @return the string represenation of this key sequence
* @see KKey::toString()
*/
- QString toString() const;
+ TQString toString() const;
/**
* @internal
*/
- QString toStringInternal() const;
+ TQString toStringInternal() const;
/**
* Returns a null key sequence.
@@ -528,7 +528,7 @@ class KDECORE_EXPORT KKeySequence
* the below code binds the escape key to the close action.
*
* \code
-* KAction *closeAction = KStdAction::close( this, SLOT( close() ), actionCollection() );
+* KAction *closeAction = KStdAction::close( this, TQT_SLOT( close() ), actionCollection() );
* KShortcut closeShortcut = closeAction->shortcut();
* closeShortcut.append( KKey(Key_Escape));
* closeAction->setShortcut(closeShortcut);
@@ -570,7 +570,7 @@ class KDECORE_EXPORT KShortcut
* sequence.
* @param keySeq the qt key sequence to add
*/
- KShortcut( const QKeySequence& keySeq );
+ KShortcut( const TQKeySequence& keySeq );
/**
* Creates a new shortcut that contains only the given key
@@ -595,20 +595,20 @@ class KDECORE_EXPORT KShortcut
/**
* Creates a new key sequence that contains the given key sequence.
* The description consists of semicolon-separated keys as
- * used in KKeySequence::KKeySequence(const QString&).
+ * used in KKeySequence::KKeySequence(const TQString&).
* @param shortcut the description of the key
- * @see KKeySequence::KKeySequence(const QString&)
+ * @see KKeySequence::KKeySequence(const TQString&)
*/
KShortcut( const char* shortcut );
/**
* Creates a new key sequence that contains the given key sequence.
* The description consists of semicolon-separated keys as
- * used in KKeySequence::KKeySequence(const QString&).
+ * used in KKeySequence::KKeySequence(const TQString&).
* @param shortcut the description of the key
- * @see KKeySequence::KKeySequence(const QString&)
+ * @see KKeySequence::KKeySequence(const TQString&)
*/
- KShortcut( const QString& shortcut );
+ KShortcut( const TQString& shortcut );
~KShortcut();
/**
@@ -630,7 +630,7 @@ class KDECORE_EXPORT KShortcut
* Initializes the shortcut with the given qt key sequence.
* @param keySeq the qt key sequence to add
*/
- bool init( const QKeySequence& keySeq );
+ bool init( const TQKeySequence& keySeq );
/**
* Initializes the shortcut with the given key as its only sequence.
@@ -653,11 +653,11 @@ class KDECORE_EXPORT KShortcut
/**
* Initializes the key sequence with the given key sequence.
* The description consists of semicolon-separated keys as
- * used in KKeySequence::KKeySequence(const QString&).
+ * used in KKeySequence::KKeySequence(const TQString&).
* @param shortcut the description of the key
- * @see KKeySequence::KKeySequence(const QString&)
+ * @see KKeySequence::KKeySequence(const TQString&)
*/
- bool init( const QString& shortcut );
+ bool init( const TQString& shortcut );
/**
* Copies the given shortcut over this shortcut.
@@ -810,7 +810,7 @@ class KDECORE_EXPORT KShortcut
* Converts this shortcut to a key sequence. The first key sequence
* will be taken.
*/
- operator QKeySequence () const;
+ operator TQKeySequence () const;
/**
* Returns a description of the shortcut as semicolon-separated
@@ -819,12 +819,12 @@ class KDECORE_EXPORT KShortcut
* @see KKey::toString()
* @see KKeySequence::toString()
*/
- QString toString() const;
+ TQString toString() const;
/**
* @internal
*/
- QString toStringInternal( const KShortcut* pcutDefault = 0 ) const;
+ TQString toStringInternal( const KShortcut* pcutDefault = 0 ) const;
/**
* Returns a null shortcut.
diff --git a/kdecore/kshortcutlist.cpp b/kdecore/kshortcutlist.cpp
index 327153ce8..865bdc257 100644
--- a/kdecore/kshortcutlist.cpp
+++ b/kdecore/kshortcutlist.cpp
@@ -1,5 +1,5 @@
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#include <kaccel.h>
#include "kaccelaction.h"
@@ -28,7 +28,7 @@ bool KShortcutList::isGlobal( uint ) const
return false;
}
-int KShortcutList::index( const QString& sName ) const
+int KShortcutList::index( const TQString& sName ) const
{
uint nSize = count();
for( uint i = 0;
@@ -58,22 +58,22 @@ const KInstance* KShortcutList::instance() const
return 0;
}
-QVariant KShortcutList::getOther( Other, uint ) const
+TQVariant KShortcutList::getOther( Other, uint ) const
{
- return QVariant();
+ return TQVariant();
}
-bool KShortcutList::setOther( Other, uint, QVariant )
+bool KShortcutList::setOther( Other, uint, TQVariant )
{
return false;
}
-bool KShortcutList::readSettings( const QString& sConfigGroup, KConfigBase* pConfig )
+bool KShortcutList::readSettings( const TQString& sConfigGroup, KConfigBase* pConfig )
{
kdDebug(125) << "KShortcutList::readSettings( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl;
if( !pConfig )
pConfig = KGlobal::config();
- QString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : QString("Shortcuts");
+ TQString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : TQString("Shortcuts");
// If the config file still has the old group name:
// FIXME: need to rename instead? -- and don't do this if hasGroup( "Shortcuts" ).
@@ -89,7 +89,7 @@ bool KShortcutList::readSettings( const QString& sConfigGroup, KConfigBase* pCon
uint nSize = count();
for( uint i = 0; i < nSize; i++ ) {
if( isConfigurable(i) ) {
- QString sEntry = pConfig->readEntry( name(i) );
+ TQString sEntry = pConfig->readEntry( name(i) );
if( !sEntry.isEmpty() ) {
if( sEntry == "none" )
setShortcut( i, KShortcut() );
@@ -106,13 +106,13 @@ bool KShortcutList::readSettings( const QString& sConfigGroup, KConfigBase* pCon
return true;
}
-bool KShortcutList::writeSettings( const QString &sConfigGroup, KConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const
+bool KShortcutList::writeSettings( const TQString &sConfigGroup, KConfigBase* pConfig, bool bWriteAll, bool bGlobal ) const
{
kdDebug(125) << "KShortcutList::writeSettings( " << sConfigGroup << ", " << pConfig << ", " << bWriteAll << ", " << bGlobal << " )" << endl;
if( !pConfig )
pConfig = KGlobal::config();
- QString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : QString("Shortcuts");
+ TQString sGroup = (!sConfigGroup.isEmpty()) ? sConfigGroup : TQString("Shortcuts");
// If it has the deprecated group [Keys], remove it
if( pConfig->hasGroup( "Keys" ) )
@@ -123,13 +123,13 @@ bool KShortcutList::writeSettings( const QString &sConfigGroup, KConfigBase* pCo
uint nSize = count();
for( uint i = 0; i < nSize; i++ ) {
if( isConfigurable(i) ) {
- const QString& sName = name(i);
+ const TQString& sName = name(i);
bool bConfigHasAction = !pConfig->readEntry( sName ).isEmpty();
bool bSameAsDefault = (shortcut(i) == shortcutDefault(i));
// If we're using a global config or this setting
// differs from the default, then we want to write.
if( bWriteAll || !bSameAsDefault ) {
- QString s = shortcut(i).toStringInternal();
+ TQString s = shortcut(i).toStringInternal();
if( s.isEmpty() )
s = "none";
kdDebug(125) << "\twriting " << sName << " = " << s << endl;
@@ -155,7 +155,7 @@ bool KShortcutList::writeSettings( const QString &sConfigGroup, KConfigBase* pCo
class KAccelShortcutListPrivate
{
public:
- QString m_configGroup;
+ TQString m_configGroup;
};
KAccelShortcutList::KAccelShortcutList( KAccel* pAccel )
@@ -186,11 +186,11 @@ KAccelShortcutList::~KAccelShortcutList()
{ delete d;}
uint KAccelShortcutList::count() const
{ return m_actions.count(); }
-QString KAccelShortcutList::name( uint i ) const
+TQString KAccelShortcutList::name( uint i ) const
{ return m_actions.actionPtr(i)->name(); }
-QString KAccelShortcutList::label( uint i ) const
+TQString KAccelShortcutList::label( uint i ) const
{ return m_actions.actionPtr(i)->label(); }
-QString KAccelShortcutList::whatsThis( uint i ) const
+TQString KAccelShortcutList::whatsThis( uint i ) const
{ return m_actions.actionPtr(i)->whatsThis(); }
const KShortcut& KAccelShortcutList::shortcut( uint i ) const
{ return m_actions.actionPtr(i)->shortcut(); }
@@ -200,11 +200,11 @@ bool KAccelShortcutList::isConfigurable( uint i ) const
{ return m_actions.actionPtr(i)->isConfigurable(); }
bool KAccelShortcutList::setShortcut( uint i, const KShortcut& cut )
{ return m_actions.actionPtr(i)->setShortcut( cut ); }
-QVariant KAccelShortcutList::getOther( Other, uint ) const
- { return QVariant(); }
+TQVariant KAccelShortcutList::getOther( Other, uint ) const
+ { return TQVariant(); }
bool KAccelShortcutList::isGlobal( uint ) const
{ return m_bGlobal; }
-bool KAccelShortcutList::setOther( Other, uint, QVariant )
+bool KAccelShortcutList::setOther( Other, uint, TQVariant )
{ return false; }
bool KAccelShortcutList::save() const
{ return writeSettings( d->m_configGroup ); }
diff --git a/kdecore/kshortcutlist.h b/kdecore/kshortcutlist.h
index f20808962..47339c93c 100644
--- a/kdecore/kshortcutlist.h
+++ b/kdecore/kshortcutlist.h
@@ -20,8 +20,8 @@
#ifndef __KSHORTCUTLIST_H
#define __KSHORTCUTLIST_H
-#include <qglobal.h> // For uint
-#include <qstring.h>
+#include <tqglobal.h> // For uint
+#include <tqstring.h>
#include "kdelibs_export.h"
class QVariant;
@@ -65,23 +65,23 @@ class KDECORE_EXPORT KShortcutList
* @param index the index of the shortcut (must be < count())
* @return the name of the shortcut
*/
- virtual QString name( uint index ) const = 0;
+ virtual TQString name( uint index ) const = 0;
/**
* Returns the (i18n'd) label of the shortcut with the given @p index.
* @param index the index of the shortcut (must be < count())
* @return the label (i18n'd) of the shortcut
*/
- virtual QString label( uint index ) const = 0;
+ virtual TQString label( uint index ) const = 0;
/**
* Returns the (i18n'd) What's This text of the shortcut with the given @p index.
* @param index the index of the shortcut (must be < count())
* @return the What's This text (i18n'd) of the shortcut
*/
- virtual QString whatsThis( uint index ) const = 0;
+ virtual TQString whatsThis( uint index ) const = 0;
- // TODO KDE4: add virtual QString toolTip( uint index ) const = 0
+ // TODO KDE4: add virtual TQString toolTip( uint index ) const = 0
// Will then be used by the listview in kkeydialog
/**
@@ -127,7 +127,7 @@ class KDECORE_EXPORT KShortcutList
* @param sName the name of the shortcut to search
* @return the index of the shortcut, of -1 if not found
*/
- virtual int index( const QString& sName ) const;
+ virtual int index( const TQString& sName ) const;
/**
* Returns the index of the shortcut with he given key sequence.
@@ -145,9 +145,9 @@ class KDECORE_EXPORT KShortcutList
// These are here in order to handle expansion.
enum Other { };
/** \internal */
- virtual QVariant getOther( Other, uint index ) const = 0;
+ virtual TQVariant getOther( Other, uint index ) const = 0;
/** \internal */
- virtual bool setOther( Other, uint index, QVariant ) = 0;
+ virtual bool setOther( Other, uint index, TQVariant ) = 0;
/**
* Save the shortcut list.
@@ -162,7 +162,7 @@ class KDECORE_EXPORT KShortcutList
* @param pConfig the configuration file to load from
* @return true if successful, false otherwise
*/
- virtual bool readSettings( const QString& sConfigGroup = QString::null, KConfigBase* pConfig = 0 );
+ virtual bool readSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 );
/**
* Writes the shortcuts to the given configuration file.
@@ -173,7 +173,7 @@ class KDECORE_EXPORT KShortcutList
* @param bGlobal true to write to the global configuration file
* @return true if successful, false otherwise
*/
- virtual bool writeSettings( const QString& sConfigGroup = QString::null, KConfigBase* pConfig = 0,
+ virtual bool writeSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0,
bool bWriteAll = false, bool bGlobal = false ) const;
protected:
@@ -223,9 +223,9 @@ class KDECORE_EXPORT KAccelShortcutList : public KShortcutList
virtual ~KAccelShortcutList();
virtual uint count() const;
- virtual QString name( uint index ) const;
- virtual QString label( uint index ) const;
- virtual QString whatsThis( uint index ) const;
+ virtual TQString name( uint index ) const;
+ virtual TQString label( uint index ) const;
+ virtual TQString whatsThis( uint index ) const;
virtual const KShortcut& shortcut( uint index ) const;
virtual const KShortcut& shortcutDefault( uint index ) const;
virtual bool isConfigurable( uint index ) const;
@@ -233,9 +233,9 @@ class KDECORE_EXPORT KAccelShortcutList : public KShortcutList
virtual bool isGlobal( uint index ) const;
/** \internal */
- virtual QVariant getOther( Other, uint index ) const;
+ virtual TQVariant getOther( Other, uint index ) const;
/** \internal */
- virtual bool setOther( Other, uint index, QVariant );
+ virtual bool setOther( Other, uint index, TQVariant );
virtual bool save() const;
@@ -270,18 +270,18 @@ class KDECORE_EXPORT ShortcutList : public KShortcutList
virtual ~ShortcutList();
virtual uint count() const;
- virtual QString name( uint index ) const;
- virtual QString label( uint index ) const;
- virtual QString whatsThis( uint index ) const;
+ virtual TQString name( uint index ) const;
+ virtual TQString label( uint index ) const;
+ virtual TQString whatsThis( uint index ) const;
virtual const KShortcut& shortcut( uint index ) const;
virtual const KShortcut& shortcutDefault( uint index ) const;
virtual bool isConfigurable( uint index ) const;
virtual bool setShortcut( uint index , const KShortcut& shortcut );
/** \internal */
- virtual QVariant getOther( Other, uint index ) const;
+ virtual TQVariant getOther( Other, uint index ) const;
/** \internal */
- virtual bool setOther( Other, uint index, QVariant );
+ virtual bool setOther( Other, uint index, TQVariant );
virtual bool save() const;
diff --git a/kdecore/kshortcutmenu.cpp b/kdecore/kshortcutmenu.cpp
index 5d7fea1f8..399096877 100644
--- a/kdecore/kshortcutmenu.cpp
+++ b/kdecore/kshortcutmenu.cpp
@@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qkeysequence.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
+#include <tqkeysequence.h>
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
#include "kaccelaction.h"
#include <kdebug.h>
@@ -27,19 +27,19 @@
#include "kshortcutmenu.h"
//#include <kkeynative.h>
-KShortcutMenu::KShortcutMenu( QWidget* pParent, KAccelActions* pActions, KKeySequence seq )
-: QPopupMenu( pParent ),
+KShortcutMenu::KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySequence seq )
+: TQPopupMenu( pParent ),
m_pActions( pActions ),
m_seq( seq )
{
kdDebug() << seq.toStringInternal() << endl;
- QFont fontTitle = KGlobalSettings::menuFont();
+ TQFont fontTitle = KGlobalSettings::menuFont();
fontTitle.setBold( true );
- pTitle = new QLabel( "", (QWidget*)0 );
+ pTitle = new TQLabel( "", (TQWidget*)0 );
pTitle->setFont( fontTitle );
- pTitle->setFrameShape( QFrame::Panel );
+ pTitle->setFrameShape( TQFrame::Panel );
insertItem( pTitle );
}
@@ -67,9 +67,9 @@ void KShortcutMenu::updateShortcuts()
KAccelAction* pAction = m_pActions->actionPtr( iAction );
if( pAction ) {
KKeySequence seq = m_seqs[iItem];
- QString sSeq = seq.key(m_seq.count()).toString();
+ TQString sSeq = seq.key(m_seq.count()).toString();
for( uint iKey = m_seq.count() + 1; iKey < seq.count(); iKey++ )
- sSeq += QString(",") + seq.key(iKey).toString();
+ sSeq += TQString(",") + seq.key(iKey).toString();
kdDebug(125) << "seq = " << seq.toStringInternal() << " sSeq = " << sSeq << endl;
changeItem( iAction, pAction->label() + "\t" + sSeq );
@@ -78,7 +78,7 @@ void KShortcutMenu::updateShortcuts()
}
}
-void KShortcutMenu::keyPressEvent( QKeyEvent* pEvent )
+void KShortcutMenu::keyPressEvent( TQKeyEvent* pEvent )
{
kdDebug() << "keypress; " << pEvent->key() << endl;
KKey key( pEvent );
@@ -106,7 +106,7 @@ void KShortcutMenu::keyPressEvent( QKeyEvent* pEvent )
// And permit Enter, Return to select the item.
if( pEvent->key() == Qt::Key_Up || pEvent->key() == Qt::Key_Down ||
pEvent->key() == Qt::Key_Enter || pEvent->key() == Qt::Key_Return )
- QPopupMenu::keyPressEvent( pEvent );
+ TQPopupMenu::keyPressEvent( pEvent );
else
close();
}
diff --git a/kdecore/kshortcutmenu.h b/kdecore/kshortcutmenu.h
index 1a8bb7921..3be542a13 100644
--- a/kdecore/kshortcutmenu.h
+++ b/kdecore/kshortcutmenu.h
@@ -20,8 +20,8 @@
#ifndef __KSHORTCUTMENU_H
#define __KSHORTCUTMENU_H
-#include <qmap.h>
-#include <qpopupmenu.h>
+#include <tqmap.h>
+#include <tqpopupmenu.h>
#include "kshortcut.h"
@@ -36,25 +36,25 @@ class KDECORE_EXPORT KShortcutMenu : public QPopupMenu
{
Q_OBJECT
public:
- KShortcutMenu( QWidget* pParent, KAccelActions* pActions, KKeySequence seq );
+ KShortcutMenu( TQWidget* pParent, KAccelActions* pActions, KKeySequence seq );
bool insertAction( uint iAction, KKeySequence seq );
void updateShortcuts();
protected:
- void keyPressEvent( QKeyEvent* pEvent );
+ void keyPressEvent( TQKeyEvent* pEvent );
private:
int searchForKey( KKey key );
void keepItemsMatching( KKey key );
private:
- typedef QMap<uint, KKeySequence> IndexToKKeySequence;
+ typedef TQMap<uint, KKeySequence> IndexToKKeySequence;
KAccelActions* m_pActions;
KKeySequence m_seq;
- QLabel* pTitle;
+ TQLabel* pTitle;
IndexToKKeySequence m_seqs;
};
diff --git a/kdecore/ksimpleconfig.cpp b/kdecore/ksimpleconfig.cpp
index b23236be9..6b4e13a14 100644
--- a/kdecore/ksimpleconfig.cpp
+++ b/kdecore/ksimpleconfig.cpp
@@ -28,8 +28,8 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include "kglobal.h"
#include "kstandarddirs.h"
@@ -37,14 +37,14 @@
#include "ksimpleconfig.h"
-KSimpleConfig::KSimpleConfig(const QString &fileName, bool bReadOnly)
- : KConfig(QString::fromLatin1(""), bReadOnly, false)
+KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly)
+ : KConfig(TQString::fromLatin1(""), bReadOnly, false)
{
// the difference between KConfig and KSimpleConfig is just that
// for KSimpleConfig an absolute filename is guaranteed
- if (!fileName.isNull() && QDir::isRelativePath(fileName)) {
+ if (!fileName.isNull() && TQDir::isRelativePath(fileName)) {
backEnd->changeFileName( KGlobal::dirs()->
- saveLocation("config", QString::null, !bReadOnly)+fileName, "config", false);
+ saveLocation("config", TQString::null, !bReadOnly)+fileName, "config", false);
} else {
backEnd->changeFileName(fileName, "config", false);
}
diff --git a/kdecore/ksimpleconfig.h b/kdecore/ksimpleconfig.h
index 6d556d456..89d380512 100644
--- a/kdecore/ksimpleconfig.h
+++ b/kdecore/ksimpleconfig.h
@@ -53,7 +53,7 @@ public:
* directory for "config" files is used.
* @param bReadOnly Whether the object should be read-only.
*/
- KSimpleConfig( const QString &fileName, bool bReadOnly = false);
+ KSimpleConfig( const TQString &fileName, bool bReadOnly = false);
KSimpleConfig(KConfigBackEnd *backEnd, bool bReadOnly = false);
diff --git a/kdecore/ksock.cpp b/kdecore/ksock.cpp
index da28a64d5..10c694512 100644
--- a/kdecore/ksock.cpp
+++ b/kdecore/ksock.cpp
@@ -80,20 +80,20 @@ extern "C" {
#define SOMAXCONN 5
#endif
-#include <qapplication.h>
-#include <qsocketnotifier.h>
+#include <tqapplication.h>
+#include <tqsocketnotifier.h>
#include "netsupp.h" // leave this last
#ifdef __CYGWIN__
-#include "qwindowdefs.h"
+#include "tqwindowdefs.h"
#endif
class KSocketPrivate
{
public:
- QSocketNotifier *readNotifier;
- QSocketNotifier *writeNotifier;
+ TQSocketNotifier *readNotifier;
+ TQSocketNotifier *writeNotifier;
KSocketPrivate() :
readNotifier(0), writeNotifier(0)
@@ -134,8 +134,8 @@ void KSocket::enableRead( bool _state )
{
if ( !d->readNotifier )
{
- d->readNotifier = new QSocketNotifier( sock, QSocketNotifier::Read );
- QObject::connect( d->readNotifier, SIGNAL( activated(int) ), this, SLOT( slotRead(int) ) );
+ d->readNotifier = new TQSocketNotifier( sock, TQSocketNotifier::Read );
+ TQObject::connect( d->readNotifier, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotRead(int) ) );
}
else
d->readNotifier->setEnabled( true );
@@ -150,9 +150,9 @@ void KSocket::enableWrite( bool _state )
{
if ( !d->writeNotifier )
{
- d->writeNotifier = new QSocketNotifier( sock, QSocketNotifier::Write );
- QObject::connect( d->writeNotifier, SIGNAL( activated(int) ), this,
- SLOT( slotWrite(int) ) );
+ d->writeNotifier = new TQSocketNotifier( sock, TQSocketNotifier::Write );
+ TQObject::connect( d->writeNotifier, TQT_SIGNAL( activated(int) ), this,
+ TQT_SLOT( slotWrite(int) ) );
}
else
d->writeNotifier->setEnabled( true );
@@ -182,7 +182,7 @@ void KSocket::slotWrite( int )
*/
bool KSocket::connect( const char *_path )
{
- KExtendedSocket ks(QString::null, _path, KExtendedSocket::unixSocket);
+ KExtendedSocket ks(TQString::null, _path, KExtendedSocket::unixSocket);
ks.connect();
sock = ks.fd();
@@ -194,7 +194,7 @@ bool KSocket::connect( const char *_path )
/*
* Connects the socket to _host, _port.
*/
-bool KSocket::connect( const QString& _host, unsigned short int _port, int _timeout )
+bool KSocket::connect( const TQString& _host, unsigned short int _port, int _timeout )
{
KExtendedSocket ks(_host, _port, KExtendedSocket::inetSocket);
ks.setTimeout(_timeout, 0);
@@ -240,7 +240,7 @@ bool KSocket::initSockaddr (ksockaddr_in *server_name, const char *hostname, uns
if (domain != PF_INET)
return false;
- QPtrList<KAddressInfo> list = KExtendedSocket::lookup(hostname, QString::number(port),
+ TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(hostname, TQString::number(port),
KExtendedSocket::ipv4Socket);
list.setAutoDelete(true);
@@ -278,7 +278,7 @@ class KServerSocketPrivate
{
public:
bool bind;
- QCString path;
+ TQCString path;
unsigned short int port;
KExtendedSocket *ks;
};
@@ -307,7 +307,7 @@ bool KServerSocket::init( const char *_path )
unlink(_path );
d->path = _path;
- KExtendedSocket *ks = new KExtendedSocket(QString::null, _path, KExtendedSocket::passiveSocket |
+ KExtendedSocket *ks = new KExtendedSocket(TQString::null, _path, KExtendedSocket::passiveSocket |
KExtendedSocket::unixSocket);
d->ks = ks;
@@ -321,7 +321,7 @@ bool KServerSocket::init( unsigned short int _port )
{
d->port = _port;
KExtendedSocket *ks;
- ks = new KExtendedSocket(QString::null, _port, KExtendedSocket::passiveSocket |
+ ks = new KExtendedSocket(TQString::null, _port, KExtendedSocket::passiveSocket |
KExtendedSocket::inetSocket);
d->ks = ks;
@@ -349,7 +349,7 @@ bool KServerSocket::bindAndListen()
sock = d->ks->fd();
- connect( d->ks->readNotifier(), SIGNAL( activated(int) ), this, SLOT( slotAccept(int) ) );
+ connect( d->ks->readNotifier(), TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotAccept(int) ) );
return true;
}
diff --git a/kdecore/ksock.h b/kdecore/ksock.h
index 566d23236..ab8b8828d 100644
--- a/kdecore/ksock.h
+++ b/kdecore/ksock.h
@@ -24,7 +24,7 @@
#ifdef Q_OS_UNIX
-#include <qobject.h>
+#include <tqobject.h>
#include <sys/types.h>
// we define STRICT_ANSI to get rid of some warnings in glibc
#ifndef __STRICT_ANSI__
@@ -210,7 +210,7 @@ public slots:
void slotRead( int x );
protected:
- bool connect( const QString& _host, unsigned short int _port, int timeout = 0 );
+ bool connect( const TQString& _host, unsigned short int _port, int timeout = 0 );
bool connect( const char *_path );
/******************************************************
diff --git a/kdecore/ksockaddr.cpp b/kdecore/ksockaddr.cpp
index be3e08b58..82bed0d5c 100644
--- a/kdecore/ksockaddr.cpp
+++ b/kdecore/ksockaddr.cpp
@@ -34,8 +34,8 @@
#include <sys/un.h>
#include <unistd.h>
-#include <qglobal.h>
-#include <qfile.h>
+#include <tqglobal.h>
+#include <tqfile.h>
#include "kdebug.h"
#include "klocale.h"
@@ -107,7 +107,7 @@ KSocketAddress::~KSocketAddress()
free(data);
}
-QString KSocketAddress::pretty() const
+TQString KSocketAddress::pretty() const
{
return i18n("<unknown socket>");
}
@@ -193,14 +193,14 @@ bool KSocketAddress::isCoreEqual(const KSocketAddress& other) const
return false;
}
-QString KSocketAddress::nodeName() const
+TQString KSocketAddress::nodeName() const
{
- return QString::null;
+ return TQString::null;
}
-QString KSocketAddress::serviceName() const
+TQString KSocketAddress::serviceName() const
{
- return QString::null;
+ return TQString::null;
}
int KSocketAddress::ianaFamily(int af)
@@ -303,7 +303,7 @@ KInetSocketAddress::KInetSocketAddress(const in6_addr& addr, unsigned short port
setAddress(addr, port);
}
-KInetSocketAddress::KInetSocketAddress(const QString& addr, unsigned short port, int family) :
+KInetSocketAddress::KInetSocketAddress(const TQString& addr, unsigned short port, int family) :
d(new KInetSocketAddressPrivate)
{
setAddress(addr, port, family);
@@ -377,7 +377,7 @@ bool KInetSocketAddress::setAddress(const in6_addr& addr, unsigned short port)
return setHost(addr) && setPort(port);
}
-bool KInetSocketAddress::setAddress(const QString& addr, unsigned short port, int family)
+bool KInetSocketAddress::setAddress(const TQString& addr, unsigned short port, int family)
{
return setHost(addr, family) && setPort(port);
}
@@ -402,7 +402,7 @@ bool KInetSocketAddress::setHost(const in6_addr& addr)
#endif
}
-bool KInetSocketAddress::setHost(const QString& addr, int family)
+bool KInetSocketAddress::setHost(const TQString& addr, int family)
{
// if family == -1, we'll try to guess the host name
if ((family != -1) && (family != AF_INET)
@@ -411,7 +411,7 @@ bool KInetSocketAddress::setHost(const QString& addr, int family)
#endif
)
{
- kdWarning() << "KInetSocketAddress::setHost(QString, int) called with unknown family address\n";
+ kdWarning() << "KInetSocketAddress::setHost(TQString, int) called with unknown family address\n";
return false;
}
@@ -556,7 +556,7 @@ in6_addr KInetSocketAddress::hostV6() const
}
#endif
-QString KInetSocketAddress::pretty() const
+TQString KInetSocketAddress::pretty() const
{
if (d->sockfamily != AF_INET
#ifdef AF_INET6
@@ -571,7 +571,7 @@ QString KInetSocketAddress::pretty() const
return i18n("1: hostname, 2: port number", "%1 port %2").arg(nodeName()).arg(serviceName());
}
-QString KInetSocketAddress::nodeName() const
+TQString KInetSocketAddress::nodeName() const
{
char buf[INET6_ADDRSTRLEN]; // INET6_ADDRSTRLEN > INET_ADDRSTRLEN
@@ -587,12 +587,12 @@ QString KInetSocketAddress::nodeName() const
return i18n("<empty>");
}
- return QString::fromLatin1(buf); // FIXME! What's the encoding?
+ return TQString::fromLatin1(buf); // FIXME! What's the encoding?
}
-QString KInetSocketAddress::serviceName() const
+TQString KInetSocketAddress::serviceName() const
{
- return QString::number(port());
+ return TQString::number(port());
}
unsigned short KInetSocketAddress::port() const
@@ -713,11 +713,11 @@ void KInetSocketAddress::fromV6()
#endif
}
-QString KInetSocketAddress::addrToString(int family, const void* addr)
+TQString KInetSocketAddress::addrToString(int family, const void* addr)
{
char buf[INET6_ADDRSTRLEN+1];
- return QString::fromLatin1(inet_ntop(family, addr, buf, INET6_ADDRSTRLEN));
+ return TQString::fromLatin1(inet_ntop(family, addr, buf, INET6_ADDRSTRLEN));
}
bool KInetSocketAddress::stringToAddr(int family, const char *text, void *dest)
@@ -749,7 +749,7 @@ KUnixSocketAddress::KUnixSocketAddress(const sockaddr_un* _sun, ksocklen_t size)
setAddress(_sun, size);
}
-KUnixSocketAddress::KUnixSocketAddress(QCString pathname) :
+KUnixSocketAddress::KUnixSocketAddress(TQCString pathname) :
d(new KUnixSocketAddressPrivate)
{
setAddress(pathname);
@@ -799,7 +799,7 @@ bool KUnixSocketAddress::setAddress(const sockaddr_un* _sun, ksocklen_t _size)
return 1;
}
-bool KUnixSocketAddress::setAddress(QCString path)
+bool KUnixSocketAddress::setAddress(TQCString path)
{
// the +1 is necessary for the ending zero
ksocklen_t newsize = offsetof(sockaddr_un, sun_path) + path.length() + 1;
@@ -835,7 +835,7 @@ bool KUnixSocketAddress::setAddress(QCString path)
return 1;
}
-QCString KUnixSocketAddress::pathname() const
+TQCString KUnixSocketAddress::pathname() const
{
if (d->m_sun != NULL)
{
@@ -843,20 +843,20 @@ QCString KUnixSocketAddress::pathname() const
return d->m_sun->sun_path;
return "";
}
- return QCString(0);
+ return TQCString(0);
}
-QString KUnixSocketAddress::pretty() const
+TQString KUnixSocketAddress::pretty() const
{
- QCString pname = pathname();
+ TQCString pname = pathname();
if (pname.isEmpty())
return i18n("<empty UNIX socket>");
- return QFile::decodeName(pathname());
+ return TQFile::decodeName(pathname());
}
-QString KUnixSocketAddress::serviceName() const
+TQString KUnixSocketAddress::serviceName() const
{
- return QString::fromUtf8(pathname());
+ return TQString::fromUtf8(pathname());
}
const sockaddr_un* KUnixSocketAddress::address() const
diff --git a/kdecore/ksockaddr.h b/kdecore/ksockaddr.h
index be522f72b..8b62f7da9 100644
--- a/kdecore/ksockaddr.h
+++ b/kdecore/ksockaddr.h
@@ -20,9 +20,9 @@
#ifndef KSOCKADDR_H
#define KSOCKADDR_H
-#include <qobject.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include "kdelibs_export.h"
/*
@@ -69,7 +69,7 @@ public:
* Returns a string representation of this socket.
* @return a pretty string representation
*/
- virtual QString pretty() const;
+ virtual TQString pretty() const;
/**
* Returns a sockaddr structure, for passing down to library functions.
@@ -152,19 +152,19 @@ public:
* Returns the node name of this socket, as KExtendedSocket::lookup expects
* as the first argument.
* In the case of Internet sockets, this is the hostname.
- * The default implementation returns QString::null.
- * @return the node name, can be QString::null
+ * The default implementation returns TQString::null.
+ * @return the node name, can be TQString::null
*/
- virtual QString nodeName() const;
+ virtual TQString nodeName() const;
/**
* Returns the service name for this socket, as KExtendedSocket::lookup expects
* as the service argument.
* In the case of Internet sockets, this is the port number.
- * The default implementation returns QString::null.
- * @return the service name, can be QString::null
+ * The default implementation returns TQString::null.
+ * @return the service name, can be TQString::null
*/
- virtual QString serviceName() const;
+ virtual TQString serviceName() const;
protected:
sockaddr* data;
@@ -281,7 +281,7 @@ public:
* family type
* @see setAddress
*/
- KInetSocketAddress(const QString& addr, unsigned short port, int family = -1);
+ KInetSocketAddress(const TQString& addr, unsigned short port, int family = -1);
/**
* Destructor
@@ -346,7 +346,7 @@ public:
* @param family the address family, -1 for any
* @return true if successful, false otherwise
*/
- bool setAddress(const QString& addr, unsigned short port, int family = -1);
+ bool setAddress(const TQString& addr, unsigned short port, int family = -1);
/**
* Sets this socket's host address to given raw address.
@@ -368,7 +368,7 @@ public:
* @param family the address family, -1 to guess the family
* @return true if successful, false otherwise
*/
- bool setHost(const QString& addr, int family = -1);
+ bool setHost(const TQString& addr, int family = -1);
/**
* Sets this socket's port number to given port number.
@@ -404,20 +404,20 @@ public:
* Returns a pretty representation of this address.
* @return a pretty representation
*/
- virtual QString pretty() const;
+ virtual TQString pretty() const;
/**
* Returns the text representation of the host address.
* @return a text representation of the host address
*/
- virtual QString nodeName() const;
- // QString prettyHost() const;
+ virtual TQString nodeName() const;
+ // TQString prettyHost() const;
/**
* Returns the text representation of the port number.
* @return the name of the service (a number)
*/
- virtual QString serviceName() const;
+ virtual TQString serviceName() const;
/**
* Returns the socket address.
@@ -536,12 +536,12 @@ private:
public:
/**
* Convert s the given raw address into text form.
- * This function returns QString::null if the address cannot be converted.
+ * This function returns TQString::null if the address cannot be converted.
* @param family the family of the address
* @param addr the address, in raw form
- * @return the converted address, or QString::null if not possible.
+ * @return the converted address, or TQString::null if not possible.
*/
- static QString addrToString(int family, const void *addr);
+ static TQString addrToString(int family, const void *addr);
/**
* Converts the address given in text form into raw form.
@@ -574,7 +574,7 @@ class KUnixSocketAddressPrivate;
*
* This is a Unix socket address.
*
- * This class expects QCString instead of QString values, which means the
+ * This class expects TQCString instead of TQString values, which means the
* filenames should be encoded in whatever form locale/system deems necessary
* before passing down to the function
*
@@ -601,7 +601,7 @@ public:
* Constructor from pathname.
* @param pathname pathname
*/
- KUnixSocketAddress(QCString pathname);
+ KUnixSocketAddress(TQCString pathname);
/**
* Destructor
@@ -621,28 +621,28 @@ public:
* @param path pathname
* @return true if successful, false otherwise
*/
- bool setAddress(QCString path);
+ bool setAddress(TQCString path);
/**
* Returns the pathname.
- * @return the pathname, can be QCString::null if uninitialized, or
+ * @return the pathname, can be TQCString::null if uninitialized, or
* "" if unknown
*/
- QCString pathname() const;
+ TQCString pathname() const;
/**
* Returns pretty representation of this socket.
* @return a pretty text representation of the socket.
*/
- virtual QString pretty() const;
+ virtual TQString pretty() const;
/*
- * Returns the path in the form of a QString.
+ * Returns the path in the form of a TQString.
* This can be fed into KExtendedSocket.
- * @return the path (can be QString::null).
+ * @return the path (can be TQString::null).
* @see pathname()
*/
- virtual QString serviceName() const;
+ virtual TQString serviceName() const;
/**
* Returns raw socket address.
diff --git a/kdecore/ksocks.cpp b/kdecore/ksocks.cpp
index be9331548..e596c50d9 100644
--- a/kdecore/ksocks.cpp
+++ b/kdecore/ksocks.cpp
@@ -22,9 +22,9 @@
#include <sys/time.h>
#endif
-#include <qfile.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <klocale.h>
#include <kdebug.h>
@@ -86,9 +86,9 @@ class KSocksTable {
virtual ~KSocksTable();
// The name of each symbol and it's SOCKS replacement
- QMap<SymbolKeys,QString> symbols;
+ TQMap<SymbolKeys,TQString> symbols;
// The name of this library
- QString myname;
+ TQString myname;
bool hasWorkingAsyncConnect;
};
@@ -269,12 +269,12 @@ KSocks::KSocks(KConfigBase *config) : _socksLib(0L), _st(0L) {
<< "libsocks5_sh.so"; // NEC
// Add the custom library paths here
- QStringList newlibs = config->readListEntry("SOCKS_lib_path");
+ TQStringList newlibs = config->readListEntry("SOCKS_lib_path");
- for (QStringList::Iterator it = newlibs.begin();
+ for (TQStringList::Iterator it = newlibs.begin();
it != newlibs.end();
++it) {
- QString thisone = *it;
+ TQString thisone = *it;
if (thisone[thisone.length()-1] != '/') thisone += "/";
_libPaths << thisone;
kdDebug(171) << "KSocks added a new library path: " << thisone << endl;
@@ -305,10 +305,10 @@ KSocks::KSocks(KConfigBase *config) : _socksLib(0L), _st(0L) {
_socksLib = 0L;
}
} else // leave this here "else for {}"
- for (QStringList::Iterator pit = _libPaths.begin();
+ for (TQStringList::Iterator pit = _libPaths.begin();
!_hasSocks && pit != _libPaths.end();
++pit)
- for (QStringList::Iterator it = _libNames.begin();
+ for (TQStringList::Iterator it = _libNames.begin();
it != _libNames.end();
++it) {
_socksLib = ll->library((*pit + *it).latin1());
@@ -336,7 +336,7 @@ KSocks::KSocks(KConfigBase *config) : _socksLib(0L), _st(0L) {
// Load in all the symbols
if (_st) {
- for (QMap<SymbolKeys,QString>::Iterator it = _st->symbols.begin();
+ for (TQMap<SymbolKeys,TQString>::Iterator it = _st->symbols.begin();
it != _st->symbols.end();
++it) {
switch(it.key()) {
diff --git a/kdecore/ksocks.h b/kdecore/ksocks.h
index 04fb4f79a..a95de56d4 100644
--- a/kdecore/ksocks.h
+++ b/kdecore/ksocks.h
@@ -18,7 +18,7 @@
#ifndef _KSOCKS_H_
#define _KSOCKS_H_
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <sys/types.h>
#include <sys/time.h>
#include <kstaticdeleter.h>
@@ -195,8 +195,8 @@ private:
static KSocks *_me;
static bool _disabled;
- QStringList _libNames;
- QStringList _libPaths;
+ TQStringList _libNames;
+ TQStringList _libPaths;
bool _useSocks, _hasSocks;
KLibrary* _socksLib;
diff --git a/kdecore/ksortablevaluelist.h b/kdecore/ksortablevaluelist.h
index e83bdf4ab..fc164bf07 100644
--- a/kdecore/ksortablevaluelist.h
+++ b/kdecore/ksortablevaluelist.h
@@ -20,8 +20,8 @@
#ifndef KSORTABLEVALUELIST_H
#define KSORTABLEVALUELIST_H
-#include <qpair.h>
-#include <qvaluelist.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
/**
@@ -121,13 +121,13 @@ public:
/**
- * KSortableValueList is a special QValueList for
+ * KSortableValueList is a special TQValueList for
* KSortableItem. It includes convenience operators
* to get the first value of the KSortableItem and a method
* to sort all items.
*/
template <class T, class Key = int>
-class KSortableValueList : public QValueList<KSortableItem<T, Key> >
+class KSortableValueList : public TQValueList<KSortableItem<T, Key> >
{
public:
/**
@@ -136,7 +136,7 @@ public:
* @param t the second value
*/
void insert( Key i, const T& t ) {
- QValueList<KSortableItem<T, Key> >::append( KSortableItem<T, Key>( i, t ) );
+ TQValueList<KSortableItem<T, Key> >::append( KSortableItem<T, Key>( i, t ) );
}
// add more as you please...
@@ -145,7 +145,7 @@ public:
* @return the first value of the KSortableItem
*/
T& operator[]( Key i ) {
- return QValueList<KSortableItem<T, Key> >::operator[]( i ).value();
+ return TQValueList<KSortableItem<T, Key> >::operator[]( i ).value();
}
/**
@@ -153,7 +153,7 @@ public:
* @return the first value of the KSortableItem
*/
const T& operator[]( Key i ) const {
- return QValueList<KSortableItem<T, Key> >::operator[]( i ).value();
+ return TQValueList<KSortableItem<T, Key> >::operator[]( i ).value();
}
/**
@@ -164,7 +164,7 @@ public:
}
};
-// template <class T> class KSortableValueListIterator : public QValueListIterator<KSortableItem<T> >
+// template <class T> class KSortableValueListIterator : public TQValueListIterator<KSortableItem<T> >
// {
// };
diff --git a/kdecore/kstandarddirs.cpp b/kdecore/kstandarddirs.cpp
index 28568b74e..6ec8eb1bc 100644
--- a/kdecore/kstandarddirs.cpp
+++ b/kdecore/kstandarddirs.cpp
@@ -38,13 +38,13 @@
#include <pwd.h>
#include <grp.h>
-#include <qregexp.h>
-#include <qasciidict.h>
-#include <qdict.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqasciidict.h>
+#include <tqdict.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kstandarddirs.h"
#include "kconfig.h"
@@ -56,7 +56,7 @@
#include "kstaticdeleter.h"
#include <kde_file.h>
-template class QDict<QStringList>;
+template class TQDict<TQStringList>;
class KStandardDirs::KStandardDirsPrivate
{
@@ -70,9 +70,9 @@ public:
bool restrictionsActive;
bool dataRestrictionActive;
bool checkRestrictions;
- QAsciiDict<bool> restrictions;
- QStringList xdgdata_prefixes;
- QStringList xdgconf_prefixes;
+ TQAsciiDict<bool> restrictions;
+ TQStringList xdgdata_prefixes;
+ TQStringList xdgconf_prefixes;
};
// Singleton, with data shared by all kstandarddirs instances.
@@ -80,8 +80,8 @@ public:
class KStandardDirsSingleton
{
public:
- QString defaultprefix;
- QString defaultbindir;
+ TQString defaultprefix;
+ TQString defaultbindir;
static KStandardDirsSingleton* self();
private:
static KStandardDirsSingleton* s_self;
@@ -103,8 +103,8 @@ static const char* const types[] = {"html", "icon", "apps", "sound",
"xdgdata-icon", "xdgdata-pixmap",
"kcfg", "emoticons", 0 };
-static int tokenize( QStringList& token, const QString& str,
- const QString& delim );
+static int tokenize( TQStringList& token, const TQString& str,
+ const TQString& delim );
KStandardDirs::KStandardDirs( ) : addedCustoms(false)
{
@@ -121,7 +121,7 @@ KStandardDirs::~KStandardDirs()
delete d;
}
-bool KStandardDirs::isRestrictedResource(const char *type, const QString& relPath) const
+bool KStandardDirs::isRestrictedResource(const char *type, const TQString& relPath) const
{
if (!d || !d->restrictionsActive)
return false;
@@ -141,9 +141,9 @@ bool KStandardDirs::isRestrictedResource(const char *type, const QString& relPat
return false;
}
-void KStandardDirs::applyDataRestrictions(const QString &relPath) const
+void KStandardDirs::applyDataRestrictions(const TQString &relPath) const
{
- QString key;
+ TQString key;
int i = relPath.find('/');
if (i != -1)
key = "data_"+relPath.left(i);
@@ -155,20 +155,20 @@ void KStandardDirs::applyDataRestrictions(const QString &relPath) const
}
-QStringList KStandardDirs::allTypes() const
+TQStringList KStandardDirs::allTypes() const
{
- QStringList list;
+ TQStringList list;
for (int i = 0; types[i] != 0; ++i)
- list.append(QString::fromLatin1(types[i]));
+ list.append(TQString::fromLatin1(types[i]));
return list;
}
-static void priorityAdd(QStringList &prefixes, const QString& dir, bool priority)
+static void priorityAdd(TQStringList &prefixes, const TQString& dir, bool priority)
{
if (priority && !prefixes.isEmpty())
{
// Add in front but behind $KDEHOME
- QStringList::iterator it = prefixes.begin();
+ TQStringList::iterator it = prefixes.begin();
it++;
prefixes.insert(it, 1, dir);
}
@@ -178,17 +178,17 @@ static void priorityAdd(QStringList &prefixes, const QString& dir, bool priority
}
}
-void KStandardDirs::addPrefix( const QString& _dir )
+void KStandardDirs::addPrefix( const TQString& _dir )
{
addPrefix(_dir, false);
}
-void KStandardDirs::addPrefix( const QString& _dir, bool priority )
+void KStandardDirs::addPrefix( const TQString& _dir, bool priority )
{
if (_dir.isEmpty())
return;
- QString dir = _dir;
+ TQString dir = _dir;
if (dir.at(dir.length() - 1) != '/')
dir += '/';
@@ -198,17 +198,17 @@ void KStandardDirs::addPrefix( const QString& _dir, bool priority )
}
}
-void KStandardDirs::addXdgConfigPrefix( const QString& _dir )
+void KStandardDirs::addXdgConfigPrefix( const TQString& _dir )
{
addXdgConfigPrefix(_dir, false);
}
-void KStandardDirs::addXdgConfigPrefix( const QString& _dir, bool priority )
+void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority )
{
if (_dir.isEmpty())
return;
- QString dir = _dir;
+ TQString dir = _dir;
if (dir.at(dir.length() - 1) != '/')
dir += '/';
@@ -218,17 +218,17 @@ void KStandardDirs::addXdgConfigPrefix( const QString& _dir, bool priority )
}
}
-void KStandardDirs::addXdgDataPrefix( const QString& _dir )
+void KStandardDirs::addXdgDataPrefix( const TQString& _dir )
{
addXdgDataPrefix(_dir, false);
}
-void KStandardDirs::addXdgDataPrefix( const QString& _dir, bool priority )
+void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority )
{
if (_dir.isEmpty())
return;
- QString dir = _dir;
+ TQString dir = _dir;
if (dir.at(dir.length() - 1) != '/')
dir += '/';
@@ -238,39 +238,39 @@ void KStandardDirs::addXdgDataPrefix( const QString& _dir, bool priority )
}
}
-QString KStandardDirs::kfsstnd_prefixes()
+TQString KStandardDirs::kfsstnd_prefixes()
{
- return prefixes.join(QChar(KPATH_SEPARATOR));
+ return prefixes.join(TQChar(KPATH_SEPARATOR));
}
-QString KStandardDirs::kfsstnd_xdg_conf_prefixes()
+TQString KStandardDirs::kfsstnd_xdg_conf_prefixes()
{
- return d->xdgconf_prefixes.join(QChar(KPATH_SEPARATOR));
+ return d->xdgconf_prefixes.join(TQChar(KPATH_SEPARATOR));
}
-QString KStandardDirs::kfsstnd_xdg_data_prefixes()
+TQString KStandardDirs::kfsstnd_xdg_data_prefixes()
{
- return d->xdgdata_prefixes.join(QChar(KPATH_SEPARATOR));
+ return d->xdgdata_prefixes.join(TQChar(KPATH_SEPARATOR));
}
bool KStandardDirs::addResourceType( const char *type,
- const QString& relativename )
+ const TQString& relativename )
{
return addResourceType(type, relativename, true);
}
bool KStandardDirs::addResourceType( const char *type,
- const QString& relativename,
+ const TQString& relativename,
bool priority )
{
if (relativename.isEmpty())
return false;
- QStringList *rels = relatives.find(type);
+ TQStringList *rels = relatives.find(type);
if (!rels) {
- rels = new QStringList();
+ rels = new TQStringList();
relatives.insert(type, rels);
}
- QString copy = relativename;
+ TQString copy = relativename;
if (copy.at(copy.length() - 1) != '/')
copy += '/';
if (!rels->contains(copy)) {
@@ -285,22 +285,22 @@ bool KStandardDirs::addResourceType( const char *type,
}
bool KStandardDirs::addResourceDir( const char *type,
- const QString& absdir)
+ const TQString& absdir)
{
// KDE4: change priority to bring in line with addResourceType
return addResourceDir(type, absdir, false);
}
bool KStandardDirs::addResourceDir( const char *type,
- const QString& absdir,
+ const TQString& absdir,
bool priority)
{
- QStringList *paths = absolutes.find(type);
+ TQStringList *paths = absolutes.find(type);
if (!paths) {
- paths = new QStringList();
+ paths = new TQStringList();
absolutes.insert(type, paths);
}
- QString copy = absdir;
+ TQString copy = absdir;
if (copy.at(copy.length() - 1) != '/')
copy += '/';
@@ -315,15 +315,15 @@ bool KStandardDirs::addResourceDir( const char *type,
return false;
}
-QString KStandardDirs::findResource( const char *type,
- const QString& filename ) const
+TQString KStandardDirs::findResource( const char *type,
+ const TQString& filename ) const
{
- if (!QDir::isRelativePath(filename))
+ if (!TQDir::isRelativePath(filename))
return filename; // absolute dirs are absolute dirs, right? :-/
#if 0
kdDebug() << "Find resource: " << type << endl;
-for (QStringList::ConstIterator pit = prefixes.begin();
+for (TQStringList::ConstIterator pit = prefixes.begin();
pit != prefixes.end();
pit++)
{
@@ -331,15 +331,15 @@ for (QStringList::ConstIterator pit = prefixes.begin();
}
#endif
- QString dir = findResourceDir(type, filename);
+ TQString dir = findResourceDir(type, filename);
if (dir.isEmpty())
return dir;
else return dir + filename;
}
-static Q_UINT32 updateHash(const QString &file, Q_UINT32 hash)
+static Q_UINT32 updateHash(const TQString &file, Q_UINT32 hash)
{
- QCString cFile = QFile::encodeName(file);
+ TQCString cFile = TQFile::encodeName(file);
KDE_struct_stat buff;
if ((access(cFile, R_OK) == 0) &&
(KDE_stat( cFile, &buff ) == 0) &&
@@ -351,21 +351,21 @@ static Q_UINT32 updateHash(const QString &file, Q_UINT32 hash)
}
Q_UINT32 KStandardDirs::calcResourceHash( const char *type,
- const QString& filename, bool deep) const
+ const TQString& filename, bool deep) const
{
Q_UINT32 hash = 0;
- if (!QDir::isRelativePath(filename))
+ if (!TQDir::isRelativePath(filename))
{
// absolute dirs are absolute dirs, right? :-/
return updateHash(filename, hash);
}
if (d && d->restrictionsActive && (strcmp(type, "data")==0))
applyDataRestrictions(filename);
- QStringList candidates = resourceDirs(type);
- QString fullPath;
+ TQStringList candidates = resourceDirs(type);
+ TQString fullPath;
- for (QStringList::ConstIterator it = candidates.begin();
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end(); ++it)
{
hash = updateHash(*it + filename, hash);
@@ -376,12 +376,12 @@ Q_UINT32 KStandardDirs::calcResourceHash( const char *type,
}
-QStringList KStandardDirs::findDirs( const char *type,
- const QString& reldir ) const
+TQStringList KStandardDirs::findDirs( const char *type,
+ const TQString& reldir ) const
{
- QDir testdir;
- QStringList list;
- if (!QDir::isRelativePath(reldir))
+ TQDir testdir;
+ TQStringList list;
+ if (!TQDir::isRelativePath(reldir))
{
testdir.setPath(reldir);
if (testdir.exists())
@@ -398,9 +398,9 @@ QStringList KStandardDirs::findDirs( const char *type,
if (d && d->restrictionsActive && (strcmp(type, "data")==0))
applyDataRestrictions(reldir);
- QStringList candidates = resourceDirs(type);
+ TQStringList candidates = resourceDirs(type);
- for (QStringList::ConstIterator it = candidates.begin();
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end(); ++it) {
testdir.setPath(*it + reldir);
if (testdir.exists())
@@ -410,22 +410,22 @@ QStringList KStandardDirs::findDirs( const char *type,
return list;
}
-QString KStandardDirs::findResourceDir( const char *type,
- const QString& filename) const
+TQString KStandardDirs::findResourceDir( const char *type,
+ const TQString& filename) const
{
#ifndef NDEBUG
if (filename.isEmpty()) {
kdWarning() << "filename for type " << type << " in KStandardDirs::findResourceDir is not supposed to be empty!!" << endl;
- return QString::null;
+ return TQString::null;
}
#endif
if (d && d->restrictionsActive && (strcmp(type, "data")==0))
applyDataRestrictions(filename);
- QStringList candidates = resourceDirs(type);
- QString fullPath;
+ TQStringList candidates = resourceDirs(type);
+ TQString fullPath;
- for (QStringList::ConstIterator it = candidates.begin();
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end(); ++it) {
if (exists(*it + filename)) {
#ifdef Q_WS_WIN //this ensures we're using installed .la files
@@ -445,13 +445,13 @@ QString KStandardDirs::findResourceDir( const char *type,
kdDebug() << "KStdDirs::findResDir(): can't find \"" << filename << "\" in type \"" << type << "\"." << endl;
#endif
- return QString::null;
+ return TQString::null;
}
-bool KStandardDirs::exists(const QString &fullPath)
+bool KStandardDirs::exists(const TQString &fullPath)
{
KDE_struct_stat buff;
- if (access(QFile::encodeName(fullPath), R_OK) == 0 && KDE_stat( QFile::encodeName(fullPath), &buff ) == 0)
+ if (access(TQFile::encodeName(fullPath), R_OK) == 0 && KDE_stat( TQFile::encodeName(fullPath), &buff ) == 0)
if (fullPath.at(fullPath.length() - 1) != '/') {
if (S_ISREG( buff.st_mode ))
return true;
@@ -461,19 +461,19 @@ bool KStandardDirs::exists(const QString &fullPath)
return false;
}
-static void lookupDirectory(const QString& path, const QString &relPart,
- const QRegExp &regexp,
- QStringList& list,
- QStringList& relList,
+static void lookupDirectory(const TQString& path, const TQString &relPart,
+ const TQRegExp &regexp,
+ TQStringList& list,
+ TQStringList& relList,
bool recursive, bool unique)
{
- QString pattern = regexp.pattern();
+ TQString pattern = regexp.pattern();
if (recursive || pattern.contains('?') || pattern.contains('*'))
{
if (path.isEmpty()) //for sanity
return;
// We look for a set of files.
- DIR *dp = opendir( QFile::encodeName(path));
+ DIR *dp = opendir( TQFile::encodeName(path));
if (!dp)
return;
@@ -486,20 +486,20 @@ static void lookupDirectory(const QString& path, const QString &relPart,
struct dirent *ep;
KDE_struct_stat buff;
- QString _dot(".");
- QString _dotdot("..");
+ TQString _dot(".");
+ TQString _dotdot("..");
while( ( ep = readdir( dp ) ) != 0L )
{
- QString fn( QFile::decodeName(ep->d_name));
+ TQString fn( TQFile::decodeName(ep->d_name));
if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1).latin1() == '~')
continue;
if (!recursive && !regexp.exactMatch(fn))
continue; // No match
- QString pathfn = path + fn;
- if ( KDE_stat( QFile::encodeName(pathfn), &buff ) != 0 ) {
+ TQString pathfn = path + fn;
+ if ( KDE_stat( TQFile::encodeName(pathfn), &buff ) != 0 ) {
kdDebug() << "Error stat'ing " << pathfn << " : " << perror << endl;
continue; // Couldn't stat (e.g. no read permissions)
}
@@ -524,10 +524,10 @@ static void lookupDirectory(const QString& path, const QString &relPart,
else
{
// We look for a single file.
- QString fn = pattern;
- QString pathfn = path + fn;
+ TQString fn = pattern;
+ TQString pathfn = path + fn;
KDE_struct_stat buff;
- if ( KDE_stat( QFile::encodeName(pathfn), &buff ) != 0 )
+ if ( KDE_stat( TQFile::encodeName(pathfn), &buff ) != 0 )
return; // File not found
if ( S_ISREG( buff.st_mode))
{
@@ -540,11 +540,11 @@ static void lookupDirectory(const QString& path, const QString &relPart,
}
}
-static void lookupPrefix(const QString& prefix, const QString& relpath,
- const QString& relPart,
- const QRegExp &regexp,
- QStringList& list,
- QStringList& relList,
+static void lookupPrefix(const TQString& prefix, const TQString& relpath,
+ const TQString& relPart,
+ const TQRegExp &regexp,
+ TQStringList& list,
+ TQStringList& relList,
bool recursive, bool unique)
{
if (relpath.isEmpty()) {
@@ -552,8 +552,8 @@ static void lookupPrefix(const QString& prefix, const QString& relpath,
relList, recursive, unique);
return;
}
- QString path;
- QString rest;
+ TQString path;
+ TQString rest;
if (relpath.length())
{
@@ -577,28 +577,28 @@ static void lookupPrefix(const QString& prefix, const QString& relpath,
if (path.contains('*') || path.contains('?')) {
- QRegExp pathExp(path, true, true);
- DIR *dp = opendir( QFile::encodeName(prefix) );
+ TQRegExp pathExp(path, true, true);
+ DIR *dp = opendir( TQFile::encodeName(prefix) );
if (!dp) {
return;
}
struct dirent *ep;
- QString _dot(".");
- QString _dotdot("..");
+ TQString _dot(".");
+ TQString _dotdot("..");
while( ( ep = readdir( dp ) ) != 0L )
{
- QString fn( QFile::decodeName(ep->d_name));
+ TQString fn( TQFile::decodeName(ep->d_name));
if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1) == '~')
continue;
if ( !pathExp.exactMatch(fn) )
continue; // No match
- QString rfn = relPart+fn;
+ TQString rfn = relPart+fn;
fn = prefix + fn;
- if ( KDE_stat( QFile::encodeName(fn), &buff ) != 0 ) {
+ if ( KDE_stat( TQFile::encodeName(fn), &buff ) != 0 ) {
kdDebug() << "Error statting " << fn << " : " << perror << endl;
continue; // Couldn't stat (e.g. no permissions)
}
@@ -618,14 +618,14 @@ static void lookupPrefix(const QString& prefix, const QString& relpath,
QStringList
KStandardDirs::findAllResources( const char *type,
- const QString& filter,
+ const TQString& filter,
bool recursive,
bool unique,
- QStringList &relList) const
+ TQStringList &relList) const
{
- QStringList list;
- QString filterPath;
- QString filterFile;
+ TQStringList list;
+ TQString filterPath;
+ TQString filterFile;
if (filter.length())
{
@@ -640,8 +640,8 @@ KStandardDirs::findAllResources( const char *type,
checkConfig();
- QStringList candidates;
- if (!QDir::isRelativePath(filter)) // absolute path
+ TQStringList candidates;
+ if (!TQDir::isRelativePath(filter)) // absolute path
{
#ifdef Q_OS_WIN
candidates << filterPath.left(3); //e.g. "C:\"
@@ -660,9 +660,9 @@ KStandardDirs::findAllResources( const char *type,
if (filterFile.isEmpty())
filterFile = "*";
- QRegExp regExp(filterFile, true, true);
+ TQRegExp regExp(filterFile, true, true);
- for (QStringList::ConstIterator it = candidates.begin();
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end(); ++it)
{
lookupPrefix(*it, filterPath, "", regExp, list,
@@ -674,42 +674,42 @@ KStandardDirs::findAllResources( const char *type,
QStringList
KStandardDirs::findAllResources( const char *type,
- const QString& filter,
+ const TQString& filter,
bool recursive,
bool unique) const
{
- QStringList relList;
+ TQStringList relList;
return findAllResources(type, filter, recursive, unique, relList);
}
QString
-KStandardDirs::realPath(const QString &dirname)
+KStandardDirs::realPath(const TQString &dirname)
{
char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1);
/* If the path contains symlinks, get the real name */
- if (realpath( QFile::encodeName(dirname).data(), realpath_buffer) != 0) {
+ if (realpath( TQFile::encodeName(dirname).data(), realpath_buffer) != 0) {
// success, use result from realpath
int len = strlen(realpath_buffer);
realpath_buffer[len] = '/';
realpath_buffer[len+1] = 0;
- return QFile::decodeName(realpath_buffer);
+ return TQFile::decodeName(realpath_buffer);
}
return dirname;
}
QString
-KStandardDirs::realFilePath(const QString &filename)
+KStandardDirs::realFilePath(const TQString &filename)
{
char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1);
/* If the path contains symlinks, get the real name */
- if (realpath( QFile::encodeName(filename).data(), realpath_buffer) != 0) {
+ if (realpath( TQFile::encodeName(filename).data(), realpath_buffer) != 0) {
// success, use result from realpath
- return QFile::decodeName(realpath_buffer);
+ return TQFile::decodeName(realpath_buffer);
}
return filename;
@@ -720,15 +720,15 @@ void KStandardDirs::createSpecialResource(const char *type)
char hostname[256];
hostname[0] = 0;
gethostname(hostname, 255);
- QString dir = QString("%1%2-%3").arg(localkdedir()).arg(type).arg(hostname);
+ TQString dir = TQString("%1%2-%3").arg(localkdedir()).arg(type).arg(hostname);
char link[1024];
link[1023] = 0;
- int result = readlink(QFile::encodeName(dir).data(), link, 1023);
+ int result = readlink(TQFile::encodeName(dir).data(), link, 1023);
bool relink = (result == -1) && (errno == ENOENT);
if (result > 0)
{
link[result] = 0;
- if (!QDir::isRelativePath(link))
+ if (!TQDir::isRelativePath(link))
{
KDE_struct_stat stat_buf;
int res = KDE_lstat(link, &stat_buf);
@@ -754,35 +754,35 @@ void KStandardDirs::createSpecialResource(const char *type)
if (!makeDir(dir, 0700))
fprintf(stderr, "failed to create \"%s\"", dir.latin1());
else
- result = readlink(QFile::encodeName(dir).data(), link, 1023);
+ result = readlink(TQFile::encodeName(dir).data(), link, 1023);
}
#else //UNIX
if (relink)
{
- QString srv = findExe(QString::fromLatin1("lnusertemp"), kfsstnd_defaultbindir());
+ TQString srv = findExe(TQString::fromLatin1("lnusertemp"), kfsstnd_defaultbindir());
if (srv.isEmpty())
- srv = findExe(QString::fromLatin1("lnusertemp"));
+ srv = findExe(TQString::fromLatin1("lnusertemp"));
if (!srv.isEmpty())
{
- system(QFile::encodeName(srv)+" "+type);
- result = readlink(QFile::encodeName(dir).data(), link, 1023);
+ system(TQFile::encodeName(srv)+" "+type);
+ result = readlink(TQFile::encodeName(dir).data(), link, 1023);
}
}
if (result > 0)
{
link[result] = 0;
if (link[0] == '/')
- dir = QFile::decodeName(link);
+ dir = TQFile::decodeName(link);
else
- dir = QDir::cleanDirPath(dir+QFile::decodeName(link));
+ dir = TQDir::cleanDirPath(dir+TQFile::decodeName(link));
}
#endif
addResourceDir(type, dir+'/');
}
-QStringList KStandardDirs::resourceDirs(const char *type) const
+TQStringList KStandardDirs::resourceDirs(const char *type) const
{
- QStringList *candidates = dircache.find(type);
+ TQStringList *candidates = dircache.find(type);
if (!candidates) { // filling cache
if (strcmp(type, "socket") == 0)
@@ -792,10 +792,10 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
else if (strcmp(type, "cache") == 0)
const_cast<KStandardDirs *>(this)->createSpecialResource(type);
- QDir testdir;
+ TQDir testdir;
- candidates = new QStringList();
- QStringList *dirs;
+ candidates = new TQStringList();
+ TQStringList *dirs;
bool restrictionActive = false;
if (d && d->restrictionsActive)
@@ -813,7 +813,7 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
if (dirs)
{
bool local = true;
- const QStringList *prefixList = 0;
+ const TQStringList *prefixList = 0;
if (strncmp(type, "xdgdata-", 8) == 0)
prefixList = &(d->xdgdata_prefixes);
else if (strncmp(type, "xdgconf-", 8) == 0)
@@ -821,13 +821,13 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
else
prefixList = &prefixes;
- for (QStringList::ConstIterator pit = prefixList->begin();
+ for (TQStringList::ConstIterator pit = prefixList->begin();
pit != prefixList->end();
++pit)
{
- for (QStringList::ConstIterator it = dirs->begin();
+ for (TQStringList::ConstIterator it = dirs->begin();
it != dirs->end(); ++it) {
- QString path = realPath(*pit + *it);
+ TQString path = realPath(*pit + *it);
testdir.setPath(path);
if (local && restrictionActive)
continue;
@@ -843,13 +843,13 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
}
dirs = absolutes.find(type);
if (dirs)
- for (QStringList::ConstIterator it = dirs->begin();
+ for (TQStringList::ConstIterator it = dirs->begin();
it != dirs->end(); ++it)
{
testdir.setPath(*it);
if (testdir.exists())
{
- QString filename = realPath(*it);
+ TQString filename = realPath(*it);
if (!candidates->contains(filename))
candidates->append(filename);
}
@@ -859,7 +859,7 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
#if 0
kdDebug() << "found dirs for resource " << type << ":" << endl;
- for (QStringList::ConstIterator pit = candidates->begin();
+ for (TQStringList::ConstIterator pit = candidates->begin();
pit != candidates->end();
pit++)
{
@@ -871,21 +871,21 @@ QStringList KStandardDirs::resourceDirs(const char *type) const
return *candidates;
}
-QStringList KStandardDirs::systemPaths( const QString& pstr )
+TQStringList KStandardDirs::systemPaths( const TQString& pstr )
{
- QStringList tokens;
- QString p = pstr;
+ TQStringList tokens;
+ TQString p = pstr;
if( p.isNull() )
{
p = getenv( "PATH" );
}
- QString delimiters(QChar(KPATH_SEPARATOR));
+ TQString delimiters(TQChar(KPATH_SEPARATOR));
delimiters += "\b";
tokenize( tokens, p, delimiters );
- QStringList exePaths;
+ TQStringList exePaths;
// split path using : or \b as delimiters
for( unsigned i = 0; i < tokens.count(); i++ )
@@ -899,14 +899,14 @@ QStringList KStandardDirs::systemPaths( const QString& pstr )
len = p.length();
if ( len == 1 )
{
- p.replace( 0, 1, QDir::homeDirPath() );
+ p.replace( 0, 1, TQDir::homeDirPath() );
}
else
{
- QString user = p.mid( 1, len - 1 );
+ TQString user = p.mid( 1, len - 1 );
struct passwd *dir = getpwnam( user.local8Bit().data() );
if ( dir && strlen( dir->pw_dir ) )
- p.replace( 0, len, QString::fromLocal8Bit( dir->pw_dir ) );
+ p.replace( 0, len, TQString::fromLocal8Bit( dir->pw_dir ) );
}
}
@@ -917,36 +917,36 @@ QStringList KStandardDirs::systemPaths( const QString& pstr )
}
-QString KStandardDirs::findExe( const QString& appname,
- const QString& pstr, bool ignore)
+TQString KStandardDirs::findExe( const TQString& appname,
+ const TQString& pstr, bool ignore)
{
#ifdef Q_WS_WIN
- QString real_appname = appname + ".exe";
+ TQString real_appname = appname + ".exe";
#else
- QString real_appname = appname;
+ TQString real_appname = appname;
#endif
- QFileInfo info;
+ TQFileInfo info;
// absolute or relative path given
- if (real_appname.find(QDir::separator()) >= 0)
+ if (real_appname.find(TQDir::separator()) >= 0)
{
info.setFile( real_appname );
if( info.exists() && ( ignore || info.isExecutable() )
&& info.isFile() ) {
return info.absFilePath();
}
- return QString::null;
+ return TQString::null;
}
- QString p = QString("%1/%2").arg(kfsstnd_defaultbindir()).arg(real_appname);
+ TQString p = TQString("%1/%2").arg(kfsstnd_defaultbindir()).arg(real_appname);
info.setFile( p );
if( info.exists() && ( ignore || info.isExecutable() )
&& ( info.isFile() || info.isSymLink() ) ) {
return p;
}
- QStringList exePaths = systemPaths( pstr );
- for (QStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); ++it)
+ TQStringList exePaths = systemPaths( pstr );
+ for (TQStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); ++it)
{
p = (*it) + "/";
p += real_appname;
@@ -963,23 +963,23 @@ QString KStandardDirs::findExe( const QString& appname,
// If we reach here, the executable wasn't found.
// So return empty string.
- return QString::null;
+ return TQString::null;
}
-int KStandardDirs::findAllExe( QStringList& list, const QString& appname,
- const QString& pstr, bool ignore )
+int KStandardDirs::findAllExe( TQStringList& list, const TQString& appname,
+ const TQString& pstr, bool ignore )
{
#ifdef Q_WS_WIN
- QString real_appname = appname + ".exe";
+ TQString real_appname = appname + ".exe";
#else
- QString real_appname = appname;
+ TQString real_appname = appname;
#endif
- QFileInfo info;
- QString p;
+ TQFileInfo info;
+ TQString p;
list.clear();
- QStringList exePaths = systemPaths( pstr );
- for (QStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); ++it)
+ TQStringList exePaths = systemPaths( pstr );
+ for (TQStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); ++it)
{
p = (*it) + "/";
p += real_appname;
@@ -995,11 +995,11 @@ int KStandardDirs::findAllExe( QStringList& list, const QString& appname,
return list.count();
}
-static int tokenize( QStringList& tokens, const QString& str,
- const QString& delim )
+static int tokenize( TQStringList& tokens, const TQString& str,
+ const TQString& delim )
{
int len = str.length();
- QString token = "";
+ TQString token = "";
for( int index = 0; index < len; index++)
{
@@ -1021,7 +1021,7 @@ static int tokenize( QStringList& tokens, const QString& str,
return tokens.count();
}
-QString KStandardDirs::kde_default(const char *type) {
+TQString KStandardDirs::kde_default(const char *type) {
if (!strcmp(type, "data"))
return "share/apps/";
if (!strcmp(type, "html"))
@@ -1075,19 +1075,19 @@ QString KStandardDirs::kde_default(const char *type) {
qFatal("unknown resource type %s", type);
- return QString::null;
+ return TQString::null;
}
-QString KStandardDirs::saveLocation(const char *type,
- const QString& suffix,
+TQString KStandardDirs::saveLocation(const char *type,
+ const TQString& suffix,
bool create) const
{
checkConfig();
- QString *pPath = savelocations.find(type);
+ TQString *pPath = savelocations.find(type);
if (!pPath)
{
- QStringList *dirs = relatives.find(type);
+ TQStringList *dirs = relatives.find(type);
if (!dirs && (
(strcmp(type, "socket") == 0) ||
(strcmp(type, "tmp") == 0) ||
@@ -1100,28 +1100,28 @@ QString KStandardDirs::saveLocation(const char *type,
{
// Check for existence of typed directory + suffix
if (strncmp(type, "xdgdata-", 8) == 0)
- pPath = new QString(realPath(localxdgdatadir() + dirs->last()));
+ pPath = new TQString(realPath(localxdgdatadir() + dirs->last()));
else if (strncmp(type, "xdgconf-", 8) == 0)
- pPath = new QString(realPath(localxdgconfdir() + dirs->last()));
+ pPath = new TQString(realPath(localxdgconfdir() + dirs->last()));
else
- pPath = new QString(realPath(localkdedir() + dirs->last()));
+ pPath = new TQString(realPath(localkdedir() + dirs->last()));
}
else {
dirs = absolutes.find(type);
if (!dirs)
qFatal("KStandardDirs: The resource type %s is not registered", type);
- pPath = new QString(realPath(dirs->last()));
+ pPath = new TQString(realPath(dirs->last()));
}
savelocations.insert(type, pPath);
}
- QString fullPath = *pPath + (pPath->endsWith("/") ? "" : "/") + suffix;
+ TQString fullPath = *pPath + (pPath->endsWith("/") ? "" : "/") + suffix;
KDE_struct_stat st;
- if (KDE_stat(QFile::encodeName(fullPath), &st) != 0 || !(S_ISDIR(st.st_mode))) {
+ if (KDE_stat(TQFile::encodeName(fullPath), &st) != 0 || !(S_ISDIR(st.st_mode))) {
if(!create) {
#ifndef NDEBUG
- kdDebug() << QString("save location %1 doesn't exist").arg(fullPath) << endl;
+ kdDebug() << TQString("save location %1 doesn't exist").arg(fullPath) << endl;
#endif
return fullPath;
}
@@ -1135,18 +1135,18 @@ QString KStandardDirs::saveLocation(const char *type,
return fullPath;
}
-QString KStandardDirs::relativeLocation(const char *type, const QString &absPath)
+TQString KStandardDirs::relativeLocation(const char *type, const TQString &absPath)
{
- QString fullPath = absPath;
+ TQString fullPath = absPath;
int i = absPath.findRev('/');
if (i != -1)
{
fullPath = realPath(absPath.left(i+1))+absPath.mid(i+1); // Normalize
}
- QStringList candidates = resourceDirs(type);
+ TQStringList candidates = resourceDirs(type);
- for (QStringList::ConstIterator it = candidates.begin();
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end(); ++it)
if (fullPath.startsWith(*it))
{
@@ -1157,20 +1157,20 @@ QString KStandardDirs::relativeLocation(const char *type, const QString &absPath
}
-bool KStandardDirs::makeDir(const QString& dir, int mode)
+bool KStandardDirs::makeDir(const TQString& dir, int mode)
{
// we want an absolute path
- if (QDir::isRelativePath(dir))
+ if (TQDir::isRelativePath(dir))
return false;
- QString target = dir;
+ TQString target = dir;
uint len = target.length();
// append trailing slash if missing
if (dir.at(len - 1) != '/')
target += '/';
- QString base("");
+ TQString base("");
uint i = 1;
while( i < len )
@@ -1178,7 +1178,7 @@ bool KStandardDirs::makeDir(const QString& dir, int mode)
KDE_struct_stat st;
int pos = target.find('/', i);
base += target.mid(i - 1, pos - i + 1);
- QCString baseEncoded = QFile::encodeName(base);
+ TQCString baseEncoded = TQFile::encodeName(base);
// bail out if we encountered a problem
if (KDE_stat(baseEncoded, &st) != 0)
{
@@ -1198,47 +1198,47 @@ bool KStandardDirs::makeDir(const QString& dir, int mode)
return true;
}
-static QString readEnvPath(const char *env)
+static TQString readEnvPath(const char *env)
{
- QCString c_path = getenv(env);
+ TQCString c_path = getenv(env);
if (c_path.isEmpty())
- return QString::null;
+ return TQString::null;
#ifdef Q_OS_WIN
//win32 paths are case-insensitive: avoid duplicates on various dir lists
- return QFile::decodeName(c_path).lower();
+ return TQFile::decodeName(c_path).lower();
#else
- return QFile::decodeName(c_path);
+ return TQFile::decodeName(c_path);
#endif
}
#ifdef __linux__
-static QString executablePrefix()
+static TQString executablePrefix()
{
char path_buffer[MAXPATHLEN + 1];
path_buffer[MAXPATHLEN] = 0;
int length = readlink ("/proc/self/exe", path_buffer, MAXPATHLEN);
if (length == -1)
- return QString::null;
+ return TQString::null;
path_buffer[length] = '\0';
- QString path = QFile::decodeName(path_buffer);
+ TQString path = TQFile::decodeName(path_buffer);
if(path.isEmpty())
- return QString::null;
+ return TQString::null;
int pos = path.findRev('/'); // Skip filename
if(pos <= 0)
- return QString::null;
+ return TQString::null;
pos = path.findRev('/', pos - 1); // Skip last directory
if(pos <= 0)
- return QString::null;
+ return TQString::null;
return path.left(pos);
}
#endif
-QString KStandardDirs::kfsstnd_defaultprefix()
+TQString KStandardDirs::kfsstnd_defaultprefix()
{
KStandardDirsSingleton* s = KStandardDirsSingleton::self();
if (!s->defaultprefix.isEmpty())
@@ -1246,7 +1246,7 @@ QString KStandardDirs::kfsstnd_defaultprefix()
#ifdef Q_WS_WIN
s->defaultprefix = readEnvPath("KDEDIR");
if (s->defaultprefix.isEmpty()) {
- s->defaultprefix = QFile::decodeName("c:\\kde");
+ s->defaultprefix = TQFile::decodeName("c:\\kde");
//TODO: find other location (the Registry?)
}
#else //UNIX
@@ -1257,17 +1257,17 @@ QString KStandardDirs::kfsstnd_defaultprefix()
return s->defaultprefix;
}
-QString KStandardDirs::kfsstnd_defaultbindir()
+TQString KStandardDirs::kfsstnd_defaultbindir()
{
KStandardDirsSingleton* s = KStandardDirsSingleton::self();
if (!s->defaultbindir.isEmpty())
return s->defaultbindir;
#ifdef Q_WS_WIN
- s->defaultbindir = kfsstnd_defaultprefix() + QString::fromLatin1("/bin");
+ s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin");
#else //UNIX
s->defaultbindir = __KDE_BINDIR;
if (s->defaultbindir.isEmpty())
- s->defaultbindir = kfsstnd_defaultprefix() + QString::fromLatin1("/bin");
+ s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin");
#endif
if (s->defaultbindir.isEmpty())
kdWarning() << "KStandardDirs::kfsstnd_defaultbindir(): default binary KDE dir not found!" << endl;
@@ -1276,17 +1276,17 @@ QString KStandardDirs::kfsstnd_defaultbindir()
void KStandardDirs::addKDEDefaults()
{
- QStringList kdedirList;
+ TQStringList kdedirList;
// begin KDEDIRS
- QString kdedirs = readEnvPath("KDEDIRS");
+ TQString kdedirs = readEnvPath("KDEDIRS");
if (!kdedirs.isEmpty())
{
- tokenize(kdedirList, kdedirs, QChar(KPATH_SEPARATOR));
+ tokenize(kdedirList, kdedirs, TQChar(KPATH_SEPARATOR));
}
else
{
- QString kdedir = readEnvPath("KDEDIR");
+ TQString kdedir = readEnvPath("KDEDIR");
if (!kdedir.isEmpty())
{
kdedir = KShell::tildeExpand(kdedir);
@@ -1299,19 +1299,19 @@ void KStandardDirs::addKDEDefaults()
#endif
#ifdef __KDE_EXECPREFIX
- QString execPrefix(__KDE_EXECPREFIX);
+ TQString execPrefix(__KDE_EXECPREFIX);
if (execPrefix!="NONE")
kdedirList.append(execPrefix);
#endif
#ifdef __linux__
- const QString linuxExecPrefix = executablePrefix();
+ const TQString linuxExecPrefix = executablePrefix();
if ( !linuxExecPrefix.isEmpty() )
kdedirList.append( linuxExecPrefix );
#endif
// We treat root differently to prevent a "su" shell messing up the
// file permissions in the user's home directory.
- QString localKdeDir = readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME");
+ TQString localKdeDir = readEnvPath(getuid() ? "KDEHOME" : "KDEROOTHOME");
if (!localKdeDir.isEmpty())
{
if (localKdeDir[localKdeDir.length()-1] != '/')
@@ -1319,7 +1319,7 @@ void KStandardDirs::addKDEDefaults()
}
else
{
- localKdeDir = QDir::homeDirPath() + "/.kde3/";
+ localKdeDir = TQDir::homeDirPath() + "/.kde3/";
}
if (localKdeDir != "-/")
@@ -1328,21 +1328,21 @@ void KStandardDirs::addKDEDefaults()
addPrefix(localKdeDir);
}
- QStringList::ConstIterator end(kdedirList.end());
- for (QStringList::ConstIterator it = kdedirList.begin();
+ TQStringList::ConstIterator end(kdedirList.end());
+ for (TQStringList::ConstIterator it = kdedirList.begin();
it != end; ++it)
{
- QString dir = KShell::tildeExpand(*it);
+ TQString dir = KShell::tildeExpand(*it);
addPrefix(dir);
}
// end KDEDIRS
// begin XDG_CONFIG_XXX
- QStringList xdgdirList;
- QString xdgdirs = readEnvPath("XDG_CONFIG_DIRS");
+ TQStringList xdgdirList;
+ TQString xdgdirs = readEnvPath("XDG_CONFIG_DIRS");
if (!xdgdirs.isEmpty())
{
- tokenize(xdgdirList, xdgdirs, QChar(KPATH_SEPARATOR));
+ tokenize(xdgdirList, xdgdirs, TQChar(KPATH_SEPARATOR));
}
else
{
@@ -1355,7 +1355,7 @@ void KStandardDirs::addKDEDefaults()
#endif
}
- QString localXdgDir = readEnvPath("XDG_CONFIG_HOME");
+ TQString localXdgDir = readEnvPath("XDG_CONFIG_HOME");
if (!localXdgDir.isEmpty())
{
if (localXdgDir[localXdgDir.length()-1] != '/')
@@ -1363,16 +1363,16 @@ void KStandardDirs::addKDEDefaults()
}
else
{
- localXdgDir = QDir::homeDirPath() + "/.config/";
+ localXdgDir = TQDir::homeDirPath() + "/.config/";
}
localXdgDir = KShell::tildeExpand(localXdgDir);
addXdgConfigPrefix(localXdgDir);
- for (QStringList::ConstIterator it = xdgdirList.begin();
+ for (TQStringList::ConstIterator it = xdgdirList.begin();
it != xdgdirList.end(); ++it)
{
- QString dir = KShell::tildeExpand(*it);
+ TQString dir = KShell::tildeExpand(*it);
addXdgConfigPrefix(dir);
}
// end XDG_CONFIG_XXX
@@ -1381,15 +1381,15 @@ void KStandardDirs::addKDEDefaults()
xdgdirs = readEnvPath("XDG_DATA_DIRS");
if (!xdgdirs.isEmpty())
{
- tokenize(xdgdirList, xdgdirs, QChar(KPATH_SEPARATOR));
+ tokenize(xdgdirList, xdgdirs, TQChar(KPATH_SEPARATOR));
}
else
{
xdgdirList.clear();
- for (QStringList::ConstIterator it = kdedirList.begin();
+ for (TQStringList::ConstIterator it = kdedirList.begin();
it != kdedirList.end(); ++it)
{
- QString dir = *it;
+ TQString dir = *it;
if (dir[dir.length()-1] != '/')
dir += '/';
xdgdirList.append(dir+"share/");
@@ -1407,16 +1407,16 @@ void KStandardDirs::addKDEDefaults()
}
else
{
- localXdgDir = QDir::homeDirPath() + "/.local/share/";
+ localXdgDir = TQDir::homeDirPath() + "/.local/share/";
}
localXdgDir = KShell::tildeExpand(localXdgDir);
addXdgDataPrefix(localXdgDir);
- for (QStringList::ConstIterator it = xdgdirList.begin();
+ for (TQStringList::ConstIterator it = xdgdirList.begin();
it != xdgdirList.end(); ++it)
{
- QString dir = KShell::tildeExpand(*it);
+ TQString dir = KShell::tildeExpand(*it);
addXdgDataPrefix(dir);
}
// end XDG_DATA_XXX
@@ -1428,7 +1428,7 @@ void KStandardDirs::addKDEDefaults()
index++;
}
- addResourceDir("home", QDir::homeDirPath());
+ addResourceDir("home", TQDir::homeDirPath());
addResourceDir("locale", "/usr/share/locale-langpack/", true);
}
@@ -1439,11 +1439,11 @@ void KStandardDirs::checkConfig() const
const_cast<KStandardDirs*>(this)->addCustomized(KGlobal::_instance->_config);
}
-static QStringList lookupProfiles(const QString &mapFile)
+static TQStringList lookupProfiles(const TQString &mapFile)
{
- QStringList profiles;
+ TQStringList profiles;
- if (mapFile.isEmpty() || !QFile::exists(mapFile))
+ if (mapFile.isEmpty() || !TQFile::exists(mapFile))
{
profiles << "default";
return profiles;
@@ -1456,7 +1456,7 @@ static QStringList lookupProfiles(const QString &mapFile)
return profiles; // Not good
}
- QCString user = pw->pw_name;
+ TQCString user = pw->pw_name;
gid_t sup_gids[512];
int sup_gids_nr = getgroups(512, sup_gids);
@@ -1470,14 +1470,14 @@ static QStringList lookupProfiles(const QString &mapFile)
}
mapCfg.setGroup("General");
- QStringList groups = mapCfg.readListEntry("groups");
+ TQStringList groups = mapCfg.readListEntry("groups");
mapCfg.setGroup("Groups");
- for( QStringList::ConstIterator it = groups.begin();
+ for( TQStringList::ConstIterator it = groups.begin();
it != groups.end(); ++it )
{
- QCString grp = (*it).utf8();
+ TQCString grp = (*it).utf8();
// Check if user is in this group
struct group *grp_ent = getgrnam(grp);
if (!grp_ent) continue;
@@ -1518,7 +1518,7 @@ bool KStandardDirs::addCustomized(KConfig *config)
uint configdirs = resourceDirs("config").count();
// Remember original group
- QString oldGroup = config->group();
+ TQString oldGroup = config->group();
if (!addedCustoms)
{
@@ -1526,15 +1526,15 @@ bool KStandardDirs::addCustomized(KConfig *config)
addedCustoms = true;
// reading the prefixes in
- QString group = QString::fromLatin1("Directories");
+ TQString group = TQString::fromLatin1("Directories");
config->setGroup(group);
- QString kioskAdmin = config->readEntry("kioskAdmin");
+ TQString kioskAdmin = config->readEntry("kioskAdmin");
if (!kioskAdmin.isEmpty() && !kde_kiosk_admin)
{
int i = kioskAdmin.find(':');
- QString user = kioskAdmin.left(i);
- QString host = kioskAdmin.mid(i+1);
+ TQString user = kioskAdmin.left(i);
+ TQString host = kioskAdmin.mid(i+1);
KUser thisUser;
char hostname[ 256 ];
@@ -1551,25 +1551,25 @@ bool KStandardDirs::addCustomized(KConfig *config)
bool readProfiles = true;
- if (kde_kiosk_admin && !QCString(getenv("KDE_KIOSK_NO_PROFILES")).isEmpty())
+ if (kde_kiosk_admin && !TQCString(getenv("KDE_KIOSK_NO_PROFILES")).isEmpty())
readProfiles = false;
- QString userMapFile = config->readEntry("userProfileMapFile");
- QString profileDirsPrefix = config->readEntry("profileDirsPrefix");
+ TQString userMapFile = config->readEntry("userProfileMapFile");
+ TQString profileDirsPrefix = config->readEntry("profileDirsPrefix");
if (!profileDirsPrefix.isEmpty() && !profileDirsPrefix.endsWith("/"))
profileDirsPrefix.append('/');
- QStringList profiles;
+ TQStringList profiles;
if (readProfiles)
profiles = lookupProfiles(userMapFile);
- QString profile;
+ TQString profile;
bool priority = false;
while(true)
{
config->setGroup(group);
- QStringList list = config->readListEntry("prefixes");
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
+ TQStringList list = config->readListEntry("prefixes");
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
{
addPrefix(*it, priority);
addXdgConfigPrefix(*it+"/etc/xdg", priority);
@@ -1579,7 +1579,7 @@ bool KStandardDirs::addCustomized(KConfig *config)
// for this profile under <profileDirsPrefix>
if (list.isEmpty() && !profile.isEmpty() && !profileDirsPrefix.isEmpty())
{
- QString dir = profileDirsPrefix + profile;
+ TQString dir = profileDirsPrefix + profile;
addPrefix(dir, priority);
addXdgConfigPrefix(dir+"/etc/xdg", priority);
addXdgDataPrefix(dir+"/share", priority);
@@ -1587,16 +1587,16 @@ bool KStandardDirs::addCustomized(KConfig *config)
// iterating over all entries in the group Directories
// to find entries that start with dir_$type
- QMap<QString, QString> entries = config->entryMap(group);
- for (QMap<QString, QString>::ConstIterator it2 = entries.begin();
+ TQMap<TQString, TQString> entries = config->entryMap(group);
+ for (TQMap<TQString, TQString>::ConstIterator it2 = entries.begin();
it2 != entries.end(); it2++)
{
- QString key = it2.key();
+ TQString key = it2.key();
if (key.startsWith("dir_")) {
// generate directory list, there may be more than 1.
- QStringList dirs = QStringList::split(',', *it2);
- QStringList::Iterator sIt(dirs.begin());
- QString resType = key.mid(4, key.length());
+ TQStringList dirs = TQStringList::split(',', *it2);
+ TQStringList::Iterator sIt(dirs.begin());
+ TQString resType = key.mid(4, key.length());
for (; sIt != dirs.end(); ++sIt)
{
addResourceDir(resType.latin1(), *sIt, priority);
@@ -1606,21 +1606,21 @@ bool KStandardDirs::addCustomized(KConfig *config)
if (profiles.isEmpty())
break;
profile = profiles.back();
- group = QString::fromLatin1("Directories-%1").arg(profile);
+ group = TQString::fromLatin1("Directories-%1").arg(profile);
profiles.pop_back();
priority = true;
}
}
// Process KIOSK restrictions.
- if (!kde_kiosk_admin || QCString(getenv("KDE_KIOSK_NO_RESTRICTIONS")).isEmpty())
+ if (!kde_kiosk_admin || TQCString(getenv("KDE_KIOSK_NO_RESTRICTIONS")).isEmpty())
{
config->setGroup("KDE Resource Restrictions");
- QMap<QString, QString> entries = config->entryMap("KDE Resource Restrictions");
- for (QMap<QString, QString>::ConstIterator it2 = entries.begin();
+ TQMap<TQString, TQString> entries = config->entryMap("KDE Resource Restrictions");
+ for (TQMap<TQString, TQString>::ConstIterator it2 = entries.begin();
it2 != entries.end(); it2++)
{
- QString key = it2.key();
+ TQString key = it2.key();
if (!config->readBoolEntry(key, true))
{
d->restrictionsActive = true;
@@ -1640,19 +1640,19 @@ bool KStandardDirs::addCustomized(KConfig *config)
return configDirsChanged;
}
-QString KStandardDirs::localkdedir() const
+TQString KStandardDirs::localkdedir() const
{
// Return the prefix to use for saving
return prefixes.first();
}
-QString KStandardDirs::localxdgdatadir() const
+TQString KStandardDirs::localxdgdatadir() const
{
// Return the prefix to use for saving
return d->xdgdata_prefixes.first();
}
-QString KStandardDirs::localxdgconfdir() const
+TQString KStandardDirs::localxdgconfdir() const
{
// Return the prefix to use for saving
return d->xdgconf_prefixes.first();
@@ -1660,29 +1660,29 @@ QString KStandardDirs::localxdgconfdir() const
// just to make code more readable without macros
-QString locate( const char *type,
- const QString& filename, const KInstance* inst )
+TQString locate( const char *type,
+ const TQString& filename, const KInstance* inst )
{
return inst->dirs()->findResource(type, filename);
}
-QString locateLocal( const char *type,
- const QString& filename, const KInstance* inst )
+TQString locateLocal( const char *type,
+ const TQString& filename, const KInstance* inst )
{
return locateLocal(type, filename, true, inst);
}
-QString locateLocal( const char *type,
- const QString& filename, bool createDir, const KInstance* inst )
+TQString locateLocal( const char *type,
+ const TQString& filename, bool createDir, const KInstance* inst )
{
// try to find slashes. If there are some, we have to
// create the subdir first
int slash = filename.findRev('/')+1;
if (!slash) // only one filename
- return inst->dirs()->saveLocation(type, QString::null, createDir) + filename;
+ return inst->dirs()->saveLocation(type, TQString::null, createDir) + filename;
// split path from filename
- QString dir = filename.left(slash);
- QString file = filename.mid(slash);
+ TQString dir = filename.left(slash);
+ TQString file = filename.mid(slash);
return inst->dirs()->saveLocation(type, dir, createDir) + file;
}
diff --git a/kdecore/kstandarddirs.h b/kdecore/kstandarddirs.h
index ca9b2870b..ded472d1d 100644
--- a/kdecore/kstandarddirs.h
+++ b/kdecore/kstandarddirs.h
@@ -23,9 +23,9 @@
#ifndef SSK_KSTDDIRS_H
#define SSK_KSTDDIRS_H
-#include <qstring.h>
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
#include <kglobal.h>
class KConfig;
@@ -144,7 +144,7 @@ public:
*
* @param dir The directory to append relative paths to.
*/
- void addPrefix( const QString& dir );
+ void addPrefix( const TQString& dir );
/**
* Adds another search dir to front of the XDG_CONFIG_XXX list
@@ -153,7 +153,7 @@ public:
*
* @param dir The directory to append relative paths to.
*/
- void addXdgConfigPrefix( const QString& dir );
+ void addXdgConfigPrefix( const TQString& dir );
/**
* Adds another search dir to front of the XDG_DATA_XXX list
@@ -162,7 +162,7 @@ public:
*
* @param dir The directory to append relative paths to.
*/
- void addXdgDataPrefix( const QString& dir );
+ void addXdgDataPrefix( const TQString& dir );
/**
* Adds suffixes for types.
@@ -184,7 +184,7 @@ public:
* @return true if successful, false otherwise.
*/
bool addResourceType( const char *type,
- const QString& relativename );
+ const TQString& relativename );
/**
* Adds absolute path at the end of the search path for
@@ -202,7 +202,7 @@ public:
* @return true if successful, false otherwise.
*/
bool addResourceDir( const char *type,
- const QString& absdir);
+ const TQString& absdir);
/**
* Tries to find a resource in the following order:
@@ -220,10 +220,10 @@ public:
* @param filename A relative filename of the resource.
*
* @return A full path to the filename specified in the second
- * argument, or QString::null if not found.
+ * argument, or TQString::null if not found.
*/
- QString findResource( const char *type,
- const QString& filename ) const;
+ TQString findResource( const char *type,
+ const TQString& filename ) const;
/**
* Checks whether a resource is restricted as part of the KIOSK
@@ -241,7 +241,7 @@ public:
* @since 3.1
*/
bool isRestrictedResource( const char *type,
- const QString& relPath=QString::null ) const;
+ const TQString& relPath=TQString::null ) const;
/**
* Returns a number that identifies this version of the resource.
@@ -256,7 +256,7 @@ public:
* resource.
*/
Q_UINT32 calcResourceHash( const char *type,
- const QString& filename, bool deep) const;
+ const TQString& filename, bool deep) const;
/**
* Tries to find all directories whose names consist of the
@@ -274,8 +274,8 @@ public:
* @return A list of matching directories, or an empty
* list if the resource specified is not found.
*/
- QStringList findDirs( const char *type,
- const QString& reldir ) const;
+ TQStringList findDirs( const char *type,
+ const TQString& reldir ) const;
/**
* Tries to find the directory the file is in.
@@ -293,12 +293,12 @@ public:
* @param type The type of the wanted resource
* @param filename A relative filename of the resource.
* @return The directory where the file specified in the second
- * argument is located, or QString::null if the type
+ * argument is located, or TQString::null if the type
* of resource specified is unknown or the resource
* cannot be found.
*/
- QString findResourceDir( const char *type,
- const QString& filename) const;
+ TQString findResourceDir( const char *type,
+ const TQString& filename) const;
/**
@@ -310,7 +310,7 @@ public:
* @param type The type of resource to locate directories for.
* @param filter Only accept filenames that fit to filter. The filter
* may consist of an optional directory and a QRegExp
- * wildcard expression. E.g. "images\*.jpg". Use QString::null
+ * wildcard expression. E.g. "images\*.jpg". Use TQString::null
* if you do not want a filter.
* @param recursive Specifies if the function should decend
* into subdirectories.
@@ -320,8 +320,8 @@ public:
* @return List of all the files whose filename matches the
* specified filter.
*/
- QStringList findAllResources( const char *type,
- const QString& filter = QString::null,
+ TQStringList findAllResources( const char *type,
+ const TQString& filter = TQString::null,
bool recursive = false,
bool unique = false) const;
@@ -335,7 +335,7 @@ public:
* @param type The type of resource to locate directories for.
* @param filter Only accept filenames that fit to filter. The filter
* may consist of an optional directory and a QRegExp
- * wildcard expression. E.g. "images\*.jpg". Use QString::null
+ * wildcard expression. E.g. "images\*.jpg". Use TQString::null
* if you do not want a filter.
* @param recursive Specifies if the function should decend
* into subdirectories.
@@ -347,22 +347,22 @@ public:
* @return List of all the files whose filename matches the
* specified filter.
*/
- QStringList findAllResources( const char *type,
- const QString& filter,
+ TQStringList findAllResources( const char *type,
+ const TQString& filter,
bool recursive,
bool unique,
- QStringList &relPaths) const;
+ TQStringList &relPaths) const;
/**
- * Returns a QStringList list of pathnames in the system path.
+ * Returns a TQStringList list of pathnames in the system path.
*
* @param pstr The path which will be searched. If this is
* null (default), the $PATH environment variable will
* be searched.
*
- * @return a QStringList list of pathnames in the system path.
+ * @return a TQStringList list of pathnames in the system path.
*/
- static QStringList systemPaths( const QString& pstr=QString::null );
+ static TQStringList systemPaths( const TQString& pstr=TQString::null );
/**
* Finds the executable in the system path.
@@ -378,11 +378,11 @@ public:
* even if its executable bit is not set.
*
* @return The path of the executable. If it was not found,
- * it will return QString::null.
+ * it will return TQString::null.
* @see findAllExe()
*/
- static QString findExe( const QString& appname,
- const QString& pathstr=QString::null,
+ static TQString findExe( const TQString& appname,
+ const TQString& pathstr=TQString::null,
bool ignoreExecBit=false );
/**
@@ -403,8 +403,8 @@ public:
*
* @see findExe()
*/
- static int findAllExe( QStringList& list, const QString& appname,
- const QString& pathstr=QString::null,
+ static int findAllExe( TQStringList& list, const TQString& appname,
+ const TQString& pathstr=TQString::null,
bool ignoreExecBit=false );
/**
@@ -440,7 +440,7 @@ public:
* Note, that the directories are assured to exist beside the save
* location, which may not exist, but is returned anyway.
*/
- QStringList resourceDirs(const char *type) const;
+ TQStringList resourceDirs(const char *type) const;
/**
* This function will return a list of all the types that KStandardDirs
@@ -448,7 +448,7 @@ public:
*
* @return All types that KDE supports
*/
- QStringList allTypes() const;
+ TQStringList allTypes() const;
/**
* Finds a location to save files into for the given type
@@ -465,10 +465,10 @@ public:
* needed (including those given by @p suffix).
*
* @return A path where resources of the specified type should be
- * saved, or QString::null if the resource type is unknown.
+ * saved, or TQString::null if the resource type is unknown.
*/
- QString saveLocation(const char *type,
- const QString& suffix = QString::null,
+ TQString saveLocation(const char *type,
+ const TQString& suffix = TQString::null,
bool create = true) const;
/**
@@ -486,7 +486,7 @@ public:
* will find @p absPath. If no such relative path exists, absPath
* will be returned unchanged.
*/
- QString relativeLocation(const char *type, const QString &absPath);
+ TQString relativeLocation(const char *type, const TQString &absPath);
/**
* Recursively creates still-missing directories in the given path.
@@ -498,7 +498,7 @@ public:
* @param mode Directory permissions.
* @return true if successful, false otherwise
*/
- static bool makeDir(const QString& dir, int mode = 0755);
+ static bool makeDir(const TQString& dir, int mode = 0755);
/**
* This returns a default relative path for the standard KDE
@@ -527,22 +527,22 @@ public:
* @see locate()
* @see locateLocal()
*/
- static QString kde_default(const char *type);
+ static TQString kde_default(const char *type);
/**
* @internal (for use by sycoca only)
*/
- QString kfsstnd_prefixes();
+ TQString kfsstnd_prefixes();
/**
* @internal (for use by sycoca only)
*/
- QString kfsstnd_xdg_conf_prefixes();
+ TQString kfsstnd_xdg_conf_prefixes();
/**
* @internal (for use by sycoca only)
*/
- QString kfsstnd_xdg_data_prefixes();
+ TQString kfsstnd_xdg_data_prefixes();
/**
* Returns the toplevel directory in which KStandardDirs
@@ -550,40 +550,40 @@ public:
* Don't use this function if you can use locateLocal
* @return the toplevel directory
*/
- QString localkdedir() const;
+ TQString localkdedir() const;
/**
* @internal
* Returns the default toplevel directory where KDE is installed.
*/
- static QString kfsstnd_defaultprefix();
+ static TQString kfsstnd_defaultprefix();
/**
* @internal
* Returns the default bin directory in which KDE executables are stored.
*/
- static QString kfsstnd_defaultbindir();
+ static TQString kfsstnd_defaultbindir();
/**
* @return $XDG_DATA_HOME
* See also http://www.freedesktop.org/standards/basedir/draft/basedir-spec/basedir-spec.html
*/
- QString localxdgdatadir() const;
+ TQString localxdgdatadir() const;
/**
* @return $XDG_CONFIG_HOME
* See also http://www.freedesktop.org/standards/basedir/draft/basedir-spec/basedir-spec.html
*/
- QString localxdgconfdir() const;
+ TQString localxdgconfdir() const;
/**
* Checks for existence and accessability of a file or directory.
- * Faster than creating a QFileInfo first.
+ * Faster than creating a TQFileInfo first.
* @param fullPath the path to check. IMPORTANT: must end with a slash if expected to be a directory
* (and no slash for a file, obviously).
* @return true if the directory exists
*/
- static bool exists(const QString &fullPath);
+ static bool exists(const TQString &fullPath);
/**
* Expands all symbolic links and resolves references to
@@ -593,7 +593,7 @@ public:
* or '/../' components.
* @since 3.1
*/
- static QString realPath(const QString &dirname);
+ static TQString realPath(const TQString &dirname);
/**
* Expands all symbolic links and resolves references to
@@ -603,18 +603,18 @@ public:
* or '/../' components.
* @since 3.4
*/
- static QString realFilePath(const QString &filename);
+ static TQString realFilePath(const TQString &filename);
private:
- QStringList prefixes;
+ TQStringList prefixes;
// Directory dictionaries
- QDict<QStringList> absolutes;
- QDict<QStringList> relatives;
+ TQDict<TQStringList> absolutes;
+ TQDict<TQStringList> relatives;
- mutable QDict<QStringList> dircache;
- mutable QDict<QString> savelocations;
+ mutable TQDict<TQStringList> dircache;
+ mutable TQDict<TQString> savelocations;
// Disallow assignment and copy-construction
KStandardDirs( const KStandardDirs& );
@@ -626,22 +626,22 @@ public:
KStandardDirsPrivate *d;
void checkConfig() const;
- void applyDataRestrictions(const QString &) const;
+ void applyDataRestrictions(const TQString &) const;
void createSpecialResource(const char*);
// Like their public counter parts but with an extra priority argument
// If priority is true, the directory is added directly after
// $KDEHOME/$XDG_DATA_HOME/$XDG_CONFIG_HOME
- void addPrefix( const QString& dir, bool priority );
- void addXdgConfigPrefix( const QString& dir, bool priority );
- void addXdgDataPrefix( const QString& dir, bool priority );
+ void addPrefix( const TQString& dir, bool priority );
+ void addXdgConfigPrefix( const TQString& dir, bool priority );
+ void addXdgDataPrefix( const TQString& dir, bool priority );
// If priority is true, the directory is added before any other,
// otherwise after
bool addResourceType( const char *type,
- const QString& relativename, bool priority );
+ const TQString& relativename, bool priority );
bool addResourceDir( const char *type,
- const QString& absdir, bool priority);
+ const TQString& absdir, bool priority);
};
/**
@@ -700,7 +700,7 @@ public:
* This function is just for convenience. It simply calls
*instance->dirs()->\link KStandardDirs::findResource() findResource\endlink(type, filename).
**/
-KDECORE_EXPORT QString locate( const char *type, const QString& filename, const KInstance* instance = KGlobal::instance() );
+KDECORE_EXPORT TQString locate( const char *type, const TQString& filename, const KInstance* instance = KGlobal::instance() );
/*!
* \relates KStandardDirs
@@ -711,7 +711,7 @@ KDECORE_EXPORT QString locate( const char *type, const QString& filename, const
* specific file, filename must have a trailing slash.
*
**/
-KDECORE_EXPORT QString locateLocal( const char *type, const QString& filename, const KInstance* instance = KGlobal::instance() );
+KDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, const KInstance* instance = KGlobal::instance() );
/*!
* \relates KStandardDirs
@@ -722,7 +722,7 @@ KDECORE_EXPORT QString locateLocal( const char *type, const QString& filename, c
* filename must have a trailing slash.
*
**/
-KDECORE_EXPORT QString locateLocal( const char *type, const QString& filename, bool createDir, const KInstance* instance = KGlobal::instance() );
+KDECORE_EXPORT TQString locateLocal( const char *type, const TQString& filename, bool createDir, const KInstance* instance = KGlobal::instance() );
/*! @} */
diff --git a/kdecore/kstartupinfo.cpp b/kdecore/kstartupinfo.cpp
index 93107c128..40f06127e 100644
--- a/kdecore/kstartupinfo.cpp
+++ b/kdecore/kstartupinfo.cpp
@@ -30,17 +30,17 @@ DEALINGS IN THE SOFTWARE.
#warning Extra KStartupInfo debug messages enabled.
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
#include "config.h"
#ifdef Q_WS_X11
//#ifdef Q_WS_X11 // FIXME(E): Re-implement in a less X11 specific way
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-// need to resolve INT32(qglobal.h)<>INT32(Xlibint.h) conflict
+// need to resolve INT32(tqglobal.h)<>INT32(Xlibint.h) conflict
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
@@ -50,7 +50,7 @@ DEALINGS IN THE SOFTWARE.
#include <unistd.h>
#include <sys/time.h>
#include <stdlib.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#ifdef Q_WS_X11
#include <netwm.h>
#endif
@@ -71,12 +71,12 @@ static const char* const NET_STARTUP_ENV = "DESKTOP_STARTUP_ID";
static bool auto_app_started_sending = true;
-static long get_num( const QString& item_P );
-static unsigned long get_unum( const QString& item_P );
-static QString get_str( const QString& item_P );
-static QCString get_cstr( const QString& item_P );
-static QStringList get_fields( const QString& txt_P );
-static QString escape_str( const QString& str_P );
+static long get_num( const TQString& item_P );
+static unsigned long get_unum( const TQString& item_P );
+static TQString get_str( const TQString& item_P );
+static TQCString get_cstr( const TQString& item_P );
+static TQStringList get_fields( const TQString& txt_P );
+static TQString escape_str( const TQString& str_P );
static Atom utf8_string_atom = None;
@@ -85,7 +85,7 @@ class KStartupInfo::Data
{
public:
Data() : KStartupInfoData(), age(0) {} // just because it's in a QMap
- Data( const QString& txt_P )
+ Data( const TQString& txt_P )
: KStartupInfoData( txt_P ), age( 0 ) {}
unsigned int age;
};
@@ -93,16 +93,16 @@ class KStartupInfo::Data
struct KStartupInfoPrivate
{
public:
- QMap< KStartupInfoId, KStartupInfo::Data > startups;
+ TQMap< KStartupInfoId, KStartupInfo::Data > startups;
// contains silenced ASN's only if !AnnounceSilencedChanges
- QMap< KStartupInfoId, KStartupInfo::Data > silent_startups;
+ TQMap< KStartupInfoId, KStartupInfo::Data > silent_startups;
// contains ASN's that had change: but no new: yet
- QMap< KStartupInfoId, KStartupInfo::Data > uninited_startups;
+ TQMap< KStartupInfoId, KStartupInfo::Data > uninited_startups;
#ifdef Q_WS_X11
KWinModule* wm_module;
KXMessages msgs;
#endif
- QTimer* cleanup;
+ TQTimer* cleanup;
int flags;
KStartupInfoPrivate( int flags_P )
:
@@ -112,15 +112,15 @@ struct KStartupInfoPrivate
flags( flags_P ) {}
};
-KStartupInfo::KStartupInfo( int flags_P, QObject* parent_P, const char* name_P )
- : QObject( parent_P, name_P ),
+KStartupInfo::KStartupInfo( int flags_P, TQObject* parent_P, const char* name_P )
+ : TQObject( parent_P, name_P ),
timeout( 60 ), d( NULL )
{
init( flags_P );
}
-KStartupInfo::KStartupInfo( bool clean_on_cantdetect_P, QObject* parent_P, const char* name_P )
- : QObject( parent_P, name_P ),
+KStartupInfo::KStartupInfo( bool clean_on_cantdetect_P, TQObject* parent_P, const char* name_P )
+ : TQObject( parent_P, name_P ),
timeout( 60 ), d( NULL )
{
init( clean_on_cantdetect_P ? CleanOnCantDetect : 0 );
@@ -139,15 +139,15 @@ void KStartupInfo::init( int flags_P )
if( !( d->flags & DisableKWinModule ))
{
d->wm_module = new KWinModule( this );
- connect( d->wm_module, SIGNAL( windowAdded( WId )), SLOT( slot_window_added( WId )));
- connect( d->wm_module, SIGNAL( systemTrayWindowAdded( WId )), SLOT( slot_window_added( WId )));
+ connect( d->wm_module, TQT_SIGNAL( windowAdded( WId )), TQT_SLOT( slot_window_added( WId )));
+ connect( d->wm_module, TQT_SIGNAL( systemTrayWindowAdded( WId )), TQT_SLOT( slot_window_added( WId )));
}
else
d->wm_module = NULL;
- connect( &d->msgs, SIGNAL( gotMessage( const QString& )), SLOT( got_message( const QString& )));
+ connect( &d->msgs, TQT_SIGNAL( gotMessage( const TQString& )), TQT_SLOT( got_message( const TQString& )));
#endif
- d->cleanup = new QTimer( this, "cleanup" );
- connect( d->cleanup, SIGNAL( timeout()), SLOT( startups_cleanup()));
+ d->cleanup = new TQTimer( this, "cleanup" );
+ connect( d->cleanup, TQT_SIGNAL( timeout()), TQT_SLOT( startups_cleanup()));
}
KStartupInfo::~KStartupInfo()
@@ -155,11 +155,11 @@ KStartupInfo::~KStartupInfo()
delete d;
}
-void KStartupInfo::got_message( const QString& msg_P )
+void KStartupInfo::got_message( const TQString& msg_P )
{
// TODO do something with SCREEN= ?
kdDebug( 172 ) << "got:" << msg_P << endl;
- QString msg = msg_P.stripWhiteSpace();
+ TQString msg = msg_P.stripWhiteSpace();
if( msg.startsWith( "new:" )) // must match length below
got_startup_info( msg.mid( 4 ), false );
else if( msg.startsWith( "change:" )) // must match length below
@@ -181,7 +181,7 @@ class DelayedWindowEvent
{
public:
DelayedWindowEvent( WId w_P )
- : QCustomEvent( QEvent::User + 15 ), w( w_P ) {}
+ : TQCustomEvent( TQEvent::User + 15 ), w( w_P ) {}
Window w;
};
}
@@ -191,12 +191,12 @@ void KStartupInfo::slot_window_added( WId w_P )
kapp->postEvent( this, new DelayedWindowEvent( w_P ));
}
-void KStartupInfo::customEvent( QCustomEvent* e_P )
+void KStartupInfo::customEvent( TQCustomEvent* e_P )
{
- if( e_P->type() == QEvent::User + 15 )
+ if( e_P->type() == TQEvent::User + 15 )
window_added( static_cast< DelayedWindowEvent* >( e_P )->w );
else
- QObject::customEvent( e_P );
+ TQObject::customEvent( e_P );
}
void KStartupInfo::window_added( WId w_P )
@@ -218,7 +218,7 @@ void KStartupInfo::window_added( WId w_P )
}
}
-void KStartupInfo::got_startup_info( const QString& msg_P, bool update_P )
+void KStartupInfo::got_startup_info( const TQString& msg_P, bool update_P )
{
KStartupInfoId id( msg_P );
if( id.none())
@@ -298,7 +298,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P,
d->cleanup->start( 1000 ); // 1 sec
}
-void KStartupInfo::got_remove_startup_info( const QString& msg_P )
+void KStartupInfo::got_remove_startup_info( const TQString& msg_P )
{
KStartupInfoId id( msg_P );
KStartupInfoData data( msg_P );
@@ -340,7 +340,7 @@ void KStartupInfo::remove_startup_pids( const KStartupInfoData& data_P )
{ // first find the matching info
if( d == NULL )
return;
- for( QMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
++it )
{
@@ -368,7 +368,7 @@ void KStartupInfo::remove_startup_pids( const KStartupInfoId& id_P,
data = &d->uninited_startups[ id_P ];
else
return;
- for( QValueList< pid_t >::ConstIterator it2 = data_P.pids().begin();
+ for( TQValueList< pid_t >::ConstIterator it2 = data_P.pids().begin();
it2 != data_P.pids().end();
++it2 )
data->remove_pid( *it2 ); // remove all pids from the info
@@ -381,7 +381,7 @@ bool KStartupInfo::sendStartup( const KStartupInfoId& id_P, const KStartupInfoDa
if( id_P.none())
return false;
KXMessages msgs;
- QString msg = QString::fromLatin1( "new: %1 %2" )
+ TQString msg = TQString::fromLatin1( "new: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
msg = check_required_startup_fields( msg, data_P, qt_xscreen());
kdDebug( 172 ) << "sending " << msg << endl;
@@ -394,7 +394,7 @@ bool KStartupInfo::sendStartupX( Display* disp_P, const KStartupInfoId& id_P,
{
if( id_P.none())
return false;
- QString msg = QString::fromLatin1( "new: %1 %2" )
+ TQString msg = TQString::fromLatin1( "new: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
msg = check_required_startup_fields( msg, data_P, DefaultScreen( disp_P ));
#ifdef KSTARTUPINFO_ALL_DEBUG
@@ -403,20 +403,20 @@ bool KStartupInfo::sendStartupX( Display* disp_P, const KStartupInfoId& id_P,
return KXMessages::broadcastMessageX( disp_P, NET_STARTUP_MSG, msg, -1, false );
}
-QString KStartupInfo::check_required_startup_fields( const QString& msg, const KStartupInfoData& data_P,
+TQString KStartupInfo::check_required_startup_fields( const TQString& msg, const KStartupInfoData& data_P,
int screen )
{
- QString ret = msg;
+ TQString ret = msg;
if( data_P.name().isEmpty())
{
// kdWarning( 172 ) << "NAME not specified in initial startup message" << endl;
- QString name = data_P.bin();
+ TQString name = data_P.bin();
if( name.isEmpty())
name = "UNKNOWN";
- ret += QString( " NAME=\"%1\"" ).arg( escape_str( name ));
+ ret += TQString( " NAME=\"%1\"" ).arg( escape_str( name ));
}
if( data_P.screen() == -1 ) // add automatically if needed
- ret += QString( " SCREEN=%1" ).arg( screen );
+ ret += TQString( " SCREEN=%1" ).arg( screen );
return ret;
}
@@ -425,7 +425,7 @@ bool KStartupInfo::sendChange( const KStartupInfoId& id_P, const KStartupInfoDat
if( id_P.none())
return false;
KXMessages msgs;
- QString msg = QString::fromLatin1( "change: %1 %2" )
+ TQString msg = TQString::fromLatin1( "change: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
kdDebug( 172 ) << "sending " << msg << endl;
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
@@ -437,7 +437,7 @@ bool KStartupInfo::sendChangeX( Display* disp_P, const KStartupInfoId& id_P,
{
if( id_P.none())
return false;
- QString msg = QString::fromLatin1( "change: %1 %2" )
+ TQString msg = TQString::fromLatin1( "change: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
#ifdef KSTARTUPINFO_ALL_DEBUG
kdDebug( 172 ) << "sending " << msg << endl;
@@ -450,7 +450,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P )
if( id_P.none())
return false;
KXMessages msgs;
- QString msg = QString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
+ TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
kdDebug( 172 ) << "sending " << msg << endl;
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
return true;
@@ -460,7 +460,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P )
{
if( id_P.none())
return false;
- QString msg = QString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
+ TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
#ifdef KSTARTUPINFO_ALL_DEBUG
kdDebug( 172 ) << "sending " << msg << endl;
#endif
@@ -472,7 +472,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P, const KStartupInfoDat
// if( id_P.none()) // id may be none, the pids and hostname matter then
// return false;
KXMessages msgs;
- QString msg = QString::fromLatin1( "remove: %1 %2" )
+ TQString msg = TQString::fromLatin1( "remove: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
kdDebug( 172 ) << "sending " << msg << endl;
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
@@ -484,7 +484,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P,
{
// if( id_P.none()) // id may be none, the pids and hostname matter then
// return false;
- QString msg = QString::fromLatin1( "remove: %1 %2" )
+ TQString msg = TQString::fromLatin1( "remove: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
#ifdef KSTARTUPINFO_ALL_DEBUG
kdDebug( 172 ) << "sending " << msg << endl;
@@ -500,7 +500,7 @@ void KStartupInfo::appStarted()
appStarted( KStartupInfo::currentStartupIdEnv().id());
}
-void KStartupInfo::appStarted( const QCString& startup_id )
+void KStartupInfo::appStarted( const TQCString& startup_id )
{
KStartupInfoId id;
id.initId( startup_id );
@@ -543,7 +543,7 @@ void KStartupInfo::handleAutoAppStartedSending()
appStarted();
}
-void KStartupInfo::setNewStartupId( QWidget* window, const QCString& startup_id )
+void KStartupInfo::setNewStartupId( TQWidget* window, const TQCString& startup_id )
{
bool activate = true;
kapp->setStartupId( startup_id );
@@ -607,7 +607,7 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
// - Yes - test for pid match
// - No - test for WM_CLASS match
kdDebug( 172 ) << "check_startup" << endl;
- QCString id = windowStartupId( w_P );
+ TQCString id = windowStartupId( w_P );
if( !id.isNull())
{
if( id.isEmpty() || id == "0" ) // means ignore this window
@@ -623,7 +623,7 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
pid_t pid = info.pid();
if( pid > 0 )
{
- QCString hostname = get_window_hostname( w_P );
+ TQCString hostname = get_window_hostname( w_P );
if( !hostname.isEmpty()
&& find_pid( pid, hostname, id_O, data_O ))
return Match;
@@ -632,8 +632,8 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
XClassHint hint;
if( XGetClassHint( qt_xdisplay(), w_P, &hint ) != 0 )
{ // We managed to read the class hint
- QCString res_name = hint.res_name;
- QCString res_class = hint.res_class;
+ TQCString res_name = hint.res_name;
+ TQCString res_class = hint.res_class;
XFree( hint.res_name );
XFree( hint.res_class );
if( find_wclass( res_name, res_class, id_O, data_O ))
@@ -661,7 +661,7 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
return CantDetect;
}
-bool KStartupInfo::find_id( const QCString& id_P, KStartupInfoId* id_O,
+bool KStartupInfo::find_id( const TQCString& id_P, KStartupInfoId* id_O,
KStartupInfoData* data_O )
{
if( d == NULL )
@@ -681,13 +681,13 @@ bool KStartupInfo::find_id( const QCString& id_P, KStartupInfoId* id_O,
return false;
}
-bool KStartupInfo::find_pid( pid_t pid_P, const QCString& hostname_P,
+bool KStartupInfo::find_pid( pid_t pid_P, const TQCString& hostname_P,
KStartupInfoId* id_O, KStartupInfoData* data_O )
{
if( d == NULL )
return false;
kdDebug( 172 ) << "find_pid:" << pid_P << endl;
- for( QMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
++it )
{
@@ -706,7 +706,7 @@ bool KStartupInfo::find_pid( pid_t pid_P, const QCString& hostname_P,
return false;
}
-bool KStartupInfo::find_wclass( QCString res_name, QCString res_class,
+bool KStartupInfo::find_wclass( TQCString res_name, TQCString res_class,
KStartupInfoId* id_O, KStartupInfoData* data_O )
{
if( d == NULL )
@@ -714,11 +714,11 @@ bool KStartupInfo::find_wclass( QCString res_name, QCString res_class,
res_name = res_name.lower();
res_class = res_class.lower();
kdDebug( 172 ) << "find_wclass:" << res_name << ":" << res_class << endl;
- for( QMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
++it )
{
- const QCString wmclass = ( *it ).findWMClass();
+ const TQCString wmclass = ( *it ).findWMClass();
if( wmclass.lower() == res_name || wmclass.lower() == res_class )
{ // Found it !
if( id_O != NULL )
@@ -737,9 +737,9 @@ bool KStartupInfo::find_wclass( QCString res_name, QCString res_class,
#ifdef Q_WS_X11
static Atom net_startup_atom = None;
-static QCString read_startup_id_property( WId w_P )
+static TQCString read_startup_id_property( WId w_P )
{
- QCString ret;
+ TQCString ret;
unsigned char *name_ret;
Atom type_ret;
int format_ret;
@@ -758,14 +758,14 @@ static QCString read_startup_id_property( WId w_P )
#endif
-QCString KStartupInfo::windowStartupId( WId w_P )
+TQCString KStartupInfo::windowStartupId( WId w_P )
{
#ifdef Q_WS_X11
if( net_startup_atom == None )
net_startup_atom = XInternAtom( qt_xdisplay(), NET_STARTUP_WINDOW, False );
if( utf8_string_atom == None )
utf8_string_atom = XInternAtom( qt_xdisplay(), "UTF8_STRING", False );
- QCString ret = read_startup_id_property( w_P );
+ TQCString ret = read_startup_id_property( w_P );
if( ret.isEmpty())
{ // retry with window group leader, as the spec says
XWMHints* hints = XGetWMHints( qt_xdisplay(), w_P );
@@ -776,11 +776,11 @@ QCString KStartupInfo::windowStartupId( WId w_P )
}
return ret;
#else
- return QCString();
+ return TQCString();
#endif
}
-void KStartupInfo::setWindowStartupId( WId w_P, const QCString& id_P )
+void KStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P )
{
#ifdef Q_WS_X11
if( id_P.isNull())
@@ -794,7 +794,7 @@ void KStartupInfo::setWindowStartupId( WId w_P, const QCString& id_P )
#endif
}
-QCString KStartupInfo::get_window_hostname( WId w_P )
+TQCString KStartupInfo::get_window_hostname( WId w_P )
{
#ifdef Q_WS_X11
XTextProperty tp;
@@ -805,7 +805,7 @@ QCString KStartupInfo::get_window_hostname( WId w_P )
{
if( cnt == 1 )
{
- QCString hostname = hh[ 0 ];
+ TQCString hostname = hh[ 0 ];
XFreeStringList( hh );
return hostname;
}
@@ -813,14 +813,14 @@ QCString KStartupInfo::get_window_hostname( WId w_P )
}
#endif
// no hostname
- return QCString();
+ return TQCString();
}
void KStartupInfo::setTimeout( unsigned int secs_P )
{
timeout = secs_P;
// schedule removing entries that are older than the new timeout
- QTimer::singleShot( 0, this, SLOT( startups_cleanup_no_age()));
+ TQTimer::singleShot( 0, this, TQT_SLOT( startups_cleanup_no_age()));
}
void KStartupInfo::startups_cleanup_no_age()
@@ -845,7 +845,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
{
if( d == NULL )
return;
- for( QMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
)
{
@@ -864,7 +864,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
else
++it;
}
- for( QMap< KStartupInfoId, Data >::Iterator it = d->silent_startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->silent_startups.begin();
it != d->silent_startups.end();
)
{
@@ -883,7 +883,7 @@ void KStartupInfo::startups_cleanup_internal( bool age_P )
else
++it;
}
- for( QMap< KStartupInfoId, Data >::Iterator it = d->uninited_startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->uninited_startups.begin();
it != d->uninited_startups.end();
)
{
@@ -908,7 +908,7 @@ void KStartupInfo::clean_all_noncompliant()
{
if( d == NULL )
return;
- for( QMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
+ for( TQMap< KStartupInfoId, Data >::Iterator it = d->startups.begin();
it != d->startups.end();
)
{
@@ -924,7 +924,7 @@ void KStartupInfo::clean_all_noncompliant()
}
}
-QCString KStartupInfo::createNewStartupId()
+TQCString KStartupInfo::createNewStartupId()
{
// Assign a unique id, use hostname+time+pid, that should be 200% unique.
// Also append the user timestamp (for focus stealing prevention).
@@ -939,7 +939,7 @@ QCString KStartupInfo::createNewStartupId()
#else
unsigned long qt_x_user_time = 0;
#endif
- QCString id = QString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec )
+ TQCString id = TQString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec )
.arg( tm.tv_usec ).arg( getpid()).arg( qt_x_user_time ).utf8();
kdDebug( 172 ) << "creating: " << id << ":" << qAppName() << endl;
return id;
@@ -949,26 +949,26 @@ QCString KStartupInfo::createNewStartupId()
struct KStartupInfoIdPrivate
{
KStartupInfoIdPrivate() : id( "" ) {}
- QCString id; // id
+ TQCString id; // id
};
-const QCString& KStartupInfoId::id() const
+const TQCString& KStartupInfoId::id() const
{
return d->id;
}
-QString KStartupInfoId::to_text() const
+TQString KStartupInfoId::to_text() const
{
- return QString::fromLatin1( " ID=\"%1\" " ).arg( escape_str( id()));
+ return TQString::fromLatin1( " ID=\"%1\" " ).arg( escape_str( id()));
}
-KStartupInfoId::KStartupInfoId( const QString& txt_P )
+KStartupInfoId::KStartupInfoId( const TQString& txt_P )
{
d = new KStartupInfoIdPrivate;
- QStringList items = get_fields( txt_P );
- const QString id_str = QString::fromLatin1( "ID=" );
- for( QStringList::Iterator it = items.begin();
+ TQStringList items = get_fields( txt_P );
+ const TQString id_str = TQString::fromLatin1( "ID=" );
+ for( TQStringList::Iterator it = items.begin();
it != items.end();
++it )
{
@@ -977,7 +977,7 @@ KStartupInfoId::KStartupInfoId( const QString& txt_P )
}
}
-void KStartupInfoId::initId( const QCString& id_P )
+void KStartupInfoId::initId( const TQCString& id_P )
{
if( !id_P.isEmpty())
{
@@ -1110,14 +1110,14 @@ struct KStartupInfoDataPrivate
{
KStartupInfoDataPrivate() : desktop( 0 ), wmclass( "" ), hostname( "" ),
silent( KStartupInfoData::Unknown ), timestamp( -1U ), screen( -1 ), xinerama( -1 ), launched_by( 0 ) {}
- QString bin;
- QString name;
- QString description;
- QString icon;
+ TQString bin;
+ TQString name;
+ TQString description;
+ TQString icon;
int desktop;
- QValueList< pid_t > pids;
- QCString wmclass;
- QCString hostname;
+ TQValueList< pid_t > pids;
+ TQCString wmclass;
+ TQCString hostname;
KStartupInfoData::TriState silent;
unsigned long timestamp;
int screen;
@@ -1125,59 +1125,59 @@ struct KStartupInfoDataPrivate
WId launched_by;
};
-QString KStartupInfoData::to_text() const
+TQString KStartupInfoData::to_text() const
{
- QString ret = "";
+ TQString ret = "";
if( !d->bin.isEmpty())
- ret += QString::fromLatin1( " BIN=\"%1\"" ).arg( escape_str( d->bin ));
+ ret += TQString::fromLatin1( " BIN=\"%1\"" ).arg( escape_str( d->bin ));
if( !d->name.isEmpty())
- ret += QString::fromLatin1( " NAME=\"%1\"" ).arg( escape_str( d->name ));
+ ret += TQString::fromLatin1( " NAME=\"%1\"" ).arg( escape_str( d->name ));
if( !d->description.isEmpty())
- ret += QString::fromLatin1( " DESCRIPTION=\"%1\"" ).arg( escape_str( d->description ));
+ ret += TQString::fromLatin1( " DESCRIPTION=\"%1\"" ).arg( escape_str( d->description ));
if( !d->icon.isEmpty())
- ret += QString::fromLatin1( " ICON=%1" ).arg( d->icon );
+ ret += TQString::fromLatin1( " ICON=%1" ).arg( d->icon );
if( d->desktop != 0 )
- ret += QString::fromLatin1( " DESKTOP=%1" )
+ ret += TQString::fromLatin1( " DESKTOP=%1" )
.arg( d->desktop == NET::OnAllDesktops ? NET::OnAllDesktops : d->desktop - 1 ); // spec counts from 0
if( !d->wmclass.isEmpty())
- ret += QString::fromLatin1( " WMCLASS=\"%1\"" ).arg( d->wmclass );
+ ret += TQString::fromLatin1( " WMCLASS=\"%1\"" ).arg( d->wmclass );
if( !d->hostname.isEmpty())
- ret += QString::fromLatin1( " HOSTNAME=%1" ).arg( d->hostname );
- for( QValueList< pid_t >::ConstIterator it = d->pids.begin();
+ ret += TQString::fromLatin1( " HOSTNAME=%1" ).arg( d->hostname );
+ for( TQValueList< pid_t >::ConstIterator it = d->pids.begin();
it != d->pids.end();
++it )
- ret += QString::fromLatin1( " PID=%1" ).arg( *it );
+ ret += TQString::fromLatin1( " PID=%1" ).arg( *it );
if( d->silent != Unknown )
- ret += QString::fromLatin1( " SILENT=%1" ).arg( d->silent == Yes ? 1 : 0 );
+ ret += TQString::fromLatin1( " SILENT=%1" ).arg( d->silent == Yes ? 1 : 0 );
if( d->timestamp != -1U )
- ret += QString::fromLatin1( " TIMESTAMP=%1" ).arg( d->timestamp );
+ ret += TQString::fromLatin1( " TIMESTAMP=%1" ).arg( d->timestamp );
if( d->screen != -1 )
- ret += QString::fromLatin1( " SCREEN=%1" ).arg( d->screen );
+ ret += TQString::fromLatin1( " SCREEN=%1" ).arg( d->screen );
if( d->xinerama != -1 )
- ret += QString::fromLatin1( " XINERAMA=%1" ).arg( d->xinerama );
+ ret += TQString::fromLatin1( " XINERAMA=%1" ).arg( d->xinerama );
if( d->launched_by != 0 )
- ret += QString::fromLatin1( " LAUNCHED_BY=%1" ).arg( d->launched_by );
+ ret += TQString::fromLatin1( " LAUNCHED_BY=%1" ).arg( d->launched_by );
return ret;
}
-KStartupInfoData::KStartupInfoData( const QString& txt_P )
+KStartupInfoData::KStartupInfoData( const TQString& txt_P )
{
d = new KStartupInfoDataPrivate;
- QStringList items = get_fields( txt_P );
- const QString bin_str = QString::fromLatin1( "BIN=" );
- const QString name_str = QString::fromLatin1( "NAME=" );
- const QString description_str = QString::fromLatin1( "DESCRIPTION=" );
- const QString icon_str = QString::fromLatin1( "ICON=" );
- const QString desktop_str = QString::fromLatin1( "DESKTOP=" );
- const QString wmclass_str = QString::fromLatin1( "WMCLASS=" );
- const QString hostname_str = QString::fromLatin1( "HOSTNAME=" ); // SELI nonstd
- const QString pid_str = QString::fromLatin1( "PID=" ); // SELI nonstd
- const QString silent_str = QString::fromLatin1( "SILENT=" );
- const QString timestamp_str = QString::fromLatin1( "TIMESTAMP=" );
- const QString screen_str = QString::fromLatin1( "SCREEN=" );
- const QString xinerama_str = QString::fromLatin1( "XINERAMA=" );
- const QString launched_by_str = QString::fromLatin1( "LAUNCHED_BY=" );
- for( QStringList::Iterator it = items.begin();
+ TQStringList items = get_fields( txt_P );
+ const TQString bin_str = TQString::fromLatin1( "BIN=" );
+ const TQString name_str = TQString::fromLatin1( "NAME=" );
+ const TQString description_str = TQString::fromLatin1( "DESCRIPTION=" );
+ const TQString icon_str = TQString::fromLatin1( "ICON=" );
+ const TQString desktop_str = TQString::fromLatin1( "DESKTOP=" );
+ const TQString wmclass_str = TQString::fromLatin1( "WMCLASS=" );
+ const TQString hostname_str = TQString::fromLatin1( "HOSTNAME=" ); // SELI nonstd
+ const TQString pid_str = TQString::fromLatin1( "PID=" ); // SELI nonstd
+ const TQString silent_str = TQString::fromLatin1( "SILENT=" );
+ const TQString timestamp_str = TQString::fromLatin1( "TIMESTAMP=" );
+ const TQString screen_str = TQString::fromLatin1( "SCREEN=" );
+ const TQString xinerama_str = TQString::fromLatin1( "XINERAMA=" );
+ const TQString launched_by_str = TQString::fromLatin1( "LAUNCHED_BY=" );
+ for( TQStringList::Iterator it = items.begin();
it != items.end();
++it )
{
@@ -1244,7 +1244,7 @@ void KStartupInfoData::update( const KStartupInfoData& data_P )
d->wmclass = data_P.d->wmclass;
if( !data_P.d->hostname.isEmpty())
d->hostname = data_P.d->hostname;
- for( QValueList< pid_t >::ConstIterator it = data_P.d->pids.begin();
+ for( TQValueList< pid_t >::ConstIterator it = data_P.d->pids.begin();
it != data_P.d->pids.end();
++it )
addPid( *it );
@@ -1270,63 +1270,63 @@ KStartupInfoData::~KStartupInfoData()
delete d;
}
-void KStartupInfoData::setBin( const QString& bin_P )
+void KStartupInfoData::setBin( const TQString& bin_P )
{
d->bin = bin_P;
}
-const QString& KStartupInfoData::bin() const
+const TQString& KStartupInfoData::bin() const
{
return d->bin;
}
-void KStartupInfoData::setName( const QString& name_P )
+void KStartupInfoData::setName( const TQString& name_P )
{
d->name = name_P;
}
-const QString& KStartupInfoData::name() const
+const TQString& KStartupInfoData::name() const
{
return d->name;
}
-const QString& KStartupInfoData::findName() const
+const TQString& KStartupInfoData::findName() const
{
if( !name().isEmpty())
return name();
return bin();
}
-void KStartupInfoData::setDescription( const QString& desc_P )
+void KStartupInfoData::setDescription( const TQString& desc_P )
{
d->description = desc_P;
}
-const QString& KStartupInfoData::description() const
+const TQString& KStartupInfoData::description() const
{
return d->description;
}
-const QString& KStartupInfoData::findDescription() const
+const TQString& KStartupInfoData::findDescription() const
{
if( !description().isEmpty())
return description();
return name();
}
-void KStartupInfoData::setIcon( const QString& icon_P )
+void KStartupInfoData::setIcon( const TQString& icon_P )
{
d->icon = icon_P;
}
-const QString& KStartupInfoData::findIcon() const
+const TQString& KStartupInfoData::findIcon() const
{
if( !icon().isEmpty())
return icon();
return bin();
}
-const QString& KStartupInfoData::icon() const
+const TQString& KStartupInfoData::icon() const
{
return d->icon;
}
@@ -1341,24 +1341,24 @@ int KStartupInfoData::desktop() const
return d->desktop;
}
-void KStartupInfoData::setWMClass( const QCString& wmclass_P )
+void KStartupInfoData::setWMClass( const TQCString& wmclass_P )
{
d->wmclass = wmclass_P;
}
-const QCString KStartupInfoData::findWMClass() const
+const TQCString KStartupInfoData::findWMClass() const
{
if( !WMClass().isEmpty() && WMClass() != "0" )
return WMClass();
return bin().utf8();
}
-const QCString& KStartupInfoData::WMClass() const
+const TQCString& KStartupInfoData::WMClass() const
{
return d->wmclass;
}
-void KStartupInfoData::setHostname( const QCString& hostname_P )
+void KStartupInfoData::setHostname( const TQCString& hostname_P )
{
if( !hostname_P.isNull())
d->hostname = hostname_P;
@@ -1372,7 +1372,7 @@ void KStartupInfoData::setHostname( const QCString& hostname_P )
}
}
-const QCString& KStartupInfoData::hostname() const
+const TQCString& KStartupInfoData::hostname() const
{
return d->hostname;
}
@@ -1388,7 +1388,7 @@ void KStartupInfoData::remove_pid( pid_t pid_P )
d->pids.remove( pid_P );
}
-const QValueList< pid_t >& KStartupInfoData::pids() const
+const TQValueList< pid_t >& KStartupInfoData::pids() const
{
return d->pids;
}
@@ -1449,45 +1449,45 @@ WId KStartupInfoData::launchedBy() const
}
static
-long get_num( const QString& item_P )
+long get_num( const TQString& item_P )
{
unsigned int pos = item_P.find( '=' );
return item_P.mid( pos + 1 ).toLong();
}
static
-unsigned long get_unum( const QString& item_P )
+unsigned long get_unum( const TQString& item_P )
{
unsigned int pos = item_P.find( '=' );
return item_P.mid( pos + 1 ).toULong();
}
static
-QString get_str( const QString& item_P )
+TQString get_str( const TQString& item_P )
{
unsigned int pos = item_P.find( '=' );
if( item_P.length() > pos + 2 && item_P[ pos + 1 ] == '\"' )
{
int pos2 = item_P.left( pos + 2 ).find( '\"' );
if( pos2 < 0 )
- return QString::null; // 01234
+ return TQString::null; // 01234
return item_P.mid( pos + 2, pos2 - 2 - pos ); // A="C"
}
return item_P.mid( pos + 1 );
}
static
-QCString get_cstr( const QString& item_P )
+TQCString get_cstr( const TQString& item_P )
{
return get_str( item_P ).utf8();
}
static
-QStringList get_fields( const QString& txt_P )
+TQStringList get_fields( const TQString& txt_P )
{
- QString txt = txt_P.simplifyWhiteSpace();
- QStringList ret;
- QString item = "";
+ TQString txt = txt_P.simplifyWhiteSpace();
+ TQStringList ret;
+ TQString item = "";
bool in = false;
bool escape = false;
for( unsigned int pos = 0;
@@ -1515,9 +1515,9 @@ QStringList get_fields( const QString& txt_P )
return ret;
}
-static QString escape_str( const QString& str_P )
+static TQString escape_str( const TQString& str_P )
{
- QString ret = "";
+ TQString ret = "";
for( unsigned int pos = 0;
pos < str_P.length();
++pos )
diff --git a/kdecore/kstartupinfo.h b/kdecore/kstartupinfo.h
index ca8b21c66..e35bdba56 100644
--- a/kdecore/kstartupinfo.h
+++ b/kdecore/kstartupinfo.h
@@ -26,13 +26,13 @@ DEALINGS IN THE SOFTWARE.
#define __KSTARTUPINFO_H
#include <sys/types.h>
-#include <qobject.h>
+#include <tqobject.h>
#ifdef Q_WS_X11 // FIXME(E): Redo in a less X11-specific way
-#include <qcstring.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
class KStartupInfoId;
@@ -89,7 +89,7 @@ class KDECORE_EXPORT KStartupInfo
* with id startup_id should end.
* @since 3.2
*/
- static void appStarted( const QCString& startup_id );
+ static void appStarted( const TQCString& startup_id );
/**
* Use this function if the application got a request with startup
@@ -100,7 +100,7 @@ class KDECORE_EXPORT KStartupInfo
* needed only when a window is reused.
* @since 3.2
*/
- static void setNewStartupId( QWidget* window, const QCString& startup_id );
+ static void setNewStartupId( TQWidget* window, const TQCString& startup_id );
/**
* If your application shows temporarily some window during its startup,
@@ -118,7 +118,7 @@ class KDECORE_EXPORT KStartupInfo
* user timestamp.
* @since 3.3
*/
- static QCString createNewStartupId();
+ static TQCString createNewStartupId();
/**
*
*/
@@ -142,23 +142,23 @@ class KDECORE_EXPORT KStartupInfo
* With this flag, the change is normally announced with gotStartupChange().
*
* @param flags OR-ed combination of flags
- * @param parent the parent of this QObject (can be 0 for no parent)
- * @param name the name of the QObject (can be 0 for no name)
+ * @param parent the parent of this TQObject (can be 0 for no parent)
+ * @param name the name of the TQObject (can be 0 for no name)
*
*/
- KStartupInfo( int flags, QObject* parent = NULL, const char* name = NULL );
+ KStartupInfo( int flags, TQObject* parent = NULL, const char* name = NULL );
/**
* Creates an instance that will receive the startup notifications.
*
* @param clean_on_cantdetect if true, and a new unknown window appears,
* removes all notification for applications that are not compliant
* with the app startup protocol
- * @param parent the parent of this QObject (can be 0 for no parent)
- * @param name the name of the QObject (can be 0 for no name)
+ * @param parent the parent of this TQObject (can be 0 for no parent)
+ * @param name the name of the TQObject (can be 0 for no name)
*
* @obsolete
*/
- KStartupInfo( bool clean_on_cantdetect, QObject* parent = 0, const char* name = 0 );
+ KStartupInfo( bool clean_on_cantdetect, TQObject* parent = 0, const char* name = 0 );
virtual ~KStartupInfo();
/**
* Sends given notification data about started application
@@ -300,13 +300,13 @@ class KDECORE_EXPORT KStartupInfo
* @param window the id of the window
* @param id the startup notification id
*/
- static void setWindowStartupId( WId window, const QCString& id );
+ static void setWindowStartupId( WId window, const TQCString& id );
/**
* Returns startup notification identification of the given window.
* @param w the id of the window
* @return the startup notification id. Can be null if not found.
*/
- static QCString windowStartupId( WId w );
+ static TQCString windowStartupId( WId w );
/**
* @internal
*/
@@ -340,34 +340,34 @@ class KDECORE_EXPORT KStartupInfo
/**
*
*/
- virtual void customEvent( QCustomEvent* e_P );
+ virtual void customEvent( TQCustomEvent* e_P );
private slots:
void startups_cleanup();
void startups_cleanup_no_age();
- void got_message( const QString& msg );
+ void got_message( const TQString& msg );
void window_added( WId w );
void slot_window_added( WId w );
private:
void init( int flags );
friend class KStartupInfoPrivate;
- void got_startup_info( const QString& msg_P, bool update_only_P );
- void got_remove_startup_info( const QString& msg_P );
+ void got_startup_info( const TQString& msg_P, bool update_only_P );
+ void got_remove_startup_info( const TQString& msg_P );
void new_startup_info_internal( const KStartupInfoId& id_P,
Data& data_P, bool update_only_P );
void remove_startup_info_internal( const KStartupInfoId& id_P );
void remove_startup_pids( const KStartupInfoId& id, const KStartupInfoData& data );
void remove_startup_pids( const KStartupInfoData& data );
startup_t check_startup_internal( WId w, KStartupInfoId* id, KStartupInfoData* data );
- bool find_id( const QCString& id_P, KStartupInfoId* id_O,
+ bool find_id( const TQCString& id_P, KStartupInfoId* id_O,
KStartupInfoData* data_O );
- bool find_pid( pid_t pid_P, const QCString& hostname, KStartupInfoId* id_O,
+ bool find_pid( pid_t pid_P, const TQCString& hostname, KStartupInfoId* id_O,
KStartupInfoData* data_O );
- bool find_wclass( QCString res_name_P, QCString res_class_P,
+ bool find_wclass( TQCString res_name_P, TQCString res_class_P,
KStartupInfoId* id_O, KStartupInfoData* data_O );
- static QCString get_window_hostname( WId w_P );
+ static TQCString get_window_hostname( WId w_P );
void startups_cleanup_internal( bool age_P );
void clean_all_noncompliant();
- static QString check_required_startup_fields( const QString& msg,
+ static TQString check_required_startup_fields( const TQString& msg,
const KStartupInfoData& data, int screen );
bool clean_on_cantdetect_; // KDE4 remove unused
unsigned int timeout;
@@ -412,12 +412,12 @@ class KDECORE_EXPORT KStartupInfoId
* @param id the new identification, "0" for no notification or "" to read
* the environment variable
*/
- void initId( const QCString& id = "" );
+ void initId( const TQCString& id = "" );
/**
* Returns the notification identifier as string.
* @return the identification string for the notification
*/
- const QCString& id() const;
+ const TQCString& id() const;
/**
* Return the user timestamp for the startup notification, or 0 if no timestamp
* is set.
@@ -441,8 +441,8 @@ class KDECORE_EXPORT KStartupInfoId
KStartupInfoId& operator=( const KStartupInfoId& data );
bool operator<( const KStartupInfoId& id ) const;
private:
- KStartupInfoId( const QString& txt );
- QString to_text() const;
+ KStartupInfoId( const TQString& txt );
+ TQString to_text() const;
friend class KStartupInfo;
KStartupInfoIdPrivate* d;
};
@@ -467,66 +467,66 @@ class KDECORE_EXPORT KStartupInfoData
* Sets the binary name of the application ( e.g. 'kcontrol' ).
* @param bin the new binary name of the application
*/
- void setBin( const QString& bin );
+ void setBin( const TQString& bin );
/**
* Returns the binary name of the starting application
* @return the new binary name of the application
*/
- const QString& bin() const;
+ const TQString& bin() const;
/**
* Sets the name for the notification (e.g. 'Control Center')
*/
- void setName( const QString& name );
+ void setName( const TQString& name );
/**
* Returns the name of the startup notification. If it's not available,
* it tries to use other information (binary name).
* @return the name of the startup notification
*/
- const QString& findName() const;
+ const TQString& findName() const;
/**
* Returns the name of the startup notification, or empty if not available.
* @return the name of the startup notification, or an empty string
* if not set.
*/
- const QString& name() const;
+ const TQString& name() const;
/**
* Sets the description for the notification (e.g. 'Launching Control Center').
* I.e. name() describes what is being started, while description() is
* the actual action performed by the starting.
* @since 3.2
*/
- void setDescription( const QString& descr );
+ void setDescription( const TQString& descr );
/**
* Returns the description of the startup notification. If it's not available,
* it returns name().
* @return the description of the startup notification
* @since 3.2
*/
- const QString& findDescription() const;
+ const TQString& findDescription() const;
/**
* Returns the name of the startup notification, or empty if not available.
* @return the name of the startup notificaiton, or an empty string
* if not set.
* @since 3.2
*/
- const QString& description() const;
+ const TQString& description() const;
/**
* Sets the icon for the startup notification ( e.g. 'kcontrol' )
* @param icon the name of the icon
*/
- void setIcon( const QString& icon );
+ void setIcon( const TQString& icon );
/**
* Returns the icon of the startup notification, and if it's not available,
* tries to get it from the binary name.
* @return the name of the startup notification's icon, or the name of
* the binary if not set
*/
- const QString& findIcon() const;
+ const TQString& findIcon() const;
/**
* Returns the icon of the startup notification, or empty if not available.
* @return the name of the icon, or an empty string if not set.
*/
- const QString& icon() const;
+ const TQString& icon() const;
/**
* Sets the desktop for the startup notification ( i.e. the desktop on which
* the starting application should appear ).
@@ -544,20 +544,20 @@ class KDECORE_EXPORT KStartupInfoData
* detected correctly.
* @param wmclass the WM_CLASS value for the startup notification
*/
- void setWMClass( const QCString& wmclass );
+ void setWMClass( const TQCString& wmclass );
/**
* Returns the WM_CLASS value for the startup notification, or binary name if not
* available.
* @return the WM_CLASS value for the startup notification, or the binary name
* if not set
*/
- const QCString findWMClass() const;
+ const TQCString findWMClass() const;
/**
* Returns the WM_CLASS value for the startup notification, or empty if not available.
* @return the WM_CLASS value for the startup notification, or empty
* if not set
*/
- const QCString& WMClass() const;
+ const TQCString& WMClass() const;
/**
* Adds a PID to the list of processes that belong to the startup notification. It
* may be used to increase the chance that the windows created by the starting
@@ -570,7 +570,7 @@ class KDECORE_EXPORT KStartupInfoData
* Returns all PIDs for the startup notification.
* @return the list of all PIDs
*/
- const QValueList< pid_t >& pids() const;
+ const TQValueList< pid_t >& pids() const;
/**
* Checks whether the given @p pid is in the list of PIDs for starup
* notification.
@@ -582,12 +582,12 @@ class KDECORE_EXPORT KStartupInfoData
* it if PIDs are set.
* @param hostname the application's hostname. If it's a null string, the current hostname is used
*/
- void setHostname( const QCString& hostname = QCString());
+ void setHostname( const TQCString& hostname = TQCString());
/**
* Returns the hostname for the startup notification.
* @return the hostname
*/
- const QCString& hostname() const;
+ const TQCString& hostname() const;
/**
*
@@ -679,8 +679,8 @@ class KDECORE_EXPORT KStartupInfoData
~KStartupInfoData();
KStartupInfoData& operator=( const KStartupInfoData& data );
private:
- KStartupInfoData( const QString& txt );
- QString to_text() const;
+ KStartupInfoData( const TQString& txt );
+ TQString to_text() const;
void remove_pid( pid_t pid );
friend class KStartupInfo;
friend class KStartupInfo::Data;
diff --git a/kdecore/kstdaccel.cpp b/kdecore/kstdaccel.cpp
index 262535e45..8e1819735 100644
--- a/kdecore/kstdaccel.cpp
+++ b/kdecore/kstdaccel.cpp
@@ -135,7 +135,7 @@ static void initialize( StdAccel id )
}
if( saver.config()->hasKey( pInfo->psName ) ) {
- QString s = saver.config()->readEntry( pInfo->psName );
+ TQString s = saver.config()->readEntry( pInfo->psName );
if( s != "none" )
pInfo->cut.init( s );
else
@@ -145,30 +145,30 @@ static void initialize( StdAccel id )
pInfo->bInitialized = true;
}
-QString name( StdAccel id )
+TQString name( StdAccel id )
{
KStdAccelInfo* pInfo = infoPtr( id );
if( !pInfo )
- return QString::null;
+ return TQString::null;
return pInfo->psName;
}
-QString label( StdAccel id )
+TQString label( StdAccel id )
{
KStdAccelInfo* pInfo = infoPtr( id );
if( !pInfo )
- return QString::null;
+ return TQString::null;
return i18n((pInfo->psDesc) ? pInfo->psDesc : pInfo->psName);
}
// TODO: Add psWhatsThis entry to KStdAccelInfo
-QString whatsThis( StdAccel /*id*/ )
+TQString whatsThis( StdAccel /*id*/ )
{
// KStdAccelInfo* pInfo = infoPtr( id );
// if( pInfo && pInfo->psWhatsThis )
// return i18n(pInfo->psWhatsThis);
// else
- return QString::null;
+ return TQString::null;
}
const KShortcut& shortcut( StdAccel id )
@@ -232,12 +232,12 @@ KShortcut shortcutDefault4( StdAccel id )
KKeySequence key2;
cut.init( (info.cutDefault4) ?
- QKeySequence(info.cutDefault) : QKeySequence(info.cutDefault4) );
+ TQKeySequence(info.cutDefault) : TQKeySequence(info.cutDefault4) );
if( info.cutDefault4B )
- key2.init( QKeySequence(info.cutDefault4B) );
+ key2.init( TQKeySequence(info.cutDefault4B) );
else if( info.cutDefault3B )
- key2.init( QKeySequence(info.cutDefault3B) );
+ key2.init( TQKeySequence(info.cutDefault3B) );
if( key2.count() )
cut.append( key2 );
@@ -258,7 +258,7 @@ void createAccelActions( KAccelActions& actions )
if( id != AccelNone ) {
actions.insert( pInfo->psName,
i18n((pInfo->psDesc) ? pInfo->psDesc : pInfo->psName),
- QString::null, // pInfo->psWhatsThis,
+ TQString::null, // pInfo->psWhatsThis,
shortcutDefault3(id),
shortcutDefault4(id) );
} else
@@ -336,14 +336,14 @@ uint ShortcutList::count() const
return g_nAccels;
}
-QString ShortcutList::name( uint i ) const
+TQString ShortcutList::name( uint i ) const
{ return g_infoStdAccel[i].psName; }
-QString ShortcutList::label( uint i ) const
+TQString ShortcutList::label( uint i ) const
{ return i18n((g_infoStdAccel[i].psDesc) ? g_infoStdAccel[i].psDesc : g_infoStdAccel[i].psName); }
-QString ShortcutList::whatsThis( uint ) const
- { return QString::null; }
+TQString ShortcutList::whatsThis( uint ) const
+ { return TQString::null; }
const KShortcut& ShortcutList::shortcut( uint i ) const
{
@@ -365,27 +365,27 @@ bool ShortcutList::isConfigurable( uint i ) const
bool ShortcutList::setShortcut( uint i, const KShortcut& cut )
{ g_infoStdAccel[i].cut = cut; return true; }
-QVariant ShortcutList::getOther( Other, uint ) const
- { return QVariant(); }
+TQVariant ShortcutList::getOther( Other, uint ) const
+ { return TQVariant(); }
-bool ShortcutList::setOther( Other, uint, QVariant )
+bool ShortcutList::setOther( Other, uint, TQVariant )
{ return false; }
bool ShortcutList::save() const
{
- return writeSettings( QString::null, 0, false, true );
+ return writeSettings( TQString::null, 0, false, true );
}
-KDECORE_EXPORT QString action(StdAccel id)
+KDECORE_EXPORT TQString action(StdAccel id)
{ return name(id); }
-KDECORE_EXPORT QString description(StdAccel id)
+KDECORE_EXPORT TQString description(StdAccel id)
{ return label(id); }
KDECORE_EXPORT int key(StdAccel id)
{ return shortcut(id).keyCodeQt(); }
KDECORE_EXPORT int defaultKey(StdAccel id)
{ return shortcutDefault(id).keyCodeQt(); }
-KDECORE_EXPORT bool isEqual(const QKeyEvent* ev, int keyQt)
+KDECORE_EXPORT bool isEqual(const TQKeyEvent* ev, int keyQt)
{
KKey key1( ev ), key2( keyQt );
return key1 == key2;
diff --git a/kdecore/kstdaccel.h b/kdecore/kstdaccel.h
index 655d7e349..af102d063 100644
--- a/kdecore/kstdaccel.h
+++ b/kdecore/kstdaccel.h
@@ -20,7 +20,7 @@
#ifndef KSTDACCEL_H
#define KSTDACCEL_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kshortcut.h>
#include "kdelibs_export.h"
@@ -94,21 +94,21 @@ namespace KStdAccel
* @param id the id of the accelerator
* @return the unique name of the accelerator
*/
- KDECORE_EXPORT QString name(StdAccel id);
+ KDECORE_EXPORT TQString name(StdAccel id);
/**
* Returns a localized label for user-visible display.
* @param id the id of the accelerator
* @return a localized label for the accelerator
*/
- KDECORE_EXPORT QString label(StdAccel id);
+ KDECORE_EXPORT TQString label(StdAccel id);
/**
* Returns an extended WhatsThis description for the given accelerator.
* @param id the id of the accelerator
* @return a localized description of the accelerator
*/
- KDECORE_EXPORT QString whatsThis(StdAccel id);
+ KDECORE_EXPORT TQString whatsThis(StdAccel id);
/**
* Return the StdAccel id of the standard accel action which
@@ -452,12 +452,12 @@ namespace KStdAccel
* @deprecated
* Obsolete. Use name(). Returns a string representation for @p accel.
*/
- KDECORE_EXPORT QString action(StdAccel id) KDE_DEPRECATED;
+ KDECORE_EXPORT TQString action(StdAccel id) KDE_DEPRECATED;
/**
* @deprecated
* Obsolete. Use desc(). Returns a localized description of @p accel.
*/
- KDECORE_EXPORT QString description(StdAccel id) KDE_DEPRECATED;
+ KDECORE_EXPORT TQString description(StdAccel id) KDE_DEPRECATED;
/**
* @deprecated
* Obsolete. Use shortcut(). Returns the keybinding for @p accel.
@@ -470,13 +470,13 @@ namespace KStdAccel
KDECORE_EXPORT int defaultKey(StdAccel accel) KDE_DEPRECATED;
/**
- * @deprecated. Use KKey(const QKeyEvent*) == KKey(int).
+ * @deprecated. Use KKey(const TQKeyEvent*) == KKey(int).
*
* Compare the keys generated by the key event with
* the value of the integer.
*
* If a modifier (Shift, Alt, Ctrl) key is present in
- * QKeyEvent, its sum with the actual key value
+ * TQKeyEvent, its sum with the actual key value
* is used for comparing it with the integer parameter.
*
* @param pEvent the key event to be used in the comparison.
@@ -484,7 +484,7 @@ namespace KStdAccel
*
* @return true if the int value matches the integer representation of the QKeyEvent
*/
- KDECORE_EXPORT bool isEqual(const QKeyEvent* pEvent, int keyQt) KDE_DEPRECATED;
+ KDECORE_EXPORT bool isEqual(const TQKeyEvent* pEvent, int keyQt) KDE_DEPRECATED;
#endif // !KDE_NO_COMPAT
}
diff --git a/kdecore/kstringhandler.cpp b/kdecore/kstringhandler.cpp
index 185a0316a..6f786d904 100644
--- a/kdecore/kstringhandler.cpp
+++ b/kdecore/kstringhandler.cpp
@@ -20,7 +20,7 @@
#include "kstringhandler.h"
#include "kglobal.h"
-static void parsePythonRange( const QCString &range, uint &start, uint &end )
+static void parsePythonRange( const TQCString &range, uint &start, uint &end )
{
const int colon = range.find( ':' );
if ( colon == -1 ) {
@@ -36,21 +36,21 @@ static void parsePythonRange( const QCString &range, uint &start, uint &end )
}
}
-QString KStringHandler::word( const QString &text , uint pos )
+TQString KStringHandler::word( const TQString &text , uint pos )
{
return text.section( ' ', pos, pos );
}
-QString KStringHandler::word( const QString &text , const char *range )
+TQString KStringHandler::word( const TQString &text , const char *range )
{
// Format in: START:END
// Note index starts a 0 (zero)
//
// 0: first word to end
// 1:3 second to fourth words
- QStringList list = QStringList::split( " ", text , true );
- QString tmp = "";
- QString r = range;
+ TQStringList list = TQStringList::split( " ", text , true );
+ TQString tmp = "";
+ TQString r = range;
if ( text.isEmpty() )
return tmp;
@@ -62,7 +62,7 @@ QString KStringHandler::word( const QString &text , const char *range )
// Extract words
//
int wordsToExtract = cnt-pos+1;
- QStringList::Iterator it = list.at( pos);
+ TQStringList::Iterator it = list.at( pos);
while ( (it != list.end()) && (wordsToExtract-- > 0))
{
@@ -77,7 +77,7 @@ QString KStringHandler::word( const QString &text , const char *range )
//
// Insertion and removal routines
//
-QString KStringHandler::insword( const QString &text , const QString &word , uint pos )
+TQString KStringHandler::insword( const TQString &text , const TQString &word , uint pos )
{
if ( text.isEmpty() )
return word;
@@ -86,7 +86,7 @@ QString KStringHandler::insword( const QString &text , const QString &word , uin
return text;
// Split words and add into list
- QStringList list = QStringList::split( " ", text, true );
+ TQStringList list = TQStringList::split( " ", text, true );
if ( pos >= list.count() )
list.append( word );
@@ -97,7 +97,7 @@ QString KStringHandler::insword( const QString &text , const QString &word , uin
return list.join( " " );
}
-QString KStringHandler::setword( const QString &text , const QString &word , uint pos )
+TQString KStringHandler::setword( const TQString &text , const TQString &word , uint pos )
{
if ( text.isEmpty() )
return word;
@@ -106,7 +106,7 @@ QString KStringHandler::setword( const QString &text , const QString &word , uin
return text;
// Split words and add into list
- QStringList list = QStringList::split( " ", text, true );
+ TQStringList list = TQStringList::split( " ", text, true );
if ( pos >= list.count() )
list.append( word );
@@ -119,16 +119,16 @@ QString KStringHandler::setword( const QString &text , const QString &word , uin
return list.join( " " );
}
-QString KStringHandler::remrange( const QString &text , const char *range )
+TQString KStringHandler::remrange( const TQString &text , const char *range )
{
// Format in: START:END
// Note index starts a 0 (zero)
//
// 0: first word to end
// 1:3 second to fourth words
- QStringList list = QStringList::split( " ", text , true );
- QString tmp = "";
- QString r = range;
+ TQStringList list = TQStringList::split( " ", text , true );
+ TQString tmp = "";
+ TQString r = range;
if ( text.isEmpty() )
return tmp;
@@ -140,7 +140,7 @@ QString KStringHandler::remrange( const QString &text , const char *range )
// Remove that range of words
//
int wordsToDelete = cnt-pos+1;
- QStringList::Iterator it = list.at( pos);
+ TQStringList::Iterator it = list.at( pos);
while ( (it != list.end()) && (wordsToDelete-- > 0))
it = list.remove( it );
@@ -148,15 +148,15 @@ QString KStringHandler::remrange( const QString &text , const char *range )
return list.join( " " );
}
-QString KStringHandler::remword( const QString &text , uint pos )
+TQString KStringHandler::remword( const TQString &text , uint pos )
{
- QString tmp = "";
+ TQString tmp = "";
if ( text.isEmpty() )
return tmp;
// Split words and add into list
- QStringList list = QStringList::split( " ", text, true );
+ TQStringList list = TQStringList::split( " ", text, true );
if ( pos < list.count() )
list.remove( list.at( pos ) );
@@ -165,9 +165,9 @@ QString KStringHandler::remword( const QString &text , uint pos )
return list.join( " " );
}
-QString KStringHandler::remword( const QString &text , const QString &word )
+TQString KStringHandler::remword( const TQString &text , const TQString &word )
{
- QString tmp = "";
+ TQString tmp = "";
if ( text.isEmpty() )
return tmp;
@@ -176,9 +176,9 @@ QString KStringHandler::remword( const QString &text , const QString &word )
return text;
// Split words and add into list
- QStringList list = QStringList::split( " ", text, true );
+ TQStringList list = TQStringList::split( " ", text, true );
- QStringList::Iterator it = list.find(word);
+ TQStringList::Iterator it = list.find(word);
if (it != list.end())
list.remove( it );
@@ -190,24 +190,24 @@ QString KStringHandler::remword( const QString &text , const QString &word )
//
// Capitalization routines
//
-QString KStringHandler::capwords( const QString &text )
+TQString KStringHandler::capwords( const TQString &text )
{
if ( text.isEmpty() ) {
return text;
}
- const QString strippedText = text.stripWhiteSpace();
- const QStringList words = capwords( QStringList::split( ' ', strippedText ) );
+ const TQString strippedText = text.stripWhiteSpace();
+ const TQStringList words = capwords( TQStringList::split( ' ', strippedText ) );
- QString result = text;
+ TQString result = text;
result.replace( strippedText, words.join( " " ) );
return result;
}
-QStringList KStringHandler::capwords( const QStringList &list )
+TQStringList KStringHandler::capwords( const TQStringList &list )
{
- QStringList tmp = list;
- for ( QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) {
+ TQStringList tmp = list;
+ for ( TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) {
*it = ( *it )[ 0 ].upper() + ( *it ).mid( 1 );
}
return tmp;
@@ -216,28 +216,28 @@ QStringList KStringHandler::capwords( const QStringList &list )
//
// Reverse routines
//
-QString KStringHandler::reverse( const QString &text )
+TQString KStringHandler::reverse( const TQString &text )
{
- QString tmp;
+ TQString tmp;
if ( text.isEmpty() )
return tmp;
- QStringList list;
- list = QStringList::split( " ", text, true );
+ TQStringList list;
+ list = TQStringList::split( " ", text, true );
list = reverse( list );
return list.join( " " );
}
-QStringList KStringHandler::reverse( const QStringList &list )
+TQStringList KStringHandler::reverse( const TQStringList &list )
{
- QStringList tmp;
+ TQStringList tmp;
if ( list.count() == 0 )
return tmp;
- for ( QStringList::ConstIterator it= list.begin();
+ for ( TQStringList::ConstIterator it= list.begin();
it != list.end();
it++)
tmp.prepend( *it );
@@ -248,70 +248,70 @@ QStringList KStringHandler::reverse( const QStringList &list )
//
// Left, Right, Center justification
//
-QString KStringHandler::ljust( const QString &text , uint width )
+TQString KStringHandler::ljust( const TQString &text , uint width )
{
return text.stripWhiteSpace().leftJustify( width );
}
-QString KStringHandler::rjust( const QString &text , uint width )
+TQString KStringHandler::rjust( const TQString &text , uint width )
{
return text.stripWhiteSpace().rightJustify( width );
}
-QString KStringHandler::center( const QString &text , uint width )
+TQString KStringHandler::center( const TQString &text , uint width )
{
- const QString s = text.stripWhiteSpace();
+ const TQString s = text.stripWhiteSpace();
const unsigned int length = s.length();
if ( width <= length ) {
return s;
}
- QString result;
+ TQString result;
result.fill( ' ', ( width - length ) / 2 );
result += s;
return result.leftJustify( width );
}
-QString KStringHandler::lsqueeze( const QString & str, uint maxlen )
+TQString KStringHandler::lsqueeze( const TQString & str, uint maxlen )
{
if (str.length() > maxlen) {
int part = maxlen-3;
- return QString("..." + str.right(part));
+ return TQString("..." + str.right(part));
}
else return str;
}
-QString KStringHandler::csqueeze( const QString & str, uint maxlen )
+TQString KStringHandler::csqueeze( const TQString & str, uint maxlen )
{
if (str.length() > maxlen && maxlen > 3) {
int part = (maxlen-3)/2;
- return QString(str.left(part) + "..." + str.right(part));
+ return TQString(str.left(part) + "..." + str.right(part));
}
else return str;
}
-QString KStringHandler::rsqueeze( const QString & str, uint maxlen )
+TQString KStringHandler::rsqueeze( const TQString & str, uint maxlen )
{
if (str.length() > maxlen) {
int part = maxlen-3;
- return QString(str.left(part) + "...");
+ return TQString(str.left(part) + "...");
}
else return str;
}
-QString KStringHandler::lEmSqueeze(const QString &name, const QFontMetrics& fontMetrics, uint maxlen)
+TQString KStringHandler::lEmSqueeze(const TQString &name, const TQFontMetrics& fontMetrics, uint maxlen)
{
return lPixelSqueeze(name, fontMetrics, fontMetrics.maxWidth() * maxlen);
}
-QString KStringHandler::lPixelSqueeze(const QString& name, const QFontMetrics& fontMetrics, uint maxPixels)
+TQString KStringHandler::lPixelSqueeze(const TQString& name, const TQFontMetrics& fontMetrics, uint maxPixels)
{
uint nameWidth = fontMetrics.width(name);
if (maxPixels < nameWidth)
{
- QString tmp = name;
+ TQString tmp = name;
const uint em = fontMetrics.maxWidth();
maxPixels -= fontMetrics.width("...");
@@ -330,12 +330,12 @@ QString KStringHandler::lPixelSqueeze(const QString& name, const QFontMetrics& f
return name;
}
-QString KStringHandler::cEmSqueeze(const QString& name, const QFontMetrics& fontMetrics, uint maxlen)
+TQString KStringHandler::cEmSqueeze(const TQString& name, const TQFontMetrics& fontMetrics, uint maxlen)
{
return cPixelSqueeze(name, fontMetrics, fontMetrics.maxWidth() * maxlen);
}
-QString KStringHandler::cPixelSqueeze(const QString& s, const QFontMetrics& fm, uint width)
+TQString KStringHandler::cPixelSqueeze(const TQString& s, const TQFontMetrics& fm, uint width)
{
if ( s.isEmpty() || uint( fm.width( s ) ) <= width ) {
return s;
@@ -377,18 +377,18 @@ QString KStringHandler::cPixelSqueeze(const QString& s, const QFontMetrics& fm,
return s.left( leftIdx ) + "..." + s.right( rightIdx );
}
-QString KStringHandler::rEmSqueeze(const QString& name, const QFontMetrics& fontMetrics, uint maxlen)
+TQString KStringHandler::rEmSqueeze(const TQString& name, const TQFontMetrics& fontMetrics, uint maxlen)
{
return rPixelSqueeze(name, fontMetrics, fontMetrics.maxWidth() * maxlen);
}
-QString KStringHandler::rPixelSqueeze(const QString& name, const QFontMetrics& fontMetrics, uint maxPixels)
+TQString KStringHandler::rPixelSqueeze(const TQString& name, const TQFontMetrics& fontMetrics, uint maxPixels)
{
uint nameWidth = fontMetrics.width(name);
if (maxPixels < nameWidth)
{
- QString tmp = name;
+ TQString tmp = name;
const uint em = fontMetrics.maxWidth();
maxPixels -= fontMetrics.width("...");
@@ -410,7 +410,7 @@ QString KStringHandler::rPixelSqueeze(const QString& name, const QFontMetrics& f
///// File name patterns (like *.txt)
-bool KStringHandler::matchFileName( const QString& filename, const QString& pattern )
+bool KStringHandler::matchFileName( const TQString& filename, const TQString& pattern )
{
int len = filename.length();
int pattern_len = pattern.length();
@@ -425,8 +425,8 @@ bool KStringHandler::matchFileName( const QString& filename, const QString& patt
return filename.find(pattern.mid(1, pattern_len - 2)) != -1;
}
- const QChar *c1 = pattern.unicode();
- const QChar *c2 = filename.unicode();
+ const TQChar *c1 = pattern.unicode();
+ const TQChar *c2 = filename.unicode();
int cnt = 1;
while ( cnt < pattern_len && *c1++ == *c2++ )
++cnt;
@@ -436,8 +436,8 @@ bool KStringHandler::matchFileName( const QString& filename, const QString& patt
// Patterns like "*~", "*.extension"
if ( pattern[ 0 ] == '*' && len + 1 >= pattern_len )
{
- const QChar *c1 = pattern.unicode() + pattern_len - 1;
- const QChar *c2 = filename.unicode() + len - 1;
+ const TQChar *c1 = pattern.unicode() + pattern_len - 1;
+ const TQChar *c2 = filename.unicode() + len - 1;
int cnt = 1;
while ( cnt < pattern_len && *c1-- == *c2-- )
++cnt;
@@ -449,11 +449,11 @@ bool KStringHandler::matchFileName( const QString& filename, const QString& patt
}
QStringList
-KStringHandler::perlSplit(const QString & sep, const QString & s, uint max)
+KStringHandler::perlSplit(const TQString & sep, const TQString & s, uint max)
{
bool ignoreMax = 0 == max;
- QStringList l;
+ TQStringList l;
int searchStart = 0;
@@ -475,11 +475,11 @@ KStringHandler::perlSplit(const QString & sep, const QString & s, uint max)
}
QStringList
-KStringHandler::perlSplit(const QChar & sep, const QString & s, uint max)
+KStringHandler::perlSplit(const TQChar & sep, const TQString & s, uint max)
{
bool ignoreMax = 0 == max;
- QStringList l;
+ TQStringList l;
int searchStart = 0;
@@ -501,11 +501,11 @@ KStringHandler::perlSplit(const QChar & sep, const QString & s, uint max)
}
QStringList
-KStringHandler::perlSplit(const QRegExp & sep, const QString & s, uint max)
+KStringHandler::perlSplit(const TQRegExp & sep, const TQString & s, uint max)
{
bool ignoreMax = 0 == max;
- QStringList l;
+ TQStringList l;
int searchStart = 0;
int tokenStart = sep.search(s, searchStart);
@@ -528,23 +528,23 @@ KStringHandler::perlSplit(const QRegExp & sep, const QString & s, uint max)
}
QString
-KStringHandler::tagURLs( const QString& text )
+KStringHandler::tagURLs( const TQString& text )
{
- /*static*/ QRegExp urlEx("(www\\.(?!\\.)|(fish|(f|ht)tp(|s))://)[\\d\\w\\./,:_~\\?=&;#@\\-\\+\\%\\$]+[\\d\\w/]");
+ /*static*/ TQRegExp urlEx("(www\\.(?!\\.)|(fish|(f|ht)tp(|s))://)[\\d\\w\\./,:_~\\?=&;#@\\-\\+\\%\\$]+[\\d\\w/]");
- QString richText( text );
+ TQString richText( text );
int urlPos = 0, urlLen;
while ((urlPos = urlEx.search(richText, urlPos)) >= 0)
{
urlLen = urlEx.matchedLength();
- QString href = richText.mid( urlPos, urlLen );
+ TQString href = richText.mid( urlPos, urlLen );
// Qt doesn't support (?<=pattern) so we do it here
if((urlPos > 0) && richText[urlPos-1].isLetterOrNumber()){
urlPos++;
continue;
}
- // Don't use QString::arg since %01, %20, etc could be in the string
- QString anchor = "<a href=\"" + href + "\">" + href + "</a>";
+ // Don't use TQString::arg since %01, %20, etc could be in the string
+ TQString anchor = "<a href=\"" + href + "\">" + href + "</a>";
richText.replace( urlPos, urlLen, anchor );
@@ -553,13 +553,13 @@ KStringHandler::tagURLs( const QString& text )
return richText;
}
-QString KStringHandler::obscure( const QString &str )
+TQString KStringHandler::obscure( const TQString &str )
{
- QString result;
- const QChar *unicode = str.unicode();
+ TQString result;
+ const TQChar *unicode = str.unicode();
for ( uint i = 0; i < str.length(); ++i )
result += ( unicode[ i ].unicode() <= 0x21 ) ? unicode[ i ] :
- QChar( 0x1001F - unicode[ i ].unicode() );
+ TQChar( 0x1001F - unicode[ i ].unicode() );
return result;
}
@@ -649,15 +649,15 @@ done:
#undef I
#undef X
-QString KStringHandler::from8Bit( const char *str )
+TQString KStringHandler::from8Bit( const char *str )
{
if (!str)
- return QString::null;
+ return TQString::null;
if (!*str) {
- static const QString &emptyString = KGlobal::staticQString("");
+ static const TQString &emptyString = KGlobal::staticQString("");
return emptyString;
}
return KStringHandler::isUtf8( str ) ?
- QString::fromUtf8( str ) :
- QString::fromLocal8Bit( str );
+ TQString::fromUtf8( str ) :
+ TQString::fromLocal8Bit( str );
}
diff --git a/kdecore/kstringhandler.h b/kdecore/kstringhandler.h
index e01c4493b..47075a066 100644
--- a/kdecore/kstringhandler.h
+++ b/kdecore/kstringhandler.h
@@ -19,16 +19,16 @@
#ifndef KSTRINGHANDLER_H
#define KSTRINGHANDLER_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qregexp.h> // for the word ranges
-#include <qfontmetrics.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqregexp.h> // for the word ranges
+#include <tqfontmetrics.h>
#include "kdelibs_export.h"
/**
* This class contains utility functions for handling strings.
*
- * This class is @em not a substitute for the QString class. What
+ * This class is @em not a substitute for the TQString class. What
* I tried to do with this class is provide an easy way to
* cut/slice/splice words inside sentences in whatever order desired.
* While the main focus of this class are words (ie characters
@@ -43,7 +43,7 @@
*
* The ranges are a fairly powerful way of getting/stripping words from
* a string. These ranges function, for the large part, as they would in
- * python. See the word(const QString&, const char *) and remword(const QString&, uint) functions for more detail.
+ * python. See the word(const TQString&, const char *) and remword(const TQString&, uint) functions for more detail.
*
* This class contains no data members of its own. All strings are cut
* on the fly and returned as new qstrings/qstringlists.
@@ -52,7 +52,7 @@
*
* \code
* KStringHandler kstr;
- * QString line = "This is a test of the strings";
+ * TQString line = "This is a test of the strings";
*
* cout << "1> " << kstr.word( line , "4:" ) << "\n";
* cout << "2> " << kstr.remrange( line , "2:5" ) << "\n";
@@ -75,9 +75,9 @@ public:
* @param text the string to search for the words
* @param pos the position of the word to search
* @return the word, or an empty string if not found
- * @deprecated use QString::section instead
+ * @deprecated use TQString::section instead
*/
- static QString word( const QString &text , uint pos ) KDE_DEPRECATED;
+ static TQString word( const TQString &text , uint pos ) KDE_DEPRECATED;
/** Returns a range of words from that string.
* Ie:
@@ -91,7 +91,7 @@ public:
* @param range the words to return (see description)
* @return the words, or an empty string if not found
*/
- static QString word( const QString &text , const char *range );
+ static TQString word( const TQString &text , const char *range );
/** Inserts a word into the string, and returns
* a new string with the word included. the first
@@ -102,7 +102,7 @@ public:
* @param pos the position (in words) for the new word
* @return the resulting string
*/
- static QString insword( const QString &text , const QString &word , uint pos );
+ static TQString insword( const TQString &text , const TQString &word , uint pos );
/** Replaces a word in the string, and returns
* a new string with the word included. the first
@@ -113,7 +113,7 @@ public:
* @param pos the position (in words) for the new word
* @return the resulting string
*/
- static QString setword( const QString &text , const QString &word , uint pos );
+ static TQString setword( const TQString &text , const TQString &word , uint pos );
/** Removes a word or ranges of words from the string,
* and returns a new string. The ranges definitions
@@ -127,7 +127,7 @@ public:
* @param range the words to remove (see description)
* @return the resulting string
*/
- static QString remrange( const QString &text , const char *range );
+ static TQString remrange( const TQString &text , const char *range );
/** Removes a word at the given index, and returns a
@@ -136,7 +136,7 @@ public:
* @param pos the position (in words) of thw word to delete
* @return the resulting string
*/
- static QString remword( const QString &text , uint pos );
+ static TQString remword( const TQString &text , uint pos );
/** Removes a matching word from the string, and returns
* a new string. Note that only ONE match is removed.
@@ -144,35 +144,35 @@ public:
* @param word the word to remove
* @return the resulting string
*/
- static QString remword( const QString &text , const QString &word );
+ static TQString remword( const TQString &text , const TQString &word );
/** Capitalizes each word in the string
* "hello there" becomes "Hello There" (string)
* @param text the text to capitalize
* @return the resulting string
*/
- static QString capwords( const QString &text );
+ static TQString capwords( const TQString &text );
/** Capitalizes each word in the list
* [hello, there] becomes [Hello, There] (list)
* @param list the list to capitalize
* @return the resulting list
*/
- static QStringList capwords( const QStringList &list );
+ static TQStringList capwords( const TQStringList &list );
/** Reverses the order of the words in a string
* "hello there" becomes "there hello" (string)
* @param text the text to reverse
* @return the resulting string
*/
- static QString reverse( const QString &text );
+ static TQString reverse( const TQString &text );
/** Reverses the order of the words in a list
* [hello, there] becomes [there, hello] (list)
* @param list the list to reverse
* @return the resulting list
*/
- static QStringList reverse( const QStringList &list );
+ static TQStringList reverse( const TQStringList &list );
/** Left-justifies a string and returns a string at least 'width' characters
* wide.
@@ -181,9 +181,9 @@ public:
* @param text the text to justify
* @param width the desired width of the new string
* @return the resulting string
- * @deprecated use QString::leftJustify instead
+ * @deprecated use TQString::leftJustify instead
*/
- static QString ljust( const QString &text , uint width ) KDE_DEPRECATED;
+ static TQString ljust( const TQString &text , uint width ) KDE_DEPRECATED;
/** Right-justifies a string and returns a string at least 'width' characters
* wide.
@@ -192,9 +192,9 @@ public:
* @param text the text to justify
* @param width the desired width of the new string
* @return the resulting string
- * @deprecated use QString::rightJustify instead
+ * @deprecated use TQString::rightJustify instead
*/
- static QString rjust( const QString &text , uint width ) KDE_DEPRECATED;
+ static TQString rjust( const TQString &text , uint width ) KDE_DEPRECATED;
/** Centers a string and returns a string at least 'width' characters
* wide.
@@ -204,7 +204,7 @@ public:
* @param width the desired width of the new string
* @return the resulting string
*/
- static QString center( const QString &text , uint width );
+ static TQString center( const TQString &text , uint width );
/** Substitute characters at the beginning of a string by "...".
* @param str is the string to modify
@@ -212,7 +212,7 @@ public:
* If the original string is shorter than "maxlen", it is returned verbatim
* @return the modified string
*/
- static QString lsqueeze( const QString & str, uint maxlen = 40 );
+ static TQString lsqueeze( const TQString & str, uint maxlen = 40 );
/** Substitute characters at the beginning of a string by "...". Similar to
* method above, except that it truncates based on pixel width rather than
@@ -224,8 +224,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString lEmSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString lEmSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxlen = 30 );
/** Substitute characters at the beginning of a string by "...". Similar to
@@ -237,8 +237,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString lPixelSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString lPixelSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxPixels );
/** Substitute characters at the middle of a string by "...".
@@ -247,7 +247,7 @@ public:
* If the original string is shorter than "maxlen", it is returned verbatim
* @return the modified string
*/
- static QString csqueeze( const QString & str, uint maxlen = 40 );
+ static TQString csqueeze( const TQString & str, uint maxlen = 40 );
/** Substitute characters in the middle of a string by "...". Similar to
* method above, except that it truncates based on pixel width rather than
@@ -259,8 +259,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString cEmSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString cEmSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxlen = 30 );
/** Substitute characters in the middle of a string by "...". Similar to
@@ -272,8 +272,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString cPixelSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString cPixelSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxPixels );
/** Substitute characters at the end of a string by "...".
@@ -282,7 +282,7 @@ public:
* If the original string is shorter than "maxlen", it is returned verbatim
* @return the modified string
*/
- static QString rsqueeze( const QString & str, uint maxlen = 40 );
+ static TQString rsqueeze( const TQString & str, uint maxlen = 40 );
/** Substitute characters at the end of a string by "...". Similar to
* method above, except that it truncates based on pixel width rather than
@@ -294,8 +294,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString rEmSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString rEmSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxlen = 30 );
/** Substitute characters at the end of a string by "...". Similar to
@@ -307,8 +307,8 @@ public:
* @return the modified string
* @since 3.2
*/
- static QString rPixelSqueeze( const QString & name,
- const QFontMetrics& fontMetrics,
+ static TQString rPixelSqueeze( const TQString & name,
+ const TQFontMetrics& fontMetrics,
uint maxPixels );
/**
@@ -319,68 +319,68 @@ public:
* Patterns with two asterisks like "*.*pk" are not supported.
* @return true if the given filename matches the given pattern
*/
- static bool matchFileName( const QString& filename, const QString& pattern );
+ static bool matchFileName( const TQString& filename, const TQString& pattern );
// KDE4: move to KShell
/**
- * Split a QString into a QStringList in a similar fashion to the static
- * QStringList function in Qt, except you can specify a maximum number
+ * Split a TQString into a TQStringList in a similar fashion to the static
+ * TQStringList function in Qt, except you can specify a maximum number
* of tokens. If max is specified (!= 0) then only that number of tokens
* will be extracted. The final token will be the remainder of the string.
*
* Example:
* \code
* perlSplit("__", "some__string__for__you__here", 4)
- * QStringList contains: "some", "string", "for", "you__here"
+ * TQStringList contains: "some", "string", "for", "you__here"
* \endcode
*
* @param sep is the string to use to delimit s.
* @param s is the input string
* @param max is the maximum number of extractions to perform, or 0.
- * @return A QStringList containing tokens extracted from s.
+ * @return A TQStringList containing tokens extracted from s.
*/
- static QStringList perlSplit
- (const QString & sep, const QString & s, uint max = 0);
+ static TQStringList perlSplit
+ (const TQString & sep, const TQString & s, uint max = 0);
/**
- * Split a QString into a QStringList in a similar fashion to the static
- * QStringList function in Qt, except you can specify a maximum number
+ * Split a TQString into a TQStringList in a similar fashion to the static
+ * TQStringList function in Qt, except you can specify a maximum number
* of tokens. If max is specified (!= 0) then only that number of tokens
* will be extracted. The final token will be the remainder of the string.
*
* Example:
* \code
* perlSplit(' ', "kparts reaches the parts other parts can't", 3)
- * QStringList contains: "kparts", "reaches", "the parts other parts can't"
+ * TQStringList contains: "kparts", "reaches", "the parts other parts can't"
* \endcode
*
* @param sep is the character to use to delimit s.
* @param s is the input string
* @param max is the maximum number of extractions to perform, or 0.
- * @return A QStringList containing tokens extracted from s.
+ * @return A TQStringList containing tokens extracted from s.
*/
- static QStringList perlSplit
- (const QChar & sep, const QString & s, uint max = 0);
+ static TQStringList perlSplit
+ (const TQChar & sep, const TQString & s, uint max = 0);
/**
- * Split a QString into a QStringList in a similar fashion to the static
- * QStringList function in Qt, except you can specify a maximum number
+ * Split a TQString into a TQStringList in a similar fashion to the static
+ * TQStringList function in Qt, except you can specify a maximum number
* of tokens. If max is specified (!= 0) then only that number of tokens
* will be extracted. The final token will be the remainder of the string.
*
* Example:
* \code
- * perlSplit(QRegExp("[! ]", "Split me up ! I'm bored ! OK ?", 3)
- * QStringList contains: "Split", "me", "up ! I'm bored, OK ?"
+ * perlSplit(TQRegExp("[! ]", "Split me up ! I'm bored ! OK ?", 3)
+ * TQStringList contains: "Split", "me", "up ! I'm bored, OK ?"
* \endcode
*
* @param sep is the regular expression to use to delimit s.
* @param s is the input string
* @param max is the maximum number of extractions to perform, or 0.
- * @return A QStringList containing tokens extracted from s.
+ * @return A TQStringList containing tokens extracted from s.
*/
- static QStringList perlSplit
- (const QRegExp & sep, const QString & s, uint max = 0);
+ static TQStringList perlSplit
+ (const TQRegExp & sep, const TQString & s, uint max = 0);
/**
* This method auto-detects URLs in strings, and adds HTML markup to them
@@ -390,7 +390,7 @@ public:
* @return the resulting text
* @since 3.1
*/
- static QString tagURLs( const QString& text );
+ static TQString tagURLs( const TQString& text );
/**
Obscure string by using a simple symmetric encryption. Applying the
@@ -405,7 +405,7 @@ public:
@return obscured string
@since 3.2
*/
- static QString obscure( const QString &str );
+ static TQString obscure( const TQString &str );
/**
Guess whether a string is UTF8 encoded.
@@ -417,14 +417,14 @@ public:
static bool isUtf8( const char *str );
/**
- Construct QString from a c string, guessing whether it is UTF8- or
+ Construct TQString from a c string, guessing whether it is UTF8- or
Local8Bit-encoded.
@param str the input string
- @return the (hopefully correctly guessed) QString representation of @p str
+ @return the (hopefully correctly guessed) TQString representation of @p str
@since 3.2
*/
- static QString from8Bit( const char *str );
+ static TQString from8Bit( const char *str );
#ifdef KDE_NO_COMPAT
private:
@@ -432,7 +432,7 @@ private:
/**
* @deprecated Use matchFileName () instead.
*/
- static KDE_DEPRECATED bool matchFilename( const QString& filename, const QString& pattern )
+ static KDE_DEPRECATED bool matchFilename( const TQString& filename, const TQString& pattern )
{
return matchFileName (filename, pattern);
}
diff --git a/kdecore/ksycoca.cpp b/kdecore/ksycoca.cpp
index b4a3533fe..fd4d9aa95 100644
--- a/kdecore/ksycoca.cpp
+++ b/kdecore/ksycoca.cpp
@@ -22,9 +22,9 @@
#include "ksycocatype.h"
#include "ksycocafactory.h"
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qbuffer.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqbuffer.h>
#include <kapplication.h>
#include <dcopclient.h>
@@ -53,7 +53,7 @@ extern "C"
#define MAP_FAILED ((void *) -1)
#endif
-template class QPtrList<KSycocaFactory>;
+template class TQPtrList<KSycocaFactory>;
// The following limitations are in place:
// Maximum length of a single string: 8192 bytes
@@ -71,13 +71,13 @@ public:
updateSig = 0;
autoRebuild = true;
}
- QFile *database;
- QStringList changeList;
- QString language;
+ TQFile *database;
+ TQStringList changeList;
+ TQString language;
bool readError;
bool autoRebuild;
Q_UINT32 updateSig;
- QStringList allResourceDirs;
+ TQStringList allResourceDirs;
};
int KSycoca::version()
@@ -110,15 +110,15 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
m_sycoca_mmap = 0;
m_str = 0;
- QString path;
- QCString ksycoca_env = getenv("KDESYCOCA");
+ TQString path;
+ TQCString ksycoca_env = getenv("KDESYCOCA");
if (ksycoca_env.isEmpty())
path = KGlobal::dirs()->saveLocation("cache") + "ksycoca";
else
- path = QFile::decodeName(ksycoca_env);
+ path = TQFile::decodeName(ksycoca_env);
kdDebug(7011) << "Trying to open ksycoca from " << path << endl;
- QFile *database = new QFile(path);
+ TQFile *database = new TQFile(path);
bool bOpen = database->open( IO_ReadOnly );
if (!bOpen)
{
@@ -127,7 +127,7 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
{
kdDebug(7011) << "Trying to open global ksycoca from " << path << endl;
delete database;
- database = new QFile(path);
+ database = new TQFile(path);
bOpen = database->open( IO_ReadOnly );
}
}
@@ -146,7 +146,7 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
{
kdDebug(7011) << "mmap failed. (length = " << m_sycoca_size << ")" << endl;
#endif
- m_str = new QDataStream(database);
+ m_str = new TQDataStream(database);
#ifdef HAVE_MMAP
}
else
@@ -154,11 +154,11 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
#ifdef HAVE_MADVISE
(void) madvise((char*)m_sycoca_mmap, m_sycoca_size, MADV_WILLNEED);
#endif
- QByteArray b_array;
+ TQByteArray b_array;
b_array.setRawData(m_sycoca_mmap, m_sycoca_size);
- QBuffer *buffer = new QBuffer( b_array );
+ TQBuffer *buffer = new TQBuffer( b_array );
buffer->open(IO_ReadWrite);
- m_str = new QDataStream( buffer);
+ m_str = new TQDataStream( buffer);
}
#endif
bNoDatabase = false;
@@ -176,9 +176,9 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
{
// We open a dummy database instead.
//kdDebug(7011) << "No database, opening a dummy one." << endl;
- QBuffer *buffer = new QBuffer( QByteArray() );
+ TQBuffer *buffer = new TQBuffer( TQByteArray() );
buffer->open(IO_ReadWrite);
- m_str = new QDataStream( buffer);
+ m_str = new TQDataStream( buffer);
(*m_str) << (Q_INT32) KSYCOCA_VERSION;
(*m_str) << (Q_INT32) 0;
}
@@ -226,13 +226,13 @@ KSycoca::~KSycoca()
void KSycoca::closeDatabase()
{
- QIODevice *device = 0;
+ TQIODevice *device = 0;
if (m_str)
device = m_str->device();
#ifdef HAVE_MMAP
if (device && m_sycoca_mmap)
{
- QBuffer *buf = (QBuffer *) device;
+ TQBuffer *buf = (TQBuffer *) device;
buf->buffer().resetRawData(m_sycoca_mmap, m_sycoca_size);
// Solaris has munmap(char*, size_t) and everything else should
// be happy with a char* for munmap(void*, size_t)
@@ -265,7 +265,7 @@ bool KSycoca::isChanged(const char *type)
return self()->d->changeList.contains(type);
}
-void KSycoca::notifyDatabaseChanged(const QStringList &changeList)
+void KSycoca::notifyDatabaseChanged(const TQStringList &changeList)
{
d->changeList = changeList;
//kdDebug(7011) << "got a notifyDatabaseChanged signal !" << endl;
@@ -279,16 +279,16 @@ void KSycoca::notifyDatabaseChanged(const QStringList &changeList)
emit databaseChanged();
}
-QDataStream * KSycoca::findEntry(int offset, KSycocaType &type)
+TQDataStream * KSycoca::findEntry(int offset, KSycocaType &type)
{
if ( !m_str )
openDatabase();
- //kdDebug(7011) << QString("KSycoca::_findEntry(offset=%1)").arg(offset,8,16) << endl;
+ //kdDebug(7011) << TQString("KSycoca::_findEntry(offset=%1)").arg(offset,8,16) << endl;
m_str->device()->at(offset);
Q_INT32 aType;
(*m_str) >> aType;
type = (KSycocaType) aType;
- //kdDebug(7011) << QString("KSycoca::found type %1").arg(aType) << endl;
+ //kdDebug(7011) << TQString("KSycoca::found type %1").arg(aType) << endl;
return m_str;
}
@@ -315,7 +315,7 @@ bool KSycoca::checkVersion(bool abortOnError)
return true;
}
-QDataStream * KSycoca::findFactory(KSycocaFactoryId id)
+TQDataStream * KSycoca::findFactory(KSycocaFactoryId id)
{
// The constructor found no database, but we want one
if (bNoDatabase)
@@ -347,7 +347,7 @@ QDataStream * KSycoca::findFactory(KSycocaFactoryId id)
while(true)
{
(*m_str) >> aId;
- //kdDebug(7011) << QString("KSycoca::findFactory : found factory %1").arg(aId) << endl;
+ //kdDebug(7011) << TQString("KSycoca::findFactory : found factory %1").arg(aId) << endl;
if (aId == 0)
{
kdError(7011) << "Error, KSycocaFactory (id = " << int(id) << ") not found!" << endl;
@@ -356,7 +356,7 @@ QDataStream * KSycoca::findFactory(KSycocaFactoryId id)
(*m_str) >> aOffset;
if (aId == id)
{
- //kdDebug(7011) << QString("KSycoca::findFactory(%1) offset %2").arg((int)id).arg(aOffset) << endl;
+ //kdDebug(7011) << TQString("KSycoca::findFactory(%1) offset %2").arg((int)id).arg(aOffset) << endl;
m_str->device()->at(aOffset);
return m_str;
}
@@ -364,7 +364,7 @@ QDataStream * KSycoca::findFactory(KSycocaFactoryId id)
return 0;
}
-QString KSycoca::kfsstnd_prefixes()
+TQString KSycoca::kfsstnd_prefixes()
{
if (bNoDatabase) return "";
if (!checkVersion(false)) return "";
@@ -380,7 +380,7 @@ QString KSycoca::kfsstnd_prefixes()
break; // just read 0
}
// We now point to the header
- QString prefixes;
+ TQString prefixes;
KSycocaEntry::read(*m_str, prefixes);
(*m_str) >> m_timeStamp;
KSycocaEntry::read(*m_str, d->language);
@@ -403,32 +403,32 @@ Q_UINT32 KSycoca::updateSignature()
return d->updateSig;
}
-QString KSycoca::language()
+TQString KSycoca::language()
{
if (d->language.isEmpty())
(void) kfsstnd_prefixes();
return d->language;
}
-QStringList KSycoca::allResourceDirs()
+TQStringList KSycoca::allResourceDirs()
{
if (!m_timeStamp)
(void) kfsstnd_prefixes();
return d->allResourceDirs;
}
-QString KSycoca::determineRelativePath( const QString & _fullpath, const char *_resource )
+TQString KSycoca::determineRelativePath( const TQString & _fullpath, const char *_resource )
{
- QString sRelativeFilePath;
- QStringList dirs = KGlobal::dirs()->resourceDirs( _resource );
- QStringList::ConstIterator dirsit = dirs.begin();
+ TQString sRelativeFilePath;
+ TQStringList dirs = KGlobal::dirs()->resourceDirs( _resource );
+ TQStringList::ConstIterator dirsit = dirs.begin();
for ( ; dirsit != dirs.end() && sRelativeFilePath.isEmpty(); ++dirsit ) {
// might need canonicalPath() ...
if ( _fullpath.find( *dirsit ) == 0 ) // path is dirs + relativePath
sRelativeFilePath = _fullpath.mid( (*dirsit).length() ); // skip appsdirs
}
if ( sRelativeFilePath.isEmpty() )
- kdFatal(7011) << QString("Couldn't find %1 in any %2 dir !!!").arg( _fullpath ).arg( _resource) << endl;
+ kdFatal(7011) << TQString("Couldn't find %1 in any %2 dir !!!").arg( _fullpath ).arg( _resource) << endl;
//else
// debug code
//kdDebug(7011) << sRelativeFilePath << endl;
@@ -467,19 +467,19 @@ bool KSycoca::readError()
return b;
}
-void KSycocaEntry::read( QDataStream &s, QString &str )
+void KSycocaEntry::read( TQDataStream &s, TQString &str )
{
Q_UINT32 bytes;
s >> bytes; // read size of string
if ( bytes > 8192 ) { // null string or too big
if (bytes != 0xffffffff)
KSycoca::flagError();
- str = QString::null;
+ str = TQString::null;
}
else if ( bytes > 0 ) { // not empty
int bt = bytes/2;
str.setLength( bt );
- QChar* ch = (QChar *) str.unicode();
+ TQChar* ch = (TQChar *) str.unicode();
char t[8192];
char *b = t;
s.readRawBytes( b, bytes );
@@ -492,7 +492,7 @@ void KSycocaEntry::read( QDataStream &s, QString &str )
}
}
-void KSycocaEntry::read( QDataStream &s, QStringList &list )
+void KSycocaEntry::read( TQDataStream &s, TQStringList &list )
{
list.clear();
Q_UINT32 count;
@@ -504,7 +504,7 @@ void KSycocaEntry::read( QDataStream &s, QStringList &list )
}
for(Q_UINT32 i = 0; i < count; i++)
{
- QString str;
+ TQString str;
read(s, str);
list.append( str );
if (s.atEnd())
diff --git a/kdecore/ksycoca.h b/kdecore/ksycoca.h
index 00c72431f..408c48234 100644
--- a/kdecore/ksycoca.h
+++ b/kdecore/ksycoca.h
@@ -20,8 +20,8 @@
#define __ksycoca_h__
#include <dcopobject.h>
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include "ksycocatype.h"
#include <kdelibs_export.h>
@@ -41,7 +41,7 @@ class KSycocaFactoryList;
* @internal
* Read-only SYstem COnfiguration CAche
*/
-class KDECORE_EXPORT KSycoca : public QObject, public DCOPObject
+class KDECORE_EXPORT KSycoca : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -73,19 +73,19 @@ public:
* @internal - called by factories in read-only mode
* This is how factories get a stream to an entry
*/
- QDataStream *findEntry(int offset, KSycocaType &type);
+ TQDataStream *findEntry(int offset, KSycocaType &type);
/**
* @internal - called by factories in read-only mode
*/
- QDataStream *findFactory( KSycocaFactoryId id);
+ TQDataStream *findFactory( KSycocaFactoryId id);
/**
* @internal - returns kfsstnd stored inside database
*/
- QString kfsstnd_prefixes();
+ TQString kfsstnd_prefixes();
/**
* @internal - returns language stored inside database
*/
- QString language();
+ TQString language();
/**
* @internal - returns timestamp of database
@@ -110,7 +110,7 @@ public:
* @internal - returns all directories with information
* stored inside sycoca.
*/
- QStringList allResourceDirs();
+ TQStringList allResourceDirs();
/**
* @internal - add a factory
@@ -131,7 +131,7 @@ public:
/**
* Determine relative path for a .desktop file from a full path and a resource name
*/
- static QString determineRelativePath( const QString & _fullpath, const char *_resource );
+ static TQString determineRelativePath( const TQString & _fullpath, const char *_resource );
/**
* When you receive a "databaseChanged" signal, you can query here if
@@ -154,7 +154,7 @@ k_dcop:
/**
* internal function for receiving kded/kbuildsycoca's signal, when the sycoca file changes
*/
- void notifyDatabaseChanged(const QStringList &);
+ void notifyDatabaseChanged(const TQStringList &);
signals:
/**
@@ -168,7 +168,7 @@ protected:
bool openDatabase(bool openDummyIfNotFound=true);
void closeDatabase();
KSycocaFactoryList *m_lstFactories;
- QDataStream *m_str;
+ TQDataStream *m_str;
bool bNoDatabase;
size_t m_sycoca_size;
const char *m_sycoca_mmap;
diff --git a/kdecore/ksycocadict.cpp b/kdecore/ksycocadict.cpp
index cc7f87471..ce7529682 100644
--- a/kdecore/ksycocadict.cpp
+++ b/kdecore/ksycocadict.cpp
@@ -20,27 +20,27 @@
#include "ksycocaentry.h"
#include "ksycoca.h"
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <stdlib.h>
namespace
{
struct string_entry {
- string_entry(QString _key, KSycocaEntry *_payload)
+ string_entry(TQString _key, KSycocaEntry *_payload)
{ keyStr = _key; key = keyStr.unicode(); length = keyStr.length(); payload = _payload; hash = 0; }
uint hash;
int length;
- const QChar *key;
- QString keyStr;
+ const TQChar *key;
+ TQString keyStr;
KSycocaEntry *payload;
};
}
-template class QPtrList<string_entry>;
+template class TQPtrList<string_entry>;
-class KSycocaDictStringList : public QPtrList<string_entry>
+class KSycocaDictStringList : public TQPtrList<string_entry>
{
public:
KSycocaDictStringList();
@@ -56,7 +56,7 @@ KSycocaDict::KSycocaDict()
{
}
-KSycocaDict::KSycocaDict(QDataStream *str, int offset)
+KSycocaDict::KSycocaDict(TQDataStream *str, int offset)
: d(0), mStr(str), mOffset(offset)
{
Q_UINT32 test1, test2;
@@ -82,7 +82,7 @@ KSycocaDict::~KSycocaDict()
}
void
-KSycocaDict::add(const QString &key, KSycocaEntry *payload)
+KSycocaDict::add(const TQString &key, KSycocaEntry *payload)
{
if (key.isEmpty()) return; // Not allowed (should never happen)
if (!payload) return; // Not allowed!
@@ -96,7 +96,7 @@ KSycocaDict::add(const QString &key, KSycocaEntry *payload)
}
void
-KSycocaDict::remove(const QString &key)
+KSycocaDict::remove(const TQString &key)
{
if (d)
{
@@ -112,9 +112,9 @@ KSycocaDict::remove(const QString &key)
}
int
-KSycocaDict::find_string(const QString &key )
+KSycocaDict::find_string(const TQString &key )
{
- //kdDebug(7011) << QString("KSycocaDict::find_string(%1)").arg(key) << endl;
+ //kdDebug(7011) << TQString("KSycocaDict::find_string(%1)").arg(key) << endl;
if (!mStr || !mOffset)
{
@@ -127,16 +127,16 @@ KSycocaDict::find_string(const QString &key )
// Read hash-table data
uint hash = hashKey(key) % mHashTableSize;
- //kdDebug(7011) << QString("hash is %1").arg(hash) << endl;
+ //kdDebug(7011) << TQString("hash is %1").arg(hash) << endl;
uint off = mOffset+sizeof(Q_INT32)*hash;
- //kdDebug(7011) << QString("off is %1").arg(off,8,16) << endl;
+ //kdDebug(7011) << TQString("off is %1").arg(off,8,16) << endl;
mStr->device()->at( off );
Q_INT32 offset;
(*mStr) >> offset;
- //kdDebug(7011) << QString("offset is %1").arg(offset,8,16) << endl;
+ //kdDebug(7011) << TQString("offset is %1").arg(offset,8,16) << endl;
if (offset == 0)
return 0;
@@ -147,15 +147,15 @@ KSycocaDict::find_string(const QString &key )
offset = -offset;
mStr->device()->at(offset);
- //kdDebug(7011) << QString("Looking up duplicate list at %1").arg(offset,8,16) << endl;
+ //kdDebug(7011) << TQString("Looking up duplicate list at %1").arg(offset,8,16) << endl;
while(true)
{
(*mStr) >> offset;
if (offset == 0) break;
- QString dupkey;
+ TQString dupkey;
(*mStr) >> dupkey;
- //kdDebug(7011) << QString(">> %1 %2").arg(offset,8,16).arg(dupkey) << endl;
+ //kdDebug(7011) << TQString(">> %1 %2").arg(offset,8,16).arg(dupkey) << endl;
if (dupkey == key) return offset;
}
//kdWarning(7011) << "Not found!" << endl;
@@ -179,7 +179,7 @@ KSycocaDict::clear()
}
uint
-KSycocaDict::hashKey( const QString &key)
+KSycocaDict::hashKey( const TQString &key)
{
int l = key.length();
register uint h = 0;
@@ -275,7 +275,7 @@ addDiversity(KSycocaDictStringList *d, int pos)
void
-KSycocaDict::save(QDataStream &str)
+KSycocaDict::save(TQDataStream &str)
{
if (count() == 0)
{
@@ -288,7 +288,7 @@ KSycocaDict::save(QDataStream &str)
mOffset = str.device()->at();
- //kdDebug(7011) << QString("KSycocaDict: %1 entries.").arg(count()) << endl;
+ //kdDebug(7011) << TQString("KSycocaDict: %1 entries.").arg(count()) << endl;
//kdDebug(7011) << "Calculating hash keys.." << endl;
@@ -301,7 +301,7 @@ KSycocaDict::save(QDataStream &str)
maxLength = entry->length;
}
- //kdDebug(7011) << QString("Max string length = %1").arg(maxLength) << endl;
+ //kdDebug(7011) << TQString("Max string length = %1").arg(maxLength) << endl;
// use "almost prime" number for sz (to calculate diversity) and later
// for the table size of big tables
@@ -366,7 +366,7 @@ KSycocaDict::save(QDataStream &str)
struct hashtable_entry {
string_entry *entry;
- QPtrList<string_entry> *duplicates;
+ TQPtrList<string_entry> *duplicates;
int duplicate_offset;
};
@@ -391,7 +391,7 @@ KSycocaDict::save(QDataStream &str)
{
if (!hashTable[hash].duplicates)
{ // Second entry, build duplicate list.
- hashTable[hash].duplicates = new QPtrList<string_entry>();
+ hashTable[hash].duplicates = new TQPtrList<string_entry>();
hashTable[hash].duplicates->append(hashTable[hash].entry);
hashTable[hash].duplicate_offset = 0;
}
@@ -403,12 +403,12 @@ KSycocaDict::save(QDataStream &str)
str << mHashList;
mOffset = str.device()->at(); // mOffset points to start of hashTable
- //kdDebug(7011) << QString("Start of Hash Table, offset = %1").arg(mOffset,8,16) << endl;
+ //kdDebug(7011) << TQString("Start of Hash Table, offset = %1").arg(mOffset,8,16) << endl;
for(int pass = 1; pass <= 2; pass++)
{
str.device()->at(mOffset);
- //kdDebug(7011) << QString("Writing hash table (pass #%1)").arg(pass) << endl;
+ //kdDebug(7011) << TQString("Writing hash table (pass #%1)").arg(pass) << endl;
for(uint i=0; i < mHashTableSize; i++)
{
Q_INT32 tmpid;
@@ -419,29 +419,29 @@ KSycocaDict::save(QDataStream &str)
else
tmpid = (Q_INT32) -hashTable[i].duplicate_offset; // Negative ID
str << tmpid;
- //kdDebug(7011) << QString("Hash table : %1").arg(tmpid,8,16) << endl;
+ //kdDebug(7011) << TQString("Hash table : %1").arg(tmpid,8,16) << endl;
}
- //kdDebug(7011) << QString("End of Hash Table, offset = %1").arg(str.device()->at(),8,16) << endl;
+ //kdDebug(7011) << TQString("End of Hash Table, offset = %1").arg(str.device()->at(),8,16) << endl;
- //kdDebug(7011) << QString("Writing duplicate lists (pass #%1)").arg(pass) << endl;
+ //kdDebug(7011) << TQString("Writing duplicate lists (pass #%1)").arg(pass) << endl;
for(uint i=0; i < mHashTableSize; i++)
{
if (hashTable[i].duplicates)
{
- QPtrList<string_entry> *dups = hashTable[i].duplicates;
+ TQPtrList<string_entry> *dups = hashTable[i].duplicates;
hashTable[i].duplicate_offset = str.device()->at();
- /*kdDebug(7011) << QString("Duplicate lists: Offset = %1 list_size = %2") .arg(hashTable[i].duplicate_offset,8,16).arg(dups->count()) << endl;
+ /*kdDebug(7011) << TQString("Duplicate lists: Offset = %1 list_size = %2") .arg(hashTable[i].duplicate_offset,8,16).arg(dups->count()) << endl;
*/
for(string_entry *dup = dups->first(); dup; dup=dups->next())
{
str << (Q_INT32) dup->payload->offset(); // Positive ID
- str << dup->keyStr; // Key (QString)
+ str << dup->keyStr; // Key (TQString)
}
str << (Q_INT32) 0; // End of list marker (0)
}
}
- //kdDebug(7011) << QString("End of Dict, offset = %1").arg(str.device()->at(),8,16) << endl;
+ //kdDebug(7011) << TQString("End of Dict, offset = %1").arg(str.device()->at(),8,16) << endl;
}
//kdDebug(7011) << "Cleaning up hash table." << endl;
diff --git a/kdecore/ksycocadict.h b/kdecore/ksycocadict.h
index dec6a8cc8..94a2bc646 100644
--- a/kdecore/ksycocadict.h
+++ b/kdecore/ksycocadict.h
@@ -19,9 +19,9 @@
#ifndef __ksycocadict_h__
#define __ksycocadict_h__
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qdatastream.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqdatastream.h>
#include "kdelibs_export.h"
class KSycocaEntry;
@@ -41,7 +41,7 @@ public:
/**
* Create a dict from an existing database
*/
- KSycocaDict(QDataStream *str, int offset);
+ KSycocaDict(TQDataStream *str, int offset);
~KSycocaDict();
@@ -51,14 +51,14 @@ public:
* 'payload' should have a valid offset by the time
* the dictionary gets saved.
**/
- void add(const QString &key, KSycocaEntry *payload);
+ void add(const TQString &key, KSycocaEntry *payload);
/**
* Removes the 'payload' from the dictionary with key 'key'.
*
* Not very fast, use with care O(N)
**/
- void remove(const QString &key);
+ void remove(const TQString &key);
/**
* Looks up an entry identified by 'key'.
@@ -72,7 +72,7 @@ public:
* indeed matches the search key. If it doesn't
* then no matching entry exists.
*/
- int find_string(const QString &key );
+ int find_string(const TQString &key );
/**
* The number of entries in the dictionary.
@@ -108,16 +108,16 @@ public:
* The hash table size will be approx. 20Kb.
* The duplicate list size will be approx. 12Kb.
**/
- void save(QDataStream &str);
+ void save(TQDataStream &str);
protected:
- Q_UINT32 hashKey( const QString &);
+ Q_UINT32 hashKey( const TQString &);
private:
KSycocaDictStringList *d;
- QDataStream *mStr;
+ TQDataStream *mStr;
Q_INT32 mOffset;
Q_UINT32 mHashTableSize;
- QValueList<Q_INT32> mHashList;
+ TQValueList<Q_INT32> mHashList;
};
#endif
diff --git a/kdecore/ksycocaentry.h b/kdecore/ksycocaentry.h
index 93ec00eb1..fc06dcc3b 100644
--- a/kdecore/ksycocaentry.h
+++ b/kdecore/ksycocaentry.h
@@ -21,7 +21,7 @@
#include "ksycocatype.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <ksharedptr.h>
class QDataStream;
@@ -43,24 +43,24 @@ public:
public:
typedef KSharedPtr<KSycocaEntry> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
public: // KDoc seems to barf on those typedefs and generates no docs after them
/**
* Default constructor
*/
- KSycocaEntry(const QString &path) : mOffset(0), m_bDeleted(false), mPath(path) { }
+ KSycocaEntry(const TQString &path) : mOffset(0), m_bDeleted(false), mPath(path) { }
/**
* Safe demarshalling functions.
*/
- static void read( QDataStream &s, QString &str );
- static void read( QDataStream &s, QStringList &list );
+ static void read( TQDataStream &s, TQString &str );
+ static void read( TQDataStream &s, TQStringList &list );
/**
* @internal
* Restores itself from a stream.
*/
- KSycocaEntry( QDataStream &_str, int offset ) :
+ KSycocaEntry( TQDataStream &_str, int offset ) :
mOffset( offset ), m_bDeleted(false)
{
read(_str, mPath);
@@ -69,14 +69,14 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them
/**
* @return the name of this entry
*/
- virtual QString name() const = 0;
+ virtual TQString name() const = 0;
/**
* @return the path of this entry
* The path can be absolute or relative.
* The corresponding factory should know relative to what.
*/
- QString entryPath() const { return mPath; }
+ TQString entryPath() const { return mPath; }
/**
* @return true if valid
@@ -99,7 +99,7 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them
* Save ourselves to the database. Don't forget to call the parent class
* first if you override this function.
*/
- virtual void save(QDataStream &s)
+ virtual void save(TQDataStream &s)
{
mOffset = s.device()->at(); // store position in member variable
s << (Q_INT32) sycocaType() << mPath;
@@ -109,13 +109,13 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them
* @internal
* Load ourselves from the database. Don't call the parent class!
*/
- virtual void load(QDataStream &) = 0;
+ virtual void load(TQDataStream &) = 0;
private:
int mOffset;
protected:
bool m_bDeleted;
- QString mPath;
+ TQString mPath;
protected:
virtual void virtual_hook( int id, void* data );
};
diff --git a/kdecore/ksycocafactory.cpp b/kdecore/ksycocafactory.cpp
index 3542fa0cb..e5816dc23 100644
--- a/kdecore/ksycocafactory.cpp
+++ b/kdecore/ksycocafactory.cpp
@@ -21,12 +21,12 @@
#include "ksycocafactory.h"
#include "ksycocaentry.h"
#include "ksycocadict.h"
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include <kdebug.h>
-template class QDict<KSycocaEntry>;
-template class QDict<KSharedPtr<KSycocaEntry> >;
+template class TQDict<KSycocaEntry>;
+template class TQDict<KSharedPtr<KSycocaEntry> >;
KSycocaFactory::KSycocaFactory(KSycocaFactoryId factory_id)
: m_resourceList(0), m_entryDict(0), m_sycocaDict(0)
@@ -75,7 +75,7 @@ KSycocaFactory::~KSycocaFactory()
}
void
-KSycocaFactory::saveHeader(QDataStream &str)
+KSycocaFactory::saveHeader(TQDataStream &str)
{
// Write header
str.device()->at(mOffset);
@@ -85,7 +85,7 @@ KSycocaFactory::saveHeader(QDataStream &str)
}
void
-KSycocaFactory::save(QDataStream &str)
+KSycocaFactory::save(TQDataStream &str)
{
if (!m_entryDict) return; // Error! Function should only be called when
// building database
@@ -101,7 +101,7 @@ KSycocaFactory::save(QDataStream &str)
// Write all entries.
int entryCount = 0;
- for(QDictIterator<KSycocaEntry::Ptr> it ( *m_entryDict );
+ for(TQDictIterator<KSycocaEntry::Ptr> it ( *m_entryDict );
it.current();
++it)
{
@@ -115,7 +115,7 @@ KSycocaFactory::save(QDataStream &str)
// Write indices...
// Linear index
str << (Q_INT32) entryCount;
- for(QDictIterator<KSycocaEntry::Ptr> it ( *m_entryDict );
+ for(TQDictIterator<KSycocaEntry::Ptr> it ( *m_entryDict );
it.current();
++it)
{
@@ -144,7 +144,7 @@ KSycocaFactory::addEntry(KSycocaEntry *newEntry, const char *)
if (!m_sycocaDict) return; // Error!
- QString name = newEntry->name();
+ TQString name = newEntry->name();
m_entryDict->insert( name, new KSycocaEntry::Ptr(newEntry) );
m_sycocaDict->add( name, newEntry );
}
@@ -157,7 +157,7 @@ KSycocaFactory::removeEntry(KSycocaEntry *newEntry)
if (!m_sycocaDict) return; // Error!
- QString name = newEntry->name();
+ TQString name = newEntry->name();
m_entryDict->remove( name );
m_sycocaDict->remove( name );
}
diff --git a/kdecore/ksycocafactory.h b/kdecore/ksycocafactory.h
index 65bb9d98e..b7def5369 100644
--- a/kdecore/ksycocafactory.h
+++ b/kdecore/ksycocafactory.h
@@ -22,15 +22,15 @@
#include "ksycocatype.h"
#include "ksycocaentry.h"
-#include <qdict.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
class KSycoca;
class QStringList;
class QString;
class KSycocaDict;
class KSycocaResourceList;
-typedef QDict<KSycocaEntry::Ptr> KSycocaEntryDict;
+typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
/**
* @internal
@@ -65,7 +65,7 @@ public:
* Construct an entry from a config file.
* To be implemented in the real factories.
*/
- virtual KSycocaEntry *createEntry(const QString &file, const char *resource) = 0;
+ virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
/**
* Add an entry
@@ -99,7 +99,7 @@ public:
* Don't forget to call the parent first when you override
* this function.
*/
- virtual void save(QDataStream &str);
+ virtual void save(TQDataStream &str);
/**
* Writes out a header to the stream 'str'.
@@ -108,7 +108,7 @@ public:
* Don't forget to call the parent first when you override
* this function.
*/
- virtual void saveHeader(QDataStream &str);
+ virtual void saveHeader(TQDataStream &str);
/**
* @return the resources for which this factory is responsible.
@@ -122,7 +122,7 @@ protected:
int m_sycocaDictOffset;
int m_beginEntryOffset;
int m_endEntryOffset;
- QDataStream *m_str;
+ TQDataStream *m_str;
KSycocaResourceList *m_resourceList;
KSycocaEntryDict *m_entryDict;
@@ -134,7 +134,7 @@ protected:
/** This, instead of a typedef, allows to declare "class ..." in header files
* @internal
*/
-class KDECORE_EXPORT KSycocaFactoryList : public QPtrList<KSycocaFactory>
+class KDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
{
public:
KSycocaFactoryList() { }
diff --git a/kdecore/ktempdir.cpp b/kdecore/ktempdir.cpp
index 141ee71a0..70a442730 100644
--- a/kdecore/ktempdir.cpp
+++ b/kdecore/ktempdir.cpp
@@ -44,8 +44,8 @@
#define _PATH_TMP "/tmp"
#endif
-#include <qdatetime.h>
-#include <qdir.h>
+#include <tqdatetime.h>
+#include <tqdir.h>
#include "kglobal.h"
#include "kapplication.h"
@@ -56,7 +56,7 @@
#include <kdebug.h>
#include "kde_file.h"
-KTempDir::KTempDir(QString directoryPrefix, int mode)
+KTempDir::KTempDir(TQString directoryPrefix, int mode)
{
bAutoDelete = false;
bExisting = false;
@@ -69,26 +69,26 @@ KTempDir::KTempDir(QString directoryPrefix, int mode)
}
bool
-KTempDir::create(const QString &directoryPrefix, int mode)
+KTempDir::create(const TQString &directoryPrefix, int mode)
{
// make sure the random seed is randomized
(void) KApplication::random();
- QCString nme = QFile::encodeName(directoryPrefix) + "XXXXXX";
+ TQCString nme = TQFile::encodeName(directoryPrefix) + "XXXXXX";
char *realName;
if((realName=mkdtemp(nme.data())) == 0)
{
// Recreate it for the warning, mkdtemps emptied it
- QCString nme = QFile::encodeName(directoryPrefix) + "XXXXXX";
+ TQCString nme = TQFile::encodeName(directoryPrefix) + "XXXXXX";
qWarning("KTempDir: Error trying to create %s: %s", nme.data(), strerror(errno));
mError = errno;
- mTmpName = QString::null;
+ mTmpName = TQString::null;
return false;
}
// got a return value != 0
- QCString realNameStr(realName);
- mTmpName = QFile::decodeName(realNameStr)+"/";
+ TQCString realNameStr(realName);
+ mTmpName = TQFile::decodeName(realNameStr)+"/";
kdDebug(180) << "KTempDir: Temporary directory created :" << mTmpName << endl;
mode_t tmp = 0;
mode_t umsk = umask(tmp);
@@ -130,10 +130,10 @@ KTempDir::existing() const
return bExisting;
}
-QDir *
+TQDir *
KTempDir::qDir()
{
- if (bExisting) return new QDir(mTmpName);
+ if (bExisting) return new TQDir(mTmpName);
return 0;
}
@@ -150,7 +150,7 @@ KTempDir::unlink()
// Auxiliary recursive function for removeDirs
static bool
-rmtree(const QCString& name)
+rmtree(const TQCString& name)
{
kdDebug() << "Checking directory for remove " << name << endl;
KDE_struct_stat st;
@@ -169,7 +169,7 @@ rmtree(const QCString& name)
kdDebug() << "CHECKING " << name << "/" << ep->d_name << endl;
if ( !qstrcmp( ep->d_name, "." ) || !qstrcmp( ep->d_name, ".." ) )
continue;
- QCString newName( name );
+ TQCString newName( name );
newName += "/"; // Careful: do not add '/' instead or you get problems with Qt3.
newName += ep->d_name;
/*
@@ -205,13 +205,13 @@ rmtree(const QCString& name)
}
bool
-KTempDir::removeDir(const QString& path)
+KTempDir::removeDir(const TQString& path)
{
kdDebug() << k_funcinfo << " " << path << endl;
- if ( !QFile::exists( path ) )
+ if ( !TQFile::exists( path ) )
return true; // The goal is that there is no directory
- const QCString cstr( QFile::encodeName( path ) );
+ const TQCString cstr( TQFile::encodeName( path ) );
return rmtree( cstr );
}
diff --git a/kdecore/ktempdir.h b/kdecore/ktempdir.h
index e8455e479..7f47276ab 100644
--- a/kdecore/ktempdir.h
+++ b/kdecore/ktempdir.h
@@ -20,7 +20,7 @@
#ifndef _KTEMPDIR_H_
#define _KTEMPDIR_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
#include <errno.h>
#include "kdelibs_export.h"
@@ -59,7 +59,7 @@ public:
*
* The default \p directoryPrefix is "$KDEHOME/tmp-$HOST/appname"
* @param directoryPrefix the prefix of the file name, or
- * QString::null for the default value
+ * TQString::null for the default value
* @param mode the file permissions,
* almost always in octal. The first digit selects permissions for
* the user who owns the file: read (4), write (2), and execute
@@ -68,7 +68,7 @@ public:
* users not in the file's group, with the same values.
*
**/
- KTempDir(QString directoryPrefix=QString::null,
+ KTempDir(TQString directoryPrefix=TQString::null,
int mode = 0700 );
@@ -97,18 +97,18 @@ public:
/**
* Returns the full path and name of the directory, including a trailing '/'.
- * @return The name of the directory, or QString::null if creating the
+ * @return The name of the directory, or TQString::null if creating the
* directory has failed or the directory has been unlinked
**/
- QString name() const;
+ TQString name() const;
/**
- * Returns the QDir* of the temporary directory.
- * @return QDir directory information of the directory or 0 if their is no managed directory
+ * Returns the TQDir* of the temporary directory.
+ * @return TQDir directory information of the directory or 0 if their is no managed directory
* The caller has to free the pointer open for writing to the
**/
- QDir *qDir();
+ TQDir *qDir();
/**
* Deletes the directory recursively
@@ -141,7 +141,7 @@ public:
* (Use errno for more details about the error.)
* @since 3.5.2
*/
- static bool removeDir( const QString& path );
+ static bool removeDir( const TQString& path );
protected:
@@ -152,7 +152,7 @@ protected:
* @param mode directory permissions
* @return bool true upon sucess
*/
- bool create(const QString &directoryPrefix, int mode);
+ bool create(const TQString &directoryPrefix, int mode);
/**
* Sets the errno value
@@ -162,7 +162,7 @@ protected:
private:
int mError;
- QString mTmpName;
+ TQString mTmpName;
bool bExisting;
bool bAutoDelete;
diff --git a/kdecore/ktempfile.cpp b/kdecore/ktempfile.cpp
index 9c6c8cdfb..c04f725fe 100644
--- a/kdecore/ktempfile.cpp
+++ b/kdecore/ktempfile.cpp
@@ -43,10 +43,10 @@
#define _PATH_TMP "/tmp"
#endif
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qdatastream.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqdatastream.h>
+#include <tqtextstream.h>
#include "kglobal.h"
#include "kapplication.h"
@@ -56,8 +56,8 @@
#include "kde_file.h"
#include "kdebug.h"
-/* antlarr: KDE 4: make the parameters const QString & */
-KTempFile::KTempFile(QString filePrefix, QString fileExtension, int mode)
+/* antlarr: KDE 4: make the parameters const TQString & */
+KTempFile::KTempFile(TQString filePrefix, TQString fileExtension, int mode)
{
bAutoDelete = false;
mFd = -1;
@@ -89,26 +89,26 @@ KTempFile::KTempFile(bool)
}
bool
-KTempFile::create(const QString &filePrefix, const QString &fileExtension,
+KTempFile::create(const TQString &filePrefix, const TQString &fileExtension,
int mode)
{
// make sure the random seed is randomized
(void) KApplication::random();
- QCString ext = QFile::encodeName(fileExtension);
- QCString nme = QFile::encodeName(filePrefix) + "XXXXXX" + ext;
+ TQCString ext = TQFile::encodeName(fileExtension);
+ TQCString nme = TQFile::encodeName(filePrefix) + "XXXXXX" + ext;
if((mFd = mkstemps(nme.data(), ext.length())) < 0)
{
// Recreate it for the warning, mkstemps emptied it
- QCString nme = QFile::encodeName(filePrefix) + "XXXXXX" + ext;
+ TQCString nme = TQFile::encodeName(filePrefix) + "XXXXXX" + ext;
kdWarning() << "KTempFile: Error trying to create " << nme << ": " << strerror(errno) << endl;
mError = errno;
- mTmpName = QString::null;
+ mTmpName = TQString::null;
return false;
}
// got a file descriptor. nme contains the name
- mTmpName = QFile::decodeName(nme);
+ mTmpName = TQFile::decodeName(nme);
mode_t tmp = 0;
mode_t umsk = umask(tmp);
umask(umsk);
@@ -166,35 +166,35 @@ KTempFile::fstream()
return mStream;
}
-QFile *
+TQFile *
KTempFile::file()
{
if (mFile) return mFile;
if ( !fstream() ) return 0;
- mFile = new QFile();
+ mFile = new TQFile();
mFile->setName( name() );
mFile->open(IO_ReadWrite, mStream);
return mFile;
}
-QTextStream *
+TQTextStream *
KTempFile::textStream()
{
if (mTextStream) return mTextStream;
if ( !file() ) return 0; // Initialize mFile
- mTextStream = new QTextStream( mFile );
+ mTextStream = new TQTextStream( mFile );
return mTextStream;
}
-QDataStream *
+TQDataStream *
KTempFile::dataStream()
{
if (mDataStream) return mDataStream;
if ( !file() ) return 0; // Initialize mFile
- mDataStream = new QDataStream( mFile );
+ mDataStream = new TQDataStream( mFile );
return mDataStream;
}
@@ -202,8 +202,8 @@ void
KTempFile::unlink()
{
if (!mTmpName.isEmpty())
- QFile::remove( mTmpName );
- mTmpName = QString::null;
+ TQFile::remove( mTmpName );
+ mTmpName = TQString::null;
}
#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0
diff --git a/kdecore/ktempfile.h b/kdecore/ktempfile.h
index c868a3fa1..bba2d6442 100644
--- a/kdecore/ktempfile.h
+++ b/kdecore/ktempfile.h
@@ -20,7 +20,7 @@
#ifndef _KTEMPFILE_H_
#define _KTEMPFILE_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
#include <errno.h>
#include "kdelibs_export.h"
@@ -62,14 +62,14 @@ public:
*
* The default @p filePrefix is "$KDEHOME/tmp-$HOST/appname/"
* The default @p fileExtension is ".tmp"
- * @param filePrefix the prefix of the file name, or QString::null
+ * @param filePrefix the prefix of the file name, or TQString::null
* for the default value
- * @param fileExtension the extension of the prefix, or QString::null for the
+ * @param fileExtension the extension of the prefix, or TQString::null for the
* default value
* @param mode the file permissions
**/
- KTempFile(QString filePrefix=QString::null,
- QString fileExtension=QString::null,
+ KTempFile(TQString filePrefix=TQString::null,
+ TQString fileExtension=TQString::null,
int mode = 0600 );
@@ -116,10 +116,10 @@ public:
* since it may lead to the kind of symlink vulnerabilities that the KTempFile
* design attempts to prevent.
*
- * @return The name of the file, or QString::null if opening the
+ * @return The name of the file, or TQString::null if opening the
* file has failed or the file has been unlinked already.
**/
- QString name() const;
+ TQString name() const;
/**
* An integer file descriptor open for writing to the file
@@ -136,25 +136,25 @@ public:
FILE *fstream();
/**
- * Returns the QTextStream for writing.
- * @return QTextStream open for writing to the file, or 0
+ * Returns the TQTextStream for writing.
+ * @return TQTextStream open for writing to the file, or 0
* if opening the file failed
**/
- QTextStream *textStream();
+ TQTextStream *textStream();
/**
- * Returns a QDataStream for writing.
- * @return QDataStream open for writing to the file, or 0
+ * Returns a TQDataStream for writing.
+ * @return TQDataStream open for writing to the file, or 0
* if opening the file failed
**/
- QDataStream *dataStream();
+ TQDataStream *dataStream();
/**
- * Returns a QFile.
- * @return A QFile open for writing to the file, or 0 if
+ * Returns a TQFile.
+ * @return A TQFile open for writing to the file, or 0 if
* opening the file failed.
**/
- QFile *file();
+ TQFile *file();
/**
* Unlinks the file from the directory. The file is
@@ -192,18 +192,18 @@ protected:
* @internal
* Create function used internally by KTempFile and KSaveFile
**/
- bool create(const QString &filePrefix,
- const QString &fileExtension, int mode);
+ bool create(const TQString &filePrefix,
+ const TQString &fileExtension, int mode);
void setError(int error) { mError = error; }
private:
int mError;
- QString mTmpName;
+ TQString mTmpName;
int mFd;
FILE *mStream;
- QFile *mFile;
- QTextStream *mTextStream;
- QDataStream *mDataStream;
+ TQFile *mFile;
+ TQTextStream *mTextStream;
+ TQDataStream *mDataStream;
bool bOpen;
bool bAutoDelete;
diff --git a/kdecore/ktimezones.cpp b/kdecore/ktimezones.cpp
index c74dc8143..5ebf9bd4a 100644
--- a/kdecore/ktimezones.cpp
+++ b/kdecore/ktimezones.cpp
@@ -26,11 +26,11 @@
#include <kstringhandler.h>
#include <ktempfile.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <cerrno>
#include <climits>
@@ -52,7 +52,7 @@ class AbbreviationsMatch :
public KTimezoneDetails
{
public:
- AbbreviationsMatch(const QString &stdZone, const QString &dstZone = "")
+ AbbreviationsMatch(const TQString &stdZone, const TQString &dstZone = "")
{
m_stdZone = stdZone;
m_dstZone = dstZone;
@@ -72,10 +72,10 @@ public:
private:
bool m_foundStd;
bool m_foundDst;
- QString m_stdZone;
- QString m_dstZone;
+ TQString m_stdZone;
+ TQString m_dstZone;
- virtual void gotAbbreviation(int /*index*/, const QString &value)
+ virtual void gotAbbreviation(int /*index*/, const TQString &value)
{
if (m_stdZone == value)
{
@@ -100,7 +100,7 @@ public:
{
}
- virtual bool parse(const QString &/*zone*/, KTimezoneDetails &/*dataReceiver*/) const
+ virtual bool parse(const TQString &/*zone*/, KTimezoneDetails &/*dataReceiver*/) const
{
return true;
}
@@ -138,7 +138,7 @@ public:
return m_isDst;
}
- QString abbreviation()
+ TQString abbreviation()
{
return m_abbr;
}
@@ -150,7 +150,7 @@ private:
int m_abbrIndex;
int m_offset;
bool m_isDst;
- QString m_abbr;
+ TQString m_abbr;
virtual void gotTransitionTime(int index, unsigned transitionTime)
{
@@ -181,7 +181,7 @@ private:
}
}
- virtual void gotAbbreviation(int index, const QString &value)
+ virtual void gotAbbreviation(int index, const TQString &value)
{
if (index == m_abbrIndex)
{
@@ -203,9 +203,9 @@ bool KTimezone::isValidLongitude(float longitude)
}
KTimezone::KTimezone(
- KSharedPtr<KTimezoneSource> db, const QString& name,
- const QString &countryCode, float latitude, float longitude,
- const QString &comment) :
+ KSharedPtr<KTimezoneSource> db, const TQString& name,
+ const TQString &countryCode, float latitude, float longitude,
+ const TQString &comment) :
m_db(db),
m_name(name),
m_countryCode(countryCode),
@@ -227,12 +227,12 @@ KTimezone::~KTimezone()
// delete d;
}
-QString KTimezone::comment() const
+TQString KTimezone::comment() const
{
return m_comment;
}
-QDateTime KTimezone::convert(const KTimezone *newZone, const QDateTime &dateTime) const
+TQDateTime KTimezone::convert(const KTimezone *newZone, const TQDateTime &dateTime) const
{
char *originalZone = ::getenv("TZ");
@@ -244,7 +244,7 @@ QDateTime KTimezone::convert(const KTimezone *newZone, const QDateTime &dateTime
// Set the timezone and convert UTC to localtime.
::setenv("TZ", newZone->name().utf8(), 1);
tzset();
- QDateTime remoteTime;
+ TQDateTime remoteTime;
remoteTime.setTime_t(utc, Qt::LocalTime);
// Now restore things
@@ -260,7 +260,7 @@ QDateTime KTimezone::convert(const KTimezone *newZone, const QDateTime &dateTime
return remoteTime;
}
-QString KTimezone::countryCode() const
+TQString KTimezone::countryCode() const
{
return m_countryCode;
}
@@ -275,7 +275,7 @@ float KTimezone::longitude() const
return m_longitude;
}
-QString KTimezone::name() const
+TQString KTimezone::name() const
{
return m_name;
}
@@ -285,12 +285,12 @@ int KTimezone::offset(Qt::TimeSpec basisSpec) const
char *originalZone = ::getenv("TZ");
// Get the time in the current timezone.
- QDateTime basisTime = QDateTime::currentDateTime(basisSpec);
+ TQDateTime basisTime = TQDateTime::currentDateTime(basisSpec);
// Set the timezone and find out what time it is there compared to the basis.
::setenv("TZ", m_name.utf8(), 1);
tzset();
- QDateTime remoteTime = QDateTime::currentDateTime(Qt::LocalTime);
+ TQDateTime remoteTime = TQDateTime::currentDateTime(Qt::LocalTime);
int offset = remoteTime.secsTo(basisTime);
// Now restore things
@@ -306,7 +306,7 @@ int KTimezone::offset(Qt::TimeSpec basisSpec) const
return offset;
}
-int KTimezone::offset(const QDateTime &dateTime) const
+int KTimezone::offset(const TQDateTime &dateTime) const
{
OffsetFind finder(dateTime.toTime_t());
int result = 0;
@@ -370,7 +370,7 @@ const KTimezones::ZoneMap KTimezones::allZones()
// is the place to look. The TZI binary value is the TIME_ZONE_INFORMATION structure.
//
// For Unix its all easy except knowing where to look. Try the LSB location first.
- QFile f;
+ TQFile f;
m_zoneinfoDir = "/usr/share/zoneinfo";
f.setName(m_zoneinfoDir + "/zone.tab");
if (!f.open(IO_ReadOnly))
@@ -412,16 +412,16 @@ const KTimezones::ZoneMap KTimezones::allZones()
}
// Parse the zone.tab.
- QTextStream str(&f);
- QRegExp lineSeparator("[ \t]");
- QRegExp ordinateSeparator("[+-]");
+ TQTextStream str(&f);
+ TQRegExp lineSeparator("[ \t]");
+ TQRegExp ordinateSeparator("[+-]");
KSharedPtr<KTimezoneSource> db(new KTimezoneSource(m_zoneinfoDir));
while (!str.atEnd())
{
- QString line = str.readLine();
+ TQString line = str.readLine();
if (line.isEmpty() || '#' == line[0])
continue;
- QStringList tokens = KStringHandler::perlSplit(lineSeparator, line, 4);
+ TQStringList tokens = KStringHandler::perlSplit(lineSeparator, line, 4);
if (tokens.count() < 3)
{
kdError() << "invalid record: " << line << endl;
@@ -429,7 +429,7 @@ const KTimezones::ZoneMap KTimezones::allZones()
}
// Got three tokens. Now check for two ordinates plus first one is "".
- QStringList ordinates = KStringHandler::perlSplit(ordinateSeparator, tokens[1], 2);
+ TQStringList ordinates = KStringHandler::perlSplit(ordinateSeparator, tokens[1], 2);
if (ordinates.count() < 2)
{
kdError() << "invalid coordinates: " << tokens[1] << endl;
@@ -452,7 +452,7 @@ const KTimezones::ZoneMap KTimezones::allZones()
/**
* Convert sHHMM or sHHMMSS to a floating point number of degrees.
*/
-float KTimezones::convertCoordinate(const QString &coordinate)
+float KTimezones::convertCoordinate(const TQString &coordinate)
{
int value = coordinate.toInt();
int degrees = 0;
@@ -500,7 +500,7 @@ const KTimezone *KTimezones::local()
return local;
// Try to match /etc/localtime against the list of zoneinfo files.
- QFile f;
+ TQFile f;
f.setName("/etc/localtime");
if (f.open(IO_ReadOnly))
{
@@ -508,8 +508,8 @@ const KTimezone *KTimezones::local()
KMD5 context("");
context.reset();
context.update(f);
- QIODevice::Offset referenceSize = f.size();
- QString referenceMd5Sum = context.hexDigest();
+ TQIODevice::Offset referenceSize = f.size();
+ TQString referenceMd5Sum = context.hexDigest();
f.close();
if (!m_zoneinfoDir.isEmpty())
{
@@ -520,8 +520,8 @@ const KTimezone *KTimezones::local()
f.setName(m_zoneinfoDir + '/' + zone->name());
if (f.open(IO_ReadOnly))
{
- QIODevice::Offset candidateSize = f.size();
- QString candidateMd5Sum;
+ TQIODevice::Offset candidateSize = f.size();
+ TQString candidateMd5Sum;
if (candidateSize == referenceSize)
{
// Only do the heavy lifting for file sizes which match.
@@ -544,7 +544,7 @@ const KTimezone *KTimezones::local()
return local;
// BSD support.
- QString fileZone;
+ TQString fileZone;
f.setName("/etc/timezone");
if (!f.open(IO_ReadOnly))
{
@@ -558,8 +558,8 @@ const KTimezone *KTimezones::local()
}
else
{
- QTextStream ts(&f);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(&f);
+ ts.setEncoding(TQTextStream::Latin1);
// Read the last line starting "TZ=".
while (!ts.atEnd())
@@ -578,8 +578,8 @@ const KTimezone *KTimezones::local()
}
else
{
- QTextStream ts(&f);
- ts.setEncoding(QTextStream::Latin1);
+ TQTextStream ts(&f);
+ ts.setEncoding(TQTextStream::Latin1);
// Read the first line.
if (!ts.atEnd())
@@ -619,7 +619,7 @@ const KTimezone *KTimezones::local()
return m_UTC;
}
-const KTimezone *KTimezones::zone(const QString &name)
+const KTimezone *KTimezones::zone(const TQString &name)
{
if (name.isEmpty())
return m_UTC;
@@ -639,7 +639,7 @@ KTimezoneDetails::~KTimezoneDetails()
{
}
-void KTimezoneDetails::gotAbbreviation(int /*index*/, const QString &)
+void KTimezoneDetails::gotAbbreviation(int /*index*/, const TQString &)
{}
void KTimezoneDetails::gotHeader(
@@ -671,7 +671,7 @@ void KTimezoneDetails::parseEnded()
void KTimezoneDetails::parseStarted()
{}
-KTimezoneSource::KTimezoneSource(const QString &db) :
+KTimezoneSource::KTimezoneSource(const TQString &db) :
m_db(db)
{
}
@@ -680,14 +680,14 @@ KTimezoneSource::~KTimezoneSource()
{
}
-QString KTimezoneSource::db()
+TQString KTimezoneSource::db()
{
return m_db;
}
-bool KTimezoneSource::parse(const QString &zone, KTimezoneDetails &dataReceiver) const
+bool KTimezoneSource::parse(const TQString &zone, KTimezoneDetails &dataReceiver) const
{
- QFile f(m_db + '/' + zone);
+ TQFile f(m_db + '/' + zone);
if (!f.open(IO_ReadOnly))
{
kdError() << "Cannot open " << f.name() << endl;
@@ -718,9 +718,9 @@ bool KTimezoneSource::parse(const QString &zone, KTimezoneDetails &dataReceiver)
Q_UINT8 isStandard;
Q_UINT8 isUTC;
- QDataStream str(&f);
+ TQDataStream str(&f);
str >> T >> z >> i_ >> f_;
- // kdError() << "signature: " << QChar(T) << QChar(z) << QChar(i_) << QChar(f_) << endl;
+ // kdError() << "signature: " << TQChar(T) << TQChar(z) << TQChar(i_) << TQChar(f_) << endl;
unsigned i;
for (i = 0; i < 4; i++)
str >> tzh.ttisgmtcnt;
@@ -752,7 +752,7 @@ bool KTimezoneSource::parse(const QString &zone, KTimezoneDetails &dataReceiver)
kdError() << "excessive length for timezone abbreviations: " << tzh.charcnt << endl;
return false;
}
- QByteArray array(tzh.charcnt);
+ TQByteArray array(tzh.charcnt);
str.readRawBytes(array.data(), array.size());
char *abbrs = array.data();
if (abbrs[tzh.charcnt - 1] != 0)
diff --git a/kdecore/ktimezones.h b/kdecore/ktimezones.h
index 28b7e1ad9..3055f202f 100644
--- a/kdecore/ktimezones.h
+++ b/kdecore/ktimezones.h
@@ -21,10 +21,10 @@
#define _KTIMEZONES_H
#include "kdelibs_export.h"
-#include <qdatetime.h>
-#include <qnamespace.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqnamespace.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include <ksharedptr.h>
class KTimezoneDetails;
@@ -52,24 +52,24 @@ class KDECORE_EXPORT KTimezoneSource :
public KShared
{
public:
- KTimezoneSource(const QString &db);
+ KTimezoneSource(const TQString &db);
virtual ~KTimezoneSource();
/**
* Location of system timezone information.
* @return value which can be combined with zone name to retrieve timezone info.
*/
- virtual QString db();
+ virtual TQString db();
/**
* Extract timezone detail information. The default implementation consists
* of a parser for zoneinfo files in tzfile(5).
* @return true if the parse encountered no errors.
*/
- virtual bool parse(const QString &zone, KTimezoneDetails &dataReceiver) const;
+ virtual bool parse(const TQString &zone, KTimezoneDetails &dataReceiver) const;
private:
- QString m_db;
+ TQString m_db;
};
/**
@@ -114,9 +114,9 @@ public:
* @param comment description of the timezone, if any.
*/
KTimezone(
- KSharedPtr<KTimezoneSource> db, const QString &name,
- const QString &countryCode = QString(), float latitude = UNKNOWN, float longitude = UNKNOWN,
- const QString &comment = QString());
+ KSharedPtr<KTimezoneSource> db, const TQString &name,
+ const TQString &countryCode = TQString(), float latitude = UNKNOWN, float longitude = UNKNOWN,
+ const TQString &comment = TQString());
~KTimezone();
/**
@@ -124,14 +124,14 @@ public:
*
* @return name in system-dependent format.
*/
- QString name() const;
+ TQString name() const;
/**
* Returns the two-letter country code of the timezone.
*
* @return ISO 3166 2-character country code, empty if unknown.
*/
- QString countryCode() const;
+ TQString countryCode() const;
/**
* Returns the latitude of the timezone.
@@ -164,7 +164,7 @@ public:
*
* @return offset in seconds.
*/
- int offset(const QDateTime &dateTime) const;
+ int offset(const TQDateTime &dateTime) const;
/**
* Convert a date/time (which is interpreted as being localtime in this
@@ -172,14 +172,14 @@ public:
*
* @return converted date/time.
*/
- QDateTime convert(const KTimezone *newZone, const QDateTime &dateTime) const;
+ TQDateTime convert(const KTimezone *newZone, const TQDateTime &dateTime) const;
/**
* Returns any comment for the timezone.
*
* @return comment, may be empty.
*/
- QString comment() const;
+ TQString comment() const;
/**
* Extract timezone detail information.
@@ -192,11 +192,11 @@ private:
KTimezone& operator=(const KTimezone&);
KSharedPtr<KTimezoneSource> m_db;
- QString m_name;
- QString m_countryCode;
+ TQString m_name;
+ TQString m_countryCode;
float m_latitude;
float m_longitude;
- QString m_comment;
+ TQString m_comment;
KTimezonePrivate *d;
};
@@ -265,7 +265,7 @@ public:
* is NOT a simple incrementing integer, rather it matches the sequence
* of abbrIndex values from {@link gotLocalTime() }.
*/
- virtual void gotAbbreviation(int index, const QString &abbr);
+ virtual void gotAbbreviation(int index, const TQString &abbr);
/**
* Called when a leap second adjustment is seen.
@@ -321,9 +321,9 @@ public:
* @param name Name of timezone. Empty is equivalent to UTC.
* @return named timezone, NULL on error.
*/
- const KTimezone *zone(const QString &name);
+ const KTimezone *zone(const TQString &name);
- typedef QMap<QString, KTimezone *> ZoneMap;
+ typedef TQMap<TQString, KTimezone *> ZoneMap;
/**
* Return timezone database.
@@ -340,9 +340,9 @@ private:
KTimezones(const KTimezones&);
KTimezones& operator=(const KTimezones&);
- float convertCoordinate(const QString &coordinate);
+ float convertCoordinate(const TQString &coordinate);
- QString m_zoneinfoDir;
+ TQString m_zoneinfoDir;
ZoneMap *m_zones;
KTimezone *m_UTC;
KTimezonesPrivate *d;
diff --git a/kdecore/kuniqueapplication.cpp b/kdecore/kuniqueapplication.cpp
index 1ef94fbbe..7cd0575cc 100644
--- a/kdecore/kuniqueapplication.cpp
+++ b/kdecore/kuniqueapplication.cpp
@@ -29,9 +29,9 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qptrlist.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kcmdlineargs.h>
@@ -71,14 +71,14 @@ static KCmdLineOptions kunique_options[] =
};
struct DCOPRequest {
- QCString fun;
- QByteArray data;
+ TQCString fun;
+ TQByteArray data;
DCOPClientTransaction *transaction;
};
class KUniqueApplicationPrivate {
public:
- QPtrList <DCOPRequest> requestList;
+ TQPtrList <DCOPRequest> requestList;
bool processingRequest;
bool firstInstance;
};
@@ -104,13 +104,13 @@ KUniqueApplication::start()
delete args;
#endif
- QCString appName = KCmdLineArgs::about->appName();
+ TQCString appName = KCmdLineArgs::about->appName();
if (s_nofork)
{
if (s_multipleInstances)
{
- QCString pid;
+ TQCString pid;
pid.setNum(getpid());
appName = appName + "-" + pid;
}
@@ -149,14 +149,14 @@ KUniqueApplication::start()
// Child
::close(fd[0]);
if (s_multipleInstances)
- appName.append("-").append(QCString().setNum(getpid()));
+ appName.append("-").append(TQCString().setNum(getpid()));
dc = dcopClient();
{
- QCString regName = dc->registerAs(appName, false);
+ TQCString regName = dc->registerAs(appName, false);
if (regName.isEmpty())
{
// Check DISPLAY
- if (QCString(getenv(DISPLAY)).isEmpty())
+ if (TQCString(getenv(DISPLAY)).isEmpty())
{
kdError() << "KUniqueApplication: Can't determine DISPLAY. Aborting." << endl;
result = -1; // Error
@@ -238,7 +238,7 @@ KUniqueApplication::start()
// DCOPClient::emergencyClose();
// dcopClient()->detach();
if (s_multipleInstances)
- appName.append("-").append(QCString().setNum(fork_result));
+ appName.append("-").append(TQCString().setNum(fork_result));
::close(fd[1]);
for(;;)
{
@@ -271,7 +271,7 @@ KUniqueApplication::start()
kdError() << "KUniqueApplication: Registering failed!" << endl;
}
- QCString new_asn_id;
+ TQCString new_asn_id;
#if defined Q_WS_X11
KStartupInfoId id;
if( kapp != NULL ) // KApplication constructor unsets the env. variable
@@ -282,14 +282,14 @@ KUniqueApplication::start()
new_asn_id = id.id();
#endif
- QByteArray data, reply;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data, reply;
+ TQDataStream ds(data, IO_WriteOnly);
KCmdLineArgs::saveAppArgs(ds);
ds << new_asn_id;
dc->setPriorityCall(true);
- QCString replyType;
+ TQCString replyType;
if (!dc->call(appName, KCmdLineArgs::about->appName(), "newInstance()", data, replyType, reply))
{
kdError() << "Communication problem with " << KCmdLineArgs::about->appName() << ", it probably crashed." << endl;
@@ -303,7 +303,7 @@ KUniqueApplication::start()
delete dc; // Clean up DCOP commmunication
::exit(255);
}
- QDataStream rs(reply, IO_ReadOnly);
+ TQDataStream rs(reply, IO_ReadOnly);
int exitCode;
rs >> exitCode;
delete dc; // Clean up DCOP commmunication
@@ -324,7 +324,7 @@ KUniqueApplication::KUniqueApplication(bool allowStyles, bool GUIenabled, bool c
if (s_nofork)
// Can't call newInstance directly from the constructor since it's virtual...
- QTimer::singleShot( 0, this, SLOT(newInstanceNoFork()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(newInstanceNoFork()) );
}
@@ -340,7 +340,7 @@ KUniqueApplication::KUniqueApplication(Display *display, Qt::HANDLE visual,
if (s_nofork)
// Can't call newInstance directly from the constructor since it's virtual...
- QTimer::singleShot( 0, this, SLOT(newInstanceNoFork()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(newInstanceNoFork()) );
}
#endif
@@ -350,7 +350,7 @@ KUniqueApplication::~KUniqueApplication()
delete d;
}
-// this gets called before even entering QApplication::QApplication()
+// this gets called before even entering TQApplication::TQApplication()
KInstance* KUniqueApplication::initHack( bool configUnique )
{
KInstance* inst = new KInstance( KCmdLineArgs::about );
@@ -370,7 +370,7 @@ void KUniqueApplication::newInstanceNoFork()
if (dcopClient()->isSuspended())
{
// Try again later.
- QTimer::singleShot( 200, this, SLOT(newInstanceNoFork()) );
+ TQTimer::singleShot( 200, this, TQT_SLOT(newInstanceNoFork()) );
return;
}
@@ -390,8 +390,8 @@ void KUniqueApplication::newInstanceNoFork()
// What to do with the return value ?
}
-bool KUniqueApplication::process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData)
+bool KUniqueApplication::process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData)
{
if (fun == "newInstance()")
{
@@ -402,7 +402,7 @@ bool KUniqueApplication::process(const QCString &fun, const QByteArray &data,
}
void
-KUniqueApplication::delayRequest(const QCString &fun, const QByteArray &data)
+KUniqueApplication::delayRequest(const TQCString &fun, const TQByteArray &data)
{
DCOPRequest *request = new DCOPRequest;
request->fun = fun;
@@ -411,7 +411,7 @@ KUniqueApplication::delayRequest(const QCString &fun, const QByteArray &data)
d->requestList.append(request);
if (!d->processingRequest)
{
- QTimer::singleShot(0, this, SLOT(processDelayed()));
+ TQTimer::singleShot(0, this, TQT_SLOT(processDelayed()));
}
}
@@ -421,22 +421,22 @@ KUniqueApplication::processDelayed()
if (dcopClient()->isSuspended())
{
// Try again later.
- QTimer::singleShot( 200, this, SLOT(processDelayed()));
+ TQTimer::singleShot( 200, this, TQT_SLOT(processDelayed()));
return;
}
d->processingRequest = true;
while( !d->requestList.isEmpty() )
{
DCOPRequest *request = d->requestList.take(0);
- QByteArray replyData;
- QCString replyType;
+ TQByteArray replyData;
+ TQCString replyType;
if (request->fun == "newInstance()") {
dcopClient()->setPriorityCall(false);
- QDataStream ds(request->data, IO_ReadOnly);
+ TQDataStream ds(request->data, IO_ReadOnly);
KCmdLineArgs::loadAppArgs(ds);
if( !ds.atEnd()) // backwards compatibility
{
- QCString asn_id;
+ TQCString asn_id;
ds >> asn_id;
setStartupId( asn_id );
}
@@ -447,7 +447,7 @@ KUniqueApplication::processDelayed()
if( s_handleAutoStarted )
KStartupInfo::handleAutoAppStartedSending(); // KDE4 remove?
#endif
- QDataStream rs(replyData, IO_WriteOnly);
+ TQDataStream rs(replyData, IO_WriteOnly);
rs << exitCode;
replyType = "int";
}
diff --git a/kdecore/kuniqueapplication.h b/kdecore/kuniqueapplication.h
index 049627f62..f5c4bcc18 100644
--- a/kdecore/kuniqueapplication.h
+++ b/kdecore/kuniqueapplication.h
@@ -152,8 +152,8 @@ public:
* @param replyData the reply
* @see DCOPObject
*/
- bool process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData);
+ bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData);
/**
* Creates a new "instance" of the application.
@@ -194,7 +194,7 @@ private:
/**
* Delays the processing of a DCOP request.
*/
- void delayRequest(const QCString &fun, const QByteArray &data);
+ void delayRequest(const TQCString &fun, const TQByteArray &data);
private slots:
/**
diff --git a/kdecore/kurl.cpp b/kdecore/kurl.cpp
index 0f54d19c4..2d2082e7f 100644
--- a/kdecore/kurl.cpp
+++ b/kdecore/kurl.cpp
@@ -38,14 +38,14 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qurl.h>
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qstylesheet.h>
-#include <qmap.h>
-#include <qtextcodec.h>
-#include <qmutex.h>
+#include <tqurl.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
+#include <tqmap.h>
+#include <tqtextcodec.h>
+#include <tqmutex.h>
#ifdef Q_WS_WIN
# define KURL_ROOTDIR_PATH "C:/"
@@ -53,28 +53,28 @@
# define KURL_ROOTDIR_PATH "/"
#endif
-static const QString fileProt = "file";
+static const TQString fileProt = "file";
-static QTextCodec * codecForHint( int encoding_hint /* not 0 ! */ )
+static TQTextCodec * codecForHint( int encoding_hint /* not 0 ! */ )
{
- return QTextCodec::codecForMib( encoding_hint );
+ return TQTextCodec::codecForMib( encoding_hint );
}
// encoding_offset:
// 0 encode both @ and /
// 1 encode @ but not /
// 2 encode neither @ or /
-static QString encode( const QString& segment, int encoding_offset, int encoding_hint, bool isRawURI = false )
+static TQString encode( const TQString& segment, int encoding_offset, int encoding_hint, bool isRawURI = false )
{
const char *encode_string = "/@<>#\"&?={}|^~[]\'`\\:+%";
encode_string += encoding_offset;
- QCString local;
+ TQCString local;
if (encoding_hint==0)
local = segment.local8Bit();
else
{
- QTextCodec * textCodec = codecForHint( encoding_hint );
+ TQTextCodec * textCodec = codecForHint( encoding_hint );
if (!textCodec)
local = segment.local8Bit();
else
@@ -84,10 +84,10 @@ static QString encode( const QString& segment, int encoding_offset, int encoding
int old_length = isRawURI ? local.size() - 1 : local.length();
if ( !old_length )
- return segment.isNull() ? QString::null : QString(""); // differentiate null and empty
+ return segment.isNull() ? TQString::null : TQString(""); // differentiate null and empty
// a worst case approximation
- QChar *new_segment = new QChar[ old_length * 3 + 1 ];
+ TQChar *new_segment = new QChar[ old_length * 3 + 1 ];
int new_length = 0;
for ( int i = 0; i < old_length; i++ )
@@ -115,12 +115,12 @@ static QString encode( const QString& segment, int encoding_offset, int encoding
new_segment[ new_length++ ] = local[i];
}
- QString result = QString(new_segment, new_length);
+ TQString result = TQString(new_segment, new_length);
delete [] new_segment;
return result;
}
-static QString encodeHost( const QString& segment, bool encode_slash, int encoding_hint )
+static TQString encodeHost( const TQString& segment, bool encode_slash, int encoding_hint )
{
// Hostnames are encoded differently
// we use the IDNA transformation instead
@@ -129,7 +129,7 @@ static QString encodeHost( const QString& segment, bool encode_slash, int encodi
#ifndef KDE_QT_ONLY
Q_UNUSED( encode_slash );
Q_UNUSED( encoding_hint );
- QString host = KIDNA::toAscii(segment);
+ TQString host = KIDNA::toAscii(segment);
if (host.isEmpty())
return segment;
return host;
@@ -159,15 +159,15 @@ static int hex2int( unsigned int _char )
// KURL(url.prettyURL()).url()
-static QString lazy_encode( const QString& segment, bool encodeAt=true )
+static TQString lazy_encode( const TQString& segment, bool encodeAt=true )
{
int old_length = segment.length();
if ( !old_length )
- return QString::null;
+ return TQString::null;
// a worst case approximation
- QChar *new_segment = new QChar[ old_length * 3 + 1 ];
+ TQChar *new_segment = new QChar[ old_length * 3 + 1 ];
int new_length = 0;
for ( int i = 0; i < old_length; i++ )
@@ -199,28 +199,28 @@ static QString lazy_encode( const QString& segment, bool encodeAt=true )
new_segment[ new_length++ ] = segment[i];
}
- QString result = QString(new_segment, new_length);
+ TQString result = TQString(new_segment, new_length);
delete [] new_segment;
return result;
}
-static void decode( const QString& segment, QString &decoded, QString &encoded, int encoding_hint=0, bool updateDecoded = true, bool isRawURI = false )
+static void decode( const TQString& segment, TQString &decoded, TQString &encoded, int encoding_hint=0, bool updateDecoded = true, bool isRawURI = false )
{
- decoded = QString::null;
+ decoded = TQString::null;
encoded = segment;
int old_length = segment.length();
if ( !old_length )
return;
- QTextCodec *textCodec = 0;
+ TQTextCodec *textCodec = 0;
if (encoding_hint)
textCodec = codecForHint( encoding_hint );
if (!textCodec)
- textCodec = QTextCodec::codecForLocale();
+ textCodec = TQTextCodec::codecForLocale();
- QCString csegment = textCodec->fromUnicode(segment);
+ TQCString csegment = textCodec->fromUnicode(segment);
// Check if everything went ok
if (textCodec->toUnicode(csegment) != segment)
{
@@ -235,7 +235,7 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
// make a copy of the old one
char *new_segment = new char[ old_length + 1 ];
- QChar *new_usegment = new QChar[ old_length * 3 + 1 ];
+ TQChar *new_usegment = new QChar[ old_length * 3 + 1 ];
int i = 0;
while( i < old_length )
@@ -284,7 +284,7 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
}
new_segment [ new_length ] = 0;
- encoded = QString( new_usegment, new_length2);
+ encoded = TQString( new_usegment, new_length2);
// Encoding specified
if (updateDecoded)
@@ -293,18 +293,18 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
if ( isRawURI ) {
int length = qstrlen( new_segment );
while ( length < new_length ) {
- decoded += QChar::null;
+ decoded += TQChar::null;
length += 1;
decoded += textCodec->toUnicode( new_segment + length );
length += qstrlen( new_segment + length );
}
}
- QCString validate = textCodec->fromUnicode(decoded);
+ TQCString validate = textCodec->fromUnicode(decoded);
if (strcmp(validate.data(), new_segment) != 0)
{
- decoded = QString::fromLocal8Bit(new_segment, new_length);
+ decoded = TQString::fromLocal8Bit(new_segment, new_length);
}
}
@@ -312,38 +312,38 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
delete [] new_usegment;
}
-static QString decode(const QString &segment, int encoding_hint = 0, bool isRawURI = false)
+static TQString decode(const TQString &segment, int encoding_hint = 0, bool isRawURI = false)
{
- QString result;
- QString tmp;
+ TQString result;
+ TQString tmp;
decode(segment, result, tmp, encoding_hint, true, isRawURI);
return result;
}
-static QString cleanpath(const QString &_path, bool cleanDirSeparator, bool decodeDots)
+static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool decodeDots)
{
- if (_path.isEmpty()) return QString::null;
+ if (_path.isEmpty()) return TQString::null;
- if (QDir::isRelativePath(_path))
+ if (TQDir::isRelativePath(_path))
return _path; // Don't mangle mailto-style URLs
- QString path = _path;
+ TQString path = _path;
int len = path.length();
if (decodeDots)
{
#ifndef KDE_QT_ONLY
- static const QString &encodedDot = KGlobal::staticQString("%2e");
+ static const TQString &encodedDot = KGlobal::staticQString("%2e");
#else
- QString encodedDot("%2e");
+ TQString encodedDot("%2e");
#endif
if (path.find(encodedDot, 0, false) != -1)
{
#ifndef KDE_QT_ONLY
- static const QString &encodedDOT = KGlobal::staticQString("%2E"); // Uppercase!
+ static const TQString &encodedDOT = KGlobal::staticQString("%2E"); // Uppercase!
#else
- QString encodedDOT("%2E");
+ TQString encodedDOT("%2E");
#endif
path.replace(encodedDot, ".");
path.replace(encodedDOT, ".");
@@ -355,12 +355,12 @@ static QString cleanpath(const QString &_path, bool cleanDirSeparator, bool deco
(len > 1 && path[len-2] == '/' && path[len-1] == '.');
// The following code cleans up directory path much like
- // QDir::cleanDirPath() except it can be made to ignore multiple
+ // TQDir::cleanDirPath() except it can be made to ignore multiple
// directory separators by setting the flag to false. That fixes
// bug# 15044, mail.altavista.com and other similar brain-dead server
// implementations that do not follow what has been specified in
// RFC 2396!! (dA)
- QString result;
+ TQString result;
int cdUp, orig_pos, pos;
cdUp = 0;
@@ -388,7 +388,7 @@ static QString cleanpath(const QString &_path, bool cleanDirSeparator, bool deco
#ifdef Q_WS_WIN // prepend drive letter if exists (js)
if (orig_pos >= 2 && isalpha(path[0].latin1()) && path[1]==':') {
- result.prepend(QString(path[0])+":");
+ result.prepend(TQString(path[0])+":");
}
#endif
@@ -400,11 +400,11 @@ static QString cleanpath(const QString &_path, bool cleanDirSeparator, bool deco
return result;
}
-bool KURL::isRelativeURL(const QString &_url)
+bool KURL::isRelativeURL(const TQString &_url)
{
int len = _url.length();
if (!len) return true; // Very short relative URL.
- const QChar *str = _url.unicode();
+ const TQChar *str = _url.unicode();
// Absolute URL must start with alpha-character
if (!isalpha(str[0].latin1()))
@@ -429,9 +429,9 @@ KURL::List::List(const KURL &url)
append( url );
}
-KURL::List::List(const QStringList &list)
+KURL::List::List(const TQStringList &list)
{
- for (QStringList::ConstIterator it = list.begin();
+ for (TQStringList::ConstIterator it = list.begin();
it != list.end();
it++)
{
@@ -439,9 +439,9 @@ KURL::List::List(const QStringList &list)
}
}
-QStringList KURL::List::toStringList() const
+TQStringList KURL::List::toStringList() const
{
- QStringList lst;
+ TQStringList lst;
for( KURL::List::ConstIterator it = begin();
it != end();
it++)
@@ -462,7 +462,7 @@ KURL::~KURL()
}
-KURL::KURL( const QString &url, int encoding_hint )
+KURL::KURL( const TQString &url, int encoding_hint )
{
reset();
parse( url, encoding_hint );
@@ -471,13 +471,13 @@ KURL::KURL( const QString &url, int encoding_hint )
KURL::KURL( const char * url, int encoding_hint )
{
reset();
- parse( QString::fromLatin1(url), encoding_hint );
+ parse( TQString::fromLatin1(url), encoding_hint );
}
-KURL::KURL( const QCString& url, int encoding_hint )
+KURL::KURL( const TQCString& url, int encoding_hint )
{
reset();
- parse( QString::fromLatin1(url), encoding_hint );
+ parse( TQString::fromLatin1(url), encoding_hint );
}
KURL::KURL( const KURL& _u )
@@ -485,9 +485,9 @@ KURL::KURL( const KURL& _u )
*this = _u;
}
-QDataStream & operator<< (QDataStream & s, const KURL & a)
+TQDataStream & operator<< (TQDataStream & s, const KURL & a)
{
- QString QueryForWire=a.m_strQuery_encoded;
+ TQString QueryForWire=a.m_strQuery_encoded;
if (!a.m_strQuery_encoded.isNull())
QueryForWire.prepend("?");
@@ -497,17 +497,17 @@ QDataStream & operator<< (QDataStream & s, const KURL & a)
return s;
}
-QDataStream & operator>> (QDataStream & s, KURL & a)
+TQDataStream & operator>> (TQDataStream & s, KURL & a)
{
Q_INT8 malf;
- QString QueryFromWire;
+ TQString QueryFromWire;
s >> a.m_strProtocol >> a.m_strUser >> a.m_strPass >> a.m_strHost
>> a.m_strPath >> a.m_strPath_encoded >> QueryFromWire >> a.m_strRef_encoded
>> malf >> a.m_iPort;
a.m_bIsMalformed = (malf != 0);
if ( QueryFromWire.isNull() )
- a.m_strQuery_encoded = QString::null;
+ a.m_strQuery_encoded = TQString::null;
else if ( QueryFromWire.length() == 1 ) // empty query
a.m_strQuery_encoded = "";
else
@@ -519,13 +519,13 @@ QDataStream & operator>> (QDataStream & s, KURL & a)
}
#ifndef QT_NO_NETWORKPROTOCOL
-KURL::KURL( const QUrl &u )
+KURL::KURL( const TQUrl &u )
{
*this = u;
}
#endif
-KURL::KURL( const KURL& _u, const QString& _rel_url, int encoding_hint )
+KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint )
{
if (_u.hasSubURL()) // Operate on the last suburl, not the first
{
@@ -539,7 +539,7 @@ KURL::KURL( const KURL& _u, const QString& _rel_url, int encoding_hint )
// WORKAROUND THE RFC 1606 LOOPHOLE THAT ALLOWS
// http:/index.html AS A VALID SYNTAX FOR RELATIVE
// URLS. ( RFC 2396 section 5.2 item # 3 )
- QString rUrl = _rel_url;
+ TQString rUrl = _rel_url;
int len = _u.m_strProtocol.length();
if ( !_u.m_strHost.isEmpty() && !rUrl.isEmpty() &&
rUrl.find( _u.m_strProtocol, 0, false ) == 0 &&
@@ -563,19 +563,19 @@ KURL::KURL( const KURL& _u, const QString& _rel_url, int encoding_hint )
else if ( isRelativeURL( rUrl) )
{
*this = _u;
- m_strQuery_encoded = QString::null;
- m_strRef_encoded = QString::null;
+ m_strQuery_encoded = TQString::null;
+ m_strRef_encoded = TQString::null;
if ( rUrl[0] == '/')
{
if ((rUrl.length() > 1) && (rUrl[1] == '/'))
{
- m_strHost = QString::null;
+ m_strHost = TQString::null;
// File protocol returns file:/// without host, strip // from rUrl
if (_u.m_strProtocol == fileProt)
rUrl.remove(0, 2);
}
- m_strPath = QString::null;
- m_strPath_encoded = QString::null;
+ m_strPath = TQString::null;
+ m_strPath_encoded = TQString::null;
}
else if ( rUrl[0] != '?' )
{
@@ -616,14 +616,14 @@ KURL::KURL( const KURL& _u, const QString& _rel_url, int encoding_hint )
void KURL::reset()
{
- m_strProtocol = QString::null;
- m_strUser = QString::null;
- m_strPass = QString::null;
- m_strHost = QString::null;
- m_strPath = QString::null;
- m_strPath_encoded = QString::null;
- m_strQuery_encoded = QString::null;
- m_strRef_encoded = QString::null;
+ m_strProtocol = TQString::null;
+ m_strUser = TQString::null;
+ m_strPass = TQString::null;
+ m_strHost = TQString::null;
+ m_strPath = TQString::null;
+ m_strPath_encoded = TQString::null;
+ m_strQuery_encoded = TQString::null;
+ m_strRef_encoded = TQString::null;
m_bIsMalformed = true;
m_iPort = 0;
m_iUriMode = Auto;
@@ -634,7 +634,7 @@ bool KURL::isEmpty() const
return (m_strPath.isEmpty() && m_strProtocol.isEmpty());
}
-void KURL::parse( const QString& _url, int encoding_hint )
+void KURL::parse( const TQString& _url, int encoding_hint )
{
if ( _url.isEmpty() || m_iUriMode == Invalid )
{
@@ -643,13 +643,13 @@ void KURL::parse( const QString& _url, int encoding_hint )
return;
}
- const QChar* buf = _url.unicode();
- const QChar* orig = buf;
+ const TQChar* buf = _url.unicode();
+ const TQChar* orig = buf;
uint len = _url.length();
uint pos = 0;
// Node 1: Accept alpha or slash
- QChar x = buf[pos++];
+ TQChar x = buf[pos++];
#ifdef Q_WS_WIN
/* win32: accept <letter>: or <letter>:/ or <letter>:\ */
const bool alpha = isalpha((int)x);
@@ -677,7 +677,7 @@ void KURL::parse( const QString& _url, int encoding_hint )
if (pos < len && buf[pos] == ':' )
{
- m_strProtocol = QString( orig, pos ).lower();
+ m_strProtocol = TQString( orig, pos ).lower();
if ( m_iUriMode == Auto )
m_iUriMode = uriModeForProtocol( m_strProtocol );
// Proceed to correct parse function.
@@ -704,10 +704,10 @@ NodeErr:
m_iUriMode = Invalid;
}
-void KURL::parseRawURI( const QString& _url, int encoding_hint )
+void KURL::parseRawURI( const TQString& _url, int encoding_hint )
{
uint len = _url.length();
- const QChar* buf = _url.unicode();
+ const TQChar* buf = _url.unicode();
uint pos = 0;
@@ -728,49 +728,49 @@ void KURL::parseRawURI( const QString& _url, int encoding_hint )
}
if ( pos == len ) // can't happen, the caller checked this already
- m_strPath = QString::null;
+ m_strPath = TQString::null;
else
- m_strPath = decode( QString( buf + pos, len - pos ), encoding_hint, true );
+ m_strPath = decode( TQString( buf + pos, len - pos ), encoding_hint, true );
m_bIsMalformed = false;
return;
}
-void KURL::parseMailto( const QString& _url, int encoding_hint )
+void KURL::parseMailto( const TQString& _url, int encoding_hint )
{
parseURL( _url, encoding_hint);
if ( m_bIsMalformed )
return;
- QRegExp mailre("(.+@)(.+)");
+ TQRegExp mailre("(.+@)(.+)");
if ( mailre.exactMatch( m_strPath ) )
{
#ifndef KDE_QT_ONLY
- QString host = KIDNA::toUnicode( mailre.cap( 2 ) );
+ TQString host = KIDNA::toUnicode( mailre.cap( 2 ) );
if (host.isEmpty())
host = mailre.cap( 2 ).lower();
#else
- QString host = mailre.cap( 2 ).lower();
+ TQString host = mailre.cap( 2 ).lower();
#endif
m_strPath = mailre.cap( 1 ) + host;
}
}
-void KURL::parseURL( const QString& _url, int encoding_hint )
+void KURL::parseURL( const TQString& _url, int encoding_hint )
{
- QString port;
+ TQString port;
bool badHostName = false;
int start = 0;
uint len = _url.length();
- const QChar* buf = _url.unicode();
+ const TQChar* buf = _url.unicode();
- QChar delim;
- QString tmp;
+ TQChar delim;
+ TQString tmp;
uint pos = 0;
// Node 1: Accept alpha or slash
- QChar x = buf[pos++];
+ TQChar x = buf[pos++];
#ifdef Q_WS_WIN
/* win32: accept <letter>: or <letter>:/ or <letter>:\ */
const bool alpha = isalpha((int)x);
@@ -827,12 +827,12 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
if (badHostName)
goto NodeErr;
- setHost(decode(QString( buf + start, pos - start ), encoding_hint));
+ setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
goto NodeOk;
}
if ( x == '@' )
{
- m_strUser = decode(QString( buf + start, pos - start ), encoding_hint);
+ m_strUser = decode(TQString( buf + start, pos - start ), encoding_hint);
pos++;
goto Node7;
}
@@ -841,13 +841,13 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
if (badHostName)
goto NodeErr;
- setHost(decode(QString( buf + start, pos - start ), encoding_hint));
+ setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
start = pos;
goto Node9;
}
else if ( x != ':' )
goto NodeErr;
- m_strUser = decode(QString( buf + start, pos - start ), encoding_hint);
+ m_strUser = decode(TQString( buf + start, pos - start ), encoding_hint);
pos++;
// Node 5: We need at least one character
@@ -869,8 +869,8 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
if (badHostName)
goto NodeErr;
setHost(m_strUser);
- m_strUser = QString::null;
- QString tmp( buf + start, pos - start );
+ m_strUser = TQString::null;
+ TQString tmp( buf + start, pos - start );
char *endptr;
m_iPort = (unsigned short int)strtol(tmp.ascii(), &endptr, 10);
if ((pos == len) && (strlen(endptr) == 0))
@@ -886,7 +886,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
start = pos;
goto Node9;
}
- m_strPass = decode(QString( buf + start, pos - start), encoding_hint);
+ m_strPass = decode(TQString( buf + start, pos - start), encoding_hint);
pos++;
// Node 7: We need at least one character
@@ -921,7 +921,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
}
if (badHostName)
goto NodeErr;
- setHost(decode(QString( buf + start, pos - start ), encoding_hint));
+ setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
if (pos < len) pos++; // Skip ']'
if (pos == len)
goto NodeOk;
@@ -946,10 +946,10 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
goto NodeErr;
if ( pos == len )
{
- setHost(decode(QString( buf + start, pos - start ), encoding_hint));
+ setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
goto NodeOk;
}
- setHost(decode(QString( buf + start, pos - start ), encoding_hint));
+ setHost(decode(TQString( buf + start, pos - start ), encoding_hint));
}
x = buf[pos];
if ( x == '/' || x == '#' || x == '?' )
@@ -970,7 +970,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
// Node 8d: Accept any amount of digits
while( pos < len && isdigit( buf[pos] ) ) pos++;
- port = QString( buf + start, pos - start );
+ port = TQString( buf + start, pos - start );
m_iPort = port.toUShort();
if ( pos == len )
goto NodeOk;
@@ -980,7 +980,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
while( pos < len && buf[pos] != '#' && buf[pos]!='?' ) pos++;
- tmp = QString( buf + start, pos - start );
+ tmp = TQString( buf + start, pos - start );
//kdDebug(126)<<" setting encoded path to:"<<tmp<<endl;
setEncodedPath( tmp, encoding_hint );
@@ -994,7 +994,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
while(pos < len && buf[pos]!=delim ) pos++;
- tmp = QString(buf + start, pos - start);
+ tmp = TQString(buf + start, pos - start);
if (delim=='#')
_setQuery(tmp, encoding_hint);
else
@@ -1004,7 +1004,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
goto NodeOk;
//Node11: // feed the rest into the remaining variable
- tmp = QString( buf + pos + 1, len - pos - 1);
+ tmp = TQString( buf + pos + 1, len - pos - 1);
if (delim == '#')
m_strRef_encoded = tmp;
else
@@ -1029,7 +1029,7 @@ void KURL::parseURL( const QString& _url, int encoding_hint )
m_iUriMode = Invalid;
}
-KURL& KURL::operator=( const QString& _url )
+KURL& KURL::operator=( const TQString& _url )
{
reset();
parse( _url );
@@ -1040,13 +1040,13 @@ KURL& KURL::operator=( const QString& _url )
KURL& KURL::operator=( const char * _url )
{
reset();
- parse( QString::fromLatin1(_url) );
+ parse( TQString::fromLatin1(_url) );
return *this;
}
#ifndef QT_NO_NETWORKPROTOCOL
-KURL& KURL::operator=( const QUrl & u )
+KURL& KURL::operator=( const TQUrl & u )
{
m_strProtocol = u.protocol();
m_iUriMode = Auto;
@@ -1054,7 +1054,7 @@ KURL& KURL::operator=( const QUrl & u )
m_strPass = u.password();
m_strHost = u.host();
m_strPath = u.path( false );
- m_strPath_encoded = QString::null;
+ m_strPath_encoded = TQString::null;
m_strQuery_encoded = u.query();
m_strRef_encoded = u.ref();
m_bIsMalformed = !u.isValid();
@@ -1145,7 +1145,7 @@ bool KURL::operator==( const KURL& _u ) const
return false;
}
-bool KURL::operator==( const QString& _u ) const
+bool KURL::operator==( const TQString& _u ) const
{
KURL u( _u );
return ( *this == u );
@@ -1163,8 +1163,8 @@ bool KURL::equals( const KURL &_u, bool ignore_trailing ) const
if ( ignore_trailing )
{
- QString path1 = path(1);
- QString path2 = _u.path(1);
+ TQString path1 = path(1);
+ TQString path2 = _u.path(1);
if ( path1 != path2 )
return false;
@@ -1199,10 +1199,10 @@ bool KURL::isParentOf( const KURL& _u ) const
if ( path().isEmpty() || _u.path().isEmpty() )
return false; // can't work with implicit paths
- QString p1( cleanpath( path(), true, false ) );
+ TQString p1( cleanpath( path(), true, false ) );
if ( p1[p1.length()-1] != '/' )
p1 += '/';
- QString p2( cleanpath( _u.path(), true, false ) );
+ TQString p2( cleanpath( _u.path(), true, false ) );
if ( p2[p2.length()-1] != '/' )
p2 += '/';
@@ -1215,18 +1215,18 @@ bool KURL::isParentOf( const KURL& _u ) const
return false;
}
-void KURL::setFileName( const QString& _txt )
+void KURL::setFileName( const TQString& _txt )
{
- m_strRef_encoded = QString::null;
+ m_strRef_encoded = TQString::null;
int i = 0;
while( _txt[i] == '/' ) ++i;
- QString tmp;
+ TQString tmp;
if ( i )
tmp = _txt.mid( i );
else
tmp = _txt;
- QString path = m_strPath_encoded.isEmpty() ? m_strPath : m_strPath_encoded;
+ TQString path = m_strPath_encoded.isEmpty() ? m_strPath : m_strPath_encoded;
if ( path.isEmpty() )
path = "/";
else
@@ -1262,9 +1262,9 @@ void KURL::cleanPath( bool cleanDirSeparator ) // taken from the old KURL
m_strPath_encoded = cleanpath(m_strPath_encoded, cleanDirSeparator, true);
}
-static QString trailingSlash( int _trailing, const QString &path )
+static TQString trailingSlash( int _trailing, const TQString &path )
{
- QString result = path;
+ TQString result = path;
if ( _trailing == 0 )
return result;
@@ -1289,7 +1289,7 @@ static QString trailingSlash( int _trailing, const QString &path )
}
else {
assert( 0 );
- return QString::null;
+ return TQString::null;
}
}
@@ -1303,9 +1303,9 @@ void KURL::adjustPath( int _trailing )
}
-QString KURL::encodedPathAndQuery( int _trailing, bool _no_empty_path, int encoding_hint ) const
+TQString KURL::encodedPathAndQuery( int _trailing, bool _no_empty_path, int encoding_hint ) const
{
- QString tmp;
+ TQString tmp;
if (!m_strPath_encoded.isEmpty() && encoding_hint == 0)
{
tmp = trailingSlash( _trailing, m_strPath_encoded );
@@ -1331,27 +1331,27 @@ QString KURL::encodedPathAndQuery( int _trailing, bool _no_empty_path, int encod
return tmp;
}
-void KURL::setEncodedPath( const QString& _txt, int encoding_hint )
+void KURL::setEncodedPath( const TQString& _txt, int encoding_hint )
{
m_strPath_encoded = _txt;
decode( m_strPath_encoded, m_strPath, m_strPath_encoded, encoding_hint );
// Throw away encoding for local files, makes file-operations faster.
if (m_strProtocol == fileProt)
- m_strPath_encoded = QString::null;
+ m_strPath_encoded = TQString::null;
if ( m_iUriMode == Auto )
m_iUriMode = URL;
}
-void KURL::setEncodedPathAndQuery( const QString& _txt, int encoding_hint )
+void KURL::setEncodedPathAndQuery( const TQString& _txt, int encoding_hint )
{
int pos = _txt.find( '?' );
if ( pos == -1 )
{
setEncodedPath(_txt, encoding_hint);
- m_strQuery_encoded = QString::null;
+ m_strQuery_encoded = TQString::null;
}
else
{
@@ -1360,7 +1360,7 @@ void KURL::setEncodedPathAndQuery( const QString& _txt, int encoding_hint )
}
}
-QString KURL::path( int _trailing ) const
+TQString KURL::path( int _trailing ) const
{
return trailingSlash( _trailing, path() );
}
@@ -1384,21 +1384,21 @@ bool KURL::isLocalFile() const
return (m_strHost == hostname);
}
-void KURL::setFileEncoding(const QString &encoding)
+void KURL::setFileEncoding(const TQString &encoding)
{
if (!isLocalFile())
return;
- QString q = query();
+ TQString q = query();
if (!q.isEmpty() && (q[0] == '?'))
q = q.mid(1);
- QStringList args = QStringList::split('&', q);
- for(QStringList::Iterator it = args.begin();
+ TQStringList args = TQStringList::split('&', q);
+ for(TQStringList::Iterator it = args.begin();
it != args.end();)
{
- QString s = decode_string(*it);
+ TQString s = decode_string(*it);
if (s.startsWith("charset="))
it = args.erase(it);
else
@@ -1408,34 +1408,34 @@ void KURL::setFileEncoding(const QString &encoding)
args.append("charset="+encode_string(encoding));
if (args.isEmpty())
- _setQuery(QString::null);
+ _setQuery(TQString::null);
else
_setQuery(args.join("&"));
}
-QString KURL::fileEncoding() const
+TQString KURL::fileEncoding() const
{
if (!isLocalFile())
- return QString::null;
+ return TQString::null;
- QString q = query();
+ TQString q = query();
if (q.isEmpty())
- return QString::null;
+ return TQString::null;
if (q[0] == '?')
q = q.mid(1);
- QStringList args = QStringList::split('&', q);
- for(QStringList::ConstIterator it = args.begin();
+ TQStringList args = TQStringList::split('&', q);
+ for(TQStringList::ConstIterator it = args.begin();
it != args.end();
++it)
{
- QString s = decode_string(*it);
+ TQString s = decode_string(*it);
if (s.startsWith("charset="))
return s.mid(8);
}
- return QString::null;
+ return TQString::null;
}
bool KURL::hasSubURL() const
@@ -1461,7 +1461,7 @@ bool KURL::hasSubURL() const
return false;
}
-QString KURL::url( int _trailing, int encoding_hint ) const
+TQString KURL::url( int _trailing, int encoding_hint ) const
{
if( m_bIsMalformed )
{
@@ -1471,7 +1471,7 @@ QString KURL::url( int _trailing, int encoding_hint ) const
return m_strProtocol;
}
- QString u = m_strProtocol;
+ TQString u = m_strProtocol;
if (!u.isEmpty())
u += ":";
@@ -1496,7 +1496,7 @@ QString KURL::url( int _trailing, int encoding_hint ) const
else
u += encodeHost(m_strHost, true, encoding_hint);
if ( m_iPort != 0 ) {
- QString buffer;
+ TQString buffer;
buffer.sprintf( ":%u", m_iPort );
u += buffer;
}
@@ -1521,7 +1521,7 @@ QString KURL::url( int _trailing, int encoding_hint ) const
return u;
}
-QString KURL::prettyURL( int _trailing ) const
+TQString KURL::prettyURL( int _trailing ) const
{
if( m_bIsMalformed )
{
@@ -1531,7 +1531,7 @@ QString KURL::prettyURL( int _trailing ) const
return m_strProtocol;
}
- QString u = m_strProtocol;
+ TQString u = m_strProtocol;
if (!u.isEmpty())
u += ":";
@@ -1561,7 +1561,7 @@ QString KURL::prettyURL( int _trailing ) const
u += lazy_encode(m_strHost);
}
if ( m_iPort != 0 ) {
- QString buffer;
+ TQString buffer;
buffer.sprintf( ":%u", m_iPort );
u += buffer;
}
@@ -1588,19 +1588,19 @@ QString KURL::prettyURL( int _trailing ) const
return u;
}
-QString KURL::prettyURL( int _trailing, AdjustementFlags _flags) const
+TQString KURL::prettyURL( int _trailing, AdjustementFlags _flags) const
{
- QString u = prettyURL(_trailing);
+ TQString u = prettyURL(_trailing);
if (_flags & StripFileProtocol && u.startsWith("file://")) {
u.remove(0, 7);
#ifdef Q_WS_WIN
- return QDir::convertSeparators(u);
+ return TQDir::convertSeparators(u);
#endif
}
return u;
}
-QString KURL::pathOrURL() const
+TQString KURL::pathOrURL() const
{
if ( isLocalFile() && m_strRef_encoded.isNull() && m_strQuery_encoded.isNull() ) {
return path();
@@ -1609,21 +1609,21 @@ QString KURL::pathOrURL() const
}
}
-QString KURL::htmlURL() const
+TQString KURL::htmlURL() const
{
- return QStyleSheet::escape(prettyURL());
+ return TQStyleSheet::escape(prettyURL());
}
KURL::List KURL::split( const KURL& _url )
{
- QString ref;
+ TQString ref;
KURL::List lst;
KURL url = _url;
while(true)
{
KURL u = url;
- u.m_strRef_encoded = QString::null;
+ u.m_strRef_encoded = TQString::null;
lst.append(u);
if (url.hasSubURL())
{
@@ -1646,7 +1646,7 @@ KURL::List KURL::split( const KURL& _url )
return lst;
}
-KURL::List KURL::split( const QString& _url )
+KURL::List KURL::split( const TQString& _url )
{
return split(KURL(_url));
}
@@ -1671,15 +1671,15 @@ KURL KURL::join( const KURL::List & lst )
return tmp;
}
-QString KURL::fileName( bool _strip_trailing_slash ) const
+TQString KURL::fileName( bool _strip_trailing_slash ) const
{
- QString fname;
+ TQString fname;
if (hasSubURL()) { // If we have a suburl, then return the filename from there
KURL::List list = KURL::split(*this);
KURL::List::Iterator it = list.fromLast();
return (*it).fileName(_strip_trailing_slash);
}
- const QString &path = m_strPath;
+ const TQString &path = m_strPath;
int len = path.length();
if ( len == 0 )
@@ -1705,7 +1705,7 @@ QString KURL::fileName( bool _strip_trailing_slash ) const
// Count in the encoded string how many encoded slashes follow the last
// unencoded one.
int i = m_strPath_encoded.findRev( '/', len - 1 );
- QString fileName_encoded = m_strPath_encoded.mid(i+1);
+ TQString fileName_encoded = m_strPath_encoded.mid(i+1);
n += fileName_encoded.contains("%2f", false);
}
int i = len;
@@ -1730,7 +1730,7 @@ QString KURL::fileName( bool _strip_trailing_slash ) const
return fname;
}
-void KURL::addPath( const QString& _txt )
+void KURL::addPath( const TQString& _txt )
{
if (hasSubURL())
{
@@ -1741,7 +1741,7 @@ void KURL::addPath( const QString& _txt )
return;
}
- m_strPath_encoded = QString::null;
+ m_strPath_encoded = TQString::null;
if ( _txt.isEmpty() )
return;
@@ -1763,10 +1763,10 @@ void KURL::addPath( const QString& _txt )
m_strPath += _txt.mid( i );
}
-QString KURL::directory( bool _strip_trailing_slash_from_result,
+TQString KURL::directory( bool _strip_trailing_slash_from_result,
bool _ignore_trailing_slash_in_path ) const
{
- QString result = m_strPath_encoded.isEmpty() ? m_strPath : m_strPath_encoded;
+ TQString result = m_strPath_encoded.isEmpty() ? m_strPath : m_strPath_encoded;
if ( _ignore_trailing_slash_in_path )
result = trailingSlash( -1, result );
@@ -1777,7 +1777,7 @@ QString KURL::directory( bool _strip_trailing_slash_from_result,
// If ( i == -1 ) => the first character is not a '/'
// So it's some URL like file:blah.tgz, with no path
if ( i == -1 )
- return QString::null;
+ return TQString::null;
if ( i == 0 )
{
@@ -1797,7 +1797,7 @@ QString KURL::directory( bool _strip_trailing_slash_from_result,
}
-bool KURL::cd( const QString& _dir )
+bool KURL::cd( const TQString& _dir )
{
if ( _dir.isEmpty() || m_bIsMalformed )
return false;
@@ -1814,22 +1814,22 @@ bool KURL::cd( const QString& _dir )
// absolute path ?
if ( _dir[0] == '/' )
{
- m_strPath_encoded = QString::null;
+ m_strPath_encoded = TQString::null;
m_strPath = _dir;
- setHTMLRef( QString::null );
- m_strQuery_encoded = QString::null;
+ setHTMLRef( TQString::null );
+ m_strQuery_encoded = TQString::null;
return true;
}
// Users home directory on the local disk ?
if ( ( _dir[0] == '~' ) && ( m_strProtocol == fileProt ))
{
- m_strPath_encoded = QString::null;
- m_strPath = QDir::homeDirPath();
+ m_strPath_encoded = TQString::null;
+ m_strPath = TQDir::homeDirPath();
m_strPath += "/";
m_strPath += _dir.right(m_strPath.length() - 1);
- setHTMLRef( QString::null );
- m_strQuery_encoded = QString::null;
+ setHTMLRef( TQString::null );
+ m_strQuery_encoded = TQString::null;
return true;
}
@@ -1838,13 +1838,13 @@ bool KURL::cd( const QString& _dir )
// Sub URLs are not touched.
// append '/' if necessary
- QString p = path(1);
+ TQString p = path(1);
p += _dir;
p = cleanpath( p, true, false );
setPath( p );
- setHTMLRef( QString::null );
- m_strQuery_encoded = QString::null;
+ setHTMLRef( TQString::null );
+ m_strQuery_encoded = TQString::null;
return true;
}
@@ -1854,7 +1854,7 @@ KURL KURL::upURL( ) const
if (!query().isEmpty())
{
KURL u(*this);
- u._setQuery(QString::null);
+ u._setQuery(TQString::null);
return u;
};
@@ -1874,7 +1874,7 @@ KURL KURL::upURL( ) const
while (true)
{
KURL &u = lst.last();
- QString old = u.path();
+ TQString old = u.path();
u.cd("../");
if (u.path() != old)
break; // Finshed.
@@ -1885,7 +1885,7 @@ KURL KURL::upURL( ) const
return join( lst );
}
-QString KURL::htmlRef() const
+TQString KURL::htmlRef() const
{
if ( !hasSubURL() )
{
@@ -1896,7 +1896,7 @@ QString KURL::htmlRef() const
return decode( (*lst.begin()).ref() );
}
-QString KURL::encodedHtmlRef() const
+TQString KURL::encodedHtmlRef() const
{
if ( !hasSubURL() )
{
@@ -1907,7 +1907,7 @@ QString KURL::encodedHtmlRef() const
return (*lst.begin()).ref();
}
-void KURL::setHTMLRef( const QString& _ref )
+void KURL::setHTMLRef( const TQString& _ref )
{
if ( !hasSubURL() )
{
@@ -1934,7 +1934,7 @@ bool KURL::hasHTMLRef() const
}
void
-KURL::setProtocol( const QString& _txt )
+KURL::setProtocol( const TQString& _txt )
{
m_strProtocol = _txt;
if ( m_iUriMode == Auto ) m_iUriMode = uriModeForProtocol( m_strProtocol );
@@ -1942,25 +1942,25 @@ KURL::setProtocol( const QString& _txt )
}
void
-KURL::setUser( const QString& _txt )
+KURL::setUser( const TQString& _txt )
{
if ( _txt.isEmpty() )
- m_strUser = QString::null;
+ m_strUser = TQString::null;
else
m_strUser = _txt;
}
void
-KURL::setPass( const QString& _txt )
+KURL::setPass( const TQString& _txt )
{
if ( _txt.isEmpty() )
- m_strPass = QString::null;
+ m_strPass = TQString::null;
else
m_strPass = _txt;
}
void
-KURL::setHost( const QString& _txt )
+KURL::setHost( const TQString& _txt )
{
if ( m_iUriMode == Auto )
m_iUriMode = URL;
@@ -1987,7 +1987,7 @@ KURL::setPort( unsigned short int _p )
m_iPort = _p;
}
-void KURL::setPath( const QString & path )
+void KURL::setPath( const TQString & path )
{
if (isEmpty())
m_bIsMalformed = false;
@@ -1996,12 +1996,12 @@ void KURL::setPath( const QString & path )
m_strProtocol = fileProt;
}
m_strPath = path;
- m_strPath_encoded = QString::null;
+ m_strPath_encoded = TQString::null;
if ( m_iUriMode == Auto )
m_iUriMode = URL;
}
-void KURL::setDirectory( const QString &dir)
+void KURL::setDirectory( const TQString &dir)
{
if ( dir.endsWith("/"))
setPath(dir);
@@ -2009,7 +2009,7 @@ void KURL::setDirectory( const QString &dir)
setPath(dir+"/");
}
-void KURL::setQuery( const QString &_txt, int encoding_hint)
+void KURL::setQuery( const TQString &_txt, int encoding_hint)
{
if (_txt[0] == '?')
_setQuery( _txt.length() > 1 ? _txt.mid(1) : "" /*empty, not null*/, encoding_hint );
@@ -2018,7 +2018,7 @@ void KURL::setQuery( const QString &_txt, int encoding_hint)
}
// This is a private function that expects a query without '?'
-void KURL::_setQuery( const QString &_txt, int encoding_hint)
+void KURL::_setQuery( const TQString &_txt, int encoding_hint)
{
m_strQuery_encoded = _txt;
if (!_txt.length())
@@ -2026,7 +2026,7 @@ void KURL::_setQuery( const QString &_txt, int encoding_hint)
int l = m_strQuery_encoded.length();
int i = 0;
- QString result;
+ TQString result;
while (i < l)
{
int s = i;
@@ -2042,8 +2042,8 @@ void KURL::_setQuery( const QString &_txt, int encoding_hint)
}
if (i > s)
{
- QString tmp = m_strQuery_encoded.mid(s, i-s);
- QString newTmp;
+ TQString tmp = m_strQuery_encoded.mid(s, i-s);
+ TQString newTmp;
decode( tmp, newTmp, tmp, encoding_hint, false );
result += tmp;
}
@@ -2056,29 +2056,29 @@ void KURL::_setQuery( const QString &_txt, int encoding_hint)
m_strQuery_encoded = result;
}
-QString KURL::query() const
+TQString KURL::query() const
{
if (m_strQuery_encoded.isNull())
- return QString::null;
+ return TQString::null;
return '?'+m_strQuery_encoded;
}
-QString KURL::decode_string(const QString &str, int encoding_hint)
+TQString KURL::decode_string(const TQString &str, int encoding_hint)
{
return decode(str, encoding_hint);
}
-QString KURL::encode_string(const QString &str, int encoding_hint)
+TQString KURL::encode_string(const TQString &str, int encoding_hint)
{
return encode(str, 1, encoding_hint);
}
-QString KURL::encode_string_no_slash(const QString &str, int encoding_hint)
+TQString KURL::encode_string_no_slash(const TQString &str, int encoding_hint)
{
return encode(str, 0, encoding_hint);
}
-bool urlcmp( const QString& _url1, const QString& _url2 )
+bool urlcmp( const TQString& _url1, const TQString& _url2 )
{
// Both empty ?
if ( _url1.isEmpty() && _url2.isEmpty() )
@@ -2097,7 +2097,7 @@ bool urlcmp( const QString& _url1, const QString& _url2 )
return ( list1 == list2 );
}
-bool urlcmp( const QString& _url1, const QString& _url2, bool _ignore_trailing, bool _ignore_ref )
+bool urlcmp( const TQString& _url1, const TQString& _url2, bool _ignore_trailing, bool _ignore_ref )
{
// Both empty ?
if ( _url1.isEmpty() && _url2.isEmpty() )
@@ -2119,8 +2119,8 @@ bool urlcmp( const QString& _url1, const QString& _url2, bool _ignore_trailing,
if ( _ignore_ref )
{
- (*list1.begin()).setRef(QString::null);
- (*list2.begin()).setRef(QString::null);
+ (*list1.begin()).setRef(TQString::null);
+ (*list2.begin()).setRef(TQString::null);
}
KURL::List::Iterator it1 = list1.begin();
@@ -2132,84 +2132,84 @@ bool urlcmp( const QString& _url1, const QString& _url2, bool _ignore_trailing,
return true;
}
-QMap< QString, QString > KURL::queryItems( int options ) const {
+TQMap< TQString, TQString > KURL::queryItems( int options ) const {
return queryItems(options, 0);
}
-QMap< QString, QString > KURL::queryItems( int options, int encoding_hint ) const {
+TQMap< TQString, TQString > KURL::queryItems( int options, int encoding_hint ) const {
if ( m_strQuery_encoded.isEmpty() )
- return QMap<QString,QString>();
+ return TQMap<TQString,TQString>();
- QMap< QString, QString > result;
- QStringList items = QStringList::split( '&', m_strQuery_encoded );
- for ( QStringList::const_iterator it = items.begin() ; it != items.end() ; ++it ) {
+ TQMap< TQString, TQString > result;
+ TQStringList items = TQStringList::split( '&', m_strQuery_encoded );
+ for ( TQStringList::const_iterator it = items.begin() ; it != items.end() ; ++it ) {
int equal_pos = (*it).find( '=' );
if ( equal_pos > 0 ) { // = is not the first char...
- QString name = (*it).left( equal_pos );
+ TQString name = (*it).left( equal_pos );
if ( options & CaseInsensitiveKeys )
name = name.lower();
- QString value = (*it).mid( equal_pos + 1 );
+ TQString value = (*it).mid( equal_pos + 1 );
if ( value.isEmpty() )
- result.insert( name, QString::fromLatin1("") );
+ result.insert( name, TQString::fromLatin1("") );
else {
// ### why is decoding name not necessary?
value.replace( '+', ' ' ); // + in queries means space
result.insert( name, decode_string( value, encoding_hint ) );
}
} else if ( equal_pos < 0 ) { // no =
- QString name = (*it);
+ TQString name = (*it);
if ( options & CaseInsensitiveKeys )
name = name.lower();
- result.insert( name, QString::null );
+ result.insert( name, TQString::null );
}
}
return result;
}
-QString KURL::queryItem( const QString& _item ) const
+TQString KURL::queryItem( const TQString& _item ) const
{
return queryItem( _item, 0 );
}
-QString KURL::queryItem( const QString& _item, int encoding_hint ) const
+TQString KURL::queryItem( const TQString& _item, int encoding_hint ) const
{
- QString item = _item + '=';
+ TQString item = _item + '=';
if ( m_strQuery_encoded.length() <= 1 )
- return QString::null;
+ return TQString::null;
- QStringList items = QStringList::split( '&', m_strQuery_encoded );
+ TQStringList items = TQStringList::split( '&', m_strQuery_encoded );
unsigned int _len = item.length();
- for ( QStringList::ConstIterator it = items.begin(); it != items.end(); ++it )
+ for ( TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it )
{
if ( (*it).startsWith( item ) )
{
if ( (*it).length() > _len )
{
- QString str = (*it).mid( _len );
+ TQString str = (*it).mid( _len );
str.replace( '+', ' ' ); // + in queries means space.
return decode_string( str, encoding_hint );
}
else // empty value
- return QString::fromLatin1("");
+ return TQString::fromLatin1("");
}
}
- return QString::null;
+ return TQString::null;
}
-void KURL::removeQueryItem( const QString& _item )
+void KURL::removeQueryItem( const TQString& _item )
{
- QString item = _item + '=';
+ TQString item = _item + '=';
if ( m_strQuery_encoded.length() <= 1 )
return;
- QStringList items = QStringList::split( '&', m_strQuery_encoded );
- for ( QStringList::Iterator it = items.begin(); it != items.end(); )
+ TQStringList items = TQStringList::split( '&', m_strQuery_encoded );
+ for ( TQStringList::Iterator it = items.begin(); it != items.end(); )
{
if ( (*it).startsWith( item ) || (*it == _item) )
{
- QStringList::Iterator deleteIt = it;
+ TQStringList::Iterator deleteIt = it;
++it;
items.remove(deleteIt);
}
@@ -2221,10 +2221,10 @@ void KURL::removeQueryItem( const QString& _item )
m_strQuery_encoded = items.join( "&" );
}
-void KURL::addQueryItem( const QString& _item, const QString& _value, int encoding_hint )
+void KURL::addQueryItem( const TQString& _item, const TQString& _value, int encoding_hint )
{
- QString item = _item + '=';
- QString value = encode( _value, 0, encoding_hint );
+ TQString item = _item + '=';
+ TQString value = encode( _value, 0, encoding_hint );
if (!m_strQuery_encoded.isEmpty())
m_strQuery_encoded += '&';
@@ -2232,13 +2232,13 @@ void KURL::addQueryItem( const QString& _item, const QString& _value, int encodi
}
// static
-KURL KURL::fromPathOrURL( const QString& text )
+KURL KURL::fromPathOrURL( const TQString& text )
{
if ( text.isEmpty() )
return KURL();
KURL url;
- if (!QDir::isRelativePath(text))
+ if (!TQDir::isRelativePath(text))
url.setPath( text );
else
url = text;
@@ -2246,10 +2246,10 @@ KURL KURL::fromPathOrURL( const QString& text )
return url;
}
-static QString _relativePath(const QString &base_dir, const QString &path, bool &isParent)
+static TQString _relativePath(const TQString &base_dir, const TQString &path, bool &isParent)
{
- QString _base_dir(QDir::cleanDirPath(base_dir));
- QString _path(QDir::cleanDirPath(path.isEmpty() || (path[0] != '/') ? _base_dir+"/"+path : path));
+ TQString _base_dir(TQDir::cleanDirPath(base_dir));
+ TQString _path(TQDir::cleanDirPath(path.isEmpty() || (path[0] != '/') ? _base_dir+"/"+path : path));
if (_base_dir.isEmpty())
return _path;
@@ -2257,15 +2257,15 @@ static QString _relativePath(const QString &base_dir, const QString &path, bool
if (_base_dir[_base_dir.length()-1] != '/')
_base_dir.append('/');
- QStringList list1 = QStringList::split('/', _base_dir);
- QStringList list2 = QStringList::split('/', _path);
+ TQStringList list1 = TQStringList::split('/', _base_dir);
+ TQStringList list2 = TQStringList::split('/', _path);
// Find where they meet
uint level = 0;
uint maxLevel = QMIN(list1.count(), list2.count());
while((level < maxLevel) && (list1[level] == list2[level])) level++;
- QString result;
+ TQString result;
// Need to go down out of the first path to the common branch.
for(uint i = level; i < list1.count(); i++)
result.append("../");
@@ -2282,10 +2282,10 @@ static QString _relativePath(const QString &base_dir, const QString &path, bool
return result;
}
-QString KURL::relativePath(const QString &base_dir, const QString &path, bool *isParent)
+TQString KURL::relativePath(const TQString &base_dir, const TQString &path, bool *isParent)
{
bool parent = false;
- QString result = _relativePath(base_dir, path, parent);
+ TQString result = _relativePath(base_dir, path, parent);
if (parent)
result.prepend("./");
@@ -2296,7 +2296,7 @@ QString KURL::relativePath(const QString &base_dir, const QString &path, bool *i
}
-QString KURL::relativeURL(const KURL &base_url, const KURL &url, int encoding_hint)
+TQString KURL::relativeURL(const KURL &base_url, const KURL &url, int encoding_hint)
{
if ((url.protocol() != base_url.protocol()) ||
(url.host() != base_url.host()) ||
@@ -2307,12 +2307,12 @@ QString KURL::relativeURL(const KURL &base_url, const KURL &url, int encoding_hi
return url.url(0, encoding_hint);
}
- QString relURL;
+ TQString relURL;
if ((base_url.path() != url.path()) || (base_url.query() != url.query()))
{
bool dummy;
- QString basePath = base_url.directory(false, false);
+ TQString basePath = base_url.directory(false, false);
relURL = encode( _relativePath(basePath, url.path(), dummy), 1, encoding_hint);
relURL += url.query();
}
@@ -2334,7 +2334,7 @@ int KURL::uriMode() const
return m_iUriMode;
}
-KURL::URIMode KURL::uriModeForProtocol(const QString& protocol)
+KURL::URIMode KURL::uriModeForProtocol(const TQString& protocol)
{
#ifndef KDE_QT_ONLY
KURL::URIMode mode = Auto;
diff --git a/kdecore/kurl.h b/kdecore/kurl.h
index d637d620c..62c4861ff 100644
--- a/kdecore/kurl.h
+++ b/kdecore/kurl.h
@@ -20,8 +20,8 @@
#ifndef __kurl_h__
#define __kurl_h__
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
class QUrl;
@@ -52,16 +52,16 @@ class KURLPrivate;
* the position within a document)
* - space -> "%20"
*
- * The constructor KURL(const QString&) expects a string properly escaped,
+ * The constructor KURL(const TQString&) expects a string properly escaped,
* or at least non-ambiguous.
* For instance a local file or directory <tt>"/bar/#foo#"</tt> would have the
* URL <tt>"file:///bar/%23foo%23"</tt>.
* If you have the absolute path and need the URL-escaping you should create
- * KURL via the default-constructor and then call setPath(const QString&):
+ * KURL via the default-constructor and then call setPath(const TQString&):
* @code
* KURL kurl;
* kurl.setPath( "/bar/#foo#" );
- * QString url = kurl.url(); // -> "file:///bar/%23foo%23"
+ * TQString url = kurl.url(); // -> "file:///bar/%23foo%23"
* @endcode
*
* If you have the URL of a local file or directory and need the absolute path,
@@ -70,7 +70,7 @@ class KURLPrivate;
* KURL url( "file:///bar/%23foo%23" );
* ...
* if ( url.isLocalFile() )
- * QString path = url.path(); // -> "/bar/#foo#"
+ * TQString path = url.path(); // -> "/bar/#foo#"
* @endcode
*
* The other way round: if the user can enter a string, that can be either a
@@ -85,18 +85,18 @@ class KURLPrivate;
*
* Wrong:
* @code
- * QString dirUrl = "file:///bar/";
- * QString fileName = "#foo#";
- * QString invalidURL = dirUrl + fileName; // -> "file:///bar/#foo#" won't behave like you would expect.
+ * TQString dirUrl = "file:///bar/";
+ * TQString fileName = "#foo#";
+ * TQString invalidURL = dirUrl + fileName; // -> "file:///bar/#foo#" won't behave like you would expect.
* @endcode
* Instead you should use addPath().
*
* Right:
* @code
* KURL url( "file:///bar/" );
- * QString fileName = "#foo#";
+ * TQString fileName = "#foo#";
* url.addPath( fileName );
- * QString validURL = url.url(); // -> "file:///bar/%23foo%23"
+ * TQString validURL = url.url(); // -> "file:///bar/%23foo%23"
* @endcode
*
* Also consider that some URLs contain the password, but this shouldn't be
@@ -105,7 +105,7 @@ class KURLPrivate;
*
* @code
* KURL url( "ftp://name:password@ftp.faraway.org/bar/%23foo%23");
- * QString visibleURL = url.prettyURL(); // -> "ftp://name@ftp.faraway.org/bar/%23foo%23"
+ * TQString visibleURL = url.prettyURL(); // -> "ftp://name@ftp.faraway.org/bar/%23foo%23"
* @endcode
* Note that prettyURL() doesn't change the character escapes (like <tt>"%23"</tt>).
* Otherwise the URL would be invalid and the user wouldn't be able to use it in another
@@ -179,12 +179,12 @@ public:
};
/**
- * KURL::List is a QValueList that contains KURLs with a few
+ * KURL::List is a TQValueList that contains KURLs with a few
* convenience methods.
* @see KURL
* @see QValueList
*/
- class KDECORE_EXPORT List : public QValueList<KURL>
+ class KDECORE_EXPORT List : public TQValueList<KURL>
{
public:
/**
@@ -207,9 +207,9 @@ public:
*
* @param list the list containing the URLs as strings
*
- * @see KURL(const QString &, int)
+ * @see KURL(const TQString &, int)
*/
- List(const QStringList &list);
+ List(const TQStringList &list);
/**
* @brief Converts the URLs of this list to a list of strings
*
@@ -223,7 +223,7 @@ public:
*
* @see KURL::url()
*/
- QStringList toStringList() const;
+ TQStringList toStringList() const;
};
/**
* @brief Constructs an empty URL
@@ -253,11 +253,11 @@ public:
* @param url a URL, not a filename. If the URL does not have a protocol
* part, @c "file:" is assumed
* @param encoding_hint MIB of original encoding of URL.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see fromPathOrURL()
*/
- KURL( const QString& url, int encoding_hint = 0 );
+ KURL( const TQString& url, int encoding_hint = 0 );
/**
* @brief Constructor taking an URL encoded in a C string
*
@@ -278,16 +278,16 @@ public:
* @param url an encoded URL. If the URL does not have a protocol part,
* @c "file:" is assumed
* @param encoding_hint MIB of original encoding of URL.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see fromPathOrURL()
- * @see QString::fromLatin1()
+ * @see TQString::fromLatin1()
*/
KURL( const char * url, int encoding_hint = 0 );
/**
* @brief Constructor taking an URL encoded in a QCString
*
- * Constructor taking a QCString @p url, which is an @em encoded
+ * Constructor taking a TQCString @p url, which is an @em encoded
* representation of the URL, exactly like the usual constructor. This is
* useful when the URL, in its encoded form, is strictly ASCII.
*
@@ -304,12 +304,12 @@ public:
* @param url A encoded URL. If the URL does not have a protocol part,
* @c "file:" is assumed
* @param encoding_hint MIB of original encoding of URL.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see fromPathOrURL()
- * @see QString::fromLatin1()
+ * @see TQString::fromLatin1()
*/
- KURL( const QCString& url, int encoding_hint = 0 );
+ KURL( const TQCString& url, int encoding_hint = 0 );
/**
* @brief Copy constructor
@@ -324,7 +324,7 @@ public:
*
* @param u the QUrl
*/
- KURL( const QUrl &u );
+ KURL( const TQUrl &u );
/**
* @brief Constructor allowing relative URLs
*
@@ -346,11 +346,11 @@ public:
* So do NOT pass a path here (use setPath() or addPath() or
* fromPathOrURL() instead)
* @param encoding_hint MIB of original encoding of URL.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see fromPathOrURL()
*/
- KURL( const KURL& _baseurl, const QString& _rel_url, int encoding_hint=0 );
+ KURL( const KURL& _baseurl, const TQString& _rel_url, int encoding_hint=0 );
/**
* @brief Returns the protocol for the URL
@@ -359,12 +359,12 @@ public:
* @c "mailto:" and other pseudo protocols.
*
* @return the protocol of the URL, does not include the colon. If the
- * URL is malformed, @c QString::null will be returned
+ * URL is malformed, @c TQString::null will be returned
*
* @see setProtocol()
* @see isValid()
*/
- QString protocol() const { return m_bIsMalformed ? QString::null : m_strProtocol; }
+ TQString protocol() const { return m_bIsMalformed ? TQString::null : m_strProtocol; }
/**
* @brief Sets the protocol for the URL
*
@@ -375,7 +375,7 @@ public:
*
* @see protocol()
*/
- void setProtocol( const QString& _txt );
+ void setProtocol( const TQString& _txt );
/**
* @brief Returns the URI processing mode for the URL
@@ -393,12 +393,12 @@ public:
* @brief Returns the decoded user name (login, user id, etc) included in
* the URL
*
- * @return the user name or @c QString::null if there is no user name
+ * @return the user name or @c TQString::null if there is no user name
*
* @see setUser()
* @see hasUser()
*/
- QString user() const { return m_strUser; }
+ TQString user() const { return m_strUser; }
/**
* @brief Sets the user name (login, user id, etc) to include in the URL
*
@@ -406,13 +406,13 @@ public:
* If there is a password associated with the user, it can be set using
* setPass().
*
- * @param _txt the name of the user or @c QString::null to remove the user
+ * @param _txt the name of the user or @c TQString::null to remove the user
*
* @see user()
* @see hasUser()
* @see hasPass()
*/
- void setUser( const QString& _txt );
+ void setUser( const TQString& _txt );
/**
* @brief Tests if this URL has a user name included in it
*
@@ -431,13 +431,13 @@ public:
* @note a password can only appear in a URL string if you also set
* a user, see setUser().
*
- * @return the password or @c QString::null if it does not exist
+ * @return the password or @c TQString::null if it does not exist
*
* @see setPass()
* @see hasPass()
* @see hasUser()
*/
- QString pass() const { return m_strPass; }
+ TQString pass() const { return m_strPass; }
/**
* @brief Sets the password (corresponding to user()) to include in the URL
*
@@ -445,13 +445,13 @@ public:
* @note a password can only appear in a URL string if you also set
* a user, see setUser().
*
- * @param _txt the password to set or @c QString::null to remove the password
+ * @param _txt the password to set or @c TQString::null to remove the password
*
* @see pass()
* @see hasPass()
* @see hasUser()
*/
- void setPass( const QString& _txt );
+ void setPass( const TQString& _txt );
/**
* @brief Tests if this URL has a password included in it
*
@@ -469,24 +469,24 @@ public:
/**
* @brief Returns the decoded hostname included in the URL
*
- * @return the name of the host or @c QString::null if no host is set
+ * @return the name of the host or @c TQString::null if no host is set
*
* @see setHost()
* @see hasHost()
*/
- QString host() const { return m_strHost; }
+ TQString host() const { return m_strHost; }
/**
* @brief Sets the hostname to include in the URL
*
* Special characters in the hostname will appear encoded in the URL.
*
- * @param _txt the new name of the host or QString::null to remove the host
+ * @param _txt the new name of the host or TQString::null to remove the host
*
* @see host()
* @see hasHost()
*/
- void setHost( const QString& _txt );
+ void setHost( const TQString& _txt );
/**
* @brief Tests if this URL has a hostname included in it
*
@@ -522,14 +522,14 @@ public:
*
* This does @em not include the query.
*
- * @return the path of the URL (without query), or @c QString::null if no
+ * @return the path of the URL (without query), or @c TQString::null if no
* path is set
*
* @see path(int)
* @see setPath()
* @see hasPath()
*/
- QString path() const { return m_strPath; }
+ TQString path() const { return m_strPath; }
/**
* @brief Returns the current decoded path
@@ -552,7 +552,7 @@ public:
* @c '/', @c +1 adds a trailing @c '/' if there is none yet
* and @c 0 returns the path unchanged
*
- * @return the path of the URL (without query), or @c QString::null if no
+ * @return the path of the URL (without query), or @c TQString::null if no
* path is set
*
* @see path()
@@ -560,7 +560,7 @@ public:
* @see hasPath()
* @see adjustPath()
*/
- QString path( int _trailing ) const;
+ TQString path( int _trailing ) const;
/**
* @brief Sets the decoded path of the URL
@@ -572,13 +572,13 @@ public:
* beginning of the query part. Something that might look encoded,
* like @c "%3f" will not become decoded.
*
- * @param path the new, decoded, path or @c QString::null to remove the path
+ * @param path the new, decoded, path or @c TQString::null to remove the path
*
* @see path()
* @see path(int)
* @see hasPath()
*/
- void setPath( const QString& path );
+ void setPath( const TQString& path );
/**
* @brief Tests if this URL has a path included in it
@@ -638,25 +638,25 @@ public:
*
* @param _txt the new encoded path and encoded query
* @param encoding_hint MIB of original encoding of @p _txt .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see encodedPathAndQuery()
* @see setPath()
* @see setQuery()
*/
- void setEncodedPathAndQuery( const QString& _txt, int encoding_hint = 0 );
+ void setEncodedPathAndQuery( const TQString& _txt, int encoding_hint = 0 );
/**
* @brief Sets the (already encoded) path of the URL
*
* @param _txt the new encoded path
* @param encoding_hint MIB of original encoding of @p _txt .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see setEncodedPathAndQuery()
* @see setPath()
*/
- void setEncodedPath(const QString& _txt, int encoding_hint = 0 );
+ void setEncodedPath(const TQString& _txt, int encoding_hint = 0 );
/**
* @brief Returns the encoded path and the query
@@ -679,7 +679,7 @@ public:
* @param _no_empty_path if set to @c true then an empty path is substituted
* by @c "/"
* @param encoding_hint MIB of desired encoding of URL.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @return the concatenation of the encoded path , @c '?' and the
* encoded query
@@ -688,7 +688,7 @@ public:
* @see path()
* @see query()
*/
- QString encodedPathAndQuery( int _trailing = 0, bool _no_empty_path = false, int encoding_hint = 0) const;
+ TQString encodedPathAndQuery( int _trailing = 0, bool _no_empty_path = false, int encoding_hint = 0) const;
/**
* @brief Sets the encoded query of the URL
@@ -699,11 +699,11 @@ public:
* the query may contain the @c '0' character
*
* @param encoding_hint MIB of the encoding. Reserved, should be @c 0 .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see query()
*/
- void setQuery( const QString& _txt, int encoding_hint = 0);
+ void setQuery( const TQString& _txt, int encoding_hint = 0);
/**
* @brief Returns the encoded query of the URL
@@ -713,24 +713,24 @@ public:
* A single @c '?' means an empty query.
* An empty string means no query.
*
- * @return the encoded query or @c QString::null if there is none
+ * @return the encoded query or @c TQString::null if there is none
*
* @see setQuery()
*/
- QString query() const;
+ TQString query() const;
/**
* @brief Returns the encoded reference of the URL
*
* The reference is @em never decoded automatically.
*
- * @return the undecoded reference, or @c QString::null if there is none
+ * @return the undecoded reference, or @c TQString::null if there is none
*
* @see setRef()
* @see hasRef()
* @see htmlRef()
*/
- QString ref() const { return m_strRef_encoded; }
+ TQString ref() const { return m_strRef_encoded; }
/**
* @brief Sets the encoded reference part (everything after @c '#')
@@ -738,12 +738,12 @@ public:
* This is considered to be encoded, i.e. characters that are not allowed
* as part of the reference will @em not be encoded.
*
- * @param _txt the encoded reference or @c QString::null to remove it
+ * @param _txt the encoded reference or @c TQString::null to remove it
*
* @see ref()
* @see hasRef()
*/
- void setRef( const QString& _txt ) { m_strRef_encoded = _txt; }
+ void setRef( const TQString& _txt ) { m_strRef_encoded = _txt; }
/**
* @brief Tests if the URL has a reference part
@@ -770,7 +770,7 @@ public:
* @see hasSubURL()
* @see ref()
*/
- QString htmlRef() const;
+ TQString htmlRef() const;
/**
* @brief Returns the encoded HTML-style reference
@@ -782,18 +782,18 @@ public:
* @see setHTMLRef()
* @see hasHTMLRef()
*/
- QString encodedHtmlRef() const;
+ TQString encodedHtmlRef() const;
/**
* @brief Sets the decoded HTML-style reference
*
* @param _ref the new reference. This is considered to be @em not encoded in
- * contrast to setRef(). Use @c QString::null to remove it
+ * contrast to setRef(). Use @c TQString::null to remove it
*
* @see htmlRef()
* @see hasHTMLRef()
*/
- void setHTMLRef( const QString& _ref );
+ void setHTMLRef( const TQString& _ref );
/**
* @brief Tests if there is an HTML-style reference
@@ -840,23 +840,23 @@ public:
* Adds encoding information to the URL by adding a @c "charset" parameter.
* If there is already a charset parameter, it will be replaced.
*
- * @param encoding the encoding to add or @c QString::null to remove the
+ * @param encoding the encoding to add or @c TQString::null to remove the
* encoding
*
* @see fileEncoding()
- * @see QTextCodec::codecForName()
+ * @see TQTextCodec::codecForName()
*/
- void setFileEncoding(const QString &encoding);
+ void setFileEncoding(const TQString &encoding);
/**
* @brief Returns encoding information of the URL
*
* The encoding information is the content of the @c "charset" parameter.
*
- * @return an encoding suitable for QTextCodec::codecForName()
- * or @c QString::null if not encoding was specified
+ * @return an encoding suitable for TQTextCodec::codecForName()
+ * or @c TQString::null if not encoding was specified
*/
- QString fileEncoding() const;
+ TQString fileEncoding() const;
/**
* @brief Tests if the URL has any sub URLs
@@ -883,14 +883,14 @@ public:
* @see setPath()
* @see hasPath()
*/
- void addPath( const QString& txt );
+ void addPath( const TQString& txt );
/**
* @brief Returns the value of a certain query item
*
* @param item item whose value we want
*
- * @return the value of the given query item name or @c QString::null if the
+ * @return the value of the given query item name or @c TQString::null if the
* specified item does not exist
*
* @see addQueryItem()
@@ -898,16 +898,16 @@ public:
* @see queryItems()
* @see query()
*/
- QString queryItem( const QString& item ) const;
+ TQString queryItem( const TQString& item ) const;
/**
* @brief Returns the value of a certain query item
*
* @param item item whose value we want
* @param encoding_hint MIB of encoding of query.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
- * @return the value of the given query item name or @c QString::null if the
+ * @return the value of the given query item name or @c TQString::null if the
* specified item does not exist
*
* @see addQueryItem()
@@ -915,7 +915,7 @@ public:
* @see queryItems()
* @see query()
*/
- QString queryItem( const QString& item, int encoding_hint ) const;
+ TQString queryItem( const TQString& item, int encoding_hint ) const;
/**
* Options for queryItems()
@@ -933,14 +933,14 @@ public:
/**
* @internal, override for the below function
*/
- QMap< QString, QString > queryItems( int options=0 ) const;
+ TQMap< TQString, TQString > queryItems( int options=0 ) const;
/**
* @brief Returns the list of query items as a map mapping keys to values
*
* @param options any of QueryItemsOptions <em>OR</em>ed together
* @param encoding_hint MIB of encoding of query.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @return the map of query items or the empty map if the URL has no
* query items
@@ -952,7 +952,7 @@ public:
*
* @since 3.1
*/
- QMap< QString, QString > queryItems( int options, int encoding_hint ) const;
+ TQMap< TQString, TQString > queryItems( int options, int encoding_hint ) const;
/**
* @brief Adds an additional query item
@@ -963,13 +963,13 @@ public:
* @param _item name of item to add
* @param _value value of item to add
* @param encoding_hint MIB of encoding to use for _value.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see queryItem()
* @see queryItems()
* @see query()
*/
- void addQueryItem( const QString& _item, const QString& _value, int encoding_hint = 0 );
+ void addQueryItem( const TQString& _item, const TQString& _value, int encoding_hint = 0 );
/**
* @brief Removea an item from the query
@@ -981,7 +981,7 @@ public:
* @see queryItems()
* @see query()
*/
- void removeQueryItem( const QString& _item );
+ void removeQueryItem( const TQString& _item );
/**
* @brief Sets the filename of the path
@@ -1003,7 +1003,7 @@ public:
* @see setDirectory()
* @see setPath()
*/
- void setFileName( const QString&_txt );
+ void setFileName( const TQString&_txt );
/**
* @brief Returns the filename of the path
@@ -1016,13 +1016,13 @@ public:
* behind the last @c '/' is considered to be the filename
*
* @return the filename of the current path. The returned string is decoded.
- * @c QString::null if there is no file (and thus no path)
+ * @c TQString::null if there is no file (and thus no path)
*
* @see setFileName()
* @see directory()
* @see path()
*/
- QString fileName( bool _ignore_trailing_slash_in_path = true ) const;
+ TQString fileName( bool _ignore_trailing_slash_in_path = true ) const;
/**
* @brief Returns the directory of the path
@@ -1043,14 +1043,14 @@ public:
* @param _ignore_trailing_slash_in_path if set to @c false, then everything
* behind the last @c '/' is considered to be the filename
*
- * @return the directory part of the current path or @c QString::null when
+ * @return the directory part of the current path or @c TQString::null when
* there is no path. The returned string is decoded
*
* @see setDirectory()
* @see fileName()
* @see path()
*/
- QString directory( bool _strip_trailing_slash_from_result = true,
+ TQString directory( bool _strip_trailing_slash_from_result = true,
bool _ignore_trailing_slash_in_path = true ) const;
/**
@@ -1062,7 +1062,7 @@ public:
* @see setFileName()
* @see setPath()
*/
- void setDirectory(const QString &dir);
+ void setDirectory(const TQString &dir);
/**
* @brief Changes the directory by descending into the given directory
@@ -1082,7 +1082,7 @@ public:
* @see directory()
* @see path()
*/
- bool cd( const QString& _dir );
+ bool cd( const TQString& _dir );
/**
* @brief Returns the URL as string, with all escape sequences intact,
@@ -1110,7 +1110,7 @@ public:
* @c '/', @c +1 adds a trailing @c '/' if there is none yet
* and @c 0 returns the path unchanged
* @param encoding_hint MIB of encoding to use.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @return the complete URL, with all escape sequences intact, encoded
* in a given charset
@@ -1119,7 +1119,7 @@ public:
* @see pathOrURL()
* @see htmlURL()
*/
- QString url( int _trailing = 0, int encoding_hint = 0) const;
+ TQString url( int _trailing = 0, int encoding_hint = 0) const;
/**
* @brief Returns the URL as string in human-friendly format
@@ -1153,7 +1153,7 @@ public:
* @see url()
* @see pathOrURL()
*/
- QString prettyURL( int _trailing = 0) const;
+ TQString prettyURL( int _trailing = 0) const;
/**
* @brief Returns the URL as string in human-friendly format
@@ -1190,7 +1190,7 @@ public:
* @see url()
* @see pathOrURL()
*/
- QString prettyURL( int _trailing, AdjustementFlags _flags) const;
+ TQString prettyURL( int _trailing, AdjustementFlags _flags) const;
// ### BIC: Merge the two above + spell it as "Adjustment"
// Or remove completely, and let people use pathOrURL() instead
@@ -1212,7 +1212,7 @@ public:
*
* @since 3.4
*/
- QString pathOrURL() const;
+ TQString pathOrURL() const;
/**
* @brief Returns the URL as string, escaped for HTML
@@ -1225,7 +1225,7 @@ public:
* @see url()
* @see pathOrURL()
*/
- QString htmlURL() const;
+ TQString htmlURL() const;
/**
@@ -1285,10 +1285,10 @@ public:
*
* bool lessThan = url1 < url2; // false. Both invalid, no protocols
*
- * url2.setProtocol( QString::null );
+ * url2.setProtocol( TQString::null );
* lessThan = url1 < url2; // true. url2 is valid because of setProtocol()
*
- * url1.setProtocol( QString::null );
+ * url1.setProtocol( TQString::null );
* lessThan = url1 < url2; // false. Both valid and everything empty
*
* url1.setProtocol( "http" );
@@ -1311,7 +1311,7 @@ public:
* (equal or greater than)
*
* @see operator==()
- * @see QString::compare()
+ * @see TQString::compare()
*/
bool operator<(const KURL& _u) const;
@@ -1334,14 +1334,14 @@ public:
* This will reset the current URL and parse the given string.
* See the similar constructor for known limitations.
*
- * @param _url the QString to parse for values
+ * @param _url the TQString to parse for values
*
* @return a reference to this URL (*this)
*
* @see equals()
- * @see KURL(const QString &, int)
+ * @see KURL(const TQString &, int)
*/
- KURL& operator=( const QString& _url );
+ KURL& operator=( const TQString& _url );
/**
* @brief Assigns the URL, given as a C string, to this one
@@ -1368,9 +1368,9 @@ public:
* @return a reference to this URL (*this)
*
* @see equals()
- * @see KURL(const QUrl &)
+ * @see KURL(const TQUrl &)
*/
- KURL& operator=( const QUrl & u );
+ KURL& operator=( const TQUrl & u );
/**
* @brief Tests if this URL is equal to the given one
@@ -1406,14 +1406,14 @@ public:
* @return @c true if equal and neither this URL nor @p _u is malformed.
* Otherwise @c false
*
- * @see KURL(const QString &, int)
+ * @see KURL(const TQString &, int)
* @see operator==(const KURL &)
* @see equals()
* @see isValid()
* @see operator!=()
* @see operator<()
*/
- bool operator==( const QString& _u ) const;
+ bool operator==( const TQString& _u ) const;
/**
* @brief Tests if this URL is different from the given one
@@ -1432,16 +1432,16 @@ public:
/**
* @brief Tests if this URL is different from the one given as a string
*
- * Tests by negating the result of operator==(const QString &)
+ * Tests by negating the result of operator==(const TQString &)
*
* @param _u the URL to compare to
*
- * @return the negated result of operator==(const QString &)
+ * @return the negated result of operator==(const TQString &)
*
- * @see operator==(const QString &)
+ * @see operator==(const TQString &)
* @see operator<()
*/
- bool operator!=( const QString& _u ) const { return !( *this == _u ); }
+ bool operator!=( const TQString& _u ) const { return !( *this == _u ); }
/**
* @brief Compares this URL with another one
@@ -1511,10 +1511,10 @@ public:
* @return an empty list on error or the list of split URLs
*
* @see hasSubURL()
- * @see KURL(const QString&, int)
+ * @see KURL(const TQString&, int)
* @see join()
*/
- static List split( const QString& _url );
+ static List split( const TQString& _url );
/**
* @brief Splits nested URLs into a list of URLs
@@ -1559,12 +1559,12 @@ public:
static KURL join( const List& _list );
/**
- * @brief Creates a KURL object from a QString representing either an
+ * @brief Creates a KURL object from a TQString representing either an
* absolute path or a real URL
*
* Use this method instead of
* @code
- * QString someDir = ...
+ * TQString someDir = ...
* KURL url = someDir;
* @endcode
*
@@ -1575,11 +1575,11 @@ public:
* @return the new KURL
*
* @see pathOrURL()
- * @see KURL(const QString&, int)
+ * @see KURL(const TQString&, int)
*
* @since 3.1
*/
- static KURL fromPathOrURL( const QString& text );
+ static KURL fromPathOrURL( const TQString& text );
/**
* @brief Encodes a string for use in URLs
@@ -1589,16 +1589,16 @@ public:
* Convert unicoded string to local encoding and use %%-style
* encoding for all common delimiters / non-ascii characters.
*
- * @param str the string to encode (can be @c QString::null)
+ * @param str the string to encode (can be @c TQString::null)
* @param encoding_hint MIB of encoding to use.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @return the encoded string
*
* @see encode_string_no_slash()
* @see decode_string()
*/
- static QString encode_string(const QString &str, int encoding_hint = 0);
+ static TQString encode_string(const TQString &str, int encoding_hint = 0);
/**
* @brief Encodes a string for use in URLs
@@ -1609,14 +1609,14 @@ public:
* encoding for all common delimiters and non-ascii characters
* as well as the slash @c '/'.
*
- * @param str the string to encode (can be @c QString::null)
+ * @param str the string to encode (can be @c TQString::null)
* @param encoding_hint MIB of encoding to use.
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see encode_string()
* @see decode_string()
*/
- static QString encode_string_no_slash(const QString &str, int encoding_hint = 0);
+ static TQString encode_string_no_slash(const TQString &str, int encoding_hint = 0);
/**
* @brief Decodes a string as used in URLs
@@ -1627,16 +1627,16 @@ public:
*
* Reverse of encode_string()
*
- * @param str the string to decode (can be @c QString::null)
+ * @param str the string to decode (can be @c TQString::null)
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @return the decoded string
*
* @see encode_string()
* @see encode_string_no_slash()
*/
- static QString decode_string(const QString &str, int encoding_hint = 0);
+ static TQString decode_string(const TQString &str, int encoding_hint = 0);
/**
* @brief Tests if a given URL is a relative as opposed to an absolute URL
@@ -1652,7 +1652,7 @@ public:
*
* @see relativeURL()
*/
- static bool isRelativeURL(const QString &_url);
+ static bool isRelativeURL(const TQString &_url);
/**
* @brief Creates an URL relative to a base URL for a given input URL
@@ -1671,13 +1671,13 @@ public:
* @param base_url the URL to derive from
* @param url the URL to point to relatively from @p base_url
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*
* @see isRelativeURL()
* @see relativePath()
* @see adjustPath()
*/
- static QString relativeURL(const KURL &base_url, const KURL &url, int encoding_hint = 0);
+ static TQString relativeURL(const KURL &base_url, const KURL &url, int encoding_hint = 0);
/**
* @brief Creates a path relative to a base path for a given input path
@@ -1693,7 +1693,7 @@ public:
*
* @see relativeURL()
*/
- static QString relativePath(const QString &base_dir, const QString &path, bool *isParent=0);
+ static TQString relativePath(const TQString &base_dir, const TQString &path, bool *isParent=0);
/**
* @brief Determines which URI mode is suitable for processing URIs of a
@@ -1707,7 +1707,7 @@ public:
*
* @since 3.2
*/
- static URIMode uriModeForProtocol(const QString& protocol);
+ static URIMode uriModeForProtocol(const TQString& protocol);
#ifdef KDE_NO_COMPAT
private:
@@ -1715,7 +1715,7 @@ private:
/**
* @deprecated change code to call fileName()
*/
- QString filename( bool _ignore_trailing_slash_in_path = true ) const
+ TQString filename( bool _ignore_trailing_slash_in_path = true ) const
{
return fileName(_ignore_trailing_slash_in_path);
}
@@ -1724,7 +1724,7 @@ protected:
/**
* @brief Resets the members to their "null" state
*
- * All QString members get reset to @c QString::null, the port to @c 0
+ * All TQString members get reset to @c TQString::null, the port to @c 0
* the URIMode to @c Auto and the URL becomes invalid.
*
* This is like assigning a null URL, but more efficient as it doesn't
@@ -1745,9 +1745,9 @@ protected:
*
* @param _url the string to parse
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*/
- void parseURL( const QString& _url, int encoding_hint = 0 );
+ void parseURL( const TQString& _url, int encoding_hint = 0 );
/**
* @brief Parses the given string and fills the URL's values on success
*
@@ -1755,9 +1755,9 @@ protected:
*
* @param _url the string to parse
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*/
- void parseRawURI( const QString& _url, int encoding_hint = 0 );
+ void parseRawURI( const TQString& _url, int encoding_hint = 0 );
/**
* @brief Parses the given string and fills the URL's values on success
*
@@ -1765,36 +1765,36 @@ protected:
*
* @param _url the string to parse
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*/
- void parseMailto( const QString& _url, int encoding_hint = 0 );
+ void parseMailto( const TQString& _url, int encoding_hint = 0 );
/**
* @brief Parses the given string and fills the URL's values on success
*
* @param _url the string to parse
* @param encoding_hint MIB of original encoding of @p str .
- * See QTextCodec::mibEnum()
+ * See TQTextCodec::mibEnum()
*/
- void parse( const QString& _url, int encoding_hint = 0 );
+ void parse( const TQString& _url, int encoding_hint = 0 );
private:
- void _setQuery( const QString& _txt, int encoding_hint = 0);
-
- QString m_strProtocol;
- QString m_strUser;
- QString m_strPass;
- QString m_strHost;
- QString m_strPath;
- QString m_strRef_encoded;
- QString m_strQuery_encoded;
+ void _setQuery( const TQString& _txt, int encoding_hint = 0);
+
+ TQString m_strProtocol;
+ TQString m_strUser;
+ TQString m_strPass;
+ TQString m_strHost;
+ TQString m_strPath;
+ TQString m_strRef_encoded;
+ TQString m_strQuery_encoded;
bool m_bIsMalformed : 1;
enum URIMode m_iUriMode : 3;
uint freeForUse : 4;
unsigned short int m_iPort;
- QString m_strPath_encoded;
+ TQString m_strPath_encoded;
- friend KDECORE_EXPORT QDataStream & operator<< (QDataStream & s, const KURL & a);
- friend KDECORE_EXPORT QDataStream & operator>> (QDataStream & s, KURL & a);
+ friend KDECORE_EXPORT TQDataStream & operator<< (TQDataStream & s, const KURL & a);
+ friend KDECORE_EXPORT TQDataStream & operator>> (TQDataStream & s, KURL & a);
private:
KURLPrivate* d;
};
@@ -1806,7 +1806,7 @@ private:
* are nevertheless considered to be unequal.
* That means no malformed URL equals anything else.
*/
-KDECORE_EXPORT bool urlcmp( const QString& _url1, const QString& _url2 );
+KDECORE_EXPORT bool urlcmp( const TQString& _url1, const TQString& _url2 );
/**
* \relates KURL
@@ -1820,9 +1820,9 @@ KDECORE_EXPORT bool urlcmp( const QString& _url1, const QString& _url2 );
* @param _ignore_trailing Described in KURL::cmp
* @param _ignore_ref If true, disables comparison of HTML-style references.
*/
-KDECORE_EXPORT bool urlcmp( const QString& _url1, const QString& _url2, bool _ignore_trailing, bool _ignore_ref );
+KDECORE_EXPORT bool urlcmp( const TQString& _url1, const TQString& _url2, bool _ignore_trailing, bool _ignore_ref );
-KDECORE_EXPORT QDataStream & operator<< (QDataStream & s, const KURL & a);
-KDECORE_EXPORT QDataStream & operator>> (QDataStream & s, KURL & a);
+KDECORE_EXPORT TQDataStream & operator<< (TQDataStream & s, const KURL & a);
+KDECORE_EXPORT TQDataStream & operator>> (TQDataStream & s, KURL & a);
#endif
diff --git a/kdecore/kurldrag.cpp b/kdecore/kurldrag.cpp
index 092bf76cd..7147f7a74 100644
--- a/kdecore/kurldrag.cpp
+++ b/kdecore/kurldrag.cpp
@@ -18,9 +18,9 @@
*/
#include "kurldrag.h"
-#include <qstrlist.h>
-#include <qdragobject.h>
-#include <qfont.h>
+#include <tqstrlist.h>
+#include <tqdragobject.h>
+#include <tqfont.h>
#include <unistd.h>
#include <kdeversion.h>
@@ -34,15 +34,15 @@ public:
bool m_exportAsText;
};
-KURLDrag::KURLDrag( const KURL::List &urls, QWidget* dragSource, const char * name )
- : QUriDrag(dragSource, name), m_metaData(), d( 0 )
+KURLDrag::KURLDrag( const KURL::List &urls, TQWidget* dragSource, const char * name )
+ : TQUriDrag(dragSource, name), m_metaData(), d( 0 )
{
init(urls);
}
-KURLDrag::KURLDrag( const KURL::List &urls, const QMap<QString,QString>& metaData,
- QWidget* dragSource, const char * name )
- : QUriDrag(dragSource, name), m_metaData(metaData), d( 0 )
+KURLDrag::KURLDrag( const KURL::List &urls, const TQMap<TQString,TQString>& metaData,
+ TQWidget* dragSource, const char * name )
+ : TQUriDrag(dragSource, name), m_metaData(metaData), d( 0 )
{
init(urls);
}
@@ -73,21 +73,21 @@ void KURLDrag::setExportAsText( bool exp )
d->m_exportAsText = exp;
}
-KURLDrag * KURLDrag::newDrag( const KURL::List &urls, QWidget* dragSource, const char * name )
+KURLDrag * KURLDrag::newDrag( const KURL::List &urls, TQWidget* dragSource, const char * name )
{
- return new KURLDrag( urls, QMap<QString, QString>(), dragSource, name );
+ return new KURLDrag( urls, TQMap<TQString, TQString>(), dragSource, name );
}
-KURLDrag * KURLDrag::newDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
- QWidget* dragSource, const char * name )
+KURLDrag * KURLDrag::newDrag( const KURL::List &urls, const TQMap<TQString, TQString>& metaData,
+ TQWidget* dragSource, const char * name )
{
return new KURLDrag( urls, metaData, dragSource, name );
}
-bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris )
+bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris )
{
if ( e->provides( "application/x-kde-urilist" ) ) {
- QByteArray payload = e->encodedData( "application/x-kde-urilist" );
+ TQByteArray payload = e->encodedData( "application/x-kde-urilist" );
if ( payload.size() ) {
uint c=0;
const char* d = payload.data();
@@ -97,7 +97,7 @@ bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris )
while (c < payload.size() && d[c] && d[c]!='\r'
&& d[c] != '\n')
c++;
- QCString s(d+f,c-f+1);
+ TQCString s(d+f,c-f+1);
if ( s[0] != '#' ) // non-comment?
uris.append(stringToUrl(s));
// Skip junk
@@ -109,9 +109,9 @@ bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris )
}
}
- QStrList lst;
- QUriDrag::decode( e, lst );
- for (QStrListIterator it(lst); *it; ++it)
+ TQStrList lst;
+ TQUriDrag::decode( e, lst );
+ for (TQStrListIterator it(lst); *it; ++it)
{
KURL url = stringToUrl( *it );
if ( !url.isValid() )
@@ -124,18 +124,18 @@ bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris )
return !uris.isEmpty();
}
-bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris, QMap<QString,QString>& metaData )
+bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris, TQMap<TQString,TQString>& metaData )
{
if ( decode( e, uris ) ) // first decode the URLs (see above)
{
- QByteArray ba = e->encodedData( "application/x-kio-metadata" );
+ TQByteArray ba = e->encodedData( "application/x-kio-metadata" );
if ( ba.size() )
{
- QString s = ba.data();
- QStringList l = QStringList::split( "$@@$", s );
- QStringList::ConstIterator it = l.begin();
+ TQString s = ba.data();
+ TQStringList l = TQStringList::split( "$@@$", s );
+ TQStringList::ConstIterator it = l.begin();
bool readingKey = true; // true, then false, then true, etc.
- QString key;
+ TQString key;
for ( ; it != l.end(); ++it ) {
if ( readingKey )
key = *it;
@@ -151,10 +151,10 @@ bool KURLDrag::decode( const QMimeSource *e, KURL::List &uris, QMap<QString,QStr
}
#ifdef Q_WS_QWS
-bool KURLDrag::decode( QStringList const &e, KURL::List &uris )
+bool KURLDrag::decode( TQStringList const &e, KURL::List &uris )
{
- QStringList::ConstIterator end(e.end());
- for(QStringList::ConstIterator it=e.begin(); it!=end; ++it)
+ TQStringList::ConstIterator end(e.end());
+ for(TQStringList::ConstIterator it=e.begin(); it!=end; ++it)
{
KURL url = KURL( *it, 106 ); // 106 is mib enum for utf8 codec
if ( !url.isValid() )
@@ -187,19 +187,19 @@ const char * KURLDrag::format( int i ) const
else return 0;
}
-QByteArray KURLDrag::encodedData( const char* mime ) const
+TQByteArray KURLDrag::encodedData( const char* mime ) const
{
- QByteArray a;
- QCString mimetype( mime );
+ TQByteArray a;
+ TQCString mimetype( mime );
if ( mimetype == "text/uri-list" )
- return QUriDrag::encodedData( mime );
+ return TQUriDrag::encodedData( mime );
else if ( mimetype == "text/plain" )
{
- QStringList uris;
- for (QStrListIterator it(m_urls); *it; ++it)
+ TQStringList uris;
+ for (TQStrListIterator it(m_urls); *it; ++it)
uris.append(stringToUrl(*it).prettyURL());
- QCString s = uris.join( "\n" ).local8Bit();
+ TQCString s = uris.join( "\n" ).local8Bit();
if( uris.count() > 1 ) // terminate last line, unless it's the only line
s.append( "\n" );
a.resize( s.length());
@@ -207,12 +207,12 @@ QByteArray KURLDrag::encodedData( const char* mime ) const
}
else if ( mimetype.lower() == "text/plain;charset=iso-8859-1")
{
- QStringList uris;
- for (QStrListIterator it(m_urls); *it; ++it)
- for (QStrListIterator it(m_urls); *it; ++it)
+ TQStringList uris;
+ for (TQStrListIterator it(m_urls); *it; ++it)
+ for (TQStrListIterator it(m_urls); *it; ++it)
uris.append(stringToUrl(*it).url(0, 4)); // 4 is mib for latin1
- QCString s = uris.join( "\n" ).latin1();
+ TQCString s = uris.join( "\n" ).latin1();
if( uris.count() > 1 )
s.append( "\n" );
a.resize( s.length());
@@ -220,11 +220,11 @@ QByteArray KURLDrag::encodedData( const char* mime ) const
}
else if ( mimetype.lower() == "text/plain;charset=utf-8")
{
- QStringList uris;
- for (QStrListIterator it(m_urls); *it; ++it)
+ TQStringList uris;
+ for (TQStrListIterator it(m_urls); *it; ++it)
uris.append(stringToUrl(*it).prettyURL());
- QCString s = uris.join( "\n" ).utf8();
+ TQCString s = uris.join( "\n" ).utf8();
if( uris.count() > 1 )
s.append( "\n" );
a.resize( s.length());
@@ -234,8 +234,8 @@ QByteArray KURLDrag::encodedData( const char* mime ) const
{
if ( !m_metaData.isEmpty() )
{
- QString s;
- QMap<QString,QString>::ConstIterator it;
+ TQString s;
+ TQMap<TQString,TQString>::ConstIterator it;
for( it = m_metaData.begin(); it != m_metaData.end(); ++it )
{
s += it.key();
@@ -250,7 +250,7 @@ QByteArray KURLDrag::encodedData( const char* mime ) const
return a;
}
-KURL KURLDrag::stringToUrl(const QCString &s)
+KURL KURLDrag::stringToUrl(const TQCString &s)
{
if (strncmp(s.data(), "file:", 5) == 0)
return KURL(s, KGlobal::locale()->fileEncodingMib());
@@ -258,7 +258,7 @@ KURL KURLDrag::stringToUrl(const QCString &s)
return KURL(s, 106); // 106 is mib enum for utf8 codec;
}
-QString KURLDrag::urlToString(const KURL &url)
+TQString KURLDrag::urlToString(const KURL &url)
{
if (url.isLocalFile())
{
@@ -268,14 +268,14 @@ QString KURLDrag::urlToString(const KURL &url)
// According to the XDND spec, file:/ URLs for DND must have
// the hostname part. But in really it just breaks many apps,
// so it's disabled for now.
- QString s = url.url(0, KGlobal::locale()->fileEncodingMib());
+ TQString s = url.url(0, KGlobal::locale()->fileEncodingMib());
if( !s.startsWith( "file://" ))
{
char hostname[257];
if ( gethostname( hostname, 255 ) == 0 )
{
hostname[256] = '\0';
- return QString( "file://" ) + hostname + s.mid( 5 );
+ return TQString( "file://" ) + hostname + s.mid( 5 );
}
}
#endif
@@ -289,6 +289,6 @@ QString KURLDrag::urlToString(const KURL &url)
}
// deprecated ctor
-KURLDrag::KURLDrag( const QStrList & urls, const QMap<QString,QString>& metaData,
- QWidget * dragSource, const char* name ) :
-QUriDrag( urls, dragSource, name ), m_urls( urls ), m_metaData( metaData ), d( 0 ) {}
+KURLDrag::KURLDrag( const TQStrList & urls, const TQMap<TQString,TQString>& metaData,
+ TQWidget * dragSource, const char* name ) :
+TQUriDrag( urls, dragSource, name ), m_urls( urls ), m_metaData( metaData ), d( 0 ) {}
diff --git a/kdecore/kurldrag.h b/kdecore/kurldrag.h
index fec73f322..f69161985 100644
--- a/kdecore/kurldrag.h
+++ b/kdecore/kurldrag.h
@@ -20,16 +20,16 @@
#ifndef __KURLDRAG_H
#define __KURLDRAG_H
-#include <qstringlist.h>
-#include <qdragobject.h>
+#include <tqstringlist.h>
+#include <tqdragobject.h>
#include <kurl.h>
#include "kdelibs_export.h"
class QMimeSource;
class KURLDragPrivate;
/**
- * This class is to be used instead of QUriDrag when using KURL.
- * The reason is: QUriDrag (and the XDND/W3C standards) expect URLs to
+ * This class is to be used instead of TQUriDrag when using KURL.
+ * The reason is: TQUriDrag (and the XDND/W3C standards) expect URLs to
* be encoded in UTF-8 (unicode), but KURL uses the current locale
* by default.
* The other reasons for using this class are:
@@ -39,34 +39,34 @@ class KURLDragPrivate;
* require it for downloading e.g. an image).
*
* To create a drag object, use the KURLDrag constructor.
- * To handle drops, use QUriDrag::canDecode() and KURLDrag::decode()
+ * To handle drops, use TQUriDrag::canDecode() and KURLDrag::decode()
*/
class KDECORE_EXPORT KURLDrag : public QUriDrag
{
public:
/**
* Constructs an object to drag the list of URLs in @p urls.
- * The @p dragSource and @p name arguments are passed on to QUriDrag,
+ * The @p dragSource and @p name arguments are passed on to TQUriDrag,
* and the list of urls is converted to UTF-8 before being passed
- * to QUriDrag.
+ * to TQUriDrag.
* @param urls the list of URLs
- * @param dragSource the parent of the QObject. Should be set when doing drag-n-drop,
+ * @param dragSource the parent of the TQObject. Should be set when doing drag-n-drop,
* but should be 0 when copying to the clipboard
* @param name the name of the QObject
*/
- KURLDrag( const KURL::List &urls, QWidget* dragSource = 0, const char * name = 0 );
+ KURLDrag( const KURL::List &urls, TQWidget* dragSource = 0, const char * name = 0 );
/**
* Constructs an object to drag the list of URLs in @p urls.
* This version also includes metadata.
* @param urls the list of URLs
* @param metaData a map containing meta data
- * @param dragSource the parent of the QObject. Should be set when doing drag-n-drop,
+ * @param dragSource the parent of the TQObject. Should be set when doing drag-n-drop,
* but should be 0 when copying to the clipboard
* @param name the name of the QObject
* @see metaData()
*/
- KURLDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
- QWidget* dragSource = 0, const char * name = 0 );
+ KURLDrag( const KURL::List &urls, const TQMap<TQString, TQString>& metaData,
+ TQWidget* dragSource = 0, const char * name = 0 );
virtual ~KURLDrag();
@@ -82,13 +82,13 @@ public:
/**
* @deprecated Is equivalent with "new KURLDrag(urls, dragSource, name)".
*/
- static KURLDrag * newDrag( const KURL::List &urls, QWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
+ static KURLDrag * newDrag( const KURL::List &urls, TQWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
/**
* @deprecated Is equivalent with "new KURLDrag(urls, metaData, dragSource, name)".
*/
- static KURLDrag * newDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
- QWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
+ static KURLDrag * newDrag( const KURL::List &urls, const TQMap<TQString, TQString>& metaData,
+ TQWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
/**
* Meta-data to associate with those URLs.
@@ -97,7 +97,7 @@ public:
* drag->metaData()["key"] = data;
* @see KIO::TransferJob
*/
- QMap<QString, QString> &metaData() { return m_metaData; }
+ TQMap<TQString, TQString> &metaData() { return m_metaData; }
/**
* Convenience method that decodes the contents of @p e
@@ -107,7 +107,7 @@ public:
* @param urls the list of urls will be written here
* @return true if successful, false otherwise
*/
- static bool decode( const QMimeSource *e, KURL::List &urls );
+ static bool decode( const TQMimeSource *e, KURL::List &urls );
/**
* Convenience method that decodes the contents of @p e
@@ -119,19 +119,19 @@ public:
* @param metaData the metadata map will be written here
* @return true if successful, false otherwise
*/
- static bool decode( const QMimeSource *e, KURL::List &urls, QMap<QString,QString>& metaData );
+ static bool decode( const TQMimeSource *e, KURL::List &urls, TQMap<TQString,TQString>& metaData );
/**
* Converts a URL to a string representation suitable for dragging.
* @since 3.2
*/
- static QString urlToString(const KURL &url);
+ static TQString urlToString(const KURL &url);
/**
* Converts a string used for dragging to a URL.
* @since 3.2
*/
- static KURL stringToUrl(const QCString &s);
+ static KURL stringToUrl(const TQCString &s);
#ifdef Q_WS_QWS
/**
@@ -139,26 +139,26 @@ public:
* into a list of KURLs for Qt versions without a MIME clipboard.
* Decoding will fail if at least one value in the list is not a valid KURL.
*/
- static bool decode( QStringList const &e, KURL::List &uris );
+ static bool decode( TQStringList const &e, KURL::List &uris );
#endif
/// @reimp
virtual const char * format( int i ) const;
/// @reimp
- virtual QByteArray encodedData( const char* mime ) const;
+ virtual TQByteArray encodedData( const char* mime ) const;
protected:
/**
* @deprecated Use a KURLDrag constructor with a KURL::List
*/
- KURLDrag( const QStrList & urls, const QMap<QString,QString>& metaData,
- QWidget * dragSource, const char* name ) KDE_DEPRECATED;
+ KURLDrag( const TQStrList & urls, const TQMap<TQString,TQString>& metaData,
+ TQWidget * dragSource, const char* name ) KDE_DEPRECATED;
private:
void init(const KURL::List &urls);
- QStrList m_urls;
- QMap<QString,QString> m_metaData;
+ TQStrList m_urls;
+ TQMap<TQString,TQString> m_metaData;
KURLDragPrivate* d;
};
diff --git a/kdecore/kuser.cpp b/kdecore/kuser.cpp
index 184cedadd..3fffddf4f 100644
--- a/kdecore/kuser.cpp
+++ b/kdecore/kuser.cpp
@@ -22,8 +22,8 @@
#include <kuser.h>
#include "kstringhandler.h"
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
#include <sys/types.h>
#include <pwd.h>
@@ -37,21 +37,21 @@ class KUserPrivate : public KShared
public:
bool valid;
long uid, gid;
- QString loginName, fullName;
- QString roomNumber, workPhone, homePhone;
- QString homeDir, shell;
+ TQString loginName, fullName;
+ TQString roomNumber, workPhone, homePhone;
+ TQString homeDir, shell;
KUserPrivate() : valid(false) {}
KUserPrivate(long _uid,
long _gid,
- const QString &_loginname,
- const QString &_fullname,
- const QString &_room,
- const QString &_workPhone,
- const QString &_homePhone,
- const QString &_homedir,
- const QString &_shell) :
+ const TQString &_loginname,
+ const TQString &_fullname,
+ const TQString &_room,
+ const TQString &_workPhone,
+ const TQString &_homePhone,
+ const TQString &_homedir,
+ const TQString &_shell) :
valid(true),
uid(_uid),
gid(_gid),
@@ -83,7 +83,7 @@ KUser::KUser(long uid) {
fillPasswd( ::getpwuid( uid ) );
}
-KUser::KUser(const QString& name) {
+KUser::KUser(const TQString& name) {
fillName( name.local8Bit().data() );
}
@@ -125,18 +125,18 @@ void KUser::fillName(const char *name) {
void KUser::fillPasswd(struct passwd *p) {
if (p) {
- QString gecos = KStringHandler::from8Bit(p->pw_gecos);
- QStringList gecosList = QStringList::split(',', gecos, true);
+ TQString gecos = KStringHandler::from8Bit(p->pw_gecos);
+ TQStringList gecosList = TQStringList::split(',', gecos, true);
d = new KUserPrivate(p->pw_uid,
p->pw_gid,
- QString::fromLocal8Bit(p->pw_name),
- (gecosList.size() > 0) ? gecosList[0] : QString::null,
- (gecosList.size() > 1) ? gecosList[1] : QString::null,
- (gecosList.size() > 2) ? gecosList[2] : QString::null,
- (gecosList.size() > 3) ? gecosList[3] : QString::null,
- QString::fromLocal8Bit(p->pw_dir),
- QString::fromLocal8Bit(p->pw_shell));
+ TQString::fromLocal8Bit(p->pw_name),
+ (gecosList.size() > 0) ? gecosList[0] : TQString::null,
+ (gecosList.size() > 1) ? gecosList[1] : TQString::null,
+ (gecosList.size() > 2) ? gecosList[2] : TQString::null,
+ (gecosList.size() > 3) ? gecosList[3] : TQString::null,
+ TQString::fromLocal8Bit(p->pw_dir),
+ TQString::fromLocal8Bit(p->pw_shell));
}
else
d = new KUserPrivate();
@@ -164,61 +164,61 @@ bool KUser::isSuperUser() const {
return uid() == 0;
}
-QString KUser::loginName() const {
+TQString KUser::loginName() const {
if (d->valid)
return d->loginName;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::fullName() const {
+TQString KUser::fullName() const {
if (d->valid)
return d->fullName;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::roomNumber() const {
+TQString KUser::roomNumber() const {
if (d->valid)
return d->roomNumber;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::workPhone() const {
+TQString KUser::workPhone() const {
if (d->valid)
return d->workPhone;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::homePhone() const {
+TQString KUser::homePhone() const {
if (d->valid)
return d->homePhone;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::homeDir() const {
+TQString KUser::homeDir() const {
if (d->valid)
return d->homeDir;
else
- return QString::null;
+ return TQString::null;
}
-QString KUser::shell() const {
+TQString KUser::shell() const {
if (d->valid)
return d->shell;
else
- return QString::null;
+ return TQString::null;
}
-QValueList<KUserGroup> KUser::groups() const {
- QValueList<KUserGroup> result;
- QValueList<KUserGroup> allGroups = KUserGroup::allGroups();
- QValueList<KUserGroup>::const_iterator it;
+TQValueList<KUserGroup> KUser::groups() const {
+ TQValueList<KUserGroup> result;
+ TQValueList<KUserGroup> allGroups = KUserGroup::allGroups();
+ TQValueList<KUserGroup>::const_iterator it;
for ( it = allGroups.begin(); it != allGroups.end(); ++it ) {
- QValueList<KUser> users = (*it).users();
+ TQValueList<KUser> users = (*it).users();
if ( users.find( *this ) != users.end()) {
result.append(*it);
}
@@ -226,12 +226,12 @@ QValueList<KUserGroup> KUser::groups() const {
return result;
}
-QStringList KUser::groupNames() const {
- QStringList result;
- QValueList<KUserGroup> allGroups = KUserGroup::allGroups();
- QValueList<KUserGroup>::const_iterator it;
+TQStringList KUser::groupNames() const {
+ TQStringList result;
+ TQValueList<KUserGroup> allGroups = KUserGroup::allGroups();
+ TQValueList<KUserGroup>::const_iterator it;
for ( it = allGroups.begin(); it != allGroups.end(); ++it ) {
- QValueList<KUser> users = (*it).users();
+ TQValueList<KUser> users = (*it).users();
if ( users.find( *this ) != users.end()) {
result.append((*it).name());
}
@@ -240,8 +240,8 @@ QStringList KUser::groupNames() const {
}
-QValueList<KUser> KUser::allUsers() {
- QValueList<KUser> result;
+TQValueList<KUser> KUser::allUsers() {
+ TQValueList<KUser> result;
struct passwd* p;
@@ -254,13 +254,13 @@ QValueList<KUser> KUser::allUsers() {
return result;
}
-QStringList KUser::allUserNames() {
- QStringList result;
+TQStringList KUser::allUserNames() {
+ TQStringList result;
struct passwd* p;
while ((p = getpwent())) {
- result.append(QString::fromLocal8Bit(p->pw_name));
+ result.append(TQString::fromLocal8Bit(p->pw_name));
}
endpwent();
@@ -276,14 +276,14 @@ class KUserGroupPrivate : public KShared
public:
bool valid;
long gid;
- QString name;
- QValueList<KUser> users;
+ TQString name;
+ TQValueList<KUser> users;
KUserGroupPrivate() : valid(false) {}
KUserGroupPrivate(long _gid,
- const QString & _name,
- const QValueList<KUser> & _users):
+ const TQString & _name,
+ const TQValueList<KUser> & _users):
valid(true),
gid(_gid),
name(_name),
@@ -299,7 +299,7 @@ KUserGroup::KUserGroup(long gid) {
fillGroup(getgrgid(gid));
}
-KUserGroup::KUserGroup(const QString& name) {
+KUserGroup::KUserGroup(const TQString& name) {
fillName(name.local8Bit().data());
}
@@ -345,17 +345,17 @@ void KUserGroup::fillGroup(struct group *p) {
return;
}
- QString name = KStringHandler::from8Bit(p->gr_name);
- QValueList<KUser> users;
+ TQString name = KStringHandler::from8Bit(p->gr_name);
+ TQValueList<KUser> users;
char **user = p->gr_mem;
for ( ; *user; user++) {
- KUser kUser(QString::fromLocal8Bit(*user));
+ KUser kUser(TQString::fromLocal8Bit(*user));
users.append(kUser);
}
d = new KUserGroupPrivate(p->gr_gid,
- QString::fromLocal8Bit(p->gr_name),
+ TQString::fromLocal8Bit(p->gr_name),
users);
}
@@ -371,20 +371,20 @@ long KUserGroup::gid() const {
return -1;
}
-QString KUserGroup::name() const {
+TQString KUserGroup::name() const {
if (d->valid)
return d->name;
else
- return QString::null;
+ return TQString::null;
}
-const QValueList<KUser>& KUserGroup::users() const {
+const TQValueList<KUser>& KUserGroup::users() const {
return d->users;
}
-QStringList KUserGroup::userNames() const {
- QStringList result;
- QValueList<KUser>::const_iterator it;
+TQStringList KUserGroup::userNames() const {
+ TQStringList result;
+ TQValueList<KUser>::const_iterator it;
for ( it = d->users.begin(); it != d->users.end(); ++it ) {
result.append((*it).loginName());
}
@@ -393,8 +393,8 @@ QStringList KUserGroup::userNames() const {
-QValueList<KUserGroup> KUserGroup::allGroups() {
- QValueList<KUserGroup> result;
+TQValueList<KUserGroup> KUserGroup::allGroups() {
+ TQValueList<KUserGroup> result;
struct group* g;
while ((g = getgrent())) {
@@ -406,12 +406,12 @@ QValueList<KUserGroup> KUserGroup::allGroups() {
return result;
}
-QStringList KUserGroup::allGroupNames() {
- QStringList result;
+TQStringList KUserGroup::allGroupNames() {
+ TQStringList result;
struct group* g;
while ((g = getgrent())) {
- result.append(QString::fromLocal8Bit(g->gr_name));
+ result.append(TQString::fromLocal8Bit(g->gr_name));
}
endgrent();
diff --git a/kdecore/kuser.h b/kdecore/kuser.h
index 9826d994c..ac8a1ac0c 100644
--- a/kdecore/kuser.h
+++ b/kdecore/kuser.h
@@ -82,7 +82,7 @@ public:
* @param name the name of the user
*/
// XXX KDE4: Make this explicit
- KUser(const QString& name);
+ KUser(const TQString& name);
/**
* Creates an object that contains information about the user with the given
@@ -157,62 +157,62 @@ public:
/**
* The login name of the user.
- * @return the login name of the user or QString::null if user is invalid
+ * @return the login name of the user or TQString::null if user is invalid
*/
- QString loginName() const;
+ TQString loginName() const;
/**
* The full name of the user.
- * @return the full name of the user or QString::null if user is invalid
+ * @return the full name of the user or TQString::null if user is invalid
*/
- QString fullName() const;
+ TQString fullName() const;
/**
* The user's room number.
- * @return the room number of the user or QString::null if not set or the
+ * @return the room number of the user or TQString::null if not set or the
* user is invalid
*/
- QString roomNumber() const;
+ TQString roomNumber() const;
/**
* The user's work phone.
- * @return the work phone of the user or QString::null if not set or the
+ * @return the work phone of the user or TQString::null if not set or the
* user is invalid
*/
- QString workPhone() const;
+ TQString workPhone() const;
/**
* The user's home phone.
- * @return the home phone of the user or QString::null if not set or the
+ * @return the home phone of the user or TQString::null if not set or the
* user is invalid
*/
- QString homePhone() const;
+ TQString homePhone() const;
/**
* The path to the user's home directory.
- * @return the home directory of the user or QString::null if the
+ * @return the home directory of the user or TQString::null if the
* user is invalid
*/
- QString homeDir() const;
+ TQString homeDir() const;
/**
* The path to the user's login shell.
- * @return the login shell of the user or QString::null if the
+ * @return the login shell of the user or TQString::null if the
* user is invalid
*/
- QString shell() const;
+ TQString shell() const;
/**
* Returns all groups of the user
* @return all groups of the user
*/
- QValueList<KUserGroup> groups() const;
+ TQValueList<KUserGroup> groups() const;
/**
* Returns all group names of the user
* @return all group names of the user
*/
- QStringList groupNames() const;
+ TQStringList groupNames() const;
/**
@@ -224,13 +224,13 @@ public:
* Returns all users of the system.
* @return all users of the system.
*/
- static QValueList<KUser> allUsers();
+ static TQValueList<KUser> allUsers();
/**
* Returns all user names of the system.
* @return all user names of the system.
*/
- static QStringList allUserNames();
+ static TQStringList allUserNames();
private:
KSharedPtr<KUserPrivate> d;
@@ -282,7 +282,7 @@ public:
* If the group does not exist, isValid() will return false.
* @param name the name of the group
*/
- explicit KUserGroup(const QString& name);
+ explicit KUserGroup(const TQString& name);
/**
* Create an object from a group name.
@@ -344,19 +344,19 @@ public:
* The name of the group.
* @return the name of the group
*/
- QString name() const;
+ TQString name() const;
/**
* Returns a list of all users of the group.
* @return a list of all users of the group
*/
- const QValueList<KUser>& users() const;
+ const TQValueList<KUser>& users() const;
/**
* Returns a list of all user login names of the group.
* @return a list of all user login names of the group
*/
- QStringList userNames() const;
+ TQStringList userNames() const;
/**
@@ -367,12 +367,12 @@ public:
/**
* Returns a list of all groups on this system
*/
- static QValueList<KUserGroup> allGroups();
+ static TQValueList<KUserGroup> allGroups();
/**
* Returns a list of all group names on this system
*/
- static QStringList allGroupNames();
+ static TQStringList allGroupNames();
private:
KSharedPtr<KUserGroupPrivate> d;
diff --git a/kdecore/kvmallocator.cpp b/kdecore/kvmallocator.cpp
index 21d418434..996d55791 100644
--- a/kdecore/kvmallocator.cpp
+++ b/kdecore/kvmallocator.cpp
@@ -28,8 +28,8 @@
#include <unistd.h>
#include <sys/mman.h>
-#include <qintdict.h>
-#include <qmap.h>
+#include <tqintdict.h>
+#include <tqmap.h>
#include <ktempfile.h>
#include <kdebug.h>
@@ -53,8 +53,8 @@ class KVMAllocatorPrivate
public:
KTempFile *tempfile;
off_t max_length;
- QMap<off_t, KVMAllocator::Block> used_blocks;
- QMap<off_t, KVMAllocator::Block> free_blocks;
+ TQMap<off_t, KVMAllocator::Block> used_blocks;
+ TQMap<off_t, KVMAllocator::Block> free_blocks;
};
/**
@@ -85,11 +85,11 @@ KVMAllocator::allocate(size_t _size)
{
if (!d->tempfile)
{
- d->tempfile = new KTempFile(QString::null, "vmdata");
+ d->tempfile = new KTempFile(TQString::null, "vmdata");
d->tempfile->unlink();
}
// Search in free list
- QMap<off_t,KVMAllocator::Block>::iterator it;
+ TQMap<off_t,KVMAllocator::Block>::iterator it;
it = d->free_blocks.begin();
while (it != d->free_blocks.end())
{
@@ -137,7 +137,7 @@ KVMAllocator::free(Block *block_p)
kdDebug(180)<<"VM free: Block "<<(long)block.start<<" is still mmapped!"<<endl;
return;
}
- QMap<off_t,KVMAllocator::Block>::iterator it;
+ TQMap<off_t,KVMAllocator::Block>::iterator it;
it = d->used_blocks.find(block.start);
if (it == d->used_blocks.end())
{
@@ -146,7 +146,7 @@ KVMAllocator::free(Block *block_p)
}
d->used_blocks.remove(it);
it = d->free_blocks.replace(block.start, block);
- QMap<off_t,KVMAllocator::Block>::iterator before = it;
+ TQMap<off_t,KVMAllocator::Block>::iterator before = it;
--before;
if (before != d->free_blocks.end())
{
@@ -163,7 +163,7 @@ KVMAllocator::free(Block *block_p)
}
}
- QMap<off_t,KVMAllocator::Block>::iterator after = it;
+ TQMap<off_t,KVMAllocator::Block>::iterator after = it;
++after;
if (after != d->free_blocks.end())
{
diff --git a/kdecore/kwin.cpp b/kdecore/kwin.cpp
index 1e94b99db..64be09d30 100644
--- a/kdecore/kwin.cpp
+++ b/kdecore/kwin.cpp
@@ -27,11 +27,11 @@
#endif
#include <kuniqueapplication.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qwhatsthis.h>
-#include <qcstring.h>
-#include <qdialog.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqwhatsthis.h>
+#include <tqcstring.h>
+#include <tqdialog.h>
#include "config.h"
#include "kwin.h"
@@ -166,13 +166,13 @@ public:
};
ContextWidget::ContextWidget()
- : QWidget(0,0)
+ : TQWidget(0,0)
{
kwin_net_create_atoms();
kapp->installX11EventFilter( this );
- QWhatsThis::enterWhatsThisMode();
- QCursor c = *QApplication::overrideCursor();
- QWhatsThis::leaveWhatsThisMode();
+ TQWhatsThis::enterWhatsThisMode();
+ TQCursor c = *TQApplication::overrideCursor();
+ TQWhatsThis::leaveWhatsThisMode();
XGrabPointer( qt_xdisplay(), qt_xrootwin(), true,
(uint)( ButtonPressMask | ButtonReleaseMask |
PointerMotionMask | EnterWindowMask |
@@ -230,7 +230,7 @@ void KWin::setSystemTrayWindowFor( WId trayWin, WId forWin )
NETRootInfo rootinfo( qt_xdisplay(), NET::Supported );
if( !rootinfo.isSupported( NET::WMKDESystemTrayWinFor )) {
DCOPRef ref( "kded", "kded" );
- if( !ref.send( "loadModule", QCString( "kdetrayproxy" )))
+ if( !ref.send( "loadModule", TQCString( "kdetrayproxy" )))
kdWarning( 176 ) << "Loading of kdetrayproxy failed." << endl;
}
#endif
@@ -304,15 +304,15 @@ WId KWin::transientFor( WId win )
#endif
}
-void KWin::setMainWindow( QWidget* subwindow, WId mainwindow )
+void KWin::setMainWindow( TQWidget* subwindow, WId mainwindow )
{
#ifdef Q_WS_X11
if( mainwindow != 0 )
{
/*
- Grmbl. See QDialog::show(). That should get fixed in Qt somehow.
+ Grmbl. See TQDialog::show(). That should get fixed in Qt somehow.
*/
- if( qt_cast< QDialog* >( subwindow ) != NULL
+ if( qt_cast< TQDialog* >( subwindow ) != NULL
&& subwindow->parentWidget() == NULL
&& kapp->mainWidget() != NULL )
{
@@ -368,16 +368,16 @@ KWin::Info KWin::info( WId win )
w.strut = inf.strut();
w.windowType = inf.windowType( -1U );
if ( inf.name() ) {
- w.name = QString::fromUtf8( inf.name() );
+ w.name = TQString::fromUtf8( inf.name() );
} else {
char* c = 0;
if ( XFetchName( qt_xdisplay(), win, &c ) != 0 ) {
- w.name = QString::fromLocal8Bit( c );
+ w.name = TQString::fromLocal8Bit( c );
XFree( c );
}
}
if ( inf.visibleName() )
- w.visibleName = QString::fromUtf8( inf.visibleName() );
+ w.visibleName = TQString::fromUtf8( inf.visibleName() );
else
w.visibleName = w.name;
@@ -392,26 +392,26 @@ KWin::Info KWin::info( WId win )
return w;
}
-QPixmap KWin::icon( WId win, int width, int height, bool scale )
+TQPixmap KWin::icon( WId win, int width, int height, bool scale )
{
return icon( win, width, height, scale, NETWM | WMHints | ClassHint | XApp );
}
-QPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
+TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
{
#ifdef Q_WS_X11
KXErrorHandler handler; // ignore badwindow
#endif
- QPixmap result;
+ TQPixmap result;
#ifdef Q_WS_X11
if( flags & NETWM ) {
NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), NET::WMIcon );
NETIcon ni = info.icon( width, height );
if ( ni.data && ni.size.width > 0 && ni.size.height > 0 ) {
- QImage img( (uchar*) ni.data, (int) ni.size.width, (int) ni.size.height, 32, 0, 0, QImage::IgnoreEndian );
+ TQImage img( (uchar*) ni.data, (int) ni.size.width, (int) ni.size.height, 32, 0, 0, TQImage::IgnoreEndian );
img.setAlphaBuffer( true );
- if ( scale && width > 0 && height > 0 &&img.size() != QSize( width, height ) && !img.isNull() )
+ if ( scale && width > 0 && height > 0 &&img.size() != TQSize( width, height ) && !img.isNull() )
img = img.smoothScale( width, height );
if ( !img.isNull() )
result.convertFromImage( img );
@@ -442,14 +442,14 @@ QPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
XGetGeometry(qt_xdisplay(), p, &root,
&x, &y, &w, &h, &border_w, &depth);
if (w > 0 && h > 0){
- QPixmap pm(w, h, depth);
+ TQPixmap pm(w, h, depth);
// Always detach before doing something behind QPixmap's back.
pm.detach();
XCopyArea(qt_xdisplay(), p, pm.handle(),
qt_xget_temp_gc(qt_xscreen(), depth==1),
0, 0, w, h, 0, 0);
if (p_mask != None){
- QBitmap bm(w, h);
+ TQBitmap bm(w, h);
XCopyArea(qt_xdisplay(), p_mask, bm.handle(),
qt_xget_temp_gc(qt_xscreen(), true),
0, 0, w, h, 0, 0);
@@ -483,9 +483,9 @@ QPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
XClassHint hint;
if( XGetClassHint( qt_xdisplay(), win, &hint ) ) {
- QString className = hint.res_class;
+ TQString className = hint.res_class;
- QPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( className.lower(), KIcon::Small, iconWidth,
+ TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( className.lower(), KIcon::Small, iconWidth,
KIcon::DefaultState, 0, true );
if( scale && !pm.isNull() )
result.convertFromImage( pm.convertToImage().smoothScale( width, height ) );
@@ -502,7 +502,7 @@ QPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
// If the icon is still a null pixmap, load the 'xapp' icon
// as a last resort:
if ( result.isNull() ) {
- QPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( "xapp", KIcon::Small, iconWidth,
+ TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( "xapp", KIcon::Small, iconWidth,
KIcon::DefaultState, 0, true );
if( scale && !pm.isNull() )
result.convertFromImage( pm.convertToImage().smoothScale( width, height ) );
@@ -514,13 +514,13 @@ QPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
return result;
}
-void KWin::setIcons( WId win, const QPixmap& icon, const QPixmap& miniIcon )
+void KWin::setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon )
{
#ifdef Q_WS_X11
if ( icon.isNull() )
return;
NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), 0 );
- QImage img = icon.convertToImage().convertDepth( 32 );
+ TQImage img = icon.convertToImage().convertDepth( 32 );
NETIcon ni;
ni.size.width = img.size().width();
ni.size.height = img.size().height();
@@ -672,7 +672,7 @@ void KWin::setCurrentDesktop( int desktop )
#endif
}
-void KWin::setCurrentDesktopViewport( int desktop, QPoint viewport )
+void KWin::setCurrentDesktopViewport( int desktop, TQPoint viewport )
{
#ifdef Q_WS_X11
NETRootInfo info( qt_xdisplay(), NET::CurrentDesktop );
@@ -750,10 +750,10 @@ class KWin::WindowInfoPrivate
NETWinInfo* info;
#endif
WId win_;
- QString name_;
- QString iconic_name_;
- QRect geometry_;
- QRect frame_geometry_;
+ TQString name_;
+ TQString iconic_name_;
+ TQRect geometry_;
+ TQRect frame_geometry_;
int ref;
bool valid;
private:
@@ -793,13 +793,13 @@ KWin::WindowInfo::WindowInfo( WId win, unsigned long properties, unsigned long p
d->win_ = win;
if( properties & NET::WMName ) {
if( d->info->name() && d->info->name()[ 0 ] != '\0' )
- d->name_ = QString::fromUtf8( d->info->name() );
+ d->name_ = TQString::fromUtf8( d->info->name() );
else
d->name_ = readNameProperty( win, XA_WM_NAME );
}
if( properties & NET::WMIconName ) {
if( d->info->iconName() && d->info->iconName()[ 0 ] != '\0' )
- d->iconic_name_ = QString::fromUtf8( d->info->iconName());
+ d->iconic_name_ = TQString::fromUtf8( d->info->iconName());
else
d->iconic_name_ = readNameProperty( win, XA_WM_ICON_NAME );
}
@@ -813,7 +813,7 @@ KWin::WindowInfo::WindowInfo( WId win, unsigned long properties, unsigned long p
#endif
}
-// this one is only to make QValueList<> or similar happy
+// this one is only to make TQValueList<> or similar happy
KWin::WindowInfo::WindowInfo()
: d( NULL )
{
@@ -945,9 +945,9 @@ NET::WindowType KWin::WindowInfo::windowType( int supported_types ) const
#endif
}
-QString KWin::WindowInfo::visibleNameWithState() const
+TQString KWin::WindowInfo::visibleNameWithState() const
{
- QString s = visibleName();
+ TQString s = visibleName();
if ( isMinimized() ) {
s.prepend('(');
s.append(')');
@@ -955,9 +955,9 @@ QString KWin::WindowInfo::visibleNameWithState() const
return s;
}
-QString KWin::Info::visibleNameWithState() const
+TQString KWin::Info::visibleNameWithState() const
{
- QString s = visibleName;
+ TQString s = visibleName;
if ( isMinimized() ) {
s.prepend('(');
s.append(')');
@@ -965,32 +965,32 @@ QString KWin::Info::visibleNameWithState() const
return s;
}
-QString KWin::WindowInfo::visibleName() const
+TQString KWin::WindowInfo::visibleName() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMVisibleName ) == 0, 176 )
<< "Pass NET::WMVisibleName to KWin::windowInfo()" << endl;
return d->info->visibleName() && d->info->visibleName()[ 0 ] != '\0'
- ? QString::fromUtf8(d->info->visibleName()) : name();
+ ? TQString::fromUtf8(d->info->visibleName()) : name();
#else
- return QString("name");
+ return TQString("name");
#endif
}
-QString KWin::WindowInfo::name() const
+TQString KWin::WindowInfo::name() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMName ) == 0, 176 )
<< "Pass NET::WMName to KWin::windowInfo()" << endl;
return d->name_;
#else
- return QString();
+ return TQString();
#endif
}
-QString KWin::WindowInfo::visibleIconNameWithState() const
+TQString KWin::WindowInfo::visibleIconNameWithState() const
{
- QString s = visibleIconName();
+ TQString s = visibleIconName();
if ( isMinimized() ) {
s.prepend('(');
s.append(')');
@@ -998,28 +998,28 @@ QString KWin::WindowInfo::visibleIconNameWithState() const
return s;
}
-QString KWin::WindowInfo::visibleIconName() const
+TQString KWin::WindowInfo::visibleIconName() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMVisibleIconName ) == 0, 176 )
<< "Pass NET::WMVisibleIconName to KWin::windowInfo()" << endl;
if( d->info->visibleIconName() && d->info->visibleIconName()[ 0 ] != '\0' )
- return QString::fromUtf8( d->info->visibleIconName());
+ return TQString::fromUtf8( d->info->visibleIconName());
if( d->info->iconName() && d->info->iconName()[ 0 ] != '\0' )
- return QString::fromUtf8( d->info->iconName());
+ return TQString::fromUtf8( d->info->iconName());
if( !d->iconic_name_.isEmpty())
return d->iconic_name_;
#endif
return visibleName();
}
-QString KWin::WindowInfo::iconName() const
+TQString KWin::WindowInfo::iconName() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMIconName ) == 0, 176 )
<< "Pass NET::WMIconName to KWin::windowInfo()" << endl;
if( d->info->iconName() && d->info->iconName()[ 0 ] != '\0' )
- return QString::fromUtf8( d->info->iconName());
+ return TQString::fromUtf8( d->info->iconName());
if( !d->iconic_name_.isEmpty())
return d->iconic_name_;
#endif
@@ -1068,25 +1068,25 @@ int KWin::WindowInfo::desktop() const
#endif
}
-QRect KWin::WindowInfo::geometry() const
+TQRect KWin::WindowInfo::geometry() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMGeometry ) == 0, 176 )
<< "Pass NET::WMGeometry to KWin::windowInfo()" << endl;
return d->geometry_;
#else
- return QRect( 100, 100, 200, 200 );
+ return TQRect( 100, 100, 200, 200 );
#endif
}
-QRect KWin::WindowInfo::frameGeometry() const
+TQRect KWin::WindowInfo::frameGeometry() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS ] & NET::WMKDEFrameStrut ) == 0, 176 )
<< "Pass NET::WMKDEFrameStrut to KWin::windowInfo()" << endl;
return d->frame_geometry_;
#else
- return QRect();
+ return TQRect();
#endif
}
@@ -1112,7 +1112,7 @@ WId KWin::WindowInfo::groupLeader() const
#endif
}
-QCString KWin::WindowInfo::windowClassClass() const
+TQCString KWin::WindowInfo::windowClassClass() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowClass ) == 0, 176 )
@@ -1123,7 +1123,7 @@ QCString KWin::WindowInfo::windowClassClass() const
#endif
}
-QCString KWin::WindowInfo::windowClassName() const
+TQCString KWin::WindowInfo::windowClassName() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowClass ) == 0, 176 )
@@ -1134,7 +1134,7 @@ QCString KWin::WindowInfo::windowClassName() const
#endif
}
-QCString KWin::WindowInfo::windowRole() const
+TQCString KWin::WindowInfo::windowRole() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2WindowRole ) == 0, 176 )
@@ -1145,7 +1145,7 @@ QCString KWin::WindowInfo::windowRole() const
#endif
}
-QCString KWin::WindowInfo::clientMachine() const
+TQCString KWin::WindowInfo::clientMachine() const
{
#ifdef Q_WS_X11
kdWarning(( d->info->passedProperties()[ NETWinInfo::PROTOCOLS2 ] & NET::WM2ClientMachine ) == 0, 176 )
@@ -1236,14 +1236,14 @@ bool KWin::allowedActionsSupported()
#endif
}
-QString KWin::readNameProperty( WId win, unsigned long atom )
+TQString KWin::readNameProperty( WId win, unsigned long atom )
{
#ifdef Q_WS_X11
XTextProperty tp;
char **text = NULL;
int count;
#endif
- QString result;
+ TQString result;
#ifdef Q_WS_X11
if ( XGetTextProperty( qt_xdisplay(), win, &tp, atom ) != 0 && tp.value != NULL )
{
@@ -1251,13 +1251,13 @@ QString KWin::readNameProperty( WId win, unsigned long atom )
kwin_UTF8_STRING = XInternAtom( qt_xdisplay(), "UTF8_STRING", False);
if ( tp.encoding == kwin_UTF8_STRING ) {
- result = QString::fromUtf8 ( (const char*) tp.value );
+ result = TQString::fromUtf8 ( (const char*) tp.value );
}
else if ( XmbTextPropertyToTextList( qt_xdisplay(), &tp, &text, &count) == Success &&
text != NULL && count > 0 ) {
- result = QString::fromLocal8Bit( text[0] );
+ result = TQString::fromLocal8Bit( text[0] );
} else if ( tp.encoding == XA_STRING )
- result = QString::fromLocal8Bit( (const char*) tp.value );
+ result = TQString::fromLocal8Bit( (const char*) tp.value );
if( text != NULL )
XFreeStringList( text );
XFree( tp.value );
diff --git a/kdecore/kwin.h b/kdecore/kwin.h
index 45d0eede9..36cccb125 100644
--- a/kdecore/kwin.h
+++ b/kdecore/kwin.h
@@ -20,9 +20,9 @@
#define KWIN_H
#include <sys/types.h>
-#include <qwindowdefs.h>
-#include <qstring.h>
-#include <qpixmap.h>
+#include <tqwindowdefs.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
#include "kdelibs_export.h"
#ifdef Q_OS_UNIX
@@ -145,18 +145,18 @@ public:
/**
* Sets the parent window of @p subwindow to be @p mainwindow.
- * This overrides the parent set the usual way as the QWidget parent,
+ * This overrides the parent set the usual way as the TQWidget parent,
* but only for the window manager - e.g. stacking order and window grouping
* will be affected, but features like automatic deletion of children
* when the parent is deleted are unaffected and normally use
- * the QWidget parent.
+ * the TQWidget parent.
*
* This function should be used before a dialog is shown for a window
* that belongs to another application.
*
* @since 3.4
*/
- static void setMainWindow( QWidget* subwindow, WId mainwindow );
+ static void setMainWindow( TQWidget* subwindow, WId mainwindow );
/**
* Makes @p trayWin a system tray window for @p forWin.
@@ -218,7 +218,7 @@ public:
* icon will not be modified.
* @return the icon of the window
*/
- static QPixmap icon( WId win, int width = -1, int height = -1, bool scale = false );
+ static TQPixmap icon( WId win, int width = -1, int height = -1, bool scale = false );
/**
* Masks specifying from which sources to read an icon. They are tried from the best
@@ -248,7 +248,7 @@ public:
* @param flags OR-ed flags from the IconSource enum
* @since 3.2
*/
- static QPixmap icon( WId win, int width, int height, bool scale, int flags );
+ static TQPixmap icon( WId win, int width, int height, bool scale, int flags );
/**
* Sets an @p icon and a @p miniIcon on window @p win
@@ -256,7 +256,7 @@ public:
* @param icon the new icon
* @param miniIcon the new mini icon
*/
- static void setIcons( WId win, const QPixmap& icon, const QPixmap& miniIcon );
+ static void setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon );
/**
* Sets the type of window @p win to @p windowType.
@@ -397,7 +397,7 @@ public:
* @param viewport the position of the new viewport
* @since 3.5.5
*/
- static void setCurrentDesktopViewport( int desktop, QPoint viewport );
+ static void setCurrentDesktopViewport( int desktop, TQPoint viewport );
/**
* Iconifies a window. Compatible to XIconifyWindow but has an
@@ -422,7 +422,7 @@ public:
/**
* Raises the given window. This call is only for pagers and similar
* tools that represent direct user actions. Applications should not
- * use it, they should keep using QWidget::raise() or XRaiseWindow()
+ * use it, they should keep using TQWidget::raise() or XRaiseWindow()
* if necessary.
* @since 3.2
*/
@@ -431,7 +431,7 @@ public:
/**
* Lowers the given window. This call is only for pagers and similar
* tools that represent direct user actions. Applications should not
- * use it, they should keep using QWidget::lower() or XLowerWindow()
+ * use it, they should keep using TQWidget::lower() or XLowerWindow()
* if necessary.
* @since 3.2
*/
@@ -455,7 +455,7 @@ public:
* property (WM_NAME, WM_ICON_NAME,...).
* @since 3.2
*/
- static QString readNameProperty( WId window, unsigned long atom );
+ static TQString readNameProperty( WId window, unsigned long atom );
/**
* Returns true if a compositing manager is running (i.e. ARGB windows
@@ -481,9 +481,9 @@ public:
/// The window type.
NET::WindowType windowType;
/// The visible name of the window.
- QString visibleName;
+ TQString visibleName;
/// The name of the window.
- QString name;
+ TQString name;
/// The number of the window's desktop.
int desktop;
/// true if the window is on all desktops.
@@ -491,11 +491,11 @@ public:
/// The process id of the window's owner
pid_t pid;
/// Position and size of the window contents.
- QRect geometry;
+ TQRect geometry;
/// Position and size of the window's frame.
- QRect frameGeometry;
+ TQRect frameGeometry;
- QString visibleNameWithState() const;
+ TQString visibleNameWithState() const;
};
/**
@@ -526,7 +526,7 @@ public:
* Reads all the info about the given window.
*/
WindowInfo( WId window, unsigned long properties, unsigned long properties2 );
- WindowInfo(); // to make QValueList and others happy
+ WindowInfo(); // to make TQValueList and others happy
~WindowInfo();
/**
* Returns false if this window info is not valid (most probably the given
@@ -554,7 +554,7 @@ public:
* Returns true if the window is minimized. Note that it is true only if
* the window is truly minimized, not shaded or on another virtual desktops,
* which makes it different from mappingState() == NET::Iconic
- * or QWidget::isMinimized().
+ * or TQWidget::isMinimized().
* Requires NET::WMState and NET::XAWMState passed to KWin::windowInfo().
*/
bool isMinimized() const;
@@ -587,7 +587,7 @@ public:
* when there are two or more windows with the same name).
* Requires NET::WMVisibleName passed to KWin::windowInfo().
*/
- QString visibleName() const;
+ TQString visibleName() const;
/**
* Returns a visible name with state.
*
@@ -597,20 +597,20 @@ public:
* to KWin::windowInfo().
* @return the window name with state
*/
- QString visibleNameWithState() const;
+ TQString visibleNameWithState() const;
/**
* Returns the name of the window, as specified by the application, without
* any modifications. You should often use visibleName() instead.
* Requires NET::WMName passed to KWin::windowInfo().
*/
- QString name() const;
+ TQString name() const;
/**
* Returns the visible name of the window that should be shown in taskbar
* and all other "iconic" representations of the window. Note that this
* has nothing to do with normal icons.
* Requires NET::WMVisibleIconName passed to KWin::windowInfo().
*/
- QString visibleIconName() const;
+ TQString visibleIconName() const;
/**
* Returns a visible name with state.
*
@@ -621,14 +621,14 @@ public:
* to KWin::windowInfo().
* @return the window iconic name with state
*/
- QString visibleIconNameWithState() const;
+ TQString visibleIconNameWithState() const;
/**
* Returns the name of the window that should be shown in taskbar and all other
* "iconic" representations of the window. Note that this has nothing to do
* with normal icons.
* Requires NET::WMIconName passed to KWin::windowInfo().
*/
- QString iconName() const;
+ TQString iconName() const;
/**
* Returns true if the window is on the currently active virtual desktop.
* Requires NET::WMDesktop passed to KWin::windowInfo().
@@ -655,12 +655,12 @@ public:
* Returns the position and size of the window contents.
* Requires NET::WMGeometry passed to KWin::windowInfo().
*/
- QRect geometry() const;
+ TQRect geometry() const;
/**
* Returns the frame geometry of the window, i.e. including the window decoration.
* Requires NET::WMKDEFrameStrut passed to KWin::windowInfo().
*/
- QRect frameGeometry() const;
+ TQRect frameGeometry() const;
/**
* Returns the WM_TRANSIENT_FOR property for the window, i.e. the mainwindow
* for this window.
@@ -679,7 +679,7 @@ public:
* Requires NET::WM2WindowClass passed to KWin::windowInfo().
* @since 3.3
*/
- QCString windowClassClass() const;
+ TQCString windowClassClass() const;
/**
* Returns the name component of the window class for the window
@@ -687,21 +687,21 @@ public:
* Requires NET::WM2WindowClass passed to KWin::windowInfo().
* @since 3.3
*/
- QCString windowClassName() const;
+ TQCString windowClassName() const;
/**
* Returns the window role for the window (i.e. WM_WINDOW_ROLE property).
* Requires NET::WM2WindowRole passed to KWin::windowInfo().
* @since 3.3
*/
- QCString windowRole() const;
+ TQCString windowRole() const;
/**
* Returns the client machine for the window (i.e. WM_CLIENT_MACHINE property).
* Requires NET::WMClientMachine passed to KWin::windowInfo().
* @since 3.3
*/
- QCString clientMachine() const;
+ TQCString clientMachine() const;
/**
* Returns true if the given action is currently supported for the window
diff --git a/kdecore/kwinmodule.cpp b/kdecore/kwinmodule.cpp
index 9e3532b0f..7e4d4f773 100644
--- a/kdecore/kwinmodule.cpp
+++ b/kdecore/kwinmodule.cpp
@@ -21,15 +21,15 @@
Boston, MA 02110-1301, USA.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11 //FIXME
#include "kwinmodule.h"
#include "kwin.h"
#include <X11/Xatom.h>
#include "kapplication.h"
#include "kdebug.h"
-#include <qtl.h>
-#include <qptrlist.h>
+#include <tqtl.h>
+#include <tqptrlist.h>
#include <klocale.h>
#include <dcopclient.h>
#include "netwm.h"
@@ -58,11 +58,11 @@ static unsigned long desktop_properties[ 2 ] = {
NET::KDESystemTrayWindows,
NET::WM2ShowingDesktop };
-class KWinModulePrivate : public QWidget, public NETRootInfo4
+class KWinModulePrivate : public TQWidget, public NETRootInfo4
{
public:
KWinModulePrivate(int _what)
- : QWidget(0,0), NETRootInfo4( qt_xdisplay(),
+ : TQWidget(0,0), NETRootInfo4( qt_xdisplay(),
_what >= KWinModule::INFO_WINDOWS ?
windows_properties : desktop_properties,
2,
@@ -79,23 +79,23 @@ public:
~KWinModulePrivate()
{
}
- QPtrList<KWinModule> modules;
+ TQPtrList<KWinModule> modules;
- QValueList<WId> windows;
- QValueList<WId> stackingOrder;
- QValueList<WId> systemTrayWindows;
+ TQValueList<WId> windows;
+ TQValueList<WId> stackingOrder;
+ TQValueList<WId> systemTrayWindows;
struct StrutData
{
StrutData( WId window_, const NETStrut& strut_, int desktop_ )
: window( window_ ), strut( strut_ ), desktop( desktop_ ) {};
- StrutData() {}; // for QValueList to be happy
+ StrutData() {}; // for TQValueList to be happy
WId window;
NETStrut strut;
int desktop;
};
- QValueList<StrutData> strutWindows;
- QValueList<WId> possibleStrutWindows;
+ TQValueList<StrutData> strutWindows;
+ TQValueList<WId> possibleStrutWindows;
bool strutSignalConnected;
int what;
@@ -109,18 +109,18 @@ public:
void updateStackingOrder();
bool removeStrutWindow( WId );
- QSize numberOfViewports(int desktop) const;
- QPoint currentViewport(int desktop) const;
+ TQSize numberOfViewports(int desktop) const;
+ TQPoint currentViewport(int desktop) const;
};
-KWinModule::KWinModule( QObject* parent )
- : QObject( parent, "kwin_module" )
+KWinModule::KWinModule( TQObject* parent )
+ : TQObject( parent, "kwin_module" )
{
init(INFO_ALL);
}
-KWinModule::KWinModule( QObject* parent, int what )
- : QObject( parent, "kwin_module" )
+KWinModule::KWinModule( TQObject* parent, int what )
+ : TQObject( parent, "kwin_module" )
{
init(what);
}
@@ -138,11 +138,11 @@ void KWinModule::init(int what)
}
else if (static_d->what < what)
{
- QPtrList<KWinModule> modules = static_d->modules;
+ TQPtrList<KWinModule> modules = static_d->modules;
delete static_d;
static_d = new KWinModulePrivate(what);
static_d->modules = modules;
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
(*mit)->d = static_d;
}
@@ -159,12 +159,12 @@ KWinModule::~KWinModule()
}
}
-const QValueList<WId>& KWinModule::windows() const
+const TQValueList<WId>& KWinModule::windows() const
{
return d->windows;
}
-const QValueList<WId>& KWinModule::stackingOrder() const
+const TQValueList<WId>& KWinModule::stackingOrder() const
{
return d->stackingOrder;
}
@@ -175,16 +175,16 @@ bool KWinModule::hasWId(WId w) const
return d->windows.findIndex( w ) != -1;
}
-const QValueList<WId>& KWinModule::systemTrayWindows() const
+const TQValueList<WId>& KWinModule::systemTrayWindows() const
{
return d->systemTrayWindows;
}
-QSize KWinModulePrivate::numberOfViewports(int desktop) const
+TQSize KWinModulePrivate::numberOfViewports(int desktop) const
{
NETSize netdesktop = desktopGeometry(desktop);
- QSize s(netdesktop.width / QApplication::desktop()->width(),
- netdesktop.height / QApplication::desktop()->height());
+ TQSize s(netdesktop.width / TQApplication::desktop()->width(),
+ netdesktop.height / TQApplication::desktop()->height());
// workaround some kwin bugs
if (s.width() < 1) s.setWidth(1);
@@ -192,12 +192,12 @@ QSize KWinModulePrivate::numberOfViewports(int desktop) const
return s;
}
-QPoint KWinModulePrivate::currentViewport(int desktop) const
+TQPoint KWinModulePrivate::currentViewport(int desktop) const
{
NETPoint netviewport = desktopViewport(desktop);
- return QPoint(1+(netviewport.x / QApplication::desktop()->width()),
- 1+(netviewport.y / QApplication::desktop()->height()));
+ return TQPoint(1+(netviewport.x / TQApplication::desktop()->width()),
+ 1+(netviewport.y / TQApplication::desktop()->height()));
}
bool KWinModulePrivate::x11Event( XEvent * ev )
@@ -211,36 +211,36 @@ bool KWinModulePrivate::x11Event( XEvent * ev )
NETRootInfo::event( ev, m, 5 );
if (( m[ PROTOCOLS ] & CurrentDesktop ) && currentDesktop() != old_current_desktop )
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->currentDesktopChanged( currentDesktop() );
if (( m[ PROTOCOLS ] & ActiveWindow ) && activeWindow() != old_active_window )
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->activeWindowChanged( activeWindow() );
if ( m[ PROTOCOLS ] & DesktopViewport ) {
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->currentDesktopViewportChanged(currentDesktop(),
currentViewport(currentDesktop()));
}
if ( m[ PROTOCOLS ] & DesktopGeometry ) {
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->desktopGeometryChanged(currentDesktop());
}
if ( m[ PROTOCOLS ] & DesktopNames )
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->desktopNamesChanged();
if (( m[ PROTOCOLS ] & NumberOfDesktops ) && numberOfDesktops() != old_number_of_desktops )
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->numberOfDesktopsChanged( numberOfDesktops() );
if ( m[ PROTOCOLS ] & WorkArea )
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->workAreaChanged();
if ( m[ PROTOCOLS ] & ClientListStacking ) {
updateStackingOrder();
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->stackingOrderChanged();
}
if(( m[ PROTOCOLS2 ] & WM2ShowingDesktop ) && showingDesktop() != old_showing_desktop ) {
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->showingDesktopChanged( showingDesktop());
}
} else if ( windows.findIndex( ev->xany.window ) != -1 ){
@@ -261,7 +261,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev )
possibleStrutWindows.append( ev->xany.window );
}
if ( dirty[ NETWinInfo::PROTOCOLS ] || dirty[ NETWinInfo::PROTOCOLS2 ] ) {
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
emit (*mit)->windowChanged( ev->xany.window );
emit (*mit)->windowChanged( ev->xany.window, dirty );
emit (*mit)->windowChanged( ev->xany.window, dirty[ NETWinInfo::PROTOCOLS ] );
@@ -276,7 +276,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev )
bool KWinModulePrivate::removeStrutWindow( WId w )
{
- for( QValueList< StrutData >::Iterator it = strutWindows.begin();
+ for( TQValueList< StrutData >::Iterator it = strutWindows.begin();
it != strutWindows.end();
++it )
if( (*it).window == w ) {
@@ -295,7 +295,7 @@ void KWinModulePrivate::updateStackingOrder()
void KWinModulePrivate::addClient(Window w)
{
- if ( (what >= KWinModule::INFO_WINDOWS) && !QWidget::find( w ) )
+ if ( (what >= KWinModule::INFO_WINDOWS) && !TQWidget::find( w ) )
XSelectInput( qt_xdisplay(), w, PropertyChangeMask | StructureNotifyMask );
bool emit_strutChanged = false;
if( strutSignalConnected && modules.count() > 0 ) {
@@ -308,7 +308,7 @@ void KWinModulePrivate::addClient(Window w)
} else
possibleStrutWindows.append( w );
windows.append( w );
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
emit (*mit)->windowAdded( w );
if ( emit_strutChanged )
emit (*mit)->strutChanged();
@@ -327,7 +327,7 @@ void KWinModulePrivate::removeClient(Window w)
}
possibleStrutWindows.remove( w );
windows.remove( w );
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) {
emit (*mit)->windowRemoved( w );
if ( emit_strutChanged )
emit (*mit)->strutChanged();
@@ -337,14 +337,14 @@ void KWinModulePrivate::removeClient(Window w)
void KWinModulePrivate::addSystemTrayWin(Window w)
{
systemTrayWindows.append( w );
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->systemTrayWindowAdded( w );
}
void KWinModulePrivate::removeSystemTrayWin(Window w)
{
systemTrayWindows.remove( w );
- for ( QPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
+ for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->systemTrayWindowRemoved( w );
}
@@ -358,12 +358,12 @@ int KWinModule::numberOfDesktops() const
return d->numberOfDesktops();
}
-QSize KWinModule::numberOfViewports(int desktop) const
+TQSize KWinModule::numberOfViewports(int desktop) const
{
return d->numberOfViewports(desktop);
}
-QPoint KWinModule::currentViewport(int desktop) const
+TQPoint KWinModule::currentViewport(int desktop) const
{
return d->currentViewport(desktop);
}
@@ -378,26 +378,26 @@ bool KWinModule::showingDesktop() const
return d->showingDesktop();
}
-QRect KWinModule::workArea( int desktop ) const
+TQRect KWinModule::workArea( int desktop ) const
{
int desk = (desktop > 0 && desktop <= (int) d->numberOfDesktops() ) ? desktop : currentDesktop();
if ( desk <= 0 )
- return QApplication::desktop()->geometry();
+ return TQApplication::desktop()->geometry();
NETRect r = d->workArea( desk );
if( r.size.width <= 0 || r.size.height <= 0 ) // not set
- return QApplication::desktop()->geometry();
- return QRect( r.pos.x, r.pos.y, r.size.width, r.size.height );
+ return TQApplication::desktop()->geometry();
+ return TQRect( r.pos.x, r.pos.y, r.size.width, r.size.height );
}
-QRect KWinModule::workArea( const QValueList<WId>& exclude, int desktop ) const
+TQRect KWinModule::workArea( const TQValueList<WId>& exclude, int desktop ) const
{
- QRect all = QApplication::desktop()->geometry();
- QRect a = all;
+ TQRect all = TQApplication::desktop()->geometry();
+ TQRect a = all;
if (desktop == -1)
desktop = d->currentDesktop();
- QValueList<WId>::ConstIterator it1;
+ TQValueList<WId>::ConstIterator it1;
for( it1 = d->windows.begin(); it1 != d->windows.end(); ++it1 ) {
if(exclude.findIndex(*it1) != -1) continue;
@@ -406,7 +406,7 @@ QRect KWinModule::workArea( const QValueList<WId>& exclude, int desktop ) const
// to repeatedly find out struts of all windows. Therefore strut values for strut
// windows are cached here.
NETStrut strut;
- QValueList< KWinModulePrivate::StrutData >::Iterator it2 = d->strutWindows.begin();
+ TQValueList< KWinModulePrivate::StrutData >::Iterator it2 = d->strutWindows.begin();
for( ;
it2 != d->strutWindows.end();
++it2 )
@@ -426,7 +426,7 @@ QRect KWinModule::workArea( const QValueList<WId>& exclude, int desktop ) const
} else
continue; // not a strut window
- QRect r = all;
+ TQRect r = all;
if ( strut.left > 0 )
r.setLeft( r.left() + (int) strut.left );
if ( strut.top > 0 )
@@ -443,20 +443,20 @@ QRect KWinModule::workArea( const QValueList<WId>& exclude, int desktop ) const
void KWinModule::connectNotify( const char* signal )
{
- if( !d->strutSignalConnected && qstrcmp( signal, SIGNAL(strutChanged())) == 0 )
+ if( !d->strutSignalConnected && qstrcmp( signal, TQT_SIGNAL(strutChanged())) == 0 )
d->strutSignalConnected = true;
- QObject::connectNotify( signal );
+ TQObject::connectNotify( signal );
}
-QString KWinModule::desktopName( int desktop ) const
+TQString KWinModule::desktopName( int desktop ) const
{
const char* name = d->desktopName( (desktop > 0 && desktop <= (int) d->numberOfDesktops() ) ? desktop : currentDesktop() );
if ( name && name[0] )
- return QString::fromUtf8( name );
+ return TQString::fromUtf8( name );
return i18n("Desktop %1").arg( desktop );
}
-void KWinModule::setDesktopName( int desktop, const QString& name )
+void KWinModule::setDesktopName( int desktop, const TQString& name )
{
if (desktop <= 0 || desktop > (int) d->numberOfDesktops() )
desktop = currentDesktop();
@@ -464,15 +464,15 @@ void KWinModule::setDesktopName( int desktop, const QString& name )
}
-void KWinModule::doNotManage( const QString& title )
+void KWinModule::doNotManage( const TQString& title )
{
if ( !kapp->dcopClient()->isAttached() )
kapp->dcopClient()->attach();
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << title;
- kapp->dcopClient()->call("kwin", "", "doNotManage(QString)",
+ kapp->dcopClient()->call("kwin", "", "doNotManage(TQString)",
data, replyType, replyData);
}
diff --git a/kdecore/kwinmodule.h b/kdecore/kwinmodule.h
index d0e9624b9..f680d561d 100644
--- a/kdecore/kwinmodule.h
+++ b/kdecore/kwinmodule.h
@@ -23,8 +23,8 @@
#ifndef KWINMODULE_H
#define KWINMODULE_H
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#include "kdelibs_export.h"
#ifdef Q_OS_UNIX
@@ -83,15 +83,15 @@ public:
* systemTrayWindowRemoved,
* windowChanged,
* strutChanged,
- * workArea(const QValueList<WId> &excludes, int desktop)
+ * workArea(const TQValueList<WId> &excludes, int desktop)
**/
- KWinModule( QObject* parent, int what );
+ KWinModule( TQObject* parent, int what );
/**
* Creates a KWinModule object and connects to the window
* manager.
* @param parent the parent for the QObject
**/
- KWinModule( QObject* parent = 0 );
+ KWinModule( TQObject* parent = 0 );
/**
* Destructor. Internal cleanup, nothing fancy.
@@ -108,7 +108,7 @@ public:
*
* Iteration over this list can be done easily with
* \code
- * QValueList<WId>::ConstIterator it;
+ * TQValueList<WId>::ConstIterator it;
* for ( it = module->windows().begin();
* it != modules->windows().end(); ++it ) {
* ... do something here, (*it) is the current WId.
@@ -116,7 +116,7 @@ public:
* \endcode
* @return the list of all toplevel windows
*/
- const QValueList<WId>& windows() const;
+ const TQValueList<WId>& windows() const;
/**
* Returns the list of all toplevel windows currently managed by the
@@ -124,7 +124,7 @@ public:
* higher). May be useful for pagers.
* @return the list of all toplevel windows in stacking order
*/
- const QValueList<WId>& stackingOrder() const;
+ const TQValueList<WId>& stackingOrder() const;
/**
* Test to see if @p id still managed at present.
@@ -137,7 +137,7 @@ public:
* Returns a list of the system tray windows.
* @return a list of all system tray windows
**/
- const QValueList<WId>& systemTrayWindows() const;
+ const TQValueList<WId>& systemTrayWindows() const;
/**
* Returns the current virtual desktop.
@@ -157,14 +157,14 @@ public:
* @return the number of virtual desktops
* @since 3.5.5
**/
- QSize numberOfViewports(int desktop) const;
+ TQSize numberOfViewports(int desktop) const;
/**
* Returns the current viewport on the given virtual desktop
* @return the number of virtual desktops
* @since 3.5.5
**/
- QPoint currentViewport(int desktop) const;
+ TQPoint currentViewport(int desktop) const;
/**
* Returns the currently active window, or 0 if no window is active.
@@ -180,7 +180,7 @@ public:
* current desktop
* @return the size and position of the desktop
**/
- QRect workArea( int desktop = - 1 ) const;
+ TQRect workArea( int desktop = - 1 ) const;
/**
@@ -193,21 +193,21 @@ public:
* current desktop
* @return the size and position of the desktop
**/
- QRect workArea( const QValueList<WId> &excludes, int desktop = -1) const;
+ TQRect workArea( const TQValueList<WId> &excludes, int desktop = -1) const;
/**
* Returns the name of the specified desktop.
* @param desktop the number of the desktop
* @return the name of the desktop
**/
- QString desktopName( int desktop ) const;
+ TQString desktopName( int desktop ) const;
/**
* Sets the name of the specified desktop.
* @param desktop the number of the desktop
* @param name the new name for the desktop
**/
- void setDesktopName( int desktop, const QString& name );
+ void setDesktopName( int desktop, const TQString& name );
/**
* Returns the state of showing the desktop.
@@ -224,7 +224,7 @@ public:
*
* @param title the title of the window
*/
- void doNotManage( const QString& title );
+ void doNotManage( const TQString& title );
signals:
@@ -340,7 +340,7 @@ signals:
* The viewport position has changed
* @since 3.5
*/
- void currentDesktopViewportChanged(int desktop, const QPoint& viewport);
+ void currentDesktopViewportChanged(int desktop, const TQPoint& viewport);
protected:
virtual void connectNotify( const char* signal );
diff --git a/kdecore/kxerrorhandler.cpp b/kdecore/kxerrorhandler.cpp
index c632012d2..43a05f42e 100644
--- a/kdecore/kxerrorhandler.cpp
+++ b/kdecore/kxerrorhandler.cpp
@@ -22,7 +22,7 @@
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11 //FIXME
#include "kxerrorhandler.h"
diff --git a/kdecore/kxerrorhandler.h b/kdecore/kxerrorhandler.h
index 2140bbd44..9c0bd1e24 100644
--- a/kdecore/kxerrorhandler.h
+++ b/kdecore/kxerrorhandler.h
@@ -25,8 +25,8 @@
#ifndef KXERRORHANDLER_H
#define KXERRORHANDLER_H
-#include <qvaluelist.h>
-#include <qwindowdefs.h>
+#include <tqvaluelist.h>
+#include <tqwindowdefs.h>
#include <kdelibs_export.h>
#include <X11/Xlib.h>
diff --git a/kdecore/kxmessages.cpp b/kdecore/kxmessages.cpp
index b730c73a7..6b6f971a2 100644
--- a/kdecore/kxmessages.cpp
+++ b/kdecore/kxmessages.cpp
@@ -37,8 +37,8 @@ DEALINGS IN THE SOFTWARE.
const long BROADCAST_MASK = PropertyChangeMask;
// CHECKME
-KXMessages::KXMessages( const char* accept_broadcast_P, QWidget* parent_P )
- : QWidget( parent_P )
+KXMessages::KXMessages( const char* accept_broadcast_P, TQWidget* parent_P )
+ : TQWidget( parent_P )
{
if( accept_broadcast_P != NULL )
{
@@ -51,11 +51,11 @@ KXMessages::KXMessages( const char* accept_broadcast_P, QWidget* parent_P )
{
accept_atom1 = accept_atom2 = None;
}
- handle = new QWidget( this );
+ handle = new TQWidget( this );
}
-KXMessages::KXMessages( const char* accept_broadcast_P, QWidget* parent_P, bool obsolete_P )
- : QWidget( parent_P )
+KXMessages::KXMessages( const char* accept_broadcast_P, TQWidget* parent_P, bool obsolete_P )
+ : TQWidget( parent_P )
{
if( accept_broadcast_P != NULL )
{
@@ -63,13 +63,13 @@ KXMessages::KXMessages( const char* accept_broadcast_P, QWidget* parent_P, bool
kapp->installX11EventFilter( this ); // i.e. PropertyChangeMask
accept_atom2 = XInternAtom( qt_xdisplay(), accept_broadcast_P, false );
accept_atom1 = obsolete_P ? accept_atom2
- : XInternAtom( qt_xdisplay(), QCString( accept_broadcast_P ) + "_BEGIN", false );
+ : XInternAtom( qt_xdisplay(), TQCString( accept_broadcast_P ) + "_BEGIN", false );
}
else
{
accept_atom1 = accept_atom2 = None;
}
- handle = new QWidget( this );
+ handle = new TQWidget( this );
}
KXMessages::~KXMessages()
@@ -78,47 +78,47 @@ KXMessages::~KXMessages()
}
-void KXMessages::broadcastMessage( const char* msg_type_P, const QString& message_P )
+void KXMessages::broadcastMessage( const char* msg_type_P, const TQString& message_P )
{
broadcastMessage( msg_type_P, message_P, -1, true );
}
-void KXMessages::broadcastMessage( const char* msg_type_P, const QString& message_P,
+void KXMessages::broadcastMessage( const char* msg_type_P, const TQString& message_P,
int screen_P, bool obsolete_P )
{
Atom a2 = XInternAtom( qt_xdisplay(), msg_type_P, false );
- Atom a1 = obsolete_P ? a2 : XInternAtom( qt_xdisplay(), QCString( msg_type_P ) + "_BEGIN", false );
+ Atom a1 = obsolete_P ? a2 : XInternAtom( qt_xdisplay(), TQCString( msg_type_P ) + "_BEGIN", false );
Window root = screen_P == -1 ? qt_xrootwin() : qt_xrootwin( screen_P );
send_message_internal( root, message_P, BROADCAST_MASK, qt_xdisplay(),
a1, a2, handle->winId());
}
-void KXMessages::sendMessage( WId w_P, const char* msg_type_P, const QString& message_P )
+void KXMessages::sendMessage( WId w_P, const char* msg_type_P, const TQString& message_P )
{
sendMessage( w_P, msg_type_P, message_P, true );
}
-void KXMessages::sendMessage( WId w_P, const char* msg_type_P, const QString& message_P,
+void KXMessages::sendMessage( WId w_P, const char* msg_type_P, const TQString& message_P,
bool obsolete_P )
{
Atom a2 = XInternAtom( qt_xdisplay(), msg_type_P, false );
- Atom a1 = obsolete_P ? a2 : XInternAtom( qt_xdisplay(), QCString( msg_type_P ) + "_BEGIN", false );
+ Atom a1 = obsolete_P ? a2 : XInternAtom( qt_xdisplay(), TQCString( msg_type_P ) + "_BEGIN", false );
send_message_internal( w_P, message_P, 0, qt_xdisplay(), a1, a2, handle->winId());
}
bool KXMessages::broadcastMessageX( Display* disp, const char* msg_type_P,
- const QString& message_P )
+ const TQString& message_P )
{
return broadcastMessageX( disp, msg_type_P, message_P, -1, true );
}
bool KXMessages::broadcastMessageX( Display* disp, const char* msg_type_P,
- const QString& message_P, int screen_P, bool obsolete_P )
+ const TQString& message_P, int screen_P, bool obsolete_P )
{
if( disp == NULL )
return false;
Atom a2 = XInternAtom( disp, msg_type_P, false );
- Atom a1 = obsolete_P ? a2 : XInternAtom( disp, QCString( msg_type_P ) + "_BEGIN", false );
+ Atom a1 = obsolete_P ? a2 : XInternAtom( disp, TQCString( msg_type_P ) + "_BEGIN", false );
Window root = screen_P == -1 ? DefaultRootWindow( disp ) : RootWindow( disp, screen_P );
Window win = XCreateSimpleWindow( disp, root, 0, 0, 1, 1,
0, BlackPixel( disp, screen_P == -1 ? DefaultScreen( disp ) : screen_P ),
@@ -130,18 +130,18 @@ bool KXMessages::broadcastMessageX( Display* disp, const char* msg_type_P,
}
bool KXMessages::sendMessageX( Display* disp, WId w_P, const char* msg_type_P,
- const QString& message_P )
+ const TQString& message_P )
{
return sendMessageX( disp, w_P, msg_type_P, message_P, true );
}
bool KXMessages::sendMessageX( Display* disp, WId w_P, const char* msg_type_P,
- const QString& message_P, bool obsolete_P )
+ const TQString& message_P, bool obsolete_P )
{
if( disp == NULL )
return false;
Atom a2 = XInternAtom( disp, msg_type_P, false );
- Atom a1 = obsolete_P ? a2 : XInternAtom( disp, QCString( msg_type_P ) + "_BEGIN", false );
+ Atom a1 = obsolete_P ? a2 : XInternAtom( disp, TQCString( msg_type_P ) + "_BEGIN", false );
Window win = XCreateSimpleWindow( disp, DefaultRootWindow( disp ), 0, 0, 1, 1,
0, BlackPixelOfScreen( DefaultScreenOfDisplay( disp )),
BlackPixelOfScreen( DefaultScreenOfDisplay( disp )));
@@ -150,11 +150,11 @@ bool KXMessages::sendMessageX( Display* disp, WId w_P, const char* msg_type_P,
return true;
}
-void KXMessages::send_message_internal( WId w_P, const QString& msg_P, long mask_P,
+void KXMessages::send_message_internal( WId w_P, const TQString& msg_P, long mask_P,
Display* disp, Atom atom1_P, Atom atom2_P, Window handle_P )
{
unsigned int pos = 0;
- QCString msg = msg_P.utf8();
+ TQCString msg = msg_P.utf8();
unsigned int len = strlen( msg );
XEvent e;
e.xclient.type = ClientMessage;
@@ -179,9 +179,9 @@ void KXMessages::send_message_internal( WId w_P, const QString& msg_P, long mask
bool KXMessages::x11Event( XEvent* ev_P )
{
if( ev_P->type != ClientMessage || ev_P->xclient.format != 8 )
- return QWidget::x11Event( ev_P );
+ return TQWidget::x11Event( ev_P );
if( ev_P->xclient.message_type != accept_atom1 && ev_P->xclient.message_type != accept_atom2 )
- return QWidget::x11Event( ev_P );
+ return TQWidget::x11Event( ev_P );
char buf[ 21 ]; // can't be longer
int i;
for( i = 0;
@@ -193,7 +193,7 @@ bool KXMessages::x11Event( XEvent* ev_P )
{
if( ev_P->xclient.message_type == accept_atom1 && accept_atom1 != accept_atom2 )
// two different messages on the same window at the same time shouldn't happen anyway
- incoming_messages[ ev_P->xclient.window ] = QCString();
+ incoming_messages[ ev_P->xclient.window ] = TQCString();
incoming_messages[ ev_P->xclient.window ] += buf;
}
else
@@ -204,7 +204,7 @@ bool KXMessages::x11Event( XEvent* ev_P )
}
if( i < 20 ) // last message fragment
{
- emit gotMessage( QString::fromUtf8( incoming_messages[ ev_P->xclient.window ] ));
+ emit gotMessage( TQString::fromUtf8( incoming_messages[ ev_P->xclient.window ] ));
incoming_messages.remove( ev_P->xclient.window );
}
return false; // lets other KXMessages instances get the event too
diff --git a/kdecore/kxmessages.h b/kdecore/kxmessages.h
index 9595ebde5..8c71679fe 100644
--- a/kdecore/kxmessages.h
+++ b/kdecore/kxmessages.h
@@ -25,9 +25,9 @@ DEALINGS IN THE SOFTWARE.
#ifndef __KXMESSAGES_H
#define __KXMESSAGES_H
-#include <qwidget.h>
-#include <qcstring.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqcstring.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
#ifdef Q_WS_X11
#include <X11/X.h>
@@ -58,12 +58,12 @@ class KDECORE_EXPORT KXMessages
* @param obsolete always set to false (needed for backwards compatibility
* with KDE3.1 and older)
*/
- KXMessages( const char* accept_broadcast, QWidget* parent, bool obsolete );
+ KXMessages( const char* accept_broadcast, TQWidget* parent, bool obsolete );
/**
* @deprecated
* This method is equivalent to the other constructor with obsolete = true.
*/
- KXMessages( const char* accept_broadcast = NULL, QWidget* parent = NULL );
+ KXMessages( const char* accept_broadcast = NULL, TQWidget* parent = NULL );
virtual ~KXMessages();
/**
@@ -76,13 +76,13 @@ class KDECORE_EXPORT KXMessages
* @param obsolete always set to false (needed for backwards compatibility
* with KDE3.1 and older)
*/
- void sendMessage( WId w, const char* msg_type, const QString& message,
+ void sendMessage( WId w, const char* msg_type, const TQString& message,
bool obsolete );
/**
* @deprecated
* This method is equivalent to sendMessage() with obsolete = true.
*/
- void sendMessage( WId w, const char* msg_type, const QString& message );
+ void sendMessage( WId w, const char* msg_type, const TQString& message );
/**
* Broadcasts the given message with the given message type.
* @param msg_type the type of the message
@@ -91,13 +91,13 @@ class KDECORE_EXPORT KXMessages
* @param obsolete always set to false (needed for backwards compatibility
* with KDE3.1 and older)
*/
- void broadcastMessage( const char* msg_type, const QString& message,
+ void broadcastMessage( const char* msg_type, const TQString& message,
int screen, bool obsolete );
/**
* @deprecated
* This method is equivalent to broadcastMessage() with obsolete = true.
*/
- void broadcastMessage( const char* msg_type, const QString& message );
+ void broadcastMessage( const char* msg_type, const TQString& message );
/**
* Sends the given message with the given message type only to given
@@ -113,13 +113,13 @@ class KDECORE_EXPORT KXMessages
* @return false when an error occurred, true otherwise
*/
static bool sendMessageX( Display* disp, WId w, const char* msg_type,
- const QString& message, bool obsolete );
+ const TQString& message, bool obsolete );
/**
* @deprecated
* This method is equivalent to sendMessageX() with obsolete = true.
*/
static bool sendMessageX( Display* disp, WId w, const char* msg_type,
- const QString& message );
+ const TQString& message );
/**
* Broadcasts the given message with the given message type.
@@ -134,32 +134,32 @@ class KDECORE_EXPORT KXMessages
* @return false when an error occurred, true otherwise
*/
static bool broadcastMessageX( Display* disp, const char* msg_type,
- const QString& message, int screen, bool obsolete );
+ const TQString& message, int screen, bool obsolete );
/**
* @deprecated
* This method is equivalent to broadcastMessageX() with obsolete = true.
*/
static bool broadcastMessageX( Display* disp, const char* msg_type,
- const QString& message );
+ const TQString& message );
signals:
/**
* Emitted when a message was received.
* @param message the message that has been received
*/
- void gotMessage( const QString& message );
+ void gotMessage( const TQString& message );
protected:
/**
* @internal
*/
virtual bool x11Event( XEvent* ev );
private:
- static void send_message_internal( WId w_P, const QString& msg_P, long mask_P,
+ static void send_message_internal( WId w_P, const TQString& msg_P, long mask_P,
Display* disp, Atom atom1_P, Atom atom2_P, Window handle_P );
- QWidget* handle;
+ TQWidget* handle;
Atom accept_atom2;
- QCString cached_atom_name_; // KDE4 unused
+ TQCString cached_atom_name_; // KDE4 unused
Atom accept_atom1;
- QMap< WId, QCString > incoming_messages;
+ TQMap< WId, TQCString > incoming_messages;
KXMessagesPrivate* d;
};
diff --git a/kdecore/libintl.cpp b/kdecore/libintl.cpp
index 2b60302d3..aadfcd821 100644
--- a/kdecore/libintl.cpp
+++ b/kdecore/libintl.cpp
@@ -51,7 +51,7 @@ Boston, MA 02110-1301, USA. */
#include "kde_file.h"
#include <config.h>
-#include <qglobal.h>
+#include <tqglobal.h>
#include <stdlib.h>
diff --git a/kdecore/netsupp.cpp b/kdecore/netsupp.cpp
index ee8ddad23..6d56e147d 100644
--- a/kdecore/netsupp.cpp
+++ b/kdecore/netsupp.cpp
@@ -28,7 +28,7 @@
#include <unistd.h>
#include <arpa/inet.h>
-#include <qglobal.h>
+#include <tqglobal.h>
// This is so that, if addrinfo is defined, it doesn't clobber our definition
// It might be defined in the few cases in which we are replacing the system's
diff --git a/kdecore/netsupp.h b/kdecore/netsupp.h
index 66435d24b..4dba3f6cc 100644
--- a/kdecore/netsupp.h
+++ b/kdecore/netsupp.h
@@ -144,7 +144,7 @@ struct kde_sockaddr_in6
#define KAI_SYSTEM 0 /* data is all-system */
#define KAI_LOCALUNIX 1 /* data contains a Unix addrinfo allocated by us */
-#define KAI_QDNS 2 /* data contains data derived from QDns */
+#define KAI_QDNS 2 /* data contains data derived from TQDns */
struct addrinfo; /* forward declaration; this could be needed */
diff --git a/kdecore/netwm.cpp b/kdecore/netwm.cpp
index 9e7d4580e..9c8bd1283 100644
--- a/kdecore/netwm.cpp
+++ b/kdecore/netwm.cpp
@@ -25,7 +25,7 @@
//#define NETWMDEBUG
-#include <qwidget.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11 //FIXME
#include "netwm.h"
@@ -2798,8 +2798,8 @@ NET::Orientation NETRootInfo::desktopLayoutOrientation() const {
}
-QSize NETRootInfo::desktopLayoutColumnsRows() const {
- return QSize( p->desktop_layout_columns, p->desktop_layout_rows );
+TQSize NETRootInfo::desktopLayoutColumnsRows() const {
+ return TQSize( p->desktop_layout_columns, p->desktop_layout_rows );
}
diff --git a/kdecore/netwm.h b/kdecore/netwm.h
index b7ccfd351..cc39ada1d 100644
--- a/kdecore/netwm.h
+++ b/kdecore/netwm.h
@@ -28,7 +28,7 @@
#define __net_wm_h
#include "kdelibs_export.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -381,7 +381,7 @@ public:
Returns the desktop layout number of columns and rows. Note that
either may be 0 (see _NET_DESKTOP_LAYOUT).
**/
- QSize desktopLayoutColumnsRows() const;
+ TQSize desktopLayoutColumnsRows() const;
/**
Returns the desktop layout starting corner.
diff --git a/kdecore/netwm_def.h b/kdecore/netwm_def.h
index 94042cf1c..1f6860243 100644
--- a/kdecore/netwm_def.h
+++ b/kdecore/netwm_def.h
@@ -35,7 +35,7 @@
this class is to keep the implementation from being dependant on a
separate framework/library.
- NETPoint is only used by the NET API. Usually QPoint is the
+ NETPoint is only used by the NET API. Usually TQPoint is the
appropriate class for representing a point.
@author Bradley T. Hughes <bhughes@trolltech.com>
@@ -62,7 +62,7 @@ struct NETPoint {
existence of this class is to keep the implementation from being dependant
on a separate framework/library.
- NETSize is only used by the NET API. Usually QSize is the
+ NETSize is only used by the NET API. Usually TQSize is the
appropriate class for representing a size.
@author Bradley T. Hughes <bhughes@trolltech.com>
@@ -88,7 +88,7 @@ struct NETSize {
size width by height. The existence of this class is to keep the implementation
from being dependant on a separate framework/library;
- NETRect is only used by the NET API. Usually QRect is the
+ NETRect is only used by the NET API. Usually TQRect is the
appropriate class for representing a rectangle.
**/
struct NETRect {
diff --git a/kdecore/network/kbufferedsocket.cpp b/kdecore/network/kbufferedsocket.cpp
index 7207a9c4f..52d826c88 100644
--- a/kdecore/network/kbufferedsocket.cpp
+++ b/kdecore/network/kbufferedsocket.cpp
@@ -24,8 +24,8 @@
#include <config.h>
-#include <qmutex.h>
-#include <qtimer.h>
+#include <tqmutex.h>
+#include <tqtimer.h>
#include "ksocketdevice.h"
#include "ksocketaddress.h"
@@ -47,8 +47,8 @@ public:
}
};
-KBufferedSocket::KBufferedSocket(const QString& host, const QString& service,
- QObject *parent, const char *name)
+KBufferedSocket::KBufferedSocket(const TQString& host, const TQString& service,
+ TQObject *parent, const char *name)
: KStreamSocket(host, service, parent, name),
d(new KBufferedSocketPrivate)
{
@@ -86,7 +86,7 @@ void KBufferedSocket::close()
else
{
setState(Closing);
- QSocketNotifier *n = socketDevice()->readNotifier();
+ TQSocketNotifier *n = socketDevice()->readNotifier();
if (n)
n->setEnabled(false);
emit stateChanged(Closing);
@@ -177,7 +177,7 @@ Q_LONG KBufferedSocket::writeBlock(const char *data, Q_ULONG len)
resetError();
// enable notifier to send data
- QSocketNotifier *n = socketDevice()->writeNotifier();
+ TQSocketNotifier *n = socketDevice()->writeNotifier();
if (n)
n->setEnabled(true);
@@ -200,7 +200,7 @@ void KBufferedSocket::enableRead(bool enable)
if (!enable && d->input)
{
// reenable it
- QSocketNotifier *n = socketDevice()->readNotifier();
+ TQSocketNotifier *n = socketDevice()->readNotifier();
if (n)
n->setEnabled(true);
}
@@ -208,7 +208,7 @@ void KBufferedSocket::enableRead(bool enable)
if (enable && state() != Connected && d->input && !d->input->isEmpty())
// this means the buffer is still dirty
// allow the signal to be emitted
- QTimer::singleShot(0, this, SLOT(slotReadActivity()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReadActivity()));
}
void KBufferedSocket::enableWrite(bool enable)
@@ -217,7 +217,7 @@ void KBufferedSocket::enableWrite(bool enable)
if (!enable && d->output && !d->output->isEmpty())
{
// reenable it
- QSocketNotifier *n = socketDevice()->writeNotifier();
+ TQSocketNotifier *n = socketDevice()->writeNotifier();
if (n)
n->setEnabled(true);
}
@@ -243,7 +243,7 @@ void KBufferedSocket::stateChanging(SocketState newState)
void KBufferedSocket::setInputBuffering(bool enable)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (!enable)
{
delete d->input;
@@ -262,7 +262,7 @@ KIOBufferBase* KBufferedSocket::inputBuffer()
void KBufferedSocket::setOutputBuffering(bool enable)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (!enable)
{
delete d->output;
@@ -302,7 +302,7 @@ bool KBufferedSocket::canReadLine() const
return d->input->canReadLine();
}
-QCString KBufferedSocket::readLine()
+TQCString KBufferedSocket::readLine()
{
return d->input->readLine();
}
@@ -358,7 +358,7 @@ void KBufferedSocket::slotReadActivity()
{
// buffer isn't empty
// keep emitting signals till it is
- QTimer::singleShot(0, this, SLOT(slotReadActivity()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReadActivity()));
emit readyRead();
}
}
diff --git a/kdecore/network/kbufferedsocket.h b/kdecore/network/kbufferedsocket.h
index b0b99f8d1..d99862781 100644
--- a/kdecore/network/kbufferedsocket.h
+++ b/kdecore/network/kbufferedsocket.h
@@ -25,9 +25,9 @@
#ifndef KBUFFEREDSOCKET_H
#define KBUFFEREDSOCKET_H
-#include <qobject.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
#include "kstreamsocket.h"
#include <kdelibs_export.h>
@@ -49,7 +49,7 @@ class KBufferedSocketPrivate;
*
* @note Buffered sockets only make sense if you're using them from
* the main (event-loop) thread. This is actually a restriction
- * imposed by Qt's QSocketNotifier. If you want to use a socket
+ * imposed by Qt's TQSocketNotifier. If you want to use a socket
* in an auxiliary thread, please use KStreamSocket.
*
* @see KNetwork::KStreamSocket, KNetwork::KServerSocket
@@ -67,8 +67,8 @@ public:
* @param parent the parent object for this object
* @param name the internal name for this object
*/
- KBufferedSocket(const QString& node = QString::null, const QString& service = QString::null,
- QObject* parent = 0L, const char *name = 0L);
+ KBufferedSocket(const TQString& node = TQString::null, const TQString& service = TQString::null,
+ TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor.
@@ -195,7 +195,7 @@ public:
/**
* Reads a line of data from the socket buffers.
*/
- QCString readLine();
+ TQCString readLine();
// KDE4: make virtual, add timeout to match the Qt4 signature
// and move to another class up the hierarchy
diff --git a/kdecore/network/kclientsocketbase.cpp b/kdecore/network/kclientsocketbase.cpp
index b777dc8de..2da802d56 100644
--- a/kdecore/network/kclientsocketbase.cpp
+++ b/kdecore/network/kclientsocketbase.cpp
@@ -24,9 +24,9 @@
#include <config.h>
-#include <qsocketnotifier.h>
-#include <qtimer.h>
-#include <qmutex.h>
+#include <tqsocketnotifier.h>
+#include <tqtimer.h>
+#include <tqmutex.h>
#include "ksocketaddress.h"
#include "kresolver.h"
@@ -47,8 +47,8 @@ public:
bool enableRead : 1, enableWrite : 1;
};
-KClientSocketBase::KClientSocketBase(QObject *parent, const char *name)
- : QObject(parent, name), d(new KClientSocketBasePrivate)
+KClientSocketBase::KClientSocketBase(TQObject *parent, const char *name)
+ : TQObject(parent, name), d(new KClientSocketBasePrivate)
{
d->state = Idle;
d->enableRead = true;
@@ -74,7 +74,7 @@ void KClientSocketBase::setState(SocketState state)
bool KClientSocketBase::setSocketOptions(int opts)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
KSocketBase::setSocketOptions(opts); // call parent
// don't create the device unnecessarily
@@ -140,14 +140,14 @@ bool KClientSocketBase::lookup()
{
if (d->localResolver.serviceName().isNull() &&
!d->localResolver.nodeName().isNull())
- d->localResolver.setServiceName(QString::fromLatin1(""));
+ d->localResolver.setServiceName(TQString::fromLatin1(""));
// don't restart the lookups if they had succeeded and
// the input values weren't changed
- QObject::connect(&d->peerResolver, SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedSlot()));
- QObject::connect(&d->localResolver, SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedSlot()));
+ TQObject::connect(&d->peerResolver, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedSlot()));
+ TQObject::connect(&d->localResolver, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedSlot()));
if (d->localResolver.status() <= 0)
d->localResolver.start();
@@ -164,7 +164,7 @@ bool KClientSocketBase::lookup()
if (blocking())
lookupFinishedSlot();
else
- QTimer::singleShot(0, this, SLOT(lookupFinishedSlot()));
+ TQTimer::singleShot(0, this, TQT_SLOT(lookupFinishedSlot()));
}
else
{
@@ -387,10 +387,10 @@ bool KClientSocketBase::emitsReadyRead() const
void KClientSocketBase::enableRead(bool enable)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
d->enableRead = enable;
- QSocketNotifier *n = socketDevice()->readNotifier();
+ TQSocketNotifier *n = socketDevice()->readNotifier();
if (n)
n->setEnabled(enable);
}
@@ -402,10 +402,10 @@ bool KClientSocketBase::emitsReadyWrite() const
void KClientSocketBase::enableWrite(bool enable)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
d->enableWrite = enable;
- QSocketNotifier *n = socketDevice()->writeNotifier();
+ TQSocketNotifier *n = socketDevice()->writeNotifier();
if (n)
n->setEnabled(enable);
}
@@ -427,8 +427,8 @@ void KClientSocketBase::lookupFinishedSlot()
if (d->peerResolver.isRunning() || d->localResolver.isRunning() || state() != HostLookup)
return;
- QObject::disconnect(&d->peerResolver, 0L, this, SLOT(lookupFinishedSlot()));
- QObject::disconnect(&d->localResolver, 0L, this, SLOT(lookupFinishedSlot()));
+ TQObject::disconnect(&d->peerResolver, 0L, this, TQT_SLOT(lookupFinishedSlot()));
+ TQObject::disconnect(&d->localResolver, 0L, this, TQT_SLOT(lookupFinishedSlot()));
if (d->peerResolver.status() < 0 || d->localResolver.status() < 0)
{
setState(Idle); // backtrack
@@ -449,11 +449,11 @@ void KClientSocketBase::stateChanging(SocketState newState)
{
if (newState == Connected && socketDevice())
{
- QSocketNotifier *n = socketDevice()->readNotifier();
+ TQSocketNotifier *n = socketDevice()->readNotifier();
if (n)
{
n->setEnabled(d->enableRead);
- QObject::connect(n, SIGNAL(activated(int)), this, SLOT(slotReadActivity()));
+ TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotReadActivity()));
}
else
return;
@@ -462,7 +462,7 @@ void KClientSocketBase::stateChanging(SocketState newState)
if (n)
{
n->setEnabled(d->enableWrite);
- QObject::connect(n, SIGNAL(activated(int)), this, SLOT(slotWriteActivity()));
+ TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotWriteActivity()));
}
else
return;
diff --git a/kdecore/network/kclientsocketbase.h b/kdecore/network/kclientsocketbase.h
index ccd94994a..1a6d3b8b1 100644
--- a/kdecore/network/kclientsocketbase.h
+++ b/kdecore/network/kclientsocketbase.h
@@ -25,8 +25,8 @@
#ifndef KCLIENTSOCKETBASE_H
#define KCLIENTSOCKETBASE_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include "ksocketbase.h"
#include "kresolver.h"
@@ -46,7 +46,7 @@ class KClientSocketBasePrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KDECORE_EXPORT KClientSocketBase : public QObject, public KActiveSocketBase
+class KDECORE_EXPORT KClientSocketBase : public TQObject, public KActiveSocketBase
{
Q_OBJECT
@@ -87,10 +87,10 @@ public:
/**
* Default constructor.
*
- * @param parent the parent QObject object
+ * @param parent the parent TQObject object
* @param name the name of this object
*/
- KClientSocketBase(QObject* parent, const char *name);
+ KClientSocketBase(TQObject* parent, const char *name);
/**
* Destructor.
@@ -202,14 +202,14 @@ public:
* @param node the nodename
* @param service the service
*/
- virtual bool bind(const QString& node = QString::null,
- const QString& service = QString::null) = 0;
+ virtual bool bind(const TQString& node = TQString::null,
+ const TQString& service = TQString::null) = 0;
/**
* Reimplemented from KSocketBase. Connect this socket to this
* specific address.
*
- * Unlike @ref bind(const QString&, const QString&) above, this function
+ * Unlike @ref bind(const TQString&, const TQString&) above, this function
* really does bind the socket. No lookup is performed. The @ref bound
* signal will be emitted.
*/
@@ -243,8 +243,8 @@ public:
* @param node the nodename
* @param service the service
*/
- virtual bool connect(const QString& node = QString::null,
- const QString& service = QString::null) = 0;
+ virtual bool connect(const TQString& node = TQString::null,
+ const TQString& service = TQString::null) = 0;
/**
* @overload
@@ -255,10 +255,10 @@ public:
/**
* @deprecated
* This is a convenience function provided to ease migrating from
- * Qt 3.x's QSocket class.
+ * Qt 3.x's TQSocket class.
*/
- inline void connectToHost(const QString& host, Q_UINT16 port)
- { connect(host, QString::number(port)); }
+ inline void connectToHost(const TQString& host, Q_UINT16 port)
+ { connect(host, TQString::number(port)); }
/**
* Disconnects the socket.
@@ -267,7 +267,7 @@ public:
virtual bool disconnect();
/**
- * Opens the socket. Reimplemented from QIODevice.
+ * Opens the socket. Reimplemented from TQIODevice.
*
* You should not call this function; instead, use @ref connect
*/
@@ -275,7 +275,7 @@ public:
{ return connect(); }
/**
- * Closes the socket. Reimplemented from QIODevice.
+ * Closes the socket. Reimplemented from TQIODevice.
*
* The closing of the socket causes the emission of the
* signal @ref closed.
@@ -283,7 +283,7 @@ public:
virtual void close();
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
*/
virtual void flush()
{ }
diff --git a/kdecore/network/kdatagramsocket.cpp b/kdecore/network/kdatagramsocket.cpp
index a0d3bc05d..d598d2d14 100644
--- a/kdecore/network/kdatagramsocket.cpp
+++ b/kdecore/network/kdatagramsocket.cpp
@@ -41,7 +41,7 @@ using namespace KNetwork;
*
*/
-KDatagramSocket::KDatagramSocket(QObject* parent, const char *name)
+KDatagramSocket::KDatagramSocket(TQObject* parent, const char *name)
: KClientSocketBase(parent, name), d(0L)
{
peerResolver().setFamily(KResolver::KnownFamily);
@@ -52,11 +52,11 @@ KDatagramSocket::KDatagramSocket(QObject* parent, const char *name)
localResolver().setFlags(KResolver::Passive);
- // QObject::connect(localResolver(), SIGNAL(finished(KResolverResults)),
- // this, SLOT(lookupFinishedLocal()));
- QObject::connect(&peerResolver(), SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedPeer()));
- QObject::connect(this, SIGNAL(hostFound()), this, SLOT(lookupFinishedLocal()));
+ // TQObject::connect(localResolver(), TQT_SIGNAL(finished(KResolverResults)),
+ // this, TQT_SLOT(lookupFinishedLocal()));
+ TQObject::connect(&peerResolver(), TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedPeer()));
+ TQObject::connect(this, TQT_SIGNAL(hostFound()), this, TQT_SLOT(lookupFinishedLocal()));
}
KDatagramSocket::~KDatagramSocket()
@@ -66,7 +66,7 @@ KDatagramSocket::~KDatagramSocket()
//delete d;
}
-bool KDatagramSocket::bind(const QString& node, const QString& service)
+bool KDatagramSocket::bind(const TQString& node, const TQString& service)
{
if (state() >= Bound)
return false;
@@ -89,7 +89,7 @@ bool KDatagramSocket::bind(const QString& node, const QString& service)
return true;
}
-bool KDatagramSocket::connect(const QString& node, const QString& service)
+bool KDatagramSocket::connect(const TQString& node, const TQString& service)
{
if (state() >= Connected)
return true; // already connected
@@ -152,7 +152,7 @@ KDatagramPacket KDatagramSocket::receive()
size = bytesAvailable();
}
- QByteArray data(size);
+ TQByteArray data(size);
KSocketAddress address;
// now do the reading
@@ -261,11 +261,11 @@ bool KDatagramSocket::doBind()
void KDatagramSocket::setupSignals()
{
- QSocketNotifier *n = socketDevice()->readNotifier();
+ TQSocketNotifier *n = socketDevice()->readNotifier();
if (n)
{
n->setEnabled(emitsReadyRead());
- QObject::connect(n, SIGNAL(activated(int)), this, SLOT(slotReadActivity()));
+ TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotReadActivity()));
}
else
return;
@@ -274,7 +274,7 @@ void KDatagramSocket::setupSignals()
if (n)
{
n->setEnabled(emitsReadyWrite());
- QObject::connect(n, SIGNAL(activated(int)), this, SLOT(slotWriteActivity()));
+ TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotWriteActivity()));
}
else
return;
diff --git a/kdecore/network/kdatagramsocket.h b/kdecore/network/kdatagramsocket.h
index 31ccf9af7..6b94c1d42 100644
--- a/kdecore/network/kdatagramsocket.h
+++ b/kdecore/network/kdatagramsocket.h
@@ -25,7 +25,7 @@
#ifndef KDATAGRAMSOCKET_H
#define KDATAGRAMSOCKET_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include "ksocketaddress.h"
#include "kclientsocketbase.h"
@@ -43,14 +43,14 @@ class KResolverEntry;
* consists of data as well as a network address associated (whither to send
* the data or whence it came).
*
- * This is a lightweight class. Data is stored in a @ref QByteArray, which means
+ * This is a lightweight class. Data is stored in a @ref TQByteArray, which means
* that it is explicitly shared.
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
class KDECORE_EXPORT KDatagramPacket
{
- QByteArray m_data;
+ TQByteArray m_data;
KSocketAddress m_address;
public:
@@ -63,7 +63,7 @@ public:
/**
* Constructs the datagram with the specified content.
*/
- KDatagramPacket(const QByteArray& content)
+ KDatagramPacket(const TQByteArray& content)
: m_data(content)
{ }
@@ -78,7 +78,7 @@ public:
/**
* Constructs the datagram with the specified content and address.
*/
- KDatagramPacket(const QByteArray& content, const KSocketAddress& addr)
+ KDatagramPacket(const TQByteArray& content, const KSocketAddress& addr)
: m_data(content), m_address(addr)
{ }
@@ -104,7 +104,7 @@ public:
/**
* Returns the data.
*/
- const QByteArray& data() const
+ const TQByteArray& data() const
{ return m_data; }
/**
@@ -145,7 +145,7 @@ public:
/**
* Detaches our data from a shared pool.
- * @see QByteArray::detach
+ * @see TQByteArray::detach
*/
void detach()
{ m_data.detach(); }
@@ -153,7 +153,7 @@ public:
/**
* Sets the data to the given value. Data is explicitly shared.
*/
- void setData(const QByteArray& data)
+ void setData(const TQByteArray& data)
{ m_data = data; }
/**
@@ -185,7 +185,7 @@ public:
/**
* Default constructor.
*/
- KDatagramSocket(QObject* parent = 0L, const char *name = 0L);
+ KDatagramSocket(TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor. This closes the socket.
@@ -205,8 +205,8 @@ public:
* Some protocol families will use anonymous source addresses, while others
* will allocate an address automatically.
*/
- virtual bool bind(const QString& node = QString::null,
- const QString& service = QString::null);
+ virtual bool bind(const TQString& node = TQString::null,
+ const TQString& service = TQString::null);
/**
* @overload
@@ -227,8 +227,8 @@ public:
* @note Calling connect will not cause the socket to be bound. You have
* to call @ref bind explicitly.
*/
- virtual bool connect(const QString& node = QString::null,
- const QString& service = QString::null);
+ virtual bool connect(const TQString& node = TQString::null,
+ const TQString& service = TQString::null);
/**
* @overload
diff --git a/kdecore/network/khttpproxysocketdevice.cpp b/kdecore/network/khttpproxysocketdevice.cpp
index 73e433a2e..09d8dd7a5 100644
--- a/kdecore/network/khttpproxysocketdevice.cpp
+++ b/kdecore/network/khttpproxysocketdevice.cpp
@@ -27,8 +27,8 @@
#include <sys/types.h>
#include <sys/socket.h>
-#include <qsocketnotifier.h>
-#include <qcstring.h>
+#include <tqsocketnotifier.h>
+#include <tqcstring.h>
#include "kresolver.h"
#include "ksocketaddress.h"
@@ -43,8 +43,8 @@ class KNetwork::KHttpProxySocketDevicePrivate
{
public:
KResolverEntry proxy;
- QCString request;
- QCString reply;
+ TQCString request;
+ TQCString reply;
KSocketAddress peer;
KHttpProxySocketDevicePrivate()
@@ -89,7 +89,7 @@ void KHttpProxySocketDevice::setProxyServer(const KResolverEntry& proxy)
void KHttpProxySocketDevice::close()
{
- d->reply = d->request = QCString();
+ d->reply = d->request = TQCString();
d->peer = KSocketAddress();
KSocketDevice::close();
}
@@ -128,7 +128,7 @@ bool KHttpProxySocketDevice::connect(const KResolverEntry& address)
return parseServerReply();
}
-bool KHttpProxySocketDevice::connect(const QString& node, const QString& service)
+bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& service)
{
// same safety checks as above
if (m_sockfd == -1 && (d->proxy.family() == AF_UNSPEC ||
@@ -153,11 +153,11 @@ bool KHttpProxySocketDevice::connect(const QString& node, const QString& service
setState(0); // unset open flag
// prepare the request
- QString request = QString::fromLatin1("CONNECT %1:%2 HTTP/1.1\r\n"
+ TQString request = TQString::fromLatin1("CONNECT %1:%2 HTTP/1.1\r\n"
"Cache-Control: no-cache\r\n"
"Host: \r\n"
"\r\n");
- QString node2 = node;
+ TQString node2 = node;
if (node.contains(':'))
node2 = '[' + node + ']';
@@ -216,11 +216,11 @@ bool KHttpProxySocketDevice::parseServerReply()
else if (avail < 0)
return false; // error!
- QByteArray buf(avail);
+ TQByteArray buf(avail);
if (peekBlock(buf.data(), avail) < 0)
return false; // error!
- QCString fullHeaders = d->reply + buf.data();
+ TQCString fullHeaders = d->reply + buf.data();
// search for the end of the headers
index = fullHeaders.find("\r\n\r\n");
if (index == -1)
diff --git a/kdecore/network/khttpproxysocketdevice.h b/kdecore/network/khttpproxysocketdevice.h
index ed4f1d60c..7c9908ad5 100644
--- a/kdecore/network/khttpproxysocketdevice.h
+++ b/kdecore/network/khttpproxysocketdevice.h
@@ -87,7 +87,7 @@ public:
* Name-based connection.
* We can tell the HTTP proxy server the full name.
*/
- virtual bool connect(const QString& name, const QString& service);
+ virtual bool connect(const TQString& name, const TQString& service);
/**
* Return the peer address.
diff --git a/kdecore/network/kiobuffer.h b/kdecore/network/kiobuffer.h
index 4da5ecb43..2fc5b49e3 100644
--- a/kdecore/network/kiobuffer.h
+++ b/kdecore/network/kiobuffer.h
@@ -25,7 +25,7 @@
#ifndef KIOBUFFER_H
#define KIOBUFFER_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdelibs_export.h>
@@ -77,7 +77,7 @@ public:
/**
* Reads a line from the buffer and discards it.
*/
- virtual QCString readLine() = 0;
+ virtual TQCString readLine() = 0;
/**
* Returns the number of bytes in the buffer. Note that this is not
diff --git a/kdecore/network/kmulticastsocket.h b/kdecore/network/kmulticastsocket.h
index 80c2f6990..7fbd6e0f2 100644
--- a/kdecore/network/kmulticastsocket.h
+++ b/kdecore/network/kmulticastsocket.h
@@ -52,7 +52,7 @@ public:
/**
* Constructor.
*/
- KMulticastSocket(QObject* parent = 0L, const char *name = 0L);
+ KMulticastSocket(TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor.
diff --git a/kdecore/network/kresolver.cpp b/kdecore/network/kresolver.cpp
index 915288123..598b6de55 100644
--- a/kdecore/network/kresolver.cpp
+++ b/kdecore/network/kresolver.cpp
@@ -37,16 +37,16 @@
#include <unistd.h>
// Qt includes
-#include <qapplication.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qshared.h>
-#include <qdatetime.h>
-#include <qtimer.h>
-#include <qmutex.h>
-#include <qguardedptr.h>
+#include <tqapplication.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqshared.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
+#include <tqmutex.h>
+#include <tqguardedptr.h>
// IDN
#ifdef HAVE_IDNA_H
@@ -63,7 +63,7 @@
#ifdef NEED_MUTEX
#warning "mutex"
-QMutex getXXbyYYmutex;
+TQMutex getXXbyYYmutex;
#endif
using namespace KNetwork;
@@ -78,8 +78,8 @@ public:
KSocketAddress addr;
int socktype;
int protocol;
- QString canonName;
- QCString encodedName;
+ TQString canonName;
+ TQCString encodedName;
inline KResolverEntryPrivate() :
socktype(0), protocol(0)
@@ -94,7 +94,7 @@ KResolverEntry::KResolverEntry() :
// constructor with stuff
KResolverEntry::KResolverEntry(const KSocketAddress& addr, int socktype, int protocol,
- const QString& canonName, const QCString& encodedName) :
+ const TQString& canonName, const TQCString& encodedName) :
d(new KResolverEntryPrivate)
{
d->addr = addr;
@@ -106,8 +106,8 @@ KResolverEntry::KResolverEntry(const KSocketAddress& addr, int socktype, int pro
// constructor with even more stuff
KResolverEntry::KResolverEntry(const struct sockaddr* sa, Q_UINT16 salen, int socktype,
- int protocol, const QString& canonName,
- const QCString& encodedName) :
+ int protocol, const TQString& canonName,
+ const TQCString& encodedName) :
d(new KResolverEntryPrivate)
{
d->addr = KSocketAddress(sa, salen);
@@ -153,15 +153,15 @@ int KResolverEntry::family() const
}
// returns the canonical name
-QString KResolverEntry::canonicalName() const
+TQString KResolverEntry::canonicalName() const
{
- return d ? d->canonName : QString::null;
+ return d ? d->canonName : TQString::null;
}
// returns the encoded name
-QCString KResolverEntry::encodedName() const
+TQCString KResolverEntry::encodedName() const
{
- return d ? d->encodedName : QCString();
+ return d ? d->encodedName : TQCString();
}
// returns the socket type
@@ -196,7 +196,7 @@ KResolverEntry& KResolverEntry::operator= (const KResolverEntry& that)
class KNetwork::KResolverResultsPrivate
{
public:
- QString node, service;
+ TQString node, service;
int errorcode, syserror;
KResolverResultsPrivate() :
@@ -212,7 +212,7 @@ KResolverResults::KResolverResults()
// copy constructor
KResolverResults::KResolverResults(const KResolverResults& other)
- : QValueList<KResolverEntry>(other), d(new KResolverResultsPrivate)
+ : TQValueList<KResolverEntry>(other), d(new KResolverResultsPrivate)
{
*d = *other.d;
}
@@ -233,8 +233,8 @@ KResolverResults::operator= (const KResolverResults& other)
// copy over the other data
*d = *other.d;
- // now let QValueList do the rest of the work
- QValueList<KResolverEntry>::operator =(other);
+ // now let TQValueList do the rest of the work
+ TQValueList<KResolverEntry>::operator =(other);
return *this;
}
@@ -259,20 +259,20 @@ void KResolverResults::setError(int errorcode, int systemerror)
}
// gets the hostname
-QString KResolverResults::nodeName() const
+TQString KResolverResults::nodeName() const
{
return d->node;
}
// gets the service name
-QString KResolverResults::serviceName() const
+TQString KResolverResults::serviceName() const
{
return d->service;
}
// sets the address
-void KResolverResults::setAddress(const QString& node,
- const QString& service)
+void KResolverResults::setAddress(const TQString& node,
+ const TQString& service)
{
d->node = node;
d->service = service;
@@ -285,19 +285,19 @@ void KResolverResults::virtual_hook( int, void* )
///////////////////////
// class KResolver
-QStringList *KResolver::idnDomains = 0;
+TQStringList *KResolver::idnDomains = 0;
// default constructor
-KResolver::KResolver(QObject *parent, const char *name)
- : QObject(parent, name), d(new KResolverPrivate(this))
+KResolver::KResolver(TQObject *parent, const char *name)
+ : TQObject(parent, name), d(new KResolverPrivate(this))
{
}
// constructor with host and service
-KResolver::KResolver(const QString& nodename, const QString& servicename,
- QObject *parent, const char *name)
- : QObject(parent, name), d(new KResolverPrivate(this, nodename, servicename))
+KResolver::KResolver(const TQString& nodename, const TQString& servicename,
+ TQObject *parent, const char *name)
+ : TQObject(parent, name), d(new KResolverPrivate(this, nodename, servicename))
{
}
@@ -333,19 +333,19 @@ bool KResolver::isRunning() const
}
// get the hostname
-QString KResolver::nodeName() const
+TQString KResolver::nodeName() const
{
return d->input.node;
}
// get the service
-QString KResolver::serviceName() const
+TQString KResolver::serviceName() const
{
return d->input.service;
}
// sets the hostname
-void KResolver::setNodeName(const QString& nodename)
+void KResolver::setNodeName(const TQString& nodename)
{
// don't touch those values if we're working!
if (!isRunning())
@@ -357,7 +357,7 @@ void KResolver::setNodeName(const QString& nodename)
}
// sets the service
-void KResolver::setServiceName(const QString& service)
+void KResolver::setServiceName(const TQString& service)
{
// don't change if running
if (!isRunning())
@@ -369,7 +369,7 @@ void KResolver::setServiceName(const QString& service)
}
// sets the address
-void KResolver::setAddress(const QString& nodename, const QString& service)
+void KResolver::setAddress(const TQString& nodename, const TQString& service)
{
setNodeName(nodename);
setServiceName(service);
@@ -462,7 +462,7 @@ bool KResolver::wait(int msec)
return true;
}
- QMutexLocker locker(&d->mutex);
+ TQMutexLocker locker(&d->mutex);
if (!isRunning())
{
@@ -476,7 +476,7 @@ bool KResolver::wait(int msec)
}
else
{
- QTime t;
+ TQTime t;
t.start();
while (!msec || t.elapsed() < msec)
@@ -525,7 +525,7 @@ KResolver::results() const
return r;
}
-bool KResolver::event(QEvent* e)
+bool KResolver::event(TQEvent* e)
{
if (static_cast<int>(e->type()) == KResolverManager::ResolutionCompleted)
{
@@ -541,7 +541,7 @@ void KResolver::emitFinished()
if (isRunning())
d->status = KResolver::Success;
- QGuardedPtr<QObject> p = this; // guard against deletion
+ TQGuardedPtr<TQObject> p = this; // guard against deletion
emit finished(d->results);
@@ -549,7 +549,7 @@ void KResolver::emitFinished()
deleteLater(); // in QObject
}
-QString KResolver::errorString(int errorcode, int syserror)
+TQString KResolver::errorString(int errorcode, int syserror)
{
// no i18n now...
static const char * const messages[] =
@@ -574,17 +574,17 @@ QString KResolver::errorString(int errorcode, int syserror)
return i18n("request was canceled");
if (errorcode > 0 || errorcode < SystemError)
- return QString::null;
+ return TQString::null;
- QString msg = i18n(messages[-errorcode]);
+ TQString msg = i18n(messages[-errorcode]);
if (errorcode == SystemError)
- msg.arg(QString::fromLocal8Bit(strerror(syserror)));
+ msg.arg(TQString::fromLocal8Bit(strerror(syserror)));
return msg;
}
KResolverResults
-KResolver::resolve(const QString& host, const QString& service, int flags,
+KResolver::resolve(const TQString& host, const TQString& service, int flags,
int families)
{
KResolver qres(host, service, qApp, "synchronous KResolver");
@@ -595,23 +595,23 @@ KResolver::resolve(const QString& host, const QString& service, int flags,
return qres.results();
}
-bool KResolver::resolveAsync(QObject* userObj, const char *userSlot,
- const QString& host, const QString& service,
+bool KResolver::resolveAsync(TQObject* userObj, const char *userSlot,
+ const TQString& host, const TQString& service,
int flags, int families)
{
KResolver* qres = new KResolver(host, service, qApp, "asynchronous KResolver");
- QObject::connect(qres, SIGNAL(finished(KResolverResults)), userObj, userSlot);
+ TQObject::connect(qres, TQT_SIGNAL(finished(KResolverResults)), userObj, userSlot);
qres->setFlags(flags);
qres->setFamily(families);
qres->d->deleteWhenDone = true; // this is the only difference from the example code
return qres->start();
}
-QStrList KResolver::protocolName(int protonum)
+TQStrList KResolver::protocolName(int protonum)
{
struct protoent *pe = 0L;
#ifndef HAVE_GETPROTOBYNAME_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
pe = getprotobynumber(protonum);
@@ -639,7 +639,7 @@ QStrList KResolver::protocolName(int protonum)
#endif
// Do common processing
- QStrList lst(true); // use deep copies
+ TQStrList lst(true); // use deep copies
if (pe != NULL)
{
lst.append(pe->p_name);
@@ -654,11 +654,11 @@ QStrList KResolver::protocolName(int protonum)
return lst;
}
-QStrList KResolver::protocolName(const char *protoname)
+TQStrList KResolver::protocolName(const char *protoname)
{
struct protoent *pe = 0L;
#ifndef HAVE_GETPROTOBYNAME_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
pe = getprotobyname(protoname);
@@ -686,7 +686,7 @@ QStrList KResolver::protocolName(const char *protoname)
#endif
// Do common processing
- QStrList lst(true); // use deep copies
+ TQStrList lst(true); // use deep copies
if (pe != NULL)
{
lst.append(pe->p_name);
@@ -705,7 +705,7 @@ int KResolver::protocolNumber(const char *protoname)
{
struct protoent *pe = 0L;
#ifndef HAVE_GETPROTOBYNAME_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
pe = getprotobyname(protoname);
@@ -748,7 +748,7 @@ int KResolver::servicePort(const char *servname, const char *protoname)
{
struct servent *se = 0L;
#ifndef HAVE_GETSERVBYNAME_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
se = getservbyname(servname, protoname);
@@ -787,11 +787,11 @@ int KResolver::servicePort(const char *servname, const char *protoname)
return servport;
}
-QStrList KResolver::serviceName(const char* servname, const char *protoname)
+TQStrList KResolver::serviceName(const char* servname, const char *protoname)
{
struct servent *se = 0L;
#ifndef HAVE_GETSERVBYNAME_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
se = getservbyname(servname, protoname);
@@ -819,7 +819,7 @@ QStrList KResolver::serviceName(const char* servname, const char *protoname)
#endif
// Do common processing
- QStrList lst(true); // use deep copies
+ TQStrList lst(true); // use deep copies
if (se != NULL)
{
lst.append(se->s_name);
@@ -834,11 +834,11 @@ QStrList KResolver::serviceName(const char* servname, const char *protoname)
return lst;
}
-QStrList KResolver::serviceName(int port, const char *protoname)
+TQStrList KResolver::serviceName(int port, const char *protoname)
{
struct servent *se = 0L;
#ifndef HAVE_GETSERVBYPORT_R
- QMutexLocker locker(&getXXbyYYmutex);
+ TQMutexLocker locker(&getXXbyYYmutex);
se = getservbyport(port, protoname);
@@ -866,7 +866,7 @@ QStrList KResolver::serviceName(int port, const char *protoname)
#endif
// Do common processing
- QStrList lst(true); // use deep copies
+ TQStrList lst(true); // use deep copies
if (se != NULL)
{
lst.append(se->s_name);
@@ -881,9 +881,9 @@ QStrList KResolver::serviceName(int port, const char *protoname)
return lst;
}
-QString KResolver::localHostName()
+TQString KResolver::localHostName()
{
- QCString name;
+ TQCString name;
int len;
#ifdef MAXHOSTNAMELEN
@@ -910,12 +910,12 @@ QString KResolver::localHostName()
else
{
// Oops! Unknown error!
- name = QCString();
+ name = TQCString();
}
}
if (name.isEmpty())
- return QString::fromLatin1("localhost");
+ return TQString::fromLatin1("localhost");
if (name.find('.') == -1)
{
@@ -924,7 +924,7 @@ QString KResolver::localHostName()
KResolverResults results = resolve(name, "0", CanonName);
if (results.isEmpty())
// cannot find a valid hostname!
- return QString::fromLatin1("localhost");
+ return TQString::fromLatin1("localhost");
else
return results.first().canonicalName();
}
@@ -934,31 +934,31 @@ QString KResolver::localHostName()
// forward declaration
-static QStringList splitLabels(const QString& unicodeDomain);
-static QCString ToASCII(const QString& label);
-static QString ToUnicode(const QString& label);
+static TQStringList splitLabels(const TQString& unicodeDomain);
+static TQCString ToASCII(const TQString& label);
+static TQString ToUnicode(const TQString& label);
-static QStringList *KResolver_initIdnDomains()
+static TQStringList *KResolver_initIdnDomains()
{
const char *kde_use_idn = getenv("KDE_USE_IDN");
if (!kde_use_idn)
kde_use_idn = "ac:at:br:cat:ch:cl:cn:de:dk:fi:gr:hu:info:io:is:jp:kr:li:lt:museum:org:no:se:sh:th:tm:tw:vn";
- return new QStringList(QStringList::split(':', QString::fromLatin1(kde_use_idn).lower()));
+ return new TQStringList(TQStringList::split(':', TQString::fromLatin1(kde_use_idn).lower()));
}
// implement the ToAscii function, as described by IDN documents
-QCString KResolver::domainToAscii(const QString& unicodeDomain)
+TQCString KResolver::domainToAscii(const TQString& unicodeDomain)
{
if (!idnDomains)
idnDomains = KResolver_initIdnDomains();
- QCString retval;
+ TQCString retval;
// RFC 3490, section 4 describes the operation:
// 1) this is a query, so don't allow unassigned
// 2) split the domain into individual labels, without
// separators.
- QStringList input = splitLabels(unicodeDomain);
+ TQStringList input = splitLabels(unicodeDomain);
// Do we allow IDN names for this TLD?
if (input.count() && !idnDomains->contains(input[input.count()-1].lower()))
@@ -968,13 +968,13 @@ QCString KResolver::domainToAscii(const QString& unicodeDomain)
// we don't enforce
// 4) for each label, apply ToASCII
- QStringList::Iterator it = input.begin();
- const QStringList::Iterator end = input.end();
+ TQStringList::Iterator it = input.begin();
+ const TQStringList::Iterator end = input.end();
for ( ; it != end; ++it)
{
- QCString cs = ToASCII(*it);
+ TQCString cs = ToASCII(*it);
if (cs.isNull())
- return QCString(); // error!
+ return TQCString(); // error!
// no, all is Ok.
if (!retval.isEmpty())
@@ -985,20 +985,20 @@ QCString KResolver::domainToAscii(const QString& unicodeDomain)
return retval;
}
-QString KResolver::domainToUnicode(const QCString& asciiDomain)
+TQString KResolver::domainToUnicode(const TQCString& asciiDomain)
{
- return domainToUnicode(QString::fromLatin1(asciiDomain));
+ return domainToUnicode(TQString::fromLatin1(asciiDomain));
}
// implement the ToUnicode function, as described by IDN documents
-QString KResolver::domainToUnicode(const QString& asciiDomain)
+TQString KResolver::domainToUnicode(const TQString& asciiDomain)
{
if (asciiDomain.isEmpty())
return asciiDomain;
if (!idnDomains)
idnDomains = KResolver_initIdnDomains();
- QString retval;
+ TQString retval;
// draft-idn-idna-14.txt, section 4 describes the operation:
// 1) this is a query, so don't allow unassigned
@@ -1006,7 +1006,7 @@ QString KResolver::domainToUnicode(const QString& asciiDomain)
// 2) split the domain into individual labels, without
// separators.
- QStringList input = splitLabels(asciiDomain);
+ TQStringList input = splitLabels(asciiDomain);
// Do we allow IDN names for this TLD?
if (input.count() && !idnDomains->contains(input[input.count()-1].lower()))
@@ -1016,11 +1016,11 @@ QString KResolver::domainToUnicode(const QString& asciiDomain)
// we don't enforce
// 4) for each label, apply ToUnicode
- QStringList::Iterator it;
- const QStringList::Iterator end = input.end();
+ TQStringList::Iterator it;
+ const TQStringList::Iterator end = input.end();
for (it = input.begin(); it != end; ++it)
{
- QString label = ToUnicode(*it).lower();
+ TQString label = ToUnicode(*it).lower();
// ToUnicode can't fail
if (!retval.isEmpty())
@@ -1031,7 +1031,7 @@ QString KResolver::domainToUnicode(const QString& asciiDomain)
return retval;
}
-QString KResolver::normalizeDomain(const QString& domain)
+TQString KResolver::normalizeDomain(const TQString& domain)
{
return domainToUnicode(domainToAscii(domain));
}
@@ -1048,7 +1048,7 @@ void KResolver::virtual_hook( int, void* )
// RFC 3492 - Punycode: A Bootstring encoding of Unicode
// for Internationalized Domain Names in Applications (IDNA)
-static QStringList splitLabels(const QString& unicodeDomain)
+static TQStringList splitLabels(const TQString& unicodeDomain)
{
// From RFC 3490 section 3.1:
// "Whenever dots are used as label separators, the following characters
@@ -1057,7 +1057,7 @@ static QStringList splitLabels(const QString& unicodeDomain)
// stop)."
static const unsigned int separators[] = { 0x002E, 0x3002, 0xFF0E, 0xFF61 };
- QStringList lst;
+ TQStringList lst;
int start = 0;
uint i;
for (i = 0; i < unicodeDomain.length(); i++)
@@ -1081,7 +1081,7 @@ static QStringList splitLabels(const QString& unicodeDomain)
return lst;
}
-static QCString ToASCII(const QString& label)
+static TQCString ToASCII(const TQString& label)
{
#ifdef HAVE_IDNA_H
// We have idna.h, so we can use the idna_to_ascii
@@ -1092,9 +1092,9 @@ static QCString ToASCII(const QString& label)
if (label.length() == 0)
// this is allowed
- return QCString(""); // empty, not null
+ return TQCString(""); // empty, not null
- QCString retval;
+ TQCString retval;
char buf[65];
Q_UINT32* ucs4 = new Q_UINT32[label.length() + 1];
@@ -1115,7 +1115,7 @@ static QCString ToASCII(const QString& label)
#endif
}
-static QString ToUnicode(const QString& label)
+static TQString ToUnicode(const TQString& label)
{
#ifdef HAVE_IDNA_H
// We have idna.h, so we can use the idna_to_unicode
@@ -1147,7 +1147,7 @@ static QString ToUnicode(const QString& label)
}
// now set the answer
- QString result;
+ TQString result;
result.setLength(outlen);
for (uint i = 0; i < outlen; i++)
result[i] = (unsigned int)ucs4_output[i];
diff --git a/kdecore/network/kresolver.h b/kdecore/network/kresolver.h
index b4e4334be..cfc1226a5 100644
--- a/kdecore/network/kresolver.h
+++ b/kdecore/network/kresolver.h
@@ -27,8 +27,8 @@
//////////////////
// Needed includes
-#include <qvaluelist.h>
-#include <qobject.h>
+#include <tqvaluelist.h>
+#include <tqobject.h>
#include "ksocketaddress.h"
@@ -85,8 +85,8 @@ public:
* @param encodedName the ASCII-compatible encoding of the hostname
*/
KResolverEntry(const KSocketAddress& addr, int socktype, int protocol,
- const QString& canonName = QString::null,
- const QCString& encodedName = QCString());
+ const TQString& canonName = TQString::null,
+ const TQCString& encodedName = TQCString());
/**
* Constructs a new KResolverEntry from raw forms of
@@ -102,8 +102,8 @@ public:
* @param encodedName the ASCII-compatible encoding of the hostname
*/
KResolverEntry(const struct sockaddr *sa, Q_UINT16 salen, int socktype,
- int protocol, const QString& canonName = QString::null,
- const QCString& encodedName = QCString());
+ int protocol, const TQString& canonName = TQString::null,
+ const TQCString& encodedName = TQCString());
/**
* Copy constructor.
@@ -137,21 +137,21 @@ public:
/**
* Retrieves the canonical name associated with this entry, if there is any.
- * If the canonical name was not found, this function returns QString::null.
+ * If the canonical name was not found, this function returns TQString::null.
*/
- QString canonicalName() const;
+ TQString canonicalName() const;
/**
* Retrieves the encoded domain name associated with this entry, if there is
* any. If this domain has been resolved through DNS, this will be the
* the ACE-encoded hostname.
*
- * Returns a null QCString if such information is not available.
+ * Returns a null TQCString if such information is not available.
*
* Please note that this information is NOT to be presented to the user,
* unless requested.
*/
- QCString encodedName() const;
+ TQCString encodedName() const;
/**
* Retrieves the socket type associated with this entry.
@@ -181,7 +181,7 @@ class KResolverResultsPrivate;
* @brief Name and service resolution results.
*
* This object contains the results of a name and service resolution, as
- * those performed by @ref KResolver. It is also a descendant of QValueList, so
+ * those performed by @ref KResolver. It is also a descendant of TQValueList, so
* you may use all its member functions here to access the elements.
*
* A KResolverResults object is associated with a resolution, so, in addition
@@ -194,7 +194,7 @@ class KResolverResultsPrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KDECORE_EXPORT KResolverResults: public QValueList<KResolverEntry>
+class KDECORE_EXPORT KResolverResults: public TQValueList<KResolverEntry>
{
public:
/**
@@ -250,17 +250,17 @@ public:
/**
* The nodename to which the resolution was performed.
*/
- QString nodeName() const;
+ TQString nodeName() const;
/**
* The service name to which the resolution was performed.
*/
- QString serviceName() const;
+ TQString serviceName() const;
/**
* Sets the new nodename and service name
*/
- void setAddress(const QString& host, const QString& service);
+ void setAddress(const TQString& host, const TQString& service);
protected:
virtual void virtual_hook( int id, void* data );
@@ -435,7 +435,7 @@ public:
* names and flags using the member functions before starting
* the name resolution.
*/
- KResolver(QObject * = 0L, const char * = 0L);
+ KResolver(TQObject * = 0L, const char * = 0L);
/**
* Constructor with host and service names.
@@ -447,8 +447,8 @@ public:
* @param nodename The host name we want resolved.
* @param servicename The service name associated, like "http".
*/
- KResolver(const QString& nodename, const QString& servicename = QString::null,
- QObject * = 0L, const char * = 0L);
+ KResolver(const TQString& nodename, const TQString& servicename = TQString::null,
+ TQObject * = 0L, const char * = 0L);
/**
* Destructor.
@@ -490,7 +490,7 @@ public:
/**
* Returns the textual representation of the error in this object.
*/
- inline QString errorString() const
+ inline TQString errorString() const
{ return errorString(error(), systemError()); }
/**
@@ -501,37 +501,37 @@ public:
/**
* The nodename to which the resolution was/is to be performed.
*/
- QString nodeName() const;
+ TQString nodeName() const;
/**
* The service name to which the resolution was/is to be performed.
*/
- QString serviceName() const;
+ TQString serviceName() const;
/**
* Sets the nodename for the resolution.
*
- * Set the nodename to QString::null to unset it.
+ * Set the nodename to TQString::null to unset it.
* @param nodename The nodename to be resolved.
*/
- void setNodeName(const QString& nodename);
+ void setNodeName(const TQString& nodename);
/**
* Sets the service name to be resolved.
*
- * Set it to QString::null to unset it.
+ * Set it to TQString::null to unset it.
* @param service The service to be resolved.
*/
- void setServiceName(const QString& service);
+ void setServiceName(const TQString& service);
/**
* Sets both the host and the service names.
*
- * Setting either value to QString::null will unset them.
+ * Setting either value to TQString::null will unset them.
* @param node The nodename
* @param service The service name
*/
- void setAddress(const QString& node, const QString& service);
+ void setAddress(const TQString& node, const TQString& service);
/**
* Retrieves the flags set for the resolution.
@@ -673,14 +673,14 @@ public:
KResolverResults results() const;
/**
- * Handles events. Reimplemented from QObject.
+ * Handles events. Reimplemented from TQObject.
*
* This function handles the events generated by the manager indicating that
* this object has finished processing.
*
* Do not post events to this object.
*/
- virtual bool event(QEvent*);
+ virtual bool event(TQEvent*);
signals:
// signals
@@ -691,7 +691,7 @@ signals:
* will contain the resolved data.
*
* Note: if you are doing multiple resolutions, you can use the
- * QObject::sender() function to distinguish one Resolver object from
+ * TQObject::sender() function to distinguish one Resolver object from
* another.
*
* @param results the resolved data; might be empty if the resolution
@@ -717,7 +717,7 @@ public:
* @return the string representation. This is already
* i18n'ed.
*/
- static QString errorString(int errorcode, int syserror = 0);
+ static TQString errorString(int errorcode, int syserror = 0);
/**
* Resolve the nodename and service name synchronously
@@ -742,7 +742,7 @@ public:
* @return a KResolverResults object containing the results
* @see KResolverResults for information on how to obtain the error code
*/
- static KResolverResults resolve(const QString& host, const QString& service,
+ static KResolverResults resolve(const TQString& host, const TQString& service,
int flags = 0, int families = KResolver::InternetFamily);
/**
@@ -758,7 +758,7 @@ public:
*
* \code
* KResolver* qres = new KResolver(host, service);
- * QObject::connect(qres, SIGNAL(finished(KResolverResults)),
+ * TQObject::connect(qres, TQT_SIGNAL(finished(KResolverResults)),
* userObj, userSlot);
* qres->setFlags(flags);
* qres->setFamily(families);
@@ -767,7 +767,7 @@ public:
*
* You should use it like this in your code:
* \code
- * KResolver::resolveAsync(myObj, SLOT(mySlot(KResolverResults)), host, service);
+ * KResolver::resolveAsync(myObj, TQT_SLOT(mySlot(KResolverResults)), host, service);
* \endcode
*
* @param userObj the object whose slot @p userSlot we will connect
@@ -779,8 +779,8 @@ public:
* @return true if the queueing was successful, false if not
* @see KResolverResults for information on how to obtain the error code
*/
- static bool resolveAsync(QObject* userObj, const char *userSlot,
- const QString& host, const QString& service,
+ static bool resolveAsync(TQObject* userObj, const char *userSlot,
+ const TQString& host, const TQString& service,
int flags = 0, int families = KResolver::InternetFamily);
/**
@@ -789,7 +789,7 @@ public:
* over the Internet.
*
* Note this function may fail, in which case it'll return a null
- * QCString. Reasons for failure include use of unknown code
+ * TQCString. Reasons for failure include use of unknown code
* points (Unicode characters).
*
* Note that the encoding is illegible and, thus, should not be presented
@@ -797,9 +797,9 @@ public:
*
* @param unicodeDomain the domain name to be encoded
* @return the ACE-encoded suitable for DNS queries if successful, a null
- * QCString if failure.
+ * TQCString if failure.
*/
- static QCString domainToAscii(const QString& unicodeDomain);
+ static TQCString domainToAscii(const TQString& unicodeDomain);
/**
* Does the inverse of @ref domainToAscii and return an Unicode domain
@@ -819,16 +819,16 @@ public:
* if successful, the original string if not
* @note ACE = ASCII-Compatible Encoding, i.e., 7-bit
*/
- static QString domainToUnicode(const QCString& asciiDomain);
+ static TQString domainToUnicode(const TQCString& asciiDomain);
/**
- * The same as above, but taking a QString argument.
+ * The same as above, but taking a TQString argument.
*
* @param asciiDomain the ACE-encoded domain name to be decoded
* @return the Unicode representation of the given domain name
- * if successful, QString::null if not.
+ * if successful, TQString::null if not.
*/
- static QString domainToUnicode(const QString& asciiDomain);
+ static TQString domainToUnicode(const TQString& asciiDomain);
/**
* Normalise a domain name.
@@ -850,21 +850,21 @@ public:
* hostname.
*
* @param domain a domain to be normalised
- * @return the normalised domain, or QString::null if the domain is
+ * @return the normalised domain, or TQString::null if the domain is
* invalid.
*/
- static QString normalizeDomain(const QString& domain);
+ static TQString normalizeDomain(const TQString& domain);
/**
* Resolves a protocol number to its names
*
- * Note: the returned QStrList operates on deep-copies.
+ * Note: the returned TQStrList operates on deep-copies.
*
* @param protonum the protocol number to be looked for
* @return all the protocol names in a list. The first is the "proper"
* name.
*/
- static QStrList protocolName(int protonum);
+ static TQStrList protocolName(int protonum);
/**
* Finds all aliases for a given protocol name
@@ -873,7 +873,7 @@ public:
* @return all the protocol names in a list. The first is the "proper"
* name.
*/
- static QStrList protocolName(const char *protoname);
+ static TQStrList protocolName(const char *protoname);
/**
* Resolves a protocol name to its number
@@ -895,26 +895,26 @@ public:
/**
* Finds all the aliases for a given service name
*
- * Note: the returned QStrList operates on deep-copies.
+ * Note: the returned TQStrList operates on deep-copies.
*
* @param servname the service alias to be looked for
* @param protoname the protocol it is associated with
* @return all the service names in a list. The first is the "proper"
* name.
*/
- static QStrList serviceName(const char *servname, const char *protoname);
+ static TQStrList serviceName(const char *servname, const char *protoname);
/**
* Resolves a port number to its names
*
- * Note: the returned QStrList operates on deep copies.
+ * Note: the returned TQStrList operates on deep copies.
*
* @param port the port number, in host byte-order
* @param protoname the protocol it is associated with
* @return all the service names in a list. The first is the "proper"
* name.
*/
- static QStrList serviceName(int port, const char *protoname);
+ static TQStrList serviceName(int port, const char *protoname);
/**
* Returns this machine's local hostname.
@@ -922,7 +922,7 @@ public:
* @return this machine's local hostname
* @since 3.5
*/
- static QString localHostName();
+ static TQString localHostName();
protected:
@@ -937,7 +937,7 @@ private:
friend class KResolverResults;
friend class ::KNetwork::Internal::KResolverManager;
- static QStringList *idnDomains;
+ static TQStringList *idnDomains;
};
} // namespace KNetwork
diff --git a/kdecore/network/kresolver_p.h b/kdecore/network/kresolver_p.h
index 2fac7eb45..e29304383 100644
--- a/kdecore/network/kresolver_p.h
+++ b/kdecore/network/kresolver_p.h
@@ -28,23 +28,23 @@
#include <config.h>
#include <sys/types.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qptrqueue.h>
-#include <qthread.h>
-#include <qmutex.h>
-#include <qwaitcondition.h>
-#include <qsemaphore.h>
-#include <qevent.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqptrqueue.h>
+#include <tqthread.h>
+#include <tqmutex.h>
+#include <tqwaitcondition.h>
+#include <tqsemaphore.h>
+#include <tqevent.h>
#include "kresolver.h"
/* decide whether we need a mutex */
#if !defined(HAVE_GETPROTOBYNAME_R) || !defined(HAVE_GETSERVBYNAME_R) || !defined(HAVE_GETHOSTBYNAME_R) || !defined(HAVE_GETSERVBYPORT_R)
# define NEED_MUTEX
-extern QMutex getXXbyYYmutex;
+extern TQMutex getXXbyYYmutex;
#endif
/* some systems have the functions, but don't declare them */
@@ -90,8 +90,8 @@ namespace KNetwork
struct InputData
{
- QString node, service;
- QCString protocolName;
+ TQString node, service;
+ TQCString protocolName;
int flags;
int familyMask;
int socktype;
@@ -115,14 +115,14 @@ namespace KNetwork
Internal::InputData input;
// mutex
- QMutex mutex;
+ TQMutex mutex;
// output data
KResolverResults results;
KResolverPrivate(KResolver* _parent,
- const QString& _node = QString::null,
- const QString& _service = QString::null)
+ const TQString& _node = TQString::null,
+ const TQString& _service = TQString::null)
: parent(_parent), deleteWhenDone(false), waiting(false),
status(0), errorcode(0), syserror(0)
{
@@ -166,7 +166,7 @@ namespace KNetwork
* objects in wait state will be woken up and will check if they are done.
* If they aren't, they will go back to sleeping.
*/
- QWaitCondition notifyWaiters;
+ TQWaitCondition notifyWaiters;
private:
/*
@@ -185,22 +185,22 @@ namespace KNetwork
* data available that has to be processed. All worker threads wait on this
* waitcond for a limited amount of time.
*/
- QWaitCondition feedWorkers;
+ TQWaitCondition feedWorkers;
// this mutex protects the data in this object
- QMutex mutex;
+ TQMutex mutex;
// hold a list of all the current threads we have
- QPtrList<KResolverThread> workers;
+ TQPtrList<KResolverThread> workers;
// hold a list of all the new requests we have
- QPtrList<RequestData> newRequests;
+ TQPtrList<RequestData> newRequests;
// hold a list of all the requests in progress we have
- QPtrList<RequestData> currentRequests;
+ TQPtrList<RequestData> currentRequests;
// hold a list of all the workers we have
- QPtrList<KNetwork::KResolverWorkerFactoryBase> workerFactories;
+ TQPtrList<KNetwork::KResolverWorkerFactoryBase> workerFactories;
// private constructor
KResolverManager();
diff --git a/kdecore/network/kresolvermanager.cpp b/kdecore/network/kresolvermanager.cpp
index 204031915..b3c7172ae 100644
--- a/kdecore/network/kresolvermanager.cpp
+++ b/kdecore/network/kresolvermanager.cpp
@@ -38,15 +38,15 @@ extern "C" {
# include <resolv.h>
#endif
-#include <qapplication.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qmutex.h>
-#include <qthread.h>
-#include <qwaitcondition.h>
-#include <qsemaphore.h>
+#include <tqapplication.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqmutex.h>
+#include <tqthread.h>
+#include <tqwaitcondition.h>
+#include <tqsemaphore.h>
#include <kde_file.h>
#include <kdebug.h>
@@ -134,8 +134,8 @@ public:
int useCount;
# ifndef RES_INIT_THREADSAFE
- QWaitCondition cond;
- QMutex mutex;
+ TQWaitCondition cond;
+ TQMutex mutex;
# endif
bool shouldResInit()
@@ -178,7 +178,7 @@ public:
void release()
{
# ifndef RES_INIT_THREADSAFE
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
if (--useCount == 0)
{
if (shouldResInit())
@@ -264,13 +264,13 @@ void KResolverThread::run()
// initialisation
// enter the loop already
- //qDebug("KResolverThread(thread %u/%p): started", pid, (void*)QThread::currentThread());
+ //qDebug("KResolverThread(thread %u/%p): started", pid, (void*)TQThread::currentThread());
KResolverManager::manager()->registerThread(this);
while (true)
{
data = KResolverManager::manager()->requestData(this, ::maxThreadWaitTime);
//qDebug("KResolverThread(thread %u/%p) got data %p", KResolverManager::pid,
- // (void*)QThread::currentThread(), (void*)data);
+ // (void*)TQThread::currentThread(), (void*)data);
if (data)
{
// yes, we got data
@@ -292,7 +292,7 @@ void KResolverThread::run()
}
KResolverManager::manager()->unregisterThread(this);
- //qDebug("KResolverThread(thread %u/%p): exiting", pid, (void*)QThread::currentThread());
+ //qDebug("KResolverThread(thread %u/%p): exiting", pid, (void*)TQThread::currentThread());
}
bool KResolverThread::checkResolver()
@@ -366,7 +366,7 @@ RequestData* KResolverManager::requestData(KResolverThread *th, int maxWaitTime)
// lock the mutex, so that the manager thread or other threads won't
// interfere.
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
RequestData *data = findData(th);
if (data)
@@ -416,7 +416,7 @@ void KResolverManager::releaseData(KResolverThread *, RequestData* data)
/////
//qDebug("KResolverManager::releaseData(%u/%p): %p has been released", pid,
-// (void*)QThread::currentThread(), (void*)data);
+// (void*)TQThread::currentThread(), (void*)data);
if (data->obj)
{
@@ -434,7 +434,7 @@ void KResolverManager::releaseData(KResolverThread *, RequestData* data)
void KResolverManager::handleFinished()
{
bool redo = false;
- QPtrQueue<RequestData> doneRequests;
+ TQPtrQueue<RequestData> doneRequests;
mutex.lock();
@@ -601,7 +601,7 @@ void KResolverManager::doNotifying(RequestData *p)
r.setAddress(p->input->node, p->input->service);
//qDebug("KResolverManager::doNotifying(%u/%p): for %p whose status is %d and has %d results",
- //pid, (void*)QThread::currentThread(), (void*)p, p->obj->status, r.count());
+ //pid, (void*)TQThread::currentThread(), (void*)p, p->obj->status, r.count());
p->obj->errorcode = r.error();
p->obj->syserror = r.systemError();
@@ -619,7 +619,7 @@ void KResolverManager::doNotifying(RequestData *p)
// no, so we must post an event requesting that the signal be emitted
// sorry for the C-style cast, but neither static nor reintepret cast work
// here; I'd have to do two casts
- QApplication::postEvent(parent, new QEvent((QEvent::Type)(ResolutionCompleted)));
+ TQApplication::postEvent(parent, new TQEvent((TQEvent::Type)(ResolutionCompleted)));
// release the mutex
p->obj->mutex.unlock();
@@ -693,7 +693,7 @@ void KResolverManager::dispatch(RequestData *data)
// is supposed to verify the availability of threads, start
// any if necessary
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
// add to the queue
newRequests.append(data);
@@ -817,6 +817,6 @@ bool KResolverManager::dequeueNew(KResolver* obj)
// it's expected to be thread-safe
void KResolverManager::dequeue(KResolver *obj)
{
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
dequeueNew(obj);
}
diff --git a/kdecore/network/kresolverstandardworkers.cpp b/kdecore/network/kresolverstandardworkers.cpp
index 93c706306..f64803ced 100644
--- a/kdecore/network/kresolverstandardworkers.cpp
+++ b/kdecore/network/kresolverstandardworkers.cpp
@@ -38,10 +38,10 @@
#include <net/if.h>
#endif
-#include <qthread.h>
-#include <qmutex.h>
-#include <qstrlist.h>
-#include <qfile.h>
+#include <tqthread.h>
+#include <tqmutex.h>
+#include <tqstrlist.h>
+#include <tqfile.h>
#include "kdebug.h"
#include "kglobal.h"
@@ -76,8 +76,8 @@ static bool hasIPv6()
}
// blacklist management
-static QMutex blacklistMutex; // KDE4: change to a QReadWriteLock
-QStringList KBlacklistWorker::blacklist;
+static TQMutex blacklistMutex; // KDE4: change to a QReadWriteLock
+TQStringList KBlacklistWorker::blacklist;
void KBlacklistWorker::init()
{
@@ -98,21 +98,21 @@ void KBlacklistWorker::init()
void KBlacklistWorker::loadBlacklist()
{
- QMutexLocker locker(&blacklistMutex);
- QStringList filelist = KGlobal::dirs()->findAllResources("config", "ipv6blacklist");
+ TQMutexLocker locker(&blacklistMutex);
+ TQStringList filelist = KGlobal::dirs()->findAllResources("config", "ipv6blacklist");
- QStringList::ConstIterator it = filelist.constBegin(),
+ TQStringList::ConstIterator it = filelist.constBegin(),
end = filelist.constEnd();
for ( ; it != end; ++it)
{
// for each file, each line is a domainname to be blacklisted
- QFile f(*it);
+ TQFile f(*it);
if (!f.open(IO_ReadOnly))
continue;
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::Latin1);
- for (QString line = stream.readLine(); !line.isNull();
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::Latin1);
+ for (TQString line = stream.readLine(); !line.isNull();
line = stream.readLine())
{
if (line.isEmpty())
@@ -131,7 +131,7 @@ void KBlacklistWorker::loadBlacklist()
// checks the blacklist to see if the domain is listed
// it matches the domain ending part
-bool KBlacklistWorker::isBlacklisted(const QString& host)
+bool KBlacklistWorker::isBlacklisted(const TQString& host)
{
KBlacklistWorker::init();
@@ -140,12 +140,12 @@ bool KBlacklistWorker::isBlacklisted(const QString& host)
return false;
// KDE4: QLatin1String
- QString ascii = QString::fromLatin1(KResolver::domainToAscii(host));
+ TQString ascii = TQString::fromLatin1(KResolver::domainToAscii(host));
- QMutexLocker locker(&blacklistMutex);
+ TQMutexLocker locker(&blacklistMutex);
// now find out if this hostname is present
- QStringList::ConstIterator it = blacklist.constBegin(),
+ TQStringList::ConstIterator it = blacklist.constBegin(),
end = blacklist.constEnd();
for ( ; it != end; ++it)
if (ascii.endsWith(*it))
@@ -207,7 +207,7 @@ namespace
class GetHostByNameThread: public KResolverWorkerBase
{
public:
- QCString m_hostname; // might be different!
+ TQCString m_hostname; // might be different!
Q_UINT16 m_port;
int m_scopeid;
int m_af;
@@ -251,7 +251,7 @@ namespace
// check blacklist
if (m_af != AF_INET &&
- KBlacklistWorker::isBlacklisted(QString::fromLatin1(m_hostname)))
+ KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_hostname)))
break;
# ifdef USE_GETHOSTBYNAME2_R
@@ -358,7 +358,7 @@ namespace
if (socktype == 0)
socktype = SOCK_STREAM; // default
- QString canon = KResolver::domainToUnicode(QString::fromLatin1(he->h_name));
+ TQString canon = KResolver::domainToUnicode(TQString::fromLatin1(he->h_name));
KInetSocketAddress sa;
sa.setPort(m_port);
if (he->h_addrtype != AF_INET)
@@ -378,8 +378,8 @@ namespace
class GetAddrInfoThread: public KResolverWorkerBase
{
public:
- QCString m_node;
- QCString m_serv;
+ TQCString m_node;
+ TQCString m_serv;
int m_af;
int m_flags;
KResolverResults& results;
@@ -404,7 +404,7 @@ namespace
{
// check blacklist
if ((m_af != AF_INET && m_af != AF_UNSPEC) &&
- KBlacklistWorker::isBlacklisted(QString::fromLatin1(m_node)))
+ KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_node)))
{
results.setError(KResolver::NoName);
finished();
@@ -510,7 +510,7 @@ namespace
}
// if we are here, lookup succeeded
- QString canon;
+ TQString canon;
const char *previous_canon = 0L;
for (addrinfo* p = result; p; p = p->ai_next)
@@ -521,7 +521,7 @@ namespace
(p->ai_canonname != previous_canon &&
strcmp(p->ai_canonname, previous_canon) != 0))
{
- canon = KResolver::domainToUnicode(QString::fromAscii(p->ai_canonname));
+ canon = KResolver::domainToUnicode(TQString::fromAscii(p->ai_canonname));
previous_canon = p->ai_canonname;
}
@@ -546,12 +546,12 @@ bool KStandardWorker::sanityCheck()
if (!nodeName().isEmpty())
{
- QString node = nodeName();
+ TQString node = nodeName();
if (node.find('%') != -1)
node.truncate(node.find('%'));
- if (node.isEmpty() || node == QString::fromLatin1("*") ||
- node == QString::fromLatin1("localhost"))
+ if (node.isEmpty() || node == TQString::fromLatin1("*") ||
+ node == TQString::fromLatin1("localhost"))
m_encodedName.truncate(0);
else
{
@@ -588,7 +588,7 @@ bool KStandardWorker::resolveScopeId()
if (pos == -1)
return true;
- QString scopename = nodeName().mid(pos + 1);
+ TQString scopename = nodeName().mid(pos + 1);
bool ok;
scopeid = scopename.toInt(&ok);
@@ -616,12 +616,12 @@ bool KStandardWorker::resolveService()
// service name does not contain a port number
// must be a name
- if (serviceName().isEmpty() || serviceName().compare(QString::fromLatin1("*")) == 0)
+ if (serviceName().isEmpty() || serviceName().compare(TQString::fromLatin1("*")) == 0)
port = 0;
else
{
// it's a name. We need the protocol name in order to lookup.
- QCString protoname = protocolName();
+ TQCString protoname = protocolName();
if (protoname.isEmpty() && protocol())
{
@@ -670,7 +670,7 @@ KResolver::ErrorCodes KStandardWorker::addUnix()
if (protocol() || protocolName())
return KResolver::BadFlags; // cannot have Unix sockets with protocols
- QString pathname = serviceName();
+ TQString pathname = serviceName();
if (pathname.isEmpty())
return KResolver::NoName;; // no path?
@@ -712,7 +712,7 @@ bool KStandardWorker::resolveNumerically()
// now try to resolve the hostname numerically
KInetSocketAddress sa;
setError(KResolver::NoError);
- sa.setHost(KIpAddress(QString::fromLatin1(m_encodedName)));
+ sa.setHost(KIpAddress(TQString::fromLatin1(m_encodedName)));
// if it failed, the length was reset to 0
bool ok = sa.length() != 0;
diff --git a/kdecore/network/kresolverstandardworkers_p.h b/kdecore/network/kresolverstandardworkers_p.h
index 30c8f3c1e..310849bf3 100644
--- a/kdecore/network/kresolverstandardworkers_p.h
+++ b/kdecore/network/kresolverstandardworkers_p.h
@@ -28,9 +28,9 @@
#include <sys/types.h>
#include <netdb.h>
-#include <qptrlist.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include "kresolver.h"
#include "kresolverworkerbase.h"
@@ -48,11 +48,11 @@ namespace KNetwork { namespace Internal
class KBlacklistWorker: public KNetwork::KResolverWorkerBase
{
public:
- static QStringList blacklist;
+ static TQStringList blacklist;
static void loadBlacklist();
static void init();
- static bool isBlacklisted(const QString&);
+ static bool isBlacklisted(const TQString&);
virtual bool preprocess();
virtual bool run();
@@ -65,10 +65,10 @@ namespace KNetwork { namespace Internal
class KStandardWorker: public KNetwork::KResolverWorkerBase
{
protected:
- mutable QCString m_encodedName;
+ mutable TQCString m_encodedName;
Q_UINT16 port;
int scopeid;
- QPtrList<KNetwork::KResolverResults> resultList;
+ TQPtrList<KNetwork::KResolverResults> resultList;
public:
bool sanityCheck();
diff --git a/kdecore/network/kresolverworkerbase.cpp b/kdecore/network/kresolverworkerbase.cpp
index 5d8cdaa9b..ee6ee1011 100644
--- a/kdecore/network/kresolverworkerbase.cpp
+++ b/kdecore/network/kresolverworkerbase.cpp
@@ -26,8 +26,8 @@
#include <assert.h>
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqstring.h>
#include "kresolver.h"
#include "kresolver_p.h"
@@ -45,18 +45,18 @@ KResolverWorkerBase::~KResolverWorkerBase()
{
}
-QString KResolverWorkerBase::nodeName() const
+TQString KResolverWorkerBase::nodeName() const
{
if (input)
return input->node;
- return QString::null;
+ return TQString::null;
}
-QString KResolverWorkerBase::serviceName() const
+TQString KResolverWorkerBase::serviceName() const
{
if (input)
return input->service;
- return QString::null;
+ return TQString::null;
}
int KResolverWorkerBase::flags() const
@@ -87,9 +87,9 @@ int KResolverWorkerBase::protocol() const
return 0;
}
-QCString KResolverWorkerBase::protocolName() const
+TQCString KResolverWorkerBase::protocolName() const
{
- QCString res;
+ TQCString res;
if (input)
res = input->protocolName;
return res;
diff --git a/kdecore/network/kresolverworkerbase.h b/kdecore/network/kresolverworkerbase.h
index 8776e9142..9c2728cdf 100644
--- a/kdecore/network/kresolverworkerbase.h
+++ b/kdecore/network/kresolverworkerbase.h
@@ -63,7 +63,7 @@ public:
/**
* Helper class for locking the resolver subsystem.
- * Similar to QMutexLocker.
+ * Similar to TQMutexLocker.
*
* @author Luís Pedro Coelho
* @since 3.4
@@ -134,12 +134,12 @@ public:
/**
* This is the hostname to be looked for
*/
- QString nodeName() const;
+ TQString nodeName() const;
/**
* And this is the service name
*/
- QString serviceName() const;
+ TQString serviceName() const;
/**
* gets the flags
@@ -164,7 +164,7 @@ public:
/**
* gets the protocol name, if applicable
*/
- QCString protocolName() const;
+ TQCString protocolName() const;
/**
* Call this function to indicate that processing
diff --git a/kdecore/network/kreverseresolver.cpp b/kdecore/network/kreverseresolver.cpp
index dbcc23d79..639f6dbe4 100644
--- a/kdecore/network/kreverseresolver.cpp
+++ b/kdecore/network/kreverseresolver.cpp
@@ -31,9 +31,9 @@
#include <signal.h>
// Qt
-#include <qevent.h>
-#include <qmutex.h>
-#include <qapplication.h>
+#include <tqevent.h>
+#include <tqmutex.h>
+#include <tqapplication.h>
// Us
#include "kreverseresolver.h"
@@ -73,22 +73,22 @@ namespace
KReverseResolver *m_parent;
// output:
- QString node;
- QString service;
+ TQString node;
+ TQString service;
bool success;
};
class KReverseResolverEvent: public QEvent
{
public:
- static const int myType = QEvent::User + 63; // arbitrary value
- QString node;
- QString service;
+ static const int myType = TQEvent::User + 63; // arbitrary value
+ TQString node;
+ TQString service;
bool success;
- KReverseResolverEvent(const QString& _node, const QString& _service,
+ KReverseResolverEvent(const TQString& _node, const TQString& _service,
bool _success)
- : QEvent((Type)myType), node(_node),
+ : TQEvent((Type)myType), node(_node),
service(_service), success(_success)
{ }
};
@@ -97,8 +97,8 @@ namespace
class KNetwork::KReverseResolverPrivate
{
public:
- QString node;
- QString service;
+ TQString node;
+ TQString service;
KSocketAddress addr;
int flags;
@@ -111,8 +111,8 @@ public:
};
KReverseResolver::KReverseResolver(const KSocketAddress& addr, int flags,
- QObject *parent, const char* name)
- : QObject(parent, name), d(new KReverseResolverPrivate(addr))
+ TQObject *parent, const char* name)
+ : TQObject(parent, name), d(new KReverseResolverPrivate(addr))
{
d->flags = flags;
}
@@ -138,12 +138,12 @@ bool KReverseResolver::failure() const
return !isRunning() && !d->success;
}
-QString KReverseResolver::node() const
+TQString KReverseResolver::node() const
{
return d->node;
}
-QString KReverseResolver::service() const
+TQString KReverseResolver::service() const
{
return d->service;
}
@@ -170,10 +170,10 @@ bool KReverseResolver::start()
return true;
}
-bool KReverseResolver::event(QEvent *e)
+bool KReverseResolver::event(TQEvent *e)
{
if (e->type() != KReverseResolverEvent::myType)
- return QObject::event(e); // call parent
+ return TQObject::event(e); // call parent
KReverseResolverEvent *re = static_cast<KReverseResolverEvent*>(e);
d->node = re->node;
@@ -190,8 +190,8 @@ bool KReverseResolver::event(QEvent *e)
return true;
}
-bool KReverseResolver::resolve(const KSocketAddress& addr, QString& node,
- QString& serv, int flags)
+bool KReverseResolver::resolve(const KSocketAddress& addr, TQString& node,
+ TQString& serv, int flags)
{
ReverseThread th(addr, flags);
if (th.run())
@@ -204,7 +204,7 @@ bool KReverseResolver::resolve(const KSocketAddress& addr, QString& node,
}
bool KReverseResolver::resolve(const struct sockaddr* sa, Q_UINT16 salen,
- QString& node, QString& serv, int flags)
+ TQString& node, TQString& serv, int flags)
{
return resolve(KSocketAddress(sa, salen), node, serv, flags);
}
@@ -230,7 +230,7 @@ bool ReverseThread::run()
{
#ifdef NEED_MUTEX
- QMutexLocker locker(&::getXXbyYYmutex);
+ TQMutexLocker locker(&::getXXbyYYmutex);
#endif
err = ::getnameinfo(m_addr, m_addr.length(),
h, sizeof(h) - 1, s, sizeof(s) - 1, niflags);
@@ -238,13 +238,13 @@ bool ReverseThread::run()
if (err == 0)
{
- node = KResolver::domainToUnicode(QString::fromLatin1(h));
- service = QString::fromLatin1(s);
+ node = KResolver::domainToUnicode(TQString::fromLatin1(h));
+ service = TQString::fromLatin1(s);
success = true;
}
else
{
- node = service = QString::null;
+ node = service = TQString::null;
success = false;
}
@@ -255,7 +255,7 @@ bool ReverseThread::postprocess()
{
// post an event
if (m_parent)
- QApplication::postEvent(m_parent,
+ TQApplication::postEvent(m_parent,
new KReverseResolverEvent(node, service, success));
return true;
}
diff --git a/kdecore/network/kreverseresolver.h b/kdecore/network/kreverseresolver.h
index 325d97d82..26274e586 100644
--- a/kdecore/network/kreverseresolver.h
+++ b/kdecore/network/kreverseresolver.h
@@ -27,8 +27,8 @@
//////////////////
// Needed includes
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include "ksocketaddress.h"
@@ -88,7 +88,7 @@ public:
* @param flags the flags to use, see @ref Flags
*/
KReverseResolver(const KSocketAddress& addr, int flags = 0,
- QObject * = 0L, const char * = 0L);
+ TQObject * = 0L, const char * = 0L);
/**
* Destructor.
@@ -114,15 +114,15 @@ public:
/**
* Returns the resolved node name, if the resolution has finished
- * successfully, or QString::null otherwise.
+ * successfully, or TQString::null otherwise.
*/
- QString node() const;
+ TQString node() const;
/**
* Returns the resolved service name, if the resolution has finished
- * successfully, or QString::null otherwise.
+ * successfully, or TQString::null otherwise.
*/
- QString service() const;
+ TQString service() const;
/**
* Returns the socket address which was subject to resolution.
@@ -138,7 +138,7 @@ public:
/**
* Overrides event handling
*/
- virtual bool event(QEvent* );
+ virtual bool event(TQEvent* );
signals:
/**
@@ -158,14 +158,14 @@ public:
* binary representation to a textual form, even if numeric only.
*
* @param addr the socket address to be resolved
- * @param node the QString where we will store the resolved node
- * @param serv the QString where we will store the resolved service
+ * @param node the TQString where we will store the resolved node
+ * @param serv the TQString where we will store the resolved service
* @param flags flags to be used for this resolution.
* @return true if the resolution succeeded, false if not
* @see ReverseFlags for the possible values for @p flags
*/
- static bool resolve(const KSocketAddress& addr, QString& node,
- QString& serv, int flags = 0);
+ static bool resolve(const KSocketAddress& addr, TQString& node,
+ TQString& serv, int flags = 0);
/**
* Resolves a socket address to its textual representation
@@ -177,14 +177,14 @@ public:
*
* @param sa the sockaddr structure containing the address to be resolved
* @param salen the length of the sockaddr structure
- * @param node the QString where we will store the resolved node
- * @param serv the QString where we will store the resolved service
+ * @param node the TQString where we will store the resolved node
+ * @param serv the TQString where we will store the resolved service
* @param flags flags to be used for this resolution.
* @return true if the resolution succeeded, false if not
* @see ReverseFlags for the possible values for @p flags
*/
static bool resolve(const struct sockaddr* sa, Q_UINT16 salen,
- QString& node, QString& serv, int flags = 0);
+ TQString& node, TQString& serv, int flags = 0);
private:
KReverseResolverPrivate* d;
diff --git a/kdecore/network/kserversocket.cpp b/kdecore/network/kserversocket.cpp
index 9f32b4119..49facb12c 100644
--- a/kdecore/network/kserversocket.cpp
+++ b/kdecore/network/kserversocket.cpp
@@ -24,8 +24,8 @@
#include <config.h>
-#include <qsocketnotifier.h>
-#include <qmutex.h>
+#include <tqsocketnotifier.h>
+#include <tqmutex.h>
#include "ksocketaddress.h"
#include "kresolver.h"
@@ -58,27 +58,27 @@ public:
}
};
-KServerSocket::KServerSocket(QObject* parent, const char *name)
- : QObject(parent, name), d(new KServerSocketPrivate)
+KServerSocket::KServerSocket(TQObject* parent, const char *name)
+ : TQObject(parent, name), d(new KServerSocketPrivate)
{
- QObject::connect(&d->resolver, SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedSlot()));
+ TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedSlot()));
}
-KServerSocket::KServerSocket(const QString& service, QObject* parent, const char *name)
- : QObject(parent, name), d(new KServerSocketPrivate)
+KServerSocket::KServerSocket(const TQString& service, TQObject* parent, const char *name)
+ : TQObject(parent, name), d(new KServerSocketPrivate)
{
- QObject::connect(&d->resolver, SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedSlot()));
+ TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedSlot()));
d->resolver.setServiceName(service);
}
-KServerSocket::KServerSocket(const QString& node, const QString& service,
- QObject* parent, const char* name)
- : QObject(parent, name), d(new KServerSocketPrivate)
+KServerSocket::KServerSocket(const TQString& node, const TQString& service,
+ TQObject* parent, const char* name)
+ : TQObject(parent, name), d(new KServerSocketPrivate)
{
- QObject::connect(&d->resolver, SIGNAL(finished(KResolverResults)),
- this, SLOT(lookupFinishedSlot()));
+ TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)),
+ this, TQT_SLOT(lookupFinishedSlot()));
setAddress(node, service);
}
@@ -90,7 +90,7 @@ KServerSocket::~KServerSocket()
bool KServerSocket::setSocketOptions(int opts)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
KSocketBase::setSocketOptions(opts); // call parent
bool result = socketDevice()->setSocketOptions(opts); // and set the implementation
copyError();
@@ -120,16 +120,16 @@ void KServerSocket::setFamily(int families)
d->resolver.setFamily(families);
}
-void KServerSocket::setAddress(const QString& service)
+void KServerSocket::setAddress(const TQString& service)
{
- d->resolver.setNodeName(QString::null);
+ d->resolver.setNodeName(TQString::null);
d->resolver.setServiceName(service);
d->resolverResults.empty();
if (d->state <= KServerSocketPrivate::LookupDone)
d->state = KServerSocketPrivate::None;
}
-void KServerSocket::setAddress(const QString& node, const QString& service)
+void KServerSocket::setAddress(const TQString& node, const TQString& service)
{
d->resolver.setNodeName(node);
d->resolver.setServiceName(service);
@@ -155,7 +155,7 @@ bool KServerSocket::lookup()
// make sure we have at least one parameter for lookup
if (d->resolver.serviceName().isNull() &&
!d->resolver.nodeName().isNull())
- d->resolver.setServiceName(QString::fromLatin1(""));
+ d->resolver.setServiceName(TQString::fromLatin1(""));
// don't restart the lookups if they had succeeded and
// the input values weren't changed
@@ -193,13 +193,13 @@ bool KServerSocket::bind(const KResolverEntry& address)
return false;
}
-bool KServerSocket::bind(const QString& node, const QString& service)
+bool KServerSocket::bind(const TQString& node, const TQString& service)
{
setAddress(node, service);
return bind();
}
-bool KServerSocket::bind(const QString& service)
+bool KServerSocket::bind(const TQString& service)
{
setAddress(service);
return bind();
@@ -403,8 +403,8 @@ bool KServerSocket::doListen()
}
// set up ready accept signal
- QObject::connect(socketDevice()->readNotifier(), SIGNAL(activated(int)),
- this, SIGNAL(readyAccept()));
+ TQObject::connect(socketDevice()->readNotifier(), TQT_SIGNAL(activated(int)),
+ this, TQT_SIGNAL(readyAccept()));
d->state = KServerSocketPrivate::Listening;
return true;
}
diff --git a/kdecore/network/kserversocket.h b/kdecore/network/kserversocket.h
index 27b3df1cc..30d8b40b0 100644
--- a/kdecore/network/kserversocket.h
+++ b/kdecore/network/kserversocket.h
@@ -25,7 +25,7 @@
#ifndef KSERVERSOCKET_H
#define KSERVERSOCKET_H
-#include <qobject.h>
+#include <tqobject.h>
#include "ksocketbase.h"
namespace KNetwork {
@@ -48,10 +48,10 @@ class KServerSocketPrivate;
*
* A typical example would look like:
* \code
- * QString service = "http";
+ * TQString service = "http";
* KServerSocket *ss = new KServerSocket(service);
- * connect(ss, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept()));
- * connect(ss, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
+ * connect(ss, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept()));
+ * connect(ss, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
* ss->listen();
* \endcode
*
@@ -74,7 +74,7 @@ class KServerSocketPrivate;
* ss->setFamily(KResolver::InetFamily);
* bool found = false;
* for( unsigned int port = firstport; port <= lastport; ++port) {
- * ss->setAddress( QString::number( port ) );
+ * ss->setAddress( TQString::number( port ) );
* bool success = ss->listen();
* if( found = ( success && ss->error() ==
* KSocketBase::NoError ) )
@@ -84,8 +84,8 @@ class KServerSocketPrivate;
* if( !found ) {
* // Couldn't connect to any port.
* } else {
- * connect(ss, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept()));
- * connect(ss, SIGNAL(gotError(int)), this, SLOT(slotSocketError(int)));
+ * connect(ss, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept()));
+ * connect(ss, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int)));
* ss->listen();
* }
* \endcode
@@ -104,7 +104,7 @@ class KServerSocketPrivate;
* @see KNetwork::KStreamSocket, KNetwork::KBufferedSocket
* @author Thiago Macieira <thiago@kde.org>
*/
-class KDECORE_EXPORT KServerSocket: public QObject, public KPassiveSocketBase
+class KDECORE_EXPORT KServerSocket: public TQObject, public KPassiveSocketBase
{
Q_OBJECT
public:
@@ -115,10 +115,10 @@ public:
* bind to all interfaces on this node and the port will be selected by the
* operating system.
*
- * @param parent the parent QObject object
+ * @param parent the parent TQObject object
* @param name the name of this object
*/
- KServerSocket(QObject* parent = 0L, const char *name = 0L);
+ KServerSocket(TQObject* parent = 0L, const char *name = 0L);
/**
* Construct this object specifying the service to listen on.
@@ -134,10 +134,10 @@ public:
* See RFC 1700 for more information on services.
*
* @param service the service name to listen on
- * @param parent the parent QObject object
+ * @param parent the parent TQObject object
* @param name the name of this object
*/
- KServerSocket(const QString& service, QObject* parent = 0L, const char *name = 0L);
+ KServerSocket(const TQString& service, TQObject* parent = 0L, const char *name = 0L);
/**
* Construct this object specifying the node and service names to listen on.
@@ -154,11 +154,11 @@ public:
*
* @param node the node to bind to
* @param service the service port to listen on
- * @param parent the parent QObject object
+ * @param parent the parent TQObject object
* @param name the name of this object
*/
- KServerSocket(const QString& node, const QString& service,
- QObject* parent = 0L, const char *name = 0L);
+ KServerSocket(const TQString& node, const TQString& service,
+ TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor. This will close the socket, if open.
@@ -227,7 +227,7 @@ public:
*
* @param service the service name to listen on
*/
- void setAddress(const QString& service);
+ void setAddress(const TQString& service);
/**
* @overload
@@ -244,7 +244,7 @@ public:
* @param node the node to bind to
* @param service the service port to listen on
*/
- void setAddress(const QString& node, const QString& service);
+ void setAddress(const TQString& node, const TQString& service);
/**
* Sets the timeout for accepting. When you call @ref accept,
@@ -287,7 +287,7 @@ public:
* @param node the nodename
* @param service the service
*/
- virtual bool bind(const QString& node, const QString& service);
+ virtual bool bind(const TQString& node, const TQString& service);
/**
* Binds the socket to the given service name.
@@ -295,7 +295,7 @@ public:
*
* @param service the service
*/
- virtual bool bind(const QString& service);
+ virtual bool bind(const TQString& service);
/**
* Binds the socket to the addresses previously set with @ref setAddress.
@@ -307,7 +307,7 @@ public:
/**
* Connect this socket to this specific address. Reimplemented from KSocketBase.
*
- * Unlike @ref bind(const QString&, const QString&) above, this function
+ * Unlike @ref bind(const TQString&, const TQString&) above, this function
* really does bind the socket. No lookup is performed. The @ref bound signal
* will be emitted.
*/
diff --git a/kdecore/network/ksocketaddress.cpp b/kdecore/network/ksocketaddress.cpp
index 6c1316e94..adfc76b06 100644
--- a/kdecore/network/ksocketaddress.cpp
+++ b/kdecore/network/ksocketaddress.cpp
@@ -33,8 +33,8 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qobject.h>
+#include <tqfile.h>
+#include <tqobject.h>
#include "klocale.h"
#include "ksocketaddress.h"
@@ -126,7 +126,7 @@ bool KIpAddress::compare(const KIpAddress& other, bool checkMapped) const
}
// sets the address to the given address
-bool KIpAddress::setAddress(const QString& address)
+bool KIpAddress::setAddress(const TQString& address)
{
m_version = 0;
@@ -165,7 +165,7 @@ bool KIpAddress::setAddress(const QString& address)
bool KIpAddress::setAddress(const char* address)
{
- return setAddress(QString::fromLatin1(address));
+ return setAddress(TQString::fromLatin1(address));
}
// set from binary data
@@ -186,7 +186,7 @@ bool KIpAddress::setAddress(const void* raw, int version)
}
// presentation form
-QString KIpAddress::toString() const
+TQString KIpAddress::toString() const
{
char buf[sizeof "1111:2222:3333:4444:5555:6666:255.255.255.255" + 2];
buf[0] = '\0';
@@ -194,16 +194,16 @@ QString KIpAddress::toString() const
{
case 4:
inet_ntop(AF_INET, m_data, buf, sizeof(buf) - 1);
- return QString::fromLatin1(buf);
+ return TQString::fromLatin1(buf);
case 6:
#ifdef AF_INET6
inet_ntop(AF_INET6, m_data, buf, sizeof(buf) - 1);
#endif
- return QString::fromLatin1(buf);
+ return TQString::fromLatin1(buf);
}
- return QString::null;
+ return TQString::null;
}
Q_UINT32 KIpAddress::hostIPv4Addr(bool convertMapped) const
@@ -559,10 +559,10 @@ bool KSocketAddress::operator ==(const KSocketAddress& other) const
return false; // not equal in any other case
}
-QString KSocketAddress::nodeName() const
+TQString KSocketAddress::nodeName() const
{
if (d->invalid())
- return QString::null;
+ return TQString::null;
switch (d->addr.generic->sa_family)
{
@@ -570,9 +570,9 @@ QString KSocketAddress::nodeName() const
#ifdef AF_INET6
case AF_INET6:
- QString scopeid("%");
+ TQString scopeid("%");
if (d->addr.generic->sa_family == AF_INET6 && d->addr.in6->sin6_scope_id)
- scopeid += QString::number(d->addr.in6->sin6_scope_id);
+ scopeid += TQString::number(d->addr.in6->sin6_scope_id);
else
scopeid.truncate(0);
return d->ref.ipAddress().toString() + scopeid;
@@ -582,13 +582,13 @@ QString KSocketAddress::nodeName() const
}
// any other case, including AF_UNIX
- return QString::null;
+ return TQString::null;
}
-QString KSocketAddress::serviceName() const
+TQString KSocketAddress::serviceName() const
{
if (d->invalid())
- return QString::null;
+ return TQString::null;
switch (d->addr.generic->sa_family)
{
@@ -596,21 +596,21 @@ QString KSocketAddress::serviceName() const
#ifdef AF_INET6
case AF_INET6:
#endif
- return QString::number(d->ref.port());
+ return TQString::number(d->ref.port());
case AF_UNIX:
return d->ref.pathname();
}
- return QString::null;
+ return TQString::null;
}
-QString KSocketAddress::toString() const
+TQString KSocketAddress::toString() const
{
if (d->invalid())
- return QString::null;
+ return TQString::null;
- QString fmt;
+ TQString fmt;
if (d->addr.generic->sa_family == AF_INET)
fmt = "%1:%2";
@@ -619,7 +619,7 @@ QString KSocketAddress::toString() const
fmt = "[%1]:%2";
#endif
else if (d->addr.generic->sa_family == AF_UNIX)
- return QString::fromLatin1("unix:%1").arg(serviceName());
+ return TQString::fromLatin1("unix:%1").arg(serviceName());
else
return i18n("1: the unknown socket address family number",
"Unknown family %1").arg(d->addr.generic->sa_family);
@@ -916,7 +916,7 @@ KUnixSocketAddress::KUnixSocketAddress(const KUnixSocketAddress& other)
{
}
-KUnixSocketAddress::KUnixSocketAddress(const QString& pathname)
+KUnixSocketAddress::KUnixSocketAddress(const TQString& pathname)
{
setPathname(pathname);
}
@@ -936,18 +936,18 @@ KUnixSocketAddress& KUnixSocketAddress::operator =(const KUnixSocketAddress& oth
return *this;
}
-QString KUnixSocketAddress::pathname() const
+TQString KUnixSocketAddress::pathname() const
{
if (!d->invalid() && d->addr.un->sun_family == AF_UNIX)
- return QFile::decodeName(d->addr.un->sun_path);
- return QString::null;
+ return TQFile::decodeName(d->addr.un->sun_path);
+ return TQString::null;
}
-KUnixSocketAddress& KUnixSocketAddress::setPathname(const QString& path)
+KUnixSocketAddress& KUnixSocketAddress::setPathname(const TQString& path)
{
d->dup(0L, MIN_SOCKADDR_UN_LEN + path.length());
d->addr.un->sun_family = AF_UNIX;
- strcpy(d->addr.un->sun_path, QFile::encodeName(path));
+ strcpy(d->addr.un->sun_path, TQFile::encodeName(path));
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
d->addr.un->sun_len = d->reallen;
diff --git a/kdecore/network/ksocketaddress.h b/kdecore/network/ksocketaddress.h
index 456422f9f..6889527e3 100644
--- a/kdecore/network/ksocketaddress.h
+++ b/kdecore/network/ksocketaddress.h
@@ -25,8 +25,8 @@
#ifndef KSOCKETADDRESS_H
#define KSOCKETADDRESS_H
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kdelibs_export.h>
@@ -87,7 +87,7 @@ public:
*
* @param addr the address
*/
- inline KIpAddress(const QString& addr)
+ inline KIpAddress(const TQString& addr)
{ setAddress(addr); }
/**
@@ -189,7 +189,7 @@ public:
* @return true if the address was successfully parsed; otherwise returns
* false and leaves the object unchanged.
*/
- bool setAddress(const QString& address);
+ bool setAddress(const TQString& address);
/**
* Sets the address to the given string representation.
@@ -212,7 +212,7 @@ public:
/**
* Returns the address as a string.
*/
- QString toString() const;
+ TQString toString() const;
/**
* Returns a pointer to binary raw data representing the address.
@@ -564,23 +564,23 @@ public:
* Returns the node name of this socket.
*
* In the case of Internet sockets, this is string representation of the IP address.
- * The default implementation returns QString::null.
+ * The default implementation returns TQString::null.
*
- * @return the node name, can be QString::null
+ * @return the node name, can be TQString::null
* @bug use KResolver to resolve unknown families
*/
- virtual QString nodeName() const;
+ virtual TQString nodeName() const;
/**
* Returns the service name for this socket.
*
* In the case of Internet sockets, this is the port number.
- * The default implementation returns QString::null.
+ * The default implementation returns TQString::null.
*
- * @return the service name, can be QString::null
+ * @return the service name, can be TQString::null
* @bug use KResolver to resolve unknown families
*/
- virtual QString serviceName() const;
+ virtual TQString serviceName() const;
/**
* Returns this socket address as a string suitable for
@@ -588,7 +588,7 @@ public:
*
* @bug use KResolver to resolve unknown families
*/
- virtual QString toString() const;
+ virtual TQString toString() const;
/**
* Returns an object reference that can be used to manipulate this socket
@@ -867,7 +867,7 @@ public:
/**
* Constructs an object from the given pathname.
*/
- KUnixSocketAddress(const QString& pathname);
+ KUnixSocketAddress(const TQString& pathname);
/**
* Destructor.
@@ -890,16 +890,16 @@ public:
/**
* Returns the pathname associated with this object. Will return
- * QString::null if this object is empty.
+ * TQString::null if this object is empty.
*/
- QString pathname() const;
+ TQString pathname() const;
/**
* Sets the pathname for the object.
*
* @return a reference to itself
*/
- KUnixSocketAddress& setPathname(const QString& path);
+ KUnixSocketAddress& setPathname(const TQString& path);
protected:
/// @internal
diff --git a/kdecore/network/ksocketbase.cpp b/kdecore/network/ksocketbase.cpp
index f3bfa766c..9071eea0e 100644
--- a/kdecore/network/ksocketbase.cpp
+++ b/kdecore/network/ksocketbase.cpp
@@ -23,7 +23,7 @@
*/
#include <config.h>
-#include <qmutex.h>
+#include <tqmutex.h>
#include "klocale.h"
#include "ksocketbase.h"
@@ -40,7 +40,7 @@ public:
mutable KSocketDevice* device;
- QMutex mutex;
+ TQMutex mutex;
KSocketBasePrivate()
: mutex(true) // create recursive
@@ -119,7 +119,7 @@ KSocketDevice* KSocketBase::socketDevice() const
return d->device;
// it doesn't exist, so create it
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (d->device)
return d->device;
@@ -135,7 +135,7 @@ KSocketDevice* KSocketBase::socketDevice() const
void KSocketBase::setSocketDevice(KSocketDevice* device)
{
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (d->device == 0L)
d->device = device;
}
@@ -163,9 +163,9 @@ KSocketBase::SocketError KSocketBase::error() const
}
// static
-QString KSocketBase::errorString(KSocketBase::SocketError code)
+TQString KSocketBase::errorString(KSocketBase::SocketError code)
{
- QString reason;
+ TQString reason;
switch (code)
{
case NoError:
@@ -248,7 +248,7 @@ QString KSocketBase::errorString(KSocketBase::SocketError code)
break;
default:
- reason = QString::null;
+ reason = TQString::null;
break;
}
@@ -275,7 +275,7 @@ void KSocketBase::unsetSocketDevice()
d->device = 0L;
}
-QMutex* KSocketBase::mutex() const
+TQMutex* KSocketBase::mutex() const
{
return &d->mutex;
}
diff --git a/kdecore/network/ksocketbase.h b/kdecore/network/ksocketbase.h
index acbbdf9b9..e416c8e93 100644
--- a/kdecore/network/ksocketbase.h
+++ b/kdecore/network/ksocketbase.h
@@ -56,8 +56,8 @@
#ifndef KSOCKETBASE_H
#define KSOCKETBASE_H
-#include <qiodevice.h>
-#include <qstring.h>
+#include <tqiodevice.h>
+#include <tqstring.h>
#include "ksocketaddress.h"
#include <kdelibs_export.h>
@@ -65,7 +65,7 @@
/*
* This is extending QIODevice's error codes
*
- * According to qiodevice.h, the last error is IO_UnspecifiedError
+ * According to tqiodevice.h, the last error is IO_UnspecifiedError
* These errors will never occur in functions declared in QIODevice
* (except open, but you shouldn't call open)
*/
@@ -380,7 +380,7 @@ public:
/**
* Returns the error string corresponding to this error condition.
*/
- inline QString errorString() const
+ inline TQString errorString() const
{ return errorString(error()); }
/**
@@ -398,7 +398,7 @@ public:
* while destroying it. You must ensure there are no further references to this
* object when deleting it.
*/
- QMutex* mutex() const;
+ TQMutex* mutex() const;
public:
/**
@@ -406,7 +406,7 @@ public:
*
* @param code the error code
*/
- static QString errorString(SocketError code);
+ static TQString errorString(SocketError code);
/**
* Returns true if the given error code is a fatal one, false
@@ -440,7 +440,7 @@ private:
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KDECORE_EXPORT KActiveSocketBase: public QIODevice, virtual public KSocketBase
+class KDECORE_EXPORT KActiveSocketBase: public TQIODevice, virtual public KSocketBase
{
public:
/**
@@ -501,28 +501,28 @@ public:
virtual bool disconnect() = 0;
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return 0.
*/
virtual Offset size() const
{ return 0; }
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return 0.
*/
virtual Offset at() const
{ return 0; }
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return false.
*/
virtual bool at(Offset)
{ return false; }
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return true.
*/
virtual bool atEnd() const
@@ -550,7 +550,7 @@ public:
/**
* Reads data from the socket.
*
- * Reimplemented from QIODevice. See QIODevice::readBlock for
+ * Reimplemented from TQIODevice. See TQIODevice::readBlock for
* more information.
*/
virtual Q_LONG readBlock(char *data, Q_ULONG len) = 0;
@@ -598,7 +598,7 @@ public:
/**
* Writes the given data to the socket.
*
- * Reimplemented from QIODevice. See QIODevice::writeBlock for
+ * Reimplemented from TQIODevice. See TQIODevice::writeBlock for
* more information.
*/
virtual Q_LONG writeBlock(const char *data, Q_ULONG len) = 0;
@@ -618,18 +618,18 @@ public:
/**
* Reads one character from the socket.
- * Reimplementation from QIODevice. See QIODevice::getch for more information.
+ * Reimplementation from TQIODevice. See TQIODevice::getch for more information.
*/
virtual int getch();
/**
* Writes one character to the socket.
- * Reimplementation from QIODevice. See QIODevice::putch for more information.
+ * Reimplementation from TQIODevice. See TQIODevice::putch for more information.
*/
virtual int putch(int ch);
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return -1;
*/
virtual int ungetch(int)
diff --git a/kdecore/network/ksocketbuffer.cpp b/kdecore/network/ksocketbuffer.cpp
index d458a4f15..18c926c83 100644
--- a/kdecore/network/ksocketbuffer.cpp
+++ b/kdecore/network/ksocketbuffer.cpp
@@ -46,13 +46,13 @@ KSocketBuffer::KSocketBuffer(const KSocketBuffer& other)
KSocketBuffer::~KSocketBuffer()
{
- // QValueList takes care of deallocating memory
+ // TQValueList takes care of deallocating memory
}
KSocketBuffer& KSocketBuffer::operator=(const KSocketBuffer& other)
{
- QMutexLocker locker1(&m_mutex);
- QMutexLocker locker2(&other.m_mutex);
+ TQMutexLocker locker1(&m_mutex);
+ TQMutexLocker locker2(&other.m_mutex);
KIOBufferBase::operator=(other);
@@ -66,11 +66,11 @@ KSocketBuffer& KSocketBuffer::operator=(const KSocketBuffer& other)
bool KSocketBuffer::canReadLine() const
{
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
- QValueListConstIterator<QByteArray> it = m_list.constBegin(),
+ TQValueListConstIterator<TQByteArray> it = m_list.constBegin(),
end = m_list.constEnd();
- QIODevice::Offset offset = m_offset;
+ TQIODevice::Offset offset = m_offset;
// walk the buffer
for ( ; it != end; ++it)
@@ -85,18 +85,18 @@ bool KSocketBuffer::canReadLine() const
return false; // not found
}
-QCString KSocketBuffer::readLine()
+TQCString KSocketBuffer::readLine()
{
if (!canReadLine())
- return QCString(); // empty
+ return TQCString(); // empty
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
// find the offset of the newline in the buffer
int newline = 0;
- QValueListConstIterator<QByteArray> it = m_list.constBegin(),
+ TQValueListConstIterator<TQByteArray> it = m_list.constBegin(),
end = m_list.constEnd();
- QIODevice::Offset offset = m_offset;
+ TQIODevice::Offset offset = m_offset;
// walk the buffer
for ( ; it != end; ++it)
@@ -115,7 +115,7 @@ QCString KSocketBuffer::readLine()
break;
}
- QCString result(newline + 2 - m_offset);
+ TQCString result(newline + 2 - m_offset);
consumeBuffer(result.data(), newline + 1 - m_offset);
return result;
}
@@ -137,7 +137,7 @@ bool KSocketBuffer::setSize(Q_LONG size)
return true;
// size is now smaller than length
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
// repeat the test
if (m_length < m_size)
@@ -154,13 +154,13 @@ Q_LONG KSocketBuffer::feedBuffer(const char *data, Q_LONG len)
if (isFull())
return -1; // can't write
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
// verify if we can add len bytes
if (m_size != -1 && (m_size - m_length) < len)
len = m_size - m_length;
- QByteArray a(len);
+ TQByteArray a(len);
a.duplicate(data, len);
m_list.append(a);
@@ -173,9 +173,9 @@ Q_LONG KSocketBuffer::consumeBuffer(char *destbuffer, Q_LONG maxlen, bool discar
if (maxlen == 0 || isEmpty())
return 0;
- QValueListIterator<QByteArray> it = m_list.begin(),
+ TQValueListIterator<TQByteArray> it = m_list.begin(),
end = m_list.end();
- QIODevice::Offset offset = m_offset;
+ TQIODevice::Offset offset = m_offset;
Q_LONG copied = 0;
// walk the buffer
@@ -222,7 +222,7 @@ Q_LONG KSocketBuffer::consumeBuffer(char *destbuffer, Q_LONG maxlen, bool discar
void KSocketBuffer::clear()
{
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
m_list.clear();
m_offset = 0;
m_length = 0;
@@ -233,11 +233,11 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
if (len == 0 || isEmpty())
return 0;
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
- QValueListIterator<QByteArray> it = m_list.begin(),
+ TQValueListIterator<TQByteArray> it = m_list.begin(),
end = m_list.end();
- QIODevice::Offset offset = m_offset;
+ TQIODevice::Offset offset = m_offset;
Q_LONG written = 0;
// walk the buffer
@@ -251,7 +251,7 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
Q_ULONG bufsize = 1460;
if (len != -1 && len < bufsize)
bufsize = len;
- QByteArray buf(bufsize);
+ TQByteArray buf(bufsize);
Q_LONG count = 0;
while (it != end && count + ((*it).size() - offset) <= bufsize)
@@ -298,7 +298,7 @@ Q_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, Q_LONG len)
if (len == 0 || isFull())
return 0;
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
if (len == -1)
len = dev->bytesAvailable();
@@ -313,7 +313,7 @@ Q_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, Q_LONG len)
// here, len contains just as many bytes as we're supposed to read
// now do the reading
- QByteArray a(len);
+ TQByteArray a(len);
len = dev->readBlock(a.data(), len);
if (len == -1)
diff --git a/kdecore/network/ksocketbuffer_p.h b/kdecore/network/ksocketbuffer_p.h
index ddcc692bd..a4a0d6a9e 100644
--- a/kdecore/network/ksocketbuffer_p.h
+++ b/kdecore/network/ksocketbuffer_p.h
@@ -25,9 +25,9 @@
#ifndef KSOCKETBUFFER_P_H
#define KSOCKETBUFFER_P_H
-#include <qmutex.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
+#include <tqmutex.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
#include "kiobuffer.h"
namespace KNetwork {
@@ -78,7 +78,7 @@ public:
/**
* Reads a line from the buffer and discard it from the buffer.
*/
- virtual QCString readLine();
+ virtual TQCString readLine();
/**
* Returns the number of bytes in the buffer. Note that this is not
@@ -151,9 +151,9 @@ public:
virtual Q_LONG receiveFrom(KActiveSocketBase* device, Q_LONG len = -1);
protected:
- mutable QMutex m_mutex;
- QValueList<QByteArray> m_list;
- QIODevice::Offset m_offset; ///< offset of the start of data in the first element
+ mutable TQMutex m_mutex;
+ TQValueList<TQByteArray> m_list;
+ TQIODevice::Offset m_offset; ///< offset of the start of data in the first element
Q_LONG m_size; ///< the maximum length of the buffer
mutable Q_LONG m_length;
diff --git a/kdecore/network/ksocketdevice.cpp b/kdecore/network/ksocketdevice.cpp
index b3004ccc2..2885efdb3 100644
--- a/kdecore/network/ksocketdevice.cpp
+++ b/kdecore/network/ksocketdevice.cpp
@@ -24,7 +24,7 @@
#include <config.h>
-#include <qmap.h>
+#include <tqmap.h>
#ifdef USE_SOLARIS
# include <sys/filio.h>
@@ -49,8 +49,8 @@
// Include syssocket before our local includes
#include "syssocket.h"
-#include <qmutex.h>
-#include <qsocketnotifier.h>
+#include <tqmutex.h>
+#include <tqsocketnotifier.h>
#include "kresolver.h"
#include "ksocketaddress.h"
@@ -63,7 +63,7 @@ using namespace KNetwork;
class KNetwork::KSocketDevicePrivate
{
public:
- mutable QSocketNotifier *input, *output, *exception;
+ mutable TQSocketNotifier *input, *output, *exception;
KSocketAddress local, peer;
int af;
@@ -110,7 +110,7 @@ KSocketDevice::~KSocketDevice()
bool KSocketDevice::setSocketOptions(int opts)
{
// must call parent
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
KSocketBase::setSocketOptions(opts);
if (m_sockfd == -1)
@@ -606,12 +606,12 @@ KSocketAddress KSocketDevice::externalAddress() const
return localAddress();
}
-QSocketNotifier* KSocketDevice::readNotifier() const
+TQSocketNotifier* KSocketDevice::readNotifier() const
{
if (d->input)
return d->input;
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (d->input)
return d->input;
@@ -621,15 +621,15 @@ QSocketNotifier* KSocketDevice::readNotifier() const
return 0L;
}
- return d->input = createNotifier(QSocketNotifier::Read);
+ return d->input = createNotifier(TQSocketNotifier::Read);
}
-QSocketNotifier* KSocketDevice::writeNotifier() const
+TQSocketNotifier* KSocketDevice::writeNotifier() const
{
if (d->output)
return d->output;
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (d->output)
return d->output;
@@ -639,15 +639,15 @@ QSocketNotifier* KSocketDevice::writeNotifier() const
return 0L;
}
- return d->output = createNotifier(QSocketNotifier::Write);
+ return d->output = createNotifier(TQSocketNotifier::Write);
}
-QSocketNotifier* KSocketDevice::exceptionNotifier() const
+TQSocketNotifier* KSocketDevice::exceptionNotifier() const
{
if (d->exception)
return d->exception;
- QMutexLocker locker(mutex());
+ TQMutexLocker locker(mutex());
if (d->exception)
return d->exception;
@@ -657,7 +657,7 @@ QSocketNotifier* KSocketDevice::exceptionNotifier() const
return 0L;
}
- return d->exception = createNotifier(QSocketNotifier::Exception);
+ return d->exception = createNotifier(TQSocketNotifier::Exception);
}
bool KSocketDevice::poll(bool *input, bool *output, bool *exception,
@@ -788,12 +788,12 @@ bool KSocketDevice::poll(int timeout, bool *timedout)
return poll(&input, &output, &exception, timeout, timedout);
}
-QSocketNotifier* KSocketDevice::createNotifier(QSocketNotifier::Type type) const
+TQSocketNotifier* KSocketDevice::createNotifier(TQSocketNotifier::Type type) const
{
if (m_sockfd == -1)
return 0L;
- return new QSocketNotifier(m_sockfd, type);
+ return new TQSocketNotifier(m_sockfd, type);
}
namespace
@@ -832,8 +832,8 @@ namespace
}
static KSocketDeviceFactoryBase* defaultImplFactory;
-static QMutex defaultImplFactoryMutex;
-typedef QMap<int, KSocketDeviceFactoryBase* > factoryMap;
+static TQMutex defaultImplFactoryMutex;
+typedef TQMap<int, KSocketDeviceFactoryBase* > factoryMap;
static factoryMap factories;
KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent)
@@ -857,7 +857,7 @@ KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent, int capabilitie
if (device != 0L)
return device;
- QMutexLocker locker(&defaultImplFactoryMutex);
+ TQMutexLocker locker(&defaultImplFactoryMutex);
factoryMap::ConstIterator it = factories.constBegin();
for ( ; it != factories.constEnd(); ++it)
if ((it.key() & capabilities) == capabilities)
@@ -870,7 +870,7 @@ KSocketDevice* KSocketDevice::createDefault(KSocketBase* parent, int capabilitie
KSocketDeviceFactoryBase*
KSocketDevice::setDefaultImpl(KSocketDeviceFactoryBase* factory)
{
- QMutexLocker locker(&defaultImplFactoryMutex);
+ TQMutexLocker locker(&defaultImplFactoryMutex);
KSocketDeviceFactoryBase* old = defaultImplFactory;
defaultImplFactory = factory;
return old;
@@ -878,7 +878,7 @@ KSocketDevice::setDefaultImpl(KSocketDeviceFactoryBase* factory)
void KSocketDevice::addNewImpl(KSocketDeviceFactoryBase* factory, int capabilities)
{
- QMutexLocker locker(&defaultImplFactoryMutex);
+ TQMutexLocker locker(&defaultImplFactoryMutex);
if (factories.contains(capabilities))
delete factories[capabilities];
factories.insert(capabilities, factory);
diff --git a/kdecore/network/ksocketdevice.h b/kdecore/network/ksocketdevice.h
index 301bc2b07..1bf4771c2 100644
--- a/kdecore/network/ksocketdevice.h
+++ b/kdecore/network/ksocketdevice.h
@@ -25,7 +25,7 @@
#ifndef KSOCKETDEVICE_H
#define KSOCKETDEVICE_H
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include "ksocketbase.h"
namespace KNetwork {
@@ -140,19 +140,19 @@ public:
virtual bool setSocketOptions(int opts);
/**
- * Reimplementation from QIODevice. You should not call this function in sockets.
+ * Reimplementation from TQIODevice. You should not call this function in sockets.
*/
virtual bool open(int mode);
/**
- * Closes the socket. Reimplemented from QIODevice.
+ * Closes the socket. Reimplemented from TQIODevice.
*
* Use this function to close the socket this object is holding open.
*/
virtual void close();
/**
- * This call is not supported on sockets. Reimplemented from QIODevice.
+ * This call is not supported on sockets. Reimplemented from TQIODevice.
*/
virtual void flush()
{ }
@@ -272,7 +272,7 @@ public:
*
* This function might return NULL.
*/
- QSocketNotifier* readNotifier() const;
+ TQSocketNotifier* readNotifier() const;
/**
* Returns a socket notifier for output on this socket.
@@ -280,7 +280,7 @@ public:
*
* This function might return NULL.
*/
- QSocketNotifier* writeNotifier() const;
+ TQSocketNotifier* writeNotifier() const;
/**
* Returns a socket notifier for exceptional events on this socket.
@@ -288,7 +288,7 @@ public:
*
* This function might return NULL.
*/
- QSocketNotifier* exceptionNotifier() const;
+ TQSocketNotifier* exceptionNotifier() const;
/**
* Executes a poll in the socket, via select(2) or poll(2).
@@ -344,12 +344,12 @@ protected:
* not need to call this function again.
*
* Reimplement this function in your derived class if your socket type
- * requires a different kind of QSocketNotifier. The return value should
+ * requires a different kind of TQSocketNotifier. The return value should
* be deleteable with delete. (@ref close deletes them).
*
* @param type the socket notifier type
*/
- virtual QSocketNotifier* createNotifier(QSocketNotifier::Type type) const;
+ virtual TQSocketNotifier* createNotifier(TQSocketNotifier::Type type) const;
public:
/**
diff --git a/kdecore/network/ksrvresolverworker.cpp b/kdecore/network/ksrvresolverworker.cpp
index bcfee405c..07e3555fa 100644
--- a/kdecore/network/ksrvresolverworker.cpp
+++ b/kdecore/network/ksrvresolverworker.cpp
@@ -25,8 +25,8 @@
#include <sys/socket.h>
#include <stdlib.h>
-#include <qapplication.h>
-#include <qevent.h>
+#include <tqapplication.h>
+#include <tqevent.h>
using namespace KNetwork;
using namespace KNetwork::Internal;
@@ -35,7 +35,7 @@ namespace
{
struct KSrvStartEvent: public QCustomEvent
{
- inline KSrvStartEvent() : QCustomEvent(QEvent::User) { }
+ inline KSrvStartEvent() : TQCustomEvent(TQEvent::User) { }
};
}
@@ -50,12 +50,12 @@ bool KSrvResolverWorker::preprocess()
if ((flags() & (KResolver::NoSrv | KResolver::UseSrv)) != KResolver::UseSrv)
return false;
- QString node = nodeName();
+ TQString node = nodeName();
if (node.find('%') != -1)
node.truncate(node.find('%'));
- if (node.isEmpty() || node == QString::fromLatin1("*") ||
- node == QString::fromLatin1("localhost"))
+ if (node.isEmpty() || node == TQString::fromLatin1("*") ||
+ node == TQString::fromLatin1("localhost"))
return false; // empty == localhost
encodedName = KResolver::domainToAscii(node);
@@ -73,13 +73,13 @@ bool KSrvResolverWorker::preprocess()
return false; // it is numeric
// check the protocol for something we know
- QCString protoname;
+ TQCString protoname;
int sockettype = socketType();
if (!protocolName().isEmpty())
protoname = protocolName();
else if (protocol() != 0)
{
- QStrList names = KResolver::protocolName(protocol());
+ TQStrList names = KResolver::protocolName(protocol());
names.setAutoDelete(true);
if (names.isEmpty())
return false;
@@ -106,11 +106,11 @@ bool KSrvResolverWorker::preprocess()
bool KSrvResolverWorker::run()
{
- sem = new QSemaphore(1);
+ sem = new TQSemaphore(1);
// zero out
sem->tryAccess(sem->available());
- QApplication::postEvent(this, new KSrvStartEvent);
+ TQApplication::postEvent(this, new KSrvStartEvent);
// block
(*sem)++;
@@ -146,10 +146,10 @@ bool KSrvResolverWorker::run()
else
{
// now process the results
- QValueList<QDns::Server>::ConstIterator it = rawResults.begin();
+ TQValueList<TQDns::Server>::ConstIterator it = rawResults.begin();
while (it != rawResults.end())
{
- const QDns::Server& srv = *it;
+ const TQDns::Server& srv = *it;
PriorityClass& r = myResults[srv.priority];
r.totalWeight += srv.weight;
@@ -170,15 +170,15 @@ bool KSrvResolverWorker::run()
// sort the priority
sortPriorityClass(*mapit);
- QValueList<Entry>& entries = (*mapit).entries;
+ TQValueList<Entry>& entries = (*mapit).entries;
// start the resolvers
- for (QValueList<Entry>::Iterator it = entries.begin();
+ for (TQValueList<Entry>::Iterator it = entries.begin();
it != entries.end(); ++it)
{
Entry &e = *it;
- KResolver* r = new KResolver(e.name, QString::number(e.port));
+ KResolver* r = new KResolver(e.name, TQString::number(e.port));
r->setFlags(flags() | KResolver::NoSrv);
r->setFamily(familyMask());
r->setSocketType(socketType());
@@ -203,7 +203,7 @@ bool KSrvResolverWorker::postprocess()
for (mapit = myResults.begin(), mapend = myResults.end();
mapit != mapend; ++mapit)
{
- QValueList<Entry>::Iterator it = (*mapit).entries.begin(),
+ TQValueList<Entry>::Iterator it = (*mapit).entries.begin(),
end = (*mapit).entries.end();
for ( ; it != end; ++it)
{
@@ -223,10 +223,10 @@ bool KSrvResolverWorker::postprocess()
return true;
}
-void KSrvResolverWorker::customEvent(QCustomEvent*)
+void KSrvResolverWorker::customEvent(TQCustomEvent*)
{
- dns = new QDns(QString::fromLatin1(encodedName), QDns::Srv);
- QObject::connect(dns, SIGNAL(resultsReady()), this, SLOT(dnsResultsReady()));
+ dns = new TQDns(TQString::fromLatin1(encodedName), TQDns::Srv);
+ TQObject::connect(dns, TQT_SIGNAL(resultsReady()), this, TQT_SLOT(dnsResultsReady()));
}
void KSrvResolverWorker::dnsResultsReady()
diff --git a/kdecore/network/ksrvresolverworker_p.h b/kdecore/network/ksrvresolverworker_p.h
index 143fb0d4b..7022df826 100644
--- a/kdecore/network/ksrvresolverworker_p.h
+++ b/kdecore/network/ksrvresolverworker_p.h
@@ -20,11 +20,11 @@
#ifndef KSRVRESOLVERWORKER_P_H
#define KSRVRESOLVERWORKER_P_H
-#include <qobject.h>
-#include <qdns.h>
-#include <qsemaphore.h>
-#include <qvaluelist.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqdns.h>
+#include <tqsemaphore.h>
+#include <tqvaluelist.h>
+#include <tqdict.h>
#include "kresolver.h"
#include "kresolverworkerbase.h"
@@ -38,7 +38,7 @@ namespace KNetwork
* @internal
* This class implements SRV-based resolution
*/
- class KSrvResolverWorker: public QObject,
+ class KSrvResolverWorker: public TQObject,
public KNetwork::KResolverWorkerBase
{
Q_OBJECT
@@ -46,7 +46,7 @@ namespace KNetwork
public:
struct Entry
{
- QString name;
+ TQString name;
Q_UINT16 port;
Q_UINT16 weight;
KNetwork::KResolver* resolver;
@@ -56,17 +56,17 @@ namespace KNetwork
{
PriorityClass() : totalWeight(0) { }
- QValueList<Entry> entries;
+ TQValueList<Entry> entries;
Q_UINT16 totalWeight;
};
private:
- QDns *dns;
- QValueList<QDns::Server> rawResults;
- QCString encodedName;
- QSemaphore *sem;
+ TQDns *dns;
+ TQValueList<TQDns::Server> rawResults;
+ TQCString encodedName;
+ TQSemaphore *sem;
- typedef QMap<Q_UINT16, PriorityClass> Results;
+ typedef TQMap<Q_UINT16, PriorityClass> Results;
Results myResults;
public:
@@ -74,7 +74,7 @@ namespace KNetwork
virtual bool run();
virtual bool postprocess();
- virtual void customEvent(QCustomEvent*);
+ virtual void customEvent(TQCustomEvent*);
public slots:
void dnsResultsReady();
diff --git a/kdecore/network/kstreamsocket.cpp b/kdecore/network/kstreamsocket.cpp
index 93c423804..8ca4f91f6 100644
--- a/kdecore/network/kstreamsocket.cpp
+++ b/kdecore/network/kstreamsocket.cpp
@@ -24,10 +24,10 @@
#include <config.h>
-#include <qsocketnotifier.h>
-#include <qdatetime.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
+#include <tqsocketnotifier.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
#include "ksocketaddress.h"
#include "kresolver.h"
@@ -40,8 +40,8 @@ class KNetwork::KStreamSocketPrivate
{
public:
KResolverResults::ConstIterator local, peer;
- QTime startTime;
- QTimer timer;
+ TQTime startTime;
+ TQTimer timer;
int timeout;
@@ -50,8 +50,8 @@ public:
{ }
};
-KStreamSocket::KStreamSocket(const QString& node, const QString& service,
- QObject* parent, const char *name)
+KStreamSocket::KStreamSocket(const TQString& node, const TQString& service,
+ TQObject* parent, const char *name)
: KClientSocketBase(parent, name), d(new KStreamSocketPrivate)
{
peerResolver().setNodeName(node);
@@ -61,7 +61,7 @@ KStreamSocket::KStreamSocket(const QString& node, const QString& service,
setSocketOptions(socketOptions() & ~Blocking);
- QObject::connect(&d->timer, SIGNAL(timeout()), this, SLOT(timeoutSlot()));
+ TQObject::connect(&d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeoutSlot()));
}
KStreamSocket::~KStreamSocket()
@@ -93,7 +93,7 @@ void KStreamSocket::setTimeout(int msecs)
d->timer.changeInterval(msecs);
}
-bool KStreamSocket::bind(const QString& node, const QString& service)
+bool KStreamSocket::bind(const TQString& node, const TQString& service)
{
if (state() != Idle)
return false;
@@ -105,7 +105,7 @@ bool KStreamSocket::bind(const QString& node, const QString& service)
return true;
}
-bool KStreamSocket::connect(const QString& node, const QString& service)
+bool KStreamSocket::connect(const TQString& node, const TQString& service)
{
if (state() == Connected)
return true; // already connected
@@ -130,7 +130,7 @@ bool KStreamSocket::connect(const QString& node, const QString& service)
// connection hasn't started yet
if (!blocking())
{
- QObject::connect(this, SIGNAL(hostFound()), SLOT(hostFoundSlot()));
+ TQObject::connect(this, TQT_SIGNAL(hostFound()), TQT_SLOT(hostFoundSlot()));
return lookup();
}
@@ -196,10 +196,10 @@ bool KStreamSocket::connect(const KResolverEntry& entry)
void KStreamSocket::hostFoundSlot()
{
- QObject::disconnect(this, SLOT(hostFoundSlot()));
+ TQObject::disconnect(this, TQT_SLOT(hostFoundSlot()));
if (timeout() > 0)
d->timer.start(timeout(), true);
- QTimer::singleShot(0, this, SLOT(connectionEvent()));
+ TQTimer::singleShot(0, this, TQT_SLOT(connectionEvent()));
}
void KStreamSocket::connectionEvent()
@@ -266,14 +266,14 @@ void KStreamSocket::connectionEvent()
// socket is attempting to connect
if (socketDevice()->error() == InProgress)
{
- QSocketNotifier *n = socketDevice()->readNotifier();
- QObject::connect(n, SIGNAL(activated(int)),
- this, SLOT(connectionEvent()));
+ TQSocketNotifier *n = socketDevice()->readNotifier();
+ TQObject::connect(n, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(connectionEvent()));
n->setEnabled(true);
n = socketDevice()->writeNotifier();
- QObject::connect(n, SIGNAL(activated(int)),
- this, SLOT(connectionEvent()));
+ TQObject::connect(n, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(connectionEvent()));
n->setEnabled(true);
return; // wait for activity
@@ -311,7 +311,7 @@ void KStreamSocket::timeoutSlot()
setState(HostFound);
emit stateChanged(HostFound);
- QGuardedPtr<KStreamSocket> that = this;
+ TQGuardedPtr<KStreamSocket> that = this;
emit gotError(Timeout);
if (!that.isNull())
emit timedOut();
@@ -350,8 +350,8 @@ bool KStreamSocket::bindLocallyFor(const KResolverEntry& peer)
void KStreamSocket::connectionSucceeded(const KResolverEntry& peer)
{
- QObject::disconnect(socketDevice()->readNotifier(), 0, this, SLOT(connectionEvent()));
- QObject::disconnect(socketDevice()->writeNotifier(), 0, this, SLOT(connectionEvent()));
+ TQObject::disconnect(socketDevice()->readNotifier(), 0, this, TQT_SLOT(connectionEvent()));
+ TQObject::disconnect(socketDevice()->writeNotifier(), 0, this, TQT_SLOT(connectionEvent()));
resetError();
setFlags(IO_Sequential | IO_Raw | IO_ReadWrite | IO_Open | IO_Async);
diff --git a/kdecore/network/kstreamsocket.h b/kdecore/network/kstreamsocket.h
index d9be79657..099826cb8 100644
--- a/kdecore/network/kstreamsocket.h
+++ b/kdecore/network/kstreamsocket.h
@@ -25,7 +25,7 @@
#ifndef KSTREAMSOCKET_H
#define KSTREAMSOCKET_H
-#include <qstring.h>
+#include <tqstring.h>
#include "kclientsocketbase.h"
@@ -54,30 +54,30 @@ class KStreamSocketPrivate;
*
* Sample usage:
* \code
- * QByteArray httpGet(const QString& hostname)
+ * TQByteArray httpGet(const TQString& hostname)
* {
* KStreamSocket socket(hostname, "http");
* if (!socket.connect())
- * return QByteArray();
- * QByteArray data = socket.readAll();
+ * return TQByteArray();
+ * TQByteArray data = socket.readAll();
* return data;
* }
* \endcode
*
* Here's another sample, showing asynchronous operation:
* \code
- * DataRetriever::DataRetriever(const QString& hostname, const QString& port)
+ * DataRetriever::DataRetriever(const TQString& hostname, const TQString& port)
* : socket(hostname, port)
* {
* // connect signals to our slots
- * QObject::connect(&socket, SIGNAL(connected(const KResolverEntry&)),
- * this, SLOT(slotSocketConnected()));
- * QObject::connect(&socket, SIGNAL(gotError(int)),
- * this, SLOT(slotSocketError(int)));
- * QObject::connect(&socket, SIGNAL(readyRead()),
- * this, SLOT(slotSocketReadyToRead()));
- * QObject::connect(&socket, SIGNAL(readyWrite()),
- * this, SLOT(slotSocketReadyToWrite()));
+ * TQObject::connect(&socket, TQT_SIGNAL(connected(const KResolverEntry&)),
+ * this, TQT_SLOT(slotSocketConnected()));
+ * TQObject::connect(&socket, TQT_SIGNAL(gotError(int)),
+ * this, TQT_SLOT(slotSocketError(int)));
+ * TQObject::connect(&socket, TQT_SIGNAL(readyRead()),
+ * this, TQT_SLOT(slotSocketReadyToRead()));
+ * TQObject::connect(&socket, TQT_SIGNAL(readyWrite()),
+ * this, TQT_SLOT(slotSocketReadyToWrite()));
*
* // set non-blocking mode in order to work asynchronously
* socket.setBlocking(false);
@@ -104,11 +104,11 @@ public:
*
* @param node destination host
* @param service destination service to connect to
- * @param parent the parent QObject object
+ * @param parent the parent TQObject object
* @param name name for this object
*/
- KStreamSocket(const QString& node = QString::null, const QString& service = QString::null,
- QObject* parent = 0L, const char *name = 0L);
+ KStreamSocket(const TQString& node = TQString::null, const TQString& service = TQString::null,
+ TQObject* parent = 0L, const char *name = 0L);
/**
* Destructor. This closes the socket.
@@ -142,7 +142,7 @@ public:
* Binds this socket to the given nodename and service,
* or use the default ones if none are given. In order to bind to a service
* and allow the operating system to choose the interface, set @p node to
- * QString::null.
+ * TQString::null.
*
* Reimplemented from KClientSocketBase.
*
@@ -161,14 +161,14 @@ public:
* @param node the nodename
* @param service the service
*/
- virtual bool bind(const QString& node = QString::null,
- const QString& service = QString::null);
+ virtual bool bind(const TQString& node = TQString::null,
+ const TQString& service = TQString::null);
/**
* Reimplemented from KClientSocketBase. Connect this socket to this
* specific address.
*
- * Unlike @ref bind(const QString&, const QString&) above, this function
+ * Unlike @ref bind(const TQString&, const TQString&) above, this function
* really does bind the socket. No lookup is performed. The @ref bound
* signal will be emitted.
*/
@@ -196,8 +196,8 @@ public:
* @param node the remote node to connect to
* @param service the service on the remote node to connect to
*/
- virtual bool connect(const QString& node = QString::null,
- const QString& service = QString::null);
+ virtual bool connect(const TQString& node = TQString::null,
+ const TQString& service = TQString::null);
/**
* Unshadowing from KClientSocketBase.
diff --git a/kdecore/svgicons/ksvgiconengine.cpp b/kdecore/svgicons/ksvgiconengine.cpp
index 66bf33f0b..18d52bee7 100644
--- a/kdecore/svgicons/ksvgiconengine.cpp
+++ b/kdecore/svgicons/ksvgiconengine.cpp
@@ -18,12 +18,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qfile.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qwmatrix.h>
-#include <qregexp.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqwmatrix.h>
+#include <tqregexp.h>
#include <kmdcodec.h>
@@ -44,25 +44,25 @@ public:
{
}
- double toPixel(const QString &s, bool hmode)
+ double toPixel(const TQString &s, bool hmode)
{
return m_engine->painter()->toPixel(s, hmode);
}
- ArtGradientStop *parseGradientStops(QDomElement element, int &offsets)
+ ArtGradientStop *parseGradientStops(TQDomElement element, int &offsets)
{
if (!element.hasChildNodes())
return 0;
- QValueList<ArtGradientStop> stopList;
+ TQValueList<ArtGradientStop> stopList;
float oldOffset = -1, newOffset = -1;
- for(QDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling())
+ for(TQDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling())
{
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
oldOffset = newOffset;
- QString temp = element.attribute("offset");
+ TQString temp = element.attribute("offset");
if(temp.contains("%"))
{
@@ -83,8 +83,8 @@ public:
stop.offset = newOffset;
- QString parseOpacity;
- QString parseColor;
+ TQString parseOpacity;
+ TQString parseColor;
if(element.hasAttribute("stop-opacity"))
parseOpacity = element.attribute("stop-opacity");
@@ -94,14 +94,14 @@ public:
if(parseOpacity.isEmpty() || parseColor.isEmpty())
{
- QString style = element.attribute("style");
+ TQString style = element.attribute("style");
- QStringList substyles = QStringList::split(';', style);
- for(QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it)
+ TQStringList substyles = TQStringList::split(';', style);
+ for(TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it)
{
- QStringList substyle = QStringList::split(':', (*it));
- QString command = substyle[0];
- QString params = substyle[1];
+ TQStringList substyle = TQStringList::split(':', (*it));
+ TQString command = substyle[0];
+ TQString params = substyle[1];
command = command.stripWhiteSpace();
params = params.stripWhiteSpace();
@@ -124,7 +124,7 @@ public:
// Parse color using KSVGIconPainter (which uses Qt)
// Supports all svg-needed color formats
- QColor qStopColor = m_engine->painter()->parseColor(parseColor);
+ TQColor qStopColor = m_engine->painter()->parseColor(parseColor);
// Convert in a libart suitable form
Q_UINT32 stopColor = m_engine->painter()->toArtColor(qStopColor);
@@ -154,8 +154,8 @@ public:
ArtGradientStop *stops = new ArtGradientStop[stopList.count()];
- QValueList<ArtGradientStop>::iterator it = stopList.begin();
- QValueList<ArtGradientStop>::iterator end = stopList.end();
+ TQValueList<ArtGradientStop>::iterator it = stopList.begin();
+ TQValueList<ArtGradientStop>::iterator end = stopList.end();
for (int i = 0; it != end; ++i, ++it)
stops[i] = *it;
@@ -163,28 +163,28 @@ public:
return stops;
}
- QPointArray parsePoints(QString points)
+ TQPointArray parsePoints(TQString points)
{
if(points.isEmpty())
- return QPointArray();
+ return TQPointArray();
points = points.simplifyWhiteSpace();
if(points.contains(",,") || points.contains(", ,"))
- return QPointArray();
+ return TQPointArray();
points.replace(',', ' ');
- points.replace('\r', QString::null);
- points.replace('\n', QString::null);
+ points.replace('\r', TQString::null);
+ points.replace('\n', TQString::null);
points = points.simplifyWhiteSpace();
- QStringList pointList = QStringList::split(' ', points);
+ TQStringList pointList = TQStringList::split(' ', points);
- QPointArray array(pointList.count() / 2);
+ TQPointArray array(pointList.count() / 2);
int i = 0;
- for(QStringList::Iterator it = pointList.begin(); it != pointList.end(); it++)
+ for(TQStringList::Iterator it = pointList.begin(); it != pointList.end(); it++)
{
float x = (*(it++)).toFloat();
float y = (*(it)).toFloat();
@@ -196,16 +196,16 @@ public:
return array;
}
- void parseTransform(const QString &transform)
+ void parseTransform(const TQString &transform)
{
// Combine new and old matrix
- QWMatrix matrix = m_engine->painter()->parseTransform(transform);
+ TQWMatrix matrix = m_engine->painter()->parseTransform(transform);
- QWMatrix *current = m_engine->painter()->worldMatrix();
+ TQWMatrix *current = m_engine->painter()->worldMatrix();
*current = matrix * *current;
}
- void parseCommonAttributes(QDomNode &node)
+ void parseCommonAttributes(TQDomNode &node)
{
// Set important default attributes
m_engine->painter()->setFillColor("black");
@@ -218,21 +218,21 @@ public:
// m_engine->painter()->setStrokeOpacity(255, true);
// Collect parent node's attributes
- QPtrList<QDomNamedNodeMap> applyList;
+ TQPtrList<TQDomNamedNodeMap> applyList;
applyList.setAutoDelete(true);
- QDomNode shape = node.parentNode();
+ TQDomNode shape = node.parentNode();
for(; !shape.isNull() ; shape = shape.parentNode())
- applyList.prepend(new QDomNamedNodeMap(shape.attributes()));
+ applyList.prepend(new TQDomNamedNodeMap(shape.attributes()));
// Apply parent attributes
- for(QDomNamedNodeMap *map = applyList.first(); map != 0; map = applyList.next())
+ for(TQDomNamedNodeMap *map = applyList.first(); map != 0; map = applyList.next())
{
- QDomNamedNodeMap attr = *map;
+ TQDomNamedNodeMap attr = *map;
for(unsigned int i = 0; i < attr.count(); i++)
{
- QString name, value;
+ TQString name, value;
name = attr.item(i).nodeName().lower();
value = attr.item(i).nodeValue();
@@ -247,11 +247,11 @@ public:
}
// Apply local attributes
- QDomNamedNodeMap attr = node.attributes();
+ TQDomNamedNodeMap attr = node.attributes();
for(unsigned int i = 0; i < attr.count(); i++)
{
- QDomNode current = attr.item(i);
+ TQDomNode current = attr.item(i);
if(current.nodeName().lower() == "transform")
parseTransform(current.nodeValue());
@@ -262,7 +262,7 @@ public:
}
}
- bool handleTags(QDomElement element, bool paint)
+ bool handleTags(TQDomElement element, bool paint)
{
if(element.attribute("display") == "none")
return false;
@@ -274,7 +274,7 @@ public:
gradient->stops = parseGradientStops(element, offsets);
gradient->n_stops = offsets + 1;
- QString spread = element.attribute("spreadMethod");
+ TQString spread = element.attribute("spreadMethod");
if(spread == "repeat")
gradient->spread = ART_GRADIENT_REPEAT;
else if(spread == "reflect")
@@ -323,12 +323,12 @@ public:
}
else if(element.tagName() == "switch")
{
- QDomNode iterate = element.firstChild();
+ TQDomNode iterate = element.firstChild();
while(!iterate.isNull())
{
// Reset matrix
- m_engine->painter()->setWorldMatrix(new QWMatrix(m_initialMatrix));
+ m_engine->painter()->setWorldMatrix(new TQWMatrix(m_initialMatrix));
// Parse common attributes, style / transform
parseCommonAttributes(iterate);
@@ -341,12 +341,12 @@ public:
}
else if(element.tagName() == "g" || element.tagName() == "defs")
{
- QDomNode iterate = element.firstChild();
+ TQDomNode iterate = element.firstChild();
while(!iterate.isNull())
{
// Reset matrix
- m_engine->painter()->setWorldMatrix(new QWMatrix(m_initialMatrix));
+ m_engine->painter()->setWorldMatrix(new TQWMatrix(m_initialMatrix));
// Parse common attributes, style / transform
parseCommonAttributes(iterate);
@@ -389,13 +389,13 @@ public:
}
else if(element.tagName() == "polyline")
{
- QPointArray polyline = parsePoints(element.attribute("points"));
+ TQPointArray polyline = parsePoints(element.attribute("points"));
m_engine->painter()->drawPolyline(polyline);
return true;
}
else if(element.tagName() == "polygon")
{
- QPointArray polygon = parsePoints(element.attribute("points"));
+ TQPointArray polygon = parsePoints(element.attribute("points"));
m_engine->painter()->drawPolygon(polygon);
return true;
}
@@ -419,16 +419,16 @@ public:
double w = toPixel(element.attribute("width"), true);
double h = toPixel(element.attribute("height"), false);
- QString href = element.attribute("xlink:href");
+ TQString href = element.attribute("xlink:href");
- QImage image;
+ TQImage image;
if(href.startsWith("data:"))
{
// Get input
- QCString input = href.remove(QRegExp("^data:image/.*;base64,")).utf8();
+ TQCString input = href.remove(TQRegExp("^data:image/.*;base64,")).utf8();
// Decode into 'output'
- QByteArray output;
+ TQByteArray output;
KCodecs::base64Decode(input, output);
// Display
@@ -441,7 +441,7 @@ public:
{
// Scale, if needed
if(image.width() != (int) w || image.height() != (int) h)
- image = image.smoothScale((int) w, (int) h, QImage::ScaleFree);
+ image = image.smoothScale((int) w, (int) h, TQImage::ScaleFree);
m_engine->painter()->drawImage(x, y, image);
}
@@ -451,14 +451,14 @@ public:
return false;
}
- void parseStyle(const QString &style)
+ void parseStyle(const TQString &style)
{
- QStringList substyles = QStringList::split(';', style);
- for(QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it)
+ TQStringList substyles = TQStringList::split(';', style);
+ for(TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it)
{
- QStringList substyle = QStringList::split(':', (*it));
- QString command = substyle[0];
- QString params = substyle[1];
+ TQStringList substyle = TQStringList::split(':', (*it));
+ TQString command = substyle[0];
+ TQString params = substyle[1];
command = command.stripWhiteSpace();
params = params.stripWhiteSpace();
@@ -466,7 +466,7 @@ public:
}
}
- void parsePA(const QString &command, const QString &value)
+ void parsePA(const TQString &command, const TQString &value)
{
if(command == "stroke-width") // TODO: horiz:false correct?
m_engine->painter()->setStrokeWidth(toPixel(value, false));
@@ -505,7 +505,7 @@ private:
friend class KSVGIconEngine;
KSVGIconEngine *m_engine;
- QWMatrix m_initialMatrix;
+ TQWMatrix m_initialMatrix;
};
struct KSVGIconEngine::Private
@@ -536,10 +536,10 @@ KSVGIconEngine::~KSVGIconEngine()
delete d;
}
-bool KSVGIconEngine::load(int width, int height, const QString &path)
+bool KSVGIconEngine::load(int width, int height, const TQString &path)
{
- QDomDocument svgDocument("svg");
- QFile file(path);
+ TQDomDocument svgDocument("svg");
+ TQFile file(path);
if(path.right(3).upper() == "SVG")
{
@@ -555,10 +555,10 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
if(!svgz)
return false;
- QString data;
+ TQString data;
bool done = false;
- QCString buffer(1024);
+ TQCString buffer(1024);
int length = 0;
while(!done)
@@ -583,12 +583,12 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
return false;
// Check for root element
- QDomNode rootNode = svgDocument.namedItem("svg");
+ TQDomNode rootNode = svgDocument.namedItem("svg");
if(rootNode.isNull() || !rootNode.isElement())
return false;
// Detect width and height
- QDomElement rootElement = rootNode.toElement();
+ TQDomElement rootElement = rootNode.toElement();
// Create icon painter
d->painter = new KSVGIconPainter(width, height);
@@ -611,7 +611,7 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
// Apply viewbox
if(rootElement.hasAttribute("viewBox"))
{
- QStringList points = QStringList::split(' ', rootElement.attribute("viewBox").simplifyWhiteSpace());
+ TQStringList points = TQStringList::split(' ', rootElement.attribute("viewBox").simplifyWhiteSpace());
float w = points[2].toFloat();
float h = points[3].toFloat();
@@ -634,7 +634,7 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
d->painter->worldMatrix()->scale(ratiow, ratioh);
}
- QWMatrix initialMatrix = *d->painter->worldMatrix();
+ TQWMatrix initialMatrix = *d->painter->worldMatrix();
d->helper->m_initialMatrix = initialMatrix;
// Apply transform
@@ -642,10 +642,10 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
d->helper->parseTransform(rootElement.attribute("transform"));
// Go through all elements
- QDomNode svgNode = rootElement.firstChild();
+ TQDomNode svgNode = rootElement.firstChild();
while(!svgNode.isNull())
{
- QDomElement svgChild = svgNode.toElement();
+ TQDomElement svgChild = svgNode.toElement();
if(!svgChild.isNull())
{
d->helper->parseCommonAttributes(svgNode);
@@ -655,7 +655,7 @@ bool KSVGIconEngine::load(int width, int height, const QString &path)
svgNode = svgNode.nextSibling();
// Reset matrix
- d->painter->setWorldMatrix(new QWMatrix(initialMatrix));
+ d->painter->setWorldMatrix(new TQWMatrix(initialMatrix));
}
d->painter->finish();
@@ -668,7 +668,7 @@ KSVGIconPainter *KSVGIconEngine::painter()
return d->painter;
}
-QImage *KSVGIconEngine::image()
+TQImage *KSVGIconEngine::image()
{
return d->painter->image();
}
diff --git a/kdecore/svgicons/ksvgiconengine.h b/kdecore/svgicons/ksvgiconengine.h
index 3d3f46ea5..3ef2063e9 100644
--- a/kdecore/svgicons/ksvgiconengine.h
+++ b/kdecore/svgicons/ksvgiconengine.h
@@ -33,10 +33,10 @@ public:
KSVGIconEngine();
~KSVGIconEngine();
- bool load(int width, int height, const QString &path);
+ bool load(int width, int height, const TQString &path);
KSVGIconPainter *painter();
- QImage *image();
+ TQImage *image();
double width();
double height();
diff --git a/kdecore/svgicons/ksvgiconpainter.cpp b/kdecore/svgicons/ksvgiconpainter.cpp
index 100369570..811dfe918 100644
--- a/kdecore/svgicons/ksvgiconpainter.cpp
+++ b/kdecore/svgicons/ksvgiconpainter.cpp
@@ -18,14 +18,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qvaluevector.h>
-#include <qstringlist.h>
-#include <qwmatrix.h>
-#include <qregexp.h>
-#include <qimage.h>
-#include <qdict.h>
-#include <qmap.h>
-#include <qdom.h>
+#include <tqvaluevector.h>
+#include <tqstringlist.h>
+#include <tqwmatrix.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqdom.h>
#include <math.h>
@@ -65,10 +65,10 @@ public:
m_useFillGradient = false;
m_useStrokeGradient = false;
- m_worldMatrix = new QWMatrix();
+ m_worldMatrix = new TQWMatrix();
// Create new image with alpha support
- m_image = new QImage(width, height, 32);
+ m_image = new TQImage(width, height, 32);
m_image->setAlphaBuffer(true);
m_strokeWidth = 1.0;
@@ -104,14 +104,14 @@ public:
delete m_image;
delete m_worldMatrix;
- for(QMap<QString, ArtGradientLinear *>::Iterator it = m_linearGradientMap.begin(); it != m_linearGradientMap.end(); ++it)
+ for(TQMap<TQString, ArtGradientLinear *>::Iterator it = m_linearGradientMap.begin(); it != m_linearGradientMap.end(); ++it)
{
if (!it.data())
continue;
delete [] it.data()->stops;
delete it.data();
}
- for(QMap<QString, ArtGradientRadial *>::Iterator it = m_radialGradientMap.begin(); it != m_radialGradientMap.end(); ++it)
+ for(TQMap<TQString, ArtGradientRadial *>::Iterator it = m_radialGradientMap.begin(); it != m_radialGradientMap.end(); ++it)
{
if (!it.data())
continue;
@@ -130,7 +130,7 @@ public:
return art_new(ArtBpath, number);
}
- void ensureSpace(QMemArray<ArtBpath> &vec, int index)
+ void ensureSpace(TQMemArray<ArtBpath> &vec, int index)
{
if(vec.size() == (unsigned int) index)
vec.resize(index + 1);
@@ -185,10 +185,10 @@ public:
m_tempBuffer = 0;
}
- Q_UINT32 toArtColor(const QColor &color)
+ Q_UINT32 toArtColor(const TQColor &color)
{
// Convert in a libart suitable form
- QString tempName = color.name();
+ TQString tempName = color.name();
const char *str = tempName.latin1();
int result = 0;
@@ -272,7 +272,7 @@ public:
// Filling
{
int index = -1;
- QValueVector<int> toCorrect;
+ TQValueVector<int> toCorrect;
while(vec[++index].code != ART_END)
{
if(vec[index].code == ART_END2)
@@ -300,7 +300,7 @@ public:
art_svp_free(temp);
- QValueVector<int>::iterator it;
+ TQValueVector<int>::iterator it;
for(it = toCorrect.begin(); it != toCorrect.end(); ++it)
vec[(*it)].code = (ArtPathcode)ART_END2;
}
@@ -337,8 +337,8 @@ public:
if(m_dashes.length() > 0)
{
- QRegExp reg("[, ]");
- QStringList dashList = QStringList::split(reg, m_dashes);
+ TQRegExp reg("[, ]");
+ TQStringList dashList = TQStringList::split(reg, m_dashes);
double *dashes = new double[dashList.count()];
for(unsigned int i = 0; i < dashList.count(); i++)
@@ -428,12 +428,12 @@ public:
art_free(vec);
}
- void applyLinearGradient(ArtSVP *svp, const QString &ref)
+ void applyLinearGradient(ArtSVP *svp, const TQString &ref)
{
ArtGradientLinear *linear = m_linearGradientMap[ref];
if(linear)
{
- QDomElement element = m_linearGradientElementMap[linear];
+ TQDomElement element = m_linearGradientElementMap[linear];
double x1, y1, x2, y2;
if(element.hasAttribute("x1"))
@@ -457,7 +457,7 @@ public:
y2 = 0;
// Adjust to gradientTransform
- QWMatrix m = m_painter->parseTransform(element.attribute("gradientTransform"));
+ TQWMatrix m = m_painter->parseTransform(element.attribute("gradientTransform"));
m.map(x1, y1, &x1, &y1);
m.map(x2, y2, &x2, &y2);
@@ -482,12 +482,12 @@ public:
}
}
- void applyRadialGradient(ArtSVP *svp, const QString &ref)
+ void applyRadialGradient(ArtSVP *svp, const TQString &ref)
{
ArtGradientRadial *radial = m_radialGradientMap[ref];
if(radial)
{
- QDomElement element = m_radialGradientElementMap[radial];
+ TQDomElement element = m_radialGradientElementMap[radial];
double cx, cy, r, fx, fy;
if(element.hasAttribute("cx"))
@@ -528,7 +528,7 @@ public:
double aff1[6], aff2[6], gradTransform[6];
// Respect gradientTransform
- QWMatrix m = m_painter->parseTransform(element.attribute("gradientTransform"));
+ TQWMatrix m = m_painter->parseTransform(element.attribute("gradientTransform"));
gradTransform[0] = m.m11();
gradTransform[1] = m.m12();
@@ -553,12 +553,12 @@ public:
}
}
- void applyGradient(ArtSVP *svp, const QString &ref)
+ void applyGradient(ArtSVP *svp, const TQString &ref)
{
ArtGradientLinear *linear = m_linearGradientMap[ref];
if(linear)
{
- QDomElement element = m_linearGradientElementMap[linear];
+ TQDomElement element = m_linearGradientElementMap[linear];
if(!element.hasAttribute("xlink:href"))
{
@@ -568,23 +568,23 @@ public:
else
{
ArtGradientLinear *linear = m_linearGradientMap[element.attribute("xlink:href").mid(1)];
- QDomElement newElement = m_linearGradientElementMap[linear];
+ TQDomElement newElement = m_linearGradientElementMap[linear];
// Saved 'old' attributes
- QDict<QString> refattrs;
+ TQDict<TQString> refattrs;
refattrs.setAutoDelete(true);
for(unsigned int i = 0; i < newElement.attributes().length(); ++i)
- refattrs.insert(newElement.attributes().item(i).nodeName(), new QString(newElement.attributes().item(i).nodeValue()));
+ refattrs.insert(newElement.attributes().item(i).nodeName(), new TQString(newElement.attributes().item(i).nodeValue()));
// Copy attributes
if(!newElement.isNull())
{
- QDomNamedNodeMap attr = element.attributes();
+ TQDomNamedNodeMap attr = element.attributes();
for(unsigned int i = 0; i < attr.length(); i++)
{
- QString name = attr.item(i).nodeName();
+ TQString name = attr.item(i).nodeName();
if(name != "xlink:href" && name != "id")
newElement.setAttribute(name, attr.item(i).nodeValue());
}
@@ -593,7 +593,7 @@ public:
applyGradient(svp, element.attribute("xlink:href").mid(1));
// Restore attributes
- QDictIterator<QString> itr(refattrs);
+ TQDictIterator<TQString> itr(refattrs);
for(; itr.current(); ++itr)
newElement.setAttribute(itr.currentKey(), *(itr.current()));
@@ -604,7 +604,7 @@ public:
ArtGradientRadial *radial = m_radialGradientMap[ref];
if(radial)
{
- QDomElement element = m_radialGradientElementMap[radial];
+ TQDomElement element = m_radialGradientElementMap[radial];
if(!element.hasAttribute("xlink:href"))
{
@@ -614,23 +614,23 @@ public:
else
{
ArtGradientRadial *radial = m_radialGradientMap[element.attribute("xlink:href").mid(1)];
- QDomElement newElement = m_radialGradientElementMap[radial];
+ TQDomElement newElement = m_radialGradientElementMap[radial];
// Saved 'old' attributes
- QDict<QString> refattrs;
+ TQDict<TQString> refattrs;
refattrs.setAutoDelete(true);
for(unsigned int i = 0; i < newElement.attributes().length(); ++i)
- refattrs.insert(newElement.attributes().item(i).nodeName(), new QString(newElement.attributes().item(i).nodeValue()));
+ refattrs.insert(newElement.attributes().item(i).nodeName(), new TQString(newElement.attributes().item(i).nodeValue()));
// Copy attributes
if(!newElement.isNull())
{
- QDomNamedNodeMap attr = element.attributes();
+ TQDomNamedNodeMap attr = element.attributes();
for(unsigned int i = 0; i < attr.length(); i++)
{
- QString name = attr.item(i).nodeName();
+ TQString name = attr.item(i).nodeName();
if(name != "xlink:href" && name != "id")
newElement.setAttribute(name, attr.item(i).nodeValue());
}
@@ -639,7 +639,7 @@ public:
applyGradient(svp, element.attribute("xlink:href").mid(1));
// Restore attributes
- QDictIterator<QString> itr(refattrs);
+ TQDictIterator<TQString> itr(refattrs);
for(; itr.current(); ++itr)
newElement.setAttribute(itr.currentKey(), *(itr.current()));
@@ -650,7 +650,7 @@ public:
void applyGradient(ArtSVP *svp, bool fill)
{
- QString ref;
+ TQString ref;
if(fill)
{
@@ -680,7 +680,7 @@ public:
}
}
- void calculateArc(bool relative, QMemArray<ArtBpath> &vec, int &index, double &curx, double &cury, double angle, double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag)
+ void calculateArc(bool relative, TQMemArray<ArtBpath> &vec, int &index, double &curx, double &cury, double angle, double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag)
{
double sin_th, cos_th;
double a00, a01, a10, a11;
@@ -1122,20 +1122,20 @@ private:
friend class KSVGIconPainter;
ArtSVP *m_clipSVP;
- QImage *m_image;
- QWMatrix *m_worldMatrix;
+ TQImage *m_image;
+ TQWMatrix *m_worldMatrix;
- QString m_fillRule;
- QString m_joinStyle;
- QString m_capStyle;
+ TQString m_fillRule;
+ TQString m_joinStyle;
+ TQString m_capStyle;
int m_strokeMiterLimit;
- QString m_dashes;
+ TQString m_dashes;
unsigned short m_dashOffset;
- QColor m_fillColor;
- QColor m_strokeColor;
+ TQColor m_fillColor;
+ TQColor m_strokeColor;
art_u8 *m_buffer;
art_u8 *m_tempBuffer;
@@ -1155,14 +1155,14 @@ private:
bool m_useFillGradient;
bool m_useStrokeGradient;
- QString m_fillGradientReference;
- QString m_strokeGradientReference;
+ TQString m_fillGradientReference;
+ TQString m_strokeGradientReference;
- QMap<QString, ArtGradientLinear *> m_linearGradientMap;
- QMap<ArtGradientLinear *, QDomElement> m_linearGradientElementMap;
+ TQMap<TQString, ArtGradientLinear *> m_linearGradientMap;
+ TQMap<ArtGradientLinear *, TQDomElement> m_linearGradientElementMap;
- QMap<QString, ArtGradientRadial *> m_radialGradientMap;
- QMap<ArtGradientRadial *, QDomElement> m_radialGradientElementMap;
+ TQMap<TQString, ArtGradientRadial *> m_radialGradientMap;
+ TQMap<ArtGradientRadial *, TQDomElement> m_radialGradientElementMap;
KSVGIconPainter *m_painter;
@@ -1206,17 +1206,17 @@ void KSVGIconPainter::finish()
d->helper->blit();
}
-QImage *KSVGIconPainter::image()
+TQImage *KSVGIconPainter::image()
{
- return new QImage(*d->helper->m_image);
+ return new TQImage(*d->helper->m_image);
}
-QWMatrix *KSVGIconPainter::worldMatrix()
+TQWMatrix *KSVGIconPainter::worldMatrix()
{
return d->helper->m_worldMatrix;
}
-void KSVGIconPainter::setWorldMatrix(QWMatrix *matrix)
+void KSVGIconPainter::setWorldMatrix(TQWMatrix *matrix)
{
if(d->helper->m_worldMatrix)
delete d->helper->m_worldMatrix;
@@ -1229,39 +1229,39 @@ void KSVGIconPainter::setStrokeWidth(double width)
d->helper->m_strokeWidth = width;
}
-void KSVGIconPainter::setStrokeMiterLimit(const QString &miter)
+void KSVGIconPainter::setStrokeMiterLimit(const TQString &miter)
{
d->helper->m_strokeMiterLimit = miter.toInt();
}
-void KSVGIconPainter::setStrokeDashOffset(const QString &dashOffset)
+void KSVGIconPainter::setStrokeDashOffset(const TQString &dashOffset)
{
d->helper->m_dashOffset = dashOffset.toUInt();
}
-void KSVGIconPainter::setStrokeDashArray(const QString &dashes)
+void KSVGIconPainter::setStrokeDashArray(const TQString &dashes)
{
d->helper->m_dashes = dashes;
}
-void KSVGIconPainter::setCapStyle(const QString &cap)
+void KSVGIconPainter::setCapStyle(const TQString &cap)
{
d->helper->m_capStyle = cap;
}
-void KSVGIconPainter::setJoinStyle(const QString &join)
+void KSVGIconPainter::setJoinStyle(const TQString &join)
{
d->helper->m_joinStyle = join;
}
-void KSVGIconPainter::setStrokeColor(const QString &stroke)
+void KSVGIconPainter::setStrokeColor(const TQString &stroke)
{
if(stroke.startsWith("url"))
{
d->helper->m_useStroke = false;
d->helper->m_useStrokeGradient = true;
- QString url = stroke;
+ TQString url = stroke;
unsigned int start = url.find("#") + 1;
unsigned int end = url.findRev(")");
@@ -1273,7 +1273,7 @@ void KSVGIconPainter::setStrokeColor(const QString &stroke)
d->helper->m_strokeColor = parseColor(stroke);
d->helper->m_useStrokeGradient = false;
- d->helper->m_strokeGradientReference = QString::null;
+ d->helper->m_strokeGradientReference = TQString::null;
if(stroke.stripWhiteSpace().lower() != "none")
setUseStroke(true);
@@ -1282,14 +1282,14 @@ void KSVGIconPainter::setStrokeColor(const QString &stroke)
}
}
-void KSVGIconPainter::setFillColor(const QString &fill)
+void KSVGIconPainter::setFillColor(const TQString &fill)
{
if(fill.startsWith("url"))
{
d->helper->m_useFill = false;
d->helper->m_useFillGradient = true;
- QString url = fill;
+ TQString url = fill;
unsigned int start = url.find("#") + 1;
unsigned int end = url.findRev(")");
@@ -1301,7 +1301,7 @@ void KSVGIconPainter::setFillColor(const QString &fill)
d->helper->m_fillColor = parseColor(fill);
d->helper->m_useFillGradient = false;
- d->helper->m_fillGradientReference = QString::null;
+ d->helper->m_fillGradientReference = TQString::null;
if(fill.stripWhiteSpace().lower() != "none")
setUseFill(true);
@@ -1310,12 +1310,12 @@ void KSVGIconPainter::setFillColor(const QString &fill)
}
}
-void KSVGIconPainter::setFillRule(const QString &fillRule)
+void KSVGIconPainter::setFillRule(const TQString &fillRule)
{
d->helper->m_fillRule = fillRule;
}
-Q_UINT32 KSVGIconPainter::parseOpacity(const QString &data)
+Q_UINT32 KSVGIconPainter::parseOpacity(const TQString &data)
{
int opacity = 255;
@@ -1325,7 +1325,7 @@ Q_UINT32 KSVGIconPainter::parseOpacity(const QString &data)
if(data.contains("%"))
{
- QString tempString = data.left(data.length() - 1);
+ TQString tempString = data.left(data.length() - 1);
temp = double(255 * tempString.toDouble()) / 100.0;
}
else
@@ -1337,17 +1337,17 @@ Q_UINT32 KSVGIconPainter::parseOpacity(const QString &data)
return opacity;
}
-void KSVGIconPainter::setFillOpacity(const QString &fillOpacity)
+void KSVGIconPainter::setFillOpacity(const TQString &fillOpacity)
{
d->helper->m_fillOpacity = parseOpacity(fillOpacity);
}
-void KSVGIconPainter::setStrokeOpacity(const QString &strokeOpacity)
+void KSVGIconPainter::setStrokeOpacity(const TQString &strokeOpacity)
{
d->helper->m_strokeOpacity = parseOpacity(strokeOpacity);
}
-void KSVGIconPainter::setOpacity(const QString &opacity)
+void KSVGIconPainter::setOpacity(const TQString &opacity)
{
d->helper->m_opacity = parseOpacity(opacity);
}
@@ -1594,7 +1594,7 @@ void KSVGIconPainter::drawLine(double x1, double y1, double x2, double y2)
d->helper->drawVPath(vec);
}
-void KSVGIconPainter::drawPolyline(QPointArray polyArray, int points)
+void KSVGIconPainter::drawPolyline(TQPointArray polyArray, int points)
{
if(polyArray.point(0).x() == -1 || polyArray.point(0).y() == -1)
return;
@@ -1612,7 +1612,7 @@ void KSVGIconPainter::drawPolyline(QPointArray polyArray, int points)
int index;
for(index = 1; index < points; index++)
{
- QPoint point = polyArray.point(index);
+ TQPoint point = polyArray.point(index);
polyline[index].code = ART_LINETO;
polyline[index].x = point.x();
polyline[index].y = point.y();
@@ -1630,7 +1630,7 @@ void KSVGIconPainter::drawPolyline(QPointArray polyArray, int points)
d->helper->drawVPath(polyline);
}
-void KSVGIconPainter::drawPolygon(QPointArray polyArray)
+void KSVGIconPainter::drawPolygon(TQPointArray polyArray)
{
ArtVpath *polygon;
@@ -1642,7 +1642,7 @@ void KSVGIconPainter::drawPolygon(QPointArray polyArray)
unsigned int index;
for(index = 1; index < polyArray.count(); index++)
{
- QPoint point = polyArray.point(index);
+ TQPoint point = polyArray.point(index);
polygon[index].code = ART_LINETO;
polygon[index].x = point.x();
polygon[index].y = point.y();
@@ -1724,19 +1724,19 @@ static const char *getCoord(const char *ptr, double &number)
return ptr;
}
-void KSVGIconPainter::drawPath(const QString &data, bool filled)
+void KSVGIconPainter::drawPath(const TQString &data, bool filled)
{
if (!data.isEmpty())
{
- QString value = data;
+ TQString value = data;
- QMemArray<ArtBpath> vec;
+ TQMemArray<ArtBpath> vec;
int index = -1;
double curx = 0.0, cury = 0.0, contrlx = 0.0, contrly = 0.0, xc, yc;
unsigned int lastCommand = 0;
- QString _d = value.replace(",", " ");
+ TQString _d = value.replace(",", " ");
_d = _d.simplifyWhiteSpace();
const char *ptr = _d.latin1();
const char *end = _d.latin1() + _d.length() + 1;
@@ -2304,7 +2304,7 @@ void KSVGIconPainter::drawPath(const QString &data, bool filled)
}
}
-void KSVGIconPainter::drawImage(double x, double y, QImage &image)
+void KSVGIconPainter::drawImage(double x, double y, TQImage &image)
{
if(image.depth() != 32)
image = image.convertDepth(32);
@@ -2322,343 +2322,343 @@ void KSVGIconPainter::drawImage(double x, double y, QImage &image)
image.width() * 4, affine);
}
-QColor KSVGIconPainter::parseColor(const QString &param)
+TQColor KSVGIconPainter::parseColor(const TQString &param)
{
if(param.stripWhiteSpace().startsWith("#"))
{
- QColor color;
+ TQColor color;
color.setNamedColor(param.stripWhiteSpace());
return color;
}
else if(param.stripWhiteSpace().startsWith("rgb("))
{
- QString parse = param.stripWhiteSpace();
- QStringList colors = QStringList::split(',', parse);
- QString r = colors[0].right((colors[0].length() - 4));
- QString g = colors[1];
- QString b = colors[2].left((colors[2].length() - 1));
+ TQString parse = param.stripWhiteSpace();
+ TQStringList colors = TQStringList::split(',', parse);
+ TQString r = colors[0].right((colors[0].length() - 4));
+ TQString g = colors[1];
+ TQString b = colors[2].left((colors[2].length() - 1));
if(r.contains("%"))
{
r = r.left(r.length() - 1);
- r = QString::number(int((double(255 * r.toDouble()) / 100.0)));
+ r = TQString::number(int((double(255 * r.toDouble()) / 100.0)));
}
if(g.contains("%"))
{
g = g.left(g.length() - 1);
- g = QString::number(int((double(255 * g.toDouble()) / 100.0)));
+ g = TQString::number(int((double(255 * g.toDouble()) / 100.0)));
}
if(b.contains("%"))
{
b = b.left(b.length() - 1);
- b = QString::number(int((double(255 * b.toDouble()) / 100.0)));
+ b = TQString::number(int((double(255 * b.toDouble()) / 100.0)));
}
- return QColor(r.toInt(), g.toInt(), b.toInt());
+ return TQColor(r.toInt(), g.toInt(), b.toInt());
}
else
{
- QString rgbColor = param.stripWhiteSpace();
+ TQString rgbColor = param.stripWhiteSpace();
if(rgbColor == "aliceblue")
- return QColor(240, 248, 255);
+ return TQColor(240, 248, 255);
else if(rgbColor == "antiquewhite")
- return QColor(250, 235, 215);
+ return TQColor(250, 235, 215);
else if(rgbColor == "aqua")
- return QColor(0, 255, 255);
+ return TQColor(0, 255, 255);
else if(rgbColor == "aquamarine")
- return QColor(127, 255, 212);
+ return TQColor(127, 255, 212);
else if(rgbColor == "azure")
- return QColor(240, 255, 255);
+ return TQColor(240, 255, 255);
else if(rgbColor == "beige")
- return QColor(245, 245, 220);
+ return TQColor(245, 245, 220);
else if(rgbColor == "bisque")
- return QColor(255, 228, 196);
+ return TQColor(255, 228, 196);
else if(rgbColor == "black")
- return QColor(0, 0, 0);
+ return TQColor(0, 0, 0);
else if(rgbColor == "blanchedalmond")
- return QColor(255, 235, 205);
+ return TQColor(255, 235, 205);
else if(rgbColor == "blue")
- return QColor(0, 0, 255);
+ return TQColor(0, 0, 255);
else if(rgbColor == "blueviolet")
- return QColor(138, 43, 226);
+ return TQColor(138, 43, 226);
else if(rgbColor == "brown")
- return QColor(165, 42, 42);
+ return TQColor(165, 42, 42);
else if(rgbColor == "burlywood")
- return QColor(222, 184, 135);
+ return TQColor(222, 184, 135);
else if(rgbColor == "cadetblue")
- return QColor(95, 158, 160);
+ return TQColor(95, 158, 160);
else if(rgbColor == "chartreuse")
- return QColor(127, 255, 0);
+ return TQColor(127, 255, 0);
else if(rgbColor == "chocolate")
- return QColor(210, 105, 30);
+ return TQColor(210, 105, 30);
else if(rgbColor == "coral")
- return QColor(255, 127, 80);
+ return TQColor(255, 127, 80);
else if(rgbColor == "cornflowerblue")
- return QColor(100, 149, 237);
+ return TQColor(100, 149, 237);
else if(rgbColor == "cornsilk")
- return QColor(255, 248, 220);
+ return TQColor(255, 248, 220);
else if(rgbColor == "crimson")
- return QColor(220, 20, 60);
+ return TQColor(220, 20, 60);
else if(rgbColor == "cyan")
- return QColor(0, 255, 255);
+ return TQColor(0, 255, 255);
else if(rgbColor == "darkblue")
- return QColor(0, 0, 139);
+ return TQColor(0, 0, 139);
else if(rgbColor == "darkcyan")
- return QColor(0, 139, 139);
+ return TQColor(0, 139, 139);
else if(rgbColor == "darkgoldenrod")
- return QColor(184, 134, 11);
+ return TQColor(184, 134, 11);
else if(rgbColor == "darkgray")
- return QColor(169, 169, 169);
+ return TQColor(169, 169, 169);
else if(rgbColor == "darkgrey")
- return QColor(169, 169, 169);
+ return TQColor(169, 169, 169);
else if(rgbColor == "darkgreen")
- return QColor(0, 100, 0);
+ return TQColor(0, 100, 0);
else if(rgbColor == "darkkhaki")
- return QColor(189, 183, 107);
+ return TQColor(189, 183, 107);
else if(rgbColor == "darkmagenta")
- return QColor(139, 0, 139);
+ return TQColor(139, 0, 139);
else if(rgbColor == "darkolivegreen")
- return QColor(85, 107, 47);
+ return TQColor(85, 107, 47);
else if(rgbColor == "darkorange")
- return QColor(255, 140, 0);
+ return TQColor(255, 140, 0);
else if(rgbColor == "darkorchid")
- return QColor(153, 50, 204);
+ return TQColor(153, 50, 204);
else if(rgbColor == "darkred")
- return QColor(139, 0, 0);
+ return TQColor(139, 0, 0);
else if(rgbColor == "darksalmon")
- return QColor(233, 150, 122);
+ return TQColor(233, 150, 122);
else if(rgbColor == "darkseagreen")
- return QColor(143, 188, 143);
+ return TQColor(143, 188, 143);
else if(rgbColor == "darkslateblue")
- return QColor(72, 61, 139);
+ return TQColor(72, 61, 139);
else if(rgbColor == "darkslategray")
- return QColor(47, 79, 79);
+ return TQColor(47, 79, 79);
else if(rgbColor == "darkslategrey")
- return QColor(47, 79, 79);
+ return TQColor(47, 79, 79);
else if(rgbColor == "darkturquoise")
- return QColor(0, 206, 209);
+ return TQColor(0, 206, 209);
else if(rgbColor == "darkviolet")
- return QColor(148, 0, 211);
+ return TQColor(148, 0, 211);
else if(rgbColor == "deeppink")
- return QColor(255, 20, 147);
+ return TQColor(255, 20, 147);
else if(rgbColor == "deepskyblue")
- return QColor(0, 191, 255);
+ return TQColor(0, 191, 255);
else if(rgbColor == "dimgray")
- return QColor(105, 105, 105);
+ return TQColor(105, 105, 105);
else if(rgbColor == "dimgrey")
- return QColor(105, 105, 105);
+ return TQColor(105, 105, 105);
else if(rgbColor == "dodgerblue")
- return QColor(30, 144, 255);
+ return TQColor(30, 144, 255);
else if(rgbColor == "firebrick")
- return QColor(178, 34, 34);
+ return TQColor(178, 34, 34);
else if(rgbColor == "floralwhite")
- return QColor(255, 250, 240);
+ return TQColor(255, 250, 240);
else if(rgbColor == "forestgreen")
- return QColor(34, 139, 34);
+ return TQColor(34, 139, 34);
else if(rgbColor == "fuchsia")
- return QColor(255, 0, 255);
+ return TQColor(255, 0, 255);
else if(rgbColor == "gainsboro")
- return QColor(220, 220, 220);
+ return TQColor(220, 220, 220);
else if(rgbColor == "ghostwhite")
- return QColor(248, 248, 255);
+ return TQColor(248, 248, 255);
else if(rgbColor == "gold")
- return QColor(255, 215, 0);
+ return TQColor(255, 215, 0);
else if(rgbColor == "goldenrod")
- return QColor(218, 165, 32);
+ return TQColor(218, 165, 32);
else if(rgbColor == "gray")
- return QColor(128, 128, 128);
+ return TQColor(128, 128, 128);
else if(rgbColor == "grey")
- return QColor(128, 128, 128);
+ return TQColor(128, 128, 128);
else if(rgbColor == "green")
- return QColor(0, 128, 0);
+ return TQColor(0, 128, 0);
else if(rgbColor == "greenyellow")
- return QColor(173, 255, 47);
+ return TQColor(173, 255, 47);
else if(rgbColor == "honeydew")
- return QColor(240, 255, 240);
+ return TQColor(240, 255, 240);
else if(rgbColor == "hotpink")
- return QColor(255, 105, 180);
+ return TQColor(255, 105, 180);
else if(rgbColor == "indianred")
- return QColor(205, 92, 92);
+ return TQColor(205, 92, 92);
else if(rgbColor == "indigo")
- return QColor(75, 0, 130);
+ return TQColor(75, 0, 130);
else if(rgbColor == "ivory")
- return QColor(255, 255, 240);
+ return TQColor(255, 255, 240);
else if(rgbColor == "khaki")
- return QColor(240, 230, 140);
+ return TQColor(240, 230, 140);
else if(rgbColor == "lavender")
- return QColor(230, 230, 250);
+ return TQColor(230, 230, 250);
else if(rgbColor == "lavenderblush")
- return QColor(255, 240, 245);
+ return TQColor(255, 240, 245);
else if(rgbColor == "lawngreen")
- return QColor(124, 252, 0);
+ return TQColor(124, 252, 0);
else if(rgbColor == "lemonchiffon")
- return QColor(255, 250, 205);
+ return TQColor(255, 250, 205);
else if(rgbColor == "lightblue")
- return QColor(173, 216, 230);
+ return TQColor(173, 216, 230);
else if(rgbColor == "lightcoral")
- return QColor(240, 128, 128);
+ return TQColor(240, 128, 128);
else if(rgbColor == "lightcyan")
- return QColor(224, 255, 255);
+ return TQColor(224, 255, 255);
else if(rgbColor == "lightgoldenrodyellow")
- return QColor(250, 250, 210);
+ return TQColor(250, 250, 210);
else if(rgbColor == "lightgray")
- return QColor(211, 211, 211);
+ return TQColor(211, 211, 211);
else if(rgbColor == "lightgrey")
- return QColor(211, 211, 211);
+ return TQColor(211, 211, 211);
else if(rgbColor == "lightgreen")
- return QColor(144, 238, 144);
+ return TQColor(144, 238, 144);
else if(rgbColor == "lightpink")
- return QColor(255, 182, 193);
+ return TQColor(255, 182, 193);
else if(rgbColor == "lightsalmon")
- return QColor(255, 160, 122);
+ return TQColor(255, 160, 122);
else if(rgbColor == "lightseagreen")
- return QColor(32, 178, 170);
+ return TQColor(32, 178, 170);
else if(rgbColor == "lightskyblue")
- return QColor(135, 206, 250);
+ return TQColor(135, 206, 250);
else if(rgbColor == "lightslategray")
- return QColor(119, 136, 153);
+ return TQColor(119, 136, 153);
else if(rgbColor == "lightslategrey")
- return QColor(119, 136, 153);
+ return TQColor(119, 136, 153);
else if(rgbColor == "lightsteelblue")
- return QColor(176, 196, 222);
+ return TQColor(176, 196, 222);
else if(rgbColor == "lightyellow")
- return QColor(255, 255, 224);
+ return TQColor(255, 255, 224);
else if(rgbColor == "lime")
- return QColor(0, 255, 0);
+ return TQColor(0, 255, 0);
else if(rgbColor == "limegreen")
- return QColor(50, 205, 50);
+ return TQColor(50, 205, 50);
else if(rgbColor == "linen")
- return QColor(250, 240, 230);
+ return TQColor(250, 240, 230);
else if(rgbColor == "magenta")
- return QColor(255, 0, 255);
+ return TQColor(255, 0, 255);
else if(rgbColor == "maroon")
- return QColor(128, 0, 0);
+ return TQColor(128, 0, 0);
else if(rgbColor == "mediumaquamarine")
- return QColor(102, 205, 170);
+ return TQColor(102, 205, 170);
else if(rgbColor == "mediumblue")
- return QColor(0, 0, 205);
+ return TQColor(0, 0, 205);
else if(rgbColor == "mediumorchid")
- return QColor(186, 85, 211);
+ return TQColor(186, 85, 211);
else if(rgbColor == "mediumpurple")
- return QColor(147, 112, 219);
+ return TQColor(147, 112, 219);
else if(rgbColor == "mediumseagreen")
- return QColor(60, 179, 113);
+ return TQColor(60, 179, 113);
else if(rgbColor == "mediumslateblue")
- return QColor(123, 104, 238);
+ return TQColor(123, 104, 238);
else if(rgbColor == "mediumspringgreen")
- return QColor(0, 250, 154);
+ return TQColor(0, 250, 154);
else if(rgbColor == "mediumturquoise")
- return QColor(72, 209, 204);
+ return TQColor(72, 209, 204);
else if(rgbColor == "mediumvioletred")
- return QColor(199, 21, 133);
+ return TQColor(199, 21, 133);
else if(rgbColor == "midnightblue")
- return QColor(25, 25, 112);
+ return TQColor(25, 25, 112);
else if(rgbColor == "mintcream")
- return QColor(245, 255, 250);
+ return TQColor(245, 255, 250);
else if(rgbColor == "mistyrose")
- return QColor(255, 228, 225);
+ return TQColor(255, 228, 225);
else if(rgbColor == "moccasin")
- return QColor(255, 228, 181);
+ return TQColor(255, 228, 181);
else if(rgbColor == "navajowhite")
- return QColor(255, 222, 173);
+ return TQColor(255, 222, 173);
else if(rgbColor == "navy")
- return QColor(0, 0, 128);
+ return TQColor(0, 0, 128);
else if(rgbColor == "oldlace")
- return QColor(253, 245, 230);
+ return TQColor(253, 245, 230);
else if(rgbColor == "olive")
- return QColor(128, 128, 0);
+ return TQColor(128, 128, 0);
else if(rgbColor == "olivedrab")
- return QColor(107, 142, 35);
+ return TQColor(107, 142, 35);
else if(rgbColor == "orange")
- return QColor(255, 165, 0);
+ return TQColor(255, 165, 0);
else if(rgbColor == "orangered")
- return QColor(255, 69, 0);
+ return TQColor(255, 69, 0);
else if(rgbColor == "orchid")
- return QColor(218, 112, 214);
+ return TQColor(218, 112, 214);
else if(rgbColor == "palegoldenrod")
- return QColor(238, 232, 170);
+ return TQColor(238, 232, 170);
else if(rgbColor == "palegreen")
- return QColor(152, 251, 152);
+ return TQColor(152, 251, 152);
else if(rgbColor == "paleturquoise")
- return QColor(175, 238, 238);
+ return TQColor(175, 238, 238);
else if(rgbColor == "palevioletred")
- return QColor(219, 112, 147);
+ return TQColor(219, 112, 147);
else if(rgbColor == "papayawhip")
- return QColor(255, 239, 213);
+ return TQColor(255, 239, 213);
else if(rgbColor == "peachpuff")
- return QColor(255, 218, 185);
+ return TQColor(255, 218, 185);
else if(rgbColor == "peru")
- return QColor(205, 133, 63);
+ return TQColor(205, 133, 63);
else if(rgbColor == "pink")
- return QColor(255, 192, 203);
+ return TQColor(255, 192, 203);
else if(rgbColor == "plum")
- return QColor(221, 160, 221);
+ return TQColor(221, 160, 221);
else if(rgbColor == "powderblue")
- return QColor(176, 224, 230);
+ return TQColor(176, 224, 230);
else if(rgbColor == "purple")
- return QColor(128, 0, 128);
+ return TQColor(128, 0, 128);
else if(rgbColor == "red")
- return QColor(255, 0, 0);
+ return TQColor(255, 0, 0);
else if(rgbColor == "rosybrown")
- return QColor(188, 143, 143);
+ return TQColor(188, 143, 143);
else if(rgbColor == "royalblue")
- return QColor(65, 105, 225);
+ return TQColor(65, 105, 225);
else if(rgbColor == "saddlebrown")
- return QColor(139, 69, 19);
+ return TQColor(139, 69, 19);
else if(rgbColor == "salmon")
- return QColor(250, 128, 114);
+ return TQColor(250, 128, 114);
else if(rgbColor == "sandybrown")
- return QColor(244, 164, 96);
+ return TQColor(244, 164, 96);
else if(rgbColor == "seagreen")
- return QColor(46, 139, 87);
+ return TQColor(46, 139, 87);
else if(rgbColor == "seashell")
- return QColor(255, 245, 238);
+ return TQColor(255, 245, 238);
else if(rgbColor == "sienna")
- return QColor(160, 82, 45);
+ return TQColor(160, 82, 45);
else if(rgbColor == "silver")
- return QColor(192, 192, 192);
+ return TQColor(192, 192, 192);
else if(rgbColor == "skyblue")
- return QColor(135, 206, 235);
+ return TQColor(135, 206, 235);
else if(rgbColor == "slateblue")
- return QColor(106, 90, 205);
+ return TQColor(106, 90, 205);
else if(rgbColor == "slategray")
- return QColor(112, 128, 144);
+ return TQColor(112, 128, 144);
else if(rgbColor == "slategrey")
- return QColor(112, 128, 144);
+ return TQColor(112, 128, 144);
else if(rgbColor == "snow")
- return QColor(255, 250, 250);
+ return TQColor(255, 250, 250);
else if(rgbColor == "springgreen")
- return QColor(0, 255, 127);
+ return TQColor(0, 255, 127);
else if(rgbColor == "steelblue")
- return QColor(70, 130, 180);
+ return TQColor(70, 130, 180);
else if(rgbColor == "tan")
- return QColor(210, 180, 140);
+ return TQColor(210, 180, 140);
else if(rgbColor == "teal")
- return QColor(0, 128, 128);
+ return TQColor(0, 128, 128);
else if(rgbColor == "thistle")
- return QColor(216, 191, 216);
+ return TQColor(216, 191, 216);
else if(rgbColor == "tomato")
- return QColor(255, 99, 71);
+ return TQColor(255, 99, 71);
else if(rgbColor == "turquoise")
- return QColor(64, 224, 208);
+ return TQColor(64, 224, 208);
else if(rgbColor == "violet")
- return QColor(238, 130, 238);
+ return TQColor(238, 130, 238);
else if(rgbColor == "wheat")
- return QColor(245, 222, 179);
+ return TQColor(245, 222, 179);
else if(rgbColor == "white")
- return QColor(255, 255, 255);
+ return TQColor(255, 255, 255);
else if(rgbColor == "whitesmoke")
- return QColor(245, 245, 245);
+ return TQColor(245, 245, 245);
else if(rgbColor == "yellow")
- return QColor(255, 255, 0);
+ return TQColor(255, 255, 0);
else if(rgbColor == "yellowgreen")
- return QColor(154, 205, 50);
+ return TQColor(154, 205, 50);
}
- return QColor();
+ return TQColor();
}
double KSVGIconPainter::dpi()
@@ -2666,12 +2666,12 @@ double KSVGIconPainter::dpi()
return 90.0; // TODO: make modal?
}
-double KSVGIconPainter::toPixel(const QString &s, bool hmode)
+double KSVGIconPainter::toPixel(const TQString &s, bool hmode)
{
if(s.isEmpty())
return 0.0;
- QString check = s;
+ TQString check = s;
double ret = 0.0;
@@ -2713,69 +2713,69 @@ double KSVGIconPainter::toPixel(const QString &s, bool hmode)
return ret;
}
-ArtGradientLinear *KSVGIconPainter::linearGradient(const QString &id)
+ArtGradientLinear *KSVGIconPainter::linearGradient(const TQString &id)
{
return d->helper->m_linearGradientMap[id];
}
-void KSVGIconPainter::addLinearGradient(const QString &id, ArtGradientLinear *gradient)
+void KSVGIconPainter::addLinearGradient(const TQString &id, ArtGradientLinear *gradient)
{
d->helper->m_linearGradientMap.insert(id, gradient);
}
-QDomElement KSVGIconPainter::linearGradientElement(ArtGradientLinear *linear)
+TQDomElement KSVGIconPainter::linearGradientElement(ArtGradientLinear *linear)
{
return d->helper->m_linearGradientElementMap[linear];
}
-void KSVGIconPainter::addLinearGradientElement(ArtGradientLinear *gradient, QDomElement element)
+void KSVGIconPainter::addLinearGradientElement(ArtGradientLinear *gradient, TQDomElement element)
{
d->helper->m_linearGradientElementMap.insert(gradient, element);
}
-ArtGradientRadial *KSVGIconPainter::radialGradient(const QString &id)
+ArtGradientRadial *KSVGIconPainter::radialGradient(const TQString &id)
{
return d->helper->m_radialGradientMap[id];
}
-void KSVGIconPainter::addRadialGradient(const QString &id, ArtGradientRadial *gradient)
+void KSVGIconPainter::addRadialGradient(const TQString &id, ArtGradientRadial *gradient)
{
d->helper->m_radialGradientMap.insert(id, gradient);
}
-QDomElement KSVGIconPainter::radialGradientElement(ArtGradientRadial *radial)
+TQDomElement KSVGIconPainter::radialGradientElement(ArtGradientRadial *radial)
{
return d->helper->m_radialGradientElementMap[radial];
}
-void KSVGIconPainter::addRadialGradientElement(ArtGradientRadial *gradient, QDomElement element)
+void KSVGIconPainter::addRadialGradientElement(ArtGradientRadial *gradient, TQDomElement element)
{
d->helper->m_radialGradientElementMap.insert(gradient, element);
}
-Q_UINT32 KSVGIconPainter::toArtColor(const QColor &color)
+Q_UINT32 KSVGIconPainter::toArtColor(const TQColor &color)
{
return d->helper->toArtColor(color);
}
-QWMatrix KSVGIconPainter::parseTransform(const QString &transform)
+TQWMatrix KSVGIconPainter::parseTransform(const TQString &transform)
{
- QWMatrix result;
+ TQWMatrix result;
// Split string for handling 1 transform statement at a time
- QStringList subtransforms = QStringList::split(')', transform);
- QStringList::ConstIterator it = subtransforms.begin();
- QStringList::ConstIterator end = subtransforms.end();
+ TQStringList subtransforms = TQStringList::split(')', transform);
+ TQStringList::ConstIterator it = subtransforms.begin();
+ TQStringList::ConstIterator end = subtransforms.end();
for(; it != end; ++it)
{
- QStringList subtransform = QStringList::split('(', (*it));
+ TQStringList subtransform = TQStringList::split('(', (*it));
subtransform[0] = subtransform[0].stripWhiteSpace().lower();
subtransform[1] = subtransform[1].simplifyWhiteSpace();
- QRegExp reg("([-]?\\d*\\.?\\d+(?:e[-]?\\d+)?)");
+ TQRegExp reg("([-]?\\d*\\.?\\d+(?:e[-]?\\d+)?)");
int pos = 0;
- QStringList params;
+ TQStringList params;
while(pos >= 0)
{
diff --git a/kdecore/svgicons/ksvgiconpainter.h b/kdecore/svgicons/ksvgiconpainter.h
index 6617897fc..9061e5570 100644
--- a/kdecore/svgicons/ksvgiconpainter.h
+++ b/kdecore/svgicons/ksvgiconpainter.h
@@ -39,9 +39,9 @@ public:
void setDrawWidth(int dwidth);
void setDrawHeight(int dheight);
- QImage *image();
+ TQImage *image();
- QWMatrix *worldMatrix();
+ TQWMatrix *worldMatrix();
void finish();
@@ -49,49 +49,49 @@ public:
void setUseStroke(bool stroke);
void setStrokeWidth(double width);
- void setStrokeMiterLimit(const QString &miter);
- void setCapStyle(const QString &cap);
- void setJoinStyle(const QString &join);
- void setStrokeColor(const QString &stroke);
- void setFillColor(const QString &fill);
- void setFillRule(const QString &fillRule);
- void setOpacity(const QString &opacity);
- void setFillOpacity(const QString &fillOpacity);
- void setStrokeOpacity(const QString &strokeOpacity);
- void setStrokeDashOffset(const QString &dashOffset);
- void setStrokeDashArray(const QString &dashes);
-
- void setWorldMatrix(QWMatrix *worldMatrix);
+ void setStrokeMiterLimit(const TQString &miter);
+ void setCapStyle(const TQString &cap);
+ void setJoinStyle(const TQString &join);
+ void setStrokeColor(const TQString &stroke);
+ void setFillColor(const TQString &fill);
+ void setFillRule(const TQString &fillRule);
+ void setOpacity(const TQString &opacity);
+ void setFillOpacity(const TQString &fillOpacity);
+ void setStrokeOpacity(const TQString &strokeOpacity);
+ void setStrokeDashOffset(const TQString &dashOffset);
+ void setStrokeDashArray(const TQString &dashes);
+
+ void setWorldMatrix(TQWMatrix *worldMatrix);
void setClippingRect(int x, int y, int w, int h);
void drawRectangle(double x, double y, double w, double h, double rx, double ry);
void drawEllipse(double cx, double cy, double rx, double ry);
void drawLine(double x1, double y1, double x2, double y2);
- void drawPolyline(QPointArray polyArray, int points = -1);
- void drawPolygon(QPointArray polyArray);
- void drawPath(const QString &data, bool fill);
- void drawImage(double x, double y, QImage &image);
+ void drawPolyline(TQPointArray polyArray, int points = -1);
+ void drawPolygon(TQPointArray polyArray);
+ void drawPath(const TQString &data, bool fill);
+ void drawImage(double x, double y, TQImage &image);
- QColor parseColor(const QString &param);
- Q_UINT32 toArtColor(const QColor &color);
- Q_UINT32 parseOpacity(const QString &data);
+ TQColor parseColor(const TQString &param);
+ Q_UINT32 toArtColor(const TQColor &color);
+ Q_UINT32 parseOpacity(const TQString &data);
- double toPixel(const QString &s, bool hmode);
+ double toPixel(const TQString &s, bool hmode);
double dpi();
- ArtGradientLinear *linearGradient(const QString &id);
- void addLinearGradient(const QString &id, ArtGradientLinear *gradient);
+ ArtGradientLinear *linearGradient(const TQString &id);
+ void addLinearGradient(const TQString &id, ArtGradientLinear *gradient);
- QDomElement linearGradientElement(ArtGradientLinear *linear);
- void addLinearGradientElement(ArtGradientLinear *gradient, QDomElement element);
+ TQDomElement linearGradientElement(ArtGradientLinear *linear);
+ void addLinearGradientElement(ArtGradientLinear *gradient, TQDomElement element);
- ArtGradientRadial *radialGradient(const QString &id);
- void addRadialGradient(const QString &id, ArtGradientRadial *gradient);
+ ArtGradientRadial *radialGradient(const TQString &id);
+ void addRadialGradient(const TQString &id, ArtGradientRadial *gradient);
- QDomElement radialGradientElement(ArtGradientRadial *radial);
- void addRadialGradientElement(ArtGradientRadial *gradient, QDomElement element);
+ TQDomElement radialGradientElement(ArtGradientRadial *radial);
+ void addRadialGradientElement(ArtGradientRadial *gradient, TQDomElement element);
- QWMatrix parseTransform(const QString &transform);
+ TQWMatrix parseTransform(const TQString &transform);
private:
struct Private;
diff --git a/kdecore/tests/KIDLTest.cpp b/kdecore/tests/KIDLTest.cpp
index 89e2142fc..a763f85c8 100644
--- a/kdecore/tests/KIDLTest.cpp
+++ b/kdecore/tests/KIDLTest.cpp
@@ -3,17 +3,17 @@
#include <kapplication.h>
#include <dcopclient.h>
-KIDLTest::KIDLTest( const QCString& id )
+KIDLTest::KIDLTest( const TQCString& id )
: DCOPObject( id )
{
}
-QString KIDLTest::hello( const QString& name )
+TQString KIDLTest::hello( const TQString& name )
{
qDebug("Du heter %s", name.latin1() );
qDebug("Ha det %s", name.latin1() );
- return QString("Jeg heter KIDLTest");
+ return TQString("Jeg heter KIDLTest");
}
int main( int argc, char** argv )
diff --git a/kdecore/tests/KIDLTest.h b/kdecore/tests/KIDLTest.h
index f0c4aaefd..6955bb6ca 100644
--- a/kdecore/tests/KIDLTest.h
+++ b/kdecore/tests/KIDLTest.h
@@ -7,10 +7,10 @@ class KIDLTest : virtual public DCOPObject
{
K_DCOP
public:
- KIDLTest( const QCString& id );
+ KIDLTest( const TQCString& id );
k_dcop:
- virtual QString hello( const QString& name );
+ virtual TQString hello( const TQString& name );
};
#endif
diff --git a/kdecore/tests/KIDLTestClient.cpp b/kdecore/tests/KIDLTestClient.cpp
index 0b9e45768..21125bff5 100644
--- a/kdecore/tests/KIDLTestClient.cpp
+++ b/kdecore/tests/KIDLTestClient.cpp
@@ -12,6 +12,6 @@ int main( int argc, char** argv )
KIDLTest_stub* t = new KIDLTest_stub( "kidlservertest", "Hello" );
- QString ret = t->hello("Torben");
+ TQString ret = t->hello("Torben");
qDebug("Server says: %s", ret.latin1() );
}
diff --git a/kdecore/tests/cplusplustest.cpp b/kdecore/tests/cplusplustest.cpp
index 387dac014..1f789fea7 100644
--- a/kdecore/tests/cplusplustest.cpp
+++ b/kdecore/tests/cplusplustest.cpp
@@ -16,15 +16,15 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqdict.h>
class A { int foo; };
class B { int bar; };
class C : public A, public B { int foobar; };
-QDict<A> dictA;
-QDict<B> dictB;
+TQDict<A> dictA;
+TQDict<B> dictB;
int main(int , char *[])
{
diff --git a/kdecore/tests/dcopkonqtest.cpp b/kdecore/tests/dcopkonqtest.cpp
index 95dd726e3..8830d34c7 100644
--- a/kdecore/tests/dcopkonqtest.cpp
+++ b/kdecore/tests/dcopkonqtest.cpp
@@ -9,12 +9,12 @@ int main( int argc, char** argv )
kapp->dcopClient()->attach();
// kapp->dcopClient()->registerAs( "kidlclienttest" );
- QByteArray data;
+ TQByteArray data;
kdDebug() << "sending reparseConfiguration to object KonquerorIface in konqueror" << endl;
- QByteArray snd;
- QByteArray rcv;
- QCString _type_;
+ TQByteArray snd;
+ TQByteArray rcv;
+ TQCString _type_;
kapp->dcopClient()->call( "konqueror", "KonquerorIface", "reparseConfiguration()", snd, _type_, rcv );
kdDebug() << _type_ << endl;
if( _type_ != "void" ) kdDebug() << "void expected, " << _type_.data() << " returned" << endl;
diff --git a/kdecore/tests/kcalendartest.cpp b/kdecore/tests/kcalendartest.cpp
index 18b4fc297..51a40b892 100644
--- a/kdecore/tests/kcalendartest.cpp
+++ b/kdecore/tests/kcalendartest.cpp
@@ -5,7 +5,7 @@
#include "kcalendarsystemfactory.h"
#include "kcalendarsystem.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kaboutdata.h>
@@ -16,7 +16,7 @@
class KLocale;
-void test(QDate & date);
+void test(TQDate & date);
static const char description[] = "KCalendarTest";
@@ -29,8 +29,8 @@ static KCmdLineOptions options[] =
int main(int argc, char **argv) {
- QDate date;
- QString calType, option;
+ TQDate date;
+ TQString calType, option;
KAboutData aboutData( "kcalendartest", "KCalendarTest" ,
"0.1", description, KAboutData::License_GPL,
@@ -46,9 +46,9 @@ int main(int argc, char **argv) {
KApplication app(false, false);
- QStringList lst = KCalendarSystemFactory::calendarSystems();
+ TQStringList lst = KCalendarSystemFactory::calendarSystems();
kdDebug() << "Supported calendar types: " << endl;
- for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it)
+ for (TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it)
kdDebug() << *it << endl;
kdDebug() << endl;
@@ -67,7 +67,7 @@ int main(int argc, char **argv) {
option = args->getOption("date");
date = KGlobal::locale()->readDate(option);
} else
- date = QDate::currentDate();
+ date = TQDate::currentDate();
args->clear(); // Free up some memory.
@@ -79,7 +79,7 @@ int main(int argc, char **argv) {
}
-void test(QDate & date) {
+void test(TQDate & date) {
kdDebug() << "(KLocale) readDate" << endl;
diff --git a/kdecore/tests/kcharsetstest.cpp b/kdecore/tests/kcharsetstest.cpp
index de281d3d9..09b9486c0 100644
--- a/kdecore/tests/kcharsetstest.cpp
+++ b/kdecore/tests/kcharsetstest.cpp
@@ -5,8 +5,8 @@
int main()
{
- QString input( "&lt;Hello &amp;World&gt;" );
- QString output = KCharsets::resolveEntities( input );
+ TQString input( "&lt;Hello &amp;World&gt;" );
+ TQString output = KCharsets::resolveEntities( input );
assert( output == "<Hello &World>" );
return 0;
}
diff --git a/kdecore/tests/kcmdlineargstest.cpp b/kdecore/tests/kcmdlineargstest.cpp
index 2d6c7ecd2..0ad9807c9 100644
--- a/kdecore/tests/kcmdlineargstest.cpp
+++ b/kdecore/tests/kcmdlineargstest.cpp
@@ -49,7 +49,7 @@ main(int argc, char *argv[])
}
// Read the value of an option.
- QCString baudrate = args->getOption("baud"); // 9600 is the default value.
+ TQCString baudrate = args->getOption("baud"); // 9600 is the default value.
printf("Baudrate = %s\n", baudrate.data());
diff --git a/kdecore/tests/kconfigtest.cpp b/kdecore/tests/kconfigtest.cpp
index 5ec4c309f..1842b5036 100644
--- a/kdecore/tests/kconfigtest.cpp
+++ b/kdecore/tests/kconfigtest.cpp
@@ -44,11 +44,11 @@ KUNITTEST_MODULE_REGISTER_TESTER( KConfigTest )
#define STRINGENTRY5 " "
#define STRINGENTRY6 ""
#define LOCAL8BITENTRY "Hello äöü"
-#define POINTENTRY QPoint( 4351, 1235 )
-#define SIZEENTRY QSize( 10, 20 )
-#define RECTENTRY QRect( 10, 23, 5321, 13 )
-#define DATETIMEENTRY QDateTime( QDate( 2002, 06, 23 ), QTime( 12, 55, 40 ) )
-#define STRINGLISTENTRY QStringList( "Hello," )
+#define POINTENTRY TQPoint( 4351, 1235 )
+#define SIZEENTRY TQSize( 10, 20 )
+#define RECTENTRY TQRect( 10, 23, 5321, 13 )
+#define DATETIMEENTRY TQDateTime( TQDate( 2002, 06, 23 ), TQTime( 12, 55, 40 ) )
+#define STRINGLISTENTRY TQStringList( "Hello," )
void KConfigTest::writeConfigFile()
{
@@ -62,7 +62,7 @@ void KConfigTest::writeConfigFile()
sc.writeEntry( "boolEntry1", BOOLENTRY1 );
sc.writeEntry( "boolEntry2", BOOLENTRY2 );
- sc.writeEntry( "Test", QString::fromLocal8Bit( LOCAL8BITENTRY ) );
+ sc.writeEntry( "Test", TQString::fromLocal8Bit( LOCAL8BITENTRY ) );
sc.writeEntry( "Test2", "");
sc.writeEntry( "stringEntry1", STRINGENTRY1 );
sc.writeEntry( "stringEntry2", STRINGENTRY2 );
@@ -119,29 +119,29 @@ void KConfigTest::allTests()
sc2.setGroup("AAA");
CHECK( sc2.hasKey( "stringEntry1" ), true );
- CHECK( sc2.readEntry( "stringEntry1" ), QString( STRINGENTRY1 ) );
+ CHECK( sc2.readEntry( "stringEntry1" ), TQString( STRINGENTRY1 ) );
CHECK( sc2.entryIsImmutable("stringEntry1"), bImmutable );
CHECK( sc2.hasKey( "stringEntry2" ), false );
- CHECK( sc2.readEntry( "stringEntry2", "bla" ), QString( "bla" ) );
+ CHECK( sc2.readEntry( "stringEntry2", "bla" ), TQString( "bla" ) );
CHECK( sc2.hasDefault( "stringEntry1" ), false );
sc2.setGroup("Hello");
- CHECK( sc2.readEntry( "Test" ), QString::fromLocal8Bit( LOCAL8BITENTRY ) );
+ CHECK( sc2.readEntry( "Test" ), TQString::fromLocal8Bit( LOCAL8BITENTRY ) );
CHECK( sc2.readEntry("Test2", "Fietsbel").isEmpty(), true );
- CHECK( sc2.readEntry( "stringEntry1" ), QString( STRINGENTRY1 ) );
- CHECK( sc2.readEntry( "stringEntry2" ), QString( STRINGENTRY2 ) );
- CHECK( sc2.readEntry( "stringEntry3" ), QString( STRINGENTRY3 ) );
- CHECK( sc2.readEntry( "stringEntry4" ), QString( STRINGENTRY4 ) );
+ CHECK( sc2.readEntry( "stringEntry1" ), TQString( STRINGENTRY1 ) );
+ CHECK( sc2.readEntry( "stringEntry2" ), TQString( STRINGENTRY2 ) );
+ CHECK( sc2.readEntry( "stringEntry3" ), TQString( STRINGENTRY3 ) );
+ CHECK( sc2.readEntry( "stringEntry4" ), TQString( STRINGENTRY4 ) );
CHECK( sc2.hasKey( "stringEntry5" ), false);
- CHECK( sc2.readEntry( "stringEntry5", "test" ), QString( "test" ) );
+ CHECK( sc2.readEntry( "stringEntry5", "test" ), TQString( "test" ) );
CHECK( sc2.hasKey( "stringEntry6" ), false);
- CHECK( sc2.readEntry( "stringEntry6", "foo" ), QString( "foo" ) );
+ CHECK( sc2.readEntry( "stringEntry6", "foo" ), TQString( "foo" ) );
CHECK( sc2.readBoolEntry( "boolEntry1" ), BOOLENTRY1 );
CHECK( sc2.readBoolEntry( "boolEntry2" ), BOOLENTRY2 );
#if 0
- QString s;
+ TQString s;
s = sc2.readEntry( "keywith=equalsign" );
fprintf(stderr, "comparing keywith=equalsign %s with %s -> ", STRINGENTRY1, s.latin1());
if (s == STRINGENTRY1)
diff --git a/kdecore/tests/kconfigtestgui.cpp b/kdecore/tests/kconfigtestgui.cpp
index 6dbf98e52..abd476396 100644
--- a/kdecore/tests/kconfigtestgui.cpp
+++ b/kdecore/tests/kconfigtestgui.cpp
@@ -30,19 +30,19 @@
#include <unistd.h>
#include <stdlib.h>
#include <kapplication.h>
-#include <qdialog.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdatetime.h>
+#include <tqdialog.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include <ksimpleconfig.h>
#include <config.h>
// Standard Qt widgets
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
// KDE includes
#include <kconfig.h>
@@ -59,8 +59,8 @@
// Construct the KConfigTestView with buttons
//
-KConfigTestView::KConfigTestView( QWidget *parent, const char *name )
- : QDialog( parent, name ),
+KConfigTestView::KConfigTestView( TQWidget *parent, const char *name )
+ : TQDialog( parent, name ),
pConfig( 0L ),
pFile( 0L ),
pStream( 0L )
@@ -70,61 +70,61 @@ KConfigTestView::KConfigTestView( QWidget *parent, const char *name )
setCaption( "KConfig test" );
// Label and edit for the app config file
- pAppFileLabel = new QLabel( this, "appconfiglabel" );
+ pAppFileLabel = new TQLabel( this, "appconfiglabel" );
pAppFileLabel->setText( "Application config file:" );
pAppFileLabel->setGeometry( 20, 20, 200, 20 );
- pAppFileEdit = new QLineEdit( this, "appconfigedit" );
+ pAppFileEdit = new TQLineEdit( this, "appconfigedit" );
pAppFileEdit->setGeometry( 240, 20, 160, 20 );
- connect( pAppFileEdit, SIGNAL(returnPressed()),
- SLOT(appConfigEditReturnPressed()));
+ connect( pAppFileEdit, TQT_SIGNAL(returnPressed()),
+ TQT_SLOT(appConfigEditReturnPressed()));
// Label and edit for the group
- pGroupLabel = new QLabel( this, "grouplabel" );
+ pGroupLabel = new TQLabel( this, "grouplabel" );
pGroupLabel->setText( "Group:" );
pGroupLabel->setGeometry( 20, 60, 80, 20 );
- pGroupEdit = new QLineEdit( this, "groupedit" );
+ pGroupEdit = new TQLineEdit( this, "groupedit" );
pGroupEdit->setGeometry( 120, 60, 100, 20 );
- connect( pGroupEdit, SIGNAL(returnPressed()),
- SLOT(groupEditReturnPressed()));
+ connect( pGroupEdit, TQT_SIGNAL(returnPressed()),
+ TQT_SLOT(groupEditReturnPressed()));
// Edit and label for the key/value pair
- pKeyEdit = new QLineEdit( this, "keyedit" );
+ pKeyEdit = new TQLineEdit( this, "keyedit" );
pKeyEdit->setGeometry( 20, 100, 80, 20 );
- connect( pKeyEdit, SIGNAL( returnPressed()),
- SLOT(keyEditReturnPressed()));
+ connect( pKeyEdit, TQT_SIGNAL( returnPressed()),
+ TQT_SLOT(keyEditReturnPressed()));
- pEqualsLabel = new QLabel( this, "equalslabel" );
+ pEqualsLabel = new TQLabel( this, "equalslabel" );
pEqualsLabel->setGeometry( 105, 100, 20, 20 );
pEqualsLabel->setText( "=" );
- pValueEdit = new QLineEdit( this, "valueedit" );
+ pValueEdit = new TQLineEdit( this, "valueedit" );
pValueEdit->setGeometry( 120, 100, 100, 20 );
pValueEdit->setText( "---" );
- pWriteButton = new QPushButton( this, "writebutton" );
+ pWriteButton = new TQPushButton( this, "writebutton" );
pWriteButton->setGeometry( 20,140, 80, 20 );
pWriteButton->setText( "Write entry" );
- connect( pWriteButton, SIGNAL(clicked()), SLOT( writeButtonClicked() ) );
+ connect( pWriteButton, TQT_SIGNAL(clicked()), TQT_SLOT( writeButtonClicked() ) );
// Labels for the info line
- pInfoLabel1 = new QLabel( this, "infolabel1" );
+ pInfoLabel1 = new TQLabel( this, "infolabel1" );
pInfoLabel1->setGeometry( 20, 200, 60, 20 );
pInfoLabel1->setText( "Info:" );
- pInfoLabel2 = new QLabel( this, "infolabel2" );
+ pInfoLabel2 = new TQLabel( this, "infolabel2" );
pInfoLabel2->setGeometry( 100, 200, 300, 20 );
- pInfoLabel2->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ pInfoLabel2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
// Quit button
- pQuitButton = new QPushButton( this, "quitbutton" );
+ pQuitButton = new TQPushButton( this, "quitbutton" );
pQuitButton->setText( "Quit" );
pQuitButton->setGeometry( 340, 60, 60, 60 );
- connect( pQuitButton, SIGNAL(clicked()), qApp, SLOT(quit()) );
+ connect( pQuitButton, TQT_SIGNAL(clicked()), qApp, TQT_SLOT(quit()) );
// create a default KConfig object in order to be able to start right away
- pConfig = new KConfig( QString::null );
+ pConfig = new KConfig( TQString::null );
}
KConfigTestView::~KConfigTestView()
@@ -156,15 +156,15 @@ void KConfigTestView::groupEditReturnPressed()
pConfig->setGroup( pGroupEdit->text() );
// according to the Qt doc, this is begging for trouble, but for a
// test program this will do
- QString aText;
- aText.sprintf( "Group set to %s", QString( pConfig->group() ).isEmpty() ?
- QString("<default>").ascii() : pConfig->group().ascii() );
+ TQString aText;
+ aText.sprintf( "Group set to %s", TQString( pConfig->group() ).isEmpty() ?
+ TQString("<default>").ascii() : pConfig->group().ascii() );
pInfoLabel2->setText( aText );
}
void KConfigTestView::keyEditReturnPressed()
{
- QString aValue = pConfig->readEntry( pKeyEdit->text() );
+ TQString aValue = pConfig->readEntry( pKeyEdit->text() );
// just checking aValue.isNull() would be easier here, but this is
// to demonstrate the HasKey()-method. Besides, it is better data
// encapsulation because we do not make any assumption about coding
@@ -183,7 +183,7 @@ void KConfigTestView::keyEditReturnPressed()
void KConfigTestView::writeButtonClicked()
{
- pConfig->writeEntry( pKeyEdit->text(), QString( pValueEdit->text() ) );
+ pConfig->writeEntry( pKeyEdit->text(), TQString( pValueEdit->text() ) );
pInfoLabel2->setText( "Entry written" );
kdDebug() << "Entry written: " << 27 << endl;
diff --git a/kdecore/tests/kconfigtestgui.h b/kdecore/tests/kconfigtestgui.h
index e293000f5..8311952b5 100644
--- a/kdecore/tests/kconfigtestgui.h
+++ b/kdecore/tests/kconfigtestgui.h
@@ -20,18 +20,18 @@
#define _KCONFIG_TEST_H
#include <kapplication.h>
-#include <qdialog.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqdialog.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <ksimpleconfig.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
// Standard Qt widgets
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
@@ -43,7 +43,7 @@ class KConfigTestView : public QDialog
{
Q_OBJECT
public:
- KConfigTestView( QWidget *parent=0, const char *name=0 );
+ KConfigTestView( TQWidget *parent=0, const char *name=0 );
~KConfigTestView();
private slots:
@@ -53,20 +53,20 @@ private slots:
void writeButtonClicked();
private:
- QLabel* pAppFileLabel;
- QLineEdit* pAppFileEdit;
- QLabel* pGroupLabel;
- QLineEdit* pGroupEdit;
- QLineEdit* pKeyEdit;
- QLabel* pEqualsLabel;
- QLineEdit* pValueEdit;
- QPushButton* pWriteButton;
- QLabel* pInfoLabel1, *pInfoLabel2;
- QPushButton* pQuitButton;
+ TQLabel* pAppFileLabel;
+ TQLineEdit* pAppFileEdit;
+ TQLabel* pGroupLabel;
+ TQLineEdit* pGroupEdit;
+ TQLineEdit* pKeyEdit;
+ TQLabel* pEqualsLabel;
+ TQLineEdit* pValueEdit;
+ TQPushButton* pWriteButton;
+ TQLabel* pInfoLabel1, *pInfoLabel2;
+ TQPushButton* pQuitButton;
KConfig* pConfig;
- QFile* pFile;
- QTextStream* pStream;
+ TQFile* pFile;
+ TQTextStream* pStream;
};
#endif
diff --git a/kdecore/tests/kdebugtest.cpp b/kdecore/tests/kdebugtest.cpp
index d97fb671b..ee49127ea 100644
--- a/kdecore/tests/kdebugtest.cpp
+++ b/kdecore/tests/kdebugtest.cpp
@@ -1,27 +1,27 @@
#include "kdebug.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kinstance.h>
#include <iostream>
-#include <qapplication.h>
-#include <qpen.h>
-#include <qvariant.h>
+#include <tqapplication.h>
+#include <tqpen.h>
+#include <tqvariant.h>
class TestWidget : public QWidget
{
public:
- TestWidget(QWidget* parent, const char* name)
- : QWidget(parent, name)
+ TestWidget(TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
kdDebug().form("mytest %s", "hello") << endl;
- QString test = "%20C this is a string";
+ TQString test = "%20C this is a string";
kdDebug(150) << test << endl;
- QCString cstr = test.latin1();
+ TQCString cstr = test.latin1();
kdDebug(150) << test << endl;
- QChar ch = 'a';
- kdDebug() << "QChar a: " << ch << endl;
+ TQChar ch = 'a';
+ kdDebug() << "TQChar a: " << ch << endl;
ch = '\r';
- kdDebug() << "QChar \\r: " << ch << endl;
+ kdDebug() << "TQChar \\r: " << ch << endl;
kdDebug() << k_lineinfo << "error on this line" << endl;
kdDebug(2 == 2) << "this is right " << perror << endl;
kdDebug() << "Before instance creation" << endl;
@@ -32,42 +32,42 @@ public:
// kdDebug() << "This number should come out as appname " << 5 << " " << "test" << endl;
kdWarning() << "1+1 = " << 1+1+1 << endl;
kdError(1+1 != 2) << "there is something really odd!" << endl;
- QString s = "mystring";
+ TQString s = "mystring";
kdDebug() << s << endl;
kdError(1202) << "Error !!!" << endl;
kdError() << "Error with no area" << endl;
- kdDebug() << "Printing a null QWidget pointer: " << (QWidget*)0 << endl;
+ kdDebug() << "Printing a null TQWidget pointer: " << (TQWidget*)0 << endl;
kdDebug() << "char " << '^' << " " << char(26) << endl;
- QPoint p(0,9);
+ TQPoint p(0,9);
kdDebug() << p << endl;
- QRect r(9,12,58,234);
+ TQRect r(9,12,58,234);
kdDebug() << r << endl;
- QRegion reg(r);
- reg += QRect(1,60,200,59);
+ TQRegion reg(r);
+ reg += TQRect(1,60,200,59);
kdDebug() << reg << endl;
- QStringList sl;
+ TQStringList sl;
sl << "hi" << "this" << "list" << "is" << "short";
kdDebug() << sl << endl;
- QValueList<int> il;
- kdDebug() << "Empty QValueList<int>: " << il << endl;
+ TQValueList<int> il;
+ kdDebug() << "Empty TQValueList<int>: " << il << endl;
il << 1 << 2 << 3 << 4 << 5;
- kdDebug() << "QValueList<int> filled: " << il << endl;
+ kdDebug() << "TQValueList<int> filled: " << il << endl;
Q_LLONG big = 65536LL*65536*500;
kdDebug() << big << endl;
- QVariant v( 0.12345 );
+ TQVariant v( 0.12345 );
kdDebug() << "Variant: " << v << endl;
- v = QPen( Qt::red );
+ v = TQPen( Qt::red );
kdDebug() << "Variant: " << v << endl;
- QByteArray data( 6 );
+ TQByteArray data( 6 );
data[0] = 42;
data[1] = 'H';
data[2] = 'e';
@@ -79,7 +79,7 @@ public:
data.fill( 42 );
kdDebug() << data << endl;
}
- void resizeEvent(QResizeEvent*)
+ void resizeEvent(TQResizeEvent*)
{
kdDebug() << this << endl;
}
@@ -87,7 +87,7 @@ public:
int main(int argc, char** argv)
{
- QApplication app(argc, argv);
+ TQApplication app(argc, argv);
TestWidget widget(0, "NoNameWidget");
widget.setGeometry(45, 54, 120, 80);
widget.show();
diff --git a/kdecore/tests/kglobaltest.cpp b/kdecore/tests/kglobaltest.cpp
index 90332e3e6..d03be209e 100644
--- a/kdecore/tests/kglobaltest.cpp
+++ b/kdecore/tests/kglobaltest.cpp
@@ -8,12 +8,12 @@
#include <assert.h>
#include <kcmdlineargs.h>
-static bool check(const QString& txt, QString a, QString b)
+static bool check(const TQString& txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
diff --git a/kdecore/tests/kiconloadertest.cpp b/kdecore/tests/kiconloadertest.cpp
index 77930218c..96a7a6813 100644
--- a/kdecore/tests/kiconloadertest.cpp
+++ b/kdecore/tests/kiconloadertest.cpp
@@ -1,5 +1,5 @@
#include <kiconloader.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <stdio.h>
#include <kapplication.h>
#include <stdlib.h>
@@ -11,16 +11,16 @@ int main(int argc, char *argv[])
KIconLoader * mpLoader = KGlobal::iconLoader();
KIcon::Context mContext = KIcon::Application;
- QTime dt;
+ TQTime dt;
dt.start();
int count = 0;
for ( int mGroup = 0; mGroup < KIcon::LastGroup ; ++mGroup )
{
kdDebug() << "queryIcons " << mGroup << "," << mContext << endl;
- QStringList filelist=mpLoader->queryIcons(mGroup, mContext);
+ TQStringList filelist=mpLoader->queryIcons(mGroup, mContext);
kdDebug() << " -> found " << filelist.count() << " icons." << endl;
int i=0;
- for(QStringList::Iterator it = filelist.begin();
+ for(TQStringList::Iterator it = filelist.begin();
it != filelist.end() /*&& i<10*/;
++it, ++i )
{
diff --git a/kdecore/tests/kipctest.cpp b/kdecore/tests/kipctest.cpp
index 15daa24d9..136aa6d70 100644
--- a/kdecore/tests/kipctest.cpp
+++ b/kdecore/tests/kipctest.cpp
@@ -1,19 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kapplication.h>
#include <kipc.h>
#include "kipctest.h"
MyObject::MyObject()
- : QObject(0L, "testobj")
+ : TQObject(0L, "testobj")
{
- connect(kapp, SIGNAL(kdisplayPaletteChanged()), SLOT(slotPaletteChanged()));
- connect(kapp, SIGNAL(kdisplayFontChanged()), SLOT(slotFontChanged()));
- connect(kapp, SIGNAL(kdisplayStyleChanged()), SLOT(slotStyleChanged()));
- connect(kapp, SIGNAL(backgroundChanged(int)), SLOT(slotBackgroundChanged(int)));
- connect(kapp, SIGNAL(appearanceChanged()), SLOT(slotAppearanceChanged()));
- connect(kapp, SIGNAL(kipcMessage(int,int)), SLOT(slotMessage(int,int)));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_SLOT(slotPaletteChanged()));
+ connect(kapp, TQT_SIGNAL(kdisplayFontChanged()), TQT_SLOT(slotFontChanged()));
+ connect(kapp, TQT_SIGNAL(kdisplayStyleChanged()), TQT_SLOT(slotStyleChanged()));
+ connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int)));
+ connect(kapp, TQT_SIGNAL(appearanceChanged()), TQT_SLOT(slotAppearanceChanged()));
+ connect(kapp, TQT_SIGNAL(kipcMessage(int,int)), TQT_SLOT(slotMessage(int,int)));
}
int main(int argc, char **argv)
diff --git a/kdecore/tests/kipctest.h b/kdecore/tests/kipctest.h
index 5a9a18467..a8abd2e76 100644
--- a/kdecore/tests/kipctest.h
+++ b/kdecore/tests/kipctest.h
@@ -1,7 +1,7 @@
#ifndef __blah__h__
#define __blah__h__
-#include <qobject.h>
+#include <tqobject.h>
class MyObject: public QObject
{
diff --git a/kdecore/tests/klocaletest.cpp b/kdecore/tests/klocaletest.cpp
index acec373de..a980359b0 100644
--- a/kdecore/tests/klocaletest.cpp
+++ b/kdecore/tests/klocaletest.cpp
@@ -8,8 +8,8 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qdatetime.h>
-#include <qlabel.h>
+#include <tqdatetime.h>
+#include <tqlabel.h>
#include <kglobal.h>
#include <kglobalsettings.h>
@@ -20,12 +20,12 @@
#include "klocaletest.h"
-bool check(QString txt, QString a, QString b)
+bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -36,7 +36,7 @@ bool check(QString txt, QString a, QString b)
return true;
}
-bool checkDate(QString txt, QDate a, QDate b)
+bool checkDate(TQString txt, TQDate a, TQDate b)
{
if (a == b) {
kdDebug() << txt << " : checking '" << a.toString() << "' against expected value '" << b.toString() << "'... " << "ok" << endl;
@@ -48,12 +48,12 @@ bool checkDate(QString txt, QDate a, QDate b)
return true;
}
-Test::Test( QWidget *parent, const char *name )
- : QWidget( parent, name )
+Test::Test( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
setCaption("Testing KLocale");
- QWidget *d = qApp->desktop();
+ TQWidget *d = qApp->desktop();
setGeometry((d->width()-320)>>1, (d->height()-160)>>1, 420, 420);
createFields();
@@ -67,7 +67,7 @@ Test::~Test()
void Test::createFields()
{
- QString string;
+ TQString string;
string+="Selected languages: ";
string+=KGlobal::locale()->languages()+"\n";
@@ -77,21 +77,21 @@ void Test::createFields()
string+="Used language: ";
string+=KGlobal::locale()->language()+"\n";
string+="Locale encoding: ";
- string+=QString::fromLatin1(KGlobal::locale()->encoding())+"\n";
+ string+=TQString::fromLatin1(KGlobal::locale()->encoding())+"\n";
string+="Localized date and time: ";
- string+=KGlobal::locale()->formatDateTime(QDateTime::currentDateTime());
+ string+=KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
string+="\nLocalized monetary numbers: ";
string+=KGlobal::locale()->formatMoney(1234567.89) + " / \n" +KGlobal::locale()->formatMoney(-1234567.89);
// This will not work
// but you can copy other *.mo file
string+="\nSome localized strings:\n";
- string+=QString::fromLatin1("Yes = ")+i18n("Yes")+"\n";
- string+=QString::fromLatin1("No = ")+i18n("No")+"\n";
- string+=QString::fromLatin1("Help = ")+i18n("Help")+"\n";
- string+=QString::fromLatin1("Cancel = ")+i18n("Cancel")+"\n";
+ string+=TQString::fromLatin1("Yes = ")+i18n("Yes")+"\n";
+ string+=TQString::fromLatin1("No = ")+i18n("No")+"\n";
+ string+=TQString::fromLatin1("Help = ")+i18n("Help")+"\n";
+ string+=TQString::fromLatin1("Cancel = ")+i18n("Cancel")+"\n";
- label=new QLabel(string,this,"Label");
+ label=new TQLabel(string,this,"Label");
label->setGeometry(10,10,400,400);
label->setFont(KGlobalSettings::generalFont());
label->show();
@@ -102,11 +102,11 @@ int main( int argc, char ** argv )
KLocale::setMainCatalogue("kdelibs");
KApplication a( argc, argv, "klocaletest" );
- KGlobal::locale()->setLanguage(QString::fromLatin1("en_US"));
- KGlobal::locale()->setCountry(QString::fromLatin1("C"));
- KGlobal::locale()->setThousandsSeparator(QString::fromLatin1(","));
+ KGlobal::locale()->setLanguage(TQString::fromLatin1("en_US"));
+ KGlobal::locale()->setCountry(TQString::fromLatin1("C"));
+ KGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(","));
- QString formatted;
+ TQString formatted;
formatted = KGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00");
formatted = KGlobal::locale()->formatNumber( 70, 0 ); check("formatNumber(70, 0)",formatted,"70");
formatted = KGlobal::locale()->formatNumber( 70.2 ); check("formatNumber(70.2)",formatted,"70.20");
@@ -139,7 +139,7 @@ int main( int argc, char ** argv )
num = KGlobal::locale()->readNumber( "12,0000000", &ok ); check("readNumber(12,0000000)",ok?"yes":"no","no");
num = KGlobal::locale()->readNumber( "12,146,131.12", &ok ); check("readNumber(12,146,131.12)",ok?"yes":"no","yes");
num = KGlobal::locale()->readNumber( "1.12345678912", &ok );
- qDebug( "%s", QString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals
+ qDebug( "%s", TQString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals
check("readNumber(1.12345678912)",ok && num==1.12345678912?"yes":"no","yes");
// bug 95511
KLocale locale(*KGlobal::locale());
@@ -149,18 +149,18 @@ int main( int argc, char ** argv )
num = locale.readMoney("-1,234,567.89$$", &ok);
check("readMoney(-1,234,567.89$$)",ok?"yes":"no","yes");
- QDate date;
+ TQDate date;
date.setYMD( 2002, 5, 3 );
checkDate("readDate( 3, 5, 2002 )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
- date = QDate::currentDate();
- checkDate("readDate( QDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
+ date = TQDate::currentDate();
+ checkDate("readDate( TQDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
- QTime time;
+ TQTime time;
time = KGlobal::locale()->readTime( "11:22:33", &ok );
- check("readTime(\"11:22:33\")", (ok && time == QTime(11, 22, 33)) ?
+ check("readTime(\"11:22:33\")", (ok && time == TQTime(11, 22, 33)) ?
"yes" : "no", "yes");
time = KGlobal::locale()->readTime( "11:22", &ok );
- check("readTime(\"11:22\")", (ok && time == QTime(11, 22, 0)) ?
+ check("readTime(\"11:22\")", (ok && time == TQTime(11, 22, 0)) ?
"yes" : "no", "yes");
time = KGlobal::locale()->readTime( "foo", &ok );
check("readTime(\"foo\")", (!ok && !time.isValid()) ?
@@ -170,23 +170,23 @@ int main( int argc, char ** argv )
check("readTime(\"11:22:33\", WithoutSeconds)", (!ok && !time.isValid()) ?
"invalid" : "valid", "invalid");
time = KGlobal::locale()->readTime( "11:22", KLocale::WithoutSeconds, &ok );
- check("readTime(\"11:22\", WithoutSeconds)", (ok && time == QTime(11, 22, 0)) ?
+ check("readTime(\"11:22\", WithoutSeconds)", (ok && time == TQTime(11, 22, 0)) ?
"yes" : "no", "yes");
KGlobal::locale()->setTimeFormat( "%H:%M %p" );
- time = QTime( 0, 22, 33 );
- QString timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ );
+ time = TQTime( 0, 22, 33 );
+ TQString timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ );
check("formatTime(\"0:22\", as time)", timeStr, "00:22 am" );
timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, true /*duration*/ );
check("formatTime(\"0:22\", as duration)", timeStr, "00:22" );
kdDebug() << "setLanguage C\n";
- KGlobal::locale()->setLanguage(QString::fromLatin1("C"));
- kdDebug() << "C: " << i18n("yes") << " " << i18n("QAccel", "Space") << endl;
+ KGlobal::locale()->setLanguage(TQString::fromLatin1("C"));
+ kdDebug() << "C: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl;
kdDebug() << "setLanguage de\n";
- KGlobal::locale()->setLanguage(QString::fromLatin1("de"));
- kdDebug() << "de: " << i18n("yes") << " " << i18n("QAccel", "Space") << endl;
+ KGlobal::locale()->setLanguage(TQString::fromLatin1("de"));
+ kdDebug() << "de: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl;
Test m;
diff --git a/kdecore/tests/klocaletest.h b/kdecore/tests/klocaletest.h
index 7b6cb328e..ad24a75cd 100644
--- a/kdecore/tests/klocaletest.h
+++ b/kdecore/tests/klocaletest.h
@@ -3,7 +3,7 @@
#ifndef KLOCALETEST_H
#define KLOCALETEST_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QLabel;
@@ -18,15 +18,15 @@ public:
//@{
/** Constructor
*/
- Test( QWidget *parent=0, const char *name=0 );
+ Test( TQWidget *parent=0, const char *name=0 );
/** Destructor
*/
~Test();
private:
- QString showLocale(QString cat);
+ TQString showLocale(TQString cat);
void createFields();
- QLabel *label;
+ TQLabel *label;
};
#endif // TEST_H
diff --git a/kdecore/tests/kmacroexpandertest.cpp b/kdecore/tests/kmacroexpandertest.cpp
index 6c92ba935..0c41a309b 100644
--- a/kdecore/tests/kmacroexpandertest.cpp
+++ b/kdecore/tests/kmacroexpandertest.cpp
@@ -6,12 +6,12 @@
#include <stdlib.h>
-bool check(QString txt, QString s, QString a, QString b)
+bool check(TQString txt, TQString s, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b)
kdDebug() << txt << " (" << s << ") : '" << a << "' - ok" << endl;
else {
@@ -25,10 +25,10 @@ class MyCExpander : public KCharMacroExpander {
public:
MyCExpander() : KCharMacroExpander() {}
protected:
- bool expandMacro(QChar chr, QStringList &ret)
+ bool expandMacro(TQChar chr, TQStringList &ret)
{
if (chr == 'm') {
- ret = QString("expanded");
+ ret = TQString("expanded");
return true;
}
return false;
@@ -39,10 +39,10 @@ class MyWExpander : public KWordMacroExpander {
public:
MyWExpander() : KWordMacroExpander() {}
protected:
- bool expandMacro(const QString &str, QStringList &ret)
+ bool expandMacro(const TQString &str, TQStringList &ret)
{
if (str == "macro") {
- ret = QString("expanded");
+ ret = TQString("expanded");
return true;
}
return false;
@@ -53,11 +53,11 @@ int main(int argc, char *argv[])
{
KCmdLineArgs::init(argc, argv, ":", "", "", "");
KApplication app(false,false);
- QString s, s2;
+ TQString s, s2;
- QMap<QChar,QStringList> map1;
+ TQMap<TQChar,TQStringList> map1;
map1.insert('n', "Restaurant \"Chew It\"");
- QStringList li;
+ TQStringList li;
li << "element1" << "'element2'";
map1.insert('l', li);
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
s = "text \"%l %n\" text";
check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map1), "text \"element1 'element2' Restaurant \\\"Chew It\\\"\" text");
- QMap<QChar,QString> map;
+ TQMap<TQChar,TQString> map;
map.insert('a', "%n");
map.insert('f', "filename.txt");
map.insert('u', "http://www.kde.org/index.html");
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
s = "kedit --caption \"`echo %n`\" %f";
check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map), "kedit --caption \"$( echo 'Restaurant `echo hello`')\" 'filename.txt'");
- QMap<QString,QString> smap;
+ TQMap<TQString,TQString> smap;
smap.insert("foo", "%n");
smap.insert("file", "filename.txt");
smap.insert("url", "http://www.kde.org/index.html");
diff --git a/kdecore/tests/kmdcodectest.cpp b/kdecore/tests/kmdcodectest.cpp
index 1156f03f2..243d0d289 100644
--- a/kdecore/tests/kmdcodectest.cpp
+++ b/kdecore/tests/kmdcodectest.cpp
@@ -23,8 +23,8 @@
#include <iostream>
-#include <qbuffer.h>
-#include <qfile.h>
+#include <tqbuffer.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <klocale.h>
@@ -57,7 +57,7 @@ void MD5_verify (const char*, const char*, bool);
void MD5_file (const char * , bool rawOutput = false);
void MD5_string (const char *, const char *expected = 0, bool rawOutput = false);
-long readContent (const QFile& f, long count, QByteArray& buf)
+long readContent (const TQFile& f, long count, TQByteArray& buf)
{
long result;
int old_size;
@@ -85,14 +85,14 @@ long readContent (const QFile& f, long count, QByteArray& buf)
void testCodec (const char* msg, Codec type, bool isFile)
{
- QByteArray output;
+ TQByteArray output;
if ( isFile )
{
int count;
- QByteArray data;
+ TQByteArray data;
- QFile f (QFile::encodeName(msg));
+ TQFile f (TQFile::encodeName(msg));
if (!f.exists())
{
@@ -147,12 +147,12 @@ void testCodec (const char* msg, Codec type, bool isFile)
break;
}
- QCString result (output.data(), output.size()+1);
+ TQCString result (output.data(), output.size()+1);
cout << "Result: " << endl << result << endl;
}
else
{
- QCString result;
+ TQCString result;
const size_t len = strlen(msg);
output.resize(len);
@@ -246,13 +246,13 @@ void MD5_verify( const char *input, const char *digest, bool isFile )
if ( !isFile )
{
- context.update (QCString(input));
+ context.update (TQCString(input));
result = context.verify( digest );
cout << "Input string: " << input << endl;
}
else
{
- QFile f (input);
+ TQFile f (input);
if (!f.open (IO_ReadOnly))
{
@@ -273,7 +273,7 @@ void MD5_verify( const char *input, const char *digest, bool isFile )
void MD5_file (const char *filename, bool rawOutput )
{
- QFile f (QFile::encodeName(filename));
+ TQFile f (TQFile::encodeName(filename));
if (!f.open(IO_ReadOnly))
{
@@ -296,7 +296,7 @@ void MD5_file (const char *filename, bool rawOutput )
void MD5_string (const char *input, const char* expected, bool rawOutput )
{
KMD5 context;
- context.update (QCString(input));
+ context.update (TQCString(input));
cout << "Checking MD5 for: " << input << endl;
@@ -372,7 +372,7 @@ int main (int argc, char *argv[])
{
const char* opt = args->getOption( "c" ).data();
for ( int i=0 ; i < count; i++ )
- MD5_verify ( QCString(args->arg(i)), opt, (isString || !isFile) );
+ MD5_verify ( TQCString(args->arg(i)), opt, (isString || !isFile) );
}
else
{
diff --git a/kdecore/tests/kprocesstest.cpp b/kdecore/tests/kprocesstest.cpp
index 79769a90d..af04cd421 100644
--- a/kdecore/tests/kprocesstest.cpp
+++ b/kdecore/tests/kprocesstest.cpp
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
//
p1 << "kghostview";
- QObject::connect(&p1, SIGNAL(processExited(KProcess *)), &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p1, TQT_SIGNAL(processExited(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *)));
printf("starting kghostview blocking (close to continue)\n");
p1.start(KProcess::Block);
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
printf("Starting konsole with /bin/tcsh as shell (close to continue)\n");
p2 << "konsole" << "-e" << "/bin/tcsh";
p2.setWorkingDirectory("/tmp");
- QObject::connect(&p2, SIGNAL(processExited(KProcess *)), &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p2, TQT_SIGNAL(processExited(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *)));
p2.start(KProcess::Block);
//
@@ -70,13 +70,13 @@ int main(int argc, char *argv[])
//
p3 << "ls" << "-l";
- QObject::connect(&p3, SIGNAL(processExited(KProcess *)),
- &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p3, TQT_SIGNAL(processExited(KProcess *)),
+ &dummy, TQT_SLOT(printMessage(KProcess *)));
- QObject::connect(&p3, SIGNAL(receivedStdout(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
- QObject::connect(&p3, SIGNAL(receivedStderr(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p3, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p3, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
p3.start(KProcess::NotifyOnExit, KProcess::AllOutput);
@@ -93,16 +93,16 @@ int main(int argc, char *argv[])
//
p4 << "sort";
- QObject::connect(&p4, SIGNAL(processExited(KProcess *)),
- &dummy, SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p4, TQT_SIGNAL(processExited(KProcess *)),
+ &dummy, TQT_SLOT(printMessage(KProcess *)));
- QObject::connect(&p4, SIGNAL(receivedStdout(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
- QObject::connect(&p4, SIGNAL(receivedStderr(KProcess *, char *, int)),
- &dummy, SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p4, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
+ TQObject::connect(&p4, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
- QObject::connect(&p4, SIGNAL(wroteStdin(KProcess *)),
- &dummy, SLOT(outputDone(KProcess *)));
+ TQObject::connect(&p4, TQT_SIGNAL(wroteStdin(KProcess *)),
+ &dummy, TQT_SLOT(outputDone(KProcess *)));
p4.start(KProcess::NotifyOnExit, KProcess::All);
printf("after p4.start");
diff --git a/kdecore/tests/kprocesstest.h b/kdecore/tests/kprocesstest.h
index 193895510..3e5d989ec 100644
--- a/kdecore/tests/kprocesstest.h
+++ b/kdecore/tests/kprocesstest.h
@@ -12,7 +12,7 @@
#define __DUMMY_H__
#include <stdio.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "kprocess.h"
class Dummy : public QObject
diff --git a/kdecore/tests/kprociotest.cpp b/kdecore/tests/kprociotest.cpp
index 7585b7657..446dacb30 100644
--- a/kdecore/tests/kprociotest.cpp
+++ b/kdecore/tests/kprociotest.cpp
@@ -41,8 +41,8 @@ int main(int argc, char *argv[])
p << "rev";
- p.connect(&p, SIGNAL(processExited(KProcess*)), &dummy, SLOT(printMessage(KProcess*)));
- p.connect(&p, SIGNAL(readReady(KProcIO*)), &dummy, SLOT(gotOutput(KProcIO*)));
+ p.connect(&p, TQT_SIGNAL(processExited(KProcess*)), &dummy, TQT_SLOT(printMessage(KProcess*)));
+ p.connect(&p, TQT_SIGNAL(readReady(KProcIO*)), &dummy, TQT_SLOT(gotOutput(KProcIO*)));
bool b;
diff --git a/kdecore/tests/kprociotest.h b/kdecore/tests/kprociotest.h
index a7bb36f0f..6392fc708 100644
--- a/kdecore/tests/kprociotest.h
+++ b/kdecore/tests/kprociotest.h
@@ -12,7 +12,7 @@
#define __DUMMY_H__
#include <stdio.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "kprocio.h"
class Dummy : public QObject
@@ -27,7 +27,7 @@ class Dummy : public QObject
void gotOutput(KProcIO*proc)
{
- QString line;
+ TQString line;
while(true) {
int result = proc->readln(line);
if (result == -1) return;
diff --git a/kdecore/tests/krandomsequencetest.cpp b/kdecore/tests/krandomsequencetest.cpp
index 215349a05..8f337c2f1 100644
--- a/kdecore/tests/krandomsequencetest.cpp
+++ b/kdecore/tests/krandomsequencetest.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "krandomsequence.h"
#include "kapplication.h"
@@ -56,34 +56,34 @@ main(int argc, char *argv[])
seq.setSeed(kapp->random());
- QPtrList<QString> list;
- list.append(new QString("A"));
- list.append(new QString("B"));
- list.append(new QString("C"));
- list.append(new QString("D"));
- list.append(new QString("E"));
- list.append(new QString("F"));
- list.append(new QString("G"));
+ TQPtrList<TQString> list;
+ list.append(new TQString("A"));
+ list.append(new TQString("B"));
+ list.append(new TQString("C"));
+ list.append(new TQString("D"));
+ list.append(new TQString("E"));
+ list.append(new TQString("F"));
+ list.append(new TQString("G"));
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
seq.randomize(&list);
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
seq.randomize(&list);
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
seq.randomize(&list);
- for(QString *str = list.first(); str; str = list.next())
+ for(TQString *str = list.first(); str; str = list.next())
printf("%s", str->latin1());
printf("\n\n");
diff --git a/kdecore/tests/kresolvertest.cpp b/kdecore/tests/kresolvertest.cpp
index 30003265a..f1d3c11f9 100644
--- a/kdecore/tests/kresolvertest.cpp
+++ b/kdecore/tests/kresolvertest.cpp
@@ -33,8 +33,8 @@
#include <sys/socket.h>
#include <unistd.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <kuniqueapplication.h>
#include <ksocks.h>
@@ -69,17 +69,17 @@ public:
KUniqueApplication()
{ }
- int newInstance(QValueList<QCString> params);
+ int newInstance(TQValueList<TQCString> params);
};
bool tryLookup(const char* node, const char *serv)
{
int error;
- QString _node = QString::fromLatin1(node);
- QString _serv = QString::fromLatin1(serv);
+ TQString _node = TQString::fromLatin1(node);
+ TQString _serv = TQString::fromLatin1(serv);
printf("\tTrying to lookup %s|%s... ", node, serv);
- QPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, 0, &error);
+ TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, 0, &error);
list.setAutoDelete(true);
if (!list.isEmpty())
{
@@ -138,11 +138,11 @@ bool try_pton()
bool tryLookup6(const char *node, const char *serv)
{
int error;
- QString _node = QString::fromLatin1(node);
- QString _serv = QString::fromLatin1(serv);
+ TQString _node = TQString::fromLatin1(node);
+ TQString _serv = TQString::fromLatin1(serv);
printf("\tTrying to lookup IPv6 of %s|%s... ", node, serv);
- QPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, KExtendedSocket::ipv6Socket, &error);
+ TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, KExtendedSocket::ipv6Socket, &error);
list.setAutoDelete(true);
if (!list.isEmpty())
{
@@ -403,7 +403,7 @@ void go()
printf("\n\nTest finished\n");
}
-int TestApp::newInstance(QValueList<QCString> /*params*/)
+int TestApp::newInstance(TQValueList<TQCString> /*params*/)
{
go();
}
diff --git a/kdecore/tests/krfcdatetest.cpp b/kdecore/tests/krfcdatetest.cpp
index 1c1957b54..368a1106f 100644
--- a/kdecore/tests/krfcdatetest.cpp
+++ b/kdecore/tests/krfcdatetest.cpp
@@ -4,10 +4,10 @@
#include <kdebug.h>
#include <kglobal.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <krfcdate.h>
-bool check(QString txt, time_t a, time_t b)
+bool check(TQString txt, time_t a, time_t b)
{
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
@@ -71,9 +71,9 @@ int main(int argc, char *argv[])
// empty/null strings
- check("parseDateISO8601(QString())", KRFCDate::parseDateISO8601(QString()), b);
+ check("parseDateISO8601(TQString())", KRFCDate::parseDateISO8601(TQString()), b);
check("parseDateISO8601(\"\")", KRFCDate::parseDateISO8601(""), b);
- check("parseDate(QString())", KRFCDate::parseDate(QString()), b);
+ check("parseDate(TQString())", KRFCDate::parseDate(TQString()), b);
check("parseDate(\"\")", KRFCDate::parseDate(""), b);
printf("\nTest OK !\n");
diff --git a/kdecore/tests/kshelltest.cpp b/kdecore/tests/kshelltest.cpp
index eaca1fcbe..394394e28 100644
--- a/kdecore/tests/kshelltest.cpp
+++ b/kdecore/tests/kshelltest.cpp
@@ -3,7 +3,7 @@
#include <iostream>
static QCString
-ps(const QString &s)
+ps(const TQString &s)
{
if (s.isNull())
return "(null)";
@@ -34,7 +34,7 @@ int main()
tx("~sulli");
#endif
#if 1
- QStringList lst;
+ TQStringList lst;
lst << "this" << "is" << "text";
std::cout << KShell::joinArgs(lst).latin1() << std::endl;
#endif
diff --git a/kdecore/tests/ksocktest.cpp b/kdecore/tests/ksocktest.cpp
index 89b59c62a..042701c93 100644
--- a/kdecore/tests/ksocktest.cpp
+++ b/kdecore/tests/ksocktest.cpp
@@ -37,12 +37,12 @@
#include <arpa/inet.h>
#include <netdb.h>
-bool check(QString txt, QString a, QString b)
+bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -63,7 +63,7 @@ main(int argc, char *argv[])
KApplication app;
- QString host, port;
+ TQString host, port;
KInetSocketAddress host_address("213.203.58.36", 80);
@@ -73,7 +73,7 @@ main(int argc, char *argv[])
printf( "resolve result: %d\n", result );
check("KExtendedSocket::resolve() host=", host, "www.kde.org");
// check("KExtendedSocket::resolve() port=", port, "http");
- QPtrList<KAddressInfo> list;
+ TQPtrList<KAddressInfo> list;
list = KExtendedSocket::lookup("www.kde.org", "http", KExtendedSocket::inetSocket);
for(KAddressInfo *info = list.first(); info; info = list.next())
{
@@ -88,7 +88,7 @@ main(int argc, char *argv[])
int err;
- QPtrList<KAddressInfo> cns = KExtendedSocket::lookup("www.kde.org", 0, KExtendedSocket::canonName, &err);
+ TQPtrList<KAddressInfo> cns = KExtendedSocket::lookup("www.kde.org", 0, KExtendedSocket::canonName, &err);
for (KAddressInfo *x = cns.first(); x; x = cns.next()) {
const char *canon = x->canonname();
qWarning( "Lookup: %s", canon ? canon : "<Null>");
@@ -96,7 +96,7 @@ main(int argc, char *argv[])
check("KExtendedSocket::lookup() canonical", cns.first()->canonname(), "www.kde.org");
KExtendedSocket * sock2 = new KExtendedSocket( "www.kde.org", 80 );
- check( "KExtendedSocket ctor / connect", QString::number( sock2->connect() ), "0" );
+ check( "KExtendedSocket ctor / connect", TQString::number( sock2->connect() ), "0" );
printf("FD %d\n", sock2->fd());
diff --git a/kdecore/tests/ksortablevaluelisttest.cpp b/kdecore/tests/ksortablevaluelisttest.cpp
index de937c797..301054045 100644
--- a/kdecore/tests/ksortablevaluelisttest.cpp
+++ b/kdecore/tests/ksortablevaluelisttest.cpp
@@ -1,9 +1,9 @@
-#include <qstring.h>
+#include <tqstring.h>
#include <ksortablevaluelist.h>
int main( int argc, char **argv )
{
- KSortableValueList<QString> list;
+ KSortableValueList<TQString> list;
list.insert( 1, "FOO (1)" );
list.insert( 2, "Test (2)" );
list.insert( 1, "Huba! (1)" );
@@ -12,7 +12,7 @@ int main( int argc, char **argv )
list.insert( 2, "I was here :) (2)" );
list.insert( 4, "Yeehaa... (4)" );
- QValueListIterator<KSortableItem<QString> > it = list.begin();
+ TQValueListIterator<KSortableItem<TQString> > it = list.begin();
qDebug("Insertion order:");
qDebug("================");
diff --git a/kdecore/tests/kstdacceltest.cpp b/kdecore/tests/kstdacceltest.cpp
index 71eff30cd..ff8842139 100644
--- a/kdecore/tests/kstdacceltest.cpp
+++ b/kdecore/tests/kstdacceltest.cpp
@@ -5,12 +5,12 @@
#include <kstdaccel.h>
#include <stdlib.h> // for exit
-static bool check(QString txt, QString a, QString b)
+static bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
diff --git a/kdecore/tests/kstddirstest.cpp b/kdecore/tests/kstddirstest.cpp
index 23c0f0a1c..fa797d665 100644
--- a/kdecore/tests/kstddirstest.cpp
+++ b/kdecore/tests/kstddirstest.cpp
@@ -10,8 +10,8 @@ int main(int argc, char **argv)
KStandardDirs t;
KConfig config; // to add custom entries - a bit tricky :/
- QStringList list;
- QString s;
+ TQStringList list;
+ TQString s;
t.saveLocation("icon");
@@ -19,32 +19,32 @@ int main(int argc, char **argv)
if (!s.isNull()) kdDebug() << s << endl;
list = t.findAllResources("data", "kfind/toolbar", true);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "data " << (*it).ascii() << endl;
}
list = t.findAllResources("config", "kcmdisplayrc");
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "config " << (*it).ascii() << endl;
}
list = t.findAllResources("config", "kcmdisplayrc", false, true);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "config2 " << (*it).ascii() << endl;
}
list = t.findAllResources("html", "en/*/index.html", false);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "docs " << (*it).ascii() << endl;
}
list = t.findAllResources("html", "*/*/*.html", false);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "docs " << (*it).ascii() << endl;
}
list = t.findDirs("data", "kwin");
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
kdDebug() << "kwin dirs " << (*it).ascii() << endl;
}
diff --git a/kdecore/tests/kstringhandlertest.cpp b/kdecore/tests/kstringhandlertest.cpp
index 75695309d..2efdc96fc 100644
--- a/kdecore/tests/kstringhandlertest.cpp
+++ b/kdecore/tests/kstringhandlertest.cpp
@@ -3,7 +3,7 @@
using std::cout;
using std::endl;
-bool check(const QString &txt, const QString &a, const QString &b)
+bool check(const TQString &txt, const TQString &a, const TQString &b)
{
if ( a != b ) {
cout << "ERROR: Tested " << txt.latin1() << ", expected" << endl;
@@ -17,7 +17,7 @@ bool check(const QString &txt, const QString &a, const QString &b)
int main(int argc, char *argv[])
{
- QString test = "The quick brown fox jumped over the lazy bridge. ";
+ TQString test = "The quick brown fox jumped over the lazy bridge. ";
check("word(test, 3)",
KStringHandler::word(test, 2),
@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
check("reverse(test)",
KStringHandler::reverse(test),
" bridge. lazy the over jumped fox brown quick The");
- QString result;
+ TQString result;
result = KStringHandler::ljust(test, 70);
if (result.length() != 70)
{
diff --git a/kdecore/tests/ktempfiletest.cpp b/kdecore/tests/ktempfiletest.cpp
index aacf30255..60404f03a 100644
--- a/kdecore/tests/ktempfiletest.cpp
+++ b/kdecore/tests/ktempfiletest.cpp
@@ -19,7 +19,7 @@
#include "ktempfile.h"
#include "kapplication.h"
#include "kstandarddirs.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <unistd.h>
#include <stdio.h>
@@ -34,14 +34,14 @@ main(int argc, char *argv[])
printf("Filename = %s\n", f4.name().ascii());
printf("Making tempfile with \".ps\" extension.\n");
- KTempFile f2(QString::null, ".ps");
+ KTempFile f2(TQString::null, ".ps");
printf("Filename = %s\n", f2.name().ascii());
printf("Making tempfile in home directory.\n");
- KTempFile f3(QString((const char *)getenv("HOME"))+"/testXXX", ".myEXT", 0666);
+ KTempFile f3(TQString((const char *)getenv("HOME"))+"/testXXX", ".myEXT", 0666);
printf("Filename = %s\n", f3.name().ascii());
- QString name = locateLocal("socket", "test");
+ TQString name = locateLocal("socket", "test");
printf("Socket Filename = %s\n", name.ascii());
printf("Done.\n");
diff --git a/kdecore/tests/ktimezonestest.cpp b/kdecore/tests/ktimezonestest.cpp
index 7be8bd621..650cc0512 100644
--- a/kdecore/tests/ktimezonestest.cpp
+++ b/kdecore/tests/ktimezonestest.cpp
@@ -17,13 +17,13 @@ int main(int argc, char *argv[])
// Find the current offset of the UTC timezone.
timezone = timezones.zone("UTC");
- printf( "UTC timezone offset should be 0: %d\n", timezone->offset(QDateTime::currentDateTime()) );
+ printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::currentDateTime()) );
// Find some offsets for Europe/London.
char *london = "Europe/London";
timezone = timezones.zone(london);
- QDateTime winter(QDateTime::fromString("2005-01-01T00:00:00", Qt::ISODate));
- QDateTime summer(QDateTime::fromString("2005-06-01T00:00:00", Qt::ISODate));
+ TQDateTime winter(TQDateTime::fromString("2005-01-01T00:00:00", Qt::ISODate));
+ TQDateTime summer(TQDateTime::fromString("2005-06-01T00:00:00", Qt::ISODate));
printf( "%s winter timezone offset should be 0: %d\n", london, timezone->offset(winter) );
printf( "%s summer timezone offset should be 3600: %d\n", london, timezone->offset(summer) );
@@ -33,14 +33,14 @@ int main(int argc, char *argv[])
char *bstAfterPdt = "2005-05-01T00:00:00";
char *gmtBeforePst = "2005-10-30T01:00:00";
char *gmtAfterPst = "2005-12-01T00:00:00";
- QString result;
- result = timezone->convert(losAngeles, QDateTime::fromString(bstBeforePdt, Qt::ISODate)).toString(Qt::ISODate);
+ TQString result;
+ result = timezone->convert(losAngeles, TQDateTime::fromString(bstBeforePdt, Qt::ISODate)).toString(Qt::ISODate);
printf( "BST before PDT, %s should be 2005-03-27T15:00:00: %s\n", bstBeforePdt, result.latin1() );
- result = timezone->convert(losAngeles, QDateTime::fromString(bstAfterPdt, Qt::ISODate)).toString(Qt::ISODate);
+ result = timezone->convert(losAngeles, TQDateTime::fromString(bstAfterPdt, Qt::ISODate)).toString(Qt::ISODate);
printf( "BST and PDT, %s should be 2005-04-30T16:00:00: %s\n", bstAfterPdt, result.latin1() );
- result = timezone->convert(losAngeles, QDateTime::fromString(gmtBeforePst, Qt::ISODate)).toString(Qt::ISODate);
+ result = timezone->convert(losAngeles, TQDateTime::fromString(gmtBeforePst, Qt::ISODate)).toString(Qt::ISODate);
printf( "GMT before PST, %s should be 2005-10-29T17:00:00: %s\n", gmtBeforePst, result.latin1() );
- result = timezone->convert(losAngeles, QDateTime::fromString(gmtAfterPst, Qt::ISODate)).toString(Qt::ISODate);
+ result = timezone->convert(losAngeles, TQDateTime::fromString(gmtAfterPst, Qt::ISODate)).toString(Qt::ISODate);
printf( "GMT and PST, %s should be 2005-11-30T16:00:00: %s\n", gmtAfterPst, result.latin1() );
printf( "Latitude 89 should be valid: %svalid\n", KTimezone::isValidLatitude(89.0) ? "" : "in");
printf( "Latitude 91 should be invalid: %svalid\n", KTimezone::isValidLatitude(91.0) ? "" : "in");
diff --git a/kdecore/tests/kurltest.cpp b/kdecore/tests/kurltest.cpp
index 60e8ace09..e80561d2c 100644
--- a/kdecore/tests/kurltest.cpp
+++ b/kdecore/tests/kurltest.cpp
@@ -7,17 +7,17 @@
#include <kdebug.h>
#include <kglobal.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
-#include <qdatastream.h>
+#include <tqtextcodec.h>
+#include <tqdatastream.h>
#include <assert.h>
#include <kcmdlineargs.h>
-static bool check(QString txt, QString a, QString b)
+static bool check(TQString txt, TQString a, TQString b)
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -64,11 +64,11 @@ void testAdjustPath()
// Equivalent tests written by the KDirLister maintainer :)
- KURL u3( QCString("ftp://brade@ftp.kde.org///") );
+ KURL u3( TQCString("ftp://brade@ftp.kde.org///") );
u3.adjustPath(-1);
check("KURL::adjustPath()", u3.url(), "ftp://brade@ftp.kde.org/");
- KURL u4( QCString("ftp://brade@ftp.kde.org/kde///") );
+ KURL u4( TQCString("ftp://brade@ftp.kde.org/kde///") );
u4.adjustPath(-1);
check("KURL::adjustPath()", u4.url(), "ftp://brade@ftp.kde.org/kde");
@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
KURL url2( baseURL, "../../////kdebase/konqueror" );
check( "KURL::url()", url2.url(), "file:///usr/local/src/kde2/////kdebase/konqueror" );
- QString u1 = "file:/home/dfaure/my#myref";
+ TQString u1 = "file:/home/dfaure/my#myref";
url1 = u1;
check("KURL::url()", url1.url(), "file:///home/dfaure/my#myref");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
@@ -167,11 +167,11 @@ int main(int argc, char *argv[])
KURL dxOffEagle( KURL("http://something/other.html"), "newpage.html?[{\"foo: bar\"}]" );
check("isValid", dxOffEagle.isValid() ? "OK" : "KO", "OK");
- check("url", dxOffEagle.url(), QString("http://something/newpage.html?[{\"foo:%20bar\"}]") );
+ check("url", dxOffEagle.url(), TQString("http://something/newpage.html?[{\"foo:%20bar\"}]") );
KURL javascript( KURL("javascript:window.location+\"__flashplugin_unique__\"") );
check("isValid", javascript.isValid() ? "OK" : "KO", "OK");
- check("url", javascript.url(), QString("javascript:window.location+\"__flashplugin_unique__\"") );
+ check("url", javascript.url(), TQString("javascript:window.location+\"__flashplugin_unique__\"") );
u1 = "file:///home/dfaure/my#myref";
@@ -192,16 +192,16 @@ int main(int argc, char *argv[])
url1= "$HOME/.kde/share/config";
check("KURL::isValid()", url1.isValid()?"TRUE":"FALSE", "FALSE" );
- u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect";
+ u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect";
url1 = u1;
- check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect");
+ check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
check("KURL::hasHTMLRef()", url1.hasHTMLRef() ? "yes" : "no", "yes");
- check("KURL::htmlRef()", url1.htmlRef(), "QObject::connect");
+ check("KURL::htmlRef()", url1.htmlRef(), "TQObject::connect");
check("KURL::hasSubURL()", url1.hasSubURL() ? "yes" : "no", "no");
check("KURL::upURL()", url1.upURL().url(), "file:///opt/kde2/qt2/doc/html/");
- url1 = KURL( QCString( "http://www.kde.org/foo.cgi?foo=bar" ) );
+ url1 = KURL( TQCString( "http://www.kde.org/foo.cgi?foo=bar" ) );
check("query", url1.query(), "?foo=bar" );
url1.setQuery( "toto=titi&kde=rocks" );
check("query", url1.query(), "?toto=titi&kde=rocks" );
@@ -211,24 +211,24 @@ int main(int argc, char *argv[])
check("setQuery(\"?\") -> query", url1.query(), "?" );
url1.setQuery( "" );
check("setQuery(\"\") -> query", url1.query(), "?" );
- url1.setQuery( QString::null );
- check("setQuery(QString::null) -> query", url1.query(), QString::null );
+ url1.setQuery( TQString::null );
+ check("setQuery(TQString::null) -> query", url1.query(), TQString::null );
- u1 = "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect";
+ u1 = "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect";
url1 = u1;
- check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject::connect");
+ check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
check("KURL::hasHTMLRef()", url1.hasHTMLRef() ? "yes" : "no", "yes");
- check("KURL::htmlRef()", url1.htmlRef(), "QObject::connect");
+ check("KURL::htmlRef()", url1.htmlRef(), "TQObject::connect");
check("KURL::hasSubURL()", url1.hasSubURL() ? "yes" : "no", "no");
check("KURL::upURL()", url1.upURL().url(), "file:///opt/kde2/qt2/doc/html/");
- u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject:connect";
+ u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject:connect";
url1 = u1;
- check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#QObject:connect");
+ check("KURL::url()", url1.url(), "file:///opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject:connect");
check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "yes");
check("KURL::hasHTMLRef()", url1.hasHTMLRef() ? "yes" : "no", "yes");
- check("KURL::htmlRef()", url1.htmlRef(), "QObject:connect");
+ check("KURL::htmlRef()", url1.htmlRef(), "TQObject:connect");
check("KURL::hasSubURL()", url1.hasSubURL() ? "yes" : "no", "no");
check("KURL::upURL()", url1.upURL().url(), "file:///opt/kde2/qt2/doc/html/");
@@ -329,7 +329,7 @@ int main(int argc, char *argv[])
KURL udir;
printf("\n* Empty URL\n");
- check("KURL::url()", udir.url(), QString::null);
+ check("KURL::url()", udir.url(), TQString::null);
check("KURL::isEmpty()", udir.isEmpty() ? "ok" : "ko", "ok");
check("KURL::isValid()", udir.isValid() ? "ok" : "ko", "ko");
udir = udir.upURL();
@@ -342,7 +342,7 @@ int main(int argc, char *argv[])
check("KURL::directory(false,false)", udir.directory(false,false), "/home/dfaure/");
check("KURL::directory(true,false)", udir.directory(true,false), "/home/dfaure");
- KURL u2( QCString("/home/dfaure/") );
+ KURL u2( TQCString("/home/dfaure/") );
printf("\n* URL is %s\n",u2.url().ascii());
// not ignoring trailing slash
check("KURL::directory(false,false)", u2.directory(false,false), "/home/dfaure/");
@@ -383,7 +383,7 @@ int main(int argc, char *argv[])
u2.setFileName( "myotherfile.txt" );
check("KURL::setFileName()", u2.url(), "file:///home/dfaure/myotherfile.txt");
// more tricky, renaming a directory (kpropsdlg.cc, line ~ 238)
- QString tmpurl = "file:/home/dfaure/myolddir/";
+ TQString tmpurl = "file:/home/dfaure/myolddir/";
if ( tmpurl.at(tmpurl.length() - 1) == '/')
// It's a directory, so strip the trailing slash first
tmpurl.truncate( tmpurl.length() - 1);
@@ -425,15 +425,15 @@ int main(int argc, char *argv[])
check("KURL::split()", lst.first().url(), "ftp://host/dir1/dir2/myfile.txt");
// cdUp code
KURL lastUrl = lst.last();
- QString dir = lastUrl.directory( true, true );
+ TQString dir = lastUrl.directory( true, true );
check( "KURL::directory(true,true)", dir, "/dir1/dir2");
/// Comparisons
- QString ucmp1 = "ftp://ftp.de.kde.org/dir";
- QString ucmp2 = "ftp://ftp.de.kde.org/dir/";
+ TQString ucmp1 = "ftp://ftp.de.kde.org/dir";
+ TQString ucmp2 = "ftp://ftp.de.kde.org/dir/";
check("urlcmp(only slash difference)", urlcmp(ucmp1,ucmp2)?"ko":"ok","ok");
check("urlcmp(only slash difference, ignore_trailing)", urlcmp(ucmp1,ucmp2,true,false)?"ok":"ko","ok");
- QString ucmp3 = "ftp://ftp.de.kde.org/dir/#";
+ TQString ucmp3 = "ftp://ftp.de.kde.org/dir/#";
check("urlcmp(only hash difference)", urlcmp(ucmp2,ucmp3)?"ko":"ok","ok");
check("urlcmp(only hash difference, ignore_ref)", urlcmp(ucmp2,ucmp3,false,true)?"ok":"ko","ok");
check("urlcmp(slash and hash difference, ignore_trailing, ignore_ref)", urlcmp(ucmp2,ucmp3,true,true)?"ok":"ko","ok");
@@ -446,7 +446,7 @@ int main(int argc, char *argv[])
KURL ftpUrl ( "ftp://ftp.de.kde.org" );
printf("\n* URL is %s\n",ftpUrl.url().latin1());
- check("KURL::path()", ftpUrl.path(), QString::null);
+ check("KURL::path()", ftpUrl.path(), TQString::null);
ftpUrl = "ftp://ftp.de.kde.org/";
check("KURL::isParentOf()", ftpUrl.isParentOf( "ftp://ftp.de.kde.org/host/subdir/") ? "yes" : "no", "yes");
ftpUrl = "ftp://ftp/host/subdir/";
@@ -560,7 +560,7 @@ int main(int argc, char *argv[])
check("http: Set user", waba1.url(), "http://waldo@www.website.com/directory/filename?bla#blub");
waba1.setUser("waldo/bastian");
check("http: Set user with slash in it", waba1.url(), "http://waldo%2Fbastian@www.website.com/directory/filename?bla#blub");
- waba1.setRef( QString::null );
+ waba1.setRef( TQString::null );
waba1.setPass( "pass" );
waba1.setDirectory( "/foo" );
waba1.setProtocol( "https" );
@@ -581,7 +581,7 @@ int main(int argc, char *argv[])
"http://www.kde.org/cgi/test.cgi#");
check("hasRef()", waba1.hasRef()?"true":"false","true");
check("hasHTMLRef()", waba1.hasHTMLRef()?"true":"false","true");
- check("encodedHtmlRef()", waba1.encodedHtmlRef(),QString::null);
+ check("encodedHtmlRef()", waba1.encodedHtmlRef(),TQString::null);
// URLs who forgot to encode spaces in the query.
waba1 = "http://www.kde.org/cgi/test.cgi?hello=My Value";
@@ -612,7 +612,7 @@ int main(int argc, char *argv[])
waba1 = "http://a:389?b=c";
check( "http: URL with port, query, and empty path; url", waba1.url(), "http://a:389?b=c" );
check( "http: URL with port, query, and empty path; host", waba1.host(), "a" );
- check( "http: URL with port, query, and empty path; port", QString::number( waba1.port() ), "389" );
+ check( "http: URL with port, query, and empty path; port", TQString::number( waba1.port() ), "389" );
check( "http: URL with port, query, and empty path; path", waba1.path(), "" );
check( "http: URL with port, query, and empty path; query", waba1.query(), "?b=c" );
@@ -635,7 +635,7 @@ int main(int argc, char *argv[])
waba1 = "http://a:389#b=c";
check( "http: URL with port, ref, and empty path; url", waba1.url(), "http://a:389#b=c" );
check( "http: URL with port, ref, and empty path; host", waba1.host(), "a" );
- check( "http: URL with port, ref, and empty path; port", QString::number( waba1.port() ), "389" );
+ check( "http: URL with port, ref, and empty path; port", TQString::number( waba1.port() ), "389" );
check( "http: URL with port, ref, and empty path; path", waba1.path(), "" );
check( "http: URL with port, ref, and empty path; ref", waba1.ref(), "b=c" );
check( "http: URL with port, ref, and empty path; query", waba1.query(), "" );
@@ -644,7 +644,7 @@ int main(int argc, char *argv[])
waba1 = "http://[::FFFF:129.144.52.38]:81/index.html";
check("http: IPV6 host", waba1.host(),
"::ffff:129.144.52.38");
- check("http: IPV6 port", QString("%1").arg(waba1.port()),
+ check("http: IPV6 port", TQString("%1").arg(waba1.port()),
"81");
// IPV6
@@ -655,7 +655,7 @@ int main(int argc, char *argv[])
"waba");
check("http: IPV6 host", waba1.pass(),
"pass");
- check("http: IPV6 port", QString("%1").arg(waba1.port()),
+ check("http: IPV6 port", TQString("%1").arg(waba1.port()),
"81");
// IPV6
@@ -684,27 +684,27 @@ int main(int argc, char *argv[])
assert( waba1.isValid() );
check("http: IPV6 without path", waba1.url(),
"http://[::ffff:129.144.52.38]:81?query");
- check("http: IPV6 without path; port", QString::number( waba1.port() ), "81" );
+ check("http: IPV6 without path; port", TQString::number( waba1.port() ), "81" );
check("http: IPV6 without path; query", waba1.query(), "?query");
waba1 = "http://[::ffff:129.144.52.38]:81#ref";
assert( waba1.isValid() );
check("http: IPV6 without path", waba1.url(),
"http://[::ffff:129.144.52.38]:81#ref");
- check("http: IPV6 without path; port", QString::number( waba1.port() ), "81" );
+ check("http: IPV6 without path; port", TQString::number( waba1.port() ), "81" );
check("http: IPV6 without path; ref", waba1.ref(), "ref");
// Streaming operators
KURL origURL( "http://www.website.com/directory/?#ref" );
waba1 = "http://[::ffff:129.144.52.38]:81?query";
- QByteArray buffer;
+ TQByteArray buffer;
{
- QDataStream stream( buffer, IO_WriteOnly );
+ TQDataStream stream( buffer, IO_WriteOnly );
stream << origURL
<< KURL( "file:" ) // an invalid one
<< waba1; // the IPv6 one
}
{
- QDataStream stream( buffer, IO_ReadOnly );
+ TQDataStream stream( buffer, IO_ReadOnly );
KURL restoredURL;
stream >> restoredURL;
check( "Streaming valid URL", origURL.url(), restoredURL.url() );
@@ -742,7 +742,7 @@ int main(int argc, char *argv[])
check("Broken stuff #3 directory(true, false)", waba1.directory(true, false), "");
check("Broken stuff #3 directory(false, true)", waba1.directory(true, true), "");
KURL broken;
- broken.setPath( QString::null );
+ broken.setPath( TQString::null );
check("Broken stuff #4 empty", broken.isEmpty()?"EMPTY":"NOT", "NOT");
// It's valid: because isValid refers to parsing, not to what happens afterwards.
check("Broken stuff #4 valid", broken.isValid()?"VALID":"MALFORMED", "VALID");
@@ -819,9 +819,9 @@ int main(int argc, char *argv[])
#if QT_VERSION < 300
qt_set_locale_codec( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
#else
- QTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
+ TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
#endif
- QString raw = "data:text/html,%00%2540%00";
+ TQString raw = "data:text/html,%00%2540%00";
check("data URL: encode-decode of %00", KURL(raw).url(), raw );
// UTF8 tests
@@ -864,10 +864,10 @@ int main(int argc, char *argv[])
#if QT_VERSION < 300
qt_set_locale_codec( KGlobal::charsets()->codecForName( "koi8-r" ) );
#else
- QTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "koi8-r" ) );
+ TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "koi8-r" ) );
#endif
baseURL = "file:/home/coolo";
- KURL russian = baseURL.directory(false, true) + QString::fromLocal8Bit( "ÆÇÎ7" );
+ KURL russian = baseURL.directory(false, true) + TQString::fromLocal8Bit( "ÆÇÎ7" );
check( "russian", russian.url(), "file:///home/%C6%C7%CE7" );
KURL tobi1("http://some.host.net/path/to/file#fragmentPrecedes?theQuery");
@@ -895,27 +895,27 @@ int main(int argc, char *argv[])
check("queryItem (first item)", theKow.queryItem("q"), "frerich");
check("queryItem (middle item)", theKow.queryItem("hl"), "de");
check("queryItem (last item)", theKow.queryItem("lr"), "lang de");
- check("queryItem (invalid item)", theKow.queryItem("InterstellarCounselor"), QString::null);
+ check("queryItem (invalid item)", theKow.queryItem("InterstellarCounselor"), TQString::null);
check("queryItem (empty item)", theKow.queryItem("empty"), "");
check("queryItem (item with encoded chars)", theKow.queryItem("test"), "+ :%");
check("encodedPathAndQuery", theKow.encodedPathAndQuery(), "/search?q=frerich&hlx=xx&hl=de&empty=&lr=lang+de&test=%2B%20%3A%25");
- // checks for queryItems(), which returns a QMap<QString,QString>:
+ // checks for queryItems(), which returns a TQMap<TQString,TQString>:
KURL queryUrl( "mailto:Marc%20Mutz%20%3cmutz@kde.org%3E?"
"Subject=subscribe+me&"
"body=subscribe+mutz%40kde.org&"
"Cc=majordomo%40lists.kde.org" );
check("queryItems (c.s. keys)",
- QStringList(queryUrl.queryItems().keys()).join(", "),
+ TQStringList(queryUrl.queryItems().keys()).join(", "),
"Cc, Subject, body" );
check("queryItems (c.i.s. keys)",
- QStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).keys()).join(", "),
+ TQStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).keys()).join(", "),
"body, cc, subject" );
check("queryItems (values; c.s. keys)",
- QStringList(queryUrl.queryItems().values()).join(", "),
+ TQStringList(queryUrl.queryItems().values()).join(", "),
"majordomo@lists.kde.org, subscribe me, subscribe mutz@kde.org" );
check("queryItems (values; c.i.s. keys)",
- QStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).values()).join(", "),
+ TQStringList(queryUrl.queryItems(KURL::CaseInsensitiveKeys).values()).join(", "),
"subscribe mutz@kde.org, majordomo@lists.kde.org, subscribe me" );
KURL umlaut1("http://www.clever-tanken.de/liste.asp?ort=N%FCrnberg&typ=Diesel");
@@ -940,12 +940,12 @@ int main(int argc, char *argv[])
check("amantia.url()", amantia.url(), "http://?.foo.de"); // why not
#endif
- KURL thiago( QString::fromUtf8( "http://\303\244.de" ) ); // ä in utf8
+ KURL thiago( TQString::fromUtf8( "http://\303\244.de" ) ); // ä in utf8
check("thiago.isValid()", thiago.isValid() ? "true" : "false", "true");
#ifdef HAVE_IDNA_H
check("thiago.url()", thiago.url(), "http://xn--4ca.de"); // Non-ascii is allowed in IDN domain names.
#else
- check("thiago.url()", thiago.url(), QString::fromUtf8( "http://\303\244.de" ) );
+ check("thiago.url()", thiago.url(), TQString::fromUtf8( "http://\303\244.de" ) );
#endif
@@ -1003,16 +1003,16 @@ int main(int argc, char *argv[])
check("com2.url()", com2.url(), "http://server.com/dir/blubb/blah/");
KURL utf8_1("audiocd:/By%20Name/15%20Geantra%C3%AE.wav", 106);
- check("utf8_1.fileName()", utf8_1.fileName(), QString::fromLatin1("15 Geantraî.wav"));
+ check("utf8_1.fileName()", utf8_1.fileName(), TQString::fromLatin1("15 Geantraî.wav"));
KURL utf8_2("audiocd:/By%20Name/15%2fGeantra%C3%AE.wav", 106);
- check("utf8_2.fileName()", utf8_2.fileName(), QString::fromLatin1("15/Geantraî.wav"));
+ check("utf8_2.fileName()", utf8_2.fileName(), TQString::fromLatin1("15/Geantraî.wav"));
KURL url_newline_1("http://www.foo.bar/foo/bar\ngnork");
- check("url_newline_1.url()", url_newline_1.url(), QString::fromLatin1("http://www.foo.bar/foo/bar%0Agnork"));
+ check("url_newline_1.url()", url_newline_1.url(), TQString::fromLatin1("http://www.foo.bar/foo/bar%0Agnork"));
KURL url_newline_2("http://www.foo.bar/foo?bar\ngnork");
- check("url_newline_2.url()", url_newline_2.url(), QString::fromLatin1("http://www.foo.bar/foo?bar%0Agnork"));
+ check("url_newline_2.url()", url_newline_2.url(), TQString::fromLatin1("http://www.foo.bar/foo?bar%0Agnork"));
KURL local_file_1("file://localhost/my/file");
check("local_file_1.isLocalFile()", local_file_1.isLocalFile() ? "true" : "false", "true");
@@ -1033,7 +1033,7 @@ int main(int argc, char *argv[])
local_file_5.setPath("/foo?bar");
check("local_file_5.url()", local_file_5.url(), "file:///foo%3Fbar");
- QString basePath = "/home/bastian";
+ TQString basePath = "/home/bastian";
check("relativePath(\"/home/bastian\", \"/home/bastian\")", KURL::relativePath(basePath, "/home/bastian"), "./");
bool b;
@@ -1064,7 +1064,7 @@ int main(int argc, char *argv[])
baseURL = "http://mlc:80/";
check("isValid()?", baseURL.isValid() ? "true" : "false", "true");
- check("port()?", QString::number(baseURL.port()), "80");
+ check("port()?", TQString::number(baseURL.port()), "80");
check("path()?", baseURL.path(), "/");
baseURL = "ptal://mlc:usb@PC_970"; // User=mlc, password=usb, host=PC_970
@@ -1085,7 +1085,7 @@ int main(int argc, char *argv[])
KURL ldap = "ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)";
check("host()?", ldap.host(), "host.com");
- check("port()?", QString("%1").arg(ldap.port()), "6666");
+ check("port()?", TQString("%1").arg(ldap.port()), "6666");
check("path()?", ldap.path(), "/o=University of Michigan,c=US");
check("query()?", ldap.query(), "??sub?(cn=Babs%20Jensen)");
check("url()?", ldap.url(), "ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)");
@@ -1101,13 +1101,13 @@ int main(int argc, char *argv[])
// URI Mode tests
url1 = "http://www.foobar.com/";
- check("KURL(\"http://www.foobar.com/\").uriMode()", QString::number(url1.uriMode()), QString::number(KURL::URL));
+ check("KURL(\"http://www.foobar.com/\").uriMode()", TQString::number(url1.uriMode()), TQString::number(KURL::URL));
url1 = "mailto:user@host.com";
- check("KURL(\"mailto:user@host.com\").uriMode()", QString::number(url1.uriMode()), QString::number(KURL::Mailto));
+ check("KURL(\"mailto:user@host.com\").uriMode()", TQString::number(url1.uriMode()), TQString::number(KURL::Mailto));
check("KURL(\"mailto:user@host.com\").url()", url1.url(), "mailto:user@host.com");
check("KURL(\"mailto:user@host.com\").url(0, 106)", url1.url(0, 106), "mailto:user@host.com");
url1 = "data:text/plain,foobar?gazonk=flarp";
- check("KURL(\"data:text/plain,foobar?gazonk=flarp\").uriMode()", QString::number(url1.uriMode()), QString::number(KURL::RawURI));
+ check("KURL(\"data:text/plain,foobar?gazonk=flarp\").uriMode()", TQString::number(url1.uriMode()), TQString::number(KURL::RawURI));
check("KURL(\"data:text/plain,foobar?gazonk=flarp\").path()", url1.path(), "text/plain,foobar?gazonk=flarp");
url1 = "mailto:User@Host.COM?subject=Hello";
check("KURL(\"mailto:User@Host.COM?subject=Hello\").path()", url1.path(), "User@host.com");
diff --git a/kdecore/tests/kxerrorhandlertest.cpp b/kdecore/tests/kxerrorhandlertest.cpp
index cb97be170..c2efc7443 100644
--- a/kdecore/tests/kxerrorhandlertest.cpp
+++ b/kdecore/tests/kxerrorhandlertest.cpp
@@ -1,4 +1,4 @@
-#include <qwidget.h>
+#include <tqwidget.h>
#include <X11/Xlib.h>
#include <iostream>
using namespace std;
diff --git a/kdecore/tests/startserviceby.cpp b/kdecore/tests/startserviceby.cpp
index 4411eed53..93e6716ef 100644
--- a/kdecore/tests/startserviceby.cpp
+++ b/kdecore/tests/startserviceby.cpp
@@ -32,10 +32,10 @@ main(int argc, char *argv[])
KApplication a;
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int pid;
- a.startServiceByDesktopName( "kaddressbook", QString::null, &error, &dcopService, &pid );
+ a.startServiceByDesktopName( "kaddressbook", TQString::null, &error, &dcopService, &pid );
kdDebug() << "Started. error=" << error << " dcopService=" << dcopService << " pid=" << pid << endl;
a.exec();
}
diff --git a/kdecore/tests/testqtargs.cpp b/kdecore/tests/testqtargs.cpp
index 918b07735..2b3606a59 100644
--- a/kdecore/tests/testqtargs.cpp
+++ b/kdecore/tests/testqtargs.cpp
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
}
args->clear();
- QWidget *w = new QWidget();
+ TQWidget *w = new TQWidget();
app.setMainWidget(w);
w->show();