Skip to content

Commit

Permalink
Merge pull request #5799 from nyalldawson/mingw
Browse files Browse the repository at this point in the history
Mingw build fixes and windows build warning fixes
  • Loading branch information
nyalldawson committed Dec 4, 2017
2 parents 32ba5bf + 4689537 commit b26c14e
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion python/core/layout/qgslayoutitemhtml.sip
Expand Up @@ -198,7 +198,7 @@ class QgsLayoutItemHtml: QgsLayoutMultiFrame


virtual QSizeF totalSize() const; virtual QSizeF totalSize() const;


virtual void render( QgsRenderContext &context, const QRectF &renderExtent, const int frameIndex, virtual void render( QgsRenderContext &context, const QRectF &renderExtent, int frameIndex,
const QStyleOptionGraphicsItem *itemStyle = 0 ); const QStyleOptionGraphicsItem *itemStyle = 0 );


virtual double findNearbyPageBreak( double yPos ); virtual double findNearbyPageBreak( double yPos );
Expand Down
2 changes: 1 addition & 1 deletion python/core/layout/qgslayoutmultiframe.sip
Expand Up @@ -111,7 +111,7 @@ class QgsLayoutMultiFrame: QgsLayoutObject, QgsLayoutUndoObjectInterface
:rtype: QSizeF :rtype: QSizeF
%End %End


virtual void render( QgsRenderContext &context, const QRectF &renderExtent, const int frameIndex, virtual void render( QgsRenderContext &context, const QRectF &renderExtent, int frameIndex,
const QStyleOptionGraphicsItem *itemStyle = 0 ) = 0; const QStyleOptionGraphicsItem *itemStyle = 0 ) = 0;
%Docstring %Docstring
Renders a portion of the multiframe's content into a render ``context``. Renders a portion of the multiframe's content into a render ``context``.
Expand Down
8 changes: 0 additions & 8 deletions src/3d/poly2tri/common/utils.h
Expand Up @@ -32,17 +32,9 @@
#ifndef UTILS_H #ifndef UTILS_H
#define UTILS_H #define UTILS_H


// Otherwise #defines like M_PI are undeclared under Visual Studio
#define _USE_MATH_DEFINES

#include <exception> #include <exception>
#include <math.h> #include <math.h>


// C99 removes M_PI from math.h
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif

namespace p2t { namespace p2t {


const double PI_3div4 = 3 * M_PI / 4; const double PI_3div4 = 3 * M_PI / 4;
Expand Down
2 changes: 1 addition & 1 deletion src/app/main.cpp
Expand Up @@ -477,7 +477,7 @@ int main( int argc, char *argv[] )
signal( SIGXFSZ, qgisCrash ); signal( SIGXFSZ, qgisCrash );
#endif #endif


#ifdef Q_OS_WIN #ifdef _MSC_VER
SetUnhandledExceptionFilter( QgsCrashHandler::handle ); SetUnhandledExceptionFilter( QgsCrashHandler::handle );
#endif #endif


Expand Down
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutitemhtml.h
Expand Up @@ -204,7 +204,7 @@ class CORE_EXPORT QgsLayoutItemHtml: public QgsLayoutMultiFrame


QString displayName() const override; QString displayName() const override;
QSizeF totalSize() const override; QSizeF totalSize() const override;
void render( QgsRenderContext &context, const QRectF &renderExtent, const int frameIndex, void render( QgsRenderContext &context, const QRectF &renderExtent, int frameIndex,
const QStyleOptionGraphicsItem *itemStyle = nullptr ) override; const QStyleOptionGraphicsItem *itemStyle = nullptr ) override;


//overridden to break frames without dividing lines of text //overridden to break frames without dividing lines of text
Expand Down
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutmultiframe.h
Expand Up @@ -141,7 +141,7 @@ class CORE_EXPORT QgsLayoutMultiFrame: public QgsLayoutObject, public QgsLayoutU
* \param frameIndex frame number for content * \param frameIndex frame number for content
* \param itemStyle item style options for graphics item rendering * \param itemStyle item style options for graphics item rendering
*/ */
virtual void render( QgsRenderContext &context, const QRectF &renderExtent, const int frameIndex, virtual void render( QgsRenderContext &context, const QRectF &renderExtent, int frameIndex,
const QStyleOptionGraphicsItem *itemStyle = nullptr ) = 0; const QStyleOptionGraphicsItem *itemStyle = nullptr ) = 0;


/** /**
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsapplication.cpp
Expand Up @@ -847,7 +847,7 @@ QString QgsApplication::userFullName()
//fall back to login name //fall back to login name
if ( sUserFullName.isEmpty() ) if ( sUserFullName.isEmpty() )
sUserFullName = userLoginName(); sUserFullName = userLoginName();
#elif defined(Q_OS_ANDROID) #elif defined(Q_OS_ANDROID) || defined(__MINGW32__)
sUserFullName = "Not available"; sUserFullName = "Not available";
#else #else
struct passwd *p = getpwuid( getuid() ); struct passwd *p = getpwuid( getuid() );
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgsfeaturerequest.cpp
Expand Up @@ -387,6 +387,8 @@ bool QgsFeatureRequest::OrderByClause::prepare( QgsExpressionContext *context )
return mExpression.prepare( context ); return mExpression.prepare( context );
} }


QgsFeatureRequest::OrderBy::OrderBy() = default;

QgsFeatureRequest::OrderBy::OrderBy( const QList<QgsFeatureRequest::OrderByClause> &other ) QgsFeatureRequest::OrderBy::OrderBy( const QList<QgsFeatureRequest::OrderByClause> &other )
{ {
Q_FOREACH ( const QgsFeatureRequest::OrderByClause &clause, other ) Q_FOREACH ( const QgsFeatureRequest::OrderByClause &clause, other )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsfeaturerequest.h
Expand Up @@ -225,7 +225,7 @@ class CORE_EXPORT QgsFeatureRequest
/** /**
* Create a new empty order by * Create a new empty order by
*/ */
CORE_EXPORT OrderBy() = default; CORE_EXPORT OrderBy();


/** /**
* Create a new order by from a list of clauses * Create a new order by from a list of clauses
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaplayermodel.cpp
Expand Up @@ -154,7 +154,7 @@ void QgsMapLayerModel::removeLayers( const QStringList &layerIds )


void QgsMapLayerModel::addLayers( const QList<QgsMapLayer *> &layers ) void QgsMapLayerModel::addLayers( const QList<QgsMapLayer *> &layers )
{ {
if ( layers.count( ) ) if ( !layers.empty( ) )
{ {
int offset = 0; int offset = 0;
if ( mAllowEmpty ) if ( mAllowEmpty )
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgslayoutmultiframe.cpp
Expand Up @@ -74,7 +74,7 @@ class TestMultiFrame : public QgsLayoutMultiFrame
return QStringLiteral( "TestMultiFrame" ); return QStringLiteral( "TestMultiFrame" );
} }


void render( QgsRenderContext &, const QRectF &, const int, void render( QgsRenderContext &, const QRectF &, int,
const QStyleOptionGraphicsItem * ) override const QStyleOptionGraphicsItem * ) override
{ {


Expand Down

0 comments on commit b26c14e

Please sign in to comment.