Ref T103, Unified naming of directory functions

* some started with get/some not (removed get, get is normally used for our getters)
* some used swift, getSwiftXZY dir (removed swift)
* used full word "directory", not dir/directory mixed
This commit is contained in:
Klaus Basan
2017-07-06 23:02:13 +02:00
committed by Mathew Sutcliffe
parent debd9c802f
commit a9198e4f13
24 changed files with 124 additions and 118 deletions

View File

@@ -738,7 +738,7 @@ namespace BlackCore
CLogHandler::instance()->install(); // make sure we have a log handler!
// File logger
this->m_fileLogger.reset(new CFileLogger(executable(), CDirectoryUtils::getLogDirectory()));
this->m_fileLogger.reset(new CFileLogger(executable(), CDirectoryUtils::logDirectory()));
this->m_fileLogger->changeLogPattern(CLogPattern().withSeverityAtOrAbove(CStatusMessage::SeverityDebug));
}
@@ -1189,8 +1189,8 @@ namespace BlackCore
if (isUnitTest()) { return CStatusMessage(this).info("No crash handler for unit tests"); }
static const QString crashpadHandler(CBuildConfig::isRunningOnWindowsNtPlatform() ? "swift_crashpad_handler.exe" : "swift_crashpad_handler");
static const QString handler = CFileUtils::appendFilePaths(CDirectoryUtils::getBinDir(), crashpadHandler);
static const QString crashpadPath = CDirectoryUtils::getCrashpadDirectory();
static const QString handler = CFileUtils::appendFilePaths(CDirectoryUtils::binDirectory(), crashpadHandler);
static const QString crashpadPath = CDirectoryUtils::crashpadDirectory();
static const QString database = CFileUtils::appendFilePaths(crashpadPath, "/database");
static const QString metrics = CFileUtils::appendFilePaths(crashpadPath, "/metrics");

View File

@@ -52,7 +52,7 @@ namespace BlackCore
QString IPluginManager::pluginDirectory() const
{
return CDirectoryUtils::getBinDir() % QStringLiteral("/plugins");
return CDirectoryUtils::binDirectory() % QStringLiteral("/plugins");
}
bool IPluginManager::isValid(const QJsonObject &metadata) const

View File

@@ -105,7 +105,6 @@ namespace BlackCore
QString CPluginManagerSimulator::pluginDirectory() const
{
return CDirectoryUtils::getBinDir() % QStringLiteral("/plugins/simulator");
return CDirectoryUtils::binDirectory() % QStringLiteral("/plugins/simulator");
}
}

View File

@@ -67,7 +67,7 @@ namespace BlackCore
QString CPluginManagerWeatherData::pluginDirectory() const
{
return CDirectoryUtils::getBinDir() % QStringLiteral("/plugins/weatherdata");
return CDirectoryUtils::binDirectory() % QStringLiteral("/plugins/weatherdata");
}
}

View File

@@ -122,7 +122,7 @@ namespace BlackCore
if (this->m_bootstrapUrls.isEmpty())
{
// after all still empty
msgs.push_back(CStatusMessage(this, CStatusMessage::SeverityInfo, "Your log files are here: " + CDirectoryUtils::getLogDirectory()));
msgs.push_back(CStatusMessage(this, CStatusMessage::SeverityInfo, "Your log files are here: " + CDirectoryUtils::logDirectory()));
msgs.push_back(CStatusMessage(this, CStatusMessage::SeverityError, "No bootstrap URLs, cannot load setup"));
}
else
@@ -516,7 +516,7 @@ namespace BlackCore
CLogMessage(this).info("Setup (bootstrap already cached, no prefill needed");
return false;
}
const QString fn = CDirectoryUtils::getBootstrapResourceFile();
const QString fn = CDirectoryUtils::bootstrapResourceFilePath();
const CStatusMessageList msgs = this->readLocalBootstrapFile(fn);
CLogMessage::preformatted(msgs);
return true;