Commit 2b4a94a0 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony Committed by Conor Finn
Browse files

Remove usersearch.directories key

It's a legacy key that is no longer in active use.
parent 88389485
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment