Libraries: Use default constructors/destructors in LibGUI

https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
This commit is contained in:
Lenny Maiorani 2022-02-26 10:50:04 -07:00 committed by Brian Gianforcaro
parent b801ddf73d
commit fe3b846ac8
Notes: sideshowbarker 2024-07-17 17:32:24 +09:00
146 changed files with 271 additions and 462 deletions

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -85,8 +86,4 @@ AboutDialog::AboutDialog(StringView name, const Gfx::Bitmap* icon, Window* paren
};
}
AboutDialog::~AboutDialog()
{
}
}

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -14,7 +15,7 @@ namespace GUI {
class AboutDialog final : public Dialog {
C_OBJECT(AboutDialog)
public:
virtual ~AboutDialog() override;
virtual ~AboutDialog() override = default;
static void show(StringView name, const Gfx::Bitmap* icon = nullptr, Window* parent_window = nullptr, const Gfx::Bitmap* window_icon = nullptr, StringView version = Core::Version::SERENITY_VERSION)
{

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -32,10 +33,6 @@ AbstractButton::AbstractButton(String text)
REGISTER_BOOL_PROPERTY("exclusive", is_exclusive, set_exclusive);
}
AbstractButton::~AbstractButton()
{
}
void AbstractButton::set_text(String text)
{
if (m_text == text)

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -15,7 +16,7 @@ class AbstractButton : public Widget {
C_OBJECT_ABSTRACT(AbstractButton);
public:
virtual ~AbstractButton() override;
virtual ~AbstractButton() override = default;
Function<void(bool)> on_checked;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -37,10 +38,6 @@ AbstractScrollableWidget::AbstractScrollableWidget()
};
}
AbstractScrollableWidget::~AbstractScrollableWidget()
{
}
void AbstractScrollableWidget::handle_wheel_event(MouseEvent& event, Widget& event_source)
{
if (!m_scrollbars_enabled) {

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -15,7 +16,7 @@ class AbstractScrollableWidget : public Frame {
C_OBJECT_ABSTRACT(AbstractScrollableWidget);
public:
virtual ~AbstractScrollableWidget() override;
virtual ~AbstractScrollableWidget() override = default;
Gfx::IntSize content_size() const { return m_content_size; }
int content_width() const { return m_content_size.width(); }

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -25,10 +26,6 @@ AbstractSlider::AbstractSlider(Orientation orientation)
{ Orientation::Vertical, "Vertical" });
}
AbstractSlider::~AbstractSlider()
{
}
void AbstractSlider::set_orientation(Orientation value)
{
if (m_orientation == value)

View File

@ -14,7 +14,7 @@ class AbstractSlider : public Widget {
C_OBJECT_ABSTRACT(AbstractSlider);
public:
virtual ~AbstractSlider() override;
virtual ~AbstractSlider() override = default;
void set_orientation(Orientation value);
Orientation orientation() const { return m_orientation; }

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -34,10 +35,6 @@ AbstractTableView::AbstractTableView()
set_should_hide_unnecessary_scrollbars(true);
}
AbstractTableView::~AbstractTableView()
{
}
void AbstractTableView::select_all()
{
selection().clear();

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, Jakob-Niklas See <git@nwex.de>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -8,12 +9,14 @@
#pragma once
#include <LibGUI/AbstractView.h>
#include <LibGUI/Button.h>
#include <LibGUI/HeaderView.h>
namespace GUI {
class TableCellPaintingDelegate {
public:
virtual ~TableCellPaintingDelegate() { }
virtual ~TableCellPaintingDelegate() = default;
virtual bool should_paint(ModelIndex const&) { return true; }
virtual void paint(Painter&, const Gfx::IntRect&, const Gfx::Palette&, const ModelIndex&) = 0;
@ -82,7 +85,7 @@ public:
virtual void model_did_update(unsigned flags) override;
protected:
virtual ~AbstractTableView() override;
virtual ~AbstractTableView() override = default;
AbstractTableView();
virtual void mousedown_event(MouseEvent&) override;

View File

@ -15,6 +15,7 @@
#include <AK/WeakPtr.h>
#include <AK/Weakable.h>
#include <LibCore/Object.h>
#include <LibCore/Timer.h>
#include <LibGUI/Forward.h>
#include <LibGUI/Shortcut.h>
#include <LibGfx/Forward.h>

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -14,8 +15,8 @@ namespace GUI {
class ActionGroup : public Weakable<ActionGroup> {
public:
ActionGroup() { }
~ActionGroup() { }
ActionGroup() = default;
~ActionGroup() = default;
void add_action(Action&);
void remove_action(Action&);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, the SerenityOS developers.
* Copyright (c) 2020-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -84,8 +84,6 @@ private:
Vector<AutocompleteProvider::Entry> m_suggestions;
};
AutocompleteBox::~AutocompleteBox() { }
AutocompleteBox::AutocompleteBox(TextEditor& editor)
: m_editor(editor)
{

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, the SerenityOS developers.
* Copyright (c) 2020-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -20,7 +20,7 @@ class AutocompleteProvider {
AK_MAKE_NONMOVABLE(AutocompleteProvider);
public:
virtual ~AutocompleteProvider() { }
virtual ~AutocompleteProvider() = default;
enum class Language {
Unspecified,
@ -103,7 +103,7 @@ public:
void detach() { m_editor.clear(); }
protected:
AutocompleteProvider() { }
AutocompleteProvider() = default;
WeakPtr<TextEditor> m_editor;
};
@ -111,7 +111,7 @@ protected:
class AutocompleteBox final {
public:
explicit AutocompleteBox(TextEditor&);
~AutocompleteBox();
~AutocompleteBox() = default;
void update_suggestions(Vector<AutocompleteProvider::Entry>&& suggestions);
bool is_visible() const;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -16,7 +17,7 @@ class BoxLayout : public Layout {
C_OBJECT(BoxLayout);
public:
virtual ~BoxLayout() override { }
virtual ~BoxLayout() override = default;
Gfx::Orientation orientation() const { return m_orientation; }
@ -41,7 +42,7 @@ private:
: BoxLayout(Gfx::Orientation::Vertical)
{
}
virtual ~VerticalBoxLayout() override { }
virtual ~VerticalBoxLayout() override = default;
};
class HorizontalBoxLayout final : public BoxLayout {
@ -52,7 +53,7 @@ private:
: BoxLayout(Gfx::Orientation::Horizontal)
{
}
virtual ~HorizontalBoxLayout() override { }
virtual ~HorizontalBoxLayout() override = default;
};
}

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -20,7 +21,7 @@ class BreadcrumbButton : public Button {
C_OBJECT(BreadcrumbButton);
public:
virtual ~BreadcrumbButton() override { }
virtual ~BreadcrumbButton() override = default;
virtual bool is_uncheckable() const override { return false; }
virtual void drop_event(DropEvent& event) override
@ -54,7 +55,7 @@ public:
Function<void(DragEvent&)> on_drag_enter;
private:
BreadcrumbButton() { }
BreadcrumbButton() = default;
};
Breadcrumbbar::Breadcrumbbar()
@ -63,10 +64,6 @@ Breadcrumbbar::Breadcrumbbar()
layout.set_spacing(0);
}
Breadcrumbbar::~Breadcrumbbar()
{
}
void Breadcrumbbar::clear_segments()
{
m_segments.clear();

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -14,7 +15,7 @@ class Breadcrumbbar : public GUI::Widget {
C_OBJECT(Breadcrumbbar);
public:
virtual ~Breadcrumbbar() override;
virtual ~Breadcrumbbar() override = default;
void clear_segments();
void append_segment(String text, Gfx::Bitmap const* icon = nullptr, String data = {}, String tooltip = {});

View File

@ -8,6 +8,7 @@
#include <AK/Function.h>
#include <LibGUI/AbstractButton.h>
#include <LibGUI/Action.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/StylePainter.h>
#include <LibGfx/TextAlignment.h>

View File

@ -26,7 +26,6 @@ set(SOURCES
CommonActions.cpp
CommonLocationsProvider.cpp
ComboBox.cpp
Command.cpp
CommandPalette.cpp
Desktop.cpp
Dialog.cpp

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2020, Ryan Grieb <ryan.m.grieb@gmail.com>
* Copyright (c) 2020-2021, the SerenityOS developers.
* Copyright (c) 2020-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -62,10 +62,6 @@ Calendar::Calendar(Core::DateTime date_time, Mode mode)
update_tiles(m_selected_date.year(), m_selected_date.month());
}
Calendar::~Calendar()
{
}
void Calendar::set_grid(bool show)
{
if (m_grid == show)

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2020, Ryan Grieb <ryan.m.grieb@gmail.com>
* Copyright (c) 2020-2021, the SerenityOS developers.
* Copyright (c) 2020-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -73,7 +73,7 @@ public:
private:
Calendar(Core::DateTime date_time = Core::DateTime::now(), Mode mode = Month);
virtual ~Calendar() override;
virtual ~Calendar() override = default;
virtual void resize_event(GUI::ResizeEvent&) override;
virtual void paint_event(GUI::PaintEvent&) override;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -28,10 +29,6 @@ CheckBox::CheckBox(String text)
set_fixed_height(22);
}
CheckBox::~CheckBox()
{
}
void CheckBox::paint_event(PaintEvent& event)
{
Painter painter(*this);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -14,7 +15,7 @@ class CheckBox : public AbstractButton {
C_OBJECT(CheckBox);
public:
virtual ~CheckBox() override;
virtual ~CheckBox() override = default;
virtual void click(unsigned modifiers = 0) override;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -29,10 +30,6 @@ ColorInput::ColorInput()
REGISTER_BOOL_PROPERTY("has_alpha_channel", has_alpha_channel, set_color_has_alpha_channel);
}
ColorInput::~ColorInput()
{
}
Gfx::IntRect ColorInput::color_rect() const
{
auto color_box_padding = 3;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -15,7 +16,7 @@ class ColorInput final : public TextEditor {
C_OBJECT(ColorInput);
public:
virtual ~ColorInput() override;
virtual ~ColorInput() override = default;
bool has_alpha_channel() const { return m_color_has_alpha_channel; }
void set_color_has_alpha_channel(bool has_alpha) { m_color_has_alpha_channel = has_alpha; }

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -22,7 +23,7 @@ class ColorButton : public AbstractButton {
C_OBJECT(ColorButton);
public:
virtual ~ColorButton() override;
virtual ~ColorButton() override = default;
void set_selected(bool selected);
Color color() const { return m_color; }
@ -146,7 +147,7 @@ public:
return m_col;
}
virtual ~ColorSelectOverlay() override { }
virtual ~ColorSelectOverlay() override = default;
Function<void(Color)> on_color_changed;
private:
@ -193,10 +194,6 @@ ColorPicker::ColorPicker(Color color, Window* parent_window, String title)
build_ui();
}
ColorPicker::~ColorPicker()
{
}
void ColorPicker::set_color_has_alpha_channel(bool has_alpha)
{
if (m_color_has_alpha_channel == has_alpha)
@ -458,10 +455,6 @@ ColorButton::ColorButton(ColorPicker& picker, Color color)
m_color = color;
}
ColorButton::~ColorButton()
{
}
void ColorButton::set_selected(bool selected)
{
m_selected = selected;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -20,7 +21,7 @@ class ColorPicker final : public Dialog {
C_OBJECT(ColorPicker)
public:
virtual ~ColorPicker() override;
virtual ~ColorPicker() override = default;
bool color_has_alpha_channel() const { return m_color_has_alpha_channel; }
void set_color_has_alpha_channel(bool);

View File

@ -35,10 +35,6 @@ ColumnsView::ColumnsView()
m_columns.append({ {}, 0 });
}
ColumnsView::~ColumnsView()
{
}
void ColumnsView::select_all()
{
Vector<Column> columns_for_selection;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Sergey Bugaev <bugaevc@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -23,7 +24,7 @@ public:
private:
ColumnsView();
virtual ~ColumnsView() override;
virtual ~ColumnsView() override = default;
void push_column(const ModelIndex& parent_index);
void update_column_sizes();

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -137,9 +138,7 @@ ComboBox::ComboBox()
};
}
ComboBox::~ComboBox()
{
}
ComboBox::~ComboBox() = default;
void ComboBox::set_editor_placeholder(StringView placeholder)
{

View File

@ -1,15 +0,0 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibGUI/Command.h>
namespace GUI {
Command::~Command()
{
}
}

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -12,7 +13,7 @@ namespace GUI {
class Command {
public:
virtual ~Command();
virtual ~Command() = default;
virtual void undo() { }
virtual void redo() { }
@ -21,7 +22,7 @@ public:
virtual bool merge_with(Command const&) { return false; }
protected:
Command() { }
Command() = default;
};
}

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, Jakob-Niklas See <git@nwex.de>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -34,7 +35,7 @@ AK_ENUM_BITWISE_OPERATORS(IconFlags);
class ActionIconDelegate final : public GUI::TableCellPaintingDelegate {
public:
virtual ~ActionIconDelegate() override { }
virtual ~ActionIconDelegate() override = default;
bool should_paint(ModelIndex const& index) override
{
@ -76,7 +77,7 @@ public:
{
}
virtual ~ActionModel() override { }
virtual ~ActionModel() override = default;
virtual int row_count(ModelIndex const& parent_index) const override
{
@ -218,10 +219,6 @@ CommandPalette::CommandPalette(GUI::Window& parent_window, ScreenPosition screen
m_text_box->set_focus(true);
}
CommandPalette::~CommandPalette()
{
}
void CommandPalette::collect_actions(GUI::Window& parent_window)
{
OrderedHashTable<NonnullRefPtr<GUI::Action>> actions;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -20,7 +21,7 @@ public:
private:
explicit CommandPalette(GUI::Window& parent_window, ScreenPosition screen_position = CenterWithinParent);
virtual ~CommandPalette() override;
virtual ~CommandPalette() override = default;
void collect_actions(GUI::Window& parent_window);
void finish_with_index(GUI::ModelIndex const&);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -21,10 +22,6 @@ Desktop& Desktop::the()
return s_the;
}
Desktop::Desktop()
{
}
void Desktop::did_receive_screen_rects(Badge<ConnectionToWindowServer>, const Vector<Gfx::IntRect, 4>& rects, size_t main_screen_index, unsigned workspace_rows, unsigned workspace_columns)
{
m_main_screen_index = main_screen_index;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -23,7 +24,7 @@ public:
static constexpr size_t default_screen_rect_count = 4;
static Desktop& the();
Desktop();
Desktop() = default;
void set_background_color(StringView background_color);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -19,10 +20,6 @@ Dialog::Dialog(Window* parent_window, ScreenPosition screen_position)
set_minimizable(false);
}
Dialog::~Dialog()
{
}
int Dialog::exec()
{
VERIFY(!m_event_loop);

View File

@ -1,11 +1,13 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibCore/EventLoop.h>
#include <LibGUI/Window.h>
namespace GUI {
@ -36,7 +38,7 @@ public:
BottomRight = 9,
};
virtual ~Dialog() override;
virtual ~Dialog() override = default;
int exec();

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -20,10 +21,6 @@ DragOperation::DragOperation(Core::Object* parent)
{
}
DragOperation::~DragOperation()
{
}
DragOperation::Outcome DragOperation::exec()
{
VERIFY(!s_current_drag_operation);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -23,7 +24,7 @@ public:
Cancelled,
};
virtual ~DragOperation() override;
virtual ~DragOperation() override = default;
void set_mime_data(RefPtr<Core::MimeData> mime_data) { m_mime_data = move(mime_data); }
void set_text(const String& text);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, the SerenityOS developers.
* Copyright (c) 2021-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -21,10 +21,6 @@ constexpr bool is_vim_punctuation(u32 code_point)
return is_ascii_punctuation(code_point) && code_point != '_';
}
EditingEngine::~EditingEngine()
{
}
void EditingEngine::attach(TextEditor& editor)
{
VERIFY(!m_editor);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, the SerenityOS developers.
* Copyright (c) 2021-2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -27,7 +27,7 @@ class EditingEngine {
AK_MAKE_NONMOVABLE(EditingEngine);
public:
virtual ~EditingEngine();
virtual ~EditingEngine() = default;
virtual CursorWidth cursor_width() const { return NARROW; }
@ -46,7 +46,7 @@ public:
bool is_vim() const { return engine_type() == EngineType::Vim; }
protected:
EditingEngine() { }
EditingEngine() = default;
WeakPtr<TextEditor> m_editor;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -19,10 +20,6 @@ DropEvent::DropEvent(const Gfx::IntPoint& position, const String& text, NonnullR
{
}
DropEvent::~DropEvent()
{
}
String KeyEvent::to_string() const
{
Vector<String, 8> parts;
@ -56,8 +53,4 @@ ActionEvent::ActionEvent(Type type, Action& action)
{
}
ActionEvent::~ActionEvent()
{
}
}

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -72,12 +73,12 @@ public:
__End_WM_Events,
};
Event() { }
Event() = default;
explicit Event(Type type)
: Core::Event(type)
{
}
virtual ~Event() { }
virtual ~Event() = default;
bool is_key_event() const { return type() == KeyUp || type() == KeyDown; }
bool is_paint_event() const { return type() == Paint; }
@ -454,7 +455,7 @@ class DropEvent final : public Event {
public:
DropEvent(const Gfx::IntPoint&, const String& text, NonnullRefPtr<Core::MimeData> mime_data);
~DropEvent();
~DropEvent() = default;
const Gfx::IntPoint& position() const { return m_position; }
const String& text() const { return m_text; }
@ -530,7 +531,7 @@ private:
class ActionEvent final : public Event {
public:
ActionEvent(Type, Action&);
~ActionEvent();
~ActionEvent() = default;
Action const& action() const { return *m_action; }
Action& action() { return *m_action; }

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -271,10 +272,6 @@ FileSystemModel::FileSystemModel(String root_path, Mode mode)
invalidate();
}
FileSystemModel::~FileSystemModel()
{
}
String FileSystemModel::name_for_uid(uid_t uid) const
{
auto it = m_user_names.find(uid);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -43,7 +44,7 @@ public:
};
struct Node {
~Node() { }
~Node() = default;
String name;
String symlink_target;
@ -102,7 +103,7 @@ public:
{
return adopt_ref(*new FileSystemModel(root_path, mode));
}
virtual ~FileSystemModel() override;
virtual ~FileSystemModel() override = default;
String root_path() const { return m_root_path; }
void set_root_path(String);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -169,10 +170,6 @@ FontPicker::FontPicker(Window* parent_window, const Gfx::Font* current_font, boo
set_font(current_font);
}
FontPicker::~FontPicker()
{
}
void FontPicker::set_font(const Gfx::Font* font)
{
if (m_font == font)

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -16,7 +17,7 @@ class FontPicker final : public GUI::Dialog {
C_OBJECT(FontPicker);
public:
virtual ~FontPicker() override;
virtual ~FontPicker() override = default;
RefPtr<Gfx::Font> font() const { return m_font; }
void set_font(const Gfx::Font*);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -32,10 +33,6 @@ Frame::Frame()
{ Gfx::FrameShape::Window, "Window" });
}
Frame::~Frame()
{
}
void Frame::set_frame_thickness(int thickness)
{
if (m_thickness == thickness)

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -14,7 +15,7 @@ namespace GUI {
class Frame : public Widget {
C_OBJECT(Frame)
public:
virtual ~Frame() override;
virtual ~Frame() override = default;
int frame_thickness() const { return m_thickness; }
void set_frame_thickness(int thickness);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -12,8 +13,8 @@ namespace GUI::GML {
class AutocompleteProvider final : public virtual GUI::AutocompleteProvider {
public:
AutocompleteProvider() { }
virtual ~AutocompleteProvider() override { }
AutocompleteProvider() = default;
virtual ~AutocompleteProvider() override = default;
private:
static bool can_have_declared_layout(StringView class_name)

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -77,8 +78,4 @@ bool SyntaxHighlighter::token_types_equal(u64 token1, u64 token2) const
return static_cast<Token::Type>(token1) == static_cast<Token::Type>(token2);
}
SyntaxHighlighter::~SyntaxHighlighter()
{
}
}

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -12,8 +13,8 @@ namespace GUI::GML {
class SyntaxHighlighter final : public Syntax::Highlighter {
public:
SyntaxHighlighter() { }
virtual ~SyntaxHighlighter() override;
SyntaxHighlighter() = default;
virtual ~SyntaxHighlighter() override = default;
virtual bool is_identifier(u64) const override;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2022, Brian Gianforcaro <bgianf@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -52,8 +53,4 @@ bool GitCommitSyntaxHighlighter::token_types_equal(u64 token1, u64 token2) const
return static_cast<GUI::GitCommitToken::Type>(token1) == static_cast<GUI::GitCommitToken::Type>(token2);
}
GitCommitSyntaxHighlighter::~GitCommitSyntaxHighlighter()
{
}
}

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2022, Brian Gianforcaro <bgianf@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -12,8 +13,8 @@ namespace GUI {
class GitCommitSyntaxHighlighter final : public Syntax::Highlighter {
public:
GitCommitSyntaxHighlighter() { }
virtual ~GitCommitSyntaxHighlighter() override;
GitCommitSyntaxHighlighter() = default;
virtual ~GitCommitSyntaxHighlighter() override = default;
virtual Syntax::Language language() const override { return Syntax::Language::GitCommit; }
virtual void rehighlight(Palette const&) override;

View File

@ -2,6 +2,7 @@
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org>
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -55,10 +56,6 @@ GlyphMapWidget::GlyphMapWidget()
set_active_glyph('A');
}
GlyphMapWidget::~GlyphMapWidget()
{
}
void GlyphMapWidget::resize_event(ResizeEvent& event)
{
recalculate_content_size();

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -17,7 +18,7 @@ namespace GUI {
class GlyphMapWidget final : public AbstractScrollableWidget {
C_OBJECT(GlyphMapWidget)
public:
virtual ~GlyphMapWidget() override;
virtual ~GlyphMapWidget() override = default;
class Selection {
public:

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -20,10 +21,6 @@ GroupBox::GroupBox(StringView title)
REGISTER_STRING_PROPERTY("title", title, set_title);
}
GroupBox::~GroupBox()
{
}
Margins GroupBox::content_margins() const
{
return {

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -13,7 +14,7 @@ namespace GUI {
class GroupBox : public Widget {
C_OBJECT(GroupBox)
public:
virtual ~GroupBox() override;
virtual ~GroupBox() override = default;
String title() const { return m_title; }
void set_title(StringView);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -30,10 +31,6 @@ HeaderView::HeaderView(AbstractTableView& table_view, Gfx::Orientation orientati
}
}
HeaderView::~HeaderView()
{
}
void HeaderView::set_section_size(int section, int size)
{
auto& data = section_data(section);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -15,7 +16,7 @@ class HeaderView final : public Widget {
C_OBJECT(HeaderView);
public:
virtual ~HeaderView() override;
virtual ~HeaderView() override = default;
Gfx::Orientation orientation() const { return m_orientation; }

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -76,8 +77,4 @@ bool IniSyntaxHighlighter::token_types_equal(u64 token1, u64 token2) const
return static_cast<GUI::IniToken::Type>(token1) == static_cast<GUI::IniToken::Type>(token2);
}
IniSyntaxHighlighter::~IniSyntaxHighlighter()
{
}
}

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -12,8 +13,8 @@ namespace GUI {
class IniSyntaxHighlighter final : public Syntax::Highlighter {
public:
IniSyntaxHighlighter() { }
virtual ~IniSyntaxHighlighter() override;
IniSyntaxHighlighter() = default;
virtual ~IniSyntaxHighlighter() override = default;
virtual bool is_identifier(u64) const override;

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Julius Heijmen <julius.heijmen@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -17,7 +18,7 @@ namespace GUI {
class IconImpl : public RefCounted<IconImpl> {
public:
static NonnullRefPtr<IconImpl> create() { return adopt_ref(*new IconImpl); }
~IconImpl() { }
~IconImpl() = default;
const Gfx::Bitmap* bitmap_for_size(int) const;
void set_bitmap_for_size(int, RefPtr<Gfx::Bitmap>&&);
@ -31,7 +32,7 @@ public:
}
private:
IconImpl() { }
IconImpl() = default;
HashMap<int, RefPtr<Gfx::Bitmap>> m_bitmaps;
};
@ -42,7 +43,7 @@ public:
explicit Icon(RefPtr<Gfx::Bitmap>&&, RefPtr<Gfx::Bitmap>&&);
explicit Icon(const IconImpl&);
Icon(const Icon&);
~Icon() { }
~Icon() = default;
static Icon default_icon(StringView);
static ErrorOr<Icon> try_create_default_icon(StringView);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -26,10 +27,6 @@ IconView::IconView()
horizontal_scrollbar().set_visible(false);
}
IconView::~IconView()
{
}
void IconView::select_all()
{
for (int item_index = 0; item_index < item_count(); ++item_index) {

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -16,7 +17,7 @@ namespace GUI {
class IconView : public AbstractView {
C_OBJECT(IconView)
public:
virtual ~IconView() override;
virtual ~IconView() override = default;
enum class FlowDirection {
LeftToRight,

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -27,10 +28,6 @@ ImageWidget::ImageWidget(StringView)
REGISTER_BOOL_PROPERTY("should_stretch", should_stretch, set_should_stretch);
}
ImageWidget::~ImageWidget()
{
}
void ImageWidget::set_bitmap(const Gfx::Bitmap* bitmap)
{
if (m_bitmap == bitmap)

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -8,13 +9,14 @@
#include <LibCore/Timer.h>
#include <LibGUI/Frame.h>
#include <LibGfx/ImageDecoder.h>
namespace GUI {
class ImageWidget : public Frame {
C_OBJECT(ImageWidget)
public:
virtual ~ImageWidget() override;
virtual ~ImageWidget() override = default;
void set_bitmap(const Gfx::Bitmap*);
Gfx::Bitmap* bitmap() { return m_bitmap.ptr(); }

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Jakob-Niklas See <git@nwex.de>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -24,10 +25,6 @@ InputBox::InputBox(Window* parent_window, String& text_value, StringView prompt,
build(input_type);
}
InputBox::~InputBox()
{
}
int InputBox::show(Window* parent_window, String& text_value, StringView prompt, StringView title, StringView placeholder, InputType input_type)
{
auto box = InputBox::construct(parent_window, text_value, prompt, title, placeholder, input_type);

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Jakob-Niklas See <git@nwex.de>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -19,7 +20,7 @@ enum class InputType {
class InputBox : public Dialog {
C_OBJECT(InputBox)
public:
virtual ~InputBox() override;
virtual ~InputBox() override = default;
static int show(Window* parent_window, String& text_value, StringView prompt, StringView title, StringView placeholder = {}, InputType input_type = InputType::Text);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2019-2020, Jesse Buhgaiar <jooster669@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -34,7 +35,7 @@ public:
return adopt_ref(*new ItemListModel<T, Container>(data, row_count));
}
virtual ~ItemListModel() override { }
virtual ~ItemListModel() override = default;
virtual int row_count(ModelIndex const& index) const override
{

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -44,7 +45,7 @@ public:
return adopt_ref(*new JsonArrayModel(json_path, move(fields)));
}
virtual ~JsonArrayModel() override { }
virtual ~JsonArrayModel() override = default;
virtual int row_count(const ModelIndex& = ModelIndex()) const override { return m_array.size(); }
virtual int column_count(const ModelIndex& = ModelIndex()) const override { return m_fields.size(); }

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -33,10 +34,6 @@ Label::Label(String text)
REGISTER_STRING_PROPERTY("icon", icon, set_icon_from_path);
}
Label::~Label()
{
}
void Label::set_autosize(bool autosize)
{
if (m_autosize == autosize)

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -16,7 +17,7 @@ class Label : public Frame {
C_OBJECT(Label);
public:
virtual ~Label() override;
virtual ~Label() override = default;
String text() const { return m_text; }
void set_text(String);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -37,9 +38,7 @@ Layout::Layout()
});
}
Layout::~Layout()
{
}
Layout::~Layout() = default;
void Layout::notify_adopted(Badge<Widget>, Widget& widget)
{

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -8,14 +9,6 @@
namespace GUI {
LazyWidget::LazyWidget()
{
}
LazyWidget::~LazyWidget()
{
}
void LazyWidget::show_event(ShowEvent&)
{
if (m_has_been_shown)

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -13,12 +14,12 @@ namespace GUI {
class LazyWidget : public Widget {
C_OBJECT(LazyWidget)
public:
virtual ~LazyWidget() override;
virtual ~LazyWidget() override = default;
Function<void(LazyWidget&)> on_first_show;
protected:
LazyWidget();
LazyWidget() = default;
private:
virtual void show_event(ShowEvent&) override;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -22,9 +23,7 @@ ListView::ListView()
set_searchable(true);
}
ListView::~ListView()
{
}
ListView::~ListView() = default;
void ListView::select_all()
{

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -9,14 +10,6 @@
namespace GUI {
Menubar::Menubar()
{
}
Menubar::~Menubar()
{
}
ErrorOr<NonnullRefPtr<Menu>> Menubar::try_add_menu(Badge<Window>, String name)
{
auto menu = TRY(try_add<Menu>(move(name)));

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -20,7 +21,7 @@ class Menubar : public Core::Object {
C_OBJECT(Menubar);
public:
virtual ~Menubar() override;
virtual ~Menubar() override = default;
ErrorOr<NonnullRefPtr<Menu>> try_add_menu(Badge<Window>, String name);
Menu& add_menu(Badge<Window>, String name);
@ -28,7 +29,7 @@ public:
void for_each_menu(Function<IterationDecision(Menu&)>);
private:
Menubar();
Menubar() = default;
NonnullRefPtrVector<Menu> m_menus;
};

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -71,10 +72,6 @@ MessageBox::MessageBox(Window* parent_window, StringView text, StringView title,
build();
}
MessageBox::~MessageBox()
{
}
RefPtr<Gfx::Bitmap> MessageBox::icon() const
{
switch (m_type) {

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -29,7 +30,7 @@ public:
YesNoCancel,
};
virtual ~MessageBox() override;
virtual ~MessageBox() override = default;
static int show(Window* parent_window, StringView text, StringView title, Type type = Type::None, InputType input_type = InputType::OK);
static int show_error(Window* parent_window, StringView text);

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -11,13 +12,9 @@
namespace GUI {
Model::Model()
{
}
Model::Model() = default;
Model::~Model()
{
}
Model::~Model() = default;
void Model::register_view(Badge<AbstractView>, AbstractView& view)
{

View File

@ -1,6 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -33,7 +34,7 @@ enum class SortOrder {
class ModelClient {
public:
virtual ~ModelClient() { }
virtual ~ModelClient() = default;
virtual void model_did_update(unsigned flags) = 0;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -19,7 +20,7 @@ public:
SelectAll,
};
virtual ~ModelEditingDelegate() { }
virtual ~ModelEditingDelegate() = default;
void bind(Model& model, const ModelIndex& index)
{
@ -43,7 +44,7 @@ public:
virtual void will_begin_editing() { }
protected:
ModelEditingDelegate() { }
ModelEditingDelegate() = default;
virtual RefPtr<Widget> create_widget() = 0;
void commit()
@ -72,8 +73,8 @@ private:
class StringModelEditingDelegate : public ModelEditingDelegate {
public:
StringModelEditingDelegate() { }
virtual ~StringModelEditingDelegate() override { }
StringModelEditingDelegate() = default;
virtual ~StringModelEditingDelegate() override = default;
virtual RefPtr<Widget> create_widget() override
{

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -49,10 +50,6 @@ MultiView::MultiView()
set_view_mode(ViewMode::Icon);
}
MultiView::~MultiView()
{
}
void MultiView::set_view_mode(ViewMode mode)
{
if (m_view_mode == mode)

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -17,7 +18,7 @@ namespace GUI {
class MultiView final : public GUI::StackWidget {
C_OBJECT(MultiView)
public:
virtual ~MultiView() override;
virtual ~MultiView() override = default;
void refresh();

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -33,13 +34,8 @@ private:
Notification* m_notification;
};
Notification::Notification()
{
}
Notification::~Notification()
{
}
Notification::Notification() = default;
Notification::~Notification() = default;
void Notification::show()
{

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -25,10 +26,6 @@ OpacitySlider::OpacitySlider(Gfx::Orientation orientation)
set_fixed_height(20);
}
OpacitySlider::~OpacitySlider()
{
}
Gfx::IntRect OpacitySlider::frame_inner_rect() const
{
return rect().shrunken(4, 4);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -14,7 +15,7 @@ class OpacitySlider : public AbstractSlider {
C_OBJECT(OpacitySlider);
public:
virtual ~OpacitySlider() override;
virtual ~OpacitySlider() override = default;
protected:
virtual void paint_event(PaintEvent&) override;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -59,10 +60,6 @@ PasswordInputDialog::PasswordInputDialog(Window* parent_window, String title, St
password_box.set_focus(true);
}
PasswordInputDialog::~PasswordInputDialog()
{
}
int PasswordInputDialog::show(Window* parent_window, String& text_value, String title, String server, String username)
{
auto box = PasswordInputDialog::construct(parent_window, move(title), move(server), move(username));

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -14,7 +15,7 @@ class PasswordInputDialog : public Dialog {
C_OBJECT(PasswordInputDialog);
public:
virtual ~PasswordInputDialog() override;
virtual ~PasswordInputDialog() override = default;
static int show(Window* parent_window, String& text_value, String title, String server, String username);

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -30,7 +31,7 @@ class PersistentHandle : public Weakable<PersistentHandle> {
class PersistentModelIndex {
public:
PersistentModelIndex() { }
PersistentModelIndex() = default;
PersistentModelIndex(ModelIndex const&);
PersistentModelIndex(PersistentModelIndex const&) = default;
PersistentModelIndex(PersistentModelIndex&&) = default;

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -104,8 +105,4 @@ void ProcessChooser::set_pid_from_index_and_close(const ModelIndex& index)
done(ExecOK);
}
ProcessChooser::~ProcessChooser()
{
}
}

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -16,7 +17,7 @@ class ProcessChooser final : public GUI::Dialog {
C_OBJECT(ProcessChooser);
public:
virtual ~ProcessChooser() override;
virtual ~ProcessChooser() override = default;
pid_t pid() const { return m_pid; }

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -28,10 +29,6 @@ Progressbar::Progressbar(Orientation orientation)
REGISTER_INT_PROPERTY("max", max, set_max);
}
Progressbar::~Progressbar()
{
}
void Progressbar::set_value(int value)
{
if (m_value == value)

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -13,7 +14,7 @@ namespace GUI {
class Progressbar : public Frame {
C_OBJECT(Progressbar)
public:
virtual ~Progressbar() override;
virtual ~Progressbar() override = default;
void set_range(int min, int max);
void set_min(int min) { set_range(min, max()); }
@ -56,7 +57,7 @@ class VerticalProgressbar final : public Progressbar {
C_OBJECT(VerticalProgressbar);
public:
virtual ~VerticalProgressbar() override { }
virtual ~VerticalProgressbar() override = default;
private:
VerticalProgressbar()
@ -69,7 +70,7 @@ class HorizontalProgressbar final : public Progressbar {
C_OBJECT(HorizontalProgressbar);
public:
virtual ~HorizontalProgressbar() override { }
virtual ~HorizontalProgressbar() override = default;
private:
HorizontalProgressbar()

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -24,10 +25,6 @@ RadioButton::RadioButton(String text)
set_fixed_height(22);
}
RadioButton::~RadioButton()
{
}
Gfx::IntSize RadioButton::circle_size()
{
return { 12, 12 };

View File

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -14,7 +15,7 @@ class RadioButton : public AbstractButton {
C_OBJECT(RadioButton);
public:
virtual ~RadioButton() override;
virtual ~RadioButton() override = default;
virtual void click(unsigned modifiers = 0) override;

View File

@ -61,10 +61,6 @@ ResizeCorner::ResizeCorner()
set_fixed_size(16, 18);
}
ResizeCorner::~ResizeCorner()
{
}
void ResizeCorner::paint_event(PaintEvent& event)
{
Painter painter(*this);

Some files were not shown because too many files have changed in this diff Show More