OSDN Git Service

syndication: do not forward-declare boost classes
authorIvailo Monev <xakepa10@gmail.com>
Sat, 21 Aug 2021 21:19:35 +0000 (00:19 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Sat, 21 Aug 2021 21:19:35 +0000 (00:19 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
syndication/mapper.h
syndication/rdf/contentvocab.h
syndication/rdf/document.cpp
syndication/rdf/modelmaker.h
syndication/rdf/nodevisitor.h
syndication/rdf/rdfvocab.h
syndication/rdf/resource.cpp
syndication/rdf/rssvocab.h
syndication/rdf/statement.cpp
syndication/rdf/syndicationvocab.h

index e0b9cd5..8e6e8d2 100644 (file)
@@ -25,9 +25,7 @@
 
 #include "ksyndication_export.h"
 
-namespace boost {
-    template <class T> class shared_ptr;
-}
+#include <boost/shared_ptr.hpp>
 
 namespace Syndication {
 
index 1d6b91d..fa013c1 100644 (file)
@@ -26,9 +26,7 @@
 
 #include <QString>
 
-namespace boost {
-    template <class T> class shared_ptr;
-}
+#include <boost/shared_ptr.hpp>
 
 namespace Syndication {
 
index 997e3c9..2f1239c 100644 (file)
@@ -41,8 +41,6 @@
 #include <QtCore/QStringList>
 #include <QtCore/QVector>
 
-using namespace boost;
-
 namespace Syndication {
 namespace RDF {
 
@@ -58,7 +56,7 @@ class Document::Private
     mutable bool itemTitlesGuessed;
     mutable bool itemDescriptionContainsMarkup;
     mutable bool itemDescGuessed;
-    shared_ptr<Model::ModelPrivate> modelPrivate;
+    boost::shared_ptr<Model::ModelPrivate> modelPrivate;
 };
 
 Document::Document() : Syndication::SpecificDocument(),
index 737bb91..06f8bd8 100644 (file)
@@ -27,9 +27,7 @@
 #include <QDomDocument>
 #include <QDomElement>
 
-namespace boost {
-    template <class T> class shared_ptr;
-}
+#include <boost/shared_ptr.hpp>
 
 namespace Syndication {
 namespace RDF {
index 7dfb0da..58f9b29 100644 (file)
@@ -24,9 +24,7 @@
 
 #include <syndication/ksyndication_export.h>
 
-namespace boost {
-    template <class T> class shared_ptr;
-}
+#include <boost/shared_ptr.hpp>
 
 namespace Syndication {
 
index 457210e..f5e6b6a 100644 (file)
@@ -26,9 +26,7 @@
 
 #include <QString>
 
-namespace boost {
-    template <class T> class shared_ptr;
-}
+#include <boost/shared_ptr.hpp>
 
 namespace Syndication {
     
index 6bbb209..6966df6 100644 (file)
@@ -34,8 +34,6 @@
 
 #include <boost/weak_ptr.hpp>
 
-using namespace boost;
-
 namespace Syndication {
 namespace RDF {
 
@@ -44,7 +42,7 @@ class Resource::ResourcePrivate
     public:
 
         QString uri;
-        weak_ptr<Model::ModelPrivate> model;
+        boost::weak_ptr<Model::ModelPrivate> model;
         bool isAnon;
         unsigned int id;
 
@@ -107,7 +105,7 @@ bool Resource::hasProperty(PropertyPtr property) const
 {
     if (!d)
         return false;
-    const shared_ptr<Model::ModelPrivate> m = d->model.lock();
+    const boost::shared_ptr<Model::ModelPrivate> m = d->model.lock();
     if (!m)
         return false;
     return m->resourceHasProperty(this, property);
@@ -118,7 +116,7 @@ StatementPtr Resource::property(PropertyPtr property) const
     StatementPtr ptr(new Statement());
     if (!d)
         return ptr;
-    const shared_ptr<Model::ModelPrivate> m = d->model.lock();
+    const boost::shared_ptr<Model::ModelPrivate> m = d->model.lock();
     if (!m)
         return ptr;
     return m->resourceProperty(this, property);
@@ -128,7 +126,7 @@ QList<StatementPtr> Resource::properties(PropertyPtr property) const
 {
     if (!d)
         return QList<StatementPtr>();
-    const shared_ptr<Model::ModelPrivate> m = d->model.lock();
+    const boost::shared_ptr<Model::ModelPrivate> m = d->model.lock();
     if (!m)
         return QList<StatementPtr>();
 
@@ -162,7 +160,7 @@ Model Resource::model() const
     if (!d)
         return Model();
 
-    const shared_ptr<Model::ModelPrivate> mp = d->model.lock();
+    const boost::shared_ptr<Model::ModelPrivate> mp = d->model.lock();
 
     Model m;
 
index 9ca3943..e572792 100644 (file)
@@ -27,9 +27,7 @@
 #include <QString>
 #include <QStringList>
 
-namespace boost {
-    template <class T> class shared_ptr;
-}
+#include <boost/shared_ptr.hpp>
 
 namespace Syndication {
 
index b9e412a..0e8c7da 100644 (file)
@@ -31,8 +31,6 @@
 
 #include <boost/weak_ptr.hpp>
 
-using namespace boost;
-
 namespace Syndication {
 namespace RDF {
 
@@ -43,7 +41,7 @@ class Statement::StatementPrivate
         uint subjectID;
         uint predicateID;
         uint objectID;
-        weak_ptr<Model::ModelPrivate> model;
+        boost::weak_ptr<Model::ModelPrivate> model;
 
         bool operator==(const StatementPrivate& other) const
         {
@@ -100,25 +98,25 @@ bool Statement::isNull() const
 
 ResourcePtr Statement::subject() const
 {
-    const shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : shared_ptr<Model::ModelPrivate>();
+    const boost::shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : boost::shared_ptr<Model::ModelPrivate>();
     return m ? m->resourceByID(d->subjectID) : ResourcePtr(new Resource);
 }
 
 PropertyPtr Statement::predicate() const
 {
-    const shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : shared_ptr<Model::ModelPrivate>();
+    const boost::shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : boost::shared_ptr<Model::ModelPrivate>();
     return m ? m->propertyByID(d->predicateID) : PropertyPtr( new Property() );
 }
 
 NodePtr Statement::object() const
 {
-    const shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : shared_ptr<Model::ModelPrivate>();
+    const boost::shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : boost::shared_ptr<Model::ModelPrivate>();
     return m ? m->nodeByID(d->objectID) : NodePtr( LiteralPtr( new Literal() ) );
 }
 
 ResourcePtr Statement::asResource() const
 {
-    const shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : shared_ptr<Model::ModelPrivate>();
+    const boost::shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : boost::shared_ptr<Model::ModelPrivate>();
 
     if (isNull() || !m || !m->nodeByID(d->objectID)->isResource())
         return ResourcePtr(new Resource);
@@ -131,7 +129,7 @@ QString Statement::asString() const
     if (isNull())
         return QString();
 
-    const shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : shared_ptr<Model::ModelPrivate>();
+    const boost::shared_ptr<Model::ModelPrivate> m = d ? d->model.lock() : boost::shared_ptr<Model::ModelPrivate>();
     return m ? m->nodeByID(d->objectID)->text() : QString();
 }
 
index 37df223..cb409a5 100644 (file)
@@ -27,9 +27,7 @@
 
 #include <QString>
 
-namespace boost {
-    template <class T> class shared_ptr;
-}
+#include <boost/shared_ptr.hpp>
 
 namespace Syndication {