summaryrefslogtreecommitdiff
path: root/qt4
diff options
context:
space:
mode:
authorOlli Salli <ollisal@gmail.com>2011-09-12 20:47:55 +0300
committerOlli Salli <ollisal@gmail.com>2011-10-10 19:17:42 +0300
commitcd38491310b0657a6972bed3565b093de829b319 (patch)
tree996d54a7a314c256dff41e7b0f8c287a5ea72b0b /qt4
parentb33a5bf2b12e4fa66065967625a27028a07eb3d1 (diff)
STC: Reorder most important args of the accepted* signals first
Diffstat (limited to 'qt4')
-rw-r--r--qt4/TelepathyQt4/stream-tube-client.cpp8
-rw-r--r--qt4/TelepathyQt4/stream-tube-client.h12
-rw-r--r--qt4/examples/stream-tubes/tube-receiver.cpp5
-rw-r--r--qt4/examples/stream-tubes/tube-receiver.h2
4 files changed, 13 insertions, 14 deletions
diff --git a/qt4/TelepathyQt4/stream-tube-client.cpp b/qt4/TelepathyQt4/stream-tube-client.cpp
index a7d85e261..55a823fbc 100644
--- a/qt4/TelepathyQt4/stream-tube-client.cpp
+++ b/qt4/TelepathyQt4/stream-tube-client.cpp
@@ -448,11 +448,11 @@ void StreamTubeClient::onAcceptFinished(TubeWrapper *wrapper, PendingStreamTubeC
if (conn->addressType() == SocketAddressTypeIPv4
|| conn->addressType() == SocketAddressTypeIPv6) {
QPair<QHostAddress, quint16> addr = conn->ipAddress();
- emit tubeAcceptedAsTcp(wrapper->mAcc, wrapper->mTube, addr.first, addr.second,
- wrapper->mSourceAddress, wrapper->mSourcePort);
+ emit tubeAcceptedAsTcp(addr.first, addr.second, wrapper->mSourceAddress,
+ wrapper->mSourcePort, wrapper->mAcc, wrapper->mTube);
} else {
- emit tubeAcceptedAsUnix(wrapper->mAcc, wrapper->mTube, conn->localAddress(),
- conn->requiresCredentials(), conn->credentialByte());
+ emit tubeAcceptedAsUnix(conn->localAddress(), conn->requiresCredentials(),
+ conn->credentialByte(), wrapper->mAcc, wrapper->mTube);
}
}
diff --git a/qt4/TelepathyQt4/stream-tube-client.h b/qt4/TelepathyQt4/stream-tube-client.h
index 1f77c3456..00f4a3309 100644
--- a/qt4/TelepathyQt4/stream-tube-client.h
+++ b/qt4/TelepathyQt4/stream-tube-client.h
@@ -144,18 +144,18 @@ Q_SIGNALS:
// These will be emitted if a offered tube is accepted successfully, when setToAcceptAsTCP/Unix
// has been called last
void tubeAcceptedAsTcp(
- const Tp::AccountPtr &account,
- const Tp::IncomingStreamTubeChannelPtr &tube,
const QHostAddress &listenAddress,
quint16 listenPort,
const QHostAddress &sourceAddress, // these are populated with the source address the
- quint16 sourcePort); // generator, if any, yieled for this tube
- void tubeAcceptedAsUnix(
+ quint16 sourcePort, // generator, if any, yieled for this tube
const Tp::AccountPtr &account,
- const Tp::IncomingStreamTubeChannelPtr &tube,
+ const Tp::IncomingStreamTubeChannelPtr &tube);
+ void tubeAcceptedAsUnix(
const QString &listenAddress,
bool requiresCredentials, // this is the requireCredentials param unchanged
- uchar credentialByte);
+ uchar credentialByte,
+ const Tp::AccountPtr &account,
+ const Tp::IncomingStreamTubeChannelPtr &tube);
// These will be emitted if monitorConnections = true was passed to the create() method
// Sadly, there is no other possible way to associate multiple connections through a single tube
diff --git a/qt4/examples/stream-tubes/tube-receiver.cpp b/qt4/examples/stream-tubes/tube-receiver.cpp
index 87fc28d9d..401a1caa2 100644
--- a/qt4/examples/stream-tubes/tube-receiver.cpp
+++ b/qt4/examples/stream-tubes/tube-receiver.cpp
@@ -44,10 +44,9 @@ TubeReceiver::~TubeReceiver()
{
}
-void TubeReceiver::onTubeAccepted(const Tp::AccountPtr &acc,
- const Tp::IncomingStreamTubeChannelPtr &tube, const QString &listenAddress)
+void TubeReceiver::onTubeAccepted(const QString &listenAddress)
{
- qDebug() << "Stream tube channel" << tube->objectPath() << "accepted and opened!";
+ qDebug() << "Stream tube channel accepted and opened, listening at" << listenAddress;
mDevice = new QLocalSocket(this);
mDevice->connectToServer(listenAddress);
diff --git a/qt4/examples/stream-tubes/tube-receiver.h b/qt4/examples/stream-tubes/tube-receiver.h
index 67087d20c..e6876f717 100644
--- a/qt4/examples/stream-tubes/tube-receiver.h
+++ b/qt4/examples/stream-tubes/tube-receiver.h
@@ -42,7 +42,7 @@ public:
~TubeReceiver();
private Q_SLOTS:
- void onTubeAccepted(const Tp::AccountPtr &, const Tp::IncomingStreamTubeChannelPtr &, const QString &);
+ void onTubeAccepted(const QString &);
void onStateChanged(QLocalSocket::LocalSocketState);
void onTimerTimeout();
void onDataFromSocket();