Changeset 4792 for trunk/qt-gui/src/ewidgets.cpp
- Timestamp:
- 11/30/06 05:39:56 (2 years ago)
- Files:
-
- 1 modified
-
trunk/qt-gui/src/ewidgets.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt-gui/src/ewidgets.cpp
r4791 r4792 712 712 m_appendLineBreak = m->m_chatAppendLineBreak; 713 713 } 714 m_showNotices = m->m_showNotices; 714 715 m_colorRcv = m->m_colorRcv; 715 716 m_colorSnt = m->m_colorSnt; … … 762 763 m_appendLineBreak = m->m_chatAppendLineBreak; 763 764 } 765 m_showNotices = m->m_showNotices; 764 766 m_colorRcv = m->m_colorRcv; 765 767 m_colorSnt = m->m_colorSnt; … … 1084 1086 void CMessageViewWidget::addNotice(QDateTime dt, QString messageText) 1085 1087 { 1088 if (!m_showNotices) 1089 return; 1090 1086 1091 QString color = m_colorNotice.name(); 1087 1092 QString s = ""; 1088 1093 const QString dateTime = dt.toString( m_nDateFormat ); 1089 1094 1090 /* Remove trailing line breaks. */ 1091 for (unsigned int i = messageText.length() - 1; i >= 0; i--) 1092 { 1093 if (messageText.at(i) == '\n' || messageText.at(i) == '\r') 1095 // Remove trailing line breaks. 1096 for (int i = messageText.length(); i >= 0; i--) 1097 { 1098 if (messageText.at(i - 1) != '\n' && messageText.at(i - 1) != '\r') 1099 { 1094 1100 messageText.truncate(i); 1095 else 1096 break; 1097 } 1098 1101 break; 1102 } 1103 } 1099 1104 1100 1105 switch (m_nMsgStyle)
