tools/designer/src/lib/shared/iconloader.cpp
changeset 7 f7bc934e204c
parent 0 1918ee327afb
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the Qt Designer of the Qt Toolkit.
     7 ** This file is part of the Qt Designer of the Qt Toolkit.
     8 **
     8 **
    58 #else
    58 #else
    59         << (QString::fromUtf8(":/trolltech/formeditor/images/win/") + name)
    59         << (QString::fromUtf8(":/trolltech/formeditor/images/win/") + name)
    60 #endif
    60 #endif
    61         << (QString::fromUtf8(":/trolltech/formeditor/images/designer_") + name);
    61         << (QString::fromUtf8(":/trolltech/formeditor/images/designer_") + name);
    62 
    62 
    63     foreach (QString f, candidates) {
    63     foreach (const QString &f, candidates) {
    64         if (QFile::exists(f))
    64         if (QFile::exists(f))
    65             return QIcon(f);
    65             return QIcon(f);
    66     }
    66     }
    67 
    67 
    68     return QIcon();
    68     return QIcon();
    69 }
    69 }
    70 
    70 
    71 QDESIGNER_SHARED_EXPORT QIcon emptyIcon()
    71 QDESIGNER_SHARED_EXPORT QIcon emptyIcon()
    72 {
    72 {
    73     static const QIcon empty_icon(QLatin1String(":/trolltech/formeditor/images/emptyicon.png"));
    73     return QIcon(QLatin1String(":/trolltech/formeditor/images/emptyicon.png"));
    74     return  empty_icon;
       
    75 }
    74 }
    76 
    75 
    77 } // namespace qdesigner_internal
    76 } // namespace qdesigner_internal
    78 
    77 
    79 QT_END_NAMESPACE
    78 QT_END_NAMESPACE