summaryrefslogtreecommitdiff
path: root/Userland/Applications/Mail
diff options
context:
space:
mode:
authorLenny Maiorani <lenny@serenityos.org>2022-02-10 12:28:48 -0700
committerLinus Groh <mail@linusgroh.de>2022-02-14 22:06:55 +0000
commit160bda72280fd61e3059163c267abf542439f852 (patch)
tree036dd1a14419934255933487c62237ba8d80b0fd /Userland/Applications/Mail
parent6be75bd5e41f40b31721e5c22184d50ae1c440b7 (diff)
downloadserenity-160bda72280fd61e3059163c267abf542439f852.zip
Applications: 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."
Diffstat (limited to 'Userland/Applications/Mail')
-rw-r--r--Userland/Applications/Mail/AccountHolder.cpp5
-rw-r--r--Userland/Applications/Mail/AccountHolder.h3
-rw-r--r--Userland/Applications/Mail/InboxModel.cpp5
-rw-r--r--Userland/Applications/Mail/InboxModel.h3
-rw-r--r--Userland/Applications/Mail/MailWidget.cpp5
-rw-r--r--Userland/Applications/Mail/MailWidget.h3
-rw-r--r--Userland/Applications/Mail/MailboxTreeModel.cpp5
-rw-r--r--Userland/Applications/Mail/MailboxTreeModel.h3
8 files changed, 12 insertions, 20 deletions
diff --git a/Userland/Applications/Mail/AccountHolder.cpp b/Userland/Applications/Mail/AccountHolder.cpp
index f2edd1b236..e9f56a973b 100644
--- a/Userland/Applications/Mail/AccountHolder.cpp
+++ b/Userland/Applications/Mail/AccountHolder.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -11,10 +12,6 @@ AccountHolder::AccountHolder()
m_mailbox_tree_model = MailboxTreeModel::create(*this);
}
-AccountHolder::~AccountHolder()
-{
-}
-
void AccountHolder::add_account_with_name_and_mailboxes(String name, Vector<IMAP::ListItem> const& mailboxes)
{
auto account = AccountNode::create(move(name));
diff --git a/Userland/Applications/Mail/AccountHolder.h b/Userland/Applications/Mail/AccountHolder.h
index 56a134a15d..fa694f271a 100644
--- a/Userland/Applications/Mail/AccountHolder.h
+++ b/Userland/Applications/Mail/AccountHolder.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -86,7 +87,7 @@ private:
class AccountHolder {
public:
- ~AccountHolder();
+ ~AccountHolder() = default;
static NonnullOwnPtr<AccountHolder> create()
{
diff --git a/Userland/Applications/Mail/InboxModel.cpp b/Userland/Applications/Mail/InboxModel.cpp
index 4c1417e0ad..c5a1a39295 100644
--- a/Userland/Applications/Mail/InboxModel.cpp
+++ b/Userland/Applications/Mail/InboxModel.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -11,10 +12,6 @@ InboxModel::InboxModel(Vector<InboxEntry> entries)
{
}
-InboxModel::~InboxModel()
-{
-}
-
int InboxModel::row_count(GUI::ModelIndex const&) const
{
return m_entries.size();
diff --git a/Userland/Applications/Mail/InboxModel.h b/Userland/Applications/Mail/InboxModel.h
index 02d2f569d9..a878d77e30 100644
--- a/Userland/Applications/Mail/InboxModel.h
+++ b/Userland/Applications/Mail/InboxModel.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -27,7 +28,7 @@ public:
return adopt_ref(*new InboxModel(move(inbox_entries)));
}
- virtual ~InboxModel() override;
+ virtual ~InboxModel() override = default;
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return Column::__Count; }
diff --git a/Userland/Applications/Mail/MailWidget.cpp b/Userland/Applications/Mail/MailWidget.cpp
index e5e6670233..50fe6aad45 100644
--- a/Userland/Applications/Mail/MailWidget.cpp
+++ b/Userland/Applications/Mail/MailWidget.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
* Copyright (c) 2021, Undefine <cqundefine@gmail.com>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -95,10 +96,6 @@ MailWidget::MailWidget()
};
}
-MailWidget::~MailWidget()
-{
-}
-
bool MailWidget::connect_and_login()
{
auto server = Config::read_string("Mail", "Connection", "Server", {});
diff --git a/Userland/Applications/Mail/MailWidget.h b/Userland/Applications/Mail/MailWidget.h
index fe135f6035..650e0d65a1 100644
--- a/Userland/Applications/Mail/MailWidget.h
+++ b/Userland/Applications/Mail/MailWidget.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -17,7 +18,7 @@
class MailWidget final : public GUI::Widget {
C_OBJECT(MailWidget)
public:
- virtual ~MailWidget() override;
+ virtual ~MailWidget() override = default;
bool connect_and_login();
diff --git a/Userland/Applications/Mail/MailboxTreeModel.cpp b/Userland/Applications/Mail/MailboxTreeModel.cpp
index eb80315f8c..9f78366852 100644
--- a/Userland/Applications/Mail/MailboxTreeModel.cpp
+++ b/Userland/Applications/Mail/MailboxTreeModel.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -15,10 +16,6 @@ MailboxTreeModel::MailboxTreeModel(AccountHolder const& account_holder)
m_account_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/home-directory.png").release_value_but_fixme_should_propagate_errors());
}
-MailboxTreeModel::~MailboxTreeModel()
-{
-}
-
GUI::ModelIndex MailboxTreeModel::index(int row, int column, GUI::ModelIndex const& parent) const
{
if (!parent.is_valid()) {
diff --git a/Userland/Applications/Mail/MailboxTreeModel.h b/Userland/Applications/Mail/MailboxTreeModel.h
index 3df0c1ba62..3683f6034b 100644
--- a/Userland/Applications/Mail/MailboxTreeModel.h
+++ b/Userland/Applications/Mail/MailboxTreeModel.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
+ * Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -18,7 +19,7 @@ public:
return adopt_ref(*new MailboxTreeModel(account_holder));
}
- virtual ~MailboxTreeModel() override;
+ virtual ~MailboxTreeModel() override = default;
virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override;