Bug 134833

Summary: Kontact's karm plugin doesn't clear session times.
Product: [Applications] ktimetracker Reporter: Sergey <sergey1369>
Component: generalAssignee: Thorsten Staerk <dev>
Status: RESOLVED FIXED    
Severity: normal CC: debian
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Sergey 2006-09-29 11:26:22 UTC
Version:           unknown (using KDE 3.5.4 "release 78.1" , openSUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.16.21-0.25-smp

1) Run Kontact, enable and select Karm plugin/component.
2) Create new task "Test" with +1 hour time.
3) Select "Start new session" from "File" menu.

The session time is not zeroed. The problem exists only in Kontact's plugin. There is no problem in standalone karm.
Comment 1 Thorsten Staerk 2006-09-29 12:47:33 UTC
Thanks for the report.
Comment 2 Sergey 2006-09-29 12:50:28 UTC
Problem with missing slots in karm_part.h. Here is a fix. 

diff -u -r kdepim-3.5.4/karm.orig/karm_part.cpp kdepim-3.5.4/karm/karm_part.cpp
--- kdepim-3.5.4/karm.orig/karm_part.cpp	2006-09-29 14:37:27.000000000 +0400
+++ kdepim-3.5.4/karm/karm_part.cpp	2006-09-29 14:43:45.000000000 +0400
@@ -693,6 +693,11 @@
   return _taskView->importPlanner(fileName);
 }
 
+void karmPart::startNewSession()
+{
+  _taskView->startNewSession();
+  _taskView->save();
+}
 
 
 #include <qpopupmenu.h>
diff -u -r kdepim-3.5.4/karm.orig/karm_part.h kdepim-3.5.4/karm/karm_part.h
--- kdepim-3.5.4/karm.orig/karm_part.h	2006-09-29 14:37:27.000000000 +0400
+++ kdepim-3.5.4/karm/karm_part.h	2006-09-29 14:39:08.000000000 +0400
@@ -112,6 +112,7 @@
     void fileOpen();
     void fileSaveAs();
     void slotSelectionChanged();
+    void startNewSession();
 
 };
 
Comment 3 Thorsten Staerk 2006-09-29 12:59:41 UTC
Sergey, what's your surname so I can write it into the commit message when I post the patch ?
Comment 4 Thorsten Staerk 2006-09-29 13:32:03 UTC
I asked coolo for an exception to get this patch still into the new KDE 3.5.5.
Comment 5 Sergey 2006-09-29 13:37:08 UTC
Thank you, there is no need to post my details (name or surname). 
Great!! I'll glad see karm plugin fixed so soon. :)
Comment 6 Thorsten Staerk 2006-09-29 14:52:16 UTC
SVN commit 590178 by tstaerk:

Allow starting a new session in the kontact plugin. Thanks to Sergey for
patch and notification.
CCBUGS:134833


 M  +5 -1      karm_part.cpp  
 M  +1 -1      karm_part.h  


--- branches/KDE/3.5/kdepim/karm/karm_part.cpp #590177:590178
@@ -693,7 +693,11 @@
   return _taskView->importPlanner(fileName);
 }
 
+void karmPart::startNewSession()
+{
+  _taskView->startNewSession();
+  _taskView->save();
+} 
 
-
 #include <qpopupmenu.h>
 #include "karm_part.moc"
--- branches/KDE/3.5/kdepim/karm/karm_part.h #590177:590178
@@ -112,7 +112,7 @@
     void fileOpen();
     void fileSaveAs();
     void slotSelectionChanged();
-
+    void startNewSession(); 
 };
 
 class KInstance;
Comment 7 Thorsten Staerk 2006-09-30 11:56:07 UTC
SVN commit 590467 by tstaerk:

Reset session times also in kontact plugin.
BUGS:134833


 M  +6 -1      karm_part.cpp  
 M  +1 -0      karm_part.h  


--- trunk/KDE/kdepim/karm/karm_part.cpp #590466:590467
@@ -670,7 +670,12 @@
   return _taskView->importPlanner(fileName);
 }
 
+void karmPart::startNewSession() 
+{ 
+  _taskView->startNewSession(); 
+  _taskView->save(); 
+} 
+   
 
-
 #include <q3popupmenu.h>
 #include "karm_part.moc"
--- trunk/KDE/kdepim/karm/karm_part.h #590466:590467
@@ -112,6 +112,7 @@
     void fileOpen();
     void fileSaveAs();
     void slotSelectionChanged();
+    void startNewSession(); 
 
 public slots:
    void setStatusBar(const QString & qs);
Comment 8 Thorsten Staerk 2006-10-03 10:33:29 UTC
As you can tell from http://websvn.kde.org/tags, your fix is in KDE 3.5.5 that came out 16 hours ago.
Comment 9 Thorsten Staerk 2007-04-20 20:12:23 UTC
*** Bug 137237 has been marked as a duplicate of this bug. ***