Spelling and docs

This commit is contained in:
Alessandro Pasotti 2018-02-15 09:25:26 +01:00
parent 2ded9c2ece
commit 79a924ef5c
4 changed files with 17 additions and 8 deletions

View File

@ -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.

View File

@ -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;
@ -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 );
@ -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 );

View File

@ -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() );

View File

@ -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( );
/**