Skip to content

Commit 0d7c38f

Browse files
committed
Remove GuiDataRepository that was Qt specific -> will need to include it to the Qt gui plugin
1 parent 61d16af commit 0d7c38f

File tree

4 files changed

+11
-87
lines changed

4 files changed

+11
-87
lines changed

Sofa/GUI/Common/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ set(HEADER_FILES
3535
${SOFAGUICOMMON_ROOT}/BaseViewer.h
3636
${SOFAGUICOMMON_ROOT}/ColourPickingVisitor.h
3737
${SOFAGUICOMMON_ROOT}/FilesRecentlyOpenedManager.h
38-
${SOFAGUICOMMON_ROOT}/GuiDataRepository.h
3938
${SOFAGUICOMMON_ROOT}/GUIManager.h
4039
${SOFAGUICOMMON_ROOT}/MouseOperations.h
4140
${SOFAGUICOMMON_ROOT}/OperationFactory.h
@@ -50,7 +49,6 @@ set(SOURCE_FILES
5049
${SOFAGUICOMMON_ROOT}/BaseViewer.cpp
5150
${SOFAGUICOMMON_ROOT}/ColourPickingVisitor.cpp
5251
${SOFAGUICOMMON_ROOT}/FilesRecentlyOpenedManager.cpp
53-
${SOFAGUICOMMON_ROOT}/GuiDataRepository.cpp
5452
${SOFAGUICOMMON_ROOT}/GUIManager.cpp
5553
${SOFAGUICOMMON_ROOT}/MouseOperations.cpp
5654
${SOFAGUICOMMON_ROOT}/PickHandler.cpp

Sofa/GUI/Common/src/sofa/gui/common/GuiDataRepository.cpp

Lines changed: 0 additions & 41 deletions
This file was deleted.

Sofa/GUI/Common/src/sofa/gui/common/GuiDataRepository.h

Lines changed: 0 additions & 29 deletions
This file was deleted.

applications/projects/runSofa/Main.cpp

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ using sofa::helper::logging::RichConsoleStyleMessageFormatter ;
7878
using sofa::helper::logging::MainPerComponentLoggingMessageHandler ;
7979

8080
#include <sofa/helper/AdvancedTimer.h>
81+
#include <sofa/helper/system/FileRepository.h>
8182

82-
#include <sofa/gui/common/GuiDataRepository.h>
83-
using sofa::gui::common::GuiDataRepository ;
8483

8584
using sofa::helper::system::DataRepository;
8685
using sofa::helper::system::PluginRepository;
@@ -115,18 +114,15 @@ static std::string appName { "runSofa" };
115114
// ---------------------------------------------------------------------
116115
int main(int argc, char** argv)
117116
{
118-
// Add resources dir to GuiDataRepository
119-
const std::string runSofaIniFilePath = Utils::getSofaPathTo("/etc/runSofa.ini");
120-
std::map<std::string, std::string> iniFileValues = Utils::readBasicIniFile(runSofaIniFilePath);
121-
if (iniFileValues.find("RESOURCES_DIR") != iniFileValues.end())
122-
{
123-
std::string dir = iniFileValues["RESOURCES_DIR"];
124-
dir = SetDirectory::GetRelativeFromProcess(dir.c_str());
125-
if(FileSystem::isDirectory(dir))
126-
{
127-
sofa::gui::common::GuiDataRepository.addFirstPath(dir);
128-
}
129-
}
117+
sofa::helper::system::FileRepository runSofaDataRepository(
118+
"RUNSOFA_DATA_PATH",
119+
{
120+
Utils::getSofaPathTo("share/sofa/gui/runSofa")
121+
},
122+
{
123+
{ Utils::getSofaPathTo("etc/runSofa.ini").c_str(), {"RESOURCES_DIR"} }
124+
}
125+
);
130126

131127
sofa::helper::BackTrace::autodump();
132128

@@ -371,7 +367,7 @@ int main(int argc, char** argv)
371367
// Output FileRepositories
372368
msg_info(appName) << "PluginRepository paths = " << PluginRepository.getPathsJoined();
373369
msg_info(appName) << "DataRepository paths = " << DataRepository.getPathsJoined();
374-
msg_info(appName) << "GuiDataRepository paths = " << GuiDataRepository.getPathsJoined();
370+
msg_info(appName) << "runSofaDataRepository paths = " << runSofaDataRepository.getPathsJoined();
375371

376372
// Initialise paths
377373
BaseGUI::setConfigDirectoryPath(Utils::getSofaPathPrefix() + "/config", true);

0 commit comments

Comments
 (0)