Polish Classes Widget

This commit is contained in:
Florian Märkl 2019-02-01 17:00:09 +01:00
parent c54f7df3cb
commit 2f0fd91137
2 changed files with 8 additions and 2 deletions

View File

@ -2048,7 +2048,7 @@ QList<AnalVTableDescription> CutterCore::getAnalClassVTables(const QString &cls)
{
QList<AnalVTableDescription> ret;
RVector *vtables = r_anal_class_base_get_all(core_->anal, cls.toUtf8().constData());
RVector *vtables = r_anal_class_vtable_get_all(core_->anal, cls.toUtf8().constData());
if (!vtables) {
return ret;
}

View File

@ -471,6 +471,8 @@ ClassesWidget::ClassesWidget(MainWindow *main, QAction *action) :
{
ui->setupUi(this);
ui->classesTreeView->setIconSize(QSize(10, 10));
proxy_model = new ClassesSortFilterProxyModel(this);
ui->classesTreeView->setModel(nullptr);
ui->classesTreeView->sortByColumn(ClassesModel::TYPE, Qt::AscendingOrder);
@ -537,7 +539,11 @@ void ClassesWidget::on_classesTreeView_doubleClicked(const QModelIndex &index)
if (!index.isValid())
return;
RVA offset = index.data(ClassesModel::OffsetRole).value<RVA>();
QVariant offsetData = index.data(ClassesModel::OffsetRole);
if(!offsetData.isValid()) {
return;
}
RVA offset = offsetData.value<RVA>();
Core()->seek(offset);
}