Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
eteran committed Mar 25, 2024
1 parent 3aefc63 commit 18bab30
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 14 deletions.
9 changes: 4 additions & 5 deletions plugins/Bookmarks/BookmarkWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "BookmarkWidget.h"
#include "BookmarksModel.h"
#include "Expression.h"
#include "edb.h"
#include "IBreakpoint.h"
#include "edb.h"
#include <QInputDialog>
#include <QMenu>
#include <QMessageBox>
Expand Down Expand Up @@ -146,14 +146,14 @@ void BookmarkWidget::toggleBreakpoint() {
* @brief BookmarkWidget::addConditionalBreakpoint
*/
void BookmarkWidget::addConditionalBreakpoint() {

const QItemSelectionModel *const selModel = ui.tableView->selectionModel();
const QModelIndexList selections = selModel->selectedRows();

if (selections.size() == 1) {
bool ok;
const QString condition = QInputDialog::getText(this, tr("Set Breakpoint Condition"), tr("Expression:"), QLineEdit::Normal, QString(), &ok);
auto item = static_cast<BookmarksModel::Bookmark *>(selections[0].internalPointer());
auto item = static_cast<BookmarksModel::Bookmark *>(selections[0].internalPointer());

if (ok) {
if (std::shared_ptr<IBreakpoint> bp = edb::v1::create_breakpoint(item->address)) {
Expand All @@ -165,7 +165,6 @@ void BookmarkWidget::addConditionalBreakpoint() {
}
}


/**
* @brief BookmarkWidget::addAddress
* @param address
Expand Down Expand Up @@ -230,7 +229,7 @@ void BookmarkWidget::on_tableView_customContextMenuRequested(const QPoint &pos)
QAction *const actionType = menu.addAction(tr("Set &Type"));
menu.addAction(toggleBreakpointAction_);
menu.addAction(conditionalBreakpointAction_);
QAction *const chosen = menu.exec(ui.tableView->mapToGlobal(pos));
QAction *const chosen = menu.exec(ui.tableView->mapToGlobal(pos));

if (chosen == actionAdd) {
buttonAddClicked();
Expand Down
4 changes: 2 additions & 2 deletions plugins/Bookmarks/BookmarksModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ QVariant BookmarksModel::data(const QModelIndex &index, int role) const {
// Return the address with symbol name, if there is one
const QString symname = edb::v1::find_function_symbol(bookmark.address);
const QString address = edb::v1::format_pointer(bookmark.address);

if (!symname.isEmpty()) {
return tr("%1 <%2>").arg(address, symname);
}
Expand Down Expand Up @@ -107,7 +107,7 @@ QVariant BookmarksModel::data(const QModelIndex &index, int role) const {
// TODO: This is mostly copied from QDisassemblyView::drawSidebarElements, and both
// should really be factored out into a common location (although this uses icons
// and the other uses SVG renderers and painting).
const bool is_eip = (bookmark.address == edb::v1::instruction_pointer_address());
const bool is_eip = (bookmark.address == edb::v1::instruction_pointer_address());
const bool has_breakpoint = (edb::v1::find_breakpoint(bookmark.address) != nullptr);

const QIcon *icon = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion plugins/Bookmarks/BookmarksModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#include "Types.h"
#include <QAbstractItemModel>
#include <QVector>
#include <QIcon>
#include <QVector>

namespace BookmarksPlugin {

Expand Down
2 changes: 1 addition & 1 deletion plugins/DebuggerCore/unix/Unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ Status Unix::execute_process(const QString &path, const QString &cwd, const QLis

p = argv_pointers;
while (*p) {
delete[] * p++;
delete[] *p++;
}
delete[] argv_pointers;
}
Expand Down
1 change: 0 additions & 1 deletion plugins/FasLoader/Fas/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/


#include "Core.hpp"
#include "Exception.hpp"
#include <QtDebug>
Expand Down
1 change: 0 additions & 1 deletion plugins/FasLoader/Fas/Core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/


#ifndef FAS_CORE_H_
#define FAS_CORE_H_

Expand Down
1 change: 0 additions & 1 deletion plugins/FasLoader/Fas/Header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/


#ifndef FAS_HEADER_H_
#define FAS_HEADER_H_

Expand Down
1 change: 0 additions & 1 deletion plugins/FasLoader/Fas/PluginSymbol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/


#ifndef FAS_PLUGIN_SYMBOL_H_
#define FAS_PLUGIN_SYMBOL_H_

Expand Down
1 change: 0 additions & 1 deletion plugins/FasLoader/Fas/Symbol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/


#ifndef FAS_SYMBOL_H_
#define FAS_SYMBOL_H_

Expand Down

0 comments on commit 18bab30

Please sign in to comment.