From c35565bcd01fb2182515119f6df58ca49bea1c73 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 14 Jan 2023 12:53:57 +0000 Subject: [PATCH] Register `std::map` meta type --- .../InsightWorker/Tasks/ConstructHexViewerByteItems.cpp | 8 ++++++-- .../InsightWorker/Tasks/ConstructHexViewerByteItems.hpp | 2 +- .../HexViewerWidget/ByteItemGraphicsScene.cpp | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Insight/InsightWorker/Tasks/ConstructHexViewerByteItems.cpp b/src/Insight/InsightWorker/Tasks/ConstructHexViewerByteItems.cpp index 99a75761..54ae33f7 100644 --- a/src/Insight/InsightWorker/Tasks/ConstructHexViewerByteItems.cpp +++ b/src/Insight/InsightWorker/Tasks/ConstructHexViewerByteItems.cpp @@ -1,5 +1,7 @@ #include "ConstructHexViewerByteItems.hpp" +#include + namespace Bloom { ConstructHexViewerByteItems::ConstructHexViewerByteItems( @@ -14,7 +16,9 @@ namespace Bloom , hoveredByteItem(hoveredByteItem) , highlightedByteItems(highlightedByteItems) , settings(settings) - {} + { + qRegisterMetaType>(); + } 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)); } } diff --git a/src/Insight/InsightWorker/Tasks/ConstructHexViewerByteItems.hpp b/src/Insight/InsightWorker/Tasks/ConstructHexViewerByteItems.hpp index a1a856b0..b75202f3 100644 --- a/src/Insight/InsightWorker/Tasks/ConstructHexViewerByteItems.hpp +++ b/src/Insight/InsightWorker/Tasks/ConstructHexViewerByteItems.hpp @@ -34,7 +34,7 @@ namespace Bloom signals: void sceneCreated(Widgets::ByteItemGraphicsScene* scene); - void byteItems(std::map& byteItemsByAddress); + void byteItems(std::map byteItemsByAddress); protected: void run(TargetController::TargetControllerConsole&) override; diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp index 0a7a0995..6ab362f4 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp @@ -128,7 +128,7 @@ namespace Bloom::Widgets constructByteItemsTask, &ConstructHexViewerByteItems::byteItems, this, - [this] (std::map& byteItemsByAddress) { + [this] (std::map byteItemsByAddress) { this->byteItemsByAddress = std::move(byteItemsByAddress); for (const auto& [address, byteItem] : this->byteItemsByAddress) {