1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:18:12 +00:00

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
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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * 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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -14,7 +15,7 @@ namespace GUI {
class AboutDialog final : public Dialog { class AboutDialog final : public Dialog {
C_OBJECT(AboutDialog) C_OBJECT(AboutDialog)
public: 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) 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) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -32,10 +33,6 @@ AbstractButton::AbstractButton(String text)
REGISTER_BOOL_PROPERTY("exclusive", is_exclusive, set_exclusive); REGISTER_BOOL_PROPERTY("exclusive", is_exclusive, set_exclusive);
} }
AbstractButton::~AbstractButton()
{
}
void AbstractButton::set_text(String text) void AbstractButton::set_text(String text)
{ {
if (m_text == text) if (m_text == text)

View file

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

View file

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

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -15,7 +16,7 @@ class AbstractScrollableWidget : public Frame {
C_OBJECT_ABSTRACT(AbstractScrollableWidget); C_OBJECT_ABSTRACT(AbstractScrollableWidget);
public: public:
virtual ~AbstractScrollableWidget() override; virtual ~AbstractScrollableWidget() override = default;
Gfx::IntSize content_size() const { return m_content_size; } Gfx::IntSize content_size() const { return m_content_size; }
int content_width() const { return m_content_size.width(); } 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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -25,10 +26,6 @@ AbstractSlider::AbstractSlider(Orientation orientation)
{ Orientation::Vertical, "Vertical" }); { Orientation::Vertical, "Vertical" });
} }
AbstractSlider::~AbstractSlider()
{
}
void AbstractSlider::set_orientation(Orientation value) void AbstractSlider::set_orientation(Orientation value)
{ {
if (m_orientation == value) if (m_orientation == value)

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -14,8 +15,8 @@ namespace GUI {
class ActionGroup : public Weakable<ActionGroup> { class ActionGroup : public Weakable<ActionGroup> {
public: public:
ActionGroup() { } ActionGroup() = default;
~ActionGroup() { } ~ActionGroup() = default;
void add_action(Action&); void add_action(Action&);
void remove_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 * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -84,8 +84,6 @@ private:
Vector<AutocompleteProvider::Entry> m_suggestions; Vector<AutocompleteProvider::Entry> m_suggestions;
}; };
AutocompleteBox::~AutocompleteBox() { }
AutocompleteBox::AutocompleteBox(TextEditor& editor) AutocompleteBox::AutocompleteBox(TextEditor& editor)
: m_editor(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 * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -20,7 +20,7 @@ class AutocompleteProvider {
AK_MAKE_NONMOVABLE(AutocompleteProvider); AK_MAKE_NONMOVABLE(AutocompleteProvider);
public: public:
virtual ~AutocompleteProvider() { } virtual ~AutocompleteProvider() = default;
enum class Language { enum class Language {
Unspecified, Unspecified,
@ -103,7 +103,7 @@ public:
void detach() { m_editor.clear(); } void detach() { m_editor.clear(); }
protected: protected:
AutocompleteProvider() { } AutocompleteProvider() = default;
WeakPtr<TextEditor> m_editor; WeakPtr<TextEditor> m_editor;
}; };
@ -111,7 +111,7 @@ protected:
class AutocompleteBox final { class AutocompleteBox final {
public: public:
explicit AutocompleteBox(TextEditor&); explicit AutocompleteBox(TextEditor&);
~AutocompleteBox(); ~AutocompleteBox() = default;
void update_suggestions(Vector<AutocompleteProvider::Entry>&& suggestions); void update_suggestions(Vector<AutocompleteProvider::Entry>&& suggestions);
bool is_visible() const; bool is_visible() const;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -16,7 +17,7 @@ class BoxLayout : public Layout {
C_OBJECT(BoxLayout); C_OBJECT(BoxLayout);
public: public:
virtual ~BoxLayout() override { } virtual ~BoxLayout() override = default;
Gfx::Orientation orientation() const { return m_orientation; } Gfx::Orientation orientation() const { return m_orientation; }
@ -41,7 +42,7 @@ private:
: BoxLayout(Gfx::Orientation::Vertical) : BoxLayout(Gfx::Orientation::Vertical)
{ {
} }
virtual ~VerticalBoxLayout() override { } virtual ~VerticalBoxLayout() override = default;
}; };
class HorizontalBoxLayout final : public BoxLayout { class HorizontalBoxLayout final : public BoxLayout {
@ -52,7 +53,7 @@ private:
: BoxLayout(Gfx::Orientation::Horizontal) : 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) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org> * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -20,7 +21,7 @@ class BreadcrumbButton : public Button {
C_OBJECT(BreadcrumbButton); C_OBJECT(BreadcrumbButton);
public: public:
virtual ~BreadcrumbButton() override { } virtual ~BreadcrumbButton() override = default;
virtual bool is_uncheckable() const override { return false; } virtual bool is_uncheckable() const override { return false; }
virtual void drop_event(DropEvent& event) override virtual void drop_event(DropEvent& event) override
@ -54,7 +55,7 @@ public:
Function<void(DragEvent&)> on_drag_enter; Function<void(DragEvent&)> on_drag_enter;
private: private:
BreadcrumbButton() { } BreadcrumbButton() = default;
}; };
Breadcrumbbar::Breadcrumbbar() Breadcrumbbar::Breadcrumbbar()
@ -63,10 +64,6 @@ Breadcrumbbar::Breadcrumbbar()
layout.set_spacing(0); layout.set_spacing(0);
} }
Breadcrumbbar::~Breadcrumbbar()
{
}
void Breadcrumbbar::clear_segments() void Breadcrumbbar::clear_segments()
{ {
m_segments.clear(); m_segments.clear();

View file

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

View file

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

View file

@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2019-2020, Ryan Grieb <ryan.m.grieb@gmail.com> * 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 * 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()); update_tiles(m_selected_date.year(), m_selected_date.month());
} }
Calendar::~Calendar()
{
}
void Calendar::set_grid(bool show) void Calendar::set_grid(bool show)
{ {
if (m_grid == show) if (m_grid == show)

View file

@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2019-2020, Ryan Grieb <ryan.m.grieb@gmail.com> * 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 * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -73,7 +73,7 @@ public:
private: private:
Calendar(Core::DateTime date_time = Core::DateTime::now(), Mode mode = Month); 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 resize_event(GUI::ResizeEvent&) override;
virtual void paint_event(GUI::PaintEvent&) 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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -28,10 +29,6 @@ CheckBox::CheckBox(String text)
set_fixed_height(22); set_fixed_height(22);
} }
CheckBox::~CheckBox()
{
}
void CheckBox::paint_event(PaintEvent& event) void CheckBox::paint_event(PaintEvent& event)
{ {
Painter painter(*this); Painter painter(*this);

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -14,7 +15,7 @@ class CheckBox : public AbstractButton {
C_OBJECT(CheckBox); C_OBJECT(CheckBox);
public: public:
virtual ~CheckBox() override; virtual ~CheckBox() override = default;
virtual void click(unsigned modifiers = 0) override; 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) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * 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); REGISTER_BOOL_PROPERTY("has_alpha_channel", has_alpha_channel, set_color_has_alpha_channel);
} }
ColorInput::~ColorInput()
{
}
Gfx::IntRect ColorInput::color_rect() const Gfx::IntRect ColorInput::color_rect() const
{ {
auto color_box_padding = 3; auto color_box_padding = 3;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -21,10 +22,6 @@ Desktop& Desktop::the()
return s_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) 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; m_main_screen_index = main_screen_index;

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -23,7 +24,7 @@ public:
Cancelled, 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_mime_data(RefPtr<Core::MimeData> mime_data) { m_mime_data = move(mime_data); }
void set_text(const String& text); 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 * 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 != '_'; return is_ascii_punctuation(code_point) && code_point != '_';
} }
EditingEngine::~EditingEngine()
{
}
void EditingEngine::attach(TextEditor& editor) void EditingEngine::attach(TextEditor& editor)
{ {
VERIFY(!m_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 * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -27,7 +27,7 @@ class EditingEngine {
AK_MAKE_NONMOVABLE(EditingEngine); AK_MAKE_NONMOVABLE(EditingEngine);
public: public:
virtual ~EditingEngine(); virtual ~EditingEngine() = default;
virtual CursorWidth cursor_width() const { return NARROW; } virtual CursorWidth cursor_width() const { return NARROW; }
@ -46,7 +46,7 @@ public:
bool is_vim() const { return engine_type() == EngineType::Vim; } bool is_vim() const { return engine_type() == EngineType::Vim; }
protected: protected:
EditingEngine() { } EditingEngine() = default;
WeakPtr<TextEditor> m_editor; WeakPtr<TextEditor> m_editor;

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * 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 String KeyEvent::to_string() const
{ {
Vector<String, 8> parts; 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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -72,12 +73,12 @@ public:
__End_WM_Events, __End_WM_Events,
}; };
Event() { } Event() = default;
explicit Event(Type type) explicit Event(Type type)
: Core::Event(type) : Core::Event(type)
{ {
} }
virtual ~Event() { } virtual ~Event() = default;
bool is_key_event() const { return type() == KeyUp || type() == KeyDown; } bool is_key_event() const { return type() == KeyUp || type() == KeyDown; }
bool is_paint_event() const { return type() == Paint; } bool is_paint_event() const { return type() == Paint; }
@ -454,7 +455,7 @@ class DropEvent final : public Event {
public: public:
DropEvent(const Gfx::IntPoint&, const String& text, NonnullRefPtr<Core::MimeData> mime_data); DropEvent(const Gfx::IntPoint&, const String& text, NonnullRefPtr<Core::MimeData> mime_data);
~DropEvent(); ~DropEvent() = default;
const Gfx::IntPoint& position() const { return m_position; } const Gfx::IntPoint& position() const { return m_position; }
const String& text() const { return m_text; } const String& text() const { return m_text; }
@ -530,7 +531,7 @@ private:
class ActionEvent final : public Event { class ActionEvent final : public Event {
public: public:
ActionEvent(Type, Action&); ActionEvent(Type, Action&);
~ActionEvent(); ~ActionEvent() = default;
Action const& action() const { return *m_action; } Action const& action() const { return *m_action; }
Action& action() { 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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com> * Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -271,10 +272,6 @@ FileSystemModel::FileSystemModel(String root_path, Mode mode)
invalidate(); invalidate();
} }
FileSystemModel::~FileSystemModel()
{
}
String FileSystemModel::name_for_uid(uid_t uid) const String FileSystemModel::name_for_uid(uid_t uid) const
{ {
auto it = m_user_names.find(uid); auto it = m_user_names.find(uid);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * 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) void HeaderView::set_section_size(int section, int size)
{ {
auto& data = section_data(section); auto& data = section_data(section);

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -15,7 +16,7 @@ class HeaderView final : public Widget {
C_OBJECT(HeaderView); C_OBJECT(HeaderView);
public: public:
virtual ~HeaderView() override; virtual ~HeaderView() override = default;
Gfx::Orientation orientation() const { return m_orientation; } 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) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * 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); 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) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -12,8 +13,8 @@ namespace GUI {
class IniSyntaxHighlighter final : public Syntax::Highlighter { class IniSyntaxHighlighter final : public Syntax::Highlighter {
public: public:
IniSyntaxHighlighter() { } IniSyntaxHighlighter() = default;
virtual ~IniSyntaxHighlighter() override; virtual ~IniSyntaxHighlighter() override = default;
virtual bool is_identifier(u64) const override; virtual bool is_identifier(u64) const override;

View file

@ -1,6 +1,7 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Julius Heijmen <julius.heijmen@gmail.com> * Copyright (c) 2021, Julius Heijmen <julius.heijmen@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -17,7 +18,7 @@ namespace GUI {
class IconImpl : public RefCounted<IconImpl> { class IconImpl : public RefCounted<IconImpl> {
public: public:
static NonnullRefPtr<IconImpl> create() { return adopt_ref(*new IconImpl); } static NonnullRefPtr<IconImpl> create() { return adopt_ref(*new IconImpl); }
~IconImpl() { } ~IconImpl() = default;
const Gfx::Bitmap* bitmap_for_size(int) const; const Gfx::Bitmap* bitmap_for_size(int) const;
void set_bitmap_for_size(int, RefPtr<Gfx::Bitmap>&&); void set_bitmap_for_size(int, RefPtr<Gfx::Bitmap>&&);
@ -31,7 +32,7 @@ public:
} }
private: private:
IconImpl() { } IconImpl() = default;
HashMap<int, RefPtr<Gfx::Bitmap>> m_bitmaps; HashMap<int, RefPtr<Gfx::Bitmap>> m_bitmaps;
}; };
@ -42,7 +43,7 @@ public:
explicit Icon(RefPtr<Gfx::Bitmap>&&, RefPtr<Gfx::Bitmap>&&); explicit Icon(RefPtr<Gfx::Bitmap>&&, RefPtr<Gfx::Bitmap>&&);
explicit Icon(const IconImpl&); explicit Icon(const IconImpl&);
Icon(const Icon&); Icon(const Icon&);
~Icon() { } ~Icon() = default;
static Icon default_icon(StringView); static Icon default_icon(StringView);
static ErrorOr<Icon> try_create_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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -26,10 +27,6 @@ IconView::IconView()
horizontal_scrollbar().set_visible(false); horizontal_scrollbar().set_visible(false);
} }
IconView::~IconView()
{
}
void IconView::select_all() void IconView::select_all()
{ {
for (int item_index = 0; item_index < item_count(); ++item_index) { 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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -16,7 +17,7 @@ namespace GUI {
class IconView : public AbstractView { class IconView : public AbstractView {
C_OBJECT(IconView) C_OBJECT(IconView)
public: public:
virtual ~IconView() override; virtual ~IconView() override = default;
enum class FlowDirection { enum class FlowDirection {
LeftToRight, LeftToRight,

View file

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

View file

@ -1,6 +1,7 @@
/* /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Jakob-Niklas See <git@nwex.de> * Copyright (c) 2021, Jakob-Niklas See <git@nwex.de>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -24,10 +25,6 @@ InputBox::InputBox(Window* parent_window, String& text_value, StringView prompt,
build(input_type); build(input_type);
} }
InputBox::~InputBox()
{
}
int InputBox::show(Window* parent_window, String& text_value, StringView prompt, StringView title, StringView placeholder, InputType input_type) 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); 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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Jakob-Niklas See <git@nwex.de> * Copyright (c) 2021, Jakob-Niklas See <git@nwex.de>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -19,7 +20,7 @@ enum class InputType {
class InputBox : public Dialog { class InputBox : public Dialog {
C_OBJECT(InputBox) C_OBJECT(InputBox)
public: 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); 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) 2019-2020, Jesse Buhgaiar <jooster669@gmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -34,7 +35,7 @@ public:
return adopt_ref(*new ItemListModel<T, Container>(data, row_count)); 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 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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -44,7 +45,7 @@ public:
return adopt_ref(*new JsonArrayModel(json_path, move(fields))); 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 row_count(const ModelIndex& = ModelIndex()) const override { return m_array.size(); }
virtual int column_count(const ModelIndex& = ModelIndex()) const override { return m_fields.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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -33,10 +34,6 @@ Label::Label(String text)
REGISTER_STRING_PROPERTY("icon", icon, set_icon_from_path); REGISTER_STRING_PROPERTY("icon", icon, set_icon_from_path);
} }
Label::~Label()
{
}
void Label::set_autosize(bool autosize) void Label::set_autosize(bool autosize)
{ {
if (m_autosize == autosize) if (m_autosize == autosize)

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org> * Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -29,7 +30,7 @@ public:
YesNoCancel, 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(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); 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) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com> * Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -11,13 +12,9 @@
namespace GUI { namespace GUI {
Model::Model() Model::Model() = default;
{
}
Model::~Model() Model::~Model() = default;
{
}
void Model::register_view(Badge<AbstractView>, AbstractView& view) 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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com> * Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -33,7 +34,7 @@ enum class SortOrder {
class ModelClient { class ModelClient {
public: public:
virtual ~ModelClient() { } virtual ~ModelClient() = default;
virtual void model_did_update(unsigned flags) = 0; 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) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -19,7 +20,7 @@ public:
SelectAll, SelectAll,
}; };
virtual ~ModelEditingDelegate() { } virtual ~ModelEditingDelegate() = default;
void bind(Model& model, const ModelIndex& index) void bind(Model& model, const ModelIndex& index)
{ {
@ -43,7 +44,7 @@ public:
virtual void will_begin_editing() { } virtual void will_begin_editing() { }
protected: protected:
ModelEditingDelegate() { } ModelEditingDelegate() = default;
virtual RefPtr<Widget> create_widget() = 0; virtual RefPtr<Widget> create_widget() = 0;
void commit() void commit()
@ -72,8 +73,8 @@ private:
class StringModelEditingDelegate : public ModelEditingDelegate { class StringModelEditingDelegate : public ModelEditingDelegate {
public: public:
StringModelEditingDelegate() { } StringModelEditingDelegate() = default;
virtual ~StringModelEditingDelegate() override { } virtual ~StringModelEditingDelegate() override = default;
virtual RefPtr<Widget> create_widget() override virtual RefPtr<Widget> create_widget() override
{ {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -59,10 +60,6 @@ PasswordInputDialog::PasswordInputDialog(Window* parent_window, String title, St
password_box.set_focus(true); password_box.set_focus(true);
} }
PasswordInputDialog::~PasswordInputDialog()
{
}
int PasswordInputDialog::show(Window* parent_window, String& text_value, String title, String server, String username) 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)); 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) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -14,7 +15,7 @@ class PasswordInputDialog : public Dialog {
C_OBJECT(PasswordInputDialog); C_OBJECT(PasswordInputDialog);
public: public:
virtual ~PasswordInputDialog() override; virtual ~PasswordInputDialog() override = default;
static int show(Window* parent_window, String& text_value, String title, String server, String username); 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) 2021, sin-ack <sin-ack@protonmail.com>
* Copyright (c) 2022, the SerenityOS developers.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
@ -30,7 +31,7 @@ class PersistentHandle : public Weakable<PersistentHandle> {
class PersistentModelIndex { class PersistentModelIndex {
public: public:
PersistentModelIndex() { } PersistentModelIndex() = default;
PersistentModelIndex(ModelIndex const&); PersistentModelIndex(ModelIndex const&);
PersistentModelIndex(PersistentModelIndex const&) = default; PersistentModelIndex(PersistentModelIndex const&) = default;
PersistentModelIndex(PersistentModelIndex&&) = default; PersistentModelIndex(PersistentModelIndex&&) = default;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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