mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
fix about box (followup 0b940cac, fixes #14832)
This commit is contained in:
parent
aa66bc6a20
commit
04176350ec
@ -87,7 +87,7 @@ void QgsAbout::init()
|
||||
{
|
||||
line = stream.readLine(); // line of text excluding '\n'
|
||||
//ignore the line if it starts with a hash....
|
||||
if ( line.at( 0 ) == '#' )
|
||||
if ( !line.isEmpty() && line.at( 0 ) == '#' )
|
||||
continue;
|
||||
QStringList myTokens = line.split( '\t', QString::SkipEmptyParts );
|
||||
lines << myTokens[0];
|
||||
@ -119,7 +119,7 @@ void QgsAbout::init()
|
||||
{
|
||||
line = stream.readLine(); // line of text excluding '\n'
|
||||
//ignore the line if it starts with a hash....
|
||||
if ( line.at( 0 ) == '#' )
|
||||
if ( !line.isEmpty() && line.at( 0 ) == '#' )
|
||||
continue;
|
||||
lines += line;
|
||||
}
|
||||
|
@ -1026,7 +1026,7 @@ QString QgsMapLayer::capitaliseLayerName( const QString& name )
|
||||
|
||||
QString layerName( name );
|
||||
|
||||
if ( capitaliseLayerName )
|
||||
if ( capitaliseLayerName && !layerName.isEmpty() )
|
||||
layerName = layerName.at( 0 ).toUpper() + layerName.mid( 1 );
|
||||
|
||||
return layerName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user