Fix some warnings on Qt5 builds

This commit is contained in:
Matthias Kuhn 2016-03-10 18:42:05 +01:00
parent 4cc5c2cb4c
commit e6198c6929
3 changed files with 18 additions and 6 deletions

View File

@ -397,6 +397,14 @@ void myMessageOutput( QtMsgType type, const char *msg )
abort(); // deliberately dump core
#endif
}
#if QT_VERSION >= 0x050000
case QtInfoMsg:
myPrint( "Info: %s\n", msg );
break;
#endif
}
}

View File

@ -53,6 +53,10 @@ int QgsDxfPaintDevice::metric( PaintDeviceMetric metric ) const
case QPaintDevice::PdmPhysicalDpiX:
case QPaintDevice::PdmPhysicalDpiY:
return 96;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
case QPaintDevice::PdmDevicePixelRatio:
return 1;
#endif
}
return 0;
}

View File

@ -84,13 +84,13 @@ void QgsQtLocationConnection::parseData()
//http://developer.android.com/reference/android/location/GpsStatus.NmeaListener.html
//http://doc.qt.nokia.com/qtmobility-1.1/qnmeapositioninfosource.html
//into QtLocation and subclass QgsNMEAConnection directly?
mLastGPSInformation.pdop; //< Dilution of precision
mLastGPSInformation.hdop; //< Horizontal dilution of precision
mLastGPSInformation.vdop; //< Vertical dilution of precision
//mLastGPSInformation.pdop; //< Dilution of precision
//mLastGPSInformation.hdop; //< Horizontal dilution of precision
//mLastGPSInformation.vdop; //< Vertical dilution of precision
mLastGPSInformation.fixMode; //< Mode (M = Manual, forced to operate in 2D or 3D; A = Automatic, 3D/2D)
mLastGPSInformation.quality; //< GPS quality indicator (0 = Invalid; 1 = Fix; 2 = Differential, 3 = Sensitive)
mLastGPSInformation.status; //< Status (A = active or V = void)
//mLastGPSInformation.fixMode; //< Mode (M = Manual, forced to operate in 2D or 3D; A = Automatic, 3D/2D)
//mLastGPSInformation.quality; //< GPS quality indicator (0 = Invalid; 1 = Fix; 2 = Differential, 3 = Sensitive)
//mLastGPSInformation.status; //< Status (A = active or V = void)
emit stateChanged( mLastGPSInformation );
QgsDebugMsg( "Valid QGeoPositionInfo, positionUpdated" );