diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-06-07 13:16:10 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-06-07 13:16:10 +0900 |
commit | a82665401213feacaa6950589707c7e29f783e49 (patch) | |
tree | 54eb2c02118d0593d85e0f53094a7bf0adfebd60 | |
parent | a275b5b155f281044241a2284824b5a4787c3de4 (diff) |
change hs to qhssandbox/zheng_wenlong/als2019
-rw-r--r-- | app/app.pri | 9 | ||||
-rw-r--r-- | app/app.pro | 2 | ||||
-rw-r--r-- | app/config.tests/libhomescreen/libhomescreen.cpp | 8 | ||||
-rw-r--r-- | app/config.tests/libhomescreen/libhomescreen.pro | 5 | ||||
-rw-r--r-- | app/main.cpp | 12 |
5 files changed, 7 insertions, 29 deletions
diff --git a/app/app.pri b/app/app.pri index 7a60d44..d7380bb 100644 --- a/app/app.pri +++ b/app/app.pri @@ -1,15 +1,6 @@ TEMPLATE = app QMAKE_LFLAGS += "-Wl,--hash-style=gnu -Wl,--as-needed" -load(configure) -qtCompileTest(libhomescreen) - -config_libhomescreen { - CONFIG += link_pkgconfig - PKGCONFIG += homescreen - DEFINES += HAVE_LIBHOMESCREEN -} - DESTDIR = $${OUT_PWD}/../package/root/bin copy_ringtone.target = $$DESTDIR/Phone.wav diff --git a/app/app.pro b/app/app.pro index 2a6a48b..0cfe763 100644 --- a/app/app.pro +++ b/app/app.pro @@ -5,7 +5,7 @@ SOURCES = main.cpp phone.cpp fileplayer.cpp HEADERS = phone.h numbertype.h fileplayer.h CONFIG += link_pkgconfig -PKGCONFIG += libhomescreen qlibwindowmanager qtappfw libafbwsc gstreamer-1.0 +PKGCONFIG += qlibhomescreen qlibwindowmanager qtappfw libafbwsc gstreamer-1.0 RESOURCES += \ phone.qrc \ diff --git a/app/config.tests/libhomescreen/libhomescreen.cpp b/app/config.tests/libhomescreen/libhomescreen.cpp deleted file mode 100644 index d698b05..0000000 --- a/app/config.tests/libhomescreen/libhomescreen.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include <libhomescreen.hpp> - -int main(int argc,char **argv) -{ - LibHomeScreen libHomeScreen; - return 0; -} - diff --git a/app/config.tests/libhomescreen/libhomescreen.pro b/app/config.tests/libhomescreen/libhomescreen.pro deleted file mode 100644 index eb4e8f3..0000000 --- a/app/config.tests/libhomescreen/libhomescreen.pro +++ /dev/null @@ -1,5 +0,0 @@ -SOURCES = libhomescreen.cpp - -CONFIG -= qt -CONFIG += link_pkgconfig -PKGCONFIG += homescreen diff --git a/app/main.cpp b/app/main.cpp index 95de315..f6459a8 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -23,7 +23,7 @@ #include <QtQml/QQmlContext> #include <QtQuickControls2/QQuickStyle> #include <QQuickWindow> -#include <libhomescreen.hpp> +#include <qlibhomescreen.h> #include <qlibwindowmanager.h> #include <pbap.h> @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) context->setContextProperty("phone", phone); QObject::connect(telephony, &Telephony::callStateChanged, phone, &Phone::onCallStateChanged); context->setContextProperty("pbap", new Pbap(bindingAddress, context)); - LibHomeScreen* hs = new LibHomeScreen(); + QLibHomeScreen* qhs = new QLibHomeScreen(); QLibWindowmanager* qwm = new QLibWindowmanager(); // WindowManager @@ -92,9 +92,9 @@ int main(int argc, char *argv[]) }); // HomeScreen - hs->init(port, token.c_str()); + qhs->init(port, token.c_str()); // Set the event handler for Event_ShowWindow which will activate the surface for windowmanager - hs->set_event_handler(LibHomeScreen::Event_ShowWindow, [qwm, &graphic_role](json_object *object){ + qhs->set_event_handler(QLibHomeScreen::Event_ShowWindow, [qwm, &graphic_role](json_object *object){ qDebug("Surface %s got showWindow\n", graphic_role.toStdString().c_str()); qwm->activateWindow(graphic_role); }); @@ -105,8 +105,8 @@ int main(int argc, char *argv[]) engine.load(QUrl(QStringLiteral("qrc:/Phone.qml"))); QObject *root = engine.rootObjects().first(); QQuickWindow *window = qobject_cast<QQuickWindow *>(root); - QObject::connect(window, SIGNAL(frameSwapped()), qwm, SLOT(slotActivateWindow() - )); + // QObject::connect(window, SIGNAL(frameSwapped()), qwm, SLOT(slotActivateWindow())); + qhs->setQuickWindow(window); } return app.exec(); } |