MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / setPluginPath

Method setPluginPath

src/openms_gui/source/VISUAL/TVToolDiscovery.cpp:212–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210 }
211
212 bool TVToolDiscovery::setPluginPath(const String& plugin_path, bool create)
213 {
214 if (!File::exists(plugin_path))
215 {
216 if (create)
217 {
218 QDir path = QDir(plugin_path.toQString());
219 QString dir = path.dirName();
220 path.cdUp();
221
222 if (!path.mkdir(dir))
223 {
224 OPENMS_LOG_WARN << "Unable to create plugin directory " << plugin_path << std::endl;
225 //plugin_path_ = plugin_path;
226 return false;
227 }
228 }
229 else
230 {
231 OPENMS_LOG_WARN << "Unable to set plugin directory: " << plugin_path << " does not exist." << std::endl;
232 return false;
233 }
234 }
235
236 plugin_path_ = plugin_path;
237 return true;
238 }
239
240 const std::string TVToolDiscovery::getPluginPath()
241 {

Callers 3

TOPPViewBaseMethod · 0.80
loadPreferencesMethod · 0.80
savePreferencesMethod · 0.80

Calls 1

toQStringMethod · 0.45

Tested by

no test coverage detected