diff options
| author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-07 23:03:14 (GMT) |
|---|---|---|
| committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-07 23:03:14 (GMT) |
| commit | f67e4e1bc58d3587caa70d1be58c6da14c150ce2 (patch) | |
| tree | b7837b4bdd75f6c2cb016f8637253090308cf889 /src | |
| parent | 8ca64c4ea1484321ebaade018369fe33bcfcb02e (diff) | |
| parent | 6e3ae781a7bd3b5ae2143ef60f969d89663508e3 (diff) | |
| download | Qt-f67e4e1bc58d3587caa70d1be58c6da14c150ce2.zip Qt-f67e4e1bc58d3587caa70d1be58c6da14c150ce2.tar.gz Qt-f67e4e1bc58d3587caa70d1be58c6da14c150ce2.tar.bz2 | |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Add /DYNAMICBASE /NXCOMPAT to linker options in Visual Studio 2005 and higher
Fix compilation error on Solaris
Check elapsed time only once
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/io/qfilesystemengine.cpp | 6 | ||||
| -rw-r--r-- | src/corelib/thread/qsemaphore.cpp | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/corelib/io/qfilesystemengine.cpp b/src/corelib/io/qfilesystemengine.cpp index d9d802e..9446ebb 100644 --- a/src/corelib/io/qfilesystemengine.cpp +++ b/src/corelib/io/qfilesystemengine.cpp @@ -289,6 +289,9 @@ void QFileSystemMetaData::fillFromStatBuf(const QT_STATBUF &statBuffer) void QFileSystemMetaData::fillFromDirEnt(const QT_DIRENT &entry) { +#if defined(_DIRENT_HAVE_D_TYPE) || defined(Q_OS_BSD4) || defined(Q_OS_SYMBIAN) + // BSD4 includes Mac OS X + // ### This will clear all entry flags and knownFlagsMask switch (entry.d_type) { @@ -344,6 +347,9 @@ void QFileSystemMetaData::fillFromDirEnt(const QT_DIRENT &entry) default: clear(); } +#else + Q_UNUSED(entry) +#endif } #endif diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp index 8e8a88a..15f45b6 100644 --- a/src/corelib/thread/qsemaphore.cpp +++ b/src/corelib/thread/qsemaphore.cpp @@ -223,8 +223,9 @@ bool QSemaphore::tryAcquire(int n, int timeout) QElapsedTimer timer; timer.start(); while (n > d->avail) { - if (timer.hasExpired(timeout) - || !d->cond.wait(locker.mutex(), timeout - timer.elapsed())) + const qint64 elapsed = timer.elapsed(); + if (timeout - elapsed > 0 + || !d->cond.wait(locker.mutex(), timeout - elapsed)) return false; } } |
