maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Code malfunction on Harmattan (https://talk.maemo.org/showthread.php?t=86166)

marmistrz 2012-08-17 08:59

Code malfunction on Harmattan
 
Hi,
I make an app for Fremantle and Harmattan, but there's a problem when running on Harmattan.
This code run properly on Fremantle, but on Harmattan doesn't.
Code:

    QNetworkConfigurationManager manager;
    QNetworkConfiguration cfg = manager.defaultConfiguration();
    if (manager.isOnline() == false) return static_cast<CURLcode>(-2);

On Harmattan, if there was no internet connection the first time the function was run, there is always manager.isOnline == false
(run when no internet, enabled internet, run with internet accessible)
This is returned that way even when I can browse the net with the built-in browser.

After restarting the application with internet connection on, the function runs properly. But why is QNetworkConfigurationManager malfunctioning?

Thanks in advance

ajalkane 2012-08-18 16:56

Re: Code malfunction on Harmattan
 
Maybe this will help you:

http://talk.maemo.org/showpost.php?p...37&postcount=2

marmistrz 2012-08-18 16:59

Re: Code malfunction on Harmattan
 
Quote:

Originally Posted by ajalkane (Post 1253325)

This is what didn't work in Fremantle ;) I removed the QNetworkSession stuff as it didn't detect libcurl want data from network.

marmistrz 2012-08-19 18:15

Re: Code malfunction on Harmattan
 
It seems to be the same as here: http://qt-project.org/forums/viewthread/10955


All times are GMT. The time now is 06:45.

vBulletin® Version 3.8.8