Review Request 119936: Fix inconsistencies in KPluginInfo and add a basic unit test

Alexander Richardson arichardson.kde at gmail.com
Sat Sep 6 03:05:02 UTC 2014



> On Sept. 5, 2014, 11:58 nachm., David Faure wrote:
> > src/services/kplugininfo.cpp, line 95
> > <https://git.reviewboard.kde.org/r/119936/diff/4/?file=308036#file308036line95>
> >
> >     can't that lead to a crash if people use other methods after that?

Well, it is the same as when KPluginInfo is constructed from a null KService::Ptr, so IMHO it ist more or less the same


- Alexander


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


On Aug. 28, 2014, 9:48 nachm., Alexander Richardson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119936/
> -----------------------------------------------------------
> 
> (Updated Aug. 28, 2014, 9:48 nachm.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kservice
> 
> 
> Description
> -------
> 
> This is a series of small commits, I hope it is fine to have them as one diff:
> 
> ---
> 
> Add a basic unit test for KPluginInfo
> 
> ---
> 
> KPluginInfoTest: Also test reading a custom property
> 
> ---
> 
> Also test KPluginInfo(KService::Ptr) constructor
> 
> ---
> 
> Fix KPluginInfo::libraryPath() when constructing from a .desktop file
> 
> ---
> 
> Fix KPluginInfo::dependencies() when constructing from a .desktop file
> 
> Previously it would treat X-KDE-PluginInfo-Depends= (with no value)
> as a string list with one element (the empty string). When constructing
> from a KService::Ptr using the same file we get an empty string list as
> one would expect.
> 
> This makes the behaviour of the KPluginInfo(QString) constructor match
> the KPluginInfo(KService::Ptr) version.
> 
> ---
> 
> Fix KPluginInfo::isValid() when constructing from a .desktop file
> 
> Previously it would always return true, even if the file didn't exist or
> was no valid .desktop file.
> 
> ---
> Fix KPluginInfo::libraryPath() when constructing from a KService::Ptr
> 
> 
> Diffs
> -----
> 
>   autotests/CMakeLists.txt da83f46a9dcd1fa7801bead5715abf51cd12d668 
>   autotests/kplugininfotest.cpp PRE-CREATION 
>   src/services/kplugininfo.h 9a9eceee5c90c6a5516c3b03473ff6437e9b2fe4 
>   src/services/kplugininfo.cpp 6fadf46c902455e7f5c9ece5b34fb1e40d0a97f7 
> 
> Diff: https://git.reviewboard.kde.org/r/119936/diff/
> 
> 
> Testing
> -------
> 
> Unit test passes
> 
> 
> Thanks,
> 
> Alexander Richardson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140906/72e89b23/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list