all repos — mgba @ 243c2b330f87388a9645801de5828bed00761165

mGBA Game Boy Advance Emulator

Qt: Add CRC32 column to library view
Vicki Pfau vi@endrift.com
Fri, 27 Jan 2017 11:50:09 -0800
commit

243c2b330f87388a9645801de5828bed00761165

parent

54b889df8cb9ad6dc2d764e884e3b38e30804c83

1 files changed, 7 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/LibraryModel.cppsrc/platform/qt/LibraryModel.cpp

@@ -75,6 +75,12 @@ [](const mLibraryEntry& e) -> QString {

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 @@ m_columns.append(s_columns["name"]);

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&))); }