]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinrecenttabsmenu.cpp
Merge branch 'release/20.12'
[dolphin.git] / src / dolphinrecenttabsmenu.cpp
index f425df21805cf218d89500c99145a8da721a3c99..dede2f643fca56c2443fda451f7739b68def4927 100644 (file)
@@ -1,27 +1,15 @@
-/***************************************************************************
- * Copyright (C) 2014 by Emmanuel Pescosta <emmanuelpescosta099@gmail.com> *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
- ***************************************************************************/
+/*
+ * SPDX-FileCopyrightText: 2014 Emmanuel Pescosta <emmanuelpescosta099@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
 
 #include "dolphinrecenttabsmenu.h"
 
-#include <KLocalizedString>
 #include <KAcceleratorManager>
+#include <KLocalizedString>
 #include <kio/global.h>
+
 #include <QMenu>
 
 DolphinRecentTabsMenu::DolphinRecentTabsMenu(QObject* parent) :
@@ -55,7 +43,7 @@ void DolphinRecentTabsMenu::rememberClosedTab(const QUrl& url, const QByteArray&
     } else {
         insertAction(menu()->actions().at(2), action);
     }
-    emit closedTabsCountChanged(menu()->actions().size() - 2);
+    Q_EMIT closedTabsCountChanged(menu()->actions().size() - 2);
     // Assure that only up to 6 closed tabs are shown in the menu.
     // 8 because of clear action + separator + 6 closed tabs
     if (menu()->actions().size() > 8) {
@@ -81,14 +69,14 @@ void DolphinRecentTabsMenu::handleAction(QAction* action)
         for (int i = 2; i < count; ++i) {
             removeAction(actions.at(i));
         }
-        emit closedTabsCountChanged(0);
+        Q_EMIT closedTabsCountChanged(0);
     } else {
         const QByteArray state = action->data().toByteArray();
         removeAction(action);
         delete action;
         action = nullptr;
-        emit restoreClosedTab(state);
-        emit closedTabsCountChanged(menu()->actions().size() - 2);
+        Q_EMIT restoreClosedTab(state);
+        Q_EMIT closedTabsCountChanged(menu()->actions().size() - 2);
     }
 
     if (menu()->actions().count() <= 2) {