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

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/plugin/ucapplication.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:
38
38
public:
39
39
    static UCApplication *instance(QObject *parent = Q_NULLPTR) {
40
40
        if (!m_app) {
41
 
            Q_ASSERT(parent);
 
41
            if (!parent) {
 
42
                qFatal("Creating UbuntuApplication singleton requires a parent object!");
 
43
            }
42
44
            m_app = new UCApplication(parent);
43
45
        }
44
46
        return m_app;