[mythtv] [PATCH] Remove extra spaces in remoteencoder

David Engel dlengel at attbi.com
Mon Oct 27 23:25:49 EST 2003


There are a couple of places in remoteencoder.cpp where single-space
strings aren't converted back to empty strings after network
reception.  This patch fixes it.

Why is this conversion done anyway?  Do the join and split in
WriteStringList and ReadStringList not do the right thing on empty
strings?

David
-- 
David Engel
dlengel at attbi.com

Index: libs/libmythtv/remoteencoder.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/remoteencoder.cpp,v
retrieving revision 1.17
diff -u -r1.17 remoteencoder.cpp
--- libs/libmythtv/remoteencoder.cpp	25 Oct 2003 05:25:52 -0000	1.17
+++ libs/libmythtv/remoteencoder.cpp	28 Oct 2003 04:21:03 -0000
@@ -420,6 +420,27 @@
     iconpath = strlist[7];
     channelname = strlist[8];
     chanid = strlist[9];
+
+    if (title == " ")
+        title = "";
+    if (subtitle == " ")
+        subtitle = "";
+    if (desc == " ")
+        desc = "";
+    if (category == " ")
+        category = "";
+    if (starttime == " ")
+        starttime = "";
+    if (endtime == " ")
+        endtime = "";
+    if (callsign == " ")
+        callsign = "";
+    if (iconpath == " ")
+        iconpath = "";
+    if (channelname == " ")
+        channelname = "";
+    if (chanid == " ")
+        chanid = "";
 }
 
 void RemoteEncoder::GetChannelInfo(QString &title, QString &subtitle,
@@ -444,6 +465,27 @@
     channelname = strlist[8];
     chanid = strlist[9];
 
+    if (title == " ")
+        title = "";
+    if (subtitle == " ")
+        subtitle = "";
+    if (desc == " ")
+        desc = "";
+    if (category == " ")
+        category = "";
+    if (starttime == " ")
+        starttime = "";
+    if (endtime == " ")
+        endtime = "";
+    if (callsign == " ")
+        callsign = "";
+    if (iconpath == " ")
+        iconpath = "";
+    if (channelname == " ")
+        channelname = "";
+    if (chanid == " ")
+        chanid = "";
+
     lastchannel = channelname;
 }
 


More information about the mythtv-dev mailing list