diff options
Diffstat (limited to 'dev-qt/qtsingleapplication/files/2.6.1_p20130904-unbundle-qtlockedfile.patch')
-rw-r--r-- | dev-qt/qtsingleapplication/files/2.6.1_p20130904-unbundle-qtlockedfile.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/dev-qt/qtsingleapplication/files/2.6.1_p20130904-unbundle-qtlockedfile.patch b/dev-qt/qtsingleapplication/files/2.6.1_p20130904-unbundle-qtlockedfile.patch new file mode 100644 index 000000000000..93c78fab9bab --- /dev/null +++ b/dev-qt/qtsingleapplication/files/2.6.1_p20130904-unbundle-qtlockedfile.patch @@ -0,0 +1,81 @@ +From 62210d463f87abb0584ce699915e1845cacaa480 Mon Sep 17 00:00:00 2001 +From: Davide Pesavento <davidepesa@gmail.com> +Date: Sat, 28 Dec 2013 16:33:15 +0100 +Subject: [PATCH] unbundle qtlockedfile + +--- + src/qtlocalpeer.cpp | 11 +---------- + src/qtlocalpeer.h | 2 +- + src/qtsingleapplication.pri | 1 + + src/qtsinglecoreapplication.pri | 1 + + 4 files changed, 4 insertions(+), 11 deletions(-) + +diff --git a/src/qtlocalpeer.cpp b/src/qtlocalpeer.cpp +index 332b064..f17e662 100644 +--- a/src/qtlocalpeer.cpp ++++ b/src/qtlocalpeer.cpp +@@ -55,15 +55,6 @@ static PProcessIdToSessionId pProcessIdToSessionId = 0; + #include <unistd.h> + #endif + +-namespace QtLP_Private { +-#include "qtlockedfile.cpp" +-#if defined(Q_OS_WIN) +-#include "qtlockedfile_win.cpp" +-#else +-#include "qtlockedfile_unix.cpp" +-#endif +-} +- + const char* QtLocalPeer::ack = "ack"; + + QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId) +@@ -114,7 +105,7 @@ bool QtLocalPeer::isClient() + if (lockFile.isLocked()) + return false; + +- if (!lockFile.lock(QtLP_Private::QtLockedFile::WriteLock, false)) ++ if (!lockFile.lock(QtLockedFile::WriteLock, false)) + return true; + + bool res = server->listen(socketName); +diff --git a/src/qtlocalpeer.h b/src/qtlocalpeer.h +index 1b533b1..1127735 100644 +--- a/src/qtlocalpeer.h ++++ b/src/qtlocalpeer.h +@@ -68,7 +68,7 @@ protected: + QString id; + QString socketName; + QLocalServer* server; +- QtLP_Private::QtLockedFile lockFile; ++ QtLockedFile lockFile; + + private: + static const char* ack; +diff --git a/src/qtsingleapplication.pri b/src/qtsingleapplication.pri +index 6f2bced..02c9e5b 100644 +--- a/src/qtsingleapplication.pri ++++ b/src/qtsingleapplication.pri +@@ -3,6 +3,7 @@ INCLUDEPATH += $$PWD + DEPENDPATH += $$PWD + QT *= network + greaterThan(QT_MAJOR_VERSION, 4): QT *= widgets ++CONFIG *= qtlockedfile + + qtsingleapplication-uselib:!qtsingleapplication-buildlib { + LIBS += -L$$QTSINGLEAPPLICATION_LIBDIR -l$$QTSINGLEAPPLICATION_LIBNAME +diff --git a/src/qtsinglecoreapplication.pri b/src/qtsinglecoreapplication.pri +index d2d6cc3..f5b8414 100644 +--- a/src/qtsinglecoreapplication.pri ++++ b/src/qtsinglecoreapplication.pri +@@ -4,6 +4,7 @@ HEADERS += $$PWD/qtsinglecoreapplication.h $$PWD/qtlocalpeer.h + SOURCES += $$PWD/qtsinglecoreapplication.cpp $$PWD/qtlocalpeer.cpp + + QT *= network ++CONFIG *= qtlockedfile + + win32:contains(TEMPLATE, lib):contains(CONFIG, shared) { + DEFINES += QT_QTSINGLECOREAPPLICATION_EXPORT=__declspec(dllexport) +-- +1.8.5.2 + |