Skip to content
Permalink
Browse files

Avoid heap allocations

  • Loading branch information
nyalldawson committed Oct 23, 2018
1 parent 4fdec37 commit 728b9fcf9b8a07f62e600b4b05f79228ae26e4cb
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/app/qgisappstylesheet.cpp
@@ -68,13 +68,12 @@ QMap<QString, QVariant> QgisAppStyleSheet::defaultOptions()
// make sure family exists on system
if ( fontFamily != mDefaultFont.family() )
{
QFont *tempFont = new QFont( fontFamily );
if ( tempFont->family() != fontFamily )
QFont tempFont( fontFamily );
if ( tempFont.family() != fontFamily )
{
// missing from system, drop back to default
fontFamily = mDefaultFont.family();
}
delete tempFont;
}
QgsDebugMsg( QStringLiteral( "fontFamily: %1" ).arg( fontFamily ) );
opts.insert( QStringLiteral( "fontFamily" ), QVariant( fontFamily ) );

0 comments on commit 728b9fc

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