summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-04-21 15:37:25 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-04-21 15:37:25 +0300
commit4cf42435733a111610a13620c56728b1b659b1e9 (patch)
tree5ac5ac10070448dcfdf38bf36e23ea9b6b766f95 /indra/newview/llpreviewscript.cpp
parentdcb6b5489d2c3cfdb13d5862f8cb29fee06745a7 (diff)
parentd7f1c88c35849e56f5b352f13c16a08467d1533b (diff)
Merge branch 'master' into DRTVWR-483
# Conflicts: # indra/newview/CMakeLists.txt # indra/newview/llviewerfloaterreg.cpp # indra/newview/skins/default/xui/de/floater_preview_texture.xml # indra/newview/skins/default/xui/es/floater_preview_texture.xml # indra/newview/skins/default/xui/fr/floater_preview_texture.xml # indra/newview/skins/default/xui/it/floater_preview_texture.xml # indra/newview/skins/default/xui/ja/panel_edit_classified.xml # indra/newview/skins/default/xui/ja/panel_me.xml # indra/newview/skins/default/xui/ru/floater_preview_texture.xml # indra/newview/skins/default/xui/tr/floater_picks.xml # indra/newview/skins/default/xui/tr/floater_preview_texture.xml # indra/newview/skins/default/xui/tr/panel_edit_classified.xml # indra/newview/skins/default/xui/tr/panel_me.xml # indra/newview/skins/default/xui/zh/floater_preview_texture.xml
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r--indra/newview/llpreviewscript.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index d177384b5a..7a68d1e270 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -33,7 +33,6 @@
#include "llcheckboxctrl.h"
#include "llcombobox.h"
#include "lldir.h"
-#include "llenvmanager.h"
#include "llexternaleditor.h"
#include "llfilepicker.h"
#include "llfloaterreg.h"
@@ -1693,9 +1692,11 @@ void LLPreviewLSL::saveIfNeeded(bool sync /*= true*/)
if (!url.empty())
{
std::string buffer(mScriptEd->mEditor->getText());
- LLBufferedAssetUploadInfo::invnUploadFinish_f proc = boost::bind(&LLPreviewLSL::finishedLSLUpload, _1, _4);
- LLResourceUploadInfo::ptr_t uploadInfo(new LLScriptAssetUpload(mItemUUID, buffer, proc));
+ LLResourceUploadInfo::ptr_t uploadInfo(std::make_shared<LLScriptAssetUpload>(mItemUUID, buffer,
+ [](LLUUID itemId, LLUUID, LLUUID, LLSD response) {
+ LLPreviewLSL::finishedLSLUpload(itemId, response);
+ }));
LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo);
}
@@ -2243,11 +2244,13 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
if (!url.empty())
{
std::string buffer(mScriptEd->mEditor->getText());
- LLBufferedAssetUploadInfo::taskUploadFinish_f proc = boost::bind(&LLLiveLSLEditor::finishLSLUpload, _1, _2, _3, _4, isRunning);
- LLResourceUploadInfo::ptr_t uploadInfo(new LLScriptAssetUpload(mObjectUUID, mItemUUID,
+ LLResourceUploadInfo::ptr_t uploadInfo(std::make_shared<LLScriptAssetUpload>(mObjectUUID, mItemUUID,
monoChecked() ? LLScriptAssetUpload::MONO : LLScriptAssetUpload::LSL2,
- isRunning, mScriptEd->getAssociatedExperience(), buffer, proc));
+ isRunning, mScriptEd->getAssociatedExperience(), buffer,
+ [isRunning](LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response) {
+ LLLiveLSLEditor::finishLSLUpload(itemId, taskId, newAssetId, response, isRunning);
+ }));
LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo);
}