diff --git a/python/core/qgsuserprofilemanager.sip b/python/core/qgsuserprofilemanager.sip index 5b0437e0aab..8380a3e8558 100644 --- a/python/core/qgsuserprofilemanager.sip +++ b/python/core/qgsuserprofilemanager.sip @@ -34,7 +34,7 @@ class QgsUserProfileManager : QObject User profile manager used to manage user profiles for the instance of QGIS. %End - static QString resolveProfilesFolder( const QString &basePath = QString() ); + static QString resolveProfilesFolder( const QString &basePath = QString() ); %Docstring Resolves the profiles folder for the given path. Path will have \\profiles appended to the path \param basePath The base path to resolve the path from to append the \\profiles folder to. @@ -58,7 +58,7 @@ class QgsUserProfileManager : QObject :rtype: QgsUserProfile %End - void setRootLocation( QString rootProfileLocation ); + void setRootLocation( const QString &rootProfileLocation ); %Docstring Set the root profile location for the profile manager. All profiles are loaded from this location. Will also contain a profiles.ini for holding profile settings. @@ -134,7 +134,7 @@ class QgsUserProfileManager : QObject :rtype: QgsError %End - QgsError deleteProfile( const QString name ); + QgsError deleteProfile( const QString &name ); %Docstring Deletes a profile from the root profiles folder. .. note:: diff --git a/src/core/qgsuserprofilemanager.cpp b/src/core/qgsuserprofilemanager.cpp index a09a86db4f1..83306ee874c 100644 --- a/src/core/qgsuserprofilemanager.cpp +++ b/src/core/qgsuserprofilemanager.cpp @@ -58,7 +58,7 @@ QgsUserProfile *QgsUserProfileManager::getProfile( const QString &defaultProfile return profile; } -void QgsUserProfileManager::setRootLocation( QString rootProfileLocation ) +void QgsUserProfileManager::setRootLocation( const QString &rootProfileLocation ) { mRootProfilePath = rootProfileLocation; @@ -115,7 +115,7 @@ bool QgsUserProfileManager::profileExists( const QString &name ) const return allProfiles().contains( name ); } -QgsUserProfile *QgsUserProfileManager::profileForName( const QString name ) const +QgsUserProfile *QgsUserProfileManager::profileForName( const QString &name ) const { QString profilePath = mRootProfilePath + QDir::separator() + name; return new QgsUserProfile( profilePath ); @@ -154,7 +154,7 @@ QgsError QgsUserProfileManager::createUserProfile( const QString &name ) return error; } -QgsError QgsUserProfileManager::deleteProfile( const QString name ) +QgsError QgsUserProfileManager::deleteProfile( const QString &name ) { QgsError error; QDir folder( mRootProfilePath + QDir::separator() + name ); diff --git a/src/core/qgsuserprofilemanager.h b/src/core/qgsuserprofilemanager.h index 5373df7d522..fe238e36929 100644 --- a/src/core/qgsuserprofilemanager.h +++ b/src/core/qgsuserprofilemanager.h @@ -53,7 +53,7 @@ class CORE_EXPORT QgsUserProfileManager : public QObject * \param basePath The base path to resolve the path from to append the \\profiles folder to. * \return The root path to store user profiles. */ - static QString resolveProfilesFolder( const QString &basePath = QString() ); + static QString resolveProfilesFolder( const QString &basePath = QString() ); /** * Return the profile from the given root profile location. @@ -73,7 +73,7 @@ class CORE_EXPORT QgsUserProfileManager : public QObject * location. Will also contain a profiles.ini for holding profile settings. * \param rootProfileLocation Path to the top level profile folder which contains folders for each profile. */ - void setRootLocation( QString rootProfileLocation ); + void setRootLocation( const QString &rootProfileLocation ); /** * Returns the path to the root profiles location. @@ -141,7 +141,7 @@ class CORE_EXPORT QgsUserProfileManager : public QObject * \param name The name of the profile to delete. * \return A QgsError with a message if the profile failed to be deleted. */ - QgsError deleteProfile( const QString name ); + QgsError deleteProfile( const QString &name ); /** * The currently active user profile.