From 759f0eb73239dd747cd0b8eab55af01fa21837a4 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Thu, 14 May 2026 07:51:48 -0400 Subject: Refine FileMetadata display name APIs and update UI consumers. --- ui/filecontext.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ui') 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); -- cgit v1.3.1