-rw-r--r-- | Makefile | 619 | ||||
-rw-r--r-- | kabc/addressbook.cpp | 26 | ||||
-rw-r--r-- | kabc/addressee.cpp | 25 | ||||
-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 4 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 25 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 1 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 4 |
7 files changed, 301 insertions, 403 deletions
@@ -1,368 +1,253 @@ -export KDEPIMDIR = $(shell pwd) - -export KDEPIM_VERSION=$(shell sed -e 's/.*\"\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/' < version) - -ifeq ($(PLATFORM) , zaurus) - BUILD_NO_LDAP_PLUGIN=1 -endif - -ifneq ($(PLATFORM) , zaurus) - BUILD_NO_SHARP_PLUGIN=1 -endif - -#opie plugin is deprecated. The qtopia plugin handles the task from now on. -BUILD_NO_OPIE_PLUGIN=1 - -SUBDIRS_MICROKDE = \ - libical/src/libical \ - libical/src/libicalss \ - qtcompat \ - microkde \ - libkcal \ - libkdepim \ - kabc \ - kabc/formats/binary \ - kabc/plugins/file \ - kabc/plugins/dir \ - korganizer \ - kalarmd \ - kaddressbook - -SUBDIRS_QTOPIA_PLUGIN = \ - kabc/plugins/qtopia - -SUBDIRS_OPIE_PLUGIN = \ - kabc/plugins/opie - -SUBDIRS_SHARP_PLUGIN = \ - kabc/plugins/sharpdtm - -SUBDIRS_LDAP_PLUGIN = \ - kabc/plugins/ldap - -SUBDIRS_MICROMAIL = \ - kmicromail/libetpan \ - kmicromail/libmailwrapper \ - kmicromail - -SUBDIRS_GAMMU = \ - gammu/emb/common \ - gammu/emb/gammu - -SUBDIRS_PWMANAGER = \ - pwmanager/libcrypt/mpi \ - pwmanager/libcrypt/error \ - pwmanager/libcrypt/cipher \ - pwmanager/libcrypt/zlib \ - pwmanager/pwmanager - -SUBDIRS = \ - $(SUBDIRS_MICROKDE) \ - $(SUBDIRS_QTOPIA_PLUGIN) \ - $(SUBDIRS_OPIE_PLUGIN) \ - $(SUBDIRS_SHARP_PLUGIN) \ - $(SUBDIRS_LDAP_PLUGIN) \ - $(SUBDIRS_MICROMAIL) \ - $(SUBDIRS_GAMMU) \ - $(SUBDIRS_PWMANAGER) - - -all: build_microkde \ - build_qtopia_plugin \ - build_opie_plugin \ - build_sharp_plugin \ - build_ldap_plugin \ - build_micromail \ - build_gammu \ - build_pwmanager - - -build_microkde: variable_test tmake - for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - -build_qtopia_plugin: build_microkde - ifdef BUILD_NO_QTOPIA_PLUGIN - @echo == qtopia plugin not build. - else - for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - -build_opie_plugin: build_microkde - ifdef BUILD_NO_OPIE_PLUGIN - @echo == opie plugin not build. - else - for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - -build_sharp_plugin: build_microkde - ifdef BUILD_NO_SHARP_PLUGIN - @echo == ldap plugin not build. - else - for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - -build_ldap_plugin: build_microkde - ifdef BUILD_NO_LDAP_PLUGIN - @echo == ldap plugin not build. - else - for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - - -build_micromail: build_microkde - ifdef BUILD_NO_MICROMAIL - @echo == kmicromail not build. - else - for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - -build_gammu: variable_test tmake - ifdef BUILD_NO_GAMMU - @echo == gammu not build. - else - for i in $(SUBDIRS_GAMMU); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - -build_pwmanager: build_microkde - ifdef BUILD_NO_PWMANAGER - @echo == pwmanager not build. - else - for i in $(SUBDIRS_PWMANAGER); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - - -variable_info: - @echo -------------------------------------- - @echo KDEPIM buildsystem, variableinfo... - @echo KDEPIMDIR=$(KDEPIMDIR) - @echo QTDIR=$(QTDIR) - @echo QPEDIR=$(QPEDIR) - @echo OPIEDIR=$(OPIEDIR) - @echo PLATFORM=$(PLATFORM) - @echo RELEASE_DEBUG=$(RELEASE_DEBUG) - @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) - @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) - @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) - @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN) - @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) - ifndef BUILD_NO_SHARP_PLUGIN - @echo SHARPDTMSDK=$(SHARPDTMSDK) - endif - @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) - @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER) - @echo -------------------------------------- - -variable_test: variable_info - @echo KDEPIM buildsystem, variablecheck... - ifndef KDEPIMDIR - @echo KDEPIMDIR is not defined. - $(error KDEPIMDIR is not defined) - endif - ifndef PLATFORM - @echo PLATFORM is not defined. - $(error PLATFORM is not defined) - endif - ifdef BUILD_NO_LDAP_PLUGIN - @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) - endif - ifdef BUILD_NO_OPIE_PLUGIN - @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) - endif - ifdef BUILD_NO_QTOPIA_PLUGIN - @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN) - endif - ifdef BUILD_NO_MICROMAIL - @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) - endif - ifdef BUILD_NO_SHARP_PLUGIN - @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) - else - ifndef SHARPDTMSDK - @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) - $(error SHARPDTMSDK is not defined) - endif - endif - ifdef BUILD_NO_GAMMU - @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU) - endif - ifdef BUILD_NO_PWMANAGER - @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER) - endif - @echo -------------------------------------- - - -objects: - for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done - for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done - mkdir -p libical/lib/$(PLATFORM) - mkdir -p pwmanager/libcrypt/$(PLATFORM) - -clean: - rm -rf libical/lib/$(PLATFORM)/*; - rm -rf pwmanager/libcrypt/$(PLATFORM)/*; - for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ - rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ - done - -install: - - cd bin/kdepim; make install - cp -r Pim $(QPEDIR)/apps - cp db2file/db2file $(QPEDIR)/bin/db2file - cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop - cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop - cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop - cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop - -dist: - @echo Dont forget to do "make install" before "make dist" - rm -f *arm.ipk - rm -f *~ - cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim - mkipks kmicrokdelibs.control - mkipks korganizer.control - mkipks kaddressbook.control - ifndef BUILD_NO_MICROMAIL - mkipks kopiemail.control - endif - ifndef BUILD_NO_SHARP_PLUGIN - mkipks ksharpPIM-DTMaccess.control - endif - mkipks korganizer-alarm.control - ifndef BUILD_NO_GAMMU - mkipks kmobilephoneaccess.control - endif - ifndef BUILD_NO_PWMANAGER - mkipks pwmanager.control - endif - mkipks pimTABicon.control - -tmake: objects \ - qtcompat/Makefile$(PLATFORM) \ - microkde/Makefile$(PLATFORM) \ - libkcal/Makefile$(PLATFORM) \ - libkdepim/Makefile$(PLATFORM) \ - korganizer/Makefile$(PLATFORM) \ - kalarmd/Makefile$(PLATFORM) \ - libical/src/libical/Makefile$(PLATFORM) \ - libical/src/libicalss/Makefile$(PLATFORM) \ - kabc/Makefile$(PLATFORM) \ - kabc/formats/binary/Makefile$(PLATFORM) \ - kabc/plugins/file/Makefile$(PLATFORM) \ - kabc/plugins/dir/Makefile$(PLATFORM) \ - kabc/plugins/ldap/Makefile$(PLATFORM) \ - kabc/plugins/opie/Makefile$(PLATFORM) \ - kabc/plugins/qtopia/Makefile$(PLATFORM) \ - kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ - kaddressbook/Makefile$(PLATFORM) \ - kmicromail/Makefile$(PLATFORM) \ - kmicromail/libetpan/Makefile$(PLATFORM) \ - kmicromail/libmailwrapper/Makefile$(PLATFORM) \ - gammu/emb/common/Makefile$(PLATFORM) \ - gammu/emb/gammu/Makefile$(PLATFORM) \ - pwmanager/pwmanager/Makefile$(PLATFORM) \ - pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \ - pwmanager/libcrypt/error/Makefile$(PLATFORM) \ - pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \ - pwmanager/libcrypt/zlib/Makefile$(PLATFORM) - -qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro - cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM) - -microkde/Makefile$(PLATFORM): microkde/microkdeE.pro - cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM) - -libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro - cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM) - - -libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro - cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM) - -kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro - cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM) - -korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro - cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM) - -libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro - cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM) - -libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro - cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM) - -kabc/Makefile$(PLATFORM): kabc/kabcE.pro - cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM) - -kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro - cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) - -kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro - cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM) - -kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro - cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM) - -kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro - cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM) - -kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro - cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM) - -kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro - cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM) - -kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro - cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM) - -kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro - cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM) - -kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro - cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM) - -kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro - cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM) - -kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro - cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM) - -gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro - cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM) - -gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro - cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM) - -pwmanager/pwmanager/Makefile$(PLATFORM): pwmanager/pwmanager/pwmanagerE.pro - cd pwmanager/pwmanager; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" pwmanagerE.pro -o Makefile$(PLATFORM) - - -pwmanager/libcrypt/mpi/Makefile$(PLATFORM): pwmanager/libcrypt/mpi/mpi.pro - cd pwmanager/libcrypt/mpi;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" mpi.pro -o Makefile$(PLATFORM) - -pwmanager/libcrypt/error/Makefile$(PLATFORM): pwmanager/libcrypt/error/error.pro - cd pwmanager/libcrypt/error;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" error.pro -o Makefile$(PLATFORM) - -pwmanager/libcrypt/cipher/Makefile$(PLATFORM): pwmanager/libcrypt/cipher/cipher.pro - cd pwmanager/libcrypt/cipher;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" cipher.pro -o Makefile$(PLATFORM) - -pwmanager/libcrypt/zlib/Makefile$(PLATFORM): pwmanager/libcrypt/zlib/zlib.pro - cd pwmanager/libcrypt/zlib;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" zlib.pro -o Makefile$(PLATFORM) - +############################################################################# +# Makefile for building: kdepim-desktop +# Generated by qmake (1.07a) (Qt 3.3.1) on: Thu Oct 28 23:52:22 2004 +# Project: kdepim-desktop.pro +# Template: subdirs +# Command: $(QMAKE) -o Makefile kdepim-desktop.pro +############################################################################# + +MAKEFILE = Makefile +QMAKE = qmake +DEL_FILE = rm -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p +SUBTARGETS = \ + sub-gammu-emb-common \ + sub-gammu-emb-gammu \ + sub-libical \ + sub-libkcal \ + sub-microkde \ + sub-libkdepim \ + sub-kabc \ + sub-korganizer \ + sub-kaddressbook \ + sub-kabc-plugins-file \ + sub-kabc-plugins-dir \ + sub-kabc-plugins-file \ + sub-kabc-plugins-qtopia \ + sub-pwmanager-libcrypt-cipher \ + sub-pwmanager-libcrypt-error \ + sub-pwmanager-libcrypt-mpi \ + sub-pwmanager-libcrypt-zlib \ + sub-pwmanager-pwmanager + +first: all + +all: Makefile $(SUBTARGETS) + +gammu/emb/common/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "gammu/emb/common" || $(MKDIR) "gammu/emb/common" + cd gammu/emb/common && $(QMAKE) common.pro -o $(MAKEFILE) +sub-gammu-emb-common: gammu/emb/common/$(MAKEFILE) FORCE + cd gammu/emb/common && $(MAKE) -f $(MAKEFILE) + +gammu/emb/gammu/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "gammu/emb/gammu" || $(MKDIR) "gammu/emb/gammu" + cd gammu/emb/gammu && $(QMAKE) gammu.pro -o $(MAKEFILE) +sub-gammu-emb-gammu: gammu/emb/gammu/$(MAKEFILE) FORCE + cd gammu/emb/gammu && $(MAKE) -f $(MAKEFILE) + +libical/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical" + cd libical && $(QMAKE) libical.pro -o $(MAKEFILE) +sub-libical: libical/$(MAKEFILE) FORCE + cd libical && $(MAKE) -f $(MAKEFILE) + +libkcal/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "libkcal" || $(MKDIR) "libkcal" + cd libkcal && $(QMAKE) libkcal.pro -o $(MAKEFILE) +sub-libkcal: libkcal/$(MAKEFILE) FORCE + cd libkcal && $(MAKE) -f $(MAKEFILE) + +microkde/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde" + cd microkde && $(QMAKE) microkde.pro -o $(MAKEFILE) +sub-microkde: microkde/$(MAKEFILE) FORCE + cd microkde && $(MAKE) -f $(MAKEFILE) + +libkdepim/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "libkdepim" || $(MKDIR) "libkdepim" + cd libkdepim && $(QMAKE) libkdepim.pro -o $(MAKEFILE) +sub-libkdepim: libkdepim/$(MAKEFILE) FORCE + cd libkdepim && $(MAKE) -f $(MAKEFILE) + +kabc/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc" + cd kabc && $(QMAKE) kabc.pro -o $(MAKEFILE) +sub-kabc: kabc/$(MAKEFILE) FORCE + cd kabc && $(MAKE) -f $(MAKEFILE) + +korganizer/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer" + cd korganizer && $(QMAKE) korganizer.pro -o $(MAKEFILE) +sub-korganizer: korganizer/$(MAKEFILE) FORCE + cd korganizer && $(MAKE) -f $(MAKEFILE) + +kaddressbook/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "kaddressbook" || $(MKDIR) "kaddressbook" + cd kaddressbook && $(QMAKE) kaddressbook.pro -o $(MAKEFILE) +sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE + cd kaddressbook && $(MAKE) -f $(MAKEFILE) + +kabc/plugins/file/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file" + cd kabc/plugins/file && $(QMAKE) file.pro -o $(MAKEFILE) +sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE + cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE) + +kabc/plugins/dir/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir" + cd kabc/plugins/dir && $(QMAKE) dir.pro -o $(MAKEFILE) +sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE + cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE) + +kabc/plugins/file/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file" + cd kabc/plugins/file && $(QMAKE) file.pro -o $(MAKEFILE) +sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE + cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE) + +kabc/plugins/qtopia/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "kabc/plugins/qtopia" || $(MKDIR) "kabc/plugins/qtopia" + cd kabc/plugins/qtopia && $(QMAKE) qtopia.pro -o $(MAKEFILE) +sub-kabc-plugins-qtopia: kabc/plugins/qtopia/$(MAKEFILE) FORCE + cd kabc/plugins/qtopia && $(MAKE) -f $(MAKEFILE) + +pwmanager/libcrypt/cipher/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/cipher" || $(MKDIR) "pwmanager/libcrypt/cipher" + cd pwmanager/libcrypt/cipher && $(QMAKE) cipher.pro -o $(MAKEFILE) +sub-pwmanager-libcrypt-cipher: pwmanager/libcrypt/cipher/$(MAKEFILE) FORCE + cd pwmanager/libcrypt/cipher && $(MAKE) -f $(MAKEFILE) + +pwmanager/libcrypt/error/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/error" || $(MKDIR) "pwmanager/libcrypt/error" + cd pwmanager/libcrypt/error && $(QMAKE) error.pro -o $(MAKEFILE) +sub-pwmanager-libcrypt-error: pwmanager/libcrypt/error/$(MAKEFILE) FORCE + cd pwmanager/libcrypt/error && $(MAKE) -f $(MAKEFILE) + +pwmanager/libcrypt/mpi/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/mpi" || $(MKDIR) "pwmanager/libcrypt/mpi" + cd pwmanager/libcrypt/mpi && $(QMAKE) mpi.pro -o $(MAKEFILE) +sub-pwmanager-libcrypt-mpi: pwmanager/libcrypt/mpi/$(MAKEFILE) FORCE + cd pwmanager/libcrypt/mpi && $(MAKE) -f $(MAKEFILE) + +pwmanager/libcrypt/zlib/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/zlib" || $(MKDIR) "pwmanager/libcrypt/zlib" + cd pwmanager/libcrypt/zlib && $(QMAKE) zlib.pro -o $(MAKEFILE) +sub-pwmanager-libcrypt-zlib: pwmanager/libcrypt/zlib/$(MAKEFILE) FORCE + cd pwmanager/libcrypt/zlib && $(MAKE) -f $(MAKEFILE) + +pwmanager/pwmanager/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "pwmanager/pwmanager" || $(MKDIR) "pwmanager/pwmanager" + cd pwmanager/pwmanager && $(QMAKE) pwmanager.pro -o $(MAKEFILE) +sub-pwmanager-pwmanager: pwmanager/pwmanager/$(MAKEFILE) FORCE + cd pwmanager/pwmanager && $(MAKE) -f $(MAKEFILE) + +Makefile: kdepim-desktop.pro /usr/lib/qt3/mkspecs/default/qmake.conf + $(QMAKE) -o Makefile kdepim-desktop.pro +qmake: qmake_all + @$(QMAKE) -o Makefile kdepim-desktop.pro + +all: $(SUBTARGETS) +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) + ( [ -d gammu/emb/common ] && cd gammu/emb/common ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d libical ] && cd libical ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d libkcal ] && cd libkcal ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d microkde ] && cd microkde ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d libkdepim ] && cd libkdepim ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d kabc ] && cd kabc ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d korganizer ] && cd korganizer ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d kaddressbook ] && cd kaddressbook ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true + ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true +clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE + ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; ) || true + ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; ) || true +uninstall_subdirs: qmake_all FORCE + ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true + ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true +install_subdirs: qmake_all FORCE + ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) install; ) || true + ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) install; ) || true +distclean: qmake_all FORCE + ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true + +install: install_subdirs + +uninstall: uninstall_subdirs + +FORCE: diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 6194d6d..4c4ae09 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -549,33 +549,32 @@ void AddressBook::smplifyAddressees() for ( ait = begin(); ait != end(); ++ait ) { (*ait).simplifyEmails(); (*ait).simplifyPhoneNumbers(); (*ait).simplifyPhoneNumberTypes(); (*ait).simplifyAddresses(); } } void AddressBook::removeSyncInfo( QString syncProfile) { Iterator ait; for ( ait = begin(); ait != end(); ++ait ) { (*ait).removeID( syncProfile ); } if ( syncProfile.isEmpty() ) { Iterator it = begin(); Iterator it2 ; - QDateTime dt ( QDate( 2004,1,1) ); while ( it != end() ) { if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) { it2 = it; //qDebug("removing %s ",(*it).uid().latin1() ); ++it; removeAddressee( it2 ); } else { //qDebug("skipping %s ",(*it).uid().latin1() ); ++it; } } } else { Addressee lse; lse = findByUid( "last-syncAddressee-"+ syncProfile ); if ( ! lse.isEmpty() ) removeAddressee( lse ); @@ -773,67 +772,62 @@ void AddressBook::insertAddressee( const Addressee &a, bool setRev, bool takeRes bool changed = false; Addressee addr = a; if ( addr != (*it) ) changed = true; if ( takeResource ) { Resource * res = (*it).resource(); (*it) = a; (*it).setResource( res ); } else { (*it) = a; if ( (*it).resource() == 0 ) (*it).setResource( standardResource() ); } if ( changed ) { if ( setRev ) { - - // get rid of micro seconds - QDateTime dt = QDateTime::currentDateTime(); - QTime t = dt.time(); - dt.setTime( QTime (t.hour (), t.minute (), t.second () ) ); - (*it).setRevision( dt ); + (*it).setRevision( QDateTime::currentDateTime() ); } (*it).setChanged( true ); } found = true; } else { if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) { QString name = (*it).uid().mid( 19 ); Addressee b = a; QString id = b.getID( name ); if ( ! id.isEmpty() ) { QString des = (*it).note(); int startN; if( (startN = des.find( id ) ) >= 0 ) { int endN = des.find( ",", startN+1 ); des = des.left( startN ) + des.mid( endN+1 ); (*it).setNote( des ); } } } } } if ( found ) - return; + return; + d->mAddressees.append( a ); Addressee& addr = d->mAddressees.last(); if ( addr.resource() == 0 ) addr.setResource( standardResource() ); - addr.setChanged( true ); } void AddressBook::removeAddressee( const Addressee &a ) { Iterator it; Iterator it2; bool found = false; for ( it = begin(); it != end(); ++it ) { if ( a.uid() == (*it).uid() ) { found = true; it2 = it; } else { if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) { QString name = (*it).uid().mid( 19 ); Addressee b = a; @@ -846,53 +840,51 @@ void AddressBook::removeAddressee( const Addressee &a ) } } } } } if ( found ) removeAddressee( it2 ); } void AddressBook::removeSyncAddressees( bool removeDeleted ) { Iterator it = begin(); Iterator it2 ; - QDateTime dt ( QDate( 2004,1,1) ); + QDateTime dt ( QDate( 2003,1,1) ); while ( it != end() ) { (*it).setRevision( dt ); if (( *it).IDStr() != "changed" ) { // "changed" is used for tagging changed addressees when syncing with KDE or OL (*it).removeCustom( "KADDRESSBOOK", "X-ExternalID" ); - (*it).setIDStr(""); + (*it).setIDStr(":"); } if ( ( (*it).tempSyncStat() == SYNC_TEMPSTATE_DELETE && removeDeleted )|| (*it).uid().left( 19 ) == QString("last-syncAddressee-")) { it2 = it; //qDebug("removing %s ",(*it).uid().latin1() ); ++it; removeAddressee( it2 ); } else { //qDebug("skipping %s ",(*it).uid().latin1() ); if ( removeDeleted ) { // we have no postprocessing in the resource, we have to do it here // we have to compute csum for all, because it could be the first sync (*it).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); - - } ++it; } } deleteRemovedAddressees(); } void AddressBook::removeAddressee( const Iterator &it ) { d->mRemovedAddressees.append( (*it) ); d->mAddressees.remove( it.d->mIt ); } AddressBook::Iterator AddressBook::find( const Addressee &a ) { Iterator it; @@ -918,46 +910,48 @@ void AddressBook::preExternSync( AddressBook* aBook, const QString& csd , bool i { //qDebug("AddressBook::preExternSync "); AddressBook::Iterator it; for ( it = begin(); it != end(); ++it ) { (*it).setID( csd, (*it).externalUID() ); (*it).computeCsum( csd ); } mergeAB( aBook ,csd, isSubset ); } void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool setID) { //qDebug("AddressBook::postExternSync "); AddressBook::Iterator it; for ( it = begin(); it != end(); ++it ) { //qDebug("check uid %s ", (*it).uid().latin1() ); if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_ID || - (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_CSUM ) { + (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_CSUM || + (*it).tempSyncStat() == SYNC_TEMPSTATE_ADDED_EXTERNAL) { Addressee ad = aBook->findByUid( ( (*it).uid() )); if ( ad.isEmpty() ) { qDebug("postExternSync:ERROR addressee is empty: %s ", (*it).uid().latin1()); } else { (*it).setIDStr(":"); - (*it).computeCsum( csd ); if ( setID ) { if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) ad.setID( csd, (*it).externalUID() ); } else ad.setID( csd, (*it).uid() ); + (*it).computeCsum( csd ); ad.setCsum( csd, (*it).getCsum( csd ) ); - aBook->insertAddressee( ad ); + //qDebug("CSUM %s ",(*it).getCsum( csd ).latin1() ); + aBook->insertAddressee( ad , false); } } } } bool AddressBook::containsExternalUid( const QString& uid ) { Iterator it; for ( it = begin(); it != end(); ++it ) { if ( uid == (*it).externalUID( ) ) return true; } return false; } Addressee AddressBook::findByExternUid( const QString& uid , const QString& profile ) { diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index d5a110a..3d4992c 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -196,37 +196,37 @@ ulong Addressee::getCsum4List( const QStringList & attList) int ii = i+1; add = add * mul *ii*ii*ii; cSum += add; } } } //QString dump = attList.join(","); //qDebug("csum: %d %s", cSum,dump.latin1()); return cSum; } void Addressee::computeCsum(const QString &dev) { QStringList l; - if ( !mData->name.isEmpty() ) l.append(mData->name); - if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName ); + //if ( !mData->name.isEmpty() ) l.append(mData->name); + //if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName ); if ( !mData->familyName.isEmpty() ) l.append( mData->familyName ); if ( !mData->givenName.isEmpty() ) l.append(mData->givenName ); - if ( !mData->additionalName ) l.append( mData->additionalName ); + if ( !mData->additionalName.isEmpty() ) l.append( mData->additionalName ); if ( !mData->prefix.isEmpty() ) l.append( mData->prefix ); if ( !mData->suffix.isEmpty() ) l.append( mData->suffix ); if ( !mData->nickName.isEmpty() ) l.append( mData->nickName ); if ( mData->birthday.isValid() ) l.append( mData->birthday.toString() ); if ( !mData->mailer.isEmpty() ) l.append( mData->mailer ); if ( mData->timeZone.isValid() ) l.append( mData->timeZone.asString() ); if ( mData->geo.isValid() ) l.append( mData->geo.asString() ); if ( !mData->title .isEmpty() ) l.append( mData->title ); if ( !mData->role.isEmpty() ) l.append( mData->role ); if ( !mData->organization.isEmpty() ) l.append( mData->organization ); if ( !mData->note.isEmpty() ) l.append( mData->note ); if ( !mData->productId.isEmpty() ) l.append(mData->productId ); if ( !mData->sortString.isEmpty() ) l.append( mData->sortString ); if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString()); // if ( !mData->logo.isEmpty() ) l.append( ); //if ( !mData->photo.isEmpty() ) l.append( ); @@ -243,43 +243,53 @@ void Addressee::computeCsum(const QString &dev) t.append( ( *phoneIter ).number()+QString::number( ( *phoneIter ).type() ) ); t.sort(); uint iii; for ( iii = 0; iii < t.count(); ++iii) l.append( t[iii] ); t = mData->emails; t.sort(); for ( iii = 0; iii < t.count(); ++iii) l.append( t[iii] ); t = mData->categories; t.sort(); for ( iii = 0; iii < t.count(); ++iii) l.append( t[iii] ); t = mData->custom; t.sort(); for ( iii = 0; iii < t.count(); ++iii) - l.append( t[iii] ); + if ( t[iii].left( 25 ) != "KADDRESSBOOK-X-ExternalID" ) { + int find = t[iii].find (':')+1; + //qDebug("lennnn %d %d ", find, t[iii].length()); + if ( find < t[iii].length()) + l.append( t[iii] ); + + } KABC::Address::List::Iterator addressIter; for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end(); ++addressIter ) { t = (*addressIter).asList(); t.sort(); for ( iii = 0; iii < t.count(); ++iii) l.append( t[iii] ); } uint cs = getCsum4List(l); - //qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); +#if 1 + for ( iii = 0; iii < l.count(); ++iii) + qDebug("%d***%s***",iii,l[iii].latin1()); + qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); +#endif setCsum( dev, QString::number (cs )); } void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) { detach(); if ( mData->name.isEmpty() ) mData->name = ad.mData->name; if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName; if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; if ( !mData->birthday.isValid() ) @@ -1098,33 +1108,36 @@ void Addressee::setProductId( const QString &productId ) QString Addressee::productId() const { return mData->productId; } QString Addressee::productIdLabel() { return i18n("Product Identifier"); } void Addressee::setRevision( const QDateTime &revision ) { if ( revision == mData->revision ) return; detach(); mData->empty = false; - mData->revision = revision; + mData->revision = QDateTime( revision.date(), + QTime (revision.time().hour(), + revision.time().minute(), + revision.time().second())); } QDateTime Addressee::revision() const { return mData->revision; } QString Addressee::revisionLabel() { return i18n("Revision Date"); } void Addressee::setSortString( const QString &sortString ) { if ( sortString == mData->sortString ) return; diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 012780b..3397e06 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp @@ -1047,33 +1047,35 @@ void AddresseeEditorWidget::load() mGenderBox->setCurrentItem ( 1 ); else if ( gen == "male" ) mGenderBox->setCurrentItem ( 2 ); else mGenderBox->setCurrentItem ( 0 ); blockSignals( block ); mBlockSignals = false; mDirty = false; } void AddresseeEditorWidget::save() { if ( !dirty() ) { return; } - + + mAddressee.setRevision( QDateTime::currentDateTime() ); + mAddressee.setRole( mRoleEdit->text() ); mAddressee.setOrganization( mOrgEdit->text() ); mAddressee.setUrl( KURL( mURLEdit->text() ) ); mAddressee.setNote( mNoteEdit->text() ); if ( mBirthdayPicker->inputIsValid() ) { QDate da = mBirthdayPicker->date(); if ( da > QDate::currentDate() ) da.setYMD(da.year()-100, da.month(), da.day() ); mAddressee.setBirthday( QDateTime( da ) ); //qDebug("bday %s ",da.toString().latin1()); } else { mAddressee.setBirthday( QDateTime() ); mBirthdayPicker->clear(); } mAddressee.setNickName( mNicknameEdit->text() ); diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 273d435..6e482b5 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -2393,71 +2393,70 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i // int zaurusUid() const; // void setZaurusStat(int id); // int zaurusStat() const; // 0 equal // 1 take local // 2 take remote // 3 cancel QDateTime lastSync = mLastAddressbookSync; QDateTime localMod = local->revision(); QDateTime remoteMod = remote->revision(); QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { bool remCh, locCh; remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); - - //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); + qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); locCh = ( localMod > mLastAddressbookSync ); if ( !remCh && ! locCh ) { - //qDebug("both not changed "); + qDebug("both not changed "); lastSync = localMod.addDays(1); if ( mode <= SYNC_PREF_ASK ) return 0; } else { if ( locCh ) { - //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); + qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); lastSync = localMod.addDays( -1 ); if ( !remCh ) remoteMod =( lastSync.addDays( -1 ) ); } else { - //qDebug(" not loc changed "); + qDebug(" not loc changed "); lastSync = localMod.addDays( 1 ); - if ( remCh ) + if ( remCh ) { + qDebug("rem changed "); remoteMod =( lastSync.addDays( 1 ) ); + } } } full = true; if ( mode < SYNC_PREF_ASK ) mode = SYNC_PREF_ASK; } else { if ( localMod == remoteMod ) return 0; } - // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); - - //qDebug("%s %d %s %d", local->lastModified().toString().latin1() , localMod, remote->lastModified().toString().latin1(), remoteMod); - //qDebug("%d %d %d %d ", local->lastModified().time().second(), local->lastModified().time().msec(), remote->lastModified().time().second(), remote->lastModified().time().msec() ); + qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec()); + qDebug("lastsync %s ", lastSync.toString().latin1() ); //full = true; //debug only if ( full ) { bool equ = ( (*local) == (*remote) ); if ( equ ) { - //qDebug("equal "); + qDebug("equal "); if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); } if ( mode < SYNC_PREF_FORCE_LOCAL ) return 0; }//else //debug only //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); } int result; bool localIsNew; //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , local->lastModified().toString().latin1() , remote->lastModified().toString().latin1() ); if ( full && mode < SYNC_PREF_NEWEST ) mode = SYNC_PREF_ASK; @@ -2630,34 +2629,35 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo if ( take == 1 ) {// take local ********************** if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); local->insertAddressee( inL, false ); idS = inR.externalUID(); OidS = inR.originalExternalUID(); } else idS = inR.IDStr(); remote->removeAddressee( inR ); inR = inL; inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { inR.setOriginalExternalUID( OidS ); inR.setExternalUID( idS ); - if ( syncManager->syncWithDesktop() ) + if ( syncManager->syncWithDesktop() ) { inR.setIDStr("changed" ); + } //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); } else { inR.setIDStr( idS ); } inR.setResource( 0 ); remote->insertAddressee( inR , false); ++changedRemote; } else { // take == 2 take remote ********************** if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { if ( inR.revision().date().year() < 2004 ) inR.setRevision( modifiedCalendar ); } idS = inL.IDStr(); local->removeAddressee( inL ); inL = inR; inL.setIDStr( idS ); @@ -2733,32 +2733,33 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo local->removeAddressee( inL ); ++deletedAddresseeL; } else { if ( ! syncManager->mWriteBackExistingOnly ) { inL.removeID(mCurrentSyncDevice ); ++addedAddresseeR; inL.setRevision( modifiedCalendar ); local->insertAddressee( inL, false ); inR = inL; inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); inR.setResource( 0 ); remote->insertAddressee( inR, false ); } } } else { if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { + //qDebug("data %s ", inL.revision().toString().latin1()); // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); local->removeAddressee( inL ); ++deletedAddresseeL; } else { if ( ! syncManager->mWriteBackExistingOnly ) { ++addedAddresseeR; inL.setRevision( modifiedCalendar ); local->insertAddressee( inL, false ); inR = inL; inR.setIDStr( ":" ); inR.setResource( 0 ); remote->insertAddressee( inR, false ); } } } } diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 59f3b40..f8d752a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1172,32 +1172,33 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int remote->deleteIncidence( inR ); ++delFut; } inR = er.next(); } } bar.hide(); mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); eventLSync->setReadOnly( false ); eventLSync->setDtStart( mLastCalendarSync ); eventRSync->setDtStart( mLastCalendarSync ); eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); eventLSync->setReadOnly( true ); + qDebug("********** %d %d ", mGlobalSyncMode == SYNC_MODE_NORMAL, mSyncManager->syncWithDesktop() ); if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... remote->addEvent( eventRSync ); else delete eventRSync; QString mes; 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 ); QString delmess; if ( delFut ) { 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); mes += delmess; } mes = i18n("Local calendar changed!\n") +mes; mCalendar->checkAlarmForIncidence( 0, true ); qDebug( mes ); if ( mSyncManager->mShowSyncSummary ) { if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 21af295..c12ba1c 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -524,32 +524,33 @@ void KSyncManager::multiSync( bool askforPrefs ) qApp->processEvents(); int num = ringSync() ; if ( num > 1 ) ringSync(); setBlockSave(false); if ( num ) emit save(); if ( num ) mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) ); else mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!")); return; } int KSyncManager::ringSync() { + int syncedProfiles = 0; unsigned int i; QTime timer; KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); QStringList syncProfileNames = mSyncProfileNames; KSyncProfile* temp = new KSyncProfile (); mAskForPreferences = false; for ( i = 0; i < syncProfileNames.count(); ++i ) { mCurrentSyncProfile = i; temp->setName(syncProfileNames[mCurrentSyncProfile]); temp->readConfig(&config); bool includeInRingSync; switch(mTargetApp) { case (KAPI): @@ -557,33 +558,34 @@ int KSyncManager::ringSync() break; case (KOPI): includeInRingSync = temp->getIncludeInRingSync(); break; case (PWMPI): includeInRingSync = temp->getIncludeInRingSyncPWM(); break; default: qDebug("KSyncManager::ringSync: invalid apptype selected"); break; } if ( includeInRingSync && ( i < 1 || i > 2 )) { mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); - ++syncedProfiles; + ++syncedProfiles; + mSyncWithDesktop = false; // mAskForPreferences = temp->getAskForPreferences(); mWriteBackFile = temp->getWriteBackFile(); mWriteBackExistingOnly = temp->getWriteBackExisting(); mIsKapiFile = temp->getIsKapiFile(); mWriteBackInFuture = 0; if ( temp->getWriteBackFuture() ) mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); mShowSyncSummary = false; mCurrentSyncDevice = syncProfileNames[i] ; mCurrentSyncName = mLocalMachineName; if ( i == 0 ) { mIsKapiFile = false; #ifdef DESKTOP_VERSION syncKDE(); #else syncSharp(); |