[Kmyirc-cvs] kmyirc-ng/src kmiircmessage.cpp,1.1,1.2 kmiircmessage.h,1.1,1.2 kmisocket.cpp,1.2,1.3 k
Status: Alpha
Brought to you by:
shermann
From: <sta...@us...> - 2003-05-17 21:19:54
|
Update of /cvsroot/kmyirc/kmyirc-ng/src In directory sc8-pr-cvs1:/tmp/cvs-serv30444/src Modified Files: kmiircmessage.cpp kmiircmessage.h kmisocket.cpp kmisocket.h kmyirc.cpp main.cpp Log Message: * Small modifications in kmiircmessage (for compiling) * System Tray Icon support (right now the icon only shows/hides the main window and quits the application ) Index: kmiircmessage.cpp =================================================================== RCS file: /cvsroot/kmyirc/kmyirc-ng/src/kmiircmessage.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- kmiircmessage.cpp 6 May 2003 07:49:20 -0000 1.1 +++ kmiircmessage.cpp 17 May 2003 21:19:45 -0000 1.2 @@ -8,6 +8,7 @@ * (at your option) any later version. * ***************************************************************************/ #include "kmiircmessage.h" +#include <kdebug.h> KMIIrcMessage::KMIIrcMessage(QObject *parent, const char *name) : QObject(parent, name) @@ -19,14 +20,9 @@ { } -/*! - \fn KMIIrcMessage::parseMessage(const QString &inLine="") - */ -void KMIIrcMessage::parseMessage(const QString &inLine="") +void KMIIrcMessage::parseMessage(const QString &inLine) { -#ifdef DEBUG - qWarning("KMIIrcMessage::parseMessage: Entering virtual method\n"); -#endif + kdDebug() << "KMIIrcMessage::parseMessage: Entering virtual method" << endl; // Portions (C) by konversation developers // Thx guys :) QString trailing=""; @@ -36,13 +32,14 @@ // Find the end of middle line parameter int endOfMiddleLineParameter=newLine.find(" :"); // Do we hit ? + int pos; if (endOfMiddleLineParameter!=-1) { // Copy trailing parameters trailing=newLine.mid(pos+2); newLine=newLine.left(pos); } // Remove all unneccessary whitespaces from line to make parsing easier - QString parseLine=newline.simplifyWhiteSpace(); + QString parseLine=newLine.simplifyWhiteSpace(); QString prefix=""; // Do we have a prefix ? if (parseLine[0]==':') { @@ -67,16 +64,12 @@ } // Server command if no "!" was found in prefix if (prefix.find('!')==-1) { -#ifdef DEBUG - qWarning("KMIIrcMessage::parseMessage: command is a ServerCommand\n"); - qWarning("KMIIrcMessage::parseMessage: Command: "+command+"\n"); -#endif + kdDebug() << "KMIIrcMessage::parseMessage: command is a ServerCommand" << endl; + kdDebug() << "KMIIrcMessage::parseMessage: Command: " << command << endl; userCommand=false; ircCommand=command; } else { -#ifdef DEBUG - qWarning("KMIIrcMessage::parseMessage: command is a UserCommand\n"); -#endif + kdDebug() << "KMIIrcMessage::parseMessage: command is a UserCommand" << endl; userCommand=true; // Get nickname nickName=prefix.mid(0,prefix.find("!")); @@ -89,16 +82,12 @@ // get hostMask hostMask=prefix; ircCommand=command; -#ifdef DEBUG - qWarning("KMIIrcMessage::parseMessage: nickName="+nickName+"\n"); - qWarning("KMIIrcMessage::parseMessage: userName="+userName+"\n"); - qWarning("KMIIrcMessage::parseMessage: hostMask="+hostMask+"\n"); - qWarning("KMIIrcMessage::parseMessage: command="+command+"\n"); -#endif + kdDebug() << "KMIIrcMessage::parseMessage: nickName=" << nickName << endl; + kdDebug() << "KMIIrcMessage::parseMessage: userName=" << userName << endl; + kdDebug() << "KMIIrcMessage::parseMessage: hostMask=" << hostMask << endl; + kdDebug() << "KMIIrcMessage::parseMessage: command=" << command << endl; } -#ifdef DEBUG - qWarning("KMIIrcMessage::parseMessage: Leaving virtual method\n"); -#endif + kdDebug() << "KMIIrcMessage::parseMessage: Leaving virtual method" << endl; } /*! @@ -155,9 +144,10 @@ QString KMIIrcMessage::getNickUserHost() { #warning "not implemented yet!!" + return QString::null; } - +#include "kmiircmessage.moc" Index: kmiircmessage.h =================================================================== RCS file: /cvsroot/kmyirc/kmyirc-ng/src/kmiircmessage.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- kmiircmessage.h 6 May 2003 07:49:20 -0000 1.1 +++ kmiircmessage.h 17 May 2003 21:19:45 -0000 1.2 @@ -11,6 +11,8 @@ #define KMIIRCMESSAGE_H #include <qobject.h> +#include <qstringlist.h> +#include <qstring.h> /** @author St. Hermann @@ -31,7 +33,8 @@ private: bool userCommand; private: QStringList ircParameterList; - public slots: virtual void parseMessage(const QString &inLine=""); + public slots: + virtual void parseMessage(const QString &inLine=""); public: QString getHostMask(); public: QString getIrcCommand(); Index: kmisocket.cpp =================================================================== RCS file: /cvsroot/kmyirc/kmyirc-ng/src/kmisocket.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- kmisocket.cpp 11 May 2003 20:22:08 -0000 1.2 +++ kmisocket.cpp 17 May 2003 21:19:45 -0000 1.3 @@ -19,4 +19,10 @@ { } +QString KMISocket::readLine() +{ + //Not implemented yet + return QString::null; +} + #include "kmisocket.moc" Index: kmisocket.h =================================================================== RCS file: /cvsroot/kmyirc/kmyirc-ng/src/kmisocket.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- kmisocket.h 11 May 2003 20:22:09 -0000 1.2 +++ kmisocket.h 17 May 2003 21:19:45 -0000 1.3 @@ -20,6 +20,7 @@ public: KMISocket( ); ~KMISocket( ); + virtual QString readLine(); }; #endif Index: kmyirc.cpp =================================================================== RCS file: /cvsroot/kmyirc/kmyirc-ng/src/kmyirc.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- kmyirc.cpp 25 Apr 2003 15:27:58 -0000 1.3 +++ kmyirc.cpp 17 May 2003 21:19:45 -0000 1.4 @@ -113,7 +113,7 @@ actionCollection(), "connect"); #ifdef DEBUG #warning "You must set your development path here to get the kmyircui.rc file" - createGUI("/home/sh/projekte/kmyirc-ng/src/kmyircui.rc"); + createGUI("/home/stampede/kmyirc/kmyirc-ng/src/kmyircui.rc"); #else createGUI(); #endif Index: main.cpp =================================================================== RCS file: /cvsroot/kmyirc/kmyirc-ng/src/main.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- main.cpp 23 Apr 2003 11:18:43 -0000 1.1.1.1 +++ main.cpp 17 May 2003 21:19:45 -0000 1.2 @@ -3,6 +3,7 @@ */ #include "kmyirc.h" +#include "kmisystray.h" #include <kapplication.h> #include <dcopclient.h> #include <kaboutdata.h> @@ -45,7 +46,9 @@ if (args->count() == 0) { KMyIRC *widget = new KMyIRC; - widget->show(); + KMISystray *systray = new KMISystray(widget); + widget->show(); + systray->show(); } else { |