Moved Paths helper functions to service class
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "src/Application.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Helpers/String.hpp"
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
debugSession.connection.writePacket(ResponsePacket(String::toHex(
|
||||
std::string(
|
||||
"Bloom v" + Application::VERSION.toString() + "\n"
|
||||
+ Paths::homeDomainName() + "\n"
|
||||
+ Services::PathService::homeDomainName() + "\n"
|
||||
+ "Nav Mohammed\n"
|
||||
)
|
||||
)));
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
#include "src/Application.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Helpers/String.hpp"
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
return;
|
||||
}
|
||||
|
||||
const auto svdOutputFilePath = Paths::projectDirPath() + "/" + targetDescriptor.name + ".svd";
|
||||
const auto svdOutputFilePath = Services::PathService::projectDirPath() + "/" + targetDescriptor.name + ".svd";
|
||||
auto outputFile = QFile(QString::fromStdString(svdOutputFilePath));
|
||||
|
||||
if (!outputFile.open(QIODevice::ReadWrite | QIODevice::Truncate | QIODevice::Text)) {
|
||||
@@ -102,7 +102,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
deviceElement.setAttribute("xmlns:xs", "http://www.w3.org/2001/XMLSchema-instance");
|
||||
deviceElement.setAttribute(
|
||||
"xs:noNamespaceSchemaLocation",
|
||||
QString::fromStdString(Paths::homeDomainName() + "/assets/svd-schema.xsd")
|
||||
QString::fromStdString(Services::PathService::homeDomainName() + "/assets/svd-schema.xsd")
|
||||
);
|
||||
|
||||
deviceElement.appendChild(createElement("vendor", QString::fromStdString(targetDescriptor.vendorName)));
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "src/DebugServer/Gdb/ResponsePackets/ErrorResponsePacket.hpp"
|
||||
#include "src/DebugServer/Gdb/ResponsePackets/ResponsePacket.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Helpers/String.hpp"
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
@@ -35,13 +35,13 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
|
||||
*/
|
||||
auto helpFile = QFile(
|
||||
QString::fromStdString(
|
||||
Paths::compiledResourcesPath() + "/src/DebugServer/Gdb/Resources/GdbHelpMonitorInfo.txt"
|
||||
Services::PathService::compiledResourcesPath() + "/src/DebugServer/Gdb/Resources/GdbHelpMonitorInfo.txt"
|
||||
)
|
||||
);
|
||||
|
||||
if (!helpFile.open(QIODevice::ReadOnly)) {
|
||||
throw Exception(
|
||||
"Failed to open GDB monitor info help file - please report this issue at " + Paths::homeDomainName()
|
||||
"Failed to open GDB monitor info help file - please report this issue at " + Services::PathService::homeDomainName()
|
||||
+ "/report-issue"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user