Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/36/head
Michele Calgaro 11 months ago
parent d9897a720a
commit e506671443
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1225,18 +1225,18 @@ void MethodGenerator::writeProxyBegin(const Class& classData, TQTextStream& stre
if (!classData.msignals.isEmpty()) if (!classData.msignals.isEmpty())
{ {
stream << " TQObject::connect(m_baseProxy, " stream << " TQObject::connect(m_baseProxy, "
<< "TQT_SIGNAL(dbusSignal(const TQT_DBusMessage&))," << endl; << "TQ_SIGNAL(dbusSignal(const TQT_DBusMessage&))," << endl;
stream << " this, " stream << " this, "
<< " TQT_SLOT(slotHandleDBusSignal(const TQT_DBusMessage&)));" << " TQ_SLOT(slotHandleDBusSignal(const TQT_DBusMessage&)));"
<< endl; << endl;
} }
if (!classData.asyncReplySignals.isEmpty()) if (!classData.asyncReplySignals.isEmpty())
{ {
stream << " TQObject::connect(m_baseProxy, " stream << " TQObject::connect(m_baseProxy, "
<< "TQT_SIGNAL(asyncReply(int, const TQT_DBusMessage&))," << endl; << "TQ_SIGNAL(asyncReply(int, const TQT_DBusMessage&))," << endl;
stream << " this, " stream << " this, "
<< " TQT_SLOT(slotHandleAsyncReply(int, const TQT_DBusMessage&)));" << " TQ_SLOT(slotHandleAsyncReply(int, const TQT_DBusMessage&)));"
<< endl; << endl;
} }

@ -326,7 +326,7 @@ bool TQT_DBusConnection::connect(TQObject* object, const char* slot)
if (!d || !d->connection || !object || !slot) if (!d || !d->connection || !object || !slot)
return false; return false;
bool ok = object->connect(d, TQT_SIGNAL(dbusSignal(const TQT_DBusMessage&)), slot); bool ok = object->connect(d, TQ_SIGNAL(dbusSignal(const TQT_DBusMessage&)), slot);
return ok; return ok;
} }

@ -484,7 +484,7 @@ public:
* TQT_DBusConnection connection; * TQT_DBusConnection connection;
* DBusSignalReceiver* receiver; * DBusSignalReceiver* receiver;
* *
* connection.connect(receiver, TQT_SLOT(dbusSignal(const TQT_DBusMessage&))); * connection.connect(receiver, TQ_SLOT(dbusSignal(const TQT_DBusMessage&)));
* @endcode * @endcode
* *
* See TQT_DBusProxy::dbusSignal() for a more obvious way of connecting slots. * See TQT_DBusProxy::dbusSignal() for a more obvious way of connecting slots.

@ -131,7 +131,7 @@ static dbus_bool_t qDBusAddWatch(DBusWatch *watch, void *data)
if (tqApp) { if (tqApp) {
watcher.read = new TQSocketNotifier(fd, TQSocketNotifier::Read, d); watcher.read = new TQSocketNotifier(fd, TQSocketNotifier::Read, d);
if (!enabled) watcher.read->setEnabled(false); if (!enabled) watcher.read->setEnabled(false);
d->connect(watcher.read, TQT_SIGNAL(activated(int)), TQT_SLOT(socketRead(int))); d->connect(watcher.read, TQ_SIGNAL(activated(int)), TQ_SLOT(socketRead(int)));
} }
} }
if (flags & DBUS_WATCH_WRITABLE) { if (flags & DBUS_WATCH_WRITABLE) {
@ -141,7 +141,7 @@ static dbus_bool_t qDBusAddWatch(DBusWatch *watch, void *data)
if (tqApp) { if (tqApp) {
watcher.write = new TQSocketNotifier(fd, TQSocketNotifier::Write, d); watcher.write = new TQSocketNotifier(fd, TQSocketNotifier::Write, d);
if (!enabled) watcher.write->setEnabled(false); if (!enabled) watcher.write->setEnabled(false);
d->connect(watcher.write, TQT_SIGNAL(activated(int)), TQT_SLOT(socketWrite(int))); d->connect(watcher.write, TQ_SIGNAL(activated(int)), TQ_SLOT(socketWrite(int)));
} }
} }
// FIXME-QT4 d->watchers.insertMulti(fd, watcher); // FIXME-QT4 d->watchers.insertMulti(fd, watcher);
@ -194,7 +194,7 @@ static void qDBusRemoveWatch(DBusWatch *watch, void *data)
} }
if (d->removedWatches.count() > 0) if (d->removedWatches.count() > 0)
TQTimer::singleShot(0, d, TQT_SLOT(purgeRemovedWatches())); TQTimer::singleShot(0, d, TQ_SLOT(purgeRemovedWatches()));
} }
static void qDBusToggleWatch(DBusWatch *watch, void *data) static void qDBusToggleWatch(DBusWatch *watch, void *data)
@ -281,12 +281,12 @@ TQT_DBusConnectionPrivate::TQT_DBusConnectionPrivate(TQObject *parent)
dbus_error_init(&error); dbus_error_init(&error);
dispatcher = new TQTimer(this); dispatcher = new TQTimer(this);
TQObject::connect(dispatcher, TQT_SIGNAL(timeout()), this, TQT_SLOT(dispatch())); TQObject::connect(dispatcher, TQ_SIGNAL(timeout()), this, TQ_SLOT(dispatch()));
m_resultEmissionQueueTimer = new TQTimer(this); m_resultEmissionQueueTimer = new TQTimer(this);
TQObject::connect(m_resultEmissionQueueTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(transmitResultEmissionQueue())); TQObject::connect(m_resultEmissionQueueTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(transmitResultEmissionQueue()));
m_messageEmissionQueueTimer = new TQTimer(this); m_messageEmissionQueueTimer = new TQTimer(this);
TQObject::connect(m_messageEmissionQueueTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(transmitMessageEmissionQueue())); TQObject::connect(m_messageEmissionQueueTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(transmitMessageEmissionQueue()));
} }
TQT_DBusConnectionPrivate::~TQT_DBusConnectionPrivate() TQT_DBusConnectionPrivate::~TQT_DBusConnectionPrivate()
@ -652,8 +652,8 @@ int TQT_DBusConnectionPrivate::sendWithReplyAsync(const TQT_DBusMessage &message
if (!receiver || !method) if (!receiver || !method)
return 0; return 0;
if (!TQObject::connect(receiver, TQT_SIGNAL(destroyed(TQObject*)), if (!TQObject::connect(receiver, TQ_SIGNAL(destroyed(TQObject*)),
this, TQT_SLOT(objectDestroyed(TQObject*)))) this, TQ_SLOT(objectDestroyed(TQObject*))))
return false; return false;
DBusMessage *msg = message.toDBusMessage(); DBusMessage *msg = message.toDBusMessage();
@ -700,9 +700,9 @@ void TQT_DBusConnectionPrivate::transmitResultEmissionQueue()
m_resultEmissionQueue.remove(it); m_resultEmissionQueue.remove(it);
it = m_resultEmissionQueue.begin(); it = m_resultEmissionQueue.begin();
TQObject::connect(this, TQT_SIGNAL(dbusPendingCallReply(const TQT_DBusMessage&)), dbusResult.receiver, dbusResult.method.data()); TQObject::connect(this, TQ_SIGNAL(dbusPendingCallReply(const TQT_DBusMessage&)), dbusResult.receiver, dbusResult.method.data());
emitPendingCallReply(dbusResult.message); emitPendingCallReply(dbusResult.message);
TQObject::disconnect(this, TQT_SIGNAL(dbusPendingCallReply(const TQT_DBusMessage&)), dbusResult.receiver, dbusResult.method.data()); TQObject::disconnect(this, TQ_SIGNAL(dbusPendingCallReply(const TQT_DBusMessage&)), dbusResult.receiver, dbusResult.method.data());
} }
} }
} }

@ -83,11 +83,11 @@ TQT_DBusProxy::~TQT_DBusProxy()
bool TQT_DBusProxy::setConnection(const TQT_DBusConnection& connection) bool TQT_DBusProxy::setConnection(const TQT_DBusConnection& connection)
{ {
d->connection.disconnect(this, TQT_SLOT(handleDBusSignal(const TQT_DBusMessage&))); d->connection.disconnect(this, TQ_SLOT(handleDBusSignal(const TQT_DBusMessage&)));
d->connection = connection; d->connection = connection;
return d->connection.connect(this, TQT_SLOT(handleDBusSignal(const TQT_DBusMessage&))); return d->connection.connect(this, TQ_SLOT(handleDBusSignal(const TQT_DBusMessage&)));
} }
const TQT_DBusConnection& TQT_DBusProxy::connection() const const TQT_DBusConnection& TQT_DBusProxy::connection() const
@ -174,7 +174,7 @@ int TQT_DBusProxy::sendWithAsyncReply(const TQString& method, const TQValueList<
message += params; message += params;
return d->connection.sendWithAsyncReply(message, this, return d->connection.sendWithAsyncReply(message, this,
TQT_SLOT(handleAsyncReply(const TQT_DBusMessage&))); TQ_SLOT(handleAsyncReply(const TQT_DBusMessage&)));
} }
TQT_DBusError TQT_DBusProxy::lastError() const TQT_DBusError TQT_DBusProxy::lastError() const

@ -186,7 +186,7 @@
* *
* MyReceiver* receiver1 = new MyReceiver(); * MyReceiver* receiver1 = new MyReceiver();
* *
* connection.connect(receiver1, TQT_SLOT(handleDBusSignal(const TQT_DBusMessage&))); * connection.connect(receiver1, TQ_SLOT(handleDBusSignal(const TQT_DBusMessage&)));
* @endcode * @endcode
* @c receiver1 will get all signals on this connection * @c receiver1 will get all signals on this connection
* *
@ -198,8 +198,8 @@
* *
* MyReceiver* receiver2 = new MyReceiver(); * MyReceiver* receiver2 = new MyReceiver();
* *
* TQObject::connect(proxy, TQT_SIGNAL(dbusSignal(const TQT_DBusMessage&)), * TQObject::connect(proxy, TQ_SIGNAL(dbusSignal(const TQT_DBusMessage&)),
* receiver2, TQT_SLOT(handleDBusSignal(const TQT_DBusMessage&))); * receiver2, TQ_SLOT(handleDBusSignal(const TQT_DBusMessage&)));
* @endcode * @endcode
* @c receiver2 will only get signals coming from the proxy's peer interface * @c receiver2 will only get signals coming from the proxy's peer interface
*/ */

Loading…
Cancel
Save