Projects
Kolab:16:Enterprise
libkolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 27
View file
libkolab.spec
Changed
@@ -17,9 +17,11 @@ %endif %{!?php_apiver: %global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)} -# Filter out private python and php libs. Does not work on EPEL5, -# therefor we use it conditionally + +%global with_python3 1 + %{?filter_setup: +%filter_provides_in %{python2_sitearch}/.*\.so$ %filter_provides_in %{python3_sitearch}/.*\.so$ %filter_provides_in %{php_extdir}/.*\.so$ %filter_setup @@ -31,7 +33,7 @@ Name: libkolab %endif -Version: 3.0.1 +Version: 3.0.2 Release: 1%{?dist} Summary: Kolab Object Handling Library @@ -43,7 +45,6 @@ BuildRequires: cmake %if 0%{?rhel} > 7 || 0%{?fedora} -BuildRequires: kf5-kcoreaddons-devel BuildRequires: kf5-kcalendarcore-devel BuildRequires: kf5-kmime-devel %else @@ -51,6 +52,11 @@ # fork of various kde 4.9 libraries that depend on kde*, and that have no place in el6. BuildRequires: libcalendaring-devel >= 4.9.1 %endif +%if 0%{?suse_version} +BuildRequires: qt-devel +%else +BuildRequires: qt5-qtbase-devel +%endif BuildRequires: libcurl-devel BuildRequires: libkolabxml-devel >= 1.0 BuildRequires: make @@ -69,11 +75,6 @@ %endif BuildRequires: python3-devel -%if 0%{?suse_version} -BuildRequires: qt-devel -%else -BuildRequires: qt5-qtbase-devel -%endif Provides: libkolab%{?_isa} = %{version} %description @@ -87,7 +88,6 @@ Summary: Kolab library development headers Requires: libkolab%{?_isa} = %{version} %if 0%{?rhel} > 7 || 0%{?fedora} -BuildRequires: kf5-kcoreaddons-devel BuildRequires: kf5-kcalendarcore-devel BuildRequires: kf5-kmime-devel %if 0%{?fedora} >= 21 @@ -102,7 +102,7 @@ Requires: libkolabxml-devel >= 1.0 Requires: php-devel Requires: pkgconfig -Requires: python36-devel +Requires: python3-devel %if 0%{?suse_version} %description -n libkolab-devel @@ -207,6 +207,19 @@ %description -n python-kolab Python bindings for libkolab +%package -n python3-kolab +Summary: Python bindings for libkolab +Group: System Environment/Libraries +Requires: libkolab%{?_isa} = %{version} +Requires: python3-kolabformat >= 1.0.0 +%if 0%{?suse_version} +Obsoletes: python3-%{name} < %{version} +Provides: python3-%{name} = %{version} +%endif + +%description -n python3-kolab +Python bindings for libkolab + %prep %setup -q -c -n libkolab-%{version} @@ -241,6 +254,10 @@ popd %endif +%if 0%{?with_python3} +cp -a libkolab-%{version} libkolab-%{version}-python3 +%endif + %build pushd %{name}-%{version} rm -rf build @@ -269,9 +286,6 @@ %else %cmake \ %endif -%if 0%{?with_at} - -DBUILD_TOOLS:BOOL=OFF \ -%endif -DCMAKE_C_FLAGS:STRING="-DNDEBUG -DQT_NO_DEBUG" \ -DBoost_NO_BOOST_CMAKE=TRUE \ -Wno-fatal-errors -Wno-errors \ @@ -282,12 +296,39 @@ -DPHP_BINDINGS=ON \ -DPHP_INSTALL_DIR=%{php_extdir} \ -DPYTHON_BINDINGS=ON \ - -DPYTHON_INSTALL_DIR=%{python3_sitearch} \ + -DPYTHON_INSTALL_DIR=%{python2_sitearch} \ .. make popd popd + +%if 0%{with_python3} + pushd %{name}-%{version}-python3 + rm -rf build + mkdir -p build + pushd build + %cmake \ + -DCMAKE_C_FLAGS:STRING="-DNDEBUG -DQT_NO_DEBUG" \ + -DBoost_NO_BOOST_CMAKE=TRUE \ + -Wno-fatal-errors -Wno-errors \ + -DINCLUDE_INSTALL_DIR=%{_includedir} \ +%if 0%{?rhel} >= 8 || 0%{?fedora} + -DQT5_BUILD=ON \ +%endif + -DINCLUDE_INSTALL_DIR=%{_includedir} \ +%if 0%{?rhel} < 8 && 0%{?fedora} < 20 + -DUSE_LIBCALENDARING=ON \ +%endif + -DPYTHON_BINDINGS=ON \ + -DPYTHON_INSTALL_DIR=%{python3_sitearch} \ + .. + make + popd + popd +%endif + + %if 0%{?plesk} %if 0%{?rhel} < 8 || 0%{?fedora} for version in 5.6 7.0 7.1 7.2 7.3 7.4; do @@ -299,9 +340,6 @@ mkdir -p build pushd build %cmake \ -%if 0%{?with_at} - -DBUILD_TOOLS:BOOL=OFF \ -%endif -DCMAKE_C_FLAGS:STRING="-DNDEBUG -DQT_NO_DEBUG" \ -DBoost_NO_BOOST_CMAKE=TRUE \ -Wno-fatal-errors -Wno-errors \ @@ -383,7 +421,14 @@ done %endif +touch %{buildroot}/%{python2_sitearch}/kolab/__init__.py +%if 0%{?with_python3} +pushd %{name}-%{version}-python3 +pushd build +make install DESTDIR=%{buildroot} INSTALL='install -p' +popd touch %{buildroot}/%{python3_sitearch}/kolab/__init__.py +%endif %check pushd %{name}-%{version}/build/tests @@ -475,6 +520,17 @@ %endif %files -n python-kolab +%dir %{python2_sitearch}/kolab/ +%{python2_sitearch}/kolab/__init__.py* +%{python2_sitearch}/kolab/_calendaring.so +%{python2_sitearch}/kolab/calendaring.py* +%{python2_sitearch}/kolab/_kolabobject.so* +%{python2_sitearch}/kolab/kolabobject.py* +%{python2_sitearch}/kolab/_shared.so* +%{python2_sitearch}/kolab/shared.py* + +%if 0%{?with_python3} +%files -n python3-kolab %dir %{python3_sitearch}/kolab/ %{python3_sitearch}/kolab/__init__.py* %{python3_sitearch}/kolab/_calendaring.so @@ -483,8 +539,13 @@ %{python3_sitearch}/kolab/kolabobject.py* %{python3_sitearch}/kolab/_shared.so* %{python3_sitearch}/kolab/shared.py* +%{python3_sitearch}/kolab/__pycache__/ +%endif %changelog +* Fri Aug 12 2022 Christian Mollekopf <mollekopf@apheleia-it.ch> - 3.0.2-1 +- New upstream release + * Tue Jan 04 2022 Christian Mollekopf <mollekopf@kolabsys.com> - 3.0.1-1 - New upstream release
View file
debian.changelog
Changed
@@ -1,3 +1,10 @@ +libkolab (3.0.2-0~kolab1) unstable; urgency=low + + * New upstream release + * Create Python 3 bindings + + -- Christian Mollekopf <mollekopf@apheleia-it.ch> Fri, 12 Aug 2022 11:09:09 +0100 + libkolab (3.0.1-0~kolab1) unstable; urgency=low * Fixed the kolabcalendaring module
View file
debian.control
Changed
@@ -6,10 +6,8 @@ Build-Depends: cmake, debhelper, + dh-python, libcurl4-gnutls-dev, - libboost-dev, - libboost-thread-dev, - libboost-system-dev, libkolabxml-dev (>= 1.0), libossp-uuid-dev, qtbase5-dev, @@ -25,7 +23,9 @@ plesk-php73-dev | bash, plesk-php74-dev | bash, psa | bash, - python-dev, + python2-dev | python-dev, + python-minimal | python2-minimal, + python3-all-dev, swig (>= 2.0) X-Python-Version: >= 2.7 Standards-Version: 3.9.3 @@ -69,7 +69,20 @@ Architecture: any Section: python Depends: libkolab3 (= ${binary:Version}), - python, + ${python:Depends}, + ${misc:Depends}, + ${shlibs:Depends} +Conflicts: python-kolab-kde +Description: Python bindings for Kolab Library + This package provides the Kolab Python module calendaring. + . + - The calendaring module provides some general calendaring functions + +Package: python2-kolab +Architecture: any +Section: python +Depends: libkolab3 (= ${binary:Version}), + ${python3:Depends}, ${misc:Depends}, ${shlibs:Depends} Conflicts: python-kolab-kde
View file
debian.rules
Changed
@@ -4,7 +4,6 @@ PHPBIN := $(shell php-config --php-binary) PHPEXT := $(shell php-config --extension-dir) PHPINC := $(shell php-config --include-dir) -PYTHON_SITEARCH := $(shell python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)') PHP_VERSIONS=7.4 7.3 7.2 7.1 7.0 5.6 @@ -14,7 +13,7 @@ export DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed" %: - dh $@ --parallel --with python2 + dh $@ --parallel --with python2,python3 --buildsystem=pybuild override_dh_gencontrol: echo "php:Depends=phpapi-${PHPAPI}" >> debian/php-kolab.substvars @@ -43,6 +42,7 @@ dh_gencontrol override_dh_auto_build: + # Build plesk php versions if -f /etc/plesk-release ; then \ for version in $(PHP_VERSIONS) ; do \ if ! -f "/opt/plesk/php/$${version}/bin/php-config" ; then \ @@ -53,19 +53,25 @@ else \ sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php5 -I/g' cmake/modules/SWIGUtils.cmake ; \ fi ; \ - dh_auto_build --builddirectory php-$${version} ; \ + dh_auto_build --buildsystem cmake --builddirectory php-$${version} ; \ done ; \ fi + # Build php vanilla if $$(php-config --vernum) -gt 70000 ; then \ sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php7 -I/g' cmake/modules/SWIGUtils.cmake ; \ else \ sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php5 -I/g' cmake/modules/SWIGUtils.cmake ; \ fi + dh_auto_build --buildsystem cmake --builddirectory php-vanilla + + # Build python versions via pybuild dh_auto_build override_dh_auto_configure: + echo 9 > debian/compat + # Configure plesk php version if -f /etc/plesk-release ; then \ for version in $(PHP_VERSIONS) ; do \ if ! -f "/opt/plesk/php/$${version}/bin/php-config" ; then \ @@ -76,9 +82,9 @@ else \ sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php5 -I/g' cmake/modules/SWIGUtils.cmake ; \ fi ; \ - dh_auto_configure --builddirectory php-$${version} -- \ + dh_auto_configure --buildsystem cmake --builddirectory php-$${version} -- \ -DLIB_INSTALL_DIR=/usr/lib \ - -DBoost_NO_BOOST_CMAKE=TRUE \ + -DBoost_NO_BOOST_CMAKE=ON \ -DSWIG=/usr/bin/swig \ -DPHP_BINDINGS=ON \ -DPHP_INCLUDE_DIR=$$(/opt/plesk/php/$${version}/bin/php-config --include-dir) \ @@ -89,27 +95,35 @@ done ; \ fi + # Configure php vanilla if $$(php-config --vernum) -gt 70000 ; then \ sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php7 -I/g' cmake/modules/SWIGUtils.cmake ; \ else \ sed -r -i -e 's/-c\+\+ -php0-9? -I/-c++ -php5 -I/g' cmake/modules/SWIGUtils.cmake ; \ fi - dh_auto_configure -- \ + dh_auto_configure --buildsystem cmake --builddirectory php-vanilla -- \ -DLIB_INSTALL_DIR=/usr/lib \ - -DBoost_NO_BOOST_CMAKE=TRUE \ - -DPHP_BINDINGS=ON \ + -DBoost_NO_BOOST_CMAKE=ON \ + -DSWIG=/usr/bin/swig \ + -DPHP_BINDINGS=ON \ -DPHP_INSTALL_DIR=$(PHPEXT) \ -DPHP_EXECUTABLE=$(PHPBIN) \ - -DPHP_INCLUDE_DIR=$(PHPINC) \ + -DPHP_INCLUDE_DIR=$(PHPINC) + + # Configure python builds via pybuild + dh_auto_configure -- --configure-args \ + "-DLIB_INSTALL_DIR=/usr/lib \ + -DBoost_NO_BOOST_CMAKE=ON \ -DPYTHON_BINDINGS=ON \ - -DPYTHON_INSTALL_DIR=$(PYTHON_SITEARCH) + -DPYTHON_INSTALL_DIR={install_dir}" override_dh_install: # Install the PHP modules manually, because they depend on PHP the API version, # which has to be determined dynamically, so we can't put it into an .install file. mkdir -p debian/tmp/usr/share/php - mv debian/tmp/$(PHPEXT)/*.php debian/tmp/usr/share/php/. + make -C php-vanilla install DESTDIR=$(PWD)/debian/tmp/ ; \ + mv debian/tmp/$(PHPEXT)/*.php debian/tmp/usr/share/php/ || exit 1. echo "$(PHPEXT)" >> debian/php-kolab.install # Put kolab.ini into place @@ -129,7 +143,9 @@ echo "debian/kolab.ini etc/php5/mods-available" >> debian/php-kolab.install ; \ fi - touch debian/tmp/$(PYTHON_SITEARCH)/kolab/__init__.py + for i in debian/tmp/usr/lib/python*/dist-packages/kolab ; do \ + touch $${i}/__init__.py; \ + done if -f /etc/plesk-release ; then \ for version in $(PHP_VERSIONS) ; do \ @@ -147,7 +163,7 @@ mkdir -p debian/plesk-php$${shver}-kolab/opt/plesk/php/$${version}/share/php/ ; \ cp -a debian/kolab.ini debian/plesk-php$${shver}-kolab/opt/plesk/php/$${version}/etc/php.d/ ; \ mv debian/plesk-php$${shver}-kolab$$(/opt/plesk/php/$${version}/bin/php-config --extension-dir)/kolab*.php \ - debian/plesk-php$${shver}-kolab/opt/plesk/php/$${version}/share/php/. ; \ + debian/plesk-php$${shver}-kolab/opt/plesk/php/$${version}/share/php/. || exit 1; \ rm -rf debian/plesk-php$${shver}-kolab/usr/ ; \ done ; \ fi
View file
debian.tar.gz/python-kolab.install
Changed
@@ -1,1 +1,1 @@ -usr/lib*/python*/*-packages/* +usr/lib*/python2*/*-packages/*
View file
debian.tar.gz/python3-kolab.install
Added
@@ -0,0 +1,1 @@ +usr/lib*/python3*/*-packages/*
View file
libkolab-3.0.1.tar.gz/CMakeLists.txt -> libkolab-3.0.2.tar.gz/CMakeLists.txt
Changed
@@ -32,7 +32,7 @@ set(Libkolab_VERSION_MAJOR 3) set(Libkolab_VERSION_MINOR 0) # Enable the full x.y.z version only for release versions -set(Libkolab_VERSION_PATCH 1) +set(Libkolab_VERSION_PATCH 2) #set(Libkolab_VERSION ${Libkolab_VERSION_MAJOR}.${Libkolab_VERSION_MINOR}.${Libkolab_VERSION_PATCH}) set(Libkolab_VERSION ${Libkolab_VERSION_MAJOR}.${Libkolab_VERSION_MINOR}) set(Libkolab_VERSION_STRING ${CMAKE_PROJECT_NAME}-${Libkolab_VERSION}) @@ -54,7 +54,8 @@ include(MacroLogFeature) find_package(Qt5 REQUIRED Core Xml) - +# FIXME: Seems to be required for libkolabxml, but should be fixed in libkolabxml +find_package(Boost REQUIRED system thread) # Do the building find_package(Libkolabxml 1.1.1 REQUIRED) @@ -69,7 +70,6 @@ include(FindPackageHandleStandardArgs) -find_package(KF5CoreAddons CONFIG REQUIRED) find_package(KF5CalendarCore "5.12.1" CONFIG REQUIRED) find_package(KF5Mime "4.84.0" CONFIG REQUIRED)
View file
libkolab-3.0.1.tar.gz/calendaring/event.cpp -> libkolab-3.0.2.tar.gz/calendaring/event.cpp
Changed
@@ -19,14 +19,19 @@ #include "event.h" #include <QDebug> +#include <QTimeZone> #include <conversion/kcalconversion.h> #include <conversion/commonconversion.h> +#include <kcalcore/memorycalendar.h> +#include <kcalcore/icalformat.h> #include <iostream> #include <kolabformat.h> #include <kolabevent_p.h> +#include "libkolab-version.h" + namespace Kolab { namespace Calendaring { @@ -149,12 +154,10 @@ cDateTime Calendaring::Event::getNextOccurence(const cDateTime &date) { KCalCore::Event::Ptr event = Kolab::Conversion::toKCalCore(*this); - qWarning() << "Converted start " << event->dtStart() << Kolab::Conversion::toDate(date); if (!event->recurs()) { return cDateTime(); } const QDateTime nextDate = event->recurrence()->getNextDateTime(Kolab::Conversion::toDate(date)); - qWarning() << "Next date " << nextDate; return Kolab::Conversion::fromDate(nextDate); } @@ -176,6 +179,80 @@ return Kolab::Conversion::fromDate(endDate); } +static std::vector< Kolab::Event > fromICalEvents(const std::string &input) +{ + KCalCore::Calendar::Ptr calendar(new KCalCore::MemoryCalendar(QTimeZone::utc())); + KCalCore::ICalFormat format; + format.setApplication("libkolab", LIBKOLAB_LIB_VERSION_STRING); + format.fromString(calendar, Conversion::fromStdString(input)); + std::vector<Kolab::Event> events; + QMap< QString, int > uidMap; + foreach (const KCalCore::Event::Ptr &event, calendar->events()) { + Kolab::Event e = Conversion::fromKCalCore(*event); + if (!e.recurrenceID().isValid()) { + if (uidMap.contains(event->uid())) { + e.setExceptions(events.at(uidMapevent->uid()).exceptions()); + eventsuidMapevent->uid() = e; + } else { + events.push_back(e); + uidMap.insert(event->uid(), events.size()-1); + } + } else { + if (!uidMap.contains(event->uid())) { + Kolab::Event e; + e.setUid(""); + events.push_back(e); + uidMap.insert(event->uid(), events.size()-1); + } + std::vector<Kolab::Event> exceptions = events.at( uidMapevent->uid()).exceptions(); + exceptions.push_back(e); + events.at(uidMapevent->uid()).setExceptions(exceptions); + } + } + return events; +} + +static std::string eventsToICal(const std::vector<Kolab::Event> &events) +{ + KCalCore::Calendar::Ptr calendar(new KCalCore::MemoryCalendar(QTimeZone::utc())); + foreach (const Kolab::Event &event, events) { + KCalCore::Event::Ptr kcalEvent = Conversion::toKCalCore(event); + if (!kcalEvent->created().isValid()) { + kcalEvent->setCreated(QDateTime::currentDateTime()); //sets dtstamp + } + calendar->addEvent(kcalEvent); + foreach(const Kolab::Event &exception, event.exceptions()) { + KCalCore::Event::Ptr kcalException = Conversion::toKCalCore(exception); + if (!kcalException->created().isValid()) { + kcalException->setCreated(QDateTime::currentDateTime()); //sets dtstamp + } + calendar->addEvent(kcalException); + } + } + KCalCore::ICalFormat format; + format.setApplication("libkolab", LIBKOLAB_LIB_VERSION_STRING); +// qDebug() << format.createScheduleMessage(calendar->events().first(), KCalCore::iTIPRequest); + return Conversion::toStdString(format.toString(calendar)); + +} + +std::string Event::toICal() const +{ + std::vector<Kolab::Event> list; + list.push_back(*this); + return eventsToICal(list); +} + +bool Event::fromICal(const std::string &input) +{ + std::vector<Kolab::Event> list = fromICalEvents(input); + if (list.size() != 1) { + std::cout << "invalid number of events: " << list.size(); + return false; + } + Kolab::Event::operator=(list.at(0)); + return true; +} }; };
View file
libkolab-3.0.1.tar.gz/calendaring/event.h -> libkolab-3.0.2.tar.gz/calendaring/event.h
Changed
@@ -37,12 +37,26 @@ Event(const Kolab::Event &); ~Event(); + /** + * Convert from kolab xml format. + */ bool read(const std::string &); + /** * Convert to kolab xml format. */ std::string write() const; + /** + * Convert from ical format. + */ + bool fromICal(const std::string &); + + /** + * Convert to ical format. + */ + std::string toICal() const; + /** * Updates the delegators and delegatees of the event.
View file
libkolab-3.0.1.tar.gz/conversion/commonconversion.cpp -> libkolab-3.0.2.tar.gz/conversion/commonconversion.cpp
Changed
@@ -64,18 +64,14 @@ date.setDate(QDate(dt.year(), dt.month(), dt.day())); date.setTime(QTime(dt.hour(), dt.minute(), dt.second())); if (dt.isUTC()) { - qWarning() << "Converting utc"; date.setTimeSpec(Qt::UTC); // date.setTimeZone(QTimeZone::utc()); } else if (!dt.timezone().empty()) { - qWarning() << "Converting timezone"; date.setTimeZone(getTimeSpec(dt.timezone())); } else { - qWarning() << "Converting localtime"; date.setTimeSpec(Qt::LocalTime); //We apparently can't have what used to be called floating time, so set the timezone to utc. // date.setTimeZone(QTimeZone::utc()); - qWarning() << "Converting localtime" << date.timeZone(); } // Q_ASSERT(date.timeSpec().isValid()); Q_ASSERT(date.isValid()); @@ -84,15 +80,12 @@ cDateTime fromDate(const QDateTime &dt) { - qWarning() << dt; if (!dt.isValid()) { // qDebug() << "invalid datetime converted"; return cDateTime(); } - qWarning() << "From " << dt; cDateTime date; if (!dt.time().isValid()) { //Date only - qWarning() << "invalid datetime"; const QDate &d = dt.date(); date.setDate(d.year(), d.month(), d.day()); } else { @@ -102,7 +95,6 @@ date.setTime(t.hour(), t.minute(), t.second()); if (dt.timeSpec() == Qt::UTC) { //UTC date.setUTC(true); - qWarning() << "From utc"; } else if (dt.timeSpec() == Qt::OffsetFromUTC) { const QDateTime utcDate = dt.toUTC(); const QDate &d = utcDate.date(); @@ -111,7 +103,6 @@ date.setTime(t.hour(), t.minute(), t.second()); date.setUTC(true); } else if (dt.timeSpec() == Qt::TimeZone) { //Timezone - qWarning() << "From timezone"; //Not actually a timezone // if (dt.timeZone().id().toLower() == "utc") { // date.setUTC(true); @@ -126,7 +117,6 @@ } // } } else if (dt.timeSpec() != Qt::LocalTime) { - qWarning() << "From localtime"; Error() << "invalid timespec, assuming floating time. Type: " << dt.timeSpec() << "dt: " << dt.toString(); return date; } @@ -174,10 +164,8 @@ QPair<std::string, std::string> fromMailto(const std::string &mailto) { - qWarning() << "fromMailto" << mailto; const std::string &decoded = toStdString(QUrl::fromPercentEncoding(QByteArray(mailto.c_str()))); - qWarning() << "fromMailto decoded" << decoded; if (decoded.substr(0, 7).compare("mailto:")) { // WARNING("no mailto address"); // std::cout << decoded << std::endl;
View file
libkolab-3.0.1.tar.gz/conversion/kcalconversion.cpp -> libkolab-3.0.2.tar.gz/conversion/kcalconversion.cpp
Changed
@@ -277,7 +277,6 @@ if (e.start().isValid()) { - qWarning() << "Setting start" << toDate(e.start()); i.setDtStart(toDate(e.start())); if (e.start().isDateOnly()) { i.setAllDay(true); @@ -294,7 +293,6 @@ * Since that means the semantics of the two are different, we have to store the kolab uid as a custom property. */ // QUrl::fromPercentEncoding( - qWarning() << "Name " << fromStdString(a.contact().name()) << " EMail " << fromStdString(a.contact().email()); KCalCore::Attendee attendee(fromStdString(a.contact().name()), fromStdString(a.contact().email()), a.rsvp(), @@ -308,20 +306,17 @@ WARNING("multiple delegatees are not supported"); } - qWarning() << "delegated from " << toMailto(a.delegatedTo().front().email(), a.delegatedTo().front().name()).toString(); attendee.setDelegate(toMailto(a.delegatedTo().front().email(), a.delegatedTo().front().name()).toString()); } if (!a.delegatedFrom().empty()) { if (a.delegatedFrom().size() > 1) { WARNING("multiple delegators are not supported"); } - qWarning() << "delegator from " << toMailto(a.delegatedFrom().front().email(), a.delegatedFrom().front().name()).toString(); attendee.setDelegator(toMailto(a.delegatedFrom().front().email(), a.delegatedFrom().front().name()).toString()); } if (a.cutype() != CutypeIndividual) { attendee.customProperties().setNonKDECustomProperty(CUSTOM_KOLAB_CONTACT_CUTYPE, QString::number(a.cutype())); } - // qWarning() << attendee; i.addAttendee(attendee); } foreach (const Kolab::Attachment a, e.attachments()) { @@ -374,13 +369,11 @@ if (!attendee.delegate().isEmpty()) { std::string name; const std::string &email = fromMailto(QUrl(attendee.delegate()), name); - qWarning() << "delegate Email " << email << " EMail " << name << attendee.delegate(); a.setDelegatedTo(std::vector<Kolab::ContactReference>() << Kolab::ContactReference(email, name)); } if (!attendee.delegator().isEmpty()) { std::string name; const std::string &email = fromMailto(QUrl(attendee.delegator()), name); - qWarning() << "delegated from " << email << " EMail " << name << attendee.delegator(); a.setDelegatedFrom(std::vector<Kolab::ContactReference>() << Kolab::ContactReference(email, name)); } const QString &cutype = attendee.customProperties().nonKDECustomProperty(CUSTOM_KOLAB_CONTACT_CUTYPE); @@ -544,7 +537,6 @@ if (rrule.end().isValid()) { rec->setEndDateTime(toDate(rrule.end())); //TODO date/datetime setEndDate(). With date-only the start date has to be taken into account. - qWarning() << "Set end date time" << toDate(rrule.end()); } else { rec->setDuration(rrule.count()); }
View file
libkolab-3.0.1.tar.gz/tests/calendaringtest.cpp -> libkolab-3.0.2.tar.gz/tests/calendaringtest.cpp
Changed
@@ -130,6 +130,28 @@ std::cout << Kolab::DateTimeUtils::getLocalTimezone() << std::endl; } +void CalendaringTest::testICal() +{ + Kolab::Calendaring::Event event; + event.setStart(Kolab::cDateTime("Europe/Zurich",2012,5,5,3,4,4)); + const std::string &result = event.toICal(); + //TODO write an actual test + event.setStart(Kolab::cDateTime(1,1,1)); + event.fromICal(result); + QCOMPARE(event.start(), Kolab::cDateTime("Europe/Zurich",2012,5,5,3,4,4)); +} + + +void CalendaringTest::testParseICal() +{ + QFile icalFile( getPath("v3/event/simple.ics") ); + QVERIFY( icalFile.open( QFile::ReadOnly ) ); + Kolab::Calendaring::Event event; + event.fromICal(icalFile.readAll().constData()); + QCOMPARE(event.start(), Kolab::cDateTime("Europe/Berlin", 2009, 9, 2, 8, 0, 0)); +} + + QTEST_MAIN( CalendaringTest ) #include "calendaringtest.moc"
View file
libkolab-3.0.1.tar.gz/tests/calendaringtest.h -> libkolab-3.0.2.tar.gz/tests/calendaringtest.h
Changed
@@ -43,7 +43,8 @@ void delegationTest(); // void testMime(); - // void testICal(); + void testICal(); + void testParseICal(); // void testIMip(); void testRecurrence();
View file
libkolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: libkolab Binary: libkolab3, php-kolab, python-kolab, libkolab-dev Architecture: any -Version: 3.0.1-0~kolab1 +Version: 3.0.2-0~kolab1 Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Uploaders: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Homepage: http://git.kolab.org/libkolab @@ -10,6 +10,7 @@ Build-Depends: cmake, debhelper, + dh-python, libcurl4-gnutls-dev, libboost-dev, libboost-thread-dev, @@ -20,16 +21,19 @@ libkf5coreaddons-dev, libkf5calendarcore-dev, libkf5mime-dev, + libkf5codecs-dev, libxerces-c-dev, php-cgi | php5-cli, php-dev | php5-dev, - plesk-php70-dev | plesk-php71-dev | bash, - plesk-php71-dev | bash, - plesk-php72-dev | bash, - plesk-php73-dev | bash, - plesk-php74-dev | bash, psa | bash, - python-dev, + plesk-php70-dev | plesk-php71-dev | plesk-php72-dev | plesk-php73-dev | plesk-php74-dev | bash, + plesk-php71-dev | plesk-php72-dev | plesk-php73-dev | plesk-php74-dev | bash, + plesk-php72-dev | plesk-php73-dev | plesk-php74-dev | bash, + plesk-php73-dev | plesk-php74-dev | bash, + plesk-php74-dev | bash, + python2-dev | python-dev, + python-minimal | python2-minimal, + python3-all-dev, swig (>= 2.0) Package-List: libkolab-dev deb libdevel optional @@ -37,5 +41,5 @@ php-kolab deb libs optional python-kolab deb python optional Files: - 00000000000000000000000000000000 0 libkolab-3.0.1.tar.gz + 00000000000000000000000000000000 0 libkolab-3.0.2.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.