mirror of https://github.com/mgba-emu/mgba.git
Qt: Add CRC32 column to library view
This commit is contained in:
parent
54b889df8c
commit
243c2b330f
|
@ -75,6 +75,12 @@ LibraryModel::LibraryModel(const QString& path, QObject* parent)
|
|||
return QString::fromUtf8(e.base);
|
||||
}
|
||||
};
|
||||
s_columns["crc32"] = {
|
||||
tr("CRC32"),
|
||||
[](const mLibraryEntry& e) -> QString {
|
||||
return QString("%0").arg(e.crc32, 8, 16, QChar('0'));
|
||||
}
|
||||
};
|
||||
}
|
||||
if (!path.isNull()) {
|
||||
if (s_handles.contains(path)) {
|
||||
|
@ -93,6 +99,7 @@ LibraryModel::LibraryModel(const QString& path, QObject* parent)
|
|||
m_columns.append(s_columns["location"]);
|
||||
m_columns.append(s_columns["platform"]);
|
||||
m_columns.append(s_columns["size"]);
|
||||
m_columns.append(s_columns["crc32"]);
|
||||
|
||||
connect(m_library->loader, SIGNAL(directoryLoaded(const QString&)), this, SLOT(directoryLoaded(const QString&)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue