diff options
Diffstat (limited to 'src/kernel/qobject.cpp')
-rw-r--r-- | src/kernel/qobject.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp index d79d655ef..e958f636e 100644 --- a/src/kernel/qobject.cpp +++ b/src/kernel/qobject.cpp @@ -275,7 +275,7 @@ void *qt_find_obj_child( TQObject *parent, const char *type, const char *name ) /* Preliminary signal spy */ -Q_EXPORT TQObject* qt_preliminary_signal_spy = 0; +Q_EXPORT TQObject* tqt_preliminary_signal_spy = 0; static TQObject* qt_spy_signal_sender = 0; static void qt_spy_signal( TQObject* sender, int signal, TQUObject* o ) @@ -292,18 +292,18 @@ static void qt_spy_signal( TQObject* sender, int signal, TQUObject* o ) mo = sender->metaObject(); while ( mo ) { s.sprintf( "%s_%s", mo->className(), sigData->name ); - int slot = qt_preliminary_signal_spy->metaObject()->findSlot( s, TRUE ); + int slot = tqt_preliminary_signal_spy->metaObject()->findSlot( s, TRUE ); if ( slot >= 0 ) { #ifdef QT_THREAD_SUPPORT // protect access to qt_spy_signal_sender void * const address = &qt_spy_signal_sender; - TQMutexLocker locker( qt_global_mutexpool ? - qt_global_mutexpool->get( address ) : 0 ); + TQMutexLocker locker( tqt_global_mutexpool ? + tqt_global_mutexpool->get( address ) : 0 ); #endif // QT_THREAD_SUPPORT TQObject* old_sender = qt_spy_signal_sender; qt_spy_signal_sender = sender; - qt_preliminary_signal_spy->qt_invoke( slot, o ); + tqt_preliminary_signal_spy->qt_invoke( slot, o ); qt_spy_signal_sender = old_sender; break; } @@ -335,7 +335,7 @@ static void cleanup_object_trees() static void ensure_object_trees() { object_trees = new TQObjectList; - qAddPostRoutine( cleanup_object_trees ); + tqAddPostRoutine( cleanup_object_trees ); } static void insert_tree( TQObject* obj ) @@ -418,7 +418,7 @@ TQObject::TQObject( TQObject *parent, const char *name ) blockSig( FALSE ), // not blocking signals wasDeleted( FALSE ), // double-delete catcher isTree( FALSE ), // no tree yet - objname( name ? qstrdup(name) : 0 ), // set object name + objname( name ? tqstrdup(name) : 0 ), // set object name parentObj( 0 ), // no parent yet. It is set by insertChild() childObjects( 0 ), // no children yet connections( 0 ), // no connections yet @@ -463,7 +463,7 @@ TQObject::~TQObject() { if ( wasDeleted ) { #if defined(QT_DEBUG) - qWarning( "Double TQObject deletion detected." ); + tqWarning( "Double TQObject deletion detected." ); #endif return; } @@ -643,12 +643,12 @@ void *qt_inheritedBy( TQMetaObject *superClass, const TQObject *object ) future. If the object does not have a name, the name() function returns - "unnamed", so printf() (used in qDebug()) will not be asked to + "unnamed", so printf() (used in tqDebug()) will not be asked to output a null pointer. If you want a null pointer to be returned for unnamed objects, you can call name( 0 ). \code - qDebug( "MyClass::setPrecision(): (%s) invalid precision %f", + tqDebug( "MyClass::setPrecision(): (%s) invalid precision %f", name(), newPrecision ); \endcode @@ -668,7 +668,7 @@ void TQObject::setName( const char *name ) { if ( objname ) delete [] (char*) objname; - objname = name ? qstrdup(name) : 0; + objname = name ? tqstrdup(name) : 0; } /*! @@ -756,7 +756,7 @@ bool TQObject::event( TQEvent *e ) { #if defined(QT_CHECK_NULL) if ( e == 0 ) - qWarning( "TQObject::event: Null events are not permitted" ); + tqWarning( "TQObject::event: Null events are not permitted" ); #endif if ( eventFilters ) { // try filters if ( activate_filters(e) ) // stopped by a filter @@ -883,7 +883,7 @@ void TQObject::customEvent( TQCustomEvent * ) if ( obj == textEdit ) { if ( e->type() == TQEvent::KeyPress ) { TQKeyEvent *k = (TQKeyEvent*)ev; - qDebug( "Ate key press %d", k->key() ); + tqDebug( "Ate key press %d", k->key() ); return TRUE; } else { return FALSE; @@ -1005,7 +1005,7 @@ void TQObject::blockSignals( bool block ) void MyObject::timerEvent( TQTimerEvent *e ) { - qDebug( "timer event, id %d", e->timerId() ); + tqDebug( "timer event, id %d", e->timerId() ); } \endcode @@ -1242,7 +1242,7 @@ TQConnectionList *TQObject::receivers( const char* signal ) const TQConnectionList *TQObject::receivers( int signal ) const { #ifndef QT_NO_PRELIMINARY_SIGNAL_SPY - if ( qt_preliminary_signal_spy && signal >= 0 ) { + if ( tqt_preliminary_signal_spy && signal >= 0 ) { if ( !connections ) { TQObject* that = (TQObject*) this; that->connections = new TQSignalVec( signal+1 ); @@ -1282,7 +1282,7 @@ void TQObject::insertChild( TQObject *obj ) if ( obj->parentObj && obj->parentObj != this ) { #if defined(QT_CHECK_STATE) if ( obj->parentObj != this && obj->isWidgetType() ) - qWarning( "TQObject::insertChild: Cannot reparent a widget, " + tqWarning( "TQObject::insertChild: Cannot reparent a widget, " "use TQWidget::reparent() instead" ); #endif obj->parentObj->removeChild( obj ); @@ -1293,7 +1293,7 @@ void TQObject::insertChild( TQObject *obj ) TQ_CHECK_PTR( childObjects ); } else if ( obj->parentObj == this ) { #if defined(QT_CHECK_STATE) - qWarning( "TQObject::insertChild: Object %s::%s already in list", + tqWarning( "TQObject::insertChild: Object %s::%s already in list", obj->className(), obj->name( "unnamed" ) ); #endif return; @@ -1368,7 +1368,7 @@ void TQObject::removeChild( TQObject *obj ) if ( e->type() == TQEvent::KeyPress ) { // special processing for key press TQKeyEvent *k = (TQKeyEvent *)e; - qDebug( "Ate key press %d", k->key() ); + tqDebug( "Ate key press %d", k->key() ); return TRUE; // eat event } else { // standard event processing @@ -1453,10 +1453,10 @@ static bool check_signal_macro( const TQObject *sender, const char *signal, int sigcode = (int)(*signal) - '0'; if ( sigcode != TQSIGNAL_CODE ) { if ( sigcode == TQSLOT_CODE ) - qWarning( "TQObject::%s: Attempt to %s non-signal %s::%s", + tqWarning( "TQObject::%s: Attempt to %s non-signal %s::%s", func, op, sender->className(), signal+1 ); else - qWarning( "TQObject::%s: Use the SIGNAL macro to %s %s::%s", + tqWarning( "TQObject::%s: Use the SIGNAL macro to %s %s::%s", func, op, sender->className(), signal ); return FALSE; } @@ -1467,7 +1467,7 @@ static bool check_member_code( int code, const TQObject *object, const char *member, const char *func ) { if ( code != TQSLOT_CODE && code != TQSIGNAL_CODE ) { - qWarning( "TQObject::%s: Use the SLOT or SIGNAL macro to " + tqWarning( "TQObject::%s: Use the SLOT or SIGNAL macro to " "%s %s::%s", func, func, object->className(), member ); return FALSE; } @@ -1483,10 +1483,10 @@ static void err_member_notfound( int code, const TQObject *object, case TQSIGNAL_CODE: type = "signal"; break; } if ( strchr(member,')') == 0 ) // common typing mistake - qWarning( "TQObject::%s: Parentheses expected, %s %s::%s", + tqWarning( "TQObject::%s: Parentheses expected, %s %s::%s", func, type, object->className(), member ); else - qWarning( "TQObject::%s: No such %s %s::%s", + tqWarning( "TQObject::%s: No such %s %s::%s", func, type, object->className(), member ); } @@ -1497,9 +1497,9 @@ static void err_info_about_objects( const char * func, { const char * a = sender->name(), * b = receiver->name(); if ( a ) - qWarning( "TQObject::%s: (sender name: '%s')", func, a ); + tqWarning( "TQObject::%s: (sender name: '%s')", func, a ); if ( b ) - qWarning( "TQObject::%s: (receiver name: '%s')", func, b ); + tqWarning( "TQObject::%s: (receiver name: '%s')", func, b ); } static void err_info_about_candidates( int code, @@ -1524,7 +1524,7 @@ static void err_info_about_candidates( int code, break; } if ( rm ) { - qWarning("TQObject::%s: Candidate: %s", func, newname.data()); + tqWarning("TQObject::%s: Candidate: %s", func, newname.data()); } } } @@ -1552,12 +1552,12 @@ static void err_info_about_candidates( int code, const TQObject *TQObject::sender() { #ifndef QT_NO_PRELIMINARY_SIGNAL_SPY - if ( this == qt_preliminary_signal_spy ) { + if ( this == tqt_preliminary_signal_spy ) { # ifdef QT_THREAD_SUPPORT // protect access to qt_spy_signal_sender void * const address = &qt_spy_signal_sender; - TQMutexLocker locker( qt_global_mutexpool ? - qt_global_mutexpool->get( address ) : 0 ); + TQMutexLocker locker( tqt_global_mutexpool ? + tqt_global_mutexpool->get( address ) : 0 ); # endif // QT_THREAD_SUPPORT return qt_spy_signal_sender; } @@ -1748,7 +1748,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal, { #if defined(QT_CHECK_NULL) if ( sender == 0 || receiver == 0 || signal == 0 || member == 0 ) { - qWarning( "TQObject::connect: Cannot connect %s::%s to %s::%s", + tqWarning( "TQObject::connect: Cannot connect %s::%s to %s::%s", sender ? sender->className() : "(null)", signal ? signal+1 : "(null)", receiver ? receiver->className() : "(null)", @@ -1825,7 +1825,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal, } #if defined(QT_CHECK_RANGE) if ( !s->checkConnectArgs(signal,receiver,member) ) { - qWarning( "TQObject::connect: Incompatible sender/receiver arguments" + tqWarning( "TQObject::connect: Incompatible sender/receiver arguments" "\n\t%s::%s --> %s::%s", s->className(), signal, r->className(), member ); @@ -1849,7 +1849,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal, || ( TQUType::isEqual( sm->method->parameters[si-1].type, &static_QUType_varptr ) && TQUType::isEqual( rm->method->parameters[ri-1].type, &static_QUType_ptr ) ) ) continue; // varptr got introduced in 3.1 and is binary compatible with ptr - qWarning( "TQObject::connect: Incompatible sender/receiver marshalling" + tqWarning( "TQObject::connect: Incompatible sender/receiver marshalling" "\n\t%s::%s --> %s::%s", s->className(), signal, r->className(), member ); @@ -1989,7 +1989,7 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal, { #if defined(QT_CHECK_NULL) if ( sender == 0 || (receiver == 0 && member != 0) ) { - qWarning( "TQObject::disconnect: Unexpected null parameter" ); + tqWarning( "TQObject::disconnect: Unexpected null parameter" ); return FALSE; } #endif @@ -2061,7 +2061,7 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal, } if ( signal_index < 0 ) { #if defined(QT_CHECK_RANGE) - qWarning( "TQObject::disconnect: No such signal %s::%s", + tqWarning( "TQObject::disconnect: No such signal %s::%s", s->className(), signal ); #endif return FALSE; @@ -2333,7 +2333,7 @@ TQMetaObject* TQObject::staticTQtMetaObject() void TQObject::activate_signal( int signal ) { #ifndef QT_NO_PRELIMINARY_SIGNAL_SPY - if ( qt_preliminary_signal_spy ) { + if ( tqt_preliminary_signal_spy ) { if ( !signalsBlocked() && signal >= 0 && ( !connections || !connections->at( signal ) ) ) { TQUObject o[1]; @@ -2360,7 +2360,7 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) return; #ifndef QT_NO_PRELIMINARY_SIGNAL_SPY - if ( qt_preliminary_signal_spy ) + if ( tqt_preliminary_signal_spy ) qt_spy_signal( this, connections->findRef( clist), o ); #endif @@ -2438,7 +2438,7 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) #define ACTIVATE_SIGNAL_WITH_PARAM(FNAME,TYPE) \ void TQObject::FNAME( int signal, TYPE param ) \ { \ - if ( qt_preliminary_signal_spy ) { \ + if ( tqt_preliminary_signal_spy ) { \ if ( !signalsBlocked() && signal >= 0 && \ ( !connections || !connections->at( signal ) ) ) { \ TQUObject o[2]; \ @@ -2504,7 +2504,7 @@ static void dumpRecursive( int level, TQObject *object ) flags += 'I'; } } - qDebug( "%s%s::%s %s", (const char*)buf, object->className(), name, + tqDebug( "%s%s::%s %s", (const char*)buf, object->className(), name, flags.latin1() ); if ( object->children() ) { TQObjectListIt it(*object->children()); @@ -2546,41 +2546,41 @@ void TQObject::dumpObjectTree() void TQObject::dumpObjectInfo() { #if defined(QT_DEBUG) - qDebug( "OBJECT %s::%s", className(), name( "unnamed" ) ); + tqDebug( "OBJECT %s::%s", className(), name( "unnamed" ) ); int n = 0; - qDebug( " SIGNALS OUT" ); + tqDebug( " SIGNALS OUT" ); if ( connections ) { TQConnectionList *clist; for ( uint i = 0; i < connections->size(); i++ ) { if ( ( clist = connections->at( i ) ) ) { - qDebug( "\t%s", metaObject()->signal( i, TRUE )->name ); + tqDebug( "\t%s", metaObject()->signal( i, TRUE )->name ); n++; register TQConnection *c; TQConnectionListIt cit(*clist); while ( (c=cit.current()) ) { ++cit; - qDebug( "\t --> %s::%s %s", c->object()->className(), + tqDebug( "\t --> %s::%s %s", c->object()->className(), c->object()->name( "unnamed" ), c->memberName() ); } } } } if ( n == 0 ) - qDebug( "\t<None>" ); + tqDebug( "\t<None>" ); - qDebug( " SIGNALS IN" ); + tqDebug( " SIGNALS IN" ); n = 0; if ( senderObjects ) { TQObject *sender = senderObjects->first(); while ( sender ) { - qDebug( "\t%s::%s", + tqDebug( "\t%s::%s", sender->className(), sender->name( "unnamed" ) ); n++; sender = senderObjects->next(); } } if ( n == 0 ) - qDebug( "\t<None>" ); + tqDebug( "\t<None>" ); #endif } @@ -2610,7 +2610,7 @@ bool TQObject::setProperty( const char *name, const TQVariant& value ) int id = meta->findProperty( name, TRUE ); const TQMetaProperty* p = meta->property( id, TRUE ); if ( !p || !p->isValid() || !p->writable() ) { - qWarning( "%s::setProperty( \"%s\", value ) failed: property invalid, read-only or does not exist", + tqWarning( "%s::setProperty( \"%s\", value ) failed: property invalid, read-only or does not exist", className(), name ); return FALSE; } @@ -2662,7 +2662,7 @@ TQVariant TQObject::property( const char *name ) const int id = meta->findProperty( name, TRUE ); const TQMetaProperty* p = meta->property( id, TRUE ); if ( !p || !p->isValid() ) { - qWarning( "%s::property( \"%s\" ) failed: property invalid or does not exist", + tqWarning( "%s::property( \"%s\" ) failed: property invalid or does not exist", className(), name ); return v; } |