Moved DateTime helper functions to service class
This commit is contained in:
@@ -7,10 +7,12 @@
|
||||
#include <utility>
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
#include "src/Helpers/DateTime.hpp"
|
||||
#include "src/Helpers/BiMap.hpp"
|
||||
#include "AddressType.hpp"
|
||||
|
||||
#include "src/Services/DateTimeService.hpp"
|
||||
|
||||
#include "src/Helpers/BiMap.hpp"
|
||||
|
||||
namespace Bloom
|
||||
{
|
||||
enum class MemoryRegionType: std::uint8_t
|
||||
@@ -29,7 +31,7 @@ namespace Bloom
|
||||
{
|
||||
public:
|
||||
QString name;
|
||||
QDateTime createdDate = DateTime::currentDateTime();
|
||||
QDateTime createdDate = Services::DateTimeService::currentDateTime();
|
||||
Targets::TargetMemoryType memoryType;
|
||||
MemoryRegionType type;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <QJsonObject>
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
#include "src/Helpers/DateTime.hpp"
|
||||
#include "src/Services/DateTimeService.hpp"
|
||||
|
||||
#include "FocusedMemoryRegion.hpp"
|
||||
#include "ExcludedMemoryRegion.hpp"
|
||||
@@ -24,7 +24,7 @@ namespace Bloom
|
||||
Targets::TargetMemoryType memoryType;
|
||||
Targets::TargetMemoryBuffer data;
|
||||
Targets::TargetProgramCounter programCounter;
|
||||
QDateTime createdDate = DateTime::currentDateTime();
|
||||
QDateTime createdDate = Services::DateTimeService::currentDateTime();
|
||||
|
||||
std::vector<FocusedMemoryRegion> focusedRegions;
|
||||
std::vector<ExcludedMemoryRegion> excludedRegions;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "MemorySnapshotItem.hpp"
|
||||
|
||||
#include "src/Helpers/DateTime.hpp"
|
||||
#include "src/Services/DateTimeService.hpp"
|
||||
|
||||
namespace Bloom::Widgets
|
||||
{
|
||||
@@ -23,7 +23,7 @@ namespace Bloom::Widgets
|
||||
|
||||
this->createdDateLabel->setText(
|
||||
memorySnapshot.createdDate.toString(
|
||||
memorySnapshot.createdDate.date() == DateTime::currentDate()
|
||||
memorySnapshot.createdDate.date() == Services::DateTimeService::currentDate()
|
||||
? "hh:mm"
|
||||
: "dd/MM/yyyy hh:mm"
|
||||
)
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/Label.hpp"
|
||||
|
||||
#include "src/Services/PathService.hpp"
|
||||
#include "src/Helpers/DateTime.hpp"
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::Widgets
|
||||
|
||||
Reference in New Issue
Block a user