Review Request: Factor out and reuse the code that guesses mime-type from filename

Dawit Alemayehu adawit at kde.org
Tue Jan 3 14:09:25 GMT 2012



> On Jan. 3, 2012, 9:47 a.m., David Faure wrote:
> > kparts/browseropenorsavequestion.cpp, line 340
> > <http://git.reviewboard.kde.org/r/103617/diff/2/?file=45325#file45325line340>
> >
> >     So, this is passing the default mimetype as first argument, knowing very well that it won't be used...
> >     
> >     This kind of factorization isn't really factorization :/
> >     
> >     If we want to call findByUrl here, why not just call findByUrl...

Well... as a result of my incorrect reading of the API documentation, my factorization as done with this patch is indeed completely wrong and useless. I will fix this too. 


- Dawit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103617/#review9492
-----------------------------------------------------------


On Jan. 3, 2012, 5:51 a.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103617/
> -----------------------------------------------------------
> 
> (Updated Jan. 3, 2012, 5:51 a.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Description
> -------
> 
> * Factored out the code that is used to determine the actual mime-type from either another mime-type or a filename.
> * Avoid storing the KMimeType::Ptr returned by KMimeType::mimeType as stated in its documentation.
> 
> 
> Diffs
> -----
> 
>   kparts/browseropenorsavequestion.cpp 092198f 
> 
> Diff: http://git.reviewboard.kde.org/r/103617/diff/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dawit Alemayehu
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120103/addade88/attachment.htm>


More information about the kde-core-devel mailing list