diff --git a/DevTools/HackStudio/CodeDocument.cpp b/DevTools/HackStudio/CodeDocument.cpp index 797aba5da7..dbe8a22dac 100644 --- a/DevTools/HackStudio/CodeDocument.cpp +++ b/DevTools/HackStudio/CodeDocument.cpp @@ -23,12 +23,16 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "CodeDocument.h" +namespace HackStudio { + NonnullRefPtr CodeDocument::create(Client* client) { return adopt(*new CodeDocument(client)); } + CodeDocument::CodeDocument(Client* client) : TextDocument(client) { @@ -37,3 +41,5 @@ CodeDocument::CodeDocument(Client* client) CodeDocument::~CodeDocument() { } + +} diff --git a/DevTools/HackStudio/CodeDocument.h b/DevTools/HackStudio/CodeDocument.h index ca95efb53a..307f08718e 100644 --- a/DevTools/HackStudio/CodeDocument.h +++ b/DevTools/HackStudio/CodeDocument.h @@ -28,6 +28,8 @@ #include +namespace HackStudio { + class CodeDocument final : public GUI::TextDocument { public: virtual ~CodeDocument() override; @@ -47,3 +49,5 @@ private: Vector m_breakpoint_lines; Optional m_execution_position; }; + +} diff --git a/DevTools/HackStudio/CursorTool.cpp b/DevTools/HackStudio/CursorTool.cpp index dd0e1516c8..15845ebfd3 100644 --- a/DevTools/HackStudio/CursorTool.cpp +++ b/DevTools/HackStudio/CursorTool.cpp @@ -31,6 +31,8 @@ #include #include +namespace HackStudio { + void CursorTool::on_mousedown(GUI::MouseEvent& event) { dbg() << "CursorTool::on_mousedown"; @@ -186,3 +188,5 @@ void CursorTool::on_second_paint(GUI::Painter& painter, GUI::PaintEvent&) painter.fill_rect(rect, m_editor.palette().rubber_band_fill()); painter.draw_rect(rect, m_editor.palette().rubber_band_border()); } + +} diff --git a/DevTools/HackStudio/CursorTool.h b/DevTools/HackStudio/CursorTool.h index 9a603b0775..cf216e77c4 100644 --- a/DevTools/HackStudio/CursorTool.h +++ b/DevTools/HackStudio/CursorTool.h @@ -31,13 +31,15 @@ #include #include +namespace HackStudio { + class CursorTool final : public Tool { public: explicit CursorTool(FormEditorWidget& editor) : Tool(editor) { } - virtual ~CursorTool() override {} + virtual ~CursorTool() override { } private: virtual const char* class_name() const override { return "CursorTool"; } @@ -58,3 +60,5 @@ private: Gfx::IntPoint m_rubber_band_origin; Gfx::IntPoint m_rubber_band_position; }; + +} diff --git a/DevTools/HackStudio/Debugger/BacktraceModel.cpp b/DevTools/HackStudio/Debugger/BacktraceModel.cpp index f9cb3cdd68..281b621ffb 100644 --- a/DevTools/HackStudio/Debugger/BacktraceModel.cpp +++ b/DevTools/HackStudio/Debugger/BacktraceModel.cpp @@ -27,6 +27,8 @@ #include "BacktraceModel.h" #include "Debugger.h" +namespace HackStudio { + NonnullRefPtr BacktraceModel::create(const DebugSession& debug_session, const PtraceRegisters& regs) { return adopt(*new BacktraceModel(create_backtrace(debug_session, regs))); @@ -66,3 +68,5 @@ Vector BacktraceModel::create_backtrace(const DebugSe } while (current_ebp && current_instruction); return frames; } + +} diff --git a/DevTools/HackStudio/Debugger/BacktraceModel.h b/DevTools/HackStudio/Debugger/BacktraceModel.h index f81892b238..ff974b57d4 100644 --- a/DevTools/HackStudio/Debugger/BacktraceModel.h +++ b/DevTools/HackStudio/Debugger/BacktraceModel.h @@ -33,6 +33,8 @@ class DebugSession; +namespace HackStudio { + class BacktraceModel final : public GUI::Model { public: static NonnullRefPtr create(const DebugSession&, const PtraceRegisters& regs); @@ -47,7 +49,7 @@ public: virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override; - virtual void update() override {} + virtual void update() override { } virtual GUI::ModelIndex index(int row, int column, const GUI::ModelIndex&) const override; struct FrameInfo { @@ -68,3 +70,5 @@ private: Vector m_frames; }; + +} diff --git a/DevTools/HackStudio/Debugger/BreakpointCallback.h b/DevTools/HackStudio/Debugger/BreakpointCallback.h index d6cbce7afd..6131e492ec 100644 --- a/DevTools/HackStudio/Debugger/BreakpointCallback.h +++ b/DevTools/HackStudio/Debugger/BreakpointCallback.h @@ -30,9 +30,13 @@ #include #include +namespace HackStudio { + enum class BreakpointChange { Added, Removed, }; typedef Function BreakpointChangeCallback; + +} diff --git a/DevTools/HackStudio/Debugger/DebugInfoWidget.cpp b/DevTools/HackStudio/Debugger/DebugInfoWidget.cpp index 4e0b7a8fd0..5f7af07458 100644 --- a/DevTools/HackStudio/Debugger/DebugInfoWidget.cpp +++ b/DevTools/HackStudio/Debugger/DebugInfoWidget.cpp @@ -38,6 +38,8 @@ #include #include +namespace HackStudio { + DebugInfoWidget::DebugInfoWidget() { set_layout(); @@ -108,3 +110,5 @@ void DebugInfoWidget::program_stopped() { m_variables_view->set_model({}); } + +} diff --git a/DevTools/HackStudio/Debugger/DebugInfoWidget.h b/DevTools/HackStudio/Debugger/DebugInfoWidget.h index 410e1ab889..7cd38d5c94 100644 --- a/DevTools/HackStudio/Debugger/DebugInfoWidget.h +++ b/DevTools/HackStudio/Debugger/DebugInfoWidget.h @@ -27,16 +27,18 @@ #pragma once #include "Debugger.h" -#include "LibGUI/ListView.h" #include +#include #include #include #include +namespace HackStudio { + class DebugInfoWidget final : public GUI::Widget { C_OBJECT(DebugInfoWidget) public: - virtual ~DebugInfoWidget() override {} + virtual ~DebugInfoWidget() override { } void update_state(const DebugSession&, const PtraceRegisters&); void program_stopped(); @@ -48,3 +50,5 @@ private: RefPtr m_backtrace_view; RefPtr m_variable_context_menu; }; + +} diff --git a/DevTools/HackStudio/Debugger/Debugger.cpp b/DevTools/HackStudio/Debugger/Debugger.cpp index 2c3f319ec3..2d2de35d25 100644 --- a/DevTools/HackStudio/Debugger/Debugger.cpp +++ b/DevTools/HackStudio/Debugger/Debugger.cpp @@ -26,6 +26,8 @@ #include "Debugger.h" +namespace HackStudio { + static Debugger* s_the; Debugger& Debugger::the() @@ -183,8 +185,11 @@ void Debugger::DebuggingState::set_single_stepping(DebugInfo::SourcePosition ori m_state = State::SingleStepping; m_original_source_position = original_source_position; } + bool Debugger::DebuggingState::should_stop_single_stepping(const DebugInfo::SourcePosition& current_source_position) const { ASSERT(m_state == State::SingleStepping); return m_original_source_position.value() != current_source_position; } + +} diff --git a/DevTools/HackStudio/Debugger/Debugger.h b/DevTools/HackStudio/Debugger/Debugger.h index 6de8c03d97..1600e4ba31 100644 --- a/DevTools/HackStudio/Debugger/Debugger.h +++ b/DevTools/HackStudio/Debugger/Debugger.h @@ -33,6 +33,8 @@ #include #include +namespace HackStudio { + class Debugger { public: static Debugger& the(); @@ -110,3 +112,5 @@ private: ContinueType m_continue_type { ContinueType::Continue }; }; + +} diff --git a/DevTools/HackStudio/Debugger/VariablesModel.cpp b/DevTools/HackStudio/Debugger/VariablesModel.cpp index a6b265b37c..8bc964fa40 100644 --- a/DevTools/HackStudio/Debugger/VariablesModel.cpp +++ b/DevTools/HackStudio/Debugger/VariablesModel.cpp @@ -28,6 +28,8 @@ #include #include +namespace HackStudio { + GUI::ModelIndex VariablesModel::index(int row, int column, const GUI::ModelIndex& parent_index) const { if (!parent_index.is_valid()) @@ -184,3 +186,5 @@ RefPtr VariablesModel::create(const PtraceRegisters& regs) auto variables = Debugger::the().session()->debug_info().get_variables_in_current_scope(regs); return adopt(*new VariablesModel(move(variables), regs)); } + +} diff --git a/DevTools/HackStudio/Debugger/VariablesModel.h b/DevTools/HackStudio/Debugger/VariablesModel.h index 274e534a8d..bb0e3d5b2f 100644 --- a/DevTools/HackStudio/Debugger/VariablesModel.h +++ b/DevTools/HackStudio/Debugger/VariablesModel.h @@ -32,6 +32,8 @@ #include #include +namespace HackStudio { + class VariablesModel final : public GUI::Model { public: static RefPtr create(const PtraceRegisters& regs); @@ -57,3 +59,5 @@ private: GUI::Icon m_variable_icon; }; + +} diff --git a/DevTools/HackStudio/Editor.cpp b/DevTools/HackStudio/Editor.cpp index 168efaefac..2406738064 100644 --- a/DevTools/HackStudio/Editor.cpp +++ b/DevTools/HackStudio/Editor.cpp @@ -44,6 +44,8 @@ // #define EDITOR_DEBUG +namespace HackStudio { + Editor::Editor() { m_documentation_tooltip_window = GUI::Window::construct(); @@ -417,3 +419,5 @@ void Editor::set_document(GUI::TextDocument& doc) ASSERT(doc.is_code_document()); GUI::TextEditor::set_document(doc); } + +} diff --git a/DevTools/HackStudio/Editor.h b/DevTools/HackStudio/Editor.h index 47d9b5c977..dc7813e7a5 100644 --- a/DevTools/HackStudio/Editor.h +++ b/DevTools/HackStudio/Editor.h @@ -32,6 +32,8 @@ #include #include +namespace HackStudio { + class EditorWrapper; class Editor final : public GUI::TextEditor { @@ -86,3 +88,5 @@ private: bool m_hovering_link { false }; bool m_holding_ctrl { false }; }; + +} diff --git a/DevTools/HackStudio/EditorWrapper.cpp b/DevTools/HackStudio/EditorWrapper.cpp index dae1c2b49a..91786b65ef 100644 --- a/DevTools/HackStudio/EditorWrapper.cpp +++ b/DevTools/HackStudio/EditorWrapper.cpp @@ -33,6 +33,8 @@ #include #include +namespace HackStudio { + EditorWrapper::EditorWrapper(BreakpointChangeCallback breakpoint_change_callback) { set_layout(); @@ -82,3 +84,5 @@ void EditorWrapper::set_editor_has_focus(Badge, bool focus) { m_filename_label->set_font(focus ? Gfx::Font::default_bold_font() : Gfx::Font::default_font()); } + +} diff --git a/DevTools/HackStudio/EditorWrapper.h b/DevTools/HackStudio/EditorWrapper.h index cea322fab2..c286a4d139 100644 --- a/DevTools/HackStudio/EditorWrapper.h +++ b/DevTools/HackStudio/EditorWrapper.h @@ -32,6 +32,8 @@ #include #include +namespace HackStudio { + class Editor; class EditorWrapper : public GUI::Widget { @@ -55,6 +57,8 @@ private: RefPtr m_editor; }; -AK_BEGIN_TYPE_TRAITS(EditorWrapper) +} + +AK_BEGIN_TYPE_TRAITS(HackStudio::EditorWrapper) static bool is_type(const Core::Object& object) { return !strcmp(object.class_name(), "EditorWrapper"); } AK_END_TYPE_TRAITS() diff --git a/DevTools/HackStudio/FindInFilesWidget.cpp b/DevTools/HackStudio/FindInFilesWidget.cpp index e5538d391d..e00d1a6ca6 100644 --- a/DevTools/HackStudio/FindInFilesWidget.cpp +++ b/DevTools/HackStudio/FindInFilesWidget.cpp @@ -33,6 +33,8 @@ #include #include +namespace HackStudio { + struct Match { String filename; GUI::TextRange range; @@ -162,3 +164,5 @@ void FindInFilesWidget::focus_textbox_and_select_all() m_textbox->select_all(); m_textbox->set_focus(true); } + +} diff --git a/DevTools/HackStudio/FindInFilesWidget.h b/DevTools/HackStudio/FindInFilesWidget.h index 3996da169a..abe214d55a 100644 --- a/DevTools/HackStudio/FindInFilesWidget.h +++ b/DevTools/HackStudio/FindInFilesWidget.h @@ -28,10 +28,12 @@ #include +namespace HackStudio { + class FindInFilesWidget final : public GUI::Widget { C_OBJECT(FindInFilesWidget) public: - virtual ~FindInFilesWidget() override {} + virtual ~FindInFilesWidget() override { } void focus_textbox_and_select_all(); @@ -42,3 +44,5 @@ private: RefPtr m_button; RefPtr m_result_view; }; + +} diff --git a/DevTools/HackStudio/FormEditorWidget.cpp b/DevTools/HackStudio/FormEditorWidget.cpp index f8ee8e112b..efc0d494ec 100644 --- a/DevTools/HackStudio/FormEditorWidget.cpp +++ b/DevTools/HackStudio/FormEditorWidget.cpp @@ -30,6 +30,8 @@ #include "WidgetTreeModel.h" #include +namespace HackStudio { + FormEditorWidget::FormEditorWidget() : m_tool(make(*this)) { @@ -63,3 +65,5 @@ WidgetTreeModel& FormEditorWidget::model() { return *m_widget_tree_model; } + +} diff --git a/DevTools/HackStudio/FormEditorWidget.h b/DevTools/HackStudio/FormEditorWidget.h index acb4c4bd69..a913eed01e 100644 --- a/DevTools/HackStudio/FormEditorWidget.h +++ b/DevTools/HackStudio/FormEditorWidget.h @@ -29,6 +29,8 @@ #include #include +namespace HackStudio { + class FormWidget; class Tool; class WidgetTreeModel; @@ -112,7 +114,7 @@ public: } } - WidgetSelection() {} + WidgetSelection() { } private: HashTable m_widgets; @@ -131,3 +133,5 @@ private: NonnullOwnPtr m_tool; WidgetSelection m_selection; }; + +} diff --git a/DevTools/HackStudio/FormWidget.cpp b/DevTools/HackStudio/FormWidget.cpp index 3b60306c6a..d355d53324 100644 --- a/DevTools/HackStudio/FormWidget.cpp +++ b/DevTools/HackStudio/FormWidget.cpp @@ -29,6 +29,8 @@ #include "Tool.h" #include +namespace HackStudio { + FormWidget::FormWidget() { set_fill_with_background_color(true); @@ -99,3 +101,5 @@ void FormWidget::keydown_event(GUI::KeyEvent& event) { editor().tool().on_keydown(event); } + +} diff --git a/DevTools/HackStudio/FormWidget.h b/DevTools/HackStudio/FormWidget.h index 94ff45db80..5867330b15 100644 --- a/DevTools/HackStudio/FormWidget.h +++ b/DevTools/HackStudio/FormWidget.h @@ -29,6 +29,8 @@ #include #include +namespace HackStudio { + class CursorTool; class FormEditorWidget; @@ -57,3 +59,5 @@ private: int m_grid_size { 5 }; }; + +} diff --git a/DevTools/HackStudio/HackStudio.h b/DevTools/HackStudio/HackStudio.h index cc66517ae0..c66121ee7a 100644 --- a/DevTools/HackStudio/HackStudio.h +++ b/DevTools/HackStudio/HackStudio.h @@ -31,6 +31,8 @@ #include #include +namespace HackStudio { + GUI::TextEditor& current_editor(); void open_file(const String&); @@ -38,3 +40,5 @@ extern RefPtr g_current_editor_wrapper; extern Function g_open_file; extern OwnPtr g_project; extern String g_currently_open_file; + +} diff --git a/DevTools/HackStudio/Locator.cpp b/DevTools/HackStudio/Locator.cpp index 3647721d04..dd2c814452 100644 --- a/DevTools/HackStudio/Locator.cpp +++ b/DevTools/HackStudio/Locator.cpp @@ -32,6 +32,8 @@ #include #include +namespace HackStudio { + static RefPtr s_file_icon; static RefPtr s_cplusplus_icon; static RefPtr s_header_icon; @@ -187,3 +189,5 @@ void Locator::update_suggestions() dbg() << "Popup rect: " << m_popup_window->rect(); m_popup_window->show(); } + +} diff --git a/DevTools/HackStudio/Locator.h b/DevTools/HackStudio/Locator.h index ccd615e444..e52eb02447 100644 --- a/DevTools/HackStudio/Locator.h +++ b/DevTools/HackStudio/Locator.h @@ -28,6 +28,8 @@ #include +namespace HackStudio { + class Locator final : public GUI::Widget { C_OBJECT(Locator) public: @@ -46,3 +48,5 @@ private: RefPtr m_popup_window; RefPtr m_suggestion_view; }; + +} diff --git a/DevTools/HackStudio/ProcessStateWidget.cpp b/DevTools/HackStudio/ProcessStateWidget.cpp index d3b9853653..54c48c19c2 100644 --- a/DevTools/HackStudio/ProcessStateWidget.cpp +++ b/DevTools/HackStudio/ProcessStateWidget.cpp @@ -32,6 +32,8 @@ #include #include +namespace HackStudio { + ProcessStateWidget::ProcessStateWidget() { set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed); @@ -96,3 +98,5 @@ void ProcessStateWidget::set_tty_fd(int tty_fd) set_visible(true); refresh(); } + +} diff --git a/DevTools/HackStudio/ProcessStateWidget.h b/DevTools/HackStudio/ProcessStateWidget.h index a4bc4f9d16..7769473bc1 100644 --- a/DevTools/HackStudio/ProcessStateWidget.h +++ b/DevTools/HackStudio/ProcessStateWidget.h @@ -28,6 +28,8 @@ #include +namespace HackStudio { + class ProcessStateWidget final : public GUI::Widget { C_OBJECT(ProcessStateWidget) public: @@ -49,3 +51,5 @@ private: int m_tty_fd { -1 }; }; + +} diff --git a/DevTools/HackStudio/Project.cpp b/DevTools/HackStudio/Project.cpp index af708026e4..097c2b9fa0 100644 --- a/DevTools/HackStudio/Project.cpp +++ b/DevTools/HackStudio/Project.cpp @@ -36,6 +36,8 @@ #include #include +namespace HackStudio { + struct Project::ProjectTreeNode : public RefCounted { enum class Type { Invalid, @@ -358,3 +360,5 @@ void Project::rebuild_tree() m_root_node = move(root); m_model->update(); } + +} diff --git a/DevTools/HackStudio/Project.h b/DevTools/HackStudio/Project.h index 02a8aceeea..a56d44dfad 100644 --- a/DevTools/HackStudio/Project.h +++ b/DevTools/HackStudio/Project.h @@ -33,6 +33,8 @@ #include #include +namespace HackStudio { + enum class ProjectType { Unknown, Cpp, @@ -88,3 +90,5 @@ private: GUI::Icon m_header_icon; GUI::Icon m_project_icon; }; + +} diff --git a/DevTools/HackStudio/ProjectFile.cpp b/DevTools/HackStudio/ProjectFile.cpp index 3cf3a65c1b..bd1b894242 100644 --- a/DevTools/HackStudio/ProjectFile.cpp +++ b/DevTools/HackStudio/ProjectFile.cpp @@ -28,6 +28,8 @@ #include #include +namespace HackStudio { + ProjectFile::ProjectFile(const String& name) : m_name(name) { @@ -45,3 +47,5 @@ const GUI::TextDocument& ProjectFile::document() const } return *m_document; } + +} diff --git a/DevTools/HackStudio/ProjectFile.h b/DevTools/HackStudio/ProjectFile.h index 084b5fe829..07a5294ea2 100644 --- a/DevTools/HackStudio/ProjectFile.h +++ b/DevTools/HackStudio/ProjectFile.h @@ -32,6 +32,8 @@ #include #include +namespace HackStudio { + class ProjectFile : public RefCounted { public: static NonnullRefPtr construct_with_name(const String& name) @@ -49,3 +51,5 @@ private: String m_name; mutable RefPtr m_document; }; + +} diff --git a/DevTools/HackStudio/TerminalWrapper.cpp b/DevTools/HackStudio/TerminalWrapper.cpp index 58444aa7ac..50ebddfd5a 100644 --- a/DevTools/HackStudio/TerminalWrapper.cpp +++ b/DevTools/HackStudio/TerminalWrapper.cpp @@ -41,6 +41,8 @@ #include #include +namespace HackStudio { + void TerminalWrapper::run_command(const String& command) { if (m_pid != -1) { @@ -183,3 +185,5 @@ TerminalWrapper::TerminalWrapper(bool user_spawned) TerminalWrapper::~TerminalWrapper() { } + +} diff --git a/DevTools/HackStudio/TerminalWrapper.h b/DevTools/HackStudio/TerminalWrapper.h index 781f8150b0..30608c0597 100644 --- a/DevTools/HackStudio/TerminalWrapper.h +++ b/DevTools/HackStudio/TerminalWrapper.h @@ -28,9 +28,12 @@ #include -class ProcessStateWidget; class TerminalWidget; +namespace HackStudio { + +class ProcessStateWidget; + class TerminalWrapper final : public GUI::Widget { C_OBJECT(TerminalWrapper) public: @@ -52,3 +55,5 @@ private: pid_t m_pid { -1 }; bool m_user_spawned { true }; }; + +} diff --git a/DevTools/HackStudio/Tool.h b/DevTools/HackStudio/Tool.h index 7843ef08b2..fd4674bcdc 100644 --- a/DevTools/HackStudio/Tool.h +++ b/DevTools/HackStudio/Tool.h @@ -29,24 +29,26 @@ #include #include +namespace HackStudio { + class FormEditorWidget; class Tool { AK_MAKE_NONCOPYABLE(Tool) AK_MAKE_NONMOVABLE(Tool) public: - virtual ~Tool() {} + virtual ~Tool() { } virtual void on_mousedown(GUI::MouseEvent&) = 0; virtual void on_mouseup(GUI::MouseEvent&) = 0; virtual void on_mousemove(GUI::MouseEvent&) = 0; virtual void on_keydown(GUI::KeyEvent&) = 0; - virtual void on_second_paint(GUI::Painter&, GUI::PaintEvent&) {} + virtual void on_second_paint(GUI::Painter&, GUI::PaintEvent&) { } virtual const char* class_name() const = 0; - virtual void attach() {} - virtual void detach() {} + virtual void attach() { } + virtual void detach() { } protected: explicit Tool(FormEditorWidget& editor) @@ -56,3 +58,5 @@ protected: FormEditorWidget& m_editor; }; + +} diff --git a/DevTools/HackStudio/WidgetTool.cpp b/DevTools/HackStudio/WidgetTool.cpp index 411a144c48..27ea7b523f 100644 --- a/DevTools/HackStudio/WidgetTool.cpp +++ b/DevTools/HackStudio/WidgetTool.cpp @@ -27,6 +27,8 @@ #include "WidgetTool.h" #include +namespace HackStudio { + void WidgetTool::on_mousedown(GUI::MouseEvent& event) { (void)event; @@ -50,3 +52,5 @@ void WidgetTool::on_keydown(GUI::KeyEvent& event) (void)event; dbg() << "WidgetTool::on_keydown"; } + +} diff --git a/DevTools/HackStudio/WidgetTool.h b/DevTools/HackStudio/WidgetTool.h index 72c2099e71..dae5e805d3 100644 --- a/DevTools/HackStudio/WidgetTool.h +++ b/DevTools/HackStudio/WidgetTool.h @@ -28,9 +28,7 @@ #include "Tool.h" -namespace GUI { -class WidgetClassRegistration; -} +namespace HackStudio { class WidgetTool final : public Tool { public: @@ -39,7 +37,7 @@ public: , m_meta_class(meta_class) { } - virtual ~WidgetTool() override {} + virtual ~WidgetTool() override { } private: virtual const char* class_name() const override { return "WidgetTool"; } @@ -50,3 +48,5 @@ private: const GUI::WidgetClassRegistration& m_meta_class; }; + +} diff --git a/DevTools/HackStudio/WidgetTreeModel.cpp b/DevTools/HackStudio/WidgetTreeModel.cpp index 0a533a2b28..2f6ba3e4b4 100644 --- a/DevTools/HackStudio/WidgetTreeModel.cpp +++ b/DevTools/HackStudio/WidgetTreeModel.cpp @@ -27,7 +27,8 @@ #include "WidgetTreeModel.h" #include #include -#include + +namespace HackStudio { WidgetTreeModel::WidgetTreeModel(GUI::Widget& root) : m_root(root) @@ -112,3 +113,5 @@ GUI::ModelIndex WidgetTreeModel::index_for_widget(GUI::Widget& widget) const } return {}; } + +} diff --git a/DevTools/HackStudio/WidgetTreeModel.h b/DevTools/HackStudio/WidgetTreeModel.h index b08949306a..cfffbd6add 100644 --- a/DevTools/HackStudio/WidgetTreeModel.h +++ b/DevTools/HackStudio/WidgetTreeModel.h @@ -29,6 +29,8 @@ #include #include +namespace HackStudio { + class WidgetTreeModel final : public GUI::Model { public: static NonnullRefPtr create(GUI::Widget& root) { return adopt(*new WidgetTreeModel(root)); } @@ -49,3 +51,5 @@ private: NonnullRefPtr m_root; GUI::Icon m_widget_icon; }; + +} diff --git a/DevTools/HackStudio/main.cpp b/DevTools/HackStudio/main.cpp index 873f489bd0..e31ba60cd9 100644 --- a/DevTools/HackStudio/main.cpp +++ b/DevTools/HackStudio/main.cpp @@ -80,6 +80,10 @@ #include #include +using namespace HackStudio; + +namespace HackStudio { + NonnullRefPtrVector g_all_editor_wrappers; RefPtr g_current_editor_wrapper; Function g_open_file; @@ -172,7 +176,7 @@ static String get_project_executable_path() return g_project->path().substring(0, g_project->path().index_of(".").value()); } -int main(int argc, char** argv) +int main_impl(int argc, char** argv) { if (pledge("stdio tty accept rpath cpath wpath shared_buffer proc exec unix fattr thread", nullptr) < 0) { perror("pledge"); @@ -820,3 +824,10 @@ bool make_is_available() posix_spawn_file_actions_destroy(&action); return WEXITSTATUS(wstatus) == 0; } + +} + +int main(int argc, char** argv) +{ + return main_impl(argc, argv); +}