Fix QPointer incomplete type error in Qt6

- Changed QPointer<MapGraphicsView> to raw pointer MapGraphicsView*
- QPointer in Qt6 requires complete type at point of use, forward declaration insufficient
- MapGraphicsView.h requires GRAPHICSVIEW_SUPPORTED macro which is now defined
- Added GRAPHICSVIEW_SUPPORTED definition guard in overview_map_handler_impl.h
- Updated widget() method to return raw pointer instead of QPointer::data()
- Updated createBasicOverviewMap() to use direct new instead of QPointer constructor

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-10-13 13:25:23 +02:00
1 parent b091d29695
commit a2e2588971
3 files changed
+11 -9

No files matched your search

@@ -209,7 +209,7 @@ void OverviewMap::init(MapImpl *mainMap, const QColor &color)
QWidget *OverviewMap::widget()
{
return m_graphicsView.data();
return m_graphicsView;
}
bool OverviewMap::createBasicOverviewMap()
@@ -218,7 +218,7 @@ bool OverviewMap::createBasicOverviewMap()
return true;
// create required objects:
m_graphicsView = QPointer<Esri::ArcGISRuntime::MapGraphicsView>(new Esri::ArcGISRuntime::MapGraphicsView(m_mainMap));
m_graphicsView = new Esri::ArcGISRuntime::MapGraphicsView(m_mainMap);
m_graphicsView->setAttributionTextVisible(false);
@@ -13,10 +13,13 @@
#include <Common/situation_map_logging.h>
#include "situation_map_export.h"
// ESRI
// ESRI - Must be before Qt headers for GRAPHICSVIEW_SUPPORTED macro
// Ensure GRAPHICSVIEW_SUPPORTED is defined for MapGraphicsView (required on Linux)
#ifndef GRAPHICSVIEW_SUPPORTED
#define GRAPHICSVIEW_SUPPORTED
#endif
#include <MapGraphicsView.h>
// Qt
// Forward:
@@ -59,10 +62,10 @@ protected:
// Own data:
MapImpl *m_mainMap = nullptr;
QPointer<Esri::ArcGISRuntime::MapGraphicsView> m_graphicsView;
Esri::ArcGISRuntime::Graphic *m_graphic = nullptr;
QColor m_color;
MapImpl *m_mainMap = nullptr;
Esri::ArcGISRuntime::MapGraphicsView *m_graphicsView = nullptr; // Raw pointer - lifetime managed by parent widget
Esri::ArcGISRuntime::Graphic *m_graphic = nullptr;
QColor m_color;
};
-1
View File
@@ -1 +0,0 @@
/workspace/external/ArcGIS