summaryrefslogtreecommitdiffstats
path: root/kdecore
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
commitf7e71d47719ab6094cf4a9fafffa5ea351973522 (patch)
tree30834aa632d442019e14f88685001d94657d060b /kdecore
parentb31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff)
downloadtdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz
tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore')
-rw-r--r--kdecore/fixx11h.h16
-rw-r--r--kdecore/kaboutdata.cpp38
-rw-r--r--kdecore/kaccel.cpp24
-rw-r--r--kdecore/kaccelbase.cpp16
-rw-r--r--kdecore/kaccelmanager.cpp42
-rw-r--r--kdecore/kaccelmanager_private.h4
-rw-r--r--kdecore/kallocator.cpp6
-rw-r--r--kdecore/kapplication.cpp100
-rw-r--r--kdecore/kapplication.h12
-rw-r--r--kdecore/kasyncio.h12
-rw-r--r--kdecore/kbufferedio.h1
-rw-r--r--kdecore/kcalendarsystemfactory.h2
-rw-r--r--kdecore/kcalendarsystemgregorian.cpp10
-rw-r--r--kdecore/kcalendarsystemhebrew.cpp18
-rw-r--r--kdecore/kcalendarsystemhijri.cpp4
-rw-r--r--kdecore/kcalendarsystemjalali.cpp4
-rw-r--r--kdecore/kcatalogue.cpp2
-rw-r--r--kdecore/kcharsets.cpp38
-rw-r--r--kdecore/kcheckaccelerators.cpp8
-rw-r--r--kdecore/kcheckaccelerators.h2
-rw-r--r--kdecore/kclipboard.cpp38
-rw-r--r--kdecore/kclipboard.h2
-rw-r--r--kdecore/kcmdlineargs.cpp14
-rw-r--r--kdecore/kcompletion.cpp12
-rw-r--r--kdecore/kcompletion.h4
-rw-r--r--kdecore/kcompletion_private.h4
-rw-r--r--kdecore/kcompletionbase.cpp2
-rw-r--r--kdecore/kconfig.cpp10
-rw-r--r--kdecore/kconfig_compiler/kconfig_compiler.cpp66
-rw-r--r--kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp6
-rw-r--r--kdecore/kconfig_compiler/tests/test1.cpp.ref48
-rw-r--r--kdecore/kconfig_compiler/tests/test1.h.ref18
-rw-r--r--kdecore/kconfig_compiler/tests/test2.cpp.ref66
-rw-r--r--kdecore/kconfig_compiler/tests/test2.h.ref22
-rw-r--r--kdecore/kconfig_compiler/tests/test3.cpp.ref22
-rw-r--r--kdecore/kconfig_compiler/tests/test3.h.ref8
-rw-r--r--kdecore/kconfig_compiler/tests/test4.cpp.ref48
-rw-r--r--kdecore/kconfig_compiler/tests/test4.h.ref8
-rw-r--r--kdecore/kconfig_compiler/tests/test5.cpp.ref48
-rw-r--r--kdecore/kconfig_compiler/tests/test5.h.ref8
-rw-r--r--kdecore/kconfig_compiler/tests/test6.cpp.ref18
-rw-r--r--kdecore/kconfig_compiler/tests/test6.h.ref6
-rw-r--r--kdecore/kconfig_compiler/tests/test7.cpp.ref18
-rw-r--r--kdecore/kconfig_compiler/tests/test7.h.ref6
-rw-r--r--kdecore/kconfig_compiler/tests/test8a.cpp.ref10
-rw-r--r--kdecore/kconfig_compiler/tests/test8a.h.ref4
-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/test9.cpp.ref16
-rw-r--r--kdecore/kconfig_compiler/tests/test9.h.ref6
-rw-r--r--kdecore/kconfig_compiler/tests/test9main.cpp2
-rw-r--r--kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref88
-rw-r--r--kdecore/kconfigbackend.cpp20
-rw-r--r--kdecore/kconfigbase.cpp68
-rw-r--r--kdecore/kconfigbase.h27
-rw-r--r--kdecore/kconfigdialogmanager.cpp18
-rw-r--r--kdecore/kconfigskeleton.cpp38
-rw-r--r--kdecore/kconfigskeleton.h50
-rw-r--r--kdecore/kdcoppropertyproxy.cpp18
-rw-r--r--kdecore/kde-config.cpp.in30
-rw-r--r--kdecore/kdebug.cpp28
-rw-r--r--kdecore/kdebug.h14
-rw-r--r--kdecore/kdelibs_export.h2
-rw-r--r--kdecore/kdemacros.h.in8
-rw-r--r--kdecore/kdesktopfile.cpp32
-rw-r--r--kdecore/kextsock.cpp8
-rw-r--r--kdecore/kextsock.h13
-rw-r--r--kdecore/kgenericfactory.h16
-rw-r--r--kdecore/kgenericfactory.tcc110
-rw-r--r--kdecore/kglobal.cpp6
-rw-r--r--kdecore/kglobalaccel.h2
-rw-r--r--kdecore/kglobalaccel_win.cpp6
-rw-r--r--kdecore/kglobalaccel_x11.cpp34
-rw-r--r--kdecore/kglobalsettings.cpp6
-rw-r--r--kdecore/kiconeffect.cpp106
-rw-r--r--kdecore/kiconloader.cpp40
-rw-r--r--kdecore/kiconloader_p.h2
-rw-r--r--kdecore/kicontheme.cpp12
-rw-r--r--kdecore/kidna.cpp4
-rw-r--r--kdecore/kkeyserver_x11.cpp20
-rw-r--r--kdecore/klibloader.cpp12
-rw-r--r--kdecore/klibloader.h6
-rw-r--r--kdecore/klocale.cpp116
-rw-r--r--kdecore/klocale.h4
-rw-r--r--kdecore/kmacroexpander.cpp34
-rw-r--r--kdecore/kmanagerselection.cpp4
-rw-r--r--kdecore/kmanagerselection.h8
-rw-r--r--kdecore/kmdcodec.cpp128
-rw-r--r--kdecore/kmdcodec.h68
-rw-r--r--kdecore/kmimesourcefactory.cpp2
-rw-r--r--kdecore/kmultipledrag.cpp6
-rw-r--r--kdecore/kmultipledrag.h4
-rw-r--r--kdecore/knotifyclient.cpp14
-rw-r--r--kdecore/kpalette.cpp6
-rw-r--r--kdecore/kprocctrl.cpp2
-rw-r--r--kdecore/kprocctrl.h2
-rw-r--r--kdecore/kprocess.h6
-rw-r--r--kdecore/kprocio.cpp2
-rw-r--r--kdecore/kprocio.h2
-rw-r--r--kdecore/kprotocolinfo_kdecore.cpp14
-rw-r--r--kdecore/kprotocolinfofactory.cpp2
-rw-r--r--kdecore/kqiodevicegzip_p.cpp12
-rw-r--r--kdecore/kqiodevicegzip_p.h10
-rw-r--r--kdecore/kregexp.h4
-rw-r--r--kdecore/krfcdate.cpp10
-rw-r--r--kdecore/krootprop.cpp20
-rw-r--r--kdecore/ksavefile.cpp6
-rw-r--r--kdecore/ksavefile.h2
-rw-r--r--kdecore/kshell.cpp50
-rw-r--r--kdecore/kshortcut.cpp8
-rw-r--r--kdecore/kshortcutmenu.cpp4
-rw-r--r--kdecore/ksimpleconfig.cpp2
-rw-r--r--kdecore/ksock.h8
-rw-r--r--kdecore/ksockaddr.cpp20
-rw-r--r--kdecore/ksockaddr.h6
-rw-r--r--kdecore/kstandarddirs.cpp98
-rw-r--r--kdecore/kstandarddirs.h2
-rw-r--r--kdecore/kstartupinfo.cpp120
-rw-r--r--kdecore/kstartupinfo.h7
-rw-r--r--kdecore/kstdaccel.cpp4
-rw-r--r--kdecore/kstringhandler.cpp30
-rw-r--r--kdecore/ksycoca.cpp51
-rw-r--r--kdecore/ksycoca.h6
-rw-r--r--kdecore/ksycocadict.cpp42
-rw-r--r--kdecore/ksycocadict.h8
-rw-r--r--kdecore/ksycocaentry.h4
-rw-r--r--kdecore/ksycocafactory.cpp36
-rw-r--r--kdecore/ktempdir.cpp4
-rw-r--r--kdecore/ktempfile.cpp2
-rw-r--r--kdecore/ktimezones.cpp40
-rw-r--r--kdecore/kurl.cpp72
-rw-r--r--kdecore/kurl.h10
-rw-r--r--kdecore/kurldrag.cpp10
-rw-r--r--kdecore/kurldrag.h4
-rw-r--r--kdecore/kuser.cpp4
-rw-r--r--kdecore/kvmallocator.cpp8
-rw-r--r--kdecore/kwin.cpp20
-rw-r--r--kdecore/kwinmodule.cpp12
-rw-r--r--kdecore/kwinmodule.h6
-rw-r--r--kdecore/kxmessages.cpp2
-rw-r--r--kdecore/kxmessages.h7
-rw-r--r--kdecore/libintl.cpp2
-rw-r--r--kdecore/malloc/malloc.c114
-rw-r--r--kdecore/netsupp.cpp18
-rw-r--r--kdecore/netsupp.h48
-rw-r--r--kdecore/netwm.cpp12
-rw-r--r--kdecore/network/kbufferedsocket.cpp24
-rw-r--r--kdecore/network/kbufferedsocket.h19
-rw-r--r--kdecore/network/kclientsocketbase.cpp44
-rw-r--r--kdecore/network/kclientsocketbase.h30
-rw-r--r--kdecore/network/kdatagramsocket.cpp6
-rw-r--r--kdecore/network/kdatagramsocket.h7
-rw-r--r--kdecore/network/khttpproxysocketdevice.cpp14
-rw-r--r--kdecore/network/kiobuffer.h10
-rw-r--r--kdecore/network/kresolver.cpp54
-rw-r--r--kdecore/network/kresolver.h11
-rw-r--r--kdecore/network/kresolver_p.h2
-rw-r--r--kdecore/network/kresolverstandardworkers.cpp30
-rw-r--r--kdecore/network/kresolverstandardworkers_p.h2
-rw-r--r--kdecore/network/kreverseresolver.cpp8
-rw-r--r--kdecore/network/kreverseresolver.h5
-rw-r--r--kdecore/network/kserversocket.cpp2
-rw-r--r--kdecore/network/kserversocket.h1
-rw-r--r--kdecore/network/ksocketaddress.cpp86
-rw-r--r--kdecore/network/ksocketaddress.h58
-rw-r--r--kdecore/network/ksocketbase.cpp2
-rw-r--r--kdecore/network/ksocketbase.h20
-rw-r--r--kdecore/network/ksocketbuffer.cpp32
-rw-r--r--kdecore/network/ksocketbuffer_p.h20
-rw-r--r--kdecore/network/ksocketdevice.cpp20
-rw-r--r--kdecore/network/ksocketdevice.h16
-rw-r--r--kdecore/network/ksockssocketdevice.cpp14
-rw-r--r--kdecore/network/ksockssocketdevice.h12
-rw-r--r--kdecore/network/ksrvresolverworker.cpp12
-rw-r--r--kdecore/network/ksrvresolverworker_p.h9
-rw-r--r--kdecore/network/kstreamsocket.cpp4
-rw-r--r--kdecore/network/kstreamsocket.h1
-rw-r--r--kdecore/svgicons/ksvgiconengine.cpp28
-rw-r--r--kdecore/svgicons/ksvgiconpainter.cpp92
-rw-r--r--kdecore/svgicons/ksvgiconpainter.h8
-rw-r--r--kdecore/tests/kcalendartest.cpp2
-rw-r--r--kdecore/tests/kconfigtestgui.cpp2
-rw-r--r--kdecore/tests/kconfigtestgui.h2
-rw-r--r--kdecore/tests/kipctest.h2
-rw-r--r--kdecore/tests/klocaletest.cpp28
-rw-r--r--kdecore/tests/klocaletest.h2
-rw-r--r--kdecore/tests/kmdcodectest.cpp6
-rw-r--r--kdecore/tests/kprocesstest.h2
-rw-r--r--kdecore/tests/kprociotest.h2
-rw-r--r--kdecore/tests/kresolvertest.cpp8
-rw-r--r--kdecore/tests/ktimezonestest.cpp2
191 files changed, 1998 insertions, 1917 deletions
diff --git a/kdecore/fixx11h.h b/kdecore/fixx11h.h
index e572335a1..7b8dcb3c3 100644
--- a/kdecore/fixx11h.h
+++ b/kdecore/fixx11h.h
@@ -182,14 +182,14 @@ typedef XStatus Status;
#endif
// Affects: Should be without side effects.
-#ifdef CursorShape
-#ifndef FIXX11H_CursorShape
-#define FIXX11H_CursorShape
-const int XCursorShape = CursorShape;
-#undef CursorShape
-const int CursorShape = CursorShape;
-#endif
-#undef CursorShape
+#ifdef tqCursorShape
+#ifndef FIXX11H_tqCursorShape
+#define FIXX11H_tqCursorShape
+const int XtqCursorShape = tqCursorShape;
+#undef tqCursorShape
+const int tqCursorShape = tqCursorShape;
+#endif
+#undef tqCursorShape
#endif
// template --->
diff --git a/kdecore/kaboutdata.cpp b/kdecore/kaboutdata.cpp
index 423166c18..e6aa1a68a 100644
--- a/kdecore/kaboutdata.cpp
+++ b/kdecore/kaboutdata.cpp
@@ -25,13 +25,13 @@
#include <tqfile.h>
#include <tqtextstream.h>
-QString
+TQString
KAboutPerson::name() const
{
return TQString::fromUtf8(mName);
}
-QString
+TQString
KAboutPerson::task() const
{
if (mTask && *mTask)
@@ -40,14 +40,14 @@ KAboutPerson::task() const
return TQString::null;
}
-QString
+TQString
KAboutPerson::emailAddress() const
{
return TQString::fromUtf8(mEmailAddress);
}
-QString
+TQString
KAboutPerson::webAddress() const
{
return TQString::fromUtf8(mWebAddress);
@@ -248,7 +248,7 @@ KAboutData::productName() const
return appName();
}
-QString
+TQString
KAboutData::programName() const
{
if (mProgramName && *mProgramName)
@@ -278,7 +278,7 @@ KAboutData::translateInternalProgramName() const
d->mTranslatedProgramName = qstrdup( programName().utf8());
}
-QImage
+TQImage
KAboutData::programLogo() const
{
return d->programLogo ? (*d->programLogo) : TQImage();
@@ -293,13 +293,13 @@ KAboutData::setProgramLogo(const TQImage& image)
*d->programLogo = image;
}
-QString
+TQString
KAboutData::version() const
{
- return TQString::fromLatin1(mVersion);
+ return TQString::tqfromLatin1(mVersion);
}
-QString
+TQString
KAboutData::shortDescription() const
{
if (mShortDescription && *mShortDescription)
@@ -308,16 +308,16 @@ KAboutData::shortDescription() const
return TQString::null;
}
-QString
+TQString
KAboutData::homepage() const
{
- return TQString::fromLatin1(mHomepageAddress);
+ return TQString::tqfromLatin1(mHomepageAddress);
}
-QString
+TQString
KAboutData::bugAddress() const
{
- return TQString::fromLatin1(mBugEmailAddress);
+ return TQString::tqfromLatin1(mBugEmailAddress);
}
const TQValueList<KAboutPerson>
@@ -381,7 +381,7 @@ KAboutData::translators() const
return personList;
}
-QString
+TQString
KAboutData::aboutTranslationTeam()
{
return i18n("replace this with information about your translation team",
@@ -392,7 +392,7 @@ KAboutData::aboutTranslationTeam()
);
}
-QString
+TQString
KAboutData::otherText() const
{
if (mOtherText && *mOtherText)
@@ -402,7 +402,7 @@ KAboutData::otherText() const
}
-QString
+TQString
KAboutData::license() const
{
TQString result;
@@ -465,7 +465,7 @@ KAboutData::license() const
return result;
}
-QString
+TQString
KAboutData::copyrightStatement() const
{
if (mCopyrightStatement && *mCopyrightStatement)
@@ -474,13 +474,13 @@ KAboutData::copyrightStatement() const
return TQString::null;
}
-QString
+TQString
KAboutData::customAuthorPlainText() const
{
return d->customAuthorPlainText;
}
-QString
+TQString
KAboutData::customAuthorRichText() const
{
return d->customAuthorRichText;
diff --git a/kdecore/kaccel.cpp b/kdecore/kaccel.cpp
index 5cd2195cb..81bdf6295 100644
--- a/kdecore/kaccel.cpp
+++ b/kdecore/kaccel.cpp
@@ -80,7 +80,7 @@
bool kde_g_bKillAccelOverride = false;
-class KAccelEventHandler : public QWidget
+class KAccelEventHandler : public TQWidget
{
public:
static KAccelEventHandler* self()
@@ -111,7 +111,7 @@ KAccelEventHandler::KAccelEventHandler()
{
# ifdef Q_WS_X11
if ( kapp )
- kapp->installX11EventFilter( this );
+ kapp->installX11EventFilter( TQT_TQWIDGET(this) );
# endif
}
@@ -120,10 +120,10 @@ bool qt_try_modal( TQWidget *, XEvent * );
bool KAccelEventHandler::x11Event( XEvent* pEvent )
{
- if( TQWidget::keyboardGrabber() || !kapp->focusWidget() )
+ if( TQWidget::keyboardGrabber() || !kapp->tqfocusWidget() )
return false;
- if ( !qt_try_modal(kapp->focusWidget(), pEvent) )
+ if ( !qt_try_modal(kapp->tqfocusWidget(), pEvent) )
return false;
if( pEvent->type == XKeyPress ) {
@@ -135,16 +135,16 @@ bool KAccelEventHandler::x11Event( XEvent* pEvent )
key.simplify();
int keyCodeQt = key.keyCodeQt();
int state = 0;
- if( key.modFlags() & KKey::SHIFT ) state |= Qt::ShiftButton;
- if( key.modFlags() & KKey::CTRL ) state |= Qt::ControlButton;
- if( key.modFlags() & KKey::ALT ) state |= Qt::AltButton;
- if( key.modFlags() & KKey::WIN ) state |= Qt::MetaButton;
+ if( key.modFlags() & KKey::SHIFT ) state |= TQt::ShiftButton;
+ if( key.modFlags() & KKey::CTRL ) state |= TQt::ControlButton;
+ if( key.modFlags() & KKey::ALT ) state |= TQt::AltButton;
+ if( key.modFlags() & KKey::WIN ) state |= TQt::MetaButton;
TQKeyEvent ke( TQEvent::AccelOverride, keyCodeQt, 0, state );
ke.ignore();
g_bAccelActivated = false;
- kapp->sendEvent( kapp->focusWidget(), &ke );
+ kapp->sendEvent( kapp->tqfocusWidget(), &ke );
// If the Override event was accepted from a non-KAccel widget,
// then kill the next AccelOverride in KApplication::notify.
@@ -303,7 +303,7 @@ void KAccelPrivate::slotKeyPressed( int id )
{
kdDebug(125) << "KAccelPrivate::slotKeyPressed( " << id << " )" << endl;
- if( m_mapIDToKey.contains( id ) ) {
+ if( m_mapIDToKey.tqcontains( id ) ) {
KKey key = m_mapIDToKey[id];
KKeySequence seq( key );
TQPopupMenu* pMenu = createPopupMenu( m_pWatch, seq );
@@ -357,7 +357,7 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent )
if( (*it) == keyCodeQt ) {
int nID = it.key();
kdDebug(125) << "shortcut found!" << endl;
- if( m_mapIDToAction.contains( nID ) ) {
+ if( m_mapIDToAction.tqcontains( nID ) ) {
// TODO: reduce duplication between here and slotMenuActivated
KAccelAction* pAction = m_mapIDToAction[nID];
if( !pAction->isEnabled() )
@@ -608,7 +608,7 @@ void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action
if( !pAction || s.isEmpty() )
return;
- int i = s.find( '\t' );
+ int i = s.tqfind( '\t' );
TQString k = pAction->shortcut().seq(0).toString();
if( k.isEmpty() )
diff --git a/kdecore/kaccelbase.cpp b/kdecore/kaccelbase.cpp
index 4ba4c9c3b..7f604b2b6 100644
--- a/kdecore/kaccelbase.cpp
+++ b/kdecore/kaccelbase.cpp
@@ -77,7 +77,7 @@ const KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) const
KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key )
{
- if( !m_mapKeyToAction.contains( key ) )
+ if( !m_mapKeyToAction.tqcontains( key ) )
return 0;
// Note: If more than one action is connected to a single key, nil will be returned.
return m_mapKeyToAction[key].pAction;
@@ -355,7 +355,7 @@ bool KAccelBase::updateConnections()
if( bNonUnique ) {
// Remove connection to single action if there is one
- if( m_mapKeyToAction.contains( key ) ) {
+ if( m_mapKeyToAction.tqcontains( key ) ) {
KAccelAction* pAction = m_mapKeyToAction[key].pAction;
if( pAction ) {
m_mapKeyToAction.remove( key );
@@ -378,7 +378,7 @@ bool KAccelBase::updateConnections()
const KKeyServer::Key& key = it.key();
KAccelAction* pAction = (*it).pAction;
// If this key is longer used or it points to a different action now,
- if( !mapKeyToAction.contains( key ) || mapKeyToAction[key].pAction != pAction ) {
+ if( !mapKeyToAction.tqcontains( key ) || mapKeyToAction[key].pAction != pAction ) {
if( pAction ) {
disconnectKey( *pAction, key );
pAction->decConnections();
@@ -393,7 +393,7 @@ bool KAccelBase::updateConnections()
for( KKeyToActionMap::iterator it = mapKeyToAction.begin(); it != mapKeyToAction.end(); ++it ) {
const KKeyServer::Key& key = it.key();
KAccelAction* pAction = (*it).pAction;
- if( !m_mapKeyToAction.contains( key ) || m_mapKeyToAction[key].pAction != pAction ) {
+ if( !m_mapKeyToAction.tqcontains( key ) || m_mapKeyToAction[key].pAction != pAction ) {
// TODO: Decide what to do if connect fails.
// Probably should remove this item from map.
if( pAction ) {
@@ -470,7 +470,7 @@ bool KAccelBase::insertConnection( KAccelAction* pAction )
//if( !key.isNull() ) {
if( key.sym() ) {
- if( !m_mapKeyToAction.contains( key ) ) {
+ if( !m_mapKeyToAction.tqcontains( key ) ) {
// If this is a single-key shortcut,
if( pAction->shortcut().seq(iSeq).count() == 1 ) {
m_mapKeyToAction[key] = ActionInfo( pAction, iSeq, iVari );
@@ -481,7 +481,7 @@ bool KAccelBase::insertConnection( KAccelAction* pAction )
else {
m_mapKeyToAction[key] = ActionInfo( 0, 0, 0 );
// Insert into non-unique list if it's not already there.
- if( m_rgActionsNonUnique.findIndex( pAction ) == -1 )
+ if( m_rgActionsNonUnique.tqfindIndex( pAction ) == -1 )
m_rgActionsNonUnique.append( pAction );
if( connectKey( key ) )
pAction->incConnections();
@@ -523,7 +523,7 @@ bool KAccelBase::removeConnection( KAccelAction* pAction )
//for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it )
// kdDebug(125) << "\tKey: " << it.key().toString() << " => '" << (*it)->m_sName << "'" << " " << *it << endl;
- if( m_rgActionsNonUnique.findIndex( pAction ) >= 0 ) {
+ if( m_rgActionsNonUnique.tqfindIndex( pAction ) >= 0 ) {
mtemp_pActionRemoving = pAction;
bool b = updateConnections();
mtemp_pActionRemoving = 0;
@@ -591,7 +591,7 @@ TQPopupMenu* KAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence&
// If an action has already been inserted into the menu
// and we have a label instead of an action here,
// then indicate that we should insert a separator before the next menu entry.
- if( bActionInserted && !pAction->isConfigurable() && pAction->name().contains( ':' ) )
+ if( bActionInserted && !pAction->isConfigurable() && pAction->name().tqcontains( ':' ) )
bInsertSeparator = true;
for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) {
diff --git a/kdecore/kaccelmanager.cpp b/kdecore/kaccelmanager.cpp
index 1b5ea4d24..d2f5f81f6 100644
--- a/kdecore/kaccelmanager.cpp
+++ b/kdecore/kaccelmanager.cpp
@@ -144,7 +144,7 @@ bool KAcceleratorManagerPrivate::standardName(const TQString &str)
{
if (!kaccmp_sns)
kaccmp_sns_d.setObject(kaccmp_sns, new TQStringList(KStdAction::internal_stdNames()));
- return kaccmp_sns->contains(str);
+ return kaccmp_sns->tqcontains(str);
}
KAcceleratorManagerPrivate::Item::~Item()
@@ -223,7 +223,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use
{
if (it->m_index >= 0)
{
- TQMenuItem *mitem = menuBar->findItem(menuBar->idAt(it->m_index));
+ TQMenuItem *mitem = menuBar->tqfindItem(menuBar->idAt(it->m_index));
if (mitem)
{
checkChange(contents[cnt]);
@@ -239,12 +239,12 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use
if ( dynamic_cast<TQLabel*>( it->m_widget ) && it->m_widget->inherits("KURLLabel") )
continue;
- int tprop = it->m_widget->metaObject()->findProperty("text", true);
+ int tprop = it->m_widget->tqmetaObject()->tqfindProperty("text", true);
if (tprop != -1) {
if (checkChange(contents[cnt]))
it->m_widget->setProperty("text", contents[cnt].accelerated());
} else {
- tprop = it->m_widget->metaObject()->findProperty("title", true);
+ tprop = it->m_widget->tqmetaObject()->tqfindProperty("title", true);
if (tprop != -1 && checkChange(contents[cnt]))
it->m_widget->setProperty("title", contents[cnt].accelerated());
}
@@ -265,12 +265,12 @@ void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item)
TQObjectList *childList = widget->queryList("TQWidget", 0, false, false);
for ( TQObject *it = childList->first(); it; it = childList->next() )
{
- TQWidget *w = static_cast<TQWidget*>(it);
+ TQWidget *w = TQT_TQWIDGET(it);
if ( !w->isVisibleTo( widget ) || ( w->isTopLevel() && dynamic_cast<TQPopupMenu*>(w) == NULL ) )
continue;
- if ( KAcceleratorManagerPrivate::ignored_widgets.find( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() )
+ if ( KAcceleratorManagerPrivate::ignored_widgets.tqfind( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() )
continue;
manageWidget(w, item);
@@ -320,7 +320,7 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
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" ))
+ dynamic_cast<TQSpinBox*>(w) || w->tqqt_cast( "KMultiTabBar" ))
return;
// now treat 'ordinary' widgets
@@ -340,9 +340,9 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
{
TQString content;
TQVariant variant;
- int tprop = w->metaObject()->findProperty("text", true);
+ int tprop = w->tqmetaObject()->tqfindProperty("text", true);
if (tprop != -1) {
- const TQMetaProperty* p = w->metaObject()->property( tprop, true );
+ const TQMetaProperty* p = w->tqmetaObject()->property( tprop, true );
if ( p && p->isValid() )
w->qt_property( tprop, 1, &variant );
else
@@ -350,9 +350,9 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
}
if (tprop == -1) {
- tprop = w->metaObject()->findProperty("title", true);
+ tprop = w->tqmetaObject()->tqfindProperty("title", true);
if (tprop != -1) {
- const TQMetaProperty* p = w->metaObject()->property( tprop, true );
+ const TQMetaProperty* p = w->tqmetaObject()->property( tprop, true );
if ( p && p->isValid() )
w->qt_property( tprop, 1, &variant );
}
@@ -409,7 +409,7 @@ void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item)
for (uint i=0; i<mbar->count(); ++i)
{
- mitem = mbar->findItem(mbar->idAt(i));
+ mitem = mbar->tqfindItem(mbar->idAt(i));
if (!mitem)
continue;
@@ -478,18 +478,18 @@ void KAcceleratorManager::last_manage(TQString &added, TQString &changed, TQStr
KAccelString::KAccelString(const TQString &input, int initialWeight)
: m_pureText(input), m_weight()
{
- m_orig_accel = m_pureText.find("(!)&");
+ m_orig_accel = m_pureText.tqfind("(!)&");
if (m_orig_accel != -1)
m_pureText.remove(m_orig_accel, 4);
- m_orig_accel = m_pureText.find("(&&)");
+ m_orig_accel = m_pureText.tqfind("(&&)");
if (m_orig_accel != -1)
m_pureText.replace(m_orig_accel, 4, "&");
m_origText = m_pureText;
if (m_pureText.contains('\t'))
- m_pureText = m_pureText.left(m_pureText.find('\t'));
+ m_pureText = m_pureText.left(m_pureText.tqfind('\t'));
m_orig_accel = m_accel = stripAccelerator(m_pureText);
@@ -598,7 +598,7 @@ int KAccelString::stripAccelerator(TQString &text)
while (p >= 0)
{
- p = text.find('&', p)+1;
+ p = text.tqfind('&', p)+1;
if (p <= 0 || p >= (int)text.length())
return -1;
@@ -626,7 +626,7 @@ int KAccelString::maxWeight(int &index, const TQString &used)
index = -1;
for (uint pos=0; pos<m_pureText.length(); ++pos)
- if (used.find(m_pureText[pos], 0, FALSE) == -1 && m_pureText[pos].latin1() != 0)
+ if (used.tqfind(m_pureText[pos], 0, FALSE) == -1 && m_pureText[pos].latin1() != 0)
if (m_weight[pos] > max)
{
max = m_weight[pos];
@@ -785,7 +785,7 @@ void KPopupAccelManager::findMenuEntries(KAccelStringList &list)
// read out the menu entries
for (uint i=0; i<m_popup->count(); i++)
{
- mitem = m_popup->findItem(m_popup->idAt(i));
+ mitem = m_popup->tqfindItem(m_popup->idAt(i));
if (mitem->isSeparator())
continue;
@@ -812,7 +812,7 @@ void KPopupAccelManager::setMenuEntries(const KAccelStringList &list)
uint cnt = 0;
for (uint i=0; i<m_popup->count(); i++)
{
- mitem = m_popup->findItem(m_popup->idAt(i));
+ mitem = m_popup->tqfindItem(m_popup->idAt(i));
if (mitem->isSeparator())
continue;
@@ -845,8 +845,8 @@ QWidgetStackAccelManager::QWidgetStackAccelManager(TQWidgetStack *stack)
bool QWidgetStackAccelManager::eventFilter ( TQObject * watched, TQEvent * e )
{
- if ( e->type() == TQEvent::Show && qApp->activeWindow() ) {
- KAcceleratorManager::manage( qApp->activeWindow() );
+ if ( e->type() == TQEvent::Show && tqApp->activeWindow() ) {
+ KAcceleratorManager::manage( TQT_TQWIDGET(tqApp->activeWindow()) );
watched->removeEventFilter( this );
}
return false;
diff --git a/kdecore/kaccelmanager_private.h b/kdecore/kaccelmanager_private.h
index fbb5d1857..e931b7e3e 100644
--- a/kdecore/kaccelmanager_private.h
+++ b/kdecore/kaccelmanager_private.h
@@ -131,7 +131,7 @@ class TQPopupMenu;
* @author Matthias Hoelzer-Kluepfel <mhk@kde.org>
*/
-class KPopupAccelManager : public QObject
+class KPopupAccelManager : public TQObject
{
Q_OBJECT
@@ -164,7 +164,7 @@ private:
};
-class QWidgetStackAccelManager : public QObject
+class QWidgetStackAccelManager : public TQObject
{
Q_OBJECT
diff --git a/kdecore/kallocator.cpp b/kdecore/kallocator.cpp
index c02bbf3ff..16c1b3625 100644
--- a/kdecore/kallocator.cpp
+++ b/kdecore/kallocator.cpp
@@ -183,9 +183,9 @@ void KZoneAllocator::delBlock(MemBlock *b)
void *
KZoneAllocator::allocate(size_t _size)
{
- // Use the size of (void *) as alignment
- const size_t alignment = sizeof(void *) - 1;
- _size = (_size + alignment) & ~alignment;
+ // Use the size of (void *) as tqalignment
+ const size_t tqalignment = sizeof(void *) - 1;
+ _size = (_size + tqalignment) & ~tqalignment;
if ((unsigned long) _size + blockOffset > blockSize)
{
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp
index 3dc8ca77d..bad196482 100644
--- a/kdecore/kapplication.cpp
+++ b/kdecore/kapplication.cpp
@@ -450,7 +450,7 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event)
// Indicate that the accelerator has been overridden.
if (t == TQEvent::AccelOverride)
{
- static_cast<TQKeyEvent *>(event)->accept();
+ TQT_TQKEYEVENT(event)->accept();
return true;
}
else
@@ -460,11 +460,11 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event)
if ((t == TQEvent::AccelOverride) || (t == TQEvent::KeyPress))
{
static const KShortcut& _selectAll = KStdAccel::selectAll();
- TQLineEdit *edit = tqqt_cast<TQLineEdit *>(receiver);
+ TQLineEdit *edit = ::tqqt_cast<TQLineEdit *>(receiver);
if (edit)
{
// We have a keypress for a lineedit...
- TQKeyEvent *kevent = static_cast<TQKeyEvent *>(event);
+ TQKeyEvent *kevent = TQT_TQKEYEVENT(event);
KKey key(kevent);
if (_selectAll.contains(key))
{
@@ -498,11 +498,11 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event)
}
}
- TQTextEdit *medit = tqqt_cast<TQTextEdit *>(receiver);
+ TQTextEdit *medit = ::tqqt_cast<TQTextEdit *>(receiver);
if (medit)
{
// We have a keypress for a multilineedit...
- TQKeyEvent *kevent = static_cast<TQKeyEvent *>(event);
+ TQKeyEvent *kevent = TQT_TQKEYEVENT(event);
if (_selectAll.contains(KKey(kevent)))
{
if (t == TQEvent::KeyPress)
@@ -519,9 +519,9 @@ bool KApplication::notify(TQObject *receiver, TQEvent *event)
}
if( t == TQEvent::Show && receiver->isWidgetType())
{
- TQWidget* w = static_cast< TQWidget* >( receiver );
+ TQWidget* w = TQT_TQWIDGET( receiver );
#if defined Q_WS_X11
- if( w->isTopLevel() && !startupId().isEmpty() && !static_cast<TQShowEvent*>(event)->spontaneous()) // TODO better done using window group leader?
+ if( w->isTopLevel() && !startupId().isEmpty() && !TQT_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())
@@ -901,7 +901,7 @@ void KApplication::init(bool GUIenabled)
TQMimeSourceFactory::addFactory( oldDefaultFactory );
}
- d->checkAccelerators = new KCheckAccelerators( this );
+ d->checkAccelerators = new KCheckAccelerators( TQT_TQOBJECT(this) );
}
#ifdef Q_WS_MACX
@@ -934,7 +934,7 @@ void KApplication::init(bool GUIenabled)
// save and restore the RTL setting, as installTranslator calls qt_detectRTLLanguage,
// which makes it impossible to use the -reverse cmdline switch with KDE apps
bool rtl = reverseLayout();
- installTranslator(new KDETranslator(this));
+ installTranslator(new KDETranslator(TQT_TQOBJECT(this)));
setReverseLayout( rtl );
if (i18n( "_: Dear Translator! Translate this string to the string 'LTR' in "
"left-to-right languages (as english) or to 'RTL' in right-to-left "
@@ -943,7 +943,7 @@ void KApplication::init(bool GUIenabled)
// install appdata resource type
KGlobal::dirs()->addResourceType("appdata", KStandardDirs::kde_default("data")
- + TQString::fromLatin1(name()) + '/');
+ + TQString::tqfromLatin1(name()) + '/');
pSessionConfig = 0L;
bSessionManagement = true;
@@ -1071,12 +1071,12 @@ KSessionManaged::~KSessionManaged()
sessionClients()->remove( this );
}
-bool KSessionManaged::saveState(QSessionManager&)
+bool KSessionManaged::saveState(TQSessionManager&)
{
return true;
}
-bool KSessionManaged::commitData(QSessionManager&)
+bool KSessionManaged::commitData(TQSessionManager&)
{
return true;
}
@@ -1179,9 +1179,9 @@ void KApplication::propagateSessionManager()
TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver"));
TQCString display = ::getenv(DISPLAY);
// strip the screen number from the display
- display.replace(TQRegExp("\\.[0-9]+$"), "");
+ display.tqreplace(TQRegExp("\\.[0-9]+$"), "");
int i;
- while( (i = display.find(':')) >= 0)
+ while( (i = display.tqfind(':')) >= 0)
display[i] = '_';
fName += "_"+display;
@@ -1189,7 +1189,7 @@ void KApplication::propagateSessionManager()
bool check = smEnv.isEmpty();
if ( !check && smModificationTime ) {
TQFileInfo info( fName );
- TQTime current = info.lastModified().time();
+ TQTime current = TQT_TQTIME_OBJECT(info.lastModified().time());
check = current > *smModificationTime;
}
if ( check ) {
@@ -1198,7 +1198,7 @@ void KApplication::propagateSessionManager()
if ( !f.open( IO_ReadOnly ) )
return;
TQFileInfo info ( f );
- smModificationTime = new TQTime( info.lastModified().time() );
+ smModificationTime = new TQTime( TQT_TQTIME_OBJECT(info.lastModified().time()) );
TQTextStream t(&f);
t.setEncoding( TQTextStream::Latin1 );
TQString s = t.readLine();
@@ -1208,7 +1208,7 @@ void KApplication::propagateSessionManager()
#endif
}
-void KApplication::commitData( QSessionManager& sm )
+void KApplication::commitData( TQSessionManager& sm )
{
d->session_save = true;
bool canceled = false;
@@ -1222,7 +1222,7 @@ void KApplication::commitData( QSessionManager& sm )
if ( sm.allowsInteraction() ) {
TQWidgetList done;
- TQWidgetList *list = TQApplication::topLevelWidgets();
+ TQWidgetList *list = TQApplication::tqtopLevelWidgets();
bool canceled = false;
TQWidget* w = list->first();
while ( !canceled && w ) {
@@ -1233,12 +1233,12 @@ void KApplication::commitData( QSessionManager& sm )
if ( !canceled )
done.append( w );
delete list; // one never knows...
- list = TQApplication::topLevelWidgets();
+ list = TQApplication::tqtopLevelWidgets();
w = list->first();
} else {
w = list->next();
}
- while ( w && done.containsRef( w ) )
+ while ( w && done.tqcontainsRef( w ) )
w = list->next();
}
delete list;
@@ -1246,13 +1246,13 @@ void KApplication::commitData( QSessionManager& sm )
if ( !bSessionManagement )
- sm.setRestartHint( QSessionManager::RestartNever );
+ sm.setRestartHint( TQSessionManager::RestartNever );
else
- sm.setRestartHint( QSessionManager::RestartIfRunning );
+ sm.setRestartHint( TQSessionManager::RestartIfRunning );
d->session_save = false;
}
-static void checkRestartVersion( QSessionManager& sm )
+static void checkRestartVersion( TQSessionManager& sm )
{
Display* dpy = qt_xdisplay();
Atom type;
@@ -1281,7 +1281,7 @@ static void checkRestartVersion( QSessionManager& sm )
sm.setRestartCommand( restartCommand );
}
-void KApplication::saveState( QSessionManager& sm )
+void KApplication::saveState( TQSessionManager& sm )
{
d->session_save = true;
#ifdef Q_WS_X11
@@ -1289,12 +1289,12 @@ void KApplication::saveState( QSessionManager& sm )
mySmcConnection = (SmcConn) sm.handle();
if ( !bSessionManagement ) {
- sm.setRestartHint( QSessionManager::RestartNever );
+ sm.setRestartHint( TQSessionManager::RestartNever );
d->session_save = false;
return;
}
else
- sm.setRestartHint( QSessionManager::RestartIfRunning );
+ sm.setRestartHint( TQSessionManager::RestartIfRunning );
if ( firstTime ) {
firstTime = false;
@@ -1352,7 +1352,7 @@ void KApplication::saveState( QSessionManager& sm )
discard << "rm" << locateLocal("config", sessionConfigName());
sm.setDiscardCommand( discard );
} else {
- sm.setDiscardCommand( QStringList("") );
+ sm.setDiscardCommand( TQStringList("") );
}
if ( canceled )
@@ -1380,13 +1380,13 @@ void KApplication::startKdeinit()
return; // whoever held the lock has already started dcopserver
}
// Try to launch kdeinit.
- TQString srv = KStandardDirs::findExe(TQString::fromLatin1("kdeinit"));
+ TQString srv = KStandardDirs::findExe(TQString::tqfromLatin1("kdeinit"));
if (srv.isEmpty())
- srv = KStandardDirs::findExe(TQString::fromLatin1("kdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir());
+ srv = KStandardDirs::findExe(TQString::tqfromLatin1("kdeinit"), KGlobal::dirs()->kfsstnd_defaultbindir());
if (srv.isEmpty())
return;
if (kapp && (Tty != kapp->type()))
- setOverrideCursor( Qt::waitCursor );
+ setOverrideCursor( tqwaitCursor );
my_system(TQFile::encodeName(srv)+" --suicide"+" --new-startup");
if (kapp && (Tty != kapp->type()))
restoreOverrideCursor();
@@ -1521,7 +1521,7 @@ void KApplication::parseCommandLine( )
}
if (d->overrideStyle.isEmpty())
- fprintf(stderr, "%s", i18n("The style %1 was not found\n").arg(reqStyle).local8Bit().data());
+ fprintf(stderr, "%s", TQString(i18n("The style %1 was not found\n").arg(reqStyle)).local8Bit().data());
}
if (args->isSet("caption"))
@@ -1883,13 +1883,13 @@ void KApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigned
void KApplication::invokeEditSlot( const char *slot )
{
- TQObject *object = focusWidget();
+ TQObject *object = TQT_TQOBJECT(tqfocusWidget());
if( !object )
return;
- TQMetaObject *meta = object->metaObject();
+ TQMetaObject *meta = object->tqmetaObject();
- int idx = meta->findSlot( slot + 1, true );
+ int idx = meta->tqfindSlot( slot + 1, true );
if( idx < 0 )
return;
@@ -2105,7 +2105,7 @@ void KApplication::kdisplaySetPalette()
return;
}
#endif
- TQApplication::setPalette( createApplicationPalette(), true);
+ TQApplication::tqsetPalette( createApplicationPalette(), true);
emit kdisplayPaletteChanged();
emit appearanceChanged();
}
@@ -2113,10 +2113,10 @@ void KApplication::kdisplaySetPalette()
void KApplication::kdisplaySetFont()
{
- TQApplication::setFont(KGlobalSettings::generalFont(), true);
- TQApplication::setFont(KGlobalSettings::menuFont(), true, "TQMenuBar");
- TQApplication::setFont(KGlobalSettings::menuFont(), true, "TQPopupMenu");
- TQApplication::setFont(KGlobalSettings::menuFont(), true, "KPopupTitle");
+ TQApplication::tqsetFont(KGlobalSettings::generalFont(), true);
+ TQApplication::tqsetFont(KGlobalSettings::menuFont(), true, "TQMenuBar");
+ TQApplication::tqsetFont(KGlobalSettings::menuFont(), true, "TQPopupMenu");
+ TQApplication::tqsetFont(KGlobalSettings::menuFont(), true, "KPopupTitle");
// "patch" standard TQStyleSheet to follow our fonts
TQStyleSheet* sheet = TQStyleSheet::defaultSheet();
@@ -2452,10 +2452,10 @@ void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const
TQString command = config.readPathEntry("EmailClient");
TQString to, cc, bcc;
- if (command.isEmpty() || command == TQString::fromLatin1("kmail")
+ if (command.isEmpty() || command == TQString::tqfromLatin1("kmail")
|| command.endsWith("/kmail"))
{
- command = TQString::fromLatin1("kmail --composer -s %s -c %c -b %b --body %B --attach %A -- %t");
+ command = TQString::tqfromLatin1("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
@@ -2826,7 +2826,7 @@ TQString KApplication::tempSaveName( const TQString& pFilename ) const
}
}
- aFilename.replace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() );
+ aFilename.tqreplace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() );
return aFilename;
}
@@ -2855,7 +2855,7 @@ TQString KApplication::checkRecoverFile( const TQString& pFilename,
}
}
- aFilename.replace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() );
+ aFilename.tqreplace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() );
if( TQFile( aFilename ).exists() )
{
@@ -2888,7 +2888,7 @@ bool checkAccess(const TQString& pathname, int mode)
//strip the filename (everything until '/' from the end
TQString dirName(pathname);
- int pos = dirName.findRev('/');
+ int pos = dirName.tqfindRev('/');
if ( pos == -1 )
return false; // No path in argument. This is evil, we won't allow this
else if ( pos == 0 ) // don't turn e.g. /root into an empty string
@@ -3103,18 +3103,18 @@ void KApplication::initUrlActionRestrictions()
bool bEnabled = (strEnabled == "true");
if (refPath.startsWith("$HOME"))
- refPath.replace(0, 5, TQDir::homeDirPath());
+ refPath.tqreplace(0, 5, TQDir::homeDirPath());
else if (refPath.startsWith("~"))
- refPath.replace(0, 1, TQDir::homeDirPath());
+ refPath.tqreplace(0, 1, TQDir::homeDirPath());
if (urlPath.startsWith("$HOME"))
- urlPath.replace(0, 5, TQDir::homeDirPath());
+ urlPath.tqreplace(0, 5, TQDir::homeDirPath());
else if (urlPath.startsWith("~"))
- urlPath.replace(0, 1, TQDir::homeDirPath());
+ urlPath.tqreplace(0, 1, TQDir::homeDirPath());
if (refPath.startsWith("$TMP"))
- refPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp"));
+ refPath.tqreplace(0, 4, KGlobal::dirs()->saveLocation("tmp"));
if (urlPath.startsWith("$TMP"))
- urlPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp"));
+ urlPath.tqreplace(0, 4, KGlobal::dirs()->saveLocation("tmp"));
d->urlActionRestrictions.append(new KApplicationPrivate::URLActionRule
( action, refProt, refHost, refPath, urlProt, urlHost, urlPath, bEnabled));
diff --git a/kdecore/kapplication.h b/kdecore/kapplication.h
index dd89de131..93820b68d 100644
--- a/kdecore/kapplication.h
+++ b/kdecore/kapplication.h
@@ -30,6 +30,8 @@ class KCharsets;
class DCOPClient;
class DCOPObject;
+#include <tqtglobaldefines.h>
+
typedef unsigned long Atom;
#if !defined(Q_WS_X11)
typedef void Display;
@@ -214,7 +216,7 @@ public:
/**
* Returns the current application object.
*
- * This is similar to the global TQApplication pointer qApp. It
+ * This is similar to the global TQApplication pointer tqApp. 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
@@ -364,14 +366,14 @@ public:
* handling of session management with KSessionManaged.
* @internal
*/
- void commitData( QSessionManager& sm );
+ void commitData( TQSessionManager& sm );
/**
* Reimplemented for internal purposes, mainly the highlevel
* handling of session management with KSessionManaged.
* @internal
*/
- void saveState( QSessionManager& sm );
+ void saveState( TQSessionManager& sm );
/**
* Returns true if the application is currently saving its session
@@ -1467,7 +1469,7 @@ public:
indicate a problem and to halt the shutdown process (will
implicitly call sm.cancel() ).
*/
- virtual bool saveState( QSessionManager& sm );
+ virtual bool saveState( TQSessionManager& sm );
/**
See TQApplication::commitData() for documentation.
@@ -1477,7 +1479,7 @@ public:
indicate a problem and to halt the shutdown process (will
implicitly call sm.cancel() ).
*/
- virtual bool commitData( QSessionManager& sm );
+ virtual bool commitData( TQSessionManager& sm );
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kdecore/kasyncio.h b/kdecore/kasyncio.h
index a96e30cd8..ad2fe1e30 100644
--- a/kdecore/kasyncio.h
+++ b/kdecore/kasyncio.h
@@ -25,6 +25,10 @@
#include <tqiodevice.h>
#include "kdelibs_export.h"
+#ifdef Q_MOC_RUN
+#define USE_QT4
+#endif // Q_MOC_RUN
+
class KAsyncIOPrivate;
/**
* Asynchronous I/O Support
@@ -35,9 +39,15 @@ class KAsyncIOPrivate;
* @author Thiago Macieira <thiago.macieira@kdemail.net>
* @short Asynchronous I/O support
*/
-class KDECORE_EXPORT KAsyncIO: public TQObject, public QIODevice
+class KDECORE_EXPORT KAsyncIO:
+#ifdef USE_QT4
+#else // USE_QT4
+public TQObject,
+#endif // USE_QT4
+public TQIODevice
{
Q_OBJECT
+ TQ_OBJECT
protected:
KAsyncIO() // cannot be accessed externally
{ }
diff --git a/kdecore/kbufferedio.h b/kdecore/kbufferedio.h
index 234034d87..abdb68f80 100644
--- a/kdecore/kbufferedio.h
+++ b/kdecore/kbufferedio.h
@@ -56,6 +56,7 @@ class KBufferedIOPrivate;
class KDECORE_EXPORT KBufferedIO: public KAsyncIO
{
Q_OBJECT
+ TQ_OBJECT
protected:
// no default public constructor
diff --git a/kdecore/kcalendarsystemfactory.h b/kdecore/kcalendarsystemfactory.h
index ec68124d7..0ceae43b9 100644
--- a/kdecore/kcalendarsystemfactory.h
+++ b/kdecore/kcalendarsystemfactory.h
@@ -49,7 +49,7 @@ public:
* 0 is specified.
* @return a KCalendarSystem object
*/
- static KCalendarSystem *create (const TQString & calType = TQString::fromLatin1("gregorian"),
+ static KCalendarSystem *create (const TQString & calType = TQString::tqfromLatin1("gregorian"),
const KLocale * locale = 0);
/**
diff --git a/kdecore/kcalendarsystemgregorian.cpp b/kdecore/kcalendarsystemgregorian.cpp
index 26a366fd6..19f9b3dc8 100644
--- a/kdecore/kcalendarsystemgregorian.cpp
+++ b/kdecore/kcalendarsystemgregorian.cpp
@@ -58,7 +58,7 @@ int KCalendarSystemGregorian::weeksInYear(int year) const
// If the last day of the year is in the first week, we have to check the
// week before
if ( temp.weekNumber() == 1 )
- temp = temp.addDays(-7);
+ temp = TQT_TQDATE_OBJECT(temp.addDays(-7));
return temp.weekNumber();
}
@@ -221,17 +221,17 @@ bool KCalendarSystemGregorian::setYMD(TQDate & date, int y, int m, int d) const
TQDate KCalendarSystemGregorian::addYears(const TQDate & date, int nyears) const
{
- return date.addYears(nyears);
+ return TQT_TQDATE_OBJECT(date.addYears(nyears));
}
TQDate KCalendarSystemGregorian::addMonths(const TQDate & date, int nmonths) const
{
- return date.addMonths(nmonths);
+ return TQT_TQDATE_OBJECT(date.addMonths(nmonths));
}
TQDate KCalendarSystemGregorian::addDays(const TQDate & date, int ndays) const
{
- return date.addDays(ndays);
+ return TQT_TQDATE_OBJECT(date.addDays(ndays));
}
TQString KCalendarSystemGregorian::weekDayName(int col, bool shortName) const
@@ -295,7 +295,7 @@ int KCalendarSystemGregorian::weekDayOfPray() const
TQString KCalendarSystemGregorian::calendarName() const
{
- return TQString::fromLatin1("gregorian");
+ return TQString::tqfromLatin1("gregorian");
}
bool KCalendarSystemGregorian::isLunar() const
diff --git a/kdecore/kcalendarsystemhebrew.cpp b/kdecore/kcalendarsystemhebrew.cpp
index ec39fc9ca..710e027d1 100644
--- a/kdecore/kcalendarsystemhebrew.cpp
+++ b/kdecore/kcalendarsystemhebrew.cpp
@@ -306,7 +306,7 @@ int KCalendarSystemHebrew::weeksInYear(int year) const
int nWeekNumber = weekNumber(temp);
if(nWeekNumber == 1) // last week belongs to next year
{
- temp = temp.addDays(-7);
+ temp = TQT_TQDATE_OBJECT(temp.addDays(-7));
nWeekNumber = weekNumber(temp);
}
@@ -574,7 +574,7 @@ int KCalendarSystemHebrew::weekDayOfPray() const
// Ok
TQDate KCalendarSystemHebrew::addDays( const TQDate & date, int ndays ) const
{
- return date.addDays( ndays );
+ return TQT_TQDATE_OBJECT(date.addDays( ndays ));
}
// Ok
@@ -614,7 +614,7 @@ TQDate KCalendarSystemHebrew::addYears( const TQDate & date, int nyears ) const
// Ok
TQString KCalendarSystemHebrew::calendarName() const
{
- return TQString::fromLatin1("hebrew");
+ return TQString::tqfromLatin1("hebrew");
}
// Ok
@@ -640,7 +640,7 @@ TQString KCalendarSystemHebrew::dayString(const TQDate & pDate, bool bShort) con
TQString sResult;
// Only use hebrew numbers if the hebrew setting is selected
- if (locale()->language() == TQString::fromLatin1("he"))
+ if (locale()->language() == TQString::tqfromLatin1("he"))
sResult = num2heb(day(pDate), false);
else
sResult = KCalendarSystem::dayString(pDate, bShort);
@@ -653,7 +653,7 @@ TQString KCalendarSystemHebrew::yearString(const TQDate & pDate, bool bShort) co
TQString sResult;
// Only use hebrew numbers if the hebrew setting is selected
- if (locale()->language() == TQString::fromLatin1("he"))
+ if (locale()->language() == TQString::tqfromLatin1("he"))
sResult = num2heb(year(pDate), !bShort);
else
sResult = KCalendarSystem::yearString(pDate, bShort);
@@ -684,9 +684,9 @@ static int heb2num(const TQString& str, int & iLength) {
{
if (s.length() > pos && s[pos + 1] >= TQChar(0x05D0) &&
s[pos + 1] <= TQChar(0x05EA))
- result += (c.unicode() - 0x05D0 + 1) * 1000;
+ result += (c.tqunicode() - 0x05D0 + 1) * 1000;
else
- result += c.unicode() - 0x05D0 + 1;
+ result += c.tqunicode() - 0x05D0 + 1;
}
else if (c == TQChar(0x05D8))
{
@@ -702,11 +702,11 @@ static int heb2num(const TQString& str, int & iLength) {
if (s.length() > pos && s[pos + 1] >= TQChar(0x05D9))
return -1;
else
- result += decadeValues[c.unicode() - 0x05D9];
+ result += decadeValues[c.tqunicode() - 0x05D9];
}
else if (c >= TQChar(0x05E7) && c <= TQChar(0x05EA))
{
- result += (c.unicode() - 0x05E7 + 1) * 100;
+ result += (c.tqunicode() - 0x05E7 + 1) * 100;
}
else
{
diff --git a/kdecore/kcalendarsystemhijri.cpp b/kdecore/kcalendarsystemhijri.cpp
index 8eb403685..90faec48e 100644
--- a/kdecore/kcalendarsystemhijri.cpp
+++ b/kdecore/kcalendarsystemhijri.cpp
@@ -539,7 +539,7 @@ int KCalendarSystemHijri::weekDayOfPray() const
TQDate KCalendarSystemHijri::addDays( const TQDate & date, int ndays ) const
{
- return date.addDays( ndays );
+ return TQT_TQDATE_OBJECT(date.addDays( ndays ));
}
TQDate KCalendarSystemHijri::addMonths( const TQDate & date, int nmonths ) const
@@ -577,7 +577,7 @@ TQDate KCalendarSystemHijri::addYears( const TQDate & date, int nyears ) const
TQString KCalendarSystemHijri::calendarName() const
{
- return TQString::fromLatin1("hijri");
+ return TQString::tqfromLatin1("hijri");
}
bool KCalendarSystemHijri::isLunar() const
diff --git a/kdecore/kcalendarsystemjalali.cpp b/kdecore/kcalendarsystemjalali.cpp
index 8915c585a..6197ca75f 100644
--- a/kdecore/kcalendarsystemjalali.cpp
+++ b/kdecore/kcalendarsystemjalali.cpp
@@ -304,7 +304,7 @@ TQDate KCalendarSystemJalali::addMonths( const TQDate & date, int nmonths ) cons
TQDate KCalendarSystemJalali::addDays( const TQDate & date, int ndays ) const
{
- return date.addDays( ndays );
+ return TQT_TQDATE_OBJECT(date.addDays( ndays ));
}
int KCalendarSystemJalali::monthsInYear( const TQDate & date ) const
@@ -541,7 +541,7 @@ int KCalendarSystemJalali::weekDayOfPray() const
}
TQString KCalendarSystemJalali::calendarName() const
{
- return TQString::fromLatin1("jalali");
+ return TQString::tqfromLatin1("jalali");
}
bool KCalendarSystemJalali::isLunar() const
diff --git a/kdecore/kcatalogue.cpp b/kdecore/kcatalogue.cpp
index 3669b40b4..764cd4618 100644
--- a/kdecore/kcatalogue.cpp
+++ b/kdecore/kcatalogue.cpp
@@ -62,7 +62,7 @@ KCatalogue::KCatalogue(const TQString & name, const TQString & language )
// has to be set after we have the first catalog objects.
d->pluralType = -1;
- TQString path = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo")
+ TQString path = TQString::tqfromLatin1("%1/LC_MESSAGES/%2.mo")
.arg( d->language )
.arg( d->name );
diff --git a/kdecore/kcharsets.cpp b/kdecore/kcharsets.cpp
index 52cf87849..027dba367 100644
--- a/kdecore/kcharsets.cpp
+++ b/kdecore/kcharsets.cpp
@@ -202,7 +202,7 @@ static struct Builtin
{ "ascii", "iso 8859-1" },
{ "x-utf-8", "utf-8" },
{ "x-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt
- { "unicode-1-1-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt
+ { "tqunicode-1-1-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt
{ "utf-16", "iso-10646-ucs-2" },
{ "utf16", "iso-10646-ucs-2" },
{ "ucs2", "iso-10646-ucs-2" },
@@ -381,11 +381,11 @@ TQChar KCharsets::fromEntity(const TQString &str)
if (str[pos] == (QChar)'x' || str[pos] == (QChar)'X') {
pos++;
// '&#x0000', hexadeciaml character reference
- TQString tmp(str.unicode()+pos, str.length()-pos);
+ TQString tmp(str.tqunicode()+pos, str.length()-pos);
res = tmp.toInt(&ok, 16);
} else {
// '&#0000', decimal character reference
- TQString tmp(str.unicode()+pos, str.length()-pos);
+ TQString tmp(str.tqunicode()+pos, str.length()-pos);
res = tmp.toInt(&ok, 10);
}
return res;
@@ -422,14 +422,14 @@ TQChar KCharsets::fromEntity(const TQString &str, int &len)
TQString KCharsets::toEntity(const TQChar &ch)
{
TQString ent;
- ent.sprintf("&#0x%x;", ch.unicode());
+ ent.sprintf("&#0x%x;", ch.tqunicode());
return ent;
}
TQString KCharsets::resolveEntities( const TQString &input )
{
TQString text = input;
- const TQChar *p = text.unicode();
+ const TQChar *p = text.tqunicode();
const TQChar *end = p + text.length();
const TQChar *ampersand = 0;
bool scanForSemicolon = false;
@@ -460,12 +460,12 @@ TQString KCharsets::resolveEntities( const TQString &input )
if ( entityValue.isNull() )
continue;
- const uint ampersandPos = ampersand - text.unicode();
+ const uint ampersandPos = ampersand - text.tqunicode();
text[ (int)ampersandPos ] = entityValue;
text.remove( ampersandPos + 1, entityLength + 1 );
- p = text.unicode() + ampersandPos;
- end = text.unicode() + text.length();
+ p = text.tqunicode() + ampersandPos;
+ end = text.tqunicode() + text.length();
ampersand = 0;
}
@@ -477,7 +477,7 @@ TQStringList KCharsets::availableEncodingNames()
TQStringList available;
for ( const char* const* pos = charsets_for_encoding; *pos; ++pos ) {
//kdDebug(0) << *charsets << " available" << endl;
- available.append( TQString::fromLatin1( *pos ));
+ available.append( TQString::tqfromLatin1( *pos ));
}
return available;
}
@@ -491,14 +491,14 @@ TQString KCharsets::languageForEncoding( const TQString &encoding )
TQString KCharsets::encodingForName( const TQString &descriptiveName )
{
- const int left = descriptiveName.findRev( '(' );
+ const int left = descriptiveName.tqfindRev( '(' );
if (left<0) // No parenthesis, so assume it is a normal encoding name
return descriptiveName.stripWhiteSpace();
TQString name(descriptiveName.mid(left+1));
- const int right = name.findRev( ')' );
+ const int right = name.tqfindRev( ')' );
if (right<0)
return name;
@@ -511,7 +511,7 @@ TQStringList KCharsets::descriptiveEncodingNames()
// As we are sorting, we can directly read the array language_for_encoding
TQStringList encodings;
for ( const LanguageForEncoding* pos = language_for_encoding; pos->index; ++pos ) {
- const TQString name = TQString::fromLatin1( pos->index );
+ const TQString name = TQString::tqfromLatin1( pos->index );
const TQString description = i18n( language_names[ pos->data ] );
encodings.append( i18n("Descriptive Encoding Name", "%1 ( %2 )"). arg ( description ). arg( name ) );
}
@@ -536,7 +536,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const
if (n.isEmpty()) {
codec = KGlobal::locale()->codecForEncoding();
- d->codecForNameDict.replace("->locale<-", codec);
+ d->codecForNameDict.tqreplace("->locale<-", codec);
return codec;
}
@@ -553,7 +553,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const
codec = TQTextCodec::codecForName(name);
if(codec) {
- d->codecForNameDict.replace(key, codec);
+ d->codecForNameDict.tqreplace(key, codec);
return codec;
}
@@ -566,14 +566,14 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const
if(codec)
{
- d->codecForNameDict.replace(key, codec);
+ d->codecForNameDict.tqreplace(key, codec);
return codec;
}
TQString dir;
{
KConfigGroupSaver cfgsav( KGlobal::config(), "i18n" );
- dir = KGlobal::config()->readPathEntry("i18ndir", TQString::fromLatin1("/usr/share/i18n/charmaps"));
+ dir = KGlobal::config()->readPathEntry("i18ndir", TQString::tqfromLatin1("/usr/share/i18n/charmaps"));
}
// these are codecs not included in Qt. They can be build up if the corresponding charmap
@@ -584,7 +584,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const
cname = name;
cname = cname.upper();
- const TQString basicName = TQString::fromLatin1(cname);
+ const TQString basicName = TQString::tqfromLatin1(cname);
kdDebug() << k_funcinfo << endl << " Trying to find " << cname << " in " << dir << endl;
TQString charMapFileName;
@@ -642,7 +642,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const
}
if(codec) {
- d->codecForNameDict.replace(key, codec);
+ d->codecForNameDict.tqreplace(key, codec);
return codec;
}
@@ -654,7 +654,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const
codec = TQTextCodec::codecForName(cname);
if(codec) {
- d->codecForNameDict.replace(key, codec);
+ d->codecForNameDict.tqreplace(key, codec);
return codec;
}
diff --git a/kdecore/kcheckaccelerators.cpp b/kdecore/kcheckaccelerators.cpp
index 7b1d3621b..06337485c 100644
--- a/kdecore/kcheckaccelerators.cpp
+++ b/kdecore/kcheckaccelerators.cpp
@@ -99,11 +99,11 @@ bool KCheckAccelerators::eventFilter( TQObject * , TQEvent * e)
switch ( e->type() ) { // just simplify debuggin
case TQEvent::Accel:
- if ( key && (static_cast<TQKeyEvent *>(e)->key() == key) ) {
+ if ( key && (TQT_TQKEYEVENT(e)->key() == key) ) {
block = true;
checkAccelerators( false );
block = false;
- static_cast<TQKeyEvent *>(e)->accept();
+ TQT_TQKEYEVENT(e)->accept();
return true;
}
break;
@@ -144,7 +144,7 @@ void KCheckAccelerators::createDialog(TQWidget *actWin, bool automatic)
if ( drklash )
return;
- drklash = new TQDialog( actWin, "kapp_accel_check_dlg", false, Qt::WDestructiveClose);
+ drklash = new TQDialog( actWin, "kapp_accel_check_dlg", false, (WFlags)TQt::WDestructiveClose);
drklash->setCaption( i18n( "Dr. Klash' Accelerator Diagnosis" ));
drklash->resize( 500, 460 );
TQVBoxLayout* layout = new TQVBoxLayout( drklash, 11, 6 );
@@ -173,7 +173,7 @@ void KCheckAccelerators::slotDisableCheck(bool on)
void KCheckAccelerators::checkAccelerators( bool automatic )
{
- TQWidget* actWin = qApp->activeWindow();
+ TQWidget* actWin = TQT_TQWIDGET(tqApp->activeWindow());
if ( !actWin )
return;
diff --git a/kdecore/kcheckaccelerators.h b/kdecore/kcheckaccelerators.h
index f6a5b7223..6a9439be6 100644
--- a/kdecore/kcheckaccelerators.h
+++ b/kdecore/kcheckaccelerators.h
@@ -63,7 +63,7 @@ class TQTextView;
there are shown all conflicts grouped by accelerator, and a list of all used
accelerators.
*/
-class KDECORE_EXPORT KCheckAccelerators : public QObject
+class KDECORE_EXPORT KCheckAccelerators : public TQObject
{
Q_OBJECT
public:
diff --git a/kdecore/kclipboard.cpp b/kdecore/kclipboard.cpp
index 50073cc6a..244b43541 100644
--- a/kdecore/kclipboard.cpp
+++ b/kdecore/kclipboard.cpp
@@ -38,7 +38,7 @@
* especially the second one.
*/
-class KClipboardSynchronizer::MimeSource : public QMimeSource
+class KClipboardSynchronizer::MimeSource : public TQMimeSource
{
public:
MimeSource( const TQMimeSource * src )
@@ -56,7 +56,7 @@ public:
while ( (format = src->format( i++ )) )
{
byteArray = new TQByteArray();
- *byteArray = src->encodedData( format ).copy();
+ *byteArray = src->tqencodedData( format ).copy();
m_data.append( byteArray );
m_formats.append( format );
}
@@ -72,11 +72,11 @@ public:
return 0L;
}
virtual bool provides( const char *mimeType ) const {
- return ( m_formats.find( mimeType ) > -1 );
+ return ( m_formats.tqfind( mimeType ) > -1 );
}
- virtual TQByteArray encodedData( const char *format ) const
+ virtual TQByteArray tqencodedData( const char *format ) const
{
- int index = m_formats.find( format );
+ int index = m_formats.tqfind( format );
if ( index > -1 )
return *(m_data.at( index ));
@@ -97,7 +97,7 @@ bool KClipboardSynchronizer::s_blocked = false;
KClipboardSynchronizer * KClipboardSynchronizer::self()
{
if ( !s_self )
- s_self = new KClipboardSynchronizer( kapp, "KDE Clipboard" );
+ s_self = new KClipboardSynchronizer( TQT_TQOBJECT(kapp), "KDE Clipboard" );
return s_self;
}
@@ -123,7 +123,7 @@ KClipboardSynchronizer::~KClipboardSynchronizer()
void KClipboardSynchronizer::setupSignals()
{
- QClipboard *clip = TQApplication::clipboard();
+ TQClipboard *clip = TQApplication::tqclipboard();
disconnect( clip, NULL, this, NULL );
if( s_sync )
connect( clip, TQT_SIGNAL( selectionChanged() ),
@@ -135,43 +135,43 @@ void KClipboardSynchronizer::setupSignals()
void KClipboardSynchronizer::slotSelectionChanged()
{
- QClipboard *clip = TQApplication::clipboard();
+ TQClipboard *clip = TQApplication::tqclipboard();
// qDebug("*** sel changed: %i", s_blocked);
if ( s_blocked || !clip->ownsSelection() )
return;
- setClipboard( new MimeSource( clip->data( QClipboard::Selection) ),
- QClipboard::Clipboard );
+ setClipboard( new MimeSource( clip->data( TQClipboard::Selection) ),
+ TQClipboard::Clipboard );
}
void KClipboardSynchronizer::slotClipboardChanged()
{
- QClipboard *clip = TQApplication::clipboard();
+ TQClipboard *clip = TQApplication::tqclipboard();
// qDebug("*** clip changed : %i (implicit: %i, ownz: clip: %i, selection: %i)", s_blocked, s_implicitSelection, clip->ownsClipboard(), clip->ownsSelection());
if ( s_blocked || !clip->ownsClipboard() )
return;
- setClipboard( new MimeSource( clip->data( QClipboard::Clipboard ) ),
- QClipboard::Selection );
+ setClipboard( new MimeSource( clip->data( TQClipboard::Clipboard ) ),
+ TQClipboard::Selection );
}
-void KClipboardSynchronizer::setClipboard( TQMimeSource *data, QClipboard::Mode mode )
+void KClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode mode )
{
// qDebug("---> setting clipboard: %p", data);
- QClipboard *clip = TQApplication::clipboard();
+ TQClipboard *clip = TQApplication::tqclipboard();
s_blocked = true;
- if ( mode == QClipboard::Clipboard )
+ if ( mode == TQClipboard::Clipboard )
{
- clip->setData( data, QClipboard::Clipboard );
+ clip->setData( data, TQClipboard::Clipboard );
}
- else if ( mode == QClipboard::Selection )
+ else if ( mode == TQClipboard::Selection )
{
- clip->setData( data, QClipboard::Selection );
+ clip->setData( data, TQClipboard::Selection );
}
s_blocked = false;
diff --git a/kdecore/kclipboard.h b/kdecore/kclipboard.h
index 593164f54..aecfccf52 100644
--- a/kdecore/kclipboard.h
+++ b/kdecore/kclipboard.h
@@ -33,7 +33,7 @@
* @since 3.1
* @internal
*/
-class KDECORE_EXPORT KClipboardSynchronizer : public QObject
+class KDECORE_EXPORT KClipboardSynchronizer : public TQObject
{
Q_OBJECT
diff --git a/kdecore/kcmdlineargs.cpp b/kdecore/kcmdlineargs.cpp
index 9600da39c..7219163a8 100644
--- a/kdecore/kcmdlineargs.cpp
+++ b/kdecore/kcmdlineargs.cpp
@@ -393,7 +393,7 @@ findOption(const KCmdLineOptions *options, TQCString &opt,
if (!options->name)
return result+0;
TQCString nextOption = options->name;
- int p = nextOption.find(' ');
+ int p = nextOption.tqfind(' ');
if (p > 0)
nextOption = nextOption.left(p);
if (nextOption[0] == '!')
@@ -432,7 +432,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled,
const char *opt_name;
const char *def;
TQCString argument;
- int j = opt.find('=');
+ int j = opt.tqfind('=');
if (j != -1)
{
argument = opt.mid(j+1);
@@ -858,7 +858,7 @@ KCmdLineArgs::usage(const char *id)
bool hasOptions = false;
TQString optionsHeader;
if (args->name)
- optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(TQString::fromLatin1(args->name)));
+ optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(TQString::tqfromLatin1(args->name)));
else
optionsHeader = i18n("\nOptions:\n");
@@ -1081,9 +1081,9 @@ KCmdLineArgs::setOption(const TQCString &opt, bool enabled)
}
if (enabled)
- parsedOptionList->replace( opt, new TQCString("t") );
+ parsedOptionList->tqreplace( opt, new TQCString("t") );
else
- parsedOptionList->replace( opt, new TQCString("f") );
+ parsedOptionList->tqreplace( opt, new TQCString("f") );
}
void
@@ -1119,7 +1119,7 @@ KCmdLineArgs::getOption(const char *_opt) const
TQCString *value = 0;
if (parsedOptionList)
{
- value = parsedOptionList->find(_opt);
+ value = parsedOptionList->tqfind(_opt);
}
if (value)
@@ -1199,7 +1199,7 @@ KCmdLineArgs::isSet(const char *_opt) const
TQCString *value = 0;
if (parsedOptionList)
{
- value = parsedOptionList->find(opt);
+ value = parsedOptionList->tqfind(opt);
}
if (value)
diff --git a/kdecore/kcompletion.cpp b/kdecore/kcompletion.cpp
index 84a4cfca2..2876e9138 100644
--- a/kdecore/kcompletion.cpp
+++ b/kdecore/kcompletion.cpp
@@ -150,7 +150,7 @@ void KCompletion::addWeightedItem( const TQString& item )
uint weight = 0;
// find out the weighting of this item (appended to the string as ":num")
- int index = item.findRev(':');
+ int index = item.tqfindRev(':');
if ( index > 0 ) {
bool ok;
weight = item.mid( index + 1 ).toUInt( &ok );
@@ -274,7 +274,7 @@ TQStringList KCompletion::substringCompletion( const TQString& string ) const
for( ; it != list.end(); ++it ) {
TQString item = *it;
- if ( item.find( string, 0, false ) != -1 ) { // always case insensitive
+ if ( item.tqfind( string, 0, false ) != -1 ) { // always case insensitive
matches.append( item );
}
}
@@ -463,7 +463,7 @@ TQString KCompletion::findCompletion( const TQString& string )
uint weight = temp_node->weight();
const KCompTreeNode* hit = temp_node;
for( int i = 1; i < count; i++ ) {
- temp_node = node->childAt(i);
+ temp_node = node->tqchildAt(i);
if( temp_node->weight() > weight ) {
hit = temp_node;
weight = hit->weight();
@@ -628,19 +628,19 @@ void KCompletion::doBeep( BeepMode mode ) const
switch ( mode ) {
case Rotation:
- event = TQString::fromLatin1("Textcompletion: rotation");
+ event = TQString::tqfromLatin1("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 = TQString::fromLatin1("Textcompletion: partial match");
+ event = TQString::tqfromLatin1("Textcompletion: partial match");
text = i18n("The completion is ambiguous, more than one\nmatch is available.\n");
}
break;
case NoMatch:
if ( myCompletionMode == KGlobalSettings::CompletionShell ) {
- event = TQString::fromLatin1("Textcompletion: no match");
+ event = TQString::tqfromLatin1("Textcompletion: no match");
text = i18n("There is no matching item available.\n");
}
break;
diff --git a/kdecore/kcompletion.h b/kdecore/kcompletion.h
index 95198cdb0..f6c8f0f82 100644
--- a/kdecore/kcompletion.h
+++ b/kdecore/kcompletion.h
@@ -119,7 +119,7 @@ class TQPopupMenu;
* tell the user) where a completion comes from.
*
* Note: KCompletion does not work with strings that contain 0x0 characters
- * (unicode nul), as this is used internally as a delimiter.
+ * (tqunicode nul), as this is used internally as a delimiter.
*
* You may inherit from KCompletion and override makeCompletion() in
* special cases (like reading directories/urls and then supplying the
@@ -129,7 +129,7 @@ class TQPopupMenu;
*
* @author Carsten Pfeiffer <pfeiffer@kde.org>
*/
-class KDECORE_EXPORT KCompletion : public QObject
+class KDECORE_EXPORT KCompletion : public TQObject
{
Q_ENUMS( CompOrder )
Q_PROPERTY( CompOrder order READ order WRITE setOrder )
diff --git a/kdecore/kcompletion_private.h b/kdecore/kcompletion_private.h
index 35c846593..f4363ae95 100644
--- a/kdecore/kcompletion_private.h
+++ b/kdecore/kcompletion_private.h
@@ -81,7 +81,7 @@ typedef KCompTreeNodeList KCompTreeChildren;
* @author Carsten Pfeiffer <pfeiffer@kde.org>
* @internal
*/
-class KDECORE_EXPORT KCompTreeNode : public QChar
+class KDECORE_EXPORT KCompTreeNode : public TQChar
{
public:
KCompTreeNode() : TQChar(), myWeight(0) {}
@@ -118,7 +118,7 @@ public:
inline const KCompTreeChildren * children() const {
return &myChildren;
}
- inline const KCompTreeNode * childAt(int index) const {
+ inline const KCompTreeNode * tqchildAt(int index) const {
return myChildren.at(index);
}
inline const KCompTreeNode * firstChild() const {
diff --git a/kdecore/kcompletionbase.cpp b/kdecore/kcompletionbase.cpp
index 9e7f6d746..019f4ec6b 100644
--- a/kdecore/kcompletionbase.cpp
+++ b/kdecore/kcompletionbase.cpp
@@ -123,7 +123,7 @@ bool KCompletionBase::setKeyBinding( KeyBindingType item, const KShortcut& cut )
for( KeyBindingMap::Iterator it = m_keyMap.begin(); it != m_keyMap.end(); ++it )
if( it.data() == cut ) return false;
}
- m_keyMap.replace( item, cut );
+ m_keyMap.tqreplace( item, cut );
return true;
}
diff --git a/kdecore/kconfig.cpp b/kdecore/kconfig.cpp
index 2531034ee..e40f23a19 100644
--- a/kdecore/kconfig.cpp
+++ b/kdecore/kconfig.cpp
@@ -144,7 +144,7 @@ TQMap<TQString, TQString> KConfig::entryMap(const TQString &pGroup) const
KEntryKey groupKey( pGroup_utf, 0 );
TQMap<TQString, TQString> tmpMap;
- KEntryMapConstIterator aIt = aEntryMap.find(groupKey);
+ KEntryMapConstIterator aIt = aEntryMap.tqfind(groupKey);
if (aIt == aEntryMap.end())
return tmpMap;
++aIt; // advance past special group entry marker
@@ -183,7 +183,7 @@ KEntryMap KConfig::internalEntryMap(const TQString &pGroup) const
KEntryKey aKey(pGroup_utf, 0);
KEntryMap tmpEntryMap;
- aIt = aEntryMap.find(aKey);
+ aIt = aEntryMap.tqfind(aKey);
if (aIt == aEntryMap.end()) {
// the special group key is not in the map,
// so it must be an invalid group. Return
@@ -237,7 +237,7 @@ void KConfig::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGro
KEntry KConfig::lookupData(const KEntryKey &_key) const
{
- KEntryMapConstIterator aIt = aEntryMap.find(_key);
+ KEntryMapConstIterator aIt = aEntryMap.tqfind(_key);
if (aIt != aEntryMap.end())
{
const KEntry &entry = *aIt;
@@ -255,7 +255,7 @@ bool KConfig::internalHasGroup(const TQCString &group) const
{
KEntryKey groupKey( group, 0);
- KEntryMapConstIterator aIt = aEntryMap.find(groupKey);
+ KEntryMapConstIterator aIt = aEntryMap.tqfind(groupKey);
KEntryMapConstIterator aEnd = aEntryMap.end();
if (aIt == aEnd)
@@ -290,7 +290,7 @@ void KConfig::checkUpdate(const TQString &id, const TQString &updateFile)
setGroup("$Version");
TQString cfg_id = updateFile+":"+id;
TQStringList ids = readListEntry("update_info");
- if (!ids.contains(cfg_id))
+ if (!ids.tqcontains(cfg_id))
{
TQStringList args;
args << "--check" << updateFile;
diff --git a/kdecore/kconfig_compiler/kconfig_compiler.cpp b/kdecore/kconfig_compiler/kconfig_compiler.cpp
index f11394495..1b1d82860 100644
--- a/kdecore/kconfig_compiler/kconfig_compiler.cpp
+++ b/kdecore/kconfig_compiler/kconfig_compiler.cpp
@@ -220,7 +220,7 @@ static TQString enumName(const TQString &n)
return result;
}
-static TQString setFunction(const TQString &n, const TQString &className = TQString::null)
+static TQString setFunction(const TQString &n, const TQString &className = TQString())
{
TQString result = "set"+n;
result[3] = result[3].upper();
@@ -231,7 +231,7 @@ static TQString setFunction(const TQString &n, const TQString &className = TQStr
}
-static TQString getFunction(const TQString &n, const TQString &className = TQString::null)
+static TQString getFunction(const TQString &n, const TQString &className = TQString())
{
TQString result = n;
result[0] = result[0].lower();
@@ -262,10 +262,10 @@ static TQString literalString( const TQString &s )
{
bool isAscii = true;
for(int i = s.length(); i--;)
- if (s[i].unicode() > 127) isAscii = false;
+ if (s[i].tqunicode() > 127) isAscii = false;
if (isAscii)
- return "TQString::fromLatin1( " + quoteString(s) + " )";
+ return "TQString::tqfromLatin1( " + quoteString(s) + " )";
else
return "TQString::fromUtf8( " + quoteString(s) + " )";
}
@@ -284,7 +284,7 @@ static TQString dumpNode(const TQDomNode &node)
static TQString filenameOnly(TQString path)
{
- int i = path.findRev('/');
+ int i = path.tqfindRev('/');
if (i >= 0)
return path.mid(i+1);
return path;
@@ -480,13 +480,13 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
if ( nameIsEmpty ) {
name = key;
- name.replace( " ", TQString::null );
- } else if ( name.contains( ' ' ) ) {
+ name.tqreplace( " ", TQString() );
+ } else if ( name.tqcontains( ' ' ) ) {
kdWarning()<<"Entry '"<<name<<"' contains spaces! <name> elements can't contain speces!"<<endl;
name.remove( ' ' );
}
- if (name.contains("$("))
+ if (name.tqcontains("$("))
{
if (param.isEmpty())
{
@@ -513,11 +513,11 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
{
// Adjust name
paramName = name;
- name.replace("$("+param+")", TQString::null);
+ name.tqreplace("$("+param+")", TQString());
// Lookup defaults for indexed entries
for(int i = 0; i <= paramMax; i++)
{
- paramDefaultValues.append(TQString::null);
+ paramDefaultValues.append(TQString());
}
TQDomNode n;
@@ -534,7 +534,7 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
int i = index.toInt(&ok);
if (!ok)
{
- i = paramValues.findIndex(index);
+ i = paramValues.tqfindIndex(index);
if (i == -1)
{
kdError() << "Index '" << index << "' for default value is unknown." << endl;
@@ -568,7 +568,7 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
return 0;
}
- if (allNames.contains(name))
+ if (allNames.tqcontains(name))
{
if (nameIsEmpty)
kdError() << "The key '" << key << "' can not be used as name for the entry because "
@@ -619,8 +619,8 @@ TQString param( const TQString &type )
else if ( type == "Bool" ) return "bool";
else if ( type == "Double" ) return "double";
else if ( type == "DateTime" ) return "const TQDateTime &";
- else if ( type == "Int64" ) return "Q_INT64";
- else if ( type == "UInt64" ) return "Q_UINT64";
+ else if ( type == "Int64" ) return "TQ_INT64";
+ else if ( type == "UInt64" ) return "TQ_UINT64";
else if ( type == "IntList" ) return "const TQValueList<int> &";
else if ( type == "Enum" ) return "int";
else if ( type == "Path" ) return "const TQString &";
@@ -649,8 +649,8 @@ TQString cppType( const TQString &type )
else if ( type == "Bool" ) return "bool";
else if ( type == "Double" ) return "double";
else if ( type == "DateTime" ) return "TQDateTime";
- else if ( type == "Int64" ) return "Q_INT64";
- else if ( type == "UInt64" ) return "Q_UINT64";
+ else if ( type == "Int64" ) return "TQ_INT64";
+ else if ( type == "UInt64" ) return "TQ_UINT64";
else if ( type == "IntList" ) return "TQValueList<int>";
else if ( type == "Enum" ) return "int";
else if ( type == "Path" ) return "TQString";
@@ -702,13 +702,13 @@ TQString itemType( const TQString &type )
static TQString itemDeclaration(const CfgEntry *e)
{
if (itemAccessors)
- return TQString::null;
+ return TQString();
TQString fCap = e->name();
fCap[0] = fCap[0].upper();
return " KConfigSkeleton::Item"+itemType( e->type() ) +
" *item" + fCap +
- ( (!e->param().isEmpty())?(TQString("[%1]").arg(e->paramMax()+1)) : TQString::null) +
+ ( (!e->param().isEmpty())?(TQString("[%1]").arg(e->paramMax()+1)) : TQString()) +
";\n";
}
@@ -752,7 +752,7 @@ static TQString itemPath(const CfgEntry *e)
}
TQString newItem( const TQString &type, const TQString &name, const TQString &key,
- const TQString &defaultValue, const TQString &param = TQString::null)
+ const TQString &defaultValue, const TQString &param = TQString())
{
TQString t = "new KConfigSkeleton::Item" + itemType( type ) +
"( currentGroup(), " + key + ", " + varPath( name ) + param;
@@ -771,7 +771,7 @@ TQString paramString(const TQString &s, const CfgEntry *e, int i)
{
TQString result = s;
TQString needle = "$("+e->param()+")";
- if (result.contains(needle))
+ if (result.tqcontains(needle))
{
TQString tmp;
if (e->paramType() == "Enum")
@@ -796,7 +796,7 @@ TQString paramString(const TQString &group, const TQValueList<Param> &parameters
for (TQValueList<Param>::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
- if (paramString.contains("$("+(*it).name+")"))
+ if (paramString.tqcontains("$("+(*it).name+")"))
{
TQString tmp;
tmp.sprintf("%%%d", i++);
@@ -805,13 +805,13 @@ TQString paramString(const TQString &group, const TQValueList<Param> &parameters
}
}
if (arguments.isEmpty())
- return "TQString::fromLatin1( \""+group+"\" )";
+ return "TQString::tqfromLatin1( \""+group+"\" )";
- return "TQString::fromLatin1( \""+paramString+"\" )"+arguments;
+ return "TQString::tqfromLatin1( \""+paramString+"\" )"+arguments;
}
/* int i is the value of the parameter */
-TQString userTextsFunctions( CfgEntry *e, TQString itemVarStr=TQString::null, TQString i=TQString::null )
+TQString userTextsFunctions( CfgEntry *e, TQString itemVarStr=TQString(), TQString i=TQString() )
{
TQString txt;
if (itemVarStr.isNull()) itemVarStr=itemPath(e);
@@ -883,12 +883,12 @@ TQString memberMutatorBody( CfgEntry *e )
out << "}" << endl << endl;
}
- out << "if (!" << This << "isImmutable( TQString::fromLatin1( \"";
+ out << "if (!" << This << "isImmutable( TQString::tqfromLatin1( \"";
if (!e->param().isEmpty())
{
out << e->paramName().replace("$("+e->param()+")", "%1") << "\" ).arg( ";
if ( e->paramType() == "Enum" ) {
- out << "TQString::fromLatin1( ";
+ out << "TQString::tqfromLatin1( ";
if (globalEnums)
out << enumName(e->param()) << "ToString[i]";
@@ -1249,7 +1249,7 @@ int main( int argc, char **argv )
TQString t = e->type();
// Manipulator
- if (allMutators || mutators.contains(n))
+ if (allMutators || mutators.tqcontains(n))
{
h << " /**" << endl;
h << " Set " << e->label() << endl;
@@ -1518,7 +1518,7 @@ int main( int argc, char **argv )
cpp << " )" << endl;
cpp << " : " << inherits << "(";
- if ( !cfgFileName.isEmpty() ) cpp << " TQString::fromLatin1( \"" << cfgFileName << "\" ";
+ if ( !cfgFileName.isEmpty() ) cpp << " TQString::tqfromLatin1( \"" << cfgFileName << "\" ";
if ( cfgFileNameArg ) cpp << " config ";
if ( !cfgFileName.isEmpty() ) cpp << ") ";
cpp << ")" << endl;
@@ -1539,7 +1539,7 @@ int main( int argc, char **argv )
if ( singleton )
cpp << " mSelf = this;" << endl;
- group = TQString::null;
+ group = TQString();
for( e = entries.first(); e; e = entries.next() ) {
if ( e->group() != group ) {
if ( !group.isEmpty() ) cpp << endl;
@@ -1560,7 +1560,7 @@ int main( int argc, char **argv )
for( it = choices.begin(); it != choices.end(); ++it ) {
cpp << " {" << endl;
cpp << " KConfigSkeleton::ItemEnum::Choice choice;" << endl;
- cpp << " choice.name = TQString::fromLatin1( \"" << (*it).name << "\" );" << endl;
+ cpp << " choice.name = TQString::tqfromLatin1( \"" << (*it).name << "\" );" << endl;
if ( setUserTexts ) {
if ( !(*it).label.isEmpty() )
cpp << " choice.label = i18n(" << quoteString((*it).label) << ");" << endl;
@@ -1592,7 +1592,7 @@ int main( int argc, char **argv )
cpp << " addItem( " << itemPath(e);
TQString quotedName = e->name();
addQuotes( quotedName );
- if ( quotedName != key ) cpp << ", TQString::fromLatin1( \"" << e->name() << "\" )";
+ if ( quotedName != key ) cpp << ", TQString::tqfromLatin1( \"" << e->name() << "\" )";
cpp << " );" << endl;
}
else
@@ -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 << ", TQString::fromLatin1( \"";
+ cpp << " addItem( " << itemVarStr << ", TQString::tqfromLatin1( \"";
if ( e->paramType()=="Enum" )
cpp << e->paramName().replace( "$("+e->param()+")", "%1").arg(e->paramValues()[i] );
else
@@ -1642,7 +1642,7 @@ int main( int argc, char **argv )
TQString t = e->type();
// Manipulator
- if (allMutators || mutators.contains(n))
+ if (allMutators || mutators.tqcontains(n))
{
cpp << "void " << setFunction(n, className) << "( ";
if (!e->param().isEmpty())
diff --git a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp b/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp
index 2f8e7eee3..3dd197b34 100644
--- a/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp
+++ b/kdecore/kconfig_compiler/tests/kconfigcompiler_test.cpp
@@ -61,7 +61,7 @@ void KConfigCompiler_Test::testExpectedOutput()
// Known to pass test cases
while (testCases[ i ])
{
- performCompare(TQString::fromLatin1(testCases[ i ]));
+ performCompare(TQString::tqfromLatin1(testCases[ i ]));
++i;
}
@@ -69,7 +69,7 @@ void KConfigCompiler_Test::testExpectedOutput()
i= 0;
while (willFailCases[ i ])
{
- performCompare(TQString::fromLatin1(willFailCases[ i ]), true);
+ performCompare(TQString::tqfromLatin1(willFailCases[ i ]), true);
++i;
}
}
@@ -77,7 +77,7 @@ void KConfigCompiler_Test::testExpectedOutput()
void KConfigCompiler_Test::performCompare(const TQString &fileName, bool fail)
{
TQFile file(fileName);
- TQFile fileRef(TQString::fromLatin1(SRCDIR) + TQString::fromLatin1("/") + fileName + TQString::fromLatin1(".ref"));
+ TQFile fileRef(TQString::tqfromLatin1(SRCDIR) + TQString::tqfromLatin1("/") + fileName + TQString::tqfromLatin1(".ref"));
if ( file.open(IO_ReadOnly) && fileRef.open(IO_ReadOnly) )
{
diff --git a/kdecore/kconfig_compiler/tests/test1.cpp.ref b/kdecore/kconfig_compiler/tests/test1.cpp.ref
index b3050921e..f8c4c1189 100644
--- a/kdecore/kconfig_compiler/tests/test1.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test1.cpp.ref
@@ -4,66 +4,66 @@
#include "test1.h"
Test1::Test1( const TQString & transport, const TQString & folder )
- : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) )
+ : KConfigSkeleton( TQString::tqfromLatin1( "examplerc" ) )
, mParamtransport(transport)
, mParamfolder(folder)
{
- setCurrentGroup( TQString::fromLatin1( "General-%1" ).arg( mParamfolder ) );
+ setCurrentGroup( TQString::tqfromLatin1( "General-%1" ).arg( mParamfolder ) );
KConfigSkeleton::ItemBool *itemOneOption;
- itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "OneOption" ), mOneOption, true );
- addItem( itemOneOption, TQString::fromLatin1( "OneOption" ) );
+ itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "OneOption" ), mOneOption, true );
+ addItem( itemOneOption, TQString::tqfromLatin1( "OneOption" ) );
KConfigSkeleton::ItemInt *itemAnotherOption;
- itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption, 5 );
- addItem( itemAnotherOption, TQString::fromLatin1( "AnotherOption" ) );
+ itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Another Option" ), mAnotherOption, 5 );
+ addItem( itemAnotherOption, TQString::tqfromLatin1( "AnotherOption" ) );
TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesListOption;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "One" );
+ choice.name = TQString::tqfromLatin1( "One" );
valuesListOption.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Two" );
+ choice.name = TQString::tqfromLatin1( "Two" );
valuesListOption.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Three" );
+ choice.name = TQString::tqfromLatin1( "Three" );
valuesListOption.append( choice );
}
KConfigSkeleton::ItemEnum *itemListOption;
- itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One );
- addItem( itemListOption, TQString::fromLatin1( "ListOption" ) );
+ itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "ListOption" ), mListOption, valuesListOption, EnumListOption::One );
+ addItem( itemListOption, TQString::tqfromLatin1( "ListOption" ) );
- setCurrentGroup( TQString::fromLatin1( "MyOptions" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "MyOptions" ) );
KConfigSkeleton::ItemString *itemMyString;
- itemMyString = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "MyString" ), mMyString, TQString::fromLatin1( "Default String" ) );
- addItem( itemMyString, TQString::fromLatin1( "MyString" ) );
+ itemMyString = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "MyString" ), mMyString, TQString::tqfromLatin1( "Default String" ) );
+ addItem( itemMyString, TQString::tqfromLatin1( "MyString" ) );
KConfigSkeleton::ItemPath *itemMyPath;
- itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), TQString::fromLatin1( "MyPath" ), mMyPath, TQDir::homeDirPath()+TQString::fromLatin1(".hidden_file") );
- addItem( itemMyPath, TQString::fromLatin1( "MyPath" ) );
+ itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), TQString::tqfromLatin1( "MyPath" ), mMyPath, TQDir::homeDirPath()+TQString::tqfromLatin1(".hidden_file") );
+ addItem( itemMyPath, TQString::tqfromLatin1( "MyPath" ) );
KConfigSkeleton::ItemInt *itemAnotherOption2;
- itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Another Option" ), mAnotherOption2, 10 );
- addItem( itemAnotherOption2, TQString::fromLatin1( "AnotherOption2" ) );
+ itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Another Option" ), mAnotherOption2, 10 );
+ addItem( itemAnotherOption2, TQString::tqfromLatin1( "AnotherOption2" ) );
TQStringList defaultMyStringList;
defaultMyStringList.append( TQString::fromUtf8( "up" ) );
defaultMyStringList.append( TQString::fromUtf8( "down" ) );
KConfigSkeleton::ItemStringList *itemMyStringList;
- itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
- addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) );
+ itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::tqfromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
+ addItem( itemMyStringList, TQString::tqfromLatin1( "MyStringList" ) );
TQStringList defaultMyStringListHidden;
defaultMyStringListHidden.append( TQString::fromUtf8( "up" ) );
defaultMyStringListHidden.append( TQString::fromUtf8( "down" ) );
KConfigSkeleton::ItemStringList *itemMyStringListHidden;
- itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden );
- addItem( itemMyStringListHidden, TQString::fromLatin1( "MyStringListHidden" ) );
+ itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::tqfromLatin1( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden );
+ addItem( itemMyStringListHidden, TQString::tqfromLatin1( "MyStringListHidden" ) );
KConfigSkeleton::ItemInt *itemMyNumber;
- itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 );
- addItem( itemMyNumber, TQString::fromLatin1( "MyNumber" ) );
+ itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "List-%1-%2" ).arg( mParamtransport ).arg( mParamfolder ), mMyNumber, 1 );
+ addItem( itemMyNumber, TQString::tqfromLatin1( "MyNumber" ) );
}
Test1::~Test1()
diff --git a/kdecore/kconfig_compiler/tests/test1.h.ref b/kdecore/kconfig_compiler/tests/test1.h.ref
index cc2d99c69..b5a66b5cd 100644
--- a/kdecore/kconfig_compiler/tests/test1.h.ref
+++ b/kdecore/kconfig_compiler/tests/test1.h.ref
@@ -24,7 +24,7 @@ class Test1 : public KConfigSkeleton
*/
void setOneOption( bool v )
{
- if (!isImmutable( TQString::fromLatin1( "OneOption" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "OneOption" ) ))
mOneOption = v;
}
@@ -41,7 +41,7 @@ class Test1 : public KConfigSkeleton
*/
void setAnotherOption( int v )
{
- if (!isImmutable( TQString::fromLatin1( "AnotherOption" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "AnotherOption" ) ))
mAnotherOption = v;
}
@@ -58,7 +58,7 @@ class Test1 : public KConfigSkeleton
*/
void setListOption( int v )
{
- if (!isImmutable( TQString::fromLatin1( "ListOption" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "ListOption" ) ))
mListOption = v;
}
@@ -75,7 +75,7 @@ class Test1 : public KConfigSkeleton
*/
void setMyString( const TQString & v )
{
- if (!isImmutable( TQString::fromLatin1( "MyString" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "MyString" ) ))
mMyString = v;
}
@@ -92,7 +92,7 @@ class Test1 : public KConfigSkeleton
*/
void setMyPath( const TQString & v )
{
- if (!isImmutable( TQString::fromLatin1( "MyPath" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "MyPath" ) ))
mMyPath = v;
}
@@ -109,7 +109,7 @@ class Test1 : public KConfigSkeleton
*/
void setAnotherOption2( int v )
{
- if (!isImmutable( TQString::fromLatin1( "AnotherOption2" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "AnotherOption2" ) ))
mAnotherOption2 = v;
}
@@ -126,7 +126,7 @@ class Test1 : public KConfigSkeleton
*/
void setMyStringList( const TQStringList & v )
{
- if (!isImmutable( TQString::fromLatin1( "MyStringList" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "MyStringList" ) ))
mMyStringList = v;
}
@@ -143,7 +143,7 @@ class Test1 : public KConfigSkeleton
*/
void setMyStringListHidden( const TQStringList & v )
{
- if (!isImmutable( TQString::fromLatin1( "MyStringListHidden" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "MyStringListHidden" ) ))
mMyStringListHidden = v;
}
@@ -160,7 +160,7 @@ class Test1 : public KConfigSkeleton
*/
void setMyNumber( int v )
{
- if (!isImmutable( TQString::fromLatin1( "MyNumber" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "MyNumber" ) ))
mMyNumber = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test2.cpp.ref b/kdecore/kconfig_compiler/tests/test2.cpp.ref
index 2d56f7545..af8db588d 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( TQString::fromLatin1( "korganizerrc" ) )
+ : MyPrefs( TQString::tqfromLatin1( "korganizerrc" ) )
{
- setCurrentGroup( TQString::fromLatin1( "General" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "General" ) );
- mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false );
+ mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "Auto Save" ), mAutoSave, false );
mAutoSaveItem->setLabel( i18n("Enable automatic saving of calendar") );
mAutoSaveItem->setWhatsThis( i18n("WhatsThis text for AutoSave option") );
- addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) );
- mAutoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 );
+ addItem( mAutoSaveItem, TQString::tqfromLatin1( "AutoSave" ) );
+ mAutoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Auto Save Interval" ), mAutoSaveInterval, 10 );
mAutoSaveIntervalItem->setLabel( i18n("Auto Save Interval") );
- addItem( mAutoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) );
- mConfirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), mConfirm, true );
+ addItem( mAutoSaveIntervalItem, TQString::tqfromLatin1( "AutoSaveInterval" ) );
+ mConfirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "Confirm Deletes" ), mConfirm, true );
mConfirmItem->setLabel( i18n("Confirm deletes") );
- addItem( mConfirmItem, TQString::fromLatin1( "Confirm" ) );
- mArchiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), mArchiveFile );
+ addItem( mConfirmItem, TQString::tqfromLatin1( "Confirm" ) );
+ mArchiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "Archive File" ), mArchiveFile );
mArchiveFileItem->setLabel( i18n("Archive File") );
- addItem( mArchiveFileItem, TQString::fromLatin1( "ArchiveFile" ) );
+ addItem( mArchiveFileItem, TQString::tqfromLatin1( "ArchiveFile" ) );
TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "standardDestination" );
+ choice.name = TQString::tqfromLatin1( "standardDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "askDestination" );
+ choice.name = TQString::tqfromLatin1( "askDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "argl1" );
+ choice.name = TQString::tqfromLatin1( "argl1" );
choice.label = i18n("Argl1 Label");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "argl2" );
+ choice.name = TQString::tqfromLatin1( "argl2" );
choice.whatsThis = i18n("Argl2 Whatsthis");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "argl3" );
+ choice.name = TQString::tqfromLatin1( "argl3" );
choice.label = i18n("Argl3 Label");
choice.whatsThis = i18n("Argl3 Whatsthis");
valuesDestination.append( choice );
}
- mDestinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination );
+ mDestinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "Destination" ), mDestination, valuesDestination, standardDestination );
mDestinationItem->setLabel( i18n("New Events/Todos Should") );
- addItem( mDestinationItem, TQString::fromLatin1( "Destination" ) );
+ addItem( mDestinationItem, TQString::tqfromLatin1( "Destination" ) );
- setCurrentGroup( TQString::fromLatin1( "Views" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Views" ) );
- mHourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), mHourSize, 10 );
+ mHourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Hour Size" ), mHourSize, 10 );
mHourSizeItem->setLabel( i18n("Hour Size") );
- addItem( mHourSizeItem, TQString::fromLatin1( "HourSize" ) );
- mSelectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false );
+ addItem( mHourSizeItem, TQString::tqfromLatin1( "HourSize" ) );
+ mSelectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "SelectionStartsEditor" ), mSelectionStartsEditor, false );
mSelectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") );
- addItem( mSelectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) );
+ addItem( mSelectionStartsEditorItem, TQString::tqfromLatin1( "SelectionStartsEditor" ) );
- setCurrentGroup( TQString::fromLatin1( "KOrganizer Plugins" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "KOrganizer Plugins" ) );
TQStringList defaultSelectedPlugins;
defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) );
defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) );
- mSelectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins );
+ mSelectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::tqfromLatin1( "SelectedPlugins" ), mSelectedPlugins, defaultSelectedPlugins );
mSelectedPluginsItem->setLabel( i18n("SelectedPlugins") );
- addItem( mSelectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) );
+ addItem( mSelectedPluginsItem, TQString::tqfromLatin1( "SelectedPlugins" ) );
- setCurrentGroup( TQString::fromLatin1( "Colors" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Colors" ) );
- mHighlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), mHighlightColor, TQColor( 100, 100, 255 ) );
+ mHighlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "Highlight Color" ), mHighlightColor, TQColor( 100, 100, 255 ) );
mHighlightColorItem->setLabel( i18n("Highlight color") );
- addItem( mHighlightColorItem, TQString::fromLatin1( "HighlightColor" ) );
- mAgendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), mAgendaBgColor, TQColor( 255, 255, 255 ) );
+ addItem( mHighlightColorItem, TQString::tqfromLatin1( "HighlightColor" ) );
+ mAgendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "Agenda Background Color" ), mAgendaBgColor, TQColor( 255, 255, 255 ) );
mAgendaBgColorItem->setLabel( i18n("Agenda view background color") );
- addItem( mAgendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) );
+ addItem( mAgendaBgColorItem, TQString::tqfromLatin1( "AgendaBgColor" ) );
- setCurrentGroup( TQString::fromLatin1( "Fonts" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Fonts" ) );
- mTimeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), mTimeBarFont );
+ mTimeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::tqfromLatin1( "TimeBar Font" ), mTimeBarFont );
mTimeBarFontItem->setLabel( i18n("Time bar") );
- addItem( mTimeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) );
+ addItem( mTimeBarFontItem, TQString::tqfromLatin1( "TimeBarFont" ) );
}
Test2::~Test2()
diff --git a/kdecore/kconfig_compiler/tests/test2.h.ref b/kdecore/kconfig_compiler/tests/test2.h.ref
index 6c0a74d66..075f48bde 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( TQString::fromLatin1( "AutoSave" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "AutoSave" ) ))
mAutoSave = v;
}
@@ -46,7 +46,7 @@ class Test2 : public MyPrefs
*/
void setAutoSaveInterval( int v )
{
- if (!isImmutable( TQString::fromLatin1( "AutoSaveInterval" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "AutoSaveInterval" ) ))
mAutoSaveInterval = v;
}
@@ -71,7 +71,7 @@ class Test2 : public MyPrefs
*/
void setConfirm( bool v )
{
- if (!isImmutable( TQString::fromLatin1( "Confirm" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "Confirm" ) ))
mConfirm = v;
}
@@ -96,7 +96,7 @@ class Test2 : public MyPrefs
*/
void setArchiveFile( const TQString & v )
{
- if (!isImmutable( TQString::fromLatin1( "ArchiveFile" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "ArchiveFile" ) ))
mArchiveFile = v;
}
@@ -121,7 +121,7 @@ class Test2 : public MyPrefs
*/
void setDestination( int v )
{
- if (!isImmutable( TQString::fromLatin1( "Destination" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "Destination" ) ))
mDestination = v;
}
@@ -146,7 +146,7 @@ class Test2 : public MyPrefs
*/
void setHourSize( int v )
{
- if (!isImmutable( TQString::fromLatin1( "HourSize" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "HourSize" ) ))
mHourSize = v;
}
@@ -171,7 +171,7 @@ class Test2 : public MyPrefs
*/
void setSelectionStartsEditor( bool v )
{
- if (!isImmutable( TQString::fromLatin1( "SelectionStartsEditor" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "SelectionStartsEditor" ) ))
mSelectionStartsEditor = v;
}
@@ -196,7 +196,7 @@ class Test2 : public MyPrefs
*/
void setSelectedPlugins( const TQStringList & v )
{
- if (!isImmutable( TQString::fromLatin1( "SelectedPlugins" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "SelectedPlugins" ) ))
mSelectedPlugins = v;
}
@@ -221,7 +221,7 @@ class Test2 : public MyPrefs
*/
void setHighlightColor( const TQColor & v )
{
- if (!isImmutable( TQString::fromLatin1( "HighlightColor" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "HighlightColor" ) ))
mHighlightColor = v;
}
@@ -246,7 +246,7 @@ class Test2 : public MyPrefs
*/
void setAgendaBgColor( const TQColor & v )
{
- if (!isImmutable( TQString::fromLatin1( "AgendaBgColor" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "AgendaBgColor" ) ))
mAgendaBgColor = v;
}
@@ -271,7 +271,7 @@ class Test2 : public MyPrefs
*/
void setTimeBarFont( const TQFont & v )
{
- if (!isImmutable( TQString::fromLatin1( "TimeBarFont" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "TimeBarFont" ) ))
mTimeBarFont = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test3.cpp.ref b/kdecore/kconfig_compiler/tests/test3.cpp.ref
index 11fe6b38f..a47fd5213 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( TQString::fromLatin1( "test3rc" ) )
+ : KConfigSkeleton( TQString::tqfromLatin1( "test3rc" ) )
{
- setCurrentGroup( TQString::fromLatin1( "General" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "General" ) );
- mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), mAutoSave, false );
- addItem( mAutoSaveItem, TQString::fromLatin1( "AutoSave" ) );
+ mAutoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "Auto Save" ), mAutoSave, false );
+ addItem( mAutoSaveItem, TQString::tqfromLatin1( "AutoSave" ) );
- setCurrentGroup( TQString::fromLatin1( "Blah" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Blah" ) );
- 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" ) );
+ mBlubbItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Blubb" ), mBlubb, 10 );
+ addItem( mBlubbItem, TQString::tqfromLatin1( "Blubb" ) );
+ mBlahBlahItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "BlahBlah" ), mBlahBlah, TQString::tqfromLatin1( "a string" ) );
+ addItem( mBlahBlahItem, TQString::tqfromLatin1( "BlahBlah" ) );
+ mMyPasswordItem = new KConfigSkeleton::ItemPassword( currentGroup(), TQString::tqfromLatin1( "MyPassword" ), mMyPassword );
+ addItem( mMyPasswordItem, TQString::tqfromLatin1( "MyPassword" ) );
}
Test3::~Test3()
diff --git a/kdecore/kconfig_compiler/tests/test3.h.ref b/kdecore/kconfig_compiler/tests/test3.h.ref
index 75b1b0929..8e86d36b0 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( TQString::fromLatin1( "AutoSave" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "AutoSave" ) ))
mAutoSave = v;
}
@@ -45,7 +45,7 @@ class Test3 : public KConfigSkeleton
*/
void setBlubb( int v )
{
- if (!isImmutable( TQString::fromLatin1( "Blubb" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "Blubb" ) ))
mBlubb = v;
}
@@ -70,7 +70,7 @@ class Test3 : public KConfigSkeleton
*/
void setBlahBlah( const TQString & v )
{
- if (!isImmutable( TQString::fromLatin1( "BlahBlah" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "BlahBlah" ) ))
mBlahBlah = v;
}
@@ -95,7 +95,7 @@ class Test3 : public KConfigSkeleton
*/
void setMyPassword( const TQString & v )
{
- if (!isImmutable( TQString::fromLatin1( "MyPassword" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "MyPassword" ) ))
mMyPassword = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test4.cpp.ref b/kdecore/kconfig_compiler/tests/test4.cpp.ref
index 6918a8c8a..0eee21488 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( TQString::fromLatin1( "test4rc" ) )
+ : KConfigSkeleton( TQString::tqfromLatin1( "test4rc" ) )
{
mSelf = this;
- setCurrentGroup( TQString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Foo" ) );
TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
KConfigSkeleton::ItemColor *itemColor[4];
- 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" ) );
+ itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #0" ), mColor[0], defaultColor[0] );
+ addItem( itemColor[0], TQString::tqfromLatin1( "Color0" ) );
+ itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #1" ), mColor[1], defaultColor[1] );
+ addItem( itemColor[1], TQString::tqfromLatin1( "Color1" ) );
+ itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #2" ), mColor[2], defaultColor[2] );
+ addItem( itemColor[2], TQString::tqfromLatin1( "Color2" ) );
+ itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #3" ), mColor[3], defaultColor[3] );
+ addItem( itemColor[3], TQString::tqfromLatin1( "Color3" ) );
TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Encrypt" );
+ choice.name = TQString::tqfromLatin1( "Encrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Decrypt" );
+ choice.name = TQString::tqfromLatin1( "Decrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "CrashNBurn" );
+ choice.name = TQString::tqfromLatin1( "CrashNBurn" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "PumpNDump" );
+ choice.name = TQString::tqfromLatin1( "PumpNDump" );
valuesMouseAction.append( choice );
}
KConfigSkeleton::ItemEnum *itemMouseAction[3];
- 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" ) );
+ itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt );
+ addItem( itemMouseAction[0], TQString::tqfromLatin1( "MouseActionright" ) );
+ itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt );
+ addItem( itemMouseAction[1], TQString::tqfromLatin1( "MouseActionmid" ) );
+ itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump );
+ addItem( itemMouseAction[2], TQString::tqfromLatin1( "MouseActionleft" ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::tqfromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, TQString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::tqfromLatin1( "Age" ) );
}
Test4::~Test4()
diff --git a/kdecore/kconfig_compiler/tests/test4.h.ref b/kdecore/kconfig_compiler/tests/test4.h.ref
index d11dd3aee..dc8691b1f 100644
--- a/kdecore/kconfig_compiler/tests/test4.h.ref
+++ b/kdecore/kconfig_compiler/tests/test4.h.ref
@@ -30,7 +30,7 @@ class Test4 : public KConfigSkeleton
static
void setColor( int i, const TQColor & v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "Color%1" ).arg( i ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "Color%1" ).arg( i ) ))
self()->mColor[i] = v;
}
@@ -49,7 +49,7 @@ class Test4 : public KConfigSkeleton
static
void setMouseAction( int i, int v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "MouseAction%1" ).arg( TQString::fromLatin1( EnumButton::enumToString[i] ) ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "MouseAction%1" ).arg( TQString::tqfromLatin1( EnumButton::enumToString[i] ) ) ))
self()->mMouseAction[i] = v;
}
@@ -68,7 +68,7 @@ class Test4 : public KConfigSkeleton
static
void setFooBar( const TQString & v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "FooBar" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "FooBar" ) ))
self()->mFooBar = v;
}
@@ -99,7 +99,7 @@ class Test4 : public KConfigSkeleton
v = 88;
}
- if (!self()->isImmutable( TQString::fromLatin1( "Age" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "Age" ) ))
self()->mAge = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test5.cpp.ref b/kdecore/kconfig_compiler/tests/test5.cpp.ref
index 8373eb3f6..0fc90b387 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( TQString::fromLatin1( "test4rc" ) )
+ : KConfigSkeleton( TQString::tqfromLatin1( "test4rc" ) )
{
mSelf = this;
- setCurrentGroup( TQString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Foo" ) );
TQColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black };
KConfigSkeleton::ItemColor *itemColor[4];
- 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" ) );
+ itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #0" ), mColor[0], defaultColor[0] );
+ addItem( itemColor[0], TQString::tqfromLatin1( "Color0" ) );
+ itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #1" ), mColor[1], defaultColor[1] );
+ addItem( itemColor[1], TQString::tqfromLatin1( "Color1" ) );
+ itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #2" ), mColor[2], defaultColor[2] );
+ addItem( itemColor[2], TQString::tqfromLatin1( "Color2" ) );
+ itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #3" ), mColor[3], defaultColor[3] );
+ addItem( itemColor[3], TQString::tqfromLatin1( "Color3" ) );
TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Encrypt" );
+ choice.name = TQString::tqfromLatin1( "Encrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "Decrypt" );
+ choice.name = TQString::tqfromLatin1( "Decrypt" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "CrashNBurn" );
+ choice.name = TQString::tqfromLatin1( "CrashNBurn" );
valuesMouseAction.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "PumpNDump" );
+ choice.name = TQString::tqfromLatin1( "PumpNDump" );
valuesMouseAction.append( choice );
}
KConfigSkeleton::ItemEnum *itemMouseAction[3];
- 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" ) );
+ itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, Decrypt );
+ addItem( itemMouseAction[0], TQString::tqfromLatin1( "MouseActionright" ) );
+ itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, Encrypt );
+ addItem( itemMouseAction[1], TQString::tqfromLatin1( "MouseActionmid" ) );
+ itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, PumpNDump );
+ addItem( itemMouseAction[2], TQString::tqfromLatin1( "MouseActionleft" ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::tqfromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, TQString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::tqfromLatin1( "Age" ) );
}
Test5::~Test5()
diff --git a/kdecore/kconfig_compiler/tests/test5.h.ref b/kdecore/kconfig_compiler/tests/test5.h.ref
index efb9b448a..9fadbd0ec 100644
--- a/kdecore/kconfig_compiler/tests/test5.h.ref
+++ b/kdecore/kconfig_compiler/tests/test5.h.ref
@@ -22,7 +22,7 @@ class Test5 : public KConfigSkeleton
static
void setColor( int i, const TQColor & v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "Color%1" ).arg( i ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "Color%1" ).arg( i ) ))
self()->mColor[i] = v;
}
@@ -41,7 +41,7 @@ class Test5 : public KConfigSkeleton
static
void setMouseAction( int i, int v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "MouseAction%1" ).arg( TQString::fromLatin1( EnumButtonToString[i] ) ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "MouseAction%1" ).arg( TQString::tqfromLatin1( EnumButtonToString[i] ) ) ))
self()->mMouseAction[i] = v;
}
@@ -60,7 +60,7 @@ class Test5 : public KConfigSkeleton
static
void setFooBar( const TQString & v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "FooBar" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "FooBar" ) ))
self()->mFooBar = v;
}
@@ -91,7 +91,7 @@ class Test5 : public KConfigSkeleton
v = 88;
}
- if (!self()->isImmutable( TQString::fromLatin1( "Age" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "Age" ) ))
self()->mAge = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test6.cpp.ref b/kdecore/kconfig_compiler/tests/test6.cpp.ref
index 51b96d4c4..2b8a71d50 100644
--- a/kdecore/kconfig_compiler/tests/test6.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test6.cpp.ref
@@ -4,25 +4,25 @@
#include "test6.h"
Test6::Test6( const TQString & Number )
- : KConfigSkeleton( TQString::fromLatin1( "test4rc" ) )
+ : KConfigSkeleton( TQString::tqfromLatin1( "test4rc" ) )
, mParamNumber(Number)
{
- setCurrentGroup( TQString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Foo" ) );
KConfigSkeleton::ItemColor *itemColor;
- itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
- addItem( itemColor, TQString::fromLatin1( "Color" ) );
+ itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
+ addItem( itemColor, TQString::tqfromLatin1( "Color" ) );
- setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Bar%1" ).arg( mParamNumber ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::tqfromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, TQString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::tqfromLatin1( "Age" ) );
}
Test6::~Test6()
diff --git a/kdecore/kconfig_compiler/tests/test6.h.ref b/kdecore/kconfig_compiler/tests/test6.h.ref
index 6743d6064..18615da38 100644
--- a/kdecore/kconfig_compiler/tests/test6.h.ref
+++ b/kdecore/kconfig_compiler/tests/test6.h.ref
@@ -18,7 +18,7 @@ class Test6 : public KConfigSkeleton
*/
void setColor( const TQColor & v )
{
- if (!isImmutable( TQString::fromLatin1( "Color" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "Color" ) ))
mColor = v;
}
@@ -35,7 +35,7 @@ class Test6 : public KConfigSkeleton
*/
void setFooBar( const TQString & v )
{
- if (!isImmutable( TQString::fromLatin1( "FooBar" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "FooBar" ) ))
mFooBar = v;
}
@@ -64,7 +64,7 @@ class Test6 : public KConfigSkeleton
v = 88;
}
- if (!isImmutable( TQString::fromLatin1( "Age" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "Age" ) ))
mAge = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test7.cpp.ref b/kdecore/kconfig_compiler/tests/test7.cpp.ref
index 91a22e036..dab0ae27d 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( TQString::fromLatin1( "test7rc" ) )
+ : KConfigSkeleton( TQString::tqfromLatin1( "test7rc" ) )
, mParamNumber(Number)
{
- setCurrentGroup( TQString::fromLatin1( "Foo" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Foo" ) );
KConfigSkeleton::ItemColor *itemColor;
- itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
- addItem( itemColor, TQString::fromLatin1( "Color" ) );
+ itemColor = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "color #%1" ).arg( mParamNumber ), mColor, TQColor( "red" ) );
+ addItem( itemColor, TQString::tqfromLatin1( "Color" ) );
- setCurrentGroup( TQString::fromLatin1( "Bar%1" ).arg( mParamNumber ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Bar%1" ).arg( mParamNumber ) );
KConfigSkeleton::ItemString *itemFooBar;
- itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "foo bar" ), mFooBar );
- addItem( itemFooBar, TQString::fromLatin1( "FooBar" ) );
+ itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "foo bar" ), mFooBar );
+ addItem( itemFooBar, TQString::tqfromLatin1( "FooBar" ) );
KConfigSkeleton::ItemInt *itemAge;
- itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Age" ), mAge, 35 );
+ itemAge = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Age" ), mAge, 35 );
itemAge->setMinValue(8);
itemAge->setMaxValue(88);
- addItem( itemAge, TQString::fromLatin1( "Age" ) );
+ addItem( itemAge, TQString::tqfromLatin1( "Age" ) );
}
Test7::~Test7()
diff --git a/kdecore/kconfig_compiler/tests/test7.h.ref b/kdecore/kconfig_compiler/tests/test7.h.ref
index 8f8808da1..f67bc30cb 100644
--- a/kdecore/kconfig_compiler/tests/test7.h.ref
+++ b/kdecore/kconfig_compiler/tests/test7.h.ref
@@ -18,7 +18,7 @@ class Test7 : public KConfigSkeleton
*/
void setColor( const TQColor & v )
{
- if (!isImmutable( TQString::fromLatin1( "Color" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "Color" ) ))
mColor = v;
}
@@ -35,7 +35,7 @@ class Test7 : public KConfigSkeleton
*/
void setFooBar( const TQString & v )
{
- if (!isImmutable( TQString::fromLatin1( "FooBar" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "FooBar" ) ))
mFooBar = v;
}
@@ -64,7 +64,7 @@ class Test7 : public KConfigSkeleton
v = 88;
}
- if (!isImmutable( TQString::fromLatin1( "Age" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "Age" ) ))
mAge = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test8a.cpp.ref b/kdecore/kconfig_compiler/tests/test8a.cpp.ref
index f89b7c133..8d8925c57 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( TQString::fromLatin1( "Group" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Group" ) );
KConfigSkeleton::ItemFont *itemFont;
- itemFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "Font" ), mFont, KGlobalSettings::generalFont() );
- addItem( itemFont, TQString::fromLatin1( "Font" ) );
+ itemFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::tqfromLatin1( "Font" ), mFont, KGlobalSettings::generalFont() );
+ addItem( itemFont, TQString::tqfromLatin1( "Font" ) );
KConfigSkeleton::ItemFont *itemTitleFont;
- itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TitleFont" ), mTitleFont, KGlobalSettings::windowTitleFont() );
- addItem( itemTitleFont, TQString::fromLatin1( "TitleFont" ) );
+ itemTitleFont = new KConfigSkeleton::ItemFont( currentGroup(), TQString::tqfromLatin1( "TitleFont" ), mTitleFont, KGlobalSettings::windowTitleFont() );
+ addItem( itemTitleFont, TQString::tqfromLatin1( "TitleFont" ) );
}
Test8a::~Test8a()
diff --git a/kdecore/kconfig_compiler/tests/test8a.h.ref b/kdecore/kconfig_compiler/tests/test8a.h.ref
index 2e947c437..a1ac4de64 100644
--- a/kdecore/kconfig_compiler/tests/test8a.h.ref
+++ b/kdecore/kconfig_compiler/tests/test8a.h.ref
@@ -19,7 +19,7 @@ class Test8a : public KConfigSkeleton
*/
void setFont( const TQFont & v )
{
- if (!isImmutable( TQString::fromLatin1( "Font" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "Font" ) ))
mFont = v;
}
@@ -36,7 +36,7 @@ class Test8a : public KConfigSkeleton
*/
void setTitleFont( const TQFont & v )
{
- if (!isImmutable( TQString::fromLatin1( "TitleFont" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "TitleFont" ) ))
mTitleFont = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test8b.cpp.ref b/kdecore/kconfig_compiler/tests/test8b.cpp.ref
index e29e3c4e7..566902399 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( TQString::fromLatin1( "Group8b1" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Group8b1" ) );
KConfigSkeleton::ItemUInt *itemSomething;
- itemSomething = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Something" ), mSomething, 60 );
- addItem( itemSomething, TQString::fromLatin1( "Something" ) );
+ itemSomething = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::tqfromLatin1( "Something" ), mSomething, 60 );
+ addItem( itemSomething, TQString::tqfromLatin1( "Something" ) );
- setCurrentGroup( TQString::fromLatin1( "Group8b2" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Group8b2" ) );
KConfigSkeleton::ItemBool *itemFooBoo;
- itemFooBoo = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "FooBoo" ), mFooBoo, false );
- addItem( itemFooBoo, TQString::fromLatin1( "FooBoo" ) );
+ itemFooBoo = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "FooBoo" ), mFooBoo, false );
+ addItem( itemFooBoo, TQString::tqfromLatin1( "FooBoo" ) );
KConfigSkeleton::ItemUInt *itemPort;
- itemPort = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::fromLatin1( "Port" ), mPort, 1000 );
- addItem( itemPort, TQString::fromLatin1( "Port" ) );
+ itemPort = new KConfigSkeleton::ItemUInt( currentGroup(), TQString::tqfromLatin1( "Port" ), mPort, 1000 );
+ addItem( itemPort, TQString::tqfromLatin1( "Port" ) );
}
Test8b::~Test8b()
diff --git a/kdecore/kconfig_compiler/tests/test8b.h.ref b/kdecore/kconfig_compiler/tests/test8b.h.ref
index 4ca0d5c7f..dfc9089e3 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( TQString::fromLatin1( "Something" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "Something" ) ))
self()->mSomething = v;
}
@@ -40,7 +40,7 @@ class Test8b : public Test8a
static
void setFooBoo( bool v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "FooBoo" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "FooBoo" ) ))
self()->mFooBoo = v;
}
@@ -59,7 +59,7 @@ class Test8b : public Test8a
static
void setPort( uint v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "Port" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "Port" ) ))
self()->mPort = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test9.cpp.ref b/kdecore/kconfig_compiler/tests/test9.cpp.ref
index c5d57e4d1..606f21ed1 100644
--- a/kdecore/kconfig_compiler/tests/test9.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test9.cpp.ref
@@ -4,29 +4,29 @@
#include "test9.h"
Test9::Test9( const TQString & transport, const TQString & folder )
- : KConfigSkeleton( TQString::fromLatin1( "examplerc" ) )
+ : KConfigSkeleton( TQString::tqfromLatin1( "examplerc" ) )
, mParamtransport(transport)
, mParamfolder(folder)
{
- setCurrentGroup( TQString::fromLatin1( "MyOptionsXX" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "MyOptionsXX" ) );
TQStringList defaultMyStringList;
defaultMyStringList.append( TQString::fromUtf8( "up" ) );
defaultMyStringList.append( TQString::fromUtf8( "down" ) );
KConfigSkeleton::ItemStringList *itemMyStringList;
- itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
- addItem( itemMyStringList, TQString::fromLatin1( "MyStringList" ) );
+ itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::tqfromLatin1( "MyStringList" ), mMyStringList, defaultMyStringList );
+ addItem( itemMyStringList, TQString::tqfromLatin1( "MyStringList" ) );
TQStringList defaultMyPathList;
defaultMyPathList.append( TQString::fromUtf8( "/home" ) );
defaultMyPathList.append( TQString::fromUtf8( "~" ) );
KConfigSkeleton::ItemPathList *itemMyPathList;
- itemMyPathList = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList );
- addItem( itemMyPathList, TQString::fromLatin1( "MyPathList" ) );
+ itemMyPathList = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::tqfromLatin1( "MyPathList" ), mMyPathList, defaultMyPathList );
+ addItem( itemMyPathList, TQString::tqfromLatin1( "MyPathList" ) );
KConfigSkeleton::ItemPathList *itemMyPathsList2;
- itemMyPathsList2 = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::fromLatin1( "MyPathsList2" ), mMyPathsList2, TQStringList(TQString::fromLatin1("/usr/bin")) += TQDir::homeDirPath() );
- addItem( itemMyPathsList2, TQString::fromLatin1( "MyPathsList2" ) );
+ itemMyPathsList2 = new KConfigSkeleton::ItemPathList( currentGroup(), TQString::tqfromLatin1( "MyPathsList2" ), mMyPathsList2, TQStringList(TQString::tqfromLatin1("/usr/bin")) += TQDir::homeDirPath() );
+ addItem( itemMyPathsList2, TQString::tqfromLatin1( "MyPathsList2" ) );
}
Test9::~Test9()
diff --git a/kdecore/kconfig_compiler/tests/test9.h.ref b/kdecore/kconfig_compiler/tests/test9.h.ref
index 66a629b48..0476c8a19 100644
--- a/kdecore/kconfig_compiler/tests/test9.h.ref
+++ b/kdecore/kconfig_compiler/tests/test9.h.ref
@@ -19,7 +19,7 @@ class Test9 : public KConfigSkeleton
*/
void setMyStringList( const TQStringList & v )
{
- if (!isImmutable( TQString::fromLatin1( "MyStringList" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "MyStringList" ) ))
mMyStringList = v;
}
@@ -36,7 +36,7 @@ class Test9 : public KConfigSkeleton
*/
void setMyPathList( const TQStringList & v )
{
- if (!isImmutable( TQString::fromLatin1( "MyPathList" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "MyPathList" ) ))
mMyPathList = v;
}
@@ -53,7 +53,7 @@ class Test9 : public KConfigSkeleton
*/
void setMyPathsList2( const TQStringList & v )
{
- if (!isImmutable( TQString::fromLatin1( "MyPathsList2" ) ))
+ if (!isImmutable( TQString::tqfromLatin1( "MyPathsList2" ) ))
mMyPathsList2 = v;
}
diff --git a/kdecore/kconfig_compiler/tests/test9main.cpp b/kdecore/kconfig_compiler/tests/test9main.cpp
index 12e16e0d4..796ec0001 100644
--- a/kdecore/kconfig_compiler/tests/test9main.cpp
+++ b/kdecore/kconfig_compiler/tests/test9main.cpp
@@ -32,7 +32,7 @@ int main( int, char*[] )
kdWarning() << myPathsList2 << endl;
// add another path
- TQStringList newlist = TQDir::homeDirPath() + TQString::fromLatin1("/.kde");
+ TQStringList newlist = TQDir::homeDirPath() + TQString::tqfromLatin1("/.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 7b5f55f03..00e933564 100644
--- a/kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref
+++ b/kdecore/kconfig_compiler/tests/test_dpointer.cpp.ref
@@ -60,97 +60,97 @@ TestDPointer *TestDPointer::self()
}
TestDPointer::TestDPointer( )
- : KConfigSkeleton( TQString::fromLatin1( "korganizerrc" ) )
+ : KConfigSkeleton( TQString::tqfromLatin1( "korganizerrc" ) )
{
d = new TestDPointerPrivate;
mSelf = this;
- setCurrentGroup( TQString::fromLatin1( "General" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "General" ) );
- d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Auto Save" ), d->autoSave, false );
+ d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "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, TQString::fromLatin1( "AutoSave" ) );
- d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 );
+ addItem( d->autoSaveItem, TQString::tqfromLatin1( "AutoSave" ) );
+ d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Auto Save Interval" ), d->autoSaveInterval, 10 );
d->autoSaveIntervalItem->setLabel( i18n("Auto Save Interval") );
- addItem( d->autoSaveIntervalItem, TQString::fromLatin1( "AutoSaveInterval" ) );
- d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Confirm Deletes" ), d->confirm, true );
+ addItem( d->autoSaveIntervalItem, TQString::tqfromLatin1( "AutoSaveInterval" ) );
+ d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "Confirm Deletes" ), d->confirm, true );
d->confirmItem->setLabel( i18n("Confirm deletes") );
- addItem( d->confirmItem, TQString::fromLatin1( "Confirm" ) );
- d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Archive File" ), d->archiveFile );
+ addItem( d->confirmItem, TQString::tqfromLatin1( "Confirm" ) );
+ d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), TQString::tqfromLatin1( "Archive File" ), d->archiveFile );
d->archiveFileItem->setLabel( i18n("Archive File") );
- addItem( d->archiveFileItem, TQString::fromLatin1( "ArchiveFile" ) );
+ addItem( d->archiveFileItem, TQString::tqfromLatin1( "ArchiveFile" ) );
TQValueList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "standardDestination" );
+ choice.name = TQString::tqfromLatin1( "standardDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "askDestination" );
+ choice.name = TQString::tqfromLatin1( "askDestination" );
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "argl1" );
+ choice.name = TQString::tqfromLatin1( "argl1" );
choice.label = i18n("Argl1 Label");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "argl2" );
+ choice.name = TQString::tqfromLatin1( "argl2" );
choice.whatsThis = i18n("Argl2 Whatsthis");
valuesDestination.append( choice );
}
{
KConfigSkeleton::ItemEnum::Choice choice;
- choice.name = TQString::fromLatin1( "argl3" );
+ choice.name = TQString::tqfromLatin1( "argl3" );
choice.label = i18n("Argl3 Label");
choice.whatsThis = i18n("Argl3 Whatsthis");
valuesDestination.append( choice );
}
- d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination );
+ d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), TQString::tqfromLatin1( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination );
d->destinationItem->setLabel( i18n("New Events/Todos Should") );
- addItem( d->destinationItem, TQString::fromLatin1( "Destination" ) );
+ addItem( d->destinationItem, TQString::tqfromLatin1( "Destination" ) );
- setCurrentGroup( TQString::fromLatin1( "Views" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Views" ) );
- d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Hour Size" ), d->hourSize, 10 );
+ d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), TQString::tqfromLatin1( "Hour Size" ), d->hourSize, 10 );
d->hourSizeItem->setLabel( i18n("Hour Size") );
- addItem( d->hourSizeItem, TQString::fromLatin1( "HourSize" ) );
- d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false );
+ addItem( d->hourSizeItem, TQString::tqfromLatin1( "HourSize" ) );
+ d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), TQString::tqfromLatin1( "SelectionStartsEditor" ), d->selectionStartsEditor, false );
d->selectionStartsEditorItem->setLabel( i18n("Time range selection in agenda view starts event editor") );
- addItem( d->selectionStartsEditorItem, TQString::fromLatin1( "SelectionStartsEditor" ) );
+ addItem( d->selectionStartsEditorItem, TQString::tqfromLatin1( "SelectionStartsEditor" ) );
- setCurrentGroup( TQString::fromLatin1( "KOrganizer Plugins" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "KOrganizer Plugins" ) );
TQStringList defaultSelectedPlugins;
defaultSelectedPlugins.append( TQString::fromUtf8( "holidays" ) );
defaultSelectedPlugins.append( TQString::fromUtf8( "webexport" ) );
- d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::fromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins );
+ d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), TQString::tqfromLatin1( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins );
d->selectedPluginsItem->setLabel( i18n("SelectedPlugins") );
- addItem( d->selectedPluginsItem, TQString::fromLatin1( "SelectedPlugins" ) );
+ addItem( d->selectedPluginsItem, TQString::tqfromLatin1( "SelectedPlugins" ) );
- setCurrentGroup( TQString::fromLatin1( "Colors" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Colors" ) );
- d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Highlight Color" ), d->highlightColor, TQColor( 100, 100, 255 ) );
+ d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "Highlight Color" ), d->highlightColor, TQColor( 100, 100, 255 ) );
d->highlightColorItem->setLabel( i18n("Highlight color") );
- addItem( d->highlightColorItem, TQString::fromLatin1( "HighlightColor" ) );
- d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Agenda Background Color" ), d->agendaBgColor, TQColor( 255, 255, 255 ) );
+ addItem( d->highlightColorItem, TQString::tqfromLatin1( "HighlightColor" ) );
+ d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), TQString::tqfromLatin1( "Agenda Background Color" ), d->agendaBgColor, TQColor( 255, 255, 255 ) );
d->agendaBgColorItem->setLabel( i18n("Agenda view background color") );
- addItem( d->agendaBgColorItem, TQString::fromLatin1( "AgendaBgColor" ) );
+ addItem( d->agendaBgColorItem, TQString::tqfromLatin1( "AgendaBgColor" ) );
- setCurrentGroup( TQString::fromLatin1( "Fonts" ) );
+ setCurrentGroup( TQString::tqfromLatin1( "Fonts" ) );
- d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "TimeBar Font" ), d->timeBarFont );
+ d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), TQString::tqfromLatin1( "TimeBar Font" ), d->timeBarFont );
d->timeBarFontItem->setLabel( i18n("Time bar") );
- addItem( d->timeBarFontItem, TQString::fromLatin1( "TimeBarFont" ) );
+ addItem( d->timeBarFontItem, TQString::tqfromLatin1( "TimeBarFont" ) );
}
void TestDPointer::setAutoSave( bool v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "AutoSave" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "AutoSave" ) ))
self()->d->autoSave = v;
}
@@ -167,7 +167,7 @@ KConfigSkeleton::ItemBool *TestDPointer::autoSaveItem()
void TestDPointer::setAutoSaveInterval( int v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "AutoSaveInterval" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "AutoSaveInterval" ) ))
self()->d->autoSaveInterval = v;
}
@@ -184,7 +184,7 @@ KConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem()
void TestDPointer::setConfirm( bool v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "Confirm" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "Confirm" ) ))
self()->d->confirm = v;
}
@@ -201,7 +201,7 @@ KConfigSkeleton::ItemBool *TestDPointer::confirmItem()
void TestDPointer::setArchiveFile( const TQString & v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "ArchiveFile" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "ArchiveFile" ) ))
self()->d->archiveFile = v;
}
@@ -218,7 +218,7 @@ KConfigSkeleton::ItemString *TestDPointer::archiveFileItem()
void TestDPointer::setDestination( int v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "Destination" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "Destination" ) ))
self()->d->destination = v;
}
@@ -235,7 +235,7 @@ KConfigSkeleton::ItemEnum *TestDPointer::destinationItem()
void TestDPointer::setHourSize( int v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "HourSize" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "HourSize" ) ))
self()->d->hourSize = v;
}
@@ -252,7 +252,7 @@ KConfigSkeleton::ItemInt *TestDPointer::hourSizeItem()
void TestDPointer::setSelectionStartsEditor( bool v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "SelectionStartsEditor" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "SelectionStartsEditor" ) ))
self()->d->selectionStartsEditor = v;
}
@@ -269,7 +269,7 @@ KConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem()
void TestDPointer::setSelectedPlugins( const TQStringList & v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "SelectedPlugins" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "SelectedPlugins" ) ))
self()->d->selectedPlugins = v;
}
@@ -286,7 +286,7 @@ KConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem()
void TestDPointer::setHighlightColor( const TQColor & v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "HighlightColor" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "HighlightColor" ) ))
self()->d->highlightColor = v;
}
@@ -303,7 +303,7 @@ KConfigSkeleton::ItemColor *TestDPointer::highlightColorItem()
void TestDPointer::setAgendaBgColor( const TQColor & v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "AgendaBgColor" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "AgendaBgColor" ) ))
self()->d->agendaBgColor = v;
}
@@ -320,7 +320,7 @@ KConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem()
void TestDPointer::setTimeBarFont( const TQFont & v )
{
- if (!self()->isImmutable( TQString::fromLatin1( "TimeBarFont" ) ))
+ if (!self()->isImmutable( TQString::tqfromLatin1( "TimeBarFont" ) ))
self()->d->timeBarFont = v;
}
diff --git a/kdecore/kconfigbackend.cpp b/kdecore/kconfigbackend.cpp
index 234124820..192ef9b20 100644
--- a/kdecore/kconfigbackend.cpp
+++ b/kdecore/kconfigbackend.cpp
@@ -114,8 +114,8 @@ static TQCString printableToString(const char *str, int l)
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();
+ register char *r = const_cast<TQCString&>(result).data();
+ register char *s = const_cast<TQCString&>(str).data();
if (!s) return TQCString("");
@@ -198,8 +198,8 @@ static TQCString encodeGroup(const TQCString &str)
{
int l = str.length();
TQCString result(l*2+1);
- register char *r = result.data();
- register char *s = str.data();
+ register char *r = const_cast<TQCString&>(result).data();
+ register char *s = const_cast<TQCString&>(str).data();
while(l)
{
if ((*s == '[') || (*s == ']'))
@@ -256,7 +256,7 @@ void KConfigBackEnd::changeFileName(const TQString &_fileName,
if (useKDEGlobals)
mGlobalFileName = KGlobal::dirs()->saveLocation("config") +
- TQString::fromLatin1("kdeglobals");
+ TQString::tqfromLatin1("kdeglobals");
else
mGlobalFileName = TQString::null;
@@ -347,19 +347,19 @@ bool KConfigINIBackEnd::parseConfigFiles()
// Parse the general config files
if (useKDEGlobals) {
TQStringList kdercs = KGlobal::dirs()->
- findAllResources("config", TQString::fromLatin1("kdeglobals"));
+ findAllResources("config", TQString::tqfromLatin1("kdeglobals"));
#ifdef Q_WS_WIN
TQString etc_kderc = TQFile::decodeName( TQCString(getenv("WINDIR")) + "\\kderc" );
#else
- TQString etc_kderc = TQString::fromLatin1("/etc/kderc");
+ TQString etc_kderc = TQString::tqfromLatin1("/etc/kderc");
#endif
if (checkAccess(etc_kderc, R_OK))
kdercs += etc_kderc;
kdercs += KGlobal::dirs()->
- findAllResources("config", TQString::fromLatin1("system.kdeglobals"));
+ findAllResources("config", TQString::tqfromLatin1("system.kdeglobals"));
TQStringList::ConstIterator it;
@@ -999,7 +999,7 @@ bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal,
const KEntry &currentEntry = *aIt;
if(aIt.key().bDefault)
{
- aTempMap.replace(aIt.key(), currentEntry);
+ aTempMap.tqreplace(aIt.key(), currentEntry);
continue;
}
@@ -1017,7 +1017,7 @@ bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal,
// put this entry from the config object into the
// temporary map, possibly replacing an existing entry
- KEntryMapIterator aIt2 = aTempMap.find(aIt.key());
+ KEntryMapIterator aIt2 = aTempMap.tqfind(aIt.key());
if (aIt2 != aTempMap.end() && (*aIt2).bImmutable)
continue; // Bail out if the on-disk entry is immutable
diff --git a/kdecore/kconfigbase.cpp b/kdecore/kconfigbase.cpp
index 1cbe1f3ab..8319e3aa1 100644
--- a/kdecore/kconfigbase.cpp
+++ b/kdecore/kconfigbase.cpp
@@ -272,7 +272,7 @@ TQString KConfigBase::readEntry( const char *pKey,
if( expand || bExpand )
{
// check for environment variables and make necessary translations
- int nDollarPos = aValue.find( '$' );
+ int nDollarPos = aValue.tqfind( '$' );
while( nDollarPos != -1 && nDollarPos+1 < static_cast<int>(aValue.length())) {
// there is at least one $
@@ -328,7 +328,7 @@ TQString KConfigBase::readEntry( const char *pKey,
aValue.remove( nDollarPos, 1 );
nDollarPos++;
}
- nDollarPos = aValue.find( '$', nDollarPos );
+ nDollarPos = aValue.tqfind( '$', nDollarPos );
}
}
@@ -423,7 +423,7 @@ TQVariant KConfigBase::readPropertyEntry( const char *pKey,
case TQVariant::DateTime:
return TQVariant( readDateTimeEntry( pKey, &tmp.asDateTime() ) );
case TQVariant::Date:
- return TQVariant(readDateTimeEntry( pKey, &tmp.asDateTime() ).date());
+ return TQVariant(TQT_TQDATE_OBJECT(readDateTimeEntry( pKey, &tmp.asDateTime() ).date()));
case TQVariant::Pixmap:
case TQVariant::Image:
@@ -457,7 +457,7 @@ TQVariant KConfigBase::readPropertyEntry( const char *pKey,
case TQVariant::RegExp:
case TQVariant::Hash:
case TQVariant::TextLength:
- case TQVariant::TextFormat:
+ case QVariant::TextFormat:
case TQVariant::Matrix:
case TQVariant::Transform:
case TQVariant::Matrix4x4:
@@ -697,12 +697,12 @@ unsigned long KConfigBase::readUnsignedLongNumEntry( const char *pKey, unsigned
}
}
-Q_INT64 KConfigBase::readNum64Entry( const TQString& pKey, Q_INT64 nDefault) const
+TQ_INT64 KConfigBase::readNum64Entry( const TQString& pKey, TQ_INT64 nDefault) const
{
return readNum64Entry(pKey.utf8().data(), nDefault);
}
-Q_INT64 KConfigBase::readNum64Entry( const char *pKey, Q_INT64 nDefault) const
+TQ_INT64 KConfigBase::readNum64Entry( const char *pKey, TQ_INT64 nDefault) const
{
// Note that TQCString::toLongLong() is missing, we muse use a TQString instead.
TQString aValue = readEntry( pKey );
@@ -711,18 +711,18 @@ Q_INT64 KConfigBase::readNum64Entry( const char *pKey, Q_INT64 nDefault) const
else
{
bool ok;
- Q_INT64 rc = aValue.toLongLong( &ok );
+ TQ_INT64 rc = aValue.toLongLong( &ok );
return( ok ? rc : nDefault );
}
}
-Q_UINT64 KConfigBase::readUnsignedNum64Entry( const TQString& pKey, Q_UINT64 nDefault) const
+TQ_UINT64 KConfigBase::readUnsignedNum64Entry( const TQString& pKey, TQ_UINT64 nDefault) const
{
return readUnsignedNum64Entry(pKey.utf8().data(), nDefault);
}
-Q_UINT64 KConfigBase::readUnsignedNum64Entry( const char *pKey, Q_UINT64 nDefault) const
+TQ_UINT64 KConfigBase::readUnsignedNum64Entry( const char *pKey, TQ_UINT64 nDefault) const
{
// Note that TQCString::toULongLong() is missing, we muse use a TQString instead.
TQString aValue = readEntry( pKey );
@@ -731,7 +731,7 @@ Q_UINT64 KConfigBase::readUnsignedNum64Entry( const char *pKey, Q_UINT64 nDefaul
else
{
bool ok;
- Q_UINT64 rc = aValue.toULongLong( &ok );
+ TQ_UINT64 rc = aValue.toULongLong( &ok );
return( ok ? rc : nDefault );
}
}
@@ -793,7 +793,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co
TQString aValue = readEntry( pKey );
if( !aValue.isNull() ) {
- if ( aValue.contains( ',' ) > 5 ) {
+ if ( aValue.tqcontains( ',' ) > 5 ) {
// KDE3 and upwards entry
if ( !aRetFont.fromString( aValue ) && pDefault )
aRetFont = *pDefault;
@@ -802,7 +802,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co
// backward compatibility with older font formats
// ### remove KDE 3.1 ?
// find first part (font family)
- int nIndex = aValue.find( ',' );
+ int nIndex = aValue.tqfind( ',' );
if( nIndex == -1 ){
if( pDefault )
aRetFont = *pDefault;
@@ -812,7 +812,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co
// find second part (point size)
int nOldIndex = nIndex;
- nIndex = aValue.find( ',', nOldIndex+1 );
+ nIndex = aValue.tqfind( ',', nOldIndex+1 );
if( nIndex == -1 ){
if( pDefault )
aRetFont = *pDefault;
@@ -824,7 +824,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co
// find third part (style hint)
nOldIndex = nIndex;
- nIndex = aValue.find( ',', nOldIndex+1 );
+ nIndex = aValue.tqfind( ',', nOldIndex+1 );
if( nIndex == -1 ){
if( pDefault )
@@ -836,7 +836,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co
// find fourth part (char set)
nOldIndex = nIndex;
- nIndex = aValue.find( ',', nOldIndex+1 );
+ nIndex = aValue.tqfind( ',', nOldIndex+1 );
if( nIndex == -1 ){
if( pDefault )
@@ -848,7 +848,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co
nIndex-nOldIndex-1 );
// find fifth part (weight)
nOldIndex = nIndex;
- nIndex = aValue.find( ',', nOldIndex+1 );
+ nIndex = aValue.tqfind( ',', nOldIndex+1 );
if( nIndex == -1 ){
if( pDefault )
@@ -979,7 +979,7 @@ TQColor KConfigBase::readColorEntry( const char *pKey,
bool bOK;
// find first part (red)
- int nIndex = aValue.find( ',' );
+ int nIndex = aValue.tqfind( ',' );
if( nIndex == -1 ){
// return a sensible default -- Bernd
@@ -992,7 +992,7 @@ TQColor KConfigBase::readColorEntry( const char *pKey,
// find second part (green)
int nOldIndex = nIndex;
- nIndex = aValue.find( ',', nOldIndex+1 );
+ nIndex = aValue.tqfind( ',', nOldIndex+1 );
if( nIndex == -1 ){
// return a sensible default -- Bernd
@@ -1025,7 +1025,7 @@ TQDateTime KConfigBase::readDateTimeEntry( const TQString& pKey,
return readDateTimeEntry(pKey.utf8().data(), pDefault);
}
-// ### currentDateTime() as fallback ? (Harri)
+// ### tqcurrentDateTime() as fallback ? (Harri)
TQDateTime KConfigBase::readDateTimeEntry( const char *pKey,
const TQDateTime* pDefault ) const
{
@@ -1034,7 +1034,7 @@ TQDateTime KConfigBase::readDateTimeEntry( const char *pKey,
if( pDefault )
return *pDefault;
else
- return TQDateTime::currentDateTime();
+ return TQDateTime::tqcurrentDateTime();
}
TQStrList list;
@@ -1048,7 +1048,7 @@ TQDateTime KConfigBase::readDateTimeEntry( const char *pKey,
return TQDateTime( date, time );
}
- return TQDateTime::currentDateTime();
+ return TQDateTime::tqcurrentDateTime();
}
void KConfigBase::writeEntry( const TQString& pKey, const TQString& value,
@@ -1121,7 +1121,7 @@ static bool cleanHomeDirPath( TQString &path, const TQString &homeDir )
unsigned int len = homeDir.length();
// replace by "$HOME" if possible
if (len && (path.length() == len || path[len] == '/')) {
- path.replace(0, len, TQString::fromLatin1("$HOME"));
+ path.replace(0, len, TQString::tqfromLatin1("$HOME"));
return true;
} else
return false;
@@ -1135,7 +1135,7 @@ static TQString translatePath( TQString path )
// only "our" $HOME should be interpreted
path.replace('$', "$$");
- bool startsWithFile = path.startsWith("file:", false);
+ bool startsWithFile = path.tqstartsWith("file:", false);
// return original path, if it refers to another type of URL (e.g. http:/), or
// if the path is already relative to another directory
@@ -1189,7 +1189,7 @@ void KConfigBase::writePathEntry ( const char *pKey, const TQStringList &list,
{
if( list.isEmpty() )
{
- writeEntry( pKey, TQString::fromLatin1(""), bPersistent );
+ writeEntry( pKey, TQString::tqfromLatin1(""), bPersistent );
return;
}
TQStringList new_list;
@@ -1373,7 +1373,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQVariant &prop,
case TQVariant::RegExp:
case TQVariant::Hash:
case TQVariant::TextLength:
- case TQVariant::TextFormat:
+ case QVariant::TextFormat:
case TQVariant::Matrix:
case TQVariant::Transform:
case TQVariant::Matrix4x4:
@@ -1402,7 +1402,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStrList &list,
{
if( list.isEmpty() )
{
- writeEntry( pKey, TQString::fromLatin1(""), bPersistent );
+ writeEntry( pKey, TQString::tqfromLatin1(""), bPersistent );
return;
}
TQString str_list;
@@ -1449,7 +1449,7 @@ void KConfigBase::writeEntry ( const char *pKey, const TQStringList &list,
{
if( list.isEmpty() )
{
- writeEntry( pKey, TQString::fromLatin1(""), bPersistent );
+ writeEntry( pKey, TQString::tqfromLatin1(""), bPersistent );
return;
}
TQString str_list;
@@ -1548,14 +1548,14 @@ void KConfigBase::writeEntry( const char *pKey, unsigned long nValue,
writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const TQString& pKey, Q_INT64 nValue,
+void KConfigBase::writeEntry( const TQString& pKey, TQ_INT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const char *pKey, Q_INT64 nValue,
+void KConfigBase::writeEntry( const char *pKey, TQ_INT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1563,14 +1563,14 @@ void KConfigBase::writeEntry( const char *pKey, Q_INT64 nValue,
}
-void KConfigBase::writeEntry( const TQString& pKey, Q_UINT64 nValue,
+void KConfigBase::writeEntry( const TQString& pKey, TQ_UINT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
writeEntry( pKey, TQString::number(nValue), bPersistent, bGlobal, bNLS );
}
-void KConfigBase::writeEntry( const char *pKey, Q_UINT64 nValue,
+void KConfigBase::writeEntry( const char *pKey, TQ_UINT64 nValue,
bool bPersistent, bool bGlobal,
bool bNLS )
{
@@ -1631,7 +1631,7 @@ void KConfigBase::writeEntry( const char *pKey, const TQFont& rFont,
bool bPersistent, bool bGlobal,
bool bNLS )
{
- writeEntry( pKey, rFont.toString(), bPersistent, bGlobal, bNLS );
+ writeEntry( pKey, TQString(rFont.toString()), bPersistent, bGlobal, bNLS );
}
@@ -1732,8 +1732,8 @@ void KConfigBase::writeEntry( const char *pKey, const TQDateTime& rDateTime,
TQStrList list;
TQCString tempstr;
- TQTime time = rDateTime.time();
- TQDate date = rDateTime.date();
+ TQTime time = TQT_TQTIME_OBJECT(rDateTime.time());
+ TQDate date = TQT_TQDATE_OBJECT(rDateTime.date());
list.insert( 0, tempstr.setNum( date.year() ) );
list.insert( 1, tempstr.setNum( date.month() ) );
diff --git a/kdecore/kconfigbase.h b/kdecore/kconfigbase.h
index cc7ad8ffe..4f3dd545b 100644
--- a/kdecore/kconfigbase.h
+++ b/kdecore/kconfigbase.h
@@ -67,9 +67,10 @@ class KConfigGroup;
* @see KSimpleConfig
* @see KSharedConfig
*/
-class KDECORE_EXPORT KConfigBase : public QObject
+class KDECORE_EXPORT KConfigBase : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
friend class KConfigBackEnd;
friend class KConfigINIBackEnd;
@@ -461,7 +462,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- Q_INT64 readNum64Entry( const TQString& pKey, Q_INT64 nDefault = 0 ) const;
+ TQ_INT64 readNum64Entry( const TQString& pKey, TQ_INT64 nDefault = 0 ) const;
/**
* Reads a 64-bit numerical value.
@@ -474,7 +475,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- Q_INT64 readNum64Entry( const char *pKey, Q_INT64 nDefault = 0 ) const;
+ TQ_INT64 readNum64Entry( const char *pKey, TQ_INT64 nDefault = 0 ) const;
/**
* Read an 64-bit unsigned numerical value.
@@ -487,7 +488,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- Q_UINT64 readUnsignedNum64Entry( const TQString& pKey, Q_UINT64 nDefault = 0 ) const;
+ TQ_UINT64 readUnsignedNum64Entry( const TQString& pKey, TQ_UINT64 nDefault = 0 ) const;
/**
* Read an 64-bit unsigned numerical value.
@@ -500,7 +501,7 @@ public:
* the read value cannot be interpreted.
* @return The value for this key.
*/
- Q_UINT64 readUnsignedNum64Entry( const char *pKey, Q_UINT64 nDefault = 0 ) const;
+ TQ_UINT64 readUnsignedNum64Entry( const char *pKey, TQ_UINT64 nDefault = 0 ) const;
/**
* Reads a floating point value.
@@ -692,7 +693,7 @@ public:
* and interpret it as a date and time.
*
* @param pKey The key to search for.
- * @param pDefault A default value ( currentDateTime() by default)
+ * @param pDefault A default value ( tqcurrentDateTime() by default)
* returned if the key was not found or if the read value cannot be
* interpreted.
* @return The value for this key.
@@ -706,7 +707,7 @@ public:
* and interpret it as a date and time.
*
* @param pKey The key to search for.
- * @param pDefault A default value ( currentDateTime() by default)
+ * @param pDefault A default value ( tqcurrentDateTime() by default)
* returned if the key was not found or if the read value cannot be
* interpreted.
* @return The value for this key.
@@ -978,7 +979,7 @@ public:
void writeEntry( const TQString& pKey, const char *pValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false )
- { writeEntry(pKey, TQString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
+ { writeEntry(pKey, TQString::tqfromLatin1(pValue), bPersistent, bGlobal, bNLS); }
/**
* Write a (key/value) pair.
*
@@ -999,7 +1000,7 @@ public:
void writeEntry( const char *pKey, const char *pValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false )
- { writeEntry(pKey, TQString::fromLatin1(pValue), bPersistent, bGlobal, bNLS); }
+ { writeEntry(pKey, TQString::tqfromLatin1(pValue), bPersistent, bGlobal, bNLS); }
/**
* Write a (key/value) pair.
@@ -1159,7 +1160,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const TQString& pKey, Q_INT64 nValue,
+ void writeEntry( const TQString& pKey, TQ_INT64 nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1176,7 +1177,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, Q_INT64 nValue,
+ void writeEntry( const char *pKey, TQ_INT64 nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
@@ -1194,7 +1195,7 @@ public:
* @param bNLS If @p bNLS is true, the locale tag is added to the key
* when writing it back.
*/
- void writeEntry( const TQString& pKey, Q_UINT64 nValue,
+ void writeEntry( const TQString& pKey, TQ_UINT64 nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
/**
@@ -1211,7 +1212,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, Q_UINT64 nValue,
+ void writeEntry( const char *pKey, TQ_UINT64 nValue,
bool bPersistent = true, bool bGlobal = false,
bool bNLS = false );
diff --git a/kdecore/kconfigdialogmanager.cpp b/kdecore/kconfigdialogmanager.cpp
index 1d89bf49b..86495dca8 100644
--- a/kdecore/kconfigdialogmanager.cpp
+++ b/kdecore/kconfigdialogmanager.cpp
@@ -131,13 +131,13 @@ void KConfigDialogManager::setupWidget(TQWidget *widget, KConfigSkeletonItem *it
TQVariant minValue = item->minValue();
if (minValue.isValid())
{
- if (widget->metaObject()->findProperty("minValue", true) != -1)
+ if (widget->tqmetaObject()->tqfindProperty("minValue", true) != -1)
widget->setProperty("minValue", minValue);
}
TQVariant maxValue = item->maxValue();
if (maxValue.isValid())
{
- if (widget->metaObject()->findProperty("maxValue", true) != -1)
+ if (widget->tqmetaObject()->tqfindProperty("maxValue", true) != -1)
widget->setProperty("maxValue", maxValue);
}
if (TQWhatsThis::textFor( widget ).isEmpty())
@@ -153,12 +153,12 @@ void KConfigDialogManager::setupWidget(TQWidget *widget, KConfigSkeletonItem *it
bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChanges)
{
bool valueChanged = false;
- const TQObjectList *listOfChildren = widget->children();
- if(!listOfChildren)
+ const TQObjectList listOfChildren = widget->childrenListObject();
+ if(listOfChildren.isEmpty())
return valueChanged;
TQObject *object;
- for( TQObjectListIterator it( *listOfChildren );
+ for( TQObjectListIterator it( listOfChildren );
(object = it.current()); ++it )
{
if(!object->isWidgetType())
@@ -181,7 +181,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang
setupWidget(childWidget, item);
- TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.find(childWidget->className());
+ TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.tqfind(childWidget->className());
if (changedIt == changedMap.end())
{
@@ -189,7 +189,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang
// it again using the super class name. This fixes a problem with using QtRuby/Korundum
// widgets with KConfigXT where 'Qt::Widget' wasn't being seen a the real deal, even
// though it was a 'QWidget'.
- changedIt = changedMap.find(childWidget->metaObject()->superClassName());
+ changedIt = changedMap.tqfind(childWidget->tqmetaObject()->tqsuperClassName());
}
if (changedIt == changedMap.end())
@@ -236,7 +236,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang
#ifndef NDEBUG
else if (widgetName)
{
- TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.find(childWidget->className());
+ TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.tqfind(childWidget->className());
if (changedIt != changedMap.end())
{
if ((!d->insideGroupBox || !childWidget->inherits("QRadioButton")) &&
@@ -284,7 +284,7 @@ void KConfigDialogManager::updateWidgets()
if (item->isImmutable())
{
widget->setEnabled(false);
- TQWidget *buddy = d->buddyWidget.find(it.currentKey());
+ TQWidget *buddy = d->buddyWidget.tqfind(it.currentKey());
if (buddy)
buddy->setEnabled(false);
}
diff --git a/kdecore/kconfigskeleton.cpp b/kdecore/kconfigskeleton.cpp
index 9e6070d6a..58b889018 100644
--- a/kdecore/kconfigskeleton.cpp
+++ b/kdecore/kconfigskeleton.cpp
@@ -223,8 +223,8 @@ void KConfigSkeleton::ItemInt::setMaxValue(int v)
KConfigSkeleton::ItemInt64::ItemInt64( const TQString &group, const TQString &key,
- Q_INT64 &reference, Q_INT64 defaultValue )
- : KConfigSkeletonGenericItem<Q_INT64>( group, key, reference, defaultValue )
+ TQ_INT64 &reference, TQ_INT64 defaultValue )
+ : KConfigSkeletonGenericItem<TQ_INT64>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
{
}
@@ -266,13 +266,13 @@ TQVariant KConfigSkeleton::ItemInt64::maxValue() const
return TQVariant();
}
-void KConfigSkeleton::ItemInt64::setMinValue(Q_INT64 v)
+void KConfigSkeleton::ItemInt64::setMinValue(TQ_INT64 v)
{
mHasMin = true;
mMin = v;
}
-void KConfigSkeleton::ItemInt64::setMaxValue(Q_INT64 v)
+void KConfigSkeleton::ItemInt64::setMaxValue(TQ_INT64 v)
{
mHasMax = true;
mMax = v;
@@ -394,8 +394,8 @@ void KConfigSkeleton::ItemUInt::setMaxValue(unsigned int v)
KConfigSkeleton::ItemUInt64::ItemUInt64( const TQString &group, const TQString &key,
- Q_UINT64 &reference, Q_UINT64 defaultValue )
- : KConfigSkeletonGenericItem<Q_UINT64>( group, key, reference, defaultValue )
+ TQ_UINT64 &reference, TQ_UINT64 defaultValue )
+ : KConfigSkeletonGenericItem<TQ_UINT64>( group, key, reference, defaultValue )
,mHasMin(false), mHasMax(false)
{
}
@@ -437,13 +437,13 @@ TQVariant KConfigSkeleton::ItemUInt64::maxValue() const
return TQVariant();
}
-void KConfigSkeleton::ItemUInt64::setMinValue(Q_UINT64 v)
+void KConfigSkeleton::ItemUInt64::setMinValue(TQ_UINT64 v)
{
mHasMin = true;
mMin = v;
}
-void KConfigSkeleton::ItemUInt64::setMaxValue(Q_UINT64 v)
+void KConfigSkeleton::ItemUInt64::setMaxValue(TQ_UINT64 v)
{
mHasMax = true;
mMax = v;
@@ -476,20 +476,20 @@ void KConfigSkeleton::ItemLong::setProperty(const TQVariant & p)
TQVariant KConfigSkeleton::ItemLong::property() const
{
- return TQVariant((Q_LLONG) mReference);
+ return TQVariant((TQ_LLONG) mReference);
}
TQVariant KConfigSkeleton::ItemLong::minValue() const
{
if (mHasMin)
- return TQVariant((Q_LLONG) mMin);
+ return TQVariant((TQ_LLONG) mMin);
return TQVariant();
}
TQVariant KConfigSkeleton::ItemLong::maxValue() const
{
if (mHasMax)
- return TQVariant((Q_LLONG) mMax);
+ return TQVariant((TQ_LLONG) mMax);
return TQVariant();
}
@@ -534,20 +534,20 @@ void KConfigSkeleton::ItemULong::setProperty(const TQVariant & p)
TQVariant KConfigSkeleton::ItemULong::property() const
{
- return TQVariant((Q_ULLONG) mReference);
+ return TQVariant((TQ_ULLONG) mReference);
}
TQVariant KConfigSkeleton::ItemULong::minValue() const
{
if (mHasMin)
- return TQVariant((Q_ULLONG) mMin);
+ return TQVariant((TQ_ULLONG) mMin);
return TQVariant();
}
TQVariant KConfigSkeleton::ItemULong::maxValue() const
{
if (mHasMax)
- return TQVariant((Q_ULLONG) mMax);
+ return TQVariant((TQ_ULLONG) mMax);
return TQVariant();
}
@@ -1065,8 +1065,8 @@ KConfigSkeleton::ItemUInt *KConfigSkeleton::addItemUInt( const TQString &name, u
return item;
}
-KConfigSkeleton::ItemInt64 *KConfigSkeleton::addItemInt64( const TQString &name, Q_INT64 &reference,
- Q_INT64 defaultValue, const TQString &key )
+KConfigSkeleton::ItemInt64 *KConfigSkeleton::addItemInt64( const TQString &name, TQ_INT64 &reference,
+ TQ_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 TQString &name,
return item;
}
-KConfigSkeleton::ItemUInt64 *KConfigSkeleton::addItemUInt64( const TQString &name, Q_UINT64 &reference,
- Q_UINT64 defaultValue, const TQString &key )
+KConfigSkeleton::ItemUInt64 *KConfigSkeleton::addItemUInt64( const TQString &name, TQ_UINT64 &reference,
+ TQ_UINT64 defaultValue, const TQString &key )
{
KConfigSkeleton::ItemUInt64 *item;
item = new KConfigSkeleton::ItemUInt64( mCurrentGroup, key.isNull() ? name : key,
@@ -1203,5 +1203,5 @@ bool KConfigSkeleton::isImmutable(const TQString &name)
KConfigSkeletonItem *KConfigSkeleton::findItem(const TQString &name)
{
- return mItemDict.find(name);
+ return mItemDict.tqfind(name);
}
diff --git a/kdecore/kconfigskeleton.h b/kdecore/kconfigskeleton.h
index 82185c090..c3e9f4a57 100644
--- a/kdecore/kconfigskeleton.h
+++ b/kdecore/kconfigskeleton.h
@@ -376,7 +376,7 @@ public:
ItemString(const TQString & group, const TQString & key,
TQString & reference,
- const TQString & defaultValue = TQString::fromLatin1(""), // NOT TQString::null !!
+ const TQString & defaultValue = TQString::tqfromLatin1(""), // NOT TQString::null !!
Type type = Normal);
void writeConfig(KConfig * config);
@@ -396,7 +396,7 @@ public:
public:
ItemPassword(const TQString & group, const TQString & key,
TQString & reference,
- const TQString & defaultValue = TQString::fromLatin1("")); // NOT TQString::null !!
+ const TQString & defaultValue = TQString::tqfromLatin1("")); // NOT TQString::null !!
};
/**
@@ -469,11 +469,11 @@ public:
/**
* Class for handling an 64-bit integer preferences item.
*/
- class KDECORE_EXPORT ItemInt64:public KConfigSkeletonGenericItem < Q_INT64 >
+ class KDECORE_EXPORT ItemInt64:public KConfigSkeletonGenericItem < TQ_INT64 >
{
public:
- ItemInt64(const TQString & group, const TQString & key, Q_INT64 &reference,
- Q_INT64 defaultValue = 0);
+ ItemInt64(const TQString & group, const TQString & key, TQ_INT64 &reference,
+ TQ_INT64 defaultValue = 0);
void readConfig(KConfig * config);
void setProperty(const TQVariant & p);
@@ -482,14 +482,14 @@ public:
TQVariant minValue() const;
TQVariant maxValue() const;
- void setMinValue(Q_INT64);
- void setMaxValue(Q_INT64);
+ void setMinValue(TQ_INT64);
+ void setMaxValue(TQ_INT64);
private:
bool mHasMin : 1;
bool mHasMax : 1;
- Q_INT64 mMin;
- Q_INT64 mMax;
+ TQ_INT64 mMin;
+ TQ_INT64 mMax;
};
/**
@@ -598,11 +598,11 @@ public:
/**
* Class for handling unsigned 64-bit integer preferences item.
*/
- class KDECORE_EXPORT ItemUInt64:public KConfigSkeletonGenericItem < Q_UINT64 >
+ class KDECORE_EXPORT ItemUInt64:public KConfigSkeletonGenericItem < TQ_UINT64 >
{
public:
- ItemUInt64(const TQString & group, const TQString & key, Q_UINT64 &reference,
- Q_UINT64 defaultValue = 0);
+ ItemUInt64(const TQString & group, const TQString & key, TQ_UINT64 &reference,
+ TQ_UINT64 defaultValue = 0);
void readConfig(KConfig * config);
void setProperty(const TQVariant & p);
@@ -611,14 +611,14 @@ public:
TQVariant minValue() const;
TQVariant maxValue() const;
- void setMinValue(Q_UINT64);
- void setMaxValue(Q_UINT64);
+ void setMinValue(TQ_UINT64);
+ void setMaxValue(TQ_UINT64);
private:
bool mHasMin : 1;
bool mHasMax : 1;
- Q_UINT64 mMin;
- Q_UINT64 mMax;
+ TQ_UINT64 mMin;
+ TQ_UINT64 mMax;
};
/**
@@ -859,7 +859,7 @@ public:
* @return The created item
*/
ItemString *addItemString(const TQString & name, TQString & reference,
- const TQString & defaultValue = TQString::fromLatin1(""), // NOT TQString::null !!
+ const TQString & defaultValue = TQString::tqfromLatin1(""), // NOT TQString::null !!
const TQString & key = TQString::null);
/**
@@ -876,7 +876,7 @@ public:
* @return The created item
*/
ItemPassword *addItemPassword(const TQString & name, TQString & reference,
- const TQString & defaultValue = TQString::fromLatin1(""),
+ const TQString & defaultValue = TQString::tqfromLatin1(""),
const TQString & key = TQString::null);
/**
@@ -893,7 +893,7 @@ public:
* @return The created item
*/
ItemPath *addItemPath(const TQString & name, TQString & reference,
- const TQString & defaultValue = TQString::fromLatin1(""),
+ const TQString & defaultValue = TQString::tqfromLatin1(""),
const TQString & key = TQString::null);
/**
@@ -987,7 +987,7 @@ public:
const TQString & key = TQString::null);
/**
- * Register an item of type Q_INT64.
+ * Register an item of type TQ_INT64.
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -997,12 +997,12 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemInt64 *addItemInt64(const TQString & name, Q_INT64 &reference,
- Q_INT64 defaultValue = 0,
+ ItemInt64 *addItemInt64(const TQString & name, TQ_INT64 &reference,
+ TQ_INT64 defaultValue = 0,
const TQString & key = TQString::null);
/**
- * Register an item of type Q_UINT64
+ * Register an item of type TQ_UINT64
*
* @param name Name used to indentify this setting. Names must be unique.
* @param reference Pointer to the variable, which is set by readConfig()
@@ -1012,8 +1012,8 @@ public:
* @param key Key used in config file. If key is null, name is used as key.
* @return The created item
*/
- ItemUInt64 *addItemUInt64(const TQString & name, Q_UINT64 &reference,
- Q_UINT64 defaultValue = 0,
+ ItemUInt64 *addItemUInt64(const TQString & name, TQ_UINT64 &reference,
+ TQ_UINT64 defaultValue = 0,
const TQString & key = TQString::null);
/**
diff --git a/kdecore/kdcoppropertyproxy.cpp b/kdecore/kdcoppropertyproxy.cpp
index bc720736f..22390a4c4 100644
--- a/kdecore/kdcoppropertyproxy.cpp
+++ b/kdecore/kdcoppropertyproxy.cpp
@@ -94,12 +94,12 @@ TQValueList<TQCString> KDCOPPropertyProxy::functions( TQObject *object )
res << "bool setProperty(TQCString name,TQVariant property)";
res << "TQValueList<TQCString> propertyNames(bool super)";
- TQMetaObject *metaObj = object->metaObject();
+ TQMetaObject *metaObj = object->tqmetaObject();
TQStrList properties = metaObj->propertyNames( true );
TQStrListIterator it( properties );
for (; it.current(); ++it )
{
- const TQMetaProperty *metaProp = metaObj->property( metaObj->findProperty( it.current(), true ), true );
+ const TQMetaProperty *metaProp = metaObj->property( metaObj->tqfindProperty( it.current(), true ), true );
assert( metaProp );
@@ -146,18 +146,18 @@ bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQB
replyType = "bool";
TQDataStream reply( replyData, IO_WriteOnly );
- reply << (Q_INT8)object->setProperty( propName, propValue );
+ reply << (TQ_INT8)object->setProperty( propName, propValue );
return true;
}
if ( fun == "propertyNames(bool)" )
{
- Q_INT8 b;
+ TQ_INT8 b;
TQDataStream stream( data, IO_ReadOnly );
stream >> b;
TQValueList<TQCString> res;
- TQStrList props = object->metaObject()->propertyNames( static_cast<bool>( b ) );
+ TQStrList props = object->tqmetaObject()->propertyNames( static_cast<bool>( b ) );
TQStrListIterator it( props );
for (; it.current(); ++it )
res.append( it.current() );
@@ -228,7 +228,7 @@ bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQB
DEMARSHAL( UInt, uint )
case TQVariant::Bool:
{
- Q_INT8 v;
+ TQ_INT8 v;
stream >> v;
prop = TQVariant( static_cast<bool>( v ), 1 );
}
@@ -283,7 +283,7 @@ bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQB
MARSHAL( Int )
MARSHAL( UInt )
case TQVariant::Bool:
- reply << (Q_INT8)prop.toBool();
+ reply << (TQ_INT8)prop.toBool();
break;
MARSHAL( Double )
default:
@@ -314,7 +314,7 @@ bool KDCOPPropertyProxy::decodePropertyRequestInternal( const TQCString &fun, TQ
propName.detach();
set = true;
propName = propName.mid( 3 );
- int p1 = propName.find( '(' );
+ int p1 = propName.tqfind( '(' );
uint len = propName.length();
@@ -328,7 +328,7 @@ bool KDCOPPropertyProxy::decodePropertyRequestInternal( const TQCString &fun, TQ
else
propName.truncate( propName.length() - 2 );
- if ( !object->metaObject()->propertyNames( true ).contains( propName ) )
+ if ( !object->tqmetaObject()->propertyNames( true ).tqcontains( propName ) )
return false;
return true;
diff --git a/kdecore/kde-config.cpp.in b/kdecore/kde-config.cpp.in
index da9d41782..eac5f43cf 100644
--- a/kdecore/kde-config.cpp.in
+++ b/kdecore/kde-config.cpp.in
@@ -32,67 +32,67 @@ bool _expandvars = false;
TQString expandvars(const char *_input)
{
- TQString result = TQString::fromLatin1(_input);
+ TQString result = TQString::tqfromLatin1(_input);
if (!_expandvars)
return result;
bool changed = false;
- int index = result.find("${prefix}");
+ int index = result.tqfind("${prefix}");
if (index >= 0) {
result = result.replace(index, 9, "@prefix@");
changed = true;
}
- index = result.find("$(prefix)");
+ index = result.tqfind("$(prefix)");
if (index >= 0) {
result = result.replace(index, 9, "@prefix@");
changed = true;
}
- index = result.find("${datadir}");
+ index = result.tqfind("${datadir}");
if (index >= 0) {
result = result.replace(index, 10, "@datadir@");
changed = true;
}
- index = result.find("$(datadir)");
+ index = result.tqfind("$(datadir)");
if (index >= 0) {
result = result.replace(index, 10, "@datadir@");
changed = true;
}
- index = result.find("${exec_prefix}");
+ index = result.tqfind("${exec_prefix}");
if (index >= 0) {
result = result.replace(index, 14, "@exec_prefix@");
changed = true;
}
- index = result.find("$(exec_prefix)");
+ index = result.tqfind("$(exec_prefix)");
if (index >= 0) {
result = result.replace(index, 14, "@exec_prefix@");
changed = true;
}
- index = result.find("${libdir}");
+ index = result.tqfind("${libdir}");
if (index >= 0) {
result = result.replace(index, 9, "@libdir@");
changed = true;
}
- index = result.find("$(libdir)");
+ index = result.tqfind("$(libdir)");
if (index >= 0) {
result = result.replace(index, 9, "@libdir@");
changed = true;
}
- index = result.find("${includedir}");
+ index = result.tqfind("${includedir}");
if (index >= 0) {
result = result.replace(index, 20, "@includedir@");
changed = true;
}
- index = result.find("$(includedir)");
+ index = result.tqfind("$(includedir)");
if (index >= 0) {
result = result.replace(index, 20, "@includedir@");
changed = true;
}
- index = result.find("${sysconfdir}");
+ index = result.tqfind("${sysconfdir}");
if (index >= 0) {
result = result.replace(index, 13, "@sysconfdir@");
changed = true;
}
- index = result.find("$(sysconfdir)");
+ index = result.tqfind("$(sysconfdir)");
if (index >= 0) {
result = result.replace(index, 13, "@sysconfdir@");
changed = true;
@@ -200,7 +200,7 @@ int main(int argc, char **argv)
if (helptexts[index]) {
printf("%s - %s\n", helptexts[index], i18n(helptexts[index+1]).local8Bit().data());
} else {
- printf("%s", i18n("%1 - unknown type\n").arg(*it).local8Bit().data());
+ printf("%s", TQString(i18n("%1 - unknown type\n").arg(*it)).local8Bit().data());
}
}
return 0;
@@ -225,7 +225,7 @@ int main(int argc, char **argv)
else if ( type == "document" )
printResult(KGlobalSettings::documentPath());
else
- fprintf(stderr, "%s", i18n("%1 - unknown type of userpath\n").arg(type).local8Bit().data() );
+ fprintf(stderr, "%s", TQString(i18n("%1 - unknown type of userpath\n").arg(type)).local8Bit().data() );
return 0;
}
diff --git a/kdecore/kdebug.cpp b/kdecore/kdebug.cpp
index b581b5fdd..b76444b3c 100644
--- a/kdecore/kdebug.cpp
+++ b/kdecore/kdebug.cpp
@@ -86,7 +86,7 @@ static TQCString getDescrFromNum(unsigned int _num)
KDebugCache->setAutoDelete(true);
}
- KDebugEntry *ent = KDebugCache->find( _num );
+ KDebugEntry *ent = KDebugCache->tqfind( _num );
if ( ent )
return ent->descr;
@@ -130,7 +130,7 @@ static TQCString getDescrFromNum(unsigned int _num)
ch=line[++i];
} while ( ch >= '0' && ch <= '9');
- const Q_ULONG number =line.mid(numStart,i).toULong();
+ const TQ_ULONG number =line.mid(numStart,i).toULong();
while (line[i] && line[i] <= ' ')
i++;
@@ -139,7 +139,7 @@ static TQCString getDescrFromNum(unsigned int _num)
}
file.close();
- ent = KDebugCache->find( _num );
+ ent = KDebugCache->tqfind( _num );
if ( ent )
return ent->descr;
@@ -314,7 +314,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
abort();
}
-kdbgstream &perror( kdbgstream &s) { return s << TQString::fromLocal8Bit(strerror(errno)); }
+kdbgstream &perror( kdbgstream &s) { return s << TQString(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); }
@@ -373,7 +373,7 @@ kdbgstream& kdbgstream::operator << (TQChar ch)
{
if (!print) return *this;
if (!ch.isPrint())
- output += "\\x" + TQString::number( ch.unicode(), 16 ).rightJustify(2, '0');
+ output += "\\x" + TQString::number( ch.tqunicode(), 16 ).rightJustify(2, '0');
else {
output += ch;
if (ch == (QChar)'\n') flush();
@@ -431,12 +431,12 @@ kdbgstream& kdbgstream::operator<<( const TQDateTime& time) {
return *this;
}
kdbgstream& kdbgstream::operator<<( const TQDate& date) {
- *this << date.toString();
+ *this << TQString(date.toString());
return *this;
}
kdbgstream& kdbgstream::operator<<( const TQTime& time ) {
- *this << time.toString();
+ *this << TQString(time.toString());
return *this;
}
kdbgstream& kdbgstream::operator<<( const TQPoint& p ) {
@@ -454,9 +454,9 @@ kdbgstream& kdbgstream::operator<<( const TQRect& r ) {
kdbgstream& kdbgstream::operator<<( const TQRegion& reg ) {
*this<< "[ ";
- TQMemArray<TQRect>rs=reg.rects();
+ TQMemArray<TQRect>rs=reg.tqrects();
for (uint i=0;i<rs.size();++i)
- *this << TQString("[%1,%2 - %3x%4] ").arg(rs[i].x()).arg(rs[i].y()).arg(rs[i].width()).arg(rs[i].height() ) ;
+ *this << TQString(TQString("[%1,%2 - %3x%4] ").arg(rs[i].x()).arg(rs[i].y()).arg(rs[i].width()).arg(rs[i].height() )) ;
*this <<"]";
return *this;
@@ -474,7 +474,7 @@ kdbgstream& kdbgstream::operator<<( const TQStringList& l ) {
}
kdbgstream& kdbgstream::operator<<( const TQColor& c ) {
if ( c.isValid() )
- *this <<c.name();
+ *this << TQString(c.name());
else
*this << "(invalid/default)";
return *this;
@@ -491,7 +491,7 @@ kdbgstream& kdbgstream::operator<<( const TQPen& p ) {
*this << p.width();
*this << " color:";
if ( p.color().isValid() )
- *this << p.color().name();
+ *this << TQString(p.color().name());
else
*this <<"(invalid/default)";
if ( p.width() > 0 ) // cap style doesn't matter, otherwise
@@ -515,7 +515,7 @@ kdbgstream& kdbgstream::operator<<( const TQBrush& b) {
*this <<" color: ";
// can't use operator<<(str, b.color()) because that terminates a kdbgstream (flushes)
if ( b.color().isValid() )
- *this <<b.color().name() ;
+ *this << TQString(b.color().name()) ;
else
*this <<"(invalid/default)";
if ( b.pixmap() )
@@ -567,8 +567,8 @@ TQString kdBacktrace(int levels)
for (int i = 0; i < n; ++i)
s += TQString::number(i) +
- TQString::fromLatin1(": ") +
- TQString::fromLatin1(strings[i]) + TQString::fromLatin1("\n");
+ TQString::tqfromLatin1(": ") +
+ TQString::tqfromLatin1(strings[i]) + TQString::tqfromLatin1("\n");
s += "]\n";
if (strings)
free (strings);
diff --git a/kdecore/kdebug.h b/kdecore/kdebug.h
index 7d9dd5957..8e749b24d 100644
--- a/kdecore/kdebug.h
+++ b/kdecore/kdebug.h
@@ -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(TQString::fromLatin1(initialString)), area(_area), level(_level), print(_print) { }
+ output(TQString::tqfromLatin1(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 += TQString::fromLatin1(i ? "true" : "false");
+ output += TQString::tqfromLatin1(i ? "true" : "false");
return *this;
}
/**
@@ -180,7 +180,7 @@ class KDECORE_EXPORT kdbgstream {
* @param i the long long to print
* @return this stream
*/
- kdbgstream &operator<<(Q_LLONG i) {
+ kdbgstream &operator<<(TQ_LLONG i) {
if (!print) return *this;
TQString tmp; tmp.setNum(i); output += tmp;
return *this;
@@ -190,7 +190,7 @@ class KDECORE_EXPORT kdbgstream {
* @param i the unsigned long long to print
* @return this stream
*/
- kdbgstream &operator<<(Q_ULLONG i) {
+ kdbgstream &operator<<(TQ_ULLONG i) {
if (!print) return *this;
TQString tmp; tmp.setNum(i); output += tmp;
return *this;
@@ -281,7 +281,7 @@ class KDECORE_EXPORT kdbgstream {
;
/** Operator to print out basic information about a TQWidget.
- * Output of class names only works if the class is moc'ified.
+ * Output of class names only works if the class is tqmoc'ified.
* @param widget the widget to print
* @return this stream
*/
@@ -533,12 +533,12 @@ class KDECORE_EXPORT kndbgstream {
* Does nothing.
* @return this stream
*/
- kndbgstream& operator<<(Q_LLONG) { return *this; }
+ kndbgstream& operator<<(TQ_LLONG) { return *this; }
/**
* Does nothing.
* @return this stream
*/
- kndbgstream& operator<<(Q_ULLONG) { return *this; }
+ kndbgstream& operator<<(TQ_ULLONG) { return *this; }
/**
* Does nothing.
* @return this stream
diff --git a/kdecore/kdelibs_export.h b/kdecore/kdelibs_export.h
index e7faabdcf..5624fcddb 100644
--- a/kdecore/kdelibs_export.h
+++ b/kdecore/kdelibs_export.h
@@ -67,7 +67,7 @@
#endif /*_KDELIBS_EXPORT_H*/
-/* workaround for kdecore: stupid moc's grammar doesn't accept two macros
+/* workaround for kdecore: stupid tqmoc's grammar doesn't accept two macros
between 'class' keyword and <classname>: */
#ifdef KDE_DEPRECATED
# ifndef KDECORE_EXPORT_DEPRECATED
diff --git a/kdecore/kdemacros.h.in b/kdecore/kdemacros.h.in
index 00f49bbd7..2edb4ee3a 100644
--- a/kdecore/kdemacros.h.in
+++ b/kdecore/kdemacros.h.in
@@ -53,8 +53,8 @@
* cope with symbol visibility.
*/
#define KDE_Q_EXPORT_PLUGIN(PLUGIN) \
- Q_EXTERN_C KDE_EXPORT const char* qt_ucm_query_verification_data(); \
- Q_EXTERN_C KDE_EXPORT QUnknownInterface* ucm_instantiate(); \
+ Q_EXTERN_C KDE_EXPORT const char* tqt_ucm_query_verification_data(); \
+ Q_EXTERN_C KDE_EXPORT TQUnknownInterface* ucm_instantiate(); \
Q_EXPORT_PLUGIN(PLUGIN)
/**
@@ -105,11 +105,11 @@
* this is because usually get called by the class which they belong to,
* and one'd assume that a class author doesn't use deprecated methods of his
* own class. The only exception to this are signals which are connected to
- * other signals; they get invoked from moc-generated code. In any case,
+ * other signals; they get invoked from tqmoc-generated code. In any case,
* printing a warning message in either case is not useful.
* For slots, it can make sense (since slots can be invoked directly) but be
* aware that if the slots get triggered by a signal, the will get called from
- * moc code as well and thus the warnings are useless.
+ * tqmoc code as well and thus the warnings are useless.
*
* \par
* Also note that it is not possible to use KDE_DEPRECATED for classes which
diff --git a/kdecore/kdesktopfile.cpp b/kdecore/kdesktopfile.cpp
index 09a3f1e9b..3a2acb169 100644
--- a/kdecore/kdesktopfile.cpp
+++ b/kdecore/kdesktopfile.cpp
@@ -42,7 +42,7 @@
KDesktopFile::KDesktopFile(const TQString &fileName, bool bReadOnly,
const char * resType)
- : KConfig(TQString::fromLatin1(""), bReadOnly, false)
+ : KConfig(TQString::tqfromLatin1(""), bReadOnly, false)
{
// KConfigBackEnd will try to locate the filename that is provided
// based on the resource type specified, _only_ if the filename
@@ -83,7 +83,7 @@ TQString KDesktopFile::locateLocal(const TQString &path)
{
// Hm, that didn't work...
// What now? Use filename only and hope for the best.
- local = path.mid(path.findRev('/')+1);
+ local = path.mid(path.tqfindRev('/')+1);
}
local = ::locateLocal("xdgdata-dirs", local);
}
@@ -102,7 +102,7 @@ TQString KDesktopFile::locateLocal(const TQString &path)
if (!TQDir::isRelativePath(local))
{
// What now? Use filename only and hope for the best.
- local = path.mid(path.findRev('/')+1);
+ local = path.mid(path.tqfindRev('/')+1);
}
local = ::locateLocal("xdgdata-apps", local);
}
@@ -114,9 +114,9 @@ bool KDesktopFile::isDesktopFile(const TQString& path)
{
int len = path.length();
- if(len > 8 && path.right(8) == TQString::fromLatin1(".desktop"))
+ if(len > 8 && path.right(8) == TQString::tqfromLatin1(".desktop"))
return true;
- else if(len > 7 && path.right(7) == TQString::fromLatin1(".kdelnk"))
+ else if(len > 7 && path.right(7) == TQString::tqfromLatin1(".kdelnk"))
return true;
else
return false;
@@ -155,8 +155,8 @@ TQString KDesktopFile::translatedEntry(const char* key) const
if (hasKey(key)) {
TQString value = readEntryUntranslated(key);
TQString fName = fileName();
- fName = fName.mid(fName.findRev('/')+1);
- TQString po_lookup_key = TQString::fromLatin1(key) + "(" + fName + "): " + value;
+ fName = fName.mid(fName.tqfindRev('/')+1);
+ TQString po_lookup_key = TQString::tqfromLatin1(key) + "(" + fName + "): " + value;
TQString po_value = KGlobal::locale()->translate(po_lookup_key.utf8().data());
if (po_value == po_lookup_key)
@@ -241,33 +241,33 @@ TQStringList KDesktopFile::readActions() const
void KDesktopFile::setActionGroup(const TQString &group)
{
- setGroup(TQString::fromLatin1("Desktop Action ") + group);
+ setGroup(TQString::tqfromLatin1("Desktop Action ") + group);
}
bool KDesktopFile::hasActionGroup(const TQString &group) const
{
- return hasGroup(TQString::fromLatin1("Desktop Action ") + group);
+ return hasGroup(TQString::tqfromLatin1("Desktop Action ") + group);
}
bool KDesktopFile::hasLinkType() const
{
- return readEntry("Type") == TQString::fromLatin1("Link");
+ return readEntry("Type") == TQString::tqfromLatin1("Link");
}
bool KDesktopFile::hasApplicationType() const
{
- return readEntry("Type") == TQString::fromLatin1("Application");
+ return readEntry("Type") == TQString::tqfromLatin1("Application");
}
bool KDesktopFile::hasMimeTypeType() const
{
- return readEntry("Type") == TQString::fromLatin1("MimeType");
+ return readEntry("Type") == TQString::tqfromLatin1("MimeType");
}
bool KDesktopFile::hasDeviceType() const
{
- return readEntry("Type") == TQString::fromLatin1("FSDev") ||
- readEntry("Type") == TQString::fromLatin1("FSDevice");
+ return readEntry("Type") == TQString::tqfromLatin1("FSDev") ||
+ readEntry("Type") == TQString::tqfromLatin1("FSDevice");
}
bool KDesktopFile::tryExec() const
@@ -330,13 +330,13 @@ bool KDesktopFile::tryExec() const
/**
* @return the filename as passed to the constructor.
*/
-QString
+TQString
KDesktopFile::fileName() const { return backEnd->fileName(); }
/**
* @return the resource type as passed to the constructor.
*/
-QString
+TQString
KDesktopFile::resource() const { return backEnd->resource(); }
TQStringList
diff --git a/kdecore/kextsock.cpp b/kdecore/kextsock.cpp
index 6371bb7eb..826e8a014 100644
--- a/kdecore/kextsock.cpp
+++ b/kdecore/kextsock.cpp
@@ -248,7 +248,7 @@ void KExtendedSocket::setSocketStatus(int newstatus)
void KExtendedSocket::setError(int errorcode, int syserror)
{
- setStatus(errorcode);
+ setqStatus(errorcode);
d->syserror = syserror;
}
@@ -1233,7 +1233,7 @@ int KExtendedSocket::startAsyncConnect()
// here we have d->status >= lookupDone and <= connecting
// we can do our connection
d->status = connecting;
- TQGuardedPtr<TQObject> p = this;
+ TQGuardedPtr<TQObject> p = TQT_TQOBJECT(this);
connectionEvent();
if (!p)
return -1; // We have been deleted.
@@ -1436,7 +1436,7 @@ void KExtendedSocket::flush()
}
-Q_LONG KExtendedSocket::readBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KExtendedSocket::readBlock(char *data, TQ_ULONG maxlen)
{
cleanError();
if (d->status < connected || d->flags & passiveSocket)
@@ -1481,7 +1481,7 @@ Q_LONG KExtendedSocket::readBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KExtendedSocket::writeBlock(const char *data, Q_ULONG len)
+TQ_LONG KExtendedSocket::writeBlock(const char *data, TQ_ULONG len)
{
cleanError();
if (d->status < connected || d->status >= closing || d->flags & passiveSocket)
diff --git a/kdecore/kextsock.h b/kdecore/kextsock.h
index 2bfb22bfe..4cf2d29ee 100644
--- a/kdecore/kextsock.h
+++ b/kdecore/kextsock.h
@@ -22,6 +22,10 @@
#include "kdelibs_export.h"
+#ifdef Q_MOC_RUN
+#define Q_OS_UNIX
+#endif // Q_MOC_RUN
+
#ifdef Q_OS_UNIX
#include <sys/time.h>
@@ -91,6 +95,7 @@ class KExtendedSocketPrivate;
class KDECORE_EXPORT KExtendedSocket: public KBufferedIO // public TQObject, public QIODevice
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -681,7 +686,7 @@ public:
* @return the length of this socket, or 0 if unsupported
*/
#ifdef USE_QT3
- virtual inline Q_ULONG size() const
+ virtual inline TQ_ULONG size() const
#endif // USE_QT3
#ifdef USE_QT4
virtual inline qint64 size() const
@@ -692,7 +697,7 @@ public:
* Returns relative position from start. This call is not supported on sockets.
* @return the relative position from the start, or 0 if unsupported
*/
- virtual inline Q_ULONG at() const
+ virtual inline TQ_ULONG at() const
{ return 0; }
/**
@@ -740,7 +745,7 @@ public:
* This function returns 0, if the function detected end-of-file condition
* (socket was closed)
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen);
/**
* Writes a block of data to the socket.
@@ -765,7 +770,7 @@ public:
* The return value might be less than @p len if the output buffers cannot
* accommodate that many bytes and -1 in the case of an errro.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len);
/**
* Peeks at a block of data from the socket.
diff --git a/kdecore/kgenericfactory.h b/kdecore/kgenericfactory.h
index 0bdeaa846..e3f04ce66 100644
--- a/kdecore/kgenericfactory.h
+++ b/kdecore/kgenericfactory.h
@@ -62,7 +62,7 @@ protected:
{
if ( m_aboutData )
return new KInstance( m_aboutData );
- if ( !m_instanceName ) {
+ if ( m_instanceName.isEmpty() ) {
kdWarning() << "KGenericFactory: instance requested but no instance name or about data passed to the constructor!" << endl;
return 0;
}
@@ -133,7 +133,7 @@ KInstance *KGenericFactoryBase<T>::instance()
* const TQStringList &args);</code>
* <li>If the class is derived from KParts::Part then it needs to have
* a constructor like:
- * <code>MyPart( TQWidget *parentWidget, const char *widgetName,
+ * <code>MyPart( TQWidget *tqparentWidget, const char *widgetName,
* TQObject *parent, const char *name,
* const TQStringList &args );</code>
* </ul>
@@ -190,8 +190,8 @@ protected:
const char *className, const TQStringList &args )
{
KGenericFactoryBase<Product>::initializeMessageCatalogue();
- return KDEPrivate::ConcreteFactory<Product, ParentType>
- ::create( 0, 0, parent, name, className, args );
+ return TQT_TQOBJECT((KDEPrivate::ConcreteFactory<Product, ParentType>
+ ::create( 0, 0, parent, name, className, args )));
}
};
@@ -216,7 +216,7 @@ protected:
* const TQStringList &args);</code>
* <li>If the class is derived from KParts::Part then it needs to have
* a constructor like:
- * <code>MyPart( TQWidget *parentWidget, const char *widgetName,
+ * <code>MyPart( TQWidget *tqparentWidget, const char *widgetName,
* TQObject *parent, const char *name,
* const TQStringList &args );</code>
* </ul>
@@ -253,7 +253,7 @@ protected:
* {
* Q_ OBJECT
* public:
- * MyDialogComponent( TQWidget *parentWidget, const char *name,
+ * MyDialogComponent( TQWidget *tqparentWidget, const char *name,
* const TQStringList &args );
* ...
* };
@@ -311,7 +311,7 @@ protected:
* const TQStringList &args);</code>
* <li>If the class is derived from KParts::Part then it needs to have
* a constructor like:
- * <code>MyPart( TQWidget *parentWidget, const char *widgetName,
+ * <code>MyPart( TQWidget *tqparentWidget, const char *widgetName,
* TQObject *parent, const char *name,
* const TQStringList &args );</code>
* </ul>
@@ -348,7 +348,7 @@ protected:
* {
* Q_ OBJECT
* public:
- * MyDialogComponent( TQWidget *parentWidget, const char *name,
+ * MyDialogComponent( TQWidget *tqparentWidget, const char *name,
* const TQStringList &args );
* ...
* };
diff --git a/kdecore/kgenericfactory.tcc b/kdecore/kgenericfactory.tcc
index 41cd77824..22fbd7371 100644
--- a/kdecore/kgenericfactory.tcc
+++ b/kdecore/kgenericfactory.tcc
@@ -37,7 +37,7 @@
#ifndef KGENERICFACTORY_TCC
#define KGENERICFACTORY_TCC
-#include <qmetaobject.h>
+#include <tqmetaobject.h>
#include <ktypelist.h>
namespace KParts
@@ -69,11 +69,11 @@ namespace KDEPrivate
*/
template <class Derived>
- struct QWidgetInheritanceTest
+ struct TQWidgetInheritanceTest
{
typedef Derived * DerivedPtr;
- enum { Result = sizeof( InheritanceDetector<QWidget>::test( DerivedPtr() ) ) ==
- sizeof( InheritanceDetector<QWidget>::ConversionExists ) };
+ enum { Result = sizeof( InheritanceDetector<TQWidget>::test( DerivedPtr() ) ) ==
+ sizeof( InheritanceDetector<TQWidget>::ConversionExists ) };
};
template <class Derived>
@@ -112,43 +112,43 @@ namespace KDEPrivate
// but not least the standard default constructor of parent/name .
// the choice of the right constructor is done using an ordered inheritance
// test.
- template <class Product, class ParentType = QObject>
+ template <class Product, class ParentType = TQObject>
class ConcreteFactory
{
public:
typedef typename If< PartInheritanceTest< Product >::Result,
KParts::Part,
- typename If< QWidgetInheritanceTest< Product >::Result,
- QWidget, QObject >::Result >::Result BaseType;
+ typename If< TQWidgetInheritanceTest< Product >::Result,
+ TQWidget, TQObject >::Result >::Result BaseType;
- static inline Product *create( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *className, const QStringList &args )
+ static inline Product *create( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *className, const TQStringList &args )
{
- QMetaObject *metaObject = Product::staticMetaObject();
- while ( metaObject )
+ TQMetaObject *tqmetaObject = Product::tqstaticMetaObject();
+ while ( tqmetaObject )
{
- if ( !qstrcmp( className, metaObject->className() ) )
- return create( parentWidget, widgetName,
+ if ( !qstrcmp( className, tqmetaObject->className() ) )
+ return create( tqparentWidget, widgetName,
parent, name, args, Type2Type<BaseType>() );
- metaObject = metaObject->superClass();
+ tqmetaObject = tqmetaObject->tqsuperClass();
}
return 0;
}
private:
- typedef typename If< QWidgetInheritanceTest<ParentType>::Result,
- ParentType, QWidget >::Result WidgetParentType;
+ typedef typename If< TQWidgetInheritanceTest<ParentType>::Result,
+ ParentType, TQWidget >::Result WidgetParentType;
- static inline Product *create( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList &args, Type2Type<KParts::Part> )
+ static inline Product *create( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList &args, Type2Type<KParts::Part> )
{
- return new Product( parentWidget, widgetName, parent, name, args );
+ return new Product( tqparentWidget, widgetName, parent, name, args );
}
- static inline Product *create( QWidget* /*parentWidget*/, const char* /*widgetName*/,
- QObject *parent, const char *name,
- const QStringList &args, Type2Type<QWidget> )
+ static inline Product *create( TQWidget* /*tqparentWidget*/, const char* /*widgetName*/,
+ TQObject *parent, const char *name,
+ const TQStringList &args, Type2Type<TQWidget> )
{
WidgetParentType *p = dynamic_cast<WidgetParentType *>( parent );
@@ -157,9 +157,9 @@ namespace KDEPrivate
return new Product( p, name, args );
}
- static inline Product *create( QWidget* /*parentWidget*/, const char* /*widgetName*/,
- QObject *parent, const char *name,
- const QStringList &args, Type2Type<QObject> )
+ static inline Product *create( TQWidget* /*tqparentWidget*/, const char* /*widgetName*/,
+ TQObject *parent, const char *name,
+ const TQStringList &args, Type2Type<TQObject> )
{
ParentType *p = dynamic_cast<ParentType *>( parent );
if ( parent && !p )
@@ -171,16 +171,16 @@ namespace KDEPrivate
// this template is used to iterate through the typelist and call the
// concrete factory for each type. the specializations of this template
// are the ones actually being responsible for iterating, in fact.
- template <class Product, class ParentType = QObject>
+ template <class Product, class ParentType = TQObject>
class MultiFactory
{
public:
- inline static QObject *create( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *className,
- const QStringList &args )
+ inline static TQObject *create( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *className,
+ const TQStringList &args )
{
- return ConcreteFactory<Product, ParentType>::create( parentWidget, widgetName,
+ return ConcreteFactory<Product, ParentType>::create( tqparentWidget, widgetName,
parent, name, className,
args );
}
@@ -193,9 +193,9 @@ namespace KDEPrivate
class MultiFactory<KDE::NullType>
{
public:
- inline static QObject *create( QWidget *, const char *, QObject *,
- const char *, const char *,
- const QStringList & )
+ inline static TQObject *create( TQWidget *, const char *, TQObject *,
+ const char *, const char *,
+ const TQStringList & )
{ return 0; }
};
@@ -205,29 +205,29 @@ namespace KDEPrivate
class MultiFactory<KDE::NullType, KDE::NullType>
{
public:
- inline static QObject *create( QWidget *, const char *, QObject *,
- const char *, const char *,
- const QStringList & )
+ inline static TQObject *create( TQWidget *, const char *, TQObject *,
+ const char *, const char *,
+ const TQStringList & )
{ return 0; }
};
template <class Product, class ProductListTail>
- class MultiFactory< KTypeList<Product, ProductListTail>, QObject >
+ class MultiFactory< KTypeList<Product, ProductListTail>, TQObject >
{
public:
- inline static QObject *create( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *className,
- const QStringList &args )
+ inline static TQObject *create( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *className,
+ const TQStringList &args )
{
// try with the head of the typelist first. the head is always
// a concrete type.
- QObject *object = MultiFactory<Product>::create( parentWidget, widgetName,
- parent, name, className,
- args );
+ TQObject *object = MultiFactory<Product>::create( tqparentWidget, widgetName,
+ parent, name, className,
+ args );
if ( !object )
- object = MultiFactory<ProductListTail>::create( parentWidget, widgetName,
+ object = MultiFactory<ProductListTail>::create( tqparentWidget, widgetName,
parent, name, className,
args );
@@ -241,15 +241,15 @@ namespace KDEPrivate
KTypeList<ParentType, ParentTypeListTail> >
{
public:
- inline static QObject *create( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *className,
- const QStringList &args )
+ inline static TQObject *create( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *className,
+ const TQStringList &args )
{
// try with the head of the typelist first. the head is always
// a concrete type.
- QObject *object = MultiFactory<Product, ParentType>
- ::create( parentWidget, widgetName,
+ TQObject *object = MultiFactory<Product, ParentType>
+ ::create( tqparentWidget, widgetName,
parent, name, className, args );
// if that failed continue by advancing the typelist, calling this
@@ -257,7 +257,7 @@ namespace KDEPrivate
// at the end we reach the nulltype specialization.
if ( !object )
object = MultiFactory<ProductListTail, ParentTypeListTail>
- ::create( parentWidget, widgetName,
+ ::create( tqparentWidget, widgetName,
parent, name, className, args );
return object;
diff --git a/kdecore/kglobal.cpp b/kdecore/kglobal.cpp
index b886d8d7f..347e8d31c 100644
--- a/kdecore/kglobal.cpp
+++ b/kdecore/kglobal.cpp
@@ -127,7 +127,7 @@ void KGlobal::setActiveInstance(KInstance *i)
const TQString &
KGlobal::staticQString(const char *str)
{
- return staticQString(TQString::fromLatin1(str));
+ return staticQString(TQString::tqfromLatin1(str));
}
class KStringDict : public TQDict<TQString>
@@ -150,7 +150,7 @@ KGlobal::staticQString(const TQString &str)
_stringDict->setAutoDelete( true );
kglobal_init();
}
- TQString *result = _stringDict->find(str);
+ TQString *result = _stringDict->tqfind(str);
if (!result)
{
result = new TQString(str);
@@ -170,7 +170,7 @@ KGlobal::registerStaticDeleter(KStaticDeleterBase *obj)
{
if (!_staticDeleters)
kglobal_init();
- if (_staticDeleters->find(obj) == -1)
+ if (_staticDeleters->tqfind(obj) == -1)
_staticDeleters->append(obj);
}
diff --git a/kdecore/kglobalaccel.h b/kdecore/kglobalaccel.h
index 33dd5e37b..4eee753dc 100644
--- a/kdecore/kglobalaccel.h
+++ b/kdecore/kglobalaccel.h
@@ -42,7 +42,7 @@ class KGlobalAccelPrivate;
* @see KKeyDialog
* @short Configurable global shortcut support
*/
-class KDECORE_EXPORT KGlobalAccel : public QObject
+class KDECORE_EXPORT KGlobalAccel : public TQObject
{
Q_OBJECT
public:
diff --git a/kdecore/kglobalaccel_win.cpp b/kdecore/kglobalaccel_win.cpp
index 8b0c81f1a..674f09671 100644
--- a/kdecore/kglobalaccel_win.cpp
+++ b/kdecore/kglobalaccel_win.cpp
@@ -311,14 +311,14 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
if( rexPassIndex.search( pAction->methodSlotPtr() ) >= 0 && rexIndex.search( pAction->name() ) >= 0 ) {
int n = rexIndex.cap(1).toInt();
kdDebug(125) << "Calling " << pAction->methodSlotPtr() << " int = " << n << endl;
- int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
+ int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
if( slot_id >= 0 ) {
QUObject o[2];
static_QUType_int.set(o+1,n);
const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) {
- int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
+ int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
if( slot_id >= 0 ) {
QUObject o[4];
static_QUType_QString.set(o+1,pAction->name());
@@ -327,7 +327,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else {
- int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
+ int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
if( slot_id >= 0 )
const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 );
}
diff --git a/kdecore/kglobalaccel_x11.cpp b/kdecore/kglobalaccel_x11.cpp
index e9d86e576..010e9ec0c 100644
--- a/kdecore/kglobalaccel_x11.cpp
+++ b/kdecore/kglobalaccel_x11.cpp
@@ -179,9 +179,9 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
#ifndef __osf__
// this crashes under Tru64 so .....
- kdDebug(125) << TQString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" )
+ kdDebug(125) << TQString(TQString( "grabKey( key: '%1', bGrab: %2 ): keyCodeX: %3 keyModX: %4\n" )
.arg( key.key().toStringInternal() ).arg( bGrab )
- .arg( keyCodeX, 0, 16 ).arg( keyModX, 0, 16 );
+ .arg( keyCodeX, 0, 16 ).arg( keyModX, 0, 16 ));
#endif
if( !keyCodeX )
return false;
@@ -278,11 +278,11 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) {
KKey key = (keyCode, 0);
kdDebug(125) << "fakeKeyPressed: seek " << key.toStringInternal()
- << TQString( " keyCodeX: %1 keyCode: %2 keyModX: %3" )
- .arg( codemod.code, 0, 16 ).arg( keyCode, 0, 16 ).arg( codemod.mod, 0, 16 ) << endl;
+ << TQString(TQString( " keyCodeX: %1 keyCode: %2 keyModX: %3" )
+ .arg( codemod.code, 0, 16 ).arg( keyCode, 0, 16 ).arg( codemod.mod, 0, 16 )) << endl;
// Search for which accelerator activated this event:
- if( !m_rgCodeModToAction.contains( codemod ) ) {
+ if( !m_rgCodeModToAction.tqcontains( codemod ) ) {
#ifndef NDEBUG
for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
KAccelAction* pAction = *it;
@@ -356,11 +356,11 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
KKey key = keyNative;
kdDebug(125) << "x11KeyPress: seek " << key.toStringInternal()
- << TQString( " keyCodeX: %1 state: %2 keyModX: %3" )
- .arg( codemod.code, 0, 16 ).arg( pEvent->xkey.state, 0, 16 ).arg( codemod.mod, 0, 16 ) << endl;
+ << TQString(TQString( " keyCodeX: %1 state: %2 keyModX: %3" )
+ .arg( codemod.code, 0, 16 ).arg( pEvent->xkey.state, 0, 16 ).arg( codemod.mod, 0, 16 )) << endl;
// Search for which accelerator activated this event:
- if( !m_rgCodeModToAction.contains( codemod ) ) {
+ if( !m_rgCodeModToAction.tqcontains( codemod ) ) {
#ifndef NDEBUG
for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) {
KAccelAction* pAction = *it;
@@ -407,23 +407,23 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s
if( rexPassIndex.search( pAction->methodSlotPtr() ) >= 0 && rexIndex.search( pAction->name() ) >= 0 ) {
int n = rexIndex.cap(1).toInt();
kdDebug(125) << "Calling " << pAction->methodSlotPtr() << " int = " << n << endl;
- int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
+ int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
if( slot_id >= 0 ) {
- QUObject o[2];
- static_QUType_int.set(o+1,n);
+ TQUObject o[2];
+ static_TQUType_int.set(o+1,n);
const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) {
- int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
+ int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
if( slot_id >= 0 ) {
- QUObject o[4];
- static_QUType_QString.set(o+1,pAction->name());
- static_QUType_QString.set(o+2,pAction->label());
- static_QUType_ptr.set(o+3,&seq);
+ TQUObject o[4];
+ static_TQUType_TQString.set(o+1,pAction->name());
+ static_TQUType_TQString.set(o+2,pAction->label());
+ static_TQUType_ptr.set(o+3,&seq);
const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o );
}
} else {
- int slot_id = pAction->objSlotPtr()->metaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
+ int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true );
if( slot_id >= 0 )
const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 );
}
diff --git a/kdecore/kglobalsettings.cpp b/kdecore/kglobalsettings.cpp
index 6dfd92c9b..3595dce4c 100644
--- a/kdecore/kglobalsettings.cpp
+++ b/kdecore/kglobalsettings.cpp
@@ -35,7 +35,7 @@
#include <win32_utils.h>
static QRgb qt_colorref2qrgb(COLORREF col)
{
- return qRgb(GetRValue(col),GetGValue(col),GetBValue(col));
+ return tqRgb(GetRValue(col),GetGValue(col),GetBValue(col));
}
#endif
@@ -451,7 +451,7 @@ TQFont KGlobalSettings::taskbarFont()
TQFont KGlobalSettings::largeFont(const TQString &text)
{
TQFontDatabase db;
- TQStringList fam = db.families();
+ TQStringList fam = db.tqfamilies();
// Move a bunch of preferred fonts to the front.
if (fam.remove("Arial"))
@@ -522,7 +522,7 @@ void KGlobalSettings::initStatic() // should be called initPaths(). Don't put an
readXdgUserDirs(s_desktopPath, s_documentPath);
if (s_desktopPath->isEmpty() == true) {
- *s_desktopPath = QDir::homeDirPath() + "/Desktop/";
+ *s_desktopPath = TQDir::homeDirPath() + "/Desktop/";
}
*s_desktopPath = TQDir::cleanDirPath( *s_desktopPath );
if ( !s_desktopPath->endsWith("/") )
diff --git a/kdecore/kiconeffect.cpp b/kdecore/kiconeffect.cpp
index 8315eab6b..3d5833578 100644
--- a/kdecore/kiconeffect.cpp
+++ b/kdecore/kiconeffect.cpp
@@ -153,8 +153,8 @@ TQString KIconEffect::fingerprint(int group, int state) const
cached += ':';
cached += tmp.setNum(mValue[group][state]);
cached += ':';
- cached += mTrans[group][state] ? TQString::fromLatin1("trans")
- : TQString::fromLatin1("notrans");
+ cached += mTrans[group][state] ? TQString::tqfromLatin1("trans")
+ : TQString::tqfromLatin1("notrans");
if (mEffect[group][state] == Colorize || mEffect[group][state] == ToMonochrome)
{
cached += ':';
@@ -287,20 +287,20 @@ void KIconEffect::toGray(TQImage &img, float value)
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits()
- : (unsigned int *) img.colorTable();
+ : (unsigned int *) img.tqcolorTable();
int rval, gval, bval, val, alpha, i;
for (i=0; i<pixels; i++)
{
- val = qGray(data[i]);
- alpha = qAlpha(data[i]);
+ val = tqGray(data[i]);
+ alpha = tqAlpha(data[i]);
if (value < 1.0)
{
- rval = static_cast<int>(value*val+(1.0-value)*qRed(data[i]));
- gval = static_cast<int>(value*val+(1.0-value)*qGreen(data[i]));
- bval = static_cast<int>(value*val+(1.0-value)*qBlue(data[i]));
- data[i] = qRgba(rval, gval, bval, alpha);
+ rval = static_cast<int>(value*val+(1.0-value)*tqRed(data[i]));
+ gval = static_cast<int>(value*val+(1.0-value)*tqGreen(data[i]));
+ bval = static_cast<int>(value*val+(1.0-value)*tqBlue(data[i]));
+ data[i] = tqRgba(rval, gval, bval, alpha);
} else
- data[i] = qRgba(val, val, val, alpha);
+ data[i] = tqRgba(val, val, val, alpha);
}
}
@@ -309,12 +309,12 @@ void KIconEffect::colorize(TQImage &img, const TQColor &col, float value)
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits()
- : (unsigned int *) img.colorTable();
+ : (unsigned int *) img.tqcolorTable();
int rval, gval, bval, val, alpha, i;
float rcol = col.red(), gcol = col.green(), bcol = col.blue();
for (i=0; i<pixels; i++)
{
- val = qGray(data[i]);
+ val = tqGray(data[i]);
if (val < 128)
{
rval = static_cast<int>(rcol/128*val);
@@ -335,20 +335,20 @@ void KIconEffect::colorize(TQImage &img, const TQColor &col, float value)
}
if (value < 1.0)
{
- rval = static_cast<int>(value*rval+(1.0 - value)*qRed(data[i]));
- gval = static_cast<int>(value*gval+(1.0 - value)*qGreen(data[i]));
- bval = static_cast<int>(value*bval+(1.0 - value)*qBlue(data[i]));
+ rval = static_cast<int>(value*rval+(1.0 - value)*tqRed(data[i]));
+ gval = static_cast<int>(value*gval+(1.0 - value)*tqGreen(data[i]));
+ bval = static_cast<int>(value*bval+(1.0 - value)*tqBlue(data[i]));
}
- alpha = qAlpha(data[i]);
- data[i] = qRgba(rval, gval, bval, alpha);
+ alpha = tqAlpha(data[i]);
+ data[i] = tqRgba(rval, gval, bval, alpha);
}
}
void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) {
int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits()
- : (unsigned int *) img.colorTable();
+ : (unsigned int *) img.tqcolorTable();
int rval, gval, bval, alpha, i;
int rw = white.red(), gw = white.green(), bw = white.blue();
int rb = black.red(), gb = black.green(), bb = black.blue();
@@ -357,9 +357,9 @@ void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor
bool grayscale = true;
// Step 1: determine the average brightness
for (i=0; i<pixels; i++) {
- sum += qGray(data[i])*qAlpha(data[i]) + 255*(255-qAlpha(data[i]));
+ sum += tqGray(data[i])*tqAlpha(data[i]) + 255*(255-tqAlpha(data[i]));
values += 255;
- if ((qRed(data[i]) != qGreen(data[i]) ) || (qGreen(data[i]) != qBlue(data[i]) ))
+ if ((tqRed(data[i]) != tqGreen(data[i]) ) || (tqGreen(data[i]) != tqBlue(data[i]) ))
grayscale = false;
}
double medium = sum/values;
@@ -367,30 +367,30 @@ void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor
// Step 2: Modify the image
if (grayscale) {
for (i=0; i<pixels; i++) {
- int v = qRed(data[i]);
- rval = static_cast<int>( ((255-v)*rb + v*rw)*value/255 + (1.0-value)*qRed(data[i]));
- gval = static_cast<int>( ((255-v)*gb + v*gw)*value/255 + (1.0-value)*qGreen(data[i]));
- bval = static_cast<int>( ((255-v)*bb + v*bw)*value/255 + (1.0-value)*qBlue(data[i]));
+ int v = tqRed(data[i]);
+ rval = static_cast<int>( ((255-v)*rb + v*rw)*value/255 + (1.0-value)*tqRed(data[i]));
+ gval = static_cast<int>( ((255-v)*gb + v*gw)*value/255 + (1.0-value)*tqGreen(data[i]));
+ bval = static_cast<int>( ((255-v)*bb + v*bw)*value/255 + (1.0-value)*tqBlue(data[i]));
- alpha = qAlpha(data[i]);
- data[i] = qRgba(rval, gval, bval, alpha);
+ alpha = tqAlpha(data[i]);
+ data[i] = tqRgba(rval, gval, bval, alpha);
}
}
else {
for (i=0; i<pixels; i++) {
- if (qGray(data[i]) <= medium) {
- rval = static_cast<int>(value*rb+(1.0-value)*qRed(data[i]));
- gval = static_cast<int>(value*gb+(1.0-value)*qGreen(data[i]));
- bval = static_cast<int>(value*bb+(1.0-value)*qBlue(data[i]));
+ if (tqGray(data[i]) <= medium) {
+ rval = static_cast<int>(value*rb+(1.0-value)*tqRed(data[i]));
+ gval = static_cast<int>(value*gb+(1.0-value)*tqGreen(data[i]));
+ bval = static_cast<int>(value*bb+(1.0-value)*tqBlue(data[i]));
}
else {
- rval = static_cast<int>(value*rw+(1.0-value)*qRed(data[i]));
- gval = static_cast<int>(value*gw+(1.0-value)*qGreen(data[i]));
- bval = static_cast<int>(value*bw+(1.0-value)*qBlue(data[i]));
+ rval = static_cast<int>(value*rw+(1.0-value)*tqRed(data[i]));
+ gval = static_cast<int>(value*gw+(1.0-value)*tqGreen(data[i]));
+ bval = static_cast<int>(value*bw+(1.0-value)*tqBlue(data[i]));
}
- alpha = qAlpha(data[i]);
- data[i] = qRgba(rval, gval, bval, alpha);
+ alpha = tqAlpha(data[i]);
+ data[i] = tqRgba(rval, gval, bval, alpha);
}
}
}
@@ -400,7 +400,7 @@ void KIconEffect::deSaturate(TQImage &img, float value)
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
unsigned int *data = (img.depth() > 8) ? (unsigned int *) img.bits()
- : (unsigned int *) img.colorTable();
+ : (unsigned int *) img.tqcolorTable();
TQColor color;
int h, s, v, i;
for (i=0; i<pixels; i++)
@@ -408,8 +408,8 @@ void KIconEffect::deSaturate(TQImage &img, float value)
color.setRgb(data[i]);
color.hsv(&h, &s, &v);
color.setHsv(h, (int) (s * (1.0 - value) + 0.5), v);
- data[i] = qRgba(color.red(), color.green(), color.blue(),
- qAlpha(data[i]));
+ data[i] = tqRgba(color.red(), color.green(), color.blue(),
+ tqAlpha(data[i]));
}
}
@@ -418,7 +418,7 @@ 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();
+ : (unsigned int *) img.tqcolorTable();
TQColor color;
int i, rval, gval, bval;
float gamma;
@@ -431,7 +431,7 @@ void KIconEffect::toGamma(TQImage &img, float value)
rval = static_cast<int>(pow(static_cast<float>(rval)/255 , gamma)*255);
gval = static_cast<int>(pow(static_cast<float>(gval)/255 , gamma)*255);
bval = static_cast<int>(pow(static_cast<float>(bval)/255 , gamma)*255);
- data[i] = qRgba(rval, gval, bval, qAlpha(data[i]));
+ data[i] = tqRgba(rval, gval, bval, tqAlpha(data[i]));
}
}
@@ -476,7 +476,7 @@ void KIconEffect::semiTransparent(TQImage &img)
for (x=0; x<img.numColors(); x++)
{
// try to find already transparent pixel
- if (qAlpha(img.color(x)) < 127)
+ if (tqAlpha(img.color(x)) < 127)
{
transColor = x;
break;
@@ -631,7 +631,7 @@ void KIconEffect::overlay(TQImage &src, TQImage &overlay)
int trans;
for (trans=0; trans<overlay.numColors(); trans++)
{
- if (qAlpha(overlay.color(trans)) == 0)
+ if (tqAlpha(overlay.color(trans)) == 0)
{
kdDebug(265) << "transparent pixel found at " << trans << "\n";
break;
@@ -680,22 +680,22 @@ void KIconEffect::overlay(TQImage &src, TQImage &overlay)
for (j=0; j<src.width(); j++)
{
- r1 = qRed(oline[j]);
- g1 = qGreen(oline[j]);
- b1 = qBlue(oline[j]);
- a1 = qAlpha(oline[j]);
+ r1 = tqRed(oline[j]);
+ g1 = tqGreen(oline[j]);
+ b1 = tqBlue(oline[j]);
+ a1 = tqAlpha(oline[j]);
- r2 = qRed(sline[j]);
- g2 = qGreen(sline[j]);
- b2 = qBlue(sline[j]);
- a2 = qAlpha(sline[j]);
+ r2 = tqRed(sline[j]);
+ g2 = tqGreen(sline[j]);
+ b2 = tqBlue(sline[j]);
+ a2 = tqAlpha(sline[j]);
r2 = (a1 * r1 + (0xff - a1) * r2) >> 8;
g2 = (a1 * g1 + (0xff - a1) * g2) >> 8;
b2 = (a1 * b1 + (0xff - a1) * b2) >> 8;
a2 = QMAX(a1, a2);
- sline[j] = qRgba(r2, g2, b2, a2);
+ sline[j] = tqRgba(r2, g2, b2, a2);
}
}
}
@@ -742,9 +742,9 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect)
TQPainter p(widget);
- // Use NotROP to avoid having to repaint the pixmap each time.
+ // Use NotROP to avoid having to tqrepaint the pixmap each time.
p.setPen(TQPen(Qt::black, 2, Qt::DotLine));
- p.setRasterOp(Qt::NotROP);
+ p.setRasterOp(TQt::NotROP);
// The spacing between the rects we draw.
// Use the minimum of width and height to avoid painting outside the
diff --git a/kdecore/kiconloader.cpp b/kdecore/kiconloader.cpp
index ff9243ebe..f19b56402 100644
--- a/kdecore/kiconloader.cpp
+++ b/kdecore/kiconloader.cpp
@@ -221,7 +221,7 @@ void KIconLoader::init( const TQString& _appname, KStandardDirs *_dirs )
{
if (groups[i] == 0L)
break;
- config->setGroup(TQString::fromLatin1(groups[i]) + "Icons");
+ config->setGroup(TQString::tqfromLatin1(groups[i]) + "Icons");
d->mpGroups[i].size = config->readNumEntry("Size", 0);
d->mpGroups[i].dblPixels = config->readBoolEntry("DoublePixels", false);
if (TQPixmap::defaultDepth()>8)
@@ -328,7 +328,7 @@ void KIconLoader::addBaseThemes(KIconThemeNode *node, const TQString &appname)
for (it=lst.begin(); it!=lst.end(); ++it)
{
- if( d->mThemesInTree.contains(*it) && (*it) != "hicolor")
+ if( d->mThemesInTree.tqcontains(*it) && (*it) != "hicolor")
continue;
KIconTheme *theme = new KIconTheme(*it,appname);
if (!theme->isValid()) {
@@ -370,7 +370,7 @@ void KIconLoader::addExtraDesktopThemes()
TQDir dir2( buf );
TQString themeName=dir2.dirName();
- if (!list.contains(themeName))
+ if (!list.tqcontains(themeName))
list.append(themeName);
}
}
@@ -378,7 +378,7 @@ void KIconLoader::addExtraDesktopThemes()
for (it=list.begin(); it!=list.end(); ++it)
{
- if ( d->mThemesInTree.contains(*it) )
+ if ( d->mThemesInTree.tqcontains(*it) )
continue;
if ( *it == TQString("default.kde") ) continue;
@@ -601,7 +601,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
key = "$kicou_";
key += TQString::number(size); key += '_';
key += name;
- bool inCache = TQPixmapCache::find(key, pix);
+ bool inCache = TQPixmapCache::tqfind(key, pix);
if (inCache && (path_store == 0L))
return pix;
@@ -684,14 +684,14 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
{
key += d->mpEffect.fingerprint(group, state);
if (d->mpGroups[group].dblPixels)
- key += TQString::fromLatin1(":dblsize");
+ key += TQString::tqfromLatin1(":dblsize");
} else
- key += TQString::fromLatin1("noeffect");
+ key += TQString::tqfromLatin1("noeffect");
key += '_';
key += overlayStr;
// Is the icon in the cache?
- bool inCache = TQPixmapCache::find(key, pix);
+ bool inCache = TQPixmapCache::tqfind(key, pix);
if (inCache && (path_store == 0L))
return pix;
@@ -806,7 +806,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
{
QRgb *line = reinterpret_cast<QRgb *>(img->scanLine(y));
for (int x = 0; x < img->width(); x++)
- line[x] = (line[x] & 0x00ffffff) | (QMIN(0x80, qAlpha(line[x])) << 24);
+ line[x] = (line[x] & 0x00ffffff) | (QMIN(0x80, tqAlpha(line[x])) << 24);
}
}
}
@@ -848,10 +848,10 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
for( int i = 0;
i < favIcon.width();
++i, ++fpos, ++ipos )
- *ipos = qRgba( ( qRed( *ipos ) * ( 255 - qAlpha( *fpos )) + qRed( *fpos ) * qAlpha( *fpos )) / 255,
- ( qGreen( *ipos ) * ( 255 - qAlpha( *fpos )) + qGreen( *fpos ) * qAlpha( *fpos )) / 255,
- ( qBlue( *ipos ) * ( 255 - qAlpha( *fpos )) + qBlue( *fpos ) * qAlpha( *fpos )) / 255,
- ( qAlpha( *ipos ) * ( 255 - qAlpha( *fpos )) + qAlpha( *fpos ) * qAlpha( *fpos )) / 255 );
+ *ipos = tqRgba( ( tqRed( *ipos ) * ( 255 - tqAlpha( *fpos )) + tqRed( *fpos ) * tqAlpha( *fpos )) / 255,
+ ( tqGreen( *ipos ) * ( 255 - tqAlpha( *fpos )) + tqGreen( *fpos ) * tqAlpha( *fpos )) / 255,
+ ( tqBlue( *ipos ) * ( 255 - tqAlpha( *fpos )) + tqBlue( *fpos ) * tqAlpha( *fpos )) / 255,
+ ( tqAlpha( *ipos ) * ( 255 - tqAlpha( *fpos )) + tqAlpha( *fpos ) * tqAlpha( *fpos )) / 255 );
}
}
@@ -866,7 +866,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si
TQImage *KIconLoader::loadOverlay(const TQString &name, int size) const
{
TQString key = name + '_' + TQString::number(size);
- TQImage *image = d->imgDict.find(key);
+ TQImage *image = d->imgDict.tqfind(key);
if (image != 0L)
return image;
@@ -892,7 +892,7 @@ TQMovie KIconLoader::loadMovie(const TQString& name, KIcon::Group group, int siz
TQString file = moviePath( name, group, size );
if (file.isEmpty())
return TQMovie();
- int dirLen = file.findRev('/');
+ int dirLen = file.tqfindRev('/');
TQString icon = iconPath(name, size ? -size : group, true);
if (!icon.isEmpty() && file.left(dirLen) != icon.left(dirLen))
return TQMovie();
@@ -1048,13 +1048,13 @@ TQStringList KIconLoader::queryIconsByContext(int group_or_size,
TQStringList::ConstIterator it;
for (it=result.begin(); it!=result.end(); ++it)
{
- int n = (*it).findRev('/');
+ int n = (*it).tqfindRev('/');
if (n == -1)
name = *it;
else
name = (*it).mid(n+1);
name = removeIconExtension(name);
- if (!entries.contains(name))
+ if (!entries.tqcontains(name))
{
entries += name;
res2 += *it;
@@ -1088,13 +1088,13 @@ TQStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context)
TQStringList::ConstIterator it;
for (it=result.begin(); it!=result.end(); ++it)
{
- int n = (*it).findRev('/');
+ int n = (*it).tqfindRev('/');
if (n == -1)
name = *it;
else
name = (*it).mid(n+1);
name = removeIconExtension(name);
- if (!entries.contains(name))
+ if (!entries.tqcontains(name))
{
entries += name;
res2 += *it;
@@ -1383,7 +1383,7 @@ int IconSize(KIcon::Group group, KInstance *instance)
TQPixmap KIconLoader::unknown()
{
TQPixmap pix;
- if ( TQPixmapCache::find("unknown", pix) )
+ if ( TQPixmapCache::tqfind("unknown", pix) )
return pix;
TQString path = KGlobal::iconLoader()->iconPath("unknown", KIcon::Small, true);
diff --git a/kdecore/kiconloader_p.h b/kdecore/kiconloader_p.h
index 41083b38c..e6ae13659 100644
--- a/kdecore/kiconloader_p.h
+++ b/kdecore/kiconloader_p.h
@@ -33,7 +33,7 @@ public:
KIconTheme *theme;
};
-class KIconLoaderPrivate : public QObject
+class KIconLoaderPrivate : public TQObject
{
Q_OBJECT
public:
diff --git a/kdecore/kicontheme.cpp b/kdecore/kicontheme.cpp
index 6bbeba512..fb25cac21 100644
--- a/kdecore/kicontheme.cpp
+++ b/kdecore/kicontheme.cpp
@@ -185,7 +185,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
TQMap<int,TQValueList<int> > scIcons;
for (KIconThemeDir *dir=mDirs.first(); dir!=0L; dir=mDirs.next())
{
- if ((dir->type() == KIcon::Scalable) && !scIcons.contains(dir->size()))
+ if ((dir->type() == KIcon::Scalable) && !scIcons.tqcontains(dir->size()))
{
TQValueList<int> lst;
for (i=dir->minSize(); i<=dir->maxSize(); i++)
@@ -209,7 +209,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
TQValueList<int>::ConstIterator it2;
for (it2=lst.begin(); it2!=lst.end(); ++it2)
{
- if (scIcons.contains(*it2))
+ if (scIcons.tqcontains(*it2))
exp += scIcons[*it2];
else
exp += *it2;
@@ -451,13 +451,13 @@ TQString KIconTheme::current()
KConfig *config = KGlobal::config();
KConfigGroupSaver saver(config, "Icons");
*_theme = config->readEntry("Theme",defaultThemeName());
- if ( *_theme == TQString::fromLatin1("hicolor") ) *_theme = defaultThemeName();
+ if ( *_theme == TQString::tqfromLatin1("hicolor") ) *_theme = defaultThemeName();
/* if (_theme->isEmpty())
{
if (TQPixmap::defaultDepth() > 8)
*_theme = defaultThemeName();
else
- *_theme = TQString::fromLatin1("locolor");
+ *_theme = TQString::tqfromLatin1("locolor");
}*/
return *_theme;
}
@@ -492,7 +492,7 @@ TQStringList KIconTheme::list()
KIconTheme oink(*it2);
if (!oink.isValid()) continue;
- if (!_theme_list->contains(*it2))
+ if (!_theme_list->tqcontains(*it2))
_theme_list->append(*it2);
}
}
@@ -511,7 +511,7 @@ void KIconTheme::reconfigure()
// static
TQString KIconTheme::defaultThemeName()
{
- return TQString::fromLatin1("crystalsvg");
+ return TQString::tqfromLatin1("crystalsvg");
}
/*** KIconThemeDir ***/
diff --git a/kdecore/kidna.cpp b/kdecore/kidna.cpp
index ca41fecdf..1ce2c1348 100644
--- a/kdecore/kidna.cpp
+++ b/kdecore/kidna.cpp
@@ -43,12 +43,12 @@ TQString KIDNA::toAscii(const TQString &idna)
{
if (idna.length() && (idna[0] == (QChar)'.'))
{
- TQString host = TQString::fromLatin1(toAsciiCString(idna.mid(1)));
+ TQString host = TQString::tqfromLatin1(toAsciiCString(idna.mid(1)));
if (host.isEmpty())
return TQString::null; // Error
return idna[0] + host;
}
- return TQString::fromLatin1(toAsciiCString(idna));
+ return TQString::tqfromLatin1(toAsciiCString(idna));
}
TQString KIDNA::toUnicode(const TQString &idna)
diff --git a/kdecore/kkeyserver_x11.cpp b/kdecore/kkeyserver_x11.cpp
index 96411bca5..96bd7d67d 100644
--- a/kdecore/kkeyserver_x11.cpp
+++ b/kdecore/kkeyserver_x11.cpp
@@ -176,8 +176,8 @@ static const TransKey g_rgQtToSymX[] =
{ Qt::Key_Up, XK_Up },
{ Qt::Key_Right, XK_Right },
{ Qt::Key_Down, XK_Down },
- { Qt::Key_Prior, XK_Prior },
- { Qt::Key_Next, XK_Next },
+ { TQt::Key_Prior, XK_Prior },
+ { TQt::Key_Next, XK_Next },
//{ Qt::Key_Shift, 0 },
//{ Qt::Key_Control, 0 },
//{ Qt::Key_Meta, 0 },
@@ -285,7 +285,7 @@ static const TransKey g_rgQtToSymX[] =
{ Qt::Key_VolumeUp, XF86XK_AudioRaiseVolume },
{ Qt::Key_MediaPlay, XF86XK_AudioPlay },
{ Qt::Key_MediaStop, XF86XK_AudioStop },
- { Qt::Key_MediaPrev, XF86XK_AudioPrev },
+ { TQt::Key_MediaPrev, XF86XK_AudioPrev },
{ Qt::Key_MediaNext, XF86XK_AudioNext },
{ Qt::Key_HomePage, XF86XK_HomePage },
{ Qt::Key_LaunchMail, XF86XK_Mail },
@@ -406,7 +406,7 @@ bool Sym::initQt( int keyQt )
int symQt = keyQt & 0xffff;
if( (keyQt & Qt::UNICODE_ACCEL) || symQt < 0x1000 ) {
- m_sym = TQChar(symQt).lower().unicode();
+ m_sym = TQChar(symQt).lower().tqunicode();
return true;
}
@@ -434,9 +434,9 @@ bool Sym::initQt( int keyQt )
bool Sym::init( const TQString& s )
{
- // If it's a single character, get unicode value.
+ // If it's a single character, get tqunicode value.
if( s.length() == 1 ) {
- m_sym = s[0].lower().unicode();
+ m_sym = s[0].lower().tqunicode();
return true;
}
@@ -498,7 +498,7 @@ TQString Sym::toString( bool bUserSpace ) const
if( m_sym == 0 )
return TQString::null;
- // If it's a unicode character,
+ // If it's a tqunicode character,
#ifdef Q_WS_WIN
else if( m_sym < 0x1000 ) {
#else
@@ -542,7 +542,7 @@ uint Sym::getModsRequired() const
if( m_sym < 0x3000 ) {
TQChar c(m_sym);
- if( c.isLetter() && c.lower() != c.upper() && m_sym == c.upper().unicode() )
+ if( c.isLetter() && c.lower() != c.upper() && m_sym == c.upper().tqunicode() )
return KKey::SHIFT;
}
@@ -823,7 +823,7 @@ uint stringUserToMod( const TQString& mod )
// Get code of just the primary key
keySymQt = keyCombQt & 0xffff;
- // If unicode value beneath 0x1000 (special Qt codes begin thereafter),
+ // If tqunicode value beneath 0x1000 (special Qt codes begin thereafter),
if( keySymQt < 0x1000 ) {
// For reasons unbeknownst to me, Qt converts 'a-z' to 'A-Z'.
// So convert it back to lowercase if SHIFT isn't held down.
@@ -1041,7 +1041,7 @@ void KKey::simplify()
// If this is a letter, don't remove any modifiers.
if( m_sym < 0x3000 && TQChar(m_sym).isLetter() )
- m_sym = TQChar(m_sym).lower().unicode();
+ m_sym = TQChar(m_sym).lower().tqunicode();
// Remove modifers from modifier list which are implicit in the symbol.
// Ex. Shift+Plus => Plus (en)
diff --git a/kdecore/klibloader.cpp b/kdecore/klibloader.cpp
index e2f55fe67..80c5e6377 100644
--- a/kdecore/klibloader.cpp
+++ b/kdecore/klibloader.cpp
@@ -209,7 +209,7 @@ void KLibrary::slotObjectCreated( TQObject *obj )
if ( m_timer && m_timer->isActive() )
m_timer->stop();
- if ( m_objs.containsRef( obj ) )
+ if ( m_objs.tqcontainsRef( obj ) )
return; // we know this object already
connect( obj, TQT_SIGNAL( destroyed() ),
@@ -220,7 +220,7 @@ void KLibrary::slotObjectCreated( TQObject *obj )
void KLibrary::slotObjectDestroyed()
{
- m_objs.removeRef( sender() );
+ m_objs.removeRef( TQT_TQOBJECT_CONST(sender()) );
if ( m_objs.count() == 0 )
{
@@ -337,10 +337,10 @@ static inline TQCString makeLibName( const char* name )
// only append ".la" if there is no extension
// this allows to load non-libtool libraries as well
// (mhk, 20000228)
- int pos = libname.findRev('/');
+ int pos = libname.tqfindRev('/');
if (pos < 0)
pos = 0;
- if (libname.find('.', pos) < 0)
+ if (libname.tqfind('.', pos) < 0)
libname += ".la";
return libname;
}
@@ -500,7 +500,7 @@ void KLibLoader::slotLibraryDestroyed()
void KLibLoader::close_pending(KLibWrapPrivate *wrap)
{
- if (wrap && !d->pending_close.containsRef( wrap ))
+ if (wrap && !d->pending_close.tqcontainsRef( wrap ))
d->pending_close.append( wrap );
/* First delete all KLibrary objects in pending_close, but _don't_ unload
@@ -534,7 +534,7 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
/* Now ensure, that the libs are only unloaded in the reverse direction
they were loaded. */
- if (!d->pending_close.containsRef( wrap )) {
+ if (!d->pending_close.tqcontainsRef( wrap )) {
if (!deleted_one)
/* Only diagnose, if we really haven't deleted anything. */
// kdDebug(150) << "try to dlclose " << wrap->name << ": not yet" << endl;
diff --git a/kdecore/klibloader.h b/kdecore/klibloader.h
index b1a1bc330..c36e82f07 100644
--- a/kdecore/klibloader.h
+++ b/kdecore/klibloader.h
@@ -47,7 +47,7 @@ class KLibraryPrivate;
* @see KLibLoader
* @author Torben Weis <weis@kde.org>
*/
-class KDECORE_EXPORT KLibrary : public QObject
+class KDECORE_EXPORT KLibrary : public TQObject
{
friend class KLibLoader;
friend class TQAsciiDict<KLibrary>;
@@ -139,7 +139,7 @@ class KLibWrapPrivate;
* @see KLibrary
* @author Torben Weis <weis@kde.org>
*/
-class KDECORE_EXPORT KLibLoader : public QObject
+class KDECORE_EXPORT KLibLoader : public TQObject
{
friend class KLibrary;
@@ -330,7 +330,7 @@ private:
*
* @author Torben Weis <weis@kde.org>
*/
-class KDECORE_EXPORT KLibFactory : public QObject
+class KDECORE_EXPORT KLibFactory : public TQObject
{
Q_OBJECT
public:
diff --git a/kdecore/klocale.cpp b/kdecore/klocale.cpp
index 91fe1c2a1..567c9a7f5 100644
--- a/kdecore/klocale.cpp
+++ b/kdecore/klocale.cpp
@@ -121,9 +121,9 @@ void KLocale::initMainCatalogues(const TQString & catalog)
TQString mainCatalogue = catalog;
// don't use main catalogue if we're looking up .desktop translations
- if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) {
+ if (mainCatalogue.tqcontains("desktop") == 0 || mainCatalogue.tqcontains("kdesktop") == 1) {
if (maincatalogue) {
- mainCatalogue = TQString::fromLatin1(maincatalogue);
+ mainCatalogue = TQString::tqfromLatin1(maincatalogue);
}
}
@@ -135,7 +135,7 @@ void KLocale::initMainCatalogues(const TQString & catalog)
else {
// do not use insertCatalogue here, that would already trigger updateCatalogs
d->catalogNames.append( mainCatalogue ); // application catalog
- if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) { //don't bother if we're looking up desktop translations
+ if (mainCatalogue.tqcontains("desktop") == 0 || mainCatalogue.tqcontains("kdesktop") == 1) { //don't bother if we're looking up desktop translations
d->catalogNames.append( SYSTEM_MESSAGES ); // always include kdelibs.mo
d->catalogNames.append( "kio" ); // always include kio.mo
d->catalogNames.append( "xdg-user-dirs" );
@@ -312,13 +312,13 @@ void KLocale::initFormat()
KConfigGroupSaver saver(config, "Locale");
KSimpleConfig entry(locate("locale",
- TQString::fromLatin1("l10n/%1/entry.desktop")
+ TQString::tqfromLatin1("l10n/%1/entry.desktop")
.arg(m_country)), true);
entry.setGroup("KCM Locale");
// Numeric
#define readConfigEntry(key, default, save) \
- save = entry.readEntry(key, TQString::fromLatin1(default)); \
+ save = entry.readEntry(key, TQString::tqfromLatin1(default)); \
save = config->readEntry(key, save);
#define readConfigNumEntry(key, default, save, type) \
@@ -331,7 +331,7 @@ void KLocale::initFormat()
readConfigEntry("DecimalSymbol", ".", m_decimalSymbol);
readConfigEntry("ThousandsSeparator", ",", m_thousandsSeparator);
- m_thousandsSeparator.replace( TQString::fromLatin1("$0"), TQString::null );
+ m_thousandsSeparator.tqreplace( TQString::tqfromLatin1("$0"), TQString() );
//kdDebug(173) << "m_thousandsSeparator=" << m_thousandsSeparator << endl;
readConfigEntry("PositiveSign", "", m_positiveSign);
@@ -342,7 +342,7 @@ void KLocale::initFormat()
readConfigEntry("MonetaryDecimalSymbol", ".", m_monetaryDecimalSymbol);
readConfigEntry("MonetaryThousandsSeparator", ",",
m_monetaryThousandsSeparator);
- m_monetaryThousandsSeparator.replace(TQString::fromLatin1("$0"), TQString::null);
+ m_monetaryThousandsSeparator.tqreplace(TQString::tqfromLatin1("$0"), TQString());
readConfigNumEntry("FracDigits", 2, m_fracDigits, int);
readConfigBoolEntry("PositivePrefixCurrencySymbol", true,
@@ -372,7 +372,7 @@ void KLocale::initFormat()
//Grammatical
//Precedence here is l10n / i18n / config file
KSimpleConfig language(locate("locale",
- TQString::fromLatin1("%1/entry.desktop")
+ TQString::tqfromLatin1("%1/entry.desktop")
.arg(m_language)), true);
language.setGroup("KCM Locale");
#define read3ConfigBoolEntry(key, default, save) \
@@ -404,7 +404,7 @@ bool KLocale::setCountry(const TQString & country)
TQString KLocale::catalogueFileName(const TQString & language,
const KCatalogue & catalog)
{
- TQString path = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo")
+ TQString path = TQString::tqfromLatin1("%1/LC_MESSAGES/%2.mo")
.arg( language )
.arg( catalog.name() );
@@ -417,7 +417,7 @@ TQString KLocale::catalogueFileName(const TQString & language,
bool KLocale::setLanguage(const TQString & language)
{
- if ( d->languageList.contains( language ) ) {
+ if ( d->languageList.tqcontains( language ) ) {
d->languageList.remove( language );
}
d->languageList.prepend( language ); // let us consider this language to be the most important one
@@ -451,7 +451,7 @@ bool KLocale::setLanguage(const TQStringList & languages)
{
// kdDebug() << "checking " << (*it) << endl;
bool bIsTranslated = isApplicationTranslatedInto( *it );
- if ( languageList.contains(*it) > 1 || (*it).isEmpty() || (!bIsTranslated) ) {
+ if ( languageList.tqcontains(*it) > 1 || (*it).isEmpty() || (!bIsTranslated) ) {
// kdDebug() << "removing " << (*it) << endl;
it = languageList.remove( it );
}
@@ -497,7 +497,7 @@ bool KLocale::isApplicationTranslatedInto( const TQString & language)
TQString appName = d->appName;
if (maincatalogue) {
- appName = TQString::fromLatin1(maincatalogue);
+ appName = TQString::tqfromLatin1(maincatalogue);
}
// sorry, catalogueFileName requires catalog object,k which we do not have here
// path finding was supposed to be moved completely to KCatalogue. The interface cannot
@@ -505,7 +505,7 @@ bool KLocale::isApplicationTranslatedInto( const TQString & language)
// duplicated code for file path evaluation. Cleanup will follow later. We could have e.g.
// a static method in KCataloge that can translate between these file names.
// a stat
- TQString sFileName = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo")
+ TQString sFileName = TQString::tqfromLatin1("%1/LC_MESSAGES/%2.mo")
.arg( language )
.arg( appName );
// kdDebug() << "isApplicationTranslatedInto: filename " << sFileName << endl;
@@ -526,7 +526,7 @@ void KLocale::splitLocale(const TQString & aStr,
TQString str = aStr;
// just in case, there is another language appended
- int f = str.find(':');
+ int f = str.tqfind(':');
if (f >= 0)
str.truncate(f);
@@ -534,14 +534,14 @@ void KLocale::splitLocale(const TQString & aStr,
chrset = TQString::null;
language = TQString::null;
- f = str.find('.');
+ f = str.tqfind('.');
if (f >= 0)
{
chrset = str.mid(f + 1);
str.truncate(f);
}
- f = str.find('_');
+ f = str.tqfind('_');
if (f >= 0)
{
country = str.mid(f + 1);
@@ -644,7 +644,7 @@ TQString KLocale::weekDayName (int i, bool shortName) const
void KLocale::insertCatalogue( const TQString & catalog )
{
- if ( !d->catalogNames.contains( catalog) ) {
+ if ( !d->catalogNames.tqcontains( catalog) ) {
d->catalogNames.append( catalog );
}
updateCatalogues( ); // evaluate the changed list and generate the neccessary KCatalog objects
@@ -693,7 +693,7 @@ void KLocale::updateCatalogues( )
void KLocale::removeCatalogue(const TQString &catalog)
{
- if ( d->catalogNames.contains( catalog )) {
+ if ( d->catalogNames.tqcontains( catalog )) {
d->catalogNames.remove( catalog );
if (KGlobal::_instance)
updateCatalogues(); // walk through the KCatalogue instances and weed out everything we no longer need
@@ -702,7 +702,7 @@ void KLocale::removeCatalogue(const TQString &catalog)
void KLocale::setActiveCatalogue(const TQString &catalog)
{
- if ( d->catalogNames.contains( catalog ) ) {
+ if ( d->catalogNames.tqcontains( catalog ) ) {
d->catalogNames.remove( catalog );
d->catalogNames.prepend( catalog );
updateCatalogues(); // walk through the KCatalogue instances and adapt to the new order
@@ -795,10 +795,10 @@ TQString KLocale::translate( const char *index, const char *fallback) const
static TQString put_n_in(const TQString &orig, unsigned long n)
{
TQString ret = orig;
- int index = ret.find("%n");
+ int index = ret.tqfind("%n");
if (index == -1)
return ret;
- ret.replace(index, 2, TQString::number(n));
+ ret.tqreplace(index, 2, TQString::number(n));
return ret;
}
@@ -830,7 +830,7 @@ TQString KLocale::translate( const char *singular, const char *plural,
} else {
TQString tmp = TQString::fromUtf8( plural );
#ifndef NDEBUG
- if (tmp.find("%n") == -1) {
+ if (tmp.tqfind("%n") == -1) {
kdDebug() << "the message for i18n should contain a '%n'! " << plural << endl;
}
#endif
@@ -1142,7 +1142,7 @@ TQString KLocale::formatMoney(double num,
TQString res = TQString::number(neg?-num:num, 'f', precision);
// Replace dot with locale decimal separator
- res.replace(TQChar('.'), monetaryDecimalSymbol());
+ res.tqreplace(TQChar('.'), monetaryDecimalSymbol());
// Insert the thousand separators
_insertSeparator(res, monetaryThousandsSeparator(), monetaryDecimalSymbol());
@@ -1259,7 +1259,7 @@ static void _inc_by_one(TQString &str, int position)
// Cut off if more digits in fractional part than 'precision'
static void _round(TQString &str, int precision)
{
- int decimalSymbolPos = str.find('.');
+ int decimalSymbolPos = str.tqfind('.');
if (decimalSymbolPos == -1)
if (precision == 0) return;
@@ -1294,7 +1294,7 @@ static void _round(TQString &str, int precision)
break;
}
- decimalSymbolPos = str.find('.');
+ decimalSymbolPos = str.tqfind('.');
str.truncate(decimalSymbolPos + precision + 1);
// if precision == 0 delete also '.'
@@ -1324,7 +1324,7 @@ TQString KLocale::formatNumber(const TQString &numStr, bool round,
if (round) _round(mantString, precision);
// Replace dot with locale decimal separator
- mantString.replace(TQChar('.'), decimalSymbol());
+ mantString.tqreplace(TQChar('.'), decimalSymbol());
// Insert the thousand separators
_insertSeparator(mantString, thousandsSeparator(), decimalSymbol());
@@ -1352,14 +1352,14 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const
{
if ( !escape )
{
- if ( (QChar)(rst.at( format_index ).unicode()) == (QChar)'%' )
+ if ( (TQChar(rst.at( format_index )).tqunicode()) == '%' )
escape = true;
else
buffer.append(rst.at(format_index));
}
else
{
- switch ( rst.at( format_index ).unicode() )
+ switch ( TQChar(rst.at( format_index )).tqunicode() )
{
case '%':
buffer.append('%');
@@ -1418,7 +1418,7 @@ void KLocale::setMainCatalogue(const char *catalog)
double KLocale::readNumber(const TQString &_str, bool * ok) const
{
TQString str = _str.stripWhiteSpace();
- bool neg = str.find(negativeSign()) == 0;
+ bool neg = str.tqfind(negativeSign()) == 0;
if (neg)
str.remove( 0, negativeSign().length() );
@@ -1428,7 +1428,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const
TQString exponentialPart;
int EPos;
- EPos = str.find('E', 0, false);
+ EPos = str.tqfind('E', 0, false);
if (EPos != -1)
{
@@ -1436,7 +1436,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const
str = str.left(EPos);
}
- int pos = str.find(decimalSymbol());
+ int pos = str.tqfind(decimalSymbol());
TQString major;
TQString minor;
if ( pos == -1 )
@@ -1450,7 +1450,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const
// Remove thousand separators
int thlen = thousandsSeparator().length();
int lastpos = 0;
- while ( ( pos = major.find( thousandsSeparator() ) ) > 0 )
+ while ( ( pos = major.tqfind( thousandsSeparator() ) ) > 0 )
{
// e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N
int fromEnd = major.length() - pos;
@@ -1487,7 +1487,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const
bool currencyFound = false;
TQString symbol = currencySymbol();
// First try removing currency symbol from either end
- int pos = str.find(symbol);
+ int pos = str.tqfind(symbol);
if ( pos == 0 || pos == (int) str.length()-symbol.length() )
{
str.remove(pos,symbol.length());
@@ -1512,7 +1512,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const
}
else
{
- int i1 = str.find(negativeSign());
+ int i1 = str.tqfind(negativeSign());
if ( i1 == 0 || i1 == (int) str.length()-1 )
{
neg = true;
@@ -1525,7 +1525,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const
// it already (because of the negative sign being in the way).
if ( !currencyFound )
{
- pos = str.find(symbol);
+ pos = str.tqfind(symbol);
if ( pos == 0 || pos == (int) str.length()-symbol.length() )
{
str.remove(pos,symbol.length());
@@ -1534,7 +1534,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const
}
// And parse the rest as a number
- pos = str.find(monetaryDecimalSymbol());
+ pos = str.tqfind(monetaryDecimalSymbol());
TQString major;
TQString minior;
if (pos == -1)
@@ -1548,7 +1548,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const
// Remove thousand separators
int thlen = monetaryThousandsSeparator().length();
int lastpos = 0;
- while ( ( pos = major.find( monetaryThousandsSeparator() ) ) > 0 )
+ while ( ( pos = major.tqfind( monetaryThousandsSeparator() ) ) > 0 )
{
// e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N
int fromEnd = major.length() - pos;
@@ -1866,7 +1866,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
// only "pm/am" here can grow, the rest shrinks, but
// I'm rather safe than sorry
- TQChar *buffer = new QChar[rst.length() * 3 / 2 + 30];
+ TQChar *buffer = new TQChar[rst.length() * 3 / 2 + 30];
uint index = 0;
bool escape = false;
@@ -1876,14 +1876,14 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
{
if ( !escape )
{
- if ( (QChar)(rst.at( format_index ).unicode()) == (QChar)'%' )
+ if ( (TQChar(rst.at( format_index )).tqunicode()) == '%' )
escape = true;
else
buffer[index++] = rst.at( format_index );
}
else
{
- switch ( rst.at( format_index ).unicode() )
+ switch ( TQChar(rst.at( format_index )).tqunicode() )
{
case '%':
buffer[index++] = (QChar)'%';
@@ -1915,7 +1915,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
number = pTime.hour();
case 'l':
// to share the code
- if ( (QChar)(rst.at( format_index ).unicode()) == (QChar)'l' )
+ if ( (TQChar(rst.at( format_index )).tqunicode()) == 'l' )
number = isDuration ? pTime.hour() : (pTime.hour() + 11) % 12 + 1;
if ( number / 10 )
buffer[index++] = number / 10 + '0';
@@ -1948,8 +1948,8 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
bool KLocale::use12Clock() const
{
- if ((timeFormat().contains(TQString::fromLatin1("%I")) > 0) ||
- (timeFormat().contains(TQString::fromLatin1("%l")) > 0))
+ if ((timeFormat().tqcontains(TQString::tqfromLatin1("%I")) > 0) ||
+ (timeFormat().tqcontains(TQString::tqfromLatin1("%l")) > 0))
return true;
else
return false;
@@ -1957,7 +1957,7 @@ bool KLocale::use12Clock() const
TQString KLocale::languages() const
{
- return d->languageList.join( TQString::fromLatin1(":") );
+ return d->languageList.join( TQString::tqfromLatin1(":") );
}
TQStringList KLocale::languageList() const
@@ -1970,8 +1970,8 @@ TQString KLocale::formatDateTime(const TQDateTime &pDateTime,
bool includeSeconds) const
{
return translate("concatenation of dates and time", "%1 %2")
- .arg( formatDate( pDateTime.date(), shortFormat ) )
- .arg( formatTime( pDateTime.time(), includeSeconds ) );
+ .arg( formatDate( TQT_TQDATE_OBJECT(pDateTime.date()), shortFormat ) )
+ .arg( formatTime( TQT_TQTIME_OBJECT(pDateTime.time()), includeSeconds ) );
}
TQString i18n(const char* text)
@@ -2008,7 +2008,7 @@ void KLocale::initInstance()
KInstance *app = KGlobal::instance();
if (app) {
- KGlobal::_locale = new KLocale(TQString::fromLatin1(app->instanceName()));
+ KGlobal::_locale = new KLocale(TQString::tqfromLatin1(app->instanceName()));
// only do this for the global instance
TQTextCodec::setCodecForLocale(KGlobal::_locale->codecForEncoding());
@@ -2088,17 +2088,17 @@ void KLocale::initFileNameEncoding(KConfig *)
TQCString KLocale::encodeFileNameUTF8( const TQString & fileName )
#endif // USE_QT3
#ifdef USE_QT4
-TQByteArray KLocale::encodeFileNameUTF8( const TQString & fileName )
+QByteArray KLocale::encodeFileNameUTF8( const QString & fileName )
#endif // USE_QT4
{
- return fileName.utf8();
+ return TQString(fileName).utf8();
}
#ifdef USE_QT3
TQString KLocale::decodeFileNameUTF8( const TQCString & localFileName )
#endif // USE_QT3
#ifdef USE_QT4
-TQString KLocale::decodeFileNameUTF8( const TQByteArray & localFileName )
+QString KLocale::decodeFileNameUTF8( const QByteArray & localFileName )
#endif // USE_QT4
{
return TQString::fromUtf8(localFileName);
@@ -2265,12 +2265,12 @@ void KLocale::setMeasureSystem(MeasureSystem value)
TQString KLocale::defaultLanguage()
{
- return TQString::fromLatin1("en_US");
+ return TQString::tqfromLatin1("en_US");
}
TQString KLocale::defaultCountry()
{
- return TQString::fromLatin1("C");
+ return TQString::tqfromLatin1("C");
}
const char * KLocale::encoding() const
@@ -2325,7 +2325,7 @@ TQStringList KLocale::languagesTwoAlpha() const
TQStringList result;
- KConfig config(TQString::fromLatin1("language.codes"), true, false);
+ KConfig config(TQString::tqfromLatin1("language.codes"), true, false);
config.setGroup("TwoLetterCodes");
for ( TQStringList::ConstIterator it = origList.begin();
@@ -2338,7 +2338,7 @@ TQStringList KLocale::languagesTwoAlpha() const
langLst = config.readListEntry( lang );
else
{
- int i = lang.find('_');
+ int i = lang.tqfind('_');
if (i >= 0)
lang.truncate(i);
langLst << lang;
@@ -2348,7 +2348,7 @@ TQStringList KLocale::languagesTwoAlpha() const
langIt != langLst.end();
++langIt )
{
- if ( !(*langIt).isEmpty() && !result.contains( *langIt ) )
+ if ( !(*langIt).isEmpty() && !result.tqcontains( *langIt ) )
result += *langIt;
}
}
@@ -2370,8 +2370,8 @@ TQString KLocale::twoAlphaToLanguageName(const TQString &code) const
d->languages = new KConfig("all_languages", true, false, "locale");
TQString groupName = code;
- const int i = groupName.find('_');
- groupName.replace(0, i, groupName.left(i).lower());
+ const int i = groupName.tqfind('_');
+ groupName.tqreplace(0, i, groupName.left(i).lower());
d->languages->setGroup(groupName);
return d->languages->readEntry("Name");
@@ -2466,7 +2466,7 @@ KLocale & KLocale::operator=(const KLocale & rhs)
}
bool KLocale::setCharset(const TQString & ) { return true; }
-TQString KLocale::charset() const { return TQString::fromLatin1("UTF-8"); }
+TQString KLocale::charset() const { return TQString::tqfromLatin1("UTF-8"); }
// KDE4: remove
#if 0
diff --git a/kdecore/klocale.h b/kdecore/klocale.h
index 5f8be8f7c..9bca02077 100644
--- a/kdecore/klocale.h
+++ b/kdecore/klocale.h
@@ -1225,7 +1225,7 @@ private:
static TQCString encodeFileNameUTF8( const TQString & fileName );
#endif // USE_QT3
#ifdef USE_QT4
- static TQByteArray encodeFileNameUTF8( const TQString & fileName );
+ static QByteArray encodeFileNameUTF8( const QString & fileName );
#endif // USE_QT4
/**
@@ -1235,7 +1235,7 @@ private:
static TQString decodeFileNameUTF8( const TQCString & localFileName );
#endif // USE_QT3
#ifdef USE_QT4
- static TQString decodeFileNameUTF8( const TQByteArray & localFileName );
+ static QString decodeFileNameUTF8( const QByteArray & localFileName );
#endif // USE_QT4
/**
diff --git a/kdecore/kmacroexpander.cpp b/kdecore/kmacroexpander.cpp
index 5516c1b61..89eb5c72f 100644
--- a/kdecore/kmacroexpander.cpp
+++ b/kdecore/kmacroexpander.cpp
@@ -40,7 +40,7 @@ KMacroExpanderBase::setEscapeChar( TQChar c )
escapechar = c;
}
-QChar
+TQChar
KMacroExpanderBase::escapeChar() const
{
return escapechar;
@@ -56,7 +56,7 @@ void KMacroExpanderBase::expandMacros( TQString &str )
for (pos = 0; pos < str.length(); ) {
if (ec != (QChar)0) {
- if (str.unicode()[pos] != ec)
+ if (str.tqunicode()[pos] != ec)
goto nohit;
if (!(len = expandEscapedMacro( str, pos, rst )))
goto nohit;
@@ -109,7 +109,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos )
TQString rsts;
while (pos < str.length()) {
- TQChar cc( str.unicode()[pos] );
+ TQChar cc( str.tqunicode()[pos] );
if (ec != (QChar)0) {
if (cc != ec)
goto nohit;
@@ -205,7 +205,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos )
pos = pos2;
return false;
}
- cc = str.unicode()[pos2];
+ cc = str.tqunicode()[pos2];
if (cc == (QChar)'`')
break;
if (cc == (QChar)'\\') {
@@ -339,7 +339,7 @@ template<class VT>
int
KMacroMapExpander<TQChar,VT>::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{
- TQMapConstIterator<TQChar,VT> it = macromap.find(str[pos]);
+ TQMapConstIterator<TQChar,VT> it = macromap.tqfind(str[pos]);
if (it != macromap.end()) {
ret += it.data();
return 1;
@@ -355,7 +355,7 @@ KMacroMapExpander<TQChar,VT>::expandEscapedMacro( const TQString &str, uint pos,
ret += TQString( escapeChar() );
return 2;
}
- TQMapConstIterator<TQChar,VT> it = macromap.find(str[pos+1]);
+ TQMapConstIterator<TQChar,VT> it = macromap.tqfind(str[pos+1]);
if (it != macromap.end()) {
ret += it.data();
return 2;
@@ -383,14 +383,14 @@ template<class VT>
int
KMacroMapExpander<TQString,VT>::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{
- if (isIdentifier( str[pos - 1].unicode() ))
+ if (isIdentifier( str[pos - 1].tqunicode() ))
return 0;
uint sl;
- for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++);
+ for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++);
if (!sl)
return 0;
TQMapConstIterator<TQString,VT> it =
- macromap.find( TQConstString( str.unicode() + pos, sl ).string() );
+ macromap.tqfind( TQConstString( str.tqunicode() + pos, sl ).string() );
if (it != macromap.end()) {
ret += it.data();
return sl;
@@ -415,13 +415,13 @@ KMacroMapExpander<TQString,VT>::expandEscapedMacro( const TQString &str, uint po
rsl = sl + 3;
} else {
rpos = pos + 1;
- for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++);
+ for (sl = 0; isIdentifier( str[rpos + sl].tqunicode() ); sl++);
rsl = sl + 1;
}
if (!sl)
return 0;
TQMapConstIterator<TQString,VT> it =
- macromap.find( TQConstString( str.unicode() + rpos, sl ).string() );
+ macromap.tqfind( TQConstString( str.tqunicode() + rpos, sl ).string() );
if (it != macromap.end()) {
ret += it.data();
return rsl;
@@ -454,13 +454,13 @@ KCharMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringL
int
KWordMacroExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret )
{
- if (isIdentifier( str[pos - 1].unicode() ))
+ if (isIdentifier( str[pos - 1].tqunicode() ))
return 0;
uint sl;
- for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++);
+ for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++);
if (!sl)
return 0;
- if (expandMacro( TQConstString( str.unicode() + pos, sl ).string(), ret ))
+ if (expandMacro( TQConstString( str.tqunicode() + pos, sl ).string(), ret ))
return sl;
return 0;
}
@@ -481,12 +481,12 @@ KWordMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringL
rsl = sl + 3;
} else {
rpos = pos + 1;
- for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++);
+ for (sl = 0; isIdentifier( str[rpos + sl].tqunicode() ); sl++);
rsl = sl + 1;
}
if (!sl)
return 0;
- if (expandMacro( TQConstString( str.unicode() + rpos, sl ).string(), ret ))
+ if (expandMacro( TQConstString( str.tqunicode() + rpos, sl ).string(), ret ))
return rsl;
return 0;
}
@@ -510,7 +510,7 @@ TexpandMacrosShellQuote( const TQString &ostr, const TQMap<KT,VT> &map, TQChar c
TQString str( ostr );
KMacroMapExpander<KT,VT> kmx( map, c );
if (!kmx.expandMacrosShellQuote( str ))
- return TQString::null;
+ return TQString();
return str;
}
diff --git a/kdecore/kmanagerselection.cpp b/kdecore/kmanagerselection.cpp
index b88990dbf..feabf630d 100644
--- a/kdecore/kmanagerselection.cpp
+++ b/kdecore/kmanagerselection.cpp
@@ -65,7 +65,7 @@ class KSelectionOwnerPrivate
KSelectionOwnerPrivate::KSelectionOwnerPrivate( KSelectionOwner* owner_P )
: owner( owner_P )
{
- kapp->installX11EventFilter( this );
+ kapp->installX11EventFilter( TQT_TQWIDGET(this) );
}
bool KSelectionOwnerPrivate::x11Event( XEvent* ev_P )
@@ -380,7 +380,7 @@ class KSelectionWatcherPrivate
KSelectionWatcherPrivate::KSelectionWatcherPrivate( KSelectionWatcher* watcher_P )
: watcher( watcher_P )
{
- kapp->installX11EventFilter( this );
+ kapp->installX11EventFilter( TQT_TQWIDGET(this) );
}
bool KSelectionWatcherPrivate::x11Event( XEvent* ev_P )
diff --git a/kdecore/kmanagerselection.h b/kdecore/kmanagerselection.h
index b6aefd9db..384f5d23f 100644
--- a/kdecore/kmanagerselection.h
+++ b/kdecore/kmanagerselection.h
@@ -28,6 +28,10 @@ DEALINGS IN THE SOFTWARE.
#include <tqobject.h>
#include <kdelibs_export.h>
+#ifdef Q_MOC_RUN
+#define Q_WS_X11
+#endif // Q_MOC_RUN
+
#ifdef Q_WS_X11 // FIXME(E)
#include <X11/Xlib.h>
@@ -44,7 +48,7 @@ class KSelectionOwnerPrivate;
@short ICCCM manager selection owner
*/
class KDECORE_EXPORT KSelectionOwner
- : public QObject
+ : public TQObject
{
Q_OBJECT
public:
@@ -167,7 +171,7 @@ class KSelectionWatcherPrivate;
@short ICCCM manager selection watching
*/
class KDECORE_EXPORT KSelectionWatcher
- : public QObject
+ : public TQObject
{
Q_OBJECT
public:
diff --git a/kdecore/kmdcodec.cpp b/kdecore/kmdcodec.cpp
index 76c80d329..4fe968361 100644
--- a/kdecore/kmdcodec.cpp
+++ b/kdecore/kmdcodec.cpp
@@ -787,7 +787,7 @@ void KMD5::update(const TQCString& in)
void KMD5::update(const unsigned char* in, int len)
{
if (len < 0)
- len = qstrlen(reinterpret_cast<const char*>(in));
+ len = tqstrlen(reinterpret_cast<const char*>(in));
if (!len)
return;
@@ -797,12 +797,12 @@ void KMD5::update(const unsigned char* in, int len)
return;
}
- Q_UINT32 in_index;
- Q_UINT32 buffer_index;
- Q_UINT32 buffer_space;
- Q_UINT32 in_length = static_cast<Q_UINT32>( len );
+ TQ_UINT32 in_index;
+ TQ_UINT32 buffer_index;
+ TQ_UINT32 buffer_space;
+ TQ_UINT32 in_length = static_cast<TQ_UINT32>( len );
- buffer_index = static_cast<Q_UINT32>((m_count[0] >> 3) & 0x3F);
+ buffer_index = static_cast<TQ_UINT32>((m_count[0] >> 3) & 0x3F);
if ( (m_count[0] += (in_length << 3))<(in_length << 3) )
m_count[1]++;
@@ -842,8 +842,8 @@ void KMD5::finalize ()
{
if (m_finalized) return;
- Q_UINT8 bits[8];
- Q_UINT32 index, padLen;
+ TQ_UINT8 bits[8];
+ TQ_UINT32 index, padLen;
static const unsigned char PADDING[64]=
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -856,7 +856,7 @@ void KMD5::finalize ()
//memcpy( bits, m_count, 8 );
// Pad out to 56 mod 64.
- index = static_cast<Q_UINT32>((m_count[0] >> 3) & 0x3f);
+ index = static_cast<TQ_UINT32>((m_count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index);
update (reinterpret_cast<const char*>(PADDING), padLen);
@@ -957,7 +957,7 @@ void KMD5::reset()
void KMD5::transform( const unsigned char block[64] )
{
- Q_UINT32 a = m_state[0], b = m_state[1], c = m_state[2], d = m_state[3], x[16];
+ TQ_UINT32 a = m_state[0], b = m_state[1], c = m_state[2], d = m_state[3], x[16];
decode (x, block, 64);
//memcpy( x, block, 64 );
@@ -1044,91 +1044,91 @@ void KMD5::transform( const unsigned char block[64] )
memset ( static_cast<void *>(x), 0, sizeof(x) );
}
-inline Q_UINT32 KMD5::rotate_left (Q_UINT32 x, Q_UINT32 n)
+inline TQ_UINT32 KMD5::rotate_left (TQ_UINT32 x, TQ_UINT32 n)
{
return (x << n) | (x >> (32-n)) ;
}
-inline Q_UINT32 KMD5::F (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z)
+inline TQ_UINT32 KMD5::F (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z)
{
return (x & y) | (~x & z);
}
-inline Q_UINT32 KMD5::G (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z)
+inline TQ_UINT32 KMD5::G (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z)
{
return (x & z) | (y & ~z);
}
-inline Q_UINT32 KMD5::H (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z)
+inline TQ_UINT32 KMD5::H (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z)
{
return x ^ y ^ z;
}
-inline Q_UINT32 KMD5::I (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z)
+inline TQ_UINT32 KMD5::I (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z)
{
return y ^ (x | ~z);
}
-void KMD5::FF ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d,
- Q_UINT32 x, Q_UINT32 s, Q_UINT32 ac )
+void KMD5::FF ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d,
+ TQ_UINT32 x, TQ_UINT32 s, TQ_UINT32 ac )
{
a += F(b, c, d) + x + ac;
a = rotate_left (a, s) +b;
}
-void KMD5::GG ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d,
- Q_UINT32 x, Q_UINT32 s, Q_UINT32 ac)
+void KMD5::GG ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d,
+ TQ_UINT32 x, TQ_UINT32 s, TQ_UINT32 ac)
{
a += G(b, c, d) + x + ac;
a = rotate_left (a, s) +b;
}
-void KMD5::HH ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d,
- Q_UINT32 x, Q_UINT32 s, Q_UINT32 ac )
+void KMD5::HH ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d,
+ TQ_UINT32 x, TQ_UINT32 s, TQ_UINT32 ac )
{
a += H(b, c, d) + x + ac;
a = rotate_left (a, s) +b;
}
-void KMD5::II ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d,
- Q_UINT32 x, Q_UINT32 s, Q_UINT32 ac )
+void KMD5::II ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d,
+ TQ_UINT32 x, TQ_UINT32 s, TQ_UINT32 ac )
{
a += I(b, c, d) + x + ac;
a = rotate_left (a, s) +b;
}
-void KMD5::encode ( unsigned char* output, Q_UINT32 *in, Q_UINT32 len )
+void KMD5::encode ( unsigned char* output, TQ_UINT32 *in, TQ_UINT32 len )
{
#if !defined(WORDS_BIGENDIAN)
memcpy(output, in, len);
#else
- Q_UINT32 i, j;
+ TQ_UINT32 i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
{
- output[j] = static_cast<Q_UINT8>((in[i] & 0xff));
- output[j+1] = static_cast<Q_UINT8>(((in[i] >> 8) & 0xff));
- output[j+2] = static_cast<Q_UINT8>(((in[i] >> 16) & 0xff));
- output[j+3] = static_cast<Q_UINT8>(((in[i] >> 24) & 0xff));
+ output[j] = static_cast<TQ_UINT8>((in[i] & 0xff));
+ output[j+1] = static_cast<TQ_UINT8>(((in[i] >> 8) & 0xff));
+ output[j+2] = static_cast<TQ_UINT8>(((in[i] >> 16) & 0xff));
+ output[j+3] = static_cast<TQ_UINT8>(((in[i] >> 24) & 0xff));
}
#endif
}
-// Decodes in (Q_UINT8) into output (Q_UINT32). Assumes len is a
+// Decodes in (TQ_UINT8) into output (TQ_UINT32). Assumes len is a
// multiple of 4.
-void KMD5::decode (Q_UINT32 *output, const unsigned char* in, Q_UINT32 len)
+void KMD5::decode (TQ_UINT32 *output, const unsigned char* in, TQ_UINT32 len)
{
#if !defined(WORDS_BIGENDIAN)
memcpy(output, in, len);
#else
- Q_UINT32 i, j;
+ TQ_UINT32 i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = static_cast<Q_UINT32>(in[j]) |
- (static_cast<Q_UINT32>(in[j+1]) << 8) |
- (static_cast<Q_UINT32>(in[j+2]) << 16) |
- (static_cast<Q_UINT32>(in[j+3]) << 24);
+ output[i] = static_cast<TQ_UINT32>(in[j]) |
+ (static_cast<TQ_UINT32>(in[j+1]) << 8) |
+ (static_cast<TQ_UINT32>(in[j+2]) << 16) |
+ (static_cast<TQ_UINT32>(in[j+3]) << 24);
#endif
}
@@ -1180,7 +1180,7 @@ void KMD4::update(const TQCString& in)
void KMD4::update(const unsigned char *in, int len)
{
if (len < 0)
- len = qstrlen(reinterpret_cast<const char*>(in));
+ len = tqstrlen(reinterpret_cast<const char*>(in));
if (!len)
return;
@@ -1190,12 +1190,12 @@ void KMD4::update(const unsigned char *in, int len)
return;
}
- Q_UINT32 t;
+ TQ_UINT32 t;
/* Update bitcount */
t = m_count[0];
- if ((m_count[0] = t + ((Q_UINT32) len << 3)) < t)
+ if ((m_count[0] = t + ((TQ_UINT32) len << 3)) < t)
m_count[1]++; /* Carry from low to high */
m_count[1] += len >> 29;
@@ -1205,17 +1205,17 @@ void KMD4::update(const unsigned char *in, int len)
if (t)
{
- Q_UINT8 *p = &m_buffer[ t ];
+ TQ_UINT8 *p = &m_buffer[ t ];
t = 64 - t;
- if ((Q_UINT32)len < t)
+ if ((TQ_UINT32)len < t)
{
memcpy (p, in, len);
return;
}
memcpy (p, in, t);
byteReverse (m_buffer, 16);
- transform (m_state, (Q_UINT32*) m_buffer);
+ transform (m_state, (TQ_UINT32*) m_buffer);
in += t;
len -= t;
}
@@ -1225,7 +1225,7 @@ void KMD4::update(const unsigned char *in, int len)
{
memcpy (m_buffer, in, 64);
byteReverse (m_buffer, 16);
- transform (m_state, (Q_UINT32 *) m_buffer);
+ transform (m_state, (TQ_UINT32 *) m_buffer);
in += 64;
len -= 64;
}
@@ -1272,7 +1272,7 @@ void KMD4::finalize()
/* Two lots of padding: Pad the first block to 64 bytes */
memset (p, 0, count);
byteReverse (m_buffer, 16);
- transform (m_state, (Q_UINT32*) m_buffer);
+ transform (m_state, (TQ_UINT32*) m_buffer);
/* Now fill the next block with 56 bytes */
memset (m_buffer, 0, 56);
@@ -1285,10 +1285,10 @@ void KMD4::finalize()
byteReverse (m_buffer, 14);
/* Append length in bits and transform */
- ((Q_UINT32 *) m_buffer)[14] = m_count[0];
- ((Q_UINT32 *) m_buffer)[15] = m_count[1];
+ ((TQ_UINT32 *) m_buffer)[14] = m_count[0];
+ ((TQ_UINT32 *) m_buffer)[15] = m_count[1];
- transform (m_state, (Q_UINT32 *) m_buffer);
+ transform (m_state, (TQ_UINT32 *) m_buffer);
byteReverse ((unsigned char *) m_state, 4);
memcpy (m_digest, m_state, 16);
@@ -1380,53 +1380,53 @@ void KMD4::reset()
memset ( m_digest, 0, sizeof(*m_digest));
}
-//#define rotl32(x,n) (((x) << ((Q_UINT32)(n))) | ((x) >> (32 - (Q_UINT32)(n))))
+//#define rotl32(x,n) (((x) << ((TQ_UINT32)(n))) | ((x) >> (32 - (TQ_UINT32)(n))))
-inline Q_UINT32 KMD4::rotate_left (Q_UINT32 x, Q_UINT32 n)
+inline TQ_UINT32 KMD4::rotate_left (TQ_UINT32 x, TQ_UINT32 n)
{
return (x << n) | (x >> (32-n)) ;
}
-inline Q_UINT32 KMD4::F (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z)
+inline TQ_UINT32 KMD4::F (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z)
{
return (x & y) | (~x & z);
}
-inline Q_UINT32 KMD4::G (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z)
+inline TQ_UINT32 KMD4::G (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z)
{
return ((x) & (y)) | ((x) & (z)) | ((y) & (z));
}
-inline Q_UINT32 KMD4::H (Q_UINT32 x, Q_UINT32 y, Q_UINT32 z)
+inline TQ_UINT32 KMD4::H (TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z)
{
return x ^ y ^ z;
}
-inline void KMD4::FF ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d,
- Q_UINT32 x, Q_UINT32 s )
+inline void KMD4::FF ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d,
+ TQ_UINT32 x, TQ_UINT32 s )
{
a += F(b, c, d) + x;
a = rotate_left (a, s);
}
-inline void KMD4::GG ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d,
- Q_UINT32 x, Q_UINT32 s)
+inline void KMD4::GG ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d,
+ TQ_UINT32 x, TQ_UINT32 s)
{
- a += G(b, c, d) + x + (Q_UINT32)0x5a827999;
+ a += G(b, c, d) + x + (TQ_UINT32)0x5a827999;
a = rotate_left (a, s);
}
-inline void KMD4::HH ( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d,
- Q_UINT32 x, Q_UINT32 s )
+inline void KMD4::HH ( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d,
+ TQ_UINT32 x, TQ_UINT32 s )
{
- a += H(b, c, d) + x + (Q_UINT32)0x6ed9eba1;
+ a += H(b, c, d) + x + (TQ_UINT32)0x6ed9eba1;
a = rotate_left (a, s);
}
-void KMD4::byteReverse( unsigned char *buf, Q_UINT32 len )
+void KMD4::byteReverse( unsigned char *buf, TQ_UINT32 len )
{
#ifdef WORDS_BIGENDIAN
- Q_UINT32 *b = (Q_UINT32*) buf;
+ TQ_UINT32 *b = (TQ_UINT32*) buf;
while ( len > 0 ) {
*b = ((((*b) & 0xff000000) >> 24) | (((*b) & 0x00ff0000) >> 8) |
(((*b) & 0x0000ff00) << 8) | (((*b) & 0x000000ff) << 24));
@@ -1442,9 +1442,9 @@ void KMD4::byteReverse( unsigned char *buf, Q_UINT32 len )
/*
* The core of the MD4 algorithm
*/
-void KMD4::transform( Q_UINT32 buf[4], Q_UINT32 const in[16] )
+void KMD4::transform( TQ_UINT32 buf[4], TQ_UINT32 const in[16] )
{
- Q_UINT32 a, b, c, d;
+ TQ_UINT32 a, b, c, d;
a = buf[0];
b = buf[1];
diff --git a/kdecore/kmdcodec.h b/kdecore/kmdcodec.h
index ef1d49d1e..d4bd8dfb0 100644
--- a/kdecore/kmdcodec.h
+++ b/kdecore/kmdcodec.h
@@ -541,27 +541,27 @@ private:
KMD5& operator=(const KMD5& md);
void init();
- void encode( unsigned char* output, Q_UINT32 *in, Q_UINT32 len );
- void decode( Q_UINT32 *output, const unsigned char* in, Q_UINT32 len );
-
- Q_UINT32 rotate_left( Q_UINT32 x, Q_UINT32 n );
- Q_UINT32 F( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z );
- Q_UINT32 G( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z );
- Q_UINT32 H( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z );
- Q_UINT32 I( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z );
- void FF( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x,
- Q_UINT32 s, Q_UINT32 ac );
- void GG( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x,
- Q_UINT32 s, Q_UINT32 ac );
- void HH( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x,
- Q_UINT32 s, Q_UINT32 ac );
- void II( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x,
- Q_UINT32 s, Q_UINT32 ac );
+ void encode( unsigned char* output, TQ_UINT32 *in, TQ_UINT32 len );
+ void decode( TQ_UINT32 *output, const unsigned char* in, TQ_UINT32 len );
+
+ TQ_UINT32 rotate_left( TQ_UINT32 x, TQ_UINT32 n );
+ TQ_UINT32 F( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z );
+ TQ_UINT32 G( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z );
+ TQ_UINT32 H( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z );
+ TQ_UINT32 I( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z );
+ void FF( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x,
+ TQ_UINT32 s, TQ_UINT32 ac );
+ void GG( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x,
+ TQ_UINT32 s, TQ_UINT32 ac );
+ void HH( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x,
+ TQ_UINT32 s, TQ_UINT32 ac );
+ void II( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x,
+ TQ_UINT32 s, TQ_UINT32 ac );
private:
- Q_UINT32 m_state[4];
- Q_UINT32 m_count[2];
- Q_UINT8 m_buffer[64];
+ TQ_UINT32 m_state[4];
+ TQ_UINT32 m_count[2];
+ TQ_UINT8 m_buffer[64];
Digest m_digest;
bool m_finalized;
@@ -704,7 +704,7 @@ protected:
* Performs the real update work. Note
* that length is implied to be 64.
*/
- void transform( Q_UINT32 buf[4], Q_UINT32 const in[16] );
+ void transform( TQ_UINT32 buf[4], TQ_UINT32 const in[16] );
/**
* finalizes the digest
@@ -717,23 +717,23 @@ private:
void init();
- void byteReverse( unsigned char *buf, Q_UINT32 len );
+ void byteReverse( unsigned char *buf, TQ_UINT32 len );
- Q_UINT32 rotate_left( Q_UINT32 x, Q_UINT32 n );
- Q_UINT32 F( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z );
- Q_UINT32 G( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z );
- Q_UINT32 H( Q_UINT32 x, Q_UINT32 y, Q_UINT32 z );
- void FF( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x,
- Q_UINT32 s );
- void GG( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x,
- Q_UINT32 s );
- void HH( Q_UINT32& a, Q_UINT32 b, Q_UINT32 c, Q_UINT32 d, Q_UINT32 x,
- Q_UINT32 s );
+ TQ_UINT32 rotate_left( TQ_UINT32 x, TQ_UINT32 n );
+ TQ_UINT32 F( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z );
+ TQ_UINT32 G( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z );
+ TQ_UINT32 H( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 z );
+ void FF( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x,
+ TQ_UINT32 s );
+ void GG( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x,
+ TQ_UINT32 s );
+ void HH( TQ_UINT32& a, TQ_UINT32 b, TQ_UINT32 c, TQ_UINT32 d, TQ_UINT32 x,
+ TQ_UINT32 s );
private:
- Q_UINT32 m_state[4];
- Q_UINT32 m_count[2];
- Q_UINT8 m_buffer[64];
+ TQ_UINT32 m_state[4];
+ TQ_UINT32 m_count[2];
+ TQ_UINT8 m_buffer[64];
Digest m_digest;
bool m_finalized;
diff --git a/kdecore/kmimesourcefactory.cpp b/kdecore/kmimesourcefactory.cpp
index 37745d398..0123f3465 100644
--- a/kdecore/kmimesourcefactory.cpp
+++ b/kdecore/kmimesourcefactory.cpp
@@ -60,7 +60,7 @@ TQString KMimeSourceFactory::makeAbsolute (const TQString& absOrRelName, const T
TQString myName;
TQString myContext;
- const int pos = absOrRelName.find ('|');
+ const int pos = absOrRelName.tqfind ('|');
if (pos > -1)
{
myContext = absOrRelName.left (pos);
diff --git a/kdecore/kmultipledrag.cpp b/kdecore/kmultipledrag.cpp
index 29d56bd85..94abe689e 100644
--- a/kdecore/kmultipledrag.cpp
+++ b/kdecore/kmultipledrag.cpp
@@ -39,9 +39,9 @@ void KMultipleDrag::addDragObject( TQDragObject *dragObject )
m_numberFormats.append( i ); // e.g. if it supports two formats, 0 and 1, store 2.
}
-TQByteArray KMultipleDrag::encodedData( const char *mime ) const
+TQByteArray KMultipleDrag::tqencodedData( const char *mime ) const
{
- //kdDebug() << "KMultipleDrag::encodedData " << mime << endl;
+ //kdDebug() << "KMultipleDrag::tqencodedData " << mime << endl;
// Iterate over the drag objects, and find the format in the right one
TQPtrListIterator<TQDragObject> it( m_dragObjects );
for ( ; it.current(); ++it )
@@ -49,7 +49,7 @@ TQByteArray KMultipleDrag::encodedData( const char *mime ) const
for ( int i = 0; it.current()->format( i ); ++i )
{
if ( ::qstrcmp( it.current()->format( i ), mime ) == 0 )
- return it.current()->encodedData( mime );
+ return it.current()->tqencodedData( mime );
}
}
return TQByteArray();
diff --git a/kdecore/kmultipledrag.h b/kdecore/kmultipledrag.h
index 47bfbd378..5dc6e2972 100644
--- a/kdecore/kmultipledrag.h
+++ b/kdecore/kmultipledrag.h
@@ -40,7 +40,7 @@ class KMultipleDragPrivate;
* Sample code for this:
*
* \code
- * KMultipleDrag *drag = new KMultipleDrag( parentWidget );
+ * KMultipleDrag *drag = new KMultipleDrag( tqparentWidget );
* drag->addDragObject( new TQImageDrag( someQImage, 0 ) );
* drag->addDragObject( new KURLDrag( someKURL, 0 ) );
* drag->drag();
@@ -80,7 +80,7 @@ public:
* @return the data, or a null byte array if not found
* @reimp
*/
- virtual TQByteArray encodedData( const char *mime ) const;
+ virtual TQByteArray tqencodedData( const char *mime ) const;
/**
* Returns the @p i'th supported format, or 0.
diff --git a/kdecore/knotifyclient.cpp b/kdecore/knotifyclient.cpp
index bce90d86a..185639f11 100644
--- a/kdecore/knotifyclient.cpp
+++ b/kdecore/knotifyclient.cpp
@@ -84,9 +84,9 @@ static int sendNotifyEvent(const TQString &message, const TQString &text,
int uniqueId = kMax( 1, kapp->random() ); // must not be 0 -- means failure!
// knotify daemon needs toplevel window
- TQWidget* widget = TQWidget::find( (WId)winId );
+ TQWidget* widget = TQT_TQWIDGET(TQWidget::find( (WId)winId ));
if( widget )
- winId = (int)widget->topLevelWidget()->winId();
+ winId = (int)widget->tqtopLevelWidget()->winId();
TQByteArray data;
TQDataStream ds(data, IO_WriteOnly);
@@ -126,20 +126,20 @@ int KNotifyClient::event( int winId, StandardEvent type, const TQString& text )
TQString message;
switch ( type ) {
case cannotOpenFile:
- message = TQString::fromLatin1("cannotopenfile");
+ message = TQString::tqfromLatin1("cannotopenfile");
break;
case warning:
- message = TQString::fromLatin1("warning");
+ message = TQString::tqfromLatin1("warning");
break;
case fatalError:
- message = TQString::fromLatin1("fatalerror");
+ message = TQString::tqfromLatin1("fatalerror");
break;
case catastrophe:
- message = TQString::fromLatin1("catastrophe");
+ message = TQString::tqfromLatin1("catastrophe");
break;
case notification: // fall through
default:
- message = TQString::fromLatin1("notification");
+ message = TQString::tqfromLatin1("notification");
break;
}
diff --git a/kdecore/kpalette.cpp b/kdecore/kpalette.cpp
index 777340ea6..1a828fe4d 100644
--- a/kdecore/kpalette.cpp
+++ b/kdecore/kpalette.cpp
@@ -66,7 +66,7 @@ KPalette::KPalette(const TQString &name)
// Read first line
// Expected "GIMP Palette"
if (paletteFile.readLine(line, maxLength) == -1) return;
- if (line.find(" Palette") == -1) return;
+ if (line.tqfind(" Palette") == -1) return;
while( paletteFile.readLine(line, maxLength) != -1)
{
@@ -170,7 +170,7 @@ KPalette::operator=( const KPalette &p)
return *this;
}
-QColor
+TQColor
KPalette::color(int index)
{
if ((index < 0) || (index >= nrColors()))
@@ -196,7 +196,7 @@ KPalette::findColor(const TQColor &color) const
return -1;
}
-QString
+TQString
KPalette::colorName(int index)
{
if ((index < 0) || (index >= nrColors()))
diff --git a/kdecore/kprocctrl.cpp b/kdecore/kprocctrl.cpp
index d8170c0a8..6774eee5f 100644
--- a/kdecore/kprocctrl.cpp
+++ b/kdecore/kprocctrl.cpp
@@ -214,7 +214,7 @@ void KProcessController::slotDoHousekeeping()
if( waitpid( *uit, 0, WNOHANG ) > 0 )
{
uit = unixProcessList.remove( uit );
- deref(); // counterpart to addProcess, can invalidate 'this'
+ deref(); // counterpart to addProcess, can tqinvalidate 'this'
} else
++uit;
}
diff --git a/kdecore/kprocctrl.h b/kdecore/kprocctrl.h
index 69182a344..0e534f4ad 100644
--- a/kdecore/kprocctrl.h
+++ b/kdecore/kprocctrl.h
@@ -36,7 +36,7 @@ class TQSocketNotifier;
*
* This class takes care of the actual (UN*X) signal handling.
*/
-class KDECORE_EXPORT KProcessController : public QObject
+class KDECORE_EXPORT KProcessController : public TQObject
{
Q_OBJECT
diff --git a/kdecore/kprocess.h b/kdecore/kprocess.h
index 51366e3e4..a07df060e 100644
--- a/kdecore/kprocess.h
+++ b/kdecore/kprocess.h
@@ -127,7 +127,7 @@ class KPty;
* @author Christian Czezatke e9025461@student.tuwien.ac.at
*
**/
-class KDECORE_EXPORT KProcess : public QObject
+class KDECORE_EXPORT KProcess : public TQObject
{
Q_OBJECT
@@ -606,7 +606,7 @@ signals:
* data structures before returning from the slot.
* Example:
* \code
- * TQString myBuf = TQString::fromLatin1(buffer, buflen);
+ * TQString myBuf = TQString::tqfromLatin1(buffer, buflen);
* \endcode
**/
void receivedStdout(KProcess *proc, char *buffer, int buflen);
@@ -752,7 +752,7 @@ protected:
* will usually do some communications cleanup, like closing in[0],
* out[1] and out[1].
*
- * Furthermore, it must also create the QSocketNotifiers innot,
+ * Furthermore, it must also create the TQSocketNotifiers innot,
* outnot and errnot and connect their Qt signals to the respective
* KProcess slots.
*
diff --git a/kdecore/kprocio.cpp b/kdecore/kprocio.cpp
index 9159edab5..91c28024f 100644
--- a/kdecore/kprocio.cpp
+++ b/kdecore/kprocio.cpp
@@ -231,7 +231,7 @@ int KProcIO::readln (TQString &line, bool autoAck, bool *partial)
//need to reduce the size of recvbuffer at some point...
- len=recvbuffer.find ('\n',rbi)-rbi;
+ len=recvbuffer.tqfind ('\n',rbi)-rbi;
//kdDebug(174) << "KPIO::readln" << endl;
diff --git a/kdecore/kprocio.h b/kdecore/kprocio.h
index 8661699a7..89c69008e 100644
--- a/kdecore/kprocio.h
+++ b/kdecore/kprocio.h
@@ -35,7 +35,7 @@ class TQTextCodec;
* buffer and maintained/freed appropriately. There is no need
* to be concerned with wroteStdin() signals _at_all_.
* @li readln() reads a line of data and buffers any leftovers.
- * @li Conversion from/to unicode.
+ * @li Conversion from/to tqunicode.
*
* Basically, KProcIO gives you buffered I/O similar to fgets()/fputs().
*
diff --git a/kdecore/kprotocolinfo_kdecore.cpp b/kdecore/kprotocolinfo_kdecore.cpp
index 203f455a1..66ce97760 100644
--- a/kdecore/kprotocolinfo_kdecore.cpp
+++ b/kdecore/kprotocolinfo_kdecore.cpp
@@ -151,8 +151,8 @@ KProtocolInfo::load( TQDataStream& _str)
{
// You may add new fields at the end. Make sure to update the version
// number in ksycoca.h
- Q_INT32 i_inputType, i_outputType;
- Q_INT8 i_isSourceProtocol, i_isHelperProtocol,
+ TQ_INT32 i_inputType, i_outputType;
+ TQ_INT8 i_isSourceProtocol, i_isHelperProtocol,
i_supportsListing, i_supportsReading,
i_supportsWriting, i_supportsMakeDir,
i_supportsDeleting, i_supportsLinking,
@@ -206,8 +206,8 @@ KProtocolInfo::save( TQDataStream& _str)
// You may add new fields at the end. Make sure to update the version
// number in ksycoca.h
- Q_INT32 i_inputType, i_outputType;
- Q_INT8 i_isSourceProtocol, i_isHelperProtocol,
+ TQ_INT32 i_inputType, i_outputType;
+ TQ_INT8 i_isSourceProtocol, i_isHelperProtocol,
i_supportsListing, i_supportsReading,
i_supportsWriting, i_supportsMakeDir,
i_supportsDeleting, i_supportsLinking,
@@ -216,8 +216,8 @@ KProtocolInfo::save( TQDataStream& _str)
i_uriMode, i_canRenameFromFile, i_canRenameToFile,
i_canDeleteRecursive, i_fileNameUsedForCopying;
- i_inputType = (Q_INT32) m_inputType;
- i_outputType = (Q_INT32) m_outputType;
+ i_inputType = (TQ_INT32) m_inputType;
+ i_outputType = (TQ_INT32) m_outputType;
i_isSourceProtocol = m_isSourceProtocol ? 1 : 0;
i_isHelperProtocol = m_isHelperProtocol ? 1 : 0;
i_supportsListing = m_supportsListing ? 1 : 0;
@@ -392,7 +392,7 @@ TQString KProtocolInfo::icon( const TQString& _protocol )
{
KProtocolInfo::Ptr prot = KProtocolInfoFactory::self()->findProtocol(_protocol);
if ( !prot )
- return TQString::fromLatin1("unknown");
+ return TQString::tqfromLatin1("unknown");
return prot->m_icon;
}
diff --git a/kdecore/kprotocolinfofactory.cpp b/kdecore/kprotocolinfofactory.cpp
index e47cbb881..6d61c2d8c 100644
--- a/kdecore/kprotocolinfofactory.cpp
+++ b/kdecore/kprotocolinfofactory.cpp
@@ -86,7 +86,7 @@ KProtocolInfoFactory::findProtocol(const TQString &protocol)
{
if (!m_sycocaDict) return 0; // Error!
- TQMap<TQString,KProtocolInfo::Ptr>::iterator it = m_cache.find(protocol);
+ TQMap<TQString,KProtocolInfo::Ptr>::iterator it = m_cache.tqfind(protocol);
if (it != m_cache.end())
return (*it);
diff --git a/kdecore/kqiodevicegzip_p.cpp b/kdecore/kqiodevicegzip_p.cpp
index 2f949b9ee..8439eb26e 100644
--- a/kdecore/kqiodevicegzip_p.cpp
+++ b/kdecore/kqiodevicegzip_p.cpp
@@ -78,7 +78,11 @@ void KQIODeviceGZip::flush(void)
}
}
+#ifdef USE_QT4
+qint64 KQIODeviceGZip::size(void) const
+#else // USE_QT4
TQIODevice::Offset KQIODeviceGZip::size(void) const
+#endif // USE_QT4
{
return 0; // You cannot determine size!
}
@@ -111,9 +115,9 @@ bool KQIODeviceGZip::reset(void)
return (gzrewind(m_gzfile)>=0);
}
-Q_LONG KQIODeviceGZip::readBlock( char *data, Q_ULONG maxlen )
+TQ_LONG KQIODeviceGZip::readBlock( char *data, TQ_ULONG maxlen )
{
- Q_LONG result=0;
+ TQ_LONG result=0;
if (m_gzfile)
{
result=gzread(m_gzfile,data,maxlen);
@@ -122,9 +126,9 @@ Q_LONG KQIODeviceGZip::readBlock( char *data, Q_ULONG maxlen )
return result;
}
-Q_LONG KQIODeviceGZip::writeBlock( const char *data, Q_ULONG len )
+TQ_LONG KQIODeviceGZip::writeBlock( const char *data, TQ_ULONG len )
{
- Q_ULONG result=0;
+ TQ_ULONG result=0;
if (m_gzfile)
{
result=gzwrite(m_gzfile,(char*)data,len);
diff --git a/kdecore/kqiodevicegzip_p.h b/kdecore/kqiodevicegzip_p.h
index 02c3fe039..73da2281d 100644
--- a/kdecore/kqiodevicegzip_p.h
+++ b/kdecore/kqiodevicegzip_p.h
@@ -32,7 +32,7 @@
* \internal This class is internal to KDE.
* The class KFilterDev should be used instead.
*/
-class KQIODeviceGZip : public QIODevice
+class KQIODeviceGZip : public TQIODevice
{
public:
KQIODeviceGZip(const TQString& filename);
@@ -42,14 +42,18 @@ public:
void close(void);
void flush(void);
+#ifdef USE_QT4
+ qint64 size(void) const;
+#else // USE_QT4
Offset size(void) const;
+#endif // USE_QT4
Offset at(void) const;
bool at(Offset pos);
bool atEnd(void) const;
bool reset (void);
- Q_LONG readBlock( char *data, Q_ULONG maxlen );
- Q_LONG writeBlock( const char *data, Q_ULONG len );
+ TQ_LONG readBlock( char *data, TQ_ULONG maxlen );
+ TQ_LONG writeBlock( const char *data, TQ_ULONG len );
int getch(void);
int putch(int ch);
diff --git a/kdecore/kregexp.h b/kdecore/kregexp.h
index c3ed8ff3d..88d16a3c7 100644
--- a/kdecore/kregexp.h
+++ b/kdecore/kregexp.h
@@ -30,7 +30,7 @@ class KRegExpPrivate;
*
* This was implemented
* because TQRegExp did not support back-references. It now does and
- * is recommended over KRegExp because of the unicode support and the
+ * is recommended over KRegExp because of the tqunicode support and the
* more powerful API.
*
* Back-references are parts of a regexp grouped with parentheses. If a
@@ -53,7 +53,7 @@ class KRegExpPrivate;
* Weis
* \endcode
*
- * Please notice that KRegExp does @em not support unicode.
+ * Please notice that KRegExp does @em not support tqunicode.
*
* @author Torben Weis <weis@kde.org>
*/
diff --git a/kdecore/krfcdate.cpp b/kdecore/krfcdate.cpp
index d9a374d0c..ebb12aa62 100644
--- a/kdecore/krfcdate.cpp
+++ b/kdecore/krfcdate.cpp
@@ -363,12 +363,12 @@ KRFCDate::parseDateISO8601( const TQString& input_ )
TQString input = input_;
// First find the 'T' separator, if any.
- int tPos = input.find('T');
+ int tPos = input.tqfind('T');
// If there is no time, no month or no day specified, fill those missing
// fields so that 'input' matches YYYY-MM-DDTHH:MM:SS
if (-1 == tPos) {
- const int dashes = input.contains('-');
+ const int dashes = input.tqcontains('-');
if (0 == dashes) {
input += "-01-01";
} else if (1 == dashes) {
@@ -400,7 +400,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ )
// +zone or -zone suffix (offset from UTC).
- int plusPos = timeString.findRev('+');
+ int plusPos = timeString.tqfindRev('+');
if (-1 != plusPos) {
TQString offsetString = timeString.mid(plusPos + 1);
@@ -409,7 +409,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ )
timeString = timeString.left(plusPos);
} else {
- int minusPos = timeString.findRev('-');
+ int minusPos = timeString.tqfindRev('-');
if (-1 != minusPos) {
TQString offsetString = timeString.mid(minusPos + 1);
@@ -421,7 +421,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ )
}
// secfrac suffix.
- int dotPos = timeString.findRev('.');
+ int dotPos = timeString.tqfindRev('.');
if (-1 != dotPos) {
timeString = timeString.left(dotPos);
diff --git a/kdecore/krootprop.cpp b/kdecore/krootprop.cpp
index 2d545f30b..88f82b7d3 100644
--- a/kdecore/krootprop.cpp
+++ b/kdecore/krootprop.cpp
@@ -118,7 +118,7 @@ void KRootProp::setProp( const TQString& rProp )
{
// parse the string for first key-value pair separator '\n'
- i = s.find("\n");
+ i = s.tqfind("\n");
if(i == -1)
i = s.length();
@@ -131,7 +131,7 @@ void KRootProp::setProp( const TQString& rProp )
keypair.simplifyWhiteSpace();
- i = keypair.find( "=" );
+ i = keypair.tqfind( "=" );
if( i != -1 )
{
key = keypair.left( i );
@@ -160,7 +160,7 @@ void KRootProp::destroy()
TQString KRootProp::readEntry( const TQString& rKey,
const TQString& pDefault ) const
{
- if( propDict.contains( rKey ) )
+ if( propDict.tqcontains( rKey ) )
return propDict[ rKey ];
else
return pDefault;
@@ -217,18 +217,18 @@ TQColor KRootProp::readColorEntry( const TQString& rKey,
// Support #ffffff style color naming.
// Help ease transistion from legacy KDE setups
- if( aValue.find("#") == 0 ) {
+ if( aValue.tqfind("#") == 0 ) {
aRetColor.setNamedColor( aValue );
return aRetColor;
}
// Parse "red,green,blue"
// find first comma
- int nIndex1 = aValue.find( ',' );
+ int nIndex1 = aValue.tqfind( ',' );
if( nIndex1 == -1 )
return aRetColor;
// find second comma
- int nIndex2 = aValue.find( ',', nIndex1+1 );
+ int nIndex2 = aValue.tqfind( ',', nIndex1+1 );
if( nIndex2 == -1 )
return aRetColor;
@@ -246,9 +246,9 @@ TQColor KRootProp::readColorEntry( const TQString& rKey,
TQString KRootProp::writeEntry( const TQString& rKey, const TQString& rValue )
{
dirty = true;
- if ( propDict.contains( rKey ) ) {
+ if ( propDict.tqcontains( rKey ) ) {
TQString aValue = propDict[ rKey ];
- propDict.replace( rKey, rValue );
+ propDict.tqreplace( rKey, rValue );
return aValue;
}
else {
@@ -268,7 +268,7 @@ TQString KRootProp::writeEntry( const TQString& rKey, int nValue )
TQString KRootProp::writeEntry( const TQString& rKey, const TQFont& rFont )
{
- return writeEntry( rKey, rFont.toString() );
+ return writeEntry( rKey, TQString(rFont.toString()) );
}
TQString KRootProp::writeEntry( const TQString& rKey, const TQColor& rColor )
@@ -280,7 +280,7 @@ TQString KRootProp::writeEntry( const TQString& rKey, const TQColor& rColor )
TQString KRootProp::removeEntry(const TQString& rKey)
{
- if (propDict.contains(rKey)) {
+ if (propDict.tqcontains(rKey)) {
dirty = true;
TQString aValue = propDict[rKey];
propDict.remove(rKey);
diff --git a/kdecore/ksavefile.cpp b/kdecore/ksavefile.cpp
index 16887a677..1f1f28d23 100644
--- a/kdecore/ksavefile.cpp
+++ b/kdecore/ksavefile.cpp
@@ -55,7 +55,7 @@ KSaveFile::KSaveFile(const TQString &filename, int mode)
return;
}
- if (mTempFile.create(real_filename, TQString::fromLatin1(".new"), mode))
+ if (mTempFile.create(real_filename, TQString::tqfromLatin1(".new"), mode))
{
mFileName = real_filename; // Set filename upon success
@@ -90,7 +90,7 @@ KSaveFile::~KSaveFile()
close(); // Close if we were still open
}
-QString
+TQString
KSaveFile::name() const
{
return mFileName;
@@ -165,7 +165,7 @@ bool KSaveFile::backupFile( const TQString& qFilename, const TQString& backupDir
else
{
TQCString nameOnly;
- int slash = cFilename.findRev('/');
+ int slash = cFilename.tqfindRev('/');
if (slash < 0)
nameOnly = cFilename;
else
diff --git a/kdecore/ksavefile.h b/kdecore/ksavefile.h
index ae68b2d1f..448c9ca1a 100644
--- a/kdecore/ksavefile.h
+++ b/kdecore/ksavefile.h
@@ -140,7 +140,7 @@ public:
*/
static bool backupFile( const TQString& filename,
const TQString& backupDir = TQString::null,
- const TQString& backupExtension = TQString::fromLatin1( "~" ) );
+ const TQString& backupExtension = TQString::tqfromLatin1( "~" ) );
private:
TQString mFileName;
diff --git a/kdecore/kshell.cpp b/kdecore/kshell.cpp
index 5b92b1d5e..9ca5dc9b7 100644
--- a/kdecore/kshell.cpp
+++ b/kdecore/kshell.cpp
@@ -29,12 +29,12 @@
static int fromHex( TQChar c )
{
- if (c >= (QChar)'0' && c <= (QChar)'9')
- return c - (QChar)'0';
- else if (c >= (QChar)'A' && c <= (QChar)'F')
- return c - (QChar)'A' + 10;
- else if (c >= (QChar)'a' && c <= (QChar)'f')
- return c - (QChar)'a' + 10;
+ if (c >= (TQChar)'0' && c <= (TQChar)'9')
+ return c - (TQChar)'0';
+ else if (c >= (TQChar)'A' && c <= (TQChar)'F')
+ return c - (TQChar)'A' + 10;
+ else if (c >= (TQChar)'a' && c <= (TQChar)'f')
+ return c - (TQChar)'a' + 10;
return -1;
}
@@ -72,7 +72,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
do {
if (pos >= args.length())
goto okret;
- c = args.unicode()[pos++];
+ c = args.tqunicode()[pos++];
} while (c.isSpace());
TQString cret;
if ((flags & TildeExpand) && c == (QChar)'~') {
@@ -80,7 +80,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
for (; ; pos++) {
if (pos >= args.length())
break;
- c = args.unicode()[pos];
+ c = args.tqunicode()[pos];
if (c == (QChar)'/' || c.isSpace())
break;
if (isQuoteMeta( c )) {
@@ -91,7 +91,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
if ((flags & AbortOnMeta) && isMeta( c ))
goto metaerr;
}
- TQString ccret = homeDir( TQConstString( args.unicode() + opos, pos - opos ).string() );
+ TQString ccret = homeDir( TQConstString( args.tqunicode() + opos, pos - opos ).string() );
if (ccret.isEmpty()) {
pos = opos;
c = (QChar)'~';
@@ -129,20 +129,20 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
do {
if (pos >= args.length())
goto quoteerr;
- c = args.unicode()[pos++];
+ c = args.tqunicode()[pos++];
} while (c != (QChar)'\'');
- cret += TQConstString( args.unicode() + spos, pos - spos - 1 ).string();
+ cret += TQConstString( args.tqunicode() + spos, pos - spos - 1 ).string();
} else if (c == (QChar)'"') {
for (;;) {
if (pos >= args.length())
goto quoteerr;
- c = args.unicode()[pos++];
+ c = args.tqunicode()[pos++];
if (c == (QChar)'"')
break;
if (c == (QChar)'\\') {
if (pos >= args.length())
goto quoteerr;
- c = args.unicode()[pos++];
+ c = args.tqunicode()[pos++];
if (c != (QChar)'"' && c != (QChar)'\\' &&
!((flags & AbortOnMeta) && (c == (QChar)'$' || c == (QChar)'`')))
cret += (QChar)'\\';
@@ -155,13 +155,13 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
for (;;) {
if (pos >= args.length())
goto quoteerr;
- c = args.unicode()[pos++];
+ c = args.tqunicode()[pos++];
if (c == (QChar)'\'')
break;
if (c == (QChar)'\\') {
if (pos >= args.length())
goto quoteerr;
- c = args.unicode()[pos++];
+ c = args.tqunicode()[pos++];
switch (c) {
case 'a': cret += (QChar)'\a'; break;
case 'b': cret += (QChar)'\b'; break;
@@ -212,7 +212,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
if (c == (QChar)'\\') {
if (pos >= args.length())
goto quoteerr;
- c = args.unicode()[pos++];
+ c = args.tqunicode()[pos++];
if (!c.isSpace() &&
!((flags & AbortOnMeta) ? isMeta( c ) : isQuoteMeta( c )))
cret += '\\';
@@ -222,7 +222,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err )
}
if (pos >= args.length())
break;
- c = args.unicode()[pos++];
+ c = args.tqunicode()[pos++];
} while (!c.isSpace());
ret += cret;
firstword = false;
@@ -265,7 +265,7 @@ TQString KShell::joinArgs( const TQStringList &args )
ret.append( q ).append( q );
else {
for (uint i = 0; i < (*it).length(); i++)
- if (isSpecial((*it).unicode()[i])) {
+ if (isSpecial((*it).tqunicode()[i])) {
TQString tmp(*it);
tmp.replace( q, "'\\''" );
ret += q;
@@ -294,7 +294,7 @@ TQString KShell::joinArgs( const char * const *args, int nargs )
else {
TQString tmp( TQFile::decodeName( *argp ) );
for (uint i = 0; i < tmp.length(); i++)
- if (isSpecial(tmp.unicode()[i])) {
+ if (isSpecial(tmp.tqunicode()[i])) {
tmp.replace( q, "'\\''" );
ret += q;
tmp += q;
@@ -319,10 +319,10 @@ TQString KShell::joinArgsDQ( const TQStringList &args )
ret.append( q ).append( q );
else {
for (uint i = 0; i < (*it).length(); i++)
- if (isSpecial((*it).unicode()[i])) {
+ if (isSpecial((*it).tqunicode()[i])) {
ret.append( '$' ).append( q );
for (uint pos = 0; pos < (*it).length(); pos++) {
- int c = (*it).unicode()[pos];
+ int c = (*it).tqunicode()[pos];
if (c < 32) {
ret += bs;
switch (c) {
@@ -355,12 +355,12 @@ TQString KShell::joinArgsDQ( const TQStringList &args )
TQString KShell::tildeExpand( const TQString &fname )
{
if (fname[0] == (QChar)'~') {
- int pos = fname.find( '/' );
+ int pos = fname.tqfind( '/' );
if (pos < 0)
- return homeDir( TQConstString( fname.unicode() + 1, fname.length() - 1 ).string() );
- TQString ret = homeDir( TQConstString( fname.unicode() + 1, pos - 1 ).string() );
+ return homeDir( TQConstString( fname.tqunicode() + 1, fname.length() - 1 ).string() );
+ TQString ret = homeDir( TQConstString( fname.tqunicode() + 1, pos - 1 ).string() );
if (!ret.isNull())
- ret += TQConstString( fname.unicode() + pos, fname.length() - pos ).string();
+ ret += TQConstString( fname.tqunicode() + pos, fname.length() - pos ).string();
return ret;
}
return fname;
diff --git a/kdecore/kshortcut.cpp b/kdecore/kshortcut.cpp
index 4847b8742..10c6c31fa 100644
--- a/kdecore/kshortcut.cpp
+++ b/kdecore/kshortcut.cpp
@@ -88,10 +88,10 @@ bool KKey::init( const TQKeySequence& key )
bool KKey::init( const TQKeyEvent* pEvent )
{
int keyQt = pEvent->key();
- if( pEvent->state() & Qt::ShiftButton ) keyQt |= Qt::SHIFT;
- if( pEvent->state() & Qt::ControlButton ) keyQt |= Qt::CTRL;
- if( pEvent->state() & Qt::AltButton ) keyQt |= Qt::ALT;
- if( pEvent->state() & Qt::MetaButton ) keyQt |= Qt::META;
+ if( pEvent->state() & TQt::ShiftButton ) keyQt |= Qt::SHIFT;
+ if( pEvent->state() & TQt::ControlButton ) keyQt |= Qt::CTRL;
+ if( pEvent->state() & TQt::AltButton ) keyQt |= Qt::ALT;
+ if( pEvent->state() & TQt::MetaButton ) keyQt |= Qt::META;
return init( keyQt );
}
diff --git a/kdecore/kshortcutmenu.cpp b/kdecore/kshortcutmenu.cpp
index 3df389f07..930095c84 100644
--- a/kdecore/kshortcutmenu.cpp
+++ b/kdecore/kshortcutmenu.cpp
@@ -123,7 +123,7 @@ int KShortcutMenu::searchForKey( KKey key )
uint iKey = m_seq.count();
for( uint iItem = 1; iItem < count(); iItem++ ) {
- if( m_seqs.contains( iItem ) ) {
+ if( m_seqs.tqcontains( iItem ) ) {
KKey keyItem = m_seqs[iItem].key( iKey );
//kdDebug(125) << "iItem = " << iItem << " key = " << key.toStringInternal() << " keyItem = " << keyItem.toStringInternal() << endl;
if( key == keyItem ) {
@@ -146,7 +146,7 @@ void KShortcutMenu::keepItemsMatching( KKey key )
m_seq.setKey( iKey, key );
for( uint iItem = 1; iItem < count(); iItem++ ) {
- if( m_seqs.contains( iItem ) ) {
+ if( m_seqs.tqcontains( iItem ) ) {
KKey keyItem = m_seqs[iItem].key( iKey );
if( key != keyItem ) {
m_seqs.remove( iItem );
diff --git a/kdecore/ksimpleconfig.cpp b/kdecore/ksimpleconfig.cpp
index 6b4e13a14..15597826d 100644
--- a/kdecore/ksimpleconfig.cpp
+++ b/kdecore/ksimpleconfig.cpp
@@ -38,7 +38,7 @@
#include "ksimpleconfig.h"
KSimpleConfig::KSimpleConfig(const TQString &fileName, bool bReadOnly)
- : KConfig(TQString::fromLatin1(""), bReadOnly, false)
+ : KConfig(TQString::tqfromLatin1(""), bReadOnly, false)
{
// the difference between KConfig and KSimpleConfig is just that
// for KSimpleConfig an absolute filename is guaranteed
diff --git a/kdecore/ksock.h b/kdecore/ksock.h
index 8f2c9280c..67de00dc3 100644
--- a/kdecore/ksock.h
+++ b/kdecore/ksock.h
@@ -22,6 +22,10 @@
#include "kdelibs_export.h"
+#ifdef Q_MOC_RUN
+#define Q_OS_UNIX
+#endif // Q_MOC_RUN
+
#ifdef Q_OS_UNIX
#include <tqobject.h>
@@ -84,7 +88,7 @@ class KServerSocketPrivate;
* @author Torben Weis <weis@uni-frankfurt.de>
* @short A TCP/IP client socket.
*/
-class KDECORE_EXPORT KSocket : public QObject
+class KDECORE_EXPORT KSocket : public TQObject
{
Q_OBJECT
public:
@@ -247,7 +251,7 @@ private:
*
* @author Torben Weis <weis@stud.uni-frankfurt.de>
*/
-class KDECORE_EXPORT KServerSocket : public QObject
+class KDECORE_EXPORT KServerSocket : public TQObject
{
Q_OBJECT
public:
diff --git a/kdecore/ksockaddr.cpp b/kdecore/ksockaddr.cpp
index 82bed0d5c..bc9c03059 100644
--- a/kdecore/ksockaddr.cpp
+++ b/kdecore/ksockaddr.cpp
@@ -421,7 +421,7 @@ bool KInetSocketAddress::setHost(const TQString& addr, int family)
#ifdef AF_INET6
// IPv6 addresses MUST contain colons (:) and IPv4 addresses must not
- if (addr.find(':') != -1)
+ if (addr.tqfind(':') != -1)
family = AF_INET6;
else
family = AF_INET;
@@ -485,7 +485,7 @@ bool KInetSocketAddress::setFamily(int _family)
return true;
}
-bool KInetSocketAddress::setFlowinfo(Q_UINT32 flowinfo)
+bool KInetSocketAddress::setFlowinfo(TQ_UINT32 flowinfo)
{
#ifdef AF_INET6
if (d->sockfamily == AF_INET6)
@@ -587,7 +587,7 @@ TQString KInetSocketAddress::nodeName() const
return i18n("<empty>");
}
- return TQString::fromLatin1(buf); // FIXME! What's the encoding?
+ return TQString::tqfromLatin1(buf); // FIXME! What's the encoding?
}
TQString KInetSocketAddress::serviceName() const
@@ -605,11 +605,11 @@ unsigned short KInetSocketAddress::port() const
#endif
}
-Q_UINT32 KInetSocketAddress::flowinfo() const
+TQ_UINT32 KInetSocketAddress::flowinfo() const
{
#ifdef AF_INET6
if (d->sockfamily == AF_INET6)
- return (Q_UINT32)d->sin6.sin6_flowinfo;
+ return (TQ_UINT32)d->sin6.sin6_flowinfo;
#endif
return 0;
}
@@ -677,9 +677,9 @@ void KInetSocketAddress::fromV4()
d->sin6.sin6_port = d->sin.sin_port;
// Make this a v4-mapped address
- ((Q_UINT32*)&d->sin6.sin6_addr)[0] = ((Q_UINT32*)&d->sin6.sin6_addr)[1] = 0;
- ((Q_UINT32*)&d->sin6.sin6_addr)[2] = htonl(0xffff);
- ((Q_UINT32*)&d->sin6.sin6_addr)[3] = *(Q_UINT32*)&d->sin.sin_addr;
+ ((TQ_UINT32*)&d->sin6.sin6_addr)[0] = ((TQ_UINT32*)&d->sin6.sin6_addr)[1] = 0;
+ ((TQ_UINT32*)&d->sin6.sin6_addr)[2] = htonl(0xffff);
+ ((TQ_UINT32*)&d->sin6.sin6_addr)[3] = *(TQ_UINT32*)&d->sin.sin_addr;
// Clear flowinfo and scopeid
d->sin6.sin6_flowinfo = 0;
@@ -700,7 +700,7 @@ void KInetSocketAddress::fromV6()
if (V6_CAN_CONVERT_TO_V4(&d->sin6.sin6_addr))
{
d->sin.sin_port = d->sin6.sin6_port;
- *(Q_UINT32*)&d->sin.sin_addr = ((Q_UINT32*)&d->sin6.sin6_addr)[3];
+ *(TQ_UINT32*)&d->sin.sin_addr = ((TQ_UINT32*)&d->sin6.sin6_addr)[3];
}
else
{
@@ -717,7 +717,7 @@ TQString KInetSocketAddress::addrToString(int family, const void* addr)
{
char buf[INET6_ADDRSTRLEN+1];
- return TQString::fromLatin1(inet_ntop(family, addr, buf, INET6_ADDRSTRLEN));
+ return TQString::tqfromLatin1(inet_ntop(family, addr, buf, INET6_ADDRSTRLEN));
}
bool KInetSocketAddress::stringToAddr(int family, const char *text, void *dest)
diff --git a/kdecore/ksockaddr.h b/kdecore/ksockaddr.h
index 8b62f7da9..04ae350aa 100644
--- a/kdecore/ksockaddr.h
+++ b/kdecore/ksockaddr.h
@@ -43,7 +43,7 @@ class KSocketAddressPrivate;
* @author Thiago Macieira <thiago.macieira@kdemail.net>
* @short a socket address.
*/
-class KDECORE_EXPORT KSocketAddress: public QObject
+class KDECORE_EXPORT KSocketAddress: public TQObject
{
Q_OBJECT
protected:
@@ -391,7 +391,7 @@ public:
* @param flowinfo flowinfo
* @return true if successful, false otherwise
*/
- bool setFlowinfo(Q_UINT32 flowinfo);
+ bool setFlowinfo(TQ_UINT32 flowinfo);
/**
* Sets the scope id for this socket if this is IPv6.
@@ -461,7 +461,7 @@ public:
* Returns flowinfo for IPv6 socket.
* @return the flowinfo, 0 if unsupported
*/
- Q_UINT32 flowinfo() const;
+ TQ_UINT32 flowinfo() const;
/**
* Returns the scope id for this IPv6 socket.
diff --git a/kdecore/kstandarddirs.cpp b/kdecore/kstandarddirs.cpp
index f8b7bd307..91a178a53 100644
--- a/kdecore/kstandarddirs.cpp
+++ b/kdecore/kstandarddirs.cpp
@@ -144,7 +144,7 @@ bool KStandardDirs::isRestrictedResource(const char *type, const TQString& relPa
void KStandardDirs::applyDataRestrictions(const TQString &relPath) const
{
TQString key;
- int i = relPath.find(QChar('/'));
+ int i = relPath.tqfind(QChar('/'));
if (i != -1)
key = "data_"+relPath.left(i);
else
@@ -159,7 +159,7 @@ TQStringList KStandardDirs::allTypes() const
{
TQStringList list;
for (int i = 0; types[i] != 0; ++i)
- list.append(TQString::fromLatin1(types[i]));
+ list.append(TQString::tqfromLatin1(types[i]));
return list;
}
@@ -192,7 +192,7 @@ void KStandardDirs::addPrefix( const TQString& _dir, bool priority )
if (dir.at(dir.length() - 1) != QChar('/'))
dir += QChar('/');
- if (!prefixes.contains(dir)) {
+ if (!prefixes.tqcontains(dir)) {
priorityAdd(prefixes, dir, priority);
dircache.clear();
}
@@ -212,7 +212,7 @@ void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority )
if (dir.at(dir.length() - 1) != QChar('/'))
dir += QChar('/');
- if (!d->xdgconf_prefixes.contains(dir)) {
+ if (!d->xdgconf_prefixes.tqcontains(dir)) {
priorityAdd(d->xdgconf_prefixes, dir, priority);
dircache.clear();
}
@@ -232,7 +232,7 @@ void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority )
if (dir.at(dir.length() - 1) != QChar('/'))
dir += QChar('/');
- if (!d->xdgdata_prefixes.contains(dir)) {
+ if (!d->xdgdata_prefixes.tqcontains(dir)) {
priorityAdd(d->xdgdata_prefixes, dir, priority);
dircache.clear();
}
@@ -265,7 +265,7 @@ bool KStandardDirs::addResourceType( const char *type,
if (relativename.isEmpty())
return false;
- TQStringList *rels = relatives.find(type);
+ TQStringList *rels = relatives.tqfind(type);
if (!rels) {
rels = new TQStringList();
relatives.insert(type, rels);
@@ -273,7 +273,7 @@ bool KStandardDirs::addResourceType( const char *type,
TQString copy = relativename;
if (copy.at(copy.length() - 1) != QChar('/'))
copy += QChar('/');
- if (!rels->contains(copy)) {
+ if (!rels->tqcontains(copy)) {
if (priority)
rels->prepend(copy);
else
@@ -295,7 +295,7 @@ bool KStandardDirs::addResourceDir( const char *type,
const TQString& absdir,
bool priority)
{
- TQStringList *paths = absolutes.find(type);
+ TQStringList *paths = absolutes.tqfind(type);
if (!paths) {
paths = new TQStringList();
absolutes.insert(type, paths);
@@ -304,7 +304,7 @@ bool KStandardDirs::addResourceDir( const char *type,
if (copy.at(copy.length() - 1) != QChar('/'))
copy += QChar('/');
- if (!paths->contains(copy)) {
+ if (!paths->tqcontains(copy)) {
if (priority)
paths->prepend(copy);
else
@@ -337,7 +337,7 @@ for (TQStringList::ConstIterator pit = prefixes.begin();
else return dir + filename;
}
-static Q_UINT32 updateHash(const TQString &file, Q_UINT32 hash)
+static TQ_UINT32 updateHash(const TQString &file, TQ_UINT32 hash)
{
TQCString cFile = TQFile::encodeName(file);
KDE_struct_stat buff;
@@ -345,15 +345,15 @@ static Q_UINT32 updateHash(const TQString &file, Q_UINT32 hash)
(KDE_stat( cFile, &buff ) == 0) &&
(S_ISREG( buff.st_mode )))
{
- hash = hash + (Q_UINT32) buff.st_ctime;
+ hash = hash + (TQ_UINT32) buff.st_ctime;
}
return hash;
}
-Q_UINT32 KStandardDirs::calcResourceHash( const char *type,
+TQ_UINT32 KStandardDirs::calcResourceHash( const char *type,
const TQString& filename, bool deep) const
{
- Q_UINT32 hash = 0;
+ TQ_UINT32 hash = 0;
if (!TQDir::isRelativePath(filename))
{
@@ -492,7 +492,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart,
while( ( ep = readdir( dp ) ) != 0L )
{
TQString fn( TQFile::decodeName(ep->d_name));
- if (fn == _dot || fn == _dotdot || fn.at(fn.length() - 1).latin1() == QChar('~').latin1())
+ if (fn == _dot || fn == _dotdot || TQChar(fn.at(fn.length() - 1)).latin1() == TQChar('~').latin1())
continue;
if (!recursive && !regexp.exactMatch(fn))
@@ -512,7 +512,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart,
}
if ( S_ISREG( buff.st_mode))
{
- if (!unique || !relList.contains(relPart + fn))
+ if (!unique || !relList.tqcontains(relPart + fn))
{
list.append( pathfn );
relList.append( relPart + fn );
@@ -531,7 +531,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart,
return; // File not found
if ( S_ISREG( buff.st_mode))
{
- if (!unique || !relList.contains(relPart + fn))
+ if (!unique || !relList.tqcontains(relPart + fn))
{
list.append( pathfn );
relList.append( relPart + fn );
@@ -557,7 +557,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath,
if (relpath.length())
{
- int slash = relpath.find(QChar('/'));
+ int slash = relpath.tqfind(QChar('/'));
if (slash < 0)
rest = relpath.left(relpath.length() - 1);
else {
@@ -629,7 +629,7 @@ KStandardDirs::findAllResources( const char *type,
if (filter.length())
{
- int slash = filter.findRev('/');
+ int slash = filter.tqfindRev('/');
if (slash < 0)
filterFile = filter;
else {
@@ -682,7 +682,7 @@ KStandardDirs::findAllResources( const char *type,
return findAllResources(type, filter, recursive, unique, relList);
}
-QString
+TQString
KStandardDirs::realPath(const TQString &dirname)
{
char realpath_buffer[MAXPATHLEN + 1];
@@ -692,7 +692,7 @@ KStandardDirs::realPath(const TQString &dirname)
if (realpath( TQFile::encodeName(dirname).data(), realpath_buffer) != 0) {
// success, use result from realpath
int len = strlen(realpath_buffer);
- realpath_buffer[len] = QChar('/');
+ realpath_buffer[len] = TQChar('/');
realpath_buffer[len+1] = 0;
return TQFile::decodeName(realpath_buffer);
}
@@ -700,7 +700,7 @@ KStandardDirs::realPath(const TQString &dirname)
return dirname;
}
-QString
+TQString
KStandardDirs::realFilePath(const TQString &filename)
{
char realpath_buffer[MAXPATHLEN + 1];
@@ -762,9 +762,9 @@ void KStandardDirs::createSpecialResource(const char *type)
#else //UNIX
if (relink)
{
- TQString srv = findExe(TQString::fromLatin1("lnusertemp"), kfsstnd_defaultbindir());
+ TQString srv = findExe(TQString::tqfromLatin1("lnusertemp"), kfsstnd_defaultbindir());
if (srv.isEmpty())
- srv = findExe(TQString::fromLatin1("lnusertemp"));
+ srv = findExe(TQString::tqfromLatin1("lnusertemp"));
if (!srv.isEmpty())
{
system(TQFile::encodeName(srv)+" "+type);
@@ -774,7 +774,7 @@ void KStandardDirs::createSpecialResource(const char *type)
if (result > 0)
{
link[result] = 0;
- if (link[0] == QChar('/').latin1())
+ if (link[0] == TQChar('/').latin1())
dir = TQFile::decodeName(link);
else
dir = TQDir::cleanDirPath(dir+TQFile::decodeName(link));
@@ -785,7 +785,7 @@ void KStandardDirs::createSpecialResource(const char *type)
TQStringList KStandardDirs::resourceDirs(const char *type) const
{
- TQStringList *candidates = dircache.find(type);
+ TQStringList *candidates = dircache.tqfind(type);
if (!candidates) { // filling cache
if (strcmp(type, "socket") == 0)
@@ -812,7 +812,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const
d->dataRestrictionActive = false; // Reset
}
- dirs = relatives.find(type);
+ dirs = relatives.tqfind(type);
if (dirs)
{
bool local = true;
@@ -834,7 +834,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const
testdir.setPath(path);
if (local && restrictionActive)
continue;
- if ((local || testdir.exists()) && !candidates->contains(path))
+ if ((local || testdir.exists()) && !candidates->tqcontains(path))
candidates->append(path);
}
// UGLY HACK - Chris CHeney
@@ -844,7 +844,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const
local = false;
}
}
- dirs = absolutes.find(type);
+ dirs = absolutes.tqfind(type);
if (dirs)
for (TQStringList::ConstIterator it = dirs->begin();
it != dirs->end(); ++it)
@@ -853,7 +853,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const
if (testdir.exists())
{
TQString filename = realPath(*it);
- if (!candidates->contains(filename))
+ if (!candidates->tqcontains(filename))
candidates->append(filename);
}
}
@@ -897,7 +897,7 @@ TQStringList KStandardDirs::systemPaths( const TQString& pstr )
if ( p[ 0 ] == QChar('~') )
{
- int len = p.find( QChar('/') );
+ int len = p.tqfind( QChar('/') );
if ( len == -1 )
len = p.length();
if ( len == 1 )
@@ -931,7 +931,7 @@ TQString KStandardDirs::findExe( const TQString& appname,
TQFileInfo info;
// absolute or relative path given
- if (real_appname.find(TQDir::separator()) >= 0)
+ if (real_appname.tqfind(TQDir::separator()) >= 0)
{
info.setFile( real_appname );
if( info.exists() && ( ignore || info.isExecutable() )
@@ -1006,7 +1006,7 @@ static int tokenize( TQStringList& tokens, const TQString& str,
for( int index = 0; index < len; index++)
{
- if ( delim.find( str[ index ] ) >= 0 )
+ if ( delim.tqfind( str[ index ] ) >= 0 )
{
tokens.append( token );
token = "";
@@ -1093,17 +1093,17 @@ TQString KStandardDirs::saveLocation(const char *type,
{
checkConfig();
- TQString *pPath = savelocations.find(type);
+ TQString *pPath = savelocations.tqfind(type);
if (!pPath)
{
- TQStringList *dirs = relatives.find(type);
+ TQStringList *dirs = relatives.tqfind(type);
if (!dirs && (
(strcmp(type, "socket") == 0) ||
(strcmp(type, "tmp") == 0) ||
(strcmp(type, "cache") == 0) ))
{
(void) resourceDirs(type); // Generate socket|tmp|cache resource.
- dirs = relatives.find(type); // Search again.
+ dirs = relatives.tqfind(type); // Search again.
}
if (dirs)
{
@@ -1116,7 +1116,7 @@ TQString KStandardDirs::saveLocation(const char *type,
pPath = new TQString(realPath(localkdedir() + dirs->last()));
}
else {
- dirs = absolutes.find(type);
+ dirs = absolutes.tqfind(type);
if (!dirs)
qFatal("KStandardDirs: The resource type %s is not registered", type);
pPath = new TQString(realPath(dirs->last()));
@@ -1147,7 +1147,7 @@ TQString KStandardDirs::saveLocation(const char *type,
TQString KStandardDirs::relativeLocation(const char *type, const TQString &absPath)
{
TQString fullPath = absPath;
- int i = absPath.findRev('/');
+ int i = absPath.tqfindRev('/');
if (i != -1)
{
fullPath = realPath(absPath.left(i+1))+absPath.mid(i+1); // Normalize
@@ -1185,7 +1185,7 @@ bool KStandardDirs::makeDir(const TQString& dir, int mode)
while( i < len )
{
KDE_struct_stat st;
- int pos = target.find(QChar('/'), i);
+ int pos = target.tqfind(QChar('/'), i);
base += target.mid(i - 1, pos - i + 1);
TQCString baseEncoded = TQFile::encodeName(base);
// bail out if we encountered a problem
@@ -1229,17 +1229,17 @@ static TQString executablePrefix()
if (length == -1)
return TQString::null;
- path_buffer[length] = QChar('\0');
+ path_buffer[length] = TQChar('\0');
TQString path = TQFile::decodeName(path_buffer);
if(path.isEmpty())
return TQString::null;
- int pos = path.findRev('/'); // Skip filename
+ int pos = path.tqfindRev('/'); // Skip filename
if(pos <= 0)
return TQString::null;
- pos = path.findRev(QChar('/'), pos - 1); // Skip last directory
+ pos = path.tqfindRev(TQChar('/'), pos - 1); // Skip last directory
if(pos <= 0)
return TQString::null;
@@ -1272,11 +1272,11 @@ TQString KStandardDirs::kfsstnd_defaultbindir()
if (!s->defaultbindir.isEmpty())
return s->defaultbindir;
#ifdef Q_WS_WIN
- s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin");
+ s->defaultbindir = kfsstnd_defaultprefix() + TQString::tqfromLatin1("/bin");
#else //UNIX
s->defaultbindir = __KDE_BINDIR;
if (s->defaultbindir.isEmpty())
- s->defaultbindir = kfsstnd_defaultprefix() + TQString::fromLatin1("/bin");
+ s->defaultbindir = kfsstnd_defaultprefix() + TQString::tqfromLatin1("/bin");
#endif
if (s->defaultbindir.isEmpty())
kdWarning() << "KStandardDirs::kfsstnd_defaultbindir(): default binary KDE dir not found!" << endl;
@@ -1543,21 +1543,21 @@ bool KStandardDirs::addCustomized(KConfig *config)
addedCustoms = true;
// reading the prefixes in
- TQString group = TQString::fromLatin1("Directories");
+ TQString group = TQString::tqfromLatin1("Directories");
config->setGroup(group);
TQString kioskAdmin = config->readEntry("kioskAdmin");
if (!kioskAdmin.isEmpty() && !kde_kiosk_admin)
{
- int i = kioskAdmin.find(':');
+ int i = kioskAdmin.tqfind(':');
TQString user = kioskAdmin.left(i);
TQString host = kioskAdmin.mid(i+1);
KUser thisUser;
char hostname[ 256 ];
- hostname[ 0 ] = QChar('\0');
+ hostname[ 0 ] = TQChar('\0');
if (!gethostname( hostname, 255 ))
- hostname[sizeof(hostname)-1] = QChar('\0');
+ hostname[sizeof(hostname)-1] = TQChar('\0');
if ((user == thisUser.loginName()) &&
(host.isEmpty() || (host == hostname)))
@@ -1623,7 +1623,7 @@ bool KStandardDirs::addCustomized(KConfig *config)
if (profiles.isEmpty())
break;
profile = profiles.back();
- group = TQString::fromLatin1("Directories-%1").arg(profile);
+ group = TQString::tqfromLatin1("Directories-%1").arg(profile);
profiles.pop_back();
priority = true;
}
@@ -1694,7 +1694,7 @@ TQString locateLocal( const char *type,
{
// try to find slashes. If there are some, we have to
// create the subdir first
- int slash = filename.findRev('/')+1;
+ int slash = filename.tqfindRev('/')+1;
if (!slash) // only one filename
return inst->dirs()->saveLocation(type, TQString::null, createDir) + filename;
diff --git a/kdecore/kstandarddirs.h b/kdecore/kstandarddirs.h
index ded472d1d..16bfd1847 100644
--- a/kdecore/kstandarddirs.h
+++ b/kdecore/kstandarddirs.h
@@ -255,7 +255,7 @@ public:
* @return A number identifying the current version of the
* resource.
*/
- Q_UINT32 calcResourceHash( const char *type,
+ TQ_UINT32 calcResourceHash( const char *type,
const TQString& filename, bool deep) const;
/**
diff --git a/kdecore/kstartupinfo.cpp b/kdecore/kstartupinfo.cpp
index 673e5e6ab..a55c82f55 100644
--- a/kdecore/kstartupinfo.cpp
+++ b/kdecore/kstartupinfo.cpp
@@ -177,7 +177,7 @@ void KStartupInfo::got_message( const TQString& msg_P )
namespace
{
class DelayedWindowEvent
- : public QCustomEvent
+ : public TQCustomEvent
{
public:
DelayedWindowEvent( WId w_P )
@@ -234,7 +234,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P,
return;
if( id_P.none())
return;
- if( d->startups.contains( id_P ))
+ if( d->startups.tqcontains( id_P ))
{ // already reported, update
d->startups[ id_P ].update( data_P );
d->startups[ id_P ].age = 0; // CHECKME
@@ -250,7 +250,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P,
emit gotStartupChange( id_P, d->startups[ id_P ] );
return;
}
- if( d->silent_startups.contains( id_P ))
+ if( d->silent_startups.tqcontains( id_P ))
{ // already reported, update
d->silent_startups[ id_P ].update( data_P );
d->silent_startups[ id_P ].age = 0; // CHECKME
@@ -265,7 +265,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P,
emit gotStartupChange( id_P, d->silent_startups[ id_P ] );
return;
}
- if( d->uninited_startups.contains( id_P ))
+ if( d->uninited_startups.tqcontains( id_P ))
{
d->uninited_startups[ id_P ].update( data_P );
kdDebug( 172 ) << "updating uninited" << endl;
@@ -317,18 +317,18 @@ void KStartupInfo::remove_startup_info_internal( const KStartupInfoId& id_P )
{
if( d == NULL )
return;
- if( d->startups.contains( id_P ))
+ if( d->startups.tqcontains( id_P ))
{
kdDebug( 172 ) << "removing" << endl;
emit gotRemoveStartup( id_P, d->startups[ id_P ]);
d->startups.remove( id_P );
}
- else if( d->silent_startups.contains( id_P ))
+ else if( d->silent_startups.tqcontains( id_P ))
{
kdDebug( 172 ) << "removing silent" << endl;
d->silent_startups.remove( id_P );
}
- else if( d->uninited_startups.contains( id_P ))
+ else if( d->uninited_startups.tqcontains( id_P ))
{
kdDebug( 172 ) << "removing uninited" << endl;
d->uninited_startups.remove( id_P );
@@ -360,11 +360,11 @@ void KStartupInfo::remove_startup_pids( const KStartupInfoId& id_P,
return;
kdFatal( data_P.pids().count() == 0, 172 );
Data* data = NULL;
- if( d->startups.contains( id_P ))
+ if( d->startups.tqcontains( id_P ))
data = &d->startups[ id_P ];
- else if( d->silent_startups.contains( id_P ))
+ else if( d->silent_startups.tqcontains( id_P ))
data = &d->silent_startups[ id_P ];
- else if( d->uninited_startups.contains( id_P ))
+ else if( d->uninited_startups.tqcontains( id_P ))
data = &d->uninited_startups[ id_P ];
else
return;
@@ -381,7 +381,7 @@ bool KStartupInfo::sendStartup( const KStartupInfoId& id_P, const KStartupInfoDa
if( id_P.none())
return false;
KXMessages msgs;
- TQString msg = TQString::fromLatin1( "new: %1 %2" )
+ TQString msg = TQString::tqfromLatin1( "new: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
msg = check_required_startup_fields( msg, data_P, qt_xscreen());
kdDebug( 172 ) << "sending " << msg << endl;
@@ -394,7 +394,7 @@ bool KStartupInfo::sendStartupX( Display* disp_P, const KStartupInfoId& id_P,
{
if( id_P.none())
return false;
- TQString msg = TQString::fromLatin1( "new: %1 %2" )
+ TQString msg = TQString::tqfromLatin1( "new: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
msg = check_required_startup_fields( msg, data_P, DefaultScreen( disp_P ));
#ifdef KSTARTUPINFO_ALL_DEBUG
@@ -425,7 +425,7 @@ bool KStartupInfo::sendChange( const KStartupInfoId& id_P, const KStartupInfoDat
if( id_P.none())
return false;
KXMessages msgs;
- TQString msg = TQString::fromLatin1( "change: %1 %2" )
+ TQString msg = TQString::tqfromLatin1( "change: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
kdDebug( 172 ) << "sending " << msg << endl;
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
@@ -437,7 +437,7 @@ bool KStartupInfo::sendChangeX( Display* disp_P, const KStartupInfoId& id_P,
{
if( id_P.none())
return false;
- TQString msg = TQString::fromLatin1( "change: %1 %2" )
+ TQString msg = TQString::tqfromLatin1( "change: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
#ifdef KSTARTUPINFO_ALL_DEBUG
kdDebug( 172 ) << "sending " << msg << endl;
@@ -450,7 +450,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P )
if( id_P.none())
return false;
KXMessages msgs;
- TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
+ TQString msg = TQString::tqfromLatin1( "remove: %1" ).arg( id_P.to_text());
kdDebug( 172 ) << "sending " << msg << endl;
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
return true;
@@ -460,7 +460,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P )
{
if( id_P.none())
return false;
- TQString msg = TQString::fromLatin1( "remove: %1" ).arg( id_P.to_text());
+ TQString msg = TQString::tqfromLatin1( "remove: %1" ).arg( id_P.to_text());
#ifdef KSTARTUPINFO_ALL_DEBUG
kdDebug( 172 ) << "sending " << msg << endl;
#endif
@@ -472,7 +472,7 @@ bool KStartupInfo::sendFinish( const KStartupInfoId& id_P, const KStartupInfoDat
// if( id_P.none()) // id may be none, the pids and hostname matter then
// return false;
KXMessages msgs;
- TQString msg = TQString::fromLatin1( "remove: %1 %2" )
+ TQString msg = TQString::tqfromLatin1( "remove: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
kdDebug( 172 ) << "sending " << msg << endl;
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
@@ -484,7 +484,7 @@ bool KStartupInfo::sendFinishX( Display* disp_P, const KStartupInfoId& id_P,
{
// if( id_P.none()) // id may be none, the pids and hostname matter then
// return false;
- TQString msg = TQString::fromLatin1( "remove: %1 %2" )
+ TQString msg = TQString::tqfromLatin1( "remove: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
#ifdef KSTARTUPINFO_ALL_DEBUG
kdDebug( 172 ) << "sending " << msg << endl;
@@ -669,7 +669,7 @@ bool KStartupInfo::find_id( const TQCString& id_P, KStartupInfoId* id_O,
kdDebug( 172 ) << "find_id:" << id_P << endl;
KStartupInfoId id;
id.initId( id_P );
- if( d->startups.contains( id ))
+ if( d->startups.tqcontains( id ))
{
if( id_O != NULL )
*id_O = id;
@@ -790,7 +790,7 @@ void KStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P )
if( utf8_string_atom == None )
utf8_string_atom = XInternAtom( qt_xdisplay(), "UTF8_STRING", False );
XChangeProperty( qt_xdisplay(), w_P, net_startup_atom, utf8_string_atom, 8,
- PropModeReplace, reinterpret_cast< unsigned char* >( id_P.data()), id_P.length());
+ PropModeReplace, reinterpret_cast< unsigned char* >( const_cast<TQCString&>(id_P).data()), id_P.length());
#endif
}
@@ -939,9 +939,9 @@ TQCString KStartupInfo::createNewStartupId()
#else
unsigned long qt_x_user_time = 0;
#endif
- TQCString id = TQString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec )
- .arg( tm.tv_usec ).arg( getpid()).arg( qt_x_user_time ).utf8();
- kdDebug( 172 ) << "creating: " << id << ":" << qAppName() << endl;
+ TQCString id = TQString(TQString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec )
+ .arg( tm.tv_usec ).arg( getpid()).arg( qt_x_user_time )).utf8();
+ kdDebug( 172 ) << "creating: " << id << ":" << tqAppName() << endl;
return id;
}
@@ -960,14 +960,14 @@ const TQCString& KStartupInfoId::id() const
TQString KStartupInfoId::to_text() const
{
- return TQString::fromLatin1( " ID=\"%1\" " ).arg( escape_str( id()));
+ return TQString::tqfromLatin1( " ID=\"%1\" " ).arg( escape_str( id()));
}
KStartupInfoId::KStartupInfoId( const TQString& txt_P )
{
d = new KStartupInfoIdPrivate;
TQStringList items = get_fields( txt_P );
- const TQString id_str = TQString::fromLatin1( "ID=" );
+ const TQString id_str = TQString::tqfromLatin1( "ID=" );
for( TQStringList::Iterator it = items.begin();
it != items.end();
++it )
@@ -1074,7 +1074,7 @@ unsigned long KStartupInfoId::timestamp() const
{
if( none())
return 0;
- int pos = d->id.findRev( "_TIME" );
+ int pos = d->id.tqfindRev( "_TIME" );
if( pos >= 0 )
{
bool ok;
@@ -1088,10 +1088,10 @@ unsigned long KStartupInfoId::timestamp() const
// snprintf (s, len, "%s/%s/%lu/%d-%d-%s",
// canonicalized_launcher, canonicalized_launchee, (unsigned long) timestamp,
// (int) getpid (), (int) sequence_number, hostbuf);
- int pos1 = d->id.findRev( '/' );
+ int pos1 = d->id.tqfindRev( '/' );
if( pos1 > 0 )
{
- int pos2 = d->id.findRev( '/', pos1 - 1 );
+ int pos2 = d->id.tqfindRev( '/', pos1 - 1 );
if( pos2 >= 0 )
{
bool ok;
@@ -1129,34 +1129,34 @@ TQString KStartupInfoData::to_text() const
{
TQString ret = "";
if( !d->bin.isEmpty())
- ret += TQString::fromLatin1( " BIN=\"%1\"" ).arg( escape_str( d->bin ));
+ ret += TQString::tqfromLatin1( " BIN=\"%1\"" ).arg( escape_str( d->bin ));
if( !d->name.isEmpty())
- ret += TQString::fromLatin1( " NAME=\"%1\"" ).arg( escape_str( d->name ));
+ ret += TQString::tqfromLatin1( " NAME=\"%1\"" ).arg( escape_str( d->name ));
if( !d->description.isEmpty())
- ret += TQString::fromLatin1( " DESCRIPTION=\"%1\"" ).arg( escape_str( d->description ));
+ ret += TQString::tqfromLatin1( " DESCRIPTION=\"%1\"" ).arg( escape_str( d->description ));
if( !d->icon.isEmpty())
- ret += TQString::fromLatin1( " ICON=%1" ).arg( d->icon );
+ ret += TQString::tqfromLatin1( " ICON=%1" ).arg( d->icon );
if( d->desktop != 0 )
- ret += TQString::fromLatin1( " DESKTOP=%1" )
+ ret += TQString::tqfromLatin1( " DESKTOP=%1" )
.arg( d->desktop == NET::OnAllDesktops ? NET::OnAllDesktops : d->desktop - 1 ); // spec counts from 0
if( !d->wmclass.isEmpty())
- ret += TQString::fromLatin1( " WMCLASS=\"%1\"" ).arg( QString(d->wmclass) );
+ ret += TQString::tqfromLatin1( " WMCLASS=\"%1\"" ).arg( QString(d->wmclass) );
if( !d->hostname.isEmpty())
- ret += TQString::fromLatin1( " HOSTNAME=%1" ).arg( QString(d->hostname) );
+ ret += TQString::tqfromLatin1( " HOSTNAME=%1" ).arg( QString(d->hostname) );
for( TQValueList< pid_t >::ConstIterator it = d->pids.begin();
it != d->pids.end();
++it )
- ret += TQString::fromLatin1( " PID=%1" ).arg( *it );
+ ret += TQString::tqfromLatin1( " PID=%1" ).arg( *it );
if( d->silent != Unknown )
- ret += TQString::fromLatin1( " SILENT=%1" ).arg( d->silent == Yes ? 1 : 0 );
+ ret += TQString::tqfromLatin1( " SILENT=%1" ).arg( d->silent == Yes ? 1 : 0 );
if( d->timestamp != -1U )
- ret += TQString::fromLatin1( " TIMESTAMP=%1" ).arg( d->timestamp );
+ ret += TQString::tqfromLatin1( " TIMESTAMP=%1" ).arg( d->timestamp );
if( d->screen != -1 )
- ret += TQString::fromLatin1( " SCREEN=%1" ).arg( d->screen );
+ ret += TQString::tqfromLatin1( " SCREEN=%1" ).arg( d->screen );
if( d->xinerama != -1 )
- ret += TQString::fromLatin1( " XINERAMA=%1" ).arg( d->xinerama );
+ ret += TQString::tqfromLatin1( " XINERAMA=%1" ).arg( d->xinerama );
if( d->launched_by != 0 )
- ret += TQString::fromLatin1( " LAUNCHED_BY=%1" ).arg( d->launched_by );
+ ret += TQString::tqfromLatin1( " LAUNCHED_BY=%1" ).arg( d->launched_by );
return ret;
}
@@ -1164,19 +1164,19 @@ KStartupInfoData::KStartupInfoData( const TQString& txt_P )
{
d = new KStartupInfoDataPrivate;
TQStringList items = get_fields( txt_P );
- const TQString bin_str = TQString::fromLatin1( "BIN=" );
- const TQString name_str = TQString::fromLatin1( "NAME=" );
- const TQString description_str = TQString::fromLatin1( "DESCRIPTION=" );
- const TQString icon_str = TQString::fromLatin1( "ICON=" );
- const TQString desktop_str = TQString::fromLatin1( "DESKTOP=" );
- const TQString wmclass_str = TQString::fromLatin1( "WMCLASS=" );
- const TQString hostname_str = TQString::fromLatin1( "HOSTNAME=" ); // SELI nonstd
- const TQString pid_str = TQString::fromLatin1( "PID=" ); // SELI nonstd
- const TQString silent_str = TQString::fromLatin1( "SILENT=" );
- const TQString timestamp_str = TQString::fromLatin1( "TIMESTAMP=" );
- const TQString screen_str = TQString::fromLatin1( "SCREEN=" );
- const TQString xinerama_str = TQString::fromLatin1( "XINERAMA=" );
- const TQString launched_by_str = TQString::fromLatin1( "LAUNCHED_BY=" );
+ const TQString bin_str = TQString::tqfromLatin1( "BIN=" );
+ const TQString name_str = TQString::tqfromLatin1( "NAME=" );
+ const TQString description_str = TQString::tqfromLatin1( "DESCRIPTION=" );
+ const TQString icon_str = TQString::tqfromLatin1( "ICON=" );
+ const TQString desktop_str = TQString::tqfromLatin1( "DESKTOP=" );
+ const TQString wmclass_str = TQString::tqfromLatin1( "WMCLASS=" );
+ const TQString hostname_str = TQString::tqfromLatin1( "HOSTNAME=" ); // SELI nonstd
+ const TQString pid_str = TQString::tqfromLatin1( "PID=" ); // SELI nonstd
+ const TQString silent_str = TQString::tqfromLatin1( "SILENT=" );
+ const TQString timestamp_str = TQString::tqfromLatin1( "TIMESTAMP=" );
+ const TQString screen_str = TQString::tqfromLatin1( "SCREEN=" );
+ const TQString xinerama_str = TQString::tqfromLatin1( "XINERAMA=" );
+ const TQString launched_by_str = TQString::tqfromLatin1( "LAUNCHED_BY=" );
for( TQStringList::Iterator it = items.begin();
it != items.end();
++it )
@@ -1379,7 +1379,7 @@ const TQCString& KStartupInfoData::hostname() const
void KStartupInfoData::addPid( pid_t pid_P )
{
- if( !d->pids.contains( pid_P ))
+ if( !d->pids.tqcontains( pid_P ))
d->pids.append( pid_P );
}
@@ -1395,7 +1395,7 @@ const TQValueList< pid_t >& KStartupInfoData::pids() const
bool KStartupInfoData::is_pid( pid_t pid_P ) const
{
- return d->pids.contains( pid_P );
+ return d->pids.tqcontains( pid_P );
}
void KStartupInfoData::setSilent( TriState state_P )
@@ -1451,24 +1451,24 @@ WId KStartupInfoData::launchedBy() const
static
long get_num( const TQString& item_P )
{
- unsigned int pos = item_P.find( '=' );
+ unsigned int pos = item_P.tqfind( '=' );
return item_P.mid( pos + 1 ).toLong();
}
static
unsigned long get_unum( const TQString& item_P )
{
- unsigned int pos = item_P.find( '=' );
+ unsigned int pos = item_P.tqfind( '=' );
return item_P.mid( pos + 1 ).toULong();
}
static
TQString get_str( const TQString& item_P )
{
- unsigned int pos = item_P.find( '=' );
+ unsigned int pos = item_P.tqfind( '=' );
if( item_P.length() > pos + 2 && item_P[ pos + 1 ] == (QChar)'\"' )
{
- int pos2 = item_P.left( pos + 2 ).find( '\"' );
+ int pos2 = item_P.left( pos + 2 ).tqfind( '\"' );
if( pos2 < 0 )
return TQString::null; // 01234
return item_P.mid( pos + 2, pos2 - 2 - pos ); // A="C"
diff --git a/kdecore/kstartupinfo.h b/kdecore/kstartupinfo.h
index e35bdba56..da3018d8c 100644
--- a/kdecore/kstartupinfo.h
+++ b/kdecore/kstartupinfo.h
@@ -28,6 +28,10 @@ DEALINGS IN THE SOFTWARE.
#include <sys/types.h>
#include <tqobject.h>
+#ifdef Q_MOC_RUN
+#define Q_WS_X11
+#endif // Q_MOC_RUN
+
#ifdef Q_WS_X11 // FIXME(E): Redo in a less X11-specific way
#include <tqcstring.h>
@@ -61,9 +65,10 @@ class KStartupInfoPrivate;
* @author Lubos Lunak <l.lunak@kde.org>
*/
class KDECORE_EXPORT KStartupInfo
- : public QObject
+ : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* By default, the startup notification is ended for the application
diff --git a/kdecore/kstdaccel.cpp b/kdecore/kstdaccel.cpp
index 8e1819735..85f8dda20 100644
--- a/kdecore/kstdaccel.cpp
+++ b/kdecore/kstdaccel.cpp
@@ -76,8 +76,8 @@ static KStdAccelInfo g_infoStdAccel[] =
{ End, I18N_NOOP("End"), 0, Qt::CTRL+Qt::Key_End, 0, 0, 0, KShortcut(), false },
{ BeginningOfLine, "BeginningOfLine", I18N_NOOP("Beginning of Line"), Qt::Key_Home, 0, 0, 0, KShortcut(), false},
{ EndOfLine, "EndOfLine", I18N_NOOP("End of Line"), Qt::Key_End, 0, 0, 0, KShortcut(), false},
- { Prior, I18N_NOOP("Prior"), 0, Qt::Key_Prior, 0, 0, 0, KShortcut(), false },
- { Next, I18N_NOOP2("Opposite to Prior","Next"), 0, Qt::Key_Next, 0, 0, 0, KShortcut(), false },
+ { Prior, I18N_NOOP("Prior"), 0, TQt::Key_Prior, 0, 0, 0, KShortcut(), false },
+ { Next, I18N_NOOP2("Opposite to Prior","Next"), 0, TQt::Key_Next, 0, 0, 0, KShortcut(), false },
{ GotoLine, "GotoLine", I18N_NOOP("Go to Line"), Qt::CTRL+Qt::Key_G, 0, 0, 0, KShortcut(), false },
{ AddBookmark, "AddBookmark", I18N_NOOP("Add Bookmark"), Qt::CTRL+Qt::Key_B, 0, 0, 0, KShortcut(), false },
{ ZoomIn, "ZoomIn", I18N_NOOP("Zoom In"), Qt::CTRL+Qt::Key_Plus, 0, 0, 0, KShortcut(), false },
diff --git a/kdecore/kstringhandler.cpp b/kdecore/kstringhandler.cpp
index 8b5ca1a7d..e37d1a3ce 100644
--- a/kdecore/kstringhandler.cpp
+++ b/kdecore/kstringhandler.cpp
@@ -22,7 +22,7 @@
static void parsePythonRange( const TQCString &range, uint &start, uint &end )
{
- const int colon = range.find( ':' );
+ const int colon = range.tqfind( ':' );
if ( colon == -1 ) {
start = range.toUInt();
end = start;
@@ -178,7 +178,7 @@ TQString KStringHandler::remword( const TQString &text , const TQString &word )
// Split words and add into list
TQStringList list = TQStringList::split( " ", text, true );
- TQStringList::Iterator it = list.find(word);
+ TQStringList::Iterator it = list.tqfind(word);
if (it != list.end())
list.remove( it );
@@ -422,11 +422,11 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa
if ( pattern[ pattern_len - 1 ] == (QChar)'*' && len + 1 >= pattern_len ) {
if ( pattern[ 0 ] == (QChar)'*' )
{
- return filename.find(pattern.mid(1, pattern_len - 2)) != -1;
+ return filename.tqfind(pattern.mid(1, pattern_len - 2)) != -1;
}
- const TQChar *c1 = pattern.unicode();
- const TQChar *c2 = filename.unicode();
+ const TQChar *c1 = pattern.tqunicode();
+ const TQChar *c2 = filename.tqunicode();
int cnt = 1;
while ( cnt < pattern_len && *c1++ == *c2++ )
++cnt;
@@ -436,8 +436,8 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa
// Patterns like "*~", "*.extension"
if ( pattern[ 0 ] == (QChar)'*' && len + 1 >= pattern_len )
{
- const TQChar *c1 = pattern.unicode() + pattern_len - 1;
- const TQChar *c2 = filename.unicode() + len - 1;
+ const TQChar *c1 = pattern.tqunicode() + pattern_len - 1;
+ const TQChar *c2 = filename.tqunicode() + len - 1;
int cnt = 1;
while ( cnt < pattern_len && *c1-- == *c2-- )
++cnt;
@@ -457,7 +457,7 @@ KStringHandler::perlSplit(const TQString & sep, const TQString & s, uint max)
int searchStart = 0;
- int tokenStart = s.find(sep, searchStart);
+ int tokenStart = s.tqfind(sep, searchStart);
while (-1 != tokenStart && (ignoreMax || l.count() < max - 1))
{
@@ -465,7 +465,7 @@ KStringHandler::perlSplit(const TQString & sep, const TQString & s, uint max)
l << s.mid(searchStart, tokenStart - searchStart);
searchStart = tokenStart + sep.length();
- tokenStart = s.find(sep, searchStart);
+ tokenStart = s.tqfind(sep, searchStart);
}
if (!s.mid(searchStart, s.length() - searchStart).isEmpty())
@@ -483,7 +483,7 @@ KStringHandler::perlSplit(const TQChar & sep, const TQString & s, uint max)
int searchStart = 0;
- int tokenStart = s.find(sep, searchStart);
+ int tokenStart = s.tqfind(sep, searchStart);
while (-1 != tokenStart && (ignoreMax || l.count() < max - 1))
{
@@ -491,7 +491,7 @@ KStringHandler::perlSplit(const TQChar & sep, const TQString & s, uint max)
l << s.mid(searchStart, tokenStart - searchStart);
searchStart = tokenStart + 1;
- tokenStart = s.find(sep, searchStart);
+ tokenStart = s.tqfind(sep, searchStart);
}
if (!s.mid(searchStart, s.length() - searchStart).isEmpty())
@@ -527,7 +527,7 @@ KStringHandler::perlSplit(const TQRegExp & sep, const TQString & s, uint max)
return l;
}
- QString
+TQString
KStringHandler::tagURLs( const TQString& text )
{
/*static*/ TQRegExp urlEx("(www\\.(?!\\.)|(fish|(f|ht)tp(|s))://)[\\d\\w\\./,:_~\\?=&;#@\\-\\+\\%\\$]+[\\d\\w/]");
@@ -556,10 +556,10 @@ KStringHandler::tagURLs( const TQString& text )
TQString KStringHandler::obscure( const TQString &str )
{
TQString result;
- const TQChar *unicode = str.unicode();
+ const TQChar *tqunicode = str.tqunicode();
for ( uint i = 0; i < str.length(); ++i )
- result += ( unicode[ i ].unicode() < 0x21 ) ? unicode[ i ] :
- TQChar( 0x1001F - unicode[ i ].unicode() );
+ result += ( tqunicode[ i ].tqunicode() < 0x21 ) ? tqunicode[ i ] :
+ TQChar( 0x1001F - tqunicode[ i ].tqunicode() );
return result;
}
diff --git a/kdecore/ksycoca.cpp b/kdecore/ksycoca.cpp
index fd4d9aa95..a3d017f9a 100644
--- a/kdecore/ksycoca.cpp
+++ b/kdecore/ksycoca.cpp
@@ -76,7 +76,7 @@ public:
TQString language;
bool readError;
bool autoRebuild;
- Q_UINT32 updateSig;
+ TQ_UINT32 updateSig;
TQStringList allResourceDirs;
};
@@ -179,8 +179,8 @@ bool KSycoca::openDatabase( bool openDummyIfNotFound )
TQBuffer *buffer = new TQBuffer( TQByteArray() );
buffer->open(IO_ReadWrite);
m_str = new TQDataStream( buffer);
- (*m_str) << (Q_INT32) KSYCOCA_VERSION;
- (*m_str) << (Q_INT32) 0;
+ (*m_str) << (TQ_INT32) KSYCOCA_VERSION;
+ (*m_str) << (TQ_INT32) 0;
}
else
{
@@ -228,12 +228,15 @@ void KSycoca::closeDatabase()
{
TQIODevice *device = 0;
if (m_str)
- device = m_str->device();
+ device = m_str->tqdevice();
#ifdef HAVE_MMAP
if (device && m_sycoca_mmap)
{
TQBuffer *buf = (TQBuffer *) device;
- buf->buffer().resetRawData(m_sycoca_mmap, m_sycoca_size);
+#ifdef USE_QT4
+ static_cast<TQByteArray&>
+#endif // USE_QT4
+ (buf->buffer()).resetRawData(m_sycoca_mmap, m_sycoca_size);
// Solaris has munmap(char*, size_t) and everything else should
// be happy with a char* for munmap(void*, size_t)
munmap((char*) m_sycoca_mmap, m_sycoca_size);
@@ -244,7 +247,7 @@ void KSycoca::closeDatabase()
delete m_str;
m_str = 0;
delete device;
- if (d->database != device)
+ if (TQT_TQIODEVICE(d->database) != device)
delete d->database;
device = 0;
d->database = 0;
@@ -262,7 +265,7 @@ void KSycoca::addFactory( KSycocaFactory *factory )
bool KSycoca::isChanged(const char *type)
{
- return self()->d->changeList.contains(type);
+ return self()->d->changeList.tqcontains(type);
}
void KSycoca::notifyDatabaseChanged(const TQStringList &changeList)
@@ -284,8 +287,8 @@ TQDataStream * KSycoca::findEntry(int offset, KSycocaType &type)
if ( !m_str )
openDatabase();
//kdDebug(7011) << TQString("KSycoca::_findEntry(offset=%1)").arg(offset,8,16) << endl;
- m_str->device()->at(offset);
- Q_INT32 aType;
+ m_str->tqdevice()->at(offset);
+ TQ_INT32 aType;
(*m_str) >> aType;
type = (KSycocaType) aType;
//kdDebug(7011) << TQString("KSycoca::found type %1").arg(aType) << endl;
@@ -302,8 +305,8 @@ bool KSycoca::checkVersion(bool abortOnError)
// We should never get here... if a database was found then m_str shouldn't be 0L.
assert(m_str);
}
- m_str->device()->at(0);
- Q_INT32 aVersion;
+ m_str->tqdevice()->at(0);
+ TQ_INT32 aVersion;
(*m_str) >> aVersion;
if ( aVersion < KSYCOCA_VERSION )
{
@@ -342,8 +345,8 @@ TQDataStream * KSycoca::findFactory(KSycocaFactoryId id)
kdWarning(7011) << "Outdated database found" << endl;
return 0L;
}
- Q_INT32 aId;
- Q_INT32 aOffset;
+ TQ_INT32 aId;
+ TQ_INT32 aOffset;
while(true)
{
(*m_str) >> aId;
@@ -357,7 +360,7 @@ TQDataStream * KSycoca::findFactory(KSycocaFactoryId id)
if (aId == id)
{
//kdDebug(7011) << TQString("KSycoca::findFactory(%1) offset %2").arg((int)id).arg(aOffset) << endl;
- m_str->device()->at(aOffset);
+ m_str->tqdevice()->at(aOffset);
return m_str;
}
}
@@ -368,8 +371,8 @@ TQString KSycoca::kfsstnd_prefixes()
{
if (bNoDatabase) return "";
if (!checkVersion(false)) return "";
- Q_INT32 aId;
- Q_INT32 aOffset;
+ TQ_INT32 aId;
+ TQ_INT32 aOffset;
// skip factories offsets
while(true)
{
@@ -389,14 +392,14 @@ TQString KSycoca::kfsstnd_prefixes()
return prefixes;
}
-Q_UINT32 KSycoca::timeStamp()
+TQ_UINT32 KSycoca::timeStamp()
{
if (!m_timeStamp)
(void) kfsstnd_prefixes();
return m_timeStamp;
}
-Q_UINT32 KSycoca::updateSignature()
+TQ_UINT32 KSycoca::updateSignature()
{
if (!m_timeStamp)
(void) kfsstnd_prefixes();
@@ -424,11 +427,11 @@ TQString KSycoca::determineRelativePath( const TQString & _fullpath, const char
TQStringList::ConstIterator dirsit = dirs.begin();
for ( ; dirsit != dirs.end() && sRelativeFilePath.isEmpty(); ++dirsit ) {
// might need canonicalPath() ...
- if ( _fullpath.find( *dirsit ) == 0 ) // path is dirs + relativePath
+ if ( _fullpath.tqfind( *dirsit ) == 0 ) // path is dirs + relativePath
sRelativeFilePath = _fullpath.mid( (*dirsit).length() ); // skip appsdirs
}
if ( sRelativeFilePath.isEmpty() )
- kdFatal(7011) << TQString("Couldn't find %1 in any %2 dir !!!").arg( _fullpath ).arg( _resource) << endl;
+ kdFatal(7011) << TQString(TQString("Couldn't find %1 in any %2 dir !!!").arg( _fullpath ).arg( _resource)) << endl;
//else
// debug code
//kdDebug(7011) << sRelativeFilePath << endl;
@@ -469,7 +472,7 @@ bool KSycoca::readError()
void KSycocaEntry::read( TQDataStream &s, TQString &str )
{
- Q_UINT32 bytes;
+ TQ_UINT32 bytes;
s >> bytes; // read size of string
if ( bytes > 8192 ) { // null string or too big
if (bytes != 0xffffffff)
@@ -479,7 +482,7 @@ void KSycocaEntry::read( TQDataStream &s, TQString &str )
else if ( bytes > 0 ) { // not empty
int bt = bytes/2;
str.setLength( bt );
- TQChar* ch = (TQChar *) str.unicode();
+ TQChar* ch = (TQChar *) str.tqunicode();
char t[8192];
char *b = t;
s.readRawBytes( b, bytes );
@@ -495,14 +498,14 @@ void KSycocaEntry::read( TQDataStream &s, TQString &str )
void KSycocaEntry::read( TQDataStream &s, TQStringList &list )
{
list.clear();
- Q_UINT32 count;
+ TQ_UINT32 count;
s >> count; // read size of list
if (count >= 1024)
{
KSycoca::flagError();
return;
}
- for(Q_UINT32 i = 0; i < count; i++)
+ for(TQ_UINT32 i = 0; i < count; i++)
{
TQString str;
read(s, str);
diff --git a/kdecore/ksycoca.h b/kdecore/ksycoca.h
index 8cbe6eb67..6b8fcd0f3 100644
--- a/kdecore/ksycoca.h
+++ b/kdecore/ksycoca.h
@@ -93,7 +93,7 @@ public:
* The database contains all changes made _before_ this time and
* _might_ contain changes made after that.
*/
- Q_UINT32 timeStamp();
+ TQ_UINT32 timeStamp();
/**
* @internal - returns update signature of database
@@ -104,7 +104,7 @@ public:
* Touching this file causes the database to be recreated
* from scratch.
*/
- Q_UINT32 updateSignature();
+ TQ_UINT32 updateSignature();
/**
* @internal - returns all directories with information
@@ -172,7 +172,7 @@ protected:
bool bNoDatabase;
size_t m_sycoca_size;
const char *m_sycoca_mmap;
- Q_UINT32 m_timeStamp;
+ TQ_UINT32 m_timeStamp;
public:
static KSycoca *_self; // Internal use only.
diff --git a/kdecore/ksycocadict.cpp b/kdecore/ksycocadict.cpp
index ce7529682..76124e76a 100644
--- a/kdecore/ksycocadict.cpp
+++ b/kdecore/ksycocadict.cpp
@@ -29,7 +29,7 @@ namespace
{
struct string_entry {
string_entry(TQString _key, KSycocaEntry *_payload)
- { keyStr = _key; key = keyStr.unicode(); length = keyStr.length(); payload = _payload; hash = 0; }
+ { keyStr = _key; key = keyStr.tqunicode(); length = keyStr.length(); payload = _payload; hash = 0; }
uint hash;
int length;
const TQChar *key;
@@ -59,8 +59,8 @@ KSycocaDict::KSycocaDict()
KSycocaDict::KSycocaDict(TQDataStream *str, int offset)
: d(0), mStr(str), mOffset(offset)
{
- Q_UINT32 test1, test2;
- str->device()->at(offset);
+ TQ_UINT32 test1, test2;
+ str->tqdevice()->at(offset);
(*str) >> test1 >> test2;
if ((test1 > 0x000fffff) || (test2 > 1024))
{
@@ -70,10 +70,10 @@ KSycocaDict::KSycocaDict(TQDataStream *str, int offset)
return;
}
- str->device()->at(offset);
+ str->tqdevice()->at(offset);
(*str) >> mHashTableSize;
(*str) >> mHashList;
- mOffset = str->device()->at(); // Start of hashtable
+ mOffset = str->tqdevice()->at(); // Start of hashtable
}
KSycocaDict::~KSycocaDict()
@@ -129,11 +129,11 @@ KSycocaDict::find_string(const TQString &key )
uint hash = hashKey(key) % mHashTableSize;
//kdDebug(7011) << TQString("hash is %1").arg(hash) << endl;
- uint off = mOffset+sizeof(Q_INT32)*hash;
+ uint off = mOffset+sizeof(TQ_INT32)*hash;
//kdDebug(7011) << TQString("off is %1").arg(off,8,16) << endl;
- mStr->device()->at( off );
+ mStr->tqdevice()->at( off );
- Q_INT32 offset;
+ TQ_INT32 offset;
(*mStr) >> offset;
//kdDebug(7011) << TQString("offset is %1").arg(offset,8,16) << endl;
@@ -146,7 +146,7 @@ KSycocaDict::find_string(const TQString &key )
// Lookup duplicate list.
offset = -offset;
- mStr->device()->at(offset);
+ mStr->tqdevice()->at(offset);
//kdDebug(7011) << TQString("Looking up duplicate list at %1").arg(offset,8,16) << endl;
while(true)
@@ -286,7 +286,7 @@ KSycocaDict::save(TQDataStream &str)
return;
}
- mOffset = str.device()->at();
+ mOffset = str.tqdevice()->at();
//kdDebug(7011) << TQString("KSycocaDict: %1 entries.").arg(count()) << endl;
@@ -402,26 +402,26 @@ KSycocaDict::save(TQDataStream &str)
str << mHashTableSize;
str << mHashList;
- mOffset = str.device()->at(); // mOffset points to start of hashTable
+ mOffset = str.tqdevice()->at(); // mOffset points to start of hashTable
//kdDebug(7011) << TQString("Start of Hash Table, offset = %1").arg(mOffset,8,16) << endl;
for(int pass = 1; pass <= 2; pass++)
{
- str.device()->at(mOffset);
+ str.tqdevice()->at(mOffset);
//kdDebug(7011) << TQString("Writing hash table (pass #%1)").arg(pass) << endl;
for(uint i=0; i < mHashTableSize; i++)
{
- Q_INT32 tmpid;
+ TQ_INT32 tmpid;
if (!hashTable[i].entry)
- tmpid = (Q_INT32) 0;
+ tmpid = (TQ_INT32) 0;
else if (!hashTable[i].duplicates)
- tmpid = (Q_INT32) hashTable[i].entry->payload->offset(); // Positive ID
+ tmpid = (TQ_INT32) hashTable[i].entry->payload->offset(); // Positive ID
else
- tmpid = (Q_INT32) -hashTable[i].duplicate_offset; // Negative ID
+ tmpid = (TQ_INT32) -hashTable[i].duplicate_offset; // Negative ID
str << tmpid;
//kdDebug(7011) << TQString("Hash table : %1").arg(tmpid,8,16) << endl;
}
- //kdDebug(7011) << TQString("End of Hash Table, offset = %1").arg(str.device()->at(),8,16) << endl;
+ //kdDebug(7011) << TQString("End of Hash Table, offset = %1").arg(str.tqdevice()->at(),8,16) << endl;
//kdDebug(7011) << TQString("Writing duplicate lists (pass #%1)").arg(pass) << endl;
for(uint i=0; i < mHashTableSize; i++)
@@ -429,19 +429,19 @@ KSycocaDict::save(TQDataStream &str)
if (hashTable[i].duplicates)
{
TQPtrList<string_entry> *dups = hashTable[i].duplicates;
- hashTable[i].duplicate_offset = str.device()->at();
+ hashTable[i].duplicate_offset = str.tqdevice()->at();
/*kdDebug(7011) << TQString("Duplicate lists: Offset = %1 list_size = %2") .arg(hashTable[i].duplicate_offset,8,16).arg(dups->count()) << endl;
*/
for(string_entry *dup = dups->first(); dup; dup=dups->next())
{
- str << (Q_INT32) dup->payload->offset(); // Positive ID
+ str << (TQ_INT32) dup->payload->offset(); // Positive ID
str << dup->keyStr; // Key (TQString)
}
- str << (Q_INT32) 0; // End of list marker (0)
+ str << (TQ_INT32) 0; // End of list marker (0)
}
}
- //kdDebug(7011) << TQString("End of Dict, offset = %1").arg(str.device()->at(),8,16) << endl;
+ //kdDebug(7011) << TQString("End of Dict, offset = %1").arg(str.tqdevice()->at(),8,16) << endl;
}
//kdDebug(7011) << "Cleaning up hash table." << endl;
diff --git a/kdecore/ksycocadict.h b/kdecore/ksycocadict.h
index 94a2bc646..0cf5eb257 100644
--- a/kdecore/ksycocadict.h
+++ b/kdecore/ksycocadict.h
@@ -111,13 +111,13 @@ public:
void save(TQDataStream &str);
protected:
- Q_UINT32 hashKey( const TQString &);
+ TQ_UINT32 hashKey( const TQString &);
private:
KSycocaDictStringList *d;
TQDataStream *mStr;
- Q_INT32 mOffset;
- Q_UINT32 mHashTableSize;
- TQValueList<Q_INT32> mHashList;
+ TQ_INT32 mOffset;
+ TQ_UINT32 mHashTableSize;
+ TQValueList<TQ_INT32> mHashList;
};
#endif
diff --git a/kdecore/ksycocaentry.h b/kdecore/ksycocaentry.h
index 5f6f11bbd..2b4611cc2 100644
--- a/kdecore/ksycocaentry.h
+++ b/kdecore/ksycocaentry.h
@@ -101,8 +101,8 @@ public: // KDoc seems to barf on those typedefs and generates no docs after them
*/
virtual void save(TQDataStream &s)
{
- mOffset = s.device()->at(); // store position in member variable
- s << (Q_INT32) sycocaType() << mPath;
+ mOffset = s.tqdevice()->at(); // store position in member variable
+ s << (TQ_INT32) sycocaType() << mPath;
}
/**
diff --git a/kdecore/ksycocafactory.cpp b/kdecore/ksycocafactory.cpp
index e5816dc23..122dd9405 100644
--- a/kdecore/ksycocafactory.cpp
+++ b/kdecore/ksycocafactory.cpp
@@ -38,7 +38,7 @@ KSycocaFactory::KSycocaFactory(KSycocaFactoryId factory_id)
if (m_str) // Can be 0 in case of errors
{
// Read position of index tables....
- Q_INT32 i;
+ TQ_INT32 i;
(*m_str) >> i;
m_sycocaDictOffset = i;
(*m_str) >> i;
@@ -46,10 +46,10 @@ KSycocaFactory::KSycocaFactory(KSycocaFactoryId factory_id)
(*m_str) >> i;
m_endEntryOffset = i;
- int saveOffset = m_str->device()->at();
+ int saveOffset = m_str->tqdevice()->at();
// Init index tables
m_sycocaDict = new KSycocaDict(m_str, m_sycocaDictOffset);
- saveOffset = m_str->device()->at(saveOffset);
+ saveOffset = m_str->tqdevice()->at(saveOffset);
}
}
else
@@ -78,10 +78,10 @@ void
KSycocaFactory::saveHeader(TQDataStream &str)
{
// Write header
- str.device()->at(mOffset);
- str << (Q_INT32) m_sycocaDictOffset;
- str << (Q_INT32) m_beginEntryOffset;
- str << (Q_INT32) m_endEntryOffset;
+ str.tqdevice()->at(mOffset);
+ str << (TQ_INT32) m_sycocaDictOffset;
+ str << (TQ_INT32) m_beginEntryOffset;
+ str << (TQ_INT32) m_endEntryOffset;
}
void
@@ -91,13 +91,13 @@ KSycocaFactory::save(TQDataStream &str)
// building database
if (!m_sycocaDict) return; // Error!
- mOffset = str.device()->at(); // store position in member variable
+ mOffset = str.tqdevice()->at(); // store position in member variable
m_sycocaDictOffset = 0;
// Write header (pass #1)
saveHeader(str);
- m_beginEntryOffset = str.device()->at();
+ m_beginEntryOffset = str.tqdevice()->at();
// Write all entries.
int entryCount = 0;
@@ -110,30 +110,30 @@ KSycocaFactory::save(TQDataStream &str)
entryCount++;
}
- m_endEntryOffset = str.device()->at();
+ m_endEntryOffset = str.tqdevice()->at();
// Write indices...
// Linear index
- str << (Q_INT32) entryCount;
+ str << (TQ_INT32) entryCount;
for(TQDictIterator<KSycocaEntry::Ptr> it ( *m_entryDict );
it.current();
++it)
{
KSycocaEntry *entry = (*it.current());
- str << (Q_INT32) entry->offset();
+ str << (TQ_INT32) entry->offset();
}
// Dictionary index
- m_sycocaDictOffset = str.device()->at();
+ m_sycocaDictOffset = str.tqdevice()->at();
m_sycocaDict->save(str);
- int endOfFactoryData = str.device()->at();
+ int endOfFactoryData = str.tqdevice()->at();
// Update header (pass #2)
saveHeader(str);
// Seek to end.
- str.device()->at(endOfFactoryData);
+ str.tqdevice()->at(endOfFactoryData);
}
void
@@ -169,8 +169,8 @@ KSycocaEntry::List KSycocaFactory::allEntries()
// Assume we're NOT building a database
- m_str->device()->at(m_endEntryOffset);
- Q_INT32 entryCount;
+ m_str->tqdevice()->at(m_endEntryOffset);
+ TQ_INT32 entryCount;
(*m_str) >> entryCount;
if (entryCount > 8192)
@@ -179,7 +179,7 @@ KSycocaEntry::List KSycocaFactory::allEntries()
return list;
}
- Q_INT32 *offsetList = new Q_INT32[entryCount];
+ TQ_INT32 *offsetList = new TQ_INT32[entryCount];
for(int i = 0; i < entryCount; i++)
{
(*m_str) >> offsetList[i];
diff --git a/kdecore/ktempdir.cpp b/kdecore/ktempdir.cpp
index 70a442730..3a68e304e 100644
--- a/kdecore/ktempdir.cpp
+++ b/kdecore/ktempdir.cpp
@@ -118,7 +118,7 @@ KTempDir::status() const
return mError;
}
-QString
+TQString
KTempDir::name() const
{
return mTmpName;
@@ -177,7 +177,7 @@ rmtree(const TQCString& name)
*
* Potential problems:
* - opendir/readdir/closedir is not re-entrant
- * - unlink and rmdir invalidates a opendir/readdir/closedir
+ * - unlink and rmdir tqinvalidates a opendir/readdir/closedir
* - limited number of file descriptors for opendir/readdir/closedir
*/
if ( ::closedir( dp ) )
diff --git a/kdecore/ktempfile.cpp b/kdecore/ktempfile.cpp
index c04f725fe..f439b55ef 100644
--- a/kdecore/ktempfile.cpp
+++ b/kdecore/ktempfile.cpp
@@ -139,7 +139,7 @@ KTempFile::status() const
return mError;
}
-QString
+TQString
KTempFile::name() const
{
return mTmpName;
diff --git a/kdecore/ktimezones.cpp b/kdecore/ktimezones.cpp
index 5ebf9bd4a..dbd589d85 100644
--- a/kdecore/ktimezones.cpp
+++ b/kdecore/ktimezones.cpp
@@ -285,12 +285,12 @@ int KTimezone::offset(Qt::TimeSpec basisSpec) const
char *originalZone = ::getenv("TZ");
// Get the time in the current timezone.
- TQDateTime basisTime = TQDateTime::currentDateTime(basisSpec);
+ TQDateTime basisTime = TQDateTime::tqcurrentDateTime(basisSpec);
// Set the timezone and find out what time it is there compared to the basis.
::setenv("TZ", m_name.utf8(), 1);
tzset();
- TQDateTime remoteTime = TQDateTime::currentDateTime(Qt::LocalTime);
+ TQDateTime remoteTime = TQDateTime::tqcurrentDateTime(Qt::LocalTime);
int offset = remoteTime.secsTo(basisTime);
// Now restore things
@@ -507,7 +507,7 @@ const KTimezone *KTimezones::local()
// Compute the MD5 sum of /etc/localtime.
KMD5 context("");
context.reset();
- context.update(f);
+ context.update(TQT_TQIODEVICE_OBJECT(f));
TQIODevice::Offset referenceSize = f.size();
TQString referenceMd5Sum = context.hexDigest();
f.close();
@@ -526,7 +526,7 @@ const KTimezone *KTimezones::local()
{
// Only do the heavy lifting for file sizes which match.
context.reset();
- context.update(f);
+ context.update(TQT_TQIODEVICE_OBJECT(f));
candidateMd5Sum = context.hexDigest();
}
f.close();
@@ -695,28 +695,28 @@ bool KTimezoneSource::parse(const TQString &zone, KTimezoneDetails &dataReceiver
}
// Structures that represent the zoneinfo file.
- Q_UINT8 T, z, i_, f_;
+ TQ_UINT8 T, z, i_, f_;
struct
{
- Q_UINT32 ttisgmtcnt;
- Q_UINT32 ttisstdcnt;
- Q_UINT32 leapcnt;
- Q_UINT32 timecnt;
- Q_UINT32 typecnt;
- Q_UINT32 charcnt;
+ TQ_UINT32 ttisgmtcnt;
+ TQ_UINT32 ttisstdcnt;
+ TQ_UINT32 leapcnt;
+ TQ_UINT32 timecnt;
+ TQ_UINT32 typecnt;
+ TQ_UINT32 charcnt;
} tzh;
- Q_UINT32 transitionTime;
- Q_UINT8 localTimeIndex;
+ TQ_UINT32 transitionTime;
+ TQ_UINT8 localTimeIndex;
struct
{
- Q_INT32 gmtoff;
- Q_INT8 isdst;
- Q_UINT8 abbrind;
+ TQ_INT32 gmtoff;
+ TQ_INT8 isdst;
+ TQ_UINT8 abbrind;
} tt;
- Q_UINT32 leapTime;
- Q_UINT32 leapSeconds;
- Q_UINT8 isStandard;
- Q_UINT8 isUTC;
+ TQ_UINT32 leapTime;
+ TQ_UINT32 leapSeconds;
+ TQ_UINT8 isStandard;
+ TQ_UINT8 isUTC;
TQDataStream str(&f);
str >> T >> z >> i_ >> f_;
diff --git a/kdecore/kurl.cpp b/kdecore/kurl.cpp
index cb396c3a5..047f18dee 100644
--- a/kdecore/kurl.cpp
+++ b/kdecore/kurl.cpp
@@ -87,7 +87,7 @@ static TQString encode( const TQString& segment, int encoding_offset, int encodi
return segment.isNull() ? TQString::null : TQString(""); // differentiate null and empty
// a worst case approximation
- TQChar *new_segment = new QChar[ old_length * 3 + 1 ];
+ TQChar *new_segment = new TQChar[ old_length * 3 + 1 ];
int new_length = 0;
for ( int i = 0; i < old_length; i++ )
@@ -167,19 +167,19 @@ static TQString lazy_encode( const TQString& segment, bool encodeAt=true )
return TQString::null;
// a worst case approximation
- TQChar *new_segment = new QChar[ old_length * 3 + 1 ];
+ TQChar *new_segment = new TQChar[ old_length * 3 + 1 ];
int new_length = 0;
for ( int i = 0; i < old_length; i++ )
{
- unsigned int character = segment[i].unicode(); // Don't use latin1()
+ unsigned int character = segment[i].tqunicode(); // Don't use latin1()
// It returns 0 for non-latin1 values
// Small set of really ambiguous chars
if ((character < 32) || // Low ASCII
((character == '%') && // The escape character itself
(i+2 < old_length) && // But only if part of a valid escape sequence!
- (hex2int(segment[i+1].unicode())!= -1) &&
- (hex2int(segment[i+2].unicode())!= -1)) ||
+ (hex2int(segment[i+1].tqunicode())!= -1) &&
+ (hex2int(segment[i+2].tqunicode())!= -1)) ||
(character == '?') || // Start of query delimiter
((character == '@') && encodeAt) || // Username delimiter
(character == '#') || // Start of reference delimiter
@@ -235,7 +235,7 @@ static void decode( const TQString& segment, TQString &decoded, TQString &encode
// make a copy of the old one
char *new_segment = new char[ old_length + 1 ];
- TQChar *new_usegment = new QChar[ old_length * 3 + 1 ];
+ TQChar *new_usegment = new TQChar[ old_length * 3 + 1 ];
int i = 0;
while( i < old_length )
@@ -291,12 +291,12 @@ static void decode( const TQString& segment, TQString &decoded, TQString &encode
{
decoded = textCodec->toUnicode( new_segment );
if ( isRawURI ) {
- int length = qstrlen( new_segment );
+ int length = tqstrlen( new_segment );
while ( length < new_length ) {
decoded += TQChar::null;
length += 1;
decoded += textCodec->toUnicode( new_segment + length );
- length += qstrlen( new_segment + length );
+ length += tqstrlen( new_segment + length );
}
}
@@ -338,7 +338,7 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de
#else
TQString encodedDot("%2e");
#endif
- if (path.find(encodedDot, 0, false) != -1)
+ if (path.tqfind(encodedDot, 0, false) != -1)
{
#ifndef KDE_QT_ONLY
static const TQString &encodedDOT = KGlobal::staticQString("%2E"); // Uppercase!
@@ -365,7 +365,7 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de
cdUp = 0;
pos = orig_pos = len;
- while ( pos && (pos = path.findRev('/',--pos)) != -1 )
+ while ( pos && (pos = path.tqfindRev('/',--pos)) != -1 )
{
len = orig_pos - pos - 1;
if ( len == 2 && path[pos+1] == '.' && path[pos+2] == '.' )
@@ -404,7 +404,7 @@ bool KURL::isRelativeURL(const TQString &_url)
{
int len = _url.length();
if (!len) return true; // Very short relative URL.
- const TQChar *str = _url.unicode();
+ const TQChar *str = _url.tqunicode();
// Absolute URL must start with alpha-character
if (!isalpha(str[0].latin1()))
@@ -471,13 +471,13 @@ KURL::KURL( const TQString &url, int encoding_hint )
KURL::KURL( const char * url, int encoding_hint )
{
reset();
- parse( TQString::fromLatin1(url), encoding_hint );
+ parse( TQString::tqfromLatin1(url), encoding_hint );
}
KURL::KURL( const TQCString& url, int encoding_hint )
{
reset();
- parse( TQString::fromLatin1(url), encoding_hint );
+ parse( TQString::tqfromLatin1(url), encoding_hint );
}
KURL::KURL( const KURL& _u )
@@ -493,13 +493,13 @@ TQDataStream & operator<< (TQDataStream & s, const KURL & a)
s << a.m_strProtocol << a.m_strUser << a.m_strPass << a.m_strHost
<< a.m_strPath << a.m_strPath_encoded << QueryForWire << a.m_strRef_encoded
- << Q_INT8(a.m_bIsMalformed ? 1 : 0) << a.m_iPort;
+ << TQ_INT8(a.m_bIsMalformed ? 1 : 0) << a.m_iPort;
return s;
}
TQDataStream & operator>> (TQDataStream & s, KURL & a)
{
- Q_INT8 malf;
+ TQ_INT8 malf;
TQString QueryFromWire;
s >> a.m_strProtocol >> a.m_strUser >> a.m_strPass >> a.m_strHost
>> a.m_strPath >> a.m_strPath_encoded >> QueryFromWire >> a.m_strRef_encoded
@@ -542,11 +542,11 @@ KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint )
TQString rUrl = _rel_url;
int len = _u.m_strProtocol.length();
if ( !_u.m_strHost.isEmpty() && !rUrl.isEmpty() &&
- rUrl.find( _u.m_strProtocol, 0, false ) == 0 &&
+ rUrl.tqfind( _u.m_strProtocol, 0, false ) == 0 &&
rUrl[len] == ':' && (rUrl[len+1] != '/' ||
(rUrl[len+1] == '/' && rUrl[len+2] != '/')) )
{
- rUrl.remove( 0, rUrl.find( ':' ) + 1 );
+ rUrl.remove( 0, rUrl.tqfind( ':' ) + 1 );
}
if ( rUrl.isEmpty() )
@@ -579,13 +579,13 @@ KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint )
}
else if ( rUrl[0] != '?' )
{
- int pos = m_strPath.findRev( '/' );
+ int pos = m_strPath.tqfindRev( '/' );
if (pos >= 0)
m_strPath.truncate(pos);
m_strPath += '/';
if (!m_strPath_encoded.isEmpty())
{
- pos = m_strPath_encoded.findRev( '/' );
+ pos = m_strPath_encoded.tqfindRev( '/' );
if (pos >= 0)
m_strPath_encoded.truncate(pos);
m_strPath_encoded += '/';
@@ -643,7 +643,7 @@ void KURL::parse( const TQString& _url, int encoding_hint )
return;
}
- const TQChar* buf = _url.unicode();
+ const TQChar* buf = _url.tqunicode();
const TQChar* orig = buf;
uint len = _url.length();
uint pos = 0;
@@ -707,7 +707,7 @@ NodeErr:
void KURL::parseRawURI( const TQString& _url, int encoding_hint )
{
uint len = _url.length();
- const TQChar* buf = _url.unicode();
+ const TQChar* buf = _url.tqunicode();
uint pos = 0;
@@ -748,9 +748,9 @@ void KURL::parseMailto( const TQString& _url, int encoding_hint )
#ifndef KDE_QT_ONLY
TQString host = KIDNA::toUnicode( mailre.cap( 2 ) );
if (host.isEmpty())
- host = mailre.cap( 2 ).lower();
+ host = TQString(mailre.cap( 2 )).lower();
#else
- TQString host = mailre.cap( 2 ).lower();
+ TQString host = TQString(mailre.cap( 2 )).lower();
#endif
m_strPath = mailre.cap( 1 ) + host;
}
@@ -762,7 +762,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint )
bool badHostName = false;
int start = 0;
uint len = _url.length();
- const TQChar* buf = _url.unicode();
+ const TQChar* buf = _url.tqunicode();
TQChar delim;
TQString tmp;
@@ -1040,7 +1040,7 @@ KURL& KURL::operator=( const TQString& _url )
KURL& KURL::operator=( const char * _url )
{
reset();
- parse( TQString::fromLatin1(_url) );
+ parse( TQString::tqfromLatin1(_url) );
return *this;
}
@@ -1231,7 +1231,7 @@ void KURL::setFileName( const TQString& _txt )
path = "/";
else
{
- int lastSlash = path.findRev( '/' );
+ int lastSlash = path.tqfindRev( '/' );
if ( lastSlash == -1)
{
// The first character is not a '/' ???
@@ -1347,7 +1347,7 @@ void KURL::setEncodedPath( const TQString& _txt, int encoding_hint )
void KURL::setEncodedPathAndQuery( const TQString& _txt, int encoding_hint )
{
- int pos = _txt.find( '?' );
+ int pos = _txt.tqfind( '?' );
if ( pos == -1 )
{
setEncodedPath(_txt, encoding_hint);
@@ -1490,7 +1490,7 @@ TQString KURL::url( int _trailing, int encoding_hint ) const
}
if ( m_iUriMode == URL )
{
- bool IPv6 = (m_strHost.find(':') != -1);
+ bool IPv6 = (m_strHost.tqfind(':') != -1);
if (IPv6)
u += '[' + m_strHost + ']';
else
@@ -1546,7 +1546,7 @@ TQString KURL::prettyURL( int _trailing ) const
}
if ( m_iUriMode == URL )
{
- bool IPv6 = (m_strHost.find(':') != -1);
+ bool IPv6 = (m_strHost.tqfind(':') != -1);
if (IPv6)
{
u += '[' + m_strHost + ']';
@@ -1704,13 +1704,13 @@ TQString KURL::fileName( bool _strip_trailing_slash ) const
// This is hairy, we need the last unencoded slash.
// Count in the encoded string how many encoded slashes follow the last
// unencoded one.
- int i = m_strPath_encoded.findRev( (QChar)'/', len - 1 );
+ int i = m_strPath_encoded.tqfindRev( (QChar)'/', len - 1 );
TQString fileName_encoded = m_strPath_encoded.mid(i+1);
- n += fileName_encoded.contains("%2f", false);
+ n += fileName_encoded.tqcontains("%2f", false);
}
int i = len;
do {
- i = path.findRev( (QChar)'/', i - 1 );
+ i = path.tqfindRev( (QChar)'/', i - 1 );
}
while (--n && (i > 0));
@@ -1773,7 +1773,7 @@ TQString KURL::directory( bool _strip_trailing_slash_from_result,
if ( result.isEmpty() || result == "/" )
return result;
- int i = result.findRev( "/" );
+ int i = result.tqfindRev( "/" );
// If ( i == -1 ) => the first character is not a '/'
// So it's some URL like file:blah.tgz, with no path
if ( i == -1 )
@@ -2143,14 +2143,14 @@ TQMap< TQString, TQString > KURL::queryItems( int options, int encoding_hint ) c
TQMap< TQString, TQString > result;
TQStringList items = TQStringList::split( '&', m_strQuery_encoded );
for ( TQStringList::const_iterator it = items.begin() ; it != items.end() ; ++it ) {
- int equal_pos = (*it).find( '=' );
+ int equal_pos = (*it).tqfind( '=' );
if ( equal_pos > 0 ) { // = is not the first char...
TQString name = (*it).left( equal_pos );
if ( options & CaseInsensitiveKeys )
name = name.lower();
TQString value = (*it).mid( equal_pos + 1 );
if ( value.isEmpty() )
- result.insert( name, TQString::fromLatin1("") );
+ result.insert( name, TQString::tqfromLatin1("") );
else {
// ### why is decoding name not necessary?
value.replace( '+', ' ' ); // + in queries means space
@@ -2191,7 +2191,7 @@ TQString KURL::queryItem( const TQString& _item, int encoding_hint ) const
return decode_string( str, encoding_hint );
}
else // empty value
- return TQString::fromLatin1("");
+ return TQString::tqfromLatin1("");
}
}
diff --git a/kdecore/kurl.h b/kdecore/kurl.h
index 86c7aa169..eaa0291b9 100644
--- a/kdecore/kurl.h
+++ b/kdecore/kurl.h
@@ -281,7 +281,7 @@ public:
* See TQTextCodec::mibEnum()
*
* @see fromPathOrURL()
- * @see TQString::fromLatin1()
+ * @see TQString::tqfromLatin1()
*/
KURL( const char * url, int encoding_hint = 0 );
/**
@@ -307,7 +307,7 @@ public:
* See TQTextCodec::mibEnum()
*
* @see fromPathOrURL()
- * @see TQString::fromLatin1()
+ * @see TQString::tqfromLatin1()
*/
KURL( const TQCString& url, int encoding_hint = 0 );
@@ -1586,7 +1586,7 @@ public:
*
* Convenience function.
*
- * Convert unicoded string to local encoding and use %%-style
+ * Convert tqunicoded string to local encoding and use %%-style
* encoding for all common delimiters / non-ascii characters.
*
* @param str the string to encode (can be @c TQString::null)
@@ -1605,7 +1605,7 @@ public:
*
* Convenience function.
*
- * Convert unicoded string to local encoding and use %%-style
+ * Convert tqunicoded string to local encoding and use %%-style
* encoding for all common delimiters and non-ascii characters
* as well as the slash @c '/'.
*
@@ -1623,7 +1623,7 @@ public:
*
* Convenience function.
*
- * Decode %-style encoding and convert from local encoding to unicode.
+ * Decode %-style encoding and convert from local encoding to tqunicode.
*
* Reverse of encode_string()
*
diff --git a/kdecore/kurldrag.cpp b/kdecore/kurldrag.cpp
index 7147f7a74..089d2fadb 100644
--- a/kdecore/kurldrag.cpp
+++ b/kdecore/kurldrag.cpp
@@ -87,7 +87,7 @@ KURLDrag * KURLDrag::newDrag( const KURL::List &urls, const TQMap<TQString, TQSt
bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris )
{
if ( e->provides( "application/x-kde-urilist" ) ) {
- TQByteArray payload = e->encodedData( "application/x-kde-urilist" );
+ TQByteArray payload = e->tqencodedData( "application/x-kde-urilist" );
if ( payload.size() ) {
uint c=0;
const char* d = payload.data();
@@ -128,7 +128,7 @@ bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris, TQMap<TQString,T
{
if ( decode( e, uris ) ) // first decode the URLs (see above)
{
- TQByteArray ba = e->encodedData( "application/x-kio-metadata" );
+ TQByteArray ba = e->tqencodedData( "application/x-kio-metadata" );
if ( ba.size() )
{
TQString s = ba.data();
@@ -140,7 +140,7 @@ bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris, TQMap<TQString,T
if ( readingKey )
key = *it;
else
- metaData.replace( key, *it );
+ metaData.tqreplace( key, *it );
readingKey = !readingKey;
}
Q_ASSERT( readingKey ); // an odd number of items would be, well, odd ;-)
@@ -187,12 +187,12 @@ const char * KURLDrag::format( int i ) const
else return 0;
}
-TQByteArray KURLDrag::encodedData( const char* mime ) const
+TQByteArray KURLDrag::tqencodedData( const char* mime ) const
{
TQByteArray a;
TQCString mimetype( mime );
if ( mimetype == "text/uri-list" )
- return TQUriDrag::encodedData( mime );
+ return TQUriDrag::tqencodedData( mime );
else if ( mimetype == "text/plain" )
{
TQStringList uris;
diff --git a/kdecore/kurldrag.h b/kdecore/kurldrag.h
index eb1f9522a..019119600 100644
--- a/kdecore/kurldrag.h
+++ b/kdecore/kurldrag.h
@@ -30,7 +30,7 @@ class KURLDragPrivate;
/**
* 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
+ * be encoded in UTF-8 (tqunicode), but KURL uses the current locale
* by default.
* The other reasons for using this class are:
* @li it exports text/plain (for dropping/pasting into lineedits, mails etc.)
@@ -145,7 +145,7 @@ public:
/// @reimp
virtual const char * format( int i ) const;
/// @reimp
- virtual TQByteArray encodedData( const char* mime ) const;
+ virtual TQByteArray tqencodedData( const char* mime ) const;
protected:
/**
diff --git a/kdecore/kuser.cpp b/kdecore/kuser.cpp
index 3fffddf4f..ca74700fe 100644
--- a/kdecore/kuser.cpp
+++ b/kdecore/kuser.cpp
@@ -219,7 +219,7 @@ TQValueList<KUserGroup> KUser::groups() const {
TQValueList<KUserGroup>::const_iterator it;
for ( it = allGroups.begin(); it != allGroups.end(); ++it ) {
TQValueList<KUser> users = (*it).users();
- if ( users.find( *this ) != users.end()) {
+ if ( users.tqfind( *this ) != users.end()) {
result.append(*it);
}
}
@@ -232,7 +232,7 @@ TQStringList KUser::groupNames() const {
TQValueList<KUserGroup>::const_iterator it;
for ( it = allGroups.begin(); it != allGroups.end(); ++it ) {
TQValueList<KUser> users = (*it).users();
- if ( users.find( *this ) != users.end()) {
+ if ( users.tqfind( *this ) != users.end()) {
result.append((*it).name());
}
}
diff --git a/kdecore/kvmallocator.cpp b/kdecore/kvmallocator.cpp
index 996d55791..031dd4304 100644
--- a/kdecore/kvmallocator.cpp
+++ b/kdecore/kvmallocator.cpp
@@ -106,7 +106,7 @@ KVMAllocator::allocate(size_t _size)
free_block.start += block.size;
if (!free_block.size)
d->free_blocks.remove(it);
- it = d->used_blocks.replace(block.start, block);
+ it = d->used_blocks.tqreplace(block.start, block);
return &(it.data());
}
++it;
@@ -120,7 +120,7 @@ KVMAllocator::allocate(size_t _size)
block.size = (_size + KVM_ALIGN) & ~KVM_ALIGN;
block.mmap = 0;
kdDebug(180)<<"VM alloc: using new block "<<(long)block.start<<" size ="<<(long)block.size<<" request = "<<_size<< endl;
- it = d->used_blocks.replace(block.start, block);
+ it = d->used_blocks.tqreplace(block.start, block);
d->max_length += block.size;
return &(it.data());
}
@@ -138,14 +138,14 @@ KVMAllocator::free(Block *block_p)
return;
}
TQMap<off_t,KVMAllocator::Block>::iterator it;
- it = d->used_blocks.find(block.start);
+ it = d->used_blocks.tqfind(block.start);
if (it == d->used_blocks.end())
{
kdDebug(180)<<"VM free: Block "<<(long)block.start<<" is not allocated."<<endl;
return;
}
d->used_blocks.remove(it);
- it = d->free_blocks.replace(block.start, block);
+ it = d->free_blocks.tqreplace(block.start, block);
TQMap<off_t,KVMAllocator::Block>::iterator before = it;
--before;
if (before != d->free_blocks.end())
diff --git a/kdecore/kwin.cpp b/kdecore/kwin.cpp
index bc9a9761b..706b985fb 100644
--- a/kdecore/kwin.cpp
+++ b/kdecore/kwin.cpp
@@ -158,7 +158,7 @@ bool KWin::compositingActive()
#ifdef Q_WS_X11
namespace
{
-class ContextWidget : public QWidget
+class ContextWidget : public TQWidget
{
public:
ContextWidget();
@@ -179,7 +179,7 @@ ContextWidget::ContextWidget()
LeaveWindowMask ),
GrabModeAsync, GrabModeAsync,
None, c.handle(), CurrentTime );
- qApp->enter_loop();
+ tqApp->enter_loop();
}
@@ -205,7 +205,7 @@ bool ContextWidget::x11Event( XEvent * ev)
e.xbutton.x = lx;
e.xbutton.y = ly;
XSendEvent( qt_xdisplay(), w, true, ButtonPressMask, &e );
- qApp->exit_loop();
+ tqApp->exit_loop();
return true;
}
return false;
@@ -313,7 +313,7 @@ void KWin::setMainWindow( TQWidget* subwindow, WId mainwindow )
Grmbl. See TQDialog::show(). That should get fixed in Qt somehow.
*/
if( tqqt_cast< TQDialog* >( subwindow ) != NULL
- && subwindow->parentWidget() == NULL
+ && subwindow->tqparentWidget() == NULL
&& kapp->mainWidget() != NULL )
{
kdWarning() << "KWin::setMainWindow(): There either mustn't be kapp->mainWidget(),"
@@ -412,7 +412,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
TQImage img( (uchar*) ni.data, (int) ni.size.width, (int) ni.size.height, 32, 0, 0, TQImage::IgnoreEndian );
img.setAlphaBuffer( true );
if ( scale && width > 0 && height > 0 &&img.size() != TQSize( width, height ) && !img.isNull() )
- img = img.smoothScale( width, height );
+ img = TQImage(img).smoothScale( width, height );
if ( !img.isNull() )
result.convertFromImage( img );
return result;
@@ -457,7 +457,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
}
if ( scale && width > 0 && height > 0 && !pm.isNull() &&
( (int) w != width || (int) h != height) ){
- result.convertFromImage( pm.convertToImage().smoothScale( width, height ) );
+ result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) );
} else {
result = pm;
}
@@ -488,7 +488,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( className.lower(), KIcon::Small, iconWidth,
KIcon::DefaultState, 0, true );
if( scale && !pm.isNull() )
- result.convertFromImage( pm.convertToImage().smoothScale( width, height ) );
+ result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) );
else
result = pm;
@@ -505,7 +505,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( "xapp", KIcon::Small, iconWidth,
KIcon::DefaultState, 0, true );
if( scale && !pm.isNull() )
- result.convertFromImage( pm.convertToImage().smoothScale( width, height ) );
+ result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) );
else
result = pm;
}
@@ -520,7 +520,7 @@ void KWin::setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon )
if ( icon.isNull() )
return;
NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), 0 );
- TQImage img = icon.convertToImage().convertDepth( 32 );
+ TQImage img = TQImage(icon.convertToImage()).convertDepth( 32 );
NETIcon ni;
ni.size.width = img.size().width();
ni.size.height = img.size().height();
@@ -528,7 +528,7 @@ void KWin::setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon )
info.setIcon( ni, true );
if ( miniIcon.isNull() )
return;
- img = miniIcon.convertToImage().convertDepth( 32 );
+ img = TQImage(miniIcon.convertToImage()).convertDepth( 32 );
ni.size.width = img.size().width();
ni.size.height = img.size().height();
ni.data = (unsigned char *) img.bits();
diff --git a/kdecore/kwinmodule.cpp b/kdecore/kwinmodule.cpp
index f113570db..5e7b77333 100644
--- a/kdecore/kwinmodule.cpp
+++ b/kdecore/kwinmodule.cpp
@@ -172,7 +172,7 @@ const TQValueList<WId>& KWinModule::stackingOrder() const
bool KWinModule::hasWId(WId w) const
{
- return d->windows.findIndex( w ) != -1;
+ return d->windows.tqfindIndex( w ) != -1;
}
const TQValueList<WId>& KWinModule::systemTrayWindows() const
@@ -243,7 +243,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev )
for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit )
emit (*mit)->showingDesktopChanged( showingDesktop());
}
- } else if ( windows.findIndex( ev->xany.window ) != -1 ){
+ } else if ( windows.tqfindIndex( ev->xany.window ) != -1 ){
NETWinInfo ni( qt_xdisplay(), ev->xany.window, qt_xrootwin(), 0 );
unsigned long dirty[ 2 ];
ni.event( ev, dirty, 2 );
@@ -257,7 +257,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev )
}
if ( (dirty[ NETWinInfo::PROTOCOLS ] & NET::WMStrut) != 0 ) {
removeStrutWindow( ev->xany.window );
- if ( possibleStrutWindows.findIndex( ev->xany.window ) == -1 )
+ if ( possibleStrutWindows.tqfindIndex( ev->xany.window ) == -1 )
possibleStrutWindows.append( ev->xany.window );
}
if ( dirty[ NETWinInfo::PROTOCOLS ] || dirty[ NETWinInfo::PROTOCOLS2 ] ) {
@@ -318,7 +318,7 @@ void KWinModulePrivate::addClient(Window w)
void KWinModulePrivate::removeClient(Window w)
{
bool emit_strutChanged = removeStrutWindow( w );
- if( strutSignalConnected && possibleStrutWindows.findIndex( w ) != -1 && modules.count() > 0 ) {
+ if( strutSignalConnected && possibleStrutWindows.tqfindIndex( w ) != -1 && modules.count() > 0 ) {
NETWinInfo info( qt_xdisplay(), w, qt_xrootwin(), NET::WMStrut );
NETStrut strut = info.strut();
if ( strut.left || strut.top || strut.right || strut.bottom ) {
@@ -400,7 +400,7 @@ TQRect KWinModule::workArea( const TQValueList<WId>& exclude, int desktop ) cons
TQValueList<WId>::ConstIterator it1;
for( it1 = d->windows.begin(); it1 != d->windows.end(); ++it1 ) {
- if(exclude.findIndex(*it1) != -1) continue;
+ if(exclude.tqfindIndex(*it1) != -1) continue;
// Kicker (very) extensively calls this function, causing hundreds of roundtrips just
// to repeatedly find out struts of all windows. Therefore strut values for strut
@@ -416,7 +416,7 @@ TQRect KWinModule::workArea( const TQValueList<WId>& exclude, int desktop ) cons
if(!((*it2).desktop == desktop || (*it2).desktop == NETWinInfo::OnAllDesktops ))
continue;
strut = (*it2).strut;
- } else if( d->possibleStrutWindows.findIndex( *it1 ) != -1 ) {
+ } else if( d->possibleStrutWindows.tqfindIndex( *it1 ) != -1 ) {
NETWinInfo info( qt_xdisplay(), (*it1), qt_xrootwin(), NET::WMStrut | NET::WMDesktop);
strut = info.strut();
d->possibleStrutWindows.remove( *it1 );
diff --git a/kdecore/kwinmodule.h b/kdecore/kwinmodule.h
index f680d561d..6083d9b85 100644
--- a/kdecore/kwinmodule.h
+++ b/kdecore/kwinmodule.h
@@ -27,6 +27,10 @@
#include <tqvaluelist.h>
#include "kdelibs_export.h"
+#ifdef Q_MOC_RUN
+#define Q_OS_UNIX
+#endif // Q_MOC_RUN
+
#ifdef Q_OS_UNIX
class KWinModulePrivate;
@@ -49,7 +53,7 @@ class KWinModulePrivate;
* @short Base class for KDE Window Manager modules.
* @author Matthias Ettrich (ettrich@kde.org)
*/
-class KDECORE_EXPORT KWinModule : public QObject
+class KDECORE_EXPORT KWinModule : public TQObject
{
Q_OBJECT
diff --git a/kdecore/kxmessages.cpp b/kdecore/kxmessages.cpp
index 6b6f971a2..02af07b0f 100644
--- a/kdecore/kxmessages.cpp
+++ b/kdecore/kxmessages.cpp
@@ -189,7 +189,7 @@ bool KXMessages::x11Event( XEvent* ev_P )
++i )
buf[ i ] = ev_P->xclient.data.b[ i ];
buf[ i ] = '\0';
- if( incoming_messages.contains( ev_P->xclient.window ))
+ if( incoming_messages.tqcontains( ev_P->xclient.window ))
{
if( ev_P->xclient.message_type == accept_atom1 && accept_atom1 != accept_atom2 )
// two different messages on the same window at the same time shouldn't happen anyway
diff --git a/kdecore/kxmessages.h b/kdecore/kxmessages.h
index 256b69f91..a5604c817 100644
--- a/kdecore/kxmessages.h
+++ b/kdecore/kxmessages.h
@@ -29,6 +29,11 @@ DEALINGS IN THE SOFTWARE.
#include <tqcstring.h>
#include <tqmap.h>
#include <kdelibs_export.h>
+
+#ifdef Q_MOC_RUN
+#define Q_WS_X11
+#endif // Q_MOC_RUN
+
#ifdef Q_WS_X11
#include <X11/X.h>
@@ -45,7 +50,7 @@ class KXMessagesPrivate;
*/
// KDE4 - make this internal for KStartupInfo only?
class KDECORE_EXPORT KXMessages
- : public QWidget
+ : public TQWidget
{
Q_OBJECT
public:
diff --git a/kdecore/libintl.cpp b/kdecore/libintl.cpp
index aadfcd821..83e2d3711 100644
--- a/kdecore/libintl.cpp
+++ b/kdecore/libintl.cpp
@@ -77,7 +77,7 @@ Boston, MA 02110-1301, USA. */
# define W(flag, data) ((flag) ? SWAP (data) : (data))
#endif
-typedef Q_UINT32 nls_uint32;
+typedef TQ_UINT32 nls_uint32;
struct loaded_domain
{
diff --git a/kdecore/malloc/malloc.c b/kdecore/malloc/malloc.c
index dba0fdef0..56d0b7324 100644
--- a/kdecore/malloc/malloc.c
+++ b/kdecore/malloc/malloc.c
@@ -85,7 +85,7 @@ int kde_malloc_is_used = 0;
calloc(size_t n_elements, size_t element_size);
free(Void_t* p);
realloc(Void_t* p, size_t n);
- memalign(size_t alignment, size_t n);
+ memalign(size_t tqalignment, size_t n);
valloc(size_t n);
mallinfo()
mallopt(int parameter_number, int parameter_value)
@@ -107,7 +107,7 @@ int kde_malloc_is_used = 0;
You can adjust this by defining INTERNAL_SIZE_T
Alignment: 2 * sizeof(size_t) (default)
- (i.e., 8 byte alignment with 4byte size_t). This suffices for
+ (i.e., 8 byte tqalignment with 4byte size_t). This suffices for
nearly all current machines and C compilers. However, you can
define MALLOC_ALIGNMENT to be wider than this if necessary.
@@ -146,7 +146,7 @@ int kde_malloc_is_used = 0;
default used to obtain memory from system) accepts signed
arguments, and may not be able to handle size_t-wide arguments
with negative sign bit. Generally, values that would
- appear as negative after accounting for overhead and alignment
+ appear as negative after accounting for overhead and tqalignment
are supported only via mmap(), which does not have this
limitation.
@@ -393,8 +393,8 @@ extern "C" {
defining INTERNAL_SIZE_T to be a 32 bit `unsigned int' at the
expense of not being able to handle more than 2^32 of malloced
space. If this limitation is acceptable, you are encouraged to set
- this unless you are on a platform requiring 16byte alignments. In
- this case the alignment requirements turn out to negate any
+ this unless you are on a platform requiring 16byte tqalignments. In
+ this case the tqalignment requirements turn out to negate any
potential advantages of decreasing size_t word size.
Implementors: Beware of the possible combinations of:
@@ -419,11 +419,11 @@ extern "C" {
/*
- MALLOC_ALIGNMENT is the minimum alignment for malloc'ed chunks.
+ MALLOC_ALIGNMENT is the minimum tqalignment for malloc'ed chunks.
It must be a power of two at least 2 * SIZE_SZ, even on machines
- for which smaller alignments would suffice. It may be defined as
+ for which smaller tqalignments would suffice. It may be defined as
larger than this though. Note however that code and data structures
- are optimized for the case of 8-byte alignment.
+ are optimized for the case of 8-byte tqalignment.
*/
@@ -957,13 +957,13 @@ Void_t* public_rEALLOc();
#endif
/*
- memalign(size_t alignment, size_t n);
+ memalign(size_t tqalignment, size_t n);
Returns a pointer to a newly allocated chunk of n bytes, aligned
- in accord with the alignment argument.
+ in accord with the tqalignment argument.
- The alignment argument should be a power of two. If the argument is
+ The tqalignment argument should be a power of two. If the argument is
not a power of two, the nearest greater power is used.
- 8-byte alignment is guaranteed by normal malloc calls, so don't
+ 8-byte tqalignment is guaranteed by normal malloc calls, so don't
bother calling memalign with an argument of 8 or less.
Overreliance on memalign is a sure way to fragment space.
@@ -1228,7 +1228,7 @@ int public_mTRIm();
Returns the number of bytes you can actually use in
an allocated chunk, which may be more than you requested (although
- often not) due to alignment and minimum size constraints.
+ often not) due to tqalignment and minimum size constraints.
You can use this many bytes without worrying about
overwriting other allocated objects. This is not a particularly great
programming practice. malloc_usable_size can be more useful in
@@ -1252,8 +1252,8 @@ size_t public_mUSABLe();
number of bytes allocated via malloc (or realloc, etc) but not yet
freed. Note that this is the number of bytes allocated, not the
number requested. It will be larger than the number requested
- because of alignment and bookkeeping overhead. Because it includes
- alignment wastage as being in use, this figure may be greater than
+ because of tqalignment and bookkeeping overhead. Because it includes
+ tqalignment wastage as being in use, this figure may be greater than
zero even when no user-level chunks are allocated.
The reported current and maximum system memory can be inaccurate if
@@ -1290,7 +1290,7 @@ void public_mSTATs();
fragmentation without improving speed.
M_MXFAST is set in REQUEST size units. It is internally used in
- chunksize units, which adds padding and alignment. You can reduce
+ chunksize units, which adds padding and tqalignment. You can reduce
M_MXFAST to 0 to disable all use of fastbins. This causes the malloc
algorithm to be a closer approximation of fifo-best-fit in all cases,
not just for larger requests, but will generally cause it to be
@@ -1434,7 +1434,7 @@ void public_mSTATs();
1. The space cannot be reclaimed, consolidated, and then
used to service later requests, as happens with normal chunks.
- 2. It can lead to more wastage because of mmap page alignment
+ 2. It can lead to more wastage because of mmap page tqalignment
requirements
3. It causes malloc performance to be more dependent on host
system memory management support routines which may vary in
@@ -1614,12 +1614,12 @@ Void_t* public_rEALLOc(Void_t* m, size_t bytes) {
return m;
}
-Void_t* public_mEMALIGn(size_t alignment, size_t bytes) {
+Void_t* public_mEMALIGn(size_t tqalignment, size_t bytes) {
Void_t* m;
if (MALLOC_PREACTION != 0) {
return 0;
}
- m = mEMALIGn(alignment, bytes);
+ m = mEMALIGn(tqalignment, bytes);
if (MALLOC_POSTACTION != 0) {
}
return m;
@@ -1938,7 +1938,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note that the `foot' of the current chunk is actually represented
as the prev_size of the NEXT chunk. This makes it easier to
- deal with alignments etc but can be very confusing when trying
+ deal with tqalignments etc but can be very confusing when trying
to extend or adapt this code.
The two exceptions to all this are
@@ -1956,7 +1956,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
/*
- ---------- Size and alignment checks and conversions ----------
+ ---------- Size and tqalignment checks and conversions ----------
*/
/* conversion from malloc headers to user pointers, and back */
@@ -1972,7 +1972,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
#define MINSIZE \
(unsigned long)(((MIN_CHUNK_SIZE+MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK))
-/* Check if m has acceptable alignment */
+/* Check if m has acceptable tqalignment */
#define aligned_OK(m) (((unsigned long)((m)) & (MALLOC_ALIGN_MASK)) == 0)
@@ -2641,7 +2641,7 @@ static void do_check_remalloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s;
/* Legal size ... */
assert((sz & MALLOC_ALIGN_MASK) == 0);
assert((unsigned long)(sz) >= MINSIZE);
- /* ... and alignment */
+ /* ... and tqalignment */
assert(aligned_OK(chunk2mem(p)));
/* chunk is less than MINSIZE more than request */
assert((long)(sz) - (long)(s) >= 0);
@@ -2704,7 +2704,7 @@ static void do_check_malloc_state()
/* internal size_t must be no wider than pointer type */
assert(sizeof(INTERNAL_SIZE_T) <= sizeof(char*));
- /* alignment is a power of 2 */
+ /* tqalignment is a power of 2 */
assert((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-1)) == 0);
/* cannot run remaining checks until fully initialized */
@@ -3209,7 +3209,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
/*
The offset to the start of the mmapped region is stored
in the prev_size field of the chunk. This allows us to adjust
- returned start address to meet alignment requirements here
+ returned start address to meet tqalignment requirements here
and in memalign(), and still be able to compute proper
address argument for later munmap in free() and realloc().
*/
@@ -3288,7 +3288,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
Round to a multiple of page size.
If MORECORE is not contiguous, this ensures that we only call it
with whole-page arguments. And if MORECORE is contiguous and
- this is not first time through, this preserves page-alignment of
+ this is not first time through, this preserves page-tqalignment of
previous calls. Otherwise, we correct to page-align below.
*/
@@ -3384,7 +3384,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
/* handle contiguous cases */
if (contiguous(av)) {
- /* Guarantee alignment of first new chunk made from this space */
+ /* Guarantee tqalignment of first new chunk made from this space */
front_misalign = (INTERNAL_SIZE_T)chunk2mem(brk) & MALLOC_ALIGN_MASK;
if (front_misalign > 0) {
@@ -3454,7 +3454,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
double fencepost at old_top to prevent consolidation with space
we don't own. These fenceposts are artificial chunks that are
marked as inuse and are in any case too small to use. We need
- two to make sizes and alignments work out.
+ two to make sizes and tqalignments work out.
*/
if (old_size != 0) {
@@ -3554,7 +3554,7 @@ Void_t* mALLOc(size_t bytes)
/*
Convert request size to internal form by adding SIZE_SZ bytes
- overhead plus possibly more to obtain necessary alignment and/or
+ overhead plus possibly more to obtain necessary tqalignment and/or
to obtain a size of at least MINSIZE, the smallest allocatable
size. Also, checked_request2size traps (returning 0) request sizes
that are so large that they wrap around zero when padded and
@@ -4127,54 +4127,54 @@ Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes;
INLINE
#if __STD_C
-Void_t* mEMALIGn(size_t alignment, size_t bytes)
+Void_t* mEMALIGn(size_t tqalignment, size_t bytes)
#else
-Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes;
+Void_t* mEMALIGn(tqalignment, bytes) size_t tqalignment; size_t bytes;
#endif
{
INTERNAL_SIZE_T nb; /* padded request size */
char* m; /* memory returned by malloc call */
mchunkptr p; /* corresponding chunk */
- char* brk; /* alignment point within p */
+ char* brk; /* tqalignment point within p */
mchunkptr newp; /* chunk to return */
INTERNAL_SIZE_T newsize; /* its size */
- INTERNAL_SIZE_T leadsize; /* leading space before alignment point */
+ INTERNAL_SIZE_T leadsize; /* leading space before tqalignment point */
mchunkptr remainder; /* spare room at end to split off */
unsigned long remainder_size; /* its size */
INTERNAL_SIZE_T size;
- /* If need less alignment than we give anyway, just relay to malloc */
+ /* If need less tqalignment than we give anyway, just relay to malloc */
- if (alignment <= MALLOC_ALIGNMENT) return mALLOc(bytes);
+ if (tqalignment <= MALLOC_ALIGNMENT) return mALLOc(bytes);
/* Otherwise, ensure that it is at least a minimum chunk size */
- if (alignment < MINSIZE) alignment = MINSIZE;
+ if (tqalignment < MINSIZE) tqalignment = MINSIZE;
- /* Make sure alignment is power of 2 (in case MINSIZE is not). */
- if ((alignment & (alignment - 1)) != 0) {
+ /* Make sure tqalignment is power of 2 (in case MINSIZE is not). */
+ if ((tqalignment & (tqalignment - 1)) != 0) {
size_t a = MALLOC_ALIGNMENT * 2;
- while ((unsigned long)a < (unsigned long)alignment) a <<= 1;
- alignment = a;
+ while ((unsigned long)a < (unsigned long)tqalignment) a <<= 1;
+ tqalignment = a;
}
checked_request2size(bytes, nb);
/*
- Strategy: find a spot within that chunk that meets the alignment
+ Strategy: find a spot within that chunk that meets the tqalignment
request, and then possibly free the leading and trailing space.
*/
- /* Call malloc with worst case padding to hit alignment. */
+ /* Call malloc with worst case padding to hit tqalignment. */
- m = (char*)(mALLOc(nb + alignment + MINSIZE));
+ m = (char*)(mALLOc(nb + tqalignment + MINSIZE));
if (m == 0) return 0; /* propagate failure */
p = mem2chunk(m);
- if ((((unsigned long)(m)) % alignment) != 0) { /* misaligned */
+ if ((((unsigned long)(m)) % tqalignment) != 0) { /* misaligned */
/*
Find an aligned spot inside chunk. Since we need to give back
@@ -4184,10 +4184,10 @@ Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes;
total room so that this is always possible.
*/
- brk = (char*)mem2chunk(((unsigned long)(m + alignment - 1)) &
- -((signed long) alignment));
+ brk = (char*)mem2chunk(((unsigned long)(m + tqalignment - 1)) &
+ -((signed long) tqalignment));
if ((unsigned long)(brk - (char*)(p)) < MINSIZE)
- brk += alignment;
+ brk += tqalignment;
newp = (mchunkptr)brk;
leadsize = brk - (char*)(p);
@@ -4208,7 +4208,7 @@ Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes;
p = newp;
assert (newsize >= nb &&
- (((unsigned long)(chunk2mem(p))) % alignment) == 0);
+ (((unsigned long)(chunk2mem(p))) % tqalignment) == 0);
}
/* Also give back spare room at the end */
@@ -4375,7 +4375,7 @@ static Void_t** iALLOc(n_elements, sizes, opts, chunks) size_t n_elements; size_
contents_size += request2size(sizes[i]);
}
- /* subtract out alignment bytes from total to minimize overallocation */
+ /* subtract out tqalignment bytes from total to minimize overallocation */
size = contents_size + array_size - MALLOC_ALIGN_MASK;
/*
@@ -5356,7 +5356,7 @@ History:
and Anonymous.
* Allow override of MALLOC_ALIGNMENT (Thanks to Ruud Waij for
helping test this.)
- * memalign: check alignment arg
+ * memalign: check tqalignment arg
* realloc: don't try to shift chunks backwards, since this
leads to more fragmentation in some programs and doesn't
seem to help in any others.
@@ -5409,7 +5409,7 @@ History:
* Support another case of realloc via move into top
* Fix error occurring when initial sbrk_base not word-aligned.
* Rely on page size for units instead of SBRK_UNIT to
- avoid surprises about sbrk alignment conventions.
+ avoid surprises about sbrk tqalignment conventions.
* Add mallinfo, mallopt. Thanks to Raymond Nijssen
(raymond@es.ele.tue.nl) for the suggestion.
* Add `pad' argument to malloc_trim and top_pad mallopt parameter.
@@ -5569,7 +5569,7 @@ Void_t* public_rEALLOc(Void_t* m, size_t bytes) {
#endif
}
-Void_t* public_mEMALIGn(size_t alignment, size_t bytes) {
+Void_t* public_mEMALIGn(size_t tqalignment, size_t bytes) {
#ifndef KDE_MALLOC_FULL
if( malloc_type == 1 )
{
@@ -5578,16 +5578,16 @@ Void_t* public_mEMALIGn(size_t alignment, size_t bytes) {
if (MALLOC_PREACTION != 0) {
return 0;
}
- m = mEMALIGn(alignment, bytes);
+ m = mEMALIGn(tqalignment, bytes);
if (MALLOC_POSTACTION != 0) {
}
return m;
#ifndef KDE_MALLOC_FULL
}
if( malloc_type == 2 )
- return libc_memalign( alignment, bytes );
+ return libc_memalign( tqalignment, bytes );
init_malloc_type();
- return public_mEMALIGn( alignment, bytes );
+ return public_mEMALIGn( tqalignment, bytes );
#endif
}
@@ -5728,7 +5728,7 @@ int public_mALLOPt(int p, int v) {
#endif
int
-posix_memalign (void **memptr, size_t alignment, size_t size)
+posix_memalign (void **memptr, size_t tqalignment, size_t size)
{
void *mem;
@@ -5737,7 +5737,7 @@ posix_memalign (void **memptr, size_t alignment, size_t size)
if (size % sizeof (void *) != 0 || (size & (size - 1)) != 0)
return EINVAL;
- mem = memalign (alignment, size);
+ mem = memalign (tqalignment, size);
if (mem != NULL) {
*memptr = mem;
diff --git a/kdecore/netsupp.cpp b/kdecore/netsupp.cpp
index 6d56e147d..83aec8bc0 100644
--- a/kdecore/netsupp.cpp
+++ b/kdecore/netsupp.cpp
@@ -715,9 +715,9 @@ static int make_inet(const char *name, int portnum, int protonum, struct addrinf
# endif
sin->sin_port = portnum;
if (hint->ai_flags & AI_PASSIVE)
- *(Q_UINT32*)&sin->sin_addr = INADDR_ANY;
+ *(TQ_UINT32*)&sin->sin_addr = INADDR_ANY;
else
- *(Q_UINT32*)&sin->sin_addr = htonl(INADDR_LOOPBACK);
+ *(TQ_UINT32*)&sin->sin_addr = htonl(INADDR_LOOPBACK);
q->ai_flags = 0;
q->ai_family = AF_INET;
q->ai_socktype = hint->ai_socktype;
@@ -1016,7 +1016,7 @@ int getnameinfo(const struct sockaddr *sa, ksocklen_t salen,
#define KRF_inet_ntop KRF_USING_OWN_INET_NTOP
-static void add_dwords(char *buf, Q_UINT16 *dw, int count)
+static void add_dwords(char *buf, TQ_UINT16 *dw, int count)
{
int i = 1;
sprintf(buf + strlen(buf), "%x", ntohs(dw[0]));
@@ -1027,7 +1027,7 @@ static void add_dwords(char *buf, Q_UINT16 *dw, int count)
const char* inet_ntop(int af, const void *cp, char *buf, size_t len)
{
char buf2[sizeof "1234:5678:9abc:def0:1234:5678:255.255.255.255" + 1];
- Q_UINT8 *data = (Q_UINT8*)cp;
+ TQ_UINT8 *data = (TQ_UINT8*)cp;
if (af == AF_INET)
{
@@ -1046,8 +1046,8 @@ const char* inet_ntop(int af, const void *cp, char *buf, size_t len)
# ifdef AF_INET6
if (af == AF_INET6)
{
- Q_UINT16 *p = (Q_UINT16*)data;
- Q_UINT16 *longest = NULL, *cur = NULL;
+ TQ_UINT16 *p = (TQ_UINT16*)data;
+ TQ_UINT16 *longest = NULL, *cur = NULL;
int longest_length = 0, cur_length;
int i;
@@ -1150,7 +1150,7 @@ int inet_pton(int af, const char *cp, void *buf)
# ifdef AF_INET6
else if (af == AF_INET6)
{
- Q_UINT16 addr[8];
+ TQ_UINT16 addr[8];
const char *p = cp;
int n = 0, start = 8;
bool has_v4 = strchr(p, '.') != NULL;
@@ -1200,8 +1200,8 @@ int inet_pton(int af, const char *cp, void *buf)
// n < 8 means that we have to move n - start words 8 - n words to the right
if (start == 8 && n != 8)
return 0; // bad conversion
- memmove(addr + start + (8 - n), addr + start, (n - start) * sizeof(Q_UINT16));
- memset(addr + start, 0, (8 - n) * sizeof(Q_UINT16));
+ memmove(addr + start + (8 - n), addr + start, (n - start) * sizeof(TQ_UINT16));
+ memset(addr + start, 0, (8 - n) * sizeof(TQ_UINT16));
// check the byte order
// The compiler should optimise this out in big endian machines
diff --git a/kdecore/netsupp.h b/kdecore/netsupp.h
index 4dba3f6cc..a94040d44 100644
--- a/kdecore/netsupp.h
+++ b/kdecore/netsupp.h
@@ -66,63 +66,63 @@ struct kde_in6_addr
struct kde_sockaddr_in6
{
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
- Q_UINT8 sin6_len;
- Q_UINT8 sin6_family;
+ TQ_UINT8 sin6_len;
+ TQ_UINT8 sin6_family;
#else //HAVE_STRUCT_SOCKADDR_SA_LEN
- Q_UINT16 sin6_family;
+ TQ_UINT16 sin6_family;
#endif
unsigned short sin6_port; /* RFC says in_port_t */
- Q_UINT32 sin6_flowinfo;
+ TQ_UINT32 sin6_flowinfo;
struct kde_in6_addr sin6_addr;
- Q_UINT32 sin6_scope_id;
+ TQ_UINT32 sin6_scope_id;
};
/* IPv6 test macros that could be missing from some implementations */
#define KDE_IN6_IS_ADDR_UNSPECIFIED(a) \
- (((Q_UINT32 *) (a))[0] == 0 && ((Q_UINT32 *) (a))[1] == 0 && \
- ((Q_UINT32 *) (a))[2] == 0 && ((Q_UINT32 *) (a))[3] == 0)
+ (((TQ_UINT32 *) (a))[0] == 0 && ((TQ_UINT32 *) (a))[1] == 0 && \
+ ((TQ_UINT32 *) (a))[2] == 0 && ((TQ_UINT32 *) (a))[3] == 0)
#define KDE_IN6_IS_ADDR_LOOPBACK(a) \
- (((Q_UINT32 *) (a))[0] == 0 && ((Q_UINT32 *) (a))[1] == 0 && \
- ((Q_UINT32 *) (a))[2] == 0 && ((Q_UINT32 *) (a))[3] == htonl (1))
+ (((TQ_UINT32 *) (a))[0] == 0 && ((TQ_UINT32 *) (a))[1] == 0 && \
+ ((TQ_UINT32 *) (a))[2] == 0 && ((TQ_UINT32 *) (a))[3] == htonl (1))
#define KDE_IN6_IS_ADDR_MULTICAST(a) (((u_int8_t *) (a))[0] == 0xff)
#define KDE_IN6_IS_ADDR_LINKLOCAL(a) \
- ((((Q_UINT32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000))
+ ((((TQ_UINT32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000))
#define KDE_IN6_IS_ADDR_SITELOCAL(a) \
- ((((Q_UINT32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfec00000))
+ ((((TQ_UINT32 *) (a))[0] & htonl (0xffc00000)) == htonl (0xfec00000))
#define KDE_IN6_IS_ADDR_V4MAPPED(a) \
- ((((Q_UINT32 *) (a))[0] == 0) && (((Q_UINT32 *) (a))[1] == 0) && \
- (((Q_UINT32 *) (a))[2] == htonl (0xffff)))
+ ((((TQ_UINT32 *) (a))[0] == 0) && (((TQ_UINT32 *) (a))[1] == 0) && \
+ (((TQ_UINT32 *) (a))[2] == htonl (0xffff)))
#define KDE_IN6_IS_ADDR_V4COMPAT(a) \
- ((((Q_UINT32 *) (a))[0] == 0) && (((Q_UINT32 *) (a))[1] == 0) && \
- (((Q_UINT32 *) (a))[2] == 0) && (ntohl (((Q_UINT32 *) (a))[3]) > 1))
+ ((((TQ_UINT32 *) (a))[0] == 0) && (((TQ_UINT32 *) (a))[1] == 0) && \
+ (((TQ_UINT32 *) (a))[2] == 0) && (ntohl (((TQ_UINT32 *) (a))[3]) > 1))
#define KDE_IN6_ARE_ADDR_EQUAL(a,b) \
- ((((Q_UINT32 *) (a))[0] == ((Q_UINT32 *) (b))[0]) && \
- (((Q_UINT32 *) (a))[1] == ((Q_UINT32 *) (b))[1]) && \
- (((Q_UINT32 *) (a))[2] == ((Q_UINT32 *) (b))[2]) && \
- (((Q_UINT32 *) (a))[3] == ((Q_UINT32 *) (b))[3]))
+ ((((TQ_UINT32 *) (a))[0] == ((TQ_UINT32 *) (b))[0]) && \
+ (((TQ_UINT32 *) (a))[1] == ((TQ_UINT32 *) (b))[1]) && \
+ (((TQ_UINT32 *) (a))[2] == ((TQ_UINT32 *) (b))[2]) && \
+ (((TQ_UINT32 *) (a))[3] == ((TQ_UINT32 *) (b))[3]))
#define KDE_IN6_IS_ADDR_MC_NODELOCAL(a) \
- (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((Q_UINT8 *) (a))[1] & 0xf) == 0x1))
+ (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((TQ_UINT8 *) (a))[1] & 0xf) == 0x1))
#define KDE_IN6_IS_ADDR_MC_LINKLOCAL(a) \
- (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((Q_UINT8 *) (a))[1] & 0xf) == 0x2))
+ (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((TQ_UINT8 *) (a))[1] & 0xf) == 0x2))
#define KDE_IN6_IS_ADDR_MC_SITELOCAL(a) \
- (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((Q_UINT8 *) (a))[1] & 0xf) == 0x5))
+ (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((TQ_UINT8 *) (a))[1] & 0xf) == 0x5))
#define KDE_IN6_IS_ADDR_MC_ORGLOCAL(a) \
- (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((Q_UINT8 *) (a))[1] & 0xf) == 0x8))
+ (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((TQ_UINT8 *) (a))[1] & 0xf) == 0x8))
#define KDE_IN6_IS_ADDR_MC_GLOBAL(a) \
- (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((Q_UINT8 *) (a))[1] & 0xf) == 0xe))
+ (KDE_IN6_IS_ADDR_MULTICAST(a) && ((((TQ_UINT8 *) (a))[1] & 0xf) == 0xe))
#ifdef NEED_IN6_TESTS
# define IN6_IS_ADDR_UNSPECIFIED KDE_IN6_IS_ADDR_UNSPECIFIED
diff --git a/kdecore/netwm.cpp b/kdecore/netwm.cpp
index 9c8bd1283..64c6aab2b 100644
--- a/kdecore/netwm.cpp
+++ b/kdecore/netwm.cpp
@@ -4626,18 +4626,18 @@ Time NET::timestampDiff( Time time1, Time time2 ) // returns time2 - time1
#else
int NET::timestampCompare( unsigned long time1_, unsigned long time2_ ) // like strcmp()
{
- Q_UINT32 time1 = time1_;
- Q_UINT32 time2 = time2_;
+ TQ_UINT32 time1 = time1_;
+ TQ_UINT32 time2 = time2_;
if( time1 == time2 )
return 0;
- return Q_UINT32( time1 - time2 ) < 0x7fffffffU ? 1 : -1; // time1 > time2 -> 1, handle wrapping
+ return TQ_UINT32( time1 - time2 ) < 0x7fffffffU ? 1 : -1; // time1 > time2 -> 1, handle wrapping
}
int NET::timestampDiff( unsigned long time1_, unsigned long time2_ ) // returns time2 - time1
{ // no need to handle wrapping?
- Q_UINT32 time1 = time1_;
- Q_UINT32 time2 = time2_;
- return Q_UINT32( time2 - time1 );
+ TQ_UINT32 time1 = time1_;
+ TQ_UINT32 time2 = time2_;
+ return TQ_UINT32( time2 - time1 );
}
#endif
diff --git a/kdecore/network/kbufferedsocket.cpp b/kdecore/network/kbufferedsocket.cpp
index 04115c051..85b433193 100644
--- a/kdecore/network/kbufferedsocket.cpp
+++ b/kdecore/network/kbufferedsocket.cpp
@@ -94,7 +94,7 @@ void KBufferedSocket::close()
}
#ifdef USE_QT3
-Q_LONG KBufferedSocket::bytesAvailable() const
+TQ_LONG KBufferedSocket::bytesAvailable() const
#endif
#ifdef USE_QT4
qint64 KBufferedSocket::bytesAvailable() const
@@ -106,9 +106,9 @@ qint64 KBufferedSocket::bytesAvailable() const
return d->input->length();
}
-Q_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout)
+TQ_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout)
{
- Q_LONG retval = KStreamSocket::waitForMore(msecs, timeout);
+ TQ_LONG retval = KStreamSocket::waitForMore(msecs, timeout);
if (d->input)
{
resetError();
@@ -118,7 +118,7 @@ Q_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout)
return retval;
}
-Q_LONG KBufferedSocket::readBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KBufferedSocket::readBlock(char *data, TQ_ULONG maxlen)
{
if (d->input)
{
@@ -134,13 +134,13 @@ Q_LONG KBufferedSocket::readBlock(char *data, Q_ULONG maxlen)
return KStreamSocket::readBlock(data, maxlen);
}
-Q_LONG KBufferedSocket::readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KBufferedSocket::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
from = peerAddress();
return readBlock(data, maxlen);
}
-Q_LONG KBufferedSocket::peekBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen)
{
if (d->input)
{
@@ -156,13 +156,13 @@ Q_LONG KBufferedSocket::peekBlock(char *data, Q_ULONG maxlen)
return KStreamSocket::peekBlock(data, maxlen);
}
-Q_LONG KBufferedSocket::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
from = peerAddress();
return peekBlock(data, maxlen);
}
-Q_LONG KBufferedSocket::writeBlock(const char *data, Q_ULONG len)
+TQ_LONG KBufferedSocket::writeBlock(const char *data, TQ_ULONG len)
{
if (state() != Connected)
{
@@ -192,7 +192,7 @@ Q_LONG KBufferedSocket::writeBlock(const char *data, Q_ULONG len)
return KStreamSocket::writeBlock(data, len);
}
-Q_LONG KBufferedSocket::writeBlock(const char *data, Q_ULONG maxlen,
+TQ_LONG KBufferedSocket::writeBlock(const char *data, TQ_ULONG maxlen,
const KSocketAddress&)
{
// ignore the third parameter
@@ -285,7 +285,7 @@ KIOBufferBase* KBufferedSocket::outputBuffer()
}
#ifdef USE_QT3
-Q_ULONG KBufferedSocket::bytesToWrite() const
+TQ_ULONG KBufferedSocket::bytesToWrite() const
#endif
#ifdef USE_QT4
qint64 KBufferedSocket::bytesToWrite() const
@@ -332,7 +332,7 @@ void KBufferedSocket::slotReadActivity()
if (d->input && state() == Connected)
{
mutex()->lock();
- Q_LONG len = d->input->receiveFrom(socketDevice());
+ TQ_LONG len = d->input->receiveFrom(socketDevice());
if (len == -1)
{
@@ -380,7 +380,7 @@ void KBufferedSocket::slotWriteActivity()
(state() == Connected || state() == Closing))
{
mutex()->lock();
- Q_LONG len = d->output->sendTo(socketDevice());
+ TQ_LONG len = d->output->sendTo(socketDevice());
if (len == -1)
{
diff --git a/kdecore/network/kbufferedsocket.h b/kdecore/network/kbufferedsocket.h
index bca034002..0982a88d3 100644
--- a/kdecore/network/kbufferedsocket.h
+++ b/kdecore/network/kbufferedsocket.h
@@ -58,6 +58,7 @@ class KBufferedSocketPrivate;
class KDECORE_EXPORT KBufferedSocket: public KStreamSocket
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
@@ -99,7 +100,7 @@ public:
* Make use of the buffers.
*/
#ifdef USE_QT3
- virtual Q_LONG bytesAvailable() const;
+ virtual TQ_LONG bytesAvailable() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const;
@@ -108,12 +109,12 @@ public:
/**
* Make use of buffers.
*/
- virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L);
+ virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L);
/**
* Reads data from the socket. Make use of buffers.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen);
/**
* @overload
@@ -121,12 +122,12 @@ public:
*
* The @p from parameter is always set to @ref peerAddress()
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Peeks data from the socket.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
/**
* @overload
@@ -134,12 +135,12 @@ public:
*
* The @p from parameter is always set to @ref peerAddress()
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress &from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from);
/**
* Writes data to the socket.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len);
/**
* @overload
@@ -147,7 +148,7 @@ public:
*
* The @p to parameter is discarded.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
/**
* Catch changes.
@@ -183,7 +184,7 @@ public:
* Returns the length of the output buffer.
*/
#ifdef USE_QT3
- virtual Q_ULONG bytesToWrite() const;
+ virtual TQ_ULONG bytesToWrite() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesToWrite() const;
diff --git a/kdecore/network/kclientsocketbase.cpp b/kdecore/network/kclientsocketbase.cpp
index 7ac3ca3b1..46f7a1942 100644
--- a/kdecore/network/kclientsocketbase.cpp
+++ b/kdecore/network/kclientsocketbase.cpp
@@ -47,9 +47,17 @@ public:
bool enableRead : 1, enableWrite : 1;
};
-KClientSocketBase::KClientSocketBase(TQObject *parent, const char *name)
- : TQObject(parent, name), d(new KClientSocketBasePrivate)
+KClientSocketBase::KClientSocketBase(TQObject *parent, const char *name) :
+#ifdef USE_QT4
+#else // USE_QT4
+ TQObject(parent, name),
+#endif // USE_QT4
+ d(new KClientSocketBasePrivate)
{
+#ifdef USE_QT4
+ setParent(parent);
+ setObjectName(name);
+#endif // USE_QT4
d->state = Idle;
d->enableRead = true;
d->enableWrite = false;
@@ -140,7 +148,7 @@ bool KClientSocketBase::lookup()
{
if (d->localResolver.serviceName().isNull() &&
!d->localResolver.nodeName().isNull())
- d->localResolver.setServiceName(TQString::fromLatin1(""));
+ d->localResolver.setServiceName(TQString::tqfromLatin1(""));
// don't restart the lookups if they had succeeded and
// the input values weren't changed
@@ -279,7 +287,7 @@ void KClientSocketBase::close()
// This function is unlike all the others because it is const
#ifdef USE_QT3
-Q_LONG KClientSocketBase::bytesAvailable() const
+TQ_LONG KClientSocketBase::bytesAvailable() const
#endif
#ifdef USE_QT4
qint64 KClientSocketBase::bytesAvailable() const
@@ -291,10 +299,10 @@ qint64 KClientSocketBase::bytesAvailable() const
// All the functions below look really alike
// Should I use a macro to define them?
-Q_LONG KClientSocketBase::waitForMore(int msecs, bool *timeout)
+TQ_LONG KClientSocketBase::waitForMore(int msecs, bool *timeout)
{
resetError();
- Q_LONG retval = socketDevice()->waitForMore(msecs, timeout);
+ TQ_LONG retval = socketDevice()->waitForMore(msecs, timeout);
if (retval == -1)
{
copyError();
@@ -303,10 +311,10 @@ Q_LONG KClientSocketBase::waitForMore(int msecs, bool *timeout)
return retval;
}
-Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KClientSocketBase::readBlock(char *data, TQ_ULONG maxlen)
{
resetError();
- Q_LONG retval = socketDevice()->readBlock(data, maxlen);
+ TQ_LONG retval = socketDevice()->readBlock(data, maxlen);
if (retval == -1)
{
copyError();
@@ -315,10 +323,10 @@ Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KClientSocketBase::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
resetError();
- Q_LONG retval = socketDevice()->readBlock(data, maxlen, from);
+ TQ_LONG retval = socketDevice()->readBlock(data, maxlen, from);
if (retval == -1)
{
copyError();
@@ -327,10 +335,10 @@ Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen, KSocketAddress&
return retval;
}
-Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen)
{
resetError();
- Q_LONG retval = socketDevice()->peekBlock(data, maxlen);
+ TQ_LONG retval = socketDevice()->peekBlock(data, maxlen);
if (retval == -1)
{
copyError();
@@ -339,10 +347,10 @@ Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
resetError();
- Q_LONG retval = socketDevice()->peekBlock(data, maxlen, from);
+ TQ_LONG retval = socketDevice()->peekBlock(data, maxlen, from);
if (retval == -1)
{
copyError();
@@ -351,10 +359,10 @@ Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress&
return retval;
}
-Q_LONG KClientSocketBase::writeBlock(const char *data, Q_ULONG len)
+TQ_LONG KClientSocketBase::writeBlock(const char *data, TQ_ULONG len)
{
resetError();
- Q_LONG retval = socketDevice()->writeBlock(data, len);
+ TQ_LONG retval = socketDevice()->writeBlock(data, len);
if (retval == -1)
{
copyError();
@@ -363,10 +371,10 @@ Q_LONG KClientSocketBase::writeBlock(const char *data, Q_ULONG len)
return retval;
}
-Q_LONG KClientSocketBase::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to)
+TQ_LONG KClientSocketBase::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to)
{
resetError();
- Q_LONG retval = socketDevice()->writeBlock(data, len, to);
+ TQ_LONG retval = socketDevice()->writeBlock(data, len, to);
if (retval == -1)
{
copyError();
diff --git a/kdecore/network/kclientsocketbase.h b/kdecore/network/kclientsocketbase.h
index d4e31b6b3..63ddc3aa3 100644
--- a/kdecore/network/kclientsocketbase.h
+++ b/kdecore/network/kclientsocketbase.h
@@ -32,6 +32,10 @@
#include "kresolver.h"
#include <kdelibs_export.h>
+#ifdef Q_MOC_RUN
+#define USE_QT4
+#endif // Q_MOC_RUN
+
namespace KNetwork {
class KClientSocketBasePrivate;
@@ -46,9 +50,15 @@ class KClientSocketBasePrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KDECORE_EXPORT KClientSocketBase : public TQObject, public KActiveSocketBase
+class KDECORE_EXPORT KClientSocketBase :
+#ifdef USE_QT4
+#else // USE_QT4
+public TQObject,
+#endif // USE_QT4
+public KActiveSocketBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -257,7 +267,7 @@ public:
* This is a convenience function provided to ease migrating from
* Qt 3.x's TQSocket class.
*/
- inline void connectToHost(const TQString& host, Q_UINT16 port)
+ inline void connectToHost(const TQString& host, TQ_UINT16 port)
{ connect(host, TQString::number(port)); }
/**
@@ -293,7 +303,7 @@ public:
* Reimplemented from KSocketBase.
*/
#ifdef USE_QT3
- virtual Q_LONG bytesAvailable() const;
+ virtual TQ_LONG bytesAvailable() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const;
@@ -302,40 +312,40 @@ public:
/**
* Waits for more data. Reimplemented from KSocketBase.
*/
- virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L);
+ virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L);
/**
* Reads data from a socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen);
/**
* @overload
* Reads data from a socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Peeks data from the socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
/**
* @overload
* Peeks data from the socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress &from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from);
/**
* Writes data to the socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len);
/**
* @overload
* Writes data to the socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
/**
* Returns the local socket address. Reimplemented from KSocketBase.
diff --git a/kdecore/network/kdatagramsocket.cpp b/kdecore/network/kdatagramsocket.cpp
index d598d2d14..ff6ea04b3 100644
--- a/kdecore/network/kdatagramsocket.cpp
+++ b/kdecore/network/kdatagramsocket.cpp
@@ -133,7 +133,7 @@ bool KDatagramSocket::connect(const TQString& node, const TQString& service)
KDatagramPacket KDatagramSocket::receive()
{
- Q_LONG size = bytesAvailable();
+ TQ_LONG size = bytesAvailable();
if (size == 0)
{
// nothing available yet to read
@@ -165,12 +165,12 @@ KDatagramPacket KDatagramSocket::receive()
return KDatagramPacket(data, address);
}
-Q_LONG KDatagramSocket::send(const KDatagramPacket& packet)
+TQ_LONG KDatagramSocket::send(const KDatagramPacket& packet)
{
return writeBlock(packet.data(), packet.size(), packet.address());
}
-Q_LONG KDatagramSocket::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to)
+TQ_LONG KDatagramSocket::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to)
{
if (to.family() != AF_UNSPEC)
{
diff --git a/kdecore/network/kdatagramsocket.h b/kdecore/network/kdatagramsocket.h
index 6b94c1d42..7ecbada09 100644
--- a/kdecore/network/kdatagramsocket.h
+++ b/kdecore/network/kdatagramsocket.h
@@ -180,6 +180,7 @@ class KDatagramSocketPrivate;
class KDECORE_EXPORT KDatagramSocket: public KClientSocketBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -222,7 +223,7 @@ public:
*
* Connecting means only to designate the given address as the default
* destination address for datagrams sent without destination addresses
- * ( writeBlock(const char *, Q_ULONG) ).
+ * ( writeBlock(const char *, TQ_ULONG) ).
*
* @note Calling connect will not cause the socket to be bound. You have
* to call @ref bind explicitly.
@@ -240,7 +241,7 @@ public:
/**
* Writes data to the socket. Reimplemented from KClientSocketBase.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
/**
* Receives one datagram from the stream. The reading process is guaranteed
@@ -260,7 +261,7 @@ public:
*
* @returns the number of bytes written or -1 in case of error.
*/
- virtual Q_LONG send(const KDatagramPacket& packet);
+ virtual TQ_LONG send(const KDatagramPacket& packet);
private slots:
void lookupFinishedLocal();
diff --git a/kdecore/network/khttpproxysocketdevice.cpp b/kdecore/network/khttpproxysocketdevice.cpp
index 09d8dd7a5..f4ef01564 100644
--- a/kdecore/network/khttpproxysocketdevice.cpp
+++ b/kdecore/network/khttpproxysocketdevice.cpp
@@ -153,7 +153,7 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi
setState(0); // unset open flag
// prepare the request
- TQString request = TQString::fromLatin1("CONNECT %1:%2 HTTP/1.1\r\n"
+ TQString request = TQString::tqfromLatin1("CONNECT %1:%2 HTTP/1.1\r\n"
"Cache-Control: no-cache\r\n"
"Host: \r\n"
"\r\n");
@@ -161,7 +161,7 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi
if (node.contains(':'))
node2 = '[' + node + ']';
- d->request = request.arg(node2).arg(service).latin1();
+ d->request = TQString(request.arg(node2).arg(service)).latin1();
}
return parseServerReply();
@@ -179,7 +179,7 @@ bool KHttpProxySocketDevice::parseServerReply()
if (!d->request.isEmpty())
{
// send request
- Q_LONG written = writeBlock(d->request, d->request.length());
+ TQ_LONG written = writeBlock(d->request, d->request.length());
if (written < 0)
{
qDebug("KHttpProxySocketDevice: would block writing request!");
@@ -205,7 +205,7 @@ bool KHttpProxySocketDevice::parseServerReply()
int index;
if (!blocking())
{
- Q_LONG avail = bytesAvailable();
+ TQ_LONG avail = bytesAvailable();
qDebug("KHttpProxySocketDevice: %ld bytes available", avail);
setState(0);
if (avail == 0)
@@ -222,7 +222,7 @@ bool KHttpProxySocketDevice::parseServerReply()
TQCString fullHeaders = d->reply + buf.data();
// search for the end of the headers
- index = fullHeaders.find("\r\n\r\n");
+ index = fullHeaders.tqfind("\r\n\r\n");
if (index == -1)
{
// no, headers not yet finished...
@@ -265,9 +265,9 @@ bool KHttpProxySocketDevice::parseServerReply()
// now really parse the reply
qDebug("KHttpProxySocketDevice: get reply: %s\n",
- d->reply.left(d->reply.find('\r')).data());
+ d->reply.left(d->reply.tqfind('\r')).data());
if (d->reply.left(7) != "HTTP/1." ||
- (index = d->reply.find(' ')) == -1 ||
+ (index = d->reply.tqfind(' ')) == -1 ||
d->reply[index + 1] != '2')
{
setError(IO_ConnectError, NetFailure);
diff --git a/kdecore/network/kiobuffer.h b/kdecore/network/kiobuffer.h
index 839899b18..02f75a420 100644
--- a/kdecore/network/kiobuffer.h
+++ b/kdecore/network/kiobuffer.h
@@ -85,7 +85,7 @@ public:
*
* @sa size
*/
- virtual Q_LONG length() const = 0;
+ virtual TQ_LONG length() const = 0;
/**
* Returns true if the buffer is empty of data.
@@ -99,7 +99,7 @@ public:
*
* @sa length for the length of the data stored
*/
- virtual Q_LONG size() const = 0;
+ virtual TQ_LONG size() const = 0;
/**
* Returns true if the buffer is full (i.e., cannot receive more data)
@@ -114,7 +114,7 @@ public:
* @returns true on success, false if an error occurred.
* @note if the new size is less than length(), the buffer will be truncated
*/
- virtual bool setSize(Q_LONG size) = 0;
+ virtual bool setSize(TQ_LONG size) = 0;
/**
* Adds data to the end of the buffer.
@@ -123,7 +123,7 @@ public:
* @param len the data length, in bytes
* @returns the number of bytes added to the end of the buffer.
*/
- virtual Q_LONG feedBuffer(const char *data, Q_LONG len) = 0;
+ virtual TQ_LONG feedBuffer(const char *data, TQ_LONG len) = 0;
/**
* Consumes data from the beginning of the buffer.
@@ -133,7 +133,7 @@ public:
* @param discard if true, the bytes copied will be discarded
* @returns the number of bytes copied from the buffer
*/
- virtual Q_LONG consumeBuffer(char *data, Q_LONG maxlen, bool discard = true) = 0;
+ virtual TQ_LONG consumeBuffer(char *data, TQ_LONG maxlen, bool discard = true) = 0;
/**
* Clears the buffer.
diff --git a/kdecore/network/kresolver.cpp b/kdecore/network/kresolver.cpp
index cfb87e3ef..d58d02cb0 100644
--- a/kdecore/network/kresolver.cpp
+++ b/kdecore/network/kresolver.cpp
@@ -105,7 +105,7 @@ KResolverEntry::KResolverEntry(const KSocketAddress& addr, int socktype, int pro
}
// constructor with even more stuff
-KResolverEntry::KResolverEntry(const struct sockaddr* sa, Q_UINT16 salen, int socktype,
+KResolverEntry::KResolverEntry(const struct sockaddr* sa, TQ_UINT16 salen, int socktype,
int protocol, const TQString& canonName,
const TQCString& encodedName) :
d(new KResolverEntryPrivate)
@@ -141,7 +141,7 @@ KSocketAddress KResolverEntry::address() const
}
// returns the length
-Q_UINT16 KResolverEntry::length() const
+TQ_UINT16 KResolverEntry::length() const
{
return d ? d->addr.length() : 0;
}
@@ -587,7 +587,7 @@ KResolverResults
KResolver::resolve(const TQString& host, const TQString& service, int flags,
int families)
{
- KResolver qres(host, service, qApp, "synchronous KResolver");
+ KResolver qres(host, service, TQT_TQOBJECT(tqApp), "synchronous KResolver");
qres.setFlags(flags);
qres.setFamily(families);
qres.start();
@@ -599,7 +599,7 @@ bool KResolver::resolveAsync(TQObject* userObj, const char *userSlot,
const TQString& host, const TQString& service,
int flags, int families)
{
- KResolver* qres = new KResolver(host, service, qApp, "asynchronous KResolver");
+ KResolver* qres = new KResolver(host, service, TQT_TQOBJECT(tqApp), "asynchronous KResolver");
TQObject::connect(qres, TQT_SIGNAL(finished(KResolverResults)), userObj, userSlot);
qres->setFlags(flags);
qres->setFamily(families);
@@ -915,16 +915,16 @@ TQString KResolver::localHostName()
}
if (name.isEmpty())
- return TQString::fromLatin1("localhost");
+ return TQString::tqfromLatin1("localhost");
- if (name.find('.') == -1)
+ if (name.tqfind('.') == -1)
{
// not fully qualified
// must resolve
KResolverResults results = resolve(name, "0", CanonName);
if (results.isEmpty())
// cannot find a valid hostname!
- return TQString::fromLatin1("localhost");
+ return TQString::tqfromLatin1("localhost");
else
return results.first().canonicalName();
}
@@ -934,7 +934,7 @@ TQString KResolver::localHostName()
// forward declaration
-static TQStringList splitLabels(const TQString& unicodeDomain);
+static TQStringList splitLabels(const TQString& tqunicodeDomain);
static TQCString ToASCII(const TQString& label);
static TQString ToUnicode(const TQString& label);
@@ -943,11 +943,11 @@ static TQStringList *KResolver_initIdnDomains()
const char *kde_use_idn = getenv("KDE_USE_IDN");
if (!kde_use_idn)
kde_use_idn = "ac:at:br:cat:ch:cl:cn:de:dk:fi:gr:hu:info:io:is:jp:kr:li:lt:museum:org:no:se:sh:th:tm:tw:vn";
- return new TQStringList(TQStringList::split(':', TQString::fromLatin1(kde_use_idn).lower()));
+ return new TQStringList(TQStringList::split(':', TQString::tqfromLatin1(kde_use_idn).lower()));
}
// implement the ToAscii function, as described by IDN documents
-TQCString KResolver::domainToAscii(const TQString& unicodeDomain)
+TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain)
{
if (!idnDomains)
idnDomains = KResolver_initIdnDomains();
@@ -958,10 +958,10 @@ TQCString KResolver::domainToAscii(const TQString& unicodeDomain)
// 2) split the domain into individual labels, without
// separators.
- TQStringList input = splitLabels(unicodeDomain);
+ TQStringList input = splitLabels(tqunicodeDomain);
// Do we allow IDN names for this TLD?
- if (input.count() && !idnDomains->contains(input[input.count()-1].lower()))
+ if (input.count() && !idnDomains->tqcontains(input[input.count()-1].lower()))
return input.join(".").lower().latin1(); // No IDN allowed for this TLD
// 3) decide whether to enforce the STD3 rules for chars < 0x7F
@@ -987,7 +987,7 @@ TQCString KResolver::domainToAscii(const TQString& unicodeDomain)
TQString KResolver::domainToUnicode(const TQCString& asciiDomain)
{
- return domainToUnicode(TQString::fromLatin1(asciiDomain));
+ return domainToUnicode(TQString::tqfromLatin1(asciiDomain));
}
// implement the ToUnicode function, as described by IDN documents
@@ -1009,7 +1009,7 @@ TQString KResolver::domainToUnicode(const TQString& asciiDomain)
TQStringList input = splitLabels(asciiDomain);
// Do we allow IDN names for this TLD?
- if (input.count() && !idnDomains->contains(input[input.count()-1].lower()))
+ if (input.count() && !idnDomains->tqcontains(input[input.count()-1].lower()))
return asciiDomain.lower(); // No TLDs allowed
// 3) decide whether to enforce the STD3 rules for chars < 0x7F
@@ -1048,7 +1048,7 @@ void KResolver::virtual_hook( int, void* )
// RFC 3492 - Punycode: A Bootstring encoding of Unicode
// for Internationalized Domain Names in Applications (IDNA)
-static TQStringList splitLabels(const TQString& unicodeDomain)
+static TQStringList splitLabels(const TQString& tqunicodeDomain)
{
// From RFC 3490 section 3.1:
// "Whenever dots are used as label separators, the following characters
@@ -1060,9 +1060,9 @@ static TQStringList splitLabels(const TQString& unicodeDomain)
TQStringList lst;
int start = 0;
uint i;
- for (i = 0; i < unicodeDomain.length(); i++)
+ for (i = 0; i < tqunicodeDomain.length(); i++)
{
- unsigned int c = unicodeDomain[i].unicode();
+ unsigned int c = tqunicodeDomain[i].tqunicode();
if (c == separators[0] ||
c == separators[1] ||
@@ -1070,13 +1070,13 @@ static TQStringList splitLabels(const TQString& unicodeDomain)
c == separators[3])
{
// found a separator!
- lst << unicodeDomain.mid(start, i - start);
+ lst << tqunicodeDomain.mid(start, i - start);
start = i + 1;
}
}
if ((long)i >= start)
// there is still one left
- lst << unicodeDomain.mid(start, i - start);
+ lst << tqunicodeDomain.mid(start, i - start);
return lst;
}
@@ -1097,11 +1097,11 @@ static TQCString ToASCII(const TQString& label)
TQCString retval;
char buf[65];
- Q_UINT32* ucs4 = new Q_UINT32[label.length() + 1];
+ TQ_UINT32* ucs4 = new TQ_UINT32[label.length() + 1];
uint i;
for (i = 0; i < label.length(); i++)
- ucs4[i] = (unsigned long)label[i].unicode();
+ ucs4[i] = (unsigned long)label[i].tqunicode();
ucs4[i] = 0; // terminate with NUL, just to be on the safe side
if (idna_to_ascii_4i(ucs4, label.length(), buf, 0) == IDNA_SUCCESS)
@@ -1118,18 +1118,18 @@ static TQCString ToASCII(const TQString& label)
static TQString ToUnicode(const TQString& label)
{
#ifdef HAVE_IDNA_H
- // We have idna.h, so we can use the idna_to_unicode
+ // We have idna.h, so we can use the idna_to_tqunicode
// function :)
- Q_UINT32 *ucs4_input, *ucs4_output;
+ TQ_UINT32 *ucs4_input, *ucs4_output;
size_t outlen;
- ucs4_input = new Q_UINT32[label.length() + 1];
+ ucs4_input = new TQ_UINT32[label.length() + 1];
for (uint i = 0; i < label.length(); i++)
- ucs4_input[i] = (unsigned long)label[i].unicode();
+ ucs4_input[i] = (unsigned long)label[i].tqunicode();
// try the same length for output
- ucs4_output = new Q_UINT32[outlen = label.length()];
+ ucs4_output = new TQ_UINT32[outlen = label.length()];
idna_to_unicode_44i(ucs4_input, label.length(),
ucs4_output, &outlen,
@@ -1139,7 +1139,7 @@ static TQString ToUnicode(const TQString& label)
{
// it must have failed
delete [] ucs4_output;
- ucs4_output = new Q_UINT32[outlen];
+ ucs4_output = new TQ_UINT32[outlen];
idna_to_unicode_44i(ucs4_input, label.length(),
ucs4_output, &outlen,
diff --git a/kdecore/network/kresolver.h b/kdecore/network/kresolver.h
index 5b66f362c..069428904 100644
--- a/kdecore/network/kresolver.h
+++ b/kdecore/network/kresolver.h
@@ -101,7 +101,7 @@ public:
* @param canonName the canonical name of the resolved hostname
* @param encodedName the ASCII-compatible encoding of the hostname
*/
- KResolverEntry(const struct sockaddr *sa, Q_UINT16 salen, int socktype,
+ KResolverEntry(const struct sockaddr *sa, TQ_UINT16 salen, int socktype,
int protocol, const TQString& canonName = TQString::null,
const TQCString& encodedName = TQCString());
@@ -128,7 +128,7 @@ public:
/**
* Retrieves the length of the socket address structure.
*/
- Q_UINT16 length() const;
+ TQ_UINT16 length() const;
/**
* Retrieves the family associated with this socket address.
@@ -292,9 +292,10 @@ class KResolverPrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KDECORE_EXPORT KResolver: public QObject
+class KDECORE_EXPORT KResolver: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -795,11 +796,11 @@ public:
* Note that the encoding is illegible and, thus, should not be presented
* to the user, except if requested.
*
- * @param unicodeDomain the domain name to be encoded
+ * @param tqunicodeDomain the domain name to be encoded
* @return the ACE-encoded suitable for DNS queries if successful, a null
* TQCString if failure.
*/
- static TQCString domainToAscii(const TQString& unicodeDomain);
+ static TQCString domainToAscii(const TQString& tqunicodeDomain);
/**
* Does the inverse of @ref domainToAscii and return an Unicode domain
diff --git a/kdecore/network/kresolver_p.h b/kdecore/network/kresolver_p.h
index e29304383..7f74c6fe6 100644
--- a/kdecore/network/kresolver_p.h
+++ b/kdecore/network/kresolver_p.h
@@ -326,7 +326,7 @@ namespace KNetwork
* This class is a worker thread in the resolver system.
* This class must be thread-safe.
*/
- class KResolverThread: public QThread
+ class KResolverThread: public TQThread
{
private:
// private constructor. Only the manager can create worker threads
diff --git a/kdecore/network/kresolverstandardworkers.cpp b/kdecore/network/kresolverstandardworkers.cpp
index f64803ced..08bd57121 100644
--- a/kdecore/network/kresolverstandardworkers.cpp
+++ b/kdecore/network/kresolverstandardworkers.cpp
@@ -140,7 +140,7 @@ bool KBlacklistWorker::isBlacklisted(const TQString& host)
return false;
// KDE4: QLatin1String
- TQString ascii = TQString::fromLatin1(KResolver::domainToAscii(host));
+ TQString ascii = TQString::tqfromLatin1(KResolver::domainToAscii(host));
TQMutexLocker locker(&blacklistMutex);
@@ -208,12 +208,12 @@ namespace
{
public:
TQCString m_hostname; // might be different!
- Q_UINT16 m_port;
+ TQ_UINT16 m_port;
int m_scopeid;
int m_af;
KResolverResults& results;
- GetHostByNameThread(const char * hostname, Q_UINT16 port,
+ GetHostByNameThread(const char * hostname, TQ_UINT16 port,
int scopeid, int af, KResolverResults* res) :
m_hostname(hostname), m_port(port), m_scopeid(scopeid), m_af(af),
results(*res)
@@ -251,7 +251,7 @@ namespace
// check blacklist
if (m_af != AF_INET &&
- KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_hostname)))
+ KBlacklistWorker::isBlacklisted(TQString::tqfromLatin1(m_hostname)))
break;
# ifdef USE_GETHOSTBYNAME2_R
@@ -358,7 +358,7 @@ namespace
if (socktype == 0)
socktype = SOCK_STREAM; // default
- TQString canon = KResolver::domainToUnicode(TQString::fromLatin1(he->h_name));
+ TQString canon = KResolver::domainToUnicode(TQString::tqfromLatin1(he->h_name));
KInetSocketAddress sa;
sa.setPort(m_port);
if (he->h_addrtype != AF_INET)
@@ -404,7 +404,7 @@ namespace
{
// check blacklist
if ((m_af != AF_INET && m_af != AF_UNSPEC) &&
- KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_node)))
+ KBlacklistWorker::isBlacklisted(TQString::tqfromLatin1(m_node)))
{
results.setError(KResolver::NoName);
finished();
@@ -547,11 +547,11 @@ bool KStandardWorker::sanityCheck()
if (!nodeName().isEmpty())
{
TQString node = nodeName();
- if (node.find('%') != -1)
- node.truncate(node.find('%'));
+ if (node.tqfind('%') != -1)
+ node.truncate(node.tqfind('%'));
- if (node.isEmpty() || node == TQString::fromLatin1("*") ||
- node == TQString::fromLatin1("localhost"))
+ if (node.isEmpty() || node == TQString::tqfromLatin1("*") ||
+ node == TQString::tqfromLatin1("localhost"))
m_encodedName.truncate(0);
else
{
@@ -584,7 +584,7 @@ bool KStandardWorker::resolveScopeId()
{
// we must test the original name, not the encoded one
scopeid = 0;
- int pos = nodeName().findRev('%');
+ int pos = nodeName().tqfindRev('%');
if (pos == -1)
return true;
@@ -616,7 +616,7 @@ bool KStandardWorker::resolveService()
// service name does not contain a port number
// must be a name
- if (serviceName().isEmpty() || serviceName().compare(TQString::fromLatin1("*")) == 0)
+ if (serviceName().isEmpty() || serviceName().compare(TQString::tqfromLatin1("*")) == 0)
port = 0;
else
{
@@ -648,7 +648,7 @@ bool KStandardWorker::resolveService()
}
// it worked, we have a port number
- port = (Q_UINT16)result;
+ port = (TQ_UINT16)result;
}
}
@@ -667,7 +667,7 @@ KResolver::ErrorCodes KStandardWorker::addUnix()
if (!m_encodedName.isEmpty())
return KResolver::AddrFamily; // non local hostname
- if (protocol() || protocolName())
+ if (protocol() || static_cast<const char *>(protocolName()))
return KResolver::BadFlags; // cannot have Unix sockets with protocols
TQString pathname = serviceName();
@@ -712,7 +712,7 @@ bool KStandardWorker::resolveNumerically()
// now try to resolve the hostname numerically
KInetSocketAddress sa;
setError(KResolver::NoError);
- sa.setHost(KIpAddress(TQString::fromLatin1(m_encodedName)));
+ sa.setHost(KIpAddress(TQString::tqfromLatin1(m_encodedName)));
// if it failed, the length was reset to 0
bool ok = sa.length() != 0;
diff --git a/kdecore/network/kresolverstandardworkers_p.h b/kdecore/network/kresolverstandardworkers_p.h
index 310849bf3..2db460bef 100644
--- a/kdecore/network/kresolverstandardworkers_p.h
+++ b/kdecore/network/kresolverstandardworkers_p.h
@@ -66,7 +66,7 @@ namespace KNetwork { namespace Internal
{
protected:
mutable TQCString m_encodedName;
- Q_UINT16 port;
+ TQ_UINT16 port;
int scopeid;
TQPtrList<KNetwork::KResolverResults> resultList;
diff --git a/kdecore/network/kreverseresolver.cpp b/kdecore/network/kreverseresolver.cpp
index 639f6dbe4..00ef7f81d 100644
--- a/kdecore/network/kreverseresolver.cpp
+++ b/kdecore/network/kreverseresolver.cpp
@@ -78,7 +78,7 @@ namespace
bool success;
};
- class KReverseResolverEvent: public QEvent
+ class KReverseResolverEvent: public TQEvent
{
public:
static const int myType = TQEvent::User + 63; // arbitrary value
@@ -203,7 +203,7 @@ bool KReverseResolver::resolve(const KSocketAddress& addr, TQString& node,
return false;
}
-bool KReverseResolver::resolve(const struct sockaddr* sa, Q_UINT16 salen,
+bool KReverseResolver::resolve(const struct sockaddr* sa, TQ_UINT16 salen,
TQString& node, TQString& serv, int flags)
{
return resolve(KSocketAddress(sa, salen), node, serv, flags);
@@ -238,8 +238,8 @@ bool ReverseThread::run()
if (err == 0)
{
- node = KResolver::domainToUnicode(TQString::fromLatin1(h));
- service = TQString::fromLatin1(s);
+ node = KResolver::domainToUnicode(TQString::tqfromLatin1(h));
+ service = TQString::tqfromLatin1(s);
success = true;
}
else
diff --git a/kdecore/network/kreverseresolver.h b/kdecore/network/kreverseresolver.h
index 26274e586..1f26f4a2a 100644
--- a/kdecore/network/kreverseresolver.h
+++ b/kdecore/network/kreverseresolver.h
@@ -47,9 +47,10 @@ class KReverseResolverPrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KDECORE_EXPORT KReverseResolver: public QObject
+class KDECORE_EXPORT KReverseResolver: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -183,7 +184,7 @@ public:
* @return true if the resolution succeeded, false if not
* @see ReverseFlags for the possible values for @p flags
*/
- static bool resolve(const struct sockaddr* sa, Q_UINT16 salen,
+ static bool resolve(const struct sockaddr* sa, TQ_UINT16 salen,
TQString& node, TQString& serv, int flags = 0);
private:
diff --git a/kdecore/network/kserversocket.cpp b/kdecore/network/kserversocket.cpp
index 49facb12c..bd63d6306 100644
--- a/kdecore/network/kserversocket.cpp
+++ b/kdecore/network/kserversocket.cpp
@@ -155,7 +155,7 @@ bool KServerSocket::lookup()
// make sure we have at least one parameter for lookup
if (d->resolver.serviceName().isNull() &&
!d->resolver.nodeName().isNull())
- d->resolver.setServiceName(TQString::fromLatin1(""));
+ d->resolver.setServiceName(TQString::tqfromLatin1(""));
// don't restart the lookups if they had succeeded and
// the input values weren't changed
diff --git a/kdecore/network/kserversocket.h b/kdecore/network/kserversocket.h
index 30d8b40b0..a07ed54a1 100644
--- a/kdecore/network/kserversocket.h
+++ b/kdecore/network/kserversocket.h
@@ -107,6 +107,7 @@ class KServerSocketPrivate;
class KDECORE_EXPORT KServerSocket: public TQObject, public KPassiveSocketBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
diff --git a/kdecore/network/ksocketaddress.cpp b/kdecore/network/ksocketaddress.cpp
index adfc76b06..a6fd14cf5 100644
--- a/kdecore/network/ksocketaddress.cpp
+++ b/kdecore/network/ksocketaddress.cpp
@@ -74,7 +74,7 @@ const KIpAddress KIpAddress::anyhostV4(0L, 4);
const KIpAddress KIpAddress::anyhostV6(0L, 6);
// helper function to test if an IPv6 v4-mapped address is equal to its IPv4 counterpart
-static bool check_v4mapped(const Q_UINT32* v6addr, Q_UINT32 v4addr)
+static bool check_v4mapped(const TQ_UINT32* v6addr, TQ_UINT32 v4addr)
{
// check that the v6 is a v4-mapped address
if (!(v6addr[0] == 0 && v6addr[1] == 0 && v6addr[2] == htonl(0x0000ffff)))
@@ -131,12 +131,12 @@ bool KIpAddress::setAddress(const TQString& address)
m_version = 0;
// try to guess the address version
- if (address.find(':') != -1)
+ if (address.tqfind(':') != -1)
{
#ifdef AF_INET6
// guessing IPv6
- Q_UINT32 buf[4];
+ TQ_UINT32 buf[4];
if (inet_pton(AF_INET6, address.latin1(), buf))
{
memcpy(m_data, buf, sizeof(m_data));
@@ -149,7 +149,7 @@ bool KIpAddress::setAddress(const TQString& address)
}
else
{
- Q_UINT32 buf;
+ TQ_UINT32 buf;
if (inet_pton(AF_INET, address.latin1(), &buf))
{
*m_data = buf;
@@ -165,7 +165,7 @@ bool KIpAddress::setAddress(const TQString& address)
bool KIpAddress::setAddress(const char* address)
{
- return setAddress(TQString::fromLatin1(address));
+ return setAddress(TQString::tqfromLatin1(address));
}
// set from binary data
@@ -194,21 +194,21 @@ TQString KIpAddress::toString() const
{
case 4:
inet_ntop(AF_INET, m_data, buf, sizeof(buf) - 1);
- return TQString::fromLatin1(buf);
+ return TQString::tqfromLatin1(buf);
case 6:
#ifdef AF_INET6
inet_ntop(AF_INET6, m_data, buf, sizeof(buf) - 1);
#endif
- return TQString::fromLatin1(buf);
+ return TQString::tqfromLatin1(buf);
}
return TQString::null;
}
-Q_UINT32 KIpAddress::hostIPv4Addr(bool convertMapped) const
+TQ_UINT32 KIpAddress::hostIPv4Addr(bool convertMapped) const
{
- Q_UINT32 addr = IPv4Addr(convertMapped);
+ TQ_UINT32 addr = IPv4Addr(convertMapped);
return ntohl(addr);
}
@@ -219,23 +219,23 @@ Q_UINT32 KIpAddress::hostIPv4Addr(bool convertMapped) const
struct our_sockaddr_in6
{
# ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
- Q_UINT8 sin6_len;
- Q_UINT8 sin6_family;
+ TQ_UINT8 sin6_len;
+ TQ_UINT8 sin6_family;
# else //!HAVE_STRUCT_SOCKADDR_SA_LEN
- Q_UINT16 sin6_family;
+ TQ_UINT16 sin6_family;
# endif
- Q_UINT16 sin6_port; /* RFC says in_port_t */
- Q_UINT32 sin6_flowinfo;
- Q_UINT8 sin6_addr[16]; // 24 bytes up to here
- Q_UINT32 sin6_scope_id; // 28 bytes total
+ TQ_UINT16 sin6_port; /* RFC says in_port_t */
+ TQ_UINT32 sin6_flowinfo;
+ TQ_UINT8 sin6_addr[16]; // 24 bytes up to here
+ TQ_UINT32 sin6_scope_id; // 28 bytes total
};
// useful definitions
-#define MIN_SOCKADDR_LEN sizeof(Q_UINT16)
+#define MIN_SOCKADDR_LEN sizeof(TQ_UINT16)
#define SOCKADDR_IN_LEN sizeof(sockaddr_in)
#define MIN_SOCKADDR_IN6_LEN ((unsigned long) &(((our_sockaddr_in6*)0)->sin6_scope_id))
#define SOCKADDR_IN6_LEN sizeof(our_sockaddr_in6)
-#define MIN_SOCKADDR_UN_LEN (sizeof(Q_UINT16) + sizeof(char))
+#define MIN_SOCKADDR_UN_LEN (sizeof(TQ_UINT16) + sizeof(char))
class KNetwork::KSocketAddressData
@@ -263,14 +263,14 @@ public:
struct our_sockaddr_in6 *in6;
struct sockaddr_un *un;
} addr;
- Q_UINT16 curlen, reallen;
+ TQ_UINT16 curlen, reallen;
KSocketAddressData()
: ref(this)
{
addr.generic = 0L;
curlen = 0;
- invalidate();
+ tqinvalidate();
}
~KSocketAddressData()
@@ -282,10 +282,10 @@ public:
inline bool invalid() const
{ return reallen == 0; }
- inline void invalidate()
+ inline void tqinvalidate()
{ reallen = 0; }
- void dup(const sockaddr* sa, Q_UINT16 len, bool clear = true);
+ void dup(const sockaddr* sa, TQ_UINT16 len, bool clear = true);
void makeipv4()
{
@@ -343,12 +343,12 @@ public:
};
// create duplicates of
-void KSocketAddressData::dup(const sockaddr* sa, Q_UINT16 len, bool clear)
+void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear)
{
if (len < MIN_SOCKADDR_LEN)
{
// certainly invalid
- invalidate();
+ tqinvalidate();
return;
}
@@ -359,7 +359,7 @@ void KSocketAddressData::dup(const sockaddr* sa, Q_UINT16 len, bool clear)
(sa->sa_family == AF_UNIX && len < MIN_SOCKADDR_UN_LEN)))
{
// also invalid
- invalidate();
+ tqinvalidate();
return;
}
@@ -411,7 +411,7 @@ KSocketAddress::KSocketAddress()
}
// constructor from binary data
-KSocketAddress::KSocketAddress(const sockaddr *sa, Q_UINT16 len)
+KSocketAddress::KSocketAddress(const sockaddr *sa, TQ_UINT16 len)
: d(new KSocketAddressData)
{
setAddress(sa, len);
@@ -444,7 +444,7 @@ KSocketAddress& KSocketAddress::operator =(const KSocketAddress& other)
if (other.d && !other.d->invalid())
d->dup(other.d->addr.generic, other.d->reallen);
else
- d->invalidate();
+ d->tqinvalidate();
return *this;
}
@@ -462,24 +462,24 @@ sockaddr* KSocketAddress::address()
return d->addr.generic;
}
-KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, Q_UINT16 len)
+KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len)
{
if (sa != 0L && len >= MIN_SOCKADDR_LEN)
d->dup(sa, len);
else
- d->invalidate();
+ d->tqinvalidate();
return *this;
}
-Q_UINT16 KSocketAddress::length() const
+TQ_UINT16 KSocketAddress::length() const
{
if (d->invalid())
return 0;
return d->reallen;
}
-KSocketAddress& KSocketAddress::setLength(Q_UINT16 len)
+KSocketAddress& KSocketAddress::setLength(TQ_UINT16 len)
{
d->dup((sockaddr*)0L, len, false);
@@ -619,7 +619,7 @@ TQString KSocketAddress::toString() const
fmt = "[%1]:%2";
#endif
else if (d->addr.generic->sa_family == AF_UNIX)
- return TQString::fromLatin1("unix:%1").arg(serviceName());
+ return TQString::tqfromLatin1("unix:%1").arg(serviceName());
else
return i18n("1: the unknown socket address family number",
"Unknown family %1").arg(d->addr.generic->sa_family);
@@ -687,7 +687,7 @@ KInetSocketAddress::KInetSocketAddress()
}
// binary data constructor
-KInetSocketAddress::KInetSocketAddress(const sockaddr* sa, Q_UINT16 len)
+KInetSocketAddress::KInetSocketAddress(const sockaddr* sa, TQ_UINT16 len)
: KSocketAddress(sa, len)
{
if (!d->invalid())
@@ -695,7 +695,7 @@ KInetSocketAddress::KInetSocketAddress(const sockaddr* sa, Q_UINT16 len)
}
// create from IP and port
-KInetSocketAddress::KInetSocketAddress(const KIpAddress& host, Q_UINT16 port)
+KInetSocketAddress::KInetSocketAddress(const KIpAddress& host, TQ_UINT16 port)
{
setHost(host);
setPort(port);
@@ -788,14 +788,14 @@ KInetSocketAddress& KInetSocketAddress::setHost(const KIpAddress& ip)
default:
// empty
- d->invalidate();
+ d->tqinvalidate();
}
return *this;
}
// returns the port
-Q_UINT16 KInetSocketAddress::port() const
+TQ_UINT16 KInetSocketAddress::port() const
{
if (d->invalid())
return 0;
@@ -814,7 +814,7 @@ Q_UINT16 KInetSocketAddress::port() const
return 0;
}
-KInetSocketAddress& KInetSocketAddress::setPort(Q_UINT16 port)
+KInetSocketAddress& KInetSocketAddress::setPort(TQ_UINT16 port)
{
if (d->invalid())
makeIPv4();
@@ -832,7 +832,7 @@ KInetSocketAddress& KInetSocketAddress::setPort(Q_UINT16 port)
#endif
default:
- d->invalidate(); // setting the port on something else
+ d->tqinvalidate(); // setting the port on something else
}
return *this;
@@ -850,7 +850,7 @@ KInetSocketAddress& KInetSocketAddress::makeIPv6()
return *this;
}
-Q_UINT32 KInetSocketAddress::flowinfo() const
+TQ_UINT32 KInetSocketAddress::flowinfo() const
{
#ifndef AF_INET6
return 0;
@@ -862,7 +862,7 @@ Q_UINT32 KInetSocketAddress::flowinfo() const
#endif
}
-KInetSocketAddress& KInetSocketAddress::setFlowinfo(Q_UINT32 flowinfo)
+KInetSocketAddress& KInetSocketAddress::setFlowinfo(TQ_UINT32 flowinfo)
{
makeIPv6(); // must set here
d->addr.in6->sin6_flowinfo = flowinfo;
@@ -897,18 +897,18 @@ void KInetSocketAddress::update()
return;
#endif
else
- d->invalidate();
+ d->tqinvalidate();
}
KUnixSocketAddress::KUnixSocketAddress()
{
}
-KUnixSocketAddress::KUnixSocketAddress(const sockaddr* sa, Q_UINT16 len)
+KUnixSocketAddress::KUnixSocketAddress(const sockaddr* sa, TQ_UINT16 len)
: KSocketAddress(sa, len)
{
if (!d->invalid() && d->addr.un->sun_family != AF_UNIX)
- d->invalidate();
+ d->tqinvalidate();
}
KUnixSocketAddress::KUnixSocketAddress(const KUnixSocketAddress& other)
diff --git a/kdecore/network/ksocketaddress.h b/kdecore/network/ksocketaddress.h
index 6889527e3..75deb60ae 100644
--- a/kdecore/network/ksocketaddress.h
+++ b/kdecore/network/ksocketaddress.h
@@ -119,7 +119,7 @@ public:
*
* @param ip4addr the IPv4 address
*/
- inline KIpAddress(Q_UINT32 ip4addr)
+ inline KIpAddress(TQ_UINT32 ip4addr)
{ setAddress(&ip4addr, 4); }
/**
@@ -232,7 +232,7 @@ public:
* system's in_addr type.
*
*/
- inline Q_UINT32 IPv4Addr(bool convertMapped = true) const
+ inline TQ_UINT32 IPv4Addr(bool convertMapped = true) const
{
return (convertMapped && isV4Mapped()) ? m_data[3] : m_data[0];
}
@@ -245,7 +245,7 @@ public:
* valid. The address returned is in host byte order.
*
*/
- Q_UINT32 hostIPv4Addr(bool convertMapped = true) const;
+ TQ_UINT32 hostIPv4Addr(bool convertMapped = true) const;
public:
/*-- tests --*/
@@ -310,7 +310,7 @@ public:
inline bool isMulticast() const
{
if (version() == 4) return isClassD();
- if (version() == 6) return ((Q_UINT8*)addr())[0] == 0xff;
+ if (version() == 6) return ((TQ_UINT8*)addr())[0] == 0xff;
return false;
}
@@ -320,7 +320,7 @@ public:
inline bool isLinkLocal() const
{
if (version() != 6) return false;
- Q_UINT8* addr = (Q_UINT8*)this->addr();
+ TQ_UINT8* addr = (TQ_UINT8*)this->addr();
return (addr[0] & 0xff) == 0xfe &&
(addr[1] & 0xc0) == 0x80;
}
@@ -331,7 +331,7 @@ public:
inline bool isSiteLocal() const
{
if (version() != 6) return false;
- Q_UINT8* addr = (Q_UINT8*)this->addr();
+ TQ_UINT8* addr = (TQ_UINT8*)this->addr();
return (addr[0] & 0xff) == 0xfe &&
(addr[1] & 0xc0) == 0xc0;
}
@@ -348,10 +348,10 @@ public:
inline bool isV4Mapped() const
{
if (version() != 6) return false;
- Q_UINT32* addr = (Q_UINT32*)this->addr();
+ TQ_UINT32* addr = (TQ_UINT32*)this->addr();
return addr[0] == 0 && addr[1] == 0 &&
- ((Q_UINT16*)&addr[2])[0] == 0 &&
- ((Q_UINT16*)&addr[2])[1] == 0xffff;
+ ((TQ_UINT16*)&addr[2])[0] == 0 &&
+ ((TQ_UINT16*)&addr[2])[1] == 0xffff;
}
/**
@@ -360,7 +360,7 @@ public:
inline bool isV4Compat() const
{
if (version() != 6 || isLocalhost()) return false;
- Q_UINT32* addr = (Q_UINT32*)this->addr();
+ TQ_UINT32* addr = (TQ_UINT32*)this->addr();
return addr[0] == 0 && addr[1] == 0 && addr[2] == 0 && addr[3] != 0;
}
@@ -368,34 +368,34 @@ public:
* Returns true if this is an IPv6 node-local multicast address.
*/
inline bool isMulticastNodeLocal() const
- { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x1; }
+ { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x1; }
/**
* Returns true if this is an IPv6 link-local multicast address.
*/
inline bool isMulticastLinkLocal() const
- { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x2; }
+ { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x2; }
/**
* Returns true if this is an IPv6 site-local multicast address.
*/
inline bool isMulticastSiteLocal() const
- { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x5; }
+ { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x5; }
/**
* Returns true if this is an IPv6 organisational-local multicast address.
*/
inline bool isMulticastOrgLocal() const
- { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x8; }
+ { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x8; }
/**
* Returns true if this is an IPv6 global multicast address.
*/
inline bool isMulticastGlobal() const
- { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0xe; }
+ { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0xe; }
protected:
- Q_UINT32 m_data[4]; // 16 bytes, needed for an IPv6 address
+ TQ_UINT32 m_data[4]; // 16 bytes, needed for an IPv6 address
char m_version;
@@ -437,7 +437,7 @@ public:
* @param sa the socket address structure
* @param len the socket address length
*/
- KSocketAddress(const sockaddr* sa, Q_UINT16 len);
+ KSocketAddress(const sockaddr* sa, TQ_UINT16 len);
/**
* Copy constructor. This creates a copy of the other
@@ -490,7 +490,7 @@ public:
* @param sa the socket address structure
* @param len the socket address length
*/
- KSocketAddress& setAddress(const sockaddr *sa, Q_UINT16 len);
+ KSocketAddress& setAddress(const sockaddr *sa, TQ_UINT16 len);
/**
* Returns the socket address structure, to be passed down to
@@ -502,7 +502,7 @@ public:
/**
* Returns the length of this socket address structure.
*/
- Q_UINT16 length() const;
+ TQ_UINT16 length() const;
/**
* Sets the length of this socket structure.
@@ -511,7 +511,7 @@ public:
* buffer to fit needs. This function should not be used except for handling
* unknown socket address structures.
*
- * Also note that this function may invalidate the socket if a known
+ * Also note that this function may tqinvalidate the socket if a known
* family is set (Internet or Unix socket) and the new length would be
* too small to hold the system's sockaddr_* structure. If unsure, reset
* the family:
@@ -524,7 +524,7 @@ public:
*
* @param len the new length
*/
- KSocketAddress& setLength(Q_UINT16 len);
+ KSocketAddress& setLength(TQ_UINT16 len);
/**
* Returns the family of this address.
@@ -535,7 +535,7 @@ public:
/**
* Sets the family of this object.
*
- * Note: setting the family will probably invalidate any address data
+ * Note: setting the family will probably tqinvalidate any address data
* contained in this object. Use this function with care.
*
* @param family the new family to set
@@ -666,7 +666,7 @@ public:
* @param sa the sockaddr structure
* @param len the structure's length
*/
- KInetSocketAddress(const sockaddr* sa, Q_UINT16 len);
+ KInetSocketAddress(const sockaddr* sa, TQ_UINT16 len);
/**
* Creates an object from an IP address and port.
@@ -674,7 +674,7 @@ public:
* @param host the IP address
* @param port the port number
*/
- KInetSocketAddress(const KIpAddress& host, Q_UINT16 port);
+ KInetSocketAddress(const KIpAddress& host, TQ_UINT16 port);
/**
* Copy constructor.
@@ -750,7 +750,7 @@ public:
* @return a port number in the range 0 to 65535, inclusive. An empty or
* invalid object will have a port number of 0.
*/
- Q_UINT16 port() const;
+ TQ_UINT16 port() const;
/**
* Sets the port number. If this object is empty, this function will default to
@@ -759,7 +759,7 @@ public:
* @param port the port number to set
* @return a reference to itself
*/
- KInetSocketAddress& setPort(Q_UINT16 port);
+ KInetSocketAddress& setPort(TQ_UINT16 port);
/**
* Converts this object to an IPv4 socket address. It has no effect if the object
@@ -787,7 +787,7 @@ public:
*
* @return the flowinfo information or 0 if this object is empty or IPv4
*/
- Q_UINT32 flowinfo() const;
+ TQ_UINT32 flowinfo() const;
/**
* Sets the flowinfo information for an IPv6 socket address. If this is not
@@ -796,7 +796,7 @@ public:
* @param flowinfo the flowinfo to set
* @return a reference to itself
*/
- KInetSocketAddress& setFlowinfo(Q_UINT32 flowinfo);
+ KInetSocketAddress& setFlowinfo(TQ_UINT32 flowinfo);
/**
* Returns the scope id this IPv6 socket is bound to.
@@ -854,7 +854,7 @@ public:
* @param sa the socket address structure
* @param len the structure's length
*/
- KUnixSocketAddress(const sockaddr* sa, Q_UINT16 len);
+ KUnixSocketAddress(const sockaddr* sa, TQ_UINT16 len);
/**
* Copy constructor. Creates a copy of the other object,
diff --git a/kdecore/network/ksocketbase.cpp b/kdecore/network/ksocketbase.cpp
index 9071eea0e..1a486ee16 100644
--- a/kdecore/network/ksocketbase.cpp
+++ b/kdecore/network/ksocketbase.cpp
@@ -309,7 +309,7 @@ int KActiveSocketBase::putch(int ch)
void KActiveSocketBase::setError(int status, SocketError error)
{
KSocketBase::setError(error);
- setStatus(status);
+ setqStatus(status);
}
void KActiveSocketBase::resetError()
diff --git a/kdecore/network/ksocketbase.h b/kdecore/network/ksocketbase.h
index 133086114..b7df0c35f 100644
--- a/kdecore/network/ksocketbase.h
+++ b/kdecore/network/ksocketbase.h
@@ -504,7 +504,11 @@ public:
* This call is not supported on sockets. Reimplemented from TQIODevice.
* This will always return 0.
*/
+#ifdef USE_QT4
+ virtual qint64 size() const
+#else // USE_QT4
virtual Offset size() const
+#endif // USE_QT4
{ return 0; }
/**
@@ -533,7 +537,7 @@ public:
* blocking.
*/
#ifdef USE_QT3
- virtual Q_LONG bytesAvailable() const = 0;
+ virtual TQ_LONG bytesAvailable() const = 0;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const = 0;
@@ -550,7 +554,7 @@ public:
*
* @returns the number of bytes available
*/
- virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L) = 0;
+ virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L) = 0;
/**
* Reads data from the socket.
@@ -558,7 +562,7 @@ public:
* Reimplemented from TQIODevice. See TQIODevice::readBlock for
* more information.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG len) = 0;
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG len) = 0;
/** @overload
* Receives data and the source address.
@@ -571,7 +575,7 @@ public:
* @param from the address of the sender will be stored here
* @returns the actual number of bytes read
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) = 0;
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) = 0;
/**
* Peeks the data in the socket.
@@ -584,7 +588,7 @@ public:
* @param maxlen the maximum number of bytes to peek
* @returns the actual number of bytes copied into @p data
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen) = 0;
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen) = 0;
/** @overload
* Peeks the data in the socket and the source address.
@@ -598,7 +602,7 @@ public:
* @param from the address of the sender will be stored here
* @returns the actual number of bytes copied into @p data
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) = 0;
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) = 0;
/**
* Writes the given data to the socket.
@@ -606,7 +610,7 @@ public:
* Reimplemented from TQIODevice. See TQIODevice::writeBlock for
* more information.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len) = 0;
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len) = 0;
/** @overload
* Writes the given data to the destination address.
@@ -619,7 +623,7 @@ public:
* @param to the address to send to
* @returns the number of bytes actually sent
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to) = 0;
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to) = 0;
/**
* Reads one character from the socket.
diff --git a/kdecore/network/ksocketbuffer.cpp b/kdecore/network/ksocketbuffer.cpp
index 18c926c83..4ea12ed14 100644
--- a/kdecore/network/ksocketbuffer.cpp
+++ b/kdecore/network/ksocketbuffer.cpp
@@ -33,7 +33,7 @@
using namespace KNetwork;
using namespace KNetwork::Internal;
-KSocketBuffer::KSocketBuffer(Q_LONG size)
+KSocketBuffer::KSocketBuffer(TQ_LONG size)
: m_mutex(true), m_offset(0), m_size(size), m_length(0)
{
}
@@ -75,9 +75,9 @@ bool KSocketBuffer::canReadLine() const
// walk the buffer
for ( ; it != end; ++it)
{
- if ((*it).find('\n', offset) != -1)
+ if ((*it).tqfind('\n', offset) != -1)
return true;
- if ((*it).find('\r', offset) != -1)
+ if ((*it).tqfind('\r', offset) != -1)
return true;
offset = 0;
}
@@ -101,7 +101,7 @@ TQCString KSocketBuffer::readLine()
// walk the buffer
for ( ; it != end; ++it)
{
- int posnl = (*it).find('\n', offset);
+ int posnl = (*it).tqfind('\n', offset);
if (posnl == -1)
{
// not found in this one
@@ -120,17 +120,17 @@ TQCString KSocketBuffer::readLine()
return result;
}
-Q_LONG KSocketBuffer::length() const
+TQ_LONG KSocketBuffer::length() const
{
return m_length;
}
-Q_LONG KSocketBuffer::size() const
+TQ_LONG KSocketBuffer::size() const
{
return m_size;
}
-bool KSocketBuffer::setSize(Q_LONG size)
+bool KSocketBuffer::setSize(TQ_LONG size)
{
m_size = size;
if (size == -1 || m_length < m_size)
@@ -147,7 +147,7 @@ bool KSocketBuffer::setSize(Q_LONG size)
return (m_length - m_size) == consumeBuffer(0L, m_length - m_size, true);
}
-Q_LONG KSocketBuffer::feedBuffer(const char *data, Q_LONG len)
+TQ_LONG KSocketBuffer::feedBuffer(const char *data, TQ_LONG len)
{
if (data == 0L || len == 0)
return 0; // nothing to write
@@ -168,7 +168,7 @@ Q_LONG KSocketBuffer::feedBuffer(const char *data, Q_LONG len)
return len;
}
-Q_LONG KSocketBuffer::consumeBuffer(char *destbuffer, Q_LONG maxlen, bool discard)
+TQ_LONG KSocketBuffer::consumeBuffer(char *destbuffer, TQ_LONG maxlen, bool discard)
{
if (maxlen == 0 || isEmpty())
return 0;
@@ -176,7 +176,7 @@ Q_LONG KSocketBuffer::consumeBuffer(char *destbuffer, Q_LONG maxlen, bool discar
TQValueListIterator<TQByteArray> it = m_list.begin(),
end = m_list.end();
TQIODevice::Offset offset = m_offset;
- Q_LONG copied = 0;
+ TQ_LONG copied = 0;
// walk the buffer
while (it != end && maxlen)
@@ -228,7 +228,7 @@ void KSocketBuffer::clear()
m_length = 0;
}
-Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
+TQ_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len)
{
if (len == 0 || isEmpty())
return 0;
@@ -238,7 +238,7 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
TQValueListIterator<TQByteArray> it = m_list.begin(),
end = m_list.end();
TQIODevice::Offset offset = m_offset;
- Q_LONG written = 0;
+ TQ_LONG written = 0;
// walk the buffer
while (it != end && (len || len == -1))
@@ -248,11 +248,11 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
// better by concatenating a few of them into a big buffer
// question is: how big should that buffer be? 2 kB should be enough
- Q_ULONG bufsize = 1460;
+ TQ_ULONG bufsize = 1460;
if (len != -1 && len < bufsize)
bufsize = len;
TQByteArray buf(bufsize);
- Q_LONG count = 0;
+ TQ_LONG count = 0;
while (it != end && count + ((*it).size() - offset) <= bufsize)
{
@@ -273,7 +273,7 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
}
// now try to write those bytes
- Q_LONG wrote = dev->writeBlock(buf, count);
+ TQ_LONG wrote = dev->writeBlock(buf, count);
if (wrote == -1)
// error?
@@ -293,7 +293,7 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
return written;
}
-Q_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, Q_LONG len)
+TQ_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, TQ_LONG len)
{
if (len == 0 || isFull())
return 0;
diff --git a/kdecore/network/ksocketbuffer_p.h b/kdecore/network/ksocketbuffer_p.h
index a4a0d6a9e..0b8e96205 100644
--- a/kdecore/network/ksocketbuffer_p.h
+++ b/kdecore/network/ksocketbuffer_p.h
@@ -53,7 +53,7 @@ public:
*
* @param size the maximum size of the buffer
*/
- KSocketBuffer(Q_LONG size = -1);
+ KSocketBuffer(TQ_LONG size = -1);
/**
* Copy constructor.
@@ -86,7 +86,7 @@ public:
*
* @sa size
*/
- virtual Q_LONG length() const;
+ virtual TQ_LONG length() const;
/**
* Retrieves the buffer size. The value of -1 indicates that
@@ -94,7 +94,7 @@ public:
*
* @sa length for the length of the data stored
*/
- virtual Q_LONG size() const;
+ virtual TQ_LONG size() const;
/**
* Sets the size of the buffer, if allowed.
@@ -103,7 +103,7 @@ public:
* @returns true on success, false if an error occurred.
* @note if the new size is less than length(), the buffer will be truncated
*/
- virtual bool setSize(Q_LONG size);
+ virtual bool setSize(TQ_LONG size);
/**
* Adds data to the end of the buffer.
@@ -112,7 +112,7 @@ public:
* @param len the data length, in bytes
* @returns the number of bytes added to the end of the buffer.
*/
- virtual Q_LONG feedBuffer(const char *data, Q_LONG len);
+ virtual TQ_LONG feedBuffer(const char *data, TQ_LONG len);
/**
* Clears the buffer.
@@ -127,7 +127,7 @@ public:
* @param discard if true, the bytes copied will be discarded
* @returns the number of bytes copied from the buffer
*/
- virtual Q_LONG consumeBuffer(char *data, Q_LONG maxlen, bool discard = true);
+ virtual TQ_LONG consumeBuffer(char *data, TQ_LONG maxlen, bool discard = true);
/**
* Sends at most @p len bytes of data to the I/O Device.
@@ -137,7 +137,7 @@ public:
* @returns the number of bytes sent and discarded from the buffer, -1
* indicates an error.
*/
- virtual Q_LONG sendTo(KActiveSocketBase* device, Q_LONG len = -1);
+ virtual TQ_LONG sendTo(KActiveSocketBase* device, TQ_LONG len = -1);
/**
* Tries to receive @p len bytes of data from the I/O device.
@@ -148,15 +148,15 @@ public:
* @returns the number of bytes received and copied into the buffer,
* -1 indicates an error.
*/
- virtual Q_LONG receiveFrom(KActiveSocketBase* device, Q_LONG len = -1);
+ virtual TQ_LONG receiveFrom(KActiveSocketBase* device, TQ_LONG len = -1);
protected:
mutable TQMutex m_mutex;
TQValueList<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;
+ TQ_LONG m_size; ///< the maximum length of the buffer
+ mutable TQ_LONG m_length;
};
} } // namespace KNetwork::Internal
diff --git a/kdecore/network/ksocketdevice.cpp b/kdecore/network/ksocketdevice.cpp
index 53a16ca0a..793642bf9 100644
--- a/kdecore/network/ksocketdevice.cpp
+++ b/kdecore/network/ksocketdevice.cpp
@@ -365,7 +365,7 @@ bool KSocketDevice::disconnect()
}
#ifdef USE_QT3
-Q_LONG KSocketDevice::bytesAvailable() const
+TQ_LONG KSocketDevice::bytesAvailable() const
#endif
#ifdef USE_QT4
qint64 KSocketDevice::bytesAvailable() const
@@ -381,7 +381,7 @@ qint64 KSocketDevice::bytesAvailable() const
return nchars;
}
-Q_LONG KSocketDevice::waitForMore(int msecs, bool *timeout)
+TQ_LONG KSocketDevice::waitForMore(int msecs, bool *timeout)
{
if (m_sockfd == -1)
return -1; // there won't ever be anything to read...
@@ -393,7 +393,7 @@ Q_LONG KSocketDevice::waitForMore(int msecs, bool *timeout)
return bytesAvailable();
}
-static int do_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false)
+static int do_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false)
{
socklen_t len;
if (from)
@@ -419,7 +419,7 @@ static int do_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddress
return 0;
}
-Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KSocketDevice::readBlock(char *data, TQ_ULONG maxlen)
{
resetError();
if (m_sockfd == -1)
@@ -440,7 +440,7 @@ Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress &from)
+TQ_LONG KSocketDevice::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from)
{
resetError();
if (m_sockfd == -1)
@@ -461,7 +461,7 @@ Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress &from
return retval;
}
-Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen)
{
resetError();
if (m_sockfd == -1)
@@ -482,7 +482,7 @@ Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
resetError();
if (m_sockfd == -1)
@@ -503,12 +503,12 @@ Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from
return retval;
}
-Q_LONG KSocketDevice::writeBlock(const char *data, Q_ULONG len)
+TQ_LONG KSocketDevice::writeBlock(const char *data, TQ_ULONG len)
{
return writeBlock(data, len, KSocketAddress());
}
-Q_LONG KSocketDevice::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to)
+TQ_LONG KSocketDevice::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to)
{
resetError();
if (m_sockfd == -1)
@@ -884,7 +884,7 @@ KSocketDevice::setDefaultImpl(KSocketDeviceFactoryBase* factory)
void KSocketDevice::addNewImpl(KSocketDeviceFactoryBase* factory, int capabilities)
{
TQMutexLocker locker(&defaultImplFactoryMutex);
- if (factories.contains(capabilities))
+ if (factories.tqcontains(capabilities))
delete factories[capabilities];
factories.insert(capabilities, factory);
}
diff --git a/kdecore/network/ksocketdevice.h b/kdecore/network/ksocketdevice.h
index 5f86687b2..5324cd02b 100644
--- a/kdecore/network/ksocketdevice.h
+++ b/kdecore/network/ksocketdevice.h
@@ -199,7 +199,7 @@ public:
* Returns the number of bytes available for reading without blocking.
*/
#ifdef USE_QT3
- virtual Q_LONG bytesAvailable() const;
+ virtual TQ_LONG bytesAvailable() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const;
@@ -211,37 +211,37 @@ public:
* This function is a wrapper against @ref poll. This function will wait
* for any read events.
*/
- virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L);
+ virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L);
/**
* Reads data from this socket.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen);
/**
* Reads data and the source address from this socket.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Peeks data in the socket.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
/**
* Peeks the data in the socket and the source address.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Writes data to the socket.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len);
/**
* Writes the given data to the given destination address.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
/**
* Returns this socket's local address.
diff --git a/kdecore/network/ksockssocketdevice.cpp b/kdecore/network/ksockssocketdevice.cpp
index f67b90bc9..b9fcb6cdd 100644
--- a/kdecore/network/ksockssocketdevice.cpp
+++ b/kdecore/network/ksockssocketdevice.cpp
@@ -190,7 +190,7 @@ KSocksSocketDevice* KSocksSocketDevice::accept()
return new KSocksSocketDevice(newfd);
}
-static int socks_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false)
+static int socks_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false)
{
kde_socklen_t len;
if (from)
@@ -214,7 +214,7 @@ static int socks_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddr
return 0;
}
-Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KSocksSocketDevice::readBlock(char *data, TQ_ULONG maxlen)
{
resetError();
if (m_sockfd == -1)
@@ -235,7 +235,7 @@ Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress &from)
+TQ_LONG KSocksSocketDevice::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from)
{
resetError();
if (m_sockfd == -1)
@@ -256,7 +256,7 @@ Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress
return retval;
}
-Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen)
{
resetError();
if (m_sockfd == -1)
@@ -277,7 +277,7 @@ Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
resetError();
if (m_sockfd == -1)
@@ -298,12 +298,12 @@ Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress&
return retval;
}
-Q_LONG KSocksSocketDevice::writeBlock(const char *data, Q_ULONG len)
+TQ_LONG KSocksSocketDevice::writeBlock(const char *data, TQ_ULONG len)
{
return writeBlock(data, len, KSocketAddress());
}
-Q_LONG KSocksSocketDevice::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to)
+TQ_LONG KSocksSocketDevice::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to)
{
resetError();
if (m_sockfd == -1)
diff --git a/kdecore/network/ksockssocketdevice.h b/kdecore/network/ksockssocketdevice.h
index 62de23f05..1f8453836 100644
--- a/kdecore/network/ksockssocketdevice.h
+++ b/kdecore/network/ksockssocketdevice.h
@@ -83,20 +83,20 @@ public:
/**
* Overrides reading.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen);
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Overrides peeking.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen);
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Overrides writing.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len);
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
/**
* Overrides getting socket address.
diff --git a/kdecore/network/ksrvresolverworker.cpp b/kdecore/network/ksrvresolverworker.cpp
index 07e3555fa..c1df59bde 100644
--- a/kdecore/network/ksrvresolverworker.cpp
+++ b/kdecore/network/ksrvresolverworker.cpp
@@ -33,7 +33,7 @@ using namespace KNetwork::Internal;
namespace
{
- struct KSrvStartEvent: public QCustomEvent
+ struct KSrvStartEvent: public TQCustomEvent
{
inline KSrvStartEvent() : TQCustomEvent(TQEvent::User) { }
};
@@ -51,11 +51,11 @@ bool KSrvResolverWorker::preprocess()
return false;
TQString node = nodeName();
- if (node.find('%') != -1)
- node.truncate(node.find('%'));
+ if (node.tqfind('%') != -1)
+ node.truncate(node.tqfind('%'));
- if (node.isEmpty() || node == TQString::fromLatin1("*") ||
- node == TQString::fromLatin1("localhost"))
+ if (node.isEmpty() || node == TQString::tqfromLatin1("*") ||
+ node == TQString::tqfromLatin1("localhost"))
return false; // empty == localhost
encodedName = KResolver::domainToAscii(node);
@@ -225,7 +225,7 @@ bool KSrvResolverWorker::postprocess()
void KSrvResolverWorker::customEvent(TQCustomEvent*)
{
- dns = new TQDns(TQString::fromLatin1(encodedName), TQDns::Srv);
+ dns = new TQDns(TQString::tqfromLatin1(encodedName), TQDns::Srv);
TQObject::connect(dns, TQT_SIGNAL(resultsReady()), this, TQT_SLOT(dnsResultsReady()));
}
diff --git a/kdecore/network/ksrvresolverworker_p.h b/kdecore/network/ksrvresolverworker_p.h
index 90074214f..293308544 100644
--- a/kdecore/network/ksrvresolverworker_p.h
+++ b/kdecore/network/ksrvresolverworker_p.h
@@ -42,13 +42,14 @@ namespace KNetwork
public KNetwork::KResolverWorkerBase
{
Q_OBJECT
+ TQ_OBJECT
public:
struct Entry
{
TQString name;
- Q_UINT16 port;
- Q_UINT16 weight;
+ TQ_UINT16 port;
+ TQ_UINT16 weight;
KNetwork::KResolver* resolver;
};
@@ -57,7 +58,7 @@ namespace KNetwork
PriorityClass() : totalWeight(0) { }
TQValueList<Entry> entries;
- Q_UINT16 totalWeight;
+ TQ_UINT16 totalWeight;
};
private:
@@ -66,7 +67,7 @@ namespace KNetwork
TQCString encodedName;
TQSemaphore *sem;
- typedef TQMap<Q_UINT16, PriorityClass> Results;
+ typedef TQMap<TQ_UINT16, PriorityClass> Results;
Results myResults;
public:
diff --git a/kdecore/network/kstreamsocket.cpp b/kdecore/network/kstreamsocket.cpp
index 8ca4f91f6..3861a4e09 100644
--- a/kdecore/network/kstreamsocket.cpp
+++ b/kdecore/network/kstreamsocket.cpp
@@ -130,7 +130,7 @@ bool KStreamSocket::connect(const TQString& node, const TQString& service)
// connection hasn't started yet
if (!blocking())
{
- TQObject::connect(this, TQT_SIGNAL(hostFound()), TQT_SLOT(hostFoundSlot()));
+ QObject::connect(this, TQT_SIGNAL(hostFound()), TQT_SLOT(hostFoundSlot()));
return lookup();
}
@@ -196,7 +196,7 @@ bool KStreamSocket::connect(const KResolverEntry& entry)
void KStreamSocket::hostFoundSlot()
{
- TQObject::disconnect(this, TQT_SLOT(hostFoundSlot()));
+ QObject::disconnect(this, TQT_SLOT(hostFoundSlot()));
if (timeout() > 0)
d->timer.start(timeout(), true);
TQTimer::singleShot(0, this, TQT_SLOT(connectionEvent()));
diff --git a/kdecore/network/kstreamsocket.h b/kdecore/network/kstreamsocket.h
index 099826cb8..9b58bf23a 100644
--- a/kdecore/network/kstreamsocket.h
+++ b/kdecore/network/kstreamsocket.h
@@ -97,6 +97,7 @@ class KStreamSocketPrivate;
class KDECORE_EXPORT KStreamSocket: public KClientSocketBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kdecore/svgicons/ksvgiconengine.cpp b/kdecore/svgicons/ksvgiconengine.cpp
index dd54e99be..faca9d967 100644
--- a/kdecore/svgicons/ksvgiconengine.cpp
+++ b/kdecore/svgicons/ksvgiconengine.cpp
@@ -127,12 +127,12 @@ public:
TQColor qStopColor = m_engine->painter()->parseColor(parseColor);
// Convert in a libart suitable form
- Q_UINT32 stopColor = m_engine->painter()->toArtColor(qStopColor);
+ TQ_UINT32 stopColor = m_engine->painter()->toArtColor(qStopColor);
int opacity = m_engine->painter()->parseOpacity(parseOpacity);
- Q_UINT32 rgba = (stopColor << 8) | opacity;
- Q_UINT32 r, g, b, a;
+ TQ_UINT32 rgba = (stopColor << 8) | opacity;
+ TQ_UINT32 r, g, b, a;
// Convert from separated to premultiplied alpha
a = rgba & 0xff;
@@ -174,8 +174,8 @@ public:
return TQPointArray();
points.replace(',', ' ');
- points.replace('\r', TQString::null);
- points.replace('\n', TQString::null);
+ points.replace('\r', TQString());
+ points.replace('\n', TQString());
points = points.simplifyWhiteSpace();
@@ -201,7 +201,7 @@ public:
// Combine new and old matrix
TQWMatrix matrix = m_engine->painter()->parseTransform(transform);
- TQWMatrix *current = m_engine->painter()->worldMatrix();
+ TQWMatrix *current = m_engine->painter()->tqworldMatrix();
*current = matrix * *current;
}
@@ -221,9 +221,9 @@ public:
TQPtrList<TQDomNamedNodeMap> applyList;
applyList.setAutoDelete(true);
- TQDomNode shape = node.parentNode();
- for(; !shape.isNull() ; shape = shape.parentNode())
- applyList.prepend(new TQDomNamedNodeMap(shape.attributes()));
+ TQDomNode tqshape = node.tqparentNode();
+ for(; !tqshape.isNull() ; tqshape = tqshape.tqparentNode())
+ applyList.prepend(new TQDomNamedNodeMap(tqshape.attributes()));
// Apply parent attributes
for(TQDomNamedNodeMap *map = applyList.first(); map != 0; map = applyList.next())
@@ -425,7 +425,7 @@ public:
if(href.startsWith("data:"))
{
// Get input
- TQCString input = href.remove(TQRegExp("^data:image/.*;base64,")).utf8();
+ TQCString input = TQString(href.remove(TQRegExp("^data:image/.*;base64,"))).utf8();
// Decode into 'output'
TQByteArray output;
@@ -441,7 +441,7 @@ public:
{
// Scale, if needed
if(image.width() != (int) w || image.height() != (int) h)
- image = image.smoothScale((int) w, (int) h, TQImage_ScaleFree);
+ image = image.smoothScale((int) w, (int) h, TQ_ScaleFree);
m_engine->painter()->drawImage(x, y, image);
}
@@ -622,7 +622,7 @@ bool KSVGIconEngine::load(int width, int height, const TQString &path)
d->width = w;
d->height = h;
- d->painter->worldMatrix()->scale(vratiow, vratioh);
+ d->painter->tqworldMatrix()->scale(vratiow, vratioh);
}
else
{
@@ -631,10 +631,10 @@ bool KSVGIconEngine::load(int width, int height, const TQString &path)
double ratiow = width / d->width;
double ratioh = height / d->height;
- d->painter->worldMatrix()->scale(ratiow, ratioh);
+ d->painter->tqworldMatrix()->scale(ratiow, ratioh);
}
- TQWMatrix initialMatrix = *d->painter->worldMatrix();
+ TQWMatrix initialMatrix = *d->painter->tqworldMatrix();
d->helper->m_initialMatrix = initialMatrix;
// Apply transform
diff --git a/kdecore/svgicons/ksvgiconpainter.cpp b/kdecore/svgicons/ksvgiconpainter.cpp
index 811dfe918..06d5804f8 100644
--- a/kdecore/svgicons/ksvgiconpainter.cpp
+++ b/kdecore/svgicons/ksvgiconpainter.cpp
@@ -65,7 +65,7 @@ public:
m_useFillGradient = false;
m_useStrokeGradient = false;
- m_worldMatrix = new TQWMatrix();
+ m_tqworldMatrix = new TQWMatrix();
// Create new image with alpha support
m_image = new TQImage(width, height, 32);
@@ -102,7 +102,7 @@ public:
art_free(m_buffer);
delete m_image;
- delete m_worldMatrix;
+ delete m_tqworldMatrix;
for(TQMap<TQString, ArtGradientLinear *>::Iterator it = m_linearGradientMap.begin(); it != m_linearGradientMap.end(); ++it)
{
@@ -185,7 +185,7 @@ public:
m_tempBuffer = 0;
}
- Q_UINT32 toArtColor(const TQColor &color)
+ TQ_UINT32 toArtColor(const TQColor &color)
{
// Convert in a libart suitable form
TQString tempName = color.name();
@@ -211,7 +211,7 @@ public:
return result;
}
- void drawSVP(ArtSVP *svp, Q_UINT32 rgb, int opacity)
+ void drawSVP(ArtSVP *svp, TQ_UINT32 rgb, int opacity)
{
if(!svp)
return;
@@ -233,12 +233,12 @@ public:
void drawBPath(ArtBpath *bpath)
{
double affine[6];
- affine[0] = m_worldMatrix->m11();
- affine[1] = m_worldMatrix->m12();
- affine[2] = m_worldMatrix->m21();
- affine[3] = m_worldMatrix->m22();
- affine[4] = m_worldMatrix->dx();
- affine[5] = m_worldMatrix->dy();
+ affine[0] = m_tqworldMatrix->m11();
+ affine[1] = m_tqworldMatrix->m12();
+ affine[2] = m_tqworldMatrix->m21();
+ affine[3] = m_tqworldMatrix->m22();
+ affine[4] = m_tqworldMatrix->dx();
+ affine[5] = m_tqworldMatrix->dy();
ArtBpath *temp = art_bpath_affine_transform(bpath, affine);
ArtVpath *vec = art_bez_path_to_vec(temp, 0.25);
@@ -249,12 +249,12 @@ public:
void drawVPath(ArtVpath *vec)
{
double affine[6];
- affine[0] = m_worldMatrix->m11();
- affine[1] = m_worldMatrix->m12();
- affine[2] = m_worldMatrix->m21();
- affine[3] = m_worldMatrix->m22();
- affine[4] = m_worldMatrix->dx();
- affine[5] = m_worldMatrix->dy();
+ affine[0] = m_tqworldMatrix->m11();
+ affine[1] = m_tqworldMatrix->m12();
+ affine[2] = m_tqworldMatrix->m21();
+ affine[3] = m_tqworldMatrix->m22();
+ affine[4] = m_tqworldMatrix->dx();
+ affine[5] = m_tqworldMatrix->dy();
ArtVpath *temp = art_vpath_affine_transform(vec, affine);
art_free(vec);
@@ -267,7 +267,7 @@ public:
ArtSVP *svp;
ArtSVP *fillSVP = 0, *strokeSVP = 0;
- Q_UINT32 fillColor = 0, strokeColor = 0;
+ TQ_UINT32 fillColor = 0, strokeColor = 0;
// Filling
{
@@ -461,10 +461,10 @@ public:
m.map(x1, y1, &x1, &y1);
m.map(x2, y2, &x2, &y2);
- double x1n = x1 * m_worldMatrix->m11() + y1 * m_worldMatrix->m21() + m_worldMatrix->dx();
- double y1n = x1 * m_worldMatrix->m12() + y1 * m_worldMatrix->m22() + m_worldMatrix->dy();
- double x2n = x2 * m_worldMatrix->m11() + y2 * m_worldMatrix->m21() + m_worldMatrix->dx();
- double y2n = x2 * m_worldMatrix->m12() + y2 * m_worldMatrix->m22() + m_worldMatrix->dy();
+ double x1n = x1 * m_tqworldMatrix->m11() + y1 * m_tqworldMatrix->m21() + m_tqworldMatrix->dx();
+ double y1n = x1 * m_tqworldMatrix->m12() + y1 * m_tqworldMatrix->m22() + m_tqworldMatrix->dy();
+ double x2n = x2 * m_tqworldMatrix->m11() + y2 * m_tqworldMatrix->m21() + m_tqworldMatrix->dx();
+ double y2n = x2 * m_tqworldMatrix->m12() + y2 * m_tqworldMatrix->m22() + m_tqworldMatrix->dy();
double dx = x2n - x1n;
double dy = y2n - y1n;
@@ -515,12 +515,12 @@ public:
else
fy = cy;
- radial->affine[0] = m_worldMatrix->m11();
- radial->affine[1] = m_worldMatrix->m12();
- radial->affine[2] = m_worldMatrix->m21();
- radial->affine[3] = m_worldMatrix->m22();
- radial->affine[4] = m_worldMatrix->dx();
- radial->affine[5] = m_worldMatrix->dy();
+ radial->affine[0] = m_tqworldMatrix->m11();
+ radial->affine[1] = m_tqworldMatrix->m12();
+ radial->affine[2] = m_tqworldMatrix->m21();
+ radial->affine[3] = m_tqworldMatrix->m22();
+ radial->affine[4] = m_tqworldMatrix->dx();
+ radial->affine[5] = m_tqworldMatrix->dy();
radial->fx = (fx - cx) / r;
radial->fy = (fy - cy) / r;
@@ -674,7 +674,7 @@ public:
{
QRgb *sl = reinterpret_cast<QRgb *>(m_image->scanLine(y));
for(int x = 0; x < m_width; x++)
- sl[x] = qRgba(line[x * 4], line[x * 4 + 1], line[x * 4 + 2], line[x * 4 + 3]);
+ sl[x] = tqRgba(line[x * 4], line[x * 4 + 1], line[x * 4 + 2], line[x * 4 + 3]);
line += m_rowstride;
}
@@ -1123,7 +1123,7 @@ private:
ArtSVP *m_clipSVP;
TQImage *m_image;
- TQWMatrix *m_worldMatrix;
+ TQWMatrix *m_tqworldMatrix;
TQString m_fillRule;
TQString m_joinStyle;
@@ -1211,17 +1211,17 @@ TQImage *KSVGIconPainter::image()
return new TQImage(*d->helper->m_image);
}
-TQWMatrix *KSVGIconPainter::worldMatrix()
+TQWMatrix *KSVGIconPainter::tqworldMatrix()
{
- return d->helper->m_worldMatrix;
+ return d->helper->m_tqworldMatrix;
}
void KSVGIconPainter::setWorldMatrix(TQWMatrix *matrix)
{
- if(d->helper->m_worldMatrix)
- delete d->helper->m_worldMatrix;
+ if(d->helper->m_tqworldMatrix)
+ delete d->helper->m_tqworldMatrix;
- d->helper->m_worldMatrix = matrix;
+ d->helper->m_tqworldMatrix = matrix;
}
void KSVGIconPainter::setStrokeWidth(double width)
@@ -1263,8 +1263,8 @@ void KSVGIconPainter::setStrokeColor(const TQString &stroke)
TQString url = stroke;
- unsigned int start = url.find("#") + 1;
- unsigned int end = url.findRev(")");
+ unsigned int start = url.tqfind("#") + 1;
+ unsigned int end = url.tqfindRev(")");
d->helper->m_strokeGradientReference = url.mid(start, end - start);
}
@@ -1291,8 +1291,8 @@ void KSVGIconPainter::setFillColor(const TQString &fill)
TQString url = fill;
- unsigned int start = url.find("#") + 1;
- unsigned int end = url.findRev(")");
+ unsigned int start = url.tqfind("#") + 1;
+ unsigned int end = url.tqfindRev(")");
d->helper->m_fillGradientReference = url.mid(start, end - start);
}
@@ -1315,7 +1315,7 @@ void KSVGIconPainter::setFillRule(const TQString &fillRule)
d->helper->m_fillRule = fillRule;
}
-Q_UINT32 KSVGIconPainter::parseOpacity(const TQString &data)
+TQ_UINT32 KSVGIconPainter::parseOpacity(const TQString &data)
{
int opacity = 255;
@@ -2310,12 +2310,12 @@ void KSVGIconPainter::drawImage(double x, double y, TQImage &image)
image = image.convertDepth(32);
double affine[6];
- affine[0] = d->helper->m_worldMatrix->m11();
- affine[1] = d->helper->m_worldMatrix->m12();
- affine[2] = d->helper->m_worldMatrix->m21();
- affine[3] = d->helper->m_worldMatrix->m22();
+ affine[0] = d->helper->m_tqworldMatrix->m11();
+ affine[1] = d->helper->m_tqworldMatrix->m12();
+ affine[2] = d->helper->m_tqworldMatrix->m21();
+ affine[3] = d->helper->m_tqworldMatrix->m22();
// use the world matrix to convert the coordinates
- d->helper->m_worldMatrix->map(x, y, &affine[4], &affine[5]);
+ d->helper->m_tqworldMatrix->map(x, y, &affine[4], &affine[5]);
d->helper->art_rgba_rgba_affine(d->helper->m_buffer, 0, 0, d->helper->m_width, d->helper->m_height,
d->helper->m_rowstride, image.bits(), image.width(), image.height(),
@@ -2560,7 +2560,7 @@ TQColor KSVGIconPainter::parseColor(const TQString &param)
return TQColor(245, 255, 250);
else if(rgbColor == "mistyrose")
return TQColor(255, 228, 225);
- else if(rgbColor == "moccasin")
+ else if(rgbColor == "tqmoccasin")
return TQColor(255, 228, 181);
else if(rgbColor == "navajowhite")
return TQColor(255, 222, 173);
@@ -2753,7 +2753,7 @@ void KSVGIconPainter::addRadialGradientElement(ArtGradientRadial *gradient, TQDo
d->helper->m_radialGradientElementMap.insert(gradient, element);
}
-Q_UINT32 KSVGIconPainter::toArtColor(const TQColor &color)
+TQ_UINT32 KSVGIconPainter::toArtColor(const TQColor &color)
{
return d->helper->toArtColor(color);
}
diff --git a/kdecore/svgicons/ksvgiconpainter.h b/kdecore/svgicons/ksvgiconpainter.h
index 9ba44d2cf..6b00d9d7c 100644
--- a/kdecore/svgicons/ksvgiconpainter.h
+++ b/kdecore/svgicons/ksvgiconpainter.h
@@ -41,7 +41,7 @@ public:
TQImage *image();
- TQWMatrix *worldMatrix();
+ TQWMatrix *tqworldMatrix();
void finish();
@@ -61,7 +61,7 @@ public:
void setStrokeDashOffset(const TQString &dashOffset);
void setStrokeDashArray(const TQString &dashes);
- void setWorldMatrix(TQWMatrix *worldMatrix);
+ void setWorldMatrix(TQWMatrix *tqworldMatrix);
void setClippingRect(int x, int y, int w, int h);
void drawRectangle(double x, double y, double w, double h, double rx, double ry);
@@ -73,8 +73,8 @@ public:
void drawImage(double x, double y, TQImage &image);
TQColor parseColor(const TQString &param);
- Q_UINT32 toArtColor(const TQColor &color);
- Q_UINT32 parseOpacity(const TQString &data);
+ TQ_UINT32 toArtColor(const TQColor &color);
+ TQ_UINT32 parseOpacity(const TQString &data);
double toPixel(const TQString &s, bool hmode);
double dpi();
diff --git a/kdecore/tests/kcalendartest.cpp b/kdecore/tests/kcalendartest.cpp
index 51a40b892..8b6e8eea4 100644
--- a/kdecore/tests/kcalendartest.cpp
+++ b/kdecore/tests/kcalendartest.cpp
@@ -67,7 +67,7 @@ int main(int argc, char **argv) {
option = args->getOption("date");
date = KGlobal::locale()->readDate(option);
} else
- date = TQDate::currentDate();
+ date = TQDate::tqcurrentDate();
args->clear(); // Free up some memory.
diff --git a/kdecore/tests/kconfigtestgui.cpp b/kdecore/tests/kconfigtestgui.cpp
index abd476396..af560b496 100644
--- a/kdecore/tests/kconfigtestgui.cpp
+++ b/kdecore/tests/kconfigtestgui.cpp
@@ -121,7 +121,7 @@ KConfigTestView::KConfigTestView( TQWidget *parent, const char *name )
pQuitButton = new TQPushButton( this, "quitbutton" );
pQuitButton->setText( "Quit" );
pQuitButton->setGeometry( 340, 60, 60, 60 );
- connect( pQuitButton, TQT_SIGNAL(clicked()), qApp, TQT_SLOT(quit()) );
+ connect( pQuitButton, TQT_SIGNAL(clicked()), tqApp, TQT_SLOT(quit()) );
// create a default KConfig object in order to be able to start right away
pConfig = new KConfig( TQString::null );
diff --git a/kdecore/tests/kconfigtestgui.h b/kdecore/tests/kconfigtestgui.h
index 8311952b5..7655c8142 100644
--- a/kdecore/tests/kconfigtestgui.h
+++ b/kdecore/tests/kconfigtestgui.h
@@ -39,7 +39,7 @@
// KConfigTestView contains lots of Qt widgets.
//
-class KConfigTestView : public QDialog
+class KConfigTestView : public TQDialog
{
Q_OBJECT
public:
diff --git a/kdecore/tests/kipctest.h b/kdecore/tests/kipctest.h
index a8abd2e76..17122fbd8 100644
--- a/kdecore/tests/kipctest.h
+++ b/kdecore/tests/kipctest.h
@@ -3,7 +3,7 @@
#include <tqobject.h>
-class MyObject: public QObject
+class MyObject: public TQObject
{
Q_OBJECT
public:
diff --git a/kdecore/tests/klocaletest.cpp b/kdecore/tests/klocaletest.cpp
index a980359b0..a81d867b1 100644
--- a/kdecore/tests/klocaletest.cpp
+++ b/kdecore/tests/klocaletest.cpp
@@ -53,7 +53,7 @@ Test::Test( TQWidget *parent, const char *name )
{
setCaption("Testing KLocale");
- TQWidget *d = qApp->desktop();
+ TQWidget *d = tqApp->desktop();
setGeometry((d->width()-320)>>1, (d->height()-160)>>1, 420, 420);
createFields();
@@ -77,19 +77,19 @@ void Test::createFields()
string+="Used language: ";
string+=KGlobal::locale()->language()+"\n";
string+="Locale encoding: ";
- string+=TQString::fromLatin1(KGlobal::locale()->encoding())+"\n";
+ string+=TQString::tqfromLatin1(KGlobal::locale()->encoding())+"\n";
string+="Localized date and time: ";
- string+=KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
+ string+=KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime());
string+="\nLocalized monetary numbers: ";
string+=KGlobal::locale()->formatMoney(1234567.89) + " / \n" +KGlobal::locale()->formatMoney(-1234567.89);
// This will not work
// but you can copy other *.mo file
string+="\nSome localized strings:\n";
- string+=TQString::fromLatin1("Yes = ")+i18n("Yes")+"\n";
- string+=TQString::fromLatin1("No = ")+i18n("No")+"\n";
- string+=TQString::fromLatin1("Help = ")+i18n("Help")+"\n";
- string+=TQString::fromLatin1("Cancel = ")+i18n("Cancel")+"\n";
+ string+=TQString::tqfromLatin1("Yes = ")+i18n("Yes")+"\n";
+ string+=TQString::tqfromLatin1("No = ")+i18n("No")+"\n";
+ string+=TQString::tqfromLatin1("Help = ")+i18n("Help")+"\n";
+ string+=TQString::tqfromLatin1("Cancel = ")+i18n("Cancel")+"\n";
label=new TQLabel(string,this,"Label");
label->setGeometry(10,10,400,400);
@@ -102,9 +102,9 @@ int main( int argc, char ** argv )
KLocale::setMainCatalogue("kdelibs");
KApplication a( argc, argv, "klocaletest" );
- KGlobal::locale()->setLanguage(TQString::fromLatin1("en_US"));
- KGlobal::locale()->setCountry(TQString::fromLatin1("C"));
- KGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(","));
+ KGlobal::locale()->setLanguage(TQString::tqfromLatin1("en_US"));
+ KGlobal::locale()->setCountry(TQString::tqfromLatin1("C"));
+ KGlobal::locale()->setThousandsSeparator(TQString::tqfromLatin1(","));
TQString formatted;
formatted = KGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00");
@@ -152,8 +152,8 @@ int main( int argc, char ** argv )
TQDate date;
date.setYMD( 2002, 5, 3 );
checkDate("readDate( 3, 5, 2002 )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
- date = TQDate::currentDate();
- checkDate("readDate( TQDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
+ date = TQDate::tqcurrentDate();
+ checkDate("readDate( TQDate::tqcurrentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
TQTime time;
time = KGlobal::locale()->readTime( "11:22:33", &ok );
@@ -181,11 +181,11 @@ int main( int argc, char ** argv )
check("formatTime(\"0:22\", as duration)", timeStr, "00:22" );
kdDebug() << "setLanguage C\n";
- KGlobal::locale()->setLanguage(TQString::fromLatin1("C"));
+ KGlobal::locale()->setLanguage(TQString::tqfromLatin1("C"));
kdDebug() << "C: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl;
kdDebug() << "setLanguage de\n";
- KGlobal::locale()->setLanguage(TQString::fromLatin1("de"));
+ KGlobal::locale()->setLanguage(TQString::tqfromLatin1("de"));
kdDebug() << "de: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl;
diff --git a/kdecore/tests/klocaletest.h b/kdecore/tests/klocaletest.h
index f88cfc901..83f4f5cef 100644
--- a/kdecore/tests/klocaletest.h
+++ b/kdecore/tests/klocaletest.h
@@ -9,7 +9,7 @@ class TQLabel;
/** test: a small test program for KLocale
*/
-class Test : public QWidget
+class Test : public TQWidget
{
Q_OBJECT
diff --git a/kdecore/tests/kmdcodectest.cpp b/kdecore/tests/kmdcodectest.cpp
index 243d0d289..e74d6f4b4 100644
--- a/kdecore/tests/kmdcodectest.cpp
+++ b/kdecore/tests/kmdcodectest.cpp
@@ -192,15 +192,15 @@ void MD5_timeTrial ()
time_t endTime;
time_t startTime;
- Q_UINT8 block[TEST_BLOCK_LEN];
- Q_UINT32 i;
+ TQ_UINT8 block[TEST_BLOCK_LEN];
+ TQ_UINT32 i;
cout << "Timing test. Digesting " << TEST_BLOCK_COUNT << " blocks of "
<< TEST_BLOCK_LEN << "-byte..." << endl;
// Initialize block
for (i = 0; i < TEST_BLOCK_LEN; i++)
- block[i] = (Q_UINT8)(i & 0xff);
+ block[i] = (TQ_UINT8)(i & 0xff);
// Start timer
time (&startTime);
diff --git a/kdecore/tests/kprocesstest.h b/kdecore/tests/kprocesstest.h
index 3e5d989ec..23ac443dd 100644
--- a/kdecore/tests/kprocesstest.h
+++ b/kdecore/tests/kprocesstest.h
@@ -15,7 +15,7 @@
#include <tqobject.h>
#include "kprocess.h"
-class Dummy : public QObject
+class Dummy : public TQObject
{
Q_OBJECT
diff --git a/kdecore/tests/kprociotest.h b/kdecore/tests/kprociotest.h
index 6392fc708..9f948e644 100644
--- a/kdecore/tests/kprociotest.h
+++ b/kdecore/tests/kprociotest.h
@@ -15,7 +15,7 @@
#include <tqobject.h>
#include "kprocio.h"
-class Dummy : public QObject
+class Dummy : public TQObject
{
Q_OBJECT
diff --git a/kdecore/tests/kresolvertest.cpp b/kdecore/tests/kresolvertest.cpp
index f1d3c11f9..1b2f5148d 100644
--- a/kdecore/tests/kresolvertest.cpp
+++ b/kdecore/tests/kresolvertest.cpp
@@ -75,8 +75,8 @@ public:
bool tryLookup(const char* node, const char *serv)
{
int error;
- TQString _node = TQString::fromLatin1(node);
- TQString _serv = TQString::fromLatin1(serv);
+ TQString _node = TQString::tqfromLatin1(node);
+ TQString _serv = TQString::tqfromLatin1(serv);
printf("\tTrying to lookup %s|%s... ", node, serv);
TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, 0, &error);
@@ -138,8 +138,8 @@ bool try_pton()
bool tryLookup6(const char *node, const char *serv)
{
int error;
- TQString _node = TQString::fromLatin1(node);
- TQString _serv = TQString::fromLatin1(serv);
+ TQString _node = TQString::tqfromLatin1(node);
+ TQString _serv = TQString::tqfromLatin1(serv);
printf("\tTrying to lookup IPv6 of %s|%s... ", node, serv);
TQPtrList<KAddressInfo> list = KExtendedSocket::lookup(_node, _serv, KExtendedSocket::ipv6Socket, &error);
diff --git a/kdecore/tests/ktimezonestest.cpp b/kdecore/tests/ktimezonestest.cpp
index 650cc0512..69ea7c8a1 100644
--- a/kdecore/tests/ktimezonestest.cpp
+++ b/kdecore/tests/ktimezonestest.cpp
@@ -17,7 +17,7 @@ int main(int argc, char *argv[])
// Find the current offset of the UTC timezone.
timezone = timezones.zone("UTC");
- printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::currentDateTime()) );
+ printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::tqcurrentDateTime()) );
// Find some offsets for Europe/London.
char *london = "Europe/London";