Qt-interest Archive, January 2008
mimetype from extension ?
Message 1 in thread
Id there any functionality in Qt to generate a QString
containing probable mimetype from a file extension/suffix ?
e.g. "pdf" -> "application/pdf", "png" -> "image/png"
and so on.
I can find nothing suitable in the Assistant index.
--
[ signature omitted ]
Message 2 in thread
On søndag den 27. Januar 2008, Stephen Collyer wrote:
> Id there any functionality in Qt to generate a QString
> containing probable mimetype from a file extension/suffix ?
>
> e.g. "pdf" -> "application/pdf", "png" -> "image/png"
> and so on.
>
> I can find nothing suitable in the Assistant index.
There is no such thing. You're going to have to google your way to the answer.
Bo.
--
[ signature omitted ]
Message 3 in thread
Bo Thorsen wrote:
> On søndag den 27. Januar 2008, Stephen Collyer wrote:
>> Id there any functionality in Qt to generate a QString
>> containing probable mimetype from a file extension/suffix ?
>>
>> e.g. "pdf" -> "application/pdf", "png" -> "image/png"
>> and so on.
>>
>> I can find nothing suitable in the Assistant index.
>
> There is no such thing. You're going to have to google your way to the answer.
Luckily I have the answer; it's the Perl MIME::Types module.
Unluckily, I have to port it.
--
[ signature omitted ]
Message 4 in thread
Quoting Stephen Collyer <scollyer@xxxxxxxxxxxxxxxx>:
> Bo Thorsen wrote:
>> On sÃndag den 27. Januar 2008, Stephen Collyer wrote:
>>> Id there any functionality in Qt to generate a QString
>>> containing probable mimetype from a file extension/suffix ?
>>>
>>> e.g. "pdf" -> "application/pdf", "png" -> "image/png"
>>> and so on.
>>>
>>> I can find nothing suitable in the Assistant index.
>>
>> There is no such thing. You're going to have to google your way to
>> the answer.
>
> Luckily I have the answer; it's the Perl MIME::Types module.
> Unluckily, I have to port it.
What about xdg-mime?
http://portland.freedesktop.org/xdg-utils-1.0/xdg-mime.html
--
[ signature omitted ]
Message 5 in thread
Pau Garcia i Quiles wrote:
> What about xdg-mime?
> http://portland.freedesktop.org/xdg-utils-1.0/xdg-mime.html
Thanks, but that's a shell script and looks like it
uses Unix-specific installed files anyway.
--
[ signature omitted ]