From a20a508bc4ffb659344bb2a0d7c5ff6021c8c980 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Tue, 25 Jan 2022 00:19:21 -0500 Subject: Move file lock status widget into main window to avoid use after free when moving tabs between windows --- ui/uicontext.h | 2 ++ ui/viewframe.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/uicontext.h b/ui/uicontext.h index 8dce4b38..cb9a5391 100644 --- a/ui/uicontext.h +++ b/ui/uicontext.h @@ -322,6 +322,8 @@ public: */ QString GetNameForPath(const QString& path); + virtual QWidget* fileContentsLockStatusWidget() = 0; + static void setHandler(UIContextHandler* handler); static QSize getScaledWindowSize(int x, int y); diff --git a/ui/viewframe.h b/ui/viewframe.h index 29d0c823..713dee56 100644 --- a/ui/viewframe.h +++ b/ui/viewframe.h @@ -322,7 +322,6 @@ private: FileContext* m_context; bool m_fileContentsLock = true; // file contents protection from accidental modification in the UI - ClickableStateLabel* m_fileContentsLockStatus; BinaryViewRef m_data; QWidget* m_view = nullptr; QWidget* m_viewContainer; @@ -358,7 +357,6 @@ public: FileContext* getFileContext() const { return m_context; } bool areFileContentsLocked(bool showToolTip = false); void setFileContentsLocked(bool enable); - QWidget* getFileContentsLockStatus(); DockHandler* getDockHandler(); -- cgit v1.3.1