Mercurial > hg > svgui
comparison widgets/ActivityLog.cpp @ 751:34c1203d21b5 tonioni
Optional printouts
author | Chris Cannam |
---|---|
date | Tue, 01 Apr 2014 13:42:26 +0100 |
parents | 1a0dfcbffaf1 |
children | 1986c9b0d9c3 |
comparison
equal
deleted
inserted
replaced
750:394caa98d21a | 751:34c1203d21b5 |
---|---|
22 #include <QDialogButtonBox> | 22 #include <QDialogButtonBox> |
23 #include <QTime> | 23 #include <QTime> |
24 #include <QApplication> | 24 #include <QApplication> |
25 | 25 |
26 #include <iostream> | 26 #include <iostream> |
27 | |
28 #include "base/Debug.h" | |
29 | |
30 using std::cerr; | |
31 using std::endl; | |
32 | |
33 #define PRINT_ACTIVITY 1 | |
27 | 34 |
28 ActivityLog::ActivityLog() : QDialog() | 35 ActivityLog::ActivityLog() : QDialog() |
29 { | 36 { |
30 setWindowTitle(tr("Activity Log")); | 37 setWindowTitle(tr("Activity Log")); |
31 | 38 |
51 | 58 |
52 void | 59 void |
53 ActivityLog::activityHappened(QString name) | 60 ActivityLog::activityHappened(QString name) |
54 { | 61 { |
55 name = name.replace("&", ""); | 62 name = name.replace("&", ""); |
56 // SVDEBUG << "ActivityLog::activityHappened(" << name << ")" << endl; | 63 |
64 #ifdef PRINT_ACTIVITY | |
65 cerr << "ActivityLog: " << name; | |
57 if (name == m_prevName) { | 66 if (name == m_prevName) { |
58 // cerr << "(ignoring duplicate)" << endl; | 67 cerr << " (duplicate)"; |
68 } | |
69 cerr << endl; | |
70 #endif | |
71 | |
72 if (name == m_prevName) { | |
59 return; | 73 return; |
60 } | 74 } |
61 m_prevName = name; | 75 m_prevName = name; |
62 int row = m_model->rowCount(); | 76 int row = m_model->rowCount(); |
63 name = tr("%1: %2").arg(QTime::currentTime().toString()).arg(name); | 77 name = tr("%1: %2").arg(QTime::currentTime().toString()).arg(name); |