summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio/HackStudioWidget.h
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-05-01 13:04:19 +0300
committerAndreas Kling <kling@serenityos.org>2021-05-02 22:49:25 +0200
commit7f2e1991cc91582a8cddf0092ca0fba375ce2035 (patch)
treebc33b4e9fd1486931660d400d6105f32421b848b /Userland/DevTools/HackStudio/HackStudioWidget.h
parent790908ffc3a77dc140b301ee1765b614a94a65d3 (diff)
downloadserenity-7f2e1991cc91582a8cddf0092ca0fba375ce2035.zip
HackStudio: Get rid of m_currently_open_file member
It had the following FIXME: // FIXME: This doesn't seem compatible with multiple split editors In practice this member was used to get the filename of the currently active edtior. So we now get it directly from the currently active EditorWrapper.
Diffstat (limited to 'Userland/DevTools/HackStudio/HackStudioWidget.h')
-rw-r--r--Userland/DevTools/HackStudio/HackStudioWidget.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.h b/Userland/DevTools/HackStudio/HackStudioWidget.h
index 312d138bf3..5d386712fa 100644
--- a/Userland/DevTools/HackStudio/HackStudioWidget.h
+++ b/Userland/DevTools/HackStudio/HackStudioWidget.h
@@ -41,7 +41,7 @@ public:
EditorWrapper& current_editor_wrapper();
void set_current_editor_wrapper(RefPtr<EditorWrapper>);
- String currently_open_file() const { return m_currently_open_file; }
+ const String& active_file() const { return m_current_editor_wrapper->filename(); }
void initialize_menubar(GUI::Menubar&);
Locator& locator()
@@ -116,9 +116,6 @@ private:
NonnullRefPtrVector<EditorWrapper> m_all_editor_wrappers;
RefPtr<EditorWrapper> m_current_editor_wrapper;
- // FIXME: This doesn't seem compatible with multiple split editors
- String m_currently_open_file;
-
HashMap<String, NonnullRefPtr<ProjectFile>> m_open_files;
HashMap<String, NonnullRefPtr<Core::FileWatcher>> m_file_watchers;
Vector<String> m_open_files_vector; // NOTE: This contains the keys from m_open_files and m_file_watchers