diff options
author | Christophe Chapuis <chris.chapuis@gmail.com> | 2019-10-27 18:30:49 +0000 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2019-10-30 14:32:10 +0000 |
commit | 4075be1b7e513fbfd36f0f8260a5fe2837e0987a (patch) | |
tree | 2861ab55db426cfe55669fa147daf61ffbb08f88 | |
parent | a119e2e48a6ca69ad34fd970ef0a9b7b52da750b (diff) |
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>
-rw-r--r-- | recipes-connectivity/libqofono/libqofono/0001-also-emit-modemRemoved-and-modemAdded.patch | 54 | ||||
-rw-r--r-- | recipes-connectivity/libqofono/libqofono_git.bb | 10 |
2 files changed, 61 insertions, 3 deletions
diff --git a/recipes-connectivity/libqofono/libqofono/0001-also-emit-modemRemoved-and-modemAdded.patch b/recipes-connectivity/libqofono/libqofono/0001-also-emit-modemRemoved-and-modemAdded.patch new file mode 100644 index 00000000..0122e051 --- /dev/null +++ b/recipes-connectivity/libqofono/libqofono/0001-also-emit-modemRemoved-and-modemAdded.patch @@ -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 + diff --git a/recipes-connectivity/libqofono/libqofono_git.bb b/recipes-connectivity/libqofono/libqofono_git.bb index 8b57e171..7de0e49b 100644 --- a/recipes-connectivity/libqofono/libqofono_git.bb +++ b/recipes-connectivity/libqofono/libqofono_git.bb @@ -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 += " \ |