Wrapped raw QAction pointers with not_null in menu items.
This commit is contained in:
parent
a6a2a8dde0
commit
4325eb2f1b
5 changed files with 5 additions and 5 deletions
|
|
@ -173,7 +173,7 @@ bool Action::isEnabled() const {
|
||||||
return _action->isEnabled();
|
return _action->isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *Action::action() const {
|
not_null<QAction*> Action::action() const {
|
||||||
return _action;
|
return _action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ public:
|
||||||
const style::icon *iconOver);
|
const style::icon *iconOver);
|
||||||
|
|
||||||
bool isEnabled() const override;
|
bool isEnabled() const override;
|
||||||
QAction *action() const override;
|
not_null<QAction*> action() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QPoint prepareRippleStartPosition() const override;
|
QPoint prepareRippleStartPosition() const override;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public:
|
||||||
bool hasSubmenu() const;
|
bool hasSubmenu() const;
|
||||||
void setHasSubmenu(bool value);
|
void setHasSubmenu(bool value);
|
||||||
|
|
||||||
virtual QAction *action() const = 0;
|
virtual not_null<QAction*> action() const = 0;
|
||||||
virtual bool isEnabled() const = 0;
|
virtual bool isEnabled() const = 0;
|
||||||
|
|
||||||
virtual void finishAnimating();
|
virtual void finishAnimating();
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ Separator::Separator(
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *Separator::action() const {
|
not_null<QAction*> Separator::action() const {
|
||||||
return _action;
|
return _action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public:
|
||||||
const style::Menu &st,
|
const style::Menu &st,
|
||||||
not_null<QAction*> action);
|
not_null<QAction*> action);
|
||||||
|
|
||||||
QAction *action() const override;
|
not_null<QAction*> action() const override;
|
||||||
bool isEnabled() const override;
|
bool isEnabled() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue