projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core can now accept a signalproxy as a client
[quassel.git]
/
src
/
core
/
coresession.cpp
diff --git
a/src/core/coresession.cpp
b/src/core/coresession.cpp
index
ded76ef
..
f287ac2
100644
(file)
--- a/
src/core/coresession.cpp
+++ b/
src/core/coresession.cpp
@@
-229,8
+229,7
@@
void CoreSession::disconnectFromNetwork(NetworkId id) {
void CoreSession::networkStateRequested() {
}
void CoreSession::networkStateRequested() {
}
-void CoreSession::addClient(QObject *dev) { // this is QObject* so we can use it in signal connections
- QIODevice *device = qobject_cast<QIODevice *>(dev);
+void CoreSession::addClient(QIODevice *device) {
if(!device) {
quError() << "Invoking CoreSession::addClient with a QObject that is not a QIODevice!";
} else {
if(!device) {
quError() << "Invoking CoreSession::addClient with a QObject that is not a QIODevice!";
} else {
@@
-242,6
+241,11
@@
void CoreSession::addClient(QObject *dev) { // this is QObject* so we can use it
}
}
}
}
+void CoreSession::addClient(SignalProxy *proxy) {
+ signalProxy()->addPeer(proxy);
+ emit sessionState(sessionState());
+}
+
void CoreSession::removeClient(QIODevice *iodev) {
QTcpSocket *socket = qobject_cast<QTcpSocket *>(iodev);
if(socket)
void CoreSession::removeClient(QIODevice *iodev) {
QTcpSocket *socket = qobject_cast<QTcpSocket *>(iodev);
if(socket)