Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Modules/Tabs/CodeEditor/codeeditortab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ CodeEditorTab::CodeEditorTab(QWidget* parent)
connect(m_replaceButton, &QPushButton::clicked, this, &CodeEditorTab::replaceCurrent);
connect(m_replaceAllButton, &QPushButton::clicked, this, &CodeEditorTab::replaceAll);
connect(m_searchCloseButton, &QPushButton::clicked, this, &CodeEditorTab::closeSearchBar);
connect(m_matchCaseCheckBox, &QCheckBox::stateChanged, this, [this](int) {
connect(m_matchCaseCheckBox, &QCheckBox::checkStateChanged, this, [this](Qt::CheckState) {
updateSearchUi();
});

Expand Down
2 changes: 1 addition & 1 deletion src/Modules/Tabs/Disassembler/disassemblertab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ void DisassemblerTab::setFunctionsList(const QVector<DisasmFunction> &funcs)

for (const auto &f : sorted) {
auto *it = new QListWidgetItem(QString("%1 %2").arg(f.address, f.name), m_funcList);
it->setData(Qt::UserRole, f.address);
it->setData(Qt::UserRole, f.address);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/IDEWindow/idewindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ IDEWindow::IDEWindow(const QString &ProjectPath, QWidget *parent)

// - - Menu Bar - -
auto const menu = menuBar();
MenuBarBuilder const *menuBarBuilder = new MenuBarBuilder(menu, this);
MenuBarBuilder menuBarBuilder(menu, this);
menu->setNativeMenuBar(false);

// - - Widgets - -
Expand Down
5 changes: 4 additions & 1 deletion src/core/file/FileDataBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ void FileDataBuffer::loadData(const QByteArray& data)
resetOverlayLocked();
m_undoStack.clear();
m_redoStack.clear();
m_originalHash = qHash(data, 0);
QCryptographicHash hash(QCryptographicHash::Sha256);
hash.addData(data);
m_originalHash = 0;
memcpy(&m_originalHash, hash.result().constData(), qMin(static_cast<qsizetype>(sizeof(m_originalHash)), hash.result().size()));
locker.unlock();
emit dataChanged();
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/modules/ModuleManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ModuleManager {
static ModuleManager& instance();

template<typename T>
void registerModule(std::function<QString()> name, const QString &group, std::function<T*()> creator, int position = 0) const {
void registerModule(std::function<QString()> name, const QString &group, std::function<T*()> creator, int position = 0) {
ModuleDescription<T> desc{
std::move(creator),
std::move(name),
Expand Down
7 changes: 5 additions & 2 deletions src/widgets/filetreepanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ void FileTreePanel::open() {
}

void FileTreePanel::remove() const {
const QString body = tr("Are you sure you want to delete the file \"%1\"?").arg(m_fileModel->fileName(getSourceIndex()));
const QModelIndex srcIdx = getSourceIndex();
if (!srcIdx.isValid()) return;

const QString body = tr("Are you sure you want to delete the file \"%1\"?").arg(m_fileModel->fileName(srcIdx));

QMessageBox confirmRemove(QMessageBox::Question, tr("Delete"), body, QMessageBox::NoButton);
[[maybe_unused]] const auto yes = confirmRemove.addButton(tr("Yes"), QMessageBox::YesRole);
Expand All @@ -121,7 +124,7 @@ void FileTreePanel::remove() const {
const auto reply = confirmRemove.clickedButton();
if (reply == no) return;

m_fileModel->remove(getSourceIndex());
m_fileModel->remove(srcIdx);
}

QModelIndex FileTreePanel::getSourceIndex() const{
Expand Down
Loading