Branch 'kolab/integration/4.13.0' - 13 commits - accountwizard/ispdb accountwizard/ldap.cpp accountwizard/setupautoconfigkolabfreebusy.cpp calendarsupport/kcalprefs.kcfg calendarviews/agenda incidenceeditor-ng/individualmailcomponentfactory.cpp kontact/plugins korganizer/akonadicollectionview.cpp korganizer/koprefsdialog.cpp korganizer/views libkdepim/prefs

Christian Mollekopf mollekopf at kolabsys.com
Mon Dec 1 14:44:00 CET 2014


 accountwizard/ispdb/autoconfigkolabmail.cpp           |    2 
 accountwizard/ldap.cpp                                |   13 +++--
 accountwizard/setupautoconfigkolabfreebusy.cpp        |    9 ++-
 calendarsupport/kcalprefs.kcfg                        |   16 ++++++
 calendarviews/agenda/agendaview.cpp                   |    4 +
 incidenceeditor-ng/individualmailcomponentfactory.cpp |   19 ++++++-
 kontact/plugins/korganizer/CMakeLists.txt             |   46 +++++++++++++-----
 korganizer/akonadicollectionview.cpp                  |    5 +
 korganizer/koprefsdialog.cpp                          |   11 +++-
 korganizer/views/collectionview/calendardelegate.cpp  |    9 ++-
 korganizer/views/collectionview/controller.cpp        |   24 ++++++---
 korganizer/views/collectionview/controller.h          |    2 
 korganizer/views/collectionview/reparentingmodel.cpp  |   14 ++++-
 korganizer/views/collectionview/reparentingmodel.h    |    1 
 libkdepim/prefs/kprefsdialog.cpp                      |    7 ++
 libkdepim/prefs/kprefsdialog.h                        |    7 ++
 16 files changed, 147 insertions(+), 42 deletions(-)

New commits:
commit 14d0e331b5ae60470053bf1a29f0b43dec7be8d5
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Wed Nov 26 12:42:49 2014 +0100

    Fixing reparentingmodel
    
    Make sure that the correct line is deleted and that the model is in good
    shape also after removing the line. To be able to use modeltest.

diff --git a/korganizer/views/collectionview/reparentingmodel.cpp b/korganizer/views/collectionview/reparentingmodel.cpp
index 15049e9..5a3e3fe 100644
--- a/korganizer/views/collectionview/reparentingmodel.cpp
+++ b/korganizer/views/collectionview/reparentingmodel.cpp
@@ -61,7 +61,7 @@ bool ReparentingModel::Node::operator==(const ReparentingModel::Node &node) cons
     return (this == &node);
 }
 
-void ReparentingModel::Node::reparent(ReparentingModel::Node *node)
+ReparentingModel::Node::Ptr ReparentingModel::Node::searchNode(ReparentingModel::Node *node)
 {
     Node::Ptr nodePtr;
     if (node->parent) {
@@ -79,6 +79,13 @@ void ReparentingModel::Node::reparent(ReparentingModel::Node *node)
     } else {
         nodePtr = Node::Ptr(node);
     }
+
+    return nodePtr;
+}
+
+void ReparentingModel::Node::reparent(ReparentingModel::Node *node)
+{
+    Node::Ptr nodePtr = searchNode(node);
     addChild(nodePtr);
 }
 
@@ -719,14 +726,15 @@ void ReparentingModel::reparentSourceNodes(const Node::Ptr &proxyNode)
 
             //WARNING: While a beginMoveRows/endMoveRows would be more suitable, QSortFilterProxyModel can't deal with that. Therefore we
             //cannot use them.
-            const int oldRow = n->sourceIndex.row();
+            const int oldRow = n->row();
             beginRemoveRows(index(n->parent), oldRow, oldRow);
+            Node::Ptr nodePtr = proxyNode->searchNode(n);
             //We lie about the row being removed already, but the view can deal with that better than if we call endRemoveRows after beginInsertRows
             endRemoveRows();
 
             const int newRow = proxyNode->children.size();
             beginInsertRows(index(proxyNode.data()), newRow, newRow);
-            proxyNode->reparent(n);
+            proxyNode->addChild(nodePtr);
             endInsertRows();
             Q_ASSERT(validateNode(n));
         }
diff --git a/korganizer/views/collectionview/reparentingmodel.h b/korganizer/views/collectionview/reparentingmodel.h
index 0f77c45..9455915 100644
--- a/korganizer/views/collectionview/reparentingmodel.h
+++ b/korganizer/views/collectionview/reparentingmodel.h
@@ -53,6 +53,7 @@ public:
         virtual void update(const Node::Ptr &node);
 
         bool isSourceNode() const;
+        Node::Ptr searchNode(Node *node);
         void reparent(Node *node);
         void addChild(const Node::Ptr &node);
         int row() const;


commit fe0cc19dbbcd546cb36c799e0bfc1c14751a1a73
Author: Christian Mollekopf <chrigi_1 at fastmail.fm>
Date:   Mon Dec 1 13:06:20 2014 +0100

    If we only use one result that should be the limit for the query.

diff --git a/korganizer/views/collectionview/controller.cpp b/korganizer/views/collectionview/controller.cpp
index 731e902..04fd3cb 100644
--- a/korganizer/views/collectionview/controller.cpp
+++ b/korganizer/views/collectionview/controller.cpp
@@ -658,7 +658,7 @@ void Controller::addPerson(const Person &person)
         Baloo::PIM::CollectionQuery query;
         query.setNamespace(QStringList() << QLatin1String("usertoplevel"));
         query.pathMatches(QLatin1String("/Other Users/")+p.uid);
-        query.setLimit(2);
+        query.setLimit(1);
         Baloo::PIM::ResultIterator it = query.exec();
         Akonadi::Collection::List collections;
         while (it.next()) {


commit 3ea6081c71ee30296600a1ea5716ab1ad05878a8
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Wed Nov 26 13:12:33 2014 +0100

    Search for collection if a user is enabled.
    
    If a User is enabled from search, search for a matching collection is
    non was found before.
    
    KOLAB: #3967

diff --git a/korganizer/views/collectionview/controller.cpp b/korganizer/views/collectionview/controller.cpp
index b3ccea2..731e902 100644
--- a/korganizer/views/collectionview/controller.cpp
+++ b/korganizer/views/collectionview/controller.cpp
@@ -652,27 +652,31 @@ void Controller::onPersonCollectionsFetched(KJob* job)
 void Controller::addPerson(const Person &person)
 {
     kDebug() << person.uid << person.name << person.rootCollection;
+    Person p = person;
 
     if (person.rootCollection == -1) {
         Baloo::PIM::CollectionQuery query;
         query.setNamespace(QStringList() << QLatin1String("usertoplevel"));
-        query.pathMatches(QLatin1String("/Other Users/")+person.uid);
-        query.setLimit(200);
+        query.pathMatches(QLatin1String("/Other Users/")+p.uid);
+        query.setLimit(2);
         Baloo::PIM::ResultIterator it = query.exec();
         Akonadi::Collection::List collections;
         while (it.next()) {
             collections << Akonadi::Collection(it.id());
         }
-        kDebug() << "Found collections " << collections.size() << "for" << person.name;
-        //TODO: use the found collection and update attribute
+        kDebug() << "Found collections " << collections.size() << "for" << p.name;
+        if (collections.size() == 1) {
+            kDebug() << "Set rootCollection=" << collections.at(0).id();
+            p.rootCollection = collections.at(0).id();
+        }
     }
 
-    PersonNode *personNode = new PersonNode(*mPersonModel, person);
+    PersonNode *personNode = new PersonNode(*mPersonModel, p);
     personNode->setChecked(true);
     mPersonModel->addNode(ReparentingModel::Node::Ptr(personNode));
 
-    if (person.rootCollection > -1) {
-        setCollectionState(Akonadi::Collection(person.rootCollection), Referenced, true);
+    if (p.rootCollection > -1) {
+        setCollectionState(Akonadi::Collection(p.rootCollection), Referenced, true);
     } else {
         kDebug() << "well this only a ldap search object without a collection";
         //TODO: use freebusy data into calendar


commit a237a655677af9dfcb6be07d80a5f767a78a3ef7
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Wed Nov 26 12:57:08 2014 +0100

    get the correct collection for collection/Person node
    * use the collection that is assosated with the currect index for quickview
    * we need the correct collection also for enable the correcdt collection
      for the saarch of personal calendars.
    
    KOLAB: #3934

diff --git a/korganizer/akonadicollectionview.cpp b/korganizer/akonadicollectionview.cpp
index 19e3eae..5d27815 100644
--- a/korganizer/akonadicollectionview.cpp
+++ b/korganizer/akonadicollectionview.cpp
@@ -1076,12 +1076,12 @@ void AkonadiCollectionView::onAction(const QModelIndex &index, int a)
                 person = i.data(PersonRole);
             }
             if (person.isValid()) {
-                Quickview *quickview = new Quickview(person.value<Person>(), Akonadi::Collection(person.value<Person>().rootCollection));
+                Quickview *quickview = new Quickview(person.value<Person>(), CalendarSupport::collectionFromIndex(index));
                 quickview->setAttribute(Qt::WA_DeleteOnClose, true);
                 quickview->show();
             } else {
                 kWarning() << "No valid person found for" << index;
-                Quickview *quickview = new Quickview(Person(), index.data(CollectionRole).value<Akonadi::Collection>());
+                Quickview *quickview = new Quickview(Person(), CalendarSupport::collectionFromIndex(index));
                 quickview->setAttribute(Qt::WA_DeleteOnClose, true);
                 quickview->show();
             }
diff --git a/korganizer/views/collectionview/controller.cpp b/korganizer/views/collectionview/controller.cpp
index 0500b60..b3ccea2 100644
--- a/korganizer/views/collectionview/controller.cpp
+++ b/korganizer/views/collectionview/controller.cpp
@@ -88,7 +88,7 @@ QVariant CollectionNode::data(int role) const
     if (role == IsSearchResultRole) {
         return isSearchNode;
     }
-    if (role == CollectionRole) {
+    if (role == CollectionRole || role == Akonadi::EntityTreeModel::CollectionRole) {
         return QVariant::fromValue(mCollection);
     }
     if (role == NodeTypeRole) {
@@ -182,6 +182,10 @@ QVariant PersonNode::data(int role) const
     if (role == NodeTypeRole) {
         return PersonNodeRole;
     }
+    if (role == CollectionRole || role == Akonadi::EntityTreeModel::CollectionRole) {
+        return QVariant::fromValue(Akonadi::Collection(mPerson.rootCollection));
+    }
+
     return QVariant();
 }
 


commit 9128851fcc31ba6047921dcd0216f29392ab8806
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Sat Nov 22 10:17:32 2014 +0100

    Fixing Quickview
    
    * show quickview for own calendars
    * and open quickview for declined/open invitations
    
    KOLAB: 3928
    KOLAB: 3929

diff --git a/korganizer/akonadicollectionview.cpp b/korganizer/akonadicollectionview.cpp
index e128288..19e3eae 100644
--- a/korganizer/akonadicollectionview.cpp
+++ b/korganizer/akonadicollectionview.cpp
@@ -1081,6 +1081,9 @@ void AkonadiCollectionView::onAction(const QModelIndex &index, int a)
                 quickview->show();
             } else {
                 kWarning() << "No valid person found for" << index;
+                Quickview *quickview = new Quickview(Person(), index.data(CollectionRole).value<Akonadi::Collection>());
+                quickview->setAttribute(Qt::WA_DeleteOnClose, true);
+                quickview->show();
             }
         }
         break;
diff --git a/korganizer/views/collectionview/calendardelegate.cpp b/korganizer/views/collectionview/calendardelegate.cpp
index 087885d..6633c93 100644
--- a/korganizer/views/collectionview/calendardelegate.cpp
+++ b/korganizer/views/collectionview/calendardelegate.cpp
@@ -102,10 +102,13 @@ QList<StyledCalendarDelegate::Action> StyledCalendarDelegate::getActions(const Q
     Qt::CheckState enabled = static_cast<Qt::CheckState>(index.data(EnabledRole).toInt());
     // kDebug() << index.data().toString() << enabled;
     const bool isSearchCollection = col.resource().startsWith(QLatin1String("akonadi_search_resource"));
-    const bool isToplevelSearchCollection = (col.id() == 1);
+    const bool isKolabCollection = col.resource().startsWith(QLatin1String("akonadi_kolab_resource"));
+    const bool isTopLevelCollection = (col.parentCollection() == Akonadi::Collection::root());
+    const bool isToplevelSearchCollection = (isTopLevelCollection && isSearchCollection);
+    const bool isToplevelKolabCollection = (isTopLevelCollection && isKolabCollection);
 
     QList<Action> buttons;
-    if (!isSearchCollection) {
+    if (!isSearchCollection && !isToplevelKolabCollection) {
         if (isSearchResult) {
             buttons << AddToList;
         } else {
@@ -124,7 +127,7 @@ QList<StyledCalendarDelegate::Action> StyledCalendarDelegate::getActions(const Q
             }
         }
     }
-    if (isPersonNode(index) || (isSearchCollection && !isToplevelSearchCollection)) {
+    if (!isToplevelSearchCollection && !isToplevelKolabCollection) {
         buttons << Quickview;
     }
     return buttons;
diff --git a/korganizer/views/collectionview/controller.h b/korganizer/views/collectionview/controller.h
index 2dc7c71..4422ba8 100644
--- a/korganizer/views/collectionview/controller.h
+++ b/korganizer/views/collectionview/controller.h
@@ -52,8 +52,8 @@ struct Person
     QString uid;
     QString ou;
     QString mail;
-    bool updateDisplayName;
     Akonadi::Collection::Id rootCollection;
+    bool updateDisplayName;
     
     //FIXME not sure we actually require those two
     QStringList folderPaths;


commit 4f6e98fc774f956fafba0ed8b8f07baa309614c5
Merge: 5bcbb0b 0f41be4
Author: Christian Mollekopf <chrigi_1 at fastmail.fm>
Date:   Mon Dec 1 12:38:24 2014 +0100

    Merge remote-tracking branch 'kolab/dev/disable_todoview' into kolab/integration/4.13.0



commit 5bcbb0befd61a574629d77f50d9f309a42bd1971
Author: Christian Mollekopf <chrigi_1 at fastmail.fm>
Date:   Mon Dec 1 12:37:46 2014 +0100

    "send email" in invitation window should not be visible as default
    
    Make it possible to disable the question, if qn email should be sent for
    invitations.
    
    KOLAB: #3484

diff --git a/calendarsupport/kcalprefs.kcfg b/calendarsupport/kcalprefs.kcfg
index bb13cd1..737adb4 100644
--- a/calendarsupport/kcalprefs.kcfg
+++ b/calendarsupport/kcalprefs.kcfg
@@ -101,6 +101,22 @@
       <default>true</default>
     </entry>
 
+    <entry type="Enum" key="Send Policy" name="SendPolicy">
+      <label>Default Policy what to do with invitations to other users:</label>
+      <choices>
+        <choice name="InvitationPolicySend">
+          <label>Send mails without asking.</label>
+        </choice>
+        <choice name="InvitationPolicyAsk">
+          <label>Ask for every individual attendee what to do.</label>
+        </choice>
+        <choice name="InvitationPolicyDontSend">
+          <label>Do not send invitation mails at all (This can break group scheduling for iTip compliant clients).</label>
+        </choice>
+      </choices>
+      <default>InvitationPolicySend</default>
+    </entry>
+
     <entry type="StringList" name="AdditionalMails">
     </entry>
   </group>
diff --git a/incidenceeditor-ng/individualmailcomponentfactory.cpp b/incidenceeditor-ng/individualmailcomponentfactory.cpp
index fec1f09..e46ddd7 100644
--- a/incidenceeditor-ng/individualmailcomponentfactory.cpp
+++ b/incidenceeditor-ng/individualmailcomponentfactory.cpp
@@ -20,6 +20,7 @@
 #include "individualmailcomponentfactory.h"
 #include "individualmaildialog.h"
 
+#include <calendarsupport/kcalprefs.h>
 #include <KPIMUtils/Email>
 
 #include <KMessageBox>
@@ -159,9 +160,21 @@ void IndividualMailITIPHandlerDialogDelegate::openDialog(const QString &question
         emit dialogClosed(KMessageBox::No, mMethod, mIncidence);
         break;
     default:
-        mDialog = new IndividualMailDialog(question, attendees, buttonYes, buttonNo, mParent);
-        connect(mDialog, SIGNAL(finished(int)), SLOT(onDialogClosed(int)));
-        mDialog->show();
+        switch (CalendarSupport::KCalPrefs::instance()->sendPolicy()) {
+        case(CalendarSupport::KCalPrefs::InvitationPolicySend):
+            emit setUpdate(mIncidence, attendees);
+            emit dialogClosed(KMessageBox::Yes, mMethod, mIncidence);
+            break;
+        case(CalendarSupport::KCalPrefs::InvitationPolicyDontSend):
+            emit dialogClosed(KMessageBox::No, mMethod, mIncidence);
+            break;
+        case(CalendarSupport::KCalPrefs::InvitationPolicyAsk):
+        default:
+            mDialog = new IndividualMailDialog(question, attendees, buttonYes, buttonNo, mParent);
+            connect(mDialog, SIGNAL(finished(int)), SLOT(onDialogClosed(int)));
+            mDialog->show();
+            break;
+        }
         break;
     }
 }
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 3ecbb79..06bb6cc 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1076,18 +1076,23 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling( const KComponentData
     addWidBool( CalendarSupport::KCalPrefs::instance()->useGroupwareCommunicationItem(), topFrame );
   topLayout->addWidget( useGroupwareBool->checkBox(), 0, 0, 1, 2 );
 
+  KPIM::KPrefsWidCombo *defaultSendPolicy =
+    addWidCombo( CalendarSupport::KCalPrefs::instance()->sendPolicyItem(), topFrame );
+  topLayout->addWidget( defaultSendPolicy->label(), 1, 0, 1, 2 );
+  topLayout->addWidget( defaultSendPolicy->comboBox(), 2, 0, 1, 2 );
+
   KPIM::KPrefsWidBool *bcc =
     addWidBool( Akonadi::CalendarSettings::self()->bccItem(), topFrame );
-  topLayout->addWidget( bcc->checkBox(), 1, 0, 1, 2 );
+  topLayout->addWidget( bcc->checkBox(), 3, 0, 1, 2 );
 
   QLabel *aTransportLabel = new QLabel(
     i18nc( "@label", "Mail transport:" ), topFrame );
-  topLayout->addWidget( aTransportLabel, 2, 0, 1, 2 );
+  topLayout->addWidget( aTransportLabel, 4, 0, 1, 2 );
 
   MailTransport::TransportManagementWidget *tmw =
     new MailTransport::TransportManagementWidget( topFrame );
   tmw->layout()->setContentsMargins( 0, 0, 0, 0 );
-  topLayout->addWidget( tmw, 3, 0, 1, 2 );
+  topLayout->addWidget( tmw, 5, 0, 1, 2 );
 
   //topLayout->setRowStretch( 2, 1 );
 
diff --git a/libkdepim/prefs/kprefsdialog.cpp b/libkdepim/prefs/kprefsdialog.cpp
index ba96a9e..18aeb9a 100644
--- a/libkdepim/prefs/kprefsdialog.cpp
+++ b/libkdepim/prefs/kprefsdialog.cpp
@@ -488,7 +488,7 @@ KPrefsWidCombo::KPrefsWidCombo( KConfigSkeleton::ItemEnum *item, QWidget *parent
     : mItem( item )
 {
     KHBox *hbox = new KHBox( parent );
-    new QLabel( mItem->label(), hbox );
+    mLabel = new QLabel( mItem->label(), hbox );
     mCombo = new KComboBox( hbox );
     connect( mCombo, SIGNAL(activated(int)), SIGNAL(changed()) );
 }
@@ -519,6 +519,11 @@ KComboBox *KPrefsWidCombo::comboBox()
     return mCombo;
 }
 
+QLabel *KPrefsWidCombo::label()
+{
+    return mLabel;
+}
+
 KPrefsWidString::KPrefsWidString( KConfigSkeleton::ItemString *item, QWidget *parent,
                                   KLineEdit::EchoMode echomode )
     : mItem( item )
diff --git a/libkdepim/prefs/kprefsdialog.h b/libkdepim/prefs/kprefsdialog.h
index ef1bef4..7322019 100644
--- a/libkdepim/prefs/kprefsdialog.h
+++ b/libkdepim/prefs/kprefsdialog.h
@@ -455,11 +455,18 @@ public:
     void writeConfig();
 
     KComboBox *comboBox();
+
+    /**
+      Return QLabel used by this control element.
+    */
+    QLabel *label();
+
     QList<QWidget *> widgets() const;
 
 private:
     KConfigSkeleton::ItemEnum *mItem;
     KComboBox *mCombo;
+    QLabel *mLabel;
 };
 
 /**


commit 8f51a2a4b6b0d6a6cf2fa23e9adbd9c4794ceb92
Merge: 8390e5b 36fdd84
Author: Christian Mollekopf <chrigi_1 at fastmail.fm>
Date:   Mon Dec 1 12:33:30 2014 +0100

    Merge remote-tracking branch 'kolab/dev/autoconfig_nxdomain' into kolab/integration/4.13.0



commit 0f41be41eff0807b1b04c8f237c5c707cf8ec802
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Sat Nov 22 10:05:47 2014 +0100

    Disable todo plugin for kontact
    
    like add_optional_sub_directory the plugin can be disabled with:
    DISABLE_ALL_OPTIONAL_PLUGINS and can be disabled bia BUILD_todo /
    BUILD_kcm_todo

diff --git a/kontact/plugins/korganizer/CMakeLists.txt b/kontact/plugins/korganizer/CMakeLists.txt
index c748c63..28af69f 100644
--- a/kontact/plugins/korganizer/CMakeLists.txt
+++ b/kontact/plugins/korganizer/CMakeLists.txt
@@ -1,3 +1,8 @@
+IF(DISABLE_ALL_OPTIONAL_PLUGINS)
+  SET(_DEFAULT_OPTION_VALUE FALSE)
+ELSE(DISABLE_ALL_OPTIONAL_PLUGINS)
+  SET(_DEFAULT_OPTION_VALUE TRUE)
+ENDIF(DISABLE_ALL_OPTIONAL_PLUGINS)
 
 include_directories(${CMAKE_SOURCE_DIR}/korganizer ${CMAKE_SOURCE_DIR}/korganizer/interfaces ${Boost_INCLUDE_DIRS})
 
@@ -15,15 +20,25 @@ kde4_add_plugin(kontact_korganizerplugin ${kontact_korganizerplugin_PART_SRCS})
 target_link_libraries(kontact_korganizerplugin akonadi-calendar ${KDEPIMLIBS_KCALUTILS_LIBS} ${KDE4_KPARTS_LIBS} ${KDEPIMLIBS_KABC_LIBS} ${KDEPIMLIBS_KCALCORE_LIBS} kdepim ${KDEPIMLIBS_KONTACTINTERFACE_LIBS} korganizerprivate calendarsupport akonadi-calendar)
 
 ########### next target ###############
+IF(DISABLE_ALL_OPTIONAL_PLUGINS  AND NOT DEFINED  BUILD_todo)
+  SET(_DEFAULT_OPTION_VALUE FALSE)
+ENDIF(DISABLE_ALL_OPTIONAL_PLUGINS  AND NOT DEFINED  BUILD_todo)
 
-set(kontact_todoplugin_PART_SRCS todoplugin.cpp todosummarywidget.cpp ${libcommon_SRCS})
+OPTION(BUILD_todo "Build todo plugin" ${_DEFAULT_OPTION_VALUE})
+IF(BUILD_todo)
 
-qt4_add_dbus_interfaces(kontact_todoplugin_PART_SRCS ${CMAKE_SOURCE_DIR}/korganizer/org.kde.Korganizer.Calendar.xml  ${CMAKE_SOURCE_DIR}/korganizer/org.kde.korganizer.Korganizer.xml)
+  set(kontact_todoplugin_PART_SRCS todoplugin.cpp todosummarywidget.cpp ${libcommon_SRCS})
 
-kde4_add_plugin(kontact_todoplugin ${kontact_todoplugin_PART_SRCS})
+  qt4_add_dbus_interfaces(kontact_todoplugin_PART_SRCS ${CMAKE_SOURCE_DIR}/korganizer/org.kde.Korganizer.Calendar.xml  ${CMAKE_SOURCE_DIR}/korganizer/org.kde.korganizer.Korganizer.xml)
 
-target_link_libraries(kontact_todoplugin akonadi-calendar ${KDE4_KPARTS_LIBS} ${KDEPIMLIBS_KABC_LIBS} kdepim ${KDEPIMLIBS_KONTACTINTERFACE_LIBS} ${KDEPIMLIBS_KCALCORE_LIBS} ${KDEPIMLIBS_KCALUTILS_LIBS} korganizerprivate calendarsupport akonadi-calendar)
+  kde4_add_plugin(kontact_todoplugin ${kontact_todoplugin_PART_SRCS})
 
+  target_link_libraries(kontact_todoplugin akonadi-calendar ${KDE4_KPARTS_LIBS} ${KDEPIMLIBS_KABC_LIBS} kdepim ${KDEPIMLIBS_KONTACTINTERFACE_LIBS} ${KDEPIMLIBS_KCALCORE_LIBS} ${KDEPIMLIBS_KCALUTILS_LIBS} korganizerprivate calendarsupport akonadi-calendar)
+
+  install(TARGETS kontact_todoplugin DESTINATION ${PLUGIN_INSTALL_DIR})
+  install(FILES todoplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kontact)
+
+ENDIF(BUILD_todo)
 ########### next target ###############
 
 set(kontact_journalplugin_PART_SRCS journalplugin.cpp ${libcommon_SRCS})
@@ -45,14 +60,23 @@ kde4_add_plugin(kcm_apptsummary ${kcm_apptsummary_PART_SRCS})
 target_link_libraries(kcm_apptsummary ${KDE4_KDEUI_LIBS} korganizerprivate ${KDEPIMLIBS_KCALUTILS_LIBS})
 
 ########### next target ###############
+IF(DISABLE_ALL_OPTIONAL_PLUGINS  AND NOT DEFINED  BUILD_kcm_todo)
+  SET(_DEFAULT_OPTION_VALUE FALSE)
+ENDIF(DISABLE_ALL_OPTIONAL_PLUGINS  AND NOT DEFINED  BUILD_kcm_todo)
+
+OPTION(BUILD_kcm_todo "Build kcm_todo plugin" ${_DEFAULT_OPTION_VALUE})
+IF(BUILD_kcm_todo)
+  set(kcm_todosummary_PART_SRCS kcmtodosummary.cpp)
 
-set(kcm_todosummary_PART_SRCS kcmtodosummary.cpp)
+  kde4_add_ui_files(kcm_todosummary_PART_SRCS todosummaryconfig_base.ui)
 
-kde4_add_ui_files(kcm_todosummary_PART_SRCS todosummaryconfig_base.ui)
+  kde4_add_plugin(kcm_todosummary ${kcm_todosummary_PART_SRCS})
 
-kde4_add_plugin(kcm_todosummary ${kcm_todosummary_PART_SRCS})
+  target_link_libraries(kcm_todosummary ${KDE4_KDEUI_LIBS})
 
-target_link_libraries(kcm_todosummary ${KDE4_KDEUI_LIBS})
+  install(TARGETS kcm_todosummary DESTINATION ${PLUGIN_INSTALL_DIR})
+  install(FILES kcmtodosummary.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+ENDIF(BUILD_kcm_todo)
 
 ########## Unit Test ###########
 add_subdirectory(tests)
@@ -60,13 +84,11 @@ add_subdirectory(tests)
 ########### install files ###############
 
 install(TARGETS kcm_apptsummary DESTINATION ${PLUGIN_INSTALL_DIR})
-install(TARGETS kcm_todosummary DESTINATION ${PLUGIN_INSTALL_DIR})
 install(TARGETS kontact_korganizerplugin DESTINATION ${PLUGIN_INSTALL_DIR})
-install(TARGETS kontact_todoplugin DESTINATION ${PLUGIN_INSTALL_DIR})
 install(TARGETS kontact_journalplugin DESTINATION ${PLUGIN_INSTALL_DIR})
 
-install(FILES korganizerplugin.desktop todoplugin.desktop journalplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kontact)
-install(FILES kcmapptsummary.desktop kcmtodosummary.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+install(FILES korganizerplugin.desktop journalplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kontact)
+install(FILES kcmapptsummary.desktop DESTINATION ${SERVICES_INSTALL_DIR})
 
 install(FILES korganizer.setdlg DESTINATION ${DATA_INSTALL_DIR}/kontact/ksettingsdialog)
 


commit a68d1ec2b9a93cbf7bb2651784f92f621797eb13
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Sat Nov 22 10:00:32 2014 +0100

    Quickview crashes while closing
    
    unregestier a nonvalid calendar won't work :)
    
    KOLAB: 3927

diff --git a/calendarviews/agenda/agendaview.cpp b/calendarviews/agenda/agendaview.cpp
index eddf0c7..eca73d0 100644
--- a/calendarviews/agenda/agendaview.cpp
+++ b/calendarviews/agenda/agendaview.cpp
@@ -834,7 +834,9 @@ void AgendaView::init( const QDate &start, const QDate &end )
 AgendaView::~AgendaView()
 {
   foreach(const ViewCalendar::Ptr &cal, d->mViewCalendar->mSubCalendars) {
-    cal->getCalendar()->unregisterObserver(d);
+    if (cal->getCalendar()) {
+      cal->getCalendar()->unregisterObserver(d);
+    }
   }
 
   delete d;


commit 36fdd847274062e47ae4ed350f6241a529f2287c
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Fri Nov 21 18:15:51 2014 +0100

    Load the correct informations from freebusy autoconfig for freebusy.
    
    The data that is stored in the autoconfig is a complete PATH aka.
    /freebusy/$EMAIL$.ifb and this one has to split to /freebusy/ and if we
    access via $USER$ or $EMAIL$.

diff --git a/accountwizard/setupautoconfigkolabfreebusy.cpp b/accountwizard/setupautoconfigkolabfreebusy.cpp
index d3657d6..52a1fe8 100644
--- a/accountwizard/setupautoconfigkolabfreebusy.cpp
+++ b/accountwizard/setupautoconfigkolabfreebusy.cpp
@@ -20,6 +20,8 @@
 #include "setupautoconfigkolabfreebusy.h"
 #include "configfile.h"
 
+#include <QFileInfo>
+
 #include <KLocalizedString>
 
 SetupAutoconfigKolabFreebusy::SetupAutoconfigKolabFreebusy(QObject *parent)
@@ -43,6 +45,7 @@ void SetupAutoconfigKolabFreebusy::fillFreebusyServer(int i, QObject *o) const
 {
     freebusy isp = mIspdb->freebusyServers().values()[i];
     ConfigFile *korganizer = qobject_cast<ConfigFile *>(o);
+    QFileInfo path =  QFileInfo(isp.path);
     QString url(QLatin1String("https://"));
 
     if (isp.socketType == Ispdb::None) {
@@ -60,11 +63,13 @@ void SetupAutoconfigKolabFreebusy::fillFreebusyServer(int i, QObject *o) const
         url += QLatin1Char('/');
     }
 
-    url += isp.path;
+    url += path.path();
+
+    bool fullDomainRetrieval = (path.baseName() == QLatin1String("$EMAIL$"));
 
     QString group(QLatin1String("FreeBusy Retrieve"));
 
-    korganizer->setConfig(group, QLatin1String("FreeBusyFullDomainRetrieval"), QLatin1String("true"));
+    korganizer->setConfig(group, QLatin1String("FreeBusyFullDomainRetrieval"),  QLatin1String(fullDomainRetrieval?"true":"false"));
     korganizer->setConfig(group, QLatin1String("FreeBusyRetrieveAuto"), QLatin1String("true"));
     korganizer->setConfig(group, QLatin1String("FreeBusyRetrieveUrl"), url);
     korganizer->setConfig(group, QLatin1String("FreeBusyRetrieverUser"), isp.username);


commit 4d87f017d4563d44748cce75633f5815f5d842f7
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Fri Nov 21 18:12:44 2014 +0100

    autoconfig.<domain> is not configured (NXDOMAIN) no fallback
    
    Actually try <domain>/.well-known if autoconfig.<domain> is not defined.
    
    KOLAB: #3918

diff --git a/accountwizard/ispdb/autoconfigkolabmail.cpp b/accountwizard/ispdb/autoconfigkolabmail.cpp
index 9bebdcc..591d934 100644
--- a/accountwizard/ispdb/autoconfigkolabmail.cpp
+++ b/accountwizard/ispdb/autoconfigkolabmail.cpp
@@ -46,6 +46,8 @@ void AutoconfigKolabMail::slotResult(KJob *job)
 {
     if (job->error()) {
         if (job->error() == KIO::ERR_INTERNAL_SERVER ||   // error 500
+                job->error() == KIO::ERR_UNKNOWN_HOST ||  // unknown host
+                job->error() == KIO::ERR_COULD_NOT_CONNECT ||
                 job->error() == KIO::ERR_DOES_NOT_EXIST) {    // error 404
             if (serverType() == DataBase) {
                 setServerType(IspAutoConfig);


commit a65479500eea53c3d9945456abb6c4ca619374b7
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Mon Nov 17 12:36:54 2014 +0100

    Accountwizard: Ldap, set the baseDN correctly if is not an email.
    
    If basedn is a valid dn, than do not pretend dn= a second time.
    Also make sure, that the hostname is written to the kmail2rc config and
    not a basedn string.
    
    KOLAB: #3913

diff --git a/accountwizard/ldap.cpp b/accountwizard/ldap.cpp
index bdd42cc..ded2bbf 100644
--- a/accountwizard/ldap.cpp
+++ b/accountwizard/ldap.cpp
@@ -64,7 +64,7 @@ void Ldap::create()
     return;
   }
 
-  const QString host = m_server;
+  QString host = m_server;
 
   // Figure out the basedn
   QString basedn = m_baseDn.isEmpty() ? host : m_baseDn;
@@ -78,16 +78,21 @@ void Ldap::create()
         if ( !h.isEmpty() )
           // The user did type in a domain on the email address. Use that
           basedn = h;
+          host = h;
       }
   }
-  { // while we're here, write default domain
+  if (!host.isEmpty()) {
+    // while we're here, write default domain
     KConfig c( QLatin1String("kmail2rc") );
     KConfigGroup group = c.group( "General" );
-    group.writeEntry( "Default domain", basedn );
+    group.writeEntry( "Default domain", host );
   }
 
   basedn.replace( QLatin1Char('.'), QLatin1String(",dc=") );
-  basedn.prepend( QLatin1String("dc=") );
+
+  if (!basedn.startsWith(QLatin1String("dc="))) {
+    basedn.prepend( QLatin1String("dc=") );
+  }
 
   // Set the changes
   KConfig *c = config();




More information about the commits mailing list