summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2026-05-14 07:51:48 -0400
committerBrian Potchik <brian@vector35.com>2026-05-14 07:51:48 -0400
commit759f0eb73239dd747cd0b8eab55af01fa21837a4 (patch)
tree1cef76f74e7415bc43c5e50208f0ca884e288849 /ui
parent92a7b85b7a0868f62db224f8b213027d3658f912 (diff)
Refine FileMetadata display name APIs and update UI consumers.
Diffstat (limited to 'ui')
-rw-r--r--ui/filecontext.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/filecontext.h b/ui/filecontext.h
index 6a8c1d51..47581b53 100644
--- a/ui/filecontext.h
+++ b/ui/filecontext.h
@@ -65,7 +65,13 @@ class BINARYNINJAUIAPI FileContext : public FileContextBase, public BinaryNinja:
FileMetadataRef getMetadata() const { return m_file; }
QString getFilename() const { return m_filename; }
void setFilename(QString newName) { m_filename = newName; }
- QString getDisplayName() const;
+
+ // Returns the virtual path if the FileMetadata has one (transform session set it), otherwise
+ // the physical filename. Use this anywhere you need a stable per-file identity.
+ // Empty virtual_path carries real meaning ("this FileMetadata has not been processed by the
+ // transform system"), so callers must not collapse that state at the core layer; this helper
+ // is the intended fallback at the use site.
+ static QString getVirtualPathOrFilename(FileMetadataRef file);
ViewFrame* getCurrentViewFrame() const { return m_currentViewFrame; }
QString getTabName(QWidget* widget);
QString getShortFileName(QWidget* widget);