~uriboni/messaging-app/stickers

« back to all changes in this revision

Viewing changes to src/messagingapplication.cpp

  • Committer: Ugo Riboni
  • Date: 2015-11-12 10:54:17 UTC
  • Revision ID: ugo.riboni@canonical.com-20151112105417-8rkggqadk1jqb61u
Initial implementation of stickers picker support

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <QUrl>
25
25
#include <QUrlQuery>
26
26
#include <QDebug>
 
27
#include <QDir>
27
28
#include <QStringList>
28
29
#include <QQuickItem>
29
30
#include <QQmlComponent>
36
37
#include "config.h"
37
38
#include <QQmlEngine>
38
39
#include <QMimeDatabase>
 
40
#include <QStandardPaths>
39
41
#include <QVersitReader>
40
42
 
41
43
using namespace QtVersit;
149
151
        m_view->rootContext()->setContextProperty("QTCONTACTS_MANAGER_OVERRIDE", contactsBackend);
150
152
    }
151
153
 
 
154
    QDir dataLocation(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
 
155
    m_view->rootContext()->setContextProperty("dataLocation", dataLocation.absolutePath());
 
156
    dataLocation.mkpath("stickers");
 
157
 
152
158
    // used by autopilot tests to load vcards during tests
153
159
    QByteArray testData = qgetenv("QTCONTACTS_PRELOAD_VCARD");
154
160
    m_view->rootContext()->setContextProperty("QTCONTACTS_PRELOAD_VCARD", testData);