History

Cleanup of QML windowing and message boxes

Brad Davis committed 10 years ago

Commit 746c3881 parent bb02a1e59 files · +3253 −2867Browse files

Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 59 files). Show all

Unified · Split

interface/src/scripting/WindowScriptingInterface.cpp+3−3
@@ -168,9 +168,9 @@ QScriptValue WindowScriptingInterface::showAlert(const QString& message) { · 167 unmodified lines
168168 /// \return QScriptValue `true` if 'Yes' was clicked, `false` otherwise
169169 QScriptValue WindowScriptingInterface::showConfirm(const QString& message) {
170170 bool confirm = false;
171− OffscreenUi::question("", message, [&](QMessageBox::StandardButton response){
172− confirm = (response == QMessageBox::Yes);
173− });
171+ if (QMessageBox::Yes == OffscreenUi::question("", message)) {
172+ confirm = true;
173+ }
174174 return QScriptValue(confirm);
175175 }
176176