Skip to content

Commit

Permalink
FIX : Qt 4.6.x compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
koying committed May 30, 2012
1 parent 15b1d98 commit c737beb
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/Features/Node.h
Expand Up @@ -12,7 +12,7 @@
#include <QtXml>

#ifndef _MOBILE
#if QT_VERSION < 0x040700
#if QT_VERSION < 0x040700 || defined(FORCE_46)
#include <ggl/ggl.hpp>
#include <ggl/geometries/register/point.hpp>
#endif
Expand Down Expand Up @@ -158,7 +158,7 @@ class PhotoNode : public TrackNode
Q_DECLARE_METATYPE( Node * );

#ifndef _MOBILE
#if QT_VERSION < 0x040700
#if QT_VERSION < 0x040700 || defined(FORCE_46)
// Register this point as being a recognizable point by the GGL
//GEOMETRY_REGISTER_POINT_2D_CONST(TrackPoint, qreal, cs::cartesian, projection().x(), projection().y())

Expand All @@ -182,7 +182,7 @@ struct access<NodePtr>
template <std::size_t I>
static inline qreal get(const NodePtr& p)
{
return I == 0 ? p->projection().x() : p->projection().y();
return I == 0 ? p->projected().x() : p->projected().y();
}

// template <std::size_t I>
Expand Down
2 changes: 1 addition & 1 deletion src/Features/Way.cpp
Expand Up @@ -21,7 +21,7 @@
#include <algorithm>
#include <QList>

#if QT_VERSION < 0x040700 && !defined(_MOBILE)
#if (QT_VERSION < 0x040700 || defined(FORCE_46)) && !defined(_MOBILE)
#include <ggl/ggl.hpp>
#include <ggl/geometries/cartesian2d.hpp>
#include <ggl/geometries/adapted/std_as_linestring.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/Features/Way.h
Expand Up @@ -8,7 +8,7 @@
#include "Layer.h"

#ifndef _MOBILE
#if QT_VERSION < 0x040700
#if QT_VERSION < 0x040700 || defined(FORCE_46)
#include <ggl/ggl.hpp>
#endif
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/MainWindow.cpp
Expand Up @@ -76,7 +76,7 @@
#include "TerraceDialog.h"

#include "revision.h"
#if QT_VERSION < 0x040700
#if QT_VERSION < 0x040700 || defined(FORCE_46)
#include <boost/version.hpp>
#endif

Expand Down Expand Up @@ -2102,7 +2102,7 @@ void MainWindow::on_helpAboutAction_triggered()
dlg.setWindowFlags(dlg.windowFlags() | Qt::MSWindowsFixedSizeDialogHint);
About.Version->setText(About.Version->text().arg(STRINGIFY(VERSION)).arg(STRINGIFY(REVISION)).arg(STRINGIFY(SVNREV)));
About.QTVersion->setText(About.QTVersion->text().arg(qVersion()).arg(QT_VERSION_STR));
#if QT_VERSION < 0x040700
#if QT_VERSION < 0x040700 || defined(FORCE_46)
int boostMajVer = BOOST_VERSION / 100000;
int boostMinVer = BOOST_VERSION / 100 % 1000;
About.BoostVersion->setText(About.BoostVersion->text().arg(QString::number(boostMajVer)+"."+QString::number(boostMinVer)));
Expand Down
2 changes: 1 addition & 1 deletion src/PaintStyle/FeaturePainter.cpp
Expand Up @@ -692,7 +692,7 @@ void FeaturePainter::drawLabel(Way* R, QPainter* thePainter, MapRenderer* theRen

QPainterPath tranformedRoadPath = theRenderer->theTransform.map(R->getPath());
QFont font = getLabelFont();
//#if QT_VERSION >= 0x040700
//#if QT_VERSION >= 0x040700 || defined(FORCE_46)
// qreal pathSurface = tranformedRoadPath.controlPointRect().width() * tranformedRoadPath.controlPointRect().height();
// if (pathSurface > theRenderer->theScreen.width() * theRenderer->theScreen.height() * 3) {
// QPainterPath clipPath;
Expand Down
2 changes: 1 addition & 1 deletion src/Preferences/MerkaartorPreferences.cpp
Expand Up @@ -982,7 +982,7 @@ QString MerkaartorPreferences::getOsmWebsite() const
else
s = "www.openstreetmap.org";

#if QT_VERSION >= 0x040600
#if QT_VERSION >= 0x040600 && !defined(FORCE_46)
QUrl u = QUrl::fromUserInput(s);
#else
// convenience for creating a valid URL
Expand Down
4 changes: 2 additions & 2 deletions src/common/Coord.h
Expand Up @@ -64,7 +64,7 @@ uint qHash(const Coord &c);


#ifndef _MOBILE
#if QT_VERSION < 0x040700
#if QT_VERSION < 0x040700 || defined(FORCE_46)
#include <ggl/ggl.hpp>
#include <ggl/geometries/register/point.hpp>

Expand Down Expand Up @@ -206,7 +206,7 @@ class CoordBox : public QRectF
Q_DECLARE_METATYPE( CoordBox );

#ifndef _MOBILE
#if QT_VERSION < 0x040700
#if QT_VERSION < 0x040700 || defined(FORCE_46)
#include <ggl/geometries/register/box.hpp>

GEOMETRY_REGISTER_BOX(CoordBox, Coord, bottomLeft, topRight)
Expand Down
2 changes: 1 addition & 1 deletion src/common/Global.cpp
Expand Up @@ -25,7 +25,7 @@ bool g_Merk_Segment_Mode = false;
bool g_Merk_Ignore_Preferences = false;
bool g_Merk_Reset_Preferences = false;
bool g_Merk_IgnoreStartupTemplate = false;
#if QT_VERSION < 0x040700
#if QT_VERSION < 0x040700 || defined(FORCE_46)
bool g_Merk_SelfClip = true;
#else
bool g_Merk_SelfClip = false;
Expand Down

0 comments on commit c737beb

Please sign in to comment.