summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile2
-rw-r--r--libkcal/phoneformat.cpp34
2 files changed, 26 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index c1d07e4..ac1d5b7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,159 +1,159 @@
1############################################################################# 1#############################################################################
2# Makefile for building: kopi-desktop 2# Makefile for building: kopi-desktop
3# Generated by qmake (1.07a) (Qt 3.3.3) on: Mon Aug 9 12:10:32 2004 3# Generated by qmake (1.07a) (Qt 3.3.3) on: Mon Aug 9 13:18:13 2004
4# Project: kopi-desktop.pro 4# Project: kopi-desktop.pro
5# Template: subdirs 5# Template: subdirs
6# Command: $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro 6# Command: $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro
7############################################################################# 7#############################################################################
8 8
9 MAKEFILE =Makefile 9 MAKEFILE =Makefile
10 QMAKE =qmake 10 QMAKE =qmake
11DEL_FILE = rm -f 11DEL_FILE = rm -f
12CHK_DIR_EXISTS= test -d 12CHK_DIR_EXISTS= test -d
13MKDIR = mkdir -p 13MKDIR = mkdir -p
14INSTALL_FILE= 14INSTALL_FILE=
15INSTALL_DIR = 15INSTALL_DIR =
16 SUBTARGETS = \ 16 SUBTARGETS = \
17 sub-gammu-emb-common \ 17 sub-gammu-emb-common \
18 sub-libical \ 18 sub-libical \
19 sub-libkcal \ 19 sub-libkcal \
20 sub-microkde \ 20 sub-microkde \
21 sub-libkdepim \ 21 sub-libkdepim \
22 sub-kabc \ 22 sub-kabc \
23 sub-korganizer \ 23 sub-korganizer \
24 sub-kaddressbook \ 24 sub-kaddressbook \
25 sub-kabc-plugins-file \ 25 sub-kabc-plugins-file \
26 sub-kabc-plugins-dir 26 sub-kabc-plugins-dir
27 27
28first: all 28first: all
29 29
30all: Makefile $(SUBTARGETS) 30all: Makefile $(SUBTARGETS)
31 31
32gammu/emb/common/$(MAKEFILE): 32gammu/emb/common/$(MAKEFILE):
33 @$(CHK_DIR_EXISTS) "gammu/emb/common" || $(MKDIR) "gammu/emb/common" 33 @$(CHK_DIR_EXISTS) "gammu/emb/common" || $(MKDIR) "gammu/emb/common"
34 cd gammu/emb/common && $(QMAKE) common.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE) 34 cd gammu/emb/common && $(QMAKE) common.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
35sub-gammu-emb-common: gammu/emb/common/$(MAKEFILE) FORCE 35sub-gammu-emb-common: gammu/emb/common/$(MAKEFILE) FORCE
36 cd gammu/emb/common && $(MAKE) -f $(MAKEFILE) 36 cd gammu/emb/common && $(MAKE) -f $(MAKEFILE)
37 37
38libical/$(MAKEFILE): 38libical/$(MAKEFILE):
39 @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical" 39 @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical"
40 cd libical && $(QMAKE) libical.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE) 40 cd libical && $(QMAKE) libical.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
41sub-libical: libical/$(MAKEFILE) FORCE 41sub-libical: libical/$(MAKEFILE) FORCE
42 cd libical && $(MAKE) -f $(MAKEFILE) 42 cd libical && $(MAKE) -f $(MAKEFILE)
43 43
44libkcal/$(MAKEFILE): 44libkcal/$(MAKEFILE):
45 @$(CHK_DIR_EXISTS) "libkcal" || $(MKDIR) "libkcal" 45 @$(CHK_DIR_EXISTS) "libkcal" || $(MKDIR) "libkcal"
46 cd libkcal && $(QMAKE) libkcal.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE) 46 cd libkcal && $(QMAKE) libkcal.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
47sub-libkcal: libkcal/$(MAKEFILE) FORCE 47sub-libkcal: libkcal/$(MAKEFILE) FORCE
48 cd libkcal && $(MAKE) -f $(MAKEFILE) 48 cd libkcal && $(MAKE) -f $(MAKEFILE)
49 49
50microkde/$(MAKEFILE): 50microkde/$(MAKEFILE):
51 @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde" 51 @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde"
52 cd microkde && $(QMAKE) microkde.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE) 52 cd microkde && $(QMAKE) microkde.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
53sub-microkde: microkde/$(MAKEFILE) FORCE 53sub-microkde: microkde/$(MAKEFILE) FORCE
54 cd microkde && $(MAKE) -f $(MAKEFILE) 54 cd microkde && $(MAKE) -f $(MAKEFILE)
55 55
56libkdepim/$(MAKEFILE): 56libkdepim/$(MAKEFILE):
57 @$(CHK_DIR_EXISTS) "libkdepim" || $(MKDIR) "libkdepim" 57 @$(CHK_DIR_EXISTS) "libkdepim" || $(MKDIR) "libkdepim"
58 cd libkdepim && $(QMAKE) libkdepim.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE) 58 cd libkdepim && $(QMAKE) libkdepim.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
59sub-libkdepim: libkdepim/$(MAKEFILE) FORCE 59sub-libkdepim: libkdepim/$(MAKEFILE) FORCE
60 cd libkdepim && $(MAKE) -f $(MAKEFILE) 60 cd libkdepim && $(MAKE) -f $(MAKEFILE)
61 61
62kabc/$(MAKEFILE): 62kabc/$(MAKEFILE):
63 @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc" 63 @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc"
64 cd kabc && $(QMAKE) kabc.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE) 64 cd kabc && $(QMAKE) kabc.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
65sub-kabc: kabc/$(MAKEFILE) FORCE 65sub-kabc: kabc/$(MAKEFILE) FORCE
66 cd kabc && $(MAKE) -f $(MAKEFILE) 66 cd kabc && $(MAKE) -f $(MAKEFILE)
67 67
68korganizer/$(MAKEFILE): 68korganizer/$(MAKEFILE):
69 @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer" 69 @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer"
70 cd korganizer && $(QMAKE) korganizer.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE) 70 cd korganizer && $(QMAKE) korganizer.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
71sub-korganizer: korganizer/$(MAKEFILE) FORCE 71sub-korganizer: korganizer/$(MAKEFILE) FORCE
72 cd korganizer && $(MAKE) -f $(MAKEFILE) 72 cd korganizer && $(MAKE) -f $(MAKEFILE)
73 73
74kaddressbook/$(MAKEFILE): 74kaddressbook/$(MAKEFILE):
75 @$(CHK_DIR_EXISTS) "kaddressbook" || $(MKDIR) "kaddressbook" 75 @$(CHK_DIR_EXISTS) "kaddressbook" || $(MKDIR) "kaddressbook"
76 cd kaddressbook && $(QMAKE) kaddressbook.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE) 76 cd kaddressbook && $(QMAKE) kaddressbook.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
77sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE 77sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE
78 cd kaddressbook && $(MAKE) -f $(MAKEFILE) 78 cd kaddressbook && $(MAKE) -f $(MAKEFILE)
79 79
80kabc/plugins/file/$(MAKEFILE): 80kabc/plugins/file/$(MAKEFILE):
81 @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file" 81 @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file"
82 cd kabc/plugins/file && $(QMAKE) file.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE) 82 cd kabc/plugins/file && $(QMAKE) file.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
83sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE 83sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE
84 cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE) 84 cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE)
85 85
86kabc/plugins/dir/$(MAKEFILE): 86kabc/plugins/dir/$(MAKEFILE):
87 @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir" 87 @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir"
88 cd kabc/plugins/dir && $(QMAKE) dir.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE) 88 cd kabc/plugins/dir && $(QMAKE) dir.pro "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE)
89sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE 89sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE
90 cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE) 90 cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE)
91 91
92Makefile: kopi-desktop.pro /usr/local/qtgcc/mkspecs/default/qmake.conf 92Makefile: kopi-desktop.pro /usr/local/qtgcc/mkspecs/default/qmake.conf
93 $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro 93 $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro
94qmake: qmake_all 94qmake: qmake_all
95 @$(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro 95 @$(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro
96 96
97all: $(SUBTARGETS) 97all: $(SUBTARGETS)
98qmake_all: gammu/emb/common/$(MAKEFILE) libical/$(MAKEFILE) libkcal/$(MAKEFILE) microkde/$(MAKEFILE) libkdepim/$(MAKEFILE) kabc/$(MAKEFILE) korganizer/$(MAKEFILE) kaddressbook/$(MAKEFILE) kabc/plugins/file/$(MAKEFILE) kabc/plugins/dir/$(MAKEFILE) 98qmake_all: gammu/emb/common/$(MAKEFILE) libical/$(MAKEFILE) libkcal/$(MAKEFILE) microkde/$(MAKEFILE) libkdepim/$(MAKEFILE) kabc/$(MAKEFILE) korganizer/$(MAKEFILE) kaddressbook/$(MAKEFILE) kabc/plugins/file/$(MAKEFILE) kabc/plugins/dir/$(MAKEFILE)
99 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true 99 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
100 ( [ -d libical ] && cd libical ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true 100 ( [ -d libical ] && cd libical ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
101 ( [ -d libkcal ] && cd libkcal ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true 101 ( [ -d libkcal ] && cd libkcal ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
102 ( [ -d microkde ] && cd microkde ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true 102 ( [ -d microkde ] && cd microkde ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
103 ( [ -d libkdepim ] && cd libkdepim ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true 103 ( [ -d libkdepim ] && cd libkdepim ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
104 ( [ -d kabc ] && cd kabc ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true 104 ( [ -d kabc ] && cd kabc ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
105 ( [ -d korganizer ] && cd korganizer ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true 105 ( [ -d korganizer ] && cd korganizer ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
106 ( [ -d kaddressbook ] && cd kaddressbook ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true 106 ( [ -d kaddressbook ] && cd kaddressbook ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
107 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true 107 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
108 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true 108 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
109clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE 109clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE
110 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; ) || true 110 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; ) || true
111 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; ) || true 111 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; ) || true
112 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; ) || true 112 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; ) || true
113 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; ) || true 113 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; ) || true
114 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; ) || true 114 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; ) || true
115 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; ) || true 115 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; ) || true
116 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; ) || true 116 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; ) || true
117 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; ) || true 117 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; ) || true
118 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true 118 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true
119 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; ) || true 119 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; ) || true
120uninstall_subdirs: qmake_all FORCE 120uninstall_subdirs: qmake_all FORCE
121 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true 121 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
122 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true 122 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
123 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true 123 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
124 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true 124 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
125 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true 125 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
126 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true 126 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
127 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true 127 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
128 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true 128 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
129 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true 129 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
130 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true 130 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
131install_subdirs: qmake_all FORCE 131install_subdirs: qmake_all FORCE
132 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) install; ) || true 132 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) install; ) || true
133 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) install; ) || true 133 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) install; ) || true
134 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) install; ) || true 134 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) install; ) || true
135 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) install; ) || true 135 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) install; ) || true
136 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) install; ) || true 136 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) install; ) || true
137 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) install; ) || true 137 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) install; ) || true
138 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) install; ) || true 138 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) install; ) || true
139 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) install; ) || true 139 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) install; ) || true
140 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true 140 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true
141 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) install; ) || true 141 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) install; ) || true
142distclean: qmake_all FORCE 142distclean: qmake_all FORCE
143 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true 143 ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
144 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true 144 ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
145 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true 145 ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
146 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true 146 ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
147 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true 147 ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
148 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true 148 ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
149 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true 149 ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
150 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true 150 ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
151 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true 151 ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
152 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true 152 ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
153 153
154install: install_subdirs 154install: install_subdirs
155 155
156uninstall: uninstall_subdirs 156uninstall: uninstall_subdirs
157 157
158FORCE: 158FORCE:
159 159
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index bc1b863..596148e 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -154,449 +154,465 @@ public:
154#if 0 154#if 0
155 // not supported 155 // not supported
156 printmsg("Phone : \"%s\"\n",DecodeUnicodeConsole(ToDo->Entries[j].Text)); 156 printmsg("Phone : \"%s\"\n",DecodeUnicodeConsole(ToDo->Entries[j].Text));
157#endif 157#endif
158 break; 158 break;
159 } 159 }
160 } 160 }
161 QString alarmString = "na"; 161 QString alarmString = "na";
162 if ( alarm ) { 162 if ( alarm ) {
163 Alarm *alarm; 163 Alarm *alarm;
164 if ( todo->alarms().count() > 0 ) 164 if ( todo->alarms().count() > 0 )
165 alarm = todo->alarms().first(); 165 alarm = todo->alarms().first();
166 else { 166 else {
167 alarm = new Alarm( todo ); 167 alarm = new Alarm( todo );
168 todo->addAlarm( alarm ); 168 todo->addAlarm( alarm );
169 } 169 }
170 alarm->setType( Alarm::Audio ); 170 alarm->setType( Alarm::Audio );
171 alarm->setEnabled( true ); 171 alarm->setEnabled( true );
172 int alarmOffset = alarmDt.secsTo( todo->dtStart() ); 172 int alarmOffset = alarmDt.secsTo( todo->dtStart() );
173 alarm->setStartOffset( -alarmOffset ); 173 alarm->setStartOffset( -alarmOffset );
174 alarmString = QString::number( alarmOffset ); 174 alarmString = QString::number( alarmOffset );
175 } else { 175 } else {
176 Alarm *alarm; 176 Alarm *alarm;
177 if ( todo->alarms().count() > 0 ) { 177 if ( todo->alarms().count() > 0 ) {
178 alarm = todo->alarms().first(); 178 alarm = todo->alarms().first();
179 alarm->setType( Alarm::Audio ); 179 alarm->setType( Alarm::Audio );
180 alarm->setStartOffset( -60*15 ); 180 alarm->setStartOffset( -60*15 );
181 alarm->setEnabled( false ); 181 alarm->setEnabled( false );
182 } 182 }
183 } 183 }
184 // csum ***************************************** 184 // csum *****************************************
185 QStringList attList; 185 QStringList attList;
186 uint cSum; 186 uint cSum;
187 if ( todo->hasDueDate() ) 187 if ( todo->hasDueDate() )
188 attList << dtToString ( todo->dtDue() ); 188 attList << dtToString ( todo->dtDue() );
189 attList << QString::number( id ); 189 attList << QString::number( id );
190 attList << todo->summary(); 190 attList << todo->summary();
191 attList << completedString; 191 attList << completedString;
192 attList << QString::number( todo->priority() ); 192 attList << QString::number( todo->priority() );
193 attList << alarmString; 193 attList << alarmString;
194 attList << todo->categoriesStr(); 194 attList << todo->categoriesStr();
195 attList << todo->secrecyStr(); 195 attList << todo->secrecyStr();
196 cSum = PhoneFormat::getCsum(attList ); 196 cSum = PhoneFormat::getCsum(attList );
197 todo->setCsum( mProfileName, QString::number( cSum )); 197 todo->setCsum( mProfileName, QString::number( cSum ));
198 mCalendar->addTodo( todo); 198 mCalendar->addTodo( todo);
199 199
200 return true; 200 return true;
201 } 201 }
202 bool readEvent( Calendar *existingCalendar, GSM_CalendarEntry*Note) 202 bool readEvent( Calendar *existingCalendar, GSM_CalendarEntry*Note)
203 { 203 {
204 204
205 int id = Note->Location; 205 int id = Note->Location;
206 Event *event; 206 Event *event;
207 event = existingCalendar->event( mProfileName ,QString::number( id ) ); 207 event = existingCalendar->event( mProfileName ,QString::number( id ) );
208 if ( event ) 208 if ( event )
209 event = (Event*)event->clone(); 209 event = (Event*)event->clone();
210 else 210 else
211 event = new Event; 211 event = new Event;
212 event->setID( mProfileName,QString::number( id ) ); 212 event->setID( mProfileName,QString::number( id ) );
213 event->setTempSyncStat(SYNC_TEMPSTATE_NEW_EXTERNAL ); 213 event->setTempSyncStat(SYNC_TEMPSTATE_NEW_EXTERNAL );
214 214
215 215
216 int i = 0; 216 int i = 0;
217 bool repeating = false; 217 bool repeating = false;
218 int repeat_dayofweek = -1; 218 int repeat_dayofweek = -1;
219 int repeat_day = -1; 219 int repeat_day = -1;
220 int repeat_weekofmonth = -1; 220 int repeat_weekofmonth = -1;
221 int repeat_month = -1; 221 int repeat_month = -1;
222 int repeat_frequency = -1; 222 int repeat_frequency = -1;
223 int rec_type = -1; 223 int rec_type = -1;
224 GSM_DateTime repeat_startdate = {0,0,0,0,0,0,0}; 224 GSM_DateTime repeat_startdate = {0,0,0,0,0,0,0};
225 GSM_DateTime repeat_stopdate = {0,0,0,0,0,0,0}; 225 GSM_DateTime repeat_stopdate = {0,0,0,0,0,0,0};
226 GSM_DateTime* dtp; 226 GSM_DateTime* dtp;
227 bool alarm = false; 227 bool alarm = false;
228 QDateTime alarmDt; 228 QDateTime alarmDt;
229 repeat_startdate.Day= 0; 229 repeat_startdate.Day= 0;
230 repeat_stopdate.Day = 0; 230 repeat_stopdate.Day = 0;
231 for (i=0;i<Note->EntriesNum;i++) { 231 for (i=0;i<Note->EntriesNum;i++) {
232 232
233 //qDebug(" for ev"); 233 //qDebug(" for ev");
234 switch (Note->Entries[i].EntryType) { 234 switch (Note->Entries[i].EntryType) {
235 case CAL_START_DATETIME: 235 case CAL_START_DATETIME:
236 dtp = &Note->Entries[i].Date ; 236 dtp = &Note->Entries[i].Date ;
237 if ( dtp->Hour > 24 ) { 237 if ( dtp->Hour > 24 ) {
238 event->setFloats( true ); 238 event->setFloats( true );
239 event->setDtStart( QDateTime (datefromGSM ( dtp ), QTime(0,0,0 ))); 239 event->setDtStart( QDateTime (datefromGSM ( dtp ), QTime(0,0,0 )));
240 } else { 240 } else {
241 event->setDtStart (fromGSM ( dtp )); 241 event->setDtStart (fromGSM ( dtp ));
242 242
243 } 243 }
244 break; 244 break;
245 case CAL_END_DATETIME: 245 case CAL_END_DATETIME:
246 dtp = &Note->Entries[i].Date ; 246 dtp = &Note->Entries[i].Date ;
247 if ( dtp->Hour > 24 ) { 247 if ( dtp->Hour > 24 ) {
248 event->setFloats( true ); 248 event->setFloats( true );
249 event->setDtEnd( QDateTime (datefromGSM ( dtp ), QTime(0,0,0 ))); 249 event->setDtEnd( QDateTime (datefromGSM ( dtp ), QTime(0,0,0 )));
250 } else { 250 } else {
251 event->setDtEnd (fromGSM ( dtp )); 251 event->setDtEnd (fromGSM ( dtp ));
252 } 252 }
253 break; 253 break;
254 case CAL_ALARM_DATETIME: 254 case CAL_ALARM_DATETIME:
255 dtp = &Note->Entries[i].Date ; 255 dtp = &Note->Entries[i].Date ;
256 alarm = true; 256 alarm = true;
257 alarmDt = fromGSM ( dtp ); 257 alarmDt = fromGSM ( dtp );
258 break; 258 break;
259 case CAL_SILENT_ALARM_DATETIME: 259 case CAL_SILENT_ALARM_DATETIME:
260 dtp = &Note->Entries[i].Date ; 260 dtp = &Note->Entries[i].Date ;
261 alarm = true; 261 alarm = true;
262 alarmDt = fromGSM ( dtp ); 262 alarmDt = fromGSM ( dtp );
263 break; 263 break;
264 case CAL_RECURRANCE: 264 case CAL_RECURRANCE:
265 rec_type = Note->Entries[i].Number; 265 rec_type = Note->Entries[i].Number;
266 //printmsg("Repeat : %d day%s\n",Note->Entries[i].Number/24,((Note->Entries[i].Number/24)>1) ? "s":"" ); 266 //printmsg("Repeat : %d day%s\n",Note->Entries[i].Number/24,((Note->Entries[i].Number/24)>1) ? "s":"" );
267 break; 267 break;
268 case CAL_TEXT: 268 case CAL_TEXT:
269 //qDebug(" ev text %s", DecodeUnicodeConsole(Note->Entries[i].Text) ); 269 //qDebug(" ev text %s", DecodeUnicodeConsole(Note->Entries[i].Text) );
270 event->setSummary( QString::fromUtf8 ( (const char*)DecodeUnicodeConsole( Note->Entries[i].Text ))); 270 event->setSummary( QString::fromUtf8 ( (const char*)DecodeUnicodeConsole( Note->Entries[i].Text )));
271 break; 271 break;
272 case CAL_LOCATION: 272 case CAL_LOCATION:
273 event->setLocation(QString::fromUtf8 ((const char*) DecodeUnicodeConsole(Note->Entries[i].Text) )); 273 event->setLocation(QString::fromUtf8 ((const char*) DecodeUnicodeConsole(Note->Entries[i].Text) ));
274 break; 274 break;
275 case CAL_PHONE: 275 case CAL_PHONE:
276 //printmsg("Phone : \"%s\"\n",DecodeUnicodeConsole(Note->Entries[i].Text)); 276 //printmsg("Phone : \"%s\"\n",DecodeUnicodeConsole(Note->Entries[i].Text));
277 break; 277 break;
278 case CAL_PRIVATE: 278 case CAL_PRIVATE:
279 if ( Note->Entries[i].Number == 1 ) 279 if ( Note->Entries[i].Number == 1 )
280 event->setSecrecy( Incidence::SecrecyPrivate ); 280 event->setSecrecy( Incidence::SecrecyPrivate );
281 else 281 else
282 event->setSecrecy( Incidence::SecrecyPublic ); 282 event->setSecrecy( Incidence::SecrecyPublic );
283 283
284 break; 284 break;
285 case CAL_CONTACTID: 285 case CAL_CONTACTID:
286#if 0 286#if 0
287 entry.Location = Note->Entries[i].Number; 287 entry.Location = Note->Entries[i].Number;
288 entry.MemoryType = MEM_ME; 288 entry.MemoryType = MEM_ME;
289 error=Phone->GetMemory(&s, &entry); 289 error=Phone->GetMemory(&s, &entry);
290 if (error == ERR_NONE) { 290 if (error == ERR_NONE) {
291 name = GSM_PhonebookGetEntryName(&entry); 291 name = GSM_PhonebookGetEntryName(&entry);
292 if (name != NULL) { 292 if (name != NULL) {
293 //printmsg("Contact ID : \"%s\" (%d)\n", DecodeUnicodeConsole(name), Note->Entries[i].Number); 293 //printmsg("Contact ID : \"%s\" (%d)\n", DecodeUnicodeConsole(name), Note->Entries[i].Number);
294 } else { 294 } else {
295 //printmsg("Contact ID : %d\n",Note->Entries[i].Number); 295 //printmsg("Contact ID : %d\n",Note->Entries[i].Number);
296 } 296 }
297 } else { 297 } else {
298 //printmsg("Contact ID : %d\n",Note->Entries[i].Number); 298 //printmsg("Contact ID : %d\n",Note->Entries[i].Number);
299 } 299 }
300#endif 300#endif
301 break; 301 break;
302 case CAL_REPEAT_DAYOFWEEK: 302 case CAL_REPEAT_DAYOFWEEK:
303 repeat_dayofweek = Note->Entries[i].Number; 303 repeat_dayofweek = Note->Entries[i].Number;
304 repeating = true; 304 repeating = true;
305 break; 305 break;
306 case CAL_REPEAT_DAY: 306 case CAL_REPEAT_DAY:
307 repeat_day = Note->Entries[i].Number; 307 repeat_day = Note->Entries[i].Number;
308 repeating = true; 308 repeating = true;
309 break; 309 break;
310 case CAL_REPEAT_WEEKOFMONTH: 310 case CAL_REPEAT_WEEKOFMONTH:
311 repeat_weekofmonth = Note->Entries[i].Number; 311 repeat_weekofmonth = Note->Entries[i].Number;
312 repeating = true; 312 repeating = true;
313 break; 313 break;
314 case CAL_REPEAT_MONTH: 314 case CAL_REPEAT_MONTH:
315 repeat_month = Note->Entries[i].Number; 315 repeat_month = Note->Entries[i].Number;
316 repeating = true; 316 repeating = true;
317 break; 317 break;
318 case CAL_REPEAT_FREQUENCY: 318 case CAL_REPEAT_FREQUENCY:
319 repeat_frequency = Note->Entries[i].Number; 319 repeat_frequency = Note->Entries[i].Number;
320 repeating = true; 320 repeating = true;
321 break; 321 break;
322 case CAL_REPEAT_STARTDATE: 322 case CAL_REPEAT_STARTDATE:
323 repeat_startdate = Note->Entries[i].Date; 323 repeat_startdate = Note->Entries[i].Date;
324 repeating = true; 324 repeating = true;
325 break; 325 break;
326 case CAL_REPEAT_STOPDATE: 326 case CAL_REPEAT_STOPDATE:
327 repeat_stopdate = Note->Entries[i].Date; 327 repeat_stopdate = Note->Entries[i].Date;
328 repeating = true; 328 repeating = true;
329 break; 329 break;
330 } 330 }
331 } 331 }
332#if 0 332#if 0
333 event->setDescription( attList[4] ); 333 event->setDescription( attList[4] );
334 bool repeating = false; 334 bool repeating = false;
335 int repeat_dayofweek = -1; 335 int repeat_dayofweek = -1;
336 int repeat_day = -1; 336 int repeat_day = -1;
337 int repeat_weekofmonth = -1; 337 int repeat_weekofmonth = -1;
338 int repeat_month = -1; 338 int repeat_month = -1;
339 int repeat_frequency = -1; 339 int repeat_frequency = -1;
340 GSM_DateTime repeat_startdate = {0,0,0,0,0,0,0}; 340 GSM_DateTime repeat_startdate = {0,0,0,0,0,0,0};
341 GSM_DateTime repeat_stopdate = {0,0,0,0,0,0,0}; 341 GSM_DateTime repeat_stopdate = {0,0,0,0,0,0,0};
342 342
343#endif 343#endif
344 344
345 QString recurString = "no"; 345 QString recurString = "no";
346 if ( repeating ) { 346 if ( repeating && repeat_frequency != -1) {
347 recurString = "y"; 347 recurString = "y";
348 if ( repeat_dayofweek >= 0 ) 348 if ( repeat_dayofweek >= 0 )
349 recurString += "dow" + QString::number (repeat_dayofweek); 349 recurString += "dow" + QString::number (repeat_dayofweek);
350 if ( repeat_day >= 0 ) 350 if ( repeat_day >= 0 )
351 recurString += "d" + QString::number (repeat_day); 351 recurString += "d" + QString::number (repeat_day);
352 if ( repeat_weekofmonth >= 0 ) 352 if ( repeat_weekofmonth >= 0 )
353 recurString += "w" + QString::number (repeat_weekofmonth); 353 recurString += "w" + QString::number (repeat_weekofmonth);
354 if ( repeat_month >= 0 ) 354 if ( repeat_month >= 0 )
355 recurString += "m" + QString::number ( repeat_month ); 355 recurString += "m" + QString::number ( repeat_month );
356 if ( repeat_frequency >= 0 ) 356 if ( repeat_frequency >= 0 )
357 recurString += "f" + QString::number (repeat_frequency ); 357 recurString += "f" + QString::number (repeat_frequency );
358 358
359 int rtype = 0; 359 int rtype = 0;
360 // qDebug("recurs "); 360 // qDebug("recurs ");
361 QDate startDate, endDate; 361 QDate startDate, endDate;
362 if ( repeat_startdate.Day > 0 ) 362 if ( repeat_startdate.Day > 0 ) {
363 startDate = datefromGSM ( &repeat_startdate ); 363 startDate = datefromGSM ( &repeat_startdate );
364 else 364 event->setDtStart(QDateTime ( startDate, event->dtStart().time()));
365 } else {
365 startDate = event->dtStart().date(); 366 startDate = event->dtStart().date();
367 }
366 int freq = repeat_frequency; 368 int freq = repeat_frequency;
367 bool hasEndDate = false; 369 bool hasEndDate = false;
368 if ( repeat_stopdate.Day > 0 ) { 370 if ( repeat_stopdate.Day > 0 ) {
369 endDate = datefromGSM ( &repeat_stopdate ); 371 endDate = datefromGSM ( &repeat_stopdate );
370 hasEndDate = true; 372 hasEndDate = true;
371 } 373 }
372 374
373 uint weekDaysNum = repeat_dayofweek ; 375 uint weekDaysNum = repeat_dayofweek ;
374 376 // 1 == monday, 7 == sunday
375 QBitArray weekDays( 7 ); 377 QBitArray weekDays( 7 );
376 int i; 378 int i;
377 int bb = 1; 379 int bb = 1;
378 for( i = 1; i <= 7; ++i ) { 380 for( i = 1; i <= 7; ++i ) {
379 weekDays.setBit( i - 1, ( bb & weekDaysNum )); 381 weekDays.setBit( i - 1, ( bb & weekDaysNum ));
380 bb = 2 << (i-1); 382 bb = 2 << (i-1);
381 //qDebug(" %d bit %d ",i-1,weekDays.at(i-1) ); 383 //qDebug(" %d bit %d ",i-1,weekDays.at(i-1) );
382 } 384 }
383 // qDebug("next "); 385 // qDebug("next ");
384 int pos = 0; 386 int pos = 0;
385 Recurrence *r = event->recurrence(); 387 Recurrence *r = event->recurrence();
386 /* 388 /*
387 0 daily; 389 0 daily;
388 1 weekly;x 390 1 weekly;x
389 2 monthpos;x 391 2 monthpos;x
390 3 monthlyday; 392 3 monthlyday;
391 4 rYearlyMont 393 4 rYearlyMont
392 bool repeating = false; 394 bool repeating = false;
393 int repeat_dayofweek = -1; 395 int repeat_dayofweek = -1;
394 int repeat_day = -1; 396 int repeat_day = -1;
395 int repeat_weekofmonth = -1; 397 int repeat_weekofmonth = -1;
396 int repeat_month = -1; 398 int repeat_month = -1;
397 int repeat_frequency = -1; 399 int repeat_frequency = -1;
398 */ 400 */
399 int dayOfWeek = startDate.dayOfWeek(); 401 int dayOfWeek = startDate.dayOfWeek();
400 if ( repeat_weekofmonth >= 0 ) { 402 if ( repeat_weekofmonth >= 0 ) {
401 rtype = 2; 403 rtype = 2; // ************************ 2 MonthlyPos
402 pos = repeat_weekofmonth; 404 pos = repeat_weekofmonth;
403 if ( repeat_dayofweek >= 0 ) 405 if ( repeat_dayofweek >= 0 )
404 dayOfWeek = repeat_dayofweek; 406 dayOfWeek = repeat_dayofweek;
407 if (repeat_month > 0) {
408 if ( repeat_month != event->dtStart().date().month() ) {
409 QDate date (event->dtStart().date().year(),repeat_month,event->dtStart().date().day() );
410 event->setDtStart(QDateTime ( date , event->dtStart().time()) );
411 }
412 if ( freq == 1 )
413 freq = 12;
414 }
405 } else if ( repeat_dayofweek >= 0 ) { 415 } else if ( repeat_dayofweek >= 0 ) {
406 rtype = 1; 416 rtype = 1;// ************************ 1 Weekly
407 } if ( repeat_dayofweek >= 0 ) { 417 } else if ( repeat_day >= 0 ) {
408 rtype = 1; 418 if ( repeat_month > 0) {
419 rtype = 4;
420 } else {
421 rtype = 3;
422 }
423 } else {
424 rtype = 0 ;
409 } 425 }
410 426
411 if ( rtype == 0 ) { 427 if ( rtype == 0 ) {
412 if ( hasEndDate ) r->setDaily( freq, endDate ); 428 if ( hasEndDate ) r->setDaily( freq, endDate );
413 else r->setDaily( freq, -1 ); 429 else r->setDaily( freq, -1 );
414 } else if ( rtype == 1 ) { 430 } else if ( rtype == 1 ) {
415 if ( hasEndDate ) r->setWeekly( freq, weekDays, endDate ); 431 if ( hasEndDate ) r->setWeekly( freq, weekDays, endDate );
416 else r->setWeekly( freq, weekDays, -1 ); 432 else r->setWeekly( freq, weekDays, -1 );
417 } else if ( rtype == 3 ) { 433 } else if ( rtype == 3 ) {
418 if ( hasEndDate ) 434 if ( hasEndDate )
419 r->setMonthly( Recurrence::rMonthlyDay, freq, endDate ); 435 r->setMonthly( Recurrence::rMonthlyDay, freq, endDate );
420 else 436 else
421 r->setMonthly( Recurrence::rMonthlyDay, freq, -1 ); 437 r->setMonthly( Recurrence::rMonthlyDay, freq, -1 );
422 r->addMonthlyDay( startDate.day() ); 438 r->addMonthlyDay( startDate.day() );
423 } else if ( rtype == 2 ) { 439 } else if ( rtype == 2 ) {
424 if ( hasEndDate ) 440 if ( hasEndDate )
425 r->setMonthly( Recurrence::rMonthlyPos, freq, endDate ); 441 r->setMonthly( Recurrence::rMonthlyPos, freq, endDate );
426 else 442 else
427 r->setMonthly( Recurrence::rMonthlyPos, freq, -1 ); 443 r->setMonthly( Recurrence::rMonthlyPos, freq, -1 );
428 QBitArray days( 7 ); 444 QBitArray days( 7 );
429 days.fill( false ); 445 days.fill( false );
430 days.setBit( dayOfWeek - 1 ); 446 days.setBit( dayOfWeek - 1 );
431 r->addMonthlyPos( pos, days ); 447 r->addMonthlyPos( pos, days );
432 } else if ( rtype == 4 ) { 448 } else if ( rtype == 4 ) {
433 if ( hasEndDate ) 449 if ( hasEndDate )
434 r->setYearly( Recurrence::rYearlyMonth, freq, endDate ); 450 r->setYearly( Recurrence::rYearlyMonth, freq, endDate );
435 else 451 else
436 r->setYearly( Recurrence::rYearlyMonth, freq, -1 ); 452 r->setYearly( Recurrence::rYearlyMonth, freq, -1 );
437 r->addYearlyNum( startDate.month() ); 453 r->addYearlyNum( startDate.month() );
438 } 454 }
439 } else { 455 } else {
440 event->recurrence()->unsetRecurs(); 456 event->recurrence()->unsetRecurs();
441 } 457 }
442 458
443 QStringList categoryList; 459 QStringList categoryList;
444 categoryList << getCategory( Note ); 460 categoryList << getCategory( Note );
445 event->setCategories( categoryList ); 461 event->setCategories( categoryList );
446 QString alarmString = "na"; 462 QString alarmString = "na";
447 // strange 0 semms to mean: alarm enabled 463 // strange 0 semms to mean: alarm enabled
448 if ( alarm ) { 464 if ( alarm ) {
449 Alarm *alarm; 465 Alarm *alarm;
450 if ( event->alarms().count() > 0 ) 466 if ( event->alarms().count() > 0 )
451 alarm = event->alarms().first(); 467 alarm = event->alarms().first();
452 else { 468 else {
453 alarm = new Alarm( event ); 469 alarm = new Alarm( event );
454 event->addAlarm( alarm ); 470 event->addAlarm( alarm );
455 } 471 }
456 alarm->setType( Alarm::Audio ); 472 alarm->setType( Alarm::Audio );
457 alarm->setEnabled( true ); 473 alarm->setEnabled( true );
458 int alarmOffset = alarmDt.secsTo( event->dtStart() ); 474 int alarmOffset = alarmDt.secsTo( event->dtStart() );
459 alarm->setStartOffset( -alarmOffset ); 475 alarm->setStartOffset( -alarmOffset );
460 alarmString = QString::number( alarmOffset ); 476 alarmString = QString::number( alarmOffset );
461 } else { 477 } else {
462 Alarm *alarm; 478 Alarm *alarm;
463 if ( event->alarms().count() > 0 ) { 479 if ( event->alarms().count() > 0 ) {
464 alarm = event->alarms().first(); 480 alarm = event->alarms().first();
465 alarm->setType( Alarm::Audio ); 481 alarm->setType( Alarm::Audio );
466 alarm->setStartOffset( -60*15 ); 482 alarm->setStartOffset( -60*15 );
467 alarm->setEnabled( false ); 483 alarm->setEnabled( false );
468 } 484 }
469 } 485 }
470 // csum ***************************************** 486 // csum *****************************************
471 QStringList attList; 487 QStringList attList;
472 uint cSum; 488 uint cSum;
473 attList << dtToString ( event->dtStart() ); 489 attList << dtToString ( event->dtStart() );
474 attList << dtToString ( event->dtEnd() ); 490 attList << dtToString ( event->dtEnd() );
475 attList << QString::number( id ); 491 attList << QString::number( id );
476 attList << event->summary(); 492 attList << event->summary();
477 attList << event->location(); 493 attList << event->location();
478 attList << alarmString; 494 attList << alarmString;
479 attList << recurString; 495 attList << recurString;
480 attList << event->categoriesStr(); 496 attList << event->categoriesStr();
481 attList << event->secrecyStr(); 497 attList << event->secrecyStr();
482 cSum = PhoneFormat::getCsum(attList ); 498 cSum = PhoneFormat::getCsum(attList );
483 event->setCsum( mProfileName, QString::number( cSum )); 499 event->setCsum( mProfileName, QString::number( cSum ));
484 mCalendar->addEvent( event); 500 mCalendar->addEvent( event);
485 501
486 return true; 502 return true;
487 } 503 }
488 504
489 505
490 QDateTime fromGSM ( GSM_DateTime*dtp, bool useTz = true ) { 506 QDateTime fromGSM ( GSM_DateTime*dtp, bool useTz = true ) {
491 QDateTime dt; 507 QDateTime dt;
492 int y,m,t,h,min,sec; 508 int y,m,t,h,min,sec;
493 y = dtp->Year; 509 y = dtp->Year;
494 m = dtp->Month; 510 m = dtp->Month;
495 t = dtp->Day; 511 t = dtp->Day;
496 h = dtp->Hour; 512 h = dtp->Hour;
497 min = dtp->Minute; 513 min = dtp->Minute;
498 sec = dtp->Second; 514 sec = dtp->Second;
499 dt = QDateTime(QDate(y,m,t), QTime(h,min,sec)); 515 dt = QDateTime(QDate(y,m,t), QTime(h,min,sec));
500 // dtp->Timezone: offset in hours 516 // dtp->Timezone: offset in hours
501 int offset = KGlobal::locale()->localTimeOffset( dt ); 517 int offset = KGlobal::locale()->localTimeOffset( dt );
502 if ( useTz ) 518 if ( useTz )
503 dt = dt.addSecs ( offset*60); 519 dt = dt.addSecs ( offset*60);
504 return dt; 520 return dt;
505 521
506 } 522 }
507 523
508 QString dtToString( const QDateTime& dti, bool useTZ = false ) 524 QString dtToString( const QDateTime& dti, bool useTZ = false )
509 { 525 {
510 QString datestr; 526 QString datestr;
511 QString timestr; 527 QString timestr;
512 int offset = KGlobal::locale()->localTimeOffset( dti ); 528 int offset = KGlobal::locale()->localTimeOffset( dti );
513 QDateTime dt; 529 QDateTime dt;
514 if (useTZ) 530 if (useTZ)
515 dt = dti.addSecs ( -(offset*60)); 531 dt = dti.addSecs ( -(offset*60));
516 else 532 else
517 dt = dti; 533 dt = dti;
518 if(dt.date().isValid()){ 534 if(dt.date().isValid()){
519 const QDate& date = dt.date(); 535 const QDate& date = dt.date();
520 datestr.sprintf("%04d%02d%02d", 536 datestr.sprintf("%04d%02d%02d",
521 date.year(), date.month(), date.day()); 537 date.year(), date.month(), date.day());
522 } 538 }
523 if(dt.time().isValid()){ 539 if(dt.time().isValid()){
524 const QTime& time = dt.time(); 540 const QTime& time = dt.time();
525 timestr.sprintf("T%02d%02d%02d", 541 timestr.sprintf("T%02d%02d%02d",
526 time.hour(), time.minute(), time.second()); 542 time.hour(), time.minute(), time.second());
527 } 543 }
528 return datestr + timestr; 544 return datestr + timestr;
529 } 545 }
530 QDate datefromGSM ( GSM_DateTime*dtp ) { 546 QDate datefromGSM ( GSM_DateTime*dtp ) {
531 return QDate ( dtp->Year, dtp->Month, dtp->Day ); 547 return QDate ( dtp->Year, dtp->Month, dtp->Day );
532 } 548 }
533 QString getCategory( GSM_CalendarEntry*Note) 549 QString getCategory( GSM_CalendarEntry*Note)
534 { 550 {
535 QString CATEGORY; 551 QString CATEGORY;
536 switch (Note->Type) { 552 switch (Note->Type) {
537 case GSM_CAL_REMINDER : CATEGORY = QString("Reminder"); break; 553 case GSM_CAL_REMINDER : CATEGORY = QString("Reminder"); break;
538 case GSM_CAL_CALL : CATEGORY = QString("Call"); break; 554 case GSM_CAL_CALL : CATEGORY = QString("Call"); break;
539 case GSM_CAL_MEETING : CATEGORY = QString("Meeting"); break; 555 case GSM_CAL_MEETING : CATEGORY = QString("Meeting"); break;
540 case GSM_CAL_BIRTHDAY : CATEGORY = QString("Birthday"); break; 556 case GSM_CAL_BIRTHDAY : CATEGORY = QString("Birthday"); break;
541 case GSM_CAL_MEMO : CATEGORY = QString("Memo"); break; 557 case GSM_CAL_MEMO : CATEGORY = QString("Memo"); break;
542 case GSM_CAL_TRAVEL : CATEGORY = QString("Travel"); break; 558 case GSM_CAL_TRAVEL : CATEGORY = QString("Travel"); break;
543 case GSM_CAL_VACATION : CATEGORY = QString("Vacation"); break; 559 case GSM_CAL_VACATION : CATEGORY = QString("Vacation"); break;
544 case GSM_CAL_ALARM : CATEGORY = QString("Alarm"); break; 560 case GSM_CAL_ALARM : CATEGORY = QString("Alarm"); break;
545 case GSM_CAL_DAILY_ALARM : CATEGORY = QString("Daily alarm"); break; 561 case GSM_CAL_DAILY_ALARM : CATEGORY = QString("Daily alarm"); break;
546 case GSM_CAL_T_ATHL : CATEGORY = QString("Training/Athletism"); break; 562 case GSM_CAL_T_ATHL : CATEGORY = QString("Training/Athletism"); break;
547 case GSM_CAL_T_BALL : CATEGORY = QString("Training/Ball Games"); break; 563 case GSM_CAL_T_BALL : CATEGORY = QString("Training/Ball Games"); break;
548 case GSM_CAL_T_CYCL : CATEGORY = QString("Training/Cycling"); break; 564 case GSM_CAL_T_CYCL : CATEGORY = QString("Training/Cycling"); break;
549 case GSM_CAL_T_BUDO : CATEGORY = QString("Training/Budo"); break; 565 case GSM_CAL_T_BUDO : CATEGORY = QString("Training/Budo"); break;
550 case GSM_CAL_T_DANC : CATEGORY = QString("Training/Dance"); break; 566 case GSM_CAL_T_DANC : CATEGORY = QString("Training/Dance"); break;
551 case GSM_CAL_T_EXTR : CATEGORY = QString("Training/Extreme Sports"); break; 567 case GSM_CAL_T_EXTR : CATEGORY = QString("Training/Extreme Sports"); break;
552 case GSM_CAL_T_FOOT : CATEGORY = QString("Training/Football"); break; 568 case GSM_CAL_T_FOOT : CATEGORY = QString("Training/Football"); break;
553 case GSM_CAL_T_GOLF : CATEGORY = QString("Training/Golf"); break; 569 case GSM_CAL_T_GOLF : CATEGORY = QString("Training/Golf"); break;
554 case GSM_CAL_T_GYM : CATEGORY = QString("Training/Gym"); break; 570 case GSM_CAL_T_GYM : CATEGORY = QString("Training/Gym"); break;
555 case GSM_CAL_T_HORS : CATEGORY = QString("Training/Horse Races"); break; 571 case GSM_CAL_T_HORS : CATEGORY = QString("Training/Horse Races"); break;
556 case GSM_CAL_T_HOCK : CATEGORY = QString("Training/Hockey"); break; 572 case GSM_CAL_T_HOCK : CATEGORY = QString("Training/Hockey"); break;
557 case GSM_CAL_T_RACE : CATEGORY = QString("Training/Races"); break; 573 case GSM_CAL_T_RACE : CATEGORY = QString("Training/Races"); break;
558 case GSM_CAL_T_RUGB : CATEGORY = QString("Training/Rugby"); break; 574 case GSM_CAL_T_RUGB : CATEGORY = QString("Training/Rugby"); break;
559 case GSM_CAL_T_SAIL : CATEGORY = QString("Training/Sailing"); break; 575 case GSM_CAL_T_SAIL : CATEGORY = QString("Training/Sailing"); break;
560 case GSM_CAL_T_STRE : CATEGORY = QString("Training/Street Games"); break; 576 case GSM_CAL_T_STRE : CATEGORY = QString("Training/Street Games"); break;
561 case GSM_CAL_T_SWIM : CATEGORY = QString("Training/Swimming"); break; 577 case GSM_CAL_T_SWIM : CATEGORY = QString("Training/Swimming"); break;
562 case GSM_CAL_T_TENN : CATEGORY = QString("Training/Tennis"); break; 578 case GSM_CAL_T_TENN : CATEGORY = QString("Training/Tennis"); break;
563 case GSM_CAL_T_TRAV : CATEGORY = QString("Training/Travels"); break; 579 case GSM_CAL_T_TRAV : CATEGORY = QString("Training/Travels"); break;
564 case GSM_CAL_T_WINT : CATEGORY = QString("Training/Winter Games"); break; 580 case GSM_CAL_T_WINT : CATEGORY = QString("Training/Winter Games"); break;
565 default : CATEGORY = QString(""); 581 default : CATEGORY = QString("");
566 } 582 }
567 583
568 return CATEGORY; 584 return CATEGORY;
569 } 585 }
570 586
571protected: 587protected:
572private: 588private:
573 Calendar *mCalendar; 589 Calendar *mCalendar;
574 QString mProfileName ; 590 QString mProfileName ;
575}; 591};
576 592
577 593
578PhoneFormat::PhoneFormat() 594PhoneFormat::PhoneFormat()
579{ 595{
580 ; 596 ;
581} 597}
582 598
583PhoneFormat::~PhoneFormat() 599PhoneFormat::~PhoneFormat()
584{ 600{
585} 601}
586ulong PhoneFormat::getCsum( const QStringList & attList) 602ulong PhoneFormat::getCsum( const QStringList & attList)
587{ 603{
588 int max = attList.count() -1; 604 int max = attList.count() -1;
589 ulong cSum = 0; 605 ulong cSum = 0;
590 int j,k,i; 606 int j,k,i;
591 int add; 607 int add;
592 for ( i = 1; i < max ; ++i ) { 608 for ( i = 1; i < max ; ++i ) {
593 QString s = attList[i]; 609 QString s = attList[i];
594 if ( ! s.isEmpty() ){ 610 if ( ! s.isEmpty() ){
595 j = s.length(); 611 j = s.length();
596 for ( k = 0; k < j; ++k ) { 612 for ( k = 0; k < j; ++k ) {
597 int mul = k +1; 613 int mul = k +1;
598 add = s[k].unicode (); 614 add = s[k].unicode ();
599 if ( k < 16 ) 615 if ( k < 16 )
600 mul = mul * mul; 616 mul = mul * mul;
601 add = add * mul *i*i*i; 617 add = add * mul *i*i*i;
602 cSum += add; 618 cSum += add;