Review Request 124303: KFileWidget: provide the displayed filter text

Aleix Pol Gonzalez aleixpol at kde.org
Thu Jul 9 11:23:32 UTC 2015



> On July 9, 2015, 12:02 p.m., Aleix Pol Gonzalez wrote:
> > What's the use case?
> 
> Elvis Angelaccio wrote:
>     Basically more user-friendly messages for the users.
>     See RR 120204 and in particular this screenshot: https://git.reviewboard.kde.org/r/120204/file/2145/
> 
> Aleix Pol Gonzalez wrote:
>     Why don't you use QMimeDatabase().mimeTypeForName("application/...").name()?
>     
>     In fact, the filter could be `"Any file (*)"` and then it wouldn't be too useful, you're referring to the file's mimetype anyway.
> 
> Elvis Angelaccio wrote:
>     Because that one returns always the mimetype itself which is too technical, e.g. QMimeDatabase().mimeTypeForName("application/x-tar").name() returns `"application/x-tar"`.
>     What I would need is the actual code that populates the currentText() of the KFileFilterCombo, but I couldn't find it.

You can also use QMimeType::comment().


- Aleix


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


On July 9, 2015, 11:47 a.m., Elvis Angelaccio wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124303/
> -----------------------------------------------------------
> 
> (Updated July 9, 2015, 11:47 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> This patch implements the `KFileWidget::currentFilterText()` function.
> This is simply the `currentText()` of the `KFileFilterCombo` widget, i.e. the actual filter text displayed to the user.
> 
> 
> Diffs
> -----
> 
>   src/filewidgets/kfilewidget.h 5b59ea9a57f38da3cb0e94da509d3943ff5a672e 
>   src/filewidgets/kfilewidget.cpp dc3c1f49a2e7b50abd409231436af9da414a24fd 
> 
> Diff: https://git.reviewboard.kde.org/r/124303/diff/
> 
> 
> Testing
> -------
> 
> I compiled and installed KIO, then I called the new function from Ark frameworks branch. Works as expected.
> 
> 
> Thanks,
> 
> Elvis Angelaccio
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150709/459674f8/attachment.html>


More information about the Kde-frameworks-devel mailing list