X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=staging%2FHomeScreen.git;a=blobdiff_plain;f=HomeScreen%2Fsrc2%2Fapplicationlauncher.cpp;h=7011ebf7fb9445e4916e41bc6573d07b137dd8b6;hp=0ebc9b954c5ba57ad89a40b413a1960a6d208276;hb=c4242e92275d4309d3947ff28a7cd3b9f008d8c6;hpb=1ec9bfac42b0ddd9fb61449a1a8ecdd43b218185 diff --git a/HomeScreen/src2/applicationlauncher.cpp b/HomeScreen/src2/applicationlauncher.cpp index 0ebc9b9..7011ebf 100644 --- a/HomeScreen/src2/applicationlauncher.cpp +++ b/HomeScreen/src2/applicationlauncher.cpp @@ -43,5 +43,20 @@ int ApplicationLauncher::launch(const QString &application) result = mp_dBusAppFrameworkProxy->launchApp(application); qDebug() << "pid:" << result; + if (result > 1) { + setCurrent(application); + } return result; } + +QString ApplicationLauncher::current() const +{ + return m_current; +} + +void ApplicationLauncher::setCurrent(const QString ¤t) +{ + if (m_current == current) return; + m_current = current; + emit currentChanged(current); +}