mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 22:05:25 +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 "core/MainWindow.h"
|
||||||
|
|
||||||
|
#include <QCollator>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
|
|
||||||
@ -45,6 +46,11 @@ void RegistersWidget::setRegisterGrid()
|
|||||||
QJsonObject registerValues = Core()->getRegisterValues().object();
|
QJsonObject registerValues = Core()->getRegisterValues().object();
|
||||||
QJsonObject registerRefs = Core()->getRegisterJson();
|
QJsonObject registerRefs = Core()->getRegisterJson();
|
||||||
QStringList registerNames = registerValues.keys();
|
QStringList registerNames = registerValues.keys();
|
||||||
|
|
||||||
|
QCollator collator;
|
||||||
|
collator.setNumericMode(true);
|
||||||
|
std::sort(registerNames.begin(), registerNames.end(), collator);
|
||||||
|
|
||||||
registerLen = registerValues.size();
|
registerLen = registerValues.size();
|
||||||
for (const QString &key : registerNames) {
|
for (const QString &key : registerNames) {
|
||||||
regValue = RAddressString(registerValues[key].toVariant().toULongLong());
|
regValue = RAddressString(registerValues[key].toVariant().toULongLong());
|
||||||
|
Loading…
Reference in New Issue
Block a user