All pastes #1327979 Raw Edit

neoclust

public text v1 · immutable
#1327979 ·published 2009-02-05 13:47 UTC
rendered paste body
Index: src/irc/query.cpp===================================================================--- src/irc/query.cpp	(revision 921669)+++ src/irc/query.cpp	(working copy)@@ -82,9 +82,16 @@     // link "Whois", "Ignore" ... menu items into ircview popup     KMenu* popup=textView->getPopup();     popup->addSeparator();-    popup->insertItem(i18n("&Whois"),Konversation::Whois);-    popup->insertItem(i18n("&Version"),Konversation::Version);-    popup->insertItem(i18n("&Ping"),Konversation::Ping);+    KAction *whoisAction = new KAction( i18n( "&Whois" ), popup );+    connect(whoisAction, SIGNAL(triggered(bool)), this, SLOT(slotWhoIs()));+    KAction *whoisAction = new KAction( i18n( "&Version" ), popup );+    connect(whoisAction, SIGNAL(triggered(bool)), this, SLOT(slotVersion()));+    KAction *whoisAction = new KAction( i18n( "&Ping" ), popup );+    connect(whoisAction, SIGNAL(triggered(bool)), this, SLOT(slotPing()));+    +    popup->addAction(whoisAction);+    popup->addAction(versionAction);+    popup->addAction(pingAction);     popup->addSeparator();      popup->insertItem(i18n("Ignore"), Konversation::IgnoreNick);@@ -693,4 +700,18 @@     } } +void Query::slotWhoIs()+{+    sendQueryText(Preferences::self()->commandChar()+"WHOIS "+name+' '+name);+}+void Query::slotVersion()+{+    sendQueryText(Preferences::self()->commandChar()+"CTCP "+name+" VERSION");+}++void Query::slotPing()+{+    sendQueryText(Preferences::self()->commandChar()+"CTCP "+name+" PING");+}+ // #include "./irc/query.moc"Index: src/irc/query.h===================================================================--- src/irc/query.h	(revision 921669)+++ src/irc/query.h	(working copy)@@ -95,6 +95,9 @@         void nickInfoChanged();         void closeWithoutAsking();         virtual void serverOnline(bool online);+        void slotWhoIs();+        void slotVersion();+        void slotPing();      protected:         void setName(const QString& newName);