Diffstat (limited to 'noncore/net/opieirc/ircsession.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircsession.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/net/opieirc/ircsession.cpp b/noncore/net/opieirc/ircsession.cpp index fd8ba72..c8d7869 100644 --- a/noncore/net/opieirc/ircsession.cpp +++ b/noncore/net/opieirc/ircsession.cpp @@ -1,35 +1,36 @@ #include "ircsession.h" #include "ircmessageparser.h" #include "ircchannelperson.h" #include "ircversion.h" -IRCSession::IRCSession(QWidget *parent, IRCServer *server) { +IRCSession::IRCSession(QObject *parent, IRCServer *server) + : QObject(parent) +{ m_server = server; m_connection = new IRCConnection(m_server); m_parser = new IRCMessageParser(this); - m_parent = parent; connect(m_connection, SIGNAL(messageArrived(IRCMessage*)), this, SLOT(handleMessage(IRCMessage*))); connect(m_parser, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); connect(m_connection, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); } IRCSession::~IRCSession() { /* We want this to get deleted automatically */ m_channels.setAutoDelete(TRUE); m_people.setAutoDelete(TRUE); delete m_parser; delete m_connection; } void IRCSession::beginSession() { m_connection->doConnect(); } void IRCSession::join(QString channelname) { m_connection->sendLine("JOIN " + channelname); } void IRCSession::quit(){ m_connection->sendLine("QUIT :[OI] I'm too good to need a reason"); |