From: Marcus Eggenberger Date: Tue, 13 Nov 2007 16:53:15 +0000 (+0000) Subject: Just added some safetychecks X-Git-Tag: 0.1.0~71 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=924e2c01204da172a071d34485936b379372e497;ds=sidebyside Just added some safetychecks --- diff --git a/src/common/networkinfo.cpp b/src/common/networkinfo.cpp index 8791ffff..1a051f0e 100644 --- a/src/common/networkinfo.cpp +++ b/src/common/networkinfo.cpp @@ -169,7 +169,10 @@ IrcUser *NetworkInfo::newIrcUser(const QString &hostmask) { // mark IrcUser as already initialized to keep the SignalProxy from requesting initData if(initialized()) ircuser->setInitialized(); - _proxy->synchronize(ircuser); + if(proxy()) + proxy()->synchronize(ircuser); + else + qWarning() << "unable to synchronize new IrcUser" << hostmask << "forgot to call NetworkInfo::setProxy(SignalProxy *)?"; connect(ircuser, SIGNAL(nickSet(QString)), this, SLOT(ircUserNickChanged(QString))); connect(ircuser, SIGNAL(initDone()), this, SIGNAL(ircUserInitDone())); @@ -197,7 +200,11 @@ IrcChannel *NetworkInfo::newIrcChannel(const QString &channelname) { // mark IrcUser as already initialized to keep the SignalProxy from requesting initData if(initialized()) channel->setInitialized(); - _proxy->synchronize(channel); + + if(proxy()) + proxy()->synchronize(channel); + else + qWarning() << "unable to synchronize new IrcChannel" << channelname << "forgot to call NetworkInfo::setProxy(SignalProxy *)?"; connect(channel, SIGNAL(initDone()), this, SIGNAL(ircChannelInitDone())); connect(channel, SIGNAL(destroyed()), this, SLOT(channelDestroyed())); diff --git a/src/common/signalproxy.cpp b/src/common/signalproxy.cpp index b7ac9681..904768d5 100644 --- a/src/common/signalproxy.cpp +++ b/src/common/signalproxy.cpp @@ -16,16 +16,6 @@ * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - *************************************************************************** - * SignalProxy has been inspired by QxtRPCPeer, part of libqxt, * - * the Qt eXTension Library . We would like to * - * thank Arvid "aep" Picciani and Adam "ahigerd" Higerd for providing * - * QxtRPCPeer, valuable input and the genius idea to (ab)use Qt's * - * Meta Object System for transmitting signals over the network. * - * * - * To make contribution back into libqxt possible, redistribution and * - * modification of this file is additionally allowed under the terms of * - * the Common Public License, version 1.0, as published by IBM. * ***************************************************************************/ #include "signalproxy.h" diff --git a/src/common/signalproxy.h b/src/common/signalproxy.h index 50010607..4e59e809 100644 --- a/src/common/signalproxy.h +++ b/src/common/signalproxy.h @@ -16,16 +16,6 @@ * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - *************************************************************************** - * SignalProxy has been inspired by QxtRPCPeer, part of libqxt, * - * the Qt eXTension Library . We would like to * - * thank Arvid "aep" Picciani and Adam "ahigerd" Higerd for providing * - * QxtRPCPeer, valuable input and the genius idea to (ab)use Qt's * - * Meta Object System for transmitting signals over the network. * - * * - * To make contribution back into libqxt possible, redistribution and * - * modification of this file is additionally allowed under the terms of * - * the Common Public License, version 1.0, as published by IBM. * ***************************************************************************/ #ifndef _SIGNALPROXY_H_