-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
4.8.x
-
None
-
Symbian^3, n8, Qt from git
This code works fine:
QCoreApplication app(argc, argv); QNetworkConfigurationManager configurationManager; QNetworkConfiguration configuration = configurationManager.defaultConfiguration(); QNetworkSession *session = new QNetworkSession(configuration); QEventLoop loop; QObject::connect(session, SIGNAL(opened()), &loop, SLOT(quit()), Qt::QueuedConnection); QMetaObject::invokeMethod(session, "open", Qt::QueuedConnection); loop.exec(); Q_ASSERT(session->isOpen());
This code does not work:
QCoreApplication ap(argc, argv);
QNetworkConfigurationManager configurationManager;
QNetworkConfiguration configuration = configurationManager.defaultConfiguration();
QNetworkSession *session = new QNetworkSession(configuration);
session->open();
session->waitForOpened();
Q_ASSERT(session->isOpen());
I just get an unknown session error when using waitForOpened like that.
I am asuming this is related to not having an active scheduler.
If yes, the bearer code could could (should? create its own active scheduler and do the thing thing when opening the connection? Or there might be synchronous functions for the Symbian bearer API?