1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
--- qtlocalpeer.cpp 1970-01-01 01:00:00.000000000
+++ qtlocalpeer.cpp 2008/05/16 10:36:53.000000000
@@ -13,6 +13,8 @@
#include <time.h>
#endif
+namespace SharedTools {
+
const char* QtLocalPeer::ack = "ack";
QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
@@ -139,3 +141,5 @@
delete socket;
emit messageReceived(message); // ##(might take a long time to return)
}
+
+}
--- qtlocalpeer.h 1970-01-01 01:00:00.000000000
+++ qtlocalpeer.h 2008/05/16 10:36:53.000000000
@@ -1,9 +1,11 @@
+
#include <QtNetwork/QLocalServer>
#include <QtNetwork/QLocalSocket>
#include <QtCore/QDir>
#include <qtlockedfile.h>
+namespace SharedTools {
class QtLocalPeer : public QObject
{
@@ -31,3 +33,5 @@
private:
static const char* ack;
};
+
+} // SharedTools
--- qtsingleapplication.cpp 1970-01-01 01:00:00.000000000
+++ qtsingleapplication.cpp 2008/05/16 10:36:53.000000000
@@ -3,6 +3,8 @@
#include "qtlocalpeer.h"
#include <QtGui/QWidget>
+namespace SharedTools {
+
void QtSingleApplication::sysInit(const QString &appId)
{
actWin = 0;
@@ -95,3 +97,5 @@
actWin->activateWindow();
}
}
+
+}
--- qtsingleapplication.h 1970-01-01 01:00:00.000000000
+++ qtsingleapplication.h 2008/05/16 10:36:53.000000000
@@ -1,6 +1,8 @@
#include <QtGui/QApplication>
+namespace SharedTools {
+
class QtLocalPeer;
class QtSingleApplication : public QApplication
@@ -47,3 +49,5 @@
QtLocalPeer *peer;
QWidget *actWin;
};
+
+}
--- qtsingleapplication.pri 1970-01-01 01:00:00.000000000
+++ qtsingleapplication.pri 2008/05/16 10:36:53.000000000
@@ -6,7 +6,7 @@
QT *= network
gotqtlockedfile = $$find(HEADERS, .*qtlockedfile.h)
-isEmpty(gotqtlockedfile):include(../../qtlockedfile/src/qtlockedfile.pri)
+isEmpty(gotqtlockedfile):include(../qtlockedfile/qtlockedfile.pri)
win32:contains(TEMPLATE, lib):contains(CONFIG, shared) {
--- qtsinglecoreapplication.cpp 1970-01-01 01:00:00.000000000
+++ qtsinglecoreapplication.cpp 2008/05/16 10:36:53.000000000
@@ -2,6 +2,7 @@
#include "qtsinglecoreapplication.h"
#include "qtlocalpeer.h"
+namespace SharedTools {
QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv)
: QCoreApplication(argc, argv)
@@ -36,3 +37,4 @@
return peer->applicationId();
}
+}
--- qtsinglecoreapplication.h 1970-01-01 01:00:00.000000000
+++ qtsinglecoreapplication.h 2008/05/16 10:36:53.000000000
@@ -1,6 +1,8 @@
#include <QtCore/QCoreApplication>
+namespace SharedTools {
+
class QtLocalPeer;
class QtSingleCoreApplication : public QCoreApplication
@@ -25,3 +27,5 @@
private:
QtLocalPeer* peer;
};
+
+}
--- qtsinglecoreapplication.pri 1970-01-01 01:00:00.000000000
+++ qtsinglecoreapplication.pri 2008/05/16 10:36:53.000000000
@@ -6,7 +6,7 @@
QT *= network
gotqtlockedfile = $$find(HEADERS, .*qtlockedfile.h)
-isEmpty(gotqtlockedfile):include(../../qtlockedfile/src/qtlockedfile.pri)
+isEmpty(gotqtlockedfile):include(../qtlockedfile/qtlockedfile.pri)
win32:contains(TEMPLATE, lib):contains(CONFIG, shared) {
|