Skip to content

Commit

Permalink
spelling
Browse files Browse the repository at this point in the history
style fixups
  • Loading branch information
eteran committed Mar 23, 2024
1 parent 4735c18 commit fd5ac05
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 29 deletions.
1 change: 1 addition & 0 deletions include/BinaryString.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private Q_SLOTS:
private:
void setEntriesMaxLength(int n);

private:
::Ui::BinaryStringWidget *ui = nullptr;
Mode mode_ = Mode::MemoryEditing;
int requestedMaxLength_ = 0;
Expand Down
1 change: 1 addition & 0 deletions include/ByteShiftArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "API.h"
#include <QVector>
#include <cstddef>
#include <cstdint>

class EDB_EXPORT ByteShiftArray {
public:
Expand Down
2 changes: 1 addition & 1 deletion plugins/BinarySearcher/DialogBinaryString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void DialogBinaryString::doFind() {
for (const std::shared_ptr<IRegion> &region : regions) {
const size_t region_size = region->size();

// a short circut for speading things up
// a short circuit for speeding things up
if (ui.chkSkipNoAccess->isChecked() && !region->accessible()) {
ui.progressBar->setValue(util::percentage(++i, regions.size()));
continue;
Expand Down
14 changes: 7 additions & 7 deletions plugins/ODbgRegisterView/FpuValueField.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ class FpuValueField final : public ValueField {
Q_OBJECT

private:
int showAsRawActionIndex;
int showAsFloatActionIndex;
int showAsRawActionIndex_;
int showAsFloatActionIndex_;

FieldWidget *commentWidget;
int row;
int column;
FieldWidget *commentWidget_;
int row_;
int column_;

QPersistentModelIndex tagValueIndex;
QPersistentModelIndex tagValueIndex_;

bool groupDigits = false;
bool groupDigits_ = false;

public:
// Will add itself and commentWidget to the group and renew their positions as needed
Expand Down
34 changes: 17 additions & 17 deletions plugins/ODbgRegisterView/arch/x86-generic/x86FPUValueField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ FpuValueField::FpuValueField(int fieldWidth, const QModelIndex &regValueIndex, c
if (str.length() != 20) {
return str;
}
if (groupDigits) {
if (groupDigits_) {
return str.left(4) + " " + str.mid(4, 8) + " " + str.right(8);
}
return str;
},
group),
commentWidget(commentWidget),
row(row),
column(column),
tagValueIndex(tagValueIndex) {
commentWidget_(commentWidget),
row_(row),
column_(column),
tagValueIndex_(tagValueIndex) {

Q_ASSERT(group);
Q_ASSERT(commentWidget);
showAsRawActionIndex = menuItems_.size();
showAsRawActionIndex_ = menuItems_.size();
menuItems_.push_back(new_action(tr("View FPU as raw values"), this, [this](bool) {
showFPUAsRaw();
}));

showAsFloatActionIndex = menuItems_.size();
showAsFloatActionIndex_ = menuItems_.size();
menuItems_.push_back(new_action(tr("View FPU as floats"), this, [this](bool) {
showFPUAsFloat();
}));
Expand Down Expand Up @@ -76,16 +76,16 @@ void FpuValueField::displayFormatChanged() {

switch (format) {
case NumberDisplayMode::Hex:
menuItems_[showAsRawActionIndex]->setVisible(false);
menuItems_[showAsFloatActionIndex]->setVisible(true);
menuItems_[showAsRawActionIndex_]->setVisible(false);
menuItems_[showAsFloatActionIndex_]->setVisible(true);
break;
case NumberDisplayMode::Float:
menuItems_[showAsRawActionIndex]->setVisible(true);
menuItems_[showAsFloatActionIndex]->setVisible(false);
menuItems_[showAsRawActionIndex_]->setVisible(true);
menuItems_[showAsFloatActionIndex_]->setVisible(false);
break;
default:
menuItems_[showAsRawActionIndex]->setVisible(true);
menuItems_[showAsFloatActionIndex]->setVisible(true);
menuItems_[showAsRawActionIndex_]->setVisible(true);
menuItems_[showAsFloatActionIndex_]->setVisible(true);
break;
}

Expand All @@ -95,19 +95,19 @@ void FpuValueField::displayFormatChanged() {
Q_ASSERT(fieldWidth_ > 0);

if (format == NumberDisplayMode::Hex) {
groupDigits = true;
groupDigits_ = true;
fieldWidth_ += 2; // add some room for spaces between groups
} else {
groupDigits = false;
groupDigits_ = false;
}

const auto charWidth = letter_size(font()).width();
setFixedWidth(charWidth * fieldWidth_ + margins.left() + margins.right());
commentWidget->move(x() + maximumWidth(), commentWidget->y());
commentWidget_->move(x() + maximumWidth(), commentWidget_->y());
}

void FpuValueField::updatePalette() {
if (!changed() && tagValueIndex.data().toUInt() == FpuTagEmpty) {
if (!changed() && tagValueIndex_.data().toUInt() == FpuTagEmpty) {
auto palette = group()->palette();
palette.setColor(foregroundRole(), palette.color(QPalette::Disabled, QPalette::Text));
setPalette(palette);
Expand Down
2 changes: 1 addition & 1 deletion plugins/ROPTool/DialogROPTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void DialogROPTool::addGadget(DialogResults *results, const InstructionList &ins
auto it = instructions.begin();
auto inst1 = *it++;

QString instruction_string = QStringLiteral("%1").arg(QString::fromStdString(edb::v1::formatter().toString(*inst1)));
auto instruction_string = QString::fromStdString(edb::v1::formatter().toString(*inst1));
for (; it != instructions.end(); ++it) {
auto inst = *it;
instruction_string.append(QStringLiteral("; %1").arg(QString::fromStdString(edb::v1::formatter().toString(*inst))));
Expand Down
2 changes: 1 addition & 1 deletion src/arch/x86-generic/ArchProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ void analyze_operands(const State &state, const edb::Instruction &inst, QStringL

if (operand) {

QString temp_operand = QString::fromStdString(edb::v1::formatter().toString(operand));
auto temp_operand = QString::fromStdString(edb::v1::formatter().toString(operand));

if (is_immediate(operand)) {
#if 0
Expand Down
2 changes: 1 addition & 1 deletion src/capstone-edb/Instruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ void Formatter::checkCapitalize(std::string &str, bool canContainHex) const {
if (options_.capitalization == UpperCase) {
std::transform(str.begin(), str.end(), str.begin(), ::toupper);
if (canContainHex) {
QString qstr = QString::fromStdString(str);
auto qstr = QString::fromStdString(str);

static const QRegularExpression re("\\b0X([0-9A-F]+)\\b");
qstr.replace(re, "0x\\1");
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/QDisassemblyView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ void QDisassemblyView::scrollTo(edb::address_t address) {
// Desc:
//------------------------------------------------------------------------------
QString QDisassemblyView::instructionString(const edb::Instruction &inst) const {
QString opcode = QString::fromStdString(edb::v1::formatter().toString(inst));
auto opcode = QString::fromStdString(edb::v1::formatter().toString(inst));

if (is_call(inst) || is_jump(inst)) {
if (inst.operandCount() == 1) {
Expand Down

0 comments on commit fd5ac05

Please sign in to comment.