Now with pin generation for pairing
This commit is contained in:
parent
bd986bfb21
commit
0d26ef7e5c
1 changed files with 6 additions and 6 deletions
|
|
@ -94,8 +94,8 @@ GridView {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!model.busy) {
|
if (!model.busy) {
|
||||||
// TODO: generate pin
|
var pin = ("0000" + Math.floor(Math.random() * 10000)).slice(-4)
|
||||||
pairDialog.text = pairDialog.text.replace("XXXX", "1234")
|
pairDialog.pin = pin
|
||||||
// TODO: initiate pairing request
|
// TODO: initiate pairing request
|
||||||
pairDialog.open()
|
pairDialog.open()
|
||||||
}
|
}
|
||||||
|
|
@ -118,16 +118,16 @@ GridView {
|
||||||
modality:Qt.WindowModal
|
modality:Qt.WindowModal
|
||||||
|
|
||||||
text:"This PC is busy: make sure no game is streaming, and try again"
|
text:"This PC is busy: make sure no game is streaming, and try again"
|
||||||
standardButtons: Dialog.OK
|
standardButtons: StandardButton.Ok
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog {
|
MessageDialog {
|
||||||
id: pairDialog
|
id: pairDialog
|
||||||
// don't allow edits to the rest of the window while open
|
// don't allow edits to the rest of the window while open
|
||||||
modality:Qt.WindowModal
|
modality:Qt.WindowModal
|
||||||
|
property string pin : "0000"
|
||||||
text:"Please enter XXXX on your GameStream PC. This dialog will close when pairing is completed."
|
text:"Please enter " + pin + " on your GameStream PC. This dialog will close when pairing is completed."
|
||||||
standardButtons: Dialog.Cancel
|
standardButtons: StandardButton.Cancel
|
||||||
onRejected: {
|
onRejected: {
|
||||||
// FIXME: We should interrupt pairing here
|
// FIXME: We should interrupt pairing here
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue