~mterry/+junk/u8

« back to all changes in this revision

Viewing changes to src/Panel/Indicators/client/indicatorsclient.cpp

  • Committer: Lukáš Tinkl
  • Date: 2016-10-27 00:05:28 UTC
  • mto: This revision was merged to the branch mainline in revision 2693.
  • Revision ID: lukas.tinkl@canonical.com-20161027000528-ivpsjeki22brx8tn
load the Qt catalog to get the RTL value

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright 2013 Canonical Ltd.
 
2
 * Copyright 2013-2016 Canonical Ltd.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU Lesser General Public License as published by
26
26
#include <QQmlContext>
27
27
#include <QQmlEngine>
28
28
#include <QDebug>
 
29
#include <QTranslator>
 
30
#include <QLibraryInfo>
 
31
#include <QLocale>
29
32
 
30
33
IndicatorsClient::IndicatorsClient(int &argc, char **argv)
31
34
    : QObject(0),
33
36
{
34
37
    m_application = new QApplication(argc, argv);
35
38
 
 
39
    QTranslator qtTranslator;
 
40
    if (qtTranslator.load(QLocale(), QStringLiteral("qt_"), qgetenv("SNAP"), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
 
41
        m_application->installTranslator(&qtTranslator);
 
42
    }
 
43
 
36
44
    QStringList args = m_application->arguments();
37
45
 
38
46
    m_view = new QQuickView;
53
61
        if (geometryArg.size() == 2) {
54
62
            m_view->resize(geometryArg.at(0).toInt(), geometryArg.at(1).toInt());
55
63
        }
56
 
    }
57
 
    else {
 
64
    } else {
58
65
        //Usable size on desktop
59
66
        m_view->setMinimumSize(QSize(480, 720));
60
67
    }
69
76
    delete m_application;
70
77
}
71
78
 
72
 
void IndicatorsClient::setupUI()
73
 
{
74
 
 
75
 
}
76
 
 
77
79
int IndicatorsClient::run()
78
80
{
79
81
    m_view->show();