DevHeads.net

KNewStuff problem - GSOC 2019

Dear KDE Developers,

I'm Ferencz Kovacs and I'm currently working on LabPlot for GSOC 2019. My
project is here
<https://summerofcode.withgoogle.com/dashboard/project/6436659309051904/overview/>.
I'm trying to use KNewStuff to upload and download some metadata files. For
starters I wanted to try the UploadDialog, however I was faced with a
problem. After a successful login I get this error message: "The server
does not recognize the category Labplot_Datasets to which you are trying to
upload." I followed the tutorial available here.
<https://techbase.kde.org/Development/Tutorials/Collaboration/HotNewStuff/Upload>
I tried to find out find out why was this problem happening, but the
documentation isn't really helpful in this matter, it's not very profound.
Then I started to analyze the source code of KNS3, in hope of finding an
answer. The upload category names are read from the .knsrc config file here.
<https://api.kde.org/frameworks/knewstuff/html/uploaddialog_8cpp_source.html?fbclid=IwAR0PriT1psbKulIUA6auilgjbp9O_C2_B-nvoF1GoqKQrJy43JqTBY6zYrg#l00112>The
categories are gonna be loaded based on this, here
<https://api.kde.org/frameworks/knewstuff/html/uploaddialog_8cpp_source.html?fbclid=IwAR0GCNbHX5wiDVSmn4vx2SFP_AyVDAJhFCxm5syjz8BeuZExk-hiMtu6OvM#l00341>.
Then this
<https://api.kde.org/4.x-api/kdelibs-apidocs/knewstuff/html/atticahelper_8cpp_source.html?fbclid=IwAR1Xwhj8-fyVjk6QFZkv-JarQe7E6AhHW1gY7onzXPtv9_Tqz9JQ3eBL5Jo#l00107>
function will be called. It's gonna check whether the category
included/mentioned in the config file can be found among the ones loaded
form the server: here.
<https://api.kde.org/4.x-api/kdelibs-apidocs/knewstuff/html/atticahelper_8cpp_source.html?fbclid=IwAR3a42r-F8ULH91rV2cLVRC_htr_4bkGXbFKli2jBhGluagstuMuufly0RQ#l00126>If
it can be found, then it's gonna be added to the valid categories. Here
<https://api.kde.org/frameworks/knewstuff/html/uploaddialog_8cpp_source.html?fbclid=IwAR1Ae7diQAF0DZOrvoY9vxwAzr7Os66lw2HiFzhCh0U1PPxkSxSqRNVpIqU#l00567>
the uplaodDialog checks whether there are any valid categories. Which
apperantly there are not in my case, since I'm getting the Error message
box from the previous function. Do you have any ideas why does this happen?
Do I have to register the categories first somewhere? Thank you in advance.
Every tip is more than welcome.

Yours sincerely,
Ferencz Kovacs

Comments

Re: KNewStuff problem - GSOC 2019

By Nate Graham at 06/05/2019 - 16:28

On 6/5/19 7:51 AM, Ferencz Kovács wrote:
Yes, you first need to register a new category. See for example
<a href="https://phabricator.kde.org/T10810" title="https://phabricator.kde.org/T10810">https://phabricator.kde.org/T10810</a>

Nate

Re: KNewStuff problem - GSOC 2019

By Alexander Semke at 06/05/2019 - 15:57

Hi Ferencz,

Let's discuss this in more details in another email thread we have on this
already and sorry for being not able to reply earlier to you there.

Regards,
Alexander