diff options
author | Evan Huus <eapache@gmail.com> | 2012-10-13 01:37:48 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2012-10-13 01:37:48 +0000 |
commit | 93f4ea8838ee93f830785d5a3ff8f9a638106bb8 (patch) | |
tree | 06e02ac0e7f058f0d119fe79f12ff41251775c5b | |
parent | d11b00d760bd483b3ef1011b20478845694be21a (diff) |
Always initiailize member variables in constructors, even if it's just to NULL.
Use C++'s initializer syntax more.
svn path=/trunk/; revision=45519
-rw-r--r-- | ui/qt/packet_list_record.cpp | 4 | ||||
-rw-r--r-- | ui/qt/progress_bar.cpp | 2 | ||||
-rw-r--r-- | ui/qt/recent_file_status.cpp | 3 |
3 files changed, 4 insertions, 5 deletions
diff --git a/ui/qt/packet_list_record.cpp b/ui/qt/packet_list_record.cpp index 4ee0c78f78..15905104fa 100644 --- a/ui/qt/packet_list_record.cpp +++ b/ui/qt/packet_list_record.cpp @@ -23,9 +23,9 @@ #include "packet_list_record.h" -PacketListRecord::PacketListRecord(frame_data *frameData) +PacketListRecord::PacketListRecord(frame_data *frameData) : + col_text(NULL), col_text_len(NULL), fdata(frameData) { - fdata = frameData; } QVariant PacketListRecord::data(int col_num, column_info *cinfo) const diff --git a/ui/qt/progress_bar.cpp b/ui/qt/progress_bar.cpp index 666a2ce252..bccfbc9434 100644 --- a/ui/qt/progress_bar.cpp +++ b/ui/qt/progress_bar.cpp @@ -111,7 +111,7 @@ destroy_progress_dlg(progdlg_t *dlg) // XXX - We need to show the task and item titles. Maybe as a tooltip or popped // into our sibling status message? ProgressBar::ProgressBar(QWidget *parent) : - QProgressBar(parent) + QProgressBar(parent), m_terminate_is_stop(false), m_stop_flag(NULL) { m_dlg.progressBar = this; m_dlg.topLevelWindow = window(); diff --git a/ui/qt/recent_file_status.cpp b/ui/qt/recent_file_status.cpp index 205c49c7c0..0da8c23340 100644 --- a/ui/qt/recent_file_status.cpp +++ b/ui/qt/recent_file_status.cpp @@ -28,9 +28,8 @@ // Sigh. The Qt 4 documentation says we should subclass QThread here. Other sources // insist that we should subclass QObject, then move it to a newly created QThread. RecentFileStatus::RecentFileStatus(const QString &filename, QObject *parent) : - QObject(parent) + QObject(parent), m_filename(filename), m_size(0) { - m_filename = filename; } void RecentFileStatus::start(void) { |