diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2020-07-23 01:01:35 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2020-07-23 13:38:32 +0300 |
commit | f8f862a14a7e11dbc0cb3b58493252cdb47324b1 (patch) | |
tree | ac35f689eed1851f738958381fc82836c899212d | |
parent | df842ba98932cea257995b903e6281eeebe33d91 (diff) |
Allow to set notifications for the progress barsandbox/mvlad/tests-send-events-for-applauncher
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-rw-r--r-- | homescreen/src/applicationlauncher.h | 2 | ||||
-rw-r--r-- | homescreen/src/homescreenhandler.cpp | 6 | ||||
-rw-r--r-- | homescreen/src/homescreenhandler.h | 4 | ||||
-rw-r--r-- | 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 <libhomescreen.hpp> #include "shell.h" +#include "applicationlauncher.h" #include <string> 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; |