New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WL 21668 - Make sure all Prompts are correctly emitting a signal on cancel and that cancellations return null #12386

merged 2 commits into from Feb 16, 2018


None yet
7 participants

cainkilgore commented Feb 12, 2018

Window.promptAsync() and other async Window prompts should correctly emit a signal on cancel with a null value.

Run through all items marked Async to make sure they are emitting signals on cancellation and also make sure that Window.prompt() is returning null on cancel.

Worklist 21668

Test Plan

  1. Copy and paste this block of code into your console:
    Window.promptTextChanged.connect(function(e) { print("(promptAsync) promptTextChanged: " + e); });
    Window.browseDirChanged.connect(function(e) { print("(browseDirAsync) browseDirChanged: " + e); });
    Window.browseChanged.connect(function(e) { print("(browseAsync) browseChanged: " + e); });
    Window.assetsDirChanged.connect(function(e) { print("(browseAssetsAsync) assetsDirChanged: " + e); });
    Window.saveFileChanged.connect(function(e) { print("(saveAsync) saveFileChanged: " + e); });
  1. Run through each of the following Window methods, and confirm that closing/cancelling out of them prints the lines below in console.
Command Expected Result
Window.prompt("Hello", "world"); null
Window.promptAsync("Hello", "world"); (promptAsync) promptTextChanged:
Window.browseAsync() (browseAsync) browseChanged:
Window.browseDirAsync("Hello world"); (browseDirAsync) browseDirChanged:
Window.browseAssetsAsync("Hello world"); (browseAssetsAsync) assetsDirChanged:
Window.saveAsync("Hello world"); (saveAsync) saveFileChanged:
Cain Kilgore

This comment has been minimized.


This comment has been minimized.

@@ -336,10 +336,11 @@ class InputDialogListener : public ModalDialogListener {
connect(_dialog, SIGNAL(selected(QVariant)), this, SLOT(onSelected(const QVariant&)));
connect(_dialog, SIGNAL(canceled()), this, SLOT(onSelected()));

This comment has been minimized.


jherico Feb 13, 2018


I don't get why we wouldn't want to have a specific slot for a cancel operation so that we wouldn't need to do the empty string check in the scripting interface.


This comment has been minimized.

sbennett77 commented Feb 14, 2018

Currently Testing.


This comment has been minimized.

sbennett77 commented Feb 14, 2018

@MiladNazeri MiladNazeri merged commit 331b253 into highfidelity:master Feb 16, 2018

2 checks passed

default Build finished.
license/cla Contributor License Agreement is signed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment