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