From 108eb5b7d21e24e48f214ea8f171fa97c0087167 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 13 Sep 2010 19:39:20 +0100 Subject: Fixed QFile::setSize on symbian Reviewed-By: joao --- src/corelib/io/qfsfileengine_unix.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 1d1baf9..2e9d10c 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -520,9 +520,9 @@ qint64 QFSFileEnginePrivate::nativePos() const #ifdef Q_OS_SYMBIAN if (symbianFile.SubSessionHandle()) { #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API - qint64 pos; + qint64 pos = 0; #else - TInt pos; + TInt pos = 0; #endif TInt err = symbianFile.Seek(ESeekCurrent, pos); if(err != KErrNone) { @@ -1028,7 +1028,7 @@ bool QFSFileEngine::setSize(qint64 size) TInt err = d->symbianFile.SetSize(size); ret = (err == KErrNone); } - if (d->fd != -1) + else if (d->fd != -1) ret = QT_FTRUNCATE(d->fd, size) == 0; else if (d->fh) ret = QT_FTRUNCATE(QT_FILENO(d->fh), size) == 0; -- cgit v0.12