Commit 3411f0b4 authored by Volker Krause's avatar Volker Krause
Browse files

Turn MapData into a shared value type

This makes it easier and safer to pass this through QML, and it will make
it possible to expose API to QML (which we cannot do on the previous raw
pointer, nor a shared pointer directly).
parent 1155ff76
Pipeline #38859 passed with stage
in 21 seconds
......@@ -102,7 +102,7 @@ private Q_SLOTS:
QVERIFY(mapData.boundingBox().width() > 0);
PlatformFinder finder;
const auto result = finder.find(&mapData);
const auto result = finder.find(mapData);
QVERIFY(!result.empty());
QFile outFile(QFileInfo(expected).fileName());
......
......@@ -34,7 +34,7 @@ private Q_SLOTS:
PlatformModel model;
QAbstractItemModelTester modelTest(&model);
model.setMapData(&mapData);
model.setMapData(mapData);
model.setArrivalPlatform(QStringLiteral("10"), Platform::Rail);
model.setDeparturePlatform(QStringLiteral("7"), Platform::Rail);
QCOMPARE(model.rowCount(), 12);
......
......@@ -22,23 +22,26 @@ LocationQueryOverlayProxyModel::LocationQueryOverlayProxyModel(QObject *parent)
LocationQueryOverlayProxyModel::~LocationQueryOverlayProxyModel() = default;
MapData* LocationQueryOverlayProxyModel::mapData() const
MapData LocationQueryOverlayProxyModel::mapData() const
{
return m_data;
}
void LocationQueryOverlayProxyModel::setMapData(MapData* data)
void LocationQueryOverlayProxyModel::setMapData(const MapData &data)
{
// ### do not check for m_data != data, this does not actually change!
if (m_data == data) {
return;
}
beginResetModel();
m_data = data;
if (m_data) {
m_tagKeys.amenity = m_data->dataSet().makeTagKey("amenity");
m_tagKeys.capacity = m_data->dataSet().makeTagKey("capacity");
m_tagKeys.realtimeAvailable = m_data->dataSet().makeTagKey("mx:realtime_available");
m_tagKeys.network = m_data->dataSet().makeTagKey("network");
m_tagKeys.mxoid = m_data->dataSet().makeTagKey("mx:oid");
if (!m_data.isEmpty()) {
m_tagKeys.amenity = m_data.dataSet().makeTagKey("amenity");
m_tagKeys.capacity = m_data.dataSet().makeTagKey("capacity");
m_tagKeys.realtimeAvailable = m_data.dataSet().makeTagKey("mx:realtime_available");
m_tagKeys.network = m_data.dataSet().makeTagKey("network");
m_tagKeys.mxoid = m_data.dataSet().makeTagKey("mx:oid");
}
initialize();
......@@ -67,7 +70,7 @@ void LocationQueryOverlayProxyModel::setSourceModel(QAbstractItemModel *sourceMo
endResetModel();
});
connect(m_sourceModel, &QAbstractItemModel::rowsInserted, this, [this](const QModelIndex &parent, int first, int last) {
if (parent.isValid() || !m_data) {
if (parent.isValid() || m_data.isEmpty()) {
return;
}
beginInsertRows({}, first, last);
......@@ -77,7 +80,7 @@ void LocationQueryOverlayProxyModel::setSourceModel(QAbstractItemModel *sourceMo
endInsertRows();
});
connect(m_sourceModel, &QAbstractItemModel::rowsRemoved, this, [this](const QModelIndex &parent, int first, int last) {
if (parent.isValid() || !m_data) {
if (parent.isValid() || m_data.isEmpty()) {
return;
}
beginRemoveRows({}, first, last);
......@@ -85,7 +88,7 @@ void LocationQueryOverlayProxyModel::setSourceModel(QAbstractItemModel *sourceMo
endRemoveRows();
});
connect(m_sourceModel, &QAbstractItemModel::dataChanged, this, [this](const QModelIndex &first, const QModelIndex &last) {
if (first.parent().isValid() || last.parent().isValid() || !m_data) {
if (first.parent().isValid() || last.parent().isValid() || m_data.isEmpty()) {
return;
}
for (int i = first.row(); i <= last.row(); ++i) {
......@@ -132,7 +135,7 @@ QHash<int, QByteArray> LocationQueryOverlayProxyModel::roleNames() const
void LocationQueryOverlayProxyModel::initialize()
{
if (!m_data || !m_sourceModel) {
if (m_data.isEmpty() || !m_sourceModel) {
return;
}
......@@ -153,7 +156,7 @@ LocationQueryOverlayProxyModel::Info LocationQueryOverlayProxyModel::nodeForRow(
info.overlayNode.coordinate = OSM::Coordinate(loc.latitude(), loc.longitude());
// try to find a matching node in the base OSM data
for (const auto &n : m_data->dataSet().nodes) {
for (const auto &n : m_data.dataSet().nodes) {
if (OSM::distance(n.coordinate, info.overlayNode.coordinate) < 10 && OSM::tagValue(n, m_tagKeys.amenity) == "bicycle_rental") {
qDebug() << "found matching node, cloning that!" << n.url();
info.sourceElement = OSM::Element(&n);
......@@ -163,7 +166,7 @@ LocationQueryOverlayProxyModel::Info LocationQueryOverlayProxyModel::nodeForRow(
}
}
info.overlayNode.id = m_data->dataSet().nextInternalId();
info.overlayNode.id = m_data.dataSet().nextInternalId();
OSM::setTagValue(info.overlayNode, m_tagKeys.amenity, "bicycle_rental");
if (loc.rentalVehicleStation().capacity() >= 0) {
OSM::setTagValue(info.overlayNode, m_tagKeys.capacity, QByteArray::number(loc.rentalVehicleStation().capacity()));
......
......@@ -23,15 +23,15 @@ namespace KOSMIndoorMap {
class LocationQueryOverlayProxyModel : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(KOSMIndoorMap::MapData* mapData READ mapData WRITE setMapData NOTIFY mapDataChanged)
Q_PROPERTY(KOSMIndoorMap::MapData mapData READ mapData WRITE setMapData NOTIFY mapDataChanged)
Q_PROPERTY(QAbstractItemModel* sourceModel READ sourceModel WRITE setSourceModel NOTIFY sourceModelChanged)
public:
explicit LocationQueryOverlayProxyModel(QObject *parent = nullptr);
~LocationQueryOverlayProxyModel();
MapData* mapData() const;
void setMapData(MapData *data);
MapData mapData() const;
void setMapData(const MapData &data);
QAbstractItemModel *sourceModel() const;
void setSourceModel(QAbstractItemModel *sourceModel);
......@@ -69,7 +69,7 @@ private:
} m_tagKeys;
std::vector<Info> m_nodes;
MapData *m_data = nullptr;
MapData m_data;
QAbstractItemModel *m_sourceModel = nullptr;
};
......
......@@ -12,6 +12,7 @@
#include "osmelementinformationmodel.h"
#include <KOSMIndoorMap/GateModel>
#include <KOSMIndoorMap/MapData>
#include <KOSMIndoorMap/PlatformModel>
using namespace KOSMIndoorMap;
......@@ -21,9 +22,9 @@ void KOSMIndoorMapQuickPlugin::registerTypes(const char *uri)
Q_UNUSED(uri);
qRegisterMetaType<OSMAddress>();
qRegisterMetaType<OSMElement>();
qRegisterMetaType<MapData*>();
qRegisterMetaType<Platform::Mode>();
qmlRegisterUncreatableType<MapData>("org.kde.kosmindoormap", 1, 0, "MapData", {});
qmlRegisterUncreatableType<OSMAddress>("org.kde.kosmindoormap", 1, 0, "OSMAddress", {});
qmlRegisterUncreatableType<OSMElement>("org.kde.kosmindoormap", 1, 0, "OSMElement", {});
qmlRegisterUncreatableType<Platform>("org.kde.kosmindoormap", 1, 0, "Platform", {});
......
......@@ -188,12 +188,9 @@ QString MapItem::errorMessage() const
return m_errorMessage.isEmpty() ? m_loader->errorMessage() : m_errorMessage;
}
MapData* MapItem::mapData()
MapData MapItem::mapData() const
{
if (m_data.isEmpty()) {
return nullptr;
}
return &m_data;
return m_data;
}
QVariant MapItem::overlaySources() const
......
......@@ -40,7 +40,7 @@ class MapItem : public QQuickPaintedItem
/** Details on the error. */
Q_PROPERTY(QString errorMessage READ errorMessage NOTIFY errorChanged)
Q_PROPERTY(KOSMIndoorMap::MapData* mapData READ mapData NOTIFY mapDataChanged)
Q_PROPERTY(KOSMIndoorMap::MapData mapData READ mapData NOTIFY mapDataChanged)
/** Sources for overlays that should be rendered on top of the map. */
Q_PROPERTY(QVariant overlaySources READ overlaySources WRITE setOverlaySources NOTIFY overlaySourcesChanged)
......@@ -76,7 +76,7 @@ protected:
private:
void clear();
void loaderDone();
MapData* mapData();
MapData mapData() const;
QVariant overlaySources() const;
void setOverlaySources(const QVariant &overlays);
......
......@@ -19,20 +19,23 @@ GateModel::GateModel(QObject *parent)
GateModel::~GateModel() = default;
MapData* GateModel::mapData() const
MapData GateModel::mapData() const
{
return m_data;
}
void GateModel::setMapData(MapData* data)
void GateModel::setMapData(const MapData &data)
{
// ### do not check for m_data != data, this does not actually change!
if (m_data == data) {
return;
}
beginResetModel();
m_gates.clear();
m_data = data;
if (m_data) {
m_tagKeys.mxArrival = m_data->dataSet().makeTagKey("mx:arrival");
m_tagKeys.mxDeparture = m_data->dataSet().makeTagKey("mx:departure");
if (!m_data.isEmpty()) {
m_tagKeys.mxArrival = m_data.dataSet().makeTagKey("mx:arrival");
m_tagKeys.mxDeparture = m_data.dataSet().makeTagKey("mx:departure");
populateModel();
}
endResetModel();
......@@ -95,16 +98,12 @@ QHash<int, QByteArray> GateModel::roleNames() const
void GateModel::populateModel()
{
if (!m_data) {
return;
}
const auto aerowayKey = m_data->dataSet().tagKey("aeroway");
const auto aerowayKey = m_data.dataSet().tagKey("aeroway");
if (aerowayKey.isNull()) { // not looking at an airport at all here
return;
}
for (auto it = m_data->levelMap().begin(); it != m_data->levelMap().end(); ++it) {
for (auto it = m_data.levelMap().begin(); it != m_data.levelMap().end(); ++it) {
for (const auto &e : (*it).second) {
if (e.type() != OSM::Type::Node || e.tagValue(aerowayKey) != "gate") {
continue;
......@@ -120,8 +119,8 @@ void GateModel::populateModel()
gate.name = QString::fromUtf8(n);
gate.sourceElement = e;
gate.node = *e.node();
gate.node.id = m_data->dataSet().nextInternalId();
OSM::setTagValue(gate.node, m_data->dataSet().tagKey("name"), "TODO");
gate.node.id = m_data.dataSet().nextInternalId();
OSM::setTagValue(gate.node, m_data.dataSet().tagKey("name"), "TODO");
gate.level = (*it).first.numericLevel();
m_gates.push_back(gate);
}
......
......@@ -33,7 +33,7 @@ struct Gate {
class KOSMINDOORMAP_EXPORT GateModel : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(KOSMIndoorMap::MapData* mapData READ mapData WRITE setMapData NOTIFY mapDataChanged)
Q_PROPERTY(KOSMIndoorMap::MapData mapData READ mapData WRITE setMapData NOTIFY mapDataChanged)
Q_PROPERTY(bool isEmpty READ isEmpty NOTIFY mapDataChanged)
/** Row indexes of the matched arrival/departure gates, if found and/or set, otherwise @c -1. */
......@@ -43,8 +43,8 @@ public:
explicit GateModel(QObject *parent = nullptr);
~GateModel();
MapData* mapData() const;
void setMapData(MapData *data);
MapData mapData() const;
void setMapData(const MapData &data);
bool isEmpty() const;
......@@ -80,7 +80,7 @@ private:
void setGateTag(int idx, OSM::TagKey key, bool enabled);
std::vector<Gate> m_gates;
MapData *m_data = nullptr;
MapData m_data;
struct {
OSM::TagKey mxArrival;
......
......@@ -6,8 +6,6 @@
#include "platformfinder_p.h"
#include <loader/mapdata.h>
#include <QRegularExpression>
using namespace KOSMIndoorMap;
......@@ -39,12 +37,12 @@ static QString nameFromTrack(OSM::Element track)
return {};
}
std::vector<Platform> PlatformFinder::find(const MapData *data)
std::vector<Platform> PlatformFinder::find(const MapData &data)
{
m_data = data;
resolveTagKeys();
for (auto it = m_data->levelMap().begin(); it != m_data->levelMap().end(); ++it) {
for (auto it = m_data.levelMap().begin(); it != m_data.levelMap().end(); ++it) {
for (const auto &e : (*it).second) {
if (!e.hasTags()) {
continue;
......@@ -79,7 +77,7 @@ std::vector<Platform> PlatformFinder::find(const MapData *data)
platform.setName(name);
platform.setLevel(levelForPlatform((*it).first, e));
platform.setMode(modeForElement(e));
platform.setSections(sectionsForPath(e.outerPath(m_data->dataSet()), name));
platform.setSections(sectionsForPath(e.outerPath(m_data.dataSet()), name));
// we delay merging of platforms, as those without track names would
// otherwise cobble together two distinct edges when merged to early
m_platformAreas.push_back(std::move(platform));
......@@ -90,12 +88,12 @@ std::vector<Platform> PlatformFinder::find(const MapData *data)
platform.setEdge(e);
platform.setName(QString::fromUtf8(e.tagValue("local_ref", "ref")));
platform.setLevel(levelForPlatform((*it).first, e));
platform.setSections(sectionsForPath(e.outerPath(m_data->dataSet()), platform.name()));
platform.setSections(sectionsForPath(e.outerPath(m_data.dataSet()), platform.name()));
addPlatform(std::move(platform));
}
else if (!railway.isEmpty() && e.type() == OSM::Type::Way && railway != "disused") {
OSM::for_each_node(m_data->dataSet(), *e.way(), [&](const auto &node) {
if (!OSM::contains(m_data->boundingBox(), node.coordinate)) {
OSM::for_each_node(m_data.dataSet(), *e.way(), [&](const auto &node) {
if (!OSM::contains(m_data.boundingBox(), node.coordinate)) {
return;
}
if (OSM::tagValue(node, m_tagKeys.railway) == "buffer_stop") {
......@@ -113,7 +111,7 @@ std::vector<Platform> PlatformFinder::find(const MapData *data)
if (platform.mode() == Platform::Unknown) {
platform.setMode(modeForElement(e));
}
platform.setSections(sectionsForPath(e.outerPath(m_data->dataSet()), platform.name()));
platform.setSections(sectionsForPath(e.outerPath(m_data.dataSet()), platform.name()));
addPlatform(std::move(platform));
}
......@@ -122,7 +120,7 @@ std::vector<Platform> PlatformFinder::find(const MapData *data)
}
}
OSM::for_each(m_data->dataSet(), [this](OSM::Element e) {
OSM::for_each(m_data.dataSet(), [this](OSM::Element e) {
const auto route = e.tagValue(m_tagKeys.route);
if (route.isEmpty() || route == "tracks") {
return;
......@@ -142,13 +140,13 @@ std::vector<Platform> PlatformFinder::find(const MapData *data)
void PlatformFinder::resolveTagKeys()
{
m_tagKeys.level = m_data->dataSet().tagKey("level");
m_tagKeys.platform_ref = m_data->dataSet().tagKey("platform_ref");
m_tagKeys.platform_colon_ref = m_data->dataSet().tagKey("platform:ref");
m_tagKeys.public_transport = m_data->dataSet().tagKey("public_transport");
m_tagKeys.railway = m_data->dataSet().tagKey("railway");
m_tagKeys.railway_platform_section = m_data->dataSet().tagKey("railway:platform:section");
m_tagKeys.route = m_data->dataSet().tagKey("route");
m_tagKeys.level = m_data.dataSet().tagKey("level");
m_tagKeys.platform_ref = m_data.dataSet().tagKey("platform_ref");
m_tagKeys.platform_colon_ref = m_data.dataSet().tagKey("platform:ref");
m_tagKeys.public_transport = m_data.dataSet().tagKey("public_transport");
m_tagKeys.railway = m_data.dataSet().tagKey("railway");
m_tagKeys.railway_platform_section = m_data.dataSet().tagKey("railway:platform:section");
m_tagKeys.route = m_data.dataSet().tagKey("route");
}
void PlatformFinder::scanRoute(OSM::Element e, OSM::Element route)
......@@ -160,12 +158,12 @@ void PlatformFinder::scanRoute(OSM::Element e, OSM::Element route)
scanRoute(*e.node(), route);
break;
case OSM::Type::Way:
OSM::for_each_node(m_data->dataSet(), *e.way(), [this, route](const OSM::Node &node) {
OSM::for_each_node(m_data.dataSet(), *e.way(), [this, route](const OSM::Node &node) {
scanRoute(node, route);
});
break;
case OSM::Type::Relation:
OSM::for_each_member(m_data->dataSet(), *e.relation(), [this, route](OSM::Element e) {
OSM::for_each_member(m_data.dataSet(), *e.relation(), [this, route](OSM::Element e) {
scanRoute(e, route);
});
break;
......@@ -266,8 +264,8 @@ int PlatformFinder::levelForPlatform(const MapLevel &ml, OSM::Element e) const
void PlatformFinder::addPlatform(Platform &&platform)
{
for (Platform &p : m_platforms) {
if (Platform::isSame(p, platform, m_data->dataSet())) {
p = Platform::merge(p, platform, m_data->dataSet());
if (Platform::isSame(p, platform, m_data.dataSet())) {
p = Platform::merge(p, platform, m_data.dataSet());
return;
}
}
......@@ -286,8 +284,8 @@ void PlatformFinder::mergePlatformAreas()
for (auto it = m_platformAreas.begin(); it != m_platformAreas.end();) {
bool found = false;
for (Platform &p : m_platforms) {
if (Platform::isSame(p, (*it), m_data->dataSet())) {
p = Platform::merge(p, (*it), m_data->dataSet());
if (Platform::isSame(p, (*it), m_data.dataSet())) {
p = Platform::merge(p, (*it), m_data.dataSet());
found = true;
}
}
......@@ -316,8 +314,8 @@ void PlatformFinder::finalizeResult()
// so do another merge pass over everything we have found so far
for (auto it = m_platforms.begin(); it != std::prev(m_platforms.end()) && it != m_platforms.end(); ++it) {
for (auto it2 = std::next(it); it2 != m_platforms.end();) {
if (Platform::isSame(*it, *it2, m_data->dataSet())) {
(*it) = Platform::merge(*it, *it2, m_data->dataSet());
if (Platform::isSame(*it, *it2, m_data.dataSet())) {
(*it) = Platform::merge(*it, *it2, m_data.dataSet());
it2 = m_platforms.erase(it2);
} else {
++it2;
......
......@@ -11,6 +11,8 @@
#include "platform.h"
#include <KOSMIndoorMap/MapData>
#include <QCollator>
namespace KOSMIndoorMap {
......@@ -27,7 +29,7 @@ public:
explicit PlatformFinder();
~PlatformFinder();
std::vector<Platform> find(const MapData *data);
std::vector<Platform> find(const MapData &data);
private:
void scanRoute(OSM::Element e, OSM::Element route);
......@@ -38,7 +40,7 @@ private:
void addPlatform(Platform &&platform);
const MapData *m_data;
MapData m_data;
struct {
OSM::TagKey level;
OSM::TagKey platform_ref;
......
......@@ -7,8 +7,6 @@
#include "platformmodel.h"
#include "platformfinder_p.h"
#include <KOSMIndoorMap/MapData>
#include <QPointF>
#include <QRegularExpression>
......@@ -25,26 +23,29 @@ PlatformModel::PlatformModel(QObject* parent) :
PlatformModel::~PlatformModel() = default;
MapData* PlatformModel::mapData() const
MapData PlatformModel::mapData() const
{
return m_data;
}
void PlatformModel::setMapData(MapData* data)
void PlatformModel::setMapData(const MapData &data)
{
// ### do not check for m_data != data, this does not actually change!
if (m_data == data) {
return;
}
beginResetModel();
m_platforms.clear();
m_platformLabels.clear();
m_sectionsLabels.clear();
m_data = data;
if (m_data) {
if (!m_data.isEmpty()) {
PlatformFinder finder;
m_platforms = finder.find(m_data);
m_tagKeys.arrival = m_data->dataSet().makeTagKey("mx:arrival");
m_tagKeys.departure = m_data->dataSet().makeTagKey("mx:departure");
m_tagKeys.arrival = m_data.dataSet().makeTagKey("mx:arrival");
m_tagKeys.departure = m_data.dataSet().makeTagKey("mx:departure");
createLabels();
}
endResetModel();
......@@ -229,8 +230,8 @@ int PlatformModel::matchPlatform(const Platform &platform) const
void PlatformModel::createLabels()
{
const auto platformTag = m_data->dataSet().makeTagKey("mx:platform");
const auto sectionTag = m_data->dataSet().makeTagKey("mx:platform_section");
const auto platformTag = m_data.dataSet().makeTagKey("mx:platform");
const auto sectionTag = m_data.dataSet().makeTagKey("mx:platform_section");
m_platformLabels.reserve(m_platforms.size());
m_sectionsLabels.resize(m_platforms.size());
......@@ -239,7 +240,7 @@ void PlatformModel::createLabels()
// TODO using the full edge/track path here might be better for layouting
auto node = new OSM::Node;
node->id = m_data->dataSet().nextInternalId();
node->id = m_data.dataSet().nextInternalId();
node->coordinate = p.position();
OSM::setTagValue(*node, platformTag, p.name().toUtf8());
m_platformLabels.push_back(OSM::UniqueElement(node));
......@@ -247,7 +248,7 @@ void PlatformModel::createLabels()
m_sectionsLabels[i].reserve(p.sections().size());
for (const auto &sec : p.sections()) {
auto node = new OSM::Node;
node->id = m_data->dataSet().nextInternalId();
node->id = m_data.dataSet().nextInternalId();
node->coordinate = sec.position.center();
OSM::setTagValue(*node, sectionTag, sec.name.toUtf8());
m_sectionsLabels[i].push_back(OSM::UniqueElement(node));
......
......@@ -11,12 +11,12 @@
#include "platform.h"
#include <KOSMIndoorMap/MapData>
#include <QAbstractItemModel>
namespace KOSMIndoorMap {
class MapData;
/** Lists all platforms/tracks and platform sections found in the current map.
* There's also the concept of (optional) arrival/departure platforms in here to highlight
* arriving/departing locations when used in context of a planned journey.
......@@ -24,7 +24,7 @@ class MapData;
class KOSMINDOORMAP_EXPORT PlatformModel : public QAbstractItemModel
{
Q_OBJECT
Q_PROPERTY(KOSMIndoorMap::MapData* mapData READ mapData WRITE setMapData NOTIFY mapDataChanged)
Q_PROPERTY(KOSMIndoorMap::MapData mapData READ mapData WRITE setMapData NOTIFY mapDataChanged)
Q_PROPERTY(bool isEmpty READ isEmpty NOTIFY mapDataChanged)
/** Row indexes of the matched arrival/departure platforms, if found and/or set, otherwise @c -1. */
......@@ -34,8 +34,8 @@ public:
explicit PlatformModel(QObject *parent = nullptr);
~PlatformModel();
MapData* mapData() const;
void setMapData(MapData *data);
MapData mapData() const;
void setMapData(const MapData &data);
bool isEmpty() const;
......@@ -75,7 +75,7 @@ private:
void setPlatformTag(int idx, OSM::TagKey key, bool enabled);
std::vector<Platform> m_platforms;
MapData *m_data = nullptr;
MapData m_data;
struct {
OSM::TagKey arrival;
OSM::TagKey departure;
......
......@@ -85,12 +85,15 @@ public:
}
MapData::MapData()
: d(new MapDataPrivate)
: d(std::make_shared<MapDataPrivate>())
{
}
MapData::MapData(const MapData&) = default;
MapData::MapData(MapData&&) = default;
MapData::~MapData() = default;
MapData& MapData::operator=(const MapData&) = default;
MapData& MapData::operator=(MapData&&) = default;
const OSM::DataSet& MapData::dataSet() const
......@@ -100,7 +103,12 @@ const OSM::DataSet& MapData::dataSet() const
bool MapData::isEmpty() const
{
return d->m_levelMap.empty();
return !d || d->m_levelMap.empty();
}
bool MapData::operator==(const MapData &other) const
{
return d == other.d;
}
OSM::DataSet& MapData::dataSet()
......
......@@ -55,16 +55,18 @@ class MapDataPrivate;
/** Raw OSM map data, separated by levels. */
class KOSMINDOORMAP_EXPORT MapData
{
Q_GADGET
public:
explicit MapData();
MapData(const MapData&) = delete;
MapData(const MapData&);