QtCore/IO: Fix some warnings on Windows (64bit).

- Warnings about conversion from size_t to int
- Unused variable.

Change-Id: I4a79fa6dc4b95551a64d282ae4307b0edff41201
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Friedemann Kleint 2011-11-28 16:02:50 +01:00 committed by Qt by Nokia
parent 0f1d936998
commit 3ec60ca51b
3 changed files with 2 additions and 4 deletions

View File

@ -589,8 +589,6 @@ QString QFileSystemEngine::owner(const QFileSystemEntry &entry, QAbstractFileEng
bool QFileSystemEngine::fillPermissions(const QFileSystemEntry &entry, QFileSystemMetaData &data,
QFileSystemMetaData::MetaDataFlags what)
{
QAbstractFileEngine::FileFlags ret = 0;
#if !defined(QT_NO_LIBRARY)
if((qt_ntfs_permission_lookup > 0) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)) {
resolveLibs();

View File

@ -167,7 +167,7 @@ private:
size_t newCapacity = qMax(capacity, size_t(QIODEVICE_BUFFERSIZE));
while (newCapacity < required)
newCapacity *= 2;
int moveOffset = (where == freeSpaceAtEnd) ? 0 : newCapacity - len;
const size_t moveOffset = (where == freeSpaceAtEnd) ? 0 : newCapacity - size_t(len);
if (newCapacity > capacity) {
// allocate more space
char* newBuf = new char[newCapacity];

View File

@ -282,7 +282,7 @@ QProcessEnvironment QProcessEnvironment::systemEnvironment()
// This is not the case the other way round.
if (wchar_t *envStrings = GetEnvironmentStringsW()) {
for (const wchar_t *entry = envStrings; *entry; ) {
int entryLen = wcslen(entry);
const int entryLen = int(wcslen(entry));
if (const wchar_t *equal = wcschr(entry, L'=')) {
int nameLen = equal - entry;
QString name = QString::fromWCharArray(entry, nameLen);