summaryrefslogtreecommitdiff
path: root/x11/ipc/client/ocopclient.cpp
Side-by-side diff
Diffstat (limited to 'x11/ipc/client/ocopclient.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--x11/ipc/client/ocopclient.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/x11/ipc/client/ocopclient.cpp b/x11/ipc/client/ocopclient.cpp
index c1def73..6085481 100644
--- a/x11/ipc/client/ocopclient.cpp
+++ b/x11/ipc/client/ocopclient.cpp
@@ -11,12 +11,21 @@
#include <qtimer.h>
#include "../common/ocoppacket.h"
#include "ocopclient.h"
+OCOPClient* OCOPClient::m_self = 0;
+
+OCOPClient* OCOPClient::self() {
+ if (!m_self ) {
+ m_self = new OCOPClient();
+ }
+ return m_self;
+}
+
OCOPClient::OCOPClient( const QString& path, QObject* obj )
: QObject( obj )
{
m_tries = 0;
init(QFile::encodeName(path) );
}