From fbccc0986d6487c4490edee6e5793fcaeaf3415b Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 31 Aug 2022 00:18:51 +0300
Subject: [PATCH] SL-17653 Clean up unneeded filepicker dependency.

---
 indra/newview/lllocalbitmaps.cpp       | 22 ----------------------
 indra/newview/lllocalbitmaps.h         |  1 -
 indra/newview/lllocalgltfmaterials.cpp | 23 -----------------------
 indra/newview/lllocalgltfmaterials.h   |  1 -
 4 files changed, 47 deletions(-)

diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index c3e3fd5c1bf..860c2899d36 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -47,7 +47,6 @@
 
 /* misc headers */
 #include "llscrolllistctrl.h"
-#include "llfilepicker.h"
 #include "lllocaltextureobject.h"
 #include "llviewertexturelist.h"
 #include "llviewerobjectlist.h"
@@ -920,27 +919,6 @@ LLLocalBitmapMgr::~LLLocalBitmapMgr()
     mBitmapList.clear();
 }
 
-bool LLLocalBitmapMgr::addUnit()
-{
-	bool add_successful = false;
-
-	LLFilePicker& picker = LLFilePicker::instance();
-	if (picker.getMultipleOpenFiles(LLFilePicker::FFLOAD_IMAGE))
-	{
-		mTimer.stopTimer();
-
-		std::string filename = picker.getFirstFile();
-		while(!filename.empty())
-		{
-            add_successful |= addUnit(filename);
-			filename = picker.getNextFile();
-		}
-		
-		mTimer.startTimer();
-	}
-
-	return add_successful;
-}
 bool LLLocalBitmapMgr::addUnit(const std::vector<std::string>& filenames)
 {
     bool add_successful = false;
diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h
index 362d47142d9..2bc216708a0 100644
--- a/indra/newview/lllocalbitmaps.h
+++ b/indra/newview/lllocalbitmaps.h
@@ -115,7 +115,6 @@ class LLLocalBitmapMgr : public LLSingleton<LLLocalBitmapMgr>
 	LLSINGLETON(LLLocalBitmapMgr);
 	~LLLocalBitmapMgr();
 public:
-	bool         addUnit();
     bool         addUnit(const std::vector<std::string>& filenames);
     bool         addUnit(const std::string& filename);
 	void         delUnit(LLUUID tracking_id);
diff --git a/indra/newview/lllocalgltfmaterials.cpp b/indra/newview/lllocalgltfmaterials.cpp
index ef488e9ef42..2334ea47be3 100644
--- a/indra/newview/lllocalgltfmaterials.cpp
+++ b/indra/newview/lllocalgltfmaterials.cpp
@@ -39,7 +39,6 @@
 #include <ctime>
 
 /* misc headers */
-#include "llfilepicker.h"
 #include "llgltfmateriallist.h"
 #include "llimage.h"
 #include "llinventoryicon.h"
@@ -363,28 +362,6 @@ LLLocalGLTFMaterialMgr::~LLLocalGLTFMaterialMgr()
     mMaterialList.clear();
 }
 
-bool LLLocalGLTFMaterialMgr::addUnit()
-{
-    bool add_successful = false;
-
-    LLFilePicker& picker = LLFilePicker::instance();
-    if (picker.getMultipleOpenFiles(LLFilePicker::FFLOAD_MATERIAL))
-    {
-        mTimer.stopTimer();
-
-        std::string filename = picker.getFirstFile();
-        while (!filename.empty())
-        {
-            add_successful |= addUnit(filename);
-            filename = picker.getNextFile();
-        }
-
-        mTimer.startTimer();
-    }
-
-    return add_successful;
-}
-
 bool LLLocalGLTFMaterialMgr::addUnit(const std::vector<std::string>& filenames)
 {
     bool add_successful = false;
diff --git a/indra/newview/lllocalgltfmaterials.h b/indra/newview/lllocalgltfmaterials.h
index 7f5b06e10ab..3fc700c30f4 100644
--- a/indra/newview/lllocalgltfmaterials.h
+++ b/indra/newview/lllocalgltfmaterials.h
@@ -103,7 +103,6 @@ class LLLocalGLTFMaterialMgr : public LLSingleton<LLLocalGLTFMaterialMgr>
     LLSINGLETON(LLLocalGLTFMaterialMgr);
     ~LLLocalGLTFMaterialMgr();
 public:
-    bool         addUnit();
     bool         addUnit(const std::vector<std::string>& filenames);
     bool         addUnit(const std::string& filename);
     void         delUnit(LLUUID tracking_id);
-- 
GitLab