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/openvg/qvgimagepool.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)
     
    155155    Q_UNUSED(height);
    156156
    157     if (data)
     157    bool succeeded = false;
     158    bool wasInLRU = false;
     159    if (data) {
     160        wasInLRU = data->inLRU;
    158161        moveToHeadOfLRU(data);
     162    }
    159163
    160164    QVGPixmapData *lrudata = pixmapLRU();
    161165    if (lrudata && lrudata != data) {
    162166        lrudata->reclaimImages();
    163         return true;
     167        succeeded = true;
    164168    }
    165169
    166     return false;
     170    if (data && !wasInLRU)
     171        removeFromLRU(data);
     172
     173    return succeeded;
    167174}
    168175
Note: See TracChangeset for help on using the changeset viewer.