aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/proto_tree.cpp
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2012-10-11 12:31:39 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2012-10-11 12:31:39 +0000
commit85b7bec830cb713671c05c65b0864fc39a52d981 (patch)
tree37f2e479b705ef04a48f7718254bf533619463aa /ui/qt/proto_tree.cpp
parentd88e1202a58046700441d50041a71681e65e6467 (diff)
Fix crash when use pcapng with comments (with QtShark)
ERROR:proto_tree.cpp:125:void proto_tree_draw_node(proto_node*, gpointer): code should not be reached (Missing color information for PI_COMMENT) svn path=/trunk/; revision=45468
Diffstat (limited to 'ui/qt/proto_tree.cpp')
-rw-r--r--ui/qt/proto_tree.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/qt/proto_tree.cpp b/ui/qt/proto_tree.cpp
index 09157d96c3..8dcdf59685 100644
--- a/ui/qt/proto_tree.cpp
+++ b/ui/qt/proto_tree.cpp
@@ -35,6 +35,7 @@
#include <QDesktopServices>
#include <QUrl>
+QColor expert_color_comment ( 0x00, 0xff, 0x00 ); /* Green */
QColor expert_color_chat ( 0x80, 0xb7, 0xf7 ); /* light blue */
QColor expert_color_note ( 0xa0, 0xff, 0xff ); /* bright turquoise */
QColor expert_color_warn ( 0xf7, 0xf2, 0x53 ); /* yellow */
@@ -109,6 +110,9 @@ proto_tree_draw_node(proto_node *node, gpointer data)
// XXX - Add routines to get our severity colors.
if(FI_GET_FLAG(fi, PI_SEVERITY_MASK)) {
switch(FI_GET_FLAG(fi, PI_SEVERITY_MASK)) {
+ case(PI_COMMENT):
+ item->setData(0, Qt::BackgroundRole, expert_color_comment);
+ break;
case(PI_CHAT):
item->setData(0, Qt::BackgroundRole, expert_color_chat);
break;