Changeset 102763 in webkit
- Timestamp:
- Dec 14, 2011 3:27:59 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r102760 r102763 1 2011-12-14 Alexander Færøy <alexander.faeroy@nokia.com> 2 3 [Qt] Fix compilation of QtWebKit with --orientation-events without ENABLE_DEVICE_ORIENTATION 4 https://bugs.webkit.org/show_bug.cgi?id=74492 5 6 Reviewed by Simon Hausmann. 7 8 * Source/api.pri: 9 1 10 2011-12-14 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> 2 11 -
trunk/Source/WebKit/qt/Api/qwebframe.cpp
r101366 r102763 116 116 #include <qnetworkrequest.h> 117 117 118 #if ENABLE(ORIENTATION_EVENTS) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 119 QTM_USE_NAMESPACE 120 #endif 121 118 122 using namespace WebCore; 119 123 … … 456 460 457 461 switch (m_orientation.reading()->orientation()) { 458 case Q tMobility::QOrientationReading::TopUp:462 case QOrientationReading::TopUp: 459 463 orientation = 0; 460 464 break; 461 case Q tMobility::QOrientationReading::TopDown:465 case QOrientationReading::TopDown: 462 466 orientation = 180; 463 467 break; 464 case Q tMobility::QOrientationReading::LeftUp:468 case QOrientationReading::LeftUp: 465 469 orientation = -90; 466 470 break; 467 case Q tMobility::QOrientationReading::RightUp:471 case QOrientationReading::RightUp: 468 472 orientation = 90; 469 473 break; 470 case Q tMobility::QOrientationReading::FaceUp:471 case Q tMobility::QOrientationReading::FaceDown:474 case QOrientationReading::FaceUp: 475 case QOrientationReading::FaceDown: 472 476 // WebCore unable to handle it 473 477 default: -
trunk/Source/WebKit/qt/Api/qwebframe_p.h
r97571 r102763 31 31 #if ENABLE(ORIENTATION_EVENTS) 32 32 #include "qorientationsensor.h" 33 #endif 33 #endif // ENABLE(ORIENTATION_EVENTS). 34 34 #include "qwebelement.h" 35 35 #include "wtf/RefPtr.h" … … 128 128 129 129 #if ENABLE(ORIENTATION_EVENTS) 130 QtMobility::QOrientationSensor m_orientation; 131 #endif 130 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 131 QTM_NAMESPACE::QOrientationSensor m_orientation; 132 #else 133 QOrientationSensor m_orientation; 134 #endif // QT_VERSION < QT_VERSION_CHECK(5, 0, 0). 135 #endif // ENABLE(ORIENTATION_EVENTS). 132 136 133 137 private: -
trunk/Source/WebKit/qt/ChangeLog
r102759 r102763 1 2011-12-14 Alexander Færøy <alexander.faeroy@nokia.com> 2 3 [Qt] Fix compilation of QtWebKit with --orientation-events without ENABLE_DEVICE_ORIENTATION 4 https://bugs.webkit.org/show_bug.cgi?id=74492 5 6 Reviewed by Simon Hausmann. 7 8 * Api/qwebframe.cpp: 9 (QWebFramePrivate::_q_orientationChanged): 10 * Api/qwebframe_p.h: 11 * WebCoreSupport/DeviceMotionProviderQt.cpp: 12 * WebCoreSupport/DeviceMotionProviderQt.h: 13 * WebCoreSupport/DeviceOrientationProviderQt.cpp: 14 * WebCoreSupport/DeviceOrientationProviderQt.h: 15 1 16 2011-12-14 Alexander Færøy <alexander.faeroy@nokia.com> 2 17 -
trunk/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp
r102755 r102763 22 22 23 23 #include "DeviceOrientationProviderQt.h" 24 25 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 26 QTM_USE_NAMESPACE 27 #endif 24 28 25 29 namespace WebCore { -
trunk/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h
r102755 r102763 27 27 #include <QObject> 28 28 29 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)30 QTM_USE_NAMESPACE31 #endif32 33 29 namespace WebCore { 34 30 35 31 class DeviceOrientationProviderQt; 36 32 37 class DeviceMotionProviderQt : public QObject, public QAccelerometerFilter { 33 class DeviceMotionProviderQt 34 : public QObject 35 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 36 , public QTM_NAMESPACE::QAccelerometerFilter { 37 #else 38 , public QAccelerometerFilter { 39 #endif 38 40 Q_OBJECT 39 41 public: … … 41 43 ~DeviceMotionProviderQt(); 42 44 45 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 46 bool filter(QTM_NAMESPACE::QAccelerometerReading*); 47 #else 43 48 bool filter(QAccelerometerReading*); 49 #endif 50 44 51 void start(); 45 52 void stop(); … … 51 58 private: 52 59 RefPtr<DeviceMotionData> m_motion; 60 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 61 QTM_NAMESPACE::QAccelerometer m_acceleration; 62 #else 53 63 QAccelerometer m_acceleration; 64 #endif 54 65 DeviceOrientationProviderQt* m_deviceOrientation; 55 66 }; -
trunk/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
r102755 r102763 20 20 #include "config.h" 21 21 #include "DeviceOrientationProviderQt.h" 22 23 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 24 QTM_USE_NAMESPACE 25 #endif 22 26 23 27 namespace WebCore { -
trunk/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
r102755 r102763 27 27 #include <QRotationFilter> 28 28 29 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)30 QTM_USE_NAMESPACE31 #endif32 33 29 namespace WebCore { 34 30 35 class DeviceOrientationProviderQt : public QRotationFilter { 31 class DeviceOrientationProviderQt 32 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 33 : public QTM_NAMESPACE::QRotationFilter { 34 #else 35 : public QRotationFilter { 36 #endif 36 37 public: 37 38 DeviceOrientationProviderQt(); 38 39 39 40 void setController(DeviceOrientationController*); 41 42 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 43 bool filter(QTM_NAMESPACE::QRotationReading*); 44 #else 40 45 bool filter(QRotationReading*); 46 #endif 47 41 48 void start(); 42 49 void stop(); … … 48 55 RefPtr<DeviceOrientation> m_lastOrientation; 49 56 DeviceOrientationController* m_controller; 57 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 58 QTM_NAMESPACE::QRotationSensor m_sensor; 59 #else 50 60 QRotationSensor m_sensor; 61 #endif 51 62 }; 52 63 -
trunk/Source/api.pri
r102760 r102763 137 137 } 138 138 139 contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) || contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1) { 140 haveQt(5): QT += sensors 141 } 142 139 143 contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) { 140 haveQt(5): QT += sensors141 142 144 HEADERS += \ 143 145 $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h \
Note: See TracChangeset
for help on using the changeset viewer.