Removed redundant argument from action menu item constructor.
This commit is contained in:
parent
0c5135f671
commit
3640f69369
3 changed files with 4 additions and 7 deletions
|
|
@ -88,8 +88,7 @@ not_null<QAction*> Menu::addAction(
|
||||||
_st,
|
_st,
|
||||||
std::move(action),
|
std::move(action),
|
||||||
icon,
|
icon,
|
||||||
iconOver ? iconOver : icon,
|
iconOver ? iconOver : icon);
|
||||||
(action->menu() != nullptr));
|
|
||||||
return addAction(std::move(item));
|
return addAction(std::move(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,7 @@ Action::Action(
|
||||||
const style::Menu &st,
|
const style::Menu &st,
|
||||||
not_null<QAction*> action,
|
not_null<QAction*> action,
|
||||||
const style::icon *icon,
|
const style::icon *icon,
|
||||||
const style::icon *iconOver,
|
const style::icon *iconOver)
|
||||||
bool hasSubmenu)
|
|
||||||
: ItemBase(parent, st)
|
: ItemBase(parent, st)
|
||||||
, _action(action)
|
, _action(action)
|
||||||
, _st(st)
|
, _st(st)
|
||||||
|
|
@ -64,7 +63,7 @@ Action::Action(
|
||||||
|
|
||||||
initResizeHook(parent->sizeValue());
|
initResizeHook(parent->sizeValue());
|
||||||
processAction();
|
processAction();
|
||||||
setHasSubmenu(hasSubmenu);
|
setHasSubmenu(action->menu() != nullptr);
|
||||||
|
|
||||||
paintRequest(
|
paintRequest(
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@ public:
|
||||||
const style::Menu &st,
|
const style::Menu &st,
|
||||||
not_null<QAction*> action,
|
not_null<QAction*> action,
|
||||||
const style::icon *icon,
|
const style::icon *icon,
|
||||||
const style::icon *iconOver,
|
const style::icon *iconOver);
|
||||||
bool hasSubmenu);
|
|
||||||
|
|
||||||
bool isEnabled() const override;
|
bool isEnabled() const override;
|
||||||
QAction *action() const override;
|
QAction *action() const override;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue