@@ -95,11 +95,6 @@ void CentralWidget::setTabTitle(TabType tabType, RMessage::Type messageType, con
9595 this ->tabWidget ->setTabText (tabPosition,defaultText);
9696}
9797
98- QString CentralWidget::messageToString (const RMessage &message)
99- {
100- return QString (" [%1] %2" ).arg (RMessage::aTimeToString (message.getAtime ()),message);
101- }
102-
10398void CentralWidget::onInfoPrinted (const RMessage &message)
10499{
105100 QScrollBar *sb = this ->applicationOutputBrowser ->verticalScrollBar ();
@@ -109,7 +104,7 @@ void CentralWidget::onInfoPrinted(const RMessage &message)
109104 this ->applicationOutputBrowser ->moveCursor (QTextCursor::End);
110105 this ->applicationOutputBrowser ->setTextBackgroundColor (QApplication::palette ().base ().color ());
111106 this ->applicationOutputBrowser ->setTextColor (QApplication::palette ().text ().color ());
112- this ->applicationOutputBrowser ->insertPlainText (CentralWidget::messageToString (message));
107+ this ->applicationOutputBrowser ->insertPlainText (RMessage::messageToLogString (message));
113108 this ->applicationOutputBrowser ->moveCursor (QTextCursor::End);
114109 if (scrollBarAtMax)
115110 {
@@ -121,7 +116,7 @@ void CentralWidget::onInfoPrinted(const RMessage &message)
121116
122117void CentralWidget::onNoticePrinted (const RMessage &message)
123118{
124- RMessageBox::information (this ,tr (" Notice" ),QString (CentralWidget::messageToString (message)).replace (" NOTICE: " ," " ));
119+ RMessageBox::information (this ,tr (" Notice" ),QString (RMessage::messageToLogString (message)).replace (" NOTICE: " ," " ));
125120}
126121
127122void CentralWidget::onWarningPrinted (const RMessage &message)
@@ -131,7 +126,7 @@ void CentralWidget::onWarningPrinted(const RMessage &message)
131126 this ->applicationOutputBrowser ->moveCursor (QTextCursor::End);
132127 this ->applicationOutputBrowser ->setTextBackgroundColor (QApplication::palette ().base ().color ());
133128 this ->applicationOutputBrowser ->setTextColor (QColor (170 ,0 ,0 ));
134- this ->applicationOutputBrowser ->insertPlainText (CentralWidget::messageToString (message));
129+ this ->applicationOutputBrowser ->insertPlainText (RMessage::messageToLogString (message));
135130 this ->applicationOutputBrowser ->moveCursor (QTextCursor::End);
136131 this ->applicationOutputBrowser ->setTextColor (QApplication::palette ().text ().color ());
137132 this ->applicationOutputBrowser ->setCurrentCharFormat (charFormat);
@@ -147,7 +142,7 @@ void CentralWidget::onErrorPrinted(const RMessage &message)
147142 this ->applicationOutputBrowser ->moveCursor (QTextCursor::End);
148143 this ->applicationOutputBrowser ->setTextBackgroundColor (QColor (170 ,0 ,0 ));
149144 this ->applicationOutputBrowser ->setTextColor (QColor (255 ,255 ,255 ));
150- this ->applicationOutputBrowser ->insertPlainText (CentralWidget::messageToString (message));
145+ this ->applicationOutputBrowser ->insertPlainText (RMessage::messageToLogString (message));
151146 this ->applicationOutputBrowser ->moveCursor (QTextCursor::End);
152147 this ->applicationOutputBrowser ->setTextBackgroundColor (QApplication::palette ().base ().color ());
153148 this ->applicationOutputBrowser ->setTextColor (QApplication::palette ().text ().color ());
0 commit comments