Skip to content

Commit b26c14e

Browse files
authored
Merge pull request #5799 from nyalldawson/mingw
Mingw build fixes and windows build warning fixes
2 parents 32ba5bf + 4689537 commit b26c14e

11 files changed

Lines changed: 11 additions & 17 deletions

File tree

python/core/layout/qgslayoutitemhtml.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class QgsLayoutItemHtml: QgsLayoutMultiFrame
198198

199199
virtual QSizeF totalSize() const;
200200

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

204204
virtual double findNearbyPageBreak( double yPos );

python/core/layout/qgslayoutmultiframe.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class QgsLayoutMultiFrame: QgsLayoutObject, QgsLayoutUndoObjectInterface
111111
:rtype: QSizeF
112112
%End
113113

114-
virtual void render( QgsRenderContext &context, const QRectF &renderExtent, const int frameIndex,
114+
virtual void render( QgsRenderContext &context, const QRectF &renderExtent, int frameIndex,
115115
const QStyleOptionGraphicsItem *itemStyle = 0 ) = 0;
116116
%Docstring
117117
Renders a portion of the multiframe's content into a render ``context``.

src/3d/poly2tri/common/utils.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,9 @@
3232
#ifndef UTILS_H
3333
#define UTILS_H
3434

35-
// Otherwise #defines like M_PI are undeclared under Visual Studio
36-
#define _USE_MATH_DEFINES
37-
3835
#include <exception>
3936
#include <math.h>
4037

41-
// C99 removes M_PI from math.h
42-
#ifndef M_PI
43-
#define M_PI 3.14159265358979323846264338327
44-
#endif
45-
4638
namespace p2t {
4739

4840
const double PI_3div4 = 3 * M_PI / 4;

src/app/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ int main( int argc, char *argv[] )
477477
signal( SIGXFSZ, qgisCrash );
478478
#endif
479479

480-
#ifdef Q_OS_WIN
480+
#ifdef _MSC_VER
481481
SetUnhandledExceptionFilter( QgsCrashHandler::handle );
482482
#endif
483483

src/core/layout/qgslayoutitemhtml.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class CORE_EXPORT QgsLayoutItemHtml: public QgsLayoutMultiFrame
204204

205205
QString displayName() const override;
206206
QSizeF totalSize() const override;
207-
void render( QgsRenderContext &context, const QRectF &renderExtent, const int frameIndex,
207+
void render( QgsRenderContext &context, const QRectF &renderExtent, int frameIndex,
208208
const QStyleOptionGraphicsItem *itemStyle = nullptr ) override;
209209

210210
//overridden to break frames without dividing lines of text

src/core/layout/qgslayoutmultiframe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class CORE_EXPORT QgsLayoutMultiFrame: public QgsLayoutObject, public QgsLayoutU
141141
* \param frameIndex frame number for content
142142
* \param itemStyle item style options for graphics item rendering
143143
*/
144-
virtual void render( QgsRenderContext &context, const QRectF &renderExtent, const int frameIndex,
144+
virtual void render( QgsRenderContext &context, const QRectF &renderExtent, int frameIndex,
145145
const QStyleOptionGraphicsItem *itemStyle = nullptr ) = 0;
146146

147147
/**

src/core/qgsapplication.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ QString QgsApplication::userFullName()
847847
//fall back to login name
848848
if ( sUserFullName.isEmpty() )
849849
sUserFullName = userLoginName();
850-
#elif defined(Q_OS_ANDROID)
850+
#elif defined(Q_OS_ANDROID) || defined(__MINGW32__)
851851
sUserFullName = "Not available";
852852
#else
853853
struct passwd *p = getpwuid( getuid() );

src/core/qgsfeaturerequest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ bool QgsFeatureRequest::OrderByClause::prepare( QgsExpressionContext *context )
387387
return mExpression.prepare( context );
388388
}
389389

390+
QgsFeatureRequest::OrderBy::OrderBy() = default;
391+
390392
QgsFeatureRequest::OrderBy::OrderBy( const QList<QgsFeatureRequest::OrderByClause> &other )
391393
{
392394
Q_FOREACH ( const QgsFeatureRequest::OrderByClause &clause, other )

src/core/qgsfeaturerequest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class CORE_EXPORT QgsFeatureRequest
225225
/**
226226
* Create a new empty order by
227227
*/
228-
CORE_EXPORT OrderBy() = default;
228+
CORE_EXPORT OrderBy();
229229

230230
/**
231231
* Create a new order by from a list of clauses

src/core/qgsmaplayermodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ void QgsMapLayerModel::removeLayers( const QStringList &layerIds )
154154

155155
void QgsMapLayerModel::addLayers( const QList<QgsMapLayer *> &layers )
156156
{
157-
if ( layers.count( ) )
157+
if ( !layers.empty( ) )
158158
{
159159
int offset = 0;
160160
if ( mAllowEmpty )

0 commit comments

Comments
 (0)