From 9160679b0452f22e6278b52e476ef8eaaab27c2e Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 14 May 2024 13:48:15 +0200 Subject: [PATCH] Lua: Add better error output to fetch() Change-Id: Ic9092ff52130ac3cfc620ead9a1c69f112a864ac Reviewed-by: David Schulz --- src/plugins/lua/bindings/fetch.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/bindings/fetch.cpp b/src/plugins/lua/bindings/fetch.cpp index 0790ed8e29b..00115a26d4c 100644 --- a/src/plugins/lua/bindings/fetch.cpp +++ b/src/plugins/lua/bindings/fetch.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -91,8 +92,11 @@ void addFetchModule() reply->deleteLater(); if (reply->error() != QNetworkReply::NoError) { - callback( - QString("%1 (%2)").arg(reply->errorString()).arg(reply->error())); + callback(QString("%1 (%2)") + .arg(reply->errorString()) + .arg(QString::fromLatin1( + QMetaEnum::fromType() + .valueToKey(reply->error())))); return; }