File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed
Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ This would happen when it gets out of scope.
116116#include "qgsreadwritecontext.h"
117117%End
118118 public:
119- QgsReadWriteContextCategoryPopper( QgsReadWriteContext * context );
119+ QgsReadWriteContextCategoryPopper( QgsReadWriteContext & context );
120120%Docstring
121121Creates a popper
122122%End
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ QgsReadWriteContextCategoryPopper QgsReadWriteContext::enterCategory( const QStr
4141 if ( !details.isEmpty () )
4242 message.append ( QString ( " :: %1" ).arg ( details ) );
4343 mCategories .push_back ( message );
44- return QgsReadWriteContextCategoryPopper ( this );
44+ return QgsReadWriteContextCategoryPopper ( * this );
4545}
4646
4747void QgsReadWriteContext::leaveCategory ()
Original file line number Diff line number Diff line change @@ -124,14 +124,10 @@ class CORE_EXPORT QgsReadWriteContextCategoryPopper
124124{
125125 public:
126126 // ! Creates a popper
127- QgsReadWriteContextCategoryPopper ( QgsReadWriteContext *context ) : mContext ( context ) {}
128- ~QgsReadWriteContextCategoryPopper ()
129- {
130- if ( mContext )
131- mContext ->leaveCategory ();
132- }
127+ QgsReadWriteContextCategoryPopper ( QgsReadWriteContext &context ) : mContext ( context ) {}
128+ ~QgsReadWriteContextCategoryPopper () {mContext .leaveCategory ();}
133129 private:
134- QgsReadWriteContext * mContext ;
130+ QgsReadWriteContext & mContext ;
135131};
136132
137133#endif // QGSREADWRITECONTEXT_H
You can’t perform that action at this time.
0 commit comments