From f8f862a14a7e11dbc0cb3b58493252cdb47324b1 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Thu, 23 Jul 2020 01:01:35 +0300 Subject: [PATCH] Allow to set notifications for the progress bar Signed-off-by: Marius Vlad --- homescreen/src/applicationlauncher.h | 2 -- homescreen/src/homescreenhandler.cpp | 6 ++++-- homescreen/src/homescreenhandler.h | 4 +++- homescreen/src/main.cpp | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/homescreen/src/applicationlauncher.h b/homescreen/src/applicationlauncher.h index bd7656e..046ed52 100644 --- a/homescreen/src/applicationlauncher.h +++ b/homescreen/src/applicationlauncher.h @@ -41,8 +41,6 @@ signals: public slots: void setCurrent(const QString ¤t); - -private: void setLaunching(bool launching); private: diff --git a/homescreen/src/homescreenhandler.cpp b/homescreen/src/homescreenhandler.cpp index e13ba53..605505c 100644 --- a/homescreen/src/homescreenhandler.cpp +++ b/homescreen/src/homescreenhandler.cpp @@ -24,9 +24,10 @@ void* HomescreenHandler::myThis = 0; -HomescreenHandler::HomescreenHandler(Shell *_aglShell, QObject *parent) : +HomescreenHandler::HomescreenHandler(Shell *_aglShell, ApplicationLauncher *_launcher, QObject *parent) : QObject(parent), - aglShell(_aglShell) + aglShell(_aglShell), + launcher(_launcher) { } @@ -96,6 +97,7 @@ void HomescreenHandler::tapShortcut(QString application_id) { HMI_DEBUG("HomeScreen","tapShortcut %s", application_id.toStdString().c_str()); mp_hs->showWindow(application_id.toStdString().c_str(), nullptr); + launcher->setLaunching(true); // this works (and it is redundant the first time), due to the default // policy engine installed which actives the application, when starting diff --git a/homescreen/src/homescreenhandler.h b/homescreen/src/homescreenhandler.h index 3d939ce..c99d0b5 100644 --- a/homescreen/src/homescreenhandler.h +++ b/homescreen/src/homescreenhandler.h @@ -22,6 +22,7 @@ #include #include "shell.h" +#include "applicationlauncher.h" #include using namespace std; @@ -30,7 +31,7 @@ class HomescreenHandler : public QObject { Q_OBJECT public: - explicit HomescreenHandler(Shell *aglShell, QObject *parent = 0); + explicit HomescreenHandler(Shell *aglShell, ApplicationLauncher *launcher, QObject *parent = 0); ~HomescreenHandler(); void init(int port, const char* token); @@ -50,6 +51,7 @@ signals: private: LibHomeScreen *mp_hs; Shell *aglShell; + ApplicationLauncher *launcher; }; #endif // HOMESCREENHANDLER_H diff --git a/homescreen/src/main.cpp b/homescreen/src/main.cpp index 15ce5c7..a82921e 100644 --- a/homescreen/src/main.cpp +++ b/homescreen/src/main.cpp @@ -299,7 +299,7 @@ int main(int argc, char *argv[]) QLatin1String("SpeechChromeController is uncreatable.")); - HomescreenHandler* homescreenHandler = new HomescreenHandler(aglShell); + HomescreenHandler* homescreenHandler = new HomescreenHandler(aglShell, launcher); homescreenHandler->init(port, token.toStdString().c_str()); QUrl bindingAddress; -- 2.16.6