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:
1 parent
b091d29695
commit
a2e2588971
3 files changed
+11
-9
No files matched your search
+2
-2
@@ -209,7 +209,7 @@ void OverviewMap::init(MapImpl *mainMap, const QColor &color)
|
|||||||
|
|
||||||
QWidget *OverviewMap::widget()
|
QWidget *OverviewMap::widget()
|
||||||
{
|
{
|
||||||
return m_graphicsView.data();
|
return m_graphicsView;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OverviewMap::createBasicOverviewMap()
|
bool OverviewMap::createBasicOverviewMap()
|
||||||
@@ -218,7 +218,7 @@ bool OverviewMap::createBasicOverviewMap()
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// create required objects:
|
// 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);
|
m_graphicsView->setAttributionTextVisible(false);
|
||||||
|
|
||||||
|
|||||||
+9
-6
@@ -13,10 +13,13 @@
|
|||||||
#include <Common/situation_map_logging.h>
|
#include <Common/situation_map_logging.h>
|
||||||
#include "situation_map_export.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>
|
#include <MapGraphicsView.h>
|
||||||
|
|
||||||
|
|
||||||
// Qt
|
// Qt
|
||||||
|
|
||||||
// Forward:
|
// Forward:
|
||||||
@@ -59,10 +62,10 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
// Own data:
|
// Own data:
|
||||||
MapImpl *m_mainMap = nullptr;
|
MapImpl *m_mainMap = nullptr;
|
||||||
QPointer<Esri::ArcGISRuntime::MapGraphicsView> m_graphicsView;
|
Esri::ArcGISRuntime::MapGraphicsView *m_graphicsView = nullptr; // Raw pointer - lifetime managed by parent widget
|
||||||
Esri::ArcGISRuntime::Graphic *m_graphic = nullptr;
|
Esri::ArcGISRuntime::Graphic *m_graphic = nullptr;
|
||||||
QColor m_color;
|
QColor m_color;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
/workspace/external/ArcGIS
|
|
||||||
Reference in new issue
Block a user