diff --git a/lib/network/include/qx/network/qx-downloadmanagerreport.h b/lib/network/include/qx/network/qx-downloadmanagerreport.h index 5c7e5172..a2d175de 100644 --- a/lib/network/include/qx/network/qx-downloadmanagerreport.h +++ b/lib/network/include/qx/network/qx-downloadmanagerreport.h @@ -59,6 +59,7 @@ friend AsyncDownloadManager; QString outcomeString() const; QString specificDetails() const; QString generalDetails() const; + QString details() const; bool wasSuccessful() const; QList taskReports() const; diff --git a/lib/network/src/qx-downloadmanagerreport.cpp b/lib/network/src/qx-downloadmanagerreport.cpp index 0a683cbf..a90ba845 100644 --- a/lib/network/src/qx-downloadmanagerreport.cpp +++ b/lib/network/src/qx-downloadmanagerreport.cpp @@ -60,20 +60,7 @@ QString DownloadManagerReport::derivePrimary() const QString DownloadManagerReport::deriveSecondary() const { return mDetailsHeading; }; -QString DownloadManagerReport::deriveDetails() const -{ - if(mDetailsSpecific.isEmpty() && mDetailsGeneral.isEmpty()) - return QString(); - - QString details; - details.reserve(mDetailsSpecific.size() && mDetailsGeneral.size() + 2); - details.append(mDetailsGeneral); - if(!details.isEmpty()) - details.append(u"\n\n"_s); // +2 - details.append(mDetailsSpecific); - - return details; -} +QString DownloadManagerReport::deriveDetails() const { return details(); } //Public: /*! @@ -96,6 +83,24 @@ QString DownloadManagerReport::specificDetails() const { return mDetailsSpecific */ QString DownloadManagerReport::generalDetails() const { return mDetailsGeneral; } +/*! + * Returns all extended error information, if present. + */ +QString DownloadManagerReport::details() const +{ + if(mDetailsSpecific.isEmpty() && mDetailsGeneral.isEmpty()) + return QString(); + + QString details; + details.reserve(mDetailsSpecific.size() && mDetailsGeneral.size() + 2); + details.append(mDetailsGeneral); + if(!details.isEmpty()) + details.append(u"\n\n"_s); // +2 + details.append(mDetailsSpecific); + + return details; +} + /*! * Returns @c true if the download manager that generated this report processed its queue successfully; * otherwise returns @c false.