diff options
| author | Mark Rowe <mark@vector35.com> | 2025-07-15 20:15:19 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2025-07-16 15:09:24 -0700 |
| commit | e3b8be66fd04e7ef6430ed4cf677a6ef73e19cc5 (patch) | |
| tree | e2ef31016206cc76797fd420461440661abadca3 /ui | |
| parent | 26eebf712fb54c3fa41778410547a0992702f2cf (diff) | |
Miscellaneous leak fixes in UI code
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/qfileaccessor.h | 5 | ||||
| -rw-r--r-- | ui/sidebarwidget.h | 2 | ||||
| -rw-r--r-- | ui/tabwidget.h | 1 | ||||
| -rw-r--r-- | ui/variablelist.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/ui/qfileaccessor.h b/ui/qfileaccessor.h index 0211fa1b..014eba52 100644 --- a/ui/qfileaccessor.h +++ b/ui/qfileaccessor.h @@ -1,8 +1,7 @@ #pragma once #include <QtCore/QFile> -#include "binaryninjaapi.h" -#include "action.h" +#include "uitypes.h" /*! @@ -15,7 +14,7 @@ */ class BINARYNINJAUIAPI QFileAccessor : public BinaryNinja::FileAccessor { - QFile* m_file; + std::optional<QFile> m_file; QString m_error; public: diff --git a/ui/sidebarwidget.h b/ui/sidebarwidget.h index 44b6ea8c..2ec0bb57 100644 --- a/ui/sidebarwidget.h +++ b/ui/sidebarwidget.h @@ -51,7 +51,7 @@ protected: public: SidebarWidget(const QString& title); - ~SidebarWidget() { closing(); } + ~SidebarWidget(); const QString& title() const { return m_title; } void enableRefreshTimer(int interval); diff --git a/ui/tabwidget.h b/ui/tabwidget.h index a7da05cd..14dc80ec 100644 --- a/ui/tabwidget.h +++ b/ui/tabwidget.h @@ -32,6 +32,7 @@ class BINARYNINJAUIAPI DockableTabCollection : public QObject std::set<DockableTabWidget*> m_containers; public: + DockableTabCollection(QObject* parent = nullptr) : QObject(parent) {} void registerContainer(DockableTabWidget* widget); void unregisterContainer(DockableTabWidget* widget); diff --git a/ui/variablelist.h b/ui/variablelist.h index 374a0fe4..0d419cea 100644 --- a/ui/variablelist.h +++ b/ui/variablelist.h @@ -169,7 +169,7 @@ class VariableListItemDelegate : public QStyledItemDelegate Q_OBJECT public: - VariableListItemDelegate(); + VariableListItemDelegate(QObject* parent = nullptr) : QStyledItemDelegate(parent) {}; void paint(QPainter* painter, const QStyleOptionViewItem& opt, const QModelIndex& index) const; QSize sizeHint(const QStyleOptionViewItem& opt, const QModelIndex& index) const; |
