Skip to content

Commit

Permalink
Cleanup some default values from nullptr to empty non-pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed May 27, 2016
1 parent c1750aa commit 88b6736
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/core/layertree/qgslayertreemodel.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsbrowsermodel.cpp
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgscoordinatereferencesystem.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsproviderregistry.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgscptcityarchive.cpp
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/core/symbology-ng/qgssinglesymbolrendererv2.cpp
Expand Up @@ -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 ) );
Expand All @@ -438,7 +438,7 @@ QgsLegendSymbolListV2 QgsSingleSymbolRendererV2::legendSymbolItemsV2() const
}
}

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

Expand Down

0 comments on commit 88b6736

Please sign in to comment.