[Marble-bugs] [Bug 257376] New: Runners involving network requests don't work anymore since Maemo's PR 1.3 update (Qt 4.6 => Qt 4.7)
Dennis Nienhüser
earthwings at gentoo.org
Sat Nov 20 00:06:58 CET 2010
https://bugs.kde.org/show_bug.cgi?id=257376
Summary: Runners involving network requests don't work anymore
since Maemo's PR 1.3 update (Qt 4.6 => Qt 4.7)
Product: marble
Version: unspecified
Platform: Compiled Sources
OS/Version: Linux
Status: NEW
Severity: normal
Priority: NOR
Component: general
AssignedTo: marble-bugs at kde.org
ReportedBy: earthwings at gentoo.org
Version: unspecified (using Devel)
OS: Linux
The PR 1.3 update on Maemo brought Qt 4.7, which uses this code
qnetworkconfigmanager_p.cpp:
engine->moveToThread(QCoreApplicationPrivate::mainThread());
connect(engine, SIGNAL(updateCompleted()), this, SLOT(updateConfigurations()));
connect(engine,
SIGNAL(configurationAdded(QNetworkConfigurationPrivatePointer)), this,
SLOT(configurationAdded(QNetworkConfigurationPrivatePointer)));
connect(engine,
SIGNAL(configurationRemoved(QNetworkConfigurationPrivatePointer)), this,
SLOT(configurationRemoved(QNetworkConfigurationPrivatePointer)));
connect(engine,
SIGNAL(configurationChanged(QNetworkConfigurationPrivatePointer)), this,
SLOT(configurationChanged(QNetworkConfigurationPrivatePointer)));
The problem here is that the engine is moved to the main thread and
QNetworkConfigurationPrivatePointer is not registered using qregisterMetaType.
This means that it is not possible to use a QNetworkAccessManager on Maemo in a
thread, because the above signal/slot connection fails:
QObject::connect: Cannot queue arguments of type
'QNetworkConfigurationPrivatePointer'
I see two workarounds:
1) Add the private class to Marble and register the metatype ourselves. This is
pretty ugly since we had to distribute a private qt header.
2) Move the QNetworkAccessManager and its usage to the main thread. This is
ugly as well since we go to a runner thread and from there on back to the main
thread to do the work.
I'll go for 2) for now. It shouldn't be noticeable from the UI since the work
done by the online runners is minimal. Still the patch should be reverted when
the issue is fixed on the Qt side.
Reproducible: Didn't try
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Marble-bugs
mailing list