Skip to content

Commit 3c64bcc

Browse files
committedApr 17, 2023
Fix false positive cppcheck pureVirtualCall warnings when pure
virtual functions are called as slots
1 parent a7f12a5 commit 3c64bcc

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed
 

‎python/gui/auto_generated/processing/models/qgsmodeldesignerdialog.sip.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,14 @@ Raise, unminimize and activate this window.
8484

8585
protected:
8686

87+
8788
virtual void repaintModel( bool showControls = true ) = 0;
8889
virtual void addAlgorithm( const QString &algorithmId, const QPointF &pos ) = 0;
90+
8991
virtual void addInput( const QString &inputId, const QPointF &pos ) = 0;
92+
9093
virtual void exportAsScriptAlgorithm() = 0;
94+
9195
virtual bool saveModel( bool saveAs = false ) = 0;
9296

9397
QToolBar *toolbar();

‎src/core/gps/qgsgpsconnection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class CORE_EXPORT QgsGpsConnection : public QObject
193193

194194
protected slots:
195195
//! Parse available data source content
196-
virtual void parseData() = 0;
196+
virtual void parseData() = 0; // cppcheck-suppress pureVirtualCall
197197

198198
private:
199199

‎src/gui/processing/models/qgsmodeldesignerdialog.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ class GUI_EXPORT QgsModelDesignerDialog : public QMainWindow, public Ui::QgsMode
120120
// cppcheck-suppress pureVirtualCall
121121
virtual void repaintModel( bool showControls = true ) = 0;
122122
virtual void addAlgorithm( const QString &algorithmId, const QPointF &pos ) = 0;
123+
// cppcheck-suppress pureVirtualCall
123124
virtual void addInput( const QString &inputId, const QPointF &pos ) = 0;
125+
// cppcheck-suppress pureVirtualCall
124126
virtual void exportAsScriptAlgorithm() = 0;
125127
// cppcheck-suppress pureVirtualCall
126128
virtual bool saveModel( bool saveAs = false ) = 0;

‎src/gui/processing/qgsprocessingbatchalgorithmdialogbase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class GUI_EXPORT QgsProcessingBatchAlgorithmDialogBase : public QgsProcessingAlg
5454
/**
5555
* Will be called when the "Run as Single" button is clicked.
5656
*/
57-
virtual void runAsSingle() = 0;
57+
virtual void runAsSingle() = 0; // cppcheck-suppress pureVirtualCall
5858

5959
protected slots:
6060

‎src/gui/qgsfilecontentsourcelineedit.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,37 +111,37 @@ class GUI_EXPORT QgsAbstractFileContentSourceLineEdit : public QWidget SIP_ABSTR
111111
/**
112112
* Returns the widget's file filter string.
113113
*/
114-
virtual QString fileFilter() const = 0;
114+
virtual QString fileFilter() const = 0; // cppcheck-suppress pureVirtualCall
115115

116116
/**
117117
* Returns the translated title to use for the select file dialog.
118118
*/
119-
virtual QString selectFileTitle() const = 0;
119+
virtual QString selectFileTitle() const = 0; // cppcheck-suppress pureVirtualCall
120120

121121
/**
122122
* Returns the translated title to use for the file from URL dialog.
123123
*/
124-
virtual QString fileFromUrlTitle() const = 0;
124+
virtual QString fileFromUrlTitle() const = 0; // cppcheck-suppress pureVirtualCall
125125

126126
/**
127127
* Returns the translated descriptive text to use for the file from URL dialog.
128128
*/
129-
virtual QString fileFromUrlText() const = 0;
129+
virtual QString fileFromUrlText() const = 0; // cppcheck-suppress pureVirtualCall
130130

131131
/**
132132
* Returns the translated title to use for the embed file dialog.
133133
*/
134-
virtual QString embedFileTitle() const = 0;
134+
virtual QString embedFileTitle() const = 0; // cppcheck-suppress pureVirtualCall
135135

136136
/**
137137
* Returns the translated title to use for the extract file dialog.
138138
*/
139-
virtual QString extractFileTitle() const = 0;
139+
virtual QString extractFileTitle() const = 0; // cppcheck-suppress pureVirtualCall
140140

141141
/**
142142
* Returns the default settings key to use for the widget's settings.
143143
*/
144-
virtual QString defaultSettingsKey() const = 0;
144+
virtual QString defaultSettingsKey() const = 0; // cppcheck-suppress pureVirtualCall
145145

146146
///@endcond
147147
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.