┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinrecenttabsmenu.cpp
diff options
context:
space:
mode:
authorSerg Podtynnyi <[email protected]>2023-02-04 00:14:53 +0700
committerSerg Podtynnyi <[email protected]>2023-02-05 12:45:38 +0700
commit38c34eeca315c7be58e65d4d3fb72aaf7b866719 (patch)
tree886e53f20c9c43edc3eb7fe04789716a9bc98ebe /src/dolphinrecenttabsmenu.cpp
parentffff8af851e3a386c44438337779d0ce7ca98a61 (diff)
Add clang-format and format code as in Frameworks
Diffstat (limited to 'src/dolphinrecenttabsmenu.cpp')
-rw-r--r--src/dolphinrecenttabsmenu.cpp15
1 files changed, 7 insertions, 8 deletions
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 <QMenu>
-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<QAction*> actions = menu()->actions();
+ QList<QAction *> actions = menu()->actions();
const int count = actions.size();
for (int i = count - 1; i >= 2; i--) {
removeAction(actions.at(i));