forked from blue/squawk
cleanup some warnings suppression
This commit is contained in:
parent
5fbb03fc46
commit
23ec80ccba
26 changed files with 630 additions and 924 deletions
|
@ -16,6 +16,8 @@
|
|||
|
||||
#include "keys.h"
|
||||
|
||||
#include "shared/defines.h"
|
||||
|
||||
const QHash<int, QByteArray> Models::Keys::roles = {
|
||||
{Label, "label"},
|
||||
{FingerPrint, "fingerPrint"},
|
||||
|
@ -28,13 +30,11 @@ Models::Keys::Keys(QObject* parent):
|
|||
modified() {}
|
||||
|
||||
Models::Keys::~Keys() {
|
||||
for (Shared::KeyInfo* key : keys) {
|
||||
for (Shared::KeyInfo* key : keys)
|
||||
delete key;
|
||||
}
|
||||
|
||||
for (std::pair<const int, Shared::KeyInfo*>& pair: modified) {
|
||||
for (std::pair<const int, Shared::KeyInfo*>& pair: modified)
|
||||
delete pair.second;
|
||||
}
|
||||
}
|
||||
|
||||
std::deque<Shared::KeyInfo> Models::Keys::modifiedKeys() const {
|
||||
|
@ -92,15 +92,15 @@ QVariant Models::Keys::data(const QModelIndex& index, int role) const {
|
|||
}
|
||||
|
||||
int Models::Keys::rowCount(const QModelIndex& parent) const {
|
||||
SHARED_UNUSED(parent);
|
||||
return keys.size();
|
||||
}
|
||||
|
||||
QHash<int, QByteArray> Models::Keys::roleNames() const {return roles;}
|
||||
|
||||
QModelIndex Models::Keys::index(int row, int column, const QModelIndex& parent) const {
|
||||
if (!hasIndex(row, column, parent)) {
|
||||
if (!hasIndex(row, column, parent))
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
return createIndex(row, column, keys[row]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue