summaryrefslogtreecommitdiffstats
path: root/src/kernel/qobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/qobject.cpp')
-rw-r--r--src/kernel/qobject.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp
index 28a820277..e931cdbe7 100644
--- a/src/kernel/qobject.cpp
+++ b/src/kernel/qobject.cpp
@@ -389,7 +389,7 @@ TQMetaCallEvent::~TQMetaCallEvent()
//
-// Remove white space from SIGNAL and SLOT names.
+// Remove white space from TQ_SIGNAL and TQ_SLOT names.
// Internal for TQObject::connect() and TQObject::disconnect()
//
@@ -1755,14 +1755,14 @@ void TQObject::installEventFilter( const TQObject *obj )
int c = eventFilters->findRef( obj );
if ( c >= 0 )
eventFilters->take( c );
- disconnect( obj, SIGNAL(destroyed(TQObject*)),
- this, SLOT(cleanupEventFilter(TQObject*)) );
+ disconnect( obj, TQ_SIGNAL(destroyed(TQObject*)),
+ this, TQ_SLOT(cleanupEventFilter(TQObject*)) );
} else {
eventFilters = new TQObjectList;
TQ_CHECK_PTR( eventFilters );
}
eventFilters->insert( 0, obj );
- connect( obj, SIGNAL(destroyed(TQObject*)), this, SLOT(cleanupEventFilter(TQObject*)) );
+ connect( obj, TQ_SIGNAL(destroyed(TQObject*)), this, TQ_SLOT(cleanupEventFilter(TQObject*)) );
}
/*!
@@ -1785,8 +1785,8 @@ void TQObject::removeEventFilter( const TQObject *obj )
delete eventFilters;
eventFilters = 0; // reset event filter list
}
- disconnect( obj, SIGNAL(destroyed(TQObject*)),
- this, SLOT(cleanupEventFilter(TQObject*)) );
+ disconnect( obj, TQ_SIGNAL(destroyed(TQObject*)),
+ this, TQ_SLOT(cleanupEventFilter(TQObject*)) );
}
}
@@ -1801,12 +1801,12 @@ static bool check_signal_macro( const TQObject *sender, const char *signal,
const char *func, const char *op )
{
int sigcode = (int)(*signal) - '0';
- if ( sigcode != TQSIGNAL_CODE ) {
- if ( sigcode == TQSLOT_CODE )
+ if ( sigcode != TQ_SIGNAL_CODE ) {
+ if ( sigcode == TQ_SLOT_CODE )
tqWarning( "TQObject::%s: Attempt to %s non-signal %s::%s",
func, op, sender->className(), signal+1 );
else
- tqWarning( "TQObject::%s: Use the SIGNAL macro to %s %s::%s",
+ tqWarning( "TQObject::%s: Use the TQ_SIGNAL macro to %s %s::%s",
func, op, sender->className(), signal );
return FALSE;
}
@@ -1816,8 +1816,8 @@ static bool check_signal_macro( const TQObject *sender, const char *signal,
static bool check_member_code( int code, const TQObject *object,
const char *member, const char *func )
{
- if ( code != TQSLOT_CODE && code != TQSIGNAL_CODE ) {
- tqWarning( "TQObject::%s: Use the SLOT or SIGNAL macro to "
+ if ( code != TQ_SLOT_CODE && code != TQ_SIGNAL_CODE ) {
+ tqWarning( "TQObject::%s: Use the TQ_SLOT or TQ_SIGNAL macro to "
"%s %s::%s", func, func, object->className(), member );
return FALSE;
}
@@ -1829,8 +1829,8 @@ static void err_member_notfound( int code, const TQObject *object,
{
const char *type = 0;
switch ( code ) {
- case TQSLOT_CODE: type = "slot"; break;
- case TQSIGNAL_CODE: type = "signal"; break;
+ case TQ_SLOT_CODE: type = "slot"; break;
+ case TQ_SIGNAL_CODE: type = "signal"; break;
}
if ( strchr(member,')') == 0 ) // common typing mistake
tqWarning( "TQObject::%s: Parentheses expected, %s %s::%s",
@@ -1866,10 +1866,10 @@ static void err_info_about_candidates( int code,
}
const TQMetaData *rm = 0;
switch ( code ) {
- case TQSLOT_CODE:
+ case TQ_SLOT_CODE:
rm = mo->slot( mo->findSlot( newname, TRUE ), TRUE );
break;
- case TQSIGNAL_CODE:
+ case TQ_SIGNAL_CODE:
rm = mo->signal( mo->findSignal( newname, TRUE ), TRUE );
break;
}
@@ -2031,21 +2031,21 @@ TQCString TQObject::normalizeSignalSlot( const char *signalSlot )
\a receiver, and returns TRUE if the connection succeeds; otherwise
returns FALSE.
- You must use the SIGNAL() and SLOT() macros when specifying the \a signal
+ You must use the TQ_SIGNAL() and TQ_SLOT() macros when specifying the \a signal
and the \a member, for example:
\code
TQLabel *label = new TQLabel;
TQScrollBar *scroll = new TQScrollBar;
- TQObject::connect( scroll, SIGNAL(valueChanged(int)),
- label, SLOT(setNum(int)) );
+ TQObject::connect( scroll, TQ_SIGNAL(valueChanged(int)),
+ label, TQ_SLOT(setNum(int)) );
\endcode
This example ensures that the label always displays the current
scroll bar value. Note that the signal and slots parameters must not
contain any variable names, only the type. E.g. the following would
not work and return FALSE:
- TQObject::connect( scroll, SIGNAL(valueChanged(int v)),
- label, SLOT(setNum(int v)) );
+ TQObject::connect( scroll, TQ_SIGNAL(valueChanged(int v)),
+ label, TQ_SLOT(setNum(int v)) );
A signal can also be connected to another signal:
@@ -2066,7 +2066,7 @@ TQCString TQObject::normalizeSignalSlot( const char *signalSlot )
MyWidget::MyWidget()
{
aButton = new TQPushButton( this );
- connect( aButton, SIGNAL(clicked()), SIGNAL(myUsefulSignal()) );
+ connect( aButton, TQ_SIGNAL(clicked()), TQ_SIGNAL(myUsefulSignal()) );
}
\endcode
@@ -2124,8 +2124,8 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
if ( signal_index < 0 ) { // no such signal
#if defined(QT_CHECK_RANGE)
- err_member_notfound( TQSIGNAL_CODE, sender, signal, "connect" );
- err_info_about_candidates( TQSIGNAL_CODE, smeta, signal, "connect" );
+ err_member_notfound( TQ_SIGNAL_CODE, sender, signal, "connect" );
+ err_info_about_candidates( TQ_SIGNAL_CODE, smeta, signal, "connect" );
err_info_about_objects( "connect", sender, receiver );
#endif
return FALSE;
@@ -2148,7 +2148,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
TQMetaObject *rmeta = r->metaObject();
int member_index = -1;
switch ( membcode ) { // get receiver member
- case TQSLOT_CODE:
+ case TQ_SLOT_CODE:
member_index = rmeta->findSlot( member, TRUE );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
@@ -2156,7 +2156,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
member_index = rmeta->findSlot( member, TRUE );
}
break;
- case TQSIGNAL_CODE:
+ case TQ_SIGNAL_CODE:
member_index = rmeta->findSignal( member, TRUE );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
@@ -2181,7 +2181,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
r->className(), member );
return FALSE;
} else {
- const TQMetaData *rm = membcode == TQSLOT_CODE ?
+ const TQMetaData *rm = membcode == TQ_SLOT_CODE ?
rmeta->slot( member_index, TRUE ) :
rmeta->signal( member_index, TRUE );
if ( rm ) {
@@ -2240,10 +2240,10 @@ void TQObject::connectInternal( const TQObject *sender, int signal_index, const
const TQMetaData *rm = 0;
switch ( membcode ) { // get receiver member
- case TQSLOT_CODE:
+ case TQ_SLOT_CODE:
rm = rmeta->slot( member_index, TRUE );
break;
- case TQSIGNAL_CODE:
+ case TQ_SIGNAL_CODE:
rm = rmeta->signal( member_index, TRUE );
break;
}
@@ -2312,11 +2312,11 @@ void TQObject::connectInternal( const TQObject *sender, int signal_index, const
\endcode
\i Disconnect everything connected to a specific signal:
\code
- disconnect( myObject, SIGNAL(mySignal()), 0, 0 );
+ disconnect( myObject, TQ_SIGNAL(mySignal()), 0, 0 );
\endcode
equivalent to the non-static overloaded function
\code
- myObject->disconnect( SIGNAL(mySignal()) );
+ myObject->disconnect( TQ_SIGNAL(mySignal()) );
\endcode
\i Disconnect a specific receiver:
\code
@@ -2376,7 +2376,7 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
TQMetaObject *rmeta = r->metaObject();
switch ( membcode ) { // get receiver member
- case TQSLOT_CODE:
+ case TQ_SLOT_CODE:
member_index = rmeta->findSlot( member, TRUE );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
@@ -2384,7 +2384,7 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
member_index = rmeta->findSlot( member, TRUE );
}
break;
- case TQSIGNAL_CODE:
+ case TQ_SIGNAL_CODE:
member_index = rmeta->findSignal( member, TRUE );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
@@ -2436,7 +2436,7 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
/* compatibility and safety: If a receiver has several slots
* with the same name, disconnect them all*/
bool res = FALSE;
- if ( membcode == TQSLOT_CODE && r ) {
+ if ( membcode == TQ_SLOT_CODE && r ) {
TQMetaObject * rmeta = r->metaObject();
do {
int mi = rmeta->findSlot( member );
@@ -2780,7 +2780,7 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
sol->ref();
sol->currentSender = this;
}
- if ( c->memberType() == TQSIGNAL_CODE ) {
+ if ( c->memberType() == TQ_SIGNAL_CODE ) {
if ((d->disableThreadPostedEvents) ||
(object->d->disableThreadPostedEvents) ||
(currentThread && currentThread->threadPostedEventsDisabled()) ||
@@ -2853,7 +2853,7 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
sol->ref();
sol->currentSender = this;
}
- if ( c->memberType() == TQSIGNAL_CODE ) {
+ if ( c->memberType() == TQ_SIGNAL_CODE ) {
if ((d->disableThreadPostedEvents) ||
(object->d->disableThreadPostedEvents) ||
(currentThread && currentThread->threadPostedEventsDisabled()) ||