mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
HexEditor: Remove unused readonly flag
`HexEditor::set_readonly` was never called, even though `HexEditor::is_readonly` was occasionally queried -- so it's entirely been removed.
This commit is contained in:
parent
8695ae4c50
commit
035d63f528
2 changed files with 1 additions and 12 deletions
|
@ -49,13 +49,6 @@ HexEditor::HexEditor()
|
|||
m_blink_timer->start();
|
||||
}
|
||||
|
||||
void HexEditor::set_readonly(bool readonly)
|
||||
{
|
||||
if (m_readonly == readonly)
|
||||
return;
|
||||
m_readonly = readonly;
|
||||
}
|
||||
|
||||
bool HexEditor::open_new_file(size_t size)
|
||||
{
|
||||
auto maybe_buffer = ByteBuffer::create_zeroed(size);
|
||||
|
@ -460,7 +453,7 @@ void HexEditor::keydown_event(GUI::KeyEvent& event)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!is_readonly() && !event.ctrl() && !event.alt() && !event.text().is_empty()) {
|
||||
if (!event.ctrl() && !event.alt() && !event.text().is_empty()) {
|
||||
if (m_edit_mode == EditMode::Hex) {
|
||||
hex_mode_keydown_event(event);
|
||||
} else {
|
||||
|
|
|
@ -32,9 +32,6 @@ public:
|
|||
|
||||
virtual ~HexEditor() override = default;
|
||||
|
||||
bool is_readonly() const { return m_readonly; }
|
||||
void set_readonly(bool);
|
||||
|
||||
size_t buffer_size() const { return m_document->size(); }
|
||||
bool open_new_file(size_t size);
|
||||
void open_file(NonnullRefPtr<Core::File> file);
|
||||
|
@ -74,7 +71,6 @@ protected:
|
|||
virtual void keydown_event(GUI::KeyEvent&) override;
|
||||
|
||||
private:
|
||||
bool m_readonly { false };
|
||||
size_t m_line_spacing { 4 };
|
||||
size_t m_content_length { 0 };
|
||||
size_t m_bytes_per_row { 16 };
|
||||
|
|
Loading…
Add table
Reference in a new issue