X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/0dd0b65bf02f52da0d2e9d270160e69b81a357ca..9e4642d435085f27134ed6c8431734dcacf65834:/src/dolphinrecenttabsmenu.cpp diff --git a/src/dolphinrecenttabsmenu.cpp b/src/dolphinrecenttabsmenu.cpp index f425df218..dede2f643 100644 --- a/src/dolphinrecenttabsmenu.cpp +++ b/src/dolphinrecenttabsmenu.cpp @@ -1,27 +1,15 @@ -/*************************************************************************** - * Copyright (C) 2014 by Emmanuel Pescosta * - * * - * 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 + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinrecenttabsmenu.h" -#include #include +#include #include + #include 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) {