Skip to content

Commit

Permalink
Add some code tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
uglide committed Oct 5, 2022
1 parent adf48e1 commit 3147597
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/app/models/key-models/bfkey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@ void BloomFilterKeyModel::loadRows(QVariant, unsigned long,
return callback(err, 0);
};

auto responseHandler = [this, callback](RedisClient::Response r, Callback) {
auto responseHandler = [this, callback](const RedisClient::Response& r, Callback) {
m_rowsCache.clear();
auto value = r.value().toList();

QVariantMap row;

for (QVariantList::const_iterator item = value.cbegin(); item != value.cend();
++item) {
for (auto item = value.cbegin(); item != value.cend(); ++item) {
auto key = item->toByteArray();
++item;

Expand Down
10 changes: 8 additions & 2 deletions src/app/models/key-models/bfkey.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ class BloomFilterKeyModel : public KeyModel<QVariant> {
QVariant getData(int rowIndex, int dataRole) override;

void addRow(const QVariantMap&, Callback c) override;

virtual void updateRow(int, const QVariantMap&,
Callback) override {}
Callback) override {
// NOTE(u_glide): BF/CF is read-only
}
void loadRows(QVariant, unsigned long, LoadRowsCallback callback) override;
void removeRow(int, Callback) override {}

void removeRow(int, Callback) override {
// NOTE(u_glide): BF/CF is read-only
}

virtual unsigned long rowsCount() override { return m_rowCount; }

Expand Down

0 comments on commit 3147597

Please sign in to comment.