Qt: Add CRC32 column to library view
Vicki Pfau vi@endrift.com
Fri, 27 Jan 2017 11:50:09 -0800
1 files changed,
7 insertions(+),
0 deletions(-)
jump to
M
src/platform/qt/LibraryModel.cpp
→
src/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&))); }