1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-30 11:04:57 +01:00
This commit is contained in:
David Sansome 2010-05-03 14:17:56 +00:00
parent 3adc74dfab
commit 016b05f0dc
2 changed files with 2 additions and 6 deletions

View File

@ -59,14 +59,12 @@ static PProcessIdToSessionId pProcessIdToSessionId = 0;
#include <time.h> #include <time.h>
#endif #endif
namespace QtLP_Private {
#include "qtlockedfile.cpp" #include "qtlockedfile.cpp"
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
#include "qtlockedfile_win.cpp" #include "qtlockedfile_win.cpp"
#else #else
#include "qtlockedfile_unix.cpp" #include "qtlockedfile_unix.cpp"
#endif #endif
}
const char* QtLocalPeer::ack = "ack"; const char* QtLocalPeer::ack = "ack";
@ -118,7 +116,7 @@ bool QtLocalPeer::isClient()
if (lockFile.isLocked()) if (lockFile.isLocked())
return false; return false;
if (!lockFile.lock(QtLP_Private::QtLockedFile::WriteLock, false)) if (!lockFile.lock(QtLockedFile::WriteLock, false))
return true; return true;
bool res = server->listen(socketName); bool res = server->listen(socketName);

View File

@ -49,9 +49,7 @@
#include <QtNetwork/QLocalSocket> #include <QtNetwork/QLocalSocket>
#include <QtCore/QDir> #include <QtCore/QDir>
namespace QtLP_Private {
#include "qtlockedfile.h" #include "qtlockedfile.h"
}
class QtLocalPeer : public QObject class QtLocalPeer : public QObject
{ {
@ -74,7 +72,7 @@ protected:
QString id; QString id;
QString socketName; QString socketName;
QLocalServer* server; QLocalServer* server;
QtLP_Private::QtLockedFile lockFile; QtLockedFile lockFile;
private: private:
static const char* ack; static const char* ack;