mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 17:27:46 +00:00
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."
This commit is contained in:
parent
6be75bd5e4
commit
160bda7228
195 changed files with 335 additions and 638 deletions
|
@ -2,6 +2,7 @@
|
|||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021, Jakob-Niklas See <git@nwex.de>
|
||||
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -131,10 +132,6 @@ BrowserWindow::BrowserWindow(CookieJar& cookie_jar, URL url)
|
|||
create_new_tab(move(url), true);
|
||||
}
|
||||
|
||||
BrowserWindow::~BrowserWindow()
|
||||
{
|
||||
}
|
||||
|
||||
void BrowserWindow::build_menus()
|
||||
{
|
||||
auto& file_menu = add_menu("&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
|
||||
*/
|
||||
|
@ -21,7 +22,7 @@ class BrowserWindow final : public GUI::Window {
|
|||
C_OBJECT(BrowserWindow);
|
||||
|
||||
public:
|
||||
virtual ~BrowserWindow() override;
|
||||
virtual ~BrowserWindow() override = default;
|
||||
|
||||
GUI::TabWidget& tab_widget();
|
||||
Tab& active_tab();
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright (c) 2020, Hunter Salyer <thefalsehonesty@gmail.com>
|
||||
* Copyright (c) 2021, 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
|
||||
*/
|
||||
|
@ -68,10 +69,6 @@ ConsoleWidget::ConsoleWidget()
|
|||
};
|
||||
}
|
||||
|
||||
ConsoleWidget::~ConsoleWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void ConsoleWidget::request_console_messages()
|
||||
{
|
||||
VERIFY(!m_waiting_for_messages);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright (c) 2020, Hunter Salyer <thefalsehonesty@gmail.com>
|
||||
* Copyright (c) 2021, 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
|
||||
*/
|
||||
|
@ -17,7 +18,7 @@ namespace Browser {
|
|||
class ConsoleWidget final : public GUI::Widget {
|
||||
C_OBJECT(ConsoleWidget)
|
||||
public:
|
||||
virtual ~ConsoleWidget();
|
||||
virtual ~ConsoleWidget() = default;
|
||||
|
||||
void notify_about_new_console_message(i32 message_index);
|
||||
void handle_console_messages(i32 start_index, Vector<String> const& message_types, Vector<String> const& messages);
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
@ -110,10 +111,6 @@ DownloadWidget::DownloadWidget(const URL& url)
|
|||
};
|
||||
}
|
||||
|
||||
DownloadWidget::~DownloadWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void DownloadWidget::did_progress(Optional<u32> total_size, u32 downloaded_size)
|
||||
{
|
||||
m_progressbar->set_min(0);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -20,7 +21,7 @@ class DownloadWidget final : public GUI::Widget {
|
|||
C_OBJECT(DownloadWidget);
|
||||
|
||||
public:
|
||||
virtual ~DownloadWidget() override;
|
||||
virtual ~DownloadWidget() override = default;
|
||||
|
||||
private:
|
||||
explicit DownloadWidget(const URL&);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2018-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
|
||||
*/
|
||||
|
@ -95,10 +96,6 @@ InspectorWidget::InspectorWidget()
|
|||
m_dom_tree_view->set_focus(true);
|
||||
}
|
||||
|
||||
InspectorWidget::~InspectorWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void InspectorWidget::select_default_node()
|
||||
{
|
||||
clear_style_json();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2018-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
|
||||
*/
|
||||
|
@ -15,7 +16,7 @@ namespace Browser {
|
|||
class InspectorWidget final : public GUI::Widget {
|
||||
C_OBJECT(InspectorWidget)
|
||||
public:
|
||||
virtual ~InspectorWidget();
|
||||
virtual ~InspectorWidget() = default;
|
||||
|
||||
void set_web_view(NonnullRefPtr<Web::OutOfProcessWebView> web_view) { m_web_view = web_view; }
|
||||
void set_dom_json(String);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2021, Maciej Zygmanowski <sppmacd@pm.me>
|
||||
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -351,10 +352,6 @@ Tab::Tab(BrowserWindow& window)
|
|||
};
|
||||
}
|
||||
|
||||
Tab::~Tab()
|
||||
{
|
||||
}
|
||||
|
||||
void Tab::load(const URL& url, LoadType load_type)
|
||||
{
|
||||
m_is_history_navigation = (load_type == LoadType::HistoryNavigation);
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
@ -32,7 +33,7 @@ class Tab final : public GUI::Widget {
|
|||
friend class BrowserWindow;
|
||||
|
||||
public:
|
||||
virtual ~Tab() override;
|
||||
virtual ~Tab() override = default;
|
||||
|
||||
URL url() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue