Moved Paths helper functions to service class
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Application.hpp"
|
||||
|
||||
namespace Bloom
|
||||
@@ -14,12 +14,12 @@ namespace Bloom
|
||||
|
||||
AboutWindow::AboutWindow(QWidget* parent): QObject(parent) {
|
||||
auto aboutWindowUiFile = QFile(QString::fromStdString(
|
||||
Paths::compiledResourcesPath()
|
||||
Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/UiFiles/AboutWindow.ui"
|
||||
)
|
||||
);
|
||||
auto aboutWindowStylesheet = QFile(QString::fromStdString(
|
||||
Paths::compiledResourcesPath()
|
||||
Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Stylesheets/AboutWindow.qss"
|
||||
)
|
||||
);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
@@ -60,12 +60,12 @@ namespace Bloom
|
||||
}
|
||||
|
||||
auto mainWindowUiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui"
|
||||
)
|
||||
);
|
||||
auto mainWindowStylesheet = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Stylesheets/InsightWindow.qss"
|
||||
)
|
||||
);
|
||||
@@ -86,7 +86,7 @@ namespace Bloom
|
||||
mainWindowStylesheet.close();
|
||||
|
||||
QApplication::setWindowIcon(QIcon(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Images/bloom-icon.svg"
|
||||
)
|
||||
));
|
||||
@@ -937,7 +937,7 @@ namespace Bloom
|
||||
}
|
||||
|
||||
void InsightWindow::openReportIssuesUrl() {
|
||||
auto url = QUrl(QString::fromStdString(Paths::homeDomainName() + "/report-issue"));
|
||||
auto url = QUrl(QString::fromStdString(Services::PathService::homeDomainName() + "/report-issue"));
|
||||
/*
|
||||
* The https://bloom.oscillate.io/report-issue URL just redirects to the Bloom GitHub issue page.
|
||||
*
|
||||
@@ -963,7 +963,7 @@ namespace Bloom
|
||||
|
||||
void InsightWindow::openGettingStartedUrl() {
|
||||
QDesktopServices::openUrl(
|
||||
QUrl(QString::fromStdString(Paths::homeDomainName() + "/docs/getting-started"))
|
||||
QUrl(QString::fromStdString(Services::PathService::homeDomainName() + "/docs/getting-started"))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <QFile>
|
||||
|
||||
#include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp"
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::Widgets
|
||||
@@ -23,13 +23,13 @@ namespace Bloom::Widgets
|
||||
this->setWindowTitle(windowTitle);
|
||||
|
||||
auto dialogueUiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/UiFiles/ErrorDialogue.ui"
|
||||
)
|
||||
);
|
||||
|
||||
auto dialogueStylesheet = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/Stylesheets/ErrorDialogue.qss"
|
||||
)
|
||||
);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp"
|
||||
#include "src/Insight/InsightSignals.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::Widgets
|
||||
@@ -31,7 +31,7 @@ namespace Bloom::Widgets
|
||||
this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
|
||||
auto widgetUiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget"
|
||||
+ "/UiFiles/HexViewerWidget.ui"
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <QFile>
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
#include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp"
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Bloom::Widgets
|
||||
: memoryRegion(region), RegionItem(region, memoryDescriptor, parent)
|
||||
{
|
||||
auto formUiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane"
|
||||
+ "/MemoryRegionManager/UiFiles/ExcludedMemoryRegionForm.ui"
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <QFile>
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
#include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp"
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Bloom::Widgets
|
||||
: memoryRegion(region), RegionItem(region, memoryDescriptor, parent)
|
||||
{
|
||||
auto formUiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane"
|
||||
+ "/MemoryRegionManager/UiFiles/FocusedMemoryRegionForm.ui"
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "src/Insight/UserInterfaces/InsightWindow/UiLoader.hpp"
|
||||
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::Widgets
|
||||
@@ -33,14 +33,14 @@ namespace Bloom::Widgets
|
||||
);
|
||||
|
||||
auto windowUiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane"
|
||||
+ "/MemoryRegionManager/UiFiles/MemoryRegionManagerWindow.ui"
|
||||
)
|
||||
);
|
||||
|
||||
auto windowStylesheet = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane"
|
||||
+ "/MemoryRegionManager/Stylesheets/MemoryRegionManagerWindow.qss"
|
||||
)
|
||||
@@ -406,7 +406,7 @@ namespace Bloom::Widgets
|
||||
|
||||
void MemoryRegionManagerWindow::openHelpPage() {
|
||||
QDesktopServices::openUrl(
|
||||
QUrl(QString::fromStdString(Paths::homeDomainName() + "/docs/manage-memory-regions"))
|
||||
QUrl(QString::fromStdString(Services::PathService::homeDomainName() + "/docs/manage-memory-regions"))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "src/Insight/InsightSignals.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::Widgets
|
||||
@@ -32,7 +32,7 @@ namespace Bloom::Widgets
|
||||
);
|
||||
|
||||
auto windowUiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane"
|
||||
+ "/SnapshotManager/CreateSnapshotWindow/UiFiles/CreateSnapshotWindow.ui"
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "src/Insight/InsightWorker/Tasks/CaptureMemorySnapshot.hpp"
|
||||
#include "src/Insight/InsightWorker/InsightWorker.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Helpers/EnumToStringMappings.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
#include "src/Logger/Logger.hpp"
|
||||
@@ -34,7 +34,7 @@ namespace Bloom::Widgets
|
||||
this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
|
||||
auto widgetUiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane"
|
||||
+ "/SnapshotManager/UiFiles/SnapshotManager.ui"
|
||||
)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "src/Insight/InsightWorker/Tasks/ReadTargetMemory.hpp"
|
||||
#include "src/Insight/InsightWorker/Tasks/ReadStackPointer.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
@@ -46,13 +46,13 @@ namespace Bloom::Widgets
|
||||
this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
|
||||
auto uiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/UiFiles/TargetMemoryInspectionPane.ui"
|
||||
)
|
||||
);
|
||||
|
||||
auto stylesheetFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/Stylesheets/TargetMemoryInspectionPane.qss"
|
||||
)
|
||||
);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "src/Insight/InsightSignals.hpp"
|
||||
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Helpers/DateTime.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Bloom::Widgets
|
||||
this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||
|
||||
auto widgetUiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget"
|
||||
+ "/UiFiles/RegisterHistoryWidget.ui"
|
||||
)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "src/Insight/InsightWorker/InsightWorker.hpp"
|
||||
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/ErrorDialogue/ErrorDialogue.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
#include "src/Insight/InsightWorker/Tasks/ReadTargetRegisters.hpp"
|
||||
@@ -40,14 +40,14 @@ namespace Bloom::Widgets
|
||||
this->setWindowTitle("Inspect Register");
|
||||
|
||||
auto windowUiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/UiFiles/"
|
||||
"TargetRegisterInspectorWindow.ui"
|
||||
)
|
||||
);
|
||||
|
||||
auto windowStylesheet = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/Stylesheets/"
|
||||
"TargetRegisterInspectorWindow.qss"
|
||||
)
|
||||
@@ -378,7 +378,7 @@ namespace Bloom::Widgets
|
||||
|
||||
void TargetRegisterInspectorWindow::openHelpPage() {
|
||||
QDesktopServices::openUrl(
|
||||
QUrl(QString::fromStdString(Paths::homeDomainName() + "/docs/register-inspection"))
|
||||
QUrl(QString::fromStdString(Services::PathService::homeDomainName() + "/docs/register-inspection"))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "RegisterWidget.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
|
||||
namespace Bloom::Widgets
|
||||
{
|
||||
@@ -31,7 +31,7 @@ namespace Bloom::Widgets
|
||||
|
||||
this->arrowIcon->setObjectName("arrow-icon");
|
||||
auto static arrowIconPath = QString::fromStdString(
|
||||
Paths::compiledResourcesPath()
|
||||
Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/arrow.svg"
|
||||
);
|
||||
this->arrowIcon->setSvgFilePath(arrowIconPath);
|
||||
@@ -40,7 +40,7 @@ namespace Bloom::Widgets
|
||||
|
||||
this->registerGroupIcon->setObjectName("register-group-icon");
|
||||
auto static registerIconPath = QString::fromStdString(
|
||||
Paths::compiledResourcesPath()
|
||||
Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/register-group.svg"
|
||||
);
|
||||
this->registerGroupIcon->setSvgFilePath(registerIconPath);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <QMenu>
|
||||
#include <QStyle>
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
|
||||
#include "src/Insight/InsightSignals.hpp"
|
||||
#include "src/Insight/InsightWorker/InsightWorker.hpp"
|
||||
@@ -35,7 +35,7 @@ namespace Bloom::Widgets
|
||||
|
||||
this->registerIcon->setObjectName("register-icon");
|
||||
auto static registerIconPath = QString::fromStdString(
|
||||
Paths::compiledResourcesPath()
|
||||
Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/Images/register.svg"
|
||||
);
|
||||
this->registerIcon->setSvgFilePath(registerIconPath);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "RegisterGroupWidget.hpp"
|
||||
#include "RegisterWidget.hpp"
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
#include "src/Insight/InsightWorker/Tasks/ReadTargetRegisters.hpp"
|
||||
@@ -34,7 +34,7 @@ namespace Bloom::Widgets
|
||||
this->setObjectName("target-registers-side-pane");
|
||||
|
||||
auto targetRegistersPaneUiFile = QFile(
|
||||
QString::fromStdString(Paths::compiledResourcesPath()
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/UiFiles/"
|
||||
"TargetRegistersSidePane.ui"
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <QEvent>
|
||||
#include <QFile>
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
|
||||
namespace Bloom::Widgets::InsightTargetWidgets::Dip
|
||||
{
|
||||
@@ -19,7 +19,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Dip
|
||||
: TargetPackageWidget(targetVariant, parent)
|
||||
{
|
||||
auto stylesheetFile = QFile(QString::fromStdString(
|
||||
Paths::compiledResourcesPath()
|
||||
Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/Stylesheets/"
|
||||
"DualInlinePackage.qss"
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <QFile>
|
||||
#include <QLine>
|
||||
|
||||
#include "src/Helpers/Paths.hpp"
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "PinWidget.hpp"
|
||||
#include "BodyWidget.hpp"
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Qfp
|
||||
assert((targetVariant.pinDescriptorsByNumber.size() % 4) == 0);
|
||||
|
||||
auto stylesheetFile = QFile(QString::fromStdString(
|
||||
Paths::compiledResourcesPath()
|
||||
Services::PathService::compiledResourcesPath()
|
||||
+ "/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/Stylesheets/QuadFlatPackage.qss"
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user