Code Review
/
apps
/
hvac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Update for app framework removal
[apps/hvac.git]
/
app
/
main.cpp
diff --git
a/app/main.cpp
b/app/main.cpp
index
b2133f7
..
c320ef8
100644
(file)
--- a/
app/main.cpp
+++ b/
app/main.cpp
@@
-14,33
+14,23
@@
* limitations under the License.
*/
* limitations under the License.
*/
-#include <Q
tCore/QDebug
>
-#include <Q
tGui/QGuiApplication
>
-#include <Q
tQml/QQmlApplicationEngine
>
-#include <
QtQuickControls2/QQuickStyle
>
+#include <Q
GuiApplication
>
+#include <Q
QmlApplicationEngine
>
+#include <Q
Debug
>
+#include <
hvac.h
>
-#ifdef HAVE_LIBHOMESCREEN
-#include <libhomescreen.hpp>
-#endif
+#include "translator.h"
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
-#ifdef HAVE_LIBHOMESCREEN
- LibHomeScreen libHomeScreen;
+ setenv("QT_QUICK_CONTROLS_STYLE", "AGL", 1);
- if (!libHomeScreen.renderAppToAreaAllowed(0, 1)) {
- qWarning() << "renderAppToAreaAllowed is denied";
- return -1;
- }
-#endif
+ QGuiApplication app(argc, argv);
- QGuiApplication app(argc, argv);
+ QQmlApplicationEngine engine;
+ engine.rootContext()->setContextProperty("hvac", new HVAC());
+ qmlRegisterType<Translator>("Translator", 1, 0, "Translator");
+ engine.load(QUrl(QStringLiteral("qrc:/HVAC.qml")));
- QQuickStyle::setStyle("AGL");
-
- QQmlApplicationEngine engine;
- engine.load(QUrl(QStringLiteral("qrc:/HVAC.qml")));
-
- return app.exec();
+ return app.exec();
}
}
-