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

Dawit Alemayehu adawit at kde.org
Tue Jan 3 16:54:23 GMT 2012



> On Jan. 3, 2012, 2:51 p.m., Milian Wolff wrote:
> > kparts/browseropenorsavequestion.cpp, line 105
> > <http://git.reviewboard.kde.org/r/103617/diff/3/?file=45362#file45362line105>
> >
> >     am I misreading this, or will mime->comment() be called if !mime ? and hence result in a crash?

No you are not misreading it because that is the wrong patch I posted! For the recoard, the crash will never occur since mime will never be NULL unless the this class is instantiated without a valid URL which does not make any sense, but still this patch is the wrong version. Will fix.  /me thinks a few more extra hours of sleep is in order.


- Dawit


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


On Jan. 3, 2012, 2:34 p.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, 2:34 p.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.
> * Display the mime comment instead of the raw type in setSuggestedFileName as it is done in the constructor.
> 
> 
> 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/d132736e/attachment.htm>


More information about the kde-core-devel mailing list