Projects
Kontact:4.13:Development
libkolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 5
View file
_service:set_version:libkolab.spec
Changed
@@ -30,7 +30,7 @@ Name: libkolab %endif -Version: 0.6.git.1415797490 +Version: 0.6.git.1418217501 Release: 0%{?dist} Summary: Kolab Object Handling Library @@ -225,6 +225,8 @@ %{php_extdir}/kolabobject.so %{_datadir}/%{php}/kolabshared.php %{php_extdir}/kolabshared.so +%{_datadir}/%{php}/dummy.php +%{php_extdir}/dummy.so %files -n python-kolab %dir %{python_sitearch}/kolab/
View file
_service:recompress:tar_scm:libkolab-0.6.git.1415797490.tar.gz/CMakeLists.txt -> _service:recompress:tar_scm:libkolab-0.6.git.1418217501.tar.gz/CMakeLists.txt
Changed
@@ -221,5 +221,6 @@ if(PHP_BINDINGS) generatePHPBindings(kolabshared shared.i) + generatePHPBindings(dummy dummy.i) add_subdirectory(kolabformat/php) endif(PHP_BINDINGS)
View file
_service:recompress:tar_scm:libkolab-0.6.git.1418217501.tar.gz/dummy.i
Added
@@ -0,0 +1,1 @@ +/* This is a dummy plugin that does nothing. See https://issues.kolab.org/show_bug.cgi?id=2050 */
View file
_service:recompress:tar_scm:libkolab-0.6.git.1415797490.tar.gz/kolabformat/kolabobject.cpp -> _service:recompress:tar_scm:libkolab-0.6.git.1418217501.tar.gz/kolabformat/kolabobject.cpp
Changed
@@ -62,6 +62,12 @@ return fromXML<KCalCore::Event::Ptr, KolabV2::Event>(xmlData, attachments); } +QString ownUrlDecode(QByteArray encodedParam) +{ + encodedParam.replace('+', ' '); + return QUrl::fromPercentEncoding(encodedParam); +} + RelationMember parseMemberUrl(const QString &string) { if (string.startsWith("urn:uuid:")) { @@ -69,8 +75,11 @@ member.gid = string.mid(9); return member; } - QUrl url(QUrl::fromPercentEncoding(string.toLatin1())); - QList<QByteArray> path = url.encodedPath().split('/'); + QUrl url(QUrl::fromEncoded(string.toLatin1())); + QList<QByteArray> path; + Q_FOREACH(const QByteArray &fragment, url.encodedPath().split('/')) { + path.append(ownUrlDecode(fragment).toUtf8()); + } // qDebug() << path; bool isShared = false; int start = path.indexOf("user"); @@ -93,9 +102,9 @@ } member.uid = path.takeLast().toLong(); member.mailbox = path; - member.messageId = url.queryItemValue("message-id"); - member.subject = url.queryItemValue("subject"); - member.date = url.queryItemValue("date"); + member.messageId = ownUrlDecode(url.encodedQueryItemValue("message-id")); + member.subject = ownUrlDecode(url.encodedQueryItemValue("subject")); + member.date = ownUrlDecode(url.encodedQueryItemValue("date")); // qDebug() << member.uid << member.mailbox; return member; } @@ -118,21 +127,24 @@ QUrl url; url.setScheme("imap"); QList<QByteArray> path; + path << "/"; if (!member.user.isEmpty()) { path << "user"; - path << member.user.toLatin1(); + path << QUrl::toPercentEncoding(member.user.toLatin1()); } else { path << "shared"; } - path << member.mailbox; + Q_FOREACH(const QByteArray &mb, member.mailbox) { + path << QUrl::toPercentEncoding(mb); + } path << QByteArray::number(member.uid); - url.setPath("/" + join(path, "/")); + url.setEncodedPath("/" + join(path, "/")); - QList<QPair<QString, QString> > queryItems; - queryItems.append(qMakePair(QString::fromLatin1("message-id"), member.messageId)); - queryItems.append(qMakePair(QString::fromLatin1("subject"), member.subject)); - queryItems.append(qMakePair(QString::fromLatin1("date"), member.date)); - url.setQueryItems(queryItems); + QList<QPair<QByteArray, QByteArray> > queryItems; + queryItems.append(qMakePair(QString::fromLatin1("message-id").toLatin1(), QUrl::toPercentEncoding(member.messageId))); + queryItems.append(qMakePair(QString::fromLatin1("subject").toLatin1(), QUrl::toPercentEncoding(member.subject))); + queryItems.append(qMakePair(QString::fromLatin1("date").toLatin1(), QUrl::toPercentEncoding(member.date))); + url.setEncodedQueryItems(queryItems); return QString::fromLatin1(url.toEncoded()); } @@ -581,7 +593,7 @@ #ifdef HAVE_TAG_H bool KolabObjectReader::isTag() const { - return d->mTag.isValid(); + return !d->mTag.gid().isEmpty(); } Akonadi::Tag KolabObjectReader::getTag() const
View file
_service:recompress:tar_scm:libkolab-0.6.git.1415797490.tar.gz/kolabformat/kolabobject.h -> _service:recompress:tar_scm:libkolab-0.6.git.1418217501.tar.gz/kolabformat/kolabobject.h
Changed
@@ -120,6 +120,8 @@ private: //@cond PRIVATE + KolabObjectReader(const KolabObjectReader &other); + KolabObjectReader &operator=(const KolabObjectReader &rhs); class Private; Private *const d; //@endcond
View file
_service:recompress:tar_scm:libkolab-0.6.git.1415797490.tar.gz/tests/kolabobjecttest.cpp -> _service:recompress:tar_scm:libkolab-0.6.git.1418217501.tar.gz/tests/kolabobjecttest.cpp
Changed
@@ -83,11 +83,13 @@ void KolabObjectTest::parseRelationMembers() { { - QString memberString("imap:///user/jan.aachen%40lhm.klab.cc/INBOX/20?message-id=%3Cf06aa3345a25005380b47547ad161d36%40lhm.klab.cc%3E&date=Tue%2C+12+Aug+2014+20%3A42%3A59+%2B0200&subject=Re%3A+test"); + QString memberString("imap:///user/jan.aachen%40lhm.klab.cc/INBOX/20?message-id=%3Cf06aa3345a25005380b47547ad161d36%40lhm.klab.cc%3E&subject=Re%3A+test&date=Tue%2C+12+Aug+2014+20%3A42%3A59+%2B0200"); Kolab::RelationMember member = Kolab::parseMemberUrl(memberString); - const QString result = Kolab::generateMemberUrl(member); + QString result = Kolab::generateMemberUrl(member); qDebug() << result; + result.replace(QLatin1String("%20"),QLatin1String("+")); + QCOMPARE(result, memberString); } //user namespace by uid @@ -141,6 +143,28 @@ Kolab::RelationMember result = Kolab::parseMemberUrl(url); QCOMPARE(result.gid, member.gid); } + + // chars to en/decode + { + + Kolab::RelationMember member; + member.uid = 20; + member.mailbox = QList<QByteArray>() << "spaces in folders" << "+^,:@"; + member.user = "john.doe:^@example.org"; + member.messageId = "messageid+^,:@"; + member.date = "date+^,:@"; + member.subject = "subject+^,:@"; + + QString url = Kolab::generateMemberUrl(member); + qDebug() << url; + Kolab::RelationMember result = Kolab::parseMemberUrl(url); + QCOMPARE(result.uid, member.uid); + QCOMPARE(result.mailbox, member.mailbox); + QCOMPARE(result.user, member.user); + QCOMPARE(result.messageId, member.messageId); + QCOMPARE(result.date, member.date); + QCOMPARE(result.subject, member.subject); + } }
View file
_service:set_version:libkolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: libkolab Binary: libkolab0, php-kolab, python-kolab, libkolab-dev Architecture: any -Version: 0.6.git.1415797490 +Version: 0.6.git.1418217501 Maintainer: Debian Kolab Maintainers <pkg-kolab-devel@lists.alioth.debian.org> Uploaders: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>, Paul Klos <kolab@klos2day.nl> Homepage: http://git.kolab.org/libkolab @@ -10,6 +10,7 @@ Build-Depends: cmake, debhelper, + kdepimlibs5-dev (>= 4.13), kdepimlibs5-dev (<< 4.14), libboost-dev, libboost-program-options-dev, libboost-thread-dev,
View file
debian.control
Changed
@@ -7,6 +7,7 @@ cmake, debhelper, libboost-dev, + kdepimlibs5-dev (>= 4.13), kdepimlibs5-dev (<< 4.14), libboost-program-options-dev, libboost-thread-dev, libboost-system-dev,
View file
libkolab.dsc
Changed
@@ -10,6 +10,7 @@ Build-Depends: cmake, debhelper, + kdepimlibs5-dev (>= 4.13), kdepimlibs5-dev (<< 4.14), libboost-dev, libboost-program-options-dev, libboost-thread-dev,
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
.