Review Request 120312: Port .cpp files from KDELibs4Support

Jakub Caban kuba at whyblack.pl
Tue Sep 23 21:22:43 UTC 2014



> On Sept. 22, 2014, 12:55 p.m., Aleix Pol Gonzalez wrote:
> > uploadjob.cpp, line 110
> > <https://git.reviewboard.kde.org/r/120312/diff/2/?file=314365#file314365line110>
> >
> >     what if m_project->folder() is not a local URL?

I have ported this problematic code to KDevelop::Path and as far as I see it should work right now in any case. m_project->folder() was deprecated anyways...


On Sept. 22, 2014, 12:55 p.m., Jakub Caban wrote:
> > In general you don't want to use QUrl::path. At least, toLocalPath, and only when you know it's local. If it's just about displaying relative urls, you can consider showing the full path for now and get rid of the path handling.
> > 
> > Regarding your linking problem, consider pasting here the error so we can work out what's wrong.
> 
> Jakub Caban wrote:
>     Unfortunately it is not only used to display path, but to calculate absolute path with other base folder. I must admit this part was really problematic to me. Main purpose is:
>     
>     1) calculate path relative to some "root" folder.
>     2) apply this path to different "root" folder to get upload destination.
>     e.g: file "foo/bar.cpp" has absolute URL of "file://home/user/project/foo/bar.cpp" (where "file://home/user/project/" is project folder) and I wat to upload it to "sftp://server/path/". So I need to generate path "sftp://server/path/foo/bar.cpp".
>     
>     I was looking for better solution to achieve this goal, that would work with remote URLs too, but couldn't find one. Any hint would be very welcome.
>     
>     About linking problem I will try to investigate further in the evening and will post as much details as I can find.
> 
> Jakub Caban wrote:
>     What is exact problem with QUrl::path? I couldn't find any reason in QT docs or google that would make it wrong - probably am missing something obviouss, but need a hint ;) QDir docs also does not say whether it will work with non-local paths, nor google does. Please explain me a little more about problem here so I can try to find solution. For now my only idea is to replace path() with toString() when needed, but that doesn't sound right.
>     
>     About my linking problems they were obviously my overlooking. I am linking against KDev::Interfaces which links against KDELibs4support. So I cannot remove it from find_packages right now.

I have possibly found a solution. It will be good to port more parts of KDevUpload to KDevelop::Path probably and that will follow when we will be done here.


- Jakub


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120312/#review67193
-----------------------------------------------------------


On Sept. 23, 2014, 9:20 p.m., Jakub Caban wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120312/
> -----------------------------------------------------------
> 
> (Updated Sept. 23, 2014, 9:20 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-upload
> 
> 
> Description
> -------
> 
> Mostly simple KUrl->QUrl changes with just a few harder corners like porting to QDialog or KUrl::relativePath(...). Removing KDELibs4support from CMakeList.txt is impossible now as some weird dependency forces profile dialog to link against it. Probably something with .ui files? I will investigate when we'll have this part done.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 3428c80 
>   kdevuploadplugin.cpp 5261978 
>   profilesfiletree.h c595f32 
>   profilesfiletree.cpp 2c19df0 
>   uploadjob.cpp c58db45 
>   uploadpreferences.cpp 0949c92 
>   uploadprojectmodel.cpp 30db851 
> 
> Diff: https://git.reviewboard.kde.org/r/120312/diff/
> 
> 
> Testing
> -------
> 
> Code compiles and works with 2 regressions:
> - Directory chooser for profile settings always opens user home folder instead of remote view
> - upload job always reports 'Upload cancelled' even after succesfull upload
> 
> 
> Thanks,
> 
> Jakub Caban
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140923/ae7a3b52/attachment.html>


More information about the KDevelop-devel mailing list