Skip to content
Permalink
Browse files

Add missing SIP_FACTORY

  • Loading branch information
nyalldawson committed Aug 31, 2017
1 parent 42b3e0b commit 7ba1b1734bb6e81070dc43459bf2be604766933e
Showing with 5 additions and 6 deletions.
  1. +1 −1 python/core/qgsuserprofilemanager.sip
  2. +3 −4 src/app/qgisapp.cpp
  3. +1 −1 src/core/qgsuserprofilemanager.h
@@ -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.
@@ -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 )
{
@@ -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

0 comments on commit 7ba1b17

Please sign in to comment.
You can’t perform that action at this time.