// Copyright 2017 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. #pragma once #include #include #include // Since we have to support Qt < 5.6, we need our own implementation of addAction(QString& // text,QObject*,PointerToMemberFunction); template 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; }