mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Fix some clazy warnings
This commit is contained in:
parent
d5d553f284
commit
20c5e5415d
@ -77,14 +77,14 @@ bool QgsAbstractReportSection::writeXml( QDomElement &parentElement, QDomDocumen
|
||||
QDomElement element = doc.createElement( QStringLiteral( "Section" ) );
|
||||
element.setAttribute( QStringLiteral( "type" ), type() );
|
||||
|
||||
element.setAttribute( QStringLiteral( "headerEnabled" ), mHeaderEnabled ? "1" : "0" );
|
||||
element.setAttribute( QStringLiteral( "headerEnabled" ), mHeaderEnabled ? QStringLiteral( "1" ) : QStringLiteral( "0" ) );
|
||||
if ( mHeader )
|
||||
{
|
||||
QDomElement headerElement = doc.createElement( QStringLiteral( "header" ) );
|
||||
headerElement.appendChild( mHeader->writeXml( doc, context ) );
|
||||
element.appendChild( headerElement );
|
||||
}
|
||||
element.setAttribute( QStringLiteral( "footerEnabled" ), mFooterEnabled ? "1" : "0" );
|
||||
element.setAttribute( QStringLiteral( "footerEnabled" ), mFooterEnabled ? QStringLiteral( "1" ) : QStringLiteral( "0" ) );
|
||||
if ( mFooter )
|
||||
{
|
||||
QDomElement footerElement = doc.createElement( QStringLiteral( "footer" ) );
|
||||
@ -110,8 +110,8 @@ bool QgsAbstractReportSection::readXml( const QDomElement &element, const QDomDo
|
||||
return false;
|
||||
}
|
||||
|
||||
mHeaderEnabled = element.attribute( QStringLiteral( "headerEnabled" ), "0" ).toInt();
|
||||
mFooterEnabled = element.attribute( QStringLiteral( "footerEnabled" ), "0" ).toInt();
|
||||
mHeaderEnabled = element.attribute( QStringLiteral( "headerEnabled" ), QStringLiteral( "0" ) ).toInt();
|
||||
mFooterEnabled = element.attribute( QStringLiteral( "footerEnabled" ), QStringLiteral( "0" ) ).toInt();
|
||||
const QDomElement headerElement = element.firstChildElement( QStringLiteral( "header" ) );
|
||||
if ( !headerElement.isNull() )
|
||||
{
|
||||
|
@ -39,6 +39,7 @@ bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, const QgsRect
|
||||
QStringList fetchAttribNames;
|
||||
QList<int> fetchAttribIdx;
|
||||
fetchAttribIdx.reserve( mFields.size() );
|
||||
fetchAttribNames.reserve( mFields.size() );
|
||||
for ( int idx = 0, n = mFields.size(); idx < n; ++idx )
|
||||
{
|
||||
fetchAttribNames.append( mFields.at( idx ).name() );
|
||||
@ -58,7 +59,7 @@ bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, const QgsRect
|
||||
|
||||
if ( objectIds.empty() )
|
||||
{
|
||||
QgsDebugMsg( "No valid features IDs to fetch" );
|
||||
QgsDebugMsg( QStringLiteral( "No valid features IDs to fetch" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -75,7 +76,7 @@ bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, const QgsRect
|
||||
if ( queryData.isEmpty() )
|
||||
{
|
||||
// const_cast<QgsAfsProvider *>( this )->pushError( errorTitle + ": " + errorMessage );
|
||||
QgsDebugMsg( "Query returned empty result" );
|
||||
QgsDebugMsg( QStringLiteral( "Query returned empty result" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -84,7 +85,7 @@ bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, const QgsRect
|
||||
const QVariantList featuresData = queryData[QStringLiteral( "features" )].toList();
|
||||
if ( featuresData.isEmpty() )
|
||||
{
|
||||
QgsDebugMsgLevel( "Query returned no features", 3 );
|
||||
QgsDebugMsgLevel( QStringLiteral( "Query returned no features" ), 3 );
|
||||
return false;
|
||||
}
|
||||
for ( int i = 0, n = featuresData.size(); i < n; ++i )
|
||||
|
Loading…
x
Reference in New Issue
Block a user