[mythtv-commits] Ticket #8020: UIUtilDisp is some strange....

MythTV mythtv at cvs.mythtv.org
Wed Feb 3 07:35:29 UTC 2010


#8020: UIUtilDisp is some strange....
---------------------------------------------+------------------------------
 Reporter:  sunny an                         |       Owner:  stuartm
     Type:  defect                           |      Status:  new    
 Priority:  minor                            |   Milestone:  0.22   
Component:  MythTV - User Interface Library  |     Version:  0.22   
 Severity:  medium                           |     Mlocked:  0      
---------------------------------------------+------------------------------
 {{{
 template <typename ErrorDispatch = ETPrintWarning>
 struct UIUtilDisp
 {
     template <typename ContainerType, typename UIType>
     static bool Assign(ContainerType *container, UIType *&item,
                        const QString &name, bool *err = NULL)
     {
         if (!container)
         {
             if (err)
                 *err |= ErrorDispatch::Container(name);
             else
                 ErrorDispatch::Container(name);
             return true;
         }

         item = dynamic_cast<UIType *>(container->GetChild(name));

         if (item)
             return false;

         /* from here, item had NULL definitely. Where err value is set
 from? */

         if (err)
             *err |= ErrorDispatch::Child(container->objectName(), name);
         else
             ErrorDispatch::Child(container->objectName(), name);
         return true;
     }
 };

 }}}

 above code snippet is in lib/libmythui/mythuiutls.h

 In following codes, event though GetChild("ex") failed, err get
 false.[[BR]]
 But I think that err should have get true after run UIUtilE::Assign.

     bool err = false;[[BR]]
     UIUtilE::Assign(this, m_example, "ex", &err);

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/8020>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list