Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/qcursor_mac.mm

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    115115    c->handle(); //force the cursor to get loaded, if it's not
    116116
    117     if(1 || currentCursor != c->d) {
    118         if(currentCursor && currentCursor->type == QCursorData::TYPE_ThemeCursor
    119                 && currentCursor->curs.tc.anim)
    120             currentCursor->curs.tc.anim->stop();
    121         QMacCocoaAutoReleasePool pool;
    122         if(c->d->type == QCursorData::TYPE_ImageCursor) {
    123             [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set];
    124         } else if(c->d->type == QCursorData::TYPE_ThemeCursor) {
    125 #ifdef QT_MAC_USE_COCOA
    126             if (c->d->curs.cp.nscursor == 0)
    127                 [[NSCursor arrowCursor] set];
    128             [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set];
    129 #else
    130             if(SetAnimatedThemeCursor(c->d->curs.tc.curs, 0) == themeBadCursorIndexErr) {
    131                 SetThemeCursor(c->d->curs.tc.curs);
    132             } else {
    133                 if(!c->d->curs.tc.anim)
    134                     c->d->curs.tc.anim = new QMacAnimateCursor;
    135                 c->d->curs.tc.anim->start(c->d->curs.tc.curs);
    136             }
    137 #endif
     117    if(currentCursor && currentCursor->type == QCursorData::TYPE_ThemeCursor
     118            && currentCursor->curs.tc.anim)
     119        currentCursor->curs.tc.anim->stop();
     120    if(c->d->type == QCursorData::TYPE_ImageCursor) {
     121        [static_cast<NSCursor *>(c->d->curs.cp.nscursor) set];
     122    } else if(c->d->type == QCursorData::TYPE_ThemeCursor) {
     123        if(SetAnimatedThemeCursor(c->d->curs.tc.curs, 0) == themeBadCursorIndexErr) {
     124            SetThemeCursor(c->d->curs.tc.curs);
     125        } else {
     126            if(!c->d->curs.tc.anim)
     127                c->d->curs.tc.anim = new QMacAnimateCursor;
     128            c->d->curs.tc.anim->start(c->d->curs.tc.curs);
    138129        }
    139130    }
     
    234225void QCursor::setPos(int x, int y)
    235226{
     227
     228
     229
     230
     231
     232
     233
     234
     235
    236236    CGWarpMouseCursorPosition(CGPointMake(x, y));
    237237
     
    250250        qt_sendSpontaneousEvent(widget, &me);
    251251    }
     252
    252253}
    253254
     
    425426        curs.cp.nscursor = [NSCursor closedHandCursor];
    426427        break;
     428
     429
     430
     431
     432
     433
     434
     435
     436
     437
     438
     439
    427440#define QT_USE_APPROXIMATE_CURSORS
    428441#ifdef QT_USE_APPROXIMATE_CURSORS
     
    520533        curs.tc.curs = kThemeClosedHandCursor;
    521534        break;
     535
     536
     537
     538
     539
     540
     541
     542
     543
     544
     545
     546
    522547#define QT_USE_APPROXIMATE_CURSORS
    523548#ifdef QT_USE_APPROXIMATE_CURSORS
Note: See TracChangeset for help on using the changeset viewer.