summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-11-11 10:55:36 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-11-11 10:55:36 (GMT)
commita874f22f3362c8185f18b1d7666ebc734bfcfa8b (patch)
tree784c76b865d7985bce65b81b08496d7c6d04c224
parent3ae26b99d5ff23507da046d4cf9bcaf3cee35222 (diff)
No more need for nodeType() in private class of GeoDataFeature & subclasses
-rw-r--r--src/lib/marble/geodata/data/GeoDataContainer.cpp6
-rw-r--r--src/lib/marble/geodata/data/GeoDataContainer.h2
-rw-r--r--src/lib/marble/geodata/data/GeoDataContainer_p.h5
-rw-r--r--src/lib/marble/geodata/data/GeoDataDocument.cpp6
-rw-r--r--src/lib/marble/geodata/data/GeoDataDocument.h2
-rw-r--r--src/lib/marble/geodata/data/GeoDataDocument_p.h5
-rw-r--r--src/lib/marble/geodata/data/GeoDataFeature.cpp3
-rw-r--r--src/lib/marble/geodata/data/GeoDataFeature_p.h5
-rw-r--r--src/lib/marble/geodata/data/GeoDataFolder.cpp10
-rw-r--r--src/lib/marble/geodata/data/GeoDataFolder.h2
-rw-r--r--src/lib/marble/geodata/data/GeoDataPlacemark.cpp6
-rw-r--r--src/lib/marble/geodata/data/GeoDataPlacemark.h2
-rw-r--r--src/lib/marble/geodata/data/GeoDataPlacemark_p.h5
-rw-r--r--src/lib/marble/geodata/data/GeoDataTour_p.h5
14 files changed, 32 insertions, 32 deletions
diff --git a/src/lib/marble/geodata/data/GeoDataContainer.cpp b/src/lib/marble/geodata/data/GeoDataContainer.cpp
index 7d3f031..de28382 100644
--- a/src/lib/marble/geodata/data/GeoDataContainer.cpp
+++ b/src/lib/marble/geodata/data/GeoDataContainer.cpp
@@ -170,6 +170,12 @@ bool GeoDataContainer::equals( const GeoDataContainer &other ) const
return thisBegin == thisEnd && otherBegin == otherEnd;
}
+const char* GeoDataContainer::nodeType() const
+{
+ return GeoDataTypes::GeoDataContainerType;
+}
+
+
GeoDataFeature * GeoDataContainer::clone() const
{
return new GeoDataContainer(*this);
diff --git a/src/lib/marble/geodata/data/GeoDataContainer.h b/src/lib/marble/geodata/data/GeoDataContainer.h
index 91aad78..3faf51f 100644
--- a/src/lib/marble/geodata/data/GeoDataContainer.h
+++ b/src/lib/marble/geodata/data/GeoDataContainer.h
@@ -55,6 +55,8 @@ class GEODATA_EXPORT GeoDataContainer : public GeoDataFeature
GeoDataContainer& operator=(const GeoDataContainer& other);
+ virtual const char* nodeType() const;
+
GeoDataFeature * clone() const override;
/**
diff --git a/src/lib/marble/geodata/data/GeoDataContainer_p.h b/src/lib/marble/geodata/data/GeoDataContainer_p.h
index 9e8de85..ca390d5 100644
--- a/src/lib/marble/geodata/data/GeoDataContainer_p.h
+++ b/src/lib/marble/geodata/data/GeoDataContainer_p.h
@@ -52,11 +52,6 @@ class GeoDataContainerPrivate : public GeoDataFeaturePrivate
return *this;
}
- virtual const char* nodeType() const
- {
- return GeoDataTypes::GeoDataContainerType;
- }
-
virtual EnumFeatureId featureId() const
{
return GeoDataFolderId;
diff --git a/src/lib/marble/geodata/data/GeoDataDocument.cpp b/src/lib/marble/geodata/data/GeoDataDocument.cpp
index 3a9d80f..1101bbb 100644
--- a/src/lib/marble/geodata/data/GeoDataDocument.cpp
+++ b/src/lib/marble/geodata/data/GeoDataDocument.cpp
@@ -100,6 +100,12 @@ bool GeoDataDocument::operator!=( const GeoDataDocument &other ) const
return !this->operator==( other );
}
+const char* GeoDataDocument::nodeType() const
+{
+ return GeoDataTypes::GeoDataDocumentType;
+}
+
+
GeoDataFeature * GeoDataDocument::clone() const
{
return new GeoDataDocument(*this);
diff --git a/src/lib/marble/geodata/data/GeoDataDocument.h b/src/lib/marble/geodata/data/GeoDataDocument.h
index 36d14cc..3535924 100644
--- a/src/lib/marble/geodata/data/GeoDataDocument.h
+++ b/src/lib/marble/geodata/data/GeoDataDocument.h
@@ -73,6 +73,8 @@ public:
bool operator==( const GeoDataDocument &other ) const;
bool operator!=( const GeoDataDocument &other ) const;
+ virtual const char* nodeType() const;
+
GeoDataFeature * clone() const override;
/// Provides type information for downcasting a GeoData
diff --git a/src/lib/marble/geodata/data/GeoDataDocument_p.h b/src/lib/marble/geodata/data/GeoDataDocument_p.h
index 746306b..df89ed8 100644
--- a/src/lib/marble/geodata/data/GeoDataDocument_p.h
+++ b/src/lib/marble/geodata/data/GeoDataDocument_p.h
@@ -43,11 +43,6 @@ class GeoDataDocumentPrivate : public GeoDataContainerPrivate
{
}
- virtual const char* nodeType() const
- {
- return GeoDataTypes::GeoDataDocumentType;
- }
-
virtual EnumFeatureId featureId() const
{
return GeoDataDocumentId;
diff --git a/src/lib/marble/geodata/data/GeoDataFeature.cpp b/src/lib/marble/geodata/data/GeoDataFeature.cpp
index c5cd2e6..bff478b 100644
--- a/src/lib/marble/geodata/data/GeoDataFeature.cpp
+++ b/src/lib/marble/geodata/data/GeoDataFeature.cpp
@@ -125,8 +125,7 @@ GeoDataFeature * GeoDataFeature::clone() const
const char* GeoDataFeature::nodeType() const
{
- Q_D(const GeoDataFeature);
- return d->nodeType();
+ return GeoDataTypes::GeoDataFeatureType;
}
EnumFeatureId GeoDataFeature::featureId() const
diff --git a/src/lib/marble/geodata/data/GeoDataFeature_p.h b/src/lib/marble/geodata/data/GeoDataFeature_p.h
index a6c2d0b..eb8d934 100644
--- a/src/lib/marble/geodata/data/GeoDataFeature_p.h
+++ b/src/lib/marble/geodata/data/GeoDataFeature_p.h
@@ -197,11 +197,6 @@ class GeoDataFeaturePrivate
delete m_featureExtendedData;
}
- virtual const char* nodeType() const
- {
- return GeoDataTypes::GeoDataFeatureType;
- }
-
GeoDataFeatureExtendedData & featureExtendedData()
{
if (!m_featureExtendedData) {
diff --git a/src/lib/marble/geodata/data/GeoDataFolder.cpp b/src/lib/marble/geodata/data/GeoDataFolder.cpp
index 995a752..4b6dad2 100644
--- a/src/lib/marble/geodata/data/GeoDataFolder.cpp
+++ b/src/lib/marble/geodata/data/GeoDataFolder.cpp
@@ -31,11 +31,6 @@ namespace Marble
class GeoDataFolderPrivate : public GeoDataContainerPrivate
{
- public:
- virtual const char* nodeType() const
- {
- return GeoDataTypes::GeoDataFolderType;
- }
};
@@ -73,6 +68,11 @@ bool GeoDataFolder::operator!=( const GeoDataFolder &other ) const
return !this->operator==( other );
}
+const char* GeoDataFolder::nodeType() const
+{
+ return GeoDataTypes::GeoDataFolderType;
+}
+
GeoDataFeature * GeoDataFolder::clone() const
{
return new GeoDataFolder(*this);
diff --git a/src/lib/marble/geodata/data/GeoDataFolder.h b/src/lib/marble/geodata/data/GeoDataFolder.h
index 68d827e..d515253 100644
--- a/src/lib/marble/geodata/data/GeoDataFolder.h
+++ b/src/lib/marble/geodata/data/GeoDataFolder.h
@@ -58,6 +58,8 @@ class GEODATA_EXPORT GeoDataFolder : public GeoDataContainer
bool operator==( const GeoDataFolder &other ) const;
bool operator!=( const GeoDataFolder &other ) const;
+ virtual const char* nodeType() const;
+
GeoDataFeature * clone() const override;
private:
diff --git a/src/lib/marble/geodata/data/GeoDataPlacemark.cpp b/src/lib/marble/geodata/data/GeoDataPlacemark.cpp
index a2a268d..0e77b21 100644
--- a/src/lib/marble/geodata/data/GeoDataPlacemark.cpp
+++ b/src/lib/marble/geodata/data/GeoDataPlacemark.cpp
@@ -176,6 +176,12 @@ bool GeoDataPlacemark::operator!=( const GeoDataPlacemark& other ) const
return !this->operator==( other );
}
+const char* GeoDataPlacemark::nodeType() const
+{
+ return GeoDataTypes::GeoDataPlacemarkType;
+}
+
+
GeoDataFeature * GeoDataPlacemark::clone() const
{
return new GeoDataPlacemark(*this);
diff --git a/src/lib/marble/geodata/data/GeoDataPlacemark.h b/src/lib/marble/geodata/data/GeoDataPlacemark.h
index d5343cd..cc902f7 100644
--- a/src/lib/marble/geodata/data/GeoDataPlacemark.h
+++ b/src/lib/marble/geodata/data/GeoDataPlacemark.h
@@ -81,6 +81,8 @@ class GEODATA_EXPORT GeoDataPlacemark: public GeoDataFeature
bool operator==( const GeoDataPlacemark& other ) const;
bool operator!=( const GeoDataPlacemark& other ) const;
+ virtual const char* nodeType() const;
+
GeoDataFeature * clone() const override;
/**
diff --git a/src/lib/marble/geodata/data/GeoDataPlacemark_p.h b/src/lib/marble/geodata/data/GeoDataPlacemark_p.h
index 336ac7b..1f75fa2 100644
--- a/src/lib/marble/geodata/data/GeoDataPlacemark_p.h
+++ b/src/lib/marble/geodata/data/GeoDataPlacemark_p.h
@@ -112,11 +112,6 @@ class GeoDataPlacemarkPrivate : public GeoDataFeaturePrivate
return *this;
}
- virtual const char* nodeType() const
- {
- return GeoDataTypes::GeoDataPlacemarkType;
- }
-
virtual EnumFeatureId featureId() const
{
return GeoDataPlacemarkId;
diff --git a/src/lib/marble/geodata/data/GeoDataTour_p.h b/src/lib/marble/geodata/data/GeoDataTour_p.h
index 3af9b2d..a7ce7c6 100644
--- a/src/lib/marble/geodata/data/GeoDataTour_p.h
+++ b/src/lib/marble/geodata/data/GeoDataTour_p.h
@@ -60,11 +60,6 @@ public:
return *this;
}
- virtual const char *nodeType() const
- {
- return GeoDataTypes::GeoDataTourType;
- }
-
GeoDataPlaylist *m_playlist;
};