On 2014-09-25 14:05, Svante Signell wrote:
Hi Pino
On Thu, 2014-09-25 at 10:08 +0200, Pino Toscano wrote:
On 2014-09-24 19:11, Philipp A. Hartmann wrote:
> I would probably do it like this (untested):
>
> const char *path =
> QFile::encodeName(fi.absoluteFilePath()).constData();
QFile::encodeName returns a temporary QByteArray, and getting a
pointer to its internal char* will cause it to be a dangling
pointer.
const QByteArray path = QFile::encodeName(fi.absoluteFilePath());
and then use path.constData() whenever needed.
> std::vector<char> s(sb.st_size + 1);
Please use QByteArray instead.
Ok now?
You've forgot the second part of what I said.
--
Pino Toscano
--
To UNSUBSCRIBE, email to debian-hurd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive:
https://lists.debian.org/667dbefc0788aa34b98fca2683f4c...@pino.toscano.name