2017-06-01 17:13:51 +03:00
|
|
|
#ifdef QT_QML_DEBUG
|
|
|
|
#include <QtQuick>
|
|
|
|
#endif
|
|
|
|
|
2017-07-06 17:15:12 +03:00
|
|
|
|
2017-06-01 17:13:51 +03:00
|
|
|
#include <sailfishapp.h>
|
2017-10-13 15:56:50 +03:00
|
|
|
#include <QQuickView>
|
|
|
|
#include <QtQml>
|
|
|
|
#include <QtGui/QGuiApplication>
|
2017-07-06 01:59:00 +03:00
|
|
|
#include "imageuploader.h"
|
2017-10-25 01:37:33 +03:00
|
|
|
#include "dbus.h"
|
2017-06-01 17:13:51 +03:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2017-07-06 01:59:00 +03:00
|
|
|
QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));
|
|
|
|
QScopedPointer<QQuickView> view(SailfishApp::createView());
|
2017-07-06 17:15:12 +03:00
|
|
|
//QQmlContext *context = view.data()->rootContext();
|
2017-07-06 01:59:00 +03:00
|
|
|
|
|
|
|
qmlRegisterType<ImageUploader>("harbour.tooter.Uploader", 1, 0, "ImageUploader");
|
|
|
|
|
|
|
|
QQmlEngine* engine = view->engine();
|
|
|
|
QObject::connect(engine, SIGNAL(quit()), app.data(), SLOT(quit()));
|
2017-06-01 17:13:51 +03:00
|
|
|
|
2017-10-25 01:37:33 +03:00
|
|
|
Dbus *dbus = new Dbus();
|
|
|
|
view->rootContext()->setContextProperty("Dbus", dbus);
|
|
|
|
|
2017-07-06 01:59:00 +03:00
|
|
|
view->setSource(SailfishApp::pathTo("qml/harbour-tooter.qml"));
|
|
|
|
view->show();
|
|
|
|
return app->exec();
|
2017-06-01 17:13:51 +03:00
|
|
|
}
|