mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
[Cleanup] Deleted unused ActionCopy class
Also added myself to ComboTabBar copyright
This commit is contained in:
parent
98907c2055
commit
7469aced65
@ -52,7 +52,6 @@
|
||||
#include "pagescreen.h"
|
||||
#include "bookmarksimport/bookmarksimportdialog.h"
|
||||
#include "qztools.h"
|
||||
#include "actioncopy.h"
|
||||
#include "reloadstopbutton.h"
|
||||
#include "enhancedmenu.h"
|
||||
#include "navigationcontainer.h"
|
||||
@ -345,12 +344,6 @@ void BrowserWindow::setupMenu()
|
||||
{
|
||||
// TODO: Mac menu
|
||||
#ifdef Q_OS_MAC
|
||||
ActionCopy* copyActionPrivateBrowsing = new ActionCopy(m_actionPrivateBrowsing);
|
||||
copyActionPrivateBrowsing->setText(copyActionPrivateBrowsing->text().remove(QLatin1Char('&')));
|
||||
mApp->macDockMenu()->addAction(copyActionPrivateBrowsing);
|
||||
mApp->macDockMenu()->addAction(m_menuFile->actions().at(1));
|
||||
mApp->macDockMenu()->addAction(m_menuFile->actions().at(0));
|
||||
|
||||
return;
|
||||
#endif
|
||||
setMenuBar(new MenuBar(this));
|
||||
|
@ -197,7 +197,6 @@ SOURCES += \
|
||||
tabwidget/tabpreview.cpp \
|
||||
tabwidget/tabstackedwidget.cpp \
|
||||
tabwidget/tabwidget.cpp \
|
||||
tools/actioncopy.cpp \
|
||||
tools/aesinterface.cpp \
|
||||
tools/animatedwidget.cpp \
|
||||
tools/buttonbox.cpp \
|
||||
@ -401,7 +400,6 @@ HEADERS += \
|
||||
tabwidget/tabpreview.h \
|
||||
tabwidget/tabstackedwidget.h \
|
||||
tabwidget/tabwidget.h \
|
||||
tools/actioncopy.h \
|
||||
tools/aesinterface.h \
|
||||
tools/animatedwidget.h \
|
||||
tools/buttonbox.h \
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2013-2014 S. Razi Alavizadeh <s.r.alavizadeh@gmail.com>
|
||||
* Copyright (C) 2014 David Rosca <nowrep@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
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2013-2014 S. Razi Alavizadeh <s.r.alavizadeh@gmail.com>
|
||||
* Copyright (C) 2014 David Rosca <nowrep@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
|
||||
|
@ -87,7 +87,6 @@ void TabStackedWidget::tabWasMoved(int from, int to)
|
||||
QWidget* w = m_stack->widget(from);
|
||||
m_stack->removeWidget(w);
|
||||
m_stack->insertWidget(to, w);
|
||||
m_stack->setCurrentIndex(currentIndex());
|
||||
m_stack->blockSignals(false);
|
||||
}
|
||||
|
||||
|
@ -1,49 +0,0 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2013-2014 David Rosca <nowrep@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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
* ============================================================ */
|
||||
#include "actioncopy.h"
|
||||
|
||||
ActionCopy::ActionCopy(QAction* original, QObject* parent)
|
||||
: QAction(parent)
|
||||
, m_action(original)
|
||||
{
|
||||
updateAction();
|
||||
|
||||
connect(m_action, SIGNAL(changed()), this, SLOT(updateAction()));
|
||||
connect(this, SIGNAL(toggled(bool)), this, SLOT(actionToggled()));
|
||||
connect(this, SIGNAL(triggered()), this, SLOT(actionTriggered()));
|
||||
}
|
||||
|
||||
void ActionCopy::updateAction()
|
||||
{
|
||||
const QString shortcutString = m_action->shortcut().toString(QKeySequence::NativeText);
|
||||
const QString actionText = QString("%1\t%2").arg(m_action->text(), shortcutString);
|
||||
|
||||
setText(actionText);
|
||||
setIcon(m_action->icon());
|
||||
|
||||
}
|
||||
|
||||
void ActionCopy::actionToggled()
|
||||
{
|
||||
m_action->toggle();
|
||||
}
|
||||
|
||||
void ActionCopy::actionTriggered()
|
||||
{
|
||||
m_action->trigger();
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
/* ============================================================
|
||||
* QupZilla - WebKit based browser
|
||||
* Copyright (C) 2013-2014 David Rosca <nowrep@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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
* ============================================================ */
|
||||
#ifndef ACTIONCOPY_H
|
||||
#define ACTIONCOPY_H
|
||||
|
||||
#include <QAction>
|
||||
|
||||
#include "qzcommon.h"
|
||||
|
||||
class QUPZILLA_EXPORT ActionCopy : public QAction
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ActionCopy(QAction* original, QObject* parent = 0);
|
||||
|
||||
private slots:
|
||||
void updateAction();
|
||||
|
||||
void actionToggled();
|
||||
void actionTriggered();
|
||||
|
||||
private:
|
||||
QAction* m_action;
|
||||
|
||||
};
|
||||
|
||||
#endif // ACTIONCOPY_H
|
Loading…
Reference in New Issue
Block a user