summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenu_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets/qmenu_p.h')
-rw-r--r--src/widgets/widgets/qmenu_p.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h
index 64d22087e3..b6afb05e3a 100644
--- a/src/widgets/widgets/qmenu_p.h
+++ b/src/widgets/widgets/qmenu_p.h
@@ -177,7 +177,7 @@ public:
QSetValueOnDestroy<QPointF> setPreviousPoint(m_previous_point, mousePos);
if (resetAction && resetAction->isSeparator()) {
- m_reset_action = Q_NULLPTR;
+ m_reset_action = nullptr;
m_use_reset_action = true;
} else if (m_reset_action != resetAction) {
if (m_use_reset_action && resetAction) {
@@ -272,6 +272,7 @@ public:
QMenuPrivate() :
itemsDirty(false),
hasCheckableItems(false),
+ lastContextMenu(false),
collapsibleSeparators(true),
toolTipsVisible(false),
delayedPopupGuard(false),
@@ -294,6 +295,9 @@ public:
QPlatformMenu *createPlatformMenu();
void setPlatformMenu(QPlatformMenu *menu);
void syncPlatformMenu();
+ void copyActionToPlatformItem(const QAction *action, QPlatformMenuItem *item);
+ QPlatformMenuItem *insertActionInPlatformMenu(const QAction *action, QPlatformMenuItem *beforeItem);
+
#ifdef Q_OS_OSX
void moveWidgetToPlatformItem(QWidget *w, QPlatformMenuItem* item);
#endif
@@ -301,6 +305,8 @@ public:
static QMenuPrivate *get(QMenu *m) { return m->d_func(); }
int scrollerHeight() const;
+ bool isContextMenu() const;
+
//item calculations
QRect actionRect(QAction *) const;
@@ -436,8 +442,8 @@ public:
public:
enum Type { ScrollUp, ScrollDown };
ScrollerTearOffItem(Type type, QMenuPrivate *mPrivate,
- QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
- void paintEvent(QPaintEvent *e) Q_DECL_OVERRIDE;
+ QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
+ void paintEvent(QPaintEvent *e) override;
void updateScrollerRects(const QRect &rect);
private:
@@ -462,6 +468,7 @@ public:
mutable bool itemsDirty : 1;
mutable bool hasCheckableItems : 1;
+ bool lastContextMenu : 1;
bool collapsibleSeparators : 1;
bool toolTipsVisible : 1;
bool delayedPopupGuard : 1;