Browse Source

Remove lockfile only when last app instance is destroyed

adaptive-webui-19844
Vladimir Golovnev (Glassez) 3 years ago committed by Vladimir Golovnev
parent
commit
50ddfea617
  1. 9
      src/app/qtlocalpeer/qtlocalpeer.cpp

9
src/app/qtlocalpeer/qtlocalpeer.cpp

@ -96,7 +96,7 @@ namespace QtLP_Private @@ -96,7 +96,7 @@ namespace QtLP_Private
const char* QtLocalPeer::ack = "ack";
QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
QtLocalPeer::QtLocalPeer(QObject *parent, const QString &appId)
: QObject(parent)
, id(appId)
{
@ -136,8 +136,11 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId) @@ -136,8 +136,11 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
QtLocalPeer::~QtLocalPeer()
{
lockFile.unlock();
lockFile.remove();
if (!isClient())
{
lockFile.unlock();
lockFile.remove();
}
}
bool QtLocalPeer::isClient()

Loading…
Cancel
Save