From 73e73f46eaff4f2236b31ed5858738c6b5e26ea3 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Thu, 6 Apr 2017 19:56:33 +0300 Subject: Use const refs for the deserialized data --- src/HistoryView.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/HistoryView.cc') diff --git a/src/HistoryView.cc b/src/HistoryView.cc index 0949d17c..3775db9a 100644 --- a/src/HistoryView.cc +++ b/src/HistoryView.cc @@ -50,7 +50,7 @@ const QList HistoryView::COLORS({"#FFF46E", "#a2b636", "#4BBE2E"}); -HistoryView::HistoryView(QList events, QWidget *parent) +HistoryView::HistoryView(const QList &events, QWidget *parent) : QWidget(parent) { init(); @@ -133,7 +133,7 @@ void HistoryView::init() SLOT(sliderRangeChanged(int, int))); } -void HistoryView::addHistoryItem(Event event, QString color, bool with_sender) +void HistoryView::addHistoryItem(const Event &event, const QString &color, bool with_sender) { // TODO: Probably create another function instead of passing the flag. HistoryViewItem *item = new HistoryViewItem(event, with_sender, color, scroll_widget_); -- cgit 1.5.1