diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-03-03 01:06:02 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-03-03 01:06:02 (GMT) |
commit | 4c0b6e0d0a5303861098f653e1c8e8823480ac82 (patch) | |
tree | 2529081b4f2d4e20f69bbb77435712db31765bb1 /src/gui/kernel/qcursor_mac.mm | |
parent | c131c4d922bd381b44164673085fb83547375fd0 (diff) | |
parent | c9e07d69ec084a75fc083baecd46d0b8b422d1c4 (diff) | |
download | Qt-4c0b6e0d0a5303861098f653e1c8e8823480ac82.zip Qt-4c0b6e0d0a5303861098f653e1c8e8823480ac82.tar.gz Qt-4c0b6e0d0a5303861098f653e1c8e8823480ac82.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/gui/kernel/qcursor_mac.mm')
-rw-r--r-- | src/gui/kernel/qcursor_mac.mm | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/src/gui/kernel/qcursor_mac.mm b/src/gui/kernel/qcursor_mac.mm index cfebf60..03e38b0 100644 --- a/src/gui/kernel/qcursor_mac.mm +++ b/src/gui/kernel/qcursor_mac.mm @@ -114,27 +114,18 @@ void qt_mac_set_cursor(const QCursor *c, const QPoint &) } c->handle(); //force the cursor to get loaded, if it's not - if(1 || currentCursor != c->d) { - if(currentCursor && currentCursor->type == QCursorData::TYPE_ThemeCursor - && currentCursor->curs.tc.anim) - currentCursor->curs.tc.anim->stop(); - QMacCocoaAutoReleasePool pool; - if(c->d->type == QCursorData::TYPE_ImageCursor) { - [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set]; - } else if(c->d->type == QCursorData::TYPE_ThemeCursor) { -#ifdef QT_MAC_USE_COCOA - if (c->d->curs.cp.nscursor == 0) - [[NSCursor arrowCursor] set]; - [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set]; -#else - if(SetAnimatedThemeCursor(c->d->curs.tc.curs, 0) == themeBadCursorIndexErr) { - SetThemeCursor(c->d->curs.tc.curs); - } else { - if(!c->d->curs.tc.anim) - c->d->curs.tc.anim = new QMacAnimateCursor; - c->d->curs.tc.anim->start(c->d->curs.tc.curs); - } -#endif + if(currentCursor && currentCursor->type == QCursorData::TYPE_ThemeCursor + && currentCursor->curs.tc.anim) + currentCursor->curs.tc.anim->stop(); + if(c->d->type == QCursorData::TYPE_ImageCursor) { + [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set]; + } else if(c->d->type == QCursorData::TYPE_ThemeCursor) { + if(SetAnimatedThemeCursor(c->d->curs.tc.curs, 0) == themeBadCursorIndexErr) { + SetThemeCursor(c->d->curs.tc.curs); + } else { + if(!c->d->curs.tc.anim) + c->d->curs.tc.anim = new QMacAnimateCursor; + c->d->curs.tc.anim->start(c->d->curs.tc.curs); } } currentCursor = c->d; |