[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: network dataengine in kdereview
From: Alex Merry <kde () randomguy3 ! me ! uk>
Date: 2008-08-25 10:02:12
Message-ID: 200808251102.17697.kde () randomguy3 ! me ! uk
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Monday 25 August 2008 08:14:19 Gerhard Gappmeier wrote:
> If noticed that readNumberFromFile() and readStringFromFile() are using
> fopen to access the file.
> 1.) For passing the filename as character string, it uses
> QString::toLatin1()
> This will not work if the filename has any special characters that don't
> fit into the local character set.
> QString::toLocal8Bit() would do that job.
It should be QFile::encodeName(), since it is possible the filesystem uses a
different encoding than the application.
> 2.) Why using fopen at all? I think using QFile would be more consistent
> to the rest of the Qt code.
> But this would be more cosmetic change, becasue fopen should be portable
> too.
QFile would generally be better because it takes care of things like closing
it once you are done with it (ie: the QFile goes out of scope).
Alex
--
Proud KDE hacker: http://www.kde.org
Get KDE 4.1 - out now!
Arch Linux: perfect for geeks like me - http://www.archlinux.org
OpenSUSE: just works - http://www.opensuse.org
["signature.asc" (application/pgp-signature)]
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic