mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 19:36:11 +00:00
Added natural registers sorting in RegistersWidget (#1591)
This commit is contained in:
parent
6c76c85c97
commit
adf28e4362
@ -4,6 +4,7 @@
|
||||
|
||||
#include "core/MainWindow.h"
|
||||
|
||||
#include <QCollator>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
|
||||
@ -45,6 +46,11 @@ void RegistersWidget::setRegisterGrid()
|
||||
QJsonObject registerValues = Core()->getRegisterValues().object();
|
||||
QJsonObject registerRefs = Core()->getRegisterJson();
|
||||
QStringList registerNames = registerValues.keys();
|
||||
|
||||
QCollator collator;
|
||||
collator.setNumericMode(true);
|
||||
std::sort(registerNames.begin(), registerNames.end(), collator);
|
||||
|
||||
registerLen = registerValues.size();
|
||||
for (const QString &key : registerNames) {
|
||||
regValue = RAddressString(registerValues[key].toVariant().toULongLong());
|
||||
|
Loading…
Reference in New Issue
Block a user