mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
Userland/Applets: Use default constructors/destructors
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:
parent
04c5bc5e55
commit
f2d8c488ec
7 changed files with 15 additions and 24 deletions
|
@ -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, kleines Filmröllchen <filmroellchen@serenityos.org>
|
* Copyright (c) 2021, kleines Filmröllchen <filmroellchen@serenityos.org>
|
||||||
* Copyright (c) 2021, David Isaksson <davidisaksson93@gmail.com>
|
* Copyright (c) 2021, David Isaksson <davidisaksson93@gmail.com>
|
||||||
|
* Copyright (c) 2022, the SerenityOS developers.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -134,7 +135,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~AudioWidget() override { }
|
virtual ~AudioWidget() override = default;
|
||||||
|
|
||||||
void set_audio_widget_size(bool show_percent)
|
void set_audio_widget_size(bool show_percent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
|
* Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
|
||||||
* Copyright (c) 2021, Mustafa Quraish <mustafa@cs.toronto.edu>
|
* Copyright (c) 2021, Mustafa Quraish <mustafa@cs.toronto.edu>
|
||||||
|
* Copyright (c) 2022, the SerenityOS developers.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -20,10 +21,6 @@ ClipboardHistoryModel::ClipboardHistoryModel()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ClipboardHistoryModel::~ClipboardHistoryModel()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
String ClipboardHistoryModel::column_name(int column) const
|
String ClipboardHistoryModel::column_name(int column) const
|
||||||
{
|
{
|
||||||
switch (column) {
|
switch (column) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
|
* Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
|
||||||
* Copyright (c) 2021, Mustafa Quraish <mustafa@cs.toronto.edu>
|
* Copyright (c) 2021, Mustafa Quraish <mustafa@cs.toronto.edu>
|
||||||
|
* Copyright (c) 2022, the SerenityOS developers.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -25,7 +26,7 @@ public:
|
||||||
__Count
|
__Count
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual ~ClipboardHistoryModel() override;
|
virtual ~ClipboardHistoryModel() override = default;
|
||||||
|
|
||||||
const GUI::Clipboard::DataAndType& item_at(int index) const { return m_history_items[index]; }
|
const GUI::Clipboard::DataAndType& item_at(int index) const { return m_history_items[index]; }
|
||||||
void remove_item(int index);
|
void remove_item(int index);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Timur Sultanov <SultanovTS@yandex.ru>
|
* Copyright (c) 2021, Timur Sultanov <SultanovTS@yandex.ru>
|
||||||
|
* Copyright (c) 2022, the SerenityOS developers.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -30,10 +31,6 @@ KeymapStatusWindow::KeymapStatusWindow()
|
||||||
m_status_widget->set_text(current_keymap_name.substring(0, 2));
|
m_status_widget->set_text(current_keymap_name.substring(0, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
KeymapStatusWindow::~KeymapStatusWindow()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void KeymapStatusWindow::wm_event(GUI::WMEvent& event)
|
void KeymapStatusWindow::wm_event(GUI::WMEvent& event)
|
||||||
{
|
{
|
||||||
if (event.type() == GUI::WMEvent::WM_KeymapChanged) {
|
if (event.type() == GUI::WMEvent::WM_KeymapChanged) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Timur Sultanov <SultanovTS@yandex.ru>
|
* Copyright (c) 2021, Timur Sultanov <SultanovTS@yandex.ru>
|
||||||
|
* Copyright (c) 2022, the SerenityOS developers.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -17,7 +18,7 @@ class KeymapStatusWidget : public GUI::Label {
|
||||||
class KeymapStatusWindow final : public GUI::Window {
|
class KeymapStatusWindow final : public GUI::Window {
|
||||||
C_OBJECT(KeymapStatusWindow)
|
C_OBJECT(KeymapStatusWindow)
|
||||||
public:
|
public:
|
||||||
virtual ~KeymapStatusWindow() override;
|
virtual ~KeymapStatusWindow() override = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void wm_event(GUI::WMEvent&) override;
|
virtual void wm_event(GUI::WMEvent&) override;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Peter Elliott <pelliott@serenityos.org>
|
* Copyright (c) 2021, Peter Elliott <pelliott@serenityos.org>
|
||||||
|
* Copyright (c) 2022, the SerenityOS developers.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -15,9 +16,7 @@ class DesktopStatusWidget : public GUI::Widget {
|
||||||
C_OBJECT(DesktopStatusWidget);
|
C_OBJECT(DesktopStatusWidget);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~DesktopStatusWidget() override
|
virtual ~DesktopStatusWidget() override = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Gfx::IntRect rect_for_desktop(unsigned row, unsigned col) const
|
Gfx::IntRect rect_for_desktop(unsigned row, unsigned col) const
|
||||||
{
|
{
|
||||||
|
@ -94,14 +93,12 @@ public:
|
||||||
unsigned gap() const { return m_gap; }
|
unsigned gap() const { return m_gap; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DesktopStatusWidget()
|
DesktopStatusWidget() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned m_gap { 1 };
|
unsigned m_gap { 1 };
|
||||||
|
|
||||||
unsigned m_current_row;
|
unsigned m_current_row { 0 };
|
||||||
unsigned m_current_col;
|
unsigned m_current_col { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
DesktopStatusWindow::DesktopStatusWindow()
|
DesktopStatusWindow::DesktopStatusWindow()
|
||||||
|
@ -114,10 +111,6 @@ DesktopStatusWindow::DesktopStatusWindow()
|
||||||
m_widget = &set_main_widget<DesktopStatusWidget>();
|
m_widget = &set_main_widget<DesktopStatusWidget>();
|
||||||
}
|
}
|
||||||
|
|
||||||
DesktopStatusWindow::~DesktopStatusWindow()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void DesktopStatusWindow::wm_event(GUI::WMEvent& event)
|
void DesktopStatusWindow::wm_event(GUI::WMEvent& event)
|
||||||
{
|
{
|
||||||
if (event.type() == GUI::Event::WM_WorkspaceChanged) {
|
if (event.type() == GUI::Event::WM_WorkspaceChanged) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Peter Elliott <pelliott@serenityos.org>
|
* Copyright (c) 2021, Peter Elliott <pelliott@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 DesktopStatusWindow : public GUI::Window {
|
||||||
C_OBJECT(DesktopStatusWindow);
|
C_OBJECT(DesktopStatusWindow);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~DesktopStatusWindow() override;
|
virtual ~DesktopStatusWindow() override = default;
|
||||||
|
|
||||||
virtual void wm_event(GUI::WMEvent&) override;
|
virtual void wm_event(GUI::WMEvent&) override;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue