KDE4 proposal: Paths in i18n strings

Chusslove Illich caslav.ilic at gmx.net
Fri Jul 7 16:36:52 BST 2006


> I don't think it solves the main problem I see: if strings are used as
> paths you have to parse them. And to parse them you have to know what
> format they are in (Unix, Windows, MacOS, etc.). This would certainly
> lead to troubles like passing formatted strings (for example:
> "C:\tmp\something") into i18n [...]

Hold on there. QDir, QFile are taking a QString path themselves. Reading 
QDir specs, it says that one should always use / for separation in QString 
(optionally with drive letter in front if Windows), and that Qt will do 
the right thing depending on underlying system.

So, there is no extra job on our part. Someone gives QFile to i18nPath(), 
we handle that. Someone else gives QString, i18nPath(filestr), which just 
passes to i18nPath(QFile(filestr)), and problem is reduced to previous.

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060707/cb736fd7/attachment.sig>


More information about the kde-core-devel mailing list