summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
authorMatt Porter <mporter@konsulko.com>2017-11-09 15:55:44 -0500
committerMatt Porter <mporter@konsulko.com>2017-11-09 16:00:56 -0500
commit202a1402f1e59c73e631ef9495c22fee30bafac2 (patch)
treeba505a8ebf7c0a18f6371df5d09f17b99084cb68 /app/main.cpp
parentf9cbfb636f6dce351f26e6b86dcb0080a32cd18d (diff)
Move ringtone logic from QML to Phone class
Adds a Phone class that implements ringtone logic. This allows for the ringtone to be started/stopped even if the phone app is not visible (QML render thread not executing) and the QML implementation can be removed. Bug-AGL: SPEC-1081 Change-Id: I7d0dd5f167ce1f53477d6c9d8053111996033e4c Signed-off-by: Matt Porter <mporter@konsulko.com>
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/main.cpp b/app/main.cpp
index c0f9d5f..e2eaf7c 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -28,6 +28,7 @@
#endif
#include <telephony.h>
+#include "phone.h"
int main(int argc, char *argv[])
{
@@ -68,6 +69,8 @@ int main(int argc, char *argv[])
context->setContextProperty(QStringLiteral("bindingAddress"), bindingAddress);
Telephony *telephony = new Telephony(bindingAddress);
context->setContextProperty("telephony", telephony);
+ Phone *phone = new Phone(telephony);
+ QObject::connect(telephony, &Telephony::callStateChanged, phone, &Phone::onCallStateChanged);
}
engine.load(QUrl(QStringLiteral("qrc:/Phone.qml")));