Branch 'dev/resourcemanagement' - 8 commits - incidenceeditor-ng/attendeetablemodel.cpp incidenceeditor-ng/CMakeLists.txt incidenceeditor-ng/dialogdesktop.ui incidenceeditor-ng/incidenceattendee.cpp incidenceeditor-ng/incidenceattendee.h incidenceeditor-ng/incidenceresource.cpp incidenceeditor-ng/ldaputils.cpp incidenceeditor-ng/ldaputils.h incidenceeditor-ng/resourceitem.cpp incidenceeditor-ng/resourceitem.h incidenceeditor-ng/resourcemanagement.cpp incidenceeditor-ng/resourcemanagement.h incidenceeditor-ng/resourcemanagement.ui incidenceeditor-ng/resourcemodel.cpp incidenceeditor-ng/tests

Sandro Knauß knauss at kolabsys.com
Wed Aug 6 15:24:16 CEST 2014


 incidenceeditor-ng/CMakeLists.txt         |    3 
 incidenceeditor-ng/attendeetablemodel.cpp |   24 +--
 incidenceeditor-ng/dialogdesktop.ui       |  226 +++++++++---------------------
 incidenceeditor-ng/incidenceattendee.cpp  |   28 ++-
 incidenceeditor-ng/incidenceattendee.h    |    3 
 incidenceeditor-ng/incidenceresource.cpp  |   17 +-
 incidenceeditor-ng/ldaputils.cpp          |   62 ++++++++
 incidenceeditor-ng/ldaputils.h            |   29 +++
 incidenceeditor-ng/resourceitem.cpp       |    1 
 incidenceeditor-ng/resourceitem.h         |    3 
 incidenceeditor-ng/resourcemanagement.cpp |  110 ++++++++++++--
 incidenceeditor-ng/resourcemanagement.h   |    9 +
 incidenceeditor-ng/resourcemanagement.ui  |  139 ++++++++++--------
 incidenceeditor-ng/resourcemodel.cpp      |    4 
 incidenceeditor-ng/tests/CMakeLists.txt   |    7 
 15 files changed, 411 insertions(+), 254 deletions(-)

New commits:
commit 9fde4a4ca8ef57800ef96b54b34f3603e304fa2f
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Wed Aug 6 15:20:09 2014 +0200

    Fix column width for attendee/resource tab

diff --git a/incidenceeditor-ng/incidenceattendee.cpp b/incidenceeditor-ng/incidenceattendee.cpp
index 1dd0e12..56084af 100644
--- a/incidenceeditor-ng/incidenceattendee.cpp
+++ b/incidenceeditor-ng/incidenceattendee.cpp
@@ -150,8 +150,7 @@ IncidenceAttendee::IncidenceAttendee( QWidget *parent, IncidenceDateTime *dateTi
   mAttendeeDelegate = new AttendeeLineEditDelegate(this);
   mAttendeeDelegate->setCompletionMode( KGlobalSettings::self()->completionMode() );
 
-  QHeaderView* headerView = mUi->mAttendeeTable->horizontalHeader();
-  headerView->setResizeMode(QHeaderView::ResizeToContents);
+
 
   mUi->mAttendeeTable->setItemDelegateForColumn(AttendeeTableModel::Role, roleDelegate());
   mUi->mAttendeeTable->setItemDelegateForColumn(AttendeeTableModel::FullName, attendeeDelegate());
@@ -709,10 +708,15 @@ AttendeeLineEditDelegate *IncidenceAttendee::attendeeDelegate()
 void IncidenceAttendee::filterLayoutChanged()
 {
 #ifndef KDEPIM_MOBILE_UI
-  mUi->mAttendeeTable->setColumnHidden(AttendeeTableModel::CuType, true);
-  mUi->mAttendeeTable->setColumnHidden(AttendeeTableModel::Name, true);
-  mUi->mAttendeeTable->setColumnHidden(AttendeeTableModel::Email, true);
-  mUi->mAttendeeTable->setColumnHidden(AttendeeTableModel::Available, true);
+    QHeaderView* headerView = mUi->mAttendeeTable->horizontalHeader();
+    headerView->setResizeMode(AttendeeTableModel::Role,  QHeaderView::ResizeToContents);
+    headerView->setResizeMode(AttendeeTableModel::FullName, QHeaderView::Stretch);
+    headerView->setResizeMode(AttendeeTableModel::Status,  QHeaderView::ResizeToContents);
+    headerView->setResizeMode(AttendeeTableModel::Response,  QHeaderView::ResizeToContents);
+    headerView->setSectionHidden(AttendeeTableModel::CuType, true);
+    headerView->setSectionHidden(AttendeeTableModel::Name, true);
+    headerView->setSectionHidden(AttendeeTableModel::Email, true);
+    headerView->setSectionHidden(AttendeeTableModel::Available, true);
 #endif
 }
 
diff --git a/incidenceeditor-ng/incidenceresource.cpp b/incidenceeditor-ng/incidenceresource.cpp
index 5fc1a78..23e229b 100644
--- a/incidenceeditor-ng/incidenceresource.cpp
+++ b/incidenceeditor-ng/incidenceresource.cpp
@@ -92,8 +92,6 @@ IncidenceResource::IncidenceResource(IncidenceAttendee* ieAttendee, Ui::EventOrT
     filterProxyModel->setDynamicSortFilter(true);
     filterProxyModel->setSourceModel(dataModel);
 
-    QHeaderView* headerView = mUi->mResourcesTable->horizontalHeader();
-    headerView->setResizeMode(QHeaderView::ResizeToContents);
 
     mUi->mResourcesTable->setModel(filterProxyModel);
     mUi->mResourcesTable->setItemDelegateForColumn(AttendeeTableModel::Role, ieAttendee->roleDelegate());
@@ -149,9 +147,15 @@ void IncidenceResource::findResources()
 void IncidenceResource::layoutChanged()
 {
 #ifndef KDEPIM_MOBILE_UI
-    mUi->mResourcesTable->setColumnHidden(AttendeeTableModel::CuType, true);
-    mUi->mResourcesTable->setColumnHidden(AttendeeTableModel::Name, true);
-    mUi->mResourcesTable->setColumnHidden(AttendeeTableModel::Email, true);
+    QHeaderView* headerView = mUi->mResourcesTable->horizontalHeader();
+    headerView->setSectionHidden(AttendeeTableModel::CuType, true);
+    headerView->setSectionHidden(AttendeeTableModel::Name, true);
+    headerView->setSectionHidden(AttendeeTableModel::Email, true);
+    headerView->setResizeMode(AttendeeTableModel::Role,  QHeaderView::ResizeToContents);
+    headerView->setResizeMode(AttendeeTableModel::FullName, QHeaderView::Stretch);
+    headerView->setResizeMode(AttendeeTableModel::Available,  QHeaderView::ResizeToContents);
+    headerView->setResizeMode(AttendeeTableModel::Status,  QHeaderView::ResizeToContents);
+    headerView->setResizeMode(AttendeeTableModel::Response,  QHeaderView::ResizeToContents);
 #endif
 }
 


commit dfcceb852330e6c85838d2f27c828afb529ee1d6
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Wed Aug 6 15:18:43 2014 +0200

    dalogdesktop made book resource via Enter

diff --git a/incidenceeditor-ng/dialogdesktop.ui b/incidenceeditor-ng/dialogdesktop.ui
index 13ee780..a2a7063 100644
--- a/incidenceeditor-ng/dialogdesktop.ui
+++ b/incidenceeditor-ng/dialogdesktop.ui
@@ -858,6 +858,9 @@
           <layout class="QHBoxLayout" name="horizontalLayout_11">
            <item>
             <widget class="KLineEdit" name="mNewResource">
+             <property name="trapEnterKeyEvent" stdset="0">
+              <bool>true</bool>
+             </property>
              <property name="showClearButton" stdset="0">
               <bool>true</bool>
              </property>
@@ -868,6 +871,12 @@
              <property name="text">
               <string>Book resource</string>
              </property>
+             <property name="autoDefault">
+              <bool>false</bool>
+             </property>
+             <property name="default">
+              <bool>false</bool>
+             </property>
             </widget>
            </item>
            <item>
@@ -875,10 +884,13 @@
              <property name="orientation">
               <enum>Qt::Horizontal</enum>
              </property>
+             <property name="sizeType">
+              <enum>QSizePolicy::Preferred</enum>
+             </property>
              <property name="sizeHint" stdset="0">
               <size>
                <width>40</width>
-               <height>20</height>
+               <height>0</height>
               </size>
              </property>
             </spacer>


commit fd18ef7b1a95851396628be7d04284550020b538
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Wed Aug 6 15:17:25 2014 +0200

    available status for attendeetablemodel

diff --git a/incidenceeditor-ng/attendeetablemodel.cpp b/incidenceeditor-ng/attendeetablemodel.cpp
index 4ad6b05..0fb3074 100644
--- a/incidenceeditor-ng/attendeetablemodel.cpp
+++ b/incidenceeditor-ng/attendeetablemodel.cpp
@@ -54,7 +54,11 @@ QVariant AttendeeTableModel::data(const QModelIndex &index, int role) const
         case FullName:
             return attendeeList[index.row()]->fullName();
         case Available:
-            return 0;//attendeeList.at(index.row()).available;
+            if (role == Qt::DisplayRole) {
+                return i18n("Unknown");
+            } else {
+                return 0;  //attendeeList.at(index.row()).available;
+            }
         case Status:
             return attendeeList[index.row()]->status();
         case CuType:


commit 592f1fb883998f9cc4f460fc51f88ef67d1669cf
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Wed Aug 6 13:26:20 2014 +0200

    Localize resousemanagement

diff --git a/incidenceeditor-ng/CMakeLists.txt b/incidenceeditor-ng/CMakeLists.txt
index 47b7731..ac293dc 100644
--- a/incidenceeditor-ng/CMakeLists.txt
+++ b/incidenceeditor-ng/CMakeLists.txt
@@ -65,6 +65,7 @@ set(incidenceeditors_ng_shared_LIB_SRCS
   resourcemanagement.cpp
   resourceitem.cpp
   resourcemodel.cpp
+  ldaputils.cpp
   attendeetablemodel.cpp
   attendeecomboboxdelegate.cpp
 )
@@ -99,6 +100,7 @@ target_link_libraries(incidenceeditorsng
   akonadi-calendar
   ${QT_QTCORE_LIBRARY}
   ${QT_QTGUI_LIBRARY}
+  ${QJSON_LIBRARIES}
   ${KDE4_KDEUI_LIBS}
   ${KDEPIMLIBS_KCALCORE_LIBS}
   ${KDEPIMLIBS_KCALUTILS_LIBS}
@@ -149,6 +151,7 @@ install(TARGETS incidenceeditorsng ${INSTALL_TARGETS_DEFAULT_ARGS})
     kdgantt2
     ${KDEPIMLIBS_KCALUTILS_LIBS}
     ${KDEPIMLIBS_KCALCORE_LIBS}
+    ${QJSON_LIBRARIES}
   )
 
   set_target_properties(incidenceeditorsngmobile PROPERTIES
diff --git a/incidenceeditor-ng/attendeetablemodel.cpp b/incidenceeditor-ng/attendeetablemodel.cpp
index a3242e8..4ad6b05 100644
--- a/incidenceeditor-ng/attendeetablemodel.cpp
+++ b/incidenceeditor-ng/attendeetablemodel.cpp
@@ -1,5 +1,7 @@
 #include "attendeetablemodel.h"
 
+#include <klocalizedstring.h>
+
 #include <KCalCore/Attendee>
 #include <KPIMUtils/Email>
 
@@ -125,21 +127,21 @@ QVariant AttendeeTableModel::headerData(int section, Qt::Orientation orientation
     if (orientation == Qt::Horizontal) {
         switch (section) {
         case Role:
-            return QString("role");
+            return i18nc("vcard attendee role", "Role");
         case FullName:
-            return QString("fullname");
+            return i18nc("attendees  (name+emailaddress)",  "Fullname");
         case Available:
-            return QString("available");
+            return i18nc("is attendee available for incidence", "Available");
         case Status:
-            return QString("status");
+          return i18nc("Status of attendee in an incidence (accepted, declined, delegated, ...)", "Status");
         case CuType:
-            return QString("cuType");
+            return i18nc("Type of resource (vCard attribute)", "cuType");
         case Response:
-            return QString("response");
+            return i18nc("has attendee to respond to the invitation", "Response");
         case Name:
-            return QString("name");
+            return i18nc("attendee name", "name");
         case Email:
-            return QString("email");
+            return i18nc("attendee email",  "email");
         }
     }
 
diff --git a/incidenceeditor-ng/dialogdesktop.ui b/incidenceeditor-ng/dialogdesktop.ui
index 2a10c51..13ee780 100644
--- a/incidenceeditor-ng/dialogdesktop.ui
+++ b/incidenceeditor-ng/dialogdesktop.ui
@@ -13,16 +13,7 @@
   <layout class="QVBoxLayout" name="mainVerticalLayout">
    <item>
     <layout class="QGridLayout" name="gridLayout">
-     <property name="leftMargin">
-      <number>0</number>
-     </property>
-     <property name="topMargin">
-      <number>0</number>
-     </property>
-     <property name="rightMargin">
-      <number>0</number>
-     </property>
-     <property name="bottomMargin">
+     <property name="margin">
       <number>0</number>
      </property>
      <item row="0" column="0">
@@ -50,16 +41,7 @@
      <item row="1" column="1">
       <widget class="QWidget" name="mInvitationBar" native="true">
        <layout class="QHBoxLayout" name="horizontalLayout_10">
-        <property name="leftMargin">
-         <number>0</number>
-        </property>
-        <property name="topMargin">
-         <number>0</number>
-        </property>
-        <property name="rightMargin">
-         <number>0</number>
-        </property>
-        <property name="bottomMargin">
+        <property name="margin">
          <number>0</number>
         </property>
         <item>
@@ -213,16 +195,7 @@
      <item row="5" column="1">
       <widget class="QWidget" name="mCompletionPriorityWidget" native="true">
        <layout class="QHBoxLayout" name="horizontalLayout_8">
-        <property name="leftMargin">
-         <number>0</number>
-        </property>
-        <property name="topMargin">
-         <number>0</number>
-        </property>
-        <property name="rightMargin">
-         <number>0</number>
-        </property>
-        <property name="bottomMargin">
+        <property name="margin">
          <number>0</number>
         </property>
         <item>
@@ -809,16 +782,7 @@
            </property>
            <widget class="QWidget" name="page">
             <layout class="QGridLayout" name="gridLayout_2">
-             <property name="leftMargin">
-              <number>0</number>
-             </property>
-             <property name="topMargin">
-              <number>0</number>
-             </property>
-             <property name="rightMargin">
-              <number>0</number>
-             </property>
-             <property name="bottomMargin">
+             <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="0">
@@ -841,16 +805,7 @@
            </widget>
            <widget class="QWidget" name="page_2">
             <layout class="QGridLayout" name="gridLayout_3">
-             <property name="leftMargin">
-              <number>0</number>
-             </property>
-             <property name="topMargin">
-              <number>0</number>
-             </property>
-             <property name="rightMargin">
-              <number>0</number>
-             </property>
-             <property name="bottomMargin">
+             <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="0">
@@ -902,7 +857,11 @@
          <item row="1" column="0">
           <layout class="QHBoxLayout" name="horizontalLayout_11">
            <item>
-            <widget class="KLineEdit" name="mNewResource"/>
+            <widget class="KLineEdit" name="mNewResource">
+             <property name="showClearButton" stdset="0">
+              <bool>true</bool>
+             </property>
+            </widget>
            </item>
            <item>
             <widget class="QPushButton" name="mBookResourceButton">
@@ -1178,32 +1137,14 @@
            <widget class="QWidget" name="never_page"/>
            <widget class="QWidget" name="daily_page">
             <layout class="QGridLayout" name="gridLayout_11">
-             <property name="leftMargin">
-              <number>0</number>
-             </property>
-             <property name="topMargin">
-              <number>0</number>
-             </property>
-             <property name="rightMargin">
-              <number>0</number>
-             </property>
-             <property name="bottomMargin">
+             <property name="margin">
               <number>0</number>
              </property>
             </layout>
            </widget>
            <widget class="QWidget" name="weekly_page">
             <layout class="QGridLayout" name="gridLayout_4">
-             <property name="leftMargin">
-              <number>0</number>
-             </property>
-             <property name="topMargin">
-              <number>0</number>
-             </property>
-             <property name="rightMargin">
-              <number>0</number>
-             </property>
-             <property name="bottomMargin">
+             <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="0">
@@ -1223,16 +1164,7 @@
            </widget>
            <widget class="QWidget" name="Monthly">
             <layout class="QGridLayout" name="gridLayout_6">
-             <property name="leftMargin">
-              <number>0</number>
-             </property>
-             <property name="topMargin">
-              <number>0</number>
-             </property>
-             <property name="rightMargin">
-              <number>0</number>
-             </property>
-             <property name="bottomMargin">
+             <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="0">
@@ -1265,16 +1197,7 @@
            </widget>
            <widget class="QWidget" name="yearly_page">
             <layout class="QGridLayout" name="gridLayout_7">
-             <property name="leftMargin">
-              <number>0</number>
-             </property>
-             <property name="topMargin">
-              <number>0</number>
-             </property>
-             <property name="rightMargin">
-              <number>0</number>
-             </property>
-             <property name="bottomMargin">
+             <property name="margin">
               <number>0</number>
              </property>
              <item row="0" column="0">
@@ -1366,32 +1289,14 @@
              </property>
              <widget class="QWidget" name="no_end">
               <layout class="QGridLayout" name="gridLayout_16">
-               <property name="leftMargin">
-                <number>0</number>
-               </property>
-               <property name="topMargin">
-                <number>0</number>
-               </property>
-               <property name="rightMargin">
-                <number>0</number>
-               </property>
-               <property name="bottomMargin">
+               <property name="margin">
                 <number>0</number>
                </property>
               </layout>
              </widget>
              <widget class="QWidget" name="end_on">
               <layout class="QGridLayout" name="gridLayout_14">
-               <property name="leftMargin">
-                <number>0</number>
-               </property>
-               <property name="topMargin">
-                <number>0</number>
-               </property>
-               <property name="rightMargin">
-                <number>0</number>
-               </property>
-               <property name="bottomMargin">
+               <property name="margin">
                 <number>0</number>
                </property>
                <item row="0" column="0">
@@ -1424,19 +1329,10 @@
              </widget>
              <widget class="QWidget" name="end_after">
               <layout class="QGridLayout" name="gridLayout_10">
-               <property name="leftMargin">
-                <number>0</number>
-               </property>
-               <property name="topMargin">
-                <number>0</number>
-               </property>
-               <property name="rightMargin">
-                <number>0</number>
-               </property>
-               <property name="bottomMargin">
+               <property name="horizontalSpacing">
                 <number>0</number>
                </property>
-               <property name="horizontalSpacing">
+               <property name="margin">
                 <number>0</number>
                </property>
                <item row="0" column="0">
@@ -1662,6 +1558,21 @@
  </widget>
  <customwidgets>
   <customwidget>
+   <class>KRichTextEdit</class>
+   <extends>KTextEdit</extends>
+   <header>krichtextedit.h</header>
+  </customwidget>
+  <customwidget>
+   <class>KTimeComboBox</class>
+   <extends>KComboBox</extends>
+   <header>ktimecombobox.h</header>
+  </customwidget>
+  <customwidget>
+   <class>KDateComboBox</class>
+   <extends>KComboBox</extends>
+   <header>kdatecombobox.h</header>
+  </customwidget>
+  <customwidget>
    <class>KComboBox</class>
    <extends>QComboBox</extends>
    <header>kcombobox.h</header>
@@ -1683,6 +1594,11 @@
    <header>ktextedit.h</header>
   </customwidget>
   <customwidget>
+   <class>KRichTextWidget</class>
+   <extends>KRichTextEdit</extends>
+   <header>krichtextwidget.h</header>
+  </customwidget>
+  <customwidget>
    <class>KTabWidget</class>
    <extends>QTabWidget</extends>
    <header>ktabwidget.h</header>
@@ -1714,26 +1630,6 @@
    <header>libkdepim/widgets/tagwidgets.h</header>
    <container>1</container>
   </customwidget>
-  <customwidget>
-   <class>KRichTextEdit</class>
-   <extends>KTextEdit</extends>
-   <header>krichtextedit.h</header>
-  </customwidget>
-  <customwidget>
-   <class>KTimeComboBox</class>
-   <extends>KComboBox</extends>
-   <header>ktimecombobox.h</header>
-  </customwidget>
-  <customwidget>
-   <class>KDateComboBox</class>
-   <extends>KComboBox</extends>
-   <header>kdatecombobox.h</header>
-  </customwidget>
-  <customwidget>
-   <class>KRichTextWidget</class>
-   <extends>KRichTextEdit</extends>
-   <header>krichtextwidget.h</header>
-  </customwidget>
  </customwidgets>
  <resources/>
  <connections>
@@ -1744,12 +1640,12 @@
    <slot>setCurrentIndex(int)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>150</x>
-     <y>298</y>
+     <x>144</x>
+     <y>314</y>
     </hint>
     <hint type="destinationlabel">
-     <x>428</x>
-     <y>298</y>
+     <x>144</x>
+     <y>314</y>
     </hint>
    </hints>
   </connection>
@@ -1760,12 +1656,28 @@
    <slot>setCurrentIndex(int)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>133</x>
-     <y>223</y>
+     <x>142</x>
+     <y>304</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>104</x>
+     <y>280</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>mNewResource</sender>
+   <signal>returnPressed()</signal>
+   <receiver>mBookResourceButton</receiver>
+   <slot>click()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>271</x>
+     <y>805</y>
     </hint>
     <hint type="destinationlabel">
-     <x>143</x>
-     <y>255</y>
+     <x>402</x>
+     <y>808</y>
     </hint>
    </hints>
   </connection>
diff --git a/incidenceeditor-ng/incidenceresource.cpp b/incidenceeditor-ng/incidenceresource.cpp
index 1178a9e..5fc1a78 100644
--- a/incidenceeditor-ng/incidenceresource.cpp
+++ b/incidenceeditor-ng/incidenceresource.cpp
@@ -70,7 +70,7 @@ IncidenceResource::IncidenceResource(IncidenceAttendee* ieAttendee, Ui::EventOrT
 
 #ifndef KDEPIM_MOBILE_UI
     QStringList attrs;
-    attrs << QLatin1String("cn");
+    attrs << QLatin1String("cn") <<  QLatin1String("mail");
 
     completer = new QCompleter(this);
     ResourceModel *model = new ResourceModel(attrs, this);
diff --git a/incidenceeditor-ng/ldaputils.cpp b/incidenceeditor-ng/ldaputils.cpp
new file mode 100644
index 0000000..89235ea
--- /dev/null
+++ b/incidenceeditor-ng/ldaputils.cpp
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2014  Sandro Knauß <knauss at kolabsys.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License or (at your option) version 3 or any later version
+ * accepted by the membership of KDE e.V. (or its successor approved
+ * by the membership of KDE e.V.), which shall act as a proxy
+ * defined in Section 14 of version 3 of the license.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ldaputils.h"
+#include <klocalizedstring.h>
+
+
+QString translateLDAPAttributeForDisplay(const QString &attribute)
+{
+    QString ret = attribute;
+    if (attribute ==  QLatin1String("cn")) {
+        ret = i18nc("ldap attribute cn", "Common name");
+    } else if (attribute ==  QLatin1String("mail")) {
+        ret = i18nc("ldap attribute mail", "Email");
+    } else if (attribute ==  QLatin1String("givenname")) {
+        ret = i18nc("ldap attribute givenname", "Given name");
+    } else if (attribute ==  QLatin1String("sn")) {
+        ret = i18nc("ldap attribute sn", "Surname");
+    } else if (attribute ==  QLatin1String("ou")) {
+        ret = i18nc("ldap attribute ou", "Organization");
+    } else if (attribute ==  QLatin1String("objectClass")) {
+        ret = i18nc("ldap attribute objectClass", "Object class");
+    } else if (attribute ==  QLatin1String("description")) {
+        ret = i18nc("ldap attribute description", "Description");
+    } else if (attribute ==  QLatin1String("telephoneNumber")) {
+        ret = i18nc("ldap attribute telephoneNumber",  "Telephone");
+    } else if (attribute ==  QLatin1String("mobile")) {
+        ret = i18nc("ldap attribute mobile",  "Mobile");
+    }
+    return ret;
+}
+
+QString translateKolabLDAPAttributeForDisplay(const QString &attribute)
+{
+    QString ret = attribute;
+    if (attribute ==  QLatin1String("numseats")) {
+        ret = i18nc("kolabldap", "Number of seats");
+    } else if (attribute ==  QLatin1String("beamer_present")) {
+        ret = i18nc("kolabldap", "Beamer");
+    } else if (attribute ==  QLatin1String("conf_phone_present")) {
+        ret = i18nc("kolabldap", "Conference phone");
+    }
+    return ret;
+}
diff --git a/incidenceeditor-ng/ldaputils.h b/incidenceeditor-ng/ldaputils.h
new file mode 100644
index 0000000..e89b9ca
--- /dev/null
+++ b/incidenceeditor-ng/ldaputils.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2014  Sandro Knauß <knauss at kolabsys.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License or (at your option) version 3 or any later version
+ * accepted by the membership of KDE e.V. (or its successor approved
+ * by the membership of KDE e.V.), which shall act as a proxy
+ * defined in Section 14 of version 3 of the license.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef LDAPUTILS_H
+#define LDAPUTILS_H
+
+#include <QString>
+
+QString translateLDAPAttributeForDisplay(const QString &attribute);
+QString translateKolabLDAPAttributeForDisplay(const QString &attribute);
+#endif //LDAPUTLS_H
\ No newline at end of file
diff --git a/incidenceeditor-ng/resourceitem.cpp b/incidenceeditor-ng/resourceitem.cpp
index 7089ea3..08961ad 100644
--- a/incidenceeditor-ng/resourceitem.cpp
+++ b/incidenceeditor-ng/resourceitem.cpp
@@ -163,4 +163,5 @@ void ResourceItem::slotLDAPResult(const KLDAP::LdapClient &/*client*/,
             itemData << "";
         }
     }
+    emit searchFinished();
 }
\ No newline at end of file
diff --git a/incidenceeditor-ng/resourceitem.h b/incidenceeditor-ng/resourceitem.h
index 3c04373..e5997ca 100644
--- a/incidenceeditor-ng/resourceitem.h
+++ b/incidenceeditor-ng/resourceitem.h
@@ -67,6 +67,9 @@ private:
     QVector<QVariant> itemData;
     ResourceItem::Ptr parentItem;
 
+signals:
+    void searchFinished();
+
 public:
     /* Returns the attributes of the requested ldapObject.
      *
diff --git a/incidenceeditor-ng/resourcemanagement.cpp b/incidenceeditor-ng/resourcemanagement.cpp
index e33349a..781ae26 100644
--- a/incidenceeditor-ng/resourcemanagement.cpp
+++ b/incidenceeditor-ng/resourcemanagement.cpp
@@ -25,6 +25,7 @@
 #include "ui_resourcemanagement.h"
 #include "resourcemodel.h"
 #include "freebusyitem.h"
+#include "ldaputils.h"
 
 #include "freebusyganttproxymodel.h"
 
@@ -36,6 +37,8 @@
 #include <akonadi/calendar/freebusymanager.h>
 #include <kldap/ldapobject.h>
 
+#include <qjson/parser.h>
+
 #include <QPointer>
 #include <QSplitter>
 #include <QStringList>
@@ -141,12 +144,12 @@ public:
     {
     }
 
-        QSize sizeHint() const
-            {
-                QSize s = QHeaderView::sizeHint();
-                s.rheight() *= 2;
-                return s;
-            }
+    QSize sizeHint() const
+    {
+        QSize s = QHeaderView::sizeHint();
+        s.rheight() *= 2;
+        return s;
+    }
 };
 
 
@@ -160,10 +163,6 @@ ResourceManagement::ResourceManagement()
     setMainWidget( w );
 
     QVariantList list;
-    //QGridLayout *layout = new QGridLayout( resourceCalender );
-    //layout->setSpacing( 0 );
-    //KOrganizerPart *view = new KOrganizerPart(resourceCalender,  this,  list);
-    //resourceCalender = view->topLevelWidget();
     mModel = new FreeBusyItemModel;
 #ifndef KDEPIM_MOBILE_UI
 
@@ -196,8 +195,9 @@ ResourceManagement::ResourceManagement()
 #endif
 
     QStringList attrs;
-    attrs << QLatin1String("cn") << QLatin1String("mail") << QLatin1String("givenname") << QLatin1String("sn");
-
+    attrs << QLatin1String("cn") << QLatin1String("mail")
+          << QLatin1String("owner") << QLatin1String("givenname") << QLatin1String("sn")
+          << QLatin1String("kolabDescAttribute") << QLatin1String("description");
     ResourceModel *resourcemodel = new ResourceModel(attrs);
     mUi->treeResults->setModel(resourcemodel);
 
@@ -226,11 +226,11 @@ void ResourceManagement::slotStartSearch(const QString &text)
 void ResourceManagement::slotShowDetails(const QModelIndex & current)
 {
     ResourceItem::Ptr item = current.model()->data(current, ResourceModel::Resource).value<ResourceItem::Ptr>();
-    showDetails(item->ldapObject());
+    showDetails(item->ldapObject(), item->ldapClient());
 }
 
 
-void ResourceManagement::showDetails(const KLDAP::LdapObject &obj)
+void ResourceManagement::showDetails(const KLDAP::LdapObject &obj, const KLDAP::LdapClient &client)
 {
     // Clean up formDetails
     QLayoutItem *child;
@@ -238,20 +238,49 @@ void ResourceManagement::showDetails(const KLDAP::LdapObject &obj)
         delete child->widget();
         delete child;
     }
+    mUi->groupOwner->setHidden(true);
 
     // Fill formDetails with data
     foreach(const QString & key, obj.attributes().keys()) {
+        if (key ==  QLatin1String("objectClass")) {
+            continue;
+        } else if (key ==  QLatin1String("owner")) {
+            QStringList attrs;
+            attrs << QLatin1String("cn") << QLatin1String("mail")
+                  << QLatin1String("mobile") <<  QLatin1String("telephoneNumber")
+                  << QLatin1String("kolabDescAttribute") << QLatin1String("description");
+            mOwnerItem = ResourceItem::Ptr(new ResourceItem(KLDAP::LdapDN(QString::fromUtf8(obj.attributes().value(key).at(0))),
+                                                    attrs,  client));
+            connect(mOwnerItem.data(),  SIGNAL(searchFinished()), SLOT(slotOwnerSearchFinished()));
+            mOwnerItem->startSearch();
+            continue;
+        }
         QStringList list;
         foreach(const QByteArray & value, obj.attributes().value(key)) {
             list << QString::fromUtf8(value);
         }
-        kDebug() << key <<  list;
-        mUi->formDetails->addRow(key, new QLabel(list.join("\n")));
+        if (key ==  QLatin1String("kolabDescAttribute")) {
+            QJson::Parser parser;
+            foreach(const QString &attr,  list) {
+                bool ok;
+                QMap <QString, QVariant > map = parser.parse(attr.toUtf8(), &ok).toMap();
+                foreach(const QString &pKey, map.keys()) {
+                    QString value;
+                    if (map.value(pKey).type() ==  QVariant::Bool) {
+                        value = map.value(pKey).toBool()  ?  i18n("yes") : i18n("no");
+                    } else {
+                        value = map.value(pKey).toString();
+                    }
+                    mUi->formDetails->addRow(translateKolabLDAPAttributeForDisplay(pKey), new QLabel(value));
+                 }
+            }
+        } else {
+            mUi->formDetails->addRow(translateLDAPAttributeForDisplay(key), new QLabel(list.join("\n")));
+        }
     }
 
     QString name = QString::fromUtf8(obj.attributes().value("cn")[0]);
     QString email = QString::fromUtf8(obj.attributes().value("mail")[0]);
-    kDebug() <<  name <<  email;
     KCalCore::Attendee::Ptr attendee(new KCalCore::Attendee(name,  email));
     FreeBusyItem::Ptr freebusy( new FreeBusyItem( attendee, this ));
     mModel->clear();
@@ -271,4 +300,49 @@ void ResourceManagement::slotLayoutChanged()
     }
 }
 
+void ResourceManagement::slotOwnerSearchFinished()
+{
+    // Clean up formDetails
+    QLayoutItem *child;
+    while ((child = mUi->formOwner->takeAt(0)) != 0) {
+        delete child->widget();
+        delete child;
+    }
+    mUi->groupOwner->setHidden(false);
+
+    const KLDAP::LdapObject &obj = mOwnerItem->ldapObject();
+    foreach(const QString & key, obj.attributes().keys()) {
+        if (key ==  QLatin1String("objectClass")
+            || key ==  QLatin1String("owner")
+            || key ==  QLatin1String("givenname")
+            || key ==  QLatin1String("sn")) {
+            continue;
+        }
+        QStringList list;
+        foreach(const QByteArray & value, obj.attributes().value(key)) {
+            list << QString::fromUtf8(value);
+          }
+        if (key ==  QLatin1String("kolabDescAttribute")) {
+            QJson::Parser parser;
+            foreach(const QString &attr,  list) {
+                bool ok;
+                QMap <QString, QVariant > map = parser.parse(attr.toUtf8(), &ok).toMap();
+                foreach(const QString &pKey, map.keys()) {
+                    QString value;
+                    if (map.value(pKey).type() ==  QVariant::Bool) {
+                        value = map.value(pKey).toBool()  ?  i18n("yes") : i18n("no");
+                      } else {
+                          value = map.value(pKey).toString();
+                        }
+                    mUi->formOwner->addRow(translateKolabLDAPAttributeForDisplay(pKey), new QLabel(value));
+                  }
+              }
+          } else {
+              mUi->formOwner->addRow(translateLDAPAttributeForDisplay(key), new QLabel(list.join("\n")));
+            }
+      }
+
+}
+
+
 #include "resourcemanagement.moc"
diff --git a/incidenceeditor-ng/resourcemanagement.h b/incidenceeditor-ng/resourcemanagement.h
index c6dea43..8dedb4f 100644
--- a/incidenceeditor-ng/resourcemanagement.h
+++ b/incidenceeditor-ng/resourcemanagement.h
@@ -28,6 +28,7 @@
 #include <ldap/ldapclientsearch.h>
 
 #include "freebusyitemmodel.h"
+#include "resourceitem.h"
 
 # include <KCalCore/FreeBusy>
 #include <KDialog>
@@ -52,7 +53,7 @@ private:
     /* Shows the details of a resource
      *
      */
-    void showDetails(const KLDAP::LdapObject&);
+    void showDetails(const KLDAP::LdapObject&, const KLDAP::LdapClient &client);
 
     QItemSelectionModel *selectionModel;
 
@@ -66,6 +67,11 @@ private slots:
      *
      */
     void slotShowDetails(const QModelIndex & current);
+    
+    /**
+     * The Owner search is done
+     */
+    void slotOwnerSearchFinished();
 
     void slotInsertFreeBusy( const KCalCore::FreeBusy::Ptr &fb, const QString &email );
 
@@ -73,6 +79,7 @@ private slots:
 
 private:
     FreeBusyItemModel *mModel;
+    ResourceItem::Ptr mOwnerItem;
     Ui_resourceManagement *mUi;
 };
 
diff --git a/incidenceeditor-ng/resourcemanagement.ui b/incidenceeditor-ng/resourcemanagement.ui
index 09d6f37..dd3746f 100644
--- a/incidenceeditor-ng/resourcemanagement.ui
+++ b/incidenceeditor-ng/resourcemanagement.ui
@@ -6,89 +6,90 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>916</width>
-    <height>782</height>
+    <width>552</width>
+    <height>566</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QHBoxLayout" name="horizontalLayout_2">
-   <property name="spacing">
-    <number>6</number>
-   </property>
+  <layout class="QVBoxLayout" name="verticalLayout_5">
    <item>
-    <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
-     <property name="spacing">
-      <number>2</number>
+    <widget class="QSplitter" name="splitter_2">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
      </property>
-     <item>
-      <widget class="KLineEdit" name="resourceSearch">
-       <property name="maximumSize">
-        <size>
-         <width>400</width>
-         <height>16777215</height>
-        </size>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QTreeView" name="treeResults">
-       <property name="minimumSize">
-        <size>
-         <width>200</width>
-         <height>0</height>
-        </size>
-       </property>
-       <property name="maximumSize">
-        <size>
-         <width>400</width>
-         <height>16777215</height>
-        </size>
-       </property>
-       <property name="alternatingRowColors">
-        <bool>true</bool>
-       </property>
-       <property name="selectionBehavior">
-        <enum>QAbstractItemView::SelectRows</enum>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout_2">
-     <property name="spacing">
-      <number>2</number>
-     </property>
-     <item>
-      <widget class="QGroupBox" name="groupDetails">
-       <property name="enabled">
-        <bool>true</bool>
-       </property>
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="title">
-        <string>Details</string>
-       </property>
-       <layout class="QVBoxLayout" name="verticalLayout_4">
-        <property name="rightMargin">
-         <number>4</number>
-        </property>
+     <widget class="QWidget" name="">
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <widget class="KLineEdit" name="resourceSearch">
+         <property name="showClearButton" stdset="0">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QTreeView" name="treeResults">
+         <property name="alternatingRowColors">
+          <bool>true</bool>
+         </property>
+         <property name="selectionBehavior">
+          <enum>QAbstractItemView::SelectRows</enum>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QSplitter" name="splitter">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <widget class="QWidget" name="">
+       <layout class="QVBoxLayout" name="verticalLayout_3">
         <item>
-         <layout class="QFormLayout" name="formDetails"/>
+         <widget class="QGroupBox" name="groupDetails">
+          <property name="enabled">
+           <bool>true</bool>
+          </property>
+          <property name="title">
+           <string>Details</string>
+          </property>
+          <layout class="QVBoxLayout" name="verticalLayout_4">
+           <property name="rightMargin">
+            <number>4</number>
+           </property>
+           <item>
+            <layout class="QFormLayout" name="formDetails"/>
+           </item>
+          </layout>
+         </widget>
         </item>
+        <item>
+         <widget class="QGroupBox" name="groupOwner">
+          <property name="enabled">
+           <bool>true</bool>
+          </property>
+          <property name="title">
+           <string>Owner</string>
+          </property>
+          <layout class="QVBoxLayout" name="verticalLayout_2">
+           <item>
+            <layout class="QFormLayout" name="formOwner"/>
+           </item>
+          </layout>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="">
+       <layout class="QHBoxLayout" name="resourceCalender">
+        <property name="sizeConstraint">
+         <enum>QLayout::SetDefaultConstraint</enum>
+        </property>
        </layout>
       </widget>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="resourceCalender"/>
-     </item>
-    </layout>
+     </widget>
+    </widget>
    </item>
   </layout>
  </widget>
diff --git a/incidenceeditor-ng/resourcemodel.cpp b/incidenceeditor-ng/resourcemodel.cpp
index 274dee0..d4f8346 100644
--- a/incidenceeditor-ng/resourcemodel.cpp
+++ b/incidenceeditor-ng/resourcemodel.cpp
@@ -19,6 +19,7 @@
  *
  */
 #include "resourcemodel.h"
+#include "ldaputils.h"
 
 #include <KPIMUtils/Email>
 #include <KDebug>
@@ -43,6 +44,7 @@ ResourceModel::ResourceModel(const QStringList &headers,
     QStringList attrs = ldapSearchCollections.attributes();
     attrs << QLatin1String("uniqueMember");
     ldapSearchCollections.setAttributes(attrs);
+    ldapSearch.setAttributes(headers);
 
     connect(&ldapSearchCollections, SIGNAL(searchData(const QList<KLDAP::LdapResultObject> &)),
             SLOT(slotLDAPCollectionData(const QList<KLDAP::LdapResultObject> &)));
@@ -105,7 +107,7 @@ QVariant ResourceModel::headerData(int section, Qt::Orientation orientation,
                                    int role) const
 {
     if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
-        return rootItem->data(section);
+        return translateLDAPAttributeForDisplay(rootItem->data(section).toString());
     }
 
     return QVariant();
diff --git a/incidenceeditor-ng/tests/CMakeLists.txt b/incidenceeditor-ng/tests/CMakeLists.txt
index 1bf9c05..dd09086 100644
--- a/incidenceeditor-ng/tests/CMakeLists.txt
+++ b/incidenceeditor-ng/tests/CMakeLists.txt
@@ -27,7 +27,6 @@ IE_UNIT_TESTS(
   testfreebusyitemmodel
   testfreeperiodmodel
   testfreebusyganttproxymodel
-  testdialog
 )
 
 ########### KTimeZoneComboBox unit test #############


commit 71e0c77b8558351d5957d0a0ab5eb88d451c206a
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Sat Jul 5 12:54:38 2014 +0200

    foo

diff --git a/incidenceeditor-ng/resourcemanagement.cpp b/incidenceeditor-ng/resourcemanagement.cpp
index 4da6343..e33349a 100644
--- a/incidenceeditor-ng/resourcemanagement.cpp
+++ b/incidenceeditor-ng/resourcemanagement.cpp
@@ -19,6 +19,8 @@
  *
  */
 
+//http://stackoverflow.com/questions/18831242/qt-start-editing-of-cell-after-one-click
+
 #include "resourcemanagement.h"
 #include "ui_resourcemanagement.h"
 #include "resourcemodel.h"


commit 0d6fbe283913f8f86c15a0a5afcbc67d1fa74a22
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Tue Jun 24 14:48:53 2014 +0200

    completionbox for resources also activate

diff --git a/incidenceeditor-ng/incidenceattendee.cpp b/incidenceeditor-ng/incidenceattendee.cpp
index e10c2cf..1dd0e12 100644
--- a/incidenceeditor-ng/incidenceattendee.cpp
+++ b/incidenceeditor-ng/incidenceattendee.cpp
@@ -147,14 +147,14 @@ IncidenceAttendee::IncidenceAttendee( QWidget *parent, IncidenceDateTime *dateTi
 #else
   mUi->mAttendeeTable->setModel(filterProxyModel);
 
-  AttendeeLineEditDelegate *attendeeDelegate = new AttendeeLineEditDelegate(this);
-  attendeeDelegate->setCompletionMode( KGlobalSettings::self()->completionMode() );
+  mAttendeeDelegate = new AttendeeLineEditDelegate(this);
+  mAttendeeDelegate->setCompletionMode( KGlobalSettings::self()->completionMode() );
 
   QHeaderView* headerView = mUi->mAttendeeTable->horizontalHeader();
   headerView->setResizeMode(QHeaderView::ResizeToContents);
 
   mUi->mAttendeeTable->setItemDelegateForColumn(AttendeeTableModel::Role, roleDelegate());
-  mUi->mAttendeeTable->setItemDelegateForColumn(AttendeeTableModel::FullName, attendeeDelegate);
+  mUi->mAttendeeTable->setItemDelegateForColumn(AttendeeTableModel::FullName, attendeeDelegate());
   mUi->mAttendeeTable->setItemDelegateForColumn(AttendeeTableModel::Status, stateDelegate());
   mUi->mAttendeeTable->setItemDelegateForColumn(AttendeeTableModel::Response, responseDelegate());
 #endif
@@ -700,6 +700,12 @@ AttendeeComboBoxDelegate* IncidenceAttendee::stateDelegate()
   return mStateDelegate;
 }
 
+AttendeeLineEditDelegate *IncidenceAttendee::attendeeDelegate()
+{
+  return mAttendeeDelegate;
+}
+
+
 void IncidenceAttendee::filterLayoutChanged()
 {
 #ifndef KDEPIM_MOBILE_UI
diff --git a/incidenceeditor-ng/incidenceattendee.h b/incidenceeditor-ng/incidenceattendee.h
index 46d47bc..cf07170 100644
--- a/incidenceeditor-ng/incidenceattendee.h
+++ b/incidenceeditor-ng/incidenceattendee.h
@@ -44,6 +44,7 @@ namespace IncidenceEditorNG {
 
 class AttendeeEditor;
 class AttendeeComboBoxDelegate;
+class AttendeeLineEditDelegate;
 class ConflictResolver;
 class IncidenceDateTime;
 
@@ -67,6 +68,7 @@ class INCIDENCEEDITORS_NG_EXPORT IncidenceAttendee : public IncidenceEditor
     AttendeeComboBoxDelegate *stateDelegate();
     AttendeeComboBoxDelegate *roleDelegate();
     AttendeeComboBoxDelegate *responseDelegate();
+    AttendeeLineEditDelegate *attendeeDelegate();
 
     int attendeeCount() const;
 
@@ -130,6 +132,7 @@ class INCIDENCEEDITORS_NG_EXPORT IncidenceAttendee : public IncidenceEditor
 
     /** used dataModel to rely on*/
     AttendeeTableModel *mDataModel;
+    AttendeeLineEditDelegate *mAttendeeDelegate;
     AttendeeComboBoxDelegate *mStateDelegate;
     AttendeeComboBoxDelegate *mRoleDelegate;
     AttendeeComboBoxDelegate *mResponseDelegate;
diff --git a/incidenceeditor-ng/incidenceresource.cpp b/incidenceeditor-ng/incidenceresource.cpp
index a8830e0..1178a9e 100644
--- a/incidenceeditor-ng/incidenceresource.cpp
+++ b/incidenceeditor-ng/incidenceresource.cpp
@@ -86,6 +86,7 @@ IncidenceResource::IncidenceResource(IncidenceAttendee* ieAttendee, Ui::EventOrT
     mUi->mNewResource->setCompleter(completer);
 
     AttendeeLineEditDelegate *attendeeDelegate = new AttendeeLineEditDelegate(this);
+    attendeeDelegate->setCompletionMode( KGlobalSettings::self()->completionMode() );
 
     ResourceFilterProxyModel *filterProxyModel = new ResourceFilterProxyModel(this);
     filterProxyModel->setDynamicSortFilter(true);


commit bd61511fde56a9b5baf3396a3743a34752df6048
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Tue Jun 24 10:02:38 2014 +0200

    foo-remove again

diff --git a/incidenceeditor-ng/tests/CMakeLists.txt b/incidenceeditor-ng/tests/CMakeLists.txt
index 36f094e..1bf9c05 100644
--- a/incidenceeditor-ng/tests/CMakeLists.txt
+++ b/incidenceeditor-ng/tests/CMakeLists.txt
@@ -4,10 +4,14 @@ include_directories(
  ../
 )
 
+include(AkonadiMacros)
+set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE)
+set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE)
+
 MACRO(IE_UNIT_TESTS)
   FOREACH(_testname ${ARGN})
     kde4_add_unit_test(${_testname} NOGUI ${_testname}.cpp modeltest.cpp)
-    target_link_libraries(${_testname} ${QT_QTTEST_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDEPIMLIBS_AKONADI_LIBS}  kdgantt2 ${KDEPIMLIBS_KCALUTILS_LIBS} ${KDEPIMLIBS_KCALCORE_LIBS} incidenceeditorsng kdepimdbusinterfaces)
+    target_link_libraries(${_testname} ${QT_QTTEST_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDEPIMLIBS_AKONADI_LIBS}  kdgantt2 akonadi-calendar ${AKONADI_COMMON_LIBRARIES} ${QT_QTNETWORK_LIBRARY} calendarsupport ${KDEPIMLIBS_KCALUTILS_LIBS} ${KDEPIMLIBS_KCALCORE_LIBS} incidenceeditorsng kdepimdbusinterfaces)
   ENDFOREACH(_testname)
 ENDMACRO(IE_UNIT_TESTS)
 
@@ -23,6 +27,7 @@ IE_UNIT_TESTS(
   testfreebusyitemmodel
   testfreeperiodmodel
   testfreebusyganttproxymodel
+  testdialog
 )
 
 ########### KTimeZoneComboBox unit test #############
@@ -53,3 +58,4 @@ target_link_libraries(resourcemanagement_gui
 )
 
 
+


commit d5ebf8f7952ee5195f2ad761c03ad0a65350b780
Author: Sandro Knauß <knauss at kolabsys.com>
Date:   Tue Jun 24 09:59:17 2014 +0200

    using KLineEdit for resourcemanagment

diff --git a/incidenceeditor-ng/resourcemanagement.ui b/incidenceeditor-ng/resourcemanagement.ui
index cf6b003..09d6f37 100644
--- a/incidenceeditor-ng/resourcemanagement.ui
+++ b/incidenceeditor-ng/resourcemanagement.ui
@@ -23,7 +23,14 @@
       <number>2</number>
      </property>
      <item>
-      <widget class="QLineEdit" name="resourceSearch"/>
+      <widget class="KLineEdit" name="resourceSearch">
+       <property name="maximumSize">
+        <size>
+         <width>400</width>
+         <height>16777215</height>
+        </size>
+       </property>
+      </widget>
      </item>
      <item>
       <widget class="QTreeView" name="treeResults">
@@ -33,6 +40,12 @@
          <height>0</height>
         </size>
        </property>
+       <property name="maximumSize">
+        <size>
+         <width>400</width>
+         <height>16777215</height>
+        </size>
+       </property>
        <property name="alternatingRowColors">
         <bool>true</bool>
        </property>
@@ -79,6 +92,13 @@
    </item>
   </layout>
  </widget>
+ <customwidgets>
+  <customwidget>
+   <class>KLineEdit</class>
+   <extends>QLineEdit</extends>
+   <header>klineedit.h</header>
+  </customwidget>
+ </customwidgets>
  <resources/>
  <connections/>
 </ui>





More information about the commits mailing list