From 38c34eeca315c7be58e65d4d3fb72aaf7b866719 Mon Sep 17 00:00:00 2001 From: Serg Podtynnyi Date: Sat, 4 Feb 2023 00:14:53 +0700 Subject: Add clang-format and format code as in Frameworks --- src/dolphinrecenttabsmenu.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/dolphinrecenttabsmenu.cpp') diff --git a/src/dolphinrecenttabsmenu.cpp b/src/dolphinrecenttabsmenu.cpp index adc6a8eda..902325a1e 100644 --- a/src/dolphinrecenttabsmenu.cpp +++ b/src/dolphinrecenttabsmenu.cpp @@ -12,8 +12,8 @@ #include -DolphinRecentTabsMenu::DolphinRecentTabsMenu(QObject* parent) : - KActionMenu(QIcon::fromTheme(QStringLiteral("edit-undo")), i18n("Recently Closed Tabs"), parent) +DolphinRecentTabsMenu::DolphinRecentTabsMenu(QObject *parent) + : KActionMenu(QIcon::fromTheme(QStringLiteral("edit-undo")), i18n("Recently Closed Tabs"), parent) { setPopupMode(QToolButton::InstantPopup); setEnabled(false); @@ -24,13 +24,12 @@ DolphinRecentTabsMenu::DolphinRecentTabsMenu(QObject* parent) : addSeparator(); - connect(menu(), &QMenu::triggered, - this, &DolphinRecentTabsMenu::handleAction); + connect(menu(), &QMenu::triggered, this, &DolphinRecentTabsMenu::handleAction); } -void DolphinRecentTabsMenu::rememberClosedTab(const QUrl& url, const QByteArray& state) +void DolphinRecentTabsMenu::rememberClosedTab(const QUrl &url, const QByteArray &state) { - QAction* action = new QAction(menu()); + QAction *action = new QAction(menu()); action->setText(url.path()); action->setData(state); const QString iconName = KIO::iconNameForUrl(url); @@ -59,12 +58,12 @@ void DolphinRecentTabsMenu::undoCloseTab() handleAction(menu()->actions().at(2)); } -void DolphinRecentTabsMenu::handleAction(QAction* action) +void DolphinRecentTabsMenu::handleAction(QAction *action) { if (action == m_clearListAction) { // Clear all actions except the "Empty Recently Closed Tabs" // action and the separator - QList actions = menu()->actions(); + QList actions = menu()->actions(); const int count = actions.size(); for (int i = count - 1; i >= 2; i--) { removeAction(actions.at(i)); -- cgit v1.3