LEFT | RIGHT |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 { | 67 { |
68 } | 68 } |
69 | 69 |
70 Notification::Notification(JsValue&& jsValue) | 70 Notification::Notification(JsValue&& jsValue) |
71 : JsValue(std::move(jsValue)) | 71 : JsValue(std::move(jsValue)) |
72 { | 72 { |
73 } | 73 } |
74 | 74 |
75 Notification& Notification::operator=(const Notification& src) | 75 Notification& Notification::operator=(const Notification& src) |
76 { | 76 { |
77 *this = src; | 77 static_cast<JsValue&>(*this) = src; |
| 78 return *this; |
| 79 } |
| 80 |
| 81 Notification& Notification::operator=(Notification&& src) |
| 82 { |
| 83 static_cast<JsValue&>(*this) = std::move(src); |
78 return *this; | 84 return *this; |
79 } | 85 } |
80 | 86 |
81 NotificationType Notification::GetType() const | 87 NotificationType Notification::GetType() const |
82 { | 88 { |
83 return StringToNotificationType(GetProperty("type").AsString()); | 89 return StringToNotificationType(GetProperty("type").AsString()); |
84 } | 90 } |
85 | 91 |
86 NotificationTexts Notification::GetTexts() const | 92 NotificationTexts Notification::GetTexts() const |
87 { | 93 { |
(...skipping 25 matching lines...) Expand all Loading... |
113 { | 119 { |
114 retValue.push_back(link.AsString()); | 120 retValue.push_back(link.AsString()); |
115 } | 121 } |
116 return retValue; | 122 return retValue; |
117 } | 123 } |
118 | 124 |
119 void Notification::MarkAsShown() | 125 void Notification::MarkAsShown() |
120 { | 126 { |
121 jsEngine->Evaluate("API.markNotificationAsShown").Call(GetProperty("id")); | 127 jsEngine->Evaluate("API.markNotificationAsShown").Call(GetProperty("id")); |
122 } | 128 } |
LEFT | RIGHT |