Hello community, here is the log from the commit of package kdepimlibs4 for openSUSE:Factory checked in at 2014-08-25 10:58:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdepimlibs4 (Old) and /work/SRC/openSUSE:Factory/.kdepimlibs4.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdepimlibs4" Changes: -------- --- /work/SRC/openSUSE:Factory/kdepimlibs4/kdepimlibs4.changes 2014-07-16 16:19:33.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kdepimlibs4.new/kdepimlibs4.changes 2014-08-25 10:58:15.000000000 +0200 @@ -1,0 +2,19 @@ +Fri Aug 15 08:19:17 UTC 2014 - [email protected] + +- Update to 4.14.0 + * KDE 4.14.0 SC Final Release + * See http://www.kde.org/announcements/4.13/ + +------------------------------------------------------------------- +Wed Jul 23 21:25:28 UTC 2014 - [email protected] + +- Move akonadi2xml to libkdepimlibs4-devel, as it is a development tool + +------------------------------------------------------------------- +Thu Jul 17 16:44:19 UTC 2014 - [email protected] + +- Update to 4.13.90 + * KDE 4.14 Beta 2 release + * See http://www.kde.org/announcements/announce-4.14-beta2.php + +------------------------------------------------------------------- Old: ---- kdepimlibs-4.13.80.tar.xz New: ---- kdepimlibs-4.14.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdepimlibs4.spec ++++++ --- /var/tmp/diff_new_pack.1t7bBQ/_old 2014-08-25 10:58:16.000000000 +0200 +++ /var/tmp/diff_new_pack.1t7bBQ/_new 2014-08-25 10:58:16.000000000 +0200 @@ -17,7 +17,7 @@ Name: kdepimlibs4 -Version: 4.13.80 +Version: 4.14.0 Release: 0 Summary: KDE PIM Libraries License: LGPL-2.1+ @@ -71,7 +71,7 @@ # we don't need it %kde_post_install - %fdupes %{buildroot}%{_includedir}/KDE + %fdupes %{buildroot}%{_kde4_includedir}/KDE %post /sbin/ldconfig @@ -150,7 +150,6 @@ %{_kde4_libdir}/libakonadi-notes.so.* %{_kde4_libdir}/libakonadi-socialutils.so.* %{_kde4_libdir}/libakonadi-xml.so.* -%{_kde4_bindir}/akonadi2xml %package -n libkdepimlibs4-devel Summary: KDE PIM Libraries: Build Environment @@ -219,6 +218,7 @@ %{_kde4_libdir}/libmicroblog.so %{_kde4_libdir}/libqgpgme.so %{_kde4_libdir}/libsyndication.so +%{_kde4_bindir}/akonadi2xml %files %defattr(-,root,root) ++++++ kdepimlibs-4.13.80.tar.xz -> kdepimlibs-4.14.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/CMakeLists.txt new/kdepimlibs-4.14.0/CMakeLists.txt --- old/kdepimlibs-4.13.80/CMakeLists.txt 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/CMakeLists.txt 2014-08-13 09:43:09.000000000 +0200 @@ -6,8 +6,8 @@ ############### The kdepimlibs version (used e.g. in KdepimLibsConfig.cmake) ############### set(KDEPIMLIBS_VERSION_MAJOR 4) -set(KDEPIMLIBS_VERSION_MINOR 13) -set(KDEPIMLIBS_VERSION_PATCH 80) +set(KDEPIMLIBS_VERSION_MINOR 14) +set(KDEPIMLIBS_VERSION_PATCH 0) set(KDEPIMLIBS_VERSION ${KDEPIMLIBS_VERSION_MAJOR}.${KDEPIMLIBS_VERSION_MINOR}.${KDEPIMLIBS_VERSION_PATCH}) @@ -15,7 +15,7 @@ set (QT_MIN_VERSION "4.8.0") # kdepim depends on the latest released version of kdelibs, ie. 4.x kdepim depends on 4.x-1 kdelibs -find_package(KDE4 4.12.0 REQUIRED) +find_package(KDE4 4.13.0 REQUIRED) include(KDE4Defaults) include(MacroLibrary) include(KDEPlatformProfile) @@ -99,9 +99,6 @@ find_package(QJSON) set_package_properties(QJSON PROPERTIES DESCRIPTION "QJSON" URL "http://qjson.sourceforge.net/" TYPE REQUIRED PURPOSE "Qt library for handling JSON data") - find_package(LibKGAPI2 2.1.50 QUIET CONFIG) - set_package_properties(LibKGAPI2 PROPERTIES DESCRIPTION "KDE-based library for accessing various Google services" URL "https://projects.kde.org/libkgapi" TYPE OPTIONAL PURPOSE "LibKGAPI is required to build native Blogger API support in KBlog") - if (KDE4_BUILD_TESTS) find_package(Xsltproc) set_package_properties(Xsltproc PROPERTIES DESCRIPTION "XSLT processor from libxslt" TYPE REQUIRED PURPOSE "Required to generate D-Bus interfaces for all Akonadi resources.") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/akonadi/collectionrequester.cpp new/kdepimlibs-4.14.0/akonadi/collectionrequester.cpp --- old/kdepimlibs-4.13.80/akonadi/collectionrequester.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/akonadi/collectionrequester.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -239,4 +239,18 @@ } } +void CollectionRequester::changeEvent(QEvent *event) +{ + if (event->type() == QEvent::WindowTitleChange) { + if (d->collectionDialog) { + d->collectionDialog->setCaption(windowTitle()); + } + } else if (event->type() == QEvent::EnabledChange) { + if (d->collectionDialog) { + d->collectionDialog->setEnabled(true); + } + } + KHBox::changeEvent(event); +} + #include "moc_collectionrequester.cpp" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/akonadi/collectionrequester.h new/kdepimlibs-4.14.0/akonadi/collectionrequester.h --- old/kdepimlibs-4.13.80/akonadi/collectionrequester.h 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/akonadi/collectionrequester.h 2014-08-13 09:43:09.000000000 +0200 @@ -115,6 +115,9 @@ */ void changeCollectionDialogOptions(CollectionDialog::CollectionDialogOptions options); +protected: + void changeEvent(QEvent * event); + public Q_SLOTS: /** * Sets the @p collection of the requester. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/akonadi/contact/emailaddressselectionwidget.cpp new/kdepimlibs-4.14.0/akonadi/contact/emailaddressselectionwidget.cpp --- old/kdepimlibs-4.13.80/akonadi/contact/emailaddressselectionwidget.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/akonadi/contact/emailaddressselectionwidget.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -81,8 +81,8 @@ class EmailAddressSelectionWidget::Private { public: - Private( EmailAddressSelectionWidget *qq, QAbstractItemModel *model ) - : q( qq ), mModel( model ) + Private( bool showOnlyContactWithEmail, EmailAddressSelectionWidget *qq, QAbstractItemModel *model ) + : q( qq ), mModel( model ), mShowOnlyContactWithEmail(showOnlyContactWithEmail) { init(); } @@ -95,6 +95,7 @@ SearchLineEdit *mSearchLine; Akonadi::EntityTreeView *mView; EmailAddressSelectionProxyModel *mSelectionModel; + bool mShowOnlyContactWithEmail; }; void EmailAddressSelectionWidget::Private::init() @@ -146,7 +147,8 @@ layout->addWidget( mView ); Akonadi::ContactsFilterProxyModel *filter = new Akonadi::ContactsFilterProxyModel( q ); - filter->setFilterFlags( ContactsFilterProxyModel::HasEmail ); + if (mShowOnlyContactWithEmail) + filter->setFilterFlags( ContactsFilterProxyModel::HasEmail ); filter->setExcludeVirtualCollections( true ); filter->setSourceModel( mModel ); @@ -170,13 +172,19 @@ EmailAddressSelectionWidget::EmailAddressSelectionWidget( QWidget * parent ) : QWidget( parent ), - d( new Private( this, 0 ) ) + d( new Private( true, this, 0 ) ) { } EmailAddressSelectionWidget::EmailAddressSelectionWidget( QAbstractItemModel *model, QWidget * parent ) : QWidget( parent ), - d( new Private( this, model ) ) + d( new Private( true, this, model ) ) +{ +} + +EmailAddressSelectionWidget::EmailAddressSelectionWidget( bool showOnlyContactWithEmail, QAbstractItemModel *model, QWidget * parent ) + : QWidget( parent ), + d( new Private( showOnlyContactWithEmail ,this, model ) ) { } @@ -200,8 +208,12 @@ selection.d->mEmailAddress = index.data( EmailAddressSelectionProxyModel::EmailAddressRole ).toString(); selection.d->mItem = index.data( ContactsTreeModel::ItemRole ).value<Akonadi::Item>(); - if ( !selection.d->mEmailAddress.isEmpty() ) { - selections << selection; + if ( d->mShowOnlyContactWithEmail ) { + if ( !selection.d->mEmailAddress.isEmpty() ) { + selections << selection; + } + } else { + selections << selection; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/akonadi/contact/emailaddressselectionwidget.h new/kdepimlibs-4.14.0/akonadi/contact/emailaddressselectionwidget.h --- old/kdepimlibs-4.13.80/akonadi/contact/emailaddressselectionwidget.h 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/akonadi/contact/emailaddressselectionwidget.h 2014-08-13 09:43:09.000000000 +0200 @@ -84,6 +84,14 @@ explicit EmailAddressSelectionWidget( QAbstractItemModel *model, QWidget *parent = 0 ); /** + * @brief Creates a new email address selection widget. + * @param showOnlyContactWithEmail Allow to specify if you want to see only contact with email (by default yes in other constructor) + * @param model A custom ContactsTreeModel based model to use. + * @param parent The parent widget. + */ + explicit EmailAddressSelectionWidget( bool showOnlyContactWithEmail, QAbstractItemModel *model = 0, QWidget *parent = 0 ); + + /** * Destroys the email address selection widget. */ ~EmailAddressSelectionWidget(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/akonadi/contact/kcm/akonadicontact_actions.desktop new/kdepimlibs-4.14.0/akonadi/contact/kcm/akonadicontact_actions.desktop --- old/kdepimlibs-4.13.80/akonadi/contact/kcm/akonadicontact_actions.desktop 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/akonadi/contact/kcm/akonadicontact_actions.desktop 2014-08-13 09:43:09.000000000 +0200 @@ -91,7 +91,7 @@ Comment[nl]=De contactpersoon-actie configureren Comment[nn]=Set opp kontakthandlingar Comment[pa]=ਸੰਪਰਕ ਐਕਸ਼ਨ ਸੰਰਚਨਾ -Comment[pl]=Konfiguruj działania kontaktu +Comment[pl]=Ustaw działania kontaktu Comment[pt]=Configurar as Acções do Contacto Comment[pt_BR]=Configura as ações do contato Comment[ro]=Configurează acțiunile contact diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/akonadi/entitytreemodel_p.cpp new/kdepimlibs-4.14.0/akonadi/entitytreemodel_p.cpp --- old/kdepimlibs-4.13.80/akonadi/entitytreemodel_p.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/akonadi/entitytreemodel_p.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -1167,8 +1167,15 @@ return; } - //otherwise this overwrites the copy of the real collection with one of the virtual collectoin - if (!item.parentCollection().isVirtual()) { + // Notifications about itemChange are always dispatched for real collection + // and also all virtual collections the item belongs to. In order to preserve + // the original storage collection when we need to have special handling for + // notifications for virtual collections + if (item.parentCollection().isVirtual()) { + const Collection originalParent = m_items[item.id()].parentCollection(); + m_items[item.id()].apply(item); + m_items[item.id()].setParentCollection(originalParent); + } else { m_items[item.id()].apply(item); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/akonadi/favoritecollectionsmodel.cpp new/kdepimlibs-4.14.0/akonadi/favoritecollectionsmodel.cpp --- old/kdepimlibs-4.13.80/akonadi/favoritecollectionsmodel.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/akonadi/favoritecollectionsmodel.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -166,8 +166,8 @@ const QModelIndex index = EntityTreeModel::modelIndexForCollection(q->sourceModel(), Collection(collectionId)); if (index.isValid()) { q->sourceModel()->setData(index, QVariant(), EntityTreeModel::CollectionDerefRole); - referencedCollections.remove(collectionId); } + referencedCollections.remove(collectionId); } void clearReferences() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/akonadi/notes/noteutils.cpp new/kdepimlibs-4.14.0/akonadi/notes/noteutils.cpp --- old/kdepimlibs-4.13.80/akonadi/notes/noteutils.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/akonadi/notes/noteutils.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -188,7 +188,7 @@ if ( msg->from( false ) ) from = msg->from( false )->asUnicodeString(); creationDate = msg->date( true )->dateTime(); - if ( msg->contentType( false ) && msg->contentType( false )->asUnicodeString() == QLatin1String("text/html") ) { + if ( msg->mainBodyPart()->contentType( false ) && msg->mainBodyPart()->contentType()->mimeType() == "text/html" ) { textFormat = Qt::RichText; } @@ -376,10 +376,10 @@ } msg->subject( true )->fromUnicodeString( title, ENCODING ); - msg->contentType( true )->setMimeType( d->textFormat == Qt::RichText ? "text/html" : "text/plain" ); msg->date( true )->setDateTime( creationDate ); msg->from( true )->fromUnicodeString( d->from, ENCODING ); msg->mainBodyPart()->fromUnicodeString( text ); + msg->mainBodyPart()->contentType( true )->setMimeType( d->textFormat == Qt::RichText ? "text/html" : "text/plain" ); msg->appendHeader( new KMime::Headers::Generic(X_NOTES_LASTMODIFIED_HEADER, msg.get(), lastModifiedDate.toString( KDateTime::RFCDateDay ).toLatin1(), ENCODING ) ); msg->appendHeader( new KMime::Headers::Generic( X_NOTES_UID_HEADER, msg.get(), uid, ENCODING ) ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/akonadi/notes/tests/notestest.cpp new/kdepimlibs-4.14.0/akonadi/notes/tests/notestest.cpp --- old/kdepimlibs-4.13.80/akonadi/notes/tests/notestest.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/akonadi/notes/tests/notestest.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -78,6 +78,61 @@ QVERIFY(result.lastModifiedDate().isValid()); } + void testNormalTextWithoutAttachments() + { + NoteMessageWrapper note; + QString text(QLatin1String("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"> \ + <html> \ + <head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\"> p, li { white-space: pre-wrap; } </style></head> \ + <body style=\"font-family:'Sans Serif'; font-size:9pt;\"> <p>sdfg</p></body> \ + </html>")); + note.setText(text); + + KMime::Message::Ptr msg = note.message(); + NoteMessageWrapper result(msg); + + QCOMPARE(result.text(), text); + QCOMPARE(result.textFormat(), Qt::PlainText); + } + + void testRichTextWithoutAttachments() + { + NoteMessageWrapper note; + QString text(QLatin1String("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"> \ + <html> \ + <head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\"> p, li { white-space: pre-wrap; } </style></head> \ + <body style=\"font-family:'Sans Serif'; font-size:9pt;\"> <p>sdfg</p></body> \ + </html>")); + note.setText(text, Qt::RichText); + + KMime::Message::Ptr msg = note.message(); + NoteMessageWrapper result(msg); + + QCOMPARE(result.text(), text); + QCOMPARE(result.textFormat(), Qt::RichText); + } + + void testRichTextWithAttachments() + { + NoteMessageWrapper note; + QString text(QLatin1String("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"> \ + <html> \ + <head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\"> p, li { white-space: pre-wrap; } </style></head> \ + <body style=\"font-family:'Sans Serif'; font-size:9pt;\"> <p>sdfg</p></body> \ + </html>")); + note.setText(text, Qt::RichText); + + Attachment a(QByteArray("testfile2"), QLatin1String("mimetype/mime3")); + a.setLabel(QLatin1String("label")); + note.attachments() << Attachment(QUrl("file://url/to/file"), QLatin1String("mimetype/mime")) << a; + + KMime::Message::Ptr msg = note.message(); + NoteMessageWrapper result(msg); + + QCOMPARE(result.text(), text); + QCOMPARE(result.textFormat(), Qt::RichText); + QCOMPARE(result.attachments(), note.attachments()); + } }; QTEST_MAIN( NotesTest ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/akonadi/resourcebase.cpp new/kdepimlibs-4.14.0/akonadi/resourcebase.cpp --- old/kdepimlibs-4.13.80/akonadi/resourcebase.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/akonadi/resourcebase.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -693,12 +693,18 @@ void ResourceBase::changesCommitted(const Item::List &items) { - ItemModifyJob *job = new ItemModifyJob(items); - job->d_func()->setClean(); - job->disableRevisionCheck(); // TODO: remove, but where/how do we handle the error? - job->setIgnorePayload(true); // we only want to reset the dirty flag and update the remote id - job->setUpdateGid(true); // allow resources to update GID too - connect(job, SIGNAL(finished(KJob*)), this, SLOT(changeCommittedResult(KJob*))); + TransactionSequence *transaction = new TransactionSequence(this); + connect(transaction, SIGNAL(finished(KJob*)), + this, SLOT(changeCommittedResult(KJob*))); + + // Modify the items one-by-one, because STORE does not support mass RID change + Q_FOREACH (const Item &item, items) { + ItemModifyJob *job = new ItemModifyJob(item, transaction); + job->d_func()->setClean(); + job->disableRevisionCheck(); // TODO: remove, but where/how do we handle the error? + job->setIgnorePayload(true); // we only want to reset the dirty flag and update the remote id + job->setUpdateGid(true); // allow resources to update GID too + } } void ResourceBase::changeCommitted(const Collection &collection) @@ -709,6 +715,10 @@ void ResourceBasePrivate::changeCommittedResult(KJob *job) { + if (job->error()) { + kWarning() << job->errorText(); + } + Q_Q(ResourceBase); if (qobject_cast<CollectionModifyJob *>(job)) { if (job->error()) { @@ -716,7 +726,6 @@ } mChangeRecorder->d_ptr->invalidateCache(static_cast<CollectionModifyJob *>(job)->collection()); } else { - // TODO: Error handling for item changes? // Item and tag cache is invalidated by modify job } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop new/kdepimlibs-4.14.0/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop --- old/kdepimlibs-4.13.80/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop 2014-08-13 09:43:09.000000000 +0200 @@ -14,6 +14,7 @@ Name[fr]=Module externe de test pour les recherches Akonadi Name[gl]=Engadido de busca de proba de Akonadi Name[hu]=Akonadi teszt keresés bővítmény +Name[it]=Estensione di test per la ricerca di Akonadi Name[ko]=Akonadi 테스트 검색 플러그인 Name[nb]=Akonadi test-tillegg for søk Name[nds]=Akonadi-Testsöökmoduul @@ -21,6 +22,7 @@ Name[pl]=Wtyczka próbna znajdywania dla Akonadi Name[pt]='Plugin' de Testes de Pesquisa do Akonadi Name[pt_BR]=Plugin de teste de pesquisa do Akonadi +Name[ru]=Тестовый модуль поиска для Akonadi Name[sk]=Testovací plugin hľadania Akonadi Name[sr]=Пробни прикључак за претрагу над Аконадијем Name[sr@ijekavian]=Пробни прикључак за претрагу над Аконадијем diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/gpgme++/CMakeLists.txt new/kdepimlibs-4.14.0/gpgme++/CMakeLists.txt --- old/kdepimlibs-4.13.80/gpgme++/CMakeLists.txt 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/gpgme++/CMakeLists.txt 2014-08-13 09:43:09.000000000 +0200 @@ -65,12 +65,11 @@ if ( GPGME_GLIB_FOUND ) add_library( gpgmepp-glib ${LIBRARY_TYPE} ${gpgme_LIB_SRCS} context_glib.cpp ) - generate_export_header(gpgmepp-glib) target_link_libraries( gpgmepp-glib ${GPGME_GLIB_LIBRARIES} ) set_target_properties( gpgmepp-glib PROPERTIES VERSION ${_gpgmepp_version} SOVERSION ${_gpgmepp_soversion} - OUTPUT_NAME gpgme++-glib DEFINE_SYMBOL MAKE_GPGME___LIB + OUTPUT_NAME gpgme++-glib DEFINE_SYMBOL gpgmepp_EXPORTS ) get_target_property( GPGMEPP_GLIB_LIBRARY gpgmepp LOCATION ) install(TARGETS gpgmepp-glib EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} ) @@ -79,7 +78,6 @@ if ( GPGME_QT_FOUND ) add_library( gpgmepp-qt ${LIBRARY_TYPE} ${gpgme_LIB_SRCS} context_qt.cpp ) - generate_export_header(gpgmepp-qt) target_link_libraries( gpgmepp-qt ${GPGME_QT_LIBRARIES} ) if(WIN32) target_link_libraries( gpgmepp-qt ${GPGME_VANILLA_LIBRARIES} ) @@ -87,7 +85,7 @@ set_target_properties( gpgmepp-qt PROPERTIES VERSION ${_gpgmepp_version} SOVERSION ${_gpgmepp_soversion} - OUTPUT_NAME gpgme++-qt DEFINE_SYMBOL MAKE_GPGME___LIB + OUTPUT_NAME gpgme++-qt DEFINE_SYMBOL gpgmepp_EXPORTS ) get_target_property( GPGMEPP_QT_LIBRARY gpgmepp LOCATION ) install(TARGETS gpgmepp-qt EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} ) @@ -96,12 +94,11 @@ if ( GPGME_PTHREAD_FOUND ) add_library( gpgmepp-pthread ${LIBRARY_TYPE} ${gpgme_LIB_SRCS} context_vanilla.cpp ) - generate_export_header(gpgmepp-pthread) target_link_libraries( gpgmepp-pthread ${GPGME_PTHREAD_LIBRARIES} ) set_target_properties( gpgmepp-pthread PROPERTIES VERSION ${_gpgmepp_version} SOVERSION ${_gpgmepp_soversion} - OUTPUT_NAME gpgme++-pthread DEFINE_SYMBOL MAKE_GPGME___LIB + OUTPUT_NAME gpgme++-pthread DEFINE_SYMBOL gpgmepp_EXPORTS ) get_target_property( GPGMEPP_PTHREAD_LIBRARY gpgmepp LOCATION ) install(TARGETS gpgmepp-pthread EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} ) @@ -109,12 +106,11 @@ if ( GPGME_PTH_FOUND ) add_library( gpgmepp-pth ${LIBRARY_TYPE} ${gpgme_LIB_SRCS} context_vanilla.cpp ) - generate_export_header(gpgmepp-pth) target_link_libraries( gpgmepp-pth ${GPGME_PTH_LIBRARIES} ) set_target_properties( gpgmepp-pth PROPERTIES VERSION ${_gpgmepp_version} SOVERSION ${_gpgmepp_soversion} - OUTPUT_NAME gpgme++-pth DEFINE_SYMBOL MAKE_GPGME___LIB + OUTPUT_NAME gpgme++-pth DEFINE_SYMBOL gpgmepp_EXPORTS ) get_target_property( GPGMEPP_PTH_LIBRARY gpgmepp LOCATION ) install(TARGETS gpgmepp-pth EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kabc/vcardparser/testread2.cpp new/kdepimlibs-4.14.0/kabc/vcardparser/testread2.cpp --- old/kdepimlibs-4.13.80/kabc/vcardparser/testread2.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kabc/vcardparser/testread2.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -43,7 +43,7 @@ Addressee::List::iterator itr1; Addressee::List::iterator itr2; for ( itr1 = l.begin(), itr2 = parsed.begin(); - itr1 != l.end(); ++itr1, ++itr2 ) { + itr1 != l.end() && itr2 != parsed.end(); ++itr1, ++itr2 ) { if ( ( *itr1 ).fullEmail() == ( *itr2 ).fullEmail() && ( *itr1 ).organization() == ( *itr2 ).organization() && ( *itr1 ).phoneNumbers() == ( *itr2 ).phoneNumbers() && diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kblog/CMakeLists.txt new/kdepimlibs-4.14.0/kblog/CMakeLists.txt --- old/kdepimlibs-4.13.80/kblog/CMakeLists.txt 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kblog/CMakeLists.txt 2014-08-13 09:43:09.000000000 +0200 @@ -28,11 +28,6 @@ ${CMAKE_BINARY_DIR}/syndication ) -if (LibKGAPI2_FOUND) - set(kblog_LIB_SRCS ${kblog_LIB_SRCS} blogger.cpp) - include_directories(${LibKGAPI2_INCLUDE_DIR}) -endif () - add_definitions( -DKCAL_DEPRECATED= ) @@ -45,11 +40,7 @@ add_library(kblog ${LIBRARY_TYPE} ${kblog_LIB_SRCS}) generate_export_header(kblog) -target_link_libraries(kblog kxmlrpcclient syndication ${KDE4_KIO_LIBS} kcal) - -if (LibKGAPI2_FOUND) - target_link_libraries(kblog ${LibKGAPI2_LIBRARY}) -endif () +target_link_libraries(kblog kxmlrpcclient syndication ${KDE4_KIO_LIBS} kcal ) set_target_properties(kblog PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) @@ -59,8 +50,3 @@ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kblog_export.h blog.h blogpost.h blogcomment.h blogmedia.h blogger1.h gdata.h metaweblog.h movabletype.h wordpressbuggy.h DESTINATION ${INCLUDE_INSTALL_DIR}/kblog COMPONENT Devel) - -if (LibKGAPI2_FOUND) - install( FILES blogger.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kblog COMPONENT Devel) -endif () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kblog/blogger.cpp new/kdepimlibs-4.14.0/kblog/blogger.cpp --- old/kdepimlibs-4.13.80/kblog/blogger.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kblog/blogger.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,538 +0,0 @@ -/* - * Copyright (C) 2014 Daniel Vrátil <[email protected]> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "blogger.h" -#include "blog_p.h" -#include "blogpost.h" -#include "blogcomment.h" - -#include <KUrl> -#include <KDebug> -#include <KLocalizedString> - -#include <LibKGAPI2/Blogger/Blog> -#include <LibKGAPI2/Blogger/BlogFetchJob> -#include <LibKGAPI2/Blogger/Post> -#include <LibKGAPI2/Blogger/PostCreateJob> -#include <LibKGAPI2/Blogger/PostDeleteJob> -#include <LibKGAPI2/Blogger/PostFetchJob> -#include <LibKGAPI2/Blogger/PostModifyJob> -#include <LibKGAPI2/Blogger/Comment> -#include <LibKGAPI2/Blogger/CommentFetchJob> -#include <LibKGAPI2/Account> -#include <LibKGAPI2/AuthJob> - -Q_DECLARE_METATYPE(KBlog::BlogPost*) -Q_DECLARE_METATYPE(KGAPI2::Job*) -typedef QMap<QString, QString> KBlogInfo; - -#define KBLOGPOST_PROPERTY "KBlogPostProperty" -#define JOB_PROPERTY "JobProperty" - -namespace KBlog -{ - -class BloggerPrivate: public KBlog::BlogPrivate -{ - public: - BloggerPrivate(Blogger *parent); - virtual ~BloggerPrivate(); - - void updateKBlogPost(KBlog::BlogPost *kblog, const KGAPI2::Blogger::PostPtr &postPtr); - KBlog::BlogPost KGAPIPostToKBlogPost(const KGAPI2::Blogger::PostPtr &postPtr); - QList<KBlog::BlogPost> KGAPIPostsToKBlogPosts(const KGAPI2::ObjectsList &posts); - KGAPI2::Blogger::PostPtr KBlogPostToKGAPI(const BlogPost * const kblog); - - KBlogInfo KGAPIBlogToKBlogBlog(const KGAPI2::Blogger::BlogPtr &blogPtr); - QList<KBlogInfo> KGAPIBlogsToKBlogBlogs(const KGAPI2::ObjectsList &blogs); - - KBlog::BlogComment KGAPICommentToKBlogComment(const KGAPI2::Blogger::CommentPtr &commentPtr); - QList<KBlog::BlogComment> KGAPICommentsToKBlogComments(const KGAPI2::ObjectsList &comments); - - bool handleError(KGAPI2::Job *job); - - void _k_onAuthenticateFinished(KGAPI2::Job *job); - void _k_onListBlogsFinished(KGAPI2::Job *job); - void _k_onListRecentPostsFinished(KGAPI2::Job *job); - void _k_onFetchPostFinished(KGAPI2::Job *job); - void _k_onCreatePostFinished(KGAPI2::Job *job); - void _k_onRemovePostFinished(KGAPI2::Job *job); - void _k_onModifyPostFinished(KGAPI2::Job *job); - void _k_onListCommentsFinished(KGAPI2::Job *job); - - QString apiKey; - QString secretKey; - KGAPI2::AccountPtr account; - - private: - Blogger * const q_ptr; - Q_DECLARE_PUBLIC(Blogger) -}; - -} // namespace KBlog - -using namespace KBlog; - -BloggerPrivate::BloggerPrivate(Blogger *parent) - : BlogPrivate() - , q_ptr(parent) -{ -} - -BloggerPrivate::~BloggerPrivate() -{ -} - -void BloggerPrivate::updateKBlogPost(BlogPost *kblog, const KGAPI2::Blogger::PostPtr &postPtr) -{ - kblog->setPostId(postPtr->id()); - kblog->setTitle(postPtr->title()); - kblog->setContent(postPtr->content()); - kblog->setTags(postPtr->labels()); - kblog->setCreationDateTime(postPtr->published()); - kblog->setModificationDateTime(postPtr->updated()); - kblog->setLink(postPtr->url()); - kblog->setPrivate(postPtr->status() == QLatin1String("DRAFT")); - // TODO: Try to match more? -} - -KGAPI2::Blogger::PostPtr BloggerPrivate::KBlogPostToKGAPI(const BlogPost *const kblog) -{ - Q_Q(Blogger); - - KGAPI2::Blogger::PostPtr postPtr(new KGAPI2::Blogger::Post); - postPtr->setId(kblog->postId()); - postPtr->setBlogId(q->blogId()); - postPtr->setTitle(kblog->title()); - postPtr->setContent(kblog->content()); - postPtr->setLabels(kblog->tags()); - postPtr->setPublished(kblog->creationDateTime()); - postPtr->setUpdated(kblog->modificationDateTime()); - postPtr->setUrl(kblog->link()); - return postPtr; -} - -BlogPost BloggerPrivate::KGAPIPostToKBlogPost(const KGAPI2::Blogger::PostPtr &postPtr) -{ - BlogPost kblog; - updateKBlogPost(&kblog, postPtr); - return kblog; -} - -QList<BlogPost> BloggerPrivate::KGAPIPostsToKBlogPosts(const KGAPI2::ObjectsList &posts) -{ - QList<BlogPost> blogPosts; - Q_FOREACH (const KGAPI2::ObjectPtr &obj, posts) { - blogPosts << KGAPIPostToKBlogPost(obj.dynamicCast<KGAPI2::Blogger::Post>()); - } - return blogPosts; -} - - -KBlogInfo BloggerPrivate::KGAPIBlogToKBlogBlog(const KGAPI2::Blogger::BlogPtr &blogPtr) -{ - KBlogInfo kblogInfo; - kblogInfo[QLatin1String("id")] = blogPtr->id(); - kblogInfo[QLatin1String("title")] = blogPtr->name(); - kblogInfo[QLatin1String("url")] = blogPtr->url().toString(); - kblogInfo[QLatin1String("summay")] = blogPtr->description(); - return kblogInfo; -} - -QList<KBlogInfo> BloggerPrivate::KGAPIBlogsToKBlogBlogs(const KGAPI2::ObjectsList &blogs) -{ - QList<KBlogInfo> kblogInfos; - Q_FOREACH (const KGAPI2::ObjectPtr &obj, blogs) { - kblogInfos << KGAPIBlogToKBlogBlog(obj.dynamicCast<KGAPI2::Blogger::Blog>()); - } - return kblogInfos; -} - -BlogComment BloggerPrivate::KGAPICommentToKBlogComment(const KGAPI2::Blogger::CommentPtr &commentPtr) -{ - BlogComment kblogComment; - kblogComment.setCommentId(commentPtr->id()); - kblogComment.setContent(commentPtr->content()); - kblogComment.setCreationDateTime(commentPtr->published()); - kblogComment.setModificationDateTime(commentPtr->updated()); - kblogComment.setName(commentPtr->authorName()); - return kblogComment; -} - -QList<BlogComment> BloggerPrivate::KGAPICommentsToKBlogComments(const KGAPI2::ObjectsList &comments) -{ - QList<BlogComment> kblogComments; - Q_FOREACH (const KGAPI2::ObjectPtr &obj, comments) { - kblogComments << KGAPICommentToKBlogComment(obj.dynamicCast<KGAPI2::Blogger::Comment>()); - } - return kblogComments; -} - -bool BloggerPrivate::handleError(KGAPI2::Job *job) -{ - Q_Q(Blogger); - - if (!job->error()) { - return true; - } - - KBlog::BlogPost *post = job->property(KBLOGPOST_PROPERTY).value<BlogPost*>(); - - KBlog::Blog::ErrorType errCode = Blog::Other; - switch (job->error()) { - case KGAPI2::Unauthorized: { - KGAPI2::AuthJob *authJob = new KGAPI2::AuthJob(account, apiKey, secretKey, q); - authJob->setProperty(JOB_PROPERTY, QVariant::fromValue(job)); - q->connect(authJob, SIGNAL(finished(KGAPI2::Job*)), - q, SLOT(_k_onAuthenticateFinished(KGAPI2::Job*))); - return false; - } - case KGAPI2::AuthCancelled: - case KGAPI2::AuthError: - errCode = Blog::AuthenticationError; - break; - - case KGAPI2::BadRequest: - errCode = Blog::XmlRpc; - break; - - // Not found is handled in callers - case KGAPI2::NotFound: - return true; - - default: - errCode = Blog::Other; - break; - } - - if (post) { - Q_EMIT q->errorPost(errCode, job->errorString(), post); - } else { - Q_EMIT q->error(errCode, job->errorString()); - } - - job->deleteLater(); - return false; -} - - - - -Blogger::Blogger(const KUrl &server, QObject *parent) - : Blog(server, *new BloggerPrivate(this), parent) -{ - kDebug(); -} - -Blogger::~Blogger() -{ - kDebug(); -} - - -QString Blogger::interfaceName() const -{ - return QLatin1String("Blogger 3.0"); -} - -void Blogger::setApiKey(const QString &apiKey) -{ - Q_D(Blogger); - d->apiKey = apiKey; -} - -void Blogger::setSecretKey(const QString &secretKey) -{ - Q_D(Blogger); - d->secretKey = secretKey; -} - -void Blogger::authenticate(const QMap<QString, QString> &authData) -{ - Q_D(Blogger); - - KGAPI2::AccountPtr account; - kDebug() << authData; - if (!authData.isEmpty()) { - QList<QUrl> scopes; - scopes << KGAPI2::Account::bloggerScopeUrl(); - account = KGAPI2::AccountPtr(new KGAPI2::Account(authData[QLatin1String("account")], - authData[QLatin1String("accessToken")], - authData[QLatin1String("refreshToken")], - scopes)); - d->account = account; - } else { - account = KGAPI2::AccountPtr(new KGAPI2::Account); - account->addScope(KGAPI2::Account::bloggerScopeUrl()); - KGAPI2::AuthJob *authJob = new KGAPI2::AuthJob(account, d->apiKey, d->secretKey, this); - if (account->accessToken().isEmpty()) { - authJob->setUsername(username()); - authJob->setPassword(password()); - } - connect(authJob, SIGNAL(finished(KGAPI2::Job*)), - this, SLOT(_k_onAuthenticateFinished(KGAPI2::Job*))); - } -} - -void BloggerPrivate::_k_onAuthenticateFinished(KGAPI2::Job *job) -{ - Q_Q(Blogger); - if (!handleError(job)) { - return; - } - - KGAPI2::AuthJob *authJob = qobject_cast<KGAPI2::AuthJob*>(job); - account = authJob->account(); - - QMap<QString, QString> authData; - authData[QLatin1String("account")] = account->accountName(); - authData[QLatin1String("accessToken")] = account->accessToken(); - authData[QLatin1String("refreshToken")] = account->refreshToken(); - - Q_EMIT q->authenticated(authData); - - if (authJob->property(JOB_PROPERTY).isValid()) { - KGAPI2::Job *originalJob = authJob->property(JOB_PROPERTY).value<KGAPI2::Job*>(); - if (originalJob) { - originalJob->restart(); - } - } -} - - -void Blogger::listBlogs() -{ - Q_D(Blogger); - - KGAPI2::Blogger::BlogFetchJob *fetchJob - = new KGAPI2::Blogger::BlogFetchJob(QLatin1String("self"), - KGAPI2::Blogger::BlogFetchJob::FetchByUserId, - d->account, - this); - connect(fetchJob, SIGNAL(finished(KGAPI2::Job*)), - this, SLOT(_k_onListBlogsFinished(KGAPI2::Job*))); -} - -void BloggerPrivate::_k_onListBlogsFinished(KGAPI2::Job *job) -{ - Q_Q(Blogger); - - if (!handleError(job)) { - return; - } - - job->deleteLater(); - KGAPI2::FetchJob *fetchJob = qobject_cast<KGAPI2::FetchJob*>(job); - const QList<KBlogInfo> blogs = KGAPIBlogsToKBlogBlogs(fetchJob->items()); - Q_EMIT q->listedBlogs(blogs); -} - - -void Blogger::listRecentPosts(int number) -{ - Q_D(Blogger); - - KGAPI2::Blogger::PostFetchJob *fetchJob - = new KGAPI2::Blogger::PostFetchJob(blogId(), d->account, this); - fetchJob->setMaxResults(number); - connect(fetchJob, SIGNAL(finished(KGAPI2::Job*)), - this, SLOT(_k_onListRecentPostsFinished(KGAPI2::Job*))); -} - -void BloggerPrivate::_k_onListRecentPostsFinished(KGAPI2::Job *job) -{ - Q_Q(Blogger); - - if (!handleError(job)) { - return; - } - - job->deleteLater(); - KGAPI2::FetchJob *fetchJob = qobject_cast<KGAPI2::FetchJob*>(job); - QList<BlogPost> posts = KGAPIPostsToKBlogPosts(fetchJob->items()); - QList<BlogPost>::Iterator iter, endIter = posts.end(); - for (iter = posts.begin(); iter != endIter; ++iter) { - (*iter).setStatus(BlogPost::Fetched); - } - Q_EMIT q->listedRecentPosts(posts); -} - - -void Blogger::fetchPost(KBlog::BlogPost *post) -{ - Q_D(Blogger); - - KGAPI2::Blogger::PostFetchJob *fetchJob - = new KGAPI2::Blogger::PostFetchJob(blogId(), post->postId(), d->account, this); - fetchJob->setProperty(KBLOGPOST_PROPERTY, QVariant::fromValue(post)); - connect(fetchJob, SIGNAL(finished(KGAPI2::Job*)), - this, SLOT(_k_onFetchPostFinished(KGAPI2::Job*))); -} - -void BloggerPrivate::_k_onFetchPostFinished(KGAPI2::Job *job) -{ - Q_Q(Blogger); - - if (!handleError(job)) { - return; - } - - job->deleteLater(); - KGAPI2::FetchJob *fetchJob = qobject_cast<KGAPI2::FetchJob*>(job); - BlogPost *kblog = fetchJob->property(KBLOGPOST_PROPERTY).value<BlogPost*>(); - const KGAPI2::ObjectsList items = fetchJob->items(); - if (items.count() != 1) { - Q_EMIT q->errorPost(Blog::Other, i18n("Blog post not found"), kblog); - return; - } - - updateKBlogPost(kblog, items.first().dynamicCast<KGAPI2::Blogger::Post>()); - kblog->setStatus(BlogPost::Fetched); - Q_EMIT q->fetchedPost(kblog); -} - - -void Blogger::removePost(KBlog::BlogPost *post) -{ - Q_D(Blogger); - - KGAPI2::Blogger::PostDeleteJob *deleteJob - = new KGAPI2::Blogger::PostDeleteJob(blogId(), post->postId(), d->account, this); - deleteJob->setProperty(KBLOGPOST_PROPERTY, QVariant::fromValue(post)); - connect(deleteJob, SIGNAL(finished(KGAPI2::Job*)), - this, SLOT(_k_onRemovePostFinished(KGAPI2::Job*))); -} - -void BloggerPrivate::_k_onRemovePostFinished(KGAPI2::Job *job) -{ - Q_Q(Blogger); - - if (!handleError(job)) { - return; - } - - job->deleteLater(); - BlogPost *kblog = job->property(KBLOGPOST_PROPERTY).value<BlogPost*>(); - kblog->setStatus(BlogPost::Removed); - Q_EMIT q->removedPost(kblog); -} - - - -void Blogger::createPost(KBlog::BlogPost *post) -{ - Q_D(Blogger); - - KGAPI2::Blogger::PostPtr postPtr = d->KBlogPostToKGAPI(post); - KGAPI2::Blogger::PostCreateJob *createJob - = new KGAPI2::Blogger::PostCreateJob(postPtr, post->isPrivate(), d->account, this); - createJob->setProperty(KBLOGPOST_PROPERTY, QVariant::fromValue(post)); - connect(createJob, SIGNAL(finished(KGAPI2::Job*)), - this, SLOT(_k_onCreatePostFinished(KGAPI2::Job*))); -} - -void BloggerPrivate::_k_onCreatePostFinished(KGAPI2::Job *job) -{ - Q_Q(Blogger); - - if (!handleError(job)) { - return; - } - - job->deleteLater(); - KGAPI2::CreateJob *createJob = qobject_cast<KGAPI2::CreateJob*>(job); - BlogPost* kblog = createJob->property(KBLOGPOST_PROPERTY).value<BlogPost*>(); - const KGAPI2::ObjectsList items = createJob->items(); - if (items.count() != 1) { - Q_EMIT q->errorPost(Blog::Other, i18n("Failed to create new post"), kblog); - return; - } - - updateKBlogPost(kblog, items.first().dynamicCast<KGAPI2::Blogger::Post>()); - kblog->setStatus(BlogPost::Created); - Q_EMIT q->createdPost(kblog); -} - - -void Blogger::modifyPost(KBlog::BlogPost *post) -{ - Q_D(Blogger); - - KGAPI2::Blogger::PostPtr postPtr = d->KBlogPostToKGAPI(post); - postPtr->setPublished(KDateTime()); - postPtr->setUpdated(KDateTime()); - KGAPI2::Blogger::PostModifyJob *modifyJob - = new KGAPI2::Blogger::PostModifyJob(postPtr, d->account, this); - modifyJob->setProperty(KBLOGPOST_PROPERTY, QVariant::fromValue(post)); - connect(modifyJob, SIGNAL(finished(KGAPI2::Job*)), - this, SLOT(_k_onModifyPostFinished(KGAPI2::Job*))); -} - -void BloggerPrivate::_k_onModifyPostFinished(KGAPI2::Job *job) -{ - Q_Q(Blogger); - - if (!handleError(job)) { - return; - } - - job->deleteLater(); - KGAPI2::ModifyJob *modifyJob = qobject_cast<KGAPI2::ModifyJob*>(job); - BlogPost *kblog = modifyJob->property(KBLOGPOST_PROPERTY).value<BlogPost*>(); - const KGAPI2::ObjectsList items = modifyJob->items(); - if (items.count() != 1) { - Q_EMIT q->errorPost(Blog::Other, i18n("Failed to update post"), kblog); - return; - } - - updateKBlogPost(kblog, items.first().dynamicCast<KGAPI2::Blogger::Post>()); - kblog->setStatus(BlogPost::Modified); - Q_EMIT q->modifiedPost(kblog); -} - - -void Blogger::listComments(BlogPost *post) -{ - Q_D(Blogger); - - KGAPI2::Blogger::CommentFetchJob *fetchJob - = new KGAPI2::Blogger::CommentFetchJob(blogId(), post->postId(), d->account, this); - fetchJob->setProperty(KBLOGPOST_PROPERTY, QVariant::fromValue(post)); - connect(fetchJob, SIGNAL(finished(KGAPI2::Job*)), - this, SLOT(_k_onListCommentsFinished(KGAPI2::Job*))); -} - -void BloggerPrivate::_k_onListCommentsFinished(KGAPI2::Job *job) -{ - Q_Q(Blogger); - - if (!handleError(job)) { - return; - } - - job->deleteLater(); - KGAPI2::FetchJob *fetchJob = qobject_cast<KGAPI2::FetchJob*>(job); - BlogPost *kblog = fetchJob->property(KBLOGPOST_PROPERTY).value<BlogPost*>(); - const QList<KBlog::BlogComment> comments = KGAPICommentsToKBlogComments(fetchJob->items()); - Q_EMIT q->listedComments(kblog, comments); -} - - - -#include "moc_blogger.cpp" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kblog/blogger.h new/kdepimlibs-4.14.0/kblog/blogger.h --- old/kdepimlibs-4.13.80/kblog/blogger.h 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kblog/blogger.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,217 +0,0 @@ -/* - * Copyright (C) 2014 Daniel Vrátil <[email protected]> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef KBLOG_BLOGGER_H -#define KBLOG_BLOGGER_H - -#include <kblog/blog.h> - -#include <QMap> - -namespace KGAPI2 -{ - class Job; -} - - -/** - @file - - This file is part of the for accessing Blog Servers from the - Google's Blogger and BlogPost service and defines the Blogger - class. - - @author Daniel Vrátil \<dvratil\@redhat.com\> - */ - -namespace KBlog -{ - -class BloggerPrivate; - -/** - @brief - A class that can be used for access to Google blogs. The blogspot.com and - blogger.com accounts support native Blogger API v3. - - @code - Blog *myblog = new Blogger("http://myblog.blogspot.com"); - myblog->setProfileId( "12345678" ); // can be fetched via fetchProfileId() - myblog->setBlogId( "1" ); // can be caught by listBlogs() - KBlog::BlogPost *post = new BlogPost(); - post->setTitle( "This is the title." ); - post->setContent( "Here is some the content..." ); - myblog->createPost( post ); - @endcode - - @author Daniel Vrátil \<dvratil\@redhat.com\> - */ -class KBLOG_EXPORT Blogger : public KBlog::Blog -{ - Q_OBJECT - public: - /** - Create an object for Blogger - @param server The blog URL - @param parent The parent object, inherited from QObject. - */ - explicit Blogger(const KUrl &server, QObject *parent = 0); - - /** - Destructor. - */ - virtual ~Blogger(); - - /** - Returns name of the service. - */ - QString interfaceName() const; - - /** - Authenticate this instance of Blogger against Google account. - - When no @p authData is provided, full authentication will take place, which - includes popping up a dialog with Google Accounts Sign-On. - - @param authData Optinal authData received from authenticated(QMap\<QString,QString\>) - signal emitted after previous authenticate() call. - @see authenticated(QMap\<QString,QString\>) - */ - void authenticate(const QMap<QString, QString> &authData = QMap<QString, QString>()); - - /** - Sets Google OAuth application API key. - - @param apiKey API key to use for requests. - @see setSecretKey(QString) - */ - void setApiKey(const QString &apiKey); - - /** - Sets Google OAuth application secret key. - - @param secretKey Secret key to use for requests. - @see setApiKey(QString) - */ - void setSecretKey(const QString &secretKey); - - /** - List the blogs available for this authentication on the server. - - @see void listedBlogs( const QList\<QMap\<QString,QString\>\>& ) - */ - void listBlogs(); - - /** - List recent posts on the server. The status of the posts will be Fetched. - @param number The number of posts to fetch. The order is newest first. - - @see void listedPosts( const QList\<KBlog::BlogPost\>& ) - @see void fetchPost( KBlog::BlogPost* ) - @see BlogPost::Status - */ - void listRecentPosts(int number); - - /** - Fetch the Post with a specific id. - @param post This is the post with its id set correctly. - - @see BlogPost::setPostId( const QString& ) - @see fetchedPost( KBlog::BlogPost *post ) - */ - void fetchPost(KBlog::BlogPost *post); - - /** - Remove a post from the server. - @param post This is the post with its id set correctly. - - @see BlogPost::setPostId( const QString& ) - @see removedPost( KBlog::BlogPost* ) - */ - void removePost(KBlog::BlogPost *post); - - /** - Create a new post on server. - @param post This is send to the server. - - @see createdPost( KBlog::BlogPost *post ) - */ - void createPost(KBlog::BlogPost *post); - - - /** - Modify a post on server. - @param post This is used to send the modified post including the correct id. - */ - void modifyPost(KBlog::BlogPost *post); - - /** - List the comments available for this post on the server. - @param post The post, which posts should be listed. - - @see void listedComments( KBlog::BlogPost*, const QList\<KBlog::BlogComment\>& ) - */ - void listComments(KBlog::BlogPost *post); - - Q_SIGNALS: - /** - This signal is emitted when a list of comments has been fetched - from the blogging server. - @param post This is the corresponding post. - @param comments The list of comments. - - @see listComments( KBlog::BlogPost* ) - */ - void listedComments(KBlog::BlogPost *post, const QList<BlogComment> &comments); - - /** - This signal is emitted when a list of blogs has been fetched - from the blogging server. - @param blogsList The list of blogs. - - @see listBlogs() - */ - void listedBlogs(const QList<QMap<QString, QString> > &blogs); - - - /** - This signal is emitted when authentication process started by - call to authenticate() is finished. - - @param authData Opaque authentication data (contains OAuth tokens) that - application can store in some persistent storage (like KWallet) - and pass them to authenticate() call on next start. - */ - void authenticated(const QMap<QString, QString> &authData); - - private: - Q_DECLARE_PRIVATE(Blogger); - - Q_PRIVATE_SLOT(d_func(), void _k_onAuthenticateFinished(KGAPI2::Job*)) - Q_PRIVATE_SLOT(d_func(), void _k_onListBlogsFinished(KGAPI2::Job*)) - Q_PRIVATE_SLOT(d_func(), void _k_onListRecentPostsFinished(KGAPI2::Job*)) - Q_PRIVATE_SLOT(d_func(), void _k_onFetchPostFinished(KGAPI2::Job*)) - Q_PRIVATE_SLOT(d_func(), void _k_onRemovePostFinished(KGAPI2::Job*)) - Q_PRIVATE_SLOT(d_func(), void _k_onCreatePostFinished(KGAPI2::Job*)) - Q_PRIVATE_SLOT(d_func(), void _k_onModifyPostFinished(KGAPI2::Job*)) - Q_PRIVATE_SLOT(d_func(), void _k_onListCommentsFinished(KGAPI2::Job*)) -}; -} - -#endif // KBLOG_BLOGGER_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kcalcore/event.cpp new/kdepimlibs-4.14.0/kcalcore/event.cpp --- old/kdepimlibs-4.13.80/kcalcore/event.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kcalcore/event.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -78,6 +78,12 @@ { } +Event::Event(const Incidence &other) + : Incidence(other) + , d(new KCalCore::Event::Private) +{ +} + Event::~Event() { delete d; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kcalcore/event.h new/kdepimlibs-4.14.0/kcalcore/event.h --- old/kdepimlibs-4.13.80/kcalcore/event.h 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kcalcore/event.h 2014-08-13 09:43:09.000000000 +0200 @@ -71,6 +71,14 @@ Event(const Event &other); /** + Costructs an event out of an incidence + This constructs allows to make it easy to create an event from a todo. + @param other is the incidence to copy. + @since 4.14 + */ + Event(const Incidence &other); + + /** Destroys the event. */ ~Event(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kcalcore/tests/testevent.cpp new/kdepimlibs-4.14.0/kcalcore/tests/testevent.cpp --- old/kdepimlibs-4.13.80/kcalcore/tests/testevent.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kcalcore/tests/testevent.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -20,6 +20,7 @@ */ #include "testevent.h" #include "../event.h" +#include "../todo.h" #include <qtest_kde.h> QTEST_KDEMAIN(EventTest, NoGUI) @@ -140,6 +141,23 @@ QVERIFY(event1.location() == event2.location()); } +void EventTest::testCopyIncidence() +{ + QDate dt = QDate::currentDate(); + Todo todo; + todo.setDtStart(KDateTime(dt)); + todo.setSummary(QLatin1String("Event1 Summary")); + todo.setDescription(QLatin1String("This is a description of the first event")); + todo.setLocation(QLatin1String("the place")); + + Event event(todo); + QCOMPARE(event.uid(), todo.uid()); + QCOMPARE(event.dtStart(), todo.dtStart()); + QCOMPARE(event.summary(), todo.summary()); + QCOMPARE(event.description(), todo.description()); + QCOMPARE(event.location(), todo.location()); +} + void EventTest::testAssign() { QDate dt = QDate::currentDate(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kcalcore/tests/testevent.h new/kdepimlibs-4.14.0/kcalcore/tests/testevent.h --- old/kdepimlibs-4.13.80/kcalcore/tests/testevent.h 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kcalcore/tests/testevent.h 2014-08-13 09:43:09.000000000 +0200 @@ -34,6 +34,7 @@ void testCompare(); void testClone(); void testCopy(); + void testCopyIncidence(); void testAssign(); void testSerializer_data(); void testSerializer(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kcalcore/tests/testtodo.cpp new/kdepimlibs-4.14.0/kcalcore/tests/testtodo.cpp --- old/kdepimlibs-4.13.80/kcalcore/tests/testtodo.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kcalcore/tests/testtodo.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -20,6 +20,7 @@ */ #include "testtodo.h" #include "../todo.h" +#include "../event.h" #include "attachment.h" #include <qtest_kde.h> @@ -87,6 +88,23 @@ QVERIFY(todo1.isCompleted() == todo2->isCompleted()); } +void TodoTest::testCopyIncidence() +{ + QDate dt = QDate::currentDate(); + Event event; + event.setDtStart(KDateTime(dt)); + event.setSummary(QLatin1String("Event1 Summary")); + event.setDescription(QLatin1String("This is a description of the first event")); + event.setLocation(QLatin1String("the place")); + + Todo todo(event); + QCOMPARE(todo.uid(), event.uid()); + QCOMPARE(todo.dtStart(), event.dtStart()); + QCOMPARE(todo.summary(), event.summary()); + QCOMPARE(todo.description(), event.description()); + QCOMPARE(todo.location(), event.location()); +} + void TodoTest::testAssign() { QDate dt = QDate::currentDate(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kcalcore/tests/testtodo.h new/kdepimlibs-4.14.0/kcalcore/tests/testtodo.h --- old/kdepimlibs-4.13.80/kcalcore/tests/testtodo.h 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kcalcore/tests/testtodo.h 2014-08-13 09:43:09.000000000 +0200 @@ -31,6 +31,7 @@ void testValidity(); void testCompare(); void testClone(); + void testCopyIncidence(); void testAssign(); void testSetCompleted(); void testStatus(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kcalcore/todo.cpp new/kdepimlibs-4.14.0/kcalcore/todo.cpp --- old/kdepimlibs-4.13.80/kcalcore/todo.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kcalcore/todo.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -92,6 +92,12 @@ { } +Todo::Todo(const Incidence &other) + : Incidence(other) + , d(new KCalCore::Todo::Private) +{ +} + Todo::~Todo() { delete d; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kcalcore/todo.h new/kdepimlibs-4.14.0/kcalcore/todo.h --- old/kdepimlibs-4.13.80/kcalcore/todo.h 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kcalcore/todo.h 2014-08-13 09:43:09.000000000 +0200 @@ -66,6 +66,14 @@ Todo(const Todo &other); /** + Costructs a todo out of an incidence + This constructs allows to make it easy to create a todo from an event. + @param other is the incidence to copy. + @since 4.14 + */ + Todo(const Incidence &other); + + /** Destroys a to-do. */ ~Todo(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kresources/kresources.desktop new/kdepimlibs-4.14.0/kresources/kresources.desktop --- old/kdepimlibs-4.13.80/kresources/kresources.desktop 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kresources/kresources.desktop 2014-08-13 09:43:09.000000000 +0200 @@ -96,7 +96,7 @@ Comment[nl]=KDE-hulpbronnen instellen Comment[nn]=Set opp KDE-ressursar Comment[pa]=KDE ਸਰੋਤ ਸੰਰਚਨਾ -Comment[pl]=Konfiguruj zasoby KDE +Comment[pl]=Ustaw zasoby KDE Comment[pt]=Configurar os Recursos do KDE Comment[pt_BR]=Configura as fontes de dados do KDE Comment[ro]=Configurare resurse KDE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/kresources/kresources_manager.desktop new/kdepimlibs-4.14.0/kresources/kresources_manager.desktop --- old/kdepimlibs-4.13.80/kresources/kresources_manager.desktop 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/kresources/kresources_manager.desktop 2014-08-13 09:43:09.000000000 +0200 @@ -31,7 +31,7 @@ Name[nl]=KResource-beheerder Name[nn]=KResources-handsaming Name[pa]=ਕੇ-ਰੀਸੋਰਸ ਮੈਨੇਜਰ -Name[pl]=Menadżer zasobów KDE (KResource) +Name[pl]=Zarządzanie zasobami KDE (KResource) Name[pt]=Gestor do KResources Name[pt_BR]=Gerenciador do KResource Name[ro]=Gestionar KResurse @@ -87,7 +87,7 @@ Comment[nl]=KResource-beheerder Comment[nn]=KResource-handsaming Comment[pa]=ਕੇ-ਰੀਸੋਰਸ ਮੈਨੇਜਰ -Comment[pl]=Menadżer zasobów KDE (KResource) +Comment[pl]=Zarządzanie zasobami KDE (KResource) Comment[pt]=Gestor do KResources Comment[pt_BR]=Gerenciador do KResource Comment[ro]=Gestionar KResurse diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/mailtransport/smtpconfigwidget.cpp new/kdepimlibs-4.14.0/mailtransport/smtpconfigwidget.cpp --- old/kdepimlibs-4.13.80/mailtransport/smtpconfigwidget.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/mailtransport/smtpconfigwidget.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -42,6 +42,7 @@ #include <KProtocolInfo> #include <KDebug> +#include <KMessageBox> namespace { @@ -239,6 +240,12 @@ if ( d->ui.kcfg_specifyHostname->isChecked() ) { d->serverTest->setFakeHostname( d->ui.kcfg_localHostname->text() ); } + QAbstractButton *encryptionChecked = d->encryptionGroup->checkedButton(); + if (encryptionChecked == d->ui.none) { + d->serverTest->setPort( Transport::EnumEncryption::None, d->ui.kcfg_port->value()); + } else if (encryptionChecked == d->ui.ssl) { + d->serverTest->setPort( Transport::EnumEncryption::SSL, d->ui.kcfg_port->value()); + } d->serverTest->setProgressBar( d->ui.checkCapabilitiesProgress ); d->ui.checkCapabilitiesStack->setCurrentIndex( 1 ); BusyCursorHelper *busyCursorHelper = new BusyCursorHelper( d->serverTest ); @@ -293,7 +300,9 @@ // If the servertest did not find any useable authentication modes, assume the // connection failed and don't disable any of the radioboxes. if ( results.isEmpty() ) { + KMessageBox::error(this, i18n("Failed to check capabilities. Please verify port and authentication mode."), i18n("Check Capabilities Failed")); d->serverTestFailed = true; + d->serverTest->deleteLater(); return; } @@ -311,6 +320,15 @@ } d->sslCapa = d->serverTest->secureProtocols(); d->updateAuthCapbilities(); + //Show correct port from capabilities. + if (d->ui.ssl->isEnabled()) { + const int portValue = d->serverTest->port(Transport::EnumEncryption::SSL); + d->ui.kcfg_port->setValue(portValue == -1 ? SMTPS_PORT : portValue); + } else if (d->ui.none->isEnabled()) { + const int portValue = d->serverTest->port(Transport::EnumEncryption::None); + d->ui.kcfg_port->setValue(portValue == -1 ? SMTP_PORT : portValue); + } + d->serverTest->deleteLater(); } void SMTPConfigWidget::hostNameChanged( const QString &text ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.13.80/mailtransport/tests/transportmgr.cpp new/kdepimlibs-4.14.0/mailtransport/tests/transportmgr.cpp --- old/kdepimlibs-4.13.80/mailtransport/tests/transportmgr.cpp 2014-07-08 07:32:45.000000000 +0200 +++ new/kdepimlibs-4.14.0/mailtransport/tests/transportmgr.cpp 2014-08-13 09:43:09.000000000 +0200 @@ -79,9 +79,12 @@ { // NOTE: Using deprecated TransportConfigDialog here for testing purposes. // The TransportManagementWidget uses the non-deprecated method instead. + const int index = mComboBox->currentTransportId(); + if (index < 0) + return; TransportConfigDialog *t = new TransportConfigDialog( - TransportManager::self()->transportById( mComboBox->currentTransportId() ), this ); + TransportManager::self()->transportById( index ), this ); t->exec(); delete t; } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
