summaryrefslogtreecommitdiffstats
path: root/external/meta-qt5/recipes-connectivity/libqofono
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-qt5/recipes-connectivity/libqofono')
-rw-r--r--external/meta-qt5/recipes-connectivity/libqofono/libqofono/0001-also-emit-modemRemoved-and-modemAdded.patch54
-rw-r--r--external/meta-qt5/recipes-connectivity/libqofono/libqofono_git.bb12
2 files changed, 62 insertions, 4 deletions
diff --git a/external/meta-qt5/recipes-connectivity/libqofono/libqofono/0001-also-emit-modemRemoved-and-modemAdded.patch b/external/meta-qt5/recipes-connectivity/libqofono/libqofono/0001-also-emit-modemRemoved-and-modemAdded.patch
new file mode 100644
index 00000000..0122e051
--- /dev/null
+++ b/external/meta-qt5/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/external/meta-qt5/recipes-connectivity/libqofono/libqofono_git.bb b/external/meta-qt5/recipes-connectivity/libqofono/libqofono_git.bb
index 64ce039e..7de0e49b 100644
--- a/external/meta-qt5/recipes-connectivity/libqofono/libqofono_git.bb
+++ b/external/meta-qt5/recipes-connectivity/libqofono/libqofono_git.bb
@@ -3,13 +3,15 @@ SECTION = "libs"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-DEPENDS += "qtbase qtdeclarative"
+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 += " \