Open ivaylo-valkov opened 12 years ago
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: https://github.com/strupppi/qtmoko/commit/a3eeace69f0caca802fcf32e8d94edc7f836051c This commit is not included in any released version of qtmoko yet, but radekp mentinoned he will probably include it into the v48 release.
Thanks. If I find the time, I'll try to build the git version and report back before v48.
The USSD patches are now in my git too, so you can try.
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
I've tested the service menu with an old Siemens c35 cell phone. The service request text is always with the same length.
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
@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.
@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);
}
Applied in git now, Thanks!
Thanks you both! I'll test it as soon as possible and report if there are still issues.
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