Commit b41a5ff3 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Pass results from visitors as const reference

parent 43c77c64
...@@ -135,7 +135,7 @@ EventDataVisitor::~EventDataVisitor() ...@@ -135,7 +135,7 @@ EventDataVisitor::~EventDataVisitor()
} }
QMultiHash<QDate, CalendarEvents::EventData> EventDataVisitor::results() const const QMultiHash<QDate, CalendarEvents::EventData> &EventDataVisitor::results() const
{ {
return mResults; return mResults;
} }
...@@ -204,7 +204,7 @@ EventDataIdVisitor::EventDataIdVisitor(Akonadi::ETMCalendar *calendar, const QDa ...@@ -204,7 +204,7 @@ EventDataIdVisitor::EventDataIdVisitor(Akonadi::ETMCalendar *calendar, const QDa
{ {
} }
QStringList EventDataIdVisitor::results() const const QStringList &EventDataIdVisitor::results() const
{ {
return mResults; return mResults;
} }
......
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
EventDataVisitor(Akonadi::ETMCalendar *calendar, const QDate &start, const QDate &end); EventDataVisitor(Akonadi::ETMCalendar *calendar, const QDate &start, const QDate &end);
~EventDataVisitor(); ~EventDataVisitor();
QMultiHash<QDate, CalendarEvents::EventData> results() const; const QMultiHash<QDate, CalendarEvents::EventData> &results() const;
protected: protected:
bool visit(const KCalCore::Event::Ptr &event) Q_DECL_OVERRIDE; bool visit(const KCalCore::Event::Ptr &event) Q_DECL_OVERRIDE;
...@@ -79,7 +79,7 @@ class EventDataIdVisitor : public BaseEventDataVisitor ...@@ -79,7 +79,7 @@ class EventDataIdVisitor : public BaseEventDataVisitor
public: public:
explicit EventDataIdVisitor(Akonadi::ETMCalendar *calendar, const QDate &start, const QDate &end); explicit EventDataIdVisitor(Akonadi::ETMCalendar *calendar, const QDate &start, const QDate &end);
QStringList results() const; const QStringList &results() const;
protected: protected:
bool visit(const KCalCore::Event::Ptr &event) Q_DECL_OVERRIDE; bool visit(const KCalCore::Event::Ptr &event) Q_DECL_OVERRIDE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment