diff options
author | Jeremy Katz <jeremy.katz@nokia.com> | 2010-05-05 12:21:18 (GMT) |
---|---|---|
committer | Jeremy Katz <jeremy.katz@nokia.com> | 2010-05-05 12:21:18 (GMT) |
commit | 810cadc8430556dae9d18299a98c8c92608676b1 (patch) | |
tree | fbe57aa26fc815bd16b2c2c768a29c78d135baf1 | |
parent | 208e207925f9073fdca55f5824ce4d0051c86c6c (diff) | |
download | Qt-810cadc8430556dae9d18299a98c8c92608676b1.zip Qt-810cadc8430556dae9d18299a98c8c92608676b1.tar.gz Qt-810cadc8430556dae9d18299a98c8c92608676b1.tar.bz2 |
move cursor details into a private class
-rw-r--r-- | src/gui/kernel/qapplication_lite.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_lite.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qgraphicssystemcursor_lite.cpp | 4 | ||||
-rw-r--r-- | src/gui/painting/qgraphicssystemcursor_lite.h | 11 |
4 files changed, 13 insertions, 6 deletions
diff --git a/src/gui/kernel/qapplication_lite.cpp b/src/gui/kernel/qapplication_lite.cpp index 31db7d0..5fc56a8 100644 --- a/src/gui/kernel/qapplication_lite.cpp +++ b/src/gui/kernel/qapplication_lite.cpp @@ -691,7 +691,7 @@ void QApplicationPrivate::processMouseEvent(QWindowSystemInterface::MouseEvent * QMouseEvent ev(type, localPoint, globalPoint, button, buttons, modifiers); - QList<QWeakPointer<QGraphicsSystemCursor> > cursors = QGraphicsSystemCursor::getInstances(); + QList<QWeakPointer<QGraphicsSystemCursor> > cursors = QGraphicsSystemCursorPrivate::getInstances(); foreach (QWeakPointer<QGraphicsSystemCursor> cursor, cursors) { if (cursor) cursor.data()->pointerEvent(ev); diff --git a/src/gui/kernel/qwidget_lite.cpp b/src/gui/kernel/qwidget_lite.cpp index ed731c0..eae83f9 100644 --- a/src/gui/kernel/qwidget_lite.cpp +++ b/src/gui/kernel/qwidget_lite.cpp @@ -734,7 +734,7 @@ void qt_lite_set_cursor(QWidget * w, bool force) cursorCursor = w->cursor(); cursorWidget = w; } while (0); - foreach (QWeakPointer<QGraphicsSystemCursor> cursor, QGraphicsSystemCursor::getInstances()) + foreach (QWeakPointer<QGraphicsSystemCursor> cursor, QGraphicsSystemCursorPrivate::getInstances()) if (cursor) cursor.data()->changeCursor(&cursorCursor, cursorWidget); } diff --git a/src/gui/painting/qgraphicssystemcursor_lite.cpp b/src/gui/painting/qgraphicssystemcursor_lite.cpp index 623a75a..752b406 100644 --- a/src/gui/painting/qgraphicssystemcursor_lite.cpp +++ b/src/gui/painting/qgraphicssystemcursor_lite.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE -QList <QWeakPointer<QGraphicsSystemCursor> > QGraphicsSystemCursor::instances; +QList <QWeakPointer<QGraphicsSystemCursor> > QGraphicsSystemCursorPrivate::instances; /*! \class QGraphicsSystemCursor @@ -98,7 +98,7 @@ QList <QWeakPointer<QGraphicsSystemCursor> > QGraphicsSystemCursor::instances; QGraphicsSystemCursor::QGraphicsSystemCursor(QPlatformScreen *scr ) : screen(scr) { - instances.append(this); + QGraphicsSystemCursorPrivate::instances.append(this); } // End of display and pointer event handling code diff --git a/src/gui/painting/qgraphicssystemcursor_lite.h b/src/gui/painting/qgraphicssystemcursor_lite.h index a8a574e..9c65f7f 100644 --- a/src/gui/painting/qgraphicssystemcursor_lite.h +++ b/src/gui/painting/qgraphicssystemcursor_lite.h @@ -67,6 +67,14 @@ private: QPoint hot; }; +class QGraphicsSystemCursor; + +class QGraphicsSystemCursorPrivate { +public: + static QList<QWeakPointer<QGraphicsSystemCursor> > getInstances() { return instances; } + static QList<QWeakPointer<QGraphicsSystemCursor> > instances; +}; + class Q_GUI_EXPORT QGraphicsSystemCursor : public QObject { public: QGraphicsSystemCursor(QPlatformScreen *); @@ -79,8 +87,7 @@ protected: QPlatformScreen* screen; // Where to request an update private: - static QList<QWeakPointer<QGraphicsSystemCursor> > getInstances() { return instances; } - static QList<QWeakPointer<QGraphicsSystemCursor> > instances; + Q_DECLARE_PRIVATE(QGraphicsSystemCursor); friend void qt_lite_set_cursor(QWidget * w, bool force); friend class QApplicationPrivate; }; |