aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/packet_list_record.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-07-13 14:51:56 -0700
committerAnders Broman <a.broman58@gmail.com>2016-07-14 07:10:15 +0000
commit0d73ae3161e55fec631336e9efc4a0602bb095a6 (patch)
treed10192cd2cee5be623a87ee04934e4ec2c0e6ebd /ui/qt/packet_list_record.h
parented27ad491dda85c96d3cbe78c54eff7adf67548f (diff)
Qt: Allocate packet list records using wmem.
Add PacketListRecord::operator new, which uses wmem_alloc. Roughly matches the GTK+ UI behavior. Add ColumnTextList which also uses wmem_alloc. Lazily allocate our column text. Change-Id: I86a63cd8ace7764eaab1561bf71b4358af72fe03 Reviewed-on: https://code.wireshark.org/review/16418 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/packet_list_record.h')
-rw-r--r--ui/qt/packet_list_record.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/qt/packet_list_record.h b/ui/qt/packet_list_record.h
index 7c23c43ea8..80d9cf7efa 100644
--- a/ui/qt/packet_list_record.h
+++ b/ui/qt/packet_list_record.h
@@ -38,10 +38,17 @@
struct conversation;
struct _GStringChunk;
+class ColumnTextList;
+
class PacketListRecord
{
public:
PacketListRecord(frame_data *frameData);
+
+ // Allocate our records using wmem.
+ static void *operator new(size_t size);
+ static void operator delete(void *) {}
+
// Return the string value for a column. Data is cached if possible.
const QByteArray columnString(capture_file *cap_file, int column, bool colorized = false);
frame_data *frameData() const { return fdata_; }
@@ -60,7 +67,7 @@ public:
private:
/** The column text for some columns */
- QList<const char *> col_text_;
+ ColumnTextList *col_text_;
frame_data *fdata_;
int lines_;