From kde-commits Mon Feb 20 21:25:55 2012 From: Frank Osterfeld Date: Mon, 20 Feb 2012 21:25:55 +0000 To: kde-commits Subject: [kdepim/akregator_port] krsslocal: remove krssresource_export.h and KRssResource namespace usage. Message-Id: <20120220212555.F064FA6109 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=132977354700782 Git commit b0f3b9e0b425ca5dc4448e29b75f2a899993723f by Frank Osterfeld. Committed on 27/09/2011 at 20:43. Pushed by cgiboudeaux into branch 'akregator_port'. remove krssresource_export.h and KRssResource namespace usage. M +0 -2 krsslocal/krsslocalresource.cpp M +4 -3 krsslocal/krsslocalresource.h M +0 -1 krsslocal/opmlparser.cpp M +8 -13 krsslocal/opmlparser.h M +3 -3 krsslocal/rssitemsync.h M +6 -6 krsslocal/util.cpp M +5 -8 krsslocal/util.h http://commits.kde.org/kdepim/b0f3b9e0b425ca5dc4448e29b75f2a899993723f diff --git a/krsslocal/krsslocalresource.cpp b/krsslocal/krsslocalresource.= cpp index 7e0f523..e973a6e 100644 --- a/krsslocal/krsslocalresource.cpp +++ b/krsslocal/krsslocalresource.cpp @@ -39,12 +39,10 @@ #include = #include -#include #include #include = using namespace Akonadi; -using namespace KRssResource; using namespace boost; = KRssLocalResource::KRssLocalResource( const QString &id ) diff --git a/krsslocal/krsslocalresource.h b/krsslocal/krsslocalresource.h index 2a0bfc1..97d67a8 100644 --- a/krsslocal/krsslocalresource.h +++ b/krsslocal/krsslocalresource.h @@ -24,6 +24,7 @@ #include #include #include + #include "opmlparser.h" #include "rssitemsync.h" = @@ -33,12 +34,12 @@ class KRssLocalResource : public Akonadi::ResourceBase, Q_OBJECT = public: - KRssLocalResource( const QString &id ); + explicit KRssLocalResource( const QString &id ); ~KRssLocalResource(); - Akonadi::Collection::List buildCollectionTree( QList > listOfNodes, = + Akonadi::Collection::List buildCollectionTree( QList > listOfNodes, = Akonadi::Collection::List &list, Akonadi::Collection &parent); QString mimeType(); - void writeFeedsToOpml(const QString &path, const QList >& nodes); + void writeFeedsToOpml(const QString &path, const QList >& nodes); = public Q_SLOTS: virtual void configure( WId windowId ); = diff --git a/krsslocal/opmlparser.cpp b/krsslocal/opmlparser.cpp index 475b9a3..d08d8c3 100644 --- a/krsslocal/opmlparser.cpp +++ b/krsslocal/opmlparser.cpp @@ -27,7 +27,6 @@ #include = using namespace boost; -using namespace KRssResource; = class ParsedNode::Private { public: diff --git a/krsslocal/opmlparser.h b/krsslocal/opmlparser.h index e3f163c..1a15f06 100644 --- a/krsslocal/opmlparser.h +++ b/krsslocal/opmlparser.h @@ -15,10 +15,8 @@ along with this program. If not, see . */ = -#ifndef KRSSRESOURCE_OPMLPARSER_H -#define KRSSRESOURCE_OPMLPARSER_H - -#include +#ifndef OPMLPARSER_H +#define OPMLPARSER_H = #include #include @@ -35,12 +33,11 @@ class QXmlStreamWriter; class QXmlStreamAttributes; = -namespace KRssResource { = class ParsedFeed; class ParsedFolder; = -class KRSSRESOURCE_EXPORT ParsedNode : public boost::enable_shared_from_th= is +class ParsedNode : public boost::enable_shared_from_this { public: ParsedNode(); @@ -68,7 +65,7 @@ private: Private* const d; }; = -class KRSSRESOURCE_EXPORT ParsedFeed : public ParsedNode +class ParsedFeed : public ParsedNode { public: ParsedFeed(); @@ -96,7 +93,7 @@ private: Private* const d; }; = -class KRSSRESOURCE_EXPORT ParsedFolder : public ParsedNode +class ParsedFolder : public ParsedNode { public: ParsedFolder(); @@ -115,7 +112,7 @@ private: Private* const d; }; = -class KRSSRESOURCE_EXPORT OpmlReader +class OpmlReader { public: OpmlReader(); @@ -135,7 +132,7 @@ private: Q_DISABLE_COPY( OpmlReader ) }; = -class KRSSRESOURCE_EXPORT OpmlWriter +class OpmlWriter { public: static void writeOpml( QXmlStreamWriter& writer, const QList >& nodes, @@ -145,6 +142,4 @@ public: = }; = -} //namespace KRssResource - -#endif // KRSSRESOURCE_OPMLPARSER_H +#endif // OPMLPARSER_H diff --git a/krsslocal/rssitemsync.h b/krsslocal/rssitemsync.h index f221d74..7953b1e 100644 --- a/krsslocal/rssitemsync.h +++ b/krsslocal/rssitemsync.h @@ -15,8 +15,8 @@ along with this program. If not, see . */ = -#ifndef KRSSRESOURCE_RSSITEMSYNC -#define KRSSRESOURCE_RSSITEMSYNC +#ifndef RSSITEMSYNC +#define RSSITEMSYNC = #include = @@ -35,4 +35,4 @@ private: bool m_synchronizeFlags; }; = -#endif // KRSSRESOURCE_RSSITEMSYNC +#endif // RSSITEMSYNC diff --git a/krsslocal/util.cpp b/krsslocal/util.cpp index e576acb..0e2bd1c 100644 --- a/krsslocal/util.cpp +++ b/krsslocal/util.cpp @@ -46,7 +46,7 @@ static inline int calcHash( const QString& str ) return qChecksum( array.constData(), array.size() ); } = -KRss::RssItem KRssResource::Util::fromSyndicationItem(const Syndication::I= temPtr& syndItem) +KRss::RssItem Util::fromSyndicationItem(const Syndication::ItemPtr& syndIt= em) { KRss::RssItem rssItem; rssItem.setHeadersLoaded( true ); @@ -133,16 +133,16 @@ KRss::RssItem KRssResource::Util::fromSyndicationItem= (const Syndication::ItemPtr return rssItem; } = -QList< boost::shared_ptr< const KRssResource::ParsedNode > > KRssResource:= :Util::parsedDescendants( QList< Akonadi::Collection >& collections, Akonad= i::Collection parent ) +QList< boost::shared_ptr< const ParsedNode > > Util::parsedDescendants( QL= ist< Akonadi::Collection >& collections, Akonadi::Collection parent ) { - QList > nodesList; + QList > nodesList; = Q_FOREACH( const Akonadi::Collection& collection , collections ) { if (collection.parentCollection() =3D=3D parent) { - boost::shared_ptr< KRssResource::ParsedNode > node; + boost::shared_ptr< ParsedNode > node; const KRss::FeedCollection feedCollection =3D collection; if (feedCollection.feedType() =3D=3D QLatin1String( "" )) { // it's a= folder. correct test??? - QList< boost::shared_ptr< const KRssResource::ParsedNode > > children = =3D parsedDescendants( collections, collection ); + QList< boost::shared_ptr< const ParsedNode > > children =3D parsedDescen= dants( collections, collection ); if (parent =3D=3D Akonadi::Collection::root()) { return children; } @@ -167,7 +167,7 @@ QList< boost::shared_ptr< const KRssResource::ParsedNod= e > > KRssResource::Util: = = /* -QString KRssResource::generateCollectionName( const Akonadi::Collection& c= ollection ) +QString generateCollectionName( const Akonadi::Collection& collection ) { if ( static_cast( collection ).title().isEmpty()= ) { return collection.remoteId(); diff --git a/krsslocal/util.h b/krsslocal/util.h index bd368b1..d0bc1a2 100644 --- a/krsslocal/util.h +++ b/krsslocal/util.h @@ -16,21 +16,18 @@ along with this program. If not, see . */ = -#ifndef KRSSRESOURCE_UTIL_H -#define KRSSRESOURCE_UTIL_H +#ifndef UTIL_H +#define UTIL_H = #include "opmlparser.h" = #include #include = -namespace KRssResource { - namespace Util { +namespace Util { = KRss::RssItem fromSyndicationItem( const Syndication::ItemPtr& syndIte= m ); - QList > parsedDescendants( QList< = Akonadi::Collection >& collections, Akonadi::Collection parent ); - = - }; + QList > parsedDescendants( QList< = Akonadi::Collection >& collections, Akonadi::Collection parent ); = }; = -#endif // KRSSRESOURCE_UTIL_H +#endif // UTIL_H