~renatofilho/address-book-app/new-designer-contact-list

« back to all changes in this revision

Viewing changes to src/app/addressbookapp.cpp

  • Committer: Renato Araujo Oliveira Filho
  • Date: 2014-06-17 00:41:33 UTC
  • mfrom: (169.9.9 staging)
  • Revision ID: renato.filho@canonical.com-20140617004133-m4lm6hbiiyd1zx0w
Staging merged.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include "config.h"
18
18
#include "addressbookapp.h"
19
19
#include "imagescalethread.h"
20
 
#include "contentcommunicator.h"
21
20
 
22
21
#include <QDir>
23
22
#include <QUrl>
94
93
AddressBookApp::AddressBookApp(int &argc, char **argv)
95
94
    : QGuiApplication(argc, argv),
96
95
      m_view(0),
97
 
      m_contentComm(0),
98
96
      m_syncMonitor(0),
99
97
      m_pickingMode(false),
100
98
      m_testMode(false),
151
149
            qCritical("Library qttestability load failed!");
152
150
        }
153
151
        m_testMode = true;
154
 
    } else {
155
 
        m_contentComm = new ContentCommunicator(this);
156
152
    }
157
 
 
158
153
    /* Ubuntu APP Manager gathers info on the list of running applications from the .desktop
159
154
       file specified on the command line with the desktop_file_hint switch, and will also pass a stage hint
160
155
       So app will be launched like this:
186
181
    m_view->setTitle("AddressBook");
187
182
    m_view->engine()->addImportPath(QCoreApplication::applicationDirPath() + "/" + importPath(""));
188
183
    m_view->rootContext()->setContextProperty("QTCONTACTS_MANAGER_OVERRIDE", defaultManager);
189
 
    m_view->rootContext()->setContextProperty("contactContentHub", m_contentComm);
190
184
    m_view->rootContext()->setContextProperty("application", this);
191
185
    m_view->rootContext()->setContextProperty("contactKey", contactKey);
192
186
    m_view->rootContext()->setContextProperty("TEST_DATA", testData);
220
214
    if (m_view) {
221
215
        delete m_view;
222
216
    }
223
 
 
224
 
    if (m_contentComm) {
225
 
        delete m_contentComm;
226
 
    }
227
217
}
228
218
 
229
219
void AddressBookApp::onViewStatusChanged(QQuickView::Status status)