~zsombi/ubuntu-ui-toolkit/75-listitem-highlight

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/plugin/ucthemesettings.cpp

Do the default theme check properly: for non-debug and without build errors.

Approved by PS Jenkins bot, Zsombor Egri.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include "ucthemesettings.h"
 
21
#include "uctheme.h"
21
22
 
 
23
#include <QDebug>
22
24
#include <QtCore/QDir>
23
25
#include <QtCore/QFile>
24
26
#include <QtCore/QStandardPaths>
36
38
    QObject(parent),
37
39
    m_settings(SETTINGS_FILE_FORMAT.arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)), QSettings::IniFormat)
38
40
{
39
 
    // fundamental features rely on the default theme, so abort if it's absent
40
 
    Q_ASSERT (QFile(pathFromThemeName(DEFAULT_THEME)).exists());
 
41
    // fundamental features rely on the default theme, so bail out if it's absent
 
42
    if (UCTheme::pathFromThemeName(DEFAULT_THEME).isEmpty()) {
 
43
        qWarning() << "Mandatory default theme" << DEFAULT_THEME << "missing!";
 
44
    }
41
45
 
42
46
    // check if there is a theme settings file, if not, create one
43
47
    if (!QFile::exists(m_settings.fileName())) {