diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2011-06-06 14:56:44 +0200 |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2011-06-06 14:56:44 +0200 |
commit | 11bacd30967435a54eb74e9e2e36a97b12629a8c (patch) | |
tree | c13b3e63d56f3e7cceaa2c3b374f334412d40b63 /src/corelib/kernel/qsharedmemory_p.h | |
parent | 1c2a9b1294dd7dd0762f4f57c29284d8491125ff (diff) | |
download | qt4-tools-11bacd30967435a54eb74e9e2e36a97b12629a8c.tar.gz |
minor improvements for QSharedMemory
remove unused includes;
generate error string if error occurred only;
make some error strings equal on different platforms;
avoid code duplication;
minor code simlifications and clean-ups
Merge-request: 1248
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/corelib/kernel/qsharedmemory_p.h')
-rw-r--r-- | src/corelib/kernel/qsharedmemory_p.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/corelib/kernel/qsharedmemory_p.h b/src/corelib/kernel/qsharedmemory_p.h index d5fafeff97..182876b28d 100644 --- a/src/corelib/kernel/qsharedmemory_p.h +++ b/src/corelib/kernel/qsharedmemory_p.h @@ -74,8 +74,6 @@ namespace QSharedMemoryPrivate #elif defined(Q_OS_SYMBIAN) #include <e32std.h> #include <sys/types.h> -#else -#include <sys/sem.h> #endif QT_BEGIN_NAMESPACE @@ -151,7 +149,7 @@ public: #endif #ifndef QT_NO_SYSTEMSEMAPHORE - bool tryLocker(QSharedMemoryLocker *locker, const QString function) { + inline bool tryLocker(QSharedMemoryLocker *locker, const QString &function) { if (!locker->lock()) { errorString = QSharedMemory::tr("%1: unable to lock").arg(function); error = QSharedMemory::LockError; |