From 6982a2e52bdef9fcfa1a422d74b9a6b3e972c144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Pereira?= Date: Fri, 27 Oct 2023 15:37:23 +0100 Subject: [PATCH] Use default to define a trivial constructor Thanks clang-tidy. --- src/bookmarkswidget.cpp | 4 +--- src/propertiesdialog.cpp | 5 +---- src/tab-switcher.cpp | 3 +-- src/terminalconfig.cpp | 4 +--- src/termwidgetholder.cpp | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/bookmarkswidget.cpp b/src/bookmarkswidget.cpp index e71fff9d..bab8f4db 100644 --- a/src/bookmarkswidget.cpp +++ b/src/bookmarkswidget.cpp @@ -341,9 +341,7 @@ BookmarksWidget::BookmarksWidget(QWidget *parent) }); } -BookmarksWidget::~BookmarksWidget() -{ -} +BookmarksWidget::~BookmarksWidget() = default; void BookmarksWidget::setup() { diff --git a/src/propertiesdialog.cpp b/src/propertiesdialog.cpp index 68565f0b..a64899dc 100644 --- a/src/propertiesdialog.cpp +++ b/src/propertiesdialog.cpp @@ -299,10 +299,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent) resize(s); } - -PropertiesDialog::~PropertiesDialog() -{ -} +PropertiesDialog::~PropertiesDialog() = default; void PropertiesDialog::accept() { diff --git a/src/tab-switcher.cpp b/src/tab-switcher.cpp index cd7be312..f91f02ab 100644 --- a/src/tab-switcher.cpp +++ b/src/tab-switcher.cpp @@ -104,8 +104,7 @@ TabSwitcher::TabSwitcher(TabWidget *tabs) connect(m_timer, &QTimer::timeout, this, &TabSwitcher::timer); } -TabSwitcher::~TabSwitcher() -{} +TabSwitcher::~TabSwitcher() = default; void TabSwitcher::showSwitcher() { diff --git a/src/terminalconfig.cpp b/src/terminalconfig.cpp index 85f78950..5e30ce88 100644 --- a/src/terminalconfig.cpp +++ b/src/terminalconfig.cpp @@ -14,9 +14,7 @@ TerminalConfig::TerminalConfig(const QString &wdir, const QStringList &shell) { } -TerminalConfig::TerminalConfig() -{ -} +TerminalConfig::TerminalConfig() = default; TerminalConfig::TerminalConfig(const TerminalConfig &cfg) : m_currentDirectory(cfg.m_currentDirectory), diff --git a/src/termwidgetholder.cpp b/src/termwidgetholder.cpp index 5df3f3ab..c0456d45 100644 --- a/src/termwidgetholder.cpp +++ b/src/termwidgetholder.cpp @@ -61,9 +61,7 @@ TermWidgetHolder::TermWidgetHolder(TerminalConfig &config, QWidget * parent) setLayout(lay); } -TermWidgetHolder::~TermWidgetHolder() -{ -} +TermWidgetHolder::~TermWidgetHolder() = default; void TermWidgetHolder::setInitialFocus() {