~neon/grantlee/trunk

« back to all changes in this revision

Viewing changes to templates/lib/parser.cpp

  • Committer: Stephen Kelly
  • Date: 2014-09-22 11:05:05 UTC
  • Revision ID: git-v1:d7635489161c4defb4638e5f344880f65af58291
Remove typedefs for QSharedPointers from APIs.

The typedefs hide the semantic of memory management that is being
used, which is undesirable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
  QList<Token> m_tokenList;
61
61
 
62
62
  QHash<QString, AbstractNodeFactory*> m_nodeFactories;
63
 
  QHash<QString, Filter::Ptr> m_filters;
 
63
  QHash<QString, QSharedPointer<Filter> > m_filters;
64
64
 
65
65
  NodeList m_nodeList;
66
66
};
86
86
  QHashIterator<QString, Filter*> filterIt( library->filters() );
87
87
  while ( filterIt.hasNext() ) {
88
88
    filterIt.next();
89
 
    Filter::Ptr f = Filter::Ptr( filterIt.value() );
 
89
    QSharedPointer<Filter> f = QSharedPointer<Filter>( filterIt.value() );
90
90
    m_filters.insert( filterIt.key(), f );
91
91
  }
92
92
}
161
161
  throw Grantlee::Exception( UnclosedBlockTagError, QString::fromLatin1( "No closing tag found for %1" ).arg( tag ) );
162
162
}
163
163
 
164
 
Filter::Ptr Parser::getFilter( const QString &name ) const
 
164
QSharedPointer<Filter> Parser::getFilter( const QString &name ) const
165
165
{
166
166
  Q_D( const Parser );
167
167
  if ( !d->m_filters.contains( name ) )