Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 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/image/qbmphandler.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    247247    if (depth != 32) {
    248248        ncols = bi.biClrUsed ? bi.biClrUsed : 1 << nbits;
     249        if (ncols > 256) // sanity check - don't run out of mem if color table is broken
     250            return false;
    249251        image.setColorCount(ncols);
    250252    }
     
    675677bool QBmpHandler::canRead() const
    676678{
    677     if (state == Ready) {
    678         if (!canRead(device()))
    679             return false;
     679    if (state == Ready && !canRead(device()))
     680        return false;
     681
     682    if (state != Error) {
    680683        setFormat("bmp");
    681684        return true;
    682685    }
    683     return state != Error;
     686
     687    return false;
    684688}
    685689
Note: See TracChangeset for help on using the changeset viewer.