Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/image/qpixmap.cpp

    r651 r769  
    832832        return true;
    833833
    834     bool ok;
    835 
    836     if (data) {
    837         ok = data->fromFile(fileName, format, flags);
    838     } else {
    839         QScopedPointer<QPixmapData> tmp(QPixmapData::create(0, 0, QPixmapData::PixmapType));
    840         ok = tmp->fromFile(fileName, format, flags);
    841         if (ok)
    842             data = tmp.take();
    843     }
    844 
    845     if (ok)
     834    QScopedPointer<QPixmapData> tmp(QPixmapData::create(0, 0, data ? data->type : QPixmapData::PixmapType));
     835    if (tmp->fromFile(fileName, format, flags)) {
     836        data = tmp.take();
    846837        QPixmapCache::insert(key, *this);
    847 
    848     return ok;
     838        return true;
     839    }
     840
     841    return false;
    849842}
    850843
     
    16711664
    16721665    The hasAlphaChannel() returns true if the pixmap has a format that
    1673     respects the alpha channel, otherwise returns false, while the
    1674     hasAlpha() function returns true if the pixmap has an alpha
    1675     channel \e or a mask (otherwise false). The mask() function returns
    1676     the mask as a QBitmap object, which can be set using setMask().
     1666    respects the alpha channel, otherwise returns false. The hasAlpha(),
     1667    setMask() and mask() functions are legacy and should not be used.
     1668    They are potentially very slow.
    16771669
    16781670    The createHeuristicMask() function creates and returns a 1-bpp
     
    17601752    Returns true if this pixmap has an alpha channel, \e or has a
    17611753    mask, otherwise returns false.
     1754
     1755    \warning This is potentially an expensive operation.
    17621756
    17631757    \sa hasAlphaChannel(), mask()
     
    20282022    too. The mouse cursor is generally not grabbed.
    20292023
    2030     Note on X11that if the given \a window doesn't have the same depth
     2024    Note on X11 that if the given \a window doesn't have the same depth
    20312025    as the root window, and another window partially or entirely
    20322026    obscures the one you grab, you will \e not get pixels from the
     
    20342028    pixmap will be undefined and uninitialized.
    20352029
     2030    On Windows Vista and above grabbing a layered window, which is
     2031    created by setting the Qt::WA_TranslucentBackground attribute, will
     2032    not work. Instead grabbing the desktop widget should work.
     2033
    20362034    \warning In general, grabbing an area outside the screen is not
    20372035    safe. This depends on the underlying window system.
Note: See TracChangeset for help on using the changeset viewer.