Skip to content

Commit 41ceed3

Browse files
committed
[sipify] fix false virtual methods
1 parent 0591225 commit 41ceed3

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

python/core/qgsdataitem.sip

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,7 @@ Check if the given path is hidden from the browser model
509509

510510
public slots:
511511
virtual void childrenCreated();
512-
virtual void directoryChanged();
513-
512+
void directoryChanged();
514513

515514
protected:
516515
void init();

python/core/qgsgeometryvalidator.sip

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ class QgsGeometryValidator : QThread
2424

2525
virtual void run();
2626

27-
virtual void stop();
28-
27+
void stop();
2928

3029
static void validateGeometry( const QgsGeometry *g, QList<QgsGeometry::Error> &errors /Out/, QgsGeometry::ValidationMethod method = QgsGeometry::ValidatorQgisInternal );
3130
%Docstring

python/core/symbology-ng/qgssinglesymbolrenderer.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ class QgsSingleSymbolRenderer : QgsFeatureRenderer
3535

3636
virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props = QgsStringMap() ) const;
3737
static QgsFeatureRenderer *createFromSld( QDomElement &element, QgsWkbTypes::GeometryType geomType );
38+
<<<<<<< Updated upstream
39+
=======
40+
%Docstring
41+
:rtype: QgsFeatureRenderer
42+
%End
43+
>>>>>>> Stashed changes
3844

3945
virtual QgsFeatureRenderer::Capabilities capabilities();
4046
virtual QgsSymbolList symbols( QgsRenderContext &context );

python/gui/qgscollapsiblegroupbox.sip

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,10 @@ Returns the name of the setting group in which the collapsed state will be saved
212212
void init();
213213
virtual void showEvent( QShowEvent *event );
214214

215-
virtual QString saveKey() const;
216-
215+
QString saveKey() const;
216+
%Docstring
217+
:rtype: str
218+
%End
217219

218220

219221
};

scripts/sipify.pl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ sub detect_comment_block{
714714
elsif ( $LINE !~ m/^(\s*)virtual\b(.*)$/ ){
715715
#sip often requires the virtual keyword to be present, or it chokes on covariant return types
716716
#in overridden methods
717+
dbg_info('adding virtual keyword for overriden method');
717718
$LINE =~ s/^(\s*?)\b(.*)$/$1virtual $2\n/;
718719
}
719720
}
@@ -833,6 +834,9 @@ sub detect_comment_block{
833834
$RETURN_TYPE = '';
834835
$IS_OVERRIDE = 0;
835836
}
837+
else {
838+
$IS_OVERRIDE = 0;
839+
}
836840
}
837841
write_header_footer();
838842

0 commit comments

Comments
 (0)