Rename additional global TQt functions

pull/16/head
Timothy Pearson преди 12 години
родител 8fc8811ef6
ревизия 4fb897b216

@ -809,7 +809,7 @@ tdesdk/scripts/kDebug2kdDebug.sh provides a script for automating the conversion
Note that enabling/disabling debug output can now be done with kdebugdialog, Note that enabling/disabling debug output can now be done with kdebugdialog,
which can be found in tdebase. The hidden dialog on C+S+F12 no longer exists. which can be found in tdebase. The hidden dialog on C+S+F12 no longer exists.
<P> <P>
Also, note that qDebug and fprintf aren't disabled by -DNDEBUG, whereas kdDebug is. Also, note that tqDebug and fprintf aren't disabled by -DNDEBUG, whereas kdDebug is.
One more reason to use kdDebug ! One more reason to use kdDebug !
(<A HREF="mailto:faure@kde.org">faure@kde.org</A>)<P> (<A HREF="mailto:faure@kde.org">faure@kde.org</A>)<P>

@ -152,7 +152,7 @@ QDataStream arg(data, IO_WriteOnly);
arg << 5; arg << 5;
if (!client->send("someAppId", "fooObject/barObject", "doIt(int)", if (!client->send("someAppId", "fooObject/barObject", "doIt(int)",
data)) data))
qDebug("there was some error using DCOP."); tqDebug("there was some error using DCOP.");
OK, now let's say we wanted to get the data back from the remotely OK, now let's say we wanted to get the data back from the remotely
called function. You have to execute a call() instead of a send(). called function. You have to execute a call() instead of a send().
@ -166,7 +166,7 @@ QDataStream arg(data, IO_WriteOnly);
arg << 5; arg << 5;
if (!client->call("someAppId", "fooObject/barObject", "doIt(int)", if (!client->call("someAppId", "fooObject/barObject", "doIt(int)",
data, replyType, replyData)) data, replyType, replyData))
qDebug("there was some error using DCOP."); tqDebug("there was some error using DCOP.");
else { else {
QDataStream reply(replyData, IO_ReadOnly); QDataStream reply(replyData, IO_ReadOnly);
if (replyType == "QString") { if (replyType == "QString") {
@ -174,7 +174,7 @@ else {
reply >> result; reply >> result;
print("the result is: %s",result.latin1()); print("the result is: %s",result.latin1());
} else } else
qDebug("doIt returned an unexpected type of reply!"); tqDebug("doIt returned an unexpected type of reply!");
} }
N.B.: You cannot call() a method belonging to an application which has N.B.: You cannot call() a method belonging to an application which has
@ -216,7 +216,7 @@ bool BarObject::process(const QCString &fun, const QByteArray &data,
replyType = "QString"; replyType = "QString";
return true; return true;
} else { } else {
qDebug("unknown function call to BarObject::process()"); tqDebug("unknown function call to BarObject::process()");
return false; return false;
} }
} }
@ -255,7 +255,7 @@ bool BarObject::process(const QCString &fun, const QByteArray &data,
return true; return true;
} else { } else {
qDebug("unknown function call to BarObject::process()"); tqDebug("unknown function call to BarObject::process()");
return false; return false;
} }
} }
@ -421,7 +421,7 @@ Example:
void MyClass::myAsynchronousMethod(QString someParameter) void MyClass::myAsynchronousMethod(QString someParameter)
{ {
qDebug("myAsyncMethod called with param `" + someParameter + "'"); tqDebug("myAsyncMethod called with param `" + someParameter + "'");
} }

@ -115,7 +115,7 @@ QDataStream arg(data, IO_WriteOnly);
arg << 5; arg << 5;
if (!client->send("someAppId", "fooObject/barObject", "doIt(int)", if (!client->send("someAppId", "fooObject/barObject", "doIt(int)",
data)) data))
qDebug("there was some error using DCOP."); tqDebug("there was some error using DCOP.");
\endcode \endcode
OK, now let's say we wanted to get the data back from the remotely OK, now let's say we wanted to get the data back from the remotely
@ -131,7 +131,7 @@ QDataStream arg(data, IO_WriteOnly);
arg << 5; arg << 5;
if (!client->call("someAppId", "fooObject/barObject", "doIt(int)", if (!client->call("someAppId", "fooObject/barObject", "doIt(int)",
data, replyType, replyData)) data, replyType, replyData))
qDebug("there was some error using DCOP."); tqDebug("there was some error using DCOP.");
else { else {
QDataStream reply(replyData, IO_ReadOnly); QDataStream reply(replyData, IO_ReadOnly);
if (replyType == "QString") { if (replyType == "QString") {
@ -139,7 +139,7 @@ else {
reply >> result; reply >> result;
print("the result is: %s",result.latin1()); print("the result is: %s",result.latin1());
} else } else
qDebug("doIt returned an unexpected type of reply!"); tqDebug("doIt returned an unexpected type of reply!");
} }
\endcode \endcode
@ -175,7 +175,7 @@ bool BarObject::process(const QCString &fun, const QByteArray &data,
replyType = "QString"; replyType = "QString";
return true; return true;
} else { } else {
qDebug("unknown function call to BarObject::process()"); tqDebug("unknown function call to BarObject::process()");
return false; return false;
} }
} }
@ -216,7 +216,7 @@ bool BarObject::process(const QCString &fun, const QByteArray &data,
return true; return true;
} else { } else {
qDebug("unknown function call to BarObject::process()"); tqDebug("unknown function call to BarObject::process()");
return false; return false;
} }
} }
@ -329,7 +329,7 @@ Example:
\code \code
void MyClass::myAsynchronousMethod(QString someParameter) void MyClass::myAsynchronousMethod(QString someParameter)
{ {
qDebug("myAsyncMethod called with param `" + someParameter + "'"); tqDebug("myAsyncMethod called with param `" + someParameter + "'");
} }
\endcode \endcode

@ -102,7 +102,7 @@ void queryApplications(const TQCString &filter)
if ( !dcop->isAttached() ) if ( !dcop->isAttached() )
{ {
qWarning( "server not accessible" ); tqWarning( "server not accessible" );
exit(1); exit(1);
} }
} }
@ -135,9 +135,9 @@ void queryObjects( const TQCString &app, const TQCString &filter )
if ( !ok ) if ( !ok )
{ {
if (!dcop->isApplicationRegistered(app)) if (!dcop->isApplicationRegistered(app))
qWarning( "No such application: '%s'", app.data()); tqWarning( "No such application: '%s'", app.data());
else else
qWarning( "Application '%s' not accessible", app.data() ); tqWarning( "Application '%s' not accessible", app.data() );
exit(1); exit(1);
} }
} }
@ -151,7 +151,7 @@ void queryFunctions( const char* app, const char* obj )
} }
if ( !ok ) if ( !ok )
{ {
qWarning( "object '%s' in application '%s' not accessible", obj, app ); tqWarning( "object '%s' in application '%s' not accessible", obj, app );
exit( 1 ); exit( 1 );
} }
} }
@ -164,7 +164,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
if ( right < left ) if ( right < left )
{ {
qWarning( "parentheses do not match" ); tqWarning( "parentheses do not match" );
return( 1 ); return( 1 );
} }
@ -177,7 +177,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
goto doit; goto doit;
if ( !ok ) if ( !ok )
{ {
qWarning( "object not accessible" ); tqWarning( "object not accessible" );
return( 1 ); return( 1 );
} }
for ( QCStringList::Iterator it = funcs.begin(); it != funcs.end(); ++it ) { for ( QCStringList::Iterator it = funcs.begin(); it != funcs.end(); ++it ) {
@ -205,7 +205,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
} }
if ( realfunc.isEmpty() ) if ( realfunc.isEmpty() )
{ {
qWarning("no such function"); tqWarning("no such function");
return( 1 ); return( 1 );
} }
f = realfunc; f = realfunc;
@ -257,7 +257,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
if ( s < static_cast<int>(partl.count())-1) if ( s < static_cast<int>(partl.count())-1)
{ {
qWarning("The argument `%s' seems syntactically wrong.", tqWarning("The argument `%s' seems syntactically wrong.",
lt.latin1()); lt.latin1());
} }
if ( s == static_cast<int>(partl.count())-1) if ( s == static_cast<int>(partl.count())-1)
@ -294,12 +294,12 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt
if ( i != args.count() ) if ( i != args.count() )
{ {
qWarning( "arguments do not match" ); tqWarning( "arguments do not match" );
return( 1 ); return( 1 );
} }
if ( !dcop->call( app, obj, f.latin1(), data, replyType, replyData) ) { if ( !dcop->call( app, obj, f.latin1(), data, replyType, replyData) ) {
qWarning( "call failed"); tqWarning( "call failed");
return( 1 ); return( 1 );
} else { } else {
TQDataStream reply(replyData, IO_ReadOnly); TQDataStream reply(replyData, IO_ReadOnly);

@ -46,7 +46,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
if ( right < left ) if ( right < left )
{ {
qWarning( "parentheses do not match" ); tqWarning( "parentheses do not match" );
exit(1); exit(1);
} }
@ -93,7 +93,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
if (s<(int)partl.count()-1) if (s<(int)partl.count()-1)
{ {
qWarning("The argument `%s' seems syntactically wrong.", tqWarning("The argument `%s' seems syntactically wrong.",
lt.latin1()); lt.latin1());
} }
if (s==(int)partl.count()-1) if (s==(int)partl.count()-1)
@ -121,7 +121,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
} }
if ( types.count() != args.count() ) { if ( types.count() != args.count() ) {
qWarning( "arguments do not match" ); tqWarning( "arguments do not match" );
exit(1); exit(1);
} }
@ -133,7 +133,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis
marshall(arg, args, i, *it); marshall(arg, args, i, *it);
} }
if ( (uint) i != args.count() ) { if ( (uint) i != args.count() ) {
qWarning( "arguments do not match" ); tqWarning( "arguments do not match" );
exit(1); exit(1);
} }
@ -168,14 +168,14 @@ bool launchApp(TQString app)
if ( !dcop->call( "klauncher", "klauncher", "start_service_by_desktop_name(TQString,TQStringList)", if ( !dcop->call( "klauncher", "klauncher", "start_service_by_desktop_name(TQString,TQStringList)",
data, replyType, replyData) ) { data, replyType, replyData) ) {
qWarning( "call to klauncher failed."); tqWarning( "call to klauncher failed.");
return false; return false;
} }
TQDataStream reply(replyData, IO_ReadOnly); TQDataStream reply(replyData, IO_ReadOnly);
if ( replyType != "serviceResult" ) if ( replyType != "serviceResult" )
{ {
qWarning( "unexpected result '%s' from klauncher.", replyType.data()); tqWarning( "unexpected result '%s' from klauncher.", replyType.data());
return false; return false;
} }
int result; int result;
@ -184,7 +184,7 @@ bool launchApp(TQString app)
reply >> result >> dcopName >> error; reply >> result >> dcopName >> error;
if (result != 0) if (result != 0)
{ {
qWarning("Error starting '%s': %s", app.local8Bit().data(), error.local8Bit().data()); tqWarning("Error starting '%s': %s", app.local8Bit().data(), error.local8Bit().data());
return false; return false;
} }
return true; return true;

@ -50,14 +50,14 @@ void startApp(const char *_app, int argc, const char **args)
arg << app << URLs; arg << app << URLs;
if ( !dcop->call( "klauncher", "klauncher", function, data, replyType, replyData) ) { if ( !dcop->call( "klauncher", "klauncher", function, data, replyType, replyData) ) {
qWarning( "call failed"); tqWarning( "call failed");
exit(1); exit(1);
} else { } else {
TQDataStream reply(replyData, IO_ReadOnly); TQDataStream reply(replyData, IO_ReadOnly);
if ( replyType != "serviceResult" ) if ( replyType != "serviceResult" )
{ {
qWarning( "unexpected result '%s'", replyType.data()); tqWarning( "unexpected result '%s'", replyType.data());
exit(1); exit(1);
} }
int result; int result;
@ -66,7 +66,7 @@ void startApp(const char *_app, int argc, const char **args)
reply >> result >> dcopName >> error; reply >> result >> dcopName >> error;
if (result != 0) if (result != 0)
{ {
qWarning("Error: %s", error.local8Bit().data()); tqWarning("Error: %s", error.local8Bit().data());
exit(1); exit(1);
} }
if (!dcopName.isEmpty()) if (!dcopName.isEmpty())

@ -273,7 +273,7 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
{ {
if( i >= args.count() ) if( i >= args.count() )
{ {
qWarning("Not enough arguments (expected %d, got %d).", i, args.count()); tqWarning("Not enough arguments (expected %d, got %d).", i, args.count());
exit(1); exit(1);
} }
TQString s = TQString::fromLocal8Bit( args[ i ] ); TQString s = TQString::fromLocal8Bit( args[ i ] );
@ -368,7 +368,7 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
while (true) { while (true) {
if( j > args.count() ) if( j > args.count() )
{ {
qWarning("List end-delimiter '%s' not found.", delim.latin1()); tqWarning("List end-delimiter '%s' not found.", delim.latin1());
exit(1); exit(1);
} }
if( TQString::fromLocal8Bit( args[ j ] ) == delim ) if( TQString::fromLocal8Bit( args[ j ] ) == delim )
@ -381,7 +381,7 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
while (true) { while (true) {
if( i > args.count() ) if( i > args.count() )
{ {
qWarning("List end-delimiter '%s' not found.", delim.latin1()); tqWarning("List end-delimiter '%s' not found.", delim.latin1());
exit(1); exit(1);
} }
if( TQString::fromLocal8Bit( args[ i ] ) == delim ) if( TQString::fromLocal8Bit( args[ i ] ) == delim )
@ -389,7 +389,7 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
marshall( arg, args, i, type ); marshall( arg, args, i, type );
} }
} else { } else {
qWarning( "cannot handle datatype '%s'", type.latin1() ); tqWarning( "cannot handle datatype '%s'", type.latin1() );
exit(1); exit(1);
} }
i++; i++;

@ -45,7 +45,7 @@ TQCString& replyType, TQByteArray &replyData)
struct timeval tv; struct timeval tv;
gettimeofday(&tv, 0); gettimeofday(&tv, 0);
qWarning("%s: function('%s') %d:%06d", name(), m_remoteName.data(), tv.tv_sec % 100, tv.tv_usec); tqWarning("%s: function('%s') %d:%06d", name(), m_remoteName.data(), tv.tv_sec % 100, tv.tv_usec);
replyType = "TQString"; replyType = "TQString";
TQDataStream reply( replyData, IO_WriteOnly ); TQDataStream reply( replyData, IO_WriteOnly );
@ -60,13 +60,13 @@ void MyDCOPObject::slotTimeout()
{ {
struct timeval tv; struct timeval tv;
gettimeofday(&tv, 0); gettimeofday(&tv, 0);
qWarning("%s: slotTimeout() %d:%06d", name(), tv.tv_sec % 100, tv.tv_usec); tqWarning("%s: slotTimeout() %d:%06d", name(), tv.tv_sec % 100, tv.tv_usec);
m_timer.start(1000, true); m_timer.start(1000, true);
TQString result; TQString result;
DCOPRef(m_remoteName, m_remoteName).call("function", TQCString(name())).get(result); DCOPRef(m_remoteName, m_remoteName).call("function", TQCString(name())).get(result);
gettimeofday(&tv, 0); gettimeofday(&tv, 0);
qWarning("%s: Got result '%s' %d:%06d", name(), result.latin1(), tv.tv_sec % 100, tv.tv_usec); tqWarning("%s: Got result '%s' %d:%06d", name(), result.latin1(), tv.tv_sec % 100, tv.tv_usec);
} }
int main(int argc, char **argv) int main(int argc, char **argv)
@ -74,7 +74,7 @@ int main(int argc, char **argv)
TQCString myName = KApplication::dcopClient()->registerAs("testdcop", false); TQCString myName = KApplication::dcopClient()->registerAs("testdcop", false);
KApplication app(argc, argv, "testdcop"); KApplication app(argc, argv, "testdcop");
qWarning("%d:I am '%s'", getpid(), app.dcopClient()->appId().data()); tqWarning("%d:I am '%s'", getpid(), app.dcopClient()->appId().data());
if (myName == "testdcop") if (myName == "testdcop")
{ {

@ -359,7 +359,7 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
*replyWaitRet = True; *replyWaitRet = True;
return; return;
} else { } else {
qWarning("Very strange! got a DCOPReplyFailed opcode, but we were not waiting for a reply!"); tqWarning("Very strange! got a DCOPReplyFailed opcode, but we were not waiting for a reply!");
return; return;
} }
case DCOPReply: case DCOPReply:
@ -376,7 +376,7 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
*replyWaitRet = True; *replyWaitRet = True;
return; return;
} else { } else {
qWarning("Very strange! got a DCOPReply opcode, but we were not waiting for a reply!"); tqWarning("Very strange! got a DCOPReply opcode, but we were not waiting for a reply!");
return; return;
} }
case DCOPReplyWait: case DCOPReplyWait:
@ -391,7 +391,7 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
*replyWaitRet = True; *replyWaitRet = True;
return; return;
} else { } else {
qWarning("Very strange! got a DCOPReplyWait opcode, but we were not waiting for a reply!"); tqWarning("Very strange! got a DCOPReplyWait opcode, but we were not waiting for a reply!");
return; return;
} }
case DCOPReplyDelayed: case DCOPReplyDelayed:
@ -426,7 +426,7 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
} }
} }
} }
qWarning("Very strange! got a DCOPReplyDelayed opcode, but we were not waiting for a reply!"); tqWarning("Very strange! got a DCOPReplyDelayed opcode, but we were not waiting for a reply!");
return; return;
case DCOPCall: case DCOPCall:
case DCOPFind: case DCOPFind:
@ -494,7 +494,7 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const TQ
d->objId = objId; d->objId = objId;
d->function = fun; d->function = fun;
// qWarning("DCOP: %s got call: %s:%s:%s key = %d currentKey = %d", d->appId.data(), app.data(), objId.data(), fun.data(), key, d->currentKey); // tqWarning("DCOP: %s got call: %s:%s:%s key = %d currentKey = %d", d->appId.data(), app.data(), objId.data(), fun.data(), key, d->currentKey);
if ( canPost && d->currentKey && key != d->currentKey ) { if ( canPost && d->currentKey && key != d->currentKey ) {
DCOPClientMessage* msg = new DCOPClientMessage; DCOPClientMessage* msg = new DCOPClientMessage;
@ -621,20 +621,20 @@ DCOPClient::DCOPClient()
DCOPClient::~DCOPClient() DCOPClient::~DCOPClient()
{ {
#ifdef DCOPCLIENT_DEBUG #ifdef DCOPCLIENT_DEBUG
qWarning("d->messages.count() = %d", d->messages.count()); tqWarning("d->messages.count() = %d", d->messages.count());
TQPtrListIterator<DCOPClientMessage> it (d->messages ); TQPtrListIterator<DCOPClientMessage> it (d->messages );
DCOPClientMessage* msg ; DCOPClientMessage* msg ;
while ( ( msg = it.current() ) ) { while ( ( msg = it.current() ) ) {
++it; ++it;
d->messages.removeRef( msg ); d->messages.removeRef( msg );
qWarning("DROPPING UNHANDLED DCOP MESSAGE:"); tqWarning("DROPPING UNHANDLED DCOP MESSAGE:");
qWarning(" opcode = %d key = %d", msg->opcode, msg->key); tqWarning(" opcode = %d key = %d", msg->opcode, msg->key);
TQDataStream ds( msg->data, IO_ReadOnly ); TQDataStream ds( msg->data, IO_ReadOnly );
TQCString fromApp, app, objId, fun; TQCString fromApp, app, objId, fun;
ds >> fromApp >> app >> objId >> fun; ds >> fromApp >> app >> objId >> fun;
qWarning(" from = %s", fromApp.data()); tqWarning(" from = %s", fromApp.data());
qWarning(" to = %s / %s / %s", app.data(), objId.data(), fun.data()); tqWarning(" to = %s / %s / %s", app.data(), objId.data(), fun.data());
delete msg; delete msg;
} }
#endif #endif
@ -659,7 +659,7 @@ void DCOPClient::setServerAddress(const TQCString &addr)
TQCString env = "DCOPSERVER=" + addr; TQCString env = "DCOPSERVER=" + addr;
putenv(strdup(env.data())); putenv(strdup(env.data()));
delete [] DCOPClientPrivate::serverAddr; delete [] DCOPClientPrivate::serverAddr;
DCOPClientPrivate::serverAddr = qstrdup( addr.data() ); DCOPClientPrivate::serverAddr = tqstrdup( addr.data() );
} }
bool DCOPClient::attach() bool DCOPClient::attach()
@ -786,14 +786,14 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
TQCString contents( size+1 ); TQCString contents( size+1 );
if ( f.readBlock( contents.data(), size ) != size ) if ( f.readBlock( contents.data(), size ) != size )
{ {
qDebug("Error reading from %s, didn't read the expected %d bytes", fName.data(), size); tqDebug("Error reading from %s, didn't read the expected %d bytes", fName.data(), size);
// Should we abort ? // Should we abort ?
} }
contents[size] = '\0'; contents[size] = '\0';
int pos = contents.find('\n'); int pos = contents.find('\n');
if ( pos == -1 ) // Shouldn't happen if ( pos == -1 ) // Shouldn't happen
{ {
qDebug("Only one line in dcopserver file !: %s", contents.data()); tqDebug("Only one line in dcopserver file !: %s", contents.data());
dcopSrv = contents; dcopSrv = contents;
} }
else else
@ -802,18 +802,18 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
pos--; pos--;
dcopSrv = contents.left( pos ); dcopSrv = contents.left( pos );
//#ifndef NDEBUG //#ifndef NDEBUG
// qDebug("dcopserver address: %s", dcopSrv.data()); // tqDebug("dcopserver address: %s", dcopSrv.data());
//#endif //#endif
} }
} }
d->serverAddr = qstrdup( const_cast<char *>(dcopSrv.data()) ); d->serverAddr = tqstrdup( const_cast<char *>(dcopSrv.data()) );
bClearServerAddr = true; bClearServerAddr = true;
} }
if ((d->iceConn = IceOpenConnection(const_cast<char*>(d->serverAddr), if ((d->iceConn = IceOpenConnection(const_cast<char*>(d->serverAddr),
static_cast<IcePointer>(this), False, d->majorOpcode, static_cast<IcePointer>(this), False, d->majorOpcode,
sizeof(errBuf), errBuf)) == 0L) { sizeof(errBuf), errBuf)) == 0L) {
qDebug("DCOPClient::attachInternal. Attach failed %s", errBuf); tqDebug("DCOPClient::attachInternal. Attach failed %s", errBuf);
d->iceConn = 0; d->iceConn = 0;
if (bClearServerAddr) { if (bClearServerAddr) {
delete [] d->serverAddr; delete [] d->serverAddr;
@ -1303,7 +1303,7 @@ void DCOPClient::setNotifications(bool enabled)
TQCString replyType; TQCString replyType;
TQByteArray reply; TQByteArray reply;
if (!call("DCOPServer", "", "setNotifications( bool )", data, replyType, reply)) if (!call("DCOPServer", "", "setNotifications( bool )", data, replyType, reply))
qWarning("I couldn't enable notifications at the dcopserver!"); tqWarning("I couldn't enable notifications at the dcopserver!");
} }
void DCOPClient::setDaemonMode( bool daemonMode ) void DCOPClient::setDaemonMode( bool daemonMode )
@ -1315,7 +1315,7 @@ void DCOPClient::setDaemonMode( bool daemonMode )
TQCString replyType; TQCString replyType;
TQByteArray reply; TQByteArray reply;
if (!call("DCOPServer", "", "setDaemonMode(bool)", data, replyType, reply)) if (!call("DCOPServer", "", "setDaemonMode(bool)", data, replyType, reply))
qWarning("I couldn't enable daemon mode at the dcopserver!"); tqWarning("I couldn't enable daemon mode at the dcopserver!");
} }
@ -1687,7 +1687,7 @@ bool DCOPClient::find(const TQCString &app, const TQCString &objId,
{ {
d->transaction = false; // Transactions are not allowed. d->transaction = false; // Transactions are not allowed.
if ( !app.isEmpty() && app != d->appId && app[app.length()-1] != '*') { if ( !app.isEmpty() && app != d->appId && app[app.length()-1] != '*') {
qWarning("WEIRD! we somehow received a DCOP message w/a different appId"); tqWarning("WEIRD! we somehow received a DCOP message w/a different appId");
return false; return false;
} }
@ -1852,7 +1852,7 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId
int datalen = ba.size() + data.size(); int datalen = ba.size() + data.size();
pMsg->length += datalen; pMsg->length += datalen;
// qWarning("DCOP: %s made call %s:%s:%s key = %d", d->appId.data(), remApp.data(), remObjId.data(), remFun.data(), pMsg->key); // tqWarning("DCOP: %s made call %s:%s:%s key = %d", d->appId.data(), remApp.data(), remObjId.data(), remFun.data(), pMsg->key);
IceSendData(d->iceConn, ba.size(), const_cast<char *>(ba.data())); IceSendData(d->iceConn, ba.size(), const_cast<char *>(ba.data()));
IceSendData(d->iceConn, data.size(), const_cast<char *>(data.data())); IceSendData(d->iceConn, data.size(), const_cast<char *>(data.data()));
@ -2010,7 +2010,7 @@ void DCOPClient::processSocketData(int fd)
if( d->notifier ) if( d->notifier )
d->notifier->deleteLater(); d->notifier->deleteLater();
d->notifier = 0; d->notifier = 0;
qWarning("received an error processing data from the DCOP server!"); tqWarning("received an error processing data from the DCOP server!");
return; return;
} }
@ -2018,7 +2018,7 @@ void DCOPClient::processSocketData(int fd)
if (s == IceProcessMessagesIOError) { if (s == IceProcessMessagesIOError) {
detach(); detach();
qWarning("received an error processing data from the DCOP server!"); tqWarning("received an error processing data from the DCOP server!");
return; return;
} }
} }
@ -2089,12 +2089,12 @@ DCOPClient::endTransaction( DCOPClientTransaction *trans, TQCString& replyType,
return; return;
if ( !d->transactionList) { if ( !d->transactionList) {
qWarning("Transaction unknown: No pending transactions!"); tqWarning("Transaction unknown: No pending transactions!");
return; // No pending transactions! return; // No pending transactions!
} }
if ( !d->transactionList->removeRef( trans ) ) { if ( !d->transactionList->removeRef( trans ) ) {
qWarning("Transaction unknown: Not on list of pending transactions!"); tqWarning("Transaction unknown: Not on list of pending transactions!");
return; // Transaction return; // Transaction
} }

@ -1758,7 +1758,7 @@ YY_RULE_SETUP
if (function_mode) if (function_mode)
return yylex(); // call once again return yylex(); // call once again
qFatal("could not parse %c(%d) at line %d" , yytext[0], yytext[0], idl_line_no); tqFatal("could not parse %c(%d) at line %d" , yytext[0], yytext[0], idl_line_no);
return T_UNKNOWN; return T_UNKNOWN;
} }
YY_BREAK YY_BREAK

@ -281,7 +281,7 @@ TQ_OBJECT ;
if (function_mode) if (function_mode)
return yylex(); // call once again return yylex(); // call once again
qFatal("could not parse %c(%d) at line %d" , yytext[0], yytext[0], idl_line_no); tqFatal("could not parse %c(%d) at line %d" , yytext[0], yytext[0], idl_line_no);
return T_UNKNOWN; return T_UNKNOWN;
} }

@ -126,7 +126,7 @@ void dcopidlInitFlex( const char *_code );
void yyerror( const char *s ) void yyerror( const char *s )
{ {
qDebug( "In line %i : %s", idl_line_no, s ); tqDebug( "In line %i : %s", idl_line_no, s );
exit(1); exit(1);
// theParser->parse_error( idl_lexFile, s, idl_line_no ); // theParser->parse_error( idl_lexFile, s, idl_line_no );
} }

@ -55,7 +55,7 @@ void dcopidlInitFlex( const char *_code );
void yyerror( const char *s ) void yyerror( const char *s )
{ {
qDebug( "In line %i : %s", idl_line_no, s ); tqDebug( "In line %i : %s", idl_line_no, s );
exit(1); exit(1);
// theParser->parse_error( idl_lexFile, s, idl_line_no ); // theParser->parse_error( idl_lexFile, s, idl_line_no );
} }

@ -41,7 +41,7 @@ void usage()
int main( int argc, char** argv ) int main( int argc, char** argv )
{ {
if ( *qVersion() == '1' ) { if ( *tqVersion() == '1' ) {
fprintf( stderr, "dcopidl2cpp appears to be linked to Qt 1 instead of Qt >= 2 ! Aborting.\n" ); fprintf( stderr, "dcopidl2cpp appears to be linked to Qt 1 instead of Qt >= 2 ! Aborting.\n" );
exit(1); exit(1);
} }
@ -93,7 +93,7 @@ int main( int argc, char** argv )
TQFile in( TQFile::decodeName(argv[argpos]) ); TQFile in( TQFile::decodeName(argv[argpos]) );
if ( !in.open( IO_ReadOnly ) ) if ( !in.open( IO_ReadOnly ) )
qFatal("Could not read %s", argv[argpos] ); tqFatal("Could not read %s", argv[argpos] );
TQDomDocument doc; TQDomDocument doc;
doc.setContent( &in ); doc.setContent( &in );

@ -68,7 +68,7 @@ void generateSkel( const TQString& idl, const TQString& filename, TQDomElement d
{ {
TQFile skel( filename ); TQFile skel( filename );
if ( !skel.open( IO_WriteOnly ) ) if ( !skel.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.local8Bit().data() ); tqFatal("Could not write to %s", filename.local8Bit().data() );
TQTextStream str( &skel ); TQTextStream str( &skel );
@ -418,7 +418,7 @@ void generateSkel( const TQString& idl, const TQString& filename, TQDomElement d
funcName += ")"; funcName += ")";
if ( result != "void" ) if ( result != "void" )
qFatal("Error in DCOP signal %s::%s: DCOP signals can not return values.", className.latin1(), funcName.latin1()); tqFatal("Error in DCOP signal %s::%s: DCOP signals can not return values.", className.latin1(), funcName.latin1());
str << " TQByteArray data;" << endl; str << " TQByteArray data;" << endl;
if ( !args.isEmpty() ) { if ( !args.isEmpty() ) {

@ -40,7 +40,7 @@ void generateStub( const TQString& idl, const TQString& filename, TQDomElement d
{ {
TQFile stub( filename ); TQFile stub( filename );
if ( !stub.open( IO_WriteOnly ) ) if ( !stub.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.local8Bit().data() ); tqFatal("Could not write to %s", filename.local8Bit().data() );
TQTextStream str( &stub ); TQTextStream str( &stub );

@ -66,7 +66,7 @@ void generateStubImpl( const TQString& idl, const TQString& header, const TQStri
{ {
TQFile impl( filename ); TQFile impl( filename );
if ( !impl.open( IO_WriteOnly ) ) if ( !impl.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.latin1() ); tqFatal("Could not write to %s", filename.latin1() );
TQTextStream str( &impl ); TQTextStream str( &impl );

@ -41,7 +41,7 @@ bool DCOPReply::typeCheck( const char* t, bool warn )
return true; return true;
if( warn if( warn
|| strcmp( t, "<unknown>" )) // type not listed in dcoptypes.h || strcmp( t, "<unknown>" )) // type not listed in dcoptypes.h
qWarning( "WARNING: DCOPReply<%s>: cast to '%s' error", tqWarning( "WARNING: DCOPReply<%s>: cast to '%s' error",
STR( type ), t ); STR( type ), t );
return false; return false;
} }
@ -57,7 +57,7 @@ DCOPReply DCOPRef::callInternal( const TQCString& fun, const TQCString& args, co
{ {
DCOPReply reply; DCOPReply reply;
if ( isNull() ) { if ( isNull() ) {
qWarning( "DCOPRef: call '%s' on null reference error", tqWarning( "DCOPRef: call '%s' on null reference error",
STR( fun ) ); STR( fun ) );
return reply; return reply;
} }
@ -65,13 +65,13 @@ DCOPReply DCOPRef::callInternal( const TQCString& fun, const TQCString& args, co
if ( fun.find('(') == -1 ) { if ( fun.find('(') == -1 ) {
sig += args; sig += args;
if( args.find( "<unknown" ) != -1 ) if( args.find( "<unknown" ) != -1 )
qWarning("DCOPRef: unknown type error " tqWarning("DCOPRef: unknown type error "
"<\"%s\",\"%s\">::call(\"%s\",%s", "<\"%s\",\"%s\">::call(\"%s\",%s",
STR(m_app), STR(m_obj), STR(fun), args.data()+1 ); STR(m_app), STR(m_obj), STR(fun), args.data()+1 );
} }
DCOPClient* dc = dcopClient(); DCOPClient* dc = dcopClient();
if ( !dc || !dc->isAttached() ) { if ( !dc || !dc->isAttached() ) {
qWarning( "DCOPRef::call(): no DCOP client or client not attached error" ); tqWarning( "DCOPRef::call(): no DCOP client or client not attached error" );
return reply; return reply;
} }
dc->call( m_app, m_obj, sig, data, reply.type, reply.data, useEventLoop == UseEventLoop, timeout ); dc->call( m_app, m_obj, sig, data, reply.type, reply.data, useEventLoop == UseEventLoop, timeout );
@ -81,7 +81,7 @@ DCOPReply DCOPRef::callInternal( const TQCString& fun, const TQCString& args, co
bool DCOPRef::sendInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data ) bool DCOPRef::sendInternal( const TQCString& fun, const TQCString& args, const TQByteArray& data )
{ {
if ( isNull() ) { if ( isNull() ) {
qWarning( "DCOPRef: send '%s' on null reference error", tqWarning( "DCOPRef: send '%s' on null reference error",
STR( fun ) ); STR( fun ) );
return false; return false;
} }
@ -90,13 +90,13 @@ bool DCOPRef::sendInternal( const TQCString& fun, const TQCString& args, const T
if ( fun.find('(') == -1 ) { if ( fun.find('(') == -1 ) {
sig += args; sig += args;
if( args.find( "<unknown" ) != -1 ) if( args.find( "<unknown" ) != -1 )
qWarning("DCOPRef: unknown type error " tqWarning("DCOPRef: unknown type error "
"<\"%s\",\"%s\">::send(\"%s\",%s", "<\"%s\",\"%s\">::send(\"%s\",%s",
STR(m_app), STR(m_obj), STR(fun), args.data()+1 ); STR(m_app), STR(m_obj), STR(fun), args.data()+1 );
} }
DCOPClient* dc = dcopClient(); DCOPClient* dc = dcopClient();
if ( !dc || !dc->isAttached() ) { if ( !dc || !dc->isAttached() ) {
qWarning( "DCOPRef::send(): no DCOP client or client not attached error" ); tqWarning( "DCOPRef::send(): no DCOP client or client not attached error" );
return false; return false;
} }
return dc->send( m_app, m_obj, sig, data ); return dc->send( m_app, m_obj, sig, data );

@ -263,7 +263,7 @@ inline TQDataStream & operator << (TQDataStream & str, const DCOPArg& arg )
* *
* \code * \code
* if ( example.send( "pingMe", "message" ) == false ) * if ( example.send( "pingMe", "message" ) == false )
* qWarning("could not ping example" ); * tqWarning("could not ping example" );
* \endcode * \endcode
* *
* A DCOP reference operates on DCOPClient::mainClient(), unless you * A DCOP reference operates on DCOPClient::mainClient(), unless you

@ -130,7 +130,7 @@ static TQCString readQCString(TQDataStream &ds)
int bytesLeft = device->size()-device->at(); int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft)) if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{ {
qWarning("Corrupt data!\n"); tqWarning("Corrupt data!\n");
printf("bytesLeft: %d, len: %d\n", bytesLeft, len); printf("bytesLeft: %d, len: %d\n", bytesLeft, len);
return result; return result;
} }
@ -149,7 +149,7 @@ static TQByteArray readQByteArray(TQDataStream &ds)
int bytesLeft = device->size()-device->at(); int bytesLeft = device->size()-device->at();
if ((bytesLeft < 0 ) || (len > (uint) bytesLeft)) if ((bytesLeft < 0 ) || (len > (uint) bytesLeft))
{ {
qWarning("Corrupt data!\n"); tqWarning("Corrupt data!\n");
return result; return result;
} }
result.resize( (uint)len ); result.resize( (uint)len );
@ -241,7 +241,7 @@ void DCOPIceWriteChar(register IceConn iceConn, unsigned long nbytes, char *ptr)
{ {
DCOPConnection* conn = the_server->findConn( iceConn ); DCOPConnection* conn = the_server->findConn( iceConn );
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
qWarning("DCOPServer: DCOPIceWriteChar() Writing %d bytes [%s]", nbytes, conn ? conn->appId.data() : "<unknown>"); tqWarning("DCOPServer: DCOPIceWriteChar() Writing %d bytes [%s]", nbytes, conn ? conn->appId.data() : "<unknown>");
#endif #endif
if (conn) if (conn)
@ -251,7 +251,7 @@ qWarning("DCOPServer: DCOPIceWriteChar() Writing %d bytes [%s]", nbytes, conn ?
TQByteArray _data(nbytes); TQByteArray _data(nbytes);
memcpy(_data.data(), ptr, nbytes); memcpy(_data.data(), ptr, nbytes);
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
qWarning("DCOPServer: _IceWrite() outputBlocked. Queuing %d bytes.", _data.size()); tqWarning("DCOPServer: _IceWrite() outputBlocked. Queuing %d bytes.", _data.size());
#endif #endif
conn->outputBuffer.append(_data); conn->outputBuffer.append(_data);
return; return;
@ -273,14 +273,14 @@ static void DCOPIceWrite(IceConn iceConn, const TQByteArray &_data)
{ {
DCOPConnection* conn = the_server->findConn( iceConn ); DCOPConnection* conn = the_server->findConn( iceConn );
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
qWarning("DCOPServer: DCOPIceWrite() Writing %d bytes [%s]", _data.size(), conn ? conn->appId.data() : "<unknown>"); tqWarning("DCOPServer: DCOPIceWrite() Writing %d bytes [%s]", _data.size(), conn ? conn->appId.data() : "<unknown>");
#endif #endif
if (conn) if (conn)
{ {
if (conn->outputBlocked) if (conn->outputBlocked)
{ {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
qWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.size()); tqWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.size());
#endif #endif
conn->outputBuffer.append(_data); conn->outputBuffer.append(_data);
return; return;
@ -299,7 +299,7 @@ qWarning("DCOPServer: DCOPIceWrite() outputBlocked. Queuing %d bytes.", _data.si
void DCOPConnection::waitForOutputReady(const TQByteArray &_data, int start) void DCOPConnection::waitForOutputReady(const TQByteArray &_data, int start)
{ {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
qWarning("DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d", socket(), _data.size(), start); tqWarning("DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d", socket(), _data.size(), start);
#endif #endif
outputBlocked = true; outputBlocked = true;
outputBuffer.append(_data); outputBuffer.append(_data);
@ -317,7 +317,7 @@ qWarning("DCOPServer: waitForOutputReady fd = %d datasize = %d start = %d", sock
void DCOPServer::slotOutputReady(int socket) void DCOPServer::slotOutputReady(int socket)
{ {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
qWarning("DCOPServer: slotOutputReady fd = %d", socket); tqWarning("DCOPServer: slotOutputReady fd = %d", socket);
#endif #endif
// Find out connection. // Find out connection.
DCOPConnection *conn = fd_clients.find(socket); DCOPConnection *conn = fd_clients.find(socket);
@ -351,7 +351,7 @@ void DCOPConnection::slotOutputReady()
fcntl(fd, F_SETFL, fd_fl); fcntl(fd, F_SETFL, fd_fl);
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
qWarning("DCOPServer: slotOutputReady() %d bytes written", nwritten); tqWarning("DCOPServer: slotOutputReady() %d bytes written", nwritten);
#endif #endif
if (nwritten < 0) if (nwritten < 0)
@ -370,7 +370,7 @@ qWarning("DCOPServer: slotOutputReady() %d bytes written", nwritten);
if (outputBuffer.isEmpty()) if (outputBuffer.isEmpty())
{ {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
qWarning("DCOPServer: slotOutputRead() all data transmitted."); tqWarning("DCOPServer: slotOutputRead() all data transmitted.");
#endif #endif
outputBlocked = false; outputBlocked = false;
outputBufferNotifier->setEnabled(false); outputBufferNotifier->setEnabled(false);
@ -378,7 +378,7 @@ qWarning("DCOPServer: slotOutputRead() all data transmitted.");
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
else else
{ {
qWarning("DCOPServer: slotOutputRead() more data to send."); tqWarning("DCOPServer: slotOutputRead() more data to send.");
} }
#endif #endif
} }
@ -390,7 +390,7 @@ static void DCOPIceSendData(register IceConn _iceConn,
if (_iceConn->outbufptr > _iceConn->outbuf) if (_iceConn->outbufptr > _iceConn->outbuf)
{ {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
qWarning("DCOPServer: Flushing data, fd = %d", IceConnectionNumber(_iceConn)); tqWarning("DCOPServer: Flushing data, fd = %d", IceConnectionNumber(_iceConn));
#endif #endif
IceFlush( _iceConn ); IceFlush( _iceConn );
} }
@ -713,7 +713,7 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
{ {
DCOPConnection* conn = clients.find( iceConn ); DCOPConnection* conn = clients.find( iceConn );
if ( !conn ) { if ( !conn ) {
qWarning("DCOPServer::processMessage message from unknown connection. [opcode = %d]", opcode); tqWarning("DCOPServer::processMessage message from unknown connection. [opcode = %d]", opcode);
return; return;
} }
switch( opcode ) { switch( opcode ) {
@ -733,13 +733,13 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
int datalen = ba.size(); int datalen = ba.size();
if ( opcode == DCOPReplyDelayed ) { if ( opcode == DCOPReplyDelayed ) {
if ( !target ) if ( !target )
qWarning("DCOPServer::DCOPReplyDelayed for unknown connection."); tqWarning("DCOPServer::DCOPReplyDelayed for unknown connection.");
else if ( !conn ) else if ( !conn )
qWarning("DCOPServer::DCOPReplyDelayed from unknown connection."); tqWarning("DCOPServer::DCOPReplyDelayed from unknown connection.");
else if (!conn->waitingForDelayedReply.removeRef( target->iceConn )) else if (!conn->waitingForDelayedReply.removeRef( target->iceConn ))
qWarning("DCOPServer::DCOPReplyDelayed from/to does not match. (#2)"); tqWarning("DCOPServer::DCOPReplyDelayed from/to does not match. (#2)");
else if (!target->waitingOnReply.removeRef(iceConn)) else if (!target->waitingOnReply.removeRef(iceConn))
qWarning("DCOPServer::DCOPReplyDelayed for client who wasn't waiting on one!"); tqWarning("DCOPServer::DCOPReplyDelayed for client who wasn't waiting on one!");
} }
if ( target ) { if ( target ) {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
@ -747,7 +747,7 @@ if (opcode == DCOPSend)
{ {
TQCString obj = readQCString(ds); TQCString obj = readQCString(ds);
TQCString fun = readQCString(ds); TQCString fun = readQCString(ds);
qWarning("Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data()); tqWarning("Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data());
} }
#endif #endif
IceGetHeader( target->iceConn, majorOpcode, opcode, IceGetHeader( target->iceConn, majorOpcode, opcode,
@ -765,7 +765,7 @@ if (opcode == DCOPSend)
TQCString replyType; TQCString replyType;
TQByteArray replyData; TQByteArray replyData;
if ( !receive( toApp, obj, fun, data, replyType, replyData, iceConn ) ) { if ( !receive( toApp, obj, fun, data, replyType, replyData, iceConn ) ) {
qWarning("%s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() ); tqWarning("%s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() );
} }
} else if ( toApp[toApp.length()-1] == '*') { } else if ( toApp[toApp.length()-1] == '*') {
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
@ -773,7 +773,7 @@ if (opcode == DCOPSend)
{ {
TQCString obj = readQCString(ds); TQCString obj = readQCString(ds);
TQCString fun = readQCString(ds); TQCString fun = readQCString(ds);
qWarning("Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data()); tqWarning("Sending %d bytes from %s to %s. DCOPSend %s", length, fromApp.data(), toApp.data(), fun.data());
} }
#endif #endif
// handle a multicast. // handle a multicast.
@ -815,7 +815,7 @@ if (opcode == DCOPCall)
{ {
TQCString obj = readQCString(ds); TQCString obj = readQCString(ds);
TQCString fun = readQCString(ds); TQCString fun = readQCString(ds);
qWarning("Sending %d bytes from %s to %s. DCOPCall %s", length, fromApp.data(), toApp.data(), fun.data()); tqWarning("Sending %d bytes from %s to %s. DCOPCall %s", length, fromApp.data(), toApp.data(), fun.data());
} }
#endif #endif
target->waitingForReply.append( iceConn ); target->waitingForReply.append( iceConn );
@ -839,7 +839,7 @@ if (opcode == DCOPCall)
TQByteArray data = readQByteArray(ds); TQByteArray data = readQByteArray(ds);
b = receive( toApp, obj, fun, data, replyType, replyData, iceConn ); b = receive( toApp, obj, fun, data, replyType, replyData, iceConn );
if ( !b ) if ( !b )
qWarning("%s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() ); tqWarning("%s failure: object '%s' has no function '%s'", toApp.data(), obj.data(), fun.data() );
} }
if (b) { if (b) {
@ -893,7 +893,7 @@ if (opcode == DCOPCall)
int datalen = ba.size(); int datalen = ba.size();
if ( !connreply ) if ( !connreply )
qWarning("DCOPServer::DCOPReply for unknown connection."); tqWarning("DCOPServer::DCOPReply for unknown connection.");
else { else {
conn->waitingForReply.removeRef( connreply->iceConn ); conn->waitingForReply.removeRef( connreply->iceConn );
if ( opcode == DCOPReplyWait ) if ( opcode == DCOPReplyWait )
@ -903,7 +903,7 @@ if (opcode == DCOPCall)
else else
{ // DCOPReply or DCOPReplyFailed { // DCOPReply or DCOPReplyFailed
if (!connreply->waitingOnReply.removeRef(iceConn)) if (!connreply->waitingOnReply.removeRef(iceConn))
qWarning("DCOPServer::DCOPReply from %s to %s who wasn't waiting on one!", tqWarning("DCOPServer::DCOPReply from %s to %s who wasn't waiting on one!",
fromApp.data(), toApp.data()); fromApp.data(), toApp.data());
} }
IceGetHeader( connreply->iceConn, majorOpcode, opcode, IceGetHeader( connreply->iceConn, majorOpcode, opcode,
@ -917,7 +917,7 @@ if (opcode == DCOPCall)
} }
break; break;
default: default:
qWarning("DCOPServer::processMessage unknown message"); tqWarning("DCOPServer::processMessage unknown message");
} }
} }
@ -986,7 +986,7 @@ DCOPServer::DCOPServer(bool _suicide)
DCOPAuthCount, const_cast<char **>(DCOPAuthNames), DCOPAuthCount, const_cast<char **>(DCOPAuthNames),
DCOPClientAuthProcs, 0); DCOPClientAuthProcs, 0);
if (_kde_IceLastMajorOpcode < 1 ) if (_kde_IceLastMajorOpcode < 1 )
qWarning("DCOPServer Error: incorrect major opcode!"); tqWarning("DCOPServer Error: incorrect major opcode!");
the_server = this; the_server = this;
if (( majorOpcode = IceRegisterForProtocolReply (const_cast<char *>("DCOP"), if (( majorOpcode = IceRegisterForProtocolReply (const_cast<char *>("DCOP"),
@ -1004,7 +1004,7 @@ DCOPServer::DCOPServer(bool _suicide)
NULL /* IceIOErrorProc */ NULL /* IceIOErrorProc */
)) < 0) )) < 0)
{ {
qWarning("Could not register DCOP protocol with ICE"); tqWarning("Could not register DCOP protocol with ICE");
} }
char errormsg[256]; char errormsg[256];
@ -1043,10 +1043,10 @@ DCOPServer::DCOPServer(bool _suicide)
#if 0 #if 0
if (!SetAuthentication_local(numTransports, listenObjs)) if (!SetAuthentication_local(numTransports, listenObjs))
qFatal("DCOPSERVER: authentication setup failed."); tqFatal("DCOPSERVER: authentication setup failed.");
#endif #endif
if (!SetAuthentication(numTransports, listenObjs, &authDataEntries)) if (!SetAuthentication(numTransports, listenObjs, &authDataEntries))
qFatal("DCOPSERVER: authentication setup failed."); tqFatal("DCOPSERVER: authentication setup failed.");
IceAddConnectionWatch (DCOPWatchProc, static_cast<IcePointer>(this)); IceAddConnectionWatch (DCOPWatchProc, static_cast<IcePointer>(this));
_IceWriteHandler = DCOPIceWriteChar; _IceWriteHandler = DCOPIceWriteChar;
@ -1119,7 +1119,7 @@ DCOPConnection* DCOPServer::findApp( const TQCString& appId )
*/ */
void DCOPServer::slotCleanDeadConnections() void DCOPServer::slotCleanDeadConnections()
{ {
qWarning("DCOP Cleaning up dead connections."); tqWarning("DCOP Cleaning up dead connections.");
while(!deadConnections.isEmpty()) while(!deadConnections.isEmpty())
{ {
IceConn iceConn = deadConnections.take(0); IceConn iceConn = deadConnections.take(0);
@ -1158,9 +1158,9 @@ void DCOPServer::newClient( int /*socket*/ )
IceConn iceConn = IceAcceptConnection( static_cast<const DCOPListener*>(sender())->listenObj, &status); IceConn iceConn = IceAcceptConnection( static_cast<const DCOPListener*>(sender())->listenObj, &status);
if (!iceConn) { if (!iceConn) {
if (status == IceAcceptBadMalloc) if (status == IceAcceptBadMalloc)
qWarning("Failed to alloc connection object!\n"); tqWarning("Failed to alloc connection object!\n");
else // IceAcceptFailure else // IceAcceptFailure
qWarning("Failed to accept ICE connection!\n"); tqWarning("Failed to accept ICE connection!\n");
return; return;
} }
@ -1173,9 +1173,9 @@ void DCOPServer::newClient( int /*socket*/ )
if (cstatus != IceConnectAccepted) { if (cstatus != IceConnectAccepted) {
if (cstatus == IceConnectIOError) if (cstatus == IceConnectIOError)
qWarning ("IO error opening ICE Connection!\n"); tqWarning ("IO error opening ICE Connection!\n");
else else
qWarning ("ICE Connection rejected!\n"); tqWarning ("ICE Connection rejected!\n");
deadConnections.removeRef(iceConn); deadConnections.removeRef(iceConn);
(void) IceCloseConnection (iceConn); (void) IceCloseConnection (iceConn);
} }
@ -1206,7 +1206,7 @@ void DCOPServer::removeConnection( void* data )
IceConn iceConn = conn->waitingForReply.take(0); IceConn iceConn = conn->waitingForReply.take(0);
if (iceConn) { if (iceConn) {
DCOPConnection* target = clients.find( iceConn ); DCOPConnection* target = clients.find( iceConn );
qWarning("DCOP aborting call from '%s' to '%s'", target ? target->appId.data() : "<unknown>" , conn->appId.data() ); tqWarning("DCOP aborting call from '%s' to '%s'", target ? target->appId.data() : "<unknown>" , conn->appId.data() );
TQByteArray reply; TQByteArray reply;
DCOPMsg *pMsg; DCOPMsg *pMsg;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed, IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
@ -1217,9 +1217,9 @@ void DCOPServer::removeConnection( void* data )
DCOPIceSendData(iceConn, reply); DCOPIceSendData(iceConn, reply);
_DCOPIceSendEnd(); _DCOPIceSendEnd();
if (!target) if (!target)
qWarning("DCOP Error: unknown target in waitingForReply"); tqWarning("DCOP Error: unknown target in waitingForReply");
else if (!target->waitingOnReply.removeRef(conn->iceConn)) else if (!target->waitingOnReply.removeRef(conn->iceConn))
qWarning("DCOP Error: client in waitingForReply wasn't waiting on reply"); tqWarning("DCOP Error: client in waitingForReply wasn't waiting on reply");
} }
} }
@ -1228,7 +1228,7 @@ void DCOPServer::removeConnection( void* data )
IceConn iceConn = conn->waitingForDelayedReply.take(0); IceConn iceConn = conn->waitingForDelayedReply.take(0);
if (iceConn) { if (iceConn) {
DCOPConnection* target = clients.find( iceConn ); DCOPConnection* target = clients.find( iceConn );
qWarning("DCOP aborting (delayed) call from '%s' to '%s'", target ? target->appId.data() : "<unknown>", conn->appId.data() ); tqWarning("DCOP aborting (delayed) call from '%s' to '%s'", target ? target->appId.data() : "<unknown>", conn->appId.data() );
TQByteArray reply; TQByteArray reply;
DCOPMsg *pMsg; DCOPMsg *pMsg;
IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed, IceGetHeader( iceConn, majorOpcode, DCOPReplyFailed,
@ -1239,9 +1239,9 @@ void DCOPServer::removeConnection( void* data )
DCOPIceSendData( iceConn, reply ); DCOPIceSendData( iceConn, reply );
_DCOPIceSendEnd(); _DCOPIceSendEnd();
if (!target) if (!target)
qWarning("DCOP Error: unknown target in waitingForDelayedReply"); tqWarning("DCOP Error: unknown target in waitingForDelayedReply");
else if (!target->waitingOnReply.removeRef(conn->iceConn)) else if (!target->waitingOnReply.removeRef(conn->iceConn))
qWarning("DCOP Error: client in waitingForDelayedReply wasn't waiting on reply"); tqWarning("DCOP Error: client in waitingForDelayedReply wasn't waiting on reply");
} }
} }
while (!conn->waitingOnReply.isEmpty()) while (!conn->waitingOnReply.isEmpty())
@ -1251,19 +1251,19 @@ void DCOPServer::removeConnection( void* data )
DCOPConnection* target = clients.find( iceConn ); DCOPConnection* target = clients.find( iceConn );
if (!target) if (!target)
{ {
qWarning("DCOP Error: still waiting for answer from non-existing client."); tqWarning("DCOP Error: still waiting for answer from non-existing client.");
continue; continue;
} }
qWarning("DCOP aborting while waiting for answer from '%s'", target->appId.data()); tqWarning("DCOP aborting while waiting for answer from '%s'", target->appId.data());
if (!target->waitingForReply.removeRef(conn->iceConn) && if (!target->waitingForReply.removeRef(conn->iceConn) &&
!target->waitingForDelayedReply.removeRef(conn->iceConn)) !target->waitingForDelayedReply.removeRef(conn->iceConn))
qWarning("DCOP Error: called client has forgotten about caller"); tqWarning("DCOP Error: called client has forgotten about caller");
} }
} }
if ( !conn->appId.isNull() ) { if ( !conn->appId.isNull() ) {
#ifndef NDEBUG #ifndef NDEBUG
qDebug("DCOP: unregister '%s'", conn->appId.data() ); tqDebug("DCOP: unregister '%s'", conn->appId.data() );
#endif #endif
if ( !conn->daemon ) if ( !conn->daemon )
{ {
@ -1362,7 +1362,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
{ {
DCOPConnection* conn = clients.find( iceConn ); DCOPConnection* conn = clients.find( iceConn );
if (conn) { if (conn) {
//qDebug("DCOPServer: %s emits %s", conn->appId.data(), fun.data()); //tqDebug("DCOPServer: %s emits %s", conn->appId.data(), fun.data());
dcopSignals->emitSignal(conn, fun, data, false); dcopSignals->emitSignal(conn, fun, data, false);
} }
replyType = "void"; replyType = "void";
@ -1385,7 +1385,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
conn->daemon = true; conn->daemon = true;
#ifndef NDEBUG #ifndef NDEBUG
qDebug( "DCOP: new daemon %s", conn->appId.data() ); tqDebug( "DCOP: new daemon %s", conn->appId.data() );
#endif #endif
currentClientNumber--; currentClientNumber--;
@ -1429,14 +1429,14 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
currentClientNumber++; currentClientNumber++;
m_timer->stop(); // abort termination if we were planning one m_timer->stop(); // abort termination if we were planning one
#ifndef NDEBUG #ifndef NDEBUG
qDebug("DCOP: register '%s' -> number of clients is now %d", app2.data(), currentClientNumber ); tqDebug("DCOP: register '%s' -> number of clients is now %d", app2.data(), currentClientNumber );
#endif #endif
} }
#ifndef NDEBUG #ifndef NDEBUG
else else
{ {
oldAppId = conn->appId; oldAppId = conn->appId;
qDebug("DCOP: '%s' now known as '%s'", conn->appId.data(), app2.data() ); tqDebug("DCOP: '%s' now known as '%s'", conn->appId.data(), app2.data() );
} }
#endif #endif
@ -1520,7 +1520,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
TQ_INT8 Volatile; TQ_INT8 Volatile;
args >> Volatile; args >> Volatile;
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
qDebug("DCOPServer: connectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s)", sender.data(), senderObj.data(), signal.data(), receiverObj.data(), slot.data()); tqDebug("DCOPServer: connectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s)", sender.data(), senderObj.data(), signal.data(), receiverObj.data(), slot.data());
#endif #endif
bool b = dcopSignals->connectSignal(sender, senderObj, signal, conn, receiverObj, slot, (Volatile != 0)); bool b = dcopSignals->connectSignal(sender, senderObj, signal, conn, receiverObj, slot, (Volatile != 0));
replyType = "bool"; replyType = "bool";
@ -1538,7 +1538,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
TQCString receiverObj = readQCString(args); TQCString receiverObj = readQCString(args);
TQCString slot = readQCString(args); TQCString slot = readQCString(args);
#ifdef DCOP_DEBUG #ifdef DCOP_DEBUG
qDebug("DCOPServer: disconnectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s)", sender.data(), senderObj.data(), signal.data(), receiverObj.data(), slot.data()); tqDebug("DCOPServer: disconnectSignal(sender = %s senderObj = %s signal = %s recvObj = %s slot = %s)", sender.data(), senderObj.data(), signal.data(), receiverObj.data(), slot.data());
#endif #endif
bool b = dcopSignals->disconnectSignal(sender, senderObj, signal, conn, receiverObj, slot); bool b = dcopSignals->disconnectSignal(sender, senderObj, signal, conn, receiverObj, slot);
replyType = "bool"; replyType = "bool";
@ -1629,9 +1629,9 @@ static bool isRunning(const TQCString &fName, bool printNetworkId = false)
f.close(); f.close();
if (ok && pid && (kill(pid, SIGHUP) == 0)) { if (ok && pid && (kill(pid, SIGHUP) == 0)) {
if (printNetworkId) if (printNetworkId)
qWarning("%s", contents.left(pos).data()); tqWarning("%s", contents.left(pos).data());
else else
qWarning( "---------------------------------\n" tqWarning( "---------------------------------\n"
"It looks like dcopserver is already running. If you are sure\n" "It looks like dcopserver is already running. If you are sure\n"
"that it is not already running, remove %s\n" "that it is not already running, remove %s\n"
"and start dcopserver again.\n" "and start dcopserver again.\n"
@ -1719,8 +1719,8 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
if (retcode != 0) if (retcode != 0)
{ {
qWarning("dcopserver: Could not raise limit on number of open files."); tqWarning("dcopserver: Could not raise limit on number of open files.");
qWarning("dcopserver: Current limit = %d", cur_limit); tqWarning("dcopserver: Current limit = %d", cur_limit);
} }
} }
} }
@ -1743,7 +1743,7 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
if (client.attach()) if (client.attach())
return 0; return 0;
} }
qWarning("DCOPServer self-test failed."); tqWarning("DCOPServer self-test failed.");
system(findDcopserverShutdown()+" --kill"); system(findDcopserverShutdown()+" --kill");
return 1; return 1;
} }

@ -264,7 +264,7 @@ DCOPSignals::removeConnections(DCOPConnection *conn, const TQCString &obj)
} }
else else
{ {
qDebug("Error: Signal Connection was not in signalList!\n"); tqDebug("Error: Signal Connection was not in signalList!\n");
} }
list->removeRef(current); list->removeRef(current);
delete current; delete current;

@ -38,7 +38,7 @@ DCOPClient *client = 0;
bool MyDCOPObject::process(const TQCString &fun, const TQByteArray &data, bool MyDCOPObject::process(const TQCString &fun, const TQByteArray &data,
TQCString& replyType, TQByteArray &replyData) TQCString& replyType, TQByteArray &replyData)
{ {
qDebug("in MyDCOPObject::process, fun = %s", fun.data()); tqDebug("in MyDCOPObject::process, fun = %s", fun.data());
// note "fun" is normlized here (i.e. whitespace clean) // note "fun" is normlized here (i.e. whitespace clean)
if (fun == "aFunction(TQString,int)") { if (fun == "aFunction(TQString,int)") {
@ -65,13 +65,13 @@ bool MyDCOPObject::process(const TQCString &fun, const TQByteArray &data,
} }
if (fun == "isAliveSlot(int)") { if (fun == "isAliveSlot(int)") {
qDebug("isAliveSlot(int)"); tqDebug("isAliveSlot(int)");
bool connectResult = client->disconnectDCOPSignal("", objId(), "", objId(), "" ); bool connectResult = client->disconnectDCOPSignal("", objId(), "", objId(), "" );
qDebug("disconnectDCOPSignal returns %s", connectResult ? "true" : "false"); tqDebug("disconnectDCOPSignal returns %s", connectResult ? "true" : "false");
return true; return true;
} }
if (fun == "countDown()") { if (fun == "countDown()") {
qDebug("countDown() countDownAction = %p", countDownAction); tqDebug("countDown() countDownAction = %p", countDownAction);
if (countDownAction2) if (countDownAction2)
{ {
replyType = "TQString"; replyType = "TQString";
@ -100,7 +100,7 @@ qDebug("countDown() countDownAction = %p", countDownAction);
void MyDCOPObject::slotTimeout() void MyDCOPObject::slotTimeout()
{ {
qDebug("MyDCOPObject::slotTimeout() %d", countDownCount); tqDebug("MyDCOPObject::slotTimeout() %d", countDownCount);
countDownCount--; countDownCount--;
if (countDownCount == 0) if (countDownCount == 0)
{ {
@ -119,7 +119,7 @@ void MyDCOPObject::slotTimeout()
void MyDCOPObject::slotTimeout2() void MyDCOPObject::slotTimeout2()
{ {
qDebug("MyDCOPObject::slotTimeout2() %d", countDownCount2); tqDebug("MyDCOPObject::slotTimeout2() %d", countDownCount2);
countDownCount2--; countDownCount2--;
if (countDownCount2 == 0) if (countDownCount2 == 0)
{ {
@ -153,25 +153,25 @@ void TestObject::slotTimeout()
{ {
TQCString replyType; TQCString replyType;
TQByteArray data, reply; TQByteArray data, reply;
qWarning("#3 Calling countDown"); tqWarning("#3 Calling countDown");
if (!client->call(m_app, "object1", "countDown()", data, replyType, reply)) if (!client->call(m_app, "object1", "countDown()", data, replyType, reply))
qDebug("#3 I couldn't call countDown"); tqDebug("#3 I couldn't call countDown");
else else
qDebug("#3 countDown() return type was '%s'", replyType.data() ); tqDebug("#3 countDown() return type was '%s'", replyType.data() );
} }
void TestObject::slotCallBack(int callId, const TQCString &replyType, const TQByteArray &replyData) void TestObject::slotCallBack(int callId, const TQCString &replyType, const TQByteArray &replyData)
{ {
qWarning("Call Back! callId = %d", callId); tqWarning("Call Back! callId = %d", callId);
qWarning("Type = %s", replyType.data()); tqWarning("Type = %s", replyType.data());
TQDataStream args(replyData, IO_ReadOnly); TQDataStream args(replyData, IO_ReadOnly);
TQString arg1; TQString arg1;
args >> arg1; args >> arg1;
qWarning("Value = %s", arg1.latin1()); tqWarning("Value = %s", arg1.latin1());
} }
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@ -190,12 +190,12 @@ int main(int argc, char **argv)
{ {
TQCString appId = argv[1]; TQCString appId = argv[1];
TestObject obj(appId); TestObject obj(appId);
qWarning("#1 Calling countDown"); tqWarning("#1 Calling countDown");
int result = client->callAsync(appId, "object1", "countDown()", data, &obj, TQT_SLOT(slotCallBack(int, const TQCString&, const TQByteArray&))); int result = client->callAsync(appId, "object1", "countDown()", data, &obj, TQT_SLOT(slotCallBack(int, const TQCString&, const TQByteArray&)));
qDebug("#1 countDown() call id = %d", result); tqDebug("#1 countDown() call id = %d", result);
qWarning("#2 Calling countDown"); tqWarning("#2 Calling countDown");
result = client->callAsync(appId, "object1", "countDown()", data, &obj, TQT_SLOT(slotCallBack(int, const TQCString&, const TQByteArray&))); result = client->callAsync(appId, "object1", "countDown()", data, &obj, TQT_SLOT(slotCallBack(int, const TQCString&, const TQByteArray&)));
qDebug("#2 countDown() call id = %d", result); tqDebug("#2 countDown() call id = %d", result);
app.exec(); app.exec();
return 0; return 0;
@ -204,10 +204,10 @@ int main(int argc, char **argv)
// client->attach(); // attach to the server, now we can use DCOP service // client->attach(); // attach to the server, now we can use DCOP service
client->registerAs( app.name(), false ); // register at the server, now others can call us. client->registerAs( app.name(), false ); // register at the server, now others can call us.
qDebug("I registered as '%s'", client->appId().data() ); tqDebug("I registered as '%s'", client->appId().data() );
if ( client->isApplicationRegistered( app.name() ) ) if ( client->isApplicationRegistered( app.name() ) )
qDebug("indeed, we are registered!"); tqDebug("indeed, we are registered!");
TQDataStream dataStream( data, IO_WriteOnly ); TQDataStream dataStream( data, IO_WriteOnly );
dataStream << (int) 43; dataStream << (int) 43;
@ -216,23 +216,23 @@ int main(int argc, char **argv)
MyDCOPObject *obj1 = new MyDCOPObject("object1"); MyDCOPObject *obj1 = new MyDCOPObject("object1");
bool connectResult = client->connectDCOPSignal("", "alive(int , TQCString)", "object1", "isAliveSlot(int)", false); bool connectResult = client->connectDCOPSignal("", "alive(int , TQCString)", "object1", "isAliveSlot(int)", false);
qDebug("connectDCOPSignal returns %s", connectResult ? "true" : "false"); tqDebug("connectDCOPSignal returns %s", connectResult ? "true" : "false");
TQDataStream ds(data, IO_WriteOnly); TQDataStream ds(data, IO_WriteOnly);
ds << TQString("fourty-two") << 42; ds << TQString("fourty-two") << 42;
if (!client->call(app.name(), "object1", "aFunction(TQString,int)", data, replyType, reply)) { if (!client->call(app.name(), "object1", "aFunction(TQString,int)", data, replyType, reply)) {
qDebug("I couldn't call myself"); tqDebug("I couldn't call myself");
assert( 0 ); assert( 0 );
} }
else { else {
qDebug("return type was '%s'", replyType.data() ); tqDebug("return type was '%s'", replyType.data() );
assert( replyType == "void" ); assert( replyType == "void" );
} }
client->send(app.name(), "object1", "aFunction(TQString,int)", data ); client->send(app.name(), "object1", "aFunction(TQString,int)", data );
int n = client->registeredApplications().count(); int n = client->registeredApplications().count();
qDebug("number of attached applications = %d", n ); tqDebug("number of attached applications = %d", n );
TQObject::connect( client, TQT_SIGNAL( applicationRegistered( const TQCString&)), TQObject::connect( client, TQT_SIGNAL( applicationRegistered( const TQCString&)),
obj1, TQT_SLOT( registered( const TQCString& ))); obj1, TQT_SLOT( registered( const TQCString& )));
@ -249,46 +249,46 @@ int main(int argc, char **argv)
// Find a object called "object1" in any application that // Find a object called "object1" in any application that
// meets the criteria "canLaunchRockets()" // meets the criteria "canLaunchRockets()"
// bool boolResult = client->findObject( "", "object1", "canLaunchRockets()", data, foundApp, foundObj); // bool boolResult = client->findObject( "", "object1", "canLaunchRockets()", data, foundApp, foundObj);
// qDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", // tqDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false",
// foundApp.data(), foundObj.data()); // foundApp.data(), foundObj.data());
// Find an application that matches with "konqueror*" // Find an application that matches with "konqueror*"
bool boolResult = client->findObject( "konqueror*", "", "", data, foundApp, foundObj); bool boolResult = client->findObject( "konqueror*", "", "", data, foundApp, foundObj);
qDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", tqDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false",
foundApp.data(), foundObj.data()); foundApp.data(), foundObj.data());
// Find an object called "object1" in any application. // Find an object called "object1" in any application.
boolResult = client->findObject( "", "ksycoca", "", data, foundApp, foundObj); boolResult = client->findObject( "", "ksycoca", "", data, foundApp, foundObj);
qDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", tqDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false",
foundApp.data(), foundObj.data()); foundApp.data(), foundObj.data());
// Find ourselves in any application. // Find ourselves in any application.
boolResult = client->findObject( "testdcop", "ksycoca", "", data, foundApp, foundObj); boolResult = client->findObject( "testdcop", "ksycoca", "", data, foundApp, foundObj);
qDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", tqDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false",
foundApp.data(), foundObj.data()); foundApp.data(), foundObj.data());
DCOPClient *client2 = new DCOPClient(); DCOPClient *client2 = new DCOPClient();
client2->registerAs(app.name(), false); client2->registerAs(app.name(), false);
qDebug("I2 registered as '%s'", client2->appId().data() ); tqDebug("I2 registered as '%s'", client2->appId().data() );
qDebug("Sending to object1"); tqDebug("Sending to object1");
client2->send(app.name(), "object1", "aFunction(TQString,int)", data ); client2->send(app.name(), "object1", "aFunction(TQString,int)", data );
qDebug("Calling object1"); tqDebug("Calling object1");
if (!client2->call(app.name(), "object1", "aFunction(TQString,int)", data, replyType, reply)) if (!client2->call(app.name(), "object1", "aFunction(TQString,int)", data, replyType, reply))
qDebug("I couldn't call myself"); tqDebug("I couldn't call myself");
else else
qDebug("return type was '%s'", replyType.data() ); tqDebug("return type was '%s'", replyType.data() );
qDebug("Calling countDown() in object1"); tqDebug("Calling countDown() in object1");
if (!client2->call(app.name(), "object1", "countDown()", data, replyType, reply)) if (!client2->call(app.name(), "object1", "countDown()", data, replyType, reply))
qDebug("I couldn't call myself"); tqDebug("I couldn't call myself");
else else
qDebug("return type was '%s'", replyType.data() ); tqDebug("return type was '%s'", replyType.data() );
// Find ourselves in any application. // Find ourselves in any application.
boolResult = client2->findObject( "testdcop", "object1", "", data, foundApp, foundObj); boolResult = client2->findObject( "testdcop", "object1", "", data, foundApp, foundObj);
qDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", tqDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false",
foundApp.data(), foundObj.data()); foundApp.data(), foundObj.data());
client->detach(); client->detach();

@ -63,7 +63,7 @@ public:
MyDCOPObject(const TQCString &name) : DCOPObject(name) {} MyDCOPObject(const TQCString &name) : DCOPObject(name) {}
bool process(const TQCString &fun, const TQByteArray &data, bool process(const TQCString &fun, const TQByteArray &data,
TQCString& replyType, TQByteArray &replyData); TQCString& replyType, TQByteArray &replyData);
void function(const TQString &arg1, int arg2) { qDebug("function got arg: %s and %d", arg1.utf8().data(), arg2); } void function(const TQString &arg1, int arg2) { tqDebug("function got arg: %s and %d", arg1.utf8().data(), arg2); }
public slots: public slots:
void slotTimeout(); void slotTimeout();
void slotTimeout2(); void slotTimeout2();

@ -50,7 +50,7 @@ void Driver::test()
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
if ( argc < 2 ) { qWarning("Usage: driver <appid>"); return 1; } if ( argc < 2 ) { tqWarning("Usage: driver <appid>"); return 1; }
const char* appname = strdup( argv[ 1 ] ); const char* appname = strdup( argv[ 1 ] );
argv[ 1 ] = 0; // sue me argv[ 1 ] = 0; // sue me
KCmdLineArgs::init( argc, argv, "TestAppDriver", "Tests the dcop familly of tools + libraries", "1.0" ); // FIXME KCmdLineArgs::init( argc, argv, "TestAppDriver", "Tests the dcop familly of tools + libraries", "1.0" ); // FIXME

@ -167,7 +167,7 @@ void LdapClient::slotData( KIO::Job*, const TQByteArray& data )
void LdapClient::slotInfoMessage( KIO::Job*, const TQString & ) void LdapClient::slotInfoMessage( KIO::Job*, const TQString & )
{ {
//qDebug("Job said \"%s\"", info.latin1()); //tqDebug("Job said \"%s\"", info.latin1());
} }
void LdapClient::slotDone() void LdapClient::slotDone()
@ -176,7 +176,7 @@ void LdapClient::slotDone()
mActive = false; mActive = false;
#if 0 #if 0
for ( TQValueList<LdapObject>::Iterator it = mObjects.begin(); it != mObjects.end(); ++it ) { for ( TQValueList<LdapObject>::Iterator it = mObjects.begin(); it != mObjects.end(); ++it ) {
qDebug( (*it).toString().latin1() ); tqDebug( (*it).toString().latin1() );
} }
#endif #endif
int err = mJob->error(); int err = mJob->error();

@ -157,7 +157,7 @@ bool DBWrapper::find( const TQString& _key, TQString& _val ) {
int ret = data->db->get(data->db, NULL, &key, &val, 0 ); int ret = data->db->get(data->db, NULL, &key, &val, 0 );
if (!ret) { if (!ret) {
_val = TQString::fromUtf8( (char*)val.data, val.size ); _val = TQString::fromUtf8( (char*)val.data, val.size );
qWarning("key: %s val: %sXXX", (char*)key.data, (char*)val.data ); tqWarning("key: %s val: %sXXX", (char*)key.data, (char*)val.data );
return true; return true;
} }
return false; return false;

@ -86,7 +86,7 @@ bool ResourceEvolution::load() {
if ( it.key().startsWith("PAS-DB-VERSION") ) if ( it.key().startsWith("PAS-DB-VERSION") )
continue; continue;
qWarning( "val:%s", it.value().latin1() ); tqWarning( "val:%s", it.value().latin1() );
VCardTool tool; VCardTool tool;
TQString str = it.value().stripWhiteSpace(); TQString str = it.value().stripWhiteSpace();
Addressee::List list = tool.parseVCards( str ); Addressee::List list = tool.parseVCards( str );

@ -50,14 +50,14 @@ int main(int argc,char **argv)
d.setLocality("Lummerstadt"); d.setLocality("Lummerstadt");
d.setCountry (""); d.setCountry ("");
qDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" ); tqDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" );
qDebug( a.formattedAddress("Jim Knopf").latin1() ); tqDebug( a.formattedAddress("Jim Knopf").latin1() );
qDebug( "-------------------------------------\nShould have US address formatting, local country formatting\n" ); tqDebug( "-------------------------------------\nShould have US address formatting, local country formatting\n" );
qDebug( b.formattedAddress("Huck Finn").latin1() ); tqDebug( b.formattedAddress("Huck Finn").latin1() );
qDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" ); tqDebug( "-------------------------------------\nShould have german address formatting, local country formatting\n" );
qDebug( c.formattedAddress("Jim Knopf").latin1() ); tqDebug( c.formattedAddress("Jim Knopf").latin1() );
qDebug( "-------------------------------------\nShould have local address formatting, local country formatting\n" ); tqDebug( "-------------------------------------\nShould have local address formatting, local country formatting\n" );
qDebug( d.formattedAddress("Jim Knopf").latin1() ); tqDebug( d.formattedAddress("Jim Knopf").latin1() );
} }

@ -84,13 +84,13 @@ ClassValue::clone()
void void
ClassValue::_parse() ClassValue::_parse()
{ {
if (qstricmp(strRep_, "PUBLIC") == 0) if (tqstricmp(strRep_, "PUBLIC") == 0)
classType_ = Public; classType_ = Public;
else if (qstricmp(strRep_, "PRIVATE") == 0) else if (tqstricmp(strRep_, "PRIVATE") == 0)
classType_ = Private; classType_ = Private;
else if (qstricmp(strRep_, "CONFIDENTIAL") == 0) else if (tqstricmp(strRep_, "CONFIDENTIAL") == 0)
classType_ = Confidential; classType_ = Confidential;
else classType_ = Other; else classType_ = Other;

@ -92,12 +92,12 @@ EmailParam::_parse()
for (; it.current(); ++it) { for (; it.current(); ++it) {
if (qstricmp(it.current()->name(), "TYPE") == 0) { if (tqstricmp(it.current()->name(), "TYPE") == 0) {
emailType_ = it.current()->value(); emailType_ = it.current()->value();
continue; continue;
} }
if (qstricmp(it.current()->name(), "PREF") == 0) { if (tqstricmp(it.current()->name(), "PREF") == 0) {
pref_ = true; pref_ = true;
} }
} }

@ -87,11 +87,11 @@ SourceParam::_parse()
par_ = strRep_.left(i); par_ = strRep_.left(i);
val_ = strRep_.right(strRep_.length() - i - 1); val_ = strRep_.right(strRep_.length() - i - 1);
if (qstricmp(par_, "VALUE") == 0 && qstricmp(val_, "uri") == 0) if (tqstricmp(par_, "VALUE") == 0 && tqstricmp(val_, "uri") == 0)
type_ = TypeValue; type_ = TypeValue;
else if (qstricmp(par_, "CONTEXT") == 0 && qstricmp(val_, "word") == 0) else if (tqstricmp(par_, "CONTEXT") == 0 && tqstricmp(val_, "word") == 0)
type_ = TypeContext; type_ = TypeContext;
else if (qstrnicmp(par_, "X-", 2) == 0) { else if (tqstrnicmp(par_, "X-", 2) == 0) {
type_ = TypeX; type_ = TypeX;
} }
else type_ = TypeUnknown; else type_ = TypeUnknown;

@ -130,12 +130,12 @@ VCard::_parse()
firstPart = firstPart.right(firstPart.length() - split - 1); firstPart = firstPart.right(firstPart.length() - split - 1);
} }
if (qstrnicmp(firstPart, "BEGIN", 5) != 0) { // No BEGIN ! if (tqstrnicmp(firstPart, "BEGIN", 5) != 0) { // No BEGIN !
vDebug("No BEGIN"); vDebug("No BEGIN");
return; return;
} }
if (qstrnicmp(valuePart, "VCARD", 5) != 0) { // Not a vcard ! if (tqstrnicmp(valuePart, "VCARD", 5) != 0) { // Not a vcard !
vDebug("No VCARD"); vDebug("No VCARD");
return; return;
} }
@ -203,10 +203,10 @@ VCard::_parse()
firstPart = firstPart.right(firstPart.length() - split - 1); firstPart = firstPart.right(firstPart.length() - split - 1);
} }
if (qstricmp(firstPart, "END") != 0) // No END ! if (tqstricmp(firstPart, "END") != 0) // No END !
return; return;
if (qstricmp(valuePart, "VCARD") != 0) // Not a vcard ! if (tqstricmp(valuePart, "VCARD") != 0) // Not a vcard !
return; return;
} }

@ -416,7 +416,7 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const TQString& vc, int *err )
// first token: // first token:
// verify state, update if necessary // verify state, update if necessary
if ( _state & VC_STATE_BEGIN) { if ( _state & VC_STATE_BEGIN) {
if ( !qstricmp( (*j).latin1(), VCARD_BEGIN ) ) { if ( !tqstricmp( (*j).latin1(), VCARD_BEGIN ) ) {
_state = VC_STATE_BODY; _state = VC_STATE_BODY;
continue; continue;
} else { } else {
@ -424,7 +424,7 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const TQString& vc, int *err )
break; break;
} }
} else if ( _state & VC_STATE_BODY ) { } else if ( _state & VC_STATE_BODY ) {
if ( !qstricmp( (*j).latin1(), VCARD_END ) ) { if ( !tqstricmp( (*j).latin1(), VCARD_END ) ) {
_state |= VC_STATE_END; _state |= VC_STATE_END;
break; break;
} }

@ -46,7 +46,7 @@ namespace KABC {
Addressee::List list = converter.parseVCards( data ); Addressee::List list = converter.parseVCards( data );
// print formatted name of first contact // print formatted name of first contact
qDebug( "name=%s", list[ 0 ].formattedName().latin1() ); tqDebug( "name=%s", list[ 0 ].formattedName().latin1() );
\endcode \endcode
*/ */

@ -63,7 +63,7 @@ int main( int argc, char **argv )
TQFile file( inputFile ); TQFile file( inputFile );
if ( !file.open( IO_ReadOnly ) ) { if ( !file.open( IO_ReadOnly ) ) {
qDebug( "Unable to open file '%s' for reading!", file.name().latin1() ); tqDebug( "Unable to open file '%s' for reading!", file.name().latin1() );
return 1; return 1;
} }

@ -99,7 +99,7 @@ Value KateJSGlobalFunctions::call(ExecState *exec, Object &/*thisObj*/, const Li
{ {
switch (id) { switch (id) {
case Debug: case Debug:
qDebug("Kate (KJS Scripting): %s", args[0].toString(exec).ascii()); tqDebug("Kate (KJS Scripting): %s", args[0].toString(exec).ascii());
return Undefined(); return Undefined();
default: default:
break; break;

@ -127,7 +127,7 @@ KonfUpdate::KonfUpdate()
TQString file = locate("data", "kconf_update/"+TQFile::decodeName(args->getOption("check"))); TQString file = locate("data", "kconf_update/"+TQFile::decodeName(args->getOption("check")));
if (file.isEmpty()) if (file.isEmpty())
{ {
qWarning("File '%s' not found.", args->getOption("check").data()); tqWarning("File '%s' not found.", args->getOption("check").data());
log() << "File '" << TQFile::decodeName(args->getOption("check")) << "' passed on command line not found" << endl; log() << "File '" << TQFile::decodeName(args->getOption("check")) << "' passed on command line not found" << endl;
return; return;
} }
@ -278,7 +278,7 @@ void KonfUpdate::checkGotFile(const TQString &_file, const TQString &id)
file = _file.mid(i+1).stripWhiteSpace(); file = _file.mid(i+1).stripWhiteSpace();
} }
// qDebug("File %s, id %s", file.latin1(), id.latin1()); // tqDebug("File %s, id %s", file.latin1(), id.latin1());
KSimpleConfig cfg(file); KSimpleConfig cfg(file);
cfg.setGroup("$Version"); cfg.setGroup("$Version");
@ -415,7 +415,7 @@ void KonfUpdate::gotId(const TQString &_id)
{ {
if (ids.contains(_id)) if (ids.contains(_id))
{ {
//qDebug("Id '%s' was already in done-list", _id.latin1()); //tqDebug("Id '%s' was already in done-list", _id.latin1());
if (!m_bUseConfigInfo) if (!m_bUseConfigInfo)
{ {
skip = true; skip = true;

@ -870,7 +870,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
g_ctimeDict = 0; g_ctimeDict = 0;
if (incremental) if (incremental)
{ {
qWarning("Reusing existing ksycoca"); tqWarning("Reusing existing ksycoca");
KSycoca *oldSycoca = KSycoca::self(); KSycoca *oldSycoca = KSycoca::self();
KSycocaFactoryList *factories = new KSycocaFactoryList; KSycocaFactoryList *factories = new KSycocaFactoryList;
g_allEntries = new KSycocaEntryListList; g_allEntries = new KSycocaEntryListList;

@ -60,7 +60,7 @@ static void result(const TQString &txt)
static void error(int exitCode, const TQString &txt) static void error(int exitCode, const TQString &txt)
{ {
qWarning("kde-menu: %s", txt.local8Bit().data()); tqWarning("kde-menu: %s", txt.local8Bit().data());
exit(exitCode); exit(exitCode);
} }
@ -150,7 +150,7 @@ int main(int argc, char **argv)
TQCString _launcher = KApplication::launcher(); TQCString _launcher = KApplication::launcher();
if (!DCOPRef(_launcher, _launcher).call("tdeinit_exec_wait", command, args).isValid()) if (!DCOPRef(_launcher, _launcher).call("tdeinit_exec_wait", command, args).isValid())
{ {
qWarning("Can't talk to klauncher!"); tqWarning("Can't talk to klauncher!");
command = KGlobal::dirs()->findExe(command); command = KGlobal::dirs()->findExe(command);
command += " " + args.join(" "); command += " " + args.join(" ");
system(command.local8Bit()); system(command.local8Bit());

@ -441,7 +441,7 @@ void Kded::crashHandler(int)
DCOPClient::emergencyClose(); DCOPClient::emergencyClose();
if (_self) // Don't restart if we were closing down if (_self) // Don't restart if we were closing down
system("kded"); system("kded");
qWarning("Last DCOP call before KDED crash was from application '%s'\n" tqWarning("Last DCOP call before KDED crash was from application '%s'\n"
"to object '%s', function '%s'.", "to object '%s', function '%s'.",
DCOPClient::postMortemSender(), DCOPClient::postMortemSender(),
DCOPClient::postMortemObject(), DCOPClient::postMortemObject(),

@ -18,7 +18,7 @@ int main(int argc, char *argv[])
KMimeType::List mtl = KMimeType::allMimeTypes( ); KMimeType::List mtl = KMimeType::allMimeTypes( );
assert( mtl.count() ); assert( mtl.count() );
qDebug( "Found %d mime types.", mtl.count() ); tqDebug( "Found %d mime types.", mtl.count() );
TQValueListIterator<KMimeType::Ptr> it(mtl.begin()); TQValueListIterator<KMimeType::Ptr> it(mtl.begin());
KServiceTypeProfile::OfferList ol; KServiceTypeProfile::OfferList ol;

@ -4,9 +4,9 @@ class TestObject : public KShared
{ {
public: public:
TestObject(const TQCString &_app) : app(_app) TestObject(const TQCString &_app) : app(_app)
{ qWarning("Creating TestObject belonging to '%s'", app.data()); } { tqWarning("Creating TestObject belonging to '%s'", app.data()); }
~TestObject() ~TestObject()
{ qWarning("Destructing TestObject belonging to '%s'", app.data()); } { tqWarning("Destructing TestObject belonging to '%s'", app.data()); }
protected: protected:
TQCString app; TQCString app;
}; };
@ -24,7 +24,7 @@ TQString TestModule::world()
void TestModule::idle() void TestModule::idle()
{ {
qWarning("TestModule is idle."); tqWarning("TestModule is idle.");
} }
void TestModule::registerMe(const TQCString &app) void TestModule::registerMe(const TQCString &app)

@ -24,6 +24,6 @@ KDialogPreview::KDialogPreview(TQWidget * parent , const char * /* name , bool,
if (parent) if (parent)
reparent(parent, TQPoint(0,0), true); reparent(parent, TQPoint(0,0), true);
else else
qDebug("Error while reparenting!"); tqDebug("Error while reparenting!");
} }

@ -203,8 +203,8 @@ int main(int argc, char **argv) {
TQValueVector<const char *> params; TQValueVector<const char *> params;
if (args->isSet( "output" ) ) { if (args->isSet( "output" ) ) {
params.append( qstrdup( "outputFile" ) ); params.append( tqstrdup( "outputFile" ) );
params.append( qstrdup( TQString(TQFile::decodeName( args->getOption( "output" ) )).latin1() ) ); params.append( tqstrdup( TQString(TQFile::decodeName( args->getOption( "output" ) )).latin1() ) );
} }
{ {
const QCStringList paramList = args->getOptionList( "param" ); const QCStringList paramList = args->getOptionList( "param" );
@ -217,8 +217,8 @@ int main(int argc, char **argv) {
kdError() << "Key-Value tuple '" << tuple << "' lacks a '='!" << endl; kdError() << "Key-Value tuple '" << tuple << "' lacks a '='!" << endl;
return( 2 ); return( 2 );
} }
params.append( qstrdup( tuple.left( ch ) ) ); params.append( tqstrdup( tuple.left( ch ) ) );
params.append( qstrdup( tuple.mid( ch + 1 ) ) ); params.append( tqstrdup( tuple.mid( ch + 1 ) ) );
} }
} }
params.append( NULL ); params.append( NULL );

@ -191,7 +191,7 @@ CSSRuleImpl *CSSParser::parseRule( DOM::CSSStyleSheetImpl *sheet, const DOM::DOM
for ( unsigned int i = 0; i < strlen(khtml_rule); i++ ) for ( unsigned int i = 0; i < strlen(khtml_rule); i++ )
data[i] = khtml_rule[i]; data[i] = khtml_rule[i];
memcpy( data + strlen( khtml_rule ), string.unicode(), string.length()*sizeof( unsigned short) ); memcpy( data + strlen( khtml_rule ), string.unicode(), string.length()*sizeof( unsigned short) );
// qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() ); // tqDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() );
data[length-4] = '}'; data[length-4] = '}';
runParser(length); runParser(length);
@ -220,7 +220,7 @@ bool CSSParser::parseValue( DOM::CSSStyleDeclarationImpl *declaration, int _id,
data[i] = khtml_value[i]; data[i] = khtml_value[i];
memcpy( data + strlen( khtml_value ), string.unicode(), string.length()*sizeof( unsigned short) ); memcpy( data + strlen( khtml_value ), string.unicode(), string.length()*sizeof( unsigned short) );
data[length-4] = '}'; data[length-4] = '}';
// qDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() ); // tqDebug("parse string = '%s'", TQConstString( (const TQChar *)data, length ).string().latin1() );
id = _id; id = _id;
important = _important; important = _important;
@ -838,7 +838,7 @@ bool CSSParser::parseValue( int propId, bool important )
break; break;
case CSS_PROP_Z_INDEX: // auto | <integer> | inherit case CSS_PROP_Z_INDEX: // auto | <integer> | inherit
// qDebug("parsing z-index: id=%d, fValue=%f", id, value->fValue ); // tqDebug("parsing z-index: id=%d, fValue=%f", id, value->fValue );
if ( id == CSS_VAL_AUTO ) { if ( id == CSS_VAL_AUTO ) {
valid_primitive = true; valid_primitive = true;
break; break;
@ -1271,7 +1271,7 @@ bool CSSParser::parse4Values(int propId, const int *properties, bool important
*/ */
int num = inShorthand() ? 1 : valueList->size(); int num = inShorthand() ? 1 : valueList->size();
//qDebug("parse4Values: num=%d %d", num, valueList->numValues ); //tqDebug("parse4Values: num=%d %d", num, valueList->numValues );
ShorthandScope scope(this, propId); ShorthandScope scope(this, propId);
@ -1710,7 +1710,7 @@ bool CSSParser::parseShape( int propId, bool important )
Value *value = valueList->current(); Value *value = valueList->current();
ValueList *args = value->function->args; ValueList *args = value->function->args;
TQString fname = qString( value->function->name ).lower(); TQString fname = qString( value->function->name ).lower();
//qDebug( "parseShape: fname: %d", fname.latin1() ); //tqDebug( "parseShape: fname: %d", fname.latin1() );
if ( fname != "rect(" || !args ) if ( fname != "rect(" || !args )
return false; return false;
@ -2373,7 +2373,7 @@ int DOM::CSSParser::lex( void *_yylval )
unsigned short *t = text( &length ); unsigned short *t = text( &length );
#ifdef TOKEN_DEBUG #ifdef TOKEN_DEBUG
qDebug("CSSTokenizer: got token %d: '%s'", token, token == END ? "" : TQString( (TQChar *)t, length ).latin1() ); tqDebug("CSSTokenizer: got token %d: '%s'", token, token == END ? "" : TQString( (TQChar *)t, length ).latin1() );
#endif #endif
switch( token ) { switch( token ) {
case '{': case '{':
@ -2443,7 +2443,7 @@ int DOM::CSSParser::lex( void *_yylval )
case FLOAT: case FLOAT:
case INTEGER: case INTEGER:
yylval->val = TQString( (TQChar *)t, length ).toDouble(); yylval->val = TQString( (TQChar *)t, length ).toDouble();
//qDebug("value = %s, converted=%.2f", TQString( (TQChar *)t, length ).latin1(), yylval->val ); //tqDebug("value = %s, converted=%.2f", TQString( (TQChar *)t, length ).latin1(), yylval->val );
break; break;
default: default:
@ -2542,12 +2542,12 @@ unsigned short *DOM::CSSParser::text(int *length)
int uc = 0; int uc = 0;
escape++; escape++;
while ( escape < current ) { while ( escape < current ) {
// qDebug("toHex( %c = %x", (char)*escape, toHex( *escape ) ); // tqDebug("toHex( %c = %x", (char)*escape, toHex( *escape ) );
uc *= 16; uc *= 16;
uc += toHex( *escape ); uc += toHex( *escape );
escape++; escape++;
} }
// qDebug(" converting escape: string='%s', value=0x%x", TQString( (TQChar *)e, current-e ).latin1(), uc ); // tqDebug(" converting escape: string='%s', value=0x%x", TQString( (TQChar *)e, current-e ).latin1(), uc );
// can't handle chars outside ucs2 // can't handle chars outside ucs2
if ( uc > 0xffff ) if ( uc > 0xffff )
uc = 0xfffd; uc = 0xfffd;
@ -2571,12 +2571,12 @@ unsigned short *DOM::CSSParser::text(int *length)
int uc = 0; int uc = 0;
escape++; escape++;
while ( escape < start+l ) { while ( escape < start+l ) {
// qDebug("toHex( %c = %x", (char)*escape, toHex( *escape ) ); // tqDebug("toHex( %c = %x", (char)*escape, toHex( *escape ) );
uc *= 16; uc *= 16;
uc += toHex( *escape ); uc += toHex( *escape );
escape++; escape++;
} }
// qDebug(" converting escape: string='%s', value=0x%x", TQString( (TQChar *)e, current-e ).latin1(), uc ); // tqDebug(" converting escape: string='%s', value=0x%x", TQString( (TQChar *)e, current-e ).latin1(), uc );
// can't handle chars outside ucs2 // can't handle chars outside ucs2
if ( uc > 0xffff ) if ( uc > 0xffff )
uc = 0xfffd; uc = 0xfffd;
@ -2601,13 +2601,13 @@ typedef unsigned int YY_CHAR;
*yy_cp = 0; \ *yy_cp = 0; \
yy_c_buf_p = yy_cp; yy_c_buf_p = yy_cp;
#define YY_BREAK break; #define YY_BREAK break;
#define ECHO qDebug( "%s", TQString( (TQChar *)yytext, yyleng ).latin1() ) #define ECHO tqDebug( "%s", TQString( (TQChar *)yytext, yyleng ).latin1() )
#define YY_RULE_SETUP #define YY_RULE_SETUP
#define INITIAL 0 #define INITIAL 0
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
#define YY_START ((yy_start - 1) / 2) #define YY_START ((yy_start - 1) / 2)
#define yyterminate() yyTok = END; return yyTok #define yyterminate() yyTok = END; return yyTok
#define YY_FATAL_ERROR(a) qFatal(a) #define YY_FATAL_ERROR(a) tqFatal(a)
#define BEGIN yy_start = 1 + 2 * #define BEGIN yy_start = 1 + 2 *
#define COMMENT 1 #define COMMENT 1

@ -510,7 +510,7 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e)
if ( selectorCache[i].state == Applies ) { if ( selectorCache[i].state == Applies ) {
++smatch; ++smatch;
// qDebug("adding property" ); // tqDebug("adding property" );
for ( unsigned int p = 0; p < selectorCache[i].props_size; p += 2 ) for ( unsigned int p = 0; p < selectorCache[i].props_size; p += 2 )
for ( unsigned int j = 0; j < (unsigned int )selectorCache[i].props[p+1]; ++j ) { for ( unsigned int j = 0; j < (unsigned int )selectorCache[i].props[p+1]; ++j ) {
if (numPropsToApply >= propsToApplySize ) { if (numPropsToApply >= propsToApplySize ) {
@ -540,8 +540,8 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e)
// count as author rules, and come before all other style sheets, see hack in append() // count as author rules, and come before all other style sheets, see hack in append()
numPropsToApply = addInlineDeclarations( e, e->m_styleDecls, numPropsToApply ); numPropsToApply = addInlineDeclarations( e, e->m_styleDecls, numPropsToApply );
// qDebug( "styleForElement( %s )", e->tagName().string().latin1() ); // tqDebug( "styleForElement( %s )", e->tagName().string().latin1() );
// qDebug( "%d selectors, %d checked, %d match, %d properties ( of %d )", // tqDebug( "%d selectors, %d checked, %d match, %d properties ( of %d )",
// selectors_size, schecked, smatch, numPropsToApply, properties_size ); // selectors_size, schecked, smatch, numPropsToApply, properties_size );
bubbleSort( propsToApply, propsToApply+numPropsToApply-1 ); bubbleSort( propsToApply, propsToApply+numPropsToApply-1 );
@ -582,7 +582,7 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e)
if ( numPseudoProps ) { if ( numPseudoProps ) {
fontDirty = false; fontDirty = false;
//qDebug("%d applying %d pseudo props", e->cssTagId(), pseudoProps->count() ); //tqDebug("%d applying %d pseudo props", e->cssTagId(), pseudoProps->count() );
for (unsigned int i = 0; i < numPseudoProps; ++i) { for (unsigned int i = 0; i < numPseudoProps; ++i) {
if ( fontDirty && pseudoProps[i]->priority >= (1 << 30) ) { if ( fontDirty && pseudoProps[i]->priority >= (1 << 30) ) {
// we are past the font properties, time to update to the // we are past the font properties, time to update to the
@ -1090,7 +1090,7 @@ void CSSStyleSelector::checkSelector(int selIndex, DOM::ElementImpl * e)
selectors[ selIndex ]->pseudoId = dynamicPseudo; selectors[ selIndex ]->pseudoId = dynamicPseudo;
} else } else
selectorCache[ selIndex ].state = Applies; selectorCache[ selIndex ].state = Applies;
//qDebug( "selector %d applies", selIndex ); //tqDebug( "selector %d applies", selIndex );
//selectors[ selIndex ]->print(); //selectors[ selIndex ]->print();
return; return;
} }
@ -1867,7 +1867,7 @@ void CSSStyleSelectorList::collect( TQPtrList<CSSSelector> *selectorList, CSSOrd
if ( !sel ) if ( !sel )
selectorList->append( r->selector ); selectorList->append( r->selector );
// else // else
// qDebug("merged one selector"); // tqDebug("merged one selector");
propList->append(r->rule->declaration(), selectorNum, r->selector->specificity(), regular, important ); propList->append(r->rule->declaration(), selectorNum, r->selector->specificity(), regular, important );
r = next(); r = next();
} }

@ -298,7 +298,7 @@ typedef union YYSTYPE {
static inline int cssyyerror(const char *x ) static inline int cssyyerror(const char *x )
{ {
#ifdef CSS_DEBUG #ifdef CSS_DEBUG
qDebug( "%s", x ); tqDebug( "%s", x );
#else #else
Q_UNUSED( x ); Q_UNUSED( x );
#endif #endif

@ -110,7 +110,7 @@ static inline int getValueID(const char *tagStr, int len)
static inline int cssyyerror(const char *x ) static inline int cssyyerror(const char *x )
{ {
#ifdef CSS_DEBUG #ifdef CSS_DEBUG
qDebug( "%s", x ); tqDebug( "%s", x );
#else #else
Q_UNUSED( x ); Q_UNUSED( x );
#endif #endif

@ -1705,7 +1705,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
emit p->browserExtension()->createNewWindow(KURL(), uargs,winargs,newPart); emit p->browserExtension()->createNewWindow(KURL(), uargs,winargs,newPart);
if (newPart && ::tqqt_cast<KHTMLPart*>(newPart)) { if (newPart && ::tqqt_cast<KHTMLPart*>(newPart)) {
KHTMLPart *khtmlpart = static_cast<KHTMLPart*>(newPart); KHTMLPart *khtmlpart = static_cast<KHTMLPart*>(newPart);
//qDebug("opener set to %p (this Window's part) in new Window %p (this Window=%p)",part,win,window); //tqDebug("opener set to %p (this Window's part) in new Window %p (this Window=%p)",part,win,window);
khtmlpart->setOpener(p); khtmlpart->setOpener(p);
khtmlpart->setOpenedByJS(true); khtmlpart->setOpenedByJS(true);
if (khtmlpart->document().isNull()) { if (khtmlpart->document().isNull()) {

@ -400,7 +400,7 @@ void HTMLElementImpl::addHTMLColor( int id, const DOMString &c )
int basicLength = (color.length() + 2) / 3; int basicLength = (color.length() + 2) / 3;
if ( basicLength > 1 ) { if ( basicLength > 1 ) {
// IE ignores colors with three digits or less // IE ignores colors with three digits or less
// qDebug("trying to fix up color '%s'. basicLength=%d, length=%d", // tqDebug("trying to fix up color '%s'. basicLength=%d, length=%d",
// color.latin1(), basicLength, color.length() ); // color.latin1(), basicLength, color.length() );
int colors[3] = { 0, 0, 0 }; int colors[3] = { 0, 0, 0 };
int component = 0; int component = 0;
@ -424,18 +424,18 @@ void HTMLElementImpl::addHTMLColor( int id, const DOMString &c )
component++; component++;
} }
maxDigit = basicLength - maxDigit; maxDigit = basicLength - maxDigit;
// qDebug("color is %x %x %x, maxDigit=%d", colors[0], colors[1], colors[2], maxDigit ); // tqDebug("color is %x %x %x, maxDigit=%d", colors[0], colors[1], colors[2], maxDigit );
// normalize to 00-ff. The highest filled digit counts, minimum is 2 digits // normalize to 00-ff. The highest filled digit counts, minimum is 2 digits
maxDigit -= 2; maxDigit -= 2;
colors[0] >>= 4*maxDigit; colors[0] >>= 4*maxDigit;
colors[1] >>= 4*maxDigit; colors[1] >>= 4*maxDigit;
colors[2] >>= 4*maxDigit; colors[2] >>= 4*maxDigit;
// qDebug("normalized color is %x %x %x", colors[0], colors[1], colors[2] ); // tqDebug("normalized color is %x %x %x", colors[0], colors[1], colors[2] );
// assert( colors[0] < 0x100 && colors[1] < 0x100 && colors[2] < 0x100 ); // assert( colors[0] < 0x100 && colors[1] < 0x100 && colors[2] < 0x100 );
color.sprintf("#%02x%02x%02x", colors[0], colors[1], colors[2] ); color.sprintf("#%02x%02x%02x", colors[0], colors[1], colors[2] );
// qDebug( "trying to add fixed color string '%s'", color.latin1() ); // tqDebug( "trying to add fixed color string '%s'", color.latin1() );
if ( m_styleDecls->setProperty(id, DOMString(color), false, true) ) if ( m_styleDecls->setProperty(id, DOMString(color), false, true) )
return; return;
} }
@ -622,7 +622,7 @@ void HTMLElementImpl::setInnerText( const DOMString &text, int& exceptioncode )
void HTMLElementImpl::addHTMLAlignment( DOMString alignment ) void HTMLElementImpl::addHTMLAlignment( DOMString alignment )
{ {
//qDebug("alignment is %s", alignment.string().latin1() ); //tqDebug("alignment is %s", alignment.string().latin1() );
// vertical alignment with respect to the current baseline of the text // vertical alignment with respect to the current baseline of the text
// right or left means floating images // right or left means floating images
int propfloat = -1; int propfloat = -1;

@ -2199,7 +2199,7 @@ void HTMLSelectElementImpl::restoreState(const TQString &_state)
TQString state = _state; TQString state = _state;
if(!state.isEmpty() && !state.contains('X') && !m_multiple && m_size <= 1) { if(!state.isEmpty() && !state.contains('X') && !m_multiple && m_size <= 1) {
qWarning("should not happen in restoreState!"); tqWarning("should not happen in restoreState!");
state[0] = 'X'; state[0] = 'X';
} }

@ -466,7 +466,7 @@ void HTMLTokenizer::parseComment(TokenizerString &src)
scriptCode[ scriptCodeSize++ ] = *src; scriptCode[ scriptCodeSize++ ] = *src;
#if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1 #if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1
qDebug("comment is now: *%s*", src.toString().left(16).latin1()); tqDebug("comment is now: *%s*", src.toString().left(16).latin1());
#endif #endif
if (strict) if (strict)
@ -765,7 +765,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
uint l = 0; uint l = 0;
while(l < src.length() && (src.toString()[l]).latin1() != '>') while(l < src.length() && (src.toString()[l]).latin1() != '>')
l++; l++;
qDebug("src is now: *%s*, tquote: %d", tqDebug("src is now: *%s*, tquote: %d",
src.toString().left(l).latin1(), tquote); src.toString().left(l).latin1(), tquote);
#endif #endif
switch(tag) { switch(tag) {
@ -774,7 +774,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
case TagName: case TagName:
{ {
#if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1 #if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1
qDebug("TagName"); tqDebug("TagName");
#endif #endif
if (searchCount > 0) if (searchCount > 0)
{ {
@ -870,7 +870,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
case SearchAttribute: case SearchAttribute:
{ {
#if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1 #if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1
qDebug("SearchAttribute"); tqDebug("SearchAttribute");
#endif #endif
bool atespace = false; bool atespace = false;
ushort curchar; ushort curchar;
@ -899,7 +899,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
case AttributeName: case AttributeName:
{ {
#if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1 #if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1
qDebug("AttributeName"); tqDebug("AttributeName");
#endif #endif
ushort curchar; ushort curchar;
int ll = kMin(src.length(), CBUFLEN-cBufferPos); int ll = kMin(src.length(), CBUFLEN-cBufferPos);
@ -951,7 +951,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
case SearchEqual: case SearchEqual:
{ {
#if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1 #if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1
qDebug("SearchEqual"); tqDebug("SearchEqual");
#endif #endif
ushort curchar; ushort curchar;
bool atespace = false; bool atespace = false;
@ -1006,7 +1006,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
case QuotedValue: case QuotedValue:
{ {
#if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1 #if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1
qDebug("QuotedValue"); tqDebug("QuotedValue");
#endif #endif
ushort curchar; ushort curchar;
while(!src.isEmpty()) { while(!src.isEmpty()) {
@ -1045,7 +1045,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
case Value: case Value:
{ {
#if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1 #if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1
qDebug("Value"); tqDebug("Value");
#endif #endif
ushort curchar; ushort curchar;
while(!src.isEmpty()) { while(!src.isEmpty()) {
@ -1079,7 +1079,7 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
case SearchEnd: case SearchEnd:
{ {
#if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1 #if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1
qDebug("SearchEnd"); tqDebug("SearchEnd");
#endif #endif
while(!src.isEmpty()) { while(!src.isEmpty()) {
if(*src == '<' || *src == '>') if(*src == '<' || *src == '>')
@ -1647,7 +1647,7 @@ void HTMLTokenizer::processToken()
{ {
#if 0 #if 0
if(currToken.tid) { if(currToken.tid) {
qDebug( "unexpected token id: %d, str: *%s*", currToken.tid,TQConstString( buffer,dest-buffer ).string().latin1() ); tqDebug( "unexpected token id: %d, str: *%s*", currToken.tid,TQConstString( buffer,dest-buffer ).string().latin1() );
assert(0); assert(0);
} }

@ -66,7 +66,7 @@ namespace khtml {
attrs = 0; attrs = 0;
text = 0; text = 0;
flat = false; flat = false;
//qDebug("new token, creating %08lx", attrs); //tqDebug("new token, creating %08lx", attrs);
} }
~Token() { ~Token() {
if(attrs) attrs->deref(); if(attrs) attrs->deref();

@ -1291,7 +1291,7 @@ static int s_DOMTreeIndentLevel = 0;
void KHTMLPart::slotDebugDOMTree() void KHTMLPart::slotDebugDOMTree()
{ {
if ( d->m_doc && d->m_doc->firstChild() ) if ( d->m_doc && d->m_doc->firstChild() )
qDebug("%s", d->m_doc->firstChild()->toString().string().latin1()); tqDebug("%s", d->m_doc->firstChild()->toString().string().latin1());
// Now print the contents of the frames that contain HTML // Now print the contents of the frames that contain HTML
@ -6398,8 +6398,8 @@ void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
TQDragObject *drag = 0; TQDragObject *drag = 0;
KURL u; KURL u;
// qDebug("****************** Event URL: %s", url.string().latin1()); // tqDebug("****************** Event URL: %s", url.string().latin1());
// qDebug("****************** Event Target: %s", target.string().latin1()); // tqDebug("****************** Event Target: %s", target.string().latin1());
// Normal image... // Normal image...
if ( url.length() == 0 && innerNode.handle() && innerNode.handle()->id() == ID_IMG ) if ( url.length() == 0 && innerNode.handle() && innerNode.handle()->id() == ID_IMG )

@ -650,7 +650,7 @@ void KHTMLView::drawContents( TQPainter *p, int ex, int ey, int ew, int eh )
#ifdef DEBUG_PIXEL #ifdef DEBUG_PIXEL
if ( d->timer.elapsed() > 5000 ) { if ( d->timer.elapsed() > 5000 ) {
qDebug( "drawed %d pixels in %d repaints the last %d milliseconds", tqDebug( "drawed %d pixels in %d repaints the last %d milliseconds",
d->pixelbooth, d->repaintbooth, d->timer.elapsed() ); d->pixelbooth, d->repaintbooth, d->timer.elapsed() );
d->timer.restart(); d->timer.restart();
d->pixelbooth = 0; d->pixelbooth = 0;
@ -2000,7 +2000,7 @@ bool KHTMLView::eventFilter(TQObject *o, TQEvent *e)
break; break;
} }
if (block) { if (block) {
//qDebug("eating event"); //tqDebug("eating event");
return true; return true;
} }
} }
@ -3194,7 +3194,7 @@ bool KHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode,
if (oldUnder && oldUnder->isTextNode()) if (oldUnder && oldUnder->isTextNode())
oldUnder = oldUnder->parentNode(); oldUnder = oldUnder->parentNode();
} }
// qDebug("oldunder=%p (%s), target=%p (%s) x/y=%d/%d", oldUnder, oldUnder ? oldUnder->renderer()->renderName() : 0, targetNode, targetNode ? targetNode->renderer()->renderName() : 0, _mouse->x(), _mouse->y()); // tqDebug("oldunder=%p (%s), target=%p (%s) x/y=%d/%d", oldUnder, oldUnder ? oldUnder->renderer()->renderName() : 0, targetNode, targetNode ? targetNode->renderer()->renderName() : 0, _mouse->x(), _mouse->y());
if (oldUnder != targetNode) { if (oldUnder != targetNode) {
// send mouseout event to the old node // send mouseout event to the old node
if (oldUnder){ if (oldUnder){

@ -232,7 +232,7 @@ void KMultiPart::slotData( KIO::Job *job, const TQByteArray &data )
m_boundaryLength = m_boundary.length(); m_boundaryLength = m_boundary.length();
} }
} }
else if ( !qstrnicmp( line.data(), "Content-Encoding:", 17 ) ) else if ( !tqstrnicmp( line.data(), "Content-Encoding:", 17 ) )
{ {
TQString encoding = TQString::fromLatin1(line.data()+17).stripWhiteSpace().lower(); TQString encoding = TQString::fromLatin1(line.data()+17).stripWhiteSpace().lower();
if (encoding == "gzip" || encoding == "x-gzip") { if (encoding == "gzip" || encoding == "x-gzip") {
@ -242,7 +242,7 @@ void KMultiPart::slotData( KIO::Job *job, const TQByteArray &data )
} }
} }
// parse Content-Type // parse Content-Type
else if ( !qstrnicmp( line.data(), "Content-Type:", 13 ) ) else if ( !tqstrnicmp( line.data(), "Content-Type:", 13 ) )
{ {
Q_ASSERT( m_nextMimeType.isNull() ); Q_ASSERT( m_nextMimeType.isNull() );
m_nextMimeType = TQString::fromLatin1( line.data() + 14 ).stripWhiteSpace(); m_nextMimeType = TQString::fromLatin1( line.data() + 14 ).stripWhiteSpace();

@ -685,7 +685,7 @@ void CachedImage::do_notify(const TQPixmap& p, const TQRect& r)
void CachedImage::movieUpdated( const TQRect& r ) void CachedImage::movieUpdated( const TQRect& r )
{ {
#ifdef LOADER_DEBUG #ifdef LOADER_DEBUG
qDebug("movie updated %d/%d/%d/%d, pixmap size %d/%d", r.x(), r.y(), r.right(), r.bottom(), tqDebug("movie updated %d/%d/%d/%d, pixmap size %d/%d", r.x(), r.y(), r.right(), r.bottom(),
m->framePixmap().size().width(), m->framePixmap().size().height()); m->framePixmap().size().width(), m->framePixmap().size().height());
#endif #endif
@ -695,7 +695,7 @@ void CachedImage::movieUpdated( const TQRect& r )
void CachedImage::movieStatus(int status) void CachedImage::movieStatus(int status)
{ {
#ifdef LOADER_DEBUG #ifdef LOADER_DEBUG
qDebug("movieStatus(%d)", status); tqDebug("movieStatus(%d)", status);
#endif #endif
// ### the html image objects are supposed to send the load event after every frame (according to // ### the html image objects are supposed to send the load event after every frame (according to
@ -766,7 +766,7 @@ void CachedImage::movieStatus(int status)
{ {
#ifdef LOADER_DEBUG #ifdef LOADER_DEBUG
TQRect r(valid_rect()); TQRect r(valid_rect());
qDebug("movie Status frame update %d/%d/%d/%d, pixmap size %d/%d", r.x(), r.y(), r.right(), r.bottom(), tqDebug("movie Status frame update %d/%d/%d/%d, pixmap size %d/%d", r.x(), r.y(), r.right(), r.bottom(),
pixmap().size().width(), pixmap().size().height()); pixmap().size().width(), pixmap().size().height());
#endif #endif
do_notify(pixmap(), valid_rect()); do_notify(pixmap(), valid_rect());

@ -67,7 +67,7 @@ extern "C" {
char buffer[JMSG_LENGTH_MAX]; char buffer[JMSG_LENGTH_MAX];
(*cinfo->err->format_message)(cinfo, buffer); (*cinfo->err->format_message)(cinfo, buffer);
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qWarning("%s", buffer); tqWarning("%s", buffer);
#endif #endif
longjmp(myerr->setjmp_buffer, 1); longjmp(myerr->setjmp_buffer, 1);
} }
@ -105,7 +105,7 @@ extern "C" {
boolean khtml_fill_input_buffer(j_decompress_ptr cinfo) boolean khtml_fill_input_buffer(j_decompress_ptr cinfo)
{ {
#ifdef BUFFER_DEBUG #ifdef BUFFER_DEBUG
qDebug("khtml_fill_input_buffer called!"); tqDebug("khtml_fill_input_buffer called!");
#endif #endif
khtml_jpeg_source_mgr* src = (khtml_jpeg_source_mgr*)cinfo->src; khtml_jpeg_source_mgr* src = (khtml_jpeg_source_mgr*)cinfo->src;
@ -118,7 +118,7 @@ extern "C" {
src->bytes_in_buffer = 2; src->bytes_in_buffer = 2;
src->next_input_byte = (JOCTET *) src->buffer; src->next_input_byte = (JOCTET *) src->buffer;
#ifdef BUFFER_DEBUG #ifdef BUFFER_DEBUG
qDebug("...returning true!"); tqDebug("...returning true!");
#endif #endif
return true; return true;
} }
@ -133,7 +133,7 @@ extern "C" {
return; /* required noop */ return; /* required noop */
#ifdef BUFFER_DEBUG #ifdef BUFFER_DEBUG
qDebug("khtml_skip_input_data (%d) called!", num_bytes); tqDebug("khtml_skip_input_data (%d) called!", num_bytes);
#endif #endif
khtml_jpeg_source_mgr* src = (khtml_jpeg_source_mgr*)cinfo->src; khtml_jpeg_source_mgr* src = (khtml_jpeg_source_mgr*)cinfo->src;
@ -142,10 +142,10 @@ extern "C" {
unsigned int skipbytes = kMin(src->bytes_in_buffer, src->skip_input_bytes); unsigned int skipbytes = kMin(src->bytes_in_buffer, src->skip_input_bytes);
#ifdef BUFFER_DEBUG #ifdef BUFFER_DEBUG
qDebug("skip_input_bytes is now %d", src->skip_input_bytes); tqDebug("skip_input_bytes is now %d", src->skip_input_bytes);
qDebug("skipbytes is now %d", skipbytes); tqDebug("skipbytes is now %d", skipbytes);
qDebug("valid_buffer_len is before %d", src->valid_buffer_len); tqDebug("valid_buffer_len is before %d", src->valid_buffer_len);
qDebug("bytes_in_buffer is %d", src->bytes_in_buffer); tqDebug("bytes_in_buffer is %d", src->bytes_in_buffer);
#endif #endif
if(skipbytes < src->bytes_in_buffer) if(skipbytes < src->bytes_in_buffer)
@ -159,8 +159,8 @@ extern "C" {
cinfo->src->next_input_byte = (JOCTET *) src->buffer; cinfo->src->next_input_byte = (JOCTET *) src->buffer;
cinfo->src->bytes_in_buffer = (size_t) src->valid_buffer_len; cinfo->src->bytes_in_buffer = (size_t) src->valid_buffer_len;
#ifdef BUFFER_DEBUG #ifdef BUFFER_DEBUG
qDebug("valid_buffer_len is afterwards %d", src->valid_buffer_len); tqDebug("valid_buffer_len is afterwards %d", src->valid_buffer_len);
qDebug("skip_input_bytes is now %d", src->skip_input_bytes); tqDebug("skip_input_bytes is now %d", src->skip_input_bytes);
#endif #endif
} }
} }
@ -244,13 +244,13 @@ KJPEGFormat::~KJPEGFormat()
int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar* buffer, int length) int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar* buffer, int length)
{ {
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug("KJPEGFormat::decode(%08lx, %08lx, %08lx, %d)", tqDebug("KJPEGFormat::decode(%08lx, %08lx, %08lx, %d)",
&image, consumer, buffer, length); &image, consumer, buffer, length);
#endif #endif
if(jsrc.ateof) { if(jsrc.ateof) {
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug("ateof, eating"); tqDebug("ateof, eating");
#endif #endif
return length; return length;
} }
@ -259,7 +259,7 @@ int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar*
if(setjmp(jerr.setjmp_buffer)) if(setjmp(jerr.setjmp_buffer))
{ {
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug("jump into state invalid"); tqDebug("jump into state invalid");
#endif #endif
if(consumer) if(consumer)
consumer->end(); consumer->end();
@ -271,7 +271,7 @@ int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar*
int consumed = kMin(length, max_buf - jsrc.valid_buffer_len); int consumed = kMin(length, max_buf - jsrc.valid_buffer_len);
#ifdef BUFFER_DEBUG #ifdef BUFFER_DEBUG
qDebug("consuming %d bytes", consumed); tqDebug("consuming %d bytes", consumed);
#endif #endif
// filling buffer with the new data // filling buffer with the new data
@ -281,9 +281,9 @@ int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar*
if(jsrc.skip_input_bytes) if(jsrc.skip_input_bytes)
{ {
#ifdef BUFFER_DEBUG #ifdef BUFFER_DEBUG
qDebug("doing skipping"); tqDebug("doing skipping");
qDebug("valid_buffer_len %d", jsrc.valid_buffer_len); tqDebug("valid_buffer_len %d", jsrc.valid_buffer_len);
qDebug("skip_input_bytes %d", jsrc.skip_input_bytes); tqDebug("skip_input_bytes %d", jsrc.skip_input_bytes);
#endif #endif
int skipbytes = kMin((size_t) jsrc.valid_buffer_len, jsrc.skip_input_bytes); int skipbytes = kMin((size_t) jsrc.valid_buffer_len, jsrc.skip_input_bytes);
@ -295,7 +295,7 @@ int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar*
// still more bytes to skip // still more bytes to skip
if(jsrc.skip_input_bytes) { if(jsrc.skip_input_bytes) {
if(consumed <= 0) qDebug("ERROR!!!"); if(consumed <= 0) tqDebug("ERROR!!!");
return consumed; return consumed;
} }
@ -305,7 +305,7 @@ int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar*
cinfo.src->bytes_in_buffer = (size_t) jsrc.valid_buffer_len; cinfo.src->bytes_in_buffer = (size_t) jsrc.valid_buffer_len;
#ifdef BUFFER_DEBUG #ifdef BUFFER_DEBUG
qDebug("buffer contains %d bytes", jsrc.valid_buffer_len); tqDebug("buffer contains %d bytes", jsrc.valid_buffer_len);
#endif #endif
if(state == Init) if(state == Init)
@ -334,7 +334,7 @@ int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar*
jsrc.do_progressive = jpeg_has_multiple_scans( &cinfo ); jsrc.do_progressive = jpeg_has_multiple_scans( &cinfo );
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug( "**** DOPROGRESSIVE: %d", jsrc.do_progressive ); tqDebug( "**** DOPROGRESSIVE: %d", jsrc.do_progressive );
#endif #endif
if ( jsrc.do_progressive ) if ( jsrc.do_progressive )
cinfo.buffered_image = true; cinfo.buffered_image = true;
@ -362,11 +362,11 @@ int KJPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar*
} }
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug("will create a picture %d/%d in size", cinfo.output_width, cinfo.output_height); tqDebug("will create a picture %d/%d in size", cinfo.output_width, cinfo.output_height);
#endif #endif
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug("ok, going to decompressStarted"); tqDebug("ok, going to decompressStarted");
#endif #endif
jsrc.decoder_timestamp.start(); jsrc.decoder_timestamp.start();
@ -407,7 +407,7 @@ again:
if(image.isNull() || jsrc.decoding_done) if(image.isNull() || jsrc.decoding_done)
{ {
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug("complete in doOutputscan, eating.."); tqDebug("complete in doOutputscan, eating..");
#endif #endif
return consumed; return consumed;
} }
@ -420,7 +420,7 @@ again:
int completed_scanlines = cinfo.output_scanline - oldoutput_scanline; int completed_scanlines = cinfo.output_scanline - oldoutput_scanline;
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug("completed now %d scanlines", completed_scanlines); tqDebug("completed now %d scanlines", completed_scanlines);
#endif #endif
if ( cinfo.output_components == 3 ) { if ( cinfo.output_components == 3 ) {
@ -440,7 +440,7 @@ again:
{ {
TQRect r(0, oldoutput_scanline, cinfo.output_width, completed_scanlines); TQRect r(0, oldoutput_scanline, cinfo.output_width, completed_scanlines);
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug("changing %d/%d %d/%d", r.x(), r.y(), r.width(), r.height()); tqDebug("changing %d/%d %d/%d", r.x(), r.y(), r.width(), r.height());
#endif #endif
jsrc.change_rect |= r; jsrc.change_rect |= r;
@ -470,13 +470,13 @@ again:
jsrc.decoding_done = true; jsrc.decoding_done = true;
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug("one pass is completed, final_pass = %d, dec_done: %d, complete: %d", tqDebug("one pass is completed, final_pass = %d, dec_done: %d, complete: %d",
jsrc.final_pass, jsrc.decoding_done, jpeg_input_complete(&cinfo)); jsrc.final_pass, jsrc.decoding_done, jpeg_input_complete(&cinfo));
#endif #endif
if(!jsrc.decoding_done) if(!jsrc.decoding_done)
{ {
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug("starting another one, input_scan_number is %d/%d", cinfo.input_scan_number, tqDebug("starting another one, input_scan_number is %d/%d", cinfo.input_scan_number,
cinfo.output_scan_number); cinfo.output_scan_number);
#endif #endif
jsrc.decoder_timestamp.restart(); jsrc.decoder_timestamp.restart();
@ -488,7 +488,7 @@ again:
if(state == doOutputScan && jsrc.decoding_done) { if(state == doOutputScan && jsrc.decoding_done) {
#ifdef JPEG_DEBUG #ifdef JPEG_DEBUG
qDebug("input is complete, cleaning up, returning.."); tqDebug("input is complete, cleaning up, returning..");
#endif #endif
if ( consumer && !jsrc.change_rect.isEmpty() ) if ( consumer && !jsrc.change_rect.isEmpty() )
consumer->changed( jsrc.change_rect ); consumer->changed( jsrc.change_rect );
@ -508,9 +508,9 @@ again:
} }
#ifdef BUFFER_DEBUG #ifdef BUFFER_DEBUG
qDebug("valid_buffer_len is now %d", jsrc.valid_buffer_len); tqDebug("valid_buffer_len is now %d", jsrc.valid_buffer_len);
qDebug("bytes_in_buffer is now %d", jsrc.bytes_in_buffer); tqDebug("bytes_in_buffer is now %d", jsrc.bytes_in_buffer);
qDebug("consumed %d bytes", consumed); tqDebug("consumed %d bytes", consumed);
#endif #endif
if(jsrc.bytes_in_buffer && jsrc.buffer != jsrc.next_input_byte) if(jsrc.bytes_in_buffer && jsrc.buffer != jsrc.next_input_byte)
memmove(jsrc.buffer, jsrc.next_input_byte, jsrc.bytes_in_buffer); memmove(jsrc.buffer, jsrc.next_input_byte, jsrc.bytes_in_buffer);

@ -548,7 +548,7 @@ static void appendRun( BidiState &bidi )
static void embed( TQChar::Direction d, BidiState &bidi ) static void embed( TQChar::Direction d, BidiState &bidi )
{ {
#if BIDI_DEBUG > 1 #if BIDI_DEBUG > 1
qDebug("*** embed dir=%d emptyrun=%d", d, emptyRun ); tqDebug("*** embed dir=%d emptyrun=%d", d, emptyRun );
#endif #endif
bool b = adjustEmbedding ; bool b = adjustEmbedding ;
adjustEmbedding = false; adjustEmbedding = false;

@ -462,7 +462,7 @@ void Font::update( TQPaintDeviceMetrics* devMetrics ) const
// Also, Qt does not support sizing a TQFont to zero. // Also, Qt does not support sizing a TQFont to zero.
size = kMax(1, kMin(255, size)); size = kMax(1, kMin(255, size));
// qDebug("setting font to %s, italic=%d, weight=%d, size=%d", fontDef.family.latin1(), fontDef.italic, // tqDebug("setting font to %s, italic=%d, weight=%d, size=%d", fontDef.family.latin1(), fontDef.italic,
// fontDef.weight, size ); // fontDef.weight, size );

@ -43,7 +43,7 @@ RenderBody::~RenderBody()
void RenderBody::setStyle(RenderStyle* style) void RenderBody::setStyle(RenderStyle* style)
{ {
// qDebug("RenderBody::setStyle()"); // tqDebug("RenderBody::setStyle()");
// ignore position: fixed on body // ignore position: fixed on body
if (style->htmlHacks() && style->position() == FIXED) if (style->htmlHacks() && style->position() == FIXED)
style->setPosition(STATIC); style->setPosition(STATIC);

@ -143,7 +143,7 @@ void RenderImage::setPixmap( const TQPixmap &p, const TQRect& r, CachedImage *o)
if( o->pixmap_size().width() != intrinsicWidth() || if( o->pixmap_size().width() != intrinsicWidth() ||
o->pixmap_size().height() != intrinsicHeight() || iwchanged ) o->pixmap_size().height() != intrinsicHeight() || iwchanged )
{ {
// qDebug("image dimensions have been changed, old: %d/%d new: %d/%d", // tqDebug("image dimensions have been changed, old: %d/%d new: %d/%d",
// intrinsicWidth(), intrinsicHeight(), // intrinsicWidth(), intrinsicHeight(),
// o->pixmap_size().width(), o->pixmap_size().height()); // o->pixmap_size().width(), o->pixmap_size().height());
@ -264,7 +264,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
if(cWidth > 2 && cHeight > 2) if(cWidth > 2 && cHeight > 2)
{ {
if ( !berrorPic ) { if ( !berrorPic ) {
//qDebug("qDrawShadePanel %d/%d/%d/%d", _tx + leftBorder, _ty + topBorder, cWidth, cHeight); //tqDebug("qDrawShadePanel %d/%d/%d/%d", _tx + leftBorder, _ty + topBorder, cWidth, cHeight);
qDrawShadePanel( paintInfo.p, _tx + leftBorder + leftPad, _ty + topBorder + topPad, cWidth, cHeight, qDrawShadePanel( paintInfo.p, _tx + leftBorder + leftPad, _ty + topBorder + topPad, cWidth, cHeight,
KApplication::palette().inactive(), true, 1 ); KApplication::palette().inactive(), true, 1 );
} }
@ -299,7 +299,7 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
TQRect scaledrect(i->valid_rect()); TQRect scaledrect(i->valid_rect());
// kdDebug(6040) << "time elapsed: " << dt->elapsed() << endl; // kdDebug(6040) << "time elapsed: " << dt->elapsed() << endl;
// kdDebug( 6040 ) << "have to scale: " << endl; // kdDebug( 6040 ) << "have to scale: " << endl;
// qDebug("cw=%d ch=%d pw=%d ph=%d rcw=%d, rch=%d", // tqDebug("cw=%d ch=%d pw=%d ph=%d rcw=%d, rch=%d",
// cWidth, cHeight, intrinsicWidth(), intrinsicHeight(), resizeCache.width(), resizeCache.height()); // cWidth, cHeight, intrinsicWidth(), intrinsicHeight(), resizeCache.width(), resizeCache.height());
TQWMatrix matrix; TQWMatrix matrix;
matrix.scale( (float)(cWidth)/intrinsicWidth(), matrix.scale( (float)(cWidth)/intrinsicWidth(),
@ -307,8 +307,8 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
resizeCache = pix.xForm( matrix ); resizeCache = pix.xForm( matrix );
scaledrect.setWidth( ( cWidth*scaledrect.width() ) / intrinsicWidth() ); scaledrect.setWidth( ( cWidth*scaledrect.width() ) / intrinsicWidth() );
scaledrect.setHeight( ( cHeight*scaledrect.height() ) / intrinsicHeight() ); scaledrect.setHeight( ( cHeight*scaledrect.height() ) / intrinsicHeight() );
// qDebug("resizeCache size: %d/%d", resizeCache.width(), resizeCache.height()); // tqDebug("resizeCache size: %d/%d", resizeCache.width(), resizeCache.height());
// qDebug("valid: %d/%d, scaled: %d/%d", // tqDebug("valid: %d/%d, scaled: %d/%d",
// i->valid_rect().width(), i->valid_rect().height(), // i->valid_rect().width(), i->valid_rect().height(),
// scaledrect.width(), scaledrect.height()); // scaledrect.width(), scaledrect.height());
@ -336,12 +336,12 @@ void RenderImage::paint(PaintInfo& paintInfo, int _tx, int _ty)
: TQRect(0, 0, intrinsicWidth(), intrinsicHeight())); : TQRect(0, 0, intrinsicWidth(), intrinsicHeight()));
TQPoint offs( _tx + leftBorder + leftPad, _ty + topBorder + topPad); TQPoint offs( _tx + leftBorder + leftPad, _ty + topBorder + topPad);
// qDebug("normal paint rect %d/%d/%d/%d", rect.x(), rect.y(), rect.width(), rect.height()); // tqDebug("normal paint rect %d/%d/%d/%d", rect.x(), rect.y(), rect.width(), rect.height());
// rect = rect & TQRect( 0 , y - offs.y() - 10, w, 10 + y + h - offs.y()); // rect = rect & TQRect( 0 , y - offs.y() - 10, w, 10 + y + h - offs.y());
// qDebug("normal paint rect after %d/%d/%d/%d", rect.x(), rect.y(), rect.width(), rect.height()); // tqDebug("normal paint rect after %d/%d/%d/%d", rect.x(), rect.y(), rect.width(), rect.height());
// qDebug("normal paint: offs.y(): %d, y: %d, diff: %d", offs.y(), y, y - offs.y()); // tqDebug("normal paint: offs.y(): %d, y: %d, diff: %d", offs.y(), y, y - offs.y());
// qDebug(""); // tqDebug("");
// p->setClipRect(TQRect(x,y,w,h)); // p->setClipRect(TQRect(x,y,w,h));

@ -1273,7 +1273,7 @@ void RenderObject::setStyle(RenderStyle *style)
return; return;
RenderStyle::Diff d = m_style ? m_style->diff( style ) : RenderStyle::Layout; RenderStyle::Diff d = m_style ? m_style->diff( style ) : RenderStyle::Layout;
//qDebug("m_style: %p new style, diff=%d", m_style, d); //tqDebug("m_style: %p new style, diff=%d", m_style, d);
Priority pri = NormalPriority; Priority pri = NormalPriority;
if (m_style) { if (m_style) {

@ -49,7 +49,7 @@ class KHTMLView;
#define KHTMLAssert( x ) if( !(x) ) { \ #define KHTMLAssert( x ) if( !(x) ) { \
const RenderObject *o = this; while( o->parent() ) o = o->parent(); \ const RenderObject *o = this; while( o->parent() ) o = o->parent(); \
o->printTree(); \ o->printTree(); \
qDebug(" this object = %p, %s", (void*) this, kdBacktrace().latin1() ); \ tqDebug(" this object = %p, %s", (void*) this, kdBacktrace().latin1() ); \
assert( x ); \ assert( x ); \
} }
#else #else

@ -413,14 +413,14 @@ void RenderWidget::paint(PaintInfo& paintInfo, int _tx, int _ty)
int xNew = xPos; int xNew = xPos;
int yNew = childy; int yNew = childy;
// qDebug("cy=%d, ch=%d, childy=%d, childh=%d", cy, ch, childy, childh ); // tqDebug("cy=%d, ch=%d, childy=%d, childh=%d", cy, ch, childy, childh );
if ( childh == 3072 ) { if ( childh == 3072 ) {
if ( cy + ch > childy + childh ) { if ( cy + ch > childy + childh ) {
yNew = cy + ( ch - childh )/2; yNew = cy + ( ch - childh )/2;
} else if ( cy < childy ) { } else if ( cy < childy ) {
yNew = cy + ( ch - childh )/2; yNew = cy + ( ch - childh )/2;
} }
// qDebug("calculated yNew=%d", yNew); // tqDebug("calculated yNew=%d", yNew);
} }
yNew = kMin( yNew, yPos + m_height - childh ); yNew = kMin( yNew, yPos + m_height - childh );
yNew = kMax( yNew, yPos ); yNew = kMax( yNew, yPos );
@ -880,7 +880,7 @@ bool RenderWidget::handleEvent(const DOM::EventImpl& ev)
void RenderWidget::deref() void RenderWidget::deref()
{ {
if (_ref) _ref--; if (_ref) _ref--;
// qDebug( "deref(%p): width get count is %d", this, _ref); // tqDebug( "deref(%p): width get count is %d", this, _ref);
if (!_ref) { if (!_ref) {
khtml::SharedPtr<RenderArena> guard(m_arena); //Since delete on us gets called -first-, khtml::SharedPtr<RenderArena> guard(m_arena); //Since delete on us gets called -first-,
//before the arena free //before the arena free

@ -566,7 +566,7 @@ void RenderTable::splitColumn( int pos, int firstSpan )
int oldSize = columns.size(); int oldSize = columns.size();
columns.resize( oldSize + 1 ); columns.resize( oldSize + 1 );
int oldSpan = columns[pos].span; int oldSpan = columns[pos].span;
// qDebug("splitColumn( %d,%d ), oldSize=%d, oldSpan=%d", pos, firstSpan, oldSize, oldSpan ); // tqDebug("splitColumn( %d,%d ), oldSize=%d, oldSpan=%d", pos, firstSpan, oldSize, oldSpan );
KHTMLAssert( oldSpan > firstSpan ); KHTMLAssert( oldSpan > firstSpan );
columns[pos].span = firstSpan; columns[pos].span = firstSpan;
memmove( columns.data()+pos+1, columns.data()+pos, (oldSize-pos)*sizeof(ColumnStruct) ); memmove( columns.data()+pos+1, columns.data()+pos, (oldSize-pos)*sizeof(ColumnStruct) );
@ -585,7 +585,7 @@ void RenderTable::splitColumn( int pos, int firstSpan )
section->grid[row].row->resize( oldSize+1 ); section->grid[row].row->resize( oldSize+1 );
RenderTableSection::Row &r = *section->grid[row].row; RenderTableSection::Row &r = *section->grid[row].row;
memmove( r.data()+pos+1, r.data()+pos, (oldSize-pos)*sizeof( RenderTableCell * ) ); memmove( r.data()+pos+1, r.data()+pos, (oldSize-pos)*sizeof( RenderTableCell * ) );
// qDebug("moving from %d to %d, num=%d", pos, pos+1, (oldSize-pos-1) ); // tqDebug("moving from %d to %d, num=%d", pos, pos+1, (oldSize-pos-1) );
r[pos+1] = r[pos] ? (RenderTableCell *)-1 : 0; r[pos+1] = r[pos] ? (RenderTableCell *)-1 : 0;
row++; row++;
} }
@ -600,11 +600,11 @@ void RenderTable::appendColumn( int span )
{ {
// easy case. // easy case.
int pos = columns.size(); int pos = columns.size();
// qDebug("appendColumn( %d ), size=%d", span, pos ); // tqDebug("appendColumn( %d ), size=%d", span, pos );
int newSize = pos + 1; int newSize = pos + 1;
columns.resize( newSize ); columns.resize( newSize );
columns[pos].span = span; columns[pos].span = span;
//qDebug("appending column at %d, span %d", pos, span ); //tqDebug("appending column at %d, span %d", pos, span );
// change width of all rows. // change width of all rows.
RenderObject *child = firstChild(); RenderObject *child = firstChild();
@ -1086,7 +1086,7 @@ void RenderTableSection::addCell( RenderTableCell *cell, RenderTableRow *row )
while ( cCol < nCols && cellAt( cRow, cCol ) ) while ( cCol < nCols && cellAt( cRow, cCol ) )
cCol++; cCol++;
// qDebug("adding cell at %d/%d span=(%d/%d)", cRow, cCol, rSpan, cSpan ); // tqDebug("adding cell at %d/%d span=(%d/%d)", cRow, cCol, rSpan, cSpan );
if ( rSpan == 1 ) { if ( rSpan == 1 ) {
// we ignore height settings on rowspan cells // we ignore height settings on rowspan cells
@ -1139,7 +1139,7 @@ void RenderTableSection::addCell( RenderTableCell *cell, RenderTableRow *row )
int r = 0; int r = 0;
while ( r < rSpan ) { while ( r < rSpan ) {
if ( !cellAt( cRow + r, cCol ) ) { if ( !cellAt( cRow + r, cCol ) ) {
// qDebug(" adding cell at %d, %d", cRow + r, cCol ); // tqDebug(" adding cell at %d, %d", cRow + r, cCol );
cellAt( cRow + r, cCol ) = set; cellAt( cRow + r, cCol ) = set;
} }
r++; r++;
@ -1169,7 +1169,7 @@ void RenderTableSection::setCellWidths()
int cols = row.size(); int cols = row.size();
for ( int j = 0; j < cols; j++ ) { for ( int j = 0; j < cols; j++ ) {
RenderTableCell *cell = row[j]; RenderTableCell *cell = row[j];
// qDebug("cell[%d,%d] = %p", i, j, cell ); // tqDebug("cell[%d,%d] = %p", i, j, cell );
if ( !cell || cell == (RenderTableCell *)-1 ) if ( !cell || cell == (RenderTableCell *)-1 )
continue; continue;
int endCol = j; int endCol = j;
@ -1213,7 +1213,7 @@ void RenderTableSection::calcRowHeight()
int baseline=0; int baseline=0;
int bdesc = 0; int bdesc = 0;
// qDebug("height of row %d is %d/%d", r, grid[r].height.value, grid[r].height.type ); // tqDebug("height of row %d is %d/%d", r, grid[r].height.value, grid[r].height.type );
int ch = grid[r].height.minWidth( 0 ); int ch = grid[r].height.minWidth( 0 );
int pos = rowPos[r] + ch + (grid[r].rowRenderer ? vspacing : 0); int pos = rowPos[r] + ch + (grid[r].rowRenderer ? vspacing : 0);
@ -1290,7 +1290,7 @@ void RenderTableSection::calcRowHeight()
if ( rowPos[r+1] < rowPos[r] ) if ( rowPos[r+1] < rowPos[r] )
rowPos[r+1] = rowPos[r]; rowPos[r+1] = rowPos[r];
// qDebug("rowpos(%d)=%d", r, rowPos[r] ); // tqDebug("rowpos(%d)=%d", r, rowPos[r] );
} }
} }
@ -1313,7 +1313,7 @@ int RenderTableSection::layoutRows( int toAdd )
if (toAdd && totalRows && (rowPos[totalRows] || !nextSibling())) { if (toAdd && totalRows && (rowPos[totalRows] || !nextSibling())) {
int totalHeight = rowPos[totalRows] + toAdd; int totalHeight = rowPos[totalRows] + toAdd;
// qDebug("layoutRows: totalHeight = %d", totalHeight ); // tqDebug("layoutRows: totalHeight = %d", totalHeight );
int dh = toAdd; int dh = toAdd;
int totalPercent = 0; int totalPercent = 0;
@ -1325,7 +1325,7 @@ int RenderTableSection::layoutRows( int toAdd )
totalPercent += grid[r].height.value(); totalPercent += grid[r].height.value();
} }
if ( totalPercent ) { if ( totalPercent ) {
// qDebug("distributing %d over percent rows totalPercent=%d", dh, totalPercent ); // tqDebug("distributing %d over percent rows totalPercent=%d", dh, totalPercent );
// try to satisfy percent // try to satisfy percent
int add = 0; int add = 0;
if ( totalPercent > 100 ) if ( totalPercent > 100 )
@ -1340,7 +1340,7 @@ int RenderTableSection::layoutRows( int toAdd )
add += toAdd; add += toAdd;
dh -= toAdd; dh -= toAdd;
totalPercent -= grid[r].height.value(); totalPercent -= grid[r].height.value();
// qDebug( "adding %d to row %d", toAdd, r ); // tqDebug( "adding %d to row %d", toAdd, r );
} }
if ( r < totalRows-1 ) if ( r < totalRows-1 )
rh = rowPos[r+2] - rowPos[r+1]; rh = rowPos[r+2] - rowPos[r+1];
@ -1349,7 +1349,7 @@ int RenderTableSection::layoutRows( int toAdd )
} }
if ( numVariable ) { if ( numVariable ) {
// distribute over non-empty variable rows // distribute over non-empty variable rows
// qDebug("distributing %d over variable rows numVariable=%d", dh, numVariable ); // tqDebug("distributing %d over variable rows numVariable=%d", dh, numVariable );
int add = 0; int add = 0;
int toAdd = dh/numVariable; int toAdd = dh/numVariable;
for ( int r = 0; r < totalRows; r++ ) { for ( int r = 0; r < totalRows; r++ ) {

@ -912,7 +912,7 @@ FindSelectionResult RenderText::checkSelectionPoint(int _x, int _y, int _tx, int
// set offset to max // set offset to max
offset = str->l; offset = str->l;
//qDebug("setting node to %p", element()); //tqDebug("setting node to %p", element());
node = element(); node = element();
// kdDebug(6040) << "RenderText::checkSelectionPoint: node " << node << " offset " << offset << endl; // kdDebug(6040) << "RenderText::checkSelectionPoint: node " << node << " offset " << offset << endl;
return SelectionPointAfter; return SelectionPointAfter;

@ -99,8 +99,8 @@ int FixedTableLayout::calcWidthArray()
width.fill( Length( Variable ) ); width.fill( Length( Variable ) );
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("FixedTableLayout::calcWidthArray()" ); tqDebug("FixedTableLayout::calcWidthArray()" );
qDebug(" col elements:"); tqDebug(" col elements:");
#endif #endif
Length grpWidth; Length grpWidth;
@ -120,7 +120,7 @@ int FixedTableLayout::calcWidthArray()
effWidth = KMIN( effWidth, 32760 ); effWidth = KMIN( effWidth, 32760 );
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" col element: effCol=%d, span=%d: %d w=%d type=%d", tqDebug(" col element: effCol=%d, span=%d: %d w=%d type=%d",
cCol, span, effWidth, w.value(), w.type()); cCol, span, effWidth, w.value(), w.type());
#endif #endif
int usedSpan = 0; int usedSpan = 0;
@ -137,7 +137,7 @@ int FixedTableLayout::calcWidthArray()
width[cCol+i] = Length( w.value() * eSpan, w.type() ); width[cCol+i] = Length( w.value() * eSpan, w.type() );
usedWidth += effWidth * eSpan; usedWidth += effWidth * eSpan;
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" setting effCol %d (span=%d) to width %d(type=%d)", tqDebug(" setting effCol %d (span=%d) to width %d(type=%d)",
cCol+i, eSpan, width[cCol+i].value(), width[cCol+i].type() ); cCol+i, eSpan, width[cCol+i].value(), width[cCol+i].type() );
#endif #endif
} }
@ -161,7 +161,7 @@ int FixedTableLayout::calcWidthArray()
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" first row:"); tqDebug(" first row:");
#endif #endif
// iterate over the first row in case some are unspecified. // iterate over the first row in case some are unspecified.
RenderTableSection *section = table->head; RenderTableSection *section = table->head;
@ -184,7 +184,7 @@ int FixedTableLayout::calcWidthArray()
effWidth = kMin( effWidth, 32760 ); effWidth = kMin( effWidth, 32760 );
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" table cell: effCol=%d, span=%d: %d", cCol, span, effWidth); tqDebug(" table cell: effCol=%d, span=%d: %d", cCol, span, effWidth);
#endif #endif
int usedSpan = 0; int usedSpan = 0;
int i = 0; int i = 0;
@ -196,13 +196,13 @@ int FixedTableLayout::calcWidthArray()
width[cCol+i] = Length( w.value()*eSpan, w.type() ); width[cCol+i] = Length( w.value()*eSpan, w.type() );
usedWidth += effWidth*eSpan; usedWidth += effWidth*eSpan;
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" setting effCol %d (span=%d) to width %d(type=%d)", tqDebug(" setting effCol %d (span=%d) to width %d(type=%d)",
cCol+i, eSpan, width[cCol+i].value(), width[cCol+i].type() ); cCol+i, eSpan, width[cCol+i].value(), width[cCol+i].type() );
#endif #endif
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
else { else {
qDebug(" width of col %d already defined (span=%d)", cCol, table->spanOfEffCol( cCol ) ); tqDebug(" width of col %d already defined (span=%d)", cCol, table->spanOfEffCol( cCol ) );
} }
#endif #endif
usedSpan += eSpan; usedSpan += eSpan;
@ -254,7 +254,7 @@ void FixedTableLayout::calcMinMaxWidth()
table->m_maxWidth = 0x7fff; table->m_maxWidth = 0x7fff;
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("FixedTableLayout::calcMinMaxWidth: minWidth=%d, maxWidth=%d", table->m_minWidth, table->m_maxWidth ); tqDebug("FixedTableLayout::calcMinMaxWidth: minWidth=%d, maxWidth=%d", table->m_minWidth, table->m_maxWidth );
#endif #endif
} }
@ -264,7 +264,7 @@ void FixedTableLayout::layout()
int available = tableWidth; int available = tableWidth;
int nEffCols = table->numEffCols(); int nEffCols = table->numEffCols();
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("FixedTableLayout::layout: tableWidth=%d, numEffCols=%d", tableWidth, nEffCols); tqDebug("FixedTableLayout::layout: tableWidth=%d, numEffCols=%d", tableWidth, nEffCols);
#endif #endif
@ -293,7 +293,7 @@ void FixedTableLayout::layout()
base = available; base = available;
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("FixedTableLayout::layout: assigning percent width, base=%d, totalPercent=%d", base, totalPercent); tqDebug("FixedTableLayout::layout: assigning percent width, base=%d, totalPercent=%d", base, totalPercent);
#endif #endif
for ( int i = 0; available > 0 && i < nEffCols; i++ ) { for ( int i = 0; available > 0 && i < nEffCols; i++ ) {
if ( width[i].isPercent() ) { if ( width[i].isPercent() ) {
@ -344,7 +344,7 @@ void FixedTableLayout::layout()
int hspacing = table->borderHSpacing(); int hspacing = table->borderHSpacing();
for ( int i = 0; i < nEffCols; i++ ) { for ( int i = 0; i < nEffCols; i++ ) {
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("col %d: %d (width %d)", i, pos, calcWidth[i] ); tqDebug("col %d: %d (width %d)", i, pos, calcWidth[i] );
#endif #endif
table->columnPos[i] = pos; table->columnPos[i] = pos;
pos += calcWidth[i] + hspacing; pos += calcWidth[i] + hspacing;
@ -464,7 +464,7 @@ void AutoTableLayout::recalcColumn( int effCol )
l.maxWidth = kMax(l.maxWidth, int(l.minWidth)); l.maxWidth = kMax(l.maxWidth, int(l.minWidth));
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("col %d, final min=%d, max=%d, width=%d(%d)", effCol, l.minWidth, l.maxWidth, l.width.value(), l.width.type() ); tqDebug("col %d, final min=%d, max=%d, width=%d(%d)", effCol, l.minWidth, l.maxWidth, l.width.value(), l.width.type() );
#endif #endif
// ### we need to add col elements aswell // ### we need to add col elements aswell
@ -500,7 +500,7 @@ void AutoTableLayout::fullRecalc()
w = Length(); w = Length();
int cEffCol = table->colToEffCol( cCol ); int cEffCol = table->colToEffCol( cCol );
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" col element %d (eff=%d): Length=%d(%d), span=%d, effColSpan=%d", cCol, cEffCol, w.value(), w.type(), span, table->spanOfEffCol(cEffCol ) ); tqDebug(" col element %d (eff=%d): Length=%d(%d), span=%d, effColSpan=%d", cCol, cEffCol, w.value(), w.type(), span, table->spanOfEffCol(cEffCol ) );
#endif #endif
if ( !w.isVariable() && span == 1 && cEffCol < nEffCols ) { if ( !w.isVariable() && span == 1 && cEffCol < nEffCols ) {
if ( table->spanOfEffCol( cEffCol ) == 1 ) { if ( table->spanOfEffCol( cEffCol ) == 1 ) {
@ -566,7 +566,7 @@ static bool shouldScaleColumns(RenderTable* table)
void AutoTableLayout::calcMinMaxWidth() void AutoTableLayout::calcMinMaxWidth()
{ {
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("AutoTableLayout::calcMinMaxWidth"); tqDebug("AutoTableLayout::calcMinMaxWidth");
#endif #endif
fullRecalc(); fullRecalc();
@ -612,7 +612,7 @@ void AutoTableLayout::calcMinMaxWidth()
table->m_maxWidth = kMin(maxWidth, 0x7fff); table->m_maxWidth = kMin(maxWidth, 0x7fff);
table->m_minWidth = kMin(minWidth, 0x7fff); table->m_minWidth = kMin(minWidth, 0x7fff);
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" minWidth=%d, maxWidth=%d", table->m_minWidth, table->m_maxWidth ); tqDebug(" minWidth=%d, maxWidth=%d", table->m_minWidth, table->m_maxWidth );
#endif #endif
} }
@ -627,7 +627,7 @@ int AutoTableLayout::calcEffectiveWidth()
unsigned int nEffCols = layoutStruct.size(); unsigned int nEffCols = layoutStruct.size();
int hspacing = table->borderHSpacing(); int hspacing = table->borderHSpacing();
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("AutoTableLayout::calcEffectiveWidth for %d cols", nEffCols ); tqDebug("AutoTableLayout::calcEffectiveWidth for %d cols", nEffCols );
#endif #endif
for ( unsigned int i = 0; i < nEffCols; i++ ) { for ( unsigned int i = 0; i < nEffCols; i++ ) {
layoutStruct[i].effWidth = layoutStruct[i].width; layoutStruct[i].effWidth = layoutStruct[i].width;
@ -701,7 +701,7 @@ int AutoTableLayout::calcEffectiveWidth()
cMaxWidth -= hspacing; cMaxWidth -= hspacing;
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" colspan cell %p at effCol %d, span %d, type %d, value %d cmin=%d min=%d fixedwidth=%d", cell, col, cSpan, w.type(), w.value(), cMinWidth, minWidth, fixedWidth ); tqDebug(" colspan cell %p at effCol %d, span %d, type %d, value %d cmin=%d min=%d fixedwidth=%d", cell, col, cSpan, w.type(), w.value(), cMinWidth, minWidth, fixedWidth );
#endif #endif
// adjust table max width if needed // adjust table max width if needed
@ -712,7 +712,7 @@ int AutoTableLayout::calcEffectiveWidth()
} else { } else {
int spanMax = kMax( maxWidth, cMaxWidth ); int spanMax = kMax( maxWidth, cMaxWidth );
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" adjusting tMaxWidth (%d): spanMax=%d, value=%d, totalPercent=%d", tMaxWidth, spanMax, w.value(), totalPercent ); tqDebug(" adjusting tMaxWidth (%d): spanMax=%d, value=%d, totalPercent=%d", tMaxWidth, spanMax, w.value(), totalPercent );
#endif #endif
tMaxWidth = kMax( tMaxWidth, spanMax * 100 / w.value() ); tMaxWidth = kMax( tMaxWidth, spanMax * 100 / w.value() );
@ -728,7 +728,7 @@ int AutoTableLayout::calcEffectiveWidth()
if ( !(layoutStruct[pos].width.isPercent() ) ) { if ( !(layoutStruct[pos].width.isPercent() ) ) {
int percent = percentMissing * layoutStruct[pos].effMaxWidth / totalWidth; int percent = percentMissing * layoutStruct[pos].effMaxWidth / totalWidth;
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" col %d: setting percent value %d effMaxWidth=%d totalWidth=%d", pos, percent, layoutStruct[pos].effMaxWidth, totalWidth ); tqDebug(" col %d: setting percent value %d effMaxWidth=%d totalWidth=%d", pos, percent, layoutStruct[pos].effMaxWidth, totalWidth );
#endif #endif
totalWidth -= layoutStruct[pos].effMaxWidth; totalWidth -= layoutStruct[pos].effMaxWidth;
percentMissing -= percent; percentMissing -= percent;
@ -746,12 +746,12 @@ int AutoTableLayout::calcEffectiveWidth()
if ( cMinWidth > minWidth ) { if ( cMinWidth > minWidth ) {
if ( allColsAreFixed ) { if ( allColsAreFixed ) {
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("extending minWidth of cols %d-%d to %dpx currentMin=%d accroding to fixed sum %d", col, lastCol-1, cMinWidth, minWidth, fixedWidth ); tqDebug("extending minWidth of cols %d-%d to %dpx currentMin=%d accroding to fixed sum %d", col, lastCol-1, cMinWidth, minWidth, fixedWidth );
#endif #endif
for ( unsigned int pos = col; fixedWidth > 0 && pos < lastCol; pos++ ) { for ( unsigned int pos = col; fixedWidth > 0 && pos < lastCol; pos++ ) {
int w = kMax( int( layoutStruct[pos].effMinWidth ), cMinWidth * layoutStruct[pos].width.value() / fixedWidth ); int w = kMax( int( layoutStruct[pos].effMinWidth ), cMinWidth * layoutStruct[pos].width.value() / fixedWidth );
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" col %d: min=%d, effMin=%d, new=%d", pos, layoutStruct[pos].effMinWidth, layoutStruct[pos].effMinWidth, w ); tqDebug(" col %d: min=%d, effMin=%d, new=%d", pos, layoutStruct[pos].effMinWidth, layoutStruct[pos].effMinWidth, w );
#endif #endif
fixedWidth -= layoutStruct[pos].width.value(); fixedWidth -= layoutStruct[pos].width.value();
cMinWidth -= w; cMinWidth -= w;
@ -769,7 +769,7 @@ int AutoTableLayout::calcEffectiveWidth()
w = kMax( w, cminw*layoutStruct[pos].effWidth.value()/totalPercent ); w = kMax( w, cminw*layoutStruct[pos].effWidth.value()/totalPercent );
w = kMin(layoutStruct[pos].effMinWidth+(cMinWidth-minw), w); w = kMin(layoutStruct[pos].effMinWidth+(cMinWidth-minw), w);
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" col %d: min=%d, effMin=%d, new=%d", pos, layoutStruct[pos].effMinWidth, layoutStruct[pos].effMinWidth, w ); tqDebug(" col %d: min=%d, effMin=%d, new=%d", pos, layoutStruct[pos].effMinWidth, layoutStruct[pos].effMinWidth, w );
#endif #endif
maxw -= layoutStruct[pos].effMaxWidth; maxw -= layoutStruct[pos].effMaxWidth;
minw -= layoutStruct[pos].effMinWidth; minw -= layoutStruct[pos].effMinWidth;
@ -779,7 +779,7 @@ int AutoTableLayout::calcEffectiveWidth()
} }
} else { } else {
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("extending minWidth of cols %d-%d to %dpx currentMin=%d", col, lastCol-1, cMinWidth, minWidth ); tqDebug("extending minWidth of cols %d-%d to %dpx currentMin=%d", col, lastCol-1, cMinWidth, minWidth );
#endif #endif
int maxw = maxWidth; int maxw = maxWidth;
int minw = minWidth; int minw = minWidth;
@ -791,7 +791,7 @@ int AutoTableLayout::calcEffectiveWidth()
fixedWidth -= layoutStruct[pos].width.value(); fixedWidth -= layoutStruct[pos].width.value();
minw -= layoutStruct[pos].effMinWidth; minw -= layoutStruct[pos].effMinWidth;
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" col %d: min=%d, effMin=%d, new=%d", pos, layoutStruct[pos].effMinWidth, layoutStruct[pos].effMinWidth, w ); tqDebug(" col %d: min=%d, effMin=%d, new=%d", pos, layoutStruct[pos].effMinWidth, layoutStruct[pos].effMinWidth, w );
#endif #endif
maxw -= layoutStruct[pos].effMaxWidth; maxw -= layoutStruct[pos].effMaxWidth;
cMinWidth -= w; cMinWidth -= w;
@ -805,7 +805,7 @@ int AutoTableLayout::calcEffectiveWidth()
w = kMin(layoutStruct[pos].effMinWidth+(cMinWidth-minw), w); w = kMin(layoutStruct[pos].effMinWidth+(cMinWidth-minw), w);
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" col %d: min=%d, effMin=%d, new=%d", pos, layoutStruct[pos].effMinWidth, layoutStruct[pos].effMinWidth, w ); tqDebug(" col %d: min=%d, effMin=%d, new=%d", pos, layoutStruct[pos].effMinWidth, layoutStruct[pos].effMinWidth, w );
#endif #endif
maxw -= layoutStruct[pos].effMaxWidth; maxw -= layoutStruct[pos].effMaxWidth;
minw -= layoutStruct[pos].effMinWidth; minw -= layoutStruct[pos].effMinWidth;
@ -818,12 +818,12 @@ int AutoTableLayout::calcEffectiveWidth()
if ( !w.isPercent() ) { if ( !w.isPercent() ) {
if ( cMaxWidth > maxWidth ) { if ( cMaxWidth > maxWidth ) {
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("extending maxWidth of cols %d-%d to %dpx", col, lastCol-1, cMaxWidth ); tqDebug("extending maxWidth of cols %d-%d to %dpx", col, lastCol-1, cMaxWidth );
#endif #endif
for ( unsigned int pos = col; maxWidth > 0 && pos < lastCol; pos++ ) { for ( unsigned int pos = col; maxWidth > 0 && pos < lastCol; pos++ ) {
int w = kMax( int( layoutStruct[pos].effMaxWidth ), cMaxWidth * layoutStruct[pos].effMaxWidth / maxWidth ); int w = kMax( int( layoutStruct[pos].effMaxWidth ), cMaxWidth * layoutStruct[pos].effMaxWidth / maxWidth );
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" col %d: max=%d, effMax=%d, new=%d", pos, layoutStruct[pos].effMaxWidth, layoutStruct[pos].effMaxWidth, w ); tqDebug(" col %d: max=%d, effMax=%d, new=%d", pos, layoutStruct[pos].effMaxWidth, layoutStruct[pos].effMaxWidth, w );
#endif #endif
maxWidth -= layoutStruct[pos].effMaxWidth; maxWidth -= layoutStruct[pos].effMaxWidth;
cMaxWidth -= w; cMaxWidth -= w;
@ -837,7 +837,7 @@ int AutoTableLayout::calcEffectiveWidth()
} }
effWidthDirty = false; effWidthDirty = false;
// qDebug("calcEffectiveWidth: tMaxWidth=%d", tMaxWidth ); // tqDebug("calcEffectiveWidth: tMaxWidth=%d", tMaxWidth );
return tMaxWidth; return tMaxWidth;
} }
@ -849,7 +849,7 @@ void AutoTableLayout::insertSpanCell( RenderTableCell *cell )
if ( !cell || cell == (RenderTableCell *)-1 || cell->colSpan() == 1 ) if ( !cell || cell == (RenderTableCell *)-1 || cell->colSpan() == 1 )
return; return;
// qDebug("inserting span cell %p with span %d", cell, cell->colSpan() ); // tqDebug("inserting span cell %p with span %d", cell, cell->colSpan() );
int size = spanCells.size(); int size = spanCells.size();
if ( !size || spanCells[size-1] != 0 ) { if ( !size || spanCells[size-1] != 0 ) {
spanCells.resize( size + 10 ); spanCells.resize( size + 10 );
@ -876,24 +876,24 @@ void AutoTableLayout::layout()
int nEffCols = table->numEffCols(); int nEffCols = table->numEffCols();
if ( nEffCols != (int)layoutStruct.size() ) { if ( nEffCols != (int)layoutStruct.size() ) {
qWarning("WARNING: nEffCols is not equal to layoutstruct!" ); tqWarning("WARNING: nEffCols is not equal to layoutstruct!" );
fullRecalc(); fullRecalc();
nEffCols = table->numEffCols(); nEffCols = table->numEffCols();
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("AutoTableLayout::layout()"); tqDebug("AutoTableLayout::layout()");
#endif #endif
if ( effWidthDirty ) if ( effWidthDirty )
calcEffectiveWidth(); calcEffectiveWidth();
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug(" tableWidth=%d, nEffCols=%d", tableWidth, nEffCols ); tqDebug(" tableWidth=%d, nEffCols=%d", tableWidth, nEffCols );
for ( int i = 0; i < nEffCols; i++ ) { for ( int i = 0; i < nEffCols; i++ ) {
qDebug(" effcol %d is of type %d value %d, minWidth=%d, maxWidth=%d", tqDebug(" effcol %d is of type %d value %d, minWidth=%d, maxWidth=%d",
i, layoutStruct[i].width.type(), layoutStruct[i].width.value(), i, layoutStruct[i].width.type(), layoutStruct[i].width.value(),
layoutStruct[i].minWidth, layoutStruct[i].maxWidth ); layoutStruct[i].minWidth, layoutStruct[i].maxWidth );
qDebug(" effective: type %d value %d, minWidth=%d, maxWidth=%d", tqDebug(" effective: type %d value %d, minWidth=%d, maxWidth=%d",
layoutStruct[i].effWidth.type(), layoutStruct[i].effWidth.value(), layoutStruct[i].effWidth.type(), layoutStruct[i].effWidth.value(),
layoutStruct[i].effMinWidth, layoutStruct[i].effMaxWidth ); layoutStruct[i].effMinWidth, layoutStruct[i].effMaxWidth );
} }
@ -959,13 +959,13 @@ void AutoTableLayout::layout()
int newWidth = kMax( int (layoutStruct[i].effMinWidth), w - reduction ); int newWidth = kMax( int (layoutStruct[i].effMinWidth), w - reduction );
available += w - newWidth; available += w - newWidth;
layoutStruct[i].calcWidth = newWidth; layoutStruct[i].calcWidth = newWidth;
//qDebug("col %d: reducing to %d px (reduction=%d)", i, newWidth, reduction ); //tqDebug("col %d: reducing to %d px (reduction=%d)", i, newWidth, reduction );
} }
} }
} }
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("percent satisfied: available is %d", available); tqDebug("percent satisfied: available is %d", available);
#endif #endif
// then allocate width to fixed cols // then allocate width to fixed cols
@ -979,7 +979,7 @@ void AutoTableLayout::layout()
} }
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("fixed satisfied: available is %d", available); tqDebug("fixed satisfied: available is %d", available);
#endif #endif
// now satisfy relative // now satisfy relative
@ -998,7 +998,7 @@ void AutoTableLayout::layout()
// now satisfy variable // now satisfy variable
if ( available > 0 && numVariable ) { if ( available > 0 && numVariable ) {
available += allocVariable; // this gets redistributed available += allocVariable; // this gets redistributed
//qDebug("redistributing %dpx to %d variable columns. totalVariable=%d", available, numVariable, totalVariable ); //tqDebug("redistributing %dpx to %d variable columns. totalVariable=%d", available, numVariable, totalVariable );
for ( int i = 0; i < nEffCols; i++ ) { for ( int i = 0; i < nEffCols; i++ ) {
const Length &width = layoutStruct[i].effWidth; const Length &width = layoutStruct[i].effWidth;
if ( width.isVariable() && totalVariable != 0 ) { if ( width.isVariable() && totalVariable != 0 ) {
@ -1011,7 +1011,7 @@ void AutoTableLayout::layout()
} }
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("variable satisfied: available is %d", available ); tqDebug("variable satisfied: available is %d", available );
#endif #endif
// spread over fixed colums // spread over fixed colums
@ -1029,7 +1029,7 @@ void AutoTableLayout::layout()
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("after fixed distribution: available=%d", available ); tqDebug("after fixed distribution: available=%d", available );
#endif #endif
// spread over percent colums // spread over percent colums
@ -1048,7 +1048,7 @@ void AutoTableLayout::layout()
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("after percent distribution: available=%d", available ); tqDebug("after percent distribution: available=%d", available );
#endif #endif
// spread over the rest // spread over the rest
@ -1065,7 +1065,7 @@ void AutoTableLayout::layout()
} }
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("after equal distribution: available=%d", available ); tqDebug("after equal distribution: available=%d", available );
#endif #endif
// if we have overallocated, reduce every cell according to the difference between desired width and minwidth // if we have overallocated, reduce every cell according to the difference between desired width and minwidth
// this seems to produce to the pixel exaxt results with IE. Wonder is some of this also holds for width distributing. // this seems to produce to the pixel exaxt results with IE. Wonder is some of this also holds for width distributing.
@ -1165,12 +1165,12 @@ void AutoTableLayout::layout()
} }
} }
//qDebug( " final available=%d", available ); //tqDebug( " final available=%d", available );
int pos = 0; int pos = 0;
for ( int i = 0; i < nEffCols; i++ ) { for ( int i = 0; i < nEffCols; i++ ) {
#ifdef DEBUG_LAYOUT #ifdef DEBUG_LAYOUT
qDebug("col %d: %d (width %d)", i, pos, layoutStruct[i].calcWidth ); tqDebug("col %d: %d (width %d)", i, pos, layoutStruct[i].calcWidth );
#endif #endif
table->columnPos[i] = pos; table->columnPos[i] = pos;
pos += layoutStruct[i].calcWidth + table->borderHSpacing(); pos += layoutStruct[i].calcWidth + table->borderHSpacing();

@ -227,7 +227,7 @@ TQFontDatabase::findFont( TQFont::Script script, const QFontPrivate *fp,
XFontStruct *xfs; XFontStruct *xfs;
xfs = XLoadQueryFont(TQPaintDevice::x11AppDisplay(), xlfd.latin1() ); xfs = XLoadQueryFont(TQPaintDevice::x11AppDisplay(), xlfd.latin1() );
if (!xfs) // as long as you don't do screenshots, it's maybe fine if (!xfs) // as long as you don't do screenshots, it's maybe fine
qFatal("we need some fonts. So make sure you have %s installed.", xlfd.latin1()); tqFatal("we need some fonts. So make sure you have %s installed.", xlfd.latin1());
unsigned long value; unsigned long value;
if ( !XGetFontProperty( xfs, XA_FONT, &value ) ) if ( !XGetFontProperty( xfs, XA_FONT, &value ) )
@ -240,7 +240,7 @@ TQFontDatabase::findFont( TQFont::Script script, const QFontPrivate *fp,
fe = new QFakeFontEngine( xfs, xlfd.latin1(),request.pixelSize ); fe = new QFakeFontEngine( xfs, xlfd.latin1(),request.pixelSize );
// qDebug("fe %s ascent %d descent %d minLeftBearing %d leading %d maxCharWidth %d minRightBearing %d", xlfd.latin1(), fe->ascent(), fe->descent(), fe->minLeftBearing(), fe->leading(), fe->maxCharWidth(), fe->minRightBearing()); // tqDebug("fe %s ascent %d descent %d minLeftBearing %d leading %d maxCharWidth %d minRightBearing %d", xlfd.latin1(), fe->ascent(), fe->descent(), fe->minLeftBearing(), fe->leading(), fe->maxCharWidth(), fe->minRightBearing());
// fe->setScale( scale ); // fe->setScale( scale );
@ -348,7 +348,7 @@ KDE_EXPORT void TQApplication::setPalette( const TQPalette &, bool ,
XFontStruct *xfs; XFontStruct *xfs;
xfs = XLoadQueryFont(TQPaintDevice::x11AppDisplay(), xlfd.latin1() ); xfs = XLoadQueryFont(TQPaintDevice::x11AppDisplay(), xlfd.latin1() );
if (!xfs) // as long as you don't do screenshots, it's maybe fine if (!xfs) // as long as you don't do screenshots, it's maybe fine
qFatal("We will need some fonts. So make sure you have %s installed.", xlfd.latin1()); tqFatal("We will need some fonts. So make sure you have %s installed.", xlfd.latin1());
XFreeFont(TQPaintDevice::x11AppDisplay(), xfs); XFreeFont(TQPaintDevice::x11AppDisplay(), xfs);
done = true; done = true;
} }
@ -356,7 +356,7 @@ KDE_EXPORT void TQApplication::setPalette( const TQPalette &, bool ,
#include <kapplication.h> #include <kapplication.h>
void KApplication::dcopFailure( const TQString & ) void KApplication::dcopFailure( const TQString & )
{ {
qDebug( "KApplication::dcopFailure" ); tqDebug( "KApplication::dcopFailure" );
} }
#include <kparts/historyprovider.h> #include <kparts/historyprovider.h>

@ -1108,7 +1108,7 @@ void DocumentImpl::setDocumentChanged(bool b)
void DocumentImpl::recalcStyle( StyleChange change ) void DocumentImpl::recalcStyle( StyleChange change )
{ {
// qDebug("recalcStyle(%p)", this); // tqDebug("recalcStyle(%p)", this);
// TQTime qt; // TQTime qt;
// qt.start(); // qt.start();
if (m_inStyleRecalc) if (m_inStyleRecalc)
@ -1749,7 +1749,7 @@ bool DocumentImpl::prepareMouseEvent( bool readonly, int _x, int _y, MouseEvent
if (renderInfo.URLElement()) { if (renderInfo.URLElement()) {
assert(renderInfo.URLElement()->isElementNode()); assert(renderInfo.URLElement()->isElementNode());
//qDebug("urlnode: %s (%d)", getTagName(renderInfo.URLElement()->id()).string().latin1(), renderInfo.URLElement()->id()); //tqDebug("urlnode: %s (%d)", getTagName(renderInfo.URLElement()->id()).string().latin1(), renderInfo.URLElement()->id());
ElementImpl* e = static_cast<ElementImpl*>(renderInfo.URLElement()); ElementImpl* e = static_cast<ElementImpl*>(renderInfo.URLElement());
DOMString href = khtml::parseURL(e->getAttribute(ATTR_HREF)); DOMString href = khtml::parseURL(e->getAttribute(ATTR_HREF));

@ -614,7 +614,7 @@ void ElementImpl::recalcStyle( StyleChange change )
case Force: debug = "Force"; case Force: debug = "Force";
break; break;
} }
qDebug("recalcStyle(%d: %s, changed: %d)[%p: %s]", change, debug, changed(), this, tagName().string().latin1()); tqDebug("recalcStyle(%d: %s, changed: %d)[%p: %s]", change, debug, changed(), this, tagName().string().latin1());
#endif #endif
if ( hasParentRenderer && (change >= Inherit || changed()) ) { if ( hasParentRenderer && (change >= Inherit || changed()) ) {
RenderStyle *newStyle = getDocument()->styleSelector()->styleForElement(this); RenderStyle *newStyle = getDocument()->styleSelector()->styleForElement(this);
@ -650,7 +650,7 @@ void ElementImpl::recalcStyle( StyleChange change )
for (n = _first; n; n = n->nextSibling()) { for (n = _first; n; n = n->nextSibling()) {
if ( change >= Inherit || n->isTextNode() || if ( change >= Inherit || n->isTextNode() ||
n->hasChangedChild() || n->changed() ) { n->hasChangedChild() || n->changed() ) {
//qDebug(" (%p) calling recalcStyle on child %p/%s, change=%d", this, n, n->isElementNode() ? ((ElementImpl *)n)->tagName().string().latin1() : n->isTextNode() ? "text" : "unknown", change ); //tqDebug(" (%p) calling recalcStyle on child %p/%s, change=%d", this, n, n->isElementNode() ? ((ElementImpl *)n)->tagName().string().latin1() : n->isTextNode() ? "text" : "unknown", change );
n->recalcStyle( change ); n->recalcStyle( change );
} }
} }

@ -430,13 +430,13 @@ NodeImpl::Id TextImpl::id() const
void TextImpl::recalcStyle( StyleChange change ) void TextImpl::recalcStyle( StyleChange change )
{ {
// qDebug("textImpl::recalcStyle"); // tqDebug("textImpl::recalcStyle");
// Create renderer if now needed // Create renderer if now needed
if ( changed() && !m_render) { if ( changed() && !m_render) {
createRendererIfNeeded(); createRendererIfNeeded();
} }
if (change != NoChange && parentNode()) { if (change != NoChange && parentNode()) {
// qDebug("DomText::recalcStyle"); // tqDebug("DomText::recalcStyle");
if(m_render) if(m_render)
m_render->setStyle(parentNode()->renderer()->style()); m_render->setStyle(parentNode()->renderer()->style());
} }

@ -168,7 +168,7 @@ public:
virtual void write( const TokenizerString &str, bool ); virtual void write( const TokenizerString &str, bool );
virtual void end(); virtual void end();
virtual void finish(); virtual void finish();
virtual void setAutoClose(bool b=true) { qWarning("XMLTokenizer::setAutoClose: stub."); (void)b; } virtual void setAutoClose(bool b=true) { tqWarning("XMLTokenizer::setAutoClose: stub."); (void)b; }
// from CachedObjectClient // from CachedObjectClient
void notifyFinished(khtml::CachedObject *finishedObj); void notifyFinished(khtml::CachedObject *finishedObj);

@ -1545,7 +1545,7 @@ int tdeinit_xio_errhandler( Display *disp )
// disp is 0L when KDE shuts down. We don't want those warnings then. // disp is 0L when KDE shuts down. We don't want those warnings then.
if ( disp ) if ( disp )
qWarning( "tdeinit: Fatal IO error: client killed" ); tqWarning( "tdeinit: Fatal IO error: client killed" );
if (sock_file[0]) if (sock_file[0])
{ {
@ -1567,7 +1567,7 @@ int tdeinit_xio_errhandler( Display *disp )
} }
if ( disp ) if ( disp )
qWarning( "tdeinit: sending SIGHUP to children." ); tqWarning( "tdeinit: sending SIGHUP to children." );
/* this should remove all children we started */ /* this should remove all children we started */
signal(SIGHUP, SIG_IGN); signal(SIGHUP, SIG_IGN);
@ -1576,14 +1576,14 @@ int tdeinit_xio_errhandler( Display *disp )
sleep(2); sleep(2);
if ( disp ) if ( disp )
qWarning( "tdeinit: sending SIGTERM to children." ); tqWarning( "tdeinit: sending SIGTERM to children." );
/* and if they don't listen to us, this should work */ /* and if they don't listen to us, this should work */
signal(SIGTERM, SIG_IGN); signal(SIGTERM, SIG_IGN);
kill(0, SIGTERM); kill(0, SIGTERM);
if ( disp ) if ( disp )
qWarning( "tdeinit: Exit." ); tqWarning( "tdeinit: Exit." );
exit( 0 ); exit( 0 );
return 0; return 0;

@ -186,7 +186,7 @@ KLauncher::KLauncher(int _tdeinitSocket, bool new_startup)
if (domainname.status() != 0) if (domainname.status() != 0)
{ {
// Sever error! // Sever error!
qDebug("KLauncher: Fatal error, can't create tempfile!"); tqDebug("KLauncher: Fatal error, can't create tempfile!");
::exit(1); ::exit(1);
} }
mPoolSocketName = domainname.name(); mPoolSocketName = domainname.name();
@ -210,13 +210,13 @@ KLauncher::KLauncher(int _tdeinitSocket, bool new_startup)
mSlaveDebug = getenv("KDE_SLAVE_DEBUG_WAIT"); mSlaveDebug = getenv("KDE_SLAVE_DEBUG_WAIT");
if (!mSlaveDebug.isEmpty()) if (!mSlaveDebug.isEmpty())
{ {
qWarning("Klauncher running in slave-debug mode for slaves of protocol '%s'", mSlaveDebug.data()); tqWarning("Klauncher running in slave-debug mode for slaves of protocol '%s'", mSlaveDebug.data());
} }
mSlaveValgrind = getenv("KDE_SLAVE_VALGRIND"); mSlaveValgrind = getenv("KDE_SLAVE_VALGRIND");
if (!mSlaveValgrind.isEmpty()) if (!mSlaveValgrind.isEmpty())
{ {
mSlaveValgrindSkin = getenv("KDE_SLAVE_VALGRIND_SKIN"); mSlaveValgrindSkin = getenv("KDE_SLAVE_VALGRIND_SKIN");
qWarning("Klauncher running slaves through valgrind for slaves of protocol '%s'", mSlaveValgrind.data()); tqWarning("Klauncher running slaves through valgrind for slaves of protocol '%s'", mSlaveValgrind.data());
} }
klauncher_header request_header; klauncher_header request_header;
request_header.cmd = LAUNCHER_OK; request_header.cmd = LAUNCHER_OK;

@ -32,7 +32,7 @@ public:
if ( !d_ptr ) { if ( !d_ptr ) {
cleanup_d_ptr(); cleanup_d_ptr();
d_ptr = new TQPtrDict<PrivateData>; d_ptr = new TQPtrDict<PrivateData>;
qAddPostRoutine( cleanup_d_ptr ); tqAddPostRoutine( cleanup_d_ptr );
} }
PrivateData* ret = d_ptr->find( (void*) instance ); PrivateData* ret = d_ptr->find( (void*) instance );
if ( ! ret ) { if ( ! ret ) {

@ -216,7 +216,7 @@ void KDirSelectDialog::setCurrentURL( const KURL& url )
{ {
dirToList.setPath( path.left( pos +1 ) ); dirToList.setPath( path.left( pos +1 ) );
d->dirsToList.push( dirToList ); d->dirsToList.push( dirToList );
// qDebug( "List: %s", dirToList.url().latin1()); // tqDebug( "List: %s", dirToList.url().latin1());
} }
} }
} }
@ -241,7 +241,7 @@ void KDirSelectDialog::openNextDir( KFileTreeViewItem * /*parent*/ )
slotNextDirToList( item ); slotNextDirToList( item );
} }
// else // else
// qDebug("###### openNextDir: item not found!"); // tqDebug("###### openNextDir: item not found!");
} }
void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item ) void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item )

@ -511,7 +511,7 @@ void KFileDialog::slotOk()
} }
else { // FIXME: remote directory, should we allow that? else { // FIXME: remote directory, should we allow that?
// qDebug( "**** Selected remote directory: %s", d->url.url().latin1()); // tqDebug( "**** Selected remote directory: %s", d->url.url().latin1());
d->filenames = TQString::null; d->filenames = TQString::null;
d->urlList.clear(); d->urlList.clear();
d->urlList.append( d->url ); d->urlList.append( d->url );

@ -783,7 +783,7 @@ void KFileIconView::initItem( KFileIconViewItem *item, const KFileItem *i,
else // Name or Unsorted else // Name or Unsorted
item->setKey( sortingKey( i->text(), i->isDir(), spec )); item->setKey( sortingKey( i->text(), i->isDir(), spec ));
//qDebug("** key for: %s: %s", i->text().latin1(), item->key().latin1()); //tqDebug("** key for: %s: %s", i->text().latin1(), item->key().latin1());
if ( d->previews->isChecked() ) if ( d->previews->isChecked() )
d->previewTimer.start( 10, true ); d->previewTimer.start( 10, true );

@ -49,14 +49,14 @@ void KFileMetaPreview::initPreviewProviders()
TQStringList::ConstIterator it = mimeTypes.begin(); TQStringList::ConstIterator it = mimeTypes.begin();
for ( ; it != mimeTypes.end(); ++it ) for ( ; it != mimeTypes.end(); ++it )
{ {
// qDebug(".... %s", (*it).latin1()); // tqDebug(".... %s", (*it).latin1());
m_previewProviders.insert( *it, imagePreview ); m_previewProviders.insert( *it, imagePreview );
} }
} }
KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeType ) KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeType )
{ {
// qDebug("### looking for: %s", mimeType.latin1()); // tqDebug("### looking for: %s", mimeType.latin1());
// often the first highlighted item, where we can be sure, there is no plugin // often the first highlighted item, where we can be sure, there is no plugin
// (this "folders reflect icons" is a konq-specific thing, right?) // (this "folders reflect icons" is a konq-specific thing, right?)
if ( mimeType == "inode/directory" ) if ( mimeType == "inode/directory" )
@ -66,7 +66,7 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeT
if ( provider ) if ( provider )
return provider; return provider;
//qDebug("#### didn't find anything for: %s", mimeType.latin1()); //tqDebug("#### didn't find anything for: %s", mimeType.latin1());
if ( s_tryAudioPreview && if ( s_tryAudioPreview &&
!mimeType.startsWith("text/") && !mimeType.startsWith("image/") ) !mimeType.startsWith("text/") && !mimeType.startsWith("image/") )

@ -66,25 +66,25 @@ int main(int argc, char **argv)
else if (argv1 == TQString::fromLatin1("justone")) { else if (argv1 == TQString::fromLatin1("justone")) {
TQString name = KFileDialog::getOpenFileName(startDir); TQString name = KFileDialog::getOpenFileName(startDir);
qDebug("filename=%s",name.latin1()); tqDebug("filename=%s",name.latin1());
} }
else if (argv1 == TQString::fromLatin1("existingURL")) { else if (argv1 == TQString::fromLatin1("existingURL")) {
KURL url = KFileDialog::getExistingURL(); KURL url = KFileDialog::getExistingURL();
qDebug("URL=%s",url.url().latin1()); tqDebug("URL=%s",url.url().latin1());
name1 = url.url(); name1 = url.url();
} }
else if (argv1 == TQString::fromLatin1("preview")) { else if (argv1 == TQString::fromLatin1("preview")) {
KURL u = KFileDialog::getImageOpenURL(); KURL u = KFileDialog::getImageOpenURL();
qDebug("filename=%s", u.url().latin1()); tqDebug("filename=%s", u.url().latin1());
} }
else if (argv1 == TQString::fromLatin1("preselect")) { else if (argv1 == TQString::fromLatin1("preselect")) {
names = KFileDialog::getOpenFileNames(TQString::fromLatin1("/etc/passwd")); names = KFileDialog::getOpenFileNames(TQString::fromLatin1("/etc/passwd"));
TQStringList::Iterator it = names.begin(); TQStringList::Iterator it = names.begin();
while ( it != names.end() ) { while ( it != names.end() ) {
qDebug("selected file: %s", (*it).latin1()); tqDebug("selected file: %s", (*it).latin1());
++it; ++it;
} }
} }
@ -135,7 +135,7 @@ int main(int argc, char **argv)
// url.setPath( "/" ); // url.setPath( "/" );
// KURL selected = KDirSelectDialog::selectDirectory( url ); // KURL selected = KDirSelectDialog::selectDirectory( url );
// name1 = selected.url(); // name1 = selected.url();
// qDebug("*** selected: %s", selected.url().latin1()); // tqDebug("*** selected: %s", selected.url().latin1());
// } // }
else { else {
@ -158,19 +158,19 @@ int main(int argc, char **argv)
if ( dlg.exec() == TQDialog::Accepted ) { if ( dlg.exec() == TQDialog::Accepted ) {
KURL::List list = dlg.selectedURLs(); KURL::List list = dlg.selectedURLs();
KURL::List::ConstIterator it = list.begin(); KURL::List::ConstIterator it = list.begin();
qDebug("*** selectedURLs(): "); tqDebug("*** selectedURLs(): ");
while ( it != list.end() ) { while ( it != list.end() ) {
name1 = (*it).url(); name1 = (*it).url();
qDebug(" -> %s", name1.latin1()); tqDebug(" -> %s", name1.latin1());
++it; ++it;
} }
qDebug("*** selectedFile: %s", dlg.selectedFile().latin1()); tqDebug("*** selectedFile: %s", dlg.selectedFile().latin1());
qDebug("*** selectedURL: %s", dlg.selectedURL().url().latin1()); tqDebug("*** selectedURL: %s", dlg.selectedURL().url().latin1());
qDebug("*** selectedFiles: "); tqDebug("*** selectedFiles: ");
TQStringList l = dlg.selectedFiles(); TQStringList l = dlg.selectedFiles();
TQStringList::Iterator it2 = l.begin(); TQStringList::Iterator it2 = l.begin();
while ( it2 != l.end() ) { while ( it2 != l.end() ) {
qDebug(" -> %s", (*it2).latin1()); tqDebug(" -> %s", (*it2).latin1());
++it2; ++it2;
} }
} }

@ -7,7 +7,7 @@ int main( int argc, char **argv )
{ {
KApplication app( argc, argv, "kurlrequestertest" ); KApplication app( argc, argv, "kurlrequestertest" );
KURL url = KURLRequesterDlg::getURL( "ftp://ftp.kde.org" ); KURL url = KURLRequesterDlg::getURL( "ftp://ftp.kde.org" );
qDebug( "Selected url: %s", url.url().latin1()); tqDebug( "Selected url: %s", url.url().latin1());
KURLRequester *req = new KURLRequester(); KURLRequester *req = new KURLRequester();
KEditListBox *el = new KEditListBox( TQString::fromLatin1("Test"), req->customEditor() ); KEditListBox *el = new KEditListBox( TQString::fromLatin1("Test"), req->customEditor() );

@ -1295,11 +1295,11 @@ mcheck(union VALUETYPE *p, struct magic *m)
return 0; /* NOTREACHED */ return 0; /* NOTREACHED */
} }
#if 0 #if 0
qDebug("Before signextend %08x", v); tqDebug("Before signextend %08x", v);
#endif #endif
v = signextend(m, v) & m->mask; v = signextend(m, v) & m->mask;
#if 0 #if 0
qDebug("After signextend %08x", v); tqDebug("After signextend %08x", v);
#endif #endif
switch (m->reln) { switch (m->reln) {

@ -284,11 +284,11 @@ KService::init( KDesktopFile *config )
// Store all additional entries in the property map. // Store all additional entries in the property map.
// A TQMap<TQString,TQString> would be easier for this but we can't // A TQMap<TQString,TQString> would be easier for this but we can't
// brake BC, so we have to store it in m_mapProps. // brake BC, so we have to store it in m_mapProps.
// qWarning("Path = %s", entryPath().latin1()); // tqWarning("Path = %s", entryPath().latin1());
TQMap<TQString,TQString>::ConstIterator it = entryMap.begin(); TQMap<TQString,TQString>::ConstIterator it = entryMap.begin();
for( ; it != entryMap.end();++it) for( ; it != entryMap.end();++it)
{ {
//qDebug(" Key = %s Data = %s", it.key().latin1(), it.data().latin1()); //tqDebug(" Key = %s Data = %s", it.key().latin1(), it.data().latin1());
TQString key = it.key(); TQString key = it.key();
if (kde4application && key=="OnlyShowIn" && it.data()=="KDE;") if (kde4application && key=="OnlyShowIn" && it.data()=="KDE;")
key = "NotShowIn"; key = "NotShowIn";
@ -480,7 +480,7 @@ public:
KServiceReadProperty(const TQString &_key, const TQCString &_value) KServiceReadProperty(const TQString &_key, const TQCString &_value)
: key(_key), value(_value) { } : key(_key), value(_value) { }
bool internalHasGroup(const TQCString &) const { /*qDebug("hasGroup(const TQCString &)");*/ return false; } bool internalHasGroup(const TQCString &) const { /*tqDebug("hasGroup(const TQCString &)");*/ return false; }
TQStringList groupList() const { return TQStringList(); } TQStringList groupList() const { return TQStringList(); }

@ -494,7 +494,7 @@ bool KTar::openArchive( int mode )
} }
else else
{ {
//qDebug("Terminating. Read %d bytes, first one is %d", n, buffer[0]); //tqDebug("Terminating. Read %d bytes, first one is %d", n, buffer[0]);
d->tarEnd = dev->at() - n; // Remember end of archive d->tarEnd = dev->at() - n; // Remember end of archive
ende = true; ende = true;
} }

@ -1091,13 +1091,13 @@ bool KZip::prepareWriting_impl(const TQString &name, const TQString &user,
//kdDebug(7040) << "prepareWriting reached." << endl; //kdDebug(7040) << "prepareWriting reached." << endl;
if ( !isOpened() ) if ( !isOpened() )
{ {
qWarning( "KZip::writeFile: You must open the zip file before writing to it\n"); tqWarning( "KZip::writeFile: You must open the zip file before writing to it\n");
return false; return false;
} }
if ( ! ( mode() & IO_WriteOnly ) ) // accept WriteOnly and ReadWrite if ( ! ( mode() & IO_WriteOnly ) ) // accept WriteOnly and ReadWrite
{ {
qWarning( "KZip::writeFile: You must open the zip file for writing\n"); tqWarning( "KZip::writeFile: You must open the zip file for writing\n");
return false; return false;
} }

@ -82,7 +82,7 @@ public:
SlaveBaseConfig(SlaveBase *_slave) SlaveBaseConfig(SlaveBase *_slave)
: slave(_slave) { } : slave(_slave) { }
bool internalHasGroup(const TQCString &) const { qWarning("hasGroup(const TQCString &)"); bool internalHasGroup(const TQCString &) const { tqWarning("hasGroup(const TQCString &)");
return false; } return false; }
TQStringList groupList() const { return TQStringList(); } TQStringList groupList() const { return TQStringList(); }

@ -40,7 +40,7 @@ int KSSLPemCallback(char *buf, int size, int rwflag, void *userdata) {
if (passlen > (unsigned int)size-1) if (passlen > (unsigned int)size-1)
pass.truncate((unsigned int)size-1); pass.truncate((unsigned int)size-1);
qstrncpy(buf, pass.data(), size-1); tqstrncpy(buf, pass.data(), size-1);
for (unsigned int i = 0; i < passlen; i++) for (unsigned int i = 0; i < passlen; i++)
pass[i] = 0; pass[i] = 0;

@ -144,18 +144,18 @@ TQByteArray KDESasl::getDigestMd5Response(const TQByteArray &aChallenge)
while (d < aChallenge.size() && aChallenge[d] != ',') d++; while (d < aChallenge.size() && aChallenge[d] != ',') d++;
} }
str = TQCString(aChallenge.data() + c, d - c + 1); str = TQCString(aChallenge.data() + c, d - c + 1);
if (qstrnicmp(aChallenge.data() + a, "realm=", 6) == 0) realm = str; if (tqstrnicmp(aChallenge.data() + a, "realm=", 6) == 0) realm = str;
else if (qstrnicmp(aChallenge.data() + a, "nonce=", 6) == 0) nonce = str; else if (tqstrnicmp(aChallenge.data() + a, "nonce=", 6) == 0) nonce = str;
else if (qstrnicmp(aChallenge.data() + a, "qop=", 4) == 0) qop = str; else if (tqstrnicmp(aChallenge.data() + a, "qop=", 4) == 0) qop = str;
else if (qstrnicmp(aChallenge.data() + a, "algorithm=", 10) == 0) else if (tqstrnicmp(aChallenge.data() + a, "algorithm=", 10) == 0)
algorithm = str; algorithm = str;
else if (qstrnicmp(aChallenge.data() + a, "charset=", 8) == 0) else if (tqstrnicmp(aChallenge.data() + a, "charset=", 8) == 0)
charset = str; charset = str;
a = (d < aChallenge.size() && aChallenge[d] == '"') ? d + 2 : d + 1; a = (d < aChallenge.size() && aChallenge[d] == '"') ? d + 2 : d + 1;
} }
if (qop.isEmpty()) qop = "auth"; if (qop.isEmpty()) qop = "auth";
qop = "auth"; qop = "auth";
bool utf8 = qstricmp(charset, "utf-8") == 0; bool utf8 = tqstricmp(charset, "utf-8") == 0;
TQCString digestUri = TQCString(mProtocol.latin1()) + "/" + realm; TQCString digestUri = TQCString(mProtocol.latin1()) + "/" + realm;
/* Calculate the response */ /* Calculate the response */
@ -248,11 +248,11 @@ TQByteArray KDESasl::getBinaryResponse(const TQByteArray &aChallenge, bool aBase
KCodecs::base64Encode(getBinaryResponse(ba, false), ba); KCodecs::base64Encode(getBinaryResponse(ba, false), ba);
return ba; return ba;
} }
if (qstricmp(mMethod, "PLAIN") == 0) return getPlainResponse(); if (tqstricmp(mMethod, "PLAIN") == 0) return getPlainResponse();
if (qstricmp(mMethod, "LOGIN") == 0) return getLoginResponse(); if (tqstricmp(mMethod, "LOGIN") == 0) return getLoginResponse();
if (qstricmp(mMethod, "CRAM-MD5") == 0) if (tqstricmp(mMethod, "CRAM-MD5") == 0)
return getCramMd5Response(aChallenge); return getCramMd5Response(aChallenge);
if (qstricmp(mMethod, "DIGEST-MD5") == 0) if (tqstricmp(mMethod, "DIGEST-MD5") == 0)
return getDigestMd5Response(aChallenge); return getDigestMd5Response(aChallenge);
// return getDigestMd5Response(TQCString("realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8")); // return getDigestMd5Response(TQCString("realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8"));
return TQByteArray(); return TQByteArray();

@ -8,12 +8,12 @@ DummyMeta::DummyMeta( TQObject *parent, const char *name,
const TQStringList &preferredItems ) const TQStringList &preferredItems )
: KFilePlugin( parent, name, preferredItems ) : KFilePlugin( parent, name, preferredItems )
{ {
qDebug("---- DummyMeta::DummyMeta: got %i preferred items.", preferredItems.count()); tqDebug("---- DummyMeta::DummyMeta: got %i preferred items.", preferredItems.count());
} }
bool DummyMeta::readInfo( KFileMetaInfo::Internal & info ) bool DummyMeta::readInfo( KFileMetaInfo::Internal & info )
{ {
qDebug("#### DummyMeta:: readInfo: %s", info.path().latin1() ); tqDebug("#### DummyMeta:: readInfo: %s", info.path().latin1() );
return 0L; return 0L;
} }

@ -151,7 +151,7 @@ static void setTimeStamp( const TQString& path )
utbuf.actime = tp.tv_sec - 30; // 30 seconds ago utbuf.actime = tp.tv_sec - 30; // 30 seconds ago
utbuf.modtime = tp.tv_sec - 60; // 60 second ago utbuf.modtime = tp.tv_sec - 60; // 60 second ago
utime( TQFile::encodeName( path ), &utbuf ); utime( TQFile::encodeName( path ), &utbuf );
qDebug( "Time changed for %s", path.latin1() ); tqDebug( "Time changed for %s", path.latin1() );
#endif #endif
} }

@ -64,17 +64,17 @@ void TestService::newApp(const TQCString &appId)
result = KService::DCOP_Multi; result = KService::DCOP_Multi;
stop(); stop();
} }
qWarning("Register %s", appId.data()); tqWarning("Register %s", appId.data());
} }
void TestService::endApp(const TQCString &appId) void TestService::endApp(const TQCString &appId)
{ {
qWarning("Unegister %s", appId.data()); tqWarning("Unegister %s", appId.data());
} }
void TestService::appExit() void TestService::appExit()
{ {
qWarning("Exit"); tqWarning("Exit");
} }
void TestService::stop() void TestService::stop()
@ -97,7 +97,7 @@ int main(int argc, char *argv[])
KService::List list = KService::allServices(); KService::List list = KService::allServices();
qWarning("I found %d services.", list.count()); tqWarning("I found %d services.", list.count());
int i = 0; int i = 0;
for(KService::List::ConstIterator it = list.begin(); it != list.end(); ++it) for(KService::List::ConstIterator it = list.begin(); it != list.end(); ++it)
{ {
@ -121,12 +121,12 @@ int main(int argc, char *argv[])
else if (n == KService::DCOP_Multi) else if (n == KService::DCOP_Multi)
result = "Multi"; result = "Multi";
qWarning("%s %s", (*it)->desktopEntryPath().latin1(), tqWarning("%s %s", (*it)->desktopEntryPath().latin1(),
result.latin1()); result.latin1());
} }
} }
} }
qWarning("%d left after filtering.", i); tqWarning("%d left after filtering.", i);
} }
#include "kdcopcheck.moc" #include "kdcopcheck.moc"

@ -17,10 +17,10 @@ int main (int argc, char **argv)
for (int i = 1; i < argc; i++) { for (int i = 1; i < argc; i++) {
TQString file = TQFile::decodeName(argv[i]); TQString file = TQFile::decodeName(argv[i]);
qWarning("File: %s", file.local8Bit().data()); tqWarning("File: %s", file.local8Bit().data());
KMimeType::Ptr p; KMimeType::Ptr p;
p = KMimeType::findByPath(file); p = KMimeType::findByPath(file);
qWarning("Mime type (findByPath): %s", p->name().latin1()); tqWarning("Mime type (findByPath): %s", p->name().latin1());
KFileMetaInfo meta(file, TQString::null, KFileMetaInfo::TechnicalInfo | KFileMetaInfo::ContentInfo); KFileMetaInfo meta(file, TQString::null, KFileMetaInfo::TechnicalInfo | KFileMetaInfo::ContentInfo);
} }

@ -29,9 +29,9 @@ static void checkIcon( const KURL& url, const TQString& expectedIcon )
{ {
TQString icon = KMimeType::iconForURL( url ); TQString icon = KMimeType::iconForURL( url );
if ( icon == expectedIcon ) if ( icon == expectedIcon )
qDebug( "icon for %s is %s, OK", url.prettyURL().latin1(), icon.latin1() ); tqDebug( "icon for %s is %s, OK", url.prettyURL().latin1(), icon.latin1() );
else { else {
qDebug( "ERROR: icon for %s is %s, expected %s!", url.prettyURL().latin1(), icon.latin1(), expectedIcon.latin1() ); tqDebug( "ERROR: icon for %s is %s, expected %s!", url.prettyURL().latin1(), icon.latin1(), expectedIcon.latin1() );
exit(1); exit(1);
} }
} }
@ -65,11 +65,11 @@ int main( int argc, char** argv )
TQString pdf; TQString pdf;
KMimeType::diagnoseFileName("foo.pdf", pdf); KMimeType::diagnoseFileName("foo.pdf", pdf);
qDebug("extension: '%s'", pdf.latin1()); tqDebug("extension: '%s'", pdf.latin1());
assert(pdf == TQString("*.pdf")); assert(pdf == TQString("*.pdf"));
TQString ps; TQString ps;
KMimeType::diagnoseFileName("foo.ps", ps); KMimeType::diagnoseFileName("foo.ps", ps);
qDebug("extension: '%s'", ps.latin1()); tqDebug("extension: '%s'", ps.latin1());
assert(ps == TQString("*.ps")); assert(ps == TQString("*.ps"));
return 0; return 0;

@ -6,7 +6,7 @@ int main( int argc, char **argv )
KApplication app( argc, argv, "kscantest" ); KApplication app( argc, argv, "kscantest" );
KScanDialog *dlg = KScanDialog::getScanDialog(); KScanDialog *dlg = KScanDialog::getScanDialog();
if ( !dlg ) { if ( !dlg ) {
qDebug("*** EEK, no Scan-service available, aborting!"); tqDebug("*** EEK, no Scan-service available, aborting!");
return 0; return 0;
} }

@ -71,19 +71,19 @@ int main(int argc, char *argv[])
TQCString instname = "kword"; TQCString instname = "kword";
TQString desktopPath = TQString::fromLatin1( "Office/%1.desktop" ).arg( instname ); TQString desktopPath = TQString::fromLatin1( "Office/%1.desktop" ).arg( instname );
qDebug( "Looking for %s", desktopPath.latin1() ); tqDebug( "Looking for %s", desktopPath.latin1() );
KService::Ptr service = KService::serviceByDesktopPath( desktopPath ); KService::Ptr service = KService::serviceByDesktopPath( desktopPath );
if ( service ) if ( service )
qDebug( "found: %s", service->desktopEntryPath().latin1() ); tqDebug( "found: %s", service->desktopEntryPath().latin1() );
else else
qDebug( "not found" ); tqDebug( "not found" );
qDebug( "Looking for desktop name = %s", instname.data() ); tqDebug( "Looking for desktop name = %s", instname.data() );
service = KService::serviceByDesktopName( instname ); service = KService::serviceByDesktopName( instname );
if ( service ) if ( service )
qDebug( "found: %s", service->desktopEntryPath().latin1() ); tqDebug( "found: %s", service->desktopEntryPath().latin1() );
else else
qDebug( "not found" ); tqDebug( "not found" );
debug("Trying to look for text/plain"); debug("Trying to look for text/plain");
KMimeType::Ptr s1 = KMimeType::mimeType("text/plain"); KMimeType::Ptr s1 = KMimeType::mimeType("text/plain");

@ -183,7 +183,7 @@ int main( int argc, char **argv )
test.testLocalURL(); test.testLocalURL();
test.teardown(); test.teardown();
} }
qDebug( "All tests OK." ); tqDebug( "All tests OK." );
return 0; return 0;
} }

@ -258,7 +258,7 @@ void KCookieServer::checkCookies( KHttpCookieList *cookieList)
break; break;
default: default:
qWarning(__FILE__":%d Problem!", __LINE__); tqWarning(__FILE__":%d Problem!", __LINE__);
cookie = mPendingCookies->next(); cookie = mPendingCookies->next();
break; break;
} }

@ -47,7 +47,7 @@ static KCmdLineOptions options[] =
static void FAIL(const TQString &msg) static void FAIL(const TQString &msg)
{ {
qWarning("%s", msg.local8Bit().data()); tqWarning("%s", msg.local8Bit().data());
exit(1); exit(1);
} }
@ -197,7 +197,7 @@ static void processLine(TQCString line)
if (line[0] == '#') if (line[0] == '#')
{ {
if (line[1] == '#') if (line[1] == '#')
qWarning("%s", line.data()); tqWarning("%s", line.data());
return; return;
} }
@ -237,7 +237,7 @@ static void runRegression(const TQString &filename)
} }
processLine(buf); processLine(buf);
} }
qWarning("%s OK", filename.local8Bit().data()); tqWarning("%s OK", filename.local8Bit().data());
} }
int main(int argc, char *argv[]) int main(int argc, char *argv[])

@ -865,7 +865,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset )
if ( firstFocusableChildWidget == 0 ) if ( firstFocusableChildWidget == 0 )
firstFocusableChildWidget = widg; // first widget firstFocusableChildWidget = widg; // first widget
lastFocusableChildWidget = widg; // last widget lastFocusableChildWidget = widg; // last widget
//qDebug("*** %s (%s)",widg->name(),widg->className()); //tqDebug("*** %s (%s)",widg->name(),widg->className());
} }
} }
} }

@ -628,7 +628,7 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
{ {
if ( e->type() == TQEvent::IconChange ) if ( e->type() == TQEvent::IconChange )
{ {
// qDebug("KMDiChildView:: TQEvent:IconChange intercepted\n"); // tqDebug("KMDiChildView:: TQEvent:IconChange intercepted\n");
if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) ) if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) )
iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() ); iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() );
else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_trackChanges) ) else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_trackChanges) )

@ -1694,7 +1694,7 @@ void KMdiMainFrm::setupTabbedDocumentViewSpace()
setMaximumHeight( m_oldMainFrmMaxHeight ); setMaximumHeight( m_oldMainFrmMaxHeight );
resize( width(), m_oldMainFrmHeight ); resize( width(), m_oldMainFrmHeight );
m_oldMainFrmHeight = 0; m_oldMainFrmHeight = 0;
//qDebug("TopLevelMode off"); //tqDebug("TopLevelMode off");
emit leftTopLevelMode(); emit leftTopLevelMode();
TQApplication::sendPostedEvents(); TQApplication::sendPostedEvents();
@ -2498,7 +2498,7 @@ void KMdiMainFrm::switchOffMaximizeModeForMenu( KMdiChildFrm* oldChild )
/** reconnects the system buttons form maximize mode (SDI mode) with the new child frame */ /** reconnects the system buttons form maximize mode (SDI mode) with the new child frame */
void KMdiMainFrm::updateSysButtonConnections( KMdiChildFrm* oldChild, KMdiChildFrm* newChild ) void KMdiMainFrm::updateSysButtonConnections( KMdiChildFrm* oldChild, KMdiChildFrm* newChild )
{ {
//qDebug("updateSysButtonConnections"); //tqDebug("updateSysButtonConnections");
// if there is no menubar given, those system buttons aren't possible // if there is no menubar given, those system buttons aren't possible
if ( !m_pMainMenuBar ) if ( !m_pMainMenuBar )
return ; return ;
@ -2815,7 +2815,7 @@ void KMdiMainFrm::setFrameDecorOfAttachedViews( int frameDecor )
m_frameDecoration = KMdi::KDELaptopLook; m_frameDecoration = KMdi::KDELaptopLook;
break; break;
default: default:
qDebug( "unknown MDI decoration" ); tqDebug( "unknown MDI decoration" );
break; break;
} }
setMenuForSDIModeSysButtons( m_pMainMenuBar ); setMenuForSDIModeSysButtons( m_pMainMenuBar );

@ -869,7 +869,7 @@ GtkObject *GtkObject::find(TQRegExp &r) const {
// this would be nice if tqmoc could parse this file :/ // this would be nice if tqmoc could parse this file :/
// //
// if (o->className() != "GtkObject") { // if (o->className() != "GtkObject") {
// qDebug("object is not a GtkObject (className = '%s')", // tqDebug("object is not a GtkObject (className = '%s')",
// o->className()); // o->className());
// continue; // continue;
// } // }
@ -1101,19 +1101,19 @@ KLegacyStylePrivate::KLegacyStylePrivate()
if (next == "class" || next == "widget" || next == "widget_class") { if (next == "class" || next == "widget" || next == "widget_class") {
if (! parseClass()) if (! parseClass())
qWarning("\"class\" parse error"); tqWarning("\"class\" parse error");
} else if (next == "pixmap_path") { } else if (next == "pixmap_path") {
if (! parsePixmapPath()) if (! parsePixmapPath())
qWarning("\"pixmap_path\" parse error"); tqWarning("\"pixmap_path\" parse error");
} else if (next == "style") { } else if (next == "style") {
if (! parseStyle()) if (! parseStyle())
qWarning("\"style\" parse error"); tqWarning("\"style\" parse error");
} }
} }
gtkrc.close(); gtkrc.close();
} else } else
qWarning("%s: failed to open", gtkrcFilename.latin1()); tqWarning("%s: failed to open", gtkrcFilename.latin1());
} }
@ -1152,14 +1152,14 @@ bool KLegacyStylePrivate::parseClass() {
GtkObject *obj = gtktree->find(r); GtkObject *obj = gtktree->find(r);
if (! obj) { if (! obj) {
qWarning("unknown object '%s'", classname.latin1()); tqWarning("unknown object '%s'", classname.latin1());
return false; return false;
} }
KLegacyStyleData *styledata = styleDict.find(stylename); KLegacyStyleData *styledata = styleDict.find(stylename);
if (! styledata) { if (! styledata) {
qWarning("no such style '%s' for class '%s' (%p)", stylename.latin1(), tqWarning("no such style '%s' for class '%s' (%p)", stylename.latin1(),
classname.latin1(), styledata); classname.latin1(), styledata);
return false; return false;
} }
@ -1173,7 +1173,7 @@ bool KLegacyStylePrivate::parseClass() {
bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) { bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
if (filestream.atEnd()) { if (filestream.atEnd()) {
qWarning("parseImage: premature end of stream"); tqWarning("parseImage: premature end of stream");
return false; return false;
} }
@ -1187,7 +1187,7 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
} }
if (next.isNull() || next != "{") { if (next.isNull() || next != "{") {
qWarning("parseImage: expected '{' after 'image'\n" tqWarning("parseImage: expected '{' after 'image'\n"
" in style '%s', after processing %d previous images\n", " in style '%s', after processing %d previous images\n",
styledata->name.latin1(), styledata->imageList.count()); styledata->name.latin1(), styledata->imageList.count());
return false; return false;
@ -1257,7 +1257,7 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
if (equals.isNull() || parameter.isNull() || equals != "=" || if (equals.isNull() || parameter.isNull() || equals != "=" ||
parameter[0] != '\"' || parameter[parameter.length() - 1] != '\"') { parameter[0] != '\"' || parameter[parameter.length() - 1] != '\"') {
qWarning("image: file parameter malformed"); tqWarning("image: file parameter malformed");
continue; continue;
} }
@ -1356,7 +1356,7 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
if (equals.isNull() || parameter.isNull() || equals != "=" || if (equals.isNull() || parameter.isNull() || equals != "=" ||
parameter[0] != '\"' || parameter[parameter.length() - 1] != '\"') { parameter[0] != '\"' || parameter[parameter.length() - 1] != '\"') {
qWarning("image: overlay_file parameter malformed"); tqWarning("image: overlay_file parameter malformed");
continue; continue;
} }
@ -1459,7 +1459,7 @@ bool KLegacyStylePrivate::parseEngine(KLegacyStyleData *styledata) {
if (next == "image") { if (next == "image") {
if (! parseImage(styledata)) { if (! parseImage(styledata)) {
qWarning("image parse error"); tqWarning("image parse error");
} }
} else if (next == "{") { } else if (next == "{") {
paren_count++; paren_count++;
@ -1553,7 +1553,7 @@ bool KLegacyStylePrivate::parseStyle() {
return true; return true;
} else if (paren != "{") { } else if (paren != "{") {
qWarning("parseStyle: expected '{' while parsing style %s", tqWarning("parseStyle: expected '{' while parsing style %s",
stylename.latin1()); stylename.latin1());
return false; return false;
} }
@ -1719,7 +1719,7 @@ bool KLegacyStylePrivate::parseStyle() {
if (next.isNull() || parameter.isNull() || next != "=" || if (next.isNull() || parameter.isNull() || next != "=" ||
parameter[0] != '\"' || parameter[parameter.length() - 1] != '\"') { parameter[0] != '\"' || parameter[parameter.length() - 1] != '\"') {
qWarning("font parameter malformed '%s'", parameter.latin1()); tqWarning("font parameter malformed '%s'", parameter.latin1());
continue; continue;
} }
@ -1969,7 +1969,7 @@ void KLegacyStyle::polish(TQWidget *widget) {
} }
if (widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) { if (widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) {
qDebug("polishing popup '%s'", widget->className()); tqDebug("polishing popup '%s'", widget->className());
metaobject = TQPopupMenu::staticMetaObject(); metaobject = TQPopupMenu::staticMetaObject();
widget->setBackgroundMode(TQWidget::PaletteBackground); widget->setBackgroundMode(TQWidget::PaletteBackground);
} }

@ -336,7 +336,7 @@ void KThemeBase::generateBorderPix( int i )
pbPixmaps[ i ] ->setBorder( KThemePixmap::Right, tmp ); pbPixmaps[ i ] ->setBorder( KThemePixmap::Right, tmp );
} }
else else
qWarning( "KThemeBase: Tried making border from empty pixmap\n" ); tqWarning( "KThemeBase: Tried making border from empty pixmap\n" );
} }
@ -660,7 +660,7 @@ TQImage* KThemeBase::loadImage( const TQString &name )
image->load( path ); image->load( path );
if ( !image->isNull() ) if ( !image->isNull() )
return ( image ); return ( image );
qWarning( "KThemeBase: Unable to load image %s\n", name.latin1() ); tqWarning( "KThemeBase: Unable to load image %s\n", name.latin1() );
delete image; delete image;
return ( NULL ); return ( NULL );
} }
@ -672,7 +672,7 @@ KThemePixmap* KThemeBase::loadPixmap( const TQString &name )
pixmap->load( path ); pixmap->load( path );
if ( !pixmap->isNull() ) if ( !pixmap->isNull() )
return pixmap; return pixmap;
qWarning( "KThemeBase: Unable to load pixmap %s\n", name.latin1() ); tqWarning( "KThemeBase: Unable to load pixmap %s\n", name.latin1() );
delete pixmap; delete pixmap;
return ( NULL ); return ( NULL );
} }
@ -693,7 +693,7 @@ KThemePixmap* KThemeBase::scale( int w, int h, WidgetType widget ) const
cache->insert( pixmaps[ widget ], KThemeCache::FullScale, cache->insert( pixmaps[ widget ], KThemeCache::FullScale,
widget ); widget );
else else
qWarning( "We would have inserted a null pixmap!\n" ); tqWarning( "We would have inserted a null pixmap!\n" );
pixmaps[ widget ] = cachePix; pixmaps[ widget ] = cachePix;
} }
else else
@ -718,7 +718,7 @@ KThemePixmap* KThemeBase::scale( int w, int h, WidgetType widget ) const
if ( pixmaps[ widget ] ) if ( pixmaps[ widget ] )
cache->insert( pixmaps[ widget ], KThemeCache::HorizontalScale, widget ); cache->insert( pixmaps[ widget ], KThemeCache::HorizontalScale, widget );
else else
qWarning( "We would have inserted a null pixmap!\n" ); tqWarning( "We would have inserted a null pixmap!\n" );
pixmaps[ widget ] = cachePix; pixmaps[ widget ] = cachePix;
} }
else else
@ -744,7 +744,7 @@ KThemePixmap* KThemeBase::scale( int w, int h, WidgetType widget ) const
if ( pixmaps[ widget ] ) if ( pixmaps[ widget ] )
cache->insert( pixmaps[ widget ], KThemeCache::VerticalScale, widget ); cache->insert( pixmaps[ widget ], KThemeCache::VerticalScale, widget );
else else
qWarning( "We would have inserted a null pixmap!\n" ); tqWarning( "We would have inserted a null pixmap!\n" );
pixmaps[ widget ] = cachePix; pixmaps[ widget ] = cachePix;
} }
else else
@ -902,7 +902,7 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
pixmap->setMask( mask ); pixmap->setMask( mask );
cache->insert( pixmap, KThemeCache::FullScale, widget, true ); cache->insert( pixmap, KThemeCache::FullScale, widget, true );
if ( !pixmap->mask() ) if ( !pixmap->mask() )
qWarning( "No mask for border pixmap!\n" ); tqWarning( "No mask for border pixmap!\n" );
} }
return ( pixmap ); return ( pixmap );
} }
@ -1127,7 +1127,7 @@ void KThemeBase::applyMiscResourceGroup( TQSettings *config )
else else
{ {
if ( tmpStr != "Opposite" && !tmpStr.isEmpty() ) if ( tmpStr != "Opposite" && !tmpStr.isEmpty() )
qWarning( "KThemeBase: Unrecognized sb button option %s, using Opposite.\n", tmpStr.latin1() ); tqWarning( "KThemeBase: Unrecognized sb button option %s, using Opposite.\n", tmpStr.latin1() );
; ;
prop[ "SButtonPosition" ] = TQString::number( ( int ) SBOpposite ); prop[ "SButtonPosition" ] = TQString::number( ( int ) SBOpposite );
} }
@ -1139,7 +1139,7 @@ void KThemeBase::applyMiscResourceGroup( TQSettings *config )
else else
{ {
if ( tmpStr != "Normal" && !tmpStr.isEmpty() ) if ( tmpStr != "Normal" && !tmpStr.isEmpty() )
qWarning( "KThemeBase: Unrecognized arrow option %s, using Normal.\n", tmpStr.latin1() ); tqWarning( "KThemeBase: Unrecognized arrow option %s, using Normal.\n", tmpStr.latin1() );
prop[ "ArrowType" ] = TQString::number( ( int ) LargeArrow ); prop[ "ArrowType" ] = TQString::number( ( int ) LargeArrow );
} }
tmpStr = config->readEntry( base + "ShadeStyle" ); tmpStr = config->readEntry( base + "ShadeStyle" );
@ -1226,7 +1226,7 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
else else
{ {
if ( tmpStr != "Tile" && !tmpStr.isEmpty() ) if ( tmpStr != "Tile" && !tmpStr.isEmpty() )
qWarning( "KThemeBase: Unrecognized scale option %s, using Tile.\n", tmpStr.latin1() ); tqWarning( "KThemeBase: Unrecognized scale option %s, using Tile.\n", tmpStr.latin1() );
tmpVal = ( int ) TileScale; tmpVal = ( int ) TileScale;
} }
prop[ "ScaleHint" ] = TQString::number( tmpVal ); prop[ "ScaleHint" ] = TQString::number( tmpVal );
@ -1250,7 +1250,7 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
else else
{ {
if ( tmpStr != "None" && !tmpStr.isEmpty() ) if ( tmpStr != "None" && !tmpStr.isEmpty() )
qWarning( "KThemeBase: Unrecognized gradient option %s, using None.\n", tmpStr.latin1() ); tqWarning( "KThemeBase: Unrecognized gradient option %s, using None.\n", tmpStr.latin1() );
tmpVal = ( int ) GrNone; tmpVal = ( int ) GrNone;
} }
prop[ "Gradient" ] = TQString::number( tmpVal ); prop[ "Gradient" ] = TQString::number( tmpVal );
@ -1387,7 +1387,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
copyWidgetConfig( sIndex, i, pixnames, brdnames ); copyWidgetConfig( sIndex, i, pixnames, brdnames );
} }
else else
qWarning( "KThemeBase: Unable to identify source widget for %s\n", widgetEntries[ i ] ); tqWarning( "KThemeBase: Unable to identify source widget for %s\n", widgetEntries[ i ] );
return ; return ;
} }
// special inheritance for disabled arrows (these are tri-state unlike // special inheritance for disabled arrows (these are tri-state unlike
@ -1503,9 +1503,9 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
pbWidth[ i ] = readNumEntry( prop, "PixmapBWidth", 0 ); pbWidth[ i ] = readNumEntry( prop, "PixmapBWidth", 0 );
if ( pbWidth[ i ] == 0 ) if ( pbWidth[ i ] == 0 )
{ {
qWarning( "KThemeBase: No border width specified for pixmapped border widget %s\n", tqWarning( "KThemeBase: No border width specified for pixmapped border widget %s\n",
widgetEntries[ i ] ); widgetEntries[ i ] );
qWarning( "KThemeBase: Using default of 2.\n" ); tqWarning( "KThemeBase: Using default of 2.\n" );
pbWidth[ i ] = 2; pbWidth[ i ] = 2;
} }
// duplicate check // duplicate check

@ -82,7 +82,7 @@ inline void KThemePixmap::setBorder( BorderType type, const TQPixmap &p )
{ {
if ( b[ type ] ) if ( b[ type ] )
{ {
qWarning( "KThemePixmap: Overwriting existing border!" ); tqWarning( "KThemePixmap: Overwriting existing border!" );
delete( b[ type ] ); delete( b[ type ] );
} }
b[ type ] = new TQPixmap( p ); b[ type ] = new TQPixmap( p );

@ -137,7 +137,7 @@ public:
keys = cfg.readListEntry( "/kthemestyle/themes", &ok); keys = cfg.readListEntry( "/kthemestyle/themes", &ok);
if ( !ok ) if ( !ok )
qWarning( "KThemeStyle cache seems corrupt!\n" ); //Too bad one can't i18n this :-( tqWarning( "KThemeStyle cache seems corrupt!\n" ); //Too bad one can't i18n this :-(
return keys; return keys;
} }

@ -51,7 +51,7 @@ public:
if ( ! basestyle ) if ( ! basestyle )
basestyle = TQStyleFactory::create( TQStyleFactory::keys().first() ); basestyle = TQStyleFactory::create( TQStyleFactory::keys().first() );
if ( ! basestyle ) if ( ! basestyle )
qFatal( "LightStyle: couldn't find a basestyle!" ); tqFatal( "LightStyle: couldn't find a basestyle!" );
} }
~LightStyleV2Private() ~LightStyleV2Private()

@ -51,7 +51,7 @@ LightStyleV3::LightStyleV3()
if ( ! basestyle ) if ( ! basestyle )
basestyle = TQStyleFactory::create( TQStyleFactory::keys().first() ); basestyle = TQStyleFactory::create( TQStyleFactory::keys().first() );
if ( ! basestyle ) if ( ! basestyle )
qFatal( "LightStyle: couldn't find a basestyle!" ); tqFatal( "LightStyle: couldn't find a basestyle!" );
} }
LightStyleV3::~LightStyleV3() LightStyleV3::~LightStyleV3()

@ -339,12 +339,12 @@ private:
(c1Rgb == other.c1Rgb) && (c1Rgb == other.c1Rgb) &&
(horizontal == other.horizontal); (horizontal == other.horizontal);
// if(!match) { // if(!match) {
// qDebug("operator ==: CacheEntries don't match!"); // tqDebug("operator ==: CacheEntries don't match!");
// qDebug("width: %d\t\tother width: %d", width, other.width); // tqDebug("width: %d\t\tother width: %d", width, other.width);
// qDebug("height: %d\t\tother height: %d", height, other.height); // tqDebug("height: %d\t\tother height: %d", height, other.height);
// qDebug("fgRgb: %d\t\tother fgRgb: %d", fgRgb, other.fgRgb); // tqDebug("fgRgb: %d\t\tother fgRgb: %d", fgRgb, other.fgRgb);
// qDebug("bgRgb: %d\t\tother bgRgb: %d", bgRgb, other.bgRgb); // tqDebug("bgRgb: %d\t\tother bgRgb: %d", bgRgb, other.bgRgb);
// qDebug("surfaceFlags: %d\t\tother surfaceFlags: %d", surfaceFlags, other.surfaceFlags); // tqDebug("surfaceFlags: %d\t\tother surfaceFlags: %d", surfaceFlags, other.surfaceFlags);
// } // }
return match; return match;
} }

@ -45,7 +45,7 @@ Server can publish an icon (test.png) like this:
QImage i("test.png"); QImage i("test.png");
QPixmap p; QPixmap p;
p.convertFromImage(i); p.convertFromImage(i);
qWarning("Handle = %08x", p.handle()); tqWarning("Handle = %08x", p.handle());
Now, if Handle is e.g. 0x06c0000b, the following code (in another process) Now, if Handle is e.g. 0x06c0000b, the following code (in another process)
can copy this pixmap: can copy this pixmap:

@ -168,7 +168,7 @@ KAboutData::setLicenseText( const char *licenseText )
void void
KAboutData::setLicenseTextFile( const TQString &file ) KAboutData::setLicenseTextFile( const TQString &file )
{ {
mLicenseText = qstrdup(TQFile::encodeName(file)); mLicenseText = tqstrdup(TQFile::encodeName(file));
mLicenseKey = License_File; mLicenseKey = License_File;
} }
@ -275,7 +275,7 @@ KAboutData::translateInternalProgramName() const
delete[] d->mTranslatedProgramName; delete[] d->mTranslatedProgramName;
d->mTranslatedProgramName = 0; d->mTranslatedProgramName = 0;
if( KGlobal::locale() ) if( KGlobal::locale() )
d->mTranslatedProgramName = qstrdup( programName().utf8()); d->mTranslatedProgramName = tqstrdup( programName().utf8());
} }
TQImage TQImage

@ -76,7 +76,7 @@ KZoneAllocator::~KZoneAllocator()
#ifndef NDEBUG // as this is called quite late in the app, we don't care #ifndef NDEBUG // as this is called quite late in the app, we don't care
// to use kdDebug // to use kdDebug
if (count > 1) if (count > 1)
qDebug("zone still contained %d blocks", count); tqDebug("zone still contained %d blocks", count);
#endif #endif
} }
@ -190,12 +190,12 @@ KZoneAllocator::allocate(size_t _size)
if ((unsigned long) _size + blockOffset > blockSize) if ((unsigned long) _size + blockOffset > blockSize)
{ {
if (_size > blockSize) { if (_size > blockSize) {
qDebug("KZoneAllocator: allocating more than %lu bytes", blockSize); tqDebug("KZoneAllocator: allocating more than %lu bytes", blockSize);
return 0; return 0;
} }
addBlock(new MemBlock(blockSize)); addBlock(new MemBlock(blockSize));
blockOffset = 0; blockOffset = 0;
//qDebug ("Allocating block #%d (%x)\n", num_blocks, currentBlock->begin); //tqDebug ("Allocating block #%d (%x)\n", num_blocks, currentBlock->begin);
} }
void *result = (void *)(currentBlock->begin+blockOffset); void *result = (void *)(currentBlock->begin+blockOffset);
currentBlock->ref++; currentBlock->ref++;
@ -214,7 +214,7 @@ KZoneAllocator::deallocate(void *ptr)
if (!list) { if (!list) {
/* Can happen with certain usage pattern of intermixed free_since() /* Can happen with certain usage pattern of intermixed free_since()
and deallocate(). */ and deallocate(). */
//qDebug("Uhoh"); //tqDebug("Uhoh");
return; return;
} }
TQValueList<MemBlock*>::ConstIterator it = list->begin(); TQValueList<MemBlock*>::ConstIterator it = list->begin();
@ -233,7 +233,7 @@ KZoneAllocator::deallocate(void *ptr)
} }
/* Can happen with certain usage pattern of intermixed free_since() /* Can happen with certain usage pattern of intermixed free_since()
and deallocate(). */ and deallocate(). */
//qDebug("Uhoh2"); //tqDebug("Uhoh2");
} }
void void

@ -137,7 +137,7 @@ void KClipboardSynchronizer::slotSelectionChanged()
{ {
TQClipboard *clip = TQApplication::clipboard(); TQClipboard *clip = TQApplication::clipboard();
// qDebug("*** sel changed: %i", s_blocked); // tqDebug("*** sel changed: %i", s_blocked);
if ( s_blocked || !clip->ownsSelection() ) if ( s_blocked || !clip->ownsSelection() )
return; return;
@ -149,7 +149,7 @@ void KClipboardSynchronizer::slotClipboardChanged()
{ {
TQClipboard *clip = TQApplication::clipboard(); TQClipboard *clip = TQApplication::clipboard();
// qDebug("*** clip changed : %i (implicit: %i, ownz: clip: %i, selection: %i)", s_blocked, s_implicitSelection, clip->ownsClipboard(), clip->ownsSelection()); // tqDebug("*** clip changed : %i (implicit: %i, ownz: clip: %i, selection: %i)", s_blocked, s_implicitSelection, clip->ownsClipboard(), clip->ownsSelection());
if ( s_blocked || !clip->ownsClipboard() ) if ( s_blocked || !clip->ownsClipboard() )
return; return;
@ -159,7 +159,7 @@ void KClipboardSynchronizer::slotClipboardChanged()
void KClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode mode ) void KClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode mode )
{ {
// qDebug("---> setting clipboard: %p", data); // tqDebug("---> setting clipboard: %p", data);
TQClipboard *clip = TQApplication::clipboard(); TQClipboard *clip = TQApplication::clipboard();

@ -593,7 +593,7 @@ KCmdLineArgs::parseAllArgs()
else if ( (::qstrcmp(option, "version") == 0) || else if ( (::qstrcmp(option, "version") == 0) ||
(::qstrcmp(option, "v") == 0)) (::qstrcmp(option, "v") == 0))
{ {
printQ( TQString("Qt: %1\n").arg(qVersion())); printQ( TQString("Qt: %1\n").arg(tqVersion()));
printQ( TQString("TDE: %1\n").arg(TDE_VERSION_STRING)); printQ( TQString("TDE: %1\n").arg(TDE_VERSION_STRING));
printQ( TQString("%1: %2\n"). printQ( TQString("%1: %2\n").
arg(about->programName()).arg(about->version())); arg(about->programName()).arg(about->version()));
@ -728,11 +728,11 @@ KCmdLineArgs::qt_argv()
} }
qt_argv = new char*[ args->count() + 2 ]; qt_argv = new char*[ args->count() + 2 ];
qt_argv[ 0 ] = qstrdup( appName()); qt_argv[ 0 ] = tqstrdup( appName());
int i = 0; int i = 0;
for(; i < args->count(); i++) for(; i < args->count(); i++)
{ {
qt_argv[i+1] = qstrdup((char *) args->arg(i)); qt_argv[i+1] = tqstrdup((char *) args->arg(i));
} }
qt_argv[i+1] = 0; qt_argv[i+1] = 0;

@ -136,7 +136,7 @@ void KCompletion::addItem( const TQString& item, uint weight )
node = node->insert( 0x0, true ); node = node->insert( 0x0, true );
if ( weighted ) if ( weighted )
node->confirm( weight -1 ); node->confirm( weight -1 );
// qDebug("*** added: %s (%i)", item.latin1(), node->weight()); // tqDebug("*** added: %s (%i)", item.latin1(), node->weight());
} }
void KCompletion::addWeightedItem( const TQString& item ) void KCompletion::addWeightedItem( const TQString& item )

@ -456,7 +456,7 @@ void KConfigINIBackEnd::parseSingleConfigFile(TQFile &rFile,
//using kdDebug() here leads to an infinite loop //using kdDebug() here leads to an infinite loop
//remove this for the release, aleXXX //remove this for the release, aleXXX
//qWarning("Parsing %s, global = %s default = %s", //tqWarning("Parsing %s, global = %s default = %s",
// rFile.name().latin1(), bGlobal ? "true" : "false", bDefault ? "true" : "false"); // rFile.name().latin1(), bGlobal ? "true" : "false", bDefault ? "true" : "false");
TQCString aCurrentGroup("<default>"); TQCString aCurrentGroup("<default>");
@ -486,7 +486,7 @@ void KConfigINIBackEnd::parseSingleConfigFile(TQFile &rFile,
if (sigsetjmp (mmap_jmpbuf, 1)) if (sigsetjmp (mmap_jmpbuf, 1))
{ {
qWarning("SIGBUS while reading %s", rFile.name().latin1()); tqWarning("SIGBUS while reading %s", rFile.name().latin1());
munmap(( char* )map, rFile.size()); munmap(( char* )map, rFile.size());
sigaction (SIGBUS, &mmap_old_sigact, 0); sigaction (SIGBUS, &mmap_old_sigact, 0);
return; return;
@ -696,7 +696,7 @@ qWarning("SIGBUS while reading %s", rFile.name().latin1());
// insert the key/value line // insert the key/value line
TQCString key(startLine, endOfKey - startLine + 2); TQCString key(startLine, endOfKey - startLine + 2);
TQCString val = printableToString(st, s - st); TQCString val = printableToString(st, s - st);
//qDebug("found key '%s' with value '%s'", key.data(), val.data()); //tqDebug("found key '%s' with value '%s'", key.data(), val.data());
if (TQString(key.data()) == "X-Ubuntu-Gettext-Domain") { if (TQString(key.data()) == "X-Ubuntu-Gettext-Domain") {
gettextDomain = val.data(); gettextDomain = val.data();

@ -97,7 +97,7 @@ class TDECORE_EXPORT KCrash
* Dr. Konqi, our nice crash display application. * Dr. Konqi, our nice crash display application.
* @param path the application path. * @param path the application path.
*/ */
static void setApplicationPath (TQString path) { appPath = qstrdup(path.local8Bit().data()); } static void setApplicationPath (TQString path) { appPath = tqstrdup(path.local8Bit().data()); }
/* KDE 4: Make it const TQString & */ /* KDE 4: Make it const TQString & */
/** /**
@ -105,7 +105,7 @@ class TDECORE_EXPORT KCrash
* Dr. Konqi, our nice crash display application. * Dr. Konqi, our nice crash display application.
* @param name the name of the application, as shown in Dr. Konqi * @param name the name of the application, as shown in Dr. Konqi
*/ */
static void setApplicationName (TQString name) { appName = qstrdup(name.local8Bit().data()); } static void setApplicationName (TQString name) { appName = tqstrdup(name.local8Bit().data()); }
/* KDE 4: Make it const TQString & */ /* KDE 4: Make it const TQString & */
protected: protected:

@ -99,7 +99,7 @@ static TQCString getDescrFromNum(unsigned int _num)
TQFile file(filename); TQFile file(filename);
if (!file.open(IO_ReadOnly)) { if (!file.open(IO_ReadOnly)) {
qWarning("Couldn't open %s", filename.local8Bit().data()); tqWarning("Couldn't open %s", filename.local8Bit().data());
file.close(); file.close();
return TQCString(); return TQCString();
} }
@ -121,7 +121,7 @@ static TQCString getDescrFromNum(unsigned int _num)
continue; // We have an eof, a comment or an empty line continue; // We have an eof, a comment or an empty line
if (ch < '0' && ch > '9') { if (ch < '0' && ch > '9') {
qWarning("Syntax error: no number (line %u)",lineNumber); tqWarning("Syntax error: no number (line %u)",lineNumber);
continue; continue;
} }

@ -42,7 +42,7 @@
#ifndef NDEBUG #ifndef NDEBUG
#define MYASSERT(x) if (!x) \ #define MYASSERT(x) if (!x) \
qFatal("Fatal error: you need to have a KInstance object before\n" \ tqFatal("Fatal error: you need to have a KInstance object before\n" \
"you do anything that requires it! Examples of this are config\n" \ "you do anything that requires it! Examples of this are config\n" \
"objects, standard directories or translations."); "objects, standard directories or translations.");
#else #else

@ -211,9 +211,9 @@ inline const T& kClamp( const T& x, const T& low, const T& high )
} }
/** /**
* Locale-independent qstricmp. Use this for comparing ascii keywords * Locale-independent tqstricmp. Use this for comparing ascii keywords
* in a case-insensitive way. * in a case-insensitive way.
* qstricmp fails with e.g. the Turkish locale where 'I'.lower() != 'i' * tqstricmp fails with e.g. the Turkish locale where 'I'.lower() != 'i'
* @since 3.4 * @since 3.4
*/ */
int TDECORE_EXPORT kasciistricmp( const char *str1, const char *str2 ); int TDECORE_EXPORT kasciistricmp( const char *str1, const char *str2 );

@ -1173,7 +1173,7 @@ TQIconSet KIconLoader::loadIconSet( const TQString& name, KIcon::Group g, int s,
if (g < -1 || g > 6) { if (g < -1 || g > 6) {
kdDebug() << "KIconLoader::loadIconSet " << name << " " << (int)g << " " << s << endl; kdDebug() << "KIconLoader::loadIconSet " << name << " " << (int)g << " " << s << endl;
qDebug("%s", kdBacktrace().latin1()); tqDebug("%s", kdBacktrace().latin1());
abort(); abort();
} }

@ -40,7 +40,7 @@
static TQPtrDict<TQCString> *allOldInstances = 0; static TQPtrDict<TQCString> *allOldInstances = 0;
#define DEBUG_ADD do { if (!allInstances) { allInstances = new TQPtrList<KInstance>(); allOldInstances = new TQPtrDict<TQCString>(); } allInstances->append(this); allOldInstances->insert( this, new TQCString( _name)); } while (false); #define DEBUG_ADD do { if (!allInstances) { allInstances = new TQPtrList<KInstance>(); allOldInstances = new TQPtrDict<TQCString>(); } allInstances->append(this); allOldInstances->insert( this, new TQCString( _name)); } while (false);
#define DEBUG_REMOVE do { allInstances->removeRef(this); } while (false); #define DEBUG_REMOVE do { allInstances->removeRef(this); } while (false);
#define DEBUG_CHECK_ALIVE do { if (!allInstances->contains((KInstance*)this)) { TQCString *old = allOldInstances->find((KInstance*)this); qWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false); #define DEBUG_CHECK_ALIVE do { if (!allInstances->contains((KInstance*)this)) { TQCString *old = allOldInstances->find((KInstance*)this); tqWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false);
#else #else
#define DEBUG_ADD #define DEBUG_ADD
#define DEBUG_REMOVE #define DEBUG_REMOVE

@ -442,7 +442,7 @@ bool Sym::init( const TQString& s )
// Look up in special names list // Look up in special names list
for( int i = 0; g_rgSymNames[i].sym != 0; i++ ) { for( int i = 0; g_rgSymNames[i].sym != 0; i++ ) {
if( qstricmp( s.latin1(), g_rgSymNames[i].psName ) == 0 ) { if( tqstricmp( s.latin1(), g_rgSymNames[i].psName ) == 0 ) {
m_sym = g_rgSymNames[i].sym; m_sym = g_rgSymNames[i].sym;
return true; return true;
} }
@ -451,7 +451,7 @@ bool Sym::init( const TQString& s )
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
// search for name in KKeys array // search for name in KKeys array
for ( KKeys const *pKey = kde_KKEYS; pKey->code != 0xffff; pKey++) { for ( KKeys const *pKey = kde_KKEYS; pKey->code != 0xffff; pKey++) {
if( qstricmp( s.latin1(), pKey->name ) == 0 ) { if( tqstricmp( s.latin1(), pKey->name ) == 0 ) {
m_sym = pKey->code; m_sym = pKey->code;
return true; return true;
} }

@ -206,7 +206,7 @@ static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struc
if ((KDE_lstat(lckFile, &st_buf2) == 0) && statResultIsEqual(st_buf1, st_buf2)) if ((KDE_lstat(lckFile, &st_buf2) == 0) && statResultIsEqual(st_buf1, st_buf2))
{ {
// - - if yes, delete lock file, delete temp file, retry lock // - - if yes, delete lock file, delete temp file, retry lock
qWarning("WARNING: deleting stale lockfile %s", lckFile.data()); tqWarning("WARNING: deleting stale lockfile %s", lckFile.data());
::unlink(lckFile); ::unlink(lckFile);
::unlink(tmpFile); ::unlink(tmpFile);
return KLockFile::LockOK; return KLockFile::LockOK;
@ -224,14 +224,14 @@ static KLockFile::LockResult deleteStaleLock(const TQString &lockFile, KDE_struc
statResultIsEqual(st_buf, st_buf2)) statResultIsEqual(st_buf, st_buf2))
{ {
// Without support for link counts we will have a little race condition // Without support for link counts we will have a little race condition
qWarning("WARNING: deleting stale lockfile %s", lckFile.data()); tqWarning("WARNING: deleting stale lockfile %s", lckFile.data());
::unlink(lckFile); ::unlink(lckFile);
::unlink(tmpFile); ::unlink(tmpFile);
return KLockFile::LockOK; return KLockFile::LockOK;
} }
// Failed to delete stale lock file // Failed to delete stale lock file
qWarning("WARNING: Problem deleting stale lockfile %s", lckFile.data()); tqWarning("WARNING: Problem deleting stale lockfile %s", lckFile.data());
::unlink(tmpFile); ::unlink(tmpFile);
return KLockFile::LockFail; return KLockFile::LockFail;
} }

@ -285,10 +285,10 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str )
} }
int KMacroExpanderBase::expandPlainMacro( const TQString &, uint, TQStringList & ) int KMacroExpanderBase::expandPlainMacro( const TQString &, uint, TQStringList & )
{ qFatal( "KMacroExpanderBase::expandPlainMacro called!" ); return 0; } { tqFatal( "KMacroExpanderBase::expandPlainMacro called!" ); return 0; }
int KMacroExpanderBase::expandEscapedMacro( const TQString &, uint, TQStringList & ) int KMacroExpanderBase::expandEscapedMacro( const TQString &, uint, TQStringList & )
{ qFatal( "KMacroExpanderBase::expandEscapedMacro called!" ); return 0; } { tqFatal( "KMacroExpanderBase::expandEscapedMacro called!" ); return 0; }
////////////////////////////////////////////////// //////////////////////////////////////////////////

@ -1083,7 +1083,7 @@ TQString KStandardDirs::kde_default(const char *type) {
return "share/emoticons"; return "share/emoticons";
qFatal("unknown resource type %s", type); tqFatal("unknown resource type %s", type);
return TQString::null; return TQString::null;
} }
@ -1118,7 +1118,7 @@ TQString KStandardDirs::saveLocation(const char *type,
else { else {
dirs = absolutes.find(type); dirs = absolutes.find(type);
if (!dirs) if (!dirs)
qFatal("KStandardDirs: The resource type %s is not registered", type); tqFatal("KStandardDirs: The resource type %s is not registered", type);
pPath = new TQString(realPath(dirs->last())); pPath = new TQString(realPath(dirs->last()));
} }

@ -213,7 +213,7 @@ static void delete_ksycoca_self() {
KSycoca * KSycoca::self() KSycoca * KSycoca::self()
{ {
if (!_self) { if (!_self) {
qAddPostRoutine(delete_ksycoca_self); tqAddPostRoutine(delete_ksycoca_self);
_self = new KSycoca(); _self = new KSycoca();
} }
return _self; return _self;
@ -443,7 +443,7 @@ KSycoca * KSycoca::_self = 0L;
void KSycoca::flagError() void KSycoca::flagError()
{ {
qWarning("ERROR: KSycoca database corruption!"); tqWarning("ERROR: KSycoca database corruption!");
if (_self) if (_self)
{ {
if (_self->d->readError) if (_self->d->readError)
@ -451,7 +451,7 @@ void KSycoca::flagError()
_self->d->readError = true; _self->d->readError = true;
if (_self->d->autoRebuild) if (_self->d->autoRebuild)
if(system("kbuildsycoca") < 0) // Rebuild the damned thing. if(system("kbuildsycoca") < 0) // Rebuild the damned thing.
qWarning("ERROR: Running KSycoca failed."); tqWarning("ERROR: Running KSycoca failed.");
} }
} }

@ -348,7 +348,7 @@ KSycocaDict::save(TQDataStream &str)
if (maxDiv <= lastDiv) if (maxDiv <= lastDiv)
break; break;
// qWarning("Max Div = %d at pos %d", maxDiv, maxPos); // tqWarning("Max Div = %d at pos %d", maxDiv, maxPos);
lastDiv = maxDiv; lastDiv = maxDiv;
addDiversity(d, maxPos); addDiversity(d, maxPos);
mHashList.append(maxPos); mHashList.append(maxPos);

@ -80,7 +80,7 @@ KTempDir::create(const TQString &directoryPrefix, int mode)
{ {
// Recreate it for the warning, mkdtemps emptied it // Recreate it for the warning, mkdtemps emptied it
TQCString nme = TQFile::encodeName(directoryPrefix) + "XXXXXX"; TQCString nme = TQFile::encodeName(directoryPrefix) + "XXXXXX";
qWarning("KTempDir: Error trying to create %s: %s", nme.data(), strerror(errno)); tqWarning("KTempDir: Error trying to create %s: %s", nme.data(), strerror(errno));
mError = errno; mError = errno;
mTmpName = TQString::null; mTmpName = TQString::null;
return false; return false;

@ -105,7 +105,7 @@ int KXErrorHandler::handle( Display* dpy, XErrorEvent* e )
// e->serial >= first_request , compare like X timestamps to handle wrapping // e->serial >= first_request , compare like X timestamps to handle wrapping
&& NET::timestampCompare( e->serial, first_request ) >= 0 ) && NET::timestampCompare( e->serial, first_request ) >= 0 )
{ // it's for us { // it's for us
//qDebug( "Handling: %p", static_cast< void* >( this )); //tqDebug( "Handling: %p", static_cast< void* >( this ));
if( user_handler1 != NULL && user_handler1( e->request_code, e->error_code, e->resourceid )) if( user_handler1 != NULL && user_handler1( e->request_code, e->error_code, e->resourceid ))
was_error = true; was_error = true;
if( user_handler2 != NULL && user_handler2( dpy, e ) != 0 ) if( user_handler2 != NULL && user_handler2( dpy, e ) != 0 )
@ -114,7 +114,7 @@ int KXErrorHandler::handle( Display* dpy, XErrorEvent* e )
was_error = true; was_error = true;
return 0; return 0;
} }
//qDebug( "Going deeper: %p", static_cast< void* >( this )); //tqDebug( "Going deeper: %p", static_cast< void* >( this ));
return old_handler( dpy, e ); return old_handler( dpy, e );
} }

@ -5,14 +5,14 @@ Q*::*
qt_* qt_*
# these should preferably go in some namespace in Qt4 # these should preferably go in some namespace in Qt4
qDebug tqDebug
qFatal tqFatal
qWarning tqWarning
tqApp tqApp
tqAppName tqAppName
qVersion tqVersion
qSysInfo tqSysInfo
qObsolete tqObsolete
bitBlt bitBlt
static_QUType_* static_QUType_*
TID_QUType_* TID_QUType_*

@ -182,12 +182,12 @@ bool KHttpProxySocketDevice::parseServerReply()
TQ_LONG written = tqwriteBlock(d->request, d->request.length()); TQ_LONG written = tqwriteBlock(d->request, d->request.length());
if (written < 0) if (written < 0)
{ {
qDebug("KHttpProxySocketDevice: would block writing request!"); tqDebug("KHttpProxySocketDevice: would block writing request!");
if (error() == WouldBlock) if (error() == WouldBlock)
setError(IO_ConnectError, InProgress); setError(IO_ConnectError, InProgress);
return error() == WouldBlock; // error return error() == WouldBlock; // error
} }
qDebug("KHttpProxySocketDevice: request written"); tqDebug("KHttpProxySocketDevice: request written");
d->request.remove(0, written); d->request.remove(0, written);
@ -206,7 +206,7 @@ bool KHttpProxySocketDevice::parseServerReply()
if (!blocking()) if (!blocking())
{ {
TQ_LONG avail = bytesAvailable(); TQ_LONG avail = bytesAvailable();
qDebug("KHttpProxySocketDevice: %ld bytes available", avail); tqDebug("KHttpProxySocketDevice: %ld bytes available", avail);
setState(0); setState(0);
if (avail == 0) if (avail == 0)
{ {
@ -264,7 +264,7 @@ bool KHttpProxySocketDevice::parseServerReply()
} }
// now really parse the reply // now really parse the reply
qDebug("KHttpProxySocketDevice: get reply: %s\n", tqDebug("KHttpProxySocketDevice: get reply: %s\n",
d->reply.left(d->reply.find('\r')).data()); d->reply.left(d->reply.find('\r')).data());
if (d->reply.left(7) != "HTTP/1." || if (d->reply.left(7) != "HTTP/1." ||
(index = d->reply.find(' ')) == -1 || (index = d->reply.find(' ')) == -1 ||

@ -207,7 +207,7 @@ public:
// other threads are already using the API, so wait till // other threads are already using the API, so wait till
// it's all clear // it's all clear
// the thread that emits this condition will also call res_init // the thread that emits this condition will also call res_init
//qDebug("ResInitUsage: waiting for libresolv to be clear"); //tqDebug("ResInitUsage: waiting for libresolv to be clear");
cond.wait(&mutex); cond.wait(&mutex);
} }
else else
@ -264,12 +264,12 @@ void KResolverThread::run()
// initialisation // initialisation
// enter the loop already // enter the loop already
//qDebug("KResolverThread(thread %u/%p): started", pid, (void*)TQThread::currentThread()); //tqDebug("KResolverThread(thread %u/%p): started", pid, (void*)TQThread::currentThread());
KResolverManager::manager()->registerThread(this); KResolverManager::manager()->registerThread(this);
while (true) while (true)
{ {
data = KResolverManager::manager()->requestData(this, ::maxThreadWaitTime); data = KResolverManager::manager()->requestData(this, ::maxThreadWaitTime);
//qDebug("KResolverThread(thread %u/%p) got data %p", KResolverManager::pid, //tqDebug("KResolverThread(thread %u/%p) got data %p", KResolverManager::pid,
// (void*)TQThread::currentThread(), (void*)data); // (void*)TQThread::currentThread(), (void*)data);
if (data) if (data)
{ {
@ -292,7 +292,7 @@ void KResolverThread::run()
} }
KResolverManager::manager()->unregisterThread(this); KResolverManager::manager()->unregisterThread(this);
//qDebug("KResolverThread(thread %u/%p): exiting", pid, (void*)TQThread::currentThread()); //tqDebug("KResolverThread(thread %u/%p): exiting", pid, (void*)TQThread::currentThread());
} }
bool KResolverThread::checkResolver() bool KResolverThread::checkResolver()
@ -415,7 +415,7 @@ void KResolverManager::releaseData(KResolverThread *, RequestData* data)
// This function is called in a worker thread!! // This function is called in a worker thread!!
///// /////
//qDebug("KResolverManager::releaseData(%u/%p): %p has been released", pid, //tqDebug("KResolverManager::releaseData(%u/%p): %p has been released", pid,
// (void*)TQThread::currentThread(), (void*)data); // (void*)TQThread::currentThread(), (void*)data);
if (data->obj) if (data->obj)
@ -460,7 +460,7 @@ void KResolverManager::handleFinished()
curr = currentRequests.prev(); curr = currentRequests.prev();
} }
//qDebug("KResolverManager::handleFinished(%u): %d requests to notify", pid, doneRequests.count()); //tqDebug("KResolverManager::handleFinished(%u): %d requests to notify", pid, doneRequests.count());
while (RequestData *d = doneRequests.dequeue()) while (RequestData *d = doneRequests.dequeue())
doNotifying(d); doNotifying(d);
@ -468,7 +468,7 @@ void KResolverManager::handleFinished()
if (redo) if (redo)
{ {
//qDebug("KResolverManager::handleFinished(%u): restarting processing to catch requestor", //tqDebug("KResolverManager::handleFinished(%u): restarting processing to catch requestor",
// pid); // pid);
handleFinished(); handleFinished();
} }
@ -490,7 +490,7 @@ bool KResolverManager::handleFinishedItem(RequestData* curr)
if (curr->requestor) if (curr->requestor)
--curr->requestor->nRequests; --curr->requestor->nRequests;
//qDebug("KResolverManager::handleFinishedItem(%u): removing %p since it's done", //tqDebug("KResolverManager::handleFinishedItem(%u): removing %p since it's done",
// pid, (void*)curr); // pid, (void*)curr);
return true; return true;
} }
@ -600,7 +600,7 @@ void KResolverManager::doNotifying(RequestData *p)
// reset address // reset address
r.setAddress(p->input->node, p->input->service); r.setAddress(p->input->node, p->input->service);
//qDebug("KResolverManager::doNotifying(%u/%p): for %p whose status is %d and has %d results", //tqDebug("KResolverManager::doNotifying(%u/%p): for %p whose status is %d and has %d results",
//pid, (void*)TQThread::currentThread(), (void*)p, p->obj->status, r.count()); //pid, (void*)TQThread::currentThread(), (void*)p, p->obj->status, r.count());
p->obj->errorcode = r.error(); p->obj->errorcode = r.error();

@ -240,7 +240,7 @@ namespace
int my_h_errno; int my_h_errno;
char *buf = 0L; char *buf = 0L;
// qDebug("ResolveThread::run(): started threaded gethostbyname for %s (af = %d)", // tqDebug("ResolveThread::run(): started threaded gethostbyname for %s (af = %d)",
// m_hostname.data(), m_af); // m_hostname.data(), m_af);
ResolverLocker resLock( this ); ResolverLocker resLock( this );
@ -287,7 +287,7 @@ namespace
if (resultptr != 0L) if (resultptr != 0L)
my_h_errno = 0; my_h_errno = 0;
// qDebug("GetHostByNameThread::run(): gethostbyname for %s (af = %d) returned: %d", // tqDebug("GetHostByNameThread::run(): gethostbyname for %s (af = %d) returned: %d",
// m_hostname.data(), m_af, my_h_errno); // m_hostname.data(), m_af, my_h_errno);
if (res == ERANGE) if (res == ERANGE)
@ -317,7 +317,7 @@ namespace
{ {
if (herrno) if (herrno)
{ {
qDebug("KStandardWorker::processResults: got error %d", herrno); tqDebug("KStandardWorker::processResults: got error %d", herrno);
switch (herrno) switch (herrno)
{ {
case HOST_NOT_FOUND: case HOST_NOT_FOUND:
@ -368,9 +368,9 @@ namespace
{ {
sa.setHost(KIpAddress(he->h_addr_list[i], he->h_addrtype == AF_INET ? 4 : 6)); sa.setHost(KIpAddress(he->h_addr_list[i], he->h_addrtype == AF_INET ? 4 : 6));
results.prepend(KResolverEntry(sa, socktype, proto, canon, m_hostname)); results.prepend(KResolverEntry(sa, socktype, proto, canon, m_hostname));
// qDebug("KStandardWorker::processResults: adding %s", sa.toString().latin1()); // tqDebug("KStandardWorker::processResults: adding %s", sa.toString().latin1());
} }
// qDebug("KStandardWorker::processResults: added %d entries", i); // tqDebug("KStandardWorker::processResults: added %d entries", i);
} }
#else // HAVE_GETADDRINFO #else // HAVE_GETADDRINFO
@ -559,12 +559,12 @@ bool KStandardWorker::sanityCheck()
if (m_encodedName.isNull()) if (m_encodedName.isNull())
{ {
qDebug("could not encode hostname '%s' (UTF-8)", node.utf8().data()); tqDebug("could not encode hostname '%s' (UTF-8)", node.utf8().data());
setError(KResolver::NoName); setError(KResolver::NoName);
return false; // invalid hostname! return false; // invalid hostname!
} }
// qDebug("Using encoded hostname '%s' for '%s' (UTF-8)", m_encodedName.data(), // tqDebug("Using encoded hostname '%s' for '%s' (UTF-8)", m_encodedName.data(),
// node.utf8().data()); // node.utf8().data());
} }
} }
@ -679,7 +679,7 @@ KResolver::ErrorCodes KStandardWorker::addUnix()
// put it in /tmp // put it in /tmp
pathname.prepend("/tmp/"); pathname.prepend("/tmp/");
// qDebug("QNoResolveWorker::addUnix(): adding Unix socket for %s", pathname.local8Bit().data()); // tqDebug("QNoResolveWorker::addUnix(): adding Unix socket for %s", pathname.local8Bit().data());
KUnixSocketAddress sa(pathname); KUnixSocketAddress sa(pathname);
int socktype = socketType(); int socktype = socketType();
if (socktype == 0) if (socktype == 0)

@ -10,8 +10,8 @@ KIDLTest::KIDLTest( const TQCString& id )
TQString KIDLTest::hello( const TQString& name ) TQString KIDLTest::hello( const TQString& name )
{ {
qDebug("Du heter %s", name.latin1() ); tqDebug("Du heter %s", name.latin1() );
qDebug("Ha det %s", name.latin1() ); tqDebug("Ha det %s", name.latin1() );
return TQString("Jeg heter KIDLTest"); return TQString("Jeg heter KIDLTest");
} }
@ -23,11 +23,11 @@ int main( int argc, char** argv )
app.dcopClient()->attach(); app.dcopClient()->attach();
app.dcopClient()->registerAs( "kidlservertest" ); app.dcopClient()->registerAs( "kidlservertest" );
qDebug("Server process started..."); tqDebug("Server process started...");
(void) new KIDLTest( "Hello" ); (void) new KIDLTest( "Hello" );
qDebug("Server listening ..."); tqDebug("Server listening ...");
return app.exec(); return app.exec();
} }

@ -13,5 +13,5 @@ int main( int argc, char** argv )
KIDLTest_stub* t = new KIDLTest_stub( "kidlservertest", "Hello" ); KIDLTest_stub* t = new KIDLTest_stub( "kidlservertest", "Hello" );
TQString ret = t->hello("Torben"); TQString ret = t->hello("Torben");
qDebug("Server says: %s", ret.latin1() ); tqDebug("Server says: %s", ret.latin1() );
} }

@ -32,13 +32,13 @@ int main(int , char *[])
A *pA = &obj; A *pA = &obj;
B *pB = &obj; B *pB = &obj;
C *pC = &obj; C *pC = &obj;
qWarning("pA = %p, pB = %p, pC = %p", pA, pB, pC); tqWarning("pA = %p, pB = %p, pC = %p", pA, pB, pC);
if (pA == pC) qWarning("pA == pC"); if (pA == pC) tqWarning("pA == pC");
if (pB == pC) qWarning("pB == pC"); if (pB == pC) tqWarning("pB == pC");
dictA.insert("hello", pC); dictA.insert("hello", pC);
dictB.insert("hello", pC); dictB.insert("hello", pC);
if (dictA["hello"] == pC) qWarning("dictA['hello'] == pC"); if (dictA["hello"] == pC) tqWarning("dictA['hello'] == pC");
if (dictB["hello"] == pC) qWarning("dictB['hello'] == pC"); if (dictB["hello"] == pC) tqWarning("dictB['hello'] == pC");
} }

@ -35,6 +35,6 @@ main(int argc, char *argv[])
KSycoca *s = KSycoca::self(); KSycoca *s = KSycoca::self();
qWarning("s->language() %s", s->language().latin1()); tqWarning("s->language() %s", s->language().latin1());
qWarning("Offset of aIconName: %ld", (long) &(static_cast<KApplication *>(0)->aIconName)); tqWarning("Offset of aIconName: %ld", (long) &(static_cast<KApplication *>(0)->aIconName));
} }

@ -88,7 +88,7 @@ void KConfigTest::writeConfigFile()
// ### TODO: call this, and test the state of things afterwards // ### TODO: call this, and test the state of things afterwards
void KConfigTest::revertEntries() void KConfigTest::revertEntries()
{ {
qWarning("Reverting entries"); tqWarning("Reverting entries");
KConfig sc( "kconfigtest" ); KConfig sc( "kconfigtest" );
sc.setGroup("Hello"); sc.setGroup("Hello");
@ -115,7 +115,7 @@ void KConfigTest::allTests()
bool bImmutable = sc3.entryIsImmutable("stringEntry1"); bool bImmutable = sc3.entryIsImmutable("stringEntry1");
CHECK( bImmutable, false ); CHECK( bImmutable, false );
//qWarning("sc3.entryIsImmutable() 1: %s", bImmutable ? "true" : "false"); //tqWarning("sc3.entryIsImmutable() 1: %s", bImmutable ? "true" : "false");
sc2.setGroup("AAA"); sc2.setGroup("AAA");
CHECK( sc2.hasKey( "stringEntry1" ), true ); CHECK( sc2.hasKey( "stringEntry1" ), true );

@ -139,7 +139,7 @@ int main( int argc, char ** argv )
num = KGlobal::locale()->readNumber( "12,0000000", &ok ); check("readNumber(12,0000000)",ok?"yes":"no","no"); num = KGlobal::locale()->readNumber( "12,0000000", &ok ); check("readNumber(12,0000000)",ok?"yes":"no","no");
num = KGlobal::locale()->readNumber( "12,146,131.12", &ok ); check("readNumber(12,146,131.12)",ok?"yes":"no","yes"); num = KGlobal::locale()->readNumber( "12,146,131.12", &ok ); check("readNumber(12,146,131.12)",ok?"yes":"no","yes");
num = KGlobal::locale()->readNumber( "1.12345678912", &ok ); num = KGlobal::locale()->readNumber( "1.12345678912", &ok );
qDebug( "%s", TQString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals tqDebug( "%s", TQString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals
check("readNumber(1.12345678912)",ok && num==1.12345678912?"yes":"no","yes"); check("readNumber(1.12345678912)",ok && num==1.12345678912?"yes":"no","yes");
// bug 95511 // bug 95511
KLocale locale(*KGlobal::locale()); KLocale locale(*KGlobal::locale());

@ -77,7 +77,7 @@ main(int argc, char *argv[])
list = KExtendedSocket::lookup("www.kde.org", "http", KExtendedSocket::inetSocket); list = KExtendedSocket::lookup("www.kde.org", "http", KExtendedSocket::inetSocket);
for(KAddressInfo *info = list.first(); info; info = list.next()) for(KAddressInfo *info = list.first(); info; info = list.next())
{ {
qWarning("Lookup: %s %s %s", info->address()->pretty().latin1(), tqWarning("Lookup: %s %s %s", info->address()->pretty().latin1(),
info->address()->isEqual(KInetSocketAddress("213.203.58.36", 80)) ? info->address()->isEqual(KInetSocketAddress("213.203.58.36", 80)) ?
"is equal to" : "is NOT equal to", "is equal to" : "is NOT equal to",
"213.203.58.36 port 80"); "213.203.58.36 port 80");
@ -91,7 +91,7 @@ main(int argc, char *argv[])
TQPtrList<KAddressInfo> cns = KExtendedSocket::lookup("www.kde.org", 0, KExtendedSocket::canonName, &err); TQPtrList<KAddressInfo> cns = KExtendedSocket::lookup("www.kde.org", 0, KExtendedSocket::canonName, &err);
for (KAddressInfo *x = cns.first(); x; x = cns.next()) { for (KAddressInfo *x = cns.first(); x; x = cns.next()) {
const char *canon = x->canonname(); const char *canon = x->canonname();
qWarning( "Lookup: %s", canon ? canon : "<Null>"); tqWarning( "Lookup: %s", canon ? canon : "<Null>");
} }
check("KExtendedSocket::lookup() canonical", cns.first()->canonname(), "www.kde.org"); check("KExtendedSocket::lookup() canonical", cns.first()->canonname(), "www.kde.org");

@ -14,19 +14,19 @@ int main( int argc, char **argv )
TQValueListIterator<KSortableItem<TQString> > it = list.begin(); TQValueListIterator<KSortableItem<TQString> > it = list.begin();
qDebug("Insertion order:"); tqDebug("Insertion order:");
qDebug("================"); tqDebug("================");
for ( ; it != list.end(); ++it ) for ( ; it != list.end(); ++it )
qDebug( "%i: %s", (*it).index(), (*it).value().latin1() ); tqDebug( "%i: %s", (*it).index(), (*it).value().latin1() );
list.sort(); list.sort();
qDebug("\nSorted:"); tqDebug("\nSorted:");
qDebug("======="); tqDebug("=======");
it = list.begin(); it = list.begin();
for ( ; it != list.end(); ++it ) for ( ; it != list.end(); ++it )
qDebug( "%i: %s", (*it).index(), (*it).value().latin1() ); tqDebug( "%i: %s", (*it).index(), (*it).value().latin1() );
return 0; return 0;
} }

@ -36,7 +36,7 @@ public:
int int
TestApp::newInstance( ) TestApp::newInstance( )
{ {
qWarning("NewInstance"); tqWarning("NewInstance");
return 0; return 0;
} }

@ -58,7 +58,7 @@ int main(int argc, char *argv[])
{ {
for (int i = 0; i < argc; i++) for (int i = 0; i < argc; i++)
{ {
qDebug("argv[%d] = %s", i, argv[i]); tqDebug("argv[%d] = %s", i, argv[i]);
} }
KAboutData aboutData( "testqtargs", I18N_NOOP("testqtargs"), KAboutData aboutData( "testqtargs", I18N_NOOP("testqtargs"),
"1.0", I18N_NOOP("testqtargs"), KAboutData::License_GPL, "1.0", I18N_NOOP("testqtargs"), KAboutData::License_GPL,
@ -70,7 +70,7 @@ int main(int argc, char *argv[])
KCmdLineArgs *qtargs = KCmdLineArgs::parsedArgs("qt"); KCmdLineArgs *qtargs = KCmdLineArgs::parsedArgs("qt");
for (int i = 0; i < qtargs->count(); i++) for (int i = 0; i < qtargs->count(); i++)
{ {
qDebug("qt arg[%d] = %s", i, qtargs->arg(i)); tqDebug("qt arg[%d] = %s", i, qtargs->arg(i));
} }
KApplication app; KApplication app;
@ -81,17 +81,17 @@ int main(int argc, char *argv[])
// An arg set by Qt // An arg set by Qt
if(qtargs->isSet("background")) if(qtargs->isSet("background"))
{ {
qDebug("arg bg = %s", (const char*)qtargs->getOption("background")); tqDebug("arg bg = %s", (const char*)qtargs->getOption("background"));
} }
// An arg set by KDE // An arg set by KDE
if(kdeargs->isSet("caption")) if(kdeargs->isSet("caption"))
{ {
qDebug("arg caption = %s", (const char*)kdeargs->getOption("caption")); tqDebug("arg caption = %s", (const char*)kdeargs->getOption("caption"));
} }
// An arg set by us. // An arg set by us.
if(args->isSet("hello")) if(args->isSet("hello"))
{ {
qDebug("arg hello = %s", (const char*)args->getOption("hello")); tqDebug("arg hello = %s", (const char*)args->getOption("hello"));
} }
args->clear(); args->clear();

@ -2768,7 +2768,7 @@ TQImage KImageEffect::sample(TQImage &src, int w, int h)
int *y_offset = (int *)malloc(h*sizeof(int)); int *y_offset = (int *)malloc(h*sizeof(int));
if(!x_offset || !y_offset){ if(!x_offset || !y_offset){
#ifndef NDEBUG #ifndef NDEBUG
qWarning("KImageEffect::sample(): Unable to allocate pixel buffer"); tqWarning("KImageEffect::sample(): Unable to allocate pixel buffer");
#endif #endif
free(x_offset); free(x_offset);
free(y_offset); free(y_offset);
@ -3638,13 +3638,13 @@ TQImage KImageEffect::oilPaintConvolve(TQImage &src, double radius)
width = getOptimalKernelWidth(radius, 0.5); width = getOptimalKernelWidth(radius, 0.5);
if(src.width() < width){ if(src.width() < width){
qWarning("KImageEffect::oilPaintConvolve(): Image is smaller than radius!"); tqWarning("KImageEffect::oilPaintConvolve(): Image is smaller than radius!");
return(dest); return(dest);
} }
/* /*
histogram = (unsigned long *)malloc(256*sizeof(unsigned long)); histogram = (unsigned long *)malloc(256*sizeof(unsigned long));
if(!histogram){ if(!histogram){
qWarning("KImageEffect::oilPaintColvolve(): Unable to allocate memory!"); tqWarning("KImageEffect::oilPaintColvolve(): Unable to allocate memory!");
return(dest); return(dest);
} }
*/ */
@ -3667,7 +3667,7 @@ TQImage KImageEffect::oilPaintConvolve(TQImage &src, double radius)
k = intensityValue(jumpTable[my][mx]); k = intensityValue(jumpTable[my][mx]);
if(k > 255){ if(k > 255){
qWarning("KImageEffect::oilPaintConvolve(): k is %d", tqWarning("KImageEffect::oilPaintConvolve(): k is %d",
k); k);
k = 255; k = 255;
} }
@ -3726,7 +3726,7 @@ void KImageEffect::normalize(TQImage &image)
liberateMemory(&histogram); liberateMemory(&histogram);
if(normalize_map) if(normalize_map)
liberateMemory(&normalize_map); liberateMemory(&normalize_map);
qWarning("KImageEffect::normalize(): Unable to allocate memory!"); tqWarning("KImageEffect::normalize(): Unable to allocate memory!");
return; return;
} }
@ -3934,7 +3934,7 @@ void KImageEffect::equalize(TQImage &image)
liberateMemory(&map); liberateMemory(&map);
if(equalize_map) if(equalize_map)
liberateMemory(&equalize_map); liberateMemory(&equalize_map);
qWarning("KImageEffect::equalize(): Unable to allocate memory!"); tqWarning("KImageEffect::equalize(): Unable to allocate memory!");
return; return;
} }
@ -4028,12 +4028,12 @@ TQImage KImageEffect::edge(TQImage &image, double radius)
width = getOptimalKernelWidth(radius, 0.5); width = getOptimalKernelWidth(radius, 0.5);
if(image.width() < width || image.height() < width){ if(image.width() < width || image.height() < width){
qWarning("KImageEffect::edge(): Image is smaller than radius!"); tqWarning("KImageEffect::edge(): Image is smaller than radius!");
return(dest); return(dest);
} }
kernel= (double *)malloc(width*width*sizeof(double)); kernel= (double *)malloc(width*width*sizeof(double));
if(!kernel){ if(!kernel){
qWarning("KImageEffect::edge(): Unable to allocate memory!"); tqWarning("KImageEffect::edge(): Unable to allocate memory!");
return(dest); return(dest);
} }
for(i=0; i < (width*width); i++) for(i=0; i < (width*width); i++)
@ -4058,18 +4058,18 @@ TQImage KImageEffect::emboss(TQImage &image, double radius, double sigma)
TQImage dest; TQImage dest;
if(sigma == 0.0){ if(sigma == 0.0){
qWarning("KImageEffect::emboss(): Zero sigma is not permitted!"); tqWarning("KImageEffect::emboss(): Zero sigma is not permitted!");
return(dest); return(dest);
} }
width = getOptimalKernelWidth(radius, sigma); width = getOptimalKernelWidth(radius, sigma);
if(image.width() < width || image.height() < width){ if(image.width() < width || image.height() < width){
qWarning("KImageEffect::emboss(): Image is smaller than radius!"); tqWarning("KImageEffect::emboss(): Image is smaller than radius!");
return(dest); return(dest);
} }
kernel= (double *)malloc(width*width*sizeof(double)); kernel= (double *)malloc(width*width*sizeof(double));
if(!kernel){ if(!kernel){
qWarning("KImageEffect::emboss(): Unable to allocate memory!"); tqWarning("KImageEffect::emboss(): Unable to allocate memory!");
return(dest); return(dest);
} }
if(image.depth() < 32) if(image.depth() < 32)
@ -4279,7 +4279,7 @@ TQImage KImageEffect::blur(TQImage &src, double radius, double sigma)
unsigned int *p, *q; unsigned int *p, *q;
if(sigma == 0.0){ if(sigma == 0.0){
qWarning("KImageEffect::blur(): Zero sigma is not permitted!"); tqWarning("KImageEffect::blur(): Zero sigma is not permitted!");
return(dest); return(dest);
} }
if(src.depth() < 32) if(src.depth() < 32)
@ -4309,7 +4309,7 @@ TQImage KImageEffect::blur(TQImage &src, double radius, double sigma)
} }
if(width < 3){ if(width < 3){
qWarning("KImageEffect::blur(): Kernel radius is too small!"); tqWarning("KImageEffect::blur(): Kernel radius is too small!");
liberateMemory(&kernel); liberateMemory(&kernel);
return(dest); return(dest);
} }
@ -4360,12 +4360,12 @@ bool KImageEffect::convolveImage(TQImage *image, TQImage *dest,
width = order; width = order;
if((width % 2) == 0){ if((width % 2) == 0){
qWarning("KImageEffect: Kernel width must be an odd number!"); tqWarning("KImageEffect: Kernel width must be an odd number!");
return(false); return(false);
} }
normal_kernel = (double *)malloc(width*width*sizeof(double)); normal_kernel = (double *)malloc(width*width*sizeof(double));
if(!normal_kernel){ if(!normal_kernel){
qWarning("KImageEffect: Unable to allocate memory!"); tqWarning("KImageEffect: Unable to allocate memory!");
return(false); return(false);
} }
dest->reset(); dest->reset();
@ -4457,17 +4457,17 @@ TQImage KImageEffect::sharpen(TQImage &image, double radius, double sigma)
TQImage dest; TQImage dest;
if(sigma == 0.0){ if(sigma == 0.0){
qWarning("KImageEffect::sharpen(): Zero sigma is not permitted!"); tqWarning("KImageEffect::sharpen(): Zero sigma is not permitted!");
return(dest); return(dest);
} }
width = getOptimalKernelWidth(radius, sigma); width = getOptimalKernelWidth(radius, sigma);
if(image.width() < width){ if(image.width() < width){
qWarning("KImageEffect::sharpen(): Image is smaller than radius!"); tqWarning("KImageEffect::sharpen(): Image is smaller than radius!");
return(dest); return(dest);
} }
kernel = (double *)malloc(width*width*sizeof(double)); kernel = (double *)malloc(width*width*sizeof(double));
if(!kernel){ if(!kernel){
qWarning("KImageEffect::sharpen(): Unable to allocate memory!"); tqWarning("KImageEffect::sharpen(): Unable to allocate memory!");
return(dest); return(dest);
} }
@ -4872,7 +4872,7 @@ TQImage KImageEffect::bumpmap(TQImage &img, TQImage &map, double azimuth, double
TQImage dst; TQImage dst;
if ( img.depth() != 32 || img.depth() != 32 ) { if ( img.depth() != 32 || img.depth() != 32 ) {
qWarning( "Bump-mapping effect works only with 32 bit images"); tqWarning( "Bump-mapping effect works only with 32 bit images");
return dst; return dst;
} }

@ -39,7 +39,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst )
int y; int y;
if ( !dst->create(src->width(), src->height(), 8, 256) ) { if ( !dst->create(src->width(), src->height(), 8, 256) ) {
qWarning("KPixmap: destination image not valid\n"); tqWarning("KPixmap: destination image not valid\n");
return false; return false;
} }
@ -224,7 +224,7 @@ bool KPixmap::convertFromImage( const TQImage &img, int conversion_flags )
{ {
if ( img.isNull() ) { if ( img.isNull() ) {
#if defined(CHECK_NULL) #if defined(CHECK_NULL)
qWarning( "KPixmap::convertFromImage: Cannot convert a null image" ); tqWarning( "KPixmap::convertFromImage: Cannot convert a null image" );
#endif #endif
return false; return false;
} }

@ -73,7 +73,7 @@ TQRect KPixmapSplitter::coordinates( int pos )
m_numCols = m_pixmap.width() / ( m_itemSize.width() + m_hSpacing ); m_numCols = m_pixmap.width() / ( m_itemSize.width() + m_hSpacing );
m_numRows = m_pixmap.height() / ( m_itemSize.height() + m_vSpacing ); m_numRows = m_pixmap.height() / ( m_itemSize.height() + m_vSpacing );
m_dirty = false; m_dirty = false;
// qDebug("cols: %i, rows: %i (pixmap: %i, %i)", m_numCols, m_numRows, m_pixmap.width(), m_pixmap.height()); // tqDebug("cols: %i, rows: %i (pixmap: %i, %i)", m_numCols, m_numRows, m_pixmap.width(), m_pixmap.height());
} }
if ( m_numCols == 0 || m_numRows == 0 ) if ( m_numCols == 0 || m_numRows == 0 )

@ -178,7 +178,7 @@ bool PPDLoader::openUi( const TQString& name, const TQString& desc, const TQStri
{ {
if ( m_option ) if ( m_option )
{ {
qWarning( "PPD syntax error, UI specification not correctly closed" ); tqWarning( "PPD syntax error, UI specification not correctly closed" );
endUi( m_option->name() ); endUi( m_option->name() );
} }
@ -418,7 +418,7 @@ bool PPDLoader::putFooProcessedData( const TQVariant& var )
} }
else else
{ {
qWarning( "Option %s not found in original PPD file", o->name().latin1() ); tqWarning( "Option %s not found in original PPD file", o->name().latin1() );
delete o; delete o;
} }
} }
@ -507,7 +507,7 @@ void PPDLoader::processPageSizes( DrMain *driver )
TQDictIterator<PS_private> it( m_ps ); TQDictIterator<PS_private> it( m_ps );
for ( ; it.current(); ++it ) for ( ; it.current(); ++it )
{ {
//qDebug( "ADDING PAGESIZE: %16s, Size = ( %.2f, %.2f ), Area = ( %.2f, %.2f, %.2f, %.2f )", it.current()->name.latin1(), //tqDebug( "ADDING PAGESIZE: %16s, Size = ( %.2f, %.2f ), Area = ( %.2f, %.2f, %.2f, %.2f )", it.current()->name.latin1(),
// it.current()->size.width, it.current()->size.height, // it.current()->size.width, it.current()->size.height,
// it.current()->area.left, it.current()->area.bottom, // it.current()->area.left, it.current()->area.bottom,
// it.current()->area.right, it.current()->area.top ); // it.current()->area.right, it.current()->area.top );

@ -560,8 +560,8 @@ TQIODevice *tdeprint_ppdscanner_device = NULL;
int tdeprint_ppdscanner_lno = 0; int tdeprint_ppdscanner_lno = 0;
#if 0 #if 0
#define QDEBUG0(s) qDebug(s) #define QDEBUG0(s) tqDebug(s)
#define QDEBUG1(s,a) qDebug(s,a) #define QDEBUG1(s,a) tqDebug(s,a)
#else #else
#define QDEBUG0(s) #define QDEBUG0(s)
#define QDEBUG1(s,a) #define QDEBUG1(s,a)

@ -40,8 +40,8 @@ QIODevice *tdeprint_ppdscanner_device = NULL;
int tdeprint_ppdscanner_lno = 0; int tdeprint_ppdscanner_lno = 0;
#if 0 #if 0
#define QDEBUG0(s) qDebug(s) #define QDEBUG0(s) tqDebug(s)
#define QDEBUG1(s,a) qDebug(s,a) #define QDEBUG1(s,a) tqDebug(s,a)
#else #else
#define QDEBUG0(s) #define QDEBUG0(s)
#define QDEBUG1(s,a) #define QDEBUG1(s,a)

@ -491,7 +491,7 @@ void KCharSelect::fillFontCombo()
{ {
if ( !fontDataBase ) { if ( !fontDataBase ) {
fontDataBase = new TQFontDatabase(); fontDataBase = new TQFontDatabase();
qAddPostRoutine( cleanupFontDatabase ); tqAddPostRoutine( cleanupFontDatabase );
} }
fontList=fontDataBase->families(); fontList=fontDataBase->families();
fontCombo->insertStringList( fontList ); fontCombo->insertStringList( fontList );

@ -186,7 +186,7 @@ void KComboBox::setTrapReturnKey( bool grab )
if ( d->klineEdit ) if ( d->klineEdit )
d->klineEdit->setTrapReturnKey( grab ); d->klineEdit->setTrapReturnKey( grab );
else else
qWarning("KComboBox::setTrapReturnKey not supported with a non-KLineEdit."); tqWarning("KComboBox::setTrapReturnKey not supported with a non-KLineEdit.");
} }
bool KComboBox::trapReturnKey() const bool KComboBox::trapReturnKey() const

@ -1587,7 +1587,7 @@ class TDEUI_EXPORT KDialogBase : public KDialog
void setButtonFocus( TQPushButton *p, bool isDefault, bool isFocus ); void setButtonFocus( TQPushButton *p, bool isDefault, bool isFocus );
/** /**
* Prints an error message using qDebug if makeMainWidget , * Prints an error message using tqDebug if makeMainWidget ,
* makeVBoxMainWidget , makeHBoxMainWidget or * makeVBoxMainWidget , makeHBoxMainWidget or
* makeGridMainWidget failed. * makeGridMainWidget failed.
*/ */

@ -129,7 +129,7 @@ KLed::paintEvent(TQPaintEvent *)
paintRect(); paintRect();
break; break;
default : default :
qWarning("%s: in class KLed: no KLed::Look set",tqApp->argv()[0]); tqWarning("%s: in class KLed: no KLed::Look set",tqApp->argv()[0]);
} }
break; break;
case Circular: case Circular:
@ -145,17 +145,17 @@ KLed::paintEvent(TQPaintEvent *)
paintSunken(); paintSunken();
break; break;
default: default:
qWarning("%s: in class KLed: no KLed::Look set",tqApp->argv()[0]); tqWarning("%s: in class KLed: no KLed::Look set",tqApp->argv()[0]);
} }
break; break;
default: default:
qWarning("%s: in class KLed: no KLed::Shape set",tqApp->argv()[0]); tqWarning("%s: in class KLed: no KLed::Shape set",tqApp->argv()[0]);
break; break;
} }
#ifdef PAINT_BENCH #ifdef PAINT_BENCH
} }
int ready = t.elapsed(); int ready = t.elapsed();
qWarning("elapsed: %d msec. for %d rounds", ready, rounds); tqWarning("elapsed: %d msec. for %d rounds", ready, rounds);
#endif #endif
} }

@ -67,7 +67,7 @@ static int * ourMaxLength( const KPasswordEdit* const e ) {
if ( !d_ptr ) { if ( !d_ptr ) {
d_ptr = new TQPtrDict<int>; d_ptr = new TQPtrDict<int>;
d_ptr->setAutoDelete(true); d_ptr->setAutoDelete(true);
qAddPostRoutine( cleanup_d_ptr ); tqAddPostRoutine( cleanup_d_ptr );
} }
int* ret = d_ptr->find( (void*) e ); int* ret = d_ptr->find( (void*) e );
if ( ! ret ) { if ( ! ret ) {

@ -244,10 +244,10 @@ TQString KPopupMenu::title(int id) const
if(item->widget()) if(item->widget())
return ((KPopupTitle *)item->widget())->title(); return ((KPopupTitle *)item->widget())->title();
else else
qWarning("KPopupMenu: title() called with non-title id %d.", id); tqWarning("KPopupMenu: title() called with non-title id %d.", id);
} }
else else
qWarning("KPopupMenu: title() called with invalid id %d.", id); tqWarning("KPopupMenu: title() called with invalid id %d.", id);
return TQString::null; return TQString::null;
} }
@ -258,10 +258,10 @@ TQPixmap KPopupMenu::titlePixmap(int id) const
if(item->widget()) if(item->widget())
return ((KPopupTitle *)item->widget())->icon(); return ((KPopupTitle *)item->widget())->icon();
else else
qWarning("KPopupMenu: titlePixmap() called with non-title id %d.", id); tqWarning("KPopupMenu: titlePixmap() called with non-title id %d.", id);
} }
else else
qWarning("KPopupMenu: titlePixmap() called with invalid id %d.", id); tqWarning("KPopupMenu: titlePixmap() called with invalid id %d.", id);
TQPixmap tmp; TQPixmap tmp;
return tmp; return tmp;
} }

@ -28,8 +28,8 @@ public slots:
void slotListBoxExec( TQListBoxItem* item ); void slotListBoxExec( TQListBoxItem* item );
void slotToggleSingleColumn( bool b ); void slotToggleSingleColumn( bool b );
void slotClicked( TQIconViewItem* ) { qDebug("CLICK");} void slotClicked( TQIconViewItem* ) { tqDebug("CLICK");}
void slotDoubleClicked( TQIconViewItem* ) { qDebug("DOUBLE CLICK");} void slotDoubleClicked( TQIconViewItem* ) { tqDebug("DOUBLE CLICK");}
protected: protected:
KIconView* m_pIconView; KIconView* m_pIconView;
KListView* m_pListView; KListView* m_pListView;

@ -28,7 +28,7 @@ int main(int argc, char** argv)
pix=logo; pix=logo;
about.setLogo(pix); about.setLogo(pix);
} else { } else {
qDebug("main: No logo loaded."); tqDebug("main: No logo loaded.");
} }
if(bg.load("background_1.png")) if(bg.load("background_1.png"))
{ {
@ -39,7 +39,7 @@ int main(int argc, char** argv)
//about.showBaseFrameTile(true); //about.showBaseFrameTile(true);
} else { } else {
qDebug("main: No tile loaded."); tqDebug("main: No tile loaded.");
} }
// about.setButtonOKText // about.setButtonOKText
// ("Cl&ose", "Close this dialog.", // ("Cl&ose", "Close this dialog.",

@ -61,7 +61,7 @@ void KColorWidget::doIntensityLoop()
Qt::CopyROP, true); Qt::CopyROP, true);
} }
stop = t.elapsed(); stop = t.elapsed();
qDebug ("Total fullscreen %s dim time for %d steps : %f s", tqDebug ("Total fullscreen %s dim time for %d steps : %f s",
oldway?"(antonio)":"(intensity)", count, (stop - start)*1e-3); oldway?"(antonio)":"(intensity)", count, (stop - start)*1e-3);
if (intvsfade) { if (intvsfade) {
@ -75,14 +75,14 @@ void KColorWidget::doIntensityLoop()
} }
} }
stop = t.elapsed(); stop = t.elapsed();
qDebug ("Total fullscreen (fade) dim time for %d steps : %f s", tqDebug ("Total fullscreen (fade) dim time for %d steps : %f s",
count, (stop - start)*1e-3); count, (stop - start)*1e-3);
} }
else { else {
image = original; image.detach(); image = original; image.detach();
qDebug("Intensity test"); tqDebug("Intensity test");
for(count=0; count < max; ++count){ for(count=0; count < max; ++count){
KImageEffect::intensity(image, 1./max); KImageEffect::intensity(image, 1./max);
pixmap.convertFromImage(image); pixmap.convertFromImage(image);
@ -98,7 +98,7 @@ void KColorWidget::doIntensityLoop()
} }
image = original; image.detach(); image = original; image.detach();
qDebug("Red channel intensity test"); tqDebug("Red channel intensity test");
for(count=0; count < max; ++count){ for(count=0; count < max; ++count){
KImageEffect::channelIntensity(image, -1./max, KImageEffect::Red); KImageEffect::channelIntensity(image, -1./max, KImageEffect::Red);
pixmap.convertFromImage(image); pixmap.convertFromImage(image);
@ -113,7 +113,7 @@ void KColorWidget::doIntensityLoop()
} }
image = original; image.detach(); image = original; image.detach();
qDebug("Green channel intensity test"); tqDebug("Green channel intensity test");
for(count=0; count < max; ++count){ for(count=0; count < max; ++count){
KImageEffect::channelIntensity(image, -1./max, KImageEffect::Green); KImageEffect::channelIntensity(image, -1./max, KImageEffect::Green);
pixmap.convertFromImage(image); pixmap.convertFromImage(image);
@ -128,7 +128,7 @@ void KColorWidget::doIntensityLoop()
} }
image = original; image.detach(); image = original; image.detach();
qDebug("Blue channel intensity test"); tqDebug("Blue channel intensity test");
for(count=0; count < max; ++count){ for(count=0; count < max; ++count){
KImageEffect::channelIntensity(image, -1./max, KImageEffect::Blue); KImageEffect::channelIntensity(image, -1./max, KImageEffect::Blue);
pixmap.convertFromImage(image); pixmap.convertFromImage(image);

@ -142,13 +142,13 @@ Form1::~Form1()
void Form1::slotAdd() void Form1::slotAdd()
{ {
qDebug("** adding: %s", LineEdit1->text().latin1() ); tqDebug("** adding: %s", LineEdit1->text().latin1() );
edit->completionObject()->addItem( LineEdit1->text() ); edit->completionObject()->addItem( LineEdit1->text() );
TQStringList matches = edit->completionObject()->allMatches("S"); TQStringList matches = edit->completionObject()->allMatches("S");
TQStringList::ConstIterator it = matches.begin(); TQStringList::ConstIterator it = matches.begin();
for ( ; it != matches.end(); ++it ) for ( ; it != matches.end(); ++it )
qDebug("-- %s", (*it).latin1()); tqDebug("-- %s", (*it).latin1());
} }
void Form1::slotRemove() void Form1::slotRemove()

@ -68,9 +68,9 @@ int main(int argc, char** argv)
/* The dialog object is used just as any other TQDialog: */ /* The dialog object is used just as any other TQDialog: */
if(dialog.exec()) if(dialog.exec())
{ {
qDebug("Accepted."); tqDebug("Accepted.");
} else { } else {
qDebug("Rejected."); tqDebug("Rejected.");
} }
return 0; return 0;
} }

@ -154,7 +154,7 @@ SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const
connect( dockManager, TQT_SIGNAL(setDockDefaultPos(KDockWidget*)), this, TQT_SLOT(setDockDefaultPos(KDockWidget*))); connect( dockManager, TQT_SIGNAL(setDockDefaultPos(KDockWidget*)), this, TQT_SLOT(setDockDefaultPos(KDockWidget*)));
setCaption("Open File"); setCaption("Open File");
resize(550,450); resize(550,450);
qDebug("read config"); tqDebug("read config");
dockManager->readConfig( 0L , name ); dockManager->readConfig( 0L , name );
} }
@ -170,7 +170,7 @@ SFileDialog::~SFileDialog()
config->setGroup( TQString("SFileDialogData:") + name() ); config->setGroup( TQString("SFileDialogData:") + name() );
config->writeEntry( "Bookmarks", fd->getBookmark() ); config->writeEntry( "Bookmarks", fd->getBookmark() );
qDebug("write config"); tqDebug("write config");
dockManager->writeConfig( 0L , name() ); dockManager->writeConfig( 0L , name() );
} }
@ -773,11 +773,11 @@ int main(int argc, char* argv[]) {
#if 0 #if 0
SFileDialog* openfile = new SFileDialog(); SFileDialog* openfile = new SFileDialog();
openfile->exec(); openfile->exec();
qDebug( openfile->fileName() ); tqDebug( openfile->fileName() );
#endif #endif
#if 0 #if 0
qDebug ( SFileDialog::getOpenFileName( TQString::null, TQString::fromLatin1("All (*)"), tqDebug ( SFileDialog::getOpenFileName( TQString::null, TQString::fromLatin1("All (*)"),
TQString::fromLatin1("DockWidget Demo"), "dialog1" ) ); TQString::fromLatin1("DockWidget Demo"), "dialog1" ) );
#endif #endif
@ -786,7 +786,7 @@ int main(int argc, char* argv[]) {
TQString::fromLatin1("DockWidget Demo"), "dialog1" ); TQString::fromLatin1("DockWidget Demo"), "dialog1" );
TQStringList::Iterator it = s.begin(); TQStringList::Iterator it = s.begin();
for ( ; it != s.end(); ++it ){ for ( ; it != s.end(); ++it ){
qDebug( "%s", (*it).local8Bit().data() ); tqDebug( "%s", (*it).local8Bit().data() );
} }
#endif #endif
return 0; return 0;

@ -101,7 +101,7 @@ DockApplication::DockApplication( const char* name )
l->setBackgroundColor(white); l->setBackgroundColor(white);
l->setMinimumSize(100,100); l->setMinimumSize(100,100);
dock5->setWidget(l); dock5->setWidget(l);
if (::tqqt_cast<KDockContainer*>(l)) qDebug("KDockContainer created for dock 5"); if (::tqqt_cast<KDockContainer*>(l)) tqDebug("KDockContainer created for dock 5");
/*****************************************************/ /*****************************************************/
/*****************************************************/ /*****************************************************/
@ -112,7 +112,7 @@ DockApplication::DockApplication( const char* name )
l->setBackgroundColor(white); l->setBackgroundColor(white);
l->setMinimumSize(100,100); l->setMinimumSize(100,100);
dock6->setWidget(l); dock6->setWidget(l);
if (::tqqt_cast<KDockContainer*>(l)) qDebug("KDockContainer created for dock 6"); if (::tqqt_cast<KDockContainer*>(l)) tqDebug("KDockContainer created for dock 6");
/*****************************************************/ /*****************************************************/
@ -143,7 +143,7 @@ DockApplication::DockApplication( const char* name )
setGeometry(200, 100, 500, 300); setGeometry(200, 100, 500, 300);
qDebug("load config"); tqDebug("load config");
readDockConfig(); readDockConfig();
updateButton(); updateButton();
@ -151,7 +151,7 @@ DockApplication::DockApplication( const char* name )
DockApplication::~DockApplication() DockApplication::~DockApplication()
{ {
qDebug("Close & store config"); tqDebug("Close & store config");
writeDockConfig(); writeDockConfig();
} }

@ -62,8 +62,8 @@ public:
CTW(TQWidget *parent):TQTabWidget(parent,"MyDockContainer"),KDockContainer(){insertTab(new TQLabel("BLAH",this),"BLUP");} CTW(TQWidget *parent):TQTabWidget(parent,"MyDockContainer"),KDockContainer(){insertTab(new TQLabel("BLAH",this),"BLUP");}
virtual ~CTW(){;} virtual ~CTW(){;}
KDockWidget *parentDockWidget(){return ((KDockWidget*)parent());} KDockWidget *parentDockWidget(){return ((KDockWidget*)parent());}
void insertWidget (KDockWidget *w, TQPixmap, const TQString &, int &){qDebug("widget inserted"); insertTab(w,"NO");} void insertWidget (KDockWidget *w, TQPixmap, const TQString &, int &){tqDebug("widget inserted"); insertTab(w,"NO");}
void setToolTip (KDockWidget *, TQString &){qDebug("Tooltip set");} void setToolTip (KDockWidget *, TQString &){tqDebug("Tooltip set");}
}; };

@ -44,9 +44,9 @@ void KDualColorWidget::slotBgChanged(const TQColor &c)
void KDualColorWidget::slotCurrentChanged(KDualColorButton::DualColor current) void KDualColorWidget::slotCurrentChanged(KDualColorButton::DualColor current)
{ {
if(current == KDualColorButton::Foreground) if(current == KDualColorButton::Foreground)
qDebug("Foreground Button Selected."); tqDebug("Foreground Button Selected.");
else else
qDebug("Background Button Selected."); tqDebug("Background Button Selected.");
} }
int main(int argc, char **argv) int main(int argc, char **argv)

@ -107,7 +107,7 @@ KLedTest::nextLook() {
} }
ledlook = static_cast<KLed::Look>(tmp); ledlook = static_cast<KLed::Look>(tmp);
l->setLook(ledlook); l->setLook(ledlook);
//qDebug("painting look %i", ledlook); //tqDebug("painting look %i", ledlook);
//l->repaint(); //l->repaint();
} }

@ -10,9 +10,9 @@ int main(int argc, char** argv)
KLineEditDlg dialog( "_text", "_value", 0L ); KLineEditDlg dialog( "_text", "_value", 0L );
if(dialog.exec()) if(dialog.exec())
{ {
qDebug("Accepted."); tqDebug("Accepted.");
} else { } else {
qDebug("Rejected."); tqDebug("Rejected.");
} }
return 0; return 0;
} }

@ -26,16 +26,16 @@ ExampleWidget::ExampleWidget( TQWidget *parent, const char *name )
TQSize sh; TQSize sh;
setText("<p>Hello.</p>"); setText("<p>Hello.</p>");
sh = sizeHint(); sh = sizeHint();
qWarning("SizeHint = %d x %d", sh.width(), sh.height()); tqWarning("SizeHint = %d x %d", sh.width(), sh.height());
setText("Hello."); setText("Hello.");
sh = sizeHint(); sh = sizeHint();
qWarning("SizeHint = %d x %d", sh.width(), sh.height()); tqWarning("SizeHint = %d x %d", sh.width(), sh.height());
setText("<p>Hello<br>World</p>"); setText("<p>Hello<br>World</p>");
sh = sizeHint(); sh = sizeHint();
qWarning("SizeHint = %d x %d", sh.width(), sh.height()); tqWarning("SizeHint = %d x %d", sh.width(), sh.height());
// setText("Hello\nWorld"); // setText("Hello\nWorld");
sh = sizeHint(); sh = sizeHint();
qWarning("SizeHint = %d x %d", sh.width(), sh.height()); tqWarning("SizeHint = %d x %d", sh.width(), sh.height());
setMinimumSize(sizeHint()); setMinimumSize(sizeHint());
} }

@ -63,7 +63,7 @@ KRulerTest::KRulerTest( const char *name )
bigwidget->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); bigwidget->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
// TQRect bwrect = bigwidget->frameRect(); // TQRect bwrect = bigwidget->frameRect();
// qDebug("big rect: top%i left%i bottom%i right%i", // tqDebug("big rect: top%i left%i bottom%i right%i",
// bwrect.top(), bwrect.left(), bwrect.bottom(), bwrect.right()); // bwrect.top(), bwrect.left(), bwrect.bottom(), bwrect.right());
hruler = new KRuler(Horizontal, mainframe); hruler = new KRuler(Horizontal, mainframe);
// hruler->setRange( bwrect.left(), bwrect.right() ); // hruler->setRange( bwrect.left(), bwrect.right() );

@ -378,7 +378,7 @@ testWindow::~testWindow ()
delete tb1; delete tb1;
delete menuBar; delete menuBar;
qDebug ("twindowtest finished"); tqDebug ("twindowtest finished");
} }
void testWindow::beFixed() void testWindow::beFixed()

@ -104,7 +104,7 @@ QEventLoopEx::QEventLoopEx( TQObject *parent, const char *name) :
DWORD dwThreadId; DWORD dwThreadId;
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "QEventLoopEx::QEventLoopEx enter"); tqDebug( "QEventLoopEx::QEventLoopEx enter");
#endif #endif
d = new QEventLoopExPrivate; d = new QEventLoopExPrivate;
@ -116,14 +116,14 @@ QEventLoopEx::QEventLoopEx( TQObject *parent, const char *name) :
d->m_sockUpdate = socket(AF_INET,SOCK_DGRAM,0); d->m_sockUpdate = socket(AF_INET,SOCK_DGRAM,0);
d->m_hThread = CreateThread(NULL,0,ThreadProc,this,0,&dwThreadId); d->m_hThread = CreateThread(NULL,0,ThreadProc,this,0,&dwThreadId);
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "QEventLoopEx::QEventLoopEx leave"); tqDebug( "QEventLoopEx::QEventLoopEx leave");
#endif #endif
} }
QEventLoopEx::~QEventLoopEx() QEventLoopEx::~QEventLoopEx()
{ {
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "QEventLoopEx::~QEventLoopEx enter"); tqDebug( "QEventLoopEx::~QEventLoopEx enter");
#endif #endif
d->m_bStopped = true; d->m_bStopped = true;
// Ensure that you thread gets unblocked and can terminate gracefully // Ensure that you thread gets unblocked and can terminate gracefully
@ -141,7 +141,7 @@ QEventLoopEx::~QEventLoopEx()
delete d; delete d;
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "QEventLoopEx::~QEventLoopEx leave"); tqDebug( "QEventLoopEx::~QEventLoopEx leave");
#endif #endif
} }
@ -157,12 +157,12 @@ void QEventLoopEx::registerSocketNotifier( TQSocketNotifier *notifier )
u_long n; u_long n;
DWORD dw; DWORD dw;
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "TQSocketNotifier::registerSocketNotifier %p", notifier ); tqDebug( "TQSocketNotifier::registerSocketNotifier %p", notifier );
#endif #endif
if(ioctlsocket(sockfd,FIONREAD,&n) == SOCKET_ERROR) if(ioctlsocket(sockfd,FIONREAD,&n) == SOCKET_ERROR)
{ {
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "TQSocketNotifier::registerSocketNotifier %p not a socket", notifier ); tqDebug( "TQSocketNotifier::registerSocketNotifier %p not a socket", notifier );
#endif #endif
dw = WSAGetLastError(); dw = WSAGetLastError();
TQEventLoop::registerSocketNotifier(notifier); TQEventLoop::registerSocketNotifier(notifier);
@ -172,7 +172,7 @@ void QEventLoopEx::registerSocketNotifier( TQSocketNotifier *notifier )
if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 )
{ {
#if defined(QT_CHECK_RANGE) #if defined(QT_CHECK_RANGE)
qWarning( "TQSocketNotifier: Internal error" ); tqWarning( "TQSocketNotifier: Internal error" );
#endif #endif
return; return;
} }
@ -215,7 +215,7 @@ void QEventLoopEx::registerSocketNotifier( TQSocketNotifier *notifier )
LeaveCriticalSection(&d->m_csVec); LeaveCriticalSection(&d->m_csVec);
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "TQSocketNotifier::signal update socket"); tqDebug( "TQSocketNotifier::signal update socket");
#endif #endif
closesocket(d->m_sockUpdate); closesocket(d->m_sockUpdate);
} }
@ -226,12 +226,12 @@ void QEventLoopEx::unregisterSocketNotifier( TQSocketNotifier *notifier )
int type = notifier->type(); int type = notifier->type();
if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) { if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
#if defined(QT_CHECK_RANGE) #if defined(QT_CHECK_RANGE)
qWarning( "TQSocketNotifier: Internal error" ); tqWarning( "TQSocketNotifier: Internal error" );
#endif #endif
return; return;
} }
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "TQSocketNotifier::unregisterSocketNotifier %p", notifier ); tqDebug( "TQSocketNotifier::unregisterSocketNotifier %p", notifier );
#endif #endif
EnterCriticalSection(&d->m_csVec); EnterCriticalSection(&d->m_csVec);
@ -273,7 +273,7 @@ void QEventLoopEx::unregisterSocketNotifier( TQSocketNotifier *notifier )
} }
LeaveCriticalSection(&d->m_csVec); LeaveCriticalSection(&d->m_csVec);
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "TQSocketNotifier::signal update socket"); tqDebug( "TQSocketNotifier::signal update socket");
#endif #endif
closesocket(d->m_sockUpdate); closesocket(d->m_sockUpdate);
} }
@ -294,12 +294,12 @@ void QEventLoopEx::setSocketNotifierPending( TQSocketNotifier *notifier )
if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 )
{ {
#if defined(QT_CHECK_RANGE) #if defined(QT_CHECK_RANGE)
qWarning( "TQSocketNotifier: Internal error" ); tqWarning( "TQSocketNotifier: Internal error" );
#endif #endif
return; return;
} }
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "TQSocketNotifier::setSocketNotifierPending %p",notifier ); tqDebug( "TQSocketNotifier::setSocketNotifierPending %p",notifier );
#endif #endif
EnterCriticalSection(&d->m_csVec); EnterCriticalSection(&d->m_csVec);
@ -308,7 +308,7 @@ void QEventLoopEx::setSocketNotifierPending( TQSocketNotifier *notifier )
if ( ! list ) if ( ! list )
{ {
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "TQSocketNotifier::setSocketNotifierPending %p: no list",notifier ); tqDebug( "TQSocketNotifier::setSocketNotifierPending %p: no list",notifier );
#endif #endif
LeaveCriticalSection(&d->m_csVec); LeaveCriticalSection(&d->m_csVec);
return; return;
@ -318,7 +318,7 @@ void QEventLoopEx::setSocketNotifierPending( TQSocketNotifier *notifier )
sn = list->next(); sn = list->next();
if ( ! sn ) { // not found if ( ! sn ) { // not found
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "TQSocketNotifier::setSocketNotifierPending %p: not found",notifier ); tqDebug( "TQSocketNotifier::setSocketNotifierPending %p: not found",notifier );
#endif #endif
LeaveCriticalSection(&d->m_csVec); LeaveCriticalSection(&d->m_csVec);
return; return;
@ -358,7 +358,7 @@ int QEventLoopEx::activateSocketNotifiers()
if ( FD_ISSET(sn->fd, sn->queue) ) { if ( FD_ISSET(sn->fd, sn->queue) ) {
FD_CLR( sn->fd, sn->queue ); FD_CLR( sn->fd, sn->queue );
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug("QEventLoopEx:activateSocketNotifiers %p to object %p",sn, sn->obj); tqDebug("QEventLoopEx:activateSocketNotifiers %p to object %p",sn, sn->obj);
#endif #endif
TQApplication::sendEvent( sn->obj, &event ); TQApplication::sendEvent( sn->obj, &event );
n_act++; n_act++;
@ -369,7 +369,7 @@ int QEventLoopEx::activateSocketNotifiers()
LeaveCriticalSection(&d->m_csVec); // Avoid deaklock LeaveCriticalSection(&d->m_csVec); // Avoid deaklock
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug( "TQSocketNotifier::activateSocketNotifiers set m_evPendingListEmpty"); tqDebug( "TQSocketNotifier::activateSocketNotifiers set m_evPendingListEmpty");
#endif #endif
SetEvent(d->m_evPendingListEmpty); SetEvent(d->m_evPendingListEmpty);
@ -419,7 +419,7 @@ void QEventLoopEx::run()
LeaveCriticalSection(&d->m_csVec); LeaveCriticalSection(&d->m_csVec);
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug("QEventLoopEx: select(%d,%d, %d, %d)",sn_highest,sn_vec[0].select_fds.fd_count,sn_vec[1].select_fds.fd_count,sn_vec[2].select_fds.fd_count); tqDebug("QEventLoopEx: select(%d,%d, %d, %d)",sn_highest,sn_vec[0].select_fds.fd_count,sn_vec[1].select_fds.fd_count,sn_vec[2].select_fds.fd_count);
#endif #endif
int nsel = select( d->sn_highest, int nsel = select( d->sn_highest,
&d->sn_vec[0].select_fds, &d->sn_vec[0].select_fds,
@ -427,7 +427,7 @@ void QEventLoopEx::run()
&d->sn_vec[2].select_fds, &d->sn_vec[2].select_fds,
NULL ); NULL );
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug("QEventLoopEx: select returned %d",nsel); tqDebug("QEventLoopEx: select returned %d",nsel);
#endif #endif
if (nsel == SOCKET_ERROR) { if (nsel == SOCKET_ERROR) {
if (WSAGetLastError() == WSAENOTSOCK) { if (WSAGetLastError() == WSAENOTSOCK) {
@ -483,7 +483,7 @@ void QEventLoopEx::run()
{ {
// disable the invalid socket notifier // disable the invalid socket notifier
static const char *t[] = { "Read", "Write", "Exception" }; static const char *t[] = { "Read", "Write", "Exception" };
qWarning("TQSocketNotifier: invalid socket %d and type '%s', disabling...", tqWarning("TQSocketNotifier: invalid socket %d and type '%s', disabling...",
sn->fd, t[type]); sn->fd, t[type]);
sn->obj->setEnabled(FALSE); sn->obj->setEnabled(FALSE);
} }
@ -497,7 +497,7 @@ void QEventLoopEx::run()
// EINVAL... shouldn't happen, so let's complain to stderr // EINVAL... shouldn't happen, so let's complain to stderr
// and hope someone sends us a bug report // and hope someone sends us a bug report
DWORD dw = WSAGetLastError(); DWORD dw = WSAGetLastError();
qWarning("QEventLoopEx: select failed with error %i\n",dw); tqWarning("QEventLoopEx: select failed with error %i\n",dw);
} }
} }
else else
@ -508,7 +508,7 @@ void QEventLoopEx::run()
{ {
d->m_sockUpdate = socket(AF_INET,SOCK_DGRAM,0); d->m_sockUpdate = socket(AF_INET,SOCK_DGRAM,0);
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug("QEventLoopEx: update socket signaled -> recreate it %i",d->m_sockUpdate); tqDebug("QEventLoopEx: update socket signaled -> recreate it %i",d->m_sockUpdate);
#endif #endif
} }
@ -537,11 +537,11 @@ void QEventLoopEx::run()
{ {
TQApplication::eventLoop()->wakeUp(); TQApplication::eventLoop()->wakeUp();
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug("QEventLoopEx: wake up main event loop and wait for pending list empty"); tqDebug("QEventLoopEx: wake up main event loop and wait for pending list empty");
#endif #endif
WaitForSingleObject(d->m_evPendingListEmpty,INFINITE); WaitForSingleObject(d->m_evPendingListEmpty,INFINITE);
#ifdef _DEBUG_EVENTLOOPEX #ifdef _DEBUG_EVENTLOOPEX
qDebug("QEventLoopEx: pending list now empty again"); tqDebug("QEventLoopEx: pending list now empty again");
#endif #endif
ResetEvent(d->m_evPendingListEmpty); ResetEvent(d->m_evPendingListEmpty);
} }

Зареждане…
Отказ
Запис