-rw-r--r-- | Makefile | 619 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 1 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 1 |
3 files changed, 369 insertions, 252 deletions
@@ -1,253 +1,368 @@ | |||
1 | ############################################################################# | 1 | export KDEPIMDIR = $(shell pwd) |
2 | # Makefile for building: kdepim-desktop | 2 | |
3 | # Generated by qmake (1.07a) (Qt 3.3.1) on: Thu Oct 28 15:32:28 2004 | 3 | export KDEPIM_VERSION=$(shell sed -e 's/.*\"\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/' < version) |
4 | # Project: kdepim-desktop.pro | 4 | |
5 | # Template: subdirs | 5 | ifeq ($(PLATFORM) , zaurus) |
6 | # Command: $(QMAKE) -o Makefile kdepim-desktop.pro | 6 | BUILD_NO_LDAP_PLUGIN=1 |
7 | ############################################################################# | 7 | endif |
8 | 8 | ||
9 | MAKEFILE =Makefile | 9 | ifneq ($(PLATFORM) , zaurus) |
10 | QMAKE =qmake | 10 | BUILD_NO_SHARP_PLUGIN=1 |
11 | DEL_FILE = rm -f | 11 | endif |
12 | CHK_DIR_EXISTS= test -d | 12 | |
13 | MKDIR = mkdir -p | 13 | #opie plugin is deprecated. The qtopia plugin handles the task from now on. |
14 | SUBTARGETS = \ | 14 | BUILD_NO_OPIE_PLUGIN=1 |
15 | sub-gammu-emb-common \ | 15 | |
16 | sub-gammu-emb-gammu \ | 16 | SUBDIRS_MICROKDE = \ |
17 | sub-libical \ | 17 | libical/src/libical \ |
18 | sub-libkcal \ | 18 | libical/src/libicalss \ |
19 | sub-microkde \ | 19 | qtcompat \ |
20 | sub-libkdepim \ | 20 | microkde \ |
21 | sub-kabc \ | 21 | libkcal \ |
22 | sub-korganizer \ | 22 | libkdepim \ |
23 | sub-kaddressbook \ | 23 | kabc \ |
24 | sub-kabc-plugins-file \ | 24 | kabc/formats/binary \ |
25 | sub-kabc-plugins-dir \ | 25 | kabc/plugins/file \ |
26 | sub-kabc-plugins-file \ | 26 | kabc/plugins/dir \ |
27 | sub-kabc-plugins-qtopia \ | 27 | korganizer \ |
28 | sub-pwmanager-libcrypt-cipher \ | 28 | kalarmd \ |
29 | sub-pwmanager-libcrypt-error \ | 29 | kaddressbook |
30 | sub-pwmanager-libcrypt-mpi \ | 30 | |
31 | sub-pwmanager-libcrypt-zlib \ | 31 | SUBDIRS_QTOPIA_PLUGIN = \ |
32 | sub-pwmanager-pwmanager | 32 | kabc/plugins/qtopia |
33 | 33 | ||
34 | first: all | 34 | SUBDIRS_OPIE_PLUGIN = \ |
35 | 35 | kabc/plugins/opie | |
36 | all: Makefile $(SUBTARGETS) | 36 | |
37 | 37 | SUBDIRS_SHARP_PLUGIN = \ | |
38 | gammu/emb/common/$(MAKEFILE): | 38 | kabc/plugins/sharpdtm |
39 | @$(CHK_DIR_EXISTS) "gammu/emb/common" || $(MKDIR) "gammu/emb/common" | 39 | |
40 | cd gammu/emb/common && $(QMAKE) common.pro -o $(MAKEFILE) | 40 | SUBDIRS_LDAP_PLUGIN = \ |
41 | sub-gammu-emb-common: gammu/emb/common/$(MAKEFILE) FORCE | 41 | kabc/plugins/ldap |
42 | cd gammu/emb/common && $(MAKE) -f $(MAKEFILE) | 42 | |
43 | 43 | SUBDIRS_MICROMAIL = \ | |
44 | gammu/emb/gammu/$(MAKEFILE): | 44 | kmicromail/libetpan \ |
45 | @$(CHK_DIR_EXISTS) "gammu/emb/gammu" || $(MKDIR) "gammu/emb/gammu" | 45 | kmicromail/libmailwrapper \ |
46 | cd gammu/emb/gammu && $(QMAKE) gammu.pro -o $(MAKEFILE) | 46 | kmicromail |
47 | sub-gammu-emb-gammu: gammu/emb/gammu/$(MAKEFILE) FORCE | 47 | |
48 | cd gammu/emb/gammu && $(MAKE) -f $(MAKEFILE) | 48 | SUBDIRS_GAMMU = \ |
49 | 49 | gammu/emb/common \ | |
50 | libical/$(MAKEFILE): | 50 | gammu/emb/gammu |
51 | @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical" | 51 | |
52 | cd libical && $(QMAKE) libical.pro -o $(MAKEFILE) | 52 | SUBDIRS_PWMANAGER = \ |
53 | sub-libical: libical/$(MAKEFILE) FORCE | 53 | pwmanager/libcrypt/mpi \ |
54 | cd libical && $(MAKE) -f $(MAKEFILE) | 54 | pwmanager/libcrypt/error \ |
55 | 55 | pwmanager/libcrypt/cipher \ | |
56 | libkcal/$(MAKEFILE): | 56 | pwmanager/libcrypt/zlib \ |
57 | @$(CHK_DIR_EXISTS) "libkcal" || $(MKDIR) "libkcal" | 57 | pwmanager/pwmanager |
58 | cd libkcal && $(QMAKE) libkcal.pro -o $(MAKEFILE) | 58 | |
59 | sub-libkcal: libkcal/$(MAKEFILE) FORCE | 59 | SUBDIRS = \ |
60 | cd libkcal && $(MAKE) -f $(MAKEFILE) | 60 | $(SUBDIRS_MICROKDE) \ |
61 | 61 | $(SUBDIRS_QTOPIA_PLUGIN) \ | |
62 | microkde/$(MAKEFILE): | 62 | $(SUBDIRS_OPIE_PLUGIN) \ |
63 | @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde" | 63 | $(SUBDIRS_SHARP_PLUGIN) \ |
64 | cd microkde && $(QMAKE) microkde.pro -o $(MAKEFILE) | 64 | $(SUBDIRS_LDAP_PLUGIN) \ |
65 | sub-microkde: microkde/$(MAKEFILE) FORCE | 65 | $(SUBDIRS_MICROMAIL) \ |
66 | cd microkde && $(MAKE) -f $(MAKEFILE) | 66 | $(SUBDIRS_GAMMU) \ |
67 | 67 | $(SUBDIRS_PWMANAGER) | |
68 | libkdepim/$(MAKEFILE): | 68 | |
69 | @$(CHK_DIR_EXISTS) "libkdepim" || $(MKDIR) "libkdepim" | 69 | |
70 | cd libkdepim && $(QMAKE) libkdepim.pro -o $(MAKEFILE) | 70 | all: build_microkde \ |
71 | sub-libkdepim: libkdepim/$(MAKEFILE) FORCE | 71 | build_qtopia_plugin \ |
72 | cd libkdepim && $(MAKE) -f $(MAKEFILE) | 72 | build_opie_plugin \ |
73 | 73 | build_sharp_plugin \ | |
74 | kabc/$(MAKEFILE): | 74 | build_ldap_plugin \ |
75 | @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc" | 75 | build_micromail \ |
76 | cd kabc && $(QMAKE) kabc.pro -o $(MAKEFILE) | 76 | build_gammu \ |
77 | sub-kabc: kabc/$(MAKEFILE) FORCE | 77 | build_pwmanager |
78 | cd kabc && $(MAKE) -f $(MAKEFILE) | 78 | |
79 | 79 | ||
80 | korganizer/$(MAKEFILE): | 80 | build_microkde: variable_test tmake |
81 | @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer" | 81 | for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ |
82 | cd korganizer && $(QMAKE) korganizer.pro -o $(MAKEFILE) | 82 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
83 | sub-korganizer: korganizer/$(MAKEFILE) FORCE | 83 | done |
84 | cd korganizer && $(MAKE) -f $(MAKEFILE) | 84 | |
85 | 85 | build_qtopia_plugin: build_microkde | |
86 | kaddressbook/$(MAKEFILE): | 86 | ifdef BUILD_NO_QTOPIA_PLUGIN |
87 | @$(CHK_DIR_EXISTS) "kaddressbook" || $(MKDIR) "kaddressbook" | 87 | @echo == qtopia plugin not build. |
88 | cd kaddressbook && $(QMAKE) kaddressbook.pro -o $(MAKEFILE) | 88 | else |
89 | sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE | 89 | for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ |
90 | cd kaddressbook && $(MAKE) -f $(MAKEFILE) | 90 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
91 | 91 | done | |
92 | kabc/plugins/file/$(MAKEFILE): | 92 | endif |
93 | @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file" | 93 | |
94 | cd kabc/plugins/file && $(QMAKE) file.pro -o $(MAKEFILE) | 94 | build_opie_plugin: build_microkde |
95 | sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE | 95 | ifdef BUILD_NO_OPIE_PLUGIN |
96 | cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE) | 96 | @echo == opie plugin not build. |
97 | 97 | else | |
98 | kabc/plugins/dir/$(MAKEFILE): | 98 | for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ |
99 | @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir" | 99 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
100 | cd kabc/plugins/dir && $(QMAKE) dir.pro -o $(MAKEFILE) | 100 | done |
101 | sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE | 101 | endif |
102 | cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE) | 102 | |
103 | 103 | build_sharp_plugin: build_microkde | |
104 | kabc/plugins/file/$(MAKEFILE): | 104 | ifdef BUILD_NO_SHARP_PLUGIN |
105 | @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file" | 105 | @echo == ldap plugin not build. |
106 | cd kabc/plugins/file && $(QMAKE) file.pro -o $(MAKEFILE) | 106 | else |
107 | sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE | 107 | for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ |
108 | cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE) | 108 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
109 | 109 | done | |
110 | kabc/plugins/qtopia/$(MAKEFILE): | 110 | endif |
111 | @$(CHK_DIR_EXISTS) "kabc/plugins/qtopia" || $(MKDIR) "kabc/plugins/qtopia" | 111 | |
112 | cd kabc/plugins/qtopia && $(QMAKE) qtopia.pro -o $(MAKEFILE) | 112 | build_ldap_plugin: build_microkde |
113 | sub-kabc-plugins-qtopia: kabc/plugins/qtopia/$(MAKEFILE) FORCE | 113 | ifdef BUILD_NO_LDAP_PLUGIN |
114 | cd kabc/plugins/qtopia && $(MAKE) -f $(MAKEFILE) | 114 | @echo == ldap plugin not build. |
115 | 115 | else | |
116 | pwmanager/libcrypt/cipher/$(MAKEFILE): | 116 | for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ |
117 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/cipher" || $(MKDIR) "pwmanager/libcrypt/cipher" | 117 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
118 | cd pwmanager/libcrypt/cipher && $(QMAKE) cipher.pro -o $(MAKEFILE) | 118 | done |
119 | sub-pwmanager-libcrypt-cipher: pwmanager/libcrypt/cipher/$(MAKEFILE) FORCE | 119 | endif |
120 | cd pwmanager/libcrypt/cipher && $(MAKE) -f $(MAKEFILE) | 120 | |
121 | 121 | ||
122 | pwmanager/libcrypt/error/$(MAKEFILE): | 122 | build_micromail: build_microkde |
123 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/error" || $(MKDIR) "pwmanager/libcrypt/error" | 123 | ifdef BUILD_NO_MICROMAIL |
124 | cd pwmanager/libcrypt/error && $(QMAKE) error.pro -o $(MAKEFILE) | 124 | @echo == kmicromail not build. |
125 | sub-pwmanager-libcrypt-error: pwmanager/libcrypt/error/$(MAKEFILE) FORCE | 125 | else |
126 | cd pwmanager/libcrypt/error && $(MAKE) -f $(MAKEFILE) | 126 | for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ |
127 | 127 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | |
128 | pwmanager/libcrypt/mpi/$(MAKEFILE): | 128 | done |
129 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/mpi" || $(MKDIR) "pwmanager/libcrypt/mpi" | 129 | endif |
130 | cd pwmanager/libcrypt/mpi && $(QMAKE) mpi.pro -o $(MAKEFILE) | 130 | |
131 | sub-pwmanager-libcrypt-mpi: pwmanager/libcrypt/mpi/$(MAKEFILE) FORCE | 131 | build_gammu: variable_test tmake |
132 | cd pwmanager/libcrypt/mpi && $(MAKE) -f $(MAKEFILE) | 132 | ifdef BUILD_NO_GAMMU |
133 | 133 | @echo == gammu not build. | |
134 | pwmanager/libcrypt/zlib/$(MAKEFILE): | 134 | else |
135 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/zlib" || $(MKDIR) "pwmanager/libcrypt/zlib" | 135 | for i in $(SUBDIRS_GAMMU); do pushd $$i; \ |
136 | cd pwmanager/libcrypt/zlib && $(QMAKE) zlib.pro -o $(MAKEFILE) | 136 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
137 | sub-pwmanager-libcrypt-zlib: pwmanager/libcrypt/zlib/$(MAKEFILE) FORCE | 137 | done |
138 | cd pwmanager/libcrypt/zlib && $(MAKE) -f $(MAKEFILE) | 138 | endif |
139 | 139 | ||
140 | pwmanager/pwmanager/$(MAKEFILE): | 140 | build_pwmanager: build_microkde |
141 | @$(CHK_DIR_EXISTS) "pwmanager/pwmanager" || $(MKDIR) "pwmanager/pwmanager" | 141 | ifdef BUILD_NO_PWMANAGER |
142 | cd pwmanager/pwmanager && $(QMAKE) pwmanager.pro -o $(MAKEFILE) | 142 | @echo == pwmanager not build. |
143 | sub-pwmanager-pwmanager: pwmanager/pwmanager/$(MAKEFILE) FORCE | 143 | else |
144 | cd pwmanager/pwmanager && $(MAKE) -f $(MAKEFILE) | 144 | for i in $(SUBDIRS_PWMANAGER); do pushd $$i; \ |
145 | 145 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | |
146 | Makefile: kdepim-desktop.pro /usr/lib/qt3/mkspecs/default/qmake.conf | 146 | done |
147 | $(QMAKE) -o Makefile kdepim-desktop.pro | 147 | endif |
148 | qmake: qmake_all | 148 | |
149 | @$(QMAKE) -o Makefile kdepim-desktop.pro | 149 | |
150 | 150 | variable_info: | |
151 | all: $(SUBTARGETS) | 151 | @echo -------------------------------------- |
152 | qmake_all: gammu/emb/common/$(MAKEFILE) gammu/emb/gammu/$(MAKEFILE) libical/$(MAKEFILE) libkcal/$(MAKEFILE) microkde/$(MAKEFILE) libkdepim/$(MAKEFILE) kabc/$(MAKEFILE) korganizer/$(MAKEFILE) kaddressbook/$(MAKEFILE) kabc/plugins/file/$(MAKEFILE) kabc/plugins/dir/$(MAKEFILE) kabc/plugins/file/$(MAKEFILE) kabc/plugins/qtopia/$(MAKEFILE) pwmanager/libcrypt/cipher/$(MAKEFILE) pwmanager/libcrypt/error/$(MAKEFILE) pwmanager/libcrypt/mpi/$(MAKEFILE) pwmanager/libcrypt/zlib/$(MAKEFILE) pwmanager/pwmanager/$(MAKEFILE) | 152 | @echo KDEPIM buildsystem, variableinfo... |
153 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 153 | @echo KDEPIMDIR=$(KDEPIMDIR) |
154 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 154 | @echo QTDIR=$(QTDIR) |
155 | ( [ -d libical ] && cd libical ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 155 | @echo QPEDIR=$(QPEDIR) |
156 | ( [ -d libkcal ] && cd libkcal ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 156 | @echo OPIEDIR=$(OPIEDIR) |
157 | ( [ -d microkde ] && cd microkde ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 157 | @echo PLATFORM=$(PLATFORM) |
158 | ( [ -d libkdepim ] && cd libkdepim ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 158 | @echo RELEASE_DEBUG=$(RELEASE_DEBUG) |
159 | ( [ -d kabc ] && cd kabc ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 159 | @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) |
160 | ( [ -d korganizer ] && cd korganizer ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 160 | @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) |
161 | ( [ -d kaddressbook ] && cd kaddressbook ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 161 | @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) |
162 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 162 | @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN) |
163 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 163 | @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) |
164 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 164 | ifndef BUILD_NO_SHARP_PLUGIN |
165 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 165 | @echo SHARPDTMSDK=$(SHARPDTMSDK) |
166 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 166 | endif |
167 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 167 | @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) |
168 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 168 | @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER) |
169 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 169 | @echo -------------------------------------- |
170 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 170 | |
171 | clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE | 171 | variable_test: variable_info |
172 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 172 | @echo KDEPIM buildsystem, variablecheck... |
173 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 173 | ifndef KDEPIMDIR |
174 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 174 | @echo KDEPIMDIR is not defined. |
175 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 175 | $(error KDEPIMDIR is not defined) |
176 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 176 | endif |
177 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 177 | ifndef PLATFORM |
178 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 178 | @echo PLATFORM is not defined. |
179 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 179 | $(error PLATFORM is not defined) |
180 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 180 | endif |
181 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 181 | ifdef BUILD_NO_LDAP_PLUGIN |
182 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 182 | @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) |
183 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 183 | endif |
184 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 184 | ifdef BUILD_NO_OPIE_PLUGIN |
185 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 185 | @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) |
186 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 186 | endif |
187 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 187 | ifdef BUILD_NO_QTOPIA_PLUGIN |
188 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 188 | @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN) |
189 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 189 | endif |
190 | uninstall_subdirs: qmake_all FORCE | 190 | ifdef BUILD_NO_MICROMAIL |
191 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 191 | @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) |
192 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 192 | endif |
193 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 193 | ifdef BUILD_NO_SHARP_PLUGIN |
194 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 194 | @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) |
195 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 195 | else |
196 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 196 | ifndef SHARPDTMSDK |
197 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 197 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) |
198 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 198 | $(error SHARPDTMSDK is not defined) |
199 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 199 | endif |
200 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 200 | endif |
201 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 201 | ifdef BUILD_NO_GAMMU |
202 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 202 | @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU) |
203 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 203 | endif |
204 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 204 | ifdef BUILD_NO_PWMANAGER |
205 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 205 | @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER) |
206 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 206 | endif |
207 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 207 | @echo -------------------------------------- |
208 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 208 | |
209 | install_subdirs: qmake_all FORCE | 209 | |
210 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) install; ) || true | 210 | objects: |
211 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) install; ) || true | 211 | for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done |
212 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) install; ) || true | 212 | for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done |
213 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) install; ) || true | 213 | mkdir -p libical/lib/$(PLATFORM) |
214 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) install; ) || true | 214 | mkdir -p pwmanager/libcrypt/$(PLATFORM) |
215 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) install; ) || true | 215 | |
216 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) install; ) || true | 216 | clean: |
217 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) install; ) || true | 217 | rm -rf libical/lib/$(PLATFORM)/*; |
218 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) install; ) || true | 218 | rm -rf pwmanager/libcrypt/$(PLATFORM)/*; |
219 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true | 219 | for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ |
220 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) install; ) || true | 220 | rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ |
221 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true | 221 | done |
222 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) install; ) || true | 222 | |
223 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) install; ) || true | 223 | install: |
224 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) install; ) || true | 224 | |
225 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) install; ) || true | 225 | cd bin/kdepim; make install |
226 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) install; ) || true | 226 | cp -r Pim $(QPEDIR)/apps |
227 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) install; ) || true | 227 | cp db2file/db2file $(QPEDIR)/bin/db2file |
228 | distclean: qmake_all FORCE | 228 | cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop |
229 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 229 | cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop |
230 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 230 | cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop |
231 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 231 | cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop |
232 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 232 | |
233 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 233 | dist: |
234 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 234 | @echo Dont forget to do "make install" before "make dist" |
235 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 235 | rm -f *arm.ipk |
236 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 236 | rm -f *~ |
237 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 237 | cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim |
238 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 238 | mkipks kmicrokdelibs.control |
239 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 239 | mkipks korganizer.control |
240 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 240 | mkipks kaddressbook.control |
241 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 241 | ifndef BUILD_NO_MICROMAIL |
242 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 242 | mkipks kopiemail.control |
243 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 243 | endif |
244 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 244 | ifndef BUILD_NO_SHARP_PLUGIN |
245 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 245 | mkipks ksharpPIM-DTMaccess.control |
246 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 246 | endif |
247 | 247 | mkipks korganizer-alarm.control | |
248 | install: install_subdirs | 248 | ifndef BUILD_NO_GAMMU |
249 | 249 | mkipks kmobilephoneaccess.control | |
250 | uninstall: uninstall_subdirs | 250 | endif |
251 | 251 | ifndef BUILD_NO_PWMANAGER | |
252 | FORCE: | 252 | mkipks pwmanager.control |
253 | endif | ||
254 | mkipks pimTABicon.control | ||
255 | |||
256 | tmake: objects \ | ||
257 | qtcompat/Makefile$(PLATFORM) \ | ||
258 | microkde/Makefile$(PLATFORM) \ | ||
259 | libkcal/Makefile$(PLATFORM) \ | ||
260 | libkdepim/Makefile$(PLATFORM) \ | ||
261 | korganizer/Makefile$(PLATFORM) \ | ||
262 | kalarmd/Makefile$(PLATFORM) \ | ||
263 | libical/src/libical/Makefile$(PLATFORM) \ | ||
264 | libical/src/libicalss/Makefile$(PLATFORM) \ | ||
265 | kabc/Makefile$(PLATFORM) \ | ||
266 | kabc/formats/binary/Makefile$(PLATFORM) \ | ||
267 | kabc/plugins/file/Makefile$(PLATFORM) \ | ||
268 | kabc/plugins/dir/Makefile$(PLATFORM) \ | ||
269 | kabc/plugins/ldap/Makefile$(PLATFORM) \ | ||
270 | kabc/plugins/opie/Makefile$(PLATFORM) \ | ||
271 | kabc/plugins/qtopia/Makefile$(PLATFORM) \ | ||
272 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ | ||
273 | kaddressbook/Makefile$(PLATFORM) \ | ||
274 | kmicromail/Makefile$(PLATFORM) \ | ||
275 | kmicromail/libetpan/Makefile$(PLATFORM) \ | ||
276 | kmicromail/libmailwrapper/Makefile$(PLATFORM) \ | ||
277 | gammu/emb/common/Makefile$(PLATFORM) \ | ||
278 | gammu/emb/gammu/Makefile$(PLATFORM) \ | ||
279 | pwmanager/pwmanager/Makefile$(PLATFORM) \ | ||
280 | pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \ | ||
281 | pwmanager/libcrypt/error/Makefile$(PLATFORM) \ | ||
282 | pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \ | ||
283 | pwmanager/libcrypt/zlib/Makefile$(PLATFORM) | ||
284 | |||
285 | qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro | ||
286 | cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM) | ||
287 | |||
288 | microkde/Makefile$(PLATFORM): microkde/microkdeE.pro | ||
289 | cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM) | ||
290 | |||
291 | libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro | ||
292 | cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM) | ||
293 | |||
294 | |||
295 | libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro | ||
296 | cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM) | ||
297 | |||
298 | kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro | ||
299 | cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM) | ||
300 | |||
301 | korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro | ||
302 | cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM) | ||
303 | |||
304 | libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro | ||
305 | cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM) | ||
306 | |||
307 | libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro | ||
308 | cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM) | ||
309 | |||
310 | kabc/Makefile$(PLATFORM): kabc/kabcE.pro | ||
311 | cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM) | ||
312 | |||
313 | kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro | ||
314 | cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) | ||
315 | |||
316 | kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro | ||
317 | cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM) | ||
318 | |||
319 | kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro | ||
320 | cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM) | ||
321 | |||
322 | kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro | ||
323 | cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM) | ||
324 | |||
325 | kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro | ||
326 | cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM) | ||
327 | |||
328 | kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro | ||
329 | cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM) | ||
330 | |||
331 | kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro | ||
332 | cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM) | ||
333 | |||
334 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro | ||
335 | cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM) | ||
336 | |||
337 | kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro | ||
338 | cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM) | ||
339 | |||
340 | kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro | ||
341 | cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM) | ||
342 | |||
343 | kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro | ||
344 | cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM) | ||
345 | |||
346 | gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro | ||
347 | cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM) | ||
348 | |||
349 | gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro | ||
350 | cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM) | ||
351 | |||
352 | pwmanager/pwmanager/Makefile$(PLATFORM): pwmanager/pwmanager/pwmanagerE.pro | ||
353 | cd pwmanager/pwmanager; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" pwmanagerE.pro -o Makefile$(PLATFORM) | ||
354 | |||
355 | |||
356 | pwmanager/libcrypt/mpi/Makefile$(PLATFORM): pwmanager/libcrypt/mpi/mpi.pro | ||
357 | cd pwmanager/libcrypt/mpi;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" mpi.pro -o Makefile$(PLATFORM) | ||
358 | |||
359 | pwmanager/libcrypt/error/Makefile$(PLATFORM): pwmanager/libcrypt/error/error.pro | ||
360 | cd pwmanager/libcrypt/error;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" error.pro -o Makefile$(PLATFORM) | ||
361 | |||
362 | pwmanager/libcrypt/cipher/Makefile$(PLATFORM): pwmanager/libcrypt/cipher/cipher.pro | ||
363 | cd pwmanager/libcrypt/cipher;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" cipher.pro -o Makefile$(PLATFORM) | ||
364 | |||
365 | pwmanager/libcrypt/zlib/Makefile$(PLATFORM): pwmanager/libcrypt/zlib/zlib.pro | ||
366 | cd pwmanager/libcrypt/zlib;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" zlib.pro -o Makefile$(PLATFORM) | ||
367 | |||
253 | 368 | ||
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index ea103a9..273d435 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2664,256 +2664,257 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2664 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2664 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2665 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | 2665 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); |
2666 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | 2666 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); |
2667 | } | 2667 | } |
2668 | inL.setResource( 0 ); | 2668 | inL.setResource( 0 ); |
2669 | local->insertAddressee( inL , false ); | 2669 | local->insertAddressee( inL , false ); |
2670 | ++changedLocal; | 2670 | ++changedLocal; |
2671 | } | 2671 | } |
2672 | } | 2672 | } |
2673 | } | 2673 | } |
2674 | } else { // no conflict ********** add or delete remote | 2674 | } else { // no conflict ********** add or delete remote |
2675 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2675 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2676 | QString des = addresseeLSync.note(); | 2676 | QString des = addresseeLSync.note(); |
2677 | if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it | 2677 | if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it |
2678 | inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); | 2678 | inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); |
2679 | remote->insertAddressee( inR, false ); | 2679 | remote->insertAddressee( inR, false ); |
2680 | ++deletedAddresseeR; | 2680 | ++deletedAddresseeR; |
2681 | } else { | 2681 | } else { |
2682 | inR.setRevision( modifiedCalendar ); | 2682 | inR.setRevision( modifiedCalendar ); |
2683 | remote->insertAddressee( inR, false ); | 2683 | remote->insertAddressee( inR, false ); |
2684 | inL = inR; | 2684 | inL = inR; |
2685 | inL.setIDStr( ":" ); | 2685 | inL.setIDStr( ":" ); |
2686 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | 2686 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); |
2687 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | 2687 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); |
2688 | inL.setResource( 0 ); | 2688 | inL.setResource( 0 ); |
2689 | local->insertAddressee( inL , false); | 2689 | local->insertAddressee( inL , false); |
2690 | ++addedAddressee; | 2690 | ++addedAddressee; |
2691 | } | 2691 | } |
2692 | } else { | 2692 | } else { |
2693 | if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { | 2693 | if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { |
2694 | inR.setRevision( modifiedCalendar ); | 2694 | inR.setRevision( modifiedCalendar ); |
2695 | remote->insertAddressee( inR, false ); | 2695 | remote->insertAddressee( inR, false ); |
2696 | inR.setResource( 0 ); | 2696 | inR.setResource( 0 ); |
2697 | local->insertAddressee( inR, false ); | 2697 | local->insertAddressee( inR, false ); |
2698 | ++addedAddressee; | 2698 | ++addedAddressee; |
2699 | } else { | 2699 | } else { |
2700 | // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); | 2700 | // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); |
2701 | remote->removeAddressee( inR ); | 2701 | remote->removeAddressee( inR ); |
2702 | ++deletedAddresseeR; | 2702 | ++deletedAddresseeR; |
2703 | } | 2703 | } |
2704 | } | 2704 | } |
2705 | } | 2705 | } |
2706 | } | 2706 | } |
2707 | ++incCounter; | 2707 | ++incCounter; |
2708 | } | 2708 | } |
2709 | er.clear(); | 2709 | er.clear(); |
2710 | QStringList el = local->uidList(); | 2710 | QStringList el = local->uidList(); |
2711 | modulo = (el.count()/10)+1; | 2711 | modulo = (el.count()/10)+1; |
2712 | 2712 | ||
2713 | syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); | 2713 | syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); |
2714 | incCounter = 0; | 2714 | incCounter = 0; |
2715 | while ( incCounter < el.count()) { | 2715 | while ( incCounter < el.count()) { |
2716 | qApp->processEvents(); | 2716 | qApp->processEvents(); |
2717 | if (syncManager->isProgressBarCanceled()) | 2717 | if (syncManager->isProgressBarCanceled()) |
2718 | return false; | 2718 | return false; |
2719 | if ( incCounter % modulo == 0 ) | 2719 | if ( incCounter % modulo == 0 ) |
2720 | syncManager->showProgressBar(incCounter); | 2720 | syncManager->showProgressBar(incCounter); |
2721 | uid = el[ incCounter ]; | 2721 | uid = el[ incCounter ]; |
2722 | bool skipIncidence = false; | 2722 | bool skipIncidence = false; |
2723 | if ( uid.left(19) == QString("last-syncAddressee-") ) | 2723 | if ( uid.left(19) == QString("last-syncAddressee-") ) |
2724 | skipIncidence = true; | 2724 | skipIncidence = true; |
2725 | if ( !skipIncidence ) { | 2725 | if ( !skipIncidence ) { |
2726 | inL = local->findByUid( uid ); | 2726 | inL = local->findByUid( uid ); |
2727 | if ( !inL.resource() || inL.resource()->includeInSync() ) { | 2727 | if ( !inL.resource() || inL.resource()->includeInSync() ) { |
2728 | inR = remote->findByUid( uid ); | 2728 | inR = remote->findByUid( uid ); |
2729 | if ( inR.isEmpty() ) { // no conflict ********** add or delete local | 2729 | if ( inR.isEmpty() ) { // no conflict ********** add or delete local |
2730 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2730 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2731 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { | 2731 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { |
2732 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 2732 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
2733 | local->removeAddressee( inL ); | 2733 | local->removeAddressee( inL ); |
2734 | ++deletedAddresseeL; | 2734 | ++deletedAddresseeL; |
2735 | } else { | 2735 | } else { |
2736 | if ( ! syncManager->mWriteBackExistingOnly ) { | 2736 | if ( ! syncManager->mWriteBackExistingOnly ) { |
2737 | inL.removeID(mCurrentSyncDevice ); | 2737 | inL.removeID(mCurrentSyncDevice ); |
2738 | ++addedAddresseeR; | 2738 | ++addedAddresseeR; |
2739 | inL.setRevision( modifiedCalendar ); | 2739 | inL.setRevision( modifiedCalendar ); |
2740 | local->insertAddressee( inL, false ); | 2740 | local->insertAddressee( inL, false ); |
2741 | inR = inL; | 2741 | inR = inL; |
2742 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); | 2742 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); |
2743 | inR.setResource( 0 ); | 2743 | inR.setResource( 0 ); |
2744 | remote->insertAddressee( inR, false ); | 2744 | remote->insertAddressee( inR, false ); |
2745 | } | 2745 | } |
2746 | } | 2746 | } |
2747 | } else { | 2747 | } else { |
2748 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { | 2748 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { |
2749 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 2749 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
2750 | local->removeAddressee( inL ); | 2750 | local->removeAddressee( inL ); |
2751 | ++deletedAddresseeL; | 2751 | ++deletedAddresseeL; |
2752 | } else { | 2752 | } else { |
2753 | if ( ! syncManager->mWriteBackExistingOnly ) { | 2753 | if ( ! syncManager->mWriteBackExistingOnly ) { |
2754 | ++addedAddresseeR; | 2754 | ++addedAddresseeR; |
2755 | inL.setRevision( modifiedCalendar ); | 2755 | inL.setRevision( modifiedCalendar ); |
2756 | local->insertAddressee( inL, false ); | 2756 | local->insertAddressee( inL, false ); |
2757 | inR = inL; | 2757 | inR = inL; |
2758 | inR.setIDStr( ":" ); | 2758 | inR.setIDStr( ":" ); |
2759 | inR.setResource( 0 ); | 2759 | inR.setResource( 0 ); |
2760 | remote->insertAddressee( inR, false ); | 2760 | remote->insertAddressee( inR, false ); |
2761 | } | 2761 | } |
2762 | } | 2762 | } |
2763 | } | 2763 | } |
2764 | } | 2764 | } |
2765 | } | 2765 | } |
2766 | } | 2766 | } |
2767 | ++incCounter; | 2767 | ++incCounter; |
2768 | } | 2768 | } |
2769 | el.clear(); | 2769 | el.clear(); |
2770 | syncManager->hideProgressBar(); | 2770 | syncManager->hideProgressBar(); |
2771 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); | 2771 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); |
2772 | // get rid of micro seconds | 2772 | // get rid of micro seconds |
2773 | QTime t = mLastAddressbookSync.time(); | 2773 | QTime t = mLastAddressbookSync.time(); |
2774 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); | 2774 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); |
2775 | addresseeLSync.setRevision( mLastAddressbookSync ); | 2775 | addresseeLSync.setRevision( mLastAddressbookSync ); |
2776 | addresseeRSync.setRevision( mLastAddressbookSync ); | 2776 | addresseeRSync.setRevision( mLastAddressbookSync ); |
2777 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; | 2777 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; |
2778 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); | 2778 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); |
2779 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; | 2779 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; |
2780 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); | 2780 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); |
2781 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; | 2781 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; |
2782 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); | 2782 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); |
2783 | addresseeRSync.setNote( "" ) ; | 2783 | addresseeRSync.setNote( "" ) ; |
2784 | addresseeLSync.setNote( "" ); | 2784 | addresseeLSync.setNote( "" ); |
2785 | 2785 | ||
2786 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) | 2786 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) |
2787 | remote->insertAddressee( addresseeRSync, false ); | 2787 | remote->insertAddressee( addresseeRSync, false ); |
2788 | local->insertAddressee( addresseeLSync, false ); | 2788 | local->insertAddressee( addresseeLSync, false ); |
2789 | QString mes; | 2789 | QString mes; |
2790 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR ); | 2790 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR ); |
2791 | qDebug( mes ); | 2791 | qDebug( mes ); |
2792 | mes = i18n("Local addressbook changed!\n") +mes; | ||
2792 | if ( syncManager->mShowSyncSummary ) { | 2793 | if ( syncManager->mShowSyncSummary ) { |
2793 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, | 2794 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, |
2794 | i18n("KA/Pi Synchronization"),i18n("Write back"))) { | 2795 | i18n("KA/Pi Synchronization"),i18n("Write back"))) { |
2795 | qDebug("cancelled "); | 2796 | qDebug("cancelled "); |
2796 | return false; | 2797 | return false; |
2797 | } | 2798 | } |
2798 | } | 2799 | } |
2799 | return syncOK; | 2800 | return syncOK; |
2800 | } | 2801 | } |
2801 | 2802 | ||
2802 | 2803 | ||
2803 | //this is a overwritten callbackmethods from the syncinterface | 2804 | //this is a overwritten callbackmethods from the syncinterface |
2804 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | 2805 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) |
2805 | { | 2806 | { |
2806 | 2807 | ||
2807 | //pending prepare addresseeview for output | 2808 | //pending prepare addresseeview for output |
2808 | //pending detect, if remote file has REV field. if not switch to external sync | 2809 | //pending detect, if remote file has REV field. if not switch to external sync |
2809 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 2810 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
2810 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 2811 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
2811 | 2812 | ||
2812 | AddressBook abLocal(filename,"syncContact"); | 2813 | AddressBook abLocal(filename,"syncContact"); |
2813 | bool syncOK = false; | 2814 | bool syncOK = false; |
2814 | if ( abLocal.load() ) { | 2815 | if ( abLocal.load() ) { |
2815 | qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); | 2816 | qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); |
2816 | bool external = false; | 2817 | bool external = false; |
2817 | bool isXML = false; | 2818 | bool isXML = false; |
2818 | if ( filename.right(4) == ".xml") { | 2819 | if ( filename.right(4) == ".xml") { |
2819 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2820 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2820 | isXML = true; | 2821 | isXML = true; |
2821 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); | 2822 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); |
2822 | } else { | 2823 | } else { |
2823 | external = !manager->mIsKapiFile; | 2824 | external = !manager->mIsKapiFile; |
2824 | if ( external ) { | 2825 | if ( external ) { |
2825 | qDebug("Setting vcf mode to external "); | 2826 | qDebug("Setting vcf mode to external "); |
2826 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2827 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2827 | AddressBook::Iterator it; | 2828 | AddressBook::Iterator it; |
2828 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 2829 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
2829 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); | 2830 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); |
2830 | (*it).computeCsum( mCurrentSyncDevice ); | 2831 | (*it).computeCsum( mCurrentSyncDevice ); |
2831 | } | 2832 | } |
2832 | } | 2833 | } |
2833 | } | 2834 | } |
2834 | //AddressBook::Iterator it; | 2835 | //AddressBook::Iterator it; |
2835 | //QStringList vcards; | 2836 | //QStringList vcards; |
2836 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 2837 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
2837 | // qDebug("Name %s ", (*it).familyName().latin1()); | 2838 | // qDebug("Name %s ", (*it).familyName().latin1()); |
2838 | //} | 2839 | //} |
2839 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); | 2840 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); |
2840 | if ( syncOK ) { | 2841 | if ( syncOK ) { |
2841 | if ( syncManager->mWriteBackFile ) | 2842 | if ( syncManager->mWriteBackFile ) |
2842 | { | 2843 | { |
2843 | if ( external ) | 2844 | if ( external ) |
2844 | abLocal.removeSyncAddressees( !isXML); | 2845 | abLocal.removeSyncAddressees( !isXML); |
2845 | qDebug("Saving remote AB "); | 2846 | qDebug("Saving remote AB "); |
2846 | if ( ! abLocal.saveAB()) | 2847 | if ( ! abLocal.saveAB()) |
2847 | qDebug("Error writing back AB to file "); | 2848 | qDebug("Error writing back AB to file "); |
2848 | if ( external ) { | 2849 | if ( external ) { |
2849 | // afterwrite processing | 2850 | // afterwrite processing |
2850 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); | 2851 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); |
2851 | } | 2852 | } |
2852 | } | 2853 | } |
2853 | } | 2854 | } |
2854 | setModified(); | 2855 | setModified(); |
2855 | 2856 | ||
2856 | } | 2857 | } |
2857 | if ( syncOK ) | 2858 | if ( syncOK ) |
2858 | mViewManager->refreshView(); | 2859 | mViewManager->refreshView(); |
2859 | return syncOK; | 2860 | return syncOK; |
2860 | 2861 | ||
2861 | } | 2862 | } |
2862 | void KABCore::removeSyncInfo( QString syncProfile) | 2863 | void KABCore::removeSyncInfo( QString syncProfile) |
2863 | { | 2864 | { |
2864 | qDebug("AB:removeSyncInfo for profile %s ", syncProfile.latin1()); | 2865 | qDebug("AB:removeSyncInfo for profile %s ", syncProfile.latin1()); |
2865 | mAddressBook->removeSyncInfo( syncProfile ); | 2866 | mAddressBook->removeSyncInfo( syncProfile ); |
2866 | setModified(); | 2867 | setModified(); |
2867 | } | 2868 | } |
2868 | 2869 | ||
2869 | 2870 | ||
2870 | //this is a overwritten callbackmethods from the syncinterface | 2871 | //this is a overwritten callbackmethods from the syncinterface |
2871 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) | 2872 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) |
2872 | { | 2873 | { |
2873 | if ( resource == "phone" ) | 2874 | if ( resource == "phone" ) |
2874 | return syncPhone(); | 2875 | return syncPhone(); |
2875 | disableBR( true ); | 2876 | disableBR( true ); |
2876 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 2877 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
2877 | 2878 | ||
2878 | AddressBook abLocal( resource,"syncContact"); | 2879 | AddressBook abLocal( resource,"syncContact"); |
2879 | bool syncOK = false; | 2880 | bool syncOK = false; |
2880 | if ( abLocal.load() ) { | 2881 | if ( abLocal.load() ) { |
2881 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 2882 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
2882 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2883 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2883 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); | 2884 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); |
2884 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 2885 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
2885 | if ( syncOK ) { | 2886 | if ( syncOK ) { |
2886 | if ( syncManager->mWriteBackFile ) { | 2887 | if ( syncManager->mWriteBackFile ) { |
2887 | abLocal.removeSyncAddressees( false ); | 2888 | abLocal.removeSyncAddressees( false ); |
2888 | abLocal.saveAB(); | 2889 | abLocal.saveAB(); |
2889 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); | 2890 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); |
2890 | } | 2891 | } |
2891 | } else | 2892 | } else |
2892 | message( i18n("Sync cancelled or failed.") ); | 2893 | message( i18n("Sync cancelled or failed.") ); |
2893 | setModified(); | 2894 | setModified(); |
2894 | } | 2895 | } |
2895 | if ( syncOK ) | 2896 | if ( syncOK ) |
2896 | mViewManager->refreshView(); | 2897 | mViewManager->refreshView(); |
2897 | disableBR( false ); | 2898 | disableBR( false ); |
2898 | return syncOK; | 2899 | return syncOK; |
2899 | 2900 | ||
2900 | } | 2901 | } |
2901 | void KABCore::message( QString m ) | 2902 | void KABCore::message( QString m ) |
2902 | { | 2903 | { |
2903 | topLevelWidget()->setCaption( m ); | 2904 | topLevelWidget()->setCaption( m ); |
2904 | mMessageTimer->start( 15000, true ); | 2905 | mMessageTimer->start( 15000, true ); |
2905 | } | 2906 | } |
2906 | bool KABCore::syncPhone() | 2907 | bool KABCore::syncPhone() |
2907 | { | 2908 | { |
2908 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2909 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2909 | QString fileName = getPhoneFile(); | 2910 | QString fileName = getPhoneFile(); |
2910 | if ( !PhoneAccess::readFromPhone( fileName) ) { | 2911 | if ( !PhoneAccess::readFromPhone( fileName) ) { |
2911 | message(i18n("Phone access failed!")); | 2912 | message(i18n("Phone access failed!")); |
2912 | return false; | 2913 | return false; |
2913 | } | 2914 | } |
2914 | AddressBook abLocal( fileName,"syncContact"); | 2915 | AddressBook abLocal( fileName,"syncContact"); |
2915 | bool syncOK = false; | 2916 | bool syncOK = false; |
2916 | { | 2917 | { |
2917 | abLocal.importFromFile( fileName ); | 2918 | abLocal.importFromFile( fileName ); |
2918 | qDebug("AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 2919 | qDebug("AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
2919 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2920 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 4e29d6f..59bf615 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1071,256 +1071,257 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1071 | inL = inR->clone(); | 1071 | inL = inR->clone(); |
1072 | inL->setIDStr( ":" ); | 1072 | inL->setIDStr( ":" ); |
1073 | local->addIncidence( inL ); | 1073 | local->addIncidence( inL ); |
1074 | ++addedEvent; | 1074 | ++addedEvent; |
1075 | } else { | 1075 | } else { |
1076 | checkExternSyncEvent(eventRSyncSharp, inR); | 1076 | checkExternSyncEvent(eventRSyncSharp, inR); |
1077 | remote->deleteIncidence( inR ); | 1077 | remote->deleteIncidence( inR ); |
1078 | ++deletedEventR; | 1078 | ++deletedEventR; |
1079 | } | 1079 | } |
1080 | } | 1080 | } |
1081 | } | 1081 | } |
1082 | } | 1082 | } |
1083 | inR = er.next(); | 1083 | inR = er.next(); |
1084 | } | 1084 | } |
1085 | QPtrList<Incidence> el = local->rawIncidences(); | 1085 | QPtrList<Incidence> el = local->rawIncidences(); |
1086 | inL = el.first(); | 1086 | inL = el.first(); |
1087 | modulo = (el.count()/10)+1; | 1087 | modulo = (el.count()/10)+1; |
1088 | bar.setCaption (i18n("Add / remove events") ); | 1088 | bar.setCaption (i18n("Add / remove events") ); |
1089 | bar.setTotalSteps ( el.count() ) ; | 1089 | bar.setTotalSteps ( el.count() ) ; |
1090 | bar.show(); | 1090 | bar.show(); |
1091 | incCounter = 0; | 1091 | incCounter = 0; |
1092 | 1092 | ||
1093 | while ( inL ) { | 1093 | while ( inL ) { |
1094 | 1094 | ||
1095 | qApp->processEvents(); | 1095 | qApp->processEvents(); |
1096 | if ( ! bar.isVisible() ) | 1096 | if ( ! bar.isVisible() ) |
1097 | return false; | 1097 | return false; |
1098 | if ( incCounter % modulo == 0 ) | 1098 | if ( incCounter % modulo == 0 ) |
1099 | bar.setProgress( incCounter ); | 1099 | bar.setProgress( incCounter ); |
1100 | ++incCounter; | 1100 | ++incCounter; |
1101 | uid = inL->uid(); | 1101 | uid = inL->uid(); |
1102 | bool skipIncidence = false; | 1102 | bool skipIncidence = false; |
1103 | if ( uid.left(15) == QString("last-syncEvent-") ) | 1103 | if ( uid.left(15) == QString("last-syncEvent-") ) |
1104 | skipIncidence = true; | 1104 | skipIncidence = true; |
1105 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->type() == "Journal" ) | 1105 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->type() == "Journal" ) |
1106 | skipIncidence = true; | 1106 | skipIncidence = true; |
1107 | if ( !skipIncidence ) { | 1107 | if ( !skipIncidence ) { |
1108 | inR = remote->incidence( uid ); | 1108 | inR = remote->incidence( uid ); |
1109 | if ( ! inR ) { // no conflict ********** add or delete local | 1109 | if ( ! inR ) { // no conflict ********** add or delete local |
1110 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1110 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1111 | if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { | 1111 | if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { |
1112 | checkExternSyncEvent(eventLSyncSharp, inL); | 1112 | checkExternSyncEvent(eventLSyncSharp, inL); |
1113 | local->deleteIncidence( inL ); | 1113 | local->deleteIncidence( inL ); |
1114 | ++deletedEventL; | 1114 | ++deletedEventL; |
1115 | } else { | 1115 | } else { |
1116 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1116 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1117 | inL->removeID(mCurrentSyncDevice ); | 1117 | inL->removeID(mCurrentSyncDevice ); |
1118 | ++addedEventR; | 1118 | ++addedEventR; |
1119 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); | 1119 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); |
1120 | inL->setLastModified( modifiedCalendar ); | 1120 | inL->setLastModified( modifiedCalendar ); |
1121 | inR = inL->clone(); | 1121 | inR = inL->clone(); |
1122 | inR->setIDStr( ":" ); | 1122 | inR->setIDStr( ":" ); |
1123 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1123 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1124 | remote->addIncidence( inR ); | 1124 | remote->addIncidence( inR ); |
1125 | } | 1125 | } |
1126 | } | 1126 | } |
1127 | } else { | 1127 | } else { |
1128 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { | 1128 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { |
1129 | checkExternSyncEvent(eventLSyncSharp, inL); | 1129 | checkExternSyncEvent(eventLSyncSharp, inL); |
1130 | local->deleteIncidence( inL ); | 1130 | local->deleteIncidence( inL ); |
1131 | ++deletedEventL; | 1131 | ++deletedEventL; |
1132 | } else { | 1132 | } else { |
1133 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1133 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1134 | ++addedEventR; | 1134 | ++addedEventR; |
1135 | inL->setLastModified( modifiedCalendar ); | 1135 | inL->setLastModified( modifiedCalendar ); |
1136 | inR = inL->clone(); | 1136 | inR = inL->clone(); |
1137 | inR->setIDStr( ":" ); | 1137 | inR->setIDStr( ":" ); |
1138 | remote->addIncidence( inR ); | 1138 | remote->addIncidence( inR ); |
1139 | } | 1139 | } |
1140 | } | 1140 | } |
1141 | } | 1141 | } |
1142 | } | 1142 | } |
1143 | } | 1143 | } |
1144 | inL = el.next(); | 1144 | inL = el.next(); |
1145 | } | 1145 | } |
1146 | int delFut = 0; | 1146 | int delFut = 0; |
1147 | int remRem = 0; | 1147 | int remRem = 0; |
1148 | if ( mSyncManager->mWriteBackInFuture ) { | 1148 | if ( mSyncManager->mWriteBackInFuture ) { |
1149 | er = remote->rawIncidences(); | 1149 | er = remote->rawIncidences(); |
1150 | remRem = er.count(); | 1150 | remRem = er.count(); |
1151 | inR = er.first(); | 1151 | inR = er.first(); |
1152 | QDateTime dt; | 1152 | QDateTime dt; |
1153 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); | 1153 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); |
1154 | QDateTime end = cur.addDays( (mSyncManager->mWriteBackInFuture +1 ) *7 ); | 1154 | QDateTime end = cur.addDays( (mSyncManager->mWriteBackInFuture +1 ) *7 ); |
1155 | while ( inR ) { | 1155 | while ( inR ) { |
1156 | if ( inR->type() == "Todo" ) { | 1156 | if ( inR->type() == "Todo" ) { |
1157 | Todo * t = (Todo*)inR; | 1157 | Todo * t = (Todo*)inR; |
1158 | if ( t->hasDueDate() ) | 1158 | if ( t->hasDueDate() ) |
1159 | dt = t->dtDue(); | 1159 | dt = t->dtDue(); |
1160 | else | 1160 | else |
1161 | dt = cur.addSecs( 62 ); | 1161 | dt = cur.addSecs( 62 ); |
1162 | } | 1162 | } |
1163 | else if (inR->type() == "Event" ) { | 1163 | else if (inR->type() == "Event" ) { |
1164 | bool ok; | 1164 | bool ok; |
1165 | dt = inR->getNextOccurence( cur, &ok ); | 1165 | dt = inR->getNextOccurence( cur, &ok ); |
1166 | if ( !ok ) | 1166 | if ( !ok ) |
1167 | dt = cur.addSecs( -62 ); | 1167 | dt = cur.addSecs( -62 ); |
1168 | } | 1168 | } |
1169 | else | 1169 | else |
1170 | dt = inR->dtStart(); | 1170 | dt = inR->dtStart(); |
1171 | if ( dt < cur || dt > end ) { | 1171 | if ( dt < cur || dt > end ) { |
1172 | remote->deleteIncidence( inR ); | 1172 | remote->deleteIncidence( inR ); |
1173 | ++delFut; | 1173 | ++delFut; |
1174 | } | 1174 | } |
1175 | inR = er.next(); | 1175 | inR = er.next(); |
1176 | } | 1176 | } |
1177 | } | 1177 | } |
1178 | bar.hide(); | 1178 | bar.hide(); |
1179 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); | 1179 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); |
1180 | eventLSync->setReadOnly( false ); | 1180 | eventLSync->setReadOnly( false ); |
1181 | eventLSync->setDtStart( mLastCalendarSync ); | 1181 | eventLSync->setDtStart( mLastCalendarSync ); |
1182 | eventRSync->setDtStart( mLastCalendarSync ); | 1182 | eventRSync->setDtStart( mLastCalendarSync ); |
1183 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1183 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1184 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1184 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1185 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; | 1185 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; |
1186 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); | 1186 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); |
1187 | eventLSync->setReadOnly( true ); | 1187 | eventLSync->setReadOnly( true ); |
1188 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... | 1188 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... |
1189 | remote->addEvent( eventRSync ); | 1189 | remote->addEvent( eventRSync ); |
1190 | else | 1190 | else |
1191 | delete eventRSync; | 1191 | delete eventRSync; |
1192 | QString mes; | 1192 | QString mes; |
1193 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR ); | 1193 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR ); |
1194 | QString delmess; | 1194 | QString delmess; |
1195 | if ( delFut ) { | 1195 | if ( delFut ) { |
1196 | delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInFuture, remRem-delFut); | 1196 | delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInFuture, remRem-delFut); |
1197 | mes += delmess; | 1197 | mes += delmess; |
1198 | } | 1198 | } |
1199 | mes = i18n("Local calendar changed!\n") +mes; | ||
1199 | mCalendar->checkAlarmForIncidence( 0, true ); | 1200 | mCalendar->checkAlarmForIncidence( 0, true ); |
1200 | qDebug( mes ); | 1201 | qDebug( mes ); |
1201 | if ( mSyncManager->mShowSyncSummary ) { | 1202 | if ( mSyncManager->mShowSyncSummary ) { |
1202 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, | 1203 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, |
1203 | i18n("KO/Pi Synchronization"),i18n("Write back"))) { | 1204 | i18n("KO/Pi Synchronization"),i18n("Write back"))) { |
1204 | qDebug("cancelled "); | 1205 | qDebug("cancelled "); |
1205 | return false; | 1206 | return false; |
1206 | } | 1207 | } |
1207 | } | 1208 | } |
1208 | return syncOK; | 1209 | return syncOK; |
1209 | } | 1210 | } |
1210 | 1211 | ||
1211 | void CalendarView::setSyncDevice( QString s ) | 1212 | void CalendarView::setSyncDevice( QString s ) |
1212 | { | 1213 | { |
1213 | mCurrentSyncDevice= s; | 1214 | mCurrentSyncDevice= s; |
1214 | } | 1215 | } |
1215 | void CalendarView::setSyncName( QString s ) | 1216 | void CalendarView::setSyncName( QString s ) |
1216 | { | 1217 | { |
1217 | mCurrentSyncName= s; | 1218 | mCurrentSyncName= s; |
1218 | } | 1219 | } |
1219 | bool CalendarView::syncCalendar(QString filename, int mode) | 1220 | bool CalendarView::syncCalendar(QString filename, int mode) |
1220 | { | 1221 | { |
1221 | //qDebug("syncCalendar %s ", filename.latin1()); | 1222 | //qDebug("syncCalendar %s ", filename.latin1()); |
1222 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 1223 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
1223 | CalendarLocal* calendar = new CalendarLocal(); | 1224 | CalendarLocal* calendar = new CalendarLocal(); |
1224 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1225 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1225 | FileStorage* storage = new FileStorage( calendar ); | 1226 | FileStorage* storage = new FileStorage( calendar ); |
1226 | bool syncOK = false; | 1227 | bool syncOK = false; |
1227 | storage->setFileName( filename ); | 1228 | storage->setFileName( filename ); |
1228 | // qDebug("loading ... "); | 1229 | // qDebug("loading ... "); |
1229 | if ( storage->load() ) { | 1230 | if ( storage->load() ) { |
1230 | getEventViewerDialog()->setSyncMode( true ); | 1231 | getEventViewerDialog()->setSyncMode( true ); |
1231 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); | 1232 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); |
1232 | getEventViewerDialog()->setSyncMode( false ); | 1233 | getEventViewerDialog()->setSyncMode( false ); |
1233 | if ( syncOK ) { | 1234 | if ( syncOK ) { |
1234 | if ( mSyncManager->mWriteBackFile ) | 1235 | if ( mSyncManager->mWriteBackFile ) |
1235 | { | 1236 | { |
1236 | storage->setSaveFormat( new ICalFormat() ); | 1237 | storage->setSaveFormat( new ICalFormat() ); |
1237 | storage->save(); | 1238 | storage->save(); |
1238 | } | 1239 | } |
1239 | } | 1240 | } |
1240 | setModified( true ); | 1241 | setModified( true ); |
1241 | } | 1242 | } |
1242 | delete storage; | 1243 | delete storage; |
1243 | delete calendar; | 1244 | delete calendar; |
1244 | if ( syncOK ) | 1245 | if ( syncOK ) |
1245 | updateView(); | 1246 | updateView(); |
1246 | return syncOK; | 1247 | return syncOK; |
1247 | } | 1248 | } |
1248 | 1249 | ||
1249 | void CalendarView::syncExternal( int mode ) | 1250 | void CalendarView::syncExternal( int mode ) |
1250 | { | 1251 | { |
1251 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 1252 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
1252 | 1253 | ||
1253 | qApp->processEvents(); | 1254 | qApp->processEvents(); |
1254 | CalendarLocal* calendar = new CalendarLocal(); | 1255 | CalendarLocal* calendar = new CalendarLocal(); |
1255 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1256 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1256 | bool syncOK = false; | 1257 | bool syncOK = false; |
1257 | bool loadSuccess = false; | 1258 | bool loadSuccess = false; |
1258 | PhoneFormat* phoneFormat = 0; | 1259 | PhoneFormat* phoneFormat = 0; |
1259 | emit tempDisableBR(true); | 1260 | emit tempDisableBR(true); |
1260 | #ifndef DESKTOP_VERSION | 1261 | #ifndef DESKTOP_VERSION |
1261 | SharpFormat* sharpFormat = 0; | 1262 | SharpFormat* sharpFormat = 0; |
1262 | if ( mode == 0 ) { // sharp | 1263 | if ( mode == 0 ) { // sharp |
1263 | sharpFormat = new SharpFormat () ; | 1264 | sharpFormat = new SharpFormat () ; |
1264 | loadSuccess = sharpFormat->load( calendar, mCalendar ); | 1265 | loadSuccess = sharpFormat->load( calendar, mCalendar ); |
1265 | 1266 | ||
1266 | } else | 1267 | } else |
1267 | #endif | 1268 | #endif |
1268 | if ( mode == 1 ) { // phone | 1269 | if ( mode == 1 ) { // phone |
1269 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, | 1270 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, |
1270 | mSyncManager->mPhoneDevice, | 1271 | mSyncManager->mPhoneDevice, |
1271 | mSyncManager->mPhoneConnection, | 1272 | mSyncManager->mPhoneConnection, |
1272 | mSyncManager->mPhoneModel); | 1273 | mSyncManager->mPhoneModel); |
1273 | loadSuccess = phoneFormat->load( calendar,mCalendar); | 1274 | loadSuccess = phoneFormat->load( calendar,mCalendar); |
1274 | 1275 | ||
1275 | } else { | 1276 | } else { |
1276 | emit tempDisableBR(false); | 1277 | emit tempDisableBR(false); |
1277 | return; | 1278 | return; |
1278 | } | 1279 | } |
1279 | if ( loadSuccess ) { | 1280 | if ( loadSuccess ) { |
1280 | getEventViewerDialog()->setSyncMode( true ); | 1281 | getEventViewerDialog()->setSyncMode( true ); |
1281 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); | 1282 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); |
1282 | getEventViewerDialog()->setSyncMode( false ); | 1283 | getEventViewerDialog()->setSyncMode( false ); |
1283 | qApp->processEvents(); | 1284 | qApp->processEvents(); |
1284 | if ( syncOK ) { | 1285 | if ( syncOK ) { |
1285 | if ( mSyncManager->mWriteBackFile ) | 1286 | if ( mSyncManager->mWriteBackFile ) |
1286 | { | 1287 | { |
1287 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); | 1288 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); |
1288 | Incidence* inc = iL.first(); | 1289 | Incidence* inc = iL.first(); |
1289 | if ( phoneFormat ) { | 1290 | if ( phoneFormat ) { |
1290 | while ( inc ) { | 1291 | while ( inc ) { |
1291 | inc->removeID(mCurrentSyncDevice); | 1292 | inc->removeID(mCurrentSyncDevice); |
1292 | inc = iL.next(); | 1293 | inc = iL.next(); |
1293 | } | 1294 | } |
1294 | } | 1295 | } |
1295 | #ifndef DESKTOP_VERSION | 1296 | #ifndef DESKTOP_VERSION |
1296 | if ( sharpFormat ) | 1297 | if ( sharpFormat ) |
1297 | sharpFormat->save(calendar); | 1298 | sharpFormat->save(calendar); |
1298 | #endif | 1299 | #endif |
1299 | if ( phoneFormat ) | 1300 | if ( phoneFormat ) |
1300 | phoneFormat->save(calendar); | 1301 | phoneFormat->save(calendar); |
1301 | iL = calendar->rawIncidences(); | 1302 | iL = calendar->rawIncidences(); |
1302 | inc = iL.first(); | 1303 | inc = iL.first(); |
1303 | Incidence* loc; | 1304 | Incidence* loc; |
1304 | while ( inc ) { | 1305 | while ( inc ) { |
1305 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { | 1306 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { |
1306 | loc = mCalendar->incidence(inc->uid() ); | 1307 | loc = mCalendar->incidence(inc->uid() ); |
1307 | if ( loc ) { | 1308 | if ( loc ) { |
1308 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); | 1309 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); |
1309 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); | 1310 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); |
1310 | } | 1311 | } |
1311 | } | 1312 | } |
1312 | inc = iL.next(); | 1313 | inc = iL.next(); |
1313 | } | 1314 | } |
1314 | Incidence* lse = getLastSyncEvent(); | 1315 | Incidence* lse = getLastSyncEvent(); |
1315 | if ( lse ) { | 1316 | if ( lse ) { |
1316 | lse->setReadOnly( false ); | 1317 | lse->setReadOnly( false ); |
1317 | lse->setDescription( "" ); | 1318 | lse->setDescription( "" ); |
1318 | lse->setReadOnly( true ); | 1319 | lse->setReadOnly( true ); |
1319 | } | 1320 | } |
1320 | } | 1321 | } |
1321 | } else { | 1322 | } else { |
1322 | topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); | 1323 | topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); |
1323 | } | 1324 | } |
1324 | setModified( true ); | 1325 | setModified( true ); |
1325 | } else { | 1326 | } else { |
1326 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; | 1327 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; |