~bzoltan/ubuntu-ui-toolkit/click-uitk

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/plugin/ucfontutils.h

  • Committer: Tarmac
  • Author(s): Zsombor Egri
  • Date: 2016-02-10 17:06:56 UTC
  • mfrom: (1839.1.9 moreSingletonFix)
  • Revision ID: tarmac-20160210170656-2lj99aowlhk3bdhv
Get singletons report fatal error in case the parent is null upon first creation. Adjust failing test cases. Fixes: https://bugs.launchpad.net/bugs/1542309.

Approved by ubuntu-sdk-build-bot, Christian Dywan.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    static UCFontUtils *instance(QObject *parent = Q_NULLPTR)
38
38
    {
39
39
        if (!m_instance) {
40
 
            Q_ASSERT(parent);
 
40
            if (!parent) {
 
41
                qFatal("Creating FontUtils singleton requires a parent object!");
 
42
            }
41
43
            m_instance = new UCFontUtils(parent);
42
44
        }
43
45
        return m_instance;