diff options
| author | Glenn Smith <glenn@vector35.com> | 2023-01-27 18:53:27 -0500 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2023-01-27 18:55:02 -0500 |
| commit | cf4220570c2d1b7105fb29719383f64026d46837 (patch) | |
| tree | 044786645f5310c5877cbe2a274d898aa6c9fddc | |
| parent | 6ffbe30facc49f9c993951260068f1f9d490517e (diff) | |
Add virtual non-inline functions for interface classes
This fixes a cases where trying to dynamic_cast to one of these interfaces fails for types defined in libraries, since the linker just copies the full definition into the library because it can, and then breaks the inheritance tree.
| -rw-r--r-- | ui/metadatachoicedialog.h | 2 | ||||
| -rw-r--r-- | ui/preview.h | 2 | ||||
| -rw-r--r-- | ui/uicontext.h | 2 | ||||
| -rw-r--r-- | ui/viewframe.h | 2 | ||||
| -rw-r--r-- | ui/xreflist.h | 4 |
5 files changed, 8 insertions, 4 deletions
diff --git a/ui/metadatachoicedialog.h b/ui/metadatachoicedialog.h index e2d07a14..64a2032e 100644 --- a/ui/metadatachoicedialog.h +++ b/ui/metadatachoicedialog.h @@ -29,6 +29,7 @@ struct EntryItem { */ class ManagedTableDelegate { public: + virtual ~ManagedTableDelegate(); // model virtual size_t ManagedTableColumnCount() = 0; virtual size_t ManagedTableRowCount() = 0; @@ -115,6 +116,7 @@ enum MetadataMode { class EntryItemMetadataViewDelegate { public: + virtual ~EntryItemMetadataViewDelegate(); virtual MetadataMode GetCurrentMode() = 0; virtual std::vector<BinaryNinja::DisassemblyTextLine> LinesForEntryItem(EntryItem& item) = 0; virtual QString PlaintextForEntryItem(EntryItem& item) = 0; diff --git a/ui/preview.h b/ui/preview.h index 84f40d79..9d89f1f8 100644 --- a/ui/preview.h +++ b/ui/preview.h @@ -17,7 +17,7 @@ class BINARYNINJAUIAPI PreviewScrollHandler { public: - virtual ~PreviewScrollHandler() {} + virtual ~PreviewScrollHandler(); virtual void sendWheelEvent(QWheelEvent* event) = 0; }; diff --git a/ui/uicontext.h b/ui/uicontext.h index 352a62dd..f68ea0a9 100644 --- a/ui/uicontext.h +++ b/ui/uicontext.h @@ -39,6 +39,8 @@ struct SelectionInfoForXref; class BINARYNINJAUIAPI UIContextNotification { public: + virtual ~UIContextNotification(); + /*! Callback after a UIContext is opened (eg MainWindow) \param context Opened context diff --git a/ui/viewframe.h b/ui/viewframe.h index 19987cee..9803548c 100644 --- a/ui/viewframe.h +++ b/ui/viewframe.h @@ -339,7 +339,7 @@ class BINARYNINJAUIAPI ViewLocation class BINARYNINJAUIAPI ViewContainer { public: - virtual ~ViewContainer() {} + virtual ~ViewContainer(); virtual View* getView() = 0; }; diff --git a/ui/xreflist.h b/ui/xreflist.h index 112573ee..9d9b5983 100644 --- a/ui/xreflist.h +++ b/ui/xreflist.h @@ -119,7 +119,7 @@ class XrefHeader : public XrefItem public: XrefHeader(); XrefHeader(const QString& name, XrefItem::XrefType type, XrefHeader* parent, FunctionRef func); - virtual ~XrefHeader() {} + virtual ~XrefHeader(); virtual QString name() const { return m_name; } XrefItem::XrefType type() const { return m_type; } @@ -468,7 +468,7 @@ class BINARYNINJAUIAPI CrossReferenceContainer public: CrossReferenceContainer(CrossReferenceWidget* parent, ViewFrame* view, BinaryViewRef data); - virtual ~CrossReferenceContainer() {} + virtual ~CrossReferenceContainer(); virtual QModelIndex translateIndex(const QModelIndex& idx) const = 0; virtual bool getReference(const QModelIndex& idx, XrefItem** refPtr) const = 0; virtual QModelIndex nextIndex() = 0; |
