Skip to content

Commit

Permalink
Fix Qt5 build
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 19, 2015
1 parent 1fe34b3 commit f631ff8
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/core/qgscolorscheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <QString>
#include <QColor>
#include <QPair>
#include <QObject>

/** List of colors paired with a friendly display name identifying the color
* \note Added in version 2.5
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgsfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ email : sherman at mrcc.com

#include "qgsmessagelog.h"

#include <QDataStream>

QgsFeature::QgsFeature( QgsFeatureId id )
{
d = new QgsFeaturePrivate( id );
Expand Down
1 change: 1 addition & 0 deletions src/core/qgsfield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "qgsfield_p.h"

#include <QSettings>
#include <QDataStream>
#include <QtCore/qmath.h>


Expand Down
14 changes: 13 additions & 1 deletion src/core/qgslabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,10 @@ const unsigned char* QgsLabel::labelPoint( labelpoint& point, const unsigned cha
QGis::WkbType wkbType;
#ifndef QT_NO_DEBUG
const unsigned char *geomend = geom + geomlen;
Q_ASSERT( geom + 1 + sizeof( wkbType ) <= geomend );
#else
Q_UNUSED( geomlen );
#endif
Q_ASSERT( geom + 1 + sizeof( wkbType ) <= geomend );

geom++; // skip endianness
memcpy( &wkbType, geom, sizeof( wkbType ) );
Expand All @@ -592,7 +592,9 @@ const unsigned char* QgsLabel::labelPoint( labelpoint& point, const unsigned cha
case QGis::WKBPoint25D:
case QGis::WKBPoint:
{
#ifndef QT_NO_DEBUG
Q_ASSERT( geom + 2*sizeof( double ) <= geomend );
#endif
double *pts = ( double * )geom;
point.p.set( pts[0], pts[1] );
point.angle = 0.0;
Expand All @@ -605,11 +607,15 @@ const unsigned char* QgsLabel::labelPoint( labelpoint& point, const unsigned cha
//intentional fall-through
case QGis::WKBLineString: // Line center
{
#ifndef QT_NO_DEBUG
Q_ASSERT( geom + sizeof( int ) <= geomend );
#endif
int nPoints = *( unsigned int * )geom;
geom += sizeof( int );

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

// get line center
double *pts = ( double * )geom;
Expand Down Expand Up @@ -652,17 +658,23 @@ const unsigned char* QgsLabel::labelPoint( labelpoint& point, const unsigned cha
//intentional fall-through
case QGis::WKBPolygon: // centroid of outer ring
{
#ifndef QT_NO_DEBUG
Q_ASSERT( geom + sizeof( int ) <= geomend );
#endif
int nRings = *( unsigned int * )geom;
geom += sizeof( int );

for ( int i = 0; i < nRings; ++i )
{
#ifndef QT_NO_DEBUG
Q_ASSERT( geom + sizeof( int ) <= geomend );
#endif
int nPoints = *( unsigned int * )geom;
geom += sizeof( int );

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

if ( i == 0 )
{
Expand Down
1 change: 1 addition & 0 deletions src/core/qgsmaplayerstylemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class QgsMapLayer;
#include <QByteArray>
#include <QMap>
#include <QStringList>
#include <QObject>

class QDomElement;

Expand Down
1 change: 1 addition & 0 deletions src/core/symbology-ng/qgssvgcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <QMutex>
#include <QString>
#include <QUrl>
#include <QObject>

class QDomElement;
class QImage;
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgisgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <Qt>
#include <QPair>
#include <QWidget>
#include <QStringList>

class QFont;
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/gps_importer/qgsgpsplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "qgsgpsdevice.h"
#include "qgisplugin.h"

#include <QObject>

class QgisInterface;
class QgsVectorLayer;
class QAction;
Expand Down
1 change: 1 addition & 0 deletions src/providers/delimitedtext/qgsdelimitedtextfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <QStringList>
#include <QRegExp>
#include <QUrl>
#include <QObject>

class QgsFeature;
class QgsField;
Expand Down

0 comments on commit f631ff8

Please sign in to comment.