##// END OF EJS Templates
Adds logs for null visitors
Alexandre Leroux -
r204:5c097ba3f0d9
parent child
Show More
@@ -3,12 +3,15
3
3
4 #include "Visualization/IVisualizationWidget.h"
4 #include "Visualization/IVisualizationWidget.h"
5
5
6 #include <QLoggingCategory>
6 #include <QWidget>
7 #include <QWidget>
7
8
8 #include <memory>
9 #include <memory>
9
10
10 #include <Common/spimpl.h>
11 #include <Common/spimpl.h>
11
12
13 Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationGraphWidget)
14
12 class Variable;
15 class Variable;
13
16
14 namespace Ui {
17 namespace Ui {
@@ -5,8 +5,11
5
5
6 #include <Common/spimpl.h>
6 #include <Common/spimpl.h>
7
7
8 #include <QLoggingCategory>
8 #include <QWidget>
9 #include <QWidget>
9
10
11 Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationTabWidget)
12
10 class Variable;
13 class Variable;
11 class VisualizationZoneWidget;
14 class VisualizationZoneWidget;
12
15
@@ -6,11 +6,11
6 #include <QLoggingCategory>
6 #include <QLoggingCategory>
7 #include <QWidget>
7 #include <QWidget>
8
8
9 Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationWidget)
10
9 class Variable;
11 class Variable;
10 class VisualizationTabWidget;
12 class VisualizationTabWidget;
11
13
12 Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationWidget)
13
14 namespace Ui {
14 namespace Ui {
15 class VisualizationWidget;
15 class VisualizationWidget;
16 } // namespace Ui
16 } // namespace Ui
@@ -3,8 +3,11
3
3
4 #include "Visualization/IVisualizationWidget.h"
4 #include "Visualization/IVisualizationWidget.h"
5
5
6 #include <QLoggingCategory>
6 #include <QWidget>
7 #include <QWidget>
7
8
9 Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationZoneWidget)
10
8 namespace Ui {
11 namespace Ui {
9 class VisualizationZoneWidget;
12 class VisualizationZoneWidget;
10 } // Ui
13 } // Ui
@@ -7,6 +7,8
7
7
8 #include <unordered_map>
8 #include <unordered_map>
9
9
10 Q_LOGGING_CATEGORY(LOG_VisualizationGraphWidget, "VisualizationGraphWidget")
11
10 namespace {
12 namespace {
11
13
12 /// Key pressed to enable zoom on horizontal axis
14 /// Key pressed to enable zoom on horizontal axis
@@ -62,6 +64,10 void VisualizationGraphWidget::accept(IVisualizationWidgetVisitor *visitor)
62 if (visitor) {
64 if (visitor) {
63 visitor->visit(this);
65 visitor->visit(this);
64 }
66 }
67 else {
68 qCCritical(LOG_VisualizationGraphWidget())
69 << tr("Can't visit widget : the visitor is null");
70 }
65 }
71 }
66
72
67 bool VisualizationGraphWidget::canDrop(const Variable &variable) const
73 bool VisualizationGraphWidget::canDrop(const Variable &variable) const
@@ -4,6 +4,8
4
4
5 #include "Visualization/VisualizationZoneWidget.h"
5 #include "Visualization/VisualizationZoneWidget.h"
6
6
7 Q_LOGGING_CATEGORY(LOG_VisualizationTabWidget, "VisualizationTabWidget")
8
7 namespace {
9 namespace {
8
10
9 /// Generates a default name for a new zone, according to the number of zones already displayed in
11 /// Generates a default name for a new zone, according to the number of zones already displayed in
@@ -78,6 +80,9 void VisualizationTabWidget::accept(IVisualizationWidgetVisitor *visitor)
78
80
79 visitor->visitLeave(this);
81 visitor->visitLeave(this);
80 }
82 }
83 else {
84 qCCritical(LOG_VisualizationTabWidget()) << tr("Can't visit widget : the visitor is null");
85 }
81 }
86 }
82
87
83 bool VisualizationTabWidget::canDrop(const Variable &variable) const
88 bool VisualizationTabWidget::canDrop(const Variable &variable) const
@@ -97,6 +97,9 void VisualizationWidget::accept(IVisualizationWidgetVisitor *visitor)
97
97
98 visitor->visitLeave(this);
98 visitor->visitLeave(this);
99 }
99 }
100 else {
101 qCCritical(LOG_VisualizationWidget()) << tr("Can't visit widget : the visitor is null");
102 }
100 }
103 }
101
104
102 bool VisualizationWidget::canDrop(const Variable &variable) const
105 bool VisualizationWidget::canDrop(const Variable &variable) const
@@ -4,6 +4,8
4
4
5 #include "Visualization/VisualizationGraphWidget.h"
5 #include "Visualization/VisualizationGraphWidget.h"
6
6
7 Q_LOGGING_CATEGORY(LOG_VisualizationZoneWidget, "VisualizationZoneWidget")
8
7 namespace {
9 namespace {
8
10
9 /// Generates a default name for a new graph, according to the number of graphs already displayed in
11 /// Generates a default name for a new graph, according to the number of graphs already displayed in
@@ -73,6 +75,9 void VisualizationZoneWidget::accept(IVisualizationWidgetVisitor *visitor)
73
75
74 visitor->visitLeave(this);
76 visitor->visitLeave(this);
75 }
77 }
78 else {
79 qCCritical(LOG_VisualizationZoneWidget()) << tr("Can't visit widget : the visitor is null");
80 }
76 }
81 }
77
82
78 bool VisualizationZoneWidget::canDrop(const Variable &variable) const
83 bool VisualizationZoneWidget::canDrop(const Variable &variable) const
General Comments 0
You need to be logged in to leave comments. Login now