forked from qt-creator/qt-creator
AppOutputPane: Add timestamps to normal and error messages
Similar to BuildManager::addToOutputWindow. This doesn't affect stdout/stderr output. Change-Id: Iddee043aa46cc89860b4a2231fe075cb553b5ad3 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
92230d57d6
commit
fe525d2b86
@@ -482,7 +482,13 @@ void AppOutputPane::appendMessage(RunControl *rc, const QString &out, Utils::Out
|
|||||||
const int index = indexOf(rc);
|
const int index = indexOf(rc);
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
Core::OutputWindow *window = m_runControlTabs.at(index).window;
|
Core::OutputWindow *window = m_runControlTabs.at(index).window;
|
||||||
window->appendMessage(out, format);
|
QString stringToWrite;
|
||||||
|
if (format == Utils::NormalMessageFormat || format == Utils::ErrorMessageFormat) {
|
||||||
|
stringToWrite = QTime::currentTime().toString();
|
||||||
|
stringToWrite += QLatin1String(": ");
|
||||||
|
}
|
||||||
|
stringToWrite += out;
|
||||||
|
window->appendMessage(stringToWrite, format);
|
||||||
if (format != Utils::NormalMessageFormat) {
|
if (format != Utils::NormalMessageFormat) {
|
||||||
if (m_runControlTabs.at(index).behaviorOnOutput == Flash)
|
if (m_runControlTabs.at(index).behaviorOnOutput == Flash)
|
||||||
flash();
|
flash();
|
||||||
|
|||||||
Reference in New Issue
Block a user