Showing the changes to interface/src/scripting/AccountServicesScriptingInterface.cpp (1 of 63 files). Show all
Unified · Split
| @@ -136,7 +136,7 @@ ScriptValue DownloadInfoResultToScriptValue(ScriptEngine* engine, const Download · 135 unmodified lines | |||
| 136 | return object; | 136 | return object; |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | void DownloadInfoResultFromScriptValue(const ScriptValue& object, DownloadInfoResult& result) { | 139 | bool DownloadInfoResultFromScriptValue(const ScriptValue& object, DownloadInfoResult& result) { |
| 140 | QList<QVariant> downloading = object.property("downloading").toVariant().toList(); | 140 | QList<QVariant> downloading = object.property("downloading").toVariant().toList(); |
| 141 | result.downloading.clear(); | 141 | result.downloading.clear(); |
| 142 | for (int i = 0; i < downloading.count(); i += 1) { | 142 | for (int i = 0; i < downloading.count(); i += 1) { |
| @@ -144,6 +144,7 @@ void DownloadInfoResultFromScriptValue(const ScriptValue& object, DownloadInfoRe · 1 unmodified line | |||
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | result.pending = object.property("pending").toVariant().toFloat(); | 146 | result.pending = object.property("pending").toVariant().toFloat(); |
| 147 | return true; | ||
| 147 | } | 148 | } |
| 148 | 149 | ||
| 149 | DownloadInfoResult AccountServicesScriptingInterface::getDownloadInfo() { | 150 | DownloadInfoResult AccountServicesScriptingInterface::getDownloadInfo() { |