mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 09:09:04 +00:00
Qt: Remove ActionHelper
This commit is contained in:
parent
4266d1f237
commit
a22ffb6387
11 changed files with 155 additions and 188 deletions
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2017 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QAction>
|
||||
#include <QKeySequence>
|
||||
#include <QString>
|
||||
|
||||
// Since we have to support Qt < 5.6, we need our own implementation of addAction(QString&
|
||||
// text,QObject*,PointerToMemberFunction);
|
||||
template <typename ParentClass, typename RecieverClass, typename Func>
|
||||
QAction* AddAction(ParentClass* parent, const QString& text, const RecieverClass* receiver,
|
||||
Func slot, const QKeySequence& shortcut = 0)
|
||||
{
|
||||
QAction* action = parent->addAction(text);
|
||||
action->setShortcut(shortcut);
|
||||
action->connect(action, &QAction::triggered, receiver, slot);
|
||||
|
||||
return action;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue