libqofono: bump SRCREV and add a fix for voicecall

This fix is currently in discussion upstream for merge:
https://git.merproject.org/mer-core/libqofono/merge_requests/16

Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
This commit is contained in:
Christophe Chapuis
2019-10-27 18:30:49 +00:00
committed by Martin Jansa
parent cefb48e917
commit 653e12fdb5
2 changed files with 61 additions and 3 deletions

View File

@@ -0,0 +1,54 @@
From 05241dc61e8c43a12f91ee9976a2ecb2337a3eaf Mon Sep 17 00:00:00 2001
From: Christophe Chapuis <chris.chapuis@gmail.com>
Date: Sat, 13 Jul 2019 11:17:08 +0000
Subject: [PATCH] onGetModemsFinished: also emit modemRemoved and modemAdded
VoiceCall only subscribes to these events, so we need to emit these
more "atomic" events too.
Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
---
src/qofonomanager.cpp | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/qofonomanager.cpp b/src/qofonomanager.cpp
index deeb946..e94a3c7 100644
--- a/src/qofonomanager.cpp
+++ b/src/qofonomanager.cpp
@@ -40,15 +40,30 @@ void QOfonoManager::Private::handleGetModemsReply(QOfonoManager* obj, ObjectPath
{
bool wasAvailable = available;
QString prevDefault = defaultModem();
- QStringList newModems;
+ QStringList newModems, oldModems;
const int n = reply.count();
for (int i = 0; i < n; i++) {
newModems.append(reply.at(i).path.path());
}
qSort(newModems);
available = true;
- if (modems != newModems) {
- modems = newModems;
+ oldModems = modems;
+ modems = newModems;
+
+ // emit atomic events for add/remove
+ Q_FOREACH(QString modem, oldModems) {
+ if(!newModems.contains(modem)) {
+ Q_EMIT obj->modemRemoved(modem);
+ }
+ }
+ Q_FOREACH(QString modem, newModems) {
+ if(!oldModems.contains(modem)) {
+ Q_EMIT obj->modemAdded(modem);
+ }
+ }
+
+ // then update the whole list
+ if (oldModems != newModems) {
Q_EMIT obj->modemsChanged(modems);
}
QString newDefault = defaultModem();
--
2.23.0

View File

@@ -5,11 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
DEPENDS += "qtbase qtdeclarative qtxmlpatterns"
SRCREV = "6916cd030b05f0bd137ea9b669fee48f20c19084"
SRC_URI = "git://git.merproject.org/mer-core/libqofono.git"
SRCREV = "3581a6e85561da85858e1b90bef9be88b87acc4d"
SRC_URI = "git://git.merproject.org/mer-core/libqofono.git \
file://0001-also-emit-modemRemoved-and-modemAdded.patch \
"
S = "${WORKDIR}/git"
PV = "0.92+gitr${SRCPV}"
PV = "0.98+gitr${SRCPV}"
inherit qmake5
@@ -23,10 +25,12 @@ PACKAGES += "${PN}-tests"
FILES_${PN}-tests = " \
${libdir}/libqofono-qt5/tests/tst_* \
/opt/examples/libqofono-qt5/ \
/opt/tests/libqofono-qt5 \
"
FILES_${PN} += " \
${OE_QMAKE_PATH_QML}/MeeGo/QOfono/qmldir \
${OE_QMAKE_PATH_QML}/MeeGo/QOfono/plugins.qmltypes \
${OE_QMAKE_PATH_QML}/MeeGo/QOfono/libQOfonoQtDeclarative.so \
"
FILES_${PN}-dev += " \