QTfrontend/ui/widget/chatwidget.cpp
changeset 6205 7764cbe4ddd7
parent 6202 8e3f006b9b1e
child 6214 c06b7e2eb7a4
equal deleted inserted replaced
6204:80cd75daf80f 6205:7764cbe4ddd7
   100 }
   100 }
   101 
   101 
   102 QString * HWChatWidget::s_styleSheet = NULL;
   102 QString * HWChatWidget::s_styleSheet = NULL;
   103 QStringList * HWChatWidget::s_displayNone = NULL;
   103 QStringList * HWChatWidget::s_displayNone = NULL;
   104 bool HWChatWidget::s_isTimeStamped = true;
   104 bool HWChatWidget::s_isTimeStamped = true;
   105 QMutex HWChatWidget::s_styleSheetMutex;
       
   106 
   105 
   107 const QString & HWChatWidget::styleSheet()
   106 const QString & HWChatWidget::styleSheet()
   108 {
   107 {
   109     s_styleSheetMutex.lock();
       
   110 
       
   111     if (s_styleSheet != NULL)
   108     if (s_styleSheet != NULL)
   112     {
       
   113         s_styleSheetMutex.unlock();
       
   114         return *s_styleSheet;
   109         return *s_styleSheet;
   115     }
       
   116 
   110 
   117     setStyleSheet();
   111     setStyleSheet();
   118 
       
   119     s_styleSheetMutex.unlock();
       
   120 
   112 
   121     return *s_styleSheet;
   113     return *s_styleSheet;
   122 }
   114 }
   123 
   115 
   124 void HWChatWidget::setStyleSheet(const QString & styleSheet)
   116 void HWChatWidget::setStyleSheet(const QString & styleSheet)