Commit 9b657f8e authored by LM's avatar LM

Adjusted a large number of files to work with VS2008 compiler

parent 99d25403
...@@ -344,6 +344,7 @@ qint64 SerialLink::getNominalDataRate() ...@@ -344,6 +344,7 @@ qint64 SerialLink::getNominalDataRate()
{ {
qint64 dataRate = 0; qint64 dataRate = 0;
switch (portSettings.baudRate()) { switch (portSettings.baudRate()) {
#ifndef Q_OS_WIN
case QPortSettings::BAUDR_50: case QPortSettings::BAUDR_50:
dataRate = 50; dataRate = 50;
break; break;
...@@ -362,6 +363,7 @@ qint64 SerialLink::getNominalDataRate() ...@@ -362,6 +363,7 @@ qint64 SerialLink::getNominalDataRate()
case QPortSettings::BAUDR_200: case QPortSettings::BAUDR_200:
dataRate = 200; dataRate = 200;
break; break;
#endif
case QPortSettings::BAUDR_300: case QPortSettings::BAUDR_300:
dataRate = 300; dataRate = 300;
break; break;
...@@ -371,9 +373,11 @@ qint64 SerialLink::getNominalDataRate() ...@@ -371,9 +373,11 @@ qint64 SerialLink::getNominalDataRate()
case QPortSettings::BAUDR_1200: case QPortSettings::BAUDR_1200:
dataRate = 1200; dataRate = 1200;
break; break;
#ifndef Q_OS_WIN
case QPortSettings::BAUDR_1800: case QPortSettings::BAUDR_1800:
dataRate = 1800; dataRate = 1800;
break; break;
#endif
case QPortSettings::BAUDR_2400: case QPortSettings::BAUDR_2400:
dataRate = 2400; dataRate = 2400;
break; break;
...@@ -402,7 +406,7 @@ qint64 SerialLink::getNominalDataRate() ...@@ -402,7 +406,7 @@ qint64 SerialLink::getNominalDataRate()
case QPortSettings::BAUDR_57600: case QPortSettings::BAUDR_57600:
dataRate = 57600; dataRate = 57600;
break; break;
#ifdef Q_OS_WIN #ifdef Q_OS_WIN_XXXX // FIXME
case QPortSettings::BAUDR_76800: case QPortSettings::BAUDR_76800:
dataRate = 76800; dataRate = 76800;
break; break;
...@@ -598,7 +602,13 @@ bool SerialLink::setBaudRateType(int rateIndex) ...@@ -598,7 +602,13 @@ bool SerialLink::setBaudRateType(int rateIndex)
if(isConnected()) reconnect = true; if(isConnected()) reconnect = true;
disconnect(); disconnect();
if (rateIndex >= (int)QPortSettings::BAUDR_50 && rateIndex <= (int)QPortSettings::BAUDR_921600) #ifdef Q_OS_WIN
const int minBaud = (int)QPortSettings::BAUDR_14400;
#else
const int minBaud = (int)QPortSettings::BAUDR_50;
#endif
if (rateIndex >= minBaud && rateIndex <= (int)QPortSettings::BAUDR_921600)
{ {
portSettings.setBaudRate((QPortSettings::BaudRate)rateIndex); portSettings.setBaudRate((QPortSettings::BaudRate)rateIndex);
} }
...@@ -627,6 +637,8 @@ bool SerialLink::setBaudRate(int rate) ...@@ -627,6 +637,8 @@ bool SerialLink::setBaudRate(int rate)
disconnect(); disconnect();
switch (rate) { switch (rate) {
#ifndef Q_OS_WIN
case 50: case 50:
portSettings.setBaudRate(QPortSettings::BAUDR_50); portSettings.setBaudRate(QPortSettings::BAUDR_50);
break; break;
...@@ -645,6 +657,7 @@ bool SerialLink::setBaudRate(int rate) ...@@ -645,6 +657,7 @@ bool SerialLink::setBaudRate(int rate)
case 200: case 200:
portSettings.setBaudRate(QPortSettings::BAUDR_200); portSettings.setBaudRate(QPortSettings::BAUDR_200);
break; break;
#endif
case 300: case 300:
portSettings.setBaudRate(QPortSettings::BAUDR_300); portSettings.setBaudRate(QPortSettings::BAUDR_300);
break; break;
...@@ -654,9 +667,11 @@ bool SerialLink::setBaudRate(int rate) ...@@ -654,9 +667,11 @@ bool SerialLink::setBaudRate(int rate)
case 1200: case 1200:
portSettings.setBaudRate(QPortSettings::BAUDR_1200); portSettings.setBaudRate(QPortSettings::BAUDR_1200);
break; break;
#ifndef Q_OS_WIN
case 1800: case 1800:
portSettings.setBaudRate(QPortSettings::BAUDR_1800); portSettings.setBaudRate(QPortSettings::BAUDR_1800);
break; break;
#endif
case 2400: case 2400:
portSettings.setBaudRate(QPortSettings::BAUDR_2400); portSettings.setBaudRate(QPortSettings::BAUDR_2400);
break; break;
...@@ -685,7 +700,7 @@ bool SerialLink::setBaudRate(int rate) ...@@ -685,7 +700,7 @@ bool SerialLink::setBaudRate(int rate)
case 57600: case 57600:
portSettings.setBaudRate(QPortSettings::BAUDR_57600); portSettings.setBaudRate(QPortSettings::BAUDR_57600);
break; break;
#ifdef Q_OS_WIN #ifdef Q_OS_WIN_XXXX // FIXME CHECK THIS
case 76800: case 76800:
portSettings.setBaudRate(QPortSettings::BAUDR_76800); portSettings.setBaudRate(QPortSettings::BAUDR_76800);
break; break;
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
namespace core { namespace core {
Point::Point(int dw) Point::Point(int dw)
{ {
this->x=(short)Point::LOWORD(dw); this->x=(short)Point::loWord(dw);
this->y=(short)Point::HIWORD(dw); this->y=(short)Point::hiWord(dw);
empty=false; empty=false;
} }
Point::Point(Size sz) Point::Point(Size sz)
...@@ -60,15 +60,6 @@ namespace core { ...@@ -60,15 +60,6 @@ namespace core {
{ {
return !(lhs==rhs); return !(lhs==rhs);
} }
int Point::HIWORD(int n)
{
return (n >> 16) & 0xffff;
}
int Point::LOWORD(int n)
{
return n & 0xffff;
}
Point Point::Empty=Point(); Point Point::Empty=Point();
} }
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#ifndef OPOINT_H #ifndef OPOINT_H
#define OPOINT_H #define OPOINT_H
#include <QString> #include <QString>
namespace core { namespace core {
...@@ -60,8 +59,15 @@ namespace core { ...@@ -60,8 +59,15 @@ namespace core {
{ {
Offset(p.x, p.y); Offset(p.x, p.y);
} }
static int HIWORD(int n); static int hiWord(int n)
static int LOWORD(int n); {
return (n >> 16) & 0xffff;
}
static int loWord(int n)
{
return n & 0xffff;
}
private: private:
int x; int x;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
*/ */
#include "urlfactory.h" #include "urlfactory.h"
#include <QRegExp> #include <QRegExp>
#include <qmath.h>
namespace core { namespace core {
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "lks94projection.h" #include "lks94projection.h"
#include <qmath.h>
...@@ -105,7 +106,7 @@ QVector <double> LKS94Projection::DTM10(const QVector <double>& lonlat) ...@@ -105,7 +106,7 @@ QVector <double> LKS94Projection::DTM10(const QVector <double>& lonlat)
double lon = DegreesToRadians(lonlat[0]); double lon = DegreesToRadians(lonlat[0]);
double lat = DegreesToRadians(lonlat[1]); double lat = DegreesToRadians(lonlat[1]);
double h = lonlat.count() < 3 ? 0 : std::isnan(lonlat[2]) ? 0 : lonlat[2];//TODO NAN double h = lonlat.count() < 3 ? 0 : (lonlat[2] != lonlat[2]) ? 0 : lonlat[2];//TODO NAN
double v = semiMajor / sqrt(1 - es * pow(sin(lat), 2)); double v = semiMajor / sqrt(1 - es * pow(sin(lat), 2));
double x = (v + h) * cos(lat) * cos(lon); double x = (v + h) * cos(lat) * cos(lon);
double y = (v + h) * cos(lat) * sin(lon); double y = (v + h) * cos(lat) * sin(lon);
...@@ -137,7 +138,7 @@ QVector <double> LKS94Projection::MTD10(QVector <double>& pnt) ...@@ -137,7 +138,7 @@ QVector <double> LKS94Projection::MTD10(QVector <double>& pnt)
// ... // ...
bool AtPole = false; // is location in polar region bool AtPole = false; // is location in polar region
double Z = pnt.count() < 3 ? 0 : std::isnan(pnt[2]) ? 0 : pnt[2];//TODO NaN double Z = pnt.count() < 3 ? 0 : (pnt[2] != pnt[2]) ? 0 : pnt[2];//TODO NaN
double lon = 0; double lon = 0;
double lat = 0; double lat = 0;
...@@ -304,8 +305,8 @@ QVector <double> LKS94Projection::DTM01(QVector <double>& lonlat) ...@@ -304,8 +305,8 @@ QVector <double> LKS94Projection::DTM01(QVector <double>& lonlat)
double lon = DegreesToRadians(lonlat[0]); double lon = DegreesToRadians(lonlat[0]);
double lat = DegreesToRadians(lonlat[1]); double lat = DegreesToRadians(lonlat[1]);
double h = lonlat.count() < 3 ? 0 : std::isnan(lonlat[2]) ? 0 : lonlat[2];//TODO NaN double h = lonlat.count() < 3 ? 0 : (lonlat[2] != lonlat[2]) ? 0 : lonlat[2];//TODO NaN
double v = semiMajor / sqrt(1 - es * pow(sin(lat), 2)); double v = semiMajor / sqrt(1 - es * pow(sin(lat), 2.0));
double x = (v + h) * cos(lat) * cos(lon); double x = (v + h) * cos(lat) * cos(lon);
double y = (v + h) * cos(lat) * sin(lon); double y = (v + h) * cos(lat) * sin(lon);
double z = ((1 - es) * v + h) * sin(lat); double z = ((1 - es) * v + h) * sin(lat);
...@@ -335,7 +336,7 @@ QVector <double> LKS94Projection::MTD01(QVector <double>& pnt) ...@@ -335,7 +336,7 @@ QVector <double> LKS94Projection::MTD01(QVector <double>& pnt)
// ... // ...
bool At_Pole = false; // is location in polar region bool At_Pole = false; // is location in polar region
double Z = pnt.count() < 3 ? 0 : std::isnan(pnt[2]) ? 0 : pnt[2];//TODO NaN double Z = pnt.count() < 3 ? 0 : (pnt[2] != pnt[2]) ? 0 : pnt[2];//TODO NaN
double lon = 0; double lon = 0;
double lat = 0; double lat = 0;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "mercatorprojection.h" #include "mercatorprojection.h"
#include <qmath.h>
namespace projections { namespace projections {
MercatorProjection::MercatorProjection():MinLatitude(-85.05112878), MaxLatitude(85.05112878),MinLongitude(-177), MercatorProjection::MercatorProjection():MinLatitude(-85.05112878), MaxLatitude(85.05112878),MinLongitude(-177),
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "mercatorprojectionyandex.h" #include "mercatorprojectionyandex.h"
#include <qmath.h>
namespace projections { namespace projections {
...@@ -45,7 +45,7 @@ Point MercatorProjectionYandex::FromLatLngToPixel(double lat, double lng, const ...@@ -45,7 +45,7 @@ Point MercatorProjectionYandex::FromLatLngToPixel(double lat, double lng, const
double k = 0.0818191908426; double k = 0.0818191908426;
double z = tan(MathPiDiv4 + rLat / 2) / pow((tan(MathPiDiv4 + asin(k * sin(rLat)) / 2)), k); double z = tan(MathPiDiv4 + rLat / 2) / pow((tan(MathPiDiv4 + asin(k * sin(rLat)) / 2)), k);
double z1 = pow(2, 23 - zoom); double z1 = pow(2.0, 23 - zoom);
double DX = ((20037508.342789 + a * rLon) * 53.5865938 / z1); double DX = ((20037508.342789 + a * rLon) * 53.5865938 / z1);
double DY = ((20037508.342789 - a * log(z)) * 53.5865938 / z1); double DY = ((20037508.342789 - a * log(z)) * 53.5865938 / z1);
......
...@@ -85,7 +85,7 @@ double PlateCarreeProjection::Flattening() const ...@@ -85,7 +85,7 @@ double PlateCarreeProjection::Flattening() const
} }
Size PlateCarreeProjection::GetTileMatrixMaxXY(const int &zoom) Size PlateCarreeProjection::GetTileMatrixMaxXY(const int &zoom)
{ {
int y = (int) pow(2, zoom); int y = (int) pow(2.0f, zoom);
return Size((2*y) - 1, y - 1); return Size((2*y) - 1, y - 1);
} }
......
...@@ -84,7 +84,7 @@ double PlateCarreeProjectionPergo::Flattening() const ...@@ -84,7 +84,7 @@ double PlateCarreeProjectionPergo::Flattening() const
} }
Size PlateCarreeProjectionPergo::GetTileMatrixMaxXY(const int &zoom) Size PlateCarreeProjectionPergo::GetTileMatrixMaxXY(const int &zoom)
{ {
int y = (int) pow(2, zoom); int y = (int) pow(2.0f, zoom);
return Size((2*y) - 1, y - 1); return Size((2*y) - 1, y - 1);
} }
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "pureprojection.h" #include "pureprojection.h"
#include <qmath.h>
...@@ -38,7 +39,7 @@ const double PureProjection::HALF_PI = (M_PI * 0.5); ...@@ -38,7 +39,7 @@ const double PureProjection::HALF_PI = (M_PI * 0.5);
const double PureProjection::TWO_PI= (M_PI * 2.0); const double PureProjection::TWO_PI= (M_PI * 2.0);
const double PureProjection::EPSLoN= 1.0e-10; const double PureProjection::EPSLoN= 1.0e-10;
const double PureProjection::MAX_VAL= 4; const double PureProjection::MAX_VAL= 4;
const double PureProjection::MAXLONG= 2147483647; const double PureProjection::maxLong= 2147483647;
const double PureProjection::DBLLONG= 4.61168601e18; const double PureProjection::DBLLONG= 4.61168601e18;
const double PureProjection::R2D=180/M_PI; const double PureProjection::R2D=180/M_PI;
const double PureProjection::D2R=M_PI/180; const double PureProjection::D2R=M_PI/180;
...@@ -128,17 +129,17 @@ Point PureProjection::FromLatLngToPixel(const PointLatLng &p,const int &zoom) ...@@ -128,17 +129,17 @@ Point PureProjection::FromLatLngToPixel(const PointLatLng &p,const int &zoom)
x = x - (Sign(x) * TWO_PI); x = x - (Sign(x) * TWO_PI);
else else
if(((qlonglong) qAbs(x / TWO_PI)) < MAXLONG) if(((qlonglong) qAbs(x / TWO_PI)) < maxLong)
{ {
x = x - (((qlonglong) (x / TWO_PI)) * TWO_PI); x = x - (((qlonglong) (x / TWO_PI)) * TWO_PI);
} }
else else
if(((qlonglong) qAbs(x / (MAXLONG * TWO_PI))) < MAXLONG) if(((qlonglong) qAbs(x / (maxLong * TWO_PI))) < maxLong)
{ {
x = x - (((qlonglong) (x / (MAXLONG * TWO_PI))) * (TWO_PI * MAXLONG)); x = x - (((qlonglong) (x / (maxLong * TWO_PI))) * (TWO_PI * maxLong));
} }
else else
if(((qlonglong) qAbs(x / (DBLLONG * TWO_PI))) < MAXLONG) if(((qlonglong) qAbs(x / (DBLLONG * TWO_PI))) < maxLong)
{ {
x = x - (((qlonglong) (x / (DBLLONG * TWO_PI))) * (TWO_PI * DBLLONG)); x = x - (((qlonglong) (x / (DBLLONG * TWO_PI))) * (TWO_PI * DBLLONG));
} }
......
...@@ -88,7 +88,7 @@ protected: ...@@ -88,7 +88,7 @@ protected:
static const double TWO_PI; static const double TWO_PI;
static const double EPSLoN; static const double EPSLoN;
static const double MAX_VAL; static const double MAX_VAL;
static const double MAXLONG; static const double maxLong;
static const double DBLLONG; static const double DBLLONG;
static const double R2D; static const double R2D;
static const double D2R; static const double D2R;
......
...@@ -203,11 +203,11 @@ public: ...@@ -203,11 +203,11 @@ public:
} }
static RectLatLng Intersect(RectLatLng const& a, RectLatLng const& b) static RectLatLng Intersect(RectLatLng const& a, RectLatLng const& b)
{ {
double lng = std::max(a.Lng(), b.Lng()); double lng = qMax(a.Lng(), b.Lng());
double num2 = std::min((double) (a.Lng() + a.WidthLng()), (double) (b.Lng() + b.WidthLng())); double num2 = qMin((double) (a.Lng() + a.WidthLng()), (double) (b.Lng() + b.WidthLng()));
double lat = std::max(a.Lat(), b.Lat()); double lat = qMax(a.Lat(), b.Lat());
double num4 = std::min((double) (a.Lat() + a.HeightLat()), (double) (b.Lat() + b.HeightLat())); double num4 = qMin((double) (a.Lat() + a.HeightLat()), (double) (b.Lat() + b.HeightLat()));
if((num2 >= lng) && (num4 >= lat)) if((num2 >= lng) && (num4 >= lat))
{ {
...@@ -222,10 +222,10 @@ public: ...@@ -222,10 +222,10 @@ public:
static RectLatLng Union(RectLatLng const& a, RectLatLng const& b) static RectLatLng Union(RectLatLng const& a, RectLatLng const& b)
{ {
double lng = std::min(a.Lng(), b.Lng()); double lng = qMin(a.Lng(), b.Lng());
double num2 = std::max((double) (a.Lng() + a.WidthLng()), (double) (b.Lng() + b.WidthLng())); double num2 = qMax((double) (a.Lng() + a.WidthLng()), (double) (b.Lng() + b.WidthLng()));
double lat = std::min(a.Lat(), b.Lat()); double lat = qMin(a.Lat(), b.Lat());
double num4 = std::max((double) (a.Lat() + a.HeightLat()), (double) (b.Lat() + b.HeightLat())); double num4 = qMax((double) (a.Lat() + a.HeightLat()), (double) (b.Lat() + b.HeightLat()));
return RectLatLng(lng, lat, num2 - lng, num4 - lat); return RectLatLng(lng, lat, num2 - lng, num4 - lat);
} }
void Offset(PointLatLng const& pos) void Offset(PointLatLng const& pos)
......
...@@ -210,7 +210,7 @@ namespace mapcontrol ...@@ -210,7 +210,7 @@ namespace mapcontrol
double GPSItem::Distance3D(const internals::PointLatLng &coord, const int &altitude) double GPSItem::Distance3D(const internals::PointLatLng &coord, const int &altitude)
{ {
return sqrt(pow(internals::PureProjection::DistanceBetweenLatLng(this->coord,coord)*1000,2)+ return sqrt(pow(internals::PureProjection::DistanceBetweenLatLng(this->coord,coord)*1000,2)+
pow(this->altitude-altitude,2)); pow(static_cast<float>(this->altitude-altitude),2));
} }
void GPSItem::SetUavPic(QString UAVPic) void GPSItem::SetUavPic(QString UAVPic)
......
...@@ -211,7 +211,7 @@ namespace mapcontrol ...@@ -211,7 +211,7 @@ namespace mapcontrol
double UAVItem::Distance3D(const internals::PointLatLng &coord, const int &altitude) double UAVItem::Distance3D(const internals::PointLatLng &coord, const int &altitude)
{ {
return sqrt(pow(internals::PureProjection::DistanceBetweenLatLng(this->coord,coord)*1000,2)+ return sqrt(pow(internals::PureProjection::DistanceBetweenLatLng(this->coord,coord)*1000,2)+
pow(this->altitude-altitude,2)); pow(static_cast<float>(this->altitude-altitude),2));
} }
void UAVItem::SetUavPic(QString UAVPic) void UAVItem::SetUavPic(QString UAVPic)
{ {
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <stdint.h> #include <stdint.h>
#include <QDebug> #include <QDebug>
#include <math.h> #include <math.h>
#include <qmath.h>
#define RAD2DEG (180.0/M_PI) #define RAD2DEG (180.0/M_PI)
#define DEG2RAD (M_PI/180.0) #define DEG2RAD (M_PI/180.0)
......
...@@ -282,4 +282,4 @@ void QtColorButton::dropEvent(QDropEvent *event) ...@@ -282,4 +282,4 @@ void QtColorButton::dropEvent(QDropEvent *event)
} // namespace Utils } // namespace Utils
#include "moc_qtcolorbutton.cpp" //#include "moc_qtcolorbutton.cpp"
...@@ -12,48 +12,49 @@ DEFINES += EXTERNAL_USE ...@@ -12,48 +12,49 @@ DEFINES += EXTERNAL_USE
DEFINES += QTCREATOR_UTILS_LIB DEFINES += QTCREATOR_UTILS_LIB
# submiteditorwidget.h \
# Input # Input
HEADERS += abstractprocess.h \ HEADERS += utils_global.h \
basevalidatinglineedit.h \ reloadpromptutils.h \
checkablemessagebox.h \ settingsutils.h \
classnamevalidatinglineedit.h \ filesearch.h \
codegeneration.h \ listutils.h \
consoleprocess.h \ pathchooser.h \
coordinateconversions.h \ pathlisteditor.h \
detailsbutton.h \ filewizardpage.h \
detailswidget.h \ filewizarddialog.h \
fancylineedit.h \ projectintropage.h \
fancymainwindow.h \ basevalidatinglineedit.h \
filenamevalidatinglineedit.h \ filenamevalidatinglineedit.h \
filesearch.h \ projectnamevalidatinglineedit.h \
filewizarddialog.h \ codegeneration.h \
filewizardpage.h \ newclasswidget.h \
homelocationutil.h \ classnamevalidatinglineedit.h \
iwelcomepage.h \ linecolumnlabel.h \
linecolumnlabel.h \ fancylineedit.h \
listutils.h \ qtcolorbutton.h \
newclasswidget.h \ savedaction.h \
parameteraction.h \ abstractprocess.h \
pathchooser.h \ consoleprocess.h \
pathlisteditor.h \ synchronousprocess.h \
pathutils.h \ submitfieldwidget.h \
projectintropage.h \ uncommentselection.h \
projectnamevalidatinglineedit.h \ parameteraction.h \
qtcassert.h \ treewidgetcolumnstretcher.h \
qtcolorbutton.h \ checkablemessagebox.h \
reloadpromptutils.h \ qtcassert.h \
savedaction.h \ styledbar.h \
settingsutils.h \ stylehelper.h \
styledbar.h \ welcomemodetreewidget.h \
stylehelper.h \ iwelcomepage.h \
submiteditorwidget.h \ fancymainwindow.h \
submitfieldwidget.h \ detailsbutton.h \
synchronousprocess.h \ detailswidget.h \
treewidgetcolumnstretcher.h \ coordinateconversions.h \
uncommentselection.h \ pathutils.h \
utils_global.h \ worldmagmodel.h \
welcomemodetreewidget.h \ homelocationutil.h \
worldmagmodel.h \
xmlconfig.h xmlconfig.h
win32 { win32 {
...@@ -80,42 +81,43 @@ linux-g++ { ...@@ -80,42 +81,43 @@ linux-g++ {
SOURCES += consoleprocess_unix.cpp SOURCES += consoleprocess_unix.cpp
} }
SOURCES += basevalidatinglineedit.cpp \ # submiteditorwidget.cpp \
checkablemessagebox.cpp \
classnamevalidatinglineedit.cpp \ SOURCES += reloadpromptutils.cpp \
codegeneration.cpp \ settingsutils.cpp \
consoleprocess.cpp \ filesearch.cpp \
coordinateconversions.cpp \ pathchooser.cpp \
detailsbutton.cpp \ pathlisteditor.cpp \
detailswidget.cpp \ filewizardpage.cpp \
fancylineedit.cpp \ filewizarddialog.cpp \
fancymainwindow.cpp \ projectintropage.cpp \
filenamevalidatinglineedit.cpp \ basevalidatinglineedit.cpp \
filesearch.cpp \ filenamevalidatinglineedit.cpp \
filewizarddialog.cpp \ projectnamevalidatinglineedit.cpp \
filewizardpage.cpp \ codegeneration.cpp \
homelocationutil.cpp \ newclasswidget.cpp \
iwelcomepage.cpp \ classnamevalidatinglineedit.cpp \
linecolumnlabel.cpp \ linecolumnlabel.cpp \
newclasswidget.cpp \ fancylineedit.cpp \
parameteraction.cpp \ qtcolorbutton.cpp \
pathchooser.cpp \ savedaction.cpp \
pathlisteditor.cpp \ synchronousprocess.cpp \
pathutils.cpp \ submitfieldwidget.cpp \
projectintropage.cpp \ consoleprocess.cpp \
projectnamevalidatinglineedit.cpp \ uncommentselection.cpp \
qtcolorbutton.cpp \ parameteraction.cpp \
reloadpromptutils.cpp \ treewidgetcolumnstretcher.cpp \
savedaction.cpp \ checkablemessagebox.cpp \
settingsutils.cpp \ styledbar.cpp \
styledbar.cpp \ stylehelper.cpp \
stylehelper.cpp \ welcomemodetreewidget.cpp \
submiteditorwidget.cpp \ iwelcomepage.cpp \
submitfieldwidget.cpp \ fancymainwindow.cpp \
synchronousprocess.cpp \ detailsbutton.cpp \
treewidgetcolumnstretcher.cpp \ detailswidget.cpp \
uncommentselection.cpp \ coordinateconversions.cpp \
welcomemodetreewidget.cpp \ pathutils.cpp \
worldmagmodel.cpp \ worldmagmodel.cpp \
homelocationutil.cpp \
xmlconfig.cpp xmlconfig.cpp
RESOURCES += utils.qrc RESOURCES += utils.qrc
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include <stdint.h> #include <stdint.h>
#include <QDebug> #include <QDebug>
#include <math.h> #include <math.h>
#include <qmath.h>
#define RAD2DEG(rad) ((rad) * (180.0 / M_PI)) #define RAD2DEG(rad) ((rad) * (180.0 / M_PI))
#define DEG2RAD(deg) ((deg) * (M_PI / 180.0)) #define DEG2RAD(deg) ((deg) * (M_PI / 180.0))
......
...@@ -1383,6 +1383,8 @@ QImage UAS::getImage() ...@@ -1383,6 +1383,8 @@ QImage UAS::getImage()
imagePacketsArrived = 0; imagePacketsArrived = 0;
//imageRecBuffer.clear(); //imageRecBuffer.clear();
return image; return image;
#else
return QImage();
#endif #endif
} }
......
...@@ -76,7 +76,8 @@ void UASManager::loadSettings() ...@@ -76,7 +76,8 @@ void UASManager::loadSettings()
bool UASManager::setHomePosition(double lat, double lon, double alt) bool UASManager::setHomePosition(double lat, double lon, double alt)
{ {
// Checking for NaN and infitiny // Checking for NaN and infitiny
if (lat == lat && lon == lon && alt == alt && !std::isinf(lat) && !std::isinf(lon) && !std::isinf(alt) // FIXME does not work with MSVC: && !std::isinf(lat) && !std::isinf(lon) && !std::isinf(alt)
if (lat == lat && lon == lon && alt == alt
&& lat <= 90.0 && lat >= -90.0 && lon <= 180.0 && lon >= -180.0) { && lat <= 90.0 && lat >= -90.0 && lon <= 180.0 && lon >= -180.0) {
bool changed = false; bool changed = false;
......
...@@ -40,11 +40,13 @@ This file is part of the QGROUNDCONTROL project ...@@ -40,11 +40,13 @@ This file is part of the QGROUNDCONTROL project
#include "QGC.h" #include "QGC.h"
#include "Waypoint.h" #include "Waypoint.h"
#include "UASWaypointManager.h" #include "UASWaypointManager.h"
#include <qmath.h>
//#include "Waypoint2DIcon.h" //#include "Waypoint2DIcon.h"
//#include "MAV2DIcon.h" //#include "MAV2DIcon.h"
#include <QDebug> #include <QDebug>
HSIDisplay::HSIDisplay(QWidget *parent) : HSIDisplay::HSIDisplay(QWidget *parent) :
HDDisplay(NULL, "HSI", parent), HDDisplay(NULL, "HSI", parent),
gpsSatellites(), gpsSatellites(),
......
...@@ -36,7 +36,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -36,7 +36,7 @@ This file is part of the QGROUNDCONTROL project
#include <QSettings> #include <QSettings>
#include <QFileInfoList> #include <QFileInfoList>
#ifdef _WIN32 #ifdef _WIN32
#include <QextSerialEnumerator.h> #include <qextserialenumerator.h>
#endif #endif
#if defined (__APPLE__) && defined (__MACH__) #if defined (__APPLE__) && defined (__MACH__)
#include <stdio.h> #include <stdio.h>
......
...@@ -75,10 +75,12 @@ bool QGCMAVLinkTextEdit::syntaxcheck() ...@@ -75,10 +75,12 @@ bool QGCMAVLinkTextEdit::syntaxcheck()
QMessageBox::information(0, tr("XML not found!"),tr("Null size xml document!")); QMessageBox::information(0, tr("XML not found!"),tr("Null size xml document!"));
error = true; error = true;
} }
return error;
} }
void QGCMAVLinkTextEdit::contextMenuEvent ( QContextMenuEvent * e ) void QGCMAVLinkTextEdit::contextMenuEvent ( QContextMenuEvent * e )
{ {
Q_UNUSED(e);
QMenu *RContext = createOwnStandardContextMenu(); QMenu *RContext = createOwnStandardContextMenu();
RContext->exec(QCursor::pos()); RContext->exec(QCursor::pos());
delete RContext; delete RContext;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment