Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with service requests #126

Open
ivaylo-valkov opened this issue Aug 18, 2012 · 10 comments
Open

Issues with service requests #126

ivaylo-valkov opened this issue Aug 18, 2012 · 10 comments

Comments

@ivaylo-valkov
Copy link

My operator (Globul in Bulgaria) has a service number (*123#) for which the operator returns a special menu with options. When I dial this service number with QtMoko I receive the service request response, but it only has one string: "GLOBUL Menu". [1] Is there any configuration option for service requests or is it really a bug?

Thanks.

[1] http://e-valkov.org/qtmoko-globul-service-menu.png

@strupppi
Copy link

Hello,
your problem probably is that the answer to that service request doesn't come in a single line, but is spread across multiple consequent lines. If that's the case, it should be fixed by this commit:
strupppi@a3eeace
This commit is not included in any released version of qtmoko yet, but radekp mentinoned he will probably include it into the v48 release.

@ivaylo-valkov
Copy link
Author

Thanks. If I find the time, I'll try to build the git version and report back before v48.

@radekp
Copy link
Owner

radekp commented Aug 22, 2012

The USSD patches are now in my git too, so you can try.

@ivaylo-valkov
Copy link
Author

It seems the USSD patches kind of fix the issue. I can see the entire message now with v48, but its lenght varies, while AFAIK the service message is always with the same length. I'll test with another device and report back on the lenght of the service message.

Thanks.

[1] http://e-valkov.org/qtmoko-bug-reports/qtmoko-globul-service-menu-v48-1.png
[2] http://e-valkov.org/qtmoko-bug-reports/qtmoko-globul-service-menu-v48-2.png

@ivaylo-valkov
Copy link
Author

I've tested the service menu with an old Siemens c35 cell phone. The service request text is always with the same length.

@strupppi
Copy link

This happens with my provider too, and I've now found a bit of time to investigate. It looks like it's not actually a problem with the response being to short, but with the way they're displayed. Basically, it boils down to this: When you receive the first response, a QAbstractMessageBox gets created, which will be reused each time another USSD response arrives. If the last response was a short one, there's a good chance the next (long) response will be displayed in a too small box and therefore gets cut off. I'll take a closer look at it in the next days. Right now I've got an ugly workaround (which basically consists of destroying the old box from the last response and creating a new one each time). The problem is located somewhere around these lines, if anyone wants to take a look:
https://github.com/radekp/qtmoko/blob/master/src/server/phone/telephony/cell/supplementaryservice/supplservice.cpp#L99

@ivaylo-valkov
Copy link
Author

@Struppi Isn't it possible to change the box size by measuring the required height for the message? I remember I've used similar approach in Perl with one of its graphical modules. The font manipulation module provided information about the required width and probably height for the text with the configured font size. Maybe there is similar functionality in Qt? Thank you for your time.

@strupppi
Copy link

strupppi commented Nov 1, 2012

@ivaylo-valkov found a little time to look at this again. Unfortunately, it's not fixed by upgrading to Qt 4.8.3.
So this is my workaround:

diff --git a/src/server/phone/telephony/cell/supplementaryservice/supplservice.cpp b/src/server/phone/telephony/cell/supplementaryservice/supplservice.cpp
index ebc5326..eba6270 100644
--- a/src/server/phone/telephony/cell/supplementaryservice/supplservice.cpp
+++ b/src/server/phone/telephony/cell/supplementaryservice/supplservice.cpp
@@ -97,13 +97,11 @@ void SupplementaryServiceTask::unstructuredNotification
     QString title = tr("Service request");
     QString displayText = "<qt>" + text + "</qt>";
     static QAbstractMessageBox *serviceMsgBox = 0;
-    if (!serviceMsgBox) {
-        serviceMsgBox = QAbstractMessageBox::messageBox(0, title, displayText,
+    if (serviceMsgBox) {
+        delete serviceMsgBox;
+    }    
+    serviceMsgBox = QAbstractMessageBox::messageBox(0, title, displayText,
                                        QAbstractMessageBox::Information);
-    } else {
-        serviceMsgBox->setWindowTitle(title);
-        serviceMsgBox->setText(displayText);
-    }
     QtopiaApplication::showDialog(serviceMsgBox);
 }

@radekp
Copy link
Owner

radekp commented Nov 1, 2012

Applied in git now, Thanks!

@ivaylo-valkov
Copy link
Author

Thanks you both! I'll test it as soon as possible and report if there are still issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants