Skip to content
Permalink
Browse files

set user profile menu object name

  • Loading branch information
hanreev authored and nyalldawson committed Nov 27, 2018
1 parent 42e30b6 commit a6d23449bc27c24cb0e956cd665a09b4059326ed
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/app/qgisapp.cpp
@@ -2571,6 +2571,7 @@ void QgisApp::refreshProfileMenu()
QAction *action = new QAction( namedProfile->icon(), namedProfile->alias(), profileGroup );
action->setToolTip( namedProfile->folder() );
action->setCheckable( true );
action->setObjectName( "mActionProfile_" + namedProfile->alias() );
mConfigMenu->addAction( action );

if ( name == activeName )
@@ -2589,18 +2590,21 @@ void QgisApp::refreshProfileMenu()
mConfigMenu->addSeparator( );

QAction *openProfileFolderAction = mConfigMenu->addAction( tr( "Open Active Profile Folder" ) );
openProfileFolderAction->setObjectName( "mActionOpenActiveProfileFolder" );
connect( openProfileFolderAction, &QAction::triggered, this, [this]()
{
QDesktopServices::openUrl( QUrl::fromLocalFile( userProfileManager()->userProfile()->folder() ) );
} );

QAction *newProfileAction = mConfigMenu->addAction( tr( "New Profile…" ) );
newProfileAction->setObjectName( "mActionNewProfile" );
connect( newProfileAction, &QAction::triggered, this, &QgisApp::newProfile );
}

void QgisApp::createProfileMenu()
{
mConfigMenu = new QMenu();
mConfigMenu->setObjectName( "mUserProfileMenu" );

settingsMenu()->insertMenu( settingsMenu()->actions().first(), mConfigMenu );

0 comments on commit a6d2344

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