2009-10-02 Norbert Leser <norbert.leser@nokia.com>

        Reviewed by Simon Hausmann.

        Conditionally guard cursor code (cursor and updateCursor functions) with !QT_NO_CURSOR.
        Otherwise, it is inconsistent with class declaration of QCursor.

        * Api/qgraphicswebview.cpp:
        * Api/qwebview.cpp:


2009-10-02  Norbert Leser  <norbert.leser@nokia.com>

        Reviewed by Simon Hausmann.

        Conditionally guard cursor code (cursor and updateCursor functions) with !QT_NO_CURSOR.
        Otherwise, it is inconsistent with class declaration of QCursor.

        No new tests.

        * platform/qt/QWebPageClient.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f1641618
2009-10-02 Norbert Leser <norbert.leser@nokia.com>
Reviewed by Simon Hausmann.
Conditionally guard cursor code (cursor and updateCursor functions) with !QT_NO_CURSOR.
Otherwise, it is inconsistent with class declaration of QCursor.
No new tests.
* platform/qt/QWebPageClient.h:
2009-10-02 Philippe Normand <pnormand@igalia.com>
Reviewed by Gustavo Noronha.
......@@ -35,28 +35,36 @@ public:
inline void resetCursor()
{
#ifndef QT_NO_CURSOR
if (!cursor().bitmap() && cursor().shape() == m_lastCursor.shape())
return;
updateCursor(m_lastCursor);
#endif
}
inline void setCursor(const QCursor& cursor)
{
#ifndef QT_NO_CURSOR
m_lastCursor = cursor;
if (!cursor.bitmap() && cursor.shape() == this->cursor().shape())
return;
updateCursor(cursor);
#endif
}
virtual int screenNumber() const = 0;
virtual WId winId() const = 0;
protected:
#ifndef QT_NO_CURSOR
virtual QCursor cursor() const = 0;
virtual void updateCursor(const QCursor& cursor) = 0;
#endif
private:
#ifndef QT_NO_CURSOR
QCursor m_lastCursor;
#endif
};
#endif
......@@ -45,8 +45,10 @@ public:
virtual void scroll(int dx, int dy, const QRect&);
virtual void update(const QRect& dirtyRect);
#ifndef QT_NO_CURSOR
virtual QCursor cursor() const;
virtual void updateCursor(const QCursor& cursor);
#endif
virtual int screenNumber() const;
virtual WId winId() const;
......@@ -95,6 +97,7 @@ void QGraphicsWebViewPrivate::update(const QRect & dirtyRect)
q->update(QRectF(dirtyRect));
}
#ifndef QT_NO_CURSOR
QCursor QGraphicsWebViewPrivate::cursor() const
{
return q->cursor();
......@@ -104,6 +107,7 @@ void QGraphicsWebViewPrivate::updateCursor(const QCursor& cursor)
{
q->setCursor(cursor);
}
#endif
int QGraphicsWebViewPrivate::screenNumber() const
{
......
......@@ -48,8 +48,10 @@ public:
virtual void scroll(int dx, int dy, const QRect&);
virtual void update(const QRect& dirtyRect);
#ifndef QT_NO_CURSOR
virtual QCursor cursor() const;
virtual void updateCursor(const QCursor& cursor);
#endif
virtual int screenNumber() const;
virtual WId winId() const;
......@@ -72,6 +74,7 @@ void QWebViewPrivate::update(const QRect & dirtyRect)
view->update(dirtyRect);
}
#ifndef QT_NO_CURSOR
QCursor QWebViewPrivate::cursor() const
{
return view->cursor();
......@@ -81,6 +84,7 @@ void QWebViewPrivate::updateCursor(const QCursor& cursor)
{
view->setCursor(cursor);
}
#endif
int QWebViewPrivate::screenNumber() const
{
......
2009-10-02 Norbert Leser <norbert.leser@nokia.com>
Reviewed by Simon Hausmann.
Conditionally guard cursor code (cursor and updateCursor functions) with !QT_NO_CURSOR.
Otherwise, it is inconsistent with class declaration of QCursor.
* Api/qgraphicswebview.cpp:
* Api/qwebview.cpp:
2009-10-02 Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed by Simon Hausmann.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment