~mzanetti/unity8/launcher_folded_quicklist

« back to all changes in this revision

Viewing changes to tests/mocks/Unity/Application/ApplicationInfo.cpp

  • Committer: CI Train Bot
  • Author(s): Michael Terry, Michał Sawicz
  • Date: 2015-12-08 15:36:23 UTC
  • mfrom: (2077.1.5 fix-wakelocks)
  • Revision ID: ci-train-bot@canonical.com-20151208153623-cqcksj1jnaiglcpn
Let qtmir know which apps are exempt from the lifecycle management.
This way, it can manage its own wakelocks better (and stop preventing the system from deep sleeping).

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    , m_rotatesWindowContents(false)
43
43
    , m_requestedState(RequestedRunning)
44
44
    , m_isTouchApp(true)
 
45
    , m_exemptFromLifecycle(false)
45
46
    , m_manualSurfaceCreation(false)
46
47
{
47
48
}
60
61
    , m_rotatesWindowContents(false)
61
62
    , m_requestedState(RequestedRunning)
62
63
    , m_isTouchApp(true)
 
64
    , m_exemptFromLifecycle(false)
63
65
    , m_manualSurfaceCreation(false)
64
66
{
65
67
}
263
265
        }
264
266
    }
265
267
}
 
268
 
 
269
bool ApplicationInfo::exemptFromLifecycle() const
 
270
{
 
271
    return m_exemptFromLifecycle;
 
272
}
 
273
 
 
274
void ApplicationInfo::setExemptFromLifecycle(bool exemptFromLifecycle)
 
275
{
 
276
    if (m_exemptFromLifecycle != exemptFromLifecycle)
 
277
    {
 
278
        m_exemptFromLifecycle = exemptFromLifecycle;
 
279
        Q_EMIT exemptFromLifecycleChanged(m_exemptFromLifecycle);
 
280
    }
 
281
}