Skip to content
Permalink
Browse files

Cleanup some default values from nullptr to empty non-pointers

  • Loading branch information
dakcarto committed May 27, 2016
1 parent c1750aa commit 88b673615df5c23213e84a67b4cc53926480b132
@@ -309,7 +309,7 @@ Qt::ItemFlags QgsLayerTreeModel::flags( const QModelIndex& index ) const
{
if ( !index.isValid() )
{
Qt::ItemFlags rootFlags = nullptr;
Qt::ItemFlags rootFlags = Qt::ItemFlags();
if ( testFlag( AllowNodeReorder ) )
rootFlags |= Qt::ItemIsDropEnabled;
return rootFlags;
@@ -181,7 +181,7 @@ void QgsBrowserModel::removeRootItems()
Qt::ItemFlags QgsBrowserModel::flags( const QModelIndex & index ) const
{
if ( !index.isValid() )
return nullptr;
return Qt::ItemFlags();

Qt::ItemFlags flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable;

@@ -1325,7 +1325,7 @@ QString QgsCoordinateReferenceSystem::proj4FromSrsId( const int theSrsId )
if ( !myFileInfo.exists() ) //its unlikely that this condition will ever be reached
{
QgsDebugMsg( "users qgis.db not found" );
return nullptr;
return QString();
}
}
else //must be a system projection then
@@ -80,7 +80,7 @@ class CORE_EXPORT QgsProviderRegistry
int providerCapabilities( const QString& providerKey ) const;

QWidget *selectWidget( const QString & providerKey,
QWidget * parent = nullptr, const Qt::WindowFlags& fl = nullptr );
QWidget * parent = nullptr, const Qt::WindowFlags& fl = Qt::WindowFlags() );

#if QT_VERSION >= 0x050000
/** Get pointer to provider function
@@ -1372,7 +1372,7 @@ void QgsCptCityBrowserModel::removeRootItems()
Qt::ItemFlags QgsCptCityBrowserModel::flags( const QModelIndex & index ) const
{
if ( !index.isValid() )
return nullptr;
return Qt::ItemFlags();

Qt::ItemFlags flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable;

@@ -423,11 +423,11 @@ QgsLegendSymbolListV2 QgsSingleSymbolRendererV2::legendSymbolItemsV2() const
QgsScaleExpression scaleExp( sizeDD.expressionString() );
if ( scaleExp.type() != QgsScaleExpression::Unknown )
{
QgsLegendSymbolItemV2 title( nullptr, scaleExp.baseExpression(), nullptr );
QgsLegendSymbolItemV2 title( nullptr, scaleExp.baseExpression(), QString() );
lst << title;
Q_FOREACH ( double v, QgsSymbolLayerV2Utils::prettyBreaks( scaleExp.minValue(), scaleExp.maxValue(), 4 ) )
{
QgsLegendSymbolItemV2 si( mSymbol.data(), QString::number( v ), nullptr );
QgsLegendSymbolItemV2 si( mSymbol.data(), QString::number( v ), QString() );
QgsMarkerSymbolV2 * s = static_cast<QgsMarkerSymbolV2 *>( si.symbol() );
s->setDataDefinedSize( 0 );
s->setSize( scaleExp.size( v ) );
@@ -438,7 +438,7 @@ QgsLegendSymbolListV2 QgsSingleSymbolRendererV2::legendSymbolItemsV2() const
}
}

lst << QgsLegendSymbolItemV2( mSymbol.data(), QString(), nullptr );
lst << QgsLegendSymbolItemV2( mSymbol.data(), QString(), QString() );
return lst;
}

0 comments on commit 88b6736

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