History

fix implicit this

RTUnreal committed 1 year ago

Commit 86c5f2c1 parent 611faa942 files · +134 −135Browse files

Showing the changes to interface/src/Application_UI.cpp (1 of 42 files). Show all

Unified · Split

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