Changeset 97409 in webkit
- Timestamp:
- Oct 13, 2011 3:11:36 PM (13 years ago)
- Location:
- trunk/Source/WebKit/qt
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/qt/ChangeLog
r97227 r97409 1 2011-10-13 Adenilson Cavalcanti <adenilson.silva@openbossa.org> 2 3 [Qt] GeolocationClient cleanups 4 https://bugs.webkit.org/show_bug.cgi?id=69737 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Qt5 has a location module, so no need to use an external 9 library like Qt Mobility. This patch will allow the GeolocationClientQt 10 to compile with both Qt5 and Qt4. 11 12 * QtWebKit.pro: 13 * WebCoreSupport/GeolocationClientQt.cpp: 14 (WebCore::GeolocationClientQt::positionUpdated): 15 * WebCoreSupport/GeolocationClientQt.h: 16 1 17 2011-10-11 Simon Fraser <simon.fraser@apple.com> 2 18 -
trunk/Source/WebKit/qt/QtWebKit.pro
r97387 r97409 288 288 289 289 contains(DEFINES, ENABLE_GEOLOCATION=1) { 290 qt5: QT += location 291 290 292 HEADERS += \ 291 293 $$PWD/WebCoreSupport/GeolocationClientQt.h -
trunk/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
r95901 r97409 38 38 #include "qwebpage_p.h" 39 39 40 using namespace QtMobility; 40 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 41 #include <QGeoPositionInfoSource> 42 #elif QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) 43 #include <QtLocation/QGeoPositionInfoSource> 44 #endif 41 45 42 46 namespace WebCore { … … 61 65 } 62 66 63 void GeolocationClientQt::positionUpdated(const QGeoPositionInfo &geoPosition)67 void GeolocationClientQt::positionUpdated(const QGeoPositionInfo& geoPosition) 64 68 { 65 69 if (!geoPosition.isValid()) -
trunk/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
r95901 r97409 28 28 29 29 #include "GeolocationClient.h" 30 #include <QGeoPositionInfoSource> 30 31 #include <QObject> 31 32 #include <wtf/RefPtr.h> 32 33 33 // FIXME: Remove usage of "using namespace" in a header file. 34 // There is bug in qtMobility signal names are not full qualified when used with namespace 35 // QtMobility namespace in slots throws up error and its required to be fixed in qtmobility. 34 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 35 #include <QGeoPositionInfo> 36 namespace QtMobility { 37 class QGeoPositionInfoSource; 38 }; 36 39 using namespace QtMobility; 40 #elif QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) 41 #include <QtLocation/QGeoPositionInfo> 42 class QGeoPositionInfoSource; 43 #endif 44 37 45 38 46 class QWebPage; … … 40 48 namespace WebCore { 41 49 42 // This class provides a implementation of a GeolocationService for qtWebkit. 43 // It uses QtMobility (v1.0.0) location service to get positions 50 // This class provides an implementation of a GeolocationService for QtWebkit. 44 51 class GeolocationClientQt : public QObject, public GeolocationClient { 45 52 Q_OBJECT … … 60 67 61 68 private Q_SLOTS: 62 // QGeoPositionInfoSource63 69 void positionUpdated(const QGeoPositionInfo&); 64 70 … … 66 72 const QWebPage* m_page; 67 73 RefPtr<GeolocationPosition> m_lastPosition; 68 Q tMobility::QGeoPositionInfoSource* m_location;74 QGeoPositionInfoSource* m_location; 69 75 }; 70 76
Note: See TracChangeset
for help on using the changeset viewer.