[Kde-pim] Review Request 125570: Handle kabc deprecated classes in kabc->kcontact porting script

R.Harish Navnit harishnavnit at gmail.com
Fri Oct 9 13:29:09 BST 2015



> On Oct. 9, 2015, 5:51 p.m., Daniel Vrátil wrote:
> > kf5/convert-kabc-to-kcontacts.pl, line 6
> > <https://git.reviewboard.kde.org/r/125570/diff/1/?file=410354#file410354line6>
> >
> >     you could use `$gi` at the end to make the match case-insensitive, thus saving one regexp per each file :)

Yes, that will help :)


> On Oct. 9, 2015, 5:51 p.m., Daniel Vrátil wrote:
> > kf5/convert-kabc-to-kcontacts.pl, line 78
> > <https://git.reviewboard.kde.org/r/125570/diff/1/?file=410354#file410354line78>
> >
> >     This will still break build (as expected):
> >     
> >     `KABC::Addressbook a(....)` -> `a(....)`.
> >     
> >     You will still need to port the code, but by removing the class name you just make it harder for yourself to find what the variable actually represented and what has to be done about it.
> >     
> >     I would say it's better to keep the deprecated classes references in the code to make porting easier and to avoid unnecessary porting mistakes.
> 
> Daniel Vrátil wrote:
>     sorry, "... keep the deprecated classes references ..." -> "... keep references to the removed classes  ..."

Yeah, I was just experimenting with that, since the build would be broken even without those lines being added. The only option I see would be to maybe add a "PORTING SCRIPT"(or something similar) term instead of simply commenting it out or as you suggested just keep the references to the removed classes.


- R.Harish


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


On Oct. 9, 2015, 5:39 p.m., R.Harish  Navnit wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125570/
> -----------------------------------------------------------
> 
> (Updated Oct. 9, 2015, 5:39 p.m.)
> 
> 
> Review request for KDE Frameworks and KDEPIM.
> 
> 
> Repository: kde-dev-scripts
> 
> 
> Description
> -------
> 
> A lot of KABC classes are deprecated in KF5. The porting script only replaces kabc occurences to kcontacts, but overlooks if the class being used still exists in kcontact or not. This leads to a lot of compile time #include<> errors. I feel this should and can be avoided by modifying the script. Was this overlooked on purpose or did we just miss it out ?
> 
> I've really no prior knowledge or experience of working with perl and I've tried to handle the above mentioned scenario, by manually checking for deprecated classnames and replacing them with a blank space or commenting them out.
> 
> 
> Diffs
> -----
> 
>   kf5/convert-kabc-to-kcontacts.pl 321fdf2c92745a3aece8e66085994458720f9dfd 
> 
> Diff: https://git.reviewboard.kde.org/r/125570/diff/
> 
> 
> Testing
> -------
> 
> Ran the script on the kopete codebase which uses deprecated classes like addressbook, stdaddressbook, resource etc. 
> Works fine, but takes a bit of time to execute.
> 
> 
> Thanks,
> 
> R.Harish  Navnit
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list