Skip to content
Permalink
Browse files

Avoid some unnecessary QString construction

  • Loading branch information
nyalldawson committed Sep 9, 2015
1 parent 910cb01 commit dbded4d91d6d023855769b75adcdd8e7b7f8885b
@@ -810,9 +810,9 @@ APP_EXPORT int main( int argc, char *argv[] )
if ( mySettings.contains( "/Themes" ) )
{
QString theme = mySettings.value( "/Themes", "default" ).toString();
if ( theme == QString( "gis" )
|| theme == QString( "classic" )
|| theme == QString( "nkids" ) )
if ( theme == "gis"
|| theme == "classic"
|| theme == "nkids" )
{
mySettings.setValue( "/Themes", QString( "default" ) );
}
@@ -88,8 +88,8 @@ void QgsPluginItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem
}

if ( ! index.data( PLUGIN_ERROR_ROLE ).toString().isEmpty()
|| index.data( PLUGIN_STATUS_ROLE ).toString() == QString( "upgradeable" )
|| index.data( PLUGIN_STATUS_ROLE ).toString() == QString( "new" ) )
|| index.data( PLUGIN_STATUS_ROLE ).toString() == "upgradeable"
|| index.data( PLUGIN_STATUS_ROLE ).toString() == "new" )
{
QFont font = painter->font();
font.setBold( true );
@@ -1680,7 +1680,7 @@ void QgsOptions::on_mOptionsStackedWidget_currentChanged( int theIndx )
{
Q_UNUSED( theIndx );
// load gdal driver list when gdal tab is first opened
if ( mOptionsStackedWidget->currentWidget()->objectName() == QString( "mOptionsPageGDAL" )
if ( mOptionsStackedWidget->currentWidget()->objectName() == "mOptionsPageGDAL"
&& ! mLoadedGdalDriverList )
{
loadGdalDriverList();
@@ -37,9 +37,9 @@ int main( int argc, char ** argv )
QgsApplication a( argc, argv, true );
// update any saved setting for older themes to new default 'gis' theme (2013-04-15)
QString theme = settings.value( "/Themes", "default" ).toString();
if ( theme == QString( "gis" )
|| theme == QString( "classic" )
|| theme == QString( "nkids" ) )
if ( theme == "gis"
|| theme == "classic"
|| theme == "nkids" )
{
theme = QString( "default" );
}

0 comments on commit dbded4d

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