[mythtv-commits] Ticket #3478: null originalairdate values in recorded table produces lots of cosmetic errors to logs

MythTV mythtv at cvs.mythtv.org
Mon Jun 18 19:10:01 UTC 2007


#3478: null originalairdate values in recorded table produces lots of cosmetic
errors to logs
----------------------------------+-----------------------------------------
 Reporter:  otto at kolsi dot fi  |        Owner:  danielk
     Type:  defect                |       Status:  new    
 Priority:  trivial               |    Milestone:  unknown
Component:  mythtv                |      Version:  head   
 Severity:  low                   |   Resolution:         
  Mlocked:  0                     |  
----------------------------------+-----------------------------------------

Comment(by sphery <mtdean at thirdcontact.com>):

 The attached patch, mythtv-3478-null_originalairdate-2.patch, checks for
 an empty QString or for the value "0000-00-00" before using
 QDate::fromString() to parse the string.  Since NEXT_STR() sets the value
 of the QString to the empty string if the value read from the list is
 NULL, a NULL originalairdate will actually result in passing the empty
 string to QDate::fromString(), so we never actually pass NULL to
 QDate::fromString(), but were we to do so, isEmpty() would still catch it.

 Although QDate::fromString() has been patched to check for empty before
 parsing in later versions of QT (at least in the 4.x series) and QT3
 versions may have been patched in some distros, it doesn't hurt to perform
 this check for those versions that do not check.  I know that vanilla QT
 3.3.7 does not perform the check.  Also, regardless of whether
 QDate::fromString() checks for empty strings, we still need to check for
 the zero-valued dates seen in MySQL (which result in the same errors,
 contrary to the results of my initial tests).

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/3478#comment:3>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list