Skip to content

Commit 4d9f3ff

Browse files
committed
Fix inadequate usage of nullptr
1 parent 578962f commit 4d9f3ff

File tree

89 files changed

+104
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+104
-104
lines changed

src/app/composer/qgsattributeselectiondialog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ class QgsAttributeSelectionDialog: public QDialog, private Ui::QgsAttributeSelec
114114
{
115115
Q_OBJECT
116116
public:
117-
QgsAttributeSelectionDialog( QgsComposerAttributeTableV2* table, QgsVectorLayer* vLayer, QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
117+
QgsAttributeSelectionDialog( QgsComposerAttributeTableV2* table, QgsVectorLayer* vLayer, QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
118118

119119
//todo - remove for QGIS 3.0
120-
QgsAttributeSelectionDialog( QgsComposerAttributeTable* table, QgsVectorLayer* vLayer, QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
120+
QgsAttributeSelectionDialog( QgsComposerAttributeTable* table, QgsVectorLayer* vLayer, QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
121121

122122

123123
~QgsAttributeSelectionDialog();

src/app/composer/qgscomposerimageexportoptionsdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class QgsComposerImageExportOptionsDialog: public QDialog, private Ui::QgsCompos
3535
* @param parent parent widget
3636
* @param flags window flags
3737
*/
38-
QgsComposerImageExportOptionsDialog( QWidget* parent = nullptr, Qt::WindowFlags flags = nullptr );
38+
QgsComposerImageExportOptionsDialog( QWidget* parent = nullptr, Qt::WindowFlags flags = 0 );
3939

4040
~QgsComposerImageExportOptionsDialog();
4141

src/app/composer/qgscomposermanager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class QgsComposerManager: public QDialog, private Ui::QgsComposerManagerBase
4949
{
5050
Q_OBJECT
5151
public:
52-
QgsComposerManager( QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
52+
QgsComposerManager( QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
5353
~QgsComposerManager();
5454

5555
void addTemplates( const QMap<QString, QString>& templates );

src/app/composer/qgscomposertablebackgroundcolorsdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class QgsComposerTableBackgroundColorsDialog: public QDialog, private Ui::QgsCom
3838
* @param parent parent widget
3939
* @param flags window flags
4040
*/
41-
QgsComposerTableBackgroundColorsDialog( QgsComposerTableV2* table, QWidget* parent = nullptr, Qt::WindowFlags flags = nullptr );
41+
QgsComposerTableBackgroundColorsDialog( QgsComposerTableV2* table, QWidget* parent = nullptr, Qt::WindowFlags flags = 0 );
4242

4343
~QgsComposerTableBackgroundColorsDialog();
4444

src/app/gps/qgsgpsinformationwidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class QgsGPSInformationWidget: public QWidget, private Ui::QgsGPSInformationWidg
4444
{
4545
Q_OBJECT
4646
public:
47-
QgsGPSInformationWidget( QgsMapCanvas * thepCanvas, QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
47+
QgsGPSInformationWidget( QgsMapCanvas * thepCanvas, QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
4848
~QgsGPSInformationWidget();
4949

5050
private slots:

src/app/ogr/qgsopenvectorlayerdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class QgsOpenVectorLayerDialog : public QDialog, private Ui::QgsOpenVectorLayerD
3232
Q_OBJECT
3333

3434
public:
35-
QgsOpenVectorLayerDialog( QWidget* parent = nullptr, Qt::WindowFlags fl = nullptr );
35+
QgsOpenVectorLayerDialog( QWidget* parent = nullptr, Qt::WindowFlags fl = 0 );
3636
~QgsOpenVectorLayerDialog();
3737
//! Opens a dialog to select a file datasource*/
3838
QStringList openFile();

src/app/ogr/qgsvectorlayersaveasdialog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class APP_EXPORT QgsVectorLayerSaveAsDialog : public QDialog, private Ui::QgsVec
4141
AllOptions = ~0
4242
};
4343

44-
QgsVectorLayerSaveAsDialog( long srsid, QWidget* parent = nullptr, Qt::WindowFlags fl = nullptr );
45-
QgsVectorLayerSaveAsDialog( QgsVectorLayer *layer, int options = AllOptions, QWidget* parent = nullptr, Qt::WindowFlags fl = nullptr );
44+
QgsVectorLayerSaveAsDialog( long srsid, QWidget* parent = nullptr, Qt::WindowFlags fl = 0 );
45+
QgsVectorLayerSaveAsDialog( QgsVectorLayer *layer, int options = AllOptions, QWidget* parent = nullptr, Qt::WindowFlags fl = 0 );
4646
~QgsVectorLayerSaveAsDialog();
4747

4848
QString format() const;

src/app/qgisapp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
10941094
} // QgisApp ctor
10951095

10961096
QgisApp::QgisApp()
1097-
: QMainWindow( nullptr, nullptr )
1097+
: QMainWindow( nullptr, 0 )
10981098
, mProfiler( nullptr )
10991099
, mStyleSheetBuilder( nullptr )
11001100
, mActionPluginSeparator1( nullptr )
@@ -5955,7 +5955,7 @@ void QgisApp::saveAsRasterFile()
59555955
fileWriter.setMaxTileHeight( d.maximumTileSizeY() );
59565956
}
59575957

5958-
QProgressDialog pd( nullptr, tr( "Abort..." ), 0, 0 );
5958+
QProgressDialog pd( QString(), tr( "Abort..." ), 0, 0 );
59595959
// Show the dialo immediately because cloning pipe can take some time (WCS)
59605960
pd.setLabelText( tr( "Reading raster" ) );
59615961
pd.setWindowTitle( tr( "Saving raster" ) );

src/app/qgsannotationwidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class APP_EXPORT QgsAnnotationWidget: public QWidget, private Ui::QgsAnnotationW
2929
{
3030
Q_OBJECT
3131
public:
32-
QgsAnnotationWidget( QgsAnnotationItem* item, QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
32+
QgsAnnotationWidget( QgsAnnotationItem* item, QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
3333
~QgsAnnotationWidget();
3434

3535
void apply();

src/app/qgsattributetabledialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ void QgsAttributeTableDialog::replaceSearchWidget( QWidget* oldw, QWidget* neww
510510
{
511511
mFilterLayout->removeWidget( oldw );
512512
oldw->setVisible( false );
513-
mFilterLayout->addWidget( neww, 0, 0, nullptr );
513+
mFilterLayout->addWidget( neww, 0, 0, 0 );
514514
neww->setVisible( true );
515515
}
516516

src/app/qgsattributetabledialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class QgsAttributeTableDock : public QgsDockWidget
230230
Q_OBJECT
231231

232232
public:
233-
QgsAttributeTableDock( const QString & title, QWidget * parent = nullptr, Qt::WindowFlags flags = nullptr );
233+
QgsAttributeTableDock( const QString & title, QWidget * parent = nullptr, Qt::WindowFlags flags = 0 );
234234

235235
virtual void closeEvent( QCloseEvent * ev ) override;
236236
};

src/app/qgscustomprojectiondialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class APP_EXPORT QgsCustomProjectionDialog : public QDialog, private Ui::QgsCust
3333
{
3434
Q_OBJECT
3535
public:
36-
QgsCustomProjectionDialog( QWidget *parent = nullptr, Qt::WindowFlags fl = nullptr );
36+
QgsCustomProjectionDialog( QWidget *parent = nullptr, Qt::WindowFlags fl = 0 );
3737
~QgsCustomProjectionDialog();
3838

3939
public slots:

src/app/qgsdisplayangle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class APP_EXPORT QgsDisplayAngle: public QDialog, private Ui::QgsDisplayAngleBas
2626
Q_OBJECT
2727

2828
public:
29-
QgsDisplayAngle( QgsMapToolMeasureAngle * tool = nullptr, Qt::WindowFlags f = nullptr );
29+
QgsDisplayAngle( QgsMapToolMeasureAngle * tool = nullptr, Qt::WindowFlags f = 0 );
3030
~QgsDisplayAngle();
3131
/** Sets the measured angle value (in radians). The value is going to
3232
be converted to degrees / gon automatically if necessary*/

src/app/qgsdxfexportdialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,8 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
427427
mTreeView->setEditTriggers( QAbstractItemView::AllEditTriggers );
428428
mTreeView->setItemDelegate( mFieldSelectorDelegate );
429429

430-
QgsLayerTreeModel *model = new QgsVectorLayerAndAttributeModel( mLayerTreeGroup, this );
431-
model->setFlags( nullptr );
430+
QgsLayerTreeModel* model = new QgsVectorLayerAndAttributeModel( mLayerTreeGroup, this );
431+
model->setFlags( 0 );
432432
mTreeView->setModel( model );
433433
mTreeView->resizeColumnToContents( 0 );
434434
mTreeView->header()->show();

src/app/qgsdxfexportdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class QgsDxfExportDialog : public QDialog, private Ui::QgsDxfExportDialogBase
7777
{
7878
Q_OBJECT
7979
public:
80-
QgsDxfExportDialog( QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
80+
QgsDxfExportDialog( QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
8181
~QgsDxfExportDialog();
8282

8383
QList< QPair<QgsVectorLayer *, int> > layers() const;

src/app/qgsformannotationdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class APP_EXPORT QgsFormAnnotationDialog: public QDialog, private Ui::QgsFormAnn
2424
{
2525
Q_OBJECT
2626
public:
27-
QgsFormAnnotationDialog( QgsFormAnnotationItem* item, QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
27+
QgsFormAnnotationDialog( QgsFormAnnotationItem* item, QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
2828
~QgsFormAnnotationDialog();
2929

3030
private:

src/app/qgshtmlannotationdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class APP_EXPORT QgsHtmlAnnotationDialog: public QDialog, private Ui::QgsFormAnn
2424
{
2525
Q_OBJECT
2626
public:
27-
QgsHtmlAnnotationDialog( QgsHtmlAnnotationItem* item, QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
27+
QgsHtmlAnnotationDialog( QgsHtmlAnnotationItem* item, QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
2828
~QgsHtmlAnnotationDialog();
2929

3030
private:

src/app/qgsidentifyresultsdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class APP_EXPORT QgsIdentifyResultsDialog: public QDialog, private Ui::QgsIdenti
117117

118118
//! Constructor - takes it own copy of the QgsAttributeAction so
119119
// that it is independent of whoever created it.
120-
QgsIdentifyResultsDialog( QgsMapCanvas *canvas, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr );
120+
QgsIdentifyResultsDialog( QgsMapCanvas *canvas, QWidget *parent = nullptr, Qt::WindowFlags f = 0 );
121121

122122
~QgsIdentifyResultsDialog();
123123

src/app/qgsjoindialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class APP_EXPORT QgsJoinDialog: public QDialog, private Ui::QgsJoinDialogBase
2727
{
2828
Q_OBJECT
2929
public:
30-
QgsJoinDialog( QgsVectorLayer* layer, QList<QgsMapLayer*> alreadyJoinedLayers, QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
30+
QgsJoinDialog( QgsVectorLayer* layer, QList<QgsMapLayer*> alreadyJoinedLayers, QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
3131
~QgsJoinDialog();
3232

3333
/** Configure the dialog for an existing join */

src/app/qgslabelpropertydialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class APP_EXPORT QgsLabelPropertyDialog: public QDialog, private Ui::QgsLabelPro
2929
{
3030
Q_OBJECT
3131
public:
32-
QgsLabelPropertyDialog( const QString& layerId, const QString& providerId, int featureId, const QFont& labelFont, const QString& labelText, QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
32+
QgsLabelPropertyDialog( const QString& layerId, const QString& providerId, int featureId, const QFont& labelFont, const QString& labelText, QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
3333
~QgsLabelPropertyDialog();
3434

3535
/** Returns properties changed by the user*/

src/app/qgsmeasuredialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class APP_EXPORT QgsMeasureDialog : public QDialog, private Ui::QgsMeasureBase
3333
public:
3434

3535
//! Constructor
36-
QgsMeasureDialog( QgsMeasureTool* tool, Qt::WindowFlags f = nullptr );
36+
QgsMeasureDialog( QgsMeasureTool* tool, Qt::WindowFlags f = 0 );
3737

3838
//! Save position
3939
void saveWindowLocation();

src/app/qgsmergeattributesdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class APP_EXPORT QgsMergeAttributesDialog: public QDialog, private Ui::QgsMergeA
4242
};
4343

4444

45-
QgsMergeAttributesDialog( const QgsFeatureList& features, QgsVectorLayer* vl, QgsMapCanvas* canvas, QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
45+
QgsMergeAttributesDialog( const QgsFeatureList& features, QgsVectorLayer* vl, QgsMapCanvas* canvas, QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
4646
~QgsMergeAttributesDialog();
4747

4848
QgsAttributes mergedAttributes() const;

src/app/qgsoptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ void QgsOptions::editGdalDriver( const QString& driverName )
15711571
if ( driverName.isEmpty() )
15721572
return;
15731573

1574-
QgsDialog dlg( this, nullptr, QDialogButtonBox::Ok | QDialogButtonBox::Cancel );
1574+
QgsDialog dlg( this, 0, QDialogButtonBox::Ok | QDialogButtonBox::Cancel );
15751575
QVBoxLayout *layout = dlg.layout();
15761576
QString title = tr( "Create Options - %1 Driver" ).arg( driverName );
15771577
if ( driverName == "_pyramids" )

src/app/qgsprojectlayergroupdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class APP_EXPORT QgsProjectLayerGroupDialog: public QDialog, private Ui::QgsProj
2828
Q_OBJECT
2929
public:
3030
/** Constructor. If a project file is given, the groups/layers are displayed directly and the file selection hidden*/
31-
QgsProjectLayerGroupDialog( QWidget * parent = nullptr, const QString& projectFile = QString(), Qt::WindowFlags f = nullptr );
31+
QgsProjectLayerGroupDialog( QWidget * parent = nullptr, const QString& projectFile = QString(), Qt::WindowFlags f = 0 );
3232
~QgsProjectLayerGroupDialog();
3333

3434
QStringList selectedGroups() const;

src/app/qgsrastercalcdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class APP_EXPORT QgsRasterCalcDialog: public QDialog, private Ui::QgsRasterCalcD
2626
{
2727
Q_OBJECT
2828
public:
29-
QgsRasterCalcDialog( QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
29+
QgsRasterCalcDialog( QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
3030
~QgsRasterCalcDialog();
3131

3232
QString formulaString() const;

src/app/qgsselectbyformdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class APP_EXPORT QgsSelectByFormDialog : public QDialog
4343
*/
4444
QgsSelectByFormDialog( QgsVectorLayer* layer,
4545
const QgsAttributeEditorContext& context = QgsAttributeEditorContext(),
46-
QWidget* parent = nullptr, Qt::WindowFlags fl = nullptr );
46+
QWidget* parent = nullptr, Qt::WindowFlags fl = 0 );
4747

4848
~QgsSelectByFormDialog();
4949

src/app/qgssnappingdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class QgsSnappingDock : public QgsDockWidget
107107
Q_OBJECT
108108

109109
public:
110-
QgsSnappingDock( const QString & title, QWidget * parent = nullptr, Qt::WindowFlags flags = nullptr );
110+
QgsSnappingDock( const QString & title, QWidget * parent = nullptr, Qt::WindowFlags flags = 0 );
111111

112112
virtual void closeEvent( QCloseEvent *e ) override;
113113

src/app/qgsstatisticalsummarydockwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ void QgsStatisticalSummaryDockWidget::updateNumericStatistics( bool selectedOnly
183183
}
184184

185185
QList< QgsStatisticalSummary::Statistic > statsToDisplay;
186-
QgsStatisticalSummary::Statistics statsToCalc = nullptr;
186+
QgsStatisticalSummary::Statistics statsToCalc = 0;
187187
Q_FOREACH ( QgsStatisticalSummary::Statistic stat, mDisplayStats )
188188
{
189189
if ( mStatsActions.value( stat )->isChecked() )

src/app/qgssvgannotationdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class APP_EXPORT QgsSvgAnnotationDialog: public QDialog, private Ui::QgsFormAnno
2727
{
2828
Q_OBJECT
2929
public:
30-
QgsSvgAnnotationDialog( QgsSvgAnnotationItem* item, QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
30+
QgsSvgAnnotationDialog( QgsSvgAnnotationItem* item, QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
3131
~QgsSvgAnnotationDialog();
3232

3333
private slots:

src/app/qgstextannotationdialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class APP_EXPORT QgsTextAnnotationDialog: public QDialog, private Ui::QgsTextAnn
2727
{
2828
Q_OBJECT
2929
public:
30-
QgsTextAnnotationDialog( QgsTextAnnotationItem* item, QWidget * parent = nullptr, Qt::WindowFlags f = nullptr );
30+
QgsTextAnnotationDialog( QgsTextAnnotationItem* item, QWidget * parent = nullptr, Qt::WindowFlags f = 0 );
3131
~QgsTextAnnotationDialog();
3232

3333
private:

src/browser/qgsbrowser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class QgsBrowser : public QMainWindow, private Ui::QgsBrowserBase
3030
{
3131
Q_OBJECT
3232
public:
33-
QgsBrowser( QWidget *parent = nullptr, const Qt::WindowFlags& flags = nullptr );
33+
QgsBrowser( QWidget *parent = nullptr, const Qt::WindowFlags& flags = 0 );
3434
~QgsBrowser();
3535

3636
// Expand to given path

src/core/qgis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ typedef unsigned long long qgssize;
528528
#endif
529529

530530
#if defined(__clang__)
531-
#define FALLTHROUGH [[clang::fallthrough]]
531+
#define FALLTHROUGH //[[clang::fallthrough]]
532532
#else
533533
#define FALLTHROUGH
534534
#endif

src/core/qgsdiagramrendererv2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ QList< QgsLayerTreeModelLegendNode* > QgsLinearlyInterpolatedDiagramRenderer::le
738738
Q_FOREACH ( double v, QgsSymbolLayerV2Utils::prettyBreaks( mInterpolationSettings.lowerValue, mInterpolationSettings.upperValue, 4 ) )
739739
{
740740
double size = mDiagram->legendSize( v, mSettings, mInterpolationSettings );
741-
QgsLegendSymbolItemV2 si( mSizeLegendSymbol.data(), QString::number( v ), nullptr );
741+
QgsLegendSymbolItemV2 si( mSizeLegendSymbol.data(), QString::number( v ), QString() );
742742
QgsMarkerSymbolV2 * s = static_cast<QgsMarkerSymbolV2 *>( si.symbol() );
743743
s->setSize( size );
744744
s->setSizeUnit( mSettings.sizeType );

src/core/qgslabelingenginev2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ void QgsLabelingEngineV2::readSettingsFromProject()
350350
mCandLine = prj->readNumEntry( "PAL", "/CandidatesLine", 8, &saved );
351351
mCandPolygon = prj->readNumEntry( "PAL", "/CandidatesPolygon", 8, &saved );
352352

353-
mFlags = nullptr;
353+
mFlags = 0;
354354
if ( prj->readBoolEntry( "PAL", "/ShowingCandidates", false, &saved ) ) mFlags |= DrawCandidates;
355355
if ( prj->readBoolEntry( "PAL", "/DrawRectOnly", false, &saved ) ) mFlags |= DrawLabelRectOnly;
356356
if ( prj->readBoolEntry( "PAL", "/ShowingShadowRects", false, &saved ) ) mFlags |= DrawShadowRects;

src/core/qgspaintenginehack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// Hack to workaround Qt #5114 by disabling PatternTransform
2121
void QgsPaintEngineHack::fixFlags()
2222
{
23-
gccaps = nullptr;
23+
gccaps = 0;
2424
gccaps |= ( QPaintEngine::PrimitiveTransform
2525
// | QPaintEngine::PatternTransform
2626
| QPaintEngine::PixmapTransform

src/core/qgsvectorlayer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ QString QgsVectorLayer::storageType() const
199199
{
200200
return mDataProvider->storageType();
201201
}
202-
return nullptr;
202+
return QString();
203203
}
204204

205205

@@ -209,7 +209,7 @@ QString QgsVectorLayer::capabilitiesString() const
209209
{
210210
return mDataProvider->capabilitiesString();
211211
}
212-
return nullptr;
212+
return QString();
213213
}
214214

215215
QString QgsVectorLayer::dataComment() const
@@ -992,7 +992,7 @@ QString QgsVectorLayer::subsetString() const
992992
if ( !mValid || !mDataProvider )
993993
{
994994
QgsDebugMsg( "invoked with invalid layer or null mDataProvider" );
995-
return nullptr;
995+
return QString();
996996
}
997997
return mDataProvider->subsetString();
998998
}

src/gui/editorwidgets/qgsphotowidgetfactory.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ QgsEditorWidgetConfig QgsPhotoWidgetFactory::readConfig( const QDomElement& conf
4141

4242
QgsEditorWidgetConfig cfg;
4343

44-
cfg.insert( "Height", configElement.attribute( "Height", nullptr ).toInt() );
45-
cfg.insert( "Width", configElement.attribute( "Width", nullptr ).toInt() );
44+
cfg.insert( "Height", configElement.attribute( "Height", 0 ).toInt() );
45+
cfg.insert( "Width", configElement.attribute( "Width", 0 ).toInt() );
4646

4747
return cfg;
4848
}

src/gui/editorwidgets/qgswebviewwidgetfactory.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ QgsEditorWidgetConfig QgsWebViewWidgetFactory::readConfig( const QDomElement& co
4141

4242
QgsEditorWidgetConfig cfg;
4343

44-
cfg.insert( "Height", configElement.attribute( "Height", nullptr ).toInt() );
45-
cfg.insert( "Width", configElement.attribute( "Width", nullptr ).toInt() );
44+
cfg.insert( "Height", configElement.attribute( "Height", 0 ).toInt() );
45+
cfg.insert( "Width", configElement.attribute( "Width", 0 ).toInt() );
4646

4747
return cfg;
4848
}

src/gui/effects/qgseffectstackpropertieswidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class GUI_EXPORT QgsEffectStackPropertiesDialog: public QgsDialog
155155
* @param parent parent widget
156156
* @param f window flags
157157
*/
158-
QgsEffectStackPropertiesDialog( QgsEffectStack* stack, QWidget* parent = nullptr, const Qt::WindowFlags& f = nullptr );
158+
QgsEffectStackPropertiesDialog( QgsEffectStack* stack, QWidget* parent = nullptr, const Qt::WindowFlags& f = 0 );
159159
~QgsEffectStackPropertiesDialog();
160160

161161
/** Returns effect stack attached to the dialog

src/gui/layertree/qgslayertreemapcanvasbridge.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void QgsLayerTreeMapCanvasBridge::readProject( const QDomDocument& doc )
223223
itemElem = itemElem.nextSiblingElement( "item" );
224224
}
225225

226-
setHasCustomLayerOrder( customOrderElem.attribute( "enabled", nullptr ).toInt() );
226+
setHasCustomLayerOrder( customOrderElem.attribute( "enabled", QString() ).toInt() );
227227
setCustomLayerOrder( order );
228228
}
229229
}

0 commit comments

Comments
 (0)