qmlFrontend/themeiconprovider.cpp
branchqmlfrontend
changeset 11432 97e3e62ea5f9
parent 10440 b74a7bbe224e
equal deleted inserted replaced
11431:80a9b14bb8d3 11432:97e3e62ea5f9
    26     buf.resize(65536);
    26     buf.resize(65536);
    27 
    27 
    28     char * bufptr = buf.data();
    28     char * bufptr = buf.data();
    29     uint32_t fileSize = getThemeIcon(id.toUtf8().data(), bufptr, buf.size());
    29     uint32_t fileSize = getThemeIcon(id.toUtf8().data(), bufptr, buf.size());
    30     buf.truncate(fileSize);
    30     buf.truncate(fileSize);
    31     qDebug() << "ThemeIconProvider file size = " << fileSize;
    31     //qDebug() << "ThemeIconProvider file size = " << fileSize;
    32 
    32 
    33     QImage img = QImage::fromData(buf);
    33     QImage img = fileSize ? QImage::fromData(buf) : QImage(16, 16, QImage::Format_ARGB32);
    34 
    34 
    35     if (size)
    35     if (size)
    36         *size = img.size();
    36         *size = img.size();
    37     return img;
    37     return img;
    38 }
    38 }