Skip to content
Permalink
Browse files

Fix assert crash for non-English UI locale (fixes #20834)

  • Loading branch information
nirvn committed Jan 4, 2019
1 parent b7a607c commit 899dcbfff32a053650eecdc57b3a549ce9217410
Showing with 26 additions and 26 deletions.
  1. +26 −26 src/app/qgisapp.cpp
@@ -10451,15 +10451,15 @@ QMap< QString, QString > QgisApp::projectPropertiesPagesMap()
static std::once_flag initialized;
std::call_once( initialized, []
{
sProjectPropertiesPagesMap.insert( tr( "General" ), QStringLiteral( "mProjOptsGeneral" ) );
sProjectPropertiesPagesMap.insert( tr( "Metadata" ), QStringLiteral( "mMetadataPage" ) );
sProjectPropertiesPagesMap.insert( tr( "CRS" ), QStringLiteral( "mProjOptsCRS" ) );
sProjectPropertiesPagesMap.insert( tr( "Default Styles" ), QStringLiteral( "mProjOptsSymbols" ) );
sProjectPropertiesPagesMap.insert( tr( "Data Sources" ), QStringLiteral( "mTab_DataSources" ) );
sProjectPropertiesPagesMap.insert( tr( "Relations" ), QStringLiteral( "mTabRelations" ) );
sProjectPropertiesPagesMap.insert( tr( "Variables" ), QStringLiteral( "mTab_Variables" ) );
sProjectPropertiesPagesMap.insert( tr( "Macros" ), QStringLiteral( "mProjOptsMacros" ) );
sProjectPropertiesPagesMap.insert( tr( "QGIS Server" ), QStringLiteral( "mProjOptsOWS" ) );
sProjectPropertiesPagesMap.insert( QCoreApplication::translate( "QgsProjectPropertiesBase", "General" ), QStringLiteral( "mProjOptsGeneral" ) );
sProjectPropertiesPagesMap.insert( QCoreApplication::translate( "QgsProjectPropertiesBase", "Metadata" ), QStringLiteral( "mMetadataPage" ) );
sProjectPropertiesPagesMap.insert( QCoreApplication::translate( "QgsProjectPropertiesBase", "CRS" ), QStringLiteral( "mProjOptsCRS" ) );
sProjectPropertiesPagesMap.insert( QCoreApplication::translate( "QgsProjectPropertiesBase", "Default Styles" ), QStringLiteral( "mProjOptsSymbols" ) );
sProjectPropertiesPagesMap.insert( QCoreApplication::translate( "QgsProjectPropertiesBase", "Data Sources" ), QStringLiteral( "mTab_DataSources" ) );
sProjectPropertiesPagesMap.insert( QCoreApplication::translate( "QgsProjectPropertiesBase", "Relations" ), QStringLiteral( "mTabRelations" ) );
sProjectPropertiesPagesMap.insert( QCoreApplication::translate( "QgsProjectPropertiesBase", "Variables" ), QStringLiteral( "mTab_Variables" ) );
sProjectPropertiesPagesMap.insert( QCoreApplication::translate( "QgsProjectPropertiesBase", "Macros" ), QStringLiteral( "mProjOptsMacros" ) );
sProjectPropertiesPagesMap.insert( QCoreApplication::translate( "QgsProjectPropertiesBase", "QGIS Server" ), QStringLiteral( "mProjOptsOWS" ) );
} );

return sProjectPropertiesPagesMap;
@@ -10511,24 +10511,24 @@ QMap< QString, int > QgisApp::optionsPagesMap()
static std::once_flag initialized;
std::call_once( initialized, []
{
sOptionsPagesMap.insert( tr( "General" ), 0 );
sOptionsPagesMap.insert( tr( "System" ), 1 );
sOptionsPagesMap.insert( tr( "CRS" ), 2 );
sOptionsPagesMap.insert( tr( "Data Sources" ), 3 );
sOptionsPagesMap.insert( tr( "Rendering" ), 4 );
sOptionsPagesMap.insert( tr( "Canvas & Legend" ), 5 );
sOptionsPagesMap.insert( tr( "Map Tools" ), 6 );
sOptionsPagesMap.insert( tr( "Colors" ), 7 );
sOptionsPagesMap.insert( tr( "Digitizing" ), 8 );
sOptionsPagesMap.insert( tr( "Layouts" ), 9 );
sOptionsPagesMap.insert( tr( "GDAL" ), 10 );
sOptionsPagesMap.insert( tr( "Variables" ), 11 );
sOptionsPagesMap.insert( tr( "Authentication" ), 12 );
sOptionsPagesMap.insert( tr( "Network" ), 13 );
sOptionsPagesMap.insert( tr( "Locator" ), 14 );
sOptionsPagesMap.insert( tr( "Advanced" ), 15 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "General" ), 0 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "System" ), 1 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "CRS" ), 2 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Data Sources" ), 3 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Rendering" ), 4 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Canvas & Legend" ), 5 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Map Tools" ), 6 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Colors" ), 7 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Digitizing" ), 8 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Layouts" ), 9 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "GDAL" ), 10 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Variables" ), 11 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Authentication" ), 12 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Network" ), 13 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Locator" ), 14 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Advanced" ), 15 );
#ifdef HAVE_OPENCL
sOptionsPagesMap.insert( tr( "Acceleration" ), 16 );
sOptionsPagesMap.insert( QCoreApplication::translate( "QgsOptionsBase", "Acceleration" ), 16 );
#endif
} );

0 comments on commit 899dcbf

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