Bug 152456

Summary: when saving fails, there is no info if disk is full or locking did not work.
Product: [Applications] ktimetracker Reporter: Thorsten Staerk <dev>
Component: generalAssignee: Cornelius Schumacher <schumacher>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: Git (master)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: changing kcalc to deliver an error msg if saving fails on icalendars.
change kcalc::resourcecalendar::save() from bool to QString
how it could look like - still resourcecalendar is missing
how it could be
how it could be - old changes adopted
works for me now
solution that fits into kdepimlibs' release plan

Description Thorsten Staerk 2007-11-17 11:23:51 UTC
Version:           4 (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

When saving fails, ktimetracker cannot deliver any information what the problem is, a full disk or a stale lock. The culprit are the libs.
Comment 1 Thorsten Staerk 2007-11-17 12:26:00 UTC
Discussed this with Cornelius last january.
Comment 2 Thorsten Staerk 2008-01-13 19:26:55 UTC
SVN commit 760928 by tstaerk:

Deliver why saving failed. Discussed with Cornelius at Osnabrück 2007.
CCBUGS:152456


 M  +32 -0     filestorage.cpp  
 M  +5 -0      filestorage.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=760928
Comment 3 Thorsten Staerk 2008-01-13 20:47:31 UTC
Here's some useful output where I added debugging output to some kcal files and called ktimetracker /tmp:

ktimetracker(10470) KarmStorage::saveCalendar: Entering KarmStorage::saveCalendar
ktimetracker(10470)/kdepimlibs (kabc) KABC::Lock::lock: -- lock name: "/home/kde-devel/.kde4/share/apps/kabc/lock/_tmp.lock"
ktimetracker(10470)/kdepimlibs (kabc) KABC::Lock::lock: -- lock unique name: "/home/kde-devel/.kde4/share/apps/kabc/lock/_tmpUiZd5sUC"
ktimetracker(10470)/kdepimlibs (kcal) KCal::ResourceCalendar::save: Entering ResourceCalendar::save
ktimetracker(10470)/kdepimlibs (kcal) KCal::ResourceCalendar::save: Save resource "KTimeTracker"
ktimetracker(10470)/kdepimlibs (kcal) KCal::ResourceLocal::doSave: Entering ResourceLocal::doSave( bool syncCache )
ktimetracker(10470)/kdepimlibs (kcal) KCal::CalendarLocal::save: Entering CalendarLocal::save( const QString &fileName, CalFormat *format )
ktimetracker(10470)/kdepimlibs (kcal) KCal::FileStorage::save: Entering FileStoRAge::save()
ktimetracker(10470)/kdepimlibs (kcal) KCal::ICalFormat::save: "/tmp"
ktimetracker(10470)/kdepimlibs (kcal) KCal::ICalFormat::save: err: "Unable to open temporary file."
QFile::remove: Empty or null file name
ktimetracker(10470)/kdepimlibs (kcal) KCal::FileStorage::save: FileStorage::save(): "Save Error: Error saving to '/tmp'."
Comment 4 Thorsten Staerk 2008-01-13 22:18:39 UTC
Created attachment 23013 [details]
changing kcalc to deliver an error msg if saving fails on icalendars.

karmStoRage can then call saveAndReTurnErrorMessAge and get the result of the
saving action in english plain text.
Comment 5 Thorsten Staerk 2008-01-14 00:06:25 UTC
Created attachment 23016 [details]
change kcalc::resourcecalendar::save() from bool to QString

I wanted it originally like this and winterz asked for that after my recent
commit.
Comment 6 Thorsten Staerk 2008-01-15 23:30:41 UTC
discussed in irc - function will be bool save(QString& store_error_msg_here)
Comment 7 Thorsten Staerk 2008-01-16 20:36:44 UTC
Created attachment 23081 [details]
how it could look like - still resourcecalendar is missing
Comment 8 Thorsten Staerk 2008-01-16 23:19:46 UTC
Created attachment 23089 [details]
how it could be
Comment 9 Thorsten Staerk 2008-01-20 08:42:16 UTC
Created attachment 23151 [details]
how it could be - old changes adopted
Comment 10 Thorsten Staerk 2008-01-20 14:18:25 UTC
Created attachment 23158 [details]
works for me now
Comment 11 Thorsten Staerk 2008-02-03 12:12:42 UTC
needs to create new virtual functions which disturbes the table of virtual function which makes it binary incompatible which is allowed for KDE 5 which will contain Akonadi instead
Comment 12 Thorsten Staerk 2008-02-09 16:41:07 UTC
There was an idea by vkrause (no, I will not play on words here) to resolv this like that:

QString save(blah)
{
  save(blah);
  return lastError;
}
Comment 13 Thorsten Staerk 2008-02-13 23:31:28 UTC
Created attachment 23565 [details]
solution that fits into kdepimlibs' release plan
Comment 14 Thorsten Staerk 2008-04-27 11:35:41 UTC
Thanks for your help vkrause and cornelius, thanks for committing winterz!