refactor: split out setting api headers for downloads
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
af6bf11793
commit
9c10965997
38 changed files with 303 additions and 68 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "Application.h"
|
||||
|
||||
#include "net/NetJob.h"
|
||||
#include "net/ApiDownload.h"
|
||||
|
||||
enum FormatProperties { ImageData = QTextFormat::UserProperty + 1 };
|
||||
|
||||
|
@ -97,7 +98,7 @@ void VariableSizedImageObject::loadImage(QTextDocument* doc, const QUrl& source,
|
|||
QString("images/%1").arg(QString(QCryptographicHash::hash(source.toEncoded(), QCryptographicHash::Algorithm::Sha1).toHex())));
|
||||
|
||||
auto job = new NetJob(QString("Load Image: %1").arg(source.fileName()), APPLICATION->network());
|
||||
job->addNetAction(Net::Download::makeCached(source, entry));
|
||||
job->addNetAction(Net::ApiDownload::makeCached(source, entry));
|
||||
|
||||
auto full_entry_path = entry->getFullPath();
|
||||
auto source_url = source;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue