[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/akonadi-ports/kdepim/korganizer
From:       Bertjan Broeksema <b.broeksema () home ! nl>
Date:       2009-11-16 15:31:29
Message-ID: 1258385489.703842.17568.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1050089 by bbroeksema:

Fix some signal slot connections.


 M  +2 -2      calendarview.cpp  
 M  +1 -1      calendarview.h  
 M  +8 -1      views/agendaview/koagendaview.cpp  
 M  +2 -0      views/agendaview/koagendaview.h  


--- branches/work/akonadi-ports/kdepim/korganizer/calendarview.cpp #1050088:1050089
@@ -976,9 +976,9 @@
   newEvent( Akonadi::Collection::List(), QDateTime(), QDateTime() );
 }
 
-void CalendarView::newEvent( const QDateTime &startDt )
+void CalendarView::newEvent( const QDate &startDt )
 {
-  newEvent( Akonadi::Collection::List(), startDt, QDateTime() );
+  newEvent( Akonadi::Collection::List(), QDateTime( startDt ), QDateTime() );
 }
 
 void CalendarView::newEvent( const Akonadi::Collection::List &selectedCollections )
--- branches/work/akonadi-ports/kdepim/korganizer/calendarview.h #1050088:1050089
@@ -289,7 +289,7 @@
 
     /** create new event without having a hint for the calendar. */
     void newEvent();
-    void newEvent( const QDateTime & );
+    void newEvent( const QDate & );
 
     /** create new event without having a date hint. Takes current date as
      default hint. */
--- branches/work/akonadi-ports/kdepim/korganizer/views/agendaview/koagendaview.cpp #1050088:1050089
@@ -266,7 +266,9 @@
   agenda->setCalendar( calendar() );
 
   // Create/Show/Edit/Delete Event
-  connect( agenda, SIGNAL(newEventSignal()), SIGNAL(newEventSignal()) );
+  // Is the newEventSignal even emitted? It doesn't seem to reach handleNewEventRequest()
+  // at least.
+  connect( agenda, SIGNAL(newEventSignal()), SLOT(handleNewEventRequest()) );
 
   connect( agenda, SIGNAL(newStartSelectSignal()),
            otherAgenda, SLOT(clearSelection()) );
@@ -1590,6 +1592,11 @@
   mTimeSpanInAllDay = true;
 }
 
+void KOAgendaView::handleNewEventRequest()
+{
+  emit newEventSignal( Akonadi::Collection::List() << Collection( collection() ) );
+}
+
 void KOAgendaView::newTimeSpanSelected( const QPoint &start, const QPoint &end )
 {
   if ( !mSelectedDates.count() ) {
--- branches/work/akonadi-ports/kdepim/korganizer/views/agendaview/koagendaview.h #1050088:1050089
@@ -245,6 +245,8 @@
     /** Updates data for selected timespan for all day event*/
     void newTimeSpanSelectedAllDay( const QPoint &start, const QPoint &end );
 
+    void handleNewEventRequest();
+
   private:
 
     bool filterByCollectionSelection( const Akonadi::Item &incidence );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic