From 3e1f0ce1704774f11b20278f6593784301a2f2dc Mon Sep 17 00:00:00 2001 From: "Rifa'i M. Hanif" Date: Tue, 27 Nov 2018 17:33:03 +0700 Subject: [PATCH] set user profile menu object name --- src/app/qgisapp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index d3ac7a17c9..98d1c25434 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -2544,6 +2544,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 ) @@ -2562,18 +2563,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 ); -- 2.13.3.windows.1