15 * You should have received a copy of the GNU General Public License |
15 * You should have received a copy of the GNU General Public License |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 */ |
17 */ |
18 |
18 |
19 #include <QStyleFactory> |
19 #include <QStyleFactory> |
|
20 #include <QWidget> |
20 #include "uiutilities.h" |
21 #include "uiutilities.h" |
21 |
22 |
22 QVector<QAction*> uiutilities::collectActions(QObject* subject) |
23 std::vector<QAction*> uiutilities::collectActions(QObject* subject) |
23 { |
24 { |
24 QVector<QAction*> actions; |
25 std::vector<QAction*> actions; |
25 for (QAction* action : subject->findChildren<QAction*>()) |
26 for (QAction* action : subject->findChildren<QAction*>()) |
26 { |
27 { |
27 if (not action->text().isEmpty() |
28 if (not action->text().isEmpty() |
28 and action->data().isNull() |
29 and action->data().isNull() |
29 and not action->objectName().isEmpty()) |
30 and not action->objectName().isEmpty()) |