~saviq/unity-api/add-shell-notifications-api

« back to all changes in this revision

Viewing changes to test/mocks/plugins/Unity/Notifications/Mocks/MockSource.cpp

  • Committer: Michał Sawicz
  • Date: 2013-05-14 08:12:15 UTC
  • Revision ID: michal.sawicz@canonical.com-20130514081215-pgk4hui2gaqdgjic
fix c++ and naming style

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
 
21
 
#include <Mocks/mocksource.h>
22
 
 
23
 
#include <Mocks/mockmodel.h>
24
 
#include <Mocks/mocknotification.h>
25
 
 
26
 
#include <unity/shell/notifications/notification.h>
 
21
#include <Mocks/MockSource.h>
 
22
#include <Mocks/MockModel.h>
 
23
#include <Mocks/MockNotification.h>
 
24
 
 
25
#include <unity/shell/notifications/NotificationInterface.h>
27
26
 
28
27
using namespace unity::shell::notifications;
29
28
 
43
42
MockSource::setModel(ModelInterface* model)
44
43
{
45
44
    MockModel* mockModel = qobject_cast<MockModel*>(model);
46
 
    if (m_model != mockModel) {
 
45
    if (m_model != mockModel)
 
46
    {
47
47
        m_model = mockModel;
48
48
        Q_EMIT modelChanged(m_model);
49
49
    }
57
57
 
58
58
    connect(notification, SIGNAL(completed()), SLOT(onCompleted()));
59
59
 
60
 
    if(m_model) {
 
60
    if(m_model)
 
61
    {
61
62
        m_model->add(notification);
62
63
    }
63
64
}