Skip to content
Snippets Groups Projects
Commit 34fe53bc authored by Pierre Lamot's avatar Pierre Lamot Committed by Hugo Beauzée-Luyssen
Browse files

qt: directly bind to MainInterface in Qml menus

parent cc399841
No related branches found
No related tags found
1 merge request!968qml: merge MainContext and MainInterface
......@@ -418,7 +418,7 @@ FocusScope {
QmlGlobalMenu {
id: contextMenu
ctx: mainctx
ctx: mainInterface
}
}
}
......
......@@ -72,7 +72,7 @@ Item {
QmlMenuBar {
id: menubar
ctx: mainctx
ctx: mainInterface
menubar: menubarLayout
onMenuClosed: _menuIndex = -1
......
......@@ -38,7 +38,7 @@ class MLPlaylistListModel;
class MLPlaylistModel;
class NetworkDeviceModel;
class NetworkMediaModel;
class QmlMainContext;
class MainInterface;
namespace vlc {
namespace playlist {
class PlaylistControllerModel;
......@@ -94,7 +94,7 @@ private:
class QmlGlobalMenu : public VLCMenuBar
{
Q_OBJECT
SIMPLE_MENU_PROPERTY(QmlMainContext*, ctx, nullptr)
SIMPLE_MENU_PROPERTY(MainInterface*, ctx, nullptr)
public:
explicit QmlGlobalMenu(QObject *parent = nullptr);
~QmlGlobalMenu();
......@@ -114,7 +114,7 @@ class QmlMenuBarMenu;
class QmlMenuBar : public VLCMenuBar
{
Q_OBJECT
SIMPLE_MENU_PROPERTY(QmlMainContext*, ctx, nullptr)
SIMPLE_MENU_PROPERTY(MainInterface*, ctx, nullptr)
SIMPLE_MENU_PROPERTY(QQuickItem*, menubar, nullptr)
SIMPLE_MENU_PROPERTY(bool, openMenuOnHover, false)
......
......@@ -34,7 +34,7 @@ Widgets.IconControlButton {
QmlGlobalMenu {
id: contextMenu
ctx: mainctx
ctx: mainInterface
onAboutToShow: playerControlLayout.requestLockUnlockAutoHide(true, contextMenu)
onAboutToHide: playerControlLayout.requestLockUnlockAutoHide(false, contextMenu)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment