aboutsummaryrefslogtreecommitdiff
path: root/tests/notifications-mock.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/notifications-mock.h')
-rw-r--r--tests/notifications-mock.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/notifications-mock.h b/tests/notifications-mock.h
index 190aa0d..49b2e66 100644
--- a/tests/notifications-mock.h
+++ b/tests/notifications-mock.h
@@ -1,5 +1,6 @@
/*
* Copyright 2015 Canonical Ltd.
+ * Copyright 2021 Robert Tari
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,7 +31,7 @@ class NotificationsMock
DbusTestDbusMockObject * baseobj = nullptr;
public:
- NotificationsMock (std::vector<std::string> capabilities = {"actions", "body", "body-markup", "icon-static", "image/svg+xml", "x-canonical-private-synchronous", "x-canonical-append", "x-canonical-private-icon-only", "x-canonical-truncation", "private-synchronous", "append", "private-icon-only", "truncation"}) {
+ NotificationsMock (const std::vector<std::string>& capabilities = {"actions", "body", "body-markup", "icon-static", "image/svg+xml", "x-canonical-private-synchronous", "x-canonical-append", "x-canonical-private-icon-only", "x-canonical-truncation", "private-synchronous", "append", "private-icon-only", "truncation"}) {
mock = dbus_test_dbus_mock_new("org.freedesktop.Notifications");
dbus_test_task_set_bus(DBUS_TEST_TASK(mock), DBUS_TEST_SERVICE_BUS_SESSION);
dbus_test_task_set_name(DBUS_TEST_TASK(mock), "Notify");
@@ -64,7 +65,7 @@ class NotificationsMock
std::string vector2py (std::vector<std::string> vect) {
std::string retval("[ ");
- std::for_each(vect.begin(), vect.end() - 1, [&retval](std::string entry) {
+ std::for_each(vect.begin(), vect.end() - 1, [&retval](const std::string& entry) {
retval += "'";
retval += entry;
retval += "', ";