Sun, 19 Jan 2020 02:54:48 +0200
commit work on GL rendering
#include "uiutilities.h" QVector<QAction*> uiutilities::collectActions(QObject* subject) { QVector<QAction*> actions; for (QAction* action : subject->findChildren<QAction*>()) { if (not action->text().isEmpty() and action->data().isNull() and not action->objectName().isEmpty()) { actions.push_back(action); } } return actions; } uiutilities::KeySequenceMap uiutilities::makeKeySequenceMap(const QVector<QAction*>& actions) { KeySequenceMap result; for (QAction* action : actions) { result[action->objectName()] = action->shortcut(); } return result; }