Changeset View
Changeset View
Standalone View
Standalone View
libdiscover/backends/FwupdBackend/FwupdBackend.cpp
Show First 20 Lines • Show All 341 Lines • ▼ Show 20 Line(s) | 283 | // qDebug() << "Fwupd Info:" << fwupd_remote_get_id(remote) << "is only" << age << "seconds old, so ignoring refresh! "; | |||
---|---|---|---|---|---|
342 | { | 342 | { | ||
343 | backend->handleError(error); | 343 | backend->handleError(error); | ||
344 | } | 344 | } | ||
345 | } | 345 | } | ||
346 | 346 | | |||
347 | void FwupdBackend::handleError(GError *perror) | 347 | void FwupdBackend::handleError(GError *perror) | ||
348 | { | 348 | { | ||
349 | //TODO: localise the error message | 349 | //TODO: localise the error message | ||
350 | if (!g_error_matches(perror, FWUPD_ERROR, FWUPD_ERROR_INVALID_FILE) && !g_error_matches(perror, FWUPD_ERROR, FWUPD_ERROR_NOTHING_TO_DO)) { | 350 | if (perror && !g_error_matches(perror, FWUPD_ERROR, FWUPD_ERROR_INVALID_FILE) && !g_error_matches(perror, FWUPD_ERROR, FWUPD_ERROR_NOTHING_TO_DO)) { | ||
351 | const QString msg = QString::fromUtf8(perror->message); | 351 | const QString msg = QString::fromUtf8(perror->message); | ||
352 | QTimer::singleShot(0, this, [this, msg](){ | 352 | QTimer::singleShot(0, this, [this, msg](){ | ||
353 | Q_EMIT passiveMessage(msg); | 353 | Q_EMIT passiveMessage(msg); | ||
354 | }); | 354 | }); | ||
355 | qWarning() << "Fwupd Error" << perror->code << perror->message; | 355 | qWarning() << "Fwupd Error" << perror->code << perror->message; | ||
356 | } | 356 | } | ||
357 | // else | 357 | // else | ||
358 | // qDebug() << "Fwupd skipped" << perror->code << perror->message; | 358 | // qDebug() << "Fwupd skipped" << perror->code << perror->message; | ||
▲ Show 20 Lines • Show All 210 Lines • Show Last 20 Lines |