Example #1
0
ThemeInfo::ThemeInfo(QString theme)
          :XMLParseBase()
{
    QString themeNoTrailingSlash = theme;
    if (themeNoTrailingSlash.endsWith('/'))
    {
        themeNoTrailingSlash.chop(1);
    }
    m_theme = QFileInfo(themeNoTrailingSlash);
    m_type = THEME_UNKN;
    m_baseres = QSize(800, 600);
    m_majorver = m_minorver = 0;

    if (m_theme.exists())
        // since all the usages have a / inserted, remove the one in the url
        m_themeurl = m_theme.absoluteFilePath();
    else
        m_themeurl = theme;

    // since all the usages have a / insterted, remove the one in the url
    if (m_themeurl.endsWith('/'))
    {
        m_themeurl.chop(1);
    }

    if (!parseThemeInfo())
    {
        LOG(VB_GENERAL, LOG_ERR, LOC +
            QString("The theme (%1) is missing a themeinfo.xml file.")
                .arg(m_themeurl));
    }
}
Example #2
0
ThemeInfo::ThemeInfo(QString theme)
          :XMLParseBase()
{
    m_theme = QFileInfo(theme);
    m_type = THEME_UNKN;
    m_baseres = QSize(800, 600);
    m_majorver = m_minorver = 0;

    if (m_theme.exists())
        m_themeurl = m_theme.absoluteFilePath();
    else
        m_themeurl = theme;

    if (!parseThemeInfo())
    {
        VERBOSE(VB_IMPORTANT, LOC_ERR +
                QString("The theme (%1) is missing a themeinfo.xml file.")
                .arg(m_themeurl));
    }
}