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