Skip to content

Commit

Permalink
Add missing SIP_FACTORY
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 31, 2017
1 parent 42b3e0b commit 7ba1b17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/core/qgsuserprofilemanager.sip
Expand Up @@ -118,7 +118,7 @@ class QgsUserProfileManager : QObject
Set the default profile name from the current active profile.
%End

QgsUserProfile *profileForName( const QString name ) const;
QgsUserProfile *profileForName( const QString &name ) const /Factory/;
%Docstring
Return the profile found for a given name.
\param name The name of the profile to return.
Expand Down
7 changes: 3 additions & 4 deletions src/app/qgisapp.cpp
Expand Up @@ -2283,13 +2283,12 @@ void QgisApp::refreshProfileMenu()

Q_FOREACH ( const QString &name, userProfileManager()->allProfiles() )
{
profile = userProfileManager()->profileForName( name );
QAction *action = new QAction( profile->icon(), profile->alias(), mConfigMenu );
action->setToolTip( profile->folder() );
std::unique_ptr< QgsUserProfile > namedProfile( userProfileManager()->profileForName( name ) );
QAction *action = new QAction( namedProfile->icon(), namedProfile->alias(), mConfigMenu );
action->setToolTip( namedProfile->folder() );
action->setCheckable( true );
profileGroup->addAction( action );
mConfigMenu->addAction( action );
delete profile;

if ( name == activeName )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsuserprofilemanager.h
Expand Up @@ -126,7 +126,7 @@ class CORE_EXPORT QgsUserProfileManager : public QObject
* \param name The name of the profile to return.
* \return A QgsUserprofile pointing to the location of the user profile.
*/
QgsUserProfile *profileForName( const QString name ) const;
QgsUserProfile *profileForName( const QString &name ) const SIP_FACTORY;

/**
* Create a user profile given by the name
Expand Down

0 comments on commit 7ba1b17

Please sign in to comment.