Changeset 63819 in webkit


Ignore:
Timestamp:
Jul 21, 2010 8:12:27 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-07-21 Mahesh Kulkarni <mahesh.kulkarni@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):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63817 r63819  
     12010-07-21  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        [QT] Leak and few more fixes to qt port of geolocation
     6        https://bugs.webkit.org/show_bug.cgi?id=42753
     7
     8        Fixes memory leak and default values set to attributes.
     9       
     10        Memory leak fix no new test case added.
     11
     12        * platform/qt/GeolocationServiceQt.cpp: Added.
     13        (WebCore::GeolocationServiceQt::~GeolocationServiceQt):
     14        (WebCore::GeolocationServiceQt::positionUpdated):
     15
    1162010-07-21  Kristian Amlie <kristian.amlie@nokia.com>
    217
  • trunk/WebCore/platform/qt/GeolocationServiceQt.cpp

    r61117 r63819  
    5656GeolocationServiceQt::~GeolocationServiceQt()
    5757{
     58    delete m_location;
    5859}
    5960
     
    6667    double latitude = coord.latitude();
    6768    double longitude = coord.longitude();
    68     bool providesAltitude = true;
     69    bool providesAltitude = (geoPosition.coordinate().type() == QGeoCoordinate::Coordinate3D);
    6970    double altitude = coord.altitude();
    7071
    71     double accuracy = geoPosition.hasAttribute(QGeoPositionInfo::HorizontalAccuracy) ?
    72                         geoPosition.attribute(QGeoPositionInfo::HorizontalAccuracy) : 0.0;
     72    double accuracy = geoPosition.attribute(QGeoPositionInfo::HorizontalAccuracy);
    7373
    7474    bool providesAltitudeAccuracy = geoPosition.hasAttribute(QGeoPositionInfo::VerticalAccuracy);
    75     double altitudeAccuracy = providesAltitudeAccuracy ? geoPosition.attribute(QGeoPositionInfo::VerticalAccuracy) : 0.0;
     75    double altitudeAccuracy = geoPosition.attribute(QGeoPositionInfo::VerticalAccuracy);
    7676
    7777    bool providesHeading =  geoPosition.hasAttribute(QGeoPositionInfo::Direction);
    78     double heading = providesHeading ? geoPosition.attribute(QGeoPositionInfo::Direction) : 0.0;
     78    double heading = geoPosition.attribute(QGeoPositionInfo::Direction);
    7979
    8080    bool providesSpeed = geoPosition.hasAttribute(QGeoPositionInfo::GroundSpeed);
    81     double speed = providesSpeed ? geoPosition.attribute(QGeoPositionInfo::GroundSpeed) : 0.0;
     81    double speed = geoPosition.attribute(QGeoPositionInfo::GroundSpeed);
    8282
    8383    RefPtr<Coordinates> coordinates = Coordinates::create(latitude, longitude, providesAltitude, altitude,
Note: See TracChangeset for help on using the changeset viewer.