mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Avoid heap allocations
This commit is contained in:
parent
4fdec37c17
commit
728b9fcf9b
@ -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 ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user