Register std::map<Targets::TargetMemoryAddress, Widgets::ByteItem*> meta type
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
#include "ConstructHexViewerByteItems.hpp"
|
#include "ConstructHexViewerByteItems.hpp"
|
||||||
|
|
||||||
|
#include <QMetaType>
|
||||||
|
|
||||||
namespace Bloom
|
namespace Bloom
|
||||||
{
|
{
|
||||||
ConstructHexViewerByteItems::ConstructHexViewerByteItems(
|
ConstructHexViewerByteItems::ConstructHexViewerByteItems(
|
||||||
@@ -14,7 +16,9 @@ namespace Bloom
|
|||||||
, hoveredByteItem(hoveredByteItem)
|
, hoveredByteItem(hoveredByteItem)
|
||||||
, highlightedByteItems(highlightedByteItems)
|
, highlightedByteItems(highlightedByteItems)
|
||||||
, settings(settings)
|
, settings(settings)
|
||||||
{}
|
{
|
||||||
|
qRegisterMetaType<std::map<Targets::TargetMemoryAddress, Widgets::ByteItem*>>();
|
||||||
|
}
|
||||||
|
|
||||||
void ConstructHexViewerByteItems::run(TargetController::TargetControllerConsole&) {
|
void ConstructHexViewerByteItems::run(TargetController::TargetControllerConsole&) {
|
||||||
const auto memorySize = this->memoryDescriptor.size();
|
const auto memorySize = this->memoryDescriptor.size();
|
||||||
@@ -36,6 +40,6 @@ namespace Bloom
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit this->byteItems(this->byteItemsByAddress);
|
emit this->byteItems(std::move(this->byteItemsByAddress));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace Bloom
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void sceneCreated(Widgets::ByteItemGraphicsScene* scene);
|
void sceneCreated(Widgets::ByteItemGraphicsScene* scene);
|
||||||
void byteItems(std::map<Targets::TargetMemoryAddress, Widgets::ByteItem*>& byteItemsByAddress);
|
void byteItems(std::map<Targets::TargetMemoryAddress, Widgets::ByteItem*> byteItemsByAddress);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void run(TargetController::TargetControllerConsole&) override;
|
void run(TargetController::TargetControllerConsole&) override;
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ namespace Bloom::Widgets
|
|||||||
constructByteItemsTask,
|
constructByteItemsTask,
|
||||||
&ConstructHexViewerByteItems::byteItems,
|
&ConstructHexViewerByteItems::byteItems,
|
||||||
this,
|
this,
|
||||||
[this] (std::map<Targets::TargetMemoryAddress, ByteItem*>& byteItemsByAddress) {
|
[this] (std::map<Targets::TargetMemoryAddress, ByteItem*> byteItemsByAddress) {
|
||||||
this->byteItemsByAddress = std::move(byteItemsByAddress);
|
this->byteItemsByAddress = std::move(byteItemsByAddress);
|
||||||
|
|
||||||
for (const auto& [address, byteItem] : this->byteItemsByAddress) {
|
for (const auto& [address, byteItem] : this->byteItemsByAddress) {
|
||||||
|
|||||||
Reference in New Issue
Block a user