Changeset View
Changeset View
Standalone View
Standalone View
libdiscover/appstream/OdrsReviewsBackend.cpp
Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Line(s) | 185 | { | |||
---|---|---|---|---|---|
190 | } else { | 190 | } else { | ||
191 | qCWarning(LIBDISCOVER_LOG) << "Failed to submit usefulness: " << reply->errorString(); | 191 | qCWarning(LIBDISCOVER_LOG) << "Failed to submit usefulness: " << reply->errorString(); | ||
192 | } | 192 | } | ||
193 | reply->deleteLater(); | 193 | reply->deleteLater(); | ||
194 | } | 194 | } | ||
195 | 195 | | |||
196 | QString OdrsReviewsBackend::userName() const | 196 | QString OdrsReviewsBackend::userName() const | ||
197 | { | 197 | { | ||
198 | return i18n("%1 (%2)", KUser().property(KUser::FullName).toString(), KUser().loginName()); | 198 | return KUser().property(KUser::FullName).toString(); | ||
199 | } | 199 | } | ||
200 | 200 | | |||
201 | void OdrsReviewsBackend::submitReview(AbstractResource *res, const QString &summary, const QString &description, const QString &rating) | 201 | void OdrsReviewsBackend::submitReview(AbstractResource *res, const QString &summary, const QString &description, const QString &rating) | ||
202 | { | 202 | { | ||
203 | QJsonObject map = {{QStringLiteral("app_id"), res->appstreamId()}, | 203 | QJsonObject map = {{QStringLiteral("app_id"), res->appstreamId()}, | ||
204 | {QStringLiteral("user_skey"), res->getMetadata(QStringLiteral("ODRS::user_skey")).toString()}, | 204 | {QStringLiteral("user_skey"), res->getMetadata(QStringLiteral("ODRS::user_skey")).toString()}, | ||
205 | {QStringLiteral("user_hash"), userHash()}, | 205 | {QStringLiteral("user_hash"), userHash()}, | ||
206 | {QStringLiteral("version"), res->isInstalled() ? res->installedVersion() : res->availableVersion()}, | 206 | {QStringLiteral("version"), res->isInstalled() ? res->installedVersion() : res->availableVersion()}, | ||
▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines |