[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 11:23:14 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3dfde0fbaacb62d8728e30efe176def3603d38fe
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jul 21 15:12:27 2010 +0000
2010-07-21 Mahesh Kulkarni <mahesh.kulkarni at nokia.com>
Reviewed by Laszlo Gombos.
[QT] Leak and few more fixes to qt port of geolocation
https://bugs.webkit.org/show_bug.cgi?id=42753
Fixes memory leak and default values set to attributes.
Memory leak fix no new test case added.
* platform/qt/GeolocationServiceQt.cpp: Added.
(WebCore::GeolocationServiceQt::~GeolocationServiceQt):
(WebCore::GeolocationServiceQt::positionUpdated):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 302f3f1..54e7a5d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-07-21 Mahesh Kulkarni <mahesh.kulkarni at nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [QT] Leak and few more fixes to qt port of geolocation
+ https://bugs.webkit.org/show_bug.cgi?id=42753
+
+ Fixes memory leak and default values set to attributes.
+
+ Memory leak fix no new test case added.
+
+ * platform/qt/GeolocationServiceQt.cpp: Added.
+ (WebCore::GeolocationServiceQt::~GeolocationServiceQt):
+ (WebCore::GeolocationServiceQt::positionUpdated):
+
2010-07-21 Kristian Amlie <kristian.amlie at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/qt/GeolocationServiceQt.cpp b/WebCore/platform/qt/GeolocationServiceQt.cpp
index e24d497..3562eb9 100644
--- a/WebCore/platform/qt/GeolocationServiceQt.cpp
+++ b/WebCore/platform/qt/GeolocationServiceQt.cpp
@@ -55,6 +55,7 @@ GeolocationServiceQt::GeolocationServiceQt(GeolocationServiceClient* client)
GeolocationServiceQt::~GeolocationServiceQt()
{
+ delete m_location;
}
void GeolocationServiceQt::positionUpdated(const QGeoPositionInfo &geoPosition)
@@ -65,20 +66,19 @@ void GeolocationServiceQt::positionUpdated(const QGeoPositionInfo &geoPosition)
QGeoCoordinate coord = geoPosition.coordinate();
double latitude = coord.latitude();
double longitude = coord.longitude();
- bool providesAltitude = true;
+ bool providesAltitude = (geoPosition.coordinate().type() == QGeoCoordinate::Coordinate3D);
double altitude = coord.altitude();
- double accuracy = geoPosition.hasAttribute(QGeoPositionInfo::HorizontalAccuracy) ?
- geoPosition.attribute(QGeoPositionInfo::HorizontalAccuracy) : 0.0;
+ double accuracy = geoPosition.attribute(QGeoPositionInfo::HorizontalAccuracy);
bool providesAltitudeAccuracy = geoPosition.hasAttribute(QGeoPositionInfo::VerticalAccuracy);
- double altitudeAccuracy = providesAltitudeAccuracy ? geoPosition.attribute(QGeoPositionInfo::VerticalAccuracy) : 0.0;
+ double altitudeAccuracy = geoPosition.attribute(QGeoPositionInfo::VerticalAccuracy);
bool providesHeading = geoPosition.hasAttribute(QGeoPositionInfo::Direction);
- double heading = providesHeading ? geoPosition.attribute(QGeoPositionInfo::Direction) : 0.0;
+ double heading = geoPosition.attribute(QGeoPositionInfo::Direction);
bool providesSpeed = geoPosition.hasAttribute(QGeoPositionInfo::GroundSpeed);
- double speed = providesSpeed ? geoPosition.attribute(QGeoPositionInfo::GroundSpeed) : 0.0;
+ double speed = geoPosition.attribute(QGeoPositionInfo::GroundSpeed);
RefPtr<Coordinates> coordinates = Coordinates::create(latitude, longitude, providesAltitude, altitude,
accuracy, providesAltitudeAccuracy, altitudeAccuracy,
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list