PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/libtomahawk/thirdparty/kdsingleapplicationguard/kdsharedmemorylocker.h

http://github.com/tomahawk-player/tomahawk
C++ Header | 36 lines | 27 code | 9 blank | 0 comment | 1 complexity | 0f6e58ff5a3a8e6f1efa82073c8adea8 MD5 | raw file
 1#ifndef __KDTOOLS__CORE__KDSHAREDMEMORYLOCKER_H
 2#define __KDTOOLS__CORE__KDSHAREDMEMORYLOCKER_H
 3
 4#include "kdtoolsglobal.h"
 5
 6#if QT_VERSION < 0x040400 && !defined( DOXYGEN_RUN )
 7#ifdef Q_CC_GNU
 8#warning "Can't use KDTools KDSharedMemoryLocker with Qt versions prior to 4.4"
 9#endif
10#else
11
12class QSharedMemory;
13
14#ifndef DOXYGEN_RUN
15namespace kdtools
16{
17#endif
18
19class KDTOOLSCORE_EXPORT KDSharedMemoryLocker
20{
21    Q_DISABLE_COPY( KDSharedMemoryLocker )
22public:
23    KDSharedMemoryLocker( QSharedMemory* mem );
24    ~KDSharedMemoryLocker();
25
26private:
27    QSharedMemory* const mem;
28};
29
30#ifndef DOXYGEN_RUN
31}
32#endif
33
34#endif
35
36#endif