| 17 | Q_DECLARE_METATYPE(Room*) |
| 18 | |
| 19 | int main(int argc, char* argv[]) { |
| 20 | QGuiApplication app(argc,argv); |
| 21 | app.setOrganizationName("David A Roberts"); |
| 22 | app.setOrganizationDomain("davidar.io"); |
| 23 | app.setApplicationName("Tensor"); |
| 24 | QQuickView view; |
| 25 | if(qgetenv("QT_QUICK_CORE_PROFILE").toInt()) { |
| 26 | QSurfaceFormat f = view.format(); |
| 27 | f.setProfile(QSurfaceFormat::CoreProfile); |
| 28 | f.setVersion(4, 4); |
| 29 | view.setFormat(f); |
| 30 | } |
| 31 | view.connect(view.engine(), SIGNAL(quit()), &app, SLOT(quit())); |
| 32 | new QQmlFileSelector(view.engine(), &view); |
| 33 | |
| 34 | qmlRegisterType<SyncJob>(); qRegisterMetaType<SyncJob*> ("SyncJob*"); |
| 35 | qmlRegisterType<Room>(); qRegisterMetaType<Room*> ("Room*"); |
| 36 | qmlRegisterType<User>(); qRegisterMetaType<Room*> ("User*"); |
| 37 | |
| 38 | qmlRegisterType<Connection> ("Matrix", 1, 0, "Connection"); |
| 39 | qmlRegisterType<MessageEventModel> ("Matrix", 1, 0, "MessageEventModel"); |
| 40 | qmlRegisterType<RoomListModel> ("Matrix", 1, 0, "RoomListModel"); |
| 41 | qmlRegisterType<Settings> ("Matrix", 1, 0, "Settings"); |
| 42 | |
| 43 | view.setSource(QUrl("qrc:/qml/Tensor.qml")); |
| 44 | view.setResizeMode(QQuickView::SizeRootObjectToView); |
| 45 | if(QGuiApplication::platformName() == QLatin1String("qnx") || |
| 46 | QGuiApplication::platformName() == QLatin1String("eglfs")) { |
| 47 | view.showFullScreen(); |
| 48 | } else { |
| 49 | view.show(); |
| 50 | } |
| 51 | return app.exec(); |
| 52 | } |
| 53 |
nothing calls this directly
no outgoing calls
no test coverage detected