diff --git qtbase/src/widgets/widgets/qmenu.cpp qtbase/src/widgets/widgets/qmenu.cpp
index 7e48bad..00357c5 100644
|
|
static void copyActionToPlatformItem(const QAction *action, QPlatformMenuItem* i |
2978 | 2978 | { |
2979 | 2979 | item->setText(action->text()); |
2980 | 2980 | item->setIsSeparator(action->isSeparator()); |
2981 | | if (action->isIconVisibleInMenu()) |
| 2981 | if (action->isIconVisibleInMenu()) { |
2982 | 2982 | item->setIcon(action->icon()); |
| 2983 | // if (QWidget *w = action->parentWidget()) { |
| 2984 | // QStyleOption opt; |
| 2985 | // opt.init(w); |
| 2986 | // item->setIconSize(w->style()->pixelMetric(QStyle::PM_SmallIconSize, &opt, w)); |
| 2987 | // } else { |
| 2988 | // QStyleOption opt; |
| 2989 | // item->setIconSize(qApp->style()->pixelMetric(QStyle::PM_SmallIconSize, &opt, 0)); |
| 2990 | // } |
| 2991 | } else { |
| 2992 | item->setIcon(QIcon()); |
| 2993 | } |
2983 | 2994 | item->setVisible(action->isVisible()); |
2984 | 2995 | item->setShortcut(action->shortcut()); |
2985 | 2996 | item->setCheckable(action->isCheckable()); |