mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-30 11:04:57 +01:00
WTF?!
This commit is contained in:
parent
3adc74dfab
commit
016b05f0dc
4
3rdparty/qtsingleapplication/qtlocalpeer.cpp
vendored
4
3rdparty/qtsingleapplication/qtlocalpeer.cpp
vendored
@ -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);
|
||||||
|
4
3rdparty/qtsingleapplication/qtlocalpeer.h
vendored
4
3rdparty/qtsingleapplication/qtlocalpeer.h
vendored
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user