I compiled the digiKam KIPI plugin WikiMedia uploader and it is working very well (I can connect to Wikimedia Commons and upload pictures). Now, I'm behind a proxy (well configured on my system settings) and I cannot connect anymore. Since this KIPI plugin is using libmediawiki for all login/upload operations, I'm pretty sure the reason is that libmediawiki is lacking proxy management. I looked at the source code and found no place where the proxies are managed. I tried to add QNetworkProxyFactory::setUseSystemConfiguration(true); in mediawiki.cpp but after recompilation, I obtain the same result. I also noticed that libmediawiki uses QNetworkAccessManager. Since it is a KDE library, shouldn't it use KIO for network operations? Reproducible: Always Steps to Reproduce: 1. Compile and run digiKam with the KIPI plugin MediaWiki uploader 2. Connect to a wiki 3. Behind a proxy, it fails
I’ve asked for feedback as I don’t really know where to start: http://mail.kde.org/pipermail/kde-testing/2014-June/000395.html
I guess you should have posted that question to the kde-devel or even kde-core-devel list. Since it mentions proxies, even CC'ing kfm-devel might make sense.
“I also noticed that libmediawiki uses QNetworkAccessManager. Since it is a KDE library, shouldn't it use KIO for network operations?” I’ve been reading about how proxy is handled in KDE applications, and there is not much information. As far as I can see, the reason for there not being much information is because KIO handles proxy configuration automatically. In other words, I agree with you, I will look into porting the current code to KIO, hopefully solving the proxy support issue.
I've started looking into porting libmediawiki to KF5, and if it depended on KIO it would become a tier 3 framework. That seemed a bit high for a library that is conceptually as simple as this library. I checked the list of Tier 1 frameworks, and first in the list there is Attica, which is basically the same as libmediawiki but for a different service API. So I figured there must be some way to use proxy settings without depending on KIO. So I searched a bit again, and found that a simple static call may be all I need: http://stackoverflow.com/questions/9526473/how-can-i-automatically-detect-a-proxy I will try that after the port to KF5 instead of moving to KIO. If that does not work, I’ll check Attica’s code to see what they are doing to support conections behind a proxy, and if I cannot find that code I’ll just ask the developer of Attica. It must definitely be doable without depending on KIO.
What's about this entry with KF5 port of libmediawiki ? Peter, this problem still valid ? Gilles Caulier
Gilles, I cannot test it now but I may have an occasion to try connecting behind a proxy before the end of this month. I will post more information when I can.
Git commit c6b5d83df049df850b216b10397f63d167ad7dc1 by Gilles Caulier. Committed on 21/12/2023 at 15:26. Pushed by cgilles into branch 'master'. Add generic Network Proxy settings for digiKam and Showfoto. Related: bug 379608 FIXED-IN: 8.3.0 M +0 -1 core/utilities/geolocation/marble/CMakeLists.txt M +0 -8 core/utilities/geolocation/marble/core/MarbleGlobal.h M +2 -112 core/utilities/geolocation/marble/settings/MarbleConfigView.cpp M +0 -10 core/utilities/geolocation/marble/settings/MarbleConfigView.h M +2 -0 core/utilities/setup/CMakeLists.txt R +2 -2 core/utilities/setup/misc/proxysettingswidget.ui [from: core/utilities/geolocation/marble/settings/proxysettingswidget.ui - 099% similarity] M +61 -0 core/utilities/setup/misc/systemsettings.cpp M +19 -6 core/utilities/setup/misc/systemsettings.h M +45 -9 core/utilities/setup/misc/systemsettingswidget.cpp https://invent.kde.org/graphics/digikam/-/commit/c6b5d83df049df850b216b10397f63d167ad7dc1