[sipify] fix do not print comment after SIP directive

This commit is contained in:
Denis Rouzaud 2017-05-01 16:08:35 +02:00
parent 1f8c311158
commit 634c7aa3f4
3 changed files with 23 additions and 1 deletions

View File

@ -659,7 +659,11 @@ while ($line_idx < $line_count){
$is_override = 0; $is_override = 0;
next; next;
} }
elsif ( $line =~ m/\/\// || $line =~ m/\s*typedef / || $line =~ m/\s*struct / || $line =~ m/operator\[\]\(/ ){ elsif ( $line =~ m/\/\// ||
$line =~ m/\s*typedef / ||
$line =~ m/\s*struct / ||
$line =~ m/operator\[\]\(/ ||
$line =~ m/^\s*% \w+(.*)?$/ ){
dbg_info('skipping comment'); dbg_info('skipping comment');
$comment = ''; $comment = '';
$return_type = ''; $return_type = '';

View File

@ -9,6 +9,14 @@
% ModuleHeaderCode
#include <qgsnetworkspeedstrategy.h>
#include <qgsnetworkdistancestrategy.h>
%End

View File

@ -16,9 +16,17 @@ email : denis.rouzaud@gmail.com
#ifndef SIPIFYHEADER_H #ifndef SIPIFYHEADER_H
#define SIPIFYHEADER_H #define SIPIFYHEADER_H
#include "qgis_core.h" #include "qgis_core.h"
#include <QtClass> #include <QtClass>
#ifdef SIP_RUN
% ModuleHeaderCode
#include <qgsnetworkspeedstrategy.h>
#include <qgsnetworkdistancestrategy.h>
% End
#endif
#include "sipifyheader.h" #include "sipifyheader.h"
// one shall include qgis.h to use SIP annotations // one shall include qgis.h to use SIP annotations
@ -27,6 +35,8 @@ email : denis.rouzaud@gmail.com
class QgsForwardDeclaration; class QgsForwardDeclaration;
/*************************************************************************** /***************************************************************************
* This is some random block comment that will not be displayed. * This is some random block comment that will not be displayed.
* Block comments shall will placed upon class, method, enum without * Block comments shall will placed upon class, method, enum without