Showing the changes to interface/src/Application_UI.cpp (1 of 42 files). Show all
Unified · Split
| @@ -339,7 +339,7 @@ void Application::confirmConnectWithoutAvatarEntities() { · 338 unmodified lines | ||
| 339 | 339 | _confirmConnectWithoutAvatarEntitiesDialog = OffscreenUi::asyncQuestion("Continue Without Wearables", continueMessage, |
| 340 | 340 | QMessageBox::Yes | QMessageBox::No); |
| 341 | 341 | if (_confirmConnectWithoutAvatarEntitiesDialog->getDialogItem()) { |
| 342 | − QObject::connect(_confirmConnectWithoutAvatarEntitiesDialog, &ModalDialogListener::response, this, [=](QVariant answer) { | |
| 342 | + QObject::connect(_confirmConnectWithoutAvatarEntitiesDialog, &ModalDialogListener::response, this, [=, this](QVariant answer) { | |
| 343 | 343 | QObject::disconnect(_confirmConnectWithoutAvatarEntitiesDialog, &ModalDialogListener::response, this, nullptr); |
| 344 | 344 | _confirmConnectWithoutAvatarEntitiesDialog = nullptr; |
| 345 | 345 | bool shouldConnect = (static_cast<QMessageBox::StandardButton>(answer.toInt()) == QMessageBox::Yes); |
| @@ -490,7 +490,7 @@ void Application::loadDialog() { · 144 unmodified lines | ||
| 490 | 490 | ModalDialogListener* dlg = OffscreenUi::getOpenFileNameAsync(_glWidget, tr("Open Script"), |
| 491 | 491 | getPreviousScriptLocation(), |
| 492 | 492 | tr("JavaScript Files (*.js)")); |
| 493 | − connect(dlg, &ModalDialogListener::response, this, [=] (QVariant answer) { | |
| 493 | + connect(dlg, &ModalDialogListener::response, this, [=, this] (QVariant answer) { | |
| 494 | 494 | disconnect(dlg, &ModalDialogListener::response, this, nullptr); |
| 495 | 495 | const QString& response = answer.toString(); |
| 496 | 496 | if (!response.isEmpty() && QFile(response).exists()) { |
| @@ -502,7 +502,7 @@ void Application::loadDialog() { · 5 unmodified lines | ||
| 502 | 502 | |
| 503 | 503 | void Application::loadScriptURLDialog() const { |
| 504 | 504 | ModalDialogListener* dlg = OffscreenUi::getTextAsync(OffscreenUi::ICON_NONE, "Open and Run Script", "Script URL"); |
| 505 | − connect(dlg, &ModalDialogListener::response, this, [=] (QVariant response) { | |
| 505 | + connect(dlg, &ModalDialogListener::response, this, [=, this] (QVariant response) { | |
| 506 | 506 | disconnect(dlg, &ModalDialogListener::response, this, nullptr); |
| 507 | 507 | const QString& newScript = response.toString(); |
| 508 | 508 | if (QUrl(newScript).scheme() == "atp") { |
| @@ -574,7 +574,7 @@ void Application::showAssetServerWidget(QString filePath) { · 65 unmodified lines | ||
| 574 | 574 | } |
| 575 | 575 | static const QUrl url { "hifi/AssetServer.qml" }; |
| 576 | 576 | |
| 577 | − auto startUpload = [=](QQmlContext* context, QObject* newObject){ | |
| 577 | + auto startUpload = [=, this](QQmlContext* context, QObject* newObject){ | |
| 578 | 578 | if (!filePath.isEmpty()) { |
| 579 | 579 | emit uploadRequest(filePath); |
| 580 | 580 | } |
| @@ -982,11 +982,11 @@ bool Application::askToSetAvatarUrl(const QString& url) { · 401 unmodified lines | ||
| 982 | 982 | |
| 983 | 983 | bool agreeToLicense = true; // assume true |
| 984 | 984 | //create set avatar callback |
| 985 | − auto setAvatar = [=] (QString url, QString modelName) { | |
| 985 | + auto setAvatar = [=, this] (QString url, QString modelName) { | |
| 986 | 986 | ModalDialogListener* dlg = OffscreenUi::asyncQuestion("Set Avatar", |
| 987 | 987 | "Would you like to use '" + modelName + "' for your avatar?", |
| 988 | 988 | QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok); |
| 989 | − QObject::connect(dlg, &ModalDialogListener::response, this, [=] (QVariant answer) { | |
| 989 | + QObject::connect(dlg, &ModalDialogListener::response, this, [=, this] (QVariant answer) { | |
| 990 | 990 | QObject::disconnect(dlg, &ModalDialogListener::response, this, nullptr); |
| 991 | 991 | |
| 992 | 992 | bool ok = (QMessageBox::Ok == static_cast<QMessageBox::StandardButton>(answer.toInt())); |
| @@ -1007,7 +1007,7 @@ bool Application::askToSetAvatarUrl(const QString& url) { · 14 unmodified lines | ||
| 1007 | 1007 | ModalDialogListener* dlg = OffscreenUi::asyncQuestion("Avatar Usage License", |
| 1008 | 1008 | modelLicense + "\nDo you agree to these terms?", |
| 1009 | 1009 | QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); |
| 1010 | − QObject::connect(dlg, &ModalDialogListener::response, this, [=, &agreeToLicense] (QVariant answer) { | |
| 1010 | + QObject::connect(dlg, &ModalDialogListener::response, this, [=, this, &agreeToLicense] (QVariant answer) { | |
| 1011 | 1011 | QObject::disconnect(dlg, &ModalDialogListener::response, this, nullptr); |
| 1012 | 1012 | |
| 1013 | 1013 | agreeToLicense = (static_cast<QMessageBox::StandardButton>(answer.toInt()) == QMessageBox::Yes); |
| @@ -1052,7 +1052,7 @@ bool Application::askToLoadScript(const QString& scriptFilenameOrURL) { · 38 unmodified lines | ||
| 1052 | 1052 | ModalDialogListener* dlg = OffscreenUi::asyncQuestion(getWindow(), "Run Script", message, |
| 1053 | 1053 | QMessageBox::Yes | QMessageBox::No); |
| 1054 | 1054 | |
| 1055 | − QObject::connect(dlg, &ModalDialogListener::response, this, [=] (QVariant answer) { | |
| 1055 | + QObject::connect(dlg, &ModalDialogListener::response, this, [=, this] (QVariant answer) { | |
| 1056 | 1056 | const QString& fileName = scriptFilenameOrURL; |
| 1057 | 1057 | if (static_cast<QMessageBox::StandardButton>(answer.toInt()) == QMessageBox::Yes) { |
| 1058 | 1058 | qCDebug(interfaceapp) << "Chose to run the script: " << fileName; |
| @@ -1081,7 +1081,7 @@ bool Application::askToReplaceDomainContent(const QString& url) { · 22 unmodified lines | ||
| 1081 | 1081 | ModalDialogListener* dig = OffscreenUi::asyncQuestion("Are you sure you want to replace this domain's content set?", |
| 1082 | 1082 | infoText, QMessageBox::Yes | QMessageBox::No, QMessageBox::No); |
| 1083 | 1083 | |
| 1084 | − QObject::connect(dig, &ModalDialogListener::response, this, [=] (QVariant answer) { | |
| 1084 | + QObject::connect(dig, &ModalDialogListener::response, this, [=, this] (QVariant answer) { | |
| 1085 | 1085 | QString details; |
| 1086 | 1086 | if (static_cast<QMessageBox::StandardButton>(answer.toInt()) == QMessageBox::Yes) { |
| 1087 | 1087 | // Given confirmation, send request to domain server to replace content |