rpms/konversation/F-7 konversation-1.0.1-dcop-newline-removal.patch, NONE, 1.1

Dennis Gilmore (ausil) fedora-extras-commits at redhat.com
Wed Apr 9 18:13:29 UTC 2008


Author: ausil

Update of /cvs/extras/rpms/konversation/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21578

Added Files:
	konversation-1.0.1-dcop-newline-removal.patch 
Log Message:
check in patch


konversation-1.0.1-dcop-newline-removal.patch:

--- NEW FILE konversation-1.0.1-dcop-newline-removal.patch ---
diff -ru konversation-old/konversation/src/konvdcop.cpp konversation-new/konversation/src/konvdcop.cpp
--- konversation-old/konversation/src/konvdcop.cpp	2006-10-06 18:43:29.000000000 +0200
+++ konversation-new/konversation/src/konvdcop.cpp	2008-04-09 17:36:38.000000000 +0200
@@ -82,15 +82,23 @@
     emit dcopMultiServerRaw("me " + message);
 }
 
-void KonvDCOP::say(const QString& server,const QString& target,const QString& command)
+void KonvDCOP::say(const QString& _server,const QString& _target,const QString& _command)
 {
+    //Sadly, copy on write doesn't exist with QString::replace
+    QString server(_server), target(_target), command(_command);
+
     // TODO: this just masks a greater problem - Server::addQuery will return a query for '' --argonel
     // TODO: other DCOP calls need argument checking too --argonel
     if (server.isEmpty() || target.isEmpty() || command.isEmpty())
         kdDebug() <<  "KonvDCOP::say() requires 3 arguments." << endl;
     else
     {
-        kdDebug() << "KonvDCOP::say()" << endl;
+        command.replace('\n',"\\n");
+        command.replace('\r',"\\r");
+        target.remove('\n');
+        target.remove('\r');
+        server.remove('\n');
+        server.remove('\r');
         // Act as if the user typed it
         emit dcopSay(server,target,command);
     }




More information about the fedora-extras-commits mailing list