| 15 | |
| 16 | |
| 17 | GenericExportsModel::GenericExportsModel(QWidget* parent, BinaryViewRef data): QAbstractItemModel(parent), BinaryDataNotification(FunctionUpdates | SymbolUpdates) |
| 18 | { |
| 19 | m_sortOrder = Qt::AscendingOrder; |
| 20 | m_data = data; |
| 21 | m_hasOrdinals = false; |
| 22 | if (data->GetTypeName() == "PE") |
| 23 | { |
| 24 | m_hasOrdinals = true; |
| 25 | } |
| 26 | |
| 27 | m_updateTimer = new QTimer(this); |
| 28 | m_updateTimer->setSingleShot(true); |
| 29 | m_updateTimer->setInterval(500); |
| 30 | connect(m_updateTimer, &QTimer::timeout, this, &GenericExportsModel::updateModel); |
| 31 | connect(this, &GenericExportsModel::modelUpdate, this, [=]() { |
| 32 | if (m_updateTimer->isActive()) |
| 33 | return; |
| 34 | m_updateTimer->start(); |
| 35 | }); |
| 36 | |
| 37 | m_data->RegisterNotification(this); |
| 38 | |
| 39 | updateModel(); |
| 40 | m_entries = m_allEntries; |
| 41 | } |
| 42 | |
| 43 | |
| 44 | GenericExportsModel::~GenericExportsModel() |
nothing calls this directly
no test coverage detected