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/plugins/imageformats/svg/main.cpp

    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])
     
    6363QStringList QSvgPlugin::keys() const
    6464{
    65     return QStringList() << QLatin1String("svg");
     65    return QStringList() << QLatin1String("svg");
    6666}
    6767
    6868QImageIOPlugin::Capabilities QSvgPlugin::capabilities(QIODevice *device, const QByteArray &format) const
    6969{
    70     //### canRead disabled for now because it's hard to detect
    71     //    whether the file is actually svg without parsing it
    72     //if (device->isReadable() && QSvgIOHandler::canRead(device))
    73 
    74     if (format == "svg")
     70    if (format == "svg" || format == "svgz")
    7571        return Capabilities(CanRead);
    76     else
    77         return 0;
    78 
    79 
    80     if (!device->isOpen())
     72    if (!format.isEmpty())
    8173        return 0;
    8274
    8375    Capabilities cap;
    84     if (device->isReadable())
     76    if (device->isReadable())
    8577        cap |= CanRead;
    8678    return cap;
Note: See TracChangeset for help on using the changeset viewer.