mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Added strings info Fix #240
This commit is contained in:
parent
dd6b591d9d
commit
b15900be54
@ -1065,6 +1065,9 @@ QList<StringDescription> CutterCore::getAllStrings()
|
||||
StringDescription str;
|
||||
str.vaddr = bs->vaddr;
|
||||
str.string = bs->string;
|
||||
str.type = bs->type;
|
||||
str.length = bs->length;
|
||||
str.size = bs->size;
|
||||
ret << str;
|
||||
}
|
||||
}
|
||||
|
@ -117,6 +117,9 @@ struct StringDescription
|
||||
{
|
||||
RVA vaddr;
|
||||
QString string;
|
||||
char type;
|
||||
ut32 length;
|
||||
ut32 size;
|
||||
};
|
||||
|
||||
struct FlagspaceDescription
|
||||
|
@ -40,6 +40,12 @@ QVariant StringsModel::data(const QModelIndex &index, int role) const
|
||||
return RAddressString(str.vaddr);
|
||||
case STRING:
|
||||
return str.string;
|
||||
case TYPE:
|
||||
return str.type;
|
||||
case LENGTH:
|
||||
return str.length;
|
||||
case SIZE:
|
||||
return str.size;
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
@ -61,6 +67,12 @@ QVariant StringsModel::headerData(int section, Qt::Orientation, int role) const
|
||||
return tr("Address");
|
||||
case STRING:
|
||||
return tr("String");
|
||||
case TYPE:
|
||||
return tr("Type");
|
||||
case LENGTH:
|
||||
return tr("Length");
|
||||
case SIZE:
|
||||
return tr("Size");
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
@ -161,4 +173,9 @@ void StringsWidget::refreshStrings()
|
||||
|
||||
ui->stringsTreeView->resizeColumnToContents(0);
|
||||
ui->stringsTreeView->resizeColumnToContents(1);
|
||||
if (ui->stringsTreeView->columnWidth(1) > 300)
|
||||
ui->stringsTreeView->setColumnWidth(1, 300);
|
||||
ui->stringsTreeView->resizeColumnToContents(2);
|
||||
ui->stringsTreeView->resizeColumnToContents(3);
|
||||
ui->stringsTreeView->resizeColumnToContents(4);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ private:
|
||||
QList<StringDescription> *strings;
|
||||
|
||||
public:
|
||||
enum Columns { OFFSET = 0, STRING, COUNT };
|
||||
enum Columns { OFFSET = 0, STRING, TYPE, LENGTH, SIZE, COUNT };
|
||||
static const int StringDescriptionRole = Qt::UserRole;
|
||||
|
||||
StringsModel(QList<StringDescription> *strings, QObject *parent = 0);
|
||||
|
Loading…
Reference in New Issue
Block a user