Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Oct 22, 2017
1 parent 4e005e3 commit f0b87e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
10 changes: 5 additions & 5 deletions doomsday/apps/client/src/ui/widgets/packageswidget.cpp
Expand Up @@ -51,11 +51,11 @@

using namespace de;

static String const VAR_TITLE ("title");
static String const VAR_TAGS ("tags");
static String const TAG_HIDDEN("hidden");
static String const TAG_LOADED("loaded");
static String const TAG_CACHED("cached");
static String const VAR_TITLE ("title");
static String const VAR_TAGS ("tags");
static String const TAG_HIDDEN ("hidden");
static String const TAG_LOADED ("loaded");
static String const TAG_CACHED ("cached");

static TimeDelta const REFILTER_DELAY(0.2);

Expand Down
20 changes: 7 additions & 13 deletions doomsday/sdk/libcore/src/filesys/remotefeedrelay.cpp
Expand Up @@ -47,7 +47,6 @@ DENG2_PIMPL(RemoteFeedRelay)
String path;
FileListRequest fileList;
FileContentsRequest fileContents;
//Block receivedData;
duint64 receivedBytes = 0;
duint64 fileSize = 0;

Expand Down Expand Up @@ -125,7 +124,6 @@ DENG2_PIMPL(RemoteFeedRelay)
}
else
{
//qDebug() << "[RemoteFeedRelay] Query" << query.id << "is deferred";
deferredQueries.append(query);
}
}
Expand Down Expand Up @@ -169,25 +167,24 @@ DENG2_PIMPL(RemoteFeedRelay)
if (found != pendingQueries.end())
{
auto &query = found.value();

// Get rid of cancelled queries.
if (!query.isValid())
{
pendingQueries.erase(found);
return;
}
/*if (query.receivedData.size() != fileSize)
{
query.receivedData.resize(fileSize);
}*/

// Before the first chunk, notify about the total size.
if (!query.fileSize)
{
// Before the first chunk, notify about the total size.
query.fileContents->call(0, Block(), fileSize);
}
//query.receivedData.set(startOffset, chunk.data(), chunk.size());

query.fileSize = fileSize;
query.receivedBytes += chunk.size();

// Notify about progress.
// Notify about progress and provide the data chunk to the requestor.
query.fileContents->call(startOffset, chunk, fileSize - query.receivedBytes);

if (fileSize == query.receivedBytes)
Expand Down Expand Up @@ -244,8 +241,6 @@ DENG2_PIMPL(RemoteFeedRelay)
{
DENG2_ASSERT(query.isValid());

//qDebug() << "transmitting query" << query.id << query.path;

RemoteFeedQueryPacket packet;
packet.setId(query.id);
packet.setPath(query.path);
Expand Down Expand Up @@ -300,8 +295,7 @@ DENG2_PIMPL(RemoteFeedRelay)
};

RemoteFeedProtocol protocol;
QHash<String, RepositoryLink *> repositories; // owned
QHash<QHostAddress, RepositoryLink *> repositoriesByHost; // not owned
QHash<String, RepositoryLink *> repositories; // owned

Impl(Public *i) : Base(i)
{}
Expand Down

0 comments on commit f0b87e2

Please sign in to comment.