26 #include <QStandardPaths>
29 #include <QTextStream>
48 if (not QDir().mkpath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)))
49 LogW(
"Could not create or find a writeable location for the cache");
50 if (not QDir().mkpath(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)))
51 LogW(
"Could not create or find a writeable location for the generic cache");
52 if (not QDir().mkpath(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)))
53 LogW(
"Could not create or find a writeable location for the documentation");
72 QDir directory(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation));
73 return directory.absoluteFilePath(QString::fromStdString(logname)).toStdString();
89 QFile file(QString::fromStdString(
":/algorithms/" + algorithmId +
"/" + algorithmId +
".xml"));
92 if (file.exists() ==
false)
96 if (not file.open(QFile::ReadOnly | QFile::Text))
99 QTextStream stream(&file);
100 return stream.readAll().toStdString();
virtual std::string getLogFilePath(const std::string &logname) const overridefinal
Returns the path of the log file with the given logname.
FileManagerForQt()
Constructor, creating directories.
#define EPT_EXCEPT(num, desc)
virtual std::string getAlgorithmInformationFileContent(const std::string &algorithmId) const overridefinal
Read the content of the XML file of an algorithm with the given ID.