@@ -832,7 +832,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
832
832
sInstance = this;
833
833
QgsRuntimeProfiler *profiler = QgsApplication::profiler();
834
834
835
- startProfile( QStringLiteral ( "User profile manager" ) );
835
+ startProfile( tr ( "User profile manager" ) );
836
836
mUserProfileManager = new QgsUserProfileManager( QString(), this );
837
837
mUserProfileManager->setRootLocation( rootProfileLocation );
838
838
mUserProfileManager->setActiveUserProfile( activeProfile );
@@ -841,14 +841,13 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
841
841
endProfile();
842
842
843
843
// start the network logger early, we want all requests logged!
844
- startProfile( QStringLiteral ( "Network logger" ) );
844
+ startProfile( tr ( "Network logger" ) );
845
845
mNetworkLogger = new QgsNetworkLogger( QgsNetworkAccessManager::instance(), this );
846
846
endProfile();
847
847
848
848
// load GUI: actions, menus, toolbars
849
- profiler->beginGroup( QStringLiteral( "qgisapp" ) );
850
- profiler->beginGroup( QStringLiteral( "startup" ) );
851
- startProfile( QStringLiteral( "Setting up UI" ) );
849
+ profiler->start( tr( "Application startup" ) );
850
+ startProfile( tr( "Setting up UI" ) );
852
851
setupUi( this );
853
852
// because mActionToggleMapOnly can hide the menu (thereby disabling menu actions),
854
853
// we attach the following actions to the MainWindow too (to be able to come back)
@@ -861,7 +860,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
861
860
862
861
//////////
863
862
864
- startProfile( QStringLiteral ( "Checking database" ) );
863
+ startProfile( tr ( "Checking database" ) );
865
864
mSplash->showMessage( tr( "Checking database" ), Qt::AlignHCenter | Qt::AlignBottom );
866
865
qApp->processEvents();
867
866
// Do this early on before anyone else opens it and prevents us copying it
@@ -873,7 +872,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
873
872
endProfile();
874
873
875
874
// Create the themes folder for the user
876
- startProfile( QStringLiteral ( "Creating theme folder" ) );
875
+ startProfile( tr ( "Creating theme folder" ) );
877
876
QgsApplication::createThemeFolder();
878
877
endProfile();
879
878
@@ -893,7 +892,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
893
892
QgsSettings settings;
894
893
895
894
896
- startProfile( QStringLiteral ( "Building style sheet" ) );
895
+ startProfile( tr ( "Building style sheet" ) );
897
896
// set up stylesheet builder and apply saved or default style options
898
897
mStyleSheetBuilder = new QgisAppStyleSheet( this );
899
898
connect( mStyleSheetBuilder, &QgisAppStyleSheet::appStyleSheetChanged,
@@ -906,7 +905,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
906
905
centralLayout->setContentsMargins( 0, 0, 0, 0 );
907
906
908
907
// "theMapCanvas" used to find this canonical instance later
909
- startProfile( QStringLiteral ( "Creating map canvas" ) );
908
+ startProfile( tr ( "Creating map canvas" ) );
910
909
mMapCanvas = new QgsMapCanvas( centralWidget );
911
910
mMapCanvas->setObjectName( QStringLiteral( "theMapCanvas" ) );
912
911
@@ -933,13 +932,13 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
933
932
mProjOpen = settings.value( QStringLiteral( "qgis/projOpenAtLaunch" ), 0 ).toInt();
934
933
935
934
// a bar to warn the user with non-blocking messages
936
- startProfile( QStringLiteral ( "Message bar" ) );
935
+ startProfile( tr ( "Message bar" ) );
937
936
mInfoBar = new QgsMessageBar( centralWidget );
938
937
mInfoBar->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
939
938
centralLayout->addWidget( mInfoBar, 0, 0, 1, 1 );
940
939
endProfile();
941
940
942
- startProfile( QStringLiteral ( "Welcome page" ) );
941
+ startProfile( tr ( "Welcome page" ) );
943
942
mWelcomePage = new QgsWelcomePage( skipVersionCheck );
944
943
connect( mWelcomePage, &QgsWelcomePage::projectRemoved, this, [ this ]( int row )
945
944
{
@@ -972,7 +971,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
972
971
973
972
mCentralContainer->setCurrentIndex( mProjOpen ? 0 : 1 );
974
973
975
- startProfile( QStringLiteral ( "User input dock" ) );
974
+ startProfile( tr ( "User input dock" ) );
976
975
// User Input Dock Widget
977
976
mUserInputDockWidget = new QgsUserInputWidget( mMapCanvas );
978
977
mUserInputDockWidget->setObjectName( QStringLiteral( "UserInputDockWidget" ) );
@@ -985,13 +984,13 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
985
984
//set the focus to the map canvas
986
985
mMapCanvas->setFocus();
987
986
988
- startProfile( QStringLiteral ( "Layer tree" ) );
987
+ startProfile( tr ( "Layer tree" ) );
989
988
mLayerTreeView = new QgsLayerTreeView( this );
990
989
mLayerTreeView->setObjectName( QStringLiteral( "theLayerTreeView" ) ); // "theLayerTreeView" used to find this canonical instance later
991
990
endProfile();
992
991
993
992
// create undo widget
994
- startProfile( QStringLiteral ( "Undo dock" ) );
993
+ startProfile( tr ( "Undo dock" ) );
995
994
mUndoDock = new QgsDockWidget( tr( "Undo/Redo" ), this );
996
995
QShortcut *showUndoDock = new QShortcut( QKeySequence( tr( "Ctrl+5" ) ), this );
997
996
connect( showUndoDock, &QShortcut::activated, mUndoDock, &QgsDockWidget::toggleUserVisible );
@@ -1005,7 +1004,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1005
1004
endProfile();
1006
1005
1007
1006
// Advanced Digitizing dock
1008
- startProfile( QStringLiteral ( "Advanced digitize panel" ) );
1007
+ startProfile( tr ( "Advanced digitize panel" ) );
1009
1008
mAdvancedDigitizingDockWidget = new QgsAdvancedDigitizingDockWidget( mMapCanvas, this );
1010
1009
mAdvancedDigitizingDockWidget->setWindowTitle( tr( "Advanced Digitizing" ) );
1011
1010
mAdvancedDigitizingDockWidget->setObjectName( QStringLiteral( "AdvancedDigitizingTools" ) );
@@ -1018,7 +1017,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1018
1017
endProfile();
1019
1018
1020
1019
// Statistical Summary dock
1021
- startProfile( QStringLiteral ( "Stats dock" ) );
1020
+ startProfile( tr ( "Statistics dock" ) );
1022
1021
mStatisticalSummaryDockWidget = new QgsStatisticalSummaryDockWidget( this );
1023
1022
mStatisticalSummaryDockWidget->setObjectName( QStringLiteral( "StatisticalSummaryDockWidget" ) );
1024
1023
@@ -1030,7 +1029,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1030
1029
endProfile();
1031
1030
1032
1031
// Bookmarks dock
1033
- startProfile( QStringLiteral ( "Bookmarks widget" ) );
1032
+ startProfile( tr ( "Bookmarks widget" ) );
1034
1033
mBookMarksDockWidget = new QgsBookmarks( this );
1035
1034
mBookMarksDockWidget->setObjectName( QStringLiteral( "BookmarksDockWidget" ) );
1036
1035
@@ -1044,7 +1043,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1044
1043
1045
1044
endProfile();
1046
1045
1047
- startProfile( QStringLiteral ( "Snapping utils " ) );
1046
+ startProfile( tr ( "Snapping utilities " ) );
1048
1047
mSnappingUtils = new QgsMapCanvasSnappingUtils( mMapCanvas, this );
1049
1048
mMapCanvas->setSnappingUtils( mSnappingUtils );
1050
1049
connect( QgsProject::instance(), &QgsProject::snappingConfigChanged, mSnappingUtils, &QgsSnappingUtils::setConfig );
@@ -1062,7 +1061,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1062
1061
1063
1062
applyDefaultSettingsToCanvas( mMapCanvas );
1064
1063
1065
- functionProfile( &QgisApp::initLayerTreeView, this, QStringLiteral( "Init Layer tree view" ) );
1064
+ functionProfile( &QgisApp::initLayerTreeView, this, QStringLiteral( "Initialize layer tree view" ) );
1066
1065
functionProfile( &QgisApp::createOverview, this, QStringLiteral( "Create overview" ) );
1067
1066
functionProfile( &QgisApp::createMapTips, this, QStringLiteral( "Create map tips" ) );
1068
1067
functionProfile( &QgisApp::createDecorations, this, QStringLiteral( "Create decorations" ) );
@@ -1073,7 +1072,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1073
1072
functionProfile( &QgisApp::initNativeProcessing, this, QStringLiteral( "Initialize native processing" ) );
1074
1073
functionProfile( &QgisApp::initLayouts, this, QStringLiteral( "Initialize layouts support" ) );
1075
1074
1076
- startProfile( QStringLiteral ( "Geometry validation" ) );
1075
+ startProfile( tr ( "Geometry validation" ) );
1077
1076
1078
1077
mGeometryValidationService = qgis::make_unique<QgsGeometryValidationService>( QgsProject::instance() );
1079
1078
mGeometryValidationService->setMessageBar( mInfoBar );
@@ -1109,14 +1108,14 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1109
1108
}
1110
1109
1111
1110
// initialize the plugin manager
1112
- startProfile( QStringLiteral ( "Plugin manager" ) );
1111
+ startProfile( tr ( "Plugin manager" ) );
1113
1112
mPluginManager = new QgsPluginManager( this, restorePlugins );
1114
1113
endProfile();
1115
1114
1116
1115
addDockWidget( Qt::LeftDockWidgetArea, mUndoDock );
1117
1116
mUndoDock->hide();
1118
1117
1119
- startProfile( QStringLiteral ( "Layer Style dock" ) );
1118
+ startProfile( tr ( "Layer style dock" ) );
1120
1119
mMapStylingDock = new QgsDockWidget( this );
1121
1120
mMapStylingDock->setWindowTitle( tr( "Layer Styling" ) );
1122
1121
mMapStylingDock->setObjectName( QStringLiteral( "LayerStyling" ) );
@@ -1134,7 +1133,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1134
1133
mMapStylingDock->hide();
1135
1134
endProfile();
1136
1135
1137
- startProfile( QStringLiteral ( "Dev Tools dock" ) );
1136
+ startProfile( tr ( "Developer tools dock" ) );
1138
1137
mDevToolsDock = new QgsDockWidget( this );
1139
1138
mDevToolsDock->setWindowTitle( tr( "Debugging/Development Tools" ) );
1140
1139
mDevToolsDock->setObjectName( QStringLiteral( "DevTools" ) );
@@ -1151,7 +1150,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1151
1150
mDevToolsDock->hide();
1152
1151
endProfile();
1153
1152
1154
- startProfile( QStringLiteral ( "Snapping dialog" ) );
1153
+ startProfile( tr ( "Snapping dialog" ) );
1155
1154
mSnappingDialog = new QgsSnappingWidget( QgsProject::instance(), mMapCanvas, this );
1156
1155
connect( mSnappingDialog, &QgsSnappingWidget::snappingConfigChanged, QgsProject::instance(), [ = ] { QgsProject::instance()->setSnappingConfig( mSnappingDialog->config() ); } );
1157
1156
QString mainSnappingWidgetMode = QgsSettings().value( QStringLiteral( "/qgis/mainSnappingWidgetMode" ), "dialog" ).toString();
@@ -1381,7 +1380,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1381
1380
#ifdef WITH_BINDINGS
1382
1381
if ( mPythonUtils && mPythonUtils->isEnabled() )
1383
1382
{
1384
- startProfile( QStringLiteral ( "initPluginInstaller " ) );
1383
+ startProfile( tr ( "Plugin installer " ) );
1385
1384
// initialize the plugin installer to start fetching repositories in background
1386
1385
QgsPythonRunner::run( QStringLiteral( "import pyplugin_installer" ) );
1387
1386
QgsPythonRunner::run( QStringLiteral( "pyplugin_installer.initPluginInstaller()" ) );
@@ -1399,7 +1398,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1399
1398
}
1400
1399
1401
1400
// Update recent project list (as possible custom project storages are now registered by plugins)
1402
- startProfile( QStringLiteral ( "Update recent project paths" ) );
1401
+ startProfile( tr ( "Update recent project paths" ) );
1403
1402
updateRecentProjectPaths();
1404
1403
mWelcomePage->setRecentProjects( mRecentProjects );
1405
1404
endProfile();
@@ -1452,17 +1451,17 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1452
1451
//
1453
1452
mSplash->showMessage( tr( "Restoring window state" ), Qt::AlignHCenter | Qt::AlignBottom );
1454
1453
qApp->processEvents();
1455
- startProfile( QStringLiteral ( "Restore window state" ) );
1454
+ startProfile( tr ( "Restore window state" ) );
1456
1455
restoreWindowState();
1457
1456
endProfile();
1458
1457
1459
1458
// do main window customization - after window state has been restored, before the window is shown
1460
- startProfile( QStringLiteral ( "Update customization on main window" ) );
1459
+ startProfile( tr ( "Update customization on main window" ) );
1461
1460
QgsCustomization::instance()->updateMainWindow( mToolbarMenu );
1462
1461
endProfile();
1463
1462
1464
1463
mSplash->showMessage( tr( "Populate saved styles" ), Qt::AlignHCenter | Qt::AlignBottom );
1465
- startProfile( QStringLiteral ( "Populate saved styles" ) );
1464
+ startProfile( tr ( "Populate saved styles" ) );
1466
1465
QgsStyle::defaultStyle();
1467
1466
endProfile();
1468
1467
@@ -1486,7 +1485,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1486
1485
1487
1486
mFullScreenMode = false;
1488
1487
mPrevScreenModeMaximized = false;
1489
- startProfile( QStringLiteral ( "Show main window" ) );
1488
+ startProfile( tr ( "Show main window" ) );
1490
1489
show();
1491
1490
qApp->processEvents();
1492
1491
endProfile();
@@ -1617,7 +1616,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
1617
1616
// notify user if authentication system is disabled
1618
1617
( void )QgsAuthGuiUtils::isDisabled( messageBar() );
1619
1618
1620
- startProfile( QStringLiteral ( "New project" ) );
1619
+ startProfile( tr ( "New project" ) );
1621
1620
fileNewBlank(); // prepare empty project, also skips any default templates from loading
1622
1621
updateCrsStatusBar();
1623
1622
endProfile();
0 commit comments