Skip to content

Commit f631ff8

Browse files
committed
Fix Qt5 build
1 parent 1fe34b3 commit f631ff8

File tree

9 files changed

+23
-1
lines changed

9 files changed

+23
-1
lines changed

src/core/qgscolorscheme.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <QString>
2222
#include <QColor>
2323
#include <QPair>
24+
#include <QObject>
2425

2526
/** List of colors paired with a friendly display name identifying the color
2627
* \note Added in version 2.5

src/core/qgsfeature.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ email : sherman at mrcc.com
2121

2222
#include "qgsmessagelog.h"
2323

24+
#include <QDataStream>
25+
2426
QgsFeature::QgsFeature( QgsFeatureId id )
2527
{
2628
d = new QgsFeaturePrivate( id );

src/core/qgsfield.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "qgsfield_p.h"
1919

2020
#include <QSettings>
21+
#include <QDataStream>
2122
#include <QtCore/qmath.h>
2223

2324

src/core/qgslabel.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,10 +576,10 @@ const unsigned char* QgsLabel::labelPoint( labelpoint& point, const unsigned cha
576576
QGis::WkbType wkbType;
577577
#ifndef QT_NO_DEBUG
578578
const unsigned char *geomend = geom + geomlen;
579+
Q_ASSERT( geom + 1 + sizeof( wkbType ) <= geomend );
579580
#else
580581
Q_UNUSED( geomlen );
581582
#endif
582-
Q_ASSERT( geom + 1 + sizeof( wkbType ) <= geomend );
583583

584584
geom++; // skip endianness
585585
memcpy( &wkbType, geom, sizeof( wkbType ) );
@@ -592,7 +592,9 @@ const unsigned char* QgsLabel::labelPoint( labelpoint& point, const unsigned cha
592592
case QGis::WKBPoint25D:
593593
case QGis::WKBPoint:
594594
{
595+
#ifndef QT_NO_DEBUG
595596
Q_ASSERT( geom + 2*sizeof( double ) <= geomend );
597+
#endif
596598
double *pts = ( double * )geom;
597599
point.p.set( pts[0], pts[1] );
598600
point.angle = 0.0;
@@ -605,11 +607,15 @@ const unsigned char* QgsLabel::labelPoint( labelpoint& point, const unsigned cha
605607
//intentional fall-through
606608
case QGis::WKBLineString: // Line center
607609
{
610+
#ifndef QT_NO_DEBUG
608611
Q_ASSERT( geom + sizeof( int ) <= geomend );
612+
#endif
609613
int nPoints = *( unsigned int * )geom;
610614
geom += sizeof( int );
611615

616+
#ifndef QT_NO_DEBUG
612617
Q_ASSERT( geom + nPoints*sizeof( double )*dims <= geomend );
618+
#endif
613619

614620
// get line center
615621
double *pts = ( double * )geom;
@@ -652,17 +658,23 @@ const unsigned char* QgsLabel::labelPoint( labelpoint& point, const unsigned cha
652658
//intentional fall-through
653659
case QGis::WKBPolygon: // centroid of outer ring
654660
{
661+
#ifndef QT_NO_DEBUG
655662
Q_ASSERT( geom + sizeof( int ) <= geomend );
663+
#endif
656664
int nRings = *( unsigned int * )geom;
657665
geom += sizeof( int );
658666

659667
for ( int i = 0; i < nRings; ++i )
660668
{
669+
#ifndef QT_NO_DEBUG
661670
Q_ASSERT( geom + sizeof( int ) <= geomend );
671+
#endif
662672
int nPoints = *( unsigned int * )geom;
663673
geom += sizeof( int );
664674

675+
#ifndef QT_NO_DEBUG
665676
Q_ASSERT( geom + nPoints*sizeof( double )*dims <= geomend );
677+
#endif
666678

667679
if ( i == 0 )
668680
{

src/core/qgsmaplayerstylemanager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class QgsMapLayer;
2222
#include <QByteArray>
2323
#include <QMap>
2424
#include <QStringList>
25+
#include <QObject>
2526

2627
class QDomElement;
2728

src/core/symbology-ng/qgssvgcache.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <QMutex>
2525
#include <QString>
2626
#include <QUrl>
27+
#include <QObject>
2728

2829
class QDomElement;
2930
class QImage;

src/gui/qgisgui.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#include <Qt>
1919
#include <QPair>
20+
#include <QWidget>
2021
#include <QStringList>
2122

2223
class QFont;

src/plugins/gps_importer/qgsgpsplugin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include "qgsgpsdevice.h"
2323
#include "qgisplugin.h"
2424

25+
#include <QObject>
26+
2527
class QgisInterface;
2628
class QgsVectorLayer;
2729
class QAction;

src/providers/delimitedtext/qgsdelimitedtextfile.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <QStringList>
2222
#include <QRegExp>
2323
#include <QUrl>
24+
#include <QObject>
2425

2526
class QgsFeature;
2627
class QgsField;

0 commit comments

Comments
 (0)