Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
2b4a94a0
Commit
2b4a94a0
authored
Sep 17, 2018
by
Gigg, Martyn Anthony
Committed by
Conor Finn
Jun 10, 2020
Browse files
Remove usersearch.directories key
It's a legacy key that is no longer in active use.
parent
88389485
Changes
4
Hide whitespace changes
Inline
Side-by-side
Framework/Kernel/inc/MantidKernel/ConfigService.h
View file @
2b4a94a0
...
...
@@ -192,8 +192,6 @@ public:
void
appendDataSearchDir
(
const
std
::
string
&
path
);
/// Appends subdirectory to each of the specified data search directories
void
appendDataSearchSubDir
(
const
std
::
string
&
subdir
);
/// Get the list of user search paths
const
std
::
vector
<
std
::
string
>
&
getUserSearchDirs
()
const
;
/// Sets instrument directories
void
setInstrumentDirectories
(
const
std
::
vector
<
std
::
string
>
&
directories
);
/// Get instrument search directories
...
...
@@ -265,8 +263,6 @@ private:
const
std
::
string
&
key
)
const
;
/// Create the storage of the data search directories
void
cacheDataSearchPaths
();
/// Create the storage of the user search directories
void
cacheUserSearchPaths
();
/// Create the storage of the instrument directories
void
cacheInstrumentPaths
();
/// Returns true if the path is in the data search list
...
...
@@ -308,8 +304,6 @@ private:
const
std
::
string
m_user_properties_file_name
;
/// Store a list of data search paths
std
::
vector
<
std
::
string
>
m_DataSearchDirs
;
/// Store a list of user search paths
std
::
vector
<
std
::
string
>
m_UserSearchDirs
;
/// Store a list of instrument directory paths
std
::
vector
<
std
::
string
>
m_InstrumentDirs
;
...
...
Framework/Kernel/src/ConfigService.cpp
View file @
2b4a94a0
...
...
@@ -127,7 +127,7 @@ ConfigServiceImpl::ConfigServiceImpl()
#else
m_user_properties_file_name
(
"Mantid.user.properties"
),
#endif
m_DataSearchDirs
(),
m_UserSearchDirs
(),
m_InstrumentDirs
(),
m_proxyInfo
(),
m_DataSearchDirs
(),
m_InstrumentDirs
(),
m_proxyInfo
(),
m_isProxySet
(
false
)
{
// getting at system details
m_pSysConfig
=
new
Poco
::
Util
::
SystemConfiguration
();
...
...
@@ -553,21 +553,6 @@ void ConfigServiceImpl::cacheDataSearchPaths() {
}
}
/**
* Create the store of user search paths from the 'usersearch.directories' key
* within the Mantid.properties file.
* The value of the key should be a semi-colon separated list of directories
*/
void
ConfigServiceImpl
::
cacheUserSearchPaths
()
{
m_UserSearchDirs
.
clear
();
std
::
string
paths
=
getString
(
"usersearch.directories"
);
if
(
paths
.
empty
())
{
m_UserSearchDirs
.
clear
();
}
else
{
m_UserSearchDirs
=
splitPath
(
paths
);
}
}
/**
* The path that is passed should be as returned by makeAbsolute() and
* this function will return true if that path is in the list
...
...
@@ -729,7 +714,6 @@ void ConfigServiceImpl::updateConfig(const std::string &filename,
// frequently
cacheDataSearchPaths
();
appendDataSearchDir
(
getString
(
"defaultsave.directory"
));
cacheUserSearchPaths
();
cacheInstrumentPaths
();
}
}
...
...
@@ -1012,8 +996,6 @@ void ConfigServiceImpl::setString(const std::string &key,
if
(
key
==
"datasearch.directories"
)
{
cacheDataSearchPaths
();
}
else
if
(
key
==
"usersearch.directories"
)
{
cacheUserSearchPaths
();
}
else
if
(
key
==
"instrumentDefinition.directory"
)
{
cacheInstrumentPaths
();
}
else
if
(
key
==
"defaultsave.directory"
)
{
...
...
@@ -1581,24 +1563,12 @@ void ConfigServiceImpl::appendDataSearchDir(const std::string &path) {
return
;
}
if
(
!
isInDataSearchList
(
dirPath
.
toString
()))
{
std
::
string
newSearchString
;
for
(
const
std
::
string
&
it
:
m_DataSearchDirs
)
{
newSearchString
.
append
(
it
);
newSearchString
.
append
(
";"
);
}
newSearchString
.
append
(
path
);
auto
newSearchString
=
Strings
::
join
(
std
::
begin
(
m_DataSearchDirs
),
std
::
end
(
m_DataSearchDirs
),
";"
);
setString
(
"datasearch.directories"
,
newSearchString
);
}
}
/**
* Return the list of user search paths
* @returns A vector of strings containing the defined search directories
*/
const
std
::
vector
<
std
::
string
>
&
ConfigServiceImpl
::
getUserSearchDirs
()
const
{
return
m_UserSearchDirs
;
}
/**
* Sets the search directories for XML instrument definition files (IDFs)
* @param directories An ordered list of paths for instrument searching
...
...
Framework/Properties/Mantid.properties.template
View file @
2b4a94a0
...
...
@@ -95,10 +95,6 @@ paraview.ignore = @IGNORE_PARAVIEW@
# Root of html documentation (kept as unix-style path)
docs.html.root = @HTML_ROOT@
# A semi-colon(;) separated list of directories to use to search for files other than data
# Use forward slash / for all paths
usersearch.directories =
# Setting this to On enables searching the facilitie's archive automatically
datasearch.searcharchive = Off
...
...
Framework/PythonInterface/test/python/mantid/kernel/ConfigServiceTest.py
View file @
2b4a94a0
...
...
@@ -153,8 +153,7 @@ class ConfigServiceTest(unittest.TestCase):
'loading.multifile'
,
'loading.multifilelimit'
,
'maskFiles.directory'
,
'pythonalgorithms.refresh.allowed'
,
'sliceviewer.nonorthogonal'
,
'usersearch.directories'
,
'sliceviewer.nonorthogonal'
########## TODO should these be documented?
'curvefitting.defaultPeak'
,
'curvefitting.findPeaksFWHM'
,
'curvefitting.findPeaksTolerance'
,
'curvefitting.guiExclude'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment