Review Request 120273: Initial work on porting to Frameworks

Jakub Caban kuba at whyblack.pl
Fri Sep 19 19:16:09 UTC 2014



> On Sept. 18, 2014, 10:26 p.m., Aleix Pol Gonzalez wrote:
> > uploadprofilemodel.cpp, line 25
> > <https://git.reviewboard.kde.org/r/120273/diff/1/?file=313291#file313291line25>
> >
> >     Why is this commented out?
> >     You can find it in the KCMUtils framework.

I couldn't overcome it by myself. I know it should be in KCMUtils and it is even found, but I got compile errors:

/home/lustmored/projects/kdev-upload/uploadprofilemodel.cpp: In constructor ‘UploadProfileModel::UploadProfileModel(QObject*)’:
/home/lustmored/projects/kdev-upload/uploadprofilemodel.cpp:25:90: error: invalid initialization of reference of type ‘const QString&’ from expression of type ‘KComponentData’
     KSettings::Dispatcher::registerComponent(KComponentData("kdevupload"), this, "revert");
                                                                                          ^
In file included from /home/lustmored/projects/kdev-upload/uploadprofilemodel.cpp:14:0:
/usr/include/KF5/KCMUtils/ksettings/dispatcher.h:55:22: error: in passing argument 1 of ‘void KSettings::Dispatcher::registerComponent(const QString&, QObject*, const char*)’
 KCMUTILS_EXPORT void registerComponent(const QString &componentName, QObject *recv, const char *slot);

I'd appreciate some hint as googling failed for me :(


> On Sept. 18, 2014, 10:26 p.m., Aleix Pol Gonzalez wrote:
> > uploadprofilemodel.cpp, line 70
> > <https://git.reviewboard.kde.org/r/120273/diff/1/?file=313291#file313291line70>
> >
> >     I wouldn't read it as a QString, use QUrl?

I have tried a few ways that seemed reasonable to me, but when left untouched it gives:

In file included from /usr/include/KF5/KConfigCore/kconfiggroup.h:717:0,
                 from /usr/include/KF5/KConfigCore/KConfigGroup:1,
                 from /home/lustmored/projects/kdev-upload/uploadprofilemodel.cpp:13:
/usr/include/KF5/KConfigCore/conversioncheck.h: In instantiation of ‘void ConversionCheck::type_toQVariant<T>::constraint() [with T = KUrl]’:
/usr/include/KF5/KConfigCore/conversioncheck.h:82:39:   required from ‘void ConversionCheck::to_QVariant() [with T = KUrl]’
/usr/include/KF5/KConfigCore/kconfiggroup.h:722:37:   required from ‘T KConfigGroup::readEntry(const char*, const T&) const [with T = KUrl]’
/home/lustmored/projects/kdev-upload/uploadprofilemodel.cpp:70:62:   required from here
/usr/include/KF5/KConfigCore/conversioncheck.h:63:23: error: conversion from ‘ConversionCheck::QVconvertible<KUrl>::toQVariant {aka ConversionCheck::unsupported}’ to non-scalar type ‘ConversionCheck::supported’ requested
         supported x = y;

and my only idea was to read as QString and create KUrl object for that. How can I do it better way?

Also I'd love to get it going with KUrl before porting to QUrl as it will be probably loads of work (most of the plugin just manipulates KUrls). It should be easier done when I have first some kind of working KUrl based version


> On Sept. 18, 2014, 10:26 p.m., Aleix Pol Gonzalez wrote:
> > uploadprojectmodel.cpp, line 230
> > <https://git.reviewboard.kde.org/r/120273/diff/1/?file=313292#file313292line230>
> >
> >     Read as QUrl

same as first issue about KUrl


On Sept. 18, 2014, 10:26 p.m., Jakub Caban wrote:
> > I pointed out some issues, but good work otherwise!! :D

Thanks a lot for that! Those simple guidances are really extremely helpful to me!


- Jakub


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


On Sept. 18, 2014, 8:08 p.m., Jakub Caban wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120273/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2014, 8:08 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-upload
> 
> 
> Description
> -------
> 
> I have ported CMakeList to ECM and Framework based and ported as much source code as I could to compile agains KDevelop and KDevplatform master.
> 
> 
> Diffs
> -----
> 
>   profilesfiletree.cpp fffe74e 
>   tests/CMakeLists.txt bb4f2f6 
>   uploaddialog.cpp 0600a7d 
>   uploadjob.cpp b48e58c 
>   uploadpreferences.cpp 4b4380e 
>   uploadprofiledlg.cpp 930f1c1 
>   uploadprofilemodel.cpp 84e8a79 
>   uploadprojectmodel.cpp 900b8d0 
>   CMakeLists.txt 8e6baa4 
>   kdevuploadplugin.h 335b2b3 
>   kdevuploadplugin.cpp c805255 
>   profilesfiletree.h 4718b1e 
> 
> Diff: https://git.reviewboard.kde.org/r/120273/diff/
> 
> 
> Testing
> -------
> 
> It compiles, but currently crashes KDevelop whenever project settings are to be opened.
> 
> 
> Thanks,
> 
> Jakub Caban
> 
>

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


More information about the KDevelop-devel mailing list