mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-17 22:00:05 +00:00
Increase Qt requirement to 5.12 and remove pre-5.12 workarounds
This commit is contained in:
@@ -2,10 +2,6 @@ import QtQuick 2.0
|
||||
import QtQuick.Controls 2.2
|
||||
|
||||
MenuItem {
|
||||
// Qt 5.10 has a menu property, but we need to support 5.9
|
||||
// so we must make our own.
|
||||
property Menu parentMenu
|
||||
|
||||
// Ensure focus can't be given to an invisible item
|
||||
enabled: visible
|
||||
height: visible ? implicitHeight : 0
|
||||
@@ -15,7 +11,7 @@ MenuItem {
|
||||
// We must close the context menu first or
|
||||
// it can steal focus from any dialogs that
|
||||
// onTriggered may spawn.
|
||||
parentMenu.close()
|
||||
menu.close()
|
||||
}
|
||||
|
||||
Keys.onReturnPressed: {
|
||||
@@ -27,6 +23,6 @@ MenuItem {
|
||||
}
|
||||
|
||||
Keys.onEscapePressed: {
|
||||
parentMenu.close()
|
||||
menu.close()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user