summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/app.pri9
-rw-r--r--app/app.pro2
-rw-r--r--app/config.tests/libhomescreen.cpp7
-rw-r--r--app/config.tests/libhomescreen.pro5
-rw-r--r--app/main.cpp12
5 files changed, 7 insertions, 28 deletions
diff --git a/app/app.pri b/app/app.pri
index c3b1fd1..399d71f 100644
--- a/app/app.pri
+++ b/app/app.pri
@@ -1,13 +1,4 @@
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
diff --git a/app/app.pro b/app/app.pro
index 07da5c5..be26ddf 100644
--- a/app/app.pro
+++ b/app/app.pro
@@ -4,7 +4,7 @@ QT = quickcontrols2 websockets
SOURCES = main.cpp
CONFIG += link_pkgconfig
-PKGCONFIG += libhomescreen qlibwindowmanager qtappfw
+PKGCONFIG += qlibhomescreen qlibwindowmanager qtappfw
RESOURCES += \
mediaplayer.qrc \
diff --git a/app/config.tests/libhomescreen.cpp b/app/config.tests/libhomescreen.cpp
deleted file mode 100644
index e0fd460..0000000
--- a/app/config.tests/libhomescreen.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <libhomescreen.hpp>
-
-int main(int argc,char **argv)
-{
- LibHomeScreen libHomeScreen;
- return 0;
-}
diff --git a/app/config.tests/libhomescreen.pro b/app/config.tests/libhomescreen.pro
deleted file mode 100644
index eb4e8f3..0000000
--- a/app/config.tests/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 c5527a8..083b316 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -26,7 +26,7 @@
#include <QtQml/qqml.h>
#include <QtQuickControls2/QQuickStyle>
#include <QQuickWindow>
-#include <libhomescreen.hpp>
+#include <qlibhomescreen.h>
#include <qlibwindowmanager.h>
#include <mediaplayer.h>
@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
bindingAddress.setQuery(query);
context->setContextProperty(QStringLiteral("bindingAddress"), bindingAddress);
std::string token = secret.toStdString();
- LibHomeScreen* hs = new LibHomeScreen();
+ QLibHomeScreen* qhs = new QLibHomeScreen();
QLibWindowmanager* qwm = new QLibWindowmanager();
// WindowManager
@@ -83,9 +83,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);
});
@@ -96,8 +96,8 @@ int main(int argc, char *argv[])
engine.load(QUrl(QStringLiteral("qrc:/MediaPlayer.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();
}