[mythtv-commits] Re: Ticket #937: [PATCH]: mythfilldatabase --file tweaks

MythTV mythtv at cvs.mythtv.org
Thu Jan 5 06:14:19 UTC 2006

#937: [PATCH]: mythfilldatabase --file tweaks
 Reporter:  mcdmx at users.sf.net  |        Owner:  ijr 
     Type:  patch               |       Status:  new 
 Priority:  minor               |    Milestone:      
Component:  mythtv              |      Version:  head
 Severity:  medium              |   Resolution:      
Comment (by cpinkham):

 I haven't tested this yet since I don't use --file, but is the following
 line correct?

 QString tmp = (*i).name.stripWhiteSpace().upper();

 Shouldn't that be simplifyWhiteSpace() since you then split on spaces
 right below that?

 And stripWhiteSpace() returns a QString, it does not modify the QString in
 place, so the following line would not be stripped:


 Would something like this work and be easier to follow?

 QStringList words = QStringList::split(" ",
 QString callsign = "";
 if (words[1].isEmpty())
     callsign = words[0].left(5);
     callsign = words[0].left(3);
     callsign += words[1].left(5-callsign.length());
 (*i).callsign = callsign;

Ticket URL: <http://cvs.mythtv.org/trac/ticket/937>
MythTV <http://www.mythtv.org/>

More information about the mythtv-commits mailing list