Skip to content

Commit

Permalink
Build with Qt 5.6 and gcc 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
piggz committed Sep 19, 2022
1 parent 968f30a commit 59a5c55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions daemon/src/operations/adafruitblefsoperation.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "abstractoperation.h"
#include "abstractfirmwareinfo.h"
#include <future>

class AdafruitBleFsService;
class BleFsWorker;
Expand Down
14 changes: 7 additions & 7 deletions daemon/src/operations/adafruitblefsworker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace
{
size_t totalSize = 0;
for(const QJsonValue& resource : resourceList) {
auto sourceFile = resource["filename"].toString();
auto sourceFile = resource.toObject().value("filename").toString();// resource["filename"].toString();
auto* resourceEntry = dynamic_cast<const KZipFileEntry*>(root->entry(sourceFile));
totalSize += resourceEntry->size();
}
Expand Down Expand Up @@ -107,10 +107,10 @@ void BleFsWorker::updateFiles(AdafruitBleFsOperation* service, int transferMtu)
// Remove obsolete files
for(const QJsonValue& file : obsoleteFileList)
{
if(file["path"].isUndefined() || !file["path"].isString())
if(file.toObject().value("path").isUndefined() || !file.toObject().value("path").isString())
continue;

auto path = file["path"];
auto path = file.toObject().value("path");
eraseRemoteFile(service, path.toString());
}

Expand All @@ -121,14 +121,14 @@ void BleFsWorker::updateFiles(AdafruitBleFsOperation* service, int transferMtu)
int progressSize = 0;
for(const QJsonValue& resource : resourceList)
{
if(resource["filename"].isUndefined() || !resource["filename"].isString())
if(resource.toObject().value("filename").isUndefined() || !resource.toObject().value("filename").isString())
continue;

if(resource["path"].isUndefined() || !resource["path"].isString())
if(resource.toObject().value("path").isUndefined() || !resource.toObject().value("path").isString())
continue;

auto sourceFile = resource["filename"].toString();
auto destinationFile = resource["path"].toString();
auto sourceFile = resource.toObject().value("filename").toString();
auto destinationFile = resource.toObject().value("path").toString();

// Remove the destination file if it already exists on the target
QStringList folderList = destinationFile.split('/');
Expand Down

0 comments on commit 59a5c55

Please sign in to comment.