Navigation Menu

Skip to content

Commit

Permalink
Spelling and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Feb 15, 2018
1 parent 2ded9c2 commit 79a924e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
7 changes: 7 additions & 0 deletions python/core/qgsapplication.sip.in
Expand Up @@ -143,6 +143,13 @@ for resources in their own datastores e.g. a Qt4 resource bundle.
be reverted to 'default'.
%End

static QString resolvePkgPath( );
%Docstring
Calculate the application pkg path

:return: the resolved pkg path
%End

static QString themeName();
%Docstring
Set the active theme to the specified theme.
Expand Down
11 changes: 4 additions & 7 deletions src/app/main.cpp
Expand Up @@ -812,7 +812,6 @@ int main( int argc, char *argv[] )
if ( globalsettingsfile.isEmpty() )
{
QString default_globalsettingsfile = QgsApplication::resolvePkgPath() + "/resources/qgis_global_settings.ini";
QgsDebugMsg( "GLOABL SETTINGS FILE:" + default_globalsettingsfile );
if ( QFile::exists( default_globalsettingsfile ) )
{
globalsettingsfile = default_globalsettingsfile;
Expand Down Expand Up @@ -853,8 +852,6 @@ int main( int argc, char *argv[] )
}
delete globalSettings;

QgsDebugMsg( "CONFIG LOCAL STORAGE:" + configLocalStorageLocation );

QString rootProfileFolder = QgsUserProfileManager::resolveProfilesFolder( configLocalStorageLocation );
QgsUserProfileManager manager( rootProfileFolder );
QgsUserProfile *profile = manager.getProfile( profileName, true );
Expand All @@ -867,10 +864,10 @@ int main( int argc, char *argv[] )
// Should be cleaned up in future to make this cleaner.
QgsSettings settings;

QgsDebugMsg( "User profile details:" );
QgsDebugMsg( QString( "\t - %1" ).arg( profileName ) );
QgsDebugMsg( QString( "\t - %1" ).arg( profileFolder ) );
QgsDebugMsg( QString( "\t - %1" ).arg( rootProfileFolder ) );
QgsDebugMsgLevel( QStringLiteral( "User profile details:" ), 2 );
QgsDebugMsgLevel( QStringLiteral( "\t - %1" ).arg( profileName ), 2 );
QgsDebugMsgLevel( QStringLiteral( "\t - %1" ).arg( profileFolder ), 2 );
QgsDebugMsgLevel( QStringLiteral( "\t - %1" ).arg( rootProfileFolder ), 2 );

myApp.init( profileFolder );

Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsapplication.cpp
Expand Up @@ -594,7 +594,8 @@ QString QgsApplication::resolvePkgPath()
#endif
QFile f;
// "/../../.." is for Mac bundled app in build directory
Q_FOREACH ( const QString &path, QStringList() << "" << "/.." << "/bin" << "/../../.." )
const QStringList pathPrefixes = QStringList() << "" << "/.." << "/bin" << "/../../..";
for ( const QString &path : pathPrefixes )
{
f.setFileName( prefixPath + path + "/qgisbuildpath.txt" );
QgsDebugMsg( f.fileName() );
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgsapplication.h
Expand Up @@ -184,6 +184,10 @@ class CORE_EXPORT QgsApplication : public QApplication
*/
static void setThemeName( const QString &themeName );

/**
* Calculate the application pkg path
* \return the resolved pkg path
*/
static QString resolvePkgPath( );

/**
Expand Down

0 comments on commit 79a924e

Please sign in to comment.