Beispiel #1
0
// We lazily initialize the loader to make static icons
// work. Though we do not officially support this.
void QIconLoader::ensureInitialized()
{
    if (!m_initialized) {
        m_initialized = true;

        Q_ASSERT(qApp);

        m_systemTheme = qt_guiPlatformPlugin()->systemIconThemeName();
        if (m_systemTheme.isEmpty())
            m_systemTheme = fallbackTheme();
#ifndef QT_NO_LIBRARY
        QFactoryLoader iconFactoryLoader(QIconEngineFactoryInterfaceV2_iid,
                                         QLatin1String("/iconengines"),
                                         Qt::CaseInsensitive);
        if (iconFactoryLoader.keys().contains(QLatin1String("svg")))
            m_supportsSvg = true;
#endif //QT_NO_LIBRARY
    }
}
Beispiel #2
0
void QIconLoader::ensureInitialized()
{
    if (!m_initialized) {
        m_initialized = true;

        Q_ASSERT(qApp);

        m_systemTheme = systemThemeName();

        if (m_systemTheme.isEmpty())
            m_systemTheme = fallbackTheme();
#ifndef QT_NO_LIBRARY
        QFactoryLoader iconFactoryLoader(QIconEngineFactoryInterface_iid,
                                         QLatin1String("/iconengines"),
                                         Qt::CaseInsensitive);
        if (iconFactoryLoader.keyMap().key(QLatin1String("svg"), -1) != -1)
            m_supportsSvg = true;
#endif //QT_NO_LIBRARY
    }
}