Browse Source

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
tags/v3.5.13
tpearson 8 years ago
parent
commit
f7e71d4771
100 changed files with 321 additions and 319 deletions
  1. +5
    -5
      KDE2PORTING.html
  2. +5
    -5
      KDE3PORTING.html
  3. +1
    -1
      arts/kde/kartsdispatcher.h
  4. +3
    -3
      arts/kde/kartsserver.cpp
  5. +1
    -1
      arts/kde/kartsserver.h
  6. +1
    -1
      arts/kde/kaudioconverter.h
  7. +1
    -1
      arts/kde/kaudiorecordstream.h
  8. +1
    -1
      arts/kde/kconverttest.h
  9. +2
    -2
      arts/kde/kioinputstream_impl.cpp
  10. +4
    -4
      arts/kde/kplayobject.cc
  11. +2
    -2
      arts/kde/kplayobject.h
  12. +1
    -1
      arts/kde/kplayobjectcreator.h
  13. +2
    -2
      arts/kde/kplayobjectfactory.cc
  14. +1
    -1
      arts/kde/kplayobjectfactory_p.h
  15. +9
    -9
      arts/kde/kvideowidget.cpp
  16. +1
    -1
      arts/kde/kvideowidget.h
  17. +7
    -7
      arts/knotify/knotify.cpp
  18. +2
    -2
      dcop/KDE-ICE/ICEmsg.h
  19. +16
    -16
      dcop/client/dcop.cpp
  20. +5
    -5
      dcop/client/dcopfind.cpp
  21. +1
    -1
      dcop/client/dcopstart.cpp
  22. +20
    -20
      dcop/client/marshall.cpp
  23. +62
    -62
      dcop/dcopclient.cpp
  24. +4
    -3
      dcop/dcopclient.h
  25. +1
    -1
      dcop/dcopidl/main.cpp
  26. +2
    -2
      dcop/dcopidl/scanner.cc
  27. +1
    -0
      dcop/dcopidl/scanner.ll
  28. +1
    -1
      dcop/dcopidl/yacc.cc
  29. +1
    -1
      dcop/dcopidl/yacc.yy
  30. +3
    -3
      dcop/dcopidl2cpp/main.cpp
  31. +2
    -2
      dcop/dcopidl2cpp/skel.cpp
  32. +5
    -5
      dcop/dcopidl2cpp/stub.cpp
  33. +1
    -1
      dcop/dcopidl2cpp/stubimpl.cpp
  34. +3
    -3
      dcop/dcopobject.cpp
  35. +4
    -4
      dcop/dcopref.cpp
  36. +1
    -1
      dcop/dcopref.h
  37. +28
    -28
      dcop/dcopserver.cpp
  38. +3
    -3
      dcop/dcopserver.h
  39. +9
    -9
      dcop/dcopsignals.cpp
  40. +6
    -6
      dcop/kdatastream.h
  41. +2
    -2
      dcop/testdcop.h
  42. +1
    -1
      dnssd/domainbrowser.cpp
  43. +1
    -1
      dnssd/domainbrowser.h
  44. +1
    -1
      dnssd/query.h
  45. +2
    -2
      dnssd/remoteservice.cpp
  46. +2
    -2
      dnssd/responder.cpp
  47. +1
    -1
      dnssd/responder.h
  48. +4
    -4
      dnssd/sdevent.h
  49. +4
    -4
      dnssd/servicebase.cpp
  50. +1
    -1
      dnssd/servicebrowser.cpp
  51. +1
    -1
      dnssd/servicebrowser.h
  52. +4
    -4
      interfaces/khexedit/byteseditinterface.h
  53. +1
    -1
      interfaces/khexedit/charcolumninterface.h
  54. +1
    -1
      interfaces/khexedit/clipboardinterface.h
  55. +1
    -1
      interfaces/khexedit/valuecolumninterface.h
  56. +1
    -1
      interfaces/khexedit/zoominterface.h
  57. +1
    -1
      interfaces/kimproxy/interface/kimiface.h
  58. +5
    -5
      interfaces/kimproxy/library/kimproxy.cpp
  59. +2
    -2
      interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
  60. +1
    -1
      interfaces/kmediaplayer/player.h
  61. +1
    -1
      interfaces/kmediaplayer/view.h
  62. +2
    -2
      interfaces/kregexpeditor/kregexpeditorinterface.h
  63. +1
    -1
      interfaces/kscript/scriptinterface.h
  64. +1
    -1
      interfaces/ktexteditor/blockselectioninterface.cpp
  65. +1
    -1
      interfaces/ktexteditor/clipboardinterface.cpp
  66. +1
    -1
      interfaces/ktexteditor/codecompletioninterface.cpp
  67. +2
    -2
      interfaces/ktexteditor/configinterface.cpp
  68. +2
    -2
      interfaces/ktexteditor/configinterfaceextension.cpp
  69. +1
    -1
      interfaces/ktexteditor/configinterfaceextension.h
  70. +1
    -1
      interfaces/ktexteditor/cursorinterface.cpp
  71. +1
    -1
      interfaces/ktexteditor/dynwordwrapinterface.cpp
  72. +1
    -1
      interfaces/ktexteditor/editinterface.cpp
  73. +1
    -1
      interfaces/ktexteditor/editinterfaceext.cpp
  74. +1
    -1
      interfaces/ktexteditor/editinterfaceext.h
  75. +1
    -1
      interfaces/ktexteditor/editor.h
  76. +3
    -3
      interfaces/ktexteditor/editorchooser.cpp
  77. +2
    -2
      interfaces/ktexteditor/editorchooser.h
  78. +3
    -3
      interfaces/ktexteditor/editorchooser_ui.ui
  79. +1
    -1
      interfaces/ktexteditor/encodinginterface.cpp
  80. +1
    -1
      interfaces/ktexteditor/highlightinginterface.cpp
  81. +3
    -3
      interfaces/ktexteditor/ktexteditor.cpp
  82. +1
    -1
      interfaces/ktexteditor/markinterface.cpp
  83. +1
    -1
      interfaces/ktexteditor/markinterfaceextension.cpp
  84. +1
    -1
      interfaces/ktexteditor/plugin.h
  85. +1
    -1
      interfaces/ktexteditor/popupmenuinterface.cpp
  86. +1
    -1
      interfaces/ktexteditor/printinterface.cpp
  87. +1
    -1
      interfaces/ktexteditor/searchinterface.cpp
  88. +2
    -2
      interfaces/ktexteditor/selectioninterface.cpp
  89. +2
    -2
      interfaces/ktexteditor/selectioninterfaceext.cpp
  90. +3
    -3
      interfaces/ktexteditor/sessionconfiginterface.cpp
  91. +2
    -2
      interfaces/ktexteditor/templateinterface.cpp
  92. +1
    -1
      interfaces/ktexteditor/texthintinterface.cpp
  93. +1
    -1
      interfaces/ktexteditor/undointerface.cpp
  94. +1
    -1
      interfaces/ktexteditor/variableinterface.cpp
  95. +1
    -1
      interfaces/ktexteditor/viewcursorinterface.cpp
  96. +1
    -1
      interfaces/ktexteditor/viewstatusmsginterface.cpp
  97. +1
    -1
      interfaces/ktexteditor/wordwrapinterface.cpp
  98. +1
    -1
      interfaces/terminal/kde_terminal_interface.h
  99. +3
    -3
      interfaces/terminal/test/main.cc
  100. +0
    -0
      kab/addressbook.cc

+ 5
- 5
KDE2PORTING.html View File

@@ -18,7 +18,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
<UL>
<LI><A HREF="#gettingstarted">Getting Started</A></LI>
<LI><A HREF="#general">Global changes</A></LI>
<LI><A HREF="#automoc">automoc/am_edit, Makefile.am tags</A></LI>
<LI><A HREF="#autotqmoc">autotqmoc/am_edit, Makefile.am tags</A></LI>
<LI><A HREF="#KApplication">KApplication</A></LI>
<LI><A HREF="#KCmdLineArgs">KCmdLineArgs</A></LI>
<LI><A HREF="#KLocale">KLocale</A></LI>
@@ -95,12 +95,12 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

<H3><A NAME="automoc">automoc/am_edit, Makefile.am tags</A></H3>
<H3><A NAME="autotqmoc">autotqmoc/am_edit, Makefile.am tags</A></H3>

On the subject of the compilation framework, automoc has been removed from
On the subject of the compilation framework, autotqmoc has been removed from
the admin directory. It has been replaced by am_edit which provides a lot of
additional features.<P>
METASOURCES=AUTO still does the job of generating the appropriate moc files,
METASOURCES=AUTO still does the job of generating the appropriate tqmoc files,
but in addition, you should use KDE_ICON for the icons representing the application
(and naming those icons conforming to lo16-app-&lt;appname&gt;.png), and install
the application-specific icons under $(kde_datadir)/&lt;appname&gt;/pics.
@@ -189,7 +189,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
to klocale-&gt;translate with i18n.<P>

The return value of i18n is also no longer a const char*,
but a unicode TQString.<P>
but a tqunicode TQString.<P>

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>


+ 5
- 5
KDE3PORTING.html View File

@@ -647,13 +647,13 @@ For more details please consult the HOWTO file in the kcontrol directory.

<p>The API for Kicker panel applets and extensions has changed. Panels can now be
left/top, center, or right/bottom aligned, and applets and extensions may receive
notification about a change in alignment.
notification about a change in tqalignment.

<H4>KPanelApplet</H4>

<p>The virtual methods orientationChange() and popupDirectionChange() are deprecated.
Instead you should reimplement positionChange() and alignmentChange() to be
notified of changes in the position and alignment of the panel on which your applet
Instead you should reimplement positionChange() and tqalignmentChange() to be
notified of changes in the position and tqalignment of the panel on which your applet
resides. In addition, the popupDirection() method and the Direction enum are
deprecated. Instead you should use the position() method and Position enum. Applets that use
the deprecated methods will still work with KDE 3, but may not compile or work with
@@ -661,8 +661,8 @@ a future version.

<H4>KPanelExtension</H4>

<p>There is a new method alignmentChange() that your extension should reimplement if
it needs to know about changes in alignment.
<p>There is a new method tqalignmentChange() that your extension should reimplement if
it needs to know about changes in tqalignment.

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
<p>

+ 1
- 1
arts/kde/kartsdispatcher.h View File

@@ -61,7 +61,7 @@ namespace Arts
* }
* \endcode
*/
class KDE_EXPORT KArtsDispatcher : public QObject
class KDE_EXPORT KArtsDispatcher : public TQObject
{
Q_OBJECT
public:

+ 3
- 3
arts/kde/kartsserver.cpp View File

@@ -77,12 +77,12 @@ Arts::SoundServerV2 KArtsServer::server(void)

X11CommConfig.sync();
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("kdeinit_wrapper")));
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::tqfromLatin1("kdeinit_wrapper"))).data();

if(rt)
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artswrapper")));
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::tqfromLatin1("artswrapper"))).data();
else
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artsd")));
proc << TQFile::encodeName(KStandardDirs::findExe(TQString::tqfromLatin1("artsd"))).data();

proc << TQStringList::split( " ", config.readEntry( "Arguments", "-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f" ) );


+ 1
- 1
arts/kde/kartsserver.h View File

@@ -34,7 +34,7 @@
* artsd on KDE startup, but at the very least there will always be third
* party PlayObjects that will crash. So, this is necessary.
*/
class KDE_ARTS_EXPORT KArtsServer : public QObject
class KDE_ARTS_EXPORT KArtsServer : public TQObject
{
Q_OBJECT


+ 1
- 1
arts/kde/kaudioconverter.h View File

@@ -29,7 +29,7 @@
class KURL;
class TQString;

class KAudioConverter : public QObject
class KAudioConverter : public TQObject
{
Q_OBJECT
public:

+ 1
- 1
arts/kde/kaudiorecordstream.h View File

@@ -38,7 +38,7 @@ namespace Arts { class StereoEffectStack; }
* @author Matthias Kretz <kretz@kde.org>
* @since 3.2
*/
class KDE_ARTS_EXPORT KAudioRecordStream : public QObject
class KDE_ARTS_EXPORT KAudioRecordStream : public TQObject
{
Q_OBJECT


+ 1
- 1
arts/kde/kconverttest.h View File

@@ -24,7 +24,7 @@

#include <tqobject.h>

class KConvertTest : public QObject
class KConvertTest : public TQObject
{
Q_OBJECT
public:

+ 2
- 2
arts/kde/kioinputstream_impl.cpp View File

@@ -78,7 +78,7 @@ void KIOInputStream_impl::streamStart()
m_job = KIO::get(m_url, false, false);

m_job->addMetaData("accept", "audio/x-mp3, video/mpeg, application/ogg");
m_job->addMetaData("UserAgent", TQString::fromLatin1("aRts/") + TQString::fromLatin1(ARTS_VERSION));
m_job->addMetaData("UserAgent", TQString::tqfromLatin1("aRts/") + TQString::tqfromLatin1(ARTS_VERSION));

TQObject::connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
@@ -213,7 +213,7 @@ void KIOInputStream_impl::processQueue()
void KIOInputStream_impl::request_outdata(DataPacket<mcopbyte> *packet)
{
processQueue();
packet->size = std::min(m_packetSize, m_data.size());
packet->size = std::min(m_packetSize, (unsigned int)m_data.size());
kdDebug( 400 ) << "STREAMING: Filling one DataPacket with " << packet->size << " bytes of the stream!" << endl;

if (!m_finished) {

+ 4
- 4
arts/kde/kplayobject.cc View File

@@ -65,7 +65,7 @@ void KPlayObject::halt()

TQString KPlayObject::description()
{
return TQString::fromLatin1(object().description().c_str());
return TQString::tqfromLatin1(object().description().c_str());
}

Arts::poTime KPlayObject::currentTime()
@@ -85,7 +85,7 @@ Arts::poCapabilities KPlayObject::capabilities()

TQString KPlayObject::mediaName()
{
return TQString::fromLatin1(object().mediaName().c_str());
return TQString::tqfromLatin1(object().mediaName().c_str());
}

Arts::poState KPlayObject::state()
@@ -243,7 +243,7 @@ TQString KDE::PlayObject::description()
{
if ( object().isNull() )
return TQString();
return TQString::fromLatin1(object().description().c_str());
return TQString::tqfromLatin1(object().description().c_str());
}

Arts::poTime KDE::PlayObject::currentTime()
@@ -271,7 +271,7 @@ TQString KDE::PlayObject::mediaName()
{
if ( object().isNull() )
return TQString();
return TQString::fromLatin1(object().mediaName().c_str());
return TQString::tqfromLatin1(object().mediaName().c_str());
}

Arts::poState KDE::PlayObject::state()

+ 2
- 2
arts/kde/kplayobject.h View File

@@ -27,7 +27,7 @@
#include <kurl.h>
#include <tqobject.h>

class KDE_EXPORT KPlayObject : public QObject
class KDE_EXPORT KPlayObject : public TQObject
{
Q_OBJECT
public:
@@ -185,7 +185,7 @@ class PlayObjectFactory;
* internal state until the real Arts::PlayObject got created, afterwards
* the state of the Arts::PlayObject will be returned.
*/
class KDE_EXPORT PlayObject : public QObject
class KDE_EXPORT PlayObject : public TQObject
{
Q_OBJECT
public:

+ 1
- 1
arts/kde/kplayobjectcreator.h View File

@@ -29,7 +29,7 @@

namespace KDE {

class PlayObjectCreator : public QObject
class PlayObjectCreator : public TQObject
{
Q_OBJECT
public:

+ 2
- 2
arts/kde/kplayobjectfactory.cc View File

@@ -155,7 +155,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons
}

// decide if it's a local file. mpeglib provides cdda reading and decoding, so we prefer that over kio_audiocd
if ( url.isLocalFile() || !d->allowStreaming || (url.protocol() == "audiocd" && mimetype == "application/x-cda" && mimeTypes().contains( "application/x-cda" ) ) )
if ( url.isLocalFile() || !d->allowStreaming || (url.protocol() == "audiocd" && mimetype == "application/x-cda" && mimeTypes().tqcontains( "application/x-cda" ) ) )
{
// we rely on the delivered mimetype if it's a local file
d->playObj = new KDE::PlayObject( d->server.createPlayObjectForURL( string( TQFile::encodeName( url.path() ) ), string( mimetype.latin1() ), createBUS ), false );
@@ -202,7 +202,7 @@ TQStringList KDE::PlayObjectFactory::mimeTypes(void)
for(vector<string>::iterator mimetype = mimetypes->begin();
mimetype != mimetypes->end(); ++mimetype)
{
TQString name = TQString::fromLocal8Bit((*mimetype).c_str()).stripWhiteSpace();
TQString name = TQString(TQString::fromLocal8Bit((*mimetype).c_str())).stripWhiteSpace();
if(KMimeType::mimeType(name))
results.append(name);
}

+ 1
- 1
arts/kde/kplayobjectfactory_p.h View File

@@ -29,7 +29,7 @@ namespace KDE
/**
* @internal
*/
class POFHelper : public QObject
class POFHelper : public TQObject
{
friend class PlayObjectFactory;
Q_OBJECT

+ 9
- 9
arts/kde/kvideowidget.cpp View File

@@ -92,8 +92,8 @@ KVideoWidget::KVideoWidget( TQWidget *parent, const char *name, WFlags f )
void KVideoWidget::init(void)
{
setMinimumSize(0, 0);
setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
setFocusPolicy( ClickFocus );
tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
setFocusPolicy( TQ_ClickFocus );

fullscreenWidget = 0;
poVideo = Arts::VideoPlayObject::null();
@@ -102,16 +102,16 @@ void KVideoWidget::init(void)

// Setup actions
new KToggleAction( i18n("Fullscreen &Mode"), "window_fullscreen",
CTRL+SHIFT+Key_F, this, TQT_SLOT(fullscreenActivated()),
CTRL+SHIFT+Key_F, TQT_TQOBJECT(this), TQT_SLOT(fullscreenActivated()),
actionCollection(), "fullscreen_mode" );
new KRadioAction( i18n("&Half Size"), ALT+Key_0,
this, TQT_SLOT(halfSizeActivated()),
TQT_TQOBJECT(this), TQT_SLOT(halfSizeActivated()),
actionCollection(), "half_size" );
new KRadioAction( i18n("&Normal Size"), ALT+Key_1,
this, TQT_SLOT(normalSizeActivated()),
TQT_TQOBJECT(this), TQT_SLOT(normalSizeActivated()),
actionCollection(), "normal_size" );
new KRadioAction( i18n("&Double Size"), ALT+Key_2,
this, TQT_SLOT(doubleSizeActivated()),
TQT_TQOBJECT(this), TQT_SLOT(doubleSizeActivated()),
actionCollection(), "double_size" );

((KToggleAction *)action( "half_size" ))->setExclusiveGroup( "KVideoWidget::zoom" );
@@ -147,7 +147,7 @@ void KVideoWidget::embed( Arts::VideoPlayObject vpo )
}

setBackgroundMode( PaletteBackground );
repaint();
tqrepaint();

// Resize GUI
videoWidth = 0;
@@ -286,7 +286,7 @@ void KVideoWidget::setDoubleSize()
doubleSizeActivated();
}

TQSize KVideoWidget::sizeHint() const
TQSize KVideoWidget::tqsizeHint() const
{
return TQSize( videoWidth, videoHeight );
}
@@ -306,7 +306,7 @@ void KVideoWidget::mousePressEvent( TQMouseEvent *event )
emit mouseButtonPressed( event->button(), pos, event->state() );

// ### Remove in KDE4
if ( event->button() == RightButton )
if ( event->button() == Qt::RightButton )
emit rightButtonPressed( pos );
}


+ 1
- 1
arts/kde/kvideowidget.h View File

@@ -36,7 +36,7 @@ public:
bool isNormalSize();
bool isDoubleSize();

TQSize sizeHint() const;
TQSize tqsizeHint() const;

virtual int heightForWidth ( int w ) const;


+ 7
- 7
arts/knotify/knotify.cpp View File

@@ -351,13 +351,13 @@ void KNotify::notify(const TQString &event, const TQString &fromApp,
if ( !event.isEmpty() ) {

// get config file
if ( d->events.contains( fromApp ) ) {
if ( d->events.tqcontains( fromApp ) ) {
eventsFile = d->events[fromApp];
} else {
eventsFile=new KConfig(locate("data", fromApp+"/eventsrc"),true,false);
d->events.insert( fromApp, eventsFile );
}
if ( d->configs.contains( fromApp) ) {
if ( d->configs.tqcontains( fromApp) ) {
configFile = d->configs[fromApp];
} else {
configFile=new KConfig(fromApp+".eventsrc",true,false);
@@ -550,7 +550,7 @@ bool KNotify::notifyBySound( const TQString &sound, const TQString &appname, int
return false; // Skip
}
proc->clearArguments();
(*proc) << d->externalPlayer << TQFile::encodeName( soundFile );
(*proc) << d->externalPlayer << TQFile::encodeName( soundFile ).data();
d->externalPlayerEventId = eventId;
proc->start(KProcess::NotifyOnExit);
return true;
@@ -642,7 +642,7 @@ bool KNotify::notifyByLogfile(const TQString &text, const TQString &file)

// append msg
TQTextStream strm( &logFile );
strm << "- KNotify " << TQDateTime::currentDateTime().toString() << ": ";
strm << "- KNotify " << TQDateTime::tqcurrentDateTime().toString() << ": ";
strm << text << endl;

// close file
@@ -660,7 +660,7 @@ bool KNotify::notifyByStderr(const TQString &text)
TQTextStream strm( stderr, IO_WriteOnly );

// output msg
strm << "KNotify " << TQDateTime::currentDateTime().toString() << ": ";
strm << "KNotify " << TQDateTime::tqcurrentDateTime().toString() << ": ";
strm << text << endl;

return true;
@@ -695,7 +695,7 @@ void KNotify::playTimeout()
++it;
if ( (*current)->state() != Arts::posPlaying )
{
TQMap<KDE::PlayObject*,int>::Iterator eit = d->playObjectEventMap.find( *current );
TQMap<KDE::PlayObject*,int>::Iterator eit = d->playObjectEventMap.tqfind( *current );
if ( eit != d->playObjectEventMap.end() )
{
soundFinished( *eit, PlayedOK );
@@ -730,7 +730,7 @@ void KNotify::slotPlayerProcessExited( KProcess *proc )
void KNotify::abortFirstPlayObject()
{
#ifndef WITHOUT_ARTS
TQMap<KDE::PlayObject*,int>::Iterator it = d->playObjectEventMap.find( d->playObjects.getFirst() );
TQMap<KDE::PlayObject*,int>::Iterator it = d->playObjectEventMap.tqfind( d->playObjects.getFirst() );
if ( it != d->playObjectEventMap.end() )
{
soundFinished( it.data(), Aborted );

+ 2
- 2
dcop/KDE-ICE/ICEmsg.h View File

@@ -221,7 +221,7 @@ extern void _IceErrorBadValue (


/*
* Write pad bytes. Used to force 32 or 64 bit alignment.
* Write pad bytes. Used to force 32 or 64 bit tqalignment.
* A maxium of 7 pad bytes can be specified.
*/

@@ -306,7 +306,7 @@ extern void _IceErrorBadValue (


/*
* Read pad bytes (for 32 or 64 bit alignment).
* Read pad bytes (for 32 or 64 bit tqalignment).
* A maxium of 7 pad bytes can be specified.
*/


+ 16
- 16
dcop/client/dcop.cpp View File

@@ -158,9 +158,9 @@ void queryFunctions( const char* app, const char* obj )

int callFunction( const char* app, const char* obj, const char* func, const QCStringList args )
{
TQString f = func; // Qt is better with unicode strings, so use one.
int left = f.find( '(' );
int right = f.find( ')' );
TQString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int right = f.tqfind( ')' );

if ( right < left )
{
@@ -181,12 +181,12 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
return( 1 );
}
for ( QCStringList::Iterator it = funcs.begin(); it != funcs.end(); ++it ) {
int l = (*it).find( '(' );
int l = (*it).tqfind( '(' );
int s;
if (l > 0)
s = (*it).findRev( ' ', l);
s = (*it).tqfindRev( ' ', l);
else
s = (*it).find( ' ' );
s = (*it).tqfind( ' ' );

if ( s < 0 )
s = 0;
@@ -195,8 +195,8 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt

if ( l > 0 && (*it).mid( s, l - s ) == func ) {
realfunc = (*it).mid( s );
const TQString arguments = (*it).mid(l+1,(*it).find( ')' )-l-1);
uint a = arguments.contains(',');
const TQString arguments = (*it).mid(l+1,(*it).tqfind( ')' )-l-1);
uint a = arguments.tqcontains(',');
if ( (a==0 && !arguments.isEmpty()) || a>0)
a++;
if ( a == args.count() )
@@ -209,8 +209,8 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
return( 1 );
}
f = realfunc;
left = f.find( '(' );
right = f.find( ')' );
left = f.tqfind( '(' );
right = f.tqfind( ')' );
}

doit:
@@ -230,7 +230,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
TQString lt = (*it).simplifyWhiteSpace();

int s = lt.find(' ');
int s = lt.tqfind(' ');

// If there are spaces in the name, there may be two
// reasons: the parameter name is still there, ie.
@@ -250,7 +250,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
//
s=1;

while (s < static_cast<int>(partl.count()) && intTypes.contains(partl[s]))
while (s < static_cast<int>(partl.count()) && intTypes.tqcontains(partl[s]))
{
s++;
}
@@ -464,9 +464,9 @@ int runDCOP( QCStringList args, UserList users, Session session,
QCStringList params;
DCOPClient *client = 0L;
int retval = 0;
if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 )
{
int delimPos = args[ 0 ].findRev( ',' );
int delimPos = args[ 0 ].tqfindRev( ',' );
if( delimPos == -1 )
{
cerr_ << "Error: '" << args[ 0 ]
@@ -569,7 +569,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
}
else if( !sessionName.isEmpty() )
{
if( sessions.contains( sessionName ) )
if( sessions.tqcontains( sessionName ) )
{
sessions.clear();
sessions.append( sessionName );
@@ -861,7 +861,7 @@ int main( int argc, char** argv )
if (prog[prog.length()-1] != '*')
{
// Strip a trailing -<PID> part.
int i = prog.findRev('-');
int i = prog.tqfindRev('-');
if ((i >= 0) && prog.mid(i+1).toLong())
{
prog = prog.left(i);

+ 5
- 5
dcop/client/dcopfind.cpp View File

@@ -40,9 +40,9 @@ static bool bLaunchApp = 0;

bool findObject( const char* app, const char* obj, const char* func, QCStringList args )
{
TQString f = func; // Qt is better with unicode strings, so use one.
int left = f.find( '(' );
int right = f.find( ')' );
TQString f = func; // Qt is better with tqunicode strings, so use one.
int left = f.tqfind( '(' );
int right = f.tqfind( ')' );

if ( right < left )
{
@@ -66,7 +66,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) {
TQString lt = (*it).simplifyWhiteSpace();

int s = lt.find(' ');
int s = lt.tqfind(' ');

// If there are spaces in the name, there may be two
// reasons: the parameter name is still there, ie.
@@ -86,7 +86,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
//
s=1;

while (s < (int)partl.count() && intTypes.contains(partl[s]))
while (s < (int)partl.count() && intTypes.tqcontains(partl[s]))
{
s++;
}

+ 1
- 1
dcop/client/dcopstart.cpp View File

@@ -33,7 +33,7 @@ static DCOPClient* dcop = 0;
void startApp(const char *_app, int argc, const char **args)
{
const char *function = 0;
TQString app = TQString::fromLatin1(_app);
TQString app = TQString::tqfromLatin1(_app);
if (app.endsWith(".desktop"))
function = "start_service_by_desktop_path(TQString,TQStringList)";
else

+ 20
- 20
dcop/client/marshall.cpp View File

@@ -102,12 +102,12 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
{
TQCString result;

if ( type == "int" || type == "Q_INT32" )
if ( type == "int" || type == "TQ_INT32" )
{
int i;
stream >> i;
result.setNum( i );
} else if ( type == "uint" || type == "Q_UINT32" || type == "unsigned int" )
} else if ( type == "uint" || type == "TQ_UINT32" || type == "unsigned int" )
{
uint i;
stream >> i;
@@ -132,12 +132,12 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
double d;
stream >> d;
result.setNum( d, 'f' );
} else if ( type == "Q_INT64" ) {
Q_INT64 i;
} else if ( type == "TQ_INT64" ) {
TQ_INT64 i;
stream >> i;
result.sprintf( "%lld", i );
} else if ( type == "Q_UINT64" ) {
Q_UINT64 i;
} else if ( type == "TQ_UINT64" ) {
TQ_UINT64 i;
stream >> i;
result.sprintf( "%llu", i );
} else if ( type == "bool" )
@@ -163,7 +163,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
{
TQColor c;
stream >> c;
result = c.name().local8Bit();
result = TQString(c.name()).local8Bit();
} else if ( type == "TQSize" )
{
TQSize s;
@@ -190,7 +190,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
result.sprintf( "%dx%d+%d+%d", r.width(), r.height(), r.x(), r.y() );
} else if ( type == "TQVariant" )
{
Q_INT32 type;
TQ_INT32 type;
stream >> type;
return demarshal( stream, TQVariant::typeToName( (TQVariant::Type)type ) );
} else if ( type == "DCOPRef" )
@@ -205,7 +205,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
result = r.url().local8Bit();
} else if ( type.left( 11 ) == "TQValueList<" )
{
if ( (uint)type.find( '>', 11 ) != type.length() - 1 )
if ( (uint)type.tqfind( '>', 11 ) != type.length() - 1 )
return result;

TQString nestedType = type.mid( 11, type.length() - 12 );
@@ -213,10 +213,10 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
if ( nestedType.isEmpty() )
return result;

Q_UINT32 count;
TQ_UINT32 count;
stream >> count;

Q_UINT32 i = 0;
TQ_UINT32 i = 0;
for (; i < count; ++i )
{
TQCString arg = demarshal( stream, nestedType );
@@ -227,21 +227,21 @@ TQCString demarshal( TQDataStream &stream, const TQString &type )
}
} else if ( type.left( 5 ) == "TQMap<" )
{
int commaPos = type.find( ',', 5 );
int commaPos = type.tqfind( ',', 5 );

if ( commaPos == -1 )
return result;

if ( (uint)type.find( '>', commaPos ) != type.length() - 1 )
if ( (uint)type.tqfind( '>', commaPos ) != type.length() - 1 )
return result;

TQString keyType = type.mid( 5, commaPos - 5 );
TQString valueType = type.mid( commaPos + 1, type.length() - commaPos - 2 );

Q_UINT32 count;
TQ_UINT32 count;
stream >> count;

Q_UINT32 i = 0;
TQ_UINT32 i = 0;
for (; i < count; ++i )
{
TQCString key = demarshal( stream, keyType );
@@ -291,15 +291,15 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
arg << s.toUInt();
else if ( type == "unsigned int" )
arg << s.toUInt();
else if ( type == "Q_INT32" )
else if ( type == "TQ_INT32" )
arg << s.toInt();
else if ( type == "Q_INT64" ) {
else if ( type == "TQ_INT64" ) {
TQVariant qv = TQVariant( s );
arg << qv.toLongLong();
}
else if ( type == "Q_UINT32" )
else if ( type == "TQ_UINT32" )
arg << s.toUInt();
else if ( type == "Q_UINT64" ) {
else if ( type == "TQ_UINT64" ) {
TQVariant qv = TQVariant( s );
arg << qv.toULongLong();
}
@@ -376,7 +376,7 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
marshall( dummy_arg, args, j, type );
count++;
}
arg << (Q_UINT32) count;
arg << (TQ_UINT32) count;
// Parse the list for real
while (true) {
if( i > args.count() )

+ 62
- 62
dcop/dcopclient.cpp View File

@@ -97,13 +97,13 @@ client_map_t *cliMap()

DCOPClient *DCOPClient::findLocalClient( const TQCString &_appId )
{
return cliMap()->find(_appId.data());
return cliMap()->tqfind(_appId.data());
}

static
void registerLocalClient( const TQCString &_appId, DCOPClient *client )
{
cliMap()->replace(_appId.data(), client);
cliMap()->tqreplace(_appId.data(), client);
}

static
@@ -141,7 +141,7 @@ public:
TQCString* replyType;
TQByteArray* replyData;
int replyId;
Q_INT32 transactionId;
TQ_INT32 transactionId;
TQCString calledApp;
TQGuardedPtr<TQObject> replyObject;
TQCString replySlot;
@@ -173,7 +173,7 @@ public:
TQCString defaultObject;
TQPtrList<DCOPClientTransaction> *transactionList;
bool transaction;
Q_INT32 transactionId;
TQ_INT32 transactionId;
int opcode;

// Special key values:
@@ -205,7 +205,7 @@ public:
class DCOPClientTransaction
{
public:
Q_INT32 id;
TQ_INT32 id;
CARD32 key;
TQCString senderId;
};
@@ -263,12 +263,12 @@ static TQCString dcopServerFile(const TQCString &hostname, bool old)
disp = "NODISPLAY";

int i;
if((i = disp.findRev('.')) > disp.findRev(KPATH_SEPARATOR) && i >= 0)
if((i = disp.tqfindRev('.')) > disp.tqfindRev(KPATH_SEPARATOR) && i >= 0)
disp.truncate(i);

if (!old)
{
while( (i = disp.find(KPATH_SEPARATOR)) >= 0)
while( (i = disp.tqfind(KPATH_SEPARATOR)) >= 0)
disp[i] = '_';
}

@@ -382,7 +382,7 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
case DCOPReplyWait:
if ( replyStruct ) {
TQCString calledApp, app;
Q_INT32 id;
TQ_INT32 id;
TQDataStream ds( dataReceived, IO_ReadOnly );
ds >> calledApp >> app >> id;
replyStruct->transactionId = id;
@@ -398,7 +398,7 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
{
TQDataStream ds( dataReceived, IO_ReadOnly );
TQCString calledApp, app;
Q_INT32 id;
TQ_INT32 id;

ds >> calledApp >> app >> id;
if (replyStruct && (id == replyStruct->transactionId) && (calledApp == replyStruct->calledApp))
@@ -531,7 +531,7 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const TQ
TQByteArray reply;
TQDataStream replyStream( reply, IO_WriteOnly );

Q_INT32 id = c->transactionId();
TQ_INT32 id = c->transactionId();
if (id) {
// Call delayed. Send back the transaction ID.
replyStream << d->appId << fromApp << id;
@@ -672,9 +672,9 @@ bool DCOPClient::attach()

void DCOPClient::bindToApp()
{
// check if we have a qApp instantiated. If we do,
// check if we have a tqApp instantiated. If we do,
// we can create a TQSocketNotifier and use it for receiving data.
if (qApp) {
if (tqApp) {
if ( d->notifier )
delete d->notifier;
d->notifier = new TQSocketNotifier(socket(),
@@ -690,7 +690,7 @@ void DCOPClient::suspend()
if (!d->notifier)
return;
#endif
assert(d->notifier); // Suspending makes no sense if we didn't had a qApp yet
assert(d->notifier); // Suspending makes no sense if we didn't had a tqApp yet
d->notifier->setEnabled(false);
}

@@ -764,7 +764,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
DCOPAuthCount,
const_cast<char **>(DCOPAuthNames),
DCOPClientAuthProcs, 0L)) < 0) {
emit attachFailed(TQString::fromLatin1( "Communications could not be established." ));
emit attachFailed(TQString::tqfromLatin1( "Communications could not be established." ));
return false;
}

@@ -779,7 +779,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
TQCString fName = dcopServerFile();
TQFile f(TQFile::decodeName(fName));
if (!f.open(IO_ReadOnly)) {
emit attachFailed(TQString::fromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName));
emit attachFailed(TQString::tqfromLatin1( "Could not read network connection list.\n" )+TQFile::decodeName(fName));
return false;
}
int size = QMIN( (qint64)1024, f.size() ); // protection against a huge file
@@ -790,7 +790,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
// Should we abort ?
}
contents[size] = '\0';
int pos = contents.find('\n');
int pos = contents.tqfind('\n');
if ( pos == -1 ) // Shouldn't happen
{
qDebug("Only one line in dcopserver file !: %s", contents.data());
@@ -819,7 +819,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
emit attachFailed(TQString::fromLatin1( errBuf ));
emit attachFailed(TQString::tqfromLatin1( errBuf ));
return false;
}
fcntl(socket(), F_SETFL, FD_CLOEXEC);
@@ -845,7 +845,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
emit attachFailed(TQString::fromLatin1( errBuf ));
emit attachFailed(TQString::tqfromLatin1( errBuf ));
return false;
} else if (setupstat == IceProtocolAlreadyActive) {
if (bClearServerAddr) {
@@ -853,7 +853,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
d->serverAddr = 0;
}
/* should not happen because 3rd arg to IceOpenConnection was 0. */
emit attachFailed(TQString::fromLatin1( "internal error in IceOpenConnection" ));
emit attachFailed(TQString::tqfromLatin1( "internal error in IceOpenConnection" ));
return false;
}

@@ -863,7 +863,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
delete [] d->serverAddr;
d->serverAddr = 0;
}
emit attachFailed(TQString::fromLatin1( "DCOP server did not accept the connection." ));
emit attachFailed(TQString::tqfromLatin1( "DCOP server did not accept the connection." ));
return false;
}

@@ -1017,7 +1017,7 @@ TQCString DCOPClient::normalizeFunctionSignature( const TQCString& fun ) {
if ( fun.isEmpty() ) // nothing to do
return fun.copy();
TQCString result( fun.size() );
char *from = fun.data();
char *from = const_cast<TQCString&>(fun).data();
char *to = result.data();
char *first = to;
char last = 0;
@@ -1056,7 +1056,7 @@ bool DCOPClient::send(const TQCString &remApp, const TQCString &remObjId,

if ( localClient ) {
bool saveTransaction = d->transaction;
Q_INT32 saveTransactionId = d->transactionId;
TQ_INT32 saveTransactionId = d->transactionId;
TQCString saveSenderId = d->senderId;

d->senderId = 0; // Local call
@@ -1167,13 +1167,13 @@ bool DCOPClient::findObject(const TQCString &remApp, const TQCString &remObj,
if ( (phase == 1) && localClient ) {
// In phase 1 we do all local clients
bool saveTransaction = d->transaction;
Q_INT32 saveTransactionId = d->transactionId;
TQ_INT32 saveTransactionId = d->transactionId;
TQCString saveSenderId = d->senderId;

d->senderId = 0; // Local call
result = localClient->find( remApp, remObj, remFun, data, replyType, replyData );

Q_INT32 id = localClient->transactionId();
TQ_INT32 id = localClient->transactionId();
if (id) {
// Call delayed. We have to wait till it has been processed.
do {
@@ -1298,7 +1298,7 @@ void DCOPClient::setNotifications(bool enabled)
{
TQByteArray data;
TQDataStream ds(data, IO_WriteOnly);
ds << static_cast<Q_INT8>(enabled);
ds << static_cast<TQ_INT8>(enabled);

TQCString replyType;
TQByteArray reply;
@@ -1310,7 +1310,7 @@ void DCOPClient::setDaemonMode( bool daemonMode )
{
TQByteArray data;
TQDataStream ds(data, IO_WriteOnly);
ds << static_cast<Q_INT8>( daemonMode );
ds << static_cast<TQ_INT8>( daemonMode );

TQCString replyType;
TQByteArray reply;
@@ -1331,9 +1331,9 @@ static void fillQtObjects( QCStringList& l, TQObject* o, TQCString path )
path += '/';

int unnamed = 0;
const TQObjectList *list = o ? o->tqchildren() : TQObject::objectTrees();
if ( list ) {
TQObjectListIt it( *list );
const TQObjectList list = o ? o->childrenListObject() : TQObject::objectTreesListObject();
if ( !list.isEmpty() ) {
TQObjectListIt it( list );
TQObject *obj;
while ( (obj=it.current()) ) {
++it;
@@ -1341,11 +1341,11 @@ static void fillQtObjects( QCStringList& l, TQObject* o, TQCString path )
if ( n == "unnamed" || n.isEmpty() )
{
n.sprintf("%p", (void *) obj);
n = TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(TQString(n)).latin1();
n = TQString(TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(TQString(n))).latin1();
}
TQCString fn = path + n;
l.append( fn );
if ( obj->tqchildren() )
if ( !obj->childrenListObject().isEmpty() )
fillQtObjects( l, obj, fn );
}
}
@@ -1368,9 +1368,9 @@ static void fillQtObjectsEx( TQValueList<O>& l, TQObject* o, TQCString path )
path += '/';

int unnamed = 0;
const TQObjectList *list = o ? o->tqchildren() : TQObject::objectTrees();
if ( list ) {
TQObjectListIt it( *list );
const TQObjectList list = o ? o->childrenListObject() : TQObject::objectTreesListObject();
if ( !list.isEmpty() ) {
TQObjectListIt it( list );
TQObject *obj;
while ( (obj=it.current()) ) {
++it;
@@ -1378,11 +1378,11 @@ static void fillQtObjectsEx( TQValueList<O>& l, TQObject* o, TQCString path )
if ( n == "unnamed" || n.isEmpty() )
{
n.sprintf("%p", (void *) obj);
n = TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(TQString(n)).latin1();
n = TQString(TQString("unnamed%1(%2, %3)").arg(++unnamed).arg(obj->className()).arg(TQString(n))).latin1();
}
TQCString fn = path + n;
l.append( O( fn, obj ) );
if ( obj->tqchildren() )
if ( !obj->childrenListObject().isEmpty() )
fillQtObjectsEx( l, obj, fn );
}
}
@@ -1399,7 +1399,7 @@ static TQObject* findQtObject( TQCString id )
for ( TQValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) {
if ( (*it).s == id ) // exact match
return (*it).o;
if ( !firstContains && (*it).s.contains( expr ) ) {
if ( !firstContains && (*it).s.tqcontains( expr ) ) {
firstContains = (*it).o;
}
}
@@ -1413,7 +1413,7 @@ static QCStringList findQtObjects( TQCString id )
fillQtObjectsEx( l, 0, "qt" );
QCStringList result;
for ( TQValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) {
if ( (*it).s.contains( expr ) )
if ( (*it).s.tqcontains( expr ) )
result << (*it).s;
}
return result;
@@ -1470,10 +1470,10 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const
l << "QCStringList properties()";
l << "bool setProperty(TQCString,TQVariant)";
l << "TQVariant property(TQCString)";
TQStrList lst = o->metaObject()->slotNames( true );
TQStrList lst = o->tqmetaObject()->slotNames( true );
int i = 0;
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
if ( o->metaObject()->slot( i++, true )->tqaccess != QMetaData::Public )
if ( o->tqmetaObject()->slot( i++, true )->tqt_mo_access != TQMetaData::Public )
continue;
TQCString slot = it.current();
if ( slot.contains( "()" ) ) {
@@ -1487,10 +1487,10 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const
replyType = "QCStringList";
TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
TQMetaObject *meta = o->metaObject();
TQMetaObject *meta = o->tqmetaObject();
while ( meta ) {
l.prepend( meta->className() );
meta = meta->superClass();
meta = meta->tqsuperClass();
}
reply << l;
return true;
@@ -1498,10 +1498,10 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const
replyType = "QCStringList";
TQDataStream reply( replyData, IO_WriteOnly );
QCStringList l;
TQStrList lst = o->metaObject()->propertyNames( true );
TQStrList lst = o->tqmetaObject()->propertyNames( true );
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
TQMetaObject *mo = o->metaObject();
const TQMetaProperty* p = mo->property( mo->findProperty( it.current(), true ), true );
TQMetaObject *mo = o->tqmetaObject();
const TQMetaProperty* p = mo->property( mo->tqfindProperty( it.current(), true ), true );
if ( !p )
continue;
TQCString prop = p->type();
@@ -1529,13 +1529,13 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const
ds >> name >> value;
replyType = "bool";
TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8) o->setProperty( name, value );
reply << (TQ_INT8) o->setProperty( name, value );
return true;
} else {
int slot = o->metaObject()->findSlot( fun, true );
int slot = o->tqmetaObject()->tqfindSlot( fun, true );
if ( slot != -1 ) {
replyType = "void";
QUObject uo[ 1 ];
TQUObject uo[ 1 ];
o->qt_invoke( slot, uo );
return true;
}
@@ -1656,7 +1656,7 @@ bool DCOPClient::receive(const TQCString &/*app*/, const TQCString &objId,
// return true. Return false otherwise.
static bool findResultOk(TQCString &replyType, TQByteArray &replyData)
{
Q_INT8 success; // Tsk.. why is there no operator>>(bool)?
TQ_INT8 success; // Tsk.. why is there no operator>>(bool)?
if (replyType != "bool") return false;

TQDataStream reply( replyData, IO_ReadOnly );
@@ -1746,13 +1746,13 @@ bool DCOPClient::call(const TQCString &remApp, const TQCString &remObjId,

if ( localClient ) {
bool saveTransaction = d->transaction;
Q_INT32 saveTransactionId = d->transactionId;
TQ_INT32 saveTransactionId = d->transactionId;
TQCString saveSenderId = d->senderId;

d->senderId = 0; // Local call
bool b = localClient->receive( remApp, remObjId, remFun, data, replyType, replyData );
Q_INT32 id = localClient->transactionId();
TQ_INT32 id = localClient->transactionId();
if (id) {
// Call delayed. We have to wait till it has been processed.
do {
@@ -1882,7 +1882,7 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId
for(;;) {
bool checkMessages = true;
if ( useEventLoop
? d->notifier != NULL // useEventLoop needs a socket notifier and a qApp
? d->notifier != NULL // useEventLoop needs a socket notifier and a tqApp
: timeout >= 0 ) { // !useEventLoop doesn't block only for timeout >= 0
const int guiTimeout = 100;
checkMessages = false;
@@ -1907,7 +1907,7 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId
}
if( timeout >= 0 )
d->eventLoopTimer.start(time_left - guiTimeout, true);
qApp->enter_loop();
tqApp->enter_loop();
d->eventLoopTimer.stop();
if ( !old_lock ) {
d->non_blocking_call_lock = false;
@@ -1974,7 +1974,7 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId

// Wake up parent call, maybe it's reply is available already.
if ( d->non_blocking_call_lock ) {
qApp->exit_loop();
tqApp->exit_loop();
}

d->currentKey = oldCurrentKey;
@@ -1983,7 +1983,7 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId

void DCOPClient::eventLoopTimeout()
{
qApp->exit_loop();
tqApp->exit_loop();
}

void DCOPClient::processSocketData(int fd)
@@ -2000,8 +2000,8 @@ void DCOPClient::processSocketData(int fd)
return;

if ( d->non_blocking_call_lock ) {
if( qApp )
qApp->exit_loop();
if( tqApp )
tqApp->exit_loop();
return;
}

@@ -2034,7 +2034,7 @@ TQCString DCOPClient::defaultObject() const
}

bool
DCOPClient::isLocalTransactionFinished(Q_INT32 id, TQCString &replyType, TQByteArray &replyData)
DCOPClient::isLocalTransactionFinished(TQ_INT32 id, TQCString &replyType, TQByteArray &replyData)
{
DCOPClientPrivate::LocalTransactionResult *result = d->localTransActionList.take(id);
if (!result)
@@ -2068,7 +2068,7 @@ DCOPClient::beginTransaction()
return trans;
}

Q_INT32
TQ_INT32
DCOPClient::transactionId() const
{
if (d->transaction)
@@ -2147,7 +2147,7 @@ DCOPClient::connectDCOPSignal( const TQCString &sender, const TQCString &senderO
{
TQCString replyType;
TQByteArray data, replyData;
Q_INT8 iVolatile = Volatile ? 1 : 0;
TQ_INT8 iVolatile = Volatile ? 1 : 0;

TQDataStream args(data, IO_WriteOnly );
args << sender << senderObj << normalizeFunctionSignature(signal) << receiverObj << normalizeFunctionSignature(slot) << iVolatile;
@@ -2163,7 +2163,7 @@ DCOPClient::connectDCOPSignal( const TQCString &sender, const TQCString &senderO
return false;

TQDataStream reply(replyData, IO_ReadOnly );
Q_INT8 result;
TQ_INT8 result;
reply >> result;
return (result != 0);
}
@@ -2197,7 +2197,7 @@ DCOPClient::disconnectDCOPSignal( const TQCString &sender, const TQCString &send
return false;

TQDataStream reply(replyData, IO_ReadOnly );
Q_INT8 result;
TQ_INT8 result;
reply >> result;
return (result != 0);
}

+ 4
- 3
dcop/dcopclient.h View File

@@ -65,9 +65,10 @@ typedef TQValueList<TQCString> QCStringList;
* @see KApplication::dcopClient()
* @author Preston Brown <pbrown@kde.org>, Matthias Ettrich <ettrich@kde.org>
*/
class DCOP_EXPORT DCOPClient : public QObject
class DCOP_EXPORT DCOPClient : public TQObject
{
Q_OBJECT
TQ_OBJECT

public:
/**
@@ -511,7 +512,7 @@ class DCOP_EXPORT DCOPClient : public QObject
* @see process()
* @see beginTransaction()
*/
Q_INT32 transactionId() const;
TQ_INT32 transactionId() const;

/**
* Checks whether @p remApp is registered with the DCOP server.
@@ -816,7 +817,7 @@ public:

private:

bool isLocalTransactionFinished(Q_INT32 id, TQCString &replyType, TQByteArray &replyData);
bool isLocalTransactionFinished(TQ_INT32 id, TQCString &replyType, TQByteArray &replyData);

bool attachInternal( bool registerAsAnonymous = true );


+ 1
- 1
dcop/dcopidl/main.cpp View File

@@ -47,7 +47,7 @@ int main( int argc, char** argv )
return -1;
}

TQByteArray arr = file.readAll();
TQByteArray arr = TQByteArray(file.readAll());
uint len = arr.size();
uint j = 1;
for (uint i = 1; i<len; i++, j++) {

+ 2
- 2
dcop/dcopidl/scanner.cc View File

@@ -1226,8 +1226,8 @@ YY_RULE_SETUP
#line 170 "scanner.ll"
{
TQString s( yytext );
int i = s.find(TQRegExp("[\"<]"))+1;
int j = s.find(TQRegExp("[\">]"), i);
int i = s.tqfind(TQRegExp("[\"<]"))+1;
int j = s.tqfind(TQRegExp("[\">]"), i);
yylval._str = new TQString( s.mid( i, j - i ) );
idl_line_no++;
return T_INCLUDE;

+ 1
- 0
dcop/dcopidl/scanner.ll View File

@@ -236,6 +236,7 @@ FALSE return T_FALSE;
typedef return T_TYPEDEF;
K_DCOP return T_DCOP;
Q_OBJECT ;
TQ_OBJECT ;
("0"|"0L") return T_NULL;
"extern "[A-Za-z0-9_ \t*]+ return T_EXTERN;
"extern \"C\"" return T_EXTERN_C;

+ 1
- 1
dcop/dcopidl/yacc.cc View File

@@ -1643,7 +1643,7 @@ yyreduce:
case 15:
#line 221 "yacc.yy"
{
int pos = in_namespace.findRev( "::", -3 );
int pos = in_namespace.tqfindRev( "::", -3 );
if( pos >= 0 )
in_namespace = in_namespace.left( pos + 2 );
else

+ 1
- 1
dcop/dcopidl/yacc.yy View File

@@ -219,7 +219,7 @@ declaration
}
main T_RIGHT_CURLY_BRACKET opt_semicolon
{
int pos = in_namespace.findRev( "::", -3 );
int pos = in_namespace.tqfindRev( "::", -3 );
if( pos >= 0 )
in_namespace = in_namespace.left( pos + 2 );
else

+ 3
- 3
dcop/dcopidl2cpp/main.cpp View File

@@ -104,11 +104,11 @@ int main( int argc, char** argv )
TQString base( argv[argpos] );
TQString idl = base;

int pos = base.findRev( '.' );
int pos = base.tqfindRev( '.' );
if ( pos != -1 )
base = base.left( pos );

pos = idl.findRev('/');
pos = idl.tqfindRev('/');
if ( pos != -1 )
idl = idl.mid( pos+1 );

@@ -118,7 +118,7 @@ int main( int argc, char** argv )
if ( generate_stub ) {
TQString header = base;
generateStub( idl, header + "_stub.h", de );
pos = header.findRev('/');
pos = header.tqfindRev('/');
if ( pos != -1 )
header = header.mid( pos+1 );
generateStubImpl( idl, header + "_stub.h", base+".h", base + "_stub." + suffix, de);

+ 2
- 2
dcop/dcopidl2cpp/skel.cpp View File

@@ -177,7 +177,7 @@ void generateSkel( const TQString& idl, const TQString& filename, TQDomElement d
TQString namespace_tmp = className;
str << endl;
for(;;) {
int pos = namespace_tmp.find( "::" );
int pos = namespace_tmp.tqfind( "::" );
if( pos < 0 ) {
className = namespace_tmp;
break;
@@ -223,7 +223,7 @@ void generateSkel( const TQString& idl, const TQString& filename, TQDomElement d
str << "\t fdict->insert( " << className << "_ftable[i][1], new int( i ) );" << endl;
str << " }" << endl;
str << " int* fp = fdict->find( fun );" << endl;
str << " int* fp = fdict->tqfind( fun );" << endl;
str << " switch ( fp?*fp:-1) {" << endl;
}
s = n.nextSibling().toElement();

+ 5
- 5
dcop/dcopidl2cpp/stub.cpp View File

@@ -54,7 +54,7 @@ void generateStub( const TQString& idl, const TQString& filename, TQDomElement d
str << endl;

TQString ifdefstring = idl.upper();
int pos = idl.findRev( '.' );
int pos = idl.tqfindRev( '.' );
if ( pos != -1 )
ifdefstring = ifdefstring.left( pos );

@@ -107,13 +107,13 @@ void generateStub( const TQString& idl, const TQString& filename, TQDomElement d
}

if( DCOPParent != "DCOPObject" ) { // we need to include the .h file for the base stub
if( all_includes.contains( DCOPParent + ".h" ))
if( all_includes.tqcontains( DCOPParent + ".h" ))
str << "#include <" << DCOPParent << "_stub.h>" << endl;
else if( all_includes.contains( DCOPParent.lower() + ".h" ))
else if( all_includes.tqcontains( DCOPParent.lower() + ".h" ))
str << "#include <" << DCOPParent.lower() << "_stub.h>" << endl;
else {// damn ... let's assume it's the last include
TQString stub_h = all_includes.last();
unsigned int pos = stub_h.find( ".h" );
unsigned int pos = stub_h.tqfind( ".h" );
if( pos > 0 ) {
stub_h = stub_h.remove( pos, 100000 );
str << "#include <" << stub_h << "_stub.h>" << endl;
@@ -128,7 +128,7 @@ void generateStub( const TQString& idl, const TQString& filename, TQDomElement d
int namespace_count = 0;
TQString namespace_tmp = className;
for(;;) {
int pos = namespace_tmp.find( "::" );
int pos = namespace_tmp.tqfind( "::" );
if( pos < 0 ) {
className = namespace_tmp;
break;

+ 1
- 1
dcop/dcopidl2cpp/stubimpl.cpp View File

@@ -98,7 +98,7 @@ void generateStubImpl( const TQString& idl, const TQString& header, const TQStri
TQString namespace_tmp = className_stub;
str << endl;
for(;;) {
int pos = namespace_tmp.find( "::" );
int pos = namespace_tmp.tqfind( "::" );
if( pos < 0 ) {
className_stub = namespace_tmp;
break;

+ 3
- 3
dcop/dcopobject.cpp View File

@@ -58,7 +58,7 @@ DCOPObject::DCOPObject(TQObject *obj)
while (currentObj != 0L) {
ident.prepend( currentObj->name() );
ident.prepend("/");
currentObj = currentObj->parent();
currentObj = TQT_TQOBJECT(currentObj->parent());
}
if ( ident[0] == '/' )
ident = ident.mid(1);
@@ -116,7 +116,7 @@ TQCString DCOPObject::objId() const

bool DCOPObject::hasObject(const TQCString &_objId)
{
if (objMap()->contains(_objId))
if (objMap()->tqcontains(_objId))
return true;
else
return false;
@@ -155,7 +155,7 @@ TQCString DCOPObject::objectName( TQObject* obj )
{
identity.prepend( currentObj->name() );
identity.prepend("/");
currentObj = currentObj->parent();
currentObj = TQT_TQOBJECT(currentObj->parent());
}
if ( identity[0] == '/' )
identity = identity.mid(1);

+ 4
- 4
dcop/dcopref.cpp View File

@@ -62,9 +62,9 @@ DCOPReply DCOPRef::callInternal( const TQCString& fun, const TQCString& args, co
return reply;
}
TQCString sig = fun;
if ( fun.find('(') == -1 ) {
if ( fun.tqfind('(') == -1 ) {
sig += args;
if( args.find( "<unknown" ) != -1 )
if( args.tqfind( "<unknown" ) != -1 )
qWarning("DCOPRef: unknown type error "
"<\"%s\",\"%s\">::call(\"%s\",%s",
STR(m_app), STR(m_obj), STR(fun), args.data()+1 );
@@ -87,9 +87,9 @@ bool DCOPRef::sendInternal( const TQCString& fun, const TQCString& args, const T
}
Q_UNUSED( data );
TQCString sig = fun;
if ( fun.find('(') == -1 ) {
if ( fun.tqfind('(') == -1 ) {
sig += args;
if( args.find( "<unknown" ) != -1 )
if( args.tqfind( "<unknown" ) != -1 )
qWarning("DCOPRef: unknown type error "
"<\"%s\",\"%s\">::send(\"%s\",%s",
STR(m_app), STR(m_obj), STR(fun), args.data()+1 );

+ 1
- 1
dcop/dcopref.h View File

@@ -396,7 +396,7 @@ public:
* Flag for allowing entering the event loop if the call blocks too long.
* @p NoEventLoop disables entering the event loop.
* @p UseEventLoop allows entering the event loop while waiting for long
* blocking DCOP call, thus making the GUI repaint if needed, and possibly
* blocking DCOP call, thus making the GUI tqrepaint if needed, and possibly
* allowing also other code in the application to be executed.
* @see DCOPClient::call()
*/

+ 28
- 28
dcop/dcopserver.cpp View File

@@ -124,9 +124,9 @@ void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr)
static TQCString readQCString(TQDataStream &ds)
{
TQCString result;
Q_UINT32 len;
TQ_UINT32 len;
ds >> len;
TQIODevice *device = ds.device();
TQIODevice *device = ds.tqdevice();
int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{
@@ -142,9 +142,9 @@ static TQCString readQCString(TQDataStream &ds)
static TQByteArray readQByteArray(TQDataStream &ds)
{
TQByteArray result;
Q_UINT32 len;
TQ_UINT32 len;
ds >> len;
TQIODevice *device = ds.device();
TQIODevice *device = ds.tqdevice();
int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{
@@ -287,7 +287,7 @@ qWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.si
// assert(conn->outputBuffer.isEmpty());
}

unsigned long nleft = writeIceData(iceConn, _data.size(), _data.data());
unsigned long nleft = writeIceData(iceConn, _data.size(), const_cast<TQByteArray&>(_data).data());
if ((nleft > 0) && conn)
{
conn->waitForOutputReady(_data, _data.size() - nleft);
@@ -319,7 +319,7 @@ void DCOPServer::slotOutputReady(int socket)
qWarning("DCOPServer: slotOutputReady fd = %d", socket);
#endif
// Find out connection.
DCOPConnection *conn = fd_clients.find(socket);
DCOPConnection *conn = fd_clients.tqfind(socket);
//assert(conn);
//assert(conn->outputBlocked);
//assert(conn->socket() == socket);
@@ -396,7 +396,7 @@ qWarning("DCOPServer: Flushing data, fd = %d", IceConnectionNumber(_iceConn));
DCOPIceWrite(_iceConn, _data);
}

class DCOPListener : public QSocketNotifier
class DCOPListener : public TQSocketNotifier
{
public:
DCOPListener( IceListenObj obj )
@@ -710,7 +710,7 @@ void DCOPProcessMessage( IceConn iceConn, IcePointer /*clientData*/,
void DCOPServer::processMessage( IceConn iceConn, int opcode,
unsigned long length, Bool /*swap*/)
{
DCOPConnection* conn = clients.find( iceConn );
DCOPConnection* conn = clients.tqfind( iceConn );
if ( !conn ) {
qWarning("DCOPServer::processMessage message from unknown connection. [opcode = %d]", opcode);
return;
@@ -1109,7 +1109,7 @@ DCOPConnection* DCOPServer::findApp( const TQCString& appId )
{
if ( appId.isNull() )
return 0;
DCOPConnection* conn = appIds.find( appId );
DCOPConnection* conn = appIds.tqfind( appId );
return conn;
}

@@ -1204,7 +1204,7 @@ void DCOPServer::removeConnection( void* data )
while (!conn->waitingForReply.isEmpty()) {
IceConn iceConn = conn->waitingForReply.take(0);
if (iceConn) {
DCOPConnection* target = clients.find( iceConn );
DCOPConnection* target = clients.tqfind( iceConn );
qWarning("DCOP aborting call from '%s' to '%s'", target ? target->appId.data() : "<unknown>" , conn->appId.data() );
TQByteArray reply;
DCOPMsg *pMsg;
@@ -1226,7 +1226,7 @@ void DCOPServer::removeConnection( void* data )
while (!conn->waitingForDelayedReply.isEmpty()) {
IceConn iceConn = conn->waitingForDelayedReply.take(0);
if (iceConn) {
DCOPConnection* target = clients.find( iceConn );
DCOPConnection* target = clients.tqfind( iceConn );
qWarning("DCOP aborting (delayed) call from '%s' to '%s'", target ? target->appId.data() : "<unknown>", conn->appId.data() );
TQByteArray reply;
DCOPMsg *pMsg;
@@ -1247,7 +1247,7 @@ void DCOPServer::removeConnection( void* data )
{
IceConn iceConn = conn->waitingOnReply.take(0);
if (iceConn) {
DCOPConnection* target = clients.find( iceConn );
DCOPConnection* target = clients.tqfind( iceConn );
if (!target)
{
qWarning("DCOP Error: still waiting for answer from non-existing client.");
@@ -1359,7 +1359,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,

if ( obj == "emit")
{
DCOPConnection* conn = clients.find( iceConn );
DCOPConnection* conn = clients.tqfind( iceConn );
if (conn) {
//qDebug("DCOPServer: %s emits %s", conn->appId.data(), fun.data());
dcopSignals->emitSignal(conn, fun, data, false);
@@ -1370,13 +1370,13 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
if ( fun == "setDaemonMode(bool)" ) {
TQDataStream args( data, IO_ReadOnly );
if ( !args.atEnd() ) {
Q_INT8 iDaemon;
TQ_INT8 iDaemon;
bool daemon;
args >> iDaemon;

daemon = static_cast<bool>( iDaemon );

DCOPConnection* conn = clients.find( iceConn );
DCOPConnection* conn = clients.tqfind( iceConn );
if ( conn && !conn->appId.isNull() ) {
if ( daemon ) {
if ( !conn->daemon )
@@ -1414,10 +1414,10 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
if (!args.atEnd()) {
TQCString app2 = readQCString(args);
TQDataStream reply( replyData, IO_WriteOnly );
DCOPConnection* conn = clients.find( iceConn );
DCOPConnection* conn = clients.tqfind( iceConn );
if ( conn && !app2.isEmpty() ) {
if ( !conn->appId.isNull() &&
appIds.find( conn->appId ) == conn ) {
appIds.tqfind( conn->appId ) == conn ) {
appIds.remove( conn->appId );

}
@@ -1440,7 +1440,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
#endif

conn->appId = app2;
if ( appIds.find( app2 ) != 0 ) {
if ( appIds.tqfind( app2 ) != 0 ) {
// we already have this application, unify
int n = 1;
TQCString tmp;
@@ -1449,12 +1449,12 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
tmp.setNum( n );
tmp.prepend("-");
tmp.prepend( app2 );
} while ( appIds.find( tmp ) != 0 );
} while ( appIds.tqfind( tmp ) != 0 );
conn->appId = tmp;
}
appIds.insert( conn->appId, conn );

int c = conn->appId.find( '-' );
int c = conn->appId.tqfind( '-' );
if ( c > 0 )
conn->plainAppId = conn->appId.left( c );
else
@@ -1494,9 +1494,9 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
} else if ( fun == "setNotifications(bool)" ) {
TQDataStream args( data, IO_ReadOnly );
if (!args.atEnd()) {
Q_INT8 notifyActive;
TQ_INT8 notifyActive;
args >> notifyActive;
DCOPConnection* conn = clients.find( iceConn );
DCOPConnection* conn = clients.tqfind( iceConn );
if ( conn ) {
if ( notifyActive )
conn->notifyRegister++;
@@ -1507,7 +1507,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
return true;
}
} else if ( fun == "connectSignal(TQCString,TQCString,TQCString,TQCString,TQCString,bool)") {
DCOPConnection* conn = clients.find( iceConn );
DCOPConnection* conn = clients.tqfind( iceConn );
if (!conn) return false;
TQDataStream args(data, IO_ReadOnly );
if (args.atEnd()) return false;
@@ -1516,16 +1516,16 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
TQCString signal = readQCString(args);
TQCString receiverObj = readQCString(args);
TQCString slot = readQCString(args);
Q_INT8 Volatile;
TQ_INT8 Volatile;
args >> Volatile;
//qDebug("DCOPServer: connectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s)", sender.data(), senderObj.data(), signal.data(), receiverObj.data(), slot.data());
bool b = dcopSignals->connectSignal(sender, senderObj, signal, conn, receiverObj, slot, (Volatile != 0));
replyType = "bool";
TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8) (b?1:0);
reply << (TQ_INT8) (b?1:0);
return true;
} else if ( fun == "disconnectSignal(TQCString,TQCString,TQCString,TQCString,TQCString)") {
DCOPConnection* conn = clients.find( iceConn );
DCOPConnection* conn = clients.tqfind( iceConn );
if (!conn) return false;
TQDataStream args(data, IO_ReadOnly );
if (args.atEnd()) return false;
@@ -1538,7 +1538,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
bool b = dcopSignals->disconnectSignal(sender, senderObj, signal, conn, receiverObj, slot);
replyType = "bool";
TQDataStream reply( replyData, IO_WriteOnly );
reply << (Q_INT8) (b?1:0);
reply << (TQ_INT8) (b?1:0);
return true;
}

@@ -1618,7 +1618,7 @@ static bool isRunning(const TQCString &fName, bool printNetworkId = false)
TQCString contents( size+1 );
bool ok = f.readBlock( contents.data(), size ) == size;
contents[size] = '\0';
int pos = contents.find('\n');
int pos = contents.tqfind('\n');
ok = ok && ( pos != -1 );
pid_t pid = ok ? contents.mid(pos+1).toUInt(&ok) : 0;
f.close();

+ 3
- 3
dcop/dcopserver.h View File

@@ -66,7 +66,7 @@ typedef TQValueList<TQCString> QCStringList;
/**
* @internal
*/
class DCOPConnection : public QSocketNotifier
class DCOPConnection : public TQSocketNotifier
{
public:
DCOPConnection( IceConn conn );
@@ -112,7 +112,7 @@ public:
/**
* @internal
*/
class DCOPServer : public QObject
class DCOPServer : public TQObject
{
Q_OBJECT
public:
@@ -130,7 +130,7 @@ public:

DCOPConnection *findApp(const TQCString &appId);
DCOPConnection *findConn(IceConn iceConn)
{ return clients.find(iceConn); }
{ return clients.tqfind(iceConn); }

void sendMessage(DCOPConnection *conn, const TQCString &sApp,
const TQCString &rApp, const TQCString &rObj,

+ 9
- 9
dcop/dcopsignals.cpp View File

@@ -39,14 +39,14 @@ DCOPSignals::emitSignal( DCOPConnection *conn, const TQCString &_fun, const TQBy
{
TQCString senderObj;
TQCString fun = _fun;
int i = fun.find('#');
int i = fun.tqfind('#');
if (i > -1)
{
senderObj = fun.left(i);
fun = fun.mid(i+1);
}

DCOPSignalConnectionList *list = connections.find(fun);
DCOPSignalConnectionList *list = connections.tqfind(fun);
if (!list) return;
for(DCOPSignalConnection *current = list->first(); current; current = list->next())
{
@@ -102,16 +102,16 @@ DCOPSignals::connectSignal( const TQCString &sender, const TQCString &senderObj,
// TODO: Check if signal and slot match
TQCString signalArgs, slotArgs;
int i,j;
i = signal.find('(');
i = signal.tqfind('(');
if (i < 0) return false;
signalArgs = signal.mid(i+1);
j = signalArgs.find(')');
j = signalArgs.tqfind(')');
if (j < 0) return false;
signalArgs.truncate(j);
i = slot.find('(');
i = slot.tqfind('(');
if (i < 0) return false;
slotArgs = slot.mid(i+1);
j = slotArgs.find(')');
j = slotArgs.tqfind(')');
if (j < 0) return false;
slotArgs.truncate(j);

@@ -142,7 +142,7 @@ DCOPSignals::connectSignal( const TQCString &sender, const TQCString &senderObj,
current->recvObj = receiverObj;
current->slot = slot;

DCOPSignalConnectionList *list = connections.find(signal);
DCOPSignalConnectionList *list = connections.tqfind(signal);
if (!list)
{
list = new DCOPSignalConnectionList;
@@ -177,7 +177,7 @@ DCOPSignals::disconnectSignal( const TQCString &sender, const TQCString &senderO
return true;
}

DCOPSignalConnectionList *list = connections.find(signal);
DCOPSignalConnectionList *list = connections.tqfind(signal);
if (!list)
return false; // Not found...

@@ -255,7 +255,7 @@ DCOPSignals::removeConnections(DCOPConnection *conn, const TQCString &obj)
if (current->recvConn != conn)
current->recvConn->signalConnectionList()->removeRef(current);

DCOPSignalConnectionList *signalList = connections.find(current->signal);
DCOPSignalConnectionList *signalList = connections.tqfind(current->signal);
if (signalList)
{
signalList->removeRef(current);

+ 6
- 6
dcop/kdatastream.h View File

@@ -6,13 +6,13 @@
#ifdef USE_QT3
inline TQDataStream & operator << (TQDataStream & str, bool b)
{
str << Q_INT8(b);
str << TQ_INT8(b);
return str;
}

inline TQDataStream & operator >> (TQDataStream & str, bool & b)
{
Q_INT8 l;
TQ_INT8 l;
str >> l;
b = bool(l);
return str;
@@ -22,7 +22,7 @@ inline TQDataStream & operator >> (TQDataStream & str, bool & b)
#if QT_VERSION < 0x030200 && !defined(Q_WS_WIN) && !defined(Q_WS_MAC)
inline TQDataStream & operator << (TQDataStream & str, long long int ll)
{
Q_UINT32 l1,l2;
TQ_UINT32 l1,l2;
l1 = ll & 0xffffffffLL;
l2 = ll >> 32;
str << l1 << l2;
@@ -31,7 +31,7 @@ inline TQDataStream & operator << (TQDataStream & str, long long int ll)

inline TQDataStream & operator >> (TQDataStream & str, long long int&ll)
{
Q_UINT32 l1,l2;
TQ_UINT32 l1,l2;
str >> l1 >> l2;
ll = ((unsigned long long int)(l2) << 32) + (long long int) l1;
return str;
@@ -39,7 +39,7 @@ inline TQDataStream & operator >> (TQDataStream & str, long long int&ll)

inline TQDataStream & operator << (TQDataStream & str, unsigned long long int ll)
{
Q_UINT32 l1,l2;
TQ_UINT32 l1,l2;
l1 = ll & 0xffffffffLL;
l2 = ll >> 32;
str << l1 << l2;
@@ -48,7 +48,7 @@ inline TQDataStream & operator << (TQDataStream & str, unsigned long long int ll

inline TQDataStream & operator >> (TQDataStream & str, unsigned long long int &ll)
{
Q_UINT32 l1,l2;
TQ_UINT32 l1,l2;
str >> l1 >> l2;
ll = ((unsigned long long int)(l2) << 32) + (unsigned long long int) l1;
return str;

+ 2
- 2
dcop/testdcop.h View File

@@ -35,13 +35,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include <stdio.h>
/**
$QTDIR/bin/moc testdcop.cpp -o testdcop.moc
$QTDIR/bin/tqmoc testdcop.cpp -o testdcop.moc
g++ -o testdcop testdcop.cpp -I$QTDIR/include -L$QTDIR/lib
@internal

**/

class TestObject : public QObject
class TestObject : public TQObject
{
Q_OBJECT
public:

+ 1
- 1
dnssd/domainbrowser.cpp View File

@@ -125,7 +125,7 @@ void DomainBrowser::startBrowse()

void DomainBrowser::gotNewDomain(const TQString& domain)
{
if (d->m_domains.contains(domain)) return;
if (d->m_domains.tqcontains(domain)) return;
d->m_domains.append(domain);
emit domainAdded(domain);
}

+ 1
- 1
dnssd/domainbrowser.h View File

@@ -38,7 +38,7 @@ class DomainBrowserPrivate;
@short Class used to provide current list of domains for browsing.
@author Jakub Stachowski
*/
class KDNSSD_EXPORT DomainBrowser : public QObject
class KDNSSD_EXPORT DomainBrowser : public TQObject
{
Q_OBJECT
public:

+ 1
- 1
dnssd/query.h View File

@@ -36,7 +36,7 @@ name, either multicast or unicast DNS will be used.
@short Class that represents service query in one domain.
@author Jakub Stachowski
*/
class KDNSSD_EXPORT Query : public QObject
class KDNSSD_EXPORT Query : public TQObject
{
Q_OBJECT
public:

+ 2
- 2
dnssd/remoteservice.cpp View File

@@ -166,7 +166,7 @@ void RemoteService::virtual_hook(int, void*)
TQDataStream & operator<< (TQDataStream & s, const RemoteService & a)
{
s << (static_cast<ServiceBase>(a));
Q_INT8 resolved = a.d->m_resolved ? 1:0;
TQ_INT8 resolved = a.d->m_resolved ? 1:0;
s << resolved;
return s;
}
@@ -177,7 +177,7 @@ TQDataStream & operator>> (TQDataStream & s, RemoteService & a)
#ifdef HAVE_DNSSD
a.d->stop();
#endif
Q_INT8 resolved;
TQ_INT8 resolved;
operator>>(s,(static_cast<ServiceBase&>(a)));
s >> resolved;
a.d->m_resolved = (resolved == 1);

+ 2
- 2
dnssd/responder.cpp View File

@@ -72,7 +72,7 @@ Responder& Responder::self()

void Responder::process()
{
qApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput);
tqApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput);
}

#ifdef HAVE_DNSSD
@@ -88,7 +88,7 @@ AvahiClientState Responder::state() const

bool domainIsLocal(const TQString& domain)
{
return domain.section('.',-1,-1).lower()=="local";
return TQString(domain.section('.',-1,-1)).lower()=="local";
}

TQCString domainToDNS(const TQString &domain)

+ 1
- 1
dnssd/responder.h View File

@@ -41,7 +41,7 @@ This class should not be used directly.
@author Jakub Stachowski
@short Internal class wrapping avahi client
*/
class Responder : public QObject
class Responder : public TQObject
{
Q_OBJECT


+ 4
- 4
dnssd/sdevent.h View File

@@ -30,13 +30,13 @@ namespace DNSSD

enum Operation { SD_ERROR = 101,SD_ADDREMOVE, SD_PUBLISH, SD_RESOLVE};

class ErrorEvent : public QCustomEvent
class ErrorEvent : public TQCustomEvent
{
public:
ErrorEvent() : TQCustomEvent(TQEvent::User+SD_ERROR)
{}
};
class AddRemoveEvent : public QCustomEvent
class AddRemoveEvent : public TQCustomEvent
{
public:
enum Operation { Add, Remove };
@@ -51,7 +51,7 @@ public:
const TQString m_domain;
};

class PublishEvent : public QCustomEvent
class PublishEvent : public TQCustomEvent
{
public:
PublishEvent(bool ok) : TQCustomEvent(TQEvent::User+SD_PUBLISH), m_ok(ok)
@@ -60,7 +60,7 @@ public:
bool m_ok;
};

class ResolveEvent : public QCustomEvent
class ResolveEvent : public TQCustomEvent
{
public:
ResolveEvent(const TQString& hostname, unsigned short port,

+ 4
- 4
dnssd/servicebase.cpp View File

@@ -51,14 +51,14 @@ void ServiceBase::decode(const TQString& name)
} else { // normal service or domain
TQString decoded_name=name;
decoded_name=decoded_name.replace("\\\\","\\");
int i = decoded_name.find(TQRegExp("[^\\\\]\\."));
int i = decoded_name.tqfind(TQRegExp("[^\\\\]\\."));
if (i==-1) return; // first find service name
rest = decoded_name.mid(i+2);
m_serviceName=decoded_name.left(i+1).replace("\\.",".");
}
m_type = rest.section('.',0,1);
// does it really have a type?
if (m_type[0]=='_' && m_type[m_type.find('.')+1]=='_')
if (m_type[0]=='_' && m_type[m_type.tqfind('.')+1]=='_')
m_domain = rest.section('.',2,-1,TQString::SectionIncludeTrailingSep);
else {
m_type="";
@@ -100,13 +100,13 @@ void ServiceBase::virtual_hook(int, void*)

TQDataStream & operator<< (TQDataStream & s, const ServiceBase & a)
{
s << a.m_serviceName << a.m_type << a.m_domain << a.m_hostName << Q_INT16(a.m_port) << a.m_textData;
s << a.m_serviceName << a.m_type << a.m_domain << a.m_hostName << TQ_INT16(a.m_port) << a.m_textData;
return s;
}

TQDataStream & operator>> (TQDataStream & s, ServiceBase & a)
{
Q_INT16 port;
TQ_INT16 port;
s >> a.m_serviceName >> a.m_type >> a.m_domain >> a.m_hostName >> port >> a.m_textData;
a.m_port = port;
return s;

+ 1
- 1
dnssd/servicebrowser.cpp View File

@@ -108,7 +108,7 @@ const DomainBrowser* ServiceBrowser::browsedDomains() const

void ServiceBrowser::serviceResolved(bool success)
{
TQObject* sender_obj = const_cast<TQObject*>(sender());
TQObject* sender_obj = const_cast<TQObject*>(TQT_TQOBJECT_CONST(sender()));
RemoteService* svr = static_cast<RemoteService*>(sender_obj);
disconnect(svr,TQT_SIGNAL(resolved(bool)),this,TQT_SLOT(serviceResolved(bool)));
TQValueList<RemoteService::Ptr>::Iterator it = d->m_duringResolve.begin();

+ 1
- 1
dnssd/servicebrowser.h View File

@@ -51,7 +51,7 @@ to constructor, domains configured by user will be searched.